web/wp-content/themes/twentyten/sidebar.php
changeset 194 32102edaa81b
equal deleted inserted replaced
193:2f6f6f7551ca 194:32102edaa81b
       
     1 <?php
       
     2 /**
       
     3  * The Sidebar containing the primary and secondary widget areas.
       
     4  *
       
     5  * @package WordPress
       
     6  * @subpackage Twenty_Ten
       
     7  * @since Twenty Ten 1.0
       
     8  */
       
     9 ?>
       
    10 
       
    11 		<div id="primary" class="widget-area" role="complementary">
       
    12 			<ul class="xoxo">
       
    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 
       
    22 			<li id="search" class="widget-container widget_search">
       
    23 				<?php get_search_form(); ?>
       
    24 			</li>
       
    25 
       
    26 			<li id="archives" class="widget-container">
       
    27 				<h3 class="widget-title"><?php _e( 'Archives', 'twentyten' ); ?></h3>
       
    28 				<ul>
       
    29 					<?php wp_get_archives( 'type=monthly' ); ?>
       
    30 				</ul>
       
    31 			</li>
       
    32 
       
    33 			<li id="meta" class="widget-container">
       
    34 				<h3 class="widget-title"><?php _e( 'Meta', 'twentyten' ); ?></h3>
       
    35 				<ul>
       
    36 					<?php wp_register(); ?>
       
    37 					<li><?php wp_loginout(); ?></li>
       
    38 					<?php wp_meta(); ?>
       
    39 				</ul>
       
    40 			</li>
       
    41 
       
    42 		<?php endif; // end primary widget area ?>
       
    43 			</ul>
       
    44 		</div><!-- #primary .widget-area -->
       
    45 
       
    46 <?php
       
    47 	// A second sidebar for widgets, just because.
       
    48 	if ( is_active_sidebar( 'secondary-widget-area' ) ) : ?>
       
    49 
       
    50 		<div id="secondary" class="widget-area" role="complementary">
       
    51 			<ul class="xoxo">
       
    52 				<?php dynamic_sidebar( 'secondary-widget-area' ); ?>
       
    53 			</ul>
       
    54 		</div><!-- #secondary .widget-area -->
       
    55 
       
    56 <?php endif; ?>