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.
Description
Returning false or an empty string will not add the attribute. Returning true will add the default value.
Parameters
- $value
-
(string|bool) The
loadingattribute value. Returning a falsey value will result in the attribute being omitted for the iframe. Default 'lazy'. - $iframe
-
(string) The HTML
iframetag to be filtered. - $context
-
(string) Additional context about how the function was called or where the iframe tag is.
Source
File: wp-includes/media.php
Changelog
| Version | Description |
|---|---|
| 5.7.0 | Introduced. |
© 2003–2021 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/wp_iframe_tag_add_loading_attr