Simple Custom CSS and JS - Version 3.34.1

Version Description

  • 11/24/2020
  • Fix: PHP error when filtering the custom codes
Download this release

Release Info

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

Code changes from version 3.34 to 3.34.1

Files changed (3) hide show
  1. custom-css-js.php +3 -3
  2. includes/admin-screens.php +2 -2
  3. readme.txt +6 -2
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
7
  * Author: SilkyPress.com
8
  * Author URI: https://www.silkypress.com
9
  * License: GPL2
@@ -11,7 +11,7 @@
11
  * Text Domain: custom-css-js
12
  * Domain Path: /languages/
13
  *
14
- * WC requires at least: 2.3.0
15
  * WC tested up to: 5.0
16
  */
17
 
@@ -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',
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.34.1
7
  * Author: SilkyPress.com
8
  * Author URI: https://www.silkypress.com
9
  * License: GPL2
11
  * Text Domain: custom-css-js
12
  * Domain Path: /languages/
13
  *
14
+ * WC requires at least: 3.0.0
15
  * WC tested up to: 5.0
16
  */
17
 
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__,
includes/admin-screens.php CHANGED
@@ -367,6 +367,7 @@ class CustomCSSandJS_Admin {
367
  * List table: Change the query in order to filter by code type
368
  */
369
  function parse_query( $query ) {
 
370
  if ( ! is_admin() || ! $query->is_main_query() ) {
371
  return $query;
372
  }
@@ -385,7 +386,6 @@ class CustomCSSandJS_Admin {
385
  }
386
  $filter = '%' . $wpdb->esc_like( $filter ) . '%';
387
 
388
- global $wpdb;
389
  $post_id_query = "SELECT post_id FROM {$wpdb->postmeta} WHERE meta_key = %s AND meta_value LIKE %s";
390
  $post_ids = $wpdb->get_col( $wpdb->prepare( $post_id_query, 'options', $filter ) );
391
  if ( ! is_array( $post_ids ) || count( $post_ids ) == 0 ) {
@@ -1114,7 +1114,7 @@ End of comment */ ',
1114
  $options[ $_field ] = isset( $_POST[ 'custom_code_' . $_field ] ) ? esc_attr( strtolower( $_POST[ 'custom_code_' . $_field ] ) ) : $_default;
1115
  }
1116
 
1117
- $options['custom_code_language'] = in_array( $options['language'], array( 'html', 'css', 'js' ), true ) ? $options['language'] : $defaults['language'];
1118
 
1119
  update_post_meta( $post_id, 'options', $options );
1120
 
367
  * List table: Change the query in order to filter by code type
368
  */
369
  function parse_query( $query ) {
370
+ global $wpdb;
371
  if ( ! is_admin() || ! $query->is_main_query() ) {
372
  return $query;
373
  }
386
  }
387
  $filter = '%' . $wpdb->esc_like( $filter ) . '%';
388
 
 
389
  $post_id_query = "SELECT post_id FROM {$wpdb->postmeta} WHERE meta_key = %s AND meta_value LIKE %s";
390
  $post_ids = $wpdb->get_col( $wpdb->prepare( $post_id_query, 'options', $filter ) );
391
  if ( ! is_array( $post_ids ) || count( $post_ids ) == 0 ) {
1114
  $options[ $_field ] = isset( $_POST[ 'custom_code_' . $_field ] ) ? esc_attr( strtolower( $_POST[ 'custom_code_' . $_field ] ) ) : $_default;
1115
  }
1116
 
1117
+ $options['language'] = in_array( $options['language'], array( 'html', 'css', 'js' ), true ) ? $options['language'] : $defaults['language'];
1118
 
1119
  update_post_meta( $post_id, 'options', $options );
1120
 
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.5
8
- Stable tag: 3.34
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.34 =
109
  * 11/01/2020
110
  * Feature: enqueue the jQuery library if one of the JS custom codes requires it
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.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
 
106
  == Changelog ==
107
 
108
+ = 3.34.1 =
109
+ * 11/24/2020
110
+ * Fix: PHP error when filtering the custom codes
111
+
112
  = 3.34 =
113
  * 11/01/2020
114
  * Feature: enqueue the jQuery library if one of the JS custom codes requires it