[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
Sat Aug 19 19:30:01 UTC 2017


#36982: Add image attributes and additional context to the
wp_calculate_image_srcset and wp_calculate_image_sizes filters
-----------------------------------+------------------------------
 Reporter:  kylereicks             |       Owner:  adamsilverstein
     Type:  enhancement            |      Status:  assigned
 Priority:  normal                 |   Milestone:  Awaiting Review
Component:  Media                  |     Version:  4.6
 Severity:  normal                 |  Resolution:
 Keywords:  has-patch 2nd-opinion  |     Focuses:  template
-----------------------------------+------------------------------
Changes (by kylereicks):

 * keywords:  has-patch needs-unit-tests 2nd-opinion => has-patch 2nd-
               opinion


Comment:

 I added a new patch to remove the "context" attribute. It may not end up
 being useful for most cases and is not a critical addition. The new patch
 also adds unit tests to confirm that the `wp_calculate_image_srcset` and
 `wp_calculate_image_sizes` filters can access an image's class attribute
 and update their values based on that attribute.

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


More information about the wp-trac mailing list