WordPress.org

Make WordPress Core

Ticket #19023: 19023.diff

File 19023.diff, 589 bytes (added by markjaquith, 4 years ago)
  • wp-includes/media.php

    function wp_get_attachment_image($attachment_id, $size = 'thumbnail', $icon = fa 
    644644        $image = wp_get_attachment_image_src($attachment_id, $size, $icon); 
    645645        if ( $image ) { 
    646646                list($src, $width, $height) = $image; 
     647                if ( is_ssl() ) 
     648                        $src = str_replace( 'http://', 'https://', $src ); 
    647649                $hwstring = image_hwstring($width, $height); 
    648650                if ( is_array($size) ) 
    649651                        $size = join('x', $size);