YouTube Channel - Version 2.4.1.6

Version Description

(2015-04-15) = * Fix: missing responsive support for embedded playlist, iframe and iframe2 * Fix: missing support to hide playback controls, info and annotations for embedded playlist

Download this release

Release Info

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

Code changes from version 2.4.1.5 to 2.4.1.6

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,10 @@ 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.6
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
133
 
134
  == Changelog ==
135
 
136
+ = 2.4.1.6 (2015-04-15) =
137
+ * Fix: missing responsive support for embedded playlist, iframe and iframe2
138
+ * Fix: missing support to hide playback controls, info and annotations for embedded playlist
139
+
140
  = 2.4.1.5 (2015-04-13) =
141
  * Change: Add dismiss link for Old PHP notice and lower suggested PHP version to 5.3.x
142
 
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";
@@ -668,7 +668,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 +688,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 +843,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 +855,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.6
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.6";
21
  public $plugin_name = "YouTube Channel";
22
  public $plugin_slug = "youtube-channel";
23
  public $plugin_option = "youtube_channel_defaults";
668
  break;
669
  }
670
 
671
+ // set proper class for responsive thumbs per selected aspect ratio
672
+ switch ($instance['ratio'])
673
+ {
674
+ case 1: $arclass = 'ar4_3'; break;
675
+ case 2: $arclass = 'ar16_10'; break;
676
+ default: $arclass = 'ar16_9';
677
+ }
678
+
679
+ $output[] = '<div class="ytc_video_container ytc_video_'.$y.' ytc_video_'.$vnumclass.' '.$arclass.'" style="width:'.$width.'px">';
680
 
681
  // show video title?
682
  if ( $instance['showtitle'] )
688
  // enhanced privacy
689
  $youtube_domain = $this->youtube_domain($instance);
690
 
691
+
692
  // print out video
693
  if ( $to_show == "thumbnail" ) {
 
 
 
 
 
 
 
694
  $title = sprintf( __('Watch video %1$s published on %2$s', 'youtube-channel' ), $yt_title, $yt_date );
695
  $p = '';
696
  if ( $norel ) $p .= '&rel=0';
843
  $playlist = (empty($instance['playlist'])) ? $this->playlist_id : $instance['playlist'];
844
 
845
  $height = self::height_ratio($width, $instance['ratio']);
 
846
  $height += ($instance['fixyt']) ? 54 : 0;
847
 
848
  $playlist = $this->clean_playlist_id($playlist);
855
 
856
  $rel = (empty($instance['norel'])) ? '' : '&rel=0';
857
 
858
+ $controls = (empty($instance['controls']) ) ? '' : '&controls=0';
859
+ $hideinfo = (empty($instance['hideinfo']) ) ? '' : '&showinfo=0';
860
+ $hideanno = (empty($instance['hideanno']) ) ? '' : '&iv_load_policy=3';
861
+
862
+ // set proper class for responsive thumbs per selected aspect ratio
863
+ switch ($instance['ratio'])
864
+ {
865
+ case 1: $arclass = 'ar4_3'; break;
866
+ case 2: $arclass = 'ar16_10'; break;
867
+ default: $arclass = 'ar16_9';
868
+ }
869
+
870
  // enhanced privacy
871
  $youtube_domain = $this->youtube_domain($instance);
872
+ $output[] = '<div class="ytc_video_container ytc_video_1 ytc_video_single '.$arclass.'">
873
+ <iframe src="//'.$youtube_domain.'/embed/videoseries?list=PL'.$playlist.$autoplay.$theme.$modestbranding.$rel. $controls.$hideinfo.$hideanno.'"
874
  width="'.$width.'" height="'.$height.'" frameborder="0"></iframe></div>';
875
  return $output;
876
  } // end function ytc_only_pl