If template redirection is turned off, we still need to redirect for feeds and trackbacks so that permalinks do not break.

git-svn-id: http://svn.automattic.com/wordpress/trunk@2087 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
rboren 2005-01-14 05:52:10 +00:00
parent 82e031194e
commit a143594b7b
1 changed files with 12 additions and 1 deletions

View File

@ -205,7 +205,18 @@ $wp_template_dir = TEMPLATEPATH;
// Template redirection
if ($pagenow == 'index.php') {
if ( !isset($wp_template_redirect) ) {
if ( isset($wp_template_redirect) && $wp_template_redirect != true) {
// If $wp_template_redirect is set to false, template redirection
// should be skipped for everything except feeds and trackbacks.
$wp_template_redirect = true;
if ( is_feed() ) {
include(ABSPATH . '/wp-feed.php');
exit;
} else if ( is_trackback() ) {
include(ABSPATH . '/wp-trackback.php');
exit;
}
} elseif ( !isset($wp_template_redirect) ) {
$wp_template_redirect = true;
do_action('template_redirect', '');
if ( is_feed() ) {