[wp-trac] [WordPress Trac] #23019: Wrong type of image options

WordPress Trac noreply at wordpress.org
Thu Dec 20 13:38:52 UTC 2012


#23019: Wrong type of image options
-----------------------------+-------------------------
 Reporter:  anatolbroder     |       Type:  enhancement
   Status:  new              |   Priority:  normal
Milestone:  Awaiting Review  |  Component:  Media
  Version:                   |   Severity:  trivial
 Keywords:  has-patch        |
-----------------------------+-------------------------
 The size ''icon_h0096'' was added via ''add_image_size'' function. This is
 the array we pass to all image manipulation procedures.

 == Old ==

 {{{
 #!php
 array(4) {
 ["thumbnail"]=> array(3) { ["width"]=> string(3) "240" ["height"]=>
 string(3) "240" ["crop"]=> string(1) "1" }
 ["medium"]=> array(3) { ["width"]=> string(3) "720" ["height"]=> string(3)
 "240" ["crop"]=> bool(false) }
 ["large"]=> array(3) { ["width"]=> string(4) "2160" ["height"]=> string(3)
 "720" ["crop"]=> bool(false) }
 ["icon_h0096"]=> array(3) { ["width"]=> int(96) ["height"]=> int(96)
 ["crop"]=> int(1) }
 }
 }}}

 The type of all options is a showcase for the PHP flexibility. It works,
 but it’s a waste of resources.

 == Patched ==
 {{{
 #!php
 array(4) {
 ["thumbnail"]=> array(3) { ["width"]=> int(240) ["height"]=> int(240)
 ["crop"]=> bool(true) }
 ["medium"]=> array(3) { ["width"]=> int(720) ["height"]=> int(240)
 ["crop"]=> bool(false) }
 ["large"]=> array(3) { ["width"]=> int(2160) ["height"]=> int(720)
 ["crop"]=> bool(false) }
 ["icon_h0096"]=> array(3) { ["width"]=> int(96) ["height"]=> int(96)
 ["crop"]=> bool(true) }
 }
 }}}

 Every option has the appropriate type.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/23019>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list