Un motore di ricerca WordPress per sviluppatori e autori di temi



wp_script_add_data ›

Da4.2.0
Deprecaton/a
wp_script_add_data ( $handle, $key, $value )
Parametri: (3)
  • (string) $handle Name of the script.
    Richiesto:
  • (string) $key Name of data point for which we're storing a value.
    Richiesto:
  • (mixed) $value String containing the data to be added.
    Richiesto:
Vedi:
  • WP_Dependencies::add_data()
Ritorna:
  • (bool) True on success, false on failure.
Definito a:
Codex:

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.



Sorgenti

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