From 8fd4dd7b1259ecd3c1fd94a99012ba8d30a8680d Mon Sep 17 00:00:00 2001 From: rboren Date: Sun, 13 Feb 2005 19:45:04 +0000 Subject: [PATCH] Use the object's is_* vars instead of the global is_* functions. git-svn-id: http://svn.automattic.com/wordpress/trunk@2300 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/classes.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/wp-includes/classes.php b/wp-includes/classes.php index d1ca7dd9ec..f3de3f3fc9 100644 --- a/wp-includes/classes.php +++ b/wp-includes/classes.php @@ -235,7 +235,7 @@ class WP_Query { $q['showposts'] = (int) $q['showposts']; $q['posts_per_page'] = $q['showposts']; } - if ( (isset($q['posts_per_archive_page']) && $q['posts_per_archive_page'] != 0) && (is_archive() || is_search()) ) + if ( (isset($q['posts_per_archive_page']) && $q['posts_per_archive_page'] != 0) && ($this->is_archive || $this->is_search) ) $q['posts_per_page'] = $q['posts_per_archive_page']; if ( !isset($q['nopaging']) ) { if ($q['posts_per_page'] == -1) { @@ -355,7 +355,7 @@ class WP_Query { if ((empty($q['cat'])) || ($q['cat'] == '0') || // Bypass cat checks if fetching specific posts - ( is_single() || is_page() )) { + ( $this->is_single || $this->is_page )) { $whichcat=''; } else { $q['cat'] = ''.urldecode($q['cat']).''; @@ -482,7 +482,7 @@ class WP_Query { $distinct = 'DISTINCT'; } - if (is_page()) { + if ($this->is_page) { $where .= ' AND (post_status = "static"'; } else { $where .= ' AND (post_status = "publish"'; @@ -500,7 +500,7 @@ class WP_Query { $join = apply_filters('posts_join', $join); // Paging - if (empty($q['nopaging']) && ! is_single()) { + if (empty($q['nopaging']) && ! $this->is_single) { $page = $q['paged']; if (empty($page)) { $page = 1;