From 833417c545cb60e9cbe49a717217c3997b6629fa Mon Sep 17 00:00:00 2001 From: isabel_brison Date: Mon, 9 Dec 2024 02:55:18 +0000 Subject: [PATCH] =?UTF-8?q?Editor:=20Update=20docblocks=20for=C2=A0`wp=5Fg?= =?UTF-8?q?et=5Fglobal=5Fstylesheet`=C2=A0and=C2=A0`WP=5FTheme=5FJSON::get?= =?UTF-8?q?=5Fstylesheet`.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Updates docblocks to account for new use of the `custom-css` string in their `$types` parameters and adds information to deprecation of `wp_get_global_styles_custom_css`. Props justlevine, isabel_brison, ramonopoly. Fixes #62665. Built from https://develop.svn.wordpress.org/trunk@59499 git-svn-id: http://core.svn.wordpress.org/trunk@58885 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/class-wp-theme-json.php | 2 ++ wp-includes/deprecated.php | 2 +- wp-includes/global-styles-and-settings.php | 2 +- wp-includes/version.php | 2 +- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/wp-includes/class-wp-theme-json.php b/wp-includes/class-wp-theme-json.php index cb48672c43..7d1216a451 100644 --- a/wp-includes/class-wp-theme-json.php +++ b/wp-includes/class-wp-theme-json.php @@ -1317,6 +1317,8 @@ class WP_Theme_JSON { * - `variables`: only the CSS Custom Properties for presets & custom ones. * - `styles`: only the styles section in theme.json. * - `presets`: only the classes for the presets. + * - `base-layout-styles`: only the base layout styles. + * - `custom-css`: only the custom CSS. * @param string[] $origins A list of origins to include. By default it includes VALID_ORIGINS. * @param array $options { * Optional. An array of options for now used for internal purposes only (may change without notice). diff --git a/wp-includes/deprecated.php b/wp-includes/deprecated.php index 348267b6a5..09d7867156 100644 --- a/wp-includes/deprecated.php +++ b/wp-includes/deprecated.php @@ -6316,7 +6316,7 @@ function wp_interactivity_process_directives_of_interactive_blocks( array $parse * Gets the global styles custom CSS from theme.json. * * @since 6.2.0 - * @deprecated 6.7.0 Use {@see 'wp_get_global_stylesheet'} instead. + * @deprecated 6.7.0 Use {@see 'wp_get_global_stylesheet'} instead for top-level custom CSS, or {@see 'WP_Theme_JSON::get_styles_for_block'} for block-level custom CSS. * * @return string The global styles custom CSS. */ diff --git a/wp-includes/global-styles-and-settings.php b/wp-includes/global-styles-and-settings.php index 34fc28694b..b75dd79ea6 100644 --- a/wp-includes/global-styles-and-settings.php +++ b/wp-includes/global-styles-and-settings.php @@ -142,7 +142,7 @@ function wp_get_global_styles( $path = array(), $context = array() ) { * @since 6.6.0 Resolves relative paths in theme.json styles to theme absolute paths. * * @param array $types Optional. Types of styles to load. - * It accepts as values 'variables', 'presets', 'styles', 'base-layout-styles'. + * See {@see 'WP_Theme_JSON::get_stylesheet'} for all valid types. * If empty, it'll load the following: * - for themes without theme.json: 'variables', 'presets', 'base-layout-styles'. * - for themes with theme.json: 'variables', 'presets', 'styles'. diff --git a/wp-includes/version.php b/wp-includes/version.php index a34974ec3d..b6e7a1f23a 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.8-alpha-59498'; +$wp_version = '6.8-alpha-59499'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.