Make WordPress Core

Ticket #18984: 18984.diff

File 18984.diff, 1.1 KB (added by martythornley, 11 years ago)
  • wp-includes/media.php

     
    228228        $class = 'align' . esc_attr($align) .' size-' . esc_attr($size) . ' wp-image-' . $id;
    229229        $class = apply_filters('get_image_tag_class', $class, $id, $align, $size);
    230230
    231         $html = '<img src="' . esc_attr($img_src) . '" alt="' . esc_attr($alt) . '" title="' . esc_attr($title).'" '.$hwstring.'class="'.$class.'" />';
     231        $html = '<img src="' . esc_attr($img_src) . '" alt="' . esc_attr($alt) . '" '.$hwstring.'class="'.$class.'" />';
    232232
    233233        $html = apply_filters( 'get_image_tag', $html, $id, $alt, $title, $align, $size );
    234234
     
    660660                        'src'   => $src,
    661661                        'class' => "attachment-$size",
    662662                        'alt'   => trim(strip_tags( get_post_meta($attachment_id, '_wp_attachment_image_alt', true) )), // Use Alt field first
    663                         'title' => trim(strip_tags( $attachment->post_title )),
    664663                );
    665664                if ( empty($default_attr['alt']) )
    666665                        $default_attr['alt'] = trim(strip_tags( $attachment->post_excerpt )); // If not, Use the Caption