+1 to this.
I've attempted to add a custom function to my functions.php that adds the title into the img_caption_shortcode, but it just returns a blank, no title:
function fb_img_caption_shortcode($attr, $content = null) {
// Allow plugins/themes to override the default caption template.
$output = apply_filters('img_caption_shortcode', '', $attr, $content);
if ( $output != '' )
return $output;
extract(shortcode_atts(array(
'id' => '',
'align' => 'alignnone',
'width' => '',
'caption' => '',
'title' => ''
), $attr));
if ( 1 > (int) $width || empty($caption) )
return $content;
if ( $id ) $id = 'id="' . $id . '" ';
return '<dl ' . $id . 'class="wp-caption ' . $align . '" style="width: ' . (10 + (int) $width) . 'px"><dt>' . do_shortcode( $content ) . '</dt><dd class="wp-caption-text"><em>' . $title . '</em>' . $caption . '</dd></dl>';
}
add_shortcode('wp_caption', 'fb_img_caption_shortcode');
add_shortcode('caption', 'fb_img_caption_shortcode');
Does anyone know how to grab the title out of the media library's title field, and add it to the caption?