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

git-svn-id: https://develop.svn.wordpress.org/trunk@1922 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2004-12-08 21:51:25 +00:00
parent f7d12dbbee
commit 6a2e9a95c1
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 :
?>