[wp-trac] [WordPress Trac] #61436: 'src' not in $attr for wp_get_loading_optimization_attributes
WordPress Trac
noreply at wordpress.org
Tue Sep 3 17:05:48 UTC 2024
#61436: 'src' not in $attr for wp_get_loading_optimization_attributes
--------------------------------------+--------------------------
Reporter: prestonwordsworth | Owner: flixos90
Type: defect (bug) | Status: closed
Priority: normal | Milestone: 6.7
Component: Media | Version: 6.4
Severity: normal | Resolution: fixed
Keywords: has-patch has-unit-tests | Focuses: performance
--------------------------------------+--------------------------
Changes (by flixos90):
* status: reviewing => closed
* resolution: => fixed
Comment:
In [changeset:"58974" 58974]:
{{{
#!CommitTicketReference repository="" revision="58974"
Media: Consistently pass 'src' attribute to
`wp_get_loading_optimization_attributes()`.
A common use-case for the 'wp_get_loading_optimization_attributes' filter
is to modify attributes based on the 'src' attribute. However, the
`wp_img_tag_add_loading_optimization_attrs()` was not passing that
attribute to the function as expected, which would make such usage of the
filter unreliable. This changeset ensures the 'src' attribute is also
passed in this scenario. All other calls to
`wp_get_loading_optimization_attributes()` already included the attribute.
Props deepakrohilla, prestonwordsworth, mukesh27, adamsilverstein,
joemcgill, flixos90.
Fixes #61436.
See #58893.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/61436#comment:14>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list