1. <?php
  2. /**
  3.  * The Sidebar containing the main widget areas.
  4.  *
  5.  * @package Spun
  6.  * @since Spun 1.0
  7.  */
  8. ?>
  9.         <?php if ( is_active_sidebar( 'sidebar-1' )
  10.                 || is_active_sidebar( 'sidebar-2' )
  11.                 || is_active_sidebar( 'sidebar-3' ) ) : ?>
  12.             <span class="sidebar-link">
  13.                 <?php echo _x( '<span>Add a comment</span>', 'Open sidebar', 'spun' ); ?>
  14.             </span>
  15.         <?php endif; ?>
  16.         <div id="secondary" class="widget-area" role="complementary">
  17.  
  18.             <?php if ( is_active_sidebar( 'sidebar-1' ) ) : ?>
  19.                 <?php do_action( 'before_sidebar' ); ?>
  20.                 <div class="widget-column <?php spun_count_sidebars(); ?>">
  21.                     <?php if ( ! dynamic_sidebar( 'sidebar-1' ) ) : ?>
  22.                     <?php endif; // end sidebar widget area ?>
  23.                 </div>
  24.             <?php endif; ?>
  25.             <?php if ( is_active_sidebar( 'sidebar-2' ) ) : ?>
  26.                 <?php do_action( 'before_sidebar' ); ?>
  27.                 <div class="widget-column <?php spun_count_sidebars(); ?>">
  28.                     <?php if ( ! dynamic_sidebar( 'sidebar-2' ) ) : ?>
  29.                     <?php endif; // end sidebar widget area ?>
  30.                 </div>
  31.             <?php endif; ?>
  32.             <?php if ( is_active_sidebar( 'sidebar-3' ) ) : ?>
  33.                 <?php do_action( 'before_sidebar' ); ?>
  34.                 <div class="widget-column <?php spun_count_sidebars(); ?>">
  35.                     <?php if ( ! dynamic_sidebar( 'sidebar-3' ) ) : ?>
  36.                     <?php endif; // end sidebar widget area ?>
  37.                 </div>
  38.             <?php endif; ?>
  39.  
  40.         </div><!-- #secondary .widget-area -->