wp_style_add_data ( $handle, $key, $value )

  • (string) handle Name of the stylesheet.
  • (string) key Name of data point for which we're storing a value. Accepts 'conditional', 'rtl' and 'suffix', 'alt', 'title' and 'path'.
  • (mixed) value String containing the CSS data to be added.
  • WP_Dependencies::add_data()
  • (bool) True on success, false on failure.
Defined at:
Change Log:
  • 5: .


Adds 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.

Related Functions

wp_script_add_data, wp_kses_data, wp_style_loader_src, wp_style_is, wp_get_update_data

Top Google Results

User discussions

wpseek mobile