Ticket #7549: 7549.trunk.diff
| File 7549.trunk.diff, 1.4 KB (added by , 18 years ago) |
|---|
-
trunk/wp-includes/general-template.php
2 2 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 } 17 31 18 32 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'); 30 44 }