Changeset 8673
- Timestamp:
- 08/19/2008 08:57:48 PM (18 years ago)
- File:
-
- 1 edited
-
trunk/wp-includes/general-template.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/general-template.php
r8624 r8673 3 3 /* Note: these tags go anywhere in the template */ 4 4 5 function get_header( ) {5 function get_header( $name = null ) { 6 6 do_action( 'get_header' ); 7 if ('' == locate_template(array('header.php'), true)) 7 8 $templates = array(); 9 if ( isset($name) ) 10 $templates[] = "header-{$name}.php"; 11 12 $templates[] = "header.php"; 13 14 if ('' == locate_template($templates, true)) 8 15 load_template( get_theme_root() . '/default/header.php'); 9 16 } 10 17 11 18 12 function get_footer( ) {19 function get_footer( $name = null ) { 13 20 do_action( 'get_footer' ); 14 if ('' == locate_template(array('footer.php'), true)) 21 22 $templates = array(); 23 if ( isset($name) ) 24 $templates[] = "footer-{$name}.php"; 25 26 $templates[] = "footer.php"; 27 28 if ('' == locate_template($templates, true)) 15 29 load_template( get_theme_root() . '/default/footer.php'); 16 30 } … … 19 33 function get_sidebar( $name = null ) { 20 34 do_action( 'get_sidebar' ); 21 35 22 36 $templates = array(); 23 37 if ( isset($name) ) 24 38 $templates[] = "sidebar-{$name}.php"; 25 39 26 40 $templates[] = "sidebar.php"; 27 41 28 42 if ('' == locate_template($templates, true)) 29 43 load_template( get_theme_root() . '/default/sidebar.php');
Note: See TracChangeset
for help on using the changeset viewer.