apply_filters( 'wp_iframe_tag_add_loading_attr', string|bool $value, string $iframe, string $context )

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.

Top ↑



(string|bool) The loading attribute value. Returning a falsey value will result in the attribute being omitted for the iframe.


(string) The HTML iframe tag to be filtered.


(string) Additional context about how the function was called or where the iframe tag is.

Top ↑


File: wp-includes/media.php

View on Trac

Top ↑


Version Description
5.7.0 Introduced.

Top ↑

User Contributed Notes

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