Version Description
Download this release
Release Info
Developer | embedplus |
Plugin | YouTube |
Version | 11.3.1 |
Comparing to | |
See all releases |
Code changes from version 11.3 to 11.3.1
- readme.txt +5 -1
- scripts/ytprefs.js +34 -7
- scripts/ytprefs.min.js +16 -15
- youtube.php +53 -30
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.3
|
8 |
License: GPLv3 or later
|
9 |
|
10 |
YouTube Embed WordPress Plugin. Embed a responsive video, YouTube channel gallery, or playlist gallery. Add thumbnails, analytics, caching...
|
@@ -149,6 +149,10 @@ You can also start and end each individual video at particular times. Like the a
|
|
149 |
|
150 |
== Changelog ==
|
151 |
|
|
|
|
|
|
|
|
|
152 |
= WordPress YouTube Embed 11.3 =
|
153 |
* Improved responsive sizing for AJAX-based themes
|
154 |
* Popup lightbox display option for Pro 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.3.1
|
8 |
License: GPLv3 or later
|
9 |
|
10 |
YouTube Embed WordPress Plugin. Embed a responsive video, YouTube channel gallery, or playlist gallery. Add thumbnails, analytics, caching...
|
149 |
|
150 |
== Changelog ==
|
151 |
|
152 |
+
= WordPress YouTube Embed 11.3.1 =
|
153 |
+
* (Free) improved debug mode messages
|
154 |
+
* (Pro) autonext for popup lightbox galleries and hide clear cache button option
|
155 |
+
|
156 |
= WordPress YouTube Embed 11.3 =
|
157 |
* Improved responsive sizing for AJAX-based themes
|
158 |
* Popup lightbox display option for Pro galleries
|
scripts/ytprefs.js
CHANGED
@@ -64,7 +64,6 @@
|
|
64 |
// var thumbplay = $container.find('.epyt-pagebutton').first().data('thumbplay');
|
65 |
// if (thumbplay !== '0' && thumbplay !== 0)
|
66 |
event.target.playVideo();
|
67 |
-
//$('body').removeClass('epyt-curtain');
|
68 |
}
|
69 |
}
|
70 |
catch (err2)
|
@@ -103,6 +102,10 @@
|
|
103 |
}
|
104 |
|
105 |
var $gallery = $(ifm).closest('.epyt-gallery');
|
|
|
|
|
|
|
|
|
106 |
if ($gallery.length)
|
107 |
{
|
108 |
var autonext = $gallery.find('.epyt-pagebutton').first().data('autonext') == '1';
|
@@ -114,13 +117,37 @@
|
|
114 |
$currvid = $gallery.find('.epyt-gallery-thumb').first();
|
115 |
}
|
116 |
var $nextvid = $currvid.find(' ~ .epyt-gallery-thumb').first();
|
|
|
117 |
if ($nextvid.length)
|
118 |
{
|
119 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
120 |
}
|
121 |
else
|
122 |
{
|
123 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
124 |
}
|
125 |
}
|
126 |
}
|
@@ -152,7 +179,7 @@
|
|
152 |
});
|
153 |
}
|
154 |
},
|
155 |
-
|
156 |
{
|
157 |
//debug
|
158 |
},
|
@@ -209,6 +236,8 @@
|
|
209 |
range.selectNode(ele);
|
210 |
window.getSelection().addRange(range);
|
211 |
}
|
|
|
|
|
212 |
}
|
213 |
|
214 |
};
|
@@ -300,9 +329,7 @@
|
|
300 |
|
301 |
if ($container.hasClass('epyt-lb'))
|
302 |
{
|
303 |
-
|
304 |
-
lb('#' + contentlbid);
|
305 |
-
//$('body').addClass('epyt-curtain');
|
306 |
|
307 |
vidSrc = vidSrc.replace('autoplay=1', 'autoplay=0');
|
308 |
$iframe.attr('src', vidSrc);
|
64 |
// var thumbplay = $container.find('.epyt-pagebutton').first().data('thumbplay');
|
65 |
// if (thumbplay !== '0' && thumbplay !== 0)
|
66 |
event.target.playVideo();
|
|
|
67 |
}
|
68 |
}
|
69 |
catch (err2)
|
102 |
}
|
103 |
|
104 |
var $gallery = $(ifm).closest('.epyt-gallery');
|
105 |
+
if (!$gallery.length)
|
106 |
+
{
|
107 |
+
$gallery = $('#' + $(ifm).data('epytgalleryid'));
|
108 |
+
}
|
109 |
if ($gallery.length)
|
110 |
{
|
111 |
var autonext = $gallery.find('.epyt-pagebutton').first().data('autonext') == '1';
|
117 |
$currvid = $gallery.find('.epyt-gallery-thumb').first();
|
118 |
}
|
119 |
var $nextvid = $currvid.find(' ~ .epyt-gallery-thumb').first();
|
120 |
+
var $lityopen = $('div.lity-wrap[data-lity-close]');
|
121 |
if ($nextvid.length)
|
122 |
{
|
123 |
+
if ($lityopen.length)
|
124 |
+
{
|
125 |
+
_EPADashboard_.lb.close();
|
126 |
+
setTimeout(function () {
|
127 |
+
$nextvid.click();
|
128 |
+
}, 1000);
|
129 |
+
|
130 |
+
}
|
131 |
+
else
|
132 |
+
{
|
133 |
+
$nextvid.click();
|
134 |
+
}
|
135 |
}
|
136 |
else
|
137 |
{
|
138 |
+
if ($lityopen.length)
|
139 |
+
{
|
140 |
+
_EPADashboard_.lb.close();
|
141 |
+
setTimeout(function () {
|
142 |
+
$gallery.find('.epyt-pagebutton.epyt-next[data-pagetoken!=""][data-pagetoken]').first().click();
|
143 |
+
}, 1000);
|
144 |
+
|
145 |
+
}
|
146 |
+
else
|
147 |
+
{
|
148 |
+
$gallery.find('.epyt-pagebutton.epyt-next[data-pagetoken!=""][data-pagetoken]').first().click();
|
149 |
+
}
|
150 |
+
|
151 |
}
|
152 |
}
|
153 |
}
|
179 |
});
|
180 |
}
|
181 |
},
|
182 |
+
jp: function (q)
|
183 |
{
|
184 |
//debug
|
185 |
},
|
236 |
range.selectNode(ele);
|
237 |
window.getSelection().addRange(range);
|
238 |
}
|
239 |
+
},
|
240 |
+
lb: typeof (lity) !== 'undefined' ? lity() : function () {
|
241 |
}
|
242 |
|
243 |
};
|
329 |
|
330 |
if ($container.hasClass('epyt-lb'))
|
331 |
{
|
332 |
+
_EPADashboard_.lb('#' + contentlbid);
|
|
|
|
|
333 |
|
334 |
vidSrc = vidSrc.replace('autoplay=1', 'autoplay=0');
|
335 |
$iframe.attr('src', vidSrc);
|
scripts/ytprefs.min.js
CHANGED
@@ -1,15 +1,16 @@
|
|
1 |
-
(function(a,
|
2 |
-
c.appendChild(d);b.__qsaels=[];d.styleSheet.cssText=
|
3 |
-
|
4 |
-
b.length&&"1"==
|
5 |
-
setupevents:function(a){_EPADashboard_.log("Setting up YT API events: "+a);if(YT.loaded)return document.getElementById(a).epytsetupdone=!0,new YT.Player(a,{events:{onReady:_EPADashboard_.onPlayerReady,onStateChange:_EPADashboard_.onPlayerStateChange}})},
|
6 |
-
setTimeout(function(){
|
7 |
-
5<=_EPADashboard_.checkCount||_EPADashboard_.initStarted?clearInterval(_EPADashboard_.checkInterval):(_EPADashboard_.apiInit(),_EPADashboard_.log("YT API init"))},1E3)},selectText:function(
|
8 |
-
document.
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
1
|
13 |
-
|
14 |
-
|
15 |
-
c.
|
|
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(f){var b=document,c=b.documentElement.firstChild,d=b.createElement("STYLE");
|
2 |
+
c.appendChild(d);b.__qsaels=[];d.styleSheet.cssText=f+"{x:expression(document.__qsaels.push(this))}";a.scrollBy(0,0);return b.__qsaels});"undefined"===typeof a._EPADashboard_&&(a._EPADashboard_={initStarted:!1,checkCount:0,onPlayerReady:function(f){try{if("undefined"!==typeof _EPYT_.epdovol&&_EPYT_.epdovol){var a=parseInt(f.target.getIframe().getAttribute("data-vol"));isNaN(a)||(0===a?f.target.mute():(f.target.isMuted()&&f.target.unMute(),f.target.setVolume(a)))}}catch(d){}try{var c=b(f.target.getIframe());
|
3 |
+
c.hasClass("epyt-lbif")&&c.closest(".lity-content").length&&f.target.playVideo()}catch(d){}setTimeout(function(){try{var a=_EPADashboard_.justid(f.target.getVideoUrl());_EPADashboard_.jp("ytid="+a)}catch(b){}},1700)},onPlayerStateChange:function(a){var e=a.target.getIframe();if(a.data===YT.PlayerState.PLAYING&&!0!==a.target.ponce&&-1===e.src.indexOf("autoplay=1")){a.target.ponce=!0;try{var c=_EPADashboard_.justid(a.target.getVideoUrl());_EPADashboard_.jp("ytid="+c+"&p=1")}catch(k){}}var d=b(e).closest(".epyt-gallery");
|
4 |
+
d.length||(d=b("#"+b(e).data("epytgalleryid")));if(d.length&&"1"==d.find(".epyt-pagebutton").first().data("autonext")&&a.data===YT.PlayerState.ENDED){a=d.find(".epyt-current-video");a.length||(a=d.find(".epyt-gallery-thumb").first());var g=a.find(" ~ .epyt-gallery-thumb").first();a=b("div.lity-wrap[data-lity-close]");g.length?a.length?(_EPADashboard_.lb.close(),setTimeout(function(){g.click()},1E3)):g.click():a.length?(_EPADashboard_.lb.close(),setTimeout(function(){d.find('.epyt-pagebutton.epyt-next[data-pagetoken!=""][data-pagetoken]').first().click()},
|
5 |
+
1E3)):d.find('.epyt-pagebutton.epyt-next[data-pagetoken!=""][data-pagetoken]').first().click()}},justid:function(a){return/[\?&]v=([^&#]*)/.exec(a)[1]},dynsetupevents:function(){if("undefined"===typeof this.epytsetupdone)return _EPADashboard_.setupevents(this.id)},setupevents:function(a){_EPADashboard_.log("Setting up YT API events: "+a);if(YT.loaded)return document.getElementById(a).epytsetupdone=!0,new YT.Player(a,{events:{onReady:_EPADashboard_.onPlayerReady,onStateChange:_EPADashboard_.onPlayerStateChange}})},
|
6 |
+
jp:function(b){var e=document.createElement("script");e.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 c=document.getElementsByTagName("head")[0].appendChild(e);setTimeout(function(){c.parentNode.removeChild(c)},500)},apiInit:function(){setTimeout(function(){if("undefined"!==typeof YT){_EPADashboard_.initStarted=!0;for(var a=document.querySelectorAll(_EPYT_.evselector),
|
7 |
+
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(),_EPADashboard_.log("YT API init"))},1E3)},selectText:function(b){if(document.selection){var c=
|
8 |
+
document.body.createTextRange();c.moveToElementText(b);c.select()}else a.getSelection&&(c=document.createRange(),c.selectNode(b),a.getSelection().addRange(c))},lb:"undefined"!==typeof lity?lity():function(){}});if("undefined"===typeof a.YT){var c=document.createElement("script");c.src="//www.youtube.com/iframe_api";c.type="text/javascript";document.getElementsByTagName("head")[0].appendChild(c)}else YT.loaded&&(_EPADashboard_.apiInit(),_EPADashboard_.log("YT API available"));_EPADashboard_.doubleCheck();
|
9 |
+
a.onYouTubeIframeAPIReady="undefined"!==typeof a.onYouTubeIframeAPIReady?a.onYouTubeIframeAPIReady:function(){_EPADashboard_.apiInit();_EPADashboard_.log("YT API ready")}})(window,jQuery);
|
10 |
+
(function(a){a(document).ready(function(){a(".epyt-gallery").each(function(){var b=a(this),c=a(this).find("iframe").first(),f="content"+c.attr("id");b.find(".lity-hide").attr("id",f);var e=c.attr("src");e||(e=c.data("ep-src"));var h=a(this).find(".epyt-gallery-list .epyt-gallery-thumb").first().data("videoid"),e=e.replace(h,"GALLERYVIDEOID");c.data("ep-gallerysrc",e);var d=b.find(".epyt-gallery-list"),g=function(){try{if(d.hasClass("epyt-gallery-style-carousel")){var b=a(d.find(".epyt-gallery-thumb").get(0)).height()/
|
11 |
+
2;d.find(".epyt-pagination:first-child .epyt-pagenumbers").css("top",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 d=a(this).data("videoid");b.data("currvid",d);var e=c.data("ep-gallerysrc").replace("GALLERYVIDEOID",d),d=b.find(".epyt-pagebutton").first().data("thumbplay");"0"!==
|
12 |
+
d&&0!==d&&(e=0<e.indexOf("autoplay")?e.replace("autoplay=0","autoplay=1"):e+"&autoplay=1");b.hasClass("epyt-lb")?(_EPADashboard_.lb("#"+f),e=e.replace("autoplay=1","autoplay=0"),c.attr("src",e),_EPADashboard_.setupevents(c.attr("id"))):a("html, body").animate({scrollTop:c.offset().top-parseInt(_EPYT_.gallery_scrolloffset)},500,function(){c.attr("src",e);_EPADashboard_.setupevents(c.attr("id"))})});b.on("mouseenter",".epyt-gallery-list .epyt-gallery-thumb",function(){a(this).addClass("hover");if(d.hasClass("epyt-gallery-style-carousel")&&
|
13 |
+
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")}});b.on("mouseleave",".epyt-gallery-list .epyt-gallery-thumb",function(){a(this).removeClass("hover");d.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&&
|
14 |
+
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"),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"),thumbplay:a(this).data("thumbplay")}};
|
15 |
+
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,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")&&
|
16 |
+
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);
|
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.3
|
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.3';
|
36 |
public static $opt_version = 'version';
|
37 |
public static $optembedwidth = null;
|
38 |
public static $optembedheight = null;
|
@@ -82,6 +82,7 @@ class YouTubePrefs
|
|
82 |
public static $opt_schemaorg = 'schemaorg';
|
83 |
public static $opt_ftpostimg = 'ftpostimg';
|
84 |
public static $opt_spdc = 'spdc';
|
|
|
85 |
public static $opt_spdcexp = 'spdcexp';
|
86 |
public static $opt_migrate = 'migrate';
|
87 |
public static $opt_migrate_youtube = 'migrate_youtube';
|
@@ -234,15 +235,19 @@ class YouTubePrefs
|
|
234 |
|
235 |
public static function ytprefs_admin_bar($wp_admin_bar)
|
236 |
{
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
'
|
243 |
-
|
244 |
-
|
245 |
-
|
|
|
|
|
|
|
|
|
246 |
}
|
247 |
|
248 |
public static function show_glance_list()
|
@@ -758,6 +763,7 @@ class YouTubePrefs
|
|
758 |
$_ftpostimg = 0;
|
759 |
$_spdc = 0;
|
760 |
$_spdcexp = 24;
|
|
|
761 |
$_dynload = 0;
|
762 |
$_dyntype = '';
|
763 |
$_wmode = 'opaque';
|
@@ -836,6 +842,7 @@ class YouTubePrefs
|
|
836 |
$_ftpostimg = self::tryget($arroptions, self::$opt_ftpostimg, 0);
|
837 |
$_spdc = self::tryget($arroptions, self::$opt_spdc, 0);
|
838 |
$_spdcexp = self::tryget($arroptions, self::$opt_spdcexp, 24);
|
|
|
839 |
$_dynload = self::tryget($arroptions, self::$opt_dynload, 0);
|
840 |
$_dyntype = self::tryget($arroptions, self::$opt_dyntype, '');
|
841 |
$_defaultdims = self::tryget($arroptions, self::$opt_defaultdims, 0);
|
@@ -907,6 +914,7 @@ class YouTubePrefs
|
|
907 |
self::$opt_ftpostimg => $_ftpostimg,
|
908 |
self::$opt_spdc => $_spdc,
|
909 |
self::$opt_spdcexp => $_spdcexp,
|
|
|
910 |
self::$opt_dynload => $_dynload,
|
911 |
self::$opt_dyntype => $_dyntype,
|
912 |
self::$opt_defaultdims => $_defaultdims,
|
@@ -1100,7 +1108,8 @@ class YouTubePrefs
|
|
1100 |
if (self::$alloptions[self::$opt_debugmode] == 1 && current_user_can('manage_options'))
|
1101 |
{
|
1102 |
$redactedEndpoint = preg_replace('@&key=[^&]+@i', '&key=PRIVATE', $apiEndpoint);
|
1103 |
-
$gallobj->html = '<pre onclick="_EPADashboard_.selectText(this);" class="epyt-debug">CLICK this debug text to auto-select all. Then, COPY the selection.' . "\n\n" .
|
|
|
1104 |
return $gallobj;
|
1105 |
}
|
1106 |
|
@@ -1535,6 +1544,7 @@ class YouTubePrefs
|
|
1535 |
$galleryWrapper1 = '';
|
1536 |
$galleryWrapper2 = '';
|
1537 |
$galleryCode = '';
|
|
|
1538 |
if (
|
1539 |
isset($finalparams['layout']) && strtolower($finalparams['layout']) == 'gallery' && isset($finalparams['list'])
|
1540 |
)
|
@@ -1552,6 +1562,9 @@ class YouTubePrefs
|
|
1552 |
$gallery_options->style = $finalparams[self::$opt_gallery_style];
|
1553 |
$gallery_options->thumbcrop = $finalparams[self::$opt_gallery_thumbcrop];
|
1554 |
$gallery_options->apiKey = self::$alloptions[self::$opt_apikey];
|
|
|
|
|
|
|
1555 |
|
1556 |
$subbutton = '';
|
1557 |
if (self::$alloptions[self::$opt_gallery_channelsub] == 1)
|
@@ -1565,7 +1578,7 @@ class YouTubePrefs
|
|
1565 |
$gallery_page_obj = self::get_gallery_page($gallery_options);
|
1566 |
|
1567 |
//$dynsrc = '';// 'data-ep-gallery';
|
1568 |
-
$galleryWrapper1 = '<div class="epyt-gallery ' . $disptype . '" data-currpage="1">';
|
1569 |
$galleryWrapper2 = '</div>';
|
1570 |
$galleryCode = $subbutton . '<div class="epyt-gallery-list epyt-gallery-style-' . esc_attr($gallery_options->style) . '">' .
|
1571 |
$gallery_page_obj->html .
|
@@ -1577,7 +1590,7 @@ class YouTubePrefs
|
|
1577 |
$code1 = $beginlb . '<iframe ' . $dyntype . $centercode . ' id="_ytid_' . rand(10000, 99999) . '" width="' . self::$defaultwidth . '" height="' . self::$defaultheight .
|
1578 |
'" ' . $dynsrc . 'src="https://www.' . $youtubebaseurl . '.com/embed/' . $videoseries . $videoidoutput . '?';
|
1579 |
$code2 = '" frameborder="0" class="__youtube_prefs__' . ($iscontent ? '' : ' __youtube_prefs_widget__') . $disptypeif .
|
1580 |
-
'"' . $voloutput . $acctitle . ' allowfullscreen ></iframe>' . $endlb . $schemaorgoutput;
|
1581 |
|
1582 |
$origin = '';
|
1583 |
|
@@ -2282,11 +2295,11 @@ class YouTubePrefs
|
|
2282 |
$new_pointer_content .= '<p>'; // ooopointer
|
2283 |
if (!(self::$alloptions[self::$opt_pro] && strlen(trim(self::$alloptions[self::$opt_pro])) > 0))
|
2284 |
{
|
2285 |
-
$new_pointer_content .= __("This update adds
|
2286 |
}
|
2287 |
else
|
2288 |
{
|
2289 |
-
$new_pointer_content .= __("This update adds
|
2290 |
}
|
2291 |
$new_pointer_content .= '</p>';
|
2292 |
|
@@ -2370,6 +2383,7 @@ class YouTubePrefs
|
|
2370 |
$new_options[self::$opt_schemaorg] = self::postchecked(self::$opt_schemaorg) ? 1 : 0;
|
2371 |
$new_options[self::$opt_ftpostimg] = self::postchecked(self::$opt_ftpostimg) ? 1 : 0;
|
2372 |
$new_options[self::$opt_spdc] = self::postchecked(self::$opt_spdc) ? 1 : 0;
|
|
|
2373 |
$new_options[self::$opt_dynload] = self::postchecked(self::$opt_dynload) ? 1 : 0;
|
2374 |
$new_options[self::$opt_defaultdims] = self::postchecked(self::$opt_defaultdims) ? 1 : 0;
|
2375 |
$new_options[self::$opt_defaultvol] = self::postchecked(self::$opt_defaultvol) ? 1 : 0;
|
@@ -2621,7 +2635,6 @@ class YouTubePrefs
|
|
2621 |
$new_options[self::$opt_spdcexp] = $_spdcexp;
|
2622 |
|
2623 |
|
2624 |
-
|
2625 |
$all = $new_options + $all;
|
2626 |
|
2627 |
update_option(self::$opt_alloptions, $all);
|
@@ -2725,7 +2738,7 @@ class YouTubePrefs
|
|
2725 |
.pad10 {padding: 10px;}
|
2726 |
#boxdohl {font-weight: bold; padding: 0px 10px; <?php echo $all[self::$opt_dohl] ? '' : 'display: none;' ?>}
|
2727 |
#boxdyn {font-weight: bold; padding: 0px 10px; <?php echo $all[self::$opt_dynload] ? 'display: block;' : 'display: none;' ?>}
|
2728 |
-
#boxspdc {padding: 0px 10px; <?php echo $all[self::$opt_spdc] ? '' : 'display: none;' ?>}
|
2729 |
#boxdefaultvol {font-weight: bold; padding: 0px 10px; <?php echo $all[self::$opt_defaultvol] ? '' : 'display: none;' ?>}
|
2730 |
.vol-output {display: none; width: 30px; color: #008800;}
|
2731 |
.vol-range {background-color: #dddddd; border-radius: 3px; cursor: pointer;}
|
@@ -3216,18 +3229,25 @@ class YouTubePrefs
|
|
3216 |
</label>
|
3217 |
<div class="indent-option">
|
3218 |
<div id="boxspdc">
|
3219 |
-
<
|
3220 |
-
<b class="chktitle">Cache Liftime (hours): </b>
|
3221 |
-
<input name="<?php echo self::$opt_spdcexp; ?>" id="<?php echo self::$opt_spdcexp; ?>" value="<?php echo trim($all[self::$opt_spdcexp]); ?>" type="number" min="1"/>
|
3222 |
-
</label>
|
3223 |
-
Tip: If your pages rarely change, you may wish to set this to a much higher value than 24 hours.
|
3224 |
-
|
3225 |
-
<div class="pad20">
|
3226 |
<input type="button" class="button button-primary" value="Click to clear YouTube cache"/>
|
3227 |
<span style="display: none;" id="clearspdcloading" class="orange bold">Clearing...</span>
|
3228 |
<span class="orange bold" style="display: none;" id="clearspdcsuccess">Finished clearing YouTube cache.</span>
|
3229 |
<span class="orange bold" style="display: none;" id="clearspdcfailed">Sorry, there seemed to be a problem clearing the cache.</span>
|
3230 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3231 |
</div>
|
3232 |
</div>
|
3233 |
</p>
|
@@ -4075,6 +4095,13 @@ class YouTubePrefs
|
|
4075 |
width: " . round($colwidth, 3) . "%;
|
4076 |
}";
|
4077 |
wp_add_inline_style('__EPYT__style', $custom_css);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4078 |
|
4079 |
wp_enqueue_script('__ytprefs__', plugins_url('scripts/ytprefs' . self::$min . '.js', __FILE__), array('jquery'));
|
4080 |
|
@@ -4101,11 +4128,7 @@ class YouTubePrefs
|
|
4101 |
wp_enqueue_script('__dynload__', plugins_url('scripts/embdyn' . self::$min . '.js', __FILE__), array('jquery'));
|
4102 |
}
|
4103 |
|
4104 |
-
|
4105 |
-
{
|
4106 |
-
wp_enqueue_style('__disptype__', plugins_url('scripts/lity' . self::$min . '.css', __FILE__));
|
4107 |
-
wp_enqueue_script('__dispload__', plugins_url('scripts/lity' . self::$min . '.js', __FILE__), array('jquery', '__ytprefs__'));
|
4108 |
-
}
|
4109 |
}
|
4110 |
}
|
4111 |
|
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.3.1
|
7 |
Author: EmbedPlus Team
|
8 |
Author URI: http://www.embedplus.com
|
9 |
*/
|
32 |
class YouTubePrefs
|
33 |
{
|
34 |
|
35 |
+
public static $version = '11.3.1';
|
36 |
public static $opt_version = 'version';
|
37 |
public static $optembedwidth = null;
|
38 |
public static $optembedheight = null;
|
82 |
public static $opt_schemaorg = 'schemaorg';
|
83 |
public static $opt_ftpostimg = 'ftpostimg';
|
84 |
public static $opt_spdc = 'spdc';
|
85 |
+
public static $opt_spdcab = 'spdcab';
|
86 |
public static $opt_spdcexp = 'spdcexp';
|
87 |
public static $opt_migrate = 'migrate';
|
88 |
public static $opt_migrate_youtube = 'migrate_youtube';
|
235 |
|
236 |
public static function ytprefs_admin_bar($wp_admin_bar)
|
237 |
{
|
238 |
+
|
239 |
+
if (current_user_can('edit_posts') && self::$alloptions[self::$opt_spdc] == 1 && self::$alloptions[self::$opt_spdcab] == 1)
|
240 |
+
{
|
241 |
+
$args = array(
|
242 |
+
'id' => 'ytprefs-bar-cache',
|
243 |
+
'title' => 'Clear YouTube Cache',
|
244 |
+
'href' => '#',
|
245 |
+
'meta' => array(
|
246 |
+
'class' => ''
|
247 |
+
)
|
248 |
+
);
|
249 |
+
$wp_admin_bar->add_node($args);
|
250 |
+
}
|
251 |
}
|
252 |
|
253 |
public static function show_glance_list()
|
763 |
$_ftpostimg = 0;
|
764 |
$_spdc = 0;
|
765 |
$_spdcexp = 24;
|
766 |
+
$_spdcab = 1;
|
767 |
$_dynload = 0;
|
768 |
$_dyntype = '';
|
769 |
$_wmode = 'opaque';
|
842 |
$_ftpostimg = self::tryget($arroptions, self::$opt_ftpostimg, 0);
|
843 |
$_spdc = self::tryget($arroptions, self::$opt_spdc, 0);
|
844 |
$_spdcexp = self::tryget($arroptions, self::$opt_spdcexp, 24);
|
845 |
+
$_spdcab = self::tryget($arroptions, self::$opt_spdcab, 1);
|
846 |
$_dynload = self::tryget($arroptions, self::$opt_dynload, 0);
|
847 |
$_dyntype = self::tryget($arroptions, self::$opt_dyntype, '');
|
848 |
$_defaultdims = self::tryget($arroptions, self::$opt_defaultdims, 0);
|
914 |
self::$opt_ftpostimg => $_ftpostimg,
|
915 |
self::$opt_spdc => $_spdc,
|
916 |
self::$opt_spdcexp => $_spdcexp,
|
917 |
+
self::$opt_spdcab => $_spdcab,
|
918 |
self::$opt_dynload => $_dynload,
|
919 |
self::$opt_dyntype => $_dyntype,
|
920 |
self::$opt_defaultdims => $_defaultdims,
|
1108 |
if (self::$alloptions[self::$opt_debugmode] == 1 && current_user_can('manage_options'))
|
1109 |
{
|
1110 |
$redactedEndpoint = preg_replace('@&key=[^&]+@i', '&key=PRIVATE', $apiEndpoint);
|
1111 |
+
$gallobj->html = '<pre onclick="_EPADashboard_.selectText(this);" class="epyt-debug">CLICK this debug text to auto-select all. Then, COPY the selection.' . "\n\n" .
|
1112 |
+
'THIS IS DEBUG MODE OUTPUT. UNCHECK THE OPTION IN THE SETTINGS PAGE ONCE YOU ARE DONE DEBUGGING TO PUT THINGS BACK TO NORMAL.' . "\n\n" . $redactedEndpoint . "\n\n" . print_r($apiResult, true) . '</pre>';
|
1113 |
return $gallobj;
|
1114 |
}
|
1115 |
|
1544 |
$galleryWrapper1 = '';
|
1545 |
$galleryWrapper2 = '';
|
1546 |
$galleryCode = '';
|
1547 |
+
$galleryid_ifm_data = '';
|
1548 |
if (
|
1549 |
isset($finalparams['layout']) && strtolower($finalparams['layout']) == 'gallery' && isset($finalparams['list'])
|
1550 |
)
|
1562 |
$gallery_options->style = $finalparams[self::$opt_gallery_style];
|
1563 |
$gallery_options->thumbcrop = $finalparams[self::$opt_gallery_thumbcrop];
|
1564 |
$gallery_options->apiKey = self::$alloptions[self::$opt_apikey];
|
1565 |
+
|
1566 |
+
$galleryid = 'epyt_gallery_' . rand(10000, 99999);
|
1567 |
+
$galleryid_ifm_data = ' data-epytgalleryid="' . $galleryid . '" ';
|
1568 |
|
1569 |
$subbutton = '';
|
1570 |
if (self::$alloptions[self::$opt_gallery_channelsub] == 1)
|
1578 |
$gallery_page_obj = self::get_gallery_page($gallery_options);
|
1579 |
|
1580 |
//$dynsrc = '';// 'data-ep-gallery';
|
1581 |
+
$galleryWrapper1 = '<div class="epyt-gallery ' . $disptype . '" data-currpage="1" id="' . $galleryid . '">';
|
1582 |
$galleryWrapper2 = '</div>';
|
1583 |
$galleryCode = $subbutton . '<div class="epyt-gallery-list epyt-gallery-style-' . esc_attr($gallery_options->style) . '">' .
|
1584 |
$gallery_page_obj->html .
|
1590 |
$code1 = $beginlb . '<iframe ' . $dyntype . $centercode . ' id="_ytid_' . rand(10000, 99999) . '" width="' . self::$defaultwidth . '" height="' . self::$defaultheight .
|
1591 |
'" ' . $dynsrc . 'src="https://www.' . $youtubebaseurl . '.com/embed/' . $videoseries . $videoidoutput . '?';
|
1592 |
$code2 = '" frameborder="0" class="__youtube_prefs__' . ($iscontent ? '' : ' __youtube_prefs_widget__') . $disptypeif .
|
1593 |
+
'"' . $voloutput . $acctitle . $galleryid_ifm_data . ' allowfullscreen ></iframe>' . $endlb . $schemaorgoutput;
|
1594 |
|
1595 |
$origin = '';
|
1596 |
|
2295 |
$new_pointer_content .= '<p>'; // ooopointer
|
2296 |
if (!(self::$alloptions[self::$opt_pro] && strlen(trim(self::$alloptions[self::$opt_pro])) > 0))
|
2297 |
{
|
2298 |
+
$new_pointer_content .= __("This update adds: (Free) Improved debug mode messages, and (Pro) Autonext for popup lightbox galleries. (<a target=_blank href=" . self::$epbase . '/dashboard/pro-easy-video-analytics.aspx?ref=frompointer' . ">Learn more about Pro »</a>)");
|
2299 |
}
|
2300 |
else
|
2301 |
{
|
2302 |
+
$new_pointer_content .= __("This update adds: (Free) Improved debug mode messages, and (Pro) Autonext for popup lightbox galleries.");
|
2303 |
}
|
2304 |
$new_pointer_content .= '</p>';
|
2305 |
|
2383 |
$new_options[self::$opt_schemaorg] = self::postchecked(self::$opt_schemaorg) ? 1 : 0;
|
2384 |
$new_options[self::$opt_ftpostimg] = self::postchecked(self::$opt_ftpostimg) ? 1 : 0;
|
2385 |
$new_options[self::$opt_spdc] = self::postchecked(self::$opt_spdc) ? 1 : 0;
|
2386 |
+
$new_options[self::$opt_spdcab] = self::postchecked(self::$opt_spdcab) ? 1 : 0;
|
2387 |
$new_options[self::$opt_dynload] = self::postchecked(self::$opt_dynload) ? 1 : 0;
|
2388 |
$new_options[self::$opt_defaultdims] = self::postchecked(self::$opt_defaultdims) ? 1 : 0;
|
2389 |
$new_options[self::$opt_defaultvol] = self::postchecked(self::$opt_defaultvol) ? 1 : 0;
|
2635 |
$new_options[self::$opt_spdcexp] = $_spdcexp;
|
2636 |
|
2637 |
|
|
|
2638 |
$all = $new_options + $all;
|
2639 |
|
2640 |
update_option(self::$opt_alloptions, $all);
|
2738 |
.pad10 {padding: 10px;}
|
2739 |
#boxdohl {font-weight: bold; padding: 0px 10px; <?php echo $all[self::$opt_dohl] ? '' : 'display: none;' ?>}
|
2740 |
#boxdyn {font-weight: bold; padding: 0px 10px; <?php echo $all[self::$opt_dynload] ? 'display: block;' : 'display: none;' ?>}
|
2741 |
+
#boxspdc {padding: 0px 10px; border-left: 5px solid #eee; <?php echo $all[self::$opt_spdc] ? '' : 'display: none;' ?>}
|
2742 |
#boxdefaultvol {font-weight: bold; padding: 0px 10px; <?php echo $all[self::$opt_defaultvol] ? '' : 'display: none;' ?>}
|
2743 |
.vol-output {display: none; width: 30px; color: #008800;}
|
2744 |
.vol-range {background-color: #dddddd; border-radius: 3px; cursor: pointer;}
|
3229 |
</label>
|
3230 |
<div class="indent-option">
|
3231 |
<div id="boxspdc">
|
3232 |
+
<div class="pad10">
|
|
|
|
|
|
|
|
|
|
|
|
|
3233 |
<input type="button" class="button button-primary" value="Click to clear YouTube cache"/>
|
3234 |
<span style="display: none;" id="clearspdcloading" class="orange bold">Clearing...</span>
|
3235 |
<span class="orange bold" style="display: none;" id="clearspdcsuccess">Finished clearing YouTube cache.</span>
|
3236 |
<span class="orange bold" style="display: none;" id="clearspdcfailed">Sorry, there seemed to be a problem clearing the cache.</span>
|
3237 |
</div>
|
3238 |
+
<label>
|
3239 |
+
<b class="chktitle">Cache Liftime (hours): </b>
|
3240 |
+
<input name="<?php echo self::$opt_spdcexp; ?>" id="<?php echo self::$opt_spdcexp; ?>" value="<?php echo trim($all[self::$opt_spdcexp]); ?>" type="number" min="1"/>
|
3241 |
+
Tip: If your pages rarely change, you may wish to set this to a much higher value than 24 hours.
|
3242 |
+
</label>
|
3243 |
+
<br>
|
3244 |
+
<br>
|
3245 |
+
<label>
|
3246 |
+
<input name="<?php echo self::$opt_spdcab; ?>" id="<?php echo self::$opt_spdcab; ?>" <?php checked($all[self::$opt_spdcab], 1); ?> type="checkbox" class="checkbox">
|
3247 |
+
<b class="chktitle">Show "Clear YouTube Cache" Admin Bar Button: </b> <sup class="orange">NEW</sup>
|
3248 |
+
This will display the "Clear YouTube Cache" button conveniently in the top admin bar. Uncheck this if you wish to hide the button.
|
3249 |
+
</label>
|
3250 |
+
|
3251 |
</div>
|
3252 |
</div>
|
3253 |
</p>
|
4095 |
width: " . round($colwidth, 3) . "%;
|
4096 |
}";
|
4097 |
wp_add_inline_style('__EPYT__style', $custom_css);
|
4098 |
+
|
4099 |
+
|
4100 |
+
if (!is_admin() && (self::$alloptions[self::$opt_pro] && strlen(trim(self::$alloptions[self::$opt_pro])) > 8))
|
4101 |
+
{
|
4102 |
+
wp_enqueue_style('__disptype__', plugins_url('scripts/lity' . self::$min . '.css', __FILE__));
|
4103 |
+
wp_enqueue_script('__dispload__', plugins_url('scripts/lity' . self::$min . '.js', __FILE__), array('jquery'));
|
4104 |
+
}
|
4105 |
|
4106 |
wp_enqueue_script('__ytprefs__', plugins_url('scripts/ytprefs' . self::$min . '.js', __FILE__), array('jquery'));
|
4107 |
|
4128 |
wp_enqueue_script('__dynload__', plugins_url('scripts/embdyn' . self::$min . '.js', __FILE__), array('jquery'));
|
4129 |
}
|
4130 |
|
4131 |
+
|
|
|
|
|
|
|
|
|
4132 |
}
|
4133 |
}
|
4134 |
|