Changeset 8624 for trunk/wp-includes/general-template.php
- Timestamp:
- 08/12/2008 08:18:05 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/general-template.php
r8600 r8624 5 5 function get_header() { 6 6 do_action( 'get_header' ); 7 if ( file_exists( STYLESHEETPATH . '/header.php') ) 8 load_template( STYLESHEETPATH . '/header.php'); 9 elseif ( file_exists( TEMPLATEPATH . '/header.php') ) 10 load_template( TEMPLATEPATH . '/header.php'); 11 else 7 if ('' == locate_template(array('header.php'), true)) 12 8 load_template( get_theme_root() . '/default/header.php'); 13 9 } … … 16 12 function get_footer() { 17 13 do_action( 'get_footer' ); 18 if ( file_exists( STYLESHEETPATH . '/footer.php') ) 19 load_template( STYLESHEETPATH . '/footer.php'); 20 elseif ( file_exists( TEMPLATEPATH . '/footer.php') ) 21 load_template( TEMPLATEPATH . '/footer.php'); 22 else 14 if ('' == locate_template(array('footer.php'), true)) 23 15 load_template( get_theme_root() . '/default/footer.php'); 24 16 } … … 27 19 function get_sidebar( $name = null ) { 28 20 do_action( 'get_sidebar' ); 29 if ( isset($name) && file_exists( STYLESHEETPATH . "/sidebar-{$name}.php") ) 30 load_template( STYLESHEETPATH . "/sidebar-{$name}.php"); 31 elseif ( isset($name) && file_exists( TEMPLATEPATH . "/sidebar-{$name}.php") ) 32 load_template( TEMPLATEPATH . "/sidebar-{$name}.php"); 33 elseif ( file_exists( STYLESHEETPATH . '/sidebar.php') ) 34 load_template( STYLESHEETPATH . '/sidebar.php'); 35 elseif ( file_exists( TEMPLATEPATH . '/sidebar.php') ) 36 load_template( TEMPLATEPATH . '/sidebar.php'); 37 else 21 22 $templates = array(); 23 if ( isset($name) ) 24 $templates[] = "sidebar-{$name}.php"; 25 26 $templates[] = "sidebar.php"; 27 28 if ('' == locate_template($templates, true)) 38 29 load_template( get_theme_root() . '/default/sidebar.php'); 39 30 }
Note: See TracChangeset
for help on using the changeset viewer.