Skip to content
Snippets Groups Projects
Commit d2b3f80e authored by Erick Hitter's avatar Erick Hitter
Browse files

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

parent 77c42190
No related branches found
No related tags found
No related merge requests found
......@@ -107,11 +107,12 @@ class view_all_posts_pages {
* Determine if full post view is being requested.
*
* @global $wp_query
* @uses is_404
* @return bool
*/
public function is_view_all() {
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();
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment