Ticket #20534: 20534.2.diff
File 20534.2.diff, 896 bytes (added by , 13 years ago) |
---|
-
wp-includes/media.php
605 605 function wp_get_attachment_image_src($attachment_id, $size='thumbnail', $icon = false) { 606 606 607 607 // get a thumbnail or intermediate image if there is one 608 if ( $image = image_downsize($attachment_id, $size) ) 608 if ( $image = image_downsize($attachment_id, $size) ) { 609 if ( force_ssl_admin() && is_admin() ) { 610 $image = str_replace('http://', 'https://', $image); 611 } 609 612 return $image; 613 } 610 614 611 615 $src = false; 612 616 … … 616 620 @list($width, $height) = getimagesize($src_file); 617 621 } 618 622 if ( $src && $width && $height ) 623 if ( force_ssl_admin() && is_admin() ) { 624 $src = str_replace('http://', 'https://', $src); 625 } 619 626 return array( $src, $width, $height ); 620 627 return false; 621 628 }