diff --git a/wp-includes/classes.php b/wp-includes/classes.php index cdacc9c4c..610bff4f0 100644 --- a/wp-includes/classes.php +++ b/wp-includes/classes.php @@ -41,6 +41,7 @@ class WP_Query { $this->is_feed = false; $this->is_home = false; $this->is_404 = false; + $this->is_paged = false; unset($this->posts); unset($this->query); @@ -171,7 +172,11 @@ class WP_Query { $this->is_404 = true; } - if ( ($this->is_date || $this->is_author || $this->is_category) + if ('' != $qv['paged']) { + $this->is_paged = true; + } + + if ( ($this->is_date || $this->is_author || $this->is_category || $this->is_paged) && (! ($this->is_single || $this->is_page)) ) { $this->is_archive = true; } diff --git a/wp-includes/functions.php b/wp-includes/functions.php index 9e89f0dd6..93fe485c1 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -1986,6 +1986,12 @@ function is_404 () { return $wp_query->is_404; } +function is_paged () { + global $wp_query; + + return $wp_query->is_paged; +} + function get_query_var($var) { global $wp_query;