Commit d2b3f80e authored by Erick Hitter's avatar Erick Hitter

Don't trigger plugin functionality if WordPress determines the request is a 404.

parent 77c42190
...@@ -107,11 +107,12 @@ class view_all_posts_pages { ...@@ -107,11 +107,12 @@ class view_all_posts_pages {
* Determine if full post view is being requested. * Determine if full post view is being requested.
* *
* @global $wp_query * @global $wp_query
* @uses is_404
* @return bool * @return bool
*/ */
public function is_view_all() { public function is_view_all() {
global $wp_query; global $wp_query;
return is_array( $wp_query->query ) && array_key_exists( $this->query_var, $wp_query->query ); return is_array( $wp_query->query ) && array_key_exists( $this->query_var, $wp_query->query ) && ! is_404();
} }
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment