Test for feed and trackback at the beginning of the template redirection code.
git-svn-id: http://svn.automattic.com/wordpress/trunk@1694 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
06d0270928
commit
a88c2a9db9
|
@ -202,7 +202,15 @@ if (! empty($wp_template)) {
|
||||||
// Template redirection
|
// Template redirection
|
||||||
if ($pagenow == 'index.php') {
|
if ($pagenow == 'index.php') {
|
||||||
if (! isset($wp_did_template_redirect)) {
|
if (! isset($wp_did_template_redirect)) {
|
||||||
if (is_home() &&
|
if (is_feed()) {
|
||||||
|
$wp_did_template_redirect = true;
|
||||||
|
include(dirname(__FILE__) . '/wp-feed.php');
|
||||||
|
exit;
|
||||||
|
} else if ($tb == 1) {
|
||||||
|
$wp_did_template_redirect = true;
|
||||||
|
include(dirname(__FILE__) . '/wp-trackback.php');
|
||||||
|
exit;
|
||||||
|
} else if (is_home() &&
|
||||||
file_exists(ABSPATH . "wp-content/${wp_template}index.php")) {
|
file_exists(ABSPATH . "wp-content/${wp_template}index.php")) {
|
||||||
$wp_did_template_redirect = true;
|
$wp_did_template_redirect = true;
|
||||||
include(ABSPATH . "wp-content/${wp_template}index.php");
|
include(ABSPATH . "wp-content/${wp_template}index.php");
|
||||||
|
@ -248,14 +256,6 @@ if ($pagenow == 'index.php') {
|
||||||
$wp_did_template_redirect = true;
|
$wp_did_template_redirect = true;
|
||||||
include(ABSPATH . "wp-content/${wp_template}404.php");
|
include(ABSPATH . "wp-content/${wp_template}404.php");
|
||||||
exit;
|
exit;
|
||||||
} else if (is_feed()) {
|
|
||||||
$wp_did_template_redirect = true;
|
|
||||||
include(dirname(__FILE__) . '/wp-feed.php');
|
|
||||||
exit;
|
|
||||||
} else if ($tb == 1) {
|
|
||||||
$wp_did_template_redirect = true;
|
|
||||||
include(dirname(__FILE__) . '/wp-trackback.php');
|
|
||||||
exit;
|
|
||||||
} else if (file_exists(ABSPATH . "wp-content/${wp_template}index.php"))
|
} else if (file_exists(ABSPATH . "wp-content/${wp_template}index.php"))
|
||||||
{
|
{
|
||||||
$wp_did_template_redirect = true;
|
$wp_did_template_redirect = true;
|
||||||
|
|
Loading…
Reference in New Issue