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

git-svn-id: https://develop.svn.wordpress.org/trunk@9210 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Ozz 2008-10-16 20:25:50 +00:00
parent 44f07ae292
commit 9a8383e26f
1 changed files with 3 additions and 1 deletions

View File

@ -93,7 +93,9 @@ function the_media_upload_tabs() {
*/
function get_image_send_to_editor($id, $alt, $title, $align, $url='', $rel = false, $size='medium') {
$html = get_image_tag($id, $alt, $title, $align, $size);
$htmlalt = ( empty($alt) ) ? $title : $alt;
$html = get_image_tag($id, $htmlalt, $title, $align, $size);
$rel = $rel ? ' rel="attachment wp-att-'.attribute_escape($id).'"' : '';