Skip to content

Commit

Permalink
Update block editor settings
Browse files Browse the repository at this point in the history
  • Loading branch information
Mamaduka committed Feb 7, 2025
1 parent c89efeb commit 94d6b6a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/wp-includes/block-editor.php
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ function get_default_block_editor_settings() {
'imageEditing' => true,
'imageSizes' => $available_image_sizes,
'maxUploadFileSize' => $max_upload_size,
'__experimentalDashboardLink' => admin_url( '/' ),
// The following flag is required to enable the new Gallery block format on the mobile apps in 5.9.
'__unstableGalleryWithImageBlocks' => true,
);
Expand Down
3 changes: 2 additions & 1 deletion tests/phpunit/tests/blocks/editor.php
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ public function test_get_allowed_block_types_deprecated_filter_post_editor() {
public function test_get_default_block_editor_settings() {
$settings = get_default_block_editor_settings();

$this->assertCount( 19, $settings );
$this->assertCount( 20, $settings );
$this->assertFalse( $settings['alignWide'] );
$this->assertIsArray( $settings['allowedMimeTypes'] );
$this->assertTrue( $settings['allowedBlockTypes'] );
Expand Down Expand Up @@ -299,6 +299,7 @@ public function test_get_default_block_editor_settings() {
$settings['imageSizes']
);
$this->assertIsInt( $settings['maxUploadFileSize'] );
$this->assertSame( admin_url( '/' ), $settings['__experimentalDashboardLink'] );
$this->assertTrue( $settings['__unstableGalleryWithImageBlocks'] );
}

Expand Down

0 comments on commit 94d6b6a

Please sign in to comment.