Changeset 56693 for trunk/src/wp-includes/media.php
- Timestamp:
- 09/26/2023 12:11:06 AM (19 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/media.php
r56690 r56693 5650 5650 5651 5651 /* 5652 * Skip programmatically created images within post contentas they need to be handled together with the other5653 * images within the post content .5652 * Skip programmatically created images within content blobs as they need to be handled together with the other 5653 * images within the post content or widget content. 5654 5654 * Without this clause, they would already be considered within their own context which skews the image count and 5655 5655 * can result in the first post content image being lazy-loaded or an image further down the page being marked as a 5656 5656 * high priority. 5657 5657 */ 5658 // TODO: Handle shortcode images together with the content (see https://core.trac.wordpress.org/ticket/58853). 5659 if ( 'the_content' !== $context && 'do_shortcode' !== $context && doing_filter( 'the_content' ) ) { 5658 if ( 5659 'the_content' !== $context && doing_filter( 'the_content' ) || 5660 'widget_text_content' !== $context && doing_filter( 'widget_text_content' ) || 5661 'widget_block_content' !== $context && doing_filter( 'widget_block_content' ) 5662 ) { 5660 5663 /** This filter is documented in wp-includes/media.php */ 5661 5664 return apply_filters( 'wp_get_loading_optimization_attributes', $loading_attrs, $tag_name, $attr, $context ); 5665 5662 5666 } 5663 5667
Note: See TracChangeset
for help on using the changeset viewer.