apply_filters( ‘pre_wp_get_loading_optimization_attributes’, array|false $loading_attrs, string $tag_name, array $attr, string $context )

Filters whether to short-circuit loading optimization attributes.

Description

Returning an array from the filter will effectively short-circuit the loading of optimization attributes, returning that value instead.

Parameters

$loading_attrsarray|false
False by default, or array of loading optimization attributes to short-circuit.
$tag_namestring
The tag name.
$attrarray
Array of the attributes for the tag.
$contextstring
Context for the element for which the loading optimization attribute is requested.

Source

$loading_attrs = apply_filters( 'pre_wp_get_loading_optimization_attributes', false, $tag_name, $attr, $context );

Changelog

VersionDescription
6.4.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.