Make WordPress Core

Ticket #23644: 23644.4.diff

File 23644.4.diff, 5.7 KB (added by lancewillett, 11 years ago)

Fix layout with correct body_class check

  • wp-content/themes/twentythirteen/sidebar-main.php

     
     1<?php
     2/**
     3 * The sidebar containing the footer widget area.
     4 *
     5 * If no active widgets in this sidebar, it will be hidden completely.
     6 *
     7 * @package WordPress
     8 * @subpackage Twenty_Thirteen
     9 * @since Twenty Thirteen 1.0
     10 */
     11
     12if ( is_active_sidebar( 'sidebar-1' ) ) : ?>
     13        <div id="secondary" class="sidebar-container" role="complementary">
     14                <div class="widget-area">
     15                        <?php dynamic_sidebar( 'sidebar-1' ); ?>
     16                </div>
     17        </div><!-- #secondary -->
     18<?php endif; ?>
     19 No newline at end of file
  • wp-content/themes/twentythirteen/footer.php

    Property changes on: wp-content/themes/twentythirteen/sidebar-main.php
    ___________________________________________________________________
    Added: svn:eol-style
       + native
    
     
    1313
    1414                </div><!-- #main -->
    1515                <footer id="colophon" class="site-footer" role="contentinfo">
    16                         <?php get_sidebar( 'footer' ); ?>
     16                        <?php get_sidebar( 'main' ); ?>
    1717
    1818                        <div class="site-info">
    1919                                <?php do_action( 'twentythirteen_credits' ); ?>
  • wp-content/themes/twentythirteen/js/functions.js

     
    9292        if ( $.isFunction( $.fn.masonry ) ) {
    9393                var columnWidth = $( 'body' ).is( '.sidebar' ) ? 228 : 245;
    9494
    95                 $( '#tertiary .widget-area' ).masonry( {
     95                $( '#secondary .widget-area' ).masonry( {
    9696                        itemSelector: '.widget',
    9797                        columnWidth:  columnWidth,
    9898                        gutterWidth:  20
  • wp-content/themes/twentythirteen/sidebar-footer.php

     
    1 <?php
    2 /**
    3  * The sidebar containing the footer widget area.
    4  *
    5  * If no active widgets in this sidebar, it will be hidden completely.
    6  *
    7  * @package WordPress
    8  * @subpackage Twenty_Thirteen
    9  * @since Twenty Thirteen 1.0
    10  */
    11 
    12 if ( is_active_sidebar( 'sidebar-2' ) ) : ?>
    13         <div id="tertiary" class="sidebar-container" role="complementary">
    14                 <div class="widget-area">
    15                         <?php dynamic_sidebar( 'sidebar-2' ); ?>
    16                 </div>
    17         </div><!-- #tertiary -->
    18 <?php endif; ?>
    19  No newline at end of file
  • wp-content/themes/twentythirteen/functions.php

     
    169169                wp_enqueue_script( 'comment-reply' );
    170170
    171171        // Adds Masonry to handle vertical alignment of footer widgets.
    172         if ( is_active_sidebar( 'sidebar-2' ) )
     172        if ( is_active_sidebar( 'sidebar-1' ) )
    173173                wp_enqueue_script( 'jquery-masonry' );
    174174
    175175        // Loads JavaScript file with functionality specific to Twenty Thirteen.
     
    225225 */
    226226function twentythirteen_widgets_init() {
    227227        register_sidebar( array(
    228                 'name'          => __( 'Sidebar', 'twentythirteen' ),
     228                'name'          => __( 'Main Widget Area', 'twentythirteen' ),
    229229                'id'            => 'sidebar-1',
    230                 'description'   => __( 'Appears on posts and pages', 'twentythirteen' ),
     230                'description'   => __( 'Appears in the footer section of the site', 'twentythirteen' ),
    231231                'before_widget' => '<aside id="%1$s" class="widget %2$s">',
    232232                'after_widget'  => '</aside>',
    233233                'before_title'  => '<h3 class="widget-title">',
     
    235235        ) );
    236236
    237237        register_sidebar( array(
    238                 'name'          => __( 'Footer Widget Area', 'twentythirteen' ),
     238                'name'          => __( 'Secondary Widget Area', 'twentythirteen' ),
    239239                'id'            => 'sidebar-2',
    240                 'description'   => __( 'Appears in the footer section of the site', 'twentythirteen' ),
     240                'description'   => __( 'Appears on posts and pages', 'twentythirteen' ),
    241241                'before_widget' => '<aside id="%1$s" class="widget %2$s">',
    242242                'after_widget'  => '</aside>',
    243243                'before_title'  => '<h3 class="widget-title">',
     
    505505        if ( ! is_multi_author() )
    506506                $classes[] = 'single-author';
    507507
    508         if ( is_active_sidebar( 'sidebar-1' ) && ! is_attachment() && ! is_404() )
     508        if ( is_active_sidebar( 'sidebar-2' ) && ! is_attachment() && ! is_404() )
    509509                $classes[] = 'sidebar';
    510510
    511511        return $classes;
  • wp-content/themes/twentythirteen/sidebar.php

     
    11<?php
    22/**
    3  * The sidebar containing the main widget area.
     3 * The sidebar containing the secondary widget area, displays on posts and pages.
    44 *
    55 * If no active widgets in this sidebar, it will be hidden completely.
    66 *
     
    99 * @since Twenty Thirteen 1.0
    1010 */
    1111
    12 if ( is_active_sidebar( 'sidebar-1' ) ) : ?>
    13         <div id="secondary" class="sidebar-container" role="complementary">
     12if ( is_active_sidebar( 'sidebar-2' ) ) : ?>
     13        <div id="tertiary" class="sidebar-container" role="complementary">
    1414                <div class="sidebar-inner">
    1515                        <div class="widget-area">
    16                                 <?php dynamic_sidebar( 'sidebar-1' ); ?>
     16                                <?php dynamic_sidebar( 'sidebar-2' ); ?>
    1717                        </div>
    1818                </div>
    19         </div><!-- #secondary -->
     19        </div><!-- #tertiary -->
    2020<?php endif; ?>
     21 No newline at end of file