wp_style_add_data

Advertisement

Summery Summery

Add metadata to a CSS stylesheet.

Syntax Syntax

wp_style_add_data( string $handle, string $key, mixed $value )

Description Description

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.

Parameters Parameters

$handle

(Required) Name of the stylesheet.

$key

(Required) Name of data point for which we're storing a value. Accepts 'conditional', 'rtl' and 'suffix', 'alt' and 'title'.

$value

(Required) String containing the CSS data to be added.

Return Return

(bool) True on success, false on failure.

Source Source

File: wp-includes/functions.wp-styles.php

 *                       Accepts 'conditional', 'rtl' and 'suffix', 'alt' and 'title'.
 * @param mixed  $value  String containing the CSS data to be added.
 * @return bool True on success, false on failure.

Advertisement

Changelog Changelog

Changelog
Version Description
3.6.0 Introduced.

See also See also

Advertisement

Leave a Reply