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:

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 1. The filter is only run once per page load, unless the `$force` parameter is used.

Related Functions

wp_get_loading_attr_default, wp_img_tag_add_loading_attr, wp_iframe_tag_add_loading_attr, wp_lazy_loading_enabled, wp_admin_bar_header

Top Google Results

User discussions

wpseek mobile