Define TEMPLATEPATH. Look for footer, sidebar, and header in the template directory for the active theme.

git-svn-id: http://svn.automattic.com/wordpress/trunk@1922 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
rboren 2004-12-08 21:51:25 +00:00
parent ceca2e9751
commit b1f753ab3f
5 changed files with 9 additions and 7 deletions

View File

@ -202,7 +202,7 @@ if ( (0 == count($posts)) && !is_404() && !is_search()
$wp_did_header = true;
endif;
$wp_template_dir = get_template_directory();
$wp_template_dir = TEMPLATEPATH;
// Template redirection
if ($pagenow == 'index.php') {

View File

@ -1,8 +1,8 @@
<?php
// If a footer.php file exists in the WP root directory we
// use that, otherwise use this default wp-footer.php file.
if ( file_exists(ABSPATH . '/footer.php') ) :
include_once(ABSPATH . '/footer.php');
if ( file_exists(TEMPLATEPATH . '/footer.php') ) :
include_once(TEMPLATEPATH . '/footer.php');
else :
?>
</div>

View File

@ -1,8 +1,8 @@
<?php
// If a header.php file exists in the WP root directory we
// use that, otherwise use this default wp-header.php file.
if ( file_exists(ABSPATH . '/header.php') ) :
include_once(ABSPATH . '/header.php');
if ( file_exists(TEMPLATEPATH . '/header.php') ) :
include_once(TEMPLATEPATH . '/header.php');
else :
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

View File

@ -96,6 +96,8 @@ if ( get_settings('active_plugins') ) {
}
}
define('TEMPLATEPATH', get_template_directory());
function shutdown_action_hook() {
do_action('shutdown', '');
}

View File

@ -1,8 +1,8 @@
<?php
// If a sidebar.php file exists in the WP root directory we
// use that, otherwise use this default wp-sidebar.php file.
if ( file_exists(ABSPATH . '/sidebar.php') ) :
include_once(ABSPATH . '/sidebar.php');
if ( file_exists(TEMPLATEPATH . '/sidebar.php') ) :
include_once(TEMPLATEPATH . '/sidebar.php');
else :
?>