Add is_paged().
git-svn-id: http://svn.automattic.com/wordpress/trunk@1871 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
81bb103348
commit
2201be3af3
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue