Make WordPress Core


Ignore:
Timestamp:
09/23/2019 11:16:59 PM (7 years ago)
Author:
SergeyBiryukov
Message:

Twenty Twenty: Rename widget areas to sidebar-1 and sidebar-2.

This ensures that widgets are mapped correctly and is consistent with the previous default themes.

See https://github.com/WordPress/twentytwenty/issues/481.

Reverts [46282].

Props ocean90, garrett-eclipse, desrosj, SergeyBiryukov.
See #48110.

Location:
trunk/src/wp-content/themes/twentytwenty
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-content/themes/twentytwenty/footer.php

    r46271 r46283  
    9090
    9191
    92                 <?php if ( is_active_sidebar( 'footer-one' ) || is_active_sidebar( 'footer-two' ) ) { ?>
     92                <?php if ( is_active_sidebar( 'sidebar-1' ) || is_active_sidebar( 'sidebar-2' ) ) { ?>
    9393
    9494                    <div class="footer-widgets-outer-wrapper">
     
    9696                        <div class="footer-widgets-wrapper">
    9797
    98                             <?php if ( is_active_sidebar( 'footer-one' ) ) { ?>
     98                            <?php if ( is_active_sidebar( 'sidebar-1' ) ) { ?>
    9999
    100100                                <div class="footer-widgets column-one grid-item">
    101                                     <?php dynamic_sidebar( 'footer-one' ); ?>
     101                                    <?php dynamic_sidebar( 'sidebar-1' ); ?>
    102102                                </div>
    103103
    104104                            <?php } ?>
    105105
    106                             <?php if ( is_active_sidebar( 'footer-two' ) ) { ?>
     106                            <?php if ( is_active_sidebar( 'sidebar-2' ) ) { ?>
    107107
    108108                                <div class="footer-widgets column-two grid-item">
    109                                     <?php dynamic_sidebar( 'footer-two' ); ?>
     109                                    <?php dynamic_sidebar( 'sidebar-2' ); ?>
    110110                                </div>
    111111
  • trunk/src/wp-content/themes/twentytwenty/functions.php

    r46271 r46283  
    335335                array(
    336336                    'name'        => __( 'Footer #1', 'twentytwenty' ),
    337                     'id'          => 'footer-one',
     337                    'id'          => 'sidebar-1',
    338338                    'description' => __( 'Widgets in this area will be displayed in the first column in the footer.', 'twentytwenty' ),
    339339                )
     
    347347                array(
    348348                    'name'        => __( 'Footer #2', 'twentytwenty' ),
    349                     'id'          => 'footer-two',
     349                    'id'          => 'sidebar-2',
    350350                    'description' => __( 'Widgets in this area will be displayed in the second column in the footer.', 'twentytwenty' ),
    351351                )
  • trunk/src/wp-content/themes/twentytwenty/inc/starter-content.php

    r46271 r46283  
    2424        'widgets'   => array(
    2525            // Place one core-defined widgets in the first tooter widget area.
    26             'footer-one' => array(
     26            'sidebar-1' => array(
    2727                'text_about',
    2828            ),
    2929            // Place one core-defined widgets in the second tooter widget area.
    30             'footer-two' => array(
     30            'sidebar-2' => array(
    3131                'text_business_info',
    3232            ),
Note: See TracChangeset for help on using the changeset viewer.