Version Description
Fixed javascript bug caused by log message.
Download this release
Release Info
Developer | peterchester |
Plugin | Image Widget |
Version | 4.0.3 |
Comparing to | |
See all releases |
Code changes from version 4.0.2 to 4.0.3
- image-widget.php +3 -3
- lib/ImageWidgetDeprecated.php +2 -2
- readme.txt +5 -1
- resources/js/image-widget.js +0 -1
image-widget.php
CHANGED
@@ -4,7 +4,7 @@ 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 |
|
@@ -23,7 +23,7 @@ add_action('widgets_init', 'tribe_load_image_widget');
|
|
23 |
**/
|
24 |
class Tribe_Image_Widget extends WP_Widget {
|
25 |
|
26 |
-
const VERSION = '4.
|
27 |
|
28 |
const CUSTOM_IMAGE_SIZE_SLUG = 'tribe_image_widget_custom';
|
29 |
|
@@ -65,7 +65,7 @@ class Tribe_Image_Widget extends WP_Widget {
|
|
65 |
*/
|
66 |
function admin_setup() {
|
67 |
wp_enqueue_media();
|
68 |
-
wp_enqueue_script( 'tribe-image-widget', plugins_url('resources/js/image-widget.js', __FILE__), array( 'jquery', 'media-upload', 'media-views' ) );
|
69 |
|
70 |
wp_localize_script( 'tribe-image-widget', 'TribeImageWidget', array(
|
71 |
'frame_title' => __( 'Select an Image', '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.3
|
8 |
Author URI: http://tri.be
|
9 |
*/
|
10 |
|
23 |
**/
|
24 |
class Tribe_Image_Widget extends WP_Widget {
|
25 |
|
26 |
+
const VERSION = '4.0.3';
|
27 |
|
28 |
const CUSTOM_IMAGE_SIZE_SLUG = 'tribe_image_widget_custom';
|
29 |
|
65 |
*/
|
66 |
function admin_setup() {
|
67 |
wp_enqueue_media();
|
68 |
+
wp_enqueue_script( 'tribe-image-widget', plugins_url('resources/js/image-widget.js', __FILE__), array( 'jquery', 'media-upload', 'media-views' ), self::VERSION );
|
69 |
|
70 |
wp_localize_script( 'tribe-image-widget', 'TribeImageWidget', array(
|
71 |
'frame_title' => __( 'Select an Image', 'image_widget' ),
|
lib/ImageWidgetDeprecated.php
CHANGED
@@ -17,10 +17,10 @@ class ImageWidgetDeprecated {
|
|
17 |
global $pagenow;
|
18 |
if ( 'widgets.php' == $pagenow ) {
|
19 |
wp_enqueue_style( 'thickbox' );
|
20 |
-
wp_enqueue_script( 'tribe-image-widget', plugins_url('resources/js/image-widget.deprecated.js', dirname(__FILE__)), array('thickbox'),
|
21 |
}
|
22 |
elseif ( 'media-upload.php' == $pagenow || 'async-upload.php' == $pagenow ) {
|
23 |
-
wp_enqueue_script( 'tribe-image-widget-fix-uploader', plugins_url('resources/js/image-widget.deprecated.upload-fixer.js', dirname(__FILE__)), array('jquery'),
|
24 |
add_filter( 'image_send_to_editor', array( $this,'image_send_to_editor'), 1, 8 );
|
25 |
add_filter( 'gettext', array( $this, 'replace_text_in_thickbox' ), 1, 3 );
|
26 |
add_filter( 'media_upload_tabs', array( $this, 'media_upload_tabs' ) );
|
17 |
global $pagenow;
|
18 |
if ( 'widgets.php' == $pagenow ) {
|
19 |
wp_enqueue_style( 'thickbox' );
|
20 |
+
wp_enqueue_script( 'tribe-image-widget', plugins_url('resources/js/image-widget.deprecated.js', dirname(__FILE__)), array('thickbox'), Tribe_Image_Widget::VERSION, TRUE );
|
21 |
}
|
22 |
elseif ( 'media-upload.php' == $pagenow || 'async-upload.php' == $pagenow ) {
|
23 |
+
wp_enqueue_script( 'tribe-image-widget-fix-uploader', plugins_url('resources/js/image-widget.deprecated.upload-fixer.js', dirname(__FILE__)), array('jquery'), Tribe_Image_Widget::VERSION, TRUE );
|
24 |
add_filter( 'image_send_to_editor', array( $this,'image_send_to_editor'), 1, 8 );
|
25 |
add_filter( 'gettext', array( $this, 'replace_text_in_thickbox' ), 1, 3 );
|
26 |
add_filter( 'media_upload_tabs', array( $this, 'media_upload_tabs' ) );
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ 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, brazilian portuguese, dutch, italian, 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 |
|
@@ -149,6 +149,10 @@ Accepts $instance arguments
|
|
149 |
|
150 |
== Changelog ==
|
151 |
|
|
|
|
|
|
|
|
|
152 |
= 4.0.2 =
|
153 |
|
154 |
Fix oversized screenshot.
|
4 |
Tags: widget, image, ad, banner, simple, upload, sidebar, admin, thickbox, resize, brazilian portuguese, dutch, italian, spanish, swedish, widget-only
|
5 |
Requires at least: 3.5
|
6 |
Tested up to: 3.6
|
7 |
+
Stable tag: 4.0.3
|
8 |
|
9 |
== Description ==
|
10 |
|
149 |
|
150 |
== Changelog ==
|
151 |
|
152 |
+
= 4.0.3 =
|
153 |
+
|
154 |
+
Fixed javascript bug caused by log message.
|
155 |
+
|
156 |
= 4.0.2 =
|
157 |
|
158 |
Fix oversized screenshot.
|
resources/js/image-widget.js
CHANGED
@@ -20,7 +20,6 @@ jQuery(document).ready(function($){
|
|
20 |
// Handle results from media manager.
|
21 |
frame.on('close',function( ) {
|
22 |
var attachments = frame.state().get('selection').toJSON();
|
23 |
-
console.log( attachments );
|
24 |
imageWidget.render( widget_id, widget_id_string, attachments[0] );
|
25 |
});
|
26 |
|
20 |
// Handle results from media manager.
|
21 |
frame.on('close',function( ) {
|
22 |
var attachments = frame.state().get('selection').toJSON();
|
|
|
23 |
imageWidget.render( widget_id, widget_id_string, attachments[0] );
|
24 |
});
|
25 |
|