Make WordPress Core


Ignore:
Timestamp:
06/08/2021 01:54:27 AM (3 years ago)
Author:
noisysocks
Message:

Make new WordPress installations use blocks in widget areas instead of widgets

Modifies wp_install_defaults() so that when you install a new WordPress site you
have block in your widget areas, not widgets.

Fixes #53324.
Props isabel_brison, hellofromtonya, andraganescu.

File:
1 edited

Legend:

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

    r49992 r51088  
    660660            'background_image',
    661661            'widget_text[2]',
    662             'widget_meta[3]',
     662            'widget_meta[2]',
    663663            'sidebars_widgets[sidebar-1]',
    664664            'nav_menus_created_posts',
     
    677677        $this->assertSameSets( $expected_setting_ids, array_keys( $changeset_values ) );
    678678
    679         foreach ( array( 'widget_text[2]', 'widget_meta[3]' ) as $setting_id ) {
     679        foreach ( array( 'widget_text[2]', 'widget_meta[2]' ) as $setting_id ) {
    680680            $this->assertInternalType( 'array', $changeset_values[ $setting_id ] );
    681681            $instance_data = $wp_customize->widgets->sanitize_widget_instance( $changeset_values[ $setting_id ] );
     
    684684        }
    685685
    686         $this->assertSame( array( 'text-2', 'meta-3' ), $changeset_values['sidebars_widgets[sidebar-1]'] );
     686        $this->assertSame( array( 'text-2', 'meta-2' ), $changeset_values['sidebars_widgets[sidebar-1]'] );
    687687
    688688        $posts_by_name = array();
Note: See TracChangeset for help on using the changeset viewer.