Version Description
- Responsive support in honor of Josh Broton's WordCamp SF talk about responsive design. max-width now defaults to 100%;
Download this release
Release Info
Developer | peterchester |
Plugin | Image Widget |
Version | 4.0.8 |
Comparing to | |
See all releases |
Code changes from version 4.0.7 to 4.0.8
- image-widget.php +10 -6
- readme.txt +19 -4
image-widget.php
CHANGED
@@ -4,8 +4,8 @@ Plugin Name: Image Widget
|
|
4 |
Plugin URI: http://wordpress.org/extend/plugins/image-widget/
|
5 |
Description: A simple image widget that uses the native WordPress media manager to add image widgets to your site.
|
6 |
Author: Modern Tribe, Inc.
|
7 |
-
Version: 4.0.
|
8 |
-
Author URI: http://tri.be
|
9 |
*/
|
10 |
|
11 |
// Block direct requests
|
@@ -93,6 +93,8 @@ class Tribe_Image_Widget extends WP_Widget {
|
|
93 |
$instance['linktarget'] = apply_filters( 'image_widget_image_link_target', esc_attr( $instance['linktarget'] ), $args, $instance );
|
94 |
$instance['width'] = apply_filters( 'image_widget_image_width', abs( $instance['width'] ), $args, $instance );
|
95 |
$instance['height'] = apply_filters( 'image_widget_image_height', abs( $instance['height'] ), $args, $instance );
|
|
|
|
|
96 |
$instance['align'] = apply_filters( 'image_widget_image_align', esc_attr( $instance['align'] ), $args, $instance );
|
97 |
$instance['alt'] = apply_filters( 'image_widget_image_alt', esc_attr( $instance['alt'] ), $args, $instance );
|
98 |
|
@@ -211,6 +213,8 @@ class Tribe_Image_Widget extends WP_Widget {
|
|
211 |
'linktarget' => '',
|
212 |
'width' => 0,
|
213 |
'height' => 0,
|
|
|
|
|
214 |
'image' => 0, // reverse compatible - now attachement_id
|
215 |
'imageurl' => '', // reverse compatible.
|
216 |
'align' => 'none',
|
@@ -281,11 +285,11 @@ class Tribe_Image_Widget extends WP_Widget {
|
|
281 |
$attr['class'] = 'attachment-'.$size;
|
282 |
}
|
283 |
$attr['style'] = '';
|
284 |
-
if (!empty($instance['
|
285 |
-
$attr['style'] .= "max-width: {$instance['
|
286 |
}
|
287 |
-
if (!empty($instance['
|
288 |
-
$attr['style'] .= "max-height: {$instance['
|
289 |
}
|
290 |
if (!empty($instance['align']) && $instance['align'] != 'none') {
|
291 |
$attr['class'] .= " align{$instance['align']}";
|
4 |
Plugin URI: http://wordpress.org/extend/plugins/image-widget/
|
5 |
Description: A simple image widget that uses the native WordPress media manager to add image widgets to your site.
|
6 |
Author: Modern Tribe, Inc.
|
7 |
+
Version: 4.0.8
|
8 |
+
Author URI: http://m.tri.be/26
|
9 |
*/
|
10 |
|
11 |
// Block direct requests
|
93 |
$instance['linktarget'] = apply_filters( 'image_widget_image_link_target', esc_attr( $instance['linktarget'] ), $args, $instance );
|
94 |
$instance['width'] = apply_filters( 'image_widget_image_width', abs( $instance['width'] ), $args, $instance );
|
95 |
$instance['height'] = apply_filters( 'image_widget_image_height', abs( $instance['height'] ), $args, $instance );
|
96 |
+
$instance['maxwidth'] = apply_filters( 'image_widget_image_maxwidth', esc_attr( $instance['maxwidth'] ), $args, $instance );
|
97 |
+
$instance['maxheight'] = apply_filters( 'image_widget_image_maxheight', esc_attr( $instance['maxheight'] ), $args, $instance );
|
98 |
$instance['align'] = apply_filters( 'image_widget_image_align', esc_attr( $instance['align'] ), $args, $instance );
|
99 |
$instance['alt'] = apply_filters( 'image_widget_image_alt', esc_attr( $instance['alt'] ), $args, $instance );
|
100 |
|
213 |
'linktarget' => '',
|
214 |
'width' => 0,
|
215 |
'height' => 0,
|
216 |
+
'maxwidth' => '100%',
|
217 |
+
'maxheight' => '',
|
218 |
'image' => 0, // reverse compatible - now attachement_id
|
219 |
'imageurl' => '', // reverse compatible.
|
220 |
'align' => 'none',
|
285 |
$attr['class'] = 'attachment-'.$size;
|
286 |
}
|
287 |
$attr['style'] = '';
|
288 |
+
if (!empty($instance['maxwidth'])) {
|
289 |
+
$attr['style'] .= "max-width: {$instance['maxwidth']};";
|
290 |
}
|
291 |
+
if (!empty($instance['maxheight'])) {
|
292 |
+
$attr['style'] .= "max-height: {$instance['maxheight']};";
|
293 |
}
|
294 |
if (!empty($instance['align']) && $instance['align'] != 'none') {
|
295 |
$attr['class'] .= " align{$instance['align']}";
|
readme.txt
CHANGED
@@ -4,12 +4,10 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
|
|
4 |
Tags: widget, image, ad, banner, simple, upload, sidebar, admin, thickbox, resize, arabic, brazilian portuguese, dutch, italian, japanese, spanish, swedish, widget-only
|
5 |
Requires at least: 3.5
|
6 |
Tested up to: 3.6
|
7 |
-
Stable tag: 4.0.
|
8 |
|
9 |
== Description ==
|
10 |
|
11 |
-
*NEW: The Image Widget has been UPGRADED to work with WordPress 3.5+!!!*
|
12 |
-
|
13 |
A simple image widget that uses the native WordPress media manager to add image widgets to your site.
|
14 |
|
15 |
* MU Compatible
|
@@ -19,6 +17,7 @@ A simple image widget that uses the native WordPress media manager to add image
|
|
19 |
* Very versatile. All fields are optional.
|
20 |
* Upload, link to external image, or select an image from your media collection using the built in thickbox browser.
|
21 |
* Supports override of template so that you can override the template for your theme!
|
|
|
22 |
|
23 |
Supported Languages:
|
24 |
|
@@ -105,7 +104,7 @@ THIS IS DEPRECATED AND WILL EVENTUALLY BE DELETED
|
|
105 |
|
106 |
*image_widget_image_width*
|
107 |
|
108 |
-
Filters the display width of the image.
|
109 |
Accepts additional $args and $instance arguments.
|
110 |
|
111 |
*image_widget_image_height*
|
@@ -113,6 +112,18 @@ Accepts additional $args and $instance arguments.
|
|
113 |
Filters the display height of the image.
|
114 |
Accepts additional $args and $instance arguments.
|
115 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
116 |
*image_widget_image_size*
|
117 |
|
118 |
Filters the selected image 'size' corresponding to WordPress registered sizes.
|
@@ -159,6 +170,10 @@ For more info on the philosophy here, check out our blog post: http://tri.be/def
|
|
159 |
|
160 |
== Changelog ==
|
161 |
|
|
|
|
|
|
|
|
|
162 |
= 4.0.7 =
|
163 |
|
164 |
* Add Spanish translation (thank you @mzaweb)
|
4 |
Tags: widget, image, ad, banner, simple, upload, sidebar, admin, thickbox, resize, arabic, brazilian portuguese, dutch, italian, japanese, spanish, swedish, widget-only
|
5 |
Requires at least: 3.5
|
6 |
Tested up to: 3.6
|
7 |
+
Stable tag: 4.0.8
|
8 |
|
9 |
== Description ==
|
10 |
|
|
|
|
|
11 |
A simple image widget that uses the native WordPress media manager to add image widgets to your site.
|
12 |
|
13 |
* MU Compatible
|
17 |
* Very versatile. All fields are optional.
|
18 |
* Upload, link to external image, or select an image from your media collection using the built in thickbox browser.
|
19 |
* Supports override of template so that you can override the template for your theme!
|
20 |
+
* Responsive
|
21 |
|
22 |
Supported Languages:
|
23 |
|
104 |
|
105 |
*image_widget_image_width*
|
106 |
|
107 |
+
Filters the display width of the image.
|
108 |
Accepts additional $args and $instance arguments.
|
109 |
|
110 |
*image_widget_image_height*
|
112 |
Filters the display height of the image.
|
113 |
Accepts additional $args and $instance arguments.
|
114 |
|
115 |
+
*image_widget_image_maxwidth*
|
116 |
+
|
117 |
+
Filters the inline max-width style of the image. Hint: override this to use this in responsive designs :)
|
118 |
+
Accepts additional $args and $instance arguments.
|
119 |
+
Return null to remove this css from the image output (defaults to '100%').
|
120 |
+
|
121 |
+
*image_widget_image_maxheight*
|
122 |
+
|
123 |
+
Filters the inline max-height style of the image.
|
124 |
+
Accepts additional $args and $instance arguments.
|
125 |
+
Return null to remove this css from the image output (defaults to null)
|
126 |
+
|
127 |
*image_widget_image_size*
|
128 |
|
129 |
Filters the selected image 'size' corresponding to WordPress registered sizes.
|
170 |
|
171 |
== Changelog ==
|
172 |
|
173 |
+
= 4.0.8 =
|
174 |
+
|
175 |
+
* Responsive support in honor of Josh Broton's WordCamp SF talk about responsive design. max-width now defaults to 100%;
|
176 |
+
|
177 |
= 4.0.7 =
|
178 |
|
179 |
* Add Spanish translation (thank you @mzaweb)
|