Full Site Editing - Version 3.17007

Version Description

Download this release

Release Info

Developer addiestavlo
Plugin Icon wp plugin Full Site Editing
Version 3.17007
Comparing to
See all releases

Code changes from version 3.16867 to 3.17007

editor-site-launch/dist/focused-launch.asset.php CHANGED
@@ -1 +1 @@
1
- <?php return array('dependencies' => array('a8c-fse-common-data-stores', 'lodash', 'react', 'wp-components', 'wp-compose', 'wp-data', 'wp-data-controls', 'wp-deprecated', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-plugins', 'wp-polyfill', 'wp-primitives', 'wp-react-i18n', 'wp-url'), 'version' => 'f3c6e023079bfb4e93a48eba0894e097');
1
+ <?php return array('dependencies' => array('a8c-fse-common-data-stores', 'lodash', 'react', 'wp-components', 'wp-compose', 'wp-data', 'wp-data-controls', 'wp-deprecated', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-plugins', 'wp-polyfill', 'wp-primitives', 'wp-react-i18n', 'wp-url'), 'version' => 'f79d1231c9ae89bd60a680b1e4ec71b0');
editor-site-launch/dist/gutenboarding-launch.asset.php CHANGED
@@ -1 +1 @@
1
- <?php return array('dependencies' => array('a8c-fse-common-data-stores', 'lodash', 'react', 'wp-components', 'wp-compose', 'wp-data', 'wp-data-controls', 'wp-deprecated', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-plugins', 'wp-polyfill', 'wp-primitives', 'wp-react-i18n', 'wp-url'), 'version' => '9ba69dd869d3859c42871f3e6da93f57');
1
+ <?php return array('dependencies' => array('a8c-fse-common-data-stores', 'lodash', 'react', 'wp-components', 'wp-compose', 'wp-data', 'wp-data-controls', 'wp-deprecated', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-plugins', 'wp-polyfill', 'wp-primitives', 'wp-react-i18n', 'wp-url'), 'version' => 'b0b7f18e22ea30fe9dbb86a6a1a106ed');
editor-site-launch/dist/launch-button.asset.php CHANGED
@@ -1 +1 @@
1
- <?php return array('dependencies' => array('a8c-fse-common-data-stores', 'lodash', 'wp-data', 'wp-dom-ready', 'wp-editor', 'wp-i18n', 'wp-polyfill'), 'version' => '7befcd8bb55d321afc2b02bd0585cd05');
1
+ <?php return array('dependencies' => array('a8c-fse-common-data-stores', 'lodash', 'wp-data', 'wp-dom-ready', 'wp-editor', 'wp-i18n', 'wp-polyfill'), 'version' => '422fa5176bdde2354184e5de710f623a');
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.16867
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.16867' );
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.17007
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.17007' );
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.16867
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.17007
7
  Requires PHP: 5.6.20
8
  License: GPLv2 or later
9
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
tags-education/dist/tags-education.asset.php CHANGED
@@ -1 +1 @@
1
- <?php return array('dependencies' => array('lodash', 'react', 'wp-components', 'wp-compose', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-polyfill'), 'version' => 'eecccd329dcac7dd6b412ea285db8965');
1
+ <?php return array('dependencies' => array('lodash', 'react', 'wp-components', 'wp-compose', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-polyfill'), 'version' => '8faa57333192ba637bc54087eef29277');
whats-new/dist/whats-new.asset.php CHANGED
@@ -1 +1 @@
1
- <?php return array('dependencies' => array('lodash', 'react', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-i18n', 'wp-plugins', 'wp-polyfill', 'wp-react-i18n'), 'version' => 'bca0aa1db770a2af74e867cce03d1be3');
1
+ <?php return array('dependencies' => array('lodash', 'react', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-i18n', 'wp-plugins', 'wp-polyfill', 'wp-react-i18n'), 'version' => '12c4b0aa291f1c1a705bbed48654f131');
wpcom-block-editor-nav-sidebar/dist/wpcom-block-editor-nav-sidebar.asset.php CHANGED
@@ -1 +1 @@
1
- <?php return array('dependencies' => array('lodash', 'react', 'wp-components', 'wp-compose', 'wp-data', 'wp-edit-post', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keycodes', 'wp-plugins', 'wp-polyfill', 'wp-primitives', 'wp-url'), 'version' => '4f0a7dab6d8bfae6726f26360fc9ecd4');
1
+ <?php return array('dependencies' => array('lodash', 'react', 'wp-components', 'wp-compose', 'wp-data', 'wp-edit-post', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keycodes', 'wp-plugins', 'wp-polyfill', 'wp-primitives', 'wp-url'), 'version' => '166842d5da37194dd7780e5690b1e0f3');
wpcom-block-editor-nux/dist/wpcom-block-editor-nux.asset.php CHANGED
@@ -1 +1 @@
1
- <?php return array('dependencies' => array('a8c-fse-common-data-stores', 'lodash', 'react', 'wp-api-fetch', 'wp-components', 'wp-compose', 'wp-data', 'wp-data-controls', 'wp-element', 'wp-i18n', 'wp-nux', 'wp-plugins', 'wp-polyfill', 'wp-primitives'), 'version' => '91d1520e5236df8668b2f0878f194c8c');
1
+ <?php return array('dependencies' => array('a8c-fse-common-data-stores', 'lodash', 'react', 'wp-api-fetch', 'wp-components', 'wp-compose', 'wp-data', 'wp-data-controls', 'wp-element', 'wp-i18n', 'wp-nux', 'wp-plugins', 'wp-polyfill', 'wp-primitives'), 'version' => 'b4d97170d7574dae9f4db22ce5e341ea');
wpcom-site-editor/dist/wpcom-site-editor.asset.php CHANGED
@@ -1 +1 @@
1
- <?php return array('dependencies' => array('wp-dom-ready', 'wp-polyfill'), 'version' => 'f8a51a672db728f758eaf4bc37df52b5');
1
+ <?php return array('dependencies' => array('wp-dom-ready', 'wp-polyfill'), 'version' => '7b54d9a013257b12dfee497153f8dc73');
wpcom-site-editor/dist/wpcom-site-editor.css DELETED
@@ -1 +0,0 @@
1
- .edit-site-template-details__show-all-button.components-button{display:none}
 
wpcom-site-editor/dist/wpcom-site-editor.js CHANGED
@@ -1 +1 @@
1
- !function(){"use strict";var t={266:function(){},538:function(t,e,n){var o=n(701),i=n.n(o);n(266);function r(){if(document.querySelector(".wpcom-edit-site-navigation-toggle__button"))return;const t=document.querySelector(".edit-site-navigation-toggle");t&&(t.classList.add("wpcom-edit-site-navigation-toggle__button"),t.addEventListener("click",(t=>{var e,n;t.preventDefault(),t.stopPropagation();const o=null===(e=window)||void 0===e||null===(n=e.calypsoifyGutenberg)||void 0===n?void 0:n.closeUrl;o?window.top.location.href=o:window.location.href="./index.php"})))}i()((()=>{if(!window.wp.editSite)return;const t=setInterval((()=>{if(!document.querySelector(".edit-site-navigation-toggle__button"))return;clearInterval(t),r();const e=document.getElementById("wpbody");if(e&&void 0!==window.MutationObserver){new window.MutationObserver(r).observe(e,{subtree:!0,childList:!0})}}))}))},701:function(t){t.exports=window.wp.domReady}},e={};function n(o){var i=e[o];if(void 0!==i)return i.exports;var r=e[o]={exports:{}};return t[o](r,r.exports,n),r.exports}n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,{a:e}),e},n.d=function(t,e){for(var o in e)n.o(e,o)&&!n.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var o={};!function(){n.r(o);n(538)}(),window.EditingToolkit=o}();
1
+ !function(){"use strict";var t={538:function(t,e,o){var n=o(701);function i(){if(document.querySelector(".wpcom-edit-site-navigation-toggle__button"))return;const t=document.querySelector(".edit-site-navigation-toggle");t&&(t.classList.add("wpcom-edit-site-navigation-toggle__button"),t.addEventListener("click",(t=>{var e,o;t.preventDefault(),t.stopPropagation();const n=null===(e=window)||void 0===e||null===(o=e.calypsoifyGutenberg)||void 0===o?void 0:o.closeUrl;n?window.top.location.href=n:window.location.href="./index.php"})))}o.n(n)()((()=>{if(!window.wp.editSite)return;const t=setInterval((()=>{if(!document.querySelector(".edit-site-navigation-toggle__button"))return;clearInterval(t),i();const e=document.getElementById("wpbody");if(e&&void 0!==window.MutationObserver){new window.MutationObserver(i).observe(e,{subtree:!0,childList:!0})}}))}))},701:function(t){t.exports=window.wp.domReady}},e={};function o(n){var i=e[n];if(void 0!==i)return i.exports;var r=e[n]={exports:{}};return t[n](r,r.exports,o),r.exports}o.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(e,{a:e}),e},o.d=function(t,e){for(var n in e)o.o(e,n)&&!o.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};!function(){o.r(n);o(538)}(),window.EditingToolkit=n}();
wpcom-site-editor/dist/wpcom-site-editor.rtl.css DELETED
@@ -1 +0,0 @@
1
- .edit-site-template-details__show-all-button.components-button{display:none}
 
wpcom-site-editor/index.php CHANGED
@@ -10,7 +10,7 @@ namespace A8C\FSE;
10
  /**
11
  * Enqueue block editor assets.
12
  */
13
- function wpcom_site_editor_script_and_style() {
14
  $asset_file = include plugin_dir_path( __FILE__ ) . 'dist/wpcom-site-editor.asset.php';
15
  $script_dependencies = $asset_file['dependencies'];
16
  $version = $asset_file['version'];
@@ -22,13 +22,5 @@ function wpcom_site_editor_script_and_style() {
22
  $version,
23
  true
24
  );
25
-
26
- $style_path = 'dist/wpcom-site-editor' . ( is_rtl() ? '.rtl' : '' ) . '.css';
27
- wp_enqueue_style(
28
- 'wpcom-site-editor-style',
29
- plugins_url( $style_path, __FILE__ ),
30
- array(),
31
- filemtime( plugin_dir_path( __FILE__ ) . $style_path )
32
- );
33
  }
34
- add_action( 'enqueue_block_editor_assets', __NAMESPACE__ . '\wpcom_site_editor_script_and_style' );
10
  /**
11
  * Enqueue block editor assets.
12
  */
13
+ function wpcom_site_editor_script() {
14
  $asset_file = include plugin_dir_path( __FILE__ ) . 'dist/wpcom-site-editor.asset.php';
15
  $script_dependencies = $asset_file['dependencies'];
16
  $version = $asset_file['version'];
22
  $version,
23
  true
24
  );
 
 
 
 
 
 
 
 
25
  }
26
+ add_action( 'enqueue_block_editor_assets', __NAMESPACE__ . '\wpcom_site_editor_script' );
wpcom-site-editor/navigation-toggle/index.js CHANGED
@@ -1,5 +1,4 @@
1
  import domReady from '@wordpress/dom-ready';
2
- import './style.scss';
3
 
4
  function injectNavigationToggleOnClickHandler() {
5
  // Prevent adding the event listener multiple times
1
  import domReady from '@wordpress/dom-ready';
 
2
 
3
  function injectNavigationToggleOnClickHandler() {
4
  // Prevent adding the event listener multiple times
wpcom-site-editor/navigation-toggle/style.scss DELETED
@@ -1,3 +0,0 @@
1
- .edit-site-template-details__show-all-button.components-button {
2
- display: none;
3
- }
 
 
 
wpcom-universal-themes/index.php CHANGED
@@ -74,6 +74,7 @@ function load_core_fse() {
74
  remove_action( 'init', __NAMESPACE__ . '\hide_template_cpts', 11 );
75
  remove_action( 'restapi_theme_init', __NAMESPACE__ . '\hide_template_cpts', 11 );
76
  remove_filter( 'block_editor_settings_all', __NAMESPACE__ . '\hide_fse_blocks' );
 
77
  }
78
 
79
  /**
@@ -96,6 +97,7 @@ function unload_core_fse() {
96
  add_action( 'init', __NAMESPACE__ . '\hide_template_cpts', 11 );
97
  }
98
  add_filter( 'block_editor_settings_all', __NAMESPACE__ . '\hide_fse_blocks' );
 
99
  }
100
 
101
  /**
@@ -195,6 +197,22 @@ function hide_fse_blocks( $editor_settings ) {
195
  return $editor_settings;
196
  }
197
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
198
  /**
199
  * Hides the Template and Template Part Custom Post Types' UI
200
  *
74
  remove_action( 'init', __NAMESPACE__ . '\hide_template_cpts', 11 );
75
  remove_action( 'restapi_theme_init', __NAMESPACE__ . '\hide_template_cpts', 11 );
76
  remove_filter( 'block_editor_settings_all', __NAMESPACE__ . '\hide_fse_blocks' );
77
+ remove_filter( 'block_editor_settings_all', __NAMESPACE__ . '\hide_template_editing', 11 );
78
  }
79
 
80
  /**
97
  add_action( 'init', __NAMESPACE__ . '\hide_template_cpts', 11 );
98
  }
99
  add_filter( 'block_editor_settings_all', __NAMESPACE__ . '\hide_fse_blocks' );
100
+ add_filter( 'block_editor_settings_all', __NAMESPACE__ . '\hide_template_editing', 11 );
101
  }
102
 
103
  /**
197
  return $editor_settings;
198
  }
199
 
200
+ /**
201
+ * Filter for `block_editor_settings_all` in order to prevent template
202
+ * editing from showing up in the post editor when FSE is inactive.
203
+ *
204
+ * @param [array] $editor_settings Editor settings.
205
+ * @return array Possibly modified editor settings.
206
+ */
207
+ function hide_template_editing( $editor_settings ) {
208
+ // this shouldn't even be hooked under this condition, but let's be sure.
209
+ if ( is_core_fse_active() ) {
210
+ return $editor_settings;
211
+ }
212
+ $editor_settings['supportsTemplateMode'] = false;
213
+ return $editor_settings;
214
+ }
215
+
216
  /**
217
  * Hides the Template and Template Part Custom Post Types' UI
218
  *