Full Site Editing - Version 3.25625

Version Description

Download this release

Release Info

Developer grantmkin
Plugin Icon wp plugin Full Site Editing
Version 3.25625
Comparing to
See all releases

Code changes from version 3.25484 to 3.25625

full-site-editing-plugin.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Plugin Name: WordPress.com Editing Toolkit
4
  * Description: Enhances your page creation workflow within the Block Editor.
5
- * Version: 3.25484
6
  * Author: Automattic
7
  * Author URI: https://automattic.com/wordpress-plugins/
8
  * License: GPLv2 or later
@@ -42,7 +42,7 @@ namespace A8C\FSE;
42
  *
43
  * @var string
44
  */
45
- define( 'A8C_ETK_PLUGIN_VERSION', '3.25484' );
46
 
47
  // Always include these helper files for dotcom FSE.
48
  require_once __DIR__ . '/dotcom-fse/helpers.php';
2
  /**
3
  * Plugin Name: WordPress.com Editing Toolkit
4
  * Description: Enhances your page creation workflow within the Block Editor.
5
+ * Version: 3.25625
6
  * Author: Automattic
7
  * Author URI: https://automattic.com/wordpress-plugins/
8
  * License: GPLv2 or later
42
  *
43
  * @var string
44
  */
45
+ define( 'A8C_ETK_PLUGIN_VERSION', '3.25625' );
46
 
47
  // Always include these helper files for dotcom FSE.
48
  require_once __DIR__ . '/dotcom-fse/helpers.php';
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: automattic
3
  Tags: block, blocks, editor, gutenberg, page
4
  Requires at least: 5.5
5
  Tested up to: 5.6
6
- Stable tag: 3.25484
7
  Requires PHP: 5.6.20
8
  License: GPLv2 or later
9
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
3
  Tags: block, blocks, editor, gutenberg, page
4
  Requires at least: 5.5
5
  Tested up to: 5.6
6
+ Stable tag: 3.25625
7
  Requires PHP: 5.6.20
8
  License: GPLv2 or later
9
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
wpcom-universal-themes/index.php CHANGED
@@ -38,14 +38,25 @@ function is_core_fse_active() {
38
  }
39
 
40
  /**
41
- * Proxy for `gutenberg_is_fse_theme` with `function_exists` guarding.
42
  *
43
  * @uses gutenberg_is_fse_theme
 
44
  *
45
  * @return boolean
46
  */
47
  function is_fse_theme() {
48
- return function_exists( 'gutenberg_is_fse_theme' ) && gutenberg_is_fse_theme();
 
 
 
 
 
 
 
 
 
 
49
  }
50
 
51
  /**
@@ -92,6 +103,7 @@ function load_core_fse() {
92
  remove_action( 'restapi_theme_init', __NAMESPACE__ . '\hide_template_cpts', 11 );
93
  remove_filter( 'block_editor_settings_all', __NAMESPACE__ . '\hide_fse_blocks' );
94
  remove_filter( 'block_editor_settings_all', __NAMESPACE__ . '\hide_template_editing', 11 );
 
95
  }
96
 
97
  /**
@@ -114,6 +126,7 @@ function unload_core_fse() {
114
  }
115
  add_filter( 'block_editor_settings_all', __NAMESPACE__ . '\hide_fse_blocks' );
116
  add_filter( 'block_editor_settings_all', __NAMESPACE__ . '\hide_template_editing', 11 );
 
117
  }
118
 
119
  /**
@@ -338,6 +351,15 @@ function display_fse_section() {
338
  );
339
  }
340
 
 
 
 
 
 
 
 
 
 
341
  /**
342
  * Run everything
343
  *
38
  }
39
 
40
  /**
41
+ * Proxy for `gutenberg_is_fse_theme` or `wp_is_block_theme` with `function_exists` guarding.
42
  *
43
  * @uses gutenberg_is_fse_theme
44
+ * @uses wp_is_block_theme
45
  *
46
  * @return boolean
47
  */
48
  function is_fse_theme() {
49
+ // Gutenberg check, prior to WP 5.9.
50
+ if ( function_exists( 'gutenberg_is_fse_theme' ) ) {
51
+ return gutenberg_is_fse_theme();
52
+ }
53
+
54
+ // Core check, added in WP 5.9.
55
+ if ( function_exists( 'wp_is_block_theme' ) ) {
56
+ return wp_is_block_theme();
57
+ }
58
+
59
+ return false;
60
  }
61
 
62
  /**
103
  remove_action( 'restapi_theme_init', __NAMESPACE__ . '\hide_template_cpts', 11 );
104
  remove_filter( 'block_editor_settings_all', __NAMESPACE__ . '\hide_fse_blocks' );
105
  remove_filter( 'block_editor_settings_all', __NAMESPACE__ . '\hide_template_editing', 11 );
106
+ remove_action( 'admin_menu', __NAMESPACE__ . '\hide_core_site_editor' );
107
  }
108
 
109
  /**
126
  }
127
  add_filter( 'block_editor_settings_all', __NAMESPACE__ . '\hide_fse_blocks' );
128
  add_filter( 'block_editor_settings_all', __NAMESPACE__ . '\hide_template_editing', 11 );
129
+ add_action( 'admin_menu', __NAMESPACE__ . '\hide_core_site_editor' );
130
  }
131
 
132
  /**
351
  );
352
  }
353
 
354
+ /**
355
+ * Hide the Core Site Editor (in addition to the Gutenberg one) when unloading Core FSE.
356
+ *
357
+ * @return void
358
+ */
359
+ function hide_core_site_editor() {
360
+ remove_submenu_page( 'themes.php', 'site-editor.php' );
361
+ }
362
+
363
  /**
364
  * Run everything
365
  *