Version Description
- [Fix] Corrected functionality that sets default plugin options if the plugin version number changes.
- [Fix] Adds default option for max-height value.
- [Update] Updated the screenshot to include new maximum height field.
- [Update] Increased the default maximum height and width to 1200px each.
Download this release
Release Info
Developer | jepsonrae |
Plugin | Resize Image After Upload |
Version | 1.1.1 |
Comparing to | |
See all releases |
Code changes from version 1.1.0 to 1.1.1
- readme.txt +8 -2
- resize-image-after-upload.php +22 -16
- screenshot-1.jpg +0 -0
- screenshot-1.png +0 -0
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: jepsonrae
|
|
3 |
Donate link: http://www.jepsonrae.com/
|
4 |
Tags: image, plugin, resize, upload
|
5 |
Requires at least: 2.6
|
6 |
-
Tested up to: 3.5.
|
7 |
-
Stable tag: 1.1.
|
8 |
|
9 |
This plugin resizes uploaded images to within a given maximum width and height after uploading, discarding the original uploaded file in the process.
|
10 |
|
@@ -31,6 +31,12 @@ The plugin uses a class originally from Jacob Wyke (www.redvodkajelly.com) and i
|
|
31 |
|
32 |
== Changelog ==
|
33 |
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
= 1.1.0 =
|
35 |
* [Update] Added ability to set maximum height (thanks @Wonderm00n).
|
36 |
|
3 |
Donate link: http://www.jepsonrae.com/
|
4 |
Tags: image, plugin, resize, upload
|
5 |
Requires at least: 2.6
|
6 |
+
Tested up to: 3.5.1
|
7 |
+
Stable tag: 1.1.1
|
8 |
|
9 |
This plugin resizes uploaded images to within a given maximum width and height after uploading, discarding the original uploaded file in the process.
|
10 |
|
31 |
|
32 |
== Changelog ==
|
33 |
|
34 |
+
= 1.1.1 =
|
35 |
+
* [Fix] Corrected functionality that sets default plugin options if the plugin version number changes.
|
36 |
+
* [Fix] Adds default option for max-height value.
|
37 |
+
* [Update] Updated the screenshot to include new maximum height field.
|
38 |
+
* [Update] Increased the default maximum height and width to 1200px each.
|
39 |
+
|
40 |
= 1.1.0 =
|
41 |
* [Update] Added ability to set maximum height (thanks @Wonderm00n).
|
42 |
|
resize-image-after-upload.php
CHANGED
@@ -3,14 +3,14 @@
|
|
3 |
Plugin Name: Resize Image After Upload
|
4 |
Plugin URI: http://www.jepsonrae.com/?utm_campaign=plugins&utm_source=wp-resize-image-after-upload&utm_medium=plugin-url
|
5 |
Description: This plugin resizes uploaded images to a given width or height (whichever is the largest) after uploading, discarding the original uploaded file in the process.
|
6 |
-
Author: Jepson
|
7 |
-
Version: 1.1.
|
8 |
Author URI: http://www.jepsonrae.com/?utm_campaign=plugins&utm_source=wp-resize-image-after-upload&utm_medium=author-url
|
9 |
|
10 |
|
11 |
|
12 |
Copyright (C) 2008 A. Huizinga (original Resize at Upload plugin)
|
13 |
-
Copyright (C) 2012 Jepson
|
14 |
|
15 |
|
16 |
|
@@ -36,12 +36,16 @@ along with this program; if not, write to the Free Software
|
|
36 |
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
37 |
*/
|
38 |
|
39 |
-
$
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
|
|
|
|
|
|
|
|
45 |
} // if
|
46 |
|
47 |
|
@@ -55,13 +59,14 @@ if (get_option('jr_resizeupload_resize_yesno') == 'yes') {
|
|
55 |
/* add option page */
|
56 |
function jr_uploadresize_options_page(){
|
57 |
if(function_exists('add_options_page')){
|
58 |
-
add_options_page('Resize Image After Upload','Resize Image Upload','manage_options','resize-after-upload','jr_uploadresize_options');
|
59 |
} // if
|
60 |
} // function
|
61 |
|
62 |
|
63 |
/* the real option page */
|
64 |
function jr_uploadresize_options(){
|
|
|
65 |
if (isset($_POST['jr_options_update'])) {
|
66 |
$maxwidth = trim(mysql_real_escape_string($_POST['maxwidth']));
|
67 |
$maxheight = trim(mysql_real_escape_string($_POST['maxheight']));
|
@@ -85,7 +90,7 @@ function jr_uploadresize_options(){
|
|
85 |
update_option('jr_resizeupload_resize_yesno','no');
|
86 |
} // else
|
87 |
|
88 |
-
echo('<div id="message" class="updated fade"><p><strong>
|
89 |
} // if
|
90 |
|
91 |
|
@@ -105,8 +110,8 @@ function jr_uploadresize_options(){
|
|
105 |
|
106 |
echo('<p>Your file will be resized, there will not be a copy or backup with the original size.</p>');
|
107 |
|
108 |
-
echo('<p>Set the option \'Resize\' to no if you
|
109 |
-
|
110 |
|
111 |
echo('<h3>Settings</h3>
|
112 |
<table class="form-table">
|
@@ -128,15 +133,16 @@ function jr_uploadresize_options(){
|
|
128 |
x
|
129 |
<input type="text" name="maxheight" size="10" id="maxheight" value="'.$maxheight.'" />
|
130 |
<br />
|
131 |
-
<small>Enter valid max width and height in pixels (e.g.
|
132 |
</td>
|
133 |
</tr>
|
134 |
|
135 |
</table>');
|
136 |
|
137 |
echo('<p class="submit">
|
138 |
-
<input type="hidden" name="action" value="update" />
|
139 |
-
<input
|
|
|
140 |
</p>
|
141 |
</form>');
|
142 |
|
3 |
Plugin Name: Resize Image After Upload
|
4 |
Plugin URI: http://www.jepsonrae.com/?utm_campaign=plugins&utm_source=wp-resize-image-after-upload&utm_medium=plugin-url
|
5 |
Description: This plugin resizes uploaded images to a given width or height (whichever is the largest) after uploading, discarding the original uploaded file in the process.
|
6 |
+
Author: Jepson Rae
|
7 |
+
Version: 1.1.1
|
8 |
Author URI: http://www.jepsonrae.com/?utm_campaign=plugins&utm_source=wp-resize-image-after-upload&utm_medium=author-url
|
9 |
|
10 |
|
11 |
|
12 |
Copyright (C) 2008 A. Huizinga (original Resize at Upload plugin)
|
13 |
+
Copyright (C) 2012 Jepson Rae Ltd
|
14 |
|
15 |
|
16 |
|
36 |
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
37 |
*/
|
38 |
|
39 |
+
$PLUGIN_VERSION = '1.1.1';
|
40 |
+
|
41 |
+
|
42 |
+
// Set the default plugin values
|
43 |
+
if(get_option('jr_resizeupload_version') != $PLUGIN_VERSION) {
|
44 |
+
|
45 |
+
add_option('jr_resizeupload_version', $PLUGIN_VERSION, '','yes');
|
46 |
+
add_option('jr_resizeupload_width', '1200', '', 'yes');
|
47 |
+
add_option('jr_resizeupload_height','1200', '', 'yes');
|
48 |
+
add_option('jr_resizeupload_resize_yesno', 'yes', '','yes');
|
49 |
} // if
|
50 |
|
51 |
|
59 |
/* add option page */
|
60 |
function jr_uploadresize_options_page(){
|
61 |
if(function_exists('add_options_page')){
|
62 |
+
add_options_page('Resize Image After Upload', 'Resize Image Upload', 'manage_options', 'resize-after-upload', 'jr_uploadresize_options');
|
63 |
} // if
|
64 |
} // function
|
65 |
|
66 |
|
67 |
/* the real option page */
|
68 |
function jr_uploadresize_options(){
|
69 |
+
|
70 |
if (isset($_POST['jr_options_update'])) {
|
71 |
$maxwidth = trim(mysql_real_escape_string($_POST['maxwidth']));
|
72 |
$maxheight = trim(mysql_real_escape_string($_POST['maxheight']));
|
90 |
update_option('jr_resizeupload_resize_yesno','no');
|
91 |
} // else
|
92 |
|
93 |
+
echo('<div id="message" class="updated fade"><p><strong>Options have been updated.</strong></p></div>');
|
94 |
} // if
|
95 |
|
96 |
|
110 |
|
111 |
echo('<p>Your file will be resized, there will not be a copy or backup with the original size.</p>');
|
112 |
|
113 |
+
echo('<p>Set the option \'Resize\' to no if you want to disable resizing, this way you shouldn\'t need to deactivate the plugin
|
114 |
+
if you don\'t want to resize for a while.</p>');
|
115 |
|
116 |
echo('<h3>Settings</h3>
|
117 |
<table class="form-table">
|
133 |
x
|
134 |
<input type="text" name="maxheight" size="10" id="maxheight" value="'.$maxheight.'" />
|
135 |
<br />
|
136 |
+
<small>Enter valid max width and height in pixels (e.g. 1200).</small>
|
137 |
</td>
|
138 |
</tr>
|
139 |
|
140 |
</table>');
|
141 |
|
142 |
echo('<p class="submit">
|
143 |
+
<input type="hidden" name="action" value="update" />
|
144 |
+
<input id="submit" name="jr_options_update" class="button button-primary" type="submit" value="Update Options">
|
145 |
+
|
146 |
</p>
|
147 |
</form>');
|
148 |
|
screenshot-1.jpg
ADDED
Binary file
|
screenshot-1.png
DELETED
Binary file
|