WP HOOKS
filtrod 5.9.0

wp_omit_loading_attr_threshold

Args 1Plik wp-includes/media.phpDokumentacja WP ↗

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

ParametrTypOpis
$omit_thresholdintThe 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
}

Popularne w tej kategorii