YouTube - Version 13.1.1

Version Description

Download this release

Release Info

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

Code changes from version 13.1 to 13.1.1

readme.txt CHANGED
@@ -4,7 +4,7 @@ Plugin Name: YouTube Embed
4
  Tags: youtube gallery, video gallery, youtube channel, youtube live, live stream
5
  Requires at least: 4.0
6
  Tested up to: 5.2
7
- Stable tag: 13.1
8
  License: GPLv3 or later
9
 
10
  YouTube Embed WordPress Plugin. Embed a responsive video, YouTube channel gallery, playlist gallery, or YouTube.com live stream (with GDPR options)
@@ -148,6 +148,12 @@ You can also start and end each individual video at particular times. Like the a
148
 
149
  == Changelog ==
150
 
 
 
 
 
 
 
151
  = WordPress YouTube Embed 13.1 =
152
  * Brings back the ability to hide related/suggested videos at end of playback
153
  * Allows monetized sites to select multiple IAB categories
4
  Tags: youtube gallery, video gallery, youtube channel, youtube live, live stream
5
  Requires at least: 4.0
6
  Tested up to: 5.2
7
+ Stable tag: 13.1.1
8
  License: GPLv3 or later
9
 
10
  YouTube Embed WordPress Plugin. Embed a responsive video, YouTube channel gallery, playlist gallery, or YouTube.com live stream (with GDPR options)
148
 
149
  == Changelog ==
150
 
151
+ = WordPress YouTube Embed 13.1.1 =
152
+ * Fixes gallery autonext issue
153
+ * Fixes deprecated controls parameter
154
+ * Fixes "not live" content issue
155
+ * Remove deprecated showinfo parameter
156
+
157
  = WordPress YouTube Embed 13.1 =
158
  * Brings back the ability to hide related/suggested videos at end of playback
159
  * Allows monetized sites to select multiple IAB categories
scripts/ytprefs-wizard.js CHANGED
@@ -55,7 +55,7 @@ window._EPYTWIZ_ = window._EPYTWIZ_ || {};
55
 
56
  window._EPYTWIZ_.loadmovieplain = window._EPYTWIZ_.loadmovieplain || function (vid)
57
  {
58
- var codetemplate = '<iframe width="600" height="368" src="//www.youtube.com/embed/~ytid?showinfo=0&autoplay=1" frameborder="0" allowfullscreen ></iframe>';
59
  codetemplate = codetemplate.replace(/~ytid/g, vid);
60
  $("#watch" + vid).html(codetemplate);
61
  $('#closeme' + vid).css('display', 'inline');
55
 
56
  window._EPYTWIZ_.loadmovieplain = window._EPYTWIZ_.loadmovieplain || function (vid)
57
  {
58
+ var codetemplate = '<iframe width="600" height="368" src="//www.youtube.com/embed/~ytid?autoplay=1" frameborder="0" allowfullscreen ></iframe>';
59
  codetemplate = codetemplate.replace(/~ytid/g, vid);
60
  $("#watch" + vid).html(codetemplate);
61
  $('#closeme' + vid).css('display', 'inline');
scripts/ytprefs-wizard.min.js CHANGED
@@ -1,2 +1,2 @@
1
 
2
- window._EPYTWIZ_=window._EPYTWIZ_||{};(function(a){a.fn.followTo=function(e,b){var c=this,d=a(window);d.scroll(function(f){if(d.scrollTop()>e){c.css({position:"absolute",top:e})}else{c.css({position:"fixed",top:b})}})};window._EPYTWIZ_.getUrlParameter=function(b){b=b.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var d=new RegExp("[\\?&]"+b+"=([^&#]*)");var c=d.exec(window.location.search);return c===null?"":decodeURIComponent(c[1].replace(/\+/g," "))};window._EPYTWIZ_.selectText=window._EPYTWIZ_.selectText||function(d){if(document.selection){var b=document.body.createTextRange();b.moveToElementText(d);b.select()}else{if(window.getSelection){var c=window.getSelection();var b=document.createRange();b.selectNode(d);c.removeAllRanges();c.addRange(b)}}};window._EPYTWIZ_.loadmovieplain=window._EPYTWIZ_.loadmovieplain||function(b){var c='<iframe width="600" height="368" src="//www.youtube.com/embed/~ytid?showinfo=0&autoplay=1" frameborder="0" allowfullscreen ></iframe>';c=c.replace(/~ytid/g,b);a("#watch"+b).html(c);a("#closeme"+b).css("display","inline");a("#moviecontainer"+b).css("display","block");if(document.getElementById("scrollwatch"+b)){setTimeout(function(){a("html, body").animate({scrollTop:a("#scrollwatch"+b).offset().top-50},250,function(){})},800)}};window._EPYTWIZ_.closeme=window._EPYTWIZ_.closeme||function(b){a("#moviecontainer"+b).css("display","none");a("#watch"+b).html("")};a(document).ready(function(){a(".wiz-accordion").accordion({header:"> h3",collapsible:true,active:false,icons:{header:"ui-icon-circle-arrow-e",activeHeader:"ui-icon-circle-arrow-s"},heightStyle:"content",autoHeight:false}).find("h3.header-go").click(function(){window.open(a(this).find("a").attr("href"),"_blank");return false});a(".playlist-tabs").tabs();if(window._EPYTWIZ_.acc_expand){a(".wiz-accordion #"+window._EPYTWIZ_.acc_expand).click()}a("form.wizform").each(function(){$thisForm=a(this);$thisForm.find(".txturlpastecustom").on("paste",function(){$thisTxtUrl=a(this);setTimeout(function(){var d=a.trim($thisTxtUrl.val());var c=/<.*/i;if(c.test(d)){var e=new RegExp("(?:https?://)?(?:www\\.)?(?:youtu\\.be/|youtube\\.com(?:/embed/|/v/|/watch\\?v=))([\\w-]{10,12})","ig");var f=e.exec(d);if(f){var g=f[1];$thisTxtUrl.val("https://www.youtube.com/watch?v="+g)}else{$thisTxtUrl.val("https://www.youtube.com/watch?v=")}$thisForm.find(".badpaste").show()}else{$thisForm.find(".badpaste").hide()}},100)})});var b=a("#epyt_wiz_wrap");b.on("click",".copycode",function(){window._EPYTWIZ_.selectText(this)});b.on("click",".inserttopost",function(){var d=window.location.toString().split("/")[0]+"//"+window.location.toString().split("/")[2];var e=a(this).attr("rel");var c=window._EPYTWIZ_.getUrlParameter("clientId");parent.postMessage("youtubeembedplus|"+e+(c?"|clientId="+c:""),d)});b.on("click",".resultdiv .load-movie",function(){window._EPYTWIZ_.loadmovieplain(a(this).closest(".resultdiv").data("vid"));return false});b.on("click",".moviecontainer a.closeme",function(){window._EPYTWIZ_.closeme(a(this).data("vid"))})})})(jQuery);
1
 
2
+ window._EPYTWIZ_=window._EPYTWIZ_||{};(function(a){a.fn.followTo=function(e,b){var c=this,d=a(window);d.scroll(function(f){if(d.scrollTop()>e){c.css({position:"absolute",top:e})}else{c.css({position:"fixed",top:b})}})};window._EPYTWIZ_.getUrlParameter=function(b){b=b.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var d=new RegExp("[\\?&]"+b+"=([^&#]*)");var c=d.exec(window.location.search);return c===null?"":decodeURIComponent(c[1].replace(/\+/g," "))};window._EPYTWIZ_.selectText=window._EPYTWIZ_.selectText||function(d){if(document.selection){var b=document.body.createTextRange();b.moveToElementText(d);b.select()}else{if(window.getSelection){var c=window.getSelection();var b=document.createRange();b.selectNode(d);c.removeAllRanges();c.addRange(b)}}};window._EPYTWIZ_.loadmovieplain=window._EPYTWIZ_.loadmovieplain||function(b){var c='<iframe width="600" height="368" src="//www.youtube.com/embed/~ytid?autoplay=1" frameborder="0" allowfullscreen ></iframe>';c=c.replace(/~ytid/g,b);a("#watch"+b).html(c);a("#closeme"+b).css("display","inline");a("#moviecontainer"+b).css("display","block");if(document.getElementById("scrollwatch"+b)){setTimeout(function(){a("html, body").animate({scrollTop:a("#scrollwatch"+b).offset().top-50},250,function(){})},800)}};window._EPYTWIZ_.closeme=window._EPYTWIZ_.closeme||function(b){a("#moviecontainer"+b).css("display","none");a("#watch"+b).html("")};a(document).ready(function(){a(".wiz-accordion").accordion({header:"> h3",collapsible:true,active:false,icons:{header:"ui-icon-circle-arrow-e",activeHeader:"ui-icon-circle-arrow-s"},heightStyle:"content",autoHeight:false}).find("h3.header-go").click(function(){window.open(a(this).find("a").attr("href"),"_blank");return false});a(".playlist-tabs").tabs();if(window._EPYTWIZ_.acc_expand){a(".wiz-accordion #"+window._EPYTWIZ_.acc_expand).click()}a("form.wizform").each(function(){$thisForm=a(this);$thisForm.find(".txturlpastecustom").on("paste",function(){$thisTxtUrl=a(this);setTimeout(function(){var d=a.trim($thisTxtUrl.val());var c=/<.*/i;if(c.test(d)){var e=new RegExp("(?:https?://)?(?:www\\.)?(?:youtu\\.be/|youtube\\.com(?:/embed/|/v/|/watch\\?v=))([\\w-]{10,12})","ig");var f=e.exec(d);if(f){var g=f[1];$thisTxtUrl.val("https://www.youtube.com/watch?v="+g)}else{$thisTxtUrl.val("https://www.youtube.com/watch?v=")}$thisForm.find(".badpaste").show()}else{$thisForm.find(".badpaste").hide()}},100)})});var b=a("#epyt_wiz_wrap");b.on("click",".copycode",function(){window._EPYTWIZ_.selectText(this)});b.on("click",".inserttopost",function(){var d=window.location.toString().split("/")[0]+"//"+window.location.toString().split("/")[2];var e=a(this).attr("rel");var c=window._EPYTWIZ_.getUrlParameter("clientId");parent.postMessage("youtubeembedplus|"+e+(c?"|clientId="+c:""),d)});b.on("click",".resultdiv .load-movie",function(){window._EPYTWIZ_.loadmovieplain(a(this).closest(".resultdiv").data("vid"));return false});b.on("click",".moviecontainer a.closeme",function(){window._EPYTWIZ_.closeme(a(this).data("vid"))})})})(jQuery);
scripts/ytprefs.js CHANGED
@@ -89,7 +89,7 @@
89
  event.target.ponce = true;
90
  }
91
 
92
- if (event.data === window.YT.PlayerState.ENDED && $(ifm).data('relstop') == '1')
93
  {
94
  event.target.stopVideo();
95
  }
89
  event.target.ponce = true;
90
  }
91
 
92
+ if (event.data === window.YT.PlayerState.ENDED && $(ifm).data('relstop') == '1' && typeof event.target.stopVideo === 'function')
93
  {
94
  event.target.stopVideo();
95
  }
scripts/ytprefs.min.js CHANGED
@@ -1,2 +1,2 @@
1
 
2
- (function(a,b){a._EPYT_=a._EPYT_||{ajaxurl:"/wp-admin/admin-ajax.php",security:"",gallery_scrolloffset:100,eppathtoscripts:"/wp-content/plugins/youtube-embed-plus/scripts/",eppath:"/wp-content/plugins/youtube-embed-plus/",epresponsiveselector:["iframe.__youtube_prefs_widget__"],epdovol:true,evselector:'iframe.__youtube_prefs__[src], iframe[src*="youtube.com/embed/"], iframe[src*="youtube-nocookie.com/embed/"]',stopMobileBuffer:true,ajax_compat:false,usingdefault:true,ytapi_load:"light"};if(a.location.toString().indexOf("https://")===0){a._EPYT_.ajaxurl=a._EPYT_.ajaxurl.replace("http://","https://")}a._EPYT_.pageLoaded=false;b(a).on("load._EPYT_",function(){a._EPYT_.pageLoaded=true});if(!document.querySelectorAll){document.querySelectorAll=function(d){var f=document,e=f.documentElement.firstChild,c=f.createElement("STYLE");e.appendChild(c);f.__qsaels=[];c.styleSheet.cssText=d+"{x:expression(document.__qsaels.push(this))}";a.scrollBy(0,0);return f.__qsaels}}if(typeof a._EPADashboard_==="undefined"){a._EPADashboard_={initStarted:false,checkCount:0,onPlayerReady:function(f){try{if(typeof _EPYT_.epdovol!=="undefined"&&_EPYT_.epdovol){var d=parseInt(f.target.getIframe().getAttribute("data-vol"));if(!isNaN(d)){if(d===0){f.target.mute()}else{if(f.target.isMuted()){f.target.unMute()}f.target.setVolume(d)}}}var c=parseInt(f.target.getIframe().getAttribute("data-epautoplay"));if(!isNaN(c)&&c===1){f.target.playVideo()}}catch(e){}},onPlayerStateChange:function(f){var e=f.target.getIframe();if(f.data===a.YT.PlayerState.PLAYING&&f.target.ponce!==true&&e.src.indexOf("autoplay=1")===-1){f.target.ponce=true}if(f.data===a.YT.PlayerState.ENDED&&b(e).data("relstop")=="1"){f.target.stopVideo()}var c=b(e).closest(".epyt-gallery");if(!c.length){c=b("#"+b(e).data("epytgalleryid"))}if(c.length){var d=c.find(".epyt-pagebutton").first().data("autonext")=="1";if(d&&f.data===a.YT.PlayerState.ENDED){var g=c.find(".epyt-current-video");if(!g.length){g=c.find(".epyt-gallery-thumb").first()}var h=g.find(" ~ .epyt-gallery-thumb").first();if(h.length){h.click()}else{c.find('.epyt-pagebutton.epyt-next[data-pagetoken!=""][data-pagetoken]').first().click()}}}},justid:function(c){return new RegExp("[\\?&]v=([^&#]*)").exec(c)[1]},setupevents:function(d){if(typeof(a.YT)!=="undefined"&&a.YT!==null&&a.YT.loaded){var c=document.getElementById(d);if(!c.epytsetupdone){a._EPADashboard_.log("Setting up YT API events: "+d);c.epytsetupdone=true;return new a.YT.Player(d,{events:{onReady:a._EPADashboard_.onPlayerReady,onStateChange:a._EPADashboard_.onPlayerStateChange}})}}},apiInit:function(){if(typeof(a.YT)!=="undefined"){a._EPADashboard_.initStarted=true;var c=document.querySelectorAll(_EPYT_.evselector);for(var d=0;d<c.length;d++){if(!c[d].hasAttribute("id")){c[d].id="_dytid_"+Math.round(Math.random()*8999+1000)}a._EPADashboard_.setupevents(c[d].id)}}},log:function(d){try{console.log(d)}catch(c){}},doubleCheck:function(){a._EPADashboard_.checkInterval=setInterval(function(){a._EPADashboard_.checkCount++;if(a._EPADashboard_.checkCount>=5||a._EPADashboard_.initStarted){clearInterval(a._EPADashboard_.checkInterval)}else{a._EPADashboard_.apiInit();a._EPADashboard_.log("YT API init check")}},1000)},selectText:function(e){if(document.selection){var c=document.body.createTextRange();c.moveToElementText(e);c.select()}else{if(a.getSelection){var d=a.getSelection();var c=document.createRange();c.selectNode(e);d.removeAllRanges();d.addRange(c)}}},setVidSrc:function(c,d){c.attr("src",d);c.get(0).epytsetupdone=false;a._EPADashboard_.setupevents(c.attr("id"))},loadYTAPI:function(){if(typeof a.YT==="undefined"){if(a._EPYT_.ytapi_load!=="never"&&(a._EPYT_.ytapi_load==="always"||b('iframe[src*="youtube.com/embed/"]').length)){var c=document.createElement("script");c.src="https://www.youtube.com/iframe_api";c.type="text/javascript";document.getElementsByTagName("head")[0].appendChild(c)}}else{if(a.YT.loaded){if(a._EPYT_.pageLoaded){a._EPADashboard_.apiInit();a._EPADashboard_.log("YT API available")}else{b(a).on("load._EPYT_",function(){a._EPADashboard_.apiInit();a._EPADashboard_.log("YT API available 2")})}}}},pageReady:function(){b(".epyt-gallery").each(function(){var f=b(this);if(!f.data("epytevents")||!b("body").hasClass("block-editor-page")){f.data("epytevents","1");var e=b(this).find("iframe, div.__youtube_prefs_gdpr__").first();var c=e.attr("src");if(!c){c=e.data("ep-src")}var d=b(this).find(".epyt-gallery-list .epyt-gallery-thumb").first().data("videoid");if(typeof(c)!=="undefined"){c=c.replace(d,"GALLERYVIDEOID");e.data("ep-gallerysrc",c)}else{if(e.hasClass("__youtube_prefs_gdpr__")){e.data("ep-gallerysrc","")}}f.on("click",".epyt-gallery-list .epyt-gallery-thumb",function(){f.find(".epyt-gallery-list .epyt-gallery-thumb").removeClass("epyt-current-video");b(this).addClass("epyt-current-video");var g=b(this).data("videoid");f.data("currvid",g);var k=e.data("ep-gallerysrc").replace("GALLERYVIDEOID",g);var j=f.find(".epyt-pagebutton").first().data("thumbplay");if(j!=="0"&&j!==0){if(k.indexOf("autoplay")>0){k=k.replace("autoplay=0","autoplay=1")}else{k+="&autoplay=1"}e.addClass("epyt-thumbplay")}var h=Math.max(b("body").scrollTop(),b("html").scrollTop());var i=e.offset().top-parseInt(_EPYT_.gallery_scrolloffset);if(h>i){b("html, body").animate({scrollTop:i},500,function(){a._EPADashboard_.setVidSrc(e,k)})}else{a._EPADashboard_.setVidSrc(e,k)}}).on("keydown",".epyt-gallery-list .epyt-gallery-thumb, .epyt-pagebutton",function(h){var g=h.which;if((g===13)||(g===32)){h.preventDefault();b(this).click()}});f.on("mouseenter",".epyt-gallery-list .epyt-gallery-thumb",function(){b(this).addClass("hover")});f.on("mouseleave",".epyt-gallery-list .epyt-gallery-thumb",function(){b(this).removeClass("hover")});f.on("click",".epyt-pagebutton",function(){var i={action:"my_embedplus_gallery_page",security:_EPYT_.security,options:{playlistId:b(this).data("playlistid"),pageToken:b(this).data("pagetoken"),pageSize:b(this).data("pagesize"),columns:b(this).data("epcolumns"),showTitle:b(this).data("showtitle"),showPaging:b(this).data("showpaging"),autonext:b(this).data("autonext"),thumbplay:b(this).data("thumbplay")}};var g=b(this).hasClass("epyt-next");var h=parseInt(f.data("currpage")+"");h+=g?1:-1;f.data("currpage",h);f.find(".epyt-gallery-list").addClass("epyt-loading");b.post(_EPYT_.ajaxurl,i,function(j){f.find(".epyt-gallery-list").html(j);f.find(".epyt-current").each(function(){b(this).text(f.data("currpage"))});f.find('.epyt-gallery-thumb[data-videoid="'+f.data("currvid")+'"]').addClass("epyt-current-video");if(f.find(".epyt-pagebutton").first().data("autonext")=="1"){f.find(".epyt-gallery-thumb").first().click()}}).fail(function(){alert("Sorry, there was an error loading the next page.")}).always(function(){f.find(".epyt-gallery-list").removeClass("epyt-loading");if(f.find(".epyt-pagebutton").first().data("autonext")!="1"){var j=Math.max(b("body").scrollTop(),b("html").scrollTop());var k=f.find(".epyt-gallery-list").offset().top-parseInt(_EPYT_.gallery_scrolloffset);if(j>k){b("html, body").animate({scrollTop:k},500)}}})})}});b("button.__youtube_prefs_gdpr__").on("click",function(c){c.preventDefault();if(b.cookie){b.cookie("ytprefs_gdpr_consent","1",{expires:30,path:"/"});a.top.location.reload()}})}}}a.onYouTubeIframeAPIReady=typeof a.onYouTubeIframeAPIReady!=="undefined"?a.onYouTubeIframeAPIReady:function(){if(a._EPYT_.pageLoaded){a._EPADashboard_.apiInit();a._EPADashboard_.log("YT API ready")}else{b(a).on("load._EPYT_",function(){a._EPADashboard_.apiInit();a._EPADashboard_.log("YT API ready 2")})}};a._EPADashboard_.loadYTAPI();if(a._EPYT_.pageLoaded){a._EPADashboard_.doubleCheck()}else{b(a).on("load._EPYT_",function(){a._EPADashboard_.doubleCheck()})}b(document).ready(function(){a._EPADashboard_.pageReady();a._EPADashboard_.loadYTAPI();if(a._EPYT_.ajax_compat){b(a).on("load._EPYT_",function(){b(document).ajaxSuccess(function(d,f,c){if(f&&f.responseText&&f.responseText.indexOf("<iframe ")!==-1){a._EPADashboard_.loadYTAPI();a._EPADashboard_.apiInit();a._EPADashboard_.log("YT API AJAX");a._EPADashboard_.pageReady()}})})}})})(window,jQuery);
1
 
2
+ (function(a,b){a._EPYT_=a._EPYT_||{ajaxurl:"/wp-admin/admin-ajax.php",security:"",gallery_scrolloffset:100,eppathtoscripts:"/wp-content/plugins/youtube-embed-plus/scripts/",eppath:"/wp-content/plugins/youtube-embed-plus/",epresponsiveselector:["iframe.__youtube_prefs_widget__"],epdovol:true,evselector:'iframe.__youtube_prefs__[src], iframe[src*="youtube.com/embed/"], iframe[src*="youtube-nocookie.com/embed/"]',stopMobileBuffer:true,ajax_compat:false,usingdefault:true,ytapi_load:"light"};if(a.location.toString().indexOf("https://")===0){a._EPYT_.ajaxurl=a._EPYT_.ajaxurl.replace("http://","https://")}a._EPYT_.pageLoaded=false;b(a).on("load._EPYT_",function(){a._EPYT_.pageLoaded=true});if(!document.querySelectorAll){document.querySelectorAll=function(d){var f=document,e=f.documentElement.firstChild,c=f.createElement("STYLE");e.appendChild(c);f.__qsaels=[];c.styleSheet.cssText=d+"{x:expression(document.__qsaels.push(this))}";a.scrollBy(0,0);return f.__qsaels}}if(typeof a._EPADashboard_==="undefined"){a._EPADashboard_={initStarted:false,checkCount:0,onPlayerReady:function(f){try{if(typeof _EPYT_.epdovol!=="undefined"&&_EPYT_.epdovol){var d=parseInt(f.target.getIframe().getAttribute("data-vol"));if(!isNaN(d)){if(d===0){f.target.mute()}else{if(f.target.isMuted()){f.target.unMute()}f.target.setVolume(d)}}}var c=parseInt(f.target.getIframe().getAttribute("data-epautoplay"));if(!isNaN(c)&&c===1){f.target.playVideo()}}catch(e){}},onPlayerStateChange:function(f){var e=f.target.getIframe();if(f.data===a.YT.PlayerState.PLAYING&&f.target.ponce!==true&&e.src.indexOf("autoplay=1")===-1){f.target.ponce=true}if(f.data===a.YT.PlayerState.ENDED&&b(e).data("relstop")=="1"&&typeof f.target.stopVideo==="function"){f.target.stopVideo()}var c=b(e).closest(".epyt-gallery");if(!c.length){c=b("#"+b(e).data("epytgalleryid"))}if(c.length){var d=c.find(".epyt-pagebutton").first().data("autonext")=="1";if(d&&f.data===a.YT.PlayerState.ENDED){var g=c.find(".epyt-current-video");if(!g.length){g=c.find(".epyt-gallery-thumb").first()}var h=g.find(" ~ .epyt-gallery-thumb").first();if(h.length){h.click()}else{c.find('.epyt-pagebutton.epyt-next[data-pagetoken!=""][data-pagetoken]').first().click()}}}},justid:function(c){return new RegExp("[\\?&]v=([^&#]*)").exec(c)[1]},setupevents:function(d){if(typeof(a.YT)!=="undefined"&&a.YT!==null&&a.YT.loaded){var c=document.getElementById(d);if(!c.epytsetupdone){a._EPADashboard_.log("Setting up YT API events: "+d);c.epytsetupdone=true;return new a.YT.Player(d,{events:{onReady:a._EPADashboard_.onPlayerReady,onStateChange:a._EPADashboard_.onPlayerStateChange}})}}},apiInit:function(){if(typeof(a.YT)!=="undefined"){a._EPADashboard_.initStarted=true;var c=document.querySelectorAll(_EPYT_.evselector);for(var d=0;d<c.length;d++){if(!c[d].hasAttribute("id")){c[d].id="_dytid_"+Math.round(Math.random()*8999+1000)}a._EPADashboard_.setupevents(c[d].id)}}},log:function(d){try{console.log(d)}catch(c){}},doubleCheck:function(){a._EPADashboard_.checkInterval=setInterval(function(){a._EPADashboard_.checkCount++;if(a._EPADashboard_.checkCount>=5||a._EPADashboard_.initStarted){clearInterval(a._EPADashboard_.checkInterval)}else{a._EPADashboard_.apiInit();a._EPADashboard_.log("YT API init check")}},1000)},selectText:function(e){if(document.selection){var c=document.body.createTextRange();c.moveToElementText(e);c.select()}else{if(a.getSelection){var d=a.getSelection();var c=document.createRange();c.selectNode(e);d.removeAllRanges();d.addRange(c)}}},setVidSrc:function(c,d){c.attr("src",d);c.get(0).epytsetupdone=false;a._EPADashboard_.setupevents(c.attr("id"))},loadYTAPI:function(){if(typeof a.YT==="undefined"){if(a._EPYT_.ytapi_load!=="never"&&(a._EPYT_.ytapi_load==="always"||b('iframe[src*="youtube.com/embed/"]').length)){var c=document.createElement("script");c.src="https://www.youtube.com/iframe_api";c.type="text/javascript";document.getElementsByTagName("head")[0].appendChild(c)}}else{if(a.YT.loaded){if(a._EPYT_.pageLoaded){a._EPADashboard_.apiInit();a._EPADashboard_.log("YT API available")}else{b(a).on("load._EPYT_",function(){a._EPADashboard_.apiInit();a._EPADashboard_.log("YT API available 2")})}}}},pageReady:function(){b(".epyt-gallery").each(function(){var f=b(this);if(!f.data("epytevents")||!b("body").hasClass("block-editor-page")){f.data("epytevents","1");var e=b(this).find("iframe, div.__youtube_prefs_gdpr__").first();var c=e.attr("src");if(!c){c=e.data("ep-src")}var d=b(this).find(".epyt-gallery-list .epyt-gallery-thumb").first().data("videoid");if(typeof(c)!=="undefined"){c=c.replace(d,"GALLERYVIDEOID");e.data("ep-gallerysrc",c)}else{if(e.hasClass("__youtube_prefs_gdpr__")){e.data("ep-gallerysrc","")}}f.on("click",".epyt-gallery-list .epyt-gallery-thumb",function(){f.find(".epyt-gallery-list .epyt-gallery-thumb").removeClass("epyt-current-video");b(this).addClass("epyt-current-video");var g=b(this).data("videoid");f.data("currvid",g);var k=e.data("ep-gallerysrc").replace("GALLERYVIDEOID",g);var j=f.find(".epyt-pagebutton").first().data("thumbplay");if(j!=="0"&&j!==0){if(k.indexOf("autoplay")>0){k=k.replace("autoplay=0","autoplay=1")}else{k+="&autoplay=1"}e.addClass("epyt-thumbplay")}var h=Math.max(b("body").scrollTop(),b("html").scrollTop());var i=e.offset().top-parseInt(_EPYT_.gallery_scrolloffset);if(h>i){b("html, body").animate({scrollTop:i},500,function(){a._EPADashboard_.setVidSrc(e,k)})}else{a._EPADashboard_.setVidSrc(e,k)}}).on("keydown",".epyt-gallery-list .epyt-gallery-thumb, .epyt-pagebutton",function(h){var g=h.which;if((g===13)||(g===32)){h.preventDefault();b(this).click()}});f.on("mouseenter",".epyt-gallery-list .epyt-gallery-thumb",function(){b(this).addClass("hover")});f.on("mouseleave",".epyt-gallery-list .epyt-gallery-thumb",function(){b(this).removeClass("hover")});f.on("click",".epyt-pagebutton",function(){var i={action:"my_embedplus_gallery_page",security:_EPYT_.security,options:{playlistId:b(this).data("playlistid"),pageToken:b(this).data("pagetoken"),pageSize:b(this).data("pagesize"),columns:b(this).data("epcolumns"),showTitle:b(this).data("showtitle"),showPaging:b(this).data("showpaging"),autonext:b(this).data("autonext"),thumbplay:b(this).data("thumbplay")}};var g=b(this).hasClass("epyt-next");var h=parseInt(f.data("currpage")+"");h+=g?1:-1;f.data("currpage",h);f.find(".epyt-gallery-list").addClass("epyt-loading");b.post(_EPYT_.ajaxurl,i,function(j){f.find(".epyt-gallery-list").html(j);f.find(".epyt-current").each(function(){b(this).text(f.data("currpage"))});f.find('.epyt-gallery-thumb[data-videoid="'+f.data("currvid")+'"]').addClass("epyt-current-video");if(f.find(".epyt-pagebutton").first().data("autonext")=="1"){f.find(".epyt-gallery-thumb").first().click()}}).fail(function(){alert("Sorry, there was an error loading the next page.")}).always(function(){f.find(".epyt-gallery-list").removeClass("epyt-loading");if(f.find(".epyt-pagebutton").first().data("autonext")!="1"){var j=Math.max(b("body").scrollTop(),b("html").scrollTop());var k=f.find(".epyt-gallery-list").offset().top-parseInt(_EPYT_.gallery_scrolloffset);if(j>k){b("html, body").animate({scrollTop:k},500)}}})})}});b("button.__youtube_prefs_gdpr__").on("click",function(c){c.preventDefault();if(b.cookie){b.cookie("ytprefs_gdpr_consent","1",{expires:30,path:"/"});a.top.location.reload()}})}}}a.onYouTubeIframeAPIReady=typeof a.onYouTubeIframeAPIReady!=="undefined"?a.onYouTubeIframeAPIReady:function(){if(a._EPYT_.pageLoaded){a._EPADashboard_.apiInit();a._EPADashboard_.log("YT API ready")}else{b(a).on("load._EPYT_",function(){a._EPADashboard_.apiInit();a._EPADashboard_.log("YT API ready 2")})}};a._EPADashboard_.loadYTAPI();if(a._EPYT_.pageLoaded){a._EPADashboard_.doubleCheck()}else{b(a).on("load._EPYT_",function(){a._EPADashboard_.doubleCheck()})}b(document).ready(function(){a._EPADashboard_.pageReady();a._EPADashboard_.loadYTAPI();if(a._EPYT_.ajax_compat){b(a).on("load._EPYT_",function(){b(document).ajaxSuccess(function(d,f,c){if(f&&f.responseText&&f.responseText.indexOf("<iframe ")!==-1){a._EPADashboard_.loadYTAPI();a._EPADashboard_.apiInit();a._EPADashboard_.log("YT API AJAX");a._EPADashboard_.pageReady()}})})}})})(window,jQuery);
styles/ytprefs-onboarding.css CHANGED
@@ -7,6 +7,7 @@
7
  #wpadminbar {display:none;}
8
  html.wp-toolbar {padding: 0px;}
9
  #footer, #wpfooter, .auto-fold #wpfooter {display: none;}
 
10
  #wpfooter {clear: both}
11
  .clearboth {clear: both;}
12
  .pad20 {padding: 20px;}
7
  #wpadminbar {display:none;}
8
  html.wp-toolbar {padding: 0px;}
9
  #footer, #wpfooter, .auto-fold #wpfooter {display: none;}
10
+ #screen-meta-links {display: none;}
11
  #wpfooter {clear: both}
12
  .clearboth {clear: both;}
13
  .pad20 {padding: 20px;}
styles/ytprefs-onboarding.min.css CHANGED
@@ -1,2 +1,2 @@
1
 
2
- #wphead{display:none}#wpbody{margin-left:0}#adminmenuback{display:none}#adminmenu,adminmenuwrap{display:none}#wpcontent,.auto-fold #wpcontent{margin-left:0}#wpadminbar{display:none}html.wp-toolbar{padding:0}#footer,#wpfooter,.auto-fold #wpfooter{display:none}#wpfooter{clear:both}.clearboth{clear:both}.pad20{padding:20px}.center{text-align:center}.bold{font-weight:bold}.orange{color:#f85d00}.smallnote{font-size:small;font-style:italic}.indent-option{margin-left:25px}.ui-widget,.ui-widget input,.ui-widget select,.ui-widget textarea,.ui-widget button{font-family:inherit}.ui-accordion .ui-accordion-header{margin-top:15px;font-weight:bold}.ui-accordion .ui-accordion-content.header-go-content{display:none!important;height:0!important}.ui-widget-content a{color:#0073aa}input.ui-widget[type=text]{margin:0;padding:.4em 1em;width:450px}.txt-button-align input.ui-widget[type=text],.txt-button-align button{vertical-align:top}#epyt_wiz_wrap .ui-button{font-weight:bold}.ui-button .ui-icon{transform:scale(1.35,1.35)}.copycode{background-color:#eef;border:2px solid #c7d6e4;display:inline-block;font-size:.9em;overflow-x:hidden;vertical-align:middle;white-space:nowrap;width:400px;padding-left:15px;padding-right:15px}.pointer{cursor:pointer}.relative{position:relative}.wrap-ytprefs-onboarding h1{line-height:40px}.wrap-ytprefs-onboarding h2{line-height:2em}.wrap-ytprefs-onboarding .box-vi-not-interested{display:none}.ytprefs-ob-step{position:absolute;visibility:hidden;opacity:0;transition:opacity 300ms,visibility 300ms;width:100%;height:0;top:-200000px}.ytprefs-ob-step.active-step{visibility:visible;opacity:1;height:auto;top:0}.ytprefs-ob-title{font-size:2em;line-height:2em;text-align:center}.ytprefs-ob-subtitle{font-size:1.4em;line-height:2em}.ytprefs-ob-content{max-width:800px;margin:0 auto}.ytprefs-ob-nav{text-align:center;margin-top:20px;padding-top:20px;border-top:2px solid #ddd;clear:both;margin-bottom:50px}.ytprefs-ob-nav .ytprefs-ob-nav-hide{display:none}.ytprefs-ob-nav button.button-secondary,.ytprefs-ob-nav button.button-primary{display:inline-block;margin:0 10px}.ytprefs-ob-nav button.ytprefs-ob-nav-prev,.ytprefs-ob-nav button.ytprefs-ob-nav-close{margin-right:25px}.ytprefs-ob-step1 ul.ytprefs-ob-filter li{margin-bottom:15px}.ytprefs-ob-step1 .ytprefs-hover-icons{width:160px;float:right;margin-left:30px;min-height:200px;position:relative}.ytprefs-ob-step1 .ytprefs-hover-icons img{position:absolute;top:0;left:0;opacity:0;display:block;width:100%;height:auto;transition:opacity 200ms}.ytprefs-ob-step1 .ytprefs-hover-icons img.yob-icon-visible{opacity:1}.ytprefs-ob-step2 .ytprefs-ob-setting{display:none;margin:10px 0 25px 0}.ytprefs-ob-step2 .ytprefs-ob-setting.yob-single-visible,.ytprefs-ob-step2 .ytprefs-ob-setting.yob-gallery-visible,.ytprefs-ob-step2 .ytprefs-ob-setting.yob-standalone-visible,.ytprefs-ob-step2 .ytprefs-ob-setting.yob-privacy-visible,.ytprefs-ob-step2 .ytprefs-ob-setting.yob-live-visible{display:block}.ytprefs-ob-step2 form #responsive ~ #boxresponsive_all{height:0;visibility:none;opacity:0;transition:opacity 300ms,visibility 300ms}.ytprefs-ob-step2 form #responsive:checked ~ #boxresponsive_all{height:auto;visibility:visible;opacity:1}.gdpr-options-left{width:65%;float:left}.gdpr-options-right{width:33%;float:right;margin-top:20px}.gdpr-options-right .img-gdpr-message{width:100%;height:auto}iframe#gdpr_consent_message_ifr{min-height:250px!important}.ytprefs-ob-step4 .ytprefs-ob-content{max-width:100%}.wiztab-screenshots{float:right;max-width:50%;height:auto;clear:right;margin-left:30px;margin-bottom:15px;display:block;border:5px solid #ddd}.ytprefs-ob-success{color:#00a000;font-weight:bold}.ytprefs-ob-success:after{content:url('../images/adstxt-valid.png')}
1
 
2
+ #wphead{display:none}#wpbody{margin-left:0}#adminmenuback{display:none}#adminmenu,adminmenuwrap{display:none}#wpcontent,.auto-fold #wpcontent{margin-left:0}#wpadminbar{display:none}html.wp-toolbar{padding:0}#footer,#wpfooter,.auto-fold #wpfooter{display:none}#screen-meta-links{display:none}#wpfooter{clear:both}.clearboth{clear:both}.pad20{padding:20px}.center{text-align:center}.bold{font-weight:bold}.orange{color:#f85d00}.smallnote{font-size:small;font-style:italic}.indent-option{margin-left:25px}.ui-widget,.ui-widget input,.ui-widget select,.ui-widget textarea,.ui-widget button{font-family:inherit}.ui-accordion .ui-accordion-header{margin-top:15px;font-weight:bold}.ui-accordion .ui-accordion-content.header-go-content{display:none!important;height:0!important}.ui-widget-content a{color:#0073aa}input.ui-widget[type=text]{margin:0;padding:.4em 1em;width:450px}.txt-button-align input.ui-widget[type=text],.txt-button-align button{vertical-align:top}#epyt_wiz_wrap .ui-button{font-weight:bold}.ui-button .ui-icon{transform:scale(1.35,1.35)}.copycode{background-color:#eef;border:2px solid #c7d6e4;display:inline-block;font-size:.9em;overflow-x:hidden;vertical-align:middle;white-space:nowrap;width:400px;padding-left:15px;padding-right:15px}.pointer{cursor:pointer}.relative{position:relative}.wrap-ytprefs-onboarding h1{line-height:40px}.wrap-ytprefs-onboarding h2{line-height:2em}.wrap-ytprefs-onboarding .box-vi-not-interested{display:none}.ytprefs-ob-step{position:absolute;visibility:hidden;opacity:0;transition:opacity 300ms,visibility 300ms;width:100%;height:0;top:-200000px}.ytprefs-ob-step.active-step{visibility:visible;opacity:1;height:auto;top:0}.ytprefs-ob-title{font-size:2em;line-height:2em;text-align:center}.ytprefs-ob-subtitle{font-size:1.4em;line-height:2em}.ytprefs-ob-content{max-width:800px;margin:0 auto}.ytprefs-ob-nav{text-align:center;margin-top:20px;padding-top:20px;border-top:2px solid #ddd;clear:both;margin-bottom:50px}.ytprefs-ob-nav .ytprefs-ob-nav-hide{display:none}.ytprefs-ob-nav button.button-secondary,.ytprefs-ob-nav button.button-primary{display:inline-block;margin:0 10px}.ytprefs-ob-nav button.ytprefs-ob-nav-prev,.ytprefs-ob-nav button.ytprefs-ob-nav-close{margin-right:25px}.ytprefs-ob-step1 ul.ytprefs-ob-filter li{margin-bottom:15px}.ytprefs-ob-step1 .ytprefs-hover-icons{width:160px;float:right;margin-left:30px;min-height:200px;position:relative}.ytprefs-ob-step1 .ytprefs-hover-icons img{position:absolute;top:0;left:0;opacity:0;display:block;width:100%;height:auto;transition:opacity 200ms}.ytprefs-ob-step1 .ytprefs-hover-icons img.yob-icon-visible{opacity:1}.ytprefs-ob-step2 .ytprefs-ob-setting{display:none;margin:10px 0 25px 0}.ytprefs-ob-step2 .ytprefs-ob-setting.yob-single-visible,.ytprefs-ob-step2 .ytprefs-ob-setting.yob-gallery-visible,.ytprefs-ob-step2 .ytprefs-ob-setting.yob-standalone-visible,.ytprefs-ob-step2 .ytprefs-ob-setting.yob-privacy-visible,.ytprefs-ob-step2 .ytprefs-ob-setting.yob-live-visible{display:block}.ytprefs-ob-step2 form #responsive ~ #boxresponsive_all{height:0;visibility:none;opacity:0;transition:opacity 300ms,visibility 300ms}.ytprefs-ob-step2 form #responsive:checked ~ #boxresponsive_all{height:auto;visibility:visible;opacity:1}.gdpr-options-left{width:65%;float:left}.gdpr-options-right{width:33%;float:right;margin-top:20px}.gdpr-options-right .img-gdpr-message{width:100%;height:auto}iframe#gdpr_consent_message_ifr{min-height:250px!important}.ytprefs-ob-step4 .ytprefs-ob-content{max-width:100%}.wiztab-screenshots{float:right;max-width:50%;height:auto;clear:right;margin-left:30px;margin-bottom:15px;display:block;border:5px solid #ddd}.ytprefs-ob-success{color:#00a000;font-weight:bold}.ytprefs-ob-success:after{content:url('../images/adstxt-valid.png')}
styles/ytprefs-wizard.css CHANGED
@@ -7,6 +7,7 @@
7
  #wpadminbar {display:none;}
8
  html.wp-toolbar {padding: 0px;}
9
  #footer, #wpfooter, .auto-fold #wpfooter {display: none;}
 
10
  #wpfooter {clear: both}
11
  .clearboth {clear: both;}
12
  .pad20 {padding: 20px;}
7
  #wpadminbar {display:none;}
8
  html.wp-toolbar {padding: 0px;}
9
  #footer, #wpfooter, .auto-fold #wpfooter {display: none;}
10
+ #screen-meta-links {display: none;}
11
  #wpfooter {clear: both}
12
  .clearboth {clear: both;}
13
  .pad20 {padding: 20px;}
styles/ytprefs-wizard.min.css CHANGED
@@ -1,2 +1,2 @@
1
 
2
- #wphead{display:none}#wpbody{margin-left:0}#adminmenuback{display:none}#adminmenu,adminmenuwrap{display:none}#wpcontent,.auto-fold #wpcontent{margin-left:0}#wpadminbar{display:none}html.wp-toolbar{padding:0}#footer,#wpfooter,.auto-fold #wpfooter{display:none}#wpfooter{clear:both}.clearboth{clear:both}.pad20{padding:20px}.center{text-align:center}.bold{font-weight:bold}.orange{color:#f85d00}.smallnote{font-size:small;font-style:italic}.ui-widget,.ui-widget input,.ui-widget select,.ui-widget textarea,.ui-widget button{font-family:inherit}.ui-accordion .ui-accordion-header{margin-top:15px;font-weight:bold}.ui-accordion .ui-accordion-content.header-go-content{display:none!important;height:0!important}.ui-widget-content a{color:#0073aa}input.ui-widget[type=text]{margin:0;padding:.4em 1em;width:450px}.txt-button-align input.ui-widget[type=text],.txt-button-align button{vertical-align:top}#epyt_wiz_wrap .ui-button{font-weight:bold}#epyt_wiz_wrap .ui-icon{display:inline-block}.ui-button .ui-icon{transform:scale(1.35,1.35);display:inline-block}.copycode{background-color:#eef;border:2px solid #c7d6e4;display:inline-block;font-size:.9em;overflow-x:hidden;vertical-align:middle;white-space:nowrap;width:400px;padding-left:15px;padding-right:15px}.pointer{cursor:pointer}.relative{position:relative}.epyt-search-results a.pointer.thumb.load-movie{float:left;width:160px;height:90px;background-position:center;background-size:cover;display:block;margin:0 25px 10px 0}.epyt-search-results .resultdiv{margin-bottom:40px}.epyt-search-results .resultinfo{text-align:left}.epyt-search-results .resulttitle{font-weight:bold}.epyt-search-results .moviecontainer{margin-bottom:40px;margin-top:-30px;clear:both}.epyt-search-results .closeme{right:110px;top:-10px;position:absolute;font-weight:bold;font-size:50px;cursor:pointer}.epyt-search-results .resulttitle .ui-icon{transform:scale(1.35,1.35)}.epyt-pagination{clear:both;text-align:center;padding:10px 8px 10px 8px;display:none}.epyt-pagination>div,.epyt-pagenumbers>div{display:inline-block;padding:0 2px 0 2px;vertical-align:middle}.epyt-pagination .epyt-pagebutton{cursor:pointer;display:inline-block;padding:0 10px 0 10px}.epyt-pagebutton>div{display:inline}.epyt-pagination .epyt-loader{display:none}.epyt-gallery-list.epyt-loading .epyt-pagination .epyt-loader{display:inline-block}.epyt-pagebutton.hide,.epyt-pagenumbers.hide{display:none!important;opacity:0!important;visibility:hidden!important}.ui-tabs .ui-tabs-anchor{font-weight:bold}.playlist-tabs{margin-bottom:20px}.icon-playlist{float:left;height:auto;margin:15px 30px 0 0;max-width:150px}a.ythealth{clear:both;float:right;margin-top:15px;position:relative}a.ythealth .tip{position:absolute;width:450px;right:0;top:-100px;display:none;background-color:#fff;padding:20px;border:2px solid #ddd;border-radius:5px}a.ythealth:hover .tip{display:block}.h3_vi_monetize-content{background-color:#f0f0f0}
1
 
2
+ #wphead{display:none}#wpbody{margin-left:0}#adminmenuback{display:none}#adminmenu,adminmenuwrap{display:none}#wpcontent,.auto-fold #wpcontent{margin-left:0}#wpadminbar{display:none}html.wp-toolbar{padding:0}#footer,#wpfooter,.auto-fold #wpfooter{display:none}#screen-meta-links{display:none}#wpfooter{clear:both}.clearboth{clear:both}.pad20{padding:20px}.center{text-align:center}.bold{font-weight:bold}.orange{color:#f85d00}.smallnote{font-size:small;font-style:italic}.ui-widget,.ui-widget input,.ui-widget select,.ui-widget textarea,.ui-widget button{font-family:inherit}.ui-accordion .ui-accordion-header{margin-top:15px;font-weight:bold}.ui-accordion .ui-accordion-content.header-go-content{display:none!important;height:0!important}.ui-widget-content a{color:#0073aa}input.ui-widget[type=text]{margin:0;padding:.4em 1em;width:450px}.txt-button-align input.ui-widget[type=text],.txt-button-align button{vertical-align:top}#epyt_wiz_wrap .ui-button{font-weight:bold}#epyt_wiz_wrap .ui-icon{display:inline-block}.ui-button .ui-icon{transform:scale(1.35,1.35);display:inline-block}.copycode{background-color:#eef;border:2px solid #c7d6e4;display:inline-block;font-size:.9em;overflow-x:hidden;vertical-align:middle;white-space:nowrap;width:400px;padding-left:15px;padding-right:15px}.pointer{cursor:pointer}.relative{position:relative}.epyt-search-results a.pointer.thumb.load-movie{float:left;width:160px;height:90px;background-position:center;background-size:cover;display:block;margin:0 25px 10px 0}.epyt-search-results .resultdiv{margin-bottom:40px}.epyt-search-results .resultinfo{text-align:left}.epyt-search-results .resulttitle{font-weight:bold}.epyt-search-results .moviecontainer{margin-bottom:40px;margin-top:-30px;clear:both}.epyt-search-results .closeme{right:110px;top:-10px;position:absolute;font-weight:bold;font-size:50px;cursor:pointer}.epyt-search-results .resulttitle .ui-icon{transform:scale(1.35,1.35)}.epyt-pagination{clear:both;text-align:center;padding:10px 8px 10px 8px;display:none}.epyt-pagination>div,.epyt-pagenumbers>div{display:inline-block;padding:0 2px 0 2px;vertical-align:middle}.epyt-pagination .epyt-pagebutton{cursor:pointer;display:inline-block;padding:0 10px 0 10px}.epyt-pagebutton>div{display:inline}.epyt-pagination .epyt-loader{display:none}.epyt-gallery-list.epyt-loading .epyt-pagination .epyt-loader{display:inline-block}.epyt-pagebutton.hide,.epyt-pagenumbers.hide{display:none!important;opacity:0!important;visibility:hidden!important}.ui-tabs .ui-tabs-anchor{font-weight:bold}.playlist-tabs{margin-bottom:20px}.icon-playlist{float:left;height:auto;margin:15px 30px 0 0;max-width:150px}a.ythealth{clear:both;float:right;margin-top:15px;position:relative}a.ythealth .tip{position:absolute;width:450px;right:0;top:-100px;display:none;background-color:#fff;padding:20px;border:2px solid #ddd;border-radius:5px}a.ythealth:hover .tip{display:block}.h3_vi_monetize-content{background-color:#f0f0f0}
youtube.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: YouTube
4
  Plugin URI: https://www.embedplus.com/dashboard/pro-easy-video-analytics.aspx?ref=plugin
5
  Description: YouTube Embed and YouTube Gallery WordPress Plugin. Embed a responsive video, YouTube channel, playlist gallery, or live stream
6
- Version: 13.1
7
  Author: EmbedPlus Team
8
  Author URI: https://www.embedplus.com
9
  */
@@ -34,7 +34,7 @@ class YouTubePrefs
34
 
35
  public static $folder_name = 'youtube-embed-plus';
36
  public static $curltimeout = 30;
37
- public static $version = '13.1';
38
  public static $opt_version = 'version';
39
  public static $optembedwidth = null;
40
  public static $optembedheight = null;
@@ -51,7 +51,6 @@ class YouTubePrefs
51
  public static $opt_loop = 'loop';
52
  public static $opt_modestbranding = 'modestbranding';
53
  public static $opt_rel = 'rel';
54
- public static $opt_showinfo = 'showinfo';
55
  public static $opt_fs = 'fs';
56
  public static $opt_playsinline = 'playsinline';
57
  public static $opt_autohide = 'autohide';
@@ -124,6 +123,15 @@ class YouTubePrefs
124
  public static $wizard_hook = '';
125
  public static $onboarding_hook = '';
126
  public static $admin_page_hooks = array();
 
 
 
 
 
 
 
 
 
127
  public static $get_api_key_msg = 'The ### feature now requires a (free) YouTube API key from Google. Please follow the easy steps <a href="https://www.youtube.com/watch?v=6gD0X76-v_g" target="_blank">in this video</a> to create and save your API key.';
128
  public static $dft_gdpr_consent_message = '<p><strong>Please accept YouTube cookies to play this video.</strong> By accepting you will be accessing content from YouTube, a service provided by an external third party.</p><p><a href="https://policies.google.com/privacy" target="_blank">YouTube privacy policy</a></p><p>If you accept this notice, your choice will be saved and the page will refresh.</p>';
129
  ///////////////////////////////////////////////////////////////////////////////////////////////////
@@ -207,7 +215,6 @@ class YouTubePrefs
207
  self::$opt_loop,
208
  self::$opt_modestbranding,
209
  self::$opt_rel,
210
- self::$opt_showinfo,
211
  self::$opt_fs,
212
  self::$opt_playsinline,
213
  self::$opt_autohide,
@@ -241,7 +248,7 @@ class YouTubePrefs
241
  add_action('wp_enqueue_scripts', array(get_class(), 'fitvids'), 101);
242
  }
243
 
244
- add_filter('ytprefs_gdpr_consent_message', array(get_class(), 'filter_gdpr_consent_message'));
245
 
246
  add_action("wp_ajax_my_embedplus_onboarding_save_ajax", array(get_class(), 'onboarding_save_ajax'));
247
  add_action("wp_ajax_my_embedplus_onboarding_save_apikey_ajax", array(get_class(), 'onboarding_save_apikey_ajax'));
@@ -349,6 +356,7 @@ class YouTubePrefs
349
  .clearboth {clear: both;}
350
  .pad20 {padding: 20px;}
351
  .center {text-align: center;}
 
352
  </style>
353
  <script type="text/javascript">
354
  function accclose(ele)
@@ -1196,7 +1204,7 @@ class YouTubePrefs
1196
  if (current_user_can('manage_options') && !self::vi_logged_in() && !(bool) (self::$alloptions[self::$opt_vi_hide_monetize_tab]))
1197
  {
1198
  ?>
1199
- <h3 id="h3_vi_monetize"> <a href="#"> Earn money embedding videos. <sup class="orange">new</sup> </a></h3>
1200
  <div class="h3_vi_monetize-content">
1201
  <div class="vi-registration-box">
1202
  <?php
@@ -1674,7 +1682,6 @@ class YouTubePrefs
1674
  $_loop = 0;
1675
  $_modestbranding = 0;
1676
  $_rel = 1;
1677
- $_showinfo = 1;
1678
  $_fs = 1;
1679
  $_theme = 'dark';
1680
  $_color = 'red';
@@ -1689,7 +1696,7 @@ class YouTubePrefs
1689
  $_migrate = 0;
1690
  $_migrate_youtube = 0;
1691
  $_migrate_embedplusvideo = 0;
1692
- $_controls = 2;
1693
  $_oldspacing = 1;
1694
  $_frontend_only = 1;
1695
  $_responsive = 0;
@@ -1761,7 +1768,6 @@ class YouTubePrefs
1761
  $_loop = self::tryget($arroptions, self::$opt_loop, 0);
1762
  $_modestbranding = self::tryget($arroptions, self::$opt_modestbranding, 0);
1763
  $_rel = self::tryget($arroptions, self::$opt_rel, 1);
1764
- $_showinfo = self::tryget($arroptions, self::$opt_showinfo, 1);
1765
  $_fs = self::tryget($arroptions, self::$opt_fs, 1);
1766
  $_playsinline = self::tryget($arroptions, self::$opt_playsinline, 0);
1767
  $_origin = self::tryget($arroptions, self::$opt_origin, 0);
@@ -1780,7 +1786,8 @@ class YouTubePrefs
1780
  $_migrate = self::tryget($arroptions, self::$opt_migrate, 0);
1781
  $_migrate_youtube = self::tryget($arroptions, self::$opt_migrate_youtube, 0);
1782
  $_migrate_embedplusvideo = self::tryget($arroptions, self::$opt_migrate_embedplusvideo, 0);
1783
- $_controls = self::tryget($arroptions, self::$opt_controls, 2);
 
1784
  $_oldspacing = self::tryget($arroptions, self::$opt_oldspacing, 1);
1785
  $_frontend_only = self::tryget($arroptions, self::$opt_frontend_only, $_frontend_only);
1786
  $_responsive = self::tryget($arroptions, self::$opt_responsive, 0);
@@ -1847,7 +1854,6 @@ class YouTubePrefs
1847
  self::$opt_loop => $_loop,
1848
  self::$opt_modestbranding => $_modestbranding,
1849
  self::$opt_rel => $_rel,
1850
- self::$opt_showinfo => $_showinfo,
1851
  self::$opt_fs => $_fs,
1852
  self::$opt_playsinline => $_playsinline,
1853
  self::$opt_origin => $_origin,
@@ -2390,7 +2396,8 @@ class YouTubePrefs
2390
 
2391
  if (!isset($linkparams['v']))
2392
  {
2393
- return apply_filters('the_content', wp_kses_post(self::$alloptions[self::$opt_not_live_content]));
 
2394
  }
2395
  }
2396
 
@@ -2594,9 +2601,9 @@ class YouTubePrefs
2594
 
2595
  if (self::gdpr_mode())
2596
  {
2597
- $code1 = '<div ' . $centercode . ' id="_ytid_' . rand(10000, 99999) . '" width="' . self::$defaultwidth . '" height="' . self::$defaultheight . '" ';
2598
  $code2 = ' class="__youtube_prefs__ __youtube_prefs_gdpr__ ' . ($iscontent ? '' : ' __youtube_prefs_widget__') . '" allowfullscreen data-no-lazy="1" data-skipgform_ajax_framebjll="">' .
2599
- apply_filters('ytprefs_gdpr_consent_message', wp_kses_post(self::$alloptions[self::$opt_gdpr_consent_message])) .
2600
  //apply_filters('the_content', wp_kses_post(self::$alloptions[self::$opt_gdpr_consent_message])) .
2601
  '<button type="button" class="__youtube_prefs_gdpr__">' . trim(sanitize_text_field(self::$alloptions[self::$opt_gdpr_consent_button])) .
2602
  '<img src="' . plugins_url('images/icon-check.png', __FILE__) . '" alt="accept" data-no-lazy="1" data-skipgform_ajax_framebjll="" /></button>' .
@@ -2618,26 +2625,16 @@ class YouTubePrefs
2618
  return (bool) self::$alloptions[self::$opt_gdpr_consent] && filter_input(INPUT_COOKIE, self::$gdpr_cookie_name, FILTER_SANITIZE_NUMBER_INT) != 1;
2619
  }
2620
 
2621
- public static function filter_gdpr_consent_message($content)
2622
  {
2623
  //global $wp_filter;
2624
  //$the_content_filters_current = $wp_filter['the_content']->callbacks;
2625
 
2626
- $the_content_filters = array(
2627
- 'wptexturize',
2628
- 'wpautop',
2629
- 'shortcode_unautop',
2630
- 'prepend_attachment',
2631
- 'wp_make_content_images_responsive',
2632
- 'do_shortcode',
2633
- 'convert_smilies'
2634
- );
2635
-
2636
- for ($i = 0; $i < count($the_content_filters); $i++)
2637
  {
2638
- if (function_exists($the_content_filters[$i]))
2639
  {
2640
- $content = call_user_func($the_content_filters[$i], $content);
2641
  }
2642
  }
2643
  return $content;
@@ -2908,9 +2905,9 @@ class YouTubePrefs
2908
  $new_pointer_content = '<h3>' . __('New Update') . '</h3>'; // ooopointer
2909
 
2910
  $new_pointer_content .= '<p>'; // ooopointer
2911
- //$new_pointer_content .= "This version provides clearer instructions for many options across the plugin&apos;s settings and wizard pages in both Free and <a target=_blank href=" . self::$epbase . '/dashboard/pro-easy-video-analytics.aspx?ref=frompointer' . ">Pro versions &raquo;</a>";
2912
- $new_pointer_content .= "This version brings back the ability to hide related/suggested videos that show up at the end of YouTube embeds. It also allows monetized sites that are embedding video intelligence (vi) ads to select multiple IAB categories to get more content variety. "
2913
- . (self::vi_logged_in() ? "<a href=\"" . admin_url('admin.php?page=youtube-ep-vi') . "\">Login here to see &raquo;</a>" : "<a rel=\"#jumpmonetize\" class=\"epyt-jumptab\" href=\"" . admin_url('admin.php?page=youtube-my-preferences#jumpmonetize') . "\">Login here to see &raquo;</a>");
2914
 
2915
  if (!empty(self::$alloptions[self::$opt_pro]) && strlen(trim(self::$alloptions[self::$opt_pro])) > 0)
2916
  {
@@ -2957,7 +2954,7 @@ class YouTubePrefs
2957
  else
2958
  {
2959
  ?>
2960
- <a class="nav-tab" href="#jumpmonetize">Monetize? <sup class="orange">new</sup></a>
2961
  <?php
2962
  }
2963
  }
@@ -3006,12 +3003,10 @@ class YouTubePrefs
3006
  $new_options[self::$opt_iv_load_policy] = self::postchecked(self::$opt_iv_load_policy) ? 1 : 3;
3007
  $new_options[self::$opt_loop] = self::postchecked(self::$opt_loop) ? 1 : 0;
3008
  $new_options[self::$opt_modestbranding] = self::postchecked(self::$opt_modestbranding) ? 1 : 0;
3009
- //$new_options[self::$opt_rel] = self::postchecked(self::$opt_rel) ? 1 : 0;
3010
- $new_options[self::$opt_showinfo] = self::postchecked(self::$opt_showinfo) ? 1 : 0;
3011
  $new_options[self::$opt_fs] = self::postchecked(self::$opt_fs) ? 1 : 0;
3012
  $new_options[self::$opt_playsinline] = self::postchecked(self::$opt_playsinline) ? 1 : 0;
3013
  $new_options[self::$opt_origin] = self::postchecked(self::$opt_origin) ? 1 : 0;
3014
- $new_options[self::$opt_controls] = self::postchecked(self::$opt_controls) ? 2 : 0;
3015
  $new_options[self::$opt_color] = self::postchecked(self::$opt_color) ? 'red' : 'white';
3016
  $new_options[self::$opt_nocookie] = self::postchecked(self::$opt_nocookie) ? 1 : 0;
3017
  $new_options[self::$opt_gdpr_consent] = self::postchecked(self::$opt_gdpr_consent) ? 1 : 0;
@@ -3539,14 +3534,6 @@ class YouTubePrefs
3539
  <input type="radio" name="<?php echo self::$opt_rel; ?>" id="<?php echo self::$opt_rel; ?>1" value="1" <?php checked($all[self::$opt_rel], 1); ?>>
3540
  <label for="<?php echo self::$opt_rel; ?>1">Show related videos</label> &nbsp;&nbsp;
3541
  </p>
3542
- <p>
3543
- <input name="<?php echo self::$opt_showinfo; ?>" id="<?php echo self::$opt_showinfo; ?>" <?php checked($all[self::$opt_showinfo], 1); ?> type="checkbox" class="checkbox">
3544
- <label for="<?php echo self::$opt_showinfo; ?>">
3545
- <b class="chktitle">Show Title:</b>
3546
- <strong>Google/YouTube no longer allows tools to control this feature. Learn more about the <a target="_blank" href="https://developers.google.com/youtube/player_parameters#Revision_History">deprecation of this feature here</a>.</strong>
3547
- <span class="epyt-deprecated">Show the video title and other info.</span>
3548
- </label>
3549
- </p>
3550
  <p>
3551
  <input name="<?php echo self::$opt_fs; ?>" id="<?php echo self::$opt_fs; ?>" <?php checked($all[self::$opt_fs], 1); ?> type="checkbox" class="checkbox">
3552
  <label for="<?php echo self::$opt_fs; ?>"><?php _e('<b class="chktitle">Show Fullscreen Button:</b> Show the fullscreen button.') ?></label>
@@ -3566,7 +3553,7 @@ class YouTubePrefs
3566
  Height: <input type="text" name="<?php echo self::$opt_defaultheight; ?>" id="<?php echo self::$opt_defaultheight; ?>" value="<?php echo esc_attr(trim($all[self::$opt_defaultheight])); ?>" class="textinput" style="width: 50px;">
3567
  </span>
3568
 
3569
- <label for="<?php echo self::$opt_defaultdims; ?>"><?php _e('<b class="chktitle">Default Dimensions:</b> Make your videos have a default size. (NOTE: Checking the responsive option will override this size setting) ') ?></label>
3570
  </p>
3571
  <p>
3572
  <input name="<?php echo self::$opt_responsive; ?>" id="<?php echo self::$opt_responsive; ?>" <?php checked($all[self::$opt_responsive], 1); ?> type="checkbox" class="checkbox">
@@ -3596,7 +3583,7 @@ class YouTubePrefs
3596
  </label>
3597
  </p>
3598
  <p>
3599
- <input name="<?php echo self::$opt_controls; ?>" id="<?php echo self::$opt_controls; ?>" <?php checked($all[self::$opt_controls], 2); ?> type="checkbox" class="checkbox">
3600
  <label for="<?php echo self::$opt_controls; ?>"><b class="chktitle">Show Controls:</b> Show the player's control bar. Unchecking this option creates a cleaner look but limits what your viewers can control (play position, volume, etc.).</label>
3601
  </p>
3602
  <p>
@@ -3642,7 +3629,7 @@ class YouTubePrefs
3642
  <p id="not_live_content_scroll">
3643
  <label for="<?php echo self::$opt_not_live_content; ?>">
3644
  <b class="chktitle">Default "Not Live" Content:</b>
3645
- When your channel is not streaming live, the YouTube live player will be inactive.
3646
  Instead of showing that player, you can display some "coming soon" content in that space for your visitors to see until your channel begins to live stream.
3647
  The plugin will automatically switch to your channel's live stream once it's active.
3648
  Below, enter what you would like to appear until then. <strong><span class="orange">NOTE:</span> Do not put another live stream embed below.</strong>
@@ -4090,10 +4077,9 @@ class YouTubePrefs
4090
  _e("<li><strong>loop</strong> - Set this to 1 to loop the video (or 0 to not loop). <em>Example: http://www.youtube.com/watch?v=quwebVjAEJA<strong>&loop=1</strong></em> </li>");
4091
  _e("<li><strong>modestbranding</strong> - Set this to 1 to remove the YouTube logo while playing (or 0 to show the logo). <em>Example: http://www.youtube.com/watch?v=quwebVjAEJA<strong>&modestbranding=1</strong></em> </li>");
4092
  _e("<li><strong>rel</strong> - Set this to 0 to not show related videos at the end of playing (or 1 to show them). <em>Example: http://www.youtube.com/watch?v=quwebVjAEJA<strong>&rel=0</strong></em> </li>");
4093
- _e("<li><strong>showinfo</strong> - Set this to 0 to hide the video title and other info (or 1 to show it). <em>Example: http://www.youtube.com/watch?v=quwebVjAEJA<strong>&showinfo=0</strong></em> </li>");
4094
  _e("<li><strong>fs</strong> - Set this to 0 to hide the fullscreen button (or 1 to show it). <em>Example: http://www.youtube.com/watch?v=quwebVjAEJA<strong>&fs=0</strong></em> </li>");
4095
  _e("<li><strong>color</strong> - Set this to 'white' to make the player have a white progress bar (or 'red' for a red progress bar). Note: Using white will disable the modestbranding option. <em>Example: http://www.youtube.com/watch?v=quwebVjAEJA<strong>&color=white</strong></em> </li>");
4096
- _e("<li><strong>controls</strong> - Set this to 0 to completely hide the video controls (or 2 to show it). <em>Example: http://www.youtube.com/watch?v=quwebVjAEJA<strong>&controls=0</strong></em> </li>");
4097
  _e("<li><strong>playsinline</strong> - Set this to 1 to allow videos play inline with the page on iOS browsers. (Set to 0 to have iOS launch videos in fullscreen instead). <em>Example: http://www.youtube.com/watch?v=quwebVjAEJA<strong>&playsinline=1</strong></em> </li>");
4098
  _e("<li><strong>origin</strong> - Set this to 1 to add the 'origin' parameter for extra JavaScript security. <em>Example: http://www.youtube.com/watch?v=quwebVjAEJA<strong>&origin=1</strong></em> </li>");
4099
  _e('</ul>');
@@ -4729,7 +4715,7 @@ class YouTubePrefs
4729
  <img class="yob-standalone-icon" src="<?php echo plugins_url('images/icon-playlist-self.png', __FILE__) ?>"/>
4730
  <img class="yob-live-icon" src="<?php echo plugins_url('images/icon-player-live.png', __FILE__) ?>"/>
4731
  <img class="yob-privacy-icon" src="<?php echo plugins_url('images/icon-player-privacy.png', __FILE__) ?>"/>
4732
- <img class="yob-monetize-icon" src="<?php echo plugins_url('images/icon-player-money.png', __FILE__) ?>"/>
4733
  </div>
4734
  <ul class="ytprefs-ob-filter">
4735
  <li><label><input type="checkbox" data-obfilter="yob-single" /> Single videos.</label></li>
@@ -4737,7 +4723,7 @@ class YouTubePrefs
4737
  <li><label><input type="checkbox" data-obfilter="yob-standalone" /> Self-contained playlists or channels (no thumbnails, just YouTube's standard playlist player).</label></li>
4738
  <li><label><input type="checkbox" data-obfilter="yob-live" /> Live streams.</label></li>
4739
  <li style="display:none;"><label><input type="checkbox" data-obfilter="yob-privacy" /> With GDPR / privacy features.</label></li>
4740
- <li><label><input type="checkbox" data-obfilter="yob-monetize" /> Relevant video ads that earn me up to 10x higher CPMs (revenue) than display advertising.</label></li>
4741
  </ul>
4742
  <div class="ytprefs-ob-nav">
4743
  <button type="button" class="button-secondary ytprefs-ob-nav-close">Cancel</button>
@@ -4806,7 +4792,7 @@ class YouTubePrefs
4806
  <p>
4807
  <label for="<?php echo self::$opt_not_live_content; ?>">
4808
  <b class="chktitle">Default "Not Live" Content:</b>
4809
- When your channel is not streaming live, the YouTube live player will be inactive.
4810
  Instead of showing that player, you can display some "coming soon" content in that space for your visitors to see until your channel begins to live stream.
4811
  The plugin will automatically switch to your channel's live stream once it's active.
4812
  Below, enter what you would like to appear until then. <strong><span class="orange">NOTE:</span> Do not put another live stream embed below.</strong>
3
  Plugin Name: YouTube
4
  Plugin URI: https://www.embedplus.com/dashboard/pro-easy-video-analytics.aspx?ref=plugin
5
  Description: YouTube Embed and YouTube Gallery WordPress Plugin. Embed a responsive video, YouTube channel, playlist gallery, or live stream
6
+ Version: 13.1.1
7
  Author: EmbedPlus Team
8
  Author URI: https://www.embedplus.com
9
  */
34
 
35
  public static $folder_name = 'youtube-embed-plus';
36
  public static $curltimeout = 30;
37
+ public static $version = '13.1.1';
38
  public static $opt_version = 'version';
39
  public static $optembedwidth = null;
40
  public static $optembedheight = null;
51
  public static $opt_loop = 'loop';
52
  public static $opt_modestbranding = 'modestbranding';
53
  public static $opt_rel = 'rel';
 
54
  public static $opt_fs = 'fs';
55
  public static $opt_playsinline = 'playsinline';
56
  public static $opt_autohide = 'autohide';
123
  public static $wizard_hook = '';
124
  public static $onboarding_hook = '';
125
  public static $admin_page_hooks = array();
126
+ public static $the_content_filters = array(
127
+ 'wptexturize',
128
+ 'wpautop',
129
+ 'shortcode_unautop',
130
+ 'prepend_attachment',
131
+ 'wp_make_content_images_responsive',
132
+ 'do_shortcode',
133
+ 'convert_smilies'
134
+ );
135
  public static $get_api_key_msg = 'The ### feature now requires a (free) YouTube API key from Google. Please follow the easy steps <a href="https://www.youtube.com/watch?v=6gD0X76-v_g" target="_blank">in this video</a> to create and save your API key.';
136
  public static $dft_gdpr_consent_message = '<p><strong>Please accept YouTube cookies to play this video.</strong> By accepting you will be accessing content from YouTube, a service provided by an external third party.</p><p><a href="https://policies.google.com/privacy" target="_blank">YouTube privacy policy</a></p><p>If you accept this notice, your choice will be saved and the page will refresh.</p>';
137
  ///////////////////////////////////////////////////////////////////////////////////////////////////
215
  self::$opt_loop,
216
  self::$opt_modestbranding,
217
  self::$opt_rel,
 
218
  self::$opt_fs,
219
  self::$opt_playsinline,
220
  self::$opt_autohide,
248
  add_action('wp_enqueue_scripts', array(get_class(), 'fitvids'), 101);
249
  }
250
 
251
+ add_filter('ytprefs_filter_the_content_light', array(get_class(), 'filter_the_content_light'));
252
 
253
  add_action("wp_ajax_my_embedplus_onboarding_save_ajax", array(get_class(), 'onboarding_save_ajax'));
254
  add_action("wp_ajax_my_embedplus_onboarding_save_apikey_ajax", array(get_class(), 'onboarding_save_apikey_ajax'));
356
  .clearboth {clear: both;}
357
  .pad20 {padding: 20px;}
358
  .center {text-align: center;}
359
+ #screen-meta-links {display: none;}
360
  </style>
361
  <script type="text/javascript">
362
  function accclose(ele)
1204
  if (current_user_can('manage_options') && !self::vi_logged_in() && !(bool) (self::$alloptions[self::$opt_vi_hide_monetize_tab]))
1205
  {
1206
  ?>
1207
+ <h3 id="h3_vi_monetize"> <a href="#"> Earn money embedding videos. </a></h3>
1208
  <div class="h3_vi_monetize-content">
1209
  <div class="vi-registration-box">
1210
  <?php
1682
  $_loop = 0;
1683
  $_modestbranding = 0;
1684
  $_rel = 1;
 
1685
  $_fs = 1;
1686
  $_theme = 'dark';
1687
  $_color = 'red';
1696
  $_migrate = 0;
1697
  $_migrate_youtube = 0;
1698
  $_migrate_embedplusvideo = 0;
1699
+ $_controls = 1;
1700
  $_oldspacing = 1;
1701
  $_frontend_only = 1;
1702
  $_responsive = 0;
1768
  $_loop = self::tryget($arroptions, self::$opt_loop, 0);
1769
  $_modestbranding = self::tryget($arroptions, self::$opt_modestbranding, 0);
1770
  $_rel = self::tryget($arroptions, self::$opt_rel, 1);
 
1771
  $_fs = self::tryget($arroptions, self::$opt_fs, 1);
1772
  $_playsinline = self::tryget($arroptions, self::$opt_playsinline, 0);
1773
  $_origin = self::tryget($arroptions, self::$opt_origin, 0);
1786
  $_migrate = self::tryget($arroptions, self::$opt_migrate, 0);
1787
  $_migrate_youtube = self::tryget($arroptions, self::$opt_migrate_youtube, 0);
1788
  $_migrate_embedplusvideo = self::tryget($arroptions, self::$opt_migrate_embedplusvideo, 0);
1789
+ $_controls = self::tryget($arroptions, self::$opt_controls, 1);
1790
+ $_controls = $_controls == 2 ? 1 : $_controls;
1791
  $_oldspacing = self::tryget($arroptions, self::$opt_oldspacing, 1);
1792
  $_frontend_only = self::tryget($arroptions, self::$opt_frontend_only, $_frontend_only);
1793
  $_responsive = self::tryget($arroptions, self::$opt_responsive, 0);
1854
  self::$opt_loop => $_loop,
1855
  self::$opt_modestbranding => $_modestbranding,
1856
  self::$opt_rel => $_rel,
 
1857
  self::$opt_fs => $_fs,
1858
  self::$opt_playsinline => $_playsinline,
1859
  self::$opt_origin => $_origin,
2396
 
2397
  if (!isset($linkparams['v']))
2398
  {
2399
+ //return apply_filters('the_content', wp_kses_post(self::$alloptions[self::$opt_not_live_content]));
2400
+ return apply_filters('ytprefs_filter_the_content_light', wp_kses_post(self::$alloptions[self::$opt_not_live_content]));
2401
  }
2402
  }
2403
 
2601
 
2602
  if (self::gdpr_mode())
2603
  {
2604
+ $code1 = '<div ' . $centercode . ' id="_ytid_' . rand(10000, 99999) . '"'; //'" width="' . self::$defaultwidth . '" height="' . self::$defaultheight . '" ';
2605
  $code2 = ' class="__youtube_prefs__ __youtube_prefs_gdpr__ ' . ($iscontent ? '' : ' __youtube_prefs_widget__') . '" allowfullscreen data-no-lazy="1" data-skipgform_ajax_framebjll="">' .
2606
+ apply_filters('ytprefs_filter_the_content_light', wp_kses_post(self::$alloptions[self::$opt_gdpr_consent_message])) .
2607
  //apply_filters('the_content', wp_kses_post(self::$alloptions[self::$opt_gdpr_consent_message])) .
2608
  '<button type="button" class="__youtube_prefs_gdpr__">' . trim(sanitize_text_field(self::$alloptions[self::$opt_gdpr_consent_button])) .
2609
  '<img src="' . plugins_url('images/icon-check.png', __FILE__) . '" alt="accept" data-no-lazy="1" data-skipgform_ajax_framebjll="" /></button>' .
2625
  return (bool) self::$alloptions[self::$opt_gdpr_consent] && filter_input(INPUT_COOKIE, self::$gdpr_cookie_name, FILTER_SANITIZE_NUMBER_INT) != 1;
2626
  }
2627
 
2628
+ public static function filter_the_content_light($content)
2629
  {
2630
  //global $wp_filter;
2631
  //$the_content_filters_current = $wp_filter['the_content']->callbacks;
2632
 
2633
+ for ($i = 0; $i < count(self::$the_content_filters); $i++)
 
 
 
 
 
 
 
 
 
 
2634
  {
2635
+ if (function_exists(self::$the_content_filters[$i]))
2636
  {
2637
+ $content = call_user_func(self::$the_content_filters[$i], $content);
2638
  }
2639
  }
2640
  return $content;
2905
  $new_pointer_content = '<h3>' . __('New Update') . '</h3>'; // ooopointer
2906
 
2907
  $new_pointer_content .= '<p>'; // ooopointer
2908
+ $new_pointer_content .= "This version fixes a few issues relating to gallery autonext, &quot;not live&quot; content, and deprecated API parameters for both the Free and <a target=_blank href=" . self::$epbase . '/dashboard/pro-easy-video-analytics.aspx?ref=frompointer' . ">Pro versions &raquo;</a>";
2909
+ //$new_pointer_content .= "This version brings back the ability to hide related/suggested videos that show up at the end of YouTube embeds. It also allows monetized sites that are embedding video intelligence (vi) ads to select multiple IAB categories to get more content variety. "
2910
+ //. (self::vi_logged_in() ? "<a href=\"" . admin_url('admin.php?page=youtube-ep-vi') . "\">Login here to see &raquo;</a>" : "<a rel=\"#jumpmonetize\" class=\"epyt-jumptab\" href=\"" . admin_url('admin.php?page=youtube-my-preferences#jumpmonetize') . "\">Login here to see &raquo;</a>");
2911
 
2912
  if (!empty(self::$alloptions[self::$opt_pro]) && strlen(trim(self::$alloptions[self::$opt_pro])) > 0)
2913
  {
2954
  else
2955
  {
2956
  ?>
2957
+ <a class="nav-tab" href="#jumpmonetize">Monetize</a>
2958
  <?php
2959
  }
2960
  }
3003
  $new_options[self::$opt_iv_load_policy] = self::postchecked(self::$opt_iv_load_policy) ? 1 : 3;
3004
  $new_options[self::$opt_loop] = self::postchecked(self::$opt_loop) ? 1 : 0;
3005
  $new_options[self::$opt_modestbranding] = self::postchecked(self::$opt_modestbranding) ? 1 : 0;
 
 
3006
  $new_options[self::$opt_fs] = self::postchecked(self::$opt_fs) ? 1 : 0;
3007
  $new_options[self::$opt_playsinline] = self::postchecked(self::$opt_playsinline) ? 1 : 0;
3008
  $new_options[self::$opt_origin] = self::postchecked(self::$opt_origin) ? 1 : 0;
3009
+ $new_options[self::$opt_controls] = self::postchecked(self::$opt_controls) ? 1 : 0;
3010
  $new_options[self::$opt_color] = self::postchecked(self::$opt_color) ? 'red' : 'white';
3011
  $new_options[self::$opt_nocookie] = self::postchecked(self::$opt_nocookie) ? 1 : 0;
3012
  $new_options[self::$opt_gdpr_consent] = self::postchecked(self::$opt_gdpr_consent) ? 1 : 0;
3534
  <input type="radio" name="<?php echo self::$opt_rel; ?>" id="<?php echo self::$opt_rel; ?>1" value="1" <?php checked($all[self::$opt_rel], 1); ?>>
3535
  <label for="<?php echo self::$opt_rel; ?>1">Show related videos</label> &nbsp;&nbsp;
3536
  </p>
 
 
 
 
 
 
 
 
3537
  <p>
3538
  <input name="<?php echo self::$opt_fs; ?>" id="<?php echo self::$opt_fs; ?>" <?php checked($all[self::$opt_fs], 1); ?> type="checkbox" class="checkbox">
3539
  <label for="<?php echo self::$opt_fs; ?>"><?php _e('<b class="chktitle">Show Fullscreen Button:</b> Show the fullscreen button.') ?></label>
3553
  Height: <input type="text" name="<?php echo self::$opt_defaultheight; ?>" id="<?php echo self::$opt_defaultheight; ?>" value="<?php echo esc_attr(trim($all[self::$opt_defaultheight])); ?>" class="textinput" style="width: 50px;">
3554
  </span>
3555
 
3556
+ <label for="<?php echo self::$opt_defaultdims; ?>"><?php _e('<b class="chktitle">Default Dimensions:</b> Make your videos have a default size. Recommended: 800 x 450 (NOTE: If responsive sizing is also turned on, your videos will be responsive but also keep this aspect ratio.) ') ?></label>
3557
  </p>
3558
  <p>
3559
  <input name="<?php echo self::$opt_responsive; ?>" id="<?php echo self::$opt_responsive; ?>" <?php checked($all[self::$opt_responsive], 1); ?> type="checkbox" class="checkbox">
3583
  </label>
3584
  </p>
3585
  <p>
3586
+ <input name="<?php echo self::$opt_controls; ?>" id="<?php echo self::$opt_controls; ?>" <?php checked($all[self::$opt_controls], 1); ?> type="checkbox" class="checkbox">
3587
  <label for="<?php echo self::$opt_controls; ?>"><b class="chktitle">Show Controls:</b> Show the player's control bar. Unchecking this option creates a cleaner look but limits what your viewers can control (play position, volume, etc.).</label>
3588
  </p>
3589
  <p>
3629
  <p id="not_live_content_scroll">
3630
  <label for="<?php echo self::$opt_not_live_content; ?>">
3631
  <b class="chktitle">Default "Not Live" Content:</b>
3632
+ When your channel is not streaming live, the YouTube live player will simply display a countdown.
3633
  Instead of showing that player, you can display some "coming soon" content in that space for your visitors to see until your channel begins to live stream.
3634
  The plugin will automatically switch to your channel's live stream once it's active.
3635
  Below, enter what you would like to appear until then. <strong><span class="orange">NOTE:</span> Do not put another live stream embed below.</strong>
4077
  _e("<li><strong>loop</strong> - Set this to 1 to loop the video (or 0 to not loop). <em>Example: http://www.youtube.com/watch?v=quwebVjAEJA<strong>&loop=1</strong></em> </li>");
4078
  _e("<li><strong>modestbranding</strong> - Set this to 1 to remove the YouTube logo while playing (or 0 to show the logo). <em>Example: http://www.youtube.com/watch?v=quwebVjAEJA<strong>&modestbranding=1</strong></em> </li>");
4079
  _e("<li><strong>rel</strong> - Set this to 0 to not show related videos at the end of playing (or 1 to show them). <em>Example: http://www.youtube.com/watch?v=quwebVjAEJA<strong>&rel=0</strong></em> </li>");
 
4080
  _e("<li><strong>fs</strong> - Set this to 0 to hide the fullscreen button (or 1 to show it). <em>Example: http://www.youtube.com/watch?v=quwebVjAEJA<strong>&fs=0</strong></em> </li>");
4081
  _e("<li><strong>color</strong> - Set this to 'white' to make the player have a white progress bar (or 'red' for a red progress bar). Note: Using white will disable the modestbranding option. <em>Example: http://www.youtube.com/watch?v=quwebVjAEJA<strong>&color=white</strong></em> </li>");
4082
+ _e("<li><strong>controls</strong> - Set this to 0 to completely hide the video controls (or 1 to show it). <em>Example: http://www.youtube.com/watch?v=quwebVjAEJA<strong>&controls=0</strong></em> </li>");
4083
  _e("<li><strong>playsinline</strong> - Set this to 1 to allow videos play inline with the page on iOS browsers. (Set to 0 to have iOS launch videos in fullscreen instead). <em>Example: http://www.youtube.com/watch?v=quwebVjAEJA<strong>&playsinline=1</strong></em> </li>");
4084
  _e("<li><strong>origin</strong> - Set this to 1 to add the 'origin' parameter for extra JavaScript security. <em>Example: http://www.youtube.com/watch?v=quwebVjAEJA<strong>&origin=1</strong></em> </li>");
4085
  _e('</ul>');
4715
  <img class="yob-standalone-icon" src="<?php echo plugins_url('images/icon-playlist-self.png', __FILE__) ?>"/>
4716
  <img class="yob-live-icon" src="<?php echo plugins_url('images/icon-player-live.png', __FILE__) ?>"/>
4717
  <img class="yob-privacy-icon" src="<?php echo plugins_url('images/icon-player-privacy.png', __FILE__) ?>"/>
4718
+ <!-- <img class="yob-monetize-icon" src="<?php echo plugins_url('images/icon-player-money.png', __FILE__) ?>"/>-->
4719
  </div>
4720
  <ul class="ytprefs-ob-filter">
4721
  <li><label><input type="checkbox" data-obfilter="yob-single" /> Single videos.</label></li>
4723
  <li><label><input type="checkbox" data-obfilter="yob-standalone" /> Self-contained playlists or channels (no thumbnails, just YouTube's standard playlist player).</label></li>
4724
  <li><label><input type="checkbox" data-obfilter="yob-live" /> Live streams.</label></li>
4725
  <li style="display:none;"><label><input type="checkbox" data-obfilter="yob-privacy" /> With GDPR / privacy features.</label></li>
4726
+ <!-- <li><label><input type="checkbox" data-obfilter="yob-monetize" /> Relevant video ads that earn me up to 10x higher CPMs (revenue) than display advertising.</label></li>-->
4727
  </ul>
4728
  <div class="ytprefs-ob-nav">
4729
  <button type="button" class="button-secondary ytprefs-ob-nav-close">Cancel</button>
4792
  <p>
4793
  <label for="<?php echo self::$opt_not_live_content; ?>">
4794
  <b class="chktitle">Default "Not Live" Content:</b>
4795
+ When your channel is not streaming live, the YouTube live player will simply display a countdown.
4796
  Instead of showing that player, you can display some "coming soon" content in that space for your visitors to see until your channel begins to live stream.
4797
  The plugin will automatically switch to your channel's live stream once it's active.
4798
  Below, enter what you would like to appear until then. <strong><span class="orange">NOTE:</span> Do not put another live stream embed below.</strong>