wpseek.com
Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren



wp_style_add_data › WordPress Function

Seit3.6.0
Veraltetn/v
wp_style_add_data ( $handle, $key, $value )
Parameter: (3)
  • (string) $handle Name of the stylesheet.
    Erforderlich: Ja
  • (string) $key Name of data point for which we're storing a value. Accepts 'conditional', 'rtl' and 'suffix', 'alt', 'title' and 'path'.
    Erforderlich: Ja
  • (mixed) $value String containing the CSS data to be added.
    Erforderlich: Ja
Siehe:
  • WP_Dependencies::add_data()
Gibt zurück:
  • (bool) True on success, false on failure.
Definiert in:
Codex:
Changelog:
  • 5.8.0

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.


Quellcode

function wp_style_add_data( $handle, $key, $value ) {
	return wp_styles()->add_data( $handle, $key, $value );
}