Video Thumbnails - Version 2.5.2

Version Description

  • Better support for Automatic YouTube Video Posts
  • Added support tab to settings page
Download this release

Release Info

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

Code changes from version 2.5.1 to 2.5.2

php/class-video-thumbnails-settings.php CHANGED
@@ -423,6 +423,7 @@ class Video_Thumbnails_Settings {
423
  <a href="?page=video_thumbnails&tab=provider_settings" class="nav-tab <?php echo $active_tab == 'provider_settings' ? 'nav-tab-active' : ''; ?>">Providers</a>
424
  <a href="?page=video_thumbnails&tab=mass_actions" class="nav-tab <?php echo $active_tab == 'mass_actions' ? 'nav-tab-active' : ''; ?>">Mass Actions</a>
425
  <a href="?page=video_thumbnails&tab=debugging" class="nav-tab <?php echo $active_tab == 'debugging' ? 'nav-tab-active' : ''; ?>">Debugging</a>
 
426
  </h2>
427
 
428
  <?php
@@ -567,6 +568,13 @@ class Video_Thumbnails_Settings {
567
  <?php
568
  // End debugging
569
  }
 
 
 
 
 
 
 
570
  ?>
571
 
572
  <?php do_action( 'video_thumbnails/settings_footer' ); ?>
423
  <a href="?page=video_thumbnails&tab=provider_settings" class="nav-tab <?php echo $active_tab == 'provider_settings' ? 'nav-tab-active' : ''; ?>">Providers</a>
424
  <a href="?page=video_thumbnails&tab=mass_actions" class="nav-tab <?php echo $active_tab == 'mass_actions' ? 'nav-tab-active' : ''; ?>">Mass Actions</a>
425
  <a href="?page=video_thumbnails&tab=debugging" class="nav-tab <?php echo $active_tab == 'debugging' ? 'nav-tab-active' : ''; ?>">Debugging</a>
426
+ <a href="?page=video_thumbnails&tab=support" class="nav-tab <?php echo $active_tab == 'support' ? 'nav-tab-active' : ''; ?>">Support</a>
427
  </h2>
428
 
429
  <?php
568
  <?php
569
  // End debugging
570
  }
571
+ // Support
572
+ if ( $active_tab == 'support' ) {
573
+
574
+ Video_Thumbnails::no_video_thumbnail_troubleshooting_instructions();
575
+
576
+ // End support
577
+ }
578
  ?>
579
 
580
  <?php do_action( 'video_thumbnails/settings_footer' ); ?>
php/extensions/class-ayvp-thumbnails.php CHANGED
@@ -25,10 +25,10 @@ require_once( VIDEO_THUMBNAILS_PATH . '/php/providers/class-youtube-thumbnails.p
25
  class AYVP_Thumbnails extends Video_Thumbnails_Extension {
26
 
27
  public static function new_thumbnail( $new_thumbnail, $post_id ) {
 
28
  if ( $new_thumbnail == null ) {
29
- $youtube_id = get_post_meta( $post_id, '_tern_wp_youtube_video', true );
30
- if ( $youtube_id != '' ) {
31
- $new_thumbnail = YouTube_Thumbnails::get_thumbnail_url( $youtube_id );
32
  }
33
  }
34
  return $new_thumbnail;
25
  class AYVP_Thumbnails extends Video_Thumbnails_Extension {
26
 
27
  public static function new_thumbnail( $new_thumbnail, $post_id ) {
28
+ global $tern_wp_youtube_array;
29
  if ( $new_thumbnail == null ) {
30
+ if ( isset( $tern_wp_youtube_array['_tern_wp_youtube_video'] ) && $tern_wp_youtube_array['_tern_wp_youtube_video'] != '' ) {
31
+ $new_thumbnail = YouTube_Thumbnails::get_thumbnail_url( $tern_wp_youtube_array['_tern_wp_youtube_video'] );
 
32
  }
33
  }
34
  return $new_thumbnail;
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: sutherlandboswell
3
  Donate link: http://wie.ly/u/donate
4
  Tags: Video, Thumbnails, YouTube, Vimeo, Vine, Twitch, Dailymotion, Youku, Rutube, Featured Image
5
  Requires at least: 3.2
6
- Tested up to: 3.8
7
- Stable tag: 2.5.1
8
 
9
  Video Thumbnails simplifies the process of automatically displaying video thumbnails in your WordPress template.
10
 
@@ -115,6 +115,10 @@ The Vimeo API has a rate limit, so in rare cases you may exceed this limit. Try
115
 
116
  == Changelog ==
117
 
 
 
 
 
118
  = 2.5.1 =
119
  * Fixed improper error handling
120
 
3
  Donate link: http://wie.ly/u/donate
4
  Tags: Video, Thumbnails, YouTube, Vimeo, Vine, Twitch, Dailymotion, Youku, Rutube, Featured Image
5
  Requires at least: 3.2
6
+ Tested up to: 3.8.1
7
+ Stable tag: 2.5.2
8
 
9
  Video Thumbnails simplifies the process of automatically displaying video thumbnails in your WordPress template.
10
 
115
 
116
  == Changelog ==
117
 
118
+ = 2.5.2 =
119
+ * Better support for Automatic YouTube Video Posts
120
+ * Added support tab to settings page
121
+
122
  = 2.5.1 =
123
  * Fixed improper error handling
124
 
video-thumbnails.php CHANGED
@@ -5,7 +5,7 @@ Plugin URI: https://refactored.co/plugins/video-thumbnails
5
  Description: Automatically retrieve video thumbnails for your posts and display them in your theme. Supports YouTube, Vimeo, Facebook, Vine, Justin.tv, Twitch, Dailymotion, Metacafe, Blip, Google Drive, Funny or Die, CollegeHumor, MPORA, Wistia, Youku, and Rutube.
6
  Author: Sutherland Boswell
7
  Author URI: http://sutherlandboswell.com
8
- Version: 2.5.1
9
  License: GPL2
10
  */
11
  /* Copyright 2014 Sutherland Boswell (email : sutherland.boswell@gmail.com)
@@ -28,7 +28,7 @@ License: GPL2
28
 
29
  define( 'VIDEO_THUMBNAILS_PATH', dirname(__FILE__) );
30
  define( 'VIDEO_THUMBNAILS_FIELD', '_video_thumbnail' );
31
- define( 'VIDEO_THUMBNAILS_VERSION', '2.5.1' );
32
 
33
  // Providers
34
  require_once( VIDEO_THUMBNAILS_PATH . '/php/providers/class-video-thumbnails-providers.php' );
@@ -116,16 +116,7 @@ class Video_Thumbnails {
116
  ?>
117
  <div id="video-thumbnail-not-found-troubleshooting" style="display:none;">
118
  <h2><?php _e( 'Troubleshooting Video Thumbnails' ); ?></h2>
119
- <h3>No video thumbnail for this post</h3>
120
- <ol>
121
- <li>Ensure you have saved any changes to your post.</li>
122
- <li>If you are using a a plugin or theme that stores videos in a special location other than the main post content area, be sure you've entered the correct custom field on the <a href="<?php echo admin_url( 'options-general.php?page=video_thumbnails' ); ?>">settings page</a>. If you don't know the name of the field your video is being saved in, please contact the developer of that theme or plugin.</li>
123
- <li>Copy and paste your embed code into the "Test Markup for Video" section of the <a href="<?php echo admin_url( 'options-general.php?page=video_thumbnails&tab=debugging' ); ?>">Debugging page</a>. If this doesn't find the thumbnail, you'll want to be sure to include the embed code you scanned when you request support. If it does find a thumbnail, please double check that you have the Custom Field set correctly in the <a href="<?php echo admin_url( 'options-general.php?page=video_thumbnails' ); ?>">settings page</a> if you are using a a plugin or theme that stores videos in a special location.</li>
124
- <li>Go to the <a href="<?php echo admin_url( 'options-general.php?page=video_thumbnails&tab=debugging' ); ?>">Debugging page</a> and click "Test Image Downloading" to test your server's ability to save an image from a video source.</li>
125
- <li>Try posting a video from other sources to help narrow down the problem.</li>
126
- <li>Check the <a href="http://wordpress.org/support/plugin/video-thumbnails">support threads</a> to see if anyone has had the same issue.</li>
127
- <li>If you are still unable to resolve the problem, <a href="http://wordpress.org/support/plugin/video-thumbnails">start a thread</a> with a good descriptive title ("Error" or "No thumbnails" is a bad title) and be sure to include the results of your testing as well. Also be sure to include the name of your theme, any video plugins you're using, and any other details you can think of.</li>
128
- </ol>
129
  </div>
130
  <?php
131
  $custom = get_post_custom( $post->ID );
@@ -150,6 +141,24 @@ class Video_Thumbnails {
150
  }
151
  }
152
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
153
  /**
154
  * A usort() callback that sorts videos by offset
155
  */
5
  Description: Automatically retrieve video thumbnails for your posts and display them in your theme. Supports YouTube, Vimeo, Facebook, Vine, Justin.tv, Twitch, Dailymotion, Metacafe, Blip, Google Drive, Funny or Die, CollegeHumor, MPORA, Wistia, Youku, and Rutube.
6
  Author: Sutherland Boswell
7
  Author URI: http://sutherlandboswell.com
8
+ Version: 2.5.2
9
  License: GPL2
10
  */
11
  /* Copyright 2014 Sutherland Boswell (email : sutherland.boswell@gmail.com)
28
 
29
  define( 'VIDEO_THUMBNAILS_PATH', dirname(__FILE__) );
30
  define( 'VIDEO_THUMBNAILS_FIELD', '_video_thumbnail' );
31
+ define( 'VIDEO_THUMBNAILS_VERSION', '2.5.2' );
32
 
33
  // Providers
34
  require_once( VIDEO_THUMBNAILS_PATH . '/php/providers/class-video-thumbnails-providers.php' );
116
  ?>
117
  <div id="video-thumbnail-not-found-troubleshooting" style="display:none;">
118
  <h2><?php _e( 'Troubleshooting Video Thumbnails' ); ?></h2>
119
+ <?php $this->no_video_thumbnail_troubleshooting_instructions(); ?>
 
 
 
 
 
 
 
 
 
120
  </div>
121
  <?php
122
  $custom = get_post_custom( $post->ID );
141
  }
142
  }
143
 
144
+ /**
145
+ * Prints a guide for troubleshooting no video thumbnails
146
+ */
147
+ public static function no_video_thumbnail_troubleshooting_instructions() {
148
+ ?>
149
+ <h3>Fixing "No video thumbnail for this post"</h3>
150
+ <ol>
151
+ <li>Ensure you have saved any changes to your post.</li>
152
+ <li>If you are using a a plugin or theme that stores videos in a special location other than the main post content area, be sure you've entered the correct custom field on the <a href="<?php echo admin_url( 'options-general.php?page=video_thumbnails' ); ?>">settings page</a>. If you don't know the name of the field your video is being saved in, please contact the developer of that theme or plugin.</li>
153
+ <li>Copy and paste your embed code into the "Test Markup for Video" section of the <a href="<?php echo admin_url( 'options-general.php?page=video_thumbnails&tab=debugging' ); ?>">Debugging page</a>. If this doesn't find the thumbnail, you'll want to be sure to include the embed code you scanned when you request support. If it does find a thumbnail, please double check that you have the Custom Field set correctly in the <a href="<?php echo admin_url( 'options-general.php?page=video_thumbnails' ); ?>">settings page</a> if you are using a a plugin or theme that stores videos in a special location.</li>
154
+ <li>Go to the <a href="<?php echo admin_url( 'options-general.php?page=video_thumbnails&tab=debugging' ); ?>">Debugging page</a> and click "Test Image Downloading" to test your server's ability to save an image from a video source.</li>
155
+ <li>Try posting a video from other sources to help narrow down the problem.</li>
156
+ <li>Search the <a href="http://wordpress.org/support/plugin/video-thumbnails">support threads</a> to see if anyone has had the same issue.</li>
157
+ <li>If you are still unable to resolve the problem, <a href="http://wordpress.org/support/plugin/video-thumbnails">start a thread</a> with a good descriptive title ("Error" or "No thumbnails" is a bad title) and be sure to include the results of your testing as well. Also be sure to include the name of your theme, any video plugins you're using, and any other details you can think of.</li>
158
+ </ol>
159
+ <?php
160
+ }
161
+
162
  /**
163
  * A usort() callback that sorts videos by offset
164
  */