YouTube Channel - Version 2.4.0.1

Version Description

(2014-10-01) = * Fix: fatal error - broken execution for embedded playlist with enhanced privacy * Add: button to discard warning notice for Redux Framework

Download this release

Release Info

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

Code changes from version 2.4.0 to 2.4.0.1

Files changed (2) hide show
  1. readme.txt +5 -1
  2. youtube-channel.php +16 -7
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
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -123,6 +123,10 @@ 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 (2014-10-01) =
127
  * Fix: false options set in shortcode had no effect to output box and default settings always used [20140924]
128
  * Fix: enabled checkbox in global settings could not be unticked (disabled) [20140924]
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
  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
129
+
130
  = 2.4.0 (2014-10-01) =
131
  * Fix: false options set in shortcode had no effect to output box and default settings always used [20140924]
132
  * Fix: enabled checkbox in global settings could not be unticked (disabled) [20140924]
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
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";
21
  public $plugin_name = "YouTube Channel";
22
  public $plugin_slug = "youtube-channel";
23
  public $plugin_option = "youtube_channel_defaults";
@@ -48,6 +48,10 @@ if ( !class_exists('WPAU_YOUTUBE_CHANNEL') )
48
  if ( !empty($_GET['ytc_dismiss_update_notice']) )
49
  update_option( 'ytc_version', $this->plugin_version );
50
 
 
 
 
 
51
  // add dashboard notice if version changed
52
  $version = get_option('ytc_version','0');
53
  if ( version_compare($version, $this->plugin_version, "<") )
@@ -73,7 +77,8 @@ if ( !class_exists('WPAU_YOUTUBE_CHANNEL') )
73
  }
74
  } else {
75
  // Add admin notice for Redux Framework
76
- add_action( 'admin_notices', array($this,'admin_notice_redux') );
 
77
  }
78
 
79
  } // settings_init()
@@ -105,7 +110,8 @@ if ( !class_exists('WPAU_YOUTUBE_CHANNEL') )
105
 
106
  function admin_notice_redux()
107
  {
108
- echo '<div class="error"><p>'.sprintf(__("To configure global <strong>%s</strong> options, you need to install and activate <strong>%s</strong>.", 'youtube-channel'), $this->plugin_name, "Redux Framework Plugin") . '</p></div>';
 
109
  } // admin_notice()
110
 
111
  function add_settings_link($links)
@@ -245,7 +251,7 @@ if ( !class_exists('WPAU_YOUTUBE_CHANNEL') )
245
  wp_enqueue_style( 'youtube-channel', plugins_url('assets/css/youtube-channel.min.css', __FILE__), array(), $this->plugin_version );
246
 
247
  // enqueue fitVid
248
- wp_enqueue_script( 'fitvid', plugins_url('assets/js/jquery.fitvids.min.js', __FILE__), array('jquery'), $this->plugin_version, true );
249
 
250
  // enqueue magnific-popup
251
  wp_enqueue_script( 'magnific-popup', plugins_url('assets/lib/magnific-popup/jquery.magnific-popup.min.js', __FILE__), array('jquery'), $this->plugin_version, true );
@@ -273,6 +279,8 @@ if ( !class_exists('WPAU_YOUTUBE_CHANNEL') )
273
  </script>
274
  <?php
275
  }
 
 
276
  ?>
277
  <script>
278
  jQuery(document).ready(function($){
@@ -280,6 +288,7 @@ jQuery(document).ready(function($){
280
  });
281
  </script>
282
  <?php
 
283
  } // end fucntion footer_scripts
284
 
285
  public function shortcode($atts)
@@ -398,7 +407,7 @@ jQuery(document).ready(function($){
398
  $output[] = '<div class="youtube_channel '.$class.'">';
399
 
400
  if ( $instance['only_pl'] && $use_res == 2 ) { // print standard playlist
401
- $output = array_merge($output, ytc_only_pl($instance));
402
  } else { // channel or playlist single videos
403
 
404
  // get max items for random video
@@ -783,7 +792,7 @@ JS;
783
 
784
  $playlist = (empty($instance['playlist'])) ? $this->playlist_id : $instance['playlist'];
785
 
786
- $height = height_ratio($width, $instance['ratio']);
787
 
788
  $height += ($instance['fixyt']) ? 25 : 0;
789
 
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
  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";
48
  if ( !empty($_GET['ytc_dismiss_update_notice']) )
49
  update_option( 'ytc_version', $this->plugin_version );
50
 
51
+ // Update Redux notice
52
+ if ( !empty($_GET['ytc_ignore_redux']) )
53
+ update_option( 'ytc_no_redux_notice', true);
54
+
55
  // add dashboard notice if version changed
56
  $version = get_option('ytc_version','0');
57
  if ( version_compare($version, $this->plugin_version, "<") )
77
  }
78
  } else {
79
  // Add admin notice for Redux Framework
80
+ if ( !get_option('ytc_no_redux_notice', 0) )
81
+ add_action( 'admin_notices', array($this,'admin_notice_redux') );
82
  }
83
 
84
  } // settings_init()
110
 
111
  function admin_notice_redux()
112
  {
113
+ $ignoreredux = ' <a href="?ytc_ignore_redux=1" class="button primary">'.__("Dismiss this notice", 'youtube-channel') . '</a>';
114
+ echo '<div class="error"><p>'.sprintf(__("To configure global <strong>%s</strong> options, you need to install and activate <strong>%s</strong>.", 'youtube-channel'), $this->plugin_name, "Redux Framework Plugin") . $ignoreredux . '</p></div>';
115
  } // admin_notice()
116
 
117
  function add_settings_link($links)
251
  wp_enqueue_style( 'youtube-channel', plugins_url('assets/css/youtube-channel.min.css', __FILE__), array(), $this->plugin_version );
252
 
253
  // enqueue fitVid
254
+ // wp_enqueue_script( 'fitvid', plugins_url('assets/js/jquery.fitvids.min.js', __FILE__), array('jquery'), $this->plugin_version, true );
255
 
256
  // enqueue magnific-popup
257
  wp_enqueue_script( 'magnific-popup', plugins_url('assets/lib/magnific-popup/jquery.magnific-popup.min.js', __FILE__), array('jquery'), $this->plugin_version, true );
279
  </script>
280
  <?php
281
  }
282
+ /*
283
+ // @TODO sort out fitVid and Async
284
  ?>
285
  <script>
286
  jQuery(document).ready(function($){
288
  });
289
  </script>
290
  <?php
291
+ */
292
  } // end fucntion footer_scripts
293
 
294
  public function shortcode($atts)
407
  $output[] = '<div class="youtube_channel '.$class.'">';
408
 
409
  if ( $instance['only_pl'] && $use_res == 2 ) { // print standard playlist
410
+ $output = array_merge($output, self::ytc_only_pl($instance));
411
  } else { // channel or playlist single videos
412
 
413
  // get max items for random video
792
 
793
  $playlist = (empty($instance['playlist'])) ? $this->playlist_id : $instance['playlist'];
794
 
795
+ $height = self::height_ratio($width, $instance['ratio']);
796
 
797
  $height += ($instance['fixyt']) ? 25 : 0;
798