Ticket #7549: 7549.26branch.diff
| File 7549.26branch.diff, 1.8 KB (added by , 18 years ago) |
|---|
-
branches/2.6/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 ( file_exists( TEMPLATEPATH . '/header.php') ) 7 if ( isset($name) && file_exists( TEMPLATEPATH . "/header-{$name}.php") ) 8 load_template( TEMPLATEPATH . "/header-{$name}.php"); 9 elseif ( file_exists( TEMPLATEPATH . '/header.php') ) 8 10 load_template( TEMPLATEPATH . '/header.php'); 9 11 else 10 12 load_template( WP_CONTENT_DIR . '/themes/default/header.php'); 11 13 } 12 14 13 15 14 function get_footer( ) {16 function get_footer( $name = null ) { 15 17 do_action( 'get_footer' ); 16 if ( file_exists( TEMPLATEPATH . '/footer.php') ) 18 if ( isset($name) && file_exists( TEMPLATEPATH . "/footer-{$name}.php") ) 19 load_template( TEMPLATEPATH . "/footer-{$name}.php"); 20 elseif ( file_exists( TEMPLATEPATH . '/footer.php') ) 17 21 load_template( TEMPLATEPATH . '/footer.php'); 18 22 else 19 23 load_template( WP_CONTENT_DIR . '/themes/default/footer.php'); … … 365 369 $link_html = "\t$before<a href='$url' title='$title_text'>$text</a>$after\n"; 366 370 367 371 $link_html = apply_filters( "get_archives_link", $link_html ); 368 372 369 373 return $link_html; 370 374 } 371 375 … … 1189 1193 } 1190 1194 1191 1195 /** 1192 * Enqueues the default ThickBox js and css. 1196 * Enqueues the default ThickBox js and css. 1193 1197 * If any of the settings need to be changed, this can be done with another js file 1194 1198 * similar to media-upload.js and theme-preview.js. That file should require array('thickbox') 1195 * to ensure it is loaded after. 1199 * to ensure it is loaded after. 1196 1200 */ 1197 1201 function add_thickbox() { 1198 1202 wp_enqueue_script( 'thickbox' );