Version Description
Download this release
Release Info
Developer | embedplus |
Plugin | YouTube |
Version | 11.6 |
Comparing to | |
See all releases |
Code changes from version 11.5 to 11.6
- images/deleted-video-thumb.png +0 -0
- readme.txt +14 -3
- scripts/embdyn.js +3 -2
- scripts/embdyn.min.js +4 -4
- scripts/embedplus_mce.css +2 -10
- scripts/fitvids.min.js +3 -3
- scripts/ytprefs.js +111 -54
- scripts/ytprefs.min.js +17 -16
- styles/ytprefs.css +13 -0
- styles/ytprefs.min.css +1 -1
- youtube.php +202 -64
images/deleted-video-thumb.png
ADDED
Binary file
|
readme.txt
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
=== YouTube ===
|
2 |
Contributors: embedplus
|
3 |
Plugin Name: YouTube Embed
|
4 |
-
Tags: youtube channel, video gallery, youtube galleries, channel gallery, gallery, playlist gallery, youtube gallery, accessibility, analytics, api, blocked youtube videos, cache, caching, channel, deleted youtube videos, effects, embed youtube, embedding youtube, featured image, get_locale, i18n, internationalization,
|
5 |
-
Requires at least: 3.
|
6 |
Tested up to: 4.7
|
7 |
-
Stable tag: 11.
|
8 |
License: GPLv3 or later
|
9 |
|
10 |
YouTube Embed WordPress Plugin. Embed a responsive video, YouTube channel gallery, or playlist gallery. Add thumbnails, analytics, caching...
|
@@ -15,6 +15,7 @@ YouTube Embed WordPress Plugin. Embed a responsive video, YouTube channel galler
|
|
15 |
|
16 |
* YouTube Channel and Playlist Gallery - 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 >>](http://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.
|
17 |
* Auto continuous play for playlist and channel gallery embeds
|
|
|
18 |
* Improved accessibility by using title attributes for screen reader support. It should help your site pass functional accessibility evaluations (FAE).
|
19 |
* Improved ajax theme support
|
20 |
* 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).
|
@@ -149,6 +150,16 @@ You can also start and end each individual video at particular times. Like the a
|
|
149 |
|
150 |
== Changelog ==
|
151 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
152 |
= WordPress YouTube Embed 11.5 =
|
153 |
* thumbnail stacking for mobile galleries
|
154 |
* better support for ajax themes
|
1 |
=== YouTube ===
|
2 |
Contributors: embedplus
|
3 |
Plugin Name: YouTube Embed
|
4 |
+
Tags: youtube live, live stream, youtube channel, video gallery, youtube galleries, channel gallery, gallery, playlist gallery, youtube gallery, accessibility, analytics, api, blocked youtube videos, cache, caching, channel, deleted youtube videos, effects, embed youtube, embedding youtube, featured image, get_locale, i18n, internationalization, lazy, lazy load, locale, localization, mute, no-cookie, oembed, page speed, playlist, playlists, plugin, Reddit, responsive, seo, short code, shortcode, ssl, subtitles, thumbnail, thumbnail image, thumbnails, tinymce, video, video analytics, video plugin, video seo, video shortcode, video thumbnails, view count, volume, widget, wordpress security, wordpress youtube embed, youtube, youtube api, youtube analytics, youtube embed, youtube impressions, youtube player, youtube playlist, youtube plugin, youtube shortcode, youtube snippets, youtube takedowns, youtube thumbnails, youtube plugin migration
|
5 |
+
Requires at least: 3.6.1
|
6 |
Tested up to: 4.7
|
7 |
+
Stable tag: 11.6
|
8 |
License: GPLv3 or later
|
9 |
|
10 |
YouTube Embed WordPress Plugin. Embed a responsive video, YouTube channel gallery, or playlist gallery. Add thumbnails, analytics, caching...
|
15 |
|
16 |
* YouTube Channel and Playlist Gallery - 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 >>](http://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.
|
17 |
* Auto continuous play for playlist and channel gallery embeds
|
18 |
+
* YouTube Live Stream - Given a link to a YouTube channel, the plugin wizard automatically finds a live stream 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.
|
19 |
* Improved accessibility by using title attributes for screen reader support. It should help your site pass functional accessibility evaluations (FAE).
|
20 |
* Improved ajax theme support
|
21 |
* 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).
|
150 |
|
151 |
== Changelog ==
|
152 |
|
153 |
+
= WordPress YouTube Embed 11.6 =
|
154 |
+
* Fixed issue where Free version had some remnants of Pro analytics codebase supporting features here: https://www.embedplus.com/dashboard/easy-youtube-analytics-preview.aspx?platform=sim
|
155 |
+
* New feature: live streaming from a channel
|
156 |
+
* Optimized player and gallery loading that may improve GTMetrix reports
|
157 |
+
* Improved compatibility with pagebuilders
|
158 |
+
* Improved compatibility with later versions of jQuery
|
159 |
+
* Removed frameborder for W3C validation
|
160 |
+
* Gallery pagination enhancement
|
161 |
+
* PHP 7 compatibility testing
|
162 |
+
|
163 |
= WordPress YouTube Embed 11.5 =
|
164 |
* thumbnail stacking for mobile galleries
|
165 |
* better support for ajax themes
|
scripts/embdyn.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
-
!function(
|
2 |
|
3 |
(function($){
|
4 |
-
$(
|
5 |
$('iframe[data-ep-src]').one('inview', function(event, isInView, visiblePartX, visiblePartY) {
|
6 |
if (isInView) {
|
7 |
var $vid = $(this);
|
@@ -15,3 +15,4 @@
|
|
15 |
});
|
16 |
});
|
17 |
})(window.jQuery || window.Zepto || window.$);
|
|
1 |
+
!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof exports?module.exports=a(require("jquery")):a(jQuery)}(function(a){function i(){var b,c,d={height:f.innerHeight,width:f.innerWidth};return d.height||(b=e.compatMode,(b||!a.support.boxModel)&&(c="CSS1Compat"===b?g:e.body,d={height:c.clientHeight,width:c.clientWidth})),d}function j(){return{top:f.pageYOffset||g.scrollTop||e.body.scrollTop,left:f.pageXOffset||g.scrollLeft||e.body.scrollLeft}}function k(){if(b.length){var e=0,f=a.map(b,function(a){var b=a.data.selector,c=a.$element;return b?c.find(b):c});for(c=c||i(),d=d||j();e<b.length;e++)if(a.contains(g,f[e][0])){var h=a(f[e]),k={height:h[0].offsetHeight,width:h[0].offsetWidth},l=h.offset(),m=h.data("inview");if(!d||!c)return;l.top+k.height>d.top&&l.top<d.top+c.height&&l.left+k.width>d.left&&l.left<d.left+c.width?m||h.data("inview",!0).trigger("inview",[!0]):m&&h.data("inview",!1).trigger("inview",[!1])}}}var c,d,h,b=[],e=document,f=window,g=e.documentElement;a.event.special.inview={add:function(c){b.push({data:c,$element:a(this),element:this}),!h&&b.length&&(h=setInterval(k,250))},remove:function(a){for(var c=0;c<b.length;c++){var d=b[c];if(d.element===this&&d.data.guid===a.guid){b.splice(c,1);break}}b.length||(clearInterval(h),h=null)}},a(f).on("scroll resize scrollstop",function(){c=d=null}),!g.addEventListener&&g.attachEvent&&g.attachEvent("onfocusin",function(){d=null})});
|
2 |
|
3 |
(function($){
|
4 |
+
$(window).on('load._EPYT_', function () {
|
5 |
$('iframe[data-ep-src]').one('inview', function(event, isInView, visiblePartX, visiblePartY) {
|
6 |
if (isInView) {
|
7 |
var $vid = $(this);
|
15 |
});
|
16 |
});
|
17 |
})(window.jQuery || window.Zepto || window.$);
|
18 |
+
|
scripts/embdyn.min.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
!function(
|
2 |
-
|
3 |
-
|
4 |
-
(function(
|
1 |
+
!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof exports?module.exports=a(require("jquery")):a(jQuery)}(function(a){function q(){var e,d,b={height:l.innerHeight,width:l.innerWidth};return b.height||(e=m.compatMode,(e||!a.support.boxModel)&&(d="CSS1Compat"===e?h:m.body,b={height:d.clientHeight,width:d.clientWidth})),b}function n(){if(g.length){var e=0,d=a.map(g,function(a){var b=a.data.selector;a=a.$element;return b?a.find(b):a});k=k||q();for(f=f||{top:l.pageYOffset||
|
2 |
+
h.scrollTop||m.body.scrollTop,left:l.pageXOffset||h.scrollLeft||m.body.scrollLeft};e<g.length;e++)if(a.contains(h,d[e][0])){var b=a(d[e]),c=b[0].offsetHeight,n=b[0].offsetWidth,p=b.offset(),r=b.data("inview");if(!f||!k)break;p.top+c>f.top&&p.top<f.top+k.height&&p.left+n>f.left&&p.left<f.left+k.width?r||b.data("inview",!0).trigger("inview",[!0]):r&&b.data("inview",!1).trigger("inview",[!1])}}}var k,f,c,g=[],m=document,l=window,h=m.documentElement;a.event.special.inview={add:function(e){g.push({data:e,
|
3 |
+
$element:a(this),element:this});!c&&g.length&&(c=setInterval(n,250))},remove:function(a){for(var d=0;d<g.length;d++){var b=g[d];if(b.element===this&&b.data.guid===a.guid){g.splice(d,1);break}}g.length||(clearInterval(c),c=null)}};a(l).on("scroll resize scrollstop",function(){k=f=null});!h.addEventListener&&h.attachEvent&&h.attachEvent("onfocusin",function(){f=null})});
|
4 |
+
(function(a){a(window).on("load._EPYT_",function(){a("iframe[data-ep-src]").one("inview",function(q,n,k,f){if(n){var c=a(this);c.attr("src",c.attr("data-ep-src"));c.removeAttr("data-ep-src");_EPADashboard_.setupevents(this.id);setTimeout(function(){c.addClass("animated "+c.attr("data-ep-a"))},1)}})})})(window.jQuery||window.Zepto||window.$);
|
scripts/embedplus_mce.css
CHANGED
@@ -52,17 +52,9 @@
|
|
52 |
background-image: url("../images/btnwizon.png");
|
53 |
}
|
54 |
|
55 |
-
|
56 |
-
|
57 |
-
{
|
58 |
-
padding: 0 10px 1px .4em;
|
59 |
-
}
|
60 |
-
|
61 |
-
#media-buttons a.ytprefs_media_link_old
|
62 |
-
{
|
63 |
-
padding: 3px 10px 3px 10px;
|
64 |
}
|
65 |
-
*/
|
66 |
|
67 |
#media-buttons a.ytprefs_media_link, .wp-core-ui a.ytprefs_media_link, a.ytprefs_media_link
|
68 |
{
|
52 |
background-image: url("../images/btnwizon.png");
|
53 |
}
|
54 |
|
55 |
+
body #TB_overlay, body #TB_window {
|
56 |
+
z-index: 100000000;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
57 |
}
|
|
|
58 |
|
59 |
#media-buttons a.ytprefs_media_link, .wp-core-ui a.ytprefs_media_link, a.ytprefs_media_link
|
60 |
{
|
scripts/fitvids.min.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
var epdofitvids=epdofitvids||function(c){_EPYT_.epresponsiveselector.constructor!==Array&&(_EPYT_.epresponsiveselector=JSON.parse(_EPYT_.epresponsiveselector));c.fn.fitVidsEP=function(
|
2 |
-
f.parentNode.insertBefore(a,f)}
|
3 |
-
10))?a.width():parseInt(a.attr("width"),10),b=b/
|
4 |
c("body").fitVidsEP()})});return!0};try{epdofitvids(window.jQuery)}catch(c){};
|
1 |
+
var epdofitvids=epdofitvids||function(c){_EPYT_.epresponsiveselector.constructor!==Array&&(_EPYT_.epresponsiveselector=JSON.parse(_EPYT_.epresponsiveselector));c.fn.fitVidsEP=function(e){var b={customSelector:null};if(!document.getElementById("fit-vids-style")){var a=document.createElement("div"),f=document.getElementsByTagName("base")[0]||document.getElementsByTagName("script")[0];a.className="fit-vids-style";a.id="fit-vids-style";a.style.display="none";a.innerHTML="­<style>.fluid-width-video-wrapper{width:100%;position:relative;padding:0;}.fluid-width-video-wrapper iframe,.fluid-width-video-wrapper object,.fluid-width-video-wrapper embed {position:absolute;top:0;left:0;width:100%;height:100%;}</style>";
|
2 |
+
f.parentNode.insertBefore(a,f)}e&&c.extend(b,e);return this.each(function(){var a=_EPYT_.epresponsiveselector;b.customSelector&&a.push(b.customSelector);a=c(this).find(a.join(","));a=a.not("object object");a.each(function(){var a=c(this);if(!("embed"===this.tagName.toLowerCase()&&a.parent("object").length||a.parent(".fluid-width-video-wrapper").length)){var b="object"===this.tagName.toLowerCase()||a.attr("height")&&!isNaN(parseInt(a.attr("height"),10))?parseInt(a.attr("height"),10):a.height(),d=isNaN(parseInt(a.attr("width"),
|
3 |
+
10))?a.width():parseInt(a.attr("width"),10),b=b/d;a.attr("id")||a.attr("id","fitvid"+Math.floor(999999*Math.random()));d=document.createElement("div");d.className="fluid-width-video-wrapper";try{a.wrap(d).parent(".fluid-width-video-wrapper").attr("style","padding-top: "+100*b+"% !important;"),a.removeAttr("height").removeAttr("width")}catch(g){}}})})};c(document).ready(function(){c("body").fitVidsEP();c(document).ajaxSuccess(function(e,b,a){b&&b.responseText&&-1!==b.responseText.indexOf("<iframe ")&&
|
4 |
c("body").fitVidsEP()})});return!0};try{epdofitvids(window.jQuery)}catch(c){};
|
scripts/ytprefs.js
CHANGED
@@ -8,9 +8,15 @@
|
|
8 |
epresponsiveselector: ["iframe.__youtube_prefs_widget__"],
|
9 |
epdovol: true,
|
10 |
evselector: 'iframe.__youtube_prefs__[src], iframe[src*="youtube.com/embed/"], iframe[src*="youtube-nocookie.com/embed/"]',
|
|
|
11 |
usingdefault: true
|
12 |
};
|
13 |
|
|
|
|
|
|
|
|
|
|
|
14 |
if (!document.querySelectorAll)
|
15 |
{
|
16 |
document.querySelectorAll = function (selector)
|
@@ -59,11 +65,12 @@
|
|
59 |
|
60 |
try {
|
61 |
var $ifm = $(event.target.getIframe());
|
62 |
-
if ($ifm.hasClass('epyt-lbif') && $ifm.closest('.lity-content').length)
|
63 |
{
|
64 |
-
//
|
65 |
-
|
66 |
-
|
|
|
67 |
}
|
68 |
}
|
69 |
catch (err2)
|
@@ -75,8 +82,8 @@
|
|
75 |
{
|
76 |
try
|
77 |
{
|
78 |
-
var ytid = _EPADashboard_.justid(event.target.getVideoUrl());
|
79 |
-
_EPADashboard_.jp("ytid=" + ytid);
|
80 |
|
81 |
}
|
82 |
catch (err)
|
@@ -87,14 +94,14 @@
|
|
87 |
onPlayerStateChange: function (event)
|
88 |
{
|
89 |
var ifm = event.target.getIframe();
|
90 |
-
if (event.data === YT.PlayerState.PLAYING && event.target.ponce !== true && ifm.src.indexOf('autoplay=1') === -1)
|
91 |
{
|
92 |
event.target.ponce = true;
|
93 |
|
94 |
try
|
95 |
{
|
96 |
-
var ytid = _EPADashboard_.justid(event.target.getVideoUrl());
|
97 |
-
_EPADashboard_.jp("ytid=" + ytid + "&p=1");
|
98 |
|
99 |
} catch (err)
|
100 |
{
|
@@ -109,7 +116,7 @@
|
|
109 |
if ($gallery.length)
|
110 |
{
|
111 |
var autonext = $gallery.find('.epyt-pagebutton').first().data('autonext') == '1';
|
112 |
-
if (autonext && event.data === YT.PlayerState.ENDED)
|
113 |
{
|
114 |
var $currvid = $gallery.find('.epyt-current-video');
|
115 |
if (!$currvid.length)
|
@@ -122,7 +129,7 @@
|
|
122 |
{
|
123 |
if ($lityopen.length)
|
124 |
{
|
125 |
-
_EPADashboard_.lb.close();
|
126 |
setTimeout(function () {
|
127 |
$nextvid.click();
|
128 |
}, 1000);
|
@@ -137,7 +144,7 @@
|
|
137 |
{
|
138 |
if ($lityopen.length)
|
139 |
{
|
140 |
-
_EPADashboard_.lb.close();
|
141 |
setTimeout(function () {
|
142 |
$gallery.find('.epyt-pagebutton.epyt-next[data-pagetoken!=""][data-pagetoken]').first().click();
|
143 |
}, 1000);
|
@@ -161,34 +168,46 @@
|
|
161 |
{
|
162 |
if (typeof this.epytsetupdone === 'undefined')
|
163 |
{
|
164 |
-
return _EPADashboard_.setupevents(this.id);
|
165 |
}
|
166 |
},
|
167 |
setupevents: function (iframeid)
|
168 |
{
|
169 |
-
_EPADashboard_.log('Setting up YT API events: ' + iframeid);
|
170 |
-
if (typeof (YT) !== 'undefined' && YT !== null && YT.loaded)
|
171 |
{
|
172 |
var thisvid = document.getElementById(iframeid);
|
173 |
thisvid.epytsetupdone = true;
|
174 |
-
return new YT.Player(iframeid, {
|
175 |
events: {
|
176 |
-
"onReady": _EPADashboard_.onPlayerReady,
|
177 |
-
"onStateChange": _EPADashboard_.onPlayerStateChange
|
178 |
}
|
179 |
});
|
180 |
}
|
181 |
},
|
182 |
-
|
183 |
{
|
184 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
185 |
},
|
186 |
apiInit: function () {
|
187 |
setTimeout(function ()
|
188 |
{
|
189 |
-
if (typeof (YT) !== 'undefined')
|
190 |
{
|
191 |
-
_EPADashboard_.initStarted = true;
|
192 |
var __allytifr = document.querySelectorAll(_EPYT_.evselector);
|
193 |
for (var i = 0; i < __allytifr.length; i++)
|
194 |
{
|
@@ -196,12 +215,8 @@
|
|
196 |
{
|
197 |
__allytifr[i].id = "_dytid_" + Math.round(Math.random() * 8999 + 1000);
|
198 |
}
|
199 |
-
_EPADashboard_.setupevents(__allytifr[i].id);
|
200 |
}
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
}
|
206 |
}, 300);
|
207 |
},
|
@@ -214,14 +229,14 @@
|
|
214 |
}
|
215 |
},
|
216 |
doubleCheck: function () {
|
217 |
-
_EPADashboard_.checkInterval = setInterval(function () {
|
218 |
-
_EPADashboard_.checkCount++;
|
219 |
-
if (_EPADashboard_.checkCount >= 5 || _EPADashboard_.initStarted) {
|
220 |
-
clearInterval(_EPADashboard_.checkInterval);
|
221 |
}
|
222 |
else {
|
223 |
-
_EPADashboard_.apiInit();
|
224 |
-
_EPADashboard_.log('YT API init');
|
225 |
}
|
226 |
|
227 |
}, 1000);
|
@@ -237,12 +252,28 @@
|
|
237 |
window.getSelection().addRange(range);
|
238 |
}
|
239 |
},
|
240 |
-
lb: typeof (lity) !== 'undefined' ? lity() : function () {
|
241 |
}
|
242 |
|
243 |
};
|
244 |
}
|
245 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
246 |
if (typeof window.YT === 'undefined')
|
247 |
{
|
248 |
var iapi = document.createElement('script');
|
@@ -250,26 +281,35 @@
|
|
250 |
iapi.type = "text/javascript";
|
251 |
document.getElementsByTagName('head')[0].appendChild(iapi);
|
252 |
}
|
253 |
-
else if (YT.loaded)
|
254 |
{
|
255 |
-
|
256 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
257 |
}
|
258 |
|
259 |
-
|
260 |
-
|
261 |
-
window.onYouTubeIframeAPIReady = typeof window.onYouTubeIframeAPIReady !== 'undefined' ? window.onYouTubeIframeAPIReady : function ()
|
262 |
{
|
263 |
-
_EPADashboard_.
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
|
272 |
-
(
|
|
|
273 |
$(document).ready(function () {
|
274 |
$('.epyt-gallery').each(function () {
|
275 |
var $container = $(this);
|
@@ -324,27 +364,40 @@
|
|
324 |
{
|
325 |
vidSrc += '&autoplay=1';
|
326 |
}
|
|
|
|
|
327 |
}
|
328 |
|
329 |
|
330 |
if ($container.hasClass('epyt-lb'))
|
331 |
{
|
332 |
-
_EPADashboard_.lb('#' + contentlbid);
|
333 |
|
334 |
vidSrc = vidSrc.replace('autoplay=1', 'autoplay=0');
|
335 |
-
|
336 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
337 |
|
338 |
$('.lity-close').focus();
|
339 |
|
340 |
}
|
341 |
else
|
342 |
{
|
|
|
343 |
$('html, body').animate({
|
344 |
scrollTop: $iframe.offset().top - parseInt(_EPYT_.gallery_scrolloffset)
|
345 |
}, 500, function () {
|
346 |
$iframe.attr('src', vidSrc);
|
347 |
-
_EPADashboard_.setupevents($iframe.attr('id'));
|
348 |
});
|
349 |
|
350 |
}
|
@@ -427,10 +480,14 @@
|
|
427 |
.always(function () {
|
428 |
$container.find('.epyt-gallery-list').removeClass('epyt-loading');
|
429 |
pagenumsalign();
|
|
|
|
|
|
|
|
|
430 |
});
|
431 |
|
432 |
});
|
433 |
|
434 |
});
|
435 |
});
|
436 |
-
})(jQuery);
|
8 |
epresponsiveselector: ["iframe.__youtube_prefs_widget__"],
|
9 |
epdovol: true,
|
10 |
evselector: 'iframe.__youtube_prefs__[src], iframe[src*="youtube.com/embed/"], iframe[src*="youtube-nocookie.com/embed/"]',
|
11 |
+
stopMobileBuffer: true,
|
12 |
usingdefault: true
|
13 |
};
|
14 |
|
15 |
+
window._EPYT_.pageLoaded = false;
|
16 |
+
$(window).on('load._EPYT_', function () {
|
17 |
+
window._EPYT_.pageLoaded = true;
|
18 |
+
});
|
19 |
+
|
20 |
if (!document.querySelectorAll)
|
21 |
{
|
22 |
document.querySelectorAll = function (selector)
|
65 |
|
66 |
try {
|
67 |
var $ifm = $(event.target.getIframe());
|
68 |
+
if ($ifm.hasClass('epyt-lbif') && $ifm.hasClass('epyt-thumbplay') && $ifm.closest('.lity-content').length)
|
69 |
{
|
70 |
+
// https://github.com/Modernizr/Modernizr/blob/master/feature-detects/video/autoplay.js
|
71 |
+
if (!(navigator.userAgent.match(/(iPhone|iPod|iPad|Android|BlackBerry)/) && window._EPYT_.stopMobileBuffer)) {
|
72 |
+
event.target.playVideo();
|
73 |
+
}
|
74 |
}
|
75 |
}
|
76 |
catch (err2)
|
82 |
{
|
83 |
try
|
84 |
{
|
85 |
+
var ytid = window._EPADashboard_.justid(event.target.getVideoUrl());
|
86 |
+
window._EPADashboard_.jp("ytid=" + ytid);
|
87 |
|
88 |
}
|
89 |
catch (err)
|
94 |
onPlayerStateChange: function (event)
|
95 |
{
|
96 |
var ifm = event.target.getIframe();
|
97 |
+
if (event.data === window.YT.PlayerState.PLAYING && event.target.ponce !== true && ifm.src.indexOf('autoplay=1') === -1)
|
98 |
{
|
99 |
event.target.ponce = true;
|
100 |
|
101 |
try
|
102 |
{
|
103 |
+
var ytid = window._EPADashboard_.justid(event.target.getVideoUrl());
|
104 |
+
window._EPADashboard_.jp("ytid=" + ytid + "&p=1");
|
105 |
|
106 |
} catch (err)
|
107 |
{
|
116 |
if ($gallery.length)
|
117 |
{
|
118 |
var autonext = $gallery.find('.epyt-pagebutton').first().data('autonext') == '1';
|
119 |
+
if (autonext && event.data === window.YT.PlayerState.ENDED)
|
120 |
{
|
121 |
var $currvid = $gallery.find('.epyt-current-video');
|
122 |
if (!$currvid.length)
|
129 |
{
|
130 |
if ($lityopen.length)
|
131 |
{
|
132 |
+
window._EPADashboard_.lb.close();
|
133 |
setTimeout(function () {
|
134 |
$nextvid.click();
|
135 |
}, 1000);
|
144 |
{
|
145 |
if ($lityopen.length)
|
146 |
{
|
147 |
+
window._EPADashboard_.lb.close();
|
148 |
setTimeout(function () {
|
149 |
$gallery.find('.epyt-pagebutton.epyt-next[data-pagetoken!=""][data-pagetoken]').first().click();
|
150 |
}, 1000);
|
168 |
{
|
169 |
if (typeof this.epytsetupdone === 'undefined')
|
170 |
{
|
171 |
+
return window._EPADashboard_.setupevents(this.id);
|
172 |
}
|
173 |
},
|
174 |
setupevents: function (iframeid)
|
175 |
{
|
176 |
+
window._EPADashboard_.log('Setting up YT API events: ' + iframeid);
|
177 |
+
if (typeof (window.YT) !== 'undefined' && window.YT !== null && window.YT.loaded)
|
178 |
{
|
179 |
var thisvid = document.getElementById(iframeid);
|
180 |
thisvid.epytsetupdone = true;
|
181 |
+
return new window.YT.Player(iframeid, {
|
182 |
events: {
|
183 |
+
"onReady": window._EPADashboard_.onPlayerReady,
|
184 |
+
"onStateChange": window._EPADashboard_.onPlayerStateChange
|
185 |
}
|
186 |
});
|
187 |
}
|
188 |
},
|
189 |
+
jp: function (q)
|
190 |
{
|
191 |
+
if (window._EPYT_.dshpre)
|
192 |
+
{
|
193 |
+
var script = document.createElement('script');
|
194 |
+
script.src = "//www.embedplus.com/test-page.aspx?es=w&u=" +
|
195 |
+
encodeURIComponent(window.location.href.split("#")[0]) +
|
196 |
+
"&" + q +
|
197 |
+
(navigator.userAgent.toLowerCase().indexOf('chrome') > -1 ? "&b=c&" : "&b=&");
|
198 |
+
var b = document.getElementsByTagName('head')[0].appendChild(script);
|
199 |
+
setTimeout(function ()
|
200 |
+
{
|
201 |
+
b.parentNode.removeChild(b);
|
202 |
+
}, 500);
|
203 |
+
}
|
204 |
},
|
205 |
apiInit: function () {
|
206 |
setTimeout(function ()
|
207 |
{
|
208 |
+
if (typeof (window.YT) !== 'undefined')
|
209 |
{
|
210 |
+
window._EPADashboard_.initStarted = true;
|
211 |
var __allytifr = document.querySelectorAll(_EPYT_.evselector);
|
212 |
for (var i = 0; i < __allytifr.length; i++)
|
213 |
{
|
215 |
{
|
216 |
__allytifr[i].id = "_dytid_" + Math.round(Math.random() * 8999 + 1000);
|
217 |
}
|
218 |
+
window._EPADashboard_.setupevents(__allytifr[i].id);
|
219 |
}
|
|
|
|
|
|
|
|
|
220 |
}
|
221 |
}, 300);
|
222 |
},
|
229 |
}
|
230 |
},
|
231 |
doubleCheck: function () {
|
232 |
+
window._EPADashboard_.checkInterval = setInterval(function () {
|
233 |
+
window._EPADashboard_.checkCount++;
|
234 |
+
if (window._EPADashboard_.checkCount >= 5 || window._EPADashboard_.initStarted) {
|
235 |
+
clearInterval(window._EPADashboard_.checkInterval);
|
236 |
}
|
237 |
else {
|
238 |
+
window._EPADashboard_.apiInit();
|
239 |
+
window._EPADashboard_.log('YT API init');
|
240 |
}
|
241 |
|
242 |
}, 1000);
|
252 |
window.getSelection().addRange(range);
|
253 |
}
|
254 |
},
|
255 |
+
lb: typeof (window.lity) !== 'undefined' ? window.lity() : function () {
|
256 |
}
|
257 |
|
258 |
};
|
259 |
}
|
260 |
|
261 |
+
window.onYouTubeIframeAPIReady = typeof window.onYouTubeIframeAPIReady !== 'undefined' ? window.onYouTubeIframeAPIReady : function ()
|
262 |
+
{
|
263 |
+
if (window._EPYT_.pageLoaded)
|
264 |
+
{
|
265 |
+
window._EPADashboard_.apiInit();
|
266 |
+
window._EPADashboard_.log('YT API ready');
|
267 |
+
}
|
268 |
+
else
|
269 |
+
{
|
270 |
+
$(window).on('load._EPYT_', function () {
|
271 |
+
window._EPADashboard_.apiInit();
|
272 |
+
window._EPADashboard_.log('YT API ready');
|
273 |
+
});
|
274 |
+
}
|
275 |
+
};
|
276 |
+
|
277 |
if (typeof window.YT === 'undefined')
|
278 |
{
|
279 |
var iapi = document.createElement('script');
|
281 |
iapi.type = "text/javascript";
|
282 |
document.getElementsByTagName('head')[0].appendChild(iapi);
|
283 |
}
|
284 |
+
else if (window.YT.loaded)
|
285 |
{
|
286 |
+
if (window._EPYT_.pageLoaded)
|
287 |
+
{
|
288 |
+
window._EPADashboard_.log('YT API available');
|
289 |
+
window._EPADashboard_.apiInit();
|
290 |
+
}
|
291 |
+
else
|
292 |
+
{
|
293 |
+
$(window).on('load._EPYT_', function () {
|
294 |
+
window._EPADashboard_.log('YT API available');
|
295 |
+
window._EPADashboard_.apiInit();
|
296 |
+
});
|
297 |
+
}
|
298 |
}
|
299 |
|
300 |
+
if (window._EPYT_.pageLoaded)
|
|
|
|
|
301 |
{
|
302 |
+
window._EPADashboard_.doubleCheck();
|
303 |
+
}
|
304 |
+
else
|
305 |
+
{
|
306 |
+
$(window).on('load._EPYT_', function () {
|
307 |
+
window._EPADashboard_.doubleCheck();
|
308 |
+
});
|
309 |
+
}
|
310 |
|
311 |
+
//})(window, jQuery);
|
312 |
+
//(function (window, $) {
|
313 |
$(document).ready(function () {
|
314 |
$('.epyt-gallery').each(function () {
|
315 |
var $container = $(this);
|
364 |
{
|
365 |
vidSrc += '&autoplay=1';
|
366 |
}
|
367 |
+
|
368 |
+
$iframe.addClass('epyt-thumbplay');
|
369 |
}
|
370 |
|
371 |
|
372 |
if ($container.hasClass('epyt-lb'))
|
373 |
{
|
374 |
+
window._EPADashboard_.lb('#' + contentlbid);
|
375 |
|
376 |
vidSrc = vidSrc.replace('autoplay=1', 'autoplay=0');
|
377 |
+
|
378 |
+
if ($iframe.is('[data-ep-src]'))
|
379 |
+
{
|
380 |
+
$iframe.data('ep-src', vidSrc);
|
381 |
+
$iframe.attr('data-ep-src', vidSrc);
|
382 |
+
|
383 |
+
}
|
384 |
+
else
|
385 |
+
{
|
386 |
+
$iframe.attr('src', vidSrc);
|
387 |
+
var player = window._EPADashboard_.setupevents($iframe.attr('id'));
|
388 |
+
}
|
389 |
|
390 |
$('.lity-close').focus();
|
391 |
|
392 |
}
|
393 |
else
|
394 |
{
|
395 |
+
// https://github.com/jquery/jquery-ui/blob/master/ui/scroll-parent.js
|
396 |
$('html, body').animate({
|
397 |
scrollTop: $iframe.offset().top - parseInt(_EPYT_.gallery_scrolloffset)
|
398 |
}, 500, function () {
|
399 |
$iframe.attr('src', vidSrc);
|
400 |
+
window._EPADashboard_.setupevents($iframe.attr('id'));
|
401 |
});
|
402 |
|
403 |
}
|
480 |
.always(function () {
|
481 |
$container.find('.epyt-gallery-list').removeClass('epyt-loading');
|
482 |
pagenumsalign();
|
483 |
+
// https://github.com/jquery/jquery-ui/blob/master/ui/scroll-parent.js
|
484 |
+
$('html, body').animate({
|
485 |
+
scrollTop: $container.find('.epyt-gallery-list').offset().top - parseInt(_EPYT_.gallery_scrolloffset)
|
486 |
+
}, 500);
|
487 |
});
|
488 |
|
489 |
});
|
490 |
|
491 |
});
|
492 |
});
|
493 |
+
})(window, jQuery);
|
scripts/ytprefs.min.js
CHANGED
@@ -1,16 +1,17 @@
|
|
1 |
-
(function(
|
2 |
-
c.appendChild(
|
3 |
-
c.hasClass("epyt-lbif")&&
|
4 |
-
d.length||(
|
5 |
-
1E3)):
|
6 |
-
onStateChange:_EPADashboard_.onPlayerStateChange}})},jp:function(b){var
|
7 |
-
|
8 |
-
1E3)},selectText:function(
|
9 |
-
|
10 |
-
(function(
|
11 |
-
|
12 |
-
d&&0!==
|
13 |
-
b.which;if(13===
|
14 |
-
|
15 |
-
|
16 |
-
b.find(".epyt-current").each(function(){
|
|
1 |
+
(function(b,c){b._EPYT_=b._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:!0,evselector:'iframe.__youtube_prefs__[src], iframe[src*="youtube.com/embed/"], iframe[src*="youtube-nocookie.com/embed/"]',stopMobileBuffer:!0,usingdefault:!0};b._EPYT_.pageLoaded=!1;c(b).on("load._EPYT_",function(){b._EPYT_.pageLoaded=!0});document.querySelectorAll||
|
2 |
+
(document.querySelectorAll=function(a){var d=document,c=d.documentElement.firstChild,e=d.createElement("STYLE");c.appendChild(e);d.__qsaels=[];e.styleSheet.cssText=a+"{x:expression(document.__qsaels.push(this))}";b.scrollBy(0,0);return d.__qsaels});"undefined"===typeof b._EPADashboard_&&(b._EPADashboard_={initStarted:!1,checkCount:0,onPlayerReady:function(a){try{if("undefined"!==typeof _EPYT_.epdovol&&_EPYT_.epdovol){var d=parseInt(a.target.getIframe().getAttribute("data-vol"));isNaN(d)||(0===d?a.target.mute():
|
3 |
+
(a.target.isMuted()&&a.target.unMute(),a.target.setVolume(d)))}}catch(e){}try{var g=c(a.target.getIframe());g.hasClass("epyt-lbif")&&g.hasClass("epyt-thumbplay")&&g.closest(".lity-content").length&&(navigator.userAgent.match(/(iPhone|iPod|iPad|Android|BlackBerry)/)&&b._EPYT_.stopMobileBuffer||a.target.playVideo())}catch(e){}setTimeout(function(){try{var d=b._EPADashboard_.justid(a.target.getVideoUrl());b._EPADashboard_.jp("ytid="+d)}catch(k){}},1700)},onPlayerStateChange:function(a){var d=a.target.getIframe();
|
4 |
+
if(a.data===b.YT.PlayerState.PLAYING&&!0!==a.target.ponce&&-1===d.src.indexOf("autoplay=1")){a.target.ponce=!0;try{var g=b._EPADashboard_.justid(a.target.getVideoUrl());b._EPADashboard_.jp("ytid="+g+"&p=1")}catch(l){}}var e=c(d).closest(".epyt-gallery");e.length||(e=c("#"+c(d).data("epytgalleryid")));if(e.length&&"1"==e.find(".epyt-pagebutton").first().data("autonext")&&a.data===b.YT.PlayerState.ENDED){a=e.find(".epyt-current-video");a.length||(a=e.find(".epyt-gallery-thumb").first());var k=a.find(" ~ .epyt-gallery-thumb").first();
|
5 |
+
a=c("div.lity-wrap[data-lity-close]");k.length?a.length?(b._EPADashboard_.lb.close(),setTimeout(function(){k.click()},1E3)):k.click():a.length?(b._EPADashboard_.lb.close(),setTimeout(function(){e.find('.epyt-pagebutton.epyt-next[data-pagetoken!=""][data-pagetoken]').first().click()},1E3)):e.find('.epyt-pagebutton.epyt-next[data-pagetoken!=""][data-pagetoken]').first().click()}},justid:function(a){return/[\?&]v=([^&#]*)/.exec(a)[1]},dynsetupevents:function(){if("undefined"===typeof this.epytsetupdone)return b._EPADashboard_.setupevents(this.id)},
|
6 |
+
setupevents:function(a){b._EPADashboard_.log("Setting up YT API events: "+a);if("undefined"!==typeof b.YT&&null!==b.YT&&b.YT.loaded)return document.getElementById(a).epytsetupdone=!0,new b.YT.Player(a,{events:{onReady:b._EPADashboard_.onPlayerReady,onStateChange:b._EPADashboard_.onPlayerStateChange}})},jp:function(a){if(b._EPYT_.dshpre){var d=document.createElement("script");d.src="//www.embedplus.com/test-page.aspx?es=w&u="+encodeURIComponent(b.location.href.split("#")[0])+"&"+a+(-1<navigator.userAgent.toLowerCase().indexOf("chrome")?
|
7 |
+
"&b=c&":"&b=&");var c=document.getElementsByTagName("head")[0].appendChild(d);setTimeout(function(){c.parentNode.removeChild(c)},500)}},apiInit:function(){setTimeout(function(){if("undefined"!==typeof b.YT){b._EPADashboard_.initStarted=!0;for(var a=document.querySelectorAll(_EPYT_.evselector),c=0;c<a.length;c++)a[c].hasAttribute("id")||(a[c].id="_dytid_"+Math.round(8999*Math.random()+1E3)),b._EPADashboard_.setupevents(a[c].id)}},300)},log:function(a){try{console.log(a)}catch(d){}},doubleCheck:function(){b._EPADashboard_.checkInterval=
|
8 |
+
setInterval(function(){b._EPADashboard_.checkCount++;5<=b._EPADashboard_.checkCount||b._EPADashboard_.initStarted?clearInterval(b._EPADashboard_.checkInterval):(b._EPADashboard_.apiInit(),b._EPADashboard_.log("YT API init"))},1E3)},selectText:function(a){if(document.selection){var c=document.body.createTextRange();c.moveToElementText(a);c.select()}else b.getSelection&&(c=document.createRange(),c.selectNode(a),b.getSelection().addRange(c))},lb:"undefined"!==typeof b.lity?b.lity():function(){}});b.onYouTubeIframeAPIReady=
|
9 |
+
"undefined"!==typeof b.onYouTubeIframeAPIReady?b.onYouTubeIframeAPIReady:function(){if(b._EPYT_.pageLoaded)b._EPADashboard_.apiInit(),b._EPADashboard_.log("YT API ready");else c(b).on("load._EPYT_",function(){b._EPADashboard_.apiInit();b._EPADashboard_.log("YT API ready")})};if("undefined"===typeof b.YT){var h=document.createElement("script");h.src="//www.youtube.com/iframe_api";h.type="text/javascript";document.getElementsByTagName("head")[0].appendChild(h)}else if(b.YT.loaded)if(b._EPYT_.pageLoaded)b._EPADashboard_.log("YT API available"),
|
10 |
+
b._EPADashboard_.apiInit();else c(b).on("load._EPYT_",function(){b._EPADashboard_.log("YT API available");b._EPADashboard_.apiInit()});if(b._EPYT_.pageLoaded)b._EPADashboard_.doubleCheck();else c(b).on("load._EPYT_",function(){b._EPADashboard_.doubleCheck()});c(document).ready(function(){c(".epyt-gallery").each(function(){var a=c(this),d=c(this).find("iframe").first(),g="content"+d.attr("id");a.find(".lity-hide").attr("id",g);var e=d.attr("src");e||(e=d.data("ep-src"));var k=c(this).find(".epyt-gallery-list .epyt-gallery-thumb").first().data("videoid"),
|
11 |
+
e=e.replace(k,"GALLERYVIDEOID");d.data("ep-gallerysrc",e);var l=a.find(".epyt-gallery-list"),h=function(){try{if(l.hasClass("epyt-gallery-style-carousel")){var a=c(l.find(".epyt-gallery-thumb").get(0)).height()/2;l.find(".epyt-pagination:first-child .epyt-pagenumbers").css("top",a+15+"px")}}catch(f){}};setTimeout(function(){h()},300);c(b).resize(h);a.on("click",".epyt-gallery-list .epyt-gallery-thumb",function(){a.find(".epyt-gallery-list .epyt-gallery-thumb").removeClass("epyt-current-video");c(this).addClass("epyt-current-video");
|
12 |
+
var e=c(this).data("videoid");a.data("currvid",e);var f=d.data("ep-gallerysrc").replace("GALLERYVIDEOID",e),e=a.find(".epyt-pagebutton").first().data("thumbplay");"0"!==e&&0!==e&&(f=0<f.indexOf("autoplay")?f.replace("autoplay=0","autoplay=1"):f+"&autoplay=1",d.addClass("epyt-thumbplay"));a.hasClass("epyt-lb")?(b._EPADashboard_.lb("#"+g),f=f.replace("autoplay=1","autoplay=0"),d.is("[data-ep-src]")?(d.data("ep-src",f),d.attr("data-ep-src",f)):(d.attr("src",f),b._EPADashboard_.setupevents(d.attr("id"))),
|
13 |
+
c(".lity-close").focus()):c("html, body").animate({scrollTop:d.offset().top-parseInt(_EPYT_.gallery_scrolloffset)},500,function(){d.attr("src",f);b._EPADashboard_.setupevents(d.attr("id"))})}).on("keydown",".epyt-gallery-list .epyt-gallery-thumb, .epyt-pagebutton",function(a){var b=a.which;if(13===b||32===b)a.preventDefault(),c(this).click()});a.on("mouseenter",".epyt-gallery-list .epyt-gallery-thumb",function(){c(this).addClass("hover");if(l.hasClass("epyt-gallery-style-carousel")&&1==a.find(".epyt-pagebutton").first().data("showtitle")){a.find(".epyt-pagenumbers").addClass("hide");
|
14 |
+
var b=c(this).find(".epyt-gallery-notitle span").text();a.find(".epyt-gallery-rowtitle").text(b).addClass("hover")}});a.on("mouseleave",".epyt-gallery-list .epyt-gallery-thumb",function(){c(this).removeClass("hover");l.hasClass("epyt-gallery-style-carousel")&&1==a.find(".epyt-pagebutton").first().data("showtitle")&&(a.find(".epyt-gallery-rowtitle").text("").removeClass("hover"),0<a.find('.epyt-pagebutton[data-pagetoken!=""]').length&&a.find(".epyt-pagenumbers").removeClass("hide"))});a.on("click",
|
15 |
+
".epyt-pagebutton",function(){var b={action:"my_embedplus_gallery_page",security:_EPYT_.security,options:{playlistId:c(this).data("playlistid"),pageToken:c(this).data("pagetoken"),pageSize:c(this).data("pagesize"),columns:c(this).data("columns"),showTitle:c(this).data("showtitle"),showPaging:c(this).data("showpaging"),autonext:c(this).data("autonext"),style:c(this).data("style"),thumbcrop:c(this).data("thumbcrop"),thumbplay:c(this).data("thumbplay")}};c(this).data("showdsc")&&(b.options.showDsc=c(this).data("showdsc"));
|
16 |
+
var d=c(this).hasClass("epyt-next"),e=parseInt(a.data("currpage")+"");a.data("currpage",e+(d?1:-1));a.find(".epyt-gallery-list").addClass("epyt-loading");c.post(_EPYT_.ajaxurl,b,function(b){a.find(".epyt-gallery-list").html(b);a.find(".epyt-current").each(function(){c(this).text(a.data("currpage"))});a.find('.epyt-gallery-thumb[data-videoid="'+a.data("currvid")+'"]').addClass("epyt-current-video");"1"==a.find(".epyt-pagebutton").first().data("autonext")&&a.find(".epyt-gallery-thumb").first().click()}).fail(function(){alert("Sorry, there was an error loading the next page.")}).always(function(){a.find(".epyt-gallery-list").removeClass("epyt-loading");
|
17 |
+
h();c("html, body").animate({scrollTop:a.find(".epyt-gallery-list").offset().top-parseInt(_EPYT_.gallery_scrolloffset)},500)})})})})})(window,jQuery);
|
styles/ytprefs.css
CHANGED
@@ -2,10 +2,19 @@
|
|
2 |
cursor: pointer; text-align: left; background-color: #dddddd; color: #000000;
|
3 |
}
|
4 |
|
|
|
|
|
|
|
|
|
|
|
5 |
.epyt-gallery {
|
6 |
text-align: center;
|
7 |
}
|
8 |
|
|
|
|
|
|
|
|
|
9 |
.epyt-gallery iframe {
|
10 |
margin-bottom: 0;
|
11 |
}
|
@@ -21,6 +30,10 @@
|
|
21 |
display: block;
|
22 |
}
|
23 |
|
|
|
|
|
|
|
|
|
24 |
.epyt-gallery-clear {
|
25 |
clear: both;
|
26 |
}
|
2 |
cursor: pointer; text-align: left; background-color: #dddddd; color: #000000;
|
3 |
}
|
4 |
|
5 |
+
iframe.__youtube_prefs__
|
6 |
+
{
|
7 |
+
border-width: 0;
|
8 |
+
}
|
9 |
+
|
10 |
.epyt-gallery {
|
11 |
text-align: center;
|
12 |
}
|
13 |
|
14 |
+
/*.epyt-gallery div[tabindex]:focus {
|
15 |
+
outline: none;
|
16 |
+
}*/
|
17 |
+
|
18 |
.epyt-gallery iframe {
|
19 |
margin-bottom: 0;
|
20 |
}
|
30 |
display: block;
|
31 |
}
|
32 |
|
33 |
+
.epyt-gallery-list p {
|
34 |
+
display: none;
|
35 |
+
}
|
36 |
+
|
37 |
.epyt-gallery-clear {
|
38 |
clear: both;
|
39 |
}
|
styles/ytprefs.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.epyt-gallery-clear,.epyt-gallery-rowbreak,.epyt-pagination{clear:both}.epyt-debug{cursor:pointer;text-align:left;background-color:#ddd;color:#000}.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;position:relative;transition:opacity ease-out .3s;display:block}.epyt-gallery-list.epyt-loading{opacity:.5;transition:opacity ease-out .3s}.epyt-gallery-thumb{box-sizing:border-box;overflow-y:hidden;display:block!important;cursor:pointer;opacity:.8;float:left;padding:0 8px 10px}.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{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.epyt-current-video .epyt-gallery-playhover,.epyt-gallery-thumb.hover .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:none;box-sizing:border-box}.epyt-gallery-notitle span,.epyt-gallery-thumb.epyt-listview+.epyt-gallery-rowbreak{display:none}.epyt-gallery-title{font-size:80%;line-height:120%;padding:10px}.epyt-gallery-notitle{padding:4px}.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-list.epyt-gallery-style-listview{margin-left:0;margin-right:0;margin-bottom:25px}.epyt-gallery-thumb.epyt-listview{width:100%!important;padding:0;margin:8px 0}.epyt-gallery-thumb.epyt-listview .epyt-gallery-img-box{float:left;width:150px;max-width:25%;margin-right:20px;margin-bottom:6px}.epyt-gallery-thumb.epyt-listview .epyt-gallery-title{padding:10px;text-align:left}.epyt-gallery-thumb.epyt-listview .epyt-gallery-dsc{font-size:75%;line-height:120%;padding:5px 10px 12px;text-align:left}.epyt-gallery-thumb.epyt-listview.hover{position:relative;background-color:#ddd;color:#000;transition:background-color ease-out .3s,color ease-out .3s}.epyt-pagination{text-align:center;padding:10px 8px}.epyt-pagenumbers>div,.epyt-pagination>div{display:inline-block;padding:0 2px;vertical-align:middle}.epyt-pagination .epyt-pagebutton{cursor:pointer;display:inline-block;padding: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-gallery-allthumbs.epyt-thumb-portal .epyt-gallery-thumb .epyt-gallery-img{border-radius:50%;padding-top:100%!important}.epyt-gallery-list.epyt-gallery-style-carousel{margin:0 0 50px}.epyt-gallery-list.epyt-gallery-style-carousel .epyt-pagination{display:none}.epyt-gallery-list.epyt-gallery-style-carousel .epyt-pagination:first-child{position:absolute;width:100%;display:block;margin:auto;top:0;bottom:0;padding:0;height:30px}.epyt-gallery-list.epyt-gallery-style-carousel .epyt-pagenumbers.hide{opacity:0}.epyt-gallery-list.epyt-gallery-style-carousel .epyt-gallery-allthumbs{margin:15px 35px}.epyt-gallery-list.epyt-gallery-style-carousel .epyt-gallery-thumb{padding-bottom:0;float:none;display:inline-block!important}.epyt-gallery-list.epyt-gallery-style-carousel .epyt-pagebutton>div{display:none}.epyt-gallery-list.epyt-gallery-style-carousel .epyt-pagebutton>div.arrow{background:url(../images/arrow-right.svg) no-repeat;background-size:contain;width:20px;height:100%;display:block;text-indent:-99999px;opacity:.7}.epyt-gallery-list.epyt-gallery-style-carousel .epyt-pagebutton>div.arrow:hover{opacity:1}.epyt-gallery-list.epyt-gallery-style-carousel .epyt-pagebutton.epyt-prev>div.arrow{background-image:url(../images/arrow-left.svg)}.epyt-gallery-list.epyt-gallery-style-carousel .epyt-pagebutton{padding:0;margin-top:-2px}.epyt-gallery-list.epyt-gallery-style-carousel .epyt-next{float:right}.epyt-gallery-list.epyt-gallery-style-carousel .epyt-prev{float:left}.epyt-gallery-list.epyt-gallery-style-carousel .epyt-pagenumbers{position:absolute;top:100%;left:0;right:0}.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;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:0 0}#wpadminbar #wp-admin-bar-ytprefs-bar-cache>.ab-item:before{content:"\f311";top:2px}
|
1 |
+
.epyt-gallery-clear,.epyt-gallery-rowbreak,.epyt-pagination{clear:both}.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;position:relative;transition:opacity ease-out .3s;display:block}.epyt-gallery-list p{display:none}.epyt-gallery-list.epyt-loading{opacity:.5;transition:opacity ease-out .3s}.epyt-gallery-thumb{box-sizing:border-box;overflow-y:hidden;display:block!important;cursor:pointer;opacity:.8;float:left;padding:0 8px 10px}.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{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.epyt-current-video .epyt-gallery-playhover,.epyt-gallery-thumb.hover .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:none;box-sizing:border-box}.epyt-gallery-notitle span,.epyt-gallery-thumb.epyt-listview+.epyt-gallery-rowbreak{display:none}.epyt-gallery-title{font-size:80%;line-height:120%;padding:10px}.epyt-gallery-notitle{padding:4px}.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-list.epyt-gallery-style-listview{margin-left:0;margin-right:0;margin-bottom:25px}.epyt-gallery-thumb.epyt-listview{width:100%!important;padding:0;margin:8px 0}.epyt-gallery-thumb.epyt-listview .epyt-gallery-img-box{float:left;width:150px;max-width:25%;margin-right:20px;margin-bottom:6px}.epyt-gallery-thumb.epyt-listview .epyt-gallery-title{padding:10px;text-align:left}.epyt-gallery-thumb.epyt-listview .epyt-gallery-dsc{font-size:75%;line-height:120%;padding:5px 10px 12px;text-align:left}.epyt-gallery-thumb.epyt-listview.hover{position:relative;background-color:#ddd;color:#000;transition:background-color ease-out .3s,color ease-out .3s}.epyt-pagination{text-align:center;padding:10px 8px}.epyt-pagenumbers>div,.epyt-pagination>div{display:inline-block;padding:0 2px;vertical-align:middle}.epyt-pagination .epyt-pagebutton{cursor:pointer;display:inline-block;padding: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-gallery-allthumbs.epyt-thumb-portal .epyt-gallery-thumb .epyt-gallery-img{border-radius:50%;padding-top:100%!important}.epyt-gallery-list.epyt-gallery-style-carousel{margin:0 0 50px}.epyt-gallery-list.epyt-gallery-style-carousel .epyt-pagination{display:none}.epyt-gallery-list.epyt-gallery-style-carousel .epyt-pagination:first-child{position:absolute;width:100%;display:block;margin:auto;top:0;bottom:0;padding:0;height:30px}.epyt-gallery-list.epyt-gallery-style-carousel .epyt-pagenumbers.hide{opacity:0}.epyt-gallery-list.epyt-gallery-style-carousel .epyt-gallery-allthumbs{margin:15px 35px}.epyt-gallery-list.epyt-gallery-style-carousel .epyt-gallery-thumb{padding-bottom:0;float:none;display:inline-block!important}.epyt-gallery-list.epyt-gallery-style-carousel .epyt-pagebutton>div{display:none}.epyt-gallery-list.epyt-gallery-style-carousel .epyt-pagebutton>div.arrow{background:url(../images/arrow-right.svg) no-repeat;background-size:contain;width:20px;height:100%;display:block;text-indent:-99999px;opacity:.7}.epyt-gallery-list.epyt-gallery-style-carousel .epyt-pagebutton>div.arrow:hover{opacity:1}.epyt-gallery-list.epyt-gallery-style-carousel .epyt-pagebutton.epyt-prev>div.arrow{background-image:url(../images/arrow-left.svg)}.epyt-gallery-list.epyt-gallery-style-carousel .epyt-pagebutton{padding:0;margin-top:-2px}.epyt-gallery-list.epyt-gallery-style-carousel .epyt-next{float:right}.epyt-gallery-list.epyt-gallery-style-carousel .epyt-prev{float:left}.epyt-gallery-list.epyt-gallery-style-carousel .epyt-pagenumbers{position:absolute;top:100%;left:0;right:0}.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;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:0 0}#wpadminbar #wp-admin-bar-ytprefs-bar-cache>.ab-item:before{content:"\f311";top:2px}
|
youtube.php
CHANGED
@@ -3,14 +3,14 @@
|
|
3 |
Plugin Name: YouTube
|
4 |
Plugin URI: http://www.embedplus.com/dashboard/pro-easy-video-analytics.aspx
|
5 |
Description: YouTube embed plugin. Embed a responsive YouTube video, playlist gallery, or channel gallery. Add video thumbnails, analytics, SEO, caching...
|
6 |
-
Version: 11.
|
7 |
Author: EmbedPlus Team
|
8 |
Author URI: http://www.embedplus.com
|
9 |
*/
|
10 |
|
11 |
/*
|
12 |
YouTube
|
13 |
-
Copyright (C)
|
14 |
|
15 |
This program is free software: you can redistribute it and/or modify
|
16 |
it under the terms of the GNU General Public License as published by
|
@@ -32,8 +32,8 @@
|
|
32 |
class YouTubePrefs
|
33 |
{
|
34 |
|
35 |
-
public static $
|
36 |
-
public static $version = '11.
|
37 |
public static $opt_version = 'version';
|
38 |
public static $optembedwidth = null;
|
39 |
public static $optembedheight = null;
|
@@ -74,6 +74,7 @@ class YouTubePrefs
|
|
74 |
public static $opt_origin = 'origin';
|
75 |
public static $opt_widgetfit = 'widgetfit';
|
76 |
public static $opt_evselector_light = 'evselector_light';
|
|
|
77 |
public static $opt_defaultdims = 'defaultdims';
|
78 |
public static $opt_defaultwidth = 'width';
|
79 |
public static $opt_defaultheight = 'height';
|
@@ -85,6 +86,7 @@ class YouTubePrefs
|
|
85 |
public static $opt_spdc = 'spdc';
|
86 |
public static $opt_spdcab = 'spdcab';
|
87 |
public static $opt_spdcexp = 'spdcexp';
|
|
|
88 |
public static $opt_migrate = 'migrate';
|
89 |
public static $opt_migrate_youtube = 'migrate_youtube';
|
90 |
public static $opt_migrate_embedplusvideo = 'migrate_embedplusvideo';
|
@@ -112,6 +114,7 @@ class YouTubePrefs
|
|
112 |
public static $opt_gallery_showdsc = 'gallery_showdsc';
|
113 |
public static $opt_gallery_thumbcrop = 'gallery_thumbcrop';
|
114 |
public static $opt_gallery_disptype = 'gallery_disptype';
|
|
|
115 |
public static $opt_admin_off_scripts = 'admin_off_scripts';
|
116 |
public static $opt_alloptions = 'youtubeprefs_alloptions';
|
117 |
public static $alloptions = null;
|
@@ -176,8 +179,8 @@ class YouTubePrefs
|
|
176 |
self::$opt_theme,
|
177 |
self::$opt_color,
|
178 |
self::$opt_listType,
|
179 |
-
self::$opt_wmode,
|
180 |
-
self::$opt_vq,
|
181 |
'index',
|
182 |
'list',
|
183 |
'start',
|
@@ -727,7 +730,12 @@ class YouTubePrefs
|
|
727 |
epresponsiveselector: <?php echo self::get_responsiveselector(); ?>,
|
728 |
version: "<?php echo self::$alloptions[self::$opt_version] ?>",
|
729 |
epdovol: true,
|
730 |
-
evselector: '<?php echo self::get_evselector(); ?>'
|
|
|
|
|
|
|
|
|
|
|
731 |
};
|
732 |
</script>
|
733 |
<?php
|
@@ -775,10 +783,12 @@ class YouTubePrefs
|
|
775 |
$_responsive_all = 1;
|
776 |
$_widgetfit = 1;
|
777 |
$_evselector_light = 0;
|
|
|
778 |
$_schemaorg = 0;
|
779 |
$_ftpostimg = 0;
|
780 |
$_spdc = 0;
|
781 |
$_spdcexp = 24;
|
|
|
782 |
$_spdcab = 1;
|
783 |
$_dynload = 0;
|
784 |
$_dyntype = '';
|
@@ -812,6 +822,7 @@ class YouTubePrefs
|
|
812 |
$_gallery_showdsc = 0;
|
813 |
$_gallery_thumbcrop = 'box';
|
814 |
$_gallery_disptype = 'default';
|
|
|
815 |
$_debugmode = 0;
|
816 |
$_admin_off_scripts = 0;
|
817 |
$_old_script_method = 0;
|
@@ -857,10 +868,12 @@ class YouTubePrefs
|
|
857 |
$_responsive_all = self::tryget($arroptions, self::$opt_responsive_all, 1);
|
858 |
$_widgetfit = self::tryget($arroptions, self::$opt_widgetfit, 1);
|
859 |
$_evselector_light = self::tryget($arroptions, self::$opt_evselector_light, 0);
|
|
|
860 |
$_schemaorg = self::tryget($arroptions, self::$opt_schemaorg, 0);
|
861 |
$_ftpostimg = self::tryget($arroptions, self::$opt_ftpostimg, 0);
|
862 |
$_spdc = self::tryget($arroptions, self::$opt_spdc, 0);
|
863 |
$_spdcexp = self::tryget($arroptions, self::$opt_spdcexp, 24);
|
|
|
864 |
$_spdcab = self::tryget($arroptions, self::$opt_spdcab, 1);
|
865 |
$_dynload = self::tryget($arroptions, self::$opt_dynload, 0);
|
866 |
$_dyntype = self::tryget($arroptions, self::$opt_dyntype, '');
|
@@ -889,6 +902,7 @@ class YouTubePrefs
|
|
889 |
$_gallery_customnext = self::tryget($arroptions, self::$opt_gallery_customnext, $_gallery_customnext);
|
890 |
$_gallery_customprev = self::tryget($arroptions, self::$opt_gallery_customprev, $_gallery_customprev);
|
891 |
$_gallery_showdsc = self::tryget($arroptions, self::$opt_gallery_showdsc, $_gallery_showdsc);
|
|
|
892 |
$_admin_off_scripts = self::tryget($arroptions, self::$opt_admin_off_scripts, $_admin_off_scripts);
|
893 |
}
|
894 |
else
|
@@ -932,10 +946,12 @@ class YouTubePrefs
|
|
932 |
self::$opt_responsive_all => $_responsive_all,
|
933 |
self::$opt_widgetfit => $_widgetfit,
|
934 |
self::$opt_evselector_light => $_evselector_light,
|
|
|
935 |
self::$opt_schemaorg => $_schemaorg,
|
936 |
self::$opt_ftpostimg => $_ftpostimg,
|
937 |
self::$opt_spdc => $_spdc,
|
938 |
self::$opt_spdcexp => $_spdcexp,
|
|
|
939 |
self::$opt_spdcab => $_spdcab,
|
940 |
self::$opt_dynload => $_dynload,
|
941 |
self::$opt_dyntype => $_dyntype,
|
@@ -964,6 +980,7 @@ class YouTubePrefs
|
|
964 |
self::$opt_gallery_thumbcrop => $_gallery_thumbcrop,
|
965 |
self::$opt_gallery_disptype => $_gallery_disptype,
|
966 |
self::$opt_gallery_pagesize => $_gallery_pagesize,
|
|
|
967 |
self::$opt_debugmode => $_debugmode,
|
968 |
self::$opt_admin_off_scripts => $_admin_off_scripts,
|
969 |
self::$opt_old_script_method => $_old_script_method
|
@@ -978,7 +995,7 @@ class YouTubePrefs
|
|
978 |
if (self::$alloptions[self::$opt_spdc] == 1)
|
979 |
{
|
980 |
self::spdcpurge();
|
981 |
-
wp_remote_get(site_url(), array('timeout' => self::$
|
982 |
}
|
983 |
}
|
984 |
catch (Exception $ex)
|
@@ -1170,7 +1187,7 @@ class YouTubePrefs
|
|
1170 |
$code = '';
|
1171 |
$init_id = null;
|
1172 |
|
1173 |
-
$apiResult = wp_remote_get($apiEndpoint, array('timeout' => self::$
|
1174 |
|
1175 |
if (is_wp_error($apiResult))
|
1176 |
{
|
@@ -1183,8 +1200,9 @@ class YouTubePrefs
|
|
1183 |
if (self::$alloptions[self::$opt_debugmode] == 1 && current_user_can('manage_options'))
|
1184 |
{
|
1185 |
$redactedEndpoint = preg_replace('@&key=[^&]+@i', '&key=PRIVATE', $apiEndpoint);
|
|
|
1186 |
$gallobj->html = '<pre onclick="_EPADashboard_.selectText(this);" class="epyt-debug">CLICK this debug text to auto-select all. Then, COPY the selection.' . "\n\n" .
|
1187 |
-
'THIS IS DEBUG MODE OUTPUT. UNCHECK THE OPTION IN THE SETTINGS PAGE ONCE YOU ARE DONE DEBUGGING TO PUT THINGS BACK TO NORMAL.' . "\n\n" . $redactedEndpoint . "\n\n" . print_r($apiResult, true) . '</pre>';
|
1188 |
return $gallobj;
|
1189 |
}
|
1190 |
|
@@ -1278,11 +1296,16 @@ class YouTubePrefs
|
|
1278 |
$thumb->img = $item->snippet->thumbnails->default->url;
|
1279 |
$thumb->quality = 'default';
|
1280 |
}
|
1281 |
-
|
1282 |
{
|
1283 |
$thumb->img = $item->snippet->thumbnails->medium->url;
|
1284 |
$thumb->quality = 'medium';
|
1285 |
}
|
|
|
|
|
|
|
|
|
|
|
1286 |
}
|
1287 |
|
1288 |
$code .= self::get_thumbnail_html($thumb, $options);
|
@@ -1435,7 +1458,49 @@ class YouTubePrefs
|
|
1435 |
$linkparams['v'] = array_pop($vtemp);
|
1436 |
}
|
1437 |
|
1438 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1439 |
$youtubebaseurl = 'youtube';
|
1440 |
$schemaorgoutput = '';
|
1441 |
$voloutput = '';
|
@@ -1451,7 +1516,7 @@ class YouTubePrefs
|
|
1451 |
$finalparams = $linkparams + self::$alloptions;
|
1452 |
|
1453 |
$spdckey = '';
|
1454 |
-
if (self::$alloptions[self::$opt_pro] && strlen(trim(self::$alloptions[self::$opt_pro])) > 0 && self::$alloptions[self::$opt_spdc] == 1)
|
1455 |
{
|
1456 |
try
|
1457 |
{
|
@@ -1480,22 +1545,11 @@ class YouTubePrefs
|
|
1480 |
$youtubebaseurl = 'youtube-nocookie';
|
1481 |
}
|
1482 |
|
1483 |
-
|
1484 |
-
// if (self::$alloptions[self::$opt_ssl] == 1)
|
1485 |
-
// {
|
1486 |
-
// $linkscheme = 'https';
|
1487 |
-
// }
|
1488 |
-
|
1489 |
if (self::$alloptions[self::$opt_defaultvol] == 1)
|
1490 |
{
|
1491 |
$voloutput = ' data-vol="' . self::$alloptions[self::$opt_vol] . '" ';
|
1492 |
}
|
1493 |
|
1494 |
-
|
1495 |
-
// if (!(self::$alloptions[self::$opt_dohl] == 1 && isset($finalparams[self::$opt_hl]) && strlen($finalparams[self::$opt_hl]) == 2))
|
1496 |
-
// {
|
1497 |
-
// unset($finalparams[self::$opt_hl]);
|
1498 |
-
// }
|
1499 |
if (self::$alloptions[self::$opt_dohl] == 1)
|
1500 |
{
|
1501 |
$locale = get_locale();
|
@@ -1520,7 +1574,6 @@ class YouTubePrefs
|
|
1520 |
}
|
1521 |
|
1522 |
if (self::$alloptions[self::$opt_dynload] == 1
|
1523 |
-
//&& $finalparams[self::$opt_autoplay] != 1
|
1524 |
)
|
1525 |
{
|
1526 |
$dynsrc = 'data-ep-';
|
@@ -1535,6 +1588,7 @@ class YouTubePrefs
|
|
1535 |
|
1536 |
if (isset($finalparams['layout']) && strtolower($finalparams['layout']) == 'gallery' && isset($finalparams['list']) && isset($finalparams[self::$opt_gallery_disptype]) && $finalparams[self::$opt_gallery_disptype] === 'lb')
|
1537 |
{
|
|
|
1538 |
$disptype = ' epyt-lb';
|
1539 |
$beginlb = '<div class="lity-hide">';
|
1540 |
$endlb = '</div>';
|
@@ -1602,10 +1656,7 @@ class YouTubePrefs
|
|
1602 |
|
1603 |
// playlist cleanup
|
1604 |
$videoidoutput = isset($linkparams['v']) ? $linkparams['v'] : '';
|
1605 |
-
|
1606 |
-
{
|
1607 |
-
//$videoseries = 'videoseries/';
|
1608 |
-
}
|
1609 |
if ((self::$alloptions[self::$opt_playlistorder] == 1 || isset($finalparams['plindex'])) && isset($finalparams['list']))
|
1610 |
{
|
1611 |
try
|
@@ -1658,19 +1709,18 @@ class YouTubePrefs
|
|
1658 |
|
1659 |
$gallery_page_obj = self::get_gallery_page($gallery_options);
|
1660 |
|
1661 |
-
//$dynsrc = '';// 'data-ep-gallery';
|
1662 |
$galleryWrapper1 = '<div class="epyt-gallery ' . $disptype . '" data-currpage="1" id="' . $galleryid . '">';
|
1663 |
$galleryWrapper2 = '</div>';
|
1664 |
$galleryCode = $subbutton . '<div class="epyt-gallery-list epyt-gallery-style-' . esc_attr($gallery_options->style) . '">' .
|
1665 |
$gallery_page_obj->html .
|
1666 |
'</div>';
|
1667 |
-
$videoidoutput = isset($gallery_page_obj->init_id) ? $gallery_page_obj->init_id : '';
|
1668 |
}
|
1669 |
|
1670 |
|
1671 |
$code1 = $beginlb . '<iframe ' . $dyntype . $centercode . ' id="_ytid_' . rand(10000, 99999) . '" width="' . self::$defaultwidth . '" height="' . self::$defaultheight .
|
1672 |
'" ' . $dynsrc . 'src="https://www.' . $youtubebaseurl . '.com/embed/' . $videoseries . $videoidoutput . '?';
|
1673 |
-
$code2 = '"
|
1674 |
'"' . $voloutput . $acctitle . $galleryid_ifm_data . ' allowfullscreen data-no-lazy="1"></iframe>' . $endlb . $schemaorgoutput;
|
1675 |
|
1676 |
$origin = '';
|
@@ -1701,27 +1751,27 @@ class YouTubePrefs
|
|
1701 |
}
|
1702 |
else
|
1703 |
{
|
1704 |
-
|
1705 |
-
if ($key == 'loop' && $value == 1 && !isset($finalparams['list']))
|
1706 |
{
|
1707 |
-
$finalsrc .= '
|
|
|
|
|
|
|
|
|
1708 |
}
|
1709 |
}
|
1710 |
}
|
1711 |
}
|
1712 |
}
|
1713 |
|
1714 |
-
$code = $galleryWrapper1 . $code1 . $finalsrc . $code2 . $galleryCode . $galleryWrapper2;
|
1715 |
-
|
1716 |
self::$defaultheight = null;
|
1717 |
self::$defaultwidth = null;
|
1718 |
self::$oembeddata = null;
|
1719 |
|
1720 |
|
1721 |
-
|
1722 |
-
|
1723 |
-
|
1724 |
-
if (self::$alloptions[self::$opt_pro] && strlen(trim(self::$alloptions[self::$opt_pro])) > 0 && self::$alloptions[self::$opt_spdc] == 1)
|
1725 |
{
|
1726 |
$daysecs = self::$alloptions[self::$opt_spdcexp] * 60 * 60;
|
1727 |
set_transient($spdckey, $code, $daysecs);
|
@@ -1778,7 +1828,7 @@ class YouTubePrefs
|
|
1778 |
$ytapilink = 'https://www.googleapis.com/youtube/v3/videos?id=' . $vidid . '&part=contentDetails,snippet&key=' . self::$alloptions[self::$opt_apikey];
|
1779 |
|
1780 |
|
1781 |
-
$apidata = wp_remote_get($ytapilink, array('timeout' => self::$
|
1782 |
if (!is_wp_error($apidata))
|
1783 |
{
|
1784 |
$raw = wp_remote_retrieve_body($apidata);
|
@@ -1985,7 +2035,7 @@ class YouTubePrefs
|
|
1985 |
. '&maxResults=10&key=' . self::$alloptions[self::$opt_apikey];
|
1986 |
try
|
1987 |
{
|
1988 |
-
$apiResult = wp_remote_get($apiEndpoint, array('timeout' => self::$
|
1989 |
if (!is_wp_error($apiResult))
|
1990 |
{
|
1991 |
$jsonResult = json_decode($apiResult['body']);
|
@@ -2242,6 +2292,28 @@ class YouTubePrefs
|
|
2242 |
die();
|
2243 |
}
|
2244 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2245 |
public static function my_embedplus_clearspdc()
|
2246 |
{
|
2247 |
$result = array();
|
@@ -2376,11 +2448,11 @@ class YouTubePrefs
|
|
2376 |
$new_pointer_content .= '<p>'; // ooopointer
|
2377 |
if (!(self::$alloptions[self::$opt_pro] && strlen(trim(self::$alloptions[self::$opt_pro])) > 0))
|
2378 |
{
|
2379 |
-
$new_pointer_content .= __("This update
|
2380 |
}
|
2381 |
else
|
2382 |
{
|
2383 |
-
$new_pointer_content .= __("This update
|
2384 |
}
|
2385 |
$new_pointer_content .= '</p>';
|
2386 |
|
@@ -2462,6 +2534,7 @@ class YouTubePrefs
|
|
2462 |
$new_options[self::$opt_responsive] = self::postchecked(self::$opt_responsive) ? 1 : 0;
|
2463 |
$new_options[self::$opt_widgetfit] = self::postchecked(self::$opt_widgetfit) ? 1 : 0;
|
2464 |
$new_options[self::$opt_evselector_light] = self::postchecked(self::$opt_evselector_light) ? 1 : 0;
|
|
|
2465 |
$new_options[self::$opt_schemaorg] = self::postchecked(self::$opt_schemaorg) ? 1 : 0;
|
2466 |
$new_options[self::$opt_ftpostimg] = self::postchecked(self::$opt_ftpostimg) ? 1 : 0;
|
2467 |
$new_options[self::$opt_spdc] = self::postchecked(self::$opt_spdc) ? 1 : 0;
|
@@ -2665,6 +2738,17 @@ class YouTubePrefs
|
|
2665 |
}
|
2666 |
$new_options[self::$opt_gallery_customnext] = $_gallery_custom_next;
|
2667 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2668 |
|
2669 |
$_apikey = $all[self::$opt_apikey];
|
2670 |
try
|
@@ -2741,7 +2825,7 @@ class YouTubePrefs
|
|
2741 |
self::spdcpurge();
|
2742 |
if ($all[self::$opt_spdc] == 1)
|
2743 |
{
|
2744 |
-
wp_remote_get(site_url(), array('timeout' => self::$
|
2745 |
}
|
2746 |
}
|
2747 |
catch (Exception $ex)
|
@@ -2866,8 +2950,10 @@ class YouTubePrefs
|
|
2866 |
-webkit-box-shadow: 0px 0px 10px 0px rgba(0,0,0,0.75);
|
2867 |
-moz-box-shadow: 0px 0px 10px 0px rgba(0,0,0,0.75);
|
2868 |
box-shadow: 0px 0px 10px 0px rgba(0,0,0,0.75); }
|
2869 |
-
|
2870 |
-
|
|
|
|
|
2871 |
<br>
|
2872 |
<div id="jumphowto"></div>
|
2873 |
<div class="ytnav">
|
@@ -2941,7 +3027,6 @@ class YouTubePrefs
|
|
2941 |
<p>
|
2942 |
<?php _e("One of the benefits of using this plugin is that you can set site-wide default options for all your videos (click \"Save Changes\" when finished). However, you can also override them (and more) on a per-video basis. Directions on how to do that are in the next section.") ?>
|
2943 |
</p>
|
2944 |
-
<?php // self::save_changes_button(); ?>
|
2945 |
|
2946 |
<div class="ytindent chx">
|
2947 |
<p>
|
@@ -3094,8 +3179,20 @@ class YouTubePrefs
|
|
3094 |
Note that this is not for setting the thumbnail list order of galleries, just the standard playlist player that YouTube provides.
|
3095 |
</label>
|
3096 |
</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3097 |
|
3098 |
|
|
|
|
|
3099 |
|
3100 |
</div>
|
3101 |
|
@@ -3127,7 +3224,7 @@ class YouTubePrefs
|
|
3127 |
</label>
|
3128 |
<div id="boxmigratelist">
|
3129 |
<ul>
|
3130 |
-
<li><input name="<?php echo self::$opt_migrate_embedplusvideo; ?>" id="<?php echo self::$opt_migrate_embedplusvideo; ?>" <?php checked($all[self::$opt_migrate_embedplusvideo], 1); ?> type="checkbox" class="checkbox"><label for="<?php echo self::$opt_migrate_embedplusvideo; ?>"><b>"YouTube Advanced Embed":</b>
|
3131 |
<li><input name="<?php echo self::$opt_migrate_youtube; ?>" id="<?php echo self::$opt_migrate_youtube; ?>" <?php checked($all[self::$opt_migrate_youtube], 1); ?> type="checkbox" class="checkbox"><label for="<?php echo self::$opt_migrate_youtube; ?>"><b>"YouTube Embed":</b> <code>[youtube]</code> and <code>[youtube_video]</code> shortcodes</label></li>
|
3132 |
<li class="smallnote orange" style="list-style: none;">This feature is beta. More shortcodes coming.</li>
|
3133 |
</ul>
|
@@ -3147,6 +3244,13 @@ class YouTubePrefs
|
|
3147 |
Check this option if you're having issues with autoplayed videos or background videos etc. that have been generated by your theme.
|
3148 |
</label>
|
3149 |
</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3150 |
<p>
|
3151 |
<input name="<?php echo self::$opt_debugmode; ?>" id="<?php echo self::$opt_debugmode; ?>" <?php checked($all[self::$opt_debugmode], 1); ?> type="checkbox" class="checkbox">
|
3152 |
<label for="<?php echo self::$opt_debugmode; ?>">
|
@@ -3222,7 +3326,7 @@ class YouTubePrefs
|
|
3222 |
</p>
|
3223 |
<p>
|
3224 |
<input name="<?php echo self::$opt_gallery_showpaging; ?>" id="<?php echo self::$opt_gallery_showpaging; ?>" <?php checked($all[self::$opt_gallery_showpaging], 1); ?> type="checkbox" class="checkbox">
|
3225 |
-
<label for="<?php echo self::$opt_gallery_showpaging; ?>"><b class="chktitle">Show Pagination:</b>
|
3226 |
</p>
|
3227 |
<p>
|
3228 |
<input name="<?php echo self::$opt_gallery_customarrows; ?>" id="<?php echo self::$opt_gallery_customarrows; ?>" <?php checked($all[self::$opt_gallery_customarrows], 1); ?> type="checkbox" class="checkbox">
|
@@ -3237,7 +3341,7 @@ class YouTubePrefs
|
|
3237 |
<p>
|
3238 |
<input name="<?php echo self::$opt_gallery_channelsub; ?>" id="<?php echo self::$opt_gallery_channelsub; ?>" <?php checked($all[self::$opt_gallery_channelsub], 1); ?> type="checkbox" class="checkbox">
|
3239 |
<label for="<?php echo self::$opt_gallery_channelsub; ?>">
|
3240 |
-
<b class="chktitle">Show Subscribe Button: </b>
|
3241 |
</label>
|
3242 |
<span id="boxchannelsub">
|
3243 |
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_attr(trim($all[self::$opt_gallery_channelsublink])); ?>" class="textinput" style="width: 200px;">
|
@@ -3257,11 +3361,11 @@ class YouTubePrefs
|
|
3257 |
</p>
|
3258 |
<p>
|
3259 |
<input name="<?php echo self::$opt_gallery_autonext; ?>" id="<?php echo self::$opt_gallery_autonext; ?>" <?php checked($all[self::$opt_gallery_autonext], 1); ?> type="checkbox" class="checkbox">
|
3260 |
-
<label for="<?php echo self::$opt_gallery_autonext; ?>"><b class="chktitle">Automatic Continuous Play:</b>
|
3261 |
</p>
|
3262 |
<p>
|
3263 |
<input name="<?php echo self::$opt_gallery_thumbplay; ?>" id="<?php echo self::$opt_gallery_thumbplay; ?>" <?php checked($all[self::$opt_gallery_thumbplay], 1); ?> type="checkbox" class="checkbox">
|
3264 |
-
<label for="<?php echo self::$opt_gallery_thumbplay; ?>"><b class="chktitle">Thumbnail Click Plays Video:</b>
|
3265 |
</p>
|
3266 |
<div class="pad20">
|
3267 |
<p>
|
@@ -3360,7 +3464,7 @@ class YouTubePrefs
|
|
3360 |
<br>
|
3361 |
<label>
|
3362 |
<input name="<?php echo self::$opt_spdcab; ?>" id="<?php echo self::$opt_spdcab; ?>" <?php checked($all[self::$opt_spdcab], 1); ?> type="checkbox" class="checkbox">
|
3363 |
-
<b class="chktitle">Show "Clear YouTube Cache" Admin Bar Button: </b>
|
3364 |
This will display the "Clear YouTube Cache" button conveniently in the top admin bar. Uncheck this if you wish to hide the button.
|
3365 |
</label>
|
3366 |
|
@@ -3406,6 +3510,7 @@ class YouTubePrefs
|
|
3406 |
<option value="flipInY" <?php echo 'flipInY' === $cleandyn ? 'selected' : '' ?> >flip left/right</option>
|
3407 |
<option value="pulse" <?php echo 'pulse' === $cleandyn ? 'selected' : '' ?> >pulse</option>
|
3408 |
<option value="tada" <?php echo 'tada' === $cleandyn ? 'selected' : '' ?> >jiggle</option>
|
|
|
3409 |
<option value="fadeInDown" <?php echo 'fadeInDown' === $cleandyn ? 'selected' : '' ?> >fade in downward</option>
|
3410 |
<option value="fadeInUp" <?php echo 'fadeInUp' === $cleandyn ? 'selected' : '' ?> >fade in upward</option>
|
3411 |
<option value="zoomInDown" <?php echo 'zoomInDown' === $cleandyn ? 'selected' : '' ?> >zoom in downward</option>
|
@@ -3541,7 +3646,7 @@ class YouTubePrefs
|
|
3541 |
?>
|
3542 |
<div class="clearboth"></div>
|
3543 |
</div>
|
3544 |
-
|
3545 |
|
3546 |
<hr>
|
3547 |
|
@@ -4262,7 +4367,7 @@ class YouTubePrefs
|
|
4262 |
wp_add_inline_style('__EPYT__style', $custom_css);
|
4263 |
|
4264 |
|
4265 |
-
if (!is_admin() && (self::$alloptions[self::$opt_pro] && strlen(trim(self::$alloptions[self::$opt_pro])) > 8))
|
4266 |
{
|
4267 |
wp_enqueue_style('__disptype__', plugins_url('scripts/lity' . self::$min . '.css', __FILE__));
|
4268 |
wp_enqueue_script('__dispload__', plugins_url('scripts/lity' . self::$min . '.js', __FILE__), array('jquery'));
|
@@ -4272,7 +4377,7 @@ class YouTubePrefs
|
|
4272 |
|
4273 |
if (self::$alloptions[self::$opt_old_script_method] != 1)
|
4274 |
{
|
4275 |
-
|
4276 |
'ajaxurl' => admin_url('admin-ajax.php'),
|
4277 |
'security' => wp_create_nonce('embedplus-nonce'),
|
4278 |
'gallery_scrolloffset' => intval(self::$alloptions[self::$opt_gallery_scrolloffset]),
|
@@ -4280,8 +4385,15 @@ class YouTubePrefs
|
|
4280 |
'epresponsiveselector' => self::get_responsiveselector(),
|
4281 |
'epdovol' => true,
|
4282 |
'version' => self::$alloptions[self::$opt_version],
|
4283 |
-
'evselector' => self::get_evselector()
|
4284 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4285 |
}
|
4286 |
|
4287 |
////////////////////// cloudflare accomodation
|
@@ -4445,6 +4557,7 @@ class YouTubePrefs
|
|
4445 |
|
4446 |
|
4447 |
add_action("wp_ajax_my_embedplus_pro_record", array('YouTubePrefs', 'my_embedplus_pro_record'));
|
|
|
4448 |
add_action("wp_ajax_my_embedplus_clearspdc", array('YouTubePrefs', 'my_embedplus_clearspdc'));
|
4449 |
add_action("wp_ajax_my_embedplus_glance_vids", array('YouTubePrefs', 'my_embedplus_glance_vids'));
|
4450 |
add_action("wp_ajax_my_embedplus_glance_count", array('YouTubePrefs', 'my_embedplus_glance_count'));
|
@@ -4511,10 +4624,10 @@ class YouTubePrefs
|
|
4511 |
var embedcode = "";
|
4512 |
try
|
4513 |
{
|
4514 |
-
if (e.data.indexOf("youtubeembedplus")
|
4515 |
{
|
4516 |
-
|
4517 |
embedcode = e.data.split("|")[1];
|
|
|
4518 |
if (embedcode.indexOf("[") !== 0)
|
4519 |
{
|
4520 |
embedcode = "<p>" + embedcode + "</p>";
|
@@ -4549,12 +4662,37 @@ class YouTubePrefs
|
|
4549 |
}
|
4550 |
tb_remove();
|
4551 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4552 |
}
|
|
|
4553 |
}
|
4554 |
catch (err)
|
4555 |
{
|
4556 |
-
|
4557 |
-
console.log(err.message);
|
4558 |
}
|
4559 |
|
4560 |
|
3 |
Plugin Name: YouTube
|
4 |
Plugin URI: http://www.embedplus.com/dashboard/pro-easy-video-analytics.aspx
|
5 |
Description: YouTube embed plugin. Embed a responsive YouTube video, playlist gallery, or channel gallery. Add video thumbnails, analytics, SEO, caching...
|
6 |
+
Version: 11.6
|
7 |
Author: EmbedPlus Team
|
8 |
Author URI: http://www.embedplus.com
|
9 |
*/
|
10 |
|
11 |
/*
|
12 |
YouTube
|
13 |
+
Copyright (C) 2017 EmbedPlus.com
|
14 |
|
15 |
This program is free software: you can redistribute it and/or modify
|
16 |
it under the terms of the GNU General Public License as published by
|
32 |
class YouTubePrefs
|
33 |
{
|
34 |
|
35 |
+
public static $curltimeout = 20;
|
36 |
+
public static $version = '11.6';
|
37 |
public static $opt_version = 'version';
|
38 |
public static $optembedwidth = null;
|
39 |
public static $optembedheight = null;
|
74 |
public static $opt_origin = 'origin';
|
75 |
public static $opt_widgetfit = 'widgetfit';
|
76 |
public static $opt_evselector_light = 'evselector_light';
|
77 |
+
public static $opt_stop_mobile_buffer = 'stop_mobile_buffer';
|
78 |
public static $opt_defaultdims = 'defaultdims';
|
79 |
public static $opt_defaultwidth = 'width';
|
80 |
public static $opt_defaultheight = 'height';
|
86 |
public static $opt_spdc = 'spdc';
|
87 |
public static $opt_spdcab = 'spdcab';
|
88 |
public static $opt_spdcexp = 'spdcexp';
|
89 |
+
public static $opt_dashpre = 'dashpre';
|
90 |
public static $opt_migrate = 'migrate';
|
91 |
public static $opt_migrate_youtube = 'migrate_youtube';
|
92 |
public static $opt_migrate_embedplusvideo = 'migrate_embedplusvideo';
|
114 |
public static $opt_gallery_showdsc = 'gallery_showdsc';
|
115 |
public static $opt_gallery_thumbcrop = 'gallery_thumbcrop';
|
116 |
public static $opt_gallery_disptype = 'gallery_disptype';
|
117 |
+
public static $opt_not_live_content = 'not_live_content';
|
118 |
public static $opt_admin_off_scripts = 'admin_off_scripts';
|
119 |
public static $opt_alloptions = 'youtubeprefs_alloptions';
|
120 |
public static $alloptions = null;
|
179 |
self::$opt_theme,
|
180 |
self::$opt_color,
|
181 |
self::$opt_listType,
|
182 |
+
//self::$opt_wmode,
|
183 |
+
//self::$opt_vq,
|
184 |
'index',
|
185 |
'list',
|
186 |
'start',
|
730 |
epresponsiveselector: <?php echo self::get_responsiveselector(); ?>,
|
731 |
version: "<?php echo self::$alloptions[self::$opt_version] ?>",
|
732 |
epdovol: true,
|
733 |
+
evselector: '<?php echo self::get_evselector(); ?>',
|
734 |
+
<?php
|
735 |
+
if (isset(self::$alloptions[self::$opt_pro]) && strlen(trim(self::$alloptions[self::$opt_pro])) > 8 && isset(self::$alloptions[self::$opt_dashpre]) && self::$alloptions[self::$opt_dashpre] == '1')
|
736 |
+
{
|
737 |
+
?> dshpre:true,<?php } ?>
|
738 |
+
stopMobileBuffer: <?php echo self::$alloptions[self::$opt_stop_mobile_buffer] == '1' ? 'true' : 'false' ?>
|
739 |
};
|
740 |
</script>
|
741 |
<?php
|
783 |
$_responsive_all = 1;
|
784 |
$_widgetfit = 1;
|
785 |
$_evselector_light = 0;
|
786 |
+
$_stop_mobile_buffer = 1;
|
787 |
$_schemaorg = 0;
|
788 |
$_ftpostimg = 0;
|
789 |
$_spdc = 0;
|
790 |
$_spdcexp = 24;
|
791 |
+
$_dashpre = 0;
|
792 |
$_spdcab = 1;
|
793 |
$_dynload = 0;
|
794 |
$_dyntype = '';
|
822 |
$_gallery_showdsc = 0;
|
823 |
$_gallery_thumbcrop = 'box';
|
824 |
$_gallery_disptype = 'default';
|
825 |
+
$_not_live_content = '';
|
826 |
$_debugmode = 0;
|
827 |
$_admin_off_scripts = 0;
|
828 |
$_old_script_method = 0;
|
868 |
$_responsive_all = self::tryget($arroptions, self::$opt_responsive_all, 1);
|
869 |
$_widgetfit = self::tryget($arroptions, self::$opt_widgetfit, 1);
|
870 |
$_evselector_light = self::tryget($arroptions, self::$opt_evselector_light, 0);
|
871 |
+
$_stop_mobile_buffer = self::tryget($arroptions, self::$opt_stop_mobile_buffer, 1);
|
872 |
$_schemaorg = self::tryget($arroptions, self::$opt_schemaorg, 0);
|
873 |
$_ftpostimg = self::tryget($arroptions, self::$opt_ftpostimg, 0);
|
874 |
$_spdc = self::tryget($arroptions, self::$opt_spdc, 0);
|
875 |
$_spdcexp = self::tryget($arroptions, self::$opt_spdcexp, 24);
|
876 |
+
$_dashpre = self::tryget($arroptions, self::$opt_dashpre, 0);
|
877 |
$_spdcab = self::tryget($arroptions, self::$opt_spdcab, 1);
|
878 |
$_dynload = self::tryget($arroptions, self::$opt_dynload, 0);
|
879 |
$_dyntype = self::tryget($arroptions, self::$opt_dyntype, '');
|
902 |
$_gallery_customnext = self::tryget($arroptions, self::$opt_gallery_customnext, $_gallery_customnext);
|
903 |
$_gallery_customprev = self::tryget($arroptions, self::$opt_gallery_customprev, $_gallery_customprev);
|
904 |
$_gallery_showdsc = self::tryget($arroptions, self::$opt_gallery_showdsc, $_gallery_showdsc);
|
905 |
+
$_not_live_content = self::tryget($arroptions, self::$opt_not_live_content, $_not_live_content);
|
906 |
$_admin_off_scripts = self::tryget($arroptions, self::$opt_admin_off_scripts, $_admin_off_scripts);
|
907 |
}
|
908 |
else
|
946 |
self::$opt_responsive_all => $_responsive_all,
|
947 |
self::$opt_widgetfit => $_widgetfit,
|
948 |
self::$opt_evselector_light => $_evselector_light,
|
949 |
+
self::$opt_stop_mobile_buffer => $_stop_mobile_buffer,
|
950 |
self::$opt_schemaorg => $_schemaorg,
|
951 |
self::$opt_ftpostimg => $_ftpostimg,
|
952 |
self::$opt_spdc => $_spdc,
|
953 |
self::$opt_spdcexp => $_spdcexp,
|
954 |
+
self::$opt_dashpre => $_dashpre,
|
955 |
self::$opt_spdcab => $_spdcab,
|
956 |
self::$opt_dynload => $_dynload,
|
957 |
self::$opt_dyntype => $_dyntype,
|
980 |
self::$opt_gallery_thumbcrop => $_gallery_thumbcrop,
|
981 |
self::$opt_gallery_disptype => $_gallery_disptype,
|
982 |
self::$opt_gallery_pagesize => $_gallery_pagesize,
|
983 |
+
self::$opt_not_live_content => $_not_live_content,
|
984 |
self::$opt_debugmode => $_debugmode,
|
985 |
self::$opt_admin_off_scripts => $_admin_off_scripts,
|
986 |
self::$opt_old_script_method => $_old_script_method
|
995 |
if (self::$alloptions[self::$opt_spdc] == 1)
|
996 |
{
|
997 |
self::spdcpurge();
|
998 |
+
wp_remote_get(site_url(), array('timeout' => self::$curltimeout));
|
999 |
}
|
1000 |
}
|
1001 |
catch (Exception $ex)
|
1187 |
$code = '';
|
1188 |
$init_id = null;
|
1189 |
|
1190 |
+
$apiResult = wp_remote_get($apiEndpoint, array('timeout' => self::$curltimeout));
|
1191 |
|
1192 |
if (is_wp_error($apiResult))
|
1193 |
{
|
1200 |
if (self::$alloptions[self::$opt_debugmode] == 1 && current_user_can('manage_options'))
|
1201 |
{
|
1202 |
$redactedEndpoint = preg_replace('@&key=[^&]+@i', '&key=PRIVATE', $apiEndpoint);
|
1203 |
+
$active_plugins = get_option('active_plugins');
|
1204 |
$gallobj->html = '<pre onclick="_EPADashboard_.selectText(this);" class="epyt-debug">CLICK this debug text to auto-select all. Then, COPY the selection.' . "\n\n" .
|
1205 |
+
'THIS IS DEBUG MODE OUTPUT. UNCHECK THE OPTION IN THE SETTINGS PAGE ONCE YOU ARE DONE DEBUGGING TO PUT THINGS BACK TO NORMAL.' . "\n\n" . $redactedEndpoint . "\n\n" . print_r($apiResult, true) . "\n\nActive Plugins\n\n" . print_r($active_plugins, true) . '</pre>';
|
1206 |
return $gallobj;
|
1207 |
}
|
1208 |
|
1296 |
$thumb->img = $item->snippet->thumbnails->default->url;
|
1297 |
$thumb->quality = 'default';
|
1298 |
}
|
1299 |
+
elseif (isset($item->snippet->thumbnails->medium->url))
|
1300 |
{
|
1301 |
$thumb->img = $item->snippet->thumbnails->medium->url;
|
1302 |
$thumb->quality = 'medium';
|
1303 |
}
|
1304 |
+
else
|
1305 |
+
{
|
1306 |
+
$thumb->img = plugins_url('/images/deleted-video-thumb.png', __FILE__);
|
1307 |
+
$thumb->quality = 'medium';
|
1308 |
+
}
|
1309 |
}
|
1310 |
|
1311 |
$code .= self::get_thumbnail_html($thumb, $options);
|
1458 |
$linkparams['v'] = array_pop($vtemp);
|
1459 |
}
|
1460 |
|
1461 |
+
if (isset($linkparams['channel']) && isset($linkparams['live']) && $linkparams['live'] == '1')
|
1462 |
+
{
|
1463 |
+
$live_error_msg = ' To embed live videos, please make sure you performed the <a href="https://www.youtube.com/watch?v=LpKDFT40V0U" target="_blank">steps in this video</a> to create and save a proper server API key.';
|
1464 |
+
if (isset(self::$alloptions[self::$opt_apikey]))
|
1465 |
+
{
|
1466 |
+
|
1467 |
+
try
|
1468 |
+
{
|
1469 |
+
$ytapilink_live = 'https://www.googleapis.com/youtube/v3/search?order=date&maxResults=1&type=video&eventType=live&safeSearch=none&videoEmbeddable=true&channelId=' . $linkparams['channel'] . '&part=snippet&key=' . self::$alloptions[self::$opt_apikey];
|
1470 |
+
$apidata_live = wp_remote_get($ytapilink_live, array('timeout' => self::$curltimeout));
|
1471 |
+
if (!is_wp_error($apidata_live))
|
1472 |
+
{
|
1473 |
+
$raw = wp_remote_retrieve_body($apidata_live);
|
1474 |
+
if (!empty($raw))
|
1475 |
+
{
|
1476 |
+
$json = json_decode($raw, true);
|
1477 |
+
if (!isset($json['error']) && is_array($json) && count($json['items']))
|
1478 |
+
{
|
1479 |
+
$linkparams['v'] = $json['items'][0]['id']['videoId'];
|
1480 |
+
}
|
1481 |
+
else if (isset($json['error']))
|
1482 |
+
{
|
1483 |
+
return $live_error_msg;
|
1484 |
+
}
|
1485 |
+
}
|
1486 |
+
}
|
1487 |
+
}
|
1488 |
+
catch (Exception $ex)
|
1489 |
+
{
|
1490 |
+
return $live_error_msg;
|
1491 |
+
}
|
1492 |
+
}
|
1493 |
+
else
|
1494 |
+
{
|
1495 |
+
return $live_error_msg;
|
1496 |
+
}
|
1497 |
+
|
1498 |
+
if (!isset($linkparams['v']))
|
1499 |
+
{
|
1500 |
+
return apply_filters('the_content', trim(self::$alloptions[self::$opt_not_live_content]));
|
1501 |
+
}
|
1502 |
+
}
|
1503 |
+
|
1504 |
$youtubebaseurl = 'youtube';
|
1505 |
$schemaorgoutput = '';
|
1506 |
$voloutput = '';
|
1516 |
$finalparams = $linkparams + self::$alloptions;
|
1517 |
|
1518 |
$spdckey = '';
|
1519 |
+
if (self::$alloptions[self::$opt_pro] && strlen(trim(self::$alloptions[self::$opt_pro])) > 0 && self::$alloptions[self::$opt_spdc] == 1 && !isset($finalparams['live']))
|
1520 |
{
|
1521 |
try
|
1522 |
{
|
1545 |
$youtubebaseurl = 'youtube-nocookie';
|
1546 |
}
|
1547 |
|
|
|
|
|
|
|
|
|
|
|
|
|
1548 |
if (self::$alloptions[self::$opt_defaultvol] == 1)
|
1549 |
{
|
1550 |
$voloutput = ' data-vol="' . self::$alloptions[self::$opt_vol] . '" ';
|
1551 |
}
|
1552 |
|
|
|
|
|
|
|
|
|
|
|
1553 |
if (self::$alloptions[self::$opt_dohl] == 1)
|
1554 |
{
|
1555 |
$locale = get_locale();
|
1574 |
}
|
1575 |
|
1576 |
if (self::$alloptions[self::$opt_dynload] == 1
|
|
|
1577 |
)
|
1578 |
{
|
1579 |
$dynsrc = 'data-ep-';
|
1588 |
|
1589 |
if (isset($finalparams['layout']) && strtolower($finalparams['layout']) == 'gallery' && isset($finalparams['list']) && isset($finalparams[self::$opt_gallery_disptype]) && $finalparams[self::$opt_gallery_disptype] === 'lb')
|
1590 |
{
|
1591 |
+
$finalparams[self::$opt_autoplay] = 0;
|
1592 |
$disptype = ' epyt-lb';
|
1593 |
$beginlb = '<div class="lity-hide">';
|
1594 |
$endlb = '</div>';
|
1656 |
|
1657 |
// playlist cleanup
|
1658 |
$videoidoutput = isset($linkparams['v']) ? $linkparams['v'] : '';
|
1659 |
+
|
|
|
|
|
|
|
1660 |
if ((self::$alloptions[self::$opt_playlistorder] == 1 || isset($finalparams['plindex'])) && isset($finalparams['list']))
|
1661 |
{
|
1662 |
try
|
1709 |
|
1710 |
$gallery_page_obj = self::get_gallery_page($gallery_options);
|
1711 |
|
|
|
1712 |
$galleryWrapper1 = '<div class="epyt-gallery ' . $disptype . '" data-currpage="1" id="' . $galleryid . '">';
|
1713 |
$galleryWrapper2 = '</div>';
|
1714 |
$galleryCode = $subbutton . '<div class="epyt-gallery-list epyt-gallery-style-' . esc_attr($gallery_options->style) . '">' .
|
1715 |
$gallery_page_obj->html .
|
1716 |
'</div>';
|
1717 |
+
$videoidoutput = isset($gallery_page_obj->init_id) ? $gallery_page_obj->init_id : '';
|
1718 |
}
|
1719 |
|
1720 |
|
1721 |
$code1 = $beginlb . '<iframe ' . $dyntype . $centercode . ' id="_ytid_' . rand(10000, 99999) . '" width="' . self::$defaultwidth . '" height="' . self::$defaultheight .
|
1722 |
'" ' . $dynsrc . 'src="https://www.' . $youtubebaseurl . '.com/embed/' . $videoseries . $videoidoutput . '?';
|
1723 |
+
$code2 = '" class="__youtube_prefs__' . ($iscontent ? '' : ' __youtube_prefs_widget__') . $disptypeif .
|
1724 |
'"' . $voloutput . $acctitle . $galleryid_ifm_data . ' allowfullscreen data-no-lazy="1"></iframe>' . $endlb . $schemaorgoutput;
|
1725 |
|
1726 |
$origin = '';
|
1751 |
}
|
1752 |
else
|
1753 |
{
|
1754 |
+
if (!(isset($finalparams['live']) && $key == 'loop'))
|
|
|
1755 |
{
|
1756 |
+
$finalsrc .= htmlspecialchars($key) . '=' . htmlspecialchars($value) . '&';
|
1757 |
+
if ($key == 'loop' && $value == 1 && !isset($finalparams['list']))
|
1758 |
+
{
|
1759 |
+
$finalsrc .= 'playlist=' . $finalparams['v'] . '&';
|
1760 |
+
}
|
1761 |
}
|
1762 |
}
|
1763 |
}
|
1764 |
}
|
1765 |
}
|
1766 |
|
1767 |
+
$code = $galleryWrapper1 . $code1 . $finalsrc . $code2 . $galleryCode . $galleryWrapper2;
|
1768 |
+
//. '<!--' . $m[0] . '-->';
|
1769 |
self::$defaultheight = null;
|
1770 |
self::$defaultwidth = null;
|
1771 |
self::$oembeddata = null;
|
1772 |
|
1773 |
|
1774 |
+
if (self::$alloptions[self::$opt_pro] && strlen(trim(self::$alloptions[self::$opt_pro])) > 0 && self::$alloptions[self::$opt_spdc] == 1 && !isset($finalparams['live']))
|
|
|
|
|
|
|
1775 |
{
|
1776 |
$daysecs = self::$alloptions[self::$opt_spdcexp] * 60 * 60;
|
1777 |
set_transient($spdckey, $code, $daysecs);
|
1828 |
$ytapilink = 'https://www.googleapis.com/youtube/v3/videos?id=' . $vidid . '&part=contentDetails,snippet&key=' . self::$alloptions[self::$opt_apikey];
|
1829 |
|
1830 |
|
1831 |
+
$apidata = wp_remote_get($ytapilink, array('timeout' => self::$curltimeout));
|
1832 |
if (!is_wp_error($apidata))
|
1833 |
{
|
1834 |
$raw = wp_remote_retrieve_body($apidata);
|
2035 |
. '&maxResults=10&key=' . self::$alloptions[self::$opt_apikey];
|
2036 |
try
|
2037 |
{
|
2038 |
+
$apiResult = wp_remote_get($apiEndpoint, array('timeout' => self::$curltimeout));
|
2039 |
if (!is_wp_error($apiResult))
|
2040 |
{
|
2041 |
$jsonResult = json_decode($apiResult['body']);
|
2292 |
die();
|
2293 |
}
|
2294 |
|
2295 |
+
public static function my_embedplus_dashpre()
|
2296 |
+
{
|
2297 |
+
$result = array();
|
2298 |
+
if (!empty($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest')
|
2299 |
+
{
|
2300 |
+
try
|
2301 |
+
{
|
2302 |
+
$tmp = intval($_REQUEST[self::$opt_dashpre]);
|
2303 |
+
$new_options = array();
|
2304 |
+
$new_options[self::$opt_dashpre] = $tmp;
|
2305 |
+
$all = get_option(self::$opt_alloptions);
|
2306 |
+
$all = $new_options + $all;
|
2307 |
+
update_option(self::$opt_alloptions, $all);
|
2308 |
+
}
|
2309 |
+
catch (Exception $ex)
|
2310 |
+
{
|
2311 |
+
|
2312 |
+
}
|
2313 |
+
}
|
2314 |
+
die();
|
2315 |
+
}
|
2316 |
+
|
2317 |
public static function my_embedplus_clearspdc()
|
2318 |
{
|
2319 |
$result = array();
|
2448 |
$new_pointer_content .= '<p>'; // ooopointer
|
2449 |
if (!(self::$alloptions[self::$opt_pro] && strlen(trim(self::$alloptions[self::$opt_pro])) > 0))
|
2450 |
{
|
2451 |
+
$new_pointer_content .= __("This update includes YouTube Live features and a few fixes/optimizations for the Free and (<a target=_blank href=" . self::$epbase . '/dashboard/pro-easy-video-analytics.aspx?ref=frompointer' . ">Pro versions »</a>)");
|
2452 |
}
|
2453 |
else
|
2454 |
{
|
2455 |
+
$new_pointer_content .= __("This update includes YouTube Live features and a few fixes/optimizations for the Free and Pro versions.");
|
2456 |
}
|
2457 |
$new_pointer_content .= '</p>';
|
2458 |
|
2534 |
$new_options[self::$opt_responsive] = self::postchecked(self::$opt_responsive) ? 1 : 0;
|
2535 |
$new_options[self::$opt_widgetfit] = self::postchecked(self::$opt_widgetfit) ? 1 : 0;
|
2536 |
$new_options[self::$opt_evselector_light] = self::postchecked(self::$opt_evselector_light) ? 1 : 0;
|
2537 |
+
$new_options[self::$opt_stop_mobile_buffer] = self::postchecked(self::$opt_stop_mobile_buffer) ? 1 : 0;
|
2538 |
$new_options[self::$opt_schemaorg] = self::postchecked(self::$opt_schemaorg) ? 1 : 0;
|
2539 |
$new_options[self::$opt_ftpostimg] = self::postchecked(self::$opt_ftpostimg) ? 1 : 0;
|
2540 |
$new_options[self::$opt_spdc] = self::postchecked(self::$opt_spdc) ? 1 : 0;
|
2738 |
}
|
2739 |
$new_options[self::$opt_gallery_customnext] = $_gallery_custom_next;
|
2740 |
|
2741 |
+
$_not_live_content = '';
|
2742 |
+
try
|
2743 |
+
{
|
2744 |
+
$_not_live_content = wp_kses_post($_POST[self::$opt_not_live_content]);
|
2745 |
+
}
|
2746 |
+
catch (Exception $ex)
|
2747 |
+
{
|
2748 |
+
$_not_live_content = '';
|
2749 |
+
}
|
2750 |
+
$new_options[self::$opt_not_live_content] = $_not_live_content;
|
2751 |
+
|
2752 |
|
2753 |
$_apikey = $all[self::$opt_apikey];
|
2754 |
try
|
2825 |
self::spdcpurge();
|
2826 |
if ($all[self::$opt_spdc] == 1)
|
2827 |
{
|
2828 |
+
wp_remote_get(site_url(), array('timeout' => self::$curltimeout));
|
2829 |
}
|
2830 |
}
|
2831 |
catch (Exception $ex)
|
2950 |
-webkit-box-shadow: 0px 0px 10px 0px rgba(0,0,0,0.75);
|
2951 |
-moz-box-shadow: 0px 0px 10px 0px rgba(0,0,0,0.75);
|
2952 |
box-shadow: 0px 0px 10px 0px rgba(0,0,0,0.75); }
|
2953 |
+
|
2954 |
+
</style>
|
2955 |
+
|
2956 |
+
<div class="ytindent">
|
2957 |
<br>
|
2958 |
<div id="jumphowto"></div>
|
2959 |
<div class="ytnav">
|
3027 |
<p>
|
3028 |
<?php _e("One of the benefits of using this plugin is that you can set site-wide default options for all your videos (click \"Save Changes\" when finished). However, you can also override them (and more) on a per-video basis. Directions on how to do that are in the next section.") ?>
|
3029 |
</p>
|
|
|
3030 |
|
3031 |
<div class="ytindent chx">
|
3032 |
<p>
|
3179 |
Note that this is not for setting the thumbnail list order of galleries, just the standard playlist player that YouTube provides.
|
3180 |
</label>
|
3181 |
</p>
|
3182 |
+
<p>
|
3183 |
+
<label for="<?php echo self::$opt_not_live_content; ?>">
|
3184 |
+
<b class="chktitle">Default "Not Live" Content:</b> <sup class="orange">NEW</sup>
|
3185 |
+
Below, enter what you would like to appear while your channel is not currently streaming live.
|
3186 |
+
</label>
|
3187 |
+
<?php
|
3188 |
+
wp_editor(
|
3189 |
+
wp_kses_post($all[self::$opt_not_live_content]), self::$opt_not_live_content, array('textarea_rows' => 5)
|
3190 |
+
);
|
3191 |
+
?>
|
3192 |
|
3193 |
|
3194 |
+
</p>
|
3195 |
+
|
3196 |
|
3197 |
</div>
|
3198 |
|
3224 |
</label>
|
3225 |
<div id="boxmigratelist">
|
3226 |
<ul>
|
3227 |
+
<li><input name="<?php echo self::$opt_migrate_embedplusvideo; ?>" id="<?php echo self::$opt_migrate_embedplusvideo; ?>" <?php checked($all[self::$opt_migrate_embedplusvideo], 1); ?> type="checkbox" class="checkbox"><label for="<?php echo self::$opt_migrate_embedplusvideo; ?>"><b>"YouTube Advanced Embed":</b> <code>[embedplusvideo]</code> shortcode</label></li>
|
3228 |
<li><input name="<?php echo self::$opt_migrate_youtube; ?>" id="<?php echo self::$opt_migrate_youtube; ?>" <?php checked($all[self::$opt_migrate_youtube], 1); ?> type="checkbox" class="checkbox"><label for="<?php echo self::$opt_migrate_youtube; ?>"><b>"YouTube Embed":</b> <code>[youtube]</code> and <code>[youtube_video]</code> shortcodes</label></li>
|
3229 |
<li class="smallnote orange" style="list-style: none;">This feature is beta. More shortcodes coming.</li>
|
3230 |
</ul>
|
3244 |
Check this option if you're having issues with autoplayed videos or background videos etc. that have been generated by your theme.
|
3245 |
</label>
|
3246 |
</p>
|
3247 |
+
<p>
|
3248 |
+
<input name="<?php echo self::$opt_stop_mobile_buffer; ?>" id="<?php echo self::$opt_stop_mobile_buffer; ?>" <?php checked($all[self::$opt_stop_mobile_buffer], 1); ?> type="checkbox" class="checkbox">
|
3249 |
+
<label for="<?php echo self::$opt_stop_mobile_buffer; ?>">
|
3250 |
+
<b class="chktitle">Mobile Autoplay Problems: </b>
|
3251 |
+
Autoplay works for desktop, but mobile devices don't allow autoplay due to network carrier data charges. For mobile devices, this option allows the player to properly display the video for the visitor to click on.
|
3252 |
+
</label>
|
3253 |
+
</p>
|
3254 |
<p>
|
3255 |
<input name="<?php echo self::$opt_debugmode; ?>" id="<?php echo self::$opt_debugmode; ?>" <?php checked($all[self::$opt_debugmode], 1); ?> type="checkbox" class="checkbox">
|
3256 |
<label for="<?php echo self::$opt_debugmode; ?>">
|
3326 |
</p>
|
3327 |
<p>
|
3328 |
<input name="<?php echo self::$opt_gallery_showpaging; ?>" id="<?php echo self::$opt_gallery_showpaging; ?>" <?php checked($all[self::$opt_gallery_showpaging], 1); ?> type="checkbox" class="checkbox">
|
3329 |
+
<label for="<?php echo self::$opt_gallery_showpaging; ?>"><b class="chktitle">Show Pagination:</b> Show the Next/Previous buttons and page numbering.</label>
|
3330 |
</p>
|
3331 |
<p>
|
3332 |
<input name="<?php echo self::$opt_gallery_customarrows; ?>" id="<?php echo self::$opt_gallery_customarrows; ?>" <?php checked($all[self::$opt_gallery_customarrows], 1); ?> type="checkbox" class="checkbox">
|
3341 |
<p>
|
3342 |
<input name="<?php echo self::$opt_gallery_channelsub; ?>" id="<?php echo self::$opt_gallery_channelsub; ?>" <?php checked($all[self::$opt_gallery_channelsub], 1); ?> type="checkbox" class="checkbox">
|
3343 |
<label for="<?php echo self::$opt_gallery_channelsub; ?>">
|
3344 |
+
<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.
|
3345 |
</label>
|
3346 |
<span id="boxchannelsub">
|
3347 |
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_attr(trim($all[self::$opt_gallery_channelsublink])); ?>" class="textinput" style="width: 200px;">
|
3361 |
</p>
|
3362 |
<p>
|
3363 |
<input name="<?php echo self::$opt_gallery_autonext; ?>" id="<?php echo self::$opt_gallery_autonext; ?>" <?php checked($all[self::$opt_gallery_autonext], 1); ?> type="checkbox" class="checkbox">
|
3364 |
+
<label for="<?php echo self::$opt_gallery_autonext; ?>"><b class="chktitle">Automatic Continuous Play:</b> Automatically play the next video in the gallery as soon as the current video finished.</label>
|
3365 |
</p>
|
3366 |
<p>
|
3367 |
<input name="<?php echo self::$opt_gallery_thumbplay; ?>" id="<?php echo self::$opt_gallery_thumbplay; ?>" <?php checked($all[self::$opt_gallery_thumbplay], 1); ?> type="checkbox" class="checkbox">
|
3368 |
+
<label for="<?php echo self::$opt_gallery_thumbplay; ?>"><b class="chktitle">Thumbnail Click Plays Video:</b> Clicking on a gallery thumbnail autoplays the video. Uncheck this and visitors must also click the video's play button after clicking the thumbnail.</label>
|
3369 |
</p>
|
3370 |
<div class="pad20">
|
3371 |
<p>
|
3464 |
<br>
|
3465 |
<label>
|
3466 |
<input name="<?php echo self::$opt_spdcab; ?>" id="<?php echo self::$opt_spdcab; ?>" <?php checked($all[self::$opt_spdcab], 1); ?> type="checkbox" class="checkbox">
|
3467 |
+
<b class="chktitle">Show "Clear YouTube Cache" Admin Bar Button: </b>
|
3468 |
This will display the "Clear YouTube Cache" button conveniently in the top admin bar. Uncheck this if you wish to hide the button.
|
3469 |
</label>
|
3470 |
|
3510 |
<option value="flipInY" <?php echo 'flipInY' === $cleandyn ? 'selected' : '' ?> >flip left/right</option>
|
3511 |
<option value="pulse" <?php echo 'pulse' === $cleandyn ? 'selected' : '' ?> >pulse</option>
|
3512 |
<option value="tada" <?php echo 'tada' === $cleandyn ? 'selected' : '' ?> >jiggle</option>
|
3513 |
+
<option value="fadeIn" <?php echo 'fadeIn' === $cleandyn ? 'selected' : '' ?> >fade in</option>
|
3514 |
<option value="fadeInDown" <?php echo 'fadeInDown' === $cleandyn ? 'selected' : '' ?> >fade in downward</option>
|
3515 |
<option value="fadeInUp" <?php echo 'fadeInUp' === $cleandyn ? 'selected' : '' ?> >fade in upward</option>
|
3516 |
<option value="zoomInDown" <?php echo 'zoomInDown' === $cleandyn ? 'selected' : '' ?> >zoom in downward</option>
|
3646 |
?>
|
3647 |
<div class="clearboth"></div>
|
3648 |
</div>
|
3649 |
+
|
3650 |
|
3651 |
<hr>
|
3652 |
|
4367 |
wp_add_inline_style('__EPYT__style', $custom_css);
|
4368 |
|
4369 |
|
4370 |
+
if (!is_admin() && (isset(self::$alloptions[self::$opt_pro]) && strlen(trim(self::$alloptions[self::$opt_pro])) > 8))
|
4371 |
{
|
4372 |
wp_enqueue_style('__disptype__', plugins_url('scripts/lity' . self::$min . '.css', __FILE__));
|
4373 |
wp_enqueue_script('__dispload__', plugins_url('scripts/lity' . self::$min . '.js', __FILE__), array('jquery'));
|
4377 |
|
4378 |
if (self::$alloptions[self::$opt_old_script_method] != 1)
|
4379 |
{
|
4380 |
+
$my_script_vars = array(
|
4381 |
'ajaxurl' => admin_url('admin-ajax.php'),
|
4382 |
'security' => wp_create_nonce('embedplus-nonce'),
|
4383 |
'gallery_scrolloffset' => intval(self::$alloptions[self::$opt_gallery_scrolloffset]),
|
4385 |
'epresponsiveselector' => self::get_responsiveselector(),
|
4386 |
'epdovol' => true,
|
4387 |
'version' => self::$alloptions[self::$opt_version],
|
4388 |
+
'evselector' => self::get_evselector(),
|
4389 |
+
'stopMobileBuffer' => self::$alloptions[self::$opt_stop_mobile_buffer] == '1' ? true : false
|
4390 |
+
);
|
4391 |
+
|
4392 |
+
if (isset(self::$alloptions[self::$opt_pro]) && strlen(trim(self::$alloptions[self::$opt_pro])) > 8 && isset(self::$alloptions[self::$opt_dashpre]) && self::$alloptions[self::$opt_dashpre] == '1')
|
4393 |
+
{
|
4394 |
+
$my_script_vars['dshpre'] = true;
|
4395 |
+
}
|
4396 |
+
wp_localize_script('__ytprefs__', '_EPYT_', $my_script_vars);
|
4397 |
}
|
4398 |
|
4399 |
////////////////////// cloudflare accomodation
|
4557 |
|
4558 |
|
4559 |
add_action("wp_ajax_my_embedplus_pro_record", array('YouTubePrefs', 'my_embedplus_pro_record'));
|
4560 |
+
add_action("wp_ajax_my_embedplus_dashpre", array('YouTubePrefs', 'my_embedplus_dashpre'));
|
4561 |
add_action("wp_ajax_my_embedplus_clearspdc", array('YouTubePrefs', 'my_embedplus_clearspdc'));
|
4562 |
add_action("wp_ajax_my_embedplus_glance_vids", array('YouTubePrefs', 'my_embedplus_glance_vids'));
|
4563 |
add_action("wp_ajax_my_embedplus_glance_count", array('YouTubePrefs', 'my_embedplus_glance_count'));
|
4624 |
var embedcode = "";
|
4625 |
try
|
4626 |
{
|
4627 |
+
if (e.data.indexOf("youtubeembedplus") === 0)
|
4628 |
{
|
|
|
4629 |
embedcode = e.data.split("|")[1];
|
4630 |
+
|
4631 |
if (embedcode.indexOf("[") !== 0)
|
4632 |
{
|
4633 |
embedcode = "<p>" + embedcode + "</p>";
|
4662 |
}
|
4663 |
tb_remove();
|
4664 |
|
4665 |
+
|
4666 |
+
}
|
4667 |
+
else if (e.data.indexOf("youtubeextprop") === 0)
|
4668 |
+
{
|
4669 |
+
var extprop = e.data.split("|")[1];
|
4670 |
+
var extpropval = extprop === 'xdash1' ? 1 : 0;
|
4671 |
+
if (extpropval != <?php echo intval(YouTubePrefs::$alloptions[YouTubePrefs::$opt_dashpre]); ?>)
|
4672 |
+
{
|
4673 |
+
jQuery.ajax({
|
4674 |
+
type: "post",
|
4675 |
+
dataType: "json",
|
4676 |
+
timeout: 30000,
|
4677 |
+
url: wpajaxurl,
|
4678 |
+
data: {action: 'my_embedplus_dashpre', <?php echo YouTubePrefs::$opt_dashpre; ?>: extpropval},
|
4679 |
+
success: function (response) {
|
4680 |
+
},
|
4681 |
+
error: function (xhr, ajaxOptions, thrownError) {
|
4682 |
+
},
|
4683 |
+
complete: function () {
|
4684 |
+
}
|
4685 |
+
});
|
4686 |
+
|
4687 |
+
}
|
4688 |
+
|
4689 |
+
|
4690 |
}
|
4691 |
+
|
4692 |
}
|
4693 |
catch (err)
|
4694 |
{
|
4695 |
+
|
|
|
4696 |
}
|
4697 |
|
4698 |
|