WordPress.org

Make WordPress Core

Changeset 22747


Ignore:
Timestamp:
11/21/12 11:50:30 (17 months 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].

Location:
trunk
Files:
2 edited

Legend:

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

    r22700 r22747  
    107107function get_image_send_to_editor($id, $caption, $title, $align, $url='', $rel = false, $size='medium', $alt = '') { 
    108108 
    109     $html = get_image_tag($id, $alt, $title, $align, $size); 
     109    $html = get_image_tag($id, $alt, '', $align, $size); 
    110110 
    111111    $rel = $rel ? ' rel="attachment wp-att-' . esc_attr($id).'"' : ''; 
  • 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.