reSmush.it Image Optimizer - Version 0.3.11

Version Description

  • Fix : Optimize button not working when creating a new post
  • Fix : Default value of variables incorrectly initialized
  • Test on WP 5.5.1
Download this release

Release Info

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

Code changes from version 0.3.10 to 0.3.11

Files changed (4) hide show
  1. readme.txt +7 -2
  2. resmushit.admin.php +1 -0
  3. resmushit.php +13 -13
  4. resmushit.settings.php +1 -1
readme.txt CHANGED
@@ -2,8 +2,8 @@
2
  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.4.2
6
- Stable tag: 0.3.9
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -76,6 +76,11 @@ Yes ! Absolutely free, the only restriction is to send images below 5MB.
76
 
77
  == Changelog ==
78
 
 
 
 
 
 
79
  = 0.3.10 =
80
  * hotfix : deprecated function used
81
 
2
  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.5.1
6
+ Stable tag: 0.3.11
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
76
 
77
  == Changelog ==
78
 
79
+ = 0.3.11 =
80
+ * Fix : Optimize button not working when creating a new post
81
+ * Fix : Default value of variables incorrectly initialized
82
+ * Test on WP 5.5.1
83
+
84
  = 0.3.10 =
85
  * hotfix : deprecated function used
86
 
resmushit.admin.php CHANGED
@@ -152,6 +152,7 @@ function resmushit_settings_page() {
152
  function resmushit_register_plugin_assets(){
153
  $allowed_pages = array( 'media_page_resmushit_options',
154
  'upload',
 
155
  'attachment');
156
 
157
  if ( function_exists( 'get_current_screen' ) ) {
152
  function resmushit_register_plugin_assets(){
153
  $allowed_pages = array( 'media_page_resmushit_options',
154
  'upload',
155
+ 'post',
156
  'attachment');
157
 
158
  if ( function_exists( 'get_current_screen' ) ) {
resmushit.php CHANGED
@@ -10,8 +10,8 @@
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.3.10
14
- * Timestamp: 2020.07.26
15
  * Author: reSmush.it
16
  * Author URI: https://resmush.it
17
  * Author: Charles Bourgeaux
@@ -49,27 +49,27 @@ add_action( 'plugins_loaded', 'resmushit_load_plugin_textdomain' );
49
  */
50
  function resmushit_activate() {
51
  if ( is_super_admin() ) {
52
- if(get_option('resmushit_qlty') === null)
53
  update_option( 'resmushit_qlty', RESMUSHIT_DEFAULT_QLTY );
54
- if(get_option('resmushit_on_upload') === null)
55
  update_option( 'resmushit_on_upload', '1' );
56
- if(get_option('resmushit_statistics') === null)
57
  update_option( 'resmushit_statistics', '1' );
58
- if(get_option('resmushit_total_optimized') === null)
59
  update_option( 'resmushit_total_optimized', '0' );
60
- if(get_option('resmushit_cron') === null)
61
  update_option( 'resmushit_cron', 0 );
62
- if(get_option('resmushit_cron_lastaction') === null)
63
  update_option( 'resmushit_cron_lastaction', 0 );
64
- if(get_option('resmushit_cron_lastrun') === null)
65
  update_option( 'resmushit_cron_lastrun', 0 );
66
- if(get_option('resmushit_cron_firstactivation') === null)
67
  update_option( 'resmushit_cron_firstactivation', 0 );
68
- if(!get_option('resmushit_preserve_exif'))
69
  update_option( 'resmushit_preserve_exif', 0 );
70
- if(!get_option('resmushit_remove_unsmushed'))
71
  update_option( 'resmushit_remove_unsmushed', 0 );
72
- if(!get_option('resmushit_has_no_backup_files'))
73
  update_option( 'resmushit_has_no_backup_files', 0 );
74
  }
75
  }
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.3.11
14
+ * Timestamp: 2020.09.26
15
  * Author: reSmush.it
16
  * Author URI: https://resmush.it
17
  * Author: Charles Bourgeaux
49
  */
50
  function resmushit_activate() {
51
  if ( is_super_admin() ) {
52
+ if(get_option('resmushit_qlty') === false)
53
  update_option( 'resmushit_qlty', RESMUSHIT_DEFAULT_QLTY );
54
+ if(get_option('resmushit_on_upload') === false)
55
  update_option( 'resmushit_on_upload', '1' );
56
+ if(get_option('resmushit_statistics') === false)
57
  update_option( 'resmushit_statistics', '1' );
58
+ if(get_option('resmushit_total_optimized') === false)
59
  update_option( 'resmushit_total_optimized', '0' );
60
+ if(get_option('resmushit_cron') === false)
61
  update_option( 'resmushit_cron', 0 );
62
+ if(get_option('resmushit_cron_lastaction') === false)
63
  update_option( 'resmushit_cron_lastaction', 0 );
64
+ if(get_option('resmushit_cron_lastrun') === false)
65
  update_option( 'resmushit_cron_lastrun', 0 );
66
+ if(get_option('resmushit_cron_firstactivation') === false)
67
  update_option( 'resmushit_cron_firstactivation', 0 );
68
+ if(get_option('resmushit_preserve_exif') === false)
69
  update_option( 'resmushit_preserve_exif', 0 );
70
+ if(get_option('resmushit_remove_unsmushed') === false)
71
  update_option( 'resmushit_remove_unsmushed', 0 );
72
+ if(get_option('resmushit_has_no_backup_files') === false)
73
  update_option( 'resmushit_has_no_backup_files', 0 );
74
  }
75
  }
resmushit.settings.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
 
3
  define('RESMUSHIT_ENDPOINT', 'http://api.resmush.it/');
4
- define('RESMUSHIT_VERSION', '0.3.10');
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.3.11');
5
  define('RESMUSHIT_DEFAULT_QLTY', '92');
6
  define('RESMUSHIT_TIMEOUT', '10');
7
  define('RESMUSHIT_LOGS_PATH', 'resmushit.log');