Simple Custom CSS and JS - Version 3.35

Version Description

  • 01/19/2021
  • Tweak: change dummy revision dates to fictional dates before 2000
  • Fix: replace the deprecated postL10n JS object with wp.i18n
  • Fix: add "tipsy-no-html" to the tooltips on the settings page
Download this release

Release Info

Developer diana_burduja
Plugin Icon 128x128 Simple Custom CSS and JS
Version 3.35
Comparing to
See all releases

Code changes from version 3.34.1 to 3.35

assets/ccj_admin.js CHANGED
@@ -268,14 +268,14 @@ jQuery(document).ready( function($) {
268
  $el = $( '#editable-post-name' );
269
  revert_e = $el.html();
270
 
271
- if ( typeof postL10n === 'undefined' ) {
272
  postL10n = {
273
  ok : wp.i18n.__( 'OK' ),
274
  cancel : wp.i18n.__( 'Cancel' ),
275
  }
276
  }
277
 
278
- buttons.html( '<button type="button" class="save button button-small">' + postL10n.ok + '</button> <button type="button" class="cancel button- link">' + postL10n.cancel + '</button>' );
279
 
280
 
281
  // Save permalink changes.
268
  $el = $( '#editable-post-name' );
269
  revert_e = $el.html();
270
 
271
+ if ( typeof postL10n === 'undefined' || postL10n.cancel === '' || postL10n.ok === '' ) {
272
  postL10n = {
273
  ok : wp.i18n.__( 'OK' ),
274
  cancel : wp.i18n.__( 'Cancel' ),
275
  }
276
  }
277
 
278
+ buttons.html( '<button type="button" class="save button button-small">' + postL10n.ok + '</button> <button type="button" class="cancel button-link">' + postL10n.cancel + '</button>' );
279
 
280
 
281
  // Save permalink changes.
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.34.1
7
  * Author: SilkyPress.com
8
  * Author URI: https://www.silkypress.com
9
  * License: GPL2
@@ -228,7 +228,7 @@ if ( ! class_exists( 'CustomCSSandJS' ) ) :
228
  function set_constants() {
229
  $dir = wp_upload_dir();
230
  $constants = array(
231
- 'CCJ_VERSION' => '3.34.1',
232
  'CCJ_UPLOAD_DIR' => $dir['basedir'] . '/custom-css-js',
233
  'CCJ_UPLOAD_URL' => $dir['baseurl'] . '/custom-css-js',
234
  '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.35
7
  * Author: SilkyPress.com
8
  * Author URI: https://www.silkypress.com
9
  * License: GPL2
228
  function set_constants() {
229
  $dir = wp_upload_dir();
230
  $constants = array(
231
+ 'CCJ_VERSION' => '3.35',
232
  'CCJ_UPLOAD_DIR' => $dir['basedir'] . '/custom-css-js',
233
  'CCJ_UPLOAD_URL' => $dir['baseurl'] . '/custom-css-js',
234
  'CCJ_PLUGIN_FILE' => __FILE__,
includes/admin-addons.php CHANGED
@@ -117,17 +117,17 @@ class CustomCSSandJS_Addons {
117
  array(
118
  'ID' => 1,
119
  'post_author' => $users[0]->display_name,
120
- 'title' => date_i18n( $datef, time() - 86400 ),
121
  ),
122
  array(
123
  'ID' => 2,
124
  'post_author' => isset($users[1]) ? $users[1]->display_name : $users[0]->display_name,
125
- 'title' => date_i18n( $datef, time() - 87639),
126
  ),
127
  array(
128
  'ID' => 3,
129
  'post_author' => isset($users[2]) ? $users[2]->display_name : $users[0]->display_name,
130
- 'title' => date_i18n( $datef, time() - 97639),
131
  ),
132
  );
133
  ?>
@@ -168,7 +168,8 @@ class CustomCSSandJS_Addons {
168
  <td>
169
  <input type="button" class="button-secondary" value="<?php esc_attr_e('Compare', 'custom-css-js'); ?>" id="revisions-compare-button" />
170
  </td>
171
- <td colspan="2" style="text-align: center;"> &uarr; This is only an example, not real data. &uarr; </td>
 
172
  <td>
173
  <input type="button" class="button-secondary" value="<?php esc_attr_e('Delete', 'custom-css-js'); ?>" id="revisions-delete-button" />
174
  </td>
117
  array(
118
  'ID' => 1,
119
  'post_author' => $users[0]->display_name,
120
+ 'title' => date_i18n( $datef, mktime( 8, 3, 0, 3, 20, 1996 ) ),
121
  ),
122
  array(
123
  'ID' => 2,
124
  'post_author' => isset($users[1]) ? $users[1]->display_name : $users[0]->display_name,
125
+ 'title' => date_i18n( $datef, mktime( 8, 20, 0, 6, 20, 1997 ) ),
126
  ),
127
  array(
128
  'ID' => 3,
129
  'post_author' => isset($users[2]) ? $users[2]->display_name : $users[0]->display_name,
130
+ 'title' => date_i18n( $datef, mktime( 5, 37, 0, 9, 22, 1998 ) ),
131
  ),
132
  );
133
  ?>
168
  <td>
169
  <input type="button" class="button-secondary" value="<?php esc_attr_e('Compare', 'custom-css-js'); ?>" id="revisions-compare-button" />
170
  </td>
171
+ <td colspan="2" style="text-align: center;"> <p>&uarr; This is only an example, not real data. &uarr; </p>
172
+ <p>Note: currently the revisions are not being saved. They start getting saved at the moment the plugin's pro version is installed.</td>
173
  <td>
174
  <input type="button" class="button-secondary" value="<?php esc_attr_e('Delete', 'custom-css-js'); ?>" id="revisions-delete-button" />
175
  </td>
includes/admin-config.php CHANGED
@@ -220,13 +220,13 @@ class CustomCSSandJS_AdminConfig {
220
  <h2><?php echo __('Editor Settings', 'custom-css-js'); ?></h2>
221
  <table class="form-table">
222
  <tr>
223
- <th scope="row"><label for="ccj_htmlentities"><?php _e('Keep the HTML entities, don\'t convert to its character', 'custom-css-js') ?> <span class="dashicons dashicons-editor-help" rel="tipsy" title="<?php echo $ccj_htmlentities_help; ?>"></span>
224
  </label></th>
225
  <td><input type="checkbox" name="ccj_htmlentities" id="ccj_htmlentities" value="1" <?php checked($settings['ccj_htmlentities'], true); ?> />
226
  </td>
227
  </tr>
228
  <tr>
229
- <th scope="row"><label for="ccj_htmlentities2"><?php _e('Encode the HTML entities', 'custom-css-js') ?> <span class="dashicons dashicons-editor-help" rel="tipsy" title="<?php echo $ccj_htmlentities2_help; ?>"></span></label></th>
230
  <td><input type="checkbox" name="ccj_htmlentities2" id="ccj_htmlentities2" value="1" <?php checked($settings['ccj_htmlentities2'], true); ?> />
231
  </td>
232
  </tr>
220
  <h2><?php echo __('Editor Settings', 'custom-css-js'); ?></h2>
221
  <table class="form-table">
222
  <tr>
223
+ <th scope="row"><label for="ccj_htmlentities"><?php _e('Keep the HTML entities, don\'t convert to its character', 'custom-css-js') ?> <span class="dashicons dashicons-editor-help tipsy-no-html" rel="tipsy" title="<?php echo $ccj_htmlentities_help; ?>"></span>
224
  </label></th>
225
  <td><input type="checkbox" name="ccj_htmlentities" id="ccj_htmlentities" value="1" <?php checked($settings['ccj_htmlentities'], true); ?> />
226
  </td>
227
  </tr>
228
  <tr>
229
+ <th scope="row"><label for="ccj_htmlentities2"><?php _e('Encode the HTML entities', 'custom-css-js') ?> <span class="dashicons dashicons-editor-help tipsy-no-html" rel="tipsy" title="<?php echo $ccj_htmlentities2_help; ?>"></span></label></th>
230
  <td><input type="checkbox" name="ccj_htmlentities2" id="ccj_htmlentities2" value="1" <?php checked($settings['ccj_htmlentities2'], true); ?> />
231
  </td>
232
  </tr>
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.6
8
- Stable tag: 3.34.1
9
  License: GPLv3
10
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
11
  Requires PHP: 5.2.4
@@ -105,6 +105,13 @@ $. Add/Edit HTML
105
 
106
  == Changelog ==
107
 
 
 
 
 
 
 
 
108
  = 3.34.1 =
109
  * 11/24/2020
110
  * Fix: PHP error when filtering the custom codes
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.6
8
+ Stable tag: 3.35
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.35 =
109
+ * 01/19/2021
110
+ * Tweak: change dummy revision dates to fictional dates before 2000
111
+ * Fix: replace the deprecated postL10n JS object with wp.i18n
112
+ * Fix: add "tipsy-no-html" to the tooltips on the settings page
113
+
114
+
115
  = 3.34.1 =
116
  * 11/24/2020
117
  * Fix: PHP error when filtering the custom codes