YouTube - Version 10.9

Version Description

Download this release

Release Info

Developer embedplus
Plugin Icon 128x128 YouTube
Version 10.9
Comparing to
See all releases

Code changes from version 10.8 to 10.9

images/ssaltgallerycircles.jpg ADDED
Binary file
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: embedplus
3
  Plugin Name: YouTube Embed
4
  Tags: youtube channel, video gallery, youtube galleries, channel gallery, gallery, playlist gallery, youtube gallery, accessibility, analytics, api, blocked youtube videos, cache, caching, channel, deleted youtube videos, effects, embed youtube, embedding youtube, featured image, get_locale, i18n, internationalization, 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.3
7
- Stable tag: 10.8
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...
@@ -147,6 +147,9 @@ You can also start and end each individual video at particular times. Like the a
147
 
148
  == Changelog ==
149
 
 
 
 
150
  = YouTube Embed 10.8 =
151
  This update improves compatibility and adds features to Free and Pro galleries.
152
 
3
  Plugin Name: YouTube Embed
4
  Tags: youtube channel, video gallery, youtube galleries, channel gallery, gallery, playlist gallery, youtube gallery, accessibility, analytics, api, blocked youtube videos, cache, caching, channel, deleted youtube videos, effects, embed youtube, embedding youtube, featured image, get_locale, i18n, internationalization, 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.4
7
+ Stable tag: 10.9
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...
147
 
148
  == Changelog ==
149
 
150
+ = YouTube Embed 10.9 =
151
+ This version offers a host of updates: compatibility fixes, higher quality featured images, selective responsive sizing, wizard enhancements, and circular shaped thumbnails.
152
+
153
  = YouTube Embed 10.8 =
154
  This update improves compatibility and adds features to Free and Pro galleries.
155
 
scripts/fitvids.min.js CHANGED
@@ -1,3 +1,3 @@
1
- function epdofitvids(c){_EPYT_.epresponsiveselector.constructor!==Array&&(_EPYT_.epresponsiveselector=JSON.parse(_EPYT_.epresponsiveselector));c.fn.fitVidsEP=function(g){var f={customSelector:null};if(!document.getElementById("fit-vids-style")){var d=document.createElement("div"),h=document.getElementsByTagName("base")[0]||document.getElementsByTagName("script")[0];d.className="fit-vids-style";d.id="fit-vids-style";d.style.display="none";d.innerHTML="&shy;<style>.fluid-width-video-wrapper{width:100%;position:relative;padding:0;}.fluid-width-video-wrapper iframe,.fluid-width-video-wrapper object,.fluid-width-video-wrapper embed {position:absolute;top:0;left:0;width:100%;height:100%;}</style>";
2
- h.parentNode.insertBefore(d,h)}g&&c.extend(f,g);return this.each(function(){var b=_EPYT_.epresponsiveselector;f.customSelector&&b.push(f.customSelector);b=c(this).find(b.join(","));b=b.not("object object");b.each(function(){var a=c(this);if(!("embed"===this.tagName.toLowerCase()&&a.parent("object").length||a.parent(".fluid-width-video-wrapper").length)){var b="object"===this.tagName.toLowerCase()||a.attr("height")&&!isNaN(parseInt(a.attr("height"),10))?parseInt(a.attr("height"),10):a.height(),e=isNaN(parseInt(a.attr("width"),
3
- 10))?a.width():parseInt(a.attr("width"),10),b=b/e;a.attr("id")||(e="fitvid"+Math.floor(999999*Math.random()),a.attr("id",e));e=document.createElement("div");e.className="fluid-width-video-wrapper";try{a.wrap(e).parent(".fluid-width-video-wrapper").attr("style","padding-top: "+100*b+"% !important;"),a.removeAttr("height").removeAttr("width")}catch(d){}}})})};c(document).ready(function(){c("body").fitVidsEP()});return!0}try{epdofitvids(window.jQuery)}catch(c){};
1
+ function epdofitvids(d){_EPYT_.epresponsiveselector.constructor!==Array&&(_EPYT_.epresponsiveselector=JSON.parse(_EPYT_.epresponsiveselector));d.fn.fitVidsEP=function(f){var e={customSelector:null};if(!document.getElementById("fit-vids-style")){var b=document.createElement("div"),g=document.getElementsByTagName("base")[0]||document.getElementsByTagName("script")[0];b.className="fit-vids-style";b.id="fit-vids-style";b.style.display="none";b.innerHTML="&shy;<style>.fluid-width-video-wrapper{width:100%;position:relative;padding:0;}.fluid-width-video-wrapper iframe,.fluid-width-video-wrapper object,.fluid-width-video-wrapper embed {position:absolute;top:0;left:0;width:100%;height:100%;}</style>";
2
+ g.parentNode.insertBefore(b,g)}f&&d.extend(e,f);return this.each(function(){var c=_EPYT_.epresponsiveselector;e.customSelector&&c.push(e.customSelector);c=d(this).find(c.join(","));c=c.not("object object");c.each(function(){var a=d(this);if(!("embed"===this.tagName.toLowerCase()&&a.parent("object").length||a.parent(".fluid-width-video-wrapper").length)){var c="object"===this.tagName.toLowerCase()||a.attr("height")&&!isNaN(parseInt(a.attr("height"),10))?parseInt(a.attr("height"),10):a.height(),b=isNaN(parseInt(a.attr("width"),
3
+ 10))?a.width():parseInt(a.attr("width"),10),c=c/b;a.attr("id")||a.attr("id","fitvid"+Math.floor(999999*Math.random()));b=document.createElement("div");b.className="fluid-width-video-wrapper";try{a.wrap(b).parent(".fluid-width-video-wrapper").attr("style","padding-top: "+100*c+"% !important;"),a.removeAttr("height").removeAttr("width")}catch(e){}}})})};d(document).ready(function(){d("body").fitVidsEP()});return!0}try{epdofitvids(window.jQuery)}catch(d){};
scripts/ytprefs.min.js CHANGED
@@ -1,12 +1,13 @@
1
- (function(a){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,usingdefault:!0};document.querySelectorAll||(document.querySelectorAll=function(d){var c=document,b=c.documentElement.firstChild,e=c.createElement("STYLE");b.appendChild(e);c.__qsaels=[];e.styleSheet.cssText=d+"{x:expression(document.__qsaels.push(this))}";a.scrollBy(0,
2
- 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=_EPADashboard_.justid(d.target.getVideoUrl());_EPADashboard_.jp("ytid="+a)}catch(c){}},1700)},onPlayerStateChange:function(a){var c=
3
- 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 b=_EPADashboard_.justid(a.target.getVideoUrl());_EPADashboard_.jp("ytid="+b+"&p=1")}catch(e){}}},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=
4
- !0,new YT.Player(a,{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 f=document.getElementsByTagName("head")[0].appendChild(c);setTimeout(function(){f.parentNode.removeChild(f)},500)},apiInit:function(){_EPADashboard_.initStarted=
5
- !0;setTimeout(function(){for(var a=document.querySelectorAll('iframe.__youtube_prefs__[src], iframe[src*="youtube.com/embed/"], iframe[src*="youtube-nocookie.com/embed/"]'),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?
6
- clearInterval(_EPADashboard_.checkInterval):(_EPADashboard_.apiInit(),_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 b=document.createElement("script");b.src="//www.youtube.com/iframe_api";b.type="text/javascript";document.getElementsByTagName("head")[0].appendChild(b)}else YT.loaded&&
7
  (_EPADashboard_.apiInit(),_EPADashboard_.log("YT API available"));_EPADashboard_.doubleCheck();a.onYouTubeIframeAPIReady="undefined"!==typeof a.onYouTubeIframeAPIReady?a.onYouTubeIframeAPIReady:function(){_EPADashboard_.apiInit();_EPADashboard_.log("YT API ready")}})(window);
8
- (function(a){a(document).ready(function(){a(".epyt-gallery").each(function(){var b=a(this),d=a(this).find("iframe").first(),c=d.data("ep-gallerysrc"),f=a(this).find(".epyt-gallery-list .epyt-gallery-thumb").first().data("videoid"),c=c.replace("GALLERYVIDEOID",f);d.attr("src",c);var e=b.find(".epyt-gallery-list"),g=function(){try{if(e.hasClass("epyt-gallery-style-carousel")){var b=a(e.find(".epyt-gallery-thumb").get(0)).height()/2;e.find(".epyt-pagination:first-child .epyt-pagenumbers").css("top",
9
- b+15+"px")}}catch(c){}};setTimeout(function(){g()},300);a(window).resize(g);b.on("click",".epyt-gallery-list .epyt-gallery-thumb",function(){var b=a(this).data("videoid"),c=d.data("ep-gallerysrc").replace("GALLERYVIDEOID",b),c=0<c.indexOf("autoplay")?c.replace("autoplay=0","autoplay=1"):c+"&autoplay=1";a("html, body").animate({scrollTop:d.offset().top-parseInt(_EPYT_.gallery_scrolloffset)},500,function(){d.attr("src",c)})});b.on("mouseenter",".epyt-gallery-list .epyt-gallery-thumb",function(){a(this).addClass("hover");
10
- if(e.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")}});b.on("mouseleave",".epyt-gallery-list .epyt-gallery-thumb",function(){a(this).removeClass("hover");e.hasClass("epyt-gallery-style-carousel")&&1==b.find(".epyt-pagebutton").first().data("showtitle")&&(b.find(".epyt-gallery-rowtitle").text("").removeClass("hover"),
11
- 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"),pageToken:a(this).data("pagetoken"),pageSize:a(this).data("pagesize"),columns:a(this).data("columns"),showTitle:a(this).data("showtitle"),style:a(this).data("style")}};a(this).data("showdsc")&&(c.options.showDsc=a(this).data("showdsc"));
12
- 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"))})}).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){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(e){var c=document,b=c.documentElement.firstChild,d=c.createElement("STYLE");
2
+ b.appendChild(d);c.__qsaels=[];d.styleSheet.cssText=e+"{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(a){try{if("undefined"!==typeof _EPYT_.epdovol&&_EPYT_.epdovol){var c=parseInt(a.target.getIframe().getAttribute("data-vol"));isNaN(c)||(0===c?a.target.mute():(a.target.isMuted()&&a.target.unMute(),a.target.setVolume(c)))}}catch(b){}setTimeout(function(){try{var c=
3
+ _EPADashboard_.justid(a.target.getVideoUrl());_EPADashboard_.jp("ytid="+c)}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 b=_EPADashboard_.justid(a.target.getVideoUrl());_EPADashboard_.jp("ytid="+b+"&p=1")}catch(d){}}},justid:function(a){return/[\?&]v=([^&#]*)/.exec(a)[1]},dynsetupevents:function(){"undefined"===typeof this.epytsetupdone&&_EPADashboard_.setupevents(this.id)},
4
+ setupevents:function(a){_EPADashboard_.log("Setting up YT API events: "+a);YT.loaded&&(document.getElementById(a).epytsetupdone=!0,new YT.Player(a,{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 f=document.getElementsByTagName("head")[0].appendChild(c);
5
+ setTimeout(function(){f.parentNode.removeChild(f)},500)},apiInit:function(){_EPADashboard_.initStarted=!0;setTimeout(function(){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||
6
+ _EPADashboard_.initStarted?clearInterval(_EPADashboard_.checkInterval):(_EPADashboard_.apiInit(),_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 b=document.createElement("script");b.src="//www.youtube.com/iframe_api";b.type="text/javascript";document.getElementsByTagName("head")[0].appendChild(b)}else YT.loaded&&
7
  (_EPADashboard_.apiInit(),_EPADashboard_.log("YT API available"));_EPADashboard_.doubleCheck();a.onYouTubeIframeAPIReady="undefined"!==typeof a.onYouTubeIframeAPIReady?a.onYouTubeIframeAPIReady:function(){_EPADashboard_.apiInit();_EPADashboard_.log("YT API ready")}})(window);
8
+ (function(a){a(document).ready(function(){a(".epyt-gallery").each(function(){var b=a(this),e=a(this).find("iframe").first(),c=e.data("ep-gallerysrc"),f=a(this).find(".epyt-gallery-list .epyt-gallery-thumb").first().data("videoid"),c=c.replace("GALLERYVIDEOID",f);e.attr("src",c);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()/2;d.find(".epyt-pagination:first-child .epyt-pagenumbers").css("top",
9
+ 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"):d+"&autoplay=1";a("html, body").animate({scrollTop:e.offset().top-parseInt(_EPYT_.gallery_scrolloffset)},
10
+ 500,function(){e.attr("src",d)})});b.on("mouseenter",".epyt-gallery-list .epyt-gallery-thumb",function(){a(this).addClass("hover");if(d.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")}});b.on("mouseleave",".epyt-gallery-list .epyt-gallery-thumb",function(){a(this).removeClass("hover");d.hasClass("epyt-gallery-style-carousel")&&
11
+ 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"),pageToken:a(this).data("pagetoken"),pageSize:a(this).data("pagesize"),columns:a(this).data("columns"),showTitle:a(this).data("showtitle"),
12
+ 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,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")}).fail(function(){alert("Sorry, there was an error loading the next page.")}).always(function(){b.find(".epyt-gallery-list").removeClass("epyt-loading");
13
+ g()})})})})})(jQuery);
styles/ytprefs.min.css CHANGED
@@ -1 +1 @@
1
- .epyt-gallery-clear,.epyt-gallery-rowbreak{clear:both}.epyt-debug{cursor:pointer;text-align:left;background-color:#ddd;color:#000}.epyt-gallery{text-align:center}.epyt-gallery iframe{margin-bottom:0}.epyt-gallery-list{margin:0 -8px;position:relative;transition:opacity ease-out .3s;display:block}.epyt-gallery-list.epyt-loading{opacity:.5;transition:opacity ease-out .3s}.epyt-gallery-thumb{box-sizing:border-box;overflow-y:hidden;display:block!important;cursor:pointer;opacity:.8;float:left;padding:0 8px 10px}.epyt-gallery-thumb.hover{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{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}.epyt-gallery-notitle span,.epyt-gallery-thumb.epyt-listview+.epyt-gallery-rowbreak{display:none}.epyt-gallery-title{font-size:80%;line-height:120%;padding:10px}.epyt-gallery-notitle{padding:4px}.epyt-gallery-rowtitle{text-align:center;width:100%;position:absolute;left:0;top:100%;opacity:0;z-index:10;overflow-x:hidden;text-overflow:ellipsis;white-space:nowrap}.epyt-gallery-rowtitle.hover{opacity:1;transition:opacity linear .2s}.epyt-gallery-list.epyt-gallery-style-listview{margin-left:0;margin-right:0;margin-bottom:25px}.epyt-gallery-thumb.epyt-listview{width:100%!important;padding:0;margin:8px 0}.epyt-gallery-thumb.epyt-listview .epyt-gallery-img-box{float:left;width:150px;max-width:25%;margin-right:20px;margin-bottom:6px}.epyt-gallery-thumb.epyt-listview .epyt-gallery-title{padding:10px;text-align:left}.epyt-gallery-thumb.epyt-listview .epyt-gallery-dsc{font-size:65%;line-height:120%;padding:5px 10px 12px;text-align:left}.epyt-gallery-thumb.epyt-listview.hover{background-color:#ddd;color:#000;transition:background-color ease-out .3s,color ease-out .3s}.epyt-pagination{clear:both;text-align:center;padding:10px 8px}.epyt-pagenumbers>div,.epyt-pagination>div{display:inline-block;padding:0 2px;vertical-align:middle}.epyt-pagination .epyt-pagebutton{cursor:pointer;display:inline-block;padding:0 10px}.epyt-pagebutton>div{display:inline}.epyt-pagination .epyt-loader{display:none}.epyt-gallery-list.epyt-loading .epyt-pagination .epyt-loader{display:inline-block}.epyt-gallery-list.epyt-gallery-style-carousel{margin:0 0 50px}.epyt-gallery-list.epyt-gallery-style-carousel .epyt-pagination{display:none}.epyt-gallery-list.epyt-gallery-style-carousel .epyt-pagination:first-child{position:absolute;width:100%;display:block;margin:auto;top:0;bottom:0;padding:0;height:30px}.epyt-gallery-list.epyt-gallery-style-carousel .epyt-pagenumbers.hide{opacity:0}.epyt-gallery-list.epyt-gallery-style-carousel .epyt-gallery-allthumbs{margin:15px 35px}.epyt-gallery-list.epyt-gallery-style-carousel .epyt-gallery-thumb{padding-bottom:0;float:none;display:inline-block!important}.epyt-gallery-list.epyt-gallery-style-carousel .epyt-pagebutton>div{display:none}.epyt-gallery-list.epyt-gallery-style-carousel .epyt-pagebutton>div.arrow{background:url(../images/arrow-right.svg) no-repeat;background-size:contain;width:20px;height:100%;display:block;text-indent:-99999px;opacity:.7}.epyt-gallery-list.epyt-gallery-style-carousel .epyt-pagebutton>div.arrow:hover{opacity:1}.epyt-gallery-list.epyt-gallery-style-carousel .epyt-pagebutton.epyt-prev>div.arrow{background-image:url(../images/arrow-left.svg)}.epyt-gallery-list.epyt-gallery-style-carousel .epyt-pagebutton{padding:0;margin-top:-2px}.epyt-gallery-list.epyt-gallery-style-carousel .epyt-next{float:right}.epyt-gallery-list.epyt-gallery-style-carousel .epyt-prev{float:left}.epyt-gallery-list.epyt-gallery-style-carousel .epyt-pagenumbers{position:absolute;top:100%;left:0;right:0}.epyt-pagebutton.hide,.epyt-pagenumbers.hide{display:none!important;opacity:0!important;visibility:hidden!important}
1
+ .epyt-gallery-clear,.epyt-gallery-rowbreak{clear:both}.epyt-debug{cursor:pointer;text-align:left;background-color:#ddd;color:#000}.epyt-gallery{text-align:center}.epyt-gallery iframe{margin-bottom:0}.epyt-gallery-list{margin:0 -8px;position:relative;transition:opacity ease-out .3s;display:block}.epyt-gallery-list.epyt-loading{opacity:.5;transition:opacity ease-out .3s}.epyt-gallery-thumb{box-sizing:border-box;overflow-y:hidden;display:block!important;cursor:pointer;opacity:.8;float:left;padding:0 8px 10px}.epyt-gallery-thumb.hover{opacity:1;transition:opacity ease-out .3s}.epyt-gallery-img-box{width:100%}.epyt-gallery-img{height:0;width:100%;padding-top:56.25%!important;position:relative;overflow:hidden!important;background-size:cover!important;background-position:center!important}.epyt-gallery-playhover{opacity:0;position:absolute;top:-10px;left:0;width:100%;height:100%;vertical-align:middle;text-align:center;transition:opacity ease-out .3s}.epyt-gallery-thumb.epyt-current-video .epyt-gallery-playhover,.epyt-gallery-thumb.hover .epyt-gallery-playhover{opacity:1;top:0;transition:all ease-out .3s}.epyt-gallery-thumb .epyt-gallery-playcrutch{display:inline-block;height:100%;vertical-align:middle;width:0}.epyt-gallery-playhover .epyt-play-img{height:auto!important;max-width:15%!important;padding:0!important;margin:0!important;min-width:30px!important;vertical-align:middle!important;display:inline-block!important;width:auto}.epyt-gallery-notitle span,.epyt-gallery-thumb.epyt-listview+.epyt-gallery-rowbreak{display:none}.epyt-gallery-title{font-size:80%;line-height:120%;padding:10px}.epyt-gallery-notitle{padding:4px}.epyt-gallery-rowtitle{text-align:center;width:100%;position:absolute;left:0;top:100%;opacity:0;z-index:10;overflow-x:hidden;text-overflow:ellipsis;white-space:nowrap}.epyt-gallery-rowtitle.hover{opacity:1;transition:opacity linear .2s}.epyt-gallery-list.epyt-gallery-style-listview{margin-left:0;margin-right:0;margin-bottom:25px}.epyt-gallery-thumb.epyt-listview{width:100%!important;padding:0;margin:8px 0}.epyt-gallery-thumb.epyt-listview .epyt-gallery-img-box{float:left;width:150px;max-width:25%;margin-right:20px;margin-bottom:6px}.epyt-gallery-thumb.epyt-listview .epyt-gallery-title{padding:10px;text-align:left}.epyt-gallery-thumb.epyt-listview .epyt-gallery-dsc{font-size:75%;line-height:120%;padding:5px 10px 12px;text-align:left}.epyt-gallery-thumb.epyt-listview.hover{background-color:#ddd;color:#000;transition:background-color ease-out .3s,color ease-out .3s}.epyt-pagination{clear:both;text-align:center;padding:10px 8px}.epyt-pagenumbers>div,.epyt-pagination>div{display:inline-block;padding:0 2px;vertical-align:middle}.epyt-pagination .epyt-pagebutton{cursor:pointer;display:inline-block;padding:0 10px}.epyt-pagebutton>div{display:inline}.epyt-pagination .epyt-loader{display:none}.epyt-gallery-list.epyt-loading .epyt-pagination .epyt-loader{display:inline-block}.epyt-gallery-allthumbs.epyt-cols-1 .epyt-gallery-thumb{width:100%}.epyt-gallery-allthumbs.epyt-cols-2 .epyt-gallery-thumb{width:50%}.epyt-gallery-allthumbs.epyt-cols-3 .epyt-gallery-thumb{width:33.333%}.epyt-gallery-allthumbs.epyt-cols-4 .epyt-gallery-thumb{width:25%}.epyt-gallery-allthumbs.epyt-cols-5 .epyt-gallery-thumb{width:20%}.epyt-gallery-allthumbs.epyt-cols-6 .epyt-gallery-thumb{width:16.666%}.epyt-gallery-allthumbs.epyt-cols-7 .epyt-gallery-thumb{width:14.285%}.epyt-gallery-allthumbs.epyt-cols-8 .epyt-gallery-thumb{width:12.5%}.epyt-gallery-allthumbs.epyt-cols-9 .epyt-gallery-thumb{width:11.111%}.epyt-gallery-allthumbs.epyt-cols-10 .epyt-gallery-thumb{width:10%}.epyt-gallery-allthumbs.epyt-cols-11 .epyt-gallery-thumb{width:9.090%}.epyt-gallery-allthumbs.epyt-cols-12 .epyt-gallery-thumb{width:8.333%}.epyt-gallery-allthumbs.epyt-cols-13 .epyt-gallery-thumb{width:7.692%}.epyt-gallery-allthumbs.epyt-cols-14 .epyt-gallery-thumb{width:7.142%}.epyt-gallery-allthumbs.epyt-cols-15 .epyt-gallery-thumb{width:6.666%}.epyt-gallery-allthumbs.epyt-cols-16 .epyt-gallery-thumb{width:6.25%}.epyt-gallery-allthumbs.epyt-cols-17 .epyt-gallery-thumb{width:5.882%}.epyt-gallery-allthumbs.epyt-cols-18 .epyt-gallery-thumb{width:5.555%}.epyt-gallery-allthumbs.epyt-cols-19 .epyt-gallery-thumb{width:5.263%}.epyt-gallery-allthumbs.epyt-cols-20 .epyt-gallery-thumb{width:5%}.epyt-gallery-allthumbs.epyt-thumb-portal .epyt-gallery-thumb .epyt-gallery-img{border-radius:50%;padding-top:100%!important}.epyt-gallery-list.epyt-gallery-style-carousel{margin:0 0 50px}.epyt-gallery-list.epyt-gallery-style-carousel .epyt-pagination{display:none}.epyt-gallery-list.epyt-gallery-style-carousel .epyt-pagination:first-child{position:absolute;width:100%;display:block;margin:auto;top:0;bottom:0;padding:0;height:30px}.epyt-gallery-list.epyt-gallery-style-carousel .epyt-pagenumbers.hide{opacity:0}.epyt-gallery-list.epyt-gallery-style-carousel .epyt-gallery-allthumbs{margin:15px 35px}.epyt-gallery-list.epyt-gallery-style-carousel .epyt-gallery-thumb{padding-bottom:0;float:none;display:inline-block!important}.epyt-gallery-list.epyt-gallery-style-carousel .epyt-pagebutton>div{display:none}.epyt-gallery-list.epyt-gallery-style-carousel .epyt-pagebutton>div.arrow{background:url(../images/arrow-right.svg) no-repeat;background-size:contain;width:20px;height:100%;display:block;text-indent:-99999px;opacity:.7}.epyt-gallery-list.epyt-gallery-style-carousel .epyt-pagebutton>div.arrow:hover{opacity:1}.epyt-gallery-list.epyt-gallery-style-carousel .epyt-pagebutton.epyt-prev>div.arrow{background-image:url(../images/arrow-left.svg)}.epyt-gallery-list.epyt-gallery-style-carousel .epyt-pagebutton{padding:0;margin-top:-2px}.epyt-gallery-list.epyt-gallery-style-carousel .epyt-next{float:right}.epyt-gallery-list.epyt-gallery-style-carousel .epyt-prev{float:left}.epyt-gallery-list.epyt-gallery-style-carousel .epyt-pagenumbers{position:absolute;top:100%;left:0;right:0}.epyt-pagebutton.hide,.epyt-pagenumbers.hide{display:none!important;opacity:0!important;visibility:hidden!important}
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: 10.8
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 = '10.8';
36
  public static $opt_version = 'version';
37
  public static $optembedwidth = null;
38
  public static $optembedheight = null;
@@ -69,8 +69,10 @@ class YouTubePrefs
69
  public static $opt_pro = 'pro';
70
  public static $opt_oldspacing = 'oldspacing';
71
  public static $opt_responsive = 'responsive';
 
72
  public static $opt_origin = 'origin';
73
  public static $opt_widgetfit = 'widgetfit';
 
74
  public static $opt_defaultdims = 'defaultdims';
75
  public static $opt_defaultwidth = 'width';
76
  public static $opt_defaultheight = 'height';
@@ -97,6 +99,7 @@ class YouTubePrefs
97
  public static $opt_gallery_customprev = 'gallery_customprev';
98
  public static $opt_gallery_customnext = 'gallery_customnext';
99
  public static $opt_gallery_showdsc = 'gallery_showdsc';
 
100
  public static $opt_admin_off_scripts = 'admin_off_scripts';
101
  public static $opt_alloptions = 'youtubeprefs_alloptions';
102
  public static $alloptions = null;
@@ -182,7 +185,7 @@ class YouTubePrefs
182
  }
183
 
184
  add_action('wp_enqueue_scripts', array('YouTubePrefs', 'ytprefsscript'), 100);
185
- add_action('wp_enqueue_scripts', array('YouTubePrefs', 'fitvids'));
186
 
187
 
188
 
@@ -254,6 +257,7 @@ class YouTubePrefs
254
  #wpadminbar {display:none;}
255
  html.wp-toolbar {padding: 0px;}
256
  #footer, #wpfooter, .auto-fold #wpfooter {display: none;}
 
257
  .acctitle {background-color: #dddddd; border-radius: 5px; padding: 7px 15px 7px 15px; cursor: pointer; margin: 10px; font-weight: bold; font-size: 12px;}
258
  .acctitle:hover {background-color: #cccccc;}
259
  .accbox {display: none; position: relative; margin: 5px 8px 30px 15px; clear: both; line-height: 180%;}
@@ -620,40 +624,20 @@ class YouTubePrefs
620
  eppathtoscripts: "<?php echo plugins_url('scripts/', __FILE__); ?>",
621
  epresponsiveselector: <?php echo self::get_responsiveselector(); ?>,
622
  version: "<?php echo self::$alloptions[self::$opt_version] ?>",
623
- epdovol: true
 
624
  };
625
  </script>
626
  <?php
627
  }
628
  }
629
 
630
- public static function jsinitvars()
631
- { // NOT USED
632
- //https://support.cloudflare.com/hc/en-us/articles/200169436-How-can-I-have-Rocket-Loader-ignore-my-script-s-in-Automatic-Mode-
633
- $responsiveselector = '[]';
634
- if (self::$alloptions[self::$opt_widgetfit] == 1)
635
- {
636
- $responsiveselector = '["iframe.__youtube_prefs_widget__"]';
637
- }
638
- if (self::$alloptions[self::$opt_responsive] == 1)
639
- {
640
- $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\']"]';
641
- }
642
- ?>
643
- <script data-cfasync="false">
644
- var eppathtoscripts = "<?php echo plugins_url('scripts/', __FILE__); ?>";
645
- var epresponsiveselector = <?php echo $responsiveselector; ?>;
646
- var epdovol = true; //<?php echo (self::$alloptions[self::$opt_defaultvol] == 1 ? 'true' : 'false') ?>;
647
- </script>
648
- <?php
649
- }
650
-
651
  public static function fitvids()
652
  {
653
  $loggedin = current_user_can('edit_posts');
654
  if (!($loggedin && self::$alloptions[self::$opt_admin_off_scripts]))
655
  {
656
- wp_enqueue_script('__ytprefsfitvids__', plugins_url('scripts/fitvids.min.js', __FILE__), false, false, true);
657
  }
658
  }
659
 
@@ -685,7 +669,9 @@ class YouTubePrefs
685
  $_controls = 2;
686
  $_oldspacing = 1;
687
  $_responsive = 0;
 
688
  $_widgetfit = 1;
 
689
  $_schemaorg = 0;
690
  $_ftpostimg = 0;
691
  $_spdc = 0;
@@ -712,6 +698,7 @@ class YouTubePrefs
712
  $_gallery_pagesize = 15;
713
  $_gallery_style = 'grid';
714
  $_gallery_showdsc = 0;
 
715
  $_debugmode = 0;
716
  $_admin_off_scripts = 0;
717
  $_old_script_method = 0;
@@ -753,7 +740,9 @@ class YouTubePrefs
753
  $_autohide = self::tryget($arroptions, self::$opt_autohide, 2);
754
  $_oldspacing = self::tryget($arroptions, self::$opt_oldspacing, 1);
755
  $_responsive = self::tryget($arroptions, self::$opt_responsive, 0);
 
756
  $_widgetfit = self::tryget($arroptions, self::$opt_widgetfit, 1);
 
757
  $_schemaorg = self::tryget($arroptions, self::$opt_schemaorg, 0);
758
  $_ftpostimg = self::tryget($arroptions, self::$opt_ftpostimg, 0);
759
  $_spdc = self::tryget($arroptions, self::$opt_spdc, 0);
@@ -771,6 +760,7 @@ class YouTubePrefs
771
  $_gallery_scrolloffset = self::tryget($arroptions, self::$opt_gallery_scrolloffset, 20);
772
  $_gallery_showtitle = self::tryget($arroptions, self::$opt_gallery_showtitle, 1);
773
  $_gallery_style = self::tryget($arroptions, self::$opt_gallery_style, 'grid');
 
774
  $_gallery_customarrows = self::tryget($arroptions, self::$opt_gallery_customarrows, $_gallery_customarrows);
775
  $_gallery_customnext = self::tryget($arroptions, self::$opt_gallery_customnext, $_gallery_customnext);
776
  $_gallery_customprev = self::tryget($arroptions, self::$opt_gallery_customprev, $_gallery_customprev);
@@ -814,7 +804,9 @@ class YouTubePrefs
814
  self::$opt_controls => $_controls,
815
  self::$opt_oldspacing => $_oldspacing,
816
  self::$opt_responsive => $_responsive,
 
817
  self::$opt_widgetfit => $_widgetfit,
 
818
  self::$opt_schemaorg => $_schemaorg,
819
  self::$opt_ftpostimg => $_ftpostimg,
820
  self::$opt_spdc => $_spdc,
@@ -835,6 +827,7 @@ class YouTubePrefs
835
  self::$opt_gallery_customprev => $_gallery_customprev,
836
  self::$opt_gallery_showdsc => $_gallery_showdsc,
837
  self::$opt_gallery_style => $_gallery_style,
 
838
  self::$opt_gallery_pagesize => $_gallery_pagesize,
839
  self::$opt_debugmode => $_debugmode,
840
  self::$opt_admin_off_scripts => $_admin_off_scripts,
@@ -940,13 +933,14 @@ class YouTubePrefs
940
  return self::get_html($m, false);
941
  }
942
 
943
- //public static function get_gallery_page($playlistId, $pageToken, $pageSize, $columns, $style, $apiKey)
944
  public static function get_gallery_page($options)
945
  {
946
  $options->pageSize = min(intval($options->pageSize), 50);
947
  $options->columns = intval($options->columns);
948
  $options->showTitle = intval($options->showTitle);
949
  $options->showDsc = intval($options->showDsc);
 
 
950
 
951
  if (empty($options->apiKey))
952
  {
@@ -961,11 +955,11 @@ class YouTubePrefs
961
  $apiEndpoint .= '&pageToken=' . $options->pageToken;
962
  }
963
  $spdckey = '';
964
- if (self::$alloptions[self::$opt_pro] && strlen(trim(self::$alloptions[self::$opt_pro])) > 0 && self::$alloptions[self::$opt_spdc] == 1)
965
  {
966
  try
967
  {
968
- $spdckey = self::$spdcprefix . '_' . md5($apiEndpoint . $options->columns . $options->style . $options->showTitle . $options->showDsc);
969
  $spdcval = get_transient($spdckey);
970
  if (!empty($spdcval))
971
  {
@@ -1017,7 +1011,19 @@ class YouTubePrefs
1017
  }
1018
 
1019
  $cnt = 0;
1020
- $code.= '<div class="epyt-gallery-allthumbs">';
 
 
 
 
 
 
 
 
 
 
 
 
1021
  if (isset($jsonResult->items) && $jsonResult->items != null && is_array($jsonResult->items))
1022
  {
1023
 
@@ -1091,7 +1097,8 @@ class YouTubePrefs
1091
  . '" data-style="' . esc_attr($options->style)
1092
  . '" data-columns="' . intval($options->columns)
1093
  . '" data-showtitle="' . intval($options->showTitle)
1094
- . ((self::$alloptions[self::$opt_pro] && strlen(trim(self::$alloptions[self::$opt_pro])) > 0 && $options->style == 'listview' && $options->showDsc) ? '" data-showdsc="' . intval($options->showDsc) : '')
 
1095
  . '"><div class="arrow">&laquo;</div> <div>' . $txtprev . '</div></div>';
1096
  }
1097
 
@@ -1109,9 +1116,10 @@ class YouTubePrefs
1109
  . '" data-columns="' . intval($options->columns)
1110
  . '" data-showtitle="' . intval($options->showTitle)
1111
  . ((self::$alloptions[self::$opt_pro] && strlen(trim(self::$alloptions[self::$opt_pro])) > 0 && $options->style == 'listview' && $options->showDsc) ? '" data-showdsc="' . intval($options->showDsc) : '')
 
1112
  . '"><div>' . $txtnext . '</div> <div class="arrow">&raquo;</div></div>';
1113
  }
1114
- $pagination .= '<div class="epyt-loader"><img src="' . plugins_url('images/gallery-page-loader.gif', __FILE__) . '"></div>';
1115
  }
1116
  $pagination .= '</div>';
1117
 
@@ -1152,7 +1160,7 @@ class YouTubePrefs
1152
 
1153
  $code .= '<div data-videoid="' . $escId . '" class="epyt-gallery-thumb ' . $styleclass . '" ' . $rawstyle . '>';
1154
  $code .= '<div class="epyt-gallery-img-box"><div class="epyt-gallery-img" style="background-image: url(' . esc_attr($thumb->img) . ')">' .
1155
- '<div class="epyt-gallery-playhover"><img class="epyt-play-img" src="' . plugins_url('images/playhover.png', __FILE__) . '" /><div class="epyt-gallery-playcrutch"></div></div>' .
1156
  '</div></div>';
1157
  if ($options->style != 'carousel' && !empty($thumb->title))
1158
  {
@@ -1364,6 +1372,7 @@ class YouTubePrefs
1364
  $gallery_options->showTitle = intval($finalparams[self::$opt_gallery_showtitle]);
1365
  $gallery_options->showDsc = intval($finalparams[self::$opt_gallery_showdsc]);
1366
  $gallery_options->style = $finalparams[self::$opt_gallery_style];
 
1367
  $gallery_options->apiKey = self::$alloptions[self::$opt_apikey];
1368
 
1369
  $dynsrc = 'data-ep-gallery';
@@ -1377,8 +1386,8 @@ class YouTubePrefs
1377
 
1378
  $code1 = '<iframe ' . $dyntype . $centercode . ' id="_ytid_' . rand(10000, 99999) . '" width="' . self::$defaultwidth . '" height="' . self::$defaultheight .
1379
  '" ' . $dynsrc . 'src="//www.' . $youtubebaseurl . '.com/embed/' . $videoidoutput . '?';
1380
- $code2 = '" frameborder="0" type="text/html" class="__youtube_prefs__' . ($iscontent ? '' : ' __youtube_prefs_widget__') .
1381
- '"' . $voloutput . $acctitle . ' allowfullscreen webkitallowfullscreen mozallowfullscreen ></iframe>' . $schemaorgoutput;
1382
 
1383
  $origin = '';
1384
 
@@ -1687,30 +1696,36 @@ class YouTubePrefs
1687
 
1688
 
1689
  $just_id = $linkparams['v'];
1690
- $ftimgurl = null;
1691
- if ($just_id)
1692
- {
1693
- require_once( ABSPATH . WPINC . '/class-oembed.php' );
1694
- $oembed = _wp_oembed_get_object();
1695
- $args = array();
1696
- $args['width'] = 1920;
1697
- $args['height'] = 1080;
1698
- $args['discover'] = false;
1699
- $odata = $oembed->fetch('https://www.youtube.com/oembed', 'http://youtube.com/watch?v=' . $just_id, $args);
1700
-
1701
- if ($odata)
1702
  {
1703
- $ftimgurl = $odata->thumbnail_url;
 
 
 
 
 
 
 
 
 
 
 
1704
  }
1705
- }
1706
 
1707
- $ftimgid = $ftimgurl && !is_wp_error($ftimgurl) ? self::media_sideload($ftimgurl, $post->ID, sanitize_title(preg_replace("/[^a-zA-Z0-9\s]/", "-", $post->title))) : 0;
1708
 
1709
- if (!$ftimgid)
1710
- {
1711
- return;
 
1712
  }
1713
-
1714
  set_post_thumbnail($post->ID, $ftimgid);
1715
  }
1716
  }
@@ -2130,6 +2145,7 @@ class YouTubePrefs
2130
  $new_options[self::$opt_oldspacing] = self::postchecked(self::$opt_oldspacing) ? 1 : 0;
2131
  $new_options[self::$opt_responsive] = self::postchecked(self::$opt_responsive) ? 1 : 0;
2132
  $new_options[self::$opt_widgetfit] = self::postchecked(self::$opt_widgetfit) ? 1 : 0;
 
2133
  $new_options[self::$opt_schemaorg] = self::postchecked(self::$opt_schemaorg) ? 1 : 0;
2134
  $new_options[self::$opt_ftpostimg] = self::postchecked(self::$opt_ftpostimg) ? 1 : 0;
2135
  $new_options[self::$opt_spdc] = self::postchecked(self::$opt_spdc) ? 1 : 0;
@@ -2163,6 +2179,17 @@ class YouTubePrefs
2163
  }
2164
  $new_options[self::$opt_defaultheight] = $_defaultheight;
2165
 
 
 
 
 
 
 
 
 
 
 
 
2166
  $_vol = '';
2167
  try
2168
  {
@@ -2220,6 +2247,18 @@ class YouTubePrefs
2220
  $new_options[self::$opt_gallery_style] = $_gallery_style;
2221
 
2222
 
 
 
 
 
 
 
 
 
 
 
 
 
2223
  $_gallery_custom_prev = 'Prev';
2224
  try
2225
  {
@@ -2414,6 +2453,7 @@ class YouTubePrefs
2414
  .indent-option {margin-left: 25px;}
2415
  #boxschemaorg {font-weight: bold; padding: 7px 0; <?php echo $all[self::$opt_schemaorg] ? 'display: block;' : 'display: none;' ?>}
2416
  #boxmigratelist { <?php echo $all[self::$opt_migrate] ? '' : 'display: none;' ?>}
 
2417
  .apikey-msg {display: inline-block; width: 45%; vertical-align: top;}
2418
  .apikey-video{margin-left: 3%; display: inline-block; width: 50%; position: relative; padding-top: 29%}
2419
  .apikey-video iframe{display: block; width: 100%; height: 100%; position: absolute; top: 0; left: 0;}
@@ -2440,7 +2480,7 @@ class YouTubePrefs
2440
  <a href="#jumpdefaults">Defaults</a>
2441
  <a href="#jumpcompat">Compatibility</a>
2442
  <a href="#jumpgallery">Gallery Settings</a>
2443
- <a href="#jumpoverride">How To Override Defaults</a>
2444
  <a target="_blank" href="<?php echo self::$epbase . "/dashboard/pro-easy-video-analytics.aspx?ref=protab" ?>" style="border-color: #888888;">Upgrade?</a>
2445
  <a href="#jumpsupport">Support</a>
2446
  </div>
@@ -2504,7 +2544,7 @@ class YouTubePrefs
2504
  <p>
2505
  <?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.") ?>
2506
  </p>
2507
- <?php // self::save_changes_button(); ?>
2508
 
2509
  <div class="ytindent chx">
2510
  <p>
@@ -2571,6 +2611,12 @@ class YouTubePrefs
2571
  <p>
2572
  <input name="<?php echo self::$opt_responsive; ?>" id="<?php echo self::$opt_responsive; ?>" <?php checked($all[self::$opt_responsive], 1); ?> type="checkbox" class="checkbox">
2573
  <label for="<?php echo self::$opt_responsive; ?>"><?php _e('<b class="chktitle">Responsive Video Sizing:</b> Make your videos responsive so that they dynamically fit in all screen sizes (smart phone, PC and tablet). NOTE: While this is checked, any custom hardcoded widths and heights you may have set will dynamically change too. <b>Do not check this if your theme already handles responsive video sizing.</b>') ?></label>
 
 
 
 
 
 
2574
  </p>
2575
  <p>
2576
  <input name="<?php echo self::$opt_widgetfit; ?>" id="<?php echo self::$opt_widgetfit; ?>" <?php checked($all[self::$opt_widgetfit], 1); ?> type="checkbox" class="checkbox">
@@ -2592,7 +2638,7 @@ class YouTubePrefs
2592
  <p>
2593
  <input name="<?php echo self::$opt_nocookie; ?>" id="<?php echo self::$opt_nocookie; ?>" <?php checked($all[self::$opt_nocookie], 1); ?> type="checkbox" class="checkbox">
2594
  <span id="boxnocookie">
2595
- Reminder: If you see errors while testing your playlist embeds or watching your videos on mobile, please uncheck this option.
2596
  </span>
2597
  <label for="<?php echo self::$opt_nocookie; ?>">
2598
  <b class="chktitle">No Cookies:</b> Prevent YouTube from leaving tracking cookies on your visitors browsers unless they actual play the videos. This is coded to apply this behavior on links in your past post as well. <b>NOTE: Research shows that YouTube's support of Do Not Track can be error-prone. </b>
@@ -2666,7 +2712,7 @@ class YouTubePrefs
2666
  <p>
2667
  <input name="<?php echo self::$opt_old_script_method; ?>" id="<?php echo self::$opt_old_script_method; ?>" <?php checked($all[self::$opt_old_script_method], 1); ?> type="checkbox" class="checkbox">
2668
  <label for="<?php echo self::$opt_old_script_method; ?>">
2669
- <b class="chktitle">Use Legacy Scripts: <sup class="orange bold">NEW</sup></b>
2670
  This is a legacy option for users with theme issues that require backwards compatibility (v.10.5 or earlier). It may also help with caching plugin or CDN plugin issues.
2671
  </label>
2672
  </p>
@@ -2681,7 +2727,7 @@ class YouTubePrefs
2681
  <p>
2682
  <input name="<?php echo self::$opt_migrate; ?>" id="<?php echo self::$opt_migrate; ?>" <?php checked($all[self::$opt_migrate], 1); ?> type="checkbox" class="checkbox">
2683
  <label for="<?php echo self::$opt_migrate; ?>">
2684
- <b class="chktitle">Migrate Shortcodes: <sup class="orange bold">NEW</sup></b> Inherit other shortcodes.
2685
  </label>
2686
  <div id="boxmigratelist">
2687
  <ul>
@@ -2697,22 +2743,30 @@ class YouTubePrefs
2697
  <b class="chktitle">Legacy Spacing:</b> Continue the spacing style from version 4.0 and older. Those versions required you to manually add spacing above and below your video. Unchecking this will automatically add the spacing.
2698
  </label>
2699
  </p>
 
 
 
 
 
 
 
2700
  <p>
2701
  <input name="<?php echo self::$opt_debugmode; ?>" id="<?php echo self::$opt_debugmode; ?>" <?php checked($all[self::$opt_debugmode], 1); ?> type="checkbox" class="checkbox">
2702
  <label for="<?php echo self::$opt_debugmode; ?>">
2703
- <b class="chktitle">Debug Mode: <sup class="orange bold">NEW</sup></b> If you ask for support, we may ask you to turn on debug mode here.
2704
  It may print out some diagnostic info so that we can help you solve your issue.
2705
  </label>
2706
  </p>
 
2707
  </div>
2708
  <div class="jumper" id="jumpgallery"></div>
2709
  <h3 class="sect">Gallery Settings and Directions<sup class="orange bold">NEW</sup> <a href="#top" class="totop">&#9650; top</a></h3>
2710
  <img class="ssgallery" src="<?php echo plugins_url('images/ssgallery.png', __FILE__) ?>">
2711
  <p>
2712
  <a target="_blank" href="<?php echo self::$epbase ?>/responsive-youtube-playlist-channel-gallery-for-wordpress.aspx">You can now make playlist embeds (and channel-playlist embeds) have a gallery layout &raquo;</a>. <strong>First, you must obtain your YouTube API key</strong>.
2713
- Don't worry, it's an easy process. Just <a href="https://www.youtube.com/watch?v=2vmBACVETf4" target="_blank">click this link &raquo;</a> and follow the video on that page to get your API key. Then paste it in the box below, and click the "Save Changes" button:
2714
  </p>
2715
- <p>
2716
  Simply add the following parameter to the end of your playlist url:
2717
  </p>
2718
  <p><code>&layout=gallery</code></p>
@@ -2722,7 +2776,7 @@ class YouTubePrefs
2722
  </p>
2723
  <p class="smallnote">
2724
  Note: The PRO wizard has steps to fully create playlist, channel, and gallery codes like the above.
2725
- </p>
2726
  <p>
2727
  Below are the settings for galleries:
2728
  </p>
@@ -2730,7 +2784,7 @@ class YouTubePrefs
2730
  <p>
2731
  <b class="chktitle">YouTube API Key:</b>
2732
  <input type="text" name="<?php echo self::$opt_gallery_apikey; ?>" id="<?php echo self::$opt_gallery_apikey; ?>" value="<?php echo trim($all[self::$opt_apikey]); ?>" class="textinput" style="width: 250px;">
2733
- Required so your site can get the thumbnails, title text, and other content from YouTube’s servers that used to render galleries. <a href="https://www.youtube.com/watch?v=2vmBACVETf4" target="_blank">Click this link &raquo;</a> and follow the video to the right to get your API key.
2734
  </p>
2735
  <p>
2736
  <label for="<?php echo self::$opt_gallery_pagesize; ?>"><b class="chktitle">Gallery Page Size:</b></label>
@@ -2772,15 +2826,24 @@ class YouTubePrefs
2772
  <input name="<?php echo self::$opt_gallery_showtitle; ?>" id="<?php echo self::$opt_gallery_showtitle; ?>" <?php checked($all[self::$opt_gallery_showtitle], 1); ?> type="checkbox" class="checkbox">
2773
  <label for="<?php echo self::$opt_gallery_showtitle; ?>"><b class="chktitle">Show Thumbnail Title:</b> Show titles with each thumbnail.</label>
2774
  </p>
 
 
 
 
 
 
 
 
 
2775
 
2776
  </div>
2777
 
2778
- <?php // self::save_changes_button(); ?>
2779
 
2780
  <div class="upgchecks">
2781
  <h3 class="sect">PRO Features</h3>
2782
  <?php
2783
- if ($all[self::$opt_pro] && strlen(trim($all[self::$opt_pro])) > 5)
2784
  {
2785
  ?>
2786
  <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>
@@ -2799,13 +2862,28 @@ class YouTubePrefs
2799
  <a target="_blank" href="<?php echo self::$epbase ?>/responsive-youtube-playlist-channel-gallery-for-wordpress.aspx">Read more here &raquo;</a>
2800
  </label>
2801
  </p>
 
2802
  <div class="hr"></div>
2803
  <p>
2804
  <img class="ssaltgallery" src="<?php echo plugins_url('images/ssverticallayout.png', __FILE__) ?>" />
2805
  <input name="<?php echo self::$opt_gallery_showdsc; ?>" id="<?php echo self::$opt_gallery_showdsc; ?>" <?php checked($all[self::$opt_gallery_showdsc], 1); ?> type="checkbox" class="checkbox">
2806
  <label for="<?php echo self::$opt_gallery_showdsc; ?>">
2807
  <b>(PRO)</b> <b class="chktitle">Show Gallery Descriptions (for vertical list styling): </b>
2808
- For the vertical list layout, this option will show full descriptions with each thumbnail (other layouts don't have enough room).
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2809
  </label>
2810
  </p>
2811
  <div class="hr"></div>
@@ -2838,7 +2916,7 @@ class YouTubePrefs
2838
  <p>
2839
  <input name="<?php echo self::$opt_schemaorg; ?>" id="<?php echo self::$opt_schemaorg; ?>" <?php checked($all[self::$opt_schemaorg], 1); ?> type="checkbox" class="checkbox">
2840
  <label for="<?php echo self::$opt_schemaorg; ?>">
2841
- <b>(PRO)</b> <b class="chktitle">Video SEO Tags:</b> Update your YouTube embeds with Google, Bing, and Yahoo friendly video SEO markup.
2842
  </label>
2843
  <span id="boxschemaorg">
2844
  <span class="apikey-msg">
@@ -2851,7 +2929,7 @@ class YouTubePrefs
2851
  </span>
2852
  </span>
2853
  <span class="apikey-video">
2854
- <iframe width="384" height="216" src="https://www.youtube.com/embed/2vmBACVETf4?rel=0" frameborder="0" allowfullscreen></iframe>
2855
  </span>
2856
  </span>
2857
  </p>
@@ -2913,7 +2991,7 @@ class YouTubePrefs
2913
  <option value="">Gallery Style</option>
2914
  </select>
2915
  <label>
2916
- <b>(PRO)</b> <b class="chktitle">Alternate Gallery Styling: <sup class="orange">NEW</sup></b> <span class="pronon">(PRO Users)</span>
2917
  Switch from the grid style of the FREE version to another gallery style. Right now, we provide a vertical (single column) and horizontal (single row) list style as alternatives to the grid, with more designs coming. These current alternatives were inspired by the standard YouTube playlist player's "table of contents," except our gallery's video lists are always visible and shown under the playing video.
2918
  <a target="_blank" href="<?php echo self::$epbase ?>/responsive-youtube-playlist-channel-gallery-for-wordpress.aspx">Read more here &raquo;</a>
2919
  </label>
@@ -2921,13 +2999,25 @@ class YouTubePrefs
2921
 
2922
  <div class="hr"></div>
2923
  <p>
 
2924
  <input disabled type="checkbox" class="checkbox">
2925
  <label>
2926
  <b class="chktitle">Show Gallery Descriptions (for vertical list styling): </b> <span class="pronon">(PRO Users)</span>
2927
- For the vertical list layout, this option will show full descriptions with each thumbnail (other layouts don't have enough room).
 
 
 
 
 
 
 
 
 
 
 
 
2928
  </label>
2929
  </p>
2930
-
2931
 
2932
  <div class="hr"></div>
2933
  <p>
@@ -2938,7 +3028,7 @@ class YouTubePrefs
2938
  </label>
2939
  <div class="indent-option">
2940
  <label>
2941
- <b class="chktitle">Cache Liftime (hours): </b>
2942
  <input disabled value="24" type="number">
2943
  Tip: If your pages rarely change, you may wish to set this to a much higher value than 24 hours.
2944
  </label>
@@ -2950,7 +3040,7 @@ class YouTubePrefs
2950
  <p>
2951
  <input disabled type="checkbox" class="checkbox">
2952
  <label>
2953
- <b class="chktitle">Video SEO Tags:</b> <span class="pronon">(PRO Users)</span> Update your YouTube embeds with Google, Bing, and Yahoo friendly video SEO markup.
2954
  </label>
2955
  </p>
2956
  <div class="hr"></div>
@@ -2989,7 +3079,7 @@ class YouTubePrefs
2989
  ?>
2990
  <div class="clearboth"></div>
2991
  </div>
2992
- <?php // self::save_changes_button(); ?>
2993
 
2994
  <hr>
2995
 
@@ -3206,7 +3296,7 @@ class YouTubePrefs
3206
  <a href="#jumpdefaults">Defaults</a>
3207
  <a href="#jumpcompat">Compatibility</a>
3208
  <a href="#jumpgallery">Gallery Settings</a>
3209
- <a href="#jumpoverride">How To Override Defaults</a>
3210
  <a target="_blank" href="<?php echo self::$epbase . "/dashboard/pro-easy-video-analytics.aspx?ref=protab" ?>" style="border-color: #888888;">Upgrade?</a>
3211
  <a href="#jumpsupport">Support</a>
3212
  </div>
@@ -3360,6 +3450,20 @@ class YouTubePrefs
3360
  });
3361
 
3362
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3363
  jQuery('#<?php echo self::$opt_migrate; ?>').change(function ()
3364
  {
3365
  if (jQuery(this).is(":checked"))
@@ -3602,7 +3706,8 @@ class YouTubePrefs
3602
  'eppathtoscripts' => plugins_url('scripts/', __FILE__),
3603
  'epresponsiveselector' => self::get_responsiveselector(),
3604
  'epdovol' => true,
3605
- 'version' => self::$alloptions[self::$opt_version]
 
3606
  ));
3607
  }
3608
 
@@ -3626,6 +3731,18 @@ class YouTubePrefs
3626
  return str_replace('<script', '<script data-cfasync="false" ', $tag);
3627
  }
3628
 
 
 
 
 
 
 
 
 
 
 
 
 
3629
  public static function get_responsiveselector()
3630
  {
3631
  $responsiveselector = '[]';
@@ -3635,7 +3752,14 @@ class YouTubePrefs
3635
  }
3636
  if (self::$alloptions[self::$opt_responsive] == 1)
3637
  {
3638
- $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\']"]';
 
 
 
 
 
 
 
3639
  }
3640
  return $responsiveselector;
3641
  }
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: 10.9
7
  Author: EmbedPlus Team
8
  Author URI: http://www.embedplus.com
9
  */
32
  class YouTubePrefs
33
  {
34
 
35
+ public static $version = '10.9';
36
  public static $opt_version = 'version';
37
  public static $optembedwidth = null;
38
  public static $optembedheight = null;
69
  public static $opt_pro = 'pro';
70
  public static $opt_oldspacing = 'oldspacing';
71
  public static $opt_responsive = 'responsive';
72
+ public static $opt_responsive_all = 'responsive_all';
73
  public static $opt_origin = 'origin';
74
  public static $opt_widgetfit = 'widgetfit';
75
+ public static $opt_evselector_light = 'evselector_light';
76
  public static $opt_defaultdims = 'defaultdims';
77
  public static $opt_defaultwidth = 'width';
78
  public static $opt_defaultheight = 'height';
99
  public static $opt_gallery_customprev = 'gallery_customprev';
100
  public static $opt_gallery_customnext = 'gallery_customnext';
101
  public static $opt_gallery_showdsc = 'gallery_showdsc';
102
+ public static $opt_gallery_thumbcrop = 'gallery_thumbcrop';
103
  public static $opt_admin_off_scripts = 'admin_off_scripts';
104
  public static $opt_alloptions = 'youtubeprefs_alloptions';
105
  public static $alloptions = null;
185
  }
186
 
187
  add_action('wp_enqueue_scripts', array('YouTubePrefs', 'ytprefsscript'), 100);
188
+ add_action('wp_enqueue_scripts', array('YouTubePrefs', 'fitvids'), 101);
189
 
190
 
191
 
257
  #wpadminbar {display:none;}
258
  html.wp-toolbar {padding: 0px;}
259
  #footer, #wpfooter, .auto-fold #wpfooter {display: none;}
260
+ #wpfooter {clear: both}
261
  .acctitle {background-color: #dddddd; border-radius: 5px; padding: 7px 15px 7px 15px; cursor: pointer; margin: 10px; font-weight: bold; font-size: 12px;}
262
  .acctitle:hover {background-color: #cccccc;}
263
  .accbox {display: none; position: relative; margin: 5px 8px 30px 15px; clear: both; line-height: 180%;}
624
  eppathtoscripts: "<?php echo plugins_url('scripts/', __FILE__); ?>",
625
  epresponsiveselector: <?php echo self::get_responsiveselector(); ?>,
626
  version: "<?php echo self::$alloptions[self::$opt_version] ?>",
627
+ epdovol: true,
628
+ evselector: '<?php echo self::get_evselector(); ?>'
629
  };
630
  </script>
631
  <?php
632
  }
633
  }
634
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
635
  public static function fitvids()
636
  {
637
  $loggedin = current_user_can('edit_posts');
638
  if (!($loggedin && self::$alloptions[self::$opt_admin_off_scripts]))
639
  {
640
+ wp_enqueue_script('__ytprefsfitvids__', plugins_url('scripts/fitvids.min.js', __FILE__), array('__ytprefs__'), false, true);
641
  }
642
  }
643
 
669
  $_controls = 2;
670
  $_oldspacing = 1;
671
  $_responsive = 0;
672
+ $_responsive_all = 1;
673
  $_widgetfit = 1;
674
+ $_evselector_light = 0;
675
  $_schemaorg = 0;
676
  $_ftpostimg = 0;
677
  $_spdc = 0;
698
  $_gallery_pagesize = 15;
699
  $_gallery_style = 'grid';
700
  $_gallery_showdsc = 0;
701
+ $_gallery_thumbcrop = 'box';
702
  $_debugmode = 0;
703
  $_admin_off_scripts = 0;
704
  $_old_script_method = 0;
740
  $_autohide = self::tryget($arroptions, self::$opt_autohide, 2);
741
  $_oldspacing = self::tryget($arroptions, self::$opt_oldspacing, 1);
742
  $_responsive = self::tryget($arroptions, self::$opt_responsive, 0);
743
+ $_responsive_all = self::tryget($arroptions, self::$opt_responsive_all, 1);
744
  $_widgetfit = self::tryget($arroptions, self::$opt_widgetfit, 1);
745
+ $_evselector_light = self::tryget($arroptions, self::$opt_evselector_light, 0);
746
  $_schemaorg = self::tryget($arroptions, self::$opt_schemaorg, 0);
747
  $_ftpostimg = self::tryget($arroptions, self::$opt_ftpostimg, 0);
748
  $_spdc = self::tryget($arroptions, self::$opt_spdc, 0);
760
  $_gallery_scrolloffset = self::tryget($arroptions, self::$opt_gallery_scrolloffset, 20);
761
  $_gallery_showtitle = self::tryget($arroptions, self::$opt_gallery_showtitle, 1);
762
  $_gallery_style = self::tryget($arroptions, self::$opt_gallery_style, 'grid');
763
+ $_gallery_thumbcrop = self::tryget($arroptions, self::$opt_gallery_thumbcrop, 'box');
764
  $_gallery_customarrows = self::tryget($arroptions, self::$opt_gallery_customarrows, $_gallery_customarrows);
765
  $_gallery_customnext = self::tryget($arroptions, self::$opt_gallery_customnext, $_gallery_customnext);
766
  $_gallery_customprev = self::tryget($arroptions, self::$opt_gallery_customprev, $_gallery_customprev);
804
  self::$opt_controls => $_controls,
805
  self::$opt_oldspacing => $_oldspacing,
806
  self::$opt_responsive => $_responsive,
807
+ self::$opt_responsive_all => $_responsive_all,
808
  self::$opt_widgetfit => $_widgetfit,
809
+ self::$opt_evselector_light => $_evselector_light,
810
  self::$opt_schemaorg => $_schemaorg,
811
  self::$opt_ftpostimg => $_ftpostimg,
812
  self::$opt_spdc => $_spdc,
827
  self::$opt_gallery_customprev => $_gallery_customprev,
828
  self::$opt_gallery_showdsc => $_gallery_showdsc,
829
  self::$opt_gallery_style => $_gallery_style,
830
+ self::$opt_gallery_thumbcrop => $_gallery_thumbcrop,
831
  self::$opt_gallery_pagesize => $_gallery_pagesize,
832
  self::$opt_debugmode => $_debugmode,
833
  self::$opt_admin_off_scripts => $_admin_off_scripts,
933
  return self::get_html($m, false);
934
  }
935
 
 
936
  public static function get_gallery_page($options)
937
  {
938
  $options->pageSize = min(intval($options->pageSize), 50);
939
  $options->columns = intval($options->columns);
940
  $options->showTitle = intval($options->showTitle);
941
  $options->showDsc = intval($options->showDsc);
942
+ $options->thumbcrop = sanitize_html_class($options->thumbcrop);
943
+ $options->style = sanitize_html_class($options->style);
944
 
945
  if (empty($options->apiKey))
946
  {
955
  $apiEndpoint .= '&pageToken=' . $options->pageToken;
956
  }
957
  $spdckey = '';
958
+ if (self::$alloptions[self::$opt_pro] && strlen(trim(self::$alloptions[self::$opt_pro])) > 8 && self::$alloptions[self::$opt_spdc] == 1)
959
  {
960
  try
961
  {
962
+ $spdckey = self::$spdcprefix . '_' . md5($apiEndpoint . $options->columns . $options->style . $options->showTitle . $options->showDsc . $options->thumbcrop);
963
  $spdcval = get_transient($spdckey);
964
  if (!empty($spdcval))
965
  {
1011
  }
1012
 
1013
  $cnt = 0;
1014
+ $colclass = '';
1015
+ if (in_array($options->style, array('grid', '')))
1016
+ {
1017
+ $colclass = ' epyt-cols-' . $options->columns . ' ';
1018
+ }
1019
+
1020
+ $cropclass = '';
1021
+ if (!in_array($options->thumbcrop, array('box', '')))
1022
+ {
1023
+ $cropclass = ' epyt-thumb-' . $options->thumbcrop . ' ';
1024
+ }
1025
+
1026
+ $code.= '<div class="epyt-gallery-allthumbs ' . $cropclass . $colclass . '">';
1027
  if (isset($jsonResult->items) && $jsonResult->items != null && is_array($jsonResult->items))
1028
  {
1029
 
1097
  . '" data-style="' . esc_attr($options->style)
1098
  . '" data-columns="' . intval($options->columns)
1099
  . '" data-showtitle="' . intval($options->showTitle)
1100
+ . ((self::$alloptions[self::$opt_pro] && strlen(trim(self::$alloptions[self::$opt_pro])) > 8 && $options->style == 'listview' && $options->showDsc) ? '" data-showdsc="' . intval($options->showDsc) : '')
1101
+ . ((self::$alloptions[self::$opt_pro] && strlen(trim(self::$alloptions[self::$opt_pro])) > 8 && !in_array($options->thumbcrop, array('box', ''))) ? '" data-thumbcrop="' . $options->thumbcrop : '')
1102
  . '"><div class="arrow">&laquo;</div> <div>' . $txtprev . '</div></div>';
1103
  }
1104
 
1116
  . '" data-columns="' . intval($options->columns)
1117
  . '" data-showtitle="' . intval($options->showTitle)
1118
  . ((self::$alloptions[self::$opt_pro] && strlen(trim(self::$alloptions[self::$opt_pro])) > 0 && $options->style == 'listview' && $options->showDsc) ? '" data-showdsc="' . intval($options->showDsc) : '')
1119
+ . ((self::$alloptions[self::$opt_pro] && strlen(trim(self::$alloptions[self::$opt_pro])) > 8 && !in_array($options->thumbcrop, array('box', ''))) ? '" data-thumbcrop="' . $options->thumbcrop : '')
1120
  . '"><div>' . $txtnext . '</div> <div class="arrow">&raquo;</div></div>';
1121
  }
1122
+ $pagination .= '<div class="epyt-loader"><img width="16" height="11" src="' . plugins_url('images/gallery-page-loader.gif', __FILE__) . '"></div>';
1123
  }
1124
  $pagination .= '</div>';
1125
 
1160
 
1161
  $code .= '<div data-videoid="' . $escId . '" class="epyt-gallery-thumb ' . $styleclass . '" ' . $rawstyle . '>';
1162
  $code .= '<div class="epyt-gallery-img-box"><div class="epyt-gallery-img" style="background-image: url(' . esc_attr($thumb->img) . ')">' .
1163
+ '<div class="epyt-gallery-playhover"><img class="epyt-play-img" width="30" height="23" src="' . plugins_url('images/playhover.png', __FILE__) . '" /><div class="epyt-gallery-playcrutch"></div></div>' .
1164
  '</div></div>';
1165
  if ($options->style != 'carousel' && !empty($thumb->title))
1166
  {
1372
  $gallery_options->showTitle = intval($finalparams[self::$opt_gallery_showtitle]);
1373
  $gallery_options->showDsc = intval($finalparams[self::$opt_gallery_showdsc]);
1374
  $gallery_options->style = $finalparams[self::$opt_gallery_style];
1375
+ $gallery_options->thumbcrop = $finalparams[self::$opt_gallery_thumbcrop];
1376
  $gallery_options->apiKey = self::$alloptions[self::$opt_apikey];
1377
 
1378
  $dynsrc = 'data-ep-gallery';
1386
 
1387
  $code1 = '<iframe ' . $dyntype . $centercode . ' id="_ytid_' . rand(10000, 99999) . '" width="' . self::$defaultwidth . '" height="' . self::$defaultheight .
1388
  '" ' . $dynsrc . 'src="//www.' . $youtubebaseurl . '.com/embed/' . $videoidoutput . '?';
1389
+ $code2 = '" frameborder="0" class="__youtube_prefs__' . ($iscontent ? '' : ' __youtube_prefs_widget__') .
1390
+ '"' . $voloutput . $acctitle . ' allowfullscreen ></iframe>' . $schemaorgoutput;
1391
 
1392
  $origin = '';
1393
 
1696
 
1697
 
1698
  $just_id = $linkparams['v'];
1699
+ $ftimgurl = "https://img.youtube.com/vi/" . $just_id . "/maxresdefault.jpg";
1700
+ $ftimgid = self::media_sideload($ftimgurl, $post->ID, sanitize_title(preg_replace("/[^a-zA-Z0-9\s]/", "-", $post->title)));
1701
+
1702
+ if (!ftimgid || is_wp_error($ftimgid))
1703
+ {
1704
+ $ftimgurl = null;
1705
+ $ftimgid = 0;
1706
+ if ($just_id)
 
 
 
 
1707
  {
1708
+ require_once( ABSPATH . WPINC . '/class-oembed.php' );
1709
+ $oembed = _wp_oembed_get_object();
1710
+ $args = array();
1711
+ $args['width'] = 1920;
1712
+ $args['height'] = 1080;
1713
+ $args['discover'] = false;
1714
+ $odata = $oembed->fetch('https://www.youtube.com/oembed', 'http://youtube.com/watch?v=' . $just_id, $args);
1715
+
1716
+ if ($odata)
1717
+ {
1718
+ $ftimgurl = $odata->thumbnail_url;
1719
+ }
1720
  }
 
1721
 
1722
+ $ftimgid = $ftimgurl && !is_wp_error($ftimgurl) ? self::media_sideload($ftimgurl, $post->ID, sanitize_title(preg_replace("/[^a-zA-Z0-9\s]/", "-", $post->title))) : 0;
1723
 
1724
+ if (!$ftimgid || is_wp_error($ftimgid))
1725
+ {
1726
+ return;
1727
+ }
1728
  }
 
1729
  set_post_thumbnail($post->ID, $ftimgid);
1730
  }
1731
  }
2145
  $new_options[self::$opt_oldspacing] = self::postchecked(self::$opt_oldspacing) ? 1 : 0;
2146
  $new_options[self::$opt_responsive] = self::postchecked(self::$opt_responsive) ? 1 : 0;
2147
  $new_options[self::$opt_widgetfit] = self::postchecked(self::$opt_widgetfit) ? 1 : 0;
2148
+ $new_options[self::$opt_evselector_light] = self::postchecked(self::$opt_evselector_light) ? 1 : 0;
2149
  $new_options[self::$opt_schemaorg] = self::postchecked(self::$opt_schemaorg) ? 1 : 0;
2150
  $new_options[self::$opt_ftpostimg] = self::postchecked(self::$opt_ftpostimg) ? 1 : 0;
2151
  $new_options[self::$opt_spdc] = self::postchecked(self::$opt_spdc) ? 1 : 0;
2179
  }
2180
  $new_options[self::$opt_defaultheight] = $_defaultheight;
2181
 
2182
+ $_responsive_all = 1;
2183
+ try
2184
+ {
2185
+ $_responsive_all = is_numeric(trim($_POST[self::$opt_responsive_all])) ? intval(trim($_POST[self::$opt_responsive_all])) : $_responsive_all;
2186
+ }
2187
+ catch (Exception $ex)
2188
+ {
2189
+
2190
+ }
2191
+ $new_options[self::$opt_responsive_all] = $_responsive_all;
2192
+
2193
  $_vol = '';
2194
  try
2195
  {
2247
  $new_options[self::$opt_gallery_style] = $_gallery_style;
2248
 
2249
 
2250
+ $_gallery_thumbcrop = 'box';
2251
+ try
2252
+ {
2253
+ $_gallery_thumbcrop = trim(str_replace(array(' ', "'", '"'), array('', '', ''), strip_tags($_POST[self::$opt_gallery_thumbcrop])));
2254
+ }
2255
+ catch (Exception $ex)
2256
+ {
2257
+ $_gallery_thumbcrop = 'box';
2258
+ }
2259
+ $new_options[self::$opt_gallery_thumbcrop] = $_gallery_thumbcrop;
2260
+
2261
+
2262
  $_gallery_custom_prev = 'Prev';
2263
  try
2264
  {
2453
  .indent-option {margin-left: 25px;}
2454
  #boxschemaorg {font-weight: bold; padding: 7px 0; <?php echo $all[self::$opt_schemaorg] ? 'display: block;' : 'display: none;' ?>}
2455
  #boxmigratelist { <?php echo $all[self::$opt_migrate] ? '' : 'display: none;' ?>}
2456
+ #boxresponsive_all { <?php echo $all[self::$opt_responsive] ? '' : 'display: none;' ?> padding-left: 25px; border-left: 5px solid rgba(100, 100, 100,.1); margin-left: 5px;}
2457
  .apikey-msg {display: inline-block; width: 45%; vertical-align: top;}
2458
  .apikey-video{margin-left: 3%; display: inline-block; width: 50%; position: relative; padding-top: 29%}
2459
  .apikey-video iframe{display: block; width: 100%; height: 100%; position: absolute; top: 0; left: 0;}
2480
  <a href="#jumpdefaults">Defaults</a>
2481
  <a href="#jumpcompat">Compatibility</a>
2482
  <a href="#jumpgallery">Gallery Settings</a>
2483
+ <a href="#jumpoverride">Override Defaults</a>
2484
  <a target="_blank" href="<?php echo self::$epbase . "/dashboard/pro-easy-video-analytics.aspx?ref=protab" ?>" style="border-color: #888888;">Upgrade?</a>
2485
  <a href="#jumpsupport">Support</a>
2486
  </div>
2544
  <p>
2545
  <?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.") ?>
2546
  </p>
2547
+ <?php // self::save_changes_button(); ?>
2548
 
2549
  <div class="ytindent chx">
2550
  <p>
2611
  <p>
2612
  <input name="<?php echo self::$opt_responsive; ?>" id="<?php echo self::$opt_responsive; ?>" <?php checked($all[self::$opt_responsive], 1); ?> type="checkbox" class="checkbox">
2613
  <label for="<?php echo self::$opt_responsive; ?>"><?php _e('<b class="chktitle">Responsive Video Sizing:</b> Make your videos responsive so that they dynamically fit in all screen sizes (smart phone, PC and tablet). NOTE: While this is checked, any custom hardcoded widths and heights you may have set will dynamically change too. <b>Do not check this if your theme already handles responsive video sizing.</b>') ?></label>
2614
+ <div id="boxresponsive_all">
2615
+ <input type="radio" name="<?php echo self::$opt_responsive_all; ?>" id="<?php echo self::$opt_responsive_all; ?>1" value="1" <?php checked($all[self::$opt_responsive_all], 1); ?> >
2616
+ <label for="<?php echo self::$opt_responsive_all; ?>1">Responsive for all YouTube videos</label> &nbsp;&nbsp;
2617
+ <input type="radio" name="<?php echo self::$opt_responsive_all; ?>" id="<?php echo self::$opt_responsive_all; ?>0" value="0" <?php checked($all[self::$opt_responsive_all], 0); ?> >
2618
+ <label for="<?php echo self::$opt_responsive_all; ?>0">Responsive for only videos embedded via this plugin</label>
2619
+ </div>
2620
  </p>
2621
  <p>
2622
  <input name="<?php echo self::$opt_widgetfit; ?>" id="<?php echo self::$opt_widgetfit; ?>" <?php checked($all[self::$opt_widgetfit], 1); ?> type="checkbox" class="checkbox">
2638
  <p>
2639
  <input name="<?php echo self::$opt_nocookie; ?>" id="<?php echo self::$opt_nocookie; ?>" <?php checked($all[self::$opt_nocookie], 1); ?> type="checkbox" class="checkbox">
2640
  <span id="boxnocookie">
2641
+ Uncheck this option if you are planning to embed galleries and playlists on your site. Furthermore, videos on mobile devices may have problems if you leave this checked.
2642
  </span>
2643
  <label for="<?php echo self::$opt_nocookie; ?>">
2644
  <b class="chktitle">No Cookies:</b> Prevent YouTube from leaving tracking cookies on your visitors browsers unless they actual play the videos. This is coded to apply this behavior on links in your past post as well. <b>NOTE: Research shows that YouTube's support of Do Not Track can be error-prone. </b>
2712
  <p>
2713
  <input name="<?php echo self::$opt_old_script_method; ?>" id="<?php echo self::$opt_old_script_method; ?>" <?php checked($all[self::$opt_old_script_method], 1); ?> type="checkbox" class="checkbox">
2714
  <label for="<?php echo self::$opt_old_script_method; ?>">
2715
+ <b class="chktitle">Use Legacy Scripts: </b>
2716
  This is a legacy option for users with theme issues that require backwards compatibility (v.10.5 or earlier). It may also help with caching plugin or CDN plugin issues.
2717
  </label>
2718
  </p>
2727
  <p>
2728
  <input name="<?php echo self::$opt_migrate; ?>" id="<?php echo self::$opt_migrate; ?>" <?php checked($all[self::$opt_migrate], 1); ?> type="checkbox" class="checkbox">
2729
  <label for="<?php echo self::$opt_migrate; ?>">
2730
+ <b class="chktitle">Migrate Shortcodes: </b> Inherit other shortcodes.
2731
  </label>
2732
  <div id="boxmigratelist">
2733
  <ul>
2743
  <b class="chktitle">Legacy Spacing:</b> Continue the spacing style from version 4.0 and older. Those versions required you to manually add spacing above and below your video. Unchecking this will automatically add the spacing.
2744
  </label>
2745
  </p>
2746
+ <p>
2747
+ <input name="<?php echo self::$opt_evselector_light; ?>" id="<?php echo self::$opt_evselector_light; ?>" <?php checked($all[self::$opt_evselector_light], 1); ?> type="checkbox" class="checkbox">
2748
+ <label for="<?php echo self::$opt_evselector_light; ?>">
2749
+ <b class="chktitle">Theme Video Problems: <sup class="orange bold">NEW</sup></b>
2750
+ Check this option if you're having issues with autoplayed videos or background videos etc. that have been generated by your theme.
2751
+ </label>
2752
+ </p>
2753
  <p>
2754
  <input name="<?php echo self::$opt_debugmode; ?>" id="<?php echo self::$opt_debugmode; ?>" <?php checked($all[self::$opt_debugmode], 1); ?> type="checkbox" class="checkbox">
2755
  <label for="<?php echo self::$opt_debugmode; ?>">
2756
+ <b class="chktitle">Debug Mode: </b> If you ask for support, we may ask you to turn on debug mode here.
2757
  It may print out some diagnostic info so that we can help you solve your issue.
2758
  </label>
2759
  </p>
2760
+
2761
  </div>
2762
  <div class="jumper" id="jumpgallery"></div>
2763
  <h3 class="sect">Gallery Settings and Directions<sup class="orange bold">NEW</sup> <a href="#top" class="totop">&#9650; top</a></h3>
2764
  <img class="ssgallery" src="<?php echo plugins_url('images/ssgallery.png', __FILE__) ?>">
2765
  <p>
2766
  <a target="_blank" href="<?php echo self::$epbase ?>/responsive-youtube-playlist-channel-gallery-for-wordpress.aspx">You can now make playlist embeds (and channel-playlist embeds) have a gallery layout &raquo;</a>. <strong>First, you must obtain your YouTube API key</strong>.
2767
+ Don't worry, it's an easy process. Just <a href="https://www.youtube.com/watch?v=px8LvNIVblg" target="_blank">click this link &raquo;</a> and follow the video on that page to get your API key. Then paste it in the box below, and click the "Save Changes" button.
2768
  </p>
2769
+ <!-- <p>
2770
  Simply add the following parameter to the end of your playlist url:
2771
  </p>
2772
  <p><code>&layout=gallery</code></p>
2776
  </p>
2777
  <p class="smallnote">
2778
  Note: The PRO wizard has steps to fully create playlist, channel, and gallery codes like the above.
2779
+ </p>-->
2780
  <p>
2781
  Below are the settings for galleries:
2782
  </p>
2784
  <p>
2785
  <b class="chktitle">YouTube API Key:</b>
2786
  <input type="text" name="<?php echo self::$opt_gallery_apikey; ?>" id="<?php echo self::$opt_gallery_apikey; ?>" value="<?php echo trim($all[self::$opt_apikey]); ?>" class="textinput" style="width: 250px;">
2787
+ Required so your site can get the thumbnails, title text, and other content from YouTube’s servers that used to render galleries. <a href="https://www.youtube.com/watch?v=px8LvNIVblg" target="_blank">Click this link &raquo;</a> and follow the video to the right to get your API key.
2788
  </p>
2789
  <p>
2790
  <label for="<?php echo self::$opt_gallery_pagesize; ?>"><b class="chktitle">Gallery Page Size:</b></label>
2826
  <input name="<?php echo self::$opt_gallery_showtitle; ?>" id="<?php echo self::$opt_gallery_showtitle; ?>" <?php checked($all[self::$opt_gallery_showtitle], 1); ?> type="checkbox" class="checkbox">
2827
  <label for="<?php echo self::$opt_gallery_showtitle; ?>"><b class="chktitle">Show Thumbnail Title:</b> Show titles with each thumbnail.</label>
2828
  </p>
2829
+ <div class="smallnote pad20">
2830
+ <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:
2831
+ <ol>
2832
+ <li>a gallery from an entire YouTube channel, and</li>
2833
+ <li>a gallery from a specific playlist</li>
2834
+ </ol>
2835
+ We advise that you <a href="https://www.youtube.com/watch?v=XvFL-Rr-2Qo" target="_blank">watch the video here &raquo;</a> with YouTube.com annotations turned on so you don't miss important steps.
2836
+ The PRO wizard is an alternate way to fully create playlist, channel, and gallery codes.
2837
+ </div>
2838
 
2839
  </div>
2840
 
2841
+ <?php // self::save_changes_button(); ?>
2842
 
2843
  <div class="upgchecks">
2844
  <h3 class="sect">PRO Features</h3>
2845
  <?php
2846
+ if ($all[self::$opt_pro] && strlen(trim($all[self::$opt_pro])) > 8)
2847
  {
2848
  ?>
2849
  <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>
2862
  <a target="_blank" href="<?php echo self::$epbase ?>/responsive-youtube-playlist-channel-gallery-for-wordpress.aspx">Read more here &raquo;</a>
2863
  </label>
2864
  </p>
2865
+
2866
  <div class="hr"></div>
2867
  <p>
2868
  <img class="ssaltgallery" src="<?php echo plugins_url('images/ssverticallayout.png', __FILE__) ?>" />
2869
  <input name="<?php echo self::$opt_gallery_showdsc; ?>" id="<?php echo self::$opt_gallery_showdsc; ?>" <?php checked($all[self::$opt_gallery_showdsc], 1); ?> type="checkbox" class="checkbox">
2870
  <label for="<?php echo self::$opt_gallery_showdsc; ?>">
2871
  <b>(PRO)</b> <b class="chktitle">Show Gallery Descriptions (for vertical list styling): </b>
2872
+ For the vertical list layout, this option will show full video descriptions (taken directly from YouTube.com) with each thumbnail. Note: these descriptions only apply the vertical list layout; other layouts don't have enough room.
2873
+ </label>
2874
+ </p>
2875
+ <div class="hr"></div>
2876
+ <p>
2877
+ <img class="ssaltgallery" src="<?php echo plugins_url('images/ssaltgallerycircles.jpg', __FILE__) ?>" />
2878
+ <?php $cleancrop = trim($all[self::$opt_gallery_thumbcrop]); ?>
2879
+ <select name="<?php echo self::$opt_gallery_thumbcrop; ?>" id="<?php echo self::$opt_gallery_thumbcrop; ?>" >
2880
+ <option value="">Thumbnail Shape</option>
2881
+ <option value="box" <?php echo 'box' === $cleancrop ? 'selected' : '' ?> >Rectangle (default)</option>
2882
+ <option value="portal" <?php echo 'portal' === $cleancrop ? 'selected' : '' ?> >Circular</option>
2883
+ </select>
2884
+ <label for="<?php echo self::$opt_gallery_thumbcrop; ?>">
2885
+ <b>(PRO)</b> <b class="chktitle">Gallery Thumbnail Shape: <sup class="orange">NEW</sup></b></b>
2886
+ Differentiate your gallery by showing different thumbnail shapes. We currently offer rectangle and circle shapes.
2887
  </label>
2888
  </p>
2889
  <div class="hr"></div>
2916
  <p>
2917
  <input name="<?php echo self::$opt_schemaorg; ?>" id="<?php echo self::$opt_schemaorg; ?>" <?php checked($all[self::$opt_schemaorg], 1); ?> type="checkbox" class="checkbox">
2918
  <label for="<?php echo self::$opt_schemaorg; ?>">
2919
+ <b>(PRO)</b> <b class="chktitle">Video SEO Tags:</b> Update your YouTube embeds with Google, Bing, and Yahoo friendly schema markup for videos.
2920
  </label>
2921
  <span id="boxschemaorg">
2922
  <span class="apikey-msg">
2929
  </span>
2930
  </span>
2931
  <span class="apikey-video">
2932
+ <iframe width="384" height="216" src="https://www.youtube.com/embed/px8LvNIVblg?rel=0" frameborder="0" allowfullscreen></iframe>
2933
  </span>
2934
  </span>
2935
  </p>
2991
  <option value="">Gallery Style</option>
2992
  </select>
2993
  <label>
2994
+ <b class="chktitle">Alternate Gallery Styling: <sup class="orange">NEW</sup></b> <span class="pronon">(PRO Users)</span>
2995
  Switch from the grid style of the FREE version to another gallery style. Right now, we provide a vertical (single column) and horizontal (single row) list style as alternatives to the grid, with more designs coming. These current alternatives were inspired by the standard YouTube playlist player's "table of contents," except our gallery's video lists are always visible and shown under the playing video.
2996
  <a target="_blank" href="<?php echo self::$epbase ?>/responsive-youtube-playlist-channel-gallery-for-wordpress.aspx">Read more here &raquo;</a>
2997
  </label>
2999
 
3000
  <div class="hr"></div>
3001
  <p>
3002
+ <img class="ssaltgallery" src="<?php echo plugins_url('images/ssverticallayout.png', __FILE__) ?>" />
3003
  <input disabled type="checkbox" class="checkbox">
3004
  <label>
3005
  <b class="chktitle">Show Gallery Descriptions (for vertical list styling): </b> <span class="pronon">(PRO Users)</span>
3006
+ For the vertical list layout, this option will show full video descriptions (taken directly from YouTube.com) with each thumbnail. Note: these descriptions only apply the vertical list layout; other layouts don't have enough room.
3007
+ </label>
3008
+ </p>
3009
+ <div class="hr"></div>
3010
+ <p>
3011
+ <img class="ssaltgallery" src="<?php echo plugins_url('images/ssaltgallerycircles.jpg', __FILE__) ?>" />
3012
+ <select disabled>
3013
+ <option value="">Select Thumbnail Shape</option>
3014
+ </select>
3015
+ <label>
3016
+ <b class="chktitle">Gallery Thumbnail Shape: <sup class="orange">NEW</sup></b> <span class="pronon">(PRO Users)</span>
3017
+ Differentiate your gallery by showing different thumbnail shapes. We currently offer rectangle and circle shapes.
3018
+ <a target="_blank" href="<?php echo self::$epbase ?>/responsive-youtube-playlist-channel-gallery-for-wordpress.aspx">Read more here &raquo;</a>
3019
  </label>
3020
  </p>
 
3021
 
3022
  <div class="hr"></div>
3023
  <p>
3028
  </label>
3029
  <div class="indent-option">
3030
  <label>
3031
+ <b class="chktitle">Cache Lifetime (hours): </b>
3032
  <input disabled value="24" type="number">
3033
  Tip: If your pages rarely change, you may wish to set this to a much higher value than 24 hours.
3034
  </label>
3040
  <p>
3041
  <input disabled type="checkbox" class="checkbox">
3042
  <label>
3043
+ <b class="chktitle">Video SEO Tags:</b> <span class="pronon">(PRO Users)</span> Update your YouTube embeds with Google, Bing, and Yahoo friendly schema markup for videos.
3044
  </label>
3045
  </p>
3046
  <div class="hr"></div>
3079
  ?>
3080
  <div class="clearboth"></div>
3081
  </div>
3082
+ <?php // self::save_changes_button(); ?>
3083
 
3084
  <hr>
3085
 
3296
  <a href="#jumpdefaults">Defaults</a>
3297
  <a href="#jumpcompat">Compatibility</a>
3298
  <a href="#jumpgallery">Gallery Settings</a>
3299
+ <a href="#jumpoverride">Override Defaults</a>
3300
  <a target="_blank" href="<?php echo self::$epbase . "/dashboard/pro-easy-video-analytics.aspx?ref=protab" ?>" style="border-color: #888888;">Upgrade?</a>
3301
  <a href="#jumpsupport">Support</a>
3302
  </div>
3450
  });
3451
 
3452
 
3453
+ jQuery('#<?php echo self::$opt_responsive; ?>').change(function ()
3454
+ {
3455
+ if (jQuery(this).is(":checked"))
3456
+ {
3457
+ jQuery("#boxresponsive_all").show(500);
3458
+ }
3459
+ else
3460
+ {
3461
+ jQuery("#boxresponsive_all").hide(500);
3462
+ }
3463
+ });
3464
+
3465
+
3466
+
3467
  jQuery('#<?php echo self::$opt_migrate; ?>').change(function ()
3468
  {
3469
  if (jQuery(this).is(":checked"))
3706
  'eppathtoscripts' => plugins_url('scripts/', __FILE__),
3707
  'epresponsiveselector' => self::get_responsiveselector(),
3708
  'epdovol' => true,
3709
+ 'version' => self::$alloptions[self::$opt_version],
3710
+ 'evselector' => self::get_evselector()
3711
  ));
3712
  }
3713
 
3731
  return str_replace('<script', '<script data-cfasync="false" ', $tag);
3732
  }
3733
 
3734
+ public static function get_evselector()
3735
+ {
3736
+ $evselector = 'iframe.__youtube_prefs__[src], iframe[src*="youtube.com/embed/"], iframe[src*="youtube-nocookie.com/embed/"]';
3737
+
3738
+ if (self::$alloptions[self::$opt_evselector_light] == 1)
3739
+ {
3740
+ $evselector = 'iframe.__youtube_prefs__[src]';
3741
+ }
3742
+
3743
+ return $evselector;
3744
+ }
3745
+
3746
  public static function get_responsiveselector()
3747
  {
3748
  $responsiveselector = '[]';
3752
  }
3753
  if (self::$alloptions[self::$opt_responsive] == 1)
3754
  {
3755
+ if (self::$alloptions[self::$opt_responsive_all] == 1)
3756
+ {
3757
+ $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\']"]';
3758
+ }
3759
+ else
3760
+ {
3761
+ $responsiveselector = '["iframe.__youtube_prefs__"]';
3762
+ }
3763
  }
3764
  return $responsiveselector;
3765
  }