Version Description
- Removes unnecessary site editor implementation from the plugin. (https://github.com/Automattic/wp-calypso/pull/47301)
Download this release
Release Info
Developer | addiestavlo |
Plugin | Full Site Editing |
Version | 2.8.13 |
Comparing to | |
See all releases |
Code changes from version 2.8.12 to 2.8.13
- full-site-editing-plugin.php +2 -15
- readme.txt +4 -1
- site-editor/index.php +0 -90
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: 2.8.
|
6 |
* Author: Automattic
|
7 |
* Author URI: https://automattic.com/wordpress-plugins/
|
8 |
* License: GPLv2 or later
|
@@ -35,24 +35,11 @@ namespace A8C\FSE;
|
|
35 |
*
|
36 |
* @var string
|
37 |
*/
|
38 |
-
define( 'PLUGIN_VERSION', '2.8.
|
39 |
|
40 |
// Always include these helper files for dotcom FSE.
|
41 |
require_once __DIR__ . '/dotcom-fse/helpers.php';
|
42 |
|
43 |
-
/**
|
44 |
-
* Load Core Site Editor.
|
45 |
-
*/
|
46 |
-
function load_core_site_editor() {
|
47 |
-
require_once __DIR__ . '/site-editor/index.php';
|
48 |
-
initialize_site_editor();
|
49 |
-
}
|
50 |
-
// Change priority so this code is loaded before Gutenberg. This is needed because
|
51 |
-
// FSE files are conditionally loaded based on the existence of experiment option
|
52 |
-
// as of https://github.com/WordPress/gutenberg/pull/24182. initialize_site_editor
|
53 |
-
// is setting the required option and needs to kick in first.
|
54 |
-
add_action( 'plugins_loaded', __NAMESPACE__ . '\load_core_site_editor', 7 );
|
55 |
-
|
56 |
/**
|
57 |
* Load dotcom-FSE.
|
58 |
*/
|
2 |
/**
|
3 |
* Plugin Name: WordPress.com Editing Toolkit
|
4 |
* Description: Enhances your page creation workflow within the Block Editor.
|
5 |
+
* Version: 2.8.13
|
6 |
* Author: Automattic
|
7 |
* Author URI: https://automattic.com/wordpress-plugins/
|
8 |
* License: GPLv2 or later
|
35 |
*
|
36 |
* @var string
|
37 |
*/
|
38 |
+
define( 'PLUGIN_VERSION', '2.8.13' );
|
39 |
|
40 |
// Always include these helper files for dotcom FSE.
|
41 |
require_once __DIR__ . '/dotcom-fse/helpers.php';
|
42 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43 |
/**
|
44 |
* Load dotcom-FSE.
|
45 |
*/
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: alexislloyd, allancole, automattic, bartkalisz, codebykat, copons,
|
|
3 |
Tags: block, blocks, editor, gutenberg, page
|
4 |
Requires at least: 5.0
|
5 |
Tested up to: 5.5
|
6 |
-
Stable tag: 2.8.
|
7 |
Requires PHP: 5.6.20
|
8 |
License: GPLv2 or later
|
9 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
@@ -40,6 +40,9 @@ This plugin is experimental, so we don't provide any support for it outside of w
|
|
40 |
|
41 |
== Changelog ==
|
42 |
|
|
|
|
|
|
|
43 |
= 2.8.12 =
|
44 |
* New onboarding Launch: Fix subdomain selection and update menu (https://github.com/Automattic/wp-calypso/pull/47913)
|
45 |
* Onboarding: Fix missing translations (https://github.com/Automattic/wp-calypso/pull/48074)
|
3 |
Tags: block, blocks, editor, gutenberg, page
|
4 |
Requires at least: 5.0
|
5 |
Tested up to: 5.5
|
6 |
+
Stable tag: 2.8.13
|
7 |
Requires PHP: 5.6.20
|
8 |
License: GPLv2 or later
|
9 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
40 |
|
41 |
== Changelog ==
|
42 |
|
43 |
+
= 2.8.13 =
|
44 |
+
* Removes unnecessary site editor implementation from the plugin. (https://github.com/Automattic/wp-calypso/pull/47301)
|
45 |
+
|
46 |
= 2.8.12 =
|
47 |
* New onboarding Launch: Fix subdomain selection and update menu (https://github.com/Automattic/wp-calypso/pull/47913)
|
48 |
* Onboarding: Fix missing translations (https://github.com/Automattic/wp-calypso/pull/48074)
|
site-editor/index.php
DELETED
@@ -1,90 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* WP.com Site Editor.
|
4 |
-
*
|
5 |
-
* The purpose of this code is to allow us to use core's Site Editor experiment
|
6 |
-
* on Dotcom and Atomic. The corresponding core functionality is initialized here:
|
7 |
-
* https://github.com/WordPress/gutenberg/blob/HEAD/lib/edit-site-page.php
|
8 |
-
*
|
9 |
-
* We should aim to reuse as much of the core code as possible and use this to adjust it to some
|
10 |
-
* specifics of our platforms, or in cases when we want to extend the default experience.
|
11 |
-
*
|
12 |
-
* It's end goal is somewhat similar to the dotcom-fse project that's also part of this plugin.
|
13 |
-
* The difference being that that was a custom Dotcom solution and this one is being built on
|
14 |
-
* top of core FSE. When ready, it should completely replace the existing dotcom-fse functionality.
|
15 |
-
*
|
16 |
-
* @package A8C\FSE
|
17 |
-
*/
|
18 |
-
|
19 |
-
namespace A8C\FSE;
|
20 |
-
|
21 |
-
/**
|
22 |
-
* Enables/Disables site editor experiment per blog sticker.
|
23 |
-
*/
|
24 |
-
function initialize_site_editor() {
|
25 |
-
if ( ! is_site_editor_active() ) {
|
26 |
-
return;
|
27 |
-
}
|
28 |
-
|
29 |
-
// Force enable required Gutenberg experiments if they are not already active.
|
30 |
-
add_filter( 'pre_option_gutenberg-experiments', __NAMESPACE__ . '\enable_site_editor_experiment' );
|
31 |
-
// Add top level Site Editor menu item.
|
32 |
-
add_action( 'admin_menu', __NAMESPACE__ . '\add_site_editor_menu_item' );
|
33 |
-
}
|
34 |
-
|
35 |
-
/**
|
36 |
-
* Add top level Site Editor menu item.
|
37 |
-
*/
|
38 |
-
function add_site_editor_menu_item() {
|
39 |
-
add_menu_page(
|
40 |
-
__( 'Site Editor (beta)', 'full-site-editing' ),
|
41 |
-
__( 'Site Editor (beta)', 'full-site-editing' ),
|
42 |
-
'edit_theme_options',
|
43 |
-
'gutenberg-edit-site',
|
44 |
-
'gutenberg_edit_site_page',
|
45 |
-
'dashicons-edit'
|
46 |
-
);
|
47 |
-
}
|
48 |
-
|
49 |
-
/**
|
50 |
-
* Used to filter corresponding Site Editor experiment options.
|
51 |
-
*
|
52 |
-
* This needs to be toggled on for the Site Editor to work properly.
|
53 |
-
* Furthermore, it's not enough to set it just on a given site.
|
54 |
-
* In WP.com context this needs to be enabled in API context too,
|
55 |
-
* and since we want to have it selectively enabled for some subset of
|
56 |
-
* sites initially, we can't set this option for the whole API.
|
57 |
-
* Instead we'll intercept it with its options filter (pre_option_gutenberg-experiments)
|
58 |
-
* and override its values for eligible sites.
|
59 |
-
*
|
60 |
-
* @param array $experiments_option Default experiments option array.
|
61 |
-
*
|
62 |
-
* @return array Experiments option array with FSE values enabled.
|
63 |
-
*/
|
64 |
-
function enable_site_editor_experiment( $experiments_option ) {
|
65 |
-
if ( ! is_array( $experiments_option ) ) {
|
66 |
-
$experiments_option = array();
|
67 |
-
}
|
68 |
-
|
69 |
-
if ( empty( $experiments_option['gutenberg-full-site-editing'] ) ) {
|
70 |
-
$experiments_option['gutenberg-full-site-editing'] = 1;
|
71 |
-
}
|
72 |
-
|
73 |
-
return $experiments_option;
|
74 |
-
}
|
75 |
-
|
76 |
-
/**
|
77 |
-
* Whether or not core Site Editor is active.
|
78 |
-
*
|
79 |
-
* @returns bool True if Site Editor is active, false otherwise.
|
80 |
-
*/
|
81 |
-
function is_site_editor_active() {
|
82 |
-
/**
|
83 |
-
* Can be used to enable Site Editor functionality.
|
84 |
-
*
|
85 |
-
* @since 0.22
|
86 |
-
*
|
87 |
-
* @param bool true if Site Editor should be enabled, false otherwise.
|
88 |
-
*/
|
89 |
-
return apply_filters( 'a8c_enable_core_site_editor', false );
|
90 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|