Video Thumbnails - Version 1.1.1

Version Description

  • Fixed a bug related to scheduled posts sometimes not saving thumbnail URL to the meta field
Download this release

Release Info

Developer sutherlandboswell
Plugin Icon 128x128 Video Thumbnails
Version 1.1.1
Comparing to
See all releases

Code changes from version 1.1 to 1.1.1

Files changed (2) hide show
  1. readme.txt +4 -1
  2. video-thumbnails.php +5 -5
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://amzn.com/w/1L25YG6FO8AZ1
4
  Tags: Video, YouTube, Vimeo, Blip.tv, Justin.tv, Thumbnails
5
  Requires at least: 3.0
6
  Tested up to: 3.0.4
7
- Stable tag: 1.1
8
 
9
  Video Thumbnails is a simple plugin that makes it easy to automatically display video thumbnails in your template.
10
 
@@ -77,6 +77,9 @@ The Vimeo API has a rate limit, so in rare cases you may exceed this limit. Try
77
 
78
  == Changelog ==
79
 
 
 
 
80
  = 1.1 =
81
  * Fixed bug created by a change in YouTube's embed codes
82
 
4
  Tags: Video, YouTube, Vimeo, Blip.tv, Justin.tv, Thumbnails
5
  Requires at least: 3.0
6
  Tested up to: 3.0.4
7
+ Stable tag: 1.1.1
8
 
9
  Video Thumbnails is a simple plugin that makes it easy to automatically display video thumbnails in your template.
10
 
77
 
78
  == Changelog ==
79
 
80
+ = 1.1.1 =
81
+ * Fixed a bug related to scheduled posts sometimes not saving thumbnail URL to the meta field
82
+
83
  = 1.1 =
84
  * Fixed bug created by a change in YouTube's embed codes
85
 
video-thumbnails.php CHANGED
@@ -5,7 +5,7 @@ Plugin URI: http://sutherlandboswell.com/2010/11/wordpress-video-thumbnails/
5
  Description: Automatically retrieve video thumbnails for your posts and display them in your theme. Currently supports YouTube, Vimeo, Blip.tv, and Justin.tv.
6
  Author: Sutherland Boswell
7
  Author URI: http://sutherlandboswell.com
8
- Version: 1.1
9
  License: GPL2
10
  */
11
  /* Copyright 2010 Sutherland Boswell (email : sutherland.boswell@gmail.com)
@@ -261,17 +261,17 @@ function video_thumbnail_admin(){
261
 
262
  add_action('save_post', 'save_video_thumbnail');
263
 
264
- function save_video_thumbnail($post_ID){
265
  if ( defined('DOING_AUTOSAVE') && DOING_AUTOSAVE ) {
266
- return $post_ID;
267
  } else {
268
  global $post;
269
  $custom = get_post_custom($post->ID);
270
  $old_thumbnail = $custom["_video_thumbnail"][0];
271
  if ($old_thumbnail == '') {
272
- get_video_thumbnail($post_ID);
273
  } elseif (isset($_POST["video_thumbnail"]) && $_POST["video_thumbnail"]==$old_thumbnail) {
274
- return $post_ID;
275
  } elseif (isset($_POST["video_thumbnail"]) && $_POST["video_thumbnail"]!='') {
276
  if(!update_post_meta($post->ID, "_video_thumbnail", $_POST["video_thumbnail"])) add_post_meta($post->ID, "_video_thumbnail", $_POST["video_thumbnail"], true);
277
  } elseif (isset($_POST["video_thumbnail"]) && $_POST["video_thumbnail"]=='') {
5
  Description: Automatically retrieve video thumbnails for your posts and display them in your theme. Currently supports YouTube, Vimeo, Blip.tv, and Justin.tv.
6
  Author: Sutherland Boswell
7
  Author URI: http://sutherlandboswell.com
8
+ Version: 1.1.1
9
  License: GPL2
10
  */
11
  /* Copyright 2010 Sutherland Boswell (email : sutherland.boswell@gmail.com)
261
 
262
  add_action('save_post', 'save_video_thumbnail');
263
 
264
+ function save_video_thumbnail(){
265
  if ( defined('DOING_AUTOSAVE') && DOING_AUTOSAVE ) {
266
+ return null;
267
  } else {
268
  global $post;
269
  $custom = get_post_custom($post->ID);
270
  $old_thumbnail = $custom["_video_thumbnail"][0];
271
  if ($old_thumbnail == '') {
272
+ get_video_thumbnail($post->ID);
273
  } elseif (isset($_POST["video_thumbnail"]) && $_POST["video_thumbnail"]==$old_thumbnail) {
274
+ return null;
275
  } elseif (isset($_POST["video_thumbnail"]) && $_POST["video_thumbnail"]!='') {
276
  if(!update_post_meta($post->ID, "_video_thumbnail", $_POST["video_thumbnail"])) add_post_meta($post->ID, "_video_thumbnail", $_POST["video_thumbnail"], true);
277
  } elseif (isset($_POST["video_thumbnail"]) && $_POST["video_thumbnail"]=='') {