Make WordPress Core


Ignore:
Timestamp:
05/17/2010 06:36:11 AM (15 years ago)
Author:
nacin
Message:

In Twenty Ten, documentation and code improvements. see #12695.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-content/themes/twentyten/sidebar.php

    r14707 r14708  
    55 * @package WordPress
    66 * @subpackage Twenty_Ten
    7  * @since 3.0.0
     7 * @since Twenty Ten 1.0
    88 */
    99?>
     
    1111        <div id="primary" class="widget-area" role="complementary">
    1212            <ul class="xoxo">
    13 <?php if ( ! dynamic_sidebar( 'primary-widget-area' ) ) : // begin primary widget area ?>
     13
     14<?php
     15    /* When we call the dynamic_sidebar() function, it'll spit out
     16     * the widgets for that widget area. If it instead returns false,
     17     * then the sidebar simply doesn't exist, so we'll hard-code in
     18     * some default sidebar stuff just in case.
     19     */
     20    if ( ! dynamic_sidebar( 'primary-widget-area' ) ) : ?>
     21   
    1422            <li id="search" class="widget-container widget_search">
    1523                <?php get_search_form(); ?>
     
    3139                </ul>
    3240            </li>
    33 <?php endif; // end primary widget area ?>
     41
     42        <?php endif; // end primary widget area ?>
    3443            </ul>
    3544        </div><!-- #primary .widget-area -->
    3645
    37 <?php if ( is_active_sidebar( 'secondary-widget-area' ) ) : // Nothing here by default and design ?>
     46<?php
     47    // A second sidebar for widgets, just because.
     48    if ( is_active_sidebar( 'secondary-widget-area' ) ) : ?>
     49
    3850        <div id="secondary" class="widget-area" role="complementary">
    3951            <ul class="xoxo">
     
    4153            </ul>
    4254        </div><!-- #secondary .widget-area -->
     55
    4356<?php endif; ?>
Note: See TracChangeset for help on using the changeset viewer.