Make WordPress Core


Ignore:
Timestamp:
11/21/2012 11:50:30 AM (12 years ago)
Author:
nacin
Message:

Stop inserting title attributes for images inserted into the editor by modifying get_image_send_to_editor(), not the generic get_image_tag().

see #18984, [22409].

File:
1 edited

Legend:

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

    r22743 r22747  
    226226    $hwstring = image_hwstring($width, $height);
    227227
     228    $title = $title ? 'title="' . esc_attr( $title ) . '" ' : '';
     229
    228230    $class = 'align' . esc_attr($align) .' size-' . esc_attr($size) . ' wp-image-' . $id;
    229231    $class = apply_filters('get_image_tag_class', $class, $id, $align, $size);
    230232
    231     $html = '<img src="' . esc_attr($img_src) . '" alt="' . esc_attr($alt) . '" '.$hwstring.'class="'.$class.'" />';
     233    $html = '<img src="' . esc_attr($img_src) . '" alt="' . esc_attr($alt) . '" ' . $title . $hwstring . 'class="' . $class . '" />';
    232234
    233235    $html = apply_filters( 'get_image_tag', $html, $id, $alt, $title, $align, $size );
Note: See TracChangeset for help on using the changeset viewer.