Version Description
- Fix: to prevent broken JSON feed, transient caching changed from plain serialized string to base64_encode
- Add: URL parameter
ytc_force_recache
to force recache, also included on Help tab in plugin settings
Download this release
Release Info
Developer | urkekg |
Plugin | YouTube Channel |
Version | 2.2.1 |
Comparing to | |
See all releases |
Code changes from version 2.2.0 to 2.2.1
- assets/settings_help.php +21 -1
- readme.txt +15 -9
- youtube-channel.php +6 -5
assets/settings_help.php
CHANGED
@@ -59,4 +59,24 @@
|
|
59 |
</ul>
|
60 |
|
61 |
<p>Please note, you can exclude all options listed above, and then we'll use default options from Settings page.</p>
|
62 |
-
<p>YTC blocks inserted through widget have own settings.</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
59 |
</ul>
|
60 |
|
61 |
<p>Please note, you can exclude all options listed above, and then we'll use default options from Settings page.</p>
|
62 |
+
<p>YTC blocks inserted through widget have own settings.</p>
|
63 |
+
<h3>Caching</h3>
|
64 |
+
<p>To avoid page load slowdown, we provide internal YouTube Channel caching. You can enable caching per widget or shortcode, and set how long cache for particular widget or shortcode will live.</p>
|
65 |
+
<p>If you wish to clear cache before it expire (for example, you have set cache timeout to 2 days, but wish to force loading of fresh channel or playlist feed) for particular widget or shortcode, you can use form below instead to manually remove transients from database.</p>
|
66 |
+
|
67 |
+
<form name="ytc_recache">
|
68 |
+
<label for="slug">Enter relative URL to page where you display target YTC block (include starting and ending slash): <input name="recache_slug" id="recache_slug" value="" /></label>
|
69 |
+
<input type="submit" name="do_recache" id="do_recache" value="ReCache" class="button button-secondary" /> <span id="recache_message"></span>
|
70 |
+
</form>
|
71 |
+
<script type="text/javascript">
|
72 |
+
jQuery(document).ready(function($){
|
73 |
+
$('#do_recache').on('click', function(ev){
|
74 |
+
ev.preventDefault();
|
75 |
+
if ( $('#recache_slug').val() == '' ) {
|
76 |
+
$('#recache_message').html("Please type relative path and try again!").show().delay(3000).fadeOut(700);
|
77 |
+
} else {
|
78 |
+
window.open( $('#recache_slug').val()+'?ytc_force_recache=1' );
|
79 |
+
}
|
80 |
+
});
|
81 |
+
});
|
82 |
+
</script>
|
readme.txt
CHANGED
@@ -2,9 +2,9 @@
|
|
2 |
Contributors: urkekg
|
3 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=Q6Q762MQ97XJ6
|
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.
|
6 |
-
Tested up to:
|
7 |
-
Stable tag: 2.2.
|
8 |
License: GPLv3
|
9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
@@ -57,6 +57,8 @@ You can use `style.css` from theme to style `YouTube Video` widget content.
|
|
57 |
Controls light theme and hidden annotations does not work for chromeless object.
|
58 |
Video description for videos from playlist does nt work.
|
59 |
|
|
|
|
|
60 |
= Credits =
|
61 |
Chromeless option borrowed from [Chromeless YouTube](http://wordpress.org/extend/plugins/chromeless-youtube/) extension.
|
62 |
For playing videos in lightbox we use [Magnific Popup](http://dimsemenov.com/plugins/magnific-popup/).
|
@@ -84,10 +86,6 @@ You can use the built in installer and upgrader, or you can install the plugin m
|
|
84 |
|
85 |
If you have to upgrade manually simply repeat the installation steps and re-enable the plugin.
|
86 |
|
87 |
-
== TODO ==
|
88 |
-
|
89 |
-
* Add option to open video for thumbnail image in lightbox
|
90 |
-
|
91 |
== Frequently Asked Questions ==
|
92 |
|
93 |
= I set more than one items to fetch, but only one video is displayed. How to fix this? =
|
@@ -122,6 +120,10 @@ Video feed for YTC has been retreived with standard youtube feed [uploads by spe
|
|
122 |
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.
|
123 |
|
124 |
== Changelog ==
|
|
|
|
|
|
|
|
|
125 |
= 2.2.0 =
|
126 |
* Add: open thumbnails in lightbox and stay on site, instead opening YouTube page (Magnific Popup jQuery library)
|
127 |
* Add: make thumbnail responsive
|
@@ -241,6 +243,8 @@ If you does not see your latest video in your uplaods feed (which you can access
|
|
241 |
* Initial release
|
242 |
|
243 |
== Upgrade Notice ==
|
|
|
|
|
244 |
|
245 |
= 0.1.3 =
|
246 |
After upgrade check widget options.
|
@@ -271,5 +275,7 @@ We highly recommend to you made database backup before you upgrade to latest ver
|
|
271 |
|
272 |
== Screenshots ==
|
273 |
|
274 |
-
1. YouTube Channel
|
275 |
-
2. YouTube Channel widget settings
|
|
|
|
2 |
Contributors: urkekg
|
3 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=Q6Q762MQ97XJ6
|
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.8.0
|
6 |
+
Tested up to: 4.0
|
7 |
+
Stable tag: 2.2.1
|
8 |
License: GPLv3
|
9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
57 |
Controls light theme and hidden annotations does not work for chromeless object.
|
58 |
Video description for videos from playlist does nt work.
|
59 |
|
60 |
+
If WordFence or other malware scan tool detect YouTube Channel fule youtube-channel.php as potential risk because `base64_encode()` and `base64_decode()` functions, remember that we use this two functions to store and restore JSON feeds to transient cache, so potential detection is false positive.
|
61 |
+
|
62 |
= Credits =
|
63 |
Chromeless option borrowed from [Chromeless YouTube](http://wordpress.org/extend/plugins/chromeless-youtube/) extension.
|
64 |
For playing videos in lightbox we use [Magnific Popup](http://dimsemenov.com/plugins/magnific-popup/).
|
86 |
|
87 |
If you have to upgrade manually simply repeat the installation steps and re-enable the plugin.
|
88 |
|
|
|
|
|
|
|
|
|
89 |
== Frequently Asked Questions ==
|
90 |
|
91 |
= I set more than one items to fetch, but only one video is displayed. How to fix this? =
|
120 |
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.
|
121 |
|
122 |
== Changelog ==
|
123 |
+
= 2.2.1 =
|
124 |
+
* Fix: to prevent broken JSON feed, transient caching changed from plain serialized string to base64_encode
|
125 |
+
* Add: URL parameter `ytc_force_recache` to force recache, also included on Help tab in plugin settings
|
126 |
+
|
127 |
= 2.2.0 =
|
128 |
* Add: open thumbnails in lightbox and stay on site, instead opening YouTube page (Magnific Popup jQuery library)
|
129 |
* Add: make thumbnail responsive
|
243 |
* Initial release
|
244 |
|
245 |
== Upgrade Notice ==
|
246 |
+
= 2.2.1 =
|
247 |
+
Because we changed caching method, from Help tab on plugin Settings page do ReCache (read help page).
|
248 |
|
249 |
= 0.1.3 =
|
250 |
After upgrade check widget options.
|
275 |
|
276 |
== Screenshots ==
|
277 |
|
278 |
+
1. YouTube Channel plugin default settings
|
279 |
+
2. YouTube Channel customized widget settings
|
280 |
+
3. YouTube Channel in WP Customizer
|
281 |
+
4. YouTube Channel preview
|
youtube-channel.php
CHANGED
@@ -4,10 +4,10 @@ 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.2.
|
8 |
Author URI: http://urosevic.net/
|
9 |
*/
|
10 |
-
define( 'YTCVER', '2.2.
|
11 |
define( 'YOUTUBE_CHANNEL_URL', plugin_dir_url(__FILE__) );
|
12 |
define( 'YTCPLID', 'PLEC850BE962234400' );
|
13 |
define( 'YTCUID', 'urkekg' );
|
@@ -399,7 +399,6 @@ if ( $debugon == 'on' ) {
|
|
399 |
),
|
400 |
$instance);
|
401 |
?>
|
402 |
-
|
403 |
<textarea name="debug" class="widefat" style="height: 100px;"><?php echo au_ytc_dbg($debug_arr); ?></textarea><br />
|
404 |
<small>Insert debug data to <a href="http://wordpress.org/support/plugin/youtube-channel" target="_support">support forum</a>.<br />Please do not remove channel and playlist ID's. If you are concerned about privacy, send this debug log to email <a href="mailto:urke.kg@gmail.com?subject=YTC%20debug%20log">urke.kg@gmail.com</a></small>
|
405 |
<?php } ?>
|
@@ -556,6 +555,8 @@ if ( $debugon == 'on' ) {
|
|
556 |
// generate feed cache key for caching time
|
557 |
$cache_key = 'ytc_'.md5($feed_url).'_'.$instance['cache_time'];
|
558 |
|
|
|
|
|
559 |
// get/set transient cache
|
560 |
if ( false === ($json = get_transient($cache_key)) ) {
|
561 |
// no cached JSON, get new
|
@@ -567,10 +568,10 @@ if ( $debugon == 'on' ) {
|
|
567 |
|
568 |
// $json = file_get_contents($feed_url,0,null,null);
|
569 |
// set decoded JSON to transient cache_key
|
570 |
-
set_transient($cache_key,
|
571 |
} else {
|
572 |
// we already have cached feed JSON, get it encoded
|
573 |
-
$json =
|
574 |
}
|
575 |
} else {
|
576 |
// just get fresh feed if cache disabled
|
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.2.1
|
8 |
Author URI: http://urosevic.net/
|
9 |
*/
|
10 |
+
define( 'YTCVER', '2.2.1' );
|
11 |
define( 'YOUTUBE_CHANNEL_URL', plugin_dir_url(__FILE__) );
|
12 |
define( 'YTCPLID', 'PLEC850BE962234400' );
|
13 |
define( 'YTCUID', 'urkekg' );
|
399 |
),
|
400 |
$instance);
|
401 |
?>
|
|
|
402 |
<textarea name="debug" class="widefat" style="height: 100px;"><?php echo au_ytc_dbg($debug_arr); ?></textarea><br />
|
403 |
<small>Insert debug data to <a href="http://wordpress.org/support/plugin/youtube-channel" target="_support">support forum</a>.<br />Please do not remove channel and playlist ID's. If you are concerned about privacy, send this debug log to email <a href="mailto:urke.kg@gmail.com?subject=YTC%20debug%20log">urke.kg@gmail.com</a></small>
|
404 |
<?php } ?>
|
555 |
// generate feed cache key for caching time
|
556 |
$cache_key = 'ytc_'.md5($feed_url).'_'.$instance['cache_time'];
|
557 |
|
558 |
+
if (!empty($_GET['ytc_force_recache']))
|
559 |
+
delete_transient($cache_key);
|
560 |
// get/set transient cache
|
561 |
if ( false === ($json = get_transient($cache_key)) ) {
|
562 |
// no cached JSON, get new
|
568 |
|
569 |
// $json = file_get_contents($feed_url,0,null,null);
|
570 |
// set decoded JSON to transient cache_key
|
571 |
+
set_transient($cache_key, base64_encode($json), $instance['cache_time']);
|
572 |
} else {
|
573 |
// we already have cached feed JSON, get it encoded
|
574 |
+
$json = base64_decode($json);
|
575 |
}
|
576 |
} else {
|
577 |
// just get fresh feed if cache disabled
|