filtrod 5.9.0
wp_omit_loading_attr_threshold
Opis — z kodu źródłowego
Filters the threshold for how many of the first content media elements to not lazy-load.
For these first content media elements, the loading attribute will be omitted. By default, this is the case for only the very first content media element.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$omit_threshold | int | The number of media elements where the <code>loading</code> attribute will not be added. Default 3. |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej
add_filter( 'wp_omit_loading_attr_threshold', 'twoja_funkcja' );
function twoja_funkcja($param_1) {
// Twój kod
}
// rejestracja funkcji zwrotnej
add_filter( 'wp_omit_loading_attr_threshold', 'twoja_funkcja' );
function twoja_funkcja($param_1) {
// Twój kod
}Popularne w tej kategorii