Force Regenerate Thumbnails - Version 1.4

Version Description

  • Change default image editor to GB in Wordpress 3.5+ (thanks @nikcree)
Download this release

Release Info

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

Code changes from version 1.3 to 1.4

Files changed (2) hide show
  1. force-regenerate-thumbnails.php +20 -1
  2. readme.txt +4 -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
  *
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.4
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
  *
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,9 @@ 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.5
5
  Stable tag: trunk
6
  Tags: force, regenerate thumbnails, thumbnail, thumbnails
7
 
29
 
30
  == ChangeLog ==
31
 
32
+ = 1.4 =
33
+ * Change default image editor to GB in Wordpress 3.5+ (thanks @nikcree)
34
+
35
  = 1.3 =
36
  * Fix message error when WP_DEBUG in wp_config.php
37