Changeset 18665
- Timestamp:
- 09/13/2011 04:17:14 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/general-template.php
r18519 r18665 25 25 do_action( 'get_header', $name ); 26 26 27 $templates = array();28 if ( isset($name) )29 $templates[] = "header-{$name}.php";30 31 $templates[] = 'header.php';32 33 27 // Backward compat code will be removed in a future release 34 if ( '' == locate_template($templates, true))35 load_template( ABSPATH . WPINC . '/theme-compat/header.php' );28 if ( '' == get_template_part( 'header', $name ) ) 29 load_template( ABSPATH . WPINC . '/theme-compat/header.php' ); 36 30 } 37 31 … … 54 48 do_action( 'get_footer', $name ); 55 49 56 $templates = array();57 if ( isset($name) )58 $templates[] = "footer-{$name}.php";59 60 $templates[] = 'footer.php';61 62 50 // Backward compat code will be removed in a future release 63 if ( '' == locate_template($templates, true))64 load_template( ABSPATH . WPINC . '/theme-compat/footer.php' );51 if ( '' == get_template_part( 'footer', $name ) ) 52 load_template( ABSPATH . WPINC . '/theme-compat/footer.php' ); 65 53 } 66 54 … … 83 71 do_action( 'get_sidebar', $name ); 84 72 85 $templates = array();86 if ( isset($name) )87 $templates[] = "sidebar-{$name}.php";88 89 $templates[] = 'sidebar.php';90 91 73 // Backward compat code will be removed in a future release 92 if ( '' == locate_template($templates, true))93 load_template( ABSPATH . WPINC . '/theme-compat/sidebar.php' );74 if ( '' == get_template_part( 'sidebar', $name ) ) 75 load_template( ABSPATH . WPINC . '/theme-compat/sidebar.php' ); 94 76 } 95 77 … … 126 108 $templates[] = "{$slug}.php"; 127 109 128 locate_template($templates, true, false);110 return locate_template($templates, true, false); 129 111 } 130 112
Note: See TracChangeset
for help on using the changeset viewer.