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.


git-svn-id: https://develop.svn.wordpress.org/trunk@51088 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Robert Anderson
2021-06-08 01:54:27 +00:00
parent 880a308485
commit 8add05ff15
11 changed files with 262 additions and 129 deletions
@@ -655,13 +655,13 @@ class WP_Test_REST_Widgets_Controller extends WP_Test_REST_Controller_Testcase {
);
$response = rest_get_server()->dispatch( $request );
$data = $response->get_data();
$this->assertSame( 'block-2', $data['id'] );
$this->assertSame( 'block-7', $data['id'] );
$this->assertSame( 'sidebar-1', $data['sidebar'] );
$this->assertEqualSets(
array(
'content' => '<!-- wp:paragraph --><p>Block test</p><!-- /wp:paragraph -->',
),
get_option( 'widget_block' )[2]
get_option( 'widget_block' )[7]
);
}