Ticket #18984: 18984.2.diff
File 18984.2.diff, 2.1 KB (added by , 13 years ago) |
---|
-
wp-includes/media.php
228 228 $class = 'align' . esc_attr($align) .' size-' . esc_attr($size) . ' wp-image-' . $id; 229 229 $class = apply_filters('get_image_tag_class', $class, $id, $align, $size); 230 230 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.'" />'; 232 232 233 233 $html = apply_filters( 'get_image_tag', $html, $id, $alt, $title, $align, $size ); 234 234 … … 660 660 'src' => $src, 661 661 'class' => "attachment-$size", 662 662 '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 )),664 663 ); 665 664 if ( empty($default_attr['alt']) ) 666 665 $default_attr['alt'] = trim(strip_tags( $attachment->post_excerpt )); // If not, Use the Caption -
wp-admin/includes/media.php
1519 1519 if ( '' == f.src.value || '' == t.width ) 1520 1520 return false; 1521 1521 1522 if ( f.title.value ) {1523 title = f.title.value.replace(/'/g, ''').replace(/"/g, '"').replace(/</g, '<').replace(/>/g, '>');1524 title = ' title="'+title+'"';1525 }1526 1527 1522 if ( f.alt.value ) 1528 1523 alt = f.alt.value.replace(/'/g, ''').replace(/"/g, '"').replace(/</g, '<').replace(/>/g, '>'); 1529 1524 … … 1540 1535 1541 1536 cls = caption ? '' : ' class="'+t.align+'"'; 1542 1537 1543 html = '<img alt="'+alt+'" src="'+f.src.value+'"'+ title+cls+' width="'+t.width+'" height="'+t.height+'" />';1538 html = '<img alt="'+alt+'" src="'+f.src.value+'"'+cls+' width="'+t.width+'" height="'+t.height+'" />'; 1544 1539 1545 1540 if ( f.url.value ) { 1546 1541 url = f.url.value.replace(/'/g, ''').replace(/"/g, '"').replace(/</g, '<').replace(/>/g, '>');