wp_script_add_data


wp_script_add_data ( $handle, $key, $value )

Parameters:
  • (string) $handle Name of the script.
  • (string) $key Name of data point for which we're storing a value.
  • (mixed) $value String containing the data to be added.
See:
  • WP_Dependency::add_data()
Returns:
  • (bool) True on success, false on failure.
Defined at:

Description

Add metadata to a script.

Works only if the script has already been added.

Possible values for $key and $value: 'conditional' string Comments for IE 6, lte IE 7, etc.

Related Functions

wp_style_add_data, wp_strip_all_tags, wp_script_is, wp_scripts, wp_get_update_data

Top Google Results

User discussions

wpseek mobile