Changeset 53685 for trunk/src/wp-includes/media.php
- Timestamp:
- 07/07/2022 11:30:21 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/media.php
r53481 r53685 239 239 $height = $intermediate['height']; 240 240 $is_intermediate = true; 241 } elseif ( 'thumbnail' === $size ) {241 } elseif ( 'thumbnail' === $size && ! empty( $meta['thumb'] ) && is_string( $meta['thumb'] ) ) { 242 242 // Fall back to the old thumbnail. 243 $ thumb_file = wp_get_attachment_thumb_file( $id );244 $ info = null;245 246 if ( $thumb_file) {247 $info = wp_getimagesize( $thumb _file );248 } 249 250 if ( $thumb_file && $info ) {251 $img_url = str_replace( $img_url_basename, wp_basename( $thumb_file ), $img_url );252 $width = $info[0];253 $height = $info[1];254 $is_intermediate = true;243 $imagefile = get_attached_file( $id ); 244 $thumbfile = str_replace( wp_basename( $imagefile ), wp_basename( $meta['thumb'] ), $imagefile ); 245 246 if ( file_exists( $thumbfile ) ) { 247 $info = wp_getimagesize( $thumbfile ); 248 249 if ( $info ) { 250 $img_url = str_replace( $img_url_basename, wp_basename( $thumbfile ), $img_url ); 251 $width = $info[0]; 252 $height = $info[1]; 253 $is_intermediate = true; 254 } 255 255 } 256 256 }
Note: See TracChangeset
for help on using the changeset viewer.