Ticket #21685: 21685-sidebars.diff
| File 21685-sidebars.diff, 3.0 KB (added by , 14 years ago) |
|---|
-
wp-content/themes/twentytwelve/functions.php
368 368 function twentytwelve_body_class( $classes ) { 369 369 $background_color = get_background_color(); 370 370 371 if ( ! is_active_sidebar( 'sidebar-1') || is_page_template( 'full-width-page.php' ) )371 if ( ! is_active_sidebar( 1 ) || is_page_template( 'full-width-page.php' ) ) 372 372 $classes[] = 'full-width'; 373 373 374 374 if ( is_page_template( 'homepage.php' ) && has_post_thumbnail() ) … … 390 390 * @since Twenty Twelve 1.0 391 391 */ 392 392 function twentytwelve_content_width() { 393 if ( is_page_template( 'full-width-page.php' ) || is_attachment() || ! is_active_sidebar( 'sidebar-1') ) {393 if ( is_page_template( 'full-width-page.php' ) || is_attachment() || ! is_active_sidebar( 1 ) ) { 394 394 global $content_width; 395 395 $content_width = 960; 396 396 } -
wp-content/themes/twentytwelve/sidebar.php
8 8 * @subpackage Twenty_Twelve 9 9 * @since Twenty Twelve 1.0 10 10 */ 11 ?>12 11 13 <?php if ( is_active_sidebar( 'sidebar-1' ) ) : ?> 14 <div id="secondary" class="widget-area" role="complementary"> 15 <?php dynamic_sidebar( 'sidebar-1' ); ?> 16 </div><!-- #secondary .widget-area --> 17 <?php endif; ?> 18 No newline at end of file 12 if ( is_active_sidebar( 1 ) ) : ?> 13 <div id="secondary" class="widget-area" role="complementary"> 14 <?php dynamic_sidebar( 1 ); ?> 15 </div><!-- #secondary .widget-area --> 16 <?php endif; ?> -
wp-content/themes/twentytwelve/sidebar-home.php
10 10 */ 11 11 12 12 /* 13 The homepage widget area is triggered if any of the areas14 have widgets. So let's check that first.15 16 If none of the sidebars have widgets, then let's bail early.17 */13 * The homepage 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 18 if ( ! is_active_sidebar( 2 ) && ! is_active_sidebar( 3 ) ) 19 19 return; 20 20 … … 23 23 <div id="secondary" <?php twentytwelve_homepage_sidebar_class(); ?> role="complementary"> 24 24 <?php if ( is_active_sidebar( 2 ) ) : ?> 25 25 <div class="first home-widgets"> 26 <?php dynamic_sidebar( 'sidebar-2'); ?>26 <?php dynamic_sidebar( 2 ); ?> 27 27 </div><!-- .first .home-widgets --> 28 28 <?php endif; ?> 29 29 30 30 <?php if ( is_active_sidebar( 3 ) ) : ?> 31 31 <div class="second home-widgets"> 32 <?php dynamic_sidebar( 'sidebar-3'); ?>32 <?php dynamic_sidebar( 3 ); ?> 33 33 </div><!-- .second .home-widgets --> 34 34 <?php endif; ?> 35 35 </div><!-- #secondary .widget-area --> 36 No newline at end of file