From 32d5e2ceab8b51dab403234996e40ed95dbd620f Mon Sep 17 00:00:00 2001 From: MaggieCabrera Date: Fri, 9 Sep 2022 10:10:06 +0200 Subject: [PATCH] added since comments --- src/wp-includes/class-wp-theme-json.php | 6 ++++++ src/wp-includes/global-styles-and-settings.php | 4 ++-- src/wp-includes/script-loader.php | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/wp-includes/class-wp-theme-json.php b/src/wp-includes/class-wp-theme-json.php index 1be05aacbac01..c35a68074fd18 100644 --- a/src/wp-includes/class-wp-theme-json.php +++ b/src/wp-includes/class-wp-theme-json.php @@ -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' ), @@ -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( @@ -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. @@ -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. @@ -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. diff --git a/src/wp-includes/global-styles-and-settings.php b/src/wp-includes/global-styles-and-settings.php index 1762678686b31..a7e58353ebc1e 100644 --- a/src/wp-includes/global-styles-and-settings.php +++ b/src/wp-includes/global-styles-and-settings.php @@ -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(); diff --git a/src/wp-includes/script-loader.php b/src/wp-includes/script-loader.php index 31c18d8b6247b..f0d47cb85d0e6 100644 --- a/src/wp-includes/script-loader.php +++ b/src/wp-includes/script-loader.php @@ -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.