Version Description
- 12/06/2018
- Fix: another solution for the bug related to the Edit Custom Code page was blank for WordPress 5.0 and the Classic Editor enabled
Download this release
Release Info
Developer | diana_burduja |
Plugin | Simple Custom CSS and JS |
Version | 3.22 |
Comparing to | |
See all releases |
Code changes from version 3.21 to 3.22
- custom-css-js.php +2 -3
- includes/admin-screens.php +16 -0
- readme.txt +5 -1
custom-css-js.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: Simple Custom CSS and JS
|
4 |
* Plugin URI: https://wordpress.org/plugins/custom-css-js/
|
5 |
* Description: Easily add Custom CSS or JS to your website with an awesome editor.
|
6 |
-
* Version: 3.
|
7 |
* Author: SilkyPress.com
|
8 |
* Author URI: https://www.silkypress.com
|
9 |
* License: GPL2
|
@@ -73,7 +73,6 @@ final class CustomCSSandJS {
|
|
73 |
$this->set_constants();
|
74 |
|
75 |
if ( is_admin() ) {
|
76 |
-
add_post_type_support('custom-css-js', 'editor');
|
77 |
$this->load_plugin_textdomain();
|
78 |
include_once( 'includes/admin-screens.php' );
|
79 |
include_once( 'includes/admin-config.php' );
|
@@ -203,7 +202,7 @@ final class CustomCSSandJS {
|
|
203 |
function set_constants() {
|
204 |
$dir = wp_upload_dir();
|
205 |
$constants = array(
|
206 |
-
'CCJ_VERSION' => '3.
|
207 |
'CCJ_UPLOAD_DIR' => $dir['basedir'] . '/custom-css-js',
|
208 |
'CCJ_UPLOAD_URL' => $dir['baseurl'] . '/custom-css-js',
|
209 |
'CCJ_PLUGIN_FILE' => __FILE__,
|
3 |
* Plugin Name: Simple Custom CSS and JS
|
4 |
* Plugin URI: https://wordpress.org/plugins/custom-css-js/
|
5 |
* Description: Easily add Custom CSS or JS to your website with an awesome editor.
|
6 |
+
* Version: 3.22
|
7 |
* Author: SilkyPress.com
|
8 |
* Author URI: https://www.silkypress.com
|
9 |
* License: GPL2
|
73 |
$this->set_constants();
|
74 |
|
75 |
if ( is_admin() ) {
|
|
|
76 |
$this->load_plugin_textdomain();
|
77 |
include_once( 'includes/admin-screens.php' );
|
78 |
include_once( 'includes/admin-config.php' );
|
202 |
function set_constants() {
|
203 |
$dir = wp_upload_dir();
|
204 |
$constants = array(
|
205 |
+
'CCJ_VERSION' => '3.22',
|
206 |
'CCJ_UPLOAD_DIR' => $dir['basedir'] . '/custom-css-js',
|
207 |
'CCJ_UPLOAD_URL' => $dir['baseurl'] . '/custom-css-js',
|
208 |
'CCJ_PLUGIN_FILE' => __FILE__,
|
includes/admin-screens.php
CHANGED
@@ -78,6 +78,10 @@ class CustomCSSandJS_Admin {
|
|
78 |
add_filter( 'manage_edit-custom-css-js_sortable_columns', array( $this, 'manage_edit_posts_sortable_columns' ) );
|
79 |
add_filter( 'post_row_actions', array( $this, 'post_row_actions' ), 10, 2 );
|
80 |
add_filter( 'parse_query', array($this, 'parse_query') , 10);
|
|
|
|
|
|
|
|
|
81 |
}
|
82 |
|
83 |
|
@@ -1392,6 +1396,18 @@ End of comment */ ', 'custom-css-js') . PHP_EOL . PHP_EOL;
|
|
1392 |
}
|
1393 |
}
|
1394 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1395 |
}
|
1396 |
|
1397 |
return new CustomCSSandJS_Admin();
|
78 |
add_filter( 'manage_edit-custom-css-js_sortable_columns', array( $this, 'manage_edit_posts_sortable_columns' ) );
|
79 |
add_filter( 'post_row_actions', array( $this, 'post_row_actions' ), 10, 2 );
|
80 |
add_filter( 'parse_query', array($this, 'parse_query') , 10);
|
81 |
+
|
82 |
+
|
83 |
+
add_action('current_screen', array($this, 'current_screen_2'), 100);
|
84 |
+
|
85 |
}
|
86 |
|
87 |
|
1396 |
}
|
1397 |
}
|
1398 |
|
1399 |
+
|
1400 |
+
/**
|
1401 |
+
* Fix for bug: white page Edit Custom Code for WordPress 5.0 with Classic Editor
|
1402 |
+
*/
|
1403 |
+
function current_screen_2() {
|
1404 |
+
$screen = get_current_screen();
|
1405 |
+
|
1406 |
+
if ( $screen->post_type != 'custom-css-js' )
|
1407 |
+
return false;
|
1408 |
+
|
1409 |
+
remove_filter( 'use_block_editor_for_post', array( 'Classic_Editor', 'choose_editor' ), 100, 2 );
|
1410 |
+
}
|
1411 |
}
|
1412 |
|
1413 |
return new CustomCSSandJS_Admin();
|
readme.txt
CHANGED
@@ -5,7 +5,7 @@ Email: diana@burduja.eu
|
|
5 |
Tags: CSS, JS, javascript, custom CSS, custom JS, custom style, site css, add style, customize theme, custom code, external css, css3, style, styles, stylesheet, theme, editor, design, admin
|
6 |
Requires at least: 3.0.1
|
7 |
Tested up to: 5.0
|
8 |
-
Stable tag: 3.
|
9 |
License: GPLv3
|
10 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
11 |
Requires PHP: 5.2.4
|
@@ -105,6 +105,10 @@ $. Add/Edit HTML
|
|
105 |
|
106 |
== Changelog ==
|
107 |
|
|
|
|
|
|
|
|
|
108 |
= 3.21 =
|
109 |
* 12/06/2018
|
110 |
* Fix: the Edit Custom Code page was blank for WordPress 5.0 and the Classic Editor enabled
|
5 |
Tags: CSS, JS, javascript, custom CSS, custom JS, custom style, site css, add style, customize theme, custom code, external css, css3, style, styles, stylesheet, theme, editor, design, admin
|
6 |
Requires at least: 3.0.1
|
7 |
Tested up to: 5.0
|
8 |
+
Stable tag: 3.22
|
9 |
License: GPLv3
|
10 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
11 |
Requires PHP: 5.2.4
|
105 |
|
106 |
== Changelog ==
|
107 |
|
108 |
+
= 3.22 =
|
109 |
+
* 12/06/2018
|
110 |
+
* Fix: another solution for the bug related to the Edit Custom Code page was blank for WordPress 5.0 and the Classic Editor enabled
|
111 |
+
|
112 |
= 3.21 =
|
113 |
* 12/06/2018
|
114 |
* Fix: the Edit Custom Code page was blank for WordPress 5.0 and the Classic Editor enabled
|