From add5e68dc9f3c2999ea202995276767aba49c10d Mon Sep 17 00:00:00 2001 From: "Philip M. Hofer (Frumph)" Date: Thu, 7 Jan 2010 01:58:44 -0800 Subject: [PATCH] Adjusting post-images for archive and search on media files Signed-off-by: Philip M. Hofer (Frumph) --- functions/displaycomic.php | 7 ++++--- functions/displaypost.php | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/functions/displaycomic.php b/functions/displaycomic.php index aa3f6d2..775a182 100644 --- a/functions/displaycomic.php +++ b/functions/displaycomic.php @@ -18,8 +18,9 @@ function comicpress_display_comic_area() { function comicpress_display_comic_image($searchorder = "comic", $use_post_image = false, $override_post = null, $title = null) { global $post; $post_to_use = !is_null($override_post) ? $override_post : $post; - $title_to_use = !is_null($title) ? $title : the_hovertext($post_to_use); - if ($use_post_image) { + $title_to_use = !is_null($title) ? $title : the_hovertext($post_to_use); + $comic = explode(".", the_comic_filename()); + if ($use_post_image || strtolower($comic[1]) == 'swf') { if (function_exists('has_post_thumbnail')) { if ( has_post_thumbnail($post_to_use->ID) ) { $comic_image = get_the_post_thumbnail($post_to_use->ID,'full'); @@ -29,7 +30,7 @@ function comicpress_display_comic_image($searchorder = "comic", $use_post_image } if (!isset($comic_image)) { $comic = explode(".", the_comic_filename()); - if ($comic[1] == 'swf') { + if (strtolower($comic[1]) == 'swf') { $comic_image = "\"{$title_to_use}\""; } } diff --git a/functions/displaypost.php b/functions/displaypost.php index f5bd7aa..5ac7a01 100644 --- a/functions/displaypost.php +++ b/functions/displaypost.php @@ -128,7 +128,7 @@ function comicpress_display_the_content($is_comic = false) { if (is_archive() || is_search()) { if ($is_comic) { ?>
- <?php the_title() ?> +