[wp-trac] [WordPress Trac] #36982: Add image attributes and additional context to the wp_calculate_image_srcset and wp_calculate_image_sizes filters
WordPress Trac
noreply at wordpress.org
Fri Apr 7 19:27:57 UTC 2017
#36982: Add image attributes and additional context to the
wp_calculate_image_srcset and wp_calculate_image_sizes filters
-------------------------------------------------+-------------------------
Reporter: kylereicks | Owner:
Type: enhancement | adamsilverstein
Priority: normal | Status: assigned
Component: Media | Milestone: Awaiting
Severity: normal | Review
Keywords: has-patch needs-unit-tests 2nd- | Version: 4.6
opinion | Resolution:
| Focuses: template
-------------------------------------------------+-------------------------
Changes (by adamsilverstein):
* keywords: dev-feedback => has-patch needs-unit-tests 2nd-opinion
* owner: => adamsilverstein
* status: new => assigned
Comment:
@kylereicks Thanks for your ticket and patch and welcome to trac!
Overall the patch looks good and the use case makes sense... this seems
like a valuable addition to the filter. Can you give an example of how you
would use the context variable, or why you added that?
It would be good to add some unit tests that demonstrate how filter change
is used: how the patch enables altering the sizes based on both attr
values and context.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/36982#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list