wp/wp-includes/functions.wp-styles.php
changeset 19 3d72ae0968f4
parent 16 a86126ab1dd4
child 21 48c4eec2b7e6
equal deleted inserted replaced
18:be944660c56a 19:3d72ae0968f4
   215 }
   215 }
   216 
   216 
   217 /**
   217 /**
   218  * Add metadata to a CSS stylesheet.
   218  * Add metadata to a CSS stylesheet.
   219  *
   219  *
   220  * Works only if the stylesheet has already been added.
   220  * Works only if the stylesheet has already been registered.
   221  *
   221  *
   222  * Possible values for $key and $value:
   222  * Possible values for $key and $value:
   223  * 'conditional' string      Comments for IE 6, lte IE 7 etc.
   223  * 'conditional' string      Comments for IE 6, lte IE 7 etc.
   224  * 'rtl'         bool|string To declare an RTL stylesheet.
   224  * 'rtl'         bool|string To declare an RTL stylesheet.
   225  * 'suffix'      string      Optional suffix, used in combination with RTL.
   225  * 'suffix'      string      Optional suffix, used in combination with RTL.
   226  * 'alt'         bool        For rel="alternate stylesheet".
   226  * 'alt'         bool        For rel="alternate stylesheet".
   227  * 'title'       string      For preferred/alternate stylesheets.
   227  * 'title'       string      For preferred/alternate stylesheets.
       
   228  * 'path'        string      The absolute path to a stylesheet. Stylesheet will
       
   229  *                           load inline when 'path'' is set.
   228  *
   230  *
   229  * @see WP_Dependencies::add_data()
   231  * @see WP_Dependencies::add_data()
   230  *
   232  *
   231  * @since 3.6.0
   233  * @since 3.6.0
       
   234  * @since 5.8.0 Added 'path' as an official value for $key.
       
   235  *              See {@see wp_maybe_inline_styles()}.
   232  *
   236  *
   233  * @param string $handle Name of the stylesheet.
   237  * @param string $handle Name of the stylesheet.
   234  * @param string $key    Name of data point for which we're storing a value.
   238  * @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'.
   236  * @param mixed  $value  String containing the CSS data to be added.
   240  * @param mixed  $value  String containing the CSS data to be added.
   237  * @return bool True on success, false on failure.
   241  * @return bool True on success, false on failure.
   238  */
   242  */
   239 function wp_style_add_data( $handle, $key, $value ) {
   243 function wp_style_add_data( $handle, $key, $value ) {
   240 	return wp_styles()->add_data( $handle, $key, $value );
   244 	return wp_styles()->add_data( $handle, $key, $value );