Changeset 1448139
- Timestamp:
- 07/03/2016 05:32:39 PM (10 years ago)
- Location:
- winsite-image-optimizer
- Files:
-
- 19 added
- 4 edited
-
tags/1.0.6 (added)
-
tags/1.0.6/.eslintignore (added)
-
tags/1.0.6/.eslintrc (added)
-
tags/1.0.6/bin (added)
-
tags/1.0.6/bin/install-wp-tests.sh (added)
-
tags/1.0.6/composer.json.x (added)
-
tags/1.0.6/includes (added)
-
tags/1.0.6/includes/class-wsi-hooks.php (added)
-
tags/1.0.6/includes/class-wsi-retro-processor.php (added)
-
tags/1.0.6/includes/class-wsi-the-golden-retriever.php (added)
-
tags/1.0.6/includes/engines (added)
-
tags/1.0.6/includes/engines/abstract-class-wsi-engine.php (added)
-
tags/1.0.6/includes/engines/class-wsi-engine-imageoptim.php (added)
-
tags/1.0.6/notes.txt (added)
-
tags/1.0.6/readme.txt (added)
-
tags/1.0.6/static (added)
-
tags/1.0.6/static/js (added)
-
tags/1.0.6/static/js/winsite-image-optimizer.js (added)
-
tags/1.0.6/winsite-image-optimizer.php (added)
-
trunk/includes/class-wsi-retro-processor.php (modified) (6 diffs)
-
trunk/includes/engines/class-wsi-engine-imageoptim.php (modified) (3 diffs)
-
trunk/readme.txt (modified) (1 diff)
-
trunk/winsite-image-optimizer.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
winsite-image-optimizer/trunk/includes/class-wsi-retro-processor.php
r1442501 r1448139 100 100 public function settings_section_intro() { 101 101 ?> 102 <p ><?php _e( 'Control the way Winsite Image Optimizer works via the settings below.', 'wp_revisions_control' ); ?></p>102 <p id="winsite-image-optimizer"><?php _e( 'Control the way Winsite Image Optimizer works via the settings below.', 'wp_revisions_control' ); ?></p> 103 103 <?php 104 104 } … … 151 151 152 152 public function regenerate_interface() { 153 $username_exists = (bool) $this->get_setting('imageoptim-username'); 153 154 ?> 154 155 <div class="wrap"> 155 <?php screen_icon(); ?>156 156 <h2><?php esc_html_e( 'Winsite Image Optimizer', 'mimi' ); ?></h2> 157 158 <?php if ( ! $username_exists ) : ?> 159 <div class="error"> 160 <p><?php printf( __( 'Hey! Looks like you haven\'t set up your ImageOptim API yet. Head over to the <a href="%s">settings section</a> and follow the instructions there. It\'s easy!', 'wsi-image-optimizer' ), admin_url( 'options-media.php#winsite-image-optimizer' ) ); ?></p> 161 </div> 162 <?php endif; ?> 157 163 158 164 <form id="wsi-regeneretro" method="post"> … … 163 169 <?php wp_nonce_field( 'wsi-regeneretro' ) ?> 164 170 <progress id='progress-bar' max='100'><span></span>%</progress> 165 <button class="button button-primary" type="submit"><?php esc_html_e( 'Regenerate Retroactive', 'wsi-image-optimizer' ); ?></button>171 <button class="button button-primary" <?php echo $username_exists ?: 'disabled'; ?> type="submit"><?php esc_html_e( 'Regenerate Retroactive', 'wsi-image-optimizer' ); ?></button> 166 172 <span class="status status-finished"><span class="dashicons dashicons-yes"></span> Finished</span> 167 173 <span class="spinner"></span> … … 185 191 #wsi-regeneretro .wsi-file-list { 186 192 overflow-y: auto; 187 max-height: 70vh;193 max-height: 35vh; 188 194 } 189 195 progress{ … … 195 201 progress:not([value]) { 196 202 display: none; 197 } 203 } 198 204 199 205 </style> … … 245 251 $file = wp_handle_sideload( $file_array, $overrides, $time ); 246 252 253 // get image post 254 $image->guid = $file['url']; 255 $image->post_mime_type = $file['type']; 256 247 257 // update original attachment 248 $ia = wp_insert_attachment( array( 249 'ID' => $image->ID, 250 'guid' => $file['url'], 251 'post_mime_type' => $file['type'], 252 ), $file['file'] ); 258 $ia = wp_insert_attachment( $image, $file['file'] ); 253 259 254 260 // update in meta that it got processed -
winsite-image-optimizer/trunk/includes/engines/class-wsi-engine-imageoptim.php
r1433017 r1448139 5 5 * String format for the ImageOptim base URI 6 6 * Format: https://im2.io/<Username>/<Options>/<Image URL> 7 * 7 * 8 8 * @see https://im2.io/api/post 9 9 * @static … … 37 37 /** 38 38 * Filter the HTTP request method, since ImageOptim supports POST only 39 * 39 * 40 40 * @param [type] $args [description] 41 41 * @param [type] $url [description] … … 88 88 $settings_page, 89 89 $settings_section, 90 array( 'option' => 'imageoptim-username', 'desc' => __( 'Get your username at <a href="https://im2.io/register" >ImageOptim API</a>.', 'winsite-images' ) )90 array( 'option' => 'imageoptim-username', 'desc' => __( 'Get your username at <a href="https://im2.io/register" target="_blank">ImageOptim API</a>.', 'winsite-images' ) ) 91 91 ); 92 92 } -
winsite-image-optimizer/trunk/readme.txt
r1435731 r1448139 48 48 == Changelog == 49 49 50 = 1.0.6 - July 3, 2016 = 51 * Bug fix: Fixed issue where attachment metadata would be overriden and cleared when using the Retroactive Generator 52 * Bug fix: Fixed a UI/UX nuance. Now showing a notice for when a user hasn't set API details. 53 * Added a bit of fresh salsa sauce 54 55 50 56 = 1.0.2 - June 13, 2016 = 51 57 * Bug fix: Fixed issue where JS wasn't loading in back-end, disabling use of the Retroactive Generator. Props [@maor](https://github.com/maor) -
winsite-image-optimizer/trunk/winsite-image-optimizer.php
r1442501 r1448139 4 4 * Plugin URI: http://win-site.co.il 5 5 * Description: Optimize your images, period. 6 * Version: 1.0. 46 * Version: 1.0.6 7 7 * Author: Winsite 8 8 * Author URI: http://win-site.co.il
Note: See TracChangeset
for help on using the changeset viewer.