YouTube Channel - Version 2.4.0.2

Version Description

(2014-10-02) = * Fix: light theme not applicable to embedded playlist [2014-10-01] * Fix: add clearfix after YTC widget to prevent jumping out of widget block on bad styled themes [2014-10-02] * Add: explanation that What to embed have no effect for embedded playlist (HTML5 always used) [2014-10-01]

Download this release

Release Info

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

Code changes from version 2.4.0.1 to 2.4.0.2

assets/css/youtube-channel.css CHANGED
@@ -1,7 +1,17 @@
 
1
  .youtube_channel {
2
  float: left;
3
  clear: both;
4
  }
 
 
 
 
 
 
 
 
 
5
  .youtube_channel .ytc_video_container {
6
  float: left;
7
  }
1
+
2
  .youtube_channel {
3
  float: left;
4
  clear: both;
5
  }
6
+ .widget_youtube-channel:after,
7
+ .youtube_channel:after {
8
+ visibility: hidden;
9
+ display: block;
10
+ font-size: 0;
11
+ content: " ";
12
+ clear: both;
13
+ height: 0;
14
+ }
15
  .youtube_channel .ytc_video_container {
16
  float: left;
17
  }
assets/css/youtube-channel.min.css CHANGED
@@ -1,3 +1,3 @@
1
- .youtube_channel{float:left;clear:both}.youtube_channel .ytc_video_container{float:left}.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}
2
- .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}
3
  .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
+ .youtube_channel{float:left;clear:both}.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}.ytc_thumb{display:block;overflow:hidden;position:relative;height:0;width:100%;top:0;right:0;bottom:0;left:0}
2
+ .ytc_thumb>span{height:0;width:100%;display:block;-webkit-background-size:cover;background-size:cover;background-position:center center;background-repeat:no-repeat}.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}
3
  .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%}
inc/widget.php CHANGED
@@ -101,7 +101,7 @@ class WPAU_YOUTUBE_CHANNEL_Widget extends WP_Widget {
101
  <option value="2"<?php selected( $use_res, 2 ); ?>><?php _e('Playlist', 'youtube-channel'); ?></option>
102
  </select>
103
  <br />
104
- <label style="display: none" for="<?php echo $this->get_field_id( 'only_pl' ); ?>" id="<?php echo $this->get_field_id( 'only_pl' ); ?>_label"><input class="checkbox" type="checkbox" <?php checked( (bool) $only_pl, true ); ?> id="<?php echo $this->get_field_id( 'only_pl' ); ?>" name="<?php echo $this->get_field_name( 'only_pl' ); ?>" title="<?php _e('Enable this option to embed YouTube playlist widget instead single video from playlist', 'youtube-channel'); ?>" /> <?php _e('Embed standard playlist', 'youtube-channel'); ?></label>
105
  </p>
106
  <?php $onlypl_js_fn = str_replace('-','_',$this->get_field_id( 'only_pl' )); ?>
107
  <script type="text/javascript">
101
  <option value="2"<?php selected( $use_res, 2 ); ?>><?php _e('Playlist', 'youtube-channel'); ?></option>
102
  </select>
103
  <br />
104
+ <label style="display: none" for="<?php echo $this->get_field_id( 'only_pl' ); ?>" id="<?php echo $this->get_field_id( 'only_pl' ); ?>_label"><input class="checkbox" type="checkbox" <?php checked( (bool) $only_pl, true ); ?> id="<?php echo $this->get_field_id( 'only_pl' ); ?>" name="<?php echo $this->get_field_name( 'only_pl' ); ?>" title="<?php _e('Enable this option to embed YouTube playlist instead single video from playlist.', 'youtube-channel'); ?>" /> <?php _e('Embed standard playlist<br /><small>(Please note <em>What to show?</em> have no effect for embedded playlist)</small>', 'youtube-channel'); ?></label>
105
  </p>
106
  <?php $onlypl_js_fn = str_replace('-','_',$this->get_field_id( 'only_pl' )); ?>
107
  <script type="text/javascript">
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
5
  Requires at least: 3.9.0
6
  Tested up to: 4.0
7
- Stable tag: 2.4.0.1
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -123,6 +123,11 @@ Video feed for YTC has been retreived with standard youtube feed [uploads by spe
123
  If you does not see your latest video in your uplaods feed (which you can access at https://gdata.youtube.com/feeds/api/users/YOUR_YT_USERID/uploads by replacing YOUR_YT_USERID with your real youtube user ID), then YTC will not see it too.
124
 
125
  == Changelog ==
 
 
 
 
 
126
  = 2.4.0.1 (2014-10-01) =
127
  * Fix: fatal error - broken execution for embedded playlist with enhanced privacy
128
  * Add: button to discard warning notice for Redux Framework
4
  Tags: youtube, channel, playlist, single, widget, widgets, youtube player, flash player, rss, feed, video, thumbnail, embed, sidebar, chromeless, iframe, html5
5
  Requires at least: 3.9.0
6
  Tested up to: 4.0
7
+ Stable tag: 2.4.0.2
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
123
  If you does not see your latest video in your uplaods feed (which you can access at https://gdata.youtube.com/feeds/api/users/YOUR_YT_USERID/uploads by replacing YOUR_YT_USERID with your real youtube user ID), then YTC will not see it too.
124
 
125
  == Changelog ==
126
+ = 2.4.0.2 (2014-10-02) =
127
+ * Fix: light theme not applicable to embedded playlist [2014-10-01]
128
+ * Fix: add clearfix after YTC widget to prevent jumping out of widget block on bad styled themes [2014-10-02]
129
+ * Add: explanation that `What to embed` have no effect for embedded playlist (HTML5 always used) [2014-10-01]
130
+
131
  = 2.4.0.1 (2014-10-01) =
132
  * Fix: fatal error - broken execution for embedded playlist with enhanced privacy
133
  * Add: button to discard warning notice for Redux Framework
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.0.1
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.0.1";
21
  public $plugin_name = "YouTube Channel";
22
  public $plugin_slug = "youtube-channel";
23
  public $plugin_option = "youtube_channel_defaults";
@@ -786,6 +786,7 @@ JS;
786
 
787
  /* function to print standard playlist embed code */
788
  function ytc_only_pl($instance) {
 
789
  $width = $instance['width'];
790
  if ( empty($width) )
791
  $width = 306;
@@ -799,13 +800,15 @@ JS;
799
  $playlist = $this->clean_playlist_id($playlist);
800
 
801
  $autoplay = (empty($instance['autoplay'])) ? '' : '&autoplay=1';
802
-
 
 
803
  $rel = (empty($instance['norel'])) ? '' : '&rel=0';
804
 
805
  // enhanced privacy
806
  $youtube_domain = $this->youtube_domain($instance);
807
  $output[] = '<div class="ytc_video_container ytc_video_1 ytc_video_single">
808
- <iframe src="http://'.$youtube_domain.'/embed/videoseries?list=PL'.$playlist.$autoplay.$rel.'"
809
  width="'.$width.'" height="'.$height.'" frameborder="0"></iframe></div>';
810
  return $output;
811
  } // 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.0.2
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.0.2";
21
  public $plugin_name = "YouTube Channel";
22
  public $plugin_slug = "youtube-channel";
23
  public $plugin_option = "youtube_channel_defaults";
786
 
787
  /* function to print standard playlist embed code */
788
  function ytc_only_pl($instance) {
789
+
790
  $width = $instance['width'];
791
  if ( empty($width) )
792
  $width = 306;
800
  $playlist = $this->clean_playlist_id($playlist);
801
 
802
  $autoplay = (empty($instance['autoplay'])) ? '' : '&autoplay=1';
803
+
804
+ $theme = (empty($instance['themelight'])) ? '' : '&theme=light' ;
805
+
806
  $rel = (empty($instance['norel'])) ? '' : '&rel=0';
807
 
808
  // enhanced privacy
809
  $youtube_domain = $this->youtube_domain($instance);
810
  $output[] = '<div class="ytc_video_container ytc_video_1 ytc_video_single">
811
+ <iframe src="http://'.$youtube_domain.'/embed/videoseries?list=PL'.$playlist.$autoplay.$theme.$rel.'"
812
  width="'.$width.'" height="'.$height.'" frameborder="0"></iframe></div>';
813
  return $output;
814
  } // end function ytc_only_pl