[wp-trac] [WordPress Trac] #56588: WordPress puts "loading=lazy" on first image on archive page - wp_get_loading_attr_default bug
WordPress Trac
noreply at wordpress.org
Fri Apr 28 05:28:08 UTC 2023
#56588: WordPress puts "loading=lazy" on first image on archive page -
wp_get_loading_attr_default bug
-------------------------------+--------------------------
Reporter: salvoaranzulla | Owner: flixos90
Type: defect (bug) | Status: assigned
Priority: high | Milestone: 6.3
Component: Media | Version: 5.9
Severity: normal | Resolution:
Keywords: reporter-feedback | Focuses: performance
-------------------------------+--------------------------
Comment (by salvoaranzulla):
Hi,
I confirm that your code in functions.php has solved the problem:
{{{#!php
<?php
add_filter(
'get_the_excerpt',
function( $excerpt ) {
remove_filter( 'the_content', 'wp_filter_content_tags' );
return $excerpt;
},
9
);
add_filter(
'get_the_excerpt',
function( $excerpt ) {
add_filter( 'the_content', 'wp_filter_content_tags' );
return $excerpt;
},
11
);
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/56588#comment:13>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list