filtrod 6.4.0
pre_wp_get_loading_optimization_attributes
Opis — z kodu źródłowego
Filters whether to short-circuit loading optimization attributes.
Returning an array from the filter will effectively short-circuit the loading of optimization attributes, returning that value instead.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$loading_attrs | array | false | False by default, or array of loading optimization attributes to short-circuit. |
$tag_name | string | The tag name. |
$attr | array | Array of the attributes for the tag. |
$context | string | Context for the element for which the loading optimization attribute is requested. |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'pre_wp_get_loading_optimization_attributes', 'twoja_funkcja', 10, 4 );
function twoja_funkcja($param_1, $param_2, $param_3, $param_4) {
// Twój kod
}
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'pre_wp_get_loading_optimization_attributes', 'twoja_funkcja', 10, 4 );
function twoja_funkcja($param_1, $param_2, $param_3, $param_4) {
// Twój kod
}Popularne w tej kategorii