WordPress at Your Fingertips
filter is not described

wp_iframe_tag_add_loading_attr filter-hook . WP 5.7.0

Filters the loading attribute value to add to an iframe. Default lazy.

Returning false or an empty string will not add the attribute. Returning true will add the default value.

Usage

add_filter( 'wp_iframe_tag_add_loading_attr', 'filter_function_name_1351', 10, 3 );
function filter_function_name_1351( $value, $iframe, $context ){
	// filter...

	return $value;
}
$value(string|true|false)
The loading attribute value. Returning a falsey value will result in the attribute being omitted for the iframe.
Default: 'lazy'
$iframe(string)
The HTML iframe tag to be filtered.
$context(string)
Additional context about how the function was called or where the iframe tag is.

Changelog

Since 5.7.0 Introduced.

Where the hook is called

wp_iframe_tag_add_loading_attr()
wp_iframe_tag_add_loading_attr
wp-includes/media.php 2016
$value = apply_filters( 'wp_iframe_tag_add_loading_attr', 'lazy', $iframe, $context );

Where in WP core the hook is used WordPress

Usage not found.