WP HOOKS
filtrod 6.4.0

pre_wp_get_loading_optimization_attributes

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

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

ParametrTypOpis
$loading_attrsarray | falseFalse by default, or array of loading optimization attributes to short-circuit.
$tag_namestringThe tag name.
$attrarrayArray of the attributes for the tag.
$contextstringContext 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
}

Popularne w tej kategorii