PluginProbe
CSS & JavaScript Toolbox / 12.0.4
CSS & JavaScript Toolbox v12.0.4
trunk 0.3 0.8 10 10.1 11 11.2 11.3 11.4 11.5 11.6 11.7 11.8 11.9 11.9.1 12 12.0 12.0.1 12.0.3 12.0.4 12.0.5 12.0.6 12.0.7 6.0 6.0.11 All 60 releases
← All changes | css-js-toolbox.php +45 -13 1012.0.4 View file →
@@ -2,11 +2,13 @@
2 2 /*
3 3 Plugin Name: CSS & JavaScript Toolbox
4 4 Plugin URI: https://css-javascript-toolbox.com/
5 5 Description: Easily add CSS, JavaScript, HTML and PHP code to unique CJT code blocks and assign them anywhere on your website.
6 -Version: 10
6 +Version: 12.0.4
7 7 Author: Wipeout Media
8 8 Author URI: https://css-javascript-toolbox.com
9 +Text Domain: css-javascript-toolbox
10 +Domain Path: /locals/languages/
9 11 License:
10 12
11 13 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 14
@@ -80,9 +82,9 @@
80 82
81 83 /**
82 84 *
83 85 */
84 - const DB_VERSION = '1.6';
86 + const DB_VERSION = '1.7';
85 87
86 88 /**
87 89 * put your comment there...
88 90 *
@@ -92,14 +94,14 @@
92 94
93 95 /**
94 96 *
95 97 */
96 - const FW_Version = '4.0';
98 + const FW_Version = '5.0';
97 99
98 100 /**
99 101 *
100 102 */
101 - const VERSION = '10';
103 + const VERSION = '12.0.4';
102 104
103 105 /**
104 106 *
105 107 */
@@ -352,17 +354,10 @@
352 354 * @return boolean TRUE.
353 355 */
354 356 public function onconnected( $observer, $state )
355 357 {
356 -
357 - // In all cases that we'll process the request load the localization file.
358 - load_plugin_textdomain( CJTOOLBOX_TEXT_DOMAIN, false, CJTOOLBOX_LANGUAGES );
359 -
360 - do_action( CJTPluggableHelper::ACTION_CJT_TEXT_DOMAIN_LOADED );
361 -
362 - // Always connet the access point!
358 + // Always connect the access point!
363 359 return $state;
364 -
365 360 }
366 361
367 362 }// End Class
368 363
@@ -375,5 +370,42 @@
375 370 // Initialize events!
376 371 CJTPlugin::define( 'CJTPlugin', array( 'hookType' => CJTWordpressEvents::HOOK_FILTER ) );
377 372
378 373 // Let's Go!
379 -CJTPlugin::getInstance();
374 +function deprecatedPHPCheck()
375 +{ ?>
376 + <div class="notice notice-error">
377 + <p><strong>CJT</strong>: CSS & JavaScript Toolbox need PHP version 7.3 or greater to operate properly. Please ask your hosting provider to update the PHP version.<br>
378 + Current PHP Version: <strong><?php echo phpversion(); ?></strong>
379 + </p>
380 + </div>
381 +<?php }
382 +
383 +if ( version_compare( phpversion(), 7, '>=' ) ) {
384 + CJTPlugin::getInstance();
385 +} else {
386 + add_action( 'admin_notices', 'deprecatedPHPCheck' );
387 +}
388 +
389 +add_action( 'upgrader_process_complete', 'upgradeCheck',10, 2 );
390 +
391 +function upgradeCheck( $upgrader_object, $options ) {
392 + $CJTPluginPath = plugin_basename( __FILE__ );
393 +
394 + global $wpdb;
395 + $table_name = $wpdb->base_prefix.'cjtoolbox_blocks';
396 + $query = $wpdb->prepare( 'SHOW TABLES LIKE %s', $wpdb->esc_like( $table_name ) );
397 + $preCheck = get_option( '__existing_cjt_user' );
398 +
399 + if ( $options['action'] == 'update' && $options['type'] == 'plugin' ) {
400 + foreach( $options['plugins'] as $each_plugin ) {
401 + if ( $each_plugin == $CJTPluginPath ) {
402 + $preCheck = get_option( '__existing_cjt_user' );
403 +
404 + // Only create it once.
405 + if ( empty( $preCheck ) ) {
406 + update_option( '__existing_cjt_user', $wpdb->get_var( $query ) === $table_name ? 'true' : 'false' );
407 + }
408 + }
409 + }
410 + }
411 +}