WP HOOKS
filtrod 5.7.0

wp_inline_script_attributes

Args 2Plik wp-includes/script-loader.phpDokumentacja WP ↗

Opis — z kodu źródłowego

Filters attributes to be added to a script tag.

Parametry

ParametrTypOpis
$attributesarrayKey-value pairs representing <code>&lt;script&gt;</code> tag attributes. Only the attribute name is added to the <code>&lt;script&gt;</code> tag for entries with a boolean value, and that are true.
$datastringInline data.

Wywołanie

Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'wp_inline_script_attributes', 'twoja_funkcja', 10, 2 );

function twoja_funkcja($param_1, $param_2) {
	// Twój kod
}

Popularne w tej kategorii