Ticket #18984: 18984.diff
File 18984.diff, 1.1 KB (added by , 11 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