Auto Post Thumbnail - Version 3.2.3

Version Description

  • Added fix for jquery progress bar error causing due to Wordpress version 3.1
Download this release

Release Info

Developer adityamooley
Plugin Icon 128x128 Auto Post Thumbnail
Version 3.2.3
Comparing to
See all releases

Code changes from version 3.2.2 to 3.2.3

auto-post-thumbnail.php CHANGED
@@ -4,7 +4,7 @@
4
  Plugin Name: Auto Post Thumbnail
5
  Plugin URI: http://www.sanisoft.com/blog/2010/04/19/wordpress-plugin-automatic-post-thumbnail/
6
  Description: Automatically generate the Post Thumbnail (Featured Thumbnail) from the first image in post (or any custom post type) only if Post Thumbnail is not set manually.
7
- Version: 3.2.2
8
  Author: Aditya Mooley <adityamooley@sanisoft.com>
9
  Author URI: http://www.sanisoft.com/blog/author/adityamooley/
10
  */
@@ -160,7 +160,14 @@ function apt_admin_enqueues($hook_suffix) {
160
  return;
161
  }
162
 
163
- wp_enqueue_script( 'jquery-ui-progressbar', plugins_url( 'jquery-ui/ui.progressbar.js', __FILE__ ), array('jquery-ui-core'), '1.7.2' );
 
 
 
 
 
 
 
164
  wp_enqueue_style( 'jquery-ui-genpostthumbs', plugins_url( 'jquery-ui/redmond/jquery-ui-1.7.2.custom.css', __FILE__ ), array(), '1.7.2' );
165
  } //End apt_admin_enqueues
166
 
4
  Plugin Name: Auto Post Thumbnail
5
  Plugin URI: http://www.sanisoft.com/blog/2010/04/19/wordpress-plugin-automatic-post-thumbnail/
6
  Description: Automatically generate the Post Thumbnail (Featured Thumbnail) from the first image in post (or any custom post type) only if Post Thumbnail is not set manually.
7
+ Version: 3.2.3
8
  Author: Aditya Mooley <adityamooley@sanisoft.com>
9
  Author URI: http://www.sanisoft.com/blog/author/adityamooley/
10
  */
160
  return;
161
  }
162
 
163
+ // WordPress 3.1 vs older version compatibility
164
+ if ( wp_script_is( 'jquery-ui-widget', 'registered' ) ) {
165
+ wp_enqueue_script( 'jquery-ui-progressbar', plugins_url( 'jquery-ui/jquery.ui.progressbar.min.js', __FILE__ ), array( 'jquery-ui-core', 'jquery-ui-widget' ), '1.7.2' );
166
+ }
167
+ else {
168
+ wp_enqueue_script( 'jquery-ui-progressbar', plugins_url( 'jquery-ui/ui.progressbar.js', __FILE__ ), array( 'jquery-ui-core' ), '1.7.2' );
169
+ }
170
+
171
  wp_enqueue_style( 'jquery-ui-genpostthumbs', plugins_url( 'jquery-ui/redmond/jquery-ui-1.7.2.custom.css', __FILE__ ), array(), '1.7.2' );
172
  } //End apt_admin_enqueues
173
 
jquery-ui/jquery.ui.progressbar.min.js ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * jQuery UI Progressbar 1.8.6
3
+ *
4
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
5
+ * Dual licensed under the MIT or GPL Version 2 licenses.
6
+ * http://jquery.org/license
7
+ *
8
+ * http://docs.jquery.com/UI/Progressbar
9
+ *
10
+ * Depends:
11
+ * jquery.ui.core.js
12
+ * jquery.ui.widget.js
13
+ */
14
+ (function(b,c){b.widget("ui.progressbar",{options:{value:0},min:0,max:100,_create:function(){this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this.min,"aria-valuemax":this.max,"aria-valuenow":this._value()});this.valueDiv=b("<div class='ui-progressbar-value ui-widget-header ui-corner-left'></div>").appendTo(this.element);this._refreshValue()},destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow");
15
+ this.valueDiv.remove();b.Widget.prototype.destroy.apply(this,arguments)},value:function(a){if(a===c)return this._value();this._setOption("value",a);return this},_setOption:function(a,d){if(a==="value"){this.options.value=d;this._refreshValue();this._trigger("change");this._value()===this.max&&this._trigger("complete")}b.Widget.prototype._setOption.apply(this,arguments)},_value:function(){var a=this.options.value;if(typeof a!=="number")a=0;return Math.min(this.max,Math.max(this.min,a))},_refreshValue:function(){var a=
16
+ this.value();this.valueDiv.toggleClass("ui-corner-right",a===this.max).width(a+"%");this.element.attr("aria-valuenow",a)}});b.extend(b.ui.progressbar,{version:"1.8.6"})})(jQuery);
readme.txt CHANGED
@@ -2,8 +2,8 @@
2
  Contributors: adityamooley
3
  Tags: Post, thumbnail, automatic, posts, featured image, image, featured, images, admin
4
  Requires at least: 2.9.1
5
- Tested up to: 3.0.4
6
- Stable tag: 3.2.2
7
 
8
  Automatically generate the Post Thumbnail (Featured Thumbnail) from the first image in post or any custom post type only if Post Thumbnail is not set manually.
9
 
@@ -25,6 +25,9 @@ For more details, see http://www.sanisoft.com/blog/2010/04/19/wordpress-plugin-a
25
 
26
  == Changelog ==
27
 
 
 
 
28
  = 3.2.2 =
29
  * Added back publish_post action so that regular posts work without any issues.
30
  * Added code to check whether the image exists in database before trying to fetch it.
2
  Contributors: adityamooley
3
  Tags: Post, thumbnail, automatic, posts, featured image, image, featured, images, admin
4
  Requires at least: 2.9.1
5
+ Tested up to: 3.1
6
+ Stable tag: 3.2.3
7
 
8
  Automatically generate the Post Thumbnail (Featured Thumbnail) from the first image in post or any custom post type only if Post Thumbnail is not set manually.
9
 
25
 
26
  == Changelog ==
27
 
28
+ = 3.2.3 =
29
+ * Added fix for jquery progress bar error causing due to Wordpress version 3.1
30
+
31
  = 3.2.2 =
32
  * Added back publish_post action so that regular posts work without any issues.
33
  * Added code to check whether the image exists in database before trying to fetch it.