Version Description
- November 23, 2022
- use consistent function prefixes
- change FAQ readme
Download this release
Release Info
Developer | senlin |
Plugin | Classic Editor Addon |
Version | 4.0.1 |
Comparing to | |
See all releases |
Code changes from version 3.1.0 to 4.0.1
- classic-editor-addon.php +29 -44
- readme.txt +29 -16
classic-editor-addon.php
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
* Plugin Name: Classic Editor
|
4 |
-
* Description: The "Classic Editor
|
5 |
|
6 |
* Author: <a href="https://so-wp.com">Pieter Bos</a>, <a href="https://gschoppe.com">Greg Schoppe</a>
|
7 |
-
* Version:
|
8 |
|
9 |
* Requires at least: 4.9
|
10 |
* Tested up to: 6.1
|
@@ -25,59 +25,29 @@
|
|
25 |
// don't load the plugin file directly
|
26 |
if ( ! defined( 'ABSPATH' ) ) exit;
|
27 |
|
28 |
-
//
|
29 |
-
add_action( 'admin_init', '
|
30 |
-
function
|
31 |
-
if ( is_admin() && current_user_can( 'activate_plugins' ) &&
|
32 |
-
add_action( 'admin_notices', 'cea_plugin_notice' );
|
33 |
|
34 |
-
deactivate_plugins(
|
35 |
|
36 |
-
if ( isset( $_GET['activate'] ) ) {
|
37 |
-
unset( $_GET['activate'] );
|
38 |
-
}
|
39 |
}
|
40 |
}
|
41 |
|
42 |
-
|
43 |
-
|
44 |
-
printf( '<div class="error"><p>' . __( 'Classic Editor Addon plugin requires the <a href="%s">Classic Editor plugin</a> to be installed and active.', 'classic-editor-addon' ) . '</p></div>', admin_url( 'plugin-install.php?s=classic%20editor&tab=search&type=term', 'https' ) );
|
45 |
-
}
|
46 |
-
|
47 |
-
add_action( 'plugins_loaded', 'classic_editor_addon_post_init', 20, 0 );
|
48 |
-
|
49 |
-
function classic_editor_addon_post_init() {
|
50 |
-
|
51 |
-
if ( class_exists( 'Classic_Editor' ) ) {
|
52 |
-
/**
|
53 |
-
* Remove Settings link to the settings from the Plugins screen.
|
54 |
-
*/
|
55 |
-
remove_filter( 'plugin_action_links', array( 'Classic_Editor', 'add_settings_link' ) );
|
56 |
-
remove_action( 'admin_init', array( 'Classic_Editor', 'register_settings' ) );
|
57 |
-
|
58 |
-
/**
|
59 |
-
* Bring back Classic Widgets
|
60 |
-
*
|
61 |
-
* @since 3.1.0
|
62 |
-
* @src: https://plugins.svn.wordpress.org/classic-widgets/tags/0.3/classic-widgets.php
|
63 |
-
*/
|
64 |
-
// Disable the block editor from managing widgets in the Gutenberg plugin.
|
65 |
-
add_filter( 'gutenberg_use_widgets_block_editor', '__return_false' );
|
66 |
-
// Disable the block editor from managing widgets.
|
67 |
-
add_filter( 'use_widgets_block_editor', '__return_false' );
|
68 |
-
}
|
69 |
-
|
70 |
-
}
|
71 |
-
|
72 |
-
add_action( 'wp_enqueue_scripts', 'classic_editor_addon_remove_block_styles', 100 );
|
73 |
|
74 |
-
function
|
75 |
|
76 |
wp_dequeue_style( 'wp-block-library' );
|
77 |
wp_deregister_style( 'wp-block-library' );
|
78 |
|
79 |
wp_dequeue_style( 'wp-block-library-theme' );
|
80 |
wp_deregister_style( 'wp-block-library-theme' );
|
|
|
|
|
|
|
|
|
81 |
|
82 |
// @2.5.0 add condition that checks for WooCommerce and removes call to block styles
|
83 |
if ( class_exists( 'woocommerce' ) ) {
|
@@ -86,3 +56,18 @@ function classic_editor_addon_remove_block_styles() {
|
|
86 |
}
|
87 |
|
88 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
<?php
|
2 |
/**
|
3 |
+
* Plugin Name: Classic Editor Plus
|
4 |
+
* Description: The "Classic Editor Plus" plugin removes enqueued scripts/styles and brings back classic Widgets.
|
5 |
|
6 |
* Author: <a href="https://so-wp.com">Pieter Bos</a>, <a href="https://gschoppe.com">Greg Schoppe</a>
|
7 |
+
* Version: 4.0.1
|
8 |
|
9 |
* Requires at least: 4.9
|
10 |
* Tested up to: 6.1
|
25 |
// don't load the plugin file directly
|
26 |
if ( ! defined( 'ABSPATH' ) ) exit;
|
27 |
|
28 |
+
// deactivate Classic Editor plugin
|
29 |
+
add_action( 'admin_init', 'cea_deactivate_ce' );
|
30 |
+
function cea_deactivate_ce() {
|
31 |
+
if ( is_admin() && current_user_can( 'activate_plugins' ) && is_plugin_active( 'classic-editor/classic-editor.php' ) ) {
|
|
|
32 |
|
33 |
+
deactivate_plugins( 'classic-editor/classic-editor.php' );
|
34 |
|
|
|
|
|
|
|
35 |
}
|
36 |
}
|
37 |
|
38 |
+
add_action( 'wp_enqueue_scripts', 'cea_remove_block_styles', 100 );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
39 |
|
40 |
+
function cea_remove_block_styles() {
|
41 |
|
42 |
wp_dequeue_style( 'wp-block-library' );
|
43 |
wp_deregister_style( 'wp-block-library' );
|
44 |
|
45 |
wp_dequeue_style( 'wp-block-library-theme' );
|
46 |
wp_deregister_style( 'wp-block-library-theme' );
|
47 |
+
|
48 |
+
// Remove inline global CSS on the front end.
|
49 |
+
wp_dequeue_style( 'global-styles' );
|
50 |
+
wp_deregister_style( 'global-styles' );
|
51 |
|
52 |
// @2.5.0 add condition that checks for WooCommerce and removes call to block styles
|
53 |
if ( class_exists( 'woocommerce' ) ) {
|
56 |
}
|
57 |
|
58 |
}
|
59 |
+
|
60 |
+
// Disable Gutenberg on the back end.
|
61 |
+
add_filter( 'use_block_editor_for_post', '__return_false' );
|
62 |
+
|
63 |
+
/**
|
64 |
+
* Bring back Classic Widgets
|
65 |
+
*
|
66 |
+
* @since 3.1.0
|
67 |
+
* @src: https://plugins.svn.wordpress.org/classic-widgets/tags/0.3/classic-widgets.php
|
68 |
+
*/
|
69 |
+
// Disable the block editor from managing widgets in the Gutenberg plugin.
|
70 |
+
add_filter( 'gutenberg_use_widgets_block_editor', '__return_false' );
|
71 |
+
// Disable the block editor from managing widgets.
|
72 |
+
add_filter( 'use_widgets_block_editor', '__return_false' );
|
73 |
+
|
readme.txt
CHANGED
@@ -1,57 +1,58 @@
|
|
1 |
-
=== Classic Editor
|
2 |
Contributors: senlin, gschoppe
|
3 |
Tags: gutenberg, block editor, classic editor, addon, wordpress 5.0, woocommerce, classic widgets
|
4 |
Requires at least: 4.9
|
5 |
Requires PHP: 5.6
|
6 |
Tested up to: 6.1
|
7 |
-
Stable tag:
|
8 |
License: GPL-3.0+
|
9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.txt
|
10 |
|
11 |
-
The "Classic Editor
|
12 |
|
13 |
== Description ==
|
14 |
|
15 |
> GDPR-compliant: does not collect any user data
|
16 |
|
17 |
-
The free Classic Editor
|
18 |
|
19 |
<strong>What's New:</strong>
|
20 |
-
|
21 |
|
22 |
-
The reason I released the "Classic Editor
|
23 |
|
24 |
Since version 0.0.4 of the "Classic Editor" plugin, it finally set the default setting to actually using the Classic Editor. It still contains a Settings page though and if the purpose of people is to get the Classic Editor instead of using the new block editor, then there is no need for such a Settings page.
|
25 |
|
26 |
Also, looking at developers protecting the sites of their clients with the Classic Editor, they certainly don't want their clients to accidentally turn off the Classic Editor as the new block editor adds a lot of undesirable html comments, tags and what not to the content.
|
27 |
|
28 |
-
Sites running WooCommerce get another style added to the <code><head></code> section of the site. With
|
29 |
|
30 |
-
|
31 |
|
32 |
-
Therefore I highly recommend installing this "Classic Editor
|
33 |
|
34 |
I support this plugin exclusively through [Github](https://github.com/senlin/classic-editor-addon/issues). Therefore, if you have any questions, need help and/or want to make a feature request, please open an issue here. You can also browse through open and closed issues to find what you are looking for and perhaps even help others.
|
35 |
|
36 |
Thanks for your understanding and cooperation.
|
37 |
|
38 |
-
If you like the Classic Editor
|
39 |
|
40 |
-
Classic Editor
|
41 |
|
42 |
== Frequently Asked Questions ==
|
43 |
|
44 |
-
= What is
|
45 |
|
46 |
The release of WordPress 5.0 came with a replacement of the TinyMCE editor you had gotten used to for adding or editing content. Some find it an improvement, others don't. More information can be found on the [WP 5.0 release post](https://wordpress.org/news/2018/12/bebo/).
|
47 |
|
48 |
-
= Why this
|
49 |
|
50 |
-
|
|
|
51 |
|
52 |
-
=
|
53 |
|
54 |
-
|
55 |
|
56 |
= I have an issue with this plugin, where can I get support? =
|
57 |
|
@@ -59,6 +60,18 @@ Please open an issue on [Github](https://github.com/senlin/classic-editor-addon/
|
|
59 |
|
60 |
== Changelog ==
|
61 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
62 |
= 3.1.0 =
|
63 |
|
64 |
* October 27, 2022
|
1 |
+
=== Classic Editor Plus ===
|
2 |
Contributors: senlin, gschoppe
|
3 |
Tags: gutenberg, block editor, classic editor, addon, wordpress 5.0, woocommerce, classic widgets
|
4 |
Requires at least: 4.9
|
5 |
Requires PHP: 5.6
|
6 |
Tested up to: 6.1
|
7 |
+
Stable tag: 4.0.1
|
8 |
License: GPL-3.0+
|
9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.txt
|
10 |
|
11 |
+
The "Classic Editor Plus" plugin removes enqueued scripts/styles and brings back classic Widgets.
|
12 |
|
13 |
== Description ==
|
14 |
|
15 |
> GDPR-compliant: does not collect any user data
|
16 |
|
17 |
+
The free Classic Editor Plus plugin is targeted at everyone who does not want to use the WP Block Editor (Gutenberg), introduced in WordPress 5.0. Install it now on sites and the UX remains the same as you are used to without redundant styling being added to the frontend of your site!
|
18 |
|
19 |
<strong>What's New:</strong>
|
20 |
+
No longer dependent on Classic Editor plugin; you may remove it.
|
21 |
|
22 |
+
The reason I released the "Classic Editor Plus" plugin is because in the beginning the "Classic Editor" plugin did not what it said on the label.
|
23 |
|
24 |
Since version 0.0.4 of the "Classic Editor" plugin, it finally set the default setting to actually using the Classic Editor. It still contains a Settings page though and if the purpose of people is to get the Classic Editor instead of using the new block editor, then there is no need for such a Settings page.
|
25 |
|
26 |
Also, looking at developers protecting the sites of their clients with the Classic Editor, they certainly don't want their clients to accidentally turn off the Classic Editor as the new block editor adds a lot of undesirable html comments, tags and what not to the content.
|
27 |
|
28 |
+
Sites running WooCommerce get another style added to the <code><head></code> section of the site. With Classic Editor Plus installed that call is obviously redundant. With version 2.5.0 I introduced a condition that checks for WooCommerce and if active it removes that call. Win!
|
29 |
|
30 |
+
With version 3.1.0 Classic Widgets are back and version 4.0 has seen a complete rewrite of the plugin where the dependency on the Classic Editor plugin has been completely removed.
|
31 |
|
32 |
+
Therefore I highly recommend installing this "Classic Editor Plus" plugin.
|
33 |
|
34 |
I support this plugin exclusively through [Github](https://github.com/senlin/classic-editor-addon/issues). Therefore, if you have any questions, need help and/or want to make a feature request, please open an issue here. You can also browse through open and closed issues to find what you are looking for and perhaps even help others.
|
35 |
|
36 |
Thanks for your understanding and cooperation.
|
37 |
|
38 |
+
If you like the Classic Editor Plus plugin, please consider leaving a [review](https://wordpress.org/support/view/plugin-reviews/classic-editor-addon?rate=5#postform). Thanks!
|
39 |
|
40 |
+
Classic Editor Plus by [Pieter Bos](https://so-wp.com/plugin/classic-editor-addon) and [Greg Schoppe](https://gschoppe.com).
|
41 |
|
42 |
== Frequently Asked Questions ==
|
43 |
|
44 |
+
= What is the WP block editor? =
|
45 |
|
46 |
The release of WordPress 5.0 came with a replacement of the TinyMCE editor you had gotten used to for adding or editing content. Some find it an improvement, others don't. More information can be found on the [WP 5.0 release post](https://wordpress.org/news/2018/12/bebo/).
|
47 |
|
48 |
+
= Why this plugin? Isn't the purpose of the Classic Editor plugin to disable the new block editor? =
|
49 |
|
50 |
+
The Classic Editor plugin does not remove any of the frontend styling, even when one selects the option to disable the block editor. In terms of site optimisation that is not good practice.
|
51 |
+
This "Classic Editor Plus" simply removes the block editor and all its styling from both frontend and backend and if your site uses WooCommerce, it also removes block styling related to that from the frontend.
|
52 |
|
53 |
+
= Do I still need the Classic Editor plugin on my site? =
|
54 |
|
55 |
+
Version 4.0 of the Classic Editor Plus plugin has been a complete rewrite (and simplification) and it is no longer depending on the Classic Editor plugin. When the latter is active, it will be deactivated and then you can safely remove it.
|
56 |
|
57 |
= I have an issue with this plugin, where can I get support? =
|
58 |
|
60 |
|
61 |
== Changelog ==
|
62 |
|
63 |
+
= 4.0.1 =
|
64 |
+
|
65 |
+
* November 23, 2022
|
66 |
+
* use consistent function prefixes
|
67 |
+
* change FAQ readme
|
68 |
+
|
69 |
+
= 4.0 =
|
70 |
+
|
71 |
+
* November 22, 2022
|
72 |
+
* complete rewrite where dependency on Classic Editor plugin is removed
|
73 |
+
* rename plugin
|
74 |
+
|
75 |
= 3.1.0 =
|
76 |
|
77 |
* October 27, 2022
|