WordPress.org

Make WordPress Core

Changeset 6609


Ignore:
Timestamp:
01/14/2008 04:51:29 AM (14 years ago)
Author:
ryan
Message:

Get named sidebars. Props AaronCampbell. fixes #5615

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/general-template.php

    r6601 r6609  
    2121
    2222
    23 function get_sidebar() {
     23function get_sidebar( $name = null ) {
    2424    do_action( 'get_sidebar' );
    25     if ( file_exists( TEMPLATEPATH . '/sidebar.php') )
     25    if ( isset($name) && file_exists( TEMPLATEPATH . "/sidebar-{$name}.php") )
     26        load_template( TEMPLATEPATH . "/sidebar-{$name}.php");
     27    elseif ( file_exists( TEMPLATEPATH . '/sidebar.php') )
    2628        load_template( TEMPLATEPATH . '/sidebar.php');
    2729    else
Note: See TracChangeset for help on using the changeset viewer.