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:
parent
a80864dbf5
commit
7c7133aa9a
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue