Make WordPress Core

Changeset 55144


Ignore:
Timestamp:
01/26/2023 05:21:41 PM (15 months ago)
Author:
hellofromTonya
Message:

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:

Follow-up to [54162], [52054].

Props oandregal, jorgefilipecosta , ntsekouras.
Fixes #57563.
See #56792.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/global-styles-and-settings.php

    r55138 r55144  
    7676 *
    7777 * @since 5.9.0
    78  *
    79  * @param array $types Types of styles to load. Optional.
    80  *                     It accepts 'variables', 'styles', 'presets' as values.
    81  *                     If empty, it'll load all for themes with theme.json support
    82  *                     and only [ 'variables', 'presets' ] for themes without theme.json support.
     78 * @since 6.1.0 Added 'base-layout-styles' support.
     79 *
     80 * @param array $types Optional. Types of styles to load.
     81 *                     It accepts as values 'variables', 'presets', 'styles', 'base-layout-styles'.
     82 *                     If empty, it'll load the following:
     83 *                     - for themes without theme.json: 'variables', 'presets', 'base-layout-styles'.
     84 *                     - for themes with theme.json: 'variables', 'presets', 'styles'.
    8385 * @return string Stylesheet.
    8486 */
Note: See TracChangeset for help on using the changeset viewer.