Changeset 2809781
- Timestamp:
- 11/02/2022 10:39:11 AM (3 years ago)
- Location:
- resmushit-image-optimizer/trunk
- Files:
-
- 3 edited
-
readme.txt (modified) (3 diffs)
-
resmushit.php (modified) (4 diffs)
-
resmushit.settings.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
resmushit-image-optimizer/trunk/readme.txt
r2804661 r2809781 3 3 Tags: image, optimizer, image optimization, resmush.it, smush, jpg, png, gif, optimization, compression, Compress, Images, Pictures, Reduce Image Size, Smush, Smush.it 4 4 Requires at least: 4.0.0 5 Tested up to: 6. 0.36 Stable tag: 0.4. 85 Tested up to: 6.1.0 6 Stable tag: 0.4.9 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 15 15 16 16 This plugin includes a bulk operation to optimize all your pictures in 2 clicks ! Change your image optimization level to fit your needs ! 17 This service is used by more than **400,000* * websites on different CMS (Wordpress, Drupal, Joomla, Magento, Prestashop...).17 This service is used by more than **400,000*php* websites on different CMS (Wordpress, Drupal, Joomla, Magento, Prestashop...). 18 18 19 19 The plugin includes an option to exclude some pictures of the optimizer. … … 75 75 == Changelog == 76 76 77 78 = 0.4.9 = 79 * Compatibility with WP 6.1.0 80 * Compatible with PHP 8.1.X 81 * Fixed issue on Undefined array key "file" in .../resmushit.php on line 114 77 82 78 83 = 0.4.8 = -
resmushit-image-optimizer/trunk/resmushit.php
r2804661 r2809781 11 11 * Plugin URI: https://wordpress.org/plugins/resmushit-image-optimizer/ 12 12 * Description: Image Optimization API. Provides image size optimization 13 * Version: 0.4. 814 * Timestamp: 2022.1 0.2613 * Version: 0.4.9 14 * Timestamp: 2022.11.02 15 15 * Author: reSmush.it 16 16 * Author URI: https://resmush.it … … 108 108 109 109 $fileInfo = pathinfo(get_attached_file( $attachment_id )); 110 if(!isset($fileInfo['dirname'])) { 111 rlog("Error! Incorrect file provided." . print_r($fileInfo), 'WARNING'); 112 return $attachments; 113 } 110 114 $basepath = $fileInfo['dirname'] . '/'; 111 115 $extension = isset($fileInfo['extension']) ? $fileInfo['extension'] : NULL; 116 117 if(!isset($attachments[ 'file' ])) { 118 rlog("Error! Incorrect attachment." . print_r($attachments), 'WARNING'); 119 return $attachments; 120 } 112 121 $basefile = basename($attachments[ 'file' ]); 113 122 … … 119 128 $statistics[] = reSmushit::optimize($basepath . $basefile, $force_keep_original ); 120 129 121 foreach($attachments['sizes'] as $image_style) 130 if(!isset($attachments[ 'sizes' ])) { 131 rlog("Error! Unable to find attachments sizes." . print_r($attachments), 'WARNING'); 132 return $attachments; 133 } 134 foreach($attachments['sizes'] as $image_style) { 122 135 $statistics[] = reSmushit::optimize($basepath . $image_style['file'], FALSE ); 136 } 123 137 124 138 $count = 0; … … 128 142 $cumulated_optimized_sizes += $stat->dest_size; 129 143 $count++; 130 } else 144 } else { 131 145 $error = TRUE; 146 } 132 147 } 133 148 if(!$error) { -
resmushit-image-optimizer/trunk/resmushit.settings.php
r2804661 r2809781 2 2 3 3 define('RESMUSHIT_ENDPOINT', 'http://api.resmush.it/'); 4 define('RESMUSHIT_VERSION', '0.4. 8');4 define('RESMUSHIT_VERSION', '0.4.9'); 5 5 define('RESMUSHIT_DEFAULT_QLTY', '92'); 6 6 define('RESMUSHIT_TIMEOUT', '10');
Note: See TracChangeset
for help on using the changeset viewer.