[wp-trac] [WordPress Trac] #23401: Pass $metadata to intermediate_image_sizes_advanced filter
WordPress Trac
noreply at wordpress.org
Wed Feb 6 00:16:17 UTC 2013
#23401: Pass $metadata to intermediate_image_sizes_advanced filter
-----------------------------+-----------------------------
Reporter: amereservant | Type: enhancement
Status: new | Priority: normal
Milestone: Awaiting Review | Component: Post Thumbnails
Version: trunk | Severity: normal
Keywords: has-patch |
-----------------------------+-----------------------------
I'm requesting that the following patch be added, which simply passes the
$metadata for the image to be used for the new post thumbnail sizes to any
filters hooking the '''intermediate_image_sizes_advanced''' filter in the
''wp_generate_attachment_metadata'' function.
The purpose of this is for altering the size of a custom thumbnail size
based on the given image's dimensions. For example, I have a need for an
post image size that's a '''minimum''' dimension size of 200px. The
default behavior will allow me to specify a '''maximum''' dimension size,
but not a minimum.
So by hooking this filter, I can alter the '''$sizes''' array and correct
the size of my custom post thumbnail size based on the current image's
dimensions.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/23401>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list