reSmush.it Image Optimizer - Version 0.2.5

Version Description

  • Add Preserve Exif Feature
Download this release

Release Info

Developer resmushit
Plugin Icon 128x128 reSmush.it Image Optimizer
Version 0.2.5
Comparing to
See all releases

Code changes from version 0.2.4 to 0.2.5

classes/resmushit.class.php CHANGED
@@ -72,7 +72,10 @@ Class reSmushit {
72
  'files' => $cfile,
73
  );
74
  }
75
-
 
 
 
76
  $arg['qlty'] = self::getPictureQualitySetting();
77
  curl_setopt($ch, CURLOPT_POSTFIELDS, $arg);
78
 
72
  'files' => $cfile,
73
  );
74
  }
75
+ if(get_option( 'resmushit_preserve_exif' ) && get_option( 'resmushit_preserve_exif' ) == 1) {
76
+ $arg['exif'] = 'true';
77
+ }
78
+
79
  $arg['qlty'] = self::getPictureQualitySetting();
80
  curl_setopt($ch, CURLOPT_POSTFIELDS, $arg);
81
 
classes/resmushitUI.class.php CHANGED
@@ -100,6 +100,7 @@ Class reSmushitUI {
100
  . self::addSetting("checkbox", __("Enable statistics", 'resmushit-image-optimizer'), __("Generates statistics about optimized pictures", 'resmushit-image-optimizer'), "resmushit_statistics")
101
  . self::addSetting("checkbox", __("Enable logs", 'resmushit-image-optimizer'), __("Enable file logging (for developers)", 'resmushit-image-optimizer'), "resmushit_logs")
102
  . self::addSetting("checkbox", $new_label . __("Process optimize on CRON", 'resmushit-image-optimizer'), __("Will perform image optimization process through CRON tasks", 'resmushit-image-optimizer'), "resmushit_cron")
 
103
  . '</table>';
104
  submit_button();
105
  echo '</form></div>';
100
  . self::addSetting("checkbox", __("Enable statistics", 'resmushit-image-optimizer'), __("Generates statistics about optimized pictures", 'resmushit-image-optimizer'), "resmushit_statistics")
101
  . self::addSetting("checkbox", __("Enable logs", 'resmushit-image-optimizer'), __("Enable file logging (for developers)", 'resmushit-image-optimizer'), "resmushit_logs")
102
  . self::addSetting("checkbox", $new_label . __("Process optimize on CRON", 'resmushit-image-optimizer'), __("Will perform image optimization process through CRON tasks", 'resmushit-image-optimizer'), "resmushit_cron")
103
+ . self::addSetting("checkbox", $new_label . __("Preserve EXIF", 'resmushit-image-optimizer'), __("Will preserve EXIF data during optimization", 'resmushit-image-optimizer'), "resmushit_preserve_exif")
104
  . '</table>';
105
  submit_button();
106
  echo '</form></div>';
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: resmushit
3
  Tags: image, optimizer, image optimization, resmush.it, smush, jpg, png, gif, optimization, compression, Compress, Images, Pictures, Reduce Image Size, Smush, Smush.it
4
  Requires at least: 4.0.0
5
  Tested up to: 5.3.2
6
- Stable tag: 0.2.4
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -70,6 +70,9 @@ Yes ! Absolutely free, the only restriction is to send images below 5MB.
70
 
71
  == Changelog ==
72
 
 
 
 
73
  = 0.2.4 =
74
  * Fix issue on SQL request for table prefix different from 'wp_'
75
 
3
  Tags: image, optimizer, image optimization, resmush.it, smush, jpg, png, gif, optimization, compression, Compress, Images, Pictures, Reduce Image Size, Smush, Smush.it
4
  Requires at least: 4.0.0
5
  Tested up to: 5.3.2
6
+ Stable tag: 0.2.5
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
70
 
71
  == Changelog ==
72
 
73
+ = 0.2.5 =
74
+ * Add Preserve Exif Feature
75
+
76
  = 0.2.4 =
77
  * Fix issue on SQL request for table prefix different from 'wp_'
78
 
resmushit.admin.php CHANGED
@@ -27,6 +27,7 @@ function resmushit_settings_declare() {
27
  register_setting( 'resmushit-settings', 'resmushit_statistics' );
28
  register_setting( 'resmushit-settings', 'resmushit_logs' );
29
  register_setting( 'resmushit-settings', 'resmushit_cron' );
 
30
  }
31
  add_action( 'admin_init', 'resmushit_settings_declare' );
32
 
27
  register_setting( 'resmushit-settings', 'resmushit_statistics' );
28
  register_setting( 'resmushit-settings', 'resmushit_logs' );
29
  register_setting( 'resmushit-settings', 'resmushit_cron' );
30
+ register_setting( 'resmushit-settings', 'resmushit_preserve_exif' );
31
  }
32
  add_action( 'admin_init', 'resmushit_settings_declare' );
33
 
resmushit.php CHANGED
@@ -4,14 +4,14 @@
4
  * @author Charles Bourgeaux <hello@resmush.it>
5
  * @license GPL-2.0+
6
  * @link http://www.resmush.it
7
- * @copyright 2019 Resmush.it
8
  *
9
  * @wordpress-plugin
10
  * Plugin Name: reSmush.it Image Optimizer
11
  * Plugin URI: https://wordpress.org/plugins/resmushit-image-optimizer/
12
  * Description: Image Optimization API. Provides image size optimization
13
- * Version: 0.2.4
14
- * Timestamp: 2019.12.23
15
  * Author: reSmush.it
16
  * Author URI: https://resmush.it
17
  * Author: Charles Bourgeaux
@@ -63,6 +63,8 @@ function resmushit_activate() {
63
  update_option( 'resmushit_cron_lastrun', 0 );
64
  if(get_option('resmushit_cron_firstactivation') === null)
65
  update_option( 'resmushit_cron_firstactivation', 0 );
 
 
66
  }
67
  }
68
  register_activation_hook( __FILE__, 'resmushit_activate' );
4
  * @author Charles Bourgeaux <hello@resmush.it>
5
  * @license GPL-2.0+
6
  * @link http://www.resmush.it
7
+ * @copyright 2020 Resmush.it
8
  *
9
  * @wordpress-plugin
10
  * Plugin Name: reSmush.it Image Optimizer
11
  * Plugin URI: https://wordpress.org/plugins/resmushit-image-optimizer/
12
  * Description: Image Optimization API. Provides image size optimization
13
+ * Version: 0.2.5
14
+ * Timestamp: 2020.02.15
15
  * Author: reSmush.it
16
  * Author URI: https://resmush.it
17
  * Author: Charles Bourgeaux
63
  update_option( 'resmushit_cron_lastrun', 0 );
64
  if(get_option('resmushit_cron_firstactivation') === null)
65
  update_option( 'resmushit_cron_firstactivation', 0 );
66
+ if(!get_option('resmushit_preserve_exif'))
67
+ update_option( 'resmushit_preserve_exif', 0 );
68
  }
69
  }
70
  register_activation_hook( __FILE__, 'resmushit_activate' );
resmushit.settings.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
 
3
  define('RESMUSHIT_ENDPOINT', 'http://api.resmush.it/');
4
- define('RESMUSHIT_VERSION', '0.2.4');
5
  define('RESMUSHIT_DEFAULT_QLTY', '92');
6
  define('RESMUSHIT_TIMEOUT', '10');
7
  define('RESMUSHIT_LOGS_PATH', 'resmushit.log');
1
  <?php
2
 
3
  define('RESMUSHIT_ENDPOINT', 'http://api.resmush.it/');
4
+ define('RESMUSHIT_VERSION', '0.2.5');
5
  define('RESMUSHIT_DEFAULT_QLTY', '92');
6
  define('RESMUSHIT_TIMEOUT', '10');
7
  define('RESMUSHIT_LOGS_PATH', 'resmushit.log');