Ticket #20534: 20534.3.diff
File 20534.3.diff, 913 bytes (added by , 13 years ago) |
---|
-
wp-includes/media.php
613 613 function wp_get_attachment_image_src($attachment_id, $size='thumbnail', $icon = false) { 614 614 615 615 // get a thumbnail or intermediate image if there is one 616 if ( $image = image_downsize($attachment_id, $size) ) 616 if ( $image = image_downsize( $attachment_id, $size ) ) { 617 if( is_admin() ) 618 $image = set_url_scheme( $image, 'admin' ); 619 else 620 $image = set_url_scheme( $image ); 617 621 return $image; 622 } 618 623 619 624 $src = false; 620 625 … … 624 629 @list($width, $height) = getimagesize($src_file); 625 630 } 626 631 if ( $src && $width && $height ) 632 if( is_admin() ) 633 $src = set_url_scheme( $src, 'admin' ); 634 else 635 $src = set_url_scheme( $src ); 627 636 return array( $src, $width, $height ); 628 637 return false; 629 638 }