If no caption entered, use attachment title for alt text, props Viper007Bond, fixes #7675
git-svn-id: http://svn.automattic.com/wordpress/trunk@9210 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
372a721fe0
commit
57fb217b3f
|
@ -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