[wp-trac] [WordPress Trac] #18947: get_intermediate_image_sizes() should also contain width/height/crop values as sub array

WordPress Trac noreply at wordpress.org
Sun May 25 12:42:15 UTC 2014


#18947: get_intermediate_image_sizes() should also contain width/height/crop values
as sub array
-----------------------------------+------------------------------
 Reporter:  F J Kaiser             |       Owner:
     Type:  enhancement            |      Status:  assigned
 Priority:  normal                 |   Milestone:  Awaiting Review
Component:  Media                  |     Version:  3.2.1
 Severity:  normal                 |  Resolution:
 Keywords:  has-patch 2nd-opinion  |     Focuses:
-----------------------------------+------------------------------
Changes (by F J Kaiser):

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


Comment:

 Replying to [comment:9 kitchin]:
 > Patch.5 has a problem: `$keys_only` is undefined because it's missing
 from the function arguments.

 Fixed.

 Replying to [comment:10 ericlewis]:
 > If we were going ahead with this, I would suggest creating a new top-
 level function, something like `get_image_sizes()` so we're not tacking on
 unintuitive parameters to existing functions, and parity with
 `add_image_size()`. Would someone like to put a patch together?

 It's an *optional* argument to keep it backwards compatible. Not adding
 yet another function to the 2.5k+ public function imo is a benefit (for
 the global namespace). If anyone got a strong opinion on if this should be
 a new function or not: There are two patches attached, satisfying both
 ideas. Whatever argument "wins", we are prepared. The only +1 argument I
 can possibly find is IDE autocompletion. So if I would search for "image"
 functions and scan through the list (and in case the name is good enough)
 then I'd maybe quickly find that function instead of writing my own
 procedure.

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


More information about the wp-trac mailing list