After [45538]: fix a WPCS fix and make couple of var names consistent.
See #40439. Built from https://develop.svn.wordpress.org/trunk@45539 git-svn-id: http://core.svn.wordpress.org/trunk@45350 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -235,7 +235,11 @@ function image_downsize( $id, $size = 'medium' ) {
|
||||
} elseif ( $size === 'thumbnail' ) {
|
||||
// fall back to the old thumbnail
|
||||
$thumb_file = wp_get_attachment_thumb_file( $id );
|
||||
$info = getimagesize( $thumb_file );
|
||||
$info = null;
|
||||
|
||||
if ( $thumb_file ) {
|
||||
$info = getimagesize( $thumb_file );
|
||||
}
|
||||
|
||||
if ( $thumb_file && $info ) {
|
||||
$img_url = str_replace( $img_url_basename, wp_basename( $thumb_file ), $img_url );
|
||||
|
||||
Reference in New Issue
Block a user