Version Description
Download this release
Release Info
| Developer | peterchester |
| Plugin | |
| Version | 3.0.3 |
| Comparing to | |
| See all releases | |
Code changes from version 3.0.2 to 3.0.3
- image-widget.js +10 -1
- image-widget.php +2 -2
- readme.txt +4 -1
image-widget.js
CHANGED
|
@@ -4,6 +4,7 @@ function set_active_widget(imageId,widthId,heightId) {
|
|
| 4 |
currentWidthId = widthId;
|
| 5 |
currentHeightId = heightId;
|
| 6 |
}
|
|
|
|
| 7 |
function send_to_editor(h) {
|
| 8 |
vars = eval(h);
|
| 9 |
|
|
@@ -19,4 +20,12 @@ function send_to_editor(h) {
|
|
| 19 |
|
| 20 |
// close thickbox
|
| 21 |
tb_remove();
|
| 22 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
currentWidthId = widthId;
|
| 5 |
currentHeightId = heightId;
|
| 6 |
}
|
| 7 |
+
|
| 8 |
function send_to_editor(h) {
|
| 9 |
vars = eval(h);
|
| 10 |
|
| 20 |
|
| 21 |
// close thickbox
|
| 22 |
tb_remove();
|
| 23 |
+
}
|
| 24 |
+
|
| 25 |
+
jQuery(document).ready(function() {
|
| 26 |
+
jQuery("body").click(function(event) {
|
| 27 |
+
if (jQuery(event.target).is('a.thickbox-image-widget')) {
|
| 28 |
+
tb_show("Add an Image", event.target.href, false);
|
| 29 |
+
}
|
| 30 |
+
});
|
| 31 |
+
});
|
image-widget.php
CHANGED
|
@@ -4,7 +4,7 @@ Plugin Name: Image Widget
|
|
| 4 |
Plugin URI: http://wordpress.org/extend/plugins/image-widget/
|
| 5 |
Description: This widget accepts a title, an image, a link and a description and displays them.
|
| 6 |
Author: Shane and Peter, Inc.
|
| 7 |
-
Version: 3.0.
|
| 8 |
Author URI: http://www.shaneandpeter.com
|
| 9 |
*/
|
| 10 |
|
|
@@ -198,7 +198,7 @@ class SP_Image_Widget extends WP_Widget {
|
|
| 198 |
$image_upload_iframe_src = apply_filters('image_upload_iframe_src', "$media_upload_iframe_src");
|
| 199 |
$image_title = __('Add an Image', 'sp_image_widget');
|
| 200 |
?><br />
|
| 201 |
-
<a href="<?php echo $image_upload_iframe_src; ?>&TB_iframe=true" id="add_image-<?php echo $this->get_field_id('image'); ?>" class="thickbox" title='<?php echo $image_title; ?>' onClick="set_active_widget('<?php echo $this->get_field_id('image'); ?>','<?php echo $this->get_field_id('width'); ?>','<?php echo $this->get_field_id('height'); ?>');return false;"><img src='images/media-button-image.gif' alt='<?php echo $image_title; ?>' /> <?php echo $image_title; ?></a>
|
| 202 |
<div id="display-<?php echo $this->get_field_id('image'); ?>"><?php
|
| 203 |
if ($instance['imageurl']) { echo "<img src=\"{$instance['imageurl']}\" alt=\"{$instance['title']}\" />"; }
|
| 204 |
?></div>
|
| 4 |
Plugin URI: http://wordpress.org/extend/plugins/image-widget/
|
| 5 |
Description: This widget accepts a title, an image, a link and a description and displays them.
|
| 6 |
Author: Shane and Peter, Inc.
|
| 7 |
+
Version: 3.0.3
|
| 8 |
Author URI: http://www.shaneandpeter.com
|
| 9 |
*/
|
| 10 |
|
| 198 |
$image_upload_iframe_src = apply_filters('image_upload_iframe_src', "$media_upload_iframe_src");
|
| 199 |
$image_title = __('Add an Image', 'sp_image_widget');
|
| 200 |
?><br />
|
| 201 |
+
<a href="<?php echo $image_upload_iframe_src; ?>&TB_iframe=true" id="add_image-<?php echo $this->get_field_id('image'); ?>" class="thickbox-image-widget" title='<?php echo $image_title; ?>' onClick="set_active_widget('<?php echo $this->get_field_id('image'); ?>','<?php echo $this->get_field_id('width'); ?>','<?php echo $this->get_field_id('height'); ?>');return false;"><img src='images/media-button-image.gif' alt='<?php echo $image_title; ?>' /> <?php echo $image_title; ?></a>
|
| 202 |
<div id="display-<?php echo $this->get_field_id('image'); ?>"><?php
|
| 203 |
if ($instance['imageurl']) { echo "<img src=\"{$instance['imageurl']}\" alt=\"{$instance['title']}\" />"; }
|
| 204 |
?></div>
|
readme.txt
CHANGED
|
@@ -4,7 +4,7 @@ Donate link: http://www.shaneandpeter.com
|
|
| 4 |
Tags: widget, image, ad, banner, simple, upload, sidebar
|
| 5 |
Requires at least: 2.8
|
| 6 |
Tested up to: 2.8.4
|
| 7 |
-
Stable tag: 3.0.
|
| 8 |
|
| 9 |
Simple image widget. Use native Wordpress upload thickbox to add image widgets to your site.
|
| 10 |
|
|
@@ -31,6 +31,9 @@ Todo:
|
|
| 31 |
If you find any bugs or have any ideas, please mail us.
|
| 32 |
|
| 33 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
| 34 |
New in version 3.0.2
|
| 35 |
|
| 36 |
* Added PHPDoc comments
|
| 4 |
Tags: widget, image, ad, banner, simple, upload, sidebar
|
| 5 |
Requires at least: 2.8
|
| 6 |
Tested up to: 2.8.4
|
| 7 |
+
Stable tag: 3.0.3
|
| 8 |
|
| 9 |
Simple image widget. Use native Wordpress upload thickbox to add image widgets to your site.
|
| 10 |
|
| 31 |
If you find any bugs or have any ideas, please mail us.
|
| 32 |
|
| 33 |
== Changelog ==
|
| 34 |
+
New in version 3.0.3
|
| 35 |
+
* Fixed the broken "Add Image" link (THANK YOU SMURKAS!!!)
|
| 36 |
+
|
| 37 |
New in version 3.0.2
|
| 38 |
|
| 39 |
* Added PHPDoc comments
|
