WordPress.org

Make WordPress Core

Changes between Version 2 and Version 3 of Ticket #34477, comment 3


Ignore:
Timestamp:
10/31/2015 06:09:52 AM (4 years ago)
Author:
azaozz
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #34477, comment 3

    v2 v3  
    55When this function is used in core we know the image width, but we wouldn't use it because a plugin eventually may need the named image size. However in some cases we won't know the image size name, and in some rare cases the width calculated from the name may be different than the actual image width, resulting in wrong `sizes` value.
    66
    7 Logically we should use the "proper" width that we have, and pass the named image size as an optional parameter. I know that brings the number of parameters on that function to 1 required and used, plus 3 optional and not used, but still thinking that's better.
     7Logically we should use the "proper" width that we have, and pass the named image size as an optional argument. I know that brings the number of parameters on that function to 1 required and used, plus 3 optional and not used, but still thinking that's better.