mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-22 17:18:32 +01:00
Template redirection fix-up.
git-svn-id: http://svn.automattic.com/wordpress/trunk@1641 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
fff12f2605
commit
a34e77d72a
@ -205,57 +205,69 @@ if ($pagenow != get_settings('blogfilename')) {
|
||||
} else if (is_home() && (! isset($wp_did_home)) &&
|
||||
file_exists(ABSPATH . "wp-content/${wp_template}index.php")) {
|
||||
$wp_did_home = true;
|
||||
$wp_did_template_redirect = true;
|
||||
include(ABSPATH . "wp-content/${wp_template}index.php");
|
||||
exit;
|
||||
} else if (is_single() && (! isset($wp_did_single)) &&
|
||||
file_exists(ABSPATH . "wp-content/${wp_template}single.php")) {
|
||||
$wp_did_single = true;
|
||||
$wp_did_template_redirect = true;
|
||||
include(ABSPATH . "wp-content/${wp_template}single.php");
|
||||
exit;
|
||||
} else if (is_page() && (! isset($wp_did_page)) &&
|
||||
file_exists(ABSPATH . "wp-content/${wp_template}page.php")) {
|
||||
$wp_did_page = true;
|
||||
$wp_did_template_redirect = true;
|
||||
include(ABSPATH . "wp-content/${wp_template}page.php");
|
||||
exit;
|
||||
} else if (is_category() && (! isset($wp_did_category)) &&
|
||||
file_exists(ABSPATH . "wp-content/${wp_template}category.php")) {
|
||||
$wp_did_category = true;
|
||||
$wp_did_template_redirect = true;
|
||||
include(ABSPATH . "wp-content/${wp_template}category.php");
|
||||
exit;
|
||||
} else if (is_author() && (! isset($wp_did_author)) &&
|
||||
file_exists(ABSPATH . "wp-content/${wp_template}author.php")) {
|
||||
$wp_did_author = true;
|
||||
$wp_did_template_redirect = true;
|
||||
include(ABSPATH . "wp-content/${wp_template}author.php");
|
||||
exit;
|
||||
} else if (is_date() && (! isset($wp_did_date)) &&
|
||||
file_exists(ABSPATH . "wp-content/${wp_template}date.php")) {
|
||||
$wp_did_date = true;
|
||||
$wp_did_template_redirect = true;
|
||||
include(ABSPATH . "wp-content/${wp_template}date.php");
|
||||
exit;
|
||||
} else if (is_archive() && (! isset($wp_did_archive)) &&
|
||||
file_exists(ABSPATH . "wp-content/${wp_template}archive.php")) {
|
||||
$wp_did_archive = true;
|
||||
$wp_did_template_redirect = true;
|
||||
include(ABSPATH . "wp-content/${wp_template}archive.php");
|
||||
exit;
|
||||
} else if (is_search() && (! isset($wp_did_search)) &&
|
||||
file_exists(ABSPATH . "wp-content/${wp_template}search.php")) {
|
||||
$wp_did_search = true;
|
||||
$wp_did_template_redirect = true;
|
||||
include(ABSPATH . "wp-content/${wp_template}search.php");
|
||||
exit;
|
||||
} else if (is_404() && (! isset($wp_did_404)) &&
|
||||
file_exists(ABSPATH . "wp-content/${wp_template}404.php")) {
|
||||
$wp_did_404 = true;
|
||||
$wp_did_template_redirect = true;
|
||||
include(ABSPATH . "wp-content/${wp_template}404.php");
|
||||
exit;
|
||||
} else if (is_feed() && $pagenow != 'wp-feed.php') {
|
||||
$wp_did_template_redirect = true;
|
||||
include(dirname(__FILE__) . '/wp-feed.php');
|
||||
exit;
|
||||
} else if ($pagenow != 'wp-trackback.php' && $tb == 1) {
|
||||
$wp_did_template_redirect = true;
|
||||
include(dirname(__FILE__) . '/wp-trackback.php');
|
||||
exit;
|
||||
} else if ((! isset($wp_did_home)) && file_exists(ABSPATH . "wp-content/${wp_template}index.php"))
|
||||
} else if ((! isset($wp_did_template_redirect)) && file_exists(ABSPATH . "wp-content/${wp_template}index.php"))
|
||||
{
|
||||
$wp_did_home = true;
|
||||
$wp_did_template_redirect = true;
|
||||
include(ABSPATH . "wp-content/${wp_template}index.php");
|
||||
exit;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user