Changeset 48272 for trunk/src/wp-includes/media.php
- Timestamp:
- 07/02/2020 02:01:28 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/media.php
r48239 r48272 1049 1049 $attr = wp_parse_args( $attr, $default_attr ); 1050 1050 1051 // If `loading` attribute default of `lazy` is overridden for this 1052 // image to omit the attribute, ensure it is not included. 1053 if ( array_key_exists( 'loading', $attr ) && ! $attr['loading'] ) { 1054 unset( $attr['loading'] ); 1055 } 1056 1051 1057 // Generate 'srcset' and 'sizes' if not already present. 1052 1058 if ( empty( $attr['srcset'] ) ) { … … 1726 1732 * @since 5.5.0 1727 1733 * 1728 * @param string $value The `loading` attribute value, defaults to `lazy`. 1729 * @param string $image The HTML `img` tag to be filtered. 1730 * @param string $context Additional context about how the function was called or where the img tag is. 1734 * @param string|bool $value The `loading` attribute value. Returning a false-y value will result in the 1735 * attribute being omitted for the image. Default is `lazy`. 1736 * @param string $image The HTML `img` tag to be filtered. 1737 * @param string $context Additional context about how the function was called or where the img tag is. 1731 1738 */ 1732 1739 $value = apply_filters( 'wp_img_tag_add_loading_attr', 'lazy', $image, $context );
Note: See TracChangeset
for help on using the changeset viewer.