wp_style_add_data
函数
wp_style_add_data ( $handle, $key, $value )
- 参数
-
-
(string)
$handle
Name of the stylesheet.- Required: 是
-
(string)
$key
Name of data point for which we’re storing a value. Accepts ‘conditional’, ‘rtl’ and ‘suffix’, ‘alt’, ‘title’ and ‘path’.- Required: 是
-
(mixed)
$value
String containing the CSS data to be added.- Required: 是
-
(string)
- 返回值
-
- (bool) True on success, false on failure.
- 相关
-
- WP_Dependencies::add_data()
- 定义位置
-
-
wp-includes/functions.wp-styles.php
, line 243
-
wp-includes/functions.wp-styles.php
- 引入
- 3.6.0
- 弃用
- –
Add metadata to a CSS stylesheet.
Works only if the stylesheet has already been registered.
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.
‘path’ string The absolute path to a stylesheet. Stylesheet will
load inline when ‘path” is set.
function wp_style_add_data( $handle, $key, $value ) { return wp_styles()->add_data( $handle, $key, $value ); }
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。