WordPress.org

Make WordPress Core


Ignore:
Timestamp:
09/23/2019 11:16:59 PM (11 months 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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/customize/manager.php

    r46282 r46283  
    17781778        $old_sidebars_widgets = get_option( 'sidebars_widgets' );
    17791779        $new_sidebars_widgets = $old_sidebars_widgets;
    1780         $this->assertGreaterThan( 2, count( $new_sidebars_widgets['footer-one'] ) );
    1781         $new_sidebar_1 = array_reverse( $new_sidebars_widgets['footer-one'] );
     1780        $this->assertGreaterThan( 2, count( $new_sidebars_widgets['sidebar-1'] ) );
     1781        $new_sidebar_1 = array_reverse( $new_sidebars_widgets['sidebar-1'] );
    17821782
    17831783        $post_id = $this->factory()->post->create(
     
    17881788                'post_content' => wp_json_encode(
    17891789                    array(
    1790                         'sidebars_widgets[footer-one]' => array(
     1790                        'sidebars_widgets[sidebar-1]' => array(
    17911791                            'value' => $new_sidebar_1,
    17921792                        ),
     
    18051805        // Ensure that the value has actually been written to the DB.
    18061806        $updated_sidebars_widgets = get_option( 'sidebars_widgets' );
    1807         $this->assertEquals( $new_sidebar_1, $updated_sidebars_widgets['footer-one'] );
     1807        $this->assertEquals( $new_sidebar_1, $updated_sidebars_widgets['sidebar-1'] );
    18081808    }
    18091809
Note: See TracChangeset for help on using the changeset viewer.