Version Description
Download this release
Release Info
Developer | embedplus |
Plugin | YouTube |
Version | 11.9.1 |
Comparing to | |
See all releases |
Code changes from version 11.8.7 to 11.9.1
- images/icon-check.png +0 -0
- images/ss-gdpr-message.png +0 -0
- readme.txt +9 -3
- scripts/jquery.cookie.js +117 -0
- scripts/jquery.cookie.min.js +2 -0
- scripts/ytprefs.js +20 -4
- scripts/ytprefs.min.js +1 -1
- styles/ytprefs.css +47 -0
- styles/ytprefs.min.css +1 -1
- youtube.php +167 -22
images/icon-check.png
ADDED
Binary file
|
images/ss-gdpr-message.png
ADDED
Binary file
|
readme.txt
CHANGED
@@ -4,16 +4,16 @@ Plugin Name: YouTube Embed
|
|
4 |
Tags: youtube gallery, video gallery, youtube channel, youtube live, live stream
|
5 |
Requires at least: 3.6.1
|
6 |
Tested up to: 4.9
|
7 |
-
Stable tag: 11.
|
8 |
License: GPLv3 or later
|
9 |
|
10 |
-
YouTube Embed WordPress Plugin. Embed a responsive video, YouTube channel gallery, playlist gallery, or YouTube.com live stream
|
11 |
|
12 |
== Description ==
|
13 |
|
14 |
**Your WordPress YouTube embed, YouTube gallery (channel and playlist), and even YouTube live stream can be customized in a wide variety of ways with this plugin. Here are a few recently added features:**
|
15 |
|
16 |
-
* Improved GDPR compliance
|
17 |
* YouTube gallery capability (channel and playlist) – The ability to make playlist and channel embeds have a gallery layout. By default, the plugin can generate a grid-based [responsive playlist or channel gallery >>](https://www.embedplus.com/responsive-youtube-playlist-channel-gallery-for-wordpress.aspx). Your visitors can browse through pages of video thumbnails and choose from videos that are pulled from an entire YouTube channel or playlist.
|
18 |
* YouTube gallery auto continuous play - embed a playlist or channel gallery and allow it to play one video after the next without requiring viewers to click a thumbnail
|
19 |
* YouTube Live Stream - Given a link to a YouTube channel, the plugin wizard automatically finds a livestream if one is active in that channel and generates the embed code for you. On the settings page, you can also set defaults of what to automatically display if a live stream is not active at a given moment. For example, you can have your site display a gallery of a channel's entire video library so that users can have something to watch in the meantime. We hope it's a time saver.
|
@@ -148,6 +148,12 @@ You can also start and end each individual video at particular times. Like the a
|
|
148 |
|
149 |
== Changelog ==
|
150 |
|
|
|
|
|
|
|
|
|
|
|
|
|
151 |
= WordPress YouTube Embed 11.8.7 =
|
152 |
* Helps with GDPR compliance by allowing you to choose when YouTube.com's API is loaded
|
153 |
|
4 |
Tags: youtube gallery, video gallery, youtube channel, youtube live, live stream
|
5 |
Requires at least: 3.6.1
|
6 |
Tested up to: 4.9
|
7 |
+
Stable tag: 11.9.1
|
8 |
License: GPLv3 or later
|
9 |
|
10 |
+
YouTube Embed WordPress Plugin. Embed a responsive video, YouTube channel gallery, playlist gallery, or YouTube.com live stream (with GDPR options)
|
11 |
|
12 |
== Description ==
|
13 |
|
14 |
**Your WordPress YouTube embed, YouTube gallery (channel and playlist), and even YouTube live stream can be customized in a wide variety of ways with this plugin. Here are a few recently added features:**
|
15 |
|
16 |
+
* Improved GDPR compliance options: YouTube no cookie, YouTube API restrictions, GDPR consent mode
|
17 |
* YouTube gallery capability (channel and playlist) – The ability to make playlist and channel embeds have a gallery layout. By default, the plugin can generate a grid-based [responsive playlist or channel gallery >>](https://www.embedplus.com/responsive-youtube-playlist-channel-gallery-for-wordpress.aspx). Your visitors can browse through pages of video thumbnails and choose from videos that are pulled from an entire YouTube channel or playlist.
|
18 |
* YouTube gallery auto continuous play - embed a playlist or channel gallery and allow it to play one video after the next without requiring viewers to click a thumbnail
|
19 |
* YouTube Live Stream - Given a link to a YouTube channel, the plugin wizard automatically finds a livestream if one is active in that channel and generates the embed code for you. On the settings page, you can also set defaults of what to automatically display if a live stream is not active at a given moment. For example, you can have your site display a gallery of a channel's entire video library so that users can have something to watch in the meantime. We hope it's a time saver.
|
148 |
|
149 |
== Changelog ==
|
150 |
|
151 |
+
= WordPress YouTube Embed 11.9.1 =
|
152 |
+
Improved GDPR compliance, with new Privacy section containing:
|
153 |
+
* GDPR consent mode
|
154 |
+
* YouTube no cookie
|
155 |
+
* YouTube API loading restrictions
|
156 |
+
|
157 |
= WordPress YouTube Embed 11.8.7 =
|
158 |
* Helps with GDPR compliance by allowing you to choose when YouTube.com's API is loaded
|
159 |
|
scripts/jquery.cookie.js
ADDED
@@ -0,0 +1,117 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*!
|
2 |
+
* jQuery Cookie Plugin v1.4.1
|
3 |
+
* https://github.com/carhartl/jquery-cookie
|
4 |
+
*
|
5 |
+
* Copyright 2013 Klaus Hartl
|
6 |
+
* Released under the MIT license
|
7 |
+
*/
|
8 |
+
(function (factory) {
|
9 |
+
if (typeof define === 'function' && define.amd) {
|
10 |
+
// AMD
|
11 |
+
define(['jquery'], factory);
|
12 |
+
} else if (typeof exports === 'object') {
|
13 |
+
// CommonJS
|
14 |
+
factory(require('jquery'));
|
15 |
+
} else {
|
16 |
+
// Browser globals
|
17 |
+
factory(jQuery);
|
18 |
+
}
|
19 |
+
}(function ($) {
|
20 |
+
|
21 |
+
var pluses = /\+/g;
|
22 |
+
|
23 |
+
function encode(s) {
|
24 |
+
return config.raw ? s : encodeURIComponent(s);
|
25 |
+
}
|
26 |
+
|
27 |
+
function decode(s) {
|
28 |
+
return config.raw ? s : decodeURIComponent(s);
|
29 |
+
}
|
30 |
+
|
31 |
+
function stringifyCookieValue(value) {
|
32 |
+
return encode(config.json ? JSON.stringify(value) : String(value));
|
33 |
+
}
|
34 |
+
|
35 |
+
function parseCookieValue(s) {
|
36 |
+
if (s.indexOf('"') === 0) {
|
37 |
+
// This is a quoted cookie as according to RFC2068, unescape...
|
38 |
+
s = s.slice(1, -1).replace(/\\"/g, '"').replace(/\\\\/g, '\\');
|
39 |
+
}
|
40 |
+
|
41 |
+
try {
|
42 |
+
// Replace server-side written pluses with spaces.
|
43 |
+
// If we can't decode the cookie, ignore it, it's unusable.
|
44 |
+
// If we can't parse the cookie, ignore it, it's unusable.
|
45 |
+
s = decodeURIComponent(s.replace(pluses, ' '));
|
46 |
+
return config.json ? JSON.parse(s) : s;
|
47 |
+
} catch(e) {}
|
48 |
+
}
|
49 |
+
|
50 |
+
function read(s, converter) {
|
51 |
+
var value = config.raw ? s : parseCookieValue(s);
|
52 |
+
return $.isFunction(converter) ? converter(value) : value;
|
53 |
+
}
|
54 |
+
|
55 |
+
var config = $.cookie = function (key, value, options) {
|
56 |
+
|
57 |
+
// Write
|
58 |
+
|
59 |
+
if (value !== undefined && !$.isFunction(value)) {
|
60 |
+
options = $.extend({}, config.defaults, options);
|
61 |
+
|
62 |
+
if (typeof options.expires === 'number') {
|
63 |
+
var days = options.expires, t = options.expires = new Date();
|
64 |
+
t.setTime(+t + days * 864e+5);
|
65 |
+
}
|
66 |
+
|
67 |
+
return (document.cookie = [
|
68 |
+
encode(key), '=', stringifyCookieValue(value),
|
69 |
+
options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE
|
70 |
+
options.path ? '; path=' + options.path : '',
|
71 |
+
options.domain ? '; domain=' + options.domain : '',
|
72 |
+
options.secure ? '; secure' : ''
|
73 |
+
].join(''));
|
74 |
+
}
|
75 |
+
|
76 |
+
// Read
|
77 |
+
|
78 |
+
var result = key ? undefined : {};
|
79 |
+
|
80 |
+
// To prevent the for loop in the first place assign an empty array
|
81 |
+
// in case there are no cookies at all. Also prevents odd result when
|
82 |
+
// calling $.cookie().
|
83 |
+
var cookies = document.cookie ? document.cookie.split('; ') : [];
|
84 |
+
|
85 |
+
for (var i = 0, l = cookies.length; i < l; i++) {
|
86 |
+
var parts = cookies[i].split('=');
|
87 |
+
var name = decode(parts.shift());
|
88 |
+
var cookie = parts.join('=');
|
89 |
+
|
90 |
+
if (key && key === name) {
|
91 |
+
// If second argument (value) is a function it's a converter...
|
92 |
+
result = read(cookie, value);
|
93 |
+
break;
|
94 |
+
}
|
95 |
+
|
96 |
+
// Prevent storing a cookie that we couldn't decode.
|
97 |
+
if (!key && (cookie = read(cookie)) !== undefined) {
|
98 |
+
result[name] = cookie;
|
99 |
+
}
|
100 |
+
}
|
101 |
+
|
102 |
+
return result;
|
103 |
+
};
|
104 |
+
|
105 |
+
config.defaults = {};
|
106 |
+
|
107 |
+
$.removeCookie = function (key, options) {
|
108 |
+
if ($.cookie(key) === undefined) {
|
109 |
+
return false;
|
110 |
+
}
|
111 |
+
|
112 |
+
// Must not alter options, thus extending a fresh object...
|
113 |
+
$.cookie(key, '', $.extend({}, options, { expires: -1 }));
|
114 |
+
return !$.cookie(key);
|
115 |
+
};
|
116 |
+
|
117 |
+
}));
|
scripts/jquery.cookie.min.js
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
1 |
+
/*! jquery.cookie v1.4.1 | MIT */
|
2 |
+
!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof exports?a(require("jquery")):a(jQuery)}(function(a){function b(a){return h.raw?a:encodeURIComponent(a)}function c(a){return h.raw?a:decodeURIComponent(a)}function d(a){return b(h.json?JSON.stringify(a):String(a))}function e(a){0===a.indexOf('"')&&(a=a.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\"));try{return a=decodeURIComponent(a.replace(g," ")),h.json?JSON.parse(a):a}catch(b){}}function f(b,c){var d=h.raw?b:e(b);return a.isFunction(c)?c(d):d}var g=/\+/g,h=a.cookie=function(e,g,i){if(void 0!==g&&!a.isFunction(g)){if(i=a.extend({},h.defaults,i),"number"==typeof i.expires){var j=i.expires,k=i.expires=new Date;k.setTime(+k+864e5*j)}return document.cookie=[b(e),"=",d(g),i.expires?"; expires="+i.expires.toUTCString():"",i.path?"; path="+i.path:"",i.domain?"; domain="+i.domain:"",i.secure?"; secure":""].join("")}for(var l=e?void 0:{},m=document.cookie?document.cookie.split("; "):[],n=0,o=m.length;o>n;n++){var p=m[n].split("="),q=c(p.shift()),r=p.join("=");if(e&&e===q){l=f(r,g);break}e||void 0===(r=f(r))||(l[q]=r)}return l};h.defaults={},a.removeCookie=function(b,c){return void 0===a.cookie(b)?!1:(a.cookie(b,"",a.extend({},c,{expires:-1})),!a.cookie(b))}});
|
scripts/ytprefs.js
CHANGED
@@ -241,7 +241,7 @@
|
|
241 |
$('.epyt-gallery').each(function ()
|
242 |
{
|
243 |
var $container = $(this);
|
244 |
-
var $iframe = $(this).find('iframe').first();
|
245 |
|
246 |
var initSrc = $iframe.attr('src');
|
247 |
if (!initSrc)
|
@@ -249,9 +249,15 @@
|
|
249 |
initSrc = $iframe.data('ep-src');
|
250 |
}
|
251 |
var firstId = $(this).find('.epyt-gallery-list .epyt-gallery-thumb').first().data('videoid');
|
252 |
-
|
253 |
-
|
254 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
255 |
$container.on('click', '.epyt-gallery-list .epyt-gallery-thumb', function ()
|
256 |
{
|
257 |
$container.find('.epyt-gallery-list .epyt-gallery-thumb').removeClass('epyt-current-video');
|
@@ -378,6 +384,16 @@
|
|
378 |
});
|
379 |
|
380 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
381 |
}
|
382 |
};
|
383 |
}
|
241 |
$('.epyt-gallery').each(function ()
|
242 |
{
|
243 |
var $container = $(this);
|
244 |
+
var $iframe = $(this).find('iframe, div.__youtube_prefs_gdpr__').first();
|
245 |
|
246 |
var initSrc = $iframe.attr('src');
|
247 |
if (!initSrc)
|
249 |
initSrc = $iframe.data('ep-src');
|
250 |
}
|
251 |
var firstId = $(this).find('.epyt-gallery-list .epyt-gallery-thumb').first().data('videoid');
|
252 |
+
if (typeof (initSrc) !== 'undefined')
|
253 |
+
{
|
254 |
+
initSrc = initSrc.replace(firstId, 'GALLERYVIDEOID');
|
255 |
+
$iframe.data('ep-gallerysrc', initSrc);
|
256 |
+
}
|
257 |
+
else if ($iframe.hasClass('__youtube_prefs_gdpr__'))
|
258 |
+
{
|
259 |
+
$iframe.data('ep-gallerysrc', '');
|
260 |
+
}
|
261 |
$container.on('click', '.epyt-gallery-list .epyt-gallery-thumb', function ()
|
262 |
{
|
263 |
$container.find('.epyt-gallery-list .epyt-gallery-thumb').removeClass('epyt-current-video');
|
384 |
});
|
385 |
|
386 |
});
|
387 |
+
|
388 |
+
$('button.__youtube_prefs_gdpr__').on('click', function (e)
|
389 |
+
{
|
390 |
+
e.preventDefault();
|
391 |
+
if ($.cookie)
|
392 |
+
{
|
393 |
+
$.cookie("ytprefs_gdpr_consent", '1', {expires: 30, path: '/'});
|
394 |
+
window.top.location.reload();
|
395 |
+
}
|
396 |
+
});
|
397 |
}
|
398 |
};
|
399 |
}
|
scripts/ytprefs.min.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1 |
|
2 |
-
(function(a,b){a._EPYT_=a._EPYT_||{ajaxurl:"/wp-admin/admin-ajax.php",security:"",gallery_scrolloffset:100,eppathtoscripts:"/wp-content/plugins/youtube-embed-plus/scripts/",epresponsiveselector:["iframe.__youtube_prefs_widget__"],epdovol:true,evselector:'iframe.__youtube_prefs__[src], iframe[src*="youtube.com/embed/"], iframe[src*="youtube-nocookie.com/embed/"]',stopMobileBuffer:true,ajax_compat:false,usingdefault:true,ytapi_load:"light"};if(a.location.toString().indexOf("https://")===0){a._EPYT_.ajaxurl=a._EPYT_.ajaxurl.replace("http://","https://")}a._EPYT_.pageLoaded=false;b(a).on("load._EPYT_",function(){a._EPYT_.pageLoaded=true});if(!document.querySelectorAll){document.querySelectorAll=function(d){var f=document,e=f.documentElement.firstChild,c=f.createElement("STYLE");e.appendChild(c);f.__qsaels=[];c.styleSheet.cssText=d+"{x:expression(document.__qsaels.push(this))}";a.scrollBy(0,0);return f.__qsaels}}if(typeof a._EPADashboard_==="undefined"){a._EPADashboard_={initStarted:false,checkCount:0,onPlayerReady:function(f){try{if(typeof _EPYT_.epdovol!=="undefined"&&_EPYT_.epdovol){var d=parseInt(f.target.getIframe().getAttribute("data-vol"));if(!isNaN(d)){if(d===0){f.target.mute()}else{if(f.target.isMuted()){f.target.unMute()}f.target.setVolume(d)}}}var c=parseInt(f.target.getIframe().getAttribute("data-epautoplay"));if(!isNaN(c)&&c===1){f.target.playVideo()}}catch(e){}},onPlayerStateChange:function(f){var e=f.target.getIframe();if(f.data===a.YT.PlayerState.PLAYING&&f.target.ponce!==true&&e.src.indexOf("autoplay=1")===-1){f.target.ponce=true}var c=b(e).closest(".epyt-gallery");if(!c.length){c=b("#"+b(e).data("epytgalleryid"))}if(c.length){var d=c.find(".epyt-pagebutton").first().data("autonext")=="1";if(d&&f.data===a.YT.PlayerState.ENDED){var g=c.find(".epyt-current-video");if(!g.length){g=c.find(".epyt-gallery-thumb").first()}var h=g.find(" ~ .epyt-gallery-thumb").first();if(h.length){h.click()}else{c.find('.epyt-pagebutton.epyt-next[data-pagetoken!=""][data-pagetoken]').first().click()}}}},justid:function(c){return new RegExp("[\\?&]v=([^&#]*)").exec(c)[1]},setupevents:function(d){if(typeof(a.YT)!=="undefined"&&a.YT!==null&&a.YT.loaded){var c=document.getElementById(d);if(!c.epytsetupdone){a._EPADashboard_.log("Setting up YT API events: "+d);c.epytsetupdone=true;return new a.YT.Player(d,{events:{onReady:a._EPADashboard_.onPlayerReady,onStateChange:a._EPADashboard_.onPlayerStateChange}})}}},apiInit:function(){if(typeof(a.YT)!=="undefined"){a._EPADashboard_.initStarted=true;var c=document.querySelectorAll(_EPYT_.evselector);for(var d=0;d<c.length;d++){if(!c[d].hasAttribute("id")){c[d].id="_dytid_"+Math.round(Math.random()*8999+1000)}a._EPADashboard_.setupevents(c[d].id)}}},log:function(d){try{console.log(d)}catch(c){}},doubleCheck:function(){a._EPADashboard_.checkInterval=setInterval(function(){a._EPADashboard_.checkCount++;if(a._EPADashboard_.checkCount>=5||a._EPADashboard_.initStarted){clearInterval(a._EPADashboard_.checkInterval)}else{a._EPADashboard_.apiInit();a._EPADashboard_.log("YT API init check")}},1000)},selectText:function(e){if(document.selection){var c=document.body.createTextRange();c.moveToElementText(e);c.select()}else{if(a.getSelection){var d=a.getSelection();var c=document.createRange();c.selectNode(e);d.removeAllRanges();d.addRange(c)}}},setVidSrc:function(c,d){c.attr("src",d);c.get(0).epytsetupdone=false;a._EPADashboard_.setupevents(c.attr("id"))},loadYTAPI:function(){if(typeof a.YT==="undefined"){if(a._EPYT_.ytapi_load!=="never"&&(a._EPYT_.ytapi_load==="always"||b('iframe[src*="youtube.com/embed/"]').length)){var c=document.createElement("script");c.src="//www.youtube.com/iframe_api";c.type="text/javascript";document.getElementsByTagName("head")[0].appendChild(c)}}else{if(a.YT.loaded){if(a._EPYT_.pageLoaded){a._EPADashboard_.apiInit();a._EPADashboard_.log("YT API available")}else{b(a).on("load._EPYT_",function(){a._EPADashboard_.apiInit();a._EPADashboard_.log("YT API available 2")})}}}},pageReady:function(){b(".epyt-gallery").each(function(){var f=b(this);var e=b(this).find("iframe").first();var c=e.attr("src");if(!c){c=e.data("ep-src")}var d=b(this).find(".epyt-gallery-list .epyt-gallery-thumb").first().data("videoid");c=c.replace(d,"GALLERYVIDEOID");e.data("ep-gallerysrc",c)
|
1 |
|
2 |
+
(function(a,b){a._EPYT_=a._EPYT_||{ajaxurl:"/wp-admin/admin-ajax.php",security:"",gallery_scrolloffset:100,eppathtoscripts:"/wp-content/plugins/youtube-embed-plus/scripts/",epresponsiveselector:["iframe.__youtube_prefs_widget__"],epdovol:true,evselector:'iframe.__youtube_prefs__[src], iframe[src*="youtube.com/embed/"], iframe[src*="youtube-nocookie.com/embed/"]',stopMobileBuffer:true,ajax_compat:false,usingdefault:true,ytapi_load:"light"};if(a.location.toString().indexOf("https://")===0){a._EPYT_.ajaxurl=a._EPYT_.ajaxurl.replace("http://","https://")}a._EPYT_.pageLoaded=false;b(a).on("load._EPYT_",function(){a._EPYT_.pageLoaded=true});if(!document.querySelectorAll){document.querySelectorAll=function(d){var f=document,e=f.documentElement.firstChild,c=f.createElement("STYLE");e.appendChild(c);f.__qsaels=[];c.styleSheet.cssText=d+"{x:expression(document.__qsaels.push(this))}";a.scrollBy(0,0);return f.__qsaels}}if(typeof a._EPADashboard_==="undefined"){a._EPADashboard_={initStarted:false,checkCount:0,onPlayerReady:function(f){try{if(typeof _EPYT_.epdovol!=="undefined"&&_EPYT_.epdovol){var d=parseInt(f.target.getIframe().getAttribute("data-vol"));if(!isNaN(d)){if(d===0){f.target.mute()}else{if(f.target.isMuted()){f.target.unMute()}f.target.setVolume(d)}}}var c=parseInt(f.target.getIframe().getAttribute("data-epautoplay"));if(!isNaN(c)&&c===1){f.target.playVideo()}}catch(e){}},onPlayerStateChange:function(f){var e=f.target.getIframe();if(f.data===a.YT.PlayerState.PLAYING&&f.target.ponce!==true&&e.src.indexOf("autoplay=1")===-1){f.target.ponce=true}var c=b(e).closest(".epyt-gallery");if(!c.length){c=b("#"+b(e).data("epytgalleryid"))}if(c.length){var d=c.find(".epyt-pagebutton").first().data("autonext")=="1";if(d&&f.data===a.YT.PlayerState.ENDED){var g=c.find(".epyt-current-video");if(!g.length){g=c.find(".epyt-gallery-thumb").first()}var h=g.find(" ~ .epyt-gallery-thumb").first();if(h.length){h.click()}else{c.find('.epyt-pagebutton.epyt-next[data-pagetoken!=""][data-pagetoken]').first().click()}}}},justid:function(c){return new RegExp("[\\?&]v=([^&#]*)").exec(c)[1]},setupevents:function(d){if(typeof(a.YT)!=="undefined"&&a.YT!==null&&a.YT.loaded){var c=document.getElementById(d);if(!c.epytsetupdone){a._EPADashboard_.log("Setting up YT API events: "+d);c.epytsetupdone=true;return new a.YT.Player(d,{events:{onReady:a._EPADashboard_.onPlayerReady,onStateChange:a._EPADashboard_.onPlayerStateChange}})}}},apiInit:function(){if(typeof(a.YT)!=="undefined"){a._EPADashboard_.initStarted=true;var c=document.querySelectorAll(_EPYT_.evselector);for(var d=0;d<c.length;d++){if(!c[d].hasAttribute("id")){c[d].id="_dytid_"+Math.round(Math.random()*8999+1000)}a._EPADashboard_.setupevents(c[d].id)}}},log:function(d){try{console.log(d)}catch(c){}},doubleCheck:function(){a._EPADashboard_.checkInterval=setInterval(function(){a._EPADashboard_.checkCount++;if(a._EPADashboard_.checkCount>=5||a._EPADashboard_.initStarted){clearInterval(a._EPADashboard_.checkInterval)}else{a._EPADashboard_.apiInit();a._EPADashboard_.log("YT API init check")}},1000)},selectText:function(e){if(document.selection){var c=document.body.createTextRange();c.moveToElementText(e);c.select()}else{if(a.getSelection){var d=a.getSelection();var c=document.createRange();c.selectNode(e);d.removeAllRanges();d.addRange(c)}}},setVidSrc:function(c,d){c.attr("src",d);c.get(0).epytsetupdone=false;a._EPADashboard_.setupevents(c.attr("id"))},loadYTAPI:function(){if(typeof a.YT==="undefined"){if(a._EPYT_.ytapi_load!=="never"&&(a._EPYT_.ytapi_load==="always"||b('iframe[src*="youtube.com/embed/"]').length)){var c=document.createElement("script");c.src="//www.youtube.com/iframe_api";c.type="text/javascript";document.getElementsByTagName("head")[0].appendChild(c)}}else{if(a.YT.loaded){if(a._EPYT_.pageLoaded){a._EPADashboard_.apiInit();a._EPADashboard_.log("YT API available")}else{b(a).on("load._EPYT_",function(){a._EPADashboard_.apiInit();a._EPADashboard_.log("YT API available 2")})}}}},pageReady:function(){b(".epyt-gallery").each(function(){var f=b(this);var e=b(this).find("iframe, div.__youtube_prefs_gdpr__").first();var c=e.attr("src");if(!c){c=e.data("ep-src")}var d=b(this).find(".epyt-gallery-list .epyt-gallery-thumb").first().data("videoid");if(typeof(c)!=="undefined"){c=c.replace(d,"GALLERYVIDEOID");e.data("ep-gallerysrc",c)}else{if(e.hasClass("__youtube_prefs_gdpr__")){e.data("ep-gallerysrc","")}}f.on("click",".epyt-gallery-list .epyt-gallery-thumb",function(){f.find(".epyt-gallery-list .epyt-gallery-thumb").removeClass("epyt-current-video");b(this).addClass("epyt-current-video");var g=b(this).data("videoid");f.data("currvid",g);var k=e.data("ep-gallerysrc").replace("GALLERYVIDEOID",g);var j=f.find(".epyt-pagebutton").first().data("thumbplay");if(j!=="0"&&j!==0){if(k.indexOf("autoplay")>0){k=k.replace("autoplay=0","autoplay=1")}else{k+="&autoplay=1"}e.addClass("epyt-thumbplay")}var h=Math.max(b("body").scrollTop(),b("html").scrollTop());var i=e.offset().top-parseInt(_EPYT_.gallery_scrolloffset);if(h>i){b("html, body").animate({scrollTop:i},500,function(){a._EPADashboard_.setVidSrc(e,k)})}else{a._EPADashboard_.setVidSrc(e,k)}}).on("keydown",".epyt-gallery-list .epyt-gallery-thumb, .epyt-pagebutton",function(h){var g=h.which;if((g===13)||(g===32)){h.preventDefault();b(this).click()}});f.on("mouseenter",".epyt-gallery-list .epyt-gallery-thumb",function(){b(this).addClass("hover")});f.on("mouseleave",".epyt-gallery-list .epyt-gallery-thumb",function(){b(this).removeClass("hover")});f.on("click",".epyt-pagebutton",function(){var i={action:"my_embedplus_gallery_page",security:_EPYT_.security,options:{playlistId:b(this).data("playlistid"),pageToken:b(this).data("pagetoken"),pageSize:b(this).data("pagesize"),columns:b(this).data("epcolumns"),showTitle:b(this).data("showtitle"),showPaging:b(this).data("showpaging"),autonext:b(this).data("autonext"),hidethumbimg:b(this).data("hidethumbimg"),thumbplay:b(this).data("thumbplay")}};var g=b(this).hasClass("epyt-next");var h=parseInt(f.data("currpage")+"");h+=g?1:-1;f.data("currpage",h);f.find(".epyt-gallery-list").addClass("epyt-loading");b.post(_EPYT_.ajaxurl,i,function(j){f.find(".epyt-gallery-list").html(j);f.find(".epyt-current").each(function(){b(this).text(f.data("currpage"))});f.find('.epyt-gallery-thumb[data-videoid="'+f.data("currvid")+'"]').addClass("epyt-current-video");if(f.find(".epyt-pagebutton").first().data("autonext")=="1"){f.find(".epyt-gallery-thumb").first().click()}}).fail(function(){alert("Sorry, there was an error loading the next page.")}).always(function(){f.find(".epyt-gallery-list").removeClass("epyt-loading");if(f.find(".epyt-pagebutton").first().data("autonext")!="1"){var j=Math.max(b("body").scrollTop(),b("html").scrollTop());var k=f.find(".epyt-gallery-list").offset().top-parseInt(_EPYT_.gallery_scrolloffset);if(j>k){b("html, body").animate({scrollTop:k},500)}}})})});b("button.__youtube_prefs_gdpr__").on("click",function(c){c.preventDefault();if(b.cookie){b.cookie("ytprefs_gdpr_consent","1",{expires:30,path:"/"});a.top.location.reload()}})}}}a.onYouTubeIframeAPIReady=typeof a.onYouTubeIframeAPIReady!=="undefined"?a.onYouTubeIframeAPIReady:function(){if(a._EPYT_.pageLoaded){a._EPADashboard_.apiInit();a._EPADashboard_.log("YT API ready")}else{b(a).on("load._EPYT_",function(){a._EPADashboard_.apiInit();a._EPADashboard_.log("YT API ready 2")})}};a._EPADashboard_.loadYTAPI();if(a._EPYT_.pageLoaded){a._EPADashboard_.doubleCheck()}else{b(a).on("load._EPYT_",function(){a._EPADashboard_.doubleCheck()})}b(document).ready(function(){a._EPADashboard_.pageReady();a._EPADashboard_.loadYTAPI();if(a._EPYT_.ajax_compat){b(a).on("load._EPYT_",function(){b(document).ajaxSuccess(function(d,f,c){if(f&&f.responseText&&f.responseText.indexOf("<iframe ")!==-1){a._EPADashboard_.loadYTAPI();a._EPADashboard_.apiInit();a._EPADashboard_.log("YT API AJAX");a._EPADashboard_.pageReady()}})})}})})(window,jQuery);
|
styles/ytprefs.css
CHANGED
@@ -321,3 +321,50 @@ columns
|
|
321 |
box-shadow: none;
|
322 |
}
|
323 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
321 |
box-shadow: none;
|
322 |
}
|
323 |
|
324 |
+
|
325 |
+
/********* GDPR */
|
326 |
+
body div.__youtube_prefs__.__youtube_prefs_gdpr__ {
|
327 |
+
background-color: #000;
|
328 |
+
background-image: -webkit-linear-gradient(top, #000, #444);
|
329 |
+
background-image: linear-gradient(to bottom, #000, #444);
|
330 |
+
padding: 25px;
|
331 |
+
height: auto;
|
332 |
+
text-align: left;
|
333 |
+
}
|
334 |
+
|
335 |
+
body div.__youtube_prefs__.__youtube_prefs_gdpr__ * {
|
336 |
+
color: #e3e3e3 !important;
|
337 |
+
}
|
338 |
+
|
339 |
+
body div.__youtube_prefs__.__youtube_prefs_gdpr__ a {
|
340 |
+
text-decoration: underline;
|
341 |
+
}
|
342 |
+
|
343 |
+
body div.__youtube_prefs__.__youtube_prefs_gdpr__ button.__youtube_prefs_gdpr__, body div.__youtube_prefs__.__youtube_prefs_gdpr__ button.__youtube_prefs_gdpr__:hover {
|
344 |
+
display: inline-block;
|
345 |
+
padding: 5px 10px;
|
346 |
+
background-color: #E62117 !important;
|
347 |
+
color: #ffffff !important;
|
348 |
+
text-decoration: none !important;
|
349 |
+
border-radius: 3px;
|
350 |
+
font-weight: normal;
|
351 |
+
}
|
352 |
+
|
353 |
+
body div.__youtube_prefs__.__youtube_prefs_gdpr__ button.__youtube_prefs_gdpr__ img {
|
354 |
+
width: 20px !important;
|
355 |
+
height: auto !important;
|
356 |
+
vertical-align: middle !important;
|
357 |
+
padding: 0 6px 3px 0;
|
358 |
+
display: inline-block;
|
359 |
+
background: transparent;
|
360 |
+
-webkit-box-shadow: none;
|
361 |
+
box-shadow: none;
|
362 |
+
margin-left: 8px;
|
363 |
+
}
|
364 |
+
|
365 |
+
body .epyt-gallery-img-gdpr {
|
366 |
+
background-color: #000;
|
367 |
+
background-image: -webkit-linear-gradient(top, #000, #444);
|
368 |
+
background-image: linear-gradient(to bottom, #000, #444);
|
369 |
+
}
|
370 |
+
|
styles/ytprefs.min.css
CHANGED
@@ -1,2 +1,2 @@
|
|
1 |
|
2 |
-
.epyt-debug{cursor:pointer;text-align:left;background-color:#ddd;color:#000}iframe.__youtube_prefs__{border-width:0}.epyt-gallery{text-align:center}.epyt-gallery iframe{margin-bottom:0}.epyt-gallery.epyt-lb iframe{display:none;height:0!important}.epyt-gallery-list{margin:0 -8px 0 -8px;position:relative;transition:opacity ease-out .3s;display:block}.epyt-gallery-list p{display:none}.epyt-gallery-clear{clear:both}.epyt-gallery-list.epyt-loading{opacity:.5;transition:opacity ease-out .3s}.epyt-gallery-thumb{position:relative;box-sizing:border-box;overflow-y:hidden;display:block!important;cursor:pointer;opacity:1;float:left;padding:0 8px 10px 8px}.epyt-gallery-thumb.hover{position:relative;opacity:1;transition:opacity ease-out .3s}.epyt-gallery-img-box{width:100%}.epyt-gallery-img{height:0;width:100%;padding-top:56.25%!important;position:relative;overflow:hidden!important;background-size:cover!important;background-position:center!important}.epyt-gallery-playhover-textonly{position:absolute;top:-10px;left:0;width:100%;height:100%;text-align:center}.epyt-gallery-playhover{opacity:0;position:absolute;top:-10px;left:0;width:100%;height:100%;vertical-align:middle;text-align:center;transition:opacity ease-out .3s}.epyt-gallery-thumb.hover .epyt-gallery-playhover,.epyt-gallery-thumb.epyt-current-video .epyt-gallery-playhover{opacity:1;top:0;transition:all ease-out .3s}.epyt-gallery-thumb .epyt-gallery-playcrutch{display:inline-block;height:100%;vertical-align:middle;width:0}.epyt-gallery-playhover .epyt-play-img{height:auto!important;max-width:15%!important;padding:0!important;margin:0!important;min-width:30px!important;vertical-align:middle!important;display:inline-block!important;width:auto;border:0;box-sizing:border-box}.epyt-gallery-title{font-size:80%;line-height:120%;padding:10px}.epyt-gallery-notitle{padding:4px}.epyt-gallery-notitle span{display:none}.epyt-gallery-rowtitle{text-align:center;width:100%;position:absolute;left:0;top:100%;opacity:0;z-index:10;overflow-x:hidden;text-overflow:ellipsis;white-space:nowrap}.epyt-gallery-rowtitle.hover{opacity:1;transition:opacity linear .2s}.epyt-gallery-rowbreak{clear:both}.epyt-pagination{clear:both;text-align:center;padding:10px 8px 10px 8px}.epyt-pagination.epyt-hide-pagination *{display:none!important}.epyt-pagination>div,.epyt-pagenumbers>div{display:inline-block;padding:0 2px 0 2px;vertical-align:middle}.epyt-pagination .epyt-pagebutton{cursor:pointer;display:inline-block;padding:0 10px 0 10px}.epyt-pagebutton>div{display:inline}.epyt-pagination .epyt-loader{display:none}.epyt-gallery-list.epyt-loading .epyt-pagination .epyt-loader{display:inline-block}body .lity-container{width:100%;max-width:964px}.epyt-curtain .lity-opened iframe{opacity:0;transition:opacity .3s linear .5s}.epyt-gallery-allthumbs.epyt-cols-1 .epyt-gallery-thumb{width:100%}.epyt-gallery-allthumbs.epyt-cols-2 .epyt-gallery-thumb{width:50%}.epyt-gallery-allthumbs.epyt-cols-3 .epyt-gallery-thumb{width:33.333%}.epyt-gallery-allthumbs.epyt-cols-4 .epyt-gallery-thumb{width:25%}.epyt-gallery-allthumbs.epyt-cols-5 .epyt-gallery-thumb{width:20%}.epyt-gallery-allthumbs.epyt-cols-6 .epyt-gallery-thumb{width:16.666%}.epyt-gallery-allthumbs.epyt-cols-7 .epyt-gallery-thumb{width:14.285%}.epyt-gallery-allthumbs.epyt-cols-8 .epyt-gallery-thumb{width:12.5%}.epyt-gallery-allthumbs.epyt-cols-9 .epyt-gallery-thumb{width:11.111%}.epyt-gallery-allthumbs.epyt-cols-10 .epyt-gallery-thumb{width:10%}.epyt-gallery-allthumbs.epyt-cols-11 .epyt-gallery-thumb{width:9.090%}.epyt-gallery-allthumbs.epyt-cols-12 .epyt-gallery-thumb{width:8.333%}.epyt-gallery-allthumbs.epyt-cols-13 .epyt-gallery-thumb{width:7.692%}.epyt-gallery-allthumbs.epyt-cols-14 .epyt-gallery-thumb{width:7.142%}.epyt-gallery-allthumbs.epyt-cols-15 .epyt-gallery-thumb{width:6.666%}.epyt-gallery-allthumbs.epyt-cols-16 .epyt-gallery-thumb{width:6.25%}.epyt-gallery-allthumbs.epyt-cols-17 .epyt-gallery-thumb{width:5.882%}.epyt-gallery-allthumbs.epyt-cols-18 .epyt-gallery-thumb{width:5.555%}.epyt-gallery-allthumbs.epyt-cols-19 .epyt-gallery-thumb{width:5.263%}.epyt-gallery-allthumbs.epyt-cols-20 .epyt-gallery-thumb{width:5%}.epyt-pagebutton.hide,.epyt-pagenumbers.hide{display:none!important;opacity:0!important;visibility:hidden!important}.epyt-gallery-subscribe{text-align:center;padding:15px 0 10px 0;clear:both}.epyt-gallery-subscribe a.epyt-gallery-subbutton,.epyt-gallery-subscribe a.epyt-gallery-subbutton:hover{display:inline-block;padding:5px 10px;background-color:#e62117!important;color:#fff!important;text-decoration:none!important;border-radius:3px}.epyt-gallery-subscribe a.epyt-gallery-subbutton img{width:20px!important;height:auto!important;vertical-align:middle!important;padding:0 6px 3px 0;display:inline-block;background:transparent;-webkit-box-shadow:none;box-shadow:none}
|
1 |
|
2 |
+
.epyt-debug{cursor:pointer;text-align:left;background-color:#ddd;color:#000}iframe.__youtube_prefs__{border-width:0}.epyt-gallery{text-align:center}.epyt-gallery iframe{margin-bottom:0}.epyt-gallery.epyt-lb iframe{display:none;height:0!important}.epyt-gallery-list{margin:0 -8px 0 -8px;position:relative;transition:opacity ease-out .3s;display:block}.epyt-gallery-list p{display:none}.epyt-gallery-clear{clear:both}.epyt-gallery-list.epyt-loading{opacity:.5;transition:opacity ease-out .3s}.epyt-gallery-thumb{position:relative;box-sizing:border-box;overflow-y:hidden;display:block!important;cursor:pointer;opacity:1;float:left;padding:0 8px 10px 8px}.epyt-gallery-thumb.hover{position:relative;opacity:1;transition:opacity ease-out .3s}.epyt-gallery-img-box{width:100%}.epyt-gallery-img{height:0;width:100%;padding-top:56.25%!important;position:relative;overflow:hidden!important;background-size:cover!important;background-position:center!important}.epyt-gallery-playhover-textonly{position:absolute;top:-10px;left:0;width:100%;height:100%;text-align:center}.epyt-gallery-playhover{opacity:0;position:absolute;top:-10px;left:0;width:100%;height:100%;vertical-align:middle;text-align:center;transition:opacity ease-out .3s}.epyt-gallery-thumb.hover .epyt-gallery-playhover,.epyt-gallery-thumb.epyt-current-video .epyt-gallery-playhover{opacity:1;top:0;transition:all ease-out .3s}.epyt-gallery-thumb .epyt-gallery-playcrutch{display:inline-block;height:100%;vertical-align:middle;width:0}.epyt-gallery-playhover .epyt-play-img{height:auto!important;max-width:15%!important;padding:0!important;margin:0!important;min-width:30px!important;vertical-align:middle!important;display:inline-block!important;width:auto;border:0;box-sizing:border-box}.epyt-gallery-title{font-size:80%;line-height:120%;padding:10px}.epyt-gallery-notitle{padding:4px}.epyt-gallery-notitle span{display:none}.epyt-gallery-rowtitle{text-align:center;width:100%;position:absolute;left:0;top:100%;opacity:0;z-index:10;overflow-x:hidden;text-overflow:ellipsis;white-space:nowrap}.epyt-gallery-rowtitle.hover{opacity:1;transition:opacity linear .2s}.epyt-gallery-rowbreak{clear:both}.epyt-pagination{clear:both;text-align:center;padding:10px 8px 10px 8px}.epyt-pagination.epyt-hide-pagination *{display:none!important}.epyt-pagination>div,.epyt-pagenumbers>div{display:inline-block;padding:0 2px 0 2px;vertical-align:middle}.epyt-pagination .epyt-pagebutton{cursor:pointer;display:inline-block;padding:0 10px 0 10px}.epyt-pagebutton>div{display:inline}.epyt-pagination .epyt-loader{display:none}.epyt-gallery-list.epyt-loading .epyt-pagination .epyt-loader{display:inline-block}body .lity-container{width:100%;max-width:964px}.epyt-curtain .lity-opened iframe{opacity:0;transition:opacity .3s linear .5s}.epyt-gallery-allthumbs.epyt-cols-1 .epyt-gallery-thumb{width:100%}.epyt-gallery-allthumbs.epyt-cols-2 .epyt-gallery-thumb{width:50%}.epyt-gallery-allthumbs.epyt-cols-3 .epyt-gallery-thumb{width:33.333%}.epyt-gallery-allthumbs.epyt-cols-4 .epyt-gallery-thumb{width:25%}.epyt-gallery-allthumbs.epyt-cols-5 .epyt-gallery-thumb{width:20%}.epyt-gallery-allthumbs.epyt-cols-6 .epyt-gallery-thumb{width:16.666%}.epyt-gallery-allthumbs.epyt-cols-7 .epyt-gallery-thumb{width:14.285%}.epyt-gallery-allthumbs.epyt-cols-8 .epyt-gallery-thumb{width:12.5%}.epyt-gallery-allthumbs.epyt-cols-9 .epyt-gallery-thumb{width:11.111%}.epyt-gallery-allthumbs.epyt-cols-10 .epyt-gallery-thumb{width:10%}.epyt-gallery-allthumbs.epyt-cols-11 .epyt-gallery-thumb{width:9.090%}.epyt-gallery-allthumbs.epyt-cols-12 .epyt-gallery-thumb{width:8.333%}.epyt-gallery-allthumbs.epyt-cols-13 .epyt-gallery-thumb{width:7.692%}.epyt-gallery-allthumbs.epyt-cols-14 .epyt-gallery-thumb{width:7.142%}.epyt-gallery-allthumbs.epyt-cols-15 .epyt-gallery-thumb{width:6.666%}.epyt-gallery-allthumbs.epyt-cols-16 .epyt-gallery-thumb{width:6.25%}.epyt-gallery-allthumbs.epyt-cols-17 .epyt-gallery-thumb{width:5.882%}.epyt-gallery-allthumbs.epyt-cols-18 .epyt-gallery-thumb{width:5.555%}.epyt-gallery-allthumbs.epyt-cols-19 .epyt-gallery-thumb{width:5.263%}.epyt-gallery-allthumbs.epyt-cols-20 .epyt-gallery-thumb{width:5%}.epyt-pagebutton.hide,.epyt-pagenumbers.hide{display:none!important;opacity:0!important;visibility:hidden!important}.epyt-gallery-subscribe{text-align:center;padding:15px 0 10px 0;clear:both}.epyt-gallery-subscribe a.epyt-gallery-subbutton,.epyt-gallery-subscribe a.epyt-gallery-subbutton:hover{display:inline-block;padding:5px 10px;background-color:#e62117!important;color:#fff!important;text-decoration:none!important;border-radius:3px}.epyt-gallery-subscribe a.epyt-gallery-subbutton img{width:20px!important;height:auto!important;vertical-align:middle!important;padding:0 6px 3px 0;display:inline-block;background:transparent;-webkit-box-shadow:none;box-shadow:none}body div.__youtube_prefs__.__youtube_prefs_gdpr__{background-color:#000;background-image:-webkit-linear-gradient(top,#000,#444);background-image:linear-gradient(to bottom,#000,#444);padding:25px;height:auto;text-align:left}body div.__youtube_prefs__.__youtube_prefs_gdpr__ *{color:#e3e3e3!important}body div.__youtube_prefs__.__youtube_prefs_gdpr__ a{text-decoration:underline}body div.__youtube_prefs__.__youtube_prefs_gdpr__ button.__youtube_prefs_gdpr__,body div.__youtube_prefs__.__youtube_prefs_gdpr__ button.__youtube_prefs_gdpr__:hover{display:inline-block;padding:5px 10px;background-color:#e62117!important;color:#fff!important;text-decoration:none!important;border-radius:3px;font-weight:normal}body div.__youtube_prefs__.__youtube_prefs_gdpr__ button.__youtube_prefs_gdpr__ img{width:20px!important;height:auto!important;vertical-align:middle!important;padding:0 6px 3px 0;display:inline-block;background:transparent;-webkit-box-shadow:none;box-shadow:none;margin-left:8px}body .epyt-gallery-img-gdpr{background-color:#000;background-image:-webkit-linear-gradient(top,#000,#444);background-image:linear-gradient(to bottom,#000,#444)}
|
youtube.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: YouTube
|
4 |
Plugin URI: https://www.embedplus.com/dashboard/pro-easy-video-analytics.aspx
|
5 |
Description: YouTube Embed and YouTube Gallery WordPress Plugin. Embed a responsive video, YouTube channel, playlist gallery, or live stream
|
6 |
-
Version: 11.
|
7 |
Author: EmbedPlus Team
|
8 |
Author URI: https://www.embedplus.com
|
9 |
*/
|
@@ -33,7 +33,7 @@ class YouTubePrefs
|
|
33 |
{
|
34 |
|
35 |
public static $curltimeout = 20;
|
36 |
-
public static $version = '11.
|
37 |
public static $opt_version = 'version';
|
38 |
public static $optembedwidth = null;
|
39 |
public static $optembedheight = null;
|
@@ -61,6 +61,10 @@ class YouTubePrefs
|
|
61 |
public static $opt_dohl = 'dohl';
|
62 |
public static $opt_hl = 'hl';
|
63 |
public static $opt_nocookie = 'nocookie';
|
|
|
|
|
|
|
|
|
64 |
public static $opt_playlistorder = 'playlistorder';
|
65 |
public static $opt_acctitle = 'acctitle';
|
66 |
public static $opt_pro = 'pro';
|
@@ -116,6 +120,7 @@ class YouTubePrefs
|
|
116 |
public static $goodliterals = array('x', 'x', '--', '--', '&', '&', '&');
|
117 |
public static $wizard_hook = '';
|
118 |
public static $get_api_key_msg = 'The ### feature now requires a (free) YouTube API key from Google. Please follow the easy steps <a href="https://www.youtube.com/watch?v=6gD0X76-v_g" target="_blank">in this video</a> to create and save your API key.';
|
|
|
119 |
///////////////////////////////////////////////////////////////////////////////////////////////////
|
120 |
///////////////////////////////////////////////////////////////////////////////////////////////////
|
121 |
///////////////////////////////////////////////////////////////////////////////////////////////////
|
@@ -726,7 +731,7 @@ class YouTubePrefs
|
|
726 |
?>
|
727 |
|
728 |
<div class="wiz-accordion">
|
729 |
-
<h3 class="header-go"
|
730 |
<div class="header-go-content"></div>
|
731 |
<h3 id="h3_video"> <a href="#">Embed a single video.</a></h3>
|
732 |
<div>
|
@@ -1491,7 +1496,7 @@ class YouTubePrefs
|
|
1491 |
?>
|
1492 |
Seems like you have two different YouTube plugins by the EmbedPlus Team installed: <b><img alt="YouTube Icon" src="<?php echo plugins_url('images/youtubeicon16.png', __FILE__) ?>" /> YouTube</b> and <b><img alt="YouTube Icon" src="<?php echo plugins_url('images/btn_embedpluswiz.png', __FILE__) ?>" /> Advanced YouTube Embed.</b> We strongly suggest keeping only the one you prefer, so that they don't conflict with each other while trying to create your embeds.</p>
|
1493 |
</div>
|
1494 |
-
|
1495 |
<script type="text/javascript">
|
1496 |
(function ($)
|
1497 |
{
|
@@ -1609,6 +1614,9 @@ class YouTubePrefs
|
|
1609 |
$_autohide = 2;
|
1610 |
$_pro = '';
|
1611 |
$_nocookie = 0;
|
|
|
|
|
|
|
1612 |
$_playlistorder = 0;
|
1613 |
$_acctitle = 0;
|
1614 |
$_migrate = 0;
|
@@ -1639,7 +1647,7 @@ class YouTubePrefs
|
|
1639 |
$_gallery_collapse_grid = 0;
|
1640 |
$_gallery_collapse_grid_breaks = self::$dft_bpts;
|
1641 |
$_gallery_scrolloffset = 20;
|
1642 |
-
$_gallery_hideprivate =
|
1643 |
$_gallery_showtitle = 1;
|
1644 |
$_gallery_showpaging = 1;
|
1645 |
$_gallery_autonext = 0;
|
@@ -1674,6 +1682,9 @@ class YouTubePrefs
|
|
1674 |
$_autohide = self::tryget($arroptions, self::$opt_autohide, 2);
|
1675 |
$_pro = self::tryget($arroptions, self::$opt_pro, '');
|
1676 |
$_nocookie = self::tryget($arroptions, self::$opt_nocookie, 0);
|
|
|
|
|
|
|
1677 |
$_playlistorder = self::tryget($arroptions, self::$opt_playlistorder, 0);
|
1678 |
$_acctitle = self::tryget($arroptions, self::$opt_acctitle, 0);
|
1679 |
$_migrate = self::tryget($arroptions, self::$opt_migrate, 0);
|
@@ -1705,7 +1716,7 @@ class YouTubePrefs
|
|
1705 |
$_gallery_collapse_grid = self::tryget($arroptions, self::$opt_gallery_collapse_grid, 0);
|
1706 |
$_gallery_collapse_grid_breaks = self::tryget($arroptions, self::$opt_gallery_collapse_grid_breaks, self::$dft_bpts);
|
1707 |
$_gallery_scrolloffset = self::tryget($arroptions, self::$opt_gallery_scrolloffset, 20);
|
1708 |
-
$_gallery_hideprivate = self::tryget($arroptions, self::$opt_gallery_hideprivate,
|
1709 |
$_gallery_showtitle = self::tryget($arroptions, self::$opt_gallery_showtitle, 1);
|
1710 |
$_gallery_showpaging = self::tryget($arroptions, self::$opt_gallery_showpaging, 1);
|
1711 |
$_gallery_autonext = self::tryget($arroptions, self::$opt_gallery_autonext, 0);
|
@@ -1743,6 +1754,9 @@ class YouTubePrefs
|
|
1743 |
self::$opt_autohide => $_autohide,
|
1744 |
self::$opt_pro => $_pro,
|
1745 |
self::$opt_nocookie => $_nocookie,
|
|
|
|
|
|
|
1746 |
self::$opt_playlistorder => $_playlistorder,
|
1747 |
self::$opt_acctitle => $_acctitle,
|
1748 |
self::$opt_migrate => $_migrate,
|
@@ -2133,7 +2147,8 @@ class YouTubePrefs
|
|
2133 |
$code = '';
|
2134 |
$code .= '<div tabindex="0" role="button" data-videoid="' . $escId . '" class="epyt-gallery-thumb">';
|
2135 |
|
2136 |
-
$code .= '<div class="epyt-gallery-img-box"><div class="epyt-gallery-img
|
|
|
2137 |
'<div class="epyt-gallery-playhover"><img alt="play" class="epyt-play-img" width="30" height="23" src="' . plugins_url('images/playhover.png', __FILE__) . '" data-no-lazy="1" data-skipgform_ajax_framebjll="" /><div class="epyt-gallery-playcrutch"></div></div>' .
|
2138 |
'</div></div>';
|
2139 |
|
@@ -2413,6 +2428,17 @@ class YouTubePrefs
|
|
2413 |
}
|
2414 |
}
|
2415 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2416 |
$code = $galleryWrapper1 . $code1 . $finalsrc . $code2 . $galleryCode . $galleryWrapper2;
|
2417 |
//. '<!--' . $m[0] . '-->';
|
2418 |
self::$defaultheight = null;
|
@@ -2422,6 +2448,11 @@ class YouTubePrefs
|
|
2422 |
return $code;
|
2423 |
}
|
2424 |
|
|
|
|
|
|
|
|
|
|
|
2425 |
public static function debuglog($str)
|
2426 |
{
|
2427 |
$handle = fopen(__DIR__ . "\\debug.txt", "a+");
|
@@ -2684,12 +2715,12 @@ class YouTubePrefs
|
|
2684 |
if (!(self::$alloptions[self::$opt_pro] && strlen(trim(self::$alloptions[self::$opt_pro])) > 0))
|
2685 |
{
|
2686 |
//$new_pointer_content .= __("This version updates the API key instructions and simplifies channel embedding for both Free and <a target=_blank href=" . self::$epbase . '/dashboard/pro-easy-video-analytics.aspx?ref=frompointer' . ">Pro versions »</a>");
|
2687 |
-
$new_pointer_content .= __("This version
|
2688 |
}
|
2689 |
else
|
2690 |
{
|
2691 |
//$new_pointer_content .= __("This version updates the API key instructions and simplifies channel embedding for both Free and and Pro versions. " . '<strong>Important message to YouTube Pro users</strong>: From version 11.7 onward, you must <a href="https://www.embedplus.com/youtube-pro/download/?prokey=' . esc_attr(self::$alloptions[self::$opt_pro]) . '" target="_blank">download the separate plugin here</a> to regain your Pro features. All your settings will automatically migrate after installing the separate Pro download. Thank you for your support and patience during this transition.');
|
2692 |
-
$new_pointer_content .= __("This version
|
2693 |
}
|
2694 |
$new_pointer_content .= '</p>';
|
2695 |
|
@@ -2755,6 +2786,7 @@ class YouTubePrefs
|
|
2755 |
$new_options[self::$opt_theme] = self::postchecked(self::$opt_theme) ? 'dark' : 'light';
|
2756 |
$new_options[self::$opt_color] = self::postchecked(self::$opt_color) ? 'red' : 'white';
|
2757 |
$new_options[self::$opt_nocookie] = self::postchecked(self::$opt_nocookie) ? 1 : 0;
|
|
|
2758 |
$new_options[self::$opt_playlistorder] = self::postchecked(self::$opt_playlistorder) ? 1 : 0;
|
2759 |
$new_options[self::$opt_acctitle] = self::postchecked(self::$opt_acctitle) ? 1 : 0;
|
2760 |
$new_options[self::$opt_migrate] = self::postchecked(self::$opt_migrate) ? 1 : 0;
|
@@ -2780,6 +2812,28 @@ class YouTubePrefs
|
|
2780 |
$new_options[self::$opt_gallery_collapse_grid] = self::postchecked(self::$opt_gallery_collapse_grid) ? 1 : 0;
|
2781 |
|
2782 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2783 |
$_ytapi_load = 'light';
|
2784 |
try
|
2785 |
{
|
@@ -2995,7 +3049,7 @@ class YouTubePrefs
|
|
2995 |
|
2996 |
<style type="text/css">
|
2997 |
.wrap {font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",Arial,sans-serif; color: #000000;}
|
2998 |
-
#ytform p { line-height: 20px; margin
|
2999 |
.ytindent {padding: 0px 0px 0px 20px; font-size: 13px;}
|
3000 |
.ytindent ul, .ytindent p {font-size: 13px;}
|
3001 |
.shadow {-webkit-box-shadow: 0px 0px 20px 0px #000000; box-shadow: 0px 0px 20px 0px #000000;}
|
@@ -3008,6 +3062,7 @@ class YouTubePrefs
|
|
3008 |
.orange {color: #f85d00;}
|
3009 |
.bold {font-weight: bold;}
|
3010 |
.grey{color: #888888;}
|
|
|
3011 |
#goprobox {border-radius: 15px; padding: 10px 15px 15px 15px; margin-top: 15px; border: 3px solid #CCE5EC; position: relative;}
|
3012 |
#nonprosupport {border-radius: 15px; padding: 10px 15px 20px 15px; border: 3px solid #ff6655;}
|
3013 |
.pronon {font-weight: bold; color: #f85d00;}
|
@@ -3044,6 +3099,7 @@ class YouTubePrefs
|
|
3044 |
#box_restrict_wizard {padding: 0px 10px; <?php echo isset($all[self::$opt_restrict_wizard]) && $all[self::$opt_restrict_wizard] ? 'display: block;' : 'display: none;' ?>}
|
3045 |
#box_restrict_wizard label {display: block; margin: 5px 10px;}
|
3046 |
.textinput {border-width: 2px !important;}
|
|
|
3047 |
h3.sect {border-radius: 10px; background-color: #D9E9F7; padding: 5px 5px 5px 10px; position: relative; font-weight: bold;}
|
3048 |
h3.sect a {text-decoration: none; color: #E20000;}
|
3049 |
h3.sect a.button-primary {color: #ffffff;}
|
@@ -3052,6 +3108,7 @@ class YouTubePrefs
|
|
3052 |
.ytnav {margin-bottom: 15px;}
|
3053 |
.ytnav a {font-weight: bold; display: inline-block; padding: 5px 10px; margin: 0px 15px 0px 0px; border: 1px solid #cccccc; border-radius: 6px;
|
3054 |
text-decoration: none; background-color: #ffffff;}
|
|
|
3055 |
.ytnav a:last-child {margin-right: 0;}
|
3056 |
.jumper {height: 25px;}
|
3057 |
.ssschema {float: right; width: 350px; height: auto; margin-right: 10px;}
|
@@ -3074,7 +3131,7 @@ class YouTubePrefs
|
|
3074 |
.apikey-msg {display: inline-block; width: 45%; vertical-align: top;}
|
3075 |
.apikey-video{margin-left: 3%; display: inline-block; width: 50%; position: relative; padding-top: 29%}
|
3076 |
.apikey-video iframe{display: block; width: 100%; height: 100%; position: absolute; top: 0; left: 0;}
|
3077 |
-
#boxnocookie {display: inline-block; border-radius: 3px; padding: 2px 4px 2px 4px; color: red;
|
3078 |
.strike {text-decoration: line-through;}
|
3079 |
.upgchecks { padding: 20px; border-radius: 15px; border: 1px dotted #777777; background-color: #fcfcfc; }
|
3080 |
.clearboth {clear: both;}
|
@@ -3092,6 +3149,27 @@ class YouTubePrefs
|
|
3092 |
-moz-box-shadow: 0px 0px 10px 0px rgba(0,0,0,0.75);
|
3093 |
box-shadow: 0px 0px 10px 0px rgba(0,0,0,0.75); }
|
3094 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3095 |
</style>
|
3096 |
|
3097 |
<div class="ytindent">
|
@@ -3102,6 +3180,7 @@ class YouTubePrefs
|
|
3102 |
<a href="#jumpwiz">Visual Wizard</a>
|
3103 |
<a href="#jumpcompat">Compatibility</a>
|
3104 |
<a href="#jumpgallery">Galleries</a>
|
|
|
3105 |
<a target="_blank" href="<?php echo self::$epbase . "/dashboard/pro-easy-video-analytics.aspx?ref=protab" ?>" style="border-color: #888888;">Upgrade?</a>
|
3106 |
<a href="#jumphowto">Embed Manually</a>
|
3107 |
<a href="#jumpsupport">Support</a>
|
@@ -3244,15 +3323,6 @@ class YouTubePrefs
|
|
3244 |
Add site origin information with each embed code as an extra security measure. In YouTube's/Google's own words, checking this option "protects against malicious third-party JavaScript being injected into your page and hijacking control of your YouTube player." We especially recommend checking it as it adds higher security than the built-in YouTube embedding method that comes with the current version of WordPress (i.e. oembed).
|
3245 |
</label>
|
3246 |
</p>
|
3247 |
-
<p>
|
3248 |
-
<input name="<?php echo self::$opt_nocookie; ?>" id="<?php echo self::$opt_nocookie; ?>" <?php checked($all[self::$opt_nocookie], 1); ?> type="checkbox" class="checkbox">
|
3249 |
-
<label for="<?php echo self::$opt_nocookie; ?>">
|
3250 |
-
<b class="chktitle">No Cookies:</b> Prevent YouTube from leaving tracking cookies on your visitors browsers unless they actual play the videos. This is coded to apply this behavior on links in your past post as well. <b>NOTE: Research shows that YouTube's support of Do Not Track can be error-prone. </b>
|
3251 |
-
<span id="boxnocookie">
|
3252 |
-
You may have issues with this option if you are planning to embed galleries and playlists on your site. Furthermore, videos on mobile devices may have problems if you leave this checked.
|
3253 |
-
</span>
|
3254 |
-
</label>
|
3255 |
-
</p>
|
3256 |
<p>
|
3257 |
<input name="<?php echo self::$opt_controls; ?>" id="<?php echo self::$opt_controls; ?>" <?php checked($all[self::$opt_controls], 2); ?> type="checkbox" class="checkbox">
|
3258 |
<label for="<?php echo self::$opt_controls; ?>"><b class="chktitle">Show Controls:</b> Show the player's control bar. Unchecking this option creates a cleaner look but limits what your viewers can control (play position, volume, etc.).</label>
|
@@ -3317,7 +3387,7 @@ class YouTubePrefs
|
|
3317 |
you can click to directly embed the desired video link to your post without having to copy and paste.
|
3318 |
</p>
|
3319 |
<p>
|
3320 |
-
<
|
3321 |
<br>
|
3322 |
<br>
|
3323 |
<a href="<?php echo self::$epbase ?>/dashboard/pro-easy-video-analytics.aspx" target="_blank" style="text-decoration: none;"><img style="width: 500px; margin: 0 auto; display: block;" src="<?php echo plugins_url('images/ssprowizard.png', __FILE__) ?>" ></a>
|
@@ -3617,7 +3687,7 @@ class YouTubePrefs
|
|
3617 |
<b class="chktitle">Show Subscribe Button: </b> Are you the channel owner for all your galleries? Check this box to add a "Subscribe" button to all your galleries as shown below. This might help you convert your site's visitors to YouTube subscribers of your channel.
|
3618 |
</label>
|
3619 |
<span id="boxchannelsub">
|
3620 |
-
Channel URL: <input type="text" placeholder="https://www.youtube.com/user/YourChannel" name="<?php echo self::$opt_gallery_channelsublink; ?>" id="<?php echo self::$opt_gallery_channelsublink; ?>" value="<?php echo esc_url(trim($all[self::$opt_gallery_channelsublink])); ?>" class="textinput" style="width: 200px;">
|
3621 |
Button text: <input type="text" name="<?php echo self::$opt_gallery_channelsubtext; ?>" id="<?php echo self::$opt_gallery_channelsubtext; ?>" value="<?php echo esc_attr(trim($all[self::$opt_gallery_channelsubtext])); ?>" class="textinput" style="width: 200px;">
|
3622 |
</span>
|
3623 |
</p>
|
@@ -3661,6 +3731,74 @@ class YouTubePrefs
|
|
3661 |
</div>
|
3662 |
|
3663 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3664 |
<div class="jumper" id="jumphowto"></div>
|
3665 |
<h3 class="sect">
|
3666 |
Manually Embed a YouTube Video or Playlist <a class="smallnote" href="#jumpgallery">(For gallery directions, go here »)</a>
|
@@ -3848,6 +3986,7 @@ class YouTubePrefs
|
|
3848 |
<a href="#jumpwiz">Visual Wizard</a>
|
3849 |
<a href="#jumpcompat">Compatibility</a>
|
3850 |
<a href="#jumpgallery">Galleries</a>
|
|
|
3851 |
<a target="_blank" href="<?php echo self::$epbase . "/dashboard/pro-easy-video-analytics.aspx?ref=protab" ?>" style="border-color: #888888;">Upgrade?</a>
|
3852 |
<a href="#jumphowto">Embed Manually</a>
|
3853 |
<a href="#jumpsupport">Support</a>
|
@@ -4154,6 +4293,12 @@ class YouTubePrefs
|
|
4154 |
// }
|
4155 |
wp_localize_script('__ytprefs__', '_EPYT_', $my_script_vars);
|
4156 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
4157 |
|
4158 |
////////////////////// cloudflare accomodation
|
4159 |
//add_filter('script_loader_tag', array(get_class(), 'set_cfasync'), 10, 3);
|
3 |
Plugin Name: YouTube
|
4 |
Plugin URI: https://www.embedplus.com/dashboard/pro-easy-video-analytics.aspx
|
5 |
Description: YouTube Embed and YouTube Gallery WordPress Plugin. Embed a responsive video, YouTube channel, playlist gallery, or live stream
|
6 |
+
Version: 11.9.1
|
7 |
Author: EmbedPlus Team
|
8 |
Author URI: https://www.embedplus.com
|
9 |
*/
|
33 |
{
|
34 |
|
35 |
public static $curltimeout = 20;
|
36 |
+
public static $version = '11.9.1';
|
37 |
public static $opt_version = 'version';
|
38 |
public static $optembedwidth = null;
|
39 |
public static $optembedheight = null;
|
61 |
public static $opt_dohl = 'dohl';
|
62 |
public static $opt_hl = 'hl';
|
63 |
public static $opt_nocookie = 'nocookie';
|
64 |
+
public static $opt_gdpr_consent = 'gdpr_consent';
|
65 |
+
public static $opt_gdpr_consent_message = 'gdpr_consent_message';
|
66 |
+
public static $opt_gdpr_consent_button = 'gdpr_consent_button';
|
67 |
+
public static $gdpr_cookie_name = 'ytprefs_gdpr_consent';
|
68 |
public static $opt_playlistorder = 'playlistorder';
|
69 |
public static $opt_acctitle = 'acctitle';
|
70 |
public static $opt_pro = 'pro';
|
120 |
public static $goodliterals = array('x', 'x', '--', '--', '&', '&', '&');
|
121 |
public static $wizard_hook = '';
|
122 |
public static $get_api_key_msg = 'The ### feature now requires a (free) YouTube API key from Google. Please follow the easy steps <a href="https://www.youtube.com/watch?v=6gD0X76-v_g" target="_blank">in this video</a> to create and save your API key.';
|
123 |
+
public static $dft_gdpr_consent_message = '<p><strong>Please accept YouTube cookies to play this video.</strong> By accepting you will be accessing content from YouTube, a service provided by an external third party.</p><p><a href="https://policies.google.com/privacy" target="_blank">YouTube privacy policy</a></p><p>If you accept this notice, your choice will be saved and the page will refresh.</p>';
|
124 |
///////////////////////////////////////////////////////////////////////////////////////////////////
|
125 |
///////////////////////////////////////////////////////////////////////////////////////////////////
|
126 |
///////////////////////////////////////////////////////////////////////////////////////////////////
|
731 |
?>
|
732 |
|
733 |
<div class="wiz-accordion">
|
734 |
+
<h3 class="header-go"> <a href="<?php echo admin_url('admin.php?page=youtube-my-preferences#jumpdefaults'); ?>">Check my general YouTube embedding instructions and settings. </a></h3>
|
735 |
<div class="header-go-content"></div>
|
736 |
<h3 id="h3_video"> <a href="#">Embed a single video.</a></h3>
|
737 |
<div>
|
1496 |
?>
|
1497 |
Seems like you have two different YouTube plugins by the EmbedPlus Team installed: <b><img alt="YouTube Icon" src="<?php echo plugins_url('images/youtubeicon16.png', __FILE__) ?>" /> YouTube</b> and <b><img alt="YouTube Icon" src="<?php echo plugins_url('images/btn_embedpluswiz.png', __FILE__) ?>" /> Advanced YouTube Embed.</b> We strongly suggest keeping only the one you prefer, so that they don't conflict with each other while trying to create your embeds.</p>
|
1498 |
</div>
|
1499 |
+
|
1500 |
<script type="text/javascript">
|
1501 |
(function ($)
|
1502 |
{
|
1614 |
$_autohide = 2;
|
1615 |
$_pro = '';
|
1616 |
$_nocookie = 0;
|
1617 |
+
$_gdpr_consent = 0;
|
1618 |
+
$_gdpr_consent_message = self::$dft_gdpr_consent_message;
|
1619 |
+
$_gdpr_consent_button = 'Accept YouTube Content';
|
1620 |
$_playlistorder = 0;
|
1621 |
$_acctitle = 0;
|
1622 |
$_migrate = 0;
|
1647 |
$_gallery_collapse_grid = 0;
|
1648 |
$_gallery_collapse_grid_breaks = self::$dft_bpts;
|
1649 |
$_gallery_scrolloffset = 20;
|
1650 |
+
$_gallery_hideprivate = 1;
|
1651 |
$_gallery_showtitle = 1;
|
1652 |
$_gallery_showpaging = 1;
|
1653 |
$_gallery_autonext = 0;
|
1682 |
$_autohide = self::tryget($arroptions, self::$opt_autohide, 2);
|
1683 |
$_pro = self::tryget($arroptions, self::$opt_pro, '');
|
1684 |
$_nocookie = self::tryget($arroptions, self::$opt_nocookie, 0);
|
1685 |
+
$_gdpr_consent = self::tryget($arroptions, self::$opt_gdpr_consent, $_gdpr_consent);
|
1686 |
+
$_gdpr_consent_message = self::tryget($arroptions, self::$opt_gdpr_consent_message, $_gdpr_consent_message);
|
1687 |
+
$_gdpr_consent_button = self::tryget($arroptions, self::$opt_gdpr_consent_button, $_gdpr_consent_button);
|
1688 |
$_playlistorder = self::tryget($arroptions, self::$opt_playlistorder, 0);
|
1689 |
$_acctitle = self::tryget($arroptions, self::$opt_acctitle, 0);
|
1690 |
$_migrate = self::tryget($arroptions, self::$opt_migrate, 0);
|
1716 |
$_gallery_collapse_grid = self::tryget($arroptions, self::$opt_gallery_collapse_grid, 0);
|
1717 |
$_gallery_collapse_grid_breaks = self::tryget($arroptions, self::$opt_gallery_collapse_grid_breaks, self::$dft_bpts);
|
1718 |
$_gallery_scrolloffset = self::tryget($arroptions, self::$opt_gallery_scrolloffset, 20);
|
1719 |
+
$_gallery_hideprivate = self::tryget($arroptions, self::$opt_gallery_hideprivate, $_gallery_hideprivate);
|
1720 |
$_gallery_showtitle = self::tryget($arroptions, self::$opt_gallery_showtitle, 1);
|
1721 |
$_gallery_showpaging = self::tryget($arroptions, self::$opt_gallery_showpaging, 1);
|
1722 |
$_gallery_autonext = self::tryget($arroptions, self::$opt_gallery_autonext, 0);
|
1754 |
self::$opt_autohide => $_autohide,
|
1755 |
self::$opt_pro => $_pro,
|
1756 |
self::$opt_nocookie => $_nocookie,
|
1757 |
+
self::$opt_gdpr_consent => $_gdpr_consent,
|
1758 |
+
self::$opt_gdpr_consent_message => $_gdpr_consent_message,
|
1759 |
+
self::$opt_gdpr_consent_button => $_gdpr_consent_button,
|
1760 |
self::$opt_playlistorder => $_playlistorder,
|
1761 |
self::$opt_acctitle => $_acctitle,
|
1762 |
self::$opt_migrate => $_migrate,
|
2147 |
$code = '';
|
2148 |
$code .= '<div tabindex="0" role="button" data-videoid="' . $escId . '" class="epyt-gallery-thumb">';
|
2149 |
|
2150 |
+
$code .= (self::gdpr_mode() ? '<div class="epyt-gallery-img-box"><div class="epyt-gallery-img epyt-gallery-img-gdpr">' :
|
2151 |
+
'<div class="epyt-gallery-img-box"><div class="epyt-gallery-img" style="background-image: url(' . esc_attr($thumb->img) . ')">') .
|
2152 |
'<div class="epyt-gallery-playhover"><img alt="play" class="epyt-play-img" width="30" height="23" src="' . plugins_url('images/playhover.png', __FILE__) . '" data-no-lazy="1" data-skipgform_ajax_framebjll="" /><div class="epyt-gallery-playcrutch"></div></div>' .
|
2153 |
'</div></div>';
|
2154 |
|
2428 |
}
|
2429 |
}
|
2430 |
|
2431 |
+
if (self::gdpr_mode())
|
2432 |
+
{
|
2433 |
+
$code1 = '<div ' . $centercode . ' id="_ytid_' . rand(10000, 99999) . '" width="' . self::$defaultwidth . '" height="' . self::$defaultheight . '" ';
|
2434 |
+
$code2 = ' class="__youtube_prefs__ __youtube_prefs_gdpr__ ' . ($iscontent ? '' : ' __youtube_prefs_widget__') . '" allowfullscreen data-no-lazy="1" data-skipgform_ajax_framebjll="">' .
|
2435 |
+
apply_filters('the_content', wp_kses_post(self::$alloptions[self::$opt_gdpr_consent_message])) .
|
2436 |
+
'<button type="button" class="__youtube_prefs_gdpr__">' . trim(sanitize_text_field(self::$alloptions[self::$opt_gdpr_consent_button])) .
|
2437 |
+
'<img src="' . plugins_url('images/icon-check.png', __FILE__) . '" alt="accept" data-no-lazy="1" data-skipgform_ajax_framebjll="" /></button>' .
|
2438 |
+
'</div>';
|
2439 |
+
$finalsrc = '';
|
2440 |
+
}
|
2441 |
+
|
2442 |
$code = $galleryWrapper1 . $code1 . $finalsrc . $code2 . $galleryCode . $galleryWrapper2;
|
2443 |
//. '<!--' . $m[0] . '-->';
|
2444 |
self::$defaultheight = null;
|
2448 |
return $code;
|
2449 |
}
|
2450 |
|
2451 |
+
public static function gdpr_mode()
|
2452 |
+
{
|
2453 |
+
return (bool) self::$alloptions[self::$opt_gdpr_consent] && filter_input(INPUT_COOKIE, self::$gdpr_cookie_name, FILTER_SANITIZE_NUMBER_INT) != 1;
|
2454 |
+
}
|
2455 |
+
|
2456 |
public static function debuglog($str)
|
2457 |
{
|
2458 |
$handle = fopen(__DIR__ . "\\debug.txt", "a+");
|
2715 |
if (!(self::$alloptions[self::$opt_pro] && strlen(trim(self::$alloptions[self::$opt_pro])) > 0))
|
2716 |
{
|
2717 |
//$new_pointer_content .= __("This version updates the API key instructions and simplifies channel embedding for both Free and <a target=_blank href=" . self::$epbase . '/dashboard/pro-easy-video-analytics.aspx?ref=frompointer' . ">Pro versions »</a>");
|
2718 |
+
$new_pointer_content .= __("This version adds a new Privacy section with improved GDPR compliance options: YouTube API restrictions, GDPR consent mode, and YouTube no cookie, for both Free and <a target=_blank href=" . self::$epbase . '/dashboard/pro-easy-video-analytics.aspx?ref=frompointer' . ">Pro versions »</a>.");
|
2719 |
}
|
2720 |
else
|
2721 |
{
|
2722 |
//$new_pointer_content .= __("This version updates the API key instructions and simplifies channel embedding for both Free and and Pro versions. " . '<strong>Important message to YouTube Pro users</strong>: From version 11.7 onward, you must <a href="https://www.embedplus.com/youtube-pro/download/?prokey=' . esc_attr(self::$alloptions[self::$opt_pro]) . '" target="_blank">download the separate plugin here</a> to regain your Pro features. All your settings will automatically migrate after installing the separate Pro download. Thank you for your support and patience during this transition.');
|
2723 |
+
$new_pointer_content .= __("This version adds a new Privacy section with improved GDPR compliance options: YouTube API restrictions, GDPR consent mode, and YouTube no cookie, for both Free and <a target=_blank href=" . self::$epbase . '/dashboard/pro-easy-video-analytics.aspx?ref=frompointer' . ">Pro versions »</a> (see <em>Compatibility</em> section). " . '<strong>Important message to YouTube Pro users</strong>: From version 11.7 onward, you must <a href="https://www.embedplus.com/youtube-pro/download/?prokey=' . esc_attr(self::$alloptions[self::$opt_pro]) . '" target="_blank">download the separate plugin here</a> to regain your Pro features. All your settings will automatically migrate after installing the separate Pro download. Thank you for your support and patience during this transition.');
|
2724 |
}
|
2725 |
$new_pointer_content .= '</p>';
|
2726 |
|
2786 |
$new_options[self::$opt_theme] = self::postchecked(self::$opt_theme) ? 'dark' : 'light';
|
2787 |
$new_options[self::$opt_color] = self::postchecked(self::$opt_color) ? 'red' : 'white';
|
2788 |
$new_options[self::$opt_nocookie] = self::postchecked(self::$opt_nocookie) ? 1 : 0;
|
2789 |
+
$new_options[self::$opt_gdpr_consent] = self::postchecked(self::$opt_gdpr_consent) ? 1 : 0;
|
2790 |
$new_options[self::$opt_playlistorder] = self::postchecked(self::$opt_playlistorder) ? 1 : 0;
|
2791 |
$new_options[self::$opt_acctitle] = self::postchecked(self::$opt_acctitle) ? 1 : 0;
|
2792 |
$new_options[self::$opt_migrate] = self::postchecked(self::$opt_migrate) ? 1 : 0;
|
2812 |
$new_options[self::$opt_gallery_collapse_grid] = self::postchecked(self::$opt_gallery_collapse_grid) ? 1 : 0;
|
2813 |
|
2814 |
|
2815 |
+
$_gdpr_consent_message = '';
|
2816 |
+
try
|
2817 |
+
{
|
2818 |
+
$_gdpr_consent_message = wp_kses_post(stripslashes($_POST[self::$opt_gdpr_consent_message]));
|
2819 |
+
}
|
2820 |
+
catch (Exception $ex)
|
2821 |
+
{
|
2822 |
+
$_gdpr_consent_message = '';
|
2823 |
+
}
|
2824 |
+
$new_options[self::$opt_gdpr_consent_message] = $_gdpr_consent_message;
|
2825 |
+
|
2826 |
+
$_gdpr_consent_button = '';
|
2827 |
+
try
|
2828 |
+
{
|
2829 |
+
$_gdpr_consent_button = wp_kses_post(stripslashes($_POST[self::$opt_gdpr_consent_button]));
|
2830 |
+
}
|
2831 |
+
catch (Exception $ex)
|
2832 |
+
{
|
2833 |
+
$_gdpr_consent_button = '';
|
2834 |
+
}
|
2835 |
+
$new_options[self::$opt_gdpr_consent_button] = $_gdpr_consent_button;
|
2836 |
+
|
2837 |
$_ytapi_load = 'light';
|
2838 |
try
|
2839 |
{
|
3049 |
|
3050 |
<style type="text/css">
|
3051 |
.wrap {font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",Arial,sans-serif; color: #000000;}
|
3052 |
+
#ytform p { line-height: 20px; margin: 18px 0; }
|
3053 |
.ytindent {padding: 0px 0px 0px 20px; font-size: 13px;}
|
3054 |
.ytindent ul, .ytindent p {font-size: 13px;}
|
3055 |
.shadow {-webkit-box-shadow: 0px 0px 20px 0px #000000; box-shadow: 0px 0px 20px 0px #000000;}
|
3062 |
.orange {color: #f85d00;}
|
3063 |
.bold {font-weight: bold;}
|
3064 |
.grey{color: #888888;}
|
3065 |
+
sup.orange {text-transform: lowercase; font-weight: bold; color: #f85d00;}
|
3066 |
#goprobox {border-radius: 15px; padding: 10px 15px 15px 15px; margin-top: 15px; border: 3px solid #CCE5EC; position: relative;}
|
3067 |
#nonprosupport {border-radius: 15px; padding: 10px 15px 20px 15px; border: 3px solid #ff6655;}
|
3068 |
.pronon {font-weight: bold; color: #f85d00;}
|
3099 |
#box_restrict_wizard {padding: 0px 10px; <?php echo isset($all[self::$opt_restrict_wizard]) && $all[self::$opt_restrict_wizard] ? 'display: block;' : 'display: none;' ?>}
|
3100 |
#box_restrict_wizard label {display: block; margin: 5px 10px;}
|
3101 |
.textinput {border-width: 2px !important;}
|
3102 |
+
input[type=text]::placeholder {font-weight: normal;}
|
3103 |
h3.sect {border-radius: 10px; background-color: #D9E9F7; padding: 5px 5px 5px 10px; position: relative; font-weight: bold;}
|
3104 |
h3.sect a {text-decoration: none; color: #E20000;}
|
3105 |
h3.sect a.button-primary {color: #ffffff;}
|
3108 |
.ytnav {margin-bottom: 15px;}
|
3109 |
.ytnav a {font-weight: bold; display: inline-block; padding: 5px 10px; margin: 0px 15px 0px 0px; border: 1px solid #cccccc; border-radius: 6px;
|
3110 |
text-decoration: none; background-color: #ffffff;}
|
3111 |
+
.ytnav a sup { line-height: 0;}
|
3112 |
.ytnav a:last-child {margin-right: 0;}
|
3113 |
.jumper {height: 25px;}
|
3114 |
.ssschema {float: right; width: 350px; height: auto; margin-right: 10px;}
|
3131 |
.apikey-msg {display: inline-block; width: 45%; vertical-align: top;}
|
3132 |
.apikey-video{margin-left: 3%; display: inline-block; width: 50%; position: relative; padding-top: 29%}
|
3133 |
.apikey-video iframe{display: block; width: 100%; height: 100%; position: absolute; top: 0; left: 0;}
|
3134 |
+
#boxnocookie {display: inline-block; border-radius: 3px; padding: 2px 4px 2px 4px; color: red; <?php echo $all[self::$opt_nocookie] ? '' : 'display: none;' ?>}
|
3135 |
.strike {text-decoration: line-through;}
|
3136 |
.upgchecks { padding: 20px; border-radius: 15px; border: 1px dotted #777777; background-color: #fcfcfc; }
|
3137 |
.clearboth {clear: both;}
|
3149 |
-moz-box-shadow: 0px 0px 10px 0px rgba(0,0,0,0.75);
|
3150 |
box-shadow: 0px 0px 10px 0px rgba(0,0,0,0.75); }
|
3151 |
|
3152 |
+
.gdpr-options-left {
|
3153 |
+
width: 65%;
|
3154 |
+
float: left;
|
3155 |
+
clear: left;
|
3156 |
+
}
|
3157 |
+
|
3158 |
+
.gdpr-options-right {
|
3159 |
+
width: 33%;
|
3160 |
+
float: right;
|
3161 |
+
margin-top: 20px;
|
3162 |
+
}
|
3163 |
+
|
3164 |
+
.gdpr-options-right .img-gdpr-message {
|
3165 |
+
width: 100%;
|
3166 |
+
height: auto;
|
3167 |
+
}
|
3168 |
+
|
3169 |
+
iframe#gdpr_consent_message_ifr {
|
3170 |
+
min-height: 250px !important;
|
3171 |
+
}
|
3172 |
+
|
3173 |
</style>
|
3174 |
|
3175 |
<div class="ytindent">
|
3180 |
<a href="#jumpwiz">Visual Wizard</a>
|
3181 |
<a href="#jumpcompat">Compatibility</a>
|
3182 |
<a href="#jumpgallery">Galleries</a>
|
3183 |
+
<a href="#jumpprivacy">Privacy <sup class="orange">new</sup></a>
|
3184 |
<a target="_blank" href="<?php echo self::$epbase . "/dashboard/pro-easy-video-analytics.aspx?ref=protab" ?>" style="border-color: #888888;">Upgrade?</a>
|
3185 |
<a href="#jumphowto">Embed Manually</a>
|
3186 |
<a href="#jumpsupport">Support</a>
|
3323 |
Add site origin information with each embed code as an extra security measure. In YouTube's/Google's own words, checking this option "protects against malicious third-party JavaScript being injected into your page and hijacking control of your YouTube player." We especially recommend checking it as it adds higher security than the built-in YouTube embedding method that comes with the current version of WordPress (i.e. oembed).
|
3324 |
</label>
|
3325 |
</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3326 |
<p>
|
3327 |
<input name="<?php echo self::$opt_controls; ?>" id="<?php echo self::$opt_controls; ?>" <?php checked($all[self::$opt_controls], 2); ?> type="checkbox" class="checkbox">
|
3328 |
<label for="<?php echo self::$opt_controls; ?>"><b class="chktitle">Show Controls:</b> Show the player's control bar. Unchecking this option creates a cleaner look but limits what your viewers can control (play position, volume, etc.).</label>
|
3387 |
you can click to directly embed the desired video link to your post without having to copy and paste.
|
3388 |
</p>
|
3389 |
<p>
|
3390 |
+
<a href="<?php echo self::$epbase ?>/dashboard/pro-easy-video-analytics.aspx" target="_blank" style=""><b>Even more options are available to PRO users!</b></a> If you download our PRO version, you can simply click the <a href="<?php echo self::$epbase . '/dashboard/pro-easy-video-analytics.aspx?ref=protab' ?>" target="_blank" class="button-primary cuz">► Customize</a> button within the wizard to further personalize your embeds without having to enter special codes yourself. The customize button will allow you to easily override most of the above default options for that embed.
|
3391 |
<br>
|
3392 |
<br>
|
3393 |
<a href="<?php echo self::$epbase ?>/dashboard/pro-easy-video-analytics.aspx" target="_blank" style="text-decoration: none;"><img style="width: 500px; margin: 0 auto; display: block;" src="<?php echo plugins_url('images/ssprowizard.png', __FILE__) ?>" ></a>
|
3687 |
<b class="chktitle">Show Subscribe Button: </b> Are you the channel owner for all your galleries? Check this box to add a "Subscribe" button to all your galleries as shown below. This might help you convert your site's visitors to YouTube subscribers of your channel.
|
3688 |
</label>
|
3689 |
<span id="boxchannelsub">
|
3690 |
+
Paste Channel URL: <input type="text" placeholder="Example: https://www.youtube.com/user/YourChannel" name="<?php echo self::$opt_gallery_channelsublink; ?>" id="<?php echo self::$opt_gallery_channelsublink; ?>" value="<?php echo esc_url(trim($all[self::$opt_gallery_channelsublink])); ?>" class="textinput" style="width: 200px;">
|
3691 |
Button text: <input type="text" name="<?php echo self::$opt_gallery_channelsubtext; ?>" id="<?php echo self::$opt_gallery_channelsubtext; ?>" value="<?php echo esc_attr(trim($all[self::$opt_gallery_channelsubtext])); ?>" class="textinput" style="width: 200px;">
|
3692 |
</span>
|
3693 |
</p>
|
3731 |
</div>
|
3732 |
|
3733 |
|
3734 |
+
<div class="jumper" id="jumpprivacy"></div>
|
3735 |
+
<h3 class="sect">
|
3736 |
+
Privacy Options
|
3737 |
+
<a href="#top" class="totop">▲ top</a>
|
3738 |
+
</h3>
|
3739 |
+
<p>These options will help with privacy restrictions such as GDPR and the EU Cookie Law.</p>
|
3740 |
+
<div class="ytindent chx">
|
3741 |
+
<p>
|
3742 |
+
<b class="chktitle">YouTube API Loading:</b> <sup class="orange">NEW</sup> Choose when to load the YouTube API. The "Restricted" or "Never" options will help with GDPR compliance:
|
3743 |
+
<ul class="indent-option">
|
3744 |
+
<li><label><input type="radio" name="<?php echo self::$opt_ytapi_load ?>" value="light" <?php checked($all[self::$opt_ytapi_load], 'light'); ?> /> <em>Restricted</em> - (Recommended) Only load the API on pages that have a YouTube video.</label></li>
|
3745 |
+
<li><label><input type="radio" name="<?php echo self::$opt_ytapi_load ?>" value="never" <?php checked($all[self::$opt_ytapi_load], 'never'); ?> /> <em>Never</em> - Do not load the YouTube API. Note: The "Never" choice may break a few features such as Volume Initialization and Gallery Continuous/Auto Play.</label></li>
|
3746 |
+
<li><label><input type="radio" name="<?php echo self::$opt_ytapi_load ?>" value="always" <?php checked($all[self::$opt_ytapi_load], 'always'); ?> /> <em>Always</em> - Load the API on all pages. In most cases, the "Always" choice is not necessary.</label></li>
|
3747 |
+
</ul>
|
3748 |
+
</p>
|
3749 |
+
|
3750 |
+
|
3751 |
+
<p>
|
3752 |
+
<input name="<?php echo self::$opt_gdpr_consent; ?>" id="<?php echo self::$opt_gdpr_consent; ?>" <?php checked($all[self::$opt_gdpr_consent], 1); ?> type="checkbox" class="checkbox">
|
3753 |
+
<label for="<?php echo self::$opt_gdpr_consent; ?>">
|
3754 |
+
<b class="chktitle">GDPR - Show Consent Message:</b> <sup class="orange">NEW</sup> Ask for consent before loading YouTube content. A message will be displayed in place of the YouTube video, as shown in the screenshot below. You can customize the message text and the button text in the next 2 options.
|
3755 |
+
</label>
|
3756 |
+
</p>
|
3757 |
+
|
3758 |
+
<p>
|
3759 |
+
<label for="<?php echo self::$opt_gdpr_consent_message; ?>">
|
3760 |
+
<b class="chktitle">GDPR - Consent Message Text:</b> <sup class="orange">NEW</sup>
|
3761 |
+
Below you can customize the message that will appear to visitors before they accept YouTube content:
|
3762 |
+
</label>
|
3763 |
+
<div class="clearboth"></div>
|
3764 |
+
<div class="gdpr-options-left">
|
3765 |
+
<?php
|
3766 |
+
wp_editor(wp_kses_post($all[self::$opt_gdpr_consent_message]), self::$opt_gdpr_consent_message, array(
|
3767 |
+
'textarea_rows' => 22,
|
3768 |
+
'media_buttons' => false,
|
3769 |
+
'teeny' => true
|
3770 |
+
));
|
3771 |
+
?>
|
3772 |
+
</div>
|
3773 |
+
<div class="gdpr-options-right">
|
3774 |
+
<p><em>Example of message and button:</em></p>
|
3775 |
+
|
3776 |
+
<img src="<?php echo plugins_url('images/ss-gdpr-message.png', __FILE__) ?>" alt="GDPR Consent Message Example" class="img-gdpr-message" />
|
3777 |
+
</div>
|
3778 |
+
|
3779 |
+
</p>
|
3780 |
+
<div class="clearboth"></div>
|
3781 |
+
<p>
|
3782 |
+
<label for="<?php echo self::$opt_gdpr_consent_button; ?>">
|
3783 |
+
<b class="chktitle">GDPR - Consent Button Text:</b> <sup class="orange">NEW</sup>
|
3784 |
+
This is the text for the red "Accept" button that appears with the above GDPR message:
|
3785 |
+
</label>
|
3786 |
+
<br>
|
3787 |
+
<input type="text" placeholder="Example: Accept YouTube Content" name="<?php echo self::$opt_gdpr_consent_button; ?>" id="<?php echo self::$opt_gdpr_consent_button; ?>" value="<?php echo esc_attr(trim($all[self::$opt_gdpr_consent_button])); ?>" class="textinput regular-text"/>
|
3788 |
+
</p>
|
3789 |
+
|
3790 |
+
<p>
|
3791 |
+
<input name="<?php echo self::$opt_nocookie; ?>" id="<?php echo self::$opt_nocookie; ?>" <?php checked($all[self::$opt_nocookie], 1); ?> type="checkbox" class="checkbox">
|
3792 |
+
<label for="<?php echo self::$opt_nocookie; ?>">
|
3793 |
+
<b class="chktitle">No Cookies:</b> Prevent YouTube from leaving tracking cookies on your visitors browsers unless they actual play the videos. This is coded to apply this behavior on links in your past post as well.
|
3794 |
+
<span id="boxnocookie">
|
3795 |
+
Checking this option may break some features such as galleries and playlists. Furthermore, videos on mobile devices may have problems if you leave this checked.
|
3796 |
+
</span>
|
3797 |
+
</label>
|
3798 |
+
</p>
|
3799 |
+
</div>
|
3800 |
+
|
3801 |
+
|
3802 |
<div class="jumper" id="jumphowto"></div>
|
3803 |
<h3 class="sect">
|
3804 |
Manually Embed a YouTube Video or Playlist <a class="smallnote" href="#jumpgallery">(For gallery directions, go here »)</a>
|
3986 |
<a href="#jumpwiz">Visual Wizard</a>
|
3987 |
<a href="#jumpcompat">Compatibility</a>
|
3988 |
<a href="#jumpgallery">Galleries</a>
|
3989 |
+
<a href="#jumpprivacy">Privacy <sup class="orange">new</sup></a>
|
3990 |
<a target="_blank" href="<?php echo self::$epbase . "/dashboard/pro-easy-video-analytics.aspx?ref=protab" ?>" style="border-color: #888888;">Upgrade?</a>
|
3991 |
<a href="#jumphowto">Embed Manually</a>
|
3992 |
<a href="#jumpsupport">Support</a>
|
4293 |
// }
|
4294 |
wp_localize_script('__ytprefs__', '_EPYT_', $my_script_vars);
|
4295 |
}
|
4296 |
+
|
4297 |
+
if ((bool) self::$alloptions[self::$opt_gdpr_consent])
|
4298 |
+
{
|
4299 |
+
wp_enqueue_script('__jquery_cookie__', plugins_url('scripts/jquery.cookie' . self::$min . '.js', __FILE__), array('jquery'), self::$version);
|
4300 |
+
}
|
4301 |
+
|
4302 |
|
4303 |
////////////////////// cloudflare accomodation
|
4304 |
//add_filter('script_loader_tag', array(get_class(), 'set_cfasync'), 10, 3);
|