YouTube - Version 13.0.1

Version Description

Download this release

Release Info

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

Code changes from version 13.0 to 13.0.1

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,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 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,onClick:this.showModal},"Open Wizard"),this.state.show?wp.element.createElement(h,{title:"YouTube Wizard",className:"epytblock epytblock__modal",onRequestClose:this.hideModal},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,j=t,_=e.apply(o,n)}function u(e){return j=e,E=setTimeout(f,t),O?o(e):_}function p(e){var n=e-x,o=e-j,r=t-n;return T?s(r,g-o):r}function m(e){var n=e-x,o=e-j;return void 0===x||n>=t||n<0||T&&o>=g}function f(){var e=c();if(m(e))return d(e);E=setTimeout(f,p(e))}function d(e){return E=void 0,C&&b?o(e):(b=h=void 0,_)}function w(){void 0!==E&&clearTimeout(E),j=0,b=x=h=E=void 0}function v(){return void 0===E?_:d(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(f,t),o(x)}return void 0===E&&(E=setTimeout(f,t)),_}var b,h,g,_,E,x,j=0,O=!1,T=!1,C=!0;if("function"!=typeof e)throw new TypeError(l);return t=i(t)||0,r(n)&&(O=!!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,f=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,"AD + CONTENT")),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(f,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,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,onClick:this.showModal},"Open Wizard"),this.state.show?wp.element.createElement(h,{title:"YouTube Wizard",className:"epytblock epytblock__modal",onRequestClose:this.hideModal},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,j=t,_=e.apply(o,n)}function u(e){return j=e,E=setTimeout(d,t),T?o(e):_}function p(e){var n=e-x,o=e-j,r=t-n;return O?s(r,g-o):r}function m(e){var n=e-x,o=e-j;return void 0===x||n>=t||n<0||O&&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),j=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(O)return E=setTimeout(d,t),o(x)}return void 0===E&&(E=setTimeout(d,t)),_}var b,h,g,_,E,x,j=0,T=!1,O=!1,C=!0;if("function"!=typeof e)throw new TypeError(l);return t=i(t)||0,r(n)&&(T=!!n.leading,O="maxWait"in n,g=O?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){}]);
images/adstxt-help.png ADDED
Binary file
images/adstxt-warning.png ADDED
Binary file
images/apikey-server.png ADDED
Binary file
includes/vi/vi_actions.php CHANGED
@@ -5,6 +5,7 @@ add_action("wp_ajax_my_embedplus_vi_toggle_ajax", array(get_class(), 'vi_toggle_
5
  add_action("wp_ajax_my_embedplus_vi_hide_feature_ajax", array(get_class(), 'vi_hide_feature_ajax'));
6
 
7
  add_action('admin_init', array(get_class(), 'vi_adstxt_download'));
 
8
 
9
  if (function_exists('tenup_display_ads_txt'))
10
  {
5
  add_action("wp_ajax_my_embedplus_vi_hide_feature_ajax", array(get_class(), 'vi_hide_feature_ajax'));
6
 
7
  add_action('admin_init', array(get_class(), 'vi_adstxt_download'));
8
+ add_action('admin_notices', array(get_class(), 'vi_notice_login_reminder'));
9
 
10
  if (function_exists('tenup_display_ads_txt'))
11
  {
includes/vi/vi_admin_menu.php CHANGED
@@ -4,10 +4,10 @@ if (self::vi_logged_in())
4
  {
5
  self::$admin_page_hooks[] = add_submenu_page('youtube-my-preferences', 'Monetize With vi', '<img style="width: 16px; height: 16px; vertical-align: text-top;" src="' . plugins_url(self::$folder_name . '/images/icon-monetize.svg') . '" />&nbsp;&nbsp;Monetize', 'manage_options', 'youtube-ep-vi', array(get_class(), 'vi_admin_dashboard'));
6
  }
7
- else if (!(bool) (self::$alloptions[self::$opt_vi_hide_monetize_tab]))
8
  {
9
  $page_parent = null;
10
- if (filter_input(INPUT_GET, 'page') == 'youtube-ep-vi')
11
  {
12
  $page_parent = 'youtube-my-preferences';
13
  }
4
  {
5
  self::$admin_page_hooks[] = add_submenu_page('youtube-my-preferences', 'Monetize With vi', '<img style="width: 16px; height: 16px; vertical-align: text-top;" src="' . plugins_url(self::$folder_name . '/images/icon-monetize.svg') . '" />&nbsp;&nbsp;Monetize', 'manage_options', 'youtube-ep-vi', array(get_class(), 'vi_admin_dashboard'));
6
  }
7
+ else if (!(bool) (self::$alloptions[self::$opt_vi_hide_monetize_tab]) || self::vi_script_setup_done())
8
  {
9
  $page_parent = null;
10
+ if (filter_input(INPUT_GET, 'page') == 'youtube-ep-vi' || self::vi_script_setup_done())
11
  {
12
  $page_parent = 'youtube-my-preferences';
13
  }
includes/vi/vi_registration_form.php CHANGED
@@ -35,7 +35,7 @@
35
  {
36
  ?>
37
  <div class="login-expire">
38
- For your security, your session expires every 30 days. Please login to vi again to view your settings.
39
  </div>
40
  <?php
41
  }
@@ -74,7 +74,6 @@
74
  </p>
75
  <p>
76
  <input disabled class="button-primary ytvi-step-1--submit-register ytprefs-ajax-form--submit" type="button" value="Next &raquo;"/>
77
- <a class="vi-forgot-pw" href="https://www.vi.ai/legals/?aid=WP_embedplus&utm_source=Wordpress&utm_medium=WP_embedplus" target="_blank">vi.ai Terms & Privacy &raquo;</a>
78
  </p>
79
  </div>
80
  <div class="side-login ytprefs-ajax-form">
@@ -94,11 +93,19 @@
94
  </div>
95
  <div class="vi-contact-support">
96
  <p class="center"><em>Need help signing up or signing in? Contact support at <strong><a href="mailto:ext@embedplus.com">ext@embedplus.com</a></strong></em></p>
 
97
  </div>
98
  </div>
99
- <p class="box-vi-not-interested">
100
- Not interested? You can hide this by <button class="button button-small vi-cover-prompt-no" type="button">clicking here</button> or checking <a class="vi-not-interested" target="_top" href="<?php echo admin_url('admin.php?page=youtube-my-preferences#vi_hide_monetize_tab') ?>"><em>Hide "Monetize" Feature</em></a> found in the YouTube Settings "Defaults" tab.
101
- </p>
 
 
 
 
 
 
 
102
  </div>
103
  <div class="ytvi-step ytvi-step-2-loading">
104
  <p class="ytvi-loading--message">
@@ -110,13 +117,16 @@
110
  <div class="ytvi-registration">
111
  <div class="ytvi-step-2-msg">
112
  <ol>
113
- <li><strong>Fill out</strong> the below</li>
114
  <li><strong>Check your email</strong> for a confirmation link</li>
115
- <li><strong>Come right back here</strong> after creating your password and
116
  <?php
117
  $curr_screen = get_current_screen();
118
- echo strpos($curr_screen->id, 'youtube-ep-vi') !== false || strpos($curr_screen->id, 'youtube-my-preferences') !== false ? 'refresh this page' : '<a target="_blank" href="' . admin_url('admin.php?page=youtube-ep-vi') . '">click here</a>'
119
- ?> to login below
 
 
 
120
  </li>
121
  </ol>
122
  </div>
35
  {
36
  ?>
37
  <div class="login-expire">
38
+ For your security, your session expires every 30 days. Please login to vi again below to view your settings.
39
  </div>
40
  <?php
41
  }
74
  </p>
75
  <p>
76
  <input disabled class="button-primary ytvi-step-1--submit-register ytprefs-ajax-form--submit" type="button" value="Next &raquo;"/>
 
77
  </p>
78
  </div>
79
  <div class="side-login ytprefs-ajax-form">
93
  </div>
94
  <div class="vi-contact-support">
95
  <p class="center"><em>Need help signing up or signing in? Contact support at <strong><a href="mailto:ext@embedplus.com">ext@embedplus.com</a></strong></em></p>
96
+ <p class="center"><a href="https://www.vi.ai/legals/?aid=WP_embedplus&utm_source=Wordpress&utm_medium=WP_embedplus" target="_blank">vi.ai Terms & Privacy</a></p>
97
  </div>
98
  </div>
99
+ <?php
100
+ if (!self::vi_script_setup_done())
101
+ {
102
+ ?>
103
+ <p class="box-vi-not-interested">
104
+ Not interested? You can hide this by checking <a class="vi-not-interested" target="_top" href="<?php echo admin_url('admin.php?page=youtube-my-preferences#vi_hide_monetize_tab') ?>"><em>Hide "Monetize" Feature</em></a> found in the YouTube Settings "Defaults" tab.
105
+ </p>
106
+ <?php
107
+ }
108
+ ?>
109
  </div>
110
  <div class="ytvi-step ytvi-step-2-loading">
111
  <p class="ytvi-loading--message">
117
  <div class="ytvi-registration">
118
  <div class="ytvi-step-2-msg">
119
  <ol>
120
+ <li><strong>Register</strong> below</li>
121
  <li><strong>Check your email</strong> for a confirmation link</li>
122
+ <li><strong>Come right back here</strong> after creating your password
123
  <?php
124
  $curr_screen = get_current_screen();
125
+ echo strpos($curr_screen->id, 'youtube-ep-vi') !== false || strpos($curr_screen->id, 'youtube-my-preferences') !== false ? 'and refresh this page' : 'and <a target="_blank" href="' . admin_url('admin.php?page=youtube-ep-vi') . '">click here</a>'
126
+ ?> (Note: <u><strong>Skip</strong> the "integration tags" step</u> that you might see after confirmation, because this plugin will automatically do that step for you.)
127
+ </li>
128
+ <li>
129
+ <strong>Login below</strong> to complete the setup.
130
  </li>
131
  </ol>
132
  </div>
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: embedplus
3
  Plugin Name: YouTube Embed
4
  Tags: youtube gallery, video gallery, youtube channel, youtube live, live stream
5
  Requires at least: 4.0
6
- Tested up to: 5.0
7
- Stable tag: 13.0
8
  License: GPLv3 or later
9
 
10
  YouTube Embed WordPress Plugin. Embed a responsive video, YouTube channel gallery, playlist gallery, or YouTube.com live stream (with GDPR options)
@@ -148,6 +148,10 @@ You can also start and end each individual video at particular times. Like the a
148
 
149
  == Changelog ==
150
 
 
 
 
 
151
  = WordPress YouTube Embed 13.0 =
152
  * Compatible with the new Gutenberg block editor, and stays backwards-compatible with the classic editor
153
  * Marked deprecated features
3
  Plugin Name: YouTube Embed
4
  Tags: youtube gallery, video gallery, youtube channel, youtube live, live stream
5
  Requires at least: 4.0
6
+ Tested up to: 5.1
7
+ Stable tag: 13.0.1
8
  License: GPLv3 or later
9
 
10
  YouTube Embed WordPress Plugin. Embed a responsive video, YouTube channel gallery, playlist gallery, or YouTube.com live stream (with GDPR options)
148
 
149
  == Changelog ==
150
 
151
+ = WordPress YouTube Embed 13.0.1 =
152
+ * Clearer instructions
153
+ * Feature deprecation (rel, showinfo)
154
+
155
  = WordPress YouTube Embed 13.0 =
156
  * Compatible with the new Gutenberg block editor, and stays backwards-compatible with the classic editor
157
  * Marked deprecated features
scripts/ytprefs-admin.js CHANGED
@@ -478,6 +478,10 @@
478
  $('.ytvi-step-2').show('fade', {}, 500);
479
  });
480
  }, 3000);
 
 
 
 
481
  }
482
  else if (response.type === 'error')
483
  {
@@ -561,6 +565,7 @@
561
  {
562
  $('.ytvi-login-loading').hide('fade', {}, 500, function ()
563
  {
 
564
  $('.ytvi-login-success-message').html(response.message);
565
  $('.ytvi-login-success').show('fade', {}, 500, function ()
566
  {});
478
  $('.ytvi-step-2').show('fade', {}, 500);
479
  });
480
  }, 3000);
481
+
482
+ var date_attempt = new Date(), date_expire = new Date();
483
+ date_expire.setTime(date_expire.getTime() + (365 * 24 * 60 * 60 * 1000));
484
+ document.cookie = "vi_signup_attempt=" + date_attempt.toUTCString() + ";expires=" + date_expire.toUTCString() + ";path=" + window._EPYTA_.admin_url;
485
  }
486
  else if (response.type === 'error')
487
  {
565
  {
566
  $('.ytvi-login-loading').hide('fade', {}, 500, function ()
567
  {
568
+ document.cookie = 'vi_signup_attempt=; expires=Thu, 01 Jan 1970 00:00:01 GMT;';
569
  $('.ytvi-login-success-message').html(response.message);
570
  $('.ytvi-login-success').show('fade', {}, 500, function ()
571
  {});
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:"",async:true}).always(function(c,g,f){if(g==="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{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()};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 d=a[g];var c=g==="attachEvent"?"onmessage":"message";d(c,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){$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)}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(){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 e=b(".iab-cat-child").val();if(e.length>0){var h=e.split("-")[0];b(".iab-cat-child-box").removeClass("hidden");b(".iab-cat-child-box select").prop("disabled",false);b('.iab-cat-parent option[value="'+h+'"]').prop("selected",true);b(".iab-cat-child option").addClass("hidden");b('.iab-cat-child option[value^="'+h+'-"], .iab-cat-child option[value="'+h+'"]').removeClass("hidden")}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+'"]').removeClass("hidden")}});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){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(){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.<br><br>To actually disable vi ads, 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(i){if(i.type==="error"){alertify.alert(i.message)}else{location.href=i.url}},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(){}})}}).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")}},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:"",async:true}).always(function(c,g,f){if(g==="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{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()};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 d=a[g];var c=g==="attachEvent"?"onmessage":"message";d(c,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){$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 e=b(".iab-cat-child").val();if(e.length>0){var h=e.split("-")[0];b(".iab-cat-child-box").removeClass("hidden");b(".iab-cat-child-box select").prop("disabled",false);b('.iab-cat-parent option[value="'+h+'"]').prop("selected",true);b(".iab-cat-child option").addClass("hidden");b('.iab-cat-child option[value^="'+h+'-"], .iab-cat-child option[value="'+h+'"]').removeClass("hidden")}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+'"]').removeClass("hidden")}});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){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(){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.<br><br>To actually disable vi ads, 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(i){if(i.type==="error"){alertify.alert(i.message)}else{location.href=i.url}},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(){}})}}).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")}},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);
src/viblock/block.js CHANGED
@@ -112,7 +112,7 @@ registerBlockType("epyt/vi", {
112
  keywords: [__("video"), __("story"), __("ad")],
113
  description: __("Video ad powered by vi intelligence."),
114
  supports: {
115
- multiple: false,
116
  },
117
  attributes: {
118
  shortcode: {
@@ -140,7 +140,19 @@ registerBlockType("epyt/vi", {
140
  return (
141
  <div className="vi-story-demo--box">
142
  <div className="vi-story-demo--screen">
143
- <span>AD + CONTENT</span>
 
 
 
 
 
 
 
 
 
 
 
 
144
  </div>
145
  <div
146
  className="vi-story-demo--info"
112
  keywords: [__("video"), __("story"), __("ad")],
113
  description: __("Video ad powered by vi intelligence."),
114
  supports: {
115
+ multiple: false
116
  },
117
  attributes: {
118
  shortcode: {
140
  return (
141
  <div className="vi-story-demo--box">
142
  <div className="vi-story-demo--screen">
143
+ <span>
144
+ VIDEO AD + CONTENT
145
+ {window._EPYT_.vi_active == "1" ? null : (
146
+ <small>
147
+ Note: Ads are currently turned off. <br />
148
+ When you are ready to make ads appear on your website, visit the{" "}
149
+ <a target="_blank" href={window._EPYTA_.admin_url_vi}>
150
+ Monetize
151
+ </a>{" "}
152
+ page to turn ads on.
153
+ </small>
154
+ )}
155
+ </span>
156
  </div>
157
  <div
158
  className="vi-story-demo--info"
styles/ytprefs-onboarding.css CHANGED
@@ -238,3 +238,14 @@ iframe#gdpr_consent_message_ifr {
238
  text-align: center;
239
  margin: 0 auto;*/
240
  }
 
 
 
 
 
 
 
 
 
 
 
238
  text-align: center;
239
  margin: 0 auto;*/
240
  }
241
+
242
+ .wiztab-screenshots {
243
+ float: right;
244
+ max-width: 50%;
245
+ height: auto;
246
+ clear: right;
247
+ margin-left: 30px;
248
+ margin-bottom: 15px;
249
+ display: block;
250
+ border: 5px solid #dddddd;
251
+ }
styles/ytprefs-onboarding.min.css CHANGED
@@ -1,2 +1,2 @@
1
 
2
- #wphead{display:none}#wpbody{margin-left:0}#adminmenuback{display:none}#adminmenu,adminmenuwrap{display:none}#wpcontent,.auto-fold #wpcontent{margin-left:0}#wpadminbar{display:none}html.wp-toolbar{padding:0}#footer,#wpfooter,.auto-fold #wpfooter{display:none}#wpfooter{clear:both}.clearboth{clear:both}.pad20{padding:20px}.center{text-align:center}.bold{font-weight:bold}.orange{color:#f85d00}.smallnote{font-size:small;font-style:italic}.indent-option{margin-left:25px}.ui-widget,.ui-widget input,.ui-widget select,.ui-widget textarea,.ui-widget button{font-family:inherit}.ui-accordion .ui-accordion-header{margin-top:15px;font-weight:bold}.ui-accordion .ui-accordion-content.header-go-content{display:none!important;height:0!important}.ui-widget-content a{color:#0073aa}input.ui-widget[type=text]{margin:0;padding:.4em 1em;width:450px}.txt-button-align input.ui-widget[type=text],.txt-button-align button{vertical-align:top}#epyt_wiz_wrap .ui-button{font-weight:bold}.ui-button .ui-icon{transform:scale(1.35,1.35)}.copycode{background-color:#eef;border:2px solid #c7d6e4;display:inline-block;font-size:.9em;overflow-x:hidden;vertical-align:middle;white-space:nowrap;width:400px;padding-left:15px;padding-right:15px}.pointer{cursor:pointer}.relative{position:relative}.wrap-ytprefs-onboarding h1{line-height:40px}.wrap-ytprefs-onboarding h2{line-height:2em}.wrap-ytprefs-onboarding .box-vi-not-interested{display:none}.ytprefs-ob-step{position:absolute;visibility:hidden;opacity:0;transition:opacity 300ms,visibility 300ms;width:100%;height:0;top:-200000px}.ytprefs-ob-step.active-step{visibility:visible;opacity:1;height:auto;top:0}.ytprefs-ob-title{font-size:2em;line-height:2em;text-align:center}.ytprefs-ob-subtitle{font-size:1.4em;line-height:2em}.ytprefs-ob-content{max-width:768px;margin:0 auto}.ytprefs-ob-nav{text-align:center;margin-top:20px;padding-top:20px;border-top:2px solid #ddd;clear:both;margin-bottom:50px}.ytprefs-ob-nav .ytprefs-ob-nav-hide{display:none}.ytprefs-ob-nav button.button-secondary,.ytprefs-ob-nav button.button-primary{display:inline-block;margin:0 10px}.ytprefs-ob-nav button.ytprefs-ob-nav-prev,.ytprefs-ob-nav button.ytprefs-ob-nav-close{margin-right:25px}.ytprefs-ob-step1 ul.ytprefs-ob-filter li{margin-bottom:15px}.ytprefs-ob-step1 .ytprefs-hover-icons{width:160px;float:right;margin-left:30px;min-height:200px;position:relative}.ytprefs-ob-step1 .ytprefs-hover-icons img{position:absolute;top:0;left:0;opacity:0;display:block;width:100%;height:auto;transition:opacity 200ms}.ytprefs-ob-step1 .ytprefs-hover-icons img.yob-icon-visible{opacity:1}.ytprefs-ob-step2 .ytprefs-ob-setting{display:none;margin:10px 0 25px 0}.ytprefs-ob-step2 .ytprefs-ob-setting.yob-single-visible,.ytprefs-ob-step2 .ytprefs-ob-setting.yob-gallery-visible,.ytprefs-ob-step2 .ytprefs-ob-setting.yob-standalone-visible,.ytprefs-ob-step2 .ytprefs-ob-setting.yob-privacy-visible,.ytprefs-ob-step2 .ytprefs-ob-setting.yob-live-visible{display:block}.ytprefs-ob-step2 form #responsive ~ #boxresponsive_all{height:0;visibility:none;opacity:0;transition:opacity 300ms,visibility 300ms}.ytprefs-ob-step2 form #responsive:checked ~ #boxresponsive_all{height:auto;visibility:visible;opacity:1}.gdpr-options-left{width:65%;float:left}.gdpr-options-right{width:33%;float:right;margin-top:20px}.gdpr-options-right .img-gdpr-message{width:100%;height:auto}iframe#gdpr_consent_message_ifr{min-height:250px!important}.ytprefs-ob-step4 .ytprefs-ob-content{max-width:100%}
1
 
2
+ #wphead{display:none}#wpbody{margin-left:0}#adminmenuback{display:none}#adminmenu,adminmenuwrap{display:none}#wpcontent,.auto-fold #wpcontent{margin-left:0}#wpadminbar{display:none}html.wp-toolbar{padding:0}#footer,#wpfooter,.auto-fold #wpfooter{display:none}#wpfooter{clear:both}.clearboth{clear:both}.pad20{padding:20px}.center{text-align:center}.bold{font-weight:bold}.orange{color:#f85d00}.smallnote{font-size:small;font-style:italic}.indent-option{margin-left:25px}.ui-widget,.ui-widget input,.ui-widget select,.ui-widget textarea,.ui-widget button{font-family:inherit}.ui-accordion .ui-accordion-header{margin-top:15px;font-weight:bold}.ui-accordion .ui-accordion-content.header-go-content{display:none!important;height:0!important}.ui-widget-content a{color:#0073aa}input.ui-widget[type=text]{margin:0;padding:.4em 1em;width:450px}.txt-button-align input.ui-widget[type=text],.txt-button-align button{vertical-align:top}#epyt_wiz_wrap .ui-button{font-weight:bold}.ui-button .ui-icon{transform:scale(1.35,1.35)}.copycode{background-color:#eef;border:2px solid #c7d6e4;display:inline-block;font-size:.9em;overflow-x:hidden;vertical-align:middle;white-space:nowrap;width:400px;padding-left:15px;padding-right:15px}.pointer{cursor:pointer}.relative{position:relative}.wrap-ytprefs-onboarding h1{line-height:40px}.wrap-ytprefs-onboarding h2{line-height:2em}.wrap-ytprefs-onboarding .box-vi-not-interested{display:none}.ytprefs-ob-step{position:absolute;visibility:hidden;opacity:0;transition:opacity 300ms,visibility 300ms;width:100%;height:0;top:-200000px}.ytprefs-ob-step.active-step{visibility:visible;opacity:1;height:auto;top:0}.ytprefs-ob-title{font-size:2em;line-height:2em;text-align:center}.ytprefs-ob-subtitle{font-size:1.4em;line-height:2em}.ytprefs-ob-content{max-width:768px;margin:0 auto}.ytprefs-ob-nav{text-align:center;margin-top:20px;padding-top:20px;border-top:2px solid #ddd;clear:both;margin-bottom:50px}.ytprefs-ob-nav .ytprefs-ob-nav-hide{display:none}.ytprefs-ob-nav button.button-secondary,.ytprefs-ob-nav button.button-primary{display:inline-block;margin:0 10px}.ytprefs-ob-nav button.ytprefs-ob-nav-prev,.ytprefs-ob-nav button.ytprefs-ob-nav-close{margin-right:25px}.ytprefs-ob-step1 ul.ytprefs-ob-filter li{margin-bottom:15px}.ytprefs-ob-step1 .ytprefs-hover-icons{width:160px;float:right;margin-left:30px;min-height:200px;position:relative}.ytprefs-ob-step1 .ytprefs-hover-icons img{position:absolute;top:0;left:0;opacity:0;display:block;width:100%;height:auto;transition:opacity 200ms}.ytprefs-ob-step1 .ytprefs-hover-icons img.yob-icon-visible{opacity:1}.ytprefs-ob-step2 .ytprefs-ob-setting{display:none;margin:10px 0 25px 0}.ytprefs-ob-step2 .ytprefs-ob-setting.yob-single-visible,.ytprefs-ob-step2 .ytprefs-ob-setting.yob-gallery-visible,.ytprefs-ob-step2 .ytprefs-ob-setting.yob-standalone-visible,.ytprefs-ob-step2 .ytprefs-ob-setting.yob-privacy-visible,.ytprefs-ob-step2 .ytprefs-ob-setting.yob-live-visible{display:block}.ytprefs-ob-step2 form #responsive ~ #boxresponsive_all{height:0;visibility:none;opacity:0;transition:opacity 300ms,visibility 300ms}.ytprefs-ob-step2 form #responsive:checked ~ #boxresponsive_all{height:auto;visibility:visible;opacity:1}.gdpr-options-left{width:65%;float:left}.gdpr-options-right{width:33%;float:right;margin-top:20px}.gdpr-options-right .img-gdpr-message{width:100%;height:auto}iframe#gdpr_consent_message_ifr{min-height:250px!important}.ytprefs-ob-step4 .ytprefs-ob-content{max-width:100%}.wiztab-screenshots{float:right;max-width:50%;height:auto;clear:right;margin-left:30px;margin-bottom:15px;display:block;border:5px solid #ddd}
styles/ytprefs.css CHANGED
@@ -349,7 +349,7 @@ body div.__youtube_prefs__.__youtube_prefs_gdpr__ a {
349
  body div.__youtube_prefs__.__youtube_prefs_gdpr__ button.__youtube_prefs_gdpr__, body div.__youtube_prefs__.__youtube_prefs_gdpr__ button.__youtube_prefs_gdpr__:hover {
350
  display: inline-block;
351
  padding: 5px 10px;
352
- background-color: #E62117 !important;
353
  color: #ffffff !important;
354
  text-decoration: none !important;
355
  border-radius: 3px;
349
  body div.__youtube_prefs__.__youtube_prefs_gdpr__ button.__youtube_prefs_gdpr__, body div.__youtube_prefs__.__youtube_prefs_gdpr__ button.__youtube_prefs_gdpr__:hover {
350
  display: inline-block;
351
  padding: 5px 10px;
352
+ background: #E62117 !important;
353
  color: #ffffff !important;
354
  text-decoration: none !important;
355
  border-radius: 3px;
styles/ytprefs.min.css CHANGED
@@ -1,2 +1,2 @@
1
 
2
- .epyt-debug{cursor:pointer;text-align:left;background-color:#ddd;color:#000}iframe.__youtube_prefs__{border-width:0}.epyt-gallery{text-align:center}.epyt-gallery iframe{margin-bottom:0}.epyt-gallery.epyt-lb iframe{display:none;height:0!important}.epyt-gallery-list{margin:0 -8px 0 -8px;position:relative;transition:opacity ease-out .3s;display:block}.epyt-gallery-list .epyt-gallery-thumb{box-sizing:border-box}.epyt-gallery-list p{display:none}.epyt-gallery-clear{clear:both}.epyt-gallery-list.epyt-loading{opacity:.5;transition:opacity ease-out .3s}.epyt-gallery-thumb{position:relative;box-sizing:border-box;overflow-y:hidden;display:block!important;cursor:pointer;opacity:1;float:left;padding:0 8px 10px 8px;height:auto}.epyt-gallery-thumb.hover{position:relative;opacity:1;transition:opacity ease-out .3s;height:auto}.epyt-gallery-img-box{width:100%}.epyt-gallery-img{height:0;width:100%;padding-top:56.25%!important;position:relative;overflow:hidden!important;background-size:cover!important;background-position:center!important}.epyt-gallery-playhover-textonly{position:absolute;top:-10px;left:0;width:100%;height:100%;text-align:center}.epyt-gallery-playhover{opacity:0;position:absolute;top:-10px;left:0;width:100%;height:100%;vertical-align:middle;text-align:center;transition:opacity ease-out .3s}.epyt-gallery-thumb.hover .epyt-gallery-playhover,.epyt-gallery-thumb.epyt-current-video .epyt-gallery-playhover{opacity:1;top:0;transition:all ease-out .3s}.epyt-gallery-thumb .epyt-gallery-playcrutch{display:inline-block;height:100%;vertical-align:middle;width:0}.epyt-gallery-playhover .epyt-play-img{height:auto!important;max-width:15%!important;padding:0!important;margin:0!important;min-width:30px!important;vertical-align:middle!important;display:inline-block!important;width:auto;border:0;box-sizing:border-box}.epyt-gallery-title{font-size:80%;line-height:120%;padding:10px}.epyt-gallery-notitle{padding:4px}.epyt-gallery-notitle span{display:none}.epyt-gallery-rowtitle{text-align:center;width:100%;position:absolute;left:0;top:100%;opacity:0;z-index:10;overflow-x:hidden;text-overflow:ellipsis;white-space:nowrap}.epyt-gallery-rowtitle.hover{opacity:1;transition:opacity linear .2s}.epyt-gallery-rowbreak{clear:both}.epyt-pagination{clear:both;text-align:center;padding:10px 8px 10px 8px}.epyt-pagination.epyt-hide-pagination *{display:none!important}.epyt-pagination>div,.epyt-pagenumbers>div{display:inline-block;padding:0 2px 0 2px;vertical-align:middle}.epyt-pagination .epyt-pagebutton{cursor:pointer;display:inline-block;padding:0 10px 0 10px}.epyt-pagebutton>div{display:inline}.epyt-pagination .epyt-loader{display:none}.epyt-gallery-list.epyt-loading .epyt-pagination .epyt-loader{display:inline-block}body .lity-container{width:100%;max-width:964px}.epyt-curtain .lity-opened iframe{opacity:0;transition:opacity .3s linear .5s}.epyt-gallery-allthumbs.epyt-cols-1 .epyt-gallery-thumb{width:100%}.epyt-gallery-allthumbs.epyt-cols-2 .epyt-gallery-thumb{width:50%}.epyt-gallery-allthumbs.epyt-cols-3 .epyt-gallery-thumb{width:33.333%}.epyt-gallery-allthumbs.epyt-cols-4 .epyt-gallery-thumb{width:25%}.epyt-gallery-allthumbs.epyt-cols-5 .epyt-gallery-thumb{width:20%}.epyt-gallery-allthumbs.epyt-cols-6 .epyt-gallery-thumb{width:16.666%}.epyt-gallery-allthumbs.epyt-cols-7 .epyt-gallery-thumb{width:14.285%}.epyt-gallery-allthumbs.epyt-cols-8 .epyt-gallery-thumb{width:12.5%}.epyt-gallery-allthumbs.epyt-cols-9 .epyt-gallery-thumb{width:11.111%}.epyt-gallery-allthumbs.epyt-cols-10 .epyt-gallery-thumb{width:10%}.epyt-gallery-allthumbs.epyt-cols-11 .epyt-gallery-thumb{width:9.090%}.epyt-gallery-allthumbs.epyt-cols-12 .epyt-gallery-thumb{width:8.333%}.epyt-gallery-allthumbs.epyt-cols-13 .epyt-gallery-thumb{width:7.692%}.epyt-gallery-allthumbs.epyt-cols-14 .epyt-gallery-thumb{width:7.142%}.epyt-gallery-allthumbs.epyt-cols-15 .epyt-gallery-thumb{width:6.666%}.epyt-gallery-allthumbs.epyt-cols-16 .epyt-gallery-thumb{width:6.25%}.epyt-gallery-allthumbs.epyt-cols-17 .epyt-gallery-thumb{width:5.882%}.epyt-gallery-allthumbs.epyt-cols-18 .epyt-gallery-thumb{width:5.555%}.epyt-gallery-allthumbs.epyt-cols-19 .epyt-gallery-thumb{width:5.263%}.epyt-gallery-allthumbs.epyt-cols-20 .epyt-gallery-thumb{width:5%}.epyt-pagebutton.hide,.epyt-pagenumbers.hide{display:none!important;opacity:0!important;visibility:hidden!important}.epyt-gallery-subscribe{text-align:center;padding:15px 0 10px 0;clear:both}.epyt-gallery-subscribe a.epyt-gallery-subbutton,.epyt-gallery-subscribe a.epyt-gallery-subbutton:hover{display:inline-block;padding:5px 10px;background-color:#e62117!important;color:#fff!important;text-decoration:none!important;border-radius:3px}.epyt-gallery-subscribe a.epyt-gallery-subbutton img{width:20px!important;height:auto!important;vertical-align:middle!important;padding:0 6px 3px 0;display:inline-block;background:transparent;-webkit-box-shadow:none;box-shadow:none}body div.__youtube_prefs__.__youtube_prefs_gdpr__{background-color:#000;background-image:-webkit-linear-gradient(top,#000,#444);background-image:linear-gradient(to bottom,#000,#444);padding:25px;height:auto;text-align:left}body div.__youtube_prefs__.__youtube_prefs_gdpr__ *{color:#e3e3e3!important}body div.__youtube_prefs__.__youtube_prefs_gdpr__ a{text-decoration:underline}body div.__youtube_prefs__.__youtube_prefs_gdpr__ button.__youtube_prefs_gdpr__,body div.__youtube_prefs__.__youtube_prefs_gdpr__ button.__youtube_prefs_gdpr__:hover{display:inline-block;padding:5px 10px;background-color:#e62117!important;color:#fff!important;text-decoration:none!important;border-radius:3px;font-weight:normal;border-width:0;box-sizing:border-box}body div.__youtube_prefs__.__youtube_prefs_gdpr__ button.__youtube_prefs_gdpr__ img{width:20px!important;height:auto!important;vertical-align:middle!important;padding:0 6px 3px 0;display:inline-block;background:transparent;-webkit-box-shadow:none;box-shadow:none;margin-left:8px}body .epyt-gallery-img-gdpr{background-color:#000;background-image:-webkit-linear-gradient(top,#000,#444);background-image:linear-gradient(to bottom,#000,#444)}.ytvi-story-container{display:block;max-width:100%}
1
 
2
+ .epyt-debug{cursor:pointer;text-align:left;background-color:#ddd;color:#000}iframe.__youtube_prefs__{border-width:0}.epyt-gallery{text-align:center}.epyt-gallery iframe{margin-bottom:0}.epyt-gallery.epyt-lb iframe{display:none;height:0!important}.epyt-gallery-list{margin:0 -8px 0 -8px;position:relative;transition:opacity ease-out .3s;display:block}.epyt-gallery-list .epyt-gallery-thumb{box-sizing:border-box}.epyt-gallery-list p{display:none}.epyt-gallery-clear{clear:both}.epyt-gallery-list.epyt-loading{opacity:.5;transition:opacity ease-out .3s}.epyt-gallery-thumb{position:relative;box-sizing:border-box;overflow-y:hidden;display:block!important;cursor:pointer;opacity:1;float:left;padding:0 8px 10px 8px;height:auto}.epyt-gallery-thumb.hover{position:relative;opacity:1;transition:opacity ease-out .3s;height:auto}.epyt-gallery-img-box{width:100%}.epyt-gallery-img{height:0;width:100%;padding-top:56.25%!important;position:relative;overflow:hidden!important;background-size:cover!important;background-position:center!important}.epyt-gallery-playhover-textonly{position:absolute;top:-10px;left:0;width:100%;height:100%;text-align:center}.epyt-gallery-playhover{opacity:0;position:absolute;top:-10px;left:0;width:100%;height:100%;vertical-align:middle;text-align:center;transition:opacity ease-out .3s}.epyt-gallery-thumb.hover .epyt-gallery-playhover,.epyt-gallery-thumb.epyt-current-video .epyt-gallery-playhover{opacity:1;top:0;transition:all ease-out .3s}.epyt-gallery-thumb .epyt-gallery-playcrutch{display:inline-block;height:100%;vertical-align:middle;width:0}.epyt-gallery-playhover .epyt-play-img{height:auto!important;max-width:15%!important;padding:0!important;margin:0!important;min-width:30px!important;vertical-align:middle!important;display:inline-block!important;width:auto;border:0;box-sizing:border-box}.epyt-gallery-title{font-size:80%;line-height:120%;padding:10px}.epyt-gallery-notitle{padding:4px}.epyt-gallery-notitle span{display:none}.epyt-gallery-rowtitle{text-align:center;width:100%;position:absolute;left:0;top:100%;opacity:0;z-index:10;overflow-x:hidden;text-overflow:ellipsis;white-space:nowrap}.epyt-gallery-rowtitle.hover{opacity:1;transition:opacity linear .2s}.epyt-gallery-rowbreak{clear:both}.epyt-pagination{clear:both;text-align:center;padding:10px 8px 10px 8px}.epyt-pagination.epyt-hide-pagination *{display:none!important}.epyt-pagination>div,.epyt-pagenumbers>div{display:inline-block;padding:0 2px 0 2px;vertical-align:middle}.epyt-pagination .epyt-pagebutton{cursor:pointer;display:inline-block;padding:0 10px 0 10px}.epyt-pagebutton>div{display:inline}.epyt-pagination .epyt-loader{display:none}.epyt-gallery-list.epyt-loading .epyt-pagination .epyt-loader{display:inline-block}body .lity-container{width:100%;max-width:964px}.epyt-curtain .lity-opened iframe{opacity:0;transition:opacity .3s linear .5s}.epyt-gallery-allthumbs.epyt-cols-1 .epyt-gallery-thumb{width:100%}.epyt-gallery-allthumbs.epyt-cols-2 .epyt-gallery-thumb{width:50%}.epyt-gallery-allthumbs.epyt-cols-3 .epyt-gallery-thumb{width:33.333%}.epyt-gallery-allthumbs.epyt-cols-4 .epyt-gallery-thumb{width:25%}.epyt-gallery-allthumbs.epyt-cols-5 .epyt-gallery-thumb{width:20%}.epyt-gallery-allthumbs.epyt-cols-6 .epyt-gallery-thumb{width:16.666%}.epyt-gallery-allthumbs.epyt-cols-7 .epyt-gallery-thumb{width:14.285%}.epyt-gallery-allthumbs.epyt-cols-8 .epyt-gallery-thumb{width:12.5%}.epyt-gallery-allthumbs.epyt-cols-9 .epyt-gallery-thumb{width:11.111%}.epyt-gallery-allthumbs.epyt-cols-10 .epyt-gallery-thumb{width:10%}.epyt-gallery-allthumbs.epyt-cols-11 .epyt-gallery-thumb{width:9.090%}.epyt-gallery-allthumbs.epyt-cols-12 .epyt-gallery-thumb{width:8.333%}.epyt-gallery-allthumbs.epyt-cols-13 .epyt-gallery-thumb{width:7.692%}.epyt-gallery-allthumbs.epyt-cols-14 .epyt-gallery-thumb{width:7.142%}.epyt-gallery-allthumbs.epyt-cols-15 .epyt-gallery-thumb{width:6.666%}.epyt-gallery-allthumbs.epyt-cols-16 .epyt-gallery-thumb{width:6.25%}.epyt-gallery-allthumbs.epyt-cols-17 .epyt-gallery-thumb{width:5.882%}.epyt-gallery-allthumbs.epyt-cols-18 .epyt-gallery-thumb{width:5.555%}.epyt-gallery-allthumbs.epyt-cols-19 .epyt-gallery-thumb{width:5.263%}.epyt-gallery-allthumbs.epyt-cols-20 .epyt-gallery-thumb{width:5%}.epyt-pagebutton.hide,.epyt-pagenumbers.hide{display:none!important;opacity:0!important;visibility:hidden!important}.epyt-gallery-subscribe{text-align:center;padding:15px 0 10px 0;clear:both}.epyt-gallery-subscribe a.epyt-gallery-subbutton,.epyt-gallery-subscribe a.epyt-gallery-subbutton:hover{display:inline-block;padding:5px 10px;background-color:#e62117!important;color:#fff!important;text-decoration:none!important;border-radius:3px}.epyt-gallery-subscribe a.epyt-gallery-subbutton img{width:20px!important;height:auto!important;vertical-align:middle!important;padding:0 6px 3px 0;display:inline-block;background:transparent;-webkit-box-shadow:none;box-shadow:none}body div.__youtube_prefs__.__youtube_prefs_gdpr__{background-color:#000;background-image:-webkit-linear-gradient(top,#000,#444);background-image:linear-gradient(to bottom,#000,#444);padding:25px;height:auto;text-align:left}body div.__youtube_prefs__.__youtube_prefs_gdpr__ *{color:#e3e3e3!important}body div.__youtube_prefs__.__youtube_prefs_gdpr__ a{text-decoration:underline}body div.__youtube_prefs__.__youtube_prefs_gdpr__ button.__youtube_prefs_gdpr__,body div.__youtube_prefs__.__youtube_prefs_gdpr__ button.__youtube_prefs_gdpr__:hover{display:inline-block;padding:5px 10px;background:#e62117!important;color:#fff!important;text-decoration:none!important;border-radius:3px;font-weight:normal;border-width:0;box-sizing:border-box}body div.__youtube_prefs__.__youtube_prefs_gdpr__ button.__youtube_prefs_gdpr__ img{width:20px!important;height:auto!important;vertical-align:middle!important;padding:0 6px 3px 0;display:inline-block;background:transparent;-webkit-box-shadow:none;box-shadow:none;margin-left:8px}body .epyt-gallery-img-gdpr{background-color:#000;background-image:-webkit-linear-gradient(top,#000,#444);background-image:linear-gradient(to bottom,#000,#444)}.ytvi-story-container{display:block;max-width:100%}
styles/ytvi-admin.css CHANGED
@@ -14,7 +14,7 @@ sup.orange {text-transform: lowercase; font-weight: bold; color: #f85d00;}
14
  top: 0;
15
  left: 0;
16
  z-index: 100;
17
- background-color: rgba(241, 241, 241, .93);
18
  text-align: center;
19
  }
20
 
@@ -50,6 +50,7 @@ sup.orange {text-transform: lowercase; font-weight: bold; color: #f85d00;}
50
  .vi-cover-prompt h1 {
51
  text-align: center;
52
  margin-top: 50px;
 
53
  }
54
 
55
  .ytvi-wrap * {
@@ -136,6 +137,7 @@ sup.orange {text-transform: lowercase; font-weight: bold; color: #f85d00;}
136
  background-color: #d8ebf3;
137
  border: 1px solid #d0d0d0;
138
  margin: 0 26px;
 
139
  }
140
 
141
  .ytvi-login-success, .ytvi-login-complete {
@@ -351,15 +353,42 @@ p.submit em {display: inline-block; padding-left: 20px; vertical-align: middle;
351
  color: #de1515;
352
  }
353
 
 
 
 
 
 
 
 
354
  a.button-primary.ytvi-btn-inactive, a.button-primary.ytvi-btn-inactive:hover {
355
- background: #de1515;
356
- border-color: #a22222;
357
- box-shadow: 0 1px 0 #a22222;
358
- text-shadow: 0 -1px 1px #a22222, 1px 0 1px #a22222, 0 1px 1px #a22222, -1px 0 1px #a22222;
 
359
  }
360
 
361
- a.button-primary.ytvi-btn-inactive:hover {
362
- background: #e51f1f;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
363
  }
364
 
365
 
@@ -472,13 +501,26 @@ h2 .vi-num {
472
 
473
  .vi-story-demo--screen span {
474
  color: #cccccc;
475
- position: absolute;
476
  width: 100%;
477
  text-align: center;
478
  font-size: 20px;
 
479
  top: 50%;
 
 
 
480
  font-style: italic;
481
  }
 
 
 
 
 
 
 
 
 
 
482
 
483
  .vi-story-demo--info {
484
  padding: 8px;
@@ -527,15 +569,33 @@ h2 .vi-num {
527
  color: #00a000;
528
  font-weight: bold;
529
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
530
  .nav-tab-valid:after {
531
  content: url('../images/adstxt-valid.png');
532
  }
533
 
534
  .nav-tab-invalid, .nav-tab-invalid:focus {
535
- color: #cc0000;
536
  }
537
  .nav-tab-invalid:after {
538
- content: url('../images/adstxt-invalid.png');
539
  }
540
 
541
 
14
  top: 0;
15
  left: 0;
16
  z-index: 100;
17
+ background-color: rgba(241, 241, 241, .88);
18
  text-align: center;
19
  }
20
 
50
  .vi-cover-prompt h1 {
51
  text-align: center;
52
  margin-top: 50px;
53
+ text-shadow: 0px 0px 14px #ffffff;
54
  }
55
 
56
  .ytvi-wrap * {
137
  background-color: #d8ebf3;
138
  border: 1px solid #d0d0d0;
139
  margin: 0 26px;
140
+ padding: 10px;
141
  }
142
 
143
  .ytvi-login-success, .ytvi-login-complete {
353
  color: #de1515;
354
  }
355
 
356
+ button.button-primary.ytvi-btn-toggle {
357
+ float: right;
358
+ position: relative;
359
+ }
360
+
361
+ button.button-primary.ytvi-btn-inactive, button.button-primary.ytvi-btn-inactive:hover,
362
+ .wp-core-ui button.button-primary.ytvi-btn-inactive[disabled], .wp-core-ui button.button-primary.ytvi-btn-inactive:disabled,
363
  a.button-primary.ytvi-btn-inactive, a.button-primary.ytvi-btn-inactive:hover {
364
+ background: #e51f1f !important;
365
+ border-color: #a22222 !important;
366
+ box-shadow: 0 1px 0 #a22222 !important;
367
+ text-shadow: 0 -1px 1px #a22222, 1px 0 1px #a22222, 0 1px 1px #a22222, -1px 0 1px #a22222 !important;
368
+ color: #ffffff !important;
369
  }
370
 
371
+ .wp-core-ui button.button-primary.ytvi-btn-inactive[disabled]:hover {
372
+ background: rgba(229, 31,31, .5) !important;
373
+ }
374
+
375
+ button.button-primary.ytvi-btn-toggle .ytvi-notyet {
376
+ display: none; position: absolute; background: white; width: 540px; height: auto; top: 25px;
377
+ padding: 15px 20px;
378
+ border-radius: 10px;
379
+ box-shadow: 5px 5px 10px 0 rgba(0,0,0,.2);
380
+ right: 0;
381
+ text-align: left;
382
+ color: #333333 !important;
383
+ box-sizing: border-box;
384
+ text-shadow: none !important;
385
+ white-space: normal;
386
+ border-top-right-radius: 0;
387
+ z-index: 100;
388
+ }
389
+
390
+ button.button-primary.ytvi-btn-toggle:hover .ytvi-notyet {
391
+ display: block;
392
  }
393
 
394
 
501
 
502
  .vi-story-demo--screen span {
503
  color: #cccccc;
 
504
  width: 100%;
505
  text-align: center;
506
  font-size: 20px;
507
+ position: absolute;
508
  top: 50%;
509
+ -webkit-transform: translateY(-50%);
510
+ -ms-transform: translateY(-50%);
511
+ transform: translateY(-50%);
512
  font-style: italic;
513
  }
514
+ .vi-story-demo--screen span small {
515
+ background: #dddddd;
516
+ border-radius: 5px;
517
+ display: inline-block;
518
+ padding: 5px 10px;
519
+ box-sizing: border-box;
520
+ color: #333333;
521
+ max-width: 90%;
522
+ }
523
+
524
 
525
  .vi-story-demo--info {
526
  padding: 8px;
569
  color: #00a000;
570
  font-weight: bold;
571
  }
572
+
573
+ .adstxt-help {
574
+ float: right;
575
+ background-color: rgba(0,0,0,0.07);
576
+ width: 390px;
577
+ margin: 0 0 20px 10px;
578
+ border-radius: 20px;
579
+ box-sizing: border-box;
580
+ padding: 20px 35px;
581
+ }
582
+
583
+ .adstxt-help img {
584
+ width: 50px;
585
+ height: auto;
586
+ display: block;
587
+ float: left;
588
+ }
589
+
590
  .nav-tab-valid:after {
591
  content: url('../images/adstxt-valid.png');
592
  }
593
 
594
  .nav-tab-invalid, .nav-tab-invalid:focus {
595
+
596
  }
597
  .nav-tab-invalid:after {
598
+ content: url('../images/adstxt-warning.png');
599
  }
600
 
601
 
styles/ytvi-admin.min.css CHANGED
@@ -1,2 +1,2 @@
1
 
2
- .clearboth{clear:both}sup.orange{text-transform:lowercase;font-weight:bold;color:#f85d00}.align-middle{vertical-align:middle!important}.vi-registration-box{position:relative}.vi-cover-prompt{position:absolute;width:100%;height:100%;top:0;left:0;z-index:100;background-color:rgba(241,241,241,.93);text-align:center}.vi-cover-prompt::before{content:"";display:none;z-index:10000;position:absolute;width:100%;height:100%;margin:0;padding:0;-webkit-filter:url(#viblurfilter);-moz-filter:url(#viblurfilter);-o-filter:url(#viblurfilter);-ms-filter:url(#viblurfilter);filter:url(#viblurfilter)}.vi-cover-prompt-buttons button.button-primary,.vi-cover-prompt-buttons button.button-secondary{display:inline-block;margin:0 5px}.viblurfilter-svg{width:0;height:0;margin:0;padding:0;border:0}.vi-cover-prompt h1{text-align:center;margin-top:50px}.ytvi-wrap *{box-sizing:border-box}.ytvi-wrap .center{text-align:center}.ytvi-wrap input.regular-text{width:100%}.ytvi-step-1,.ytvi-step-2{text-align:left}.ytvi-step-1{width:auto;padding:0;max-width:870px;margin:0 auto}.ytvi-step-1 .button-primary{font-size:16px}.ytvi-step-1--form,.ytvi-login-success,.ytvi-step-2-loading,.ytvi-login-loading,.ytvi-login-complete{background:#fff;border:solid 1px #e5e5e5;padding:15px 0;width:100%;margin:30px auto}.ytvi-step-1--form .side-signup{width:49.5%;float:left;border-right:1px solid #ccc;padding:0 40px}.ytvi-step-1--form .side-login{width:49.5%;float:right;padding:0 40px 0 30px}.ytvi-step-1--form .side-login h2,.ytvi-step-1--form .side-signup h2{font-size:1.15em}.wrap .ytvi-step-1--form h2{margin:10px 0 15px 0;font-weight:normal}.ytvi-step-2-loading,.ytvi-step-2,.ytvi-login-loading,.ytvi-login-success{display:none}.ytvi-loading--message{text-align:center;font-size:16px}.ytvi-step-2 .ytvi-registration{max-width:870px;margin:0 auto}.ytvi-step-2 .ytvi-registration iframe{border-width:0;padding:0;margin:0 auto;width:100%;height:575px;display:block}.ytvi-step-2-msg{background-color:#d8ebf3;border:1px solid #d0d0d0;margin:0 26px}.ytvi-login-success,.ytvi-login-complete{max-width:100%;text-align:center;padding:25px 40px}.vi-adstxt-diff{text-align:left}.vi-adstxt-diff p{font-style:italic}.vi-adstxt-diff code,.adstxt-verify-message code,code.adstxt-block{white-space:pre;display:block;overflow:auto;margin:25px 0}section.pattern h2{background-color:rgba(255,255,255,0);transition:background-color 2s ease-out 0s}section.pattern h2.ytvi-hash-scroll{background-color:rgba(255,255,255,1);transition:background-color 0s}h3.sect{transition:background-color 2s ease-out 0s}h3.sect.ytvi-hash-scroll{background-color:rgba(255,255,255,1);transition:background-color 0s}.vi-forgot-pw{display:inline-block;float:right;padding-top:5px}.vi-contact-support{margin-top:30px;clear:left;padding-top:20px}.vi-logo-text{height:1.2em;width:auto;vertical-align:text-bottom}.vi-demo{max-width:1360px;margin:0 auto}p.vi-demo-lede,#ytform p.vi-demo-lede{font-size:17px;line-height:1.5}.wrap-vi-settings-pre p.vi-demo-lede{padding-top:.75em}.vi-demo-col-phone{float:right;width:330px;clear:right}.vi-demo-col-content{width:calc(100% - 340px)}.vi-demo-mobile{margin:0 auto;width:300px;background:transparent url(../images/vi-mobile-phone.png) no-repeat scroll;background-size:cover}.vi-demo-mobile-caption-list{position:relative;min-height:115px}.vi-demo-mobile-caption{font-style:italic;margin:0 10px;position:absolute;top:0;left:0;opacity:1;transition:ease-in-out opacity 3s}.vi-demo-mobile-ratio{position:relative;width:100%;height:0;padding-bottom:175.89%}.vi-demo-mobile-bg{position:absolute;top:0;left:0;width:100%;height:100%}.vi-demo-screen{position:absolute;top:5.5%;left:12%;width:76%;height:auto;z-index:1;opacity:1;transition:ease-in-out opacity 4s}.vi-demo-screen.demo-hide,.vi-demo-mobile-caption.demo-hide{opacity:0;transition:ease-in-out opacity 3s}.vi-demo-screen-2{z-index:2}p.vi-ad-source-row{text-align:center;margin-top:20px}.vi-ad-source-row img{vertical-align:middle;display:inline-block;margin-bottom:13px;padding:0 13px 0 13px;max-height:20px;height:auto;width:auto}.login-expire{background-color:#d8ebf3;border:1px solid #d0d0d0;padding:25px}.wrap-vi{max-width:1064px;margin-bottom:100px}.wrap-vi h1 .yt-admin-icon{width:16px;height:16px}.wrap-vi h1 a.button-primary,.wrap-vi h1 a.button-secondary,.wrap-ytprefs h2 a.button-primary,.wrap-ytprefs h2 a.button-secondary{float:right;margin-left:15px}.wrap-vi section{margin-left:20px;display:none;padding-top:15px}.wrap-vi th label{display:block}.wrap-vi th small{font-weight:normal;font-style:italic}.wrap-vi h2.nav-tab-wrapper{margin:22px 0 0 0}.wrap-vi section#jumphowitworks{display:block}.wrap-vi .no-js section{display:block}.wrap-vi h2{margin-bottom:30px;margin-left:0}.wrap-vi h3{font-size:1.2em;font-style:italic}.save-changes-follow{position:fixed;z-index:10000;bottom:0;right:0;background-color:#fff;padding:0 20px;border-top-left-radius:20px;border:2px solid #aaa;border-right-width:0;border-bottom-width:0;-webkit-box-shadow:0 0 10px 0 rgba(0,0,0,0.75);-moz-box-shadow:0 0 10px 0 rgba(0,0,0,0.75);box-shadow:0 0 10px 0 rgba(0,0,0,0.75)}.button-primary{white-space:nowrap}p.submit{margin:0;padding:15px 0 10px 0}.wp-core-ui p.submit .button-primary{font-weight:bold;font-size:21px;height:50px;padding:0 20px 1px;background:#2ea2cc;background:-moz-linear-gradient(top,#2ea2cc 0,#007396 98%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0%,#2ea2cc),color-stop(98%,#007396));background:-webkit-linear-gradient(top,#2ea2cc 0,#007396 98%);background:-o-linear-gradient(top,#2ea2cc 0,#007396 98%);background:-ms-linear-gradient(top,#2ea2cc 0,#007396 98%);background:linear-gradient(to bottom,#2ea2cc 0,#007396 98%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#2ea2cc',endColorstr='#007396',GradientType=0)}p.submit em{display:inline-block;padding-left:20px;vertical-align:middle;width:240px;margin-top:-6px}.vi-red{color:#de1515}a.button-primary.ytvi-btn-inactive,a.button-primary.ytvi-btn-inactive:hover{background:#de1515;border-color:#a22222;box-shadow:0 1px 0 #a22222;text-shadow:0 -1px 1px #a22222,1px 0 1px #a22222,0 1px 1px #a22222,-1px 0 1px #a22222}a.button-primary.ytvi-btn-inactive:hover{background:#e51f1f}.iab-cat-parent{margin-right:15px;display:inline-block}.iab-cat-child-box{display:inline-block}.iab-cat-child-box.hidden{opacity:.3}.iab-cat-child option.hidden{display:none}.wp-picker-container.wp-picker-active .wp-color-result-text{font-weight:bold}ul.list-ul{margin:15px 30px}ul.list-ul li{list-style-type:disc}.alertify .ajs-dialog{max-width:600px}.alertify .ajs-body .ajs-content{line-height:2em}.alertify .ajs-body .ajs-content code{white-space:pre;display:block;overflow:auto;line-height:1.4em;margin:1em auto}.ajs-button{cursor:pointer}.ss-vi-img{max-width:700px;height:auto}.ss-vi-wizbutton{max-width:100%;height:auto}.vi-how-works{margin-bottom:40px;position:relative;margin-left:10px}.vi-how-works::before{clear:both}.vi-how-works p{line-height:1}.vi-how-works img{width:50px;height:50px;float:left;margin-right:15px;transition:ease-in-out transform,opacity .1s;opacity:.5}.vi-how-works:hover img{transform:scale(1.1);opacity:1;transition:ease-in-out transform,opacity .2s}.vi-how-works h3{margin-bottom:0}.vi-how-works .vi-num{position:absolute;left:-20px;font-size:22px;font-weight:bold;color:#000;opacity:.2;font-style:italic;transition:ease-in-out transform,opacity .1s}.vi-how-works:hover .vi-num{transform:scale(1.1);opacity:1;transition:ease-in-out transform,opacity .2s}h2 .vi-num{font-style:italic;opacity:.5}.form-table.form-table--vi-appearance{width:100%}.form-table td{vertical-align:top}.vi-story-demo{width:65%;position:relative;margin:20px auto}.vi-story-demo--box{border:solid 1px #e3e3e3}.vi-story-demo--screen{width:100%;padding-top:57%;background-color:#888;position:relative}.vi-story-demo--screen span{color:#ccc;position:absolute;width:100%;text-align:center;font-size:20px;top:50%;font-style:italic}.vi-story-demo--info{padding:8px}.vi-story-demo--featured{height:20px;font-size:9px;text-align:right;margin-top:8px;text-transform:uppercase;line-height:20px;font-family:Verdana,sans-serif}.vi-story-demo--title{font-weight:bold;line-height:1.33}.vi-story-demo--featured span{opacity:.5}.vi-story-demo--box .vi-story-demo--featured img{width:20px;height:20px;vertical-align:middle;margin:-4px 0 0 5px}@media(min-width:768px){.form-table.form-table--vi-appearance{width:53%;float:left;clear:left}.vi-story-demo{float:right;width:44%;position:relative}}.nav-tab-valid,.nav-tab-valid:focus,.adstxt-verify-message-valid{color:#00a000;font-weight:bold}.nav-tab-valid:after{content:url('../images/adstxt-valid.png')}.nav-tab-invalid,.nav-tab-invalid:focus{color:#c00}.nav-tab-invalid:after{content:url('../images/adstxt-invalid.png')}.nav-tab-loading:after{content:url('../images/ajax-loader.gif')}.vi-report-error.hide,.vi-report.hide{display:none}.vi-report,.vi-report-error{text-align:center}.vi-total-earnings,.vi-total-earnings-error{float:left;width:25%;margin-top:60px;color:#1193aa}.vi-report-graph,.vi-report-graph-error{float:right;width:75%}.vi-report-canvas-box,.vi-report-canvas-box-error{height:300px;width:100%}.vi-total-earnings-num,.vi-total-earnings-num-error{margin-top:20px;font-weight:bold;font-size:3.7vw;line-height:3.7vw}.vi-total-earnings-num-error,.vi-report-canvas-box-error{color:#ccc;font-weight:normal;font-size:45px;line-height:45px}.vi-report-canvas-box-error{background-size:10% 10%;background-image:linear-gradient(to right,#ddd 1px,transparent 1px),linear-gradient(to bottom,#ddd 1px,transparent 1px)}@media(min-width:1280px){.vi-total-earnings-num,.vi-total-earnings-num-error{font-size:45px;line-height:45px}}
1
 
2
+ .clearboth{clear:both}sup.orange{text-transform:lowercase;font-weight:bold;color:#f85d00}.align-middle{vertical-align:middle!important}.vi-registration-box{position:relative}.vi-cover-prompt{position:absolute;width:100%;height:100%;top:0;left:0;z-index:100;background-color:rgba(241,241,241,.88);text-align:center}.vi-cover-prompt::before{content:"";display:none;z-index:10000;position:absolute;width:100%;height:100%;margin:0;padding:0;-webkit-filter:url(#viblurfilter);-moz-filter:url(#viblurfilter);-o-filter:url(#viblurfilter);-ms-filter:url(#viblurfilter);filter:url(#viblurfilter)}.vi-cover-prompt-buttons button.button-primary,.vi-cover-prompt-buttons button.button-secondary{display:inline-block;margin:0 5px}.viblurfilter-svg{width:0;height:0;margin:0;padding:0;border:0}.vi-cover-prompt h1{text-align:center;margin-top:50px;text-shadow:0 0 14px #fff}.ytvi-wrap *{box-sizing:border-box}.ytvi-wrap .center{text-align:center}.ytvi-wrap input.regular-text{width:100%}.ytvi-step-1,.ytvi-step-2{text-align:left}.ytvi-step-1{width:auto;padding:0;max-width:870px;margin:0 auto}.ytvi-step-1 .button-primary{font-size:16px}.ytvi-step-1--form,.ytvi-login-success,.ytvi-step-2-loading,.ytvi-login-loading,.ytvi-login-complete{background:#fff;border:solid 1px #e5e5e5;padding:15px 0;width:100%;margin:30px auto}.ytvi-step-1--form .side-signup{width:49.5%;float:left;border-right:1px solid #ccc;padding:0 40px}.ytvi-step-1--form .side-login{width:49.5%;float:right;padding:0 40px 0 30px}.ytvi-step-1--form .side-login h2,.ytvi-step-1--form .side-signup h2{font-size:1.15em}.wrap .ytvi-step-1--form h2{margin:10px 0 15px 0;font-weight:normal}.ytvi-step-2-loading,.ytvi-step-2,.ytvi-login-loading,.ytvi-login-success{display:none}.ytvi-loading--message{text-align:center;font-size:16px}.ytvi-step-2 .ytvi-registration{max-width:870px;margin:0 auto}.ytvi-step-2 .ytvi-registration iframe{border-width:0;padding:0;margin:0 auto;width:100%;height:575px;display:block}.ytvi-step-2-msg{background-color:#d8ebf3;border:1px solid #d0d0d0;margin:0 26px;padding:10px}.ytvi-login-success,.ytvi-login-complete{max-width:100%;text-align:center;padding:25px 40px}.vi-adstxt-diff{text-align:left}.vi-adstxt-diff p{font-style:italic}.vi-adstxt-diff code,.adstxt-verify-message code,code.adstxt-block{white-space:pre;display:block;overflow:auto;margin:25px 0}section.pattern h2{background-color:rgba(255,255,255,0);transition:background-color 2s ease-out 0s}section.pattern h2.ytvi-hash-scroll{background-color:rgba(255,255,255,1);transition:background-color 0s}h3.sect{transition:background-color 2s ease-out 0s}h3.sect.ytvi-hash-scroll{background-color:rgba(255,255,255,1);transition:background-color 0s}.vi-forgot-pw{display:inline-block;float:right;padding-top:5px}.vi-contact-support{margin-top:30px;clear:left;padding-top:20px}.vi-logo-text{height:1.2em;width:auto;vertical-align:text-bottom}.vi-demo{max-width:1360px;margin:0 auto}p.vi-demo-lede,#ytform p.vi-demo-lede{font-size:17px;line-height:1.5}.wrap-vi-settings-pre p.vi-demo-lede{padding-top:.75em}.vi-demo-col-phone{float:right;width:330px;clear:right}.vi-demo-col-content{width:calc(100% - 340px)}.vi-demo-mobile{margin:0 auto;width:300px;background:transparent url(../images/vi-mobile-phone.png) no-repeat scroll;background-size:cover}.vi-demo-mobile-caption-list{position:relative;min-height:115px}.vi-demo-mobile-caption{font-style:italic;margin:0 10px;position:absolute;top:0;left:0;opacity:1;transition:ease-in-out opacity 3s}.vi-demo-mobile-ratio{position:relative;width:100%;height:0;padding-bottom:175.89%}.vi-demo-mobile-bg{position:absolute;top:0;left:0;width:100%;height:100%}.vi-demo-screen{position:absolute;top:5.5%;left:12%;width:76%;height:auto;z-index:1;opacity:1;transition:ease-in-out opacity 4s}.vi-demo-screen.demo-hide,.vi-demo-mobile-caption.demo-hide{opacity:0;transition:ease-in-out opacity 3s}.vi-demo-screen-2{z-index:2}p.vi-ad-source-row{text-align:center;margin-top:20px}.vi-ad-source-row img{vertical-align:middle;display:inline-block;margin-bottom:13px;padding:0 13px 0 13px;max-height:20px;height:auto;width:auto}.login-expire{background-color:#d8ebf3;border:1px solid #d0d0d0;padding:25px}.wrap-vi{max-width:1064px;margin-bottom:100px}.wrap-vi h1 .yt-admin-icon{width:16px;height:16px}.wrap-vi h1 a.button-primary,.wrap-vi h1 a.button-secondary,.wrap-ytprefs h2 a.button-primary,.wrap-ytprefs h2 a.button-secondary{float:right;margin-left:15px}.wrap-vi section{margin-left:20px;display:none;padding-top:15px}.wrap-vi th label{display:block}.wrap-vi th small{font-weight:normal;font-style:italic}.wrap-vi h2.nav-tab-wrapper{margin:22px 0 0 0}.wrap-vi section#jumphowitworks{display:block}.wrap-vi .no-js section{display:block}.wrap-vi h2{margin-bottom:30px;margin-left:0}.wrap-vi h3{font-size:1.2em;font-style:italic}.save-changes-follow{position:fixed;z-index:10000;bottom:0;right:0;background-color:#fff;padding:0 20px;border-top-left-radius:20px;border:2px solid #aaa;border-right-width:0;border-bottom-width:0;-webkit-box-shadow:0 0 10px 0 rgba(0,0,0,0.75);-moz-box-shadow:0 0 10px 0 rgba(0,0,0,0.75);box-shadow:0 0 10px 0 rgba(0,0,0,0.75)}.button-primary{white-space:nowrap}p.submit{margin:0;padding:15px 0 10px 0}.wp-core-ui p.submit .button-primary{font-weight:bold;font-size:21px;height:50px;padding:0 20px 1px;background:#2ea2cc;background:-moz-linear-gradient(top,#2ea2cc 0,#007396 98%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0%,#2ea2cc),color-stop(98%,#007396));background:-webkit-linear-gradient(top,#2ea2cc 0,#007396 98%);background:-o-linear-gradient(top,#2ea2cc 0,#007396 98%);background:-ms-linear-gradient(top,#2ea2cc 0,#007396 98%);background:linear-gradient(to bottom,#2ea2cc 0,#007396 98%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#2ea2cc',endColorstr='#007396',GradientType=0)}p.submit em{display:inline-block;padding-left:20px;vertical-align:middle;width:240px;margin-top:-6px}.vi-red{color:#de1515}button.button-primary.ytvi-btn-toggle{float:right;position:relative}button.button-primary.ytvi-btn-inactive,button.button-primary.ytvi-btn-inactive:hover,.wp-core-ui button.button-primary.ytvi-btn-inactive[disabled],.wp-core-ui button.button-primary.ytvi-btn-inactive:disabled,a.button-primary.ytvi-btn-inactive,a.button-primary.ytvi-btn-inactive:hover{background:#e51f1f!important;border-color:#a22222!important;box-shadow:0 1px 0 #a22222!important;text-shadow:0 -1px 1px #a22222,1px 0 1px #a22222,0 1px 1px #a22222,-1px 0 1px #a22222!important;color:#fff!important}.wp-core-ui button.button-primary.ytvi-btn-inactive[disabled]:hover{background:rgba(229,31,31,.5)!important}button.button-primary.ytvi-btn-toggle .ytvi-notyet{display:none;position:absolute;background:white;width:540px;height:auto;top:25px;padding:15px 20px;border-radius:10px;box-shadow:5px 5px 10px 0 rgba(0,0,0,.2);right:0;text-align:left;color:#333!important;box-sizing:border-box;text-shadow:none!important;white-space:normal;border-top-right-radius:0;z-index:100}button.button-primary.ytvi-btn-toggle:hover .ytvi-notyet{display:block}.iab-cat-parent{margin-right:15px;display:inline-block}.iab-cat-child-box{display:inline-block}.iab-cat-child-box.hidden{opacity:.3}.iab-cat-child option.hidden{display:none}.wp-picker-container.wp-picker-active .wp-color-result-text{font-weight:bold}ul.list-ul{margin:15px 30px}ul.list-ul li{list-style-type:disc}.alertify .ajs-dialog{max-width:600px}.alertify .ajs-body .ajs-content{line-height:2em}.alertify .ajs-body .ajs-content code{white-space:pre;display:block;overflow:auto;line-height:1.4em;margin:1em auto}.ajs-button{cursor:pointer}.ss-vi-img{max-width:700px;height:auto}.ss-vi-wizbutton{max-width:100%;height:auto}.vi-how-works{margin-bottom:40px;position:relative;margin-left:10px}.vi-how-works::before{clear:both}.vi-how-works p{line-height:1}.vi-how-works img{width:50px;height:50px;float:left;margin-right:15px;transition:ease-in-out transform,opacity .1s;opacity:.5}.vi-how-works:hover img{transform:scale(1.1);opacity:1;transition:ease-in-out transform,opacity .2s}.vi-how-works h3{margin-bottom:0}.vi-how-works .vi-num{position:absolute;left:-20px;font-size:22px;font-weight:bold;color:#000;opacity:.2;font-style:italic;transition:ease-in-out transform,opacity .1s}.vi-how-works:hover .vi-num{transform:scale(1.1);opacity:1;transition:ease-in-out transform,opacity .2s}h2 .vi-num{font-style:italic;opacity:.5}.form-table.form-table--vi-appearance{width:100%}.form-table td{vertical-align:top}.vi-story-demo{width:65%;position:relative;margin:20px auto}.vi-story-demo--box{border:solid 1px #e3e3e3}.vi-story-demo--screen{width:100%;padding-top:57%;background-color:#888;position:relative}.vi-story-demo--screen span{color:#ccc;width:100%;text-align:center;font-size:20px;position:absolute;top:50%;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);font-style:italic}.vi-story-demo--screen span small{background:#ddd;border-radius:5px;display:inline-block;padding:5px 10px;box-sizing:border-box;color:#333;max-width:90%}.vi-story-demo--info{padding:8px}.vi-story-demo--featured{height:20px;font-size:9px;text-align:right;margin-top:8px;text-transform:uppercase;line-height:20px;font-family:Verdana,sans-serif}.vi-story-demo--title{font-weight:bold;line-height:1.33}.vi-story-demo--featured span{opacity:.5}.vi-story-demo--box .vi-story-demo--featured img{width:20px;height:20px;vertical-align:middle;margin:-4px 0 0 5px}@media(min-width:768px){.form-table.form-table--vi-appearance{width:53%;float:left;clear:left}.vi-story-demo{float:right;width:44%;position:relative}}.nav-tab-valid,.nav-tab-valid:focus,.adstxt-verify-message-valid{color:#00a000;font-weight:bold}.adstxt-help{float:right;background-color:rgba(0,0,0,0.07);width:390px;margin:0 0 20px 10px;border-radius:20px;box-sizing:border-box;padding:20px 35px}.adstxt-help img{width:50px;height:auto;display:block;float:left}.nav-tab-valid:after{content:url('../images/adstxt-valid.png')}.nav-tab-invalid:after{content:url('../images/adstxt-warning.png')}.nav-tab-loading:after{content:url('../images/ajax-loader.gif')}.vi-report-error.hide,.vi-report.hide{display:none}.vi-report,.vi-report-error{text-align:center}.vi-total-earnings,.vi-total-earnings-error{float:left;width:25%;margin-top:60px;color:#1193aa}.vi-report-graph,.vi-report-graph-error{float:right;width:75%}.vi-report-canvas-box,.vi-report-canvas-box-error{height:300px;width:100%}.vi-total-earnings-num,.vi-total-earnings-num-error{margin-top:20px;font-weight:bold;font-size:3.7vw;line-height:3.7vw}.vi-total-earnings-num-error,.vi-report-canvas-box-error{color:#ccc;font-weight:normal;font-size:45px;line-height:45px}.vi-report-canvas-box-error{background-size:10% 10%;background-image:linear-gradient(to right,#ddd 1px,transparent 1px),linear-gradient(to bottom,#ddd 1px,transparent 1px)}@media(min-width:1280px){.vi-total-earnings-num,.vi-total-earnings-num-error{font-size:45px;line-height:45px}}
youtube.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: YouTube
4
  Plugin URI: https://www.embedplus.com/dashboard/pro-easy-video-analytics.aspx?ref=plugin
5
  Description: YouTube Embed and YouTube Gallery WordPress Plugin. Embed a responsive video, YouTube channel, playlist gallery, or live stream
6
- Version: 13.0
7
  Author: EmbedPlus Team
8
  Author URI: https://www.embedplus.com
9
  */
@@ -34,7 +34,7 @@ class YouTubePrefs
34
 
35
  public static $folder_name = 'youtube-embed-plus';
36
  public static $curltimeout = 30;
37
- public static $version = '13.0';
38
  public static $opt_version = 'version';
39
  public static $optembedwidth = null;
40
  public static $optembedheight = null;
@@ -225,7 +225,7 @@ class YouTubePrefs
225
  self::do_ytprefs();
226
  add_action('admin_menu', array(get_class(), 'ytprefs_plugin_menu'));
227
  add_filter('plugin_action_links_' . plugin_basename(__FILE__), array(get_class(), 'my_plugin_action_links'));
228
-
229
  if (!is_admin())
230
  {
231
  if (self::$alloptions[self::$opt_old_script_method] == 1)
@@ -2860,16 +2860,15 @@ class YouTubePrefs
2860
  $new_pointer_content = '<h3>' . __('New Update') . '</h3>'; // ooopointer
2861
 
2862
  $new_pointer_content .= '<p>'; // ooopointer
2863
- if (!(self::$alloptions[self::$opt_pro] && strlen(trim(self::$alloptions[self::$opt_pro])) > 0))
2864
- {
2865
- $new_pointer_content .= "This update is compatible with the WordPress 5.0 Gutenberg block editor, for embedding YouTube videos, galleries, and livestreams in both Free and <a target=_blank href=" . self::$epbase . '/dashboard/pro-easy-video-analytics.aspx?ref=frompointer' . ">Pro versions &raquo;</a> This update also stays backwards-compatible with the classic editor.";
2866
- //$new_pointer_content .= "This version fixes a couple gallery bugs and improves ads.txt management for the monetization feature. <a rel=\"#jumpmonetize\" class=\"epyt-jumptab\" href=\"" . admin_url('admin.php?page=youtube-my-preferences#jumpmonetize') . "\">Login here to see &raquo;</a></li></ul>";
2867
- }
2868
- else
2869
  {
2870
- $new_pointer_content .= "This update is compatible with the WordPress 5.0 Gutenberg block editor, for embedding YouTube videos, galleries, and livestreams in both Free and <a target=_blank href=" . self::$epbase . '/dashboard/pro-easy-video-analytics.aspx?ref=frompointer' . ">Pro versions &raquo;</a> This update also stays backwards-compatible with the classic editor.";
2871
  $new_pointer_content .= ' <strong>Important message to YouTube Pro users</strong>: From version 11.7 onward, you must <a href="https://www.embedplus.com/youtube-pro/download/?prokey=' . esc_attr(self::$alloptions[self::$opt_pro]) . '" target="_blank">download the separate plugin here</a> to regain your Pro features. All your settings will automatically migrate after installing the separate Pro download. Thank you for your support and patience during this transition.';
2872
  }
 
2873
  $new_pointer_content .= '</p>';
2874
 
2875
  return array(
@@ -3378,7 +3377,9 @@ class YouTubePrefs
3378
  border: 5px solid #dddddd;
3379
  }
3380
 
3381
-
 
 
3382
  </style>
3383
  <div class="wrap wrap-ytprefs">
3384
  <h1><img alt="YouTube Plugin Icon" src="<?php echo plugins_url('images/youtubeicon16.png', __FILE__) ?>" /> <?php echo __('YouTube Settings') ?></h1>
@@ -3391,16 +3392,17 @@ class YouTubePrefs
3391
  <input type="hidden" name="<?php echo $ytprefs_submitted; ?>" value="Y">
3392
  <?php wp_nonce_field('_epyt_save', '_epyt_nonce', true); ?>
3393
  <section class="pattern" id="jumpapikey">
 
3394
  <h2>
3395
  YouTube API Key
3396
  </h2>
3397
  <p>
3398
- Some features (such as galleries, and some wizard features) now require you to create a free YouTube API key from Google.
 
3399
  </p>
3400
  <p>
3401
  <b class="chktitle">YouTube API Key:</b>
3402
  <input type="text" name="<?php echo self::$opt_apikey; ?>" id="<?php echo self::$opt_apikey; ?>" value="<?php echo esc_attr(trim($all[self::$opt_apikey])); ?>" class="textinput" style="width: 250px;">
3403
- <a href="https://www.youtube.com/watch?v=6gD0X76-v_g" target="_blank">Click this link &raquo;</a> and follow the video to get your API key. Don't worry, it's an easy process.
3404
  </p>
3405
  </section>
3406
 
@@ -3468,16 +3470,16 @@ class YouTubePrefs
3468
  <input name="<?php echo self::$opt_rel; ?>" id="<?php echo self::$opt_rel; ?>" <?php checked($all[self::$opt_rel], 1); ?> type="checkbox" class="checkbox">
3469
  <label for="<?php echo self::$opt_rel; ?>">
3470
  <b class="chktitle">Related Videos:</b>
3471
- <strong>Turning off this feature is now <a target="_blank" href="https://developers.google.com/youtube/player_parameters#Revision_History">deprecated by YouTube</a>. Related videos will always appear.</strong>
3472
- Show related and recommended videos during pause and at the end of playback.
3473
  </label>
3474
  </p>
3475
  <p>
3476
  <input name="<?php echo self::$opt_showinfo; ?>" id="<?php echo self::$opt_showinfo; ?>" <?php checked($all[self::$opt_showinfo], 1); ?> type="checkbox" class="checkbox">
3477
  <label for="<?php echo self::$opt_showinfo; ?>">
3478
  <b class="chktitle">Show Title:</b>
3479
- <strong>Turning off this feature is now <a target="_blank" href="https://developers.google.com/youtube/player_parameters#Revision_History">deprecated by YouTube</a>. Title and info will always appear.</strong>
3480
- Show the video title and other info.
3481
  </label>
3482
  </p>
3483
  <p>
@@ -3564,13 +3566,13 @@ class YouTubePrefs
3564
  <p>
3565
  <input name="<?php echo self::$opt_onboarded; ?>" id="<?php echo self::$opt_onboarded; ?>" <?php checked($all[self::$opt_onboarded], 1); ?> type="checkbox" class="checkbox">
3566
  <label for="<?php echo self::$opt_onboarded; ?>">
3567
- <b class="chktitle">Hide Quick Setup Guide:</b> <sup class="orange">new</sup>
3568
  Check this to hide the installation setup wizard when this page loads.
3569
  </label>
3570
  </p>
3571
- <p>
3572
  <input name="<?php echo self::$opt_vi_hide_monetize_tab; ?>" id="<?php echo self::$opt_vi_hide_monetize_tab; ?>" <?php checked($all[self::$opt_vi_hide_monetize_tab], 1); ?> type="checkbox" class="checkbox">
3573
- <label for="<?php echo self::$opt_vi_hide_monetize_tab; ?>"><b class="chktitle">Hide "Monetize" Feature:</b> <sup class="orange">new</sup> Hide the tab(s) that allow you to sign up with vi.ai (after saving this option, please refresh this page again).</label>
3574
  </p>
3575
  <p>
3576
  <label for="<?php echo self::$opt_not_live_content; ?>">
@@ -3599,7 +3601,7 @@ class YouTubePrefs
3599
  <p>These options may help with privacy restrictions such as GDPR and the EU Cookie Law.</p>
3600
  <div class="ytindent chx">
3601
  <p>
3602
- <b class="chktitle">YouTube API Loading:</b> <sup class="orange">NEW</sup> Choose when to load the YouTube API. The "Restricted" or "Never" options will help with GDPR compliance:
3603
  <ul class="indent-option">
3604
  <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>
3605
  <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>
@@ -3611,7 +3613,7 @@ class YouTubePrefs
3611
  <p>
3612
  <input name="<?php echo self::$opt_gdpr_consent; ?>" id="<?php echo self::$opt_gdpr_consent; ?>" <?php checked($all[self::$opt_gdpr_consent], 1); ?> type="checkbox" class="checkbox">
3613
  <label for="<?php echo self::$opt_gdpr_consent; ?>">
3614
- <b class="chktitle">Privacy/GDPR - Show Consent Message:</b> <sup class="orange">NEW</sup> Ask for consent before loading YouTube content. A message will be displayed in place of the YouTube video, as shown in the screenshot below. Once the visitor approves consent, the YouTube content will load. You can customize the message text and the button text in the next 2 options.
3615
  See this feature demonstrated in <a href="https://www.youtube.com/watch?v=lm_HIic6obw" target="_blank">this video</a>.
3616
  </label>
3617
  <span id="box_gdpr_consent">
@@ -3621,7 +3623,7 @@ class YouTubePrefs
3621
 
3622
  <p>
3623
  <label for="<?php echo self::$opt_gdpr_consent_message; ?>">
3624
- <b class="chktitle">Privacy/GDPR - Consent Message Text:</b> <sup class="orange">NEW</sup>
3625
  Below you can customize the message that will appear to visitors before they accept YouTube content:
3626
  </label>
3627
  <div class="clearboth"></div>
@@ -3644,7 +3646,7 @@ class YouTubePrefs
3644
  <div class="clearboth"></div>
3645
  <p>
3646
  <label for="<?php echo self::$opt_gdpr_consent_button; ?>">
3647
- <b class="chktitle">Privacy/GDPR - Consent Button Text:</b> <sup class="orange">NEW</sup>
3648
  This is the text for the red "Accept" button that appears with the above privacy/GDPR message:
3649
  </label>
3650
  <br>
@@ -3717,7 +3719,7 @@ class YouTubePrefs
3717
  <p>
3718
  <a target="_blank" href="<?php echo self::$epbase ?>/responsive-youtube-playlist-channel-gallery-for-wordpress.aspx">You can now make playlist embeds (and channel-playlist embeds) have a gallery layout &raquo;</a>. <strong>First, you must obtain your YouTube API key</strong>.
3719
  Don't worry, it's an easy process. Just <a href="https://www.youtube.com/watch?v=6gD0X76-v_g" target="_blank">click this link &raquo;</a> and follow the video on that page to get your server API key. Since Google updates their API Key generation directions frequently, follow the general steps shown in the video.
3720
- Then paste your API key in the "YouTube API Key" box at the top of this screen, and click the "Save Changes" button.
3721
  </p>
3722
 
3723
  <p>
@@ -4457,8 +4459,6 @@ class YouTubePrefs
4457
  try
4458
  {
4459
  $input[self::$opt_modestbranding] = intval($input[self::$opt_modestbranding]);
4460
- $input[self::$opt_rel] = intval($input[self::$opt_rel]);
4461
- $input[self::$opt_showinfo] = intval($input[self::$opt_showinfo]);
4462
  $input[self::$opt_responsive] = intval($input[self::$opt_responsive]);
4463
  $input[self::$opt_responsive_all] = intval($input[self::$opt_responsive_all]);
4464
 
@@ -4492,8 +4492,6 @@ class YouTubePrefs
4492
  $result = array();
4493
  $default = array(
4494
  self::$opt_modestbranding => 0,
4495
- self::$opt_rel => 0,
4496
- self::$opt_showinfo => 0,
4497
  self::$opt_responsive => 0,
4498
  self::$opt_responsive_all => 0,
4499
  self::$opt_gallery_pagesize => 15,
@@ -4671,14 +4669,6 @@ class YouTubePrefs
4671
  <input value="1" name="<?php echo self::$opt_modestbranding; ?>" id="<?php echo self::$opt_modestbranding; ?>" <?php checked($all[self::$opt_modestbranding], 1); ?> type="checkbox" class="checkbox">
4672
  <label for="<?php echo self::$opt_modestbranding; ?>"><?php _e('<b class="chktitle">Modest Branding:</b> No YouTube logo will be shown on the control bar. Instead, as required by YouTube, the logo will only show as a watermark when the video is paused/stopped.') ?></label>
4673
  </div>
4674
- <div class="ytprefs-ob-setting yob-single yob-gallery">
4675
- <input value="1" name="<?php echo self::$opt_rel; ?>" id="<?php echo self::$opt_rel; ?>" <?php checked($all[self::$opt_rel], 1); ?> type="checkbox" class="checkbox">
4676
- <label for="<?php echo self::$opt_rel; ?>"><?php _e('<b class="chktitle">Related Videos:</b> Show related and recommended videos during pause and at the end of playback.') ?></label>
4677
- </div>
4678
- <div class="ytprefs-ob-setting yob-single yob-gallery yob-standalone yob-live">
4679
- <input value="1" name="<?php echo self::$opt_showinfo; ?>" id="<?php echo self::$opt_showinfo; ?>" <?php checked($all[self::$opt_showinfo], 1); ?> type="checkbox" class="checkbox">
4680
- <label for="<?php echo self::$opt_showinfo; ?>"><?php _e('<b class="chktitle">Show Title:</b> Show the video title and other info.') ?></label>
4681
- </div>
4682
  <div class="ytprefs-ob-setting yob-single yob-gallery yob-standalone yob-live">
4683
  <input value="1" name="<?php echo self::$opt_responsive; ?>" id="<?php echo self::$opt_responsive; ?>" <?php checked($all[self::$opt_responsive], 1); ?> type="checkbox" class="checkbox">
4684
  <label for="<?php echo self::$opt_responsive; ?>"><?php _e('<b class="chktitle">Responsive Video Sizing:</b> Make your videos responsive so that they dynamically fit in all screen sizes (smart phone, PC and tablet). NOTE: While this is checked, any custom hardcoded widths and heights you may have set will dynamically change too. <b>Do not check this if your theme already handles responsive video sizing.</b>') ?></label>
@@ -4731,7 +4721,7 @@ class YouTubePrefs
4731
  </div>
4732
 
4733
  <div class="ytprefs-ob-setting yob-privacy">
4734
- <b class="chktitle">YouTube API Loading:</b> <sup class="orange">NEW</sup> Choose when to load the YouTube API. The "Restricted" or "Never" options will help with GDPR compliance:
4735
  <ul class="indent-option">
4736
  <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>
4737
  <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>
@@ -4743,14 +4733,14 @@ class YouTubePrefs
4743
  <div class="ytprefs-ob-setting yob-privacy">
4744
  <input value="1" name="<?php echo self::$opt_gdpr_consent; ?>" id="<?php echo self::$opt_gdpr_consent; ?>" <?php checked($all[self::$opt_gdpr_consent], 1); ?> type="checkbox" class="checkbox">
4745
  <label for="<?php echo self::$opt_gdpr_consent; ?>">
4746
- <b class="chktitle">Privacy/GDPR - Show Consent Message:</b> <sup class="orange">NEW</sup> Ask for consent before loading YouTube content. A message will be displayed in place of the YouTube video, as shown in the screenshot below. Once the visitor approves consent, the YouTube content will load. You can customize the message text and the button text in the next 2 options.
4747
  </label>
4748
  </div>
4749
 
4750
 
4751
  <div class="ytprefs-ob-setting yob-privacy">
4752
  <label for="<?php echo self::$opt_gdpr_consent_message; ?>">
4753
- <b class="chktitle">Privacy/GDPR - Consent Message Text:</b> <sup class="orange">NEW</sup>
4754
  Below you can customize the message that will appear to visitors before they accept YouTube content:
4755
  </label>
4756
  <div class="clearboth"></div>
@@ -4774,7 +4764,7 @@ class YouTubePrefs
4774
  <div class="clearboth"></div>
4775
  <div class="ytprefs-ob-setting yob-privacy">
4776
  <label for="<?php echo self::$opt_gdpr_consent_button; ?>">
4777
- <b class="chktitle">Privacy/GDPR - Consent Button Text:</b> <sup class="orange">NEW</sup>
4778
  This is the text for the red "Accept" button that appears with the above privacy/GDPR message:
4779
  </label>
4780
  <br>
@@ -4800,19 +4790,21 @@ class YouTubePrefs
4800
  </div>
4801
  <div class="ytprefs-ob-step ytprefs-ob-step3">
4802
  <div class="ytprefs-ob-content">
 
4803
  <h2>
4804
  YouTube API Key
4805
  </h2>
4806
  <form id="form-onboarding-apikey">
4807
  <input type="hidden" name="action" value="my_embedplus_onboarding_save_apikey_ajax"/>
4808
  <p>
4809
- Some features (such as galleries, and some wizard features) now require you to create a free YouTube API key from Google.
 
4810
  </p>
4811
  <p>
4812
  <a href="https://www.youtube.com/watch?v=6gD0X76-v_g" target="_blank">Click this link &raquo;</a> and follow the video to get your API key. Don't worry, it's an easy process.
4813
  </p>
4814
- <p class="center">
4815
- <input type="text" placeholder="Paste your YouTube API key here" name="<?php echo self::$opt_apikey; ?>" id="<?php echo self::$opt_apikey; ?>" value="<?php echo esc_attr(trim($all[self::$opt_apikey])); ?>" class="regular-text">
4816
  </p>
4817
 
4818
  <div class="ytprefs-ob-nav">
@@ -5022,7 +5014,8 @@ class YouTubePrefs
5022
  'epbase' => self::$epbase,
5023
  'admin_url' => admin_url(),
5024
  'vi_js_settings' => self::$alloptions[self::$opt_vi_js_settings],
5025
- 'admin_url_ytprefs' => admin_url('admin.php?page=youtube-my-preferences')
 
5026
  //'epblogwidth' => self::get_blogwidth(),
5027
  //'epprokey' => self::$alloptions[self::$opt_pro],
5028
  //'epbasesite' => self::$epbase,
@@ -5232,6 +5225,43 @@ class YouTubePrefs
5232
  die();
5233
  }
5234
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5235
  private static function vi_login_valid(&$input)
5236
  {
5237
  $messages = array();
@@ -5669,6 +5699,11 @@ class YouTubePrefs
5669
  );
5670
  $input = shortcode_atts($default, stripslashes_deep($_POST));
5671
  $result = self::vi_adstxt_status_soft($input['current_adstxt']);
 
 
 
 
 
5672
  }
5673
  else
5674
  {
@@ -5691,7 +5726,7 @@ class YouTubePrefs
5691
  {
5692
  return array(
5693
  'code' => -1,
5694
- 'message' => 'Sorry, your vi ads.txt info could not be retrieved. Please wait a few minutes and try again. Your ads.txt verification file will enable you to make money through vi. <a href="https://www.vi.ai/publisherfaq/?aid=WP_embedplus&utm_source=Wordpress&utm_medium=WP_embedplus" target="_blank">FAQ &raquo;</a>'
5695
  );
5696
  }
5697
  else
@@ -5711,8 +5746,9 @@ class YouTubePrefs
5711
  return array(
5712
  'code' => 0,
5713
  'message' => '<h3>Almost There!</h3> Looks like video intelligence has just updated its ad delivery partners. To get the most revenue out of your ads, open up your '
5714
- . ' <a href="' . self::base_url() . '/ads.txt" target="_blank">ads.txt</a> file and replace the vi lines (ending in # 41b5eef6) with the new lines you see below. Then, refresh this page.'
5715
- . '<code>' . $user_adstxt . '</code>'
 
5716
  );
5717
  }
5718
  else // add
@@ -5721,7 +5757,7 @@ class YouTubePrefs
5721
  'code' => 0,
5722
  'message' => '<h3>Almost There!</h3>'
5723
  . 'In your current <a href="' . self::base_url() . '/ads.txt" target="_blank">ads.txt</a> file, just add in the additional lines you see below. Then, refresh this page.'
5724
- . '<code>' . $user_adstxt . '</code>'
5725
  );
5726
  }
5727
  }
@@ -5740,7 +5776,7 @@ class YouTubePrefs
5740
  'code' => 0,
5741
  'message' => '<h3>Almost There!</h3>'
5742
  . 'You can <a class="button button-small" href="' . admin_url('admin.php') . '?ytvi_adstxt_download=1&key=' . urlencode(self::$alloptions[self::$opt_vi_token]) . '">download this ads.txt</a> file and upload it to your site root (or copy the same text below). Then, refresh this page to verify.'
5743
- . '<code>' . $user_adstxt . '</code>'
5744
  );
5745
  }
5746
  }
@@ -5807,6 +5843,8 @@ class YouTubePrefs
5807
 
5808
  $new_adstxt = $former_adstxt . (strlen($former_adstxt) > 0 ? PHP_EOL : '') . ($user_adstxt === false ? '' : $user_adstxt);
5809
 
 
 
5810
  header("Expires: 0");
5811
  header("Cache-Control: no-cache, no-store, must-revalidate");
5812
  header('Cache-Control: pre-check=0, post-check=0, max-age=0', false);
@@ -5830,7 +5868,7 @@ class YouTubePrefs
5830
  ?>
5831
  <h3 class="nav-tab-wrapper">
5832
  <a class="nav-tab nav-tab-active" href="#jumphowitworks">How It Works</a>
5833
- <a class="nav-tab" href="#jumpdescription">Site Description</a>
5834
  <a class="nav-tab" href="#jumpappearance">Appearance</a>
5835
  <a class="nav-tab" href="#jumpplacement">Placement</a>
5836
  <a class="nav-tab nav-tab-adstxt" href="#jumpadstxt">Ads.txt Verification &nbsp;</a>
@@ -5941,7 +5979,7 @@ class YouTubePrefs
5941
  $item[self::$opt_vi_js_settings]['iabCategory'] = sanitize_text_field($item[self::$opt_vi_js_settings]['iabCategory']);
5942
  if (empty($item[self::$opt_vi_js_settings]['iabCategory']))
5943
  {
5944
- $messages[] = 'Please choose a valid category.';
5945
  }
5946
  $item[self::$opt_vi_js_settings]['language'] = sanitize_text_field($item[self::$opt_vi_js_settings]['language']);
5947
  if (empty($item[self::$opt_vi_js_settings]['language']))
@@ -5997,7 +6035,27 @@ class YouTubePrefs
5997
  public static function vi_print_toggle_button()
5998
  {
5999
  ?>
6000
- <a class="button-primary ytvi-btn-toggle <?php echo self::$alloptions[self::$opt_vi_active] ? 'ytvi-btn-active' : 'ytvi-btn-inactive' ?>">vi ads are: <strong><?php echo self::$alloptions[self::$opt_vi_active] ? 'On' : 'Off' ?></strong></a>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6001
  <?php
6002
  }
6003
 
@@ -6088,9 +6146,9 @@ class YouTubePrefs
6088
  <div class="vi-how-works" data-jump="#jumpdescription">
6089
  <div class="vi-num">1</div>
6090
  <img src="<?php echo plugins_url(self::$folder_name . '/images/icon-hw-description.png') ?>"/>
6091
- <h3>Site Description</h3>
6092
  <p>
6093
- Describe your site with a few keywords to help match the right ads.
6094
  </p>
6095
  </div>
6096
  <div class="vi-how-works" data-jump="#jumpappearance">
@@ -6144,23 +6202,16 @@ class YouTubePrefs
6144
  </section>
6145
 
6146
  <section class="pattern" id="jumpdescription">
6147
- <h2><span class="vi-num">1</span> Site Description</h2>
 
 
 
 
6148
  <p>
6149
  Your video ad will be optimized to relate to your site's content. Note that the quality of the matches improves over time.
6150
  </p>
6151
  <table cellspacing="2" cellpadding="5" style="width: 100%;" class="form-table">
6152
  <tbody>
6153
- <tr class="form-field">
6154
- <th valign="top" scope="row">
6155
- <label for="<?php echo self::$opt_vi_js_settings ?>[keywords]">Keywords</label>
6156
- <small>Enter a few keywords that describe topics your visitors are likely to be interested in. <strong>Separate by commas.</strong>
6157
- Tip: Try to avoid terms that have multiple meanings; e.g., just the word "record" can refer to music records and even sports records.</small>
6158
- </th>
6159
- <td>
6160
- <input id="<?php echo self::$opt_vi_js_settings ?>[keywords]" name="<?php echo self::$opt_vi_js_settings ?>[keywords]" value="<?php echo esc_attr($item[self::$opt_vi_js_settings]['keywords']) ?>"
6161
- type="text" maxlength="200" placeholder="Example: cooking, baking, food, recipes, kitchen">
6162
- </td>
6163
- </tr>
6164
  <tr class="form-field">
6165
  <th valign="top" scope="row">
6166
  <label for="<?php echo self::$opt_vi_js_settings ?>[iabCategory]">IAB Category</label>
@@ -6590,6 +6641,17 @@ class YouTubePrefs
6590
  </div>
6591
  </td>
6592
  </tr>
 
 
 
 
 
 
 
 
 
 
 
6593
  </tbody>
6594
  </table>
6595
  </section>
@@ -6814,6 +6876,12 @@ margin: 0 auto;
6814
 
6815
 
6816
  <section class="pattern" id="jumpadstxt">
 
 
 
 
 
 
6817
  <h2><span class="vi-num">5</span> Ads.txt Verification</h2>
6818
  <p>
6819
  In order for your ads to start generating revenue, verify your ads.txt file:
@@ -6828,9 +6896,6 @@ margin: 0 auto;
6828
  <p>
6829
  <code class="adstxt-block">google.com, pub-0000000000000000, DIRECT, f08c47fec0942fa0</code>
6830
  </p>
6831
- <p>
6832
- Trouble with your ads.txt verification? Contact support at <strong><a href="mailto:ext@embedplus.com">ext@embedplus.com</a></strong>
6833
- </p>
6834
  </section>
6835
 
6836
 
@@ -7004,11 +7069,12 @@ margin: 0 auto;
7004
  </p>
7005
  </li>
7006
  <li>
7007
- <h3>Why am I seeing ads that do not match my sites topics?</h3>
7008
  <ol>
 
7009
  <li>Check each category and its subcategories to see if there is a better fit for your site’s topics than your initial selections.</li>
7010
- <li>Provide more keywords.</li>
7011
- <li>If you’re still not seeing well-matched ads, it’s likely that your site’s topics are very specific or they are based on categories in which vi.ai is still building inventory. In the meantime, try and find other categories that you think will be of interest to your audience.</li>
7012
  </ol>
7013
  </li>
7014
  </ul>
3
  Plugin Name: YouTube
4
  Plugin URI: https://www.embedplus.com/dashboard/pro-easy-video-analytics.aspx?ref=plugin
5
  Description: YouTube Embed and YouTube Gallery WordPress Plugin. Embed a responsive video, YouTube channel, playlist gallery, or live stream
6
+ Version: 13.0.1
7
  Author: EmbedPlus Team
8
  Author URI: https://www.embedplus.com
9
  */
34
 
35
  public static $folder_name = 'youtube-embed-plus';
36
  public static $curltimeout = 30;
37
+ public static $version = '13.0.1';
38
  public static $opt_version = 'version';
39
  public static $optembedwidth = null;
40
  public static $optembedheight = null;
225
  self::do_ytprefs();
226
  add_action('admin_menu', array(get_class(), 'ytprefs_plugin_menu'));
227
  add_filter('plugin_action_links_' . plugin_basename(__FILE__), array(get_class(), 'my_plugin_action_links'));
228
+
229
  if (!is_admin())
230
  {
231
  if (self::$alloptions[self::$opt_old_script_method] == 1)
2860
  $new_pointer_content = '<h3>' . __('New Update') . '</h3>'; // ooopointer
2861
 
2862
  $new_pointer_content .= '<p>'; // ooopointer
2863
+
2864
+ $new_pointer_content .= "This version provides clearer instructions for many options across the plugin&apos;s settings and wizard pages in both Free and <a target=_blank href=" . self::$epbase . '/dashboard/pro-easy-video-analytics.aspx?ref=frompointer' . ">Pro versions &raquo;</a>";
2865
+ //$new_pointer_content .= "This version fixes a couple gallery bugs and improves ads.txt management for the monetization feature. <a rel=\"#jumpmonetize\" class=\"epyt-jumptab\" href=\"" . admin_url('admin.php?page=youtube-my-preferences#jumpmonetize') . "\">Login here to see &raquo;</a></li></ul>";
2866
+
2867
+ if (!empty(self::$alloptions[self::$opt_pro]) && strlen(trim(self::$alloptions[self::$opt_pro])) > 0)
 
2868
  {
 
2869
  $new_pointer_content .= ' <strong>Important message to YouTube Pro users</strong>: From version 11.7 onward, you must <a href="https://www.embedplus.com/youtube-pro/download/?prokey=' . esc_attr(self::$alloptions[self::$opt_pro]) . '" target="_blank">download the separate plugin here</a> to regain your Pro features. All your settings will automatically migrate after installing the separate Pro download. Thank you for your support and patience during this transition.';
2870
  }
2871
+
2872
  $new_pointer_content .= '</p>';
2873
 
2874
  return array(
3377
  border: 5px solid #dddddd;
3378
  }
3379
 
3380
+ .epyt-deprecated {
3381
+ color: #aaaaaa;
3382
+ }
3383
  </style>
3384
  <div class="wrap wrap-ytprefs">
3385
  <h1><img alt="YouTube Plugin Icon" src="<?php echo plugins_url('images/youtubeicon16.png', __FILE__) ?>" /> <?php echo __('YouTube Settings') ?></h1>
3392
  <input type="hidden" name="<?php echo $ytprefs_submitted; ?>" value="Y">
3393
  <?php wp_nonce_field('_epyt_save', '_epyt_nonce', true); ?>
3394
  <section class="pattern" id="jumpapikey">
3395
+ <img class="wiztab-screenshots" src="<?php echo plugins_url('images/apikey-server.png', __FILE__) ?>">
3396
  <h2>
3397
  YouTube API Key
3398
  </h2>
3399
  <p>
3400
+ Some features (such as galleries, and some wizard features) now require you to create a free YouTube API <strong>Server</strong> key from Google.
3401
+ Make sure it's a YouTube Data API v3 "Web Server" key as shown in the screenshot (i.e. not web browser or anything else). <a href="https://www.youtube.com/watch?v=6gD0X76-v_g" target="_blank">Click this link &raquo;</a> and follow the video to get your API key. Don't worry, it's an easy process.
3402
  </p>
3403
  <p>
3404
  <b class="chktitle">YouTube API Key:</b>
3405
  <input type="text" name="<?php echo self::$opt_apikey; ?>" id="<?php echo self::$opt_apikey; ?>" value="<?php echo esc_attr(trim($all[self::$opt_apikey])); ?>" class="textinput" style="width: 250px;">
 
3406
  </p>
3407
  </section>
3408
 
3470
  <input name="<?php echo self::$opt_rel; ?>" id="<?php echo self::$opt_rel; ?>" <?php checked($all[self::$opt_rel], 1); ?> type="checkbox" class="checkbox">
3471
  <label for="<?php echo self::$opt_rel; ?>">
3472
  <b class="chktitle">Related Videos:</b>
3473
+ <strong>Google/YouTube no longer allows tools to control this feature. Learn more about the <a target="_blank" href="https://developers.google.com/youtube/player_parameters#Revision_History">deprecation of this feature here</a>.</strong>
3474
+ <span class="epyt-deprecated">Show related and recommended videos during pause and at the end of playback.</span>
3475
  </label>
3476
  </p>
3477
  <p>
3478
  <input name="<?php echo self::$opt_showinfo; ?>" id="<?php echo self::$opt_showinfo; ?>" <?php checked($all[self::$opt_showinfo], 1); ?> type="checkbox" class="checkbox">
3479
  <label for="<?php echo self::$opt_showinfo; ?>">
3480
  <b class="chktitle">Show Title:</b>
3481
+ <strong>Google/YouTube no longer allows tools to control this feature. Learn more about the <a target="_blank" href="https://developers.google.com/youtube/player_parameters#Revision_History">deprecation of this feature here</a>.</strong>
3482
+ <span class="epyt-deprecated">Show the video title and other info.</span>
3483
  </label>
3484
  </p>
3485
  <p>
3566
  <p>
3567
  <input name="<?php echo self::$opt_onboarded; ?>" id="<?php echo self::$opt_onboarded; ?>" <?php checked($all[self::$opt_onboarded], 1); ?> type="checkbox" class="checkbox">
3568
  <label for="<?php echo self::$opt_onboarded; ?>">
3569
+ <b class="chktitle">Hide Quick Setup Guide:</b>
3570
  Check this to hide the installation setup wizard when this page loads.
3571
  </label>
3572
  </p>
3573
+ <p class="<?php echo self::vi_logged_in() || !empty($all[self::$opt_vi_active]) ? 'hidden' : '' ?>">
3574
  <input name="<?php echo self::$opt_vi_hide_monetize_tab; ?>" id="<?php echo self::$opt_vi_hide_monetize_tab; ?>" <?php checked($all[self::$opt_vi_hide_monetize_tab], 1); ?> type="checkbox" class="checkbox">
3575
+ <label for="<?php echo self::$opt_vi_hide_monetize_tab; ?>"><b class="chktitle">Hide "Monetize" Feature:</b> Hide the tab(s) that allow you to sign up with vi.ai (after saving this option, please refresh this page again).</label>
3576
  </p>
3577
  <p>
3578
  <label for="<?php echo self::$opt_not_live_content; ?>">
3601
  <p>These options may help with privacy restrictions such as GDPR and the EU Cookie Law.</p>
3602
  <div class="ytindent chx">
3603
  <p>
3604
+ <b class="chktitle">YouTube API Loading:</b> Choose when to load the YouTube API. The "Restricted" or "Never" options will help with GDPR compliance:
3605
  <ul class="indent-option">
3606
  <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>
3607
  <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>
3613
  <p>
3614
  <input name="<?php echo self::$opt_gdpr_consent; ?>" id="<?php echo self::$opt_gdpr_consent; ?>" <?php checked($all[self::$opt_gdpr_consent], 1); ?> type="checkbox" class="checkbox">
3615
  <label for="<?php echo self::$opt_gdpr_consent; ?>">
3616
+ <b class="chktitle">Privacy/GDPR - Show Consent Message:</b> Ask for consent before loading YouTube content. A message will be displayed in place of the YouTube video, as shown in the screenshot below. Once the visitor approves consent, the YouTube content will load. You can customize the message text and the button text in the next 2 options.
3617
  See this feature demonstrated in <a href="https://www.youtube.com/watch?v=lm_HIic6obw" target="_blank">this video</a>.
3618
  </label>
3619
  <span id="box_gdpr_consent">
3623
 
3624
  <p>
3625
  <label for="<?php echo self::$opt_gdpr_consent_message; ?>">
3626
+ <b class="chktitle">Privacy/GDPR - Consent Message Text:</b>
3627
  Below you can customize the message that will appear to visitors before they accept YouTube content:
3628
  </label>
3629
  <div class="clearboth"></div>
3646
  <div class="clearboth"></div>
3647
  <p>
3648
  <label for="<?php echo self::$opt_gdpr_consent_button; ?>">
3649
+ <b class="chktitle">Privacy/GDPR - Consent Button Text:</b>
3650
  This is the text for the red "Accept" button that appears with the above privacy/GDPR message:
3651
  </label>
3652
  <br>
3719
  <p>
3720
  <a target="_blank" href="<?php echo self::$epbase ?>/responsive-youtube-playlist-channel-gallery-for-wordpress.aspx">You can now make playlist embeds (and channel-playlist embeds) have a gallery layout &raquo;</a>. <strong>First, you must obtain your YouTube API key</strong>.
3721
  Don't worry, it's an easy process. Just <a href="https://www.youtube.com/watch?v=6gD0X76-v_g" target="_blank">click this link &raquo;</a> and follow the video on that page to get your server API key. Since Google updates their API Key generation directions frequently, follow the general steps shown in the video.
3722
+ Then paste your API key in the "API Key" tab, and click the "Save Changes" button.
3723
  </p>
3724
 
3725
  <p>
4459
  try
4460
  {
4461
  $input[self::$opt_modestbranding] = intval($input[self::$opt_modestbranding]);
 
 
4462
  $input[self::$opt_responsive] = intval($input[self::$opt_responsive]);
4463
  $input[self::$opt_responsive_all] = intval($input[self::$opt_responsive_all]);
4464
 
4492
  $result = array();
4493
  $default = array(
4494
  self::$opt_modestbranding => 0,
 
 
4495
  self::$opt_responsive => 0,
4496
  self::$opt_responsive_all => 0,
4497
  self::$opt_gallery_pagesize => 15,
4669
  <input value="1" name="<?php echo self::$opt_modestbranding; ?>" id="<?php echo self::$opt_modestbranding; ?>" <?php checked($all[self::$opt_modestbranding], 1); ?> type="checkbox" class="checkbox">
4670
  <label for="<?php echo self::$opt_modestbranding; ?>"><?php _e('<b class="chktitle">Modest Branding:</b> No YouTube logo will be shown on the control bar. Instead, as required by YouTube, the logo will only show as a watermark when the video is paused/stopped.') ?></label>
4671
  </div>
 
 
 
 
 
 
 
 
4672
  <div class="ytprefs-ob-setting yob-single yob-gallery yob-standalone yob-live">
4673
  <input value="1" name="<?php echo self::$opt_responsive; ?>" id="<?php echo self::$opt_responsive; ?>" <?php checked($all[self::$opt_responsive], 1); ?> type="checkbox" class="checkbox">
4674
  <label for="<?php echo self::$opt_responsive; ?>"><?php _e('<b class="chktitle">Responsive Video Sizing:</b> Make your videos responsive so that they dynamically fit in all screen sizes (smart phone, PC and tablet). NOTE: While this is checked, any custom hardcoded widths and heights you may have set will dynamically change too. <b>Do not check this if your theme already handles responsive video sizing.</b>') ?></label>
4721
  </div>
4722
 
4723
  <div class="ytprefs-ob-setting yob-privacy">
4724
+ <b class="chktitle">YouTube API Loading:</b> Choose when to load the YouTube API. The "Restricted" or "Never" options will help with GDPR compliance:
4725
  <ul class="indent-option">
4726
  <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>
4727
  <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>
4733
  <div class="ytprefs-ob-setting yob-privacy">
4734
  <input value="1" name="<?php echo self::$opt_gdpr_consent; ?>" id="<?php echo self::$opt_gdpr_consent; ?>" <?php checked($all[self::$opt_gdpr_consent], 1); ?> type="checkbox" class="checkbox">
4735
  <label for="<?php echo self::$opt_gdpr_consent; ?>">
4736
+ <b class="chktitle">Privacy/GDPR - Show Consent Message:</b> Ask for consent before loading YouTube content. A message will be displayed in place of the YouTube video, as shown in the screenshot below. Once the visitor approves consent, the YouTube content will load. You can customize the message text and the button text in the next 2 options.
4737
  </label>
4738
  </div>
4739
 
4740
 
4741
  <div class="ytprefs-ob-setting yob-privacy">
4742
  <label for="<?php echo self::$opt_gdpr_consent_message; ?>">
4743
+ <b class="chktitle">Privacy/GDPR - Consent Message Text:</b>
4744
  Below you can customize the message that will appear to visitors before they accept YouTube content:
4745
  </label>
4746
  <div class="clearboth"></div>
4764
  <div class="clearboth"></div>
4765
  <div class="ytprefs-ob-setting yob-privacy">
4766
  <label for="<?php echo self::$opt_gdpr_consent_button; ?>">
4767
+ <b class="chktitle">Privacy/GDPR - Consent Button Text:</b>
4768
  This is the text for the red "Accept" button that appears with the above privacy/GDPR message:
4769
  </label>
4770
  <br>
4790
  </div>
4791
  <div class="ytprefs-ob-step ytprefs-ob-step3">
4792
  <div class="ytprefs-ob-content">
4793
+ <img class="wiztab-screenshots" src="<?php echo plugins_url('images/apikey-server.png', __FILE__) ?>">
4794
  <h2>
4795
  YouTube API Key
4796
  </h2>
4797
  <form id="form-onboarding-apikey">
4798
  <input type="hidden" name="action" value="my_embedplus_onboarding_save_apikey_ajax"/>
4799
  <p>
4800
+ Some features (such as galleries, and some wizard features) now require you to create a free YouTube API <strong>Server</strong> key from Google.
4801
+ Make sure it's a YouTube Data API v3 "Web Server" key as shown in the screenshot (i.e. not web browser or anything else).
4802
  </p>
4803
  <p>
4804
  <a href="https://www.youtube.com/watch?v=6gD0X76-v_g" target="_blank">Click this link &raquo;</a> and follow the video to get your API key. Don't worry, it's an easy process.
4805
  </p>
4806
+ <p>
4807
+ <input type="text" placeholder="Paste your YouTube API key here" name="<?php echo self::$opt_apikey; ?>" id="<?php echo self::$opt_apikey; ?>" value="<?php echo esc_attr(trim($all[self::$opt_apikey])); ?>" class="regular-text" style='max-width: 40%;'>
4808
  </p>
4809
 
4810
  <div class="ytprefs-ob-nav">
5014
  'epbase' => self::$epbase,
5015
  'admin_url' => admin_url(),
5016
  'vi_js_settings' => self::$alloptions[self::$opt_vi_js_settings],
5017
+ 'admin_url_ytprefs' => admin_url('admin.php?page=youtube-my-preferences'),
5018
+ 'admin_url_vi' => admin_url('admin.php?page=youtube-ep-vi')
5019
  //'epblogwidth' => self::get_blogwidth(),
5020
  //'epprokey' => self::$alloptions[self::$opt_pro],
5021
  //'epbasesite' => self::$epbase,
5225
  die();
5226
  }
5227
 
5228
+ public static function vi_notice_login_reminder()
5229
+ {
5230
+ if (filter_has_var(INPUT_COOKIE, 'vi_signup_attempt'))
5231
+ {
5232
+ $screen = get_current_screen();
5233
+ $date_string = filter_input(INPUT_COOKIE, 'vi_signup_attempt', FILTER_SANITIZE_STRING);
5234
+ $date_attempt = strtotime($date_string);
5235
+ $date_wait = strtotime($date_string . ' + 7 days');
5236
+
5237
+ if (time() > $date_wait &&
5238
+ !self::vi_logged_in() &&
5239
+ in_array($screen->id, array('toplevel_page_youtube-my-preferences'))
5240
+ )
5241
+ {
5242
+ ?>
5243
+ <div class="notice notice-warning is-dismissible vi_notice_login_reminder">
5244
+ <p>
5245
+ It looks like you may have signed up for the vi monetization feature, but haven't completed the settings to receive revenue. Click the "Monetize" tab below to login and continue.
5246
+ </p>
5247
+ </div>
5248
+ <script>
5249
+ (function ($)
5250
+ {
5251
+ $(document).ready(function ()
5252
+ {
5253
+ $('.vi_notice_login_reminder').on('click', '.notice-dismiss', function ()
5254
+ {
5255
+ document.cookie = 'vi_signup_attempt=; expires=Thu, 01 Jan 1970 00:00:01 GMT;';
5256
+ });
5257
+ });
5258
+ })(jQuery);
5259
+ </script>
5260
+ <?php
5261
+ }
5262
+ }
5263
+ }
5264
+
5265
  private static function vi_login_valid(&$input)
5266
  {
5267
  $messages = array();
5699
  );
5700
  $input = shortcode_atts($default, stripslashes_deep($_POST));
5701
  $result = self::vi_adstxt_status_soft($input['current_adstxt']);
5702
+
5703
+ if (isset($result['code']) && intval($result['code']) < 0)
5704
+ {
5705
+ $result['token'] = self::$alloptions[self::$opt_vi_token];
5706
+ }
5707
  }
5708
  else
5709
  {
5726
  {
5727
  return array(
5728
  'code' => -1,
5729
+ 'message' => 'A quick reauthentication is needed to begin setting up your ads.txt file. First, log out of this Ads Settings page with the "Logout" button right above and then log back in with your vi login and password. Then come back to this tab for next steps. Your ads.txt verification file will enable you to make money through vi. <a href="https://www.vi.ai/publisherfaq/?aid=WP_embedplus&utm_source=Wordpress&utm_medium=WP_embedplus" target="_blank">FAQ &raquo;</a>'
5730
  );
5731
  }
5732
  else
5746
  return array(
5747
  'code' => 0,
5748
  'message' => '<h3>Almost There!</h3> Looks like video intelligence has just updated its ad delivery partners. To get the most revenue out of your ads, open up your '
5749
+ . ' <a href="' . self::base_url() . '/ads.txt" target="_blank">ads.txt</a> file and replace the vi lines (ending in # 41b5eef6) with the new lines you see below. Then, refresh this page. '
5750
+ . ' <strong>If we helped you with your ads.txt in the past, feel free to contact us to help out again with this update.</strong> '
5751
+ . '<code># video intelligence (vi.ai) ads.txt lines begin here:' . PHP_EOL . $user_adstxt . PHP_EOL . '# video intelligence (vi.ai) ads.txt lines end</code>'
5752
  );
5753
  }
5754
  else // add
5757
  'code' => 0,
5758
  'message' => '<h3>Almost There!</h3>'
5759
  . 'In your current <a href="' . self::base_url() . '/ads.txt" target="_blank">ads.txt</a> file, just add in the additional lines you see below. Then, refresh this page.'
5760
+ . '<code># video intelligence (vi.ai) ads.txt lines begin here:' . PHP_EOL . $user_adstxt . PHP_EOL . '# video intelligence (vi.ai) ads.txt lines end</code>'
5761
  );
5762
  }
5763
  }
5776
  'code' => 0,
5777
  'message' => '<h3>Almost There!</h3>'
5778
  . 'You can <a class="button button-small" href="' . admin_url('admin.php') . '?ytvi_adstxt_download=1&key=' . urlencode(self::$alloptions[self::$opt_vi_token]) . '">download this ads.txt</a> file and upload it to your site root (or copy the same text below). Then, refresh this page to verify.'
5779
+ . '<code># video intelligence (vi.ai) ads.txt lines begin here:' . PHP_EOL . $user_adstxt . PHP_EOL . '# video intelligence (vi.ai) ads.txt lines end</code>'
5780
  );
5781
  }
5782
  }
5843
 
5844
  $new_adstxt = $former_adstxt . (strlen($former_adstxt) > 0 ? PHP_EOL : '') . ($user_adstxt === false ? '' : $user_adstxt);
5845
 
5846
+ $new_adstxt = '# video intelligence (vi.ai) ads.txt lines begin here:' . PHP_EOL . $new_adstxt . PHP_EOL . '# video intelligence (vi.ai) ads.txt lines end';
5847
+
5848
  header("Expires: 0");
5849
  header("Cache-Control: no-cache, no-store, must-revalidate");
5850
  header('Cache-Control: pre-check=0, post-check=0, max-age=0', false);
5868
  ?>
5869
  <h3 class="nav-tab-wrapper">
5870
  <a class="nav-tab nav-tab-active" href="#jumphowitworks">How It Works</a>
5871
+ <a class="nav-tab" href="#jumpdescription">Video Categories</a>
5872
  <a class="nav-tab" href="#jumpappearance">Appearance</a>
5873
  <a class="nav-tab" href="#jumpplacement">Placement</a>
5874
  <a class="nav-tab nav-tab-adstxt" href="#jumpadstxt">Ads.txt Verification &nbsp;</a>
5979
  $item[self::$opt_vi_js_settings]['iabCategory'] = sanitize_text_field($item[self::$opt_vi_js_settings]['iabCategory']);
5980
  if (empty($item[self::$opt_vi_js_settings]['iabCategory']))
5981
  {
5982
+ $messages[] = 'Please choose a valid IAB category under Video Categories.';
5983
  }
5984
  $item[self::$opt_vi_js_settings]['language'] = sanitize_text_field($item[self::$opt_vi_js_settings]['language']);
5985
  if (empty($item[self::$opt_vi_js_settings]['language']))
6035
  public static function vi_print_toggle_button()
6036
  {
6037
  ?>
6038
+ <button <?php echo self::vi_script_setup_done() ? '' : ' disabled '; ?> class="button-primary ytvi-btn-toggle <?php echo self::$alloptions[self::$opt_vi_active] ? 'ytvi-btn-active' : 'ytvi-btn-inactive' ?>">
6039
+ vi ads are: <strong><?php echo self::$alloptions[self::$opt_vi_active] ? 'On' : 'Off' ?></strong>
6040
+ <?php
6041
+ if (!self::vi_script_setup_done())
6042
+ {
6043
+ ?>
6044
+ <div class="ytvi-notyet">
6045
+ <h3>Before you can turn on your ads:</h3>
6046
+ <ol class="list-ol">
6047
+ <li>Complete the <em>Video Categories, Appearance, and Placement</em> tabs.</li>
6048
+ <li>Then click on the <strong>Save Changes</strong> button in the bottom right of this screen.</li>
6049
+ <li>Then click the top right button to turn vi ads on.</li>
6050
+ </ol>
6051
+ <p>
6052
+ Once your ads are on, complete the <em>Ads.txt</em> tab to have your ads start earning revenue. Then the <em>Profile</em> tab shows you how to receive payments.
6053
+ </p>
6054
+ </div>
6055
+ <?php
6056
+ }
6057
+ ?>
6058
+ </button>
6059
  <?php
6060
  }
6061
 
6146
  <div class="vi-how-works" data-jump="#jumpdescription">
6147
  <div class="vi-num">1</div>
6148
  <img src="<?php echo plugins_url(self::$folder_name . '/images/icon-hw-description.png') ?>"/>
6149
+ <h3>Video Categories</h3>
6150
  <p>
6151
+ Categorize your site to help match with the right ads.
6152
  </p>
6153
  </div>
6154
  <div class="vi-how-works" data-jump="#jumpappearance">
6202
  </section>
6203
 
6204
  <section class="pattern" id="jumpdescription">
6205
+ <div class="adstxt-help">
6206
+ <img src="<?php echo plugins_url(self::$folder_name . '/images/adstxt-help.png') . '?ver=' . self::$version; ?>"/>
6207
+ Trouble getting content that fits your site, even with the proper settings above/below? Contact support at <strong><a href="mailto:ext@embedplus.com">ext@embedplus.com</a></strong>
6208
+ </div>
6209
+ <h2><span class="vi-num">1</span> Video Categories</h2>
6210
  <p>
6211
  Your video ad will be optimized to relate to your site's content. Note that the quality of the matches improves over time.
6212
  </p>
6213
  <table cellspacing="2" cellpadding="5" style="width: 100%;" class="form-table">
6214
  <tbody>
 
 
 
 
 
 
 
 
 
 
 
6215
  <tr class="form-field">
6216
  <th valign="top" scope="row">
6217
  <label for="<?php echo self::$opt_vi_js_settings ?>[iabCategory]">IAB Category</label>
6641
  </div>
6642
  </td>
6643
  </tr>
6644
+ <tr class="form-field <?php echo empty($item[self::$opt_vi_js_settings]['keywords']) ? ' hidden ' : '' ?>">
6645
+ <th valign="top" scope="row">
6646
+ <label for="<?php echo self::$opt_vi_js_settings ?>[keywords]">Keywords</label>
6647
+ <small>Enter a few keywords that describe topics your visitors are likely to be interested in. <strong>Separate by commas.</strong>
6648
+ Tip: Try to avoid terms that have multiple meanings; e.g., just the word "record" can refer to music records and even sports records.</small>
6649
+ </th>
6650
+ <td>
6651
+ <input id="<?php echo self::$opt_vi_js_settings ?>[keywords]" name="<?php echo self::$opt_vi_js_settings ?>[keywords]" value="<?php echo esc_attr($item[self::$opt_vi_js_settings]['keywords']) ?>"
6652
+ type="text" maxlength="200" placeholder="Example: cooking, baking, food, recipes, kitchen">
6653
+ </td>
6654
+ </tr>
6655
  </tbody>
6656
  </table>
6657
  </section>
6876
 
6877
 
6878
  <section class="pattern" id="jumpadstxt">
6879
+ <div class="adstxt-help">
6880
+ <img src="<?php echo plugins_url(self::$folder_name . '/images/adstxt-help.png') . '?ver=' . self::$version; ?>"/>
6881
+ <p>
6882
+ Trouble with your ads.txt verification? Contact support at <strong><a href="mailto:ext@embedplus.com">ext@embedplus.com</a></strong>
6883
+ </p>
6884
+ </div>
6885
  <h2><span class="vi-num">5</span> Ads.txt Verification</h2>
6886
  <p>
6887
  In order for your ads to start generating revenue, verify your ads.txt file:
6896
  <p>
6897
  <code class="adstxt-block">google.com, pub-0000000000000000, DIRECT, f08c47fec0942fa0</code>
6898
  </p>
 
 
 
6899
  </section>
6900
 
6901
 
7069
  </p>
7070
  </li>
7071
  <li>
7072
+ <h3>Why am I seeing ads that do not match my site's topics?</h3>
7073
  <ol>
7074
+ <li>Wait for 24 hours to give the video intelligence service time to learn more about your site.</li>
7075
  <li>Check each category and its subcategories to see if there is a better fit for your site’s topics than your initial selections.</li>
7076
+ <li>If you're still not seeing well-matched ads, it's likely that your site's topics are very specific or they are based on categories in which vi.ai is still building inventory. In the meantime, try and find other categories that you think will be of interest to your audience.</li>
7077
+ <li>If all else fails, please <a href="#jumpsupport">contact support</a>.</li>
7078
  </ol>
7079
  </li>
7080
  </ul>