CSS & JavaScript Toolbox - Version 8.2

Version Description

  • PHP version check on activation
  • Fixed fatal error: 'break' not in the 'loop' or 'switch' context in /path/to/wp-content/plugins/css-javascript-toolbox/controllers/block.php on line 145
  • Will display message during installation steps on network-level errors (before only endless animation was shown)
  • Now CJT is compatible with BulletProof Security WP plugin, so CJT can be installed / used without extra changes in this security plugin
Download this release

Release Info

Developer ivanweb
Plugin Icon 128x128 CSS & JavaScript Toolbox
Version 8.2
Comparing to
See all releases

Code changes from version 8.1 to 8.2

controllers/block.php CHANGED
@@ -142,7 +142,7 @@ class CJTBlockController extends CJTAjaxController {
142
  // State an error!
143
  $this->response['errorCode'] = $response->get_error_code();
144
  $this->response['message'] = $response->get_error_message($response['code']);
145
- break;
146
  }
147
  else {
148
  // Read code content.
142
  // State an error!
143
  $this->response['errorCode'] = $response->get_error_code();
144
  $this->response['message'] = $response->get_error_message($response['code']);
145
+ //break;
146
  }
147
  else {
148
  // Read code content.
css-js-toolbox.php CHANGED
@@ -3,19 +3,45 @@
3
  Plugin Name: CSS & JavaScript Toolbox
4
  Plugin URI: http://css-javascript-toolbox.com/
5
  Description: CJT Plugin for WordPress to easily add custom CSS and JavaScript to individual pages
6
- Version: 8.1
7
- Author: Wipeout Media
8
  Author URI: http://css-javascript-toolbox.com
9
  License:
10
 
11
  The Software is package as a WordPress¨ plugin. The PHP code associated with the Software is licensed under the GPL version 2.0 license (as found at http://www.gnu.org/licenses/gpl-2.0.txt GNU/GPLv2 or "GPLv2"). You may redistribute, repackage, and modify the PHP code as you see fit and as consistent with GPLv2.
12
 
13
- The remaining portions of the Software ("Proprietary Portion"), which includes all images, cascading style sheets, and JavaScript are NOT licensed under GPLv2 and are considered proprietary to Licensor and are solely licensed under the remaining terms of this Agreement. The Proprietary Portion may not be redistributed, repackaged, or otherwise modified.
14
  */
15
 
16
  // Disallow direct access.
17
  defined('ABSPATH') or die("Access denied");
18
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19
  /** * */
20
  define('CJTOOLBOX_PLUGIN_BASE', basename(dirname(__FILE__)) . '/' . basename(__FILE__));
21
 
@@ -89,7 +115,7 @@ class CJTPlugin extends CJTHookableClass {
89
  /**
90
  *
91
  */
92
- const VERSION = '8.1' ;
93
 
94
  /**
95
  *
3
  Plugin Name: CSS & JavaScript Toolbox
4
  Plugin URI: http://css-javascript-toolbox.com/
5
  Description: CJT Plugin for WordPress to easily add custom CSS and JavaScript to individual pages
6
+ Version: 8.2
7
+ Author: Wipeout Media
8
  Author URI: http://css-javascript-toolbox.com
9
  License:
10
 
11
  The Software is package as a WordPress¨ plugin. The PHP code associated with the Software is licensed under the GPL version 2.0 license (as found at http://www.gnu.org/licenses/gpl-2.0.txt GNU/GPLv2 or "GPLv2"). You may redistribute, repackage, and modify the PHP code as you see fit and as consistent with GPLv2.
12
 
13
+ The remaining portions of the Software ("Proprietary Portion"), which includes all images, cascading style sheets, and JavaScript are NOT licensed under GPLv2 and are considered proprietary to Licensor and are solely licensed under the remaining terms of this Agreement. The Proprietary Portion may not be redistributed, repackaged, or otherwise modified.
14
  */
15
 
16
  // Disallow direct access.
17
  defined('ABSPATH') or die("Access denied");
18
 
19
+ define('CJTOOLBOX_PHP_VERSION_MIN', '5.3');
20
+
21
+ register_activation_hook( __FILE__, 'css_js_toolbox_activate' );
22
+
23
+ function css_js_toolbox_activate( $wp = '3.1', $php = CJTOOLBOX_PHP_VERSION_MIN )
24
+ {
25
+ global $wp_version;
26
+ if ( version_compare( PHP_VERSION, $php, '<' ) )
27
+ $flag = 'PHP';
28
+ elseif
29
+ ( version_compare( $wp_version, $wp, '<' ) )
30
+ $flag = 'WordPress';
31
+ else
32
+ return;
33
+ $version = 'PHP' == $flag ? $php : $wp;
34
+ deactivate_plugins( basename( __FILE__ ) );
35
+ wp_die('<p>The <strong>CSS & JavaScript Toolbox</strong> plugin requires '.$flag.' version '.$version.' or greater. Please contact support of your hosting to upgrade PHP.</p>','Plugin Activation Error', array( 'response'=>200, 'back_link'=>TRUE ) );
36
+ }
37
+
38
+ if ( version_compare( PHP_VERSION, CJTOOLBOX_PHP_VERSION_MIN, '<' ) )
39
+ {
40
+ add_action( 'admin_notices', create_function( '', "echo '<div class=\"error\"><p>".sprintf(__('CSS & JavaScript Toolbox plugin requires PHP %s to function properly. Please contact support your hosting to upgrade PHP', 'css-js-toolbox'), CJTOOLBOX_PHP_VERSION_MIN) . "</p></div>';" ) );
41
+ return;
42
+ }
43
+
44
+
45
  /** * */
46
  define('CJTOOLBOX_PLUGIN_BASE', basename(dirname(__FILE__)) . '/' . basename(__FILE__));
47
 
115
  /**
116
  *
117
  */
118
+ const VERSION = '8.2' ;
119
 
120
  /**
121
  *
framework/js/ajax/cjt-server/cjt-server.js CHANGED
@@ -141,7 +141,7 @@ var CJTServer;
141
  */
142
  getRequestObject : function(controller, action, data) {
143
  var requestObject = {};
144
- var requestTime = new Date();
145
  // Stop controller name mapping!!!
146
  controller = (CJTServer.controllers[controller] !== undefined) ? CJTServer.controllers[controller] : controller;
147
  // CJT Wordpress Ajax Access Point!
@@ -153,7 +153,7 @@ var CJTServer;
153
  var requestToken = {
154
  security : CJTServer.securityToken,
155
  requestTime : requestTime,
156
- requestId : requestTime.getTime()
157
  };
158
  // Combine user data with request parameters data.
159
  data = $.extend(requestToken, data);
@@ -265,7 +265,22 @@ var CJTServer;
265
  /* @TODO: This is a temporary solution for version 6.0 to be releases! Later we'll have a full error handling system! */
266
  // --- Start temporary Error handling Block ---
267
  .error($.proxy(
268
- function(jqXHR, textStatus) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
269
  switch (textStatus) {
270
  case 'parsererror':
271
  // For now just create a temporary element to be over any other elements!
@@ -274,6 +289,8 @@ var CJTServer;
274
  }
275
  break;
276
  }
 
 
277
  }, this)
278
  );
279
  // --- End temporary Error handling Block ---
@@ -320,16 +337,16 @@ var CJTServer;
320
  // Error!
321
  errorForm.find('.content').html(text)
322
  // Styling!
323
- .css({overflow : 'auto', height : '92%', 'text-align' : 'center'});
324
  // Form!
325
  errorForm.css({
326
  /* Positioning center*/
327
  position : 'fixed',
328
  backgroundColor : 'white',
329
- left : '2.5%',
330
- top : '2.5%',
331
- width : '95%',
332
- height : '91%',
333
  /* Styling */
334
  padding : '10px 10px',
335
  border : '4px solid gray',
141
  */
142
  getRequestObject : function(controller, action, data) {
143
  var requestObject = {};
144
+ var requestTime = new Date().getTime(); // Return the number of milliseconds since 1970/01/01:
145
  // Stop controller name mapping!!!
146
  controller = (CJTServer.controllers[controller] !== undefined) ? CJTServer.controllers[controller] : controller;
147
  // CJT Wordpress Ajax Access Point!
153
  var requestToken = {
154
  security : CJTServer.securityToken,
155
  requestTime : requestTime,
156
+ requestId : new Date().getTime()
157
  };
158
  // Combine user data with request parameters data.
159
  data = $.extend(requestToken, data);
265
  /* @TODO: This is a temporary solution for version 6.0 to be releases! Later we'll have a full error handling system! */
266
  // --- Start temporary Error handling Block ---
267
  .error($.proxy(
268
+ function(jqXHR, textStatus, errorThrown)
269
+ {
270
+
271
+ //console.log("Server error: ");
272
+ //console.log(errorThrown);
273
+ //console.log(textStatus);
274
+ //console.log(jqXHR);
275
+
276
+ if (confirm(CJTCjtServerI18N.confirmSubmitErrorForm))
277
+ {
278
+ this.unhandledErrorSubmissionForm(jqXHR.responseText);
279
+ }
280
+
281
+ return;
282
+
283
+ /*
284
  switch (textStatus) {
285
  case 'parsererror':
286
  // For now just create a temporary element to be over any other elements!
289
  }
290
  break;
291
  }
292
+ */
293
+
294
  }, this)
295
  );
296
  // --- End temporary Error handling Block ---
337
  // Error!
338
  errorForm.find('.content').html(text)
339
  // Styling!
340
+ .css({overflow : 'auto', height : '70%', 'text-align' : 'center'});
341
  // Form!
342
  errorForm.css({
343
  /* Positioning center*/
344
  position : 'fixed',
345
  backgroundColor : 'white',
346
+ left : '10%',
347
+ top : '10%',
348
+ width : '80%',
349
+ height : '70%',
350
  /* Styling */
351
  padding : '10px 10px',
352
  border : '4px solid gray',
framework/js/ajax/cjt-server/cjt-server.localization.php CHANGED
@@ -10,11 +10,11 @@
10
  * Localization text for backups script.
11
  */
12
  return array(
13
- 'confirmSubmitErrorForm' => cssJSToolbox::getText("Unhandled error has been detected while processing the background request!
14
- as the error is not handled we cannot tell if the previous operation is executed successed or not!
15
- To help us fixing those kind of issues you can check the error details and submit it throught CJT Web site!\n\n
16
  Would you like to check the error details?"),
17
- 'confirmCloseErrorForm' => cssJSToolbox::getText("Its heighly recomended to send us the error details so we can enahce CJT products!
18
- This error is not saved anywhere and you cant reach it again!\n
19
  Would you like to close the form?")
20
  );
10
  * Localization text for backups script.
11
  */
12
  return array(
13
+ 'confirmSubmitErrorForm' => cssJSToolbox::getText("Unhandled error has been detected while processing the background request.
14
+ As the error is not handled we cannot tell if the previous operation is executed successed or not.
15
+ To help us fixing those kind of issues you can check the error details and submit it throught CJT Web site.\n\n
16
  Would you like to check the error details?"),
17
+ 'confirmCloseErrorForm' => cssJSToolbox::getText("Its highly recomended to send us the error details so we can enahce CJT products.
18
+ This error is not saved anywhere and you cant reach it again.\n
19
  Would you like to close the form?")
20
  );
readme.txt CHANGED
@@ -6,8 +6,8 @@ Tags: post, posts, admin, sidebar, page, pages, widget, image, shortcode, plugin
6
  License: GPLv2 or later
7
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
8
  Requires at least: 3.9
9
- Tested up to: 4.3.1
10
- Stable tag: 8.1
11
 
12
  Easily add custom CSS, JavaScript, HTML and PHP code to unique CJT code blocks and assign them wherever you want.
13
 
@@ -27,6 +27,7 @@ CJT code blocks can be assigned to pages, posts, custom posts, categories, URLs,
27
 
28
  = Why purchase CSS & JavaScript Toolbox PLUS? =
29
  [CSS & JavaScript Toolbox PLUS](http://css-javascript-toolbox.com/css-javascript-toolbox-plus/) is our new premium plugin, featuring a faster and more powerful core, PLUS these features below:
 
30
  - Inverted Assignments (NEW FEATURE)
31
  - Support for Post Tags (NEW FEATURE)
32
  - Editor Themes
@@ -126,8 +127,15 @@ Due to the overwhelming amount of emails we get for users requesting support for
126
  21. See Code Block information at a glance (CJT PLUS ONLY)
127
 
128
  == Changelog ==
 
 
 
 
 
 
 
129
  = 8.1 =
130
- * Compaibility with Wordpress 4.3.1
131
  * Core Upgrades/Enhancements
132
 
133
  = 8.0.4 =
6
  License: GPLv2 or later
7
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
8
  Requires at least: 3.9
9
+ Tested up to: 4.4
10
+ Stable tag: 8.2
11
 
12
  Easily add custom CSS, JavaScript, HTML and PHP code to unique CJT code blocks and assign them wherever you want.
13
 
27
 
28
  = Why purchase CSS & JavaScript Toolbox PLUS? =
29
  [CSS & JavaScript Toolbox PLUS](http://css-javascript-toolbox.com/css-javascript-toolbox-plus/) is our new premium plugin, featuring a faster and more powerful core, PLUS these features below:
30
+
31
  - Inverted Assignments (NEW FEATURE)
32
  - Support for Post Tags (NEW FEATURE)
33
  - Editor Themes
127
  21. See Code Block information at a glance (CJT PLUS ONLY)
128
 
129
  == Changelog ==
130
+
131
+ = 8.2 =
132
+ * PHP version check on activation
133
+ * Fixed fatal error: 'break' not in the 'loop' or 'switch' context in /path/to/wp-content/plugins/css-javascript-toolbox/controllers/block.php on line 145
134
+ * Will display message during installation steps on network-level errors (before only endless animation was shown)
135
+ * Now CJT is compatible with BulletProof Security WP plugin, so CJT can be installed / used without extra changes in this security plugin
136
+
137
  = 8.1 =
138
+ * Compatibility with Wordpress 4.3.1
139
  * Core Upgrades/Enhancements
140
 
141
  = 8.0.4 =
views/installer/install/public/js/default/default.js CHANGED
@@ -69,7 +69,10 @@
69
  }, this)
70
  ).fail($.proxy( // Operation installation faild!
71
  function() {
72
- console.log(operation.name + ' is faild');
 
 
 
73
  }, this)
74
  ).complete($.proxy(
75
  function() {
69
  }, this)
70
  ).fail($.proxy( // Operation installation faild!
71
  function() {
72
+ console.log(
73
+ "Installation operation '"
74
+ + operation.name
75
+ + "' is failed");
76
  }, this)
77
  ).complete($.proxy(
78
  function() {