From 8ca206a849a673935f487442fec94e730920cfa4 Mon Sep 17 00:00:00 2001 From: Tonya Mork Date: Thu, 26 Jan 2023 17:21:41 +0000 Subject: [PATCH] Docs: Update $types param for wp_get_global_stylesheet(). In 6.1.0, the values the `$types` parameter accepts changed to include `'base-layout-styles'`. This commit updates the DocBlock to reflect this change and provide clear information of what the function will load if no types are passed to it. Reference: * https://github.com/WordPress/gutenberg/pull/46817 Follow-up to [54162], [52054]. Props oandregal, jorgefilipecosta , ntsekouras. Fixes #57563. See #56792. git-svn-id: https://develop.svn.wordpress.org/trunk@55144 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/global-styles-and-settings.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/wp-includes/global-styles-and-settings.php b/src/wp-includes/global-styles-and-settings.php index a0b91a4d21..ac73c889e5 100644 --- a/src/wp-includes/global-styles-and-settings.php +++ b/src/wp-includes/global-styles-and-settings.php @@ -75,11 +75,13 @@ function wp_get_global_styles( $path = array(), $context = array() ) { * Returns the stylesheet resulting of merging core, theme, and user data. * * @since 5.9.0 + * @since 6.1.0 Added 'base-layout-styles' support. * - * @param array $types Types of styles to load. Optional. - * It accepts 'variables', 'styles', 'presets' as values. - * If empty, it'll load all for themes with theme.json support - * and only [ 'variables', 'presets' ] for themes without theme.json support. + * @param array $types Optional. Types of styles to load. + * It accepts as values 'variables', 'presets', 'styles', 'base-layout-styles'. + * 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'. * @return string Stylesheet. */ function wp_get_global_stylesheet( $types = array() ) {