Make WordPress Core

Changeset 52216


Ignore:
Timestamp:
11/19/2021 03:12:25 PM (3 years ago)
Author:
desrosj
Message:

Script Loader: Document path as an accepted value for $key in wp_style_add_data().

Follow up to [50836].

Props tmatsuur.
Fixes #53792.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/functions.wp-styles.php

    r51726 r52216  
    226226 * 'alt'         bool        For rel="alternate stylesheet".
    227227 * 'title'       string      For preferred/alternate stylesheets.
     228 * 'path'        string      The absolute path to a stylesheet. Stylesheet will
     229 *                           load inline when 'path'' is set.
    228230 *
    229231 * @see WP_Dependencies::add_data()
    230232 *
    231233 * @since 3.6.0
     234 * @since 5.8.0 Added 'path' as an official value for $key.
     235 *              See {@see wp_maybe_inline_styles()}.
    232236 *
    233237 * @param string $handle Name of the stylesheet.
    234238 * @param string $key    Name of data point for which we're storing a value.
    235  *                       Accepts 'conditional', 'rtl' and 'suffix', 'alt' and 'title'.
     239 *                       Accepts 'conditional', 'rtl' and 'suffix', 'alt', 'title' and 'path'.
    236240 * @param mixed  $value  String containing the CSS data to be added.
    237241 * @return bool True on success, false on failure.
Note: See TracChangeset for help on using the changeset viewer.