WordPress.org

Make WordPress Core

Changeset 9210


Ignore:
Timestamp:
10/16/2008 08:25:50 PM (10 years ago)
Author:
azaozz
Message:

If no caption entered, use attachment title for alt text, props Viper007Bond, fixes #7675

File:
1 edited

Legend:

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

    r9129 r9210  
    9494function get_image_send_to_editor($id, $alt, $title, $align, $url='', $rel = false, $size='medium') {
    9595
    96     $html = get_image_tag($id, $alt, $title, $align, $size);
     96    $htmlalt = ( empty($alt) ) ? $title : $alt;
     97 
     98    $html = get_image_tag($id, $htmlalt, $title, $align, $size);
    9799
    98100    $rel = $rel ? ' rel="attachment wp-att-'.attribute_escape($id).'"' : '';
Note: See TracChangeset for help on using the changeset viewer.