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:
parent
44f07ae292
commit
9a8383e26f
@ -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).'"' : '';
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user