mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-08 19:20:03 +00:00
Add is_paged().
git-svn-id: https://develop.svn.wordpress.org/trunk@1871 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user