Version Description
- Fixed bug that was preventing saving of the last used editor.
Download this release
Release Info
Developer | azaozz |
Plugin | Classic Editor |
Version | 1.6.2 |
Comparing to | |
See all releases |
Code changes from version 1.6.1 to 1.6.2
- classic-editor.php +16 -3
- readme.txt +4 -1
classic-editor.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* Plugin Name: Classic Editor
|
6 |
* Plugin URI: https://wordpress.org/plugins/classic-editor/
|
7 |
* Description: Enables the WordPress classic editor and the old-style Edit Post screen with TinyMCE, Meta Boxes, etc. Supports the older plugins that extend this screen.
|
8 |
-
* Version: 1.6.
|
9 |
* Author: WordPress Contributors
|
10 |
* Author URI: https://github.com/WordPress/classic-editor/
|
11 |
* License: GPLv2 or later
|
@@ -88,7 +88,12 @@ class Classic_Editor {
|
|
88 |
add_action( 'admin_head-edit.php', array( __CLASS__, 'add_edit_php_inline_style' ) );
|
89 |
|
90 |
add_action( 'edit_form_top', array( __CLASS__, 'remember_classic_editor' ) );
|
91 |
-
|
|
|
|
|
|
|
|
|
|
|
92 |
|
93 |
// Post state (edit.php)
|
94 |
add_filter( 'display_post_states', array( __CLASS__, 'add_post_state' ), 10, 2 );
|
@@ -541,7 +546,15 @@ class Classic_Editor {
|
|
541 |
/**
|
542 |
* Remember when the block editor was used to edit a post.
|
543 |
*/
|
544 |
-
public static function remember_block_editor( $editor_settings, $
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
545 |
$post_type = get_post_type( $post );
|
546 |
|
547 |
if ( $post_type && self::can_edit_post_type( $post_type ) ) {
|
5 |
* Plugin Name: Classic Editor
|
6 |
* Plugin URI: https://wordpress.org/plugins/classic-editor/
|
7 |
* Description: Enables the WordPress classic editor and the old-style Edit Post screen with TinyMCE, Meta Boxes, etc. Supports the older plugins that extend this screen.
|
8 |
+
* Version: 1.6.2
|
9 |
* Author: WordPress Contributors
|
10 |
* Author URI: https://github.com/WordPress/classic-editor/
|
11 |
* License: GPLv2 or later
|
88 |
add_action( 'admin_head-edit.php', array( __CLASS__, 'add_edit_php_inline_style' ) );
|
89 |
|
90 |
add_action( 'edit_form_top', array( __CLASS__, 'remember_classic_editor' ) );
|
91 |
+
|
92 |
+
if ( version_compare( $GLOBALS['wp_version'], '5.8', '>=' ) ) {
|
93 |
+
add_filter( 'block_editor_settings_all', array( __CLASS__, 'remember_block_editor' ), 10, 2 );
|
94 |
+
} else {
|
95 |
+
add_filter( 'block_editor_settings', array( __CLASS__, 'remember_block_editor' ), 10, 2 );
|
96 |
+
}
|
97 |
|
98 |
// Post state (edit.php)
|
99 |
add_filter( 'display_post_states', array( __CLASS__, 'add_post_state' ), 10, 2 );
|
546 |
/**
|
547 |
* Remember when the block editor was used to edit a post.
|
548 |
*/
|
549 |
+
public static function remember_block_editor( $editor_settings, $context ) {
|
550 |
+
if ( is_a( $context, 'WP_Post' ) ) {
|
551 |
+
$post = $context;
|
552 |
+
} elseif ( ! empty( $context->post ) ) {
|
553 |
+
$post = $context->post;
|
554 |
+
} else {
|
555 |
+
return $editor_settings;
|
556 |
+
}
|
557 |
+
|
558 |
$post_type = get_post_type( $post );
|
559 |
|
560 |
if ( $post_type && self::can_edit_post_type( $post_type ) ) {
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: wordpressdotorg, azaozz, melchoyce, chanthaboune, alexislloyd, pen
|
|
3 |
Tags: gutenberg, disable, disable gutenberg, editor, classic editor, block editor
|
4 |
Requires at least: 4.9
|
5 |
Tested up to: 5.8
|
6 |
-
Stable tag: 1.6.
|
7 |
Requires PHP: 5.2.4
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
@@ -29,6 +29,9 @@ By default, this plugin hides all functionality available in the new block edito
|
|
29 |
|
30 |
== Changelog ==
|
31 |
|
|
|
|
|
|
|
32 |
= 1.6.1 =
|
33 |
* Fixed a warning on the block editor based widgets screen.
|
34 |
* Fixed use of a deprecated filter.
|
3 |
Tags: gutenberg, disable, disable gutenberg, editor, classic editor, block editor
|
4 |
Requires at least: 4.9
|
5 |
Tested up to: 5.8
|
6 |
+
Stable tag: 1.6.2
|
7 |
Requires PHP: 5.2.4
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
29 |
|
30 |
== Changelog ==
|
31 |
|
32 |
+
= 1.6.2 =
|
33 |
+
* Fixed bug that was preventing saving of the last used editor.
|
34 |
+
|
35 |
= 1.6.1 =
|
36 |
* Fixed a warning on the block editor based widgets screen.
|
37 |
* Fixed use of a deprecated filter.
|