[wp-meta] [Making WordPress.org] #825: Wrong info for add_image_size() in the Reference

Making WordPress.org noreply at wordpress.org
Wed Jan 21 09:42:39 UTC 2015


#825: Wrong info for add_image_size() in the Reference
----------------------+-------------------------------------
  Reporter:  vloo     |      Owner:
      Type:  defect   |     Status:  closed
  Priority:  normal   |  Component:  developer.wordpress.org
Resolution:  invalid  |   Keywords:
----------------------+-------------------------------------
Changes (by Otto42):

 * status:  new => closed
 * resolution:   => invalid


Comment:

 The default values are zero, and a width and height of zero makes no sense
 here. The resulting image will have no dimensions and will ultimately get
 ignored.

 Either the width or the height is indeed required to be non-zero, so that
 the resulting image will have dimensions after scaling. A zero in one
 dimension will be ignored by the resizing code, but in both dimensions it
 will have no reference value to scale to.

 Therefore, the explanation as given is correct, albeit incomplete.

 Regardless of the technicalities of the actual PHP function call, for the
 function call to be useful or meaningful, one of those two parameters *is*
 required. The function cannot be called without them, or it will simply do
 nothing when it comes time to resize the images.

--
Ticket URL: <https://meta.trac.wordpress.org/ticket/825#comment:1>
Making WordPress.org <https://meta.trac.wordpress.org/>
Making WordPress.org


More information about the wp-meta mailing list