[wp-cvs]
wordpress/wp-includes classes.php, 1.10, 1.11 functions.php,
1.146, 1.147
Ryan Boren
rboren at users.sourceforge.net
Fri Aug 27 20:59:41 UTC 2004
Update of /cvsroot/cafelog/wordpress/wp-includes
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29278/wp-includes
Modified Files:
classes.php functions.php
Log Message:
404 permalink handler.
Index: functions.php
===================================================================
RCS file: /cvsroot/cafelog/wordpress/wp-includes/functions.php,v
retrieving revision 1.146
retrieving revision 1.147
diff -C2 -d -r1.146 -r1.147
*** functions.php 24 Aug 2004 08:43:01 -0000 1.146
--- functions.php 27 Aug 2004 20:59:38 -0000 1.147
***************
*** 1663,1666 ****
--- 1663,1672 ----
}
+ function is_404 () {
+ global $wp_query;
+
+ return $wp_query->is_404;
+ }
+
function get_query_var($var) {
global $wp_query;
Index: classes.php
===================================================================
RCS file: /cvsroot/cafelog/wordpress/wp-includes/classes.php,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** classes.php 24 Aug 2004 08:43:01 -0000 1.10
--- classes.php 27 Aug 2004 20:59:38 -0000 1.11
***************
*** 23,26 ****
--- 23,27 ----
var $is_feed = false;
var $is_home = false;
+ var $is_404 = false;
function init () {
***************
*** 38,41 ****
--- 39,43 ----
$this->is_feed = false;
$this->is_home = false;
+ $this->is_404 = false;
unset($this->posts);
***************
*** 161,164 ****
--- 163,170 ----
}
+ 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)) ) {
***************
*** 166,170 ****
}
! if ( ! ($this->is_archive || $this->is_single || $this->is_page || $this->is_search || $this->is_feed)) {
$this->is_home = true;
}
--- 172,176 ----
}
! if ( ! ($this->is_archive || $this->is_single || $this->is_page || $this->is_search || $this->is_feed || $this->is_404)) {
$this->is_home = true;
}
More information about the cvs
mailing list