Better default behaviour for theme calling
git-svn-id: http://svn.automattic.com/wordpress/trunk@2303 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
9c4632e9f6
commit
ad536c567e
|
@ -1,4 +1,5 @@
|
||||||
<?php
|
<?php
|
||||||
/* Don't remove this line. */
|
/* Short and sweet */
|
||||||
|
define('WP_USE_THEMES', true);
|
||||||
require('./wp-blog-header.php');
|
require('./wp-blog-header.php');
|
||||||
?>
|
?>
|
|
@ -189,11 +189,8 @@ endif;
|
||||||
$wp_template_dir = TEMPLATEPATH;
|
$wp_template_dir = TEMPLATEPATH;
|
||||||
|
|
||||||
// Template redirection
|
// Template redirection
|
||||||
if ($pagenow == 'index.php') {
|
if ( defined('WP_USE_THEMES') && constant('WP_USE_THEMES') ) {
|
||||||
if ( isset($wp_template_redirect) && $wp_template_redirect != true) {
|
do_action('template_redirect');
|
||||||
// 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() && empty($doing_rss) ) {
|
if ( is_feed() && empty($doing_rss) ) {
|
||||||
include(ABSPATH . '/wp-feed.php');
|
include(ABSPATH . '/wp-feed.php');
|
||||||
exit;
|
exit;
|
||||||
|
@ -201,9 +198,6 @@ if ($pagenow == 'index.php') {
|
||||||
include(ABSPATH . '/wp-trackback.php');
|
include(ABSPATH . '/wp-trackback.php');
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
} elseif ( !isset($wp_template_redirect) ) {
|
|
||||||
$wp_template_redirect = true;
|
|
||||||
do_action('template_redirect');
|
|
||||||
if ( is_feed() && empty($doing_rss) ) {
|
if ( is_feed() && empty($doing_rss) ) {
|
||||||
include(ABSPATH . '/wp-feed.php');
|
include(ABSPATH . '/wp-feed.php');
|
||||||
exit;
|
exit;
|
||||||
|
@ -244,7 +238,6 @@ if ($pagenow == 'index.php') {
|
||||||
include(TEMPLATEPATH . "/index.php");
|
include(TEMPLATEPATH . "/index.php");
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($pagenow != 'post.php' && $pagenow != 'edit.php') {
|
if ($pagenow != 'post.php' && $pagenow != 'edit.php') {
|
||||||
|
|
Loading…
Reference in New Issue