[wp-trac] [WordPress Trac] #22587: Cast image sizes to array before looping

WordPress Trac noreply at wordpress.org
Tue Nov 27 05:11:01 UTC 2012


#22587: Cast image sizes to array before looping
------------------------------+------------------------------
 Reporter:  griffinjt         |       Owner:
     Type:  defect (bug)      |      Status:  new
 Priority:  normal            |   Milestone:  Awaiting Review
Component:  Warnings/Notices  |     Version:  3.3
 Severity:  normal            |  Resolution:
 Keywords:  has-patch         |
------------------------------+------------------------------

Comment (by griffinjt):

 Replying to [comment:13 SergeyBiryukov]:
 > [attachment:22587.2.diff] fixes that.

 Related to your patch: I believe this is more of a UX type of thing, but
 how should we handle outputting the HTML if no image sizes are present? It
 seems to me like the best course of action would be the simply hide the
 size label and field altogether. In that case, we could have the function
 either return false or an array, and then use a simple if check on the
 function before storing the data in the `$form_field` array key. Thoughts?

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/22587#comment:14>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list