For clarity, initialize some arrays that previously were only assigned via short circuit in loops.
See #30799. Built from https://develop.svn.wordpress.org/trunk@30982 git-svn-id: http://core.svn.wordpress.org/trunk@30968 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -586,6 +586,8 @@ function image_get_intermediate_size($post_id, $size='thumbnail') {
|
||||
|
||||
// get the best one for a specified set of dimensions
|
||||
if ( is_array($size) && !empty($imagedata['sizes']) ) {
|
||||
$areas = array();
|
||||
|
||||
foreach ( $imagedata['sizes'] as $_size => $data ) {
|
||||
// already cropped to width or height; so use this size
|
||||
if ( ( $data['width'] == $size[0] && $data['height'] <= $size[1] ) || ( $data['height'] == $size[1] && $data['width'] <= $size[0] ) ) {
|
||||
|
||||
Reference in New Issue
Block a user