lib/experimental
connectors
3 months ago
content-types
3 months ago
dashboard-widgets
3 months ago
experiments
3 months ago
font-face
1 year ago
guidelines
3 months ago
interactivity-api
1 year ago
media-editor
3 months ago
pages
6 months ago
block-editor-settings-mobile.php
888 B
2 years ago
blocks.php
4.4 KB
7 months ago
class-gutenberg-hierarchical-sort.php
4.7 KB
6 months ago
class-wp-rest-block-editor-settings-controller.php
24.2 KB
7 months ago
editor-settings.php
3.3 KB
3 months ago
extensible-site-editor.php
975 B
7 months ago
kses-allowed-html.php
965 B
1 year ago
kses.php
6.2 KB
5 months ago
navigation-theme-opt-in.php
13.3 KB
6 months ago
rest-api-overrides.php
1.6 KB
9 months ago
rest-api.php
3.2 KB
7 months ago
script-modules.php
7.9 KB
6 months ago
workflow-palette.php
355 B
9 months ago
block-editor-settings-mobile.php in Gutenberg 23.2.0, at lib/experimental/block-editor-settings-mobile.php
| 1 | <?php |
| 2 | /** |
| 3 | * Adds settings to the mobile block editor. |
| 4 | * |
| 5 | * @package gutenberg |
| 6 | */ |
| 7 | |
| 8 | /** |
| 9 | * Adds settings to the mobile block editor. |
| 10 | * |
| 11 | * This is used by the settings REST endpoint and it should land in core |
| 12 | * as soon as lib/class-wp-rest-block-editor-settings-controller.php does. |
| 13 | * |
| 14 | * @param array $settings Existing block editor settings. |
| 15 | * |
| 16 | * @return array New block editor settings. |
| 17 | */ |
| 18 | function gutenberg_get_block_editor_settings_mobile( $settings ) { |
| 19 | if ( wp_theme_has_theme_json() ) { |
| 20 | $settings['__experimentalStyles'] = gutenberg_get_global_styles(); |
| 21 | } |
| 22 | |
| 23 | // To tell mobile that the site uses quote v2 (inner blocks). |
| 24 | // See https://github.com/WordPress/gutenberg/pull/25892. |
| 25 | $settings['__experimentalEnableQuoteBlockV2'] = true; |
| 26 | // To tell mobile that the site uses list v2 (inner blocks). |
| 27 | $settings['__experimentalEnableListBlockV2'] = true; |
| 28 | |
| 29 | return $settings; |
| 30 | } |
| 31 |