Video Thumbnails - Version 0.5.5

Version Description

  • Video thumbnails are now found at the time the post is saved
Download this release

Release Info

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

Code changes from version 0.5.4 to 0.5.5

Files changed (2) hide show
  1. readme.txt +5 -7
  2. video-thumbnails.php +9 -1
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: sutherlandboswell
3
  Donate link: http://sutherlandboswell.com/2010/11/wordpress-video-thumbnails/
4
  Tags: Video, YouTube, Vimeo, Blip.tv, Thumbnails
5
  Requires at least: 3.0
6
- Tested up to: 3.0.2
7
- Stable tag: 0.5.4
8
 
9
  Video Thumbnails is a simple plugin that makes it easy to automatically display video thumbnails in your template.
10
 
@@ -33,10 +33,6 @@ For more advanced users, the `get_video_thumbnail()` function will return null w
33
 
34
  == Frequently Asked Questions ==
35
 
36
- = Why doesn't the thumbnail show up in the meta box on the Edit Post page after I save it? =
37
-
38
- This is probably happening because `video_thumbnail()` or `get_video_thumbnail()` has not be used in a loop for that post yet. Try loading a page that calls for the thumbnail then checking the Edit Post page again. This will be fixed soon.
39
-
40
  = Can I use the functions outside of a loop? =
41
 
42
  Yes, but you must pass the post ID to the function as a parameter. For example: `<?php $id = 25; $thumbnail = get_video_thumbnail($id); if($thumbnail!=null) echo $thumbnail; ?>`
@@ -55,6 +51,9 @@ In version 0.2 `get_video_thumbnail()` was added which returns null when no thum
55
 
56
  == Changelog ==
57
 
 
 
 
58
  = 0.5.4 =
59
  * Video thumbnails can be retrieved for a specific post ID by passing a parameter to the `video_thumbnail()` or `get_video_thumbnail()` function. For example: `<?php $id = 25; $thumbnail = get_video_thumbnail($id); if($thumbnail!=null) echo $thumbnail; ?>`
60
 
@@ -106,7 +105,6 @@ This version adds the thumbnail URL to the post's meta data, meaning any outside
106
 
107
  == Known Issues ==
108
 
109
- * Thumbnail URLs are not found and stored until `video_thumbnail()` or `get_video_thumbnail()` is called in a loop for that post. Future versions will handle this at the time of publishing.
110
  * While not really an issue, the current method for only displaying a thumbnail if one is found seems like it could be streamlined for less experienced users, so if you have any suggestions let me know.
111
 
112
  == Roadmap ==
3
  Donate link: http://sutherlandboswell.com/2010/11/wordpress-video-thumbnails/
4
  Tags: Video, YouTube, Vimeo, Blip.tv, Thumbnails
5
  Requires at least: 3.0
6
+ Tested up to: 3.0.3
7
+ Stable tag: 0.5.5
8
 
9
  Video Thumbnails is a simple plugin that makes it easy to automatically display video thumbnails in your template.
10
 
33
 
34
  == Frequently Asked Questions ==
35
 
 
 
 
 
36
  = Can I use the functions outside of a loop? =
37
 
38
  Yes, but you must pass the post ID to the function as a parameter. For example: `<?php $id = 25; $thumbnail = get_video_thumbnail($id); if($thumbnail!=null) echo $thumbnail; ?>`
51
 
52
  == Changelog ==
53
 
54
+ = 0.5.5 =
55
+ * Video thumbnails are now found at the time the post is saved
56
+
57
  = 0.5.4 =
58
  * Video thumbnails can be retrieved for a specific post ID by passing a parameter to the `video_thumbnail()` or `get_video_thumbnail()` function. For example: `<?php $id = 25; $thumbnail = get_video_thumbnail($id); if($thumbnail!=null) echo $thumbnail; ?>`
59
 
105
 
106
  == Known Issues ==
107
 
 
108
  * While not really an issue, the current method for only displaying a thumbnail if one is found seems like it could be streamlined for less experienced users, so if you have any suggestions let me know.
109
 
110
  == Roadmap ==
video-thumbnails.php CHANGED
@@ -5,7 +5,7 @@ Plugin URI: http://sutherlandboswell.com/2010/11/wordpress-video-thumbnails/
5
  Description: Make adding video thumbnails to your posts easier and automatic, just add <code>&lt;?php video_thumbnail(); ?&gt;</code> to your loop to get the thumbnail's URL. <code>&lt;?php get_video_thumbnail(); ?&gt;</code> is also available for more advanced users. Currently works with YouTube, Vimeo, and Blip.tv, along with several embedding plugins.
6
  Author: Sutherland Boswell
7
  Author URI: http://sutherlandboswell.com
8
- Version: 0.5.4
9
  License: GPL2
10
  */
11
  /* Copyright 2010 Sutherland Boswell (email : sutherland.boswell@gmail.com)
@@ -199,4 +199,12 @@ function save_details(){
199
  }
200
  }
201
 
 
 
 
 
 
 
 
 
202
  ?>
5
  Description: Make adding video thumbnails to your posts easier and automatic, just add <code>&lt;?php video_thumbnail(); ?&gt;</code> to your loop to get the thumbnail's URL. <code>&lt;?php get_video_thumbnail(); ?&gt;</code> is also available for more advanced users. Currently works with YouTube, Vimeo, and Blip.tv, along with several embedding plugins.
6
  Author: Sutherland Boswell
7
  Author URI: http://sutherlandboswell.com
8
+ Version: 0.5.5
9
  License: GPL2
10
  */
11
  /* Copyright 2010 Sutherland Boswell (email : sutherland.boswell@gmail.com)
199
  }
200
  }
201
 
202
+ // Find video thumbnail when saving a post
203
+
204
+ add_action('save_post', 'save_video_thumbnail');
205
+
206
+ function save_video_thumbnail($post_ID){
207
+ get_video_thumbnail($post_ID);
208
+ }
209
+
210
  ?>