Changeset 3037694
- Timestamp:
- 02/19/2024 06:58:54 AM (2 years ago)
- Location:
- cloudimage
- Files:
-
- 71 added
- 7 deleted
- 9 edited
-
tags/4.0.0 (added)
-
tags/4.0.0/.gitignore (added)
-
tags/4.0.0/LICENSE.txt (added)
-
tags/4.0.0/README.txt (added)
-
tags/4.0.0/admin (added)
-
tags/4.0.0/admin/class-cloudimage-admin.php (added)
-
tags/4.0.0/admin/css (added)
-
tags/4.0.0/admin/css/cloudimage-admin.css (added)
-
tags/4.0.0/admin/images (added)
-
tags/4.0.0/admin/images/Cloudimage_BW.png (added)
-
tags/4.0.0/admin/images/Cloudimage_BW_128x128.png (added)
-
tags/4.0.0/admin/images/logo_new_cloudimage.png (added)
-
tags/4.0.0/admin/index.php (added)
-
tags/4.0.0/admin/js (added)
-
tags/4.0.0/admin/js/cloudimage-admin.js (added)
-
tags/4.0.0/admin/js/debounce.js (added)
-
tags/4.0.0/admin/partials (added)
-
tags/4.0.0/admin/partials/cloudimage-admin-advanced-display.php (added)
-
tags/4.0.0/admin/partials/cloudimage-admin-general-display.php (added)
-
tags/4.0.0/cloudimage.php (added)
-
tags/4.0.0/docker-compose.yml (added)
-
tags/4.0.0/includes (added)
-
tags/4.0.0/includes/class-cloudimage-activator.php (added)
-
tags/4.0.0/includes/class-cloudimage-deactivator.php (added)
-
tags/4.0.0/includes/class-cloudimage-i18n.php (added)
-
tags/4.0.0/includes/class-cloudimage-loader.php (added)
-
tags/4.0.0/includes/class-cloudimage-output-buffering.php (added)
-
tags/4.0.0/includes/class-cloudimage.php (added)
-
tags/4.0.0/includes/index.php (added)
-
tags/4.0.0/index.php (added)
-
tags/4.0.0/languages (added)
-
tags/4.0.0/languages/cloudimage-en_US.mo (added)
-
tags/4.0.0/languages/cloudimage-en_US.po (added)
-
tags/4.0.0/languages/cloudimage.pot (added)
-
tags/4.0.0/public (added)
-
tags/4.0.0/public/class-cloudimage-public.php (added)
-
tags/4.0.0/public/css (added)
-
tags/4.0.0/public/css/cloudimage-public.css (added)
-
tags/4.0.0/public/index.php (added)
-
tags/4.0.0/public/js (added)
-
tags/4.0.0/public/js/cloudimage-public.js (added)
-
tags/4.0.0/public/js/js-cloudimage-responsive.min.js (added)
-
tags/4.0.0/public/js/js-cloudimage-responsive.min.js.map (added)
-
tags/4.0.0/public/js/lazysizes.min.js (added)
-
tags/4.0.0/public/partials (added)
-
tags/4.0.0/public/partials/cloudimage-public-display.php (added)
-
tags/4.0.0/uninstall.php (added)
-
tags/4.0.0/v4 (added)
-
tags/4.0.0/v4/assets (added)
-
tags/4.0.0/v4/assets/images (added)
-
tags/4.0.0/v4/assets/images/Cloudimage_BW.png (added)
-
tags/4.0.0/v4/assets/images/Cloudimage_BW_128x128.png (added)
-
tags/4.0.0/v4/assets/images/logo_new_cloudimage.png (added)
-
tags/4.0.0/v4/assets/js (added)
-
tags/4.0.0/v4/assets/js/cloudimage.js (added)
-
tags/4.0.0/v4/assets/js/js-cloudimage-responsive.min.js (added)
-
tags/4.0.0/v4/assets/js/js-cloudimage-responsive.min.js.map (added)
-
tags/4.0.0/v4/assets/js/lazysizes.min.js (added)
-
tags/4.0.0/v4/cloudimage.php (added)
-
trunk/README.txt (modified) (2 diffs)
-
trunk/admin/class-cloudimage-admin.php (modified) (4 diffs)
-
trunk/admin/css/cloudimage-admin.css (modified) (4 diffs)
-
trunk/admin/images/Cloudimage_BW.png (modified) (previous)
-
trunk/admin/images/Cloudimage_BW_128x128.png (modified) (previous)
-
trunk/admin/images/big_cloud.png (deleted)
-
trunk/admin/images/cloudimage_icon.png (deleted)
-
trunk/admin/images/logo_cloudimage.png (deleted)
-
trunk/admin/images/logo_new_cloudimage.png (modified) (previous)
-
trunk/admin/images/robot.png (deleted)
-
trunk/admin/images/small_cloud.png (deleted)
-
trunk/admin/partials/cloudimage-admin-general-display.php (modified) (4 diffs)
-
trunk/cloudimage.php (modified) (4 diffs)
-
trunk/includes/class-cloudimage.php (modified) (1 diff)
-
trunk/languages/cloudimage-fr_FR.mo (deleted)
-
trunk/languages/cloudimage-fr_FR.po (deleted)
-
trunk/v4 (added)
-
trunk/v4/assets (added)
-
trunk/v4/assets/images (added)
-
trunk/v4/assets/images/Cloudimage_BW.png (added)
-
trunk/v4/assets/images/Cloudimage_BW_128x128.png (added)
-
trunk/v4/assets/images/logo_new_cloudimage.png (added)
-
trunk/v4/assets/js (added)
-
trunk/v4/assets/js/cloudimage.js (added)
-
trunk/v4/assets/js/js-cloudimage-responsive.min.js (added)
-
trunk/v4/assets/js/js-cloudimage-responsive.min.js.map (added)
-
trunk/v4/assets/js/lazysizes.min.js (added)
-
trunk/v4/cloudimage.php (added)
Legend:
- Unmodified
- Added
- Removed
-
cloudimage/trunk/README.txt
r2933113 r3037694 3 3 Tags: CDN, convert webp, image resizing, optimize images, SEO, resize, fast, compression, optimize, image optimization, image optimizer, optimize, image compression, optimize images, images optimization, optimize images, image compressor, image optimisation, webp 4 4 Requires PHP: 5.6 5 Tested up to: 6. 2.25 Tested up to: 6.4.3 6 6 Requires at least: 4.8 7 Stable tag: 3.2.17 Stable tag: 4.0.0 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 334 334 * Fixed error and tested up to WP version 6.2.2 335 335 336 = 4.0.0 = 337 * Release new version for Cloudimage 338 336 339 == Upgrade Notice == 337 340 * Upgrading from version 1 to 2 or 3 can show you warnings in the admin section -
cloudimage/trunk/admin/class-cloudimage-admin.php
r2882955 r3037694 202 202 $valid = get_option($this->plugin_name); 203 203 204 if (!isset($_POST['advanced_settings'])) 205 { 204 if (!isset($_POST['advanced_settings'])) { 206 205 //Cleanup 207 206 if (isset($input['domain'])) { … … 213 212 } 214 213 } 215 216 $switches = ['use_js_powered_mode','use_for_logged_in_users','removes_v7']; 217 } 218 else 219 { 214 215 $switches = ['use_js_powered_mode','use_for_logged_in_users','removes_v7', 'new_version']; 216 } else { 220 217 $switches = [ 221 218 'enable_srcset', … … 245 242 $valid['cloudimage_' . $switch] = empty($input[$switch]) ? ((isset($input['cloudimage_' . $switch]) && $input['cloudimage_' . $switch] == 1) ? 1 : 0) : 1; 246 243 } 247 248 244 return $valid; 249 245 } … … 260 256 { 261 257 register_setting($this->plugin_name, $this->plugin_name, array($this, 'validate')); 258 register_setting( 259 $this->plugin_name, 260 'cloudimage_new_version', 261 [ 262 'type' => 'boolean', 263 'default' => false, 264 ] 265 ); 262 266 } 263 267 } -
cloudimage/trunk/admin/css/cloudimage-admin.css
r2882955 r3037694 38 38 .cloudimg-box { 39 39 box-sizing: border-box; 40 background: # 1352E8;40 background: #959595; 41 41 border-radius: 10px; 42 42 color: #fff; … … 205 205 position: relative; 206 206 display: inline-block; 207 background: # 2FB0F7;207 background: #155bcd; 208 208 color: white; 209 209 border-radius: 50%; … … 273 273 274 274 .cloudimg-box .warning-wrapper { 275 background: # 2FB0F7;275 background: #155bcd; 276 276 margin: 1rem 1.5rem; 277 277 border-radius: 10px; … … 283 283 line-height: 1; 284 284 border: none; 285 background: #1 D2690;285 background: #155bcd; 286 286 text-transform: uppercase; 287 287 font-weight: bold; -
cloudimage/trunk/admin/partials/cloudimage-admin-general-display.php
r2882955 r3037694 25 25 $use_for_logged_in_users = isset($options['cloudimage_use_for_logged_in_users']) 26 26 ? $options['cloudimage_use_for_logged_in_users'] : 1; 27 28 27 $use_new_version = isset($options['cloudimage_new_version']) 28 ? $options['cloudimage_new_version'] : 0; 29 29 ?> 30 30 … … 81 81 <table class="form-table"> 82 82 <tbody> 83 <!-- Use new version --> 84 <tr id="js-powered-section"> 85 <th scope="row" class="titledesc"> 86 <label for="<?php echo esc_attr($this->plugin_name); ?>-use_new_version"> 87 <?php echo "Use new version"; ?> 88 <div class="tooltip">? 89 <span class="tooltiptext"><?php echo "If enabled, you will use the new version of Cloudimage."; ?></span> 90 </div> 91 </label> 92 </th> 93 <td class="forminp forminp-text general-switch"> 94 <label class="switch"> 95 <input type="hidden" name="cloudimage_new_version" 96 value="<?php if ($use_new_version) { echo 1; } else { echo 0; } ?>" 97 id="cloudimage_new_version"> 98 <input type="checkbox" id="<?php echo esc_attr($this->plugin_name); ?>-new_version" 99 name="<?php echo esc_attr($this->plugin_name); ?>[new_version]" <?php checked($use_new_version, 1); ?> > 100 <span class="slider round"></span> 101 </label> 102 </td> 103 </tr> 104 83 105 <!-- domain --> 84 106 <tr> … … 222 244 var cloudimage_use_js_powered_mode = jQuery('#cloudimage-use_js_powered_mode'); 223 245 var cloudimage_current_mode = jQuery('#cloudimage-current-mode'); 246 var cloudimage_new_version = jQuery('#cloudimage-new_version'); 224 247 225 248 //Check if JavaScript is enabled to display lazy loading section … … 242 265 }); 243 266 267 cloudimage_new_version.change(function () { 268 if (this.checked) { 269 //If checked - show additional table row with checkbox 270 // cloudimage_current_mode.text("JS Powered"); 271 jQuery('#cloudimage_new_version').val(1); 272 } else { 273 //If turned off - hide the additional table row and unmark the checkbox 274 // cloudimage_current_mode.text("PHP Powered"); 275 jQuery('#cloudimage_new_version').val(0); 276 } 277 }); 278 244 279 }); 245 280 </script> -
cloudimage/trunk/cloudimage.php
r2933113 r3037694 1 1 <?php 2 3 2 /** 4 * Cloudimage - Responsive Images as a Service3 * Cloudimage by Scaleflex - Responsive Images as a Service 5 4 * 6 5 * … … 12 11 * Plugin Name: Cloudimage - Responsive Images as a Service 13 12 * Description: The easiest way to <strong>deliver lightning fast images</strong> to your users. 14 * Version: 3.2.113 * Version: 4.0.0 15 14 * Author: Cloudimage 16 15 * Author URI: https://cloudimage.io … … 20 19 * Domain Path: /languages 21 20 */ 21 22 22 23 23 // If this file is called directly, abort. … … 30 30 * Start at version 1.0.0 31 31 */ 32 define('CLOUDIMAGE_VERSION', ' 3.2.1');32 define('CLOUDIMAGE_VERSION', '4.0.0'); 33 33 34 /** 35 * The code that runs during plugin activation. 36 * This action is documented in includes/class-cloudimage-activator.php 37 */ 38 function activate_cloudimage() 39 { 40 require_once plugin_dir_path(__FILE__) . 'includes/class-cloudimage-activator.php'; 41 Cloudimage_Activator::activate(); 34 //get all config of old version 35 $options = get_option('cloudimage'); 36 if (!$options) { 37 $isNewVersion = true; 38 } else { 39 $isNewVersion = $options['cloudimage_new_version']; 42 40 } 43 41 44 /** 45 * The code that runs during plugin deactivation. 46 * This action is documented in includes/class-cloudimage-deactivator.php 47 */ 48 function deactivate_cloudimage() 49 { 50 require_once plugin_dir_path(__FILE__) . 'includes/class-cloudimage-deactivator.php'; 51 Cloudimage_Deactivator::deactivate(); 42 if ($isNewVersion) { 43 require plugin_dir_path(__FILE__) . 'v4/cloudimage.php'; 44 } else { 45 /** 46 * The code that runs during plugin activation. 47 * This action is documented in includes/class-cloudimage-activator.php 48 */ 49 function activate_cloudimage() 50 { 51 require_once plugin_dir_path(__FILE__) . 'includes/class-cloudimage-activator.php'; 52 Cloudimage_Activator::activate(); 53 } 54 55 /** 56 * The code that runs during plugin deactivation. 57 * This action is documented in includes/class-cloudimage-deactivator.php 58 */ 59 function deactivate_cloudimage() 60 { 61 require_once plugin_dir_path(__FILE__) . 'includes/class-cloudimage-deactivator.php'; 62 Cloudimage_Deactivator::deactivate(); 63 } 64 65 register_activation_hook(__FILE__, 'activate_cloudimage'); 66 register_deactivation_hook(__FILE__, 'deactivate_cloudimage'); 67 68 /** 69 * The core plugin class that is used to define internationalization, 70 * admin-specific hooks, and public-facing site hooks. 71 */ 72 require plugin_dir_path(__FILE__) . 'includes/class-cloudimage.php'; 73 74 75 /** 76 * Begins execution of the plugin. 77 * 78 * Since everything within the plugin is registered via hooks, 79 * then kicking off the plugin from this point in the file does 80 * not affect the page life cycle. 81 * 82 * @since 1.0.0 83 */ 84 function run_cloudimage() 85 { 86 87 $plugin = new Cloudimage(); 88 $plugin->run(); 89 90 } 91 92 run_cloudimage(); 52 93 } 53 94 54 register_activation_hook(__FILE__, 'activate_cloudimage');55 register_deactivation_hook(__FILE__, 'deactivate_cloudimage');56 57 /**58 * The core plugin class that is used to define internationalization,59 * admin-specific hooks, and public-facing site hooks.60 */61 require plugin_dir_path(__FILE__) . 'includes/class-cloudimage.php';62 63 64 /**65 * Begins execution of the plugin.66 *67 * Since everything within the plugin is registered via hooks,68 * then kicking off the plugin from this point in the file does69 * not affect the page life cycle.70 *71 * @since 1.0.072 */73 function run_cloudimage()74 {75 76 $plugin = new Cloudimage();77 $plugin->run();78 79 }80 81 run_cloudimage(); -
cloudimage/trunk/includes/class-cloudimage.php
r2882955 r3037694 79 79 public function __construct() 80 80 { 81 82 81 if (defined('CLOUDIMAGE_VERSION')) { 83 82 $this->version = CLOUDIMAGE_VERSION; 84 83 } else { 85 $this->version = '3. 0.5';84 $this->version = '3.2.1'; 86 85 } 87 86 $this->plugin_name = 'cloudimage';
Note: See TracChangeset
for help on using the changeset viewer.