From c0de89ce1ffee135d3ee9f0b0660b60b4a759006 Mon Sep 17 00:00:00 2001 From: John Bintz Date: Mon, 13 Jul 2009 04:22:50 -0400 Subject: [PATCH] use caption if found, just like in wp --- classes/ComicPressComicPost.inc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/classes/ComicPressComicPost.inc b/classes/ComicPressComicPost.inc index d98e7e7..b7b7866 100644 --- a/classes/ComicPressComicPost.inc +++ b/classes/ComicPressComicPost.inc @@ -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 "
"; $found = true;