Make WordPress Core

Ticket #7549: 7549.26branch.diff

File 7549.26branch.diff, 1.8 KB (added by AaronCampbell, 18 years ago)

Patch for 2.6 Branch

  • branches/2.6/wp-includes/general-template.php

     
    22
    33/* Note: these tags go anywhere in the template */
    44
    5 function get_header() {
     5function get_header( $name = null ) {
    66        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') )
    810                load_template( TEMPLATEPATH . '/header.php');
    911        else
    1012                load_template( WP_CONTENT_DIR . '/themes/default/header.php');
    1113}
    1214
    1315
    14 function get_footer() {
     16function get_footer( $name = null ) {
    1517        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') )
    1721                load_template( TEMPLATEPATH . '/footer.php');
    1822        else
    1923                load_template( WP_CONTENT_DIR . '/themes/default/footer.php');
     
    365369                $link_html = "\t$before<a href='$url' title='$title_text'>$text</a>$after\n";
    366370
    367371        $link_html = apply_filters( "get_archives_link", $link_html );
    368                
     372
    369373        return $link_html;
    370374}
    371375
     
    11891193}
    11901194
    11911195/**
    1192  * Enqueues the default ThickBox js and css. 
     1196 * Enqueues the default ThickBox js and css.
    11931197 * If any of the settings need to be changed, this can be done with another js file
    11941198 * 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.
    11961200 */
    11971201function add_thickbox() {
    11981202        wp_enqueue_script( 'thickbox' );