Version Description
Download this release
Release Info
Developer | yansern |
Plugin | Full Site Editing |
Version | 3.7917 |
Comparing to | |
See all releases |
Code changes from version 3.7790 to 3.7917
- common/dist/common.asset.php +1 -1
- common/dist/common.css +1 -1
- common/dist/common.rtl.css +1 -1
- common/index.php +29 -3
- common/index.scss +26 -4
- full-site-editing-plugin.php +2 -2
- readme.txt +1 -1
common/dist/common.asset.php
CHANGED
@@ -1 +1 @@
|
|
1 |
-
<?php return array('dependencies' => array('wp-polyfill'), 'version' => '
|
1 |
+
<?php return array('dependencies' => array('wp-polyfill'), 'version' => '04ccbd2f32c54fb6e0702e88cca0465c');
|
common/dist/common.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
body.hide-homepage-title .editor-post-title{opacity:.4}.interface-interface-skeleton__editor{max-width:100%}
|
1 |
+
body.hide-homepage-title .editor-post-title{opacity:.4}body.slider-width-workaround .interface-interface-skeleton__editor{max-width:100%}body.font-smoothing-antialiased,body.font-smoothing-antialiased #wpadminbar *,body.font-smoothing-antialiased #wpwrap{text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}
|
common/dist/common.rtl.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
body.hide-homepage-title .editor-post-title{opacity:.4}.interface-interface-skeleton__editor{max-width:100%}
|
1 |
+
body.hide-homepage-title .editor-post-title{opacity:.4}body.slider-width-workaround .interface-interface-skeleton__editor{max-width:100%}body.font-smoothing-antialiased,body.font-smoothing-antialiased #wpadminbar *,body.font-smoothing-antialiased #wpwrap{text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}
|
common/index.php
CHANGED
@@ -69,15 +69,31 @@ function is_homepage_title_hidden() {
|
|
69 |
* @return bool True if the site needs a temporary fix for the incorrect slider width.
|
70 |
*/
|
71 |
function needs_slider_width_workaround() {
|
|
|
|
|
72 |
if (
|
73 |
( defined( 'GUTENBERG_DEVELOPMENT_MODE' ) && GUTENBERG_DEVELOPMENT_MODE ) ||
|
74 |
( defined( 'GUTENBERG_VERSION' ) && version_compare( GUTENBERG_VERSION, '9.2', '>=' ) )
|
75 |
) {
|
76 |
-
|
|
|
77 |
}
|
78 |
return false;
|
79 |
}
|
80 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
81 |
/**
|
82 |
* Detects if assets for the common module should be loaded.
|
83 |
*
|
@@ -90,7 +106,7 @@ function needs_slider_width_workaround() {
|
|
90 |
* @return bool True if the common module assets should be loaded.
|
91 |
*/
|
92 |
function should_load_assets() {
|
93 |
-
return (bool) is_homepage_title_hidden() || needs_slider_width_workaround();
|
94 |
}
|
95 |
|
96 |
/**
|
@@ -104,6 +120,16 @@ function admin_body_classes( $classes ) {
|
|
104 |
$classes .= ' hide-homepage-title';
|
105 |
}
|
106 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
107 |
return $classes;
|
108 |
}
|
109 |
add_filter( 'admin_body_class', __NAMESPACE__ . '\admin_body_classes' );
|
@@ -137,7 +163,7 @@ function enqueue_script_and_style() {
|
|
137 |
filemtime( plugin_dir_path( __FILE__ ) . 'dist/' . $style_file )
|
138 |
);
|
139 |
}
|
140 |
-
add_action( '
|
141 |
|
142 |
/**
|
143 |
* Enable line-height settings for all themes with Gutenberg.
|
69 |
* @return bool True if the site needs a temporary fix for the incorrect slider width.
|
70 |
*/
|
71 |
function needs_slider_width_workaround() {
|
72 |
+
global $post;
|
73 |
+
|
74 |
if (
|
75 |
( defined( 'GUTENBERG_DEVELOPMENT_MODE' ) && GUTENBERG_DEVELOPMENT_MODE ) ||
|
76 |
( defined( 'GUTENBERG_VERSION' ) && version_compare( GUTENBERG_VERSION, '9.2', '>=' ) )
|
77 |
) {
|
78 |
+
// Workaround only needed when in the editor.
|
79 |
+
return isset( $post );
|
80 |
}
|
81 |
return false;
|
82 |
}
|
83 |
|
84 |
+
/**
|
85 |
+
* Determines whether the user should be included in trialing a new font-smoothing rule.
|
86 |
+
*
|
87 |
+
* @return bool True if antialiased font-smoothing rule should be applied.
|
88 |
+
*/
|
89 |
+
function use_font_smooth_antialiased() {
|
90 |
+
if ( defined( 'A8C_USE_FONT_SMOOTHING_ANTIALIASED' ) && A8C_USE_FONT_SMOOTHING_ANTIALIASED ) {
|
91 |
+
return true;
|
92 |
+
}
|
93 |
+
|
94 |
+
return apply_filters( 'a8c_use_font_smoothing_antialiased', false );
|
95 |
+
}
|
96 |
+
|
97 |
/**
|
98 |
* Detects if assets for the common module should be loaded.
|
99 |
*
|
106 |
* @return bool True if the common module assets should be loaded.
|
107 |
*/
|
108 |
function should_load_assets() {
|
109 |
+
return (bool) is_homepage_title_hidden() || needs_slider_width_workaround() || use_font_smooth_antialiased();
|
110 |
}
|
111 |
|
112 |
/**
|
120 |
$classes .= ' hide-homepage-title';
|
121 |
}
|
122 |
|
123 |
+
if ( needs_slider_width_workaround() ) {
|
124 |
+
$classes .= ' slider-width-workaround';
|
125 |
+
}
|
126 |
+
|
127 |
+
if ( use_font_smooth_antialiased() ) {
|
128 |
+
// Extra space needed because the `legacy-color-*` class isn't adding
|
129 |
+
// a leading space and breaking this class string.
|
130 |
+
$classes .= ' font-smoothing-antialiased ';
|
131 |
+
}
|
132 |
+
|
133 |
return $classes;
|
134 |
}
|
135 |
add_filter( 'admin_body_class', __NAMESPACE__ . '\admin_body_classes' );
|
163 |
filemtime( plugin_dir_path( __FILE__ ) . 'dist/' . $style_file )
|
164 |
);
|
165 |
}
|
166 |
+
add_action( 'admin_enqueue_scripts', __NAMESPACE__ . '\enqueue_script_and_style' );
|
167 |
|
168 |
/**
|
169 |
* Enable line-height settings for all themes with Gutenberg.
|
common/index.scss
CHANGED
@@ -1,12 +1,34 @@
|
|
1 |
body.hide-homepage-title {
|
2 |
-
|
3 |
// Allow homepage title to be edited even when hidden
|
4 |
// Lighter color to signify not visible from front page
|
5 |
.editor-post-title {
|
6 |
-
opacity: .4;
|
7 |
}
|
8 |
}
|
9 |
|
10 |
-
.
|
11 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12 |
}
|
1 |
body.hide-homepage-title {
|
|
|
2 |
// Allow homepage title to be edited even when hidden
|
3 |
// Lighter color to signify not visible from front page
|
4 |
.editor-post-title {
|
5 |
+
opacity: 0.4;
|
6 |
}
|
7 |
}
|
8 |
|
9 |
+
body.slider-width-workaround {
|
10 |
+
.interface-interface-skeleton__editor {
|
11 |
+
max-width: 100%;
|
12 |
+
}
|
13 |
+
}
|
14 |
+
|
15 |
+
%font-smoothing-antialiased {
|
16 |
+
text-rendering: optimizeLegibility;
|
17 |
+
-moz-osx-font-smoothing: grayscale;
|
18 |
+
-webkit-font-smoothing: antialiased;
|
19 |
+
}
|
20 |
+
|
21 |
+
body.font-smoothing-antialiased {
|
22 |
+
@extend %font-smoothing-antialiased;
|
23 |
+
|
24 |
+
// Overriding an existing core WP rule so the ID selector is necessary
|
25 |
+
// stylelint-disable-next-line selector-max-id
|
26 |
+
#wpwrap {
|
27 |
+
@extend %font-smoothing-antialiased;
|
28 |
+
}
|
29 |
+
|
30 |
+
// stylelint-disable-next-line selector-max-id
|
31 |
+
#wpadminbar * {
|
32 |
+
@extend %font-smoothing-antialiased;
|
33 |
+
}
|
34 |
}
|
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.7917
|
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.7917' );
|
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.
|
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.7917
|
7 |
Requires PHP: 5.6.20
|
8 |
License: GPLv2 or later
|
9 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|