Regenerate Thumbnails - Version 1.1.0

Version Description

Download this release

Release Info

Developer Viper007Bond
Plugin Icon 128x128 Regenerate Thumbnails
Version 1.1.0
Comparing to
See all releases

Code changes from version 1.0.0 to 1.1.0

Files changed (2) hide show
  1. readme.txt +6 -1
  2. regenerate-thumbnails.php +17 -4
readme.txt CHANGED
@@ -3,6 +3,7 @@ Contributors: Viper007Bond
3
  Donate link: http://www.viper007bond.com/donate/
4
  Tags: thumbnail, thumbnails
5
  Requires at least: 2.5
 
6
  Stable tag: trunk
7
 
8
  Allows you to regenerate all attachment thumbnails in just one-click.
@@ -33,12 +34,16 @@ Then just visit your admin area and activate the plugin.
33
 
34
  ###Plugin Usage###
35
 
36
- Visit Manage -> Thumbnails to get started.
37
 
38
  **See Also:** ["Installing Plugins" article on the WP Codex](http://codex.wordpress.org/Managing_Plugins#Installing_Plugins)
39
 
40
  == ChangeLog ==
41
 
 
 
 
 
42
  **Version 1.0.0**
43
 
44
  * Initial release.
3
  Donate link: http://www.viper007bond.com/donate/
4
  Tags: thumbnail, thumbnails
5
  Requires at least: 2.5
6
+ Tested up to: 2.8
7
  Stable tag: trunk
8
 
9
  Allows you to regenerate all attachment thumbnails in just one-click.
34
 
35
  ###Plugin Usage###
36
 
37
+ Visit Tools -> Regen. Thumbnails to get started.
38
 
39
  **See Also:** ["Installing Plugins" article on the WP Codex](http://codex.wordpress.org/Managing_Plugins#Installing_Plugins)
40
 
41
  == ChangeLog ==
42
 
43
+ **Version 1.1.0**
44
+
45
+ * WordPress 2.7 updates -- code + UI. Thanks to jdub and Patrick F.
46
+
47
  **Version 1.0.0**
48
 
49
  * Initial release.
regenerate-thumbnails.php CHANGED
@@ -5,7 +5,7 @@
5
  Plugin Name: Regenerate Thumbnails
6
  Plugin URI: http://www.viper007bond.com/wordpress-plugins/regenerate-thumbnails/
7
  Description: Allows you to regenerate all thumbnails after changing the thumbnail sizes.
8
- Version: 1.0.0
9
  Author: Viper007Bond
10
  Author URI: http://www.viper007bond.com/
11
 
@@ -42,7 +42,7 @@ class RegenerateThumbnails {
42
 
43
  // Register the management page
44
  function AddAdminMenu() {
45
- add_management_page( __( 'Regenerate Thumbnails', 'regenerate-thumbnails' ), __( 'Thumbnails', 'regenerate-thumbnails' ), 'manage_options', 'regenerate-thumbnails', array(&$this, 'ManagementPage') );
46
  }
47
 
48
 
@@ -70,7 +70,14 @@ class RegenerateThumbnails {
70
  $rt_starttime = $rt_starttime[1] + $rt_starttime[0];
71
 
72
  // Get all image attachments
73
- $attachments = get_children( 'post_type=attachment&post_mime_type=image' );
 
 
 
 
 
 
 
74
 
75
  // Check for results
76
  if ( FALSE === $attachments ) {
@@ -136,7 +143,13 @@ class RegenerateThumbnails {
136
  // No button click? Display the form.
137
  else {
138
  ?>
139
- <p><?php printf( __( "After you've changed either of the thumbnail dimensions on the <a href='%s'>miscellaneous settings page</a>, click the button below to regenerate all thumbnails (both the small and medium sizes) for all attachments. The old thumbnails will be kept to avoid any broken images due to hard-coded URLs.", 'regenerate-thumbnails'), 'options-misc.php' ); ?></p>
 
 
 
 
 
 
140
 
141
  <p><?php _e( "This process is not reversible, although you can just change your thumbnail dimensions to old values and click the button again if you don't like the results.", 'regenerate-thumbnails'); ?></p>
142
 
5
  Plugin Name: Regenerate Thumbnails
6
  Plugin URI: http://www.viper007bond.com/wordpress-plugins/regenerate-thumbnails/
7
  Description: Allows you to regenerate all thumbnails after changing the thumbnail sizes.
8
+ Version: 1.1.0
9
  Author: Viper007Bond
10
  Author URI: http://www.viper007bond.com/
11
 
42
 
43
  // Register the management page
44
  function AddAdminMenu() {
45
+ add_management_page( __( 'Regenerate Thumbnails', 'regenerate-thumbnails' ), __( 'Regen. Thumbnails', 'regenerate-thumbnails' ), 'manage_options', 'regenerate-thumbnails', array(&$this, 'ManagementPage') );
46
  }
47
 
48
 
70
  $rt_starttime = $rt_starttime[1] + $rt_starttime[0];
71
 
72
  // Get all image attachments
73
+ $attachments =& get_children( array(
74
+ 'post_type' => 'attachment',
75
+ 'post_mime_type' => 'image',
76
+ 'numberposts' => -1,
77
+ 'post_status' => null,
78
+ 'post_parent' => null, // any parent
79
+ 'output' => 'object',
80
+ ) );
81
 
82
  // Check for results
83
  if ( FALSE === $attachments ) {
143
  // No button click? Display the form.
144
  else {
145
  ?>
146
+ <p><?php
147
+
148
+ $optionsmisc_url = ( function_exists('admin_url') ) ? admin_url('options-misc.php') : 'options-misc.php';
149
+
150
+ printf( __( "After you've changed either of the thumbnail dimensions on the <a href='%s'>miscellaneous settings page</a>, click the button below to regenerate all thumbnails (both the small and medium sizes) for all attachments. The old thumbnails will be kept to avoid any broken images due to hard-coded URLs.", 'regenerate-thumbnails'), $optionsmisc_url );
151
+
152
+ ?></p>
153
 
154
  <p><?php _e( "This process is not reversible, although you can just change your thumbnail dimensions to old values and click the button again if you don't like the results.", 'regenerate-thumbnails'); ?></p>
155