On this page
apply_filters( 'wp_omit_loading_attr_threshold', int $omit_threshold )
Filters the threshold for how many of the first content media elements to not lazy-load.
Description
For these first content media elements, the loading attribute will be omitted. By default, this is the case for only the very first content media element.
Parameters
$omit_thresholdint-
The number of media elements where the
loadingattribute will not be added. Default 1.
Source
File: wp-includes/media.php. View all references
$omit_threshold = apply_filters( 'wp_omit_loading_attr_threshold', 1 );
Related
Used By
| Used By | Description |
|---|---|
| wp_omit_loading_attr_threshold() wp-includes/media.php | Gets the threshold for how many of the first content media elements to not lazy-load. |
Changelog
| Version | Description |
|---|---|
| 5.9.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/wp_omit_loading_attr_threshold