filtrod 5.7.0
wp_script_attributes
Opis — z kodu źródłowego
Filters attributes to be added to a script tag.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$attributes | array | Key-value pairs representing <code><script></code> tag attributes. Only the attribute name is added to the <code><script></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
}
// rejestracja funkcji zwrotnej
add_filter( 'wp_script_attributes', 'twoja_funkcja' );
function twoja_funkcja($param_1) {
// Twój kod
}Popularne w tej kategorii