Make WordPress Core

Changeset 59499


Ignore:
Timestamp:
12/09/2024 02:53:35 AM (2 months ago)
Author:
isabel_brison
Message:

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.

Location:
trunk/src/wp-includes
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-theme-json.php

    r59474 r59499  
    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 {
  • trunk/src/wp-includes/deprecated.php

    r59455 r59499  
    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.
  • trunk/src/wp-includes/global-styles-and-settings.php

    r59256 r59499  
    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'.
Note: See TracChangeset for help on using the changeset viewer.