Version Description
- 03/15/2019
- Fix: avoid conflicts with other plugins that use CodeMirror as their editor
Download this release
Release Info
Developer | diana_burduja |
Plugin | Simple Custom CSS and JS |
Version | 3.23 |
Comparing to | |
See all releases |
Code changes from version 3.22 to 3.23
- assets/ccj_admin.js +3 -3
- custom-css-js.php +2 -2
- includes/admin-screens.php +1 -1
- readme.txt +10 -6
assets/ccj_admin.js
CHANGED
@@ -3,8 +3,8 @@ jQuery(document).ready( function($) {
|
|
3 |
$('.page-title-action').hide();
|
4 |
|
5 |
// Initialize the CodeMirror editor
|
6 |
-
if ( $('#
|
7 |
-
var content_mode = $("#
|
8 |
if ( content_mode == 'html' ) {
|
9 |
var content_mode = {
|
10 |
name: "htmlmixed",
|
@@ -28,7 +28,7 @@ jQuery(document).ready( function($) {
|
|
28 |
var cm_width = $('#title').width() + 16;
|
29 |
var cm_height = 500;
|
30 |
|
31 |
-
var editor = CodeMirror.fromTextArea(document.getElementById("
|
32 |
|
33 |
editor.setSize(cm_width, cm_height);
|
34 |
|
3 |
$('.page-title-action').hide();
|
4 |
|
5 |
// Initialize the CodeMirror editor
|
6 |
+
if ( $('#ccj_content').length > 0 ) {
|
7 |
+
var content_mode = $("#ccj_content").attr('mode');
|
8 |
if ( content_mode == 'html' ) {
|
9 |
var content_mode = {
|
10 |
name: "htmlmixed",
|
28 |
var cm_width = $('#title').width() + 16;
|
29 |
var cm_height = 500;
|
30 |
|
31 |
+
var editor = CodeMirror.fromTextArea(document.getElementById("ccj_content"), options);
|
32 |
|
33 |
editor.setSize(cm_width, cm_height);
|
34 |
|
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
|
@@ -202,7 +202,7 @@ final class CustomCSSandJS {
|
|
202 |
function set_constants() {
|
203 |
$dir = wp_upload_dir();
|
204 |
$constants = array(
|
205 |
-
'CCJ_VERSION' => '3.
|
206 |
'CCJ_UPLOAD_DIR' => $dir['basedir'] . '/custom-css-js',
|
207 |
'CCJ_UPLOAD_URL' => $dir['baseurl'] . '/custom-css-js',
|
208 |
'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.23
|
7 |
* Author: SilkyPress.com
|
8 |
* Author URI: https://www.silkypress.com
|
9 |
* License: GPL2
|
202 |
function set_constants() {
|
203 |
$dir = wp_upload_dir();
|
204 |
$constants = array(
|
205 |
+
'CCJ_VERSION' => '3.23',
|
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
@@ -687,7 +687,7 @@ End of comment */ ', 'custom-css-js') . PHP_EOL . PHP_EOL;
|
|
687 |
<form style="position: relative; margin-top: .5em;">
|
688 |
|
689 |
<div class="code-mirror-before"><div><?php echo htmlentities( $code_mirror_before );?></div></div>
|
690 |
-
<textarea class="wp-editor-area" id="
|
691 |
<div class="code-mirror-after"><div><?php echo htmlentities( $code_mirror_after );?></div></div>
|
692 |
|
693 |
<table id="post-status-info"><tbody><tr>
|
687 |
<form style="position: relative; margin-top: .5em;">
|
688 |
|
689 |
<div class="code-mirror-before"><div><?php echo htmlentities( $code_mirror_before );?></div></div>
|
690 |
+
<textarea class="wp-editor-area" id="ccj_content" mode="<?php echo htmlentities($code_mirror_mode); ?>" name="content"><?php echo $post->post_content; ?></textarea>
|
691 |
<div class="code-mirror-after"><div><?php echo htmlentities( $code_mirror_after );?></div></div>
|
692 |
|
693 |
<table id="post-status-info"><tbody><tr>
|
readme.txt
CHANGED
@@ -4,8 +4,8 @@ Contributors: diana_burduja
|
|
4 |
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.
|
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.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
|
@@ -281,11 +285,11 @@ $. Add/Edit HTML
|
|
281 |
* Fix: the number of codes were limited because query_posts is automatically inserting a limit
|
282 |
|
283 |
= 1.5 =
|
284 |
-
* 10/
|
285 |
* Fix: solved a conflict with the `shortcoder` plugin.
|
286 |
|
287 |
= 1.4 =
|
288 |
-
* 04/
|
289 |
* Tweak: Do not enqueue scripts unless we are editing the a custom-css-js type post.
|
290 |
* Fix: The register_activation_hook was throwing a notice
|
291 |
* Fix: add window.onload when initializing the CodeMirror editor
|
@@ -295,14 +299,14 @@ $. Add/Edit HTML
|
|
295 |
* Tweak: use the compressed version of CodeMirror
|
296 |
|
297 |
= 1.3 =
|
298 |
-
* 27/
|
299 |
* Tweak: changed the submenus to "Add Custom CSS" and "Add Custom JS" instead of "New Custom Code"
|
300 |
* Tweak: Use `admin_head` instead of `admin_enqueue_scripts` for external files in order to add priority to the code
|
301 |
* Fix: The javascript code was not shown
|
302 |
* Fix: For longer code the last line in the editor was hidding because of the CodeMirrorBefore div.
|
303 |
|
304 |
= 1.2 =
|
305 |
-
* 14/
|
306 |
* Fix: when a code was sent into Trash it still wasn't shown on the website
|
307 |
|
308 |
= 1.1 =
|
4 |
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.1
|
8 |
+
Stable tag: 3.23
|
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.23 =
|
109 |
+
* 03/15/2019
|
110 |
+
* Fix: avoid conflicts with other plugins that use CodeMirror as their editor
|
111 |
+
|
112 |
= 3.22 =
|
113 |
* 12/06/2018
|
114 |
* Fix: another solution for the bug related to the Edit Custom Code page was blank for WordPress 5.0 and the Classic Editor enabled
|
285 |
* Fix: the number of codes were limited because query_posts is automatically inserting a limit
|
286 |
|
287 |
= 1.5 =
|
288 |
+
* 03/10/2016
|
289 |
* Fix: solved a conflict with the `shortcoder` plugin.
|
290 |
|
291 |
= 1.4 =
|
292 |
+
* 01/04/2016
|
293 |
* Tweak: Do not enqueue scripts unless we are editing the a custom-css-js type post.
|
294 |
* Fix: The register_activation_hook was throwing a notice
|
295 |
* Fix: add window.onload when initializing the CodeMirror editor
|
299 |
* Tweak: use the compressed version of CodeMirror
|
300 |
|
301 |
= 1.3 =
|
302 |
+
* 12/27/2015
|
303 |
* Tweak: changed the submenus to "Add Custom CSS" and "Add Custom JS" instead of "New Custom Code"
|
304 |
* Tweak: Use `admin_head` instead of `admin_enqueue_scripts` for external files in order to add priority to the code
|
305 |
* Fix: The javascript code was not shown
|
306 |
* Fix: For longer code the last line in the editor was hidding because of the CodeMirrorBefore div.
|
307 |
|
308 |
= 1.2 =
|
309 |
+
* 12/14/2015
|
310 |
* Fix: when a code was sent into Trash it still wasn't shown on the website
|
311 |
|
312 |
= 1.1 =
|