Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #18947, comment 19


Ignore:
Timestamp:
07/10/2014 09:17:14 AM (11 years ago)
Author:
F J Kaiser
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #18947, comment 19

    initial v1  
    22> As shown in 18947_5_2.patch, `get_image_sizes_data()` won't return anything for custom image sizes, since that data isn't in the database and the global that stores that data isn't in the `foreach` loop, though the global is getting called from `get_intermediate_image_sizes()` anyway.
    33
    4 That's the point. Why would we try to return something that isn't there. And the default assumption has to be the most minimal setup. As soon as this is taken into account and not failing, we can build upon it.
     4That's the point. Why would we try to return something that isn't there. And the default assumption has to be the most minimal setup. As soon as this is taken into account (it already is) and not failing, we can build upon it.
    55
    66> If you do something like the following, you can get single image size data without calling the global, as long as it's a standard size.
     
    2323> It also avoids calling `get_intermediate_image_sizes()`. That function is a nightmare of a name considering it gets **all** image sizes, but says it only gets intermediate.
    2424
    25 The {{{get_image_sizes_data()}}} ({{{18947_5_2.patch}}}) patch removes that necessity be wrapping it up. I want to stay back from introducing doubled functionality just to remove a function name. You would have to move {{{get_intermediate_image_sizes()}}} to {{{deprecated.php}}} (and inform users to use the new function) just for the sake of renaming it.
     25The {{{get_image_sizes_data()}}} ({{{18947_5_2.patch}}}) patch removes that necessity by wrapping it up. I want to stay back from introducing doubled functionality just to remove a function name. You would have to move {{{get_intermediate_image_sizes()}}} to {{{deprecated.php}}} (and inform users to use the new function) just for the sake of renaming it.