Editor: Add an editor settings flag to enable the new gallery for mobile apps for 5.9.

Currently the WordPress mobile apps rely on the `__unstableGalleryWithImageBlocks` flag being set in order to enable the new gallery block format.

This commit includes the value in the `get_default_block_editor_settings()` function in order to ensure that versions of the mobile app >= 18.2 will be able to add and edit gallery blocks in the new format.

Props glendaviesnz, ocean90, hellofromTonya, noisysocks.
Fixes #54583.

git-svn-id: https://develop.svn.wordpress.org/trunk@52349 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov
2021-12-09 15:23:23 +00:00
parent 61296a7bad
commit 56741a3047
2 changed files with 21 additions and 18 deletions
+2 -1
View File
@@ -170,7 +170,7 @@ class Tests_Blocks_Editor extends WP_UnitTestCase {
public function test_get_default_block_editor_settings() {
$settings = get_default_block_editor_settings();
$this->assertCount( 17, $settings );
$this->assertCount( 18, $settings );
$this->assertFalse( $settings['alignWide'] );
$this->assertIsArray( $settings['allowedMimeTypes'] );
$this->assertTrue( $settings['allowedBlockTypes'] );
@@ -265,6 +265,7 @@ class Tests_Blocks_Editor extends WP_UnitTestCase {
$settings['imageSizes']
);
$this->assertIsInt( $settings['maxUploadFileSize'] );
$this->assertTrue( $settings['__unstableGalleryWithImageBlocks'] );
}
/**