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

Revert to inspection for print variable, rather than get_query_var. See #2.

parent 86187884
Branches
Tags
No related merge requests found
......@@ -150,11 +150,12 @@ class wp_print_friendly {
/**
* Determine if print template is being requested.
*
* @uses get_query_var
* @global $wp_query
* @return bool
*/
public function is_print() {
return (bool) get_query_var( $this->query_var );
global $wp_query;
return is_array( $wp_query->query ) && array_key_exists( $this->query_var, $wp_query->query );
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment