Skip to content

Commit

Permalink
added since comments
Browse files Browse the repository at this point in the history
  • Loading branch information
MaggieCabrera committed Sep 9, 2022
1 parent 17a71de commit 32d5e2c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
6 changes: 6 additions & 0 deletions src/wp-includes/class-wp-theme-json.php
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,7 @@ class WP_Theme_JSON {
* Define which defines which pseudo selectors are enabled for
* which elements.
* Note: this will effect both top level and block level elements.
* @since 6.1.0
*/
const VALID_ELEMENT_PSEUDO_SELECTORS = array(
'link' => array( ':hover', ':focus', ':active', ':visited' ),
Expand All @@ -357,6 +358,7 @@ class WP_Theme_JSON {
* The valid elements that can be found under styles.
*
* @since 5.8.0
* @since 6.1.0 Added heading, button and caption elements
* @var string[]
*/
const ELEMENTS = array(
Expand Down Expand Up @@ -1312,6 +1314,7 @@ protected static function flatten_tree( $tree, $prefix = '', $token = '--' ) {
*
* @since 5.8.0
* @since 5.9.0 Added the `$settings` and `$properties` parameters.
* @since 6.1.0 Added the `$theme_json` parameter.
*
* @param array $styles Styles to process.
* @param array $settings Theme settings.
Expand Down Expand Up @@ -1372,6 +1375,7 @@ protected static function compute_style_properties( $styles, $settings = array()
*
* @since 5.8.0
* @since 5.9.0 Added support for values of array type, which are returned as is.
* @since 6.1.0 Added the `$theme_json` parameter.
*
* @param array $styles Styles subtree.
* @param array $path Which property to process.
Expand Down Expand Up @@ -1618,6 +1622,8 @@ private static function get_block_nodes( $theme_json ) {
/**
* Gets the CSS rules for a particular block from theme.json.
*
* @since 6.1.0
*
* @param array $block_metadata Meta data about the block to get styles for.
*
* @return array Styles for the block.
Expand Down
4 changes: 2 additions & 2 deletions src/wp-includes/global-styles-and-settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -195,9 +195,9 @@ function wp_get_global_styles_svg_filters() {

/**
* Adds global style rules to the inline style for each block.
*
*
* @since 6.1.0
*
*
*/
function wp_add_global_styles_for_blocks() {
$tree = WP_Theme_JSON_Resolver::get_merged_data();
Expand Down
2 changes: 1 addition & 1 deletion src/wp-includes/script-loader.php
Original file line number Diff line number Diff line change
Expand Up @@ -2361,7 +2361,7 @@ function wp_common_block_scripts_and_styles() {
* This filter allows us to modify the output of WP_Theme_JSON depending on whether or not we are loading separate assets,
* without making the class aware of that detail.
*
* @since 6.1
* @since 6.1.0
*
* @param array $nodes The nodes to filter.
* @return array A filtered array of style nodes.
Expand Down

0 comments on commit 32d5e2c

Please sign in to comment.