Changeset 1435729
- Timestamp:
- 06/13/2016 10:18:34 AM (10 years ago)
- Location:
- winsite-image-optimizer
- Files:
-
- 22 added
- 4 edited
-
tags/1.0.2 (added)
-
tags/1.0.2/.eslintignore (added)
-
tags/1.0.2/.eslintrc (added)
-
tags/1.0.2/bin (added)
-
tags/1.0.2/bin/install-wp-tests.sh (added)
-
tags/1.0.2/composer.json.x (added)
-
tags/1.0.2/includes (added)
-
tags/1.0.2/includes/class-wsi-hooks.php (added)
-
tags/1.0.2/includes/class-wsi-retro-processor.php (added)
-
tags/1.0.2/includes/class-wsi-the-golden-retriever.php (added)
-
tags/1.0.2/includes/engines (added)
-
tags/1.0.2/includes/engines/abstract-class-wsi-engine.php (added)
-
tags/1.0.2/includes/engines/class-wsi-engine-imageoptim.php (added)
-
tags/1.0.2/notes.txt (added)
-
tags/1.0.2/readme.txt (added)
-
tags/1.0.2/static (added)
-
tags/1.0.2/static/js (added)
-
tags/1.0.2/static/js/winsite-image-optimizer.js (added)
-
tags/1.0.2/winsite-image-optimizer.php (added)
-
trunk/includes/class-wsi-hooks.php (modified) (1 diff)
-
trunk/includes/class-wsi-retro-processor.php (modified) (5 diffs)
-
trunk/readme.txt (modified) (1 diff)
-
trunk/static (added)
-
trunk/static/js (added)
-
trunk/static/js/winsite-image-optimizer.js (added)
-
trunk/winsite-image-optimizer.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
winsite-image-optimizer/trunk/includes/class-wsi-hooks.php
r1432975 r1435729 128 128 add_filter( 'wp_handle_upload', array($this, __FUNCTION__), 10, 2 ); 129 129 130 // Important! Unlink the temp file, but measure size beforehand131 if ( winsite_image_optimizer()->retro->get_setting( 'should-keep-original' ) != '1' && file_exists( $orig_file['file'] ) ) {130 if ( file_exists( $orig_file['file'] ) ) { 131 // Measure size beforehand 132 132 $this->last_file_size = filesize( $orig_file['file'] ); 133 // Goodbye. 134 unlink( $orig_file['file'] ); 133 134 // Important! Unlink the temp file if noted so in settings 135 if ( winsite_image_optimizer()->retro->get_setting( 'should-keep-original' ) != '1' ) { 136 // Goodbye. 137 unlink( $orig_file['file'] ); 138 } 135 139 } 136 140 -
winsite-image-optimizer/trunk/includes/class-wsi-retro-processor.php
r1433017 r1435729 59 59 public function page_load() { 60 60 // Enqueue assets 61 wp_enqueue_script( 'wsi-main', plugins_url( ' assets/js/winsite-image-optimizer.js', dirname( __FILE__ ) ), array( 'jquery' ) );61 wp_enqueue_script( 'wsi-main', plugins_url( 'static/js/winsite-image-optimizer.js', dirname( __FILE__ ) ), array( 'jquery' ) ); 62 62 63 63 $args = array( … … 164 164 <button class="button button-primary" type="submit">Regenerate Retroactive</button> 165 165 <span class="status status-finished"><span class="dashicons dashicons-yes"></span> Finished</span> 166 <span class="spinner"></span> 166 167 </form> 167 168 </div> … … 169 170 <style> 170 171 #wsi-regeneretro .status { display: none; } 172 #wsi-regeneretro .status-active { display: inline-block; } 173 #wsi-regeneretro .spinner { 174 float: none; 175 display: inline-block; 176 } 171 177 #wsi-regeneretro .status.status-display { 172 178 display: inline-block; … … 232 238 233 239 // update in meta that it got processed 234 update_post_meta( $image->ID, ' wsi_photonized', '1' );240 update_post_meta( $image->ID, '_wsi_photonized', '1' ); 235 241 236 242 if ( file_exists( $fullsizepath ) ) { 237 243 update_post_meta( $image->ID, '_wsi_original_filesize', filesize( $fullsizepath ) ); 238 244 239 // Delete old image while we're at it 240 unlink( $fullsizepath ); 245 // Should we unlink this file? 246 if ( winsite_image_optimizer()->retro->get_setting( 'should-keep-original' ) != '1' ) { 247 // Delete old image while we're at it 248 unlink( $fullsizepath ); 249 } 241 250 } 242 251 … … 266 275 } 267 276 277 /** 278 * @todo update with WP new JSON functions 279 */ 268 280 public function die_json_error_msg( $id, $message ) { 269 281 die( json_encode( array( 'error' => sprintf( __( '"%1$s" (ID %2$s) failed to resize. The error message was: %3$s', 'regenerate-thumbnails' ), esc_html( get_the_title( $id ) ), $id, $message ) ) ) ); -
winsite-image-optimizer/trunk/readme.txt
r1433031 r1435729 48 48 == Changelog == 49 49 50 = 1.0.2 - June 13, 2016 51 * Bug fix: Fixed issue where JS wasn't loading in back-end, disabling use of the Retroactive Generator. Props [@maor](https://github.com/maor) 52 * Improved UX on Retroactive Image Generator page by adding an spinner/indicator when process runs. Props [@maor](https://github.com/maor) 53 * Bug fix: Fixed issue where images that got processed would be able to get procesed again with the Retroactive Gen. Props [@maor](https://github.com/maor) 54 50 55 = 1.0.1 - June 8, 2016 = 51 56 Allow inputting ImageOptim username via Media settings page. Props [@maor](https://github.com/maor) -
winsite-image-optimizer/trunk/winsite-image-optimizer.php
r1433017 r1435729 4 4 * Plugin URI: http://win-site.co.il 5 5 * Description: Optimize your images, period. 6 * Version: 1.0. 16 * Version: 1.0.2 7 7 * Author: Winsite 8 8 * Author URI: http://win-site.co.il
Note: See TracChangeset
for help on using the changeset viewer.