Changeset 55816 for trunk/src/wp-includes/media.php
- Timestamp:
- 05/16/2023 06:50:11 PM (19 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/media.php
r55764 r55816 5436 5436 * Under the hood, the function uses {@see wp_increase_content_media_count()} every time it is called for an element 5437 5437 * within the main content. If the element is the very first content element, the `loading` attribute will be omitted. 5438 * This default threshold of 1 content elementto omit the `loading` attribute for can be customized using the5438 * This default threshold of 3 content elements to omit the `loading` attribute for can be customized using the 5439 5439 * {@see 'wp_omit_loading_attr_threshold'} filter. 5440 5440 * … … 5486 5486 * Gets the threshold for how many of the first content media elements to not lazy-load. 5487 5487 * 5488 * This function runs the {@see 'wp_omit_loading_attr_threshold'} filter, which uses a default threshold value of 1.5488 * This function runs the {@see 'wp_omit_loading_attr_threshold'} filter, which uses a default threshold value of 3. 5489 5489 * The filter is only run once per page load, unless the `$force` parameter is used. 5490 5490 * … … 5507 5507 * 5508 5508 * @since 5.9.0 5509 * @since 6.3.0 The default threshold was changed from 1 to 3. 5509 5510 * 5510 * @param int $omit_threshold The number of media elements where the `loading` attribute will not be added. Default 1.5511 * @param int $omit_threshold The number of media elements where the `loading` attribute will not be added. Default 3. 5511 5512 */ 5512 $omit_threshold = apply_filters( 'wp_omit_loading_attr_threshold', 1);5513 $omit_threshold = apply_filters( 'wp_omit_loading_attr_threshold', 3 ); 5513 5514 } 5514 5515
Note: See TracChangeset
for help on using the changeset viewer.