Give 404 precedence over other templates.

git-svn-id: http://svn.automattic.com/wordpress/trunk@1877 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
rboren 2004-11-23 21:16:04 +00:00
parent a80864dbf5
commit 7c7133aa9a
1 changed files with 5 additions and 5 deletions

View File

@ -210,6 +210,11 @@ if ($pagenow == 'index.php') {
$wp_did_template_redirect = true;
include(dirname(__FILE__) . '/wp-trackback.php');
exit;
} else if (is_404() &&
file_exists("$wp_template_dir/404.php")) {
$wp_did_template_redirect = true;
include("$wp_template_dir/404.php");
exit;
} else if (is_home() &&
file_exists("$wp_template_dir/index.php")) {
$wp_did_template_redirect = true;
@ -250,11 +255,6 @@ if ($pagenow == 'index.php') {
$wp_did_template_redirect = true;
include("$wp_template_dir/search.php");
exit;
} else if (is_404() &&
file_exists("$wp_template_dir/404.php")) {
$wp_did_template_redirect = true;
include("$wp_template_dir/404.php");
exit;
} else if (file_exists("$wp_template_dir/index.php"))
{
$wp_did_template_redirect = true;