WP HOOKS
filtrod 5.7.0

wp_script_attributes

Args 1Plik 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.

Wywołanie

Rejestracja callbackaphp
// rejestracja funkcji zwrotnej
add_filter( 'wp_script_attributes', 'twoja_funkcja' );

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

Popularne w tej kategorii