Version Description
Download this release
Release Info
Developer | mmtr86 |
Plugin | Full Site Editing |
Version | 3.50213 |
Comparing to | |
See all releases |
Code changes from version 3.50176 to 3.50213
- build_meta.txt +3 -3
- full-site-editing-plugin.php +2 -2
- readme.txt +1 -1
- wpcom-global-styles/index.php +11 -7
build_meta.txt
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
commit_hash=
|
2 |
-
commit_url=https://github.com/Automattic/wp-calypso/commit/
|
3 |
-
build_number=3.
|
1 |
+
commit_hash=96e552a0228b15850f281c273b71fb2f4cdedf28
|
2 |
+
commit_url=https://github.com/Automattic/wp-calypso/commit/96e552a0228b15850f281c273b71fb2f4cdedf28
|
3 |
+
build_number=3.50213
|
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.
|
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.
|
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.50213
|
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.50213' );
|
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: 6.0
|
6 |
-
Stable tag: 3.
|
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: 6.0
|
6 |
+
Stable tag: 3.50213
|
7 |
Requires PHP: 5.6.20
|
8 |
License: GPLv2 or later
|
9 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
wpcom-global-styles/index.php
CHANGED
@@ -152,18 +152,14 @@ function wpcom_block_global_styles_frontend( $theme_json ) {
|
|
152 |
|
153 |
if ( class_exists( 'WP_Theme_JSON_Data' ) ) {
|
154 |
return new WP_Theme_JSON_Data( array(), 'custom' );
|
155 |
-
} elseif ( class_exists( 'WP_Theme_JSON_Data_Gutenberg' ) ) {
|
156 |
-
return new WP_Theme_JSON_Data_Gutenberg( array(), 'custom' );
|
157 |
}
|
158 |
|
159 |
/*
|
160 |
-
* If
|
161 |
-
*
|
162 |
-
* cannot block the user styles properly.
|
163 |
*/
|
164 |
return $theme_json;
|
165 |
}
|
166 |
-
add_filter( 'theme_json_user', 'wpcom_block_global_styles_frontend' );
|
167 |
add_filter( 'wp_theme_json_data_user', 'wpcom_block_global_styles_frontend' );
|
168 |
|
169 |
/**
|
@@ -217,7 +213,15 @@ add_action( 'save_post_wp_global_styles', 'wpcom_track_global_styles', 10, 3 );
|
|
217 |
* @return bool Returns true if custom styles are in use.
|
218 |
*/
|
219 |
function wpcom_global_styles_in_use() {
|
220 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
221 |
|
222 |
if ( ! isset( $user_cpt['post_content'] ) ) {
|
223 |
do_action( 'global_styles_log', 'global_styles_not_in_use' );
|
152 |
|
153 |
if ( class_exists( 'WP_Theme_JSON_Data' ) ) {
|
154 |
return new WP_Theme_JSON_Data( array(), 'custom' );
|
|
|
|
|
155 |
}
|
156 |
|
157 |
/*
|
158 |
+
* If `WP_Theme_JSON_Data` is missing, then the site is running an old
|
159 |
+
* version of WordPress we cannot block the user styles properly.
|
|
|
160 |
*/
|
161 |
return $theme_json;
|
162 |
}
|
|
|
163 |
add_filter( 'wp_theme_json_data_user', 'wpcom_block_global_styles_frontend' );
|
164 |
|
165 |
/**
|
213 |
* @return bool Returns true if custom styles are in use.
|
214 |
*/
|
215 |
function wpcom_global_styles_in_use() {
|
216 |
+
/*
|
217 |
+
* If `WP_Theme_JSON_Resolver` is missing, then the site is running an old version
|
218 |
+
* of WordPress, so we cannot determine whether the site has custom styles.
|
219 |
+
*/
|
220 |
+
if ( ! class_exists( 'WP_Theme_JSON_Resolver' ) ) {
|
221 |
+
return false;
|
222 |
+
}
|
223 |
+
|
224 |
+
$user_cpt = WP_Theme_JSON_Resolver::get_user_data_from_wp_global_styles( wp_get_theme() );
|
225 |
|
226 |
if ( ! isset( $user_cpt['post_content'] ) ) {
|
227 |
do_action( 'global_styles_log', 'global_styles_not_in_use' );
|