[wp-trac] [WordPress Trac] #44427: Introduce lazy-loading API for media and other elements

WordPress Trac noreply at wordpress.org
Fri Dec 6 15:49:00 UTC 2019


#44427: Introduce lazy-loading API for media and other elements
--------------------------------------+--------------------------
 Reporter:  mor10                     |       Owner:  flixos90
     Type:  feature request           |      Status:  assigned
 Priority:  normal                    |   Milestone:  5.4
Component:  Media                     |     Version:
 Severity:  normal                    |  Resolution:
 Keywords:  has-patch has-unit-tests  |     Focuses:  performance
--------------------------------------+--------------------------

Comment (by spacedmonkey):

 @flixos90 The reason for the change so that everything uses filters, as it
 not only does it make the code much cleaner, but it also gives developers
 much more control to unhook this behavior. Yes there was
 `wp_lazy_load_content_media` filter, but this had no context to it. What
 if you wanted to unhook it from one place but not another. There is also
 more context to the `wp_lazy_load_content_media` as this now passes the
 `$content` as a param. Something that was not possible in @flixos90 's
 patch.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/44427#comment:58>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list