reSmush.it Image Optimizer - Version 0.1.20

Version Description

  • Fix PHP errors with PHP 7.2
  • Code refacto
Download this release

Release Info

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

Code changes from version 0.1.19 to 0.1.20

classes/resmushit.class.php CHANGED
@@ -275,7 +275,8 @@ Class reSmushit {
275
  $files_too_big = array();
276
  $already_optimized_images_array = array();
277
  $disabled_images_array = array();
278
-
 
279
  $queryAllPictures = $wpdb->prepare(
280
  "select
281
  $wpdb->posts.ID as ID,
@@ -353,7 +354,11 @@ Class reSmushit {
353
  */
354
  public static function getCountNonOptimizedPictures(){
355
  $data = json_decode(self::getNonOptimizedPictures());
356
- return array('nonoptimized' => sizeof($data->nonoptimized), 'filestoobig' => sizeof($data->filestoobig), 'filesnotfound' => sizeof($data->filesnotfound));
 
 
 
 
357
  }
358
 
359
 
275
  $files_too_big = array();
276
  $already_optimized_images_array = array();
277
  $disabled_images_array = array();
278
+ $files_not_found = array();
279
+
280
  $queryAllPictures = $wpdb->prepare(
281
  "select
282
  $wpdb->posts.ID as ID,
354
  */
355
  public static function getCountNonOptimizedPictures(){
356
  $data = json_decode(self::getNonOptimizedPictures());
357
+ $output = array();
358
+ $output['nonoptimized'] = is_array($data->nonoptimized) ? sizeof($data->nonoptimized) : 0;
359
+ $output['filesnotfound'] = is_array($data->filesnotfound) ? sizeof($data->filesnotfound) : 0;
360
+ $output['filestoobig'] = is_array($data->filestoobig) ? sizeof($data->filestoobig) : 0;
361
+ return $output;
362
  }
363
 
364
 
classes/resmushitUI.class.php CHANGED
@@ -38,10 +38,12 @@ Class reSmushitUI {
38
  * @return none
39
  */
40
  public static function fullWidthPanelWrapper($title = null, $html = null, $border = null) {
41
- ?>
42
- <div class='rsmt-panel w100 <?php if($border) echo 'brdr-'.$border; ?>'>
43
- <h2><?php echo $title; ?></h2>
44
- <?php
 
 
45
  }
46
 
47
 
@@ -55,9 +57,7 @@ Class reSmushitUI {
55
  * @return none
56
  */
57
  public static function fullWidthPanelEndWrapper() {
58
- ?>
59
- </div>
60
- <?php
61
  }
62
 
63
 
@@ -88,21 +88,21 @@ Class reSmushitUI {
88
  */
89
  public static function settingsPanel() {
90
  self::fullWidthPanelWrapper(__('Settings', 'resmushit'), null, 'orange');
91
- ?>
92
- <div class="rsmt-settings">
93
- <form method="post" action="options.php" id="rsmt-options-form">
94
- <?php settings_fields( 'resmushit-settings' ); ?>
95
- <?php do_settings_sections( 'resmushit-settings' ); ?>
96
- <table class="form-table">
97
- <?php self::addSetting("text", __("Image quality", 'resmushit'), __("Default value is 92. The quality factor must be between 0 (very weak) and 100 (best quality)", 'resmushit'), "resmushit_qlty") ?>
98
- <?php self::addSetting("checkbox", __("Optimize on upload", 'resmushit'), __("All future images uploaded will be automatically optimized", 'resmushit'), "resmushit_on_upload") ?>
99
- <?php self::addSetting("checkbox", __("Enable statistics", 'resmushit'), __("Generates statistics about optimized pictures", 'resmushit'), "resmushit_statistics") ?>
100
- <?php self::addSetting("checkbox", __("Enable logs", 'resmushit'), __("Enable file logging (for developers)", 'resmushit'), "resmushit_logs") ?>
101
- </table>
102
- <?php submit_button(); ?>
103
- </form>
104
- </div>
105
- <?php self::fullWidthPanelEndWrapper();
106
  }
107
 
108
 
@@ -118,23 +118,27 @@ Class reSmushitUI {
118
  $dataCountNonOptimizedPictures = reSmushit::getCountNonOptimizedPictures();
119
  $countNonOptimizedPictures = $dataCountNonOptimizedPictures['nonoptimized'];
120
  self::fullWidthPanelWrapper(__('Optimize unsmushed pictures', 'resmushit'), null, 'blue');
121
- ?>
122
-
123
- <div class="rsmt-bulk">
124
- <div class="non-optimized-wrapper <?php if(!$countNonOptimizedPictures) echo 'disabled' ?>">
125
- <h3 class="icon_message warning"><?php _e('There is currently', 'resmushit') ?> <em><?php echo $countNonOptimizedPictures; ?> <?php _e('non optimized pictures', 'resmushit') ?></em>.</h3>
126
- <p><?php _e('This action will resmush all pictures which have not been optimized to the good Image Quality Rate.', 'resmushit') ?></p>
127
- <p class="submit" id="bulk-resize-examine-button">
128
- <button class="button-primary" onclick="resmushit_bulk_resize('bulk_resize_image_list');"><?php _e('Optimize all pictures', 'resmushit') ?></button>
129
- </p>
130
- <div id='bulk_resize_image_list'></div>
131
- </div>
132
-
133
- <div class="optimized-wrapper <?php if($countNonOptimizedPictures) echo 'disabled' ?>">
134
- <h3 class="icon_message ok"><?php _e('Congrats ! All your pictures are correctly optimized', 'resmushit') ?></h3>
135
- </div>
136
- </div>
137
- <?php self::fullWidthPanelEndWrapper();
 
 
 
 
138
  }
139
 
140
 
@@ -147,38 +151,44 @@ Class reSmushitUI {
147
  */
148
  public static function bigFilesPanel() {
149
  $getNonOptimizedPictures = json_decode(reSmushit::getNonOptimizedPictures());
150
- ;
151
- $countfilesTooBigPictures = sizeof($getNonOptimizedPictures->filestoobig);
152
  if(!$countfilesTooBigPictures)
153
  return false;
154
 
155
  self::fullWidthPanelWrapper(__('Files non optimized', 'resmushit'), null, 'grey');
156
- ?>
157
-
158
- <div class="rsmt-bigfiles">
159
- <div class="optimized-wrapper <?php if(!$countfilesTooBigPictures) echo 'disabled' ?>">
160
- <h3 class="icon_message info">
161
- <?php if($countfilesTooBigPictures > 1): ?>
162
- <?php echo $countfilesTooBigPictures . ' ' ?><?php _e('pictures are too big (> 5MB) for the optimizer', 'resmushit') ?>
163
- <?php else: ?>
164
- <?php echo $countfilesTooBigPictures . ' ' ?><?php _e('picture is too big (> 5MB) for the optimizer', 'resmushit') ?>
165
- <?php endif ?>
166
- </h3>
167
- <div class="list-accordion">
168
- <h4><?php _e('List of files above 5MB', 'resmushit') ?></h4>
169
- <ul>
170
- <?php foreach($getNonOptimizedPictures->filestoobig as $file): ?>
171
- <?php
172
- $fileInfo = pathinfo(get_attached_file( $file->ID ));
173
- $filesize = reSmushitUI::sizeFormat(filesize(get_attached_file( $file->ID )));
174
- ?>
175
- <li><a href="<?php echo wp_get_attachment_url( $file->ID ); ?>" target="_blank"><?php echo wp_get_attachment_image($file->ID, 'thumbnail'); ?><span><?php echo $fileInfo['basename'] . ' (' . $filesize . ').' ?></span></a></li>
176
- <?php endforeach; ?>
177
- </ul>
178
- </div>
179
- </div>
180
- </div>
181
- <?php self::fullWidthPanelEndWrapper();
 
 
 
 
 
 
182
  }
183
 
184
 
@@ -195,22 +205,41 @@ Class reSmushitUI {
195
  if(!get_option('resmushit_statistics'))
196
  return false;
197
  self::fullWidthPanelWrapper(__('Statistics', 'resmushit'), null, 'green');
198
- ?>
199
-
200
- <div class="rsmt-statistics">
201
- <?php $resmushit_stat = reSmushit::getStatistics();
202
- if($resmushit_stat['files_optimized'] != 0):
203
- ?>
204
- <p><strong><?php _e('Space saved :', 'resmushit') ?></strong> <span id="rsmt-statistics-space-saved"><?php echo self::sizeFormat($resmushit_stat['total_saved_size'])?></span></p>
205
- <p><strong><?php _e('Total reduction :', 'resmushit') ?></strong> <span id="rsmt-statistics-percent-reduction"><?php echo $resmushit_stat['percent_reduction'] ?></span></p>
206
- <p><strong><?php _e('Attachments optimized :', 'resmushit') ?></strong> <span id="rsmt-statistics-files-optimized"><?php echo $resmushit_stat['files_optimized'] ?></span>/<span id="rsmt-statistics-total-pictures"><?php echo $resmushit_stat['total_pictures'] ?></span></p>
207
- <p><strong><?php _e('Image optimized (including thumbnails) :', 'resmushit') ?></strong> <span id="rsmt-statistics-files-optimized"><?php echo $resmushit_stat['files_optimized_with_thumbnails'] ?></span>/<span id="rsmt-statistics-total-pictures"><?php echo $resmushit_stat['total_pictures_with_thumbnails'] ?></span></p>
208
- <p><strong><?php _e('Total images optimized :', 'resmushit') ?></strong> <span id="rsmt-statistics-total-optimizations"><?php echo $resmushit_stat['total_optimizations'] ?></span></p>
209
- <?php else: ?>
210
- <p><?php _e('No picture has been optimized yet ! Add pictures to your Wordpress Media Library.', 'resmushit') ?></p>
211
- <?php endif; ?>
212
- </div>
213
- <?php self::fullWidthPanelEndWrapper();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
214
  }
215
 
216
 
@@ -224,10 +253,9 @@ Class reSmushitUI {
224
  */
225
  public static function newsPanel() {
226
  global $wp_version;
227
- ?>
228
- <div class="rsmt-news">
229
 
230
- <?php
 
231
  self::fullWidthPanelWrapper(__('News', 'resmushit'), null, 'red');
232
  $ch = curl_init();
233
  curl_setopt($ch, CURLOPT_URL, RESMUSHIT_NEWSFEED);
@@ -236,41 +264,51 @@ Class reSmushitUI {
236
  $data_raw = curl_exec($ch);
237
  curl_close($ch);
238
  $data = json_decode($data_raw);
239
- if($data):
240
- foreach($data as $i=>$news):
241
- if($i > 2)
 
242
  break;
243
- ?>
244
- <div class="news-item">
245
- <span class="news-date"><?php echo date('d/m/Y', $news->date) ?></span>
246
- <?php if($news->picture): ?>
247
- <div class="news-img">
248
- <a href="<?php echo $news->link ?>" target="_blank">
249
- <img src="<?php echo $news->picture ?>" />
250
- </a>
251
- </div>
252
- <?php endif; ?>
253
- <h3><a href="<?php echo $news->link ?>" target="_blank"><?php echo $news->title ?></a></h3>
254
- <div class="news-content">
255
- <?php echo $news->content ?>
256
- </div>
257
- </div>
258
-
259
- <?php endforeach; ?>
260
- <?php endif; ?>
261
- <div class="social">
262
- <a class="social-maecia" title="<?php _e('Maecia Agency - Paris France', 'resmushit') ?>" href="https://www.maecia.com" target="_blank">
263
- <img src="<?php echo RESMUSHIT_BASE_URL ?>images/maecia.png" />
264
- </a>
265
- <a class="social-resmushit" title="<?php _e('Visit resmush.it for more informations', 'resmushit') ?>" href="https://www.resmush.it" target="_blank">
266
- <img src="<?php echo RESMUSHIT_BASE_URL ?>images/logo.png" />
267
- </a>
268
- <a class="social-twitter" title="<?php _e('Follow reSmush.it on Twitter', 'resmushit') ?>" href="https://www.twitter.com/resmushit" target="_blank">
269
- <img src="<?php echo RESMUSHIT_BASE_URL ?>images/twitter.png" />
270
- </a>
271
- </div>
272
- </div>
273
- <?php self::fullWidthPanelEndWrapper();
 
 
 
 
 
 
 
 
 
274
  }
275
 
276
 
@@ -287,19 +325,20 @@ Class reSmushitUI {
287
  * @return none
288
  */
289
  public static function addSetting($type, $name, $extra, $machine_name) {
290
- echo "<div class='setting-row type-$type'>";
291
- echo "<label for='$machine_name'>$name<p>$extra</p></label>";
292
  switch($type){
293
  case 'text':
294
- echo "<input type='text' name='$machine_name' id='$machine_name' value='". get_option( $machine_name ) ."'/>";
295
  break;
296
  case 'checkbox':
297
  $additionnal = null;
298
  if ( 1 == get_option( $machine_name ) ) $additionnal = 'checked="checked"';
299
- echo "<input type='checkbox' name='$machine_name' id='$machine_name' value='1' ". $additionnal ."/>";
300
  break;
301
  }
302
- echo '</div>';
 
303
  }
304
 
305
 
38
  * @return none
39
  */
40
  public static function fullWidthPanelWrapper($title = null, $html = null, $border = null) {
41
+ $borderClass = NULL;
42
+
43
+ if($border) {
44
+ $borderClass = 'brdr-'.$border;
45
+ }
46
+ echo "<div class='rsmt-panel w100 $borderClass'><h2>$title</h2>";
47
  }
48
 
49
 
57
  * @return none
58
  */
59
  public static function fullWidthPanelEndWrapper() {
60
+ echo "</div>";
 
 
61
  }
62
 
63
 
88
  */
89
  public static function settingsPanel() {
90
  self::fullWidthPanelWrapper(__('Settings', 'resmushit'), null, 'orange');
91
+
92
+ echo '<div class="rsmt-settings">
93
+ <form method="post" action="options.php" id="rsmt-options-form">';
94
+ settings_fields( 'resmushit-settings' );
95
+ do_settings_sections( 'resmushit-settings' );
96
+
97
+ echo '<table class="form-table">'
98
+ . self::addSetting("text", __("Image quality", 'resmushit'), __("Default value is 92. The quality factor must be between 0 (very weak) and 100 (best quality)", 'resmushit'), "resmushit_qlty")
99
+ . self::addSetting("checkbox", __("Optimize on upload", 'resmushit'), __("All future images uploaded will be automatically optimized", 'resmushit'), "resmushit_on_upload")
100
+ . self::addSetting("checkbox", __("Enable statistics", 'resmushit'), __("Generates statistics about optimized pictures", 'resmushit'), "resmushit_statistics")
101
+ . self::addSetting("checkbox", __("Enable logs", 'resmushit'), __("Enable file logging (for developers)", 'resmushit'), "resmushit_logs")
102
+ . '</table>';
103
+ submit_button();
104
+ echo '</form></div>';
105
+ self::fullWidthPanelEndWrapper();
106
  }
107
 
108
 
118
  $dataCountNonOptimizedPictures = reSmushit::getCountNonOptimizedPictures();
119
  $countNonOptimizedPictures = $dataCountNonOptimizedPictures['nonoptimized'];
120
  self::fullWidthPanelWrapper(__('Optimize unsmushed pictures', 'resmushit'), null, 'blue');
121
+
122
+ $additionnalClassNeedOptimization = NULL;
123
+ $additionnalClassNoNeedOptimization = 'disabled';
124
+ if(!$countNonOptimizedPictures) {
125
+ $additionnalClassNeedOptimization = 'disabled';
126
+ $additionnalClassNoNeedOptimization = NULL;
127
+ }
128
+
129
+ echo "<div class='rsmt-bulk'><div class='non-optimized-wrapper $additionnalClassNeedOptimization'><h3 class='icon_message warning'>"
130
+ . __('There is currently', 'resmushit')
131
+ . " <em>$countNonOptimizedPictures "
132
+ . __('non optimized pictures', 'resmushit')
133
+ . "</em>.</h3><p>"
134
+ . __('This action will resmush all pictures which have not been optimized to the good Image Quality Rate.', 'resmushit')
135
+ . "</p><p class='submit' id='bulk-resize-examine-button'><button class='button-primary' onclick='resmushit_bulk_resize(\"bulk_resize_image_list\");'>"
136
+ . __('Optimize all pictures', 'resmushit')
137
+ . "</button></p><div id='bulk_resize_image_list'></div></div>"
138
+ . "<div class='optimized-wrapper $additionnalClassNoNeedOptimization'><h3 class='icon_message ok'>"
139
+ . __('Congrats ! All your pictures are correctly optimized', 'resmushit')
140
+ . "</h3></div></div>";
141
+ self::fullWidthPanelEndWrapper();
142
  }
143
 
144
 
151
  */
152
  public static function bigFilesPanel() {
153
  $getNonOptimizedPictures = json_decode(reSmushit::getNonOptimizedPictures());
154
+ $countfilesTooBigPictures = is_array($getNonOptimizedPictures->filestoobig) ? sizeof($getNonOptimizedPictures->filestoobig) : 0;
155
+
156
  if(!$countfilesTooBigPictures)
157
  return false;
158
 
159
  self::fullWidthPanelWrapper(__('Files non optimized', 'resmushit'), null, 'grey');
160
+
161
+ $additionnalClass = NULL;
162
+ if(!$countfilesTooBigPictures) {
163
+ $additionnalClass = 'disabled';
164
+ }
165
+
166
+ echo "<div class='rsmt-bigfiles'><div class='optimized-wrapper $additionnalClass'>
167
+ <h3 class='icon_message info'>";
168
+
169
+ if($countfilesTooBigPictures > 1) {
170
+ echo $countfilesTooBigPictures . ' ' . __('pictures are too big (> 5MB) for the optimizer', 'resmushit');
171
+ } else {
172
+ echo $countfilesTooBigPictures . ' ' . __('picture is too big (> 5MB) for the optimizer', 'resmushit');
173
+ }
174
+ echo "</h3><div class='list-accordion'><h4>"
175
+ . __('List of files above 5MB', 'resmushit')
176
+ . "</h4><ul>";
177
+
178
+ foreach($getNonOptimizedPictures->filestoobig as $file){
179
+ $fileInfo = pathinfo(get_attached_file( $file->ID ));
180
+ $filesize = reSmushitUI::sizeFormat(filesize(get_attached_file( $file->ID )));
181
+
182
+ echo "<li><a href='"
183
+ . wp_get_attachment_url( $file->ID )
184
+ . "' target='_blank'>"
185
+ . wp_get_attachment_image($file->ID, 'thumbnail')
186
+ . "<span>"
187
+ . $fileInfo['basename'] . ' (' . $filesize . ').</span></a></li>';
188
+ }
189
+ echo '</ul></div></div></div>';
190
+
191
+ self::fullWidthPanelEndWrapper();
192
  }
193
 
194
 
205
  if(!get_option('resmushit_statistics'))
206
  return false;
207
  self::fullWidthPanelWrapper(__('Statistics', 'resmushit'), null, 'green');
208
+ $resmushit_stat = reSmushit::getStatistics();
209
+
210
+ echo "<div class='rsmt-statistics'>";
211
+
212
+ if($resmushit_stat['files_optimized'] != 0) {
213
+ echo "<p><strong>"
214
+ . __('Space saved :', 'resmushit')
215
+ . "</strong> <span id='rsmt-statistics-space-saved'>"
216
+ . self::sizeFormat($resmushit_stat['total_saved_size'])
217
+ . "</span></p><p><strong>"
218
+ . __('Total reduction :', 'resmushit')
219
+ . "</strong> <span id='rsmt-statistics-percent-reduction'>"
220
+ . $resmushit_stat['percent_reduction']
221
+ . "</span></p><p><strong>"
222
+ . __('Attachments optimized :', 'resmushit')
223
+ . "</strong> <span id='rsmt-statistics-files-optimized'>"
224
+ . $resmushit_stat['files_optimized']
225
+ . "</span>/<span id='rsmt-statistics-total-picture'>"
226
+ . $resmushit_stat['total_pictures']
227
+ . "</span></p><p><strong>"
228
+ . __('Image optimized (including thumbnails) :', 'resmushit')
229
+ . "</strong> <span id='rsmt-statistics-files-optimized'>"
230
+ . $resmushit_stat['files_optimized_with_thumbnails']
231
+ . "</span>/<span id='rsmt-statistics-total-pictures'>"
232
+ . $resmushit_stat['total_pictures_with_thumbnails']
233
+ . "</span></p><p><strong>"
234
+ . __('Total images optimized :', 'resmushit')
235
+ . "</strong> <span id='rsmt-statistics-total-optimizations'>"
236
+ . $resmushit_stat['total_optimizations']
237
+ . "</span></p>";
238
+ } else {
239
+ echo "<p>" . __('No picture has been optimized yet ! Add pictures to your Wordpress Media Library.', 'resmushit') . "</p>";
240
+ }
241
+ echo "</div>";
242
+ self::fullWidthPanelEndWrapper();
243
  }
244
 
245
 
253
  */
254
  public static function newsPanel() {
255
  global $wp_version;
 
 
256
 
257
+ echo "<div class='rsmt-news'>";
258
+
259
  self::fullWidthPanelWrapper(__('News', 'resmushit'), null, 'red');
260
  $ch = curl_init();
261
  curl_setopt($ch, CURLOPT_URL, RESMUSHIT_NEWSFEED);
264
  $data_raw = curl_exec($ch);
265
  curl_close($ch);
266
  $data = json_decode($data_raw);
267
+
268
+ if($data) {
269
+ foreach($data as $i=>$news) {
270
+ if($i > 2){
271
  break;
272
+ }
273
+
274
+ echo "<div class='news-item'><span class='news-date'>"
275
+ . date('d/m/Y', $news->date)
276
+ . "</span>";
277
+ if($news->picture) {
278
+ echo "<div class='news-img'><a href='"
279
+ . $news->link
280
+ . "' target='_blank'><img src='"
281
+ . $news->picture
282
+ . "' /></a></div>";
283
+ }
284
+ echo "<h3><a href='"
285
+ . $news->link
286
+ . "' target='_blank'>"
287
+ . $news->title
288
+ . "</a></h3><div class='news-content'>"
289
+ . $news->content
290
+ . "</div>";
291
+ }
292
+ }
293
+
294
+ echo "<div class='social'>"
295
+ . "<a class='social-maecia' title='"
296
+ . __('Maecia Agency - Paris France', 'resmushit')
297
+ . "' href='https://www.maecia.com' target='_blank'>"
298
+ . "<img src='"
299
+ . RESMUSHIT_BASE_URL . "images/maecia.png' /></a>"
300
+ . "<a class='social-resmushit' title='"
301
+ . __('Visit resmush.it for more informations', 'resmushit')
302
+ . "' href='https://resmush.it' target='_blank'>"
303
+ . "<img src='"
304
+ . RESMUSHIT_BASE_URL . "images/logo.png' /></a>"
305
+ . "<a class='social-twitter' title='"
306
+ . __('Follow reSmush.it on Twitter', 'resmushit')
307
+ . "' href='https://www.twitter.com/resmushit' target='_blank'>"
308
+ . "<img src='"
309
+ . RESMUSHIT_BASE_URL . "images/twitter.png' /></a></div></div>";
310
+
311
+ self::fullWidthPanelEndWrapper();
312
  }
313
 
314
 
325
  * @return none
326
  */
327
  public static function addSetting($type, $name, $extra, $machine_name) {
328
+ $output = " <div class='setting-row type-$type'>
329
+ <label for='$machine_name'>$name<p>$extra</p></label>";
330
  switch($type){
331
  case 'text':
332
+ $output .= "<input type='text' name='$machine_name' id='$machine_name' value='". get_option( $machine_name ) ."'/>";
333
  break;
334
  case 'checkbox':
335
  $additionnal = null;
336
  if ( 1 == get_option( $machine_name ) ) $additionnal = 'checked="checked"';
337
+ $output .= "<input type='checkbox' name='$machine_name' id='$machine_name' value='1' ". $additionnal ."/>";
338
  break;
339
  }
340
+ $output .= '</div>';
341
+ return $output;
342
  }
343
 
344
 
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: 4.9.8
6
- Stable tag: 0.1.19
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -66,6 +66,10 @@ Yes ! Absolutely free, the only restriction is to send images below 5MB.
66
 
67
  == Changelog ==
68
 
 
 
 
 
69
  = 0.1.19 =
70
  * Fix JS on "Optimize" button for a single picture
71
  * Provide a new "Force Optimization" for a single picture
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: 4.9.8
6
+ Stable tag: 0.1.20
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
66
 
67
  == Changelog ==
68
 
69
+ = 0.1.20 =
70
+ * Fix PHP errors with PHP 7.2
71
+ * Code refacto
72
+
73
  = 0.1.19 =
74
  * Fix JS on "Optimize" button for a single picture
75
  * Provide a new "Force Optimization" for a single picture
resmushit.php CHANGED
@@ -10,8 +10,8 @@
10
  * Plugin Name: reSmush.it Image Optimizer
11
  * Plugin URI: https://resmush.it
12
  * Description: Image Optimization API. Provides image size optimization
13
- * Version: 0.1.19
14
- * Timestamp: 2018.11.11
15
  * Author: reSmush.it
16
  * Author URI: https://resmush.it
17
  * Author: Charles Bourgeaux
10
  * Plugin Name: reSmush.it Image Optimizer
11
  * Plugin URI: https://resmush.it
12
  * Description: Image Optimization API. Provides image size optimization
13
+ * Version: 0.1.20
14
+ * Timestamp: 2018.11.25
15
  * Author: reSmush.it
16
  * Author URI: https://resmush.it
17
  * Author: Charles Bourgeaux
resmushit.settings.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
 
4
  define('RESMUSHIT_ENDPOINT', 'http://api.resmush.it/');
5
- define('RESMUSHIT_VERSION', '0.1.19');
6
  define('RESMUSHIT_DEFAULT_QLTY', '92');
7
  define('RESMUSHIT_TIMEOUT', '10');
8
  define('RESMUSHIT_LOGS_PATH', 'resmushit.log');
2
 
3
 
4
  define('RESMUSHIT_ENDPOINT', 'http://api.resmush.it/');
5
+ define('RESMUSHIT_VERSION', '0.1.20');
6
  define('RESMUSHIT_DEFAULT_QLTY', '92');
7
  define('RESMUSHIT_TIMEOUT', '10');
8
  define('RESMUSHIT_LOGS_PATH', 'resmushit.log');