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.
Built from https://develop.svn.wordpress.org/trunk@46283


git-svn-id: http://core.svn.wordpress.org/trunk@46095 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2019-09-23 23:17:58 +00:00
parent aaa3db74d8
commit 75ca249558
5 changed files with 12 additions and 12 deletions

View File

@ -446,12 +446,12 @@ Commenter avatars come from <a href="https://gravatar.com">Gravatar</a>.'
'sidebars_widgets', 'sidebars_widgets',
array( array(
'wp_inactive_widgets' => array(), 'wp_inactive_widgets' => array(),
'footer-one' => array( 'sidebar-1' => array(
0 => 'search-2', 0 => 'search-2',
1 => 'recent-posts-2', 1 => 'recent-posts-2',
2 => 'recent-comments-2', 2 => 'recent-comments-2',
), ),
'footer-two' => array( 'sidebar-2' => array(
0 => 'archives-2', 0 => 'archives-2',
1 => 'categories-2', 1 => 'categories-2',
2 => 'meta-2', 2 => 'meta-2',

View File

@ -89,24 +89,24 @@
<?php } ?> <?php } ?>
<?php if ( is_active_sidebar( 'footer-one' ) || is_active_sidebar( 'footer-two' ) ) { ?> <?php if ( is_active_sidebar( 'sidebar-1' ) || is_active_sidebar( 'sidebar-2' ) ) { ?>
<div class="footer-widgets-outer-wrapper"> <div class="footer-widgets-outer-wrapper">
<div class="footer-widgets-wrapper"> <div class="footer-widgets-wrapper">
<?php if ( is_active_sidebar( 'footer-one' ) ) { ?> <?php if ( is_active_sidebar( 'sidebar-1' ) ) { ?>
<div class="footer-widgets column-one grid-item"> <div class="footer-widgets column-one grid-item">
<?php dynamic_sidebar( 'footer-one' ); ?> <?php dynamic_sidebar( 'sidebar-1' ); ?>
</div> </div>
<?php } ?> <?php } ?>
<?php if ( is_active_sidebar( 'footer-two' ) ) { ?> <?php if ( is_active_sidebar( 'sidebar-2' ) ) { ?>
<div class="footer-widgets column-two grid-item"> <div class="footer-widgets column-two grid-item">
<?php dynamic_sidebar( 'footer-two' ); ?> <?php dynamic_sidebar( 'sidebar-2' ); ?>
</div> </div>
<?php } ?> <?php } ?>

View File

@ -334,7 +334,7 @@ if ( ! function_exists( 'twentytwenty_sidebar_registration' ) ) {
$shared_args, $shared_args,
array( array(
'name' => __( 'Footer #1', 'twentytwenty' ), 'name' => __( 'Footer #1', 'twentytwenty' ),
'id' => 'footer-one', 'id' => 'sidebar-1',
'description' => __( 'Widgets in this area will be displayed in the first column in the footer.', 'twentytwenty' ), 'description' => __( 'Widgets in this area will be displayed in the first column in the footer.', 'twentytwenty' ),
) )
) )
@ -346,7 +346,7 @@ if ( ! function_exists( 'twentytwenty_sidebar_registration' ) ) {
$shared_args, $shared_args,
array( array(
'name' => __( 'Footer #2', 'twentytwenty' ), 'name' => __( 'Footer #2', 'twentytwenty' ),
'id' => 'footer-two', 'id' => 'sidebar-2',
'description' => __( 'Widgets in this area will be displayed in the second column in the footer.', 'twentytwenty' ), 'description' => __( 'Widgets in this area will be displayed in the second column in the footer.', 'twentytwenty' ),
) )
) )

View File

@ -23,11 +23,11 @@ function twentytwenty_get_starter_content() {
$starter_content = array( $starter_content = array(
'widgets' => array( 'widgets' => array(
// Place one core-defined widgets in the first tooter widget area. // Place one core-defined widgets in the first tooter widget area.
'footer-one' => array( 'sidebar-1' => array(
'text_about', 'text_about',
), ),
// Place one core-defined widgets in the second tooter widget area. // Place one core-defined widgets in the second tooter widget area.
'footer-two' => array( 'sidebar-2' => array(
'text_business_info', 'text_business_info',
), ),
), ),

View File

@ -13,7 +13,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '5.3-alpha-46282'; $wp_version = '5.3-alpha-46283';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.