YouTube - Version 13.4

Version Description

Download this release

Release Info

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

Code changes from version 13.3.1 to 13.4

dist/blocks.editor.build.css CHANGED
@@ -1 +1 @@
1
- .components-modal__frame.epytblock__modal{position:absolute;top:25px;left:50%;-webkit-transform:translateX(-50%);-ms-transform:translateX(-50%);transform:translateX(-50%);width:950px;max-width:90%;height:calc(100vh - 50px);max-height:calc(100vh - 50px)}.components-modal__frame.epytblock__modal .components-modal__header{margin:0}.components-modal__frame.epytblock__modal .components-modal__content{padding:0}.components-modal__frame.epytblock__modal iframe{width:100%;height:calc(100% - 60px);display:block}.epytblock .components-placeholder__fieldset{max-width:100%}.edit-post-visual-editor .block-editor-block-list__block[data-type="epyt/youtube"]>div:first-child{padding-top:16px;padding-bottom:16px}
1
+ .components-modal__frame.epytblock__modal{position:absolute;top:25px;left:50%;-webkit-transform:translateX(-50%);-ms-transform:translateX(-50%);transform:translateX(-50%);width:950px;max-width:90%;height:calc(100vh - 50px);max-height:calc(100vh - 50px)}.components-modal__frame.epytblock__modal .components-modal__header{margin:0}.components-modal__frame.epytblock__modal .components-modal__content{padding:0}.components-modal__frame.epytblock__modal iframe{width:100%;height:calc(100% - 60px);display:block}.epytblock .components-placeholder__fieldset{max-width:100%}.wp-block.has-selected-ui[data-type="epyt/youtube"]>div::after{content:"";position:absolute;top:0;left:0;right:0;bottom:0;opacity:0;cursor:pointer}.wp-block.has-selected-ui.is-selected>div::after,.wp-block.has-selected-ui>div.components-placeholder::after{display:none}
readme.txt CHANGED
@@ -4,16 +4,16 @@ Plugin Name: Embed Plus for YouTube - Gallery, Channel, Playlist, Live Stream
4
  Tags: youtube gallery, video gallery, youtube channel, youtube live, live stream
5
  Requires at least: 4.1
6
  Tested up to: 5.4
7
- Stable tag: 13.3.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)
11
 
12
  == Description ==
13
 
14
- **Your WordPress YouTube embed, YouTube gallery (channel and playlist), and even YouTube livestream or premiere can be customized in a wide variety of ways with this plugin. Here are a few recently added features:**
15
 
16
- * Compatible with the WordPress Gutenberg block editor (it also stays backwards-compatible with the classic editor). Both the Gutenberg block selector and the Gutenberg classic block will show the YouTube wizard button. For the Gutenberg block selector, click on the (+) sign for the block editor list. The YouTube Wizard block is located under the "Embeds" category (make sure you choose "YouTube **Wizard**"). See more on [how to embed a YouTube video, gallery, or livestream with the WordPress Gutenberg block editor here >>](https://www.embedplus.com/embed-youtube-video-gallery-livestream-wordpress-gutenberg-block-editor.aspx)
17
  * Privacy and Consent - Improved privacy and GDPR compliance options like YouTube no cookie, YouTube API restrictions, and a customizable GDPR consent message
18
  * YouTube gallery capability (channel and playlist) – The ability to make playlist and channel embeds have a gallery layout. By default, the plugin can generate a grid-based [responsive playlist or channel gallery >>](https://www.embedplus.com/responsive-youtube-playlist-channel-gallery-for-wordpress.aspx). Your visitors can browse through pages of video thumbnails and choose from videos that are pulled from an entire YouTube channel or playlist.
19
  * YouTube gallery auto continuous play - embed a playlist or channel gallery and allow it to play one video after the next without requiring viewers to click a thumbnail
@@ -151,6 +151,11 @@ You can also start and end each individual video at particular times. Like the a
151
 
152
  == Changelog ==
153
 
 
 
 
 
 
154
  = Embed Plus for YouTube WordPress Plugin 13.3.1 =
155
  * Fix simultaneous playback control issue
156
  * Add support for premiere video embedding
4
  Tags: youtube gallery, video gallery, youtube channel, youtube live, live stream
5
  Requires at least: 4.1
6
  Tested up to: 5.4
7
+ Stable tag: 13.4
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)
11
 
12
  == Description ==
13
 
14
+ **A WordPress YouTube embed, YouTube gallery (channel or playlist), and even YouTube livestream or premiere can be customized in a wide variety of ways with this plugin. Here are a few recently added features:**
15
 
16
+ * Compatible with the WordPress Gutenberg block editor (it also stays backwards-compatible with the classic editor). Both the Gutenberg block selector and the Gutenberg classic block will show the YouTube wizard button. For the Gutenberg block selector, click on the (+) sign for the block editor list. The YouTube Wizard block is located under the "Embeds" category (make sure you choose "YouTube **Wizard**"). See more on [how to embed a YouTube video, gallery, or livestream with the WordPress Gutenberg block editor here >>](https://www.embedplus.com/embed-youtube-video-gallery-livestream-wordpress-gutenberg-block-editor.aspx) The plugin is also compatible with several popular page builders like [Elementor](https://www.youtube.com/watch?v=ldNfIGRTxDU), [Beaver Builder](https://www.youtube.com/watch?v=bPgz0jyt7TE), [SiteOrigin](https://www.youtube.com/watch?v=7QNYw_g-7WM), and [Visual Composer](https://www.youtube.com/watch?v=FWBQc9XhAqM). For these and pretty much any other page builder with a short code widget, you can also embed your video, gallery, live stream, or premiere by creating the short code in the plugin's wizard and then embedding the code in the page builder's short code widget or text widget.
17
  * Privacy and Consent - Improved privacy and GDPR compliance options like YouTube no cookie, YouTube API restrictions, and a customizable GDPR consent message
18
  * YouTube gallery capability (channel and playlist) – The ability to make playlist and channel embeds have a gallery layout. By default, the plugin can generate a grid-based [responsive playlist or channel gallery >>](https://www.embedplus.com/responsive-youtube-playlist-channel-gallery-for-wordpress.aspx). Your visitors can browse through pages of video thumbnails and choose from videos that are pulled from an entire YouTube channel or playlist.
19
  * YouTube gallery auto continuous play - embed a playlist or channel gallery and allow it to play one video after the next without requiring viewers to click a thumbnail
151
 
152
  == Changelog ==
153
 
154
+ = Embed Plus for YouTube WordPress Plugin 13.4 =
155
+ * Better compatibility with themes that use the Gutenberg block editor and responsive sizing
156
+ * Fix notice on new installs
157
+ * Add pagebuilder tips to Wizard tab of the documentation
158
+
159
  = Embed Plus for YouTube WordPress Plugin 13.3.1 =
160
  * Fix simultaneous playback control issue
161
  * Add support for premiere video embedding
scripts/fitvids.js CHANGED
@@ -75,12 +75,24 @@ var epdofitvids = epdofitvids || function ($)
75
  $this.attr('id', videoID);
76
  }
77
 
 
 
78
  if ($this.parent().hasClass('epyt-video-wrapper'))
79
  {
80
  try
81
  {
82
  $this.parent().addClass('fluid-width-video-wrapper').attr('style', 'padding-top: ' + (aspectRatio * 100) + "% !important;");
83
  $this.removeAttr('height').removeAttr('width');
 
 
 
 
 
 
 
 
 
 
84
  }
85
  catch (wraperr)
86
  {
@@ -94,6 +106,16 @@ var epdofitvids = epdofitvids || function ($)
94
  {
95
  $this.wrap(fwvwrap).parent('.fluid-width-video-wrapper').attr('style', 'padding-top: ' + (aspectRatio * 100) + "% !important;");
96
  $this.removeAttr('height').removeAttr('width');
 
 
 
 
 
 
 
 
 
 
97
  }
98
  catch (wraperr)
99
  {
75
  $this.attr('id', videoID);
76
  }
77
 
78
+ var attrWidth = $this.attr('width');
79
+ var attrHeight = $this.attr('height');
80
  if ($this.parent().hasClass('epyt-video-wrapper'))
81
  {
82
  try
83
  {
84
  $this.parent().addClass('fluid-width-video-wrapper').attr('style', 'padding-top: ' + (aspectRatio * 100) + "% !important;");
85
  $this.removeAttr('height').removeAttr('width');
86
+
87
+ setTimeout(function ()
88
+ {
89
+ if (parseInt($this.parent().css('padding-top'), 10) > $this.height() + 20)
90
+ {
91
+ $this.parent().removeClass('fluid-width-video-wrapper').css('padding-top', '');
92
+ $this.attr('width', attrWidth);
93
+ $this.attr('height', attrHeight);
94
+ }
95
+ }, 100);
96
  }
97
  catch (wraperr)
98
  {
106
  {
107
  $this.wrap(fwvwrap).parent('.fluid-width-video-wrapper').attr('style', 'padding-top: ' + (aspectRatio * 100) + "% !important;");
108
  $this.removeAttr('height').removeAttr('width');
109
+
110
+ setTimeout(function ()
111
+ {
112
+ if (parseInt($this.parent().css('padding-top'), 10) > $this.height() + 20)
113
+ {
114
+ $this.parent().removeClass('fluid-width-video-wrapper').css('padding-top', '');
115
+ $this.attr('width', attrWidth);
116
+ $this.attr('height', attrHeight);
117
+ }
118
+ }, 100);
119
  }
120
  catch (wraperr)
121
  {
scripts/fitvids.min.js CHANGED
@@ -1,2 +1,2 @@
1
 
2
- var epdofitvids=epdofitvids||function(a){a.fn.fitVidsEP=function(b){if(_EPYT_.epresponsiveselector.constructor!==Array){_EPYT_.epresponsiveselector=JSON.parse(_EPYT_.epresponsiveselector)}var c={customSelector:null};if(!document.getElementById("fit-vids-style")){var f=document.createElement("div"),d=document.getElementsByTagName("base")[0]||document.getElementsByTagName("script")[0],e="&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>";f.className="fit-vids-style";f.id="fit-vids-style";f.style.display="none";f.innerHTML=e;d.parentNode.insertBefore(f,d)}if(b){a.extend(c,b)}return this.each(function(){var g=_EPYT_.epresponsiveselector;if(c.customSelector){g.push(c.customSelector)}var h=a(this).find(g.join(","));h=h.not("object object");h.each(function(){var o=a(this);if(this.tagName.toLowerCase()==="embed"&&o.parent("object").length||o.parent(".fluid-width-video-wrapper").length||o.css("position")==="absolute"){return}if(o.is("[data-origwidth]:not([width])")){o.attr("width",o.data("origwidth"))}if(o.is("[data-origheight]:not([height])")){o.attr("height",o.data("origheight"))}var i=(this.tagName.toLowerCase()==="object"||(o.attr("height")&&!isNaN(parseInt(o.attr("height"),10))))?parseInt(o.attr("height"),10):o.height(),l=!isNaN(parseInt(o.attr("width"),10))?parseInt(o.attr("width"),10):o.width(),m=i/l;if(!o.attr("id")){var n="fitvid"+Math.floor(Math.random()*999999);o.attr("id",n)}if(o.parent().hasClass("epyt-video-wrapper")){try{o.parent().addClass("fluid-width-video-wrapper").attr("style","padding-top: "+(m*100)+"% !important;");o.removeAttr("height").removeAttr("width")}catch(j){}}else{var k=document.createElement("div");k.className="fluid-width-video-wrapper";try{o.wrap(k).parent(".fluid-width-video-wrapper").attr("style","padding-top: "+(m*100)+"% !important;");o.removeAttr("height").removeAttr("width")}catch(j){}}})})};a(document).ready(function(){a("body").fitVidsEP();a(document).ajaxSuccess(function(c,d,b){if(d&&d.responseText&&d.responseText.indexOf("<iframe ")!==-1){a("body").fitVidsEP()}})});return true};try{epdofitvids(window.jQuery)}catch(err){};
1
 
2
+ var epdofitvids=epdofitvids||function(a){a.fn.fitVidsEP=function(b){if(_EPYT_.epresponsiveselector.constructor!==Array){_EPYT_.epresponsiveselector=JSON.parse(_EPYT_.epresponsiveselector)}var c={customSelector:null};if(!document.getElementById("fit-vids-style")){var f=document.createElement("div"),d=document.getElementsByTagName("base")[0]||document.getElementsByTagName("script")[0],e="&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>";f.className="fit-vids-style";f.id="fit-vids-style";f.style.display="none";f.innerHTML=e;d.parentNode.insertBefore(f,d)}if(b){a.extend(c,b)}return this.each(function(){var g=_EPYT_.epresponsiveselector;if(c.customSelector){g.push(c.customSelector)}var h=a(this).find(g.join(","));h=h.not("object object");h.each(function(){var n=a(this);if(this.tagName.toLowerCase()==="embed"&&n.parent("object").length||n.parent(".fluid-width-video-wrapper").length||n.css("position")==="absolute"){return}if(n.is("[data-origwidth]:not([width])")){n.attr("width",n.data("origwidth"))}if(n.is("[data-origheight]:not([height])")){n.attr("height",n.data("origheight"))}var q=(this.tagName.toLowerCase()==="object"||(n.attr("height")&&!isNaN(parseInt(n.attr("height"),10))))?parseInt(n.attr("height"),10):n.height(),k=!isNaN(parseInt(n.attr("width"),10))?parseInt(n.attr("width"),10):n.width(),p=q/k;if(!n.attr("id")){var i="fitvid"+Math.floor(Math.random()*999999);n.attr("id",i)}var o=n.attr("width");var j=n.attr("height");if(n.parent().hasClass("epyt-video-wrapper")){try{n.parent().addClass("fluid-width-video-wrapper").attr("style","padding-top: "+(p*100)+"% !important;");n.removeAttr("height").removeAttr("width");setTimeout(function(){if(parseInt(n.parent().css("padding-top"),10)>n.height()+20){n.parent().removeClass("fluid-width-video-wrapper").css("padding-top","");n.attr("width",o);n.attr("height",j)}},100)}catch(l){}}else{var m=document.createElement("div");m.className="fluid-width-video-wrapper";try{n.wrap(m).parent(".fluid-width-video-wrapper").attr("style","padding-top: "+(p*100)+"% !important;");n.removeAttr("height").removeAttr("width");setTimeout(function(){if(parseInt(n.parent().css("padding-top"),10)>n.height()+20){n.parent().removeClass("fluid-width-video-wrapper").css("padding-top","");n.attr("width",o);n.attr("height",j)}},100)}catch(l){}}})})};a(document).ready(function(){a("body").fitVidsEP();a(document).ajaxSuccess(function(c,d,b){if(d&&d.responseText&&d.responseText.indexOf("<iframe ")!==-1){a("body").fitVidsEP()}})});return true};try{epdofitvids(window.jQuery)}catch(err){};
scripts/ytprefs.js CHANGED
@@ -118,7 +118,7 @@
118
  else
119
  {
120
  var $iframeTemp = $(ifm).clone(true).off();
121
- $iframeTemp.attr('src', $iframeTemp.attr('src').replace('autoplay=1', 'autoplay=0'));
122
  $(ifm).replaceWith($iframeTemp);
123
  window._EPADashboard_.setupevents($iframeTemp.attr('id'));
124
  ifm = $iframeTemp.get(0);
@@ -230,7 +230,7 @@
230
  // window._EPADashboard_.log('lazyloaded: ' + this.src + '\n' + $(this).attr('src') + '\n' + $(this).attr('data-src'));
231
  // this.src = $(this).data('src');
232
  // window._EPADashboard_.setVidSrc($(this), $(this).data('src'));
233
- // });
234
  window._EPADashboard_.setupevents(__allytifr[i].id);
235
  }
236
  }
@@ -281,10 +281,15 @@
281
  },
282
  setVidSrc: function ($iframe, vidSrc)
283
  {
284
- $iframe.attr('src', vidSrc);
285
  $iframe.get(0).epytsetupdone = false;
286
  window._EPADashboard_.setupevents($iframe.attr('id'));
287
  },
 
 
 
 
 
288
  loadYTAPI: function ()
289
  {
290
  if (typeof window.YT === 'undefined')
118
  else
119
  {
120
  var $iframeTemp = $(ifm).clone(true).off();
121
+ $iframeTemp.attr('src', window._EPADashboard_.cleanSrc($iframeTemp.attr('src').replace('autoplay=1', 'autoplay=0')));
122
  $(ifm).replaceWith($iframeTemp);
123
  window._EPADashboard_.setupevents($iframeTemp.attr('id'));
124
  ifm = $iframeTemp.get(0);
230
  // window._EPADashboard_.log('lazyloaded: ' + this.src + '\n' + $(this).attr('src') + '\n' + $(this).attr('data-src'));
231
  // this.src = $(this).data('src');
232
  // window._EPADashboard_.setVidSrc($(this), $(this).data('src'));
233
+ // });
234
  window._EPADashboard_.setupevents(__allytifr[i].id);
235
  }
236
  }
281
  },
282
  setVidSrc: function ($iframe, vidSrc)
283
  {
284
+ $iframe.attr('src', window._EPADashboard_.cleanSrc(vidSrc));
285
  $iframe.get(0).epytsetupdone = false;
286
  window._EPADashboard_.setupevents($iframe.attr('id'));
287
  },
288
+ cleanSrc: function (srcInput)
289
+ {
290
+ var cleanedUrl = srcInput.replace('enablejsapi=1?enablejsapi=1', 'enablejsapi=1');
291
+ return cleanedUrl;
292
+ },
293
  loadYTAPI: function ()
294
  {
295
  if (typeof window.YT === 'undefined')
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",pause_others:false};a._EPYT_.touchmoved=false;a._EPYT_.apiVideos=a._EPYT_.apiVideos||{};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(h){try{if(typeof _EPYT_.epdovol!=="undefined"&&_EPYT_.epdovol){var f=parseInt(h.target.getIframe().getAttribute("data-vol"));if(!isNaN(f)){if(f===0){h.target.mute()}else{if(h.target.isMuted()){h.target.unMute()}h.target.setVolume(f)}}}var e=parseInt(h.target.getIframe().getAttribute("data-epautoplay"));if(!isNaN(e)&&e===1){h.target.playVideo()}}catch(g){}try{var d=h.target.getIframe().getAttribute("id");a._EPYT_.apiVideos[d]=h.target}catch(c){}},onPlayerStateChange:function(f){var e=f.target.getIframe();if(a._EPYT_.pause_others&&f.data===a.YT.PlayerState.PLAYING){a._EPADashboard_.pauseOthers(f.target)}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"){if(typeof f.target.stopVideo==="function"){f.target.stopVideo()}else{var g=b(e).clone(true).off();g.attr("src",g.attr("src").replace("autoplay=1","autoplay=0"));b(e).replaceWith(g);a._EPADashboard_.setupevents(g.attr("id"));e=g.get(0)}}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 h=c.find(".epyt-current-video");if(!h.length){h=c.find(".epyt-gallery-thumb").first()}var i=h.find(" ~ .epyt-gallery-thumb").first();if(i.length){i.click()}else{c.find('.epyt-pagebutton.epyt-next[data-pagetoken!=""][data-pagetoken]').first().click()}}}},isMobile:function(){return/Mobi|Android/i.test(navigator.userAgent)},videoEqual:function(d,c){if(d.getIframe&&c.getIframe&&d.getIframe().id===c.getIframe().id){return true}return false},pauseOthers:function(e){if(!e){return}for(var d in a._EPYT_.apiVideos){var c=a._EPYT_.apiVideos[d];if(c&&typeof c.pauseVideo==="function"&&c!=e&&!_EPADashboard_.videoEqual(c,e)&&typeof c.getPlayerState==="function"&&[YT.PlayerState.BUFFERING,a.YT.PlayerState.PLAYING].indexOf(c.getPlayerState())>=0){c.pauseVideo()}}},justid:function(c){return new RegExp("[\\?&]v=([^&#]*)").exec(c)[1]},setupevents:function(e){if(typeof(a.YT)!=="undefined"&&a.YT!==null&&a.YT.loaded){var c=document.getElementById(e);if(!c.epytsetupdone){a._EPADashboard_.log("Setting up YT API events: "+e);c.epytsetupdone=true;var d={events:{onReady:a._EPADashboard_.onPlayerReady,onStateChange:a._EPADashboard_.onPlayerStateChange}};return new a.YT.Player(e,d)}}},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/"], iframe[data-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.data("src")||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");f.data("ep-gallerysrc",c)}else{if(e.hasClass("__youtube_prefs_gdpr__")){f.data("ep-gallerysrc","")}}f.on("click touchend",".epyt-gallery-list .epyt-gallery-thumb",function(k){e=f.find("iframe, div.__youtube_prefs_gdpr__").first();if(a._EPYT_.touchmoved){return}if(!b(this).hasClass("epyt-current-video")){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 l=f.data("ep-gallerysrc").replace("GALLERYVIDEOID",g);var j=f.find(".epyt-pagebutton").first().data("thumbplay");if(j!=="0"&&j!==0){if(l.indexOf("autoplay")>0){l=l.replace("autoplay=0","autoplay=1")}else{l+="&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,l)})}else{a._EPADashboard_.setVidSrc(e,l)}}}).on("touchmove",function(g){a._EPYT_.touchmoved=true}).on("touchstart",function(){a._EPYT_.touchmoved=false}).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 touchend",".epyt-pagebutton",function(k){if(a._EPYT_.touchmoved){return}if(!f.find(".epyt-gallery-list").hasClass("epyt-loading")){f.find(".epyt-gallery-list").addClass("epyt-loading");var g=typeof(k.originalEvent)!=="undefined";var j={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 h=b(this).hasClass("epyt-next");var i=parseInt(f.data("currpage")+"");i+=h?1:-1;f.data("currpage",i);b.post(_EPYT_.ajaxurl,j,function(l){f.find(".epyt-gallery-list").html(l);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"&&!g){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 l=Math.max(b("body").scrollTop(),b("html").scrollTop());var m=f.find(".epyt-gallery-list").offset().top-parseInt(_EPYT_.gallery_scrolloffset);if(l>m){b("html, body").animate({scrollTop:m},500)}}})}}).on("touchmove",function(g){a._EPYT_.touchmoved=true}).on("touchstart",function(){a._EPYT_.touchmoved=false})}});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",pause_others:false};a._EPYT_.touchmoved=false;a._EPYT_.apiVideos=a._EPYT_.apiVideos||{};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(h){try{if(typeof _EPYT_.epdovol!=="undefined"&&_EPYT_.epdovol){var f=parseInt(h.target.getIframe().getAttribute("data-vol"));if(!isNaN(f)){if(f===0){h.target.mute()}else{if(h.target.isMuted()){h.target.unMute()}h.target.setVolume(f)}}}var e=parseInt(h.target.getIframe().getAttribute("data-epautoplay"));if(!isNaN(e)&&e===1){h.target.playVideo()}}catch(g){}try{var d=h.target.getIframe().getAttribute("id");a._EPYT_.apiVideos[d]=h.target}catch(c){}},onPlayerStateChange:function(f){var e=f.target.getIframe();if(a._EPYT_.pause_others&&f.data===a.YT.PlayerState.PLAYING){a._EPADashboard_.pauseOthers(f.target)}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"){if(typeof f.target.stopVideo==="function"){f.target.stopVideo()}else{var g=b(e).clone(true).off();g.attr("src",a._EPADashboard_.cleanSrc(g.attr("src").replace("autoplay=1","autoplay=0")));b(e).replaceWith(g);a._EPADashboard_.setupevents(g.attr("id"));e=g.get(0)}}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 h=c.find(".epyt-current-video");if(!h.length){h=c.find(".epyt-gallery-thumb").first()}var i=h.find(" ~ .epyt-gallery-thumb").first();if(i.length){i.click()}else{c.find('.epyt-pagebutton.epyt-next[data-pagetoken!=""][data-pagetoken]').first().click()}}}},isMobile:function(){return/Mobi|Android/i.test(navigator.userAgent)},videoEqual:function(d,c){if(d.getIframe&&c.getIframe&&d.getIframe().id===c.getIframe().id){return true}return false},pauseOthers:function(e){if(!e){return}for(var d in a._EPYT_.apiVideos){var c=a._EPYT_.apiVideos[d];if(c&&typeof c.pauseVideo==="function"&&c!=e&&!_EPADashboard_.videoEqual(c,e)&&typeof c.getPlayerState==="function"&&[YT.PlayerState.BUFFERING,a.YT.PlayerState.PLAYING].indexOf(c.getPlayerState())>=0){c.pauseVideo()}}},justid:function(c){return new RegExp("[\\?&]v=([^&#]*)").exec(c)[1]},setupevents:function(e){if(typeof(a.YT)!=="undefined"&&a.YT!==null&&a.YT.loaded){var c=document.getElementById(e);if(!c.epytsetupdone){a._EPADashboard_.log("Setting up YT API events: "+e);c.epytsetupdone=true;var d={events:{onReady:a._EPADashboard_.onPlayerReady,onStateChange:a._EPADashboard_.onPlayerStateChange}};return new a.YT.Player(e,d)}}},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",a._EPADashboard_.cleanSrc(d));c.get(0).epytsetupdone=false;a._EPADashboard_.setupevents(c.attr("id"))},cleanSrc:function(d){var c=d.replace("enablejsapi=1?enablejsapi=1","enablejsapi=1");return c},loadYTAPI:function(){if(typeof a.YT==="undefined"){if(a._EPYT_.ytapi_load!=="never"&&(a._EPYT_.ytapi_load==="always"||b('iframe[src*="youtube.com/embed/"], iframe[data-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.data("src")||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");f.data("ep-gallerysrc",c)}else{if(e.hasClass("__youtube_prefs_gdpr__")){f.data("ep-gallerysrc","")}}f.on("click touchend",".epyt-gallery-list .epyt-gallery-thumb",function(k){e=f.find("iframe, div.__youtube_prefs_gdpr__").first();if(a._EPYT_.touchmoved){return}if(!b(this).hasClass("epyt-current-video")){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 l=f.data("ep-gallerysrc").replace("GALLERYVIDEOID",g);var j=f.find(".epyt-pagebutton").first().data("thumbplay");if(j!=="0"&&j!==0){if(l.indexOf("autoplay")>0){l=l.replace("autoplay=0","autoplay=1")}else{l+="&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,l)})}else{a._EPADashboard_.setVidSrc(e,l)}}}).on("touchmove",function(g){a._EPYT_.touchmoved=true}).on("touchstart",function(){a._EPYT_.touchmoved=false}).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 touchend",".epyt-pagebutton",function(k){if(a._EPYT_.touchmoved){return}if(!f.find(".epyt-gallery-list").hasClass("epyt-loading")){f.find(".epyt-gallery-list").addClass("epyt-loading");var g=typeof(k.originalEvent)!=="undefined";var j={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 h=b(this).hasClass("epyt-next");var i=parseInt(f.data("currpage")+"");i+=h?1:-1;f.data("currpage",i);b.post(_EPYT_.ajaxurl,j,function(l){f.find(".epyt-gallery-list").html(l);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"&&!g){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 l=Math.max(b("body").scrollTop(),b("html").scrollTop());var m=f.find(".epyt-gallery-list").offset().top-parseInt(_EPYT_.gallery_scrolloffset);if(l>m){b("html, body").animate({scrollTop:m},500)}}})}}).on("touchmove",function(g){a._EPYT_.touchmoved=true}).on("touchstart",function(){a._EPYT_.touchmoved=false})}});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);
src/block/editor.scss CHANGED
@@ -30,16 +30,43 @@
30
  }
31
  }
32
 
33
- .epytblock{
34
  .components-placeholder__fieldset {
35
  max-width: 100%;
36
  }
37
  }
38
 
39
- .edit-post-visual-editor .block-editor-block-list__block[data-type="epyt/youtube"] > div:first-child {
 
 
40
  padding-top: 16px;
41
  padding-bottom: 16px;
42
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
43
 
44
  /* .epyt-gallery-list {
45
  &:before {
30
  }
31
  }
32
 
33
+ .epytblock {
34
  .components-placeholder__fieldset {
35
  max-width: 100%;
36
  }
37
  }
38
 
39
+ /*.edit-post-visual-editor
40
+ .block-editor-block-list__block[data-type="epyt/youtube"]
41
+ > div:first-child {
42
  padding-top: 16px;
43
  padding-bottom: 16px;
44
  }
45
+ */
46
+ .wp-block {
47
+ &.has-selected-ui {
48
+ &[data-type="epyt/youtube"] {
49
+ > div {
50
+ &::after {
51
+ content: "";
52
+ position: absolute;
53
+ top: 0;
54
+ left: 0;
55
+ right: 0;
56
+ bottom: 0;
57
+ opacity: 0;
58
+ cursor: pointer;
59
+ }
60
+ }
61
+ }
62
+ &.is-selected > div,
63
+ > div.components-placeholder {
64
+ &::after {
65
+ display: none;
66
+ }
67
+ }
68
+ }
69
+ }
70
 
71
  /* .epyt-gallery-list {
72
  &:before {
styles/ytprefs-wizard.css CHANGED
@@ -24,7 +24,7 @@ html.wp-toolbar {padding: 0px;}
24
  .ui-widget select,
25
  .ui-widget textarea,
26
  .ui-widget button {
27
- font-family: inherit;
28
  }
29
 
30
  .ui-widget .ui-widget li {
@@ -66,6 +66,9 @@ input.ui-widget[type=text] {
66
 
67
  #epyt_wiz_wrap .ui-icon {
68
  display: inline-block;
 
 
 
69
  }
70
 
71
  .ui-button .ui-icon {
@@ -213,3 +216,12 @@ a.ythealth:hover .tip {
213
  .h3_vi_monetize-content {
214
  background-color: #f0f0f0;
215
  }
 
 
 
 
 
 
 
 
 
24
  .ui-widget select,
25
  .ui-widget textarea,
26
  .ui-widget button {
27
+ font-family: inherit;
28
  }
29
 
30
  .ui-widget .ui-widget li {
66
 
67
  #epyt_wiz_wrap .ui-icon {
68
  display: inline-block;
69
+ position: relative;
70
+ left: auto;
71
+ margin: -.25em 0 0 0;
72
  }
73
 
74
  .ui-button .ui-icon {
216
  .h3_vi_monetize-content {
217
  background-color: #f0f0f0;
218
  }
219
+
220
+ #wpwrap .ep-wizard-preview-video-wrapper {
221
+ position: relative; padding-top: 56.25%; width: 100%;
222
+ }
223
+
224
+ #wpwrap .ep-wizard-preview-video-wrapper iframe {
225
+ width: 100%; height: 100%; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
226
+ }
227
+
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}#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-widget .ui-widget li{font-size:13px}.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;line-height:2}.txt-button-align input.ui-widget[type=text],.txt-button-align button{vertical-align:top}#epyt_wiz_wrap .ui-button{font-weight:bold;line-height:2}#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-widget .ui-widget li{font-size:13px}.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;line-height:2}.txt-button-align input.ui-widget[type=text],.txt-button-align button{vertical-align:top}#epyt_wiz_wrap .ui-button{font-weight:bold;line-height:2}#epyt_wiz_wrap .ui-icon{display:inline-block;position:relative;left:auto;margin:-.25em 0 0 0}.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}#wpwrap .ep-wizard-preview-video-wrapper{position:relative;padding-top:56.25%;width:100%}#wpwrap .ep-wizard-preview-video-wrapper iframe{width:100%;height:100%;position:absolute;top:0;left:0;right:0;bottom:0}
styles/ytprefs.css CHANGED
@@ -81,15 +81,6 @@ iframe.__youtube_prefs__
81
 
82
  }
83
 
84
- .epyt-gallery-playhover-textonly {
85
- position: absolute;
86
- top: -10px;
87
- left: 0;
88
- width: 100%;
89
- height: 100%;
90
- text-align: center;
91
- }
92
-
93
  .epyt-gallery-playhover {
94
  opacity: 0;
95
  position: absolute;
81
 
82
  }
83
 
 
 
 
 
 
 
 
 
 
84
  .epyt-gallery-playhover {
85
  opacity: 0;
86
  position: absolute;
styles/ytprefs.min.css CHANGED
@@ -1,2 +1,2 @@
1
 
2
- .epyt-debug{cursor:pointer;text-align:left;background-color:#ddd;color:#000}iframe.__youtube_prefs__{border-width:0}.epyt-gallery{text-align:center}.epyt-gallery iframe{margin-bottom:0}.epyt-gallery.epyt-lb iframe{display:none;height:0!important}.epyt-gallery-list{margin:0 -8px 0 -8px;position:relative;transition:opacity ease-out .3s;display:block}.epyt-gallery-list .epyt-gallery-thumb{box-sizing:border-box}.epyt-gallery-list p{display:none}.epyt-gallery-clear{clear:both}.epyt-gallery-list.epyt-loading{opacity:.5;transition:opacity ease-out .3s}.epyt-gallery-thumb{position:relative;box-sizing:border-box;overflow-y:hidden;display:block!important;cursor:pointer;opacity:1;float:left;padding:0 8px 10px 8px;height:auto}.epyt-gallery-thumb.hover{position:relative;opacity:1;transition:opacity ease-out .3s;height:auto}.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-textonly{position:absolute;top:-10px;left:0;width:100%;height:100%;text-align:center}.epyt-gallery-playhover{opacity:0;position:absolute;top:-10px;left:0;width:100%;height:100%;vertical-align:middle;text-align:center;transition:opacity ease-out .3s}.epyt-gallery-thumb.hover .epyt-gallery-playhover,.epyt-gallery-thumb.epyt-current-video .epyt-gallery-playhover{opacity:1;top:0;transition:all ease-out .3s}.epyt-gallery-thumb .epyt-gallery-playcrutch{display:inline-block;height:100%;vertical-align:middle;width:0}.epyt-gallery-playhover .epyt-play-img{height:auto!important;max-width:15%!important;padding:0!important;margin:0!important;min-width:30px!important;vertical-align:middle!important;display:inline-block!important;width:auto;border:0;box-sizing:border-box}.epyt-gallery-title{font-size:80%;line-height:120%;padding:10px}.epyt-gallery-notitle{padding:4px}.epyt-gallery-notitle span{display:none}.epyt-gallery-rowtitle{text-align:center;width:100%;position:absolute;left:0;top:100%;opacity:0;z-index:10;overflow-x:hidden;text-overflow:ellipsis;white-space:nowrap}.epyt-gallery-rowtitle.hover{opacity:1;transition:opacity linear .2s}.epyt-gallery-rowbreak{clear:both}.epyt-pagination{clear:both;text-align:center;padding:10px 8px 10px 8px}.epyt-pagination.epyt-hide-pagination *{display:none!important}.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}body .lity-container{width:100%;max-width:964px}.epyt-curtain .lity-opened iframe{opacity:0;transition:opacity .3s linear .5s}.epyt-gallery-allthumbs.epyt-cols-1 .epyt-gallery-thumb{width:100%}.epyt-gallery-allthumbs.epyt-cols-2 .epyt-gallery-thumb{width:50%}.epyt-gallery-allthumbs.epyt-cols-3 .epyt-gallery-thumb{width:33.333%}.epyt-gallery-allthumbs.epyt-cols-4 .epyt-gallery-thumb{width:25%}.epyt-gallery-allthumbs.epyt-cols-5 .epyt-gallery-thumb{width:20%}.epyt-gallery-allthumbs.epyt-cols-6 .epyt-gallery-thumb{width:16.666%}.epyt-gallery-allthumbs.epyt-cols-7 .epyt-gallery-thumb{width:14.285%}.epyt-gallery-allthumbs.epyt-cols-8 .epyt-gallery-thumb{width:12.5%}.epyt-gallery-allthumbs.epyt-cols-9 .epyt-gallery-thumb{width:11.111%}.epyt-gallery-allthumbs.epyt-cols-10 .epyt-gallery-thumb{width:10%}.epyt-gallery-allthumbs.epyt-cols-11 .epyt-gallery-thumb{width:9.090%}.epyt-gallery-allthumbs.epyt-cols-12 .epyt-gallery-thumb{width:8.333%}.epyt-gallery-allthumbs.epyt-cols-13 .epyt-gallery-thumb{width:7.692%}.epyt-gallery-allthumbs.epyt-cols-14 .epyt-gallery-thumb{width:7.142%}.epyt-gallery-allthumbs.epyt-cols-15 .epyt-gallery-thumb{width:6.666%}.epyt-gallery-allthumbs.epyt-cols-16 .epyt-gallery-thumb{width:6.25%}.epyt-gallery-allthumbs.epyt-cols-17 .epyt-gallery-thumb{width:5.882%}.epyt-gallery-allthumbs.epyt-cols-18 .epyt-gallery-thumb{width:5.555%}.epyt-gallery-allthumbs.epyt-cols-19 .epyt-gallery-thumb{width:5.263%}.epyt-gallery-allthumbs.epyt-cols-20 .epyt-gallery-thumb{width:5%}.epyt-pagebutton.hide,.epyt-pagenumbers.hide{display:none!important;opacity:0!important;visibility:hidden!important}.epyt-gallery-subscribe{text-align:center;padding:15px 0 10px 0;clear:both}.epyt-gallery-subscribe a.epyt-gallery-subbutton,.epyt-gallery-subscribe a.epyt-gallery-subbutton:hover{display:inline-block;padding:5px 10px;background-color:#e62117!important;color:#fff!important;text-decoration:none!important;border-radius:3px}.epyt-gallery-subscribe a.epyt-gallery-subbutton img{width:20px!important;height:auto!important;vertical-align:middle!important;padding:0 6px 3px 0;display:inline-block;background:transparent;-webkit-box-shadow:none;box-shadow:none;margin:0}body div.__youtube_prefs__.__youtube_prefs_gdpr__{background-color:#000;background-image:-webkit-linear-gradient(top,#000,#444);background-image:linear-gradient(to bottom,#000,#444);padding:25px;height:auto;text-align:left}body div.__youtube_prefs__.__youtube_prefs_gdpr__ *{color:#e3e3e3!important}body div.__youtube_prefs__.__youtube_prefs_gdpr__ a{text-decoration:underline}body div.__youtube_prefs__.__youtube_prefs_gdpr__ button.__youtube_prefs_gdpr__,body div.__youtube_prefs__.__youtube_prefs_gdpr__ button.__youtube_prefs_gdpr__:hover{display:inline-block;padding:5px 10px;background:#e62117!important;color:#fff!important;text-decoration:none!important;border-radius:3px;font-weight:normal;border-width:0;box-sizing:border-box}body div.__youtube_prefs__.__youtube_prefs_gdpr__ button.__youtube_prefs_gdpr__ img{width:20px!important;height:auto!important;vertical-align:middle!important;padding:0 6px 3px 0;display:inline-block;background:transparent;-webkit-box-shadow:none;box-shadow:none;margin-left:8px}body .epyt-gallery-img-gdpr{background-color:#000;background-image:-webkit-linear-gradient(top,#000,#444);background-image:linear-gradient(to bottom,#000,#444)}.ytvi-story-container{display:block;max-width:100%}
1
 
2
+ .epyt-debug{cursor:pointer;text-align:left;background-color:#ddd;color:#000}iframe.__youtube_prefs__{border-width:0}.epyt-gallery{text-align:center}.epyt-gallery iframe{margin-bottom:0}.epyt-gallery.epyt-lb iframe{display:none;height:0!important}.epyt-gallery-list{margin:0 -8px 0 -8px;position:relative;transition:opacity ease-out .3s;display:block}.epyt-gallery-list .epyt-gallery-thumb{box-sizing:border-box}.epyt-gallery-list p{display:none}.epyt-gallery-clear{clear:both}.epyt-gallery-list.epyt-loading{opacity:.5;transition:opacity ease-out .3s}.epyt-gallery-thumb{position:relative;box-sizing:border-box;overflow-y:hidden;display:block!important;cursor:pointer;opacity:1;float:left;padding:0 8px 10px 8px;height:auto}.epyt-gallery-thumb.hover{position:relative;opacity:1;transition:opacity ease-out .3s;height:auto}.epyt-gallery-img-box{width:100%}.epyt-gallery-img{height:0;width:100%;padding-top:56.25%!important;position:relative;overflow:hidden!important;background-size:cover!important;background-position:center!important}.epyt-gallery-playhover{opacity:0;position:absolute;top:-10px;left:0;width:100%;height:100%;vertical-align:middle;text-align:center;transition:opacity ease-out .3s}.epyt-gallery-thumb.hover .epyt-gallery-playhover,.epyt-gallery-thumb.epyt-current-video .epyt-gallery-playhover{opacity:1;top:0;transition:all ease-out .3s}.epyt-gallery-thumb .epyt-gallery-playcrutch{display:inline-block;height:100%;vertical-align:middle;width:0}.epyt-gallery-playhover .epyt-play-img{height:auto!important;max-width:15%!important;padding:0!important;margin:0!important;min-width:30px!important;vertical-align:middle!important;display:inline-block!important;width:auto;border:0;box-sizing:border-box}.epyt-gallery-title{font-size:80%;line-height:120%;padding:10px}.epyt-gallery-notitle{padding:4px}.epyt-gallery-notitle span{display:none}.epyt-gallery-rowtitle{text-align:center;width:100%;position:absolute;left:0;top:100%;opacity:0;z-index:10;overflow-x:hidden;text-overflow:ellipsis;white-space:nowrap}.epyt-gallery-rowtitle.hover{opacity:1;transition:opacity linear .2s}.epyt-gallery-rowbreak{clear:both}.epyt-pagination{clear:both;text-align:center;padding:10px 8px 10px 8px}.epyt-pagination.epyt-hide-pagination *{display:none!important}.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}body .lity-container{width:100%;max-width:964px}.epyt-curtain .lity-opened iframe{opacity:0;transition:opacity .3s linear .5s}.epyt-gallery-allthumbs.epyt-cols-1 .epyt-gallery-thumb{width:100%}.epyt-gallery-allthumbs.epyt-cols-2 .epyt-gallery-thumb{width:50%}.epyt-gallery-allthumbs.epyt-cols-3 .epyt-gallery-thumb{width:33.333%}.epyt-gallery-allthumbs.epyt-cols-4 .epyt-gallery-thumb{width:25%}.epyt-gallery-allthumbs.epyt-cols-5 .epyt-gallery-thumb{width:20%}.epyt-gallery-allthumbs.epyt-cols-6 .epyt-gallery-thumb{width:16.666%}.epyt-gallery-allthumbs.epyt-cols-7 .epyt-gallery-thumb{width:14.285%}.epyt-gallery-allthumbs.epyt-cols-8 .epyt-gallery-thumb{width:12.5%}.epyt-gallery-allthumbs.epyt-cols-9 .epyt-gallery-thumb{width:11.111%}.epyt-gallery-allthumbs.epyt-cols-10 .epyt-gallery-thumb{width:10%}.epyt-gallery-allthumbs.epyt-cols-11 .epyt-gallery-thumb{width:9.090%}.epyt-gallery-allthumbs.epyt-cols-12 .epyt-gallery-thumb{width:8.333%}.epyt-gallery-allthumbs.epyt-cols-13 .epyt-gallery-thumb{width:7.692%}.epyt-gallery-allthumbs.epyt-cols-14 .epyt-gallery-thumb{width:7.142%}.epyt-gallery-allthumbs.epyt-cols-15 .epyt-gallery-thumb{width:6.666%}.epyt-gallery-allthumbs.epyt-cols-16 .epyt-gallery-thumb{width:6.25%}.epyt-gallery-allthumbs.epyt-cols-17 .epyt-gallery-thumb{width:5.882%}.epyt-gallery-allthumbs.epyt-cols-18 .epyt-gallery-thumb{width:5.555%}.epyt-gallery-allthumbs.epyt-cols-19 .epyt-gallery-thumb{width:5.263%}.epyt-gallery-allthumbs.epyt-cols-20 .epyt-gallery-thumb{width:5%}.epyt-pagebutton.hide,.epyt-pagenumbers.hide{display:none!important;opacity:0!important;visibility:hidden!important}.epyt-gallery-subscribe{text-align:center;padding:15px 0 10px 0;clear:both}.epyt-gallery-subscribe a.epyt-gallery-subbutton,.epyt-gallery-subscribe a.epyt-gallery-subbutton:hover{display:inline-block;padding:5px 10px;background-color:#e62117!important;color:#fff!important;text-decoration:none!important;border-radius:3px}.epyt-gallery-subscribe a.epyt-gallery-subbutton img{width:20px!important;height:auto!important;vertical-align:middle!important;padding:0 6px 3px 0;display:inline-block;background:transparent;-webkit-box-shadow:none;box-shadow:none;margin:0}body div.__youtube_prefs__.__youtube_prefs_gdpr__{background-color:#000;background-image:-webkit-linear-gradient(top,#000,#444);background-image:linear-gradient(to bottom,#000,#444);padding:25px;height:auto;text-align:left}body div.__youtube_prefs__.__youtube_prefs_gdpr__ *{color:#e3e3e3!important}body div.__youtube_prefs__.__youtube_prefs_gdpr__ a{text-decoration:underline}body div.__youtube_prefs__.__youtube_prefs_gdpr__ button.__youtube_prefs_gdpr__,body div.__youtube_prefs__.__youtube_prefs_gdpr__ button.__youtube_prefs_gdpr__:hover{display:inline-block;padding:5px 10px;background:#e62117!important;color:#fff!important;text-decoration:none!important;border-radius:3px;font-weight:normal;border-width:0;box-sizing:border-box}body div.__youtube_prefs__.__youtube_prefs_gdpr__ button.__youtube_prefs_gdpr__ img{width:20px!important;height:auto!important;vertical-align:middle!important;padding:0 6px 3px 0;display:inline-block;background:transparent;-webkit-box-shadow:none;box-shadow:none;margin-left:8px}body .epyt-gallery-img-gdpr{background-color:#000;background-image:-webkit-linear-gradient(top,#000,#444);background-image:linear-gradient(to bottom,#000,#444)}.ytvi-story-container{display:block;max-width:100%}
youtube.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Embed Plus for YouTube - Gallery, Channel, Playlist, Live Stream
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.3.1
7
  Author: Embed Plus for YouTube 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.3.1';
38
  public static $opt_version = 'version';
39
  public static $optembedwidth = null;
40
  public static $optembedheight = null;
@@ -61,6 +61,7 @@ class YouTubePrefs
61
  public static $opt_dohl = 'dohl';
62
  public static $opt_hl = 'hl';
63
  public static $opt_nocookie = 'nocookie';
 
64
  public static $opt_gdpr_consent = 'gdpr_consent';
65
  public static $opt_gdpr_consent_message = 'gdpr_consent_message';
66
  public static $opt_gdpr_consent_button = 'gdpr_consent_button';
@@ -119,7 +120,6 @@ class YouTubePrefs
119
  public static $yt_options = array();
120
  public static $dft_bpts = array(array('bp' => array('min' => 0, 'max' => 767), 'cols' => 1));
121
  public static $dft_roles = array('administrator', 'editor', 'author', 'contributor', 'subscriber');
122
- //public static $epbase = 'https://localhost:44328';
123
  public static $epbase = 'https://www.embedplus.com';
124
  public static $double_plugin = false;
125
  public static $scriptsprinted = 0;
@@ -191,20 +191,24 @@ class YouTubePrefs
191
 
192
  public function __construct()
193
  {
 
 
 
 
194
  self::$vi_default_date = date('Y-m-d H:i:s', strtotime('2000-01-01'));
195
  register_deactivation_hook(__FILE__, array(get_class(), 'on_deactivation'));
196
  add_action('admin_init', array(get_class(), 'check_double_plugin_warning'));
197
  add_action('admin_notices', array(get_class(), 'separate_version_message'));
198
 
199
  self::$alloptions = get_option(self::$opt_alloptions);
200
- if ((defined('SCRIPT_DEBUG') && SCRIPT_DEBUG) || self::$alloptions[self::$opt_debugmode] == 1)
201
  {
202
- self::$min = '';
203
  }
204
 
205
- if (self::$alloptions == false || version_compare(self::$alloptions[self::$opt_version], self::$version, '<'))
206
  {
207
- self::initoptions();
208
  }
209
 
210
 
@@ -762,8 +766,8 @@ class YouTubePrefs
762
  <span class="copycode">[embedyt] https://www.youtube.com/watch?v=<?php echo esc_attr($theytid) ?>[/embedyt]</span>
763
  <div class="clearboth" style="height: 10px;">
764
  </div>
765
- <div class="center relative">
766
- <iframe src="https://www.youtube.com/embed/<?php echo esc_attr($theytid) ?>?rel=0" allowfullscreen="" width="854" height="480" frameborder="0"></iframe>
767
  </div>
768
 
769
  </div>
@@ -872,8 +876,8 @@ class YouTubePrefs
872
  </p>
873
  <div class="clearboth" style="height: 10px;">
874
  </div>
875
- <div class="center relative">
876
- <iframe src="<?php echo $rel; ?>" allowfullscreen="" width="854" height="480" frameborder="0"></iframe>
877
  </div>
878
  </div>
879
  <?php
@@ -975,8 +979,8 @@ class YouTubePrefs
975
  </p>
976
  <div class="clearboth" style="height: 10px;">
977
  </div>
978
- <div class="center relative">
979
- <iframe src="<?php echo $rel; ?>" allowfullscreen="" width="854" height="480" frameborder="0"></iframe>
980
  </div>
981
  </div>
982
  <?php
@@ -1049,8 +1053,11 @@ class YouTubePrefs
1049
  <span class="copycode">[embedyt] https://www.youtube.com/embed/live_stream?channel=<?php echo esc_attr($thechannelid) ?>[/embedyt]</span>
1050
  <div class="clearboth" style="height: 10px;">
1051
  </div>
1052
- <div class="center relative">
1053
- <iframe src="https://www.youtube.com/embed/live_stream?channel=<?php echo esc_attr($thechannelid) ?>" allowfullscreen="" width="854" height="480" frameborder="0"></iframe>
 
 
 
1054
  </div>
1055
  </div>
1056
  <?php
@@ -1137,8 +1144,8 @@ class YouTubePrefs
1137
  if ($if_live_preview)
1138
  {
1139
  ?>
1140
- <div class="center relative">
1141
- <iframe src="https://www.youtube.com/embed/<?php echo esc_attr($if_live_preview) ?>?rel=0" allowfullscreen="" width="854" height="480" frameborder="0"></iframe>
1142
  </div>
1143
  <?php
1144
  }
@@ -1822,11 +1829,14 @@ class YouTubePrefs
1822
 
1823
  public static function initoptions()
1824
  {
 
1825
  $arroptions = get_option(self::$opt_alloptions);
1826
  if ($arroptions !== false)
1827
  {
1828
  $bak = str_replace('.', '_', $arroptions[self::$opt_version]);
1829
- add_option(self::$opt_alloptions . '_backup_' . $bak, $arroptions);
 
 
1830
  }
1831
 
1832
  // backup settings for migration
@@ -1850,6 +1860,7 @@ class YouTubePrefs
1850
  $_autohide = 2;
1851
  $_pro = '';
1852
  $_nocookie = 0;
 
1853
  $_gdpr_consent = 0;
1854
  $_gdpr_consent_message = self::$dft_gdpr_consent_message;
1855
  $_gdpr_consent_button = 'Accept YouTube Content';
@@ -1898,7 +1909,7 @@ class YouTubePrefs
1898
  $_gallery_customnext = 'Next';
1899
  $_gallery_pagesize = 15;
1900
  $_not_live_content = '';
1901
- $_not_live_on = 1;
1902
  $_debugmode = 0;
1903
  $_admin_off_scripts = 0;
1904
  $_defer_js = 0;
@@ -1946,6 +1957,7 @@ class YouTubePrefs
1946
  $_autohide = self::tryget($arroptions, self::$opt_autohide, 2);
1947
  $_pro = self::tryget($arroptions, self::$opt_pro, '');
1948
  $_nocookie = self::tryget($arroptions, self::$opt_nocookie, 0);
 
1949
  $_gdpr_consent = self::tryget($arroptions, self::$opt_gdpr_consent, $_gdpr_consent);
1950
  $_gdpr_consent_message = self::tryget($arroptions, self::$opt_gdpr_consent_message, $_gdpr_consent_message);
1951
  $_gdpr_consent_button = self::tryget($arroptions, self::$opt_gdpr_consent_button, $_gdpr_consent_button);
@@ -1958,8 +1970,8 @@ class YouTubePrefs
1958
  $_controls = $_controls == 2 ? 1 : $_controls;
1959
  $_oldspacing = self::tryget($arroptions, self::$opt_oldspacing, 1);
1960
  $_frontend_only = self::tryget($arroptions, self::$opt_frontend_only, $_frontend_only);
1961
- $_responsive = self::tryget($arroptions, self::$opt_responsive, 0);
1962
- $_responsive_all = self::tryget($arroptions, self::$opt_responsive_all, 1);
1963
  $_widgetfit = self::tryget($arroptions, self::$opt_widgetfit, 1);
1964
  $_evselector_light = self::tryget($arroptions, self::$opt_evselector_light, 0);
1965
  $_stop_mobile_buffer = self::tryget($arroptions, self::$opt_stop_mobile_buffer, 1);
@@ -1992,7 +2004,7 @@ class YouTubePrefs
1992
  $_gallery_customprev = self::tryget($arroptions, self::$opt_gallery_customprev, $_gallery_customprev);
1993
  $_not_live_content = self::tryget($arroptions, self::$opt_not_live_content, $_not_live_content);
1994
  $_not_live_content = empty($_not_live_content) ? $_not_live_content : trim($_not_live_content);
1995
- $_not_live_on = self::tryget($arroptions, self::$opt_not_live_on, empty($_not_live_content) ? 0 : 1);
1996
  $_admin_off_scripts = self::tryget($arroptions, self::$opt_admin_off_scripts, $_admin_off_scripts);
1997
  $_defer_js = self::tryget($arroptions, self::$opt_defer_js, $_defer_js);
1998
  $_defer_jquery = self::tryget($arroptions, self::$opt_defer_jquery, $_defer_jquery);
@@ -2039,6 +2051,7 @@ class YouTubePrefs
2039
  self::$opt_color => $_color,
2040
  self::$opt_pro => $_pro,
2041
  self::$opt_nocookie => $_nocookie,
 
2042
  self::$opt_gdpr_consent => $_gdpr_consent,
2043
  self::$opt_gdpr_consent_message => $_gdpr_consent_message,
2044
  self::$opt_gdpr_consent_button => $_gdpr_consent_button,
@@ -2183,7 +2196,7 @@ class YouTubePrefs
2183
  $currfilter = current_filter();
2184
  if (preg_match(self::$justurlregex, $content))
2185
  {
2186
- return self::get_html(array($content), strpos($currfilter, 'widget_text') === 0 ? false : true);
2187
  }
2188
  return '';
2189
  }
@@ -2194,7 +2207,7 @@ class YouTubePrefs
2194
  $currfilter = current_filter();
2195
  if (preg_match(self::$justurlregex, $content))
2196
  {
2197
- return self::get_html(array($content), $currfilter == 'widget_text' ? false : true);
2198
  }
2199
  return '';
2200
  }
@@ -2227,7 +2240,7 @@ class YouTubePrefs
2227
  $currfilter = current_filter();
2228
  if (preg_match(self::$justurlregex, $url))
2229
  {
2230
- return self::get_html(array($url), $currfilter == 'widget_text' ? false : true);
2231
  }
2232
  }
2233
  return '';
@@ -2247,12 +2260,12 @@ class YouTubePrefs
2247
 
2248
  public static function get_html_content($m)
2249
  {
2250
- return self::get_html($m, true);
2251
  }
2252
 
2253
  public static function get_html_widget($m)
2254
  {
2255
- return self::get_html($m, false);
2256
  }
2257
 
2258
  public static function get_gallery_page($options)
@@ -2491,7 +2504,7 @@ class YouTubePrefs
2491
  }
2492
  }
2493
 
2494
- public static function get_html($m, $iscontent)
2495
  {
2496
  //$time_start = microtime(true);
2497
 
@@ -2739,7 +2752,7 @@ class YouTubePrefs
2739
  $galleryid_ifm_data = ' data-epytgalleryid="' . $galleryid . '" ';
2740
 
2741
  $subbutton = '';
2742
- if (self::$alloptions[self::$opt_gallery_channelsub] == 1)
2743
  {
2744
  $subbutton = '<div class="epyt-gallery-subscribe"><a target="_blank" class="epyt-gallery-subbutton" href="' .
2745
  esc_url(self::$alloptions[self::$opt_gallery_channelsublink]) . '?sub_confirmation=1"><img alt="subscribe" src="' . plugins_url('images/play-subscribe.png', __FILE__) . '" />' .
@@ -2775,20 +2788,27 @@ class YouTubePrefs
2775
  $dim_attrs = ' width="' . self::$defaultwidth . '" height="' . self::$defaultheight . '" ';
2776
  if ($finalparams[self::$opt_responsive] == 1)
2777
  {
2778
- // wrap with fluid wrapper on server side code
2779
- //$dim_attrs = ' ';
2780
- //$begin_responsive = '<div class="fluid-width-video-wrapper" style="padding-top: ' . (100.0 * self::$defaultheight / self::$defaultwidth) . '% !important;">';
2781
  $begin_responsive = '<div class="epyt-video-wrapper">';
2782
  $end_responsive = '</div>';
2783
  }
2784
 
 
 
 
 
 
 
 
 
 
2785
  $iframe_id = rand(10000, 99999);
2786
 
2787
- $code1 = $begin_responsive . '<iframe ' . $centercode . ' id="_ytid_' . $iframe_id . '" ' . $dim_attrs .
2788
  ' data-origwidth="' . self::$defaultwidth . '" data-origheight="' . self::$defaultheight . '" ' . $relstop .
2789
  ' src="https://www.' . $youtubebaseurl . '.com/embed/' . $videoidoutput . '?';
2790
- $code2 = '" class="__youtube_prefs__' . ($iscontent ? '' : ' __youtube_prefs_widget__') .
2791
- ' no-lazyload"' . $voloutput . $acctitle . $galleryid_ifm_data . ' allow="autoplay; encrypted-media" allowfullscreen data-no-lazy="1" data-skipgform_ajax_framebjll=""></iframe>' . $end_responsive;
 
2792
 
2793
  $origin = '';
2794
 
@@ -2851,6 +2871,16 @@ class YouTubePrefs
2851
  return $code;
2852
  }
2853
 
 
 
 
 
 
 
 
 
 
 
2854
  public static function gdpr_mode()
2855
  {
2856
  return (bool) self::$alloptions[self::$opt_gdpr_consent] && filter_input(INPUT_COOKIE, self::$gdpr_cookie_name, FILTER_SANITIZE_NUMBER_INT) != 1;
@@ -3146,7 +3176,7 @@ class YouTubePrefs
3146
  $new_pointer_content = '<h3>' . __('New Update') . '</h3>'; // ooopointer
3147
 
3148
  $new_pointer_content .= '<p>'; // ooopointer
3149
- $new_pointer_content .= "This version fixes a simultaneous playback control issue, and adds YouTube Premieres embedding functionality to Free and <a target=_blank href=" . self::$epbase . '/dashboard/pro-easy-video-analytics.aspx?ref=frompointer' . ">Pro versions</a>.";
3150
  if (self::vi_logged_in())
3151
  {
3152
  $new_pointer_content .= "<br><br><strong>Note:</strong> You are currently logged into the vi intelligence feature. vi support is being deprecated in the next version, so we recommend taking the vi ads down from your site. Please contact ext@embedplus.com for questions.";
@@ -3454,6 +3484,13 @@ class YouTubePrefs
3454
  height: 100%;
3455
  }
3456
 
 
 
 
 
 
 
 
3457
  </style>
3458
  <div class="wrap wrap-ytprefs">
3459
  <h1><span class="dashicons-before dashicons-video-alt3"></span> <?php echo __('YouTube Settings') ?></h1>
@@ -3505,7 +3542,7 @@ class YouTubePrefs
3505
  <a href="https://support.google.com/youtube/answer/132596?hl=en" target="_blank">https://support.google.com/youtube/answer/132596?hl=en</a>
3506
  You'll see that videos that you want to monetize "should be embedded using the standard click-to-play embed and NOT a scripted play."
3507
  Unchecking this option guarantees standard click-to-play gallery embedding.
3508
- (Another Note: Desktop browsers like <a href="https://developers.google.com/youtube/iframe_api_reference#Mobile_considerations" target="_blank">Chrome and Safari are moving towards preventing autoplay for any video</a>. So this general feature may be deprecated by most browsers in the near future)
3509
  </label>
3510
  </p>
3511
  <p>
@@ -3556,7 +3593,7 @@ class YouTubePrefs
3556
  </p>
3557
  <p>
3558
  <input name="<?php echo self::$opt_responsive; ?>" id="<?php echo self::$opt_responsive; ?>" <?php checked($all[self::$opt_responsive], 1); ?> type="checkbox" class="checkbox">
3559
- <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>
3560
  <div id="boxresponsive_all">
3561
  <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); ?> >
3562
  <label for="<?php echo self::$opt_responsive_all; ?>1">Responsive for all YouTube videos</label> &nbsp;&nbsp;
@@ -3776,6 +3813,7 @@ class YouTubePrefs
3776
  <h2>Visual YouTube Wizard Directions</h2>
3777
  <p>
3778
  While you're writing your post or page, you have the ability to search YouTube and insert videos, playlists, and even galleries right from your editor. Below are directions for each type of WordPress editor.
 
3779
  </p>
3780
  <h3>Classic Editor</h3>
3781
  <img class="wiztab-screenshots" src="<?php echo plugins_url('images/ss-wiz-classic.png', __FILE__) ?>">
@@ -3818,6 +3856,41 @@ class YouTubePrefs
3818
  Simply click the "Customize" button in the wizard to further personalize each of your embeds without having to manually add special codes yourself.
3819
  The customize button will allow you to easily override most of the above default options for that embed.
3820
  </p>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3821
  </section>
3822
 
3823
  <section class="pattern" id="jumpgallery">
@@ -3989,6 +4062,13 @@ class YouTubePrefs
3989
  Turn this option off if you are having trouble saving your settings.
3990
  </label>
3991
  </p>
 
 
 
 
 
 
 
3992
  <p>
3993
  <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">
3994
  <label for="<?php echo self::$opt_old_script_method; ?>">
@@ -4043,7 +4123,7 @@ class YouTubePrefs
4043
  <label for="<?php echo self::$opt_stop_mobile_buffer; ?>">
4044
  <b class="chktitle">Mobile Autoplay Problems: </b>
4045
  Autoplay works for desktop, but mobile devices don't allow autoplay due to network carrier data charges. For mobile devices, this option may help the player to properly display the video for the visitor to click on.
4046
- (<strong>Note:</strong> Desktop browsers like <a href="https://developers.google.com/youtube/iframe_api_reference#Mobile_considerations" target="_blank">Chrome and Safari are moving towards preventing autoplay for any video</a>. So this general feature may be deprecated by most browsers in the near future)
4047
  </label>
4048
  </p>
4049
  <p>
@@ -4120,7 +4200,7 @@ class YouTubePrefs
4120
  _e('<ul class="reglist">');
4121
  _e("<li><strong>width</strong> - Sets the width of your player. If omitted, the default width will be the width of your theme's content.<em> Example: http://www.youtube.com/watch?v=quwebVjAEJA<strong>&width=500</strong>&height=350</em></li>");
4122
  _e("<li><strong>height</strong> - Sets the height of your player. <em>Example: http://www.youtube.com/watch?v=quwebVjAEJA&width=500<strong>&height=350</strong></em> </li>");
4123
- _e("<li><strong>autoplay</strong> - Set this to 1 to autoplay the video (or 0 to play the video once). <em>Example: http://www.youtube.com/watch?v=quwebVjAEJA<strong>&autoplay=1</strong></em> (Note: Desktop browsers like Chrome and Safari are moving towards preventing autoplay for any video. So this general feature may be deprecated by most browsers in the near future) </li>");
4124
  _e("<li><strong>cc_load_policy</strong> - Set this to 1 to turn on closed captioning (or 0 to leave them off). <em>Example: http://www.youtube.com/watch?v=quwebVjAEJA<strong>&cc_load_policy=1</strong></em> </li>");
4125
  _e("<li><strong>iv_load_policy</strong> - Set this to 3 to turn off annotations (or 1 to show them). <em>Example: http://www.youtube.com/watch?v=quwebVjAEJA<strong>&iv_load_policy=3</strong></em> </li>");
4126
  _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>");
@@ -4157,7 +4237,7 @@ class YouTubePrefs
4157
  <label for="<?php echo self::$opt_defer_jquery ?>">
4158
  <b class="chktitle"><?php _e('Also Defer jQuery:', 'youtube-embed-plus'); ?></b>
4159
  <span style="color: red;">
4160
- <?php _e('Note: Defering jQuery may improve your GTMetrix score even more, but might not be compatible with your theme or other plugins (especially if they are not defering their own scripts). Use this option with caution.', 'youtube-embed-plus'); ?>
4161
  </span>
4162
  </label>
4163
  </div>
@@ -4184,7 +4264,8 @@ class YouTubePrefs
4184
  <label>
4185
  <b class="chktitle">Lazy-Loading for Performance:</b> <span class="pronon">(PRO Users)</span>
4186
  Lazy-loading can speed up your page loads by loading the player only until it is visible on the screen.
4187
- You have the choice of several types of eye-catching lazy-loading effects that will make your YouTube embeds bounce, flip, pulse, or slide as they lazy load on the screen. Check this box to select your desired effect. <a target="_blank" href="<?php echo self::$epbase ?>/add-special-effects-to-youtube-embeds-in-wordpress.aspx">Read more here &raquo;</a>
 
4188
  </label>
4189
  </p>
4190
  <div class="hr"></div>
@@ -4693,6 +4774,7 @@ class YouTubePrefs
4693
  $new_options[self::$opt_controls] = self::postchecked(self::$opt_controls) ? 1 : 0;
4694
  $new_options[self::$opt_color] = self::postchecked(self::$opt_color) ? 'red' : 'white';
4695
  $new_options[self::$opt_nocookie] = self::postchecked(self::$opt_nocookie) ? 1 : 0;
 
4696
  $new_options[self::$opt_gdpr_consent] = self::postchecked(self::$opt_gdpr_consent) ? 1 : 0;
4697
  $new_options[self::$opt_playlistorder] = self::postchecked(self::$opt_playlistorder) ? 1 : 0;
4698
  $new_options[self::$opt_acctitle] = self::postchecked(self::$opt_acctitle) ? 1 : 0;
@@ -5174,7 +5256,7 @@ class YouTubePrefs
5174
  <li><label><input type="checkbox" data-obfilter="yob-single" /> Single videos.</label></li>
5175
  <li><label><input type="checkbox" data-obfilter="yob-gallery" /> Galleries of playlists or channels (displays thumbnails and a player).</label></li>
5176
  <li><label><input type="checkbox" data-obfilter="yob-standalone" /> Self-contained playlists or channels (no thumbnails, just YouTube's standard playlist player).</label></li>
5177
- <li><label><input type="checkbox" data-obfilter="yob-live" /> Live streams.</label></li>
5178
  <li style="display:none;"><label><input type="checkbox" data-obfilter="yob-privacy" /> With GDPR / privacy features.</label></li>
5179
  <!-- <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>-->
5180
  </ul>
3
  Plugin Name: Embed Plus for YouTube - Gallery, Channel, Playlist, Live Stream
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.4
7
  Author: Embed Plus for YouTube 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.4';
38
  public static $opt_version = 'version';
39
  public static $optembedwidth = null;
40
  public static $optembedheight = null;
61
  public static $opt_dohl = 'dohl';
62
  public static $opt_hl = 'hl';
63
  public static $opt_nocookie = 'nocookie';
64
+ public static $opt_gb_compat = 'gb_compat';
65
  public static $opt_gdpr_consent = 'gdpr_consent';
66
  public static $opt_gdpr_consent_message = 'gdpr_consent_message';
67
  public static $opt_gdpr_consent_button = 'gdpr_consent_button';
120
  public static $yt_options = array();
121
  public static $dft_bpts = array(array('bp' => array('min' => 0, 'max' => 767), 'cols' => 1));
122
  public static $dft_roles = array('administrator', 'editor', 'author', 'contributor', 'subscriber');
 
123
  public static $epbase = 'https://www.embedplus.com';
124
  public static $double_plugin = false;
125
  public static $scriptsprinted = 0;
191
 
192
  public function __construct()
193
  {
194
+ if (defined('EMBEDPLUS_BASE_URL'))
195
+ {
196
+ self::$epbase = EMBEDPLUS_BASE_URL;
197
+ }
198
  self::$vi_default_date = date('Y-m-d H:i:s', strtotime('2000-01-01'));
199
  register_deactivation_hook(__FILE__, array(get_class(), 'on_deactivation'));
200
  add_action('admin_init', array(get_class(), 'check_double_plugin_warning'));
201
  add_action('admin_notices', array(get_class(), 'separate_version_message'));
202
 
203
  self::$alloptions = get_option(self::$opt_alloptions);
204
+ if (self::$alloptions == false || version_compare(self::$alloptions[self::$opt_version], self::$version, '<'))
205
  {
206
+ self::initoptions();
207
  }
208
 
209
+ if ((defined('SCRIPT_DEBUG') && SCRIPT_DEBUG) || self::$alloptions[self::$opt_debugmode] == 1)
210
  {
211
+ self::$min = '';
212
  }
213
 
214
 
766
  <span class="copycode">[embedyt] https://www.youtube.com/watch?v=<?php echo esc_attr($theytid) ?>[/embedyt]</span>
767
  <div class="clearboth" style="height: 10px;">
768
  </div>
769
+ <div class="ep-wizard-preview-video-wrapper">
770
+ <iframe src="https://www.youtube.com/embed/<?php echo esc_attr($theytid) ?>?rel=0" allowfullscreen="" frameborder="0"></iframe>
771
  </div>
772
 
773
  </div>
876
  </p>
877
  <div class="clearboth" style="height: 10px;">
878
  </div>
879
+ <div class="ep-wizard-preview-video-wrapper">
880
+ <iframe src="<?php echo $rel; ?>" allowfullscreen="" frameborder="0"></iframe>
881
  </div>
882
  </div>
883
  <?php
979
  </p>
980
  <div class="clearboth" style="height: 10px;">
981
  </div>
982
+ <div class="ep-wizard-preview-video-wrapper">
983
+ <iframe src="<?php echo $rel; ?>" allowfullscreen="" frameborder="0"></iframe>
984
  </div>
985
  </div>
986
  <?php
1053
  <span class="copycode">[embedyt] https://www.youtube.com/embed/live_stream?channel=<?php echo esc_attr($thechannelid) ?>[/embedyt]</span>
1054
  <div class="clearboth" style="height: 10px;">
1055
  </div>
1056
+ <p>
1057
+ If you see a black/empty YouTube player, then it's likely that your channel is not yet approved by YouTube/Google for embedding live streams. You can live stream and have viewers watch directly on YouTube.com, but embedding the live stream on your own site requires meeting thresholds <a href="https://www.embedplus.com/how-to-embed-a-youtube-livestream-in-wordpress.aspx" target="_blank">described here</a>.
1058
+ </p>
1059
+ <div class="ep-wizard-preview-video-wrapper">
1060
+ <iframe src="https://www.youtube.com/embed/live_stream?channel=<?php echo esc_attr($thechannelid) ?>" allowfullscreen="" frameborder="0"></iframe>
1061
  </div>
1062
  </div>
1063
  <?php
1144
  if ($if_live_preview)
1145
  {
1146
  ?>
1147
+ <div class="ep-wizard-preview-video-wrapper">
1148
+ <iframe src="https://www.youtube.com/embed/<?php echo esc_attr($if_live_preview) ?>?rel=0" allowfullscreen="" frameborder="0"></iframe>
1149
  </div>
1150
  <?php
1151
  }
1829
 
1830
  public static function initoptions()
1831
  {
1832
+ global $wpdb;
1833
  $arroptions = get_option(self::$opt_alloptions);
1834
  if ($arroptions !== false)
1835
  {
1836
  $bak = str_replace('.', '_', $arroptions[self::$opt_version]);
1837
+ add_option(self::$opt_alloptions . '_backup_' . $bak, $arroptions, '', 'no');
1838
+ $sql = "update " . $wpdb->options . " set autoload = 'no' where option_name like '" . self::$opt_alloptions . "\_backup\_%'";
1839
+ $wpdb->query($sql);
1840
  }
1841
 
1842
  // backup settings for migration
1860
  $_autohide = 2;
1861
  $_pro = '';
1862
  $_nocookie = 0;
1863
+ $_gb_compat = 1;
1864
  $_gdpr_consent = 0;
1865
  $_gdpr_consent_message = self::$dft_gdpr_consent_message;
1866
  $_gdpr_consent_button = 'Accept YouTube Content';
1909
  $_gallery_customnext = 'Next';
1910
  $_gallery_pagesize = 15;
1911
  $_not_live_content = '';
1912
+ $_not_live_on = 0;
1913
  $_debugmode = 0;
1914
  $_admin_off_scripts = 0;
1915
  $_defer_js = 0;
1957
  $_autohide = self::tryget($arroptions, self::$opt_autohide, 2);
1958
  $_pro = self::tryget($arroptions, self::$opt_pro, '');
1959
  $_nocookie = self::tryget($arroptions, self::$opt_nocookie, 0);
1960
+ $_gb_compat = self::tryget($arroptions, self::$opt_gb_compat, $_gb_compat);
1961
  $_gdpr_consent = self::tryget($arroptions, self::$opt_gdpr_consent, $_gdpr_consent);
1962
  $_gdpr_consent_message = self::tryget($arroptions, self::$opt_gdpr_consent_message, $_gdpr_consent_message);
1963
  $_gdpr_consent_button = self::tryget($arroptions, self::$opt_gdpr_consent_button, $_gdpr_consent_button);
1970
  $_controls = $_controls == 2 ? 1 : $_controls;
1971
  $_oldspacing = self::tryget($arroptions, self::$opt_oldspacing, 1);
1972
  $_frontend_only = self::tryget($arroptions, self::$opt_frontend_only, $_frontend_only);
1973
+ $_responsive = self::tryget($arroptions, self::$opt_responsive, $_responsive);
1974
+ $_responsive_all = self::tryget($arroptions, self::$opt_responsive_all, $_responsive_all);
1975
  $_widgetfit = self::tryget($arroptions, self::$opt_widgetfit, 1);
1976
  $_evselector_light = self::tryget($arroptions, self::$opt_evselector_light, 0);
1977
  $_stop_mobile_buffer = self::tryget($arroptions, self::$opt_stop_mobile_buffer, 1);
2004
  $_gallery_customprev = self::tryget($arroptions, self::$opt_gallery_customprev, $_gallery_customprev);
2005
  $_not_live_content = self::tryget($arroptions, self::$opt_not_live_content, $_not_live_content);
2006
  $_not_live_content = empty($_not_live_content) ? $_not_live_content : trim($_not_live_content);
2007
+ $_not_live_on = self::tryget($arroptions, self::$opt_not_live_on, empty($_not_live_content) ? 0 : $_not_live_on);
2008
  $_admin_off_scripts = self::tryget($arroptions, self::$opt_admin_off_scripts, $_admin_off_scripts);
2009
  $_defer_js = self::tryget($arroptions, self::$opt_defer_js, $_defer_js);
2010
  $_defer_jquery = self::tryget($arroptions, self::$opt_defer_jquery, $_defer_jquery);
2051
  self::$opt_color => $_color,
2052
  self::$opt_pro => $_pro,
2053
  self::$opt_nocookie => $_nocookie,
2054
+ self::$opt_gb_compat => $_gb_compat,
2055
  self::$opt_gdpr_consent => $_gdpr_consent,
2056
  self::$opt_gdpr_consent_message => $_gdpr_consent_message,
2057
  self::$opt_gdpr_consent_button => $_gdpr_consent_button,
2196
  $currfilter = current_filter();
2197
  if (preg_match(self::$justurlregex, $content))
2198
  {
2199
+ return self::get_html(array($content), strpos($currfilter, 'widget_text') === 0 ? false : true, false);
2200
  }
2201
  return '';
2202
  }
2207
  $currfilter = current_filter();
2208
  if (preg_match(self::$justurlregex, $content))
2209
  {
2210
+ return self::get_html(array($content), $currfilter == 'widget_text' ? false : true, false);
2211
  }
2212
  return '';
2213
  }
2240
  $currfilter = current_filter();
2241
  if (preg_match(self::$justurlregex, $url))
2242
  {
2243
+ return self::get_html(array($url), $currfilter == 'widget_text' ? false : true, false);
2244
  }
2245
  }
2246
  return '';
2260
 
2261
  public static function get_html_content($m)
2262
  {
2263
+ return self::get_html($m, true, true);
2264
  }
2265
 
2266
  public static function get_html_widget($m)
2267
  {
2268
+ return self::get_html($m, false, true);
2269
  }
2270
 
2271
  public static function get_gallery_page($options)
2504
  }
2505
  }
2506
 
2507
+ public static function get_html($m, $iscontent, $isoverride)
2508
  {
2509
  //$time_start = microtime(true);
2510
 
2752
  $galleryid_ifm_data = ' data-epytgalleryid="' . $galleryid . '" ';
2753
 
2754
  $subbutton = '';
2755
+ if (isset($finalparams[self::$opt_gallery_channelsub]) && $finalparams[self::$opt_gallery_channelsub] == 1)
2756
  {
2757
  $subbutton = '<div class="epyt-gallery-subscribe"><a target="_blank" class="epyt-gallery-subbutton" href="' .
2758
  esc_url(self::$alloptions[self::$opt_gallery_channelsublink]) . '?sub_confirmation=1"><img alt="subscribe" src="' . plugins_url('images/play-subscribe.png', __FILE__) . '" />' .
2788
  $dim_attrs = ' width="' . self::$defaultwidth . '" height="' . self::$defaultheight . '" ';
2789
  if ($finalparams[self::$opt_responsive] == 1)
2790
  {
 
 
 
2791
  $begin_responsive = '<div class="epyt-video-wrapper">';
2792
  $end_responsive = '</div>';
2793
  }
2794
 
2795
+ $begin_gb_wrapper = '';
2796
+ $end_gb_wrapper = '';
2797
+ if ($iscontent && !$isoverride && $finalparams[self::$opt_gb_compat] == 1 && current_theme_supports('responsive-embeds'))// self::using_gutenberg())
2798
+ {
2799
+ // don't do the following if: overriding default YT, is widget
2800
+ $begin_gb_wrapper = '<figure class="wp-block-embed wp-block-embed-youtube is-type-video is-provider-youtube"><div class="wp-block-embed__wrapper">';
2801
+ //wp-block-embed-youtube is-type-video is-provider-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio
2802
+ $end_gb_wrapper = '</div></figure>';
2803
+ }
2804
  $iframe_id = rand(10000, 99999);
2805
 
2806
+ $code1 = $begin_gb_wrapper . $begin_responsive . '<iframe ' . $centercode . ' id="_ytid_' . $iframe_id . '" ' . $dim_attrs .
2807
  ' data-origwidth="' . self::$defaultwidth . '" data-origheight="' . self::$defaultheight . '" ' . $relstop .
2808
  ' src="https://www.' . $youtubebaseurl . '.com/embed/' . $videoidoutput . '?';
2809
+ $code2 = '" class="__youtube_prefs__ ' . ($iscontent ? '' : ' __youtube_prefs_widget__ ') . ($isoverride ? ' epyt-is-override ' : '') .
2810
+ ' no-lazyload"' . $voloutput . $acctitle . $galleryid_ifm_data . ' allow="autoplay; encrypted-media" allowfullscreen data-no-lazy="1" data-skipgform_ajax_framebjll=""></iframe>' .
2811
+ $end_responsive . $end_gb_wrapper;
2812
 
2813
  $origin = '';
2814
 
2871
  return $code;
2872
  }
2873
 
2874
+ public static function using_gutenberg()
2875
+ {
2876
+ global $wp_version;
2877
+ if ((version_compare($wp_version, '5.0', '>=') && !is_plugin_active('classic-editor/classic-editor.php')) || is_plugin_active('gutenberg/gutenberg.php'))
2878
+ {
2879
+ return true;
2880
+ }
2881
+ return false;
2882
+ }
2883
+
2884
  public static function gdpr_mode()
2885
  {
2886
  return (bool) self::$alloptions[self::$opt_gdpr_consent] && filter_input(INPUT_COOKIE, self::$gdpr_cookie_name, FILTER_SANITIZE_NUMBER_INT) != 1;
3176
  $new_pointer_content = '<h3>' . __('New Update') . '</h3>'; // ooopointer
3177
 
3178
  $new_pointer_content .= '<p>'; // ooopointer
3179
+ $new_pointer_content .= "This update provides better compatibility with themes that use the Gutenberg block editor (see the Compatibility tab) and responsive sizing for both Free and <a target=_blank href=" . self::$epbase . '/dashboard/pro-easy-video-analytics.aspx?ref=frompointer' . ">Pro versions</a>. <br><br> Do you use a pagebuilder? see the bottom of the Wizard tab for tips. <br><br> Pro users can also now turn on or off the channel subscribe button per embed, within the customization wizard.";
3180
  if (self::vi_logged_in())
3181
  {
3182
  $new_pointer_content .= "<br><br><strong>Note:</strong> You are currently logged into the vi intelligence feature. vi support is being deprecated in the next version, so we recommend taking the vi ads down from your site. Please contact ext@embedplus.com for questions.";
3484
  height: 100%;
3485
  }
3486
 
3487
+ .wiztab-pagebuilder {
3488
+ width: 50%;
3489
+ float: left;
3490
+ padding: 20px;
3491
+ box-sizing: border-box;
3492
+ }
3493
+
3494
  </style>
3495
  <div class="wrap wrap-ytprefs">
3496
  <h1><span class="dashicons-before dashicons-video-alt3"></span> <?php echo __('YouTube Settings') ?></h1>
3542
  <a href="https://support.google.com/youtube/answer/132596?hl=en" target="_blank">https://support.google.com/youtube/answer/132596?hl=en</a>
3543
  You'll see that videos that you want to monetize "should be embedded using the standard click-to-play embed and NOT a scripted play."
3544
  Unchecking this option guarantees standard click-to-play gallery embedding.
3545
+ (Another Note: Desktop browsers like <a href="https://developers.google.com/youtube/iframe_api_reference#Mobile_considerations" target="_blank">Chrome and Safari are moving towards preventing autoplay for any video</a>. But, your chances are improved if you set your videos to initially start muted.)
3546
  </label>
3547
  </p>
3548
  <p>
3593
  </p>
3594
  <p>
3595
  <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
+ <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>Uncheck this if your theme already properly handles responsive video sizing.</b>') ?></label>
3597
  <div id="boxresponsive_all">
3598
  <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); ?> >
3599
  <label for="<?php echo self::$opt_responsive_all; ?>1">Responsive for all YouTube videos</label> &nbsp;&nbsp;
3813
  <h2>Visual YouTube Wizard Directions</h2>
3814
  <p>
3815
  While you're writing your post or page, you have the ability to search YouTube and insert videos, playlists, and even galleries right from your editor. Below are directions for each type of WordPress editor.
3816
+ For <strong>pagebuilder instructions</strong>, scroll down to the "Pagebuilder Tips" section.
3817
  </p>
3818
  <h3>Classic Editor</h3>
3819
  <img class="wiztab-screenshots" src="<?php echo plugins_url('images/ss-wiz-classic.png', __FILE__) ?>">
3856
  Simply click the "Customize" button in the wizard to further personalize each of your embeds without having to manually add special codes yourself.
3857
  The customize button will allow you to easily override most of the above default options for that embed.
3858
  </p>
3859
+ <hr class="clearboth"/>
3860
+ <h2 id="jumppagebuilder">Pagebuilder Tips</h2>
3861
+ <p>
3862
+ Most page builders have a text widget in which our plugin's wizard can be launched. Watch the videos below for some popular ones, namely Elementor, Beaver Builder, and SiteOrigin.
3863
+ </p>
3864
+ <p>
3865
+ <em>Note: Please do not check the "Also Defer jQuery" option if you use a pagebuilder. Some pagebuilders cannot work if jQuery is deferred.</em>
3866
+ </p>
3867
+ <div class="wiztab-pagebuilder">
3868
+ <h3>Beaver Builder</h3>
3869
+ <div class="epyt-fitvid">
3870
+ <iframe src="https://www.youtube.com/embed/bPgz0jyt7TE?rel=0" allowfullscreen="" frameborder="0"></iframe>
3871
+ </div>
3872
+ </div>
3873
+ <div class="wiztab-pagebuilder">
3874
+ <h3>Elementor</h3>
3875
+ <div class="epyt-fitvid">
3876
+ <iframe src="https://www.youtube.com/embed/ldNfIGRTxDU?rel=0" allowfullscreen="" frameborder="0"></iframe>
3877
+ </div>
3878
+ </div>
3879
+ <div class="wiztab-pagebuilder">
3880
+ <h3>Site Origin</h3>
3881
+ <div class="epyt-fitvid">
3882
+ <iframe src="https://www.youtube.com/embed/7QNYw_g-7WM?rel=0" allowfullscreen="" frameborder="0"></iframe>
3883
+ </div>
3884
+ </div>
3885
+ <div class="wiztab-pagebuilder">
3886
+ <h3>Visual Composer</h3>
3887
+ <div class="epyt-fitvid">
3888
+ <iframe src="https://www.youtube.com/embed/FWBQc9XhAqM?rel=0" allowfullscreen="" frameborder="0"></iframe>
3889
+ </div>
3890
+ </div>
3891
+ <p>
3892
+ If you don't see your page builder listed above, don't worry. For pretty much any page builder with a short code widget, you can also embed your video, gallery, live stream, or premiere by creating the short code using the plugin's wizard and then embedding the code in the short code widget or text widget of your page builder of choice.
3893
+ </p>
3894
  </section>
3895
 
3896
  <section class="pattern" id="jumpgallery">
4062
  Turn this option off if you are having trouble saving your settings.
4063
  </label>
4064
  </p>
4065
+ <p>
4066
+ <input name="<?php echo self::$opt_gb_compat; ?>" id="<?php echo self::$opt_gb_compat; ?>" <?php checked($all[self::$opt_gb_compat], 1); ?> type="checkbox" class="checkbox">
4067
+ <label for="<?php echo self::$opt_gb_compat; ?>">
4068
+ <b class="chktitle">Gutenberg Block Editor Theme Spacing: </b> <sup class="orange">new</sup>
4069
+ Check this option to fix possible issues with spacing below your videos. You may also want to try combining this option with Responsive Sizing.
4070
+ </label>
4071
+ </p>
4072
  <p>
4073
  <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">
4074
  <label for="<?php echo self::$opt_old_script_method; ?>">
4123
  <label for="<?php echo self::$opt_stop_mobile_buffer; ?>">
4124
  <b class="chktitle">Mobile Autoplay Problems: </b>
4125
  Autoplay works for desktop, but mobile devices don't allow autoplay due to network carrier data charges. For mobile devices, this option may help the player to properly display the video for the visitor to click on.
4126
+ (<strong>Note:</strong> Desktop browsers like <a href="https://developers.google.com/youtube/iframe_api_reference#Mobile_considerations" target="_blank">Chrome and Safari are moving towards preventing autoplay for any video</a>. But, your chances are improved if you set your videos to initially start muted.)
4127
  </label>
4128
  </p>
4129
  <p>
4200
  _e('<ul class="reglist">');
4201
  _e("<li><strong>width</strong> - Sets the width of your player. If omitted, the default width will be the width of your theme's content.<em> Example: http://www.youtube.com/watch?v=quwebVjAEJA<strong>&width=500</strong>&height=350</em></li>");
4202
  _e("<li><strong>height</strong> - Sets the height of your player. <em>Example: http://www.youtube.com/watch?v=quwebVjAEJA&width=500<strong>&height=350</strong></em> </li>");
4203
+ _e("<li><strong>autoplay</strong> - Set this to 1 to autoplay the video (or 0 to play the video once). <em>Example: http://www.youtube.com/watch?v=quwebVjAEJA<strong>&autoplay=1</strong></em> (Note: Desktop browsers like Chrome and Safari are moving towards preventing autoplay for any video. But, your chances are improved if you set your videos to initially start muted.) </li>");
4204
  _e("<li><strong>cc_load_policy</strong> - Set this to 1 to turn on closed captioning (or 0 to leave them off). <em>Example: http://www.youtube.com/watch?v=quwebVjAEJA<strong>&cc_load_policy=1</strong></em> </li>");
4205
  _e("<li><strong>iv_load_policy</strong> - Set this to 3 to turn off annotations (or 1 to show them). <em>Example: http://www.youtube.com/watch?v=quwebVjAEJA<strong>&iv_load_policy=3</strong></em> </li>");
4206
  _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>");
4237
  <label for="<?php echo self::$opt_defer_jquery ?>">
4238
  <b class="chktitle"><?php _e('Also Defer jQuery:', 'youtube-embed-plus'); ?></b>
4239
  <span style="color: red;">
4240
+ <?php _e('Note: Do NOT check this option if you are using a pagebuilder. Furthermore, defering jQuery may improve your GTMetrix score even more, but might not be compatible with your theme or other plugins (especially if they are not defering their own scripts). Use this option with caution.', 'youtube-embed-plus'); ?>
4241
  </span>
4242
  </label>
4243
  </div>
4264
  <label>
4265
  <b class="chktitle">Lazy-Loading for Performance:</b> <span class="pronon">(PRO Users)</span>
4266
  Lazy-loading can speed up your page loads by loading the player only until it is visible on the screen.
4267
+ <a href="https://www.youtube.com/watch?v=omNdJvXDCLo" target="_blank">See an example here</a>.
4268
+ An added bonus to this option is that you have the choice of several types of eye-catching lazy-loading effects that will make your YouTube embeds bounce, flip, pulse, or slide as they lazy load on the screen. Check this box to select your desired effect. <a target="_blank" href="<?php echo self::$epbase ?>/add-special-effects-to-youtube-embeds-in-wordpress.aspx">Read more here &raquo;</a>
4269
  </label>
4270
  </p>
4271
  <div class="hr"></div>
4774
  $new_options[self::$opt_controls] = self::postchecked(self::$opt_controls) ? 1 : 0;
4775
  $new_options[self::$opt_color] = self::postchecked(self::$opt_color) ? 'red' : 'white';
4776
  $new_options[self::$opt_nocookie] = self::postchecked(self::$opt_nocookie) ? 1 : 0;
4777
+ $new_options[self::$opt_gb_compat] = self::postchecked(self::$opt_gb_compat) ? 1 : 0;
4778
  $new_options[self::$opt_gdpr_consent] = self::postchecked(self::$opt_gdpr_consent) ? 1 : 0;
4779
  $new_options[self::$opt_playlistorder] = self::postchecked(self::$opt_playlistorder) ? 1 : 0;
4780
  $new_options[self::$opt_acctitle] = self::postchecked(self::$opt_acctitle) ? 1 : 0;
5256
  <li><label><input type="checkbox" data-obfilter="yob-single" /> Single videos.</label></li>
5257
  <li><label><input type="checkbox" data-obfilter="yob-gallery" /> Galleries of playlists or channels (displays thumbnails and a player).</label></li>
5258
  <li><label><input type="checkbox" data-obfilter="yob-standalone" /> Self-contained playlists or channels (no thumbnails, just YouTube's standard playlist player).</label></li>
5259
+ <li><label><input type="checkbox" data-obfilter="yob-live" /> Live streams or premieres.</label></li>
5260
  <li style="display:none;"><label><input type="checkbox" data-obfilter="yob-privacy" /> With GDPR / privacy features.</label></li>
5261
  <!-- <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>-->
5262
  </ul>