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:
saxmatt 2005-02-13 20:38:28 +00:00
parent 9c4632e9f6
commit ad536c567e
2 changed files with 50 additions and 56 deletions

View File

@ -1,4 +1,5 @@
<?php
/* Don't remove this line. */
/* Short and sweet */
define('WP_USE_THEMES', true);
require('./wp-blog-header.php');
?>

View File

@ -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;
@ -245,7 +239,6 @@ if ($pagenow == 'index.php') {
exit;
}
}
}
if ($pagenow != 'post.php' && $pagenow != 'edit.php') {
if ( get_settings('gzipcompression') )