filtrod 5.7.0
wp_iframe_tag_add_loading_attr
Opis — z kodu źródłowego
Filters the `loading` attribute value to add to an iframe. Default `lazy`.
Returning false or an empty string will not add the attribute. Returning true will add the default value.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$value | string | bool | The <code>loading</code> attribute value. Returning a falsey value will result in the attribute being omitted for the iframe. |
$iframe | string | The HTML <code>iframe</code> tag to be filtered. |
$context | string | Additional context about how the function was called or where the iframe tag is. |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'wp_iframe_tag_add_loading_attr', 'twoja_funkcja', 10, 3 );
function twoja_funkcja($param_1, $param_2, $param_3) {
// Twój kod
}
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'wp_iframe_tag_add_loading_attr', 'twoja_funkcja', 10, 3 );
function twoja_funkcja($param_1, $param_2, $param_3) {
// Twój kod
}Popularne w tej kategorii