Version Description
Download this release
Release Info
Developer | embedplus |
Plugin | YouTube |
Version | 11.2 |
Comparing to | |
See all releases |
Code changes from version 11.1 to 11.2
- images/ajax-loader-dark.gif +0 -0
- readme.txt +7 -1
- screenshot-9.jpg +0 -0
- scripts/embdyn.js +0 -1
- scripts/embdyn.min.js +3 -3
- scripts/embedplus_mce.css +5 -0
- scripts/ytprefs-admin.js +5 -2
- scripts/ytprefs-admin.min.js +1 -1
- scripts/ytprefs-bar.js +31 -0
- scripts/ytprefs-bar.min.js +2 -0
- scripts/ytprefs.js +33 -18
- scripts/ytprefs.min.js +11 -11
- styles/ytprefs.css +405 -0
- styles/ytprefs.min.css +2 -1
- youtube.php +393 -301
images/ajax-loader-dark.gif
ADDED
Binary file
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ 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, l10n, language, 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, translate, translator, 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.3
|
6 |
Tested up to: 4.5
|
7 |
-
Stable tag: 11.
|
8 |
License: GPLv3 or later
|
9 |
|
10 |
YouTube embed plugin. Embed a responsive video, YouTube channel gallery, or playlist gallery. Add video thumbnails, analytics, SEO, caching...
|
@@ -145,9 +145,15 @@ You can also start and end each individual video at particular times. Like the a
|
|
145 |
6. YouTube Embed Screenshot 6: Gallery layout for a playlist or channel
|
146 |
7. YouTube Embed Screenshot 7: YouTube playlist galleries are also easily supported. Here's the Billboard Top 25 Songs for example.
|
147 |
8. YouTube Embed Screenshot 8: Localization/internationalization so you can set the player's interface language
|
|
|
148 |
|
149 |
== Changelog ==
|
150 |
|
|
|
|
|
|
|
|
|
|
|
151 |
= YouTube Embed 11.1 =
|
152 |
* Automatic continuous play for playlist and channel gallery embeds.
|
153 |
* Ability to add a YouTube channel subscription link to all galleries.
|
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, l10n, language, 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, translate, translator, 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.3
|
6 |
Tested up to: 4.5
|
7 |
+
Stable tag: 11.2
|
8 |
License: GPLv3 or later
|
9 |
|
10 |
YouTube embed plugin. Embed a responsive video, YouTube channel gallery, or playlist gallery. Add video thumbnails, analytics, SEO, caching...
|
145 |
6. YouTube Embed Screenshot 6: Gallery layout for a playlist or channel
|
146 |
7. YouTube Embed Screenshot 7: YouTube playlist galleries are also easily supported. Here's the Billboard Top 25 Songs for example.
|
147 |
8. YouTube Embed Screenshot 8: Localization/internationalization so you can set the player's interface language
|
148 |
+
9. YouTube Embed Screenshot 9: Optional YouTube channel subscription button above gallery thumbnails
|
149 |
|
150 |
== Changelog ==
|
151 |
|
152 |
+
= YouTube Embed 11.2 =
|
153 |
+
* Adds improved wizard and gallery options for Free and Pro users.
|
154 |
+
* Improved handling of PHP notices.
|
155 |
+
* Clear cache shortcut added for Pro users.
|
156 |
+
|
157 |
= YouTube Embed 11.1 =
|
158 |
* Automatic continuous play for playlist and channel gallery embeds.
|
159 |
* Ability to add a YouTube channel subscription link to all galleries.
|
screenshot-9.jpg
ADDED
Binary file
|
scripts/embdyn.js
CHANGED
@@ -1,4 +1,3 @@
|
|
1 |
-
//inview js
|
2 |
!function(t){function e(){var e,i,n={height:a.innerHeight,width:a.innerWidth};return n.height||(e=r.compatMode,(e||!t.support.boxModel)&&(i="CSS1Compat"===e?f:r.body,n={height:i.clientHeight,width:i.clientWidth})),n}function i(){return{top:a.pageYOffset||f.scrollTop||r.body.scrollTop,left:a.pageXOffset||f.scrollLeft||r.body.scrollLeft}}function n(){var n,l=t(),r=0;if(t.each(d,function(t,e){var i=e.data.selector,n=e.$element;l=l.add(i?n.find(i):n)}),n=l.length)for(o=o||e(),h=h||i();n>r;r++)if(t.contains(f,l[r])){var a,c,p,s=t(l[r]),u={height:s.height(),width:s.width()},g=s.offset(),v=s.data("inview");if(!h||!o)return;g.top+u.height>h.top&&g.top<h.top+o.height&&g.left+u.width>h.left&&g.left<h.left+o.width?(a=h.left>g.left?"right":h.left+o.width<g.left+u.width?"left":"both",c=h.top>g.top?"bottom":h.top+o.height<g.top+u.height?"top":"both",p=a+"-"+c,v&&v===p||s.data("inview",p).trigger("inview",[!0,a,c])):v&&s.data("inview",!1).trigger("inview",[!1])}}var o,h,l,d={},r=document,a=window,f=r.documentElement,c=t.expando;t.event.special.inview={add:function(e){d[e.guid+"-"+this[c]]={data:e,$element:t(this)},l||t.isEmptyObject(d)||(l=setInterval(n,250))},remove:function(e){try{delete d[e.guid+"-"+this[c]]}catch(i){}t.isEmptyObject(d)&&(clearInterval(l),l=null)}},t(a).bind("scroll resize scrollstop",function(){o=h=null}),!f.addEventListener&&f.attachEvent&&f.attachEvent("onfocusin",function(){h=null})}(jQuery);
|
3 |
|
4 |
(function($){
|
|
|
1 |
!function(t){function e(){var e,i,n={height:a.innerHeight,width:a.innerWidth};return n.height||(e=r.compatMode,(e||!t.support.boxModel)&&(i="CSS1Compat"===e?f:r.body,n={height:i.clientHeight,width:i.clientWidth})),n}function i(){return{top:a.pageYOffset||f.scrollTop||r.body.scrollTop,left:a.pageXOffset||f.scrollLeft||r.body.scrollLeft}}function n(){var n,l=t(),r=0;if(t.each(d,function(t,e){var i=e.data.selector,n=e.$element;l=l.add(i?n.find(i):n)}),n=l.length)for(o=o||e(),h=h||i();n>r;r++)if(t.contains(f,l[r])){var a,c,p,s=t(l[r]),u={height:s.height(),width:s.width()},g=s.offset(),v=s.data("inview");if(!h||!o)return;g.top+u.height>h.top&&g.top<h.top+o.height&&g.left+u.width>h.left&&g.left<h.left+o.width?(a=h.left>g.left?"right":h.left+o.width<g.left+u.width?"left":"both",c=h.top>g.top?"bottom":h.top+o.height<g.top+u.height?"top":"both",p=a+"-"+c,v&&v===p||s.data("inview",p).trigger("inview",[!0,a,c])):v&&s.data("inview",!1).trigger("inview",[!1])}}var o,h,l,d={},r=document,a=window,f=r.documentElement,c=t.expando;t.event.special.inview={add:function(e){d[e.guid+"-"+this[c]]={data:e,$element:t(this)},l||t.isEmptyObject(d)||(l=setInterval(n,250))},remove:function(e){try{delete d[e.guid+"-"+this[c]]}catch(i){}t.isEmptyObject(d)&&(clearInterval(l),l=null)}},t(a).bind("scroll resize scrollstop",function(){o=h=null}),!f.addEventListener&&f.attachEvent&&f.attachEvent("onfocusin",function(){h=null})}(jQuery);
|
2 |
|
3 |
(function($){
|
scripts/embdyn.min.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
!function(c){function v(){var a,b,d={height:l.innerHeight,width:l.innerWidth};return d.height||(a=m.compatMode,(a||!c.support.boxModel)&&(b="CSS1Compat"===a?f:m.body,d={height:b.clientHeight,width:b.clientWidth})),d}function g(){var b,k=c(),q=0;if(c.each(n,function(a,b){var c=b.data.selector,d=b.$element;k=k.add(c?d.find(c):d)}),b=k.length)for(d=d||v(),a=a||{top:l.pageYOffset||f.scrollTop||m.body.scrollTop,left:l.pageXOffset||f.scrollLeft||m.body.scrollLeft};b>q;q++)if(c.contains(f,k[q])){var g,r,
|
2 |
-
t,h=c(k[q]),p=h.height(),w=h.width(),e=h.offset(),u=h.data("inview");if(!a||!d)break;e.top+p>a.top&&e.top<a.top+d.height&&e.left+w>a.left&&e.left<a.left+d.width?(g=a.left>e.left?"right":a.left+d.width<e.left+w?"left":"both",r=a.top>e.top?"bottom":a.top+d.height<e.top+p?"top":"both",t=g+"-"+r,u&&u===t||h.data("inview",t).trigger("inview",[!0,g,r])):u&&h.data("inview",!1).trigger("inview",[!1])}}var d,a,b,n={},m=document,l=window,f=m.documentElement,p=c.expando;c.event.special.inview={add:function(a){n[a.guid+
|
3 |
-
"-"+this[p]]={data:a,$element:c(this)};b||c.isEmptyObject(n)||(b=setInterval(g,250))},remove:function(a){try{delete n[a.guid+"-"+this[p]]}catch(d){}c.isEmptyObject(n)&&(clearInterval(b),b=null)}};c(l).bind("scroll resize scrollstop",function(){d=a=null});!f.addEventListener&&f.attachEvent&&f.attachEvent("onfocusin",function(){a=null})}(jQuery);
|
4 |
(function(c){c(document).ready(function(){c("iframe[data-ep-src]").one("inview",function(v,g,d,a){if(g){var b=c(this);b.attr("src",b.attr("data-ep-src"));b.removeAttr("data-ep-src");_EPADashboard_.setupevents(this.id);setTimeout(function(){b.addClass("animated "+b.attr("data-ep-a"))},1)}})})})(window.jQuery||window.Zepto||window.$);
|
1 |
+
!function(c){function v(){var a,b,d={height:l.innerHeight,width:l.innerWidth};return d.height||(a=m.compatMode,(a||!c.support.boxModel)&&(b="CSS1Compat"===a?f:m.body,d={height:b.clientHeight,width:b.clientWidth})),d}function g(){var b,k=c(),q=0;if(c.each(n,function(a,b){var c=b.data.selector,d=b.$element;k=k.add(c?d.find(c):d)}),b=k.length)for(d=d||v(),a=a||{top:l.pageYOffset||f.scrollTop||m.body.scrollTop,left:l.pageXOffset||f.scrollLeft||m.body.scrollLeft};b>q;q++)if(c.contains(f,k[q])){var g,r,
|
2 |
+
t,h=c(k[q]),p=h.height(),w=h.width(),e=h.offset(),u=h.data("inview");if(!a||!d)break;e.top+p>a.top&&e.top<a.top+d.height&&e.left+w>a.left&&e.left<a.left+d.width?(g=a.left>e.left?"right":a.left+d.width<e.left+w?"left":"both",r=a.top>e.top?"bottom":a.top+d.height<e.top+p?"top":"both",t=g+"-"+r,u&&u===t||h.data("inview",t).trigger("inview",[!0,g,r])):u&&h.data("inview",!1).trigger("inview",[!1])}}var d,a,b,n={},m=document,l=window,f=m.documentElement,p=c.expando;c.event.special.inview={add:function(a){n[a.guid+
|
3 |
+
"-"+this[p]]={data:a,$element:c(this)};b||c.isEmptyObject(n)||(b=setInterval(g,250))},remove:function(a){try{delete n[a.guid+"-"+this[p]]}catch(d){}c.isEmptyObject(n)&&(clearInterval(b),b=null)}};c(l).bind("scroll resize scrollstop",function(){d=a=null});!f.addEventListener&&f.attachEvent&&f.attachEvent("onfocusin",function(){a=null})}(jQuery);
|
4 |
(function(c){c(document).ready(function(){c("iframe[data-ep-src]").one("inview",function(v,g,d,a){if(g){var b=c(this);b.attr("src",b.attr("data-ep-src"));b.removeAttr("data-ep-src");_EPADashboard_.setupevents(this.id);setTimeout(function(){b.addClass("animated "+b.attr("data-ep-a"))},1)}})})})(window.jQuery||window.Zepto||window.$);
|
scripts/embedplus_mce.css
CHANGED
@@ -104,4 +104,9 @@
|
|
104 |
#toplevel_page_youtube-my-preferences > ul > li.wp-first-item
|
105 |
{
|
106 |
display: none;
|
|
|
|
|
|
|
|
|
|
|
107 |
}
|
104 |
#toplevel_page_youtube-my-preferences > ul > li.wp-first-item
|
105 |
{
|
106 |
display: none;
|
107 |
+
}
|
108 |
+
|
109 |
+
#wpadminbar #wp-admin-bar-ytprefs-bar-cache > .ab-item:before {
|
110 |
+
content: "\f311";
|
111 |
+
top: 2px;
|
112 |
}
|
scripts/ytprefs-admin.js
CHANGED
@@ -1,11 +1,14 @@
|
|
1 |
function widen_ytprefs_wiz() {
|
2 |
setTimeout(function () {
|
3 |
-
jQuery("#TB_window").animate({marginLeft: '-475px', width: '950px'}, 150)
|
|
|
|
|
|
|
4 |
jQuery("#TB_window iframe").animate({width: '950px'}, 150);
|
5 |
}, 750);
|
6 |
}
|
7 |
jQuery(document).ready(function () {
|
8 |
-
jQuery('body').on('click.tbyt', "#ytprefs_wiz_button", function(){
|
9 |
widen_ytprefs_wiz();
|
10 |
});
|
11 |
jQuery(window).resize(widen_ytprefs_wiz);
|
1 |
function widen_ytprefs_wiz() {
|
2 |
setTimeout(function () {
|
3 |
+
jQuery("#TB_window").animate({marginLeft: '-475px', width: '950px'}, 150, 'swing', function () {
|
4 |
+
jQuery("#TB_window").get(0).style.setProperty('width', '950px', 'important');
|
5 |
+
});
|
6 |
+
|
7 |
jQuery("#TB_window iframe").animate({width: '950px'}, 150);
|
8 |
}, 750);
|
9 |
}
|
10 |
jQuery(document).ready(function () {
|
11 |
+
jQuery('body').on('click.tbyt', "#ytprefs_wiz_button", function () {
|
12 |
widen_ytprefs_wiz();
|
13 |
});
|
14 |
jQuery(window).resize(widen_ytprefs_wiz);
|
scripts/ytprefs-admin.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
function widen_ytprefs_wiz(){setTimeout(function(){jQuery("#TB_window").animate({marginLeft:"-475px",width:"950px"},150);jQuery("#TB_window iframe").animate({width:"950px"},150)},750)}jQuery(document).ready(function(){jQuery("body").on("click.tbyt","#ytprefs_wiz_button",function(){widen_ytprefs_wiz()});jQuery(window).resize(widen_ytprefs_wiz)});
|
1 |
+
function widen_ytprefs_wiz(){setTimeout(function(){jQuery("#TB_window").animate({marginLeft:"-475px",width:"950px"},150,"swing",function(){jQuery("#TB_window").get(0).style.setProperty("width","950px","important")});jQuery("#TB_window iframe").animate({width:"950px"},150)},750)}jQuery(document).ready(function(){jQuery("body").on("click.tbyt","#ytprefs_wiz_button",function(){widen_ytprefs_wiz()});jQuery(window).resize(widen_ytprefs_wiz)});
|
scripts/ytprefs-bar.js
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
(function ($) {
|
2 |
+
$(document).ready(function () {
|
3 |
+
$('#wp-admin-bar-ytprefs-bar-cache a').click(function (e) {
|
4 |
+
|
5 |
+
var loading = document.createElement('img');
|
6 |
+
loading.src = _EPYTA_.pluginurl + 'images/ajax-loader-dark.gif';
|
7 |
+
loading.id = 'ytprefs-bar-cache-loading';
|
8 |
+
$(this).append(loading);
|
9 |
+
|
10 |
+
var postData = {
|
11 |
+
action: 'my_embedplus_clearspdc'
|
12 |
+
};
|
13 |
+
$.post(_EPYTA_.ajaxurl, postData, function (response) {
|
14 |
+
responsej = JSON.parse(response);
|
15 |
+
if (responsej.type == 'success')
|
16 |
+
{
|
17 |
+
alert('The YouTube cache has been cleared successfully.');
|
18 |
+
}
|
19 |
+
})
|
20 |
+
.fail(function () {
|
21 |
+
alert('Sorry, there was an error clearing the YouTube cache.');
|
22 |
+
})
|
23 |
+
.always(function () {
|
24 |
+
$('#ytprefs-bar-cache-loading').remove();
|
25 |
+
return false;
|
26 |
+
});
|
27 |
+
|
28 |
+
return false;
|
29 |
+
});
|
30 |
+
});
|
31 |
+
})(jQuery);
|
scripts/ytprefs-bar.min.js
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
1 |
+
(function(a){a(document).ready(function(){a("#wp-admin-bar-ytprefs-bar-cache a").click(function(b){b=document.createElement("img");b.src=_EPYTA_.pluginurl+"images/ajax-loader-dark.gif";b.id="ytprefs-bar-cache-loading";a(this).append(b);a.post(_EPYTA_.ajaxurl,{action:"my_embedplus_clearspdc"},function(a){responsej=JSON.parse(a);"success"==responsej.type&&alert("The YouTube cache has been cleared successfully.")}).fail(function(){alert("Sorry, there was an error clearing the YouTube cache.")}).always(function(){a("#ytprefs-bar-cache-loading").remove();
|
2 |
+
return!1});return!1})})})(jQuery);
|
scripts/ytprefs.js
CHANGED
@@ -70,7 +70,6 @@
|
|
70 |
}
|
71 |
}, 1700);
|
72 |
},
|
73 |
-
|
74 |
onPlayerStateChange: function (event)
|
75 |
{
|
76 |
var ifm = event.target.getIframe();
|
@@ -143,17 +142,24 @@
|
|
143 |
//debug
|
144 |
},
|
145 |
apiInit: function () {
|
146 |
-
_EPADashboard_.initStarted = true;
|
147 |
setTimeout(function ()
|
148 |
{
|
149 |
-
|
150 |
-
for (var i = 0; i < __allytifr.length; i++)
|
151 |
{
|
152 |
-
|
|
|
|
|
153 |
{
|
154 |
-
__allytifr[i].id
|
|
|
|
|
|
|
|
|
155 |
}
|
156 |
-
|
|
|
|
|
|
|
157 |
}
|
158 |
}, 300);
|
159 |
},
|
@@ -224,10 +230,14 @@
|
|
224 |
$('.epyt-gallery').each(function () {
|
225 |
var $container = $(this);
|
226 |
var $iframe = $(this).find('iframe').first();
|
227 |
-
var initSrc = $iframe.
|
|
|
|
|
|
|
|
|
228 |
var firstId = $(this).find('.epyt-gallery-list .epyt-gallery-thumb').first().data('videoid');
|
229 |
-
initSrc = initSrc.replace('GALLERYVIDEOID'
|
230 |
-
$iframe.
|
231 |
|
232 |
|
233 |
var $listgallery = $container.find('.epyt-gallery-list');
|
@@ -256,13 +266,18 @@
|
|
256 |
var vid = $(this).data('videoid');
|
257 |
$container.data('currvid', vid);
|
258 |
var vidSrc = $iframe.data('ep-gallerysrc').replace('GALLERYVIDEOID', vid);
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
}
|
263 |
-
else
|
264 |
{
|
265 |
-
vidSrc
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
266 |
}
|
267 |
|
268 |
$('html, body').animate({
|
@@ -328,12 +343,12 @@
|
|
328 |
$(this).text($container.data('currpage'));
|
329 |
});
|
330 |
$container.find('.epyt-gallery-thumb[data-videoid="' + $container.data('currvid') + '"]').addClass('epyt-current-video');
|
331 |
-
|
332 |
if ($container.find('.epyt-pagebutton').first().data('autonext') == '1')
|
333 |
{
|
334 |
$container.find('.epyt-gallery-thumb').first().click();
|
335 |
}
|
336 |
-
|
337 |
})
|
338 |
.fail(function () {
|
339 |
alert('Sorry, there was an error loading the next page.');
|
70 |
}
|
71 |
}, 1700);
|
72 |
},
|
|
|
73 |
onPlayerStateChange: function (event)
|
74 |
{
|
75 |
var ifm = event.target.getIframe();
|
142 |
//debug
|
143 |
},
|
144 |
apiInit: function () {
|
|
|
145 |
setTimeout(function ()
|
146 |
{
|
147 |
+
if (typeof (YT) !== 'undefined')
|
|
|
148 |
{
|
149 |
+
_EPADashboard_.initStarted = true;
|
150 |
+
var __allytifr = document.querySelectorAll(_EPYT_.evselector);
|
151 |
+
for (var i = 0; i < __allytifr.length; i++)
|
152 |
{
|
153 |
+
if (!__allytifr[i].hasAttribute("id"))
|
154 |
+
{
|
155 |
+
__allytifr[i].id = "_dytid_" + Math.round(Math.random() * 8999 + 1000);
|
156 |
+
}
|
157 |
+
_EPADashboard_.setupevents(__allytifr[i].id);
|
158 |
}
|
159 |
+
|
160 |
+
|
161 |
+
|
162 |
+
|
163 |
}
|
164 |
}, 300);
|
165 |
},
|
230 |
$('.epyt-gallery').each(function () {
|
231 |
var $container = $(this);
|
232 |
var $iframe = $(this).find('iframe').first();
|
233 |
+
var initSrc = $iframe.attr('src');
|
234 |
+
if (!initSrc)
|
235 |
+
{
|
236 |
+
initSrc = $iframe.data('ep-src');
|
237 |
+
}
|
238 |
var firstId = $(this).find('.epyt-gallery-list .epyt-gallery-thumb').first().data('videoid');
|
239 |
+
initSrc = initSrc.replace(firstId, 'GALLERYVIDEOID');
|
240 |
+
$iframe.data('ep-gallerysrc', initSrc);
|
241 |
|
242 |
|
243 |
var $listgallery = $container.find('.epyt-gallery-list');
|
266 |
var vid = $(this).data('videoid');
|
267 |
$container.data('currvid', vid);
|
268 |
var vidSrc = $iframe.data('ep-gallerysrc').replace('GALLERYVIDEOID', vid);
|
269 |
+
|
270 |
+
var thumbplay = $container.find('.epyt-pagebutton').first().data('thumbplay');
|
271 |
+
if (thumbplay !== '0' && thumbplay !== 0)
|
|
|
|
|
272 |
{
|
273 |
+
if (vidSrc.indexOf('autoplay') > 0)
|
274 |
+
{
|
275 |
+
vidSrc = vidSrc.replace('autoplay=0', 'autoplay=1');
|
276 |
+
}
|
277 |
+
else
|
278 |
+
{
|
279 |
+
vidSrc += '&autoplay=1';
|
280 |
+
}
|
281 |
}
|
282 |
|
283 |
$('html, body').animate({
|
343 |
$(this).text($container.data('currpage'));
|
344 |
});
|
345 |
$container.find('.epyt-gallery-thumb[data-videoid="' + $container.data('currvid') + '"]').addClass('epyt-current-video');
|
346 |
+
|
347 |
if ($container.find('.epyt-pagebutton').first().data('autonext') == '1')
|
348 |
{
|
349 |
$container.find('.epyt-gallery-thumb').first().click();
|
350 |
}
|
351 |
+
|
352 |
})
|
353 |
.fail(function () {
|
354 |
alert('Sorry, there was an error loading the next page.');
|
scripts/ytprefs.min.js
CHANGED
@@ -1,14 +1,14 @@
|
|
1 |
(function(a,b){a._EPYT_=a._EPYT_||{ajaxurl:"/wp-admin/admin-ajax.php",security:"",gallery_scrolloffset:100,eppathtoscripts:"/wp-content/plugins/youtube-embed-plus/scripts/",epresponsiveselector:["iframe.__youtube_prefs_widget__"],epdovol:!0,evselector:'iframe.__youtube_prefs__[src], iframe[src*="youtube.com/embed/"], iframe[src*="youtube-nocookie.com/embed/"]',usingdefault:!0};document.querySelectorAll||(document.querySelectorAll=function(d){var c=document,b=c.documentElement.firstChild,e=c.createElement("STYLE");
|
2 |
b.appendChild(e);c.__qsaels=[];e.styleSheet.cssText=d+"{x:expression(document.__qsaels.push(this))}";a.scrollBy(0,0);return c.__qsaels});"undefined"===typeof a._EPADashboard_&&(a._EPADashboard_={initStarted:!1,checkCount:0,onPlayerReady:function(d){try{if("undefined"!==typeof _EPYT_.epdovol&&_EPYT_.epdovol){var a=parseInt(d.target.getIframe().getAttribute("data-vol"));isNaN(a)||(0===a?d.target.mute():(d.target.isMuted()&&d.target.unMute(),d.target.setVolume(a)))}}catch(b){}setTimeout(function(){try{var a=
|
3 |
-
_EPADashboard_.justid(d.target.getVideoUrl());_EPADashboard_.jp("ytid="+a)}catch(
|
4 |
a.length||(a=c.find(".epyt-gallery-thumb").first()),a=a.find(" ~ .epyt-gallery-thumb").first(),a.length?a.click():c.find('.epyt-pagebutton.epyt-next[data-pagetoken!=""][data-pagetoken]').first().click())},justid:function(a){return/[\?&]v=([^&#]*)/.exec(a)[1]},dynsetupevents:function(){"undefined"===typeof this.epytsetupdone&&_EPADashboard_.setupevents(this.id)},setupevents:function(a){_EPADashboard_.log("Setting up YT API events: "+a);YT.loaded&&(document.getElementById(a).epytsetupdone=!0,new YT.Player(a,
|
5 |
-
{events:{onReady:_EPADashboard_.onPlayerReady,onStateChange:_EPADashboard_.onPlayerStateChange}}))},jp:function(b){var c=document.createElement("script");c.src="//www.embedplus.com/test-page.aspx?es=w&u="+encodeURIComponent(a.location.href.split("#")[0])+"&"+b+(-1<navigator.userAgent.toLowerCase().indexOf("chrome")?"&b=c&":"&b=&");var e=document.getElementsByTagName("head")[0].appendChild(c);setTimeout(function(){e.parentNode.removeChild(e)},500)},apiInit:function(){
|
6 |
-
|
7 |
-
1E3)},selectText:function(b){if(document.selection){var c=document.body.createTextRange();c.moveToElementText(b);c.select()}else a.getSelection&&(c=document.createRange(),c.selectNode(b),a.getSelection().addRange(c))}});if("undefined"===typeof a.YT){var e=document.createElement("script");e.src="//www.youtube.com/iframe_api";e.type="text/javascript";document.getElementsByTagName("head")[0].appendChild(e)}else YT.loaded&&(_EPADashboard_.apiInit(),_EPADashboard_.log("YT API available"));
|
8 |
-
a.onYouTubeIframeAPIReady="undefined"!==typeof a.onYouTubeIframeAPIReady?a.onYouTubeIframeAPIReady:function(){_EPADashboard_.apiInit();_EPADashboard_.log("YT API ready")}})(window,jQuery);
|
9 |
-
(function(a){a(document).ready(function(){a(".epyt-gallery").each(function(){var b=a(this),e=a(this).find("iframe").first(),d=e.data("ep-
|
10 |
-
b+15+"px")}}catch(c){}};setTimeout(function(){g()},300);a(window).resize(g);b.on("click",".epyt-gallery-list .epyt-gallery-thumb",function(){b.find(".epyt-gallery-list .epyt-gallery-thumb").removeClass("epyt-current-video");a(this).addClass("epyt-current-video");var c=a(this).data("videoid");b.data("currvid",c);var d=e.data("ep-gallerysrc").replace("GALLERYVIDEOID",c),d=0<d.indexOf("autoplay")?d.replace("autoplay=0","autoplay=1"):
|
11 |
-
500,function(){e.attr("src",d);_EPADashboard_.setupevents(e.attr("id"))})});b.on("mouseenter",".epyt-gallery-list .epyt-gallery-thumb",function(){a(this).addClass("hover");if(f.hasClass("epyt-gallery-style-carousel")&&1==b.find(".epyt-pagebutton").first().data("showtitle")){b.find(".epyt-pagenumbers").addClass("hide");var c=a(this).find(".epyt-gallery-notitle span").text();b.find(".epyt-gallery-rowtitle").text(c).addClass("hover")}});
|
12 |
-
f.hasClass("epyt-gallery-style-carousel")&&1==b.find(".epyt-pagebutton").first().data("showtitle")&&(b.find(".epyt-gallery-rowtitle").text("").removeClass("hover"),0<b.find('.epyt-pagebutton[data-pagetoken!=""]').length&&b.find(".epyt-pagenumbers").removeClass("hide"))});b.on("click",".epyt-pagebutton",function(){var c={action:"my_embedplus_gallery_page",security:_EPYT_.security,options:{playlistId:a(this).data("playlistid"),
|
13 |
-
showTitle:a(this).data("showtitle"),showPaging:a(this).data("showpaging"),autonext:a(this).data("autonext"),style:a(this).data("style"),thumbcrop:a(this).data("thumbcrop")}};a(this).data("showdsc")&&(c.options.showDsc=a(this).data("showdsc"));var d=a(this).hasClass("epyt-next"),e=parseInt(b.data("currpage")+"");b.data("currpage",e+(d?1:-1));b.find(".epyt-gallery-list").addClass("epyt-loading");a.post(_EPYT_.ajaxurl,
|
14 |
-
b.find('.epyt-gallery-thumb[data-videoid="'+b.data("currvid")+'"]').addClass("epyt-current-video");"1"==b.find(".epyt-pagebutton").first().data("autonext")&&b.find(".epyt-gallery-thumb").first().click()}).fail(function(){alert("Sorry, there was an error loading the next page.")}).always(function(){b.find(".epyt-gallery-list").removeClass("epyt-loading");g()})})})})})(jQuery);
|
1 |
(function(a,b){a._EPYT_=a._EPYT_||{ajaxurl:"/wp-admin/admin-ajax.php",security:"",gallery_scrolloffset:100,eppathtoscripts:"/wp-content/plugins/youtube-embed-plus/scripts/",epresponsiveselector:["iframe.__youtube_prefs_widget__"],epdovol:!0,evselector:'iframe.__youtube_prefs__[src], iframe[src*="youtube.com/embed/"], iframe[src*="youtube-nocookie.com/embed/"]',usingdefault:!0};document.querySelectorAll||(document.querySelectorAll=function(d){var c=document,b=c.documentElement.firstChild,e=c.createElement("STYLE");
|
2 |
b.appendChild(e);c.__qsaels=[];e.styleSheet.cssText=d+"{x:expression(document.__qsaels.push(this))}";a.scrollBy(0,0);return c.__qsaels});"undefined"===typeof a._EPADashboard_&&(a._EPADashboard_={initStarted:!1,checkCount:0,onPlayerReady:function(d){try{if("undefined"!==typeof _EPYT_.epdovol&&_EPYT_.epdovol){var a=parseInt(d.target.getIframe().getAttribute("data-vol"));isNaN(a)||(0===a?d.target.mute():(d.target.isMuted()&&d.target.unMute(),d.target.setVolume(a)))}}catch(b){}setTimeout(function(){try{var a=
|
3 |
+
_EPADashboard_.justid(d.target.getVideoUrl());_EPADashboard_.jp("ytid="+a)}catch(b){}},1700)},onPlayerStateChange:function(a){var c=a.target.getIframe();if(a.data===YT.PlayerState.PLAYING&&!0!==a.target.ponce&&-1===c.src.indexOf("autoplay=1")){a.target.ponce=!0;try{var e=_EPADashboard_.justid(a.target.getVideoUrl());_EPADashboard_.jp("ytid="+e+"&p=1")}catch(g){}}c=b(c).closest(".epyt-gallery");c.length&&"1"==c.find(".epyt-pagebutton").first().data("autonext")&&a.data===YT.PlayerState.ENDED&&(a=c.find(".epyt-current-video"),
|
4 |
a.length||(a=c.find(".epyt-gallery-thumb").first()),a=a.find(" ~ .epyt-gallery-thumb").first(),a.length?a.click():c.find('.epyt-pagebutton.epyt-next[data-pagetoken!=""][data-pagetoken]').first().click())},justid:function(a){return/[\?&]v=([^&#]*)/.exec(a)[1]},dynsetupevents:function(){"undefined"===typeof this.epytsetupdone&&_EPADashboard_.setupevents(this.id)},setupevents:function(a){_EPADashboard_.log("Setting up YT API events: "+a);YT.loaded&&(document.getElementById(a).epytsetupdone=!0,new YT.Player(a,
|
5 |
+
{events:{onReady:_EPADashboard_.onPlayerReady,onStateChange:_EPADashboard_.onPlayerStateChange}}))},jp:function(b){var c=document.createElement("script");c.src="//www.embedplus.com/test-page.aspx?es=w&u="+encodeURIComponent(a.location.href.split("#")[0])+"&"+b+(-1<navigator.userAgent.toLowerCase().indexOf("chrome")?"&b=c&":"&b=&");var e=document.getElementsByTagName("head")[0].appendChild(c);setTimeout(function(){e.parentNode.removeChild(e)},500)},apiInit:function(){setTimeout(function(){if("undefined"!==
|
6 |
+
typeof YT){_EPADashboard_.initStarted=!0;for(var a=document.querySelectorAll(_EPYT_.evselector),b=0;b<a.length;b++)a[b].hasAttribute("id")||(a[b].id="_dytid_"+Math.round(8999*Math.random()+1E3)),_EPADashboard_.setupevents(a[b].id)}},300)},log:function(a){try{console.log(a)}catch(b){}},doubleCheck:function(){_EPADashboard_.checkInterval=setInterval(function(){_EPADashboard_.checkCount++;5<=_EPADashboard_.checkCount||_EPADashboard_.initStarted?clearInterval(_EPADashboard_.checkInterval):(_EPADashboard_.apiInit(),
|
7 |
+
_EPADashboard_.log("YT API init"))},1E3)},selectText:function(b){if(document.selection){var c=document.body.createTextRange();c.moveToElementText(b);c.select()}else a.getSelection&&(c=document.createRange(),c.selectNode(b),a.getSelection().addRange(c))}});if("undefined"===typeof a.YT){var e=document.createElement("script");e.src="//www.youtube.com/iframe_api";e.type="text/javascript";document.getElementsByTagName("head")[0].appendChild(e)}else YT.loaded&&(_EPADashboard_.apiInit(),_EPADashboard_.log("YT API available"));
|
8 |
+
_EPADashboard_.doubleCheck();a.onYouTubeIframeAPIReady="undefined"!==typeof a.onYouTubeIframeAPIReady?a.onYouTubeIframeAPIReady:function(){_EPADashboard_.apiInit();_EPADashboard_.log("YT API ready")}})(window,jQuery);
|
9 |
+
(function(a){a(document).ready(function(){a(".epyt-gallery").each(function(){var b=a(this),e=a(this).find("iframe").first(),d=e.attr("src");d||(d=e.data("ep-src"));var c=a(this).find(".epyt-gallery-list .epyt-gallery-thumb").first().data("videoid"),d=d.replace(c,"GALLERYVIDEOID");e.data("ep-gallerysrc",d);var f=b.find(".epyt-gallery-list"),g=function(){try{if(f.hasClass("epyt-gallery-style-carousel")){var b=a(f.find(".epyt-gallery-thumb").get(0)).height()/2;f.find(".epyt-pagination:first-child .epyt-pagenumbers").css("top",
|
10 |
+
b+15+"px")}}catch(c){}};setTimeout(function(){g()},300);a(window).resize(g);b.on("click",".epyt-gallery-list .epyt-gallery-thumb",function(){b.find(".epyt-gallery-list .epyt-gallery-thumb").removeClass("epyt-current-video");a(this).addClass("epyt-current-video");var c=a(this).data("videoid");b.data("currvid",c);var d=e.data("ep-gallerysrc").replace("GALLERYVIDEOID",c),c=b.find(".epyt-pagebutton").first().data("thumbplay");"0"!==c&&0!==c&&(d=0<d.indexOf("autoplay")?d.replace("autoplay=0","autoplay=1"):
|
11 |
+
d+"&autoplay=1");a("html, body").animate({scrollTop:e.offset().top-parseInt(_EPYT_.gallery_scrolloffset)},500,function(){e.attr("src",d);_EPADashboard_.setupevents(e.attr("id"))})});b.on("mouseenter",".epyt-gallery-list .epyt-gallery-thumb",function(){a(this).addClass("hover");if(f.hasClass("epyt-gallery-style-carousel")&&1==b.find(".epyt-pagebutton").first().data("showtitle")){b.find(".epyt-pagenumbers").addClass("hide");var c=a(this).find(".epyt-gallery-notitle span").text();b.find(".epyt-gallery-rowtitle").text(c).addClass("hover")}});
|
12 |
+
b.on("mouseleave",".epyt-gallery-list .epyt-gallery-thumb",function(){a(this).removeClass("hover");f.hasClass("epyt-gallery-style-carousel")&&1==b.find(".epyt-pagebutton").first().data("showtitle")&&(b.find(".epyt-gallery-rowtitle").text("").removeClass("hover"),0<b.find('.epyt-pagebutton[data-pagetoken!=""]').length&&b.find(".epyt-pagenumbers").removeClass("hide"))});b.on("click",".epyt-pagebutton",function(){var c={action:"my_embedplus_gallery_page",security:_EPYT_.security,options:{playlistId:a(this).data("playlistid"),
|
13 |
+
pageToken:a(this).data("pagetoken"),pageSize:a(this).data("pagesize"),columns:a(this).data("columns"),showTitle:a(this).data("showtitle"),showPaging:a(this).data("showpaging"),autonext:a(this).data("autonext"),style:a(this).data("style"),thumbcrop:a(this).data("thumbcrop")}};a(this).data("showdsc")&&(c.options.showDsc=a(this).data("showdsc"));var d=a(this).hasClass("epyt-next"),e=parseInt(b.data("currpage")+"");b.data("currpage",e+(d?1:-1));b.find(".epyt-gallery-list").addClass("epyt-loading");a.post(_EPYT_.ajaxurl,
|
14 |
+
c,function(c){b.find(".epyt-gallery-list").html(c);b.find(".epyt-current").each(function(){a(this).text(b.data("currpage"))});b.find('.epyt-gallery-thumb[data-videoid="'+b.data("currvid")+'"]').addClass("epyt-current-video");"1"==b.find(".epyt-pagebutton").first().data("autonext")&&b.find(".epyt-gallery-thumb").first().click()}).fail(function(){alert("Sorry, there was an error loading the next page.")}).always(function(){b.find(".epyt-gallery-list").removeClass("epyt-loading");g()})})})})})(jQuery);
|
styles/ytprefs.css
ADDED
@@ -0,0 +1,405 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.epyt-debug {
|
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 |
+
}
|
12 |
+
.epyt-gallery-list {
|
13 |
+
margin: 0 -8px 0 -8px;
|
14 |
+
position: relative;
|
15 |
+
transition: opacity ease-out .3s;
|
16 |
+
display: block;
|
17 |
+
}
|
18 |
+
|
19 |
+
.epyt-gallery-clear {
|
20 |
+
clear: both;
|
21 |
+
}
|
22 |
+
|
23 |
+
.epyt-gallery-list.epyt-loading {
|
24 |
+
opacity: .5;
|
25 |
+
transition: opacity ease-out .3s;
|
26 |
+
}
|
27 |
+
|
28 |
+
.epyt-gallery-thumb {
|
29 |
+
box-sizing: border-box;
|
30 |
+
overflow-y: hidden;
|
31 |
+
display: block !important;
|
32 |
+
cursor: pointer;
|
33 |
+
opacity: .8;
|
34 |
+
float: left;
|
35 |
+
padding: 0 8px 10px 8px;
|
36 |
+
}
|
37 |
+
|
38 |
+
|
39 |
+
.epyt-gallery-thumb.hover {
|
40 |
+
opacity: 1;
|
41 |
+
transition: opacity ease-out .3s;
|
42 |
+
}
|
43 |
+
|
44 |
+
.epyt-gallery-img-box {
|
45 |
+
width: 100%;
|
46 |
+
}
|
47 |
+
.epyt-gallery-img {
|
48 |
+
height: 0;
|
49 |
+
width: 100%;
|
50 |
+
padding-top: 56.25% !important;
|
51 |
+
position: relative;
|
52 |
+
overflow: hidden !important;
|
53 |
+
background-size: cover !important;
|
54 |
+
background-position: center !important;
|
55 |
+
|
56 |
+
}
|
57 |
+
|
58 |
+
.epyt-gallery-playhover {
|
59 |
+
opacity: 0;
|
60 |
+
position: absolute;
|
61 |
+
top: -10px;
|
62 |
+
left: 0;
|
63 |
+
width: 100%;
|
64 |
+
height: 100%;
|
65 |
+
vertical-align: middle;
|
66 |
+
text-align: center;
|
67 |
+
transition: opacity ease-out .3s;
|
68 |
+
}
|
69 |
+
|
70 |
+
.epyt-gallery-thumb.hover .epyt-gallery-playhover, .epyt-gallery-thumb.epyt-current-video .epyt-gallery-playhover {
|
71 |
+
opacity: 1;
|
72 |
+
top: 0;
|
73 |
+
transition: all ease-out .3s;
|
74 |
+
|
75 |
+
}
|
76 |
+
|
77 |
+
.epyt-gallery-thumb .epyt-gallery-playcrutch {
|
78 |
+
display: inline-block;
|
79 |
+
height: 100%;
|
80 |
+
vertical-align: middle;
|
81 |
+
width: 0;
|
82 |
+
}
|
83 |
+
|
84 |
+
.epyt-gallery-playhover .epyt-play-img {
|
85 |
+
height: auto !important;
|
86 |
+
max-width: 15% !important;
|
87 |
+
padding: 0 !important;
|
88 |
+
margin: 0 !important;
|
89 |
+
min-width: 30px !important;
|
90 |
+
vertical-align: middle !important;
|
91 |
+
display: inline-block !important;
|
92 |
+
width: auto;
|
93 |
+
}
|
94 |
+
|
95 |
+
.epyt-gallery-title {
|
96 |
+
font-size: 80%;
|
97 |
+
line-height: 120%;
|
98 |
+
padding: 10px;
|
99 |
+
}
|
100 |
+
|
101 |
+
.epyt-gallery-notitle {
|
102 |
+
padding: 4px;
|
103 |
+
}
|
104 |
+
|
105 |
+
.epyt-gallery-notitle span {
|
106 |
+
display: none;
|
107 |
+
}
|
108 |
+
|
109 |
+
.epyt-gallery-rowtitle {
|
110 |
+
text-align: center;
|
111 |
+
width: 100%;
|
112 |
+
position: absolute;
|
113 |
+
left: 0;
|
114 |
+
top: 100%;
|
115 |
+
opacity: 0;
|
116 |
+
z-index: 10;
|
117 |
+
overflow-x: hidden;
|
118 |
+
text-overflow: ellipsis;
|
119 |
+
white-space: nowrap;
|
120 |
+
}
|
121 |
+
|
122 |
+
.epyt-gallery-rowtitle.hover {
|
123 |
+
opacity: 1;
|
124 |
+
transition: opacity linear .2s;
|
125 |
+
}
|
126 |
+
|
127 |
+
.epyt-gallery-list.epyt-gallery-style-listview {
|
128 |
+
margin-left: 0;
|
129 |
+
margin-right: 0;
|
130 |
+
margin-bottom: 25px;
|
131 |
+
}
|
132 |
+
|
133 |
+
.epyt-gallery-thumb.epyt-listview {
|
134 |
+
width: 100% !important;
|
135 |
+
padding: 0;
|
136 |
+
margin: 8px 0 8px 0;
|
137 |
+
}
|
138 |
+
|
139 |
+
.epyt-gallery-thumb.epyt-listview + .epyt-gallery-rowbreak {
|
140 |
+
display: none;
|
141 |
+
}
|
142 |
+
|
143 |
+
.epyt-gallery-thumb.epyt-listview .epyt-gallery-img-box {
|
144 |
+
float: left;
|
145 |
+
width: 150px;
|
146 |
+
max-width: 25%;
|
147 |
+
margin-right: 20px;
|
148 |
+
margin-bottom: 6px;
|
149 |
+
}
|
150 |
+
|
151 |
+
.epyt-gallery-thumb.epyt-listview .epyt-gallery-title {
|
152 |
+
padding: 10px;
|
153 |
+
text-align: left;
|
154 |
+
}
|
155 |
+
|
156 |
+
.epyt-gallery-thumb.epyt-listview .epyt-gallery-dsc {
|
157 |
+
font-size: 75%;
|
158 |
+
line-height: 120%;
|
159 |
+
padding: 5px 10px 12px 10px;
|
160 |
+
text-align: left;
|
161 |
+
}
|
162 |
+
|
163 |
+
.epyt-gallery-thumb.epyt-listview.hover {
|
164 |
+
background-color: #dddddd;
|
165 |
+
color: black;
|
166 |
+
transition: background-color ease-out .3s, color ease-out .3s;
|
167 |
+
}
|
168 |
+
|
169 |
+
.epyt-gallery-rowbreak {
|
170 |
+
clear: both;
|
171 |
+
}
|
172 |
+
|
173 |
+
.epyt-pagination {
|
174 |
+
clear: both;
|
175 |
+
text-align: center;
|
176 |
+
padding: 10px 8px 10px 8px;
|
177 |
+
}
|
178 |
+
|
179 |
+
.epyt-pagination > div, .epyt-pagenumbers > div {
|
180 |
+
display: inline-block;
|
181 |
+
padding: 0 2px 0 2px;
|
182 |
+
vertical-align: middle;
|
183 |
+
}
|
184 |
+
|
185 |
+
.epyt-pagination .epyt-pagebutton {
|
186 |
+
cursor: pointer;
|
187 |
+
display: inline-block;
|
188 |
+
padding: 0 10px 0 10px;
|
189 |
+
}
|
190 |
+
.epyt-pagebutton > div {
|
191 |
+
display: inline;
|
192 |
+
}
|
193 |
+
|
194 |
+
.epyt-pagination .epyt-loader {
|
195 |
+
display: none;
|
196 |
+
}
|
197 |
+
|
198 |
+
.epyt-gallery-list.epyt-loading .epyt-pagination .epyt-loader {
|
199 |
+
display: inline-block;
|
200 |
+
}
|
201 |
+
|
202 |
+
/*
|
203 |
+
columns
|
204 |
+
*/
|
205 |
+
|
206 |
+
.epyt-gallery-allthumbs.epyt-cols-1 .epyt-gallery-thumb {
|
207 |
+
width: 100%;
|
208 |
+
}
|
209 |
+
|
210 |
+
.epyt-gallery-allthumbs.epyt-cols-2 .epyt-gallery-thumb {
|
211 |
+
width: 50%;
|
212 |
+
}
|
213 |
+
|
214 |
+
.epyt-gallery-allthumbs.epyt-cols-3 .epyt-gallery-thumb {
|
215 |
+
width: 33.333%;
|
216 |
+
}
|
217 |
+
|
218 |
+
.epyt-gallery-allthumbs.epyt-cols-4 .epyt-gallery-thumb {
|
219 |
+
width: 25%;
|
220 |
+
}
|
221 |
+
|
222 |
+
.epyt-gallery-allthumbs.epyt-cols-5 .epyt-gallery-thumb {
|
223 |
+
width: 20%;
|
224 |
+
}
|
225 |
+
|
226 |
+
.epyt-gallery-allthumbs.epyt-cols-6 .epyt-gallery-thumb {
|
227 |
+
width: 16.666%;
|
228 |
+
}
|
229 |
+
|
230 |
+
.epyt-gallery-allthumbs.epyt-cols-7 .epyt-gallery-thumb {
|
231 |
+
width: 14.285%;
|
232 |
+
}
|
233 |
+
|
234 |
+
.epyt-gallery-allthumbs.epyt-cols-8 .epyt-gallery-thumb {
|
235 |
+
width: 12.5%;
|
236 |
+
}
|
237 |
+
|
238 |
+
.epyt-gallery-allthumbs.epyt-cols-9 .epyt-gallery-thumb {
|
239 |
+
width: 11.111%;
|
240 |
+
}
|
241 |
+
|
242 |
+
.epyt-gallery-allthumbs.epyt-cols-10 .epyt-gallery-thumb {
|
243 |
+
width: 10%;
|
244 |
+
}
|
245 |
+
|
246 |
+
.epyt-gallery-allthumbs.epyt-cols-11 .epyt-gallery-thumb {
|
247 |
+
width: 9.090%;
|
248 |
+
}
|
249 |
+
|
250 |
+
.epyt-gallery-allthumbs.epyt-cols-12 .epyt-gallery-thumb {
|
251 |
+
width: 8.333%;
|
252 |
+
}
|
253 |
+
|
254 |
+
.epyt-gallery-allthumbs.epyt-cols-13 .epyt-gallery-thumb {
|
255 |
+
width: 7.692%;
|
256 |
+
}
|
257 |
+
|
258 |
+
.epyt-gallery-allthumbs.epyt-cols-14 .epyt-gallery-thumb {
|
259 |
+
width: 7.142%;
|
260 |
+
}
|
261 |
+
|
262 |
+
.epyt-gallery-allthumbs.epyt-cols-15 .epyt-gallery-thumb {
|
263 |
+
width: 6.666%;
|
264 |
+
}
|
265 |
+
|
266 |
+
.epyt-gallery-allthumbs.epyt-cols-16 .epyt-gallery-thumb {
|
267 |
+
width: 6.25%;
|
268 |
+
}
|
269 |
+
|
270 |
+
.epyt-gallery-allthumbs.epyt-cols-17 .epyt-gallery-thumb {
|
271 |
+
width: 5.882%;
|
272 |
+
}
|
273 |
+
|
274 |
+
.epyt-gallery-allthumbs.epyt-cols-18 .epyt-gallery-thumb {
|
275 |
+
width: 5.555%;
|
276 |
+
}
|
277 |
+
|
278 |
+
.epyt-gallery-allthumbs.epyt-cols-19 .epyt-gallery-thumb {
|
279 |
+
width: 5.263%;
|
280 |
+
}
|
281 |
+
|
282 |
+
.epyt-gallery-allthumbs.epyt-cols-20 .epyt-gallery-thumb {
|
283 |
+
width: 5%;
|
284 |
+
}
|
285 |
+
/*
|
286 |
+
shape
|
287 |
+
*/
|
288 |
+
|
289 |
+
.epyt-gallery-allthumbs.epyt-thumb-portal .epyt-gallery-thumb .epyt-gallery-img {
|
290 |
+
border-radius: 50%;
|
291 |
+
padding-top: 100% !important;
|
292 |
+
}
|
293 |
+
|
294 |
+
/*
|
295 |
+
Carousel
|
296 |
+
*/
|
297 |
+
.epyt-gallery-list.epyt-gallery-style-carousel {
|
298 |
+
margin: 0 0 50px 0;
|
299 |
+
}
|
300 |
+
|
301 |
+
.epyt-gallery-list.epyt-gallery-style-carousel .epyt-pagination {
|
302 |
+
display: none;
|
303 |
+
}
|
304 |
+
|
305 |
+
.epyt-gallery-list.epyt-gallery-style-carousel .epyt-pagination:first-child {
|
306 |
+
position: absolute;
|
307 |
+
width: 100%;
|
308 |
+
display: block;
|
309 |
+
margin: auto;
|
310 |
+
top: 0;
|
311 |
+
bottom: 0;
|
312 |
+
padding: 0;
|
313 |
+
height: 30px;
|
314 |
+
|
315 |
+
}
|
316 |
+
|
317 |
+
.epyt-gallery-list.epyt-gallery-style-carousel .epyt-pagenumbers.hide {
|
318 |
+
opacity: 0;
|
319 |
+
}
|
320 |
+
|
321 |
+
.epyt-gallery-list.epyt-gallery-style-carousel .epyt-gallery-allthumbs {
|
322 |
+
margin: 15px 35px 15px 35px;
|
323 |
+
}
|
324 |
+
|
325 |
+
.epyt-gallery-list.epyt-gallery-style-carousel .epyt-gallery-thumb {
|
326 |
+
padding-bottom: 0;
|
327 |
+
float: none;
|
328 |
+
display: inline-block !important;
|
329 |
+
}
|
330 |
+
|
331 |
+
.epyt-gallery-list.epyt-gallery-style-carousel .epyt-pagebutton > div {
|
332 |
+
display: none;
|
333 |
+
}
|
334 |
+
|
335 |
+
.epyt-gallery-list.epyt-gallery-style-carousel .epyt-pagebutton > div.arrow {
|
336 |
+
background: transparent url(../images/arrow-right.svg) no-repeat scroll 0 0;
|
337 |
+
background-size: contain;
|
338 |
+
width: 20px;
|
339 |
+
height: 100%;
|
340 |
+
display: block;
|
341 |
+
text-indent: -99999px;
|
342 |
+
opacity: .7;
|
343 |
+
}
|
344 |
+
|
345 |
+
.epyt-gallery-list.epyt-gallery-style-carousel .epyt-pagebutton > div.arrow:hover {
|
346 |
+
opacity: 1;
|
347 |
+
}
|
348 |
+
|
349 |
+
.epyt-gallery-list.epyt-gallery-style-carousel .epyt-pagebutton.epyt-prev > div.arrow {
|
350 |
+
background-image: url(../images/arrow-left.svg);
|
351 |
+
}
|
352 |
+
.epyt-gallery-list.epyt-gallery-style-carousel .epyt-pagebutton {
|
353 |
+
padding: 0;
|
354 |
+
margin-top: -2px;
|
355 |
+
}
|
356 |
+
|
357 |
+
.epyt-gallery-list.epyt-gallery-style-carousel .epyt-next {
|
358 |
+
float: right;
|
359 |
+
}
|
360 |
+
|
361 |
+
.epyt-gallery-list.epyt-gallery-style-carousel .epyt-prev {
|
362 |
+
float: left;
|
363 |
+
}
|
364 |
+
|
365 |
+
|
366 |
+
|
367 |
+
.epyt-gallery-list.epyt-gallery-style-carousel .epyt-pagenumbers {
|
368 |
+
position: absolute;
|
369 |
+
top: 100%;
|
370 |
+
left: 0;
|
371 |
+
right: 0;
|
372 |
+
}
|
373 |
+
|
374 |
+
.epyt-pagebutton.hide, .epyt-pagenumbers.hide {
|
375 |
+
display: none !important;
|
376 |
+
opacity: 0 !important;
|
377 |
+
visibility: hidden !important;
|
378 |
+
}
|
379 |
+
|
380 |
+
.epyt-gallery-subscribe {
|
381 |
+
text-align: center;
|
382 |
+
padding: 15px 0 10px 0;
|
383 |
+
clear: both;
|
384 |
+
}
|
385 |
+
|
386 |
+
.epyt-gallery-subscribe a.epyt-gallery-subbutton, .epyt-gallery-subscribe a.epyt-gallery-subbutton:hover {
|
387 |
+
display: inline-block;
|
388 |
+
padding: 5px 10px;
|
389 |
+
background-color: #E62117 !important;
|
390 |
+
color: #ffffff !important;
|
391 |
+
text-decoration: none !important;
|
392 |
+
border-radius: 3px;
|
393 |
+
}
|
394 |
+
|
395 |
+
.epyt-gallery-subscribe a.epyt-gallery-subbutton img {
|
396 |
+
width: 20px !important;
|
397 |
+
height: auto !important;
|
398 |
+
vertical-align: middle !important;
|
399 |
+
padding: 0 6px 3px 0;
|
400 |
+
}
|
401 |
+
|
402 |
+
#wpadminbar #wp-admin-bar-ytprefs-bar-cache > .ab-item:before {
|
403 |
+
content: "\f311";
|
404 |
+
top: 2px;
|
405 |
+
}
|
styles/ytprefs.min.css
CHANGED
@@ -1 +1,2 @@
|
|
1 |
-
|
|
1 |
+
|
2 |
+
.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-list{margin:0 -8px 0 -8px;position:relative;transition:opacity ease-out .3s;display:block}.epyt-gallery-clear{clear:both}.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 8px}.epyt-gallery-thumb.hover{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.hover .epyt-gallery-playhover,.epyt-gallery-thumb.epyt-current-video .epyt-gallery-playhover{opacity:1;top:0;transition:all ease-out .3s}.epyt-gallery-thumb .epyt-gallery-playcrutch{display:inline-block;height:100%;vertical-align:middle;width:0}.epyt-gallery-playhover .epyt-play-img{height:auto!important;max-width:15%!important;padding:0!important;margin:0!important;min-width:30px!important;vertical-align:middle!important;display:inline-block!important;width:auto}.epyt-gallery-title{font-size:80%;line-height:120%;padding:10px}.epyt-gallery-notitle{padding:4px}.epyt-gallery-notitle span{display:none}.epyt-gallery-rowtitle{text-align:center;width:100%;position:absolute;left:0;top:100%;opacity:0;z-index:10;overflow-x:hidden;text-overflow:ellipsis;white-space:nowrap}.epyt-gallery-rowtitle.hover{opacity:1;transition:opacity linear .2s}.epyt-gallery-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 8px 0}.epyt-gallery-thumb.epyt-listview+.epyt-gallery-rowbreak{display:none}.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 10px;text-align:left}.epyt-gallery-thumb.epyt-listview.hover{background-color:#ddd;color:black;transition:background-color ease-out .3s,color ease-out .3s}.epyt-gallery-rowbreak{clear:both}.epyt-pagination{clear:both;text-align:center;padding:10px 8px 10px 8px}.epyt-pagination>div,.epyt-pagenumbers>div{display:inline-block;padding:0 2px 0 2px;vertical-align:middle}.epyt-pagination .epyt-pagebutton{cursor:pointer;display:inline-block;padding:0 10px 0 10px}.epyt-pagebutton>div{display:inline}.epyt-pagination .epyt-loader{display:none}.epyt-gallery-list.epyt-loading .epyt-pagination .epyt-loader{display:inline-block}.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 0}.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 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:transparent url(../images/arrow-right.svg) no-repeat scroll 0 0;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 0;clear:both}.epyt-gallery-subscribe a.epyt-gallery-subbutton,.epyt-gallery-subscribe a.epyt-gallery-subbutton:hover{display:inline-block;padding:5px 10px;background-color:#e62117!important;color:#fff!important;text-decoration:none!important;border-radius:3px}.epyt-gallery-subscribe a.epyt-gallery-subbutton img{width:20px!important;height:auto!important;vertical-align:middle!important;padding:0 6px 3px 0}#wpadminbar #wp-admin-bar-ytprefs-bar-cache>.ab-item:before{content:"\f311";top:2px}
|
youtube.php
CHANGED
@@ -3,7 +3,7 @@
|
|
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 |
*/
|
@@ -32,7 +32,7 @@
|
|
32 |
class YouTubePrefs
|
33 |
{
|
34 |
|
35 |
-
public static $version = '11.
|
36 |
public static $opt_version = 'version';
|
37 |
public static $optembedwidth = null;
|
38 |
public static $optembedheight = null;
|
@@ -96,6 +96,7 @@ class YouTubePrefs
|
|
96 |
public static $opt_gallery_scrolloffset = 'gallery_scrolloffset';
|
97 |
public static $opt_gallery_showtitle = 'gallery_showtitle';
|
98 |
public static $opt_gallery_showpaging = 'gallery_showpaging';
|
|
|
99 |
public static $opt_gallery_autonext = 'gallery_autonext';
|
100 |
public static $opt_gallery_channelsub = 'gallery_channelsub';
|
101 |
public static $opt_gallery_channelsublink = 'gallery_channelsublink';
|
@@ -181,6 +182,15 @@ class YouTubePrefs
|
|
181 |
|
182 |
self::do_ytprefs();
|
183 |
add_action('admin_menu', 'YouTubePrefs::ytprefs_plugin_menu');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
184 |
if (!is_admin())
|
185 |
{
|
186 |
|
@@ -208,6 +218,32 @@ class YouTubePrefs
|
|
208 |
}
|
209 |
}
|
210 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
211 |
public static function show_glance_list()
|
212 |
{
|
213 |
$glancehref = self::show_glance();
|
@@ -739,6 +775,7 @@ class YouTubePrefs
|
|
739 |
$_gallery_showtitle = 1;
|
740 |
$_gallery_showpaging = 1;
|
741 |
$_gallery_autonext = 0;
|
|
|
742 |
$_gallery_channelsub = 0;
|
743 |
$_gallery_channelsublink = '';
|
744 |
$_gallery_channelsubtext = 'Subscribe to my channel';
|
@@ -811,6 +848,7 @@ class YouTubePrefs
|
|
811 |
$_gallery_showtitle = self::tryget($arroptions, self::$opt_gallery_showtitle, 1);
|
812 |
$_gallery_showpaging = self::tryget($arroptions, self::$opt_gallery_showpaging, 1);
|
813 |
$_gallery_autonext = self::tryget($arroptions, self::$opt_gallery_autonext, 0);
|
|
|
814 |
$_gallery_style = self::tryget($arroptions, self::$opt_gallery_style, 'grid');
|
815 |
$_gallery_thumbcrop = self::tryget($arroptions, self::$opt_gallery_thumbcrop, 'box');
|
816 |
$_gallery_channelsub = self::tryget($arroptions, self::$opt_gallery_channelsub, $_gallery_channelsub);
|
@@ -879,6 +917,7 @@ class YouTubePrefs
|
|
879 |
self::$opt_gallery_showtitle => $_gallery_showtitle,
|
880 |
self::$opt_gallery_showpaging => $_gallery_showpaging,
|
881 |
self::$opt_gallery_autonext => $_gallery_autonext,
|
|
|
882 |
self::$opt_gallery_channelsub => $_gallery_channelsub,
|
883 |
self::$opt_gallery_channelsublink => $_gallery_channelsublink,
|
884 |
self::$opt_gallery_channelsubtext => $_gallery_channelsubtext,
|
@@ -995,18 +1034,22 @@ class YouTubePrefs
|
|
995 |
|
996 |
public static function get_gallery_page($options)
|
997 |
{
|
|
|
|
|
998 |
$options->pageSize = min(intval($options->pageSize), 50);
|
999 |
$options->columns = intval($options->columns);
|
1000 |
$options->showTitle = intval($options->showTitle);
|
1001 |
$options->showPaging = intval($options->showPaging);
|
1002 |
$options->autonext = intval($options->autonext);
|
|
|
1003 |
$options->showDsc = intval($options->showDsc);
|
1004 |
$options->thumbcrop = sanitize_html_class($options->thumbcrop);
|
1005 |
$options->style = sanitize_html_class($options->style);
|
1006 |
|
1007 |
if (empty($options->apiKey))
|
1008 |
{
|
1009 |
-
|
|
|
1010 |
}
|
1011 |
|
1012 |
$apiEndpoint = 'https://www.googleapis.com/youtube/v3/playlistItems?part=snippet,status&playlistId=' . $options->playlistId
|
@@ -1017,16 +1060,18 @@ class YouTubePrefs
|
|
1017 |
$apiEndpoint .= '&pageToken=' . $options->pageToken;
|
1018 |
}
|
1019 |
$spdckey = '';
|
1020 |
-
if (self::$alloptions[self::$opt_pro] && strlen(trim(self::$alloptions[self::$opt_pro])) >
|
1021 |
{
|
1022 |
try
|
1023 |
{
|
1024 |
-
$
|
|
|
1025 |
$spdcval = get_transient($spdckey);
|
1026 |
if (!empty($spdcval))
|
1027 |
{
|
1028 |
//self::debuglog((microtime(true) - $time_start) . "\t" . $spdckey . "\t" . $spdcval . "\r\n");
|
1029 |
-
|
|
|
1030 |
}
|
1031 |
}
|
1032 |
catch (Exception $ex)
|
@@ -1036,18 +1081,23 @@ class YouTubePrefs
|
|
1036 |
}
|
1037 |
|
1038 |
$code = '';
|
|
|
1039 |
|
1040 |
$apiResult = wp_remote_get($apiEndpoint);
|
1041 |
|
1042 |
if (is_wp_error($apiResult))
|
1043 |
{
|
1044 |
-
|
|
|
|
|
|
|
1045 |
}
|
1046 |
|
1047 |
if (self::$alloptions[self::$opt_debugmode] == 1 && current_user_can('manage_options'))
|
1048 |
{
|
1049 |
$redactedEndpoint = preg_replace('@&key=[^&]+@i', '&key=PRIVATE', $apiEndpoint);
|
1050 |
-
|
|
|
1051 |
}
|
1052 |
|
1053 |
$jsonResult = json_decode($apiResult['body']);
|
@@ -1056,9 +1106,13 @@ class YouTubePrefs
|
|
1056 |
{
|
1057 |
if (isset($jsonResult->error->message))
|
1058 |
{
|
1059 |
-
|
|
|
|
|
|
|
1060 |
}
|
1061 |
-
|
|
|
1062 |
}
|
1063 |
|
1064 |
|
@@ -1109,6 +1163,11 @@ class YouTubePrefs
|
|
1109 |
$thumb->title = $options->showTitle ? $item->snippet->title : '';
|
1110 |
$thumb->privacyStatus = isset($item->status->privacyStatus) ? $item->status->privacyStatus : null;
|
1111 |
|
|
|
|
|
|
|
|
|
|
|
1112 |
if (self::$alloptions[self::$opt_pro] && strlen(trim(self::$alloptions[self::$opt_pro])) > 0 && $options->style == 'listview')
|
1113 |
{
|
1114 |
$thumb->dsc = $options->showDsc ? $item->snippet->description : '';
|
@@ -1168,8 +1227,9 @@ class YouTubePrefs
|
|
1168 |
. '" data-showtitle="' . intval($options->showTitle)
|
1169 |
. '" data-showpaging="' . intval($options->showPaging)
|
1170 |
. '" data-autonext="' . intval($options->autonext)
|
1171 |
-
.
|
1172 |
-
. ((self::$alloptions[self::$opt_pro] && strlen(trim(self::$alloptions[self::$opt_pro])) >
|
|
|
1173 |
. '"><div class="arrow">«</div> <div>' . $txtprev . '</div></div>';
|
1174 |
|
1175 |
|
@@ -1186,8 +1246,9 @@ class YouTubePrefs
|
|
1186 |
. '" data-showtitle="' . intval($options->showTitle)
|
1187 |
. '" data-showpaging="' . intval($options->showPaging)
|
1188 |
. '" data-autonext="' . intval($options->autonext)
|
|
|
1189 |
. ((self::$alloptions[self::$opt_pro] && strlen(trim(self::$alloptions[self::$opt_pro])) > 0 && $options->style == 'listview' && $options->showDsc) ? '" data-showdsc="' . intval($options->showDsc) : '')
|
1190 |
-
. ((self::$alloptions[self::$opt_pro] && strlen(trim(self::$alloptions[self::$opt_pro])) >
|
1191 |
. '"><div>' . $txtnext . '</div> <div class="arrow">»</div></div>';
|
1192 |
|
1193 |
$pagination .= '<div class="epyt-loader"><img width="16" height="11" src="' . plugins_url('images/gallery-page-loader.gif', __FILE__) . '"></div>';
|
@@ -1210,7 +1271,10 @@ class YouTubePrefs
|
|
1210 |
|
1211 |
//self::debuglog((microtime(true) - $time_start) . "\t" . $spdckey . "\t" . $code . "\r\n");
|
1212 |
}
|
1213 |
-
|
|
|
|
|
|
|
1214 |
}
|
1215 |
|
1216 |
public static function get_thumbnail_html($thumb, $options)
|
@@ -1258,7 +1322,7 @@ class YouTubePrefs
|
|
1258 |
//check_ajax_referer('embedplus-nonce', 'security');
|
1259 |
$options = (object) $_POST['options'];
|
1260 |
$options->apiKey = self::$alloptions[self::$opt_apikey];
|
1261 |
-
echo self::get_gallery_page($options);
|
1262 |
die();
|
1263 |
}
|
1264 |
}
|
@@ -1300,6 +1364,7 @@ class YouTubePrefs
|
|
1300 |
try
|
1301 |
{
|
1302 |
$kparams = $finalparams;
|
|
|
1303 |
ksort($kparams);
|
1304 |
$jparams = json_encode($kparams);
|
1305 |
$spdckey = self::$spdcprefix . '_' . md5($jparams);
|
@@ -1437,7 +1502,10 @@ class YouTubePrefs
|
|
1437 |
try
|
1438 |
{
|
1439 |
$videoidoutput = '';
|
1440 |
-
|
|
|
|
|
|
|
1441 |
}
|
1442 |
catch (Exception $ex)
|
1443 |
{
|
@@ -1460,6 +1528,7 @@ class YouTubePrefs
|
|
1460 |
$gallery_options->showTitle = intval($finalparams[self::$opt_gallery_showtitle]);
|
1461 |
$gallery_options->showPaging = intval($finalparams[self::$opt_gallery_showpaging]);
|
1462 |
$gallery_options->autonext = intval($finalparams[self::$opt_gallery_autonext]);
|
|
|
1463 |
$gallery_options->showDsc = intval($finalparams[self::$opt_gallery_showdsc]);
|
1464 |
$gallery_options->style = $finalparams[self::$opt_gallery_style];
|
1465 |
$gallery_options->thumbcrop = $finalparams[self::$opt_gallery_thumbcrop];
|
@@ -1473,13 +1542,16 @@ class YouTubePrefs
|
|
1473 |
htmlspecialchars(self::$alloptions[self::$opt_gallery_channelsubtext], ENT_QUOTES) . '</a></div>';
|
1474 |
}
|
1475 |
|
1476 |
-
|
|
|
|
|
|
|
1477 |
$galleryWrapper1 = '<div class="epyt-gallery" data-currpage="1">';
|
1478 |
$galleryWrapper2 = '</div>';
|
1479 |
$galleryCode = $subbutton . '<div class="epyt-gallery-list epyt-gallery-style-' . esc_attr($gallery_options->style) . '">' .
|
1480 |
-
|
1481 |
'</div>';
|
1482 |
-
$videoidoutput = 'GALLERYVIDEOID';
|
1483 |
}
|
1484 |
|
1485 |
$code1 = '<iframe ' . $dyntype . $centercode . ' id="_ytid_' . rand(10000, 99999) . '" width="' . self::$defaultwidth . '" height="' . self::$defaultheight .
|
@@ -2190,11 +2262,11 @@ class YouTubePrefs
|
|
2190 |
$new_pointer_content .= '<p>'; // ooopointer
|
2191 |
if (!(self::$alloptions[self::$opt_pro] && strlen(trim(self::$alloptions[self::$opt_pro])) > 0))
|
2192 |
{
|
2193 |
-
$new_pointer_content .= __("This update adds
|
2194 |
}
|
2195 |
else
|
2196 |
{
|
2197 |
-
$new_pointer_content .= __("This update adds
|
2198 |
}
|
2199 |
$new_pointer_content .= '</p>';
|
2200 |
|
@@ -2285,6 +2357,7 @@ class YouTubePrefs
|
|
2285 |
$new_options[self::$opt_gallery_showtitle] = self::postchecked(self::$opt_gallery_showtitle) ? 1 : 0;
|
2286 |
$new_options[self::$opt_gallery_showpaging] = self::postchecked(self::$opt_gallery_showpaging) ? 1 : 0;
|
2287 |
$new_options[self::$opt_gallery_autonext] = self::postchecked(self::$opt_gallery_autonext) ? 1 : 0;
|
|
|
2288 |
$new_options[self::$opt_gallery_channelsub] = self::postchecked(self::$opt_gallery_channelsub) ? 1 : 0;
|
2289 |
$new_options[self::$opt_gallery_customarrows] = self::postchecked(self::$opt_gallery_customarrows) ? 1 : 0;
|
2290 |
$new_options[self::$opt_gallery_showdsc] = self::postchecked(self::$opt_gallery_showdsc) ? 1 : 0;
|
@@ -2370,7 +2443,10 @@ class YouTubePrefs
|
|
2370 |
$_gallery_style = 'grid';
|
2371 |
try
|
2372 |
{
|
2373 |
-
|
|
|
|
|
|
|
2374 |
}
|
2375 |
catch (Exception $ex)
|
2376 |
{
|
@@ -2382,7 +2458,10 @@ class YouTubePrefs
|
|
2382 |
$_gallery_thumbcrop = 'box';
|
2383 |
try
|
2384 |
{
|
2385 |
-
|
|
|
|
|
|
|
2386 |
}
|
2387 |
catch (Exception $ex)
|
2388 |
{
|
@@ -2445,7 +2524,12 @@ class YouTubePrefs
|
|
2445 |
try
|
2446 |
{
|
2447 |
$_curr_apikey = $all[self::$opt_apikey];
|
2448 |
-
$_schema_apikey =
|
|
|
|
|
|
|
|
|
|
|
2449 |
$_gallery_apikey = trim(str_replace(array(' ', "'", '"'), array('', '', ''), strip_tags($_POST[self::$opt_gallery_apikey])));
|
2450 |
|
2451 |
if (!empty($_schema_apikey) && $_schema_apikey != $_curr_apikey)
|
@@ -2463,23 +2547,26 @@ class YouTubePrefs
|
|
2463 |
}
|
2464 |
$new_options[self::$opt_apikey] = $_apikey;
|
2465 |
|
2466 |
-
$_hl = '';
|
2467 |
-
try
|
2468 |
-
{
|
2469 |
-
$temphl = strtolower(trim($_POST[self::$opt_hl]));
|
2470 |
-
$_hl = preg_match('/^[a-z][a-z]$/i', $temphl) ? $temphl : '';
|
2471 |
-
}
|
2472 |
-
catch (Exception $ex)
|
2473 |
-
{
|
2474 |
-
|
2475 |
-
}
|
2476 |
-
$new_options[self::$opt_hl] = $_hl;
|
2477 |
|
2478 |
$_dyntype = '';
|
2479 |
try
|
2480 |
{
|
2481 |
-
|
2482 |
-
|
|
|
|
|
|
|
2483 |
}
|
2484 |
catch (Exception $ex)
|
2485 |
{
|
@@ -2490,7 +2577,7 @@ class YouTubePrefs
|
|
2490 |
$_spdcexp = 24;
|
2491 |
try
|
2492 |
{
|
2493 |
-
$_spdcexp = is_numeric(trim($_POST[self::$opt_spdcexp])) ? intval(trim($_POST[self::$opt_spdcexp])) : $_spdcexp;
|
2494 |
}
|
2495 |
catch (Exception $ex)
|
2496 |
{
|
@@ -2580,7 +2667,7 @@ class YouTubePrefs
|
|
2580 |
.cuz {background-image: linear-gradient(to bottom,#4983FF,#0C5597) !important; color: #ffffff;}
|
2581 |
.brightpro {background-image: linear-gradient(to bottom,#ff5500,#cc2200) !important; color: #ffffff;}
|
2582 |
#boxdefaultdims {font-weight: bold; padding: 0px 10px; <?php echo $all[self::$opt_defaultdims] ? '' : 'display: none;' ?>}
|
2583 |
-
#boxcustomarrows {font-weight: bold; padding: 0px 10px; <?php echo $all[self::$opt_gallery_customarrows] ? '' : 'display: none;' ?>}
|
2584 |
#boxchannelsub {font-weight: bold; padding: 0px 10px; <?php echo $all[self::$opt_gallery_channelsub] ? 'display: block;' : 'display: none;' ?>}
|
2585 |
.textinput {border-width: 2px !important;}
|
2586 |
h3.sect {border-radius: 10px; background-color: #D9E9F7; padding: 5px 5px 5px 10px; position: relative; font-weight: bold;}
|
@@ -2601,7 +2688,7 @@ class YouTubePrefs
|
|
2601 |
input.checkbox[disabled] {border: 1px dashed #444444;}
|
2602 |
.pad10 {padding: 10px;}
|
2603 |
#boxdohl {font-weight: bold; padding: 0px 10px; <?php echo $all[self::$opt_dohl] ? '' : 'display: none;' ?>}
|
2604 |
-
#boxdyn {font-weight: bold; padding: 0px 10px; <?php echo $all[self::$opt_dynload] ? '' : 'display: none;' ?>}
|
2605 |
#boxspdc {padding: 0px 10px; <?php echo $all[self::$opt_spdc] ? '' : 'display: none;' ?>}
|
2606 |
#boxdefaultvol {font-weight: bold; padding: 0px 10px; <?php echo $all[self::$opt_defaultvol] ? '' : 'display: none;' ?>}
|
2607 |
.vol-output {display: none; width: 30px; color: #008800;}
|
@@ -2656,7 +2743,7 @@ class YouTubePrefs
|
|
2656 |
<i>Method 2 - </i> If you want to do some formatting (e.g. add HTML to center a video) or have two or more videos next to each other on the same line, wrap each link with the <code>[embedyt]...[/embedyt]</code> shortcode. <b>Tip for embedding videos on the same line:</b> As shown in the example image below, decrease the size of each video so that they fit together on the same line (See the "How To Override Defaults" section for height and width instructions).
|
2657 |
</p>
|
2658 |
<p>
|
2659 |
-
<b>For galleries:</b> <a href="#jumpgallery">Click here</a> scroll down to gallery settings and directions.
|
2660 |
</p>
|
2661 |
<p>
|
2662 |
<b>For self-contained playlists:</b> Go to the page for the playlist that lists all of its videos (<a target="_blank" href="http://www.youtube.com/playlist?list=PL70DEC2B0568B5469">Example »</a>). Click on the video that you want the playlist to start with. Copy and paste that browser URL into your blog on its own line. If you want the first video to always be the latest video in your playlist, check the option "Playlist Ordering" in the settings down below (you will also see this option available if you use the Pro Wizard). If you want to have two or more playlists next to each other on the same line, wrap each link with the <code>[embedyt]...[/embedyt]</code> shortcode.
|
@@ -2702,12 +2789,12 @@ class YouTubePrefs
|
|
2702 |
</p>
|
2703 |
<div class="jumper" id="jumpdefaults"></div>
|
2704 |
<h3 class="sect">
|
2705 |
-
|
2706 |
</h3>
|
2707 |
<p>
|
2708 |
-
|
2709 |
</p>
|
2710 |
-
|
2711 |
|
2712 |
<div class="ytindent chx">
|
2713 |
<p>
|
@@ -2937,7 +3024,7 @@ class YouTubePrefs
|
|
2937 |
<p><code>&layout=gallery</code></p>
|
2938 |
<p>For example, below is a playlist that has been converted into a gallery. Notice the new layout parameter, with no spaces:</p>
|
2939 |
<p>
|
2940 |
-
<code>[embedyt]https://www.youtube.com/playlist?list=PLx0sYbCqOb8TBPRdmBHs5Iftvv9TPboYG
|
2941 |
</p>
|
2942 |
<p>
|
2943 |
<b>Channel Galleries:</b> To display a channel as a gallery with thumbnails, <a href="https://youtu.be/XvFL-Rr-2Qo" target="_blank">watch the first minute and a half of this video </a>.
|
@@ -2960,12 +3047,12 @@ class YouTubePrefs
|
|
2960 |
<p>
|
2961 |
<label for="<?php echo self::$opt_gallery_pagesize; ?>"><b class="chktitle">Gallery Page Size:</b></label>
|
2962 |
<select name="<?php echo self::$opt_gallery_pagesize; ?>" id="<?php echo self::$opt_gallery_pagesize; ?>" style="width: 60px;">
|
2963 |
-
|
2964 |
-
|
2965 |
-
|
2966 |
-
|
2967 |
-
|
2968 |
-
|
2969 |
<?php
|
2970 |
}
|
2971 |
?>
|
@@ -3016,6 +3103,10 @@ class YouTubePrefs
|
|
3016 |
<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">
|
3017 |
<label for="<?php echo self::$opt_gallery_autonext; ?>"><b class="chktitle">Automatic Continuous Play:</b> <sup class="orange">NEW</sup> Automatically play the next video in the gallery as soon as the current video finished.</label>
|
3018 |
</p>
|
|
|
|
|
|
|
|
|
3019 |
<div class="pad20">
|
3020 |
<p>
|
3021 |
<strong class="orange">Note:</strong> We have an instructional video that shows how to generate the codes needed to embed two different types of galleries using the FREE and PRO version of the plugin:
|
@@ -3031,18 +3122,18 @@ class YouTubePrefs
|
|
3031 |
</div>
|
3032 |
</div>
|
3033 |
|
3034 |
-
|
3035 |
|
3036 |
<div class="upgchecks">
|
3037 |
<h3 class="sect">PRO Features</h3>
|
3038 |
-
|
3039 |
-
|
3040 |
-
|
3041 |
-
|
3042 |
<p class="smallnote orange">Below are PRO features for enhanced SEO and performance (works for even past embed links). Gallery options for PRO users will also be listed here.</p>
|
3043 |
<p>
|
3044 |
<img class="ssaltgallery" src="<?php echo plugins_url('images/ssaltgalleryall.jpg', __FILE__) ?>" />
|
3045 |
-
|
3046 |
<select name="<?php echo self::$opt_gallery_style; ?>" id="<?php echo self::$opt_gallery_style; ?>" >
|
3047 |
<option value="">Gallery Style</option>
|
3048 |
<option value="grid" <?php echo 'grid' === $cleanstyle ? 'selected' : '' ?> >Grid (default)</option>
|
@@ -3068,7 +3159,7 @@ class YouTubePrefs
|
|
3068 |
<div class="hr"></div>
|
3069 |
<p>
|
3070 |
<img class="ssaltgallery" src="<?php echo plugins_url('images/ssaltgallerycircles.jpg', __FILE__) ?>" />
|
3071 |
-
|
3072 |
<select name="<?php echo self::$opt_gallery_thumbcrop; ?>" id="<?php echo self::$opt_gallery_thumbcrop; ?>" >
|
3073 |
<option value="">Thumbnail Shape</option>
|
3074 |
<option value="box" <?php echo 'box' === $cleancrop ? 'selected' : '' ?> >Rectangle (default)</option>
|
@@ -3129,9 +3220,14 @@ class YouTubePrefs
|
|
3129 |
<div class="hr"></div>
|
3130 |
<p>
|
3131 |
<input name="<?php echo self::$opt_dynload; ?>" id="<?php echo self::$opt_dynload; ?>" <?php checked($all[self::$opt_dynload], 1); ?> type="checkbox" class="checkbox">
|
|
|
|
|
|
|
|
|
|
|
3132 |
<span id="boxdyn">
|
3133 |
Animation:
|
3134 |
-
|
3135 |
<select name="<?php echo self::$opt_dyntype; ?>" id="<?php echo self::$opt_dyntype; ?>" >
|
3136 |
<option value="">Select type</option>
|
3137 |
<option value="rotateIn" <?php echo 'rotateIn' === $cleandyn ? 'selected' : '' ?> >rotate in</option>
|
@@ -3148,10 +3244,6 @@ class YouTubePrefs
|
|
3148 |
<option value="zoomInUp" <?php echo 'zoomInUp' === $cleandyn ? 'selected' : '' ?> >zoom in upward</option>
|
3149 |
</select>
|
3150 |
</span>
|
3151 |
-
<label for="<?php echo self::$opt_dynload; ?>">
|
3152 |
-
<b>(PRO)</b> <b class="chktitle">Special Lazy-Loading Effects:</b>
|
3153 |
-
Add eye-catching special effects that will make your YouTube embeds bounce, flip, pulse, or slide as they lazy load on the screen. Check this box to select your desired effect. <a target="_blank" href="<?php echo self::$epbase ?>/add-special-effects-to-youtube-embeds-in-wordpress.aspx">Read more here »</a>
|
3154 |
-
</label>
|
3155 |
</p>
|
3156 |
<div class="hr"></div>
|
3157 |
<p>
|
@@ -3172,11 +3264,11 @@ class YouTubePrefs
|
|
3172 |
</label>
|
3173 |
</p>
|
3174 |
|
3175 |
-
|
3176 |
-
|
3177 |
-
|
3178 |
-
|
3179 |
-
|
3180 |
<p class="smallnote orange">Below are PRO features for enhanced SEO and performance (works for even past embed links). </p>
|
3181 |
<p>
|
3182 |
<img class="ssaltgallery" src="<?php echo plugins_url('images/ssaltgalleryall.jpg', __FILE__) ?>" />
|
@@ -3267,12 +3359,12 @@ class YouTubePrefs
|
|
3267 |
<p>
|
3268 |
<a href="<?php echo self::$epbase ?>/dashboard/pro-easy-video-analytics.aspx" target="_blank">Activate the above and several other features »</a>
|
3269 |
</p>
|
3270 |
-
|
3271 |
-
|
3272 |
-
|
3273 |
<div class="clearboth"></div>
|
3274 |
</div>
|
3275 |
-
|
3276 |
|
3277 |
<hr>
|
3278 |
|
@@ -3280,47 +3372,47 @@ class YouTubePrefs
|
|
3280 |
<div class="jumper" id="jumpoverride"></div>
|
3281 |
|
3282 |
<h3 class="sect">
|
3283 |
-
|
3284 |
</h3>
|
3285 |
<p>Suppose you have a few videos that need to be different from the above defaults. You can add options to the end of a link as displayed below to override the above defaults. Each option should begin with '&'.
|
3286 |
<br><span class="smallnote orange">PRO users: You can use the big blue <a href="<?php echo self::$epbase . '/dashboard/pro-easy-video-analytics.aspx?ref=protab' ?>" target="_blank">customize</a> buttons that you will see inside the wizard, instead of memorizing the following.</span>
|
3287 |
-
|
3288 |
-
|
3289 |
-
|
3290 |
-
|
3291 |
-
|
3292 |
-
|
3293 |
-
|
3294 |
-
|
3295 |
-
|
3296 |
-
|
3297 |
-
|
3298 |
-
|
3299 |
-
|
3300 |
-
|
3301 |
-
|
3302 |
-
|
3303 |
-
|
3304 |
-
|
3305 |
-
|
3306 |
-
|
3307 |
-
|
3308 |
-
|
3309 |
-
|
3310 |
-
|
3311 |
-
|
3312 |
-
|
3313 |
<div class="save-changes-follow"> <?php self::save_changes_button(isset($_POST[$ytprefs_submitted]) && $_POST[$ytprefs_submitted] == 'Y'); ?> </div>
|
3314 |
</form>
|
3315 |
<div class="jumper" id="jumppro"></div>
|
3316 |
<div id="goprobox">
|
3317 |
-
|
3318 |
-
|
3319 |
-
|
3320 |
-
|
3321 |
-
|
3322 |
-
|
3323 |
-
|
3324 |
<?php
|
3325 |
}
|
3326 |
else
|
@@ -3409,7 +3501,7 @@ class YouTubePrefs
|
|
3409 |
<div style="clear: both;"></div>
|
3410 |
<br>
|
3411 |
<h3 class="bold">Enter and save your PRO key (emailed to you):</h3>
|
3412 |
-
|
3413 |
<form name="form2" method="post" action="" id="epform2" class="submitpro" <?php
|
3414 |
if ($all[self::$opt_pro] && strlen(trim($all[self::$opt_pro])) > 0)
|
3415 |
{
|
@@ -3419,10 +3511,10 @@ class YouTubePrefs
|
|
3419 |
|
3420 |
<input name="<?php echo self::$opt_pro; ?>" id="opt_pro" value="<?php echo $all[self::$opt_pro]; ?>" type="text">
|
3421 |
<input type="submit" name="Submit" class="button-primary" id="prokeysubmit" value="<?php _e('Save Key') ?>" />
|
3422 |
-
|
3423 |
-
|
3424 |
-
|
3425 |
-
|
3426 |
<span style="font-size: 25px; color: #cccccc;">|</span> <a href="<?php echo self::$epbase ?>/dashboard/pro-easy-video-analytics.aspx" class="button-primary brightpro" target="_blank">Click here to go PRO »</a>
|
3427 |
<?php
|
3428 |
}
|
@@ -3475,15 +3567,15 @@ class YouTubePrefs
|
|
3475 |
|
3476 |
<iframe src="<?php echo self::$epbase ?>/dashboard/prosupport.aspx?simple=1&prokey=<?php echo $all[self::$opt_pro]; ?>&domain=<?php echo site_url(); ?>" width="500" height="<?php echo ($all[self::$opt_pro] && strlen(trim($all[self::$opt_pro])) > 0) ? "500" : "140"; ?>"></iframe>
|
3477 |
|
3478 |
-
|
3479 |
-
|
3480 |
-
|
3481 |
-
|
3482 |
<br>
|
3483 |
<br>
|
3484 |
<iframe src="<?php echo self::$epbase ?>/dashboard/likecoupon.aspx" width="600" height="500"></iframe>
|
3485 |
-
|
3486 |
-
|
3487 |
<div class="ytnav">
|
3488 |
<a href="#jumphowto">How To Embed</a>
|
3489 |
<a href="#jumpwiz">Visual Wizard</a>
|
@@ -3886,12 +3978,12 @@ class YouTubePrefs
|
|
3886 |
|
3887 |
});
|
3888 |
</script>
|
3889 |
-
|
3890 |
-
|
3891 |
-
|
3892 |
-
|
3893 |
-
|
3894 |
-
|
3895 |
|
3896 |
<?php
|
3897 |
}
|
@@ -3911,251 +4003,251 @@ class YouTubePrefs
|
|
3911 |
});
|
3912 |
|
3913 |
</script>
|
3914 |
-
|
3915 |
-
|
3916 |
-
|
3917 |
<p class="submit">
|
3918 |
<input type="submit" onclick="return savevalidate();" name="Submit" class="button-primary ytprefs-submit" value="<?php _e($button_label) ?>" />
|
3919 |
<em>If you're using a separate caching plugin and you do not see your changes after saving, you might want to reset your cache.</em>
|
3920 |
</p>
|
3921 |
-
|
3922 |
-
|
3923 |
|
3924 |
-
|
|
|
|
|
|
|
3925 |
{
|
3926 |
-
|
3927 |
-
|
3928 |
-
|
3929 |
-
|
3930 |
-
|
3931 |
-
|
3932 |
-
|
3933 |
-
$cols = $cols == 0 ? 3.0 : $cols;
|
3934 |
-
$colwidth = 100.0 / $cols;
|
3935 |
-
$custom_css = "
|
3936 |
.epyt-gallery-thumb {
|
3937 |
width: " . round($colwidth, 3) . "%;
|
3938 |
}";
|
3939 |
-
|
3940 |
|
3941 |
-
|
3942 |
|
3943 |
-
|
3944 |
-
|
3945 |
-
|
3946 |
-
|
3947 |
-
|
3948 |
-
|
3949 |
-
|
3950 |
-
|
3951 |
-
|
3952 |
-
|
3953 |
-
|
3954 |
-
|
3955 |
-
|
3956 |
|
3957 |
-
|
3958 |
-
|
3959 |
|
3960 |
-
|
3961 |
-
|
3962 |
-
|
3963 |
-
|
3964 |
-
}
|
3965 |
}
|
3966 |
}
|
|
|
3967 |
|
3968 |
-
|
|
|
|
|
3969 |
{
|
3970 |
-
|
3971 |
-
{
|
3972 |
-
return $tag;
|
3973 |
-
}
|
3974 |
-
return str_replace('<script', '<script data-cfasync="false" ', $tag);
|
3975 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
3976 |
|
3977 |
-
|
3978 |
{
|
3979 |
-
$evselector = 'iframe.__youtube_prefs__[src]
|
|
|
3980 |
|
3981 |
-
|
3982 |
-
|
3983 |
-
$evselector = 'iframe.__youtube_prefs__[src]';
|
3984 |
-
}
|
3985 |
|
3986 |
-
|
|
|
|
|
|
|
|
|
|
|
3987 |
}
|
3988 |
-
|
3989 |
-
public static function get_responsiveselector()
|
3990 |
{
|
3991 |
-
|
3992 |
-
if (self::$alloptions[self::$opt_widgetfit] == 1)
|
3993 |
{
|
3994 |
-
$responsiveselector = '["iframe.
|
3995 |
}
|
3996 |
-
|
3997 |
{
|
3998 |
-
|
3999 |
-
{
|
4000 |
-
$responsiveselector = '["iframe[src*=\'youtube.com\']","iframe[src*=\'youtube-nocookie.com\']","iframe[data-ep-src*=\'youtube.com\']","iframe[data-ep-src*=\'youtube-nocookie.com\']","iframe[data-ep-gallerysrc*=\'youtube.com\']"]';
|
4001 |
-
}
|
4002 |
-
else
|
4003 |
-
{
|
4004 |
-
$responsiveselector = '["iframe.__youtube_prefs__"]';
|
4005 |
-
}
|
4006 |
}
|
4007 |
-
return $responsiveselector;
|
4008 |
}
|
|
|
|
|
4009 |
|
4010 |
-
|
|
|
|
|
|
|
4011 |
{
|
4012 |
-
$
|
4013 |
-
try
|
4014 |
-
{
|
4015 |
-
$embed_size_w = intval(get_option('embed_size_w'));
|
4016 |
-
|
4017 |
-
global $content_width;
|
4018 |
-
if (empty($content_width))
|
4019 |
-
{
|
4020 |
-
$content_width = $GLOBALS['content_width'];
|
4021 |
-
}
|
4022 |
|
4023 |
-
|
4024 |
-
|
4025 |
-
catch (Exception $ex)
|
4026 |
{
|
4027 |
-
|
4028 |
}
|
4029 |
|
4030 |
-
$blogwidth =
|
4031 |
-
|
4032 |
-
|
|
|
|
|
4033 |
}
|
4034 |
|
|
|
|
|
|
|
4035 |
}
|
4036 |
|
|
|
|
|
4037 |
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
4038 |
//class start
|
4039 |
-
|
4040 |
-
|
4041 |
|
4042 |
-
|
4043 |
-
|
4044 |
|
4045 |
-
|
4046 |
-
|
4047 |
-
|
4048 |
-
|
4049 |
|
4050 |
-
|
4051 |
-
|
4052 |
-
|
4053 |
-
|
4054 |
-
|
4055 |
-
|
4056 |
-
|
4057 |
|
4058 |
-
|
4059 |
-
|
4060 |
-
|
4061 |
-
|
4062 |
|
4063 |
-
|
|
|
|
|
|
|
|
|
4064 |
{
|
4065 |
-
|
4066 |
-
|
4067 |
-
|
4068 |
-
|
4069 |
-
//the function that adds the javascript
|
4070 |
-
add_filter('mce_external_plugins', array($this, 'add_new_tinymce_plugin'));
|
4071 |
-
//adds the button to the tinymce button array
|
4072 |
-
add_filter('mce_buttons', array($this, 'register_new_button'));
|
4073 |
-
}
|
4074 |
}
|
|
|
4075 |
|
4076 |
-
|
4077 |
-
|
4078 |
-
|
4079 |
-
|
4080 |
-
function register_new_button($buttons)
|
4081 |
-
{
|
4082 |
-
array_push($buttons, $this->btn_arr["Seperator"], $this->btn_arr["Name"]);
|
4083 |
-
return $buttons;
|
4084 |
-
}
|
4085 |
|
4086 |
-
|
4087 |
-
|
4088 |
-
|
4089 |
-
|
|
|
4090 |
|
4091 |
-
|
4092 |
-
|
4093 |
-
|
4094 |
-
|
4095 |
-
}
|
4096 |
|
4097 |
-
|
4098 |
-
|
4099 |
-
|
4100 |
-
|
|
|
4101 |
|
4102 |
-
|
4103 |
-
|
4104 |
-
|
4105 |
-
|
4106 |
-
}
|
4107 |
|
|
|
|
|
|
|
|
|
4108 |
}
|
4109 |
|
|
|
|
|
4110 |
//class end
|
4111 |
|
4112 |
|
4113 |
-
|
4114 |
-
|
4115 |
|
4116 |
|
4117 |
-
|
4118 |
-
|
4119 |
-
|
4120 |
-
|
4121 |
-
|
4122 |
-
|
4123 |
-
|
4124 |
|
4125 |
-
|
4126 |
|
4127 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4128 |
{
|
4129 |
-
|
4130 |
-
add_action('wp_print_scripts', 'youtubeprefs_output_scriptvars');
|
4131 |
-
wp_enqueue_script('__ytprefs_admin__', plugins_url('scripts/ytprefs-admin.min.js', __FILE__), array('jquery'));
|
4132 |
-
|
4133 |
-
if (
|
4134 |
-
//(!(isset(YouTubePrefs::$alloptions[YouTubePrefs::$opt_pro]) && strlen(trim(YouTubePrefs::$alloptions[YouTubePrefs::$opt_pro])) > 0)) && // display only if not pro ooopointer
|
4135 |
-
(get_bloginfo('version') >= '3.3') && YouTubePrefs::custom_admin_pointers_check()
|
4136 |
-
)
|
4137 |
-
{
|
4138 |
-
add_action('admin_print_footer_scripts', 'YouTubePrefs::custom_admin_pointers_footer');
|
4139 |
|
4140 |
-
|
4141 |
-
|
4142 |
-
|
4143 |
|
4144 |
-
|
4145 |
-
|
4146 |
-
|
4147 |
-
}
|
4148 |
}
|
|
|
4149 |
|
4150 |
-
|
|
|
|
|
|
|
4151 |
{
|
4152 |
-
YouTubePrefs
|
4153 |
-
|
4154 |
-
|
4155 |
-
|
4156 |
-
$epprokey = YouTubePrefs::$alloptions[YouTubePrefs::$opt_pro];
|
4157 |
-
$myytdefaults = http_build_query(YouTubePrefs::$alloptions);
|
4158 |
-
?>
|
4159 |
<script type="text/javascript">
|
4160 |
var wpajaxurl = "<?php echo admin_url('admin-ajax.php') ?>";
|
4161 |
if (window.location.toString().indexOf('https://') == 0)
|
@@ -4233,9 +4325,9 @@ class YouTubePrefs
|
|
4233 |
|
4234 |
|
4235 |
</script>
|
4236 |
-
|
4237 |
-
}
|
4238 |
}
|
|
|
4239 |
|
4240 |
// function embedplus_strip_shortcode_from_excerpt($content)
|
4241 |
// {
|
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.2
|
7 |
Author: EmbedPlus Team
|
8 |
Author URI: http://www.embedplus.com
|
9 |
*/
|
32 |
class YouTubePrefs
|
33 |
{
|
34 |
|
35 |
+
public static $version = '11.2';
|
36 |
public static $opt_version = 'version';
|
37 |
public static $optembedwidth = null;
|
38 |
public static $optembedheight = null;
|
96 |
public static $opt_gallery_scrolloffset = 'gallery_scrolloffset';
|
97 |
public static $opt_gallery_showtitle = 'gallery_showtitle';
|
98 |
public static $opt_gallery_showpaging = 'gallery_showpaging';
|
99 |
+
public static $opt_gallery_thumbplay = 'gallery_thumbplay';
|
100 |
public static $opt_gallery_autonext = 'gallery_autonext';
|
101 |
public static $opt_gallery_channelsub = 'gallery_channelsub';
|
102 |
public static $opt_gallery_channelsublink = 'gallery_channelsublink';
|
182 |
|
183 |
self::do_ytprefs();
|
184 |
add_action('admin_menu', 'YouTubePrefs::ytprefs_plugin_menu');
|
185 |
+
|
186 |
+
if (self::$alloptions[self::$opt_pro] && strlen(trim(self::$alloptions[self::$opt_pro])) > 8)
|
187 |
+
{
|
188 |
+
add_action('admin_bar_menu', 'YouTubePrefs::ytprefs_admin_bar', 100);
|
189 |
+
add_action('wp_enqueue_scripts', array('YouTubePrefs', 'ytprefs_admin_bar_scripts'));
|
190 |
+
add_action('admin_enqueue_scripts', array('YouTubePrefs', 'ytprefs_admin_bar_scripts'));
|
191 |
+
}
|
192 |
+
|
193 |
+
|
194 |
if (!is_admin())
|
195 |
{
|
196 |
|
218 |
}
|
219 |
}
|
220 |
|
221 |
+
public static function ytprefs_admin_bar_scripts()
|
222 |
+
{
|
223 |
+
if (current_user_can('edit_posts'))
|
224 |
+
{
|
225 |
+
wp_enqueue_script('__ytprefs__bar', plugins_url('scripts/ytprefs-bar' . self::$min . '.js', __FILE__), array('jquery'));
|
226 |
+
wp_localize_script('__ytprefs__bar', '_EPYTA_', array(
|
227 |
+
'ajaxurl' => admin_url('admin-ajax.php'),
|
228 |
+
'security' => wp_create_nonce('embedplus-nonce'),
|
229 |
+
'pluginurl' => plugins_url('/', __FILE__)
|
230 |
+
));
|
231 |
+
}
|
232 |
+
}
|
233 |
+
|
234 |
+
public static function ytprefs_admin_bar($wp_admin_bar)
|
235 |
+
{
|
236 |
+
$args = array(
|
237 |
+
'id' => 'ytprefs-bar-cache',
|
238 |
+
'title' => 'Clear YouTube Cache',
|
239 |
+
'href' => '#',
|
240 |
+
'meta' => array(
|
241 |
+
'class' => ''
|
242 |
+
)
|
243 |
+
);
|
244 |
+
$wp_admin_bar->add_node($args);
|
245 |
+
}
|
246 |
+
|
247 |
public static function show_glance_list()
|
248 |
{
|
249 |
$glancehref = self::show_glance();
|
775 |
$_gallery_showtitle = 1;
|
776 |
$_gallery_showpaging = 1;
|
777 |
$_gallery_autonext = 0;
|
778 |
+
$_gallery_thumbplay = 1;
|
779 |
$_gallery_channelsub = 0;
|
780 |
$_gallery_channelsublink = '';
|
781 |
$_gallery_channelsubtext = 'Subscribe to my channel';
|
848 |
$_gallery_showtitle = self::tryget($arroptions, self::$opt_gallery_showtitle, 1);
|
849 |
$_gallery_showpaging = self::tryget($arroptions, self::$opt_gallery_showpaging, 1);
|
850 |
$_gallery_autonext = self::tryget($arroptions, self::$opt_gallery_autonext, 0);
|
851 |
+
$_gallery_thumbplay = self::tryget($arroptions, self::$opt_gallery_thumbplay, 1);
|
852 |
$_gallery_style = self::tryget($arroptions, self::$opt_gallery_style, 'grid');
|
853 |
$_gallery_thumbcrop = self::tryget($arroptions, self::$opt_gallery_thumbcrop, 'box');
|
854 |
$_gallery_channelsub = self::tryget($arroptions, self::$opt_gallery_channelsub, $_gallery_channelsub);
|
917 |
self::$opt_gallery_showtitle => $_gallery_showtitle,
|
918 |
self::$opt_gallery_showpaging => $_gallery_showpaging,
|
919 |
self::$opt_gallery_autonext => $_gallery_autonext,
|
920 |
+
self::$opt_gallery_thumbplay => $_gallery_thumbplay,
|
921 |
self::$opt_gallery_channelsub => $_gallery_channelsub,
|
922 |
self::$opt_gallery_channelsublink => $_gallery_channelsublink,
|
923 |
self::$opt_gallery_channelsubtext => $_gallery_channelsubtext,
|
1034 |
|
1035 |
public static function get_gallery_page($options)
|
1036 |
{
|
1037 |
+
$gallobj = new stdClass();
|
1038 |
+
|
1039 |
$options->pageSize = min(intval($options->pageSize), 50);
|
1040 |
$options->columns = intval($options->columns);
|
1041 |
$options->showTitle = intval($options->showTitle);
|
1042 |
$options->showPaging = intval($options->showPaging);
|
1043 |
$options->autonext = intval($options->autonext);
|
1044 |
+
$options->thumbplay = intval($options->thumbplay);
|
1045 |
$options->showDsc = intval($options->showDsc);
|
1046 |
$options->thumbcrop = sanitize_html_class($options->thumbcrop);
|
1047 |
$options->style = sanitize_html_class($options->style);
|
1048 |
|
1049 |
if (empty($options->apiKey))
|
1050 |
{
|
1051 |
+
$gallobj->html = '<div>Please enter your YouTube API key to embed galleries.</div>';
|
1052 |
+
return $gallobj;
|
1053 |
}
|
1054 |
|
1055 |
$apiEndpoint = 'https://www.googleapis.com/youtube/v3/playlistItems?part=snippet,status&playlistId=' . $options->playlistId
|
1060 |
$apiEndpoint .= '&pageToken=' . $options->pageToken;
|
1061 |
}
|
1062 |
$spdckey = '';
|
1063 |
+
if (self::$alloptions[self::$opt_pro] && strlen(trim(self::$alloptions[self::$opt_pro])) > 9 && self::$alloptions[self::$opt_spdc] == 1)
|
1064 |
{
|
1065 |
try
|
1066 |
{
|
1067 |
+
$optionsstr = json_encode($options);
|
1068 |
+
$spdckey = self::$spdcprefix . '_' . md5($apiEndpoint . $optionsstr);
|
1069 |
$spdcval = get_transient($spdckey);
|
1070 |
if (!empty($spdcval))
|
1071 |
{
|
1072 |
//self::debuglog((microtime(true) - $time_start) . "\t" . $spdckey . "\t" . $spdcval . "\r\n");
|
1073 |
+
$gallobj->html = $spdcval;
|
1074 |
+
return $gallobj;
|
1075 |
}
|
1076 |
}
|
1077 |
catch (Exception $ex)
|
1081 |
}
|
1082 |
|
1083 |
$code = '';
|
1084 |
+
$init_id = null;
|
1085 |
|
1086 |
$apiResult = wp_remote_get($apiEndpoint);
|
1087 |
|
1088 |
if (is_wp_error($apiResult))
|
1089 |
{
|
1090 |
+
$gallobj->html = '<div>Sorry, there was a YouTube API error: <em>' . htmlspecialchars(strip_tags($apiResult->get_error_message())) . '</em>' .
|
1091 |
+
' Please make sure you performed the <a href="https://www.youtube.com/watch?v=px8LvNIVblg" target="_blank">steps in this video</a> to create and save a proper API key.' .
|
1092 |
+
'</div>';
|
1093 |
+
return $gallobj;
|
1094 |
}
|
1095 |
|
1096 |
if (self::$alloptions[self::$opt_debugmode] == 1 && current_user_can('manage_options'))
|
1097 |
{
|
1098 |
$redactedEndpoint = preg_replace('@&key=[^&]+@i', '&key=PRIVATE', $apiEndpoint);
|
1099 |
+
$gallobj->html = '<pre onclick="_EPADashboard_.selectText(this);" class="epyt-debug">CLICK this debug text to auto-select all. Then, COPY the selection.' . "\n\n" . $redactedEndpoint . "\n\n" . print_r($apiResult, true) . '</pre>';
|
1100 |
+
return $gallobj;
|
1101 |
}
|
1102 |
|
1103 |
$jsonResult = json_decode($apiResult['body']);
|
1106 |
{
|
1107 |
if (isset($jsonResult->error->message))
|
1108 |
{
|
1109 |
+
$gallobj->html = '<div>Sorry, there was a YouTube API error: <em>' . htmlspecialchars(strip_tags($jsonResult->error->message)) . '</em>' .
|
1110 |
+
' Please make sure you performed the <a href="https://www.youtube.com/watch?v=px8LvNIVblg" target="_blank">steps in this video</a> to create and save a proper API key.' .
|
1111 |
+
'</div>';
|
1112 |
+
return $gallobj;
|
1113 |
}
|
1114 |
+
$gallobj->html = '<div>Sorry, there may be an issue with your YouTube API key. Please make sure you performed the <a href="https://www.youtube.com/watch?v=px8LvNIVblg" target="_blank">steps in this video</a> to create and save a proper API key.</div>';
|
1115 |
+
return $gallobj;
|
1116 |
}
|
1117 |
|
1118 |
|
1163 |
$thumb->title = $options->showTitle ? $item->snippet->title : '';
|
1164 |
$thumb->privacyStatus = isset($item->status->privacyStatus) ? $item->status->privacyStatus : null;
|
1165 |
|
1166 |
+
if ($cnt == 0 && $options->pageToken == null)
|
1167 |
+
{
|
1168 |
+
$init_id = $thumb->id;
|
1169 |
+
}
|
1170 |
+
|
1171 |
if (self::$alloptions[self::$opt_pro] && strlen(trim(self::$alloptions[self::$opt_pro])) > 0 && $options->style == 'listview')
|
1172 |
{
|
1173 |
$thumb->dsc = $options->showDsc ? $item->snippet->description : '';
|
1227 |
. '" data-showtitle="' . intval($options->showTitle)
|
1228 |
. '" data-showpaging="' . intval($options->showPaging)
|
1229 |
. '" data-autonext="' . intval($options->autonext)
|
1230 |
+
. '" data-thumbplay="' . intval($options->thumbplay)
|
1231 |
+
. ((self::$alloptions[self::$opt_pro] && strlen(trim(self::$alloptions[self::$opt_pro])) > 9 && $options->style == 'listview' && $options->showDsc) ? '" data-showdsc="' . intval($options->showDsc) : '')
|
1232 |
+
. ((self::$alloptions[self::$opt_pro] && strlen(trim(self::$alloptions[self::$opt_pro])) > 9 && !in_array($options->thumbcrop, array('box', ''))) ? '" data-thumbcrop="' . $options->thumbcrop : '')
|
1233 |
. '"><div class="arrow">«</div> <div>' . $txtprev . '</div></div>';
|
1234 |
|
1235 |
|
1246 |
. '" data-showtitle="' . intval($options->showTitle)
|
1247 |
. '" data-showpaging="' . intval($options->showPaging)
|
1248 |
. '" data-autonext="' . intval($options->autonext)
|
1249 |
+
. '" data-thumbplay="' . intval($options->thumbplay)
|
1250 |
. ((self::$alloptions[self::$opt_pro] && strlen(trim(self::$alloptions[self::$opt_pro])) > 0 && $options->style == 'listview' && $options->showDsc) ? '" data-showdsc="' . intval($options->showDsc) : '')
|
1251 |
+
. ((self::$alloptions[self::$opt_pro] && strlen(trim(self::$alloptions[self::$opt_pro])) > 9 && !in_array($options->thumbcrop, array('box', ''))) ? '" data-thumbcrop="' . $options->thumbcrop : '')
|
1252 |
. '"><div>' . $txtnext . '</div> <div class="arrow">»</div></div>';
|
1253 |
|
1254 |
$pagination .= '<div class="epyt-loader"><img width="16" height="11" src="' . plugins_url('images/gallery-page-loader.gif', __FILE__) . '"></div>';
|
1271 |
|
1272 |
//self::debuglog((microtime(true) - $time_start) . "\t" . $spdckey . "\t" . $code . "\r\n");
|
1273 |
}
|
1274 |
+
|
1275 |
+
$gallobj->html = $code;
|
1276 |
+
$gallobj->init_id = $init_id;
|
1277 |
+
return $gallobj;
|
1278 |
}
|
1279 |
|
1280 |
public static function get_thumbnail_html($thumb, $options)
|
1322 |
//check_ajax_referer('embedplus-nonce', 'security');
|
1323 |
$options = (object) $_POST['options'];
|
1324 |
$options->apiKey = self::$alloptions[self::$opt_apikey];
|
1325 |
+
echo self::get_gallery_page($options)->html;
|
1326 |
die();
|
1327 |
}
|
1328 |
}
|
1364 |
try
|
1365 |
{
|
1366 |
$kparams = $finalparams;
|
1367 |
+
$kparams['iscontent'] = $iscontent;
|
1368 |
ksort($kparams);
|
1369 |
$jparams = json_encode($kparams);
|
1370 |
$spdckey = self::$spdcprefix . '_' . md5($jparams);
|
1502 |
try
|
1503 |
{
|
1504 |
$videoidoutput = '';
|
1505 |
+
if (isset($finalparams['plindex']))
|
1506 |
+
{
|
1507 |
+
$finalparams['index'] = intval($finalparams['plindex']);
|
1508 |
+
}
|
1509 |
}
|
1510 |
catch (Exception $ex)
|
1511 |
{
|
1528 |
$gallery_options->showTitle = intval($finalparams[self::$opt_gallery_showtitle]);
|
1529 |
$gallery_options->showPaging = intval($finalparams[self::$opt_gallery_showpaging]);
|
1530 |
$gallery_options->autonext = intval($finalparams[self::$opt_gallery_autonext]);
|
1531 |
+
$gallery_options->thumbplay = intval($finalparams[self::$opt_gallery_thumbplay]);
|
1532 |
$gallery_options->showDsc = intval($finalparams[self::$opt_gallery_showdsc]);
|
1533 |
$gallery_options->style = $finalparams[self::$opt_gallery_style];
|
1534 |
$gallery_options->thumbcrop = $finalparams[self::$opt_gallery_thumbcrop];
|
1542 |
htmlspecialchars(self::$alloptions[self::$opt_gallery_channelsubtext], ENT_QUOTES) . '</a></div>';
|
1543 |
}
|
1544 |
|
1545 |
+
|
1546 |
+
$gallery_page_obj = self::get_gallery_page($gallery_options);
|
1547 |
+
|
1548 |
+
//$dynsrc = '';// 'data-ep-gallery';
|
1549 |
$galleryWrapper1 = '<div class="epyt-gallery" data-currpage="1">';
|
1550 |
$galleryWrapper2 = '</div>';
|
1551 |
$galleryCode = $subbutton . '<div class="epyt-gallery-list epyt-gallery-style-' . esc_attr($gallery_options->style) . '">' .
|
1552 |
+
$gallery_page_obj->html .
|
1553 |
'</div>';
|
1554 |
+
$videoidoutput = isset($gallery_page_obj->init_id) ? $gallery_page_obj->init_id : ''; // 'GALLERYVIDEOID';
|
1555 |
}
|
1556 |
|
1557 |
$code1 = '<iframe ' . $dyntype . $centercode . ' id="_ytid_' . rand(10000, 99999) . '" width="' . self::$defaultwidth . '" height="' . self::$defaultheight .
|
2262 |
$new_pointer_content .= '<p>'; // ooopointer
|
2263 |
if (!(self::$alloptions[self::$opt_pro] && strlen(trim(self::$alloptions[self::$opt_pro])) > 0))
|
2264 |
{
|
2265 |
+
$new_pointer_content .= __("This update adds improved wizard and gallery options to Free and Pro versions. A \"clear YouTube cache\" shortcut was added to <a target=_blank href=" . self::$epbase . '/dashboard/pro-easy-video-analytics.aspx?ref=frompointer' . ">Pro versions »</a>");
|
2266 |
}
|
2267 |
else
|
2268 |
{
|
2269 |
+
$new_pointer_content .= __("This update adds improved wizard and gallery options to Free and Pro versions. A \"clear YouTube cache\" shortcut was added to Pro versions.");
|
2270 |
}
|
2271 |
$new_pointer_content .= '</p>';
|
2272 |
|
2357 |
$new_options[self::$opt_gallery_showtitle] = self::postchecked(self::$opt_gallery_showtitle) ? 1 : 0;
|
2358 |
$new_options[self::$opt_gallery_showpaging] = self::postchecked(self::$opt_gallery_showpaging) ? 1 : 0;
|
2359 |
$new_options[self::$opt_gallery_autonext] = self::postchecked(self::$opt_gallery_autonext) ? 1 : 0;
|
2360 |
+
$new_options[self::$opt_gallery_thumbplay] = self::postchecked(self::$opt_gallery_thumbplay) ? 1 : 0;
|
2361 |
$new_options[self::$opt_gallery_channelsub] = self::postchecked(self::$opt_gallery_channelsub) ? 1 : 0;
|
2362 |
$new_options[self::$opt_gallery_customarrows] = self::postchecked(self::$opt_gallery_customarrows) ? 1 : 0;
|
2363 |
$new_options[self::$opt_gallery_showdsc] = self::postchecked(self::$opt_gallery_showdsc) ? 1 : 0;
|
2443 |
$_gallery_style = 'grid';
|
2444 |
try
|
2445 |
{
|
2446 |
+
if (isset($_POST[self::$opt_gallery_style]))
|
2447 |
+
{
|
2448 |
+
$_gallery_style = trim(str_replace(array(' ', "'", '"'), array('', '', ''), strip_tags($_POST[self::$opt_gallery_style])));
|
2449 |
+
}
|
2450 |
}
|
2451 |
catch (Exception $ex)
|
2452 |
{
|
2458 |
$_gallery_thumbcrop = 'box';
|
2459 |
try
|
2460 |
{
|
2461 |
+
if (isset($_POST[self::$opt_gallery_thumbcrop]))
|
2462 |
+
{
|
2463 |
+
$_gallery_thumbcrop = trim(str_replace(array(' ', "'", '"'), array('', '', ''), strip_tags($_POST[self::$opt_gallery_thumbcrop])));
|
2464 |
+
}
|
2465 |
}
|
2466 |
catch (Exception $ex)
|
2467 |
{
|
2524 |
try
|
2525 |
{
|
2526 |
$_curr_apikey = $all[self::$opt_apikey];
|
2527 |
+
$_schema_apikey = '';
|
2528 |
+
if (isset($_POST[self::$opt_apikey]))
|
2529 |
+
{
|
2530 |
+
$_schema_apikey = trim(str_replace(array(' ', "'", '"'), array('', '', ''), strip_tags($_POST[self::$opt_apikey])));
|
2531 |
+
}
|
2532 |
+
|
2533 |
$_gallery_apikey = trim(str_replace(array(' ', "'", '"'), array('', '', ''), strip_tags($_POST[self::$opt_gallery_apikey])));
|
2534 |
|
2535 |
if (!empty($_schema_apikey) && $_schema_apikey != $_curr_apikey)
|
2547 |
}
|
2548 |
$new_options[self::$opt_apikey] = $_apikey;
|
2549 |
|
2550 |
+
// $_hl = '';
|
2551 |
+
// try
|
2552 |
+
// {
|
2553 |
+
// $temphl = strtolower(trim($_POST[self::$opt_hl]));
|
2554 |
+
// $_hl = preg_match('/^[a-z][a-z]$/i', $temphl) ? $temphl : '';
|
2555 |
+
// }
|
2556 |
+
// catch (Exception $ex)
|
2557 |
+
// {
|
2558 |
+
//
|
2559 |
+
// }
|
2560 |
+
// $new_options[self::$opt_hl] = $_hl;
|
2561 |
|
2562 |
$_dyntype = '';
|
2563 |
try
|
2564 |
{
|
2565 |
+
if (isset($_POST[self::$opt_dyntype]))
|
2566 |
+
{
|
2567 |
+
$tempdyntype = trim($_POST[self::$opt_dyntype]);
|
2568 |
+
$_dyntype = preg_match('/^[a-zA-Z-]+$/i', $tempdyntype) ? $tempdyntype : '';
|
2569 |
+
}
|
2570 |
}
|
2571 |
catch (Exception $ex)
|
2572 |
{
|
2577 |
$_spdcexp = 24;
|
2578 |
try
|
2579 |
{
|
2580 |
+
$_spdcexp = isset($_POST[self::$opt_spdcexp]) && is_numeric(trim($_POST[self::$opt_spdcexp])) ? intval(trim($_POST[self::$opt_spdcexp])) : $_spdcexp;
|
2581 |
}
|
2582 |
catch (Exception $ex)
|
2583 |
{
|
2667 |
.cuz {background-image: linear-gradient(to bottom,#4983FF,#0C5597) !important; color: #ffffff;}
|
2668 |
.brightpro {background-image: linear-gradient(to bottom,#ff5500,#cc2200) !important; color: #ffffff;}
|
2669 |
#boxdefaultdims {font-weight: bold; padding: 0px 10px; <?php echo $all[self::$opt_defaultdims] ? '' : 'display: none;' ?>}
|
2670 |
+
#boxcustomarrows {font-weight: bold; padding: 0px 10px; <?php echo $all[self::$opt_gallery_customarrows] ? 'display: block;' : 'display: none;' ?>}
|
2671 |
#boxchannelsub {font-weight: bold; padding: 0px 10px; <?php echo $all[self::$opt_gallery_channelsub] ? 'display: block;' : 'display: none;' ?>}
|
2672 |
.textinput {border-width: 2px !important;}
|
2673 |
h3.sect {border-radius: 10px; background-color: #D9E9F7; padding: 5px 5px 5px 10px; position: relative; font-weight: bold;}
|
2688 |
input.checkbox[disabled] {border: 1px dashed #444444;}
|
2689 |
.pad10 {padding: 10px;}
|
2690 |
#boxdohl {font-weight: bold; padding: 0px 10px; <?php echo $all[self::$opt_dohl] ? '' : 'display: none;' ?>}
|
2691 |
+
#boxdyn {font-weight: bold; padding: 0px 10px; <?php echo $all[self::$opt_dynload] ? 'display: block;' : 'display: none;' ?>}
|
2692 |
#boxspdc {padding: 0px 10px; <?php echo $all[self::$opt_spdc] ? '' : 'display: none;' ?>}
|
2693 |
#boxdefaultvol {font-weight: bold; padding: 0px 10px; <?php echo $all[self::$opt_defaultvol] ? '' : 'display: none;' ?>}
|
2694 |
.vol-output {display: none; width: 30px; color: #008800;}
|
2743 |
<i>Method 2 - </i> If you want to do some formatting (e.g. add HTML to center a video) or have two or more videos next to each other on the same line, wrap each link with the <code>[embedyt]...[/embedyt]</code> shortcode. <b>Tip for embedding videos on the same line:</b> As shown in the example image below, decrease the size of each video so that they fit together on the same line (See the "How To Override Defaults" section for height and width instructions).
|
2744 |
</p>
|
2745 |
<p>
|
2746 |
+
<b>For galleries:</b> <a href="#jumpgallery">Click here</a> to scroll down to gallery settings and directions.
|
2747 |
</p>
|
2748 |
<p>
|
2749 |
<b>For self-contained playlists:</b> Go to the page for the playlist that lists all of its videos (<a target="_blank" href="http://www.youtube.com/playlist?list=PL70DEC2B0568B5469">Example »</a>). Click on the video that you want the playlist to start with. Copy and paste that browser URL into your blog on its own line. If you want the first video to always be the latest video in your playlist, check the option "Playlist Ordering" in the settings down below (you will also see this option available if you use the Pro Wizard). If you want to have two or more playlists next to each other on the same line, wrap each link with the <code>[embedyt]...[/embedyt]</code> shortcode.
|
2789 |
</p>
|
2790 |
<div class="jumper" id="jumpdefaults"></div>
|
2791 |
<h3 class="sect">
|
2792 |
+
<?php _e("Default YouTube Options") ?> <a href="#top" class="totop">▲ top</a>
|
2793 |
</h3>
|
2794 |
<p>
|
2795 |
+
<?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.") ?>
|
2796 |
</p>
|
2797 |
+
<?php // self::save_changes_button(); ?>
|
2798 |
|
2799 |
<div class="ytindent chx">
|
2800 |
<p>
|
3024 |
<p><code>&layout=gallery</code></p>
|
3025 |
<p>For example, below is a playlist that has been converted into a gallery. Notice the new layout parameter, with no spaces:</p>
|
3026 |
<p>
|
3027 |
+
<code>[embedyt]https://www.youtube.com/playlist?list=PLx0sYbCqOb8TBPRdmBHs5Iftvv9TPboYG&layout=gallery[/embedyt]</code>
|
3028 |
</p>
|
3029 |
<p>
|
3030 |
<b>Channel Galleries:</b> To display a channel as a gallery with thumbnails, <a href="https://youtu.be/XvFL-Rr-2Qo" target="_blank">watch the first minute and a half of this video </a>.
|
3047 |
<p>
|
3048 |
<label for="<?php echo self::$opt_gallery_pagesize; ?>"><b class="chktitle">Gallery Page Size:</b></label>
|
3049 |
<select name="<?php echo self::$opt_gallery_pagesize; ?>" id="<?php echo self::$opt_gallery_pagesize; ?>" style="width: 60px;">
|
3050 |
+
<?php
|
3051 |
+
$gps_val = intval(trim($all[self::$opt_gallery_pagesize]));
|
3052 |
+
$gps_val = min($gps_val, 50);
|
3053 |
+
for ($gps = 1; $gps <= 50; $gps++)
|
3054 |
+
{
|
3055 |
+
?><option <?php echo $gps_val == $gps ? 'selected' : '' ?> value="<?php echo $gps ?>"><?php echo $gps ?></option>
|
3056 |
<?php
|
3057 |
}
|
3058 |
?>
|
3103 |
<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">
|
3104 |
<label for="<?php echo self::$opt_gallery_autonext; ?>"><b class="chktitle">Automatic Continuous Play:</b> <sup class="orange">NEW</sup> Automatically play the next video in the gallery as soon as the current video finished.</label>
|
3105 |
</p>
|
3106 |
+
<p>
|
3107 |
+
<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">
|
3108 |
+
<label for="<?php echo self::$opt_gallery_thumbplay; ?>"><b class="chktitle">Thumbnail Click Plays Video:</b> <sup class="orange">NEW</sup> 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>
|
3109 |
+
</p>
|
3110 |
<div class="pad20">
|
3111 |
<p>
|
3112 |
<strong class="orange">Note:</strong> We have an instructional video that shows how to generate the codes needed to embed two different types of galleries using the FREE and PRO version of the plugin:
|
3122 |
</div>
|
3123 |
</div>
|
3124 |
|
3125 |
+
<?php // self::save_changes_button(); ?>
|
3126 |
|
3127 |
<div class="upgchecks">
|
3128 |
<h3 class="sect">PRO Features</h3>
|
3129 |
+
<?php
|
3130 |
+
if ($all[self::$opt_pro] && strlen(trim($all[self::$opt_pro])) > 9)
|
3131 |
+
{
|
3132 |
+
?>
|
3133 |
<p class="smallnote orange">Below are PRO features for enhanced SEO and performance (works for even past embed links). Gallery options for PRO users will also be listed here.</p>
|
3134 |
<p>
|
3135 |
<img class="ssaltgallery" src="<?php echo plugins_url('images/ssaltgalleryall.jpg', __FILE__) ?>" />
|
3136 |
+
<?php $cleanstyle = trim($all[self::$opt_gallery_style]); ?>
|
3137 |
<select name="<?php echo self::$opt_gallery_style; ?>" id="<?php echo self::$opt_gallery_style; ?>" >
|
3138 |
<option value="">Gallery Style</option>
|
3139 |
<option value="grid" <?php echo 'grid' === $cleanstyle ? 'selected' : '' ?> >Grid (default)</option>
|
3159 |
<div class="hr"></div>
|
3160 |
<p>
|
3161 |
<img class="ssaltgallery" src="<?php echo plugins_url('images/ssaltgallerycircles.jpg', __FILE__) ?>" />
|
3162 |
+
<?php $cleancrop = trim($all[self::$opt_gallery_thumbcrop]); ?>
|
3163 |
<select name="<?php echo self::$opt_gallery_thumbcrop; ?>" id="<?php echo self::$opt_gallery_thumbcrop; ?>" >
|
3164 |
<option value="">Thumbnail Shape</option>
|
3165 |
<option value="box" <?php echo 'box' === $cleancrop ? 'selected' : '' ?> >Rectangle (default)</option>
|
3220 |
<div class="hr"></div>
|
3221 |
<p>
|
3222 |
<input name="<?php echo self::$opt_dynload; ?>" id="<?php echo self::$opt_dynload; ?>" <?php checked($all[self::$opt_dynload], 1); ?> type="checkbox" class="checkbox">
|
3223 |
+
<label for="<?php echo self::$opt_dynload; ?>">
|
3224 |
+
<b>(PRO)</b> <b class="chktitle">Special Lazy-Loading Effects:</b>
|
3225 |
+
Add eye-catching special effects that will make your YouTube embeds bounce, flip, pulse, or slide as they lazy load on the screen. Check this box to select your desired effect. <a target="_blank" href="<?php echo self::$epbase ?>/add-special-effects-to-youtube-embeds-in-wordpress.aspx">Read more here »</a>
|
3226 |
+
</label>
|
3227 |
+
<br>
|
3228 |
<span id="boxdyn">
|
3229 |
Animation:
|
3230 |
+
<?php $cleandyn = trim($all[self::$opt_dyntype]); ?>
|
3231 |
<select name="<?php echo self::$opt_dyntype; ?>" id="<?php echo self::$opt_dyntype; ?>" >
|
3232 |
<option value="">Select type</option>
|
3233 |
<option value="rotateIn" <?php echo 'rotateIn' === $cleandyn ? 'selected' : '' ?> >rotate in</option>
|
3244 |
<option value="zoomInUp" <?php echo 'zoomInUp' === $cleandyn ? 'selected' : '' ?> >zoom in upward</option>
|
3245 |
</select>
|
3246 |
</span>
|
|
|
|
|
|
|
|
|
3247 |
</p>
|
3248 |
<div class="hr"></div>
|
3249 |
<p>
|
3264 |
</label>
|
3265 |
</p>
|
3266 |
|
3267 |
+
<?php
|
3268 |
+
}
|
3269 |
+
else
|
3270 |
+
{
|
3271 |
+
?>
|
3272 |
<p class="smallnote orange">Below are PRO features for enhanced SEO and performance (works for even past embed links). </p>
|
3273 |
<p>
|
3274 |
<img class="ssaltgallery" src="<?php echo plugins_url('images/ssaltgalleryall.jpg', __FILE__) ?>" />
|
3359 |
<p>
|
3360 |
<a href="<?php echo self::$epbase ?>/dashboard/pro-easy-video-analytics.aspx" target="_blank">Activate the above and several other features »</a>
|
3361 |
</p>
|
3362 |
+
<?php
|
3363 |
+
}
|
3364 |
+
?>
|
3365 |
<div class="clearboth"></div>
|
3366 |
</div>
|
3367 |
+
<?php // self::save_changes_button(); ?>
|
3368 |
|
3369 |
<hr>
|
3370 |
|
3372 |
<div class="jumper" id="jumpoverride"></div>
|
3373 |
|
3374 |
<h3 class="sect">
|
3375 |
+
<?php _e("How To Override Defaults / Other Options") ?> <a href="#top" class="totop">▲ top</a>
|
3376 |
</h3>
|
3377 |
<p>Suppose you have a few videos that need to be different from the above defaults. You can add options to the end of a link as displayed below to override the above defaults. Each option should begin with '&'.
|
3378 |
<br><span class="smallnote orange">PRO users: You can use the big blue <a href="<?php echo self::$epbase . '/dashboard/pro-easy-video-analytics.aspx?ref=protab' ?>" target="_blank">customize</a> buttons that you will see inside the wizard, instead of memorizing the following.</span>
|
3379 |
+
<?php
|
3380 |
+
_e('<ul>');
|
3381 |
+
_e("<li><strong>width</strong> - Sets the width of your player. If omitted, the default width will be the width of your theme's content.<em> Example: http://www.youtube.com/watch?v=quwebVjAEJA<strong>&width=500</strong>&height=350</em></li>");
|
3382 |
+
_e("<li><strong>height</strong> - Sets the height of your player. <em>Example: http://www.youtube.com/watch?v=quwebVjAEJA&width=500<strong>&height=350</strong></em> </li>");
|
3383 |
+
_e("<li><strong>autoplay</strong> - Set this to 1 to autoplay the video (or 0 to play the video once). <em>Example: http://www.youtube.com/watch?v=quwebVjAEJA<strong>&autoplay=1</strong></em> </li>");
|
3384 |
+
_e("<li><strong>cc_load_policy</strong> - Set this to 1 to turn on closed captioning (or 0 to leave them off). <em>Example: http://www.youtube.com/watch?v=quwebVjAEJA<strong>&cc_load_policy=1</strong></em> </li>");
|
3385 |
+
_e("<li><strong>iv_load_policy</strong> - Set this to 3 to turn off annotations (or 1 to show them). <em>Example: http://www.youtube.com/watch?v=quwebVjAEJA<strong>&iv_load_policy=3</strong></em> </li>");
|
3386 |
+
_e("<li><strong>loop</strong> - Set this to 1 to loop the video (or 0 to not loop). <em>Example: http://www.youtube.com/watch?v=quwebVjAEJA<strong>&loop=1</strong></em> </li>");
|
3387 |
+
_e("<li><strong>modestbranding</strong> - Set this to 1 to remove the YouTube logo while playing (or 0 to show the logo). <em>Example: http://www.youtube.com/watch?v=quwebVjAEJA<strong>&modestbranding=1</strong></em> </li>");
|
3388 |
+
_e("<li><strong>rel</strong> - Set this to 0 to not show related videos at the end of playing (or 1 to show them). <em>Example: http://www.youtube.com/watch?v=quwebVjAEJA<strong>&rel=0</strong></em> </li>");
|
3389 |
+
_e("<li><strong>showinfo</strong> - Set this to 0 to hide the video title and other info (or 1 to show it). <em>Example: http://www.youtube.com/watch?v=quwebVjAEJA<strong>&showinfo=0</strong></em> </li>");
|
3390 |
+
_e("<li><strong>theme</strong> - Set this to 'light' to make the player have the light-colored theme (or 'dark' for the dark theme). <em>Example: http://www.youtube.com/watch?v=quwebVjAEJA<strong>&theme=light</strong></em> </li>");
|
3391 |
+
_e("<li><strong>color</strong> - Set this to 'white' to make the player have a white progress bar (or 'red' for a red progress bar). Note: Using white will disable the modestbranding option. <em>Example: http://www.youtube.com/watch?v=quwebVjAEJA<strong>&color=white</strong></em> </li>");
|
3392 |
+
_e("<li><strong>vq</strong> - Set this to 'hd720' or 'hd1080' to force the video to have HD quality. Leave blank to let YouTube decide. <em>Example: http://www.youtube.com/watch?v=quwebVjAEJA<strong>&vq=hd720</strong></em> </li>");
|
3393 |
+
_e("<li><strong>controls</strong> - Set this to 0 to completely hide the video controls (or 2 to show it). <em>Example: http://www.youtube.com/watch?v=quwebVjAEJA<strong>&controls=0</strong></em> </li>");
|
3394 |
+
_e("<li><strong>autohide</strong> - Set this to 1 to slide away the control bar after the video starts playing. It will automatically slide back in again if you mouse over the video. (Set to 2 to always show it). <em>Example: http://www.youtube.com/watch?v=quwebVjAEJA<strong>&autohide=1</strong></em> </li>");
|
3395 |
+
_e("<li><strong>playsinline</strong> - Set this to 1 to allow videos play inline with the page on iOS browsers. (Set to 0 to have iOS launch videos in fullscreen instead). <em>Example: http://www.youtube.com/watch?v=quwebVjAEJA<strong>&playsinline=1</strong></em> </li>");
|
3396 |
+
_e("<li><strong>origin</strong> - Set this to 1 to add the 'origin' parameter for extra JavaScript security. <em>Example: http://www.youtube.com/watch?v=quwebVjAEJA<strong>&origin=1</strong></em> </li>");
|
3397 |
+
_e('</ul>');
|
3398 |
+
|
3399 |
+
_e("<p>You can also start and end each individual video at particular times. Like the above, each option should begin with '&'</p>");
|
3400 |
+
_e('<ul>');
|
3401 |
+
_e("<li><strong>start</strong> - Sets the time (in seconds) to start the video. <em>Example: http://www.youtube.com/watch?v=quwebVjAEJA&width=500&height=350<strong>&start=20</strong></em> </li>");
|
3402 |
+
_e("<li><strong>end</strong> - Sets the time (in seconds) to stop the video. <em>Example: http://www.youtube.com/watch?v=quwebVjAEJA&width=500&height=350<strong>&end=100</strong></em> </li>");
|
3403 |
+
_e('</ul>');
|
3404 |
+
?>
|
3405 |
<div class="save-changes-follow"> <?php self::save_changes_button(isset($_POST[$ytprefs_submitted]) && $_POST[$ytprefs_submitted] == 'Y'); ?> </div>
|
3406 |
</form>
|
3407 |
<div class="jumper" id="jumppro"></div>
|
3408 |
<div id="goprobox">
|
3409 |
+
<?php
|
3410 |
+
if ($all[self::$opt_pro] && strlen(trim($all[self::$opt_pro])) > 0)
|
3411 |
+
{
|
3412 |
+
echo "<h3>" . __('Thank you for going PRO.');
|
3413 |
+
echo ' <input type="submit" name="showkey" class="button-primary" style="vertical-align: 15%;" id="showprokey" value="View my PRO key" />';
|
3414 |
+
echo "</h3>";
|
3415 |
+
?>
|
3416 |
<?php
|
3417 |
}
|
3418 |
else
|
3501 |
<div style="clear: both;"></div>
|
3502 |
<br>
|
3503 |
<h3 class="bold">Enter and save your PRO key (emailed to you):</h3>
|
3504 |
+
<?php } ?>
|
3505 |
<form name="form2" method="post" action="" id="epform2" class="submitpro" <?php
|
3506 |
if ($all[self::$opt_pro] && strlen(trim($all[self::$opt_pro])) > 0)
|
3507 |
{
|
3511 |
|
3512 |
<input name="<?php echo self::$opt_pro; ?>" id="opt_pro" value="<?php echo $all[self::$opt_pro]; ?>" type="text">
|
3513 |
<input type="submit" name="Submit" class="button-primary" id="prokeysubmit" value="<?php _e('Save Key') ?>" />
|
3514 |
+
<?php
|
3515 |
+
if (!($all[self::$opt_pro] && strlen(trim($all[self::$opt_pro])) > 0))
|
3516 |
+
{
|
3517 |
+
?>
|
3518 |
<span style="font-size: 25px; color: #cccccc;">|</span> <a href="<?php echo self::$epbase ?>/dashboard/pro-easy-video-analytics.aspx" class="button-primary brightpro" target="_blank">Click here to go PRO »</a>
|
3519 |
<?php
|
3520 |
}
|
3567 |
|
3568 |
<iframe src="<?php echo self::$epbase ?>/dashboard/prosupport.aspx?simple=1&prokey=<?php echo $all[self::$opt_pro]; ?>&domain=<?php echo site_url(); ?>" width="500" height="<?php echo ($all[self::$opt_pro] && strlen(trim($all[self::$opt_pro])) > 0) ? "500" : "140"; ?>"></iframe>
|
3569 |
|
3570 |
+
<?php
|
3571 |
+
if (!($all[self::$opt_pro] && strlen(trim($all[self::$opt_pro])) > 0))
|
3572 |
+
{
|
3573 |
+
?>
|
3574 |
<br>
|
3575 |
<br>
|
3576 |
<iframe src="<?php echo self::$epbase ?>/dashboard/likecoupon.aspx" width="600" height="500"></iframe>
|
3577 |
+
<?php }
|
3578 |
+
?>
|
3579 |
<div class="ytnav">
|
3580 |
<a href="#jumphowto">How To Embed</a>
|
3581 |
<a href="#jumpwiz">Visual Wizard</a>
|
3978 |
|
3979 |
});
|
3980 |
</script>
|
3981 |
+
<?php
|
3982 |
+
if (function_exists('add_thickbox'))
|
3983 |
+
{
|
3984 |
+
add_thickbox();
|
3985 |
+
}
|
3986 |
+
?>
|
3987 |
|
3988 |
<?php
|
3989 |
}
|
4003 |
});
|
4004 |
|
4005 |
</script>
|
4006 |
+
<?php
|
4007 |
+
}
|
4008 |
+
?>
|
4009 |
<p class="submit">
|
4010 |
<input type="submit" onclick="return savevalidate();" name="Submit" class="button-primary ytprefs-submit" value="<?php _e($button_label) ?>" />
|
4011 |
<em>If you're using a separate caching plugin and you do not see your changes after saving, you might want to reset your cache.</em>
|
4012 |
</p>
|
4013 |
+
<?php
|
4014 |
+
}
|
4015 |
|
4016 |
+
public static function ytprefsscript()
|
4017 |
+
{
|
4018 |
+
$loggedin = current_user_can('edit_posts');
|
4019 |
+
if (!($loggedin && self::$alloptions[self::$opt_admin_off_scripts]))
|
4020 |
{
|
4021 |
+
wp_enqueue_style(
|
4022 |
+
'__EPYT__style', plugins_url('styles/ytprefs' . self::$min . '.css', __FILE__)
|
4023 |
+
);
|
4024 |
+
$cols = floatval(self::$alloptions[self::$opt_gallery_columns]);
|
4025 |
+
$cols = $cols == 0 ? 3.0 : $cols;
|
4026 |
+
$colwidth = 100.0 / $cols;
|
4027 |
+
$custom_css = "
|
|
|
|
|
|
|
4028 |
.epyt-gallery-thumb {
|
4029 |
width: " . round($colwidth, 3) . "%;
|
4030 |
}";
|
4031 |
+
wp_add_inline_style('__EPYT__style', $custom_css);
|
4032 |
|
4033 |
+
wp_enqueue_script('__ytprefs__', plugins_url('scripts/ytprefs' . self::$min . '.js', __FILE__), array('jquery'));
|
4034 |
|
4035 |
+
if (self::$alloptions[self::$opt_old_script_method] != 1)
|
4036 |
+
{
|
4037 |
+
wp_localize_script('__ytprefs__', '_EPYT_', array(
|
4038 |
+
'ajaxurl' => admin_url('admin-ajax.php'),
|
4039 |
+
'security' => wp_create_nonce('embedplus-nonce'),
|
4040 |
+
'gallery_scrolloffset' => intval(self::$alloptions[self::$opt_gallery_scrolloffset]),
|
4041 |
+
'eppathtoscripts' => plugins_url('scripts/', __FILE__),
|
4042 |
+
'epresponsiveselector' => self::get_responsiveselector(),
|
4043 |
+
'epdovol' => true,
|
4044 |
+
'version' => self::$alloptions[self::$opt_version],
|
4045 |
+
'evselector' => self::get_evselector()
|
4046 |
+
));
|
4047 |
+
}
|
4048 |
|
4049 |
+
////////////////////// cloudflare accomodation
|
4050 |
+
//add_filter('script_loader_tag', 'YouTubePrefs::set_cfasync', 10, 3);
|
4051 |
|
4052 |
+
if (!is_admin() && (self::$alloptions[self::$opt_pro] && strlen(trim(self::$alloptions[self::$opt_pro])) > 0) && self::$alloptions[self::$opt_dynload] == 1)
|
4053 |
+
{
|
4054 |
+
wp_enqueue_style('__dyntype__', plugins_url('scripts/embdyn.min.css', __FILE__));
|
4055 |
+
wp_enqueue_script('__dynload__', plugins_url('scripts/embdyn' . self::$min . '.js', __FILE__), array('jquery'));
|
|
|
4056 |
}
|
4057 |
}
|
4058 |
+
}
|
4059 |
|
4060 |
+
public static function set_cfasync($tag, $handle, $src)
|
4061 |
+
{
|
4062 |
+
if ('__ytprefs__' !== $handle)
|
4063 |
{
|
4064 |
+
return $tag;
|
|
|
|
|
|
|
|
|
4065 |
}
|
4066 |
+
return str_replace('<script', '<script data-cfasync="false" ', $tag);
|
4067 |
+
}
|
4068 |
+
|
4069 |
+
public static function get_evselector()
|
4070 |
+
{
|
4071 |
+
$evselector = 'iframe.__youtube_prefs__[src], iframe[src*="youtube.com/embed/"], iframe[src*="youtube-nocookie.com/embed/"]';
|
4072 |
|
4073 |
+
if (self::$alloptions[self::$opt_evselector_light] == 1)
|
4074 |
{
|
4075 |
+
$evselector = 'iframe.__youtube_prefs__[src]';
|
4076 |
+
}
|
4077 |
|
4078 |
+
return $evselector;
|
4079 |
+
}
|
|
|
|
|
4080 |
|
4081 |
+
public static function get_responsiveselector()
|
4082 |
+
{
|
4083 |
+
$responsiveselector = '[]';
|
4084 |
+
if (self::$alloptions[self::$opt_widgetfit] == 1)
|
4085 |
+
{
|
4086 |
+
$responsiveselector = '["iframe.__youtube_prefs_widget__"]';
|
4087 |
}
|
4088 |
+
if (self::$alloptions[self::$opt_responsive] == 1)
|
|
|
4089 |
{
|
4090 |
+
if (self::$alloptions[self::$opt_responsive_all] == 1)
|
|
|
4091 |
{
|
4092 |
+
$responsiveselector = '["iframe[src*=\'youtube.com\']","iframe[src*=\'youtube-nocookie.com\']","iframe[data-ep-src*=\'youtube.com\']","iframe[data-ep-src*=\'youtube-nocookie.com\']","iframe[data-ep-gallerysrc*=\'youtube.com\']"]';
|
4093 |
}
|
4094 |
+
else
|
4095 |
{
|
4096 |
+
$responsiveselector = '["iframe.__youtube_prefs__"]';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4097 |
}
|
|
|
4098 |
}
|
4099 |
+
return $responsiveselector;
|
4100 |
+
}
|
4101 |
|
4102 |
+
public static function get_blogwidth()
|
4103 |
+
{
|
4104 |
+
$blogwidth = null;
|
4105 |
+
try
|
4106 |
{
|
4107 |
+
$embed_size_w = intval(get_option('embed_size_w'));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4108 |
|
4109 |
+
global $content_width;
|
4110 |
+
if (empty($content_width))
|
|
|
4111 |
{
|
4112 |
+
$content_width = $GLOBALS['content_width'];
|
4113 |
}
|
4114 |
|
4115 |
+
$blogwidth = $embed_size_w ? $embed_size_w : ($content_width ? $content_width : 450);
|
4116 |
+
}
|
4117 |
+
catch (Exception $ex)
|
4118 |
+
{
|
4119 |
+
|
4120 |
}
|
4121 |
|
4122 |
+
$blogwidth = preg_replace('/\D/', '', $blogwidth); //may have px
|
4123 |
+
|
4124 |
+
return $blogwidth;
|
4125 |
}
|
4126 |
|
4127 |
+
}
|
4128 |
+
|
4129 |
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
4130 |
//class start
|
4131 |
+
class Add_new_tinymce_btn_Youtubeprefs
|
4132 |
+
{
|
4133 |
|
4134 |
+
public $btn_arr;
|
4135 |
+
public $js_file;
|
4136 |
|
4137 |
+
/*
|
4138 |
+
* call the constructor and set class variables
|
4139 |
+
* From the constructor call the functions via wordpress action/filter
|
4140 |
+
*/
|
4141 |
|
4142 |
+
function __construct($seperator, $btn_name, $javascrip_location)
|
4143 |
+
{
|
4144 |
+
$this->btn_arr = array("Seperator" => $seperator, "Name" => $btn_name);
|
4145 |
+
$this->js_file = $javascrip_location;
|
4146 |
+
add_action('init', array($this, 'add_tinymce_button'));
|
4147 |
+
add_filter('tiny_mce_version', array($this, 'refresh_mce_version'));
|
4148 |
+
}
|
4149 |
|
4150 |
+
/*
|
4151 |
+
* create the buttons only if the user has editing privs.
|
4152 |
+
* If so we create the button and add it to the tinymce button array
|
4153 |
+
*/
|
4154 |
|
4155 |
+
function add_tinymce_button()
|
4156 |
+
{
|
4157 |
+
if (!current_user_can('edit_posts') && !current_user_can('edit_pages'))
|
4158 |
+
return;
|
4159 |
+
if (get_user_option('rich_editing') == 'true')
|
4160 |
{
|
4161 |
+
//the function that adds the javascript
|
4162 |
+
add_filter('mce_external_plugins', array($this, 'add_new_tinymce_plugin'));
|
4163 |
+
//adds the button to the tinymce button array
|
4164 |
+
add_filter('mce_buttons', array($this, 'register_new_button'));
|
|
|
|
|
|
|
|
|
|
|
4165 |
}
|
4166 |
+
}
|
4167 |
|
4168 |
+
/*
|
4169 |
+
* add the new button to the tinymce array
|
4170 |
+
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
4171 |
|
4172 |
+
function register_new_button($buttons)
|
4173 |
+
{
|
4174 |
+
array_push($buttons, $this->btn_arr["Seperator"], $this->btn_arr["Name"]);
|
4175 |
+
return $buttons;
|
4176 |
+
}
|
4177 |
|
4178 |
+
/*
|
4179 |
+
* Call the javascript file that loads the
|
4180 |
+
* instructions for the new button
|
4181 |
+
*/
|
|
|
4182 |
|
4183 |
+
function add_new_tinymce_plugin($plugin_array)
|
4184 |
+
{
|
4185 |
+
$plugin_array[$this->btn_arr['Name']] = $this->js_file;
|
4186 |
+
return $plugin_array;
|
4187 |
+
}
|
4188 |
|
4189 |
+
/*
|
4190 |
+
* This function tricks tinymce in thinking
|
4191 |
+
* it needs to refresh the buttons
|
4192 |
+
*/
|
|
|
4193 |
|
4194 |
+
function refresh_mce_version($ver)
|
4195 |
+
{
|
4196 |
+
$ver += 3;
|
4197 |
+
return $ver;
|
4198 |
}
|
4199 |
|
4200 |
+
}
|
4201 |
+
|
4202 |
//class end
|
4203 |
|
4204 |
|
4205 |
+
register_activation_hook(__FILE__, array('YouTubePrefs', 'initoptions'));
|
4206 |
+
$youtubeplgplus = new YouTubePrefs();
|
4207 |
|
4208 |
|
4209 |
+
add_action("wp_ajax_my_embedplus_pro_record", array('YouTubePrefs', 'my_embedplus_pro_record'));
|
4210 |
+
add_action("wp_ajax_my_embedplus_clearspdc", array('YouTubePrefs', 'my_embedplus_clearspdc'));
|
4211 |
+
add_action("wp_ajax_my_embedplus_glance_vids", array('YouTubePrefs', 'my_embedplus_glance_vids'));
|
4212 |
+
add_action("wp_ajax_my_embedplus_glance_count", array('YouTubePrefs', 'my_embedplus_glance_count'));
|
4213 |
+
add_action("wp_ajax_my_embedplus_dismiss_double_plugin_warning", array('YouTubePrefs', 'my_embedplus_dismiss_double_plugin_warning'));
|
4214 |
+
add_action("wp_ajax_my_embedplus_gallery_page", array('YouTubePrefs', 'my_embedplus_gallery_page'));
|
4215 |
+
add_action("wp_ajax_nopriv_my_embedplus_gallery_page", array('YouTubePrefs', 'my_embedplus_gallery_page'));
|
4216 |
|
4217 |
+
add_action('admin_enqueue_scripts', 'youtubeprefs_admin_enqueue_scripts');
|
4218 |
|
4219 |
+
function youtubeprefs_admin_enqueue_scripts()
|
4220 |
+
{
|
4221 |
+
wp_enqueue_style('embedplusyoutube', plugins_url() . '/youtube-embed-plus/scripts/embedplus_mce.css');
|
4222 |
+
add_action('wp_print_scripts', 'youtubeprefs_output_scriptvars');
|
4223 |
+
wp_enqueue_script('__ytprefs_admin__', plugins_url('scripts/ytprefs-admin.min.js', __FILE__), array('jquery'));
|
4224 |
+
|
4225 |
+
if (
|
4226 |
+
//(!(isset(YouTubePrefs::$alloptions[YouTubePrefs::$opt_pro]) && strlen(trim(YouTubePrefs::$alloptions[YouTubePrefs::$opt_pro])) > 0)) && // display only if not pro ooopointer
|
4227 |
+
(get_bloginfo('version') >= '3.3') && YouTubePrefs::custom_admin_pointers_check()
|
4228 |
+
)
|
4229 |
{
|
4230 |
+
add_action('admin_print_footer_scripts', 'YouTubePrefs::custom_admin_pointers_footer');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4231 |
|
4232 |
+
wp_enqueue_script('wp-pointer');
|
4233 |
+
wp_enqueue_style('wp-pointer');
|
4234 |
+
}
|
4235 |
|
4236 |
+
if (YouTubePrefs::$alloptions['glance'] == 1)
|
4237 |
+
{
|
4238 |
+
add_action('admin_print_footer_scripts', 'YouTubePrefs::glance_script');
|
|
|
4239 |
}
|
4240 |
+
}
|
4241 |
|
4242 |
+
function youtubeprefs_output_scriptvars()
|
4243 |
+
{
|
4244 |
+
YouTubePrefs::$scriptsprinted++;
|
4245 |
+
if (YouTubePrefs::$scriptsprinted == 1)
|
4246 |
{
|
4247 |
+
$blogwidth = YouTubePrefs::get_blogwidth();
|
4248 |
+
$epprokey = YouTubePrefs::$alloptions[YouTubePrefs::$opt_pro];
|
4249 |
+
$myytdefaults = http_build_query(YouTubePrefs::$alloptions);
|
4250 |
+
?>
|
|
|
|
|
|
|
4251 |
<script type="text/javascript">
|
4252 |
var wpajaxurl = "<?php echo admin_url('admin-ajax.php') ?>";
|
4253 |
if (window.location.toString().indexOf('https://') == 0)
|
4325 |
|
4326 |
|
4327 |
</script>
|
4328 |
+
<?php
|
|
|
4329 |
}
|
4330 |
+
}
|
4331 |
|
4332 |
// function embedplus_strip_shortcode_from_excerpt($content)
|
4333 |
// {
|