Simple Custom CSS and JS - Version 3.12

Version Description

  • 01/03/2018
  • Reverse to the wp_footer function for the footer scripts, as the print_footer_scripts function is used also in the admin, which lead to many broken back-ends
Download this release

Release Info

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

Code changes from version 3.11 to 3.12

Files changed (2) hide show
  1. custom-css-js.php +3 -8
  2. 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.11
7
  * Author: Diana Burduja
8
  * Author URI: https://www.silkypress.com/
9
  * License: GPL2
@@ -106,8 +106,6 @@ final class CustomCSSandJS {
106
  $action .= 'footer';
107
  }
108
 
109
- if ( $action == 'wp_footer' ) $action = 'print_footer_scripts';
110
-
111
  add_action( $action, array( $this, 'print_' . $_key ) );
112
  }
113
  }
@@ -117,11 +115,8 @@ final class CustomCSSandJS {
117
  */
118
  public function __call( $function, $args ) {
119
 
120
- if ( strpos( $function, 'print_' ) === false ) {
121
- return false;
122
- }
123
 
124
- if( is_admin() && strpos( $function, 'print_frontend-' ) !== false ) {
125
  return false;
126
  }
127
 
@@ -201,7 +196,7 @@ final class CustomCSSandJS {
201
  function set_constants() {
202
  $dir = wp_upload_dir();
203
  $constants = array(
204
- 'CCJ_VERSION' => '3.11',
205
  'CCJ_UPLOAD_DIR' => $dir['basedir'] . '/custom-css-js',
206
  'CCJ_UPLOAD_URL' => $dir['baseurl'] . '/custom-css-js',
207
  '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.12
7
  * Author: Diana Burduja
8
  * Author URI: https://www.silkypress.com/
9
  * License: GPL2
106
  $action .= 'footer';
107
  }
108
 
 
 
109
  add_action( $action, array( $this, 'print_' . $_key ) );
110
  }
111
  }
115
  */
116
  public function __call( $function, $args ) {
117
 
 
 
 
118
 
119
+ if ( strpos( $function, 'print_' ) === false ) {
120
  return false;
121
  }
122
 
196
  function set_constants() {
197
  $dir = wp_upload_dir();
198
  $constants = array(
199
+ 'CCJ_VERSION' => '3.12',
200
  'CCJ_UPLOAD_DIR' => $dir['basedir'] . '/custom-css-js',
201
  'CCJ_UPLOAD_URL' => $dir['baseurl'] . '/custom-css-js',
202
  'CCJ_PLUGIN_FILE' => __FILE__,
readme.txt CHANGED
@@ -6,7 +6,7 @@ Email: diana@burduja.eu
6
  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
7
  Requires at least: 3.0.1
8
  Tested up to: 4.9
9
- Stable tag: 3.11
10
  License: GPLv3
11
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
12
 
@@ -115,6 +115,10 @@ $. Add/Edit HTML
115
 
116
  == Changelog ==
117
 
 
 
 
 
118
  = 3.11 =
119
  * 01/03/2018
120
  * Use the `print_footer_scripts` function for the footer scripts (https://wordpress.org/support/topic/footer-code-position-before-external-scripts-is-overridden/)
6
  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
7
  Requires at least: 3.0.1
8
  Tested up to: 4.9
9
+ Stable tag: 3.12
10
  License: GPLv3
11
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
12
 
115
 
116
  == Changelog ==
117
 
118
+ = 3.12 =
119
+ * 01/03/2018
120
+ * Reverse to the `wp_footer` function for the footer scripts, as the `print_footer_scripts` function is used also in the admin, which lead to many broken back-ends
121
+
122
  = 3.11 =
123
  * 01/03/2018
124
  * Use the `print_footer_scripts` function for the footer scripts (https://wordpress.org/support/topic/footer-code-position-before-external-scripts-is-overridden/)