Full Site Editing - Version 3.27786

Version Description

Download this release

Release Info

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

Code changes from version 3.27569 to 3.27786

README.md CHANGED
@@ -39,7 +39,6 @@ The following items did not change:
39
  - `newspack-blocks/`: Container for newspack blocks such as the carousel block and the blog post block.
40
  - `paragraph-block/`: Customize paragraph block on WP.com.
41
  - `posts-list-block/`: (_deprecated_) A simple block to show a list of posts on a page. (Superceeded by the blog-posts-block.)
42
- - `site-editor/`: Gutenberg site-editor integration code for WordPress.com.
43
  - `starter-page-templates/`: Allows you to select different page layouts made of blocks.
44
  - `wpcom-block-editor-nux/`: WordPress.com-specific NUX dialogue.
45
  - `tags-education/`: Additional tags education for Gutenberg
39
  - `newspack-blocks/`: Container for newspack blocks such as the carousel block and the blog post block.
40
  - `paragraph-block/`: Customize paragraph block on WP.com.
41
  - `posts-list-block/`: (_deprecated_) A simple block to show a list of posts on a page. (Superceeded by the blog-posts-block.)
 
42
  - `starter-page-templates/`: Allows you to select different page layouts made of blocks.
43
  - `wpcom-block-editor-nux/`: WordPress.com-specific NUX dialogue.
44
  - `tags-education/`: Additional tags education for Gutenberg
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.27569
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.27569' );
46
 
47
  // Always include these helper files for dotcom FSE.
48
  require_once __DIR__ . '/dotcom-fse/helpers.php';
@@ -333,20 +333,6 @@ function load_tags_education() {
333
  }
334
  add_action( 'plugins_loaded', __NAMESPACE__ . '\load_tags_education' );
335
 
336
- /**
337
- * WP.com-specific Site Editor changes.
338
- * (Core Full Site Editing)
339
- */
340
- function load_wpcom_site_editor() {
341
- // This is no longer needed after Gutenberg 12.2 due to the Navigation menu no longer being inscrutable.
342
- // This should be deleted along with the files that would be loaded after 12.2 is in production.
343
- if ( defined( 'GUTENBERG_VERSION' ) && version_compare( GUTENBERG_VERSION, '12.2.0', '>=' ) ) {
344
- return;
345
- }
346
- require_once __DIR__ . '/wpcom-site-editor/index.php';
347
- }
348
- add_action( 'plugins_loaded', __NAMESPACE__ . '\load_wpcom_site_editor', 11 ); // load just after the Gutenberg plugin.
349
-
350
  /**
351
  * Load paragraph block
352
  */
2
  /**
3
  * Plugin Name: WordPress.com Editing Toolkit
4
  * Description: Enhances your page creation workflow within the Block Editor.
5
+ * Version: 3.27786
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.27786' );
46
 
47
  // Always include these helper files for dotcom FSE.
48
  require_once __DIR__ . '/dotcom-fse/helpers.php';
333
  }
334
  add_action( 'plugins_loaded', __NAMESPACE__ . '\load_tags_education' );
335
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
336
  /**
337
  * Load paragraph block
338
  */
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.27569
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.27786
7
  Requires PHP: 5.6.20
8
  License: GPLv2 or later
9
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
wpcom-site-editor/dist/wpcom-site-editor.asset.php DELETED
@@ -1 +0,0 @@
1
- <?php return array('dependencies' => array('wp-dom-ready', 'wp-polyfill'), 'version' => '47bf0db44b6002dbb96b134311c6a939');
 
wpcom-site-editor/dist/wpcom-site-editor.js DELETED
@@ -1 +0,0 @@
1
- !function(){"use strict";var t={538:function(t,e,n){var o=n(701);function i(){if(document.querySelector(".wpcom-edit-site-navigation-toggle__button"))return;const t=document.querySelector(".edit-site-navigation-toggle")||document.querySelector(".edit-site-navigation-link__button");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"})))}n.n(o)()((()=>{if(!window.wp.editSite)return;const t=setInterval((()=>{if(!(document.querySelector(".edit-site-navigation-toggle__button")||document.querySelector(".edit-site-navigation-link__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 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}();
 
wpcom-site-editor/index.js DELETED
@@ -1 +0,0 @@
1
- import './navigation-toggle';
 
wpcom-site-editor/index.php DELETED
@@ -1,26 +0,0 @@
1
- <?php
2
- /**
3
- * Customize the look and feel of the Site Editor on WP.com.
4
- *
5
- * @package A8C\FSE
6
- */
7
-
8
- namespace A8C\FSE;
9
-
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'];
17
-
18
- wp_enqueue_script(
19
- 'wpcom-site-editor-script',
20
- plugins_url( 'dist/wpcom-site-editor.js', __FILE__ ),
21
- is_array( $script_dependencies ) ? $script_dependencies : array(),
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 DELETED
@@ -1,65 +0,0 @@
1
- import domReady from '@wordpress/dom-ready';
2
-
3
- function injectNavigationToggleOnClickHandler() {
4
- // Prevent adding the event listener multiple times
5
- if ( document.querySelector( '.wpcom-edit-site-navigation-toggle__button' ) ) {
6
- return;
7
- }
8
-
9
- const toggle =
10
- document.querySelector( '.edit-site-navigation-toggle' ) ||
11
- // The navigation toggle is being removed with Gutenberg v11.9, so we must check the
12
- // navigation link button to override the click behavior. Once v12.0 lands, we should
13
- // be able to use a slotfill and get rid of this entire file.
14
- document.querySelector( '.edit-site-navigation-link__button' );
15
-
16
- if ( ! toggle ) {
17
- return;
18
- }
19
-
20
- // Add a CSS class to determine if the event listener has been added already
21
- toggle.classList.add( 'wpcom-edit-site-navigation-toggle__button' );
22
-
23
- toggle.addEventListener( 'click', ( event ) => {
24
- event.preventDefault();
25
- event.stopPropagation();
26
- const calypsoCloseUrl = window?.calypsoifyGutenberg?.closeUrl;
27
- if ( calypsoCloseUrl ) {
28
- window.top.location.href = calypsoCloseUrl;
29
- } else {
30
- window.location.href = './index.php';
31
- }
32
- } );
33
- }
34
-
35
- /**
36
- * Customize the navigation sidebar toggle click handler to simply navigate back home.
37
- */
38
- domReady( () => {
39
- if ( ! window.wp.editSite ) {
40
- return;
41
- }
42
-
43
- const waitForNavigationToggleButton = setInterval( () => {
44
- const toggleButton =
45
- document.querySelector( '.edit-site-navigation-toggle__button' ) ||
46
- // The navigation toggle is being removed with Gutenberg v11.9, so we must check the
47
- // navigation link button to override the click behavior. Once v12.0 lands, we should
48
- // be able to use a slotfill and get rid of this entire file.
49
- document.querySelector( '.edit-site-navigation-link__button' );
50
-
51
- if ( ! toggleButton ) {
52
- return;
53
- }
54
- clearInterval( waitForNavigationToggleButton );
55
-
56
- injectNavigationToggleOnClickHandler();
57
-
58
- // Re-inject the navigation toggle click handler as needed in case React re-renders the navigation sidebar
59
- const wpbody = document.getElementById( 'wpbody' );
60
- if ( wpbody && typeof window.MutationObserver !== 'undefined' ) {
61
- const observer = new window.MutationObserver( injectNavigationToggleOnClickHandler );
62
- observer.observe( wpbody, { subtree: true, childList: true } );
63
- }
64
- } );
65
- } );