Classic Editor - Version 1.3

Version Description

  • Fixed removal of the "Try Gutenberg" dashboard widget.
  • Fixed condition for displaying of the after upgrade notice on the "What's New" screen. Shown when the Classic Editor is selected and users cannot switch editors.
Download this release

Release Info

Developer azaozz
Plugin Icon 128x128 Classic Editor
Version 1.3
Comparing to
See all releases

Code changes from version 1.2 to 1.3

Files changed (3) hide show
  1. classic-editor.php +15 -8
  2. readme.txt +11 -6
  3. screenshot-1.png +0 -0
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.2
9
  * Author: WordPress Contributors
10
  * Author URI: https://github.com/WordPress/classic-editor/
11
  * License: GPLv2 or later
@@ -60,6 +60,9 @@ class Classic_Editor {
60
  }
61
  }
62
 
 
 
 
63
  if ( ! $block_editor && ! $gutenberg ) {
64
  return;
65
  }
@@ -117,8 +120,6 @@ class Classic_Editor {
117
  add_action( 'admin_init', array( __CLASS__, 'on_admin_init' ) );
118
  }
119
  if ( $gutenberg ) {
120
- // Always remove the "Try Gutenberg" dashboard widget. See https://core.trac.wordpress.org/ticket/44635.
121
- remove_action( 'try_gutenberg_panel', 'wp_try_gutenberg_panel' );
122
  // These are handled by this plugin.
123
  remove_action( 'admin_init', 'gutenberg_add_edit_link_filters' );
124
  remove_action( 'admin_print_scripts-edit.php', 'gutenberg_replace_default_add_new_button' );
@@ -468,16 +469,22 @@ class Classic_Editor {
468
  global $pagenow;
469
  $settings = self::get_settings();
470
 
471
- if ( $pagenow !== 'about.php' || $settings['hide-settings-ui'] || $settings['editor'] !== 'classic' ) {
472
- // No need to show when the settings are preset from another plugin or when not replacing the Block Editor.
 
 
 
 
 
 
 
 
473
  return;
474
  }
475
 
476
  $message = __( 'The Classic Editor plugin prevents use of the new Block Editor.', 'classic-editor' );
477
 
478
- if ( $settings['allow-users'] && current_user_can( 'edit_posts' ) ) {
479
- $message .= ' ' . sprintf( __( 'Change the %1$sClassic Editor settings%2$s on your User Profile page.', 'classic-editor' ), '<a href="profile.php#classic-editor-options">', '</a>' );
480
- } elseif ( current_user_can( 'manage_options' ) ) {
481
  $message .= ' ' . sprintf( __( 'Change the %1$sClassic Editor settings%2$s.', 'classic-editor' ), '<a href="options-writing.php#classic-editor-options">', '</a>' );
482
  }
483
 
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.3
9
  * Author: WordPress Contributors
10
  * Author URI: https://github.com/WordPress/classic-editor/
11
  * License: GPLv2 or later
60
  }
61
  }
62
 
63
+ // Always remove the "Try Gutenberg" dashboard widget. See https://core.trac.wordpress.org/ticket/44635.
64
+ remove_action( 'try_gutenberg_panel', 'wp_try_gutenberg_panel' );
65
+
66
  if ( ! $block_editor && ! $gutenberg ) {
67
  return;
68
  }
120
  add_action( 'admin_init', array( __CLASS__, 'on_admin_init' ) );
121
  }
122
  if ( $gutenberg ) {
 
 
123
  // These are handled by this plugin.
124
  remove_action( 'admin_init', 'gutenberg_add_edit_link_filters' );
125
  remove_action( 'admin_print_scripts-edit.php', 'gutenberg_replace_default_add_new_button' );
469
  global $pagenow;
470
  $settings = self::get_settings();
471
 
472
+ if (
473
+ $pagenow !== 'about.php' ||
474
+ $settings['hide-settings-ui'] ||
475
+ $settings['editor'] === 'block' ||
476
+ $settings['allow-users'] ||
477
+ ! current_user_can( 'edit_posts' )
478
+ ) {
479
+ // No need to show when the user cannot edit posts,
480
+ // the settings are preset from another plugin,
481
+ // or when not replacing the Block Editor.
482
  return;
483
  }
484
 
485
  $message = __( 'The Classic Editor plugin prevents use of the new Block Editor.', 'classic-editor' );
486
 
487
+ if ( current_user_can( 'manage_options' ) ) {
 
 
488
  $message .= ' ' . sprintf( __( 'Change the %1$sClassic Editor settings%2$s.', 'classic-editor' ), '<a href="options-writing.php#classic-editor-options">', '</a>' );
489
  }
490
 
readme.txt CHANGED
@@ -1,9 +1,9 @@
1
  === Classic Editor ===
2
- Contributors: azaozz, melchoyce, chanthaboune, alexislloyd, pento, youknowriad, desrosj, luciano-croce
3
- Tags: editor, classic editor, block editor, gutenberg
4
  Requires at least: 4.9
5
  Tested up to: 5.0
6
- Stable tag: 1.1
7
  Requires PHP: 5.2.4
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -13,7 +13,8 @@ Enables the previous "classic" editor and the old-style Edit Post screen with Ti
13
  == Description ==
14
 
15
  Classic Editor is an official plugin maintained by the WordPress team that restores the previous ("classic") WordPress editor and the "Edit Post" screen. It makes it possible to use plugins that extend that screen, add old-style meta boxes, or otherwise depend on the previous editor.
16
- By default, this plugin hides all functionality available in the new Block Editor ("Gutenberg").
 
17
 
18
  At a glance, this plugin adds the following:
19
 
@@ -24,10 +25,14 @@ At a glance, this plugin adds the following:
24
 
25
  In addition, the Classic Editor plugin includes several filters that let other plugins control the settings, and the editor choice per post and per post type.
26
 
27
- Classic Editor is an official WordPress plugin, and will be maintained until at least 2022.
28
 
29
  == Changelog ==
30
 
 
 
 
 
31
  = 1.2 =
32
  * Fixed switching editors from the Add New (post) screen before a draft post is saved.
33
  * Fixed typo that was appending the edit URL to the `classic-editor` query var.
@@ -56,7 +61,7 @@ Fixed a bug where it may attempt to load the Block Editor for post types that do
56
  = 0.5 =
57
  * Updated for Gutenberg 4.1 and WordPress 5.0-beta1.
58
  * Removed some functionality that now exists in Gutenberg.
59
- * Fixed redirecting back to the Classic editor after looking at post revisions.
60
 
61
  = 0.4 =
62
  * Fixed removing of the "Try Gutenberg" call-out when the Gutenberg plugin is not activated.
1
  === Classic Editor ===
2
+ Contributors: wordpressdotorg, azaozz, melchoyce, chanthaboune, alexislloyd, pento, youknowriad, desrosj, luciano-croce
3
+ Tags: gutenberg, disable, disable gutenberg, editor, classic editor, block editor
4
  Requires at least: 4.9
5
  Tested up to: 5.0
6
+ Stable tag: 1.3
7
  Requires PHP: 5.2.4
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
13
  == Description ==
14
 
15
  Classic Editor is an official plugin maintained by the WordPress team that restores the previous ("classic") WordPress editor and the "Edit Post" screen. It makes it possible to use plugins that extend that screen, add old-style meta boxes, or otherwise depend on the previous editor.
16
+
17
+ Classic Editor is an official WordPress plugin, and will be fully supported and maintained until at least 2022, or as long as is necessary.
18
 
19
  At a glance, this plugin adds the following:
20
 
25
 
26
  In addition, the Classic Editor plugin includes several filters that let other plugins control the settings, and the editor choice per post and per post type.
27
 
28
+ By default, this plugin hides all functionality available in the new Block Editor ("Gutenberg").
29
 
30
  == Changelog ==
31
 
32
+ = 1.3 =
33
+ * Fixed removal of the "Try Gutenberg" dashboard widget.
34
+ * Fixed condition for displaying of the after upgrade notice on the "What's New" screen. Shown when the Classic Editor is selected and users cannot switch editors.
35
+
36
  = 1.2 =
37
  * Fixed switching editors from the Add New (post) screen before a draft post is saved.
38
  * Fixed typo that was appending the edit URL to the `classic-editor` query var.
61
  = 0.5 =
62
  * Updated for Gutenberg 4.1 and WordPress 5.0-beta1.
63
  * Removed some functionality that now exists in Gutenberg.
64
+ * Fixed redirecting back to the Classic Editor after looking at post revisions.
65
 
66
  = 0.4 =
67
  * Fixed removing of the "Try Gutenberg" call-out when the Gutenberg plugin is not activated.
screenshot-1.png CHANGED
Binary file