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

WordPress Trac noreply at wordpress.org
Thu Sep 21 16:35:48 UTC 2023


#58893: Introduce filter to modify/override attributes returned by
`wp_get_loading_optimization_attributes()`
-----------------------------------------+--------------------------
 Reporter:  flixos90                     |       Owner:  pereirinha
     Type:  enhancement                  |      Status:  closed
 Priority:  normal                       |   Milestone:  6.4
Component:  Media                        |     Version:  6.3
 Severity:  normal                       |  Resolution:  fixed
 Keywords:  has-patch changes-requested  |     Focuses:  performance
-----------------------------------------+--------------------------
Changes (by flixos90):

 * status:  assigned => closed
 * resolution:   => fixed


Comment:

 In [changeset:"56651" 56651]:
 {{{
 #!CommitTicketReference repository="" revision="56651"
 Media: Introduce filters to customize the results from
 `wp_get_loading_optimization_attributes()`.

 This changeset introduces two filters that allow customizing the loading
 optimization attributes array returned from
 `wp_get_loading_optimization_attributes()` for individual HTML tags:
 * The `wp_get_loading_optimization_attributes` filter can be used to
 modify the results from the WordPress core logic.
 * The `pre_wp_get_loading_optimization_attributes` filter can be used to
 use entirely custom logic and effectively short-circuit the core function.

 Props pereirinha, mukesh27, spacedmonkey, joemcgill.
 Fixes #58893.
 }}}

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


More information about the wp-trac mailing list