[wp-trac] [WordPress Trac] #58893: Introduce filter to modify/override attributes returned by `wp_get_loading_optimization_attributes()`

WordPress Trac noreply at wordpress.org
Mon Aug 28 14:30:50 UTC 2023


#58893: Introduce filter to modify/override attributes returned by
`wp_get_loading_optimization_attributes()`
-------------------------+--------------------------
 Reporter:  flixos90     |       Owner:  pereirinha
     Type:  enhancement  |      Status:  assigned
 Priority:  normal       |   Milestone:  6.4
Component:  Media        |     Version:
 Severity:  normal       |  Resolution:
 Keywords:  2nd-opinion  |     Focuses:  performance
-------------------------+--------------------------

Comment (by pereirinha):

 @flixos90

 I think both filters make sense, as there are valid use cases for both.

 Someone might want to implement its custom logic for the optimization
 attributes — a short circuit early access is ideal as it prevents running
 lots of code that won't be needed — others just tweak one of the values —
 so the later, the better.

 If we agree, I'll proceed with the 2 filters.

 Perhaps a `wp_pre_get_loading_optimization_attributes` and a
 `wp_get_loading_optimization_attributes` filter.

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


More information about the wp-trac mailing list