wpseek.com
Bazujące na WordPress narzędzie wyszukiwania dla deweloperów i twórców motywów.



wp_script_add_data › WordPress Function

Od4.2.0
Przestarzałyn/a
wp_script_add_data ( $handle, $key, $value )
Parametry: (3)
  • (string) $handle Name of the script.
    Wymagane: Tak
  • (string) $key Name of data point for which we're storing a value.
    Wymagane: Tak
  • (mixed) $value String containing the data to be added.
    Wymagane: Tak
Zobacz:
  • WP_Dependencies::add_data()
Powrót:
  • (bool) True on success, false on failure.
Zdefiniowane na:
Codex:

Adds metadata to a script.

Works only if the script has already been registered. Possible values for $key and $value: 'conditional' string Comments for IE 6, lte IE 7, etc.


Źródło

function wp_script_add_data( $handle, $key, $value ) {
	return wp_scripts()->add_data( $handle, $key, $value );
}