From ae71e6a810f45865cdfd619eb6e6782d5fefcbcd Mon Sep 17 00:00:00 2001 From: Erick Hitter <ehitter@gmail.com> Date: Mon, 4 Jun 2012 10:43:59 -0400 Subject: [PATCH] Revert to inspection for print variable, rather than get_query_var. See #2. --- wp-print-friendly.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/wp-print-friendly.php b/wp-print-friendly.php index 0f1a779..55cb034 100644 --- a/wp-print-friendly.php +++ b/wp-print-friendly.php @@ -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 ); } /** -- GitLab