wp_omit_loading_attr_threshold
wp_omit_loading_attr_threshold ( $force = false )
Parameters:- (bool) force Optional. If set to true, the filter will be (re-)applied even if it already has been before. Default false.
Returns:- (int) The number of content media elements to not lazy-load.
Defined at: - Introduced in WordPress: 5.9.0
- Deprecated in WordPress: —
Description
Gets the threshold for how many of the first content media elements to not lazy-load.This function runs the {@see 'wp_omit_loading_attr_threshold'} filter, which uses a default threshold value of 3.
The filter is only run once per page load, unless the `$force` parameter is used.