Skip to content

Commit a1079b6

Browse files
Editor: Update docblocks for wp_get_global_stylesheet and WP_Theme_JSON::get_stylesheet.
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. git-svn-id: https://develop.svn.wordpress.org/trunk@59499 602fd350-edb4-49c9-b593-d223f7449a82
1 parent faff3a2 commit a1079b6

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

src/wp-includes/class-wp-theme-json.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1317,6 +1317,8 @@ public function get_settings() {
13171317
* - `variables`: only the CSS Custom Properties for presets & custom ones.
13181318
* - `styles`: only the styles section in theme.json.
13191319
* - `presets`: only the classes for the presets.
1320+
* - `base-layout-styles`: only the base layout styles.
1321+
* - `custom-css`: only the custom CSS.
13201322
* @param string[] $origins A list of origins to include. By default it includes VALID_ORIGINS.
13211323
* @param array $options {
13221324
* Optional. An array of options for now used for internal purposes only (may change without notice).

src/wp-includes/deprecated.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6316,7 +6316,7 @@ function wp_interactivity_process_directives_of_interactive_blocks( array $parse
63166316
* Gets the global styles custom CSS from theme.json.
63176317
*
63186318
* @since 6.2.0
6319-
* @deprecated 6.7.0 Use {@see 'wp_get_global_stylesheet'} instead.
6319+
* @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.
63206320
*
63216321
* @return string The global styles custom CSS.
63226322
*/

src/wp-includes/global-styles-and-settings.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ function wp_get_global_styles( $path = array(), $context = array() ) {
142142
* @since 6.6.0 Resolves relative paths in theme.json styles to theme absolute paths.
143143
*
144144
* @param array $types Optional. Types of styles to load.
145-
* It accepts as values 'variables', 'presets', 'styles', 'base-layout-styles'.
145+
* See {@see 'WP_Theme_JSON::get_stylesheet'} for all valid types.
146146
* If empty, it'll load the following:
147147
* - for themes without theme.json: 'variables', 'presets', 'base-layout-styles'.
148148
* - for themes with theme.json: 'variables', 'presets', 'styles'.

0 commit comments

Comments
 (0)