Version Description
(20170530) =
* Fix: cut description in the middle of multy-byte characters (reported by @funfrog)
* (20170509) Fix: undefined variable nolightbox
* Fix: add nolightbox
shortcode parameter and fix typos on Help section
Download this release
Release Info
Developer | urkekg |
Plugin | YouTube Channel |
Version | 3.0.11.1 |
Comparing to | |
See all releases |
Code changes from version 3.0.11 to 3.0.11.1
- inc/settings-usage-shortcode.php +3 -2
- readme.txt +9 -4
- update.php +18 -0
- youtube-channel.php +15 -7
inc/settings-usage-shortcode.php
CHANGED
@@ -59,8 +59,9 @@ printf(
|
|
59 |
<li><code>controls</code> <em>(bool)</em> Set this option to <code>1</code> or <code>true</code> to hide playback controls. To display controls set this option to <code>0</code> or <code>false</code>.</li>
|
60 |
<li><code>autoplay</code> <em>(bool)</em> Enable autoplay of first video in YTC video stack by setting this option to <code>1</code> or <code>true</code></li>
|
61 |
<li><code>mute</code> <em>(bool)</em> Set this option to <code>1</code> or <code>true</code> to mute videos set to autoplay on load</li>
|
62 |
-
<li><code>norel</code> <em>(bool)</em> Set this option to <code>1</code> or <code>true</code> to
|
63 |
-
<li><code>nobrand</code> <em>(bool)</em> Set this option to <code>1</code> or <code>true</code> to
|
|
|
64 |
</ul>
|
65 |
</div>
|
66 |
|
59 |
<li><code>controls</code> <em>(bool)</em> Set this option to <code>1</code> or <code>true</code> to hide playback controls. To display controls set this option to <code>0</code> or <code>false</code>.</li>
|
60 |
<li><code>autoplay</code> <em>(bool)</em> Enable autoplay of first video in YTC video stack by setting this option to <code>1</code> or <code>true</code></li>
|
61 |
<li><code>mute</code> <em>(bool)</em> Set this option to <code>1</code> or <code>true</code> to mute videos set to autoplay on load</li>
|
62 |
+
<li><code>norel</code> <em>(bool)</em> Set this option to <code>1</code> or <code>true</code> to hide related videos after finished playbak</li>
|
63 |
+
<li><code>nobrand</code> <em>(bool)</em> Set this option to <code>1</code> or <code>true</code> to hide YouTube logo from playback control bar</li>
|
64 |
+
<li><code>nolightbox</code> <em>(bool)</em> Set this option to <code>1</code> or <code>true</code> to disable lightbox and open thumbnail link in new tab/windows instead in lightbox</li>
|
65 |
</ul>
|
66 |
</div>
|
67 |
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: urkekg
|
|
3 |
Donate link: https://urosevic.net/wordpress/donate/?donate_for=youtube-channel
|
4 |
Tags: youtube, channel, playlist, single, widget, widgets, youtube player, feed, video, thumbnail, embed, sidebar, iframe, html5, responsive
|
5 |
Requires at least: 4.0
|
6 |
-
Tested up to: 4.7.
|
7 |
-
Stable tag: 3.0.11
|
8 |
License: GPLv3
|
9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
@@ -337,7 +337,7 @@ So, we display thumbnails for 7 random videos from default (global) playlist, an
|
|
337 |
|
338 |
= How I can add pagination (for example to Dynamic Wall view)? =
|
339 |
|
340 |
-
Unfortunately, YouTube Channel does not support pagination, so you’ll get only defined number of YouTube items in block in single view, no matter did you choose thumbnail or HTML5 Embed as mode.
|
341 |
|
342 |
= How to reduce size of/remove thumbnail Play button? =
|
343 |
|
@@ -359,9 +359,14 @@ If you really need that missing feature ASAP, feel free to [contact me](urosevic
|
|
359 |
If you don't wish to pay for enhancements (then you don't care would that be implemented in a week, month, year or so), then send new [Support topic](https://wordpress.org/support/plugin/youtube-channel) with *Topic title* in format **[Feature Request] ...**
|
360 |
|
361 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
362 |
= 3.0.11 (20170424) =
|
363 |
* Fix: added all 3 parameters to `widget_title` filter (reported by @squarestar)
|
364 |
-
* (20170301) Add: New shortcode options `nolightbox` and `target`, to make available opening thumbnail anchors in new tab/window
|
365 |
|
366 |
= 3.0.10.5 (20170225) =
|
367 |
* Remove: FMVD opt-in because of general plugin guideline violation rule #9
|
3 |
Donate link: https://urosevic.net/wordpress/donate/?donate_for=youtube-channel
|
4 |
Tags: youtube, channel, playlist, single, widget, widgets, youtube player, feed, video, thumbnail, embed, sidebar, iframe, html5, responsive
|
5 |
Requires at least: 4.0
|
6 |
+
Tested up to: 4.7.5
|
7 |
+
Stable tag: 3.0.11.1
|
8 |
License: GPLv3
|
9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
337 |
|
338 |
= How I can add pagination (for example to Dynamic Wall view)? =
|
339 |
|
340 |
+
Unfortunately, YouTube Channel does not support pagination, so you’ll get only defined number of YouTube items in block in single view, no matter did you choose thumbnail or HTML5 Embed as mode.
|
341 |
|
342 |
= How to reduce size of/remove thumbnail Play button? =
|
343 |
|
359 |
If you don't wish to pay for enhancements (then you don't care would that be implemented in a week, month, year or so), then send new [Support topic](https://wordpress.org/support/plugin/youtube-channel) with *Topic title* in format **[Feature Request] ...**
|
360 |
|
361 |
== Changelog ==
|
362 |
+
= 3.0.11.1 (20170530) =
|
363 |
+
* Fix: cut description in the middle of multy-byte characters (reported by @funfrog)
|
364 |
+
* (20170509) Fix: undefined variable `nolightbox`
|
365 |
+
* Fix: add `nolightbox` shortcode parameter and fix typos on Help section
|
366 |
+
|
367 |
= 3.0.11 (20170424) =
|
368 |
* Fix: added all 3 parameters to `widget_title` filter (reported by @squarestar)
|
369 |
+
* (20170301) Add: New shortcode options `nolightbox` and `target`, to make available opening thumbnail anchors in new tab/window (requested by @bakercreative)
|
370 |
|
371 |
= 3.0.10.5 (20170225) =
|
372 |
* Remove: FMVD opt-in because of general plugin guideline violation rule #9
|
update.php
CHANGED
@@ -456,3 +456,21 @@ function au_youtube_channel_update_routine_17() {
|
|
456 |
|
457 |
} // END function au_youtube_channel_update_routine_16()
|
458 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
456 |
|
457 |
} // END function au_youtube_channel_update_routine_16()
|
458 |
|
459 |
+
/**
|
460 |
+
* Add default value for new global option nolightbox
|
461 |
+
*/
|
462 |
+
function au_youtube_channel_update_routine_19() {
|
463 |
+
|
464 |
+
// get options from DB
|
465 |
+
$defaults = get_option( 'youtube_channel_defaults' );
|
466 |
+
|
467 |
+
if ( ! isset( $defaults['nolightbox'] ) ) {
|
468 |
+
$defaults['nolightbox'] = '0';
|
469 |
+
}
|
470 |
+
|
471 |
+
if ( isset( $defaults ) ) {
|
472 |
+
update_option( 'youtube_channel_defaults', $defaults );
|
473 |
+
unset( $defaults );
|
474 |
+
}
|
475 |
+
|
476 |
+
} // END function au_youtube_channel_update_routine_19()
|
youtube-channel.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: YouTube Channel
|
4 |
Plugin URI: https://urosevic.net/wordpress/plugins/youtube-channel/
|
5 |
Description: Quick and easy embed latest or random videos from YouTube channel (user uploads, liked or favourited videos) or playlist. Use <a href="widgets.php">widget</a> for sidebar or shortcode for content. Works with <em>YouTube Data API v3</em>.
|
6 |
-
Version: 3.0.11
|
7 |
Author: Aleksandar Urošević
|
8 |
Author URI: https://urosevic.net/
|
9 |
Text Domain: youtube-channel
|
@@ -17,8 +17,8 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
17 |
if ( ! class_exists( 'WPAU_YOUTUBE_CHANNEL' ) ) {
|
18 |
class WPAU_YOUTUBE_CHANNEL {
|
19 |
|
20 |
-
const DB_VER =
|
21 |
-
const VER = '3.0.11';
|
22 |
|
23 |
public $plugin_name = 'YouTube Channel';
|
24 |
public $plugin_slug = 'youtube-channel';
|
@@ -134,6 +134,7 @@ if ( ! class_exists( 'WPAU_YOUTUBE_CHANNEL' ) ) {
|
|
134 |
'popup_goto' => 0, // 0 same window, 1 new window JS, 2 new window target
|
135 |
'link_to' => 'none', // 0 legacy username, 1 channel, 2 vanity
|
136 |
'tinymce' => 1, // show TinyMCE button by default
|
|
|
137 |
);
|
138 |
|
139 |
add_option( 'youtube_channel_version', self::VER, '', 'no' );
|
@@ -524,7 +525,7 @@ if ( ! class_exists( 'WPAU_YOUTUBE_CHANNEL' ) ) {
|
|
524 |
|
525 |
'class' => ! empty( $instance['class'] ) ? $instance['class'] : '',
|
526 |
|
527 |
-
'nolightbox' => $instance['nolightbox'],
|
528 |
'target' => '',
|
529 |
),
|
530 |
$atts
|
@@ -1252,9 +1253,16 @@ if ( ! class_exists( 'WPAU_YOUTUBE_CHANNEL' ) ) {
|
|
1252 |
$etcetera = '';
|
1253 |
##TODO: If description should note be shortened, print HTML formatted desc
|
1254 |
if ( $instance['desclen'] > 0 ) {
|
1255 |
-
if (
|
1256 |
-
|
1257 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1258 |
}
|
1259 |
}
|
1260 |
|
3 |
Plugin Name: YouTube Channel
|
4 |
Plugin URI: https://urosevic.net/wordpress/plugins/youtube-channel/
|
5 |
Description: Quick and easy embed latest or random videos from YouTube channel (user uploads, liked or favourited videos) or playlist. Use <a href="widgets.php">widget</a> for sidebar or shortcode for content. Works with <em>YouTube Data API v3</em>.
|
6 |
+
Version: 3.0.11.1
|
7 |
Author: Aleksandar Urošević
|
8 |
Author URI: https://urosevic.net/
|
9 |
Text Domain: youtube-channel
|
17 |
if ( ! class_exists( 'WPAU_YOUTUBE_CHANNEL' ) ) {
|
18 |
class WPAU_YOUTUBE_CHANNEL {
|
19 |
|
20 |
+
const DB_VER = 19;
|
21 |
+
const VER = '3.0.11.1';
|
22 |
|
23 |
public $plugin_name = 'YouTube Channel';
|
24 |
public $plugin_slug = 'youtube-channel';
|
134 |
'popup_goto' => 0, // 0 same window, 1 new window JS, 2 new window target
|
135 |
'link_to' => 'none', // 0 legacy username, 1 channel, 2 vanity
|
136 |
'tinymce' => 1, // show TinyMCE button by default
|
137 |
+
'nolightbox' => 0, // do not use lightbox global setting
|
138 |
);
|
139 |
|
140 |
add_option( 'youtube_channel_version', self::VER, '', 'no' );
|
525 |
|
526 |
'class' => ! empty( $instance['class'] ) ? $instance['class'] : '',
|
527 |
|
528 |
+
'nolightbox' => ! empty( $instance['nolightbox'] ) ? $instance['nolightbox'] : '0',
|
529 |
'target' => '',
|
530 |
),
|
531 |
$atts
|
1253 |
$etcetera = '';
|
1254 |
##TODO: If description should note be shortened, print HTML formatted desc
|
1255 |
if ( $instance['desclen'] > 0 ) {
|
1256 |
+
if ( function_exists( 'mb_strlen' ) && function_exists( 'mb_substr' ) ) {
|
1257 |
+
if ( mb_strlen( $video_description ) > $instance['desclen'] ) {
|
1258 |
+
$video_description = mb_substr( $video_description, 0, $instance['desclen'] );
|
1259 |
+
$etcetera = '…';
|
1260 |
+
}
|
1261 |
+
} else {
|
1262 |
+
if ( strlen( $video_description ) > $instance['desclen'] ) {
|
1263 |
+
$video_description = substr( $video_description, 0, $instance['desclen'] );
|
1264 |
+
$etcetera = '…';
|
1265 |
+
}
|
1266 |
}
|
1267 |
}
|
1268 |
|