Ticket #20534: 20534.4.diff
File 20534.4.diff, 1006 bytes (added by , 12 years ago) |
---|
-
wp-includes/media.php
508 508 function wp_get_attachment_image_src($attachment_id, $size='thumbnail', $icon = false) { 509 509 510 510 // get a thumbnail or intermediate image if there is one 511 if ( $image = image_downsize($attachment_id, $size) ) 511 if ( $image = image_downsize( $attachment_id , $size ) ) { 512 if( is_admin() ) 513 $image = set_url_scheme( $image , 'admin' ); 514 else 515 $image = set_url_scheme( $image ); 512 516 return $image; 517 } 513 518 514 519 $src = false; 515 520 … … 518 523 $src_file = $icon_dir . '/' . wp_basename($src); 519 524 @list($width, $height) = getimagesize($src_file); 520 525 } 521 if ( $src && $width && $height ) 526 if ( $src && $width && $height ) { 527 if( is_admin() ) 528 $src = set_url_scheme( $src , 'admin' ); 529 else 530 $src = set_url_scheme( $src ); 522 531 return array( $src, $width, $height ); 532 } 523 533 return false; 524 534 } 525 535