mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-01 11:14:36 +00:00
404 permalink handler.
git-svn-id: https://develop.svn.wordpress.org/trunk@1570 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -22,6 +22,7 @@ class WP_Query {
|
||||
var $is_search = false;
|
||||
var $is_feed = false;
|
||||
var $is_home = false;
|
||||
var $is_404 = false;
|
||||
|
||||
function init () {
|
||||
$this->is_single = false;
|
||||
@@ -37,6 +38,7 @@ class WP_Query {
|
||||
$this->is_search = false;
|
||||
$this->is_feed = false;
|
||||
$this->is_home = false;
|
||||
$this->is_404 = false;
|
||||
|
||||
unset($this->posts);
|
||||
unset($this->query);
|
||||
@@ -160,12 +162,16 @@ class WP_Query {
|
||||
$this->is_page = true;
|
||||
}
|
||||
|
||||
if ('' != $qv['error'] || '404' == $qv['pagename']) {
|
||||
$this->is_404 = true;
|
||||
}
|
||||
|
||||
if ( ($this->is_date || $this->is_author || $this->is_category)
|
||||
&& (! ($this->is_single || $this->is_page)) ) {
|
||||
$this->is_archive = true;
|
||||
}
|
||||
|
||||
if ( ! ($this->is_archive || $this->is_single || $this->is_page || $this->is_search || $this->is_feed)) {
|
||||
if ( ! ($this->is_archive || $this->is_single || $this->is_page || $this->is_search || $this->is_feed || $this->is_404)) {
|
||||
$this->is_home = true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user