YouTube - Version 13.2.3

Version Description

Download this release

Release Info

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

Code changes from version 13.2.1 to 13.2.3

dist/blocks.build.js CHANGED
@@ -1 +1 @@
1
- !function(e){function t(o){if(n[o])return n[o].exports;var r=n[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,o){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:o})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=3)}([function(e,t){function n(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}e.exports=n},function(e,t,n){var o=n(9),r="object"==typeof self&&self&&self.Object===Object&&self,c=o||r||Function("return this")();e.exports=c},function(e,t,n){var o=n(1),r=o.Symbol;e.exports=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(4),n(17)},function(e,t,n){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function c(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var i=n(5),l=(n.n(i),n(6)),a=(n.n(l),n(7)),s=n.n(a),u=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),p=wp.i18n.__,m=wp.blocks.registerBlockType,d=wp.element,f=d.Component,w=d.Fragment,v=wp.components,y=v.ServerSideRender,b=v.Button,h=v.Modal;m("epyt/youtube",{title:p("YouTube Wizard"),icon:wp.element.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 292.89 282.69"},wp.element.createElement("title",null,"YouTube Wizard Icon"),wp.element.createElement("g",{id:"Layer_2","data-name":"Layer 2"},wp.element.createElement("g",{id:"\u0421\u043b\u043e\u0439_1","data-name":"\u0421\u043b\u043e\u0439 1"},wp.element.createElement("g",{id:"g5360"},wp.element.createElement("g",{id:"g4167"},wp.element.createElement("path",{id:"path4156",className:"epytcls-1",d:"M139.27,87.65s-87.11,0-109,5.68A36,36,0,0,0,5.68,118.12C0,140,0,185.26,0,185.26s0,45.44,5.68,67A35.47,35.47,0,0,0,30.3,276.84c22,5.85,109,5.85,109,5.85s87.28,0,109.14-5.68a34.64,34.64,0,0,0,24.44-24.62c5.86-21.69,5.86-67,5.86-67s.17-45.45-5.86-67.31a34.41,34.41,0,0,0-24.44-24.45C226.55,87.65,139.27,87.65,139.27,87.65Zm-27.72,55.77L184,185.26l-72.48,41.65V143.42Z"}))),wp.element.createElement("path",{className:"epytcls-2",d:"M143.39,153.45c10.52-19.27,14.91-39.2,19.18-58.61q.68-3,1.33-6l.12-.54-.25-.48c-13.87-26.66-41.06-52.54-57.1-66.42,21,11.33,60,31.21,84,36.13l.63.13.53-.37c4.14-2.92,8.28-5.7,12.28-8.4,13.41-9,26.27-17.67,38.31-30.64-10.26,20.67-14.18,40.47-18.14,64.42l-.09.58.32.48c18.19,27.91,40.93,50.88,54.81,63.7C261.68,137.5,230,121.76,197,115.29l-.57-.12-3.83,2.35C176,127.67,159,138.08,143.39,153.45Z"}),wp.element.createElement("path",{className:"epytcls-3",d:"M237.47,25.4c-7.73,18.08-11.19,36-14.67,57l-.19,1.15.64,1c15,23,33.15,42.76,46.87,56.19-18.4-9.59-45.13-21.49-72.87-26.93l-1.15-.22-1,.61-3.33,2c-14.47,8.86-29.26,17.93-43.24,30.34,7.94-17,11.77-34.43,15.51-51.43q.66-3,1.33-6l.24-1.06-.51-1c-11.66-22.4-32.12-43.86-48-58.48C139,40,170,54.82,190.37,59l1.27.26,1.06-.74c4.12-2.91,8.25-5.69,12.25-8.38,11.27-7.59,22.16-14.91,32.52-24.74M254.86,0l-.74,1.11L254.86,0Zm-.74,1.11C235.26,28.88,213.71,40,191,56.06c-33.55-6.88-97.91-43.92-97.91-43.92s49,37.13,69.38,76.37c-6,26.61-11,54.9-31.35,80.94,19.83-25.28,42.66-38.61,65.58-52.69,50.06,9.8,96.22,40.55,96.22,40.55s-38.84-31-67.13-74.4c4.89-29.58,9.81-54,28.36-81.8Z"}),wp.element.createElement("polyline",{className:"epytcls-4",points:"102.6 133.11 102.6 133.11 192.98 185.28 102.6 237.22 102.6 133.11"})))),category:"embed",keywords:[p("gallery"),p("live"),p("video")],description:p("Embed a video, playlist, channel, gallery, or live stream."),attributes:{shortcode:{type:"string",default:""}},edit:function(e){function t(e){o(this,t);var n=r(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments));return n.state={show:!1},n.showModal=function(){n.setState({show:!0})},n.hideModal=function(){n.setState({show:!1})},n.onMessage=function(e){try{if(0===e.data.indexOf("youtubeembedplus")&&e.data.indexOf(n.props.clientId)>0){var t="";t=e.data.split("|")[1],n.props.setAttributes({shortcode:t.toString()}),n.hideModal(),n.gbPreviewSetup("onMessage")}}catch(e){}},n.gbPreviewSetup=s()(function(e){setTimeout(function(){window._EPYTA_.gbPreviewSetup()},1500)},50),n.props=e,n}return c(t,e),u(t,[{key:"componentDidMount",value:function(){window.addEventListener("message",this.onMessage),this.gbPreviewSetup("componentDidMount")}},{key:"componentDidUpdate",value:function(){this.gbPreviewSetup("componentDidUpdate")}},{key:"componentWillUnmount",value:function(){window.removeEventListener("message",this.onMessage)}},{key:"render",value:function(){if(this.props.attributes.shortcode){return wp.element.createElement(y,{block:"epyt/youtube",attributes:this.props.attributes})}return wp.element.createElement("div",{className:"components-placeholder editor-media-placeholder wp-block-image epytblock"},wp.element.createElement("div",{className:"components-placeholder__label"},wp.element.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 292.89 282.69",width:"20",height:"20",className:"dashicon"},wp.element.createElement("title",null,"YouTube Wizard Icon"),wp.element.createElement("g",{id:"Layer_2","data-name":"Layer 2"},wp.element.createElement("g",{id:"\u0421\u043b\u043e\u0439_1","data-name":"\u0421\u043b\u043e\u0439 1"},wp.element.createElement("g",{id:"g5360"},wp.element.createElement("g",{id:"g4167"},wp.element.createElement("path",{id:"path4156",className:"epytcls-1",d:"M139.27,87.65s-87.11,0-109,5.68A36,36,0,0,0,5.68,118.12C0,140,0,185.26,0,185.26s0,45.44,5.68,67A35.47,35.47,0,0,0,30.3,276.84c22,5.85,109,5.85,109,5.85s87.28,0,109.14-5.68a34.64,34.64,0,0,0,24.44-24.62c5.86-21.69,5.86-67,5.86-67s.17-45.45-5.86-67.31a34.41,34.41,0,0,0-24.44-24.45C226.55,87.65,139.27,87.65,139.27,87.65Zm-27.72,55.77L184,185.26l-72.48,41.65V143.42Z"}))),wp.element.createElement("path",{className:"epytcls-2",d:"M143.39,153.45c10.52-19.27,14.91-39.2,19.18-58.61q.68-3,1.33-6l.12-.54-.25-.48c-13.87-26.66-41.06-52.54-57.1-66.42,21,11.33,60,31.21,84,36.13l.63.13.53-.37c4.14-2.92,8.28-5.7,12.28-8.4,13.41-9,26.27-17.67,38.31-30.64-10.26,20.67-14.18,40.47-18.14,64.42l-.09.58.32.48c18.19,27.91,40.93,50.88,54.81,63.7C261.68,137.5,230,121.76,197,115.29l-.57-.12-3.83,2.35C176,127.67,159,138.08,143.39,153.45Z"}),wp.element.createElement("path",{className:"epytcls-3",d:"M237.47,25.4c-7.73,18.08-11.19,36-14.67,57l-.19,1.15.64,1c15,23,33.15,42.76,46.87,56.19-18.4-9.59-45.13-21.49-72.87-26.93l-1.15-.22-1,.61-3.33,2c-14.47,8.86-29.26,17.93-43.24,30.34,7.94-17,11.77-34.43,15.51-51.43q.66-3,1.33-6l.24-1.06-.51-1c-11.66-22.4-32.12-43.86-48-58.48C139,40,170,54.82,190.37,59l1.27.26,1.06-.74c4.12-2.91,8.25-5.69,12.25-8.38,11.27-7.59,22.16-14.91,32.52-24.74M254.86,0l-.74,1.11L254.86,0Zm-.74,1.11C235.26,28.88,213.71,40,191,56.06c-33.55-6.88-97.91-43.92-97.91-43.92s49,37.13,69.38,76.37c-6,26.61-11,54.9-31.35,80.94,19.83-25.28,42.66-38.61,65.58-52.69,50.06,9.8,96.22,40.55,96.22,40.55s-38.84-31-67.13-74.4c4.89-29.58,9.81-54,28.36-81.8Z"}),wp.element.createElement("polyline",{className:"epytcls-4",points:"102.6 133.11 102.6 133.11 192.98 185.28 102.6 237.22 102.6 133.11"})))),"YouTube Wizard"),wp.element.createElement("div",{className:this.props.isSelected?"":"epytblock__faded--off"},wp.element.createElement("div",{className:"components-placeholder__instructions"},"Click the button below to easily embed a video, playlist, channel, gallery, or live stream."),wp.element.createElement("div",{className:"components-placeholder__fieldset"},wp.element.createElement("div",null,wp.element.createElement(b,{isDefault:!0,isLarge:!0,onClick:this.showModal},"Open Wizard"),this.state.show?wp.element.createElement(h,{title:"YouTube Wizard",className:"epytblock epytblock__modal",onRequestClose:this.hideModal,shouldCloseOnClickOutside:!1},wp.element.createElement("iframe",{title:"YouTube Wizard",src:window._EPYTA_.wizhref+"&clientId="+this.props.clientId})):null))))}}]),t}(f),save:function(e){return wp.element.createElement(w,null,e.attributes.shortcode)}})},function(e,t){},function(e,t){},function(e,t,n){function o(e,t,n){function o(t){var n=b,o=h;return b=h=void 0,O=t,_=e.apply(o,n)}function u(e){return O=e,E=setTimeout(d,t),j?o(e):_}function p(e){var n=e-x,o=e-O,r=t-n;return T?s(r,g-o):r}function m(e){var n=e-x,o=e-O;return void 0===x||n>=t||n<0||T&&o>=g}function d(){var e=c();if(m(e))return f(e);E=setTimeout(d,p(e))}function f(e){return E=void 0,C&&b?o(e):(b=h=void 0,_)}function w(){void 0!==E&&clearTimeout(E),O=0,b=x=h=E=void 0}function v(){return void 0===E?_:f(c())}function y(){var e=c(),n=m(e);if(b=arguments,h=this,x=e,n){if(void 0===E)return u(x);if(T)return E=setTimeout(d,t),o(x)}return void 0===E&&(E=setTimeout(d,t)),_}var b,h,g,_,E,x,O=0,j=!1,T=!1,C=!0;if("function"!=typeof e)throw new TypeError(l);return t=i(t)||0,r(n)&&(j=!!n.leading,T="maxWait"in n,g=T?a(i(n.maxWait)||0,t):g,C="trailing"in n?!!n.trailing:C),y.cancel=w,y.flush=v,y}var r=n(0),c=n(8),i=n(11),l="Expected a function",a=Math.max,s=Math.min;e.exports=o},function(e,t,n){var o=n(1),r=function(){return o.Date.now()};e.exports=r},function(e,t,n){(function(t){var n="object"==typeof t&&t&&t.Object===Object&&t;e.exports=n}).call(t,n(10))},function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(e){"object"===typeof window&&(n=window)}e.exports=n},function(e,t,n){function o(e){if("number"==typeof e)return e;if(c(e))return i;if(r(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=r(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(l,"");var n=s.test(e);return n||u.test(e)?p(e.slice(2),n?2:8):a.test(e)?i:+e}var r=n(0),c=n(12),i=NaN,l=/^\s+|\s+$/g,a=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,u=/^0o[0-7]+$/i,p=parseInt;e.exports=o},function(e,t,n){function o(e){return"symbol"==typeof e||c(e)&&r(e)==i}var r=n(13),c=n(16),i="[object Symbol]";e.exports=o},function(e,t,n){function o(e){return null==e?void 0===e?a:l:s&&s in Object(e)?c(e):i(e)}var r=n(2),c=n(14),i=n(15),l="[object Null]",a="[object Undefined]",s=r?r.toStringTag:void 0;e.exports=o},function(e,t,n){function o(e){var t=i.call(e,a),n=e[a];try{e[a]=void 0;var o=!0}catch(e){}var r=l.call(e);return o&&(t?e[a]=n:delete e[a]),r}var r=n(2),c=Object.prototype,i=c.hasOwnProperty,l=c.toString,a=r?r.toStringTag:void 0;e.exports=o},function(e,t){function n(e){return r.call(e)}var o=Object.prototype,r=o.toString;e.exports=n},function(e,t){function n(e){return null!=e&&"object"==typeof e}e.exports=n},function(e,t,n){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function c(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var i=n(18),l=(n.n(i),n(19)),a=(n.n(l),function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}()),s=wp.i18n.__,u=wp.blocks.registerBlockType,p=wp.element,m=p.Component,d=p.Fragment;u("epyt/vi",{title:s("Video Ad"),icon:wp.element.createElement("svg",{version:"1.1",id:"Capa_1",xmlns:"http://www.w3.org/2000/svg",x:"0px",y:"0px",viewBox:"0 0 485.6 485.6",style:{enableBackground:"new 0 0 485.6 485.6"},xmlSpace:"preserve"},wp.element.createElement("g",null,wp.element.createElement("g",null,wp.element.createElement("path",{fill:"#0ECAD4",d:"M301.5,368l-0.8-1.3c-6.7-10.5-5.8-23,2.3-32.7c1.2-1.4,2.4-2.8,4-4.5c4.8-4.8,12.4-11.3,23.4-11.3 c6.7,0,13.3,2.4,20,7.4c10.5,7.7,20.9,15.9,30.9,23.6c2,1.5,3.9,3,5.9,4.5c1.5-1.7,2.9-3.5,4.5-5.1c10.4-11.9,20.6-23.9,30.9-35.8 c5.6-19.2,8.7-39.5,8.7-60.6c0-119-96.6-215.6-215.6-215.6C96.6,36.8,0,133.4,0,252.4S96.6,468,215.6,468 c48.3,0,93-15.9,128.9-42.8c-11.5-15-23.2-30-34.6-45C306.7,376.2,304,372,301.5,368z M287,341.6c-10.4,12.7-24,21.2-39.9,25.5 c-7,1.9-10,5.6-9.6,12.8c0.3,7.1,0,14.2,0,21.2c0,6.3-3.2,9.6-9.4,9.9c-7.5,0.2-15.2,0.2-22.9,0c-6.6-0.1-9.7-3.9-9.9-10.4 c-0.1-5.1-0.1-10.3-0.1-15.4c-0.1-11.4-0.5-11.8-11.5-13.6c-14-2.2-27.7-5.5-40.6-11.6c-10.1-4.9-11.1-7.4-8.2-18 c2.2-7.9,4.3-15.8,6.7-23.6c2.8-9.1,5.2-10.2,13.6-5.8c14.2,7.4,29.2,11.5,45,13.5c10.2,1.3,20.1,0.2,29.6-3.8 c17.5-7.7,20.3-28.1,5.5-40.3c-5.1-4.2-10.8-7.2-16.8-9.9c-15.4-6.7-31.5-12-46.1-20.7c-23.7-14.2-38.7-33.5-36.9-62.3 c2-32.5,20.3-52.8,50.1-63.6c12.3-4.5,12.3-4.3,12.4-17.2c0-4.3,0-8.7,0-13c0.2-9.7,1.9-11.4,11.5-11.6c3-0.1,6,0,8.9,0 c20.5,0,20.5,0,20.7,20.5c0.1,14.5,0,14.6,14.5,16.8c11.1,1.7,21.7,5,31.9,9.5c5.7,2.4,7.8,6.5,6,12.4c-2.6,8.8-5,17.8-7.8,26.6 c-2.7,8.4-5.3,9.5-13.3,5.7c-16-7.8-32.8-11-50.6-10c-4.6,0.2-9.2,0.9-13.5,2.8c-15.3,6.7-17.8,23.6-4.8,34 c6.6,5.2,14.2,9.1,21.9,12.3c13.6,5.6,27.2,11,40,18.1C304.8,255,315.9,306.4,287,341.6z"}),wp.element.createElement("path",{fill:"#0ECAD4",d:"M480.3,302c-4.8-3.9-8.1-5.9-11.1-5.9c-3.4,0-6.4,2.6-11,7.9c-23.2,26.9-29.5,34.3-52.8,61.2 c-5.2,6-10.4,12-15.8,18.2c-2.7-2.1-5.2-4-7.7-6c-13.7-10.6-27.2-21.3-41-31.6c-3.1-2.3-5.7-3.5-8.1-3.5c-3,0-5.8,1.8-9.2,5.3 c-1,1-1.8,2-2.7,3.1c-2.5,3-2.9,6.2-0.8,9.5c2.5,3.9,5,7.9,7.8,11.6c18.3,23.8,36.6,47.5,55,71.3c2.2,2.9,4.8,4.4,7.4,4.4 c2.8,0,5.6-1.7,8-5.2c33.7-48.2,50.3-71.9,83.9-120.1C487.3,314.9,486.9,307.5,480.3,302z"})))),category:"embed",keywords:[s("video"),s("story"),s("ad")],description:s("Video ad powered by vi intelligence."),supports:{multiple:!1},attributes:{shortcode:{type:"string",default:"[embed-vi-ad]"}},edit:function(e){function t(e){o(this,t);var n=r(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments));return n.props=e,n}return c(t,e),a(t,[{key:"render",value:function(){return this.props.attributes.shortcode?wp.element.createElement("div",{className:"vi-story-demo--box"},wp.element.createElement("div",{className:"vi-story-demo--screen"},wp.element.createElement("span",null,"VIDEO AD + CONTENT","1"==window._EPYT_.vi_active?null:wp.element.createElement("small",null,"Note: Ads are currently turned off. ",wp.element.createElement("br",null),"When you are ready to make ads appear on your website, visit the"," ",wp.element.createElement("a",{target:"_blank",href:window._EPYTA_.admin_url_vi},"Monetize")," ","page to turn ads on."))),wp.element.createElement("div",{className:"vi-story-demo--info",style:{backgroundColor:window._EPYTA_.vi_js_settings.backgroundColor}},wp.element.createElement("div",{className:"vi-story-demo--title",style:{fontFamily:window._EPYTA_.vi_js_settings.font,fontSize:window._EPYTA_.vi_js_settings.fontSize,color:window._EPYTA_.vi_js_settings.textColor}},"Example vi Story Title Text"),wp.element.createElement("div",{className:"vi-story-demo--featured",style:{color:window._EPYTA_.vi_js_settings.textColor}},wp.element.createElement("span",{style:{color:window._EPYTA_.vi_js_settings.textColor}},"featured by")," ",wp.element.createElement("img",{alt:"vi logo",src:window._EPYT_.eppath+"images/vi_logo.svg"})))):null}}]),t}(m),save:function(e){return wp.element.createElement(d,null,e.attributes.shortcode)}})},function(e,t){},function(e,t){}]);
1
+ !function(e){function t(o){if(n[o])return n[o].exports;var r=n[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,o){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:o})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=3)}([function(e,t){function n(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}e.exports=n},function(e,t,n){var o=n(9),r="object"==typeof self&&self&&self.Object===Object&&self,i=o||r||Function("return this")();e.exports=i},function(e,t,n){var o=n(1),r=o.Symbol;e.exports=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(4)},function(e,t,n){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function i(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var l=n(5),a=(n.n(l),n(6)),c=(n.n(a),n(7)),s=n.n(c),u=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),p=wp.i18n.__,m=wp.blocks.registerBlockType,f=wp.element,d=f.Component,w=f.Fragment,v=wp.components,y=v.ServerSideRender,b=v.Button,h=v.Modal;m("epyt/youtube",{title:p("YouTube Wizard"),icon:wp.element.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 292.89 282.69"},wp.element.createElement("title",null,"YouTube Wizard Icon"),wp.element.createElement("g",{id:"Layer_2","data-name":"Layer 2"},wp.element.createElement("g",{id:"\u0421\u043b\u043e\u0439_1","data-name":"\u0421\u043b\u043e\u0439 1"},wp.element.createElement("g",{id:"g5360"},wp.element.createElement("g",{id:"g4167"},wp.element.createElement("path",{id:"path4156",className:"epytcls-1",d:"M139.27,87.65s-87.11,0-109,5.68A36,36,0,0,0,5.68,118.12C0,140,0,185.26,0,185.26s0,45.44,5.68,67A35.47,35.47,0,0,0,30.3,276.84c22,5.85,109,5.85,109,5.85s87.28,0,109.14-5.68a34.64,34.64,0,0,0,24.44-24.62c5.86-21.69,5.86-67,5.86-67s.17-45.45-5.86-67.31a34.41,34.41,0,0,0-24.44-24.45C226.55,87.65,139.27,87.65,139.27,87.65Zm-27.72,55.77L184,185.26l-72.48,41.65V143.42Z"}))),wp.element.createElement("path",{className:"epytcls-2",d:"M143.39,153.45c10.52-19.27,14.91-39.2,19.18-58.61q.68-3,1.33-6l.12-.54-.25-.48c-13.87-26.66-41.06-52.54-57.1-66.42,21,11.33,60,31.21,84,36.13l.63.13.53-.37c4.14-2.92,8.28-5.7,12.28-8.4,13.41-9,26.27-17.67,38.31-30.64-10.26,20.67-14.18,40.47-18.14,64.42l-.09.58.32.48c18.19,27.91,40.93,50.88,54.81,63.7C261.68,137.5,230,121.76,197,115.29l-.57-.12-3.83,2.35C176,127.67,159,138.08,143.39,153.45Z"}),wp.element.createElement("path",{className:"epytcls-3",d:"M237.47,25.4c-7.73,18.08-11.19,36-14.67,57l-.19,1.15.64,1c15,23,33.15,42.76,46.87,56.19-18.4-9.59-45.13-21.49-72.87-26.93l-1.15-.22-1,.61-3.33,2c-14.47,8.86-29.26,17.93-43.24,30.34,7.94-17,11.77-34.43,15.51-51.43q.66-3,1.33-6l.24-1.06-.51-1c-11.66-22.4-32.12-43.86-48-58.48C139,40,170,54.82,190.37,59l1.27.26,1.06-.74c4.12-2.91,8.25-5.69,12.25-8.38,11.27-7.59,22.16-14.91,32.52-24.74M254.86,0l-.74,1.11L254.86,0Zm-.74,1.11C235.26,28.88,213.71,40,191,56.06c-33.55-6.88-97.91-43.92-97.91-43.92s49,37.13,69.38,76.37c-6,26.61-11,54.9-31.35,80.94,19.83-25.28,42.66-38.61,65.58-52.69,50.06,9.8,96.22,40.55,96.22,40.55s-38.84-31-67.13-74.4c4.89-29.58,9.81-54,28.36-81.8Z"}),wp.element.createElement("polyline",{className:"epytcls-4",points:"102.6 133.11 102.6 133.11 192.98 185.28 102.6 237.22 102.6 133.11"})))),category:"embed",keywords:[p("gallery"),p("live"),p("video")],description:p("Embed a video, playlist, channel, gallery, or live stream."),attributes:{shortcode:{type:"string",default:""}},edit:function(e){function t(e){o(this,t);var n=r(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments));return n.state={show:!1},n.showModal=function(){n.setState({show:!0})},n.hideModal=function(){n.setState({show:!1})},n.onMessage=function(e){try{if(0===e.data.indexOf("youtubeembedplus")&&e.data.indexOf(n.props.clientId)>0){var t="";t=e.data.split("|")[1],n.props.setAttributes({shortcode:t.toString()}),n.hideModal(),n.gbPreviewSetup("onMessage")}}catch(e){}},n.gbPreviewSetup=s()(function(e){setTimeout(function(){window._EPYTA_.gbPreviewSetup()},1500)},50),n.props=e,n}return i(t,e),u(t,[{key:"componentDidMount",value:function(){window.addEventListener("message",this.onMessage),this.gbPreviewSetup("componentDidMount")}},{key:"componentDidUpdate",value:function(){this.gbPreviewSetup("componentDidUpdate")}},{key:"componentWillUnmount",value:function(){window.removeEventListener("message",this.onMessage)}},{key:"render",value:function(){if(this.props.attributes.shortcode){return wp.element.createElement(y,{block:"epyt/youtube",attributes:this.props.attributes})}return wp.element.createElement("div",{className:"components-placeholder editor-media-placeholder wp-block-image epytblock"},wp.element.createElement("div",{className:"components-placeholder__label"},wp.element.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 292.89 282.69",width:"20",height:"20",className:"dashicon"},wp.element.createElement("title",null,"YouTube Wizard Icon"),wp.element.createElement("g",{id:"Layer_2","data-name":"Layer 2"},wp.element.createElement("g",{id:"\u0421\u043b\u043e\u0439_1","data-name":"\u0421\u043b\u043e\u0439 1"},wp.element.createElement("g",{id:"g5360"},wp.element.createElement("g",{id:"g4167"},wp.element.createElement("path",{id:"path4156",className:"epytcls-1",d:"M139.27,87.65s-87.11,0-109,5.68A36,36,0,0,0,5.68,118.12C0,140,0,185.26,0,185.26s0,45.44,5.68,67A35.47,35.47,0,0,0,30.3,276.84c22,5.85,109,5.85,109,5.85s87.28,0,109.14-5.68a34.64,34.64,0,0,0,24.44-24.62c5.86-21.69,5.86-67,5.86-67s.17-45.45-5.86-67.31a34.41,34.41,0,0,0-24.44-24.45C226.55,87.65,139.27,87.65,139.27,87.65Zm-27.72,55.77L184,185.26l-72.48,41.65V143.42Z"}))),wp.element.createElement("path",{className:"epytcls-2",d:"M143.39,153.45c10.52-19.27,14.91-39.2,19.18-58.61q.68-3,1.33-6l.12-.54-.25-.48c-13.87-26.66-41.06-52.54-57.1-66.42,21,11.33,60,31.21,84,36.13l.63.13.53-.37c4.14-2.92,8.28-5.7,12.28-8.4,13.41-9,26.27-17.67,38.31-30.64-10.26,20.67-14.18,40.47-18.14,64.42l-.09.58.32.48c18.19,27.91,40.93,50.88,54.81,63.7C261.68,137.5,230,121.76,197,115.29l-.57-.12-3.83,2.35C176,127.67,159,138.08,143.39,153.45Z"}),wp.element.createElement("path",{className:"epytcls-3",d:"M237.47,25.4c-7.73,18.08-11.19,36-14.67,57l-.19,1.15.64,1c15,23,33.15,42.76,46.87,56.19-18.4-9.59-45.13-21.49-72.87-26.93l-1.15-.22-1,.61-3.33,2c-14.47,8.86-29.26,17.93-43.24,30.34,7.94-17,11.77-34.43,15.51-51.43q.66-3,1.33-6l.24-1.06-.51-1c-11.66-22.4-32.12-43.86-48-58.48C139,40,170,54.82,190.37,59l1.27.26,1.06-.74c4.12-2.91,8.25-5.69,12.25-8.38,11.27-7.59,22.16-14.91,32.52-24.74M254.86,0l-.74,1.11L254.86,0Zm-.74,1.11C235.26,28.88,213.71,40,191,56.06c-33.55-6.88-97.91-43.92-97.91-43.92s49,37.13,69.38,76.37c-6,26.61-11,54.9-31.35,80.94,19.83-25.28,42.66-38.61,65.58-52.69,50.06,9.8,96.22,40.55,96.22,40.55s-38.84-31-67.13-74.4c4.89-29.58,9.81-54,28.36-81.8Z"}),wp.element.createElement("polyline",{className:"epytcls-4",points:"102.6 133.11 102.6 133.11 192.98 185.28 102.6 237.22 102.6 133.11"})))),"YouTube Wizard"),wp.element.createElement("div",{className:this.props.isSelected?"":"epytblock__faded--off"},wp.element.createElement("div",{className:"components-placeholder__instructions"},"Click the button below to easily embed a video, playlist, channel, gallery, or live stream."),wp.element.createElement("div",{className:"components-placeholder__fieldset"},wp.element.createElement("div",null,wp.element.createElement(b,{isDefault:!0,isLarge:!0,onClick:this.showModal},"Open Wizard"),this.state.show?wp.element.createElement(h,{title:"YouTube Wizard",className:"epytblock epytblock__modal",onRequestClose:this.hideModal,shouldCloseOnClickOutside:!1},wp.element.createElement("iframe",{title:"YouTube Wizard",src:window._EPYTA_.wizhref+"&clientId="+this.props.clientId})):null))))}}]),t}(d),save:function(e){return wp.element.createElement(w,null,e.attributes.shortcode)}})},function(e,t){},function(e,t){},function(e,t,n){function o(e,t,n){function o(t){var n=b,o=h;return b=h=void 0,O=t,E=e.apply(o,n)}function u(e){return O=e,_=setTimeout(f,t),j?o(e):E}function p(e){var n=e-x,o=e-O,r=t-n;return M?s(r,g-o):r}function m(e){var n=e-x,o=e-O;return void 0===x||n>=t||n<0||M&&o>=g}function f(){var e=i();if(m(e))return d(e);_=setTimeout(f,p(e))}function d(e){return _=void 0,T&&b?o(e):(b=h=void 0,E)}function w(){void 0!==_&&clearTimeout(_),O=0,b=x=h=_=void 0}function v(){return void 0===_?E:d(i())}function y(){var e=i(),n=m(e);if(b=arguments,h=this,x=e,n){if(void 0===_)return u(x);if(M)return _=setTimeout(f,t),o(x)}return void 0===_&&(_=setTimeout(f,t)),E}var b,h,g,E,_,x,O=0,j=!1,M=!1,T=!0;if("function"!=typeof e)throw new TypeError(a);return t=l(t)||0,r(n)&&(j=!!n.leading,M="maxWait"in n,g=M?c(l(n.maxWait)||0,t):g,T="trailing"in n?!!n.trailing:T),y.cancel=w,y.flush=v,y}var r=n(0),i=n(8),l=n(11),a="Expected a function",c=Math.max,s=Math.min;e.exports=o},function(e,t,n){var o=n(1),r=function(){return o.Date.now()};e.exports=r},function(e,t,n){(function(t){var n="object"==typeof t&&t&&t.Object===Object&&t;e.exports=n}).call(t,n(10))},function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(e){"object"===typeof window&&(n=window)}e.exports=n},function(e,t,n){function o(e){if("number"==typeof e)return e;if(i(e))return l;if(r(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=r(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(a,"");var n=s.test(e);return n||u.test(e)?p(e.slice(2),n?2:8):c.test(e)?l:+e}var r=n(0),i=n(12),l=NaN,a=/^\s+|\s+$/g,c=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,u=/^0o[0-7]+$/i,p=parseInt;e.exports=o},function(e,t,n){function o(e){return"symbol"==typeof e||i(e)&&r(e)==l}var r=n(13),i=n(16),l="[object Symbol]";e.exports=o},function(e,t,n){function o(e){return null==e?void 0===e?c:a:s&&s in Object(e)?i(e):l(e)}var r=n(2),i=n(14),l=n(15),a="[object Null]",c="[object Undefined]",s=r?r.toStringTag:void 0;e.exports=o},function(e,t,n){function o(e){var t=l.call(e,c),n=e[c];try{e[c]=void 0;var o=!0}catch(e){}var r=a.call(e);return o&&(t?e[c]=n:delete e[c]),r}var r=n(2),i=Object.prototype,l=i.hasOwnProperty,a=i.toString,c=r?r.toStringTag:void 0;e.exports=o},function(e,t){function n(e){return r.call(e)}var o=Object.prototype,r=o.toString;e.exports=n},function(e,t){function n(e){return null!=e&&"object"==typeof e}e.exports=n}]);
readme.txt CHANGED
@@ -2,22 +2,24 @@
2
  Contributors: embedplus
3
  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.0
6
- Tested up to: 5.3
7
- Stable tag: 13.2.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 live stream 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
20
- * YouTube Live Stream - Given a link to a YouTube channel, the plugin wizard automatically finds a livestream if one is active in that channel and displays the livestream for you.
 
 
21
  * Improved accessibility by using title attributes for screen reader support. It should help your site pass functional accessibility evaluations (FAE).
22
  * Improved ajax theme support
23
  * Site origin information with each embed code as an extra security measure. In YouTube's/Google's own words, checking this option "protects against malicious third-party JavaScript being injected into your page and hijacking control of your YouTube player." We especially recommend checking it as it adds higher security than the built-in YouTube embedding method that comes with the current version of WordPress (i.e. oembed).
@@ -147,6 +149,11 @@ You can also start and end each individual video at particular times. Like the a
147
 
148
  == Changelog ==
149
 
 
 
 
 
 
150
  = Embed Plus for YouTube WordPress Plugin 13.2.1 =
151
  * Provides more compatibility with other lazyload plugins and responsive themes
152
 
2
  Contributors: embedplus
3
  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.2.3
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 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
20
+ * YouTube Live Stream - Given a link to a YouTube channel, the plugin wizard automatically finds a livestream if one is active in that channel and displays the livestream for you. You can embed a direct link to a livestream too.
21
+ * Simultaneous playback control - you can enable/disable the ability for visitors to have separate videos running at the same time on the same page. This also works with YouTube livestream and gallery embeds.
22
+ * JavaScript deferral – improve the initial load time of your pages by allowing this plugin's scripts to begin execution only after a page is loaded. Tested using [GTmetrix >>](https://gtmetrix.com/)
23
  * Improved accessibility by using title attributes for screen reader support. It should help your site pass functional accessibility evaluations (FAE).
24
  * Improved ajax theme support
25
  * Site origin information with each embed code as an extra security measure. In YouTube's/Google's own words, checking this option "protects against malicious third-party JavaScript being injected into your page and hijacking control of your YouTube player." We especially recommend checking it as it adds higher security than the built-in YouTube embedding method that comes with the current version of WordPress (i.e. oembed).
149
 
150
  == Changelog ==
151
 
152
+ = Embed Plus for YouTube WordPress Plugin 13.2.3 =
153
+ * Defer JavaScript for performance
154
+ * Compatibility between loop and hide relative videos features
155
+ * Simultaneous playback control
156
+
157
  = Embed Plus for YouTube WordPress Plugin 13.2.1 =
158
  * Provides more compatibility with other lazyload plugins and responsive themes
159
 
scripts/ytprefs-admin.js CHANGED
@@ -385,7 +385,7 @@
385
  {
386
  e.preventDefault();
387
  var tab = $(this).attr('href');
388
- $('.nav-tab-wrapper a[href="' + tab + '"]').click();
389
  });
390
 
391
 
385
  {
386
  e.preventDefault();
387
  var tab = $(this).attr('href');
388
+ $('.nav-tab-wrapper a[href="' + tab + '"], .nav-tab-wrapper a[rel="' + tab + '"]').click();
389
  });
390
 
391
 
scripts/ytprefs-admin.min.js CHANGED
@@ -1,2 +1,2 @@
1
 
2
- (function(a,b){a._EPYTA_.widen_ytprefs_wiz=a._EPYTA_.widen_ytprefs_wiz||function(){setTimeout(function(){var c=Math.min(950,b(a).width()-100);var d=-1*c/2;b("#TB_window").addClass("epyt-thickbox").animate({marginLeft:d,width:c},150,"swing",function(){b("#TB_window").get(0).style.setProperty("width",c,"important")});b("#TB_overlay").addClass("epyt-thickbox");b("#TB_window iframe").animate({width:c},150)},750)};a._EPYTA_.ytvi_cancel=a._EPYTA_.ytvi_cancel||function(){b(".ytvi-step").hide("fade",{},500,function(){b(".ytvi-step-1").show("fade",{},500)})};a._EPYTA_.moneyFormat=a._EPYTA_.moneyFormat||function(c){return"$"+parseFloat(c).toFixed(2)};a._EPYTA_.escId=function(c){return"#"+c.replace(/(:|\.|\[|\]|,|=|@)/g,"\\$1")};a._EPYTA_.demoBackgroundColor=function(c,d){setTimeout(function(){b(".vi-story-demo--info").css("background-color",b(a._EPYTA_.escId("vi_js_settings[backgroundColor]")).val())},0)};a._EPYTA_.demoTextColor=function(c,d){setTimeout(function(){b(".vi-story-demo--info *").css("color",b(a._EPYTA_.escId("vi_js_settings[textColor]")).val())},0)};a._EPYTA_.demoFontFamily=function(){b(".vi-story-demo--title").css("font-family",b(a._EPYTA_.escId("vi_js_settings[font]")).val())};a._EPYTA_.demoFontSize=function(){b(".vi-story-demo--title").css("font-size",b(a._EPYTA_.escId("vi_js_settings[fontSize]")).val()+"px")};a._EPYTA_.onboardNext=function(c){b(".ytprefs-ob-step").removeClass("active-step");setTimeout(function(){a.scrollTo(0,0);c.next().addClass("active-step")},600)};a._EPYTA_.onboardPrev=function(c){b(".ytprefs-ob-step").removeClass("active-step");setTimeout(function(){a.scrollTo(0,0);c.prev().addClass("active-step")},600)};a._EPYTA_.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)}}};a._EPYTA_.adstxtLookup=function(){a._EPYTA_.adstxtLoading(true);b.ajax({url:location.protocol+"//"+location.hostname+"/ads.txt?c="+Date.now(),dataType:"text",type:"get",data:"",headers:{"Cache-Control":"no-cache"},async:true}).always(function(c,h,f){if(h==="success"){var d=f;var e=c;switch(d.status){case 200:case 301:case 302:case 304:case 307:a._EPYTA_.adstxtVerify(e);break;default:a._EPYTA_.adstxtVerify("");break}}else{var d=c;var g=f;if(d.status==404){b.ajax({url:location.protocol+"//"+location.hostname+"/ads.txt",dataType:"text",type:"get",data:"",headers:{"Cache-Control":"no-cache"},async:true}).always(function(i,m,l){if(m==="success"){var j=l;var k=i;switch(j.status){case 200:case 301:case 302:case 304:case 307:a._EPYTA_.adstxtVerify(k);break;default:a._EPYTA_.adstxtVerify("");break}}else{a._EPYTA_.adstxtVerify("")}})}else{a._EPYTA_.adstxtVerify("")}}})};a._EPYTA_.adstxtVerify=function(c){b.ajax({type:"post",dataType:"json",timeout:120000,url:a._EPYTA_.wpajaxurl,data:{security:a._EPYTA_.security,action:"my_embedplus_vi_adstxt_status_soft_ajax",current_adstxt:c},success:function(d){if(d.code==2){b(".nav-tab-adstxt").addClass("nav-tab-valid")}else{if(d.code<=0){b(".nav-tab-adstxt").addClass("nav-tab-invalid")}}b(".adstxt-verify-message").html(d.message)},error:function(f,d,e){b(".nav-tab-adstxt").addClass("nav-tab-invalid");b(".adstxt-verify-message").html("Could not validate ads.txt: "+e)},complete:function(){a._EPYTA_.adstxtLoading(false)}})};a._EPYTA_.adstxtLoading=function(c){if(c){b(".nav-tab-adstxt").addClass("nav-tab-loading")}else{b(".nav-tab-adstxt").removeClass("nav-tab-loading")}};a._EPYTA_.gbPreviewSetup=function(){a._EPADashboard_.loadYTAPI();a._EPADashboard_.apiInit();a._EPADashboard_.log("YT API GB");a._EPADashboard_.pageReady();jQuery("body").fitVidsEP()};a._EPYTA_.iabAdd=function(e,d,c){var f=b('<div class="iab-cat-tag-button" data-tag="'+e+'">'+c+" : "+d+" &times;</div>");b(".iab-cat-tags-display").append(f);b(".iab-cat-tags-display .iab-cat-tag-button").sort(function(h,g){return b(h).text()>b(g).text()?1:-1}).appendTo(".iab-cat-tags-display")};b.fn.ytprefsFormJSON=function(){var d={};var c=this.serializeArray();b.each(c,function(){if(d[this.name]){if(!d[this.name].push){d[this.name]=[d[this.name]]}d[this.name].push(this.value||"")}else{d[this.name]=this.value||""}});return d};b(document).ready(function(){if(a.location.toString().indexOf("https://")===0){a._EPYTA_.wpajaxurl=a._EPYTA_.wpajaxurl.replace("http://","https://")}var g=a.addEventListener?"addEventListener":"attachEvent";var e=a[g];var d=g==="attachEvent"?"onmessage":"message";e(d,function(k){var i="";try{if(k.data.indexOf("youtubeembedplus")===0&&k.data.indexOf("clientId=")<0){i=k.data.split("|")[1];if(i.indexOf("[")!==0){i="<p>"+i+"</p>"}if(a.tinyMCE!==null&&a.tinyMCE.activeEditor!==null&&!a.tinyMCE.activeEditor.isHidden()){if(a._EPYTA_.mceBookmark){try{a.tinyMCE.activeEditor.selection.moveToBookmark(a._EPYTA_.mceBookmark)}catch(j){}}if(typeof a.tinyMCE.execInstanceCommand!=="undefined"){a.tinyMCE.execInstanceCommand(a.tinyMCE.activeEditor.id,"mceInsertContent",false,i)}else{send_to_editor(i)}setTimeout(function(){a._EPYTA_.mceBookmark=null},500)}else{i=i.replace("<p>","\n").replace("</p>","\n");if(typeof QTags.insertContent==="function"){QTags.insertContent(i)}else{send_to_editor(i)}}tb_remove()}}catch(j){}},false);b("body").on("click.tbyt","#ytprefs_wiz_button, .ytprefs_wiz_button_widget_text, .ytprefs-onboarding-launch",function(){a._EPYTA_.widen_ytprefs_wiz()});b("body").on("click.tbyt","#ytprefs_wiz_button_vi, .ytprefs_wiz_button_vi_widget_text",function(){send_to_editor("<p>[embed-vi-ad]</p>")});b(a).resize(a._EPYTA_.widen_ytprefs_wiz);b(document).on("wp-before-tinymce-init.ytprefs-media_button",function(i,j){$media_buttons=b(j.selector).closest(".wp-editor-wrap").find(".wp-media-buttons");if(!$media_buttons.find(".ytprefs_media_link").length){$media_buttons.append('<a href="'+encodeURI(a._EPYTA_.wizhref)+'" class="thickbox button ytprefs_media_link ytprefs_wiz_button_widget_text" title="Visual YouTube Search Tool and Wizard - For easier embedding"><span></span> YouTube</a>');if(a._EPYTA_.manage_options&&a._EPYTA_.vi_logged_in){$media_buttons.append('<a class="button ytprefs_vi_embed_shortcode" id="ytprefs_wiz_button_vi" title="Embed vi video ad"><span></span> Video Ad</a>')}}});if(b(".wrap-vi-settings").length){a._EPYTA_.adstxtLookup()}b('.wrap section a[href^="#jump"]').on("click",function(j){j.preventDefault();var i=b(this).attr("href");b('.nav-tab-wrapper a[href="'+i+'"]').click()});b(".ytprefs-ajax-form").on("keypress",function(i){if(i.which==13){i.preventDefault();b(this).find(".ytprefs-ajax-form--submit:not([disabled])").click()}});b(a).on("hashchange",function(){if(a.location.hash.length>0&&false){$section=b("section"+a.location.hash);if($section.length>0){$section.find("h2").addClass("ytvi-hash-scroll");setTimeout(function(){$section.find("h2").removeClass("ytvi-hash-scroll")},2000)}$jumper=b(".jumper"+a.location.hash);if($jumper.length>0){b(".jumper"+a.location.hash+" + h3.sect").addClass("ytvi-hash-scroll");setTimeout(function(){b(".jumper"+a.location.hash+" + h3.sect").removeClass("ytvi-hash-scroll")},2000)}}});b(".vi-cover-prompt-no").on("click",function(){b.ajax({type:"post",dataType:"json",timeout:120000,url:a._EPYTA_.wpajaxurl,data:{security:a._EPYTA_.security,action:"my_embedplus_vi_hide_feature_ajax"},success:function(i){if(!i||i.type==="error"){alertify.alert(i.message)}else{if(a!=a.top){a.location.reload()}else{a.top.location.href=i.url}}},error:function(k,i,j){alertify.alert('Sorry, there was a network error. Please try again, or turn off this feature using the "Hide Monetize Feature" checkbox on the "Defaults" tab of the YouTube settings. If the issue persists, please contact ext@embedplus.com')},complete:function(){}})});b(".vi-cover-prompt-yes").on("click",function(){b(".vi-cover-prompt, .vi-cover-clear").fadeOut(500);var i=new Date();i.setTime(i.getTime()+(365*24*60*60*1000));document.cookie="vi_cover_prompt_yes=1;expires="+i.toUTCString()+";path="+a._EPYTA_.admin_url});b(".vi-cover-prompt-maybe").on("click",function(){var i=new Date();i.setTime(i.getTime()+(365*24*60*60*1000));document.cookie="vi_cover_prompt_yes=1;expires="+i.toUTCString()+";path="+a._EPYTA_.admin_url;if(a!=a.top){a.location.reload()}else{a.top.location.href=a._EPYTA_.admin_url_ytprefs}});if(b(".vi-demo-screen").length>1){var f=setInterval(function(){b(".vi-demo-screen-2").toggleClass("demo-hide");b(".vi-demo-mobile-caption").toggleClass("demo-hide")},20000)}b(".ytvi-step-1--submit-register").on("click",function(i){var j=b.trim(b(".ytvi-register-email").val());if(!j.length){alertify.alert("Please enter your email address.")}else{b(".ytvi-step-1--submit-register").prop("disabled",true);b(".ytvi-step-1").hide("fade",{},500,function(){b(".ytvi-step-2-loading").show("fade",{},500,function(){b.ajax({type:"post",dataType:"json",timeout:120000,url:a._EPYTA_.wpajaxurl,data:{security:a._EPYTA_.security,action:"my_embedplus_vi_cache_endpoints_ajax",email:j,domain:a.location.href},success:function(k){if(k.type=="success"){b(".ytvi-step-2 .ytvi-registration iframe").attr("src",k.signupURLParams);setTimeout(function(){b(".ytvi-step-2-loading").hide("fade",{},500,function(){b(".ytvi-step-2").show("fade",{},500)})},3000);var m=new Date(),l=new Date();l.setTime(l.getTime()+(365*24*60*60*1000));document.cookie="vi_signup_attempt="+m.toUTCString()+";expires="+l.toUTCString()+";path="+a._EPYTA_.admin_url}else{if(k.type==="error"){alertify.alert(k.message);a._EPYTA_.ytvi_cancel()}}},error:function(m,k,l){alertify.alert("Sorry, there was a network error. Please try again. If the issue persists, please contact ext@embedplus.com");a._EPYTA_.ytvi_cancel()},complete:function(){b(".ytvi-step-1--submit-register").prop("disabled",false)}})})})}});b(".ytvi-registration--cancel").on("click",function(){a._EPYTA_.ytvi_cancel()});b(".ytvi-step-1--confirm").on("change",function(){if(b(this).is(":checked")){b(".ytvi-step-1--submit-register").prop("disabled",false)}else{b(".ytvi-step-1--submit-register").prop("disabled",true)}});b(".ytvi-step-1--submit-login").on("click",function(k){var l=b.trim(b(".ytvi-login-email").val());var i=b.trim(b(".ytvi-password").val());var j="";j+=l.length?"":"Please enter your email address. ";j+=i.length?"":"Please enter your vi dashboard password.";if(j.length){alertify.alert(j)}else{b(".ytvi-step-1--submit-login").prop("disabled",true);b(".ytvi-step-1").hide("fade",{},500,function(){b(".ytvi-login-loading").show("fade",{},500,function(){b.ajax({type:"post",dataType:"json",timeout:12000000,url:a._EPYTA_.wpajaxurl,data:{security:a._EPYTA_.security,action:"my_embedplus_vi_login_ajax",email:l,password:i},success:function(m){if(m.type==="error"){alertify.alert(m.message);a._EPYTA_.ytvi_cancel()}else{b(".ytvi-login-loading").hide("fade",{},500,function(){document.cookie="vi_signup_attempt=; expires=Thu, 01 Jan 1970 00:00:01 GMT;";b(".ytvi-login-success-message").html(m.message);b(".ytvi-login-success").show("fade",{},500,function(){})})}},error:function(o,m,n){alertify.alert("Sorry, there was a network error. Please try again. If the issue persists, please contact ext@embedplus.com");a._EPYTA_.ytvi_cancel()},complete:function(){b(".ytvi-step-1--submit-login").prop("disabled",false)}})})})}});b("a.vi-logged-in-goto").each(function(){if(b(this).attr("href").indexOf(a.location.pathname+a.location.search)>0||a.location.search.indexOf("youtube-my-preferences")>0){b(this).removeAttr("target")}});if(b(".wrap-vi-settings").length){b(".vi-how-works").on("click",function(){var i=b(this).data("jump");b('.nav-tab-wrapper > a[href="'+i+'"]').click()});b(document).on("click",".wrap-vi-settings .nav-tab-wrapper a",function(){$a=b(this);b(".wrap-vi-settings .nav-tab-wrapper a").removeClass("nav-tab-active");$a.addClass("nav-tab-active");b(".wrap-vi-settings section").hide();b(".wrap-vi-settings section").filter($a.attr("href")).fadeIn(200);return false});var c=b(".iab-cat-tags").val();if(c.length>0){var h=c.split(",");h.forEach(function(k){var j=b('.iab-cat-child option[value="'+k+'"]').text();var i=b('.iab-cat-parent option[value="'+(k.split("-")[0])+'"]').text();a._EPYTA_.iabAdd(k,j,i)})}b(".iab-cat-parent").on("change",function(){var i=b(this).val();b(".iab-cat-child").val(i);if(i==""){b(".iab-cat-child-box").addClass("hidden");b(".iab-cat-child-box select").prop("disabled",true)}else{b(".iab-cat-child-box").removeClass("hidden");b(".iab-cat-child-box select").prop("disabled",false);b(".iab-cat-child option").addClass("hidden");b('.iab-cat-child option[value^="'+i+'-"], .iab-cat-child option[value="'+i+'"], .iab-cat-child option[value=""]').removeClass("hidden");b(".iab-cat-child-box select").val("")}});b(".iab-cat-child").on("change",function(){var l=b(".iab-cat-tags").val()?b(".iab-cat-tags").val().split(","):[];if(l.length<4){var k=b(this).val();var j=b(this).find("option:selected").text();var i=b(".iab-cat-parent").find("option:selected").text();if(k&&l.indexOf(k)==-1){l.push(k);b(".iab-cat-tags").val(l.join(","));a._EPYTA_.iabAdd(k,j,i)}}else{alertify.alert("You can choose up to 4 categories maximum. In order to add a new one, you must remove one of the existing ones.")}});b(".iab-cat-tags-display").on("click",".iab-cat-tag-button",function(){var i=b(this);var j=i.data("tag");var k=b(".iab-cat-tags").val()?b(".iab-cat-tags").val().split(","):[];k=k.filter(function(l){return l!=j});b(".iab-cat-tags").val(k.join(","));i.remove()});a._EPYTA_.demoBackgroundColor();a._EPYTA_.demoTextColor();a._EPYTA_.demoFontFamily();a._EPYTA_.demoFontSize();b(a._EPYTA_.escId("vi_js_settings[backgroundColor]")).wpColorPicker({change:a._EPYTA_.demoBackgroundColor});b(a._EPYTA_.escId("vi_js_settings[textColor]")).wpColorPicker({change:a._EPYTA_.demoTextColor});b(a._EPYTA_.escId("vi_js_settings[font]")).on("change",a._EPYTA_.demoFontFamily);b(a._EPYTA_.escId("vi_js_settings[fontSize]")).on("change",a._EPYTA_.demoFontSize);b.ajax({type:"post",dataType:"json",timeout:12000000,url:a._EPYTA_.wpajaxurl,data:{security:a._EPYTA_.security,action:"my_embedplus_vi_reports_ajax"},success:function(l){if(l.type==="error"||!l.data.mtdReport.length||typeof(l.data.mtdReport[0].date)==="undefined"){b(".vi-report-error").removeClass("hide");b(".vi-report").addClass("hide")}else{var n=l.data.mtdReport.map(function(p,o){return{x:moment(p.date,"YYYY-MM-DD").format(),y:p.revenue}});b(".vi-total-earnings-num").text(a._EPYTA_.moneyFormat(l.data.netRevenue));var k=moment(n.length?n[0].x:new Date()).format("MMMM YYYY");var j=document.getElementById("vi-report-canvas").getContext("2d");var m={type:"line",data:{datasets:[{label:k+" Earnings (USD)",backgroundColor:"#1193aa",borderColor:"#1193aa",fill:false,data:n}]},options:{responsive:true,maintainAspectRatio:false,plugins:{deferred:{delay:1000},},title:{display:false},legend:{labels:{fontSize:15,fontColor:"#000000"}},tooltips:{position:"nearest",mode:"index",intersect:false,callbacks:{label:function(o,p){return a._EPYTA_.moneyFormat(o.yLabel)},title:function(o,p){return moment(o[0].xLabel).format("LL")}}},scales:{xAxes:[{type:"time",time:{unit:"day",unitStepSize:1,displayFormats:{day:"MMM DD"}},display:true,scaleLabel:{display:true,labelString:"Date",fontSize:15,fontColor:"#000000"},ticks:{major:{fontStyle:"bold",fontColor:"#000000"}}}],yAxes:[{display:true,scaleLabel:{display:true,labelString:"Revenue",fontSize:15,fontColor:"#000000"},ticks:{callback:function(q,p,o){return a._EPYTA_.moneyFormat(q)}}}]}}};Chart.defaults.global.defaultFontFamily="'Segoe UI', Roboto, 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif";var i=new Chart(j,m)}},error:function(k,i,j){alertify.alert("Sorry, there was a network error. Please try again. If the issue persists, please contact ext@embedplus.com")},complete:function(){}});b(".ytvi-btn-logout").on("click",function(){var j="";var i=b(".iab-cat-tags").val();if(i.length>0&&i.split(",").length>1){j=" (Note: If you selected more than one video category, you must stay logged in to this settings page for your categories to automatically add variety to your ads)"}alertify.confirm().set({title:"Logout of Monetize settings",message:"Logging out won't delete your settings. However, it will require you or any other admins to re-login to change vi ad settings in the future"+j+".<br><br>To actually disable monetization, make sure the '<strong>vi ads are: On/Off</strong>' button is set to '<strong>Off</strong>.'",onok:function(){b.ajax({type:"post",dataType:"json",timeout:12000000,url:a._EPYTA_.wpajaxurl,data:{security:a._EPYTA_.security,action:"my_embedplus_vi_logout_ajax"},success:function(k){if(k.type==="error"){alertify.alert(k.message)}else{location.href=k.url}},error:function(m,k,l){alertify.alert("Sorry, there was a network error. Please try again. If the issue persists, please contact ext@embedplus.com")},complete:function(){}})}}).show()})}b(".ytvi-btn-toggle").on("click",function(){var i=b(this);alertify.confirm().set({title:(i.hasClass("ytvi-btn-active")?"Turn off":"Turn on")+" your vi ads",message:i.hasClass("ytvi-btn-active")?"Are you sure you would like to deactivate your video ads? Please note that your ads will no longer appear on the front end and your revenue will be paused. If you would like them to reappear later, simply click on this button again.":"Click OK to confirm turning on your vi ads. They will appear on your site according to your <strong>Placement</strong> settings.",onok:function(){b.ajax({type:"post",dataType:"json",timeout:12000000,url:a._EPYTA_.wpajaxurl,data:{security:a._EPYTA_.security,action:"my_embedplus_vi_toggle_ajax"},success:function(j){if(j.type==="error"){alertify.alert(j.message)}else{i.find("strong").text(j.button_text);i.toggleClass("ytvi-btn-active ytvi-btn-inactive");if(i.hasClass("ytvi-btn-active")){b(".ytvi-msg-congrats").show(200)}else{b(".ytvi-msg-congrats").hide()}}},error:function(l,j,k){alertify.alert("Sorry, there was a network error. Please try again. If the issue persists, please contact ext@embedplus.com")},complete:function(){}})}}).show()});b(".ytvi-intro-video-modal").on("click",function(k){k.preventDefault();var i=Math.min(document.body.clientWidth*0.8,800);var j=9/16*i;alertify.YoutubeDialog("BcrNPnWUkVI").set({frameless:true,resizeable:true}).resizeTo(i,j)});b("#vi_show_gdpr_authorization").on("change",function(){if(b(this).is(":checked")){b(".opt_vi_show_privacy_button").show(300)}else{b(".opt_vi_show_privacy_button").hide(300)}});if(b(".wrap-ytprefs-onboarding").length){b(".ytprefs-ob-nav-close").on("click",function(){a.parent.tb_remove();a.top.location.reload()});b(".ytprefs-ob-nav-prev").on("click",function(){a._EPYTA_.onboardPrev(b(this).closest(".ytprefs-ob-step"))});b(".ytprefs-ob-filter li").hover(function(){var i="."+b(this).find('input[type="checkbox"]').data("obfilter")+"-icon";b(i).addClass("yob-icon-visible")},function(){var i="."+b(this).find('input[type="checkbox"]').data("obfilter")+"-icon";b(i).removeClass("yob-icon-visible")});b('.ytprefs-ob-filter input[type="checkbox"]').on("change",function(){var i=b(this);var j=i.data("obfilter");var k=b('.ytprefs-ob-filter input[type="checkbox"]:checked');if(k.length&&!(k.length===1&&k.is('[data-obfilter="yob-monetize"]'))){b(".ytprefs-ob-step1 .ytprefs-ob-nav-next").prop("disabled",false)}else{b(".ytprefs-ob-step1 .ytprefs-ob-nav-next").prop("disabled",true)}if(j=="yob-monetize"){b(".ytprefs-ob-step3 .ytprefs-ob-nav-ultimate, .ytprefs-ob-step3 .ytprefs-ob-nav-penultimate").toggleClass("ytprefs-ob-nav-hide")}else{if(i.is(":checked")){b(".ytprefs-ob-step2 ."+j).addClass(j+"-visible")}else{b(".ytprefs-ob-step2 ."+j).removeClass(j+"-visible")}}});b(".ytprefs-ob-step1 .ytprefs-ob-nav-next").on("click",function(){a._EPYTA_.onboardNext(b(this).closest(".ytprefs-ob-step"))});b("#form-onboarding").on("submit",function(k){k.preventDefault();(a.tinyMCE||a.tinymce).triggerSave();var i=b(this);i.find(".ytprefs-ob-nav-next").prop("disabled",true);var j=i.ytprefsFormJSON();j.security=a._EPYTA_.security;b.ajax({type:"post",dataType:"json",timeout:30000,url:a._EPYTA_?a._EPYTA_.wpajaxurl:ajaxurl,data:j,success:function(l){if(l.type=="success"){a._EPYTA_.onboardNext(i.closest(".ytprefs-ob-step"))}else{}},error:function(n,l,m){},complete:function(){i.find(".ytprefs-ob-nav-next").prop("disabled",false)}})});b(".ytprefs-ob-step3 .ytprefs-ob-nav-skip").on("click",function(){a._EPYTA_.onboardNext(b(this).closest(".ytprefs-ob-step"))});b("#form-onboarding-apikey").on("submit",function(k){k.preventDefault();var i=b(this);i.find(".ytprefs-ob-nav-next").prop("disabled",true);var j=i.ytprefsFormJSON();j.security=a._EPYTA_.security;b.ajax({type:"post",dataType:"json",timeout:30000,url:a._EPYTA_?a._EPYTA_.wpajaxurl:ajaxurl,data:j,success:function(l){if(l.type=="success"){if(i.find(".ytprefs-ob-nav-ultimate").hasClass("ytprefs-ob-nav-hide")){a._EPYTA_.onboardNext(i.closest(".ytprefs-ob-step"))}else{a.parent.tb_remove();a.top.location.reload()}}else{}},error:function(n,l,m){},complete:function(){i.find(".ytprefs-ob-nav-next").prop("disabled",false)}})})}});b(a).on("load",function(){if(_EPYTA_.onboarded!="1"){b(".ytprefs-onboarding-launch").click()}})})(window,jQuery);
1
 
2
+ (function(a,b){a._EPYTA_.widen_ytprefs_wiz=a._EPYTA_.widen_ytprefs_wiz||function(){setTimeout(function(){var c=Math.min(950,b(a).width()-100);var d=-1*c/2;b("#TB_window").addClass("epyt-thickbox").animate({marginLeft:d,width:c},150,"swing",function(){b("#TB_window").get(0).style.setProperty("width",c,"important")});b("#TB_overlay").addClass("epyt-thickbox");b("#TB_window iframe").animate({width:c},150)},750)};a._EPYTA_.ytvi_cancel=a._EPYTA_.ytvi_cancel||function(){b(".ytvi-step").hide("fade",{},500,function(){b(".ytvi-step-1").show("fade",{},500)})};a._EPYTA_.moneyFormat=a._EPYTA_.moneyFormat||function(c){return"$"+parseFloat(c).toFixed(2)};a._EPYTA_.escId=function(c){return"#"+c.replace(/(:|\.|\[|\]|,|=|@)/g,"\\$1")};a._EPYTA_.demoBackgroundColor=function(c,d){setTimeout(function(){b(".vi-story-demo--info").css("background-color",b(a._EPYTA_.escId("vi_js_settings[backgroundColor]")).val())},0)};a._EPYTA_.demoTextColor=function(c,d){setTimeout(function(){b(".vi-story-demo--info *").css("color",b(a._EPYTA_.escId("vi_js_settings[textColor]")).val())},0)};a._EPYTA_.demoFontFamily=function(){b(".vi-story-demo--title").css("font-family",b(a._EPYTA_.escId("vi_js_settings[font]")).val())};a._EPYTA_.demoFontSize=function(){b(".vi-story-demo--title").css("font-size",b(a._EPYTA_.escId("vi_js_settings[fontSize]")).val()+"px")};a._EPYTA_.onboardNext=function(c){b(".ytprefs-ob-step").removeClass("active-step");setTimeout(function(){a.scrollTo(0,0);c.next().addClass("active-step")},600)};a._EPYTA_.onboardPrev=function(c){b(".ytprefs-ob-step").removeClass("active-step");setTimeout(function(){a.scrollTo(0,0);c.prev().addClass("active-step")},600)};a._EPYTA_.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)}}};a._EPYTA_.adstxtLookup=function(){a._EPYTA_.adstxtLoading(true);b.ajax({url:location.protocol+"//"+location.hostname+"/ads.txt?c="+Date.now(),dataType:"text",type:"get",data:"",headers:{"Cache-Control":"no-cache"},async:true}).always(function(c,h,f){if(h==="success"){var d=f;var e=c;switch(d.status){case 200:case 301:case 302:case 304:case 307:a._EPYTA_.adstxtVerify(e);break;default:a._EPYTA_.adstxtVerify("");break}}else{var d=c;var g=f;if(d.status==404){b.ajax({url:location.protocol+"//"+location.hostname+"/ads.txt",dataType:"text",type:"get",data:"",headers:{"Cache-Control":"no-cache"},async:true}).always(function(i,m,l){if(m==="success"){var j=l;var k=i;switch(j.status){case 200:case 301:case 302:case 304:case 307:a._EPYTA_.adstxtVerify(k);break;default:a._EPYTA_.adstxtVerify("");break}}else{a._EPYTA_.adstxtVerify("")}})}else{a._EPYTA_.adstxtVerify("")}}})};a._EPYTA_.adstxtVerify=function(c){b.ajax({type:"post",dataType:"json",timeout:120000,url:a._EPYTA_.wpajaxurl,data:{security:a._EPYTA_.security,action:"my_embedplus_vi_adstxt_status_soft_ajax",current_adstxt:c},success:function(d){if(d.code==2){b(".nav-tab-adstxt").addClass("nav-tab-valid")}else{if(d.code<=0){b(".nav-tab-adstxt").addClass("nav-tab-invalid")}}b(".adstxt-verify-message").html(d.message)},error:function(f,d,e){b(".nav-tab-adstxt").addClass("nav-tab-invalid");b(".adstxt-verify-message").html("Could not validate ads.txt: "+e)},complete:function(){a._EPYTA_.adstxtLoading(false)}})};a._EPYTA_.adstxtLoading=function(c){if(c){b(".nav-tab-adstxt").addClass("nav-tab-loading")}else{b(".nav-tab-adstxt").removeClass("nav-tab-loading")}};a._EPYTA_.gbPreviewSetup=function(){a._EPADashboard_.loadYTAPI();a._EPADashboard_.apiInit();a._EPADashboard_.log("YT API GB");a._EPADashboard_.pageReady();jQuery("body").fitVidsEP()};a._EPYTA_.iabAdd=function(e,d,c){var f=b('<div class="iab-cat-tag-button" data-tag="'+e+'">'+c+" : "+d+" &times;</div>");b(".iab-cat-tags-display").append(f);b(".iab-cat-tags-display .iab-cat-tag-button").sort(function(h,g){return b(h).text()>b(g).text()?1:-1}).appendTo(".iab-cat-tags-display")};b.fn.ytprefsFormJSON=function(){var d={};var c=this.serializeArray();b.each(c,function(){if(d[this.name]){if(!d[this.name].push){d[this.name]=[d[this.name]]}d[this.name].push(this.value||"")}else{d[this.name]=this.value||""}});return d};b(document).ready(function(){if(a.location.toString().indexOf("https://")===0){a._EPYTA_.wpajaxurl=a._EPYTA_.wpajaxurl.replace("http://","https://")}var g=a.addEventListener?"addEventListener":"attachEvent";var e=a[g];var d=g==="attachEvent"?"onmessage":"message";e(d,function(k){var i="";try{if(k.data.indexOf("youtubeembedplus")===0&&k.data.indexOf("clientId=")<0){i=k.data.split("|")[1];if(i.indexOf("[")!==0){i="<p>"+i+"</p>"}if(a.tinyMCE!==null&&a.tinyMCE.activeEditor!==null&&!a.tinyMCE.activeEditor.isHidden()){if(a._EPYTA_.mceBookmark){try{a.tinyMCE.activeEditor.selection.moveToBookmark(a._EPYTA_.mceBookmark)}catch(j){}}if(typeof a.tinyMCE.execInstanceCommand!=="undefined"){a.tinyMCE.execInstanceCommand(a.tinyMCE.activeEditor.id,"mceInsertContent",false,i)}else{send_to_editor(i)}setTimeout(function(){a._EPYTA_.mceBookmark=null},500)}else{i=i.replace("<p>","\n").replace("</p>","\n");if(typeof QTags.insertContent==="function"){QTags.insertContent(i)}else{send_to_editor(i)}}tb_remove()}}catch(j){}},false);b("body").on("click.tbyt","#ytprefs_wiz_button, .ytprefs_wiz_button_widget_text, .ytprefs-onboarding-launch",function(){a._EPYTA_.widen_ytprefs_wiz()});b("body").on("click.tbyt","#ytprefs_wiz_button_vi, .ytprefs_wiz_button_vi_widget_text",function(){send_to_editor("<p>[embed-vi-ad]</p>")});b(a).resize(a._EPYTA_.widen_ytprefs_wiz);b(document).on("wp-before-tinymce-init.ytprefs-media_button",function(i,j){$media_buttons=b(j.selector).closest(".wp-editor-wrap").find(".wp-media-buttons");if(!$media_buttons.find(".ytprefs_media_link").length){$media_buttons.append('<a href="'+encodeURI(a._EPYTA_.wizhref)+'" class="thickbox button ytprefs_media_link ytprefs_wiz_button_widget_text" title="Visual YouTube Search Tool and Wizard - For easier embedding"><span></span> YouTube</a>');if(a._EPYTA_.manage_options&&a._EPYTA_.vi_logged_in){$media_buttons.append('<a class="button ytprefs_vi_embed_shortcode" id="ytprefs_wiz_button_vi" title="Embed vi video ad"><span></span> Video Ad</a>')}}});if(b(".wrap-vi-settings").length){a._EPYTA_.adstxtLookup()}b('.wrap section a[href^="#jump"]').on("click",function(j){j.preventDefault();var i=b(this).attr("href");b('.nav-tab-wrapper a[href="'+i+'"], .nav-tab-wrapper a[rel="'+i+'"]').click()});b(".ytprefs-ajax-form").on("keypress",function(i){if(i.which==13){i.preventDefault();b(this).find(".ytprefs-ajax-form--submit:not([disabled])").click()}});b(a).on("hashchange",function(){if(a.location.hash.length>0&&false){$section=b("section"+a.location.hash);if($section.length>0){$section.find("h2").addClass("ytvi-hash-scroll");setTimeout(function(){$section.find("h2").removeClass("ytvi-hash-scroll")},2000)}$jumper=b(".jumper"+a.location.hash);if($jumper.length>0){b(".jumper"+a.location.hash+" + h3.sect").addClass("ytvi-hash-scroll");setTimeout(function(){b(".jumper"+a.location.hash+" + h3.sect").removeClass("ytvi-hash-scroll")},2000)}}});b(".vi-cover-prompt-no").on("click",function(){b.ajax({type:"post",dataType:"json",timeout:120000,url:a._EPYTA_.wpajaxurl,data:{security:a._EPYTA_.security,action:"my_embedplus_vi_hide_feature_ajax"},success:function(i){if(!i||i.type==="error"){alertify.alert(i.message)}else{if(a!=a.top){a.location.reload()}else{a.top.location.href=i.url}}},error:function(k,i,j){alertify.alert('Sorry, there was a network error. Please try again, or turn off this feature using the "Hide Monetize Feature" checkbox on the "Defaults" tab of the YouTube settings. If the issue persists, please contact ext@embedplus.com')},complete:function(){}})});b(".vi-cover-prompt-yes").on("click",function(){b(".vi-cover-prompt, .vi-cover-clear").fadeOut(500);var i=new Date();i.setTime(i.getTime()+(365*24*60*60*1000));document.cookie="vi_cover_prompt_yes=1;expires="+i.toUTCString()+";path="+a._EPYTA_.admin_url});b(".vi-cover-prompt-maybe").on("click",function(){var i=new Date();i.setTime(i.getTime()+(365*24*60*60*1000));document.cookie="vi_cover_prompt_yes=1;expires="+i.toUTCString()+";path="+a._EPYTA_.admin_url;if(a!=a.top){a.location.reload()}else{a.top.location.href=a._EPYTA_.admin_url_ytprefs}});if(b(".vi-demo-screen").length>1){var f=setInterval(function(){b(".vi-demo-screen-2").toggleClass("demo-hide");b(".vi-demo-mobile-caption").toggleClass("demo-hide")},20000)}b(".ytvi-step-1--submit-register").on("click",function(i){var j=b.trim(b(".ytvi-register-email").val());if(!j.length){alertify.alert("Please enter your email address.")}else{b(".ytvi-step-1--submit-register").prop("disabled",true);b(".ytvi-step-1").hide("fade",{},500,function(){b(".ytvi-step-2-loading").show("fade",{},500,function(){b.ajax({type:"post",dataType:"json",timeout:120000,url:a._EPYTA_.wpajaxurl,data:{security:a._EPYTA_.security,action:"my_embedplus_vi_cache_endpoints_ajax",email:j,domain:a.location.href},success:function(k){if(k.type=="success"){b(".ytvi-step-2 .ytvi-registration iframe").attr("src",k.signupURLParams);setTimeout(function(){b(".ytvi-step-2-loading").hide("fade",{},500,function(){b(".ytvi-step-2").show("fade",{},500)})},3000);var m=new Date(),l=new Date();l.setTime(l.getTime()+(365*24*60*60*1000));document.cookie="vi_signup_attempt="+m.toUTCString()+";expires="+l.toUTCString()+";path="+a._EPYTA_.admin_url}else{if(k.type==="error"){alertify.alert(k.message);a._EPYTA_.ytvi_cancel()}}},error:function(m,k,l){alertify.alert("Sorry, there was a network error. Please try again. If the issue persists, please contact ext@embedplus.com");a._EPYTA_.ytvi_cancel()},complete:function(){b(".ytvi-step-1--submit-register").prop("disabled",false)}})})})}});b(".ytvi-registration--cancel").on("click",function(){a._EPYTA_.ytvi_cancel()});b(".ytvi-step-1--confirm").on("change",function(){if(b(this).is(":checked")){b(".ytvi-step-1--submit-register").prop("disabled",false)}else{b(".ytvi-step-1--submit-register").prop("disabled",true)}});b(".ytvi-step-1--submit-login").on("click",function(k){var l=b.trim(b(".ytvi-login-email").val());var i=b.trim(b(".ytvi-password").val());var j="";j+=l.length?"":"Please enter your email address. ";j+=i.length?"":"Please enter your vi dashboard password.";if(j.length){alertify.alert(j)}else{b(".ytvi-step-1--submit-login").prop("disabled",true);b(".ytvi-step-1").hide("fade",{},500,function(){b(".ytvi-login-loading").show("fade",{},500,function(){b.ajax({type:"post",dataType:"json",timeout:12000000,url:a._EPYTA_.wpajaxurl,data:{security:a._EPYTA_.security,action:"my_embedplus_vi_login_ajax",email:l,password:i},success:function(m){if(m.type==="error"){alertify.alert(m.message);a._EPYTA_.ytvi_cancel()}else{b(".ytvi-login-loading").hide("fade",{},500,function(){document.cookie="vi_signup_attempt=; expires=Thu, 01 Jan 1970 00:00:01 GMT;";b(".ytvi-login-success-message").html(m.message);b(".ytvi-login-success").show("fade",{},500,function(){})})}},error:function(o,m,n){alertify.alert("Sorry, there was a network error. Please try again. If the issue persists, please contact ext@embedplus.com");a._EPYTA_.ytvi_cancel()},complete:function(){b(".ytvi-step-1--submit-login").prop("disabled",false)}})})})}});b("a.vi-logged-in-goto").each(function(){if(b(this).attr("href").indexOf(a.location.pathname+a.location.search)>0||a.location.search.indexOf("youtube-my-preferences")>0){b(this).removeAttr("target")}});if(b(".wrap-vi-settings").length){b(".vi-how-works").on("click",function(){var i=b(this).data("jump");b('.nav-tab-wrapper > a[href="'+i+'"]').click()});b(document).on("click",".wrap-vi-settings .nav-tab-wrapper a",function(){$a=b(this);b(".wrap-vi-settings .nav-tab-wrapper a").removeClass("nav-tab-active");$a.addClass("nav-tab-active");b(".wrap-vi-settings section").hide();b(".wrap-vi-settings section").filter($a.attr("href")).fadeIn(200);return false});var c=b(".iab-cat-tags").val();if(c.length>0){var h=c.split(",");h.forEach(function(k){var j=b('.iab-cat-child option[value="'+k+'"]').text();var i=b('.iab-cat-parent option[value="'+(k.split("-")[0])+'"]').text();a._EPYTA_.iabAdd(k,j,i)})}b(".iab-cat-parent").on("change",function(){var i=b(this).val();b(".iab-cat-child").val(i);if(i==""){b(".iab-cat-child-box").addClass("hidden");b(".iab-cat-child-box select").prop("disabled",true)}else{b(".iab-cat-child-box").removeClass("hidden");b(".iab-cat-child-box select").prop("disabled",false);b(".iab-cat-child option").addClass("hidden");b('.iab-cat-child option[value^="'+i+'-"], .iab-cat-child option[value="'+i+'"], .iab-cat-child option[value=""]').removeClass("hidden");b(".iab-cat-child-box select").val("")}});b(".iab-cat-child").on("change",function(){var l=b(".iab-cat-tags").val()?b(".iab-cat-tags").val().split(","):[];if(l.length<4){var k=b(this).val();var j=b(this).find("option:selected").text();var i=b(".iab-cat-parent").find("option:selected").text();if(k&&l.indexOf(k)==-1){l.push(k);b(".iab-cat-tags").val(l.join(","));a._EPYTA_.iabAdd(k,j,i)}}else{alertify.alert("You can choose up to 4 categories maximum. In order to add a new one, you must remove one of the existing ones.")}});b(".iab-cat-tags-display").on("click",".iab-cat-tag-button",function(){var i=b(this);var j=i.data("tag");var k=b(".iab-cat-tags").val()?b(".iab-cat-tags").val().split(","):[];k=k.filter(function(l){return l!=j});b(".iab-cat-tags").val(k.join(","));i.remove()});a._EPYTA_.demoBackgroundColor();a._EPYTA_.demoTextColor();a._EPYTA_.demoFontFamily();a._EPYTA_.demoFontSize();b(a._EPYTA_.escId("vi_js_settings[backgroundColor]")).wpColorPicker({change:a._EPYTA_.demoBackgroundColor});b(a._EPYTA_.escId("vi_js_settings[textColor]")).wpColorPicker({change:a._EPYTA_.demoTextColor});b(a._EPYTA_.escId("vi_js_settings[font]")).on("change",a._EPYTA_.demoFontFamily);b(a._EPYTA_.escId("vi_js_settings[fontSize]")).on("change",a._EPYTA_.demoFontSize);b.ajax({type:"post",dataType:"json",timeout:12000000,url:a._EPYTA_.wpajaxurl,data:{security:a._EPYTA_.security,action:"my_embedplus_vi_reports_ajax"},success:function(l){if(l.type==="error"||!l.data.mtdReport.length||typeof(l.data.mtdReport[0].date)==="undefined"){b(".vi-report-error").removeClass("hide");b(".vi-report").addClass("hide")}else{var n=l.data.mtdReport.map(function(p,o){return{x:moment(p.date,"YYYY-MM-DD").format(),y:p.revenue}});b(".vi-total-earnings-num").text(a._EPYTA_.moneyFormat(l.data.netRevenue));var k=moment(n.length?n[0].x:new Date()).format("MMMM YYYY");var j=document.getElementById("vi-report-canvas").getContext("2d");var m={type:"line",data:{datasets:[{label:k+" Earnings (USD)",backgroundColor:"#1193aa",borderColor:"#1193aa",fill:false,data:n}]},options:{responsive:true,maintainAspectRatio:false,plugins:{deferred:{delay:1000},},title:{display:false},legend:{labels:{fontSize:15,fontColor:"#000000"}},tooltips:{position:"nearest",mode:"index",intersect:false,callbacks:{label:function(o,p){return a._EPYTA_.moneyFormat(o.yLabel)},title:function(o,p){return moment(o[0].xLabel).format("LL")}}},scales:{xAxes:[{type:"time",time:{unit:"day",unitStepSize:1,displayFormats:{day:"MMM DD"}},display:true,scaleLabel:{display:true,labelString:"Date",fontSize:15,fontColor:"#000000"},ticks:{major:{fontStyle:"bold",fontColor:"#000000"}}}],yAxes:[{display:true,scaleLabel:{display:true,labelString:"Revenue",fontSize:15,fontColor:"#000000"},ticks:{callback:function(q,p,o){return a._EPYTA_.moneyFormat(q)}}}]}}};Chart.defaults.global.defaultFontFamily="'Segoe UI', Roboto, 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif";var i=new Chart(j,m)}},error:function(k,i,j){alertify.alert("Sorry, there was a network error. Please try again. If the issue persists, please contact ext@embedplus.com")},complete:function(){}});b(".ytvi-btn-logout").on("click",function(){var j="";var i=b(".iab-cat-tags").val();if(i.length>0&&i.split(",").length>1){j=" (Note: If you selected more than one video category, you must stay logged in to this settings page for your categories to automatically add variety to your ads)"}alertify.confirm().set({title:"Logout of Monetize settings",message:"Logging out won't delete your settings. However, it will require you or any other admins to re-login to change vi ad settings in the future"+j+".<br><br>To actually disable monetization, make sure the '<strong>vi ads are: On/Off</strong>' button is set to '<strong>Off</strong>.'",onok:function(){b.ajax({type:"post",dataType:"json",timeout:12000000,url:a._EPYTA_.wpajaxurl,data:{security:a._EPYTA_.security,action:"my_embedplus_vi_logout_ajax"},success:function(k){if(k.type==="error"){alertify.alert(k.message)}else{location.href=k.url}},error:function(m,k,l){alertify.alert("Sorry, there was a network error. Please try again. If the issue persists, please contact ext@embedplus.com")},complete:function(){}})}}).show()})}b(".ytvi-btn-toggle").on("click",function(){var i=b(this);alertify.confirm().set({title:(i.hasClass("ytvi-btn-active")?"Turn off":"Turn on")+" your vi ads",message:i.hasClass("ytvi-btn-active")?"Are you sure you would like to deactivate your video ads? Please note that your ads will no longer appear on the front end and your revenue will be paused. If you would like them to reappear later, simply click on this button again.":"Click OK to confirm turning on your vi ads. They will appear on your site according to your <strong>Placement</strong> settings.",onok:function(){b.ajax({type:"post",dataType:"json",timeout:12000000,url:a._EPYTA_.wpajaxurl,data:{security:a._EPYTA_.security,action:"my_embedplus_vi_toggle_ajax"},success:function(j){if(j.type==="error"){alertify.alert(j.message)}else{i.find("strong").text(j.button_text);i.toggleClass("ytvi-btn-active ytvi-btn-inactive");if(i.hasClass("ytvi-btn-active")){b(".ytvi-msg-congrats").show(200)}else{b(".ytvi-msg-congrats").hide()}}},error:function(l,j,k){alertify.alert("Sorry, there was a network error. Please try again. If the issue persists, please contact ext@embedplus.com")},complete:function(){}})}}).show()});b(".ytvi-intro-video-modal").on("click",function(k){k.preventDefault();var i=Math.min(document.body.clientWidth*0.8,800);var j=9/16*i;alertify.YoutubeDialog("BcrNPnWUkVI").set({frameless:true,resizeable:true}).resizeTo(i,j)});b("#vi_show_gdpr_authorization").on("change",function(){if(b(this).is(":checked")){b(".opt_vi_show_privacy_button").show(300)}else{b(".opt_vi_show_privacy_button").hide(300)}});if(b(".wrap-ytprefs-onboarding").length){b(".ytprefs-ob-nav-close").on("click",function(){a.parent.tb_remove();a.top.location.reload()});b(".ytprefs-ob-nav-prev").on("click",function(){a._EPYTA_.onboardPrev(b(this).closest(".ytprefs-ob-step"))});b(".ytprefs-ob-filter li").hover(function(){var i="."+b(this).find('input[type="checkbox"]').data("obfilter")+"-icon";b(i).addClass("yob-icon-visible")},function(){var i="."+b(this).find('input[type="checkbox"]').data("obfilter")+"-icon";b(i).removeClass("yob-icon-visible")});b('.ytprefs-ob-filter input[type="checkbox"]').on("change",function(){var i=b(this);var j=i.data("obfilter");var k=b('.ytprefs-ob-filter input[type="checkbox"]:checked');if(k.length&&!(k.length===1&&k.is('[data-obfilter="yob-monetize"]'))){b(".ytprefs-ob-step1 .ytprefs-ob-nav-next").prop("disabled",false)}else{b(".ytprefs-ob-step1 .ytprefs-ob-nav-next").prop("disabled",true)}if(j=="yob-monetize"){b(".ytprefs-ob-step3 .ytprefs-ob-nav-ultimate, .ytprefs-ob-step3 .ytprefs-ob-nav-penultimate").toggleClass("ytprefs-ob-nav-hide")}else{if(i.is(":checked")){b(".ytprefs-ob-step2 ."+j).addClass(j+"-visible")}else{b(".ytprefs-ob-step2 ."+j).removeClass(j+"-visible")}}});b(".ytprefs-ob-step1 .ytprefs-ob-nav-next").on("click",function(){a._EPYTA_.onboardNext(b(this).closest(".ytprefs-ob-step"))});b("#form-onboarding").on("submit",function(k){k.preventDefault();(a.tinyMCE||a.tinymce).triggerSave();var i=b(this);i.find(".ytprefs-ob-nav-next").prop("disabled",true);var j=i.ytprefsFormJSON();j.security=a._EPYTA_.security;b.ajax({type:"post",dataType:"json",timeout:30000,url:a._EPYTA_?a._EPYTA_.wpajaxurl:ajaxurl,data:j,success:function(l){if(l.type=="success"){a._EPYTA_.onboardNext(i.closest(".ytprefs-ob-step"))}else{}},error:function(n,l,m){},complete:function(){i.find(".ytprefs-ob-nav-next").prop("disabled",false)}})});b(".ytprefs-ob-step3 .ytprefs-ob-nav-skip").on("click",function(){a._EPYTA_.onboardNext(b(this).closest(".ytprefs-ob-step"))});b("#form-onboarding-apikey").on("submit",function(k){k.preventDefault();var i=b(this);i.find(".ytprefs-ob-nav-next").prop("disabled",true);var j=i.ytprefsFormJSON();j.security=a._EPYTA_.security;b.ajax({type:"post",dataType:"json",timeout:30000,url:a._EPYTA_?a._EPYTA_.wpajaxurl:ajaxurl,data:j,success:function(l){if(l.type=="success"){if(i.find(".ytprefs-ob-nav-ultimate").hasClass("ytprefs-ob-nav-hide")){a._EPYTA_.onboardNext(i.closest(".ytprefs-ob-step"))}else{a.parent.tb_remove();a.top.location.reload()}}else{}},error:function(n,l,m){},complete:function(){i.find(".ytprefs-ob-nav-next").prop("disabled",false)}})})}});b(a).on("load",function(){if(_EPYTA_.onboarded!="1"){b(".ytprefs-onboarding-launch").click()}})})(window,jQuery);
scripts/ytprefs.js CHANGED
@@ -12,11 +12,14 @@
12
  stopMobileBuffer: true,
13
  ajax_compat: false,
14
  usingdefault: true,
15
- ytapi_load: 'light'
 
16
  };
17
 
18
  window._EPYT_.touchmoved = false;
19
 
 
 
20
  if (window.location.toString().indexOf('https://') === 0)
21
  {
22
  window._EPYT_.ajaxurl = window._EPYT_.ajaxurl.replace("http://", "https://");
@@ -82,10 +85,24 @@
82
  {
83
  }
84
 
 
 
 
 
 
 
 
 
85
  },
86
  onPlayerStateChange: function (event)
87
  {
88
  var ifm = event.target.getIframe();
 
 
 
 
 
 
89
  if (event.data === window.YT.PlayerState.PLAYING && event.target.ponce !== true && ifm.src.indexOf('autoplay=1') === -1)
90
  {
91
  event.target.ponce = true;
@@ -139,6 +156,21 @@
139
  }
140
 
141
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
142
  justid: function (s)
143
  {
144
  return new RegExp("[\\?&]v=([^&#]*)").exec(s)[1];
12
  stopMobileBuffer: true,
13
  ajax_compat: false,
14
  usingdefault: true,
15
+ ytapi_load: 'light',
16
+ pause_others: false
17
  };
18
 
19
  window._EPYT_.touchmoved = false;
20
 
21
+ window._EPYT_.apiVideos = window._EPYT_.apiVideos || {};
22
+
23
  if (window.location.toString().indexOf('https://') === 0)
24
  {
25
  window._EPYT_.ajaxurl = window._EPYT_.ajaxurl.replace("http://", "https://");
85
  {
86
  }
87
 
88
+ try
89
+ {
90
+ var apiVideoId = event.target.getIframe().getAttribute("id");
91
+ window._EPYT_.apiVideos[apiVideoId] = event.target;
92
+ }
93
+ catch (idErr)
94
+ {
95
+ }
96
  },
97
  onPlayerStateChange: function (event)
98
  {
99
  var ifm = event.target.getIframe();
100
+
101
+ if (window._EPYT_.pause_others && event.data === window.YT.PlayerState.PLAYING)
102
+ {
103
+ window._EPADashboard_.pauseOthers(event.target);
104
+ }
105
+
106
  if (event.data === window.YT.PlayerState.PLAYING && event.target.ponce !== true && ifm.src.indexOf('autoplay=1') === -1)
107
  {
108
  event.target.ponce = true;
156
  }
157
 
158
  },
159
+ pauseOthers: function (currentVid)
160
+ {
161
+ if (!currentVid)
162
+ {
163
+ return;
164
+ }
165
+ for (var vidKey in window._EPYT_.apiVideos)
166
+ {
167
+ var vid = window._EPYT_.apiVideos[vidKey];
168
+ if (vid && typeof vid.pauseVideo === 'function' && vid != currentVid && typeof vid.getPlayerState === 'function' && [YT.PlayerState.BUFFERING, window.YT.PlayerState.PLAYING].indexOf(vid.getPlayerState()) >= 0)
169
+ {
170
+ vid.pauseVideo();
171
+ }
172
+ }
173
+ },
174
  justid: function (s)
175
  {
176
  return new RegExp("[\\?&]v=([^&#]*)").exec(s)[1];
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"};a._EPYT_.touchmoved=false;if(a.location.toString().indexOf("https://")===0){a._EPYT_.ajaxurl=a._EPYT_.ajaxurl.replace("http://","https://")}a._EPYT_.pageLoaded=false;b(a).on("load._EPYT_",function(){a._EPYT_.pageLoaded=true});if(!document.querySelectorAll){document.querySelectorAll=function(d){var f=document,e=f.documentElement.firstChild,c=f.createElement("STYLE");e.appendChild(c);f.__qsaels=[];c.styleSheet.cssText=d+"{x:expression(document.__qsaels.push(this))}";a.scrollBy(0,0);return f.__qsaels}}if(typeof a._EPADashboard_==="undefined"){a._EPADashboard_={initStarted:false,checkCount:0,onPlayerReady:function(f){try{if(typeof _EPYT_.epdovol!=="undefined"&&_EPYT_.epdovol){var d=parseInt(f.target.getIframe().getAttribute("data-vol"));if(!isNaN(d)){if(d===0){f.target.mute()}else{if(f.target.isMuted()){f.target.unMute()}f.target.setVolume(d)}}}var c=parseInt(f.target.getIframe().getAttribute("data-epautoplay"));if(!isNaN(c)&&c===1){f.target.playVideo()}}catch(e){}},onPlayerStateChange:function(f){var e=f.target.getIframe();if(f.data===a.YT.PlayerState.PLAYING&&f.target.ponce!==true&&e.src.indexOf("autoplay=1")===-1){f.target.ponce=true}if(f.data===a.YT.PlayerState.ENDED&&b(e).data("relstop")=="1"){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()}}}},justid:function(c){return new RegExp("[\\?&]v=([^&#]*)").exec(c)[1]},setupevents:function(d){if(typeof(a.YT)!=="undefined"&&a.YT!==null&&a.YT.loaded){var c=document.getElementById(d);if(!c.epytsetupdone){a._EPADashboard_.log("Setting up YT API events: "+d);c.epytsetupdone=true;return new a.YT.Player(d,{events:{onReady:a._EPADashboard_.onPlayerReady,onStateChange:a._EPADashboard_.onPlayerStateChange}})}}},apiInit:function(){if(typeof(a.YT)!=="undefined"){a._EPADashboard_.initStarted=true;var c=document.querySelectorAll(_EPYT_.evselector);for(var d=0;d<c.length;d++){if(!c[d].hasAttribute("id")){c[d].id="_dytid_"+Math.round(Math.random()*8999+1000)}a._EPADashboard_.setupevents(c[d].id)}}},log:function(d){try{console.log(d)}catch(c){}},doubleCheck:function(){a._EPADashboard_.checkInterval=setInterval(function(){a._EPADashboard_.checkCount++;if(a._EPADashboard_.checkCount>=5||a._EPADashboard_.initStarted){clearInterval(a._EPADashboard_.checkInterval)}else{a._EPADashboard_.apiInit();a._EPADashboard_.log("YT API init check")}},1000)},selectText:function(e){if(document.selection){var c=document.body.createTextRange();c.moveToElementText(e);c.select()}else{if(a.getSelection){var d=a.getSelection();var c=document.createRange();c.selectNode(e);d.removeAllRanges();d.addRange(c)}}},setVidSrc:function(c,d){c.attr("src",d);c.get(0).epytsetupdone=false;a._EPADashboard_.setupevents(c.attr("id"))},loadYTAPI:function(){if(typeof a.YT==="undefined"){if(a._EPYT_.ytapi_load!=="never"&&(a._EPYT_.ytapi_load==="always"||b('iframe[src*="youtube.com/embed/"], 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",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()}}}},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&&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(d){if(typeof(a.YT)!=="undefined"&&a.YT!==null&&a.YT.loaded){var c=document.getElementById(d);if(!c.epytsetupdone){a._EPADashboard_.log("Setting up YT API events: "+d);c.epytsetupdone=true;return new a.YT.Player(d,{events:{onReady:a._EPADashboard_.onPlayerReady,onStateChange:a._EPADashboard_.onPlayerStateChange}})}}},apiInit:function(){if(typeof(a.YT)!=="undefined"){a._EPADashboard_.initStarted=true;var c=document.querySelectorAll(_EPYT_.evselector);for(var d=0;d<c.length;d++){if(!c[d].hasAttribute("id")){c[d].id="_dytid_"+Math.round(Math.random()*8999+1000)}a._EPADashboard_.setupevents(c[d].id)}}},log:function(d){try{console.log(d)}catch(c){}},doubleCheck:function(){a._EPADashboard_.checkInterval=setInterval(function(){a._EPADashboard_.checkCount++;if(a._EPADashboard_.checkCount>=5||a._EPADashboard_.initStarted){clearInterval(a._EPADashboard_.checkInterval)}else{a._EPADashboard_.apiInit();a._EPADashboard_.log("YT API init check")}},1000)},selectText:function(e){if(document.selection){var c=document.body.createTextRange();c.moveToElementText(e);c.select()}else{if(a.getSelection){var d=a.getSelection();var c=document.createRange();c.selectNode(e);d.removeAllRanges();d.addRange(c)}}},setVidSrc:function(c,d){c.attr("src",d);c.get(0).epytsetupdone=false;a._EPADashboard_.setupevents(c.attr("id"))},loadYTAPI:function(){if(typeof a.YT==="undefined"){if(a._EPYT_.ytapi_load!=="never"&&(a._EPYT_.ytapi_load==="always"||b('iframe[src*="youtube.com/embed/"], 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/blocks.js CHANGED
@@ -10,4 +10,4 @@
10
  */
11
 
12
  import './block/block.js';
13
- import './viblock/block.js';
10
  */
11
 
12
  import './block/block.js';
13
+ //import './viblock/block.js';
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.2.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.2.1';
38
  public static $opt_version = 'version';
39
  public static $optembedwidth = null;
40
  public static $optembedheight = null;
@@ -83,6 +83,7 @@ class YouTubePrefs
83
  public static $opt_defaultdims = 'defaultdims';
84
  public static $opt_defaultwidth = 'width';
85
  public static $opt_defaultheight = 'height';
 
86
  public static $opt_defaultvol = 'defaultvol';
87
  public static $opt_vol = 'vol';
88
  public static $opt_apikey = 'apikey';
@@ -108,6 +109,8 @@ class YouTubePrefs
108
  public static $opt_not_live_content = 'not_live_content';
109
  public static $opt_not_live_on = 'not_live_on';
110
  public static $opt_admin_off_scripts = 'admin_off_scripts';
 
 
111
  public static $opt_ajax_save = 'ajax_save';
112
  public static $opt_onboarded = 'onboarded';
113
  public static $opt_show_pointer = 'show_pointer';
@@ -117,7 +120,7 @@ class YouTubePrefs
117
  public static $dft_bpts = array(array('bp' => array('min' => 0, 'max' => 767), 'cols' => 1));
118
  public static $dft_roles = array('administrator', 'editor', 'author', 'contributor', 'subscriber');
119
  //public static $epbase = 'https://localhost:44328';
120
- public static $epbase = '//www.embedplus.com';
121
  public static $double_plugin = false;
122
  public static $scriptsprinted = 0;
123
  public static $min = '.min';
@@ -181,7 +184,7 @@ class YouTubePrefs
181
  public static $oldytregex = '@^\s*https?://(?:www\.)?(?:(?:youtube.com/(?:(?:watch)|(?:embed)|(?:playlist))(?:/live_stream){0,1}/{0,1}\?)|(?:youtu.be/))([^\s"]+)\s*$@im';
182
  public static $ytregex = '@^[\r\t ]*https?://(?:www\.)?(?:(?:youtube.com/(?:(?:watch)|(?:embed)|(?:playlist))(?:/live_stream){0,1}/{0,1}\?)|(?:youtu.be/))([^\s"]+)[\r\t ]*$@im';
183
  public static $justurlregex = '@https?://(?:www\.)?(?:(?:youtube.com/(?:(?:watch)|(?:embed)|(?:playlist))(?:/live_stream){0,1}/{0,1}\?)|(?:youtu.be/))([^\[\s"]+)@i';
184
-
185
  ///////////////////////////////////////////////////////////////////////////////////////////////////
186
  ///////////////////////////////////////////////////////////////////////////////////////////////////
187
  ///////////////////////////////////////////////////////////////////////////////////////////////////
@@ -281,6 +284,30 @@ class YouTubePrefs
281
  }
282
  }
283
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
284
  public static function my_plugin_action_links($links)
285
  {
286
  if (is_array($links))
@@ -1055,7 +1082,7 @@ class YouTubePrefs
1055
  $step1_livechannel_errors = $step1_livechannel_error_invalid;
1056
  $acc_expand = 'h3_live';
1057
  }
1058
- }
1059
  else if ($submit_type === 'step1_live')
1060
  {
1061
  $search = sanitize_text_field(trim($_POST['txtUrlLive']));
@@ -1269,8 +1296,9 @@ class YouTubePrefs
1269
  Important: You can embed any public livestreams from any channel that YouTube/Google has approved to be <strong>Eligible</strong> and <strong>Enabled</strong>.
1270
  If you're trying to embed a livestream from your own channel, you can check make sure it is <strong>Eligible</strong> and <strong>Enabled</strong> by <a href="https://www.youtube.com/features" target="_blank">visiting here.</a>
1271
  You are verified if you see the word "Enabled" at the bottom of the box that is labeled "Embed live streams." Note that verification can only be done directly through YouTube/Google with the link above, and this plugin cannot automatically do that.
 
1272
  </p>
1273
-
1274
  <div class="livestream-tabs">
1275
  <ul>
1276
  <li><a href="#livestream-tabs-2">Channel-based livestream (recommended)<sup class="orange">new</sup></a></li>
@@ -1776,6 +1804,7 @@ class YouTubePrefs
1776
  evselector: '<?php echo self::get_evselector(); ?>',
1777
  ajax_compat: <?php echo self::$alloptions[self::$opt_ajax_compat] == '1' ? 'true' : 'false' ?>,
1778
  ytapi_load: '<?php echo esc_attr(self::$alloptions[self::$opt_ytapi_load]) ?>',
 
1779
  stopMobileBuffer: <?php echo self::$alloptions[self::$opt_stop_mobile_buffer] == '1' ? 'true' : 'false' ?>
1780
  };</script>
1781
  <?php
@@ -1846,6 +1875,7 @@ class YouTubePrefs
1846
  $_defaultheight = '';
1847
  $_playsinline = 0;
1848
  $_origin = 0;
 
1849
  $_defaultvol = 0;
1850
  $_vol = '';
1851
  $_apikey = '';
@@ -1871,6 +1901,8 @@ class YouTubePrefs
1871
  $_not_live_on = 1;
1872
  $_debugmode = 0;
1873
  $_admin_off_scripts = 0;
 
 
1874
  $_ajax_save = 1;
1875
  $_show_pointer = 1;
1876
  $_onboarded = 0;
@@ -1938,6 +1970,7 @@ class YouTubePrefs
1938
  $_defaultdims = self::tryget($arroptions, self::$opt_defaultdims, 0);
1939
  $_defaultwidth = self::tryget($arroptions, self::$opt_defaultwidth, '');
1940
  $_defaultheight = self::tryget($arroptions, self::$opt_defaultheight, '');
 
1941
  $_defaultvol = self::tryget($arroptions, self::$opt_defaultvol, 0);
1942
  $_vol = self::tryget($arroptions, self::$opt_vol, '');
1943
  $_apikey = self::tryget($arroptions, self::$opt_apikey, '');
@@ -1961,6 +1994,8 @@ class YouTubePrefs
1961
  $_not_live_content = empty($_not_live_content) ? $_not_live_content : trim($_not_live_content);
1962
  $_not_live_on = self::tryget($arroptions, self::$opt_not_live_on, empty($_not_live_content) ? 0 : 1);
1963
  $_admin_off_scripts = self::tryget($arroptions, self::$opt_admin_off_scripts, $_admin_off_scripts);
 
 
1964
  $_ajax_save = self::tryget($arroptions, self::$opt_ajax_save, $_ajax_save);
1965
  $_show_pointer = self::tryget($arroptions, self::$opt_show_pointer, $_show_pointer);
1966
  $_onboarded = 0; // self::tryget($arroptions, self::$opt_onboarded, $_onboarded);
@@ -2027,6 +2062,7 @@ class YouTubePrefs
2027
  self::$opt_defaultdims => $_defaultdims,
2028
  self::$opt_defaultwidth => $_defaultwidth,
2029
  self::$opt_defaultheight => $_defaultheight,
 
2030
  self::$opt_defaultvol => $_defaultvol,
2031
  self::$opt_vol => $_vol,
2032
  self::$opt_apikey => $_apikey,
@@ -2050,6 +2086,8 @@ class YouTubePrefs
2050
  self::$opt_not_live_on => $_not_live_on,
2051
  self::$opt_debugmode => $_debugmode,
2052
  self::$opt_admin_off_scripts => $_admin_off_scripts,
 
 
2053
  self::$opt_ajax_save => $_ajax_save,
2054
  self::$opt_show_pointer => $_show_pointer,
2055
  self::$opt_onboarded => $_onboarded,
@@ -2101,6 +2139,8 @@ class YouTubePrefs
2101
  add_filter('widget_text', array(get_class(), 'apply_prefs_widget'), 1);
2102
  //add_filter('bjll/skip_classes', array(get_class(), 'bjll_skip_classes'), 10, 2);
2103
 
 
 
2104
  add_shortcode('embedyt', array(get_class(), 'apply_prefs_shortcode'));
2105
  if (self::$alloptions[self::$opt_migrate] == 1)
2106
  {
@@ -2115,6 +2155,11 @@ class YouTubePrefs
2115
  }
2116
  }
2117
  }
 
 
 
 
 
2118
  }
2119
 
2120
  public static function ao_override_jsexclude($exclude)
@@ -2126,6 +2171,12 @@ class YouTubePrefs
2126
  return $exclude;
2127
  }
2128
 
 
 
 
 
 
 
2129
  public static function apply_prefs_shortcode($atts, $content = null)
2130
  {
2131
  $content = trim($content);
@@ -2543,12 +2594,12 @@ class YouTubePrefs
2543
  return $live_error_msg;
2544
  }
2545
 
2546
- if (!isset($linkparams['v']) && !isset($linkparams['live_stream']))
2547
  {
2548
  return apply_filters('ytprefs_filter_the_content_light', wp_kses_post(self::$alloptions[self::$opt_not_live_content]));
2549
  }
2550
  }
2551
-
2552
  if (stripos($linkparamstemp[0], 'live_stream') !== false)
2553
  {
2554
  $linkparams['live_stream'] = 1;
@@ -2578,6 +2629,11 @@ class YouTubePrefs
2578
  $relstop = ' data-relstop="1" ';
2579
  }
2580
 
 
 
 
 
 
2581
  if (self::$alloptions[self::$opt_dohl] == 1)
2582
  {
2583
  $locale = get_locale();
@@ -2728,7 +2784,7 @@ class YouTubePrefs
2728
 
2729
  $iframe_id = rand(10000, 99999);
2730
 
2731
- $code1 = $begin_responsive . '<iframe ' . $centercode . ' id="_ytid_' . $iframe_id . '" '. $dim_attrs .
2732
  ' data-origwidth="' . self::$defaultwidth . '" data-origheight="' . self::$defaultheight . '" ' . $relstop .
2733
  ' src="https://www.' . $youtubebaseurl . '.com/embed/' . $videoidoutput . '?';
2734
  $code2 = '" class="__youtube_prefs__' . ($iscontent ? '' : ' __youtube_prefs_widget__') .
@@ -3090,7 +3146,7 @@ class YouTubePrefs
3090
  $new_pointer_content = '<h3>' . __('New Update') . '</h3>'; // ooopointer
3091
 
3092
  $new_pointer_content .= '<p>'; // ooopointer
3093
- $new_pointer_content .= "This update provides more compatibility with other lazyload plugins and responsive themes, for both Free and <a target=_blank href=" . self::$epbase . '/dashboard/pro-easy-video-analytics.aspx?ref=frompointer' . ">Pro versions</a>.";
3094
  if (self::vi_logged_in())
3095
  {
3096
  $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.";
@@ -3129,7 +3185,7 @@ class YouTubePrefs
3129
  <a class="nav-tab" href="#jumpgallery">Galleries</a>
3130
  <a class="nav-tab href-link" style="background-color: #daebf1;" rel="#jumpupgrade" target="_blank" href="<?php echo self::$epbase . "/dashboard/pro-easy-video-analytics.aspx?ref=protab" ?>">Upgrade?</a>
3131
  <?php
3132
- if (!(bool) (self::$alloptions[self::$opt_vi_hide_monetize_tab]) && self::vi_ever_logged_in())
3133
  {
3134
  if (self::vi_logged_in())
3135
  {
@@ -3145,6 +3201,7 @@ class YouTubePrefs
3145
  }
3146
  }
3147
  ?>
 
3148
  <a class="nav-tab" href="#jumpcompat">Compatibility</a>
3149
  <a class="nav-tab" href="#jumpprivacy">Security & Privacy</a>
3150
  <a class="nav-tab" href="#jumphowto">Embed Manually</a>
@@ -3277,9 +3334,11 @@ class YouTubePrefs
3277
  .apikey-video{margin-left: 3%; display: inline-block; width: 50%; position: relative; padding-top: 29%}
3278
  .apikey-video iframe{display: block; width: 100%; height: 100%; position: absolute; top: 0; left: 0;}
3279
  #boxnocookie {display: inline-block; border-radius: 3px; padding: 2px 4px 2px 4px; color: red; <?php echo $all[self::$opt_nocookie] ? '' : 'display: none;' ?>}
 
 
3280
  #box_gdpr_consent { color: red; <?php echo (bool) $all[self::$opt_gdpr_consent] ? 'display: block;' : 'display: none;' ?>}
3281
  .strike {text-decoration: line-through;}
3282
- .upgchecks { padding: 20px; border-radius: 15px; border: 1px dotted #777777; background-color: #fcfcfc; }
3283
  .clearboth {clear: both;}
3284
  div.hr {clear: both; border-bottom: 1px dotted #A8BDD8; margin: 20px 0 20px 0;}
3285
  .wp-pointer-buttons a.close {margin-top: 0 !important;}
@@ -3371,6 +3430,30 @@ class YouTubePrefs
3371
  opacity: 1;
3372
  }
3373
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3374
  </style>
3375
  <div class="wrap wrap-ytprefs">
3376
  <h1><span class="dashicons-before dashicons-video-alt3"></span> <?php echo __('YouTube Settings') ?></h1>
@@ -3507,6 +3590,14 @@ class YouTubePrefs
3507
  </span>
3508
  </p>
3509
 
 
 
 
 
 
 
 
 
3510
  <p>
3511
  <input name="<?php echo self::$opt_cc_load_policy; ?>" id="<?php echo self::$opt_cc_load_policy; ?>" <?php checked($all[self::$opt_cc_load_policy], 1); ?> type="checkbox" class="checkbox">
3512
  <label for="<?php echo self::$opt_cc_load_policy; ?>"><?php _e('<b class="chktitle">Closed Captions:</b> Turn on closed captions by default.') ?></label>
@@ -3601,7 +3692,19 @@ class YouTubePrefs
3601
  <b class="chktitle">YouTube API Loading:</b> Choose when to load the YouTube API. The "Restricted" or "Never" options will help with GDPR compliance:
3602
  <ul class="indent-option">
3603
  <li><label><input type="radio" name="<?php echo self::$opt_ytapi_load ?>" value="light" <?php checked($all[self::$opt_ytapi_load], 'light'); ?> /> <em>Restricted</em> - (Recommended) Only load the API on pages that have a YouTube video.</label></li>
3604
- <li><label><input type="radio" name="<?php echo self::$opt_ytapi_load ?>" value="never" <?php checked($all[self::$opt_ytapi_load], 'never'); ?> /> <em>Never</em> - Do not load the YouTube API. Note: The "Never" choice may break a few features such as Volume Initialization and Gallery Continuous/Auto Play.</label></li>
 
 
 
 
 
 
 
 
 
 
 
 
3605
  <li><label><input type="radio" name="<?php echo self::$opt_ytapi_load ?>" value="always" <?php checked($all[self::$opt_ytapi_load], 'always'); ?> /> <em>Always</em> - Load the API on all pages. In most cases, the "Always" choice is not necessary.</label></li>
3606
  </ul>
3607
  </p>
@@ -3654,9 +3757,16 @@ class YouTubePrefs
3654
  <input name="<?php echo self::$opt_nocookie; ?>" id="<?php echo self::$opt_nocookie; ?>" <?php checked($all[self::$opt_nocookie], 1); ?> type="checkbox" class="checkbox">
3655
  <label for="<?php echo self::$opt_nocookie; ?>">
3656
  <b class="chktitle">No Cookies:</b> Prevent YouTube from leaving tracking cookies on your visitors browsers unless they actual play the videos. This is coded to apply this behavior on links in your past post as well.
3657
- <span id="boxnocookie">
3658
- Checking this option may break some features such as galleries and playlists. Furthermore, videos on mobile devices may have problems if you leave this checked.
3659
- </span>
 
 
 
 
 
 
 
3660
  </label>
3661
  </p>
3662
  </div>
@@ -4030,6 +4140,36 @@ class YouTubePrefs
4030
  _e('</ul>');
4031
  ?>
4032
  </section>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4033
  <div class="save-changes-follow"> <?php self::save_changes_button(isset($_POST[$ytprefs_submitted]) && $_POST[$ytprefs_submitted] == 'Y'); ?> </div>
4034
  </form>
4035
 
@@ -4039,6 +4179,15 @@ class YouTubePrefs
4039
  <p>
4040
  Below are descriptions for some of our PRO features for more gallery customization options, faster page loading, enhanced SEO, and more. Simply purchase and install our separate PRO plugin (the PRO plugin automatically works for all your past embed links).
4041
  </p>
 
 
 
 
 
 
 
 
 
4042
  <p>
4043
  <img class="ssaltgallery" src="<?php echo plugins_url('images/ssaltgalleryall.jpg', __FILE__) ?>" />
4044
  <select disabled>
@@ -4120,14 +4269,6 @@ class YouTubePrefs
4120
  </label>
4121
  </p>
4122
  <div class="hr"></div>
4123
- <p>
4124
- <input disabled type="checkbox" class="checkbox">
4125
- <label>
4126
- <b class="chktitle">Special Lazy-Loading Effects:</b> <span class="pronon">(PRO Users)</span>
4127
- Add eye-catching special effects that will make your YouTube embeds fade in, bounce, flip, pulse, or slide as they lazy load on the screen. Lazy loading can also speed up your page load time. 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>
4128
- </label>
4129
- </p>
4130
- <div class="hr"></div>
4131
  <p>
4132
  <input disabled type="checkbox" class="checkbox">
4133
  <label>
@@ -4492,6 +4633,18 @@ class YouTubePrefs
4492
  {
4493
  $("input#vol").width(40);
4494
  }
 
 
 
 
 
 
 
 
 
 
 
 
4495
 
4496
  });
4497
  })(jQuery);
@@ -4514,6 +4667,8 @@ class YouTubePrefs
4514
  $new_options[self::$opt_autoplay] = self::postchecked(self::$opt_autoplay) ? 1 : 0;
4515
  $new_options[self::$opt_debugmode] = self::postchecked(self::$opt_debugmode) ? 1 : 0;
4516
  $new_options[self::$opt_admin_off_scripts] = self::postchecked(self::$opt_admin_off_scripts) ? 1 : 0;
 
 
4517
  $new_options[self::$opt_ajax_save] = self::postchecked(self::$opt_ajax_save) ? 1 : 0;
4518
  $new_options[self::$opt_show_pointer] = self::postchecked(self::$opt_show_pointer) ? 1 : 0;
4519
  $new_options[self::$opt_old_script_method] = self::postchecked(self::$opt_old_script_method) ? 1 : 0;
@@ -4542,6 +4697,7 @@ class YouTubePrefs
4542
  $new_options[self::$opt_restrict_wizard] = self::postchecked(self::$opt_restrict_wizard) ? 1 : 0;
4543
  $new_options[self::$opt_ajax_compat] = self::postchecked(self::$opt_ajax_compat) ? 1 : 0;
4544
  $new_options[self::$opt_defaultdims] = self::postchecked(self::$opt_defaultdims) ? 1 : 0;
 
4545
  $new_options[self::$opt_defaultvol] = self::postchecked(self::$opt_defaultvol) ? 1 : 0;
4546
  $new_options[self::$opt_dohl] = self::postchecked(self::$opt_dohl) ? 1 : 0;
4547
  $new_options[self::$opt_onboarded] = self::postchecked(self::$opt_onboarded) ? 1 : 0;
@@ -4817,6 +4973,7 @@ class YouTubePrefs
4817
  $input[self::$opt_modestbranding] = intval($input[self::$opt_modestbranding]);
4818
  $input[self::$opt_responsive] = intval($input[self::$opt_responsive]);
4819
  $input[self::$opt_responsive_all] = intval($input[self::$opt_responsive_all]);
 
4820
 
4821
  $input[self::$opt_gallery_pagesize] = intval($input[self::$opt_gallery_pagesize]);
4822
  $input[self::$opt_gallery_columns] = intval($input[self::$opt_gallery_columns]);
@@ -4852,6 +5009,7 @@ class YouTubePrefs
4852
  self::$opt_modestbranding => 0,
4853
  self::$opt_responsive => 0,
4854
  self::$opt_responsive_all => 0,
 
4855
  self::$opt_gallery_pagesize => 15,
4856
  self::$opt_gallery_columns => 3,
4857
  self::$opt_not_live_content => '',
@@ -5051,6 +5209,13 @@ class YouTubePrefs
5051
  <label for="<?php echo self::$opt_responsive_all; ?>0">Responsive for only videos embedded via this plugin</label>
5052
  </p>
5053
  </div>
 
 
 
 
 
 
 
5054
  <div class="ytprefs-ob-setting yob-gallery">
5055
  <label for="<?php echo self::$opt_gallery_pagesize; ?>"><b class="chktitle">Default Gallery Page Size:</b></label>
5056
  <select name="<?php echo self::$opt_gallery_pagesize; ?>" id="<?php echo self::$opt_gallery_pagesize; ?>" style="width: 60px;">
@@ -5316,6 +5481,7 @@ class YouTubePrefs
5316
  'evselector' => self::get_evselector(),
5317
  'ajax_compat' => self::$alloptions[self::$opt_ajax_compat] == '1' ? true : false,
5318
  'ytapi_load' => self::$alloptions[self::$opt_ytapi_load],
 
5319
  'stopMobileBuffer' => self::$alloptions[self::$opt_stop_mobile_buffer] == '1' ? true : false,
5320
  'vi_active' => self::$alloptions[self::$opt_vi_active] == '1' ? true : false,
5321
  'vi_js_posttypes' => self::$alloptions[self::$opt_vi_js_posttypes]
@@ -7959,7 +8125,7 @@ margin: 0 auto;
7959
  self::$version
7960
  );
7961
 
7962
- wp_enqueue_style('__ytprefs_admin__vi_css', plugins_url('styles/ytvi-admin' . self::$min . '.css', __FILE__), array(), self::$version);
7963
 
7964
  // Tiny MCE
7965
  wp_enqueue_style('__ytprefs_admin__tinymce_css', plugins_url('styles/epyt_mce_wizard_button' . self::$min . '.css', __FILE__), array(), self::$version);
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.2.3
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.2.3';
38
  public static $opt_version = 'version';
39
  public static $optembedwidth = null;
40
  public static $optembedheight = null;
83
  public static $opt_defaultdims = 'defaultdims';
84
  public static $opt_defaultwidth = 'width';
85
  public static $opt_defaultheight = 'height';
86
+ public static $opt_pause_others = 'pause_others';
87
  public static $opt_defaultvol = 'defaultvol';
88
  public static $opt_vol = 'vol';
89
  public static $opt_apikey = 'apikey';
109
  public static $opt_not_live_content = 'not_live_content';
110
  public static $opt_not_live_on = 'not_live_on';
111
  public static $opt_admin_off_scripts = 'admin_off_scripts';
112
+ public static $opt_defer_js = 'defer_js';
113
+ public static $opt_defer_jquery = 'defer_jquery';
114
  public static $opt_ajax_save = 'ajax_save';
115
  public static $opt_onboarded = 'onboarded';
116
  public static $opt_show_pointer = 'show_pointer';
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;
126
  public static $min = '.min';
184
  public static $oldytregex = '@^\s*https?://(?:www\.)?(?:(?:youtube.com/(?:(?:watch)|(?:embed)|(?:playlist))(?:/live_stream){0,1}/{0,1}\?)|(?:youtu.be/))([^\s"]+)\s*$@im';
185
  public static $ytregex = '@^[\r\t ]*https?://(?:www\.)?(?:(?:youtube.com/(?:(?:watch)|(?:embed)|(?:playlist))(?:/live_stream){0,1}/{0,1}\?)|(?:youtu.be/))([^\s"]+)[\r\t ]*$@im';
186
  public static $justurlregex = '@https?://(?:www\.)?(?:(?:youtube.com/(?:(?:watch)|(?:embed)|(?:playlist))(?:/live_stream){0,1}/{0,1}\?)|(?:youtu.be/))([^\[\s"]+)@i';
187
+
188
  ///////////////////////////////////////////////////////////////////////////////////////////////////
189
  ///////////////////////////////////////////////////////////////////////////////////////////////////
190
  ///////////////////////////////////////////////////////////////////////////////////////////////////
284
  }
285
  }
286
 
287
+ public static function defer_scripts($tag, $handle, $src)
288
+ {
289
+ $defer = array(
290
+ '__dispload__',
291
+ '__ytprefs__',
292
+ '__dynload__',
293
+ '__ytprefs__bar',
294
+ '__ytprefsfitvids__',
295
+ '__jquery_cookie__'
296
+ );
297
+
298
+ if (self::$alloptions[self::$opt_defer_jquery] == 1 && !is_admin())
299
+ {
300
+ array_push($defer, 'jquery', 'jquery-core', 'jquery-migrate');
301
+ }
302
+
303
+ if (in_array($handle, $defer) && stripos($tag, ' defer') === false)
304
+ {
305
+ $tag = str_replace(' src', ' defer src', $tag);
306
+ }
307
+
308
+ return $tag;
309
+ }
310
+
311
  public static function my_plugin_action_links($links)
312
  {
313
  if (is_array($links))
1082
  $step1_livechannel_errors = $step1_livechannel_error_invalid;
1083
  $acc_expand = 'h3_live';
1084
  }
1085
+ }
1086
  else if ($submit_type === 'step1_live')
1087
  {
1088
  $search = sanitize_text_field(trim($_POST['txtUrlLive']));
1296
  Important: You can embed any public livestreams from any channel that YouTube/Google has approved to be <strong>Eligible</strong> and <strong>Enabled</strong>.
1297
  If you're trying to embed a livestream from your own channel, you can check make sure it is <strong>Eligible</strong> and <strong>Enabled</strong> by <a href="https://www.youtube.com/features" target="_blank">visiting here.</a>
1298
  You are verified if you see the word "Enabled" at the bottom of the box that is labeled "Embed live streams." Note that verification can only be done directly through YouTube/Google with the link above, and this plugin cannot automatically do that.
1299
+ YouTube/Google also requires <strong>Monetization</strong> enabled. <a href="https://www.embedplus.com/how-to-embed-a-youtube-livestream-in-wordpress.aspx" target="_blank">You can read more here &raquo;</a>
1300
  </p>
1301
+
1302
  <div class="livestream-tabs">
1303
  <ul>
1304
  <li><a href="#livestream-tabs-2">Channel-based livestream (recommended)<sup class="orange">new</sup></a></li>
1804
  evselector: '<?php echo self::get_evselector(); ?>',
1805
  ajax_compat: <?php echo self::$alloptions[self::$opt_ajax_compat] == '1' ? 'true' : 'false' ?>,
1806
  ytapi_load: '<?php echo esc_attr(self::$alloptions[self::$opt_ytapi_load]) ?>',
1807
+ pause_others: <?php echo self::$alloptions[self::$opt_pause_others] == '1' ? 'true' : 'false' ?>,
1808
  stopMobileBuffer: <?php echo self::$alloptions[self::$opt_stop_mobile_buffer] == '1' ? 'true' : 'false' ?>
1809
  };</script>
1810
  <?php
1875
  $_defaultheight = '';
1876
  $_playsinline = 0;
1877
  $_origin = 0;
1878
+ $_pause_others = 0;
1879
  $_defaultvol = 0;
1880
  $_vol = '';
1881
  $_apikey = '';
1901
  $_not_live_on = 1;
1902
  $_debugmode = 0;
1903
  $_admin_off_scripts = 0;
1904
+ $_defer_js = 0;
1905
+ $_defer_jquery = 0;
1906
  $_ajax_save = 1;
1907
  $_show_pointer = 1;
1908
  $_onboarded = 0;
1970
  $_defaultdims = self::tryget($arroptions, self::$opt_defaultdims, 0);
1971
  $_defaultwidth = self::tryget($arroptions, self::$opt_defaultwidth, '');
1972
  $_defaultheight = self::tryget($arroptions, self::$opt_defaultheight, '');
1973
+ $_pause_others = self::tryget($arroptions, self::$opt_pause_others, $_pause_others);
1974
  $_defaultvol = self::tryget($arroptions, self::$opt_defaultvol, 0);
1975
  $_vol = self::tryget($arroptions, self::$opt_vol, '');
1976
  $_apikey = self::tryget($arroptions, self::$opt_apikey, '');
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);
1999
  $_ajax_save = self::tryget($arroptions, self::$opt_ajax_save, $_ajax_save);
2000
  $_show_pointer = self::tryget($arroptions, self::$opt_show_pointer, $_show_pointer);
2001
  $_onboarded = 0; // self::tryget($arroptions, self::$opt_onboarded, $_onboarded);
2062
  self::$opt_defaultdims => $_defaultdims,
2063
  self::$opt_defaultwidth => $_defaultwidth,
2064
  self::$opt_defaultheight => $_defaultheight,
2065
+ self::$opt_pause_others => $_pause_others,
2066
  self::$opt_defaultvol => $_defaultvol,
2067
  self::$opt_vol => $_vol,
2068
  self::$opt_apikey => $_apikey,
2086
  self::$opt_not_live_on => $_not_live_on,
2087
  self::$opt_debugmode => $_debugmode,
2088
  self::$opt_admin_off_scripts => $_admin_off_scripts,
2089
+ self::$opt_defer_js => $_defer_js,
2090
+ self::$opt_defer_jquery => $_defer_jquery,
2091
  self::$opt_ajax_save => $_ajax_save,
2092
  self::$opt_show_pointer => $_show_pointer,
2093
  self::$opt_onboarded => $_onboarded,
2139
  add_filter('widget_text', array(get_class(), 'apply_prefs_widget'), 1);
2140
  //add_filter('bjll/skip_classes', array(get_class(), 'bjll_skip_classes'), 10, 2);
2141
 
2142
+ add_filter('sgo_lazy_load_exclude_classes', array(get_class(), 'exclude_lazy_sgo'));
2143
+
2144
  add_shortcode('embedyt', array(get_class(), 'apply_prefs_shortcode'));
2145
  if (self::$alloptions[self::$opt_migrate] == 1)
2146
  {
2155
  }
2156
  }
2157
  }
2158
+
2159
+ if (self::$alloptions[self::$opt_defer_js] == 1)
2160
+ {
2161
+ add_filter('script_loader_tag', array(get_class(), 'defer_scripts'), 10, 3);
2162
+ }
2163
  }
2164
 
2165
  public static function ao_override_jsexclude($exclude)
2171
  return $exclude;
2172
  }
2173
 
2174
+ public static function exclude_lazy_sgo($classes)
2175
+ {
2176
+ $classes[] = '__youtube_prefs__';
2177
+ return $classes;
2178
+ }
2179
+
2180
  public static function apply_prefs_shortcode($atts, $content = null)
2181
  {
2182
  $content = trim($content);
2594
  return $live_error_msg;
2595
  }
2596
 
2597
+ if (!isset($linkparams['v']) && !isset($linkparams['live_stream']))
2598
  {
2599
  return apply_filters('ytprefs_filter_the_content_light', wp_kses_post(self::$alloptions[self::$opt_not_live_content]));
2600
  }
2601
  }
2602
+
2603
  if (stripos($linkparamstemp[0], 'live_stream') !== false)
2604
  {
2605
  $linkparams['live_stream'] = 1;
2629
  $relstop = ' data-relstop="1" ';
2630
  }
2631
 
2632
+ if (!empty($finalparams[self::$opt_loop]))
2633
+ {
2634
+ $relstop = '';
2635
+ }
2636
+
2637
  if (self::$alloptions[self::$opt_dohl] == 1)
2638
  {
2639
  $locale = get_locale();
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__') .
3146
  $new_pointer_content = '<h3>' . __('New Update') . '</h3>'; // ooopointer
3147
 
3148
  $new_pointer_content .= '<p>'; // ooopointer
3149
+ $new_pointer_content .= "This version introduces JavaScript deferral for added performance, improves the compatibility between the looping feature and disabling related videos, and allows you enable/disable simultaneous playback of separate videos on the same page for both 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.";
3185
  <a class="nav-tab" href="#jumpgallery">Galleries</a>
3186
  <a class="nav-tab href-link" style="background-color: #daebf1;" rel="#jumpupgrade" target="_blank" href="<?php echo self::$epbase . "/dashboard/pro-easy-video-analytics.aspx?ref=protab" ?>">Upgrade?</a>
3187
  <?php
3188
+ if (false)//(!(bool) (self::$alloptions[self::$opt_vi_hide_monetize_tab]) && self::vi_ever_logged_in())
3189
  {
3190
  if (self::vi_logged_in())
3191
  {
3201
  }
3202
  }
3203
  ?>
3204
+ <a class="nav-tab" href="#jumpperformance">Performance <sup class="orange">new</sup></a>
3205
  <a class="nav-tab" href="#jumpcompat">Compatibility</a>
3206
  <a class="nav-tab" href="#jumpprivacy">Security & Privacy</a>
3207
  <a class="nav-tab" href="#jumphowto">Embed Manually</a>
3334
  .apikey-video{margin-left: 3%; display: inline-block; width: 50%; position: relative; padding-top: 29%}
3335
  .apikey-video iframe{display: block; width: 100%; height: 100%; position: absolute; top: 0; left: 0;}
3336
  #boxnocookie {display: inline-block; border-radius: 3px; padding: 2px 4px 2px 4px; color: red; <?php echo $all[self::$opt_nocookie] ? '' : 'display: none;' ?>}
3337
+ #boxapinever {display: none; color: red;}
3338
+ input[type="radio"]:checked ~ #boxapinever {display: block;}
3339
  #box_gdpr_consent { color: red; <?php echo (bool) $all[self::$opt_gdpr_consent] ? 'display: block;' : 'display: none;' ?>}
3340
  .strike {text-decoration: line-through;}
3341
+ .upgchecks { padding: 20px; border: 1px dotted #777777; background-color: #fcfcfc; }
3342
  .clearboth {clear: both;}
3343
  div.hr {clear: both; border-bottom: 1px dotted #A8BDD8; margin: 20px 0 20px 0;}
3344
  .wp-pointer-buttons a.close {margin-top: 0 !important;}
3430
  opacity: 1;
3431
  }
3432
 
3433
+ #defer_js ~ .box_defer_jquery {
3434
+ opacity: .3;
3435
+ }
3436
+
3437
+ #defer_js:checked ~ .box_defer_jquery {
3438
+ opacity: 1;
3439
+ }
3440
+
3441
+ .epyt-fitvid {
3442
+ width: 100%;
3443
+ padding-top: 56.25%;
3444
+ position: relative;
3445
+ }
3446
+
3447
+ .epyt-fitvid iframe {
3448
+ position: absolute;
3449
+ top: 0;
3450
+ left:0;
3451
+ right: 0;
3452
+ bottom: 0;
3453
+ width: 100%;
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>
3590
  </span>
3591
  </p>
3592
 
3593
+ <p>
3594
+ <input name="<?php echo self::$opt_pause_others; ?>" id="<?php echo self::$opt_pause_others; ?>" <?php checked($all[self::$opt_pause_others], 1); ?> type="checkbox" class="checkbox">
3595
+ <label for="<?php echo self::$opt_pause_others; ?>">
3596
+ <b class="chktitle"><?php _e('Simultaneous Playback Control:', 'youtube-embed-plus'); ?></b> <sup class="orange"><?php _e('new', 'youtube-embed-plus'); ?></sup>
3597
+ <?php _e('You can enable/disable the ability for visitors to have separate videos running at the same time on the same page. Check this to automatically pause other players while the current player is playing. (Note: this feature is not guaranteed to work with videos embedded from other plugins).', 'youtube-embed-plus'); ?>
3598
+ </label>
3599
+ </p>
3600
+
3601
  <p>
3602
  <input name="<?php echo self::$opt_cc_load_policy; ?>" id="<?php echo self::$opt_cc_load_policy; ?>" <?php checked($all[self::$opt_cc_load_policy], 1); ?> type="checkbox" class="checkbox">
3603
  <label for="<?php echo self::$opt_cc_load_policy; ?>"><?php _e('<b class="chktitle">Closed Captions:</b> Turn on closed captions by default.') ?></label>
3692
  <b class="chktitle">YouTube API Loading:</b> Choose when to load the YouTube API. The "Restricted" or "Never" options will help with GDPR compliance:
3693
  <ul class="indent-option">
3694
  <li><label><input type="radio" name="<?php echo self::$opt_ytapi_load ?>" value="light" <?php checked($all[self::$opt_ytapi_load], 'light'); ?> /> <em>Restricted</em> - (Recommended) Only load the API on pages that have a YouTube video.</label></li>
3695
+ <li><label>
3696
+ <input type="radio" name="<?php echo self::$opt_ytapi_load ?>" value="never" <?php checked($all[self::$opt_ytapi_load], 'never'); ?> /> <em>Never</em> - Do not load the YouTube API. Note: The "Never" choice may break a few features such as Volume Initialization and Gallery Continuous/Auto Play.
3697
+ <div id="boxapinever">
3698
+ Note: Checking this option may break some features such as the ones listed below:
3699
+ <ul class="list-ul">
3700
+ <li>Galleries</li>
3701
+ <li>Hide related videos at the end of playback</li>
3702
+ <li>Volume initialization</li>
3703
+ <li>Simultaneous playback control</li>
3704
+ <li>Playing video on mobile devices</li>
3705
+ </ul>
3706
+ </div>
3707
+ </label></li>
3708
  <li><label><input type="radio" name="<?php echo self::$opt_ytapi_load ?>" value="always" <?php checked($all[self::$opt_ytapi_load], 'always'); ?> /> <em>Always</em> - Load the API on all pages. In most cases, the "Always" choice is not necessary.</label></li>
3709
  </ul>
3710
  </p>
3757
  <input name="<?php echo self::$opt_nocookie; ?>" id="<?php echo self::$opt_nocookie; ?>" <?php checked($all[self::$opt_nocookie], 1); ?> type="checkbox" class="checkbox">
3758
  <label for="<?php echo self::$opt_nocookie; ?>">
3759
  <b class="chktitle">No Cookies:</b> Prevent YouTube from leaving tracking cookies on your visitors browsers unless they actual play the videos. This is coded to apply this behavior on links in your past post as well.
3760
+ <div id="boxnocookie">
3761
+ Note: Checking this option may break some features such as the ones listed below:
3762
+ <ul class="list-ul">
3763
+ <li>Galleries</li>
3764
+ <li>Hide related videos at the end of playback</li>
3765
+ <li>Volume initialization</li>
3766
+ <li>Simultaneous playback control</li>
3767
+ <li>Playing video on mobile devices</li>
3768
+ </ul>
3769
+ </div>
3770
  </label>
3771
  </p>
3772
  </div>
4140
  _e('</ul>');
4141
  ?>
4142
  </section>
4143
+
4144
+ <section class="pattern" id="jumpperformance">
4145
+ <h2><?php _e('Performance Settings & Tips', 'youtube-embed-plus'); ?></h2>
4146
+ <p>
4147
+ <?php _e('On this page, we describe performance options to help optimize page speed times of your pages containing YouTube embeds.', 'youtube-embed-plus'); ?>
4148
+ </p>
4149
+ <div class="p">
4150
+ <input name="<?php echo self::$opt_defer_js; ?>" id="<?php echo self::$opt_defer_js; ?>" <?php checked($all[self::$opt_defer_js], 1); ?> type="checkbox" class="checkbox">
4151
+ <label for="<?php echo self::$opt_defer_js ?>">
4152
+ <b class="chktitle"><?php _e('Defer Javascript:', 'youtube-embed-plus'); ?></b> <sup class="orange"><?php _e('new', 'youtube-embed-plus'); ?></sup>
4153
+ <?php _e('JavaScript (JS) deferral is a common website performance option that can offer significant improvements of page speed. You can reduce the initial load time of your page by allowing this plugin\'s scripts to begin execution only after a page is loaded. You may receive a better GTMetrix score with this option turned on. Note: This feature is compatible with most sites, but turn it off if you are having issues.', 'youtube-embed-plus'); ?>
4154
+ </label>
4155
+ <div class="p box_defer_jquery">
4156
+ <input name="<?php echo self::$opt_defer_jquery; ?>" id="<?php echo self::$opt_defer_jquery; ?>" type="checkbox" class="checkbox" <?php checked($all[self::$opt_defer_jquery], 1); ?>>
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>
4164
+ </div>
4165
+ <p><?php _e('Note: Since the YouTube player is loaded in its own iframe from YouTube\'s servers, browser restrictions prevent this plugin from directly deferring the JS inside the iframe. However, if you upgrade to Pro, you can use the lazy loading feature <a href="#jumpupgrade">described here &raquo;</a> to further improve your page speeds.', 'youtube-embed-plus'); ?></p>
4166
+ <!-- <div style="width: 50%">
4167
+ <div class="epyt-fitvid">
4168
+ <iframe allow="encrypted-media" allowfullscreen="" src="https://www.youtube-nocookie.com/embed/?autoplay=0&amp;cc_load_policy=0&amp;iv_load_policy=1&amp;loop=0&amp;modestbranding=0&amp;fs=1&amp;playsinline=0&amp;controls=1&amp;color=red&amp;rel=1&amp;autohide=2&amp;theme=dark&amp;"></iframe>
4169
+ </div>
4170
+ </div>-->
4171
+ </section>
4172
+
4173
  <div class="save-changes-follow"> <?php self::save_changes_button(isset($_POST[$ytprefs_submitted]) && $_POST[$ytprefs_submitted] == 'Y'); ?> </div>
4174
  </form>
4175
 
4179
  <p>
4180
  Below are descriptions for some of our PRO features for more gallery customization options, faster page loading, enhanced SEO, and more. Simply purchase and install our separate PRO plugin (the PRO plugin automatically works for all your past embed links).
4181
  </p>
4182
+ <p>
4183
+ <input disabled type="checkbox" class="checkbox">
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>
4191
  <p>
4192
  <img class="ssaltgallery" src="<?php echo plugins_url('images/ssaltgalleryall.jpg', __FILE__) ?>" />
4193
  <select disabled>
4269
  </label>
4270
  </p>
4271
  <div class="hr"></div>
 
 
 
 
 
 
 
 
4272
  <p>
4273
  <input disabled type="checkbox" class="checkbox">
4274
  <label>
4633
  {
4634
  $("input#vol").width(40);
4635
  }
4636
+
4637
+ $('#defer_js').on('change', function ()
4638
+ {
4639
+ if (!$(this).is(':checked'))
4640
+ {
4641
+ $('#defer_jquery').prop('checked', false).prop('disabled', true);
4642
+ }
4643
+ else
4644
+ {
4645
+ $('#defer_jquery').prop('disabled', false);
4646
+ }
4647
+ });
4648
 
4649
  });
4650
  })(jQuery);
4667
  $new_options[self::$opt_autoplay] = self::postchecked(self::$opt_autoplay) ? 1 : 0;
4668
  $new_options[self::$opt_debugmode] = self::postchecked(self::$opt_debugmode) ? 1 : 0;
4669
  $new_options[self::$opt_admin_off_scripts] = self::postchecked(self::$opt_admin_off_scripts) ? 1 : 0;
4670
+ $new_options[self::$opt_defer_js] = self::postchecked(self::$opt_defer_js) ? 1 : 0;
4671
+ $new_options[self::$opt_defer_jquery] = self::postchecked(self::$opt_defer_jquery) ? 1 : 0;
4672
  $new_options[self::$opt_ajax_save] = self::postchecked(self::$opt_ajax_save) ? 1 : 0;
4673
  $new_options[self::$opt_show_pointer] = self::postchecked(self::$opt_show_pointer) ? 1 : 0;
4674
  $new_options[self::$opt_old_script_method] = self::postchecked(self::$opt_old_script_method) ? 1 : 0;
4697
  $new_options[self::$opt_restrict_wizard] = self::postchecked(self::$opt_restrict_wizard) ? 1 : 0;
4698
  $new_options[self::$opt_ajax_compat] = self::postchecked(self::$opt_ajax_compat) ? 1 : 0;
4699
  $new_options[self::$opt_defaultdims] = self::postchecked(self::$opt_defaultdims) ? 1 : 0;
4700
+ $new_options[self::$opt_pause_others] = self::postchecked(self::$opt_pause_others) ? 1 : 0;
4701
  $new_options[self::$opt_defaultvol] = self::postchecked(self::$opt_defaultvol) ? 1 : 0;
4702
  $new_options[self::$opt_dohl] = self::postchecked(self::$opt_dohl) ? 1 : 0;
4703
  $new_options[self::$opt_onboarded] = self::postchecked(self::$opt_onboarded) ? 1 : 0;
4973
  $input[self::$opt_modestbranding] = intval($input[self::$opt_modestbranding]);
4974
  $input[self::$opt_responsive] = intval($input[self::$opt_responsive]);
4975
  $input[self::$opt_responsive_all] = intval($input[self::$opt_responsive_all]);
4976
+ $input[self::$opt_defer_js] = intval($input[self::$opt_defer_js]);
4977
 
4978
  $input[self::$opt_gallery_pagesize] = intval($input[self::$opt_gallery_pagesize]);
4979
  $input[self::$opt_gallery_columns] = intval($input[self::$opt_gallery_columns]);
5009
  self::$opt_modestbranding => 0,
5010
  self::$opt_responsive => 0,
5011
  self::$opt_responsive_all => 0,
5012
+ self::$opt_defer_js => 0,
5013
  self::$opt_gallery_pagesize => 15,
5014
  self::$opt_gallery_columns => 3,
5015
  self::$opt_not_live_content => '',
5209
  <label for="<?php echo self::$opt_responsive_all; ?>0">Responsive for only videos embedded via this plugin</label>
5210
  </p>
5211
  </div>
5212
+ <div class="ytprefs-ob-setting yob-single">
5213
+ <input value="1" name="<?php echo self::$opt_defer_js; ?>" id="<?php echo self::$opt_defer_js; ?>" <?php checked($all[self::$opt_defer_js], 1); ?> type="checkbox" class="checkbox">
5214
+ <label for="<?php echo self::$opt_defer_js ?>">
5215
+ <b class="chktitle"><?php _e('Defer Javascript:', 'youtube-embed-plus'); ?></b> <sup class="orange"><?php _e('new', 'youtube-embed-plus'); ?></sup>
5216
+ <?php _e('JavaScript (JS) deferral is a common website performance option that can offer significant improvements of page speed. You can reduce the initial load time of your page by allowing this plugin\'s scripts to begin execution only after a page is loaded. You may receive a better GTMetrix score with this option turned on. Note: This feature is compatible with most sites, but turn it off if you are having issues.', 'youtube-embed-plus'); ?>
5217
+ </label>
5218
+ </div>
5219
  <div class="ytprefs-ob-setting yob-gallery">
5220
  <label for="<?php echo self::$opt_gallery_pagesize; ?>"><b class="chktitle">Default Gallery Page Size:</b></label>
5221
  <select name="<?php echo self::$opt_gallery_pagesize; ?>" id="<?php echo self::$opt_gallery_pagesize; ?>" style="width: 60px;">
5481
  'evselector' => self::get_evselector(),
5482
  'ajax_compat' => self::$alloptions[self::$opt_ajax_compat] == '1' ? true : false,
5483
  'ytapi_load' => self::$alloptions[self::$opt_ytapi_load],
5484
+ 'pause_others' => self::$alloptions[self::$opt_pause_others] == '1' ? true : false,
5485
  'stopMobileBuffer' => self::$alloptions[self::$opt_stop_mobile_buffer] == '1' ? true : false,
5486
  'vi_active' => self::$alloptions[self::$opt_vi_active] == '1' ? true : false,
5487
  'vi_js_posttypes' => self::$alloptions[self::$opt_vi_js_posttypes]
8125
  self::$version
8126
  );
8127
 
8128
+ //wp_enqueue_style('__ytprefs_admin__vi_css', plugins_url('styles/ytvi-admin' . self::$min . '.css', __FILE__), array(), self::$version);
8129
 
8130
  // Tiny MCE
8131
  wp_enqueue_style('__ytprefs_admin__tinymce_css', plugins_url('styles/epyt_mce_wizard_button' . self::$min . '.css', __FILE__), array(), self::$version);