~canonical-sysadmins/wordpress/4.7.4

« back to all changes in this revision

Viewing changes to wp-content/themes/twentytwelve/sidebar-front.php

  • Committer: Jacek Nykis
  • Date: 2015-01-05 16:17:05 UTC
  • Revision ID: jacek.nykis@canonical.com-20150105161705-w544l1h5mcg7u4w9
Initial commit

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?php
 
2
/**
 
3
 * The sidebar containing the front page widget areas
 
4
 *
 
5
 * If no active widgets are in either sidebar, hide them completely.
 
6
 *
 
7
 * @package WordPress
 
8
 * @subpackage Twenty_Twelve
 
9
 * @since Twenty Twelve 1.0
 
10
 */
 
11
 
 
12
/*
 
13
 * The front page widget area is triggered if any of the areas
 
14
 * have widgets. So let's check that first.
 
15
 *
 
16
 * If none of the sidebars have widgets, then let's bail early.
 
17
 */
 
18
if ( ! is_active_sidebar( 'sidebar-2' ) && ! is_active_sidebar( 'sidebar-3' ) )
 
19
        return;
 
20
 
 
21
// If we get this far, we have widgets. Let do this.
 
22
?>
 
23
<div id="secondary" class="widget-area" role="complementary">
 
24
        <?php if ( is_active_sidebar( 'sidebar-2' ) ) : ?>
 
25
        <div class="first front-widgets">
 
26
                <?php dynamic_sidebar( 'sidebar-2' ); ?>
 
27
        </div><!-- .first -->
 
28
        <?php endif; ?>
 
29
 
 
30
        <?php if ( is_active_sidebar( 'sidebar-3' ) ) : ?>
 
31
        <div class="second front-widgets">
 
32
                <?php dynamic_sidebar( 'sidebar-3' ); ?>
 
33
        </div><!-- .second -->
 
34
        <?php endif; ?>
 
35
</div><!-- #secondary -->
 
 
b'\\ No newline at end of file'