YouTube Channel - Version 2.4.1.7

Version Description

(2015-04-20) = * Quick Fix: strip 1st video from feed that provides notice "YouTube is upgrading to a newer version, which is not supported by this device or app." (more on www.youtube.com/devicesupport) until we finish YouTube Channel 3.0.0 (on the way)

Download this release

Release Info

Developer urkekg
Plugin Icon YouTube Channel
Version 2.4.1.7
Comparing to
See all releases

Code changes from version 2.4.1.5 to 2.4.1.7

assets/css/youtube-channel.css CHANGED
@@ -72,4 +72,28 @@ padding-bottom: 62.5%;
72
  .ytc_thumb.ar4_3>span,
73
  .ytc_thumb.ar4_3>span:before {
74
  padding-bottom: 75%;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
75
  }
72
  .ytc_thumb.ar4_3>span,
73
  .ytc_thumb.ar4_3>span:before {
74
  padding-bottom: 75%;
75
+ }
76
+
77
+ /* responsive iframe */
78
+ .youtube_channel.responsive .ytc_video_container.ar16_9 {
79
+ position: relative;
80
+ padding-bottom: 56.25%; /* 16:9 */
81
+ height: 0;
82
+ }
83
+ .youtube_channel.responsive .ytc_video_container.ar16_10 {
84
+ position: relative;
85
+ padding-bottom: 62.5%; /* 16:10 */
86
+ height: 0;
87
+ }
88
+ .youtube_channel.responsive .ytc_video_container.ar4_3 {
89
+ position: relative;
90
+ padding-bottom: 75%; /* 4:3; */
91
+ height: 0;
92
+ }
93
+ .youtube_channel.responsive .ytc_video_container iframe {
94
+ position: absolute;
95
+ top: 0;
96
+ left: 0;
97
+ width: 100%;
98
+ height: 100%;
99
  }
assets/css/youtube-channel.min.css CHANGED
@@ -1,4 +1 @@
1
- .youtube_channel{float:left;clear:both}.youtube_channel.responsive{width:100%}.widget_youtube-channel:after,.youtube_channel:after{visibility:hidden;display:block;font-size:0;content:" ";clear:both;height:0}.youtube_channel .ytc_video_container{float:left}
2
- .youtube_channel.responsive .ytc_video_container{width:100%!important}.ytc_thumb{display:block;overflow:hidden;position:relative;height:0;width:100%;top:0;right:0;bottom:0;left:0}.ytc_thumb>span{height:0;width:100%;display:block;-webkit-background-size:cover;background-size:cover;background-position:center center;background-repeat:no-repeat}
3
- .ytc_thumb>span:before{content:"";display:block;width:100%;height:0;background-image:url(../img/play.png);background-position:center center;background-repeat:no-repeat;background-color:transparent;opacity:.6;transition:.4s}
4
- .ytc_thumb:hover>span:before{opacity:1}.ytc_thumb.ar16_9,.ytc_thumb.ar16_9>span,.ytc_thumb.ar16_9>span:before{padding-bottom:56.26%}.ytc_thumb.ar16_10,.ytc_thumb.ar16_10>span,.ytc_thumb.ar16_10>span:before{padding-bottom:62.5%}.ytc_thumb.ar4_3,.ytc_thumb.ar4_3>span,.ytc_thumb.ar4_3>span:before{padding-bottom:75%}
1
+ .ytc_thumb>span,.ytc_thumb>span:before{background-position:center center;background-repeat:no-repeat}.ytc_thumb,.ytc_thumb>span,.ytc_thumb>span:before{width:100%;display:block}.youtube_channel{float:left;clear:both}.youtube_channel.responsive{width:100%}.widget_youtube-channel:after,.youtube_channel:after{visibility:hidden;display:block;font-size:0;content:" ";clear:both;height:0}.youtube_channel .ytc_video_container{float:left}.youtube_channel.responsive .ytc_video_container{width:100%!important}.ytc_thumb{overflow:hidden;position:relative;height:0;top:0;right:0;bottom:0;left:0}.ytc_thumb>span{height:0;-webkit-background-size:cover;background-size:cover}.ytc_thumb>span:before{content:"";height:0;background-image:url(../img/play.png);background-color:transparent;opacity:.6;transition:.4s}.ytc_thumb:hover>span:before{opacity:1}.ytc_thumb.ar16_9,.ytc_thumb.ar16_9>span,.ytc_thumb.ar16_9>span:before{padding-bottom:56.26%}.ytc_thumb.ar16_10,.ytc_thumb.ar16_10>span,.ytc_thumb.ar16_10>span:before{padding-bottom:62.5%}.ytc_thumb.ar4_3,.ytc_thumb.ar4_3>span,.ytc_thumb.ar4_3>span:before{padding-bottom:75%}.youtube_channel.responsive .ytc_video_container.ar16_9{position:relative;padding-bottom:56.25%;height:0}.youtube_channel.responsive .ytc_video_container.ar16_10{position:relative;padding-bottom:62.5%;height:0}.youtube_channel.responsive .ytc_video_container.ar4_3{position:relative;padding-bottom:75%;height:0}.youtube_channel.responsive .ytc_video_container iframe{position:absolute;top:0;left:0;width:100%;height:100%}
 
 
 
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
4
  Tags: youtube, channel, playlist, single, widget, widgets, youtube player, flash player, rss, feed, video, thumbnail, embed, sidebar, chromeless, iframe, html5, responsive
5
  Requires at least: 3.9.0
6
  Tested up to: 4.2
7
- Stable tag: 2.4.1.5
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -133,6 +133,13 @@ Also, even when hidding logo works for your video, on hover or when video is pau
133
 
134
  == Changelog ==
135
 
 
 
 
 
 
 
 
136
  = 2.4.1.5 (2015-04-13) =
137
  * Change: Add dismiss link for Old PHP notice and lower suggested PHP version to 5.3.x
138
 
4
  Tags: youtube, channel, playlist, single, widget, widgets, youtube player, flash player, rss, feed, video, thumbnail, embed, sidebar, chromeless, iframe, html5, responsive
5
  Requires at least: 3.9.0
6
  Tested up to: 4.2
7
+ Stable tag: 2.4.1.7
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
133
 
134
  == Changelog ==
135
 
136
+ = 2.4.1.7 (2015-04-20) =
137
+ * Quick Fix: strip 1st video from feed that provides notice "YouTube is upgrading to a newer version, which is not supported by this device or app." (more on www.youtube.com/devicesupport) until we finish YouTube Channel 3.0.0 (on the way)
138
+
139
+ = 2.4.1.6 (2015-04-15) =
140
+ * Fix: missing responsive support for embedded playlist, iframe and iframe2
141
+ * Fix: missing support to hide playback controls, info and annotations for embedded playlist
142
+
143
  = 2.4.1.5 (2015-04-13) =
144
  * Change: Add dismiss link for Old PHP notice and lower suggested PHP version to 5.3.x
145
 
youtube-channel.php CHANGED
@@ -4,7 +4,7 @@ Plugin Name: YouTube Channel
4
  Plugin URI: http://urosevic.net/wordpress/plugins/youtube-channel/
5
  Description: <a href="widgets.php">Widget</a> that display latest video thumbnail, iframe (HTML5 video), object (Flash video) or chromeless video from YouTube Channel or Playlist.
6
  Author: Aleksandar Urošević
7
- Version: 2.4.1.5
8
  Author URI: http://urosevic.net/
9
  */
10
  // @TODO make FitViedo optional
@@ -17,7 +17,7 @@ if ( !class_exists('WPAU_YOUTUBE_CHANNEL') )
17
  class WPAU_YOUTUBE_CHANNEL
18
  {
19
 
20
- public $plugin_version = "2.4.1.5";
21
  public $plugin_name = "YouTube Channel";
22
  public $plugin_slug = "youtube-channel";
23
  public $plugin_option = "youtube_channel_defaults";
@@ -443,6 +443,8 @@ function ytc_mute(event){
443
  elseif ( $maxrnd > 50 ) { $maxrnd = 50; } // max 50
444
 
445
  $feed_attr = '?alt=json';
 
 
446
  // select fields
447
  $feed_attr .= "&fields=entry(published,title,link,content)";
448
 
@@ -668,7 +670,15 @@ function ytc_mute(event){
668
  break;
669
  }
670
 
671
- $output[] = '<div class="ytc_video_container ytc_video_'.$y.' ytc_video_'.$vnumclass.'" style="width:'.$width.'px">';
 
 
 
 
 
 
 
 
672
 
673
  // show video title?
674
  if ( $instance['showtitle'] )
@@ -680,15 +690,9 @@ function ytc_mute(event){
680
  // enhanced privacy
681
  $youtube_domain = $this->youtube_domain($instance);
682
 
 
683
  // print out video
684
  if ( $to_show == "thumbnail" ) {
685
- // set proper class for responsive thumbs per selected aspect ratio
686
- switch ($instance['ratio'])
687
- {
688
- case 1: $arclass = 'ar4_3'; break;
689
- case 2: $arclass = 'ar16_10'; break;
690
- default: $arclass = 'ar16_9';
691
- }
692
  $title = sprintf( __('Watch video %1$s published on %2$s', 'youtube-channel' ), $yt_title, $yt_date );
693
  $p = '';
694
  if ( $norel ) $p .= '&rel=0';
@@ -841,7 +845,6 @@ JS;
841
  $playlist = (empty($instance['playlist'])) ? $this->playlist_id : $instance['playlist'];
842
 
843
  $height = self::height_ratio($width, $instance['ratio']);
844
-
845
  $height += ($instance['fixyt']) ? 54 : 0;
846
 
847
  $playlist = $this->clean_playlist_id($playlist);
@@ -854,10 +857,22 @@ JS;
854
 
855
  $rel = (empty($instance['norel'])) ? '' : '&rel=0';
856
 
 
 
 
 
 
 
 
 
 
 
 
 
857
  // enhanced privacy
858
  $youtube_domain = $this->youtube_domain($instance);
859
- $output[] = '<div class="ytc_video_container ytc_video_1 ytc_video_single">
860
- <iframe src="//'.$youtube_domain.'/embed/videoseries?list=PL'.$playlist.$autoplay.$theme.$modestbranding.$rel.'"
861
  width="'.$width.'" height="'.$height.'" frameborder="0"></iframe></div>';
862
  return $output;
863
  } // end function ytc_only_pl
4
  Plugin URI: http://urosevic.net/wordpress/plugins/youtube-channel/
5
  Description: <a href="widgets.php">Widget</a> that display latest video thumbnail, iframe (HTML5 video), object (Flash video) or chromeless video from YouTube Channel or Playlist.
6
  Author: Aleksandar Urošević
7
+ Version: 2.4.1.7
8
  Author URI: http://urosevic.net/
9
  */
10
  // @TODO make FitViedo optional
17
  class WPAU_YOUTUBE_CHANNEL
18
  {
19
 
20
+ public $plugin_version = "2.4.1.7";
21
  public $plugin_name = "YouTube Channel";
22
  public $plugin_slug = "youtube-channel";
23
  public $plugin_option = "youtube_channel_defaults";
443
  elseif ( $maxrnd > 50 ) { $maxrnd = 50; } // max 50
444
 
445
  $feed_attr = '?alt=json';
446
+ $feed_attr .= '&v=2&start-index=2';
447
+
448
  // select fields
449
  $feed_attr .= "&fields=entry(published,title,link,content)";
450
 
670
  break;
671
  }
672
 
673
+ // set proper class for responsive thumbs per selected aspect ratio
674
+ switch ($instance['ratio'])
675
+ {
676
+ case 1: $arclass = 'ar4_3'; break;
677
+ case 2: $arclass = 'ar16_10'; break;
678
+ default: $arclass = 'ar16_9';
679
+ }
680
+
681
+ $output[] = '<div class="ytc_video_container ytc_video_'.$y.' ytc_video_'.$vnumclass.' '.$arclass.'" style="width:'.$width.'px">';
682
 
683
  // show video title?
684
  if ( $instance['showtitle'] )
690
  // enhanced privacy
691
  $youtube_domain = $this->youtube_domain($instance);
692
 
693
+
694
  // print out video
695
  if ( $to_show == "thumbnail" ) {
 
 
 
 
 
 
 
696
  $title = sprintf( __('Watch video %1$s published on %2$s', 'youtube-channel' ), $yt_title, $yt_date );
697
  $p = '';
698
  if ( $norel ) $p .= '&rel=0';
845
  $playlist = (empty($instance['playlist'])) ? $this->playlist_id : $instance['playlist'];
846
 
847
  $height = self::height_ratio($width, $instance['ratio']);
 
848
  $height += ($instance['fixyt']) ? 54 : 0;
849
 
850
  $playlist = $this->clean_playlist_id($playlist);
857
 
858
  $rel = (empty($instance['norel'])) ? '' : '&rel=0';
859
 
860
+ $controls = (empty($instance['controls']) ) ? '' : '&controls=0';
861
+ $hideinfo = (empty($instance['hideinfo']) ) ? '' : '&showinfo=0';
862
+ $hideanno = (empty($instance['hideanno']) ) ? '' : '&iv_load_policy=3';
863
+
864
+ // set proper class for responsive thumbs per selected aspect ratio
865
+ switch ($instance['ratio'])
866
+ {
867
+ case 1: $arclass = 'ar4_3'; break;
868
+ case 2: $arclass = 'ar16_10'; break;
869
+ default: $arclass = 'ar16_9';
870
+ }
871
+
872
  // enhanced privacy
873
  $youtube_domain = $this->youtube_domain($instance);
874
+ $output[] = '<div class="ytc_video_container ytc_video_1 ytc_video_single '.$arclass.'">
875
+ <iframe src="//'.$youtube_domain.'/embed/videoseries?list=PL'.$playlist.$autoplay.$theme.$modestbranding.$rel. $controls.$hideinfo.$hideanno.'"
876
  width="'.$width.'" height="'.$height.'" frameborder="0"></iframe></div>';
877
  return $output;
878
  } // end function ytc_only_pl