PluginProbe ʕ •ᴥ•ʔ
Widget Options – Advanced Conditional Visibility for Gutenberg Blocks & Classic Widgets / 4.0.7
Widget Options – Advanced Conditional Visibility for Gutenberg Blocks & Classic Widgets v4.0.7
4.2.5 4.2.4 trunk 3.7.10 3.7.11 3.7.12 3.7.13 3.7.14 3.7.2 3.7.5 3.7.6 3.7.7 3.7.8 3.7.9 3.8 3.8.1 3.8.10 3.8.2 3.8.3 3.8.4 3.8.5 3.8.6 3.8.7 3.8.8 3.8.9 3.8.9.1 3.9.0 3.9.1 3.9.2 3.9.3 3.9.4 3.9.5 3.9.6 4.0.0 4.0.1 4.0.2 4.0.3 4.0.4 4.0.5 4.0.5.1 4.0.6 4.0.6.1 4.0.7 4.0.8 4.0.9 4.1.0 4.1.1 4.1.2 4.1.3 4.2.0 4.2.1 4.2.2 4.2.3
widget-options / includes / widgets / gutenberg / lib / experimental / block-editor-settings-mobile.php
widget-options / includes / widgets / gutenberg / lib / experimental Last commit date
fonts-api 1 year ago interactivity-api 1 year ago block-editor-settings-mobile.php 1 year ago block-editor-settings.php 1 year ago blocks.php 1 year ago class-gutenberg-rest-global-styles-revisions-controller.php 1 year ago class-wp-classic-to-block-menu-converter.php 1 year ago class-wp-navigation-fallback-gutenberg.php 1 year ago class-wp-rest-block-editor-settings-controller.php 1 year ago class-wp-rest-customizer-nonces.php 1 year ago class-wp-rest-navigation-fallback-controller.php 1 year ago editor-settings.php 1 year ago kses.php 1 year ago l10n.php 1 year ago navigation-fallback.php 1 year ago navigation-theme-opt-in.php 1 year ago rest-api.php 1 year ago
block-editor-settings-mobile.php
40 lines
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 (
20 defined( 'REST_REQUEST' ) &&
21 REST_REQUEST &&
22 isset( $_GET['context'] ) &&
23 'mobile' === $_GET['context']
24 ) {
25 if ( wp_theme_has_theme_json() ) {
26 $settings['__experimentalStyles'] = gutenberg_get_global_styles();
27 }
28
29 // To tell mobile that the site uses quote v2 (inner blocks).
30 // See https://github.com/WordPress/gutenberg/pull/25892.
31 $settings['__experimentalEnableQuoteBlockV2'] = true;
32 // To tell mobile that the site uses list v2 (inner blocks).
33 $settings['__experimentalEnableListBlockV2'] = true;
34 }
35
36 return $settings;
37 }
38
39 add_filter( 'block_editor_settings_all', 'gutenberg_get_block_editor_settings_mobile', PHP_INT_MAX );
40