Changes between Initial Version and Version 1 of Ticket #20205, comment 35
- Timestamp:
- 05/24/2014 01:52:46 PM (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #20205, comment 35
initial v1 1 1 attachment:20205.diff cleans up this function. Let's wrap the `image_downsize()` call in a `wp_attachment_is_image()` check, this makes more logical sense, even if that check is already in that function. Don't short-circuit there, instead carry the returned value (similar to @jfarthing74's approach) through the function to be passed into the filter at the end of the function. 2 2 3 This also actually fixes a separate bug: you couldn't previously get the icon if the attachment is an image, it returned early with the `image_downsize()` call. 4 3 5 On a sidenote, it's convoluted that we offer an 'icon' parameter for this function. I would like to see this deprecated, and a separate function created, perhaps `wp_get_attachment_icon_src()`.