Uses
Uses | Description |
---|---|
wp-includes/functions.wp-styles.php: wp_styles() | Initialize $wp_styles if it has not been set. |
Add metadata to a CSS stylesheet.
Works only if the stylesheet has already been added.
Possible values for $key and $value: ‘conditional’ string Comments for IE 6, lte IE 7 etc. ‘rtl’ bool|string To declare an RTL stylesheet. ‘suffix’ string Optional suffix, used in combination with RTL. ‘alt’ bool For rel="alternate stylesheet". ‘title’ string For preferred/alternate stylesheets.
(string) (Required) Name of the stylesheet.
(string) (Required) Name of data point for which we're storing a value. Accepts 'conditional', 'rtl' and 'suffix', 'alt' and 'title'.
(mixed) (Required) String containing the CSS data to be added.
(bool) True on success, false on failure.
File: wp-includes/functions.wp-styles.php
function wp_style_add_data( $handle, $key, $value ) { return wp_styles()->add_data( $handle, $key, $value ); }
Version | Description |
---|---|
3.6.0 | Introduced. |
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/wp_style_add_data