Filters for rascal and href were not being disabled on the is_search and is_archive pages, fixed by doing a return of $output inside the function.

The actual lines for adding the filter wouldn't accept the if (is_archive() or is_search()) for some reason, always returned false even with a global $wp_query, should have john investigate this further.

Signed-off-by: Philip M. Hofer (Frumph) <frumph_dragon@yahoo.com>
This commit is contained in:
Philip M. Hofer (Frumph) 2010-01-10 16:00:16 -08:00
parent 202e0d51ff
commit b7315d9806
1 changed files with 3 additions and 1 deletions

View File

@ -87,7 +87,8 @@ function comicpress_display_comic() {
} }
function comicpress_comic_clicks_next($output) { function comicpress_comic_clicks_next($output) {
global $post, $comicpress_options; global $post, $wp_query, $comicpress_options;
if (is_search() || is_archive()) return $output;
$next_comic = get_next_comic_permalink(); $next_comic = get_next_comic_permalink();
$output = "<a href=\"{$next_comic}\">{$output}</a>\r\n"; $output = "<a href=\"{$next_comic}\">{$output}</a>\r\n";
return $output; return $output;
@ -95,6 +96,7 @@ function comicpress_comic_clicks_next($output) {
function comicpress_rascal_says($output) { function comicpress_rascal_says($output) {
global $post, $wp_query, $comicpress_options; global $post, $wp_query, $comicpress_options;
if (is_search() || is_archive()) return $output;
$hovertext = get_post_meta( get_the_ID(), "hovertext", true ); $hovertext = get_post_meta( get_the_ID(), "hovertext", true );
if (!empty($hovertext)) { if (!empty($hovertext)) {
$output = preg_replace('#title="([^*]*)"#', '', $output); $output = preg_replace('#title="([^*]*)"#', '', $output);