Make sure trackback template is not double processed.

git-svn-id: https://develop.svn.wordpress.org/trunk@2305 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2005-02-13 21:25:08 +00:00
parent 0809fbff89
commit e20c0260e4
2 changed files with 3 additions and 5 deletions

View File

@ -182,16 +182,13 @@ if ( (0 == count($posts)) && !is_404() && !is_search()
header('HTTP/1.x 404 Not Found');
}
if ( is_trackback() )
$doing_trackback = true;
// Template redirection
if ( defined('WP_USE_THEMES') && constant('WP_USE_THEMES') ) {
do_action('template_redirect');
if ( is_feed() && empty($doing_rss) ) {
include(ABSPATH . '/wp-feed.php');
exit;
} else if ( is_trackback() ) {
} else if ( is_trackback() && empty($doing_trackback) ) {
include(ABSPATH . '/wp-trackback.php');
exit;
} else if ( is_404() && get_404_template() ) {
@ -233,7 +230,7 @@ if ( defined('WP_USE_THEMES') && constant('WP_USE_THEMES') ) {
if ( is_feed() && empty($doing_rss) ) {
include(ABSPATH . '/wp-feed.php');
exit;
} else if ( is_trackback() ) {
} else if ( is_trackback() && empty($doing_trackback) ) {
include(ABSPATH . '/wp-trackback.php');
exit;
}

View File

@ -3,6 +3,7 @@ require_once( dirname(__FILE__) . '/wp-config.php' );
if ( empty($doing_trackback) ) {
$doing_trackback = true;
$tb = true;
require_once('wp-blog-header.php');
}