ID) ) { $comic_image = get_the_post_thumbnail($post_to_use->ID,'full'); $comic_image = preg_replace('#title="([^*]*)"#', 'title="'.$title_to_use.'"', $comic_image); } } } if (!isset($comic_image)) { $comic = explode(".", the_comic_filename()); if (strtolower($comic[1]) == 'swf') { if (file_exists(get_stylesheet_directory().'/images/mediafile.png')) { $directory_to_use = get_stylesheet_directory_uri(); } else { $directory_to_use = get_template_directory_uri(); } $comic_image = "\"{$title_to_use}\""; } } if (!isset($comic_image)) { $searchorder = explode(',',$searchorder); $requested_archive_image = ''; foreach ($searchorder as $type) { if (($requested_archive_image = get_comic_url($type, $post_to_use)) !== false) { $comic_image = "\"".get_the_title($post_to_use)."\""; break; } } } $comic_image = preg_replace('/\<(.*?)(width="(.*?)")(.*?)(height="(.*?)")(.*?)\>/i', '<$1$4$7>', $comic_image); return apply_filters('comicpress_display_comic_image',$comic_image); } function comicpress_display_comic_swf() { global $post; $height = get_post_meta( get_the_ID(), "fheight", true ); $width = get_post_meta( get_the_ID(), "fwidth", true ); if (empty($height)) $height = '300'; if (empty($width)) $width = '100%'; $output = "\r\n"; $output .= " \r\n"; $output .= "\r\n"; $output .= "
\r\n"; $output .= "

Get Flash!

\r\n"; $output .= "

\"Get

\r\n"; $output .= "
\r\n"; $output .= "
\r\n"; return apply_filters('comicpress_display_comic_swf',$output); } function comicpress_display_comic() { global $post; $comic = explode(".", the_comic_filename()); switch (strtolower($comic[1])) { case 'swf': $output = comicpress_display_comic_swf(); break; case 'png': case 'gif': case 'jpg': default: $output = comicpress_display_comic_image('comic', false, $post, the_hovertext()); } echo apply_filters('comicpress_display_comic', $output); } function comicpress_comic_clicks_next($output) { global $post, $wp_query, $comicpress_options; if (is_search() || is_archive()) return $output; $next_comic = get_next_comic_permalink(); $output = "{$output}\r\n"; return $output; } function comicpress_rascal_says($output) { global $post, $wp_query, $comicpress_options; if (is_search() || is_archive()) return $output; $hovertext = get_post_meta( get_the_ID(), "hovertext", true ); if (!empty($hovertext)) { $output = preg_replace('#title="([^*]*)"#', '', $output); $href_to_use = "#"; $output = " {$hovertext} {$output}\r\n"; } if ($comicpress_options['comic_clicks_next']) { $href_to_use = get_next_comic_permalink(); $output = "{$output}"; } else { $output = "{$output}"; } return apply_filters('comicpress_rascal_says',$output); } // global $comicpress_options, $post; if ($comicpress_options['rascal_says']) { add_filter('comicpress_display_comic_image', 'comicpress_rascal_says'); } if ($comicpress_options['comic_clicks_next'] && !$comicpress_options['rascal_says']) { add_filter('comicpress_display_comic_image', 'comicpress_comic_clicks_next'); } ?>