Version Description
- Added some classes to html.
- Fixed thumbnail size error when the number of columns is equal to 0 or 1.
Download this release
Release Info
Developer | javitxu123 |
Plugin | Youtube Channel Gallery |
Version | 1.8.1 |
Comparing to | |
See all releases |
Code changes from version 1.8 to 1.8.1
- readme.txt +5 -1
- styles.css +2 -0
- youtube-channel-gallery.php +11 -9
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: http://poselab.com/
|
|
4 |
Tags: widget, gallery, youtube, channel, user, sidebar, video, youtube playlist, html5, iframe, Youtube channel, youtube videos
|
5 |
Requires at least: 2.8
|
6 |
Tested up to: 3.4.1
|
7 |
-
Stable tag: 1.8
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -126,6 +126,10 @@ This will happen if your playlist has more than 1000 videos because YouTube API
|
|
126 |
|
127 |
== Changelog ==
|
128 |
|
|
|
|
|
|
|
|
|
129 |
= 1.8 =
|
130 |
* Replaced SimplePie for SimpleXML to solve problems that many users have with Simplepie.
|
131 |
* Replaced SimplePie FeedCache for Transients API cache data to manage cache of RSS.
|
4 |
Tags: widget, gallery, youtube, channel, user, sidebar, video, youtube playlist, html5, iframe, Youtube channel, youtube videos
|
5 |
Requires at least: 2.8
|
6 |
Tested up to: 3.4.1
|
7 |
+
Stable tag: 1.8.1
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
126 |
|
127 |
== Changelog ==
|
128 |
|
129 |
+
= 1.8.1 =
|
130 |
+
* Added some classes to html.
|
131 |
+
* Fixed thumbnail size error when the number of columns is equal to 0 or 1.
|
132 |
+
|
133 |
= 1.8 =
|
134 |
* Replaced SimplePie for SimpleXML to solve problems that many users have with Simplepie.
|
135 |
* Replaced SimplePie FeedCache for Transients API cache data to manage cache of RSS.
|
styles.css
CHANGED
@@ -102,6 +102,8 @@ ul.ytchagallery li .ytcliinner {overflow: hidden;}
|
|
102 |
/*columns*/
|
103 |
.ytc-row{clear: both;}
|
104 |
|
|
|
|
|
105 |
.ytc-columns2 li{ width: 50%; width:-webkit-calc(100%/2); width:calc(100%/2);}
|
106 |
|
107 |
.ytc-columns3 li{ width: 33.33%; width:-webkit-calc(100%/3); width:calc(100%/3);}
|
102 |
/*columns*/
|
103 |
.ytc-row{clear: both;}
|
104 |
|
105 |
+
.ytc-columns1 li{ width: 100%; }
|
106 |
+
|
107 |
.ytc-columns2 li{ width: 50%; width:-webkit-calc(100%/2); width:calc(100%/2);}
|
108 |
|
109 |
.ytc-columns3 li{ width: 33.33%; width:-webkit-calc(100%/3); width:calc(100%/3);}
|
youtube-channel-gallery.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
Description: Show a youtube video and a gallery of thumbnails for a youtube channel.
|
6 |
Author: Javier Gómez Pose
|
7 |
Author URI: http://www.poselab.com/
|
8 |
-
Version: 1.8
|
9 |
License: GPL2
|
10 |
|
11 |
Copyright 2013 Javier Gómez Pose (email : javierpose@gmail.com)
|
@@ -45,7 +45,7 @@ class YoutubeChannelGallery_Widget extends WP_Widget {
|
|
45 |
'youtubechannelgallery_widget', // Base ID
|
46 |
__( 'Youtube Channel Gallery', 'youtube-channel-gallery' ), // Name
|
47 |
|
48 |
-
array( 'classname' => 'youtubechannelgallery', 'description' => __( 'Show a youtube video and a gallery of thumbnails for a youtube channel', 'youtube-channel-gallery' ), ), // Args
|
49 |
|
50 |
array( 'width' => 260)
|
51 |
);
|
@@ -813,14 +813,16 @@ class YoutubeChannelGallery_Widget extends WP_Widget {
|
|
813 |
}// end columns control
|
814 |
|
815 |
//check if title or description
|
816 |
-
$
|
817 |
$title_and_description_alignment_class = '';
|
818 |
|
|
|
819 |
if ( $ytchag_title || $ytchag_description ) {
|
820 |
$title_and_description_alignment_class = ' ytc-td-' . $ytchag_thumbnail_alignment;
|
821 |
-
|
822 |
-
|
823 |
-
|
|
|
824 |
}
|
825 |
|
826 |
|
@@ -877,7 +879,7 @@ class YoutubeChannelGallery_Widget extends WP_Widget {
|
|
877 |
|
878 |
}
|
879 |
|
880 |
-
$content.= '<div class="ytcthumb-cont"' . $
|
881 |
$content.= '<a class="ytcthumb ytclink" href="http://youtu.be/' . $youtubeid . '" data-playerid="ytcplayer' . $plugincount . '" data-quality="' . $ytchag_quality . '" title="' . $title . '" style="background-image:url(' . $thumb . ')">';
|
882 |
$content.= '<div class="ytcplay"></div>';
|
883 |
$content.= '</a>';
|
@@ -925,7 +927,7 @@ class YoutubeChannelGallery_Widget extends WP_Widget {
|
|
925 |
function get_rss_data ( $ytchag_cache, $transientId, $ytchag_rss_url, $ytchag_cache_time ) {
|
926 |
//use cache
|
927 |
if ( $ytchag_cache == '1' ) {
|
928 |
-
|
929 |
//if cache does not exist
|
930 |
if ( false === ( $videos_result = get_transient( $transientId ) ) ) {
|
931 |
//get rss
|
@@ -1084,7 +1086,7 @@ class YoutubeChannelGallery_Widget extends WP_Widget {
|
|
1084 |
$instance['ytchag_link_window'] = $link_window;
|
1085 |
|
1086 |
|
1087 |
-
return '<div class="ytcshort youtubechannelgallery">'. $this->ytchag_rss_markup( $instance ) . '</div>';
|
1088 |
|
1089 |
} // YoutubeChannelGallery_Shortcode
|
1090 |
|
5 |
Description: Show a youtube video and a gallery of thumbnails for a youtube channel.
|
6 |
Author: Javier Gómez Pose
|
7 |
Author URI: http://www.poselab.com/
|
8 |
+
Version: 1.8.1
|
9 |
License: GPL2
|
10 |
|
11 |
Copyright 2013 Javier Gómez Pose (email : javierpose@gmail.com)
|
45 |
'youtubechannelgallery_widget', // Base ID
|
46 |
__( 'Youtube Channel Gallery', 'youtube-channel-gallery' ), // Name
|
47 |
|
48 |
+
array( 'classname' => 'youtubechannelgallery ytccf', 'description' => __( 'Show a youtube video and a gallery of thumbnails for a youtube channel', 'youtube-channel-gallery' ), ), // Args
|
49 |
|
50 |
array( 'width' => 260)
|
51 |
);
|
813 |
}// end columns control
|
814 |
|
815 |
//check if title or description
|
816 |
+
$ytchag_thumbnail_fixed_witdh = '';
|
817 |
$title_and_description_alignment_class = '';
|
818 |
|
819 |
+
|
820 |
if ( $ytchag_title || $ytchag_description ) {
|
821 |
$title_and_description_alignment_class = ' ytc-td-' . $ytchag_thumbnail_alignment;
|
822 |
+
}
|
823 |
+
//fixed width for columns 0 or with alignment
|
824 |
+
if ( $ytchag_thumbnail_alignment == 'left' || $ytchag_thumbnail_alignment == 'right' || $ytchag_thumb_columns ==0 ) {
|
825 |
+
$ytchag_thumbnail_fixed_witdh = ' style="width: ' . $ytchag_thumb_width . 'px; "';
|
826 |
}
|
827 |
|
828 |
|
879 |
|
880 |
}
|
881 |
|
882 |
+
$content.= '<div class="ytcthumb-cont"' . $ytchag_thumbnail_fixed_witdh . '>';
|
883 |
$content.= '<a class="ytcthumb ytclink" href="http://youtu.be/' . $youtubeid . '" data-playerid="ytcplayer' . $plugincount . '" data-quality="' . $ytchag_quality . '" title="' . $title . '" style="background-image:url(' . $thumb . ')">';
|
884 |
$content.= '<div class="ytcplay"></div>';
|
885 |
$content.= '</a>';
|
927 |
function get_rss_data ( $ytchag_cache, $transientId, $ytchag_rss_url, $ytchag_cache_time ) {
|
928 |
//use cache
|
929 |
if ( $ytchag_cache == '1' ) {
|
930 |
+
|
931 |
//if cache does not exist
|
932 |
if ( false === ( $videos_result = get_transient( $transientId ) ) ) {
|
933 |
//get rss
|
1086 |
$instance['ytchag_link_window'] = $link_window;
|
1087 |
|
1088 |
|
1089 |
+
return '<div class="ytcshort youtubechannelgallery ytccf">'. $this->ytchag_rss_markup( $instance ) . '</div>';
|
1090 |
|
1091 |
} // YoutubeChannelGallery_Shortcode
|
1092 |
|