Force Regenerate Thumbnails - Version 1.5

Version Description

  • Reviewed some messages
Download this release

Release Info

Developer Pedro Elsner
Plugin Icon 128x128 Force Regenerate Thumbnails
Version 1.5
Comparing to
See all releases

Code changes from version 1.3 to 1.5

Files changed (2) hide show
  1. force-regenerate-thumbnails.php +23 -4
  2. readme.txt +7 -1
force-regenerate-thumbnails.php CHANGED
@@ -3,12 +3,31 @@
3
  Plugin Name: Force Regenerate Thumbnails
4
  Plugin URI: http://pedroelsner.com/2012/08/forcando-a-atualizacao-de-thumbnails-no-wordpress
5
  Description: Delete and REALLY force the regenerate thumbnail. Based in plugin: Regenerate Thumbnails - All credits and thanks to Viper007Bond
6
- Version: 1.3
7
  Author: Pedro Elsner
8
  Author URI: http://www.pedroelsner.com/
9
  */
10
 
11
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12
  /**
13
  * Force Regenerate Thumbnails
14
  *
@@ -248,9 +267,9 @@ class ForceRegenerateThumbnails {
248
  <h3 class="title"><?php _e('Process Information', 'force-regenerate-thumbnails'); ?></h3>
249
 
250
  <p>
251
- <?php printf(__('Total Images: %s', 'force-regenerate-thumbnails'), $count); ?><br />
252
- <?php printf(__('Successes:: %s', 'force-regenerate-thumbnails'), '<span id="regenthumbs-debug-successcount">0</span>'); ?><br />
253
- <?php printf(__('Failures: %s', 'force-regenerate-thumbnails'), '<span id="regenthumbs-debug-failurecount">0</span>'); ?>
254
  </p>
255
 
256
  <ol id="regenthumbs-debuglist">
3
  Plugin Name: Force Regenerate Thumbnails
4
  Plugin URI: http://pedroelsner.com/2012/08/forcando-a-atualizacao-de-thumbnails-no-wordpress
5
  Description: Delete and REALLY force the regenerate thumbnail. Based in plugin: Regenerate Thumbnails - All credits and thanks to Viper007Bond
6
+ Version: 1.5
7
  Author: Pedro Elsner
8
  Author URI: http://www.pedroelsner.com/
9
  */
10
 
11
 
12
+ /**
13
+ * Force GD for Image handle (WordPress 3.5 or better)
14
+ * Thanks (@nikcree)
15
+ */
16
+ $version = get_bloginfo('version');
17
+ if ($version >= 3.5) {
18
+ function ms_image_editor_default_to_gd_fix( $editors ) {
19
+ $gd_editor = 'WP_Image_Editor_GD';
20
+
21
+ $editors = array_diff( $editors, array( $gd_editor ) );
22
+ array_unshift( $editors, $gd_editor );
23
+
24
+ return $editors;
25
+ }
26
+ add_filter('wp_image_editors', 'ms_image_editor_default_to_gd_fix');
27
+ }
28
+
29
+
30
+
31
  /**
32
  * Force Regenerate Thumbnails
33
  *
267
  <h3 class="title"><?php _e('Process Information', 'force-regenerate-thumbnails'); ?></h3>
268
 
269
  <p>
270
+ <?php printf(__('Total: %s', 'force-regenerate-thumbnails'), $count); ?><br />
271
+ <?php printf(__('Success: %s', 'force-regenerate-thumbnails'), '<span id="regenthumbs-debug-successcount">0</span>'); ?><br />
272
+ <?php printf(__('Failure: %s', 'force-regenerate-thumbnails'), '<span id="regenthumbs-debug-failurecount">0</span>'); ?>
273
  </p>
274
 
275
  <ol id="regenthumbs-debuglist">
readme.txt CHANGED
@@ -1,7 +1,7 @@
1
  === Force Regenerate Thumbnails ===
2
  Contributors: Pedro Elsner
3
  Requires at least: 2.8
4
- Tested up to: 3.4.2
5
  Stable tag: trunk
6
  Tags: force, regenerate thumbnails, thumbnail, thumbnails
7
 
@@ -29,6 +29,12 @@ See the [screenshots tab](http://wordpress.org/extend/plugins/force-regenerate-t
29
 
30
  == ChangeLog ==
31
 
 
 
 
 
 
 
32
  = 1.3 =
33
  * Fix message error when WP_DEBUG in wp_config.php
34
 
1
  === Force Regenerate Thumbnails ===
2
  Contributors: Pedro Elsner
3
  Requires at least: 2.8
4
+ Tested up to: 3.8
5
  Stable tag: trunk
6
  Tags: force, regenerate thumbnails, thumbnail, thumbnails
7
 
29
 
30
  == ChangeLog ==
31
 
32
+ = 1.5 =
33
+ * Reviewed some messages
34
+
35
+ = 1.4 =
36
+ * Change default image editor to GB in Wordpress 3.5+ (thanks @nikcree)
37
+
38
  = 1.3 =
39
  * Fix message error when WP_DEBUG in wp_config.php
40