Ticket #18984: 18984.3.diff

File 18984.3.diff, 522 bytes (added by nacin, 6 months ago)
Line 
1Index: wp-admin/includes/media.php
2===================================================================
3--- wp-admin/includes/media.php (revision 22925)
4+++ wp-admin/includes/media.php (working copy)
5@@ -105,6 +105,10 @@
6  * @return string the html to insert into editor
7  */
8 function get_image_send_to_editor($id, $caption, $title, $align, $url='', $rel = false, $size='medium', $alt = '') {
9+       if ( ! $alt )
10+               $alt = $caption;
11+       if ( ! $alt )
12+               $alt = $title;
13 
14        $html = get_image_tag($id, $alt, '', $align, $size);
15