YouTube Channel - Version 2.4.1.5

Version Description

(2015-04-13) = * Change: Add dismiss link for Old PHP notice and lower suggested PHP version to 5.3.x

Download this release

Release Info

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

Code changes from version 2.4.1.4 to 2.4.1.5

Files changed (2) hide show
  1. readme.txt +4 -1
  2. youtube-channel.php +12 -6
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.4
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -133,6 +133,9 @@ Also, even when hidding logo works for your video, on hover or when video is pau
133
 
134
  == Changelog ==
135
 
 
 
 
136
  = 2.4.1.4 (2015-04-09) =
137
  * (2015-04-09) Add: Notification about old PHP if lower than 5.3.29
138
  * Change: Run admin functions only in dashboard
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
 
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
+
139
  = 2.4.1.4 (2015-04-09) =
140
  * (2015-04-09) Add: Notification about old PHP if lower than 5.3.29
141
  * Change: Run admin functions only in dashboard
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.4
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.4";
21
  public $plugin_name = "YouTube Channel";
22
  public $plugin_slug = "youtube-channel";
23
  public $plugin_option = "youtube_channel_defaults";
@@ -58,14 +58,19 @@ if ( !class_exists('WPAU_YOUTUBE_CHANNEL') )
58
  if ( !empty($_GET['ytc_ignore_redux']) )
59
  update_option( 'ytc_no_redux_notice', true);
60
 
 
 
 
 
 
 
 
 
61
  // add dashboard notice if version changed
62
  $version = get_option('ytc_version','0');
63
  if ( version_compare($version, $this->plugin_version, "<") )
64
  add_action( 'admin_notices', array($this, 'admin_notices') );
65
 
66
- // add dashboard notice if old PHP
67
- if ( version_compare(PHP_VERSION, "5.3.29", "<") )
68
- add_action( 'admin_notices', array($this, 'admin_notices_old_php') );
69
  }
70
 
71
  // enqueue scripts
@@ -126,7 +131,8 @@ if ( !class_exists('WPAU_YOUTUBE_CHANNEL') )
126
 
127
  function admin_notices_old_php()
128
  {
129
- echo '<div class="error"><p>Your WordPress running on server with PHP version '.PHP_VERSION.'. YouTube Channel plugin requires at least PHP 5.3.29 so if you experience any issue, we can`t help.</p></div>';
 
130
  } // END admin_notices_old_php()
131
 
132
  function admin_notice_redux()
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
  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";
58
  if ( !empty($_GET['ytc_ignore_redux']) )
59
  update_option( 'ytc_no_redux_notice', true);
60
 
61
+ // Dismiss Old PHP notice
62
+ if ( !empty($_GET['ytc_dismiss_old_php_notice']) )
63
+ update_option( 'ytc_old_php_notice', true);
64
+
65
+ // add dashboard notice if old PHP
66
+ if ( version_compare(PHP_VERSION, "5.3", "<") && ! get_option('ytc_old_php_notice') )
67
+ add_action( 'admin_notices', array($this, 'admin_notices_old_php') );
68
+
69
  // add dashboard notice if version changed
70
  $version = get_option('ytc_version','0');
71
  if ( version_compare($version, $this->plugin_version, "<") )
72
  add_action( 'admin_notices', array($this, 'admin_notices') );
73
 
 
 
 
74
  }
75
 
76
  // enqueue scripts
131
 
132
  function admin_notices_old_php()
133
  {
134
+ $btn = '<a href="?ytc_dismiss_old_php_notice=1">' . __("I got it! Dismiss this notice.", 'youtube-channel') . '</a>';
135
+ echo '<div class="error"><p>Your WordPress running on server with PHP version '.PHP_VERSION.'. YouTube Channel plugin requires at least PHP 5.3.x so if you experience any issue, we can`t help. '.$btn.'</p></div>';
136
  } // END admin_notices_old_php()
137
 
138
  function admin_notice_redux()