mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-16 11:35:48 +00:00
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
|
||||
/* Don't remove this line. */
|
||||
/* Short and sweet */
|
||||
define('WP_USE_THEMES', true);
|
||||
require('./wp-blog-header.php');
|
||||
?>
|
@ -189,11 +189,8 @@ endif;
|
||||
$wp_template_dir = TEMPLATEPATH;
|
||||
|
||||
// Template redirection
|
||||
if ($pagenow == 'index.php') {
|
||||
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 ( defined('WP_USE_THEMES') && constant('WP_USE_THEMES') ) {
|
||||
do_action('template_redirect');
|
||||
if ( is_feed() && empty($doing_rss) ) {
|
||||
include(ABSPATH . '/wp-feed.php');
|
||||
exit;
|
||||
@ -201,9 +198,6 @@ if ($pagenow == 'index.php') {
|
||||
include(ABSPATH . '/wp-trackback.php');
|
||||
exit;
|
||||
}
|
||||
} elseif ( !isset($wp_template_redirect) ) {
|
||||
$wp_template_redirect = true;
|
||||
do_action('template_redirect');
|
||||
if ( is_feed() && empty($doing_rss) ) {
|
||||
include(ABSPATH . '/wp-feed.php');
|
||||
exit;
|
||||
@ -244,7 +238,6 @@ if ($pagenow == 'index.php') {
|
||||
include(TEMPLATEPATH . "/index.php");
|
||||
exit;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($pagenow != 'post.php' && $pagenow != 'edit.php') {
|
||||
|
Loading…
x
Reference in New Issue
Block a user