use caption if found, just like in wp

This commit is contained in:
John Bintz 2009-07-13 04:22:50 -04:00
parent b8d2f8e5ec
commit c0de89ce1f
1 changed files with 2 additions and 1 deletions

View File

@ -27,7 +27,8 @@ class ComicPressComicPost {
if (is_array($this->get_comic_image_attachments())) {
foreach ($this->get_comic_image_attachments() as $attachment) {
if (get_post_meta($attachment->ID, "comic_image_type", true) == $type) {
echo $this->get_comic_img_tag(wp_get_attachment_url($attachment->ID, ''), $size_type, array('title' => $attachment->post_title));
$title = (!empty($attachment->post_excerpt) ? $attachment->post_excerpt : $attachment->post_title);
echo $this->get_comic_img_tag(wp_get_attachment_url($attachment->ID, ''), $size_type, array('title' => $title));
echo "<br />";
$found = true;