filtrod 6.1.0
wp_img_tag_add_decoding_attr
Opis — z kodu źródłowego
Filters the `decoding` attribute value to add to an image. Default `async`.
Returning a falsey value will omit the attribute.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$value | string | false | null | The <code>decoding</code> attribute value. Returning a falsey value will result in the attribute being omitted for the image. Otherwise, it may be: 'async', 'sync', or 'auto'. Defaults to false. |
$image | string | The HTML <code>img</code> tag to be filtered. |
$context | string | Additional context about how the function was called or where the img tag is. |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'wp_img_tag_add_decoding_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_img_tag_add_decoding_attr', 'twoja_funkcja', 10, 3 );
function twoja_funkcja($param_1, $param_2, $param_3) {
// Twój kod
}Popularne w tej kategorii