Make WordPress Core


Ignore:
Timestamp:
11/06/2012 11:23:03 PM (11 years ago)
Author:
nacin
Message:

Stop adding title attributes to images (in the old media uploader). props martythornley. fixes #18984.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/media.php

    r22362 r22409  
    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 );
     
    549549            'class' => "attachment-$size",
    550550            'alt'   => trim(strip_tags( get_post_meta($attachment_id, '_wp_attachment_image_alt', true) )), // Use Alt field first
    551             'title' => trim(strip_tags( $attachment->post_title )),
    552551        );
    553552        if ( empty($default_attr['alt']) )
Note: See TracChangeset for help on using the changeset viewer.