[wp-trac] [WordPress Trac] #17475: Custom cropping in image-edit.php doesn't work with custom image sizes
WordPress Trac
wp-trac at lists.automattic.com
Tue May 17 16:52:22 UTC 2011
#17475: Custom cropping in image-edit.php doesn't work with custom image sizes
--------------------------+-----------------------------
Reporter: mau | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Media | Version: 3.2
Severity: minor | Keywords:
--------------------------+-----------------------------
Custom (manual) cropping in image-edit.php doesn't work with custom image
sizes (sizes added via add_image_size).
[http://core.trac.wordpress.org/browser/trunk/wp-admin/includes/image-
edit.php#L606 wp-admin/includes/image-edit.php#L606]
There's an 'intermediate_image_sizes' filter hook where default image
sizes are hard-coded in an array.
Sure you can add your own custom sizes to the array via this filter but it
seems to me that having to use the filter every time you use
add_image_size() doesn't feel right. Especially when the radio button
below says: "Apply changes to: All image sizes".
I believe it could be fine to replace the 'intermediate_image_sizes'
filter with call to [http://core.trac.wordpress.org/browser/trunk/wp-
includes/media.php#L575 get_intermediate_image_sizes()] function.
This would not break the filtering ability the hook provided as the same
hook is used in the mentioned function as well.
How do you feel about it?
This is the very first patch proposal in my life. Please be kind. I'm
sorry if I misunderstood something.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/17475>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list