Version Description
(2015-05-10) =
* Fix: "Ups, something went wrong." when Playlist selected as resource because wrong switch
* Fix: Jumping thumbnails in responsive wall on hover in Twenty Fifteen theme because border-bottom for anchors
* Fix: Another deprecated shortcode attribute backward compatibility (use_res
)
* Add: Example of dynamic responsive wall (1 large + 6 small thumbnails) (to Description)
Download this release
Release Info
Developer | urkekg |
Plugin | YouTube Channel |
Version | 3.0.3 |
Comparing to | |
See all releases |
Code changes from version 3.0.2 to 3.0.3
- assets/css/youtube-channel.css +4 -0
- assets/css/youtube-channel.min.css +1 -1
- readme.txt +32 -1
- youtube-channel.php +10 -10
assets/css/youtube-channel.css
CHANGED
@@ -21,6 +21,10 @@
|
|
21 |
.youtube_channel.responsive .ytc_video_container {
|
22 |
width:100%!important;
|
23 |
}
|
|
|
|
|
|
|
|
|
24 |
.ytc_thumb {
|
25 |
display: block;
|
26 |
overflow: hidden;
|
21 |
.youtube_channel.responsive .ytc_video_container {
|
22 |
width:100%!important;
|
23 |
}
|
24 |
+
/* Fix for Twenty Fifteen */
|
25 |
+
.youtube_channel .ytc_video_container a {
|
26 |
+
border: none;
|
27 |
+
}
|
28 |
.ytc_thumb {
|
29 |
display: block;
|
30 |
overflow: hidden;
|
assets/css/youtube-channel.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.ytc_thumb>span,.ytc_thumb>span:before{background-position:center center;background-repeat:no-repeat}.youtube_channel{float:left;clear:both;position:relative}.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{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}.ytc_thumb>span:before{content:"";display:block;width:100%;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 .ytc_video_container iframe{margin-bottom:0}.youtube_channel.responsive .ytc_video_container.ar16_9 .fluid-width-video-wrapper{position:relative;padding-bottom:56.25%;height:0}.youtube_channel.responsive .ytc_video_container.ar16_10 .fluid-width-video-wrapper{position:relative;padding-bottom:62.5%;height:0}.youtube_channel.responsive .ytc_video_container.ar4_3 .fluid-width-video-wrapper{position:relative;padding-bottom:75%;height:0}.youtube_channel.responsive .ytc_video_container .fluid-width-video-wrapper iframe{position:absolute;top:0;left:0;width:100%;height:100%}.youtube_channel .ytc_link{position:relative;clear:both;float:left;width:100%}.youtube_channel .ytc_link>p{padding:0;margin:0}
|
1 |
+
.ytc_thumb>span,.ytc_thumb>span:before{background-position:center center;background-repeat:no-repeat}.youtube_channel{float:left;clear:both;position:relative}.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}.youtube_channel .ytc_video_container a{border:none}.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}.ytc_thumb>span:before{content:"";display:block;width:100%;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 .ytc_video_container iframe{margin-bottom:0}.youtube_channel.responsive .ytc_video_container.ar16_9 .fluid-width-video-wrapper{position:relative;padding-bottom:56.25%;height:0}.youtube_channel.responsive .ytc_video_container.ar16_10 .fluid-width-video-wrapper{position:relative;padding-bottom:62.5%;height:0}.youtube_channel.responsive .ytc_video_container.ar4_3 .fluid-width-video-wrapper{position:relative;padding-bottom:75%;height:0}.youtube_channel.responsive .ytc_video_container .fluid-width-video-wrapper iframe{position:absolute;top:0;left:0;width:100%;height:100%}.youtube_channel .ytc_link{position:relative;clear:both;float:left;width:100%}.youtube_channel .ytc_link>p{padding:0;margin:0}
|
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.2
|
7 |
-
Stable tag: 3.0.
|
8 |
License: GPLv3
|
9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
@@ -193,8 +193,39 @@ Modestbranding option does not work for all videos, so a lot of videos will stil
|
|
193 |
|
194 |
Also, even when hidding logo works for your video, on hover or when video is paused in upper right corner will be displayed YouTube link/logo. [Read more here](https://developers.google.com/youtube/player_parameters#modestbranding)
|
195 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
196 |
== Changelog ==
|
197 |
|
|
|
|
|
|
|
|
|
|
|
|
|
198 |
= 3.0.2 (2015-05-10) =
|
199 |
* Fix: (typo - experiencing on frontend when no API Key set) PHP Fatal error: Call to undefined function __sprintf() in youtube-channel.php on line 445
|
200 |
* Fix: shortcode deprecated params `res` and `show` not backward compatibile
|
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.2
|
7 |
+
Stable tag: 3.0.3
|
8 |
License: GPLv3
|
9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
193 |
|
194 |
Also, even when hidding logo works for your video, on hover or when video is paused in upper right corner will be displayed YouTube link/logo. [Read more here](https://developers.google.com/youtube/player_parameters#modestbranding)
|
195 |
|
196 |
+
= How I can achieve wall layout with one featured thumbnail? =
|
197 |
+
|
198 |
+
You can try with shortcode combination:
|
199 |
+
`[youtube_channel num=7 responsive=1 class=ytc_wall_1-6 resource=2 random=1]`
|
200 |
+
|
201 |
+
and custom CSS code added to theme style.css or similar customization:
|
202 |
+
`.youtube_channel.ytc_wall_1-6 .ytc_video_container {
|
203 |
+
padding: 10px;
|
204 |
+
}
|
205 |
+
.youtube_channel.ytc_wall_1-6 .ytc_video_container:not(:first-child) {
|
206 |
+
max-width: 33.333%;
|
207 |
+
}
|
208 |
+
@media screen and (max-width: 768px) {
|
209 |
+
.youtube_channel.ytc_wall_1-6 .ytc_video_container:not(:first-child) {
|
210 |
+
max-width: 50%;
|
211 |
+
}
|
212 |
+
}
|
213 |
+
@media screen and (max-width: 480px) {
|
214 |
+
.youtube_channel.ytc_wall_1-6 .ytc_video_container:not(:first-child) {
|
215 |
+
max-width: 100%;
|
216 |
+
}
|
217 |
+
}`
|
218 |
+
|
219 |
+
So, we display thumbnails for 7 random videos from default (global) playlist, and distribute small thumbnails to 3 columns on wide screens, 2 columns under 768px and single thumbnail per row under 480px.
|
220 |
+
|
221 |
== Changelog ==
|
222 |
|
223 |
+
= 3.0.3 (2015-05-10) =
|
224 |
+
* Fix: "Ups, something went wrong." when Playlist selected as resource because wrong switch
|
225 |
+
* Fix: Jumping thumbnails in responsive wall on hover in Twenty Fifteen theme because border-bottom for anchors
|
226 |
+
* Fix: Another deprecated shortcode attribute backward compatibility (`use_res`)
|
227 |
+
* Add: Example of dynamic responsive wall (1 large + 6 small thumbnails) (to [Description](https://wordpress.org/plugins/youtube-channel/))
|
228 |
+
|
229 |
= 3.0.2 (2015-05-10) =
|
230 |
* Fix: (typo - experiencing on frontend when no API Key set) PHP Fatal error: Call to undefined function __sprintf() in youtube-channel.php on line 445
|
231 |
* Fix: shortcode deprecated params `res` and `show` not backward compatibile
|
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 or iframe (HTML5) video from YouTube Channel, Liked Videos, Favourites or Playlist.
|
6 |
Author: Aleksandar Urošević
|
7 |
-
Version: 3.0.
|
8 |
Author URI: http://urosevic.net/
|
9 |
*/
|
10 |
// @TODO make FitVideo optional
|
@@ -18,7 +18,7 @@ if ( !class_exists('WPAU_YOUTUBE_CHANNEL') )
|
|
18 |
{
|
19 |
|
20 |
const DB_VER = 3;
|
21 |
-
const VER = '3.0.
|
22 |
|
23 |
public $plugin_name = "YouTube Channel";
|
24 |
public $plugin_slug = "youtube-channel";
|
@@ -27,10 +27,7 @@ if ( !class_exists('WPAU_YOUTUBE_CHANNEL') )
|
|
27 |
|
28 |
public $vanity_id = "AleksandarUrosevic";
|
29 |
public $username_id = "urkekg";
|
30 |
-
// user channel UC
|
31 |
-
// favourites list FL
|
32 |
-
// liked list LL
|
33 |
-
public $channel_id = "UCRPqmcpGcJ_gFtTmN_a4aVA";
|
34 |
public $playlist_id = "PLEC850BE962234400";
|
35 |
public $plugin_url;
|
36 |
|
@@ -345,7 +342,8 @@ function ytc_mute(event){
|
|
345 |
'channel' => $instance['channel'],
|
346 |
'username' => $instance['username'],
|
347 |
'playlist' => $instance['playlist'],
|
348 |
-
'res' =>
|
|
|
349 |
'resource' => $instance['resource'], // ex use_res
|
350 |
'only_pl' => $instance['only_pl'],
|
351 |
'cache' => $instance['cache'], // ex cache_time
|
@@ -390,8 +388,10 @@ function ytc_mute(event){
|
|
390 |
if ( $show !== $display && $show !== $instance['display'] ) {
|
391 |
$display = $show;
|
392 |
}
|
393 |
-
// backward compatibility for
|
394 |
-
if (
|
|
|
|
|
395 |
$resource = $res;
|
396 |
}
|
397 |
|
@@ -477,7 +477,7 @@ function ytc_mute(event){
|
|
477 |
switch ($resource) {
|
478 |
|
479 |
// Playlist
|
480 |
-
case '
|
481 |
// 1) Get Playlist from shortcode/widget
|
482 |
// 2) If not set, use global default
|
483 |
// 3) If no global, use plugin's default
|
4 |
Plugin URI: http://urosevic.net/wordpress/plugins/youtube-channel/
|
5 |
Description: <a href="widgets.php">Widget</a> that display latest video thumbnail or iframe (HTML5) video from YouTube Channel, Liked Videos, Favourites or Playlist.
|
6 |
Author: Aleksandar Urošević
|
7 |
+
Version: 3.0.3
|
8 |
Author URI: http://urosevic.net/
|
9 |
*/
|
10 |
// @TODO make FitVideo optional
|
18 |
{
|
19 |
|
20 |
const DB_VER = 3;
|
21 |
+
const VER = '3.0.3';
|
22 |
|
23 |
public $plugin_name = "YouTube Channel";
|
24 |
public $plugin_slug = "youtube-channel";
|
27 |
|
28 |
public $vanity_id = "AleksandarUrosevic";
|
29 |
public $username_id = "urkekg";
|
30 |
+
public $channel_id = "UCRPqmcpGcJ_gFtTmN_a4aVA"; // user channel UC; favourites list FL; liked list LL
|
|
|
|
|
|
|
31 |
public $playlist_id = "PLEC850BE962234400";
|
32 |
public $plugin_url;
|
33 |
|
342 |
'channel' => $instance['channel'],
|
343 |
'username' => $instance['username'],
|
344 |
'playlist' => $instance['playlist'],
|
345 |
+
'res' => '', // (deprecated, but leave for back compatibility) ex res
|
346 |
+
'use_res' => '', // (deprecated, but leave for back compatibility) ex use_res
|
347 |
'resource' => $instance['resource'], // ex use_res
|
348 |
'only_pl' => $instance['only_pl'],
|
349 |
'cache' => $instance['cache'], // ex cache_time
|
388 |
if ( $show !== $display && $show !== $instance['display'] ) {
|
389 |
$display = $show;
|
390 |
}
|
391 |
+
// backward compatibility for use_res -> resource shortcode parameter
|
392 |
+
if ( ! empty($use_res) ) {
|
393 |
+
$resource = $use_res;
|
394 |
+
} else if ( ! empty($res) ) {
|
395 |
$resource = $res;
|
396 |
}
|
397 |
|
477 |
switch ($resource) {
|
478 |
|
479 |
// Playlist
|
480 |
+
case '2':
|
481 |
// 1) Get Playlist from shortcode/widget
|
482 |
// 2) If not set, use global default
|
483 |
// 3) If no global, use plugin's default
|