Version Description
(20171001) = * Fix: Default values in dropdown lists does not preselect in TinyMCE shortcode selector * Add: new option for thumbnail quality for TinyMCE shortcode selector
Download this release
Release Info
Developer | urkekg |
Plugin | YouTube Channel |
Version | 3.0.11.3 |
Comparing to | |
See all releases |
Code changes from version 3.0.11.2 to 3.0.11.3
- inc/tinymce/plugin.js +32 -11
- inc/tinymce/plugin.min.js +1 -1
- readme.txt +7 -3
- youtube-channel.php +2 -2
inc/tinymce/plugin.js
CHANGED
@@ -74,11 +74,12 @@
|
|
74 |
label: 'Resource to use',
|
75 |
tooltip: '',
|
76 |
values : [
|
77 |
-
{text: 'Channel (User Uploads)', value: '0'
|
78 |
{text: 'Favourited videos', value: '1'},
|
79 |
{text: 'Liked videos', value: '3'},
|
80 |
{text: 'Playlist', value: '2'},
|
81 |
-
]
|
|
|
82 |
},
|
83 |
{
|
84 |
type: 'listbox',
|
@@ -88,7 +89,7 @@
|
|
88 |
values : [
|
89 |
{text: 'Do not cache', value: '0'},
|
90 |
{text: '1 minute', value: '60'},
|
91 |
-
{text: '5 minutes', value: '300'
|
92 |
{text: '15 minutes', value: '900'},
|
93 |
{text: '30 minutes', value: '1800'},
|
94 |
{text: '1 hour', value: '3600'},
|
@@ -107,7 +108,8 @@
|
|
107 |
{text: '2 weeks', value: '1209600'},
|
108 |
{text: '3 weeks', value: '1814400'},
|
109 |
{text: '1 month', value: '2419200'},
|
110 |
-
]
|
|
|
111 |
},
|
112 |
/*
|
113 |
{
|
@@ -159,9 +161,10 @@
|
|
159 |
label: 'Aspect Ratio',
|
160 |
// tooltip: '',
|
161 |
values : [
|
162 |
-
{text: 'Widescreen (16:9)', value: '3'
|
163 |
{text: 'Standard TV (4:3)', value: '1'},
|
164 |
-
]
|
|
|
165 |
},
|
166 |
{
|
167 |
type: 'checkbox',
|
@@ -188,7 +191,22 @@
|
|
188 |
{text: 'HTML5 (iframe) Asynchronous', value: 'iframe2'},
|
189 |
{text: 'Embedded Playlist', value: 'playlist'},
|
190 |
// {text: 'Gallery', value: 'gallery'},
|
191 |
-
]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
192 |
},
|
193 |
/*
|
194 |
{
|
@@ -274,10 +292,11 @@
|
|
274 |
label: 'Show video title',
|
275 |
tooltip: '',
|
276 |
values : [
|
277 |
-
{text: 'Hide title', value: 'none'
|
278 |
{text: 'Above video/thumbnail', value: 'above'},
|
279 |
{text: 'Below video/thumbnail', value: 'below'},
|
280 |
-
]
|
|
|
281 |
},
|
282 |
{
|
283 |
type: 'checkbox',
|
@@ -317,11 +336,12 @@
|
|
317 |
label: 'Link to',
|
318 |
// tooltip: '',
|
319 |
values : [
|
320 |
-
{text: 'Hide link', value: 'none'
|
321 |
{text: 'Vanity/Custom URL', value: 'vanity'}, // ex 2
|
322 |
{text: 'Channel page URL', value: 'channel'}, // ex 1
|
323 |
{text: 'Legacy username URL', value: 'legacy'}, // ex 0
|
324 |
-
]
|
|
|
325 |
},
|
326 |
{
|
327 |
type: 'textbox',
|
@@ -355,6 +375,7 @@
|
|
355 |
if ( e.data.responsive ) shortcode += ' responsive=1';
|
356 |
if ( e.data.width ) shortcode += ' width=' + e.data.width.replace(/[^0-9.]/g, '') + '';
|
357 |
if ( e.data.display ) shortcode += ' display=' + e.data.display + '';
|
|
|
358 |
// if ( e.data.cols ) shortcode += ' cols=' + e.data.cols + '';
|
359 |
if ( e.data.no_thumb_title ) shortcode += ' no_thumb_title=1';
|
360 |
if ( e.data.themelight ) shortcode += ' themelight=1';
|
74 |
label: 'Resource to use',
|
75 |
tooltip: '',
|
76 |
values : [
|
77 |
+
{text: 'Channel (User Uploads)', value: '0'},
|
78 |
{text: 'Favourited videos', value: '1'},
|
79 |
{text: 'Liked videos', value: '3'},
|
80 |
{text: 'Playlist', value: '2'},
|
81 |
+
],
|
82 |
+
value : '0'
|
83 |
},
|
84 |
{
|
85 |
type: 'listbox',
|
89 |
values : [
|
90 |
{text: 'Do not cache', value: '0'},
|
91 |
{text: '1 minute', value: '60'},
|
92 |
+
{text: '5 minutes', value: '300'},
|
93 |
{text: '15 minutes', value: '900'},
|
94 |
{text: '30 minutes', value: '1800'},
|
95 |
{text: '1 hour', value: '3600'},
|
108 |
{text: '2 weeks', value: '1209600'},
|
109 |
{text: '3 weeks', value: '1814400'},
|
110 |
{text: '1 month', value: '2419200'},
|
111 |
+
],
|
112 |
+
value : '300'
|
113 |
},
|
114 |
/*
|
115 |
{
|
161 |
label: 'Aspect Ratio',
|
162 |
// tooltip: '',
|
163 |
values : [
|
164 |
+
{text: 'Widescreen (16:9)', value: '3'},
|
165 |
{text: 'Standard TV (4:3)', value: '1'},
|
166 |
+
],
|
167 |
+
value : '3'
|
168 |
},
|
169 |
{
|
170 |
type: 'checkbox',
|
191 |
{text: 'HTML5 (iframe) Asynchronous', value: 'iframe2'},
|
192 |
{text: 'Embedded Playlist', value: 'playlist'},
|
193 |
// {text: 'Gallery', value: 'gallery'},
|
194 |
+
],
|
195 |
+
value : 'thumbnail'
|
196 |
+
},
|
197 |
+
{
|
198 |
+
type: 'listbox',
|
199 |
+
name: 'thumb_quality',
|
200 |
+
label: 'Thumbnail Quality',
|
201 |
+
tooltip: '',
|
202 |
+
values : [
|
203 |
+
{text: 'Default Quality (120x90px)', value: 'default'},
|
204 |
+
{text: 'Medium Quality (320x180px)', value: 'mqdefault'},
|
205 |
+
{text: 'High Quality (480x360px)', value: 'hqdefault'},
|
206 |
+
{text: 'Standard Definition (640x480px)', value: 'sddefault'},
|
207 |
+
{text: 'Maximum Resolution (1280x720px)', value: 'maxresdefault'},
|
208 |
+
],
|
209 |
+
value : 'hqdefault'
|
210 |
},
|
211 |
/*
|
212 |
{
|
292 |
label: 'Show video title',
|
293 |
tooltip: '',
|
294 |
values : [
|
295 |
+
{text: 'Hide title', value: 'none'},
|
296 |
{text: 'Above video/thumbnail', value: 'above'},
|
297 |
{text: 'Below video/thumbnail', value: 'below'},
|
298 |
+
],
|
299 |
+
value : 'none'
|
300 |
},
|
301 |
{
|
302 |
type: 'checkbox',
|
336 |
label: 'Link to',
|
337 |
// tooltip: '',
|
338 |
values : [
|
339 |
+
{text: 'Hide link', value: 'none'},
|
340 |
{text: 'Vanity/Custom URL', value: 'vanity'}, // ex 2
|
341 |
{text: 'Channel page URL', value: 'channel'}, // ex 1
|
342 |
{text: 'Legacy username URL', value: 'legacy'}, // ex 0
|
343 |
+
],
|
344 |
+
value : 'none'
|
345 |
},
|
346 |
{
|
347 |
type: 'textbox',
|
375 |
if ( e.data.responsive ) shortcode += ' responsive=1';
|
376 |
if ( e.data.width ) shortcode += ' width=' + e.data.width.replace(/[^0-9.]/g, '') + '';
|
377 |
if ( e.data.display ) shortcode += ' display=' + e.data.display + '';
|
378 |
+
if ( e.data.thumb_quality ) shortcode += ' thumb_quality=' + e.data.thumb_quality + '';
|
379 |
// if ( e.data.cols ) shortcode += ' cols=' + e.data.cols + '';
|
380 |
if ( e.data.no_thumb_title ) shortcode += ' no_thumb_title=1';
|
381 |
if ( e.data.themelight ) shortcode += ' themelight=1';
|
inc/tinymce/plugin.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(){tinymce.PluginManager.add("youtube_channel",function(e){e.addButton("youtube_channel_shortcode",{tooltip:"YouTube Channel",icon:"ytc",onclick:function(){e.windowManager.open({title:"YouTube Channel",bodyType:"tabpanel",buttons:[{text:"Insert Shortcode",onclick:"submit",classes:"widget btn primary",minWidth:130},{text:"Cancel",onclick:"close"}],body:[{title:"General Settings",type:"form",items:[{type:"textbox",name:"class",label:"Custom CSS Class",value:"",tooltip:"Enter custom class for YTC block, if you wish to target block styling"},{type:"textbox",name:"vanity",label:"Vanity/Custom ID",value:""},{type:"textbox",name:"channel",label:"YouTube Channel ID",value:""},{type:"textbox",name:"legacy",label:"Legacy Username",value:""},{type:"textbox",name:"playlist",label:"Playlist ID",value:""},{type:"listbox",name:"resource",label:"Resource to use",tooltip:"",values:[{text:"Channel (User Uploads)",value:"0"
|
1 |
+
!function(){tinymce.PluginManager.add("youtube_channel",function(e,t){e.addButton("youtube_channel_shortcode",{tooltip:"YouTube Channel",icon:"ytc",onclick:function(){e.windowManager.open({title:"YouTube Channel",bodyType:"tabpanel",buttons:[{text:"Insert Shortcode",onclick:"submit",classes:"widget btn primary",minWidth:130},{text:"Cancel",onclick:"close"}],body:[{title:"General Settings",type:"form",items:[{type:"textbox",name:"class",label:"Custom CSS Class",value:"",tooltip:"Enter custom class for YTC block, if you wish to target block styling"},{type:"textbox",name:"vanity",label:"Vanity/Custom ID",value:""},{type:"textbox",name:"channel",label:"YouTube Channel ID",value:""},{type:"textbox",name:"legacy",label:"Legacy Username",value:""},{type:"textbox",name:"playlist",label:"Playlist ID",value:""},{type:"listbox",name:"resource",label:"Resource to use",tooltip:"",values:[{text:"Channel (User Uploads)",value:"0"},{text:"Favourited videos",value:"1"},{text:"Liked videos",value:"3"},{text:"Playlist",value:"2"}],value:"0"},{type:"listbox",name:"cache",label:"Cache feed",tooltip:"",values:[{text:"Do not cache",value:"0"},{text:"1 minute",value:"60"},{text:"5 minutes",value:"300"},{text:"15 minutes",value:"900"},{text:"30 minutes",value:"1800"},{text:"1 hour",value:"3600"},{text:"2 hours",value:"7200"},{text:"5 hours",value:"18000"},{text:"10 hours",value:"36000"},{text:"12 hours",value:"43200"},{text:"18 hours",value:"64800"},{text:"1 day",value:"86400"},{text:"2 days",value:"172800"},{text:"3 days",value:"259200"},{text:"4 days",value:"345600"},{text:"5 days",value:"432000"},{text:"6 days",value:"518400"},{text:"1 week",value:"604800"},{text:"2 weeks",value:"1209600"},{text:"3 weeks",value:"1814400"},{text:"1 month",value:"2419200"}],value:"300"},{type:"textbox",name:"fetch",label:"Fetch",value:"10",tooltip:"Number of videos that will be used for random pick (min 2, max 50, default 25)"},{type:"textbox",name:"num",label:"Show",value:"1",tooltip:"Number of videos to display"},{type:"checkbox",name:"privacy",label:"Use Enhanced Privacy",tooltip:"Enable this option to protect your visitors privacy",checked:!1},{type:"checkbox",name:"random",label:"Random video",tooltip:'Show random video from resource (Have no effect if "Embed as" has been set to "Embedded Playlist")',checked:!1}]},{title:"Video Settings",type:"form",items:[{type:"listbox",name:"ratio",label:"Aspect Ratio",values:[{text:"Widescreen (16:9)",value:"3"},{text:"Standard TV (4:3)",value:"1"}],value:"3"},{type:"checkbox",name:"responsive",label:"Responsive video",tooltip:"Make video responsive (distribute one full width video per row)",checked:!0},{type:"textbox",name:"width",label:"Initial width (px)",value:"306",tooltip:"Set initial width for video or thumbnail (in pixels)"},{type:"listbox",name:"display",label:"Embed as",tooltip:"",values:[{text:"Thumbnail",value:"thumbnail"},{text:"HTML5 (iframe)",value:"iframe"},{text:"HTML5 (iframe) Asynchronous",value:"iframe2"},{text:"Embedded Playlist",value:"playlist"}],value:"thumbnail"},{type:"listbox",name:"thumb_quality",label:"Thumbnail Quality",tooltip:"",values:[{text:"Default Quality (120x90px)",value:"default"},{text:"Medium Quality (320x180px)",value:"mqdefault"},{text:"High Quality (480x360px)",value:"hqdefault"},{text:"Standard Definition (640x480px)",value:"sddefault"},{text:"Maximum Resolution (1280x720px)",value:"maxresdefault"}],value:"hqdefault"},{type:"checkbox",name:"nolightbox",label:"Disable YTC lightbox",tooltip:"This will work only for Thumbnail",checked:!1},{type:"listbox",name:"target",label:"Open thumbnail anchor",tooltip:"If you select Thumbnail and enable Disable lightbox, you can open thumbnail anchor in new window/tab",values:[{text:"Default",value:""},{text:"New window/tab",value:"_blank"}]},{type:"checkbox",name:"no_thumb_title",label:"Hide thumbnail tooltip",checked:!1},{type:"checkbox",name:"themelight",label:"Use light theme",tooltip:"Default theme is dark",checked:!1},{type:"checkbox",name:"controls",label:"Hide player controls",checked:!1},{type:"checkbox",name:"autoplay",label:"Autoplay video/playlist",checked:!1},{type:"checkbox",name:"mute",label:"Mute video on autoplay",checked:!1},{type:"checkbox",name:"norel",label:"Hide related videos",checked:!0},{type:"checkbox",name:"nobrand",label:"Hide YT Logo",tooltip:"Does not work for all videos",checked:!0}]},{title:"Content Layout",type:"form",items:[{type:"listbox",name:"showtitle",label:"Show video title",tooltip:"",values:[{text:"Hide title",value:"none"},{text:"Above video/thumbnail",value:"above"},{text:"Below video/thumbnail",value:"below"}],value:"none"},{type:"checkbox",name:"showdesc",label:"Show video description",checked:!1},{type:"textbox",name:"desclen",label:"Description length",value:"0",tooltip:"Set number of characters to cut down video description to (0 means full length)"},{type:"checkbox",name:"noanno",label:"Hide annotations",checked:!0},{type:"checkbox",name:"noinfo",label:"Hide video info",checked:!0}]},{title:"Link to Channel",type:"form",items:[{type:"listbox",name:"link_to",label:"Link to",values:[{text:"Hide link",value:"none"},{text:"Vanity/Custom URL",value:"vanity"},{text:"Channel page URL",value:"channel"},{text:"Legacy username URL",value:"legacy"}],value:"none"},{type:"textbox",name:"goto_txt",label:"Title for link",value:"Visit our YouTube channel"}]}],onsubmit:function(t){var a="[youtube_channel";t.data.vanity&&(a+=" vanity="+t.data.vanity),t.data.channel&&(a+=" channel="+t.data.channel),t.data.legacy&&(a+=" legacy="+t.data.legacy),t.data.playlist&&(a+=" playlist="+t.data.playlist),t.data.resource&&(a+=" resource="+t.data.resource),t.data.cache&&(a+=" cache="+t.data.cache),t.data.privacy&&(a+=" privacy=1"),t.data.random&&(a+=" random=1"),t.data.fetch&&(a+=" fetch="+t.data.fetch.replace(/[^0-9.]/g,"")),t.data.num&&(a+=" num="+t.data.num.replace(/[^0-9.]/g,"")),t.data.ratio&&(a+=" ratio="+t.data.ratio),t.data.responsive&&(a+=" responsive=1"),t.data.width&&(a+=" width="+t.data.width.replace(/[^0-9.]/g,"")),t.data.display&&(a+=" display="+t.data.display),t.data.thumb_quality&&(a+=" thumb_quality="+t.data.thumb_quality),t.data.no_thumb_title&&(a+=" no_thumb_title=1"),t.data.themelight&&(a+=" themelight=1"),t.data.controls&&(a+=" controls=1"),t.data.autoplay&&(a+=" autoplay=1"),t.data.mute&&(a+=" mute=1"),t.data.norel&&(a+=" norel=1"),t.data.nobrand&&(a+=" nobrand=1"),t.data.nolightbox&&(a+=" nolightbox=1"),t.data.target&&(a+=" target="+t.data.target),t.data.showtitle&&(a+=" showtitle="+t.data.showtitle),t.data.showdesc&&(a+=" showdesc=1"),t.data.desclen&&(a+=" desclen="+t.data.desclen.replace(/[^0-9.]/g,"")),t.data.noanno&&(a+=" noanno=1"),t.data.noinfo&&(a+=" noinfo=1"),t.data.link_to&&(a+=" link_to="+t.data.link_to),t.data.goto_txt&&(a+=' goto_txt="'+t.data.goto_txt+'"'),t.data.class&&(a+=" class="+t.data.class),a+="]",e.insertContent(a)}})}})})}();
|
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.9
|
7 |
-
Stable tag: 3.0.11.
|
8 |
License: GPLv3
|
9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
@@ -26,7 +26,7 @@ For manual set of videos from YouTube check out [Easy YouTube Gallery](https://w
|
|
26 |
* Responsive (one full width video per row) or non responsive
|
27 |
* Preferred aspect ratio relative to width (16:9 and 4:3)
|
28 |
* Custom width for video embeded object (default is 306px)
|
29 |
-
* Enhanced Privacy
|
30 |
* Choose to display video as thumbnail (default), HTML5 (iframe) or HTML5 Asynchronous (iframe2)
|
31 |
* Thumbnail mode opens video in lightbox
|
32 |
* Hide or show video title above/below video wrapped to HTML tag by your choice (h3, h4, h5, span or div)
|
@@ -366,6 +366,10 @@ If you don't wish to pay for enhancements (then you don't care would that be imp
|
|
366 |
|
367 |
== Changelog ==
|
368 |
|
|
|
|
|
|
|
|
|
369 |
= 3.0.11.2 (20171001) =
|
370 |
* (20171001) Fix: Undefined index: option_page in youtube-channel/inc/settings.php on line 1006
|
371 |
* Add: Support for custom thumbnail quality
|
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.9.4
|
7 |
+
Stable tag: 3.0.11.3
|
8 |
License: GPLv3
|
9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
26 |
* Responsive (one full width video per row) or non responsive
|
27 |
* Preferred aspect ratio relative to width (16:9 and 4:3)
|
28 |
* Custom width for video embeded object (default is 306px)
|
29 |
+
* Enhanced Privacy (display mode *HTML5 (IFRAME) Asynchronous* (iframe2) does not support Enhanced Privacy due to YouTube API limitations)
|
30 |
* Choose to display video as thumbnail (default), HTML5 (iframe) or HTML5 Asynchronous (iframe2)
|
31 |
* Thumbnail mode opens video in lightbox
|
32 |
* Hide or show video title above/below video wrapped to HTML tag by your choice (h3, h4, h5, span or div)
|
366 |
|
367 |
== Changelog ==
|
368 |
|
369 |
+
= 3.0.11.3 (20171001) =
|
370 |
+
* Fix: Default values in dropdown lists does not preselect in TinyMCE shortcode selector
|
371 |
+
* Add: new option for thumbnail quality for TinyMCE shortcode selector
|
372 |
+
|
373 |
= 3.0.11.2 (20171001) =
|
374 |
* (20171001) Fix: Undefined index: option_page in youtube-channel/inc/settings.php on line 1006
|
375 |
* Add: Support for custom thumbnail quality
|
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
|
@@ -18,7 +18,7 @@ if ( ! class_exists( 'WPAU_YOUTUBE_CHANNEL' ) ) {
|
|
18 |
class WPAU_YOUTUBE_CHANNEL {
|
19 |
|
20 |
const DB_VER = 20;
|
21 |
-
const VER = '3.0.11.
|
22 |
|
23 |
public $plugin_name = 'YouTube Channel';
|
24 |
public $plugin_slug = 'youtube-channel';
|
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.3
|
7 |
Author: Aleksandar Urošević
|
8 |
Author URI: https://urosevic.net/
|
9 |
Text Domain: youtube-channel
|
18 |
class WPAU_YOUTUBE_CHANNEL {
|
19 |
|
20 |
const DB_VER = 20;
|
21 |
+
const VER = '3.0.11.3';
|
22 |
|
23 |
public $plugin_name = 'YouTube Channel';
|
24 |
public $plugin_slug = 'youtube-channel';
|