Twenty Twelve: consistently call sidebar areas with just the ID value, props obenland. See #21685.
git-svn-id: https://develop.svn.wordpress.org/trunk@21620 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
05160bb1dc
commit
762134e6f6
@ -372,7 +372,7 @@ endif;
|
|||||||
function twentytwelve_body_class( $classes ) {
|
function twentytwelve_body_class( $classes ) {
|
||||||
$background_color = get_background_color();
|
$background_color = get_background_color();
|
||||||
|
|
||||||
if ( ! is_active_sidebar( 'sidebar-1' ) || is_page_template( 'full-width-page.php' ) )
|
if ( ! is_active_sidebar( 1 ) || is_page_template( 'full-width-page.php' ) )
|
||||||
$classes[] = 'full-width';
|
$classes[] = 'full-width';
|
||||||
|
|
||||||
if ( is_page_template( 'homepage.php' ) && has_post_thumbnail() )
|
if ( is_page_template( 'homepage.php' ) && has_post_thumbnail() )
|
||||||
@ -394,7 +394,7 @@ add_filter( 'body_class', 'twentytwelve_body_class' );
|
|||||||
* @since Twenty Twelve 1.0
|
* @since Twenty Twelve 1.0
|
||||||
*/
|
*/
|
||||||
function twentytwelve_content_width() {
|
function twentytwelve_content_width() {
|
||||||
if ( is_page_template( 'full-width-page.php' ) || is_attachment() || ! is_active_sidebar( 'sidebar-1' ) ) {
|
if ( is_page_template( 'full-width-page.php' ) || is_attachment() || ! is_active_sidebar( 1 ) ) {
|
||||||
global $content_width;
|
global $content_width;
|
||||||
$content_width = 960;
|
$content_width = 960;
|
||||||
}
|
}
|
||||||
|
@ -23,13 +23,13 @@ if ( ! is_active_sidebar( 2 ) && ! is_active_sidebar( 3 ) )
|
|||||||
<div id="secondary" <?php twentytwelve_homepage_sidebar_class(); ?> role="complementary">
|
<div id="secondary" <?php twentytwelve_homepage_sidebar_class(); ?> role="complementary">
|
||||||
<?php if ( is_active_sidebar( 2 ) ) : ?>
|
<?php if ( is_active_sidebar( 2 ) ) : ?>
|
||||||
<div class="first home-widgets">
|
<div class="first home-widgets">
|
||||||
<?php dynamic_sidebar( 'sidebar-2' ); ?>
|
<?php dynamic_sidebar( 2 ); ?>
|
||||||
</div><!-- .first -->
|
</div><!-- .first -->
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
<?php if ( is_active_sidebar( 3 ) ) : ?>
|
<?php if ( is_active_sidebar( 3 ) ) : ?>
|
||||||
<div class="second home-widgets">
|
<div class="second home-widgets">
|
||||||
<?php dynamic_sidebar( 'sidebar-3' ); ?>
|
<?php dynamic_sidebar( 3 ); ?>
|
||||||
</div><!-- .second -->
|
</div><!-- .second -->
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</div><!-- #secondary -->
|
</div><!-- #secondary -->
|
@ -10,8 +10,8 @@
|
|||||||
*/
|
*/
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<?php if ( is_active_sidebar( 'sidebar-1' ) ) : ?>
|
<?php if ( is_active_sidebar( 1 ) ) : ?>
|
||||||
<div id="secondary" class="widget-area" role="complementary">
|
<div id="secondary" class="widget-area" role="complementary">
|
||||||
<?php dynamic_sidebar( 'sidebar-1' ); ?>
|
<?php dynamic_sidebar( 1 ); ?>
|
||||||
</div><!-- #secondary -->
|
</div><!-- #secondary -->
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
Loading…
Reference in New Issue
Block a user