diff --git a/wp-blog-header.php b/wp-blog-header.php index 70ebeb8c0eed..b8050fc8bf77 100644 --- a/wp-blog-header.php +++ b/wp-blog-header.php @@ -182,16 +182,13 @@ 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 ( 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; } diff --git a/wp-trackback.php b/wp-trackback.php index 75bcafb4c009..d78eb1f87c74 100644 --- a/wp-trackback.php +++ b/wp-trackback.php @@ -3,6 +3,7 @@ if ( empty($doing_trackback) ) { $doing_trackback = true; + $tb = true; require_once('wp-blog-header.php'); }