diff --git a/wp-content/upgrade-temp-backup/plugins/activitypub/.distignore b/wp-content/upgrade-temp-backup/plugins/activitypub/.distignore deleted file mode 100644 index e864dd8d..00000000 --- a/wp-content/upgrade-temp-backup/plugins/activitypub/.distignore +++ /dev/null @@ -1,42 +0,0 @@ -.DS_Store -.editorconfig -.git -.gitignore -.github -.travis.yml -.codeclimate.yml -.data -.svnignore -.wordpress-org -.php_cs -Gruntfile.js -LINGUAS -Makefile -README.md -readme.md -CHANGELOG.md -CODE_OF_CONDUCT.md -FEDERATION.md -SECURITY.md -LICENSE.md -_site -_config.yml -bin -composer.json -composer.lock -docker-compose.yml -docker-compose-test.yml -Dockerfile -gulpfile.js -package.json -node_modules -npm-debug.log -phpcs.xml -package.json -package-lock.json -phpunit.xml -phpunit.xml.dist -tests -node_modules -vendor -src diff --git a/wp-content/upgrade-temp-backup/plugins/activitypub/activitypub.php b/wp-content/upgrade-temp-backup/plugins/activitypub/activitypub.php index 9c163161..ace3ff44 100644 --- a/wp-content/upgrade-temp-backup/plugins/activitypub/activitypub.php +++ b/wp-content/upgrade-temp-backup/plugins/activitypub/activitypub.php @@ -3,7 +3,7 @@ * Plugin Name: ActivityPub * Plugin URI: https://github.com/pfefferle/wordpress-activitypub/ * Description: The ActivityPub protocol is a decentralized social networking protocol based upon the ActivityStreams 2.0 data format. - * Version: 2.3.1 + * Version: 2.4.0 * Author: Matthias Pfefferle & Automattic * Author URI: https://automattic.com/ * License: MIT @@ -21,7 +21,7 @@ use function Activitypub\site_supports_blocks; require_once __DIR__ . '/includes/compat.php'; require_once __DIR__ . '/includes/functions.php'; -\define( 'ACTIVITYPUB_PLUGIN_VERSION', '2.3.1' ); +\define( 'ACTIVITYPUB_PLUGIN_VERSION', '2.4.0' ); /** * Initialize the plugin constants. @@ -50,7 +50,7 @@ require_once __DIR__ . '/includes/functions.php'; * Initialize REST routes. */ function rest_init() { - Rest\Users::init(); + Rest\Actors::init(); Rest\Outbox::init(); Rest\Inbox::init(); Rest\Followers::init(); @@ -100,6 +100,11 @@ function plugin_init() { require_once __DIR__ . '/integration/class-enable-mastodon-apps.php'; Integration\Enable_Mastodon_Apps::init(); + + if ( \defined( 'JETPACK__VERSION' ) && ! \defined( 'IS_WPCOM' ) ) { + require_once __DIR__ . '/integration/class-jetpack.php'; + Integration\Jetpack::init(); + } } \add_action( 'plugins_loaded', __NAMESPACE__ . '\plugin_init' ); diff --git a/wp-content/upgrade-temp-backup/plugins/activitypub/assets/css/activitypub-admin.css b/wp-content/upgrade-temp-backup/plugins/activitypub/assets/css/activitypub-admin.css index 07aadcad..7c7589e4 100644 --- a/wp-content/upgrade-temp-backup/plugins/activitypub/assets/css/activitypub-admin.css +++ b/wp-content/upgrade-temp-backup/plugins/activitypub/assets/css/activitypub-admin.css @@ -197,3 +197,8 @@ input.blog-user-identifier { border-bottom: none; margin-bottom: 0; } + +#dashboard_right_now li a.activitypub-followers::before { + content: "\f307"; + font-family: dashicons; +} diff --git a/wp-content/upgrade-temp-backup/plugins/activitypub/build/follow-me/index.js b/wp-content/upgrade-temp-backup/plugins/activitypub/build/follow-me/index.js index 12897d8b..55bc6759 100644 --- a/wp-content/upgrade-temp-backup/plugins/activitypub/build/follow-me/index.js +++ b/wp-content/upgrade-temp-backup/plugins/activitypub/build/follow-me/index.js @@ -1 +1 @@ -(()=>{"use strict";var e,t={647:(e,t,n)=>{const o=window.wp.blocks,r=window.React,l=window.wp.primitives,a=(0,r.createElement)(l.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(l.Path,{d:"M15.5 9.5a1 1 0 100-2 1 1 0 000 2zm0 1.5a2.5 2.5 0 100-5 2.5 2.5 0 000 5zm-2.25 6v-2a2.75 2.75 0 00-2.75-2.75h-4A2.75 2.75 0 003.75 15v2h1.5v-2c0-.69.56-1.25 1.25-1.25h4c.69 0 1.25.56 1.25 1.25v2h1.5zm7-2v2h-1.5v-2c0-.69-.56-1.25-1.25-1.25H15v-1.5h2.5A2.75 2.75 0 0120.25 15zM9.5 8.5a1 1 0 11-2 0 1 1 0 012 0zm1.5 0a2.5 2.5 0 11-5 0 2.5 2.5 0 015 0z",fillRule:"evenodd"})),i=window.wp.blockEditor,c=window.wp.i18n,u=window.wp.components,s=window.wp.data,p=window.wp.element,d=window._activityPubOptions?.enabled,v=window.wp.apiFetch;var m=n.n(v);function f(e){return`var(--wp--preset--color--${e})`}function w(e){if("string"!=typeof e)return null;if(e.match(/^#/))return e.substring(0,7);const[,,t]=e.split("|");return f(t)}function b(e,t,n=null,o=""){return n?`${e}${o} { ${t}: ${n}; }\n`:""}function y(e,t,n,o){return b(e,"background-color",t)+b(e,"color",n)+b(e,"background-color",o,":hover")+b(e,"background-color",o,":focus")}function _({selector:e,style:t,backgroundColor:n}){const o=function(e,t,n){const o=`${e} .components-button`,r=("string"==typeof(l=n)?f(l):l?.color?.background||null)||t?.color?.background;var l;return y(o,w(t?.elements?.link?.color?.text),r,w(t?.elements?.link?.[":hover"]?.color?.text))}(e,t,n);return(0,r.createElement)("style",null,o)}const h=(0,r.createElement)(l.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(l.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M5 4.5h11a.5.5 0 0 1 .5.5v11a.5.5 0 0 1-.5.5H5a.5.5 0 0 1-.5-.5V5a.5.5 0 0 1 .5-.5ZM3 5a2 2 0 0 1 2-2h11a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5Zm17 3v10.75c0 .69-.56 1.25-1.25 1.25H6v1.5h12.75a2.75 2.75 0 0 0 2.75-2.75V8H20Z"})),g=(0,r.createElement)(l.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(l.Path,{d:"M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"})),E=(0,p.forwardRef)((function({icon:e,size:t=24,...n},o){return(0,p.cloneElement)(e,{width:t,height:t,...n,ref:o})})),k=window.wp.compose;function x(e){try{return new URL(e),!0}catch(e){return!1}}function C({actionText:e,copyDescription:t,handle:n,resourceUrl:o}){const l=(0,c.__)("Loading...","activitypub"),a=(0,c.__)("Opening...","activitypub"),i=(0,c.__)("Error","activitypub"),s=(0,c.__)("Invalid","activitypub"),[d,v]=(0,p.useState)(e),[f,w]=(0,p.useState)(h),b=(0,k.useCopyToClipboard)(n,(()=>{w(g),setTimeout((()=>w(h)),1e3)})),[y,_]=(0,p.useState)(""),C=(0,p.useCallback)((()=>{let t;if(!x(y)&&!function(e){const t=e.replace(/^@/,"").split("@");return 2===t.length&&x(`https://${t[1]}`)}(y))return v(s),t=setTimeout((()=>v(e)),2e3),()=>clearTimeout(t);const n=o+y;v(l),m()({path:n}).then((({url:t})=>{v(a),setTimeout((()=>{window.open(t,"_blank"),v(e)}),200)})).catch((()=>{v(i),setTimeout((()=>v(e)),2e3)}))}),[y]);return(0,r.createElement)("div",{className:"activitypub__dialog"},(0,r.createElement)("div",{className:"activitypub-dialog__section"},(0,r.createElement)("h4",null,(0,c.__)("My Profile","activitypub")),(0,r.createElement)("div",{className:"activitypub-dialog-description"},t),(0,r.createElement)("div",{className:"activitypub-dialog__button-group"},(0,r.createElement)("input",{type:"text",value:n,readOnly:!0}),(0,r.createElement)(u.Button,{ref:b},(0,r.createElement)(E,{icon:f}),(0,c.__)("Copy","activitypub")))),(0,r.createElement)("div",{className:"activitypub-dialog__section"},(0,r.createElement)("h4",null,(0,c.__)("Your Profile","activitypub")),(0,r.createElement)("div",{className:"activitypub-dialog__description"},(0,p.createInterpolateElement)((0,c.__)("Or, if you know your own profile, we can start things that way! (eg https://example.com/yourusername or yourusername@example.com)","activitypub"),{code:(0,r.createElement)("code",null)})),(0,r.createElement)("div",{className:"activitypub-dialog__button-group"},(0,r.createElement)("input",{type:"text",value:y,onKeyDown:e=>{"Enter"===e?.code&&C()},onChange:e=>_(e.target.value)}),(0,r.createElement)(u.Button,{onClick:C},d))))}const{namespace:O}=window._activityPubOptions,S={avatar:"",webfinger:"@well@hello.dolly",name:(0,c.__)("Hello Dolly Fan Account","activitypub"),url:"#"};function N(e){if(!e)return S;const t={...S,...e};return t.avatar=t?.icon?.url,t}function $({profile:e,popupStyles:t,userId:n}){const{avatar:o,name:l,webfinger:a}=e;return(0,r.createElement)("div",{className:"activitypub-profile"},(0,r.createElement)("img",{className:"activitypub-profile__avatar",src:o,alt:l}),(0,r.createElement)("div",{className:"activitypub-profile__content"},(0,r.createElement)("div",{className:"activitypub-profile__name"},l),(0,r.createElement)("div",{className:"activitypub-profile__handle",title:a},a)),(0,r.createElement)(P,{profile:e,popupStyles:t,userId:n}))}function P({profile:e,popupStyles:t,userId:n}){const[o,l]=(0,p.useState)(!1),a=(0,c.sprintf)((0,c.__)("Follow %s","activitypub"),e?.name);return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(u.Button,{className:"activitypub-profile__follow",onClick:()=>l(!0)},(0,c.__)("Follow","activitypub")),o&&(0,r.createElement)(u.Modal,{className:"activitypub-profile__confirm activitypub__modal",onRequestClose:()=>l(!1),title:a},(0,r.createElement)(T,{profile:e,userId:n}),(0,r.createElement)("style",null,t)))}function T({profile:e,userId:t}){const{webfinger:n}=e,o=(0,c.__)("Follow","activitypub"),l=`/${O}/users/${t}/remote-follow?resource=`,a=(0,c.__)("Copy and paste my profile into the search field of your favorite fediverse app or server.","activitypub");return(0,r.createElement)(C,{actionText:o,copyDescription:a,handle:n,resourceUrl:l})}function I({selectedUser:e,style:t,backgroundColor:n,id:o,useId:l=!1,profileData:a=!1}){const[i,c]=(0,p.useState)(N()),u="site"===e?0:e,s=function(e){return y(".apfmd__button-group .components-button",w(e?.elements?.link?.color?.text)||"#111","#fff",w(e?.elements?.link?.[":hover"]?.color?.text)||"#333")}(t),d=l?{id:o}:{};function v(e){c(N(e))}return(0,p.useEffect)((()=>{if(a)return v(a);(function(e){const t={headers:{Accept:"application/activity+json"},path:`/${O}/users/${e}`};return m()(t)})(u).then(v)}),[u,a]),(0,r.createElement)("div",{...d},(0,r.createElement)(_,{selector:`#${o}`,style:t,backgroundColor:n}),(0,r.createElement)($,{profile:i,userId:u,popupStyles:s}))}(0,o.registerBlockType)("activitypub/follow-me",{edit:function({attributes:e,setAttributes:t}){const n=(0,i.useBlockProps)({className:"activitypub-follow-me-block-wrapper"}),o=function(){const e=d?.users?(0,s.useSelect)((e=>e("core").getUsers({who:"authors"}))):[];return(0,p.useMemo)((()=>{if(!e)return[];const t=d?.site?[{label:(0,c.__)("Whole Site","activitypub"),value:"site"}]:[];return e.reduce(((e,t)=>(e.push({label:t.name,value:`${t.id}`}),e)),t)}),[e])}(),{selectedUser:l}=e;return(0,p.useEffect)((()=>{o.length&&(o.find((({value:e})=>e===l))||t({selectedUser:o[0].value}))}),[l,o]),(0,r.createElement)("div",{...n},o.length>1&&(0,r.createElement)(i.InspectorControls,{key:"setting"},(0,r.createElement)(u.PanelBody,{title:(0,c.__)("Followers Options","activitypub")},(0,r.createElement)(u.SelectControl,{label:(0,c.__)("Select User","activitypub"),value:e.selectedUser,options:o,onChange:e=>t({selectedUser:e})}))),(0,r.createElement)(I,{...e,id:n.id}))},save:()=>null,icon:a})}},n={};function o(e){var r=n[e];if(void 0!==r)return r.exports;var l=n[e]={exports:{}};return t[e](l,l.exports,o),l.exports}o.m=t,e=[],o.O=(t,n,r,l)=>{if(!n){var a=1/0;for(s=0;s=l)&&Object.keys(o.O).every((e=>o.O[e](n[c])))?n.splice(c--,1):(i=!1,l0&&e[s-1][2]>l;s--)e[s]=e[s-1];e[s]=[n,r,l]},o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={338:0,301:0};o.O.j=t=>0===e[t];var t=(t,n)=>{var r,l,[a,i,c]=n,u=0;if(a.some((t=>0!==e[t]))){for(r in i)o.o(i,r)&&(o.m[r]=i[r]);if(c)var s=c(o)}for(t&&t(n);uo(647)));r=o.O(r)})(); \ No newline at end of file +(()=>{"use strict";var e,t={147:(e,t,n)=>{const o=window.wp.blocks,r=window.wp.element,l=window.wp.primitives,i=(0,r.createElement)(l.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(l.Path,{d:"M15.5 9.5a1 1 0 100-2 1 1 0 000 2zm0 1.5a2.5 2.5 0 100-5 2.5 2.5 0 000 5zm-2.25 6v-2a2.75 2.75 0 00-2.75-2.75h-4A2.75 2.75 0 003.75 15v2h1.5v-2c0-.69.56-1.25 1.25-1.25h4c.69 0 1.25.56 1.25 1.25v2h1.5zm7-2v2h-1.5v-2c0-.69-.56-1.25-1.25-1.25H15v-1.5h2.5A2.75 2.75 0 0120.25 15zM9.5 8.5a1 1 0 11-2 0 1 1 0 012 0zm1.5 0a2.5 2.5 0 11-5 0 2.5 2.5 0 015 0z",fillRule:"evenodd"})),a=window.wp.blockEditor,c=window.wp.i18n,u=window.wp.components,s=window.wp.data,p=window._activityPubOptions?.enabled,v=window.wp.apiFetch;var m=n.n(v);function d(e){return`var(--wp--preset--color--${e})`}function f(e){if("string"!=typeof e)return null;if(e.match(/^#/))return e.substring(0,7);const[,,t]=e.split("|");return d(t)}function y(e,t,n=null,o=""){return n?`${e}${o} { ${t}: ${n}; }\n`:""}function b(e,t,n,o){return y(e,"background-color",t)+y(e,"color",n)+y(e,"background-color",o,":hover")+y(e,"background-color",o,":focus")}function w({selector:e,style:t,backgroundColor:n}){const o=function(e,t,n){const o=`${e} .components-button`,r=("string"==typeof(l=n)?d(l):l?.color?.background||null)||t?.color?.background;var l;return b(o,f(t?.elements?.link?.color?.text),r,f(t?.elements?.link?.[":hover"]?.color?.text))}(e,t,n);return(0,r.createElement)("style",null,o)}const _=(0,r.createElement)(l.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(l.Path,{d:"M20.2 8v11c0 .7-.6 1.2-1.2 1.2H6v1.5h13c1.5 0 2.7-1.2 2.7-2.8V8zM18 16.4V4.6c0-.9-.7-1.6-1.6-1.6H4.6C3.7 3 3 3.7 3 4.6v11.8c0 .9.7 1.6 1.6 1.6h11.8c.9 0 1.6-.7 1.6-1.6zm-13.5 0V4.6c0-.1.1-.1.1-.1h11.8c.1 0 .1.1.1.1v11.8c0 .1-.1.1-.1.1H4.6l-.1-.1z"})),h=(0,r.createElement)(l.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(l.Path,{d:"M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"})),g=function({icon:e,size:t=24,...n}){return(0,r.cloneElement)(e,{width:t,height:t,...n})},E=window.wp.compose;function k(e){try{return new URL(e),!0}catch(e){return!1}}function x({actionText:e,copyDescription:t,handle:n,resourceUrl:o}){const l=(0,c.__)("Loading...","activitypub"),i=(0,c.__)("Opening...","activitypub"),a=(0,c.__)("Error","activitypub"),s=(0,c.__)("Invalid","activitypub"),[p,v]=(0,r.useState)(e),[d,f]=(0,r.useState)(_),y=(0,E.useCopyToClipboard)(n,(()=>{f(h),setTimeout((()=>f(_)),1e3)})),[b,w]=(0,r.useState)(""),x=(0,r.useCallback)((()=>{let t;if(!k(b)&&!function(e){const t=e.replace(/^@/,"").split("@");return 2===t.length&&k(`https://${t[1]}`)}(b))return v(s),t=setTimeout((()=>v(e)),2e3),()=>clearTimeout(t);const n=o+b;v(l),m()({path:n}).then((({url:t})=>{v(i),setTimeout((()=>{window.open(t,"_blank"),v(e)}),200)})).catch((()=>{v(a),setTimeout((()=>v(e)),2e3)}))}),[b]);return(0,r.createElement)("div",{className:"activitypub__dialog"},(0,r.createElement)("div",{className:"activitypub-dialog__section"},(0,r.createElement)("h4",null,(0,c.__)("My Profile","activitypub")),(0,r.createElement)("div",{className:"activitypub-dialog-description"},t),(0,r.createElement)("div",{className:"activitypub-dialog__button-group"},(0,r.createElement)("input",{type:"text",value:n,readOnly:!0}),(0,r.createElement)(u.Button,{ref:y},(0,r.createElement)(g,{icon:d}),(0,c.__)("Copy","activitypub")))),(0,r.createElement)("div",{className:"activitypub-dialog__section"},(0,r.createElement)("h4",null,(0,c.__)("Your Profile","activitypub")),(0,r.createElement)("div",{className:"activitypub-dialog__description"},(0,r.createInterpolateElement)((0,c.__)("Or, if you know your own profile, we can start things that way! (eg https://example.com/yourusername or yourusername@example.com)","activitypub"),{code:(0,r.createElement)("code",null)})),(0,r.createElement)("div",{className:"activitypub-dialog__button-group"},(0,r.createElement)("input",{type:"text",value:b,onKeyDown:e=>{"Enter"===e?.code&&x()},onChange:e=>w(e.target.value)}),(0,r.createElement)(u.Button,{onClick:x},p))))}const{namespace:C}=window._activityPubOptions,O={avatar:"",webfinger:"@well@hello.dolly",name:(0,c.__)("Hello Dolly Fan Account","activitypub"),url:"#"};function S(e){if(!e)return O;const t={...O,...e};return t.avatar=t?.icon?.url,t}function N({profile:e,popupStyles:t,userId:n}){const{avatar:o,name:l,webfinger:i}=e;return(0,r.createElement)("div",{className:"activitypub-profile"},(0,r.createElement)("img",{className:"activitypub-profile__avatar",src:o,alt:l}),(0,r.createElement)("div",{className:"activitypub-profile__content"},(0,r.createElement)("div",{className:"activitypub-profile__name"},l),(0,r.createElement)("div",{className:"activitypub-profile__handle",title:i},i)),(0,r.createElement)($,{profile:e,popupStyles:t,userId:n}))}function $({profile:e,popupStyles:t,userId:n}){const[o,l]=(0,r.useState)(!1),i=(0,c.sprintf)((0,c.__)("Follow %s","activitypub"),e?.name);return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(u.Button,{className:"activitypub-profile__follow",onClick:()=>l(!0)},(0,c.__)("Follow","activitypub")),o&&(0,r.createElement)(u.Modal,{className:"activitypub-profile__confirm activitypub__modal",onRequestClose:()=>l(!1),title:i},(0,r.createElement)(z,{profile:e,userId:n}),(0,r.createElement)("style",null,t)))}function z({profile:e,userId:t}){const{webfinger:n}=e,o=(0,c.__)("Follow","activitypub"),l=`/${C}/actors/${t}/remote-follow?resource=`,i=(0,c.__)("Copy and paste my profile into the search field of your favorite fediverse app or server.","activitypub");return(0,r.createElement)(x,{actionText:o,copyDescription:i,handle:n,resourceUrl:l})}function P({selectedUser:e,style:t,backgroundColor:n,id:o,useId:l=!1,profileData:i=!1}){const[a,c]=(0,r.useState)(S()),u="site"===e?0:e,s=function(e){return b(".apfmd__button-group .components-button",f(e?.elements?.link?.color?.text)||"#111","#fff",f(e?.elements?.link?.[":hover"]?.color?.text)||"#333")}(t),p=l?{id:o}:{};function v(e){c(S(e))}return(0,r.useEffect)((()=>{if(i)return v(i);(function(e){const t={headers:{Accept:"application/activity+json"},path:`/${C}/actors/${e}`};return m()(t)})(u).then(v)}),[u,i]),(0,r.createElement)("div",{...p},(0,r.createElement)(w,{selector:`#${o}`,style:t,backgroundColor:n}),(0,r.createElement)(N,{profile:a,userId:u,popupStyles:s}))}(0,o.registerBlockType)("activitypub/follow-me",{edit:function({attributes:e,setAttributes:t}){const n=(0,a.useBlockProps)({className:"activitypub-follow-me-block-wrapper"}),o=function(){const e=p?.users?(0,s.useSelect)((e=>e("core").getUsers({who:"authors"}))):[];return(0,r.useMemo)((()=>{if(!e)return[];const t=p?.site?[{label:(0,c.__)("Whole Site","activitypub"),value:"site"}]:[];return e.reduce(((e,t)=>(e.push({label:t.name,value:`${t.id}`}),e)),t)}),[e])}(),{selectedUser:l}=e;return(0,r.useEffect)((()=>{o.length&&(o.find((({value:e})=>e===l))||t({selectedUser:o[0].value}))}),[l,o]),(0,r.createElement)("div",{...n},o.length>1&&(0,r.createElement)(a.InspectorControls,{key:"setting"},(0,r.createElement)(u.PanelBody,{title:(0,c.__)("Followers Options","activitypub")},(0,r.createElement)(u.SelectControl,{label:(0,c.__)("Select User","activitypub"),value:e.selectedUser,options:o,onChange:e=>t({selectedUser:e})}))),(0,r.createElement)(P,{...e,id:n.id}))},save:()=>null,icon:i})}},n={};function o(e){var r=n[e];if(void 0!==r)return r.exports;var l=n[e]={exports:{}};return t[e](l,l.exports,o),l.exports}o.m=t,e=[],o.O=(t,n,r,l)=>{if(!n){var i=1/0;for(s=0;s=l)&&Object.keys(o.O).every((e=>o.O[e](n[c])))?n.splice(c--,1):(a=!1,l0&&e[s-1][2]>l;s--)e[s]=e[s-1];e[s]=[n,r,l]},o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={127:0,740:0};o.O.j=t=>0===e[t];var t=(t,n)=>{var r,l,i=n[0],a=n[1],c=n[2],u=0;if(i.some((t=>0!==e[t]))){for(r in a)o.o(a,r)&&(o.m[r]=a[r]);if(c)var s=c(o)}for(t&&t(n);uo(147)));r=o.O(r)})(); \ No newline at end of file diff --git a/wp-content/upgrade-temp-backup/plugins/activitypub/build/follow-me/view.js b/wp-content/upgrade-temp-backup/plugins/activitypub/build/follow-me/view.js index 3ebc7eab..690ccb48 100644 --- a/wp-content/upgrade-temp-backup/plugins/activitypub/build/follow-me/view.js +++ b/wp-content/upgrade-temp-backup/plugins/activitypub/build/follow-me/view.js @@ -1 +1 @@ -(()=>{"use strict";var e,t={421:(e,t,o)=>{const r=window.React,n=window.wp.element,a=window.wp.domReady;var i=o.n(a);const l=window.wp.apiFetch;var c=o.n(l);const u=window.wp.components,s=window.wp.i18n;function p(e){return`var(--wp--preset--color--${e})`}function d(e){if("string"!=typeof e)return null;if(e.match(/^#/))return e.substring(0,7);const[,,t]=e.split("|");return p(t)}function m(e,t,o=null,r=""){return o?`${e}${r} { ${t}: ${o}; }\n`:""}function v(e,t,o,r){return m(e,"background-color",t)+m(e,"color",o)+m(e,"background-color",r,":hover")+m(e,"background-color",r,":focus")}function f({selector:e,style:t,backgroundColor:o}){const n=function(e,t,o){const r=`${e} .components-button`,n=("string"==typeof(a=o)?p(a):a?.color?.background||null)||t?.color?.background;var a;return v(r,d(t?.elements?.link?.color?.text),n,d(t?.elements?.link?.[":hover"]?.color?.text))}(e,t,o);return(0,r.createElement)("style",null,n)}const y=window.wp.primitives,b=(0,r.createElement)(y.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(y.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M5 4.5h11a.5.5 0 0 1 .5.5v11a.5.5 0 0 1-.5.5H5a.5.5 0 0 1-.5-.5V5a.5.5 0 0 1 .5-.5ZM3 5a2 2 0 0 1 2-2h11a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5Zm17 3v10.75c0 .69-.56 1.25-1.25 1.25H6v1.5h12.75a2.75 2.75 0 0 0 2.75-2.75V8H20Z"})),w=(0,r.createElement)(y.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(y.Path,{d:"M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"})),_=(0,n.forwardRef)((function({icon:e,size:t=24,...o},r){return(0,n.cloneElement)(e,{width:t,height:t,...o,ref:r})})),h=window.wp.compose;function g(e){try{return new URL(e),!0}catch(e){return!1}}function E({actionText:e,copyDescription:t,handle:o,resourceUrl:a}){const i=(0,s.__)("Loading...","activitypub"),l=(0,s.__)("Opening...","activitypub"),p=(0,s.__)("Error","activitypub"),d=(0,s.__)("Invalid","activitypub"),[m,v]=(0,n.useState)(e),[f,y]=(0,n.useState)(b),E=(0,h.useCopyToClipboard)(o,(()=>{y(w),setTimeout((()=>y(b)),1e3)})),[k,x]=(0,n.useState)(""),O=(0,n.useCallback)((()=>{let t;if(!g(k)&&!function(e){const t=e.replace(/^@/,"").split("@");return 2===t.length&&g(`https://${t[1]}`)}(k))return v(d),t=setTimeout((()=>v(e)),2e3),()=>clearTimeout(t);const o=a+k;v(i),c()({path:o}).then((({url:t})=>{v(l),setTimeout((()=>{window.open(t,"_blank"),v(e)}),200)})).catch((()=>{v(p),setTimeout((()=>v(e)),2e3)}))}),[k]);return(0,r.createElement)("div",{className:"activitypub__dialog"},(0,r.createElement)("div",{className:"activitypub-dialog__section"},(0,r.createElement)("h4",null,(0,s.__)("My Profile","activitypub")),(0,r.createElement)("div",{className:"activitypub-dialog-description"},t),(0,r.createElement)("div",{className:"activitypub-dialog__button-group"},(0,r.createElement)("input",{type:"text",value:o,readOnly:!0}),(0,r.createElement)(u.Button,{ref:E},(0,r.createElement)(_,{icon:f}),(0,s.__)("Copy","activitypub")))),(0,r.createElement)("div",{className:"activitypub-dialog__section"},(0,r.createElement)("h4",null,(0,s.__)("Your Profile","activitypub")),(0,r.createElement)("div",{className:"activitypub-dialog__description"},(0,n.createInterpolateElement)((0,s.__)("Or, if you know your own profile, we can start things that way! (eg https://example.com/yourusername or yourusername@example.com)","activitypub"),{code:(0,r.createElement)("code",null)})),(0,r.createElement)("div",{className:"activitypub-dialog__button-group"},(0,r.createElement)("input",{type:"text",value:k,onKeyDown:e=>{"Enter"===e?.code&&O()},onChange:e=>x(e.target.value)}),(0,r.createElement)(u.Button,{onClick:O},m))))}const{namespace:k}=window._activityPubOptions,x={avatar:"",webfinger:"@well@hello.dolly",name:(0,s.__)("Hello Dolly Fan Account","activitypub"),url:"#"};function O(e){if(!e)return x;const t={...x,...e};return t.avatar=t?.icon?.url,t}function N({profile:e,popupStyles:t,userId:o}){const{avatar:n,name:a,webfinger:i}=e;return(0,r.createElement)("div",{className:"activitypub-profile"},(0,r.createElement)("img",{className:"activitypub-profile__avatar",src:n,alt:a}),(0,r.createElement)("div",{className:"activitypub-profile__content"},(0,r.createElement)("div",{className:"activitypub-profile__name"},a),(0,r.createElement)("div",{className:"activitypub-profile__handle",title:i},i)),(0,r.createElement)(C,{profile:e,popupStyles:t,userId:o}))}function C({profile:e,popupStyles:t,userId:o}){const[a,i]=(0,n.useState)(!1),l=(0,s.sprintf)((0,s.__)("Follow %s","activitypub"),e?.name);return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(u.Button,{className:"activitypub-profile__follow",onClick:()=>i(!0)},(0,s.__)("Follow","activitypub")),a&&(0,r.createElement)(u.Modal,{className:"activitypub-profile__confirm activitypub__modal",onRequestClose:()=>i(!1),title:l},(0,r.createElement)(S,{profile:e,userId:o}),(0,r.createElement)("style",null,t)))}function S({profile:e,userId:t}){const{webfinger:o}=e,n=(0,s.__)("Follow","activitypub"),a=`/${k}/users/${t}/remote-follow?resource=`,i=(0,s.__)("Copy and paste my profile into the search field of your favorite fediverse app or server.","activitypub");return(0,r.createElement)(E,{actionText:n,copyDescription:i,handle:o,resourceUrl:a})}function $({selectedUser:e,style:t,backgroundColor:o,id:a,useId:i=!1,profileData:l=!1}){const[u,s]=(0,n.useState)(O()),p="site"===e?0:e,m=function(e){return v(".apfmd__button-group .components-button",d(e?.elements?.link?.color?.text)||"#111","#fff",d(e?.elements?.link?.[":hover"]?.color?.text)||"#333")}(t),y=i?{id:a}:{};function b(e){s(O(e))}return(0,n.useEffect)((()=>{if(l)return b(l);(function(e){const t={headers:{Accept:"application/activity+json"},path:`/${k}/users/${e}`};return c()(t)})(p).then(b)}),[p,l]),(0,r.createElement)("div",{...y},(0,r.createElement)(f,{selector:`#${a}`,style:t,backgroundColor:o}),(0,r.createElement)(N,{profile:u,userId:p,popupStyles:m}))}let I=1;i()((()=>{[].forEach.call(document.querySelectorAll(".activitypub-follow-me-block-wrapper"),(e=>{const t=JSON.parse(e.dataset.attrs);(0,n.render)((0,r.createElement)($,{...t,id:"activitypub-follow-me-block-"+I++,useId:!0}),e)}))}))}},o={};function r(e){var n=o[e];if(void 0!==n)return n.exports;var a=o[e]={exports:{}};return t[e](a,a.exports,r),a.exports}r.m=t,e=[],r.O=(t,o,n,a)=>{if(!o){var i=1/0;for(s=0;s=a)&&Object.keys(r.O).every((e=>r.O[e](o[c])))?o.splice(c--,1):(l=!1,a0&&e[s-1][2]>a;s--)e[s]=e[s-1];e[s]=[o,n,a]},r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var o in t)r.o(t,o)&&!r.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={41:0,301:0};r.O.j=t=>0===e[t];var t=(t,o)=>{var n,a,[i,l,c]=o,u=0;if(i.some((t=>0!==e[t]))){for(n in l)r.o(l,n)&&(r.m[n]=l[n]);if(c)var s=c(r)}for(t&&t(o);ur(421)));n=r.O(n)})(); \ No newline at end of file +(()=>{"use strict";var e,t={792:(e,t,o)=>{const r=window.wp.element,n=window.wp.domReady;var a=o.n(n);const c=window.wp.apiFetch;var i=o.n(c);const l=window.wp.components,u=window.wp.i18n;function s(e){return`var(--wp--preset--color--${e})`}function p(e){if("string"!=typeof e)return null;if(e.match(/^#/))return e.substring(0,7);const[,,t]=e.split("|");return s(t)}function m(e,t,o=null,r=""){return o?`${e}${r} { ${t}: ${o}; }\n`:""}function d(e,t,o,r){return m(e,"background-color",t)+m(e,"color",o)+m(e,"background-color",r,":hover")+m(e,"background-color",r,":focus")}function v({selector:e,style:t,backgroundColor:o}){const n=function(e,t,o){const r=`${e} .components-button`,n=("string"==typeof(a=o)?s(a):a?.color?.background||null)||t?.color?.background;var a;return d(r,p(t?.elements?.link?.color?.text),n,p(t?.elements?.link?.[":hover"]?.color?.text))}(e,t,o);return(0,r.createElement)("style",null,n)}const f=window.wp.primitives,y=(0,r.createElement)(f.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(f.Path,{d:"M20.2 8v11c0 .7-.6 1.2-1.2 1.2H6v1.5h13c1.5 0 2.7-1.2 2.7-2.8V8zM18 16.4V4.6c0-.9-.7-1.6-1.6-1.6H4.6C3.7 3 3 3.7 3 4.6v11.8c0 .9.7 1.6 1.6 1.6h11.8c.9 0 1.6-.7 1.6-1.6zm-13.5 0V4.6c0-.1.1-.1.1-.1h11.8c.1 0 .1.1.1.1v11.8c0 .1-.1.1-.1.1H4.6l-.1-.1z"})),b=(0,r.createElement)(f.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(f.Path,{d:"M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"})),w=function({icon:e,size:t=24,...o}){return(0,r.cloneElement)(e,{width:t,height:t,...o})},_=window.wp.compose;function h(e){try{return new URL(e),!0}catch(e){return!1}}function g({actionText:e,copyDescription:t,handle:o,resourceUrl:n}){const a=(0,u.__)("Loading...","activitypub"),c=(0,u.__)("Opening...","activitypub"),s=(0,u.__)("Error","activitypub"),p=(0,u.__)("Invalid","activitypub"),[m,d]=(0,r.useState)(e),[v,f]=(0,r.useState)(y),g=(0,_.useCopyToClipboard)(o,(()=>{f(b),setTimeout((()=>f(y)),1e3)})),[E,k]=(0,r.useState)(""),x=(0,r.useCallback)((()=>{let t;if(!h(E)&&!function(e){const t=e.replace(/^@/,"").split("@");return 2===t.length&&h(`https://${t[1]}`)}(E))return d(p),t=setTimeout((()=>d(e)),2e3),()=>clearTimeout(t);const o=n+E;d(a),i()({path:o}).then((({url:t})=>{d(c),setTimeout((()=>{window.open(t,"_blank"),d(e)}),200)})).catch((()=>{d(s),setTimeout((()=>d(e)),2e3)}))}),[E]);return(0,r.createElement)("div",{className:"activitypub__dialog"},(0,r.createElement)("div",{className:"activitypub-dialog__section"},(0,r.createElement)("h4",null,(0,u.__)("My Profile","activitypub")),(0,r.createElement)("div",{className:"activitypub-dialog-description"},t),(0,r.createElement)("div",{className:"activitypub-dialog__button-group"},(0,r.createElement)("input",{type:"text",value:o,readOnly:!0}),(0,r.createElement)(l.Button,{ref:g},(0,r.createElement)(w,{icon:v}),(0,u.__)("Copy","activitypub")))),(0,r.createElement)("div",{className:"activitypub-dialog__section"},(0,r.createElement)("h4",null,(0,u.__)("Your Profile","activitypub")),(0,r.createElement)("div",{className:"activitypub-dialog__description"},(0,r.createInterpolateElement)((0,u.__)("Or, if you know your own profile, we can start things that way! (eg https://example.com/yourusername or yourusername@example.com)","activitypub"),{code:(0,r.createElement)("code",null)})),(0,r.createElement)("div",{className:"activitypub-dialog__button-group"},(0,r.createElement)("input",{type:"text",value:E,onKeyDown:e=>{"Enter"===e?.code&&x()},onChange:e=>k(e.target.value)}),(0,r.createElement)(l.Button,{onClick:x},m))))}const{namespace:E}=window._activityPubOptions,k={avatar:"",webfinger:"@well@hello.dolly",name:(0,u.__)("Hello Dolly Fan Account","activitypub"),url:"#"};function x(e){if(!e)return k;const t={...k,...e};return t.avatar=t?.icon?.url,t}function O({profile:e,popupStyles:t,userId:o}){const{avatar:n,name:a,webfinger:c}=e;return(0,r.createElement)("div",{className:"activitypub-profile"},(0,r.createElement)("img",{className:"activitypub-profile__avatar",src:n,alt:a}),(0,r.createElement)("div",{className:"activitypub-profile__content"},(0,r.createElement)("div",{className:"activitypub-profile__name"},a),(0,r.createElement)("div",{className:"activitypub-profile__handle",title:c},c)),(0,r.createElement)(C,{profile:e,popupStyles:t,userId:o}))}function C({profile:e,popupStyles:t,userId:o}){const[n,a]=(0,r.useState)(!1),c=(0,u.sprintf)((0,u.__)("Follow %s","activitypub"),e?.name);return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(l.Button,{className:"activitypub-profile__follow",onClick:()=>a(!0)},(0,u.__)("Follow","activitypub")),n&&(0,r.createElement)(l.Modal,{className:"activitypub-profile__confirm activitypub__modal",onRequestClose:()=>a(!1),title:c},(0,r.createElement)(N,{profile:e,userId:o}),(0,r.createElement)("style",null,t)))}function N({profile:e,userId:t}){const{webfinger:o}=e,n=(0,u.__)("Follow","activitypub"),a=`/${E}/actors/${t}/remote-follow?resource=`,c=(0,u.__)("Copy and paste my profile into the search field of your favorite fediverse app or server.","activitypub");return(0,r.createElement)(g,{actionText:n,copyDescription:c,handle:o,resourceUrl:a})}function S({selectedUser:e,style:t,backgroundColor:o,id:n,useId:a=!1,profileData:c=!1}){const[l,u]=(0,r.useState)(x()),s="site"===e?0:e,m=function(e){return d(".apfmd__button-group .components-button",p(e?.elements?.link?.color?.text)||"#111","#fff",p(e?.elements?.link?.[":hover"]?.color?.text)||"#333")}(t),f=a?{id:n}:{};function y(e){u(x(e))}return(0,r.useEffect)((()=>{if(c)return y(c);(function(e){const t={headers:{Accept:"application/activity+json"},path:`/${E}/actors/${e}`};return i()(t)})(s).then(y)}),[s,c]),(0,r.createElement)("div",{...f},(0,r.createElement)(v,{selector:`#${n}`,style:t,backgroundColor:o}),(0,r.createElement)(O,{profile:l,userId:s,popupStyles:m}))}let $=1;a()((()=>{[].forEach.call(document.querySelectorAll(".activitypub-follow-me-block-wrapper"),(e=>{const t=JSON.parse(e.dataset.attrs);(0,r.render)((0,r.createElement)(S,{...t,id:"activitypub-follow-me-block-"+$++,useId:!0}),e)}))}))}},o={};function r(e){var n=o[e];if(void 0!==n)return n.exports;var a=o[e]={exports:{}};return t[e](a,a.exports,r),a.exports}r.m=t,e=[],r.O=(t,o,n,a)=>{if(!o){var c=1/0;for(s=0;s=a)&&Object.keys(r.O).every((e=>r.O[e](o[l])))?o.splice(l--,1):(i=!1,a0&&e[s-1][2]>a;s--)e[s]=e[s-1];e[s]=[o,n,a]},r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var o in t)r.o(t,o)&&!r.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={529:0,740:0};r.O.j=t=>0===e[t];var t=(t,o)=>{var n,a,c=o[0],i=o[1],l=o[2],u=0;if(c.some((t=>0!==e[t]))){for(n in i)r.o(i,n)&&(r.m[n]=i[n]);if(l)var s=l(r)}for(t&&t(o);ur(792)));n=r.O(n)})(); \ No newline at end of file diff --git a/wp-content/upgrade-temp-backup/plugins/activitypub/build/followers/index.asset.php b/wp-content/upgrade-temp-backup/plugins/activitypub/build/followers/index.asset.php index b9383244..067872e2 100644 --- a/wp-content/upgrade-temp-backup/plugins/activitypub/build/followers/index.asset.php +++ b/wp-content/upgrade-temp-backup/plugins/activitypub/build/followers/index.asset.php @@ -1 +1 @@ - array('react', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-primitives', 'wp-url'), 'version' => '536d43b3eaab93a5c9ef'); + array('react', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-primitives', 'wp-url'), 'version' => 'a351235e5feab398a954'); diff --git a/wp-content/upgrade-temp-backup/plugins/activitypub/build/followers/index.js b/wp-content/upgrade-temp-backup/plugins/activitypub/build/followers/index.js index f10e58ff..4a56a22c 100644 --- a/wp-content/upgrade-temp-backup/plugins/activitypub/build/followers/index.js +++ b/wp-content/upgrade-temp-backup/plugins/activitypub/build/followers/index.js @@ -1,3 +1,3 @@ -(()=>{var e={942:(e,t)=>{var a;!function(){"use strict";var n={}.hasOwnProperty;function r(){for(var e="",t=0;t{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},a.d=(e,t)=>{for(var n in t)a.o(t,n)&&!a.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";const e=window.wp.blocks,t=window.React,n=window.wp.primitives,r=(0,t.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,t.createElement)(n.Path,{d:"M15.5 9.5a1 1 0 100-2 1 1 0 000 2zm0 1.5a2.5 2.5 0 100-5 2.5 2.5 0 000 5zm-2.25 6v-2a2.75 2.75 0 00-2.75-2.75h-4A2.75 2.75 0 003.75 15v2h1.5v-2c0-.69.56-1.25 1.25-1.25h4c.69 0 1.25.56 1.25 1.25v2h1.5zm7-2v2h-1.5v-2c0-.69-.56-1.25-1.25-1.25H15v-1.5h2.5A2.75 2.75 0 0120.25 15zM9.5 8.5a1 1 0 11-2 0 1 1 0 012 0zm1.5 0a2.5 2.5 0 11-5 0 2.5 2.5 0 015 0z",fillRule:"evenodd"})),l=window.wp.components,o=window.wp.element,i=window.wp.blockEditor,c=window.wp.i18n,s=window.wp.apiFetch;var p=a.n(s);const u=window.wp.url;var v=a(942),m=a.n(v);function w({active:e,children:a,page:n,pageClick:r,className:l}){const o=m()("wp-block activitypub-pager",l,{current:e});return(0,t.createElement)("a",{className:o,onClick:t=>{t.preventDefault(),!e&&r(n)}},a)}const b={outlined:"outlined",minimal:"minimal"};function d({compact:e,nextLabel:a,page:n,pageClick:r,perPage:l,prevLabel:o,total:i,variant:c=b.outlined}){const s=((e,t)=>{let a=[1,e-2,e-1,e,e+1,e+2,t];a.sort(((e,t)=>e-t)),a=a.filter(((e,a,n)=>e>=1&&e<=t&&n.lastIndexOf(e)===a));for(let e=a.length-2;e>=0;e--)a[e]===a[e+1]&&a.splice(e+1,1);return a})(n,Math.ceil(i/l)),p=m()("alignwide wp-block-query-pagination is-content-justification-space-between is-layout-flex wp-block-query-pagination-is-layout-flex",`is-${c}`,{"is-compact":e});return(0,t.createElement)("nav",{className:p},o&&(0,t.createElement)(w,{key:"prev",page:n-1,pageClick:r,active:1===n,"aria-label":o,className:"wp-block-query-pagination-previous block-editor-block-list__block"},o),!e&&(0,t.createElement)("div",{className:"block-editor-block-list__block wp-block wp-block-query-pagination-numbers"},s.map((e=>(0,t.createElement)(w,{key:e,page:e,pageClick:r,active:e===n,className:"page-numbers"},e)))),a&&(0,t.createElement)(w,{key:"next",page:n+1,pageClick:r,active:n===Math.ceil(i/l),"aria-label":a,className:"wp-block-query-pagination-next block-editor-block-list__block"},a))}const{namespace:f}=window._activityPubOptions;function g({selectedUser:e,per_page:a,order:n,title:r,page:l,setPage:i,className:s="",followLinks:v=!0,followerData:m=!1}){const w="site"===e?0:e,[b,g]=(0,t.useState)([]),[k,h]=(0,t.useState)(0),[E,_]=(0,t.useState)(0),[x,C]=function(){const[e,a]=(0,t.useState)(1);return[e,a]}(),S=l||x,N=i||C,P=(0,o.createInterpolateElement)(/* translators: arrow for previous followers link */ /* translators: arrow for previous followers link */ -(0,c.__)(" Less","activitypub"),{span:(0,t.createElement)("span",{class:"wp-block-query-pagination-previous-arrow is-arrow-arrow","aria-hidden":"true"})}),L=(0,o.createInterpolateElement)(/* translators: arrow for next followers link */ /* translators: arrow for next followers link */ -(0,c.__)("More ","activitypub"),{span:(0,t.createElement)("span",{class:"wp-block-query-pagination-next-arrow is-arrow-arrow","aria-hidden":"true"})}),O=(e,t)=>{g(e),_(t),h(Math.ceil(t/a))};return(0,t.useEffect)((()=>{if(m&&1===S)return O(m.followers,m.total);const e=function(e,t,a,n){const r=`/${f}/users/${e}/followers`,l={per_page:t,order:a,page:n,context:"full"};return(0,u.addQueryArgs)(r,l)}(w,a,n,S);p()({path:e}).then((e=>O(e.orderedItems,e.totalItems))).catch((()=>{}))}),[w,a,n,S,m]),(0,t.createElement)("div",{className:"activitypub-follower-block "+s},(0,t.createElement)("h3",null,r),(0,t.createElement)("ul",null,b&&b.map((e=>(0,t.createElement)("li",{key:e.url},(0,t.createElement)(y,{...e,followLinks:v}))))),k>1&&(0,t.createElement)(d,{page:S,perPage:a,total:E,pageClick:N,nextLabel:L,prevLabel:P,compact:"is-style-compact"===s}))}function y({name:e,icon:a,url:n,preferredUsername:r,followLinks:o=!0}){const i=`@${r}`,c={};return o||(c.onClick=e=>e.preventDefault()),(0,t.createElement)(l.ExternalLink,{className:"activitypub-link",href:n,title:i,...c},(0,t.createElement)("img",{width:"40",height:"40",src:a.url,class:"avatar activitypub-avatar",alt:e}),(0,t.createElement)("span",{class:"activitypub-actor"},(0,t.createElement)("strong",{className:"activitypub-name"},e),(0,t.createElement)("span",{class:"sep"},"/"),(0,t.createElement)("span",{class:"activitypub-handle"},i)))}const k=window.wp.data,h=window._activityPubOptions?.enabled;(0,e.registerBlockType)("activitypub/followers",{edit:function({attributes:e,setAttributes:a}){const{order:n,per_page:r,selectedUser:s,title:p}=e,u=(0,i.useBlockProps)(),[v,m]=(0,o.useState)(1),w=[{label:(0,c.__)("New to old","activitypub"),value:"desc"},{label:(0,c.__)("Old to new","activitypub"),value:"asc"}],b=function(){const e=h?.users?(0,k.useSelect)((e=>e("core").getUsers({who:"authors"}))):[];return(0,o.useMemo)((()=>{if(!e)return[];const t=h?.site?[{label:(0,c.__)("Whole Site","activitypub"),value:"site"}]:[];return e.reduce(((e,t)=>(e.push({label:t.name,value:`${t.id}`}),e)),t)}),[e])}(),d=e=>t=>{m(1),a({[e]:t})};return(0,o.useEffect)((()=>{b.length&&(b.find((({value:e})=>e===s))||a({selectedUser:b[0].value}))}),[s,b]),(0,t.createElement)("div",{...u},(0,t.createElement)(i.InspectorControls,{key:"setting"},(0,t.createElement)(l.PanelBody,{title:(0,c.__)("Followers Options","activitypub")},(0,t.createElement)(l.TextControl,{label:(0,c.__)("Title","activitypub"),help:(0,c.__)("Title to display above the list of followers. Blank for none.","activitypub"),value:p,onChange:e=>a({title:e})}),b.length>1&&(0,t.createElement)(l.SelectControl,{label:(0,c.__)("Select User","activitypub"),value:s,options:b,onChange:d("selectedUser")}),(0,t.createElement)(l.SelectControl,{label:(0,c.__)("Sort","activitypub"),value:n,options:w,onChange:d("order")}),(0,t.createElement)(l.RangeControl,{label:(0,c.__)("Number of Followers","activitypub"),value:r,onChange:d("per_page"),min:1,max:10}))),(0,t.createElement)(g,{...e,page:v,setPage:m,followLinks:!1}))},save:()=>null,icon:r})})()})(); \ No newline at end of file +(()=>{var e={184:(e,t)=>{var a;!function(){"use strict";var l={}.hasOwnProperty;function n(){for(var e=[],t=0;t{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},a.d=(e,t)=>{for(var l in t)a.o(t,l)&&!a.o(e,l)&&Object.defineProperty(e,l,{enumerable:!0,get:t[l]})},a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";const e=window.wp.blocks,t=window.wp.element,l=window.wp.primitives,n=(0,t.createElement)(l.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,t.createElement)(l.Path,{d:"M15.5 9.5a1 1 0 100-2 1 1 0 000 2zm0 1.5a2.5 2.5 0 100-5 2.5 2.5 0 000 5zm-2.25 6v-2a2.75 2.75 0 00-2.75-2.75h-4A2.75 2.75 0 003.75 15v2h1.5v-2c0-.69.56-1.25 1.25-1.25h4c.69 0 1.25.56 1.25 1.25v2h1.5zm7-2v2h-1.5v-2c0-.69-.56-1.25-1.25-1.25H15v-1.5h2.5A2.75 2.75 0 0120.25 15zM9.5 8.5a1 1 0 11-2 0 1 1 0 012 0zm1.5 0a2.5 2.5 0 11-5 0 2.5 2.5 0 015 0z",fillRule:"evenodd"})),r=window.wp.components,o=window.wp.blockEditor,i=window.wp.i18n,c=window.React,s=window.wp.apiFetch;var p=a.n(s);const u=window.wp.url;var v=a(184),m=a.n(v);function w({active:e,children:a,page:l,pageClick:n,className:r}){const o=m()("wp-block activitypub-pager",r,{current:e});return(0,t.createElement)("a",{className:o,onClick:t=>{t.preventDefault(),!e&&n(l)}},a)}const b={outlined:"outlined",minimal:"minimal"};function d({compact:e,nextLabel:a,page:l,pageClick:n,perPage:r,prevLabel:o,total:i,variant:c=b.outlined}){const s=((e,t)=>{let a=[1,e-2,e-1,e,e+1,e+2,t];a.sort(((e,t)=>e-t)),a=a.filter(((e,a,l)=>e>=1&&e<=t&&l.lastIndexOf(e)===a));for(let e=a.length-2;e>=0;e--)a[e]===a[e+1]&&a.splice(e+1,1);return a})(l,Math.ceil(i/r)),p=m()("alignwide wp-block-query-pagination is-content-justification-space-between is-layout-flex wp-block-query-pagination-is-layout-flex",`is-${c}`,{"is-compact":e});return(0,t.createElement)("nav",{className:p},o&&(0,t.createElement)(w,{key:"prev",page:l-1,pageClick:n,active:1===l,"aria-label":o,className:"wp-block-query-pagination-previous block-editor-block-list__block"},o),!e&&(0,t.createElement)("div",{className:"block-editor-block-list__block wp-block wp-block-query-pagination-numbers"},s.map((e=>(0,t.createElement)(w,{key:e,page:e,pageClick:n,active:e===l,className:"page-numbers"},e)))),a&&(0,t.createElement)(w,{key:"next",page:l+1,pageClick:n,active:l===Math.ceil(i/r),"aria-label":a,className:"wp-block-query-pagination-next block-editor-block-list__block"},a))}const{namespace:g}=window._activityPubOptions;function f({selectedUser:e,per_page:a,order:l,title:n,page:r,setPage:o,className:s="",followLinks:v=!0,followerData:m=!1}){const w="site"===e?0:e,[b,f]=(0,c.useState)([]),[h,k]=(0,c.useState)(0),[E,_]=(0,c.useState)(0),[x,C]=function(){const[e,t]=(0,c.useState)(1);return[e,t]}(),S=r||x,N=o||C,P=(0,t.createInterpolateElement)(/* translators: arrow for previous followers link */ +(0,i.__)(" Less","activitypub"),{span:(0,t.createElement)("span",{class:"wp-block-query-pagination-previous-arrow is-arrow-arrow","aria-hidden":"true"})}),L=(0,t.createInterpolateElement)(/* translators: arrow for next followers link */ +(0,i.__)("More ","activitypub"),{span:(0,t.createElement)("span",{class:"wp-block-query-pagination-next-arrow is-arrow-arrow","aria-hidden":"true"})}),O=(e,t)=>{f(e),_(t),k(Math.ceil(t/a))};return(0,c.useEffect)((()=>{if(m&&1===S)return O(m.followers,m.total);const e=function(e,t,a,l){const n=`/${g}/actors/${e}/followers`,r={per_page:t,order:a,page:l,context:"full"};return(0,u.addQueryArgs)(n,r)}(w,a,l,S);p()({path:e}).then((e=>O(e.orderedItems,e.totalItems))).catch((()=>{}))}),[w,a,l,S,m]),(0,t.createElement)("div",{className:"activitypub-follower-block "+s},(0,t.createElement)("h3",null,n),(0,t.createElement)("ul",null,b&&b.map((e=>(0,t.createElement)("li",{key:e.url},(0,t.createElement)(y,{...e,followLinks:v}))))),h>1&&(0,t.createElement)(d,{page:S,perPage:a,total:E,pageClick:N,nextLabel:L,prevLabel:P,compact:"is-style-compact"===s}))}function y({name:e,icon:a,url:l,preferredUsername:n,followLinks:o=!0}){const i=`@${n}`,c={};return o||(c.onClick=e=>e.preventDefault()),(0,t.createElement)(r.ExternalLink,{className:"activitypub-link",href:l,title:i,...c},(0,t.createElement)("img",{width:"40",height:"40",src:a.url,class:"avatar activitypub-avatar",alt:e}),(0,t.createElement)("span",{class:"activitypub-actor"},(0,t.createElement)("strong",{className:"activitypub-name"},e),(0,t.createElement)("span",{class:"sep"},"/"),(0,t.createElement)("span",{class:"activitypub-handle"},i)))}const h=window.wp.data,k=window._activityPubOptions?.enabled;(0,e.registerBlockType)("activitypub/followers",{edit:function({attributes:e,setAttributes:a}){const{order:l,per_page:n,selectedUser:c,title:s}=e,p=(0,o.useBlockProps)(),[u,v]=(0,t.useState)(1),m=[{label:(0,i.__)("New to old","activitypub"),value:"desc"},{label:(0,i.__)("Old to new","activitypub"),value:"asc"}],w=function(){const e=k?.users?(0,h.useSelect)((e=>e("core").getUsers({who:"authors"}))):[];return(0,t.useMemo)((()=>{if(!e)return[];const t=k?.site?[{label:(0,i.__)("Whole Site","activitypub"),value:"site"}]:[];return e.reduce(((e,t)=>(e.push({label:t.name,value:`${t.id}`}),e)),t)}),[e])}(),b=e=>t=>{v(1),a({[e]:t})};return(0,t.useEffect)((()=>{w.length&&(w.find((({value:e})=>e===c))||a({selectedUser:w[0].value}))}),[c,w]),(0,t.createElement)("div",{...p},(0,t.createElement)(o.InspectorControls,{key:"setting"},(0,t.createElement)(r.PanelBody,{title:(0,i.__)("Followers Options","activitypub")},(0,t.createElement)(r.TextControl,{label:(0,i.__)("Title","activitypub"),help:(0,i.__)("Title to display above the list of followers. Blank for none.","activitypub"),value:s,onChange:e=>a({title:e})}),w.length>1&&(0,t.createElement)(r.SelectControl,{label:(0,i.__)("Select User","activitypub"),value:c,options:w,onChange:b("selectedUser")}),(0,t.createElement)(r.SelectControl,{label:(0,i.__)("Sort","activitypub"),value:l,options:m,onChange:b("order")}),(0,t.createElement)(r.RangeControl,{label:(0,i.__)("Number of Followers","activitypub"),value:n,onChange:b("per_page"),min:1,max:10}))),(0,t.createElement)(f,{...e,page:u,setPage:v,followLinks:!1}))},save:()=>null,icon:n})})()})(); \ No newline at end of file diff --git a/wp-content/upgrade-temp-backup/plugins/activitypub/build/followers/view.asset.php b/wp-content/upgrade-temp-backup/plugins/activitypub/build/followers/view.asset.php index c11c39ca..b85c9d71 100644 --- a/wp-content/upgrade-temp-backup/plugins/activitypub/build/followers/view.asset.php +++ b/wp-content/upgrade-temp-backup/plugins/activitypub/build/followers/view.asset.php @@ -1 +1 @@ - array('react', 'wp-api-fetch', 'wp-components', 'wp-dom-ready', 'wp-element', 'wp-i18n', 'wp-url'), 'version' => '23bc54443801976420cd'); + array('react', 'wp-api-fetch', 'wp-components', 'wp-dom-ready', 'wp-element', 'wp-i18n', 'wp-url'), 'version' => '8c01e26171636c3b698f'); diff --git a/wp-content/upgrade-temp-backup/plugins/activitypub/build/followers/view.js b/wp-content/upgrade-temp-backup/plugins/activitypub/build/followers/view.js index 97227046..5b6083d4 100644 --- a/wp-content/upgrade-temp-backup/plugins/activitypub/build/followers/view.js +++ b/wp-content/upgrade-temp-backup/plugins/activitypub/build/followers/view.js @@ -1,3 +1,3 @@ -(()=>{var e,t={250:(e,t,a)=>{"use strict";const r=window.React,n=window.wp.apiFetch;var l=a.n(n);const o=window.wp.url,i=window.wp.element,c=window.wp.i18n;var s=a(942),p=a.n(s);function u({active:e,children:t,page:a,pageClick:n,className:l}){const o=p()("wp-block activitypub-pager",l,{current:e});return(0,r.createElement)("a",{className:o,onClick:t=>{t.preventDefault(),!e&&n(a)}},t)}const m={outlined:"outlined",minimal:"minimal"};function f({compact:e,nextLabel:t,page:a,pageClick:n,perPage:l,prevLabel:o,total:i,variant:c=m.outlined}){const s=((e,t)=>{let a=[1,e-2,e-1,e,e+1,e+2,t];a.sort(((e,t)=>e-t)),a=a.filter(((e,a,r)=>e>=1&&e<=t&&r.lastIndexOf(e)===a));for(let e=a.length-2;e>=0;e--)a[e]===a[e+1]&&a.splice(e+1,1);return a})(a,Math.ceil(i/l)),f=p()("alignwide wp-block-query-pagination is-content-justification-space-between is-layout-flex wp-block-query-pagination-is-layout-flex",`is-${c}`,{"is-compact":e});return(0,r.createElement)("nav",{className:f},o&&(0,r.createElement)(u,{key:"prev",page:a-1,pageClick:n,active:1===a,"aria-label":o,className:"wp-block-query-pagination-previous block-editor-block-list__block"},o),!e&&(0,r.createElement)("div",{className:"block-editor-block-list__block wp-block wp-block-query-pagination-numbers"},s.map((e=>(0,r.createElement)(u,{key:e,page:e,pageClick:n,active:e===a,className:"page-numbers"},e)))),t&&(0,r.createElement)(u,{key:"next",page:a+1,pageClick:n,active:a===Math.ceil(i/l),"aria-label":t,className:"wp-block-query-pagination-next block-editor-block-list__block"},t))}const v=window.wp.components,{namespace:b}=window._activityPubOptions;function d({selectedUser:e,per_page:t,order:a,title:n,page:s,setPage:p,className:u="",followLinks:m=!0,followerData:v=!1}){const d="site"===e?0:e,[g,y]=(0,r.useState)([]),[k,h]=(0,r.useState)(0),[E,x]=(0,r.useState)(0),[_,O]=function(){const[e,t]=(0,r.useState)(1);return[e,t]}(),N=s||_,S=p||O,C=(0,i.createInterpolateElement)(/* translators: arrow for previous followers link */ /* translators: arrow for previous followers link */ -(0,c.__)(" Less","activitypub"),{span:(0,r.createElement)("span",{class:"wp-block-query-pagination-previous-arrow is-arrow-arrow","aria-hidden":"true"})}),L=(0,i.createInterpolateElement)(/* translators: arrow for next followers link */ /* translators: arrow for next followers link */ -(0,c.__)("More ","activitypub"),{span:(0,r.createElement)("span",{class:"wp-block-query-pagination-next-arrow is-arrow-arrow","aria-hidden":"true"})}),q=(e,a)=>{y(e),x(a),h(Math.ceil(a/t))};return(0,r.useEffect)((()=>{if(v&&1===N)return q(v.followers,v.total);const e=function(e,t,a,r){const n=`/${b}/users/${e}/followers`,l={per_page:t,order:a,page:r,context:"full"};return(0,o.addQueryArgs)(n,l)}(d,t,a,N);l()({path:e}).then((e=>q(e.orderedItems,e.totalItems))).catch((()=>{}))}),[d,t,a,N,v]),(0,r.createElement)("div",{className:"activitypub-follower-block "+u},(0,r.createElement)("h3",null,n),(0,r.createElement)("ul",null,g&&g.map((e=>(0,r.createElement)("li",{key:e.url},(0,r.createElement)(w,{...e,followLinks:m}))))),k>1&&(0,r.createElement)(f,{page:N,perPage:t,total:E,pageClick:S,nextLabel:L,prevLabel:C,compact:"is-style-compact"===u}))}function w({name:e,icon:t,url:a,preferredUsername:n,followLinks:l=!0}){const o=`@${n}`,i={};return l||(i.onClick=e=>e.preventDefault()),(0,r.createElement)(v.ExternalLink,{className:"activitypub-link",href:a,title:o,...i},(0,r.createElement)("img",{width:"40",height:"40",src:t.url,class:"avatar activitypub-avatar",alt:e}),(0,r.createElement)("span",{class:"activitypub-actor"},(0,r.createElement)("strong",{className:"activitypub-name"},e),(0,r.createElement)("span",{class:"sep"},"/"),(0,r.createElement)("span",{class:"activitypub-handle"},o)))}const g=window.wp.domReady;a.n(g)()((()=>{[].forEach.call(document.querySelectorAll(".activitypub-follower-block"),(e=>{const t=JSON.parse(e.dataset.attrs);(0,i.render)((0,r.createElement)(d,{...t}),e)}))}))},942:(e,t)=>{var a;!function(){"use strict";var r={}.hasOwnProperty;function n(){for(var e="",t=0;t{if(!a){var o=1/0;for(p=0;p=l)&&Object.keys(r.O).every((e=>r.O[e](a[c])))?a.splice(c--,1):(i=!1,l0&&e[p-1][2]>l;p--)e[p]=e[p-1];e[p]=[a,n,l]},r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var a in t)r.o(t,a)&&!r.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={996:0,528:0};r.O.j=t=>0===e[t];var t=(t,a)=>{var n,l,[o,i,c]=a,s=0;if(o.some((t=>0!==e[t]))){for(n in i)r.o(i,n)&&(r.m[n]=i[n]);if(c)var p=c(r)}for(t&&t(a);sr(250)));n=r.O(n)})(); \ No newline at end of file +(()=>{var e,t={142:(e,t,a)=>{"use strict";const r=window.wp.element,n=window.React,l=window.wp.apiFetch;var o=a.n(l);const i=window.wp.url,c=window.wp.i18n;var s=a(184),p=a.n(s);function u({active:e,children:t,page:a,pageClick:n,className:l}){const o=p()("wp-block activitypub-pager",l,{current:e});return(0,r.createElement)("a",{className:o,onClick:t=>{t.preventDefault(),!e&&n(a)}},t)}const m={outlined:"outlined",minimal:"minimal"};function f({compact:e,nextLabel:t,page:a,pageClick:n,perPage:l,prevLabel:o,total:i,variant:c=m.outlined}){const s=((e,t)=>{let a=[1,e-2,e-1,e,e+1,e+2,t];a.sort(((e,t)=>e-t)),a=a.filter(((e,a,r)=>e>=1&&e<=t&&r.lastIndexOf(e)===a));for(let e=a.length-2;e>=0;e--)a[e]===a[e+1]&&a.splice(e+1,1);return a})(a,Math.ceil(i/l)),f=p()("alignwide wp-block-query-pagination is-content-justification-space-between is-layout-flex wp-block-query-pagination-is-layout-flex",`is-${c}`,{"is-compact":e});return(0,r.createElement)("nav",{className:f},o&&(0,r.createElement)(u,{key:"prev",page:a-1,pageClick:n,active:1===a,"aria-label":o,className:"wp-block-query-pagination-previous block-editor-block-list__block"},o),!e&&(0,r.createElement)("div",{className:"block-editor-block-list__block wp-block wp-block-query-pagination-numbers"},s.map((e=>(0,r.createElement)(u,{key:e,page:e,pageClick:n,active:e===a,className:"page-numbers"},e)))),t&&(0,r.createElement)(u,{key:"next",page:a+1,pageClick:n,active:a===Math.ceil(i/l),"aria-label":t,className:"wp-block-query-pagination-next block-editor-block-list__block"},t))}const v=window.wp.components,{namespace:d}=window._activityPubOptions;function b({selectedUser:e,per_page:t,order:a,title:l,page:s,setPage:p,className:u="",followLinks:m=!0,followerData:v=!1}){const b="site"===e?0:e,[g,k]=(0,n.useState)([]),[y,h]=(0,n.useState)(0),[E,x]=(0,n.useState)(0),[_,O]=function(){const[e,t]=(0,n.useState)(1);return[e,t]}(),N=s||_,S=p||O,C=(0,r.createInterpolateElement)(/* translators: arrow for previous followers link */ +(0,c.__)(" Less","activitypub"),{span:(0,r.createElement)("span",{class:"wp-block-query-pagination-previous-arrow is-arrow-arrow","aria-hidden":"true"})}),L=(0,r.createInterpolateElement)(/* translators: arrow for next followers link */ +(0,c.__)("More ","activitypub"),{span:(0,r.createElement)("span",{class:"wp-block-query-pagination-next-arrow is-arrow-arrow","aria-hidden":"true"})}),j=(e,a)=>{k(e),x(a),h(Math.ceil(a/t))};return(0,n.useEffect)((()=>{if(v&&1===N)return j(v.followers,v.total);const e=function(e,t,a,r){const n=`/${d}/actors/${e}/followers`,l={per_page:t,order:a,page:r,context:"full"};return(0,i.addQueryArgs)(n,l)}(b,t,a,N);o()({path:e}).then((e=>j(e.orderedItems,e.totalItems))).catch((()=>{}))}),[b,t,a,N,v]),(0,r.createElement)("div",{className:"activitypub-follower-block "+u},(0,r.createElement)("h3",null,l),(0,r.createElement)("ul",null,g&&g.map((e=>(0,r.createElement)("li",{key:e.url},(0,r.createElement)(w,{...e,followLinks:m}))))),y>1&&(0,r.createElement)(f,{page:N,perPage:t,total:E,pageClick:S,nextLabel:L,prevLabel:C,compact:"is-style-compact"===u}))}function w({name:e,icon:t,url:a,preferredUsername:n,followLinks:l=!0}){const o=`@${n}`,i={};return l||(i.onClick=e=>e.preventDefault()),(0,r.createElement)(v.ExternalLink,{className:"activitypub-link",href:a,title:o,...i},(0,r.createElement)("img",{width:"40",height:"40",src:t.url,class:"avatar activitypub-avatar",alt:e}),(0,r.createElement)("span",{class:"activitypub-actor"},(0,r.createElement)("strong",{className:"activitypub-name"},e),(0,r.createElement)("span",{class:"sep"},"/"),(0,r.createElement)("span",{class:"activitypub-handle"},o)))}const g=window.wp.domReady;a.n(g)()((()=>{[].forEach.call(document.querySelectorAll(".activitypub-follower-block"),(e=>{const t=JSON.parse(e.dataset.attrs);(0,r.render)((0,r.createElement)(b,{...t}),e)}))}))},184:(e,t)=>{var a;!function(){"use strict";var r={}.hasOwnProperty;function n(){for(var e=[],t=0;t{if(!a){var o=1/0;for(p=0;p=l)&&Object.keys(r.O).every((e=>r.O[e](a[c])))?a.splice(c--,1):(i=!1,l0&&e[p-1][2]>l;p--)e[p]=e[p-1];e[p]=[a,n,l]},r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var a in t)r.o(t,a)&&!r.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={638:0,962:0};r.O.j=t=>0===e[t];var t=(t,a)=>{var n,l,o=a[0],i=a[1],c=a[2],s=0;if(o.some((t=>0!==e[t]))){for(n in i)r.o(i,n)&&(r.m[n]=i[n]);if(c)var p=c(r)}for(t&&t(a);sr(142)));n=r.O(n)})(); \ No newline at end of file diff --git a/wp-content/upgrade-temp-backup/plugins/activitypub/build/remote-reply/index.js b/wp-content/upgrade-temp-backup/plugins/activitypub/build/remote-reply/index.js index 5373b0fa..384fa0fa 100644 --- a/wp-content/upgrade-temp-backup/plugins/activitypub/build/remote-reply/index.js +++ b/wp-content/upgrade-temp-backup/plugins/activitypub/build/remote-reply/index.js @@ -1 +1 @@ -(()=>{"use strict";var e,t={202:(e,t,a)=>{const n=window.React,o=window.wp.element,r=window.wp.domReady;var i=a.n(r);const c=window.wp.components,l=window.wp.i18n,u=window.wp.apiFetch;var s=a.n(u);const p=window.wp.primitives,m=(0,n.createElement)(p.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,n.createElement)(p.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M5 4.5h11a.5.5 0 0 1 .5.5v11a.5.5 0 0 1-.5.5H5a.5.5 0 0 1-.5-.5V5a.5.5 0 0 1 .5-.5ZM3 5a2 2 0 0 1 2-2h11a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5Zm17 3v10.75c0 .69-.56 1.25-1.25 1.25H6v1.5h12.75a2.75 2.75 0 0 0 2.75-2.75V8H20Z"})),d=(0,n.createElement)(p.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,n.createElement)(p.Path,{d:"M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"})),v=(0,o.forwardRef)((function({icon:e,size:t=24,...a},n){return(0,o.cloneElement)(e,{width:t,height:t,...a,ref:n})})),y=window.wp.compose;function w(e){try{return new URL(e),!0}catch(e){return!1}}function _({actionText:e,copyDescription:t,handle:a,resourceUrl:r}){const i=(0,l.__)("Loading...","activitypub"),u=(0,l.__)("Opening...","activitypub"),p=(0,l.__)("Error","activitypub"),_=(0,l.__)("Invalid","activitypub"),[b,h]=(0,o.useState)(e),[f,E]=(0,o.useState)(m),g=(0,y.useCopyToClipboard)(a,(()=>{E(d),setTimeout((()=>E(m)),1e3)})),[O,C]=(0,o.useState)(""),x=(0,o.useCallback)((()=>{let t;if(!w(O)&&!function(e){const t=e.replace(/^@/,"").split("@");return 2===t.length&&w(`https://${t[1]}`)}(O))return h(_),t=setTimeout((()=>h(e)),2e3),()=>clearTimeout(t);const a=r+O;h(i),s()({path:a}).then((({url:t})=>{h(u),setTimeout((()=>{window.open(t,"_blank"),h(e)}),200)})).catch((()=>{h(p),setTimeout((()=>h(e)),2e3)}))}),[O]);return(0,n.createElement)("div",{className:"activitypub__dialog"},(0,n.createElement)("div",{className:"activitypub-dialog__section"},(0,n.createElement)("h4",null,(0,l.__)("My Profile","activitypub")),(0,n.createElement)("div",{className:"activitypub-dialog-description"},t),(0,n.createElement)("div",{className:"activitypub-dialog__button-group"},(0,n.createElement)("input",{type:"text",value:a,readOnly:!0}),(0,n.createElement)(c.Button,{ref:g},(0,n.createElement)(v,{icon:f}),(0,l.__)("Copy","activitypub")))),(0,n.createElement)("div",{className:"activitypub-dialog__section"},(0,n.createElement)("h4",null,(0,l.__)("Your Profile","activitypub")),(0,n.createElement)("div",{className:"activitypub-dialog__description"},(0,o.createInterpolateElement)((0,l.__)("Or, if you know your own profile, we can start things that way! (eg https://example.com/yourusername or yourusername@example.com)","activitypub"),{code:(0,n.createElement)("code",null)})),(0,n.createElement)("div",{className:"activitypub-dialog__button-group"},(0,n.createElement)("input",{type:"text",value:O,onKeyDown:e=>{"Enter"===e?.code&&x()},onChange:e=>C(e.target.value)}),(0,n.createElement)(c.Button,{onClick:x},b))))}const{namespace:b}=window._activityPubOptions;function h({selectedComment:e,commentId:t}){const a=(0,l.__)("Reply","activitypub"),o=`/${b}/comments/${t}/remote-reply?resource=`,r=(0,l.__)("Copy and paste the Comment URL into the search field of your favorite fediverse app or server.","activitypub");return(0,n.createElement)(_,{actionText:a,copyDescription:r,handle:e,resourceUrl:o})}function f({selectedComment:e,commentId:t}){const[a,r]=(0,o.useState)(!1),i=(0,l.__)("Remote Reply","activitypub");return(0,n.createElement)(n.Fragment,null,(0,n.createElement)(c.Button,{isLink:!0,className:"comment-reply-link activitypub-remote-reply__button",onClick:()=>r(!0)},(0,l.__)("Reply on the Fediverse","activitypub")),a&&(0,n.createElement)(c.Modal,{className:"activitypub-remote-reply__modal activitypub__modal",onRequestClose:()=>r(!1),title:i},(0,n.createElement)(h,{selectedComment:e,commentId:t})))}let E=1;i()((()=>{[].forEach.call(document.querySelectorAll(".activitypub-remote-reply"),(e=>{const t=JSON.parse(e.dataset.attrs);(0,o.createRoot)(e).render((0,n.createElement)(f,{...t,id:"activitypub-remote-reply-link-"+E++,useId:!0}))}))}))}},a={};function n(e){var o=a[e];if(void 0!==o)return o.exports;var r=a[e]={exports:{}};return t[e](r,r.exports,n),r.exports}n.m=t,e=[],n.O=(t,a,o,r)=>{if(!a){var i=1/0;for(s=0;s=r)&&Object.keys(n.O).every((e=>n.O[e](a[l])))?a.splice(l--,1):(c=!1,r0&&e[s-1][2]>r;s--)e[s]=e[s-1];e[s]=[a,o,r]},n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var a in t)n.o(t,a)&&!n.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={227:0,739:0};n.O.j=t=>0===e[t];var t=(t,a)=>{var o,r,[i,c,l]=a,u=0;if(i.some((t=>0!==e[t]))){for(o in c)n.o(c,o)&&(n.m[o]=c[o]);if(l)var s=l(n)}for(t&&t(a);un(202)));o=n.O(o)})(); \ No newline at end of file +(()=>{"use strict";var e,t={667:(e,t,n)=>{const o=window.wp.element,r=window.wp.domReady;var a=n.n(r);const i=window.wp.components,c=window.wp.i18n,l=window.wp.apiFetch;var u=n.n(l);const s=window.wp.primitives,p=(0,o.createElement)(s.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,o.createElement)(s.Path,{d:"M20.2 8v11c0 .7-.6 1.2-1.2 1.2H6v1.5h13c1.5 0 2.7-1.2 2.7-2.8V8zM18 16.4V4.6c0-.9-.7-1.6-1.6-1.6H4.6C3.7 3 3 3.7 3 4.6v11.8c0 .9.7 1.6 1.6 1.6h11.8c.9 0 1.6-.7 1.6-1.6zm-13.5 0V4.6c0-.1.1-.1.1-.1h11.8c.1 0 .1.1.1.1v11.8c0 .1-.1.1-.1.1H4.6l-.1-.1z"})),m=(0,o.createElement)(s.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,o.createElement)(s.Path,{d:"M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"})),d=function({icon:e,size:t=24,...n}){return(0,o.cloneElement)(e,{width:t,height:t,...n})},v=window.wp.compose;function y(e){try{return new URL(e),!0}catch(e){return!1}}function _({actionText:e,copyDescription:t,handle:n,resourceUrl:r}){const a=(0,c.__)("Loading...","activitypub"),l=(0,c.__)("Opening...","activitypub"),s=(0,c.__)("Error","activitypub"),_=(0,c.__)("Invalid","activitypub"),[w,b]=(0,o.useState)(e),[h,f]=(0,o.useState)(p),E=(0,v.useCopyToClipboard)(n,(()=>{f(m),setTimeout((()=>f(p)),1e3)})),[g,C]=(0,o.useState)(""),O=(0,o.useCallback)((()=>{let t;if(!y(g)&&!function(e){const t=e.replace(/^@/,"").split("@");return 2===t.length&&y(`https://${t[1]}`)}(g))return b(_),t=setTimeout((()=>b(e)),2e3),()=>clearTimeout(t);const n=r+g;b(a),u()({path:n}).then((({url:t})=>{b(l),setTimeout((()=>{window.open(t,"_blank"),b(e)}),200)})).catch((()=>{b(s),setTimeout((()=>b(e)),2e3)}))}),[g]);return(0,o.createElement)("div",{className:"activitypub__dialog"},(0,o.createElement)("div",{className:"activitypub-dialog__section"},(0,o.createElement)("h4",null,(0,c.__)("My Profile","activitypub")),(0,o.createElement)("div",{className:"activitypub-dialog-description"},t),(0,o.createElement)("div",{className:"activitypub-dialog__button-group"},(0,o.createElement)("input",{type:"text",value:n,readOnly:!0}),(0,o.createElement)(i.Button,{ref:E},(0,o.createElement)(d,{icon:h}),(0,c.__)("Copy","activitypub")))),(0,o.createElement)("div",{className:"activitypub-dialog__section"},(0,o.createElement)("h4",null,(0,c.__)("Your Profile","activitypub")),(0,o.createElement)("div",{className:"activitypub-dialog__description"},(0,o.createInterpolateElement)((0,c.__)("Or, if you know your own profile, we can start things that way! (eg https://example.com/yourusername or yourusername@example.com)","activitypub"),{code:(0,o.createElement)("code",null)})),(0,o.createElement)("div",{className:"activitypub-dialog__button-group"},(0,o.createElement)("input",{type:"text",value:g,onKeyDown:e=>{"Enter"===e?.code&&O()},onChange:e=>C(e.target.value)}),(0,o.createElement)(i.Button,{onClick:O},w))))}const{namespace:w}=window._activityPubOptions;function b({selectedComment:e,commentId:t}){const n=(0,c.__)("Reply","activitypub"),r=`/${w}/comments/${t}/remote-reply?resource=`,a=(0,c.__)("Copy and paste the Comment URL into the search field of your favorite fediverse app or server.","activitypub");return(0,o.createElement)(_,{actionText:n,copyDescription:a,handle:e,resourceUrl:r})}function h({selectedComment:e,commentId:t}){const[n,r]=(0,o.useState)(!1),a=(0,c.__)("Remote Reply","activitypub");return(0,o.createElement)(o.Fragment,null,(0,o.createElement)(i.Button,{isLink:!0,className:"comment-reply-link activitypub-remote-reply__button",onClick:()=>r(!0)},(0,c.__)("Reply on the Fediverse","activitypub")),n&&(0,o.createElement)(i.Modal,{className:"activitypub-remote-reply__modal activitypub__modal",onRequestClose:()=>r(!1),title:a},(0,o.createElement)(b,{selectedComment:e,commentId:t})))}let f=1;a()((()=>{[].forEach.call(document.querySelectorAll(".activitypub-remote-reply"),(e=>{const t=JSON.parse(e.dataset.attrs);(0,o.createRoot)(e).render((0,o.createElement)(h,{...t,id:"activitypub-remote-reply-link-"+f++,useId:!0}))}))}))}},n={};function o(e){var r=n[e];if(void 0!==r)return r.exports;var a=n[e]={exports:{}};return t[e](a,a.exports,o),a.exports}o.m=t,e=[],o.O=(t,n,r,a)=>{if(!n){var i=1/0;for(s=0;s=a)&&Object.keys(o.O).every((e=>o.O[e](n[l])))?n.splice(l--,1):(c=!1,a0&&e[s-1][2]>a;s--)e[s]=e[s-1];e[s]=[n,r,a]},o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={805:0,881:0};o.O.j=t=>0===e[t];var t=(t,n)=>{var r,a,i=n[0],c=n[1],l=n[2],u=0;if(i.some((t=>0!==e[t]))){for(r in c)o.o(c,r)&&(o.m[r]=c[r]);if(l)var s=l(o)}for(t&&t(n);uo(667)));r=o.O(r)})(); \ No newline at end of file diff --git a/wp-content/upgrade-temp-backup/plugins/activitypub/includes/activity/class-activity.php b/wp-content/upgrade-temp-backup/plugins/activitypub/includes/activity/class-activity.php index 32aa3988..fcc35e46 100644 --- a/wp-content/upgrade-temp-backup/plugins/activitypub/includes/activity/class-activity.php +++ b/wp-content/upgrade-temp-backup/plugins/activitypub/includes/activity/class-activity.php @@ -162,7 +162,13 @@ class Activity extends Base_Object { } if ( $object->get_id() && ! $this->get_id() ) { - $this->set( 'id', $object->get_id() . '#activity' ); + $id = strtok( $object->get_id(), '#' ); + if ( $object->get_updated() ) { + $updated = $object->get_updated(); + } else { + $updated = $object->get_published(); + } + $this->set( 'id', $id . '#activity-' . strtolower( $this->get_type() ) . '-' . $updated ); } } diff --git a/wp-content/upgrade-temp-backup/plugins/activitypub/includes/class-activity-dispatcher.php b/wp-content/upgrade-temp-backup/plugins/activitypub/includes/class-activity-dispatcher.php index edc41f37..38ba1858 100644 --- a/wp-content/upgrade-temp-backup/plugins/activitypub/includes/class-activity-dispatcher.php +++ b/wp-content/upgrade-temp-backup/plugins/activitypub/includes/class-activity-dispatcher.php @@ -64,7 +64,11 @@ class Activity_Dispatcher { * @return void */ public static function send_activity( $wp_object, $type, $user_id = null ) { - $transformer = Factory::get_transformer( $wp_object ); + $transformer = Factory::get_transformer( $wp_object ); // Could potentially return a `\WP_Error` instance. + + if ( \is_wp_error( $transformer ) ) { + return; + } if ( null !== $user_id ) { $transformer->change_wp_user_id( $user_id ); @@ -98,18 +102,22 @@ class Activity_Dispatcher { return; } - // do not announce replies - if ( $wp_object instanceof WP_Comment ) { + $transformer = Factory::get_transformer( $wp_object ); + + if ( \is_wp_error( $transformer ) ) { return; } - $transformer = Factory::get_transformer( $wp_object ); - $transformer->change_wp_user_id( Users::BLOG_USER_ID ); + $user_id = Users::BLOG_USER_ID; + $activity = $transformer->to_activity( $type ); + $user = Users::get_by_id( Users::BLOG_USER_ID ); - $user_id = $transformer->get_wp_user_id(); - $activity = $transformer->to_activity( 'Announce' ); + $announce = new Activity(); + $announce->set_type( 'Announce' ); + $announce->set_object( $activity ); + $announce->set_actor( $user->get_id() ); - self::send_activity_to_followers( $activity, $user_id, $wp_object ); + self::send_activity_to_followers( $announce, $user_id, $wp_object ); } /** diff --git a/wp-content/upgrade-temp-backup/plugins/activitypub/includes/class-activitypub.php b/wp-content/upgrade-temp-backup/plugins/activitypub/includes/class-activitypub.php index 442cdfa5..afef5b71 100644 --- a/wp-content/upgrade-temp-backup/plugins/activitypub/includes/class-activitypub.php +++ b/wp-content/upgrade-temp-backup/plugins/activitypub/includes/class-activitypub.php @@ -9,6 +9,7 @@ use Activitypub\Collection\Followers; use function Activitypub\is_comment; use function Activitypub\sanitize_url; use function Activitypub\is_local_comment; +use function Activitypub\is_user_type_disabled; use function Activitypub\is_activitypub_request; use function Activitypub\should_comment_be_federated; @@ -95,35 +96,37 @@ class Activitypub { $json_template = false; - // check if user can publish posts - if ( \is_author() && is_wp_error( Users::get_by_id( \get_the_author_meta( 'ID' ) ) ) ) { - return $template; - } - - // check if blog-user is enabled - if ( \is_home() && is_wp_error( Users::get_by_id( Users::BLOG_USER_ID ) ) ) { - return $template; - } - - if ( \is_author() ) { + if ( \is_author() && ! is_user_disabled( \get_the_author_meta( 'ID' ) ) ) { $json_template = ACTIVITYPUB_PLUGIN_DIR . '/templates/author-json.php'; } elseif ( is_comment() ) { $json_template = ACTIVITYPUB_PLUGIN_DIR . '/templates/comment-json.php'; } elseif ( \is_singular() ) { $json_template = ACTIVITYPUB_PLUGIN_DIR . '/templates/post-json.php'; - } elseif ( \is_home() ) { + } elseif ( \is_home() && ! is_user_type_disabled( 'blog' ) ) { $json_template = ACTIVITYPUB_PLUGIN_DIR . '/templates/blog-json.php'; } - if ( ACTIVITYPUB_AUTHORIZED_FETCH ) { + /* + * Check if the request is authorized. + * + * @see https://www.w3.org/wiki/SocialCG/ActivityPub/Primer/Authentication_Authorization#Authorized_fetch + * @see https://swicg.github.io/activitypub-http-signature/#authorized-fetch + */ + if ( $json_template && ACTIVITYPUB_AUTHORIZED_FETCH ) { $verification = Signature::verify_http_signature( $_SERVER ); if ( \is_wp_error( $verification ) ) { + header( 'HTTP/1.1 401 Unauthorized' ); + // fallback as template_loader can't return http headers return $template; } } - return $json_template; + if ( $json_template ) { + return $json_template; + } + + return $template; } /** @@ -292,7 +295,7 @@ class Activitypub { \add_rewrite_rule( '^@([\w\-\.]+)', - 'index.php?rest_route=/' . ACTIVITYPUB_REST_NAMESPACE . '/users/$matches[1]', + 'index.php?rest_route=/' . ACTIVITYPUB_REST_NAMESPACE . '/actors/$matches[1]', 'top' ); diff --git a/wp-content/upgrade-temp-backup/plugins/activitypub/includes/class-admin.php b/wp-content/upgrade-temp-backup/plugins/activitypub/includes/class-admin.php index 5df037d4..e9613415 100644 --- a/wp-content/upgrade-temp-backup/plugins/activitypub/includes/class-admin.php +++ b/wp-content/upgrade-temp-backup/plugins/activitypub/includes/class-admin.php @@ -2,8 +2,10 @@ namespace Activitypub; use WP_User_Query; -use Activitypub\Model\Blog_User; +use Activitypub\Model\Blog; +use Activitypub\Collection\Users; +use function Activitypub\count_followers; use function Activitypub\is_user_disabled; use function Activitypub\was_comment_received; use function Activitypub\is_comment_federatable; @@ -37,6 +39,8 @@ class Admin { if ( ! is_user_disabled( get_current_user_id() ) ) { \add_action( 'show_user_profile', array( self::class, 'add_profile' ) ); } + + \add_filter( 'dashboard_glance_items', array( self::class, 'dashboard_glance_items' ) ); } /** @@ -216,7 +220,7 @@ class Admin { 'type' => 'string', 'description' => \esc_html__( 'The Identifier of the Blog-User', 'activitypub' ), 'show_in_rest' => true, - 'default' => Blog_User::get_default_username(), + 'default' => Blog::get_default_username(), 'sanitize_callback' => function ( $value ) { // hack to allow dots in the username $parts = explode( '.', $value ); @@ -247,7 +251,7 @@ class Admin { 'error' ); - return Blog_User::get_default_username(); + return Blog::get_default_username(); } return $sanitized; @@ -313,8 +317,12 @@ class Admin { public static function enqueue_scripts( $hook_suffix ) { if ( false !== strpos( $hook_suffix, 'activitypub' ) ) { - wp_enqueue_style( 'activitypub-admin-styles', plugins_url( 'assets/css/activitypub-admin.css', ACTIVITYPUB_PLUGIN_FILE ), array(), '1.0.0' ); - wp_enqueue_script( 'activitypub-admin-styles', plugins_url( 'assets/js/activitypub-admin.js', ACTIVITYPUB_PLUGIN_FILE ), array( 'jquery' ), '1.0.0', false ); + wp_enqueue_style( 'activitypub-admin-styles', plugins_url( 'assets/css/activitypub-admin.css', ACTIVITYPUB_PLUGIN_FILE ), array(), get_plugin_version() ); + wp_enqueue_script( 'activitypub-admin-script', plugins_url( 'assets/js/activitypub-admin.js', ACTIVITYPUB_PLUGIN_FILE ), array( 'jquery' ), get_plugin_version(), false ); + } + + if ( 'index.php' === $hook_suffix ) { + wp_enqueue_style( 'activitypub-admin-styles', plugins_url( 'assets/css/activitypub-admin.css', ACTIVITYPUB_PLUGIN_FILE ), array(), get_plugin_version() ); } } @@ -469,4 +477,57 @@ class Admin { return $sendback; } + + /** + * Add ActivityPub infos to the dashboard glance items + * + * @param array $items The existing glance items. + * + * @return array The extended glance items. + */ + public static function dashboard_glance_items( $items ) { + \add_filter( 'number_format_i18n', '\Activitypub\custom_large_numbers', 10, 3 ); + + if ( ! is_user_disabled( get_current_user_id() ) ) { + $follower_count = sprintf( + // translators: %s: number of followers + _n( + '%s Follower', + '%s Followers', + count_followers( \get_current_user_id() ), + 'activitypub' + ), + \number_format_i18n( count_followers( \get_current_user_id() ) ) + ); + $items['activitypub-followers-user'] = sprintf( + '%3$s', + \esc_url( \admin_url( 'users.php?page=activitypub-followers-list' ) ), + \esc_attr__( 'Your followers', 'activitypub' ), + \esc_html( $follower_count ) + ); + } + + if ( ! is_user_type_disabled( 'blog' ) && current_user_can( 'manage_options' ) ) { + $follower_count = sprintf( + // translators: %s: number of followers + _n( + '%s Follower (Blog)', + '%s Followers (Blog)', + count_followers( Users::BLOG_USER_ID ), + 'activitypub' + ), + \number_format_i18n( count_followers( Users::BLOG_USER_ID ) ) + ); + $items['activitypub-followers-blog'] = sprintf( + '%3$s', + \esc_url( \admin_url( 'options-general.php?page=activitypub&tab=followers' ) ), + \esc_attr__( 'The Blog\'s followers', 'activitypub' ), + \esc_html( $follower_count ) + ); + } + + \remove_filter( 'number_format_i18n', '\Activitypub\custom_large_numbers', 10, 3 ); + + return $items; + } } diff --git a/wp-content/upgrade-temp-backup/plugins/activitypub/includes/class-comment.php b/wp-content/upgrade-temp-backup/plugins/activitypub/includes/class-comment.php index 1d52a9bd..7fa4ebc6 100644 --- a/wp-content/upgrade-temp-backup/plugins/activitypub/includes/class-comment.php +++ b/wp-content/upgrade-temp-backup/plugins/activitypub/includes/class-comment.php @@ -379,7 +379,7 @@ class Comment { } // generate URI based on comment ID - return \add_query_arg( 'c', $comment->comment_ID, \home_url() ); + return \add_query_arg( 'c', $comment->comment_ID, \trailingslashit( \home_url() ) ); } /** diff --git a/wp-content/upgrade-temp-backup/plugins/activitypub/includes/class-handler.php b/wp-content/upgrade-temp-backup/plugins/activitypub/includes/class-handler.php index fcabd63c..05c65805 100644 --- a/wp-content/upgrade-temp-backup/plugins/activitypub/includes/class-handler.php +++ b/wp-content/upgrade-temp-backup/plugins/activitypub/includes/class-handler.php @@ -1,6 +1,7 @@ 404, + 'object' => $url_or_object, + ) + ); + } + } else { + $url = $url_or_object; + } + + if ( preg_match( '/^@?' . ACTIVITYPUB_USERNAME_REGEXP . '$/i', $url ) ) { + $url = Webfinger::resolve( $url ); + } + + if ( ! $url ) { + return new WP_Error( + 'activitypub_no_valid_actor_identifier', + \__( 'The "actor" identifier is not valid', 'activitypub' ), + array( + 'status' => 404, + 'object' => $url, + ) + ); + } + + if ( is_wp_error( $url ) ) { + return $url; + } + + $transient_key = self::generate_cache_key( $url ); + + // only check the cache if needed. + if ( $cached ) { + $data = \get_transient( $transient_key ); + + if ( $data ) { + return $data; + } + } + + if ( ! \wp_http_validate_url( $url ) ) { + return new WP_Error( + 'activitypub_no_valid_object_url', + \__( 'The "object" is/has no valid URL', 'activitypub' ), + array( + 'status' => 400, + 'object' => $url, + ) + ); + } + + $response = self::get( $url ); + + if ( \is_wp_error( $response ) ) { + return $response; + } + + $data = \wp_remote_retrieve_body( $response ); + $data = \json_decode( $data, true ); + + if ( ! $data ) { + return new WP_Error( + 'activitypub_invalid_json', + \__( 'No valid JSON data', 'activitypub' ), + array( + 'status' => 400, + 'object' => $url, + ) + ); + } + + \set_transient( $transient_key, $data, WEEK_IN_SECONDS ); + + return $data; + } } diff --git a/wp-content/upgrade-temp-backup/plugins/activitypub/includes/class-mention.php b/wp-content/upgrade-temp-backup/plugins/activitypub/includes/class-mention.php index fee01b20..c2e8792d 100644 --- a/wp-content/upgrade-temp-backup/plugins/activitypub/includes/class-mention.php +++ b/wp-content/upgrade-temp-backup/plugins/activitypub/includes/class-mention.php @@ -4,6 +4,8 @@ namespace Activitypub; use WP_Error; use Activitypub\Webfinger; +use function Activitypub\object_to_uri; + /** * ActivityPub Mention Class * @@ -93,7 +95,11 @@ class Mention { public static function replace_with_links( $result ) { $metadata = get_remote_metadata_by_actor( $result[0] ); - if ( ! empty( $metadata ) && ! is_wp_error( $metadata ) && ! empty( $metadata['url'] ) ) { + if ( + ! empty( $metadata ) && + ! is_wp_error( $metadata ) && + ( ! empty( $metadata['id'] ) || ! empty( $metadata['url'] ) ) + ) { $username = ltrim( $result[0], '@' ); if ( ! empty( $metadata['name'] ) ) { $username = $metadata['name']; @@ -102,11 +108,7 @@ class Mention { $username = $metadata['preferredUsername']; } - $url = isset( $metadata['url'] ) ? $metadata['url'] : $metadata['id']; - - if ( \is_array( $url ) ) { - $url = $url[0]; - } + $url = isset( $metadata['url'] ) ? object_to_uri( $metadata['url'] ) : object_to_uri( $metadata['id'] ); return \sprintf( '@%s', esc_url( $url ), esc_html( $username ) ); } diff --git a/wp-content/upgrade-temp-backup/plugins/activitypub/includes/class-migration.php b/wp-content/upgrade-temp-backup/plugins/activitypub/includes/class-migration.php index 88737a3c..acfe88a5 100644 --- a/wp-content/upgrade-temp-backup/plugins/activitypub/includes/class-migration.php +++ b/wp-content/upgrade-temp-backup/plugins/activitypub/includes/class-migration.php @@ -2,7 +2,7 @@ namespace Activitypub; use Activitypub\Activitypub; -use Activitypub\Model\Blog_User; +use Activitypub\Model\Blog; use Activitypub\Collection\Followers; /** diff --git a/wp-content/upgrade-temp-backup/plugins/activitypub/includes/class-notification.php b/wp-content/upgrade-temp-backup/plugins/activitypub/includes/class-notification.php new file mode 100644 index 00000000..72747021 --- /dev/null +++ b/wp-content/upgrade-temp-backup/plugins/activitypub/includes/class-notification.php @@ -0,0 +1,58 @@ +type = $type; + $this->actor = $actor; + $this->object = $object; + $this->target = $target; + } + + /** + * Send the notification. + */ + public function send() { + do_action( 'activitypub_notification', $this ); + } +} diff --git a/wp-content/upgrade-temp-backup/plugins/activitypub/includes/collection/class-users.php b/wp-content/upgrade-temp-backup/plugins/activitypub/includes/collection/class-users.php index 6a9a5dc7..9462a9a1 100644 --- a/wp-content/upgrade-temp-backup/plugins/activitypub/includes/collection/class-users.php +++ b/wp-content/upgrade-temp-backup/plugins/activitypub/includes/collection/class-users.php @@ -4,8 +4,8 @@ namespace Activitypub\Collection; use WP_Error; use WP_User_Query; use Activitypub\Model\User; -use Activitypub\Model\Blog_User; -use Activitypub\Model\Application_User; +use Activitypub\Model\Blog; +use Activitypub\Model\Application; use function Activitypub\object_to_uri; use function Activitypub\url_to_authorid; @@ -47,9 +47,9 @@ class Users { } if ( self::BLOG_USER_ID === $user_id ) { - return Blog_User::from_wp_user( $user_id ); + return new Blog(); } elseif ( self::APPLICATION_USER_ID === $user_id ) { - return Application_User::from_wp_user( $user_id ); + return new Application(); } elseif ( $user_id > 0 ) { return User::from_wp_user( $user_id ); } @@ -70,12 +70,12 @@ class Users { */ public static function get_by_username( $username ) { // check for blog user. - if ( Blog_User::get_default_username() === $username ) { - return self::get_by_id( self::BLOG_USER_ID ); + if ( Blog::get_default_username() === $username ) { + return new Blog(); } if ( get_option( 'activitypub_blog_user_identifier' ) === $username ) { - return self::get_by_id( self::BLOG_USER_ID ); + return new Blog(); } // check for application user. @@ -144,24 +144,31 @@ class Users { // try to extract the scheme and the host if ( preg_match( '/^([a-zA-Z^:]+):(.*)$/i', $resource, $match ) ) { // extract the scheme - $scheme = esc_attr( $match[1] ); + $scheme = \esc_attr( $match[1] ); } switch ( $scheme ) { // check for http(s) URIs case 'http': case 'https': - $url_parts = wp_parse_url( $resource ); + $resource_path = \wp_parse_url( $resource, PHP_URL_PATH ); - // check for http(s)://blog.example.com/@username - if ( - isset( $url_parts['path'] ) && - str_starts_with( $url_parts['path'], '/@' ) - ) { - $identifier = str_replace( '/@', '', $url_parts['path'] ); - $identifier = untrailingslashit( $identifier ); + if ( $resource_path ) { + $blog_path = \wp_parse_url( \home_url(), PHP_URL_PATH ); - return self::get_by_username( $identifier ); + if ( $blog_path ) { + $resource_path = \str_replace( $blog_path, '', $resource_path ); + } + + $resource_path = \trim( $resource_path, '/' ); + + // check for http(s)://blog.example.com/@username + if ( str_starts_with( $resource_path, '@' ) ) { + $identifier = \str_replace( '@', '', $resource_path ); + $identifier = \trim( $identifier, '/' ); + + return self::get_by_username( $identifier ); + } } // check for http(s)://blog.example.com/author/username @@ -222,18 +229,26 @@ class Users { * @return \Acitvitypub\Model\User The User. */ public static function get_by_various( $id ) { + $user = null; + if ( is_numeric( $id ) ) { - return self::get_by_id( $id ); + $user = self::get_by_id( $id ); } elseif ( // is URL filter_var( $id, FILTER_VALIDATE_URL ) || // is acct - str_starts_with( $id, 'acct:' ) + str_starts_with( $id, 'acct:' ) || + // is email + filter_var( $id, FILTER_VALIDATE_EMAIL ) ) { - return self::get_by_resource( $id ); - } else { - return self::get_by_username( $id ); + $user = self::get_by_resource( $id ); } + + if ( $user && ! is_wp_error( $user ) ) { + return $user; + } + + return self::get_by_username( $id ); } /** diff --git a/wp-content/upgrade-temp-backup/plugins/activitypub/includes/functions.php b/wp-content/upgrade-temp-backup/plugins/activitypub/includes/functions.php index ee6ce46c..d33a2a4f 100644 --- a/wp-content/upgrade-temp-backup/plugins/activitypub/includes/functions.php +++ b/wp-content/upgrade-temp-backup/plugins/activitypub/includes/functions.php @@ -854,3 +854,118 @@ function get_masked_wp_version() { return implode( '.', $version ); } + +/** + * Get the enclosures of a post. + * + * @param int $post_id The post ID. + * + * @return array The enclosures. + */ +function get_enclosures( $post_id ) { + $enclosures = get_post_meta( $post_id, 'enclosure' ); + + if ( ! $enclosures ) { + return array(); + } + + $enclosures = array_map( + function ( $enclosure ) { + $attributes = explode( "\n", $enclosure ); + + if ( ! isset( $attributes[0] ) || ! \wp_http_validate_url( $attributes[0] ) ) { + return false; + } + + return array( + 'url' => $attributes[0], + 'length' => isset( $attributes[1] ) ? trim( $attributes[1] ) : null, + 'mediaType' => isset( $attributes[2] ) ? trim( $attributes[2] ) : null, + ); + }, + $enclosures + ); + + return array_filter( $enclosures ); +} + +/** + * Retrieves the IDs of the ancestors of a comment. + * + * Adaption of `get_post_ancestors` from WordPress core. + * + * @see https://developer.wordpress.org/reference/functions/get_post_ancestors/ + * + * @param int|WP_Comment $comment Comment ID or comment object. + * + * @return WP_Comment[] Array of ancestor comments or empty array if there are none. + */ +function get_comment_ancestors( $comment ) { + $comment = \get_comment( $comment ); + + // phpcs:ignore Universal.Operators.StrictComparisons.LooseEqual + if ( ! $comment || empty( $comment->comment_parent ) || $comment->comment_parent == $comment->comment_ID ) { + return array(); + } + + $ancestors = array(); + + $id = (int) $comment->comment_parent; + $ancestors[] = $id; + + // phpcs:ignore Generic.CodeAnalysis.AssignmentInCondition.FoundInWhileCondition + while ( $id > 0 ) { + $ancestor = \get_comment( $id ); + $parent_id = (int) $ancestor->comment_parent; + + // Loop detection: If the ancestor has been seen before, break. + if ( empty( $parent_id ) || ( $parent_id === (int) $comment->comment_ID ) || in_array( $parent_id, $ancestors, true ) ) { + break; + } + + $id = $parent_id; + $ancestors[] = $id; + } + + return $ancestors; +} + +/** + * Change the display of large numbers on the site. + * + * @author Jeremy Herve + * + * @see https://wordpress.org/support/topic/abbreviate-numbers-with-k/ + * + * @param string $formatted Converted number in string format. + * @param float $number The number to convert based on locale. + * @param int $decimals Precision of the number of decimal places. + * + * @return string Converted number in string format. + */ +function custom_large_numbers( $formatted, $number, $decimals ) { + global $wp_locale; + + $decimals = 0; + $decimal_point = '.'; + $thousands_sep = ','; + + if ( isset( $wp_locale ) ) { + $decimals = (int) $wp_locale->number_format['decimal_point']; + $decimal_point = $wp_locale->number_format['decimal_point']; + $thousands_sep = $wp_locale->number_format['thousands_sep']; + } + + if ( $number < 1000 ) { // any number less than a Thousand. + return \number_format( $number, $decimals, $decimal_point, $thousands_sep ); + } elseif ( $number < 1000000 ) { // any number less than a million + return \number_format( $number / 1000, $decimals, $decimal_point, $thousands_sep ) . 'K'; + } elseif ( $number < 1000000000 ) { // any number less than a billion + return \number_format( $number / 1000000, $decimals, $decimal_point, $thousands_sep ) . 'M'; + } else { // at least a billion + return \number_format( $number / 1000000000, $decimals, $decimal_point, $thousands_sep ) . 'B'; + } + + // Default fallback. We should not get here. + return $formatted; +} diff --git a/wp-content/upgrade-temp-backup/plugins/activitypub/includes/handler/class-announce.php b/wp-content/upgrade-temp-backup/plugins/activitypub/includes/handler/class-announce.php new file mode 100644 index 00000000..46db2a3b --- /dev/null +++ b/wp-content/upgrade-temp-backup/plugins/activitypub/includes/handler/class-announce.php @@ -0,0 +1,69 @@ +send(); } /** diff --git a/wp-content/upgrade-temp-backup/plugins/activitypub/includes/model/class-application-user.php b/wp-content/upgrade-temp-backup/plugins/activitypub/includes/model/class-application-user.php deleted file mode 100644 index 37ff4698..00000000 --- a/wp-content/upgrade-temp-backup/plugins/activitypub/includes/model/class-application-user.php +++ /dev/null @@ -1,79 +0,0 @@ -get_preferred_username() ); - } - - public function get_name() { - return 'application'; - } - - public function get_preferred_username() { - return $this->get_name(); - } - - public function get_followers() { - return null; - } - - public function get_following() { - return null; - } - - public function get_attachment() { - return null; - } - - public function get_featured() { - return null; - } - - public function get_moderators() { - return null; - } - - public function get_indexable() { - return false; - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/activitypub/includes/model/class-application.php b/wp-content/upgrade-temp-backup/plugins/activitypub/includes/model/class-application.php new file mode 100644 index 00000000..7bd3aa5e --- /dev/null +++ b/wp-content/upgrade-temp-backup/plugins/activitypub/includes/model/class-application.php @@ -0,0 +1,200 @@ + + */ + protected $webfinger; + + public function get_type() { + return 'Application'; + } + + public function get_manually_approves_followers() { + return true; + } + + public function get_id() { + return get_rest_url_by_path( 'application' ); + } + + /** + * Get the User-Url. + * + * @return string The User-Url. + */ + public function get_url() { + return $this->get_id(); + } + + /** + * Returns the User-URL with @-Prefix for the username. + * + * @return string The User-URL with @-Prefix for the username. + */ + public function get_alternate_url() { + return $this->get_url(); + } + + public function get_name() { + return 'application'; + } + + public function get_preferred_username() { + return $this->get_name(); + } + + /** + * Get the User-Icon. + * + * @return array The User-Icon. + */ + public function get_icon() { + // try site icon first + $icon_id = get_option( 'site_icon' ); + + // try custom logo second + if ( ! $icon_id ) { + $icon_id = get_theme_mod( 'custom_logo' ); + } + + $icon_url = false; + + if ( $icon_id ) { + $icon = wp_get_attachment_image_src( $icon_id, 'full' ); + if ( $icon ) { + $icon_url = $icon[0]; + } + } + + if ( ! $icon_url ) { + // fallback to default icon + $icon_url = plugins_url( '/assets/img/wp-logo.png', ACTIVITYPUB_PLUGIN_FILE ); + } + + return array( + 'type' => 'Image', + 'url' => esc_url( $icon_url ), + ); + } + + /** + * Get the User-Header-Image. + * + * @return array|null The User-Header-Image. + */ + public function get_header_image() { + if ( \has_header_image() ) { + return array( + 'type' => 'Image', + 'url' => esc_url( \get_header_image() ), + ); + } + + return null; + } + + public function get_published() { + $first_post = new WP_Query( + array( + 'orderby' => 'date', + 'order' => 'ASC', + 'number' => 1, + ) + ); + + if ( ! empty( $first_post->posts[0] ) ) { + $time = \strtotime( $first_post->posts[0]->post_date_gmt ); + } else { + $time = \time(); + } + + return \gmdate( 'Y-m-d\TH:i:s\Z', $time ); + } + + /** + * Returns the Inbox-API-Endpoint. + * + * @return string The Inbox-Endpoint. + */ + public function get_inbox() { + return get_rest_url_by_path( sprintf( 'actors/%d/inbox', $this->get__id() ) ); + } + + /** + * Returns the Outbox-API-Endpoint. + * + * @return string The Outbox-Endpoint. + */ + public function get_outbox() { + return get_rest_url_by_path( sprintf( 'actors/%d/outbox', $this->get__id() ) ); + } + + /** + * Returns a user@domain type of identifier for the user. + * + * @return string The Webfinger-Identifier. + */ + public function get_webfinger() { + return $this->get_preferred_username() . '@' . \wp_parse_url( \home_url(), \PHP_URL_HOST ); + } + + public function get_public_key() { + return array( + 'id' => $this->get_id() . '#main-key', + 'owner' => $this->get_id(), + 'publicKeyPem' => Signature::get_public_key_for( Users::APPLICATION_USER_ID ), + ); + } + + /** + * Get the User-Description. + * + * @return string The User-Description. + */ + public function get_summary() { + return \wpautop( + \wp_kses( + \get_bloginfo( 'description' ), + 'default' + ) + ); + } +} diff --git a/wp-content/upgrade-temp-backup/plugins/activitypub/includes/model/class-blog-user.php b/wp-content/upgrade-temp-backup/plugins/activitypub/includes/model/class-blog.php similarity index 57% rename from wp-content/upgrade-temp-backup/plugins/activitypub/includes/model/class-blog-user.php rename to wp-content/upgrade-temp-backup/plugins/activitypub/includes/model/class-blog.php index 579f7ba2..cc515385 100644 --- a/wp-content/upgrade-temp-backup/plugins/activitypub/includes/model/class-blog-user.php +++ b/wp-content/upgrade-temp-backup/plugins/activitypub/includes/model/class-blog.php @@ -4,13 +4,38 @@ namespace Activitypub\Model; use WP_Query; use WP_Error; +use Activitypub\Signature; +use Activitypub\Activity\Actor; use Activitypub\Collection\Users; use function Activitypub\is_single_user; use function Activitypub\is_user_disabled; use function Activitypub\get_rest_url_by_path; -class Blog_User extends User { +class Blog extends Actor { + /** + * The Featured-Posts. + * + * @see https://docs.joinmastodon.org/spec/activitypub/#featured + * + * @context { + * "@id": "http://joinmastodon.org/ns#featured", + * "@type": "@id" + * } + * + * @var string + */ + protected $featured; + + /** + * Moderators endpoint. + * + * @see https://join-lemmy.org/docs/contributors/05-federation.html + * + * @var string + */ + protected $moderators; + /** * The User-ID * @@ -18,6 +43,42 @@ class Blog_User extends User { */ protected $_id = Users::BLOG_USER_ID; // phpcs:ignore PSR2.Classes.PropertyDeclaration.Underscore + /** + * If the User is indexable. + * + * @context http://joinmastodon.org/ns#indexable + * + * @var boolean + */ + protected $indexable; + + /** + * The WebFinger Resource. + * + * @var string + */ + protected $webfinger; + + /** + * If the User is discoverable. + * + * @see https://docs.joinmastodon.org/spec/activitypub/#discoverable + * + * @context http://joinmastodon.org/ns#discoverable + * + * @var boolean + */ + protected $discoverable; + + /** + * Restrict posting to mods + * + * @see https://join-lemmy.org/docs/contributors/05-federation.html + * + * @var boolean + */ + protected $posting_restricted_to_mods; + public function get_manually_approves_followers() { return false; } @@ -26,19 +87,13 @@ class Blog_User extends User { return true; } - public static function from_wp_user( $user_id ) { - if ( is_user_disabled( $user_id ) ) { - return new WP_Error( - 'activitypub_user_not_found', - \__( 'User not found', 'activitypub' ), - array( 'status' => 404 ) - ); - } - - $object = new static(); - $object->_id = $user_id; - - return $object; + /** + * Get the User-ID. + * + * @return string The User-ID. + */ + public function get_id() { + return $this->get_url(); } /** @@ -204,10 +259,6 @@ class Blog_User extends User { return \gmdate( 'Y-m-d\TH:i:s\Z', $time ); } - public function get_attachment() { - return array(); - } - public function get_canonical_url() { return \home_url(); } @@ -228,6 +279,14 @@ class Blog_User extends User { return get_rest_url_by_path( 'collections/moderators' ); } + public function get_public_key() { + return array( + 'id' => $this->get_id() . '#main-key', + 'owner' => $this->get_id(), + 'publicKeyPem' => Signature::get_public_key_for( $this->get__id() ), + ); + } + public function get_posting_restricted_to_mods() { if ( 'Group' === $this->get_type() ) { return true; @@ -235,4 +294,78 @@ class Blog_User extends User { return null; } + + /** + * Returns the Inbox-API-Endpoint. + * + * @return string The Inbox-Endpoint. + */ + public function get_inbox() { + return get_rest_url_by_path( sprintf( 'actors/%d/inbox', $this->get__id() ) ); + } + + /** + * Returns the Outbox-API-Endpoint. + * + * @return string The Outbox-Endpoint. + */ + public function get_outbox() { + return get_rest_url_by_path( sprintf( 'actors/%d/outbox', $this->get__id() ) ); + } + + /** + * Returns the Followers-API-Endpoint. + * + * @return string The Followers-Endpoint. + */ + public function get_followers() { + return get_rest_url_by_path( sprintf( 'actors/%d/followers', $this->get__id() ) ); + } + + /** + * Returns the Following-API-Endpoint. + * + * @return string The Following-Endpoint. + */ + public function get_following() { + return get_rest_url_by_path( sprintf( 'actors/%d/following', $this->get__id() ) ); + } + + public function get_endpoints() { + $endpoints = null; + + if ( ACTIVITYPUB_SHARED_INBOX_FEATURE ) { + $endpoints = array( + 'sharedInbox' => get_rest_url_by_path( 'inbox' ), + ); + } + + return $endpoints; + } + + /** + * Returns a user@domain type of identifier for the user. + * + * @return string The Webfinger-Identifier. + */ + public function get_webfinger() { + return $this->get_preferred_username() . '@' . \wp_parse_url( \home_url(), \PHP_URL_HOST ); + } + + /** + * Returns the Featured-API-Endpoint. + * + * @return string The Featured-Endpoint. + */ + public function get_featured() { + return get_rest_url_by_path( sprintf( 'actors/%d/collections/featured', $this->get__id() ) ); + } + + public function get_indexable() { + if ( \get_option( 'blog_public', 1 ) ) { + return true; + } else { + return false; + } + } } diff --git a/wp-content/upgrade-temp-backup/plugins/activitypub/includes/model/class-post.php b/wp-content/upgrade-temp-backup/plugins/activitypub/includes/model/class-post.php index 29aadfc9..a4229539 100644 --- a/wp-content/upgrade-temp-backup/plugins/activitypub/includes/model/class-post.php +++ b/wp-content/upgrade-temp-backup/plugins/activitypub/includes/model/class-post.php @@ -2,7 +2,7 @@ namespace Activitypub\Model; use Activitypub\Collection\Users; -use Activitypub\Transformer\Post as Post_Transformer; +use Activitypub\Transformer\Factory; /** * ActivityPub Post Class @@ -32,10 +32,14 @@ class Post { */ // phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.FoundAfterLastUsed, VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable public function __construct( $post, $post_author = null ) { - _deprecated_function( __CLASS__, '1.0.0', '\Activitypub\Transformer\Post' ); + _deprecated_function( __METHOD__, '1.0.0', '\Activitypub\Transformer\Factory::get_transformer' ); - $this->post = $post; - $this->object = Post_Transformer::transform( $post )->to_object(); + $transformer = Factory::get_transformer( $post ); + + if ( ! \is_wp_error( $transformer ) ) { + $this->post = $post; + $this->object = $transformer->to_object(); + } } /** diff --git a/wp-content/upgrade-temp-backup/plugins/activitypub/includes/model/class-user.php b/wp-content/upgrade-temp-backup/plugins/activitypub/includes/model/class-user.php index a62efb30..c5f91a31 100644 --- a/wp-content/upgrade-temp-backup/plugins/activitypub/includes/model/class-user.php +++ b/wp-content/upgrade-temp-backup/plugins/activitypub/includes/model/class-user.php @@ -4,8 +4,9 @@ namespace Activitypub\Model; use WP_Query; use WP_Error; use Activitypub\Signature; -use Activitypub\Collection\Users; +use Activitypub\Model\Blog; use Activitypub\Activity\Actor; +use Activitypub\Collection\Users; use function Activitypub\is_user_disabled; use function Activitypub\get_rest_url_by_path; @@ -32,19 +33,6 @@ class User extends Actor { */ protected $featured; - /** - * Moderators endpoint. - * - * @see https://join-lemmy.org/docs/contributors/05-federation.html - * - * @var string - */ - protected $moderators; - - public function get_type() { - return 'Person'; - } - /** * If the User is discoverable. * @@ -72,14 +60,9 @@ class User extends Actor { */ protected $webfinger; - /** - * Restrict posting to mods - * - * @see https://join-lemmy.org/docs/contributors/05-federation.html - * - * @var boolean - */ - protected $posting_restricted_to_mods = null; + public function get_type() { + return 'Person'; + } public static function from_wp_user( $user_id ) { if ( is_user_disabled( $user_id ) ) { @@ -193,7 +176,7 @@ class User extends Actor { * @return string The Inbox-Endpoint. */ public function get_inbox() { - return get_rest_url_by_path( sprintf( 'users/%d/inbox', $this->get__id() ) ); + return get_rest_url_by_path( sprintf( 'actors/%d/inbox', $this->get__id() ) ); } /** @@ -202,7 +185,7 @@ class User extends Actor { * @return string The Outbox-Endpoint. */ public function get_outbox() { - return get_rest_url_by_path( sprintf( 'users/%d/outbox', $this->get__id() ) ); + return get_rest_url_by_path( sprintf( 'actors/%d/outbox', $this->get__id() ) ); } /** @@ -211,7 +194,7 @@ class User extends Actor { * @return string The Followers-Endpoint. */ public function get_followers() { - return get_rest_url_by_path( sprintf( 'users/%d/followers', $this->get__id() ) ); + return get_rest_url_by_path( sprintf( 'actors/%d/followers', $this->get__id() ) ); } /** @@ -220,7 +203,7 @@ class User extends Actor { * @return string The Following-Endpoint. */ public function get_following() { - return get_rest_url_by_path( sprintf( 'users/%d/following', $this->get__id() ) ); + return get_rest_url_by_path( sprintf( 'actors/%d/following', $this->get__id() ) ); } /** @@ -229,7 +212,7 @@ class User extends Actor { * @return string The Featured-Endpoint. */ public function get_featured() { - return get_rest_url_by_path( sprintf( 'users/%d/collections/featured', $this->get__id() ) ); + return get_rest_url_by_path( sprintf( 'actors/%d/collections/featured', $this->get__id() ) ); } public function get_endpoints() { @@ -296,10 +279,6 @@ class User extends Actor { return $this->get_preferred_username() . '@' . \wp_parse_url( \home_url(), \PHP_URL_HOST ); } - public function get_resource() { - return $this->get_webfinger(); - } - public function get_canonical_url() { return $this->get_url(); } diff --git a/wp-content/upgrade-temp-backup/plugins/activitypub/includes/rest/class-users.php b/wp-content/upgrade-temp-backup/plugins/activitypub/includes/rest/class-actors.php similarity index 95% rename from wp-content/upgrade-temp-backup/plugins/activitypub/includes/rest/class-users.php rename to wp-content/upgrade-temp-backup/plugins/activitypub/includes/rest/class-actors.php index db9d14cf..9455a261 100644 --- a/wp-content/upgrade-temp-backup/plugins/activitypub/includes/rest/class-users.php +++ b/wp-content/upgrade-temp-backup/plugins/activitypub/includes/rest/class-actors.php @@ -12,13 +12,13 @@ use Activitypub\Collection\Users as User_Collection; use function Activitypub\is_activitypub_request; /** - * ActivityPub Followers REST-Class + * ActivityPub Actors REST-Class * * @author Matthias Pfefferle * * @see https://www.w3.org/TR/activitypub/#followers */ -class Users { +class Actors { /** * Initialize the class, registering WordPress hooks */ @@ -32,7 +32,7 @@ class Users { public static function register_routes() { \register_rest_route( ACTIVITYPUB_REST_NAMESPACE, - '/users/(?P[\w\-\.]+)', + '/(users|actors)/(?P[\w\-\.]+)', array( array( 'methods' => WP_REST_Server::READABLE, @@ -45,7 +45,7 @@ class Users { \register_rest_route( ACTIVITYPUB_REST_NAMESPACE, - '/users/(?P[\w\-\.]+)/remote-follow', + '/(users|actors)/(?P[\w\-\.]+)/remote-follow', array( array( 'methods' => WP_REST_Server::READABLE, diff --git a/wp-content/upgrade-temp-backup/plugins/activitypub/includes/rest/class-collection.php b/wp-content/upgrade-temp-backup/plugins/activitypub/includes/rest/class-collection.php index 680235ee..296789fb 100644 --- a/wp-content/upgrade-temp-backup/plugins/activitypub/includes/rest/class-collection.php +++ b/wp-content/upgrade-temp-backup/plugins/activitypub/includes/rest/class-collection.php @@ -1,13 +1,12 @@ [\w\-\.]+)/collections/tags', + '/(users|actors)/(?P[\w\-\.]+)/collections/tags', array( array( 'methods' => WP_REST_Server::READABLE, @@ -48,7 +47,7 @@ class Collection { \register_rest_route( ACTIVITYPUB_REST_NAMESPACE, - '/users/(?P[\w\-\.]+)/collections/featured', + '/(users|actors)/(?P[\w\-\.]+)/collections/featured', array( array( 'methods' => WP_REST_Server::READABLE, @@ -104,7 +103,7 @@ class Collection { $response = array( '@context' => Base_Object::JSON_LD_CONTEXT, - 'id' => get_rest_url_by_path( sprintf( 'users/%d/collections/tags', $user->get__id() ) ), + 'id' => get_rest_url_by_path( sprintf( 'actors/%d/collections/tags', $user->get__id() ) ), 'type' => 'Collection', 'totalItems' => is_countable( $tags ) ? count( $tags ) : 0, 'items' => array(), @@ -162,14 +161,20 @@ class Collection { $response = array( '@context' => Base_Object::JSON_LD_CONTEXT, - 'id' => get_rest_url_by_path( sprintf( 'users/%d/collections/featured', $user_id ) ), + 'id' => get_rest_url_by_path( sprintf( 'actors/%d/collections/featured', $user_id ) ), 'type' => 'OrderedCollection', 'totalItems' => is_countable( $posts ) ? count( $posts ) : 0, 'orderedItems' => array(), ); foreach ( $posts as $post ) { - $response['orderedItems'][] = Post::transform( $post )->to_object()->to_array( false ); + $transformer = Factory::get_transformer( $post ); + + if ( \is_wp_error( $transformer ) ) { + continue; + } + + $response['orderedItems'][] = $transformer->to_object()->to_array( false ); } $rest_response = new WP_REST_Response( $response, 200 ); diff --git a/wp-content/upgrade-temp-backup/plugins/activitypub/includes/rest/class-comment.php b/wp-content/upgrade-temp-backup/plugins/activitypub/includes/rest/class-comment.php index 6a062d6c..066b52fb 100644 --- a/wp-content/upgrade-temp-backup/plugins/activitypub/includes/rest/class-comment.php +++ b/wp-content/upgrade-temp-backup/plugins/activitypub/includes/rest/class-comment.php @@ -29,7 +29,7 @@ class Comment { public static function register_routes() { \register_rest_route( ACTIVITYPUB_REST_NAMESPACE, - '/comments/(?P\d+)/remote-reply', + '/(users|actors)/(?P\d+)/remote-reply', array( array( 'methods' => WP_REST_Server::READABLE, diff --git a/wp-content/upgrade-temp-backup/plugins/activitypub/includes/rest/class-followers.php b/wp-content/upgrade-temp-backup/plugins/activitypub/includes/rest/class-followers.php index bbddb004..ca882cf3 100644 --- a/wp-content/upgrade-temp-backup/plugins/activitypub/includes/rest/class-followers.php +++ b/wp-content/upgrade-temp-backup/plugins/activitypub/includes/rest/class-followers.php @@ -32,7 +32,7 @@ class Followers { public static function register_routes() { \register_rest_route( ACTIVITYPUB_REST_NAMESPACE, - '/users/(?P[\w\-\.]+)/followers', + '/(users|actors)/(?P[\w\-\.]+)/followers', array( array( 'methods' => WP_REST_Server::READABLE, @@ -74,13 +74,13 @@ class Followers { $json->{'@context'} = \Activitypub\get_context(); - $json->id = get_rest_url_by_path( sprintf( 'users/%d/followers', $user->get__id() ) ); + $json->id = get_rest_url_by_path( sprintf( 'actors/%d/followers', $user->get__id() ) ); $json->generator = 'http://wordpress.org/?v=' . get_masked_wp_version(); $json->actor = $user->get_id(); $json->type = 'OrderedCollectionPage'; $json->totalItems = $data['total']; // phpcs:ignore - $json->partOf = get_rest_url_by_path( sprintf( 'users/%d/followers', $user->get__id() ) ); // phpcs:ignore + $json->partOf = get_rest_url_by_path( sprintf( 'actors/%d/followers', $user->get__id() ) ); // phpcs:ignore $json->first = \add_query_arg( 'page', 1, $json->partOf ); // phpcs:ignore $json->last = \add_query_arg( 'page', \ceil ( $json->totalItems / $per_page ), $json->partOf ); // phpcs:ignore diff --git a/wp-content/upgrade-temp-backup/plugins/activitypub/includes/rest/class-following.php b/wp-content/upgrade-temp-backup/plugins/activitypub/includes/rest/class-following.php index 5ff29ec0..4e077279 100644 --- a/wp-content/upgrade-temp-backup/plugins/activitypub/includes/rest/class-following.php +++ b/wp-content/upgrade-temp-backup/plugins/activitypub/includes/rest/class-following.php @@ -31,7 +31,7 @@ class Following { public static function register_routes() { \register_rest_route( ACTIVITYPUB_REST_NAMESPACE, - '/users/(?P[\w\-\.]+)/following', + '/(users|actors)/(?P[\w\-\.]+)/following', array( array( 'methods' => \WP_REST_Server::READABLE, @@ -67,12 +67,12 @@ class Following { $json->{'@context'} = \Activitypub\get_context(); - $json->id = get_rest_url_by_path( sprintf( 'users/%d/following', $user->get__id() ) ); + $json->id = get_rest_url_by_path( sprintf( 'actors/%d/following', $user->get__id() ) ); $json->generator = 'http://wordpress.org/?v=' . get_masked_wp_version(); $json->actor = $user->get_id(); $json->type = 'OrderedCollectionPage'; - $json->partOf = get_rest_url_by_path( sprintf( 'users/%d/following', $user->get__id() ) ); // phpcs:ignore + $json->partOf = get_rest_url_by_path( sprintf( 'actors/%d/following', $user->get__id() ) ); // phpcs:ignore $items = apply_filters( 'activitypub_rest_following', array(), $user ); // phpcs:ignore diff --git a/wp-content/upgrade-temp-backup/plugins/activitypub/includes/rest/class-inbox.php b/wp-content/upgrade-temp-backup/plugins/activitypub/includes/rest/class-inbox.php index b5ea52eb..161fcf19 100644 --- a/wp-content/upgrade-temp-backup/plugins/activitypub/includes/rest/class-inbox.php +++ b/wp-content/upgrade-temp-backup/plugins/activitypub/includes/rest/class-inbox.php @@ -48,7 +48,7 @@ class Inbox { \register_rest_route( ACTIVITYPUB_REST_NAMESPACE, - '/users/(?P[\w\-\.]+)/inbox', + '/(users|actors)/(?P[\w\-\.]+)/inbox', array( array( 'methods' => WP_REST_Server::CREATABLE, @@ -90,10 +90,10 @@ class Inbox { $json = new \stdClass(); $json->{'@context'} = get_context(); - $json->id = get_rest_url_by_path( sprintf( 'users/%d/inbox', $user->get__id() ) ); + $json->id = get_rest_url_by_path( sprintf( 'actors/%d/inbox', $user->get__id() ) ); $json->generator = 'http://wordpress.org/?v=' . get_masked_wp_version(); $json->type = 'OrderedCollectionPage'; - $json->partOf = get_rest_url_by_path( sprintf( 'users/%d/inbox', $user->get__id() ) ); // phpcs:ignore + $json->partOf = get_rest_url_by_path( sprintf( 'actors/%d/inbox', $user->get__id() ) ); // phpcs:ignore $json->totalItems = 0; // phpcs:ignore $json->orderedItems = array(); // phpcs:ignore $json->first = $json->partOf; // phpcs:ignore diff --git a/wp-content/upgrade-temp-backup/plugins/activitypub/includes/rest/class-outbox.php b/wp-content/upgrade-temp-backup/plugins/activitypub/includes/rest/class-outbox.php index 474f1622..e0670301 100644 --- a/wp-content/upgrade-temp-backup/plugins/activitypub/includes/rest/class-outbox.php +++ b/wp-content/upgrade-temp-backup/plugins/activitypub/includes/rest/class-outbox.php @@ -5,9 +5,9 @@ use stdClass; use WP_Error; use WP_REST_Server; use WP_REST_Response; -use Activitypub\Transformer\Post; use Activitypub\Activity\Activity; use Activitypub\Collection\Users as User_Collection; +use Activitypub\Transformer\Factory; use function Activitypub\get_context; use function Activitypub\get_rest_url_by_path; @@ -34,7 +34,7 @@ class Outbox { public static function register_routes() { \register_rest_route( ACTIVITYPUB_REST_NAMESPACE, - '/users/(?P[\w\-\.]+)/outbox', + '/(users|actors)/(?P[\w\-\.]+)/outbox', array( array( 'methods' => WP_REST_Server::READABLE, @@ -72,11 +72,11 @@ class Outbox { $json = new stdClass(); $json->{'@context'} = get_context(); - $json->id = get_rest_url_by_path( sprintf( 'users/%d/outbox', $user_id ) ); + $json->id = get_rest_url_by_path( sprintf( 'actors/%d/outbox', $user_id ) ); $json->generator = 'http://wordpress.org/?v=' . get_masked_wp_version(); $json->actor = $user->get_id(); $json->type = 'OrderedCollectionPage'; - $json->partOf = get_rest_url_by_path( sprintf( 'users/%d/outbox', $user_id ) ); // phpcs:ignore + $json->partOf = get_rest_url_by_path( sprintf( 'actors/%d/outbox', $user_id ) ); // phpcs:ignore $json->totalItems = 0; // phpcs:ignore if ( $user_id > 0 ) { @@ -111,7 +111,13 @@ class Outbox { ); foreach ( $posts as $post ) { - $post = Post::transform( $post )->to_object(); + $transformer = Factory::get_transformer( $post ); + + if ( \is_wp_error( $transformer ) ) { + continue; + } + + $post = $transformer->to_object(); $activity = new Activity(); $activity->set_type( 'Create' ); $activity->set_object( $post ); diff --git a/wp-content/upgrade-temp-backup/plugins/activitypub/includes/rest/class-server.php b/wp-content/upgrade-temp-backup/plugins/activitypub/includes/rest/class-server.php index 13e70736..d03f6c17 100644 --- a/wp-content/upgrade-temp-backup/plugins/activitypub/includes/rest/class-server.php +++ b/wp-content/upgrade-temp-backup/plugins/activitypub/includes/rest/class-server.php @@ -5,7 +5,7 @@ use stdClass; use WP_Error; use WP_REST_Response; use Activitypub\Signature; -use Activitypub\Model\Application_User; +use Activitypub\Model\Application; /** * ActivityPub Server REST-Class @@ -47,7 +47,7 @@ class Server { * @return WP_REST_Response The JSON profile of the Application Actor. */ public static function application_actor() { - $user = new Application_User(); + $user = new Application(); $json = $user->to_array(); @@ -62,6 +62,9 @@ class Server { * * @see WP_REST_Request * + * @see https://www.w3.org/wiki/SocialCG/ActivityPub/Primer/Authentication_Authorization#Authorized_fetch + * @see https://swicg.github.io/activitypub-http-signature/#authorized-fetch + * * @param WP_REST_Response|WP_HTTP_Response|WP_Error|mixed $response Result to send to the client. * Usually a WP_REST_Response or WP_Error. * @param array $handler Route handler used for the request. @@ -80,7 +83,8 @@ class Server { if ( ! \str_starts_with( $route, '/' . ACTIVITYPUB_REST_NAMESPACE ) || \str_starts_with( $route, '/' . \trailingslashit( ACTIVITYPUB_REST_NAMESPACE ) . 'webfinger' ) || - \str_starts_with( $route, '/' . \trailingslashit( ACTIVITYPUB_REST_NAMESPACE ) . 'nodeinfo' ) + \str_starts_with( $route, '/' . \trailingslashit( ACTIVITYPUB_REST_NAMESPACE ) . 'nodeinfo' ) || + \str_starts_with( $route, '/' . \trailingslashit( ACTIVITYPUB_REST_NAMESPACE ) . 'application' ) ) { return $response; } @@ -102,17 +106,12 @@ class Server { return $response; } - // POST-Requets are always signed - if ( 'GET' !== $request->get_method() ) { - $verified_request = Signature::verify_http_signature( $request ); - if ( \is_wp_error( $verified_request ) ) { - return new WP_Error( - 'activitypub_signature_verification', - $verified_request->get_error_message(), - array( 'status' => 401 ) - ); - } - } elseif ( 'GET' === $request->get_method() && ACTIVITYPUB_AUTHORIZED_FETCH ) { // GET-Requests are only signed in secure mode + if ( + // POST-Requests are always signed + 'GET' !== $request->get_method() || + // GET-Requests only require a signature in secure mode + ( 'GET' === $request->get_method() && ACTIVITYPUB_AUTHORIZED_FETCH ) + ) { $verified_request = Signature::verify_http_signature( $request ); if ( \is_wp_error( $verified_request ) ) { return new WP_Error( diff --git a/wp-content/upgrade-temp-backup/plugins/activitypub/includes/transformer/class-base.php b/wp-content/upgrade-temp-backup/plugins/activitypub/includes/transformer/class-base.php index b66703fa..5041fa96 100644 --- a/wp-content/upgrade-temp-backup/plugins/activitypub/includes/transformer/class-base.php +++ b/wp-content/upgrade-temp-backup/plugins/activitypub/includes/transformer/class-base.php @@ -1,6 +1,7 @@ get_locale() => $this->get_content(), ) ); - $path = sprintf( 'users/%d/followers', intval( $comment->comment_author ) ); + $path = sprintf( 'actors/%d/followers', intval( $comment->comment_author ) ); $object->set_to( array( @@ -90,7 +91,7 @@ class Comment extends Base { */ protected function get_attributed_to() { if ( is_single_user() ) { - $user = new Blog_User(); + $user = new Blog(); return $user->get_url(); } @@ -218,6 +219,23 @@ class Comment extends Base { return apply_filters( 'activitypub_extract_mentions', array(), $this->wp_object->comment_content, $this->wp_object ); } + /** + * Gets the ancestors of the comment, but only the ones that are ActivityPub comments. + * + * @return array The list of ancestors. + */ + protected function get_comment_ancestors() { + $ancestors = get_comment_ancestors( $this->wp_object ); + + // Now that we have the full tree of ancestors, only return the ones received from the fediverse + return array_filter( + $ancestors, + function ( $comment_id ) { + return \get_comment_meta( $comment_id, 'protocol', true ) === 'activitypub'; + } + ); + } + /** * Collect all other Users that participated in this comment-thread * to send them a notification about the new reply. @@ -232,27 +250,18 @@ class Comment extends Base { return $mentions; } - $comment_query = new WP_Comment_Query( - array( - 'post_id' => $this->wp_object->comment_post_ID, - // phpcs:ignore WordPress.DB.SlowDBQuery.slow_db_query_meta_query - 'meta_query' => array( - array( - 'key' => 'protocol', - 'value' => 'activitypub', - ), - ), - ) - ); + $ancestors = $this->get_comment_ancestors(); + if ( ! $ancestors ) { + return $mentions; + } - if ( $comment_query->comments ) { - foreach ( $comment_query->comments as $comment ) { - if ( ! empty( $comment->comment_author_url ) ) { - $acct = Webfinger::uri_to_acct( $comment->comment_author_url ); - if ( $acct && ! is_wp_error( $acct ) ) { - $acct = str_replace( 'acct:', '@', $acct ); - $mentions[ $acct ] = $comment->comment_author_url; - } + foreach ( $ancestors as $comment_id ) { + $comment = \get_comment( $comment_id ); + if ( $comment && ! empty( $comment->comment_author_url ) ) { + $acct = Webfinger::uri_to_acct( $comment->comment_author_url ); + if ( $acct && ! is_wp_error( $acct ) ) { + $acct = str_replace( 'acct:', '@', $acct ); + $mentions[ $acct ] = $comment->comment_author_url; } } } diff --git a/wp-content/upgrade-temp-backup/plugins/activitypub/includes/transformer/class-factory.php b/wp-content/upgrade-temp-backup/plugins/activitypub/includes/transformer/class-factory.php index 33210ca1..b21de7f9 100644 --- a/wp-content/upgrade-temp-backup/plugins/activitypub/includes/transformer/class-factory.php +++ b/wp-content/upgrade-temp-backup/plugins/activitypub/includes/transformer/class-factory.php @@ -11,7 +11,11 @@ use Activitypub\Transformer\Attachment; * Transformer Factory */ class Factory { - public static function get_transformer( $object ) { + /** + * @param mixed $object The object to transform + * @return \Activitypub\Transformer|\WP_Error The transformer to use, or an error. + */ + public static function get_transformer( $object ) { // phpcs:ignore Universal.NamingConventions.NoReservedKeywordParameterNames.objectFound if ( ! \is_object( $object ) ) { return new WP_Error( 'invalid_object', __( 'Invalid object', 'activitypub' ) ); } @@ -41,9 +45,9 @@ class Factory { * return $transformer; * }, 10, 3 ); * - * @param Activitypub\Transformer\Base $transformer The transformer to use. - * @param mixed $object The object to transform. - * @param string $object_class The class of the object to transform. + * @param Base $transformer The transformer to use. + * @param mixed $object The object to transform. + * @param string $object_class The class of the object to transform. * * @return mixed The transformer to use. */ diff --git a/wp-content/upgrade-temp-backup/plugins/activitypub/includes/transformer/class-post.php b/wp-content/upgrade-temp-backup/plugins/activitypub/includes/transformer/class-post.php index 3c4905ec..646f45b1 100644 --- a/wp-content/upgrade-temp-backup/plugins/activitypub/includes/transformer/class-post.php +++ b/wp-content/upgrade-temp-backup/plugins/activitypub/includes/transformer/class-post.php @@ -3,13 +3,13 @@ namespace Activitypub\Transformer; use WP_Post; use Activitypub\Shortcodes; -use Activitypub\Model\Blog_User; +use Activitypub\Model\Blog; use Activitypub\Transformer\Base; use Activitypub\Collection\Users; -use Activitypub\Activity\Base_Object; use function Activitypub\esc_hashtag; use function Activitypub\is_single_user; +use function Activitypub\get_enclosures; use function Activitypub\get_rest_url_by_path; use function Activitypub\site_supports_blocks; @@ -70,7 +70,7 @@ class Post extends Base { $this->get_locale() => $this->get_content(), ) ); - $path = sprintf( 'users/%d/followers', intval( $post->post_author ) ); + $path = sprintf( 'actors/%d/followers', intval( $post->post_author ) ); $object->set_to( array( @@ -116,7 +116,7 @@ class Post extends Base { * @return string The User-URL. */ protected function get_attributed_to() { - $blog_user = new Blog_User(); + $blog_user = new Blog(); if ( is_single_user() ) { return $blog_user->get_url(); @@ -139,14 +139,34 @@ class Post extends Base { protected function get_attachment() { // Once upon a time we only supported images, but we now support audio/video as well. // We maintain the image-centric naming for backwards compatibility. - $max_media = \intval( \apply_filters( 'activitypub_max_image_attachments', \get_option( 'activitypub_max_image_attachments', ACTIVITYPUB_MAX_IMAGE_ATTACHMENTS ) ) ); + $max_media = \intval( + \apply_filters( + 'activitypub_max_image_attachments', + \get_option( 'activitypub_max_image_attachments', ACTIVITYPUB_MAX_IMAGE_ATTACHMENTS ) + ) + ); - if ( site_supports_blocks() && \has_blocks( $this->wp_object->post_content ) ) { - $media = $this->get_block_attachments( $max_media ); - } else { - $media = $this->get_classic_editor_images( $max_media ); + $media = array( + 'audio' => array(), + 'video' => array(), + 'image' => array(), + ); + $id = $this->wp_object->ID; + + // list post thumbnail first if this post has one + if ( \function_exists( 'has_post_thumbnail' ) && \has_post_thumbnail( $id ) ) { + $media['image'][] = array( 'id' => \get_post_thumbnail_id( $id ) ); } + $media = $this->get_enclosures( $media ); + + if ( site_supports_blocks() && \has_blocks( $this->wp_object->post_content ) ) { + $media = $this->get_block_attachments( $media, $max_media ); + } else { + $media = $this->get_classic_editor_images( $media, $max_media ); + } + + $media = self::filter_media_by_object_type( $media, \get_post_format( $this->wp_object ), $this->wp_object ); $unique_ids = \array_unique( \array_column( $media, 'id' ) ); $media = \array_intersect_key( $media, $unique_ids ); $media = \array_slice( $media, 0, $max_media ); @@ -157,35 +177,21 @@ class Post extends Base { /** * Get media attachments from blocks. They will be formatted as ActivityPub attachments, not as WP attachments. * - * @param int $max_media The maximum number of attachments to return. + * @param array $media The media array grouped by type. + * @param int $max_media The maximum number of attachments to return. * * @return array The attachments. */ - protected function get_block_attachments( $max_media ) { + protected function get_block_attachments( $media, $max_media ) { // max media can't be negative or zero if ( $max_media <= 0 ) { return array(); } - $id = $this->wp_object->ID; + $blocks = \parse_blocks( $this->wp_object->post_content ); + $media = self::get_media_from_blocks( $blocks, $media ); - $media = array( - 'image' => array(), - 'audio' => array(), - 'video' => array(), - ); - - // list post thumbnail first if this post has one - if ( \function_exists( 'has_post_thumbnail' ) && \has_post_thumbnail( $id ) ) { - $media['image'][] = array( 'id' => \get_post_thumbnail_id( $id ) ); - } - - if ( $max_media > 0 ) { - $blocks = \parse_blocks( $this->wp_object->post_content ); - $media = self::get_media_from_blocks( $blocks, $media ); - } - - return self::filter_media_by_object_type( $media, \get_post_format( $this->wp_object ) ); + return $media; } /** @@ -202,8 +208,9 @@ class Post extends Base { if ( $max_images <= 0 ) { return array(); } + $images = array(); - $query = new \WP_Query( + $query = new \WP_Query( array( 'post_parent' => $this->wp_object->ID, 'post_status' => 'inherit', @@ -214,6 +221,7 @@ class Post extends Base { 'posts_per_page' => $max_images, ) ); + foreach ( $query->get_posts() as $attachment ) { if ( ! \in_array( $attachment->ID, $images, true ) ) { $images[] = array( 'id' => $attachment->ID ); @@ -249,7 +257,7 @@ class Post extends Base { // This linter warning is a false positive - we have to // re-count each time here as we modify $images. // phpcs:ignore Squiz.PHP.DisallowSizeFunctionsInLoops.Found - while ( $tags->next_tag( 'img' ) && ( \count( $images ) < $max_images ) ) { + while ( $tags->next_tag( 'img' ) && ( \count( $images ) <= $max_images ) ) { $src = $tags->get_attribute( 'src' ); // If the img source is in our uploads dir, get the @@ -292,34 +300,68 @@ class Post extends Base { * Get post images from the classic editor. * Note that audio/video attachments are only supported in the block editor. * - * @param int $max_images The maximum number of images to return. + * @param array $media The media array grouped by type. + * @param int $max_images The maximum number of images to return. * * @return array The attachments. */ - protected function get_classic_editor_images( $max_images ) { + protected function get_classic_editor_images( $media, $max_images ) { // max images can't be negative or zero if ( $max_images <= 0 ) { return array(); } - $id = $this->wp_object->ID; - - $images = array(); - - // list post thumbnail first if this post has one - if ( \function_exists( 'has_post_thumbnail' ) && \has_post_thumbnail( $id ) ) { - $images[] = \get_post_thumbnail_id( $id ); - } - - if ( \count( $images ) < $max_images ) { + if ( \count( $media['image'] ) <= $max_images ) { if ( \class_exists( '\WP_HTML_Tag_Processor' ) ) { - $images = \array_merge( $images, $this->get_classic_editor_image_embeds( $max_images ) ); + $media['image'] = \array_merge( $media['image'], $this->get_classic_editor_image_embeds( $max_images ) ); } else { - $images = \array_merge( $images, $this->get_classic_editor_image_attachments( $max_images ) ); + $media['image'] = \array_merge( $media['image'], $this->get_classic_editor_image_attachments( $max_images ) ); } } - return $images; + return $media; + } + + /** + * Get enclosures for a post. + * + * @param array $media The media array grouped by type. + * + * @return array The media array extended with enclosures. + */ + public function get_enclosures( $media ) { + $enclosures = get_enclosures( $this->wp_object->ID ); + + if ( ! $enclosures ) { + return $media; + } + + foreach ( $enclosures as $enclosure ) { + // check if URL is an attachment + $attachment_id = \attachment_url_to_postid( $enclosure['url'] ); + if ( $attachment_id ) { + $enclosure['id'] = $attachment_id; + $enclosure['url'] = \wp_get_attachment_url( $attachment_id ); + $enclosure['mediaType'] = \get_post_mime_type( $attachment_id ); + } + + $mime_type = $enclosure['mediaType']; + $mime_type_parts = \explode( '/', $mime_type ); + + switch ( $mime_type_parts[0] ) { + case 'image': + $media['image'][] = $enclosure; + break; + case 'audio': + $media['audio'][] = $enclosure; + break; + case 'video': + $media['video'][] = $enclosure; + break; + } + } + + return $media; } /** @@ -331,7 +373,6 @@ class Post extends Base { * @return array The image IDs. */ protected static function get_media_from_blocks( $blocks, $media ) { - foreach ( $blocks as $block ) { // recurse into inner blocks if ( ! empty( $block['innerBlocks'] ) ) { @@ -397,19 +438,19 @@ class Post extends Base { /** * Filter media IDs by object type. * - * @param array $media The media array grouped by type. - * @param array $type The object type. + * @param array $media The media array grouped by type. + * @param string $type The object type. * * @return array The filtered media IDs. */ - protected static function filter_media_by_object_type( $media, $type ) { - $type = \apply_filters( 'filter_media_by_object_type', \strtolower( $type ) ); + protected static function filter_media_by_object_type( $media, $type, $wp_object ) { + $type = \apply_filters( 'filter_media_by_object_type', \strtolower( $type ), $wp_object ); if ( ! empty( $media[ $type ] ) ) { return $media[ $type ]; } - return array_merge( array(), ...array_values( $media ) ); + return array_filter( array_merge( array(), ...array_values( $media ) ) ); } /** @@ -420,6 +461,10 @@ class Post extends Base { * @return array The ActivityPub Attachment. */ public static function wp_attachment_to_activity_attachment( $media ) { + if ( ! isset( $media['id'] ) ) { + return $media; + } + $id = $media['id']; $attachment = array(); $mime_type = \get_post_mime_type( $id ); @@ -427,14 +472,14 @@ class Post extends Base { // switching on image/audio/video switch ( $mime_type_parts[0] ) { case 'image': - $image_size = 'full'; + $image_size = 'large'; /** * Filter the image URL returned for each post. * * @param array|false $thumbnail The image URL, or false if no image is available. * @param int $id The attachment ID. - * @param string $image_size The image size to retrieve. Set to 'full' by default. + * @param string $image_size The image size to retrieve. Set to 'large' by default. */ $thumbnail = apply_filters( 'activitypub_get_image', @@ -488,16 +533,16 @@ class Post extends Base { * Return details about an image attachment. * * @param int $id The attachment ID. - * @param string $image_size The image size to retrieve. Set to 'full' by default. + * @param string $image_size The image size to retrieve. Set to 'large' by default. * * @return array|false Array of image data, or boolean false if no image is available. */ - protected static function get_wordpress_attachment( $id, $image_size = 'full' ) { + protected static function get_wordpress_attachment( $id, $image_size = 'large' ) { /** * Hook into the image retrieval process. Before image retrieval. * * @param int $id The attachment ID. - * @param string $image_size The image size to retrieve. Set to 'full' by default. + * @param string $image_size The image size to retrieve. Set to 'large' by default. */ do_action( 'activitypub_get_image_pre', $id, $image_size ); @@ -507,7 +552,7 @@ class Post extends Base { * Hook into the image retrieval process. After image retrieval. * * @param int $id The attachment ID. - * @param string $image_size The image size to retrieve. Set to 'full' by default. + * @param string $image_size The image size to retrieve. Set to 'large' by default. */ do_action( 'activitypub_get_image_post', $id, $image_size ); @@ -536,7 +581,7 @@ class Post extends Base { } // Default to Article. - $object_type = 'Article'; + $object_type = 'Note'; $post_format = 'standard'; if ( \get_theme_support( 'post-formats' ) ) { @@ -547,18 +592,12 @@ class Post extends Base { switch ( $post_type ) { case 'post': switch ( $post_format ) { - case 'aside': - case 'status': - case 'quote': - case 'note': - case 'gallery': - case 'image': - case 'video': - case 'audio': - $object_type = 'Note'; + case 'standard': + case '': + $object_type = 'Article'; break; default: - $object_type = 'Article'; + $object_type = 'Note'; break; } break; @@ -566,7 +605,7 @@ class Post extends Base { $object_type = 'Page'; break; default: - $object_type = 'Article'; + $object_type = 'Note'; break; } @@ -593,6 +632,16 @@ class Post extends Base { return $cc; } + + public function get_audience() { + if ( is_single_user() ) { + return null; + } else { + $blog = new Blog(); + return $blog->get_id(); + } + } + /** * Returns a list of Tags, used in the Post. * @@ -708,6 +757,8 @@ class Post extends Base { */ do_action( 'activitypub_before_get_content', $post ); + add_filter( 'render_block_core/embed', array( self::class, 'revert_embed_links' ), 10, 2 ); + // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited $post = $this->wp_object; $content = $this->get_post_content_template(); @@ -792,4 +843,21 @@ class Post extends Base { */ return apply_filters( 'activitypub_post_locale', $lang, $post_id, $this->wp_object ); } + + /** + * Transform Embed blocks to block level link. + * + * Remote servers will simply drop iframe elements, rendering incomplete content. + * + * @see https://www.w3.org/TR/activitypub/#security-sanitizing-content + * @see https://www.w3.org/wiki/ActivityPub/Primer/HTML + * + * @param string $block_content The block content (html) + * @param object $block The block object + * + * @return string A block level link + */ + public static function revert_embed_links( $block_content, $block ) { + return '

' . $block['attrs']['url'] . '

'; + } } diff --git a/wp-content/upgrade-temp-backup/plugins/activitypub/integration/class-enable-mastodon-apps.php b/wp-content/upgrade-temp-backup/plugins/activitypub/integration/class-enable-mastodon-apps.php index 8fe2c3f5..65a78ddf 100644 --- a/wp-content/upgrade-temp-backup/plugins/activitypub/integration/class-enable-mastodon-apps.php +++ b/wp-content/upgrade-temp-backup/plugins/activitypub/integration/class-enable-mastodon-apps.php @@ -28,10 +28,12 @@ class Enable_Mastodon_Apps { public static function init() { \add_filter( 'mastodon_api_account_followers', array( self::class, 'api_account_followers' ), 10, 2 ); \add_filter( 'mastodon_api_account', array( self::class, 'api_account_add_followers' ), 20, 2 ); - \add_filter( 'mastodon_api_account', array( self::class, 'api_account_external' ), 10, 2 ); + \add_filter( 'mastodon_api_account', array( self::class, 'api_account_external' ), 15, 2 ); \add_filter( 'mastodon_api_search', array( self::class, 'api_search' ), 40, 2 ); + \add_filter( 'mastodon_api_search', array( self::class, 'api_search_by_url' ), 40, 2 ); \add_filter( 'mastodon_api_get_posts_query_args', array( self::class, 'api_get_posts_query_args' ) ); \add_filter( 'mastodon_api_statuses', array( self::class, 'api_statuses_external' ), 10, 2 ); + \add_filter( 'mastodon_api_status_context', array( self::class, 'api_get_replies' ), 10, 23 ); } /** @@ -102,11 +104,11 @@ class Enable_Mastodon_Apps { * @return Enable_Mastodon_Apps\Entity\Account The filtered Account */ public static function api_account_add_followers( $account, $user_id ) { - if ( ! $account instanceof Account || ! is_numeric( $user_id ) ) { + if ( ! $account instanceof Account ) { return $account; } - $user = Users::get_by_id( $user_id ); + $user = Users::get_by_various( $user_id ); if ( ! $user || is_wp_error( $user ) ) { return $account; @@ -130,7 +132,7 @@ class Enable_Mastodon_Apps { $account->acct = $user->get_preferred_username(); $account->note = $user->get_summary(); - $account->followers_count = Followers::count_followers( $user_id ); + $account->followers_count = Followers::count_followers( $user->get__id() ); return $account; } @@ -143,7 +145,7 @@ class Enable_Mastodon_Apps { * @return Enable_Mastodon_Apps\Entity\Account The filtered Account */ public static function api_account_external( $user_data, $user_id ) { - if ( $user_data || is_numeric( $user_id ) ) { + if ( $user_data || ( is_numeric( $user_id ) && $user_id ) ) { // Only augment. return $user_data; } @@ -201,12 +203,38 @@ class Enable_Mastodon_Apps { $account->header = $data['image']['url']; $account->header_static = $data['image']['url']; } - + if ( ! isset( $data['published'] ) ) { + $data['published'] = 'now'; + } $account->created_at = new DateTime( $data['published'] ); return $account; } + public static function api_search_by_url( $search_data, $request ) { + $p = \wp_parse_url( $request->get_param( 'q' ) ); + if ( ! $p || ! isset( $p['host'] ) ) { + return $search_data; + } + + $object = Http::get_remote_object( $request->get_param( 'q' ), true ); + if ( is_wp_error( $object ) || ! isset( $object['attributedTo'] ) ) { + return $search_data; + } + + $account = self::get_account_for_actor( $object['attributedTo'] ); + if ( ! $account ) { + return $search_data; + } + + $status = self::activity_to_status( $object, $account ); + if ( $status ) { + $search_data['statuses'][] = $status; + } + + return $search_data; + } + public static function api_search( $search_data, $request ) { $user_id = \get_current_user_id(); if ( ! $user_id ) { @@ -254,7 +282,7 @@ class Enable_Mastodon_Apps { return $search_data; } - public function api_get_posts_query_args( $args ) { + public static function api_get_posts_query_args( $args ) { if ( isset( $args['author'] ) && is_string( $args['author'] ) ) { $uri = Webfinger_Util::resolve( $args['author'] ); if ( $uri && ! is_wp_error( $uri ) ) { @@ -266,6 +294,78 @@ class Enable_Mastodon_Apps { return $args; } + private static function activity_to_status( $item, $account ) { + if ( isset( $item['object'] ) ) { + $object = $item['object']; + } else { + $object = $item; + } + + if ( ! isset( $object['type'] ) || 'Note' !== $object['type'] ) { + return null; + } + + $status = new Status(); + $status->id = $object['id']; + $status->created_at = new DateTime( $object['published'] ); + $status->content = $object['content']; + $status->account = $account; + + if ( ! empty( $object['inReplyTo'] ) ) { + $status->in_reply_to_id = $object['inReplyTo']; + } + + if ( ! empty( $object['visibility'] ) ) { + $status->visibility = $object['visibility']; + } + if ( ! empty( $object['url'] ) ) { + $status->url = $object['url']; + $status->uri = $object['url']; + } else { + $status->uri = $object['id']; + } + + if ( ! empty( $object['attachment'] ) ) { + $status->media_attachments = array_map( + function ( $attachment ) { + $default_attachment = array( + 'url' => null, + 'mediaType' => null, + 'name' => null, + 'width' => 0, + 'height' => 0, + 'blurhash' => null, + ); + + $attachment = array_merge( $default_attachment, $attachment ); + + $media_attachment = new Media_Attachment(); + $media_attachment->id = $attachment['url']; + $media_attachment->type = strtok( $attachment['mediaType'], '/' ); + $media_attachment->url = $attachment['url']; + $media_attachment->preview_url = $attachment['url']; + $media_attachment->description = $attachment['name']; + if ( $attachment['blurhash'] ) { + $media_attachment->blurhash = $attachment['blurhash']; + } + if ( $attachment['width'] > 0 && $attachment['height'] > 0 ) { + $media_attachment->meta = array( + 'original' => array( + 'width' => $attachment['width'], + 'height' => $attachment['height'], + 'size' => $attachment['width'] . 'x' . $attachment['height'], + 'aspect' => $attachment['width'] / $attachment['height'], + ), + );} + return $media_attachment; + }, + $object['attachment'] + ); + } + + return $status; + } + public static function api_statuses_external( $statuses, $args ) { if ( ! isset( $args['activitypub'] ) ) { return $statuses; @@ -277,13 +377,8 @@ class Enable_Mastodon_Apps { return $statuses; } - $response = Http::get( $data['outbox'], true ); - if ( is_wp_error( $response ) || wp_remote_retrieve_response_code( $response ) !== 200 ) { - return $statuses; - } - - $outbox = json_decode( wp_remote_retrieve_body( $response ), true ); - if ( ! $outbox || is_wp_error( $outbox ) || ! isset( $outbox['first'] ) ) { + $outbox = Http::get_remote_object( $data['outbox'], true ); + if ( is_wp_error( $outbox ) || ! isset( $outbox['first'] ) ) { return $statuses; } @@ -291,76 +386,77 @@ class Enable_Mastodon_Apps { if ( ! $account ) { return $statuses; } - - $response = Http::get( $outbox['first'], true ); - if ( is_wp_error( $response ) || wp_remote_retrieve_response_code( $response ) !== 200 ) { - return $statuses; + $limit = 10; + if ( isset( $args['posts_per_page'] ) ) { + $limit = $args['posts_per_page']; } - $posts = json_decode( wp_remote_retrieve_body( $response ), true ); + if ( $limit > 40 ) { + $limit = 40; + } + $activitypub_statuses = array(); + $url = $outbox['first']; + $tries = 0; + while ( $url ) { + if ( ++$tries > 3 ) { + break; + } - $activitypub_statuses = array_map( - function ( $item ) use ( $account ) { - $object = $item['object']; - if ( ! isset( $object['type'] ) || 'Note' !== $object['type'] ) { - return null; - } + $posts = Http::get_remote_object( $url, true ); + if ( is_wp_error( $posts ) ) { + return $statuses; + } - $status = new Status(); - $status->id = Mastodon_API::remap_url( $object['id'] ); - $status->created_at = new DateTime( $object['published'] ); - $status->content = $object['content']; - $status->account = $account; + $new_statuses = array_map( + function ( $item ) use ( $account, $args ) { + if ( $args['exclude_replies'] ) { + if ( isset( $item['object']['inReplyTo'] ) && $item['object']['inReplyTo'] ) { + return null; + } + } + return self::activity_to_status( $item, $account ); + }, + $posts['orderedItems'] + ); + $activitypub_statuses = array_merge( $activitypub_statuses, array_filter( $new_statuses ) ); + $url = $posts['next']; - if ( ! empty( $object['inReplyTo'] ) ) { - $status->in_reply_to_id = $object['inReplyTo']; - } + if ( count( $activitypub_statuses ) >= $limit ) { + break; + } + } - if ( ! empty( $object['visibility'] ) ) { - $status->visibility = $object['visibility']; - } + return array_slice( $activitypub_statuses, 0, $limit ); + } - $status->uri = $object['url']; + public static function api_get_replies( $context, $post_id, $url ) { + $meta = Http::get_remote_object( $url, true ); + if ( is_wp_error( $meta ) || ! isset( $meta['replies']['first']['next'] ) ) { + return $context; + } - if ( ! empty( $object['attachment'] ) ) { - $status->media_attachments = array_map( - function ( $attachment ) { - $default_attachment = array( - 'url' => null, - 'mediaType' => null, - 'name' => null, - 'width' => 0, - 'height' => 0, - 'blurhash' => null, - ); + $replies_url = $meta['replies']['first']['next']; + $replies = Http::get_remote_object( $replies_url, true ); + if ( is_wp_error( $replies ) || ! isset( $replies['items'] ) ) { + return $context; + } - $attachment = array_merge( $default_attachment, $attachment ); + foreach ( $replies['items'] as $url ) { + $response = Http::get( $url, true ); + if ( is_wp_error( $response ) || wp_remote_retrieve_response_code( $response ) !== 200 ) { + continue; + } + $status = json_decode( wp_remote_retrieve_body( $response ), true ); + if ( ! $status || is_wp_error( $status ) ) { + continue; + } - $media_attachment = new Media_Attachment(); - $media_attachment->id = Mastodon_API::remap_url( $attachment['url'], $attachment ); - $media_attachment->type = strtok( $attachment['mediaType'], '/' ); - $media_attachment->url = $attachment['url']; - $media_attachment->preview_url = $attachment['url']; - $media_attachment->description = $attachment['name']; - $media_attachment->blurhash = $attachment['blurhash']; - $media_attachment->meta = array( - 'original' => array( - 'width' => $attachment['width'], - 'height' => $attachment['height'], - 'size' => $attachment['width'] . 'x' . $attachment['height'], - 'aspect' => $attachment['width'] / $attachment['height'], - ), - ); - return $media_attachment; - }, - $object['attachment'] - ); - } + $account = self::get_account_for_actor( $status['attributedTo'] ); + $status = self::activity_to_status( $status, $account ); + if ( $status ) { + $context['descendants'][ $status->id ] = $status; + } + } - return $status; - }, - $posts['orderedItems'] - ); - - return $activitypub_statuses; + return $context; } } diff --git a/wp-content/upgrade-temp-backup/plugins/activitypub/integration/class-jetpack.php b/wp-content/upgrade-temp-backup/plugins/activitypub/integration/class-jetpack.php new file mode 100644 index 00000000..009811e9 --- /dev/null +++ b/wp-content/upgrade-temp-backup/plugins/activitypub/integration/class-jetpack.php @@ -0,0 +1,21 @@ + \Activitypub\get_context() ), $object->to_object()->to_array() ); - -// filter output -$json = \apply_filters( 'activitypub_json_comment_array', $json ); +if ( \is_wp_error( $transformer ) ) { + \wp_die( + \esc_html( $transformer->get_error_message() ), + 404 + ); +} /* * Action triggerd prior to the ActivityPub profile being created and sent to the client */ \do_action( 'activitypub_json_comment_pre' ); -$options = 0; -// JSON_PRETTY_PRINT added in PHP 5.4 -if ( \get_query_var( 'pretty' ) ) { - $options |= \JSON_PRETTY_PRINT; // phpcs:ignore -} - -$options |= \JSON_HEX_TAG | \JSON_HEX_AMP | \JSON_HEX_QUOT; - -/* - * Options to be passed to json_encode() - * - * @param int $options The current options flags - */ -$options = \apply_filters( 'activitypub_json_comment_options', $options ); - \header( 'Content-Type: application/activity+json' ); -echo \wp_json_encode( $json, $options ); +echo $transformer->to_object()->to_json(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped /* * Action triggerd after the ActivityPub profile has been created and sent to the client */ -\do_action( 'activitypub_json_comment_comment' ); +\do_action( 'activitypub_json_comment_post' ); diff --git a/wp-content/upgrade-temp-backup/plugins/activitypub/templates/post-json.php b/wp-content/upgrade-temp-backup/plugins/activitypub/templates/post-json.php index f90a1bca..a89a7c01 100644 --- a/wp-content/upgrade-temp-backup/plugins/activitypub/templates/post-json.php +++ b/wp-content/upgrade-temp-backup/plugins/activitypub/templates/post-json.php @@ -1,8 +1,15 @@ get_error_message() ), + 404 + ); +} -$post_object = \Activitypub\Transformer\Factory::get_transformer( $post )->to_object(); /* * Action triggerd prior to the ActivityPub profile being created and sent to the client @@ -10,7 +17,7 @@ $post_object = \Activitypub\Transformer\Factory::get_transformer( $post )->to_ob \do_action( 'activitypub_json_post_pre' ); \header( 'Content-Type: application/activity+json' ); -echo $post_object->to_json(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped +echo $transformer->to_object()->to_json(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped /* * Action triggerd after the ActivityPub profile has been created and sent to the client diff --git a/wp-content/upgrade-temp-backup/plugins/activitypub/templates/settings.php b/wp-content/upgrade-temp-backup/plugins/activitypub/templates/settings.php index 071aa1bd..a00a551f 100644 --- a/wp-content/upgrade-temp-backup/plugins/activitypub/templates/settings.php +++ b/wp-content/upgrade-temp-backup/plugins/activitypub/templates/settings.php @@ -52,7 +52,7 @@

diff --git a/wp-content/upgrade-temp-backup/plugins/activitypub/templates/welcome.php b/wp-content/upgrade-temp-backup/plugins/activitypub/templates/welcome.php index a2663286..e5e9440e 100644 --- a/wp-content/upgrade-temp-backup/plugins/activitypub/templates/welcome.php +++ b/wp-content/upgrade-temp-backup/plugins/activitypub/templates/welcome.php @@ -19,7 +19,7 @@

diff --git a/wp-content/upgrade-temp-backup/plugins/authldap/.phive/phars.xml b/wp-content/upgrade-temp-backup/plugins/authldap/.phive/phars.xml deleted file mode 100644 index 34099137..00000000 --- a/wp-content/upgrade-temp-backup/plugins/authldap/.phive/phars.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/wp-content/upgrade-temp-backup/plugins/authldap/LICENSE.md b/wp-content/upgrade-temp-backup/plugins/authldap/LICENSE.md deleted file mode 100644 index 00217dc5..00000000 --- a/wp-content/upgrade-temp-backup/plugins/authldap/LICENSE.md +++ /dev/null @@ -1,7 +0,0 @@ -Copyright - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/wp-content/upgrade-temp-backup/plugins/authldap/README.md b/wp-content/upgrade-temp-backup/plugins/authldap/README.md deleted file mode 100644 index db54d089..00000000 --- a/wp-content/upgrade-temp-backup/plugins/authldap/README.md +++ /dev/null @@ -1,95 +0,0 @@ -# authLDAP - -[![Join the chat at https://gitter.im/heiglandreas/authLdap](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/heiglandreas/authLdap?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) - -Use your existing LDAP as authentication-backend for your wordpress! - -[![Build Status](https://github.com/heiglandreas/authLdap/actions/workflows/tests.yml/badge.svg)](https://github.com/heiglandreas/authLdap/actions/workflows/tests.yml) -[![WordPress Stats](https://img.shields.io/wordpress/plugin/dt/authldap.svg)](https://wordpress.org/plugins/authldap/stats/) -[![WordPress Version](https://img.shields.io/wordpress/plugin/v/authldap.svg)](https://wordpress.org/plugins/authldap/) -[![WordPress testet](https://img.shields.io/wordpress/v/authldap.svg)](https://wordpress.org/plugins/authldap/) -[![Code Climate](https://codeclimate.com/github/heiglandreas/authLdap/badges/gpa.svg)](https://codeclimate.com/github/heiglandreas/authLdap) -[![codecov](https://codecov.io/gh/heiglandreas/authLdap/branch/master/graph/badge.svg?token=AYAhEeWtRQ)](https://codecov.io/gh/heiglandreas/authLdap) - -So what are the differences to other Wordpress-LDAP-Authentication-Plugins? - -* **Flexible**: You are totaly free in which LDAP-backend to use. Due to the extensive configuration you can -freely decide how to do the authentication of your users. It simply depends on your -filters -* **Independent**: As soon as a user logs in, it is added/updated to the Wordpress' user-database -to allow wordpress to always use the correct data. You only have to administer your users once. -* **Failsafe**: Due to the users being created in Wordpress' User-database they can -also log in when the LDAP-backend currently is gone. -* **Role-Aware**: You can map Wordpress' roles to values of an existing LDAP-attribute. - -## How does the plugin work? - -Well, as a matter of fact it is rather simple. The plugin verifies, that the user -seeking authentification can bind to the LDAP using the provided password. - -If that is so, the user is either created or updated in the wordpress-user-database. -This update includes the provided password (so the wordpress can authenticate users -even without the LDAP), the users name according to the authLDAP-preferences and -the status of the user depending on the groups-settings of the authLDAP-preferences - -Writing this plugin would not have been as easy as it has been, without the -wonderfull plugin of Alistair Young from http://www.weblogs.uhi.ac.uk/sm00ay/?p=45 - -## Configuration - -### Usage Settings - -* **Enable Authentication via LDAP** Whether you want to enable authLdap for login or not -* **debug authLdap** When you have problems with authentication via LDAP you can enable a debugging mode here. -* **Save entered Password** Decide whether passwords will be cached in your wordpress-installation. **Attention:** Without the cache your users will not be able to log into your site when your LDAP is down! - -### Server Settings - -* **LDAP Uri** This is the URI where your ldap-backend can be reached. More information are actually on the Configuration page -* **Filter** This is the real McCoy! The filter you define here specifies how a user will be found. Before applying the filter a %s will be replaced with the given username. This means, when a user logs in using ‘foobar’ as username the following happens: - - * **uid=%1$s** check for any LDAP-Entry that has an attribute ‘uid’ with value ‘foobar’ - * **(&(objectclass=posixAccount)(|(uid=%1$s)(mail=%1$s)))** check for any LDAP-Entry that has an attribute ‘objectclass’ with value ‘posixAccout’ and either a UID- or a mail-attribute with value ‘foobar’ - - This filter is rather powerfull if used wisely. - -### Creating Users - -* **Name-Attribute** Which Attribute from the LDAP contains the Full or the First name of the user trying to log in. This defaults to name -* **Second Name Attribute** If the above Name-Attribute only contains the First Name of the user you can here specify an Attribute that contains the second name. This field is empty by default -* **User-ID Attribute** This field will be used as login-name for wordpress. Please give the Attribute, that is used to identify the user. This should be the same as you used in the above Filter-Option. This field defaults to uid -* **Mail Attribute** Which Attribute holds the eMail-Address of the user? If more than one eMail-Address are stored in the LDAP, only the first given is used. This field defaults to mail -* **Web-Attribute** If your users have a personal page (URI) stored in the LDAP, it can be provided here. This field is empty by default - -### User-Groups for Roles - -* **Group-Attribute** This is the attribute that defines the Group-ID that can be matched against the Groups defined further down This field defaults to gidNumber. -* **Group-Filter** Here you can add the filter for selecting groups for the currentlly logged in user The Filter should contain the string %s which will be replaced by the login-name of the currently logged in - - -## FAQ - -
-
Can I change a users password with this plugin?
-
Short Answer: No!
Long Answer: As the users credentials are not - only used for a wordpress-site when you authenticate against an LDAP but for - many other services also chances are great that there is a centralized place - where password-changes shall be made. We'll later allow inclusion of a link - to such a place but currently it's not available. And as password-hashing and - where to store it requires deeper insight into the LDAP-Server then most users - have and admins are willing to give, password changes are out of scope of this - plugin. If you know exactyl what you do, you might want to have a look at - - issue 54 - wherer a way of adding it is described! -
-
Can I add a user to the LDAP when she creates a user-account on wordpress?
-
Short Answer: No!
Long Answer: Even though that is technically possible - it's not in the scope of this plugin. As creating a user in an LDAP often involves - an administrative process that has already been implemented in your departments - administration it doesn't make sense to rebuild that - in most cases highly - individual - process in this plugin. If you know exactly what you do, have a look at - issue 65 - where wtfiwtz shows how to implement that feature. -
-
diff --git a/wp-content/upgrade-temp-backup/plugins/authldap/SECURITY.md b/wp-content/upgrade-temp-backup/plugins/authldap/SECURITY.md deleted file mode 100644 index ef57848c..00000000 --- a/wp-content/upgrade-temp-backup/plugins/authldap/SECURITY.md +++ /dev/null @@ -1,18 +0,0 @@ -# Security-Policy - -## Supported Versions - -| Version | Supported | -| ------- |--------------------| -| 2.x | :white_check_mark: | -| 1.x | :x: | - -## Reporting a Vulnerability - -* Check our security.txt file for details on how to contact us -* Contact us before publicly disclosing the issue anywhere else - -This plugin is developed as OpenSource under the MIT licence. -There is no money earned from it. Therefore we are not able to -provide any bug-bounties whatsoever. You will be mentioned in the -release notes of a fix-release though. diff --git a/wp-content/upgrade-temp-backup/plugins/authldap/authLdap.css b/wp-content/upgrade-temp-backup/plugins/authldap/authLdap.css deleted file mode 100644 index 674dc34d..00000000 --- a/wp-content/upgrade-temp-backup/plugins/authldap/authLdap.css +++ /dev/null @@ -1,13 +0,0 @@ -.row { - overflow: hidden; - padding-top: 10px; -} - -.element { - float: right; - text-align: left; -} - -.authldap-options input[type=text] { - width: 100%; -} diff --git a/wp-content/upgrade-temp-backup/plugins/authldap/authLdap.php b/wp-content/upgrade-temp-backup/plugins/authldap/authLdap.php deleted file mode 100644 index cbe009d3..00000000 --- a/wp-content/upgrade-temp-backup/plugins/authldap/authLdap.php +++ /dev/null @@ -1,946 +0,0 @@ - -Author URI: http://andreas.heigl.org -License: MIT -License URI: https://opensource.org/licenses/MIT -*/ - -// phpcs:disable PSR1.Files.SideEffects - -use Org_Heigl\AuthLdap\LdapList; -use Org_Heigl\AuthLdap\LdapUri; -use Org_Heigl\AuthLdap\Manager\Ldap; -use Org_Heigl\AuthLdap\UserRoleHandler; -use Org_Heigl\AuthLdap\Wrapper\LdapFactory; - -require_once __DIR__ . '/src/Wrapper/LdapInterface.php'; -require_once __DIR__ . '/src/Exception/Error.php'; -require_once __DIR__ . '/src/Exception/InvalidLdapUri.php'; -require_once __DIR__ . '/src/Exception/Error.php'; -require_once __DIR__ . '/src/Exception/InvalidLdapUri.php'; -require_once __DIR__ . '/src/Exception/MissingValidLdapConnection.php'; -require_once __DIR__ . '/src/Exception/SearchUnsuccessfull.php'; -require_once __DIR__ . '/src/Manager/Ldap.php'; -require_once __DIR__ . '/src/Wrapper/Ldap.php'; -require_once __DIR__ . '/src/Wrapper/LdapFactory.php'; -require_once __DIR__ . '/src/LdapList.php'; -require_once __DIR__ . '/src/LdapUri.php'; -require_once __DIR__ . '/src/UserRoleHandler.php'; - -function authLdap_debug($message) -{ - if (authLdap_get_option('Debug')) { - error_log('[AuthLDAP] ' . $message, 0); - } -} - - -function authLdap_addmenu() -{ - if (!is_multisite()) { - add_options_page( - 'AuthLDAP', - 'AuthLDAP', - 'manage_options', - basename(__FILE__), - 'authLdap_options_panel' - ); - } else { - add_submenu_page( - 'settings.php', - 'AuthLDAP', - 'AuthLDAP', - 'manage_options', - 'authldap', - 'authLdap_options_panel' - ); - } -} - -function authLdap_get_post($name, $default = '') -{ - return isset($_POST[$name]) ? $_POST[$name] : $default; -} - -function authLdap_options_panel() -{ - // inclusde style sheet - wp_enqueue_style('authLdap-style', plugin_dir_url(__FILE__) . 'authLdap.css'); - - if (($_SERVER['REQUEST_METHOD'] == 'POST') && array_key_exists('ldapOptionsSave', $_POST)) { - if (!isset($_POST['authLdapNonce'])) { - die("Go away!"); - } - if (!wp_verify_nonce($_POST['authLdapNonce'],'authLdapNonce')) { - die("Go away!"); - } - - $new_options = [ - 'Enabled' => authLdap_get_post('authLDAPAuth', false), - 'CachePW' => authLdap_get_post('authLDAPCachePW', false), - 'URI' => authLdap_get_post('authLDAPURI'), - 'URISeparator' => authLdap_get_post('authLDAPURISeparator'), - 'StartTLS' => authLdap_get_post('authLDAPStartTLS', false), - 'Filter' => authLdap_get_post('authLDAPFilter'), - 'NameAttr' => authLdap_get_post('authLDAPNameAttr'), - 'SecName' => authLdap_get_post('authLDAPSecName'), - 'UidAttr' => authLdap_get_post('authLDAPUidAttr'), - 'MailAttr' => authLdap_get_post('authLDAPMailAttr'), - 'WebAttr' => authLdap_get_post('authLDAPWebAttr'), - 'Groups' => authLdap_get_post('authLDAPGroups', []), - 'GroupSeparator' => authLdap_get_post('authLDAPGroupSeparator', ','), - 'Debug' => authLdap_get_post('authLDAPDebug', false), - 'GroupBase' => authLdap_get_post('authLDAPGroupBase'), - 'GroupAttr' => authLdap_get_post('authLDAPGroupAttr'), - 'GroupFilter' => authLdap_get_post('authLDAPGroupFilter'), - 'DefaultRole' => authLdap_get_post('authLDAPDefaultRole'), - 'GroupEnable' => authLdap_get_post('authLDAPGroupEnable', false), - 'GroupOverUser' => authLdap_get_post('authLDAPGroupOverUser', false), - 'DoNotOverwriteNonLdapUsers' => authLdap_get_post('authLDAPDoNotOverwriteNonLdapUsers', false), - 'UserRead' => authLdap_get_post('authLDAPUseUserAccount', false), - ]; - if (authLdap_set_options($new_options)) { - echo "

Saved Options!

"; - } else { - echo "

Could not save Options!

"; - } - } - - // Do some initialization for the admin-view - $authLDAP = authLdap_get_option('Enabled'); - $authLDAPCachePW = authLdap_get_option('CachePW'); - $authLDAPURI = authLdap_get_option('URI'); - $authLDAPURISeparator = authLdap_get_option('URISeparator'); - $authLDAPStartTLS = authLdap_get_option('StartTLS'); - $authLDAPFilter = authLdap_get_option('Filter'); - $authLDAPNameAttr = authLdap_get_option('NameAttr'); - $authLDAPSecName = authLdap_get_option('SecName'); - $authLDAPMailAttr = authLdap_get_option('MailAttr'); - $authLDAPUidAttr = authLdap_get_option('UidAttr'); - $authLDAPWebAttr = authLdap_get_option('WebAttr'); - $authLDAPGroups = authLdap_get_option('Groups'); - $authLDAPGroupSeparator = authLdap_get_option('GroupSeparator'); - $authLDAPDebug = authLdap_get_option('Debug'); - $authLDAPGroupBase = authLdap_get_option('GroupBase'); - $authLDAPGroupAttr = authLdap_get_option('GroupAttr'); - $authLDAPGroupFilter = authLdap_get_option('GroupFilter'); - $authLDAPDefaultRole = authLdap_get_option('DefaultRole'); - $authLDAPGroupEnable = authLdap_get_option('GroupEnable'); - $authLDAPGroupOverUser = authLdap_get_option('GroupOverUser'); - $authLDAPDoNotOverwriteNonLdapUsers = authLdap_get_option('DoNotOverwriteNonLdapUsers'); - $authLDAPUseUserAccount = authLdap_get_option('UserRead'); - - $tChecked = ($authLDAP) ? ' checked="checked"' : ''; - $tDebugChecked = ($authLDAPDebug) ? ' checked="checked"' : ''; - $tPWChecked = ($authLDAPCachePW) ? ' checked="checked"' : ''; - $tGroupChecked = ($authLDAPGroupEnable) ? ' checked="checked"' : ''; - $tGroupOverUserChecked = ($authLDAPGroupOverUser) ? ' checked="checked"' : ''; - $tStartTLSChecked = ($authLDAPStartTLS) ? ' checked="checked"' : ''; - $tDoNotOverwriteNonLdapUsers = ($authLDAPDoNotOverwriteNonLdapUsers) ? ' checked="checked"' : ''; - $tUserRead = ($authLDAPUseUserAccount) ? ' checked="checked"' : ''; - - $roles = new WP_Roles(); - - $action = $_SERVER['REQUEST_URI']; - if (!extension_loaded('ldap')) { - echo '
The LDAP-Extension is not available on your ' - . 'WebServer. Therefore Everything you can alter here does not ' - . 'make any sense!
'; - } - - include dirname(__FILE__) . '/view/admin.phtml'; -} - -/** - * get a LDAP server object - * - * throws exception if there is a problem connecting - * - * @conf boolean authLDAPDebug true, if debugging should be turned on - * @conf string authLDAPURI LDAP server URI - * - * @return Org_Heigl\AuthLdap\LdapList LDAP server object - */ -function authLdap_get_server() -{ - static $_ldapserver = null; - if (is_null($_ldapserver)) { - $authLDAPDebug = authLdap_get_option('Debug'); - $authLDAPURI = explode( - authLdap_get_option('URISeparator', ' '), - authLdap_get_option('URI') - ); - $authLDAPStartTLS = authLdap_get_option('StartTLS'); - - //$authLDAPURI = 'ldap:/foo:bar@server/trallala'; - authLdap_debug('connect to LDAP server'); - require_once dirname(__FILE__) . '/src/LdapList.php'; - $_ldapserver = new LdapList(); - foreach ($authLDAPURI as $uri) { - $_ldapserver->addLdap(new Ldap( - new LdapFactory(), - LdapUri::fromString($uri), - $authLDAPStartTLS - )); - } - } - return $_ldapserver; -} - - -/** - * This method authenticates a user using either the LDAP or, if LDAP is not - * available, the local database - * - * For this we store the hashed passwords in the WP_Database to ensure working - * conditions even without an LDAP-Connection - * - * @param null|WP_User|WP_Error - * @param string $username - * @param string $password - * @param boolean $already_md5 - * @return boolean true, if login was successfull or false, if it wasn't - * @conf boolean authLDAP true, if authLDAP should be used, false if not. Defaults to false - * @conf string authLDAPFilter LDAP filter to use to find correct user, defaults to '(uid=%s)' - * @conf string authLDAPNameAttr LDAP attribute containing user (display) name, defaults to 'name' - * @conf string authLDAPSecName LDAP attribute containing second name, defaults to '' - * @conf string authLDAPMailAttr LDAP attribute containing user e-mail, defaults to 'mail' - * @conf string authLDAPUidAttr LDAP attribute containing user id (the username we log on with), defaults to 'uid' - * @conf string authLDAPWebAttr LDAP attribute containing user website, defaults to '' - * @conf string authLDAPDefaultRole default role for authenticated user, defaults to '' - * @conf boolean authLDAPGroupEnable true, if we try to map LDAP groups to Wordpress roles - * @conf boolean authLDAPGroupOverUser true, if LDAP Groups have precedence over existing user roles - */ -function authLdap_login($user, $username, $password, $already_md5 = false) -{ - // don't do anything when authLDAP is disabled - if (!authLdap_get_option('Enabled')) { - authLdap_debug( - 'LDAP disabled in AuthLDAP plugin options (use the first option in the AuthLDAP options to enable it)' - ); - return $user; - } - - // If the user has already been authenticated (only in that case we get a - // WP_User-Object as $user) we skip LDAP-authentication and simply return - // the existing user-object - if ($user instanceof WP_User) { - authLdap_debug(sprintf( - 'User %s has already been authenticated - skipping LDAP-Authentication', - $user->get('nickname') - )); - return $user; - } - - authLdap_debug("User '$username' logging in"); - - if ($username == 'admin') { - authLdap_debug('Doing nothing for possible local user admin'); - return $user; - } - - global $wpdb, $error; - try { - $authLDAP = authLdap_get_option('Enabled'); - $authLDAPFilter = authLdap_get_option('Filter'); - $authLDAPNameAttr = authLdap_get_option('NameAttr'); - $authLDAPSecName = authLdap_get_option('SecName'); - $authLDAPMailAttr = authLdap_get_option('MailAttr'); - $authLDAPUidAttr = authLdap_get_option('UidAttr'); - $authLDAPWebAttr = authLdap_get_option('WebAttr'); - $authLDAPDefaultRole = authLdap_get_option('DefaultRole'); - $authLDAPGroupEnable = authLdap_get_option('GroupEnable'); - $authLDAPGroupOverUser = authLdap_get_option('GroupOverUser'); - $authLDAPUseUserAccount = authLdap_get_option('UserRead'); - - if (!$username) { - authLdap_debug('Username not supplied: return false'); - return false; - } - - if (!$password) { - authLdap_debug('Password not supplied: return false'); - $error = __('Error: The password field is empty.'); - return false; - } - // First check for valid values and set appropriate defaults - if (!$authLDAPFilter) { - $authLDAPFilter = '(uid=%s)'; - } - if (!$authLDAPNameAttr) { - $authLDAPNameAttr = 'name'; - } - if (!$authLDAPMailAttr) { - $authLDAPMailAttr = 'mail'; - } - if (!$authLDAPUidAttr) { - $authLDAPUidAttr = 'uid'; - } - - // If already_md5 is TRUE, then we're getting the user/password from the cookie. As we don't want - // to store LDAP passwords in any - // form, we've already replaced the password with the hashed username and LDAP_COOKIE_MARKER - if ($already_md5) { - if ($password == md5($username) . md5($ldapCookieMarker)) { - authLdap_debug('cookie authentication'); - return true; - } - } - - // Remove slashes as noted on https://github.com/heiglandreas/authLdap/issues/108 - $password = stripslashes_deep($password); - - // No cookie, so have to authenticate them via LDAP - $result = false; - try { - authLdap_debug('about to do LDAP authentication'); - $result = authLdap_get_server()->Authenticate($username, $password, $authLDAPFilter); - } catch (Exception $e) { - authLdap_debug('LDAP authentication failed with exception: ' . $e->getMessage()); - return false; - } - - // Make optional querying from the admin account #213 - if (!authLdap_get_option('UserRead')) { - // Rebind with the default credentials after the user has been loged in - // Otherwise the credentials of the user trying to login will be used - // This fixes #55 - authLdap_get_server()->bind(); - } - - if (true !== $result) { - authLdap_debug('LDAP authentication failed'); - // TODO what to return? WP_User object, true, false, even an WP_Error object... - // all seem to fall back to normal wp user authentication - return; - } - - authLdap_debug('LDAP authentication successful'); - $attributes = array_values( - array_filter( - apply_filters( - 'authLdap_filter_attributes', - [ - $authLDAPNameAttr, - $authLDAPSecName, - $authLDAPMailAttr, - $authLDAPWebAttr, - $authLDAPUidAttr, - ] - ) - ) - ); - - try { - $attribs = authLdap_get_server()->search( - sprintf($authLDAPFilter, $username), - $attributes - ); - // First get all the relevant group informations so we can see if - // whether have been changes in group association of the user - if (!isset($attribs[0]['dn'])) { - authLdap_debug('could not get user attributes from LDAP'); - throw new UnexpectedValueException('dn has not been returned'); - } - if (!isset($attribs[0][strtolower($authLDAPUidAttr)][0])) { - authLdap_debug('could not get user attributes from LDAP'); - throw new UnexpectedValueException('The user-ID attribute has not been returned'); - } - - $dn = $attribs[0]['dn']; - $realuid = $attribs[0][strtolower($authLDAPUidAttr)][0]; - } catch (Exception $e) { - authLdap_debug('Exception getting LDAP user: ' . $e->getMessage()); - return false; - } - - $uid = authLdap_get_uid($realuid); - - // This fixes #172 - if (true == authLdap_get_option('DoNotOverwriteNonLdapUsers', false)) { - if (!get_user_meta($uid, 'authLDAP')) { - return null; - } - } - - $roles = []; - - // we only need this if either LDAP groups are disabled or - // if the WordPress role of the user overrides LDAP groups - if (!$authLDAPGroupEnable || $authLDAPGroupOverUser) { - $userRoles = authLdap_user_role($uid); - if ($userRoles !== []) { - $roles = array_merge($roles, $userRoles); - } - // TODO, this needs to be revised, it seems, like authldap is taking only the first role - // even if in WP there are assigned multiple. - } - - // do LDAP group mapping if needed - // (if LDAP groups override worpress user role, $role is still empty) - if (empty($roles) && $authLDAPGroupEnable) { - $mappedRoles = authLdap_groupmap($realuid, $dn); - if ($mappedRoles !== []) { - $roles = $mappedRoles; - authLdap_debug('role from group mapping: ' . json_encode($roles)); - } - } - - // if we don't have a role yet, use default role - if (empty($roles) && !empty($authLDAPDefaultRole)) { - authLdap_debug('no role yet, set default role'); - $roles[] = $authLDAPDefaultRole; - } - - if (empty($roles)) { - // Sorry, but you are not in any group that is allowed access - trigger_error('no group found'); - authLdap_debug('user is not in any group that is allowed access'); - return false; - } else { - $wp_roles = new WP_Roles(); - // not sure if this is needed, but it can't hurt - - // Get rid of unexisting roles. - foreach ($roles as $k => $v) { - if (!$wp_roles->is_role($v)) { - unset($k); - } - } - - // check if single role or an empty array provided - if (empty($roles)) { - trigger_error('no group found'); - authLdap_debug('role is invalid'); - return false; - } - } - - // from here on, the user has access! - // now, lets update some user details - $user_info = []; - $user_info['user_login'] = $realuid; - $user_info['user_email'] = ''; - $user_info['user_nicename'] = ''; - - // first name - if (isset($attribs[0][strtolower((string) $authLDAPNameAttr)][0])) { - $user_info['first_name'] = $attribs[0][strtolower((string) $authLDAPNameAttr)][0]; - } - - // last name - if (isset($attribs[0][strtolower((string) $authLDAPSecName)][0])) { - $user_info['last_name'] = $attribs[0][strtolower((string) $authLDAPSecName)][0]; - } - - // mail address - if (isset($attribs[0][strtolower((string) $authLDAPMailAttr)][0])) { - $user_info['user_email'] = $attribs[0][strtolower((string) $authLDAPMailAttr)][0]; - } - - // website - if (isset($attribs[0][strtolower((string) $authLDAPWebAttr)][0])) { - $user_info['user_url'] = $attribs[0][strtolower((string) $authLDAPWebAttr)][0]; - } - // display name, nickname, nicename - if (array_key_exists('first_name', $user_info)) { - $user_info['display_name'] = $user_info['first_name']; - $user_info['nickname'] = $user_info['first_name']; - $user_info['user_nicename'] = sanitize_title_with_dashes($user_info['first_name']); - if (array_key_exists('last_name', $user_info)) { - $user_info['display_name'] .= ' ' . $user_info['last_name']; - $user_info['nickname'] .= ' ' . $user_info['last_name']; - $user_info['user_nicename'] .= '_' . sanitize_title_with_dashes($user_info['last_name']); - } - } - $user_info['user_nicename'] = substr($user_info['user_nicename'], 0, 50); - - // optionally store the password into the wordpress database - if (authLdap_get_option('CachePW')) { - // Password will be hashed inside wp_update_user or wp_insert_user - $user_info['user_pass'] = $password; - } else { - // clear the password - $user_info['user_pass'] = ''; - } - - // add uid if user exists - if ($uid) { - // found user in the database - authLdap_debug('The LDAP user has an entry in the WP-Database'); - $user_info['ID'] = $uid; - unset($user_info['display_name'], $user_info['nickname']); - $userid = wp_update_user($user_info); - } else { - // new wordpress account will be created - authLdap_debug('The LDAP user does not have an entry in the WP-Database, a new WP account will be created'); - - $userid = wp_insert_user($user_info); - } - - // if the user exists, wp_insert_user will update the existing user record - if (is_wp_error($userid)) { - authLdap_debug('Error creating user : ' . $userid->get_error_message()); - trigger_error('Error creating user: ' . $userid->get_error_message()); - return $userid; - } - - // Update user roles. - $user = new \WP_User($userid); - - /** - * Add hook for custom User-Role assignment - * - * @param WP_User $user This user-object will be returned. Can be modified as necessary in the actions. - * @param array $roles - */ - do_action('authldap_user_roles', $user, $roles); - - /** - * Add hook for custom updates - * - * @param int $userid User ID. - * @param array $attribs [0] Attributes retrieved from LDAP for the user. - */ - do_action('authLdap_login_successful', $userid, $attribs[0]); - - authLdap_debug('user id = ' . $userid); - - // flag the user as an ldap user so we can hide the password fields in the user profile - update_user_meta($userid, 'authLDAP', true); - - // return a user object upon positive authorization - return $user; - } catch (Exception $e) { - authLdap_debug($e->getMessage() . '. Exception thrown in line ' . $e->getLine()); - trigger_error($e->getMessage() . '. Exception thrown in line ' . $e->getLine()); - } -} - -/** - * Get user's user id - * - * Returns null if username not found - * - * @param string $username username - * @param string user id, null if not found - */ -function authLdap_get_uid($username) -{ - global $wpdb; - - // find out whether the user is already present in the database - $uid = $wpdb->get_var( - $wpdb->prepare( - "SELECT ID FROM {$wpdb->users} WHERE user_login = %s", - $username - ) - ); - if ($uid) { - authLdap_debug("Existing user, uid = {$uid}"); - return $uid; - } else { - return null; - } -} - -/** - * Get the user's current role - * - * Returns empty string if not found. - * - * @param int $uid wordpress user id - * @return array roles, empty if none found - */ -function authLdap_user_role($uid) -{ - global $wpdb, $wp_roles; - - if (!$uid) { - return []; - } - - /** @var array $usercapabilities */ - $usercapabilities = get_user_meta($uid, "{$wpdb->prefix}capabilities", true); - if (!is_array($usercapabilities)) { - return []; - } - - /** @var array} $editable_roles */ - $editable_roles = $wp_roles->roles; - - // By using this approach we are now using the order of the roles from the WP_Roles object - // and not from the capabilities any more. - $userroles = array_keys(array_intersect_key($editable_roles, $usercapabilities)); - - authLdap_debug(sprintf("Existing user's roles: %s", implode(', ', $userroles))); - - return $userroles; -} - -/** - * Get LDAP groups for user and map to role - * - * @param string $username - * @param string $dn - * @return array role, empty array if no mapping found, first or all role(s) found otherwise - * @conf array authLDAPGroups, associative array, role => ldap_group - * @conf string authLDAPGroupBase, base dn to look up groups - * @conf string authLDAPGroupAttr, ldap attribute that holds name of group - * @conf string authLDAPGroupFilter, LDAP filter to find groups. can contain %s and %dn% placeholders - */ -function authLdap_groupmap($username, $dn) -{ - $authLDAPGroups = authLdap_sort_roles_by_capabilities( - authLdap_get_option('Groups') - ); - $authLDAPGroupBase = authLdap_get_option('GroupBase'); - $authLDAPGroupAttr = authLdap_get_option('GroupAttr'); - $authLDAPGroupFilter = authLdap_get_option('GroupFilter'); - $authLDAPGroupSeparator = authLdap_get_option('GroupSeparator'); - if (!$authLDAPGroupAttr) { - $authLDAPGroupAttr = 'gidNumber'; - } - if (!$authLDAPGroupFilter) { - $authLDAPGroupFilter = '(&(objectClass=posixGroup)(memberUid=%s))'; - } - if (!$authLDAPGroupSeparator) { - $authLDAPGroupSeparator = ','; - } - - if (!is_array($authLDAPGroups) || count(array_filter(array_values($authLDAPGroups))) == 0) { - authLdap_debug('No group names defined'); - return []; - } - - try { - // To allow searches based on the DN instead of the uid, we replace the - // string %dn% with the users DN. - $authLDAPGroupFilter = str_replace( - '%dn%', - ldap_escape($dn, '', LDAP_ESCAPE_FILTER), - $authLDAPGroupFilter - ); - authLdap_debug('Group Filter: ' . json_encode($authLDAPGroupFilter)); - authLdap_debug('Group Base: ' . $authLDAPGroupBase); - $groups = authLdap_get_server()->search( - sprintf($authLDAPGroupFilter, ldap_escape($username, '', LDAP_ESCAPE_FILTER)), - [$authLDAPGroupAttr], - $authLDAPGroupBase - ); - } catch (Exception $e) { - authLdap_debug('Exception getting LDAP group attributes: ' . $e->getMessage()); - return []; - } - - $grp = []; - for ($i = 0; $i < $groups ['count']; $i++) { - if ($authLDAPGroupAttr == "dn") { - $grp[] = $groups[$i]['dn']; - } else { - for ($k = 0; $k < $groups[$i][strtolower($authLDAPGroupAttr)]['count']; $k++) { - $grp[] = $groups[$i][strtolower($authLDAPGroupAttr)][$k]; - } - } - } - - authLdap_debug('LDAP groups: ' . json_encode($grp)); - - // Check whether the user is member of one of the groups that are - // allowed acces to the blog. If the user is not member of one of - // The groups throw her out! ;-) - $roles = []; - foreach ($authLDAPGroups as $key => $val) { - $currentGroup = explode($authLDAPGroupSeparator, $val); - // Remove whitespaces around the group-ID - $currentGroup = array_map('trim', $currentGroup); - if (0 < count(array_intersect($currentGroup, $grp))) { - $roles[] = $key; - } - } - - // Default: If the user is member of more than one group only the first one - // will be taken into account! - // This filter allows you to return multiple user roles. WordPress - // supports this functionality, but not natively via UI from Users - // overview (you need to use a plugin). However, it's still widely used, - // for example, by WooCommerce, etc. Use if you know what you're doing. - if (apply_filters('authLdap_allow_multiple_roles', false) === false && count($roles) > 1) { - $roles = array_slice($roles, 0, 1); - } - - authLdap_debug("Roles from LDAP group: " . json_encode($roles)); - return $roles; -} - -/** - * This function disables the password-change fields in the users preferences. - * - * It does not make sense to authenticate via LDAP and then allow the user to - * change the password only in the wordpress database. And changing the password - * LDAP-wide can not be the scope of Wordpress! - * - * Whether the user is an LDAP-User or not is determined using the authLDAP-Flag - * of the users meta-informations - * - * @return false, if the user whose prefs are viewed is an LDAP-User, true if - * he isn't - * @conf boolean authLDAP - */ -function authLdap_show_password_fields($return, $user) -{ - if (!$user) { - return true; - } - - if (get_user_meta($user->ID, 'authLDAP')) { - return false; - } - - return $return; -} - -/** - * This function disables the password reset for a user. - * - * It does not make sense to authenticate via LDAP and then allow the user to - * reset the password only in the wordpress database. And changing the password - * LDAP-wide can not be the scope of Wordpress! - * - * Whether the user is an LDAP-User or not is determined using the authLDAP-Flag - * of the users meta-informations - * - * @author chaplina (https://github.com/chaplina) - * @conf boolean authLDAP - * @return false, if the user is an LDAP-User, true if he isn't - */ -function authLdap_allow_password_reset($return, $userid) -{ - if (!(isset($userid))) { - return true; - } - - if (get_user_meta($userid, 'authLDAP')) { - return false; - } - return $return; -} - -/** - * Sort the given roles by number of capabilities - * - * @param array $roles - * - * @return array - */ -function authLdap_sort_roles_by_capabilities($roles) -{ - global $wpdb; - $myRoles = get_option($wpdb->get_blog_prefix() . 'user_roles'); - - authLdap_debug(print_r($roles, true)); - uasort($myRoles, 'authLdap_sortByCapabilitycount'); - - $return = []; - - foreach ($myRoles as $key => $role) { - if (isset($roles[$key])) { - $return[$key] = $roles[$key]; - } - } - - authLdap_debug(print_r($return, true)); - return $return; -} - -/** - * Sort according to the number of capabilities - * - * @param $a - * @param $b - */ -function authLdap_sortByCapabilitycount($a, $b) -{ - if (count($a['capabilities']) > count($b['capabilities'])) { - return -1; - } - if (count($a['capabilities']) < count($b['capabilities'])) { - return 1; - } - - return 0; -} - -/** - * Load AuthLDAP Options - * - * Sets and stores defaults if options are not up to date - */ -function authLdap_load_options($reload = false) -{ - static $options = null; - - // the current version for options - $option_version_plugin = 1; - - $optionFunction = 'get_option'; - if (is_multisite()) { - $optionFunction = 'get_site_option'; - } - if (is_null($options) || $reload) { - $options = $optionFunction('authLDAPOptions', []); - } - - // check if option version has changed (or if it's there at all) - if (!isset($options['Version']) || ($options['Version'] != $option_version_plugin)) { - // defaults for all options - $options_default = [ - 'Enabled' => false, - 'CachePW' => false, - 'URI' => '', - 'URISeparator' => ' ', - 'Filter' => '', // '(uid=%s)' - 'NameAttr' => '', // 'name' - 'SecName' => '', - 'UidAttr' => '', // 'uid' - 'MailAttr' => '', // 'mail' - 'WebAttr' => '', - 'Groups' => [], - 'Debug' => false, - 'GroupAttr' => '', // 'gidNumber' - 'GroupFilter' => '', // '(&(objectClass=posixGroup)(memberUid=%s))' - 'DefaultRole' => '', - 'GroupEnable' => true, - 'GroupOverUser' => true, - 'Version' => $option_version_plugin, - 'DoNotOverwriteNonLdapUsers' => false, - ]; - - // check if we got a version - if (!isset($options['Version'])) { - // we just changed to the new option format - // read old options, then delete them - $old_option_new_option = [ - 'authLDAP' => 'Enabled', - 'authLDAPCachePW' => 'CachePW', - 'authLDAPURI' => 'URI', - 'authLDAPFilter' => 'Filter', - 'authLDAPNameAttr' => 'NameAttr', - 'authLDAPSecName' => 'SecName', - 'authLDAPUidAttr' => 'UidAttr', - 'authLDAPMailAttr' => 'MailAttr', - 'authLDAPWebAttr' => 'WebAttr', - 'authLDAPGroups' => 'Groups', - 'authLDAPDebug' => 'Debug', - 'authLDAPGroupAttr' => 'GroupAttr', - 'authLDAPGroupFilter' => 'GroupFilter', - 'authLDAPDefaultRole' => 'DefaultRole', - 'authLDAPGroupEnable' => 'GroupEnable', - 'authLDAPGroupOverUser' => 'GroupOverUser', - ]; - foreach ($old_option_new_option as $old_option => $new_option) { - $value = get_option($old_option, null); - if (!is_null($value)) { - $options[$new_option] = $value; - } - delete_option($old_option); - } - delete_option('authLDAPCookieMarker'); - delete_option('authLDAPCookierMarker'); - } - - // set default for all options that are missing - foreach ($options_default as $key => $default) { - if (!isset($options[$key])) { - $options[$key] = $default; - } - } - - // set new version and save - $options['Version'] = $option_version_plugin; - update_option('authLDAPOptions', $options); - } - return $options; -} - -/** - * Get an individual option - */ -function authLdap_get_option($optionname, $default = null) -{ - $options = authLdap_load_options(); - if (isset($options[$optionname]) && $options[$optionname]) { - return $options[$optionname]; - } - - if (null !== $default) { - return $default; - } - - //authLdap_debug('option name invalid: ' . $optionname); - return null; -} - -/** - * Set new options - */ -function authLdap_set_options($new_options = []) -{ - // initialize the options with what we currently have - $options = authLdap_load_options(); - - // set the new options supplied - foreach ($new_options as $key => $value) { - $options[$key] = $value; - } - - // store options - $optionFunction = 'update_option'; - if (is_multisite()) { - $optionFunction = 'update_site_option'; - } - if ($optionFunction('authLDAPOptions', $options)) { - // reload the option cache - authLdap_load_options(true); - - return true; - } - - // could not set options - return false; -} - -/** - * Do not send an email after changing the password or the email of the user! - * - * @param boolean $result The initial resturn value - * @param array $user The old userdata - * @param array $newUserData The changed userdata - * - * @return bool - */ -function authLdap_send_change_email($result, $user, $newUserData) -{ - if (get_user_meta($user['ID'], 'authLDAP')) { - return false; - } - - return $result; -} - -$hook = is_multisite() ? 'network_' : ''; -add_action($hook . 'admin_menu', 'authLdap_addmenu'); -add_filter('show_password_fields', 'authLdap_show_password_fields', 10, 2); -add_filter('allow_password_reset', 'authLdap_allow_password_reset', 10, 2); -add_filter('authenticate', 'authLdap_login', 10, 3); -/** This only works from WP 4.3.0 on */ -add_filter('send_password_change_email', 'authLdap_send_change_email', 10, 3); -add_filter('send_email_change_email', 'authLdap_send_change_email', 10, 3); -$handler = new UserRoleHandler(); -add_action('authldap_user_roles', [$handler, 'addRolesToUser'], 10, 2); diff --git a/wp-content/upgrade-temp-backup/plugins/authldap/behat.yml.dist b/wp-content/upgrade-temp-backup/plugins/authldap/behat.yml.dist deleted file mode 100644 index 0f63330a..00000000 --- a/wp-content/upgrade-temp-backup/plugins/authldap/behat.yml.dist +++ /dev/null @@ -1 +0,0 @@ -default: diff --git a/wp-content/upgrade-temp-backup/plugins/authldap/features/bootstrap/FeatureContext.php b/wp-content/upgrade-temp-backup/plugins/authldap/features/bootstrap/FeatureContext.php deleted file mode 100644 index 1e495b2c..00000000 --- a/wp-content/upgrade-temp-backup/plugins/authldap/features/bootstrap/FeatureContext.php +++ /dev/null @@ -1,289 +0,0 @@ -set(Options::URI, 'ldap://cn=admin,dc=example,dc=org:insecure@openldap:389/dc=example,dc=org'); - $options->set(Options::ENABLED, true); - $options->set(Options::FILTER, 'uid=%1$s'); - $options->set(Options::DEFAULT_ROLE, 'subscriber'); - $options->set(Options::DEBUG, true); - $options->set(Options::NAME_ATTR, 'cn'); - - exec(sprintf( - 'wp --allow-root option update --format=json authLDAPOptions \'%1$s\'', - json_encode($options->toArray()) - )); - } - - /** - * @Given configuration value :arg1 is set to :arg2 - */ - public function configurationValueIsSetTo($arg1, $arg2) - { - exec(sprintf( - 'wp --allow-root option patch update authLDAPOptions %1$s %2$s --format=json', - $arg1, - "'" . json_encode($arg2) . "'" - )); - } - - /** - * @Given an LDAP user :arg1 with name :arg2, password :arg3 and email :arg4 exists - */ - public function anLdapUserWithNamePasswordAndEmailExists($arg1, $arg2, $arg3, $arg4) - { - exec(sprintf( - 'ldapadd -x -H %1$s -D "%2$s" -w %3$s <res = $client->post('http://wp/wp-login.php', [ - 'cookies' => CookieJar::fromArray([ - 'wordpress_test_cookie' => 'test', - 'XDEBUG_SESSION' => 'PHPSTORM', - ], 'http://wp'), - 'form_params' => [ - 'log' => $arg1, - 'pwd' => $arg2, - ], - 'allow_redirects' => false - ]); - } - - /** - * @Then the login suceeds - */ - public function theLoginSuceeds() - { - Assert::isInstanceOf($this->res, Response::class); - Assert::eq( $this->res->getStatusCode(), 302); - Assert::startsWith($this->res->getHeader('Location')[0], 'http://localhost/wp-admin'); - } - - /** - * @Then a new WordPress user :arg1 was created with name :arg2 and email :arg3 - */ - public function aNewWordpressUserWasCreatedWithNameAndEmail($arg1, $arg2, $arg3) - { - exec(sprintf( - 'wp --allow-root user get %1$s --format=json 2> /dev/null', - $arg1, - ), $output, $result); - Assert::eq(0, $result); - $user = json_decode($output[0], true); - Assert::eq($user['user_email'], $arg3); - Assert::eq($user['display_name'], $arg2); - Assert::greaterThan( - new DateTimeImmutable($user['user_registered']), - (new DateTimeImmutable())->sub(new DateInterval('PT1M')), - ); - } - - /** - * @Then the WordPress user :arg1 is member of role :arg2 - */ - public function theWordpressUserIsMemberOfRole($arg1, $arg2) - { - exec(sprintf( - 'wp --allow-root user get %1$s --format=json 2> /dev/null', - $arg1, - ), $output, $result); - Assert::eq(0, $result); - $user = json_decode($output[0], true); - $roles = array_map(function($item): string { - return trim($item); - }, explode(',', $user['roles'])); - Assert::inArray($arg2, $roles); - } - - /** - * @Given LDAP user :arg1 is member of LDAP group :arg2 - */ - public function ldapUserIsMemberOfLdapGroup($arg1, $arg2) - { - exec(sprintf( - 'ldapmodify -x -H %1$s -D "%2$s" -w %3$s 2>&1 < /dev/null', - $arg1, - ), $output, $result); - Assert::eq(0, $result); - $user = json_decode($output[0], true); - $roles = array_map(function($item): string { - return trim($item); - }, explode(',', $user['roles'])); - Assert::false(in_array($arg2, $roles)); - - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/authldap/features/log in using no groups at all.feature b/wp-content/upgrade-temp-backup/plugins/authldap/features/log in using no groups at all.feature deleted file mode 100644 index b8515c84..00000000 --- a/wp-content/upgrade-temp-backup/plugins/authldap/features/log in using no groups at all.feature +++ /dev/null @@ -1,63 +0,0 @@ -Feature: Log in without group assignment - Scenario: Login without group assignment with - Given a default configuration - And configuration value "GroupEnable" is set to "false" - And configuration value "DefaultRole" is set to "subscriber" - And an LDAP user "ldapuser" with name "LDAP User", password "P@ssw0rd" and email "ldapuser@example.com" exists - And an LDAP group "ldapgroup" exists - And LDAP user "ldapuser" is member of LDAP group "ldapgroup" - And a WordPress user "wordpressuser" with name "WordPress_User" and email "wordpressuser@example.com" exists - And a WordPress role "wordpressrole" exists - And WordPress user "wordpressuser" has role "wordpressrole" - And a WordPress user "ldapuser" does not exist - When LDAP user "ldapuser" logs in with password "P@ssw0rd" - Then the login suceeds - And a new WordPress user "ldapuser" was created with name "LDAP User" and email "ldapuser@example.com" - And the WordPress user "ldapuser" is member of role "subscriber" - - Scenario: Login with group assignment to multiple groups where only first wordpress group is used - Given a default configuration - And configuration value "GroupEnable" is set to "true" - And configuration value "DefaultRole" is set to "subscriber" - And configuration value "Groups" is set to "administrator=ldapgroup" and "editor=ldapgroup" - And configuration value "GroupAttr" is set to "cn" - And configuration value "GroupFilter" is set to "uniquemember=%dn%" - And configuration value "GroupOverUser" is set to "true" - And an LDAP user "ldapuser" with name "LDAP User", password "P@ssw0rd" and email "ldapuser@example.com" exists - And an LDAP group "ldapgroup" exists - And LDAP user "ldapuser" is member of LDAP group "ldapgroup" - And a WordPress user "wordpressuser" with name "WordPress_User" and email "wordpressuser@example.com" exists - And a WordPress role "wordpressrole" exists - And WordPress user "wordpressuser" has role "wordpressrole" - And a WordPress user "ldapuser" does not exist - When LDAP user "ldapuser" logs in with password "P@ssw0rd" - Then the login suceeds - And a new WordPress user "ldapuser" was created with name "LDAP User" and email "ldapuser@example.com" - And the WordPress user "ldapuser" is member of role "administrator" - And the WordPress user "ldapuser" is not member of role "editor" - And the WordPress user "ldapuser" is not member of role "subscriber" - - Scenario: Second Login with group assignment to multiple groups where only first wordpress group is used. - Given a default configuration - And configuration value "GroupEnable" is set to "true" - And configuration value "DefaultRole" is set to "subscriber" - And configuration value "Groups" is set to "administrator=ldapgroup" and "editor=ldapgroup" - And configuration value "GroupAttr" is set to "cn" - And configuration value "GroupFilter" is set to "uniquemember=%dn%" - And configuration value "GroupOverUser" is set to "false" - And an LDAP user "ldapuser" with name "LDAP User", password "P@ssw0rd" and email "ldapuser@example.com" exists - And an LDAP group "ldapgroup" exists - And LDAP user "ldapuser" is member of LDAP group "ldapgroup" - And a WordPress user "wordpressuser" with name "WordPress_User" and email "wordpressuser@example.com" exists - And a WordPress role "wordpressrole" exists - And WordPress user "wordpressuser" has role "wordpressrole" - And a WordPress user "ldapuser" does not exist - And LDAP user "ldapuser" logs in with password "P@ssw0rd" - And WordPress user "ldapuser" has role "wordpressrole" - And the WordPress user "ldapuser" is member of role "wordpressrole" - When LDAP user "ldapuser" logs in with password "P@ssw0rd" - Then the login suceeds - And the WordPress user "ldapuser" is member of role "administrator" - And the WordPress user "ldapuser" is member of role "wordpressrole" - And the WordPress user "ldapuser" is not member of role "editor" - And the WordPress user "ldapuser" is not member of role "subscriber" diff --git a/wp-content/upgrade-temp-backup/plugins/authldap/phpcs.xml b/wp-content/upgrade-temp-backup/plugins/authldap/phpcs.xml deleted file mode 100644 index e7a652c4..00000000 --- a/wp-content/upgrade-temp-backup/plugins/authldap/phpcs.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - authLdap codestyle - ./src - ./authLdap.php - ./tests - - - - - ./vendor/autoload.php - - - - - - - - - - - diff --git a/wp-content/upgrade-temp-backup/plugins/authldap/readme.txt b/wp-content/upgrade-temp-backup/plugins/authldap/readme.txt deleted file mode 100644 index 00476fe6..00000000 --- a/wp-content/upgrade-temp-backup/plugins/authldap/readme.txt +++ /dev/null @@ -1,166 +0,0 @@ -=== authLdap === -Contributors: heiglandreas -Tags: ldap, auth, authentication, active directory, AD, openLDAP, Open Directory -Requires at least: 2.5.0 -Tested up to: 6.4.0 -Requires PHP: 7.4 -Stable tag: trunk -License: MIT -License URI: https://opensource.org/licenses/MIT - -Use your existing LDAP flexible as authentication backend for WordPress - -== Description == - -Use your existing LDAP as authentication-backend for your wordpress! - -So what are the differences to other Wordpress-LDAP-Authentication-Plugins? - -* Flexible: You are totaly free in which LDAP-backend to use. Due to the extensive configuration you can freely decide how to do the authentication of your users. It simply depends on your filters -* Independent: As soon as a user logs in, it is added/updated to the Wordpress' user-database to allow wordpress to always use the correct data. You only have to administer your users once. -* Failsafe: Due to the users being created in Wordpress' User-database they can also log in when the LDAP-backend currently is gone. -* Role-Aware: You can map Wordpress' roles to values of an existing LDAP-attribute. - -For more Information on the configuration have a look at https://github.com/heiglandreas/authLdap - -== Installation == - -1. Upload the extracted folder `authLdap` to the `/wp-content/plugins/` directory -2. Activate the plugin through the 'Plugins' menu in WordPress -3. Configure the Plugin via the 'authLdap'-Configuration-Page. - -== Frequently Asked Questions == - -= Where can I find more Informations about the plugin? = - -Go to https://github.com/heiglandreas/authLdap - -= Where can I report issues with the plugin? = - -Please use the issuetracker at https://github.com/heiglandreas/authLdap/issues - -= Where can I report sensitive security issues with the plugin? = - -In essence: Report a security vulnerability at https://github.com/heiglandreas/authLdap/security/advisories/new - -Please see https://github.com/heiglandreas/authLdap/blob/master/SECURITY.md for more details - -== Changelog == - -= 2.6.0 = - -* Fix reducing assigned WordPress roles to single role on login when WordPress roles shall be kept -* Add Behavioural testing and first 3 scenarios - -= 2.5.9 = - -* Adds information about security-contacts -* Addresses CVE-2023-41655 - -= 2.5.8 = - -* Fix regression from 2.5.7 - -= 2.5.7 = - -* Fix regressions from 2.5.4 -* Fix CI system - -= 2.5.4 = -* Update Tested up to - -= 2.5.3 = -* Fix issue with broken role-assignement in combination with WooCommerce -* Fix spelling issue -* Allow DN as role-definition - -= 2.5.0 = -* Ignore the order of capabilities to tell the role. In addition the filter `editable_roles` can be used to limit the roles - -= 2.4.11 = -* Fix issue with running on PHP8.1 - -= 2.4.9 = -* Improve group-assignement UI - -= 2.4.8 = -* Make textfields in settings-page wider - -= 2.4.7 = -* Replace deprecated function -* Fix undefined index -* Add filter for retrieving other params at login (authLdap_filter_attributes) -* Add do_action after successfull login (authLdap_login_successful) - -= 2.4.0 = -* Allow to use environment variables for LDAP-URI configuration - -= 2.3.0 = -* Allow to not overwrite existing WordPress-Users with LDAP-Users as that can be a security issue. - -= 2.1.0 = -* Add search-base for groups. This might come in handy for multisite-instances - -= 2.0.0 = -* This new release adds Multi-Site support. It will no longer be possible to use this plugin just in one subsite of a multisite installation! -* Adds a warning screen to the config-section when no LDAPextension could be found -* Fixes an issue with the max-length of the username - -= 1.5.1 = -* Fixes an issue with escaped backslashes and quotes - -= 1.5.0 = -* Allows parts of the LDAP-URI to be URLEncoded -* Drops support for PHP 5.4 - -= 1.4.20 = -* Allows multiple LDAP-servers to be queried (given that they use the same attributes) -* Fixes issue with URL-Encoded informations (see https://github.com/heiglandreas/authLdap/issues/108) - -= 1.4.19 = -* Adds support for TLS - -= 1.4.14 = -* Update to showing password-fields check (thanks to @chaplina) - -= 1.4.13 = -* Removed generation of default email-address (thanks to @henryk) -* Fixes password-hashing when caching passwords (thanks to @litinoveweedle) -* Removes the possibility to reset a password for LDAP-based users (thanks to @chaplina) -* Removes the password-change-Email from 4.3 on (thanks to @litinoveweedle) -* Fixes double authentication-attempt (that resulted in failed authentication) (thanks to @litinoveweedle) - -= 1.4.10 = -* Cleanup by removing deprecated code -* Fixes issues with undefined variables -* Enables internal option-versioning -* Setting users nickname initially to the realname instead of the uid -* Fixes display of password-change possibility in users profile-page -= 1.4.9 = -* Fixed an issue with changing display name on every login -* Use proper way of looking up user-roles in setups w/o DB-prefix -= 1.4.8 = -* Updated version string -= 1.4.7 = -* Use default user to retrieve group menberships and not logging in user. -* return the UID from the LDAP instead of the value given by the user -* remove unnecessary checkbox -* Adds a testsuite -* Fixes PSR2 violations - -[…] - -= 1.2.1 = -* Fixed an issue with group-ids -* Moved the code to GitHub (https://github.com/heiglandreas/authLdap) -= 1.1.0 = -* Changed the login-process. Now users that are not allowed to login due to -missing group-memberships are not created within your blog as was the standard -until Version 1.0.3 - Thanks to alex@tayts.com -* Changed the default mail-address that is created when no mail-address can be -retrieved from the LDAP from me@example.com to $username@example.com so that -a new user can be created even though the mail address already exists in your -blog - Also thanks to alex@tayts.com -* Added support for WordPress-Table-prefixes as the capabilities of a user -are interlany stored in a field that is named "$tablePrefix_capabilities" - -again thanks to alex@tayts.com and also to sim0n of silicium.mine.nu diff --git a/wp-content/upgrade-temp-backup/plugins/authldap/security.txt b/wp-content/upgrade-temp-backup/plugins/authldap/security.txt deleted file mode 100644 index 1d1f2736..00000000 --- a/wp-content/upgrade-temp-backup/plugins/authldap/security.txt +++ /dev/null @@ -1,6 +0,0 @@ -Contact: mailto://andreas@heigl.net -Contact: https://github.com/heiglandreas/authLdap/security/advisories/new -Expires: 2026-09-07T10:00:00.000Z -Encryption: https://andreas.heigl.org/publickey/ -Encryption: https://heigl.org/.well-known/openpgpkey/hu/sfqdema7hgdj146cwzo4rxgsoujxis31 -Preferred-Languages: en,de diff --git a/wp-content/upgrade-temp-backup/plugins/authldap/src/Exception/Error.php b/wp-content/upgrade-temp-backup/plugins/authldap/src/Exception/Error.php deleted file mode 100644 index 42771c8e..00000000 --- a/wp-content/upgrade-temp-backup/plugins/authldap/src/Exception/Error.php +++ /dev/null @@ -1,24 +0,0 @@ - - * - * Licenses under the MIT-license. For details see the included file LICENSE.md - */ - -declare(strict_types=1); - -namespace Org_Heigl\AuthLdap\Exception; - -use Exception; - -class Error extends Exception -{ - public function __construct($message, $line = null) - { - parent::__construct($message); - if ($line) { - $this -> line = $line; - } - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/authldap/src/Exception/InvalidLdapUri.php b/wp-content/upgrade-temp-backup/plugins/authldap/src/Exception/InvalidLdapUri.php deleted file mode 100644 index da667b01..00000000 --- a/wp-content/upgrade-temp-backup/plugins/authldap/src/Exception/InvalidLdapUri.php +++ /dev/null @@ -1,74 +0,0 @@ - - * - * Licenses under the MIT-license. For details see the included file LICENSE.md - */ - -declare(strict_types=1); - -namespace Org_Heigl\AuthLdap\Exception; - -use RuntimeException; - -use function sprintf; - -class InvalidLdapUri extends RuntimeException -{ - public static function cannotparse(string $ldapUri): self - { - return new self(sprintf( - '%1$s seems not to be a valid URI', - $ldapUri - )); - } - - public static function wrongSchema(string $uri): self - { - return new self(sprintf( - '%1$s does not start with a valid schema', - $uri - )); - } - - public static function noSchema(string $uri): self - { - return new self(sprintf( - '%1$s does not provide a schema', - $uri - )); - } - - public static function noEnvironmentVariableSet(string $uri): self - { - return new self(sprintf( - 'The environment variable %1$s does not provide a URI', - $uri - )); - } - - public static function noServerProvided(string $uri): self - { - return new self(sprintf( - 'The LDAP-URI %1$s does not provide a server', - $uri - )); - } - - public static function noSearchBaseProvided(string $uri): self - { - return new self(sprintf( - 'The LDAP-URI %1$s does not provide a search-base', - $uri - )); - } - - public static function invalidSearchBaseProvided(string $uri): self - { - return new self(sprintf( - 'The LDAP-URI %1$s does not provide a valid search-base', - $uri - )); - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/authldap/src/Exception/MissingValidLdapConnection.php b/wp-content/upgrade-temp-backup/plugins/authldap/src/Exception/MissingValidLdapConnection.php deleted file mode 100644 index 6c108f6a..00000000 --- a/wp-content/upgrade-temp-backup/plugins/authldap/src/Exception/MissingValidLdapConnection.php +++ /dev/null @@ -1,23 +0,0 @@ - - * - * Licenses under the MIT-license. For details see the included file LICENSE.md - */ - -declare(strict_types=1); - -namespace Org_Heigl\AuthLdap\Exception; - -use RuntimeException; - -class MissingValidLdapConnection extends Error -{ - public static function get(): self - { - return new self(sprintf( - 'No valid LDAP connection available' - )); - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/authldap/src/Exception/SearchUnsuccessfull.php b/wp-content/upgrade-temp-backup/plugins/authldap/src/Exception/SearchUnsuccessfull.php deleted file mode 100644 index 1159f428..00000000 --- a/wp-content/upgrade-temp-backup/plugins/authldap/src/Exception/SearchUnsuccessfull.php +++ /dev/null @@ -1,24 +0,0 @@ - - * - * Licenses under the MIT-license. For details see the included file LICENSE.md - */ - -declare(strict_types=1); - -namespace Org_Heigl\AuthLdap\Exception; - -use RuntimeException; - -class SearchUnsuccessfull extends RuntimeException -{ - public static function fromSearchFilter(string $filter): self - { - return new self(sprintf( - 'Search for %1$s was not successfull', - $filter - )); - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/authldap/src/Exception/UnknownOption.php b/wp-content/upgrade-temp-backup/plugins/authldap/src/Exception/UnknownOption.php deleted file mode 100644 index b2737b19..00000000 --- a/wp-content/upgrade-temp-backup/plugins/authldap/src/Exception/UnknownOption.php +++ /dev/null @@ -1,24 +0,0 @@ - - * - * Licensed under the MIT-license. For details see the included file LICENSE.md - */ - -namespace Org_Heigl\AuthLdap\Exception; - -use RuntimeException; - -class UnknownOption extends RuntimeException -{ - public static function withKey(string $key): self - { - return new self(sprintf( - 'An option "%1$s" is not known', - $key - )); - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/authldap/src/LdapList.php b/wp-content/upgrade-temp-backup/plugins/authldap/src/LdapList.php deleted file mode 100644 index bc24c33d..00000000 --- a/wp-content/upgrade-temp-backup/plugins/authldap/src/LdapList.php +++ /dev/null @@ -1,93 +0,0 @@ - - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - * - * @author Andreas Heigl - * @copyright Andreas Heigl - * @license http://www.opensource.org/licenses/mit-license.php MIT-License - * @since 07.07.2016 - * @link http://github.com/heiglandreas/authLDAP - */ - -namespace Org_Heigl\AuthLdap; - -use Exception; -use Org_Heigl\AuthLdap\Exception\Error; -use Org_Heigl\AuthLdap\Exception\SearchUnsuccessfull; -use Org_Heigl\AuthLdap\Manager\Ldap; - -class LdapList -{ - /** - * @var Ldap[] - */ - protected $items = []; - - public function addLdap(Ldap $ldap) - { - $this->items[] = $ldap; - } - - public function authenticate($username, $password, $filter = '(uid=%s)') - { - /** @var Ldap $item */ - foreach ($this->items as $key => $item) { - if (! $item->authenticate($username, $password, $filter)) { - unset($this->items[$key]); - continue; - } - return true; - } - - return false; - } - - public function bind() - { - $allFailed = true; - foreach ($this->items as $key => $item) { - try { - $item->bind(); - } catch (\Exception $e) { - unset($this->items[$key]); - continue; - } - $allFailed = false; - } - - if ($allFailed) { - throw new Error('No bind successfull'); - } - - return true; - } - - public function search($filter, $attributes = array('uid'), $base = '') - { - foreach ($this->items as $item) { - try { - $result = $item->search($filter, $attributes, $base); - return $result; - } catch (Exception $e) { - } - } - - throw SearchUnsuccessfull::fromSearchFilter($filter); - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/authldap/src/LdapUri.php b/wp-content/upgrade-temp-backup/plugins/authldap/src/LdapUri.php deleted file mode 100644 index 265ec96e..00000000 --- a/wp-content/upgrade-temp-backup/plugins/authldap/src/LdapUri.php +++ /dev/null @@ -1,179 +0,0 @@ - - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - * - * @author Andreas Heigl - * @copyright Andreas Heigl - * @license http://www.opensource.org/licenses/mit-license.php MIT-License - * @since 19.07.2020 - * @link http://github.com/heiglandreas/authLDAP - */ - -declare(strict_types=1); - -namespace Org_Heigl\AuthLdap; - -use Org_Heigl\AuthLdap\Exception\InvalidLdapUri; - -use function array_map; -use function error_get_last; -use function getenv; -use function is_array; -use function is_string; -use function parse_url; -use function preg_replace_callback; -use function rawurlencode; -use function strlen; -use function strpos; -use function substr; -use function trim; -use function urldecode; - -final class LdapUri -{ - private $server; - - private $scheme; - - private $port = 389; - - private string $baseDn; - - private $username = ''; - - private $password = ''; - - private function __construct(string $uri) - { - if (!preg_match('/^(ldap|ldaps|env)/', $uri)) { - throw InvalidLdapUri::wrongSchema($uri); - } - - if (strpos($uri, 'env:') === 0) { - $newUri = getenv(substr($uri, 4)); - if (false === $newUri) { - throw InvalidLdapUri::noEnvironmentVariableSet($uri); - } - $uri = (string) $newUri; - } - - $uri = $this->injectEnvironmentVariables($uri); - - $array = parse_url($uri); - if (!is_array($array)) { - throw InvalidLdapUri::cannotparse($uri); - } - - $url = array_map(static function ($item) { - if (is_int($item)) { - return $item; - } - return urldecode($item); - }, $array); - - - if (!isset($url['scheme'])) { - throw InvalidLdapUri::noSchema($uri); - } - if (0 !== strpos($url['scheme'], 'ldap')) { - throw InvalidLdapUri::wrongSchema($uri); - } - if (!isset($url['host'])) { - throw InvalidLdapUri::noServerProvided($uri); - } - if (!isset($url['path'])) { - throw InvalidLdapUri::noSearchBaseProvided($uri); - } - if (1 === strlen($url['path'])) { - throw InvalidLdapUri::invalidSearchBaseProvided($uri); - } - - $this->server = $url['host']; - $this->scheme = $url['scheme']; - $this->baseDn = substr($url['path'], 1); - if (isset($url['user'])) { - $this->username = $url['user']; - } - if ('' === trim($this->username)) { - $this->username = 'anonymous'; - } - if (isset($url['pass'])) { - $this->password = $url['pass']; - } - if ($this->scheme === 'ldaps' && $this->port === 389) { - $this->port = 636; - } - - // When someone sets the port in the URL we overwrite whatever is set. - // We have to assume they know what they are doing! - if (isset($url['port'])) { - $this->port = $url['port']; - } - } - - public static function fromString(string $uri): LdapUri - { - return new LdapUri($uri); - } - - private function injectEnvironmentVariables(string $base): string - { - return preg_replace_callback('/%env:([^%]+)%/', static function (array $matches) { - return rawurlencode(getenv($matches[1])); - }, $base); - } - - public function toString(): string - { - return $this->scheme . '://' . $this->server . ':' . $this->port; - } - - public function __toString() - { - return $this->toString(); - } - - public function getUsername(): string - { - return $this->username; - } - - public function getPassword(): string - { - return $this->password; - } - - public function getBaseDn(): string - { - return $this->baseDn; - } - - public function isAnonymous(): bool - { - if ($this->password === '') { - return true; - } - - if ($this->username === 'anonymous') { - return true; - } - - return false; - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/authldap/src/Manager/Ldap.php b/wp-content/upgrade-temp-backup/plugins/authldap/src/Manager/Ldap.php deleted file mode 100644 index 9b4c85ba..00000000 --- a/wp-content/upgrade-temp-backup/plugins/authldap/src/Manager/Ldap.php +++ /dev/null @@ -1,164 +0,0 @@ - - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * This file handles the basic LDAP-Tasks - * - * @author Andreas Heigl - * @package authLdap - * @category authLdap - * @since 2008 - */ - -namespace Org_Heigl\AuthLdap\Manager; - -use Org_Heigl\AuthLdap\Exception\Error; -use Org_Heigl\AuthLdap\Exception\MissingValidLdapConnection; -use Org_Heigl\AuthLdap\LdapUri; -use Org_Heigl\AuthLdap\Wrapper\LdapFactory; -use Org_Heigl\AuthLdap\Wrapper\LdapInterface; - -class Ldap -{ - /** - * This property contains the connection handle to the ldap-server - * - * @var LdapInterface|null - */ - private ?LdapInterface $connection; - - private LdapUri $uri; - - private LdapFactory $factory; - - private $starttls; - - public function __construct(LdapFactory $factory, LdapUri $uri, $starttls = false) - { - $this->starttls = $starttls; - $this->uri = $uri; - $this->factory = $factory; - $this->connection = null; - } - - /** - * Connect to the given LDAP-Server - */ - public function connect(): self - { - $this->disconnect(); - - $this->connection = $this->factory->createFromLdapUri($this->uri->toString()); - $this->connection->setOption(LDAP_OPT_PROTOCOL_VERSION, 3); - $this->connection->setOption(LDAP_OPT_REFERRALS, 0); - //if configured try to upgrade encryption to tls for ldap connections - if ($this->starttls) { - $this->connection->startTls(); - } - return $this; - } - - /** - * Disconnect from a resource if one is available - */ - public function disconnect(): self - { - if (null !== $this->connection) { - $this->connection->unbind(); - } - $this->connection = null; - return $this; - } - - /** - * Bind to an LDAP-Server with the given credentials - * - * @throws Error - */ - public function bind(): self - { - if (!$this->connection) { - $this->connect(); - } - if (null === $this->connection) { - throw MissingValidLdapConnection::get(); - } - if ($this->uri->isAnonymous()) { - $bind = $this->connection->bind(); - } else { - $bind = $this->connection->bind($this->uri->getUsername(), $this->uri->getPassword()); - } - if (!$bind) { - throw new Error('bind was not successfull: ' . $this->connection->error()); - } - return $this; - } - - /** - * This method does the actual ldap-serch. - * - * This is using the filter $filter for retrieving the attributes - * $attributes - * - * @return array - * @throws Error - */ - public function search(string $filter, array $attributes = ['uid'], ?string $base = ''): array - { - if (null === $this->connection) { - throw new Error('No resource handle available'); - } - if (!$base) { - $base = $this->uri->getBaseDn(); - } - $result = $this->connection->search($base, $filter, $attributes); - if ($result === false) { - throw new Error('no result found'); - } - $info = $this->connection->getEntries($result); - if ($info === false) { - throw new Error('invalid results found'); - } - return $info; - } - - /** - * This method authenticates the user $username using the - * password $password - * - * @param string $filter OPTIONAL This parameter defines the Filter to be used - * when searchin for the username. This MUST contain the string '%s' which - * will be replaced by the vaue given in $username - * @throws Error - */ - public function authenticate(string $username, string $password, string $filter = '(uid=%s)'): bool - { - $this->connect(); - $this->bind(); - $res = $this->search(sprintf($filter, $this->factory->escape($username, '', LDAP_ESCAPE_FILTER))); - if ($res ['count'] !== 1) { - return false; - } - - $dn = $res[0]['dn']; - return $username && $password && $this->connection->bind($dn, $password); - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/authldap/src/OptionFactory.php b/wp-content/upgrade-temp-backup/plugins/authldap/src/OptionFactory.php deleted file mode 100644 index aa2955e4..00000000 --- a/wp-content/upgrade-temp-backup/plugins/authldap/src/OptionFactory.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * Licensed under the MIT-license. For details see the included file LICENSE.md - */ - -namespace Org_Heigl\AuthLdap; - -use function json_decode; - -class OptionFactory -{ - public function fromJson(string $json): Options - { - $option = new Options(); - $content = json_decode($json, true); - foreach ($content as $key => $value) { - $option->set($key, $value); - } - - return $option; - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/authldap/src/Options.php b/wp-content/upgrade-temp-backup/plugins/authldap/src/Options.php deleted file mode 100644 index ee7b969c..00000000 --- a/wp-content/upgrade-temp-backup/plugins/authldap/src/Options.php +++ /dev/null @@ -1,90 +0,0 @@ - - * - * Licensed under the MIT-license. For details see the included file LICENSE.md - */ - -namespace Org_Heigl\AuthLdap; - -use Org_Heigl\AuthLdap\Exception\UnknownOption; -use function array_key_exists; - -class Options -{ - public const ENABLED = 'Enabled'; - public const CACHE_PW = 'CachePW'; - public const URI = 'URI'; - public const URI_SEPARATOR = 'URISeparator'; - public const FILTER = 'Filter'; - public const NAME_ATTR = 'NameAttr'; - public const SEC_NAME = 'SecName'; - public const UID_ATTR = 'UidAttr'; - public const MAIL_ATTR = 'MailAttr'; - public const WEB_ATTR = 'WebAttr'; - public const GROUPS = 'Groups'; - public const DEBUG = 'Debug'; - public const GROUP_ATTR = 'GroupAttr'; - public const GROUP_FILTER = 'GroupFilter'; - public const DEFAULT_ROLE = 'DefaultRole'; - public const GROUP_ENABLE = 'GroupEnable'; - public const GROUP_OVER_USER = 'GroupOverUser'; - public const VERSION = 'Version'; - public const DO_NOT_OVERWRITE_NON_LDAP_USERS = 'DoNotOverwriteNonLdapUsers'; - - private array $settings = [ - 'Enabled' => false, - 'CachePW' => false, - 'URI' => '', - 'URISeparator' => ' ', - 'Filter' => '', // '(uid=%s)' - 'NameAttr' => '', // 'name' - 'SecName' => '', - 'UidAttr' => '', // 'uid' - 'MailAttr' => '', // 'mail' - 'WebAttr' => '', - 'Groups' => [], - 'Debug' => false, - 'GroupAttr' => '', // 'gidNumber' - 'GroupFilter' => '', // '(&(objectClass=posixGroup)(memberUid=%s))' - 'DefaultRole' => '', - 'GroupEnable' => true, - 'GroupOverUser' => true, - 'Version' => 1, - 'DoNotOverwriteNonLdapUsers' => false, - ]; - - public function get(string $key) - { - if (! array_key_exists($key, $this->settings)) { - throw UnknownOption::withKey($key); - } - - return $this->settings[$key]; - } - - public function has(string $key): bool - { - return array_key_exists($key, $this->settings); - } - - /** - * @param mixed $value - */ - public function set(string $key, $value): void - { - if (! array_key_exists($key, $this->settings)) { - throw UnknownOption::withKey($key); - } - - $this->settings[$key] = $value; - } - - public function toArray(): array - { - return $this->settings; - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/authldap/src/UserRoleHandler.php b/wp-content/upgrade-temp-backup/plugins/authldap/src/UserRoleHandler.php deleted file mode 100644 index 8966980f..00000000 --- a/wp-content/upgrade-temp-backup/plugins/authldap/src/UserRoleHandler.php +++ /dev/null @@ -1,54 +0,0 @@ - - * - * Licenses under the MIT-license. For details see the included file LICENSE.md - */ - -declare(strict_types=1); - -namespace Org_Heigl\AuthLdap; - -use WP_User; - -use function array_search; -use function in_array; -use function var_dump; - -class UserRoleHandler -{ - /** - * @param WP_User $user - * @param string[] $roles - * @return void - */ - public function addRolesToUser(WP_User $user, $roles) : void - { - if ($roles === []) { - return; - } - - if ($user->roles == $roles) { - return; - } - - // Remove unused roles from existing. - foreach ($user->roles as $role) { - if (!in_array($role, $roles)) { - // Remove unused roles. - $user->remove_role($role); - continue; - } - // Remove the existing role from roles. - if (($key = array_search($role, $roles)) !== false) { - unset($roles[$key]); - } - } - - // Add new ones if not already assigned. - foreach ($roles as $role) { - $user->add_role($role); - } - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/authldap/src/Wrapper/Ldap.php b/wp-content/upgrade-temp-backup/plugins/authldap/src/Wrapper/Ldap.php deleted file mode 100644 index 48b01d34..00000000 --- a/wp-content/upgrade-temp-backup/plugins/authldap/src/Wrapper/Ldap.php +++ /dev/null @@ -1,93 +0,0 @@ - - * - * Licenses under the MIT-license. For details see the included file LICENSE.md - */ - -declare(strict_types=1); - -namespace Org_Heigl\AuthLdap\Wrapper; - -use function ldap_bind; -use function ldap_connect; -use function ldap_error; -use function ldap_escape; -use function ldap_get_entries; -use function ldap_set_option; -use function ldap_start_tls; -use function ldap_unbind; -use function var_dump; - -final class Ldap implements LdapInterface -{ - private $connection; - - public function __construct(string $ldapUri) - { - $this->connection = ldap_connect($ldapUri); - } - - public function bind($dn = null, $password = null) - { - if (null === $dn && null === $password) { - return ldap_bind($this->connection); - } - return ldap_bind($this->connection, $dn, $password); - } - - public function unbind() - { - return ldap_unbind($this->connection); - } - - public function setOption($option, $value) - { - return ldap_set_option($this->connection, $option, $value); - } - - public function startTls() - { - return ldap_start_tls($this->connection); - } - - public function error() - { - return ldap_error($this->connection); - } - - public function errno() - { - return ldap_errno($this->connection); - } - - public function search( - $base, - $filter, - array $attributes = [], - $attributes_only = 0, - $sizelimit = -1, - $timelimit = -1 - ) { - return ldap_search( - $this->connection, - $base, - $filter, - $attributes, - $attributes_only, - $sizelimit, - $timelimit - ); - } - - public function getEntries($search_result) - { - return ldap_get_entries($this->connection, $search_result); - } - - public static function escape(string $value, string $ignore = '', int $flags = 0): string - { - return ldap_escape($value, $ignore, $flags); - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/authldap/src/Wrapper/LdapFactory.php b/wp-content/upgrade-temp-backup/plugins/authldap/src/Wrapper/LdapFactory.php deleted file mode 100644 index d8abbbbe..00000000 --- a/wp-content/upgrade-temp-backup/plugins/authldap/src/Wrapper/LdapFactory.php +++ /dev/null @@ -1,24 +0,0 @@ - - * - * Licenses under the MIT-license. For details see the included file LICENSE.md - */ - -declare(strict_types=1); - -namespace Org_Heigl\AuthLdap\Wrapper; - -class LdapFactory -{ - public function createFromLdapUri(string $ldapUri): LdapInterface - { - return new Ldap($ldapUri); - } - - public function escape($value, $ignore = '', $flags = 0): string - { - return Ldap::escape($value, $ignore, $flags); - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/authldap/src/Wrapper/LdapInterface.php b/wp-content/upgrade-temp-backup/plugins/authldap/src/Wrapper/LdapInterface.php deleted file mode 100644 index d6f7721d..00000000 --- a/wp-content/upgrade-temp-backup/plugins/authldap/src/Wrapper/LdapInterface.php +++ /dev/null @@ -1,39 +0,0 @@ - - * - * Licenses under the MIT-license. For details see the included file LICENSE.md - */ - -declare(strict_types=1); - -namespace Org_Heigl\AuthLdap\Wrapper; - -interface LdapInterface -{ - public function bind($dn = null, $password = null); - - public function unbind(); - - public function setOption($option, $value); - - public function startTls(); - - public function error(); - - public function errno(); - - public function search( - $base, - $filter, - array $attributes = [], - $attributes_only = 0, - $sizelimit = -1, - $timelimit = -1 - ); - - public function getEntries($search_result); - - public static function escape(string $value, string $ignore = '', int $flags = 0): string; -} diff --git a/wp-content/upgrade-temp-backup/plugins/authldap/view/admin.phtml b/wp-content/upgrade-temp-backup/plugins/authldap/view/admin.phtml deleted file mode 100644 index 0c55b319..00000000 --- a/wp-content/upgrade-temp-backup/plugins/authldap/view/admin.phtml +++ /dev/null @@ -1,454 +0,0 @@ - - * @copyright ©2014-2014 Andreas Heigl - * @license http://www.opesource.org/licenses/mit-license.php MIT-License - * @version 0.0 - * @since 19.12.14 - * @link https://github.com/heiglandreas/authLdap - */ -?>
- -
Caveat: The LDAP-extension is not loaded! - Without that extension it is not possible to query an LDAP-Server! Please have a look - at the PHP-Installation page -
- -

AuthLDAP Options

-
- -

General Usage of authLDAP

-
- - - - - - - - - - - - - - - - - - - - - -
- - - /> -
- - - /> -
- - - /> -

- Shall we prohibit authenticating already in WordPress created users using LDAP? If you enable this, LDAP-Users with the same user-ID - as existing WordPress-Users can no longer take over the WordPress-Users account. This also means that LDAP-Users with the same User-ID as existing - WordPress-Users will not be able to authenticate anymore! Accounts that have been taken over already will not be affected by this setting. -

-

This should only be checked if you know what you are doing!

-
- - - /> -
- - - /> -

- Search LDAP for user's groups and map to Wordpress Roles. -

-
-
-

General Server Settings

-
- - - - - - - - - - - - - - - - -
- - - -

- The URI - for connecting to the LDAP-Server. This usualy takes the form - <scheme>://<user>:<password>@<server>/<path> - according to RFC 1738.

-

- In this case it schould be something like - ldap://uid=adminuser,dc=example,c=com:secret@ldap.example.com/dc=basePath,dc=example,c=com. -

-

- If your LDAP accepts anonymous login, you can ommit the user and - password-Part of the URI -

-

- You can use the pseudo-schema env to provide your LDAP-URI from an environment-variable. So if you have your - LDAP-URI in a variable called LDAP_URI you can enter env:LDAP_URI in this field and at runtime the - appropriate value will be taken from the Environment-variable LDAP_URI. If the varialbe is not set, then the value will be empty. -

-

- You can also provide different parts of the LDP-URI from environment variables by providing - %env:[VARIABLENAME]% within your LDAP-URI. So if you want to provide the - password from an Environment-variable LDAP_PASSWORD your LDAP-URI looks like - ldap://uid=adminuser,dc=example,c=com:%env:LDAP_PASSWORD%@ldap.example.com/dc=basePath,dc=example,c=com -

-

- Caveat!
- If you are using Environment-variables for parts of the LDAP-URL then those must not be URL-Encoded!
- Otherwise the different parts must be URL-Encoded! -

-
- - - -

- A separator that separates multiple LDAP-URIs from one another. - You can use that feature to try to authenticate against multiple LDAP-Servers - as long as they all have the same attribute-settings. The first LDAP-Server the user can - authenticate against will be used to handle the user. -

- - - /> -

- Use StartTLS for encryption of ldap connections. This setting is not to be used in combination with ldaps connections (ldap:// only). -

-
- - - -

- Please provide a valid filter that can be used for querying the - LDAP - for the correct user. For more information on this - feature have a look at http://andreas.heigl.org/cat/dev/wp/authldap -

-

- This field should include the string %s - that will be replaced with the username provided during log-in -

-

- If you leave this field empty it defaults to (uid=%s) -

-
-
- -

Settings for creating new Users

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - />
-

- If checked the plugin will use the user's account to query their own information. If not it will use the admin account. -

- -
- - -
-

- Which Attribute from the LDAP contains the Full or the First name - of the user trying to log in. -

-

- This defaults to name -

- -
- - - -

- If the above Name-Attribute only contains the First Name of the - user you can here specify an Attribute that contains the second name. -

-

- This field is empty by default -

-
- - - -

- Please give the Attribute, that is used to identify the user. This - should be the same as you used in the above Filter-Option -

-

- This field defaults to uid -

-
- - - -

- Which Attribute holds the eMail-Address of the user? -

-

- If more than one eMail-Address are stored in the LDAP, only the first given is used -

-

- This field defaults to mail -

-
- - - -

- If your users have a personal page (URI) stored in the LDAP, it can - be provided here. -

-

- This field is empty by default -

-
- - - -

- Here you can select the default role for users. - If you enable LDAP Groups below, they will take precedence over the Default Role. -

-

- Existing users will retain their roles unless overriden by LDAP Groups below. -

-
-
- - -
-

Groups for Roles

-
- - - - - - - - - - - - - - - - - - - - - -
- - - /> -

- If role determined by LDAP Group differs from existing Wordpress User's role, use LDAP Group. -

-
- - - -

- This is the base dn to lookup groups. -

-

- If empty the base dn of the LDAP URI will be used -

-
- - - -

- This is the attribute that defines the Group-ID that can be matched - against the Groups defined further down -

-

- This field defaults to gidNumber -

-
- - - -

- This attribute defines the separator used for the Group-IDs listed in the - Groups defined further down. This is useful if the value of Group-Attribute - listed above can contain a comma (for example, when using the memberof attribute) -

-

- This field defaults to , (comma) -

-
- - - -

- Here you can add the filter for selecting groups for ther - currentlly logged in user -

-

- The Filter should contain the string %s which will be replaced by - the login-name of the currently logged in user -

-

- Alternatively the string %dn% will be replaced by the - DN of the currently logged in user. This can be helpfull if - group-memberships are defined with DNs rather than UIDs -

-

This field defaults to - (&(objectClass=posixGroup)(memberUid=%s)) -

-
-
- -

Role - group mapping

-
-

You can set multiple values per role by separating them with a coma

-

The values are empty by default

- - - - - - -get_names() as $group => $vals) : - $aGroup=$authLDAPGroups[$group]; ?> - - - - - - -
Assign this WordPress-Roleto members of this/these LDAP-Groups
- - - -
-
-
-
-

- -

-
-
-
- - diff --git a/wp-content/upgrade-temp-backup/plugins/companion-auto-update/admin/dashboard.php b/wp-content/upgrade-temp-backup/plugins/companion-auto-update/admin/dashboard.php deleted file mode 100644 index 9a136a13..00000000 --- a/wp-content/upgrade-temp-backup/plugins/companion-auto-update/admin/dashboard.php +++ /dev/null @@ -1,577 +0,0 @@ -

'.__( 'Companion Auto Update was not able to set the event for sending you emails, please re-activate the plugin in order to set the event', 'companion-auto-update' ).'.

'; -} - -// Database requires an update -if ( cau_incorrectDatabaseVersion() ) { - echo '

'.__( 'Companion Auto Update Database Update', 'companion-auto-update' ).' – - '.__( 'We need you to update to the latest database version', 'companion-auto-update' ).'. '.__( 'Run updater now', 'companion-auto-update' ).'

'; -} - -// Update log DB is empty -if ( cau_updateLogDBisEmpty() ) { - echo '

'.__( 'Companion Auto Update Database Update', 'companion-auto-update' ).' – - '.__( 'We need to add some information to your database', 'companion-auto-update' ).'. '.__( 'Run updater now', 'companion-auto-update' ).'

'; -} - -// Save settings -if( isset( $_POST['submit'] ) ) { - - check_admin_referer( 'cau_save_settings' ); - - global $wpdb; - $table_name = $wpdb->prefix . "auto_updates"; - - // Auto updater - $plugins = isset( $_POST['plugins'] ) ? sanitize_text_field( $_POST['plugins'] ) : ''; - $themes = isset( $_POST['themes'] ) ? sanitize_text_field( $_POST['themes'] ) : ''; - $minor = isset( $_POST['minor'] ) ? sanitize_text_field( $_POST['minor'] ) : ''; - $major = isset( $_POST['major'] ) ? sanitize_text_field( $_POST['major'] ) : ''; - $translations = isset( $_POST['translations'] ) ? sanitize_text_field( $_POST['translations'] ) : ''; - - $wpdb->query( $wpdb->prepare( "UPDATE $table_name SET onoroff = %s WHERE name = 'plugins'", $plugins ) ); - $wpdb->query( $wpdb->prepare( "UPDATE $table_name SET onoroff = %s WHERE name = 'themes'", $themes ) ); - $wpdb->query( $wpdb->prepare( "UPDATE $table_name SET onoroff = %s WHERE name = 'minor'", $minor ) ); - $wpdb->query( $wpdb->prepare( "UPDATE $table_name SET onoroff = %s WHERE name = 'major'", $major ) ); - $wpdb->query( $wpdb->prepare( "UPDATE $table_name SET onoroff = %s WHERE name = 'translations'", $translations ) ); - - // Emails - $send = isset( $_POST['cau_send'] ) ? sanitize_text_field( $_POST['cau_send'] ) : ''; - $sendupdate = isset( $_POST['cau_send_update'] ) ? sanitize_text_field( $_POST['cau_send_update'] ) : ''; - $sendoutdated = isset( $_POST['cau_send_outdated'] ) ? sanitize_text_field( $_POST['cau_send_outdated'] ) : ''; - $wpemails = isset( $_POST['wpemails'] ) ? sanitize_text_field( $_POST['wpemails'] ) : ''; - $email = isset( $_POST['cau_email'] ) ? sanitize_text_field( $_POST['cau_email'] ) : ''; - $html_or_text = isset( $_POST['html_or_text'] ) ? sanitize_text_field( $_POST['html_or_text'] ) : 'html'; - $dbupdateemails = isset( $_POST['dbupdateemails'] ) ? sanitize_text_field( $_POST['dbupdateemails'] ) : ''; - - $wpdb->query( $wpdb->prepare( "UPDATE $table_name SET onoroff = %s WHERE name = 'email'", $email ) ); - $wpdb->query( $wpdb->prepare( "UPDATE $table_name SET onoroff = %s WHERE name = 'send'", $send ) ); - $wpdb->query( $wpdb->prepare( "UPDATE $table_name SET onoroff = %s WHERE name = 'sendupdate'", $sendupdate ) ); - $wpdb->query( $wpdb->prepare( "UPDATE $table_name SET onoroff = %s WHERE name = 'sendoutdated'", $sendoutdated ) ); - $wpdb->query( $wpdb->prepare( "UPDATE $table_name SET onoroff = %s WHERE name = 'wpemails'", $wpemails ) ); - $wpdb->query( $wpdb->prepare( "UPDATE $table_name SET onoroff = %s WHERE name = 'html_or_text'", $html_or_text ) ); - $wpdb->query( $wpdb->prepare( "UPDATE $table_name SET onoroff = %s WHERE name = 'dbupdateemails'", $dbupdateemails ) ); - - // Advanced - $allow_editor = isset( $_POST['allow_editor'] ) ? sanitize_text_field( $_POST['allow_editor'] ) : ''; - $allow_author = isset( $_POST['allow_author'] ) ? sanitize_text_field( $_POST['allow_author'] ) : ''; - $advanced_info_emails = isset( $_POST['advanced_info_emails'] ) ? sanitize_text_field( $_POST['advanced_info_emails'] ) : ''; - $plugin_links_emails = isset( $_POST['plugin_links_emails'] ) ? sanitize_text_field( $_POST['plugin_links_emails'] ) : ''; - - $wpdb->query( $wpdb->prepare( "UPDATE $table_name SET onoroff = %s WHERE name = 'allow_editor'", $allow_editor ) ); - $wpdb->query( $wpdb->prepare( "UPDATE $table_name SET onoroff = %s WHERE name = 'allow_author'", $allow_author ) ); - $wpdb->query( $wpdb->prepare( "UPDATE $table_name SET onoroff = %s WHERE name = 'advanced_info_emails'", $advanced_info_emails ) ); - $wpdb->query( $wpdb->prepare( "UPDATE $table_name SET onoroff = %s WHERE name = 'plugin_links_emails'", $plugin_links_emails ) ); - - // Delay - $update_delay = isset( $_POST['update_delay'] ) ? sanitize_text_field( $_POST['update_delay'] ) : ''; - $update_delay_days = isset( $_POST['update_delay_days'] ) ? sanitize_text_field( $_POST['update_delay_days'] ) : ''; - - $wpdb->query( $wpdb->prepare( "UPDATE $table_name SET onoroff = %s WHERE name = 'update_delay'", $update_delay ) ); - $wpdb->query( $wpdb->prepare( "UPDATE $table_name SET onoroff = %s WHERE name = 'update_delay_days'", $update_delay_days ) ); - - // Intervals - - // Set variables - $plugin_sc = sanitize_text_field( $_POST['plugin_schedule'] ); - $theme_sc = sanitize_text_field( $_POST['theme_schedule'] ); - $core_sc = sanitize_text_field( $_POST['core_schedule'] ); - $schedule_mail = sanitize_text_field( $_POST['update_notifications'] ); - $outdated_notifier = sanitize_text_field( $_POST['outdated_notifier'] ); - - // First clear schedules - wp_clear_scheduled_hook( 'wp_update_plugins' ); - wp_clear_scheduled_hook( 'wp_update_themes' ); - wp_clear_scheduled_hook( 'wp_version_check' ); - wp_clear_scheduled_hook( 'cau_set_schedule_mail' ); - wp_clear_scheduled_hook( 'cau_custom_hooks_plugins' ); - wp_clear_scheduled_hook( 'cau_custom_hooks_themes' ); - wp_clear_scheduled_hook( 'cau_log_updater' ); - wp_clear_scheduled_hook( 'cau_outdated_notifier' ); - - // Then set the new times - - // Plugins - if( $plugin_sc == 'daily' ) { - - $date = date( 'Y-m-d' ); - $hours = sanitize_text_field( $_POST['plugin_schedule-sethour'] ); - $minutes = sanitize_text_field( $_POST['plugin_schedule-setminutes'] ); - $seconds = date( 's' ); - $fullDate = $date.' '.$hours.':'.$minutes.':'.$seconds; - $pluginSetTime = strtotime( $fullDate ); - - wp_schedule_event( $pluginSetTime, $plugin_sc, 'wp_update_plugins' ); - wp_schedule_event( $pluginSetTime, $plugin_sc, 'cau_custom_hooks_plugins' ); - wp_schedule_event( ( $pluginSetTime - 1800 ), $plugin_sc, 'cau_log_updater' ); - - } else { - wp_schedule_event( time(), $plugin_sc, 'wp_update_plugins' ); - wp_schedule_event( time(), $plugin_sc, 'cau_custom_hooks_plugins' ); - wp_schedule_event( ( time() - 1800 ), $plugin_sc, 'cau_log_updater' ); - } - - // Themes - if( $theme_sc == 'daily' ) { - - $dateT = date( 'Y-m-d' ); - $hoursT = sanitize_text_field( $_POST['theme_schedule-sethour'] ); - $minutesT = sanitize_text_field( $_POST['theme_schedule-setminutes'] ); - $secondsT = date( 's' ); - $fullDateT = $dateT.' '.$hoursT.':'.$minutesT.':'.$secondsT; - $themeSetTime = strtotime( $fullDateT ); - - wp_schedule_event( $themeSetTime, $theme_sc, 'wp_update_themes' ); - wp_schedule_event( $themeSetTime, $theme_sc, 'cau_custom_hooks_themes' ); - - } else { - wp_schedule_event( time(), $theme_sc, 'wp_update_themes' ); - wp_schedule_event( time(), $theme_sc, 'cau_custom_hooks_themes' ); - } - - // Core - if( $core_sc == 'daily' ) { - - $dateC = date( 'Y-m-d' ); - $hoursC = sanitize_text_field( $_POST['core_schedule-sethour'] ); - $minutesC = sanitize_text_field( $_POST['core_schedule-setminutes'] ); - $secondsC = date( 's' ); - $fullDateC = $dateC.' '.$hoursC.':'.$minutesC.':'.$secondsC; - $coreSetTime = strtotime( $fullDateC ); - - wp_schedule_event( $coreSetTime, $core_sc, 'wp_version_check' ); - - } else { - wp_schedule_event( time(), $core_sc, 'wp_version_check' ); - } - - // Update notifications - if( $schedule_mail == 'daily' ) { - - $dateT = date( 'Y-m-d' ); - $hoursT = sanitize_text_field( $_POST['update_notifications-sethour'] ); - $minutesT = sanitize_text_field( $_POST['update_notifications-setminutes'] ); - $secondsT = date( 's' ); - $fullDateT = $dateT.' '.$hoursT.':'.$minutesT.':'.$secondsT; - $emailSetTime = strtotime( $fullDateT ); - - wp_schedule_event( $emailSetTime, $schedule_mail, 'cau_set_schedule_mail' ); - - } else { - wp_schedule_event( time(), $schedule_mail, 'cau_set_schedule_mail' ); - } - - // Outdated notifications - if( $outdated_notifier == 'daily' ) { - - $dateT = date( 'Y-m-d' ); - $hoursT = sanitize_text_field( $_POST['outdated_notifier-sethour'] ); - $minutesT = sanitize_text_field( $_POST['outdated_notifier-setminutes'] ); - $secondsT = date( 's' ); - $fullDateT = $dateT.' '.$hoursT.':'.$minutesT.':'.$secondsT; - $emailSetTime = strtotime( $fullDateT ); - - wp_schedule_event( $emailSetTime, $outdated_notifier, 'cau_outdated_notifier' ); - - } else { - wp_schedule_event( time(), $outdated_notifier, 'cau_outdated_notifier' ); - } - - - echo '

'.__( 'Settings saved.' ).'

'; - -} - -// Welcome screen for first time viewers -if( isset( $_GET['welcome'] ) ) { - echo '
-
-
- -

'.__( 'Welcome to Companion Auto Update', 'companion-auto-update' ).'

-
-

'.__( 'You\'re set and ready to go', 'companion-auto-update' ).'

-

'.__( 'The plugin is all set and ready to go with the recommended settings, but if you\'d like you can change them below.' ).'

-
-

'.__( 'Get Started' ).': '.__( 'Update filter', 'companion-auto-update' ).'   |   - '.__( 'More Actions' ).': '.__('Give feedback', 'companion-auto-update').' - '.__( 'Help us translate', 'companion-auto-update' ).'

- -
-
'; -} - -$cs_hooks_p = wp_get_schedule( 'cau_custom_hooks_plugins' ); -$cs_hooks_t = wp_get_schedule( 'cau_custom_hooks_themes' ); - -?> - -
- -
- -
- -

- - - - - -
-
- -

"; - echo "

"; - echo "

"; - echo "

"; - echo "

"; - - ?> - -
-
- -
- - - -
- -

- - "; - echo ""; - echo "

"; - - // Set the time when daily is selected - echo ""; - - } - - ?> - -
- -

- - -
- -
- -

- - -
- -
- -

- - -
- -

- -
- -

- - -
- -
- -

- - -
- -
- -
- -

- - - - - - - - - - - - - - > - - - - -
-

-

-

-
-

-
- -

-

Please note: Delaying updates does not work with WordPress updates yet.

-
- -
- - - -
- -
-
- - - -
- -
- -
-
-

-
    -
  • -
  • -
- -

-
    -
  • -
  • -
  • -
-
-
-

-
    -
  • -
-
-
- -
-
-

-

-

-

-
-
- -
-

-

You get useful software and we get to carry on making it better.', 'companion-auto-update'); ?>

- - - - - - -

-
- -
-

Plugin Promotion

-

Keep your site fast with our Revision Manager

-

Post Revisions are great, but will also slow down your site. Take back control over revisions with Companion Revision Manager!

- Read more -
- -
- - - - \ No newline at end of file diff --git a/wp-content/upgrade-temp-backup/plugins/companion-auto-update/admin/log.php b/wp-content/upgrade-temp-backup/plugins/companion-auto-update/admin/log.php deleted file mode 100644 index 8bdf0542..00000000 --- a/wp-content/upgrade-temp-backup/plugins/companion-auto-update/admin/log.php +++ /dev/null @@ -1,19 +0,0 @@ - - - - -
- - - - - -
- - -
- We've had to (temporarily) disable the theme filter because it was causing issues on some installations. We'll try to get it working again in a future update. -
- - -

- -prefix."auto_updates"; - -// Save list -if( isset( $_POST['submit'] ) ) { - - check_admin_referer( 'cau_save_pluginlist' ); - - $noUpdateList = ''; - $i = 0; - $noUpdateCount = 0; - - if( isset( $_POST['post'] ) ) { - $noUpdateCount = count( $_POST['post'] ); - } - - if( $noUpdateCount > 0 ) { - foreach ( $_POST['post'] as $key ) { - $noUpdateList .= sanitize_text_field( $key ); - $i++; - if( $i != $noUpdateCount ) $noUpdateList .= ', '; - } - } - - $wpdb->query( $wpdb->prepare( "UPDATE $table_name SET onoroff = '%s' WHERE name = '%s'", $noUpdateList, $db_table ) ); - echo '

'.__( 'Succes', 'companion-auto-update' ).' – '.sprintf( esc_html__( '%1$s %2$s have been added to the no-update-list', 'companion-auto-update' ), $noUpdateCount, strtolower( $filter_name ) ).'.

'; -} - - -// Reset list -if( isset( $_POST['reset'] ) ) { - - check_admin_referer( 'cau_save_pluginlist' ); - - $wpdb->query( $wpdb->prepare( "UPDATE $table_name SET onoroff = '%s' WHERE name = %s", "", $db_table ) ); - echo '

'.__( 'Succes', 'companion-auto-update' ).' – '.sprintf( esc_html__( 'The no-update-list has been reset, all %s will be auto-updated from now on', 'companion-auto-update' ), strtolower( $filter_name ) ).'.

'; -} - - -?> - -
- -
- - -
- - - - - - - - - - - - - - $value ) { - - $slug = $key; - $explosion = explode( '/', $slug ); - $actualSlug = array_shift( $explosion ); - $slug_hash = md5( $slug[0] ); - - if( $filter == 'themes' ) { - - $theme = wp_get_theme( $actualSlug ); - $name = $theme->get( 'Name' ); - $description = $theme->get( 'Description' ); - - } else { - - foreach ( $value as $k => $v ) { - - if( $k == "Name" ) $name = $v; - if( $k == "Description" ) $description = $v; - - } - - } - - if( in_array( $actualSlug, donotupdatelist( $filter ) ) ) { - - $class = 'inactive'; - $checked = 'CHECKED'; - $statusicon = 'no'; - $statusName = 'disabled'; - - } else { - - $class = 'active'; - $checked = ''; - $statusicon = 'yes'; - $statusName = 'enabled'; - } - - echo ' - - - - - - - - - - '; - - } - ?> - - -
 
- - -
-
-

'. $name .'

- '.$actualSlug.' -
-

'.__( 'Auto Updater', 'companion-auto-update' ).':

-
-

'.$description.'

-
- - - -
- - -
- -
\ No newline at end of file diff --git a/wp-content/upgrade-temp-backup/plugins/companion-auto-update/admin/rollback.php b/wp-content/upgrade-temp-backup/plugins/companion-auto-update/admin/rollback.php deleted file mode 100644 index c0325af9..00000000 --- a/wp-content/upgrade-temp-backup/plugins/companion-auto-update/admin/rollback.php +++ /dev/null @@ -1,2 +0,0 @@ -prefix . "auto_updates"; - $schedules = wp_get_schedules(); - $interval_names = cau_wp_get_schedules(); - - // Update the database - if( isset( $_GET['run'] ) && $_GET['run'] == 'db_update' ) { - cau_manual_update(); - echo '

'.__( 'Database update completed' ).'

'; - } - - if( isset( $_GET['run'] ) && $_GET['run'] == 'db_info_update' ) { - cau_savePluginInformation(); - echo '

'.__( 'Database information update completed' ).'

'; - } - - if( isset( $_GET['ignore_report'] ) ) { - - $report_to_ignore = sanitize_text_field( $_GET['ignore_report'] ); - $allowedValues = array( 'seo', 'cron' ); - - if( !in_array( $report_to_ignore, $allowedValues ) ) { - - wp_die( 'Trying to cheat eh?' ); - - } else { - - $table_name = $wpdb->prefix . "auto_updates"; - $wpdb->query( $wpdb->prepare( "UPDATE {$table_name} SET onoroff = %s WHERE name = 'ignore_$report_to_ignore'", 'yes' ) ); - $__ignored = __( 'This report will now be ignored', 'companion-auto-update' ); - echo "

$__ignored

"; - - } - - } - -?> - - - -
- - array( - 'name' => __( 'Events', 'companion-auto-update' ), - 'fields' => array( - 'plugins' => __( 'Plugins', 'companion-auto-update' ), - 'themes' => __( 'Themes', 'companion-auto-update' ), - 'minor' => __( 'Core (Minor)', 'companion-auto-update' ), - 'major' => __( 'Core (Major)', 'companion-auto-update' ), - 'send' => __( 'Update available', 'companion-auto-update' ), - 'sendupdate' => __( 'Successful update', 'companion-auto-update' ), - 'wpemails' => __( 'Core notifications', 'companion-auto-update' ), - 'update_delay' => __( 'Log updater', 'companion-auto-update' ), - ), - 'values' => array( - 'plugins' => 'wp_update_plugins', - 'themes' => 'wp_update_themes', - 'minor' => 'wp_version_check', - 'major' => 'wp_version_check', - 'send' => 'cau_set_schedule_mail', - 'sendupdate' => 'cau_set_schedule_mail', - 'wpemails' => 'cau_set_schedule_mail', - 'update_delay' => 'cau_log_updater', - ), - 'explain' => array( - 'plugins' => __('Auto update plugins?', 'companion-auto-update'), - 'themes' => __('Auto update themes?', 'companion-auto-update'), - 'minor' => __('Auto update minor core updates?', 'companion-auto-update'), - 'major' => __('Auto update major core updates?', 'companion-auto-update'), - 'send' => __( 'Will notify you of available updates.', 'companion-auto-update' ), - 'sendupdate' => __( 'Will notify you after successful updates.', 'companion-auto-update' ), - 'wpemails' => __( 'The default WordPress notifications.', 'companion-auto-update' ), - 'update_delay' => __( 'Will keep track of the update log and make sure updates are delayed when needed.', 'companion-auto-update' ), - ) - ), - ); - - $__sta = __( 'Status', 'companion-auto-update' ); - $__int = __( 'Interval', 'companion-auto-update' ); - $__nxt = __( 'Next', 'companion-auto-update' ); - - foreach( $events as $event => $info ) { - - echo " - - - - - - - - - - - "; - - foreach ( $info['fields'] as $key => $value ) { - - $is_on = ( cau_get_db_value( $key ) == 'on' && wp_get_schedule( $info['values'][$key] ) ) ? true : false; - $__status = $is_on ? 'enabled' : 'warning'; - $__icon = $is_on ? 'yes-alt' : 'marker'; - $__text = $is_on ? __( 'Enabled', 'companion-auto-update' ) : __( 'Disabled', 'companion-auto-update' ); - $__interval = $is_on ? $interval_names[wp_get_schedule( $info['values'][$key] )] : '‐'; - $__next = $is_on ? date_i18n( $dateFormat, wp_next_scheduled( $info['values'][$key] ) ) : '‐'; - $__exp = !empty( $info['explain'][$key] ) ? '
'.$info['explain'][$key].'' : ''; - $__nxt = __( 'Next', 'companion-auto-update' ); - - echo " - - - - - - "; - - } - - echo " - -
{$info['name']}{$__sta}{$__int}{$__nxt}
$value$__exp$__text$__interval$__nxt: $__next
"; - - } - - ?> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $__text"; - } else { - $__text = __( 'Disabled', 'companion-auto-update' ); - echo ""; - } - ?> - - - - > - - - - - - - - - - - - > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - -
-
$__text
- - - - - -
DISABLE_WP_CRON true - - -
wp_version_check
VCS'>
- - - - - - - - - - - - - - - - - - - > - - - - - - - - > - - - - - - - - - - - - - - - - - -
WordPress
PHP (Required: 5.1.0 or up)
Database (Latest: )
(GMT ) -
- - - - - - - - - - - - $value ) { - if( is_plugin_active( $key ) ) { - echo ' - - - - '; - } - } - - ?> - - -
'.$key.''.$value.''.__( 'How to fix this', 'companion-auto-update' ).'
- - - - - - - - - - - - - - - - - - -
-
- -
- - - - - - - - - - - - - - - prefix}update_log"; - $put_on_hold = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM {$updateLog} WHERE put_on_hold <> '%s'", '0' ) ); - - foreach ( $put_on_hold as $plugin ) { - - $__name = $plugin->slug; - $__poh = $plugin->put_on_hold; - $__udd = ( cau_get_db_value( 'update_delay_days' ) != '' ) ? cau_get_db_value( 'update_delay_days' ) : '2'; - $__date = date_i18n( $dateFormat, strtotime( "+".$__udd." days", $__poh ) ); - - echo " - - - "; - } - - echo empty( $put_on_hold ) ? "" : ""; - - ?> - - -
{$__name}{$__date}
".__( 'No plugins have been put on hold.', 'companion-auto-update' )."
- -
- - $string ) { - - if( strpos( file_get_contents( $conFile ), $string ) !== false) { - $contents = file_get_contents( $conFile ); - $contents = str_replace( $string, $revLine, $contents ); - file_put_contents( $conFile, $contents ); - $melding = __( "We've fixed the error for you", 'companion-auto-update' ).' :)'; - $meldingS = 'updated'; - } - - } - - echo "

$melding

"; - -} diff --git a/wp-content/upgrade-temp-backup/plugins/companion-auto-update/backend/images/check.svg b/wp-content/upgrade-temp-backup/plugins/companion-auto-update/backend/images/check.svg deleted file mode 100644 index 10065cf4..00000000 --- a/wp-content/upgrade-temp-backup/plugins/companion-auto-update/backend/images/check.svg +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - image/svg+xml - - - - - - - - diff --git a/wp-content/upgrade-temp-backup/plugins/companion-auto-update/backend/images/email.svg b/wp-content/upgrade-temp-backup/plugins/companion-auto-update/backend/images/email.svg deleted file mode 100644 index 278ffd98..00000000 --- a/wp-content/upgrade-temp-backup/plugins/companion-auto-update/backend/images/email.svg +++ /dev/null @@ -1,96 +0,0 @@ - - - -image/svg+xml \ No newline at end of file diff --git a/wp-content/upgrade-temp-backup/plugins/companion-auto-update/backend/images/help.svg b/wp-content/upgrade-temp-backup/plugins/companion-auto-update/backend/images/help.svg deleted file mode 100644 index b10cc782..00000000 --- a/wp-content/upgrade-temp-backup/plugins/companion-auto-update/backend/images/help.svg +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - image/svg+xml - - - - - - - - - - diff --git a/wp-content/upgrade-temp-backup/plugins/companion-auto-update/backend/images/interval.svg b/wp-content/upgrade-temp-backup/plugins/companion-auto-update/backend/images/interval.svg deleted file mode 100644 index 2219c00f..00000000 --- a/wp-content/upgrade-temp-backup/plugins/companion-auto-update/backend/images/interval.svg +++ /dev/null @@ -1,69 +0,0 @@ - - - -image/svg+xml \ No newline at end of file diff --git a/wp-content/upgrade-temp-backup/plugins/companion-auto-update/backend/images/love.svg b/wp-content/upgrade-temp-backup/plugins/companion-auto-update/backend/images/love.svg deleted file mode 100644 index 8b341634..00000000 --- a/wp-content/upgrade-temp-backup/plugins/companion-auto-update/backend/images/love.svg +++ /dev/null @@ -1,116 +0,0 @@ - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/wp-content/upgrade-temp-backup/plugins/companion-auto-update/backend/images/settings.svg b/wp-content/upgrade-temp-backup/plugins/companion-auto-update/backend/images/settings.svg deleted file mode 100644 index 63020b4b..00000000 --- a/wp-content/upgrade-temp-backup/plugins/companion-auto-update/backend/images/settings.svg +++ /dev/null @@ -1,124 +0,0 @@ - - - -image/svg+xml \ No newline at end of file diff --git a/wp-content/upgrade-temp-backup/plugins/companion-auto-update/backend/images/support.svg b/wp-content/upgrade-temp-backup/plugins/companion-auto-update/backend/images/support.svg deleted file mode 100644 index 8750aa46..00000000 --- a/wp-content/upgrade-temp-backup/plugins/companion-auto-update/backend/images/support.svg +++ /dev/null @@ -1,102 +0,0 @@ - - - -image/svg+xml \ No newline at end of file diff --git a/wp-content/upgrade-temp-backup/plugins/companion-auto-update/backend/images/update.svg b/wp-content/upgrade-temp-backup/plugins/companion-auto-update/backend/images/update.svg deleted file mode 100644 index 059c5215..00000000 --- a/wp-content/upgrade-temp-backup/plugins/companion-auto-update/backend/images/update.svg +++ /dev/null @@ -1,91 +0,0 @@ - - - -image/svg+xml \ No newline at end of file diff --git a/wp-content/upgrade-temp-backup/plugins/companion-auto-update/backend/images/welcome.svg b/wp-content/upgrade-temp-backup/plugins/companion-auto-update/backend/images/welcome.svg deleted file mode 100644 index 77542371..00000000 --- a/wp-content/upgrade-temp-backup/plugins/companion-auto-update/backend/images/welcome.svg +++ /dev/null @@ -1,181 +0,0 @@ - - - -image/svg+xml \ No newline at end of file diff --git a/wp-content/upgrade-temp-backup/plugins/companion-auto-update/backend/style.css b/wp-content/upgrade-temp-backup/plugins/companion-auto-update/backend/style.css deleted file mode 100644 index 72e20a23..00000000 --- a/wp-content/upgrade-temp-backup/plugins/companion-auto-update/backend/style.css +++ /dev/null @@ -1,582 +0,0 @@ -/* Default Stylings */ -.nowrap { - white-space: nowrap; -} -.cau_spacing { - height: 25px; -} -.cau_support_buttons { - display: inline-block; -} - -/* Welcome screen */ -.welcome-to-cau { - background: #FFF; - border: 1px solid #CCD0D4; - margin: 25px 0; - padding: 30px; - background-size: 140px; - background-position: left bottom; - background-repeat: no-repeat; - box-shadow: 0 1px 1px rgba(0,0,0,.04); -} -.welcome-to-cau .welcome-image { - display: inline-block; - vertical-align: middle; - width: 100px; - height: 100px; - background-image: url('images/welcome.svg'); - background-size: contain; - background-position: center; - box-sizing: border-box; -} -.welcome-to-cau .welcome-content { - display: inline-block; - vertical-align: middle; - width: calc(100% - 100px); - padding-left: 25px; - box-sizing: border-box; -} -.welcome-to-cau .welcome-content strong { - color: #000; -} -.welcome-to-cau .welcome-content p { - margin: 2px 0; -} -.welcome-to-cau.help-bg { - background-image: url('images/help.svg'); -} -.welcome-to-cau.support-bg { - background-image: url('images/support.svg'); -} -.welcome-to-cau.love-bg { - background-image: url('images/love.svg'); -} -.welcome-to-cau.update-bg { - background-image: url('images/update.svg'); -} -.welcome-to-cau.email-bg { - background-image: url('images/email.svg'); -} -.welcome-to-cau.interval-bg { - background-image: url('images/interval.svg'); -} -.welcome-to-cau.advanced-bg { - background-image: url('images/settings.svg'); -} -.welcome-to-cau h2 { - margin: 0; - margin-bottom: 25px; - font-size: 21px; - font-weight: 400; - line-height: 1.2; -} -.welcome-to-cau h2.title { - margin-bottom: 10px; -} -.welcome-to-cau h3 { - font-size: 16px; - margin-top: 0; -} -.welcome-to-cau a { - text-decoration: none; -} -.welcome-to-cau .welcome-column { - display: inline-block; - vertical-align: top; - box-sizing: border-box; -} -.welcome-to-cau.cau-show-love .welcome-column { - vertical-align: middle; -} -.welcome-to-cau .welcome-column.welcome-column-first { - display: block; - width: 100%; -} -.first-column { - padding-left: 140px; -} -.welcome-to-cau .welcome-column.welcome-column-half { - width: 50%; -} -.welcome-to-cau .welcome-column.welcome-column-third { - width: 33%; -} -.welcome-to-cau .welcome-column.welcome-column-quarter { - width: 25%; -} -.welcome-to-cau a.minimal-button { - display: inline-block; - padding: 5px; -} -select.schedule_interval { - max-width: 90%; - width: 225px; -} -.cau_save_button.fixed_button { - background: #FFF; - box-sizing: border-box; - position: fixed; - width: 100%; - right: 0; - bottom: 0; - margin-left: -25px; - z-index: 1001; - padding: 5px; - box-shadow: 0 -8px 16px 0 rgb(85 93 102 / 30%); -} -.cau_save_button.fixed_button p.submit { - display: block; - text-align: center; - font-weight: bold; - margin: 0; - padding: 0; -} -.cau_save_button.fixed_button p.submit input { - width: 100%; - max-width: 250px; - height: 100%; - padding: 5px; -} -.cau_save_button__space { - height: 75px; -} - -/* Overwrite core UI */ -/*.cau_content input[type="checkbox"]:checked::before { - content: ""; - background: url( 'images/check.svg' ); - background-size: contain; - background-position: center center; -}*/ -.cau_content a { - color: #9178B7; -} -.cau_content a.nav-tab { - color: #23282D; -} -.cau_content .button-primary { - background-color: #9178B7!important; - border-color: #9178B7!important; -} -.cau_content .button-alt { - color: #9178B7!important; - border-color: #9178B7!important; -} -.cau_content .button-hero { - font-weight: 500; - padding: 2px 15px!important; -} -#message.cau { - background: #FFF; - border: 1px solid #CCD0D4; - border-left-width: 4px; - border-left-color: #9178B7; - box-shadow: 0 1px 1px rgba(0,0,0,.04); - margin: 25px 0px 5px 0; - padding: 15px; -} -#message.cau a, #message.cau strong { - color: #9178B7; -} - -/* Dashboard */ -.cau-column-wide { - box-sizing: border-box; - display: inline-block; - vertical-align: top; - width: calc(100% - 450px); - padding-right: 25px; -} -.cau-column-small { - display: inline-block; - vertical-align: top; - width: 450px; -} -.cau-dashboard-box { - background-position: right bottom; -} -.cau-column-wide .cau-dashboard-box { - padding-right: 125px; -} -.cau-dashboard-box a { - margin-left: 0px; - margin-top: 10px; -} -.cau-dashboard-box .welcome-column { - padding-right: 25px; -} -.support-sidebar-list { - margin-bottom: 25px; -} -.cau_content .nav-tab { - position: relative; -} -.cau_content .nav-tab .cau_melding { - display: inline-block; - width: 11px; - height: 11px; - border-radius: 10px; - margin-left: 5px; - position: relative; - bottom: -1px; -} -.cau_content .nav-tab .cau_melding.level-okay { - background: #7AD03A; -} -.cau_content .nav-tab .cau_melding.level-low { - background: #FFBA00; -} -.cau_content .nav-tab .cau_melding.level-high { - background: #FF0000; -} - -/* Table Styling */ -.cau_content .widefat td { - vertical-align: middle!important; -} -table.autoupdate th.head-plugin { - min-width: 250px; -} -table.autoupdate th.head-status { - min-width: 150px; -} -table.autoupdate th.check-column { - position: relative; - min-width: 55px; -} -table.autoupdate tr.inactive { - background: #FEF7F1; -} -table.autoupdate tr.active .check-column { - border-left: 3px solid transparent; -} -table.autoupdate tr.inactive .check-column { - border-left: 3px solid #D54E21; -} -table.autoupdate tr.inactive td.column-status p { - color: #BF3D3C; -} -table.autoupdate tr.active td.column-status p { - color: #000; -} -table.autoupdate tr td.column-description p { - overflow: hidden; - max-height: 18px; -} - -/* Update Log */ -table.autoupdatelog { - margin-top: 25px; -} -table.autoupdatelog strong { - color: #000; -} -table.autoupdatelog .dashicons { - color: #00A0D2; -} - -/* Status */ -table.cau_status_list { - margin-top: 25px; -} -table.cau_status_list:not(.no_column_width) th, table.cau_status_list:not(.no_column_width) td { - width: 25%; -} -.cau_enabled { - color: #7AD03A; -} -.cau_disabled { - color: #FF0000; -} -.cau_warning { - color: #FFBA00; -} -.cau_mobile_prefix { - display: none; -} -table.cau_status_list .cau_status_icon { - width: 50px!important; -} -table.cau_status_list .cau_status_icon .dashicons, table.cau_status_list .cau_status_icon .dashicons-before:before { - height: 25px; - font-size: 2em; -} - -/* Rollback list */ -table.rollbacklist { - max-width: 650px; -} -table.rollbacklist td { - vertical-align: middle; -} -table.rollbacklist td a.versionselectbutton { - display: inline-block; - width: 100px; - text-align: center; -} - -/* Plugin list */ -.pluginListButtons { - display: block; - padding: 15px 0; -} -.pluginListButtons p.submit { - display: inline-block; - margin: 0!important; - padding: 0!important; -} -.cau_content #the-list input[type="checkbox"]:not(:checked), .cau_content #the-list input[type="checkbox"]:checked { - width: 45px; - height: 45px; - position: absolute; - top: 0; - bottom: 0; - z-index: 100; - display: block; - opacity: 0; -} -.cau_content #the-list input[type="checkbox"]:not(:checked) + label, .cau_content #the-list input[type="checkbox"]:checked + label { - position: absolute; - top: 15px; - left: 12px; - cursor: pointer; -} -.cau_content #the-list input[type="checkbox"]:not(:checked) + label:before, .cau_content #the-list input[type="checkbox"]:checked + label:before, .cau_content #the-list input[type="checkbox"]:not(:checked) + label:after, .cau_content #the-list input[type="checkbox"]:checked + label:after { - content: ''; - position: absolute; -} -.cau_content #the-list input[type="checkbox"]:not(:checked) + label:before, .cau_content #the-list input[type="checkbox"]:checked + label:before { - left: 0; - top: -3px; - width: 30px; - height: 16px; - background: transparent; - border: 2px solid #9178B7; - border-radius: 15px; - transition: background-color .2s; -} -.cau_content #the-list input[type="checkbox"]:not(:checked) + label:after, .cau_content #the-list input[type="checkbox"]:checked + label:after { - width: 8px; - height: 8px; - transition: all .2s; - border-radius: 500px; - background: transparent; - border: 2px solid #9178B7; - top: 1px; - left: 5px; -} -.cau_content #the-list input[type="checkbox"]:not(:checked) + label:before { - background: #9178B7; - border: 2px solid #9178B7; -} -.cau_content #the-list input[type="checkbox"]:not(:checked) + label:after { - background: #9178B7; - border-color: #FFF; - left: 18px; -} - -/* Scheduling */ -.cau_schedule_input { - display: inline-block; - vertical-align: middle; - width: 50px; - padding-top: 5px; -} -.cau_schedule_input input { - max-width: 100%; - text-align: center; -} -.cau_schedule_input_div { - display: inline-block; - vertical-align: middle; - padding: 0 6px; - font-weight: bold; -} -.cau_shedule_notation { - display: inline-block; - vertical-align: middle; - width: 125px; - padding-left: 5px; -} -.cau_shedule_notation .dashicons { - position: relative; - bottom: -5px; -} - -/* Tooltip */ -.cau_tooltip { - position: relative; -} -.cau_tooltip .cau_tooltip_text { - visibility: hidden; - background-color: rgba(0,0,0,0.7); - color: #FFF; - text-align: left; - font-size: 14px; - padding: 15px; - border-radius: 6px; - position: absolute; - z-index: 1; - width: 240px; - bottom: 100%; - left: 50%; - margin-left: -60px; - margin-bottom: 10px; - opacity: 0; - transition: .3s; - font-weight: normal; -} -.cau_tooltip:hover .cau_tooltip_text { - visibility: visible; - opacity: 1; -} -.cau_tooltip .cau_tooltip_text::after { - content: " "; - position: absolute; - top: 100%; - left: 50%; - margin-left: -75px; - border-width: 5px; - border-style: solid; - border-color: rgba(0,0,0,0.7) transparent transparent transparent; -} - -/* Responsive */ -@media screen and (max-width: 1400px) { - - .cau-column-wide { - width: calc(100% - 350px); - } - .cau-column-small { - width: 350px; - } - .welcome-to-cau .welcome-column.welcome-column-quarter { - width: 50%; - padding-bottom: 35px; - } - .cau-column-small .welcome-to-cau { - background-image: none; - } - -} -@media screen and (max-width: 1150px) { - - .cau-column-wide, .cau-column-small { - width: 100%; - padding: 0; - } - -} -@media screen and (max-width: 1000px) { - - /* Basics */ - .cau_hide_on_mobile, table.autoupdate thead { - display: none!important; - } - .form-table td fieldset p { - display: block; - padding: 5px 0; - } - .form-table td fieldset input[type="checkbox"] { - display: inline-block; - vertical-align: middle; - width: 25px; - } - .form-table td fieldset label { - display: inline-block; - vertical-align: middle; - width: calc(100% - 40px); - box-sizing: border-box; - padding-left: 5px; - } - .cau_content .nav-tab-wrapper { - position: relative; - top: -20px; - border-bottom: 1px solid #CCC!important; - padding-bottom: 15px!important; - margin-bottom: 0px!important; - } - .cau_content .nav-tab { - font-size: 12px; - margin: 5px 5px 0 0!important; - box-sizing: border-box; - text-align: center; - } - - /* Scheduling */ - .cau_schedule_input { - width: 75px; - } - - /* Custom buttons */ - .cau-button { - display: block; - text-align: center; - margin: 5px 0; - } - .cau-button .dashicons { - float: left; - } - - /* Dashboard */ - .welcome-to-cau { - background-position: right bottom; - } - .welcome-to-cau.love-bg { - background-image: none; - } - .welcome-to-cau .welcome-column { - min-width: 100%; - } - .welcome-to-cau .welcome-column.welcome-column-first { - padding-left: 0px; - } - .cau-column-wide .cau-dashboard-box { - padding-right: 30px; - padding-bottom: 125px - } - .majorMinorExplain { - display: none; - } - - /* Status */ - table.cau_status_list .cau_status_name { - display: inline-block; - width: 50%; - box-sizing: border-box; - font-weight: 500; - } - table.cau_status_list .cau_status_interval { - display: none; - } - table.cau_status_list th.cau_status_next { - display: none; - } - table.cau_status_list td.cau_status_next { - display: block; - width: 100%; - } - table.cau_status_list .cau_status_active_state { - display: inline-block; - width: 50%; - box-sizing: border-box; - text-align: right; - } - .cau_mobile_prefix { - display: inline-block; - padding-right: 5px; - } - table.cau_status_list.cau_status_warnings td { - display: block; - width: 100%; - box-sizing: border-box; - } - table.cau_status_list.cau_status_warnings th.cau_plugin_issue_explain, table.cau_status_list.cau_status_warnings th.cau_plugin_issue_fixit { - display: none; - } - table.cau_status_list.cau_status_warnings td.cau_plugin_issue_name { - font-weight: 500; - } - -} \ No newline at end of file diff --git a/wp-content/upgrade-temp-backup/plugins/companion-auto-update/backend/warningbar.css b/wp-content/upgrade-temp-backup/plugins/companion-auto-update/backend/warningbar.css deleted file mode 100644 index 88e62556..00000000 --- a/wp-content/upgrade-temp-backup/plugins/companion-auto-update/backend/warningbar.css +++ /dev/null @@ -1,11 +0,0 @@ -#wpadminbar #wp-admin-bar-cau-has-issues .ab-icon:before { - /*content: "\f463";*/ - content: "\f332"; - top: 3px; -} -#wpadminbar #wp-admin-bar-cau-has-issues .cau-level-low { - /*color: #FFBA00;*/ -} -#wpadminbar #wp-admin-bar-cau-has-issues .cau-level-high { - color: #FF0000; -} \ No newline at end of file diff --git a/wp-content/upgrade-temp-backup/plugins/companion-auto-update/cau_emails.php b/wp-content/upgrade-temp-backup/plugins/companion-auto-update/cau_emails.php deleted file mode 100644 index 082458fc..00000000 --- a/wp-content/upgrade-temp-backup/plugins/companion-auto-update/cau_emails.php +++ /dev/null @@ -1,526 +0,0 @@ - $version ) { - if( $version == '' ) $version = __( "Unknown", "companion-auto-update" ); - $text .= "- ".sprintf( esc_html__( "%s tested up to: %s", "companion-auto-update" ), $plugin, $version )."\n"; - } - - } - - return $text; - -} - -// Set the content for the emails about pending updates -function cau_pending_message( $single, $plural, $list ) { - - // What markup to use - if( cau_is_html() ) $break = '
'; - else $break = "\n"; - - // Base text - $text = sprintf( esc_html__( 'You have pending %1$s updates on your WordPress site at %2$s.', 'companion-auto-update' ), $single, get_site_url() ); - $text .= $break; - - if( !empty( $list ) ) { - - $text .= $break; - $text .= sprintf( esc_html__( 'The following %1$s have new versions available.', 'companion-auto-update' ), $plural ); - $text .= $break; - - if( cau_is_html() ) $text .= "
    "; - foreach ( $list as $key => $value ) { - if( cau_is_html() ) { - $text .= "
  1. $value
  2. "; - } else { - $text .= "-$value\n"; - } - } - if( cau_is_html() ) $text .= "
"; - - $text .= $break; - } - - $text .= __( 'Leaving your site outdated is a security risk so please consider manually updating them.', 'companion-auto-update' ); - $text .= $break; - - // End - $text .= sprintf( esc_html__( 'Head over to %1$s and check the ones you want to update.', 'companion-auto-update' ), get_admin_url().'update-core.php' ); - - return $text; - -} - -// Set the content for the emails about recent updates -function cau_updated_message( $type, $updatedList ) { - - // What markup to use - if( cau_is_html() ) $break = '
'; - else $break = "\n"; - - // The message - $text = sprintf( esc_html__( - 'One or more %1$s on your WordPress site at %2$s have been updated by Companion Auto Update. No further action is needed on your part. -For more info on what is new visit your dashboard and check the changelog.', 'companion-auto-update' - ), $type, get_site_url() ); - - $text .= $break; - $text .= $break; - $text .= sprintf( esc_html__( - 'The following %1$s have been updated:', 'companion-auto-update' - ), $type ); - - $text .= $break; - $text .= $updatedList; - - $text .= $break; - $text .= __( "(You'll also receive this email if you manually updated a plugin or theme)", "companion-auto-update" ); - - return $text; - -} - -// Checks if plugins are out of date -function cau_list_outdated_software() { - - // Check if cau_get_db_value() function exists. - if ( !function_exists( 'cau_get_db_value' ) ) require_once( plugin_dir_path( __FILE__ ) . 'cau_function.php' ); - - // Set up mail - $subject = '['.get_bloginfo( 'name' ).'] ' . __( 'You have outdated plugins on your site.', 'companion-auto-update' ); - $type = __( 'plugin', 'companion-auto-update' ); - $type_plural = __( 'plugins', 'companion-auto-update' ); - $message = cau_outdated_message( $type, $type_plural, cau_list_outdated() ); - - // Send to all addresses - foreach ( cau_set_email() as $key => $value ) { - foreach ( $value as $k => $v ) { - wp_mail( $v, $subject, $message ); - } - break; - } - -} - -// Checks if theme updates are available -function cau_list_theme_updates() { - - global $wpdb; - $table_name = $wpdb->prefix . "auto_updates"; - - $configs = $wpdb->get_results( "SELECT * FROM $table_name WHERE name = 'themes'"); - foreach ( $configs as $config ) { - - if( $config->onoroff != 'on' ) { - - // Check for required files - if ( !function_exists( 'get_theme_updates' ) ) { - require_once ABSPATH . 'wp-admin/includes/update.php'; - } - - // Begin - $themes = get_theme_updates(); - $list = array(); - - if ( !empty( $themes ) ) { - - foreach ( $themes as $stylesheet => $theme ) { - array_push( $list, $theme->get( 'Name' ) ); - } - - $subject = '[' . get_bloginfo( 'name' ) . '] ' . __( 'Theme update available.', 'companion-auto-update' ); - $type = __('theme', 'companion-auto-update'); - $type_plural = __('themes', 'companion-auto-update'); - $message = cau_pending_message( $type, $type_plural, $list ); - - foreach ( cau_set_email() as $key => $value) { - foreach ($value as $k => $v) { - wp_mail( $v, $subject, $message ); - } - break; - } - } - - } - - } - -} - -// Checks if plugin updates are available -function cau_list_plugin_updates() { - - global $wpdb; - $table_name = $wpdb->prefix . "auto_updates"; - - $configs = $wpdb->get_results( "SELECT * FROM $table_name WHERE name = 'plugins'"); - foreach ( $configs as $config ) { - - if( $config->onoroff != 'on' ) { - - require_once ABSPATH . 'wp-admin/includes/plugin-install.php'; - - // Make sure get_plugin_updates() and get_plugins() are defined - if ( !function_exists( 'get_plugin_updates' ) OR !function_exists( 'get_plugins' ) ) { - require_once ABSPATH . 'wp-admin/includes/plugin.php'; - require_once ABSPATH . 'wp-admin/includes/update.php'; - } - - // Begin - $plugins = get_plugin_updates(); - - if ( !empty( $plugins ) ) { - - $list = array(); - foreach ( (array) $plugins as $plugin_file => $plugin_data ) { - $plugin_data = (object) _get_plugin_data_markup_translate( $plugin_file, (array) $plugin_data, false, true ); - $name = $plugin_data->Name; - array_push( $list, $name ); - } - - $subject = '[' . get_bloginfo( 'name' ) . '] ' . __( 'Plugin update available.', 'companion-auto-update' ); - $type = __( 'plugin', 'companion-auto-update' ); - $type_plural = __( 'plugins', 'companion-auto-update' ); - $message = cau_pending_message( $type, $type_plural, $list ); - - foreach ( cau_set_email() as $key => $value) { - foreach ($value as $k => $v) { - wp_mail( $v, $subject, $message ); - } - break; - } - } - - } - - } -} - -// Alerts when plugin has been updated -function cau_plugin_updated() { - - // Check if cau_get_db_value() function exists. - if ( !function_exists( 'cau_get_db_value' ) ) require_once( plugin_dir_path( __FILE__ ) . 'cau_function.php' ); - - // Set the correct timezone for emails - date_default_timezone_set( cau_get_proper_timezone() ); - - // Create arrays - $pluginNames = array(); - $pluginDates = array(); - $pluginVersion = array(); - $pluginSlug = array(); - $pluginTimes = array(); - $themeNames = array(); - $themeDates = array(); - $themeTimes = array(); - - // Where to look for plugins - $plugdir = plugin_dir_path( __DIR__ ); - if ( !function_exists( 'get_plugins' ) ) require_once( ABSPATH . 'wp-admin/includes/plugin.php' ); // Check if get_plugins() function exists. - $allPlugins = get_plugins(); - - // Where to look for themes - $themedir = get_theme_root(); - $allThemes = wp_get_themes(); - - // Mail schedule - $schedule_mail = wp_get_schedule( 'cau_set_schedule_mail' ); - - // Loop trough all plugins - foreach ( $allPlugins as $key => $value ) { - - // Get plugin data - $fullPath = $plugdir.'/'.$key; - $getFile = $path_parts = pathinfo( $fullPath ); - $pluginData = get_plugin_data( $fullPath ); - - // Get the slug - $explosion = explode( '/', $key ); - $actualSlug = array_shift( $explosion ); - - // Get last update date - $fileDate = date ( 'YmdHi', filemtime( $fullPath ) ); - - switch ( $schedule_mail ) { - case 'hourly': - $lastday = date( 'YmdHi', strtotime( '-1 hour', time() ) ); - break; - case 'twicedaily': - $lastday = date( 'YmdHi', strtotime( '-12 hours', time() ) ); - break; - default: - $lastday = date( 'YmdHi', strtotime( '-1 day', time() ) ); - break; - } - - $dateFormat = get_option( 'date_format' ); - $timestamp = date_i18n( $dateFormat, filemtime( $fullPath ) ); - $timestamp .= ' - '.date( 'H:i', filemtime( $fullPath ) ); - - if( $fileDate >= $lastday ) { - - // Get plugin name - foreach ( $pluginData as $dataKey => $dataValue ) { - if( $dataKey == 'Name') { - array_push( $pluginNames , $dataValue ); - } - if( $dataKey == 'Version') { - array_push( $pluginVersion , $dataValue ); - } - } - - array_push( $pluginDates, $fileDate ); - array_push( $pluginSlug, $actualSlug ); - array_push( $pluginTimes, $timestamp ); - } - - } - - // Loop trough all themes - foreach ( $allThemes as $key => $value ) { - - // Get theme data - $fullPath = $themedir.'/'.$key; - $getFile = $path_parts = pathinfo( $fullPath ); - - // Get last update date - $dateFormat = get_option( 'date_format' ); - $fileDate = date ( 'YmdHi', filemtime( $fullPath ) ); - - if( $schedule_mail == 'hourly' ) { - $lastday = date( 'YmdHi', strtotime( '-1 hour', time() ) ); - } elseif( $schedule_mail == 'twicedaily' ) { - $lastday = date( 'YmdHi', strtotime( '-12 hours', time() ) ); - } elseif( $schedule_mail == 'daily' ) { - $lastday = date( 'YmdHi', strtotime( '-1 day', time() ) ); - } - - $dateFormat = get_option( 'date_format' ); - $timestamp = date_i18n( $dateFormat, filemtime( $fullPath ) ); - $timestamp .= ' - '.date( 'H:i', filemtime( $fullPath ) ); - - if( $fileDate >= $lastday ) { - array_push( $themeNames, $path_parts['filename'] ); - array_push( $themeDates, $fileDate ); - array_push( $themeTimes, $timestamp ); - } - - } - - $totalNumP = 0; - $totalNumT = 0; - $updatedListP = ''; - $updatedListT = ''; - - if( cau_get_db_value( 'html_or_text' ) == 'html' ) { - $updatedListP .= '
    '; - $updatedListT .= '
      '; - } - - foreach ( $pluginDates as $key => $value ) { - - // Set up some var - $plugin_name = $pluginNames[$key]; - $plugin_slug = $pluginSlug[$key]; - $to_version = __( "to version", "companion-auto-update" ).' '.$pluginVersion[$key]; - $more_info_arr = array( __( "Time of update", "companion-auto-update" ) => $pluginTimes[$key] ); - - // Plugin links - if( cau_get_db_value( 'plugin_links_emails' ) == 'on' ) { - $more_info_arr[__( "Plugin details", "companion-auto-update" )] = "".__( "Visit", "companion-auto-update" ).""; - $more_info_arr[__( "Release notes", "companion-auto-update" )] = "".__( "Visit", "companion-auto-update" ).""; - $more_info_arr[__( "Support", "companion-auto-update" )] = "".__( "Visit", "companion-auto-update" ).""; - } - - // Email format - $use_html = ( cau_get_db_value( 'html_or_text' ) == 'html' ) ? true : false; - - // Email content - $updatedListP .= $use_html ? "
    1. " : "-"; // Start row - - $updatedListP .= $use_html ? "{$plugin_name} " : "{$plugin_name} "; // Show plugin name - $updatedListP .= $to_version; // To version - - // Get advanced info - if( cau_get_db_value( 'advanced_info_emails' ) == 'on' ) { - foreach( $more_info_arr as $label => $value ) { - $updatedListP .= $use_html ? "
      {$label}: {$value}" : "\n{$label}: {$value}"; - } - } - - $updatedListP .= $use_html ? "
    2. " : "\n"; // End row - - $totalNumP++; - } - - foreach ( $themeNames as $key => $value ) { - - if( cau_get_db_value( 'html_or_text' ) == 'html' ) { - - $more_info = ''; - if( cau_get_db_value( 'advanced_info_emails' ) == 'on' ) $more_info = "
      ".__( "Time of update", "companion-auto-update" ).": ".$themeTimes[$key].""; - $updatedListT .= "
    3. ".$themeNames[$key]."".$more_info."
    4. "; - - } else { - $updatedListT .= "- ".$themeNames[$key]."\n"; - } - - $totalNumT++; - } - - if( cau_get_db_value( 'html_or_text' ) == 'html' ) { - $updatedListP .= '
    '; - $updatedListT .= '
'; - } - - // Set the email content type - if( cau_get_db_value( 'html_or_text' ) == 'html' ) { - function cau_mail_content_type() { - return 'text/html'; - } - add_filter( 'wp_mail_content_type', 'cau_mail_content_type' ); - } - - // If plugins have been updated, send email - if( $totalNumP > 0 ) { - - // E-mail content - $subject = '[' . get_bloginfo( 'name' ) . '] ' . __('One or more plugins have been updated.', 'companion-auto-update'); - $type = __('plugins', 'companion-auto-update'); - $message = cau_updated_message( $type, $updatedListP ); - - // Send to all addresses - foreach ( cau_set_email() as $key => $value) { - foreach ($value as $k => $v) { - wp_mail( $v, $subject, $message ); - } - break; - } - - } - - // If themes have been updated, send email - if( $totalNumT > 0 ) { - - // E-mail content - $subject = '[' . get_bloginfo( 'name' ) . '] ' . __('One or more themes have been updated.', 'companion-auto-update'); - $type = __('themes', 'companion-auto-update'); - $message = cau_updated_message( $type, $updatedListT ); - - // Send to all addresses - foreach ( cau_set_email() as $key => $value) { - foreach ($value as $k => $v) { - wp_mail( $v, $subject, $message ); - } - break; - } - - } - - if( cau_get_db_value( 'html_or_text' ) == 'html' ) remove_filter( 'wp_mail_content_type', 'cau_mail_content_type' ); - - // Prevent duplicate emails by setting the event again - if( $totalNumT > 0 OR $totalNumP > 0 ) { - if( $schedule_mail == 'hourly' ) { - wp_clear_scheduled_hook('cau_set_schedule_mail'); - wp_schedule_event( strtotime( '+1 hour', time() ) , 'hourly', 'cau_set_schedule_mail' ); - } - } - -} - -function cau_notify_outofdate_db() { - - // Check if cau_get_db_value() function exists. - if ( !function_exists( 'cau_get_db_value' ) ) require_once( plugin_dir_path( __FILE__ ) . 'cau_function.php' ); - - // Database requires an update - if ( cau_incorrectDatabaseVersion() ) { - - // Set up mail - $subject = '[' . get_bloginfo( 'name' ) . '] ' . __( 'We need your help with something', 'companion-auto-update' ); - $message = __( 'Hi there! We need your help updating the database of Companion Auto Update to the latest version. No rush, old features will continue to work but some new features might not work until you update the database.', 'companion-auto-update' ); - - // Send to all addresses - foreach ( cau_set_email() as $key => $value ) { - foreach ( $value as $k => $v ) { - wp_mail( $v, $subject, $message ); - } - break; - } - - } - -} diff --git a/wp-content/upgrade-temp-backup/plugins/companion-auto-update/cau_functions.php b/wp-content/upgrade-temp-backup/plugins/companion-auto-update/cau_functions.php deleted file mode 100644 index 7cc59d17..00000000 --- a/wp-content/upgrade-temp-backup/plugins/companion-auto-update/cau_functions.php +++ /dev/null @@ -1,1095 +0,0 @@ -prefix.'auto_updates'; - $cau_configs = $wpdb->get_results( "SELECT name, onoroff FROM {$table_name} WHERE name = 'allow_editor' OR name = 'allow_author'" ); - - foreach ( $cau_configs as $config ) { - if( $config->onoroff == 'on' ) $allowed_roles[] = str_replace( "allow_", "", $config->name ); - } - - return $allowed_roles; - -} - -// What user rights can edit plugin settings? TRUE/FALSE -function cau_allowed_user_rights() { - $user = wp_get_current_user(); // Current user - $allowed_roles = cau_allowed_user_rights_array(); // Allow roles - return array_intersect( $allowed_roles, $user->roles ) ? true : false; -} - -// Get database value -function cau_get_db_value( $name, $table = 'auto_updates' ) { - global $wpdb; - $table_name = $wpdb->prefix.$table; - $cau_configs = $wpdb->get_results( $wpdb->prepare( "SELECT onoroff FROM {$table_name} WHERE name = '%s'", $name ) ); - foreach ( $cau_configs as $config ) return $config->onoroff; -} - -// Get database value -function cau_get_plugininfo( $check, $field ) { - global $wpdb; - $table_name = $wpdb->prefix.'update_log'; - $cau_configs = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM {$table_name} WHERE slug = '%s'", $check ) ); - foreach ( $cau_configs as $config ) return $config->$field; -} - -// Get the set timezone -function cau_get_proper_timezone() { - return ( wp_timezone_string() == '+00:00' ) ? 'UTC' : wp_timezone_string(); -} - -// List of incompatible plugins -function cau_incompatiblePluginlist() { - - // Pluginlist, write as Plugin path => Issue - $pluginList = array( - 'better-wp-security/better-wp-security.php' => " May block auto-updating for everything.", - 'updraftplus/updraftplus.php' => " By default this plugin will not be auto-updated. You'll have to do this manually or enable auto-updating in the settings. Causes no issues with other plugins." - ); - - return $pluginList; - -} -function cau_incompatiblePlugins() { - - $return = false; - - foreach ( cau_incompatiblePluginlist() as $key => $value ) { - if( function_exists( 'is_plugin_active' ) && is_plugin_active( $key ) ) { - $return = true; - } - } - - return $return; - -} - -// Check if has issues -function cau_pluginHasIssues() { - return ( cau_pluginIssueCount() > 0 ) ? true : false; -} -function cau_pluginIssueLevels() { - return checkAutomaticUpdaterDisabled() ? 'high' : 'low'; -} -function cau_pluginIssueCount() { - - $count = 0; - - // blog_public check - if( get_option( 'blog_public' ) == 0 ) $count++; - - // checkAutomaticUpdaterDisabled - if( checkAutomaticUpdaterDisabled() ) $count++; - - // checkCronjobsDisabled - if( checkCronjobsDisabled() ) $count++; - - // cau_incorrectDatabaseVersion - if( cau_incorrectDatabaseVersion() ) $count++; - - // cau_incompatiblePlugins - if( cau_incompatiblePlugins() ) { - foreach ( cau_incompatiblePluginlist() as $key => $value ) { - if( function_exists( 'is_plugin_active' ) && is_plugin_active( $key ) ) { - $count++; - } - } - } - - return $count; -} -function cau_incorrectDatabaseVersion() { - return ( get_option( "cau_db_version" ) != cau_db_version() ) ? true : false; -} - -// Run custom hooks on plugin update -function cau_run_custom_hooks_p() { - - // Check if function exists - if ( ! function_exists( 'get_plugins' ) ) { - require_once ABSPATH . 'wp-admin/includes/plugin.php'; - } - - // Create array - $allDates = array(); - - // Where to look for plugins - $dirr = plugin_dir_path( __DIR__ ); - $listOfAll = get_plugins(); - - // Number of updates - $totalNum = 0; - - // Loop trough all plugins - foreach ( $listOfAll as $key => $value ) { - - // Get data - $fullPath = $dirr.'/'.$key; - $fileDate = date ( 'YmdHi', filemtime( $fullPath ) ); - $fileTime = date ( 'Hi', filemtime( $fullPath ) ); - $update_time = wp_next_scheduled( 'wp_update_plugins' ); - $range_start = date( 'Hi', strtotime( '-30 minutes', $update_time ) ); - $range_end = date( 'Hi', strtotime( '+30 minutes', $update_time ) ); - - // Check when the last update was - switch( wp_get_schedule( 'wp_update_plugins' ) ) { - case 'hourly': - $lastday = date( 'YmdHi', strtotime( '-1 hour', time() ) ); - break; - case 'twicedaily': - $lastday = date( 'YmdHi', strtotime( '-12 hour', time() ) ); - break; - case 'daily': - $lastday = date( 'YmdHi', strtotime( '-1 day', time() ) ); - break; - case 'weekly': - $lastday = date( 'YmdHi', strtotime( '-1 week', time() ) ); - break; - case 'monthly': - $lastday = date( 'YmdHi', strtotime( '-1 month', time() ) ); - break; - default: - $lastday = date( 'YmdHi', strtotime( '-1 hour', time() ) ); - break; - } - - if( $fileDate >= $lastday ) { - array_push( $allDates, $fileDate ); - $status = ( $fileTime > $range_start && $fileTime < $range_end ) ? __( 'Automatic', 'companion-auto-update' ) : __( 'Manual', 'companion-auto-update' ); - $totalNum++; - cau_updatePluginInformation( $key, $status ); - } - - } - - // If there have been plugin updates run hook - if( $totalNum >= 1 ) { - do_action( 'cau_after_plugin_update' ); - } - -} - -// Run custom hooks on theme update -function cau_run_custom_hooks_t() { - - $allDates = array(); - $totalNum = 0; - $dirr = get_theme_root(); - $listOfAll = wp_get_themes(); - - // Loop trough all plugins - foreach ( $listOfAll as $key => $value) { - - // Get data - $fullPath = $dirr.'/'.$key; - $fileDate = date ( 'YmdHi', filemtime( $fullPath ) ); - $fileTime = date ( 'Hi', filemtime( $fullPath ) ); - $update_time = wp_next_scheduled( 'wp_update_themes' ); - $range_start = date( 'Hi', strtotime( '-30 minutes', $update_time ) ); - $range_end = date( 'Hi', strtotime( '+30 minutes', $update_time ) ); - - // Check when the last update was - switch( wp_get_schedule( 'wp_update_themes' ) ) { - case 'hourly': - $lastday = date( 'YmdHi', strtotime( '-1 hour', time() ) ); - break; - case 'twicedaily': - $lastday = date( 'YmdHi', strtotime( '-12 hour', time() ) ); - break; - case 'daily': - $lastday = date( 'YmdHi', strtotime( '-1 day', time() ) ); - break; - case 'weekly': - $lastday = date( 'YmdHi', strtotime( '-1 week', time() ) ); - break; - case 'monthly': - $lastday = date( 'YmdHi', strtotime( '-1 month', time() ) ); - break; - default: - $lastday = date( 'YmdHi', strtotime( '-1 hour', time() ) ); - break; - } - - if( $fileDate >= $lastday ) { - array_push( $allDates, $fileDate ); - $status = ( $fileTime > $range_start && $fileTime < $range_end ) ? __( 'Automatic', 'companion-auto-update' ) : __( 'Manual', 'companion-auto-update' ); - $totalNum++; - cau_updatePluginInformation( $key, $status ); - } - - } - - // Count number of updated plugins - foreach ( $allDates as $key => $value ) $totalNum++; - - // If there have been plugin updates run hook - if( $totalNum > 0 ) { - do_action( 'cau_after_theme_update' ); - } - -} - -// Run custom hooks on core update -function cau_run_custom_hooks_c() { - - $totalNum = 0; - $fullPath = ABSPATH.'wp-includes/version.php'; - $fileDate = date ( 'YmdHi', filemtime( $fullPath ) ); - $update_time = wp_next_scheduled( 'wp_version_check' ); - $range_start = date( 'Hi', strtotime( '-30 minutes', $update_time ) ); - $range_end = date( 'Hi', strtotime( '+30 minutes', $update_time ) ); - - // Check when the last update was - switch( wp_get_schedule( 'wp_version_check' ) ) { - case 'hourly': - $lastday = date( 'YmdHi', strtotime( '-1 hour', time() ) ); - break; - case 'twicedaily': - $lastday = date( 'YmdHi', strtotime( '-12 hour', time() ) ); - break; - case 'daily': - $lastday = date( 'YmdHi', strtotime( '-1 day', time() ) ); - break; - case 'weekly': - $lastday = date( 'YmdHi', strtotime( '-1 week', time() ) ); - break; - case 'monthly': - $lastday = date( 'YmdHi', strtotime( '-1 month', time() ) ); - break; - default: - $lastday = date( 'YmdHi', strtotime( '-1 hour', time() ) ); - break; - } - - if( $fileDate >= $lastday ) { - $status = ( $fileTime > $range_start && $fileTime < $range_end ) ? __( 'Automatic', 'companion-auto-update' ) : __( 'Manual', 'companion-auto-update' ); - $totalNum++; - cau_updatePluginInformation( 'core', $status ); - } - - // If there have been plugin updates run hook - if( $totalNum > 0 ) { - do_action( 'cau_after_core_update' ); - } - -} - -// Check if automatic updating is disabled globally -function checkAutomaticUpdaterDisabled() { - - // I mean, I know this can be done waaaay better but I's quite late and I need to push a fix so take it or leave it untill I decide to fix this :) - if ( defined( 'automatic_updater_disabled' ) ) { - return ( doing_filter( 'automatic_updater_disabled' ) OR in_array( constant( 'automatic_updater_disabled' ), array( 'true', 'minor' ) ) ) ? true : false; - - } else if ( defined( 'AUTOMATIC_UPDATER_DISABLED' ) ) { - return ( doing_filter( 'AUTOMATIC_UPDATER_DISABLED' ) OR in_array( constant( 'AUTOMATIC_UPDATER_DISABLED' ), array( 'true', 'minor' ) ) ) ? true : false; - - } else { - return false; - } - -} - -// Check if cronjobs are disabled -function checkCronjobsDisabled() { - return ( defined( 'DISABLE_WP_CRON' ) && DISABLE_WP_CRON ) ? true : false; -} - -// Menu location -function cau_menloc( $after = '' ) { - return 'tools.php'.$after; -} -function cau_url( $tab = '' ) { - return admin_url( cau_menloc( '?page=cau-settings&tab='.$tab ) ); -} - -// Get the active tab -function active_tab( $page, $identifier = 'tab' ) { - echo _active_tab( $page, $identifier ); -} -function _active_tab( $page, $identifier = 'tab' ) { - $cur_page = !isset( $_GET[ $identifier ] ) ? '' : $_GET[ $identifier ]; - if( $page == $cur_page ) { - return 'nav-tab-active'; - } -} - -// Get the active subtab -function active_subtab( $page, $identifier = 'tab' ) { - $cur_page = !isset( $_GET[ $identifier ] ) ? '' : $_GET[ $identifier ]; - if( $page == $cur_page ) { - echo 'current'; - } -} - -// List of plugins that should not be updated -function donotupdatelist( $filter = 'plugins' ) { - - global $wpdb; - - $db_table = ( $filter == 'themes' ) ? 'notUpdateListTh' : 'notUpdateList'; - $table_name = $wpdb->prefix."auto_updates"; - $config = $wpdb->get_results( "SELECT * FROM {$table_name} WHERE name = '{$db_table}'"); - - $list = explode( ", ", $config[0]->onoroff ); - $returnList = array(); - - foreach ( $list as $key ) array_push( $returnList, $key ); - - return $returnList; - -} -function plugins_donotupdatelist() { - - $array = array(); - - // Filtered plugins - foreach ( donotupdatelist( 'plugins' ) as $filteredplugin ) { - array_push( $array, $filteredplugin ); - } - - // Plugin added to the delay list - foreach ( cau_delayed_updates__formated() as $delayedplugin ) { - array_push( $array, $delayedplugin ); - } - - return $array; - -} -function themes_donotupdatelist() { - return donotupdatelist( 'themes' ); -} - -// Show the update log -function cau_fetch_log( $limiter, $format = 'simple' ) { - - global $wpdb; - - $updateLog = "update_log"; - $updateLogDB = $wpdb->prefix.$updateLog; - $filter = isset( $_GET['filter'] ) ? $_GET['filter'] : 'all'; - $dateFormat = get_option( 'date_format' ); - $dateToday = date ( 'ydm' ); - $log_items = array(); - $limit = ( $limiter != 'all' ) ? $limiter : false; - - $show_plugins = ( in_array( $filter, array( 'plugins', 'all' ) ) ) ? true : false; - $show_themes = ( in_array( $filter, array( 'themes', 'all' ) ) ) ? true : false; - $show_core = ( $filter == 'all' ) ? true : false; - $show_translations = ( $filter == 'translations' ) ? true : false; - - // PLUGINS - if( $show_plugins ) { - - // Make sure some required functions exits - if ( !function_exists( 'get_plugins' ) ) { - require_once ABSPATH . 'wp-admin/includes/plugin.php'; - } - - // Loop trough all plugins - foreach ( get_plugins() as $key => $value ) { - - // Get data - $fullPath = plugin_dir_path( __DIR__ ).'/'.$key; - $pluginData = get_plugin_data( $fullPath ); - $pluginSlug = explode( '/', plugin_basename( $key ) ); - $pluginSlug = $pluginSlug[0]; - - $fileTime = date( 'Hi', filemtime( $fullPath ) ); - $fileDate = date( 'ydm', filemtime( $fullPath ) ); - $fileDateTime = strtotime( $fileDate ); - $updateSched = wp_next_scheduled( 'wp_update_plugins' ); - - if( $dateToday == $fileDate ) { - $method = ( $fileTime > date( 'Hi', strtotime( '-30 minutes', $updateSched ) ) && $fileTime < date( 'Hi', strtotime( '+30 minutes', $updateSched ) ) ) ? __( 'Automatic', 'companion-auto-update' ) : __( 'Manual', 'companion-auto-update' ); - } else { - $method = cau_check_if_exists( $key, 'slug', $updateLog ) ? cau_get_plugininfo( $key, 'method' ) : '-'; - } - - $log_items[$fileDateTime.'_'.$pluginSlug] = array( - 'type' => 'Plugin', - 'slug' => $pluginSlug, - 'name' => $pluginData['Name'], - 'date' => $fileDateTime, - 'version' => $pluginData['Version'], - 'method' => $method, - ); - - } - - } - - // THEMES - if( $show_themes ) { - - // Loop trough all themes - foreach ( wp_get_themes() as $key => $value ) { - - // Get data - $fullPath = get_theme_root().'/'.$key; - $path_parts = pathinfo( $fullPath ); - $theme_data = wp_get_theme( $path_parts['filename'] ); - - $fileTime = date( 'Hi', filemtime( $fullPath ) ); - $fileDate = date( 'ydm', filemtime( $fullPath ) ); - $fileDateTime = strtotime( $fileDate ); - $updateSched = wp_next_scheduled( 'wp_update_themes' ); - - if( $dateToday == $fileDate ) { - $method = ( $fileTime > date( 'Hi', strtotime( '-30 minutes', $updateSched ) ) && $fileTime < date( 'Hi', strtotime( '+30 minutes', $updateSched ) ) ) ? __( 'Automatic', 'companion-auto-update' ) : __( 'Manual', 'companion-auto-update' ); - } else { - $method = cau_check_if_exists( $key, 'slug', $updateLog ) ? cau_get_plugininfo( $key, 'method' ) : '-'; - } - - $log_items[$fileDateTime.'_'.$key] = array( - 'type' => 'Theme', - 'slug' => '', - 'name' => $theme_data->get( 'Name' ), - 'date' => $fileDateTime, - 'version' => $theme_data->get( 'Version' ), - 'method' => $method, - ); - - } - - } - - // TRANSLATIONS - if( $show_translations ) { - - $transFolder = get_home_path() . 'wp-content/languages'; // There is no way (at this time) to check if someone changed this link, so therefore it won't work when it's changed, sorry - if( file_exists( $transFolder ) ) { - - // Plugin translations - $files = glob( $transFolder.'/plugins/*.{mo}', GLOB_BRACE ); - foreach( $files as $file ) { - - $fileDateTime = strtotime( date( 'YmdHi', filemtime( $file ) ) ); - $bn = basename( $file ); - - $log_items[$fileDateTime.'_'.$bn] = array( - 'type' => __( 'Plugin translations', 'companion-auto-update' ), - 'slug' => '', - 'name' => str_replace( ".json", "", str_replace( ".mo", "", str_replace( "-", " ", $bn ) ) ), - 'date' => $fileDateTime, - 'version' => '', - 'method' => '', - ); - - } - - // Theme translations - $files = glob( $transFolder.'/themes/*.{mo}', GLOB_BRACE ); - foreach( $files as $file ) { - - $fileDateTime = strtotime( date( 'YmdHi', filemtime( $file ) ) ); - $bn = basename( $file ); - - $log_items[$fileDateTime.'_'.$bn] = array( - 'type' => __( 'Theme translations', 'companion-auto-update' ), - 'slug' => '', - 'name' => str_replace( ".json", "", str_replace( ".mo", "", str_replace( "-", " ", $bn ) ) ), - 'date' => $fileDateTime, - 'version' => '', - 'method' => '', - ); - - } - - // Core translations - $files = glob( $transFolder.'/*.{mo}', GLOB_BRACE ); - foreach( $files as $file ) { - - $fileDateTime = strtotime( date( 'YmdHi', filemtime( $file ) ) ); - $bn = basename( $file ); - - $log_items[$fileDateTime.'_'.$bn] = array( - 'type' => __( 'Core translations', 'companion-auto-update' ), - 'slug' => '', - 'name' => str_replace( ".json", "", str_replace( ".mo", "", str_replace( "-", " ", $bn ) ) ), - 'date' => $fileDateTime, - 'version' => '', - 'method' => '', - ); - - } - - } - - } - - // CORE - if( $show_core ) { - - $coreFile = ABSPATH . 'wp-includes/version.php'; - if( file_exists( $coreFile ) ) { - - $fileTime = date( 'Hi', filemtime( $coreFile ) ); - $fileDate = date( 'ydm', filemtime( $coreFile ) ); - $fileDateTime = strtotime( $fileDate ); - $updateSched = wp_next_scheduled( 'wp_version_check' ); - - if( $dateToday == $fileDate ) { - $method = ( $fileTime > date( 'Hi', strtotime( '-30 minutes', $updateSched ) ) && $fileTime < date( 'Hi', strtotime( '+30 minutes', $updateSched ) ) ) ? __( 'Automatic', 'companion-auto-update' ) : __( 'Manual', 'companion-auto-update' ); - } else { - $method = cau_check_if_exists( 'core', 'slug', $updateLog ) ? cau_get_plugininfo( 'core', 'method' ) : '-'; - } - - - } else { - $fileDateTime = 'Could not read core date.'; - $method = '-'; - } - - $log_items[$fileDateTime.'_'.$key] = array( - 'type' => 'WordPress', - 'slug' => '', - 'name' => 'WordPress', - 'date' => $fileDateTime, - 'version' => get_bloginfo( 'version' ), - 'method' => $method, - ); - - } - - $listClasses = 'wp-list-table widefat autoupdate autoupdatelog'; - - if( $format == 'table' ) { - $listClasses .= ' autoupdatelog striped'; - } else { - $listClasses .= ' autoupdatewidget'; - } - - echo ''; - - // Show the last updated plugins - if( $format == 'table' ) { - - echo ' - - '; - if( !$translations ) echo ''; - echo ' - - - - '; - - } - - echo ''; - - krsort( $log_items ); - $limited_log_items = $limit ? array_slice( $log_items, 0, $limit ) : $log_items; - - foreach ( $limited_log_items as $key => $value ) { - - echo ''; - - $log_item__name = $value['name']; - $log_item__name_f = ( $format != 'table' && strlen( $log_item__name ) > 25 ) ? substr( $log_item__name, 0, 25 ).'...' : $log_item__name; - $log_item__type = $value['type']; - $log_item__slug = $value['slug']; - $log_item__version = $value['version']; - $log_item__date = date_i18n( get_option( 'date_format' ), $value['date'] ); - $log_item__method = $value['method']; - - echo ''; - - if( $format == 'table' ) { - if( !$translations ) echo ''; - echo ''; - } - echo ''; - - - if( $format == 'table' ) { - echo ''; - } - - echo ''; - - } - - echo "
'.__( 'Name', 'companion-auto-update' ).''.__( 'To version', 'companion-auto-update' ).''.__( 'Type', 'companion-auto-update' ).''.__( 'Last updated on', 'companion-auto-update' ).''.__( 'Update method', 'companion-auto-update' ).'

'.cau_getChangelogUrl( $log_item__type, $log_item__name_f, $log_item__slug ).'

'.$log_item__version.'

'.$log_item__type.'

'.$log_item__date.'

'.$log_item__method.'

"; - -} - -// Get the proper changelog URL -function cau_getChangelogUrl( $type, $name, $plugslug ) { - - switch( $type ) { - case 'WordPress': - $url = ''; - break; - case 'Plugin': - $url = admin_url( 'plugin-install.php?tab=plugin-information&plugin='.$plugslug.'§ion=changelog&TB_iframe=true&width=772&height=772' ); - break; - case 'Theme': - $url = ''; - break; - } - - return !empty( $url ) ? "{$name}" : $name; - -} - -// Only update plugins which are enabled -function cau_dontUpdatePlugins( $update, $item ) { - return in_array( $item->slug, plugins_donotupdatelist() ) ? false : true; -} -function cau_dontUpdateThemes( $update, $item ) { - return in_array( $item->slug, themes_donotupdatelist() ) ? false : true; -} - -// Get plugin information of repository -function cau_plugin_info( $slug, $what ) { - - $slug = sanitize_title( $slug ); - $cau_transient_name = 'cau' . $slug; - $cau_info = get_transient( $cau_transient_name ); - - if( !function_exists( 'plugins_api' ) ) require_once( ABSPATH.'wp-admin/includes/plugin-install.php' ); - $cau_info = plugins_api( 'plugin_information', array( 'slug' => $slug ) ); - - if ( ! $cau_info or is_wp_error( $cau_info ) ) { - return false; - } - - set_transient( $cau_transient_name, $cau_info, 3600 ); - - switch ( $what ) { - case 'versions': - return $cau_info->versions; - break; - case 'version': - return $cau_info->version; - break; - case 'name': - return $cau_info->name; - break; - case 'slug': - return $cau_info->slug; - break; - } - -} - -// Get list of outdated plugins -function cau_list_outdated() { - - $outdatedList = array(); - - // Check if function exists - if ( ! function_exists( 'get_plugins' ) ) { - require_once ABSPATH . 'wp-admin/includes/plugin.php'; - } - - if( !function_exists( 'plugins_api' ) ) { - require_once( ABSPATH.'wp-admin/includes/plugin-install.php' ); - } - - foreach ( get_plugins() as $key => $value) { - - $slug = $key; - $explosion = explode( '/', $slug ); - $actualSlug = array_shift( $explosion ); - - // Get plugin name - foreach ( $value as $k => $v ) if( $k == "Name" ) $name = $v; - - // Get plugins tested up to version - $api = plugins_api( 'plugin_information', array( 'slug' => wp_unslash( $actualSlug ), 'tested' => true ) ); - - // Version compare - $tested_version = !empty( $api->tested ) ? substr( $api->tested, 0, 3 ) : false; // Format version number - - // Check if "tested up to" version number is set - if( $tested_version ) { - - $current_version = substr( get_bloginfo( 'version' ), 0, 3 ); // Format version number - $version_difference = ( (int)$current_version - (int)$tested_version ); // Get the difference - // $tested_wp = ( empty( $api->tested ) || cau_version_compare( get_bloginfo( 'version' ), $api->tested, '<' ) ); - - if( $version_difference >= '0.3' ) { - $outdatedList[$name] = substr( $api->tested, 0, 3 ); - } - - } else { - $outdatedList[$name] = ''; // We'll catch this when sending the e-mail - } - - } - - return $outdatedList; - -} - -// Better version compare -function cau_version_compare( $ver1, $ver2, $operator = null ) { - $p = '#(\.0+)+($|-)#'; - $ver1 = preg_replace( $p, '', $ver1 ); - $ver2 = preg_replace( $p, '', $ver2 ); - return isset( $operator ) ? version_compare( $ver1, $ver2, $operator ) : version_compare( $ver1, $ver2 ); -} - -// Get plugin information of currently installed plugins -function cau_active_plugin_info( $slug, $what ) { - - // Check if function exists - if ( ! function_exists( 'get_plugins' ) ) { - require_once ABSPATH . 'wp-admin/includes/plugin.php'; - } - - $allPlugins = get_plugins(); - - foreach( $allPlugins as $key => $value ) { - $thisSlug = explode('/', $key); - $thisSlugE = $thisSlug[0]; - if( $thisSlug == $slug ) { - if( $what == 'version' ) return $value['Version']; - } - } - -} - -// Remove update nag when major updates are disabled -function cau_hideUpdateNag() { - if( cau_get_db_value( 'major' ) != 'on' ) { - remove_action( 'admin_notices', 'update_nag', 3 ); - remove_action( 'network_admin_notices', 'maintenance_nag', 10 ); - } -} -add_action( 'admin_head', 'cau_hideUpdateNag', 100 ); - -// Add more intervals to event schedules -function cau_addMoreIntervals( $schedules ) { - - // Add a weekly interval. - $schedules['weekly'] = array( - 'interval' => 604800, - 'display' => __( 'Every week', 'companion-auto-update' ), - ); - - // Add a twice montly interval. - $schedules['twice_monthly'] = array( - 'interval' => 1209600, - 'display' => __( 'Every 2 weeks', 'companion-auto-update' ), - ); - - // Add a montly interval. - $schedules['once_monthly'] = array( - 'interval' => 2419200, - 'display' => __( 'Every 4 weeks', 'companion-auto-update' ), - ); - - return $schedules; - -} -add_filter( 'cron_schedules', 'cau_addMoreIntervals' ); - -// Get only unique schedules -function cau_wp_get_schedules() { - - // Start variables - $availableIntervals = wp_get_schedules(); - $array_unique = array(); - $intervalTimes = array(); - $intervalNames = array(); - $intervalUniques = array(); - $counter = 0; - - // Get all intervals - foreach ( $availableIntervals as $key => $value ) { - - // Do a bunch of checks to format them the right way - foreach ( $value as $display => $interval ) { - - if( $display == 'interval' ) { - - if( $interval == '86400' ) $key = 'daily'; // Force the daily interval to be called daily, required by a bunch of handles of this plugin - - $intervalTimes[$counter] = $key; // Add the backend name (i.e. "once_monthly" or "daily") - $intervalUniques[$counter] = $interval; // Add the unix timestamp of this interval, used to identify unique items - - // Format display name in a proper way - $numOfMinutes = ($interval/60); - $identifier = __( 'minutes', 'companion-auto-update' ); - - // I just know there's an easier way for this, but I can't come up with it and this works so... - if( $interval >= (60*60) ) { - $numOfMinutes = ($numOfMinutes/60); - $identifier = __( 'hours', 'companion-auto-update' ); - } - if( $interval >= (60*60*24) ) { - $numOfMinutes = ($numOfMinutes/24); - $identifier = __( 'days', 'companion-auto-update' ); - } - if( $interval >= (60*60*24*7) ) { - $numOfMinutes = ($numOfMinutes/7); - $identifier = __( 'weeks', 'companion-auto-update' ); - } - if( $interval >= (60*60*24*7*(52/12)) ) { - $numOfMinutes = ($numOfMinutes/(52/12)); - $identifier = __( 'months', 'companion-auto-update' ); - } - - $display = sprintf( esc_html__( 'Every %s %s', 'companion-auto-update' ), round( $numOfMinutes, 2 ), $identifier ); // Translateble - $intervalNames[$counter] = $display; // Add the display name (i.e. "Once a month" or "Once Daily") - - $counter++; // Make sure the next interval gets a new "key" value - } - - } - - } - - // Sort the interval from smallest to largest - asort( $intervalUniques ); - - // Prevent duplicates - foreach ( array_unique( $intervalUniques ) as $key => $value ) { - // $value is the timestamp - // $intervalTimes[$key] is the backend name - // $intervalNames[$key] is the display name - $array_unique[$intervalTimes[$key]] = $intervalNames[$key]; - } - - // Return the array - return $array_unique; - -} - -// Check if the update log db is empty -function cau_updateLogDBisEmpty() { - - global $wpdb; - $updateDB = "update_log"; - $updateLog = $wpdb->prefix.$updateDB; - $row_count = $wpdb->get_var( "SELECT COUNT(*) FROM $updateLog" ); - - return ( $row_count > 0 ) ? false : true; -} - -// Plugin information to DB -function cau_savePluginInformation( $method = 'New' ) { - - // Check if function exists - if ( ! function_exists( 'get_plugins' ) ) { - require_once ABSPATH . 'wp-admin/includes/plugin.php'; - } - - // Set variables - global $wpdb; - $updateDB = "update_log"; - $updateLog = $wpdb->prefix.$updateDB; - $allPlugins = get_plugins(); - $allThemes = wp_get_themes(); - - // Loop trough all themes - foreach ( $allThemes as $key => $value ) { - if( !cau_check_if_exists( $key, 'slug', $updateDB ) ) $wpdb->insert( $updateLog, array( 'slug' => $key, 'oldVersion' => '-', 'method' => $method ) ); - } - - // Loop trough all plugins - foreach ( $allPlugins as $key => $value ) { - if( !cau_check_if_exists( $key, 'slug', $updateDB ) ) $wpdb->insert( $updateLog, array( 'slug' => $key, 'oldVersion' => '-', 'method' => $method ) ); - } - - // Core - if( !cau_check_if_exists( 'core', 'slug', $updateDB ) ) $wpdb->insert( $updateLog, array( 'slug' => 'core', 'oldVersion' => '-', 'method' => $method ) ); - -} - -function cau_updatePluginInformation( $slug, $method = '-', $newVersion = '-' ) { - - global $wpdb; - $updateDB = "update_log"; - $updateLog = $wpdb->prefix.$updateDB; - $wpdb->query( $wpdb->prepare( "UPDATE $updateLog SET newVersion = '%s', method = %s WHERE slug = '%s'", $newVersion, $method, $slug ) ); - -} - -function cau_siteHealthSignature() { - return '

'.__( 'This was reported by the Companion Auto Update plugin', 'companion-auto-update' ).'

'; -} - -function cau_add_siteHealthTest( $tests ) { - $tests['direct']['cau_disabled'] = array( 'label' => __( 'Companion Auto Update', 'companion-auto-update' ), 'test' => 'cau_disabled_test' ); - return $tests; -} -add_filter( 'site_status_tests', 'cau_add_siteHealthTest' ); - -function cau_disabled_test() { - - $result = array( - 'label' => __( 'Auto updating is enabled', 'companion-auto-update' ), - 'status' => 'good', - 'badge' => array( - 'label' => __( 'Security' ), - 'color' => 'blue', - ), - 'description' => sprintf( '

%s

', __( "Automatic updating isn't disabled on this site.", 'companion-auto-update' ) ), - 'actions' => '', - 'test' => 'cau_disabled', - ); - - if ( checkAutomaticUpdaterDisabled() OR !has_filter( 'wp_version_check', 'wp_version_check' ) ) { - $result['status'] = 'critical'; - $result['label'] = __( 'Auto updating is disabled', 'companion-auto-update' ); - $result['description'] = __( 'Automatic updating is disabled on this site by either WordPress, another plugin or your webhost.', 'companion-auto-update' ); - $result['description'] .= ' '.__( 'For more information about this error check the status page.', 'companion-auto-update' ); - $result['actions'] .= sprintf( '

%s', esc_url( cau_url( 'status' ) ), __( 'Check the status page', 'companion-auto-update' ) ); - } - - $result['actions'] .= cau_siteHealthSignature(); - - return $result; -} - -// Check for version control -function cau_test_is_vcs_checkout( $context ) { - - $context_dirs = array( ABSPATH ); - $vcs_dirs = array( '.svn', '.git', '.hg', '.bzr' ); - $check_dirs = array(); - $result = array(); - - foreach ( $context_dirs as $context_dir ) { - // Walk up from $context_dir to the root. - do { - $check_dirs[] = $context_dir; - - // Once we've hit '/' or 'C:\', we need to stop. dirname will keep returning the input here. - if ( $context_dir == dirname( $context_dir ) ) - break; - - // Continue one level at a time. - } while ( $context_dir = dirname( $context_dir ) ); - } - - $check_dirs = array_unique( $check_dirs ); - - // Search all directories we've found for evidence of version control. - foreach ( $vcs_dirs as $vcs_dir ) { - foreach ( $check_dirs as $check_dir ) { - if ( $checkout = @is_dir( rtrim( $check_dir, '\\/' ) . "/$vcs_dir" ) ) { - break 2; - } - } - } - - if ( $checkout && ! apply_filters( 'automatic_updates_is_vcs_checkout', true, $context ) ) { - $result['description'] = sprintf( __( 'The folder %s was detected as being under version control (%s), but the %s filter is allowing updates' , 'companion-auto-update' ), "$check_dir", "automatic_updates_is_vcs_checkout" ); - $result['icon'] = 'warning'; - $result['status'] = 'info'; - } else if ( $checkout ) { - $result['description'] = sprintf( __( 'The folder %s was detected as being under version control (%s)' , 'companion-auto-update' ), "$check_dir", "$vcs_dir" ); - $result['icon'] = 'no'; - $result['status'] = 'disabled'; - } else { - $result['description'] = __( 'No issues detected' , 'companion-auto-update' ); - $result['icon'] = 'yes-alt'; - $result['status'] = 'enabled'; - } - - return $result; -} - -// Check if plugins need to be delayed -function cau_check_delayed() { - if( cau_get_db_value( 'update_delay' ) == 'on' ) { - cau_hold_updates(); - cau_unhold_updates(); - } else { - cau_unhold_all_updates(); - } -} - -// List of all delayed plugins -function cau_delayed_updates() { - - global $wpdb; - $plugin_list = array(); - $updateLog = $wpdb->prefix."update_log"; - $put_on_hold = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM {$updateLog} WHERE put_on_hold <> '%s'", '0' ) ); - foreach ( $put_on_hold as $plugin ) { - array_push( $plugin_list, $plugin->slug ); - } - return $plugin_list; - -} - -// List of all delayed plugins for the update function -function cau_delayed_updates__formated() { - - $plugin_list = array(); - foreach ( cau_delayed_updates() as $plugin ) { - $explosion = explode( '/', $plugin ); - $short_slug = array_shift( $explosion ); - array_push( $plugin_list, $short_slug ); - } - return $plugin_list; - -} - -// Add "put on hold" timestamp to the database if it hasn't been set yet -function cau_hold_updates() { - - if ( !function_exists( 'get_plugin_updates' ) ) require_once ABSPATH . 'wp-admin/includes/update.php'; - $plugins = get_plugin_updates(); - - if ( !empty( $plugins ) ) { - $list = array(); - foreach ( (array)$plugins as $plugin_file => $plugin_data ) { - if( !in_array( $plugin_file, cau_delayed_updates() ) ) { - global $wpdb; - $updateLog = "{$wpdb->prefix}update_log"; - $wpdb->query( $wpdb->prepare( "UPDATE $updateLog SET put_on_hold = '%s' WHERE slug = '%s'", strtotime( "now" ), $plugin_file ) ); - } - } - } -} - -// Remove plugins from "put on hold" after x days -function cau_unhold_updates() { - - - global $wpdb; - - $after_x_days = ( cau_get_db_value( 'update_delay_days' ) != '' ) ? cau_get_db_value( 'update_delay_days' ) : '2'; - $today = strtotime( "now" ); - $updateLog = "{$wpdb->prefix}update_log"; - $put_on_hold = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM {$updateLog} WHERE put_on_hold <> '%s'", '0' ) ); - - foreach ( $put_on_hold as $plugin ) { - - $plugin_file = $plugin->slug; - $put_on_hold_date = $plugin->put_on_hold; - $remove_after = strtotime( '+'.$after_x_days.' days', $put_on_hold_date ); - - if( $remove_after <= $today ) { - $wpdb->query( $wpdb->prepare( "UPDATE {$updateLog} SET put_on_hold = '%s' WHERE slug = '%s'", '0', $plugin_file ) ); - } - - } - -} - -// Remove all plugins from "put on hold" if option is disabled -function cau_unhold_all_updates() { - global $wpdb; - $updateLog = "{$wpdb->prefix}update_log"; - $put_on_hold = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM {$updateLog} WHERE put_on_hold <> '%s'", '0' ) ); - foreach ( $put_on_hold as $plugin ) { - $plugin_file = $plugin->slug; - $wpdb->query( $wpdb->prepare( "UPDATE {$updateLog} SET put_on_hold = '%s' WHERE slug = '%s'", '0', $plugin_file ) ); - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/companion-auto-update/companion-auto-update.php b/wp-content/upgrade-temp-backup/plugins/companion-auto-update/companion-auto-update.php deleted file mode 100644 index 247d44de..00000000 --- a/wp-content/upgrade-temp-backup/plugins/companion-auto-update/companion-auto-update.php +++ /dev/null @@ -1,420 +0,0 @@ -get_col( "SELECT blog_id FROM $wpdb->blogs" ); - foreach ( $blog_ids as $blog_id ) { - switch_to_blog( $blog_id ); - cau_database_creation(); - restore_current_blog(); - } - } else { - cau_database_creation(); - } - - if (! wp_next_scheduled ( 'cau_set_schedule_mail' )) wp_schedule_event( time(), 'daily', 'cau_set_schedule_mail'); // Set schedule for basic notifcations - if (! wp_next_scheduled ( 'cau_custom_hooks_plugins' )) wp_schedule_event( time(), 'daily', 'cau_custom_hooks_plugins'); // Run custom hooks on plugin updates - if (! wp_next_scheduled ( 'cau_custom_hooks_themes' )) wp_schedule_event( time(), 'daily', 'cau_custom_hooks_themes'); // Run custom hooks on theme updates - if (! wp_next_scheduled ( 'cau_log_updater' )) wp_schedule_event( ( time() - 1800 ), 'daily', 'cau_log_updater'); // Keep the log up to date - if (! wp_next_scheduled ( 'cau_outdated_notifier' )) wp_schedule_event( time(), 'daily', 'cau_outdated_notifier'); // Set schedule for basic notifcations -} - -add_action( 'cau_set_schedule_mail', 'cau_check_updates_mail' ); -add_action( 'cau_outdated_notifier', 'cau_outdated_notifier_mail' ); -add_action( 'wp_update_plugins', 'cau_run_custom_hooks_p' ); -add_action( 'wp_update_themes', 'cau_run_custom_hooks_t' ); -add_action( 'wp_version_check', 'cau_run_custom_hooks_c' ); - -// Hourly event to keep the log up to date -function cau_keep_log_uptodate() { - cau_savePluginInformation(); // Check for new plugins and themes - cau_check_delayed(); // Check for plugin delays -} -add_action( 'cau_log_updater', 'cau_keep_log_uptodate' ); - -// Redirect to welcome screen on activation of plugin -function cau_pluginActivateWelcome() { - add_option( 'cau_redirectToWelcomeScreen', true ); -} -register_activation_hook(__FILE__, 'cau_pluginActivateWelcome'); - -// Redirect to welcome screen on activation of plugin -function cau_pluginRedirectWelcomeScreen() { - if ( get_option( 'cau_redirectToWelcomeScreen', false ) ) { - delete_option( 'cau_redirectToWelcomeScreen' ); - if( !isset( $_GET['activate-multi'] ) ) { - wp_redirect( admin_url( cau_menloc().'?page=cau-settings&welcome=1' ) ); - } - } -} -add_action( 'admin_init', 'cau_pluginRedirectWelcomeScreen' ); - -// Donate url -function cau_donateUrl() { - return 'https://www.paypal.me/dakel/10/'; -} - -// Database version -function cau_db_version() { - return '3.8.3'; -} - -function cau_database_creation() { - - global $wpdb; - - // Plugin db info - $cau_db_version = cau_db_version(); - $autoupdates = $wpdb->prefix."auto_updates"; - $updateLog = $wpdb->prefix."update_log"; - - // WordPress db info - $charset_collate = $wpdb->get_charset_collate(); - - // DB table creation queries - $sql = "CREATE TABLE $autoupdates ( id INT(9) NOT NULL AUTO_INCREMENT, name VARCHAR(255) NOT NULL, onoroff TEXT NOT NULL, UNIQUE KEY id (id) ) $charset_collate;"; - $sql2 = "CREATE TABLE $updateLog ( id INT(9) NOT NULL AUTO_INCREMENT, slug VARCHAR(255) NOT NULL, oldVersion VARCHAR(10) NOT NULL, newVersion VARCHAR(10) NOT NULL, method VARCHAR(10) NOT NULL, put_on_hold VARCHAR(100) DEFAULT '0', UNIQUE KEY id (id) ) $charset_collate;"; - - // Create DB tables - require_once( ABSPATH . 'wp-admin/includes/upgrade.php' ); - dbDelta( $sql ); - dbDelta( $sql2 ); - - // Database version - add_option( "cau_db_version", "$cau_db_version" ); - - // Insert data - cau_install_data(); -} - -// Check if database table exists before creating -function cau_check_if_exists( $whattocheck, $id = 'name', $db_table = 'auto_updates' ) { - - global $wpdb; - - $table_name = $wpdb->prefix.$db_table; - $rows = $wpdb->get_col( "SELECT COUNT(*) as num_rows FROM {$table_name} WHERE {$id} = '{$whattocheck}'" ); - $check = $rows[0]; - - return ( $check > 0 ) ? true : false; - -} - -// Insert date into database -function cau_install_data() { - - global $wpdb; - - $table_name = $wpdb->prefix . "auto_updates"; - $toemail = get_option('admin_email'); - - // Update configs - if( !cau_check_if_exists( 'plugins' ) ) $wpdb->insert( $table_name, array( 'name' => 'plugins', 'onoroff' => 'on' ) ); - if( !cau_check_if_exists( 'themes' ) ) $wpdb->insert( $table_name, array( 'name' => 'themes', 'onoroff' => 'on' ) ); - if( !cau_check_if_exists( 'minor' ) ) $wpdb->insert( $table_name, array( 'name' => 'minor', 'onoroff' => 'on' ) ); - if( !cau_check_if_exists( 'major' ) ) $wpdb->insert( $table_name, array( 'name' => 'major', 'onoroff' => '' ) ); - - // Email configs - if( !cau_check_if_exists( 'email' ) ) $wpdb->insert( $table_name, array( 'name' => 'email', 'onoroff' => '' ) ); - if( !cau_check_if_exists( 'send' ) ) $wpdb->insert( $table_name, array( 'name' => 'send', 'onoroff' => '' ) ); - if( !cau_check_if_exists( 'sendupdate' ) ) $wpdb->insert( $table_name, array( 'name' => 'sendupdate', 'onoroff' => '' ) ); - if( !cau_check_if_exists( 'sendoutdated' ) ) $wpdb->insert( $table_name, array( 'name' => 'sendoutdated', 'onoroff' => '' ) ); - - // Advanced - if( !cau_check_if_exists( 'notUpdateList' ) ) $wpdb->insert( $table_name, array( 'name' => 'notUpdateList', 'onoroff' => '' ) ); - if( !cau_check_if_exists( 'translations' ) ) $wpdb->insert( $table_name, array( 'name' => 'translations', 'onoroff' => 'on' ) ); - if( !cau_check_if_exists( 'wpemails' ) ) $wpdb->insert( $table_name, array( 'name' => 'wpemails', 'onoroff' => 'on' ) ); - if( !cau_check_if_exists( 'notUpdateListTh' ) ) $wpdb->insert( $table_name, array( 'name' => 'notUpdateListTh', 'onoroff' => '' ) ); - - // Stuff - if( !cau_check_if_exists( 'html_or_text' ) ) $wpdb->insert( $table_name, array( 'name' => 'html_or_text', 'onoroff' => 'html' ) ); - if( !cau_check_if_exists( 'dbupdateemails' ) ) $wpdb->insert( $table_name, array( 'name' => 'dbupdateemails', 'onoroff' => '' ) ); - - // Advanced - if( !cau_check_if_exists( 'allow_administrator' ) ) $wpdb->insert( $table_name, array( 'name' => 'allow_administrator', 'onoroff' => 'on' ) ); - if( !cau_check_if_exists( 'allow_editor' ) ) $wpdb->insert( $table_name, array( 'name' => 'allow_editor', 'onoroff' => '' ) ); - if( !cau_check_if_exists( 'allow_author' ) ) $wpdb->insert( $table_name, array( 'name' => 'allow_author', 'onoroff' => '' ) ); - if( !cau_check_if_exists( 'ignore_seo' ) ) $wpdb->insert( $table_name, array( 'name' => 'ignore_seo', 'onoroff' => '' ) ); - if( !cau_check_if_exists( 'ignore_cron' ) ) $wpdb->insert( $table_name, array( 'name' => 'ignore_cron', 'onoroff' => '' ) ); - if( !cau_check_if_exists( 'advanced_info_emails' ) ) $wpdb->insert( $table_name, array( 'name' => 'advanced_info_emails', 'onoroff' => '' ) ); - if( !cau_check_if_exists( 'update_delay' ) ) $wpdb->insert( $table_name, array( 'name' => 'update_delay', 'onoroff' => '' ) ); - if( !cau_check_if_exists( 'update_delay_days' ) ) $wpdb->insert( $table_name, array( 'name' => 'update_delay_days', 'onoroff' => '' ) ); - if( !cau_check_if_exists( 'plugin_links_emails' ) ) $wpdb->insert( $table_name, array( 'name' => 'plugin_links_emails', 'onoroff' => '' ) ); - -} -register_activation_hook( __FILE__, 'cau_install' ); - -// Clear everything on deactivation -function cau_remove() { - - // Delete tables - global $wpdb; - $autoupdates = $wpdb->prefix."auto_updates"; - $updateLog = $wpdb->prefix."update_log"; - $wpdb->query( "DROP TABLE IF EXISTS $autoupdates" ); - $wpdb->query( "DROP TABLE IF EXISTS $updateLog" ); - - // Clear schedules - wp_clear_scheduled_hook( 'cau_set_schedule_mail' ); - wp_clear_scheduled_hook( 'cau_custom_hooks_plugins' ); - wp_clear_scheduled_hook( 'cau_custom_hooks_themes' ); - wp_clear_scheduled_hook( 'cau_log_updater' ); - - // Restore WordPress 5.5 default update functionality - add_filter( 'plugins_auto_update_enabled', '__return_true' ); - add_filter( 'themes_auto_update_enabled', '__return_true' ); - add_filter( 'auto_plugin_update_send_email', '__return_true' ); - add_filter( 'auto_theme_update_send_email', '__return_true' ); - -} -register_deactivation_hook( __FILE__, 'cau_remove' ); - -// Update -function cau_update_db_check() { - - $cau_db_version = cau_db_version(); - - if ( get_site_option( 'cau_db_version' ) != $cau_db_version ) { - - cau_database_creation(); - - // In 3.7.2 we've added $wpdb->get_charset_collate - if( get_site_option( 'cau_db_version' ) < '3.7.2' ) { - - global $wpdb; - $autoupdates = $wpdb->prefix."auto_updates"; - $updateLog = $wpdb->prefix."update_log"; - $db_charset = constant( 'DB_CHARSET' ); - $wpdb->query( "ALTER TABLE $autoupdates CONVERT TO CHARACTER SET $db_charset" ); - $wpdb->query( "ALTER TABLE $updateLog CONVERT TO CHARACTER SET $db_charset" ); - } - update_option( "cau_db_version", $cau_db_version ); - - } - -} - -add_action( 'upgrader_process_complete', 'cau_update_db_check' ); - -// Manual update -function cau_manual_update() { - cau_update_db_check(); -} - -// Load custom functions -require_once( plugin_dir_path( __FILE__ ) . 'cau_functions.php' ); - -// Add plugin to menu -function register_cau_menu_page() { - if( cau_allowed_user_rights() ) add_submenu_page( cau_menloc() , __( 'Auto Updater', 'companion-auto-update' ), __( 'Auto Updater', 'companion-auto-update' ), 'manage_options', 'cau-settings', 'cau_frontend' ); -} -add_action( 'admin_menu', 'register_cau_menu_page' ); - -// Settings page -function cau_frontend() { - - echo "

-

".__( 'Companion Auto Update', 'companion-auto-update' )."

-
"; - - // Make sure the correct timezone is used - date_default_timezone_set( cau_get_proper_timezone() ); - - // Allow only access to these pages - $allowedPages = array( - 'dashboard' => __( 'Dashboard' ), - 'pluginlist' => __( 'Update filter', 'companion-auto-update' ), - 'log' => __( 'Update log', 'companion-auto-update' ), - 'status' => __( 'Status', 'companion-auto-update' ), - ); - - // Show subtabs - echo ""; - - // Show page content - if( !isset( $_GET['tab'] ) ) { - $requestedPage = 'dashboard'; - echo ""; // Set active tab class - } else { - $requestedPage = sanitize_key( $_GET['tab'] ); - } - - if( array_key_exists( $requestedPage, $allowedPages ) ) { - require_once( plugin_dir_path( __FILE__ ) . 'admin/'.$requestedPage.'.php' ); - } else { - wp_die( 'You\'re not allowed to view '.$requestedPage.'.' ); - } - - echo '
'; - -} - -// Add a widget to the dashboard. -function cau_add_widget() { - if ( cau_allowed_user_rights() ) wp_add_dashboard_widget( 'cau-update-log', __('Update log', 'companion-auto-update'), 'cau_widget' ); -} -add_action( 'wp_dashboard_setup', 'cau_add_widget' ); - -// Widget content -function cau_widget() { - echo ''; - echo '

'.__('Below are the last 7 updates ran on this site. Includes plugins and themes, both automatically updated and manually updated.', 'companion-auto-update').'

'; - cau_fetch_log( '7' ); - echo '

'.__( 'View full changelog', 'companion-auto-update' ).' | '.__( 'Settings' ).'

'; -} - -// Load admin styles -function load_cau_global_styles( $hook ) { - wp_enqueue_style( 'cau_admin_styles', plugins_url( 'backend/style.css' , __FILE__ ) ); // Plugin scripts - wp_enqueue_style( 'cau_warning_styles', plugins_url( 'backend/warningbar.css' , __FILE__ ) ); // Check for issues -} -add_action( 'admin_enqueue_scripts', 'load_cau_global_styles', 99 ); - -// Load admin styles -function load_cau_page_styles( $hook ) { - - // Only load on plugins' pages - if( $hook != 'tools_page_cau-settings' && $hook != 'index_page_cau-settings' ) return; - - // WordPress scripts we need - wp_enqueue_style( 'thickbox' ); - wp_enqueue_script( 'thickbox' ); - wp_enqueue_script( 'plugin-install' ); -} -add_action( 'admin_enqueue_scripts', 'load_cau_page_styles', 100 ); - -// Send e-mails -require_once( plugin_dir_path( __FILE__ ) . 'cau_emails.php' ); - -// Add settings link on plugin page -function cau_settings_link( $links ) { - - $settings_link = ''.__( 'Settings' ).''; - $settings_link2 = ''.__( 'Help us translate', 'companion-auto-update' ).''; - $settings_link3 = ''.__( 'Donate to help development', 'companion-auto-update' ).''; - - array_unshift( $links, $settings_link2 ); - array_unshift( $links, $settings_link3 ); - if( cau_allowed_user_rights() ) array_unshift( $links, $settings_link ); - - return $links; - -} -$plugin = plugin_basename(__FILE__); -add_filter( "plugin_action_links_$plugin", "cau_settings_link" ); - -// Auto Update Class -class CAU_auto_update { - - // Enable Update filters - public function __construct() { - add_action( 'plugins_loaded', array( &$this, 'CAU_auto_update_filters' ), 1 ); - } - - public function CAU_auto_update_filters() { - - global $wpdb; - $table_name = $wpdb->prefix . "auto_updates"; - - // Disable WP emails - add_filter( 'auto_plugin_update_send_email', '__return_false' ); // Plugin updates - add_filter( 'auto_theme_update_send_email', '__return_false' ); // Theme updates - - // Enable for major updates - $configs = $wpdb->get_results( "SELECT * FROM {$table_name} WHERE name = 'major'"); - foreach ( $configs as $config ) { - if( $config->onoroff == 'on' ) add_filter( 'allow_major_auto_core_updates', '__return_true', 1 ); // Turn on - else add_filter( 'allow_major_auto_core_updates', '__return_false', 1 ); // Turn off - } - - // Enable for minor updates - $configs = $wpdb->get_results( "SELECT * FROM {$table_name} WHERE name = 'minor'"); - foreach ( $configs as $config ) { - if( $config->onoroff == 'on' ) add_filter( 'allow_minor_auto_core_updates', '__return_true', 1 ); // Turn on - else add_filter( 'allow_minor_auto_core_updates', '__return_false', 1 ); // Turn off - } - - // Enable for plugins - $configs = $wpdb->get_results( "SELECT * FROM {$table_name} WHERE name = 'plugins'"); - foreach ( $configs as $config ) { - if( $config->onoroff == 'on' ) add_filter( 'auto_update_plugin', 'cau_dontUpdatePlugins', 10, 2 ); // Turn on - else add_filter( 'auto_update_plugin', '__return_false', 1 ); // Turn off - } - - // Enable for themes - $configs = $wpdb->get_results( "SELECT * FROM {$table_name} WHERE name = 'themes'"); - foreach ( $configs as $config ) { - if( $config->onoroff == 'on' ) add_filter( 'auto_update_theme', '__return_true' ); // Turn on - else add_filter( 'auto_update_theme', '__return_false', 1 ); // Turn off - } - - // Enable for translation files - $configs = $wpdb->get_results( "SELECT * FROM {$table_name} WHERE name = 'translations'"); - foreach ( $configs as $config ) { - if( $config->onoroff == 'on' ) add_filter( 'auto_update_translation', '__return_true', 1 ); // Turn on - else add_filter( 'auto_update_translation', '__return_false', 1 ); // Turn off - } - - // WP Email Config - $configs = $wpdb->get_results( "SELECT * FROM {$table_name} WHERE name = 'wpemails'"); - foreach ( $configs as $config ) { - if( $config->onoroff == 'on' ) add_filter( 'auto_core_update_send_email', '__return_true', 1 ); // Turn on - else add_filter( 'auto_core_update_send_email', '__return_false', 1 ); // Turn off - } - - } - -} -new CAU_auto_update(); - -// Check for issues -function cau_checkForIssues( $admin_bar ) { - if( cau_pluginHasIssues() && is_admin() && cau_pluginIssueLevels() == 'high' ) { - $admin_bar->add_menu( array( - 'id' => 'cau-has-issues', - 'title' => ''.cau_pluginIssueCount().'', - 'href' => cau_url( 'status' ), - 'meta' => array( - 'target' => '_self', - 'title' => __( 'Companion Auto Update ran into a critical error. View the status log for more info.', 'companion-auto-update' ), - ), - )); - } -} -add_action( 'admin_bar_menu', 'cau_checkForIssues', 150 ); diff --git a/wp-content/upgrade-temp-backup/plugins/companion-auto-update/index.php b/wp-content/upgrade-temp-backup/plugins/companion-auto-update/index.php deleted file mode 100644 index ef5b27f6..00000000 --- a/wp-content/upgrade-temp-backup/plugins/companion-auto-update/index.php +++ /dev/null @@ -1,2 +0,0 @@ -\n" -"Language-Team: LANGUAGE \n" - -#: companion_portfolio.php:96 -msgid "Auto Updater" -msgstr "" - -#: companion_portfolio.php:122 -msgid "Auto update plugins?" -msgstr "" - -#: companion_portfolio.php:122 -msgid "Auto update themes?" -msgstr "" - -#: companion_portfolio.php:122 -msgid "Auto update minor core updates?" -msgstr "" - -#: companion_portfolio.php:122 -msgid "Auto update major core updates?" -msgstr "" - -#: companion_portfolio.php:125 -msgid "Settings saved" -msgstr "" - -#: companion_portfolio.php:125 -msgid "Settings" -msgstr "" - -#. Plugin Name of the plugin/theme -msgid "Companion Auto Update" -msgstr "" - -#. #-#-#-#-# plugin.pot (Companion Auto Update 1.0) #-#-#-#-# -#. Plugin URI of the plugin/theme -#. #-#-#-#-# plugin.pot (Companion Auto Update 1.0) #-#-#-#-# -#. Author URI of the plugin/theme -msgid "https://qreative-web.com" -msgstr "" - -#. Description of the plugin/theme -msgid "" -"This plugin auto updates all plugins, all themes and the wordpress core." -msgstr "" - -#. Author of the plugin/theme -msgid "Qreative-Web" -msgstr "" \ No newline at end of file diff --git a/wp-content/upgrade-temp-backup/plugins/companion-auto-update/languages/index.php b/wp-content/upgrade-temp-backup/plugins/companion-auto-update/languages/index.php deleted file mode 100644 index 81a4f1bd..00000000 --- a/wp-content/upgrade-temp-backup/plugins/companion-auto-update/languages/index.php +++ /dev/null @@ -1,4 +0,0 @@ - Auto Updater - -== Frequently Asked Questions == - -= Check our website for the FAQ = - -[https://codeermeneer.nl/documentation/auto-update/faq-auto-updater/](https://codeermeneer.nl/documentation/auto-update/faq-auto-updater/) - -= What features can I expect to see in the future? = - -Your feedback is what made this plugin what is and what it’ll become so keep the feedback coming! To see what features you've suggested and what we're working on [read our blogpost here](https://codeermeneer.nl/blog/companion-auto-update-and-its-future/) - -= What's the difference between WordPress 5.5 and this plugin? = - -WordPress 5.5 was released recently and it packs tons of new features. One of those features is auto-updates for plugins and themes. Something Companion Auto Update does too. -So obviously, some of you wondered what the difference would be between the default WordPress method and the one offered by Companion Auto Update and I figured I’d quickly write a blog about it, explaining the differences. - -[You can read this blogpost here](https://codeermeneer.nl/blog/wordpress-5-5-versus-companion-auto-update/) - - -== Screenshots == - -1. Full control over what to update and when to recieve notifications -2. Disable auto-updating for certain plugins and/or themes -3. Advanced scheduling options for updating and notifcations -4. Keep track of updates with the update log - -== Changelog == - -= 3.9.1 (March 8, 2024) = -* Fixed: Undefined variable $totalNum - -= 3.9.0 (February 2, 2024) = -* Fixed: Fatal error during Cron -* Fixed: PHP deprecated error for PHP 8 and up - -= 3.8.9 (January 9, 2024) = -* Fixed error: Call to undefined function is_plugin_active() - -= 3.8.8 (December 19, 2023) = -* Fixed a few minor bugs -* Made some performance improvements -* We now require at least WordPress 5.3 - -= 3.8.7.1 (September 28, 2022) = -* Tweak: Extended function_exists check with get_plugins() for the fatal error when trying to send update emails - -= 3.8.7 (September 12, 2022) = -* Fix: Fatal error when trying to send update emails - -= 3.8.6 (August 11, 2022) = -* Tweak: Code optimization for better performance - -= 3.8.5 (March 17, 2022) = -* New: Added more checks on the status page and added an explanation to some of them. -* New: Added an list of delayed updates on the status page to help with troubleshooting. -* Tweak: Made some improvements to the update delay feature. -* Tweak: Added a notice to explain that update delay does not work with WordPress update currently. -* Tweak: Improved code on the status page to be more reliable. - -= 3.8.4 (February 2, 2022) = -* Tweak: Fixed a few styling errors with WP5.9 - -= 3.8.3 (December 9, 2021) = -* New: Plugin update e-mails now have an option to link to a few important pages -* Fix: Error: Undefined index: dbupdateemails -* Fix: Error: A non-numeric value encountered - -= 3.8.2 (July 1, 2021) = -* Fix: Error: Call to undefined function get_plugin_updates() - -= 3.8.1 (June 4, 2021) = -* New: Be notified when we need your help updating to a new database version [Feature Request](https://wordpress.org/support/topic/feature-request-839/) -* Tweak: Made some under the hood performance improvements - -= 3.8.0 (January 14, 2021) = -* New: Better handling of plugins with an unknown WP version -* New: More intervals for notifications -* Fix: Call to undefined function errors - -= 3.7.1.1 (November 2, 2020) = -* Fix: Type in wp_next_scheduled - -= 3.7.1 (October 30, 2020) = -* Fix: PHP Warning: strtotime() expects parameter 2 to be integer, string given - -= 3.7 (September 8, 2020) = -* New: Delay updates with an x number of days -* New: Be notified of plugins that have not been tested with the latest 3 major releases of WordPress. -* New: Choose to see more info in the emails (like the time at which the update happened) -* Fix: "Contact for support" button will work again -* Fix: Fixed a few PHP errors -* Tweak: Made improvements to the "Fix it" button for the "All automatic updates are disabled" error. -* Tweak: You can now choose to ignore the "Search Engine Visibility" and "Cronjobs" warnings -* Tweak: Reports on the Site Health page will only show a summary and point to the status page for more information and possible fixes -* Tweak: Removed cronjob check and Search Engine Visibility check from site health -* Tweak: E-mails are now fully translatable -* Tweak: Renamed Core notifications to WordPress notifications -* Tweak: WordPress plugin and theme update notifications are now disabled - -Also: Check out what features we're working on at [our blogpost](https://codeermeneer.nl/blog/companion-auto-update-and-its-future/) - -= 3.6 (August 12, 2020) = -* New: Added an "after core update" hook [More info](https://codeermeneer.nl/documentation/codex-auto-updater/) -* New: Select which userroles can access settings. (Defaults to only administrators) -* Tweak: Added Theme and Core update method the log -* Tweak: Few WordPress 5.5 improvements - -= 3.5.5 (August 5, 2020) = -* Fix: Added better multisite support -* Tweak: We've added a bunch more checks to the status page and you can now see more passed checks. -* Support for WordPress 5.5 - -= 3.5.4.1 (June 20, 2020) = -* Fix: Sometimes the hour settings for intervals wouldn't show up - -= 3.5.4 (June 19, 2020) = -* New: See translations in the update log -* New: We've added a few checks to WordPress' Site Health page -* Fix: Error with Companion Auto Update Database Update -* Fix: Schedule interval duplicates - -= 3.5.3 (June 5, 2020) = -* New: We're working on a better update log. You should see the Update method (Manual/Automatic) in the log now. (Only works for Plugins right now) -Please report any issues with this feature over at our sticky post: [Problems with the Update method in the new update log?](https://wordpress.org/support/topic/problems-with-the-update-method-in-the-new-update-log/) -* Fix: Not able to see checks in boxes (reverted back to before it all went wrong) -* Fix: Error date_default_timezone_set(): Timezone ID +00:00 is invalid -* Tweak: The status tab will no longer show turned-off settings as an error -* Tweak: Made some improvements to the "Update pending" emails, you can now see a list of all pending updates and go directly to the update page. - -= 3.5.2 (April 1, 2020) = -* Fix: Not able to see checks in boxes - -= 3.5.1 (March 25, 2020) = -* Tweak: You seem to like the new dashboard, we've fixed a few issues regarding the responsiveness of the design. We've also tweaked the icons to be a bit more transparant. -* Tweak: We've added the release notes link to Plain text emails -* Tweak: Fixed a few typos -* Tweak: Various minor security improvements - -= 3.5.0 (March 5, 2020) = -* New: In version 3.4.6 we've changed to HTML emails rather than plain text, in this version you can opt to change it back to plain text emails -* Fix: We've 'fixed an issue where on occasion nothing would update -* Tweak: Made some improvements to the "Fix it" button for the AUTOMATIC_UPDATER_DISABLED error -* Tweak: We've changed the dashboard, moved both the settings page and de support page to the dashboard. Please let us know if you like this change or not. -* Bug: We've had to (temporarily) disable the theme filter because it was causing issues on some installations. We'll try to get it working again in a future update. - -[View full changelog](https://codeermeneer.nl/stuffs/auto-updater-changelog/) \ No newline at end of file diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/backgrounds/functions/css.php b/wp-content/upgrade-temp-backup/plugins/gp-premium/backgrounds/functions/css.php deleted file mode 100644 index e46eec65..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/backgrounds/functions/css.php +++ /dev/null @@ -1,134 +0,0 @@ -_selector ) { - $this->add_selector_rules_to_output(); - } - - $this->_selector = $selector; - - return $this; - } - - /** - * Adds a css property with value to the css output - * - * @access public - * @since 1.0 - * - * @param string $property - the css property. - * @param string $value - the value to be placed with the property. - * @param string $url Whether we need to generate URL in the string. - * @return $this - */ - public function add_property( $property, $value, $url = '' ) { - // If we don't have a value or our value is the same as our og default, bail. - if ( empty( $value ) ) { - return false; - } - - // Set up our background image URL param if needed. - $url_start = ( '' !== $url ) ? "url('" : ""; // phpcs:ignore -- need double quotes. - $url_end = ( '' !== $url ) ? "')" : ""; // phpcs:ignore -- need double quotes. - - $this->_css .= $property . ':' . $url_start . $value . $url_end . ';'; - return $this; - } - - /** - * Adds the current selector rules to the output variable - * - * @access private - * @since 1.0 - * - * @return $this - */ - private function add_selector_rules_to_output() { - if ( ! empty( $this->_css ) ) { - $this->_selector_output = $this->_selector; - $selector_output = sprintf( '%1$s{%2$s}', $this->_selector_output, $this->_css ); - - $this->_output .= $selector_output; - - // Reset the css. - $this->_css = ''; - } - - return $this; - } - - /** - * Returns the minified css in the $_output variable - * - * @access public - * @since 1.0 - * - * @return string - */ - public function css_output() { - // Add current selector's rules to output. - $this->add_selector_rules_to_output(); - - // Output minified css. - return $this->_output; - } - - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/backgrounds/functions/functions.php b/wp-content/upgrade-temp-backup/plugins/gp-premium/backgrounds/functions/functions.php deleted file mode 100644 index fb21ce01..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/backgrounds/functions/functions.php +++ /dev/null @@ -1,1342 +0,0 @@ - '', - 'body_repeat' => '', - 'body_size' => '', - 'body_attachment' => '', - 'body_position' => '', - 'top_bar_image' => '', - 'top_bar_repeat' => '', - 'top_bar_size' => '', - 'top_bar_attachment' => '', - 'top_bar_position' => '', - 'header_image' => '', - 'header_repeat' => '', - 'header_size' => '', - 'header_attachment' => '', - 'header_position' => '', - 'nav_image' => '', - 'nav_repeat' => '', - 'nav_item_image' => '', - 'nav_item_repeat' => '', - 'nav_item_hover_image' => '', - 'nav_item_hover_repeat' => '', - 'nav_item_current_image' => '', - 'nav_item_current_repeat' => '', - 'sub_nav_image' => '', - 'sub_nav_repeat' => '', - 'sub_nav_item_image' => '', - 'sub_nav_item_repeat' => '', - 'sub_nav_item_hover_image' => '', - 'sub_nav_item_hover_repeat' => '', - 'sub_nav_item_current_image' => '', - 'sub_nav_item_current_repeat' => '', - 'content_image' => '', - 'content_repeat' => '', - 'content_size' => '', - 'content_attachment' => '', - 'content_position' => '', - 'sidebar_widget_image' => '', - 'sidebar_widget_repeat' => '', - 'sidebar_widget_size' => '', - 'sidebar_widget_attachment' => '', - 'sidebar_widget_position' => '', - 'footer_widget_image' => '', - 'footer_widget_repeat' => '', - 'footer_widget_size' => '', - 'footer_widget_attachment' => '', - 'footer_widget_position' => '', - 'footer_image' => '', - 'footer_repeat' => '', - 'footer_size' => '', - 'footer_attachment' => '', - 'footer_position' => '', - ); - - return apply_filters( 'generate_background_option_defaults', $generate_background_defaults ); - } -} - -if ( ! function_exists( 'generate_backgrounds_customize' ) ) { - add_action( 'customize_register', 'generate_backgrounds_customize', 999 ); - /** - * Build our Customizer options - * - * @since 0.1 - * - * @param object $wp_customize The Customizer object. - */ - function generate_backgrounds_customize( $wp_customize ) { - $defaults = generate_get_background_defaults(); - - require_once GP_LIBRARY_DIRECTORY . 'customizer-helpers.php'; - - if ( method_exists( $wp_customize, 'register_control_type' ) ) { - $wp_customize->register_control_type( 'GeneratePress_Background_Images_Customize_Control' ); - $wp_customize->register_control_type( 'GeneratePress_Section_Shortcut_Control' ); - } - - if ( class_exists( 'WP_Customize_Panel' ) ) { - if ( ! $wp_customize->get_panel( 'generate_backgrounds_panel' ) ) { - $wp_customize->add_panel( - 'generate_backgrounds_panel', - array( - 'capability' => 'edit_theme_options', - 'theme_supports' => '', - 'title' => __( 'Background Images', 'gp-premium' ), - 'priority' => 55, - ) - ); - } - } - - $wp_customize->add_section( - 'backgrounds_section', - array( - 'title' => __( 'Background Images', 'gp-premium' ), - 'capability' => 'edit_theme_options', - 'priority' => 50, - ) - ); - - $wp_customize->add_section( - 'generate_backgrounds_body', - array( - 'title' => __( 'Body', 'gp-premium' ), - 'capability' => 'edit_theme_options', - 'priority' => 5, - 'panel' => 'generate_backgrounds_panel', - ) - ); - - $wp_customize->add_control( - new GeneratePress_Section_Shortcut_Control( - $wp_customize, - 'generate_body_background_image_shortcuts', - array( - 'section' => 'generate_backgrounds_body', - 'element' => __( 'Body', 'gp-premium' ), - 'shortcuts' => array( - 'layout' => 'generate_layout_container', - 'colors' => 'body_section', - 'typography' => 'font_section', - ), - 'settings' => ( isset( $wp_customize->selective_refresh ) ) ? array() : 'blogname', - ) - ) - ); - - /** - * Body background - */ - $wp_customize->add_setting( - 'generate_background_settings[body_image]', - array( - 'default' => $defaults['body_image'], - 'type' => 'option', - 'capability' => 'edit_theme_options', - 'sanitize_callback' => 'esc_url_raw', - ) - ); - - $wp_customize->add_control( - new WP_Customize_Image_Control( - $wp_customize, - 'generate_backgrounds-body-image', - array( - 'section' => 'generate_backgrounds_body', - 'settings' => 'generate_background_settings[body_image]', - 'label' => __( 'Body', 'gp-premium' ), - ) - ) - ); - - $wp_customize->add_setting( - 'generate_background_settings[body_repeat]', - array( - 'default' => $defaults['body_repeat'], - 'type' => 'option', - 'sanitize_callback' => 'sanitize_key', - ) - ); - - $wp_customize->add_setting( - 'generate_background_settings[body_size]', - array( - 'default' => $defaults['body_size'], - 'type' => 'option', - 'sanitize_callback' => 'sanitize_key', - ) - ); - - $wp_customize->add_setting( - 'generate_background_settings[body_attachment]', - array( - 'default' => $defaults['body_attachment'], - 'type' => 'option', - 'sanitize_callback' => 'sanitize_key', - ) - ); - - $wp_customize->add_setting( - 'generate_background_settings[body_position]', - array( - 'default' => $defaults['body_position'], - 'type' => 'option', - 'capability' => 'edit_theme_options', - 'sanitize_callback' => 'esc_html', - ) - ); - - $wp_customize->add_control( - new GeneratePress_Background_Images_Customize_Control( - $wp_customize, - 'body_backgrounds_control', - array( - 'section' => 'generate_backgrounds_body', - 'settings' => array( - 'repeat' => 'generate_background_settings[body_repeat]', - 'size' => 'generate_background_settings[body_size]', - 'attachment' => 'generate_background_settings[body_attachment]', - 'position' => 'generate_background_settings[body_position]', - ), - ) - ) - ); - - /** - * Top bar background - */ - $wp_customize->add_section( - 'generate_backgrounds_top_bar', - array( - 'title' => __( 'Top Bar', 'gp-premium' ), - 'capability' => 'edit_theme_options', - 'priority' => 5, - 'panel' => 'generate_backgrounds_panel', - 'active_callback' => 'generate_premium_is_top_bar_active', - ) - ); - - $wp_customize->add_setting( - 'generate_background_settings[top_bar_image]', - array( - 'default' => $defaults['top_bar_image'], - 'type' => 'option', - 'capability' => 'edit_theme_options', - 'sanitize_callback' => 'esc_url_raw', - ) - ); - - $wp_customize->add_control( - new WP_Customize_Image_Control( - $wp_customize, - 'generate_background_settings[top_bar_image]', - array( - 'section' => 'generate_backgrounds_top_bar', - 'settings' => 'generate_background_settings[top_bar_image]', - 'label' => __( 'Top Bar', 'gp-premium' ), - ) - ) - ); - - $wp_customize->add_setting( - 'generate_background_settings[top_bar_repeat]', - array( - 'default' => $defaults['top_bar_repeat'], - 'type' => 'option', - 'sanitize_callback' => 'sanitize_key', - ) - ); - - $wp_customize->add_setting( - 'generate_background_settings[top_bar_size]', - array( - 'default' => $defaults['top_bar_size'], - 'type' => 'option', - 'sanitize_callback' => 'sanitize_key', - ) - ); - - $wp_customize->add_setting( - 'generate_background_settings[top_bar_attachment]', - array( - 'default' => $defaults['top_bar_attachment'], - 'type' => 'option', - 'sanitize_callback' => 'sanitize_key', - ) - ); - - $wp_customize->add_setting( - 'generate_background_settings[top_bar_position]', - array( - 'default' => $defaults['top_bar_position'], - 'type' => 'option', - 'capability' => 'edit_theme_options', - 'sanitize_callback' => 'esc_html', - ) - ); - - $wp_customize->add_control( - new GeneratePress_Background_Images_Customize_Control( - $wp_customize, - 'top_bar_backgrounds_control', - array( - 'section' => 'generate_backgrounds_top_bar', - 'settings' => array( - 'repeat' => 'generate_background_settings[top_bar_repeat]', - 'size' => 'generate_background_settings[top_bar_size]', - 'attachment' => 'generate_background_settings[top_bar_attachment]', - 'position' => 'generate_background_settings[top_bar_position]', - ), - ) - ) - ); - - /** - * Header background - */ - $wp_customize->add_section( - 'generate_backgrounds_header', - array( - 'title' => __( 'Header', 'gp-premium' ), - 'capability' => 'edit_theme_options', - 'priority' => 10, - 'panel' => 'generate_backgrounds_panel', - ) - ); - - $wp_customize->add_control( - new GeneratePress_Section_Shortcut_Control( - $wp_customize, - 'generate_header_background_image_shortcuts', - array( - 'section' => 'generate_backgrounds_header', - 'element' => __( 'Header', 'gp-premium' ), - 'shortcuts' => array( - 'layout' => 'generate_layout_header', - 'colors' => 'header_color_section', - 'typography' => 'font_header_section', - ), - 'settings' => ( isset( $wp_customize->selective_refresh ) ) ? array() : 'blogname', - 'priority' => 1, - ) - ) - ); - - $wp_customize->add_setting( - 'generate_background_settings[header_image]', - array( - 'default' => $defaults['header_image'], - 'type' => 'option', - 'capability' => 'edit_theme_options', - 'sanitize_callback' => 'esc_url_raw', - ) - ); - - $wp_customize->add_control( - new WP_Customize_Image_Control( - $wp_customize, - 'generate_backgrounds-header-image', - array( - 'section' => 'generate_backgrounds_header', - 'settings' => 'generate_background_settings[header_image]', - 'label' => __( 'Header', 'gp-premium' ), - ) - ) - ); - - $wp_customize->add_setting( - 'generate_background_settings[header_repeat]', - array( - 'default' => $defaults['header_repeat'], - 'type' => 'option', - 'sanitize_callback' => 'sanitize_key', - ) - ); - - $wp_customize->add_setting( - 'generate_background_settings[header_size]', - array( - 'default' => $defaults['header_size'], - 'type' => 'option', - 'sanitize_callback' => 'sanitize_key', - ) - ); - - $wp_customize->add_setting( - 'generate_background_settings[header_attachment]', - array( - 'default' => $defaults['header_attachment'], - 'type' => 'option', - 'sanitize_callback' => 'sanitize_key', - ) - ); - - $wp_customize->add_setting( - 'generate_background_settings[header_position]', - array( - 'default' => $defaults['header_position'], - 'type' => 'option', - 'capability' => 'edit_theme_options', - 'sanitize_callback' => 'esc_html', - ) - ); - - $wp_customize->add_control( - new GeneratePress_Background_Images_Customize_Control( - $wp_customize, - 'header_backgrounds_control', - array( - 'section' => 'generate_backgrounds_header', - 'settings' => array( - 'repeat' => 'generate_background_settings[header_repeat]', - 'size' => 'generate_background_settings[header_size]', - 'attachment' => 'generate_background_settings[header_attachment]', - 'position' => 'generate_background_settings[header_position]', - ), - ) - ) - ); - - $wp_customize->add_section( - 'generate_backgrounds_navigation', - array( - 'title' => __( 'Primary Navigation', 'gp-premium' ), - 'capability' => 'edit_theme_options', - 'priority' => 15, - 'panel' => 'generate_backgrounds_panel', - ) - ); - - $wp_customize->add_control( - new GeneratePress_Section_Shortcut_Control( - $wp_customize, - 'generate_primary_navigation_background_image_shortcuts', - array( - 'section' => 'generate_backgrounds_navigation', - 'element' => __( 'Primary Navigation', 'gp-premium' ), - 'shortcuts' => array( - 'layout' => 'generate_layout_navigation', - 'colors' => 'navigation_color_section', - 'typography' => 'font_navigation_section', - ), - 'settings' => ( isset( $wp_customize->selective_refresh ) ) ? array() : 'blogname', - 'priority' => 1, - ) - ) - ); - - /** - * Navigation background - */ - $wp_customize->add_setting( - 'generate_background_settings[nav_image]', - array( - 'default' => $defaults['nav_image'], - 'type' => 'option', - 'capability' => 'edit_theme_options', - 'sanitize_callback' => 'esc_url_raw', - ) - ); - - $wp_customize->add_control( - new WP_Customize_Image_Control( - $wp_customize, - 'generate_background_settings[nav_image]', - array( - 'section' => 'generate_backgrounds_navigation', - 'settings' => 'generate_background_settings[nav_image]', - 'priority' => 750, - 'label' => __( 'Navigation', 'gp-premium' ), - ) - ) - ); - - $wp_customize->add_setting( - 'generate_background_settings[nav_repeat]', - array( - 'default' => $defaults['nav_repeat'], - 'type' => 'option', - 'sanitize_callback' => 'sanitize_key', - ) - ); - - $wp_customize->add_control( - 'generate_background_settings[nav_repeat]', - array( - 'type' => 'select', - 'section' => 'generate_backgrounds_navigation', - 'choices' => array( - '' => __( 'Repeat', 'gp-premium' ), - 'repeat-x' => __( 'Repeat x', 'gp-premium' ), - 'repeat-y' => __( 'Repeat y', 'gp-premium' ), - 'no-repeat' => __( 'No Repeat', 'gp-premium' ), - ), - 'settings' => 'generate_background_settings[nav_repeat]', - 'priority' => 800, - ) - ); - - /** - * Navigation item background - */ - $wp_customize->add_setting( - 'generate_background_settings[nav_item_image]', - array( - 'default' => $defaults['nav_item_image'], - 'type' => 'option', - 'capability' => 'edit_theme_options', - 'sanitize_callback' => 'esc_url_raw', - ) - ); - - $wp_customize->add_control( - new WP_Customize_Image_Control( - $wp_customize, - 'generate_backgrounds-nav-item-image', - array( - 'section' => 'generate_backgrounds_navigation', - 'settings' => 'generate_background_settings[nav_item_image]', - 'priority' => 950, - 'label' => __( 'Navigation Item', 'gp-premium' ), - ) - ) - ); - - $wp_customize->add_setting( - 'generate_background_settings[nav_item_repeat]', - array( - 'default' => $defaults['nav_item_repeat'], - 'type' => 'option', - 'sanitize_callback' => 'sanitize_key', - ) - ); - - $wp_customize->add_control( - 'generate_background_settings[nav_item_repeat]', - array( - 'type' => 'select', - 'section' => 'generate_backgrounds_navigation', - 'choices' => array( - '' => __( 'Repeat', 'gp-premium' ), - 'repeat-x' => __( 'Repeat x', 'gp-premium' ), - 'repeat-y' => __( 'Repeat y', 'gp-premium' ), - 'no-repeat' => __( 'No Repeat', 'gp-premium' ), - ), - 'settings' => 'generate_background_settings[nav_item_repeat]', - 'priority' => 1000, - ) - ); - - /** - * Navigation item hover background - */ - $wp_customize->add_setting( - 'generate_background_settings[nav_item_hover_image]', - array( - 'default' => $defaults['nav_item_hover_image'], - 'type' => 'option', - 'capability' => 'edit_theme_options', - 'sanitize_callback' => 'esc_url_raw', - ) - ); - - $wp_customize->add_control( - new WP_Customize_Image_Control( - $wp_customize, - 'generate_backgrounds-nav-item-hover-image', - array( - 'section' => 'generate_backgrounds_navigation', - 'settings' => 'generate_background_settings[nav_item_hover_image]', - 'priority' => 1150, - 'label' => __( 'Navigation Item Hover', 'gp-premium' ), - ) - ) - ); - - $wp_customize->add_setting( - 'generate_background_settings[nav_item_hover_repeat]', - array( - 'default' => $defaults['nav_item_hover_repeat'], - 'type' => 'option', - 'sanitize_callback' => 'sanitize_key', - ) - ); - - $wp_customize->add_control( - 'generate_background_settings[nav_item_hover_repeat]', - array( - 'type' => 'select', - 'section' => 'generate_backgrounds_navigation', - 'choices' => array( - '' => __( 'Repeat', 'gp-premium' ), - 'repeat-x' => __( 'Repeat x', 'gp-premium' ), - 'repeat-y' => __( 'Repeat y', 'gp-premium' ), - 'no-repeat' => __( 'No Repeat', 'gp-premium' ), - ), - 'settings' => 'generate_background_settings[nav_item_hover_repeat]', - 'priority' => 1200, - ) - ); - - /** - * Navigation item current background - */ - $wp_customize->add_setting( - 'generate_background_settings[nav_item_current_image]', - array( - 'default' => $defaults['nav_item_current_image'], - 'type' => 'option', - 'capability' => 'edit_theme_options', - 'sanitize_callback' => 'esc_url_raw', - ) - ); - - $wp_customize->add_control( - new WP_Customize_Image_Control( - $wp_customize, - 'generate_backgrounds-nav-item-current-image', - array( - 'section' => 'generate_backgrounds_navigation', - 'settings' => 'generate_background_settings[nav_item_current_image]', - 'priority' => 1350, - 'label' => __( 'Navigation Item Current', 'gp-premium' ), - ) - ) - ); - - $wp_customize->add_setting( - 'generate_background_settings[nav_item_current_repeat]', - array( - 'default' => $defaults['nav_item_current_repeat'], - 'type' => 'option', - 'sanitize_callback' => 'sanitize_key', - ) - ); - - $wp_customize->add_control( - 'generate_background_settings[nav_item_current_repeat]', - array( - 'type' => 'select', - 'section' => 'generate_backgrounds_navigation', - 'choices' => array( - '' => __( 'Repeat', 'gp-premium' ), - 'repeat-x' => __( 'Repeat x', 'gp-premium' ), - 'repeat-y' => __( 'Repeat y', 'gp-premium' ), - 'no-repeat' => __( 'No Repeat', 'gp-premium' ), - ), - 'settings' => 'generate_background_settings[nav_item_current_repeat]', - 'priority' => 1400, - ) - ); - - $wp_customize->add_section( - 'generate_backgrounds_subnavigation', - array( - 'title' => __( 'Primary Sub-Navigation', 'gp-premium' ), - 'capability' => 'edit_theme_options', - 'priority' => 20, - 'panel' => 'generate_backgrounds_panel', - ) - ); - - /** - * Sub-Navigation item background - */ - $wp_customize->add_setting( - 'generate_background_settings[sub_nav_item_image]', - array( - 'default' => $defaults['sub_nav_item_image'], - 'type' => 'option', - 'capability' => 'edit_theme_options', - 'sanitize_callback' => 'esc_url_raw', - ) - ); - - $wp_customize->add_control( - new WP_Customize_Image_Control( - $wp_customize, - 'generate_background_settings[sub_nav_item_image]', - array( - 'section' => 'generate_backgrounds_subnavigation', - 'settings' => 'generate_background_settings[sub_nav_item_image]', - 'priority' => 1700, - 'label' => __( 'Sub-Navigation Item', 'gp-premium' ), - ) - ) - ); - - $wp_customize->add_setting( - 'generate_background_settings[sub_nav_item_repeat]', - array( - 'default' => $defaults['sub_nav_item_repeat'], - 'type' => 'option', - 'sanitize_callback' => 'sanitize_key', - ) - ); - - $wp_customize->add_control( - 'generate_background_settings[sub_nav_item_repeat]', - array( - 'type' => 'select', - 'section' => 'generate_backgrounds_subnavigation', - 'choices' => array( - '' => __( 'Repeat', 'gp-premium' ), - 'repeat-x' => __( 'Repeat x', 'gp-premium' ), - 'repeat-y' => __( 'Repeat y', 'gp-premium' ), - 'no-repeat' => __( 'No Repeat', 'gp-premium' ), - ), - 'settings' => 'generate_background_settings[sub_nav_item_repeat]', - 'priority' => 1800, - ) - ); - - /** - * Sub-Navigation item hover background - */ - $wp_customize->add_setting( - 'generate_background_settings[sub_nav_item_hover_image]', - array( - 'default' => $defaults['sub_nav_item_hover_image'], - 'type' => 'option', - 'capability' => 'edit_theme_options', - 'sanitize_callback' => 'esc_url_raw', - ) - ); - - $wp_customize->add_control( - new WP_Customize_Image_Control( - $wp_customize, - 'generate_background_settings[sub_nav_item_hover_image]', - array( - 'section' => 'generate_backgrounds_subnavigation', - 'settings' => 'generate_background_settings[sub_nav_item_hover_image]', - 'priority' => 2000, - 'label' => __( 'Sub-Navigation Item Hover', 'gp-premium' ), - ) - ) - ); - - $wp_customize->add_setting( - 'generate_background_settings[sub_nav_item_hover_repeat]', - array( - 'default' => $defaults['sub_nav_item_hover_repeat'], - 'type' => 'option', - 'sanitize_callback' => 'sanitize_key', - ) - ); - - $wp_customize->add_control( - 'generate_background_settings[sub_nav_item_hover_repeat]', - array( - 'type' => 'select', - 'section' => 'generate_backgrounds_subnavigation', - 'choices' => array( - '' => __( 'Repeat', 'gp-premium' ), - 'repeat-x' => __( 'Repeat x', 'gp-premium' ), - 'repeat-y' => __( 'Repeat y', 'gp-premium' ), - 'no-repeat' => __( 'No Repeat', 'gp-premium' ), - ), - 'settings' => 'generate_background_settings[sub_nav_item_hover_repeat]', - 'priority' => 2100, - ) - ); - - /** - * Sub-Navigation item current background - */ - $wp_customize->add_setting( - 'generate_background_settings[sub_nav_item_current_image]', - array( - 'default' => $defaults['sub_nav_item_current_image'], - 'type' => 'option', - 'capability' => 'edit_theme_options', - 'sanitize_callback' => 'esc_url_raw', - ) - ); - - $wp_customize->add_control( - new WP_Customize_Image_Control( - $wp_customize, - 'generate_background_settings[sub_nav_item_current_image]', - array( - 'section' => 'generate_backgrounds_subnavigation', - 'settings' => 'generate_background_settings[sub_nav_item_current_image]', - 'priority' => 2300, - 'label' => __( 'Sub-Navigation Item Current', 'gp-premium' ), - ) - ) - ); - - $wp_customize->add_setting( - 'generate_background_settings[sub_nav_item_current_repeat]', - array( - 'default' => $defaults['sub_nav_item_current_repeat'], - 'type' => 'option', - 'sanitize_callback' => 'sanitize_key', - ) - ); - - $wp_customize->add_control( - 'generate_background_settings[sub_nav_item_current_repeat]', - array( - 'type' => 'select', - 'section' => 'generate_backgrounds_subnavigation', - 'choices' => array( - '' => __( 'Repeat', 'gp-premium' ), - 'repeat-x' => __( 'Repeat x', 'gp-premium' ), - 'repeat-y' => __( 'Repeat y', 'gp-premium' ), - 'no-repeat' => __( 'No Repeat', 'gp-premium' ), - ), - 'settings' => 'generate_background_settings[sub_nav_item_current_repeat]', - 'priority' => 2400, - ) - ); - - $wp_customize->add_section( - 'generate_backgrounds_content', - array( - 'title' => __( 'Content', 'gp-premium' ), - 'capability' => 'edit_theme_options', - 'priority' => 25, - 'panel' => 'generate_backgrounds_panel', - ) - ); - - $wp_customize->add_control( - new GeneratePress_Section_Shortcut_Control( - $wp_customize, - 'generate_content_background_image_shortcuts', - array( - 'section' => 'generate_backgrounds_content', - 'element' => __( 'Content', 'gp-premium' ), - 'shortcuts' => array( - 'colors' => 'content_color_section', - 'typography' => 'font_section', - ), - 'settings' => ( isset( $wp_customize->selective_refresh ) ) ? array() : 'blogname', - 'priority' => 1, - ) - ) - ); - - /** - * Content background - */ - $wp_customize->add_setting( - 'generate_background_settings[content_image]', - array( - 'default' => $defaults['content_image'], - 'type' => 'option', - 'capability' => 'edit_theme_options', - 'sanitize_callback' => 'esc_url_raw', - ) - ); - - $wp_customize->add_control( - new WP_Customize_Image_Control( - $wp_customize, - 'generate_background_settings[content_image]', - array( - 'section' => 'generate_backgrounds_content', - 'settings' => 'generate_background_settings[content_image]', - 'label' => __( 'Content', 'gp-premium' ), - ) - ) - ); - - $wp_customize->add_setting( - 'generate_background_settings[content_repeat]', - array( - 'default' => $defaults['content_repeat'], - 'type' => 'option', - 'sanitize_callback' => 'sanitize_key', - ) - ); - - $wp_customize->add_setting( - 'generate_background_settings[content_size]', - array( - 'default' => $defaults['content_size'], - 'type' => 'option', - 'sanitize_callback' => 'sanitize_key', - ) - ); - - $wp_customize->add_setting( - 'generate_background_settings[content_attachment]', - array( - 'default' => $defaults['content_attachment'], - 'type' => 'option', - 'sanitize_callback' => 'sanitize_key', - ) - ); - - $wp_customize->add_setting( - 'generate_background_settings[content_position]', - array( - 'default' => $defaults['content_position'], - 'type' => 'option', - 'capability' => 'edit_theme_options', - 'sanitize_callback' => 'esc_html', - ) - ); - - $wp_customize->add_control( - new GeneratePress_Background_Images_Customize_Control( - $wp_customize, - 'content_backgrounds_control', - array( - 'section' => 'generate_backgrounds_content', - 'settings' => array( - 'repeat' => 'generate_background_settings[content_repeat]', - 'size' => 'generate_background_settings[content_size]', - 'attachment' => 'generate_background_settings[content_attachment]', - 'position' => 'generate_background_settings[content_position]', - ), - ) - ) - ); - - $wp_customize->add_section( - 'generate_backgrounds_sidebars', - array( - 'title' => __( 'Sidebar', 'gp-premium' ), - 'capability' => 'edit_theme_options', - 'priority' => 25, - 'panel' => 'generate_backgrounds_panel', - ) - ); - - $wp_customize->add_control( - new GeneratePress_Section_Shortcut_Control( - $wp_customize, - 'generate_sidebar_background_image_shortcuts', - array( - 'section' => 'generate_backgrounds_sidebars', - 'element' => __( 'Sidebar', 'gp-premium' ), - 'shortcuts' => array( - 'layout' => 'generate_layout_sidebars', - 'colors' => 'sidebar_widget_color_section', - 'typography' => 'font_widget_section', - ), - 'settings' => ( isset( $wp_customize->selective_refresh ) ) ? array() : 'blogname', - 'priority' => 1, - ) - ) - ); - - $wp_customize->add_setting( - 'generate_background_settings[sidebar_widget_image]', - array( - 'default' => $defaults['sidebar_widget_image'], - 'type' => 'option', - 'capability' => 'edit_theme_options', - 'sanitize_callback' => 'esc_url_raw', - ) - ); - - $wp_customize->add_control( - new WP_Customize_Image_Control( - $wp_customize, - 'generate_background_settings[sidebar_widget_image]', - array( - 'section' => 'generate_backgrounds_sidebars', - 'settings' => 'generate_background_settings[sidebar_widget_image]', - 'label' => __( 'Sidebar Widgets', 'gp-premium' ), - ) - ) - ); - - $wp_customize->add_setting( - 'generate_background_settings[sidebar_widget_repeat]', - array( - 'default' => $defaults['sidebar_widget_repeat'], - 'type' => 'option', - 'sanitize_callback' => 'sanitize_key', - ) - ); - - $wp_customize->add_setting( - 'generate_background_settings[sidebar_widget_size]', - array( - 'default' => $defaults['sidebar_widget_size'], - 'type' => 'option', - 'sanitize_callback' => 'sanitize_key', - ) - ); - - $wp_customize->add_setting( - 'generate_background_settings[sidebar_widget_attachment]', - array( - 'default' => $defaults['sidebar_widget_attachment'], - 'type' => 'option', - 'sanitize_callback' => 'sanitize_key', - ) - ); - - $wp_customize->add_setting( - 'generate_background_settings[sidebar_widget_position]', - array( - 'default' => $defaults['sidebar_widget_position'], - 'type' => 'option', - 'capability' => 'edit_theme_options', - 'sanitize_callback' => 'esc_html', - ) - ); - - $wp_customize->add_control( - new GeneratePress_Background_Images_Customize_Control( - $wp_customize, - 'sidebar_backgrounds_control', - array( - 'section' => 'generate_backgrounds_sidebars', - 'settings' => array( - 'repeat' => 'generate_background_settings[sidebar_widget_repeat]', - 'size' => 'generate_background_settings[sidebar_widget_size]', - 'attachment' => 'generate_background_settings[sidebar_widget_attachment]', - 'position' => 'generate_background_settings[sidebar_widget_position]', - ), - ) - ) - ); - - $wp_customize->add_section( - 'generate_backgrounds_footer', - array( - 'title' => __( 'Footer', 'gp-premium' ), - 'capability' => 'edit_theme_options', - 'priority' => 30, - 'panel' => 'generate_backgrounds_panel', - ) - ); - - $wp_customize->add_control( - new GeneratePress_Section_Shortcut_Control( - $wp_customize, - 'generate_footer_background_image_shortcuts', - array( - 'section' => 'generate_backgrounds_footer', - 'element' => __( 'Footer', 'gp-premium' ), - 'shortcuts' => array( - 'layout' => 'generate_layout_footer', - 'colors' => 'footer_color_section', - 'typography' => 'font_footer_section', - ), - 'settings' => ( isset( $wp_customize->selective_refresh ) ) ? array() : 'blogname', - 'priority' => 1, - ) - ) - ); - - $wp_customize->add_setting( - 'generate_background_settings[footer_widget_image]', - array( - 'default' => $defaults['footer_widget_image'], - 'type' => 'option', - 'capability' => 'edit_theme_options', - 'sanitize_callback' => 'esc_url_raw', - ) - ); - - $wp_customize->add_control( - new WP_Customize_Image_Control( - $wp_customize, - 'generate_background_settings[footer_widget_image]', - array( - 'section' => 'generate_backgrounds_footer', - 'settings' => 'generate_background_settings[footer_widget_image]', - 'label' => __( 'Footer Widget Area', 'gp-premium' ), - ) - ) - ); - - $wp_customize->add_setting( - 'generate_background_settings[footer_widget_repeat]', - array( - 'default' => $defaults['footer_widget_repeat'], - 'type' => 'option', - 'sanitize_callback' => 'sanitize_key', - ) - ); - - $wp_customize->add_setting( - 'generate_background_settings[footer_widget_size]', - array( - 'default' => $defaults['footer_widget_size'], - 'type' => 'option', - 'sanitize_callback' => 'sanitize_key', - ) - ); - - $wp_customize->add_setting( - 'generate_background_settings[footer_widget_attachment]', - array( - 'default' => $defaults['footer_widget_attachment'], - 'type' => 'option', - 'sanitize_callback' => 'sanitize_key', - ) - ); - - $wp_customize->add_setting( - 'generate_background_settings[footer_widget_position]', - array( - 'default' => $defaults['footer_widget_position'], - 'type' => 'option', - 'capability' => 'edit_theme_options', - 'sanitize_callback' => 'esc_html', - ) - ); - - $wp_customize->add_control( - new GeneratePress_Background_Images_Customize_Control( - $wp_customize, - 'footer_widgets_backgrounds_control', - array( - 'section' => 'generate_backgrounds_footer', - 'settings' => array( - 'repeat' => 'generate_background_settings[footer_widget_repeat]', - 'size' => 'generate_background_settings[footer_widget_size]', - 'attachment' => 'generate_background_settings[footer_widget_attachment]', - 'position' => 'generate_background_settings[footer_widget_position]', - ), - ) - ) - ); - - $wp_customize->add_setting( - 'generate_background_settings[footer_image]', - array( - 'default' => $defaults['footer_image'], - 'type' => 'option', - 'capability' => 'edit_theme_options', - 'sanitize_callback' => 'esc_url_raw', - ) - ); - - $wp_customize->add_control( - new WP_Customize_Image_Control( - $wp_customize, - 'generate_backgrounds-footer-image', - array( - 'section' => 'generate_backgrounds_footer', - 'settings' => 'generate_background_settings[footer_image]', - 'label' => __( 'Footer Area', 'gp-premium' ), - ) - ) - ); - - $wp_customize->add_setting( - 'generate_background_settings[footer_repeat]', - array( - 'default' => $defaults['footer_repeat'], - 'type' => 'option', - 'sanitize_callback' => 'sanitize_key', - ) - ); - - $wp_customize->add_setting( - 'generate_background_settings[footer_size]', - array( - 'default' => $defaults['footer_size'], - 'type' => 'option', - 'sanitize_callback' => 'sanitize_key', - ) - ); - - $wp_customize->add_setting( - 'generate_background_settings[footer_attachment]', - array( - 'default' => $defaults['footer_attachment'], - 'type' => 'option', - 'sanitize_callback' => 'sanitize_key', - ) - ); - - $wp_customize->add_setting( - 'generate_background_settings[footer_position]', - array( - 'default' => $defaults['footer_position'], - 'type' => 'option', - 'capability' => 'edit_theme_options', - 'sanitize_callback' => 'esc_html', - ) - ); - - $wp_customize->add_control( - new GeneratePress_Background_Images_Customize_Control( - $wp_customize, - 'footer_backgrounds_control', - array( - 'section' => 'generate_backgrounds_footer', - 'settings' => array( - 'repeat' => 'generate_background_settings[footer_repeat]', - 'size' => 'generate_background_settings[footer_size]', - 'attachment' => 'generate_background_settings[footer_attachment]', - 'position' => 'generate_background_settings[footer_position]', - ), - ) - ) - ); - } -} - -if ( ! function_exists( 'generate_backgrounds_css' ) ) { - /** - * Generate the CSS in the section using the Theme Customizer - * - * @since 0.1 - */ - function generate_backgrounds_css() { - $generate_settings = wp_parse_args( - get_option( 'generate_background_settings', array() ), - generate_get_background_defaults() - ); - - // Fix size values. - // Spaces and % are stripped by sanitize_key. - $generate_settings['body_size'] = ( '100' == $generate_settings['body_size'] ) ? '100% auto' : esc_attr( $generate_settings['body_size'] ); // phpcs:ignore -- Non-strict comparison ok. - $generate_settings['top_bar_size'] = ( '100' == $generate_settings['top_bar_size'] ) ? '100% auto' : esc_attr( $generate_settings['top_bar_size'] ); // phpcs:ignore -- Non-strict comparison ok. - $generate_settings['header_size'] = ( '100' == $generate_settings['header_size'] ) ? '100% auto' : esc_attr( $generate_settings['header_size'] ); // phpcs:ignore -- Non-strict comparison ok. - $generate_settings['content_size'] = ( '100' == $generate_settings['content_size'] ) ? '100% auto' : esc_attr( $generate_settings['content_size'] ); // phpcs:ignore -- Non-strict comparison ok. - $generate_settings['sidebar_widget_size'] = ( '100' == $generate_settings['sidebar_widget_size'] ) ? '100% auto' : esc_attr( $generate_settings['sidebar_widget_size'] ); // phpcs:ignore -- Non-strict comparison ok. - $generate_settings['footer_widget_size'] = ( '100' == $generate_settings['footer_widget_size'] ) ? '100% auto' : esc_attr( $generate_settings['footer_widget_size'] ); // phpcs:ignore -- Non-strict comparison ok. - $generate_settings['footer_size'] = ( '100' == $generate_settings['footer_size'] ) ? '100% auto' : esc_attr( $generate_settings['footer_size'] ); // phpcs:ignore -- Non-strict comparison ok. - - $css = new GeneratePress_Backgrounds_CSS(); - - $css->set_selector( 'body' ); - $css->add_property( 'background-image', esc_url( $generate_settings['body_image'] ), 'url' ); - $css->add_property( 'background-repeat', esc_attr( $generate_settings['body_repeat'] ) ); - $css->add_property( 'background-size', esc_attr( $generate_settings['body_size'] ) ); - $css->add_property( 'background-attachment', esc_attr( $generate_settings['body_attachment'] ) ); - $css->add_property( 'background-position', esc_attr( $generate_settings['body_position'] ) ); - - if ( is_active_sidebar( 'top-bar' ) ) { - $css->set_selector( '.top-bar' ); - $css->add_property( 'background-image', esc_url( $generate_settings['top_bar_image'] ), 'url' ); - $css->add_property( 'background-repeat', esc_attr( $generate_settings['top_bar_repeat'] ) ); - $css->add_property( 'background-size', esc_attr( $generate_settings['top_bar_size'] ) ); - $css->add_property( 'background-attachment', esc_attr( $generate_settings['top_bar_attachment'] ) ); - $css->add_property( 'background-position', esc_attr( $generate_settings['top_bar_position'] ) ); - } - - $css->set_selector( '.site-header' ); - $css->add_property( 'background-image', esc_url( $generate_settings['header_image'] ), 'url' ); - $css->add_property( 'background-repeat', esc_attr( $generate_settings['header_repeat'] ) ); - $css->add_property( 'background-size', esc_attr( $generate_settings['header_size'] ) ); - $css->add_property( 'background-attachment', esc_attr( $generate_settings['header_attachment'] ) ); - $css->add_property( 'background-position', esc_attr( $generate_settings['header_position'] ) ); - - $css->set_selector( '.main-navigation, .main-navigation .menu-toggle' ); - $css->add_property( 'background-image', esc_url( $generate_settings['nav_image'] ), 'url' ); - $css->add_property( 'background-repeat', esc_attr( $generate_settings['nav_repeat'] ) ); - - $css->set_selector( '.main-navigation .main-nav > ul > li > a' ); - $css->add_property( 'background-image', esc_url( $generate_settings['nav_item_image'] ), 'url' ); - $css->add_property( 'background-repeat', esc_attr( $generate_settings['nav_item_repeat'] ) ); - - $css->set_selector( '.main-navigation .main-nav > ul > li > a:hover,.main-navigation .main-nav > ul > li.sfHover > a' ); - $css->add_property( 'background-image', esc_url( $generate_settings['nav_item_hover_image'] ), 'url' ); - $css->add_property( 'background-repeat', esc_attr( $generate_settings['nav_item_hover_repeat'] ) ); - - $css->set_selector( '.main-navigation .main-nav > ul > li[class*="current-menu-"] > a,.main-navigation .main-nav > ul > li[class*="current-menu-"] > a:hover,.main-navigation .main-nav > ul > li[class*="current-menu-"].sfHover > a' ); - $css->add_property( 'background-image', esc_url( $generate_settings['nav_item_current_image'] ), 'url' ); - $css->add_property( 'background-repeat', esc_attr( $generate_settings['nav_item_current_repeat'] ) ); - - $css->set_selector( '.main-navigation ul ul li a' ); - $css->add_property( 'background-image', esc_url( $generate_settings['sub_nav_item_image'] ), 'url' ); - $css->add_property( 'background-repeat', esc_attr( $generate_settings['sub_nav_item_repeat'] ) ); - - $css->set_selector( '.main-navigation ul ul li > a:hover,.main-navigation ul ul li.sfHover > a' ); - $css->add_property( 'background-image', esc_url( $generate_settings['sub_nav_item_hover_image'] ), 'url' ); - $css->add_property( 'background-repeat', esc_attr( $generate_settings['sub_nav_item_hover_repeat'] ) ); - - $css->set_selector( '.main-navigation ul ul li[class*="current-menu-"] > a,.main-navigation ul ul li[class*="current-menu-"] > a:hover,.main-navigation ul ul li[class*="current-menu-"].sfHover > a' ); - $css->add_property( 'background-image', esc_url( $generate_settings['sub_nav_item_current_image'] ), 'url' ); - $css->add_property( 'background-repeat', esc_attr( $generate_settings['sub_nav_item_current_repeat'] ) ); - - $css->set_selector( '.separate-containers .inside-article,.separate-containers .comments-area,.separate-containers .page-header,.one-container .container,.separate-containers .paging-navigation,.separate-containers .inside-page-header' ); - $css->add_property( 'background-image', esc_url( $generate_settings['content_image'] ), 'url' ); - $css->add_property( 'background-repeat', esc_attr( $generate_settings['content_repeat'] ) ); - $css->add_property( 'background-size', esc_attr( $generate_settings['content_size'] ) ); - $css->add_property( 'background-attachment', esc_attr( $generate_settings['content_attachment'] ) ); - $css->add_property( 'background-position', esc_attr( $generate_settings['content_position'] ) ); - - $css->set_selector( '.sidebar .widget' ); - $css->add_property( 'background-image', esc_url( $generate_settings['sidebar_widget_image'] ), 'url' ); - $css->add_property( 'background-repeat', esc_attr( $generate_settings['sidebar_widget_repeat'] ) ); - $css->add_property( 'background-size', esc_attr( $generate_settings['sidebar_widget_size'] ) ); - $css->add_property( 'background-attachment', esc_attr( $generate_settings['sidebar_widget_attachment'] ) ); - $css->add_property( 'background-position', esc_attr( $generate_settings['sidebar_widget_position'] ) ); - - $css->set_selector( '.footer-widgets' ); - $css->add_property( 'background-image', esc_url( $generate_settings['footer_widget_image'] ), 'url' ); - $css->add_property( 'background-repeat', esc_attr( $generate_settings['footer_widget_repeat'] ) ); - $css->add_property( 'background-size', esc_attr( $generate_settings['footer_widget_size'] ) ); - $css->add_property( 'background-attachment', esc_attr( $generate_settings['footer_widget_attachment'] ) ); - $css->add_property( 'background-position', esc_attr( $generate_settings['footer_widget_position'] ) ); - - $css->set_selector( '.site-info' ); - $css->add_property( 'background-image', esc_url( $generate_settings['footer_image'] ), 'url' ); - $css->add_property( 'background-repeat', esc_attr( $generate_settings['footer_repeat'] ) ); - $css->add_property( 'background-size', esc_attr( $generate_settings['footer_size'] ) ); - $css->add_property( 'background-attachment', esc_attr( $generate_settings['footer_attachment'] ) ); - $css->add_property( 'background-position', esc_attr( $generate_settings['footer_position'] ) ); - - return apply_filters( 'generate_backgrounds_css_output', $css->css_output() ); - } -} - -if ( ! function_exists( 'generate_background_scripts' ) ) { - add_action( 'wp_enqueue_scripts', 'generate_background_scripts', 70 ); - /** - * Enqueue scripts and styles. - * - * @since 0.1 - */ - function generate_background_scripts() { - if ( 'inline' === generate_get_css_print_method() ) { - wp_add_inline_style( 'generate-style', generate_backgrounds_css() ); - } - } -} - -add_filter( 'generate_external_dynamic_css_output', 'generate_backgrounds_add_external_css' ); -/** - * Add to external stylesheet. - * - * @since 1.11.0 - * - * @param string $css Existing CSS. - */ -function generate_backgrounds_add_external_css( $css ) { - if ( 'inline' === generate_get_css_print_method() ) { - return $css; - } - - $css .= generate_backgrounds_css(); - - return $css; -} diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/backgrounds/functions/secondary-nav-backgrounds.php b/wp-content/upgrade-temp-backup/plugins/gp-premium/backgrounds/functions/secondary-nav-backgrounds.php deleted file mode 100644 index fdc17f1d..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/backgrounds/functions/secondary-nav-backgrounds.php +++ /dev/null @@ -1,420 +0,0 @@ -get_section( 'secondary_nav_section' ) ) { - return; - } - - $defaults = generate_secondary_nav_get_defaults(); - - if ( method_exists( $wp_customize, 'register_control_type' ) ) { - $wp_customize->register_control_type( 'GeneratePress_Section_Shortcut_Control' ); - } - - require_once GP_LIBRARY_DIRECTORY . 'customizer-helpers.php'; - - $wp_customize->add_section( - 'secondary_bg_images_section', - array( - 'title' => __( 'Secondary Navigation', 'gp-premium' ), - 'capability' => 'edit_theme_options', - 'description' => '', - 'panel' => 'generate_backgrounds_panel', - 'priority' => 21, - ) - ); - - $wp_customize->add_control( - new GeneratePress_Section_Shortcut_Control( - $wp_customize, - 'generate_secondary_navigation_background_image_shortcuts', - array( - 'section' => 'secondary_bg_images_section', - 'element' => __( 'Secondary Navigation', 'gp-premium' ), - 'shortcuts' => array( - 'layout' => 'secondary_nav_section', - 'colors' => 'secondary_navigation_color_section', - 'typography' => 'secondary_font_section', - ), - 'settings' => ( isset( $wp_customize->selective_refresh ) ) ? array() : 'blogname', - 'priority' => 1, - ) - ) - ); - - $wp_customize->add_setting( - 'generate_secondary_nav_settings[nav_image]', - array( - 'default' => $defaults['nav_image'], - 'type' => 'option', - 'capability' => 'edit_theme_options', - 'sanitize_callback' => 'esc_url_raw', - ) - ); - - $wp_customize->add_control( - new WP_Customize_Image_Control( - $wp_customize, - 'generate_secondary_backgrounds-nav-image', - array( - 'section' => 'secondary_bg_images_section', - 'settings' => 'generate_secondary_nav_settings[nav_image]', - 'priority' => 750, - 'label' => __( 'Navigation', 'gp-premium' ), - ) - ) - ); - - $wp_customize->add_setting( - 'generate_secondary_nav_settings[nav_repeat]', - array( - 'default' => $defaults['nav_repeat'], - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_choices', - ) - ); - - $wp_customize->add_control( - 'generate_secondary_nav_settings[nav_repeat]', - array( - 'type' => 'select', - 'section' => 'secondary_bg_images_section', - 'choices' => array( - '' => __( 'Repeat', 'gp-premium' ), - 'repeat-x' => __( 'Repeat x', 'gp-premium' ), - 'repeat-y' => __( 'Repeat y', 'gp-premium' ), - 'no-repeat' => __( 'No Repeat', 'gp-premium' ), - ), - 'settings' => 'generate_secondary_nav_settings[nav_repeat]', - 'priority' => 800, - ) - ); - - $wp_customize->add_setting( - 'generate_secondary_nav_settings[nav_item_image]', - array( - 'default' => $defaults['nav_item_image'], - 'type' => 'option', - 'capability' => 'edit_theme_options', - 'sanitize_callback' => 'esc_url_raw', - ) - ); - - $wp_customize->add_control( - new WP_Customize_Image_Control( - $wp_customize, - 'generate_secondary_backgrounds-nav-item-image', - array( - 'section' => 'secondary_bg_images_section', - 'settings' => 'generate_secondary_nav_settings[nav_item_image]', - 'priority' => 950, - 'label' => __( 'Navigation Item', 'gp-premium' ), - ) - ) - ); - - $wp_customize->add_setting( - 'generate_secondary_nav_settings[nav_item_repeat]', - array( - 'default' => $defaults['nav_item_repeat'], - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_choices', - ) - ); - - $wp_customize->add_control( - 'generate_secondary_nav_settings[nav_item_repeat]', - array( - 'type' => 'select', - 'section' => 'secondary_bg_images_section', - 'choices' => array( - '' => __( 'Repeat', 'gp-premium' ), - 'repeat-x' => __( 'Repeat x', 'gp-premium' ), - 'repeat-y' => __( 'Repeat y', 'gp-premium' ), - 'no-repeat' => __( 'No Repeat', 'gp-premium' ), - ), - 'settings' => 'generate_secondary_nav_settings[nav_item_repeat]', - 'priority' => 1000, - ) - ); - - $wp_customize->add_setting( - 'generate_secondary_nav_settings[nav_item_hover_image]', - array( - 'default' => $defaults['nav_item_hover_image'], - 'type' => 'option', - 'capability' => 'edit_theme_options', - 'sanitize_callback' => 'esc_url_raw', - ) - ); - - $wp_customize->add_control( - new WP_Customize_Image_Control( - $wp_customize, - 'generate_secondary_backgrounds-nav-item-hover-image', - array( - 'section' => 'secondary_bg_images_section', - 'settings' => 'generate_secondary_nav_settings[nav_item_hover_image]', - 'priority' => 1150, - 'label' => __( 'Navigation Item Hover', 'gp-premium' ), - ) - ) - ); - - $wp_customize->add_setting( - 'generate_secondary_nav_settings[nav_item_hover_repeat]', - array( - 'default' => $defaults['nav_item_hover_repeat'], - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_choices', - ) - ); - - $wp_customize->add_control( - 'generate_secondary_nav_settings[nav_item_hover_repeat]', - array( - 'type' => 'select', - 'section' => 'secondary_bg_images_section', - 'choices' => array( - '' => __( 'Repeat', 'gp-premium' ), - 'repeat-x' => __( 'Repeat x', 'gp-premium' ), - 'repeat-y' => __( 'Repeat y', 'gp-premium' ), - 'no-repeat' => __( 'No Repeat', 'gp-premium' ), - ), - 'settings' => 'generate_secondary_nav_settings[nav_item_hover_repeat]', - 'priority' => 1200, - ) - ); - - $wp_customize->add_setting( - 'generate_secondary_nav_settings[nav_item_current_image]', - array( - 'default' => $defaults['nav_item_current_image'], - 'type' => 'option', - 'capability' => 'edit_theme_options', - 'sanitize_callback' => 'esc_url_raw', - ) - ); - - $wp_customize->add_control( - new WP_Customize_Image_Control( - $wp_customize, - 'generate_secondary_backgrounds-nav-item-current-image', - array( - 'section' => 'secondary_bg_images_section', - 'settings' => 'generate_secondary_nav_settings[nav_item_current_image]', - 'priority' => 1350, - 'label' => __( 'Navigation Item Current', 'gp-premium' ), - ) - ) - ); - - $wp_customize->add_setting( - 'generate_secondary_nav_settings[nav_item_current_repeat]', - array( - 'default' => $defaults['nav_item_current_repeat'], - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_choices', - ) - ); - - $wp_customize->add_control( - 'generate_secondary_nav_settings[nav_item_current_repeat]', - array( - 'type' => 'select', - 'section' => 'secondary_bg_images_section', - 'choices' => array( - '' => __( 'Repeat', 'gp-premium' ), - 'repeat-x' => __( 'Repeat x', 'gp-premium' ), - 'repeat-y' => __( 'Repeat y', 'gp-premium' ), - 'no-repeat' => __( 'No Repeat', 'gp-premium' ), - ), - 'settings' => 'generate_secondary_nav_settings[nav_item_current_repeat]', - 'priority' => 1400, - ) - ); - - $wp_customize->add_section( - 'secondary_subnav_bg_images_section', - array( - 'title' => __( 'Secondary Sub-Navigation', 'gp-premium' ), - 'capability' => 'edit_theme_options', - 'description' => '', - 'panel' => 'generate_backgrounds_panel', - 'priority' => 22, - ) - ); - - $wp_customize->add_setting( - 'generate_secondary_nav_settings[sub_nav_item_image]', - array( - 'default' => $defaults['sub_nav_item_image'], - 'type' => 'option', - 'capability' => 'edit_theme_options', - 'sanitize_callback' => 'esc_url_raw', - ) - ); - - $wp_customize->add_control( - new WP_Customize_Image_Control( - $wp_customize, - 'generate_secondary_backgrounds-sub-nav-item-image', - array( - 'section' => 'secondary_subnav_bg_images_section', - 'settings' => 'generate_secondary_nav_settings[sub_nav_item_image]', - 'priority' => 1700, - 'label' => __( 'Sub-Navigation Item', 'gp-premium' ), - ) - ) - ); - - $wp_customize->add_setting( - 'generate_secondary_nav_settings[sub_nav_item_repeat]', - array( - 'default' => $defaults['sub_nav_item_repeat'], - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_choices', - ) - ); - - $wp_customize->add_control( - 'generate_secondary_nav_settings[sub_nav_item_repeat]', - array( - 'type' => 'select', - 'section' => 'secondary_subnav_bg_images_section', - 'choices' => array( - '' => __( 'Repeat', 'gp-premium' ), - 'repeat-x' => __( 'Repeat x', 'gp-premium' ), - 'repeat-y' => __( 'Repeat y', 'gp-premium' ), - 'no-repeat' => __( 'No Repeat', 'gp-premium' ), - ), - 'settings' => 'generate_secondary_nav_settings[sub_nav_item_repeat]', - 'priority' => 1800, - ) - ); - - $wp_customize->add_setting( - 'generate_secondary_nav_settings[sub_nav_item_hover_image]', - array( - 'default' => $defaults['sub_nav_item_hover_image'], - 'type' => 'option', - 'capability' => 'edit_theme_options', - 'sanitize_callback' => 'esc_url_raw', - ) - ); - - $wp_customize->add_control( - new WP_Customize_Image_Control( - $wp_customize, - 'generate_secondary_backgrounds-sub-nav-item-hover-image', - array( - 'section' => 'secondary_subnav_bg_images_section', - 'settings' => 'generate_secondary_nav_settings[sub_nav_item_hover_image]', - 'priority' => 2000, - 'label' => __( 'Sub-Navigation Item Hover', 'gp-premium' ), - ) - ) - ); - - $wp_customize->add_setting( - 'generate_secondary_nav_settings[sub_nav_item_hover_repeat]', - array( - 'default' => $defaults['sub_nav_item_hover_repeat'], - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_choices', - ) - ); - - $wp_customize->add_control( - 'generate_secondary_nav_settings[sub_nav_item_hover_repeat]', - array( - 'type' => 'select', - 'section' => 'secondary_subnav_bg_images_section', - 'choices' => array( - '' => __( 'Repeat', 'gp-premium' ), - 'repeat-x' => __( 'Repeat x', 'gp-premium' ), - 'repeat-y' => __( 'Repeat y', 'gp-premium' ), - 'no-repeat' => __( 'No Repeat', 'gp-premium' ), - ), - 'settings' => 'generate_secondary_nav_settings[sub_nav_item_hover_repeat]', - 'priority' => 2100, - ) - ); - - $wp_customize->add_setting( - 'generate_secondary_nav_settings[sub_nav_item_current_image]', - array( - 'default' => $defaults['sub_nav_item_current_image'], - 'type' => 'option', - 'capability' => 'edit_theme_options', - 'sanitize_callback' => 'esc_url_raw', - ) - ); - - $wp_customize->add_control( - new WP_Customize_Image_Control( - $wp_customize, - 'generate_secondary_backgrounds-sub-nav-item-current-image', - array( - 'section' => 'secondary_subnav_bg_images_section', - 'settings' => 'generate_secondary_nav_settings[sub_nav_item_current_image]', - 'priority' => 2300, - 'label' => __( 'Sub-Navigation Item Current', 'gp-premium' ), - ) - ) - ); - - $wp_customize->add_setting( - 'generate_secondary_nav_settings[sub_nav_item_current_repeat]', - array( - 'default' => $defaults['sub_nav_item_current_repeat'], - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_choices', - ) - ); - - $wp_customize->add_control( - 'generate_secondary_nav_settings[sub_nav_item_current_repeat]', - array( - 'type' => 'select', - 'section' => 'secondary_subnav_bg_images_section', - 'choices' => array( - '' => __( 'Repeat', 'gp-premium' ), - 'repeat-x' => __( 'Repeat x', 'gp-premium' ), - 'repeat-y' => __( 'Repeat y', 'gp-premium' ), - 'no-repeat' => __( 'No Repeat', 'gp-premium' ), - ), - 'settings' => 'generate_secondary_nav_settings[sub_nav_item_current_repeat]', - 'priority' => 2400, - ) - ); - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/backgrounds/generate-backgrounds.php b/wp-content/upgrade-temp-backup/plugins/gp-premium/backgrounds/generate-backgrounds.php deleted file mode 100644 index d9cd1055..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/backgrounds/generate-backgrounds.php +++ /dev/null @@ -1,19 +0,0 @@ -post_count ) { - $columns = false; - } - } - - // Return the result. - return apply_filters( 'generate_blog_columns', $columns ); - } -} - -if ( ! function_exists( 'generate_blog_get_masonry' ) ) { - /** - * Check if masonry is enabled. - * This function is a mess with strings as bools etc.. Will re-write in a big upate to get lots of testing. - */ - function generate_blog_get_masonry() { - $generate_blog_settings = wp_parse_args( - get_option( 'generate_blog_settings', array() ), - generate_blog_get_defaults() - ); - - // If masonry is enabled via option or filter, enable it. - // phpcs:ignore -- non-strict comparison allowed. - if ( $generate_blog_settings['masonry'] || 'true' == apply_filters( 'generate_blog_masonry', 'false' ) ) { - $masonry = 'true'; - } else { - $masonry = 'false'; - } - - // Allow masonry to be turned off using a boolean. - if ( false === apply_filters( 'generate_blog_masonry', 'false' ) ) { - $masonry = 'false'; - } - - return $masonry; - } -} - -if ( ! function_exists( 'generate_blog_add_columns_container' ) ) { - add_action( 'generate_before_main_content', 'generate_blog_add_columns_container' ); - /** - * Add columns container - * - * @since 1.0 - */ - function generate_blog_add_columns_container() { - if ( ! generate_blog_get_columns() ) { - return; - } - - $columns = generate_blog_get_column_count(); - - printf( - '
%2$s', - 'false' !== generate_blog_get_masonry() ? 'masonry-container are-images-unloaded' : '', - 'false' !== generate_blog_get_masonry() ? '
' : '' // phpcs:ignore -- no escaping needed. - ); - } -} - -if ( ! function_exists( 'generate_blog_add_ending_columns_container' ) ) { - add_action( 'generate_after_main_content', 'generate_blog_add_ending_columns_container' ); - /** - * Add closing columns container - * - * @since 1.0 - */ - function generate_blog_add_ending_columns_container() { - if ( ! generate_blog_get_columns() ) { - return; - } - - echo '
'; - } -} - -if ( ! function_exists( 'generate_blog_columns_css' ) ) { - /** - * Add inline CSS - */ - function generate_blog_columns_css() { - $generate_blog_settings = wp_parse_args( - get_option( 'generate_blog_settings', array() ), - generate_blog_get_defaults() - ); - - if ( function_exists( 'generate_spacing_get_defaults' ) ) { - $spacing_settings = wp_parse_args( - get_option( 'generate_spacing_settings', array() ), - generate_spacing_get_defaults() - ); - } - - $separator = ( function_exists( 'generate_spacing_get_defaults' ) ) ? absint( $spacing_settings['separator'] ) : 20; - - $return = ''; - if ( generate_blog_get_columns() ) { - $return .= '.generate-columns {margin-bottom: ' . $separator . 'px;padding-left: ' . $separator . 'px;}'; - $return .= '.generate-columns-container {margin-left: -' . $separator . 'px;}'; - $return .= '.page-header {margin-bottom: ' . $separator . 'px;margin-left: ' . $separator . 'px}'; - $return .= '.generate-columns-container > .paging-navigation {margin-left: ' . $separator . 'px;}'; - } - - return $return; - } -} - -if ( ! function_exists( 'generate_blog_get_column_count' ) ) { - /** - * Get our column grid class - */ - function generate_blog_get_column_count() { - $generate_blog_settings = wp_parse_args( - get_option( 'generate_blog_settings', array() ), - generate_blog_get_defaults() - ); - - $count = $generate_blog_settings['columns']; - - return apply_filters( 'generate_blog_get_column_count', $count ); - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/blog/functions/css/columns.css b/wp-content/upgrade-temp-backup/plugins/gp-premium/blog/functions/css/columns.css deleted file mode 100644 index 1066ab1f..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/blog/functions/css/columns.css +++ /dev/null @@ -1,149 +0,0 @@ -.masonry-enabled .page-header { - position: relative !important; -} - -.separate-containers .site-main > .generate-columns-container { - margin-bottom: 0; -} - -.masonry-container.are-images-unloaded, -.load-more.are-images-unloaded, -.masonry-enabled #nav-below { - opacity: 0; -} - -/* columns */ -.generate-columns-container:not(.masonry-container) { - display: flex; - flex-wrap: wrap; - align-items: stretch; -} - -.generate-columns .inside-article { - height: 100%; - box-sizing: border-box; -} - -.generate-columns-activated.post-image-aligned-left .generate-columns-container article:not(.featured-column) .post-image, -.generate-columns-activated.post-image-aligned-right .generate-columns-container article:not(.featured-column) .post-image { - float: none; - text-align: center; - margin-left: 0; - margin-right: 0; -} - -.generate-columns-container .paging-navigation, -.generate-columns-container .page-header { - flex: 1 1 100%; - clear: both; -} - -.generate-columns-container .paging-navigation { - margin-bottom: 0; -} - -.load-more:not(.has-svg-icon) .button.loading:before { - content: "\e900"; - display: inline-block; - font-family: "GP Premium"; - font-style: normal; - font-weight: normal; - font-variant: normal; - text-transform: none; - line-height: 1; - animation: spin 2s infinite linear; - margin-right: 7px; -} - -.load-more .button:not(.loading) .gp-icon { - display: none; -} - -.load-more .gp-icon svg { - animation: spin 2s infinite linear; - margin-right: 7px; -} - -@keyframes spin { - 0% { - transform: rotate(0deg); - } - 100% { - transform: rotate(360deg); - } -} - -.generate-columns { - box-sizing: border-box; -} - -.generate-columns.grid-20, -.grid-sizer.grid-20 { - width: 20%; -} - -.generate-columns.grid-25, -.grid-sizer.grid-25 { - width: 25%; -} - -.generate-columns.grid-33, -.grid-sizer.grid-33 { - width: 33.3333%; -} - -.generate-columns.grid-50, -.grid-sizer.grid-50 { - width: 50%; -} - -.generate-columns.grid-60, -.grid-sizer.grid-60 { - width: 60%; -} - -.generate-columns.grid-66, -.grid-sizer.grid-66 { - width: 66.66667%; -} - -.generate-columns.grid-100, -.grid-sizer.grid-100 { - width: 100%; -} - -@media (min-width: 768px) and (max-width: 1024px) { - .generate-columns.tablet-grid-50, - .grid-sizer.tablet-grid-50 { - width: 50%; - } -} - -@media (max-width: 767px) { - .generate-columns-activated .generate-columns-container { - margin-left: 0; - margin-right: 0; - } - .generate-columns-container > *, - .generate-columns-container .generate-columns { - padding-left: 0; - } - .generate-columns-container .page-header { - margin-left: 0; - } - .generate-columns.mobile-grid-100, - .grid-sizer.mobile-grid-100 { - width: 100%; - } - .generate-columns-container > .paging-navigation { - margin-left: 0; - } -} - -@media (max-width: 768px) { - .load-more { - display: block; - text-align: center; - margin-bottom: 0; - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/blog/functions/css/columns.min.css b/wp-content/upgrade-temp-backup/plugins/gp-premium/blog/functions/css/columns.min.css deleted file mode 100644 index 3814f76b..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/blog/functions/css/columns.min.css +++ /dev/null @@ -1 +0,0 @@ -.masonry-enabled .page-header{position:relative!important}.separate-containers .site-main>.generate-columns-container{margin-bottom:0}.load-more.are-images-unloaded,.masonry-container.are-images-unloaded,.masonry-enabled #nav-below{opacity:0}.generate-columns-container:not(.masonry-container){display:flex;flex-wrap:wrap;align-items:stretch}.generate-columns .inside-article{height:100%;box-sizing:border-box}.generate-columns-activated.post-image-aligned-left .generate-columns-container article:not(.featured-column) .post-image,.generate-columns-activated.post-image-aligned-right .generate-columns-container article:not(.featured-column) .post-image{float:none;text-align:center;margin-left:0;margin-right:0}.generate-columns-container .page-header,.generate-columns-container .paging-navigation{flex:1 1 100%;clear:both}.generate-columns-container .paging-navigation{margin-bottom:0}.load-more:not(.has-svg-icon) .button.loading:before{content:"\e900";display:inline-block;font-family:"GP Premium";font-style:normal;font-weight:400;font-variant:normal;text-transform:none;line-height:1;animation:spin 2s infinite linear;margin-right:7px}.load-more .button:not(.loading) .gp-icon{display:none}.load-more .gp-icon svg{animation:spin 2s infinite linear;margin-right:7px}@keyframes spin{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}.generate-columns{box-sizing:border-box}.generate-columns.grid-20,.grid-sizer.grid-20{width:20%}.generate-columns.grid-25,.grid-sizer.grid-25{width:25%}.generate-columns.grid-33,.grid-sizer.grid-33{width:33.3333%}.generate-columns.grid-50,.grid-sizer.grid-50{width:50%}.generate-columns.grid-60,.grid-sizer.grid-60{width:60%}.generate-columns.grid-66,.grid-sizer.grid-66{width:66.66667%}.generate-columns.grid-100,.grid-sizer.grid-100{width:100%}@media (min-width:768px) and (max-width:1024px){.generate-columns.tablet-grid-50,.grid-sizer.tablet-grid-50{width:50%}}@media (max-width:767px){.generate-columns-activated .generate-columns-container{margin-left:0;margin-right:0}.generate-columns-container .generate-columns,.generate-columns-container>*{padding-left:0}.generate-columns-container .page-header{margin-left:0}.generate-columns.mobile-grid-100,.grid-sizer.mobile-grid-100{width:100%}.generate-columns-container>.paging-navigation{margin-left:0}}@media (max-width:768px){.load-more{display:block;text-align:center;margin-bottom:0}} \ No newline at end of file diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/blog/functions/css/featured-images.css b/wp-content/upgrade-temp-backup/plugins/gp-premium/blog/functions/css/featured-images.css deleted file mode 100644 index c3efa57f..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/blog/functions/css/featured-images.css +++ /dev/null @@ -1,104 +0,0 @@ -.post-image-above-header .inside-article .post-image, -.post-image-above-header .inside-article .featured-image { - margin-top: 0; - margin-bottom: 2em; -} - -.post-image-aligned-left .inside-article .post-image, -.post-image-aligned-left .inside-article .featured-image { - margin-top: 0; - margin-right: 2em; - float: left; - text-align: left; -} - -.post-image-aligned-center .post-image, -.post-image-aligned-center .featured-image { - text-align: center; -} - -.post-image-aligned-right .inside-article .post-image, -.post-image-aligned-right .inside-article .featured-image { - margin-top: 0; - margin-left: 2em; - float: right; - text-align: right; -} - -.post-image-below-header.post-image-aligned-right .inside-article .post-image, -.post-image-below-header.post-image-aligned-right .inside-article .featured-image, -.post-image-below-header.post-image-aligned-center .inside-article .featured-image, -.post-image-below-header.post-image-aligned-left .inside-article .post-image, -.post-image-below-header.post-image-aligned-left .inside-article .featured-image { - margin-top: 2em; -} - -.post-image-aligned-left > .featured-image, -.post-image-aligned-right > .featured-image { - float: none; - margin-left: auto; - margin-right: auto; -} - -.post-image-aligned-left .featured-image { - text-align: left; -} - -.post-image-aligned-right .featured-image { - text-align: right; -} - -.post-image-aligned-left .inside-article:before, -.post-image-aligned-left .inside-article:after, -.post-image-aligned-right .inside-article:before, -.post-image-aligned-right .inside-article:after { - content: ""; - display: table; -} - -.post-image-aligned-left .inside-article:after, -.post-image-aligned-right .inside-article:after { - clear: both; -} - -.one-container.post-image-above-header .page-header + .no-featured-image-padding .inside-article .post-image, -.one-container.post-image-above-header .no-featured-image-padding.generate-columns .inside-article .post-image { - margin-top: 0; -} - -.one-container.right-sidebar.post-image-aligned-center .no-featured-image-padding .post-image, -.one-container.right-sidebar.post-image-aligned-center .no-featured-image-padding .featured-image, -.one-container.both-right.post-image-aligned-center .no-featured-image-padding .post-image, -.one-container.both-right.post-image-aligned-center .no-featured-image-padding .featured-image { - margin-right: 0; -} - -.one-container.left-sidebar.post-image-aligned-center .no-featured-image-padding .post-image, -.one-container.left-sidebar.post-image-aligned-center .no-featured-image-padding .featured-image, -.one-container.both-left.post-image-aligned-center .no-featured-image-padding .post-image, -.one-container.both-left.post-image-aligned-center .no-featured-image-padding .featured-image { - margin-left: 0; -} - -.one-container.both-sidebars.post-image-aligned-center .no-featured-image-padding .post-image, -.one-container.both-sidebars.post-image-aligned-center .no-featured-image-padding .featured-image { - margin-left: 0; - margin-right: 0; -} - -.one-container.post-image-aligned-center .no-featured-image-padding.generate-columns .post-image, -.one-container.post-image-aligned-center .no-featured-image-padding.generate-columns .featured-image { - margin-left: 0; - margin-right: 0; -} - -@media (max-width: 768px) { - body:not(.post-image-aligned-center) .inside-article .post-image, - body:not(.post-image-aligned-center) .featured-image, - body:not(.post-image-aligned-center) .inside-article .featured-image { - margin-right: 0; - margin-left: 0; - float: none; - text-align: center; - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/blog/functions/css/featured-images.min.css b/wp-content/upgrade-temp-backup/plugins/gp-premium/blog/functions/css/featured-images.min.css deleted file mode 100644 index ba2493d8..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/blog/functions/css/featured-images.min.css +++ /dev/null @@ -1 +0,0 @@ -.post-image-above-header .inside-article .featured-image,.post-image-above-header .inside-article .post-image{margin-top:0;margin-bottom:2em}.post-image-aligned-left .inside-article .featured-image,.post-image-aligned-left .inside-article .post-image{margin-top:0;margin-right:2em;float:left;text-align:left}.post-image-aligned-center .featured-image,.post-image-aligned-center .post-image{text-align:center}.post-image-aligned-right .inside-article .featured-image,.post-image-aligned-right .inside-article .post-image{margin-top:0;margin-left:2em;float:right;text-align:right}.post-image-below-header.post-image-aligned-center .inside-article .featured-image,.post-image-below-header.post-image-aligned-left .inside-article .featured-image,.post-image-below-header.post-image-aligned-left .inside-article .post-image,.post-image-below-header.post-image-aligned-right .inside-article .featured-image,.post-image-below-header.post-image-aligned-right .inside-article .post-image{margin-top:2em}.post-image-aligned-left>.featured-image,.post-image-aligned-right>.featured-image{float:none;margin-left:auto;margin-right:auto}.post-image-aligned-left .featured-image{text-align:left}.post-image-aligned-right .featured-image{text-align:right}.post-image-aligned-left .inside-article:after,.post-image-aligned-left .inside-article:before,.post-image-aligned-right .inside-article:after,.post-image-aligned-right .inside-article:before{content:"";display:table}.post-image-aligned-left .inside-article:after,.post-image-aligned-right .inside-article:after{clear:both}.one-container.post-image-above-header .no-featured-image-padding.generate-columns .inside-article .post-image,.one-container.post-image-above-header .page-header+.no-featured-image-padding .inside-article .post-image{margin-top:0}.one-container.both-right.post-image-aligned-center .no-featured-image-padding .featured-image,.one-container.both-right.post-image-aligned-center .no-featured-image-padding .post-image,.one-container.right-sidebar.post-image-aligned-center .no-featured-image-padding .featured-image,.one-container.right-sidebar.post-image-aligned-center .no-featured-image-padding .post-image{margin-right:0}.one-container.both-left.post-image-aligned-center .no-featured-image-padding .featured-image,.one-container.both-left.post-image-aligned-center .no-featured-image-padding .post-image,.one-container.left-sidebar.post-image-aligned-center .no-featured-image-padding .featured-image,.one-container.left-sidebar.post-image-aligned-center .no-featured-image-padding .post-image{margin-left:0}.one-container.both-sidebars.post-image-aligned-center .no-featured-image-padding .featured-image,.one-container.both-sidebars.post-image-aligned-center .no-featured-image-padding .post-image{margin-left:0;margin-right:0}.one-container.post-image-aligned-center .no-featured-image-padding.generate-columns .featured-image,.one-container.post-image-aligned-center .no-featured-image-padding.generate-columns .post-image{margin-left:0;margin-right:0}@media (max-width:768px){body:not(.post-image-aligned-center) .featured-image,body:not(.post-image-aligned-center) .inside-article .featured-image,body:not(.post-image-aligned-center) .inside-article .post-image{margin-right:0;margin-left:0;float:none;text-align:center}} \ No newline at end of file diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/blog/functions/css/style.css b/wp-content/upgrade-temp-backup/plugins/gp-premium/blog/functions/css/style.css deleted file mode 100644 index e79ddd50..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/blog/functions/css/style.css +++ /dev/null @@ -1,254 +0,0 @@ -.post-image-above-header .inside-article .post-image, -.post-image-above-header .inside-article .featured-image { - margin-top: 0; - margin-bottom: 2em; -} - -.post-image-aligned-left .inside-article .post-image, -.post-image-aligned-left .inside-article .featured-image { - margin-top: 0; - margin-right: 2em; - float: left; - text-align: left; -} - -.post-image-aligned-center .post-image, -.post-image-aligned-center .featured-image { - text-align: center; -} - -.post-image-aligned-right .inside-article .post-image, -.post-image-aligned-right .inside-article .featured-image { - margin-top: 0; - margin-left: 2em; - float: right; - text-align: right; -} - -.post-image-below-header.post-image-aligned-right .inside-article .post-image, -.post-image-below-header.post-image-aligned-right .inside-article .featured-image, -.post-image-below-header.post-image-aligned-center .inside-article .featured-image, -.post-image-below-header.post-image-aligned-left .inside-article .post-image, -.post-image-below-header.post-image-aligned-left .inside-article .featured-image { - margin-top: 2em; -} - -.post-image-aligned-left > .featured-image, -.post-image-aligned-right > .featured-image { - float: none; - margin-left: auto; - margin-right: auto; -} - -.post-image-aligned-left .featured-image { - text-align: left; -} - -.post-image-aligned-right .featured-image { - text-align: right; -} - -.post-image-aligned-left .inside-article:before, -.post-image-aligned-left .inside-article:after, -.post-image-aligned-right .inside-article:before, -.post-image-aligned-right .inside-article:after { - content: ""; - display: table; -} - -.post-image-aligned-left .inside-article:after, -.post-image-aligned-right .inside-article:after { - clear: both; -} - -.one-container.post-image-above-header .page-header + .no-featured-image-padding .inside-article .post-image, -.one-container.post-image-above-header .no-featured-image-padding.generate-columns .inside-article .post-image { - margin-top: 0; -} - -.one-container.right-sidebar.post-image-aligned-center .no-featured-image-padding .post-image, -.one-container.right-sidebar.post-image-aligned-center .no-featured-image-padding .featured-image, -.one-container.both-right.post-image-aligned-center .no-featured-image-padding .post-image, -.one-container.both-right.post-image-aligned-center .no-featured-image-padding .featured-image { - margin-right: 0; -} - -.one-container.left-sidebar.post-image-aligned-center .no-featured-image-padding .post-image, -.one-container.left-sidebar.post-image-aligned-center .no-featured-image-padding .featured-image, -.one-container.both-left.post-image-aligned-center .no-featured-image-padding .post-image, -.one-container.both-left.post-image-aligned-center .no-featured-image-padding .featured-image { - margin-left: 0; -} - -.one-container.both-sidebars.post-image-aligned-center .no-featured-image-padding .post-image, -.one-container.both-sidebars.post-image-aligned-center .no-featured-image-padding .featured-image { - margin-left: 0; - margin-right: 0; -} - -.one-container.post-image-aligned-center .no-featured-image-padding.generate-columns .post-image, -.one-container.post-image-aligned-center .no-featured-image-padding.generate-columns .featured-image { - margin-left: 0; - margin-right: 0; -} - -@media (max-width: 768px) { - body:not(.post-image-aligned-center) .inside-article .post-image, - body:not(.post-image-aligned-center) .featured-image, - body:not(.post-image-aligned-center) .inside-article .featured-image { - margin-right: 0; - margin-left: 0; - float: none; - text-align: center; - } -} - -.masonry-enabled .page-header { - position: relative !important; -} - -.separate-containers .site-main > .generate-columns-container { - margin-bottom: 0; -} - -.masonry-container.are-images-unloaded, -.load-more.are-images-unloaded, -.masonry-enabled #nav-below { - opacity: 0; -} - -/* columns */ -.generate-columns-container:not(.masonry-container) { - display: flex; - flex-wrap: wrap; - align-items: stretch; -} - -.generate-columns .inside-article { - height: 100%; - box-sizing: border-box; -} - -.generate-columns-activated.post-image-aligned-left .generate-columns-container article:not(.featured-column) .post-image, -.generate-columns-activated.post-image-aligned-right .generate-columns-container article:not(.featured-column) .post-image { - float: none; - text-align: center; - margin-left: 0; - margin-right: 0; -} - -.generate-columns-container .paging-navigation, -.generate-columns-container .page-header { - flex: 1 1 100%; - clear: both; -} - -.generate-columns-container .paging-navigation { - margin-bottom: 0; -} - -.load-more:not(.has-svg-icon) .button.loading:before { - content: "\e900"; - display: inline-block; - font-family: "GP Premium"; - font-style: normal; - font-weight: normal; - font-variant: normal; - text-transform: none; - line-height: 1; - animation: spin 2s infinite linear; - margin-right: 7px; -} - -.load-more .button:not(.loading) .gp-icon { - display: none; -} - -.load-more .gp-icon svg { - animation: spin 2s infinite linear; - margin-right: 7px; -} - -@keyframes spin { - 0% { - transform: rotate(0deg); - } - 100% { - transform: rotate(360deg); - } -} - -.generate-columns { - box-sizing: border-box; -} - -.generate-columns.grid-20, -.grid-sizer.grid-20 { - width: 20%; -} - -.generate-columns.grid-25, -.grid-sizer.grid-25 { - width: 25%; -} - -.generate-columns.grid-33, -.grid-sizer.grid-33 { - width: 33.3333%; -} - -.generate-columns.grid-50, -.grid-sizer.grid-50 { - width: 50%; -} - -.generate-columns.grid-60, -.grid-sizer.grid-60 { - width: 60%; -} - -.generate-columns.grid-66, -.grid-sizer.grid-66 { - width: 66.66667%; -} - -.generate-columns.grid-100, -.grid-sizer.grid-100 { - width: 100%; -} - -@media (min-width: 768px) and (max-width: 1024px) { - .generate-columns.tablet-grid-50, - .grid-sizer.tablet-grid-50 { - width: 50%; - } -} - -@media (max-width: 767px) { - .generate-columns-activated .generate-columns-container { - margin-left: 0; - margin-right: 0; - } - .generate-columns-container > *, - .generate-columns-container .generate-columns { - padding-left: 0; - } - .generate-columns-container .page-header { - margin-left: 0; - } - .generate-columns.mobile-grid-100, - .grid-sizer.mobile-grid-100 { - width: 100%; - } - .generate-columns-container > .paging-navigation { - margin-left: 0; - } -} - -@media (max-width: 768px) { - .load-more { - display: block; - text-align: center; - margin-bottom: 0; - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/blog/functions/css/style.min.css b/wp-content/upgrade-temp-backup/plugins/gp-premium/blog/functions/css/style.min.css deleted file mode 100644 index 6f877184..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/blog/functions/css/style.min.css +++ /dev/null @@ -1 +0,0 @@ -.post-image-above-header .inside-article .featured-image,.post-image-above-header .inside-article .post-image{margin-top:0;margin-bottom:2em}.post-image-aligned-left .inside-article .featured-image,.post-image-aligned-left .inside-article .post-image{margin-top:0;margin-right:2em;float:left;text-align:left}.post-image-aligned-center .featured-image,.post-image-aligned-center .post-image{text-align:center}.post-image-aligned-right .inside-article .featured-image,.post-image-aligned-right .inside-article .post-image{margin-top:0;margin-left:2em;float:right;text-align:right}.post-image-below-header.post-image-aligned-center .inside-article .featured-image,.post-image-below-header.post-image-aligned-left .inside-article .featured-image,.post-image-below-header.post-image-aligned-left .inside-article .post-image,.post-image-below-header.post-image-aligned-right .inside-article .featured-image,.post-image-below-header.post-image-aligned-right .inside-article .post-image{margin-top:2em}.post-image-aligned-left>.featured-image,.post-image-aligned-right>.featured-image{float:none;margin-left:auto;margin-right:auto}.post-image-aligned-left .featured-image{text-align:left}.post-image-aligned-right .featured-image{text-align:right}.post-image-aligned-left .inside-article:after,.post-image-aligned-left .inside-article:before,.post-image-aligned-right .inside-article:after,.post-image-aligned-right .inside-article:before{content:"";display:table}.post-image-aligned-left .inside-article:after,.post-image-aligned-right .inside-article:after{clear:both}.one-container.post-image-above-header .no-featured-image-padding.generate-columns .inside-article .post-image,.one-container.post-image-above-header .page-header+.no-featured-image-padding .inside-article .post-image{margin-top:0}.one-container.both-right.post-image-aligned-center .no-featured-image-padding .featured-image,.one-container.both-right.post-image-aligned-center .no-featured-image-padding .post-image,.one-container.right-sidebar.post-image-aligned-center .no-featured-image-padding .featured-image,.one-container.right-sidebar.post-image-aligned-center .no-featured-image-padding .post-image{margin-right:0}.one-container.both-left.post-image-aligned-center .no-featured-image-padding .featured-image,.one-container.both-left.post-image-aligned-center .no-featured-image-padding .post-image,.one-container.left-sidebar.post-image-aligned-center .no-featured-image-padding .featured-image,.one-container.left-sidebar.post-image-aligned-center .no-featured-image-padding .post-image{margin-left:0}.one-container.both-sidebars.post-image-aligned-center .no-featured-image-padding .featured-image,.one-container.both-sidebars.post-image-aligned-center .no-featured-image-padding .post-image{margin-left:0;margin-right:0}.one-container.post-image-aligned-center .no-featured-image-padding.generate-columns .featured-image,.one-container.post-image-aligned-center .no-featured-image-padding.generate-columns .post-image{margin-left:0;margin-right:0}@media (max-width:768px){body:not(.post-image-aligned-center) .featured-image,body:not(.post-image-aligned-center) .inside-article .featured-image,body:not(.post-image-aligned-center) .inside-article .post-image{margin-right:0;margin-left:0;float:none;text-align:center}}.masonry-enabled .page-header{position:relative!important}.separate-containers .site-main>.generate-columns-container{margin-bottom:0}.load-more.are-images-unloaded,.masonry-container.are-images-unloaded,.masonry-enabled #nav-below{opacity:0}.generate-columns-container:not(.masonry-container){display:flex;flex-wrap:wrap;align-items:stretch}.generate-columns .inside-article{height:100%;box-sizing:border-box}.generate-columns-activated.post-image-aligned-left .generate-columns-container article:not(.featured-column) .post-image,.generate-columns-activated.post-image-aligned-right .generate-columns-container article:not(.featured-column) .post-image{float:none;text-align:center;margin-left:0;margin-right:0}.generate-columns-container .page-header,.generate-columns-container .paging-navigation{flex:1 1 100%;clear:both}.generate-columns-container .paging-navigation{margin-bottom:0}.load-more:not(.has-svg-icon) .button.loading:before{content:"\e900";display:inline-block;font-family:"GP Premium";font-style:normal;font-weight:400;font-variant:normal;text-transform:none;line-height:1;animation:spin 2s infinite linear;margin-right:7px}.load-more .button:not(.loading) .gp-icon{display:none}.load-more .gp-icon svg{animation:spin 2s infinite linear;margin-right:7px}@keyframes spin{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}.generate-columns{box-sizing:border-box}.generate-columns.grid-20,.grid-sizer.grid-20{width:20%}.generate-columns.grid-25,.grid-sizer.grid-25{width:25%}.generate-columns.grid-33,.grid-sizer.grid-33{width:33.3333%}.generate-columns.grid-50,.grid-sizer.grid-50{width:50%}.generate-columns.grid-60,.grid-sizer.grid-60{width:60%}.generate-columns.grid-66,.grid-sizer.grid-66{width:66.66667%}.generate-columns.grid-100,.grid-sizer.grid-100{width:100%}@media (min-width:768px) and (max-width:1024px){.generate-columns.tablet-grid-50,.grid-sizer.tablet-grid-50{width:50%}}@media (max-width:767px){.generate-columns-activated .generate-columns-container{margin-left:0;margin-right:0}.generate-columns-container .generate-columns,.generate-columns-container>*{padding-left:0}.generate-columns-container .page-header{margin-left:0}.generate-columns.mobile-grid-100,.grid-sizer.mobile-grid-100{width:100%}.generate-columns-container>.paging-navigation{margin-left:0}}@media (max-width:768px){.load-more{display:block;text-align:center;margin-bottom:0}} \ No newline at end of file diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/blog/functions/customizer.php b/wp-content/upgrade-temp-backup/plugins/gp-premium/blog/functions/customizer.php deleted file mode 100644 index 2c018ea8..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/blog/functions/customizer.php +++ /dev/null @@ -1,1181 +0,0 @@ -register_control_type( 'GeneratePress_Title_Customize_Control' ); - } - - // Remove our blog control from the free theme. - if ( $wp_customize->get_control( 'blog_content_control' ) ) { - $wp_customize->remove_control( 'blog_content_control' ); - } - - // Register our custom controls. - if ( method_exists( $wp_customize, 'register_control_type' ) ) { - $wp_customize->register_control_type( 'GeneratePress_Refresh_Button_Customize_Control' ); - $wp_customize->register_control_type( 'GeneratePress_Information_Customize_Control' ); - $wp_customize->register_control_type( 'Generate_Control_Toggle_Customize_Control' ); - } - - $wp_customize->add_section( - 'generate_blog_loop_template_section', - array( - 'title' => __( 'Blog', 'gp-premium' ), - 'capability' => 'edit_theme_options', - 'panel' => 'generate_layout_panel', - 'priority' => 40, - 'active_callback' => function() { - return generate_has_active_element( 'loop-template', true ); - }, - ) - ); - - $wp_customize->add_control( - new GeneratePress_Information_Customize_Control( - $wp_customize, - 'generate_using_loop_template', - array( - 'section' => 'generate_blog_loop_template_section', - 'description' => sprintf( - /* translators: URL to the Elements dashboard. */ - __( 'This page is using a Loop Template Element. Other options can be found within that Element.', 'gp-premium' ), - admin_url( 'edit.php?post_type=gp_elements' ) - ), - 'notice' => true, - 'settings' => ( isset( $wp_customize->selective_refresh ) ) ? array() : 'blogname', - 'active_callback' => function() { - return generate_has_active_element( 'loop-template', true ); - }, - 'priority' => 0, - ) - ) - ); - - $wp_customize->add_setting( - 'generate_blog_settings[excerpt_length]', array( - 'default' => $defaults['excerpt_length'], - 'capability' => 'edit_theme_options', - 'type' => 'option', - 'sanitize_callback' => 'absint', - ) - ); - - $wp_customize->add_control( - 'generate_loop_template_excerpt_length', - array( - 'type' => 'number', - 'label' => __( 'Excerpt word count', 'gp-premium' ), - 'section' => 'generate_blog_loop_template_section', - 'settings' => 'generate_blog_settings[excerpt_length]', - ) - ); - - $wp_customize->add_setting( - 'generate_blog_settings[read_more]', - array( - 'default' => $defaults['read_more'], - 'capability' => 'edit_theme_options', - 'type' => 'option', - 'sanitize_callback' => 'wp_kses_post', - ) - ); - - $wp_customize->add_control( - 'generate_loop_template_read_more', - array( - 'type' => 'text', - 'label' => __( 'Read more label', 'gp-premium' ), - 'section' => 'generate_blog_loop_template_section', - 'settings' => 'generate_blog_settings[read_more]', - ) - ); - - // Blog content section. - $wp_customize->add_section( - 'generate_blog_section', - array( - 'title' => __( 'Blog', 'gp-premium' ), - 'capability' => 'edit_theme_options', - 'panel' => 'generate_layout_panel', - 'priority' => 40, - 'active_callback' => function() { - return ! generate_has_active_element( 'loop-template', true ); - }, - ) - ); - - $wp_customize->add_control( - new GeneratePress_Title_Customize_Control( - $wp_customize, - 'generate_blog_archives_title', - array( - 'section' => 'generate_blog_section', - 'type' => 'generatepress-customizer-title', - 'title' => __( 'Content', 'gp-premium' ), - 'settings' => ( isset( $wp_customize->selective_refresh ) ) ? array() : 'blogname', - 'priority' => 1, - ) - ) - ); - - $wp_customize->add_control( - new Generate_Control_Toggle_Customize_Control( - $wp_customize, - 'generate_post_meta_toggle', - array( - 'section' => 'generate_blog_section', - 'targets' => array( - 'post-meta-archives' => __( 'Archives', 'gp-premium' ), - 'post-meta-single' => __( 'Single', 'gp-premium' ), - ), - 'settings' => ( isset( $wp_customize->selective_refresh ) ) ? array() : 'blogname', - 'priority' => 1, - ) - ) - ); - - $wp_customize->add_control( - 'generate_settings[post_content]', - array( - 'type' => 'select', - 'label' => __( 'Content type', 'gp-premium' ), - 'section' => 'generate_blog_section', - 'choices' => array( - 'full' => __( 'Full Content', 'gp-premium' ), - 'excerpt' => __( 'Excerpt', 'gp-premium' ), - ), - 'settings' => 'generate_settings[post_content]', - ) - ); - - $wp_customize->add_control( - 'generate_blog_settings[excerpt_length]', array( - 'type' => 'number', - 'label' => __( 'Excerpt word count', 'gp-premium' ), - 'section' => 'generate_blog_section', - 'settings' => 'generate_blog_settings[excerpt_length]', - 'active_callback' => 'generate_premium_is_excerpt', - ) - ); - - $wp_customize->add_control( - 'generate_blog_settings[read_more]', array( - 'type' => 'text', - 'label' => __( 'Read more label', 'gp-premium' ), - 'section' => 'generate_blog_section', - 'settings' => 'generate_blog_settings[read_more]', - ) - ); - - $wp_customize->add_setting( - 'generate_blog_settings[read_more_button]', - array( - 'default' => $defaults['read_more_button'], - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_checkbox', - ) - ); - - $wp_customize->add_control( - 'generate_blog_settings[read_more_button]', - array( - 'type' => 'checkbox', - 'label' => __( 'Display read more as button', 'gp-premium' ), - 'section' => 'generate_blog_section', - 'settings' => 'generate_blog_settings[read_more_button]', - ) - ); - - // Post date - $wp_customize->add_setting( - 'generate_blog_settings[date]', - array( - 'default' => $defaults['date'], - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_checkbox', - ) - ); - - $wp_customize->add_control( - 'generate_blog_settings[date]', - array( - 'type' => 'checkbox', - 'label' => __( 'Display post date', 'gp-premium' ), - 'section' => 'generate_blog_section', - 'settings' => 'generate_blog_settings[date]', - ) - ); - - // Post author - $wp_customize->add_setting( - 'generate_blog_settings[author]', - array( - 'default' => $defaults['author'], - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_checkbox', - ) - ); - - $wp_customize->add_control( - 'generate_blog_settings[author]', - array( - 'type' => 'checkbox', - 'label' => __( 'Display post author', 'gp-premium' ), - 'section' => 'generate_blog_section', - 'settings' => 'generate_blog_settings[author]', - ) - ); - - // Category links - $wp_customize->add_setting( - 'generate_blog_settings[categories]', - array( - 'default' => $defaults['categories'], - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_checkbox', - ) - ); - - $wp_customize->add_control( - 'generate_blog_settings[categories]', - array( - 'type' => 'checkbox', - 'label' => __( 'Display post categories', 'gp-premium' ), - 'section' => 'generate_blog_section', - 'settings' => 'generate_blog_settings[categories]', - ) - ); - - // Tag links - $wp_customize->add_setting( - 'generate_blog_settings[tags]', - array( - 'default' => $defaults['tags'], - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_checkbox', - ) - ); - - $wp_customize->add_control( - 'generate_blog_settings[tags]', - array( - 'type' => 'checkbox', - 'label' => __( 'Display post tags', 'gp-premium' ), - 'section' => 'generate_blog_section', - 'settings' => 'generate_blog_settings[tags]', - ) - ); - - // Comment link - $wp_customize->add_setting( - 'generate_blog_settings[comments]', - array( - 'default' => $defaults['comments'], - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_checkbox', - ) - ); - - $wp_customize->add_control( - 'generate_blog_settings[comments]', - array( - 'type' => 'checkbox', - 'label' => __( 'Display comment count', 'gp-premium' ), - 'section' => 'generate_blog_section', - 'settings' => 'generate_blog_settings[comments]', - ) - ); - - // Infinite scroll - $wp_customize->add_setting( - 'generate_blog_settings[infinite_scroll]', - array( - 'default' => $defaults['infinite_scroll'], - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_checkbox', - ) - ); - - $wp_customize->add_control( - 'generate_blog_settings[infinite_scroll]', - array( - 'type' => 'checkbox', - 'label' => __( 'Use infinite scroll', 'gp-premium' ), - 'section' => 'generate_blog_section', - 'settings' => 'generate_blog_settings[infinite_scroll]', - ) - ); - - // Infinite scroll - $wp_customize->add_setting( - 'generate_blog_settings[infinite_scroll_button]', - array( - 'default' => $defaults['infinite_scroll_button'], - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_checkbox', - ) - ); - - $wp_customize->add_control( - 'generate_blog_settings[infinite_scroll_button]', - array( - 'type' => 'checkbox', - 'label' => __( 'Use button to load more posts', 'gp-premium' ), - 'section' => 'generate_blog_section', - 'settings' => 'generate_blog_settings[infinite_scroll_button]', - 'active_callback' => 'generate_premium_infinite_scroll_active', - ) - ); - - // Load more text - $wp_customize->add_setting( - 'generate_blog_settings[masonry_load_more]', array( - 'default' => $defaults['masonry_load_more'], - 'capability' => 'edit_theme_options', - 'type' => 'option', - 'sanitize_callback' => 'wp_kses_post', - ) - ); - - $wp_customize->add_control( - 'blog_masonry_load_more_control', array( - 'label' => __( 'Load more label', 'gp-premium' ), - 'section' => 'generate_blog_section', - 'settings' => 'generate_blog_settings[masonry_load_more]', - 'active_callback' => 'generate_premium_infinite_scroll_button_active', - ) - ); - - // Loading text - $wp_customize->add_setting( - 'generate_blog_settings[masonry_loading]', array( - 'default' => $defaults['masonry_loading'], - 'capability' => 'edit_theme_options', - 'type' => 'option', - 'sanitize_callback' => 'wp_kses_post', - ) - ); - - $wp_customize->add_control( - 'blog_masonry_loading_control', array( - 'label' => __( 'Loading label', 'gp-premium' ), - 'section' => 'generate_blog_section', - 'settings' => 'generate_blog_settings[masonry_loading]', - 'active_callback' => 'generate_premium_infinite_scroll_button_active', - ) - ); - - $wp_customize->add_setting( - 'generate_blog_settings[single_date]', - array( - 'default' => $defaults['single_date'], - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_checkbox', - ) - ); - - $wp_customize->add_control( - 'generate_blog_settings[single_date]', - array( - 'type' => 'checkbox', - 'label' => __( 'Display post date', 'gp-premium' ), - 'section' => 'generate_blog_section', - 'settings' => 'generate_blog_settings[single_date]', - ) - ); - - $wp_customize->add_setting( - 'generate_blog_settings[single_author]', - array( - 'default' => $defaults['single_author'], - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_checkbox', - ) - ); - - $wp_customize->add_control( - 'generate_blog_settings[single_author]', - array( - 'type' => 'checkbox', - 'label' => __( 'Display post author', 'gp-premium' ), - 'section' => 'generate_blog_section', - 'settings' => 'generate_blog_settings[single_author]', - ) - ); - - $wp_customize->add_setting( - 'generate_blog_settings[single_categories]', - array( - 'default' => $defaults['single_categories'], - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_checkbox', - ) - ); - - $wp_customize->add_control( - 'generate_blog_settings[single_categories]', - array( - 'type' => 'checkbox', - 'label' => __( 'Display post categories', 'gp-premium' ), - 'section' => 'generate_blog_section', - 'settings' => 'generate_blog_settings[single_categories]', - ) - ); - - $wp_customize->add_setting( - 'generate_blog_settings[single_tags]', - array( - 'default' => $defaults['single_tags'], - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_checkbox', - ) - ); - - $wp_customize->add_control( - 'generate_blog_settings[single_tags]', - array( - 'type' => 'checkbox', - 'label' => __( 'Display post tags', 'gp-premium' ), - 'section' => 'generate_blog_section', - 'settings' => 'generate_blog_settings[single_tags]', - ) - ); - - $wp_customize->add_setting( - 'generate_blog_settings[single_post_navigation]', - array( - 'default' => $defaults['single_post_navigation'], - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_checkbox', - ) - ); - - $wp_customize->add_control( - 'generate_blog_settings[single_post_navigation]', - array( - 'type' => 'checkbox', - 'label' => __( 'Display post navigation', 'gp-premium' ), - 'section' => 'generate_blog_section', - 'settings' => 'generate_blog_settings[single_post_navigation]', - ) - ); - - $wp_customize->add_control( - new GeneratePress_Title_Customize_Control( - $wp_customize, - 'generate_blog_featured_images_title', - array( - 'section' => 'generate_blog_section', - 'type' => 'generatepress-customizer-title', - 'title' => __( 'Featured Images', 'gp-premium' ), - 'settings' => ( isset( $wp_customize->selective_refresh ) ) ? array() : 'blogname', - ) - ) - ); - - $wp_customize->add_control( - new Generate_Control_Toggle_Customize_Control( - $wp_customize, - 'generate_featured_image_toggle', - array( - 'section' => 'generate_blog_section', - 'targets' => array( - 'featured-image-archives' => __( 'Archives', 'gp-premium' ), - 'featured-image-single' => __( 'Posts', 'gp-premium' ), - 'featured-image-page' => __( 'Pages', 'gp-premium' ), - ), - 'settings' => ( isset( $wp_customize->selective_refresh ) ) ? array() : 'blogname', - ) - ) - ); - - // Show featured images - $wp_customize->add_setting( - 'generate_blog_settings[post_image]', - array( - 'default' => $defaults['post_image'], - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_checkbox', - ) - ); - - $wp_customize->add_control( - 'generate_blog_settings[post_image]', - array( - 'type' => 'checkbox', - 'label' => __( 'Display featured images', 'gp-premium' ), - 'section' => 'generate_blog_section', - 'settings' => 'generate_blog_settings[post_image]', - ) - ); - - // Padding - $wp_customize->add_setting( - 'generate_blog_settings[post_image_padding]', - array( - 'default' => $defaults['post_image_padding'], - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_checkbox', - ) - ); - - $wp_customize->add_control( - 'generate_blog_settings[post_image_padding]', - array( - 'type' => 'checkbox', - 'label' => __( 'Display padding around images', 'gp-premium' ), - 'section' => 'generate_blog_section', - 'settings' => 'generate_blog_settings[post_image_padding]', - 'active_callback' => 'generate_premium_display_image_padding', - ) - ); - - // Location - $wp_customize->add_setting( - 'generate_blog_settings[post_image_position]', - array( - 'default' => $defaults['post_image_position'], - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_choices', - ) - ); - - $wp_customize->add_control( - 'generate_blog_settings[post_image_position]', - array( - 'type' => 'select', - 'label' => __( 'Location', 'gp-premium' ), - 'section' => 'generate_blog_section', - 'choices' => array( - '' => __( 'Below Title', 'gp-premium' ), - 'post-image-above-header' => __( 'Above Title', 'gp-premium' ), - ), - 'settings' => 'generate_blog_settings[post_image_position]', - 'active_callback' => 'generate_premium_featured_image_active', - ) - ); - - // Alignment - $wp_customize->add_setting( - 'generate_blog_settings[post_image_alignment]', - array( - 'default' => $defaults['post_image_alignment'], - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_choices', - ) - ); - - $wp_customize->add_control( - 'generate_blog_settings[post_image_alignment]', - array( - 'type' => 'select', - 'label' => __( 'Alignment', 'gp-premium' ), - 'section' => 'generate_blog_section', - 'choices' => array( - 'post-image-aligned-center' => __( 'Center', 'gp-premium' ), - 'post-image-aligned-left' => __( 'Left', 'gp-premium' ), - 'post-image-aligned-right' => __( 'Right', 'gp-premium' ), - ), - 'settings' => 'generate_blog_settings[post_image_alignment]', - 'active_callback' => 'generate_premium_featured_image_active', - ) - ); - - $wp_customize->add_setting( - 'generate_blog_settings[post_image_size]', - array( - 'default' => $defaults['post_image_size'], - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_choices', - ) - ); - - $wp_customize->add_control( - 'generate_blog_settings[post_image_size]', - array( - 'type' => 'select', - 'label' => __( 'Media Attachment Size', 'gp-premium' ), - 'section' => 'generate_blog_section', - 'choices' => generate_blog_get_image_sizes(), - 'settings' => 'generate_blog_settings[post_image_size]', - 'active_callback' => 'generate_premium_featured_image_active', - ) - ); - - // Width - $wp_customize->add_setting( - 'generate_blog_settings[post_image_width]', array( - 'default' => $defaults['post_image_width'], - 'capability' => 'edit_theme_options', - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_empty_absint', - ) - ); - - $wp_customize->add_control( - 'generate_blog_settings[post_image_width]', - array( - 'type' => 'number', - 'label' => __( 'Width', 'gp-premium' ), - 'section' => 'generate_blog_section', - 'settings' => 'generate_blog_settings[post_image_width]', - 'active_callback' => 'generate_premium_featured_image_active', - ) - ); - - // Height - $wp_customize->add_setting( - 'generate_blog_settings[post_image_height]', array( - 'default' => $defaults['post_image_height'], - 'capability' => 'edit_theme_options', - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_empty_absint', - ) - ); - - $wp_customize->add_control( - 'generate_blog_settings[post_image_height]', - array( - 'type' => 'number', - 'label' => __( 'Height', 'gp-premium' ), - 'section' => 'generate_blog_section', - 'settings' => 'generate_blog_settings[post_image_height]', - 'active_callback' => 'generate_premium_featured_image_active', - ) - ); - - $wp_customize->add_control( - new GeneratePress_Information_Customize_Control( - $wp_customize, - 'generate_regenerate_images_notice', - array( - 'section' => 'generate_blog_section', - 'description' => sprintf( - __( 'We will attempt to serve exact image sizes based on your width/height settings. If that is not possible, we will resize your images using CSS. Learn more about featured image sizing %s.', 'gp-premium' ), - '' . __( 'here', 'gp-premium' ) . '' - ), - 'settings' => ( isset( $wp_customize->selective_refresh ) ) ? array() : 'blogname', - 'active_callback' => 'generate_premium_featured_image_active', - ) - ) - ); - - /* - * Single featured images - */ - - $wp_customize->add_setting( - 'generate_blog_settings[single_post_image]', - array( - 'default' => $defaults['single_post_image'], - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_checkbox', - ) - ); - - $wp_customize->add_control( - 'generate_blog_settings[single_post_image]', - array( - 'type' => 'checkbox', - 'label' => __( 'Display featured images', 'gp-premium' ), - 'section' => 'generate_blog_section', - 'settings' => 'generate_blog_settings[single_post_image]', - ) - ); - - // Padding - $wp_customize->add_setting( - 'generate_blog_settings[single_post_image_padding]', - array( - 'default' => $defaults['single_post_image_padding'], - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_checkbox', - ) - ); - - $wp_customize->add_control( - 'generate_blog_settings[single_post_image_padding]', - array( - 'type' => 'checkbox', - 'label' => __( 'Display padding around images', 'gp-premium' ), - 'section' => 'generate_blog_section', - 'settings' => 'generate_blog_settings[single_post_image_padding]', - 'active_callback' => 'generate_premium_display_image_padding_single', - ) - ); - - // Location - $wp_customize->add_setting( - 'generate_blog_settings[single_post_image_position]', - array( - 'default' => $defaults['single_post_image_position'], - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_choices', - ) - ); - - $wp_customize->add_control( - 'generate_blog_settings[single_post_image_position]', - array( - 'type' => 'select', - 'label' => __( 'Location', 'gp-premium' ), - 'section' => 'generate_blog_section', - 'choices' => array( - 'below-title' => __( 'Below Title', 'gp-premium' ), - 'inside-content' => __( 'Above Title', 'gp-premium' ), - 'above-content' => __( 'Above Content Area', 'gp-premium' ), - ), - 'settings' => 'generate_blog_settings[single_post_image_position]', - 'active_callback' => 'generate_premium_single_featured_image_active', - ) - ); - - // Alignment - $wp_customize->add_setting( - 'generate_blog_settings[single_post_image_alignment]', - array( - 'default' => $defaults['single_post_image_alignment'], - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_choices', - ) - ); - - $wp_customize->add_control( - 'generate_blog_settings[single_post_image_alignment]', - array( - 'type' => 'select', - 'label' => __( 'Alignment', 'gp-premium' ), - 'section' => 'generate_blog_section', - 'choices' => array( - 'center' => __( 'Center', 'gp-premium' ), - 'left' => __( 'Left', 'gp-premium' ), - 'right' => __( 'Right', 'gp-premium' ), - ), - 'settings' => 'generate_blog_settings[single_post_image_alignment]', - 'active_callback' => 'generate_premium_single_featured_image_active', - ) - ); - - $wp_customize->add_setting( - 'generate_blog_settings[single_post_image_size]', - array( - 'default' => $defaults['single_post_image_size'], - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_choices', - ) - ); - - $wp_customize->add_control( - 'generate_blog_settings[single_post_image_size]', - array( - 'type' => 'select', - 'label' => __( 'Media Attachment Size', 'gp-premium' ), - 'section' => 'generate_blog_section', - 'choices' => generate_blog_get_image_sizes(), - 'settings' => 'generate_blog_settings[single_post_image_size]', - 'active_callback' => 'generate_premium_single_featured_image_active', - ) - ); - - // Width - $wp_customize->add_setting( - 'generate_blog_settings[single_post_image_width]', array( - 'default' => $defaults['single_post_image_width'], - 'capability' => 'edit_theme_options', - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_empty_absint', - ) - ); - - $wp_customize->add_control( - 'generate_blog_settings[single_post_image_width]', - array( - 'type' => 'number', - 'label' => __( 'Width', 'gp-premium' ), - 'section' => 'generate_blog_section', - 'settings' => 'generate_blog_settings[single_post_image_width]', - 'active_callback' => 'generate_premium_single_featured_image_active', - ) - ); - - // Height - $wp_customize->add_setting( - 'generate_blog_settings[single_post_image_height]', array( - 'default' => $defaults['single_post_image_height'], - 'capability' => 'edit_theme_options', - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_empty_absint', - ) - ); - - $wp_customize->add_control( - 'generate_blog_settings[single_post_image_height]', - array( - 'type' => 'number', - 'label' => __( 'Height', 'gp-premium' ), - 'section' => 'generate_blog_section', - 'settings' => 'generate_blog_settings[single_post_image_height]', - 'active_callback' => 'generate_premium_single_featured_image_active', - ) - ); - - $wp_customize->add_control( - new GeneratePress_Information_Customize_Control( - $wp_customize, - 'generate_regenerate_single_post_images_notice', - array( - 'section' => 'generate_blog_section', - 'description' => sprintf( - __( 'We will attempt to serve exact image sizes based on your width/height settings. If that is not possible, we will resize your images using CSS. Learn more about featured image sizing %s.', 'gp-premium' ), - '' . __( 'here', 'gp-premium' ) . '' - ), - 'settings' => ( isset( $wp_customize->selective_refresh ) ) ? array() : 'blogname', - 'active_callback' => 'generate_premium_single_featured_image_active', - ) - ) - ); - - /* - * Page featured images - */ - - $wp_customize->add_setting( - 'generate_blog_settings[page_post_image]', - array( - 'default' => $defaults['page_post_image'], - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_checkbox', - ) - ); - - $wp_customize->add_control( - 'generate_blog_settings[page_post_image]', - array( - 'type' => 'checkbox', - 'label' => __( 'Display featured images', 'gp-premium' ), - 'section' => 'generate_blog_section', - 'settings' => 'generate_blog_settings[page_post_image]', - ) - ); - - // Padding - $wp_customize->add_setting( - 'generate_blog_settings[page_post_image_padding]', - array( - 'default' => $defaults['page_post_image_padding'], - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_checkbox', - ) - ); - - $wp_customize->add_control( - 'generate_blog_settings[page_post_image_padding]', - array( - 'type' => 'checkbox', - 'label' => __( 'Display padding around images', 'gp-premium' ), - 'section' => 'generate_blog_section', - 'settings' => 'generate_blog_settings[page_post_image_padding]', - 'active_callback' => 'generate_premium_display_image_padding_single_page', - ) - ); - - // Location - $wp_customize->add_setting( - 'generate_blog_settings[page_post_image_position]', - array( - 'default' => $defaults['page_post_image_position'], - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_choices', - ) - ); - - $wp_customize->add_control( - 'generate_blog_settings[page_post_image_position]', - array( - 'type' => 'select', - 'label' => __( 'Location', 'gp-premium' ), - 'section' => 'generate_blog_section', - 'choices' => array( - 'below-title' => __( 'Below Title', 'gp-premium' ), - 'inside-content' => __( 'Above Title', 'gp-premium' ), - 'above-content' => __( 'Above Content Area', 'gp-premium' ), - ), - 'settings' => 'generate_blog_settings[page_post_image_position]', - 'active_callback' => 'generate_premium_single_page_featured_image_active', - ) - ); - - // Alignment - $wp_customize->add_setting( - 'generate_blog_settings[page_post_image_alignment]', - array( - 'default' => $defaults['page_post_image_alignment'], - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_choices', - ) - ); - - $wp_customize->add_control( - 'generate_blog_settings[page_post_image_alignment]', - array( - 'type' => 'select', - 'label' => __( 'Alignment', 'gp-premium' ), - 'section' => 'generate_blog_section', - 'choices' => array( - 'center' => __( 'Center', 'gp-premium' ), - 'left' => __( 'Left', 'gp-premium' ), - 'right' => __( 'Right', 'gp-premium' ), - ), - 'settings' => 'generate_blog_settings[page_post_image_alignment]', - 'active_callback' => 'generate_premium_single_page_featured_image_active', - ) - ); - - $wp_customize->add_setting( - 'generate_blog_settings[page_post_image_size]', - array( - 'default' => $defaults['page_post_image_size'], - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_choices', - ) - ); - - $wp_customize->add_control( - 'generate_blog_settings[page_post_image_size]', - array( - 'type' => 'select', - 'label' => __( 'Media Attachment Size', 'gp-premium' ), - 'section' => 'generate_blog_section', - 'choices' => generate_blog_get_image_sizes(), - 'settings' => 'generate_blog_settings[page_post_image_size]', - 'active_callback' => 'generate_premium_single_page_featured_image_active', - ) - ); - - // Width - $wp_customize->add_setting( - 'generate_blog_settings[page_post_image_width]', array( - 'default' => $defaults['page_post_image_width'], - 'capability' => 'edit_theme_options', - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_empty_absint', - ) - ); - - $wp_customize->add_control( - 'generate_blog_settings[page_post_image_width]', - array( - 'type' => 'number', - 'label' => __( 'Width', 'gp-premium' ), - 'section' => 'generate_blog_section', - 'settings' => 'generate_blog_settings[page_post_image_width]', - 'active_callback' => 'generate_premium_single_page_featured_image_active', - ) - ); - - // Height - $wp_customize->add_setting( - 'generate_blog_settings[page_post_image_height]', array( - 'default' => $defaults['page_post_image_height'], - 'capability' => 'edit_theme_options', - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_empty_absint', - ) - ); - - $wp_customize->add_control( - 'generate_blog_settings[page_post_image_height]', - array( - 'type' => 'number', - 'label' => __( 'Height', 'gp-premium' ), - 'section' => 'generate_blog_section', - 'settings' => 'generate_blog_settings[page_post_image_height]', - 'active_callback' => 'generate_premium_single_page_featured_image_active', - ) - ); - - $wp_customize->add_control( - new GeneratePress_Information_Customize_Control( - $wp_customize, - 'generate_regenerate_page_images_notice', - array( - 'section' => 'generate_blog_section', - 'description' => sprintf( - __( 'We will attempt to serve exact image sizes based on your width/height settings. If that is not possible, we will resize your images using CSS. Learn more about featured image sizing %s.', 'gp-premium' ), - '' . __( 'here', 'gp-premium' ) . '' - ), - 'settings' => ( isset( $wp_customize->selective_refresh ) ) ? array() : 'blogname', - 'active_callback' => 'generate_premium_single_page_featured_image_active', - ) - ) - ); - - $wp_customize->add_control( - new GeneratePress_Title_Customize_Control( - $wp_customize, - 'generate_blog_columns_title', - array( - 'section' => 'generate_blog_section', - 'type' => 'generatepress-customizer-title', - 'title' => __( 'Columns', 'gp-premium' ), - 'settings' => ( isset( $wp_customize->selective_refresh ) ) ? array() : 'blogname', - ) - ) - ); - - // Enable columns - $wp_customize->add_setting( - 'generate_blog_settings[column_layout]', - array( - 'default' => $defaults['column_layout'], - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_checkbox', - ) - ); - - $wp_customize->add_control( - 'generate_blog_settings[column_layout]', - array( - 'type' => 'checkbox', - 'label' => __( 'Display posts in columns', 'gp-premium' ), - 'section' => 'generate_blog_section', - 'settings' => 'generate_blog_settings[column_layout]', - ) - ); - - // Column count class - $wp_customize->add_setting( - 'generate_blog_settings[columns]', - array( - 'default' => $defaults['columns'], - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_choices', - ) - ); - - $wp_customize->add_control( - 'generate_blog_settings[columns]', - array( - 'type' => 'select', - 'label' => __( 'Columns', 'gp-premium' ), - 'section' => 'generate_blog_section', - 'choices' => array( - '50' => '2', - '33' => '3', - '25' => '4', - '20' => '5' - ), - 'settings' => 'generate_blog_settings[columns]', - 'active_callback' => 'generate_premium_blog_columns_active', - ) - ); - - // Featured column - $wp_customize->add_setting( - 'generate_blog_settings[featured_column]', - array( - 'default' => $defaults['featured_column'], - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_checkbox', - ) - ); - - $wp_customize->add_control( - 'generate_blog_settings[featured_column]', - array( - 'type' => 'checkbox', - 'label' => __( 'Make first post featured', 'gp-premium' ), - 'section' => 'generate_blog_section', - 'settings' => 'generate_blog_settings[featured_column]', - 'active_callback' => 'generate_premium_blog_columns_active', - ) - ); - - // Masonry - $wp_customize->add_setting( - 'generate_blog_settings[masonry]', - array( - 'default' => $defaults['masonry'], - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_checkbox', - ) - ); - - $wp_customize->add_control( - 'generate_blog_settings[masonry]', - array( - 'type' => 'checkbox', - 'label' => __( 'Display posts in masonry grid', 'gp-premium' ), - 'section' => 'generate_blog_section', - 'settings' => 'generate_blog_settings[masonry]', - 'active_callback' => 'generate_premium_blog_columns_active', - ) - ); - } -} - -add_action( 'customize_controls_print_styles', 'generate_blog_customizer_controls_css' ); - -function generate_blog_customizer_controls_css() { - ?> - - '55', - 'read_more' => __( 'Read more', 'gp-premium' ), - 'read_more_button' => false, - 'masonry' => false, - 'masonry_load_more' => __( '+ More', 'gp-premium' ), - 'masonry_loading' => __( 'Loading...', 'gp-premium' ), - 'infinite_scroll' => false, - 'infinite_scroll_button' => false, - 'post_image' => true, - 'post_image_position' => '', - 'post_image_alignment' => 'post-image-aligned-center', - 'post_image_size' => 'full', - 'post_image_width' => '', - 'post_image_height' => '', - 'post_image_padding' => true, - 'single_post_image' => true, - 'single_post_image_position' => 'inside-content', - 'single_post_image_alignment' => 'center', - 'single_post_image_size' => 'full', - 'single_post_image_width' => '', - 'single_post_image_height' => '', - 'single_post_image_padding' => true, - 'page_post_image' => true, - 'page_post_image_position' => 'above-content', - 'page_post_image_alignment' => 'center', - 'page_post_image_size' => 'full', - 'page_post_image_width' => '', - 'page_post_image_height' => '', - 'page_post_image_padding' => true, - 'date' => true, - 'author' => true, - 'categories' => true, - 'tags' => true, - 'comments' => true, - 'single_date' => true, - 'single_author' => true, - 'single_categories' => true, - 'single_tags' => true, - 'single_post_navigation' => true, - 'column_layout' => false, - 'columns' => '50', - 'featured_column' => false, - ); - - return apply_filters( 'generate_blog_option_defaults', $generate_blog_defaults ); - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/blog/functions/generate-blog.php b/wp-content/upgrade-temp-backup/plugins/gp-premium/blog/functions/generate-blog.php deleted file mode 100644 index 9b52b1ea..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/blog/functions/generate-blog.php +++ /dev/null @@ -1,754 +0,0 @@ - $settings['masonry_load_more'], - 'loading' => $settings['masonry_loading'], - 'icon' => function_exists( 'generate_get_svg_icon' ) ? generate_get_svg_icon( 'spinner' ) : '', - 'masonryInit' => apply_filters( - 'generate_blog_masonry_init', - array( - 'columnWidth' => '.grid-sizer', - 'itemSelector' => '.masonry-post', - 'stamp' => '.page-header', - 'percentPosition' => true, - 'stagger' => 30, - 'visibleStyle' => array( - 'transform' => 'translateY(0)', - 'opacity' => 1, - ), - 'hiddenStyle' => array( - 'transform' => 'translateY(5px)', - 'opacity' => 0, - ), - ) - ), - 'infiniteScrollInit' => apply_filters( - 'generate_blog_infinite_scroll_init', - array( - 'path' => '.infinite-scroll-path a', - 'append' => '#main .infinite-scroll-item', - 'history' => false, - 'loadOnScroll' => $settings['infinite_scroll_button'] ? false : true, - 'button' => $settings['infinite_scroll_button'] ? '.load-more a' : null, - 'scrollThreshold' => $settings['infinite_scroll_button'] ? false : 600, - ) - ), - ) - ); - } - - $needs_columns_css = false; - $needs_featured_image_css = false; - - if ( generate_blog_get_columns() || $settings['infinite_scroll'] ) { - $needs_columns_css = true; - } - - if ( ! is_singular() ) { - if ( $settings['post_image'] ) { - $needs_featured_image_css = true; - } - } - - if ( is_page() && has_post_thumbnail() ) { - if ( $settings['page_post_image'] ) { - $needs_featured_image_css = true; - } - } - - if ( is_single() && has_post_thumbnail() ) { - if ( $settings['single_post_image'] ) { - $needs_featured_image_css = true; - } - } - - if ( $needs_columns_css && $needs_featured_image_css ) { - wp_enqueue_style( 'generate-blog', plugin_dir_url( __FILE__ ) . "css/style{$suffix}.css", array(), GENERATE_BLOG_VERSION ); - } elseif ( $needs_columns_css ) { - wp_enqueue_style( 'generate-blog-columns', plugin_dir_url( __FILE__ ) . "css/columns{$suffix}.css", array(), GENERATE_BLOG_VERSION ); - } elseif ( $needs_featured_image_css ) { - wp_enqueue_style( 'generate-blog-images', plugin_dir_url( __FILE__ ) . "css/featured-images{$suffix}.css", array(), GENERATE_BLOG_VERSION ); - } - } -} - -if ( ! function_exists( 'generate_blog_post_classes' ) ) { - add_filter( 'post_class', 'generate_blog_post_classes' ); - /** - * Adds custom classes to the content container - * - * @since 0.1 - */ - function generate_blog_post_classes( $classes ) { - // Don't add these classes to the GB Query Loop block items. - if ( in_array( 'gb-query-loop-item', $classes ) ) { - return $classes; - } - - global $wp_query; - $paged = get_query_var( 'paged' ); - $paged = $paged ? $paged : 1; - - // Get our options - $settings = wp_parse_args( - get_option( 'generate_blog_settings', array() ), - generate_blog_get_defaults() - ); - - if ( $settings['infinite_scroll'] ) { - $classes[] = 'infinite-scroll-item'; - } - - // Set our masonry class - if ( 'true' == generate_blog_get_masonry() && generate_blog_get_columns() ) { - $classes[] = 'masonry-post'; - } - - // Set our column classes - if ( generate_blog_get_columns() && ! is_singular() ) { - $classes[] = 'generate-columns'; - $classes[] = 'tablet-grid-50'; - $classes[] = 'mobile-grid-100'; - $classes[] = 'grid-parent'; - - // Set our featured column class - if ( $wp_query->current_post == 0 && $paged == 1 && $settings['featured_column'] ) { - if ( 50 == generate_blog_get_column_count() ) { - $classes[] = 'grid-100'; - } - - if ( 33 == generate_blog_get_column_count() ) { - $classes[] = 'grid-66'; - } - - if ( 25 == generate_blog_get_column_count() ) { - $classes[] = 'grid-50'; - } - - if ( 20 == generate_blog_get_column_count() ) { - $classes[] = 'grid-60'; - } - $classes[] = 'featured-column'; - } else { - $classes[] = 'grid-' . generate_blog_get_column_count(); - } - } - - if ( ! $settings['post_image_padding'] && ! is_singular() ) { - $classes[] = 'no-featured-image-padding'; - } - - $location = generate_blog_get_singular_template(); - - if ( ! $settings[$location . '_post_image_padding'] && is_singular() ) { - $classes[] = 'no-featured-image-padding'; - } - - $atts = generate_get_blog_image_attributes(); - - if ( ! is_singular() && has_post_thumbnail() && ! empty( $atts ) ) { - $values = array( - $atts['width'], - $atts['height'], - $atts['crop'], - ); - - $image_src = wp_get_attachment_image_src( get_post_thumbnail_id( get_the_ID(), 'full' ), $values ); - - if ( $image_src && ( ! $image_src[3] || ! apply_filters( 'generate_use_featured_image_size_match', true ) ) ) { - $classes[] = 'resize-featured-image'; - } - } - - return $classes; - } -} - -if ( ! function_exists( 'generate_blog_body_classes' ) ) { - add_filter( 'body_class', 'generate_blog_body_classes' ); - /** - * Adds custom classes to the body - * - * @since 0.1 - */ - function generate_blog_body_classes( $classes ) { - // Get theme options - $settings = wp_parse_args( - get_option( 'generate_blog_settings', array() ), - generate_blog_get_defaults() - ); - - if ( is_singular() ) { - $location = generate_blog_get_singular_template(); - - if ( 'below-title' == $settings[$location . '_post_image_position'] ) { - $classes[] = 'post-image-below-header'; - } - - if ( 'inside-content' == $settings[$location . '_post_image_position'] ) { - $classes[] = 'post-image-above-header'; - } - - $classes[] = ( ! empty( $settings[$location . '_post_image_alignment'] ) ) ? 'post-image-aligned-' . $settings[$location . '_post_image_alignment'] : 'post-image-aligned-center'; - } else { - $classes[] = ( '' == $settings['post_image_position'] ) ? 'post-image-below-header' : 'post-image-above-header'; - $classes[] = ( ! empty( $settings['post_image_alignment'] ) ) ? $settings['post_image_alignment'] : 'post-image-aligned-center'; - } - - if ( 'true' == generate_blog_get_masonry() && generate_blog_get_columns() ) { - $classes[] = 'masonry-enabled'; - } - - if ( generate_blog_get_columns() && ! is_singular() ) { - $classes[] = 'generate-columns-activated'; - } - - if ( $settings[ 'infinite_scroll' ] && ! is_singular() ) { - $classes[] = 'infinite-scroll'; - } - - return $classes; - } -} - -if ( ! function_exists( 'generate_excerpt_length' ) ) { - add_filter( 'excerpt_length', 'generate_excerpt_length', 15 ); - /** - * Set our excerpt length - * - * @since 0.1 - */ - function generate_excerpt_length( $length ) { - $generate_settings = wp_parse_args( - get_option( 'generate_blog_settings', array() ), - generate_blog_get_defaults() - ); - return absint( apply_filters( 'generate_excerpt_length', $generate_settings['excerpt_length'] ) ); - } -} - -if ( ! function_exists( 'generate_blog_css' ) ) { - /** - * Build our inline CSS - * - * @since 0.1 - */ - function generate_blog_css() { - global $post; - $return = ''; - - $settings = wp_parse_args( - get_option( 'generate_blog_settings', array() ), - generate_blog_get_defaults() - ); - - if ( ! defined( 'GENERATE_VERSION' ) ) { - return; - } - - if ( version_compare( GENERATE_VERSION, '3.0.0-alpha.1', '<' ) ) { - // Get disable headline meta. - $disable_headline = ( isset( $post ) ) ? get_post_meta( $post->ID, '_generate-disable-headline', true ) : ''; - - if ( ! $settings['categories'] && ! $settings['comments'] && ! $settings['tags'] && ! is_singular() ) { - $return .= '.blog footer.entry-meta, .archive footer.entry-meta {display:none;}'; - } - - if ( ! $settings['single_date'] && ! $settings['single_author'] && $disable_headline && is_singular() ) { - $return .= '.single .entry-header{display:none;}.single .entry-content {margin-top:0;}'; - } - - if ( ! $settings['date'] && ! $settings['author'] && ! is_singular() ) { - $return .= '.entry-header .entry-meta {display:none;}'; - } - - if ( ! $settings['single_date'] && ! $settings['single_author'] && is_singular() ) { - $return .= '.entry-header .entry-meta {display:none;}'; - } - - if ( ! $settings['single_post_navigation'] && is_singular() ) { - $return .= '.post-navigation {display:none;}'; - } - - if ( ! $settings['single_categories'] && ! $settings['single_post_navigation'] && ! $settings['single_tags'] && is_singular() ) { - $return .= '.single footer.entry-meta {display:none;}'; - } - } - - $separator = 20; - $content_padding_top = 40; - $content_padding_right = 40; - $content_padding_left = 40; - $mobile_content_padding_top = 30; - $mobile_content_padding_right = 30; - $mobile_content_padding_left = 30; - - if ( function_exists( 'generate_spacing_get_defaults' ) ) { - $spacing_settings = wp_parse_args( - get_option( 'generate_spacing_settings', array() ), - generate_spacing_get_defaults() - ); - - $separator = absint( $spacing_settings['separator'] ); - $content_padding_top = absint( $spacing_settings['content_top'] ); - $content_padding_right = absint( $spacing_settings['content_right'] ); - $content_padding_left = absint( $spacing_settings['content_left'] ); - $mobile_content_padding_top = absint( $spacing_settings['mobile_content_top'] ); - $mobile_content_padding_right = absint( $spacing_settings['mobile_content_right'] ); - $mobile_content_padding_left = absint( $spacing_settings['mobile_content_left'] ); - } - - if ( 'true' == generate_blog_get_masonry() && generate_blog_get_columns() ) { - $return .= '.page-header {margin-bottom: ' . $separator . 'px;margin-left: ' . $separator . 'px}'; - } - - if ( $settings[ 'infinite_scroll' ] && ! is_singular() ) { - $return .= '#nav-below {display:none;}'; - } - - if ( ! $settings['post_image_padding'] && 'post-image-aligned-center' == $settings['post_image_alignment'] && ! is_singular() ) { - $return .= '.no-featured-image-padding .post-image {margin-left:-' . $content_padding_left . 'px;margin-right:-' . $content_padding_right . 'px;}'; - $return .= '.post-image-above-header .no-featured-image-padding .inside-article .post-image {margin-top:-' . $content_padding_top . 'px;}'; - } - - $location = generate_blog_get_singular_template(); - - if ( ! $settings[$location . '_post_image_padding'] && 'center' == $settings[$location . '_post_image_alignment'] && is_singular() ) { - $return .= '.no-featured-image-padding .featured-image {margin-left:-' . $content_padding_left . 'px;margin-right:-' . $content_padding_right . 'px;}'; - $return .= '.post-image-above-header .no-featured-image-padding .inside-article .featured-image {margin-top:-' . $content_padding_top . 'px;}'; - } - - if ( ! $settings['page_post_image_padding'] || ! $settings['single_post_image_padding'] || ! $settings['post_image_padding'] ) { - $return .= '@media ' . generate_premium_get_media_query( 'mobile' ) . '{'; - if ( ! $settings['post_image_padding'] && 'post-image-aligned-center' == $settings['post_image_alignment'] && ! is_singular() ) { - $return .= '.no-featured-image-padding .post-image {margin-left:-' . $mobile_content_padding_left . 'px;margin-right:-' . $mobile_content_padding_right . 'px;}'; - $return .= '.post-image-above-header .no-featured-image-padding .inside-article .post-image {margin-top:-' . $mobile_content_padding_top . 'px;}'; - } - - if ( ! $settings[$location . '_post_image_padding'] && 'center' == $settings[$location . '_post_image_alignment'] && is_singular() ) { - $return .= '.no-featured-image-padding .featured-image {margin-left:-' . $mobile_content_padding_left . 'px;margin-right:-' . $mobile_content_padding_right . 'px;}'; - $return .= '.post-image-above-header .no-featured-image-padding .inside-article .featured-image {margin-top:-' . $mobile_content_padding_top . 'px;}'; - } - $return .= '}'; - } - - $atts = generate_get_blog_image_attributes(); - - if ( ! empty( $atts ) ) { - $image_width = $atts['width'] && 9999 !== $atts['width'] ? 'width: ' . $atts['width'] . 'px;' : ''; - $image_height = $atts['height'] && 9999 !== $atts['height'] ? 'height: ' . $atts['height'] . 'px;' : ''; - $image_crop = $atts['crop'] ? '-o-object-fit: cover;object-fit: cover;' : ''; - - if ( ! $image_width && $image_height ) { - $image_crop = '-o-object-fit: cover;object-fit: cover;'; - } - - if ( ! is_singular() ) { - $return .= '.resize-featured-image .post-image img {' . $image_width . $image_height . $image_crop . '}'; - } - - if ( is_single() || is_page() ) { - $values = array( - $atts['width'], - $atts['height'], - $atts['crop'], - ); - - $image_src = wp_get_attachment_image_src( get_post_thumbnail_id( get_the_ID(), 'full' ), $values ); - - if ( $image_src && ( ! $image_src[3] || ! apply_filters( 'generate_use_featured_image_size_match', true ) ) ) { - $return .= '.featured-image img {' . $image_width . $image_height . $image_crop . '}'; - } - } - } - - return $return; - } -} - -add_filter( 'generate_excerpt_more_text', 'generate_blog_set_read_more_text' ); -/** - * Set the read more text with our Customizer setting. - * - * @param string $text The read more text. - */ -function generate_blog_set_read_more_text( $text ) { - $settings = wp_parse_args( - get_option( 'generate_blog_settings', array() ), - generate_blog_get_defaults() - ); - - if ( $settings['read_more'] ) { - return wp_kses_post( $settings['read_more'] ); - } - - return $text; -} - -if ( ! function_exists( 'generate_blog_excerpt_more' ) ) { - add_filter( 'excerpt_more', 'generate_blog_excerpt_more', 15 ); - /** - * Prints the read more HTML - */ - function generate_blog_excerpt_more( $more ) { - $generate_settings = wp_parse_args( - get_option( 'generate_blog_settings', array() ), - generate_blog_get_defaults() - ); - - if ( '' == $generate_settings['read_more'] ) { - return ''; - } - - // We don't need to overwrite the entire element just to change its text. - // If we can filter the text, stop here. - if ( function_exists( 'generate_get_read_more_text' ) ) { - return $more; - } - - return apply_filters( - 'generate_excerpt_more_output', - sprintf( - ' ... %3$s', - the_title_attribute( 'echo=0' ), - esc_url( get_permalink( get_the_ID() ) ), - wp_kses_post( $generate_settings['read_more'] ), - sprintf( - /* translators: Aria-label describing the read more button */ - _x( 'More on %s', 'more on post title', 'gp-premium' ), - the_title_attribute( 'echo=0' ) - ) - ) - ); - } -} - -if ( ! function_exists( 'generate_blog_content_more' ) ) { - add_filter( 'the_content_more_link', 'generate_blog_content_more', 15 ); - /** - * Prints the read more HTML - */ - function generate_blog_content_more( $more ) { - $generate_settings = wp_parse_args( - get_option( 'generate_blog_settings', array() ), - generate_blog_get_defaults() - ); - - if ( '' == $generate_settings['read_more'] ) { - return ''; - } - - // We don't need to overwrite the entire element just to change its text. - // If we can filter the text, stop here. - if ( function_exists( 'generate_get_read_more_text' ) ) { - return $more; - } - - return apply_filters( - 'generate_content_more_link_output', - sprintf( - '

%3$s

', - the_title_attribute( 'echo=0' ), - esc_url( get_permalink( get_the_ID() ) . apply_filters( 'generate_more_jump', '#more-' . get_the_ID() ) ), - wp_kses_post( $generate_settings['read_more'] ), - sprintf( - /* translators: Aria-label describing the read more button */ - _x( 'More on %s', 'more on post title', 'gp-premium' ), - the_title_attribute( 'echo=0' ) - ) - ) - ); - } -} - -/** - * Checks the setting and returns false if $thing is disabled - * - * @since 1.4 - * - * @param String $data The original data, passed through if not disabled - * @param String $thing The name of the thing to check - * @return String|False The original data, or false (if disabled) - */ -function generate_disable_post_thing( $data, $thing ) { - $generate_blog_settings = wp_parse_args( - get_option( 'generate_blog_settings', array() ), - generate_blog_get_defaults() - ); - - if ( ! $generate_blog_settings[$thing] ) { - return false; - } - - return $data; -} - -if ( ! function_exists( 'generate_disable_post_date' ) ) { - add_filter( 'generate_post_date', 'generate_disable_post_date' ); - /** - * Remove the post date if set - * - * @since 0.1 - */ - function generate_disable_post_date( $date ) { - if ( is_singular() ) { - return generate_disable_post_thing( $date, 'single_date' ); - } else { - return generate_disable_post_thing( $date, 'date' ); - } - } -} - -if ( ! function_exists( 'generate_disable_post_author' ) ) { - add_filter( 'generate_post_author', 'generate_disable_post_author' ); - /** - * Set the author if set - * - * @since 0.1 - */ - function generate_disable_post_author( $author ) { - if ( is_singular() ) { - return generate_disable_post_thing( $author, 'single_author' ); - } else { - return generate_disable_post_thing( $author, 'author' ); - } - } -} - -if ( ! function_exists( 'generate_disable_post_categories' ) ) { - add_filter( 'generate_show_categories', 'generate_disable_post_categories' ); - /** - * Remove the categories if set - * - * @since 0.1 - */ - function generate_disable_post_categories( $categories ) { - if ( is_singular() ) { - return generate_disable_post_thing( $categories, 'single_categories' ); - } else { - return generate_disable_post_thing( $categories, 'categories' ); - } - } -} - -if ( ! function_exists( 'generate_disable_post_tags' ) ) { - add_filter( 'generate_show_tags', 'generate_disable_post_tags' ); - /** - * Remove the tags if set - * - * @since 0.1 - */ - function generate_disable_post_tags( $tags ) { - if ( is_singular() ) { - return generate_disable_post_thing( $tags, 'single_tags' ); - } else { - return generate_disable_post_thing( $tags, 'tags' ); - } - } -} - -if ( ! function_exists( 'generate_disable_post_comments_link' ) ) { - add_filter( 'generate_show_comments', 'generate_disable_post_comments_link' ); - /** - * Remove the link to comments if set - * - * @since 0.1 - */ - function generate_disable_post_comments_link( $comments_link ) { - return generate_disable_post_thing( $comments_link, 'comments' ); - } -} - -add_filter( 'generate_show_post_navigation', 'generate_disable_post_navigation' ); -/** - * Remove the single post navigation - * - * @since 1.5 - */ -function generate_disable_post_navigation( $navigation ) { - if ( is_singular() ) { - return generate_disable_post_thing( $navigation, 'single_post_navigation' ); - } else { - return $navigation; - } -} - -add_filter( 'generate_excerpt_more_output', 'generate_blog_read_more_button' ); -add_filter( 'generate_content_more_link_output', 'generate_blog_read_more_button' ); -/** - * Add the button class to our read more link if set. - * - * @since 1.5 - * - * @param string $output Our existing read more link. - */ -function generate_blog_read_more_button( $output ) { - $settings = wp_parse_args( - get_option( 'generate_blog_settings', array() ), - generate_blog_get_defaults() - ); - - if ( ! $settings['read_more_button'] ) { - return $output; - } - - $aria_label = function_exists( 'generate_get_read_more_aria_label' ) - ? generate_get_read_more_aria_label() - : sprintf( - /* translators: Aria-label describing the read more button */ - _x( 'More on %s', 'more on post title', 'gp-premium' ), - the_title_attribute( 'echo=0' ) - ); - - return sprintf( - '%5$s

%3$s

', - the_title_attribute( 'echo=0' ), - esc_url( get_permalink( get_the_ID() ) . apply_filters( 'generate_more_jump', '#more-' . get_the_ID() ) ), - wp_kses_post( $settings['read_more'] ), - $aria_label, - 'generate_excerpt_more_output' === current_filter() ? ' ... ' : '' - ); -} - -if ( ! function_exists( 'generate_blog_load_more' ) ) { - add_action( 'generate_after_main_content', 'generate_blog_load_more', 20 ); - /** - * Build our load more button - */ - function generate_blog_load_more() { - // Get theme options - $settings = wp_parse_args( - get_option( 'generate_blog_settings', array() ), - generate_blog_get_defaults() - ); - - if ( ( ! $settings[ 'infinite_scroll_button' ] || ! $settings[ 'infinite_scroll' ] ) || is_singular() || is_404() ) { - return; - } - - global $wp_query; - - if ( $wp_query->max_num_pages < 2 ) { - return; - } - - if ( is_post_type_archive( 'product' ) ) { - return; - } - - if ( is_tax( 'product_cat' ) ) { - return; - } - - $icon = ''; - - if ( function_exists( 'generate_get_svg_icon' ) ) { - $icon = generate_get_svg_icon( 'spinner' ); - } - - printf( - '
- %3$s%4$s -
', - $icon ? 'has-svg-icon' : '', - ( 'true' == generate_blog_get_masonry() && generate_blog_get_columns() ) ? 'are-images-unloaded' : '', - $icon, - wp_kses_post( $settings['masonry_load_more'] ) - ); - } -} - -/** - * Checks to see whether we're getting page or single post options. - * - * @since 1.5 - * - * @return string Name of our singular template - */ -function generate_blog_get_singular_template() { - $template = 'single'; - - if ( is_page() ) { - $template = 'page'; - } - - return $template; -} - -add_action( 'generate_after_footer', 'generate_blog_do_infinite_scroll_path', 500 ); -/** - * Add a next page of posts link for infinite scroll. - * - * @since 2.0.0 - */ -function generate_blog_do_infinite_scroll_path() { - if ( function_exists( 'is_woocommerce' ) && is_woocommerce() ) { - return; - } - - $settings = wp_parse_args( - get_option( 'generate_blog_settings', array() ), - generate_blog_get_defaults() - ); - - if ( $settings['infinite_scroll'] && ! is_singular() && ! is_404() ) { - printf( - '', - get_next_posts_link() - ); - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/blog/functions/images.php b/wp-content/upgrade-temp-backup/plugins/gp-premium/blog/functions/images.php deleted file mode 100644 index 54f11c71..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/blog/functions/images.php +++ /dev/null @@ -1,369 +0,0 @@ - 'full', - ); - - foreach ( $sizes as $key => $name ) { - $new_sizes[ $name ] = $name; - } - - return $new_sizes; -} - -add_filter( 'generate_page_header_default_size', 'generate_blog_set_featured_image_size' ); -/** - * Set our featured image sizes. - * - * @since 1.10.0 - * - * @param string $size The existing size. - * @return string The new size. - */ -function generate_blog_set_featured_image_size( $size ) { - $settings = wp_parse_args( - get_option( 'generate_blog_settings', array() ), - generate_blog_get_defaults() - ); - - if ( ! is_singular() ) { - $size = $settings['post_image_size']; - } - - if ( is_single() ) { - $size = $settings['single_post_image_size']; - } - - if ( is_page() ) { - $size = $settings['page_post_image_size']; - } - - $atts = generate_get_blog_image_attributes(); - - if ( ! empty( $atts ) ) { - $values = array( - $atts['width'], - $atts['height'], - $atts['crop'], - ); - - $image_src = wp_get_attachment_image_src( get_post_thumbnail_id( get_the_ID(), 'full' ), $values ); - - if ( $image_src && $image_src[3] && apply_filters( 'generate_use_featured_image_size_match', true ) ) { - return $values; - } else { - return $size; - } - } - - return $size; -} - -if ( ! function_exists( 'generate_get_blog_image_attributes' ) ) { - /** - * Build our image attributes - * - * @since 0.1 - */ - function generate_get_blog_image_attributes() { - $settings = wp_parse_args( - get_option( 'generate_blog_settings', array() ), - generate_blog_get_defaults() - ); - - if ( is_singular() ) { - if ( is_singular( 'page' ) ) { - $single = 'page_'; - } else { - $single = 'single_'; - } - } else { - $single = ''; - } - - $ignore_crop = array( '', '0', '9999' ); - - $atts = array( - 'width' => ( in_array( $settings[ "{$single}post_image_width" ], $ignore_crop ) ) ? 9999 : absint( $settings[ "{$single}post_image_width" ] ), - 'height' => ( in_array( $settings[ "{$single}post_image_height" ], $ignore_crop ) ) ? 9999 : absint( $settings[ "{$single}post_image_height" ] ), - 'crop' => ( in_array( $settings[ "{$single}post_image_width" ], $ignore_crop ) || in_array( $settings[ "{$single}post_image_height" ], $ignore_crop ) ) ? false : true, - ); - - // If there's no height or width, empty the array. - if ( 9999 == $atts['width'] && 9999 == $atts['height'] ) { // phpcs:ignore - $atts = array(); - } - - return apply_filters( 'generate_blog_image_attributes', $atts ); - } -} - -if ( ! function_exists( 'generate_blog_setup' ) ) { - add_action( 'wp', 'generate_blog_setup', 50 ); - /** - * Setup our blog functions and actions - * - * @since 0.1 - */ - function generate_blog_setup() { - $settings = wp_parse_args( - get_option( 'generate_blog_settings', array() ), - generate_blog_get_defaults() - ); - - // Move our featured images to above the title. - if ( 'post-image-above-header' === $settings['post_image_position'] ) { - remove_action( 'generate_after_entry_header', 'generate_post_image' ); - add_action( 'generate_before_content', 'generate_post_image' ); - - // If we're using the Page Header add-on, move those as well. - if ( function_exists( 'generate_page_header_post_image' ) ) { - remove_action( 'generate_after_entry_header', 'generate_page_header_post_image' ); - add_action( 'generate_before_content', 'generate_page_header_post_image' ); - } - } - - $page_header_content = false; - if ( function_exists( 'generate_page_header_get_options' ) ) { - $options = generate_page_header_get_options(); - - if ( $options && '' !== $options['content'] ) { - $page_header_content = true; - } - - // If our Page Header has no content, remove it. - // This will allow the Blog add-on to add an image for us. - if ( ! $page_header_content && is_singular() ) { - remove_action( 'generate_before_content', 'generate_page_header' ); - remove_action( 'generate_after_entry_header', 'generate_page_header' ); - remove_action( 'generate_after_header', 'generate_page_header' ); - } - } - - // Remove the core theme featured image. - // I would like to filter instead one day. - remove_action( 'generate_after_header', 'generate_featured_page_header' ); - remove_action( 'generate_before_content', 'generate_featured_page_header_inside_single' ); - - $location = generate_blog_get_singular_template(); - - if ( $settings[ $location . '_post_image' ] && is_singular() && ! $page_header_content ) { - if ( 'below-title' === $settings[ $location . '_post_image_position' ] ) { - add_action( 'generate_after_entry_header', 'generate_blog_single_featured_image' ); - } - - if ( 'inside-content' === $settings[ $location . '_post_image_position' ] ) { - add_action( 'generate_before_content', 'generate_blog_single_featured_image' ); - } - - if ( 'above-content' === $settings[ $location . '_post_image_position' ] ) { - add_action( 'generate_after_header', 'generate_blog_single_featured_image' ); - } - } - } -} - -add_filter( 'generate_featured_image_output', 'generate_blog_featured_image' ); -/** - * Remove featured image if set or using WooCommerce. - * - * @since 1.5 - * @param string $output The existing output. - * @return string The image HTML - */ -function generate_blog_featured_image( $output ) { - $settings = wp_parse_args( - get_option( 'generate_blog_settings', array() ), - generate_blog_get_defaults() - ); - - if ( ( function_exists( 'is_woocommerce' ) && is_woocommerce() ) || ! $settings['post_image'] ) { - return false; - } - - return $output; -} - -/** - * Build our featured images for single posts and pages. - * - * This function is way more complicated than it could be so it can - * ensure compatibility with the Page Header add-on. - * - * @since 1.5 - * - * @return string The image HTML - */ -function generate_blog_single_featured_image() { - $settings = wp_parse_args( - get_option( 'generate_blog_settings', array() ), - generate_blog_get_defaults() - ); - - $image_id = get_post_thumbnail_id( get_the_ID(), 'full' ); - - if ( function_exists( 'generate_page_header_get_image' ) && generate_page_header_get_image( 'ID' ) ) { - if ( intval( $image_id ) !== generate_page_header_get_image( 'ID' ) ) { - $image_id = generate_page_header_get_image( 'ID' ); - } - } - - $location = generate_blog_get_singular_template(); - - if ( ( function_exists( 'is_woocommerce' ) && is_woocommerce() ) || ! $settings[ $location . '_post_image' ] || ! $image_id ) { - return false; - } - - $attrs = array( - 'itemprop' => 'image', - ); - - if ( function_exists( 'generate_get_schema_type' ) ) { - if ( 'microdata' !== generate_get_schema_type() ) { - $attrs = array(); - } - } - - $attrs['loading'] = false; - $attrs = apply_filters( 'generate_single_featured_image_attrs', $attrs ); - - $image_html = apply_filters( - 'post_thumbnail_html', // phpcs:ignore -- Core filter. - wp_get_attachment_image( - $image_id, - apply_filters( 'generate_page_header_default_size', 'full' ), - '', - $attrs - ), - get_the_ID(), - $image_id, - apply_filters( 'generate_page_header_default_size', 'full' ), - '' - ); - - $location = generate_blog_get_singular_template(); - - $classes = array( - is_page() ? 'page-header-image' : null, - is_singular() && ! is_page() ? 'page-header-image-single' : null, - 'above-content' === $settings[ $location . '_post_image_position' ] ? 'grid-container grid-parent' : null, - ); - - $image_html = apply_filters( 'generate_single_featured_image_html', $image_html ); - - // phpcs:ignore -- No need to escape here. - echo apply_filters( - 'generate_single_featured_image_output', - sprintf( - '', - $image_html, - implode( ' ', $classes ) - ), - $image_html - ); -} - -add_filter( 'generate_blog_image_attributes', 'generate_blog_page_header_image_atts' ); -/** - * Filter our image attributes in case we're using differents atts in our Page Header - * - * @since 1.5 - * - * @param array $atts Our existing image attributes. - * @return array Image attributes - */ -function generate_blog_page_header_image_atts( $atts ) { - if ( ! function_exists( 'generate_page_header_get_options' ) ) { - return $atts; - } - - if ( ! is_singular() ) { - return $atts; - } - - $options = generate_page_header_get_options(); - - if ( $options && 'enable' === $options['image_resize'] ) { - $ignore_crop = array( '', '0', '9999' ); - - $atts = array( - 'width' => ( in_array( $options['image_width'], $ignore_crop ) ) ? 9999 : absint( $options['image_width'] ), - 'height' => ( in_array( $options['image_height'], $ignore_crop ) ) ? 9999 : absint( $options['image_height'] ), - 'crop' => ( in_array( $options['image_width'], $ignore_crop ) || in_array( $options['image_height'], $ignore_crop ) ) ? false : true, - ); - } - - return $atts; -} - -add_filter( 'generate_single_featured_image_html', 'generate_blog_page_header_link' ); -/** - * Add our Page Header link to our featured image if set. - * - * @since 1.5 - * - * @param string $image_html Our existing image HTML. - * @return string Our new image HTML. - */ -function generate_blog_page_header_link( $image_html ) { - if ( ! function_exists( 'generate_page_header_get_options' ) ) { - return $image_html; - } - - $options = generate_page_header_get_options(); - - if ( ! empty( $options['image_link'] ) ) { - return '' . $image_html . ''; - } else { - return $image_html; - } -} - -add_filter( 'body_class', 'generate_blog_remove_featured_image_class', 20 ); -/** - * Remove the featured image classes if they're disabled. - * - * @since 2.1.0 - * @param array $classes The body classes. - */ -function generate_blog_remove_featured_image_class( $classes ) { - if ( is_singular() ) { - $settings = wp_parse_args( - get_option( 'generate_blog_settings', array() ), - generate_blog_get_defaults() - ); - - if ( is_single() ) { - $disable_single_featured_image = ! $settings['single_post_image']; - $classes = generate_premium_remove_featured_image_class( $classes, $disable_single_featured_image ); - } - - if ( is_page() && ! $settings['page_post_image'] ) { - $disable_page_featured_image = ! $settings['page_post_image']; - $classes = generate_premium_remove_featured_image_class( $classes, $disable_page_featured_image ); - } - } - - return $classes; -} diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/blog/functions/js/controls.js b/wp-content/upgrade-temp-backup/plugins/gp-premium/blog/functions/js/controls.js deleted file mode 100644 index eb397ff9..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/blog/functions/js/controls.js +++ /dev/null @@ -1,98 +0,0 @@ -jQuery( function( $ ) { - // Featured image controls - var featuredImageArchiveControls = [ - 'generate_blog_settings-post_image', - 'generate_blog_settings-post_image_padding', - 'generate_blog_settings-post_image_position', - 'generate_blog_settings-post_image_alignment', - 'generate_blog_settings-post_image_size', - 'generate_blog_settings-post_image_width', - 'generate_blog_settings-post_image_height', - 'generate_regenerate_images_notice', - ]; - - $.each( featuredImageArchiveControls, function( index, value ) { - $( '#customize-control-' + value ).attr( 'data-control-section', 'featured-image-archives' ); - } ); - - var featuredImageSingleControls = [ - 'generate_blog_settings-single_post_image', - 'generate_blog_settings-single_post_image_padding', - 'generate_blog_settings-single_post_image_position', - 'generate_blog_settings-single_post_image_alignment', - 'generate_blog_settings-single_post_image_size', - 'generate_blog_settings-single_post_image_width', - 'generate_blog_settings-single_post_image_height', - 'generate_regenerate_single_post_images_notice', - ]; - - $.each( featuredImageSingleControls, function( index, value ) { - $( '#customize-control-' + value ).attr( 'data-control-section', 'featured-image-single' ).css( { - visibility: 'hidden', - height: '0', - width: '0', - margin: '0', - overflow: 'hidden', - } ); - } ); - - var featuredImagePageControls = [ - 'generate_blog_settings-page_post_image', - 'generate_blog_settings-page_post_image_padding', - 'generate_blog_settings-page_post_image_position', - 'generate_blog_settings-page_post_image_alignment', - 'generate_blog_settings-page_post_image_size', - 'generate_blog_settings-page_post_image_width', - 'generate_blog_settings-page_post_image_height', - 'generate_regenerate_page_images_notice', - ]; - - $.each( featuredImagePageControls, function( index, value ) { - $( '#customize-control-' + value ).attr( 'data-control-section', 'featured-image-page' ).css( { - visibility: 'hidden', - height: '0', - width: '0', - margin: '0', - overflow: 'hidden', - } ); - } ); - - // Post meta controls - var postMetaArchiveControls = [ - 'generate_settings-post_content', - 'generate_blog_settings-excerpt_length', - 'generate_blog_settings-read_more', - 'generate_blog_settings-read_more_button', - 'generate_blog_settings-date', - 'generate_blog_settings-author', - 'generate_blog_settings-categories', - 'generate_blog_settings-tags', - 'generate_blog_settings-comments', - 'generate_blog_settings-infinite_scroll', - 'generate_blog_settings-infinite_scroll_button', - 'blog_masonry_load_more_control', - 'blog_masonry_loading_control', - ]; - - $.each( postMetaArchiveControls, function( index, value ) { - $( '#customize-control-' + value ).attr( 'data-control-section', 'post-meta-archives' ); - } ); - - var postMetaSingleControls = [ - 'generate_blog_settings-single_date', - 'generate_blog_settings-single_author', - 'generate_blog_settings-single_categories', - 'generate_blog_settings-single_tags', - 'generate_blog_settings-single_post_navigation', - ]; - - $.each( postMetaSingleControls, function( index, value ) { - $( '#customize-control-' + value ).attr( 'data-control-section', 'post-meta-single' ).css( { - visibility: 'hidden', - height: '0', - width: '0', - margin: '0', - overflow: 'hidden', - } ); - } ); -} ); diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/blog/functions/js/customizer.js b/wp-content/upgrade-temp-backup/plugins/gp-premium/blog/functions/js/customizer.js deleted file mode 100644 index f3c6656c..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/blog/functions/js/customizer.js +++ /dev/null @@ -1,76 +0,0 @@ -/** - * Theme Customizer enhancements for a better user experience. - * - * Contains handlers to make Theme Customizer preview reload changes asynchronously. - */ - -( function( $ ) { - // Container width - wp.customize( 'generate_settings[container_width]', function( value ) { - value.bind( function() { - if ( $( '.masonry-container' )[ 0 ] ) { - jQuery( '.masonry-container' ).imagesLoaded( function() { - $container = jQuery( '.masonry-container' ); - if ( jQuery( $container ).length ) { - $container.masonry( { - columnWidth: '.grid-sizer', - itemSelector: '.masonry-post', - stamp: '.page-header', - } ); - } - } ); - } - } ); - } ); - - $( 'body' ).on( 'generate_spacing_updated', function() { - if ( $( '.masonry-container' )[ 0 ] ) { - jQuery( '.masonry-container' ).imagesLoaded( function() { - $container = jQuery( '.masonry-container' ); - if ( jQuery( $container ).length ) { - $container.masonry( { - columnWidth: '.grid-sizer', - itemSelector: '.masonry-post', - stamp: '.page-header', - } ); - } - } ); - } - } ); - - /** - * The first infinite scroll load in the Customizer misses article classes if they've been - * added or removed in the previous refresh. - * - * This is totally hacky, but I'm just happy I finally got it working! - */ - var $container = $( '.infinite-scroll-item' ).first().parent(); - $container.on( 'load.infiniteScroll', function( event, response ) { - var $posts = $( response ).find( 'article' ); - if ( wp.customize.value( 'generate_blog_settings[column_layout]' )() ) { - $posts.addClass( 'generate-columns' ); - $posts.addClass( 'grid-parent' ); - $posts.addClass( 'grid-' + wp.customize.value( 'generate_blog_settings[columns]' )() ); - $posts.addClass( 'tablet-grid-50' ); - $posts.addClass( 'mobile-grid-100' ); - } else { - $posts.removeClass( 'generate-columns' ); - $posts.removeClass( 'grid-parent' ); - $posts.removeClass( 'grid-' + wp.customize.value( 'generate_blog_settings[columns]' )() ); - $posts.removeClass( 'tablet-grid-50' ); - $posts.removeClass( 'mobile-grid-100' ); - } - - if ( wp.customize.value( 'generate_blog_settings[masonry]' )() ) { - $posts.addClass( 'masonry-post' ); - } else { - $posts.removeClass( 'masonry-post' ); - } - - if ( ! wp.customize.value( 'generate_blog_settings[post_image_padding]' )() ) { - $posts.addClass( 'no-featured-image-padding' ); - } else { - $posts.removeClass( 'no-featured-image-padding' ); - } - } ); -}( jQuery ) ); diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/blog/functions/js/infinite-scroll.pkgd.min.js b/wp-content/upgrade-temp-backup/plugins/gp-premium/blog/functions/js/infinite-scroll.pkgd.min.js deleted file mode 100644 index 329c20c6..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/blog/functions/js/infinite-scroll.pkgd.min.js +++ /dev/null @@ -1,12 +0,0 @@ -/*! - * Infinite Scroll PACKAGED v3.0.6 - * Automatically add next page - * - * Licensed GPLv3 for open source use - * or Infinite Scroll Commercial License for commercial use - * - * https://infinite-scroll.com - * Copyright 2018 Metafizzy - */ - -!function(t,e){"function"==typeof define&&define.amd?define("jquery-bridget/jquery-bridget",["jquery"],function(i){return e(t,i)}):"object"==typeof module&&module.exports?module.exports=e(t,require("jquery")):t.jQueryBridget=e(t,t.jQuery)}(window,function(t,e){"use strict";function i(i,r,l){function a(t,e,n){var o,r="$()."+i+'("'+e+'")';return t.each(function(t,a){var h=l.data(a,i);if(!h)return void s(i+" not initialized. Cannot call methods, i.e. "+r);var c=h[e];if(!c||"_"==e.charAt(0))return void s(r+" is not a valid method");var u=c.apply(h,n);o=void 0===o?u:o}),void 0!==o?o:t}function h(t,e){t.each(function(t,n){var o=l.data(n,i);o?(o.option(e),o._init()):(o=new r(n,e),l.data(n,i,o))})}l=l||e||t.jQuery,l&&(r.prototype.option||(r.prototype.option=function(t){l.isPlainObject(t)&&(this.options=l.extend(!0,this.options,t))}),l.fn[i]=function(t){if("string"==typeof t){var e=o.call(arguments,1);return a(this,t,e)}return h(this,t),this},n(l))}function n(t){!t||t&&t.bridget||(t.bridget=i)}var o=Array.prototype.slice,r=t.console,s="undefined"==typeof r?function(){}:function(t){r.error(t)};return n(e||t.jQuery),i}),function(t,e){"function"==typeof define&&define.amd?define("ev-emitter/ev-emitter",e):"object"==typeof module&&module.exports?module.exports=e():t.EvEmitter=e()}("undefined"!=typeof window?window:this,function(){function t(){}var e=t.prototype;return e.on=function(t,e){if(t&&e){var i=this._events=this._events||{},n=i[t]=i[t]||[];return n.indexOf(e)==-1&&n.push(e),this}},e.once=function(t,e){if(t&&e){this.on(t,e);var i=this._onceEvents=this._onceEvents||{},n=i[t]=i[t]||{};return n[e]=!0,this}},e.off=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){var n=i.indexOf(e);return n!=-1&&i.splice(n,1),this}},e.emitEvent=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){i=i.slice(0),e=e||[];for(var n=this._onceEvents&&this._onceEvents[t],o=0;o=0,this.isPrefilling?(this.log("prefill"),this.loadNextPage()):this.stopPrefill()},s.getPrefillDistance=function(){return this.options.elementScroll?this.scroller.clientHeight-this.scroller.scrollHeight:this.windowHeight-this.element.clientHeight},s.stopPrefill=function(){this.log("stopPrefill"),this.off("append",this.prefill)},e}),function(t,e){"function"==typeof define&&define.amd?define("infinite-scroll/js/scroll-watch",["./core","fizzy-ui-utils/utils"],function(i,n){return e(t,i,n)}):"object"==typeof module&&module.exports?module.exports=e(t,require("./core"),require("fizzy-ui-utils")):e(t,t.InfiniteScroll,t.fizzyUIUtils)}(window,function(t,e,i){var n=e.prototype;return e.defaults.scrollThreshold=400,e.create.scrollWatch=function(){this.pageScrollHandler=this.onPageScroll.bind(this),this.resizeHandler=this.onResize.bind(this);var t=this.options.scrollThreshold,e=t||0===t;e&&this.enableScrollWatch()},e.destroy.scrollWatch=function(){this.disableScrollWatch()},n.enableScrollWatch=function(){this.isScrollWatching||(this.isScrollWatching=!0,this.updateMeasurements(),this.updateScroller(),this.on("last",this.disableScrollWatch),this.bindScrollWatchEvents(!0))},n.disableScrollWatch=function(){this.isScrollWatching&&(this.bindScrollWatchEvents(!1),delete this.isScrollWatching)},n.bindScrollWatchEvents=function(e){var i=e?"addEventListener":"removeEventListener";this.scroller[i]("scroll",this.pageScrollHandler),t[i]("resize",this.resizeHandler)},n.onPageScroll=e.throttle(function(){var t=this.getBottomDistance();t<=this.options.scrollThreshold&&this.dispatchEvent("scrollThreshold")}),n.getBottomDistance=function(){return this.options.elementScroll?this.getElementBottomDistance():this.getWindowBottomDistance()},n.getWindowBottomDistance=function(){var e=this.top+this.element.clientHeight,i=t.pageYOffset+this.windowHeight;return e-i},n.getElementBottomDistance=function(){var t=this.scroller.scrollHeight,e=this.scroller.scrollTop+this.scroller.clientHeight;return t-e},n.onResize=function(){this.updateMeasurements()},i.debounceMethod(e,"onResize",150),e}),function(t,e){"function"==typeof define&&define.amd?define("infinite-scroll/js/history",["./core","fizzy-ui-utils/utils"],function(i,n){return e(t,i,n)}):"object"==typeof module&&module.exports?module.exports=e(t,require("./core"),require("fizzy-ui-utils")):e(t,t.InfiniteScroll,t.fizzyUIUtils)}(window,function(t,e,i){var n=e.prototype;e.defaults.history="replace";var o=document.createElement("a");return e.create.history=function(){if(this.options.history){o.href=this.getAbsolutePath();var t=o.origin||o.protocol+"//"+o.host,e=t==location.origin;return e?void(this.options.append?this.createHistoryAppend():this.createHistoryPageLoad()):void console.error("[InfiniteScroll] cannot set history with different origin: "+o.origin+" on "+location.origin+" . History behavior disabled.")}},n.createHistoryAppend=function(){this.updateMeasurements(),this.updateScroller(),this.scrollPages=[{top:0,path:location.href,title:document.title}],this.scrollPageIndex=0,this.scrollHistoryHandler=this.onScrollHistory.bind(this),this.unloadHandler=this.onUnload.bind(this),this.scroller.addEventListener("scroll",this.scrollHistoryHandler),this.on("append",this.onAppendHistory),this.bindHistoryAppendEvents(!0)},n.bindHistoryAppendEvents=function(e){var i=e?"addEventListener":"removeEventListener";this.scroller[i]("scroll",this.scrollHistoryHandler),t[i]("unload",this.unloadHandler)},n.createHistoryPageLoad=function(){this.on("load",this.onPageLoadHistory)},e.destroy.history=n.destroyHistory=function(){var t=this.options.history&&this.options.append;t&&this.bindHistoryAppendEvents(!1)},n.onAppendHistory=function(t,e,i){if(i&&i.length){var n=i[0],r=this.getElementScrollY(n);o.href=e,this.scrollPages.push({top:r,path:o.href,title:t.title})}},n.getElementScrollY=function(t){return this.options.elementScroll?this.getElementElementScrollY(t):this.getElementWindowScrollY(t)},n.getElementWindowScrollY=function(e){var i=e.getBoundingClientRect();return i.top+t.pageYOffset},n.getElementElementScrollY=function(t){return t.offsetTop-this.top},n.onScrollHistory=function(){for(var t,e,i=this.getScrollViewY(),n=0;n=i)break;t=n,e=o}t!=this.scrollPageIndex&&(this.scrollPageIndex=t,this.setHistory(e.title,e.path))},i.debounceMethod(e,"onScrollHistory",150),n.getScrollViewY=function(){return this.options.elementScroll?this.scroller.scrollTop+this.scroller.clientHeight/2:t.pageYOffset+this.windowHeight/2},n.setHistory=function(t,e){var i=this.options.history,n=i&&history[i+"State"];n&&(history[i+"State"](null,t,e),this.options.historyTitle&&(document.title=t),this.dispatchEvent("history",null,[t,e]))},n.onUnload=function(){var e=this.scrollPageIndex;if(0!==e){var i=this.scrollPages[e],n=t.pageYOffset-i.top+this.top;this.destroyHistory(),scrollTo(0,n)}},n.onPageLoadHistory=function(t,e){this.setHistory(t.title,e)},e}),function(t,e){"function"==typeof define&&define.amd?define("infinite-scroll/js/button",["./core","fizzy-ui-utils/utils"],function(i,n){return e(t,i,n)}):"object"==typeof module&&module.exports?module.exports=e(t,require("./core"),require("fizzy-ui-utils")):e(t,t.InfiniteScroll,t.fizzyUIUtils)}(window,function(t,e,i){function n(t,e){this.element=t,this.infScroll=e,this.clickHandler=this.onClick.bind(this),this.element.addEventListener("click",this.clickHandler),e.on("request",this.disable.bind(this)),e.on("load",this.enable.bind(this)),e.on("error",this.hide.bind(this)),e.on("last",this.hide.bind(this))}return e.create.button=function(){var t=i.getQueryElement(this.options.button);if(t)return void(this.button=new n(t,this))},e.destroy.button=function(){this.button&&this.button.destroy()},n.prototype.onClick=function(t){t.preventDefault(),this.infScroll.loadNextPage()},n.prototype.enable=function(){this.element.removeAttribute("disabled")},n.prototype.disable=function(){this.element.disabled="disabled"},n.prototype.hide=function(){this.element.style.display="none"},n.prototype.destroy=function(){this.element.removeEventListener("click",this.clickHandler)},e.Button=n,e}),function(t,e){"function"==typeof define&&define.amd?define("infinite-scroll/js/status",["./core","fizzy-ui-utils/utils"],function(i,n){return e(t,i,n)}):"object"==typeof module&&module.exports?module.exports=e(t,require("./core"),require("fizzy-ui-utils")):e(t,t.InfiniteScroll,t.fizzyUIUtils)}(window,function(t,e,i){function n(t){r(t,"none")}function o(t){r(t,"block")}function r(t,e){t&&(t.style.display=e)}var s=e.prototype;return e.create.status=function(){var t=i.getQueryElement(this.options.status);t&&(this.statusElement=t,this.statusEventElements={request:t.querySelector(".infinite-scroll-request"),error:t.querySelector(".infinite-scroll-error"),last:t.querySelector(".infinite-scroll-last")},this.on("request",this.showRequestStatus),this.on("error",this.showErrorStatus),this.on("last",this.showLastStatus),this.bindHideStatus("on"))},s.bindHideStatus=function(t){var e=this.options.append?"append":"load";this[t](e,this.hideAllStatus)},s.showRequestStatus=function(){this.showStatus("request")},s.showErrorStatus=function(){this.showStatus("error")},s.showLastStatus=function(){this.showStatus("last"),this.bindHideStatus("off")},s.showStatus=function(t){o(this.statusElement),this.hideStatusEventElements();var e=this.statusEventElements[t];o(e)},s.hideAllStatus=function(){n(this.statusElement),this.hideStatusEventElements()},s.hideStatusEventElements=function(){for(var t in this.statusEventElements){var e=this.statusEventElements[t];n(e)}},e}),function(t,e){"function"==typeof define&&define.amd?define(["infinite-scroll/js/core","infinite-scroll/js/page-load","infinite-scroll/js/scroll-watch","infinite-scroll/js/history","infinite-scroll/js/button","infinite-scroll/js/status"],e):"object"==typeof module&&module.exports&&(module.exports=e(require("./core"),require("./page-load"),require("./scroll-watch"),require("./history"),require("./button"),require("./status")))}(window,function(t){return t}),function(t,e){"use strict";"function"==typeof define&&define.amd?define("imagesloaded/imagesloaded",["ev-emitter/ev-emitter"],function(i){return e(t,i)}):"object"==typeof module&&module.exports?module.exports=e(t,require("ev-emitter")):t.imagesLoaded=e(t,t.EvEmitter)}("undefined"!=typeof window?window:this,function(t,e){function i(t,e){for(var i in e)t[i]=e[i];return t}function n(t){if(Array.isArray(t))return t;var e="object"==typeof t&&"number"==typeof t.length;return e?h.call(t):[t]}function o(t,e,r){if(!(this instanceof o))return new o(t,e,r);var s=t;return"string"==typeof t&&(s=document.querySelectorAll(t)),s?(this.elements=n(s),this.options=i({},this.options),"function"==typeof e?r=e:i(this.options,e),r&&this.on("always",r),this.getImages(),l&&(this.jqDeferred=new l.Deferred),void setTimeout(this.check.bind(this))):void a.error("Bad element for imagesLoaded "+(s||t))}function r(t){this.img=t}function s(t,e){this.url=t,this.element=e,this.img=new Image}var l=t.jQuery,a=t.console,h=Array.prototype.slice;o.prototype=Object.create(e.prototype),o.prototype.options={},o.prototype.getImages=function(){this.images=[],this.elements.forEach(this.addElementImages,this)},o.prototype.addElementImages=function(t){"IMG"==t.nodeName&&this.addImage(t),this.options.background===!0&&this.addElementBackgroundImages(t);var e=t.nodeType;if(e&&c[e]){for(var i=t.querySelectorAll("img"),n=0;n 'false', - 'masonry_width' => 'width2', - 'masonry_most_recent_width' => 'width4', - 'post_image' => 'true', - 'date' => 'true', - 'author' => 'true', - 'categories' => 'true', - 'tags' => 'true', - 'comments' => 'true', - ); - - // Get our spacing settings - $blog_settings = wp_parse_args( - get_option( 'generate_blog_settings', array() ), - $defaults - ); - - $new_settings = array(); - - // These options use to be a select input with false + true values - // This will make the false values empty so the options can be checkboxes - $keys = array( 'date', 'author', 'categories', 'tags', 'comments', 'masonry', 'post_image' ); - foreach ( $keys as $key ) { - if ( is_string( $blog_settings[ $key ] ) ) { - if ( 'false' == $blog_settings[ $key ] ) { - $new_settings[ $key ] = false; - } elseif ( 'true' == $blog_settings[ $key ] ) { - $new_settings[ $key ] = true; - } - } - } - - // Set the single post meta options to whatever the blog options are - $new_settings[ 'single_date' ] = isset( $new_settings[ 'date' ] ) ? $new_settings[ 'date' ] : true; - $new_settings[ 'single_author' ] = isset( $new_settings[ 'author' ] ) ? $new_settings[ 'author' ] : true; - $new_settings[ 'single_categories' ] = isset( $new_settings[ 'categories' ] ) ? $new_settings[ 'categories' ] : true; - $new_settings[ 'single_tags' ] = isset( $new_settings[ 'tags' ] ) ? $new_settings[ 'tags' ] : true; - - if ( isset( $new_settings[ 'masonry' ] ) && $new_settings[ 'masonry' ] ) { - $new_settings[ 'column_layout' ] = true; - $new_settings[ 'infinite_scroll' ] = true; - $new_settings[ 'infinite_scroll_button' ] = true; - - if ( 'width2' == $blog_settings['masonry_width'] ) { - $new_settings[ 'columns' ] = '33'; - } - - if ( 'width4' == $blog_settings['masonry_width'] ) { - $new_settings[ 'columns' ] = '50'; - } - - if ( 'width6' == $blog_settings['masonry_width'] ) { - $new_settings[ 'columns' ] = '100'; - } - - if ( 'width2' == $blog_settings[ 'masonry_width' ] ) { - if ( 'width2' !== $blog_settings[ 'masonry_most_recent_width' ] ) { - $new_settings[ 'featured_column' ] = true; - } else { - $new_settings[ 'featured_column' ] = false; - } - } - - if ( 'width4' == $blog_settings[ 'masonry_width' ] ) { - if ( 'width6' == $blog_settings[ 'masonry_most_recent_width' ] ) { - $new_settings[ 'featured_column' ] = true; - } else { - $new_settings[ 'featured_column' ] = false; - } - } - - if ( 'width6' == $blog_settings[ 'masonry_width' ] ) { - $new_settings[ 'featured_column' ] = false; - } - } - - if ( function_exists( 'generate_page_header_get_defaults' ) ) { - $page_header_settings = wp_parse_args( - get_option( 'generate_page_header_settings', array() ), - generate_page_header_get_defaults() - ); - - if ( 'hide' == $page_header_settings[ 'post_header_position' ] ) { - $new_settings[ 'single_post_image' ] = false; - } else { - $new_settings[ 'single_post_image_position' ] = $page_header_settings[ 'post_header_position' ]; - } - - $new_settings[ 'page_post_image_position' ] = $page_header_settings[ 'page_header_position' ]; - } - - unset( $blog_settings['masonry_width'] ); - unset( $blog_settings['masonry_most_recent_width'] ); - - $update_settings = wp_parse_args( $new_settings, $blog_settings ); - update_option( 'generate_blog_settings', $update_settings ); - - // Update our migration option so we don't need to run this again - $updated[ 'blog_visibility_updated' ] = 'true'; - $migration_settings = wp_parse_args( $updated, $settings ); - update_option( 'generate_migration_settings', $migration_settings ); -} diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/blog/generate-blog.php b/wp-content/upgrade-temp-backup/plugins/gp-premium/blog/generate-blog.php deleted file mode 100644 index 49fd37fd..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/blog/generate-blog.php +++ /dev/null @@ -1,20 +0,0 @@ -register_control_type( 'GeneratePress_Alpha_Color_Customize_Control' ); - $wp_customize->register_control_type( 'GeneratePress_Title_Customize_Control' ); - $wp_customize->register_control_type( 'GeneratePress_Section_Shortcut_Control' ); - } - - // Get our palettes. - $palettes = generate_get_default_color_palettes(); - - // Add our Colors panel. - if ( class_exists( 'WP_Customize_Panel' ) ) { - $wp_customize->add_panel( - 'generate_colors_panel', - array( - 'priority' => 30, - 'theme_supports' => '', - 'title' => __( 'Colors', 'gp-premium' ), - 'description' => '', - ) - ); - } - - $wp_customize->add_control( - new GeneratePress_Section_Shortcut_Control( - $wp_customize, - 'generate_body_color_shortcuts', - array( - 'section' => 'body_section', - 'element' => __( 'Body', 'gp-premium' ), - 'shortcuts' => array( - 'typography' => 'font_section', - 'backgrounds' => 'generate_backgrounds_body', - ), - 'settings' => ( isset( $wp_customize->selective_refresh ) ) ? array() : 'blogname', - ) - ) - ); - - // Add Top Bar Colors section. - if ( isset( $defaults['top_bar_background_color'] ) && function_exists( 'generate_is_top_bar_active' ) ) { - $wp_customize->add_section( - 'generate_top_bar_colors', - array( - 'title' => __( 'Top Bar', 'gp-premium' ), - 'priority' => 40, - 'panel' => 'generate_colors_panel', - ) - ); - - $wp_customize->add_setting( - 'generate_settings[top_bar_background_color]', - array( - 'default' => $defaults['top_bar_background_color'], - 'type' => 'option', - 'transport' => 'postMessage', - 'sanitize_callback' => 'generate_premium_sanitize_rgba', - ) - ); - - $wp_customize->add_control( - new GeneratePress_Alpha_Color_Customize_Control( - $wp_customize, - 'generate_settings[top_bar_background_color]', - array( - 'label' => __( 'Background', 'gp-premium' ), - 'section' => 'generate_top_bar_colors', - 'settings' => 'generate_settings[top_bar_background_color]', - 'palette' => $palettes, - 'show_opacity' => true, - 'priority' => 1, - 'active_callback' => 'generate_is_top_bar_active', - ) - ) - ); - - // Add color settings. - $top_bar_colors = array(); - $top_bar_colors[] = array( - 'slug' => 'top_bar_text_color', - 'default' => $defaults['top_bar_text_color'], - 'label' => __( 'Text', 'gp-premium' ), - 'priority' => 2, - ); - $top_bar_colors[] = array( - 'slug' => 'top_bar_link_color', - 'default' => $defaults['top_bar_link_color'], - 'label' => __( 'Link', 'gp-premium' ), - 'priority' => 3, - ); - $top_bar_colors[] = array( - 'slug' => 'top_bar_link_color_hover', - 'default' => $defaults['top_bar_link_color_hover'], - 'label' => __( 'Link Hover', 'gp-premium' ), - 'priority' => 4, - ); - - foreach ( $top_bar_colors as $color ) { - $wp_customize->add_setting( - 'generate_settings[' . $color['slug'] . ']', - array( - 'default' => $color['default'], - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_hex_color', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - new WP_Customize_Color_Control( - $wp_customize, - $color['slug'], - array( - 'label' => $color['label'], - 'section' => 'generate_top_bar_colors', - 'settings' => 'generate_settings[' . $color['slug'] . ']', - 'priority' => $color['priority'], - 'palette' => $palettes, - 'active_callback' => 'generate_is_top_bar_active', - ) - ) - ); - } - } - - // Add Header Colors section. - $wp_customize->add_section( - 'header_color_section', - array( - 'title' => __( 'Header', 'gp-premium' ), - 'priority' => 50, - 'panel' => 'generate_colors_panel', - ) - ); - - $wp_customize->add_control( - new GeneratePress_Section_Shortcut_Control( - $wp_customize, - 'generate_header_color_shortcuts', - array( - 'section' => 'header_color_section', - 'element' => __( 'Header', 'gp-premium' ), - 'shortcuts' => array( - 'layout' => 'generate_layout_header', - 'typography' => 'font_header_section', - 'backgrounds' => 'generate_backgrounds_header', - ), - 'settings' => ( isset( $wp_customize->selective_refresh ) ) ? array() : 'blogname', - 'priority' => 1, - ) - ) - ); - - $wp_customize->add_setting( - 'generate_settings[header_background_color]', - array( - 'default' => $defaults['header_background_color'], - 'type' => 'option', - 'transport' => 'postMessage', - 'sanitize_callback' => 'generate_premium_sanitize_rgba', - ) - ); - - $wp_customize->add_control( - new GeneratePress_Alpha_Color_Customize_Control( - $wp_customize, - 'generate_settings[header_background_color]', - array( - 'label' => __( 'Background', 'gp-premium' ), - 'section' => 'header_color_section', - 'settings' => 'generate_settings[header_background_color]', - 'palette' => $palettes, - 'show_opacity' => true, - 'priority' => 1, - ) - ) - ); - - // Add color settings. - $header_colors = array(); - $header_colors[] = array( - 'slug' => 'header_text_color', - 'default' => $defaults['header_text_color'], - 'label' => __( 'Text', 'gp-premium' ), - 'priority' => 2, - ); - $header_colors[] = array( - 'slug' => 'header_link_color', - 'default' => $defaults['header_link_color'], - 'label' => __( 'Link', 'gp-premium' ), - 'priority' => 3, - ); - $header_colors[] = array( - 'slug' => 'header_link_hover_color', - 'default' => $defaults['header_link_hover_color'], - 'label' => __( 'Link Hover', 'gp-premium' ), - 'priority' => 4, - ); - $header_colors[] = array( - 'slug' => 'site_title_color', - 'default' => $defaults['site_title_color'], - 'label' => __( 'Site Title', 'gp-premium' ), - 'priority' => 5, - ); - $header_colors[] = array( - 'slug' => 'site_tagline_color', - 'default' => $defaults['site_tagline_color'], - 'label' => __( 'Tagline', 'gp-premium' ), - 'priority' => 6, - ); - - foreach ( $header_colors as $color ) { - $wp_customize->add_setting( - 'generate_settings[' . $color['slug'] . ']', - array( - 'default' => $color['default'], - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_hex_color', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - new WP_Customize_Color_Control( - $wp_customize, - $color['slug'], - array( - 'label' => $color['label'], - 'section' => 'header_color_section', - 'settings' => 'generate_settings[' . $color['slug'] . ']', - 'priority' => $color['priority'], - 'palette' => $palettes, - ) - ) - ); - } - - // Add Navigation section. - $wp_customize->add_section( - 'navigation_color_section', - array( - 'title' => __( 'Primary Navigation', 'gp-premium' ), - 'priority' => 60, - 'panel' => 'generate_colors_panel', - ) - ); - - $wp_customize->add_control( - new GeneratePress_Section_Shortcut_Control( - $wp_customize, - 'generate_primary_navigation_color_shortcuts', - array( - 'section' => 'navigation_color_section', - 'element' => __( 'Primary Navigation', 'gp-premium' ), - 'shortcuts' => array( - 'layout' => 'generate_layout_navigation', - 'typography' => 'font_navigation_section', - 'backgrounds' => 'generate_backgrounds_navigation', - ), - 'settings' => ( isset( $wp_customize->selective_refresh ) ) ? array() : 'blogname', - 'priority' => 0, - ) - ) - ); - - $wp_customize->add_control( - new GeneratePress_Title_Customize_Control( - $wp_customize, - 'generate_primary_navigation_parent_items', - array( - 'section' => 'navigation_color_section', - 'type' => 'generatepress-customizer-title', - 'title' => __( 'Parent Items', 'gp-premium' ), - 'settings' => ( isset( $wp_customize->selective_refresh ) ) ? array() : 'blogname', - 'priority' => 1, - ) - ) - ); - - $wp_customize->add_setting( - 'generate_settings[navigation_background_color]', - array( - 'default' => $defaults['navigation_background_color'], - 'type' => 'option', - 'transport' => 'postMessage', - 'sanitize_callback' => 'generate_premium_sanitize_rgba', - ) - ); - - $wp_customize->add_control( - new GeneratePress_Alpha_Color_Customize_Control( - $wp_customize, - 'generate_settings[navigation_background_color]', - array( - 'label' => __( 'Background', 'gp-premium' ), - 'section' => 'navigation_color_section', - 'settings' => 'generate_settings[navigation_background_color]', - 'palette' => $palettes, - 'priority' => 1, - ) - ) - ); - - $wp_customize->add_setting( - 'generate_settings[navigation_background_hover_color]', - array( - 'default' => $defaults['navigation_background_hover_color'], - 'type' => 'option', - 'transport' => 'postMessage', - 'sanitize_callback' => 'generate_premium_sanitize_rgba', - ) - ); - - $wp_customize->add_control( - new GeneratePress_Alpha_Color_Customize_Control( - $wp_customize, - 'generate_settings[navigation_background_hover_color]', - array( - 'label' => __( 'Background Hover', 'gp-premium' ), - 'section' => 'navigation_color_section', - 'settings' => 'generate_settings[navigation_background_hover_color]', - 'palette' => $palettes, - 'priority' => 3, - ) - ) - ); - - $wp_customize->add_setting( - 'generate_settings[navigation_background_current_color]', - array( - 'default' => $defaults['navigation_background_current_color'], - 'type' => 'option', - 'transport' => 'postMessage', - 'sanitize_callback' => 'generate_premium_sanitize_rgba', - ) - ); - - $wp_customize->add_control( - new GeneratePress_Alpha_Color_Customize_Control( - $wp_customize, - 'generate_settings[navigation_background_current_color]', - array( - 'label' => __( 'Background Current', 'gp-premium' ), - 'section' => 'navigation_color_section', - 'settings' => 'generate_settings[navigation_background_current_color]', - 'palette' => $palettes, - 'priority' => 5, - ) - ) - ); - - // Add color settings. - $navigation_colors = array(); - $navigation_colors[] = array( - 'slug' => 'navigation_text_color', - 'default' => $defaults['navigation_text_color'], - 'label' => __( 'Text', 'gp-premium' ), - 'priority' => 2, - ); - $navigation_colors[] = array( - 'slug' => 'navigation_text_hover_color', - 'default' => $defaults['navigation_text_hover_color'], - 'label' => __( 'Text Hover', 'gp-premium' ), - 'priority' => 4, - ); - $navigation_colors[] = array( - 'slug' => 'navigation_text_current_color', - 'default' => $defaults['navigation_text_current_color'], - 'label' => __( 'Text Current', 'gp-premium' ), - 'priority' => 6, - ); - - foreach ( $navigation_colors as $color ) { - $wp_customize->add_setting( - 'generate_settings[' . $color['slug'] . ']', - array( - 'default' => $color['default'], - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_hex_color', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - new WP_Customize_Color_Control( - $wp_customize, - $color['slug'], - array( - 'label' => $color['label'], - 'section' => 'navigation_color_section', - 'settings' => 'generate_settings[' . $color['slug'] . ']', - 'priority' => $color['priority'], - ) - ) - ); - } - - $wp_customize->add_control( - new GeneratePress_Title_Customize_Control( - $wp_customize, - 'generate_primary_navigation_sub_menu_items', - array( - 'section' => 'navigation_color_section', - 'type' => 'generatepress-customizer-title', - 'title' => __( 'Sub-Menu Items', 'gp-premium' ), - 'settings' => ( isset( $wp_customize->selective_refresh ) ) ? array() : 'blogname', - 'priority' => 7, - ) - ) - ); - - $wp_customize->add_setting( - 'generate_settings[subnavigation_background_color]', - array( - 'default' => $defaults['subnavigation_background_color'], - 'type' => 'option', - 'transport' => 'postMessage', - 'sanitize_callback' => 'generate_premium_sanitize_rgba', - ) - ); - - $wp_customize->add_control( - new GeneratePress_Alpha_Color_Customize_Control( - $wp_customize, - 'generate_settings[subnavigation_background_color]', - array( - 'label' => __( 'Background', 'gp-premium' ), - 'section' => 'navigation_color_section', - 'settings' => 'generate_settings[subnavigation_background_color]', - 'palette' => $palettes, - 'priority' => 8, - ) - ) - ); - - $wp_customize->add_setting( - 'generate_settings[subnavigation_background_hover_color]', - array( - 'default' => $defaults['subnavigation_background_hover_color'], - 'type' => 'option', - 'transport' => 'postMessage', - 'sanitize_callback' => 'generate_premium_sanitize_rgba', - ) - ); - - $wp_customize->add_control( - new GeneratePress_Alpha_Color_Customize_Control( - $wp_customize, - 'generate_settings[subnavigation_background_hover_color]', - array( - 'label' => __( 'Background Hover', 'gp-premium' ), - 'section' => 'navigation_color_section', - 'settings' => 'generate_settings[subnavigation_background_hover_color]', - 'palette' => $palettes, - 'priority' => 10, - ) - ) - ); - - $wp_customize->add_setting( - 'generate_settings[subnavigation_background_current_color]', - array( - 'default' => $defaults['subnavigation_background_current_color'], - 'type' => 'option', - 'transport' => 'postMessage', - 'sanitize_callback' => 'generate_premium_sanitize_rgba', - ) - ); - - $wp_customize->add_control( - new GeneratePress_Alpha_Color_Customize_Control( - $wp_customize, - 'generate_settings[subnavigation_background_current_color]', - array( - 'label' => __( 'Background Current', 'gp-premium' ), - 'section' => 'navigation_color_section', - 'settings' => 'generate_settings[subnavigation_background_current_color]', - 'palette' => $palettes, - 'priority' => 12, - ) - ) - ); - - // Add color settings. - $subnavigation_colors = array(); - $subnavigation_colors[] = array( - 'slug' => 'subnavigation_text_color', - 'default' => $defaults['subnavigation_text_color'], - 'label' => __( 'Text', 'gp-premium' ), - 'priority' => 9, - ); - $subnavigation_colors[] = array( - 'slug' => 'subnavigation_text_hover_color', - 'default' => $defaults['subnavigation_text_hover_color'], - 'label' => __( 'Text Hover', 'gp-premium' ), - 'priority' => 11, - ); - $subnavigation_colors[] = array( - 'slug' => 'subnavigation_text_current_color', - 'default' => $defaults['subnavigation_text_current_color'], - 'label' => __( 'Text Current', 'gp-premium' ), - 'priority' => 13, - ); - - foreach ( $subnavigation_colors as $color ) { - $wp_customize->add_setting( - 'generate_settings[' . $color['slug'] . ']', - array( - 'default' => $color['default'], - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_hex_color', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - new WP_Customize_Color_Control( - $wp_customize, - $color['slug'], - array( - 'label' => $color['label'], - 'section' => 'navigation_color_section', - 'settings' => 'generate_settings[' . $color['slug'] . ']', - 'priority' => $color['priority'], - ) - ) - ); - } - - if ( isset( $defaults['navigation_search_background_color'] ) ) { - $wp_customize->add_control( - new GeneratePress_Title_Customize_Control( - $wp_customize, - 'generate_primary_navigation_search', - array( - 'section' => 'navigation_color_section', - 'type' => 'generatepress-customizer-title', - 'title' => __( 'Navigation Search', 'gp-premium' ), - 'settings' => ( isset( $wp_customize->selective_refresh ) ) ? array() : 'blogname', - 'priority' => 15, - ) - ) - ); - - $wp_customize->add_setting( - 'generate_settings[navigation_search_background_color]', - array( - 'default' => $defaults['navigation_search_background_color'], - 'type' => 'option', - 'transport' => 'postMessage', - 'sanitize_callback' => 'generate_premium_sanitize_rgba', - ) - ); - - $wp_customize->add_control( - new GeneratePress_Alpha_Color_Customize_Control( - $wp_customize, - 'generate_settings[navigation_search_background_color]', - array( - 'label' => __( 'Background', 'gp-premium' ), - 'section' => 'navigation_color_section', - 'settings' => 'generate_settings[navigation_search_background_color]', - 'palette' => $palettes, - 'priority' => 16, - ) - ) - ); - - $wp_customize->add_setting( - 'generate_settings[navigation_search_text_color]', - array( - 'default' => $defaults['navigation_search_text_color'], - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_hex_color', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - new WP_Customize_Color_Control( - $wp_customize, - 'generate_settings[navigation_search_text_color]', - array( - 'label' => __( 'Text', 'gp-premium' ), - 'section' => 'navigation_color_section', - 'settings' => 'generate_settings[navigation_search_text_color]', - 'priority' => 17, - ) - ) - ); - } - - $wp_customize->add_section( - 'buttons_color_section', - array( - 'title' => __( 'Buttons', 'gp-premium' ), - 'priority' => 75, - 'panel' => 'generate_colors_panel', - ) - ); - - $wp_customize->add_control( - new GeneratePress_Section_Shortcut_Control( - $wp_customize, - 'generate_buttons_color_shortcuts', - array( - 'section' => 'buttons_color_section', - 'element' => __( 'Button', 'gp-premium' ), - 'shortcuts' => array( - 'typography' => 'font_buttons_section', - ), - 'settings' => ( isset( $wp_customize->selective_refresh ) ) ? array() : 'blogname', - 'priority' => 1, - ) - ) - ); - - $wp_customize->add_setting( - 'generate_settings[form_button_background_color]', - array( - 'default' => $defaults['form_button_background_color'], - 'type' => 'option', - 'transport' => 'postMessage', - 'sanitize_callback' => 'generate_premium_sanitize_rgba', - ) - ); - - $wp_customize->add_control( - new GeneratePress_Alpha_Color_Customize_Control( - $wp_customize, - 'generate_settings[form_button_background_color]', - array( - 'label' => __( 'Background', 'gp-premium' ), - 'section' => 'buttons_color_section', - 'settings' => 'generate_settings[form_button_background_color]', - 'palette' => $palettes, - ) - ) - ); - - $wp_customize->add_setting( - 'generate_settings[form_button_text_color]', - array( - 'default' => $defaults['form_button_text_color'], - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_hex_color', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - new WP_Customize_Color_Control( - $wp_customize, - 'form_button_text_color', - array( - 'label' => __( 'Text', 'gp-premium' ), - 'section' => 'buttons_color_section', - 'settings' => 'generate_settings[form_button_text_color]', - ) - ) - ); - - $wp_customize->add_setting( - 'generate_settings[form_button_background_color_hover]', - array( - 'default' => $defaults['form_button_background_color_hover'], - 'type' => 'option', - 'transport' => 'postMessage', - 'sanitize_callback' => 'generate_premium_sanitize_rgba', - ) - ); - - $wp_customize->add_control( - new GeneratePress_Alpha_Color_Customize_Control( - $wp_customize, - 'generate_settings[form_button_background_color_hover]', - array( - 'label' => __( 'Background Hover', 'gp-premium' ), - 'section' => 'buttons_color_section', - 'settings' => 'generate_settings[form_button_background_color_hover]', - 'palette' => $palettes, - ) - ) - ); - - $wp_customize->add_setting( - 'generate_settings[form_button_text_color_hover]', - array( - 'default' => $defaults['form_button_text_color_hover'], - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_hex_color', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - new WP_Customize_Color_Control( - $wp_customize, - 'form_button_text_color_hover', - array( - 'label' => __( 'Text Hover', 'gp-premium' ), - 'section' => 'buttons_color_section', - 'settings' => 'generate_settings[form_button_text_color_hover]', - ) - ) - ); - - // Add Content Colors section. - $wp_customize->add_section( - 'content_color_section', - array( - 'title' => __( 'Content', 'gp-premium' ), - 'priority' => 80, - 'panel' => 'generate_colors_panel', - ) - ); - - $wp_customize->add_control( - new GeneratePress_Section_Shortcut_Control( - $wp_customize, - 'generate_content_color_shortcuts', - array( - 'section' => 'content_color_section', - 'element' => __( 'Content', 'gp-premium' ), - 'shortcuts' => array( - 'layout' => 'generate_layout_container', - 'typography' => 'font_content_section', - 'backgrounds' => 'generate_backgrounds_content', - ), - 'settings' => ( isset( $wp_customize->selective_refresh ) ) ? array() : 'blogname', - 'priority' => 1, - ) - ) - ); - - $wp_customize->add_setting( - 'generate_settings[content_background_color]', - array( - 'default' => $defaults['content_background_color'], - 'type' => 'option', - 'transport' => 'postMessage', - 'sanitize_callback' => 'generate_premium_sanitize_rgba', - ) - ); - - $wp_customize->add_control( - new GeneratePress_Alpha_Color_Customize_Control( - $wp_customize, - 'generate_settings[content_background_color]', - array( - 'label' => __( 'Background', 'gp-premium' ), - 'section' => 'content_color_section', - 'settings' => 'generate_settings[content_background_color]', - 'palette' => $palettes, - 'priority' => 1, - ) - ) - ); - - // Add color settings. - $content_colors = array(); - $content_colors[] = array( - 'slug' => 'content_text_color', - 'default' => $defaults['content_text_color'], - 'label' => __( 'Text', 'gp-premium' ), - 'priority' => 2, - ); - $content_colors[] = array( - 'slug' => 'content_link_color', - 'default' => $defaults['content_link_color'], - 'label' => __( 'Link', 'gp-premium' ), - 'priority' => 3, - ); - $content_colors[] = array( - 'slug' => 'content_link_hover_color', - 'default' => $defaults['content_link_hover_color'], - 'label' => __( 'Link Hover', 'gp-premium' ), - 'priority' => 4, - ); - $content_colors[] = array( - 'slug' => 'content_title_color', - 'default' => $defaults['content_title_color'], - 'label' => __( 'Content Title', 'gp-premium' ), - 'priority' => 5, - ); - $content_colors[] = array( - 'slug' => 'blog_post_title_color', - 'default' => $defaults['blog_post_title_color'], - 'label' => __( 'Archive Content Title', 'gp-premium' ), - 'priority' => 6, - ); - $content_colors[] = array( - 'slug' => 'blog_post_title_hover_color', - 'default' => $defaults['blog_post_title_hover_color'], - 'label' => __( 'Archive Content Title Hover', 'gp-premium' ), - 'priority' => 7, - ); - $content_colors[] = array( - 'slug' => 'entry_meta_text_color', - 'default' => $defaults['entry_meta_text_color'], - 'label' => __( 'Entry Meta Text', 'gp-premium' ), - 'priority' => 8, - ); - $content_colors[] = array( - 'slug' => 'entry_meta_link_color', - 'default' => $defaults['entry_meta_link_color'], - 'label' => __( 'Entry Meta Links', 'gp-premium' ), - 'priority' => 9, - ); - $content_colors[] = array( - 'slug' => 'entry_meta_link_color_hover', - 'default' => $defaults['entry_meta_link_color_hover'], - 'label' => __( 'Entry Meta Links Hover', 'gp-premium' ), - 'priority' => 10, - ); - $content_colors[] = array( - 'slug' => 'h1_color', - 'default' => $defaults['h1_color'], - 'label' => __( 'Heading 1 (H1) Color', 'gp-premium' ), - 'priority' => 11, - ); - $content_colors[] = array( - 'slug' => 'h2_color', - 'default' => $defaults['h2_color'], - 'label' => __( 'Heading 2 (H2) Color', 'gp-premium' ), - 'priority' => 12, - ); - $content_colors[] = array( - 'slug' => 'h3_color', - 'default' => $defaults['h3_color'], - 'label' => __( 'Heading 3 (H3) Color', 'gp-premium' ), - 'priority' => 13, - ); - - if ( isset( $defaults['h4_color'] ) ) { - $content_colors[] = array( - 'slug' => 'h4_color', - 'default' => $defaults['h4_color'], - 'label' => __( 'Heading 4 (H4) Color', 'gp-premium' ), - 'priority' => 14, - ); - } - - if ( isset( $defaults['h5_color'] ) ) { - $content_colors[] = array( - 'slug' => 'h5_color', - 'default' => $defaults['h5_color'], - 'label' => __( 'Heading 5 (H5) Color', 'gp-premium' ), - 'priority' => 15, - ); - } - - foreach ( $content_colors as $color ) { - $wp_customize->add_setting( - 'generate_settings[' . $color['slug'] . ']', - array( - 'default' => $color['default'], - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_hex_color', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - new WP_Customize_Color_Control( - $wp_customize, - $color['slug'], - array( - 'label' => $color['label'], - 'section' => 'content_color_section', - 'settings' => 'generate_settings[' . $color['slug'] . ']', - 'priority' => $color['priority'], - ) - ) - ); - } - - // Add Sidebar Widget colors. - $wp_customize->add_section( - 'sidebar_widget_color_section', - array( - 'title' => __( 'Sidebar Widgets', 'gp-premium' ), - 'priority' => 90, - 'panel' => 'generate_colors_panel', - ) - ); - - $wp_customize->add_control( - new GeneratePress_Section_Shortcut_Control( - $wp_customize, - 'generate_sidebar_color_shortcuts', - array( - 'section' => 'sidebar_widget_color_section', - 'element' => __( 'Sidebar', 'gp-premium' ), - 'shortcuts' => array( - 'layout' => 'generate_layout_sidebars', - 'typography' => 'font_widget_section', - 'backgrounds' => 'generate_backgrounds_sidebars', - ), - 'settings' => ( isset( $wp_customize->selective_refresh ) ) ? array() : 'blogname', - 'priority' => 1, - ) - ) - ); - - $wp_customize->add_setting( - 'generate_settings[sidebar_widget_background_color]', - array( - 'default' => $defaults['sidebar_widget_background_color'], - 'type' => 'option', - 'transport' => 'postMessage', - 'sanitize_callback' => 'generate_premium_sanitize_rgba', - ) - ); - - $wp_customize->add_control( - new GeneratePress_Alpha_Color_Customize_Control( - $wp_customize, - 'generate_settings[sidebar_widget_background_color]', - array( - 'label' => __( 'Background', 'gp-premium' ), - 'section' => 'sidebar_widget_color_section', - 'settings' => 'generate_settings[sidebar_widget_background_color]', - 'palette' => $palettes, - 'priority' => 1, - ) - ) - ); - - // Add color settings. - $sidebar_widget_colors = array(); - $sidebar_widget_colors[] = array( - 'slug' => 'sidebar_widget_text_color', - 'default' => $defaults['sidebar_widget_text_color'], - 'label' => __( 'Text', 'gp-premium' ), - 'priority' => 2, - ); - $sidebar_widget_colors[] = array( - 'slug' => 'sidebar_widget_link_color', - 'default' => $defaults['sidebar_widget_link_color'], - 'label' => __( 'Link', 'gp-premium' ), - 'priority' => 3, - ); - $sidebar_widget_colors[] = array( - 'slug' => 'sidebar_widget_link_hover_color', - 'default' => $defaults['sidebar_widget_link_hover_color'], - 'label' => __( 'Link Hover', 'gp-premium' ), - 'priority' => 4, - ); - $sidebar_widget_colors[] = array( - 'slug' => 'sidebar_widget_title_color', - 'default' => $defaults['sidebar_widget_title_color'], - 'label' => __( 'Widget Title', 'gp-premium' ), - 'priority' => 5, - ); - - foreach ( $sidebar_widget_colors as $color ) { - $wp_customize->add_setting( - 'generate_settings[' . $color['slug'] . ']', - array( - 'default' => $color['default'], - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_hex_color', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - new WP_Customize_Color_Control( - $wp_customize, - $color['slug'], - array( - 'label' => $color['label'], - 'section' => 'sidebar_widget_color_section', - 'settings' => 'generate_settings[' . $color['slug'] . ']', - 'priority' => $color['priority'], - ) - ) - ); - } - - // Add Form colors. - $wp_customize->add_section( - 'form_color_section', - array( - 'title' => __( 'Forms', 'gp-premium' ), - 'priority' => 130, - 'panel' => 'generate_colors_panel', - ) - ); - - $wp_customize->add_setting( - 'generate_settings[form_background_color]', - array( - 'default' => $defaults['form_background_color'], - 'type' => 'option', - 'transport' => 'postMessage', - 'sanitize_callback' => 'generate_premium_sanitize_rgba', - ) - ); - - $wp_customize->add_control( - new GeneratePress_Alpha_Color_Customize_Control( - $wp_customize, - 'generate_settings[form_background_color]', - array( - 'label' => __( 'Form Background', 'gp-premium' ), - 'section' => 'form_color_section', - 'settings' => 'generate_settings[form_background_color]', - 'palette' => $palettes, - 'priority' => 1, - ) - ) - ); - - $wp_customize->add_setting( - 'generate_settings[form_background_color_focus]', - array( - 'default' => $defaults['form_background_color_focus'], - 'type' => 'option', - 'transport' => 'postMessage', - 'sanitize_callback' => 'generate_premium_sanitize_rgba', - ) - ); - - $wp_customize->add_control( - new GeneratePress_Alpha_Color_Customize_Control( - $wp_customize, - 'generate_settings[form_background_color_focus]', - array( - 'label' => __( 'Form Background Focus', 'gp-premium' ), - 'section' => 'form_color_section', - 'settings' => 'generate_settings[form_background_color_focus]', - 'palette' => $palettes, - 'priority' => 3, - ) - ) - ); - - $wp_customize->add_setting( - 'generate_settings[form_border_color]', - array( - 'default' => $defaults['form_border_color'], - 'type' => 'option', - 'transport' => 'postMessage', - 'sanitize_callback' => 'generate_premium_sanitize_rgba', - ) - ); - - $wp_customize->add_control( - new GeneratePress_Alpha_Color_Customize_Control( - $wp_customize, - 'generate_settings[form_border_color]', - array( - 'label' => __( 'Form Border', 'gp-premium' ), - 'section' => 'form_color_section', - 'settings' => 'generate_settings[form_border_color]', - 'palette' => $palettes, - 'priority' => 5, - ) - ) - ); - - $wp_customize->add_setting( - 'generate_settings[form_border_color_focus]', - array( - 'default' => $defaults['form_border_color_focus'], - 'type' => 'option', - 'transport' => 'postMessage', - 'sanitize_callback' => 'generate_premium_sanitize_rgba', - ) - ); - - $wp_customize->add_control( - new GeneratePress_Alpha_Color_Customize_Control( - $wp_customize, - 'generate_settings[form_border_color_focus]', - array( - 'label' => __( 'Form Border Focus', 'gp-premium' ), - 'section' => 'form_color_section', - 'settings' => 'generate_settings[form_border_color_focus]', - 'palette' => $palettes, - 'priority' => 6, - ) - ) - ); - - // Add color settings. - $form_colors = array(); - $form_colors[] = array( - 'slug' => 'form_text_color', - 'default' => $defaults['form_text_color'], - 'label' => __( 'Form Text', 'gp-premium' ), - 'priority' => 2, - ); - $form_colors[] = array( - 'slug' => 'form_text_color_focus', - 'default' => $defaults['form_text_color_focus'], - 'label' => __( 'Form Text Focus', 'gp-premium' ), - 'priority' => 4, - ); - - foreach ( $form_colors as $color ) { - $wp_customize->add_setting( - 'generate_settings[' . $color['slug'] . ']', - array( - 'default' => $color['default'], - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_hex_color', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - new WP_Customize_Color_Control( - $wp_customize, - $color['slug'], - array( - 'label' => $color['label'], - 'section' => 'form_color_section', - 'settings' => 'generate_settings[' . $color['slug'] . ']', - 'priority' => $color['priority'], - ) - ) - ); - } - - // Add Footer colors. - $wp_customize->add_section( - 'footer_color_section', - array( - 'title' => __( 'Footer', 'gp-premium' ), - 'priority' => 150, - 'panel' => 'generate_colors_panel', - ) - ); - - $wp_customize->add_control( - new GeneratePress_Section_Shortcut_Control( - $wp_customize, - 'generate_footer_color_shortcuts', - array( - 'section' => 'footer_color_section', - 'element' => __( 'Footer', 'gp-premium' ), - 'shortcuts' => array( - 'layout' => 'generate_layout_footer', - 'typography' => 'font_footer_section', - 'backgrounds' => 'generate_backgrounds_footer', - ), - 'settings' => ( isset( $wp_customize->selective_refresh ) ) ? array() : 'blogname', - 'priority' => 1, - ) - ) - ); - - $wp_customize->add_control( - new GeneratePress_Title_Customize_Control( - $wp_customize, - 'generate_footer_widgets_title', - array( - 'section' => 'footer_color_section', - 'type' => 'generatepress-customizer-title', - 'title' => __( 'Footer Widgets', 'gp-premium' ), - 'settings' => ( isset( $wp_customize->selective_refresh ) ) ? array() : 'blogname', - ) - ) - ); - - $wp_customize->add_setting( - 'generate_settings[footer_widget_background_color]', - array( - 'default' => $defaults['footer_widget_background_color'], - 'type' => 'option', - 'transport' => 'postMessage', - 'sanitize_callback' => 'generate_premium_sanitize_rgba', - ) - ); - - $wp_customize->add_control( - new GeneratePress_Alpha_Color_Customize_Control( - $wp_customize, - 'generate_settings[footer_widget_background_color]', - array( - 'label' => __( 'Background', 'gp-premium' ), - 'section' => 'footer_color_section', - 'settings' => 'generate_settings[footer_widget_background_color]', - 'palette' => $palettes, - ) - ) - ); - - // Add color settings. - $footer_widget_colors = array(); - $footer_widget_colors[] = array( - 'slug' => 'footer_widget_text_color', - 'default' => $defaults['footer_widget_text_color'], - 'label' => __( 'Text', 'gp-premium' ), - ); - $footer_widget_colors[] = array( - 'slug' => 'footer_widget_link_color', - 'default' => $defaults['footer_widget_link_color'], - 'label' => __( 'Link', 'gp-premium' ), - ); - $footer_widget_colors[] = array( - 'slug' => 'footer_widget_link_hover_color', - 'default' => $defaults['footer_widget_link_hover_color'], - 'label' => __( 'Link Hover', 'gp-premium' ), - ); - $footer_widget_colors[] = array( - 'slug' => 'footer_widget_title_color', - 'default' => $defaults['footer_widget_title_color'], - 'label' => __( 'Widget Title', 'gp-premium' ), - ); - - foreach ( $footer_widget_colors as $color ) { - $wp_customize->add_setting( - 'generate_settings[' . $color['slug'] . ']', - array( - 'default' => $color['default'], - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_hex_color', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - new WP_Customize_Color_Control( - $wp_customize, - $color['slug'], - array( - 'label' => $color['label'], - 'section' => 'footer_color_section', - 'settings' => 'generate_settings[' . $color['slug'] . ']', - ) - ) - ); - } - - $wp_customize->add_control( - new GeneratePress_Title_Customize_Control( - $wp_customize, - 'generate_footer_title', - array( - 'section' => 'footer_color_section', - 'type' => 'generatepress-customizer-title', - 'title' => __( 'Footer Bar', 'gp-premium' ), - 'settings' => ( isset( $wp_customize->selective_refresh ) ) ? array() : 'blogname', - ) - ) - ); - - $wp_customize->add_setting( - 'generate_settings[footer_background_color]', - array( - 'default' => $defaults['footer_background_color'], - 'type' => 'option', - 'transport' => 'postMessage', - 'sanitize_callback' => 'generate_premium_sanitize_rgba', - ) - ); - - $wp_customize->add_control( - new GeneratePress_Alpha_Color_Customize_Control( - $wp_customize, - 'generate_settings[footer_background_color]', - array( - 'label' => __( 'Background', 'gp-premium' ), - 'section' => 'footer_color_section', - 'settings' => 'generate_settings[footer_background_color]', - 'palette' => $palettes, - ) - ) - ); - - // Add color settings. - $footer_colors = array(); - $footer_colors[] = array( - 'slug' => 'footer_text_color', - 'default' => $defaults['footer_text_color'], - 'label' => __( 'Text', 'gp-premium' ), - ); - $footer_colors[] = array( - 'slug' => 'footer_link_color', - 'default' => $defaults['footer_link_color'], - 'label' => __( 'Link', 'gp-premium' ), - ); - $footer_colors[] = array( - 'slug' => 'footer_link_hover_color', - 'default' => $defaults['footer_link_hover_color'], - 'label' => __( 'Link Hover', 'gp-premium' ), - ); - - foreach ( $footer_colors as $color ) { - $wp_customize->add_setting( - 'generate_settings[' . $color['slug'] . ']', - array( - 'default' => $color['default'], - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_hex_color', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - new WP_Customize_Color_Control( - $wp_customize, - $color['slug'], - array( - 'label' => $color['label'], - 'section' => 'footer_color_section', - 'settings' => 'generate_settings[' . $color['slug'] . ']', - ) - ) - ); - } - - if ( isset( $defaults['back_to_top_background_color'] ) ) { - $wp_customize->add_control( - new GeneratePress_Title_Customize_Control( - $wp_customize, - 'generate_back_to_top_title', - array( - 'section' => 'footer_color_section', - 'type' => 'generatepress-customizer-title', - 'title' => __( 'Back to Top Button', 'gp-premium' ), - 'settings' => ( isset( $wp_customize->selective_refresh ) ) ? array() : 'blogname', - ) - ) - ); - - $wp_customize->add_setting( - 'generate_settings[back_to_top_background_color]', - array( - 'default' => $defaults['back_to_top_background_color'], - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_rgba', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - new GeneratePress_Alpha_Color_Customize_Control( - $wp_customize, - 'generate_settings[back_to_top_background_color]', - array( - 'label' => __( 'Background', 'gp-premium' ), - 'section' => 'footer_color_section', - 'settings' => 'generate_settings[back_to_top_background_color]', - 'palette' => $palettes, - ) - ) - ); - - $wp_customize->add_setting( - 'generate_settings[back_to_top_text_color]', - array( - 'default' => $defaults['back_to_top_text_color'], - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_rgba', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - new WP_Customize_Color_Control( - $wp_customize, - 'generate_settings[back_to_top_text_color]', - array( - 'label' => __( 'Text', 'gp-premium' ), - 'section' => 'footer_color_section', - 'settings' => 'generate_settings[back_to_top_text_color]', - ) - ) - ); - - $wp_customize->add_setting( - 'generate_settings[back_to_top_background_color_hover]', - array( - 'default' => $defaults['back_to_top_background_color_hover'], - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_rgba', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - new GeneratePress_Alpha_Color_Customize_Control( - $wp_customize, - 'generate_settings[back_to_top_background_color_hover]', - array( - 'label' => __( 'Background Hover', 'gp-premium' ), - 'section' => 'footer_color_section', - 'settings' => 'generate_settings[back_to_top_background_color_hover]', - 'palette' => $palettes, - ) - ) - ); - - $wp_customize->add_setting( - 'generate_settings[back_to_top_text_color_hover]', - array( - 'default' => $defaults['back_to_top_text_color_hover'], - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_rgba', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - new WP_Customize_Color_Control( - $wp_customize, - 'generate_settings[back_to_top_text_color_hover]', - array( - 'label' => __( 'Text Hover', 'gp-premium' ), - 'section' => 'footer_color_section', - 'settings' => 'generate_settings[back_to_top_text_color_hover]', - ) - ) - ); - } - } -} - -if ( ! function_exists( 'generate_get_color_setting' ) ) { - /** - * Wrapper function to get our settings - * - * @since 1.3.42 - * @param string $setting The setting to check. - */ - function generate_get_color_setting( $setting ) { - - // Bail if we don't have our color defaults. - if ( ! function_exists( 'generate_get_color_defaults' ) ) { - return; - } - - if ( function_exists( 'generate_get_defaults' ) ) { - $defaults = array_merge( generate_get_defaults(), generate_get_color_defaults() ); - } else { - $defaults = generate_get_color_defaults(); - } - - $generate_settings = wp_parse_args( - get_option( 'generate_settings', array() ), - $defaults - ); - - return $generate_settings[ $setting ]; - } -} - -if ( ! function_exists( 'generate_colors_rgba_to_hex' ) ) { - /** - * Convert RGBA to hex if necessary - * - * @since 1.3.42 - * @param string $rgba The string to convert to hex. - */ - function generate_colors_rgba_to_hex( $rgba ) { - // If it's not rgba, return it. - if ( false === strpos( $rgba, 'rgba' ) ) { - return $rgba; - } - - return substr( $rgba, 0, strrpos( $rgba, ',' ) ) . ')'; - } -} - -if ( ! function_exists( 'generate_get_default_color_palettes' ) ) { - /** - * Set up our colors for the color picker palettes and filter them so you can change them - * - * @since 1.3.42 - */ - function generate_get_default_color_palettes() { - $palettes = array( - generate_colors_rgba_to_hex( generate_get_color_setting( 'link_color' ) ), - generate_colors_rgba_to_hex( generate_get_color_setting( 'background_color' ) ), - generate_colors_rgba_to_hex( generate_get_color_setting( 'navigation_background_color' ) ), - generate_colors_rgba_to_hex( generate_get_color_setting( 'navigation_background_hover_color' ) ), - '#F1C40F', - '#1e72bd', - '#1ABC9C', - '#3498DB', - ); - - return apply_filters( 'generate_default_color_palettes', $palettes ); - } -} - -if ( ! function_exists( 'generate_enqueue_color_palettes' ) ) { - add_action( 'customize_controls_enqueue_scripts', 'generate_enqueue_color_palettes', 1001 ); - /** - * Add our custom color palettes to the color pickers in the Customizer. - * Hooks into 1001 priority to show up after Secondary Nav. - * - * @since 1.3.42 - */ - function generate_enqueue_color_palettes() { - // Old versions of WP don't get nice things. - if ( ! function_exists( 'wp_add_inline_script' ) ) { - return; - } - - // Grab our palette array and turn it into JS. - $palettes = wp_json_encode( generate_get_default_color_palettes() ); - - // Add our custom palettes. - // json_encode takes care of escaping. - wp_add_inline_script( 'wp-color-picker', 'jQuery.wp.wpColorPicker.prototype.options.palettes = ' . $palettes . ';' ); - } -} - -if ( ! function_exists( 'generate_colors_customizer_live_preview' ) ) { - add_action( 'customize_preview_init', 'generate_colors_customizer_live_preview' ); - /** - * Add our live preview javascript. - * - * @since 0.1 - */ - function generate_colors_customizer_live_preview() { - wp_enqueue_script( - 'generate-colors-customizer', - trailingslashit( plugin_dir_url( __FILE__ ) ) . 'js/customizer.js', - array( 'jquery', 'customize-preview' ), - GENERATE_COLORS_VERSION, - true - ); - - wp_register_script( - 'generate-wc-colors-customizer', - trailingslashit( plugin_dir_url( __FILE__ ) ) . 'js/wc-customizer.js', - array( 'jquery', 'customize-preview', 'generate-colors-customizer' ), - GENERATE_COLORS_VERSION, - true - ); - - wp_register_script( - 'generate-menu-plus-colors-customizer', - trailingslashit( plugin_dir_url( __FILE__ ) ) . 'js/menu-plus-customizer.js', - array( 'jquery', 'customize-preview', 'generate-colors-customizer' ), - GENERATE_COLORS_VERSION, - true - ); - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/colors/functions/js/customizer.js b/wp-content/upgrade-temp-backup/plugins/gp-premium/colors/functions/js/customizer.js deleted file mode 100644 index a2fb4253..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/colors/functions/js/customizer.js +++ /dev/null @@ -1,620 +0,0 @@ -/** - * Theme Customizer enhancements for a better user experience. - * - * Contains handlers to make Theme Customizer preview reload changes asynchronously. - */ -function generate_colors_live_update( id, selector, property, default_value, get_value, settings ) { - default_value = typeof default_value !== 'undefined' ? default_value : 'initial'; - get_value = typeof get_value !== 'undefined' ? get_value : ''; - settings = typeof settings !== 'undefined' ? settings : 'generate_settings'; - wp.customize( settings + '[' + id + ']', function( value ) { - value.bind( function( newval ) { - - // Stop the header link color from applying to the site title. - if ( 'header_link_color' === id || 'header_link_color' === id ) { - jQuery( '.site-header a' ).addClass( 'header-link' ); - jQuery( '.site-header .main-title a' ).removeClass( 'header-link' ); - } - - if ( 'content_link_color' === id || 'content_link_color_hover' === id || 'entry_meta_link_color' === id || 'blog_post_title_color' === id ) { - var content_link = jQuery( '.inside-article a' ); - var meta = jQuery( '.entry-meta a' ); - var title = jQuery( '.entry-title a' ); - - content_link.attr( 'data-content-link-color', true ); - - if ( '' !== wp.customize.value('generate_settings[entry_meta_link_color]')() ) { - meta.attr( 'data-content-link-color', '' ); - } else { - meta.attr( 'data-content-link-color', true ); - } - - if ( '' !== wp.customize.value('generate_settings[blog_post_title_color]')() ) { - title.attr( 'data-content-link-color', '' ); - } else { - title.attr( 'data-content-link-color', true ); - } - } - - default_value = ( '' !== get_value ) ? wp.customize.value('generate_settings[' + get_value + ']')() : default_value; - newval = ( '' !== newval ) ? newval : default_value; - var unique_id = ( 'generate_secondary_nav_settings' == settings ) ? 'secondary_' : ''; - if ( jQuery( 'style#' + unique_id + id ).length ) { - jQuery( 'style#' + unique_id + id ).html( selector + '{' + property + ':' + newval + ';}' ); - } else { - jQuery( 'head' ).append( '' ); - setTimeout(function() { - jQuery( 'style#' + id ).not( ':last' ).remove(); - }, 1000); - } - - } ); - } ); -} - -/** - * Header background color - * Empty: transparent - */ -generate_colors_live_update( 'top_bar_background_color', '.top-bar', 'background-color', 'transparent' ); - -/** - * Header text color - * Empty: text_color - */ -generate_colors_live_update( 'top_bar_text_color', '.top-bar', 'color', '', 'text_color' ); - -/** - * Header link color - * Empty: link_color - */ -generate_colors_live_update( 'top_bar_link_color', '.top-bar a, .top-bar a:visited', 'color', '', 'link_color' ); - -/** - * Header link color hover - * Empty: link_color_hover - */ -generate_colors_live_update( 'top_bar_link_color_hover', '.top-bar a:hover', 'color', '', 'link_color_hover' ); - - -/** - * Header background color - * Empty: transparent - */ -generate_colors_live_update( 'header_background_color', '.site-header', 'background-color', 'transparent' ); - -/** - * Header text color - * Empty: text_color - */ -generate_colors_live_update( 'header_text_color', '.site-header', 'color', '', 'text_color' ); - -/** - * Header link color - * Empty: link_color - */ -generate_colors_live_update( 'header_link_color', '.site-header a.header-link, .site-header a.header-link:visited', 'color', '', 'link_color' ); - -/** - * Header link color hover - * Empty: link_color_hover - */ -generate_colors_live_update( 'header_link_hover_color', '.site-header a.header-link:hover', 'color', '', 'link_color_hover' ); - -/** - * Site title color - * Empty: link_color - */ -generate_colors_live_update( 'site_title_color', '.main-title a,.main-title a:hover,.main-title a:visited,.header-wrap .navigation-stick .main-title a, .header-wrap .navigation-stick .main-title a:hover, .header-wrap .navigation-stick .main-title a:visited', 'color', '', 'link_color' ); - -/** - * Site tagline color - * Empty: text_color - */ -generate_colors_live_update( 'site_tagline_color', '.site-description', 'color', '', 'text_color' ); - -/** - * Main navigation background - * Empty: transparent - */ -generate_colors_live_update( 'navigation_background_color', '.main-navigation', 'background-color', 'transparent' ); - -/** - * Primary navigation text color - * Empty: link_color - */ -generate_colors_live_update( 'navigation_text_color', - '.main-navigation .main-nav ul li a,\ - .menu-toggle,button.menu-toggle:hover,\ - button.menu-toggle:focus,\ - .main-navigation .mobile-bar-items a,\ - .main-navigation .mobile-bar-items a:hover,\ - .main-navigation .mobile-bar-items a:focus,\ - .main-navigation .menu-bar-items', - 'color', '', 'link_color' -); - -/** - * Primary navigation text color hover - * Empty: link_color_hover - */ -generate_colors_live_update( 'navigation_text_hover_color', - '.navigation-search input[type="search"],\ - .navigation-search input[type="search"]:active,\ - .navigation-search input[type="search"]:focus,\ - .main-navigation .main-nav ul li:hover > a,\ - .main-navigation .main-nav ul li:focus > a,\ - .main-navigation .main-nav ul li.sfHover > a,\ - .main-navigation .menu-bar-item:hover a', - 'color', '', 'link_color_hover' -); - -/** - * Primary navigation menu item hover - * Empty: link_color_hover - */ -generate_colors_live_update( 'navigation_background_hover_color', - '.navigation-search input[type="search"],\ - .navigation-search input[type="search"]:focus,\ - .main-navigation .main-nav ul li:hover > a,\ - .main-navigation .main-nav ul li:focus > a,\ - .main-navigation .main-nav ul li.sfHover > a,\ - .main-navigation .menu-bar-item:hover a', - 'background-color', 'transparent' -); - -/** - * Primary sub-navigation color - * Empty: transparent - */ -generate_colors_live_update( 'subnavigation_background_color', '.main-navigation ul ul', 'background-color', 'transparent' ); - -/** - * Primary sub-navigation text color - * Empty: link_color - */ -generate_colors_live_update( 'subnavigation_text_color', '.main-navigation .main-nav ul ul li a', 'color', 'link_color' ); - -/** - * Primary sub-navigation hover - */ -var subnavigation_hover = '.main-navigation .main-nav ul ul li:hover > a, \ - .main-navigation .main-nav ul ul li:focus > a, \ - .main-navigation .main-nav ul ul li.sfHover > a'; - -/** - * Primary sub-navigation text hover - * Empty: link_color_hover - */ -generate_colors_live_update( 'subnavigation_text_hover_color', subnavigation_hover, 'color', '', 'link_color_hover' ); - -/** - * Primary sub-navigation background hover - * Empty: transparent - */ -generate_colors_live_update( 'subnavigation_background_hover_color', subnavigation_hover, 'background-color', 'transparent' ); - -/** - * Navigation current selectors - */ -var navigation_current = '.main-navigation .main-nav ul li[class*="current-menu-"] > a, \ - .main-navigation .main-nav ul li[class*="current-menu-"]:hover > a, \ - .main-navigation .main-nav ul li[class*="current-menu-"].sfHover > a'; - -/** - * Primary navigation current text - * Empty: link_color - */ -generate_colors_live_update( 'navigation_text_current_color', navigation_current, 'color', '', 'link_color' ); - -/** - * Primary navigation current text - * Empty: transparent - */ -generate_colors_live_update( 'navigation_background_current_color', navigation_current, 'background-color', 'transparent' ); - -/** - * Primary sub-navigation current selectors - */ -var subnavigation_current = '.main-navigation .main-nav ul ul li[class*="current-menu-"] > a,\ - .main-navigation .main-nav ul ul li[class*="current-menu-"]:hover > a, \ - .main-navigation .main-nav ul ul li[class*="current-menu-"].sfHover > a'; - -/** - * Primary sub-navigation current text - * Empty: link_color - */ -generate_colors_live_update( 'subnavigation_text_current_color', subnavigation_current, 'color', '', 'link_color' ); - -/** - * Primary navigation current item background - * Empty: transparent - */ -generate_colors_live_update( 'subnavigation_background_current_color', subnavigation_current, 'background-color', 'transparent' ); - -/** - * Secondary navigation background - * Empty: transparent - */ -generate_colors_live_update( 'navigation_background_color', '.secondary-navigation', 'background-color', 'transparent', '', 'generate_secondary_nav_settings' ); - -/** - * Secondary navigation text color - * Empty: link_color - */ -generate_colors_live_update( 'navigation_text_color', - '.secondary-navigation .main-nav ul li a,\ - .secondary-navigation .menu-toggle,\ - button.secondary-menu-toggle:hover,\ - button.secondary-menu-toggle:focus, \ - .secondary-navigation .top-bar, \ - .secondary-navigation .top-bar a,\ - .secondary-menu-bar-items,\ - .secondary-menu-bar-items .menu-bar-item > a', - 'color', '', 'link_color', 'generate_secondary_nav_settings' -); - -/** - * Navigation search - */ -wp.customize( 'generate_settings[navigation_search_background_color]', function( value ) { - value.bind( function( newval ) { - if ( jQuery( 'style#navigation_search_background_color' ).length ) { - jQuery( 'style#navigation_search_background_color' ).html( '.navigation-search input[type="search"],.navigation-search input[type="search"]:active, .navigation-search input[type="search"]:focus, .main-navigation .main-nav ul li.search-item.active > a, .main-navigation .menu-bar-items .search-item.active > a{background-color:' + newval + ';}' ); - } else { - jQuery( 'head' ).append( '' ); - setTimeout(function() { - jQuery( 'style#navigation_search_background_color' ).not( ':last' ).remove(); - }, 1000); - } - - if ( jQuery( 'style#navigation_search_background_opacity' ).length ) { - if ( newval ) { - jQuery( 'style#navigation_search_background_opacity' ).html( '.navigation-search input{opacity: 1;}' ); - } else { - jQuery( 'style#navigation_search_background_opacity' ).html( '.navigation-search input{opacity: 0.9;}' ); - } - } else { - if ( newval ) { - jQuery( 'head' ).append( '' ); - } - - setTimeout(function() { - jQuery( 'style#navigation_search_background_opacity' ).not( ':last' ).remove(); - }, 1000); - } - } ); -} ); - -generate_colors_live_update( 'navigation_search_text_color', '.navigation-search input[type="search"],.navigation-search input[type="search"]:active, .navigation-search input[type="search"]:focus, .main-navigation .main-nav ul li.search-item.active > a, .main-navigation .menu-bar-items .search-item.active > a', 'color', '' ); - -/** - * Secondary navigation text color hover - * Empty: link_color_hover - */ -generate_colors_live_update( 'navigation_text_hover_color', - '.secondary-navigation .main-nav ul li:hover > a, \ - .secondary-navigation .main-nav ul li:focus > a, \ - .secondary-navigation .main-nav ul li.sfHover > a,\ - .secondary-menu-bar-items .menu-bar-item:hover > a', - 'color', '', 'link_color_hover', 'generate_secondary_nav_settings' -); - -/** - * Secondary navigation menu item hover - * Empty: link_color_hover - */ -generate_colors_live_update( 'navigation_background_hover_color', - '.secondary-navigation .main-nav ul li:hover > a, \ - .secondary-navigation .main-nav ul li:focus > a, \ - .secondary-navigation .main-nav ul li.sfHover > a, \ - .secondary-menu-bar-items .menu-bar-item:hover > a', - 'background-color', 'transparent', '', 'generate_secondary_nav_settings' -); - -/** - * Secondary navigation top bar link hover - */ -wp.customize( 'generate_secondary_nav_settings[navigation_background_hover_color]', function( value ) { - value.bind( function( newval ) { - if ( jQuery( 'style#secondary_nav_top_bar_hover' ).length ) { - jQuery( 'style#secondary_nav_top_bar_hover' ).html( '.secondary-navigation .top-bar a:hover,.secondary-navigation .top-bar a:focus{color:' + newval + ';}' ); - } else { - jQuery( 'head' ).append( '' ); - setTimeout(function() { - jQuery( 'style#secondary_nav_top_bar_hover' ).not( ':last' ).remove(); - }, 1000); - } - } ); -} ); - -generate_colors_live_update( 'navigation_top_bar_hover_color', - '.secondary-navigation .top-bar a:hover, \ - .secondary-navigation .top-bar a:focus', - 'color', 'transparent', '', 'generate_secondary_nav_settings' -); - -/** - * Secondary sub-navigation color - * Empty: transparent - */ -generate_colors_live_update( 'subnavigation_background_color', '.secondary-navigation ul ul', 'background-color', 'transparent', '', 'generate_secondary_nav_settings' ); - -/** - * Secondary sub-navigation text color - * Empty: link_color - */ -generate_colors_live_update( 'subnavigation_text_color', '.secondary-navigation .main-nav ul ul li a', 'color', '', 'link_color', 'generate_secondary_nav_settings' ); - -/** - * Secondary sub-navigation hover - */ -var secondary_subnavigation_hover = '.secondary-navigation .main-nav ul ul li > a:hover, \ - .secondary-navigation .main-nav ul ul li:focus > a, \ - .secondary-navigation .main-nav ul ul li.sfHover > a'; - -/** - * Secondary sub-navigation text hover - * Empty: link_color_hover - */ -generate_colors_live_update( 'subnavigation_text_hover_color', secondary_subnavigation_hover, 'color', '', 'link_color_hover', 'generate_secondary_nav_settings' ); - -/** - * Secondary sub-navigation background hover - * Empty: transparent - */ -generate_colors_live_update( 'subnavigation_background_hover_color', secondary_subnavigation_hover, 'background-color', 'transparent', '', 'generate_secondary_nav_settings' ); - -/** - * Secondary navigation current selectors - */ -var secondary_navigation_current = '.secondary-navigation .main-nav ul li[class*="current-menu-"] > a, \ - .secondary-navigation .main-nav ul li[class*="current-menu-"]:hover > a, \ - .secondary-navigation .main-nav ul li[class*="current-menu-"].sfHover > a'; - -/** - * Secondary navigation current text - * Empty: link_color - */ -generate_colors_live_update( 'navigation_text_current_color', secondary_navigation_current, 'color', '', 'link_color', 'generate_secondary_nav_settings' ); - -/** - * Secondary navigation current text - * Empty: transparent - */ -generate_colors_live_update( 'navigation_background_current_color', secondary_navigation_current, 'background-color', 'transparent', '', 'generate_secondary_nav_settings' ); - -/** - * Secondary sub-navigation current selectors - */ -var secondary_subnavigation_current = '.secondary-navigation .main-nav ul ul li[class*="current-menu-"] > a,\ - .secondary-navigation .main-nav ul ul li[class*="current-menu-"]:hover > a, \ - .secondary-navigation .main-nav ul ul li[class*="current-menu-"].sfHover > a'; - -/** - * Secondary sub-navigation current text - * Empty: link_color - */ -generate_colors_live_update( 'subnavigation_text_current_color', secondary_subnavigation_current, 'color', '', 'link_color', 'generate_secondary_nav_settings' ); - -/** - * Primary navigation current item background - * Empty: transparent - */ -generate_colors_live_update( 'subnavigation_background_current_color', secondary_subnavigation_current, 'background-color', 'transparent', '', 'generate_secondary_nav_settings' ); - -/** - * Content selectors - */ -var content = '.separate-containers .inside-article,\ - .separate-containers .comments-area,\ - .separate-containers .page-header,\ - .one-container .container,\ - .separate-containers .paging-navigation,\ - .inside-page-header'; - -/** - * Content background - * Empty: transparent - */ -generate_colors_live_update( 'content_background_color', content, 'background-color', 'transparent' ); - -/** - * Content text color - * Empty: text_color - */ -generate_colors_live_update( 'content_text_color', content, 'color', '', 'text_color' ); - -/** - * Content links - * Empty: link_color - */ -generate_colors_live_update( 'content_link_color', - '.inside-article a:not(.button):not(.wp-block-button__link)[data-content-link-color=true], \ - .inside-article a:not(.button):not(.wp-block-button__link)[data-content-link-color=true]:visited,\ - .paging-navigation a,\ - .paging-navigation a:visited,\ - .comments-area a,\ - .comments-area a:visited,\ - .page-header a,\ - .page-header a:visited', - 'color', '', 'link_color' -); - -/** - * Content links on hover - * Empty: link_color_hover - */ -generate_colors_live_update( 'content_link_hover_color', - '.inside-article a:not(.button):not(.wp-block-button__link)[data-content-link-color=true]:hover,\ - .paging-navigation a:hover,\ - .comments-area a:hover,\ - .page-header a:hover', - 'color', '', 'link_color_hover' -); - -generate_colors_live_update( 'content_title_color', '.entry-header h1,.page-header h1', 'color', 'inherit', 'text_color' ); -generate_colors_live_update( 'blog_post_title_color', '.entry-title a,.entry-title a:visited', 'color', '', 'link_color' ); -generate_colors_live_update( 'blog_post_title_hover_color', '.entry-title a:hover', 'color', '', 'link_color_hover' ); -generate_colors_live_update( 'entry_meta_text_color', '.entry-meta', 'color', '', 'text_color' ); -generate_colors_live_update( 'entry_meta_link_color', '.entry-meta a, .entry-meta a:visited', 'color', '', 'link_color' ); -generate_colors_live_update( 'entry_meta_link_color_hover', '.entry-meta a:hover', 'color', '', 'link_color_hover' ); -generate_colors_live_update( 'h1_color', 'h1', 'color', '', 'text_color' ); -generate_colors_live_update( 'h2_color', 'h2', 'color', '', 'text_color' ); -generate_colors_live_update( 'h3_color', 'h3', 'color', '', 'text_color' ); -generate_colors_live_update( 'h4_color', 'h4', 'color', '', 'text_color' ); -generate_colors_live_update( 'h5_color', 'h5', 'color', '', 'text_color' ); -generate_colors_live_update( 'sidebar_widget_background_color', '.sidebar .widget', 'background-color', 'transparent' ); -generate_colors_live_update( 'sidebar_widget_text_color', '.sidebar .widget', 'color', '', 'text_color' ); -generate_colors_live_update( 'sidebar_widget_link_color', '.sidebar .widget a, .sidebar .widget a:visited', 'color', '', 'link_color' ); -generate_colors_live_update( 'sidebar_widget_link_hover_color', '.sidebar .widget a:hover', 'color', '', 'link_color_hover' ); -generate_colors_live_update( 'sidebar_widget_title_color', '.sidebar .widget .widget-title', 'color', '', 'text_color' ); -generate_colors_live_update( 'footer_widget_background_color', '.footer-widgets', 'background-color', 'transparent' ); -generate_colors_live_update( 'footer_widget_text_color', '.footer-widgets', 'color', '', 'text_color' ); -generate_colors_live_update( 'footer_widget_link_color', '.footer-widgets a, .footer-widgets a:visited', 'color', '', 'link_color' ); -generate_colors_live_update( 'footer_widget_link_hover_color', '.footer-widgets a:hover', 'color', '', 'link_color_hover' ); -generate_colors_live_update( 'footer_widget_title_color', '.footer-widgets .widget-title', 'color', '', 'text_color' ); -generate_colors_live_update( 'footer_background_color', '.site-info', 'background-color', 'transparent' ); -generate_colors_live_update( 'footer_text_color', '.site-info', 'color', '', 'text_color' ); -generate_colors_live_update( 'footer_link_color', '.site-info a, .site-info a:visited', 'color', '', 'link_color' ); -generate_colors_live_update( 'footer_link_hover_color', '.site-info a:hover', 'color', '', 'link_color_hover' ); - -/** - * Form selectors - */ -var forms = 'input[type="text"], \ - input[type="email"], \ - input[type="url"], \ - input[type="password"], \ - input[type="search"], \ - input[type="number"], \ - input[type="tel"], \ - textarea, \ - select'; - -/** - * Form background - * Empty: inherit - */ -generate_colors_live_update( 'form_background_color', forms, 'background-color', 'inherit' ); - -/** - * Border color - * Empty: inherit - */ -generate_colors_live_update( 'form_border_color', forms, 'border-color' ); - -/** - * Form text color - * Empty: text_color - */ -generate_colors_live_update( 'form_text_color', forms, 'color', '', 'text_color' ); - -/** - * Form background on focus selectors - * Empty: inherit - */ -var forms_focus = 'input[type="text"]:focus, \ - input[type="email"]:focus, \ - input[type="url"]:focus, \ - input[type="password"]:focus, \ - input[type="search"]:focus,\ - input[type="number"]:focus,\ - input[type="tel"]:focus, \ - textarea:focus, \ - select:focus'; - -/** - * Form background color on focus - * Empty: initial - */ -generate_colors_live_update( 'form_background_color_focus', forms_focus, 'background-color' ); - -/** - * Form text color on focus - * Empty: initial - */ -generate_colors_live_update( 'form_text_color_focus', forms_focus, 'color' ); - -/** - * Form border color on focus - * Empty: initial - */ -generate_colors_live_update( 'form_border_color_focus', forms_focus, 'border-color' ); - -/** - * Button selectors - */ -var button = 'button, \ - html input[type="button"], \ - input[type="reset"], \ - input[type="submit"],\ - a.button,\ - a.button:visited,\ - a.wp-block-button__link:not(.has-background)'; - -/** - * Button background - * Empty: initial - */ -generate_colors_live_update( 'form_button_background_color', button, 'background-color' ); - -/** - * Button text - * Empty: initial - */ -generate_colors_live_update( 'form_button_text_color', button, 'color' ); - -/** - * Button on hover/focus selectors - * Empty: initial - */ -var button_hover = 'button:hover, \ - html input[type="button"]:hover, \ - input[type="reset"]:hover, \ - input[type="submit"]:hover,\ - a.button:hover,\ - button:focus, \ - html input[type="button"]:focus, \ - input[type="reset"]:focus, \ - input[type="submit"]:focus,\ - a.button:focus,\ - a.wp-block-button__link:not(.has-background):active,\ - a.wp-block-button__link:not(.has-background):focus,\ - a.wp-block-button__link:not(.has-background):hover'; - -/** - * Button color on hover - * Empty: initial - */ -generate_colors_live_update( 'form_button_background_color_hover', button_hover, 'background-color' ); - -/** - * Button text color on hover - * Empty: initial - */ -generate_colors_live_update( 'form_button_text_color_hover', button_hover, 'color' ); - -/** - * Back to top background color - * Empty: transparent - */ -generate_colors_live_update( 'back_to_top_background_color', 'a.generate-back-to-top', 'background-color', 'transparent' ); - -/** - * Back to top text color - * Empty: text_color - */ -generate_colors_live_update( 'back_to_top_text_color', 'a.generate-back-to-top', 'color', '', 'text_color' ); - -/** - * Back to top background color hover - * Empty: transparent - */ -generate_colors_live_update( 'back_to_top_background_color_hover', 'a.generate-back-to-top:hover,a.generate-back-to-top:focus', 'background-color', 'transparent' ); - -/** - * Back to top text color hover - * Empty: text_color - */ -generate_colors_live_update( 'back_to_top_text_color_hover', 'a.generate-back-to-top:hover,a.generate-back-to-top:focus', 'color', '', 'text_color' ); diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/colors/functions/js/menu-plus-customizer.js b/wp-content/upgrade-temp-backup/plugins/gp-premium/colors/functions/js/menu-plus-customizer.js deleted file mode 100644 index f74fa31e..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/colors/functions/js/menu-plus-customizer.js +++ /dev/null @@ -1,102 +0,0 @@ -/** - * Main navigation background - * Empty: transparent - */ -generate_colors_live_update( 'slideout_background_color', '.main-navigation.slideout-navigation', 'background-color', '' ); - -/** - * Primary navigation text color - * Empty: link_color - */ -generate_colors_live_update( 'slideout_text_color', '.slideout-navigation.main-navigation .main-nav ul li a, .slideout-navigation a, .slideout-navigation', 'color', '' ); - -/** - * Primary navigation text color hover - * Empty: link_color_hover - */ -generate_colors_live_update( 'slideout_text_hover_color', - '.slideout-navigation.main-navigation .main-nav ul li:hover > a,\ - .slideout-navigation.main-navigation .main-nav ul li:focus > a,\ - .slideout-navigation.main-navigation .main-nav ul li.sfHover > a', - 'color', '' -); - -/** - * Primary navigation menu item hover - * Empty: link_color_hover - */ -generate_colors_live_update( 'slideout_background_hover_color', - '.slideout-navigation.main-navigation .main-nav ul li:hover > a,\ - .slideout-navigation.main-navigation .main-nav ul li:focus > a,\ - .slideout-navigation.main-navigation .main-nav ul li.sfHover > a', - 'background-color', 'transparent' -); - -/** - * Primary sub-navigation color - * Empty: transparent - */ -generate_colors_live_update( 'slideout_submenu_background_color', '.slideout-navigation.main-navigation ul ul', 'background-color', '' ); - -/** - * Primary sub-navigation text color - * Empty: link_color - */ -generate_colors_live_update( 'slideout_submenu_text_color', '.slideout-navigation.main-navigation .main-nav ul ul li a', 'color', '' ); - -/** - * Primary sub-navigation hover - */ -var slideout_submenu_hover = '.slideout-navigation.main-navigation .main-nav ul ul li:hover > a,\ - .slideout-navigation.main-navigation .main-nav ul ul li:focus > a,\ - .slideout-navigation.main-navigation .main-nav ul ul li.sfHover > a'; - -/** - * Primary sub-navigation text hover - * Empty: link_color_hover - */ -generate_colors_live_update( 'slideout_submenu_text_hover_color', slideout_submenu_hover, 'color', '' ); - -/** - * Primary sub-navigation background hover - * Empty: transparent - */ -generate_colors_live_update( 'slideout_submenu_background_hover_color', slideout_submenu_hover, 'background-color', '' ); - -/** - * Navigation current selectors - */ -var slideout_current = '.slideout-navigation.main-navigation .main-nav ul li[class*="current-menu-"] > a,\ - .slideout-navigation.main-navigation .main-nav ul li[class*="current-menu-"] > a:hover,\ - .slideout-navigation.main-navigation .main-nav ul li[class*="current-menu-"].sfHover > a'; - -/** - * Primary navigation current text - * Empty: link_color - */ -generate_colors_live_update( 'slideout_text_current_color', slideout_current, 'color', '' ); - -/** - * Primary navigation current text - * Empty: transparent - */ -generate_colors_live_update( 'slideout_background_current_color', slideout_current, 'background-color' ); - -/** - * Primary sub-navigation current selectors - */ -var slideout_submenu_current = '.slideout-navigation.main-navigation .main-nav ul ul li[class*="current-menu-"] > a,\ - .slideout-navigation.main-navigation .main-nav ul ul li[class*="current-menu-"] > a:hover,\ - .slideout-navigation.main-navigation .main-nav ul ul li[class*="current-menu-"].sfHover > a'; - -/** - * Primary sub-navigation current text - * Empty: link_color - */ -generate_colors_live_update( 'slideout_submenu_text_current_color', slideout_submenu_current, 'color', '' ); - -/** - * Primary navigation current item background - * Empty: transparent - */ -generate_colors_live_update( 'slideout_submenu_background_current_color', slideout_submenu_current, 'background-color' ); diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/colors/functions/js/wc-customizer.js b/wp-content/upgrade-temp-backup/plugins/gp-premium/colors/functions/js/wc-customizer.js deleted file mode 100644 index b694f300..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/colors/functions/js/wc-customizer.js +++ /dev/null @@ -1,161 +0,0 @@ -/** - * WooCommerce link color - */ -generate_colors_live_update( 'wc_product_title_color', '.woocommerce ul.products li.product .woocommerce-LoopProduct-link', 'color', '', 'link_color' ); -generate_colors_live_update( 'wc_product_title_color_hover', '.woocommerce ul.products li.product .woocommerce-LoopProduct-link:hover', 'color', '', 'link_color_hover' ); - -/** - * WooCommerce primary button - */ -var wc_button = '.woocommerce #respond input#submit, .woocommerce a.button, .woocommerce button.button, .woocommerce input.button, button, \ - html input[type="button"], \ - input[type="reset"], \ - input[type="submit"],\ - .button,\ - .button:visited'; -generate_colors_live_update( 'form_button_background_color', wc_button, 'background-color' ); -generate_colors_live_update( 'form_button_text_color', wc_button, 'color' ); - -/** - * WooCommerce primary button hover - */ -var wc_button_hover = '.woocommerce #respond input#submit:hover, .woocommerce a.button:hover, .woocommerce button.button:hover, .woocommerce input.button:hover,button:hover, \ - html input[type="button"]:hover, \ - input[type="reset"]:hover, \ - input[type="submit"]:hover,\ - .button:hover,\ - button:focus, \ - html input[type="button"]:focus, \ - input[type="reset"]:focus, \ - input[type="submit"]:focus,\ - .button:focus'; -generate_colors_live_update( 'form_button_background_color_hover', wc_button_hover, 'background-color' ); -generate_colors_live_update( 'form_button_text_color_hover', wc_button_hover, 'color' ); - -/** - * WooCommerce alt button - */ -var wc_alt_button = '.woocommerce #respond input#submit.alt, .woocommerce a.button.alt, .woocommerce button.button.alt, .woocommerce input.button.alt'; -generate_colors_live_update( 'wc_alt_button_background', wc_alt_button, 'background-color' ); -generate_colors_live_update( 'wc_alt_button_text', wc_alt_button, 'color' ); - -/** - * WooCommerce alt button hover - */ -var wc_alt_button_hover = '.woocommerce #respond input#submit.alt:hover, .woocommerce a.button.alt:hover, .woocommerce button.button.alt:hover, .woocommerce input.button.alt:hover'; -generate_colors_live_update( 'wc_alt_button_background_hover', wc_alt_button_hover, 'background-color' ); -generate_colors_live_update( 'wc_alt_button_text_hover', wc_alt_button_hover, 'color' ); - -/** - * WooCommerce star ratings - */ -var wc_stars = '.woocommerce .star-rating span:before, .woocommerce .star-rating:before'; -generate_colors_live_update( 'wc_rating_stars', wc_stars, 'color' ); - -/** - * WooCommerce sale sticker - */ -var wc_sale_sticker = '.woocommerce span.onsale'; -generate_colors_live_update( 'wc_sale_sticker_background', wc_sale_sticker, 'background-color' ); -generate_colors_live_update( 'wc_sale_sticker_text', wc_sale_sticker, 'color' ); - -/** - * WooCommerce price - */ -var wc_price = '.woocommerce ul.products li.product .price, .woocommerce div.product p.price'; -generate_colors_live_update( 'wc_price_color', wc_price, 'color' ); - -/** - * WooCommerce product tab text - */ -var wc_product_tab = '.woocommerce div.product .woocommerce-tabs ul.tabs li a'; -generate_colors_live_update( 'wc_product_tab', wc_product_tab, 'color' ); - -/** - * WooCommerce product tab text highlight/active - */ -var wc_product_tab_active = '.woocommerce div.product .woocommerce-tabs ul.tabs li a:hover, .woocommerce div.product .woocommerce-tabs ul.tabs li.active a'; -generate_colors_live_update( 'wc_product_tab_highlight', wc_product_tab_active, 'color' ); - -/** - * WooCommerce success message - */ -var wc_success_message = '.woocommerce-message'; -generate_colors_live_update( 'wc_success_message_background', wc_success_message, 'background-color' ); -generate_colors_live_update( 'wc_success_message_text', wc_success_message + ', div.woocommerce-message a.button, div.woocommerce-message a.button:focus, div.woocommerce-message a.button:hover, div.woocommerce-message a, div.woocommerce-message a:focus, div.woocommerce-message a:hover', 'color' ); - -/** - * WooCommerce info message - */ -var wc_info_message = '.woocommerce-info'; -generate_colors_live_update( 'wc_info_message_background', wc_info_message, 'background-color' ); -generate_colors_live_update( 'wc_info_message_text', wc_info_message + ', div.woocommerce-info a.button, div.woocommerce-info a.button:focus, div.woocommerce-info a.button:hover, div.woocommerce-info a, div.woocommerce-info a:focus, div.woocommerce-info a:hover', 'color' ); - -/** - * WooCommerce error message - */ -var wc_error_message = '.woocommerce-error'; -generate_colors_live_update( 'wc_error_message_background', wc_error_message, 'background-color' ); -generate_colors_live_update( 'wc_error_message_text', wc_error_message + ', div.woocommerce-error a.button, div.woocommerce-error a.button:focus, div.woocommerce-error a.button:hover, div.woocommerce-error a, div.woocommerce-error a:focus, div.woocommerce-error a:hover', 'color' ); - -/** - * Menu Mini Cart - */ -generate_colors_live_update( 'wc_mini_cart_background_color', '#wc-mini-cart', 'background-color' ); -generate_colors_live_update( 'wc_mini_cart_text_color', '#wc-mini-cart,#wc-mini-cart a:not(.button), #wc-mini-cart a.remove', 'color' ); - -generate_colors_live_update( 'wc_mini_cart_button_background', '#wc-mini-cart .button.checkout', 'background-color' ); -generate_colors_live_update( 'wc_mini_cart_button_text', '#wc-mini-cart .button.checkout', 'color' ); - -generate_colors_live_update( 'wc_mini_cart_button_background_hover', '#wc-mini-cart .button.checkout:hover, #wc-mini-cart .button.checkout:focus, #wc-mini-cart .button.checkout:active', 'background-color' ); -generate_colors_live_update( 'wc_mini_cart_button_text_hover', '#wc-mini-cart .button.checkout:hover, #wc-mini-cart .button.checkout:focus, #wc-mini-cart .button.checkout:active', 'color' ); - -/** - * Sticky panel cart button - */ - generate_colors_live_update( 'wc_panel_cart_background_color', '.add-to-cart-panel', 'background-color' ); - generate_colors_live_update( 'wc_panel_cart_text_color', '.add-to-cart-panel, .add-to-cart-panel a:not(.button)', 'color' ); - - generate_colors_live_update( 'wc_panel_cart_button_background', '#wc-sticky-cart-panel .button', 'background-color' ); - generate_colors_live_update( 'wc_panel_cart_button_text', '#wc-sticky-cart-panel .button', 'color' ); - - generate_colors_live_update( 'wc_panel_cart_button_background_hover', '#wc-sticky-cart-panel .button:hover, #wc-sticky-cart-panel .button:focus, #wc-sticky-cart-panel .button:active', 'background-color' ); - generate_colors_live_update( 'wc_panel_cart_button_text_hover', '#wc-sticky-cart-panel .button:hover, #wc-sticky-cart-panel .button:focus, #wc-sticky-cart-panel .button:active', 'color' ); - -/** - * Price slider bar - */ -generate_colors_live_update( 'wc_price_slider_background_color', '.woocommerce .widget_price_filter .price_slider_wrapper .ui-widget-content', 'background-color' ); -generate_colors_live_update( 'wc_price_slider_bar_color', '.woocommerce .widget_price_filter .ui-slider .ui-slider-range, .woocommerce .widget_price_filter .ui-slider .ui-slider-handle', 'background-color' ); - -// Archive product description text -wp.customize( 'generate_settings[text_color]', function( value ) { - value.bind( function( newval ) { - if ( ! wp.customize.value('generate_settings[content_text_color]')() ) { - if ( jQuery( 'style#wc_desc_color' ).length ) { - jQuery( 'style#wc_desc_color' ).html( '.woocommerce-product-details__short-description{color:' + newval + ';}' ); - } else { - jQuery( 'head' ).append( '' ); - setTimeout(function() { - jQuery( 'style#wc_desc_color' ).not( ':last' ).remove(); - }, 1000); - } - } - } ); -} ); - -wp.customize( 'generate_settings[content_text_color]', function( value ) { - value.bind( function( newval ) { - if ( '' == newval ) { - newval = wp.customize.value('generate_settings[text_color]')(); - } - if ( jQuery( 'style#wc_desc_color' ).length ) { - jQuery( 'style#wc_desc_color' ).html( '.woocommerce-product-details__short-description{color:' + newval + ';}' ); - } else { - jQuery( 'head' ).append( '' ); - setTimeout(function() { - jQuery( 'style#wc_desc_color' ).not( ':last' ).remove(); - }, 1000); - } - } ); -} ); diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/colors/functions/secondary-nav-colors.php b/wp-content/upgrade-temp-backup/plugins/gp-premium/colors/functions/secondary-nav-colors.php deleted file mode 100644 index 7c3ee911..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/colors/functions/secondary-nav-colors.php +++ /dev/null @@ -1,403 +0,0 @@ -get_section( 'secondary_nav_section' ) ) { - return; - } - - // Bail if we don't have our color defaults. - if ( ! function_exists( 'generate_secondary_nav_get_defaults' ) ) { - return; - } - - // Add our controls. - require_once GP_LIBRARY_DIRECTORY . 'customizer-helpers.php'; - - // Get our defaults. - $defaults = generate_secondary_nav_get_defaults(); - - // Add control types so controls can be built using JS. - if ( method_exists( $wp_customize, 'register_control_type' ) ) { - $wp_customize->register_control_type( 'GeneratePress_Alpha_Color_Customize_Control' ); - $wp_customize->register_control_type( 'GeneratePress_Title_Customize_Control' ); - $wp_customize->register_control_type( 'GeneratePress_Section_Shortcut_Control' ); - } - - // Get our palettes. - $palettes = generate_get_default_color_palettes(); - - // Add Secondary Navigation section. - $wp_customize->add_section( - 'secondary_navigation_color_section', - array( - 'title' => __( 'Secondary Navigation', 'gp-premium' ), - 'capability' => 'edit_theme_options', - 'priority' => 71, - 'panel' => 'generate_colors_panel', - ) - ); - - $wp_customize->add_control( - new GeneratePress_Section_Shortcut_Control( - $wp_customize, - 'generate_secondary_navigation_color_shortcuts', - array( - 'section' => 'secondary_navigation_color_section', - 'element' => __( 'Secondary Navigation', 'gp-premium' ), - 'shortcuts' => array( - 'layout' => 'secondary_nav_section', - 'typography' => 'secondary_font_section', - 'backgrounds' => 'secondary_bg_images_section', - ), - 'settings' => ( isset( $wp_customize->selective_refresh ) ) ? array() : 'blogname', - 'priority' => 1, - ) - ) - ); - - $wp_customize->add_control( - new GeneratePress_Title_Customize_Control( - $wp_customize, - 'generate_secondary_navigation_items', - array( - 'section' => 'secondary_navigation_color_section', - 'type' => 'generatepress-customizer-title', - 'title' => __( 'Parent Items', 'gp-premium' ), - 'settings' => ( isset( $wp_customize->selective_refresh ) ) ? array() : 'blogname', - ) - ) - ); - - // Background. - $wp_customize->add_setting( - 'generate_secondary_nav_settings[navigation_background_color]', - array( - 'default' => $defaults['navigation_background_color'], - 'type' => 'option', - 'capability' => 'edit_theme_options', - 'sanitize_callback' => 'generate_premium_sanitize_rgba', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - new GeneratePress_Alpha_Color_Customize_Control( - $wp_customize, - 'secondary_navigation_background_color', - array( - 'label' => __( 'Background', 'gp-premium' ), - 'section' => 'secondary_navigation_color_section', - 'settings' => 'generate_secondary_nav_settings[navigation_background_color]', - 'palette' => $palettes, - ) - ) - ); - - // Text. - $wp_customize->add_setting( - 'generate_secondary_nav_settings[navigation_text_color]', - array( - 'default' => $defaults['navigation_text_color'], - 'type' => 'option', - 'capability' => 'edit_theme_options', - 'sanitize_callback' => 'generate_premium_sanitize_hex_color', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - new WP_Customize_Color_Control( - $wp_customize, - 'secondary_navigation_text_color', - array( - 'label' => __( 'Text', 'gp-premium' ), - 'section' => 'secondary_navigation_color_section', - 'settings' => 'generate_secondary_nav_settings[navigation_text_color]', - ) - ) - ); - - // Background hover. - $wp_customize->add_setting( - 'generate_secondary_nav_settings[navigation_background_hover_color]', - array( - 'default' => $defaults['navigation_background_hover_color'], - 'type' => 'option', - 'capability' => 'edit_theme_options', - 'sanitize_callback' => 'generate_premium_sanitize_rgba', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - new GeneratePress_Alpha_Color_Customize_Control( - $wp_customize, - 'secondary_navigation_background_hover_color', - array( - 'label' => __( 'Background Hover', 'gp-premium' ), - 'section' => 'secondary_navigation_color_section', - 'settings' => 'generate_secondary_nav_settings[navigation_background_hover_color]', - 'palette' => $palettes, - ) - ) - ); - - // Text hover. - $wp_customize->add_setting( - 'generate_secondary_nav_settings[navigation_text_hover_color]', - array( - 'default' => $defaults['navigation_text_hover_color'], - 'type' => 'option', - 'capability' => 'edit_theme_options', - 'sanitize_callback' => 'generate_premium_sanitize_hex_color', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - new WP_Customize_Color_Control( - $wp_customize, - 'secondary_navigation_text_hover_color', - array( - 'label' => __( 'Text Hover', 'gp-premium' ), - 'section' => 'secondary_navigation_color_section', - 'settings' => 'generate_secondary_nav_settings[navigation_text_hover_color]', - ) - ) - ); - - // Background current. - $wp_customize->add_setting( - 'generate_secondary_nav_settings[navigation_background_current_color]', - array( - 'default' => $defaults['navigation_background_current_color'], - 'type' => 'option', - 'capability' => 'edit_theme_options', - 'sanitize_callback' => 'generate_premium_sanitize_rgba', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - new GeneratePress_Alpha_Color_Customize_Control( - $wp_customize, - 'secondary_navigation_background_current_color', - array( - 'label' => __( 'Background Current', 'gp-premium' ), - 'section' => 'secondary_navigation_color_section', - 'settings' => 'generate_secondary_nav_settings[navigation_background_current_color]', - 'palette' => $palettes, - ) - ) - ); - - // Text current. - $wp_customize->add_setting( - 'generate_secondary_nav_settings[navigation_text_current_color]', - array( - 'default' => $defaults['navigation_text_current_color'], - 'type' => 'option', - 'capability' => 'edit_theme_options', - 'sanitize_callback' => 'generate_premium_sanitize_hex_color', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - new WP_Customize_Color_Control( - $wp_customize, - 'secondary_navigation_text_current_color', - array( - 'label' => __( 'Text Current', 'gp-premium' ), - 'section' => 'secondary_navigation_color_section', - 'settings' => 'generate_secondary_nav_settings[navigation_text_current_color]', - ) - ) - ); - - $wp_customize->add_control( - new GeneratePress_Title_Customize_Control( - $wp_customize, - 'generate_secondary_navigation_sub_menu_items', - array( - 'section' => 'secondary_navigation_color_section', - 'type' => 'generatepress-customizer-title', - 'title' => __( 'Sub-Menu Items', 'gp-premium' ), - 'settings' => ( isset( $wp_customize->selective_refresh ) ) ? array() : 'blogname', - ) - ) - ); - - // Background. - $wp_customize->add_setting( - 'generate_secondary_nav_settings[subnavigation_background_color]', - array( - 'default' => $defaults['subnavigation_background_color'], - 'type' => 'option', - 'capability' => 'edit_theme_options', - 'sanitize_callback' => 'generate_premium_sanitize_rgba', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - new GeneratePress_Alpha_Color_Customize_Control( - $wp_customize, - 'secondary_subnavigation_background_color', - array( - 'label' => __( 'Background', 'gp-premium' ), - 'section' => 'secondary_navigation_color_section', - 'settings' => 'generate_secondary_nav_settings[subnavigation_background_color]', - 'palette' => $palettes, - ) - ) - ); - - // Text. - $wp_customize->add_setting( - 'generate_secondary_nav_settings[subnavigation_text_color]', - array( - 'default' => $defaults['subnavigation_text_color'], - 'type' => 'option', - 'capability' => 'edit_theme_options', - 'sanitize_callback' => 'generate_premium_sanitize_hex_color', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - new WP_Customize_Color_Control( - $wp_customize, - 'secondary_subnavigation_text_color', - array( - 'label' => __( 'Text', 'gp-premium' ), - 'section' => 'secondary_navigation_color_section', - 'settings' => 'generate_secondary_nav_settings[subnavigation_text_color]', - ) - ) - ); - - // Background hover. - $wp_customize->add_setting( - 'generate_secondary_nav_settings[subnavigation_background_hover_color]', - array( - 'default' => $defaults['subnavigation_background_hover_color'], - 'type' => 'option', - 'capability' => 'edit_theme_options', - 'sanitize_callback' => 'generate_premium_sanitize_rgba', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - new GeneratePress_Alpha_Color_Customize_Control( - $wp_customize, - 'secondary_subnavigation_background_hover_color', - array( - 'label' => __( 'Background Hover', 'gp-premium' ), - 'section' => 'secondary_navigation_color_section', - 'settings' => 'generate_secondary_nav_settings[subnavigation_background_hover_color]', - 'palette' => $palettes, - ) - ) - ); - - // Text hover. - $wp_customize->add_setting( - 'generate_secondary_nav_settings[subnavigation_text_hover_color]', - array( - 'default' => $defaults['subnavigation_text_hover_color'], - 'type' => 'option', - 'capability' => 'edit_theme_options', - 'sanitize_callback' => 'generate_premium_sanitize_hex_color', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - new WP_Customize_Color_Control( - $wp_customize, - 'secondary_subnavigation_text_hover_color', - array( - 'label' => __( 'Text Hover', 'gp-premium' ), - 'section' => 'secondary_navigation_color_section', - 'settings' => 'generate_secondary_nav_settings[subnavigation_text_hover_color]', - ) - ) - ); - - // Background current. - $wp_customize->add_setting( - 'generate_secondary_nav_settings[subnavigation_background_current_color]', - array( - 'default' => $defaults['subnavigation_background_current_color'], - 'type' => 'option', - 'capability' => 'edit_theme_options', - 'sanitize_callback' => 'generate_premium_sanitize_rgba', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - new GeneratePress_Alpha_Color_Customize_Control( - $wp_customize, - 'secondary_subnavigation_background_current_color', - array( - 'label' => __( 'Background Current', 'gp-premium' ), - 'section' => 'secondary_navigation_color_section', - 'settings' => 'generate_secondary_nav_settings[subnavigation_background_current_color]', - 'palette' => $palettes, - ) - ) - ); - - // Text current. - $wp_customize->add_setting( - 'generate_secondary_nav_settings[subnavigation_text_current_color]', - array( - 'default' => $defaults['subnavigation_text_current_color'], - 'type' => 'option', - 'capability' => 'edit_theme_options', - 'sanitize_callback' => 'generate_premium_sanitize_hex_color', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - new WP_Customize_Color_Control( - $wp_customize, - 'secondary_subnavigation_text_current_color', - array( - 'label' => __( 'Text Current', 'gp-premium' ), - 'section' => 'secondary_navigation_color_section', - 'settings' => 'generate_secondary_nav_settings[subnavigation_text_current_color]', - ) - ) - ); - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/colors/functions/slideout-nav-colors.php b/wp-content/upgrade-temp-backup/plugins/gp-premium/colors/functions/slideout-nav-colors.php deleted file mode 100644 index f479dd6e..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/colors/functions/slideout-nav-colors.php +++ /dev/null @@ -1,400 +0,0 @@ -get_section( 'menu_plus_slideout_menu' ) ) { - return; - } - - // Bail if we don't have our color defaults. - if ( ! function_exists( 'generate_get_color_defaults' ) ) { - return; - } - - // Add our controls. - require_once GP_LIBRARY_DIRECTORY . 'customizer-helpers.php'; - - // Get our defaults. - $defaults = generate_get_color_defaults(); - - // Add control types so controls can be built using JS. - if ( method_exists( $wp_customize, 'register_control_type' ) ) { - $wp_customize->register_control_type( 'GeneratePress_Alpha_Color_Customize_Control' ); - $wp_customize->register_control_type( 'GeneratePress_Section_Shortcut_Control' ); - } - - // Get our palettes. - $palettes = generate_get_default_color_palettes(); - - // Add Secondary Navigation section. - $wp_customize->add_section( - 'slideout_color_section', - array( - 'title' => __( 'Off Canvas Panel', 'gp-premium' ), - 'capability' => 'edit_theme_options', - 'priority' => 73, - 'panel' => 'generate_colors_panel', - ) - ); - - $wp_customize->add_control( - new GeneratePress_Section_Shortcut_Control( - $wp_customize, - 'generate_off_canvas_color_shortcuts', - array( - 'section' => 'slideout_color_section', - 'element' => __( 'Off Canvas Panel', 'gp-premium' ), - 'shortcuts' => array( - 'layout' => 'menu_plus_slideout_menu', - 'typography' => 'generate_slideout_typography', - ), - 'settings' => ( isset( $wp_customize->selective_refresh ) ) ? array() : 'blogname', - 'priority' => 1, - ) - ) - ); - - $wp_customize->add_control( - new GeneratePress_Title_Customize_Control( - $wp_customize, - 'generate_slideout_navigation_items', - array( - 'section' => 'slideout_color_section', - 'type' => 'generatepress-customizer-title', - 'title' => __( 'Parent Menu Items', 'gp-premium' ), - 'settings' => ( isset( $wp_customize->selective_refresh ) ) ? array() : 'blogname', - ) - ) - ); - - // Background. - $wp_customize->add_setting( - 'generate_settings[slideout_background_color]', - array( - 'default' => $defaults['slideout_background_color'], - 'type' => 'option', - 'capability' => 'edit_theme_options', - 'sanitize_callback' => 'generate_premium_sanitize_rgba', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - new GeneratePress_Alpha_Color_Customize_Control( - $wp_customize, - 'generate_settings[slideout_background_color]', - array( - 'label' => __( 'Background', 'gp-premium' ), - 'section' => 'slideout_color_section', - 'settings' => 'generate_settings[slideout_background_color]', - 'palette' => $palettes, - ) - ) - ); - - // Text. - $wp_customize->add_setting( - 'generate_settings[slideout_text_color]', - array( - 'default' => $defaults['slideout_text_color'], - 'type' => 'option', - 'capability' => 'edit_theme_options', - 'sanitize_callback' => 'generate_premium_sanitize_hex_color', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - new WP_Customize_Color_Control( - $wp_customize, - 'generate_settings[slideout_text_color]', - array( - 'label' => __( 'Text', 'gp-premium' ), - 'section' => 'slideout_color_section', - 'settings' => 'generate_settings[slideout_text_color]', - ) - ) - ); - - // Background hover. - $wp_customize->add_setting( - 'generate_settings[slideout_background_hover_color]', - array( - 'default' => $defaults['slideout_background_hover_color'], - 'type' => 'option', - 'capability' => 'edit_theme_options', - 'sanitize_callback' => 'generate_premium_sanitize_rgba', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - new GeneratePress_Alpha_Color_Customize_Control( - $wp_customize, - 'generate_settings[slideout_background_hover_color]', - array( - 'label' => __( 'Background Hover', 'gp-premium' ), - 'section' => 'slideout_color_section', - 'settings' => 'generate_settings[slideout_background_hover_color]', - 'palette' => $palettes, - ) - ) - ); - - // Text hover. - $wp_customize->add_setting( - 'generate_settings[slideout_text_hover_color]', - array( - 'default' => $defaults['slideout_text_hover_color'], - 'type' => 'option', - 'capability' => 'edit_theme_options', - 'sanitize_callback' => 'generate_premium_sanitize_hex_color', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - new WP_Customize_Color_Control( - $wp_customize, - 'generate_settings[slideout_text_hover_color]', - array( - 'label' => __( 'Text Hover', 'gp-premium' ), - 'section' => 'slideout_color_section', - 'settings' => 'generate_settings[slideout_text_hover_color]', - ) - ) - ); - - // Background current. - $wp_customize->add_setting( - 'generate_settings[slideout_background_current_color]', - array( - 'default' => $defaults['slideout_background_current_color'], - 'type' => 'option', - 'capability' => 'edit_theme_options', - 'sanitize_callback' => 'generate_premium_sanitize_rgba', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - new GeneratePress_Alpha_Color_Customize_Control( - $wp_customize, - 'generate_settings[slideout_background_current_color]', - array( - 'label' => __( 'Background Current', 'gp-premium' ), - 'section' => 'slideout_color_section', - 'settings' => 'generate_settings[slideout_background_current_color]', - 'palette' => $palettes, - ) - ) - ); - - // Text current. - $wp_customize->add_setting( - 'generate_settings[slideout_text_current_color]', - array( - 'default' => $defaults['slideout_text_current_color'], - 'type' => 'option', - 'capability' => 'edit_theme_options', - 'sanitize_callback' => 'generate_premium_sanitize_hex_color', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - new WP_Customize_Color_Control( - $wp_customize, - 'generate_settings[slideout_text_current_color]', - array( - 'label' => __( 'Text Current', 'gp-premium' ), - 'section' => 'slideout_color_section', - 'settings' => 'generate_settings[slideout_text_current_color]', - ) - ) - ); - - $wp_customize->add_control( - new GeneratePress_Title_Customize_Control( - $wp_customize, - 'generate_slideout_navigation_sub_menu_items', - array( - 'section' => 'slideout_color_section', - 'type' => 'generatepress-customizer-title', - 'title' => __( 'Sub-Menu Items', 'gp-premium' ), - 'settings' => ( isset( $wp_customize->selective_refresh ) ) ? array() : 'blogname', - ) - ) - ); - - // Background. - $wp_customize->add_setting( - 'generate_settings[slideout_submenu_background_color]', - array( - 'default' => $defaults['slideout_submenu_background_color'], - 'type' => 'option', - 'capability' => 'edit_theme_options', - 'sanitize_callback' => 'generate_premium_sanitize_rgba', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - new GeneratePress_Alpha_Color_Customize_Control( - $wp_customize, - 'generate_settings[slideout_submenu_background_color]', - array( - 'label' => __( 'Background', 'gp-premium' ), - 'section' => 'slideout_color_section', - 'settings' => 'generate_settings[slideout_submenu_background_color]', - 'palette' => $palettes, - ) - ) - ); - - // Text. - $wp_customize->add_setting( - 'generate_settings[slideout_submenu_text_color]', - array( - 'default' => $defaults['slideout_submenu_text_color'], - 'type' => 'option', - 'capability' => 'edit_theme_options', - 'sanitize_callback' => 'generate_premium_sanitize_hex_color', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - new WP_Customize_Color_Control( - $wp_customize, - 'generate_settings[slideout_submenu_text_color]', - array( - 'label' => __( 'Text', 'gp-premium' ), - 'section' => 'slideout_color_section', - 'settings' => 'generate_settings[slideout_submenu_text_color]', - ) - ) - ); - - // Background hover. - $wp_customize->add_setting( - 'generate_settings[slideout_submenu_background_hover_color]', - array( - 'default' => $defaults['slideout_submenu_background_hover_color'], - 'type' => 'option', - 'capability' => 'edit_theme_options', - 'sanitize_callback' => 'generate_premium_sanitize_rgba', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - new GeneratePress_Alpha_Color_Customize_Control( - $wp_customize, - 'generate_settings[slideout_submenu_background_hover_color]', - array( - 'label' => __( 'Background Hover', 'gp-premium' ), - 'section' => 'slideout_color_section', - 'settings' => 'generate_settings[slideout_submenu_background_hover_color]', - 'palette' => $palettes, - ) - ) - ); - - // Text hover. - $wp_customize->add_setting( - 'generate_settings[slideout_submenu_text_hover_color]', - array( - 'default' => $defaults['slideout_submenu_text_hover_color'], - 'type' => 'option', - 'capability' => 'edit_theme_options', - 'sanitize_callback' => 'generate_premium_sanitize_hex_color', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - new WP_Customize_Color_Control( - $wp_customize, - 'generate_settings[slideout_submenu_text_hover_color]', - array( - 'label' => __( 'Text Hover', 'gp-premium' ), - 'section' => 'slideout_color_section', - 'settings' => 'generate_settings[slideout_submenu_text_hover_color]', - ) - ) - ); - - // Background current. - $wp_customize->add_setting( - 'generate_settings[slideout_submenu_background_current_color]', - array( - 'default' => $defaults['slideout_submenu_background_current_color'], - 'type' => 'option', - 'capability' => 'edit_theme_options', - 'sanitize_callback' => 'generate_premium_sanitize_rgba', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - new GeneratePress_Alpha_Color_Customize_Control( - $wp_customize, - 'generate_settings[slideout_submenu_background_current_color]', - array( - 'label' => __( 'Background Current', 'gp-premium' ), - 'section' => 'slideout_color_section', - 'settings' => 'generate_settings[slideout_submenu_background_current_color]', - 'palette' => $palettes, - ) - ) - ); - - // Text current. - $wp_customize->add_setting( - 'generate_settings[slideout_submenu_text_current_color]', - array( - 'default' => $defaults['slideout_submenu_text_current_color'], - 'type' => 'option', - 'capability' => 'edit_theme_options', - 'sanitize_callback' => 'generate_premium_sanitize_hex_color', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - new WP_Customize_Color_Control( - $wp_customize, - 'generate_settings[slideout_submenu_text_current_color]', - array( - 'label' => __( 'Text Current', 'gp-premium' ), - 'section' => 'slideout_color_section', - 'settings' => 'generate_settings[slideout_submenu_text_current_color]', - ) - ) - ); -} diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/colors/functions/woocommerce-colors.php b/wp-content/upgrade-temp-backup/plugins/gp-premium/colors/functions/woocommerce-colors.php deleted file mode 100644 index 6c453815..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/colors/functions/woocommerce-colors.php +++ /dev/null @@ -1,911 +0,0 @@ -get_section( 'generate_woocommerce_colors' ) ) { - return; - } - - if ( ! function_exists( 'generate_get_color_defaults' ) ) { - return; - } - - // Add our controls. - require_once GP_LIBRARY_DIRECTORY . 'customizer-helpers.php'; - - // Get our defaults. - $defaults = generate_get_color_defaults(); - - // Add control types so controls can be built using JS. - if ( method_exists( $wp_customize, 'register_control_type' ) ) { - $wp_customize->register_control_type( 'GeneratePress_Alpha_Color_Customize_Control' ); - $wp_customize->register_control_type( 'GeneratePress_Title_Customize_Control' ); - $wp_customize->register_control_type( 'GeneratePress_Information_Customize_Control' ); - $wp_customize->register_control_type( 'GeneratePress_Section_Shortcut_Control' ); - } - - // Get our palettes. - $palettes = generate_get_default_color_palettes(); - - $wp_customize->add_control( - new GeneratePress_Section_Shortcut_Control( - $wp_customize, - 'generate_woocommerce_color_shortcuts', - array( - 'section' => 'generate_woocommerce_colors', - 'element' => __( 'WooCommerce', 'gp-premium' ), - 'shortcuts' => array( - 'layout' => 'generate_woocommerce_layout', - 'typography' => 'generate_woocommerce_typography', - ), - 'settings' => ( isset( $wp_customize->selective_refresh ) ) ? array() : 'blogname', - 'priority' => 0, - ) - ) - ); - - $wp_customize->add_control( - new GeneratePress_Title_Customize_Control( - $wp_customize, - 'generate_woocommerce_button_title', - array( - 'section' => 'generate_woocommerce_colors', - 'type' => 'generatepress-customizer-title', - 'title' => __( 'Buttons', 'gp-premium' ), - 'settings' => ( isset( $wp_customize->selective_refresh ) ) ? array() : 'blogname', - ) - ) - ); - - $wp_customize->add_control( - new GeneratePress_Information_Customize_Control( - $wp_customize, - 'generate_woocommerce_primary_button_message', - array( - 'section' => 'generate_woocommerce_colors', - 'label' => __( 'Primary Button Colors', 'gp-premium' ), - 'description' => __( 'Primary button colors can be set here.', 'gp-premium' ), - 'settings' => ( isset( $wp_customize->selective_refresh ) ) ? array() : 'blogname', - ) - ) - ); - - $wp_customize->add_setting( - 'generate_settings[wc_alt_button_background]', - array( - 'default' => $defaults['wc_alt_button_background'], - 'type' => 'option', - 'capability' => 'edit_theme_options', - 'transport' => 'postMessage', - 'sanitize_callback' => 'generate_premium_sanitize_rgba', - ) - ); - - $wp_customize->add_control( - new GeneratePress_Alpha_Color_Customize_Control( - $wp_customize, - 'generate_settings[wc_alt_button_background]', - array( - 'label' => __( 'Alt Button Background', 'gp-premium' ), - 'section' => 'generate_woocommerce_colors', - 'settings' => 'generate_settings[wc_alt_button_background]', - 'palette' => $palettes, - ) - ) - ); - - $wp_customize->add_setting( - 'generate_settings[wc_alt_button_background_hover]', - array( - 'default' => $defaults['wc_alt_button_background_hover'], - 'type' => 'option', - 'capability' => 'edit_theme_options', - 'transport' => 'postMessage', - 'sanitize_callback' => 'generate_premium_sanitize_rgba', - ) - ); - - $wp_customize->add_control( - new GeneratePress_Alpha_Color_Customize_Control( - $wp_customize, - 'generate_settings[wc_alt_button_background_hover]', - array( - 'label' => __( 'Alt Button Background Hover', 'gp-premium' ), - 'section' => 'generate_woocommerce_colors', - 'settings' => 'generate_settings[wc_alt_button_background_hover]', - 'palette' => $palettes, - ) - ) - ); - - $wp_customize->add_setting( - 'generate_settings[wc_alt_button_text]', - array( - 'default' => $defaults['wc_alt_button_text'], - 'type' => 'option', - 'capability' => 'edit_theme_options', - 'sanitize_callback' => 'generate_premium_sanitize_hex_color', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - new WP_Customize_Color_Control( - $wp_customize, - 'generate_settings[wc_alt_button_text]', - array( - 'label' => __( 'Alt Button Text', 'gp-premium' ), - 'section' => 'generate_woocommerce_colors', - 'settings' => 'generate_settings[wc_alt_button_text]', - ) - ) - ); - - $wp_customize->add_setting( - 'generate_settings[wc_alt_button_text_hover]', - array( - 'default' => $defaults['wc_alt_button_text_hover'], - 'type' => 'option', - 'capability' => 'edit_theme_options', - 'sanitize_callback' => 'generate_premium_sanitize_hex_color', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - new WP_Customize_Color_Control( - $wp_customize, - 'generate_settings[wc_alt_button_text_hover]', - array( - 'label' => __( 'Alt Button Text Hover', 'gp-premium' ), - 'section' => 'generate_woocommerce_colors', - 'settings' => 'generate_settings[wc_alt_button_text_hover]', - ) - ) - ); - - $wp_customize->add_control( - new GeneratePress_Title_Customize_Control( - $wp_customize, - 'generate_woocommerce_product_title', - array( - 'section' => 'generate_woocommerce_colors', - 'type' => 'generatepress-customizer-title', - 'title' => __( 'Products', 'gp-premium' ), - 'settings' => ( isset( $wp_customize->selective_refresh ) ) ? array() : 'blogname', - ) - ) - ); - - $wp_customize->add_setting( - 'generate_settings[wc_product_title_color]', - array( - 'default' => $defaults['wc_product_title_color'], - 'type' => 'option', - 'capability' => 'edit_theme_options', - 'sanitize_callback' => 'generate_premium_sanitize_hex_color', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - new WP_Customize_Color_Control( - $wp_customize, - 'generate_settings[wc_product_title_color]', - array( - 'label' => __( 'Product Title', 'gp-premium' ), - 'section' => 'generate_woocommerce_colors', - 'settings' => 'generate_settings[wc_product_title_color]', - ) - ) - ); - - $wp_customize->add_setting( - 'generate_settings[wc_product_title_color_hover]', - array( - 'default' => $defaults['wc_product_title_color_hover'], - 'type' => 'option', - 'capability' => 'edit_theme_options', - 'sanitize_callback' => 'generate_premium_sanitize_hex_color', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - new WP_Customize_Color_Control( - $wp_customize, - 'generate_settings[wc_product_title_color_hover]', - array( - 'label' => __( 'Product Title Hover', 'gp-premium' ), - 'section' => 'generate_woocommerce_colors', - 'settings' => 'generate_settings[wc_product_title_color_hover]', - ) - ) - ); - - $wp_customize->add_setting( - 'generate_settings[wc_rating_stars]', - array( - 'default' => $defaults['wc_rating_stars'], - 'type' => 'option', - 'capability' => 'edit_theme_options', - 'transport' => '', - 'sanitize_callback' => 'generate_premium_sanitize_rgba', - ) - ); - - $wp_customize->add_control( - new GeneratePress_Alpha_Color_Customize_Control( - $wp_customize, - 'generate_settings[wc_rating_stars]', - array( - 'label' => __( 'Star Ratings', 'gp-premium' ), - 'section' => 'generate_woocommerce_colors', - 'settings' => 'generate_settings[wc_rating_stars]', - 'palette' => $palettes, - ) - ) - ); - - $wp_customize->add_setting( - 'generate_settings[wc_sale_sticker_background]', - array( - 'default' => $defaults['wc_sale_sticker_background'], - 'type' => 'option', - 'capability' => 'edit_theme_options', - 'transport' => 'postMessage', - 'sanitize_callback' => 'generate_premium_sanitize_rgba', - ) - ); - - $wp_customize->add_control( - new GeneratePress_Alpha_Color_Customize_Control( - $wp_customize, - 'generate_settings[wc_sale_sticker_background]', - array( - 'label' => __( 'Sale Sticker Background', 'gp-premium' ), - 'section' => 'generate_woocommerce_colors', - 'settings' => 'generate_settings[wc_sale_sticker_background]', - 'palette' => $palettes, - ) - ) - ); - - $wp_customize->add_setting( - 'generate_settings[wc_sale_sticker_text]', - array( - 'default' => $defaults['wc_sale_sticker_text'], - 'type' => 'option', - 'capability' => 'edit_theme_options', - 'sanitize_callback' => 'generate_premium_sanitize_hex_color', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - new WP_Customize_Color_Control( - $wp_customize, - 'generate_settings[wc_sale_sticker_text]', - array( - 'label' => __( 'Sale Sticker Text', 'gp-premium' ), - 'section' => 'generate_woocommerce_colors', - 'settings' => 'generate_settings[wc_sale_sticker_text]', - ) - ) - ); - - $wp_customize->add_setting( - 'generate_settings[wc_price_color]', - array( - 'default' => $defaults['wc_price_color'], - 'type' => 'option', - 'capability' => 'edit_theme_options', - 'sanitize_callback' => 'generate_premium_sanitize_hex_color', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - new WP_Customize_Color_Control( - $wp_customize, - 'generate_settings[wc_price_color]', - array( - 'label' => __( 'Price', 'gp-premium' ), - 'section' => 'generate_woocommerce_colors', - 'settings' => 'generate_settings[wc_price_color]', - ) - ) - ); - - $wp_customize->add_control( - new GeneratePress_Title_Customize_Control( - $wp_customize, - 'generate_woocommerce_panel_cart_title', - array( - 'section' => 'generate_woocommerce_colors', - 'type' => 'generatepress-customizer-title', - 'title' => __( 'Sticky Panel Cart', 'gp-premium' ), - 'settings' => ( isset( $wp_customize->selective_refresh ) ) ? array() : 'blogname', - ) - ) - ); - - $wp_customize->add_setting( - 'generate_settings[wc_panel_cart_background_color]', - array( - 'default' => $defaults['wc_panel_cart_background_color'], - 'type' => 'option', - 'capability' => 'edit_theme_options', - 'transport' => 'postMessage', - 'sanitize_callback' => 'generate_premium_sanitize_rgba', - ) - ); - - $wp_customize->add_control( - new GeneratePress_Alpha_Color_Customize_Control( - $wp_customize, - 'generate_settings[wc_panel_cart_background_color]', - array( - 'label' => __( 'Background Color', 'gp-premium' ), - 'section' => 'generate_woocommerce_colors', - 'settings' => 'generate_settings[wc_panel_cart_background_color]', - 'palette' => $palettes, - ) - ) - ); - - $wp_customize->add_setting( - 'generate_settings[wc_panel_cart_text_color]', - array( - 'default' => $defaults['wc_panel_cart_text_color'], - 'type' => 'option', - 'capability' => 'edit_theme_options', - 'sanitize_callback' => 'generate_premium_sanitize_hex_color', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - new WP_Customize_Color_Control( - $wp_customize, - 'generate_settings[wc_panel_cart_text_color]', - array( - 'label' => __( 'Text Color', 'gp-premium' ), - 'section' => 'generate_woocommerce_colors', - 'settings' => 'generate_settings[wc_panel_cart_text_color]', - ) - ) - ); - - $wp_customize->add_setting( - 'generate_settings[wc_panel_cart_button_background]', - array( - 'default' => $defaults['wc_panel_cart_button_background'], - 'type' => 'option', - 'capability' => 'edit_theme_options', - 'sanitize_callback' => 'generate_premium_sanitize_hex_color', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - new WP_Customize_Color_Control( - $wp_customize, - 'generate_settings[wc_panel_cart_button_background]', - array( - 'label' => __( 'Button Background', 'gp-premium' ), - 'section' => 'generate_woocommerce_colors', - 'settings' => 'generate_settings[wc_panel_cart_button_background]', - ) - ) - ); - - $wp_customize->add_setting( - 'generate_settings[wc_panel_cart_button_background_hover]', - array( - 'default' => $defaults['wc_panel_cart_button_background_hover'], - 'type' => 'option', - 'capability' => 'edit_theme_options', - 'sanitize_callback' => 'generate_premium_sanitize_hex_color', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - new WP_Customize_Color_Control( - $wp_customize, - 'generate_settings[wc_panel_cart_button_background_hover]', - array( - 'label' => __( 'Button Background Hover', 'gp-premium' ), - 'section' => 'generate_woocommerce_colors', - 'settings' => 'generate_settings[wc_panel_cart_button_background_hover]', - ) - ) - ); - - $wp_customize->add_setting( - 'generate_settings[wc_panel_cart_button_text]', - array( - 'default' => $defaults['wc_panel_cart_button_text'], - 'type' => 'option', - 'capability' => 'edit_theme_options', - 'sanitize_callback' => 'generate_premium_sanitize_hex_color', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - new WP_Customize_Color_Control( - $wp_customize, - 'generate_settings[wc_panel_cart_button_text]', - array( - 'label' => __( 'Button Text', 'gp-premium' ), - 'section' => 'generate_woocommerce_colors', - 'settings' => 'generate_settings[wc_panel_cart_button_text]', - ) - ) - ); - - $wp_customize->add_setting( - 'generate_settings[wc_panel_cart_button_text_hover]', - array( - 'default' => $defaults['wc_panel_cart_button_text_hover'], - 'type' => 'option', - 'capability' => 'edit_theme_options', - 'sanitize_callback' => 'generate_premium_sanitize_hex_color', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - new WP_Customize_Color_Control( - $wp_customize, - 'generate_settings[wc_panel_cart_button_text_hover]', - array( - 'label' => __( 'Button Text Hover', 'gp-premium' ), - 'section' => 'generate_woocommerce_colors', - 'settings' => 'generate_settings[wc_panel_cart_button_text_hover]', - ) - ) - ); - - $wp_customize->add_control( - new GeneratePress_Title_Customize_Control( - $wp_customize, - 'generate_woocommerce_mini_cart_title', - array( - 'section' => 'generate_woocommerce_colors', - 'type' => 'generatepress-customizer-title', - 'title' => __( 'Menu Mini Cart', 'gp-premium' ), - 'settings' => ( isset( $wp_customize->selective_refresh ) ) ? array() : 'blogname', - ) - ) - ); - - $wp_customize->add_setting( - 'generate_settings[wc_mini_cart_background_color]', - array( - 'default' => $defaults['wc_mini_cart_background_color'], - 'type' => 'option', - 'capability' => 'edit_theme_options', - 'transport' => 'postMessage', - 'sanitize_callback' => 'generate_premium_sanitize_rgba', - ) - ); - - $wp_customize->add_control( - new GeneratePress_Alpha_Color_Customize_Control( - $wp_customize, - 'generate_settings[wc_mini_cart_background_color]', - array( - 'label' => __( 'Cart Background Color', 'gp-premium' ), - 'section' => 'generate_woocommerce_colors', - 'settings' => 'generate_settings[wc_mini_cart_background_color]', - 'palette' => $palettes, - ) - ) - ); - - $wp_customize->add_setting( - 'generate_settings[wc_mini_cart_text_color]', - array( - 'default' => $defaults['wc_mini_cart_text_color'], - 'type' => 'option', - 'capability' => 'edit_theme_options', - 'sanitize_callback' => 'generate_premium_sanitize_hex_color', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - new WP_Customize_Color_Control( - $wp_customize, - 'generate_settings[wc_mini_cart_text_color]', - array( - 'label' => __( 'Cart Text Color', 'gp-premium' ), - 'section' => 'generate_woocommerce_colors', - 'settings' => 'generate_settings[wc_mini_cart_text_color]', - ) - ) - ); - - $wp_customize->add_setting( - 'generate_settings[wc_mini_cart_button_background]', - array( - 'default' => $defaults['wc_mini_cart_button_background'], - 'type' => 'option', - 'capability' => 'edit_theme_options', - 'sanitize_callback' => 'generate_premium_sanitize_hex_color', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - new WP_Customize_Color_Control( - $wp_customize, - 'generate_settings[wc_mini_cart_button_background]', - array( - 'label' => __( 'Button Background', 'gp-premium' ), - 'section' => 'generate_woocommerce_colors', - 'settings' => 'generate_settings[wc_mini_cart_button_background]', - ) - ) - ); - - $wp_customize->add_setting( - 'generate_settings[wc_mini_cart_button_background_hover]', - array( - 'default' => $defaults['wc_mini_cart_button_background_hover'], - 'type' => 'option', - 'capability' => 'edit_theme_options', - 'sanitize_callback' => 'generate_premium_sanitize_hex_color', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - new WP_Customize_Color_Control( - $wp_customize, - 'generate_settings[wc_mini_cart_button_background_hover]', - array( - 'label' => __( 'Button Background Hover', 'gp-premium' ), - 'section' => 'generate_woocommerce_colors', - 'settings' => 'generate_settings[wc_mini_cart_button_background_hover]', - ) - ) - ); - - $wp_customize->add_setting( - 'generate_settings[wc_mini_cart_button_text]', - array( - 'default' => $defaults['wc_mini_cart_button_text'], - 'type' => 'option', - 'capability' => 'edit_theme_options', - 'sanitize_callback' => 'generate_premium_sanitize_hex_color', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - new WP_Customize_Color_Control( - $wp_customize, - 'generate_settings[wc_mini_cart_button_text]', - array( - 'label' => __( 'Button Text', 'gp-premium' ), - 'section' => 'generate_woocommerce_colors', - 'settings' => 'generate_settings[wc_mini_cart_button_text]', - ) - ) - ); - - $wp_customize->add_setting( - 'generate_settings[wc_mini_cart_button_text_hover]', - array( - 'default' => $defaults['wc_mini_cart_button_text_hover'], - 'type' => 'option', - 'capability' => 'edit_theme_options', - 'sanitize_callback' => 'generate_premium_sanitize_hex_color', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - new WP_Customize_Color_Control( - $wp_customize, - 'generate_settings[wc_mini_cart_button_text_hover]', - array( - 'label' => __( 'Button Text Hover', 'gp-premium' ), - 'section' => 'generate_woocommerce_colors', - 'settings' => 'generate_settings[wc_mini_cart_button_text_hover]', - ) - ) - ); - - $wp_customize->add_control( - new GeneratePress_Title_Customize_Control( - $wp_customize, - 'generate_woocommerce_price_slider_title', - array( - 'section' => 'generate_woocommerce_colors', - 'type' => 'generatepress-customizer-title', - 'title' => __( 'Price Slider Widget', 'gp-premium' ), - 'settings' => ( isset( $wp_customize->selective_refresh ) ) ? array() : 'blogname', - ) - ) - ); - - $wp_customize->add_setting( - 'generate_settings[wc_price_slider_background_color]', - array( - 'default' => $defaults['wc_price_slider_background_color'], - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_hex_color', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - new WP_Customize_Color_Control( - $wp_customize, - 'generate_settings[wc_price_slider_background_color]', - array( - 'label' => __( 'Slider Background Color', 'gp-premium' ), - 'section' => 'generate_woocommerce_colors', - 'settings' => 'generate_settings[wc_price_slider_background_color]', - ) - ) - ); - - $wp_customize->add_setting( - 'generate_settings[wc_price_slider_bar_color]', - array( - 'default' => $defaults['wc_price_slider_bar_color'], - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_hex_color', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - new WP_Customize_Color_Control( - $wp_customize, - 'generate_settings[wc_price_slider_bar_color]', - array( - 'label' => __( 'Slider Bar Color', 'gp-premium' ), - 'section' => 'generate_woocommerce_colors', - 'settings' => 'generate_settings[wc_price_slider_bar_color]', - ) - ) - ); - - $wp_customize->add_control( - new GeneratePress_Title_Customize_Control( - $wp_customize, - 'generate_woocommerce_product_tabs_title', - array( - 'section' => 'generate_woocommerce_colors', - 'type' => 'generatepress-customizer-title', - 'title' => __( 'Product Tabs', 'gp-premium' ), - 'settings' => ( isset( $wp_customize->selective_refresh ) ) ? array() : 'blogname', - ) - ) - ); - - $wp_customize->add_setting( - 'generate_settings[wc_product_tab]', - array( - 'default' => $defaults['wc_product_tab'], - 'type' => 'option', - 'capability' => 'edit_theme_options', - 'sanitize_callback' => 'generate_premium_sanitize_hex_color', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - new WP_Customize_Color_Control( - $wp_customize, - 'generate_settings[wc_product_tab]', - array( - 'label' => __( 'Product Tab Text', 'gp-premium' ), - 'section' => 'generate_woocommerce_colors', - 'settings' => 'generate_settings[wc_product_tab]', - ) - ) - ); - - $wp_customize->add_setting( - 'generate_settings[wc_product_tab_highlight]', - array( - 'default' => $defaults['wc_product_tab_highlight'], - 'type' => 'option', - 'capability' => 'edit_theme_options', - 'sanitize_callback' => 'generate_premium_sanitize_hex_color', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - new WP_Customize_Color_Control( - $wp_customize, - 'generate_settings[wc_product_tab_highlight]', - array( - 'label' => __( 'Product Tab Active', 'gp-premium' ), - 'section' => 'generate_woocommerce_colors', - 'settings' => 'generate_settings[wc_product_tab_highlight]', - ) - ) - ); - - $wp_customize->add_control( - new GeneratePress_Title_Customize_Control( - $wp_customize, - 'generate_woocommerce_messages_title', - array( - 'section' => 'generate_woocommerce_colors', - 'type' => 'generatepress-customizer-title', - 'title' => __( 'Messages', 'gp-premium' ), - 'settings' => ( isset( $wp_customize->selective_refresh ) ) ? array() : 'blogname', - ) - ) - ); - - $wp_customize->add_setting( - 'generate_settings[wc_success_message_background]', - array( - 'default' => $defaults['wc_success_message_background'], - 'type' => 'option', - 'capability' => 'edit_theme_options', - 'transport' => 'postMessage', - 'sanitize_callback' => 'generate_premium_sanitize_rgba', - ) - ); - - $wp_customize->add_control( - new GeneratePress_Alpha_Color_Customize_Control( - $wp_customize, - 'generate_settings[wc_success_message_background]', - array( - 'label' => __( 'Success Message Background', 'gp-premium' ), - 'section' => 'generate_woocommerce_colors', - 'settings' => 'generate_settings[wc_success_message_background]', - 'palette' => $palettes, - ) - ) - ); - - $wp_customize->add_setting( - 'generate_settings[wc_success_message_text]', - array( - 'default' => $defaults['wc_success_message_text'], - 'type' => 'option', - 'capability' => 'edit_theme_options', - 'sanitize_callback' => 'generate_premium_sanitize_hex_color', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - new WP_Customize_Color_Control( - $wp_customize, - 'generate_settings[wc_success_message_text]', - array( - 'label' => __( 'Success Message Text', 'gp-premium' ), - 'section' => 'generate_woocommerce_colors', - 'settings' => 'generate_settings[wc_success_message_text]', - ) - ) - ); - - $wp_customize->add_setting( - 'generate_settings[wc_info_message_background]', - array( - 'default' => $defaults['wc_info_message_background'], - 'type' => 'option', - 'capability' => 'edit_theme_options', - 'transport' => 'postMessage', - 'sanitize_callback' => 'generate_premium_sanitize_rgba', - ) - ); - - $wp_customize->add_control( - new GeneratePress_Alpha_Color_Customize_Control( - $wp_customize, - 'generate_settings[wc_info_message_background]', - array( - 'label' => __( 'Info Message Background', 'gp-premium' ), - 'section' => 'generate_woocommerce_colors', - 'settings' => 'generate_settings[wc_info_message_background]', - 'palette' => $palettes, - ) - ) - ); - - $wp_customize->add_setting( - 'generate_settings[wc_info_message_text]', - array( - 'default' => $defaults['wc_info_message_text'], - 'type' => 'option', - 'capability' => 'edit_theme_options', - 'sanitize_callback' => 'generate_premium_sanitize_hex_color', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - new WP_Customize_Color_Control( - $wp_customize, - 'generate_settings[wc_info_message_text]', - array( - 'label' => __( 'Info Message Text', 'gp-premium' ), - 'section' => 'generate_woocommerce_colors', - 'settings' => 'generate_settings[wc_info_message_text]', - ) - ) - ); - - $wp_customize->add_setting( - 'generate_settings[wc_error_message_background]', - array( - 'default' => $defaults['wc_error_message_background'], - 'type' => 'option', - 'capability' => 'edit_theme_options', - 'transport' => 'postMessage', - 'sanitize_callback' => 'generate_premium_sanitize_rgba', - ) - ); - - $wp_customize->add_control( - new GeneratePress_Alpha_Color_Customize_Control( - $wp_customize, - 'generate_settings[wc_error_message_background]', - array( - 'label' => __( 'Error Message Background', 'gp-premium' ), - 'section' => 'generate_woocommerce_colors', - 'settings' => 'generate_settings[wc_error_message_background]', - 'palette' => $palettes, - ) - ) - ); - - $wp_customize->add_setting( - 'generate_settings[wc_error_message_text]', - array( - 'default' => $defaults['wc_error_message_text'], - 'type' => 'option', - 'capability' => 'edit_theme_options', - 'sanitize_callback' => 'generate_premium_sanitize_hex_color', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - new WP_Customize_Color_Control( - $wp_customize, - 'generate_settings[wc_error_message_text]', - array( - 'label' => __( 'Error Message Text', 'gp-premium' ), - 'section' => 'generate_woocommerce_colors', - 'settings' => 'generate_settings[wc_error_message_text]', - ) - ) - ); - - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/colors/generate-colors.php b/wp-content/upgrade-temp-backup/plugins/gp-premium/colors/generate-colors.php deleted file mode 100644 index a90e5c4c..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/colors/generate-colors.php +++ /dev/null @@ -1,20 +0,0 @@ -register_control_type( 'GeneratePress_Copyright_Customize_Control' ); - } - - $wp_customize->add_setting( - 'generate_copyright', - array( - 'default' => '', - 'type' => 'theme_mod', - 'sanitize_callback' => 'wp_kses_post', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - new GeneratePress_Copyright_Customize_Control( - $wp_customize, - 'generate_copyright', - array( - 'label' => __( 'Copyright', 'gp-premium' ), - 'section' => 'generate_layout_footer', - 'settings' => 'generate_copyright', - 'priority' => 500, - ) - ) - ); - - // Initiate selective refresh. - if ( isset( $wp_customize->selective_refresh ) ) { - $wp_customize->selective_refresh->add_partial( - 'generate_copyright', - array( - 'selector' => '.copyright-bar', - 'settings' => array( 'generate_copyright' ), - 'render_callback' => 'generate_copyright_selective_refresh', - ) - ); - } - } -} - -if ( ! function_exists( 'generate_copyright_selective_refresh' ) ) { - /** - * Return our copyright on selective refresh - */ - function generate_copyright_selective_refresh() { - $options = array( - '%current_year%', - '%copy%', - ); - - $replace = array( - date( 'Y' ), // phpcs:ignore -- prefer date(). - '©', - ); - - $new_copyright = get_theme_mod( 'generate_copyright' ); - $new_copyright = str_replace( $options, $replace, get_theme_mod( 'generate_copyright' ) ); - - return do_shortcode( $new_copyright ); - } -} - -if ( ! function_exists( 'generate_copyright_remove_default' ) ) { - add_action( 'wp', 'generate_copyright_remove_default' ); - /** - * Remove the default copyright. - * - * @since 0.1 - * @deprecated GP 1.3.42 - */ - function generate_copyright_remove_default() { - // As of 1.3.42, we no longer need to do this. - // We use a nice little filter instead. - if ( ! function_exists( 'generate_add_login_attribution' ) ) { - return; - } - - if ( get_theme_mod( 'generate_copyright' ) && '' !== get_theme_mod( 'generate_copyright' ) ) { - remove_action( 'generate_credits', 'generate_add_footer_info' ); - remove_action( 'generate_copyright_line', 'generate_add_login_attribution' ); - } - } -} - -if ( ! function_exists( 'generate_copyright_add_custom' ) ) { - add_action( 'generate_credits', 'generate_copyright_add_custom' ); - /** - * Add the custom copyright. - * - * @since 0.1 - * @deprecated GP 1.3.42 - */ - function generate_copyright_add_custom() { - // As of 1.3.42, we no longer need to do this. - // We use a nice little filter instead. - if ( ! function_exists( 'generate_add_login_attribution' ) ) { - return; - } - - $options = array( - '%current_year%', - '%copy%', - ); - - $replace = array( - date( 'Y' ), // phpcs:ignore -- prefer date(). - '©', - ); - - $new_copyright = get_theme_mod( 'generate_copyright' ); - $new_copyright = str_replace( $options, $replace, get_theme_mod( 'generate_copyright' ) ); - - if ( get_theme_mod( 'generate_copyright' ) && '' !== get_theme_mod( 'generate_copyright' ) ) { - echo do_shortcode( $new_copyright ); - } - } -} - -if ( ! function_exists( 'generate_apply_custom_copyright' ) ) { - add_filter( 'generate_copyright', 'generate_apply_custom_copyright' ); - /** - * Add the custom copyright - * - * @since 1.2.92 - * @param string $copyright The copyright value. - */ - function generate_apply_custom_copyright( $copyright ) { - // This will only work if GP >= 1.3.42 and the below function doesn't exist. - if ( function_exists( 'generate_add_login_attribution' ) ) { - return; - } - - $options = array( - '%current_year%', - '%copy%', - ); - - $replace = array( - date( 'Y' ), // phpcs:ignore -- prefer date(). - '©', - ); - - $new_copyright = get_theme_mod( 'generate_copyright' ); - $new_copyright = str_replace( $options, $replace, get_theme_mod( 'generate_copyright' ) ); - - if ( get_theme_mod( 'generate_copyright' ) && '' !== get_theme_mod( 'generate_copyright' ) ) { - return do_shortcode( $new_copyright ); - } - - return $copyright; - - } -} - -if ( ! function_exists( 'generate_copyright_customizer_live_preview' ) ) { - add_action( 'customize_preview_init', 'generate_copyright_customizer_live_preview' ); - /** - * Add our live preview - */ - function generate_copyright_customizer_live_preview() { - wp_enqueue_script( - 'generate-copyright-customizer', - plugin_dir_url( __FILE__ ) . 'js/customizer.js', - array( 'jquery', 'customize-preview' ), - GENERATE_COPYRIGHT_VERSION, - true - ); - } -} - -if ( ! function_exists( 'generate_update_copyright' ) ) { - add_action( 'admin_init', 'generate_update_copyright' ); - /** - * Our copyright use to have it's own setting - * If we have the old setting, move it into our theme_mod - */ - function generate_update_copyright() { - // If we already have a custom logo, bail. - if ( get_theme_mod( 'generate_copyright' ) ) { - return; - } - - // Get the old logo value. - $old_value = get_option( 'gen_custom_copyright' ); - - // If there's no old value, bail. - if ( empty( $old_value ) ) { - return; - } - - // Now let's update the new logo setting with our ID. - set_theme_mod( 'generate_copyright', $old_value ); - - // Got our custom logo? Time to delete the old value. - if ( get_theme_mod( 'generate_copyright' ) ) { - delete_option( 'gen_custom_copyright' ); - } - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/copyright/functions/js/customizer.js b/wp-content/upgrade-temp-backup/plugins/gp-premium/copyright/functions/js/customizer.js deleted file mode 100644 index fdd64115..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/copyright/functions/js/customizer.js +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Theme Customizer enhancements for a better user experience. - * - * Contains handlers to make Theme Customizer preview reload changes asynchronously. - */ - -( function( $ ) { - // Update the site title in real time... - wp.customize( 'generate_copyright', function( value ) { - value.bind( function( newval ) { - if ( $( '.copyright-bar' ).length ) { - $( '.copyright-bar' ).html( newval ); - } else { - $( '.inside-site-info' ).html( newval ); - } - } ); - } ); -}( jQuery ) ); diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/copyright/generate-copyright.php b/wp-content/upgrade-temp-backup/plugins/gp-premium/copyright/generate-copyright.php deleted file mode 100644 index 2b9ce0b3..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/copyright/generate-copyright.php +++ /dev/null @@ -1,20 +0,0 @@ -ID, '_generate-disable-header', true ); - $disable_nav = get_post_meta( $post->ID, '_generate-disable-nav', true ); - $disable_secondary_nav = get_post_meta( $post->ID, '_generate-disable-secondary-nav', true ); - $disable_post_image = get_post_meta( $post->ID, '_generate-disable-post-image', true ); - $disable_headline = get_post_meta( $post->ID, '_generate-disable-headline', true ); - $disable_footer = get_post_meta( $post->ID, '_generate-disable-footer', true ); - } - - $return = ''; - - if ( ! empty( $disable_header ) && false !== $disable_header ) { - $return = '.site-header {display:none}'; - } - - if ( ! empty( $disable_nav ) && false !== $disable_nav ) { - $return .= '#site-navigation,.navigation-clone, #mobile-header {display:none !important}'; - } - - if ( ! empty( $disable_secondary_nav ) && false !== $disable_secondary_nav ) { - $return .= '#secondary-navigation {display:none}'; - } - - if ( ! empty( $disable_post_image ) && false !== $disable_post_image ) { - $return .= '.generate-page-header, .page-header-image, .page-header-image-single {display:none}'; - } - - $need_css_removal = true; - - if ( defined( 'GENERATE_VERSION' ) && version_compare( GENERATE_VERSION, '3.0.0-alpha.1', '>=' ) ) { - $need_css_removal = false; - } - - if ( $need_css_removal && ! empty( $disable_headline ) && false !== $disable_headline && ! is_single() ) { - $return .= '.entry-header {display:none} .page-content, .entry-content, .entry-summary {margin-top:0}'; - } - - if ( ! empty( $disable_footer ) && false !== $disable_footer ) { - $return .= '.site-footer {display:none}'; - } - - return $return; - } -} - -if ( ! function_exists( 'generate_de_scripts' ) ) { - add_action( 'wp_enqueue_scripts', 'generate_de_scripts', 50 ); - /** - * Enqueue scripts and styles - */ - function generate_de_scripts() { - wp_add_inline_style( 'generate-style', generate_disable_elements() ); - } -} - -if ( ! function_exists( 'generate_add_de_meta_box' ) ) { - add_action( 'add_meta_boxes', 'generate_add_de_meta_box', 50 ); - /** - * Generate the layout metabox. - * - * @since 0.1 - */ - function generate_add_de_meta_box() { - // Set user role - make filterable. - $allowed = apply_filters( 'generate_metabox_capability', 'edit_theme_options' ); - - // If not an administrator, don't show the metabox. - if ( ! current_user_can( $allowed ) ) { - return; - } - - if ( defined( 'GENERATE_LAYOUT_META_BOX' ) ) { - return; - } - - $args = array( 'public' => true ); - $post_types = get_post_types( $args ); - foreach ( $post_types as $type ) { - if ( 'attachment' !== $type ) { - add_meta_box( - 'generate_de_meta_box', - __( 'Disable Elements', 'gp-premium' ), - 'generate_show_de_meta_box', - $type, - 'side', - 'default' - ); - } - } - } -} - -if ( ! function_exists( 'generate_show_de_meta_box' ) ) { - /** - * Outputs the content of the metabox. - * - * @param object $post The post object. - */ - function generate_show_de_meta_box( $post ) { - wp_nonce_field( basename( __FILE__ ), 'generate_de_nonce' ); - $stored_meta = get_post_meta( $post->ID ); - $stored_meta['_generate-disable-header'][0] = ( isset( $stored_meta['_generate-disable-header'][0] ) ) ? $stored_meta['_generate-disable-header'][0] : ''; - $stored_meta['_generate-disable-nav'][0] = ( isset( $stored_meta['_generate-disable-nav'][0] ) ) ? $stored_meta['_generate-disable-nav'][0] : ''; - $stored_meta['_generate-disable-secondary-nav'][0] = ( isset( $stored_meta['_generate-disable-secondary-nav'][0] ) ) ? $stored_meta['_generate-disable-secondary-nav'][0] : ''; - $stored_meta['_generate-disable-post-image'][0] = ( isset( $stored_meta['_generate-disable-post-image'][0] ) ) ? $stored_meta['_generate-disable-post-image'][0] : ''; - $stored_meta['_generate-disable-headline'][0] = ( isset( $stored_meta['_generate-disable-headline'][0] ) ) ? $stored_meta['_generate-disable-headline'][0] : ''; - $stored_meta['_generate-disable-footer'][0] = ( isset( $stored_meta['_generate-disable-footer'][0] ) ) ? $stored_meta['_generate-disable-footer'][0] : ''; - $stored_meta['_generate-disable-top-bar'][0] = ( isset( $stored_meta['_generate-disable-top-bar'][0] ) ) ? $stored_meta['_generate-disable-top-bar'][0] : ''; - ?> - -

-

- - - - - - - - - - - - - - - - - -
-

- - ID, '_generate-disable-top-bar', true ); - $disable_header = get_post_meta( $post->ID, '_generate-disable-header', true ); - $disable_mobile_header = get_post_meta( $post->ID, '_generate-disable-mobile-header', true ); - $disable_nav = get_post_meta( $post->ID, '_generate-disable-nav', true ); - $disable_headline = get_post_meta( $post->ID, '_generate-disable-headline', true ); - $disable_footer = get_post_meta( $post->ID, '_generate-disable-footer', true ); - } - - // Remove the top bar. - if ( ! empty( $disable_top_bar ) && false !== $disable_top_bar && function_exists( 'generate_top_bar' ) ) { - remove_action( 'generate_before_header', 'generate_top_bar', 5 ); - remove_action( 'generate_inside_secondary_navigation', 'generate_secondary_nav_top_bar_widget', 5 ); - } - - // Remove the header. - if ( ! empty( $disable_header ) && false !== $disable_header && function_exists( 'generate_construct_header' ) ) { - remove_action( 'generate_header', 'generate_construct_header' ); - } - - // Remove the mobile header. - if ( ! empty( $disable_mobile_header ) && false !== $disable_mobile_header && function_exists( 'generate_menu_plus_mobile_header' ) ) { - remove_action( 'generate_after_header', 'generate_menu_plus_mobile_header', 5 ); - } - - // Remove the navigation. - if ( ! empty( $disable_nav ) && false !== $disable_nav && function_exists( 'generate_get_navigation_location' ) ) { - add_filter( 'generate_navigation_location', '__return_false', 20 ); - add_filter( 'generate_disable_mobile_header_menu', '__return_true' ); - } - - // Remove the title. - if ( ! empty( $disable_headline ) && false !== $disable_headline && function_exists( 'generate_show_title' ) ) { - add_filter( 'generate_show_title', '__return_false' ); - } - - // Remove the footer. - if ( ! empty( $disable_footer ) && false !== $disable_footer ) { - if ( function_exists( 'generate_construct_footer_widgets' ) ) { - remove_action( 'generate_footer', 'generate_construct_footer_widgets', 5 ); - } - - if ( function_exists( 'generate_construct_footer' ) ) { - remove_action( 'generate_footer', 'generate_construct_footer' ); - } - } - } -} - -add_action( 'generate_layout_disable_elements_section', 'generate_premium_disable_elements_options' ); -/** - * Add the meta box options to the Layout meta box in the new GP - * - * @since 1.4 - * @param array $stored_meta Existing meta data. - */ -function generate_premium_disable_elements_options( $stored_meta ) { - $stored_meta['_generate-disable-header'][0] = ( isset( $stored_meta['_generate-disable-header'][0] ) ) ? $stored_meta['_generate-disable-header'][0] : ''; - $stored_meta['_generate-disable-mobile-header'][0] = ( isset( $stored_meta['_generate-disable-mobile-header'][0] ) ) ? $stored_meta['_generate-disable-mobile-header'][0] : ''; - $stored_meta['_generate-disable-nav'][0] = ( isset( $stored_meta['_generate-disable-nav'][0] ) ) ? $stored_meta['_generate-disable-nav'][0] : ''; - $stored_meta['_generate-disable-secondary-nav'][0] = ( isset( $stored_meta['_generate-disable-secondary-nav'][0] ) ) ? $stored_meta['_generate-disable-secondary-nav'][0] : ''; - $stored_meta['_generate-disable-post-image'][0] = ( isset( $stored_meta['_generate-disable-post-image'][0] ) ) ? $stored_meta['_generate-disable-post-image'][0] : ''; - $stored_meta['_generate-disable-headline'][0] = ( isset( $stored_meta['_generate-disable-headline'][0] ) ) ? $stored_meta['_generate-disable-headline'][0] : ''; - $stored_meta['_generate-disable-footer'][0] = ( isset( $stored_meta['_generate-disable-footer'][0] ) ) ? $stored_meta['_generate-disable-footer'][0] : ''; - $stored_meta['_generate-disable-top-bar'][0] = ( isset( $stored_meta['_generate-disable-top-bar'][0] ) ) ? $stored_meta['_generate-disable-top-bar'][0] : ''; - ?> -
- - - - - - - - - - - - - - - - - - - - - -
- array('lodash', 'react', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-dom-ready', 'wp-edit-post', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-plugins', 'wp-server-side-render'), 'version' => 'cf85acaca6a9b96dc3a3'); diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/dist/block-elements.css b/wp-content/upgrade-temp-backup/plugins/gp-premium/dist/block-elements.css deleted file mode 100644 index c1ba6a46..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/dist/block-elements.css +++ /dev/null @@ -1,7 +0,0 @@ -.inline-post-meta-area.block-editor-block-list__layout,.inline-post-meta-area>.gb-inside-container.block-editor-block-list__layout,.inline-post-meta-area>.gb-inside-container>.block-editor-inner-blocks>.block-editor-block-list__layout{align-items:center;display:flex}.inline-post-meta-area.block-editor-block-list__layout>.wp-block.block-list-appender,.inline-post-meta-area>.gb-inside-container.block-editor-block-list__layout>.wp-block.block-list-appender,.inline-post-meta-area>.gb-inside-container>.block-editor-inner-blocks>.block-editor-block-list__layout>.wp-block.block-list-appender{margin-left:20px}.inline-post-meta-area.block-editor-block-list__layout>.wp-block-image,.inline-post-meta-area>.gb-inside-container.block-editor-block-list__layout>.wp-block-image,.inline-post-meta-area>.gb-inside-container>.block-editor-inner-blocks>.block-editor-block-list__layout>.wp-block-image{line-height:0}.inline-post-meta-area.block-editor-block-list__layout>.wp-block-image figcaption,.inline-post-meta-area>.gb-inside-container.block-editor-block-list__layout>.wp-block-image figcaption,.inline-post-meta-area>.gb-inside-container>.block-editor-inner-blocks>.block-editor-block-list__layout>.wp-block-image figcaption{display:none}.inline-post-meta-area .wp-block{margin-left:0;margin-right:0}.gpp-dynamic-container-bg-dropdown .components-popover__content{width:275px}.gpp-dynamic-container-bg-dropdown .components-popover__content .components-base-control:not(:last-child){margin-bottom:20px}.gpp-dynamic-container-bg-dropdown .components-popover__content .components-base-control:last-child .components-base-control__field{margin-bottom:0}.gpp-dynamic-container-bg-dropdown .components-popover__content .components-base-control:last-child .components-base-control__help{margin-top:3px} -.gpp-dynamic-headline-text-dropdown .components-popover__content{width:275px}.gpp-dynamic-headline-text-dropdown .components-popover__content .components-base-control:not(:last-child){margin-bottom:20px}.gpp-dynamic-headline-text-dropdown .components-popover__content .components-base-control:last-child .components-base-control__field{margin-bottom:0}.gpp-dynamic-headline-text-dropdown .components-popover__content .components-base-control:last-child .components-base-control__help{margin-top:3px}.gpp-blocks-dynamic-text-replace-field{display:none}.gpp-block-dynamic-year .components-base-control__help{margin-top:2px} -.wp-block[data-type="generatepress/dynamic-content"]{margin-bottom:0;margin-top:0} -.wp-block[data-type="generatepress/dynamic-image"]{color:#fff;margin-bottom:0;margin-top:0}.wp-block[data-type="generatepress/dynamic-image"] .components-gpp-dynamic-image-placeholder__label{align-items:center;bottom:0;color:#fff;display:flex;font-size:1em;justify-content:center;left:0;position:absolute;right:0;top:0}.wp-block[data-type="generatepress/dynamic-image"] .components-gpp-dynamic-image-placeholder__label>.gpp-dynamic-featured-image__label{margin-left:10px}.wp-block[data-type="generatepress/dynamic-image"] .gpp-dynamic-image-placeholder{background:#000;vertical-align:middle}.wp-block[data-type="generatepress/dynamic-image"] .components-placeholder{width:100%}.wp-block[data-type="generatepress/dynamic-image"] .gpp-dynamic-image-preview{display:inline-block;position:relative}.wp-block[data-type="generatepress/dynamic-image"] .dynamic-author-image-rounded{border-radius:100%} -.components-generatepress-units-control-header__units{align-items:center;display:flex;justify-content:space-between;margin-bottom:5px}.components-generatepress-control__units .components-generatepress-control-buttons__units button.components-button{background:#fff;border:0;border-radius:0!important;box-shadow:none!important;color:#929da7;font-size:10px;height:auto;line-height:20px;padding:0 5px;position:relative;text-align:center;text-shadow:none}.components-generatepress-control__units .components-generatepress-control-buttons__units button.components-button.is-primary{background:#fff!important;color:#000!important;cursor:default;font-weight:700;z-index:1} -.editor-styles-wrapper .is-root-container>.wp-block{margin-left:auto;margin-right:auto;max-width:var(--gp-block-element-width)}.left-sidebar-block-type div:not(.block-editor-inner-blocks)>.block-editor-block-list__layout,.right-sidebar-block-type div:not(.block-editor-inner-blocks)>.block-editor-block-list__layout{padding:10px}.gpp-block-element-panel>.components-base-control{margin-bottom:20px}.gpp-block-element-panel .components-notice,.gpp-block-element-panel .components-notice .components-notice__content{margin:0}.gpp-element-panel-label .components-panel__body-toggle.components-button{display:flex;flex-direction:row-reverse;justify-content:flex-end}.gpp-element-panel-label .components-panel__body-toggle.components-button svg.components-panel__icon{margin:0 10px 0 0}button.gpp-block-elements-template-button{background:#fff;border:1px solid #ddd;border-radius:5px;cursor:pointer;margin:0 0 10px;padding:5px}button.gpp-block-elements-template-button:hover{border-color:var(--wp-admin-theme-color)}button.gpp-block-elements-template-button .gpp-block-template-label{color:#888;font-size:13px;padding:5px}.element-has-parent #generate_premium_elements{display:none}.gpp-block-element-template-panel{background:#fafafa} -.gp-select-search .select-search-container{--select-search-background:#fff;--select-search-border:#949494;--select-search-selected:var(--wp-admin-theme-color);--select-search-text:#2c3338;--select-search-subtle-text:#6c6f85;--select-search-inverted-text:var(--select-search-background);--select-search-highlight:#eff1f5;box-sizing:border-box;color:var(--select-search-text);font-family:var(--select-search-font);position:relative;width:100%}.gp-select-search .select-search-container *,.gp-select-search .select-search-container :after,.gp-select-search .select-search-container :before{box-sizing:inherit}.gp-select-search .select-search-input{-webkit-font-smoothing:antialiased;-webkit-appearance:none;background:var(--select-search-background) url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M5%206l5%205%205-5%202%201-7%207-7-7%202-1z%22%20fill%3D%22%23555%22%2F%3E%3C%2Fsvg%3E") no-repeat right 5px top 55%;background-size:13px 13px;border:1px solid var(--select-search-border);border-radius:3px;color:var(--select-search-text);display:block;font-size:13px;height:30px;letter-spacing:.01rem;line-height:30px;outline:none;padding:0 26px 0 8px;position:relative;text-align:left;text-overflow:ellipsis;width:100%;z-index:1}.gp-select-search .select-search-is-multiple .select-search-input{border-radius:3px 3px 0 0;margin-bottom:-2px}.gp-select-search .select-search-input::-webkit-search-cancel-button,.gp-select-search .select-search-input::-webkit-search-decoration,.gp-select-search .select-search-input::-webkit-search-results-button,.gp-select-search .select-search-input::-webkit-search-results-decoration{-webkit-appearance:none}.gp-select-search .select-search-input[readonly]{cursor:pointer}.gp-select-search .select-search-is-disabled .select-search-input{cursor:not-allowed}.gp-select-search .select-search-container:not(.select-search-is-disabled) .select-search-input:hover,.gp-select-search .select-search-container:not(.select-search-is-disabled).select-search-has-focus .select-search-input{border-color:var(--select-search-selected)}.gp-select-search .select-search-select{background:var(--select-search-background);border:1px solid var(--select-search-border);box-shadow:0 .0625rem .125rem rgba(0,0,0,.15);max-height:360px;overflow:auto}.gp-select-search .select-search-container:not(.select-search-is-multiple) .select-search-select{border-radius:3px;display:none;left:0;position:absolute;right:0;top:35px;z-index:2}.gp-select-search .select-search-container:not(.select-search-is-multiple).select-search-has-focus .select-search-select{display:block}.gp-select-search .select-search-has-focus .select-search-select{border-color:var(--select-search-selected)}.gp-select-search .select-search-options{list-style:none}.gp-select-search .select-search-not-found,.gp-select-search .select-search-option{-webkit-font-smoothing:antialiased;background:var(--select-search-background);border:none;color:var(--select-search-text);cursor:pointer;display:block;font-family:monospace;font-size:10px;height:30px;letter-spacing:.01rem;outline:none;padding:0 16px;text-align:left;width:100%}.gp-select-search .select-search-option:disabled{background:transparent!important;cursor:not-allowed;opacity:.5}.gp-select-search .select-search-is-highlighted,.gp-select-search .select-search-option:not(.select-search-is-selected):hover{background:var(--select-search-highlight)}.gp-select-search .select-search-is-selected{color:var(--select-search-selected);font-weight:700}.gp-select-search .select-search-group-header{font-size:12px;font-weight:700;letter-spacing:.1rem;padding:10px 16px;text-transform:uppercase} diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/dist/block-elements.js b/wp-content/upgrade-temp-backup/plugins/gp-premium/dist/block-elements.js deleted file mode 100644 index 57b22635..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/dist/block-elements.js +++ /dev/null @@ -1,3 +0,0 @@ -!function(){var e={184:function(e,t){var n;!function(){"use strict";var i={}.hasOwnProperty;function a(){for(var e=[],t=0;t .gb-inside-container > .block-editor-inner-blocks > .block-editor-block-list__layout";return void 0!==s&&(d=s?".gb-container-"+a+".inline-post-meta-area > .gb-inside-container":".gb-container-"+a+".inline-post-meta-area"),r&&(o(e,d,{"justify-content":p}),"generateblocks.editor.tabletCSS"===(0,l.currentFilter)()&&o(e,d,{"justify-content":c}),"generateblocks.editor.mobileCSS"===(0,l.currentFilter)()&&o(e,d,{"justify-content":g})),e}function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n0?n({className:t.join(" ")}):n({className:""}),"generateblocks/headline"===i){var o=(0,p.__)("Hello World","gp-premium");"post-date"===e?o=(0,p.__)("Post date","gp-premium"):"post-author"===e?o=(0,p.__)("Post author name","gp-premium"):"terms"===e?o=(0,p.__)("Terms","gp-premium"):"comments-number"===e?o=(0,p.__)("Comments number","gp-premium"):"post-meta"===e?o=(0,p.__)("Post meta","gp-premium"):"user-meta"===e?o=(0,p.__)("User meta","gp-premium"):"term-meta"===e&&(o=(0,p.__)("Term meta","gp-premium")),n({content:o})}}}),""!==o&&(0,a.createElement)(c.Fragment,null,(0,a.createElement)(g.TextControl,{className:"gpp-blocks-dynamic-text-replace-field",type:"text",value:l}),"post-date"===o&&(0,a.createElement)(c.Fragment,null,(0,a.createElement)(g.SelectControl,{label:(0,p.__)("Date type","gp-premium"),value:T,options:[{label:(0,p.__)("Published date","gp-premim"),value:"published-date"},{label:(0,p.__)("Updated date","gp-premium"),value:"updated-date"}],onChange:function(e){n({gpDynamicDateType:e,gpDynamicTextBefore:"",gpDynamicUpdatedDateBefore:""})}}),"published-date"===T&&(0,a.createElement)(g.ToggleControl,{label:(0,p.__)("Replace with updated date","gp-premium"),checked:!!b,onChange:function(e){n({gpDynamicDateUpdated:e})}})),"terms"===o&&(0,a.createElement)(c.Fragment,null,(0,a.createElement)(g.SelectControl,{label:(0,p.__)("Taxonomy","gp-premium"),value:s,options:D,onChange:function(e){n({gpDynamicTextTaxonomy:e})}}),"generateblocks/headline"===i&&(0,a.createElement)(c.Fragment,null,(0,a.createElement)(g.TextControl,{label:(0,p.__)("Term separator","gp-premium"),type:"text",value:d,onChange:function(e){n({gpDynamicTextTaxonomySeparator:e})}}))),"comments-number"===o&&(0,a.createElement)(c.Fragment,null,(0,a.createElement)(g.TextControl,{label:(0,p.__)("No comments text","gp-premium"),type:"text",value:x,onChange:function(e){n({gpDynamicNoCommentsText:e})}}),(0,a.createElement)(g.TextControl,{label:(0,p.__)("Singular comments text","gp-premium"),type:"text",value:h,onChange:function(e){n({gpDynamicSingleCommentText:e})}}),(0,a.createElement)(g.TextControl,{label:(0,p.__)("Plural comments text","gp-premium"),help:(0,p.__)("Use % in place of the number of comments","gp-premium"),type:"text",value:f,onChange:function(e){n({gpDynamicMultipleCommentsText:e})}})),("post-meta"===o||"term-meta"===o||"user-meta"===o)&&(0,a.createElement)(g.TextControl,{label:(0,p.__)("Meta field name","gp-premium"),type:"text",value:m,onChange:function(e){n({gpDynamicTextCustomField:e})}}),"generateblocks/headline"===i&&(0,a.createElement)(c.Fragment,null,(0,a.createElement)(g.TextControl,{label:B,type:"text",value:u,onChange:function(e){n({gpDynamicTextBefore:e})}}),"post-date"===o&&!!b&&"published-date"===T&&(0,a.createElement)(g.TextControl,{label:(0,p.__)("Updated date before text","gp-premium"),type:"text",value:C,onChange:function(e){n({gpDynamicUpdatedDateBefore:e})}}))),S.length>1&&(0,a.createElement)(c.Fragment,null,(0,a.createElement)(g.SelectControl,{label:(0,p.__)("Dynamic link type","gp-premium"),value:y,options:S,onChange:function(e){"generateblocks/button"===i&&n(e?{gpDynamicLinkType:e,hasUrl:!0,url:"#"}:{gpDynamicLinkType:e,hasUrl:!1,url:""}),"generateblocks/headline"===i&&n({gpDynamicLinkType:e})}}),("post-meta"===y||"term-meta"===y||"user-meta"===y)&&(0,a.createElement)(g.TextControl,{label:(0,p.__)("Meta field name","gp-premium"),type:"text",value:_,onChange:function(e){n({gpDynamicLinkCustomField:e})}})),I&&(0,a.createElement)(c.Fragment,null,(0,a.createElement)(g.SelectControl,{label:(0,p.__)("Source","gp-premium"),value:r,options:[{label:(0,p.__)("Current post","gp-premium"),value:"current-post"},{label:(0,p.__)("Next post","gp-premium"),value:"next-post"},{label:(0,p.__)("Previous post","gp-premium"),value:"previous-post"}],onChange:function(e){n({gpDynamicSource:e})}}),("next-post"===r||"previous-post"===r)&&(0,a.createElement)(c.Fragment,null,(0,a.createElement)(g.ToggleControl,{label:(0,p.__)("In same term","gp-premium"),help:(0,p.__)("Check for posts with the same term as the current post.","gp-premim"),checked:!!k,onChange:function(e){n({gpDynamicSourceInSameTerm:e})}}),!!k&&(0,a.createElement)(g.TextControl,{label:(0,p.__)("Taxonomy","gp-premium"),help:(0,p.__)("The taxonomy to check if in the same term.","gp-premim"),type:"text",value:v,onChange:function(e){n({gpDynamicSourceInSameTermTaxonomy:e})}}))))}}]),o}(c.Component),E=L;function M(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function z(e){for(var t=1;tPrevious post title

\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"86e1ad46","element":"p","blockVersion":3,"typography":{"fontSize":"14px"},"spacing":{"marginBottom":"0px"},"gpDynamicTextType":"post-author","gpDynamicLinkType":"author-archives","gpDynamicTextReplace":"Author name","gpDynamicSource":"previous-post","gpDynamicTextBefore":"by "} --\x3e

Author name

\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"2540358d","isDynamic":true,"blockVersion":4,"display":"flex","flexDirection":"row-reverse","flexDirectionMobile":"row","alignItems":"center","columnGap":"20px","sizing":{"width":"50%","widthMobile":"100%","height":"","maxWidth":""},"typography":{"textAlignMobile":"left"},"spacing":{"paddingTop":"0px","paddingRight":"0px","paddingBottom":"0px","paddingLeft":"0px"},"gpRemoveContainerCondition":"no-next-post"} --\x3e \x3c!-- wp:generatepress/dynamic-image {"imageType":"featured-image","imageSource":"next-post","imageSize":"thumbnail","linkTo":"single-post","imageWidth":100,"imageHeight":100,"avatarSize":100} /--\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"daa456b5","isDynamic":true,"blockVersion":4,"sizing":{"width":"75%","widthMobile":"75%","height":"","maxWidth":""},"typography":{"textAlign":"right","textAlignMobile":"left"},"spacing":{"paddingTop":"0px","paddingRight":"0px","paddingBottom":"0px","paddingLeft":"0px"}} --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"2883b2a4","element":"p","blockVersion":3,"spacing":{"marginBottom":"5px"},"gpDynamicTextType":"title","gpDynamicLinkType":"single-post","gpDynamicTextReplace":"Next post title","gpDynamicSource":"next-post"} --\x3e

Next post title

\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"3d2e07c6","element":"p","blockVersion":3,"typography":{"fontSize":"14px"},"spacing":{"marginBottom":"0px"},"gpDynamicTextType":"post-author","gpDynamicLinkType":"author-archives","gpDynamicTextReplace":"Author name","gpDynamicSource":"next-post","gpDynamicTextBefore":"by "} --\x3e

Author name

\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- /wp:generateblocks/container --\x3e',meta:[{key:"_generate_hook",value:"generate_after_do_template_part"},{key:"_generate_hook_priority",value:"1"},{key:"_generate_disable_post_navigation",value:!0},{key:"_generate_use_archive_navigation_container",value:!0}]},template_2:{label:(0,p._x)("Two columns with arrows","label","gp-premium"),thumbnail:"post-navigation-arrows-1.jpg",content:'\x3c!-- wp:generateblocks/container {"uniqueId":"d1dd99b1","isDynamic":true,"blockVersion":4,"sizing":{"height":"","maxWidth":""},"spacing":{"paddingTop":"20px","paddingRight":"0px","paddingBottom":"20px","paddingLeft":"0px"}} --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"8878e700","isDynamic":true,"blockVersion":4,"display":"flex","flexDirection":"row","flexDirectionMobile":"column","alignItems":"center","justifyContent":"space-between","rowGapMobile":"10px","sizing":{"maxWidth":""},"useGlobalMaxWidth":true,"spacing":{"marginRight":"auto","marginLeft":"auto"}} --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"9c89f761","isDynamic":true,"blockVersion":4,"display":"flex","flexDirection":"row","alignItems":"center","columnGap":"30px","sizing":{"width":"50%","widthMobile":"100%","height":"","maxWidth":""},"spacing":{"paddingTop":"","paddingRight":"","paddingBottom":"","paddingLeft":"","marginBottomMobile":"10px"},"gpRemoveContainerCondition":"no-previous-post"} --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"9cf413a8","isDynamic":true,"blockVersion":4,"sizing":{"width":"","widthTablet":"","widthMobile":"","height":"","maxWidth":""},"spacing":{"paddingTop":"","paddingRight":"","paddingBottom":"","paddingLeft":""}} --\x3e \x3c!-- wp:generateblocks/button {"uniqueId":"bec8d56e","hasUrl":true,"blockVersion":4,"display":"inline-flex","alignItems":"center","justifyContent":"center","typography":{"textAlign":"center"},"spacing":{"paddingTop":"10px","paddingRight":"10px","paddingBottom":"10px","paddingLeft":"10px"},"backgroundColor":"#000000","backgroundColorHover":"#abb8c3","textColor":"#ffffff","hasIcon":true,"removeText":true,"iconStyles":{"width":"1.5em","height":"1.5em","paddingRight":"0.5em"},"gpDynamicLinkType":"single-post","gpDynamicSource":"previous-post"} --\x3e \x3c!-- /wp:generateblocks/button --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"625f3305","isDynamic":true,"blockVersion":4,"sizing":{"width":"","widthTablet":"","widthMobile":"","height":"","maxWidth":""},"spacing":{"paddingTop":"","paddingRight":"","paddingBottom":"","paddingLeft":""}} --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"a6f36397","element":"p","blockVersion":3,"spacing":{"marginBottom":"0px"},"gpDynamicTextType":"title","gpDynamicLinkType":"single-post","gpDynamicTextReplace":"Previous post title","gpDynamicSource":"previous-post"} --\x3e

Previous post title

\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"3d262c0b","element":"p","blockVersion":3,"typography":{"fontSize":"14px"},"spacing":{"marginBottom":"0px"},"gpDynamicTextType":"post-date","gpDynamicTextReplace":"Date","gpDynamicSource":"previous-post","gpDynamicDateUpdated":true} --\x3e

Date

\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"5d70717c","isDynamic":true,"blockVersion":4,"display":"flex","flexDirection":"row","alignItems":"center","justifyContent":"flex-end","justifyContentMobile":"flex-start","columnGap":"30px","sizing":{"width":"50%","widthMobile":"100%","height":"","maxWidth":""},"typography":{"textAlign":"right","textAlignMobile":"left"},"spacing":{"paddingTop":"0px","paddingRight":"0px","paddingBottom":"0px","paddingLeft":"0px"},"gpRemoveContainerCondition":"no-next-post"} --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"78f3ead4","isDynamic":true,"blockVersion":4,"sizing":{"width":"","widthTablet":"","widthMobile":"","height":"","maxWidth":""},"spacing":{"paddingTop":"0px","paddingRight":"0px","paddingBottom":"0px","paddingLeft":"0px"}} --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"643cf12f","element":"p","blockVersion":3,"spacing":{"marginBottom":"0px"},"gpDynamicTextType":"title","gpDynamicLinkType":"single-post","gpDynamicTextReplace":"Next post title","gpDynamicSource":"next-post"} --\x3e

Next post title

\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"8ac35083","element":"p","blockVersion":3,"typography":{"fontSize":"14px"},"spacing":{"marginBottom":"0px"},"gpDynamicTextType":"post-date","gpDynamicTextReplace":"Date","gpDynamicSource":"next-post","gpDynamicDateUpdated":true} --\x3e

Date

\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"780c810b","isDynamic":true,"blockVersion":4,"orderMobile":-1,"sizing":{"width":"","widthTablet":"","widthMobile":"","height":"","maxWidth":""},"spacing":{"paddingTop":"0px","paddingRight":"0px","paddingBottom":"0px","paddingLeft":"0px"}} --\x3e \x3c!-- wp:generateblocks/button {"uniqueId":"122d9fa4","hasUrl":true,"blockVersion":4,"display":"inline-flex","alignItems":"center","justifyContent":"center","typography":{"textAlign":"center"},"spacing":{"paddingTop":"10px","paddingRight":"10px","paddingBottom":"10px","paddingLeft":"10px"},"backgroundColor":"#000000","backgroundColorHover":"#abb8c3","textColor":"#ffffff","hasIcon":true,"removeText":true,"iconStyles":{"width":"1.5em","height":"1.5em","paddingRight":"0.5em"},"gpDynamicLinkType":"single-post","gpDynamicSource":"next-post"} --\x3e \x3c!-- /wp:generateblocks/button --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- /wp:generateblocks/container --\x3e',meta:[{key:"_generate_hook",value:"generate_after_do_template_part"},{key:"_generate_hook_priority",value:"1"},{key:"_generate_disable_post_navigation",value:!0},{key:"_generate_use_archive_navigation_container",value:!0}]},template_3:{label:(0,p._x)("Two columns with background overlays","label","gp-premium"),thumbnail:"post-navigation-overlay.jpg",content:'\x3c!-- wp:generateblocks/container {"uniqueId":"aadd0a6f","isDynamic":true,"blockVersion":4,"sizing":{"height":"","maxWidth":""},"spacing":{"paddingTop":"0px","paddingRight":"0px","paddingBottom":"0px","paddingLeft":"0px"},"paddingSyncUnits":true} --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"3642451a","isDynamic":true,"blockVersion":4,"display":"flex","flexDirection":"row","sizing":{"maxWidth":""},"useGlobalMaxWidth":true,"spacing":{"marginRight":"auto","marginLeft":"auto"}} --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"59edc08b","backgroundColor":"#000000","textColor":"#ffffff","linkColor":"#ffffff","linkColorHover":"#e3e3e3","bgImage":{"id":"","image":{"url":"#dynamic-background-image"}},"bgOptions":{"selector":"pseudo-element","opacity":0.4,"overlay":false,"position":"center center","size":"cover","repeat":"no-repeat","attachment":""},"innerZindex":1,"isDynamic":true,"blockVersion":4,"position":"relative","overflowX":"hidden","overflowY":"hidden","sizing":{"width":"50%","widthMobile":"100%","height":"","maxWidth":""},"spacing":{"paddingTop":"40px","paddingRight":"40px","paddingBottom":"40px","paddingLeft":"40px"},"paddingSyncUnits":true,"gpDynamicImageBg":"featured-image","gpDynamicSource":"previous-post","gpRemoveContainerCondition":"no-previous-post"} --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"a510c6c2","isDynamic":true,"blockVersion":4,"position":"relative","zindex":1,"sizing":{"maxWidth":""},"useGlobalMaxWidth":true,"spacing":{"marginRight":"auto","marginLeft":"auto"}} --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"8d3d4c12","element":"p","blockVersion":3,"display":"inline-block","typography":{"fontSize":"14px","textTransform":"uppercase"},"spacing":{"paddingTop":"5px","paddingRight":"10px","paddingBottom":"5px","paddingLeft":"10px"},"inlineWidth":true,"backgroundColor":"#cf2e2e"} --\x3e

Previous

\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"352592d1","element":"h3","blockVersion":3,"typography":{"fontSize":"25px"},"spacing":{"marginBottom":"0px"},"className":"","gpDynamicTextType":"title","gpDynamicLinkType":"single-post","gpDynamicTextReplace":"Hello World","gpDynamicSource":"previous-post"} --\x3e

Hello World

\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"993a41e4","backgroundColor":"#000000","textColor":"#ffffff","linkColor":"#ffffff","linkColorHover":"#e3e3e3","bgImage":{"id":"","image":{"url":"#dynamic-background-image"}},"bgOptions":{"selector":"pseudo-element","opacity":0.4,"overlay":false,"position":"center center","size":"cover","repeat":"no-repeat","attachment":""},"innerZindex":1,"isDynamic":true,"blockVersion":4,"position":"relative","overflowX":"hidden","overflowY":"hidden","sizing":{"width":"50%","widthMobile":"100%","height":"","maxWidth":""},"spacing":{"paddingTop":"40px","paddingRight":"40px","paddingBottom":"40px","paddingLeft":"40px"},"paddingSyncUnits":true,"gpDynamicImageBg":"featured-image","gpDynamicSource":"next-post","gpRemoveContainerCondition":"no-next-post"} --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"ea84c30e","isDynamic":true,"blockVersion":4,"position":"relative","zindex":1,"sizing":{"maxWidth":""},"useGlobalMaxWidth":true,"spacing":{"marginRight":"auto","marginLeft":"auto"}} --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"49c8845f","element":"p","blockVersion":3,"display":"inline-block","typography":{"fontSize":"14px","textTransform":"uppercase"},"spacing":{"paddingTop":"5px","paddingRight":"10px","paddingBottom":"5px","paddingLeft":"10px"},"inlineWidth":true,"backgroundColor":"#cf2e2e"} --\x3e

Next

\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"6ba8079e","element":"h3","blockVersion":3,"typography":{"fontSize":"25px"},"spacing":{"marginBottom":"0px"},"className":"","gpDynamicTextType":"title","gpDynamicLinkType":"single-post","gpDynamicTextReplace":"Hello World","gpDynamicSource":"next-post"} --\x3e

Hello World

\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- /wp:generateblocks/container --\x3e',meta:[{key:"_generate_hook",value:"generate_after_do_template_part"},{key:"_generate_hook_priority",value:"1"},{key:"_generate_disable_post_navigation",value:!0},{key:"_generate_use_archive_navigation_container",value:!1}]},template_4:{label:(0,p._x)("Two columns with arrows","label","gp-premium"),thumbnail:"post-navigation-arrows-2.jpg",content:'\x3c!-- wp:generateblocks/container {"uniqueId":"96f5f0fa","innerContainer":"full","isDynamic":true,"blockVersion":4,"sizing":{"height":"","maxWidth":""},"spacing":{"paddingTop":"0px","paddingRight":"0px","paddingBottom":"0px","paddingLeft":"0px"},"paddingSyncUnits":true} --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"f9c8f86f","isDynamic":true,"blockVersion":4,"display":"flex","sizing":{"maxWidth":""},"spacing":{"marginRight":"auto","marginLeft":"auto"}} --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"5287d6da","backgroundColor":"#ffffff","isDynamic":true,"blockVersion":4,"display":"flex","flexDirection":"row-reverse","flexDirectionMobile":"column","justifyContent":"space-between","sizing":{"width":"50%","widthMobile":"100%","height":"","maxWidth":""},"spacing":{"paddingTop":"30px","paddingRight":"0px","paddingBottom":"25px","paddingLeft":"25px"},"gpRemoveContainerCondition":"no-previous-post"} --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"75cd654a","isDynamic":true,"blockVersion":4,"sizing":{"width":"","widthMobile":"100%","height":"","maxWidth":""},"typography":{"textAlignMobile":"right"},"spacing":{"paddingTop":"","paddingRight":"","paddingBottom":"","paddingLeft":""}} --\x3e \x3c!-- wp:generateblocks/button {"uniqueId":"6acb0e83","hasUrl":true,"blockVersion":4,"display":"inline-flex","alignItems":"center","justifyContent":"center","typography":{"textAlign":"center"},"spacing":{"paddingTop":"15px","paddingRight":"20px","paddingBottom":"15px","paddingLeft":"20px"},"backgroundColor":"#0366d6","backgroundColorHover":"#222222","textColor":"#ffffff","textColorHover":"#ffffff","hasIcon":true,"removeText":true,"iconStyles":{"width":"1em","height":"1em","paddingRight":"0.5em"},"gpDynamicLinkType":"single-post","gpDynamicSource":"previous-post"} --\x3e \x3c!-- /wp:generateblocks/button --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"eb3b7005","isDynamic":true,"blockVersion":4,"sizing":{"width":"","widthMobile":"100%","height":"","maxWidth":""},"typography":{},"spacing":{"paddingTop":"","paddingRight":"","paddingBottom":"","paddingLeft":"","paddingTopMobile":"","paddingRightMobile":"10px","paddingBottomMobile":"","paddingLeftMobile":"","marginTopMobile":"20px"}} --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"0a2d5bfc","element":"h3","blockVersion":3,"typography":{"textAlign":"left"},"spacing":{"marginBottom":"10px"},"textColor":"#000000","linkColor":"#000000","gpDynamicTextType":"title","gpDynamicLinkType":"single-post","gpDynamicTextReplace":"Hello World","gpDynamicSource":"previous-post"} --\x3e

Hello World

\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"164ae39e","element":"p","blockVersion":3,"display":"flex","alignItems":"center","typography":{"fontSize":"14px"},"spacing":{"marginBottom":"0px"},"hasIcon":true,"iconStyles":{"width":"1em","height":"1em","paddingRight":"0.5em"},"gpDynamicTextType":"comments-number","gpDynamicLinkType":"comments","gpDynamicTextReplace":"Comments number","gpDynamicSource":"previous-post"} --\x3e

Comments number

\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"7af8fa61","backgroundColor":"#0366d6","isDynamic":true,"blockVersion":4,"display":"flex","flexDirection":"row","flexDirectionMobile":"column","justifyContent":"space-between","sizing":{"width":"50%","widthMobile":"100%","height":"","maxWidth":""},"spacing":{"paddingTop":"30px","paddingRight":"25px","paddingBottom":"25px","paddingLeft":"0px"},"gpRemoveContainerCondition":"no-next-post"} --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"045e1698","isDynamic":true,"blockVersion":4,"sizing":{"width":"","widthMobile":"100%","height":"","maxWidth":""},"typography":{},"spacing":{"paddingTop":"","paddingRight":"","paddingBottom":"","paddingLeft":""}} --\x3e \x3c!-- wp:generateblocks/button {"uniqueId":"557abb73","hasUrl":true,"blockVersion":4,"display":"inline-flex","alignItems":"center","justifyContent":"center","typography":{"textAlign":"center"},"spacing":{"paddingTop":"15px","paddingRight":"20px","paddingBottom":"15px","paddingLeft":"20px"},"backgroundColor":"#ffffff","backgroundColorHover":"#222222","textColor":"#0693e3","textColorHover":"#ffffff","hasIcon":true,"removeText":true,"iconStyles":{"width":"1em","height":"1em","paddingRight":"0.5em"},"gpDynamicLinkType":"single-post","gpDynamicSource":"next-post"} --\x3e \x3c!-- /wp:generateblocks/button --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"9ad09f6f","isDynamic":true,"blockVersion":4,"sizing":{"width":"","widthMobile":"100%","height":"","maxWidth":""},"typography":{},"spacing":{"paddingTop":"","paddingRight":"","paddingBottom":"","paddingLeft":"","paddingLeftMobile":"10px","marginTopMobile":"20px"}} --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"9ba9e9d1","element":"h3","blockVersion":3,"typography":{},"spacing":{"marginBottom":"10px"},"textColor":"#ffffff","linkColor":"#ffffff","gpDynamicTextType":"title","gpDynamicLinkType":"single-post","gpDynamicTextReplace":"Hello World","gpDynamicSource":"next-post"} --\x3e

Hello World

\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"8ebf8dbe","element":"p","blockVersion":3,"display":"flex","alignItems":"center","typography":{"fontSize":"14px","textAlign":""},"spacing":{"marginBottom":"0px"},"textColor":"#ffffff","linkColor":"#ffffff","hasIcon":true,"iconStyles":{"width":"1em","height":"1em","paddingRight":"0.5em"},"gpDynamicTextType":"comments-number","gpDynamicLinkType":"comments","gpDynamicTextReplace":"Comments number","gpDynamicSource":"next-post"} --\x3e

Comments number

\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- /wp:generateblocks/container --\x3e',meta:[{key:"_generate_hook",value:"generate_after_do_template_part"},{key:"_generate_hook_priority",value:"1"},{key:"_generate_disable_post_navigation",value:!0},{key:"_generate_use_archive_navigation_container",value:!1}]},template_5:{label:(0,p._x)("Two columns with featured image offset","label","gp-premim"),thumbnail:"post-navigation-offset.jpg",content:'\x3c!-- wp:generateblocks/container {"uniqueId":"52018004","innerContainer":"full","isDynamic":true,"blockVersion":4,"sizing":{"height":"","maxWidth":""},"typography":{"textAlign":"right"},"spacing":{"paddingTop":"","paddingRight":"","paddingBottom":"","paddingLeft":"","marginRight":"30px","marginLeft":"30px","marginLeftTablet":"30px","marginRightMobile":"25px","marginLeftMobile":"25px"}} --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"e54982d5","isDynamic":true,"blockVersion":4,"sizing":{"maxWidth":""},"spacing":{"marginRight":"auto","marginLeft":"auto"}} --\x3e \x3c!-- wp:generateblocks/grid {"uniqueId":"7bdd6853","columns":4,"horizontalGap":0,"verticalGapMobile":0,"isDynamic":true,"blockVersion":3,"useLegacyRowGap":true} --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"4138dd74","isGrid":true,"gridId":"7bdd6853","bgImage":{"id":"","image":{"url":"#dynamic-background-image"}},"verticalAlignment":"center","isDynamic":true,"blockVersion":4,"display":"flex","flexDirection":"column","justifyContent":"center","sizing":{"width":"25%","widthTablet":"50%","widthMobile":"50%","height":"100%","maxWidth":""},"spacing":{"paddingTop":"0px","paddingRight":"0px","paddingBottom":"0px","paddingLeft":"0px"},"borders":{"borderBottomLeftRadius":"10px","borderTopLeftRadius":"10px","borderBottomLeftRadiusTablet":"0px","borderBottomLeftRadiusMobile":"0px","borderTopLeftRadiusMobile":"5px"},"gpDynamicImageBg":"featured-image","gpDynamicSource":"previous-post","gpRemoveContainerCondition":"no-previous-post"} --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"83fd48c9","isDynamic":true,"blockVersion":4,"typography":{"textAlign":"left"}} --\x3e \x3c!-- wp:generateblocks/button {"uniqueId":"a3aaad4c","hasUrl":true,"blockVersion":4,"display":"inline-flex","alignItems":"center","justifyContent":"center","typography":{"textAlign":"center"},"spacing":{"paddingTop":"15px","paddingRight":"15px","paddingBottom":"15px","paddingLeft":"15px","marginRight":"1.5em","marginLeft":"-1.5em"},"borders":{"borderTopWidth":"7px","borderTopStyle":"solid","borderTopColor":"#f9f9f9","borderRightWidth":"7px","borderRightStyle":"solid","borderRightColor":"#f9f9f9","borderBottomWidth":"7px","borderBottomStyle":"solid","borderBottomColor":"#f9f9f9","borderLeftWidth":"7px","borderLeftStyle":"solid","borderLeftColor":"#f9f9f9","borderTopRightRadius":"100%","borderBottomRightRadius":"100%","borderBottomLeftRadius":"100%","borderTopLeftRadius":"100%"},"backgroundColor":"#b5b5b5","backgroundColorHover":"#222222","textColor":"#ffffff","textColorHover":"#ffffff","hasIcon":true,"removeText":true,"iconStyles":{"width":"1em","height":"1em","widthMobile":"0.8em","heightMobile":"0.8em","paddingRight":"0.5em"},"gpDynamicLinkType":"single-post","gpDynamicSource":"previous-post"} --\x3e \x3c!-- /wp:generateblocks/button --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"18430adf","isGrid":true,"gridId":"7bdd6853","backgroundColor":"#ffffff","isDynamic":true,"blockVersion":4,"position":"relative","zindex":2,"sizing":{"width":"25%","widthTablet":"50%","widthMobile":"50%","height":"100%","maxWidth":""},"typography":{"textAlign":"center"},"spacing":{"paddingTop":"30px","paddingRight":"30px","paddingBottom":"30px","paddingLeft":"30px","marginRight":"10px","marginRightTablet":"0px","paddingTopMobile":"10px","paddingRightMobile":"10px","paddingBottomMobile":"10px","paddingLeftMobile":"10px","marginRightMobile":"0px"},"paddingSyncUnits":true,"borders":{"borderTopRightRadius":"10px","borderBottomRightRadius":"10px","borderBottomRightRadiusTablet":"0px","borderTopRightRadiusMobile":"5px","borderBottomRightRadiusMobile":"0px"},"gpDynamicImageBg":"featured-image","gpDynamicSource":"previous-post","gpRemoveContainerCondition":"no-previous-post"} --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"2acc62a4","element":"h3","blockVersion":3,"typography":{"fontSize":"25px","textAlign":"left","fontSizeMobile":"17px"},"spacing":{"paddingTop":"10px","paddingRight":"10px","paddingBottom":"10px","paddingLeft":"10px","marginBottom":"0em","marginLeft":"-4em","marginLeftMobile":"-3em"},"paddingSyncUnits":true,"borders":{"borderBottomLeftRadius":"10px","borderTopLeftRadius":"10px","borderTopRightRadiusMobile":"5px","borderBottomRightRadiusMobile":"5px","borderBottomLeftRadiusMobile":"5px","borderTopLeftRadiusMobile":"5px"},"backgroundColor":"#ffffff","textColor":"#000000","linkColor":"#000000","gpDynamicTextType":"title","gpDynamicLinkType":"single-post","gpDynamicTextReplace":"Hello World","gpDynamicSource":"previous-post"} --\x3e

Hello World

\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"ce9878f4","isGrid":true,"gridId":"7bdd6853","backgroundColor":"#ffffff","isDynamic":true,"blockVersion":4,"position":"relative","zindex":1,"sizing":{"width":"25%","widthTablet":"50%","widthMobile":"50%","height":"100%","maxWidth":""},"typography":{"textAlign":"center"},"spacing":{"paddingTop":"30px","paddingRight":"30px","paddingBottom":"30px","paddingLeft":"30px","marginLeft":"10px","marginLeftTablet":"0px","paddingTopMobile":"10px","paddingRightMobile":"10px","paddingBottomMobile":"10px","paddingLeftMobile":"10px","marginLeftMobile":"0px"},"paddingSyncUnits":true,"borders":{"borderBottomLeftRadius":"10px","borderTopLeftRadius":"10px","borderTopLeftRadiusTablet":"0px","borderBottomLeftRadiusMobile":"5px","borderTopLeftRadiusMobile":"0px"},"gpDynamicImageBg":"featured-image","gpDynamicSource":"next-post","gpRemoveContainerCondition":"no-next-post"} --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"9d97a37f","element":"h3","blockVersion":3,"typography":{"fontSize":"25px","textAlign":"right","fontSizeMobile":"17px"},"spacing":{"paddingTop":"10px","paddingRight":"10px","paddingBottom":"10px","paddingLeft":"10px","marginRight":"-4em","marginBottom":"0em","marginRightMobile":"-3em"},"paddingSyncUnits":true,"borders":{"borderTopRightRadius":"10px","borderBottomRightRadius":"10px","borderTopRightRadiusMobile":"5px","borderBottomRightRadiusMobile":"5px","borderBottomLeftRadiusMobile":"5px","borderTopLeftRadiusMobile":"5px"},"backgroundColor":"#ffffff","textColor":"#000000","linkColor":"#000000","gpDynamicTextType":"title","gpDynamicLinkType":"single-post","gpDynamicTextReplace":"Hello World","gpDynamicSource":"next-post"} --\x3e

Hello World

\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"6c856070","isGrid":true,"gridId":"7bdd6853","bgImage":{"id":"","image":{"url":"#dynamic-background-image"}},"verticalAlignment":"center","isDynamic":true,"blockVersion":4,"display":"flex","flexDirection":"column","justifyContent":"center","sizing":{"width":"25%","widthTablet":"50%","widthMobile":"50%","height":"100%","maxWidth":""},"spacing":{"paddingTop":"0px","paddingRight":"0px","paddingBottom":"0px","paddingLeft":"0px"},"borders":{"borderTopRightRadius":"10px","borderBottomRightRadius":"10px","borderTopRightRadiusTablet":"0px","borderTopRightRadiusMobile":"0px","borderBottomRightRadiusMobile":"5px"},"gpDynamicImageBg":"featured-image","gpDynamicSource":"next-post","gpRemoveContainerCondition":"no-next-post"} --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"be12f57c","isDynamic":true,"blockVersion":4} --\x3e \x3c!-- wp:generateblocks/button {"uniqueId":"139d60e4","hasUrl":true,"blockVersion":4,"display":"inline-flex","alignItems":"center","justifyContent":"center","typography":{"textAlign":"center"},"spacing":{"paddingTop":"15px","paddingRight":"15px","paddingBottom":"15px","paddingLeft":"15px","marginRight":"-1.5em","marginLeft":"1.5em"},"borders":{"borderTopWidth":"7px","borderTopStyle":"solid","borderTopColor":"#f9f9f9","borderRightWidth":"7px","borderRightStyle":"solid","borderRightColor":"#f9f9f9","borderBottomWidth":"7px","borderBottomStyle":"solid","borderBottomColor":"#f9f9f9","borderLeftWidth":"7px","borderLeftStyle":"solid","borderLeftColor":"#f9f9f9","borderTopRightRadius":"100%","borderBottomRightRadius":"100%","borderBottomLeftRadius":"100%","borderTopLeftRadius":"100%"},"backgroundColor":"#b5b5b5","backgroundColorHover":"#222222","textColor":"#ffffff","textColorHover":"#ffffff","hasIcon":true,"removeText":true,"iconStyles":{"width":"1em","height":"1em","widthMobile":"0.8em","heightMobile":"0.8em","paddingRight":"0.5em"},"gpDynamicLinkType":"single-post","gpDynamicSource":"next-post"} --\x3e \x3c!-- /wp:generateblocks/button --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- /wp:generateblocks/grid --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- /wp:generateblocks/container --\x3e',meta:[{key:"_generate_hook",value:"generate_after_do_template_part"},{key:"_generate_hook_priority",value:"1"},{key:"_generate_disable_post_navigation",value:!0},{key:"_generate_use_archive_navigation_container",value:!1}]}},Z={basic_1:{label:(0,p._x)("Inline with avatar","label","gp-premium"),thumbnail:"post-meta-inline.jpg",content:'\x3c!-- wp:generateblocks/container {"uniqueId":"8a25fc79","isDynamic":true,"blockVersion":4,"display":"flex","flexDirection":"row","alignItems":"center","sizing":{"height":"","maxWidth":""},"typography":{"fontSize":"14px"},"spacing":{"paddingTop":"15px","paddingRight":"0px","paddingBottom":"15px","paddingLeft":"0px","marginTop":"20px","marginBottom":"20px"},"borders":{"borderTopWidth":"1px","borderTopStyle":"solid","borderTopColor":"#e8edf0","borderBottomWidth":"1px","borderBottomStyle":"solid","borderBottomColor":"#e8edf0"}} --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"82a213c1","isDynamic":true,"blockVersion":4,"display":"flex","flexDirection":"row","alignItems":"center"} --\x3e \x3c!-- wp:generatepress/dynamic-image {"imageType":"author-avatar","avatarRounded":true} /--\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"3fb4928a","element":"div","blockVersion":3,"display":"inline-block","spacing":{"paddingRight":"10px","marginLeft":"10px"},"inlineWidth":true,"gpDynamicTextType":"post-author","gpDynamicLinkType":"author-archives","gpDynamicTextReplace":"Author Name"} --\x3e
Author Name
\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"f9b55781","element":"div","blockVersion":3,"display":"inline-block","spacing":{"paddingLeft":"10px"},"inlineWidth":true,"borders":{"borderLeftWidth":"1px","borderLeftStyle":"solid","borderLeftColor":"#e8edf0"},"gpDynamicTextType":"post-date","gpDynamicTextReplace":"Date"} --\x3e
Date
\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"8fca9ec9","element":"div","blockVersion":3,"display":"inline-flex","alignItems":"center","spacing":{"paddingLeft":"10px","marginLeft":"10px"},"inlineWidth":true,"borders":{"borderLeftWidth":"1px","borderLeftStyle":"solid","borderLeftColor":"#e8edf0"},"hasIcon":true,"iconStyles":{"width":"1em","height":"1em","paddingRight":"0.5em"},"gpDynamicTextType":"comments-number","gpDynamicLinkType":"comments","gpDynamicTextReplace":"Comments","gpDynamicTextTaxonomy":"category","gpDynamicNoCommentsText":"0","gpDynamicSingleCommentText":"1","gpDynamicMultipleCommentsText":"%"} --\x3e
Comments
\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- /wp:generateblocks/container --\x3e',meta:[{key:"_generate_post_meta_location",value:"after-post-title"},{key:"_generate_disable_primary_post_meta",value:!0}]},basic_2:{label:(0,p._x)("Stacked with avatar","label","gp-premium"),thumbnail:"post-meta-avatar-stacked.jpg",content:'\x3c!-- wp:generateblocks/container {"uniqueId":"a745be15","isDynamic":true,"blockVersion":4,"display":"flex","flexDirection":"row","alignItems":"center","columnGap":"20px","sizing":{"height":"","maxWidth":""},"typography":{"fontSize":"14px"},"spacing":{"paddingTop":"20px","paddingRight":"0px","paddingBottom":"20px","paddingLeft":"0px"}} --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"fd4592f4","isDynamic":true,"blockVersion":4,"sizing":{"width":"10%","widthMobile":"100%","height":"","maxWidth":""},"spacing":{"paddingTop":"0px","paddingRight":"0px","paddingBottom":"0px","paddingLeft":"0px"}} --\x3e \x3c!-- wp:generatepress/dynamic-image {"imageType":"author-avatar","avatarSize":120} /--\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"137e86ad","isDynamic":true,"blockVersion":4,"sizing":{"width":"90%","widthMobile":"100%","height":"","maxWidth":""},"spacing":{"paddingTop":"0px","paddingRight":"0px","paddingBottom":"0px","paddingLeft":"0px"}} --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"d7bb0434","element":"p","blockVersion":3,"spacing":{"marginBottom":"5px"},"gpDynamicTextType":"post-author","gpDynamicLinkType":"author-archives","gpDynamicTextReplace":"Author Name"} --\x3e

Author Name

\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"759ebd2f","element":"p","blockVersion":3,"spacing":{"marginBottom":"0px"},"gpDynamicTextType":"post-date","gpDynamicTextReplace":"Date","gpDynamicDateUpdated":true} --\x3e

Date

\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- /wp:generateblocks/container --\x3e',meta:[{key:"_generate_post_meta_location",value:"after-post-title"},{key:"_generate_disable_primary_post_meta",value:!0}]},basic_3:{label:(0,p._x)("Term buttons","label","gp-premium"),thumbnail:"post-meta-term-buttons.jpg",content:'\x3c!-- wp:generateblocks/container {"uniqueId":"7134d7c2","isDynamic":true,"blockVersion":4,"display":"flex","flexDirection":"row","alignItems":"center","columnGap":"10px","sizing":{"height":"","maxWidth":""},"spacing":{"paddingTop":"0px","paddingRight":"0px","paddingBottom":"0px","paddingLeft":"0px"},"paddingSyncUnits":true} --\x3e \x3c!-- wp:generateblocks/button {"uniqueId":"e378fc0b","hasUrl":true,"blockVersion":4,"display":"inline-flex","alignItems":"center","justifyContent":"center","typography":{"fontSize":"13px","textAlign":"center"},"fontSize":"","spacing":{"paddingTop":"10px","paddingRight":"10px","paddingBottom":"10px","paddingLeft":"10px","marginTop":"","marginRight":"","marginBottom":"","marginLeft":""},"borders":{"borderTopRightRadius":"","borderBottomRightRadius":"","borderBottomLeftRadius":"","borderTopLeftRadius":""},"backgroundColor":"#000000","backgroundColorHover":"#222222","textColor":"#ffffff","textColorHover":"#ffffff","className":"dynamic-term-class","gpDynamicTextType":"terms","gpDynamicLinkType":"term-archives","gpDynamicTextReplace":"Terms","gpDynamicTextTaxonomy":"category"} --\x3e Terms \x3c!-- /wp:generateblocks/button --\x3e \x3c!-- /wp:generateblocks/container --\x3e',meta:[{key:"_generate_post_meta_location",value:"before-post-title"},{key:"_generate_disable_primary_post_meta",value:!1}]}},Q={template_1:{label:(0,p._x)("Full footer 1","label","gp-premium"),thumbnail:"site-footer-full-1.jpg",content:'\x3c!-- wp:generateblocks/container {"uniqueId":"73cd57e1","backgroundColor":"#1b1b42","shapeDividers":[],"isDynamic":true,"blockVersion":4,"sizing":{"height":"","maxWidth":""},"spacing":{"paddingTop":"140px","paddingRight":"30px","paddingBottom":"60px","paddingLeft":"30px"}} --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"7d9550dd","isDynamic":true,"blockVersion":4,"sizing":{"maxWidth":""},"useGlobalMaxWidth":true,"spacing":{"marginRight":"auto","marginLeft":"auto"}} --\x3e \x3c!-- wp:generateblocks/grid {"uniqueId":"b76f312f","columns":3,"horizontalGap":80,"verticalAlignment":"center","verticalGapTablet":40,"isDynamic":true,"blockVersion":3,"useLegacyRowGap":true} --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"53cb46e2","isGrid":true,"gridId":"b76f312f","isDynamic":true,"blockVersion":4,"sizing":{"width":"60%","widthTablet":"100%","widthMobile":"100%","height":"100%","maxWidth":""},"spacing":{"paddingTop":"0px","paddingRight":"0px","paddingBottom":"0px","paddingLeft":"0px"}} --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"aa19f1fb","element":"h3","blockVersion":3,"textColor":"#ffffff"} --\x3e

Reach out to us for a consultation.

\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"41582601","element":"p","blockVersion":3,"spacing":{"paddingRight":"100px","paddingRightTablet":"0px"},"textColor":"#ffffff"} --\x3e

Semper blandit suspendisse faucibus metus lobortis morbi magna vivamus per risus fermentum dapibus imperdiet praesent magnis.

\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- wp:generateblocks/button {"uniqueId":"529d5dda","hasUrl":true,"blockVersion":4,"display":"inline-flex","alignItems":"center","justifyContent":"center","typography":{"fontWeight":"600","textAlign":"center"},"spacing":{"paddingTop":"10px","paddingRight":"20px","paddingBottom":"10px","paddingLeft":"20px","marginRight":"20px","marginBottomMobile":"20px"},"borders":{"borderTopWidth":"3px","borderTopStyle":"solid","borderTopColor":"#ffffff","borderTopColorHover":"rgba(242, 245, 250, 0.8)","borderRightWidth":"3px","borderRightStyle":"solid","borderRightColor":"#ffffff","borderRightColorHover":"rgba(242, 245, 250, 0.8)","borderBottomWidth":"3px","borderBottomStyle":"solid","borderBottomColor":"#ffffff","borderBottomColorHover":"rgba(242, 245, 250, 0.8)","borderLeftWidth":"3px","borderLeftStyle":"solid","borderLeftColor":"#ffffff","borderLeftColorHover":"rgba(242, 245, 250, 0.8)","borderTopRightRadius":"2px","borderBottomRightRadius":"2px","borderBottomLeftRadius":"2px","borderTopLeftRadius":"2px"},"backgroundColorHover":"#6212b3","backgroundColorHoverOpacity":0,"textColor":"#ffffff","textColorHover":"#f2f5fa"} --\x3e Contact Us \x3c!-- /wp:generateblocks/button --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"e1bd60bb","isGrid":true,"gridId":"b76f312f","removeVerticalGapTablet":true,"isDynamic":true,"blockVersion":4,"sizing":{"width":"20%","widthTablet":"50%","widthMobile":"100%","height":"100%","maxWidth":""},"spacing":{"paddingTop":"0px","paddingRight":"0px","paddingBottom":"0px","paddingLeft":"0px"}} --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"37420255","element":"p","blockVersion":3,"textColor":"#ffffff"} --\x3e

Company Name
Address Here
Address Here

\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"bf8e162e","element":"p","blockVersion":3,"display":"flex","alignItems":"center","spacing":{"marginBottom":"0px"},"textColor":"#ffffff","linkColor":"#ffffff","linkColorHover":"#f2f5fa","hasIcon":true,"iconStyles":{"width":"1em","height":"1em","paddingTop":".1em","paddingRight":"0.5em"}} --\x3e

+1 000 000 0000

\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"c762d353","isGrid":true,"gridId":"b76f312f","removeVerticalGapTablet":true,"removeVerticalGapMobile":true,"isDynamic":true,"blockVersion":4,"display":"flex","flexDirection":"row","columnGap":"10px","sizing":{"width":"20%","widthTablet":"50%","widthMobile":"100%","height":"100%","maxWidth":""},"spacing":{"paddingTop":"0px","paddingRight":"0px","paddingBottom":"0px","paddingLeft":"0px"}} --\x3e \x3c!-- wp:generateblocks/button {"uniqueId":"13c371f8","hasUrl":true,"ariaLabel":"instagram link","blockVersion":4,"display":"inline-flex","alignItems":"center","justifyContent":"center","typography":{"textAlign":"center"},"spacing":{"paddingTop":"6px","paddingRight":"6px","paddingBottom":"6px","paddingLeft":"6px","marginRight":""},"borders":{"borderTopWidth":"2px","borderTopStyle":"solid","borderTopColor":"#ffffff","borderTopColorHover":"#f2f5fa","borderRightWidth":"2px","borderRightStyle":"solid","borderRightColor":"#ffffff","borderRightColorHover":"#f2f5fa","borderBottomWidth":"2px","borderBottomStyle":"solid","borderBottomColor":"#ffffff","borderBottomColorHover":"#f2f5fa","borderLeftWidth":"2px","borderLeftStyle":"solid","borderLeftColor":"#ffffff","borderLeftColorHover":"#f2f5fa","borderTopRightRadius":"50px","borderBottomRightRadius":"50px","borderBottomLeftRadius":"50px","borderTopLeftRadius":"50px"},"backgroundColorHover":"#222222","textColor":"#ffffff","textColorHover":"#f2f5fa","hasIcon":true,"removeText":true,"iconStyles":{"width":"0.8em","height":"0.8em","paddingRight":"0.5em"}} --\x3e \x3c!-- /wp:generateblocks/button --\x3e \x3c!-- wp:generateblocks/button {"uniqueId":"926332bd","hasUrl":true,"ariaLabel":"twitter link","blockVersion":4,"display":"inline-flex","alignItems":"center","justifyContent":"center","typography":{"textAlign":"center"},"spacing":{"paddingTop":"6px","paddingRight":"6px","paddingBottom":"6px","paddingLeft":"6px","marginRight":""},"borders":{"borderTopWidth":"2px","borderTopStyle":"solid","borderTopColor":"#ffffff","borderTopColorHover":"#f2f5fa","borderRightWidth":"2px","borderRightStyle":"solid","borderRightColor":"#ffffff","borderRightColorHover":"#f2f5fa","borderBottomWidth":"2px","borderBottomStyle":"solid","borderBottomColor":"#ffffff","borderBottomColorHover":"#f2f5fa","borderLeftWidth":"2px","borderLeftStyle":"solid","borderLeftColor":"#ffffff","borderLeftColorHover":"#f2f5fa","borderTopRightRadius":"50px","borderBottomRightRadius":"50px","borderBottomLeftRadius":"50px","borderTopLeftRadius":"50px"},"backgroundColorHover":"#222222","textColor":"#ffffff","textColorHover":"#f2f5fa","hasIcon":true,"removeText":true,"iconStyles":{"width":"0.8em","height":"0.8em","paddingRight":"0.5em"}} --\x3e \x3c!-- /wp:generateblocks/button --\x3e \x3c!-- wp:generateblocks/button {"uniqueId":"d957854e","hasUrl":true,"ariaLabel":"facebook link","blockVersion":4,"display":"inline-flex","alignItems":"center","justifyContent":"center","typography":{"textAlign":"center"},"spacing":{"paddingTop":"6px","paddingRight":"6px","paddingBottom":"6px","paddingLeft":"6px"},"borders":{"borderTopWidth":"2px","borderTopStyle":"solid","borderTopColor":"#ffffff","borderTopColorHover":"#f2f5fa","borderRightWidth":"2px","borderRightStyle":"solid","borderRightColor":"#ffffff","borderRightColorHover":"#f2f5fa","borderBottomWidth":"2px","borderBottomStyle":"solid","borderBottomColor":"#ffffff","borderBottomColorHover":"#f2f5fa","borderLeftWidth":"2px","borderLeftStyle":"solid","borderLeftColor":"#ffffff","borderLeftColorHover":"#f2f5fa","borderTopRightRadius":"50px","borderBottomRightRadius":"50px","borderBottomLeftRadius":"50px","borderTopLeftRadius":"50px"},"backgroundColorHover":"#222222","textColor":"#ffffff","textColorHover":"#f2f5fa","hasIcon":true,"removeText":true,"iconStyles":{"width":"0.8em","height":"0.8em","paddingRight":"0.5em"}} --\x3e \x3c!-- /wp:generateblocks/button --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- /wp:generateblocks/grid --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"0f87c806","isDynamic":true,"blockVersion":4,"display":"flex","flexDirection":"row","flexDirectionMobile":"column-reverse","alignItems":"center","justifyContent":"space-between","rowGapMobile":"20px","sizing":{"height":"","maxWidth":""},"spacing":{"paddingTop":"60px","paddingRight":"0px","paddingBottom":"60px","paddingLeft":"0px","marginTop":"60px"},"borders":{"borderTopWidth":"1px","borderTopStyle":"solid","borderTopColor":"#ffffff"}} --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"e6861bde","isDynamic":true,"blockVersion":4,"sizing":{"width":"","widthMobile":"100%","height":"","maxWidth":""},"spacing":{"paddingTop":"0px","paddingRight":"0px","paddingBottom":"0px","paddingLeft":"0px"}} --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"97c10964","element":"p","blockVersion":3,"typography":{"fontSize":"17px"},"spacing":{"marginBottom":"0px"},"textColor":"#ffffff"} --\x3e

© Company Name

\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"7c528044","isDynamic":true,"blockVersion":4,"display":"flex","flexDirection":"row","flexDirectionMobile":"column","alignItems":"center","alignItemsMobile":"flex-start","columnGap":"20px","rowGapMobile":"10px","sizing":{"width":"","widthMobile":"100%","height":"","maxWidth":""},"spacing":{"paddingTop":"0px","paddingRight":"0px","paddingBottom":"0px","paddingLeft":"0px"}} --\x3e \x3c!-- wp:generateblocks/button {"uniqueId":"907cc664","hasUrl":true,"blockVersion":4,"display":"inline-flex","alignItems":"center","justifyContent":"center","typography":{"fontSize":"17px","textAlign":"center"},"fontSize":"","spacing":{"marginRight":""},"textColor":"#ffffff","textColorHover":"#f2f5fa"} --\x3e Privacy Policy \x3c!-- /wp:generateblocks/button --\x3e \x3c!-- wp:generateblocks/button {"uniqueId":"a6a340bc","hasUrl":true,"blockVersion":4,"display":"inline-flex","alignItems":"center","justifyContent":"center","typography":{"fontSize":"17px","textAlign":"center"},"fontSize":"","textColor":"#ffffff","textColorHover":"#f2f5fa"} --\x3e Terms of Service \x3c!-- /wp:generateblocks/button --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- /wp:generateblocks/container --\x3e'},template_2:{label:(0,p._x)("Full footer 2","label","gp-premium"),thumbnail:"site-footer-full-2.jpg",content:'\x3c!-- wp:generateblocks/container {"uniqueId":"e224c1dd","backgroundColor":"#fafbfc","isDynamic":true,"blockVersion":4,"sizing":{"height":"","maxWidth":""},"spacing":{"paddingTop":"80px","paddingRight":"20px","paddingBottom":"80px","paddingLeft":"20px"}} --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"0836612c","isDynamic":true,"blockVersion":4,"sizing":{"maxWidth":""},"useGlobalMaxWidth":true,"spacing":{"marginRight":"auto","marginLeft":"auto"}} --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"34307d45","element":"p","blockVersion":3,"typography":{"fontSize":"14px","letterSpacing":"0.3em","fontWeight":"bold","textTransform":"uppercase","textAlign":"center"},"spacing":{"marginTop":"10px"},"textColor":"#2e3d4d"} --\x3e

Your Company Name

\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"4068688a","isDynamic":true,"blockVersion":4,"display":"flex","flexDirection":"row","flexDirectionMobile":"column","alignItems":"center","rowGapMobile":"20px","sizing":{"height":"","maxWidth":""},"spacing":{"paddingTop":"60px","paddingRight":"20px","paddingBottom":"60px","paddingLeft":"20px","marginTop":"60px","marginBottom":"60px"},"borders":{"borderTopWidth":"1px","borderTopStyle":"solid","borderTopColor":"#5c7a99","borderBottomWidth":"1px","borderBottomStyle":"solid","borderBottomColor":"#5c7a99"}} --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"12d457ad","isDynamic":true,"blockVersion":4,"sizing":{"width":"33.33%","widthMobile":"100%","height":"","maxWidth":""},"typography":{"textAlign":"center"},"spacing":{"paddingTop":"0px","paddingRight":"20px","paddingBottom":"0px","paddingLeft":"20px"}} --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"8818b435","element":"p","blockVersion":3,"typography":{"fontSize":"13px","letterSpacing":"0.2em","fontWeight":"bold","textTransform":"uppercase"},"spacing":{"marginBottom":"0px"}} --\x3e

PH +1 000 000 0000

\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"68ec175a","isDynamic":true,"blockVersion":4,"sizing":{"width":"33.33%","widthMobile":"100%","height":"","maxWidth":""},"typography":{"textAlign":"center"},"spacing":{"paddingTop":"0px","paddingRight":"20px","paddingBottom":"0px","paddingLeft":"20px"},"borders":{"borderRightWidth":"1px","borderRightStyle":"solid","borderRightColor":"#5c7a99","borderLeftWidth":"1px","borderLeftStyle":"solid","borderLeftColor":"#5c7a99","borderTopWidthMobile":"0px","borderTopStyleMobile":"solid","borderTopColorMobile":"#5c7a99","borderRightWidthMobile":"0px","borderRightStyleMobile":"solid","borderRightColorMobile":"#5c7a99","borderBottomWidthMobile":"0px","borderBottomStyleMobile":"solid","borderBottomColorMobile":"#5c7a99","borderLeftWidthMobile":"0px","borderLeftStyleMobile":"solid","borderLeftColorMobile":"#5c7a99"}} --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"cf4dcfab","element":"p","blockVersion":3,"typography":{"fontSize":"13px","letterSpacing":"0.2em","fontWeight":"bold","textTransform":"uppercase"},"spacing":{"marginBottom":"0px"}} --\x3e

24 M Drive
East Hampton, NY 11937

\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"47f78435","removeVerticalGapMobile":true,"isDynamic":true,"blockVersion":4,"sizing":{"width":"33.33%","widthMobile":"100%","height":"","maxWidth":""},"typography":{"textAlign":"center"},"spacing":{"paddingTop":"0px","paddingRight":"20px","paddingBottom":"0px","paddingLeft":"20px"}} --\x3e \x3c!-- wp:generateblocks/button {"uniqueId":"2800ad9a","hasUrl":false,"blockVersion":4,"display":"inline-flex","alignItems":"center","justifyContent":"center","typography":{"textAlign":"center"},"spacing":{"marginRight":"20px"},"textColor":"#2e3d4d","textColorHover":"#5c7a99","hasIcon":true,"removeText":true,"iconStyles":{"width":"0.9em","height":"0.9em","paddingRight":"0.5em"}} --\x3e \x3c!-- /wp:generateblocks/button --\x3e \x3c!-- wp:generateblocks/button {"uniqueId":"eb98a6f6","hasUrl":false,"blockVersion":4,"display":"inline-flex","alignItems":"center","justifyContent":"center","typography":{"textAlign":"center"},"spacing":{"marginRight":"20px"},"textColor":"#2e3d4d","textColorHover":"#5c7a99","hasIcon":true,"removeText":true,"iconStyles":{"width":"0.9em","height":"0.9em","paddingRight":"0.5em"}} --\x3e \x3c!-- /wp:generateblocks/button --\x3e \x3c!-- wp:generateblocks/button {"uniqueId":"ab839eb9","hasUrl":false,"blockVersion":4,"display":"inline-flex","alignItems":"center","justifyContent":"center","typography":{"textAlign":"center"},"spacing":{"marginRight":"20px"},"textColor":"#2e3d4d","textColorHover":"#5c7a99","hasIcon":true,"removeText":true,"iconStyles":{"width":"0.8em","height":"0.8em","paddingRight":"0.5em"}} --\x3e \x3c!-- /wp:generateblocks/button --\x3e \x3c!-- wp:generateblocks/button {"uniqueId":"5b757c38","hasUrl":false,"blockVersion":4,"display":"inline-flex","alignItems":"center","justifyContent":"center","typography":{"textAlign":"center"},"spacing":{"marginRight":"20px"},"textColor":"#2e3d4d","textColorHover":"#5c7a99","hasIcon":true,"removeText":true,"iconStyles":{"width":"0.8em","height":"0.8em","paddingRight":"0.5em"}} --\x3e \x3c!-- /wp:generateblocks/button --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"77c9f71e","isDynamic":true,"blockVersion":4,"display":"flex","flexDirection":"row","flexDirectionMobile":"column","alignItems":"center","justifyContent":"space-between","rowGapMobile":"20px"} --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"cc32f783","isDynamic":true,"blockVersion":4,"sizing":{"width":"50%","widthMobile":"100%","height":"","maxWidth":""},"spacing":{"paddingTop":"0px","paddingRight":"0px","paddingBottom":"0px","paddingLeft":"0px"}} --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"1e50faeb","element":"p","blockVersion":3,"typography":{"fontSize":"12px","letterSpacing":"0.2em","fontWeight":"bold","textTransform":"uppercase","textAlign":"left","textAlignMobile":"center"},"spacing":{"marginBottom":"0px"}} --\x3e

© Your Copyright Message

\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"b706d851","removeVerticalGapMobile":true,"isDynamic":true,"blockVersion":4,"display":"flex","flexDirection":"row","alignItems":"center","justifyContent":"flex-end","justifyContentMobile":"center","columnGap":"20px","rowGap":"10px","sizing":{"width":"50%","widthMobile":"100%","height":"","maxWidth":""},"typography":{},"spacing":{"paddingTop":"0px","paddingRight":"0px","paddingBottom":"0px","paddingLeft":"0px"}} --\x3e \x3c!-- wp:generateblocks/button {"uniqueId":"373aae0d","hasUrl":false,"blockVersion":4,"display":"inline-flex","alignItems":"center","justifyContent":"center","typography":{"fontSize":"12px","letterSpacing":"0.2em","fontWeight":"bold","textTransform":"uppercase","textAlign":"center"},"fontSize":"","spacing":{"marginRight":""},"textColor":"#2e3d4d","textColorHover":"#5c7a99"} --\x3e Privacy Policy \x3c!-- /wp:generateblocks/button --\x3e \x3c!-- wp:generateblocks/button {"uniqueId":"3cd1cf71","hasUrl":false,"blockVersion":4,"display":"inline-flex","alignItems":"center","justifyContent":"center","typography":{"fontSize":"12px","letterSpacing":"0.2em","fontWeight":"bold","textTransform":"uppercase","textAlign":"center"},"fontSize":"","textColor":"#2e3d4d","textColorHover":"#5c7a99"} --\x3e Terms of Service \x3c!-- /wp:generateblocks/button --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- /wp:generateblocks/container --\x3e'}},ee={template_1:{label:(0,p._x)("Basic layout with term buttons","label","gp-premium"),thumbnail:"content-template-basic.jpg",content:'\x3c!-- wp:generateblocks/container {"uniqueId":"d2cafe96","isDynamic":true,"blockVersion":4,"sizing":{"height":"","maxWidth":""},"spacing":{"paddingTop":"","paddingRight":"","paddingBottom":"","paddingLeft":""},"paddingSyncUnits":true} --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"75c01790","isDynamic":true,"blockVersion":4} --\x3e \x3c!-- wp:generateblocks/button {"uniqueId":"38620841","hasUrl":true,"blockVersion":4,"display":"inline-flex","alignItems":"center","justifyContent":"center","typography":{"fontSize":"13px","textAlign":"center"},"fontSize":"","spacing":{"paddingTop":"5px","paddingRight":"10px","paddingBottom":"5px","paddingLeft":"10px"},"backgroundColor":"#000000","backgroundColorHover":"#222222","textColor":"#ffffff","textColorHover":"#ffffff","className":"dynamic-term-class","gpDynamicTextType":"terms","gpDynamicLinkType":"term-archives","gpDynamicTextReplace":"Terms","gpDynamicTextTaxonomy":"category"} --\x3e Terms \x3c!-- /wp:generateblocks/button --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"f593ba8c","blockVersion":3,"typography":{"fontWeight":"bold"},"spacing":{"marginBottom":"30px"},"linkColor":"#000000","linkColorHover":"#858585","gpDynamicTextType":"title","gpDynamicLinkType":"single-post","gpDynamicTextReplace":"Post Title"} --\x3e

Post Title

\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"1ed16867","isDynamic":true,"blockVersion":4,"display":"flex","alignItems":"center","justifyContent":"space-between","columnGap":"10px","rowGap":"10px","sizing":{"height":"","maxWidth":""},"typography":{"fontSize":"14px"},"spacing":{"paddingTop":"0px","paddingRight":"0px","paddingBottom":"0px","paddingLeft":"0px"}} --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"dc72dc13","isDynamic":true,"blockVersion":4,"display":"flex","alignItems":"center","sizing":{"width":"50%","widthMobile":"50%","height":"","maxWidth":""},"spacing":{"paddingTop":"0px","paddingRight":"0px","paddingBottom":"0px","paddingLeft":"0px"}} --\x3e \x3c!-- wp:generatepress/dynamic-image {"imageType":"author-avatar","avatarRounded":true} /--\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"c7b33e8b","element":"p","blockVersion":3,"spacing":{"marginBottom":"0px","marginLeft":"10px"},"gpDynamicTextType":"post-author","gpDynamicLinkType":"author-archives","gpDynamicTextReplace":"Author name"} --\x3e

Author name

\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"ec93a944","isDynamic":true,"blockVersion":4,"sizing":{"width":"50%","widthMobile":"50%","height":"","maxWidth":""},"typography":{"textAlign":"right"},"spacing":{"paddingTop":"0px","paddingRight":"0px","paddingBottom":"0px","paddingLeft":"0px"}} --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"af8af68e","element":"p","blockVersion":3,"spacing":{"marginBottom":"0px"},"gpDynamicTextType":"post-date","gpDynamicTextReplace":"Post date","gpDynamicDateUpdated":true} --\x3e

Post date

\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"b70b46a6","isDynamic":true,"blockVersion":4,"sizing":{"height":"","maxWidth":""},"spacing":{"paddingTop":"0px","paddingRight":"0px","paddingBottom":"0px","paddingLeft":"0px","marginTop":"30px","marginBottom":"30px"},"paddingSyncUnits":true} --\x3e \x3c!-- wp:generatepress/dynamic-image {"imageType":"featured-image","imageSize":"medium_large","linkTo":"single-post"} /--\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- wp:generatepress/dynamic-content {"contentType":"post-excerpt"} /--\x3e \x3c!-- /wp:generateblocks/container --\x3e',meta:[{key:"_generate_block_element_editor_width_unit",value:"px"},{key:"_generate_block_element_editor_width",value:"750"},{key:"_generate_use_theme_post_container",value:!0}]},template_2:{label:(0,p._x)("Layout with offset content","label","gp-premium"),thumbnail:"content-template-offset.jpg",content:'\x3c!-- wp:generatepress/dynamic-image {"imageType":"featured-image","imageSize":"large","linkTo":"single-post"} /--\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"05e7d83e","backgroundColor":"#ffffff","isDynamic":true,"blockVersion":4,"position":"relative","zindex":1,"sizing":{"height":"","maxWidth":""},"spacing":{"paddingTop":"20px","paddingRight":"20px","paddingBottom":"20px","paddingLeft":"20px","marginTop":"-65px","marginRight":"40px","marginBottom":"20px","marginLeft":"0px"},"paddingSyncUnits":true} --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"83898f1c","element":"p","blockVersion":3,"typography":{"fontSize":"14px","fontWeight":"700","textTransform":"uppercase"},"spacing":{"marginBottom":"20px"},"linkColor":"#000000","linkColorHover":"#abb8c3","className":"dynamic-term-class","gpDynamicTextType":"terms","gpDynamicLinkType":"term-archives","gpDynamicTextReplace":"Category","gpDynamicTextTaxonomy":"category"} --\x3e

Category

\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"98a0e67b","blockVersion":3,"typography":{"fontSize":"28px"},"gpDynamicTextType":"title","gpDynamicLinkType":"single-post","gpDynamicTextReplace":"Title"} --\x3e

Title

\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- wp:generatepress/dynamic-content {"contentType":"post-excerpt","excerptLength":25,"useThemeMoreLink":false} /--\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"fed802f7","isDynamic":true,"blockVersion":4,"display":"flex","flexDirection":"row","alignItems":"center","justifyContent":"space-between","columnGap":"5px","rowGap":"5px","sizing":{"height":"","maxWidth":""},"spacing":{"paddingTop":"0px","paddingRight":"0px","paddingBottom":"0px","paddingLeft":"0px","marginTop":"20px"},"paddingSyncUnits":true} --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"74fcc8db","isDynamic":true,"blockVersion":4,"display":"flex","alignItems":"center","sizing":{"width":"66.66%","widthMobile":"66.66%","height":"","maxWidth":""},"spacing":{"paddingTop":"0px","paddingRight":"0px","paddingBottom":"0px","paddingLeft":"0px","marginTop":"15px"}} --\x3e \x3c!-- wp:generatepress/dynamic-image {"imageType":"author-avatar","avatarSize":35,"avatarRounded":true} /--\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"33ed7660","isDynamic":true,"blockVersion":4,"sizing":{"height":"","maxWidth":""},"spacing":{"paddingTop":"0px","paddingRight":"0px","paddingBottom":"0px","paddingLeft":"0px","marginLeft":"10px"}} --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"2def9732","element":"p","blockVersion":3,"typography":{"fontSize":"15px"},"spacing":{"marginBottom":"0px"},"borders":{"borderRightWidth":"0px","borderRightStyle":"solid"},"gpDynamicTextType":"post-author","gpDynamicTextReplace":"Post author name"} --\x3e

Post author name

\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"dd34513e","element":"p","blockVersion":3,"typography":{"fontSize":"12px"},"spacing":{"marginRight":"10px","marginBottom":"0px"},"borders":{"borderBottomWidth":"0px","borderBottomStyle":"solid"},"gpDynamicTextType":"post-date","gpDynamicTextReplace":"Date","gpDynamicDateUpdated":true} --\x3e

Date

\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"6d144082","verticalAlignment":"center","isDynamic":true,"blockVersion":4,"sizing":{"width":"33.33%","widthMobile":"33.33%","height":"","maxWidth":""},"typography":{"textAlign":"right"},"spacing":{"paddingTop":"0px","paddingRight":"0px","paddingBottom":"0px","paddingLeft":"0px","marginTop":"15px"},"gpInlinePostMetaJustify":"flex-end"} --\x3e \x3c!-- wp:generateblocks/button {"uniqueId":"7c89fc64","hasUrl":true,"blockVersion":4,"display":"inline-flex","alignItems":"center","justifyContent":"center","typography":{"fontWeight":"700","textTransform":"uppercase","textAlign":"center"},"spacing":{"paddingTop":"0px","paddingRight":"0px","paddingBottom":"0px","paddingLeft":"0px"},"textColor":"#000000","textColorHover":"#abb8c3","gpDynamicLinkType":"single-post"} --\x3e More \x3c!-- /wp:generateblocks/button --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- /wp:generateblocks/container --\x3e',meta:[{key:"_generate_block_element_editor_width_unit",value:"px"},{key:"_generate_block_element_editor_width",value:"500"},{key:"_generate_use_theme_post_container",value:!1}]},template_3:{label:(0,p._x)("Layout with featured image overlay","label","gp-premim"),thumbnail:"content-template-overlay.jpg",content:'\x3c!-- wp:generateblocks/container {"uniqueId":"99e0f8fe","gradient":true,"gradientDirection":180,"gradientColorOne":"#000000","gradientColorOneOpacity":0.62,"gradientColorTwo":"#000000","gradientColorTwoOpacity":0,"gradientSelector":"pseudo-element","textColor":"#ffffff","linkColor":"#ffffff","linkColorHover":"#ffffff","bgImage":{"id":"","image":{"url":"#dynamic-background-image"}},"innerZindex":1,"isDynamic":true,"blockVersion":4,"position":"relative","overflowX":"hidden","overflowY":"hidden","sizing":{"minHeight":"420px","height":"","maxWidth":""},"spacing":{"paddingTop":"20px","paddingRight":"20px","paddingBottom":"20px","paddingLeft":"20px"},"borders":{"borderTopRightRadius":"12px","borderBottomRightRadius":"12px","borderBottomLeftRadius":"12px","borderTopLeftRadius":"12px"},"gpDynamicImageBg":"featured-image"} --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"95ce0971","isDynamic":true,"blockVersion":4,"position":"relative","zindex":1,"sizing":{"maxWidth":""},"useGlobalMaxWidth":true,"spacing":{"marginRight":"auto","marginLeft":"auto"}} --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"864271b1","isDynamic":true,"blockVersion":4,"display":"flex","flexDirection":"row","alignItems":"center","justifyContent":"space-between","columnGap":"5px","rowGap":"5px","sizing":{"height":"","maxWidth":""},"spacing":{"paddingTop":"0px","paddingRight":"0px","paddingBottom":"0px","paddingLeft":"0px","marginBottom":"10px"},"paddingSyncUnits":true} --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"bc0ec4fa","element":"p","blockVersion":3,"typography":{"fontSize":"13px","fontWeight":"700","textTransform":"uppercase"},"spacing":{"marginRight":"10px","marginBottom":"0px"},"className":"dynamic-term-class","gpDynamicTextType":"terms","gpDynamicTextReplace":"Category","gpDynamicTextTaxonomy":"category","gpDynamicTextTaxonomySeparator":" / "} --\x3e

Category

\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"5e2dac4c","element":"p","blockVersion":3,"display":"flex","alignItems":"center","justifyContent":"flex-end","typography":{"fontSize":"12px","textAlign":"right"},"spacing":{"marginBottom":"0px"},"hasIcon":true,"iconStyles":{"width":"1.4em","height":"1.4em","paddingRight":"0.5em"},"gpDynamicTextType":"comments-number","gpDynamicTextReplace":"COMMENTS","gpDynamicNoCommentsText":"0","gpDynamicSingleCommentText":"1","gpDynamicMultipleCommentsText":"%"} --\x3e

COMMENTS

\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"b1e898af","blockVersion":3,"typography":{"fontSize":"24px"},"marginUnit":"%","gpDynamicTextType":"title","gpDynamicLinkType":"single-post","gpDynamicTextReplace":"Title"} --\x3e

Title

\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"64bb1fda","isDynamic":true,"blockVersion":4,"display":"flex","justifyContent":"flex-end","spacing":{"marginTop":"300px"}} --\x3e \x3c!-- wp:generateblocks/button {"uniqueId":"95f40917","hasUrl":true,"blockVersion":4,"display":"inline-flex","alignItems":"center","justifyContent":"center","typography":{"fontSize":"12px","fontWeight":"700","textTransform":"uppercase","textAlign":"center"},"fontSize":"","spacing":{"paddingTop":"10px","paddingRight":"20px","paddingBottom":"10px","paddingLeft":"20px"},"borders":{"borderTopWidth":"1px","borderTopStyle":"solid","borderTopColor":"#ffffff","borderTopColorHover":"#ffffff","borderRightWidth":"1px","borderRightStyle":"solid","borderRightColor":"#ffffff","borderRightColorHover":"#ffffff","borderBottomWidth":"1px","borderBottomStyle":"solid","borderBottomColor":"#ffffff","borderBottomColorHover":"#ffffff","borderLeftWidth":"1px","borderLeftStyle":"solid","borderLeftColor":"#ffffff","borderLeftColorHover":"#ffffff","borderTopRightRadius":"8px","borderBottomRightRadius":"8px","borderBottomLeftRadius":"8px","borderTopLeftRadius":"8px"},"backgroundColor":"#ffffff","backgroundColorHover":"#ffffff","backgroundColorHoverOpacity":0.75,"textColor":"#000000","textColorHover":"#000000","gpDynamicLinkType":"single-post"} --\x3e Read More \x3c!-- /wp:generateblocks/button --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- /wp:generateblocks/container --\x3e',meta:[{key:"_generate_block_element_editor_width_unit",value:"px"},{key:"_generate_block_element_editor_width",value:"500"},{key:"_generate_use_theme_post_container",value:!1}]},template_4:{label:(0,p._x)("Layout with slanted shape divider","label","gp-premim"),thumbnail:"content-template-slant.jpg",content:'\x3c!-- wp:generateblocks/container {"uniqueId":"0af7ec3a","isDynamic":true,"blockVersion":4,"sizing":{"height":"","maxWidth":""},"spacing":{"paddingTop":"0px","paddingRight":"0px","paddingBottom":"0px","paddingLeft":"0px"},"paddingSyncUnits":true,"borders":{"borderTopWidth":"0px","borderTopStyle":"solid","borderTopColor":"#000000","borderRightWidth":"0px","borderRightStyle":"solid","borderRightColor":"#000000","borderBottomWidth":"0px","borderBottomStyle":"solid","borderBottomColor":"#000000","borderLeftWidth":"0px","borderLeftStyle":"solid","borderLeftColor":"#000000"}} --\x3e \x3c!-- wp:generatepress/dynamic-image {"imageType":"featured-image","imageSize":"large"} /--\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"cc5683f8","shapeDividers":[{"shape":"gb-angle-1","color":"#ffffff","colorOpacity":1,"location":"bottom","height":50,"heightTablet":"","heightMobile":"","width":100,"widthTablet":"","widthMobile":"","flipHorizontally":false,"zindex":""}],"isDynamic":true,"blockVersion":4,"position":"relative","zindex":1,"sizing":{"height":"","maxWidth":""},"typography":{"fontSize":"14px"},"spacing":{"paddingTop":"0px","paddingRight":"0px","paddingBottom":"0px","paddingLeft":"0px","marginTop":"0px","marginBottom":"0px"},"paddingSyncUnits":true} /--\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"7f6bf8cd","backgroundColor":"#ffffff","shapeDividers":[],"isDynamic":true,"blockVersion":4,"position":"relative","zindex":1,"sizing":{"height":"","maxWidth":""},"spacing":{"paddingTop":"0px","paddingRight":"25px","paddingBottom":"15px","paddingLeft":"25px","marginTop":"0px","marginRight":"0px","marginBottom":"0px","marginLeft":"0px"}} --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"7fd9c317","element":"p","blockVersion":3,"typography":{"fontSize":"14px"},"spacing":{"marginBottom":"5px"},"gpDynamicTextType":"post-date","gpDynamicTextReplace":"Post date","gpDynamicDateUpdated":true} --\x3e

Post date

\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"a8ee15fd","blockVersion":3,"typography":{"fontSize":"30px"},"spacing":{"marginBottom":"15px"},"gpDynamicTextType":"title","gpDynamicLinkType":"single-post","gpDynamicTextReplace":"Hello World"} --\x3e

Hello World

\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- wp:generatepress/dynamic-content {"contentType":"post-excerpt","excerptLength":25,"useThemeMoreLink":false} /--\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"72735d03","isDynamic":true,"blockVersion":4,"display":"flex","justifyContent":"flex-end"} --\x3e \x3c!-- wp:generateblocks/button {"uniqueId":"120ee35e","hasUrl":true,"blockVersion":4,"display":"inline-flex","alignItems":"center","justifyContent":"center","typography":{"fontWeight":"700","textTransform":"uppercase","textAlign":"center"},"spacing":{"paddingTop":"15px","paddingRight":"20px","paddingBottom":"15px","paddingLeft":"20px"},"backgroundColorHover":"#222222","textColor":"#000000","textColorHover":"#ffffff","gpDynamicLinkType":"single-post"} --\x3e Read More \x3c!-- /wp:generateblocks/button --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- /wp:generateblocks/container --\x3e',meta:[{key:"_generate_block_element_editor_width_unit",value:"px"},{key:"_generate_block_element_editor_width",value:"500"},{key:"_generate_use_theme_post_container",value:!1}]},template_5:{label:(0,p._x)("Layout with centered content","label","gp-premim"),thumbnail:"content-template-centered.jpg",content:'\x3c!-- wp:generatepress/dynamic-image {"imageType":"featured-image","imageSize":"large"} /--\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"5a785d21","backgroundColor":"#ffffff","isDynamic":true,"blockVersion":4,"sizing":{"height":"","maxWidth":""},"typography":{"textAlign":"center"},"spacing":{"paddingTop":"25px","paddingRight":"25px","paddingBottom":"25px","paddingLeft":"25px"},"paddingSyncUnits":true} --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"82629d5c","blockVersion":3,"typography":{"fontSize":"25px","fontWeight":"700"},"linkColor":"#000000","gpDynamicTextType":"title","gpDynamicLinkType":"single-post","gpDynamicTextReplace":"Hello World"} --\x3e

Hello World

\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- wp:generatepress/dynamic-content {"contentType":"post-excerpt","excerptLength":15,"useThemeMoreLink":false} /--\x3e \x3c!-- wp:generateblocks/button {"uniqueId":"a1b8a609","hasUrl":true,"blockVersion":4,"display":"inline-flex","alignItems":"center","justifyContent":"center","typography":{"fontSize":"15px","textTransform":"uppercase","textAlign":"center"},"fontSize":"","spacing":{"paddingTop":"8px","paddingRight":"20px","paddingBottom":"8px","paddingLeft":"20px"},"borders":{"borderTopRightRadius":"50px","borderBottomRightRadius":"50px","borderBottomLeftRadius":"50px","borderTopLeftRadius":"50px"},"backgroundColor":"#cf2e2e","backgroundColorHover":"#222222","textColor":"#ffffff","textColorHover":"#ffffff","gpDynamicLinkType":"single-post"} --\x3e Read more \x3c!-- /wp:generateblocks/button --\x3e \x3c!-- /wp:generateblocks/container --\x3e',meta:[{key:"_generate_block_element_editor_width_unit",value:"px"},{key:"_generate_block_element_editor_width",value:"500"},{key:"_generate_use_theme_post_container",value:!1}]},template_6:{label:(0,p._x)("Layout with borders","label","gp-premim"),thumbnail:"content-template-borders.jpg",content:'\x3c!-- wp:generateblocks/container {"uniqueId":"0af4cc7c","backgroundColor":"#ffffff","isDynamic":true,"blockVersion":4,"sizing":{"height":"","maxWidth":""},"spacing":{"paddingTop":"5px","paddingRight":"5px","paddingBottom":"5px","paddingLeft":"5px"},"paddingSyncUnits":true,"borders":{"borderTopWidth":"1px","borderTopStyle":"solid","borderTopColor":"#b6b6b6","borderRightWidth":"1px","borderRightStyle":"solid","borderRightColor":"#b6b6b6","borderBottomWidth":"1px","borderBottomStyle":"solid","borderBottomColor":"#b6b6b6","borderLeftWidth":"1px","borderLeftStyle":"solid","borderLeftColor":"#b6b6b6","borderTopRightRadius":"2px","borderBottomRightRadius":"2px","borderBottomLeftRadius":"2px","borderTopLeftRadius":"2px"}} --\x3e \x3c!-- wp:generatepress/dynamic-image {"imageType":"featured-image","imageSize":"large"} /--\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"b69b5c43","isDynamic":true,"blockVersion":4,"sizing":{"height":"","maxWidth":""},"spacing":{"paddingTop":"30px","paddingRight":"30px","paddingBottom":"30px","paddingLeft":"30px"},"paddingSyncUnits":true} --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"8dfa4238","element":"p","blockVersion":3,"typography":{"fontSize":"14px","fontWeight":"700","textTransform":"uppercase"},"spacing":{"marginBottom":"5px"},"textColor":"#0693e3","className":"dynamic-term-class","gpDynamicTextType":"terms","gpDynamicLinkType":"term-archives","gpDynamicTextReplace":"Terms","gpDynamicTextTaxonomy":"category"} --\x3e

Terms

\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"29491daa","blockVersion":3,"typography":{"fontSize":"30px"},"spacing":{"marginBottom":"15px"},"gpDynamicTextType":"title","gpDynamicLinkType":"single-post","gpDynamicTextReplace":"Hello World"} --\x3e

Hello World

\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- wp:generatepress/dynamic-content {"contentType":"post-excerpt","excerptLength":25,"useThemeMoreLink":false} /--\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"d5dadc43","isDynamic":true,"blockVersion":4,"display":"flex","flexDirection":"row","alignItems":"center","justifyContent":"space-between","sizing":{"height":"","maxWidth":""},"typography":{"fontSize":"14px"},"spacing":{"paddingTop":"15px","paddingRight":"10px","paddingBottom":"10px","paddingLeft":"10px"},"borders":{"borderTopWidth":"1px","borderTopStyle":"solid","borderTopColor":"#b6b6b6"}} --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"2c30b1f9","isDynamic":true,"blockVersion":4,"sizing":{"width":"50%","widthMobile":"50%","height":"","maxWidth":""},"spacing":{"paddingTop":"0px","paddingRight":"0px","paddingBottom":"0px","paddingLeft":"0px"}} --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"fc06eba3","element":"p","blockVersion":3,"typography":{"fontSize":"14px"},"spacing":{"marginBottom":"0px"},"textColor":"#b6b6b6","gpDynamicTextType":"post-date","gpDynamicTextReplace":"Post date","gpDynamicTextTaxonomy":"category","gpDynamicDateUpdated":true} --\x3e

Post date

\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"9bb8c373","isDynamic":true,"blockVersion":4,"sizing":{"width":"50%","widthMobile":"50%","height":"","maxWidth":""},"typography":{"textAlign":"right"},"spacing":{"paddingTop":"0px","paddingRight":"0px","paddingBottom":"0px","paddingLeft":"0px"}} --\x3e \x3c!-- wp:generateblocks/button {"uniqueId":"0fcad1cd","hasUrl":true,"blockVersion":4,"display":"inline-flex","alignItems":"center","justifyContent":"center","typography":{"textTransform":"uppercase","textAlign":"center"},"spacing":{"paddingTop":"8px","paddingRight":"12px","paddingBottom":"8px","paddingLeft":"12px"},"borders":{"borderTopWidth":"2px","borderTopStyle":"solid","borderTopColor":"#0693e3","borderTopColorHover":"#222222","borderRightWidth":"2px","borderRightStyle":"solid","borderRightColor":"#0693e3","borderRightColorHover":"#222222","borderBottomWidth":"2px","borderBottomStyle":"solid","borderBottomColor":"#0693e3","borderBottomColorHover":"#222222","borderLeftWidth":"2px","borderLeftStyle":"solid","borderLeftColor":"#0693e3","borderLeftColorHover":"#222222","borderTopRightRadius":"2px","borderBottomRightRadius":"2px","borderBottomLeftRadius":"2px","borderTopLeftRadius":"2px"},"backgroundColorHover":"#222222","textColor":"#0693e3","textColorHover":"#ffffff","gpDynamicLinkType":"single-post"} --\x3e Read more \x3c!-- /wp:generateblocks/button --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- /wp:generateblocks/container --\x3e',meta:[{key:"_generate_block_element_editor_width_unit",value:"px"},{key:"_generate_block_element_editor_width",value:"500"},{key:"_generate_use_theme_post_container",value:!1}]},template_7:{label:(0,p._x)("Landscape layout","label","gp-premium"),thumbnail:"content-template-landscape.jpg",content:'\x3c!-- wp:generateblocks/container {"uniqueId":"918d68ce","isDynamic":true,"blockVersion":4,"sizing":{"height":"","maxWidth":""},"spacing":{"paddingTop":"","paddingRight":"","paddingBottom":"","paddingLeft":""},"paddingSyncUnits":true} --\x3e \x3c!-- wp:generateblocks/grid {"uniqueId":"ae18e4a9","columns":2,"horizontalGap":30,"verticalGapMobile":10,"isDynamic":true,"blockVersion":3,"useLegacyRowGap":true} --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"ff15641f","isGrid":true,"gridId":"ae18e4a9","isDynamic":true,"blockVersion":4,"sizing":{"width":"40%","widthTablet":"40%","widthMobile":"100%","height":"100%","maxWidth":""},"spacing":{"paddingTop":"0px","paddingRight":"0px","paddingBottom":"0px","paddingLeft":"0px"},"gpRemoveContainerCondition":"no-featured-image"} --\x3e \x3c!-- wp:generatepress/dynamic-image {"imageType":"featured-image","imageSize":"medium_large","linkTo":"single-post"} /--\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"64596747","isGrid":true,"gridId":"ae18e4a9","verticalAlignment":"center","isDynamic":true,"blockVersion":4,"display":"flex","flexDirection":"column","justifyContent":"center","sizing":{"width":"60%","widthTablet":"60%","widthMobile":"100%","height":"100%","maxWidth":""},"spacing":{"paddingTop":"0px","paddingRight":"20px","paddingBottom":"10px","paddingLeft":"0px","paddingTopMobile":"10px","paddingRightMobile":"10px","paddingBottomMobile":"10px","paddingLeftMobile":"10px"}} --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"ce3f6f48","isDynamic":true,"blockVersion":4,"display":"flex","alignItems":"center","sizing":{"height":"","maxWidth":""},"spacing":{"paddingTop":"0px","paddingRight":"0px","paddingBottom":"0px","paddingLeft":"0px","marginBottom":"10px"}} --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"fdbba1f9","element":"p","blockVersion":3,"typography":{"fontSize":"14px","fontWeight":"900","textTransform":"uppercase"},"spacing":{"paddingRight":"10px","marginRight":"10px","marginBottom":"0px"},"borders":{"borderRightWidth":"1px","borderRightStyle":"solid"},"className":"dynamic-term-class","gpDynamicTextType":"terms","gpDynamicTextReplace":"Category","gpDynamicTextTaxonomy":"category"} --\x3e

Category

\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"6df4d39e","element":"p","blockVersion":3,"typography":{"fontSize":"14px"},"spacing":{"marginRight":"10px","marginBottom":"0px"},"gpDynamicTextType":"post-date","gpDynamicTextReplace":"Date","gpDynamicDateUpdated":true} --\x3e

Date

\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"84923e14","blockVersion":3,"typography":{"fontSize":"28px"},"spacing":{"marginBottom":"20px"},"gpDynamicTextType":"title","gpDynamicLinkType":"single-post","gpDynamicTextReplace":"Title"} --\x3e

Title

\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- wp:generatepress/dynamic-content {"contentType":"post-excerpt","excerptLength":20} /--\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- /wp:generateblocks/grid --\x3e \x3c!-- /wp:generateblocks/container --\x3e',meta:[{key:"_generate_block_element_editor_width_unit",value:"px"},{key:"_generate_block_element_editor_width",value:"800"},{key:"_generate_use_theme_post_container",value:!0}]}},te={template_1:{label:(0,p._x)("Default next and previous buttons","label","gp-premium"),thumbnail:"archive-navigation-buttons-2.jpg",content:'\x3c!-- wp:generateblocks/container {"uniqueId":"fb6c192f","isDynamic":true,"blockVersion":4,"display":"flex","flexDirection":"row","alignItems":"center","justifyContent":"space-between","columnGap":"10px","rowGap":"10px","sizing":{"height":"","maxWidth":""},"spacing":{"paddingTop":"0px","paddingRight":"0px","paddingBottom":"0px","paddingLeft":"0px"},"paddingSyncUnits":true} --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"af38c5d0","isDynamic":true,"blockVersion":4,"sizing":{"width":"50%","widthMobile":"50%","height":"","maxWidth":""},"spacing":{"paddingTop":"0px","paddingRight":"0px","paddingBottom":"0px","paddingLeft":"0px"}} --\x3e \x3c!-- wp:generateblocks/button {"uniqueId":"aa4ef21a","hasUrl":true,"blockVersion":4,"display":"inline-flex","alignItems":"center","justifyContent":"center","typography":{"textAlign":"center"},"hasIcon":true,"iconStyles":{"width":"1em","height":"1em","paddingRight":"0.5em"},"className":"button","gpDynamicLinkType":"previous-posts"} --\x3e Previous \x3c!-- /wp:generateblocks/button --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"4f3ab895","isDynamic":true,"blockVersion":4,"sizing":{"width":"50%","widthMobile":"50%","height":"","maxWidth":""},"typography":{"textAlign":"right"},"spacing":{"paddingTop":"0px","paddingRight":"0px","paddingBottom":"0px","paddingLeft":"0px"}} --\x3e \x3c!-- wp:generateblocks/button {"uniqueId":"84010058","hasUrl":true,"blockVersion":4,"display":"inline-flex","alignItems":"center","justifyContent":"center","typography":{"textAlign":"center"},"hasIcon":true,"iconLocation":"right","iconPaddingRight":"","iconStyles":{"width":"1em","height":"1em","paddingLeft":"0.5em"},"className":"button","gpDynamicLinkType":"next-posts"} --\x3e Next \x3c!-- /wp:generateblocks/button --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- /wp:generateblocks/container --\x3e',meta:[{key:"_generate_hook",value:"generate_after_main_content"},{key:"_generate_hook_priority",value:"20"},{key:"_generate_disable_archive_navigation",value:!0},{key:"_generate_use_archive_navigation_container",value:!0}]},template_2:{label:(0,p._x)("Rounded buttons with icon","label","gp-premium"),thumbnail:"archive-navigation-buttons-1.jpg",content:'\x3c!-- wp:generateblocks/container {"uniqueId":"5edb5029","isDynamic":true,"blockVersion":4,"display":"flex","flexDirection":"row","alignItems":"center","justifyContent":"center","columnGap":"10px","sizing":{"height":"","maxWidth":""},"spacing":{"paddingTop":"0px","paddingRight":"0px","paddingBottom":"0px","paddingLeft":"0px"},"paddingSyncUnits":true} --\x3e \x3c!-- wp:generateblocks/button {"uniqueId":"4c23c469","hasUrl":true,"ariaLabel":"Previous page","blockVersion":4,"display":"inline-flex","alignItems":"center","justifyContent":"center","typography":{"textAlign":"center"},"spacing":{"paddingTop":"20px","paddingRight":"20px","paddingBottom":"20px","paddingLeft":"20px","marginTop":"","marginRight":"","marginBottom":"","marginLeft":""},"borders":{"borderTopWidth":"1px","borderTopStyle":"solid","borderTopColor":"#000000","borderRightWidth":"1px","borderRightStyle":"solid","borderRightColor":"#000000","borderBottomWidth":"1px","borderBottomStyle":"solid","borderBottomColor":"#000000","borderLeftWidth":"1px","borderLeftStyle":"solid","borderLeftColor":"#000000","borderTopRightRadius":"100px","borderBottomRightRadius":"100px","borderBottomLeftRadius":"100px","borderTopLeftRadius":"100px"},"backgroundColor":"#ffffff","backgroundColorHover":"#222222","textColor":"#000000","textColorHover":"#ffffff","hasIcon":true,"removeText":true,"iconStyles":{"width":"1em","height":"1em","paddingRight":"0.5em"},"gpDynamicLinkType":"previous-posts"} --\x3e \x3c!-- /wp:generateblocks/button --\x3e \x3c!-- wp:generateblocks/button {"uniqueId":"55622f43","hasUrl":true,"ariaLabel":"Next page","blockVersion":4,"display":"inline-flex","alignItems":"center","justifyContent":"center","typography":{"textAlign":"center"},"spacing":{"paddingTop":"20px","paddingRight":"20px","paddingBottom":"20px","paddingLeft":"20px","marginTop":"","marginRight":"","marginBottom":"","marginLeft":""},"borders":{"borderTopWidth":"1px","borderTopStyle":"solid","borderTopColor":"#000000","borderRightWidth":"1px","borderRightStyle":"solid","borderRightColor":"#000000","borderBottomWidth":"1px","borderBottomStyle":"solid","borderBottomColor":"#000000","borderLeftWidth":"1px","borderLeftStyle":"solid","borderLeftColor":"#000000","borderTopRightRadius":"100px","borderBottomRightRadius":"100px","borderBottomLeftRadius":"100px","borderTopLeftRadius":"100px"},"backgroundColor":"#ffffff","backgroundColorHover":"#222222","textColor":"#000000","textColorHover":"#ffffff","hasIcon":true,"removeText":true,"iconStyles":{"width":"1em","height":"1em","paddingRight":"0.5em"},"gpDynamicLinkType":"next-posts"} --\x3e \x3c!-- /wp:generateblocks/button --\x3e \x3c!-- /wp:generateblocks/container --\x3e',meta:[{key:"_generate_hook",value:"generate_after_main_content"},{key:"_generate_hook_priority",value:"20"},{key:"_generate_disable_archive_navigation",value:!0},{key:"_generate_use_archive_navigation_container",value:!1}]}},ne={template_1:{label:(0,p._x)("Basic single post page hero","label","gp-premium"),thumbnail:"page-hero-basic.jpg",content:'\x3c!-- wp:generateblocks/container {"uniqueId":"8b6d1c4b","backgroundColor":"#000000","textColor":"#ffffff","linkColor":"#ffffff","bgImage":{"id":"","image":{"url":"#dynamic-background-image"}},"bgOptions":{"selector":"pseudo-element","opacity":0.3,"overlay":false,"position":"center center","size":"cover","repeat":"no-repeat","attachment":""},"innerZindex":1,"isDynamic":true,"blockVersion":4,"position":"relative","overflowX":"hidden","overflowY":"hidden","sizing":{"height":"","maxWidth":""},"typography":{"textAlign":"center"},"spacing":{"paddingTop":"150px","paddingRight":"40px","paddingBottom":"150px","paddingLeft":"40px"},"gpDynamicImageBg":"featured-image"} --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"3f517a84","isDynamic":true,"blockVersion":4,"position":"relative","zindex":1,"sizing":{"maxWidth":""},"useGlobalMaxWidth":true,"spacing":{"marginRight":"auto","marginLeft":"auto"}} --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"62a8b2cc","element":"h1","blockVersion":3,"typography":{"fontSize":"50px"},"gpDynamicTextType":"title","gpDynamicTextReplace":"Page Title"} --\x3e

Page Title

\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"f49b9f49","isDynamic":true,"blockVersion":4,"display":"flex","alignItems":"center","justifyContent":"center","sizing":{"height":"","maxWidth":""},"spacing":{"paddingTop":"0px","paddingRight":"0px","paddingBottom":"0px","paddingLeft":"0px"},"paddingSyncUnits":true} --\x3e \x3c!-- wp:generatepress/dynamic-image {"imageType":"author-avatar","avatarRounded":true} /--\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"2e715b13","element":"p","blockVersion":3,"spacing":{"marginBottom":"0px","marginLeft":"10px"},"gpDynamicTextType":"post-author","gpDynamicTextReplace":"Author name"} --\x3e

Author name

\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"dedbe2c8","element":"p","blockVersion":3,"spacing":{"paddingLeft":"20px","marginBottom":"0px","marginLeft":"20px"},"borders":{"borderLeftWidth":"1px","borderLeftStyle":"solid"},"gpDynamicTextType":"post-date","gpDynamicTextReplace":"Post date","gpDynamicDateUpdated":true} --\x3e

Post date

\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- /wp:generateblocks/container --\x3e',meta:[{key:"_generate_hook",value:"generate_after_header"},{key:"_generate_disable_title",value:!0},{key:"_generate_disable_featured_image",value:!0},{key:"_generate_disable_primary_post_meta",value:!0}]},template_2:{label:(0,p._x)("Single post hero with excerpt","label","gp-premium"),thumbnail:"page-hero-excerpt.jpg",content:'\x3c!-- wp:generateblocks/container {"uniqueId":"70385d72","isDynamic":true,"blockVersion":4,"sizing":{"height":"","maxWidth":""},"spacing":{"paddingTop":"80px","paddingRight":"40px","paddingBottom":"80px","paddingLeft":"40px"}} --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"01bfa731","isDynamic":true,"blockVersion":4,"sizing":{"maxWidth":""},"useGlobalMaxWidth":true,"spacing":{"marginRight":"auto","marginLeft":"auto"}} --\x3e \x3c!-- wp:generateblocks/grid {"uniqueId":"5dc55b95","columns":2,"horizontalGap":80,"verticalGap":20,"isDynamic":true,"blockVersion":3,"useLegacyRowGap":true} --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"579e5b87","isGrid":true,"gridId":"5dc55b95","verticalAlignment":"center","isDynamic":true,"blockVersion":4,"display":"flex","flexDirection":"column","justifyContent":"center","sizing":{"width":"45%","widthTablet":"60%","widthMobile":"100%","height":"100%","maxWidth":""},"typography":{"fontSize":"14px"},"spacing":{"paddingTop":"0px","paddingRight":"0px","paddingBottom":"0px","paddingLeft":"0px"}} --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"d909e043","isDynamic":true,"blockVersion":4,"display":"flex","alignItems":"center","sizing":{"height":"","maxWidth":""},"spacing":{"paddingTop":"0px","paddingRight":"0px","paddingBottom":"0px","paddingLeft":"0px","marginBottom":"10px"},"paddingSyncUnits":true} --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"9fdb86dc","element":"p","blockVersion":3,"typography":{"fontSize":"14px","fontWeight":"900","textTransform":"uppercase"},"spacing":{"paddingRight":"10px","marginRight":"10px","marginBottom":"0px"},"borders":{"borderRightWidth":"1px","borderRightStyle":"solid"},"textColor":"#000000","linkColor":"#000000","className":"dynamic-term-class","gpDynamicTextType":"terms","gpDynamicLinkType":"term-archives","gpDynamicTextReplace":"Category","gpDynamicTextTaxonomy":"category"} --\x3e

Category

\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"1ee4cbcf","element":"p","blockVersion":3,"typography":{"fontSize":"14px"},"spacing":{"marginRight":"10px","marginBottom":"0px"},"gpDynamicTextType":"post-date","gpDynamicTextReplace":"Date","gpDynamicDateUpdated":true} --\x3e

Date

\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"56c7eb13","blockVersion":3,"spacing":{"marginBottom":"10px"},"gpDynamicTextType":"title","gpDynamicTextReplace":"Title"} --\x3e

Title

\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- wp:generatepress/dynamic-content {"contentType":"post-excerpt","useThemeMoreLink":false} /--\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"4e92c4e8","isGrid":true,"gridId":"5dc55b95","bgImage":{"id":"","image":{"url":"#dynamic-background-image"}},"bgOptions":{"selector":"element","opacity":1,"overlay":false,"position":"center center","size":"cover","repeat":"no-repeat","attachment":""},"isDynamic":true,"blockVersion":4,"sizing":{"width":"55%","widthTablet":"40%","widthMobile":"100%","minHeight":"400px","minHeightMobile":"250px","height":"100%","maxWidth":""},"spacing":{"paddingTop":"0px","paddingRight":"0px","paddingBottom":"0px","paddingLeft":"0px"},"gpDynamicImageBg":"featured-image","gpUseFallbackImageBg":true} /--\x3e \x3c!-- /wp:generateblocks/grid --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- /wp:generateblocks/container --\x3e',meta:[{key:"_generate_hook",value:"generate_after_header"},{key:"_generate_disable_title",value:!0},{key:"_generate_disable_featured_image",value:!0},{key:"_generate_disable_primary_post_meta",value:!0}]}},ie=window.wp.plugins,ae=window.wp.editPost,oe=window.wp.data,re=window.wp.domReady,pe=n.n(re),le=n(893);function ce(e,t){return String(e)===String(t)}function ge(e,t){return Array.isArray(e)?e.map((e=>t.find((t=>ce(t.value,e))))).filter((e=>e)):t.find((t=>ce(t.value,e)))||null}function se(e){return Array.isArray(e)?e:[e]}function de(e,t,n){if(!e&&!n)return t&&t.length&&t[0].name||"";const i=Array.isArray(e);return e||i?i?e.map((e=>e.name)).filter(Boolean).join(", "):e.name||"":""}function me(e){return e?Array.isArray(e)?e.filter(Boolean).map((e=>e.value)):e.value||null:null}function ue(e,t){return t.length?e.filter((e=>function(e,t){const n=e.length,i=t.length;if(n>i)return!1;if(t.indexOf(e)>=0)return!0;e:for(let a=0,o=0;a"group"===e.type?e.items.map((n=>({...n,group:e.name,index:t++}))):{...e,index:t++})).flat()}const xe=()=>{};function he({options:e,defaultValue:t,value:n,multiple:i,search:o,onChange:r=xe,onFocus:p=xe,onBlur:l=xe,closeOnSelect:c=!0,placeholder:g,getOptions:s,filterOptions:d,useFuzzySearch:m=!0,debounce:u}){const b=(0,a.useRef)(),[x,h]=(0,a.useState)(null),[f,y]=(0,a.useState)(""),[_,k]=(0,a.useState)(!1),[v,w]=function(e,t,n,i){const[o,r]=(0,a.useState)((()=>be(e))),[p,l]=(0,a.useState)(!1);return(0,a.useEffect)((()=>{let e;if(t)return e=setTimeout((()=>{const e=t(i,o);l(!0),Promise.resolve(e).then((e=>r(be(e)))).finally((()=>l(!1)))}),n),()=>{clearTimeout(e)}}),[i]),(0,a.useEffect)((()=>{r(be(e))}),[e]),[o,p]}(e,s,u,f),T=e=>{const t=function(e,t,n){if(!e)return t;if(!n)return e;if(!t)return se(e);const i=se(t),a=i.findIndex((t=>ce(t.value,e.value)));return a>=0?i.splice(a,1):i.push(e),i}(ge(decodeURIComponent(e),v),x,i);void 0===n&&h(t),r(me(t),t),setTimeout((()=>{b.current&&c&&b.current.blur()}),0)},C=function(e){const t=[];return e.forEach((e=>{if(e.group){const n=t.findIndex((t=>"group"===t.type&&t.name===e.group));n>=0?t[n].items.push(e):t.push({items:[e],type:"group",name:e.group})}else t.push(e)})),t}((E=[m?ue:null,...d||[]],M=v,z=f,E.filter(Boolean).reduce(((e,t)=>t(e,z)),M).map(((e,t)=>({...e,index:t}))))),[D,R,S]=function(e,t,n){const[i,o]=(0,a.useState)(-1);return[{onKeyDown:t=>{const n=t.key.replace("Arrow","").toLowerCase();"down"!==n&&"up"!==n||(t.preventDefault(),o(function(e,t,n){const i=n.length-1;let a=null,o=-1,r=e;for(;o++<=i&&(!a||a.disabled);)r="down"===t?r+1:r-1,r<0?r=i:r>i&&(r=0),a=n[r];return r}(i,n,e)))},onKeyUp:a=>{"Escape"===a.key?(a.preventDefault(),n.current.blur()):"Enter"===a.key&&(a.preventDefault(),e[i]&&t(e[i].value))}},i,o]}(C,T,b),I={search:f,focus:_,option:x,value:me(x),fetching:w,highlighted:R,options:C,displayValue:de(x,v,g)},B={tabIndex:"0",readOnly:!o,placeholder:g,value:_&&o?f:I.displayValue,ref:b,...D,onFocus:e=>{k(!0),p(e)},onBlur:e=>{k(!1),y(""),S(-1),l(e)},onMouseDown:e=>{_&&(e.preventDefault(),b.current.blur())},onChange:o?({target:e})=>y(e.value):null},L={tabIndex:"-1",onMouseDown(e){e.preventDefault(),T(e.currentTarget.value)}};var E,M,z;return(0,a.useEffect)((()=>{h(ge(void 0===n?t:n,v))}),[n,v]),[I,B,L]}const fe=e=>"string"==typeof e,ye=(e,t)=>fe(t)?`${t}-${e}`:t[e];function _e({optionProps:e,highlighted:t,selected:n,option:i,cls:a,renderOption:o,disabled:r}){const p={...e,value:encodeURIComponent(i.value),disabled:r},l=a({option:!0,"is-selected":n,"is-highlighted":t});return(0,le.jsxs)("li",{className:a("row"),role:"menuitem","data-index":i.index,children:[o&&o(p,i,{selected:n,highlighted:t},l),!o&&(0,le.jsx)("button",{type:"button",className:l,...p,children:i.name})]})}var ke=(0,a.memo)(_e);function ve(e){const{options:t,cls:n,renderOption:i,renderGroupHeader:a,optionProps:o,snapshot:r,disabled:p}=e;return(0,le.jsx)("ul",{className:n("options"),children:t.map((t=>{return"group"===t.type?(0,le.jsx)("li",{role:"none",className:n("row"),children:(0,le.jsxs)("div",{className:n("group"),children:[(0,le.jsx)("div",{className:n("group-header"),children:a?a(t.name):t.name}),(0,le.jsx)(ve,{...e,options:t.items})]})},t.name):(0,le.jsx)(ke,{option:t,optionProps:o,cls:n,renderOption:i,selected:(l=t,c=r.option,!!c&&(Array.isArray(c)?c.findIndex((e=>e.value===l.value))>=0:c.value===l.value)),highlighted:r.highlighted===t.index,disabled:t.disabled||p},t.value);var l,c}))})}var we=(0,a.memo)(ve);const Te=(0,a.forwardRef)((({disabled:e,placeholder:t,multiple:n,search:i,autoFocus:o,autoComplete:r,id:p,closeOnSelect:l,className:c,renderValue:g,renderOption:s,renderGroupHeader:d,fuzzySearch:m,emptyMessage:u,value:b,...x},h)=>{const f=(0,a.useRef)(null),y=e=>function(e,t){return fe(e)?ye(e,t):Object.entries(e).filter((([e,t])=>e&&t)).map((([e])=>ye(e,t))).join(" ")}(e,c),[_,k]=(0,a.useState)(b),[v,w,T]=he({value:_,placeholder:t,multiple:n,search:i,closeOnSelect:l&&!n,useFuzzySearch:m,...x}),{highlighted:C,value:D,fetching:R,focus:S}=v,I={...w,autoFocus:o,autoComplete:r,disabled:e};return(0,a.useEffect)((()=>{const{current:e}=f;if(e){const t=Array.isArray(D)?D[0]:D,n=e.querySelector(C>-1?`[data-index="${C}"]`:`[value="${encodeURIComponent(t)}"]`);if(n){const t=e.getBoundingClientRect(),i=n.getBoundingClientRect();e.scrollTop=n.offsetTop-t.height/2+i.height/2}}}),[D,C,f.current]),(0,a.useEffect)((()=>k(b)),[b]),(0,le.jsxs)("div",{ref:h,id:p,className:y({container:!0,"is-multiple":n,"is-disabled":e,"is-loading":R,"has-focus":S}),children:[(!n||t||i)&&(0,le.jsxs)("div",{className:y("value"),children:[g&&g(I,v,y("input")),!g&&(0,le.jsx)("input",{...I,className:y("input")})]}),(0,le.jsxs)("div",{className:y("select"),ref:f,onMouseDown:e=>e.preventDefault(),children:[v.options.length>0&&(0,le.jsx)(we,{options:v.options,optionProps:T,renderOption:s,renderGroupHeader:d,disabled:e,snapshot:v,cls:y}),!v.options.length&&(0,le.jsx)("ul",{className:y("options"),children:!v.options.length&&u&&(0,le.jsx)("li",{className:y("not-found"),children:u})})]})]})}));Te.defaultProps={options:[],fuzzySearch:!0,printOptions:"auto",closeOnSelect:!0,debounce:250,autoComplete:"on",className:"select-search"},Te.displayName="SelectSearch";var Ce=(0,a.memo)(Te);function De(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function Re(e){return(0,a.createElement)("div",{className:"gp-select-search"},(0,a.createElement)(Ce,function(e){for(var t=1;t0&&S(o)}},void 0!==V[e].thumbnail&&!!V[e].thumbnail&&(0,a.createElement)("img",{src:gpPremiumBlockElements.templateImageUrl+"/"+V[e].thumbnail,alt:V[e].label}),(0,a.createElement)("div",{className:"gpp-block-template-label"},V[e].label))})))),("right-sidebar"===l||"left-sidebar"===l)&&(0,a.createElement)(g.Notice,{status:"info",isDismissible:!1,className:"gpp-block-element-notice"},(0,p.__)("This will remove the current sidebar widgets for the selected sidebar. Your layout must have a sidebar set for this Element to show.","gp-premium")),"site-footer"===l&&(0,a.createElement)(g.BaseControl,null,(0,a.createElement)(g.Notice,{status:"info",isDismissible:!1,className:"gpp-block-element-notice"},(0,p.__)("This Element will replace your site footer area that holds your copyright message. It will not replace footer widgets if they exist.","gp-premium"))),"post-meta-template"===l&&(0,a.createElement)(c.Fragment,null,(0,a.createElement)(g.SelectControl,{label:(0,p.__)("Location","gp-premium"),value:b,options:[{label:(0,p.__)("After post title","gp-premium"),value:"after-post-title"},{label:(0,p.__)("Before post title","gp-premium"),value:"before-post-title"},{label:(0,p.__)("After content","gp-premium"),value:"after-content"},{label:(0,p.__)("Custom","gp-premium"),value:"custom"}],onChange:function(e){S({_generate_post_meta_location:e})}})),P.length>1&&(0,a.createElement)(g.SelectControl,{label:(0,p.__)("Quick hook select","gp-premium"),value:s||"",options:P,onChange:function(e){S({_generate_hook:e})}}),(!l||"hook"===l||"page-hero"===l||"post-navigation-template"===l||"archive-navigation-template"===l||"post-meta-template"===l&&"custom"===b)&&(0,a.createElement)(c.Fragment,null,(0,a.createElement)(g.BaseControl,{id:"gpp-hook-select",label:(0,p.__)("Hook name","gp-premium"),className:"gpp-hook-select"},(0,a.createElement)(Re,{options:M,value:s,placeholder:(0,p.__)("Choose your hook","gp-premium"),search:!0,onChange:function(e){e!==s&&S({_generate_hook:e||""})}})),"custom"===s&&(0,a.createElement)(g.TextControl,{label:(0,p.__)("Custom hook name","gp-premium"),type:"text",onChange:function(e){S({_generate_custom_hook:e||""})},value:d||""}),!!s&&(0,a.createElement)(g.TextControl,{label:(0,p.__)("Priority","gp-premium"),type:"text",onChange:function(e){S({_generate_hook_priority:e||""})},value:m||"",placeholder:"10"})),"post-meta-template"===l&&(0,a.createElement)(c.Fragment,null,(""===b||"after-post-title"===b||"before-post-title"===b||"custom"===b)&&(0,a.createElement)(g.ToggleControl,{checked:!!x,label:(0,p.__)("Replace default primary post meta","gp-premium"),onChange:function(e){S({_generate_disable_primary_post_meta:e})}}),("after-content"===b||"custom"===b)&&(0,a.createElement)(g.ToggleControl,{checked:!!h,label:(0,p.__)("Replace default secondary post meta","gp-premium"),onChange:function(e){S({_generate_disable_secondary_post_meta:e})}})),"content-template"===l&&(0,a.createElement)(c.Fragment,null,(0,a.createElement)(g.SelectControl,{label:(0,p.__)("Tag name","gp-premium"),value:u,options:[{label:"article",value:"article"},{label:"div",value:"div"},{label:"section",value:"section"},{label:"aside",value:"aside"}],onChange:function(e){S({_generate_post_loop_item_tagname:e})}}),(0,a.createElement)(g.SelectControl,{label:(0,p.__)("Apply to","gp-premium"),value:k,options:[{label:(0,p.__)("All posts","gp-premium"),value:""},{label:(0,p.__)("Posts with term","gp-premium"),value:"has-term"},{label:(0,p.__)("Posts with custom field","gp-premium"),value:"has-post-meta"},{label:(0,p.__)("First post","gp-premium"),value:"is-first-post"}],onChange:function(e){S({_generate_post_loop_item_display:e})}}),""!==k&&(0,a.createElement)(c.Fragment,null,"has-term"===k&&(0,a.createElement)(c.Fragment,null,(0,a.createElement)(g.SelectControl,{label:(0,p.__)("Taxonomy","gp-premium"),value:v,options:z,onChange:function(e){S({_generate_post_loop_item_display_tax:e})}}),!!v&&(0,a.createElement)(g.TextControl,{label:(0,p.__)("Term name","gp-premium"),type:"text",onChange:function(e){S({_generate_post_loop_item_display_term:e||""})},value:w||""})),"has-post-meta"===k&&(0,a.createElement)(g.TextControl,{label:(0,p.__)("Post meta name","gp-premium"),type:"text",onChange:function(e){S({_generate_post_loop_item_display_post_meta:e||""})},value:T||""}),q.length>0&&(0,a.createElement)(c.Fragment,null,(0,a.createElement)(g.BaseControl,null,(0,a.createElement)(g.ComboboxControl,{className:"editor-page-attributes__parent",label:(0,p.__)("Parent Element","gp-premium"),help:(0,p.__)("Set a parent Element to inherit in case the above conditions do not apply.","gp-premim"),value:L,options:q,onFilterValueChange:function(e){e&&$()(I(e),300)},onChange:function(e){I(e)}})),!!L&&(0,a.createElement)(g.TextControl,{type:"number",label:(0,p.__)("Display Order","gp-premium"),onChange:function(e){B(e)},value:E}))),(0,a.createElement)(g.ToggleControl,{checked:!!_,label:(0,p.__)("Keep default post container","gp-premium"),onChange:function(e){S({_generate_use_theme_post_container:e})}})),"page-hero"===l&&(0,a.createElement)(c.Fragment,null,(0,a.createElement)(g.ToggleControl,{checked:!!f,label:(0,p.__)("Disable title","gp-premium"),onChange:function(e){S({_generate_disable_title:e})}}),(0,a.createElement)(g.ToggleControl,{checked:!!y,label:(0,p.__)("Disable featured image","gp-premium"),onChange:function(e){S({_generate_disable_featured_image:e})}}),(0,a.createElement)(g.ToggleControl,{checked:!!x,label:(0,p.__)("Disable primary post meta","gp-premium"),onChange:function(e){S({_generate_disable_primary_post_meta:e})}})),"site-footer"===l&&(0,a.createElement)(c.Fragment,null,(0,a.createElement)(g.TextControl,{className:"gpp-block-dynamic-year",type:"text",readOnly:!0,value:"{{current_year}}",label:(0,p.__)("Current year template tag","gp-premium"),help:(0,p.__)("Use the above template tag to add the current year to your footer.","gp-premium")})),"post-navigation-template"===l&&(0,a.createElement)(c.Fragment,null,(0,a.createElement)(g.ToggleControl,{checked:!!C,label:(0,p.__)("Disable default post navigation","gp-premium"),onChange:function(e){S({_generate_disable_post_navigation:e})}}),(0,a.createElement)(g.ToggleControl,{checked:!!R,label:(0,p.__)("Add default archive navigation container","gp-premium"),onChange:function(e){S({_generate_use_archive_navigation_container:e})}})),"archive-navigation-template"===l&&(0,a.createElement)(c.Fragment,null,(0,a.createElement)(g.ToggleControl,{checked:!!D,label:(0,p.__)("Disable default pagination","gp-premium"),onChange:function(e){S({_generate_disable_archive_navigation:e})}}),(0,a.createElement)(g.ToggleControl,{checked:!!R,label:(0,p.__)("Keep default archive navigation container","gp-premium"),onChange:function(e){S({_generate_use_archive_navigation_container:e})}}))))}}]),o}(c.Component),Le=(0,oe.withSelect)((function(e){var t=e("core/editor").getEditedPostAttribute;return{meta:t("meta"),elementParent:t("parent"),elementMenuOrder:t("menu_order")}})),Ee=(0,oe.withDispatch)((function(e,t){var n=t.meta,i=e("core/editor").editPost;return{updateMeta:function(e){i({meta:Ie(Ie({},n),e)})},updateParentId:function(e){i({parent:e})},updateOrder:function(e){i({menu_order:e})}}})),Me=(0,s.compose)([Le,Ee])(Be);(0,ie.registerPlugin)("generatepress-block-element",{icon:null,render:Me}),pe()((function(){return(0,ie.unregisterPlugin)("generatepress-content-width")}))}()}(); \ No newline at end of file diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/dist/customizer.asset.php b/wp-content/upgrade-temp-backup/plugins/gp-premium/dist/customizer.asset.php deleted file mode 100644 index ee571e28..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/dist/customizer.asset.php +++ /dev/null @@ -1 +0,0 @@ - array('wp-hooks', 'wp-i18n'), 'version' => '4ec1543129b0728cd3b0'); diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/dist/customizer.js b/wp-content/upgrade-temp-backup/plugins/gp-premium/dist/customizer.js deleted file mode 100644 index 3a201d2e..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/dist/customizer.js +++ /dev/null @@ -1 +0,0 @@ -!function(){"use strict";function e(o){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(o)}function o(o){var r=function(o,r){if("object"!==e(o)||null===o)return o;var t=o[Symbol.toPrimitive];if(void 0!==t){var n=t.call(o,"string");if("object"!==e(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(o)}(o);return"symbol"===e(r)?r:String(r)}var r=window.wp.hooks,t=window.wp.i18n;function n(e,o){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);o&&(t=t.filter((function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable}))),r.push.apply(r,t)}return r}function a(e){for(var r=1;r array('react', 'wp-api-fetch', 'wp-components', 'wp-element', 'wp-i18n'), 'version' => '0ab64c3a1832f10e060d'); diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/dist/dashboard.js b/wp-content/upgrade-temp-backup/plugins/gp-premium/dist/dashboard.js deleted file mode 100644 index 861ddff5..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/dist/dashboard.js +++ /dev/null @@ -1 +0,0 @@ -!function(){var e,t={373:function(e,t,n){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function s(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==r(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var s=n.call(e,"string");if("object"!==r(s))return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===r(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&void 0!==arguments[0]?arguments[0]:u;a(!0),S(!!e);var t=document.querySelector(".generatepress-dashboard__section-item-message");t.classList.remove("generatepress-dashboard__section-item-message__show"),p()({path:"/generatepress-pro/v1/license",method:"POST",data:{key:e,status:f}}).then((function(e){a(!1),t.classList.add("generatepress-dashboard__section-item-message__show"),e.success&&e.response?(t.classList.remove("generatepress-dashboard__section-item-message__error"),"valid"===e.response.license?t.textContent=(0,c.__)("License key activated.","gp-premium"):"deactivated"===e.response.license?t.textContent=(0,c.__)("License key deactivated.","gp-premium"):t.textContent=e.response,h(e.response.license),setTimeout((function(){t.classList.remove("generatepress-dashboard__section-item-message__show")}),3e3)):(t.classList.add("generatepress-dashboard__section-item-message__error"),t.textContent=e.response)}))};return(0,i.createElement)(i.Fragment,null,(0,i.createElement)("div",{className:"generatepress-dashboard__section generatepress-license-key-area"},(0,i.createElement)("div",{className:"generatepress-dashboard__section-title"},(0,i.createElement)("h2",null,(0,c.__)("License Key","gp-premium")),(0,i.createElement)("span",{className:"generatepress-dashboard__section-item-message"})),(0,i.createElement)("div",{className:"generatepress-dashboard__section-item"},(0,i.createElement)(l.Notice,{className:"generatepress-dashboard__section-license-notice",isDismissible:!1,status:"valid"===f?"success":"warning"},"valid"===f?(0,i.createElement)("span",null,(0,c.__)("Receiving premium updates.","gp-premium")):(0,i.createElement)("span",null,(0,c.__)("Not receiving premium updates.","gp-premium"))),(0,i.createElement)("div",{className:"generatepress-dashboard__section-license-key"},w?(0,i.createElement)(l.TextControl,{type:"text",autoComplete:"off",value:u,disabled:!0}):(0,i.createElement)(i.Fragment,null,(0,i.createElement)(l.TextControl,{placeholder:(0,c.__)("Enter your license key to activate updates.","gp-premium"),type:"text",autoComplete:"off",onChange:function(e){return g(e)}}),!!u&&(0,i.createElement)(l.Button,{variant:"primary",disabled:!!s,onClick:function(){return O()}},s&&(0,i.createElement)(l.Spinner,null),!s&&(0,c.__)("Save key"))),!!w&&!!u&&(0,i.createElement)(l.Button,{variant:"primary",onClick:function(){g(""),O("")}},(0,c.__)("Clear key","generateblocks"))),""!==u&&(0,i.createElement)("div",{className:"generatepress-dashboard__section-beta-tester"},(0,i.createElement)(l.ToggleControl,{label:(0,c.__)("Receive development version updates"),help:(0,c.__)("Get alpha, beta, and release candidate updates directly to your Dashboard.","gp-premium"),checked:!!v,onChange:function(e){y(e),function(e){var t=document.querySelector(".generatepress-dashboard__section-item-message");t.classList.remove("generatepress-dashboard__section-item-message__show"),p()({path:"/generatepress-pro/v1/beta",method:"POST",data:{beta:e}}).then((function(e){a(!1),t.classList.add("generatepress-dashboard__section-item-message__show"),e.success&&e.response?(t.classList.remove("generatepress-dashboard__section-item-message__error"),t.textContent=e.response,setTimeout((function(){t.classList.remove("generatepress-dashboard__section-item-message__show")}),3e3)):(t.classList.add("generatepress-dashboard__section-item-message__error"),t.textContent=e.response)}))}(e)}})))))};window.addEventListener("DOMContentLoaded",(function(){(0,m.render)((0,i.createElement)(b,null),document.getElementById("generatepress-license-key"))}));var v=function(){var e=o((0,m.useState)(!1),2),t=e[0],n=e[1],s=o((0,m.useState)(!1),2),a=s[0],d=s[1],u=o((0,m.useState)(!1),2),_=u[0],f=u[1],h=o((0,m.useState)(!1),2),b=h[0],v=h[1],y=o((0,m.useState)("all"),2),E=y[0],w=y[1];return(0,m.useEffect)((function(){t||n(!0)})),t?(0,i.createElement)(i.Fragment,null,(0,i.createElement)("div",{className:"generatepress-dashboard__section"},(0,i.createElement)("div",{className:"generatepress-dashboard__section-title"},(0,i.createElement)("h2",null,(0,c.__)("Import / Export","gp-premium"))),(0,i.createElement)("div",{className:"generatepress-dashboard__section-item"},(0,i.createElement)("div",{className:"generatepress-dashboard__section-item-content"},(0,i.createElement)("div",{className:"generatepress-dashboard__section-item-title"},(0,c.__)("Export","gp-premium")),(0,i.createElement)("div",{className:"generatepress-dashboard__section-item-description"},(0,c.__)("Export your customizer settings.","gp-premium"))),(0,i.createElement)("div",{className:"generatepress-dashboard__section-item-action"},(0,i.createElement)("span",{className:"generatepress-dashboard__section-item-message"}),(0,i.createElement)(l.ButtonGroup,{className:"generatepress-dashboard__section-item-export-type"},(0,i.createElement)(l.Button,{isPrimary:"all"===E,onClick:function(){return w("all")}},(0,c.__)("All","gp-premium")),(0,i.createElement)(l.Button,{isPrimary:"global-colors"===E,onClick:function(){return w("global-colors")}},(0,c.__)("Global Colors","gp-premium")),(0,i.createElement)(l.Button,{isPrimary:"typography"===E,onClick:function(){return w("typography")}},(0,c.__)("Typography","gp-premium"))),(0,i.createElement)(l.Button,{disabled:!!a,isPrimary:!0,onClick:function(e){return function(e){d(!0);var t=e.target.previousElementSibling.previousElementSibling;p()({path:"/generatepress-pro/v1/export",method:"POST",data:{items:!1,type:E}}).then((function(e){if(d(!1),t.classList.add("generatepress-dashboard__section-item-message__show"),"object"===r(e.response)?t.textContent=(0,c.__)("Options exported","gp-premium"):t.textContent=e.response,e.success&&e.response){var n=(new Date).toISOString().slice(0,10),s="generatepress-settings-"+E+"-"+n+".json",a=new Blob([JSON.stringify(e.response)],{type:"application/json",name:s});g()(a,s),setTimeout((function(){t.classList.remove("generatepress-dashboard__section-item-message__show")}),3e3)}else t.classList.add("generatepress-dashboard__section-item-message__error")}))}(e)}},!!a&&(0,i.createElement)(l.Spinner,null),!a&&(0,c.__)("Export","gp-premium")))),(0,i.createElement)("div",{className:"generatepress-dashboard__section-item"},(0,i.createElement)("div",{className:"generatepress-dashboard__section-item-content"},(0,i.createElement)("div",{className:"generatepress-dashboard__section-item-title"},(0,c.__)("Import","gp-premium")),(0,i.createElement)("div",{className:"generatepress-dashboard__section-item-description"},(0,c.__)("Import your customizer settings.","gp-premium"))),(0,i.createElement)("div",{className:"generatepress-dashboard__section-item-action"},(0,i.createElement)("span",{className:"generatepress-dashboard__section-item-message"}),(0,i.createElement)("input",{type:"file",accept:".json",onChange:function(e){var t=new FileReader;t.onloadend=function(){var e=t.result;(e=JSON.parse(e))&&v(e)},t.readAsText(e.target.files[0])}}),(0,i.createElement)(l.Button,{disabled:!!_||!b,isPrimary:!0,onClick:function(e){window.confirm((0,c.__)("This can overwrite existing settings and cannot be undone.","gp-premium"))&&function(e){f(!0);var t=e.target.previousElementSibling.previousElementSibling,n=e.target.previousElementSibling;n.style.display="none",p()({path:"/generatepress-pro/v1/import",method:"POST",data:{import:b}}).then((function(e){f(!1),t.classList.add("generatepress-dashboard__section-item-message__show"),"object"===r(e.response)?t.textContent=(0,c.__)("Options imported.","gp-premium"):t.textContent=e.response,e.success&&e.response?setTimeout((function(){t.classList.remove("generatepress-dashboard__section-item-message__show"),n.style.display="block",n.value=""}),3e3):t.classList.add("generatepress-dashboard__section-item-message__error")}))}(e)}},!!_&&(0,i.createElement)(l.Spinner,null),!_&&(0,c.__)("Import","gp-premium")))))):(0,i.createElement)(l.Placeholder,{className:"generatepress-dashboard__placeholder"},(0,i.createElement)(l.Spinner,null))};window.addEventListener("DOMContentLoaded",(function(){(0,m.render)((0,i.createElement)(v,null),document.getElementById("generatepress-import-export-pro"))}));var y=function(){var e=o((0,m.useState)(!1),2),t=e[0],n=e[1],s=o((0,m.useState)(!1),2),a=s[0],d=s[1];return(0,m.useEffect)((function(){t||n(!0)})),t?(0,i.createElement)(i.Fragment,null,(0,i.createElement)("div",{className:"generatepress-dashboard__section"},(0,i.createElement)("div",{className:"generatepress-dashboard__section-title",style:{marginBottom:0}},(0,i.createElement)("h2",null,(0,c.__)("Reset","gp-premium"))),(0,i.createElement)("div",{className:"generatepress-dashboard__section-item-description",style:{marginTop:0}},(0,c.__)("Reset your customizer settings.","gp-premium")),(0,i.createElement)(l.Button,{className:"generatepress-dashboard__reset-button",style:{marginTop:"10px"},disabled:!!a,isPrimary:!0,onClick:function(e){window.confirm((0,c.__)("This will delete all of your customizer settings. It cannot be undone.","gp-premium"))&&function(e){d(!0);var t=e.target.nextElementSibling;p()({path:"/generatepress-pro/v1/reset",method:"POST",data:{items:!1}}).then((function(e){d(!1),t.classList.add("generatepress-dashboard__section-item-message__show"),"object"===r(e.response)?t.textContent=(0,c.__)("Settings reset.","gp-premium"):t.textContent=e.response,e.success&&e.response?setTimeout((function(){t.classList.remove("generatepress-dashboard__section-item-message__show")}),3e3):t.classList.add("generatepress-dashboard__section-item-message__error")}))}(e)}},!!a&&(0,i.createElement)(l.Spinner,null),!a&&(0,c.__)("Reset","gp-premium")),(0,i.createElement)("span",{className:"generatepress-dashboard__section-item-message",style:{marginLeft:"10px"}}))):(0,i.createElement)(l.Placeholder,{className:"generatepress-dashboard__placeholder"},(0,i.createElement)(l.Spinner,null))};window.addEventListener("DOMContentLoaded",(function(){(0,m.render)((0,i.createElement)(y,null),document.getElementById("generatepress-reset-pro"))}))},162:function(e,t,n){var r,s;void 0===(s="function"==typeof(r=function(){"use strict";function t(e,t,n){var r=new XMLHttpRequest;r.open("GET",e),r.responseType="blob",r.onload=function(){i(r.response,t,n)},r.onerror=function(){console.error("could not download file")},r.send()}function r(e){var t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch(e){}return 200<=t.status&&299>=t.status}function s(e){try{e.dispatchEvent(new MouseEvent("click"))}catch(n){var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var a="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof n.g&&n.g.global===n.g?n.g:void 0,o=a.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),i=a.saveAs||("object"!=typeof window||window!==a?function(){}:"download"in HTMLAnchorElement.prototype&&!o?function(e,n,o){var i=a.URL||a.webkitURL,c=document.createElement("a");n=n||e.name||"download",c.download=n,c.rel="noopener","string"==typeof e?(c.href=e,c.origin===location.origin?s(c):r(c.href)?t(e,n,o):s(c,c.target="_blank")):(c.href=i.createObjectURL(e),setTimeout((function(){i.revokeObjectURL(c.href)}),4e4),setTimeout((function(){s(c)}),0))}:"msSaveOrOpenBlob"in navigator?function(e,n,a){if(n=n||e.name||"download","string"!=typeof e)navigator.msSaveOrOpenBlob(function(e,t){return void 0===t?t={autoBom:!1}:"object"!=typeof t&&(console.warn("Deprecated: Expected third argument to be a object"),t={autoBom:!t}),t.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\ufeff",e],{type:e.type}):e}(e,a),n);else if(r(e))t(e,n,a);else{var o=document.createElement("a");o.href=e,o.target="_blank",setTimeout((function(){s(o)}))}}:function(e,n,r,s){if((s=s||open("","_blank"))&&(s.document.title=s.document.body.innerText="downloading..."),"string"==typeof e)return t(e,n,r);var i="application/octet-stream"===e.type,c=/constructor/i.test(a.HTMLElement)||a.safari,l=/CriOS\/[\d]+/.test(navigator.userAgent);if((l||i&&c||o)&&"undefined"!=typeof FileReader){var m=new FileReader;m.onloadend=function(){var e=m.result;e=l?e:e.replace(/^data:[^;]*;/,"data:attachment/file;"),s?s.location.href=e:location=e,s=null},m.readAsDataURL(e)}else{var d=a.URL||a.webkitURL,p=d.createObjectURL(e);s?s.location=p:location.href=p,s=null,setTimeout((function(){d.revokeObjectURL(p)}),4e4)}});a.saveAs=i.saveAs=i,e.exports=i})?r.apply(t,[]):r)||(e.exports=s)}},n={};function r(e){var s=n[e];if(void 0!==s)return s.exports;var a=n[e]={exports:{}};return t[e].call(a.exports,a,a.exports,r),a.exports}r.m=t,e=[],r.O=function(t,n,s,a){if(!n){var o=1/0;for(m=0;m=a)&&Object.keys(r.O).every((function(e){return r.O[e](n[c])}))?n.splice(c--,1):(i=!1,a0&&e[m-1][2]>a;m--)e[m]=e[m-1];e[m]=[n,s,a]},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,{a:t}),t},r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){var e={966:0,100:0};r.O.j=function(t){return 0===e[t]};var t=function(t,n){var s,a,o=n[0],i=n[1],c=n[2],l=0;if(o.some((function(t){return 0!==e[t]}))){for(s in i)r.o(i,s)&&(r.m[s]=i[s]);if(c)var m=c(r)}for(t&&t(n);l array('react', 'wp-edit-post', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-plugins'), 'version' => 'd1ae659d7b937f65b15d'); diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/dist/editor.css b/wp-content/upgrade-temp-backup/plugins/gp-premium/dist/editor.css deleted file mode 100644 index 4d7bafd0..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/dist/editor.css +++ /dev/null @@ -1 +0,0 @@ -.gpp-active-element-type{color:#555;font-size:11px;text-transform:uppercase} diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/dist/editor.js b/wp-content/upgrade-temp-backup/plugins/gp-premium/dist/editor.js deleted file mode 100644 index 6044d7b4..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/dist/editor.js +++ /dev/null @@ -1 +0,0 @@ -!function(){"use strict";function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(t,n){for(var r=0;r array('react', 'wp-api-fetch', 'wp-components', 'wp-element', 'wp-html-entities', 'wp-i18n'), 'version' => '6e43dc7500e77c46bb9b'); diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/dist/site-library.css b/wp-content/upgrade-temp-backup/plugins/gp-premium/dist/site-library.css deleted file mode 100644 index 82d72955..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/dist/site-library.css +++ /dev/null @@ -1 +0,0 @@ -.generatepress-site-library{box-sizing:border-box;margin:40px auto 0;max-width:1200px;padding:0 20px}.generatepress-site-library .generatepress-site-library-opened{bottom:0;display:flex;height:100vh;left:0;position:fixed;right:0;top:0;width:100%;z-index:99999}.generatepress-site-library .generatepress-site-library-info{background:#fff;border-left:1px solid #ddd;padding-bottom:50px;position:relative;width:300px}.generatepress-site-library .generatepress-site-library-info .generatepress-site-library-header{border-bottom:1px solid #ddd;display:flex;justify-content:space-between;padding-left:20px}.generatepress-site-library .generatepress-site-library-info .generatepress-site-library-header .has-author{margin-bottom:0}.generatepress-site-library .generatepress-site-library-info .generatepress-site-library-header .site-library-author{color:#777;display:block;font-size:11px;margin-bottom:1em;margin-top:3px}.generatepress-site-library .generatepress-site-library-info .generatepress-site-library-header button{border-left:1px solid #ddd;height:auto}.generatepress-site-library .generatepress-site-library-info .generatepress-site-library-footer{border-top:1px solid #ddd;bottom:0;display:flex;left:0;position:absolute;right:0}.generatepress-site-library .generatepress-site-library-info .generatepress-site-library-footer button{flex-grow:1;font-size:20px;height:50px;justify-content:center}.generatepress-site-library .generatepress-site-library-info .generatepress-site-library-footer button:not(:last-child){border-right:1px solid #ddd}.generatepress-site-library .generatepress-site-library-info .generatepress-site-library-content{box-sizing:border-box;height:calc(100% - 53px);overflow-y:auto;padding:20px}.generatepress-site-library .generatepress-site-library-info .generatepress-site-library-content>:first-child{margin-top:0}.generatepress-site-library .generatepress-site-library-info .generatepress-site-library-content h3{margin-top:30px}.generatepress-site-library .generatepress-site-library-info .generatepress-site-library-content h3+.gpp-library-action-button{margin-top:10px}.generatepress-site-library .generatepress-site-library-info .generatepress-site-library-plugins{font-size:12px;list-style-type:disc;margin-bottom:0;margin-left:1.5em}.generatepress-site-library .generatepress-site-library-info .generatepress-site-library-plugins li{margin-bottom:0}.generatepress-site-library .generatepress-site-library-iframe{background:#fff;display:flex;justify-content:center;width:calc(100% - 300px)}.generatepress-site-library .generatepress-site-library-iframe iframe{height:100%;width:100%}.generatepress-site-library .gpp-library-action-button{align-items:center;display:flex;margin-top:30px}.generatepress-site-library .gpp-library-action-button button .components-spinner{margin:0}.generatepress-site-library .gpp-library-action-button .gpp-library-action-message{padding-left:10px}.generatepress-site-library .generatepress-site-library-filter{align-items:center;background:#fff;border:1px solid #ddd;border-radius:4px;display:flex;justify-content:space-between;margin-bottom:40px;padding:20px}.generatepress-site-library .generatepress-site-library-filter>.components-base-control{margin-right:20px}.generatepress-site-library .generatepress-site-library-filter>.components-base-control .components-base-control__field{margin-bottom:0}.generatepress-site-library .generatepress-site-library-filter .components-select-control label{font-size:11px}.generatepress-site-library-list{display:flex;flex-wrap:wrap;list-style:none;margin-left:-30px;padding:0}.generatepress-site-library-list>.generatepress-site-library-list-item{box-sizing:border-box;flex:0 0 33.333%;padding-bottom:30px;padding-left:30px;width:33.333%}@media screen and (max-width:840px){.generatepress-site-library-list>.generatepress-site-library-list-item{flex:0 0 50%;width:50%}}@media screen and (max-width:450px){.generatepress-site-library-list>.generatepress-site-library-list-item{flex:0 0 100%;width:100%}}.generatepress-site-library-list>.generatepress-site-library-list-item>button{background-color:#fff;border:1px solid #ddd;border-radius:4px;box-shadow:0 0 0 2px transparent;cursor:pointer;display:block;padding:5px;text-align:center;transition:border-color .2s,box-shadow .2s;width:100%}.generatepress-site-library-list>.generatepress-site-library-list-item>button:active,.generatepress-site-library-list>.generatepress-site-library-list-item>button:focus,.generatepress-site-library-list>.generatepress-site-library-list-item>button:hover{box-shadow:0 0 0 2px #216eb7}.generatepress-site-library-list>.generatepress-site-library-list-item>button .generatepress-site-library-list-item-image{display:block;position:relative}.generatepress-site-library-list>.generatepress-site-library-list-item>button .generatepress-site-library-list-item-image img{border-top-left-radius:4px;border-top-right-radius:4px;display:block;height:auto;width:100%}.generatepress-site-library-list>.generatepress-site-library-list-item .generatepress-site-library-list-item-title{font-size:20px;padding:20px 20px 10px}.generatepress-site-library-list>.generatepress-site-library-list-item .generatepress-site-library-list-item-title .generatepress-site-library-required-version{color:#000;display:block;font-size:12px;padding-top:5px}.generatepress-site-library-restore{background:#fff;border:1px solid #ddd;padding:40px}.generatepress-site-library-restore h2{font-size:25px;margin-top:0}.components-placeholder.gpp-library-placeholder{background:transparent;border:0;box-shadow:0 0 0}.components-placeholder.gpp-library-placeholder .components-placeholder__fieldset{justify-content:center}.generatepress-site-library-no-results{padding:50px;text-align:center}.generatepress-site-library-no-results button .components-spinner,.generatepress-site-library-refresh button .components-spinner{margin:0}.generatepress-site-library-refresh{text-align:center}.appearance_page_generatepress-library #wpbody-content .metabox-holder,.appearance_page_generatepress-library #wpcontent{padding:0}.site-library-header{background-color:#fff;box-shadow:0 1px 0 rgba(200,215,225,.5),0 1px 2px #ddd;margin-bottom:40px;padding:20px}.site-library-header .site-library-container{box-sizing:border-box;display:flex;margin:0 auto;max-width:1200px;padding:0 20px}.site-library-header .library-links{margin-left:auto}.site-library-header .library-links a{display:inline-block;margin:0 10px}.site-library-header .library-title{color:#000;font-size:20px;font-weight:500}.generatepress-dashboard-tabs{box-sizing:border-box;margin:0 auto;max-width:1200px;padding:0 20px} diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/dist/site-library.js b/wp-content/upgrade-temp-backup/plugins/gp-premium/dist/site-library.js deleted file mode 100644 index 54359955..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/dist/site-library.js +++ /dev/null @@ -1,6 +0,0 @@ -!function(){var e={703:function(e,t,n){"use strict";var r=n(414);function i(){}function a(){}a.resetWarningCache=i,e.exports=function(){function e(e,t,n,i,a,s){if(s!==r){var o=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw o.name="Invariant Violation",o}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:i};return n.PropTypes=n,n}},697:function(e,t,n){e.exports=n(703)()},414:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},216:function(e,t,n){"use strict";t.be=void 0;var r=function(){function e(e,t){for(var n=0;n=0&&_-E[0]<=h&&_+v+E[1]>=0}(e,n):function(e){var t=e.ref;if(!(t.offsetWidth||t.offsetHeight||t.getClientRects().length))return!1;var n=void 0,r=void 0;try{var i=t.getBoundingClientRect();n=i.top,r=i.height}catch(e){n=0,r=0}var a=window.innerHeight||document.documentElement.clientHeight,s=Array.isArray(e.props.offset)?e.props.offset:[e.props.offset,e.props.offset];return n-s[0]<=a&&n+r+s[1]>=0}(e);r?e.visible||(e.props.once&&g.push(e),e.visible=!0,e.forceUpdate()):e.props.once&&e.visible||(e.visible=!1,e.props.unmountIfInvisible&&e.forceUpdate())}},y=function(){for(var e=0;e=0?r=setTimeout(l,t-p):(r=null,n||(o=e.apply(a,i),r||(a=null,i=null)))};return function(){a=this,i=arguments,s=+new Date;var p=n&&!r;return r||(r=setTimeout(l,t)),p&&(o=e.apply(a,i),a=null,i=null),o}}},81:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.on=function(e,t,n,r){r=r||!1,e.addEventListener?e.addEventListener(t,n,r):e.attachEvent&&e.attachEvent("on"+t,(function(t){n.call(e,t||window.event)}))},t.off=function(e,t,n,r){r=r||!1,e.removeEventListener?e.removeEventListener(t,n,r):e.detachEvent&&e.detachEvent("on"+t,n)}},315:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if(!(e instanceof HTMLElement))return document.documentElement;for(var t="absolute"===e.style.position,n=/(scroll|auto)/,r=e;r;){if(!r.parentNode)return e.ownerDocument||document.documentElement;var i=window.getComputedStyle(r),a=i.position,s=i.overflow,o=i["overflow-x"],l=i["overflow-y"];if("static"===a&&t)r=r.parentNode;else{if(n.test(s)&&n.test(o)&&n.test(l))return r;r=r.parentNode}}return e.ownerDocument||e.documentElement||document.documentElement}},821:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){var r,i;return t||(t=250),function(){var a=n||this,s=+new Date,o=arguments;r&&se.length)&&(t=e.length);for(var n=0,r=new Array(t);ns[l]?1:-1}return a.length!==s.length?-1:0}var c=window.wp.i18n,m=window.wp.components,h=window.wp.element,g=window.wp.htmlEntities,f=window.wp.apiFetch,d=n.n(f);function v(e){var t=e.allSites,n=e.value,r=e.onChange;if(!t)return null;var i=[""];return Object.keys(t).forEach((function(e){t[e].category.forEach((function(e){i.includes(e)||i.push(e)}))})),i.length<2?null:(0,l.createElement)("div",null,i.map((function(e){return(0,l.createElement)(m.Button,{key:e,variant:e===n?"primary":"",onClick:function(){return r(e)}},""===e?(0,c.__)("All","gp-premium"):e)})))}function b(e){var t=e.onChange,n=e.value;return(0,l.createElement)("div",null,(0,l.createElement)("input",{type:"search",onChange:function(e){var n;return t(null==e||null===(n=e.target)||void 0===n?void 0:n.value)},value:n,placeholder:(0,c.__)("Search site name or author","gp-premium")}))}var y=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&s(e,t)}(w,e);var n,f,y,_,E=(y=w,_=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=o(y);if(_){var n=o(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return a(e)}(this,e)});function w(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,w),(e=E.apply(this,arguments)).state={allSites:{},isAPIWorking:!1,siteOpened:!1,siteData:{},siteSlug:"",sitePlugins:{},hasData:{},hasWidgets:!1,importOptions:!0,importContent:!0,confirmImport:!1,importComplete:!1,installablePlugins:[],activePlugins:[],manualPlugins:[],refreshingSites:!1,hasBackup:gppSiteLibrary.hasBackup,category:"",search:"",device:"desktop"},e.importThemeOptions=e.importThemeOptions.bind(a(e)),e.installPlugins=e.installPlugins.bind(a(e)),e.activatePlugins=e.activatePlugins.bind(a(e)),e.importContent=e.importContent.bind(a(e)),e.importSiteOptions=e.importSiteOptions.bind(a(e)),e.importWidgets=e.importWidgets.bind(a(e)),e}return n=w,(f=[{key:"componentDidMount",value:function(){var e=this;d()({path:"/generatepress-site-library/v1/get_sites",method:"POST",data:{forceRefresh:!1}}).then((function(t){e.setState({isAPILoaded:!0,allSites:t.response})}))}},{key:"importThemeOptions",value:function(e){var t=this,n=e.target.nextElementSibling;n.classList.add("gpp-library-action-message--show"),n.textContent=(0,c.__)("Importing theme options","gp-premium"),d()({path:"/generatepress-site-library/v1/import_theme_options",method:"POST",data:{siteData:this.state.siteData,siteSlug:this.state.siteData.name.replace(/\s+/g,"_").toLowerCase(),importOptions:this.state.importOptions,importContent:this.state.importContent}}).then((function(e){n.textContent=e.response,e.success&&e.response||n.classList.add("gblocks-action-message--error"),setTimeout((function(){t.state.importContent?Object.keys(t.state.hasData.plugin_data).length>0?t.installPlugins(n):t.importContent(n):(n.textContent=(0,c.__)("Import Complete","gp-premium"),t.setState({isAPIWorking:!1,importComplete:!0,hasBackup:!0}))}),2e3)}))}},{key:"installPlugins",value:function(e){var n=this;void 0!==e.target&&(e=e.target.nextElementSibling),e.classList.add("gpp-library-action-message--show"),e.textContent=(0,c.__)("Installing plugins","gp-premium"),Object.entries(this.state.hasData.plugin_data).forEach((function(r){var i=t(r,2),a=i[0],s=i[1],o=s.slug.split("/")[0],l=s.name;s.installed?(delete n.state.hasData.plugin_data[a],0===Object.keys(n.state.hasData.plugin_data).length&&n.activatePlugins(e)):("bb-plugin"===o&&(o="beaver-builder-lite-version",l="Beaver Builder Lite"),e.textContent=(0,c.sprintf)(/* translators: Installing "Plugin Name" */ -(0,c.__)("Installing %s","gp-premium"),l),wp.updates.installPlugin({slug:o,success:function(t){console.log(t),delete n.state.hasData.plugin_data[a],0===Object.keys(n.state.hasData.plugin_data).length&&n.activatePlugins(e)},error:function(t){console.log(t),delete n.state.hasData.plugin_data[a],0===Object.keys(n.state.hasData.plugin_data).length&&n.activatePlugins(e)}}))}))}},{key:"activatePlugins",value:function(e){var t=this;e.classList.add("gpp-library-action-message--show"),e.textContent=(0,c.__)("Activating plugins","gp-premium"),d()({path:"/generatepress-site-library/v1/activate_plugins",method:"POST",data:{siteData:this.state.siteData,siteSlug:this.state.siteData.name.replace(/\s+/g,"_").toLowerCase(),importOptions:this.state.importOptions,importContent:this.state.importContent}}).then((function(n){e.textContent=n.response,n.success&&n.response||e.classList.add("gblocks-action-message--error"),setTimeout((function(){t.importContent(e)}),2e3)}))}},{key:"importContent",value:function(e){var t=this;e.classList.add("gpp-library-action-message--show"),e.textContent=(0,c.__)("Importing content","gp-premium"),d()({path:"/generatepress-site-library/v1/import_content",method:"POST",data:{siteData:this.state.siteData,siteSlug:this.state.siteData.name.replace(/\s+/g,"_").toLowerCase(),importOptions:this.state.importOptions,importContent:this.state.importContent}}).then((function(n){e.textContent=n.response,n.success&&n.response||e.classList.add("gblocks-action-message--error"),setTimeout((function(){t.importSiteOptions(e)}),2e3)}))}},{key:"importSiteOptions",value:function(e){var t=this;e.classList.add("gpp-library-action-message--show"),e.textContent=(0,c.__)("Importing site options","gp-premium"),d()({path:"/generatepress-site-library/v1/import_site_options",method:"POST",data:{siteData:this.state.siteData,siteSlug:this.state.siteData.name.replace(/\s+/g,"_").toLowerCase(),importOptions:this.state.importOptions,importContent:this.state.importContent}}).then((function(n){e.textContent=n.response,n.success&&n.response||e.classList.add("gblocks-action-message--error"),setTimeout((function(){t.state.hasWidgets?t.importWidgets(e):(e.textContent=(0,c.__)("Import Complete","gp-premium"),t.setState({isAPIWorking:!1,importComplete:!0,hasBackup:!0}))}),2e3)}))}},{key:"importWidgets",value:function(e){var t=this;e.classList.add("gpp-library-action-message--show"),e.textContent=(0,c.__)("Importing widgets","gp-premium"),d()({path:"/generatepress-site-library/v1/import_widgets",method:"POST",data:{siteData:this.state.siteData,siteSlug:this.state.siteData.name.replace(/\s+/g,"_").toLowerCase(),importOptions:this.state.importOptions,importContent:this.state.importContent}}).then((function(n){e.textContent=n.response,n.success&&n.response||e.classList.add("gblocks-action-message--error"),setTimeout((function(){e.textContent=(0,c.__)("Import Complete","gp-premium"),t.setState({isAPIWorking:!1,importComplete:!0,hasBackup:!0})}),2e3)}))}},{key:"restoreBackup",value:function(e){var t=this,n=e.target.nextElementSibling;n.classList.add("gpp-library-action-message--show"),n.textContent=(0,c.__)("Restoring theme options","gp-premium"),d()({path:"/generatepress-site-library/v1/restore_theme_options",method:"POST"}).then((function(e){n.textContent=e.response,e.success&&e.response||n.classList.add("gblocks-action-message--error"),setTimeout((function(){n.textContent=(0,c.__)("Restoring content","gp-premium"),d()({path:"/generatepress-site-library/v1/restore_content",method:"POST"}).then((function(e){n.textContent=e.response,e.success&&e.response||n.classList.add("gblocks-action-message--error"),t.setState({isAPIWorking:!1,hasBackup:!1})}))}),2e3)}))}},{key:"render",value:function(){var e=this;if(!this.state.isAPILoaded)return(0,l.createElement)(m.Placeholder,{className:"gpp-library-placeholder"},(0,l.createElement)(m.Spinner,null));var n=this.state.allSites;if(!n||"no results"===n)return(0,l.createElement)("div",{className:"generatepress-site-library-no-results"},(0,l.createElement)("p",null,(0,c.__)("No sites were found.","gp-premium")," ",(0,l.createElement)("a",{href:"https://docs.generatepress.com/article/site-library-unavailable/",target:"_blank",rel:"noreferrer noopener"},(0,c.__)("Why?","gp-premium"))),(0,l.createElement)(m.Button,{variant:"primary",onClick:function(){e.setState({refreshingSites:!0}),d()({path:"/generatepress-site-library/v1/get_sites",method:"POST",data:{forceRefresh:!0}}).then((function(t){e.setState({isAPILoaded:!0,allSites:t.response,refreshingSites:!1})}))}},this.state.refreshingSites&&(0,l.createElement)(m.Spinner,null),!this.state.refreshingSites&&(0,c.__)("Try again","gp-premium")));var r="";"tablet"===this.state.device&&(r="768px"),"mobile"===this.state.device&&(r="480px");var i=this.state.siteData.author_name&&this.state.siteData.author_url&&"GeneratePress"!==this.state.siteData.author_name;return(0,l.createElement)(h.Fragment,null,(0,l.createElement)("div",{className:"generatepress-site-library"},!!this.state.hasBackup&&(0,l.createElement)("div",{className:"generatepress-site-library-restore"},(0,l.createElement)("h2",null,(0,c.__)("Existing Site Import Detected","gp-premium")),(0,l.createElement)("p",null,(0,c.__)("It is highly recommended that you remove the last site you imported before importing a new one.","gp-premium")),(0,l.createElement)("p",null,(0,c.__)("This process restores your previous options, widgets and active plugins. It will also remove your imported content and CSS.","gp-premium")),(0,l.createElement)("div",{className:"gpp-library-action-button"},(0,l.createElement)(m.Button,{variant:"primary",onClick:function(t){window.confirm((0,c.__)("This process makes changes to your website. If it contains important data, we suggest backing it up before proceeding.","gp-premium"))&&(e.setState({isAPIWorking:!0}),e.restoreBackup(t))}},this.state.isAPIWorking&&(0,l.createElement)(m.Spinner,null),!this.state.isAPIWorking&&(0,c.__)("Remove imported site","gp-premium")),(0,l.createElement)("span",{className:"gpp-library-action-message"}),!this.state.isAPIWorking&&(0,l.createElement)(m.Button,{onClick:function(){e.setState({hasBackup:!1})}},(0,c.__)("No thanks","gp-premium")))),!this.state.siteOpened&&!this.state.hasBackup&&(0,l.createElement)(h.Fragment,null,(0,l.createElement)("div",{className:"generatepress-site-library-filter"},(0,l.createElement)(v,{allSites:n,value:this.state.category,onChange:function(t){e.setState({category:t}),setTimeout((function(){(0,p.be)()}),100)}}),(0,l.createElement)(b,{value:this.state.search,onChange:function(t){e.setState({search:t,category:""}),setTimeout((function(){(0,p.be)()}),100)}})),(0,l.createElement)("ul",{className:"generatepress-site-library-list"},Object.keys(n).map((function(t){if(""!==e.state.category&&!n[t].category.includes(e.state.category))return null;var r=n[t].name,i=(0,g.decodeEntities)(r);if(""!==e.state.search&&!i.toLowerCase().includes(e.state.search.toLowerCase())&&!n[t].author_name.toLowerCase().includes(e.state.search.toLowerCase()))return null;var a=n[t].directory+"/screenshot.png",s=gppSiteLibrary.gppVersion.split("-")[0],o=n[t].min_version.split("-")[0],m=gppSiteLibrary.gpVersion.split("-")[0],h=gppSiteLibrary.generateblocksVersion.split("-")[0],f=n[t].min_theme_version?n[t].min_theme_version.split("-")[0]:m,d=n[t].min_generateblocks_version?n[t].min_generateblocks_version.split("-")[0]:h,v=n[t].image_width,b=n[t].image_height,y=u(o,s)>0||u(f,m)>0||h&&u(d,h)>0;return(0,l.createElement)("li",{className:"generatepress-site-library-list-item",key:r+":"+t},(0,l.createElement)("button",{disabled:y,onClick:function(){e.setState({siteOpened:!0,siteData:n[t],sitePlugins:JSON.parse(n[t].plugins)})}},(0,l.createElement)("div",{className:"generatepress-site-library-list-item-image"},(0,l.createElement)(p.ZP,{offset:100,once:!0},(0,l.createElement)("img",{src:a,alt:r,width:v,height:b}))),(0,l.createElement)("div",{className:"generatepress-site-library-list-item-title"},i,!!y&&u(o,s)>0&&(0,l.createElement)("span",{className:"generatepress-site-library-required-version"},(0,c.sprintf)(/* translators: Version number */ -(0,c.__)("Requires GP Premium %s.","gp-premium"),o)),!!y&&u(f,m)>0&&(0,l.createElement)("span",{className:"generatepress-site-library-required-version"},(0,c.sprintf)(/* translators: Version number */ -(0,c.__)("Requires GeneratePress %s.","gp-premium"),f)),!!y&&h&&u(d,h)>0&&(0,l.createElement)("span",{className:"generatepress-site-library-required-version"},(0,c.sprintf)(/* translators: Version number */ -(0,c.__)("Requires GenerateBlocks %s.","gp-premium"),d)))))}))),(0,l.createElement)("div",{className:"generatepress-site-library-refresh"},(0,l.createElement)(m.Button,{variant:"primary",onClick:function(){e.setState({refreshingSites:!0}),d()({path:"/generatepress-site-library/v1/get_sites",method:"POST",data:{forceRefresh:!0}}).then((function(t){e.setState({isAPILoaded:!0,allSites:t.response,refreshingSites:!1})}))}},this.state.refreshingSites&&(0,l.createElement)(m.Spinner,null),!this.state.refreshingSites&&(0,c.__)("Refresh sites","gp-premium")))),this.state.siteOpened&&(0,l.createElement)("div",{className:"generatepress-site-library-opened"},(0,l.createElement)("div",{className:"generatepress-site-library-iframe"},(0,l.createElement)("iframe",{title:"gpp-site-library-frame",src:this.state.siteData.preview_url,style:{width:r}})),(0,l.createElement)("div",{className:"generatepress-site-library-info"},(0,l.createElement)("div",{className:"generatepress-site-library-header"},(0,l.createElement)("div",{className:"generatepress-site-library-header__title"},(0,l.createElement)("h2",{className:i?"has-author":""},(0,g.decodeEntities)(this.state.siteData.name)),i&&(0,l.createElement)("span",{className:"site-library-author"},/* translators: Site library site built by "author name" */ -(0,c.__)("Built by","gp-premium")+" ",(0,l.createElement)("a",{href:this.state.siteData.author_url,target:"_blank",rel:"noreferrer noopener"},this.state.siteData.author_name))),(0,l.createElement)(m.Button,{onClick:function(){e.setState({isAPIWorking:!1,siteOpened:!1,siteData:{},siteSlug:"",sitePlugins:{},hasData:{},hasWidgets:!1,importOptions:!0,importContent:!0,confirmImport:!1,importComplete:!1,installablePlugins:[],activePlugins:[],manualPlugins:[]})}},(0,l.createElement)("svg",{width:"35",height:"35",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",role:"img","aria-hidden":"true",focusable:"false"},(0,l.createElement)("path",{d:"M13 11.9l3.3-3.4-1.1-1-3.2 3.3-3.2-3.3-1.1 1 3.3 3.4-3.5 3.6 1 1L12 13l3.5 3.5 1-1z"})))),(0,l.createElement)("div",{className:"generatepress-site-library-content"},!!this.state.siteData.description&&(0,l.createElement)("p",null,(0,g.decodeEntities)(this.state.siteData.description)),!this.state.importComplete&&(0,l.createElement)(h.Fragment,null,0===Object.keys(this.state.hasData).length&&(0,l.createElement)(h.Fragment,null,gppSiteLibrary.isDebugEnabled&&(0,l.createElement)(h.Fragment,null,(0,l.createElement)("h3",null,(0,c.__)("Debug Mode Enabled","gp-premium")),(0,l.createElement)("p",null,(0,c.__)("WordPress debug mode is currently enabled. With this, any errors from third-party plugins might affect the import process.","gp-premium")),(0,l.createElement)("p",null,(0,c.__)("To disable it, find WP_DEBUG in your wp-config.php file and set it to false like the below.","gp-premium")),(0,l.createElement)("code",null,"define( 'WP_DEBUG', false );"),(0,l.createElement)("p",null,(0,l.createElement)("a",{href:"https://docs.generatepress.com/article/debug-mode-enabled/",target:"_blank",rel:"noreferrer noopener"},(0,c.__)("Learn more here","gp-premium")))),Object.keys(this.state.sitePlugins).length>0&&(0,l.createElement)(h.Fragment,null,(0,l.createElement)("h3",null,(0,c.__)("Plugins","gp-premium")),(0,l.createElement)("p",null,(0,c.__)("This site uses the following plugins.","gp-premium")),(0,l.createElement)("ul",{className:"generatepress-site-library-plugins"},Object.entries(this.state.sitePlugins).map((function(e){var n=t(e,1)[0];return(0,l.createElement)("li",{key:n},n)})))),(0,l.createElement)("div",{className:"gpp-library-action-button"},(0,l.createElement)(m.Button,{variant:"primary",disabled:this.state.isAPIWorking,onClick:function(n){e.setState({isAPIWorking:!0});var r=n.target.nextElementSibling;r.textContent=(0,c.__)("Gathering information","gp-premium"),d()({path:"/generatepress-site-library/v1/get_site_data",method:"POST",data:{siteData:e.state.siteData}}).then((function(n){var i=[],a=[],s=[];Object.entries(n.response.plugin_data).forEach((function(e){var r=t(e,1)[0],o=n.response.plugin_data[r];o.repo&&!o.installed?i.push(o.name):o.installed||o.active?a.push(o.name):s.push(o.name)})),e.setState({isAPIWorking:!1,hasData:n.response,sitePlugins:n.response.plugins,hasWidgets:n.response.widgets,installablePlugins:i,activePlugins:a,manualPlugins:s}),r.classList.add("gpp-library-action-message--show"),r.textContent=n.response,n.success&&n.response?setTimeout((function(){r.classList.remove("gpp-library-action-message--show")}),3e3):r.classList.add("gpp-library-action-message--error")}))}},this.state.isAPIWorking&&(0,l.createElement)(m.Spinner,null),!this.state.isAPIWorking&&(0,c.__)("Get Started","gp-premium")),(0,l.createElement)("span",{className:"gpp-library-action-message"}))),Object.keys(this.state.hasData).length>0&&Object.keys(this.state.sitePlugins).length>0&&(0,l.createElement)(h.Fragment,null,(0,l.createElement)("h3",null,(0,c.__)("Plugins","gp-premium")),this.state.installablePlugins.length>0&&(0,l.createElement)(h.Fragment,null,(0,l.createElement)("p",null,(0,c.__)("These plugins can be installed automatically.","gp-premium")),(0,l.createElement)("ul",{className:"generatepress-site-library-plugins"},this.state.installablePlugins.map((function(e){return(0,l.createElement)("li",{key:e},e)})))),this.state.activePlugins.length>0&&(0,l.createElement)(h.Fragment,null,(0,l.createElement)("p",null,(0,c.__)("These plugins are already installed.","gp-premium")),(0,l.createElement)("ul",{className:"generatepress-site-library-plugins"},this.state.activePlugins.map((function(e){return(0,l.createElement)("li",{key:e},e)})))),this.state.manualPlugins.length>0&&(0,l.createElement)(h.Fragment,null,(0,l.createElement)("p",null,(0,c.__)("These plugins need to be installed manually.","gp-premium")),(0,l.createElement)("ul",{className:"generatepress-site-library-plugins"},this.state.manualPlugins.map((function(e){return(0,l.createElement)("li",{key:e},e)}))))),Object.keys(this.state.hasData).length>0&&(0,l.createElement)(h.Fragment,null,(0,l.createElement)("h3",null,(0,c.__)("Import","gp-premium")),this.state.hasData.options&&!this.state.isAPIWorking&&(0,l.createElement)(m.Tooltip,{text:(0,c.__)("This will import the options from the Customizer.","gp-premium")},(0,l.createElement)(m.ToggleControl,{checked:!!this.state.importOptions,label:(0,c.__)("Import Theme Options","gp-premium"),onChange:function(t){e.setState({importOptions:t})}})),this.state.hasData.content&&!this.state.isAPIWorking&&(0,l.createElement)(m.Tooltip,{text:(0,c.__)("This will install and activate needed plugins, import demo content, and import site options.","gp-premium")},(0,l.createElement)(m.ToggleControl,{checked:!!this.state.importContent,label:(0,c.__)("Import Demo Content","gp-premium"),onChange:function(t){e.setState({importContent:t})}})),(!!this.state.importOptions||!!this.state.importContent)&&(0,l.createElement)(h.Fragment,null,!this.state.isAPIWorking&&(0,l.createElement)(h.Fragment,null,(0,l.createElement)("h3",null,(0,c.__)("Confirm Import","gp-premium")),(0,l.createElement)("p",null,(0,c.__)("This process makes changes to your website. If it contains important data, we suggest backing it up before proceeding.","gp-premium")),(0,l.createElement)(m.ToggleControl,{checked:!!this.state.confirmImport,label:(0,c.__)("I understand","gp-premium"),onChange:function(t){e.setState({confirmImport:t})}})),!!this.state.confirmImport&&!this.state.importComplete&&(0,l.createElement)("div",{className:"gpp-library-action-button"},(0,l.createElement)(m.Button,{variant:"primary",disabled:this.state.isAPIWorking,onClick:function(t){e.setState({isAPIWorking:!0}),e.state.importOptions?e.importThemeOptions(t):e.state.importContent&&e.installPlugins(t)}},this.state.isAPIWorking&&(0,l.createElement)(m.Spinner,null),!this.state.isAPIWorking&&(0,c.__)("Begin Import","gp-premium")),(0,l.createElement)("span",{className:"gpp-library-action-message"}))))),!!this.state.importComplete&&(0,l.createElement)(h.Fragment,null,(0,l.createElement)("h3",null,(0,c.__)("Import Complete","gp-premium")),(0,l.createElement)("p",null,(0,c.__)("Check out your new site and start making it yours!","gp-premium")),(0,l.createElement)("p",null,(0,c.__)("Note: We do our best to ensure all imported images are licensed for open use. However, image licenses can change, so we strongly advise that you replace all imported images with your own.","gp-premium")),(0,l.createElement)("a",{className:"components-button is-primary",href:gppSiteLibrary.homeUrl},(0,c.__)("View Site","gp-premium")),this.state.siteData.uploads_url&&Object.values(this.state.sitePlugins).includes("elementor/elementor.php")&&(0,l.createElement)(h.Fragment,null,(0,l.createElement)("h3",null,(0,c.__)("Additional Cleanup","gp-premium")),(0,l.createElement)("p",null,(0,c.__)("This site is using Elementor which means you will want to replace the imported image URLs.","gp-premium")),(0,l.createElement)("p",null,(0,c.__)("Take note of the old and new URLs below, then head over to the Elementor Tools area to replace them.","gp-premium")),(0,l.createElement)(m.TextControl,{label:(0,c.__)("Old URL","gp-premium"),readOnly:!0,value:this.state.siteData.uploads_url}),(0,l.createElement)(m.TextControl,{label:(0,c.__)("New URL","gp-premium"),readOnly:!0,value:gppSiteLibrary.uploadsUrl}),(0,l.createElement)("a",{href:gppSiteLibrary.elementorReplaceUrls,className:"components-button is-primary",target:"_blank",rel:"noopener noreferrer"},(0,c.__)("Elementor Tools","gp-premium")))),(0,l.createElement)("div",{className:"generatepress-site-library-footer"},(0,l.createElement)(m.Tooltip,{text:(0,c.__)("Preview desktop","gp-premium")},(0,l.createElement)(m.Button,{variant:"desktop"===this.state.device?"primary":"",onClick:function(){e.setState({device:"desktop"})}},(0,l.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24"},(0,l.createElement)("path",{d:"M21 14H3V4h18m0-2H3c-1.11 0-2 .89-2 2v12a2 2 0 002 2h7l-2 3v1h8v-1l-2-3h7a2 2 0 002-2V4a2 2 0 00-2-2z",fill:"currentColor"})))),(0,l.createElement)(m.Tooltip,{text:(0,c.__)("Preview tablet","gp-premium")},(0,l.createElement)(m.Button,{variant:"tablet"===this.state.device?"primary":"",onClick:function(){e.setState({device:"tablet"})}},(0,l.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24"},(0,l.createElement)("path",{d:"M19 19H4V3h15m-7.5 20a1.5 1.5 0 01-1.5-1.5 1.5 1.5 0 011.5-1.5 1.5 1.5 0 011.5 1.5 1.5 1.5 0 01-1.5 1.5m7-23h-14A2.5 2.5 0 002 2.5v19A2.5 2.5 0 004.5 24h14a2.5 2.5 0 002.5-2.5v-19A2.5 2.5 0 0018.5 0z",fill:"currentColor"})))),(0,l.createElement)(m.Tooltip,{text:(0,c.__)("Preview mobile","gp-premium")},(0,l.createElement)(m.Button,{variant:"mobile"===this.state.device?"primary":"",onClick:function(){e.setState({device:"mobile"})}},(0,l.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24"},(0,l.createElement)("path",{d:"M17 19H7V5h10m0-4H7c-1.11 0-2 .89-2 2v18a2 2 0 002 2h10a2 2 0 002-2V3a2 2 0 00-2-2z",fill:"currentColor"}))))))))))}}])&&i(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),w}(h.Component);(0,h.render)((0,l.createElement)(y,null),document.getElementById("gpp-site-library"))}()}(); \ No newline at end of file diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/dist/style-dashboard.css b/wp-content/upgrade-temp-backup/plugins/gp-premium/dist/style-dashboard.css deleted file mode 100644 index f226f072..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/dist/style-dashboard.css +++ /dev/null @@ -1,4 +0,0 @@ -.generatepress-module-action{display:inline-block;font-size:12px;font-weight:400;line-height:1;margin-left:10px;text-decoration:none}.generatepress-dashboard__section-item-settings{align-items:center;display:flex}.generatepress-dashboard__section-item-settings button{font-size:11px;height:30px;justify-content:center!important}.generatepress-dashboard__section-item-settings button .components-spinner{margin-top:0}.generatepress-dashboard__section-item-settings button svg{height:20px;margin:0!important;width:20px}.generatepress-dashboard__section-item-settings button:not(:last-child){margin-right:5px} -.generatepress-license-key-area .generatepress-dashboard__section-item-message{background:#fff}.generatepress-license-key-area .generatepress-dashboard__section-item{flex-wrap:wrap;justify-content:flex-start}.generatepress-license-key-area .generatepress-dashboard__section-license-key{display:flex;flex:1}.generatepress-license-key-area .generatepress-dashboard__section-license-key .components-base-control{flex:1}.generatepress-license-key-area .generatepress-dashboard__section-license-key button{height:31px;margin-left:8px}.generatepress-license-key-area .generatepress-dashboard__section-beta-tester{align-items:center;display:flex;flex-basis:100%;margin-top:30px}.generatepress-license-key-area .generatepress-dashboard__section-license-notice{flex-basis:100%;margin:0 0 20px}.generatepress-license-key-area .components-base-control__field,.generatepress-license-key-area .components-base-control__help{margin-bottom:0} -.generatepress-dashboard__section-item-action input[type=file]{border:1px solid #ddd;padding:5px}.generatepress-dashboard__section-item-export-popover .components-popover__content{padding:20px} -.generatepress-dashboard__section-item-modules{margin-top:20px} diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/elements/assets/admin/author-image-placeholder.png b/wp-content/upgrade-temp-backup/plugins/gp-premium/elements/assets/admin/author-image-placeholder.png deleted file mode 100644 index f8bdda75..00000000 Binary files a/wp-content/upgrade-temp-backup/plugins/gp-premium/elements/assets/admin/author-image-placeholder.png and /dev/null differ diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/elements/assets/admin/background-image-fallback.jpg b/wp-content/upgrade-temp-backup/plugins/gp-premium/elements/assets/admin/background-image-fallback.jpg deleted file mode 100644 index ae5ef65d..00000000 Binary files a/wp-content/upgrade-temp-backup/plugins/gp-premium/elements/assets/admin/background-image-fallback.jpg and /dev/null differ diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/elements/assets/admin/balloon.css b/wp-content/upgrade-temp-backup/plugins/gp-premium/elements/assets/admin/balloon.css deleted file mode 100644 index b2dbcb0c..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/elements/assets/admin/balloon.css +++ /dev/null @@ -1,211 +0,0 @@ -button[data-balloon] { - overflow: visible; } - -[data-balloon] { - position: relative; - cursor: pointer; } - [data-balloon]:after { - filter: alpha(opacity=0); - -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; - -moz-opacity: 0; - -khtml-opacity: 0; - opacity: 0; - pointer-events: none; - transition: all 0.18s ease-out 0.18s; - font-weight: normal !important; - font-style: normal !important; - text-shadow: none !important; - font-size: 12px !important; - background: rgba(17, 17, 17, 0.9); - border-radius: 4px; - color: #fff; - content: attr(data-balloon); - padding: .5em 1em; - position: absolute; - white-space: nowrap; - z-index: 10; } - [data-balloon]:before { - background: no-repeat url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http://www.w3.org/2000/svg%22%20width%3D%2236px%22%20height%3D%2212px%22%3E%3Cpath%20fill%3D%22rgba(17, 17, 17, 0.9)%22%20transform%3D%22rotate(0)%22%20d%3D%22M2.658,0.000%20C-13.615,0.000%2050.938,0.000%2034.662,0.000%20C28.662,0.000%2023.035,12.002%2018.660,12.002%20C14.285,12.002%208.594,0.000%202.658,0.000%20Z%22/%3E%3C/svg%3E"); - background-size: 100% auto; - width: 18px; - height: 6px; - filter: alpha(opacity=0); - -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; - -moz-opacity: 0; - -khtml-opacity: 0; - opacity: 0; - pointer-events: none; - transition: all 0.18s ease-out 0.18s; - content: ''; - position: absolute; - z-index: 10; } - [data-balloon]:hover:before, [data-balloon]:hover:after, [data-balloon][data-balloon-visible]:before, [data-balloon][data-balloon-visible]:after { - filter: alpha(opacity=100); - -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)"; - -moz-opacity: 1; - -khtml-opacity: 1; - opacity: 1; - pointer-events: auto; } - [data-balloon].font-awesome:after { - font-family: FontAwesome; } - [data-balloon][data-balloon-break]:after { - white-space: pre; } - [data-balloon][data-balloon-blunt]:before, [data-balloon][data-balloon-blunt]:after { - transition: none; } - [data-balloon][data-balloon-pos="up"]:after { - bottom: 100%; - left: 50%; - margin-bottom: 11px; - transform: translate(-50%, 10px); - transform-origin: top; } - [data-balloon][data-balloon-pos="up"]:before { - bottom: 100%; - left: 50%; - margin-bottom: 5px; - transform: translate(-50%, 10px); - transform-origin: top; } - [data-balloon][data-balloon-pos="up"]:hover:after, [data-balloon][data-balloon-pos="up"][data-balloon-visible]:after { - transform: translate(-50%, 0); } - [data-balloon][data-balloon-pos="up"]:hover:before, [data-balloon][data-balloon-pos="up"][data-balloon-visible]:before { - transform: translate(-50%, 0); } - [data-balloon][data-balloon-pos="up-left"]:after { - bottom: 100%; - left: 0; - margin-bottom: 11px; - transform: translate(0, 10px); - transform-origin: top; } - [data-balloon][data-balloon-pos="up-left"]:before { - bottom: 100%; - left: 5px; - margin-bottom: 5px; - transform: translate(0, 10px); - transform-origin: top; } - [data-balloon][data-balloon-pos="up-left"]:hover:after, [data-balloon][data-balloon-pos="up-left"][data-balloon-visible]:after { - transform: translate(0, 0); } - [data-balloon][data-balloon-pos="up-left"]:hover:before, [data-balloon][data-balloon-pos="up-left"][data-balloon-visible]:before { - transform: translate(0, 0); } - [data-balloon][data-balloon-pos="up-right"]:after { - bottom: 100%; - right: 0; - margin-bottom: 11px; - transform: translate(0, 10px); - transform-origin: top; } - [data-balloon][data-balloon-pos="up-right"]:before { - bottom: 100%; - right: 5px; - margin-bottom: 5px; - transform: translate(0, 10px); - transform-origin: top; } - [data-balloon][data-balloon-pos="up-right"]:hover:after, [data-balloon][data-balloon-pos="up-right"][data-balloon-visible]:after { - transform: translate(0, 0); } - [data-balloon][data-balloon-pos="up-right"]:hover:before, [data-balloon][data-balloon-pos="up-right"][data-balloon-visible]:before { - transform: translate(0, 0); } - [data-balloon][data-balloon-pos='down']:after { - left: 50%; - margin-top: 11px; - top: 100%; - transform: translate(-50%, -10px); } - [data-balloon][data-balloon-pos='down']:before { - background: no-repeat url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http://www.w3.org/2000/svg%22%20width%3D%2236px%22%20height%3D%2212px%22%3E%3Cpath%20fill%3D%22rgba(17, 17, 17, 0.9)%22%20transform%3D%22rotate(180 18 6)%22%20d%3D%22M2.658,0.000%20C-13.615,0.000%2050.938,0.000%2034.662,0.000%20C28.662,0.000%2023.035,12.002%2018.660,12.002%20C14.285,12.002%208.594,0.000%202.658,0.000%20Z%22/%3E%3C/svg%3E"); - background-size: 100% auto; - width: 18px; - height: 6px; - left: 50%; - margin-top: 5px; - top: 100%; - transform: translate(-50%, -10px); } - [data-balloon][data-balloon-pos='down']:hover:after, [data-balloon][data-balloon-pos='down'][data-balloon-visible]:after { - transform: translate(-50%, 0); } - [data-balloon][data-balloon-pos='down']:hover:before, [data-balloon][data-balloon-pos='down'][data-balloon-visible]:before { - transform: translate(-50%, 0); } - [data-balloon][data-balloon-pos='down-left']:after { - left: 0; - margin-top: 11px; - top: 100%; - transform: translate(0, -10px); } - [data-balloon][data-balloon-pos='down-left']:before { - background: no-repeat url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http://www.w3.org/2000/svg%22%20width%3D%2236px%22%20height%3D%2212px%22%3E%3Cpath%20fill%3D%22rgba(17, 17, 17, 0.9)%22%20transform%3D%22rotate(180 18 6)%22%20d%3D%22M2.658,0.000%20C-13.615,0.000%2050.938,0.000%2034.662,0.000%20C28.662,0.000%2023.035,12.002%2018.660,12.002%20C14.285,12.002%208.594,0.000%202.658,0.000%20Z%22/%3E%3C/svg%3E"); - background-size: 100% auto; - width: 18px; - height: 6px; - left: 5px; - margin-top: 5px; - top: 100%; - transform: translate(0, -10px); } - [data-balloon][data-balloon-pos='down-left']:hover:after, [data-balloon][data-balloon-pos='down-left'][data-balloon-visible]:after { - transform: translate(0, 0); } - [data-balloon][data-balloon-pos='down-left']:hover:before, [data-balloon][data-balloon-pos='down-left'][data-balloon-visible]:before { - transform: translate(0, 0); } - [data-balloon][data-balloon-pos='down-right']:after { - right: 0; - margin-top: 11px; - top: 100%; - transform: translate(0, -10px); } - [data-balloon][data-balloon-pos='down-right']:before { - background: no-repeat url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http://www.w3.org/2000/svg%22%20width%3D%2236px%22%20height%3D%2212px%22%3E%3Cpath%20fill%3D%22rgba(17, 17, 17, 0.9)%22%20transform%3D%22rotate(180 18 6)%22%20d%3D%22M2.658,0.000%20C-13.615,0.000%2050.938,0.000%2034.662,0.000%20C28.662,0.000%2023.035,12.002%2018.660,12.002%20C14.285,12.002%208.594,0.000%202.658,0.000%20Z%22/%3E%3C/svg%3E"); - background-size: 100% auto; - width: 18px; - height: 6px; - right: 5px; - margin-top: 5px; - top: 100%; - transform: translate(0, -10px); } - [data-balloon][data-balloon-pos='down-right']:hover:after, [data-balloon][data-balloon-pos='down-right'][data-balloon-visible]:after { - transform: translate(0, 0); } - [data-balloon][data-balloon-pos='down-right']:hover:before, [data-balloon][data-balloon-pos='down-right'][data-balloon-visible]:before { - transform: translate(0, 0); } - [data-balloon][data-balloon-pos='left']:after { - margin-right: 11px; - right: 100%; - top: 50%; - transform: translate(10px, -50%); } - [data-balloon][data-balloon-pos='left']:before { - background: no-repeat url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http://www.w3.org/2000/svg%22%20width%3D%2212px%22%20height%3D%2236px%22%3E%3Cpath%20fill%3D%22rgba(17, 17, 17, 0.9)%22%20transform%3D%22rotate(-90 18 18)%22%20d%3D%22M2.658,0.000%20C-13.615,0.000%2050.938,0.000%2034.662,0.000%20C28.662,0.000%2023.035,12.002%2018.660,12.002%20C14.285,12.002%208.594,0.000%202.658,0.000%20Z%22/%3E%3C/svg%3E"); - background-size: 100% auto; - width: 6px; - height: 18px; - margin-right: 5px; - right: 100%; - top: 50%; - transform: translate(10px, -50%); } - [data-balloon][data-balloon-pos='left']:hover:after, [data-balloon][data-balloon-pos='left'][data-balloon-visible]:after { - transform: translate(0, -50%); } - [data-balloon][data-balloon-pos='left']:hover:before, [data-balloon][data-balloon-pos='left'][data-balloon-visible]:before { - transform: translate(0, -50%); } - [data-balloon][data-balloon-pos='right']:after { - left: 100%; - margin-left: 11px; - top: 50%; - transform: translate(-10px, -50%); } - [data-balloon][data-balloon-pos='right']:before { - background: no-repeat url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http://www.w3.org/2000/svg%22%20width%3D%2212px%22%20height%3D%2236px%22%3E%3Cpath%20fill%3D%22rgba(17, 17, 17, 0.9)%22%20transform%3D%22rotate(90 6 6)%22%20d%3D%22M2.658,0.000%20C-13.615,0.000%2050.938,0.000%2034.662,0.000%20C28.662,0.000%2023.035,12.002%2018.660,12.002%20C14.285,12.002%208.594,0.000%202.658,0.000%20Z%22/%3E%3C/svg%3E"); - background-size: 100% auto; - width: 6px; - height: 18px; - left: 100%; - margin-left: 5px; - top: 50%; - transform: translate(-10px, -50%); } - [data-balloon][data-balloon-pos='right']:hover:after, [data-balloon][data-balloon-pos='right'][data-balloon-visible]:after { - transform: translate(0, -50%); } - [data-balloon][data-balloon-pos='right']:hover:before, [data-balloon][data-balloon-pos='right'][data-balloon-visible]:before { - transform: translate(0, -50%); } - [data-balloon][data-balloon-length='small']:after { - white-space: normal; - width: 80px; } - [data-balloon][data-balloon-length='medium']:after { - white-space: normal; - width: 150px; } - [data-balloon][data-balloon-length='large']:after { - white-space: normal; - width: 260px; } - [data-balloon][data-balloon-length='xlarge']:after { - white-space: normal; - width: 380px; } - @media screen and (max-width: 768px) { - [data-balloon][data-balloon-length='xlarge']:after { - white-space: normal; - width: 90vw; } } - [data-balloon][data-balloon-length='fit']:after { - white-space: normal; - width: 100%; } \ No newline at end of file diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/elements/assets/admin/elements.css b/wp-content/upgrade-temp-backup/plugins/gp-premium/elements/assets/admin/elements.css deleted file mode 100644 index c37c91b7..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/elements/assets/admin/elements.css +++ /dev/null @@ -1,82 +0,0 @@ -.choose-element-type-parent:before { - content: ""; - position: fixed; - left: 0; - top: 0; - right: 0; - bottom: 0; - background: rgba(0,0,0,0.5); - z-index: 9991; -} - -.choose-element-type { - position: fixed; - width: 500px; - background: #fff; - left: 50%; - padding: 30px; - box-sizing: border-box; - box-shadow: 0 0 20px rgba(0,0,0,0.05); - border: 1px solid #ddd; - z-index: 9992; - transform: translate(-50%, -50%); - top: 50%; -} - -.choose-element-type h2 { - margin-top: 0; -} - -select.select-type { - position: relative; - padding: 10px 15px; - margin: 0; - background-color: #fff; - box-shadow: 0 0 0 1px rgba(200, 215, 225, 0.5), 0 1px 2px #e9eff3; - width: 100%; - overflow: hidden; - height: auto; - border: 0; - cursor: pointer; -} - -select.select-type:hover { - background-color: #fafafa; -} - -.dark-mode select.select-type:hover { - background-color: #23282d; -} - -.choose-element-type button.button { - font-size: 17px; - margin-left: 10px; -} - -.select-type-container { - display: flex; -} - -button.close-choose-element-type { - position: absolute; - top: 10px; - right: 10px; - background: transparent; - border: 0; - box-shadow: 0 0 0; - cursor: pointer; - padding: 0; -} - -button.close-choose-element-type svg { - height: 20px; - width: 20px; -} - -.hook-location { - background: #efefef; - padding: 2px 5px; - font-family: monospace; - font-size: 11px; - border-radius: 2px; -} diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/elements/assets/admin/elements.js b/wp-content/upgrade-temp-backup/plugins/gp-premium/elements/assets/admin/elements.js deleted file mode 100644 index 03aa79c9..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/elements/assets/admin/elements.js +++ /dev/null @@ -1,29 +0,0 @@ -jQuery( function( $ ) { - $( '.post-type-gp_elements .page-title-action:not(.legacy-button)' ).on( 'click', function( e ) { - e.preventDefault(); - - $( '.choose-element-type-parent' ).show(); - $( '.choose-element-type .select-type' ).focus(); - } ); - - $( '.close-choose-element-type' ).on( 'click', function( e ) { - e.preventDefault(); - - $( '.choose-element-type-parent' ).hide(); - $( '.page-title-action' ).focus(); - } ); - - $( '.post-type-gp_elements' ).on( 'keyup', function( e ) { - const $element = $( '.choose-element-type-parent' ); - - if ( e.key === 'Escape' && $element.is( ':visible' ) ) { - $element.hide(); - $( '.page-title-action' ).focus(); - } - } ); - - // Don't allow Elements to quick edit parents. - $( '.inline-edit-gp_elements select#post_parent, .inline-edit-gp_elements .inline-edit-menu-order-input, .bulk-edit-gp_elements select#post_parent' ).each( function() { - $( this ).closest( 'label' ).remove(); - } ); -} ); diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/elements/assets/admin/featured-image-placeholder.png b/wp-content/upgrade-temp-backup/plugins/gp-premium/elements/assets/admin/featured-image-placeholder.png deleted file mode 100644 index 500f8c9c..00000000 Binary files a/wp-content/upgrade-temp-backup/plugins/gp-premium/elements/assets/admin/featured-image-placeholder.png and /dev/null differ diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/elements/assets/admin/metabox.css b/wp-content/upgrade-temp-backup/plugins/gp-premium/elements/assets/admin/metabox.css deleted file mode 100644 index e793bcaa..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/elements/assets/admin/metabox.css +++ /dev/null @@ -1,396 +0,0 @@ -#generate_premium_elements { - background-color: transparent; - border: 0; - box-shadow: 0 0 0; -} - -#generate_premium_elements .inside { - padding: 0; - margin: 0; -} - -#generate_premium_elements .CodeMirror { - position: relative; - padding: 0; - background: white; - box-shadow: 0 0 0 1px rgba(200, 215, 225, 0.5), 0 1px 2px #e9eff3; - width: 100%; - overflow: hidden; -} - -tr.generate-element-row td { - border-bottom: 1px solid #f0f0f0; - zoom: 1; -} - -td.generate-element-row-heading { - background: #F9F9F9; - border-right: 1px solid #E1E1E1; - padding: 13px 15px; - width: 24%; -} - -td.generate-element-row-heading label { - display: inline-block; - font-size: 13px; - line-height: 1.4em; - font-weight: bold; - padding: 0; - margin: 0 0 3px; - color: #333; -} - -td.generate-element-row-content { - padding: 13px 15px; - position: relative; - width: 75%; -} - -#generate_premium_elements .handlediv, -#generate_premium_elements .hndle, -#generate_premium_elements .postbox-header { - display: none; -} - -#generate_premium_elements .inside { - padding: 0; -} - -#generate_premium_elements select, -#generate_premium_elements input[type="number"], -#generate_premium_elements input[type="text"] { - width: 100%; -} - -#generate_premium_elements .condition select.condition-object-select + .select2 { - display: none; -} - -#generate_premium_elements .condition.generate-elements-rule-objects-visible select.condition-select + .select2 { - margin-right: 5px; - width: 100%; -} - -#generate_premium_elements .condition.generate-elements-rule-objects-visible select.condition-object-select + .select2 { - display: inline-block; - margin-left: 5px; - width: 100%; -} - -#generate_premium_elements .condition { - display: flex; - margin-bottom: 10px; -} - -#generate_premium_elements .condition .select2 { - flex-grow: 1; -} - -button.remove-condition { - background: transparent; - border: 0; - line-height: 1; - width: 30px; - font-size: 20px; - cursor: pointer; - opacity: 0.5; - position: relative; - bottom: -3px; -} - -button.add-condition { - margin-top: 10px !important; -} - -button.remove-condition:before { - content: "\f153"; - font-family: dashicons; -} - -table.generate-elements-settings { - position: relative; - padding: 0; - background: white; - box-shadow: 0 0 0 1px rgba(200, 215, 225, 0.5), 0 1px 2px #e9eff3; - width: 100%; - overflow: hidden; -} - -.generate-element-row-loading { - background-color: rgba(255,255,255,0.9); - background-image: url('spinner.gif'); - background-position: center center; - background-repeat: no-repeat; - position: absolute; - top: 0; - bottom: 0; - left: 0; - right: 0; - z-index: 1; -} - -ul.element-metabox-tabs { - position: relative; - padding: 0; - margin: 0 0 20px; - background: white; - box-shadow: 0 0 0 1px rgba(200, 215, 225, 0.5), 0 1px 2px #e9eff3; - display: flex; - width: 100%; - overflow: hidden; -} - -ul.element-metabox-tabs li { - width: auto; - flex: none; - border-bottom: 2px solid transparent; - border-top: none; - text-align: center; - margin-bottom: 0; -} - -ul.element-metabox-tabs li a { - display: block; - width: auto; - padding: 16px 16px 14px 16px; - color: #0087be; - font-weight: 400; - text-decoration: none; - box-shadow: 0 0 0; -} - -ul.element-metabox-tabs li a:hover { - color: #00a0d2; -} - -ul.element-metabox-tabs li.is-selected { - border-bottom-color: #2e4453; -} - -ul.element-metabox-tabs li.is-selected a { - color: #2e4453; -} - -#generate-element-content, -#generate-element-content + .CodeMirror { - margin-bottom: 20px; -} - -.element-metabox-tabs li:not([data-tab="display-rules"]):not([data-tab="internal-notes"]), -.generate-elements-settings:not([data-tab="display-rules"]):not([data-tab="internal-notes"]) { - display: none; -} - -.element-settings.header .element-metabox-tabs li[data-type="header"], -.element-settings.hook .element-metabox-tabs li[data-type="hook"], -.element-settings.block .element-metabox-tabs li[data-type="hook"], -.element-settings.layout .element-metabox-tabs li[data-type="layout"] { - display: block; -} - -.element-settings.header:not(.has-page-hero) table[data-tab="site-header"], -.element-settings.header.has-page-hero table[data-tab="hero"], -.element-settings.hook table[data-tab="hook-settings"], -.element-settings.block table[data-tab="hook-settings"], -.element-settings.layout table[data-tab="sidebars"] { - display: table; -} - -.element-settings.header:not(.has-page-hero) #generate-element-content { - display: none; -} - -.element-settings.header:not(.has-page-hero) #generate-element-content + .CodeMirror:not(.gpp-elements-show-codemirror) { - height: 0; - overflow: hidden; - opacity: 0; - margin: 0; -} - -.padding-container { - display: flex; -} - -.single-value-padding-container { - display: block; -} - -.single-value-padding-container input[type="number"] { - width: 60px !important; - display: inline-block; - vertical-align: middle; -} - -.padding-element-options { - display: flex; -} - -.padding-element span.unit { - border: 1px solid #ddd; - display: inline-block; - line-height: 26px; - padding: 0 10px; - margin-left: -5px; - vertical-align: middle; - border-left: 0; -} - -.padding-element input { - width: 60px !important; - min-height: 30px; -} - -.padding-element select { - width: auto !important; - position: relative; - left: -5px; - min-height: 30px; -} - -.padding-element span { - display: block; - font-size: 90%; - opacity: 0.8; -} - -.generate-element-row-content .responsive-controls.single-responsive-value { - padding: 8px 15px 7px 0; -} - -.generate-element-row-content .responsive-controls.checkbox-responsive-value { - padding: 2px 15px 0 0; -} - -#postimagediv { - display: none; -} - -.image-preview img { - height: 30px; - width: auto; - vertical-align: middle; - border-radius: 5px; -} - -.gp-media-preview img { - vertical-align: middle; - background-color: #efefef; - border-radius: 5px; - height: 30px; - width: auto; -} - -.media-container, -.change-featured-image, -.set-featured-image { - display: flex; - align-items: center; -} - -.media-container > input, -.media-container .gp-media-preview img, -.change-featured-image > *, -.set-featured-image > * { - margin-right: 10px !important; -} - -.generate-element-row-content .responsive-controls { - float: left; - padding: 15px 15px 15px 0; -} - -.generate-element-row-content .responsive-controls a { - text-decoration: none; - color: #222; - opacity: 0.5; - outline: 0; - box-shadow: 0 0 0; -} - -.generate-element-row-content .responsive-controls a.is-selected { - opacity: 1; -} - -.generate-element-row-content .responsive-controls a span { - font-size: 14px; - width: auto; - height: auto; - vertical-align: baseline; -} - -#generate-element-content { - width: 100%; - height: 300px; -} - -.layout-radio-item { - margin-bottom: 3px; -} - -.layout-radio-item:first-child { - margin-bottom: 15px; -} - -span.tip { - display: inline-block; - float: right; - background: #b3b3b3; - height: 15px; - width: 15px; - text-align: center; - line-height: 15px; - color: #fff; - border-radius: 50%; - font-size: 10px; -} - -body:not(.header-element-type) #generate_page_hero_template_tags, -.header-element-type:not(.element-has-page-hero) #generate_page_hero_template_tags { - display: none; -} - -#_generate_element_internal_notes { - width: 100%; - height: 250px; -} - -.select2-results__option { - margin: 0; -} - -body .select2-container--default .select2-selection--single { - border-color: #ddd; -} - -.select2-results__option[role="list"] { - padding: 0; -} - -#generate_premium_elements #_generate_content_width { - width: 65px; - vertical-align: middle; -} - -#_generate_content_width + span { - border: 1px solid #ddd; - height: 26px; - display: inline-block; - vertical-align: middle; - line-height: 26px; - padding: 0 10px; - margin-left: -6px; -} - -.hide-hook-row, -.sidebar-notice { - display: none; -} - -.sidebar-notice { - margin-top: 10px; - font-style: italic; -} - -.element-settings.block .generate-elements-settings[data-type="hook"] tr:last-child td { - border-bottom: 0; -} diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/elements/assets/admin/metabox.js b/wp-content/upgrade-temp-backup/plugins/gp-premium/elements/assets/admin/metabox.js deleted file mode 100644 index c003b0df..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/elements/assets/admin/metabox.js +++ /dev/null @@ -1,424 +0,0 @@ -jQuery( function( $ ) { - if ( $( '.element-settings' ).hasClass( 'header' ) || $( '.element-settings' ).hasClass( 'hook' ) ) { - $( function() { - if ( elements.settings ) { - wp.codeEditor.initialize( 'generate-element-content', elements.settings ); - } - } ); - } - - $( '#_generate_block_type' ).on( 'change', function() { - var _this = $( this ).val(); - - if ( 'hook' === _this ) { - $( '.hook-row' ).removeClass( 'hide-hook-row' ); - } else { - $( '.hook-row' ).addClass( 'hide-hook-row' ); - } - - $( 'body' ).removeClass( 'right-sidebar-block-type' ); - $( 'body' ).removeClass( 'left-sidebar-block-type' ); - $( 'body' ).removeClass( 'header-block-type' ); - $( 'body' ).removeClass( 'footer-block-type' ); - - $( 'body' ).addClass( _this + '-block-type' ); - - if ( 'left-sidebar' === _this || 'right-sidebar' === _this ) { - $( '.sidebar-notice' ).show(); - } else { - $( '.sidebar-notice' ).hide(); - } - } ); - - $( '#_generate_hook' ).on( 'change', function() { - var _this = $( this ); - - $( '.disable-header-hook' ).hide(); - $( '.disable-footer-hook' ).hide(); - $( '.custom-hook-name' ).hide(); - - if ( 'generate_header' === _this.val() ) { - $( '.disable-header-hook' ).show(); - } - - if ( 'generate_footer' === _this.val() ) { - $( '.disable-footer-hook' ).show(); - } - - if ( 'custom' === _this.val() ) { - $( '.custom-hook-name' ).show(); - } - } ); - - $( '#_generate_hook' ).select2( { - width: '100%', - } ); - - $( '.element-metabox-tabs li' ).on( 'click', function() { - var _this = $( this ), - tab = _this.data( 'tab' ); - - _this.siblings().removeClass( 'is-selected' ); - _this.addClass( 'is-selected' ); - $( '.generate-elements-settings' ).hide(); - $( '.generate-elements-settings[data-tab="' + tab + '"]' ).show(); - - if ( $( '.element-settings' ).hasClass( 'block' ) && 'hook-settings' === tab ) { - $( '.generate-elements-settings[data-tab="display-rules"]' ).show(); - } - - if ( $( '.element-settings' ).hasClass( 'header' ) ) { - if ( 'hero' !== tab ) { - $( '#generate-element-content' ).next( '.CodeMirror' ).removeClass( 'gpp-elements-show-codemirror' ); - $( '#generate_page_hero_template_tags' ).css( 'display', '' ); - } else { - $( '#generate-element-content' ).next( '.CodeMirror' ).addClass( 'gpp-elements-show-codemirror' ); - $( '#generate_page_hero_template_tags' ).css( 'display', 'block' ); - } - } - } ); - - var select2Init = function() { - var selects = $( '.generate-element-row-content .condition:not(.hidden) select:not(.select2-init)' ); - - selects.each( function() { - var select = $( this ), - config = { - width: 'style', - }; - - select.select2( config ); - select.addClass( 'select2-init' ); - } ); - }; - - select2Init(); - - $( '.add-condition' ).on( 'click', function() { - var _this = $( this ); - - var row = _this.closest( '.generate-element-row-content' ).find( '.condition.hidden.screen-reader-text' ).clone( true ); - row.removeClass( 'hidden screen-reader-text' ); - row.insertBefore( _this.closest( '.generate-element-row-content' ).find( '.condition:last' ) ); - - select2Init(); - - return false; - } ); - - $( '.remove-condition' ).on( 'click', function() { - $( this ).parents( '.condition' ).remove(); - - select2Init(); - - return false; - } ); - - var getLocationObjects = function( _this, onload = false, data = '' ) { - var select = _this, - parent = select.parent(), - location = select.val(), - objectSelect = parent.find( '.condition-object-select' ), - locationType = '', - actionType = 'terms'; - - if ( '' === location ) { - parent.removeClass( 'generate-elements-rule-objects-visible' ); - select.closest( '.generate-element-row-content' ).find( '.generate-element-row-loading' ).remove(); - } else { - if ( location.indexOf( ':taxonomy:' ) > 0 ) { - locationType = 'taxonomy'; - } else { - locationType = location.substr( 0, location.indexOf( ':' ) ); - } - - var locationID = location.substr( location.lastIndexOf( ':' ) + 1 ); - - if ( 'taxonomy' === locationType || 'post' === locationType ) { - if ( ! ( '.generate-element-row-loading' ).length ) { - select.closest( '.generate-element-row-content' ).prepend( '
' ); - } - - var fillObjects = function( response ) { - var objects = response[ locationID ].objects; - - var blank = { - id: '', - name: 'All ' + response[ locationID ].label, - }; - - if ( location.indexOf( ':taxonomy:' ) > 0 ) { - blank.name = elements.choose; - } - - objectSelect.empty(); - - objectSelect.append( $( '' ); - objectSelect.val( '0' ); - } - } - }; - - $( '.condition select.condition-select' ).on( 'change', function() { - getLocationObjects( $( this ) ); - - $( '.elements-no-location-error' ).hide(); - } ); - - var postObjects = []; - var termObjects = []; - - $( '.generate-elements-rule-objects-visible' ).each( function() { - var _this = $( this ), - select = _this.find( 'select.condition-select' ), - location = select.val(), - locationID = location.substr( location.lastIndexOf( ':' ) + 1 ), - locationType = ''; - - if ( location.indexOf( ':taxonomy:' ) > 0 ) { - locationType = 'taxonomy'; - } else { - locationType = location.substr( 0, location.indexOf( ':' ) ); - } - - if ( 'post' === locationType ) { - if ( ! postObjects.includes( locationID ) ) { - postObjects.push( locationID ); - } - } else if ( 'taxonomy' === locationType && ! termObjects.includes( locationID ) ) { - termObjects.push( locationID ); - } - } ); - - if ( postObjects.length > 0 || termObjects.length > 0 ) { - $.post( ajaxurl, { - action: 'generate_elements_get_location_objects', - posts: postObjects, - terms: termObjects, - nonce: elements.nonce, - }, function( response ) { - response = JSON.parse( response ); - - $( '.generate-elements-rule-objects-visible' ).each( function() { - var _this = $( this ), - select = _this.find( 'select.condition-select' ); - - $( '
' ).insertBefore( _this ); - - getLocationObjects( select, true, response ); - } ); - } ); - } - - $( '.set-featured-image a, .change-featured-image a:not(.remove-image)' ).on( 'click', function( event ) { - event.preventDefault(); - - // Stop propagation to prevent thickbox from activating. - event.stopPropagation(); - - // Open the featured image modal - wp.media.featuredImage.frame().open(); - } ); - - wp.media.featuredImage.frame().on( 'select', function() { - $( '.set-featured-image' ).hide(); - $( '.change-featured-image' ).show(); - - setTimeout( function() { - $( '.image-preview' ).empty(); - $( '#postimagediv img' ).appendTo( '.image-preview' ); - }, 500 ); - } ); - - $( '#postimagediv' ).on( 'click', '#remove-post-thumbnail', function() { - $( '.set-featured-image' ).show(); - $( '.change-featured-image' ).hide(); - $( '.image-preview' ).empty(); - return false; - } ); - - $( '.remove-image' ).on( 'click', function( e ) { - e.preventDefault(); - - $( '#remove-post-thumbnail' ).trigger( 'click' ); - } ); - - $( '.generate-upload-file' ).on( 'click', function() { - if ( frame ) { - frame.open(); - return; - } - - var _this = $( this ), - container = _this.closest( '.media-container' ); - - var frame = wp.media( { - title: _this.data( 'title' ), - multiple: false, - library: { type: _this.data( 'type' ) }, - button: { text: _this.data( 'insert' ) }, - } ); - - frame.on( 'select', function() { - var attachment = frame.state().get( 'selection' ).first().toJSON(); - - container.find( '.media-field' ).val( attachment.id ); - container.find( '.remove-field' ).show(); - - if ( _this.data( 'preview' ) ) { - container.find( '.gp-media-preview' ).empty().append( '' ).show(); - } - } ); - - frame.open(); - } ); - - $( '.remove-field' ).on( 'click', function() { - var _this = $( this ), - container = _this.closest( '.media-container' ); - - _this.hide(); - container.find( '.media-field' ).val( '' ); - container.find( '.gp-media-preview' ).empty(); - } ); - - $( '#_generate_hero_background_image' ).on( 'change', function() { - var _this = $( this ); - - if ( '' !== _this.val() ) { - $( '.requires-background-image' ).show(); - } else { - $( '.requires-background-image' ).hide(); - } - - if ( 'featured-image' === _this.val() ) { - $( '.image-text' ).text( elements.fallback_image ); - } - - if ( 'custom-image' === _this.val() ) { - $( '.image-text' ).text( elements.custom_image ); - } - } ); - - // Responsive controls in our settings. - $( '.responsive-controls a' ).on( 'click', function( e ) { - e.preventDefault(); - - var _this = $( this ), - control = _this.attr( 'data-control' ), - controlArea = _this.closest( '.generate-element-row-content' ); - - controlArea.find( '.padding-container' ).hide(); - controlArea.find( '.padding-container.' + control ).show(); - _this.siblings().removeClass( 'is-selected' ); - _this.addClass( 'is-selected' ); - } ); - - $( '#_generate_site_header_merge' ).on( 'change', function() { - var _this = $( this ); - - if ( '' !== _this.val() ) { - $( '.requires-header-merge' ).show(); - - if ( $( '#_generate_navigation_colors' ).is( ':checked' ) ) { - $( '.requires-navigation-colors' ).show(); - } - - if ( $( '#_generate_hero_full_screen' ).is( ':checked' ) ) { - $( '.requires-full-screen' ).show(); - } - } else { - $( '.requires-header-merge' ).hide(); - $( '.requires-navigation-colors' ).hide(); - $( '.requires-full-screen' ).hide(); - } - } ); - - $( '#_generate_navigation_colors' ).on( 'change', function() { - var _this = $( this ); - - if ( _this.is( ':checked' ) ) { - $( '.requires-navigation-colors' ).show(); - } else { - $( '.requires-navigation-colors' ).hide(); - } - } ); - - $( '#_generate_hero_full_screen' ).on( 'change', function() { - var _this = $( this ); - - if ( _this.is( ':checked' ) ) { - $( '.requires-full-screen' ).show(); - } else { - $( '.requires-full-screen' ).hide(); - } - } ); - - $( '#_generate_hero_background_parallax' ).on( 'change', function() { - var _this = $( this ); - - if ( _this.is( ':checked' ) ) { - $( '#_generate_hero_background_position' ).val( '' ).change(); - $( '#_generate_hero_background_position option[value="left center"]' ).attr( 'disabled', true ); - $( '#_generate_hero_background_position option[value="left bottom"]' ).attr( 'disabled', true ); - $( '#_generate_hero_background_position option[value="right center"]' ).attr( 'disabled', true ); - $( '#_generate_hero_background_position option[value="right bottom"]' ).attr( 'disabled', true ); - $( '#_generate_hero_background_position option[value="center center"]' ).attr( 'disabled', true ); - $( '#_generate_hero_background_position option[value="center bottom"]' ).attr( 'disabled', true ); - } else { - $( '#_generate_hero_background_position option[value="left center"]' ).attr( 'disabled', false ); - $( '#_generate_hero_background_position option[value="left bottom"]' ).attr( 'disabled', false ); - $( '#_generate_hero_background_position option[value="right center"]' ).attr( 'disabled', false ); - $( '#_generate_hero_background_position option[value="right bottom"]' ).attr( 'disabled', false ); - $( '#_generate_hero_background_position option[value="center center"]' ).attr( 'disabled', false ); - $( '#_generate_hero_background_position option[value="center bottom"]' ).attr( 'disabled', false ); - } - } ); -} ); diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/elements/assets/admin/spinner.gif b/wp-content/upgrade-temp-backup/plugins/gp-premium/elements/assets/admin/spinner.gif deleted file mode 100644 index 209d10b6..00000000 Binary files a/wp-content/upgrade-temp-backup/plugins/gp-premium/elements/assets/admin/spinner.gif and /dev/null differ diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/elements/assets/js/parallax.js b/wp-content/upgrade-temp-backup/plugins/gp-premium/elements/assets/js/parallax.js deleted file mode 100644 index a4540e52..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/elements/assets/js/parallax.js +++ /dev/null @@ -1,17 +0,0 @@ -function generate_parallax_element( selector, context ) { - context = context || document; - var elements = context.querySelectorAll( selector ); - return Array.prototype.slice.call( elements ); -} - -window.addEventListener( "scroll", function() { - var scrolledHeight= window.pageYOffset; - generate_parallax_element( ".page-hero" ).forEach( function( el, index, array ) { - var limit = el.offsetTop + el.offsetHeight; - if( scrolledHeight > el.offsetTop && scrolledHeight <= limit ) { - el.style.backgroundPositionY = ( scrolledHeight - el.offsetTop ) / hero.parallax + "px"; - } else { - el.style.backgroundPositionY = "0"; - } - }); -}); diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/elements/assets/js/parallax.min.js b/wp-content/upgrade-temp-backup/plugins/gp-premium/elements/assets/js/parallax.min.js deleted file mode 100644 index f1918424..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/elements/assets/js/parallax.min.js +++ /dev/null @@ -1 +0,0 @@ -function generate_parallax_element(e,o){var t=(o=o||document).querySelectorAll(e);return Array.prototype.slice.call(t)}window.addEventListener("scroll",function(){var r=window.pageYOffset;generate_parallax_element(".page-hero").forEach(function(e,o,t){var a=e.offsetTop+e.offsetHeight;r>e.offsetTop&&r<=a?e.style.backgroundPositionY=(r-e.offsetTop)/hero.parallax+"px":e.style.backgroundPositionY="0"})}); diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/elements/class-block-elements.php b/wp-content/upgrade-temp-backup/plugins/gp-premium/elements/class-block-elements.php deleted file mode 100644 index 4e2b73de..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/elements/class-block-elements.php +++ /dev/null @@ -1,1789 +0,0 @@ - true, - ) - ) - ); - - $parent_elements = get_posts( - array( - 'post_type' => 'gp_elements', - 'post_parent' => 0, - 'no_found_rows' => true, - 'post_status' => 'publish', - 'numberposts' => 100, - 'fields' => 'ids', - 'exclude' => array( get_the_ID() ), - 'meta_query' => array( - array( - 'key' => '_generate_block_type', - 'value' => 'content-template', - 'compare' => '=', - ), - ), - ) - ); - - $parent_elements_data = array(); - - foreach ( (array) $parent_elements as $element ) { - $parent_elements_data[] = array( - 'label' => get_the_title( $element ), - 'id' => $element, - ); - } - - $image_sizes = get_intermediate_image_sizes(); - $image_sizes = array_diff( $image_sizes, array( '1536x1536', '2048x2048' ) ); - $image_sizes[] = 'full'; - - $containerWidth = function_exists( 'generate_get_option' ) ? generate_get_option( 'container_width' ) : 1100; - $rightSidebarWidth = apply_filters( 'generate_right_sidebar_width', '25' ); - $leftSidebarWidth = apply_filters( 'generate_left_sidebar_width', '25' ); - - $containerWidth = floatval( $containerWidth ); - $leftSidebarWidth = '0.' . $leftSidebarWidth; - $rightSidebarWidth = '0.' . $rightSidebarWidth; - - $leftSidebarWidth = $containerWidth - ( $containerWidth * $leftSidebarWidth ); - $rightSidebarWidth = $containerWidth - ( $containerWidth * $rightSidebarWidth ); - - $leftSidebarWidth = $containerWidth - $leftSidebarWidth; - $rightSidebarWidth = $containerWidth - $rightSidebarWidth; - - $contentWidth = $containerWidth - $rightSidebarWidth; - - wp_localize_script( - 'gp-premium-block-elements', - 'gpPremiumBlockElements', - array( - 'isBlockElement' => 'gp_elements' === get_post_type(), - 'taxonomies' => $taxonomies, - 'rightSidebarWidth' => $rightSidebarWidth, - 'leftSidebarWidth' => $leftSidebarWidth, - 'contentWidth' => $contentWidth, - 'hooks' => GeneratePress_Elements_Helper::get_available_hooks(), - 'excerptLength' => apply_filters( 'excerpt_length', 55 ), // phpcs:ignore -- Core filter. - 'isGenerateBlocksActive' => function_exists( 'generateblocks_load_plugin_textdomain' ), - 'isGenerateBlocksInstalled' => file_exists( WP_PLUGIN_DIR . '/generateblocks/plugin.php' ) ? true : false, - 'isGenerateBlocksProActive' => function_exists( 'generateblocks_pro_init' ), - 'installLink' => wp_nonce_url( self_admin_url( 'update.php?action=install-plugin&plugin=generateblocks' ), 'install-plugin_generateblocks' ), - 'activateLink' => wp_nonce_url( 'plugins.php?action=activate&plugin=generateblocks/plugin.php&plugin_status=all&paged=1&s', 'activate-plugin_generateblocks/plugin.php' ), - 'imageSizes' => $image_sizes, - 'imageSizeDimensions' => $this->get_image_Sizes(), - 'featuredImagePlaceholder' => GP_PREMIUM_DIR_URL . 'elements/assets/admin/featured-image-placeholder.png', - 'authorImagePlaceholder' => GP_PREMIUM_DIR_URL . 'elements/assets/admin/author-image-placeholder.png', - 'bgImageFallback' => GP_PREMIUM_DIR_URL . 'elements/assets/admin/background-image-fallback.jpg', - 'templateImageUrl' => 'https://gpsites.co/files/element-library', - 'parentElements' => $parent_elements_data, - ) - ); - - wp_enqueue_style( - 'gp-premium-block-elements', - GP_PREMIUM_DIR_URL . 'dist/block-elements.css', - array( 'wp-edit-blocks' ), - filemtime( GP_PREMIUM_DIR_PATH . 'dist/block-elements.css' ) - ); - } - - /** - * Add our block category. - * - * @param array $categories The existing categories. - */ - public function add_block_category( $categories ) { - return array_merge( - array( - array( - 'slug' => 'generatepress', - 'title' => __( 'GeneratePress', 'gp-premium' ), - ), - ), - $categories - ); - } - - /** - * Register our dynamic blocks. - */ - public function register_dynamic_blocks() { - if ( ! function_exists( 'register_block_type' ) ) { - return; - } - - register_block_type( - 'generatepress/dynamic-content', - array( - 'render_callback' => array( $this, 'do_dynamic_content_block' ), - 'attributes' => array( - 'contentType' => array( - 'type' => 'string', - 'default' => '', - ), - 'excerptLength' => array( - 'type' => 'number', - 'default' => apply_filters( 'excerpt_length', 55 ), // phpcs:ignore -- Core filter. - ), - 'useThemeMoreLink' => array( - 'type' => 'boolean', - 'defaut' => true, - ), - 'customMoreLink' => array( - 'type' => 'string', - 'default' => '', - ), - ), - ) - ); - - register_block_type( - 'generatepress/dynamic-image', - array( - 'render_callback' => array( $this, 'do_dynamic_image_block' ), - 'attributes' => array( - 'imageType' => array( - 'type' => 'string', - 'default' => '', - ), - 'imageSource' => array( - 'type' => 'string', - 'default' => 'current-post', - ), - 'customField' => array( - 'type' => 'string', - 'default' => '', - ), - 'gpDynamicSourceInSameTerm' => array( - 'type' => 'boolean', - 'default' => false, - ), - 'gpDynamicSourceInSameTermTaxonomy' => array( - 'tyoe' => 'string', - 'default' => 'category', - ), - 'imageSize' => array( - 'type' => 'string', - 'default' => 'full', - ), - 'linkTo' => array( - 'type' => 'string', - 'default' => '', - ), - 'linkToCustomField' => array( - 'type' => 'string', - 'default' => '', - ), - 'imageWidth' => array( - 'type' => 'number', - 'default' => null, - ), - 'imageHeight' => array( - 'type' => 'number', - 'default' => null, - ), - 'avatarSize' => array( - 'type' => 'number', - 'default' => 30, - ), - 'avatarRounded' => array( - 'type' => 'boolean', - 'default' => false, - ), - ), - ) - ); - } - - /** - * Do our dynamic content block. - * - * @param array $attributes The attributes from this block. - */ - public function do_dynamic_content_block( $attributes ) { - if ( empty( $attributes['contentType'] ) ) { - return; - } - - if ( 'post-content' === $attributes['contentType'] ) { - return $this->do_content_block(); - } - - if ( 'post-excerpt' === $attributes['contentType'] ) { - return $this->do_excerpt_block( $attributes ); - } - - if ( 'term-description' === $attributes['contentType'] ) { - return sprintf( - '
%s
', - term_description() - ); - } - - if ( 'author-description' === $attributes['contentType'] ) { - return sprintf( - '
%s
', - get_the_author_meta( 'description' ) - ); - } - } - - /** - * Build our content block. - */ - public function do_content_block() { - // Prevents infinite loops while in the editor or autosaving. - $nonpublic_post_types = array( - 'gp_elements', - 'revision', - ); - - if ( ! in_array( get_post_type(), $nonpublic_post_types ) && ! is_admin() ) { - return sprintf( - '
%s
', - apply_filters( 'the_content', str_replace( ']]>', ']]>', get_the_content() ) ) // phpcs:ignore -- Core filter. - ); - } - } - - /** - * Build our excerpt block. - * - * @param array $attributes The block attributes. - */ - public function do_excerpt_block( $attributes ) { - if ( version_compare( PHP_VERSION, '5.6', '>=' ) ) { - $filter_excerpt_length = function( $length ) use ( $attributes ) { - return isset( $attributes['excerptLength'] ) ? $attributes['excerptLength'] : $length; - }; - - add_filter( - 'excerpt_length', - $filter_excerpt_length, - 100 - ); - - if ( isset( $attributes['useThemeMoreLink'] ) && ! $attributes['useThemeMoreLink'] ) { - $filter_more_text = function() use ( $attributes ) { - if ( empty( $attributes['customMoreLink'] ) ) { - return ' ...'; - } - - return apply_filters( - 'generate_excerpt_block_more_output', - sprintf( - ' ... %3$s', - the_title_attribute( 'echo=0' ), - esc_url( get_permalink( get_the_ID() ) ), - wp_kses_post( $attributes['customMoreLink'] ), - sprintf( - /* translators: Aria-label describing the read more button */ - _x( 'More on %s', 'more on post title', 'gp-premium' ), - the_title_attribute( 'echo=0' ) - ) - ) - ); - }; - - add_filter( - 'excerpt_more', - $filter_more_text, - 100 - ); - } - } - - if ( 'gp_elements' === get_post_type() || is_admin() ) { - $post = get_posts( - array( - 'post_type' => 'post', - 'numberposts' => 1, - ) - ); - - if ( ! empty( $post[0] ) ) { - return sprintf( - '
%s
', - apply_filters( 'the_excerpt', get_the_excerpt( $post[0]->ID ) ) // phpcs:ignore -- Core filter. - ); - } else { - return sprintf( - '

%s

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed pulvinar ligula augue, quis bibendum tellus scelerisque venenatis. Pellentesque porta nisi mi. In hac habitasse platea dictumst. Etiam risus elit, molestie non volutpat ac, pellentesque sed eros. Nunc leo odio, sodales non tortor at, porttitor posuere dui.

', - __( 'This is a placeholder for your content.', 'gp-premium' ) - ); - } - } - - $excerpt = apply_filters( 'the_excerpt', get_the_excerpt() ); // phpcs:ignore -- Core filter. - - if ( isset( $filter_excerpt_length ) ) { - remove_filter( - 'excerpt_length', - $filter_excerpt_length, - 100 - ); - } - - if ( isset( $filter_more_text ) ) { - remove_filter( - 'excerpt_more', - $filter_more_text, - 100 - ); - } - - return sprintf( - '
%s
', - $excerpt - ); - } - - /** - * Build our dynamic image block. - * - * @param array $attributes The block attributes. - */ - public function do_dynamic_image_block( $attributes ) { - if ( empty( $attributes['imageType'] ) ) { - return; - } - - if ( 'featured-image' === $attributes['imageType'] ) { - $image_source = ! empty( $attributes['imageSource'] ) ? $attributes['imageSource'] : 'current-post'; - $id = $this->get_source_id( $image_source, $attributes ); - - if ( ! $id ) { - return; - } - - if ( has_post_thumbnail( $id ) ) { - $size = ! empty( $attributes['imageSize'] ) ? $attributes['imageSize'] : 'full'; - $featured_image_classes = array( 'dynamic-featured-image' ); - - if ( ! empty( $attributes['className'] ) ) { - $featured_image_classes[] = $attributes['className']; - } - - $featured_image = get_the_post_thumbnail( $id, $size, array( 'class' => implode( ' ', $featured_image_classes ) ) ); - - // We can't alter the width/height generated by get_the_post_thumbnail(), so we need to resort to this. - if ( ! empty( $attributes['imageWidth'] ) ) { - $featured_image = preg_replace( '/width=[\"\'][0-9]+[\"\']/i', 'width="' . absint( $attributes['imageWidth'] ) . '"', $featured_image ); - } - - if ( ! empty( $attributes['imageHeight'] ) ) { - $featured_image = preg_replace( '/height=[\"\'][0-9]+[\"\']/i', 'height="' . absint( $attributes['imageHeight'] ) . '"', $featured_image ); - } - - if ( $featured_image ) { - if ( ! empty( $attributes['linkTo'] ) ) { - if ( 'single-post' === $attributes['linkTo'] ) { - $featured_image = sprintf( - '%s', - esc_url( get_permalink( $id ) ), - $featured_image - ); - } - - if ( 'custom-field' === $attributes['linkTo'] ) { - $custom_field = get_post_meta( $id, $attributes['linkToCustomField'], true ); - - if ( $custom_field ) { - $featured_image = sprintf( - '%s', - esc_url( $custom_field ), - $featured_image - ); - } - } - } - - return $featured_image; - } - } - } - - if ( 'post-meta' === $attributes['imageType'] ) { - $image_source = ! empty( $attributes['imageSource'] ) ? $attributes['imageSource'] : 'current-post'; - $id = $this->get_source_id( $image_source, $attributes ); - - if ( ! $id ) { - return; - } - - $image_field_name = ! empty( $attributes['customField'] ) ? $attributes['customField'] : ''; - - if ( $image_field_name ) { - $image = get_post_meta( $id, $image_field_name, true ); - - if ( ctype_digit( $image ) ) { - $size = ! empty( $attributes['imageSize'] ) ? $attributes['imageSize'] : 'full'; - $image_output = wp_get_attachment_image( $image, $size, false, array( 'class' => 'dynamic-meta-image' ) ); - - // We can't alter the width/height generated by get_the_post_thumbnail(), so we need to resort to this. - if ( ! empty( $attributes['imageWidth'] ) ) { - $image_output = preg_replace( '/width=[\"\'][0-9]+[\"\']/i', 'width="' . absint( $attributes['imageWidth'] ) . '"', $image_output ); - } - - if ( ! empty( $attributes['imageHeight'] ) ) { - $image_output = preg_replace( '/height=[\"\'][0-9]+[\"\']/i', 'height="' . absint( $attributes['imageHeight'] ) . '"', $image_output ); - } - } else { - $image_output = apply_filters( - 'generate_dynamic_custom_field_image', - sprintf( - '', - $image, - ! empty( $attributes['imageWidth'] ) ? absint( $attributes['imageWidth'] ) : '', - ! empty( $attributes['imageHeight'] ) ? absint( $attributes['imageHeight'] ) : '' - ) - ); - } - - if ( ! empty( $image_output ) ) { - if ( ! empty( $attributes['linkTo'] ) ) { - if ( 'single-post' === $attributes['linkTo'] ) { - $image_output = sprintf( - '%s', - esc_url( get_permalink( $id ) ), - $image_output - ); - } - - if ( 'custom-field' === $attributes['linkTo'] ) { - $custom_field = get_post_meta( $id, $attributes['linkToCustomField'], true ); - - if ( $custom_field ) { - $image_output = sprintf( - '%s', - esc_url( $custom_field ), - $image_output - ); - } - } - } - - return $image_output; - } - } - } - - if ( 'author-avatar' === $attributes['imageType'] ) { - global $post; - $author_id = $post->post_author; - $size = ! empty( $attributes['avatarSize'] ) ? $attributes['avatarSize'] : 30; - $image_alt = apply_filters( 'generate_dynamic_author_image_alt', __( 'Photo of author', 'gp-premium' ) ); - - $classes = array( - 'dynamic-author-image', - ); - - if ( ! empty( $attributes['avatarRounded'] ) ) { - $classes[] = 'dynamic-author-image-rounded'; - } - - $avatar = get_avatar( - $author_id, - $size, - '', - esc_attr( $image_alt ), - array( - 'class' => implode( ' ', $classes ), - ) - ); - - if ( $avatar ) { - return $avatar; - } - } - } - - /** - * Get our dynamic URL. - * - * @param string $link_type The kind of link to add. - * @param string $source The source of the dynamic data. - * @param array $block The block we're working with. - */ - public function get_dynamic_url( $link_type, $source, $block ) { - $id = $this->get_source_id( $source, $block['attrs'] ); - $author_id = $this->get_author_id( $source, $block['attrs'] ); - $url = ''; - - if ( 'single-post' === $link_type ) { - $url = get_permalink( $id ); - } - - if ( isset( $block['attrs']['gpDynamicLinkCustomField'] ) ) { - if ( 'post-meta' === $link_type ) { - $url = get_post_meta( $id, $block['attrs']['gpDynamicLinkCustomField'], true ); - } - - if ( 'user-meta' === $link_type ) { - $url = $this->get_user_data( $author_id, $block['attrs']['gpDynamicLinkCustomField'] ); - } - - if ( 'term-meta' === $link_type ) { - $url = get_term_meta( get_queried_object_id(), $block['attrs']['gpDynamicLinkCustomField'], true ); - } - } - - if ( 'author-archives' === $link_type ) { - $url = get_author_posts_url( $author_id ); - } - - if ( 'comments' === $link_type ) { - $url = get_comments_link( $id ); - } - - if ( 'next-posts' === $link_type ) { - global $paged, $wp_query; - - $max_page = 0; - - if ( ! $max_page ) { - $max_page = $wp_query->max_num_pages; - } - - $paged_num = isset( $paged ) && $paged ? $paged : 1; - $nextpage = (int) $paged_num + 1; - - if ( ! is_single() && ( $nextpage <= $max_page ) ) { - $url = next_posts( $max_page, false ); - } - } - - if ( 'previous-posts' === $link_type ) { - global $paged; - - if ( ! is_single() && (int) $paged > 1 ) { - $url = previous_posts( false ); - } - } - - return apply_filters( 'generate_dynamic_element_url', $url, $link_type, $source, $block ); - } - - /** - * Wrap our dynamic text in a link. - * - * @param string $text The text to wrap. - * @param string $link_type The kind of link to add. - * @param string $source The source of the dynamic data. - * @param array $block The block we're working with. - */ - public function add_dynamic_link( $text, $link_type, $source, $block ) { - if ( 'generateblocks/headline' === $block['blockName'] ) { - $url = $this->get_dynamic_url( $link_type, $source, $block ); - - if ( ! $url ) { - return $text; - } - - return sprintf( - '%s', - esc_url( $url ), - $text - ); - } - - if ( 'generateblocks/button' === $block['blockName'] ) { - $url = $this->get_dynamic_url( $link_type, $source, $block ); - - // Since this is a button, we want to scrap the whole block if we don't have a link. - if ( ! $url ) { - return ''; - } - - $dynamic_url = sprintf( - 'href="%s"', - esc_url( $url ) - ); - - return str_replace( 'href="#"', $dynamic_url, $text ); - } - } - - /** - * Get user data. - * - * @since 2.0.0 - * @param int $author_id The ID of the user. - * @param string $field The field to look up. - */ - public function get_user_data( $author_id, $field ) { - $data = get_user_meta( $author_id, $field, true ); - - if ( ! $data ) { - $user_data_names = array( - 'user_nicename', - 'user_email', - 'user_url', - 'display_name', - ); - - if ( in_array( $field, $user_data_names ) ) { - $user_data = get_userdata( $author_id ); - - if ( $user_data ) { - switch ( $field ) { - case 'user_nicename': - $data = $user_data->user_nicename; - break; - - case 'user_email': - $data = $user_data->user_email; - break; - - case 'user_url': - $data = $user_data->user_url; - break; - - case 'display_name': - $data = $user_data->display_name; - break; - } - } - } - } - - return $data; - } - - /** - * Add the dynamic bits to our blocks. - * - * @param string $block_content The block content. - * @param array $block The block info. - */ - public function render_blocks( $block_content, $block ) { - if ( 'gp_elements' === get_post_type() || is_admin() ) { - return $block_content; - } - - if ( 'generateblocks/headline' === $block['blockName'] || 'generateblocks/button' === $block['blockName'] ) { - if ( ! empty( $block['attrs']['gpDynamicTextType'] ) && ! empty( $block['attrs']['gpDynamicTextReplace'] ) ) { - $text_to_replace = $block['attrs']['gpDynamicTextReplace']; - $text_type = $block['attrs']['gpDynamicTextType']; - $link_type = ! empty( $block['attrs']['gpDynamicLinkType'] ) ? $block['attrs']['gpDynamicLinkType'] : ''; - $source = ! empty( $block['attrs']['gpDynamicSource'] ) ? $block['attrs']['gpDynamicSource'] : 'current-post'; - $id = $this->get_source_id( $source, $block['attrs'] ); - - if ( ! $id ) { - return ''; - } - - if ( 'title' === $text_type ) { - $post_title = get_the_title( $id ); - - if ( ! in_the_loop() ) { - if ( is_tax() || is_category() || is_tag() ) { - $post_title = get_queried_object()->name; - } elseif ( is_post_type_archive() ) { - $post_title = post_type_archive_title( '', false ); - } elseif ( is_archive() && function_exists( 'get_the_archive_title' ) ) { - $post_title = get_the_archive_title(); - - if ( is_author() ) { - $post_title = get_the_author(); - } - } elseif ( is_home() ) { - $page_for_posts = get_option( 'page_for_posts' ); - - if ( ! empty( $page_for_posts ) ) { - $post_title = get_the_title( $page_for_posts ); - } else { - $post_title = __( 'Blog', 'gp-premium' ); - } - } - } - - $post_title = apply_filters( 'generate_dynamic_element_text', $post_title, $block ); - - if ( $link_type ) { - $post_title = $this->add_dynamic_link( $post_title, $link_type, $source, $block ); - } - - if ( ! empty( $block['attrs']['gpDynamicTextBefore'] ) ) { - $post_title = $block['attrs']['gpDynamicTextBefore'] . $post_title; - } - - $post_title = apply_filters( 'generate_dynamic_element_text_output', $post_title, $block ); - $block_content = str_replace( $text_to_replace, $post_title, $block_content ); - } - - if ( 'post-date' === $text_type ) { - $updated_time = get_the_modified_time( 'U', $id ); - $published_time = get_the_time( 'U', $id ) + 1800; - - $post_date = sprintf( - '', - esc_attr( get_the_date( 'c', $id ) ), - esc_html( get_the_date( '', $id ) ) - ); - - $is_updated_date = isset( $block['attrs']['gpDynamicDateType'] ) && 'updated-date' === $block['attrs']['gpDynamicDateType']; - - if ( ! empty( $block['attrs']['gpDynamicDateUpdated'] ) || $is_updated_date ) { - if ( $updated_time > $published_time ) { - $post_date = sprintf( - '', - esc_attr( get_the_modified_date( 'c', $id ) ), - esc_html( get_the_modified_date( '', $id ) ) - ); - } elseif ( $is_updated_date ) { - // If we're showing the updated date but no updated date exists, don't display anything. - return ''; - } - } - - $post_date = apply_filters( 'generate_dynamic_element_text', $post_date, $block ); - - if ( $link_type ) { - $post_date = $this->add_dynamic_link( $post_date, $link_type, $source, $block ); - } - - $before_text = ''; - - if ( ! empty( $block['attrs']['gpDynamicTextBefore'] ) ) { - $before_text = $block['attrs']['gpDynamicTextBefore']; - } - - // Use the updated date before text if we're set to replace the published date with updated date. - if ( ! empty( $block['attrs']['gpDynamicUpdatedDateBefore'] ) && ! empty( $block['attrs']['gpDynamicDateUpdated'] ) && $updated_time > $published_time ) { - $before_text = $block['attrs']['gpDynamicUpdatedDateBefore']; - } - - if ( ! empty( $before_text ) ) { - $post_date = $before_text . $post_date; - } - - $post_date = apply_filters( 'generate_dynamic_element_text_output', $post_date, $block ); - $block_content = str_replace( $text_to_replace, $post_date, $block_content ); - } - - if ( 'post-author' === $text_type ) { - $author_id = $this->get_author_id( $source, $block['attrs'] ); - $post_author = get_the_author_meta( 'display_name', $author_id ); - $post_author = apply_filters( 'generate_dynamic_element_text', $post_author, $block ); - - if ( empty( $post_author ) ) { - return ''; - } - - if ( $link_type ) { - $post_author = $this->add_dynamic_link( $post_author, $link_type, $source, $block ); - } - - if ( ! empty( $block['attrs']['gpDynamicTextBefore'] ) ) { - $post_author = $block['attrs']['gpDynamicTextBefore'] . $post_author; - } - - $post_author = apply_filters( 'generate_dynamic_element_text_output', $post_author, $block ); - $block_content = str_replace( $text_to_replace, $post_author, $block_content ); - } - - if ( 'terms' === $text_type && 'generateblocks/headline' === $block['blockName'] ) { - if ( ! empty( $block['attrs']['gpDynamicTextTaxonomy'] ) ) { - $terms = get_the_terms( $id, $block['attrs']['gpDynamicTextTaxonomy'] ); - - if ( is_wp_error( $terms ) ) { - return $block_content; - } - - $term_items = array(); - - foreach ( (array) $terms as $term ) { - if ( ! isset( $term->name ) ) { - continue; - } - - if ( 'term-archives' === $link_type ) { - $term_link = get_term_link( $term, $block['attrs']['gpDynamicTextTaxonomy'] ); - - if ( ! is_wp_error( $term_link ) ) { - $term_items[] = sprintf( - '%2$s', - esc_url( get_term_link( $term, $block['attrs']['gpDynamicTextTaxonomy'] ) ), - $term->name, - $term->slug - ); - } - } else { - $term_items[] = sprintf( - '%1$s', - $term->name, - $term->slug - ); - } - } - - if ( empty( $term_items ) ) { - return ''; - } - - $sep = isset( $block['attrs']['gpDynamicTextTaxonomySeparator'] ) ? $block['attrs']['gpDynamicTextTaxonomySeparator'] : ', '; - $term_output = implode( $sep, $term_items ); - - if ( ! empty( $block['attrs']['gpDynamicTextBefore'] ) ) { - $term_output = $block['attrs']['gpDynamicTextBefore'] . $term_output; - } - - $term_output = apply_filters( 'generate_dynamic_element_text_output', $term_output, $block ); - $block_content = str_replace( $text_to_replace, $term_output, $block_content ); - } else { - return ''; - } - } - - if ( 'comments-number' === $text_type ) { - if ( ! post_password_required( $id ) && ( comments_open( $id ) || get_comments_number( $id ) ) ) { - if ( ! isset( $block['attrs']['gpDynamicNoCommentsText'] ) ) { - $block['attrs']['gpDynamicNoCommentsText'] = __( 'No Comments', 'gp-premium' ); - } - - if ( '' === $block['attrs']['gpDynamicNoCommentsText'] && get_comments_number( $id ) < 1 ) { - return ''; - } - - $comments_text = get_comments_number_text( - $block['attrs']['gpDynamicNoCommentsText'], - ! empty( $block['attrs']['gpDynamicSingleCommentText'] ) ? $block['attrs']['gpDynamicSingleCommentText'] : __( '1 Comment', 'gp-premium' ), - ! empty( $block['attrs']['gpDynamicMultipleCommentsText'] ) ? $block['attrs']['gpDynamicMultipleCommentsText'] : __( '% Comments', 'gp-premium' ) - ); - - $comments_text = apply_filters( 'generate_dynamic_element_text', $comments_text, $block ); - - if ( '' === $comments_text ) { - return ''; - } - - if ( $link_type ) { - $comments_text = $this->add_dynamic_link( $comments_text, $link_type, $source, $block ); - } - - if ( ! empty( $block['attrs']['gpDynamicTextBefore'] ) ) { - $comments_text = $block['attrs']['gpDynamicTextBefore'] . $comments_text; - } - - $comments_text = apply_filters( 'generate_dynamic_element_text_output', $comments_text, $block ); - $block_content = str_replace( $text_to_replace, $comments_text, $block_content ); - } else { - return ''; - } - } - - if ( 'post-meta' === $text_type || 'term-meta' === $text_type || 'user-meta' === $text_type ) { - if ( ! empty( $block['attrs']['gpDynamicTextCustomField'] ) ) { - $custom_field = get_post_meta( $id, $block['attrs']['gpDynamicTextCustomField'], true ); - - if ( 'term-meta' === $text_type ) { - $custom_field = get_term_meta( get_queried_object_id(), $block['attrs']['gpDynamicTextCustomField'], true ); - } - - if ( 'user-meta' === $text_type ) { - $author_id = $this->get_author_id( $source, $block['attrs'] ); - $custom_field = $this->get_user_data( $author_id, $block['attrs']['gpDynamicTextCustomField'] ); - } - - $custom_field = apply_filters( 'generate_dynamic_element_text', $custom_field, $block ); - - if ( $custom_field ) { - if ( $link_type ) { - $custom_field = $this->add_dynamic_link( $custom_field, $link_type, $source, $block ); - } - - if ( ! empty( $block['attrs']['gpDynamicTextBefore'] ) ) { - $custom_field = $block['attrs']['gpDynamicTextBefore'] . $custom_field; - } - - add_filter( 'wp_kses_allowed_html', [ 'GeneratePress_Elements_Helper', 'expand_allowed_html' ], 10, 2 ); - $custom_field = wp_kses_post( $custom_field ); - remove_filter( 'wp_kses_allowed_html', [ 'GeneratePress_Elements_Helper', 'expand_allowed_html' ], 10, 2 ); - - $custom_field = apply_filters( 'generate_dynamic_element_text_output', $custom_field, $block ); - $block_content = str_replace( $text_to_replace, $custom_field, $block_content ); - } else { - $block_content = ''; - } - } else { - $block_content = ''; - } - } - } - } - - if ( 'generateblocks/button' === $block['blockName'] ) { - $link_type = ! empty( $block['attrs']['gpDynamicLinkType'] ) ? $block['attrs']['gpDynamicLinkType'] : ''; - - if ( ! empty( $link_type ) && 'term-archives' !== $link_type ) { - $source = ! empty( $block['attrs']['gpDynamicSource'] ) ? $block['attrs']['gpDynamicSource'] : 'current-post'; - $id = $this->get_source_id( $source, $block['attrs'] ); - - if ( ! $id ) { - return ''; - } - - if ( $link_type ) { - $block_content = $this->add_dynamic_link( $block_content, $link_type, $source, $block ); - } - } - - if ( ! empty( $block['attrs']['gpDynamicTextType'] ) && ! empty( $block['attrs']['gpDynamicTextReplace'] ) ) { - $text_to_replace = $block['attrs']['gpDynamicTextReplace']; - $text_type = $block['attrs']['gpDynamicTextType']; - $link_type = ! empty( $block['attrs']['gpDynamicLinkType'] ) ? $block['attrs']['gpDynamicLinkType'] : ''; - $source = ! empty( $block['attrs']['gpDynamicSource'] ) ? $block['attrs']['gpDynamicSource'] : 'current-post'; - $id = $this->get_source_id( $source, $block['attrs'] ); - - if ( ! $id ) { - return ''; - } - - if ( 'terms' === $text_type ) { - if ( ! empty( $block['attrs']['gpDynamicTextTaxonomy'] ) ) { - $terms = get_the_terms( $id, $block['attrs']['gpDynamicTextTaxonomy'] ); - - if ( is_wp_error( $terms ) ) { - return ''; - } - - $term_buttons = array(); - - foreach ( (array) $terms as $term ) { - if ( ! isset( $term->name ) ) { - continue; - } - - $term_button = str_replace( $text_to_replace, $term->name, $block_content ); - - if ( isset( $term->slug ) ) { - $term_button = str_replace( 'dynamic-term-class', 'post-term-item term-' . $term->slug, $term_button ); - } - - if ( 'term-archives' === $link_type ) { - $term_link = get_term_link( $term, $block['attrs']['gpDynamicTextTaxonomy'] ); - - if ( ! is_wp_error( $term_link ) ) { - $term_url = sprintf( - 'href="%s"', - esc_url( $term_link ) - ); - - $term_button = str_replace( 'href="#"', $term_url, $term_button ); - } - } - - $term_buttons[] = $term_button; - } - - if ( empty( $term_buttons ) ) { - return ''; - } - - $block_content = implode( '', $term_buttons ); - } else { - return ''; - } - } - } - } - - if ( 'generateblocks/container' === $block['blockName'] ) { - if ( ! empty( $block['attrs']['gpRemoveContainerCondition'] ) ) { - $in_same_term = ! empty( $block['attrs']['gpAdjacentPostInSameTerm'] ) ? true : false; - $term_taxonomy = ! empty( $block['attrs']['gpAdjacentPostInSameTermTax'] ) ? $block['attrs']['gpAdjacentPostInSameTermTax'] : 'category'; - - if ( 'no-next-post' === $block['attrs']['gpRemoveContainerCondition'] ) { - $next_post = get_next_post( $in_same_term, '', $term_taxonomy ); - - if ( ! is_object( $next_post ) ) { - if ( ! empty( $block['attrs']['isGrid'] ) && ! empty( $block['attrs']['uniqueId'] ) ) { - return '
'; - } else { - return ''; - } - } - } - - if ( 'no-previous-post' === $block['attrs']['gpRemoveContainerCondition'] ) { - $previous_post = get_previous_post( $in_same_term, '', $term_taxonomy ); - - if ( ! is_object( $previous_post ) ) { - if ( ! empty( $block['attrs']['isGrid'] ) && ! empty( $block['attrs']['uniqueId'] ) ) { - return '
'; - } else { - return ''; - } - } - } - - if ( 'no-featured-image' === $block['attrs']['gpRemoveContainerCondition'] ) { - if ( ! has_post_thumbnail() ) { - return ''; - } - } - - if ( 'no-post-meta' === $block['attrs']['gpRemoveContainerCondition'] && ! empty( $block['attrs']['gpRemoveContainerConditionPostMeta'] ) ) { - $post_meta_check = get_post_meta( get_the_ID(), $block['attrs']['gpRemoveContainerConditionPostMeta'], true ); - - if ( ! $post_meta_check ) { - return ''; - } - } - } elseif ( ! empty( $block['attrs']['url'] ) && ! empty( $block['attrs']['gpDynamicLinkType'] ) ) { - $source = ! empty( $block['attrs']['gpDynamicSource'] ) ? $block['attrs']['gpDynamicSource'] : 'current-post'; - - $id = $this->get_source_id( $source, $block['attrs'] ); - - if ( ! $id ) { - return ''; - } - } - } - - return $block_content; - } - - /** - * Set the featured image as a GB background. - * - * @param string $url The current URL. - * @param array $settings The current settings. - */ - public function set_background_image_url( $url, $settings ) { - if ( ! empty( $settings['gpDynamicImageBg'] ) ) { - $custom_field = ''; - $source = ! empty( $settings['gpDynamicSource'] ) ? $settings['gpDynamicSource'] : 'current-post'; - $id = $this->get_source_id( $source, $settings ); - - if ( ! $id ) { - return ''; - } - - if ( 'post-meta' === $settings['gpDynamicImageBg'] ) { - $custom_field = get_post_meta( $id, $settings['gpDynamicImageCustomField'], true ); - } - - if ( 'term-meta' === $settings['gpDynamicImageBg'] ) { - $custom_field = get_term_meta( get_queried_object_id(), $settings['gpDynamicImageCustomField'], true ); - } - - if ( 'user-meta' === $settings['gpDynamicImageBg'] ) { - $author_id = $this->get_author_id( $source, $settings ); - $custom_field = $this->get_user_data( $author_id, $settings['gpDynamicImageCustomField'] ); - } - - if ( 'featured-image' === $settings['gpDynamicImageBg'] && has_post_thumbnail( $id ) ) { - $image_size = ! empty( $settings['bgImageSize'] ) ? $settings['bgImageSize'] : 'full'; - $url = get_the_post_thumbnail_url( $id, $image_size ); - } elseif ( ! empty( $custom_field ) ) { - if ( is_numeric( $custom_field ) ) { - $image_size = ! empty( $settings['bgImageSize'] ) ? $settings['bgImageSize'] : 'full'; - $url = wp_get_attachment_image_url( $custom_field, $image_size ); - } else { - $url = $custom_field; - } - } elseif ( empty( $settings['gpUseFallbackImageBg'] ) ) { - $url = ''; - } - } - - return $url; - } - - /** - * Set the attributes for our main Container wrapper. - * - * @param array $attributes The existing attributes. - * @param array $settings The settings for the block. - */ - public function set_container_attributes( $attributes, $settings ) { - if ( ! empty( $settings['bgImage'] ) && in_the_loop() ) { - if ( ! empty( $settings['gpDynamicImageBg'] ) ) { - $custom_field = ''; - $source = ! empty( $settings['gpDynamicSource'] ) ? $settings['gpDynamicSource'] : 'current-post'; - $id = $this->get_source_id( $source, $settings ); - - if ( ! $id ) { - return $attributes; - } - - if ( 'post-meta' === $settings['gpDynamicImageBg'] ) { - $custom_field = get_post_meta( $id, $settings['gpDynamicImageCustomField'], true ); - } - - if ( 'term-meta' === $settings['gpDynamicImageBg'] ) { - $custom_field = get_term_meta( get_queried_object_id(), $settings['gpDynamicImageCustomField'], true ); - } - - if ( 'user-meta' === $settings['gpDynamicImageBg'] ) { - $author_id = $this->get_author_id( $source, $settings ); - $custom_field = $this->get_user_data( $author_id, $settings['gpDynamicImageCustomField'] ); - } - - if ( 'featured-image' === $settings['gpDynamicImageBg'] && has_post_thumbnail( $id ) ) { - $image_size = ! empty( $settings['bgImageSize'] ) ? $settings['bgImageSize'] : 'full'; - $url = get_the_post_thumbnail_url( $id, $image_size ); - } elseif ( ! empty( $custom_field ) ) { - if ( is_numeric( $custom_field ) ) { - $image_size = ! empty( $settings['bgImageSize'] ) ? $settings['bgImageSize'] : 'full'; - $url = wp_get_attachment_image_url( $custom_field, $image_size ); - } else { - $url = $custom_field; - } - } elseif ( ! empty( $settings['gpUseFallbackImageBg'] ) ) { - if ( isset( $settings['bgImage']['id'] ) ) { - $image_size = ! empty( $settings['bgImageSize'] ) ? $settings['bgImageSize'] : 'full'; - $image_src = wp_get_attachment_image_src( $settings['bgImage']['id'], $image_size ); - - if ( is_array( $image_src ) ) { - $url = $image_src[0]; - } else { - $url = $settings['bgImage']['image']['url']; - } - } else { - $url = $settings['bgImage']['image']['url']; - } - } - - if ( ! empty( $url ) ) { - $attributes['style'] = '--background-url:url(' . esc_url( $url ) . ')'; - $attributes['class'] .= ' gb-has-dynamic-bg'; - } else { - $attributes['class'] .= ' gb-no-dynamic-bg'; - } - } - } - - if ( ! empty( $settings['gpInlinePostMeta'] ) ) { - $attributes['class'] .= ' inline-post-meta-area'; - } - - return $attributes; - } - - /** - * Set GenerateBlocks defaults. - * - * @param array $defaults The current defaults. - */ - public function set_defaults( $defaults ) { - $defaults['container']['gpInlinePostMeta'] = false; - $defaults['container']['gpInlinePostMetaJustify'] = ''; - $defaults['container']['gpInlinePostMetaJustifyTablet'] = ''; - $defaults['container']['gpInlinePostMetaJustifyMobile'] = ''; - $defaults['container']['gpDynamicImageBg'] = ''; - $defaults['container']['gpDynamicImageCustomField'] = ''; - $defaults['container']['gpDynamicLinkType'] = ''; - $defaults['container']['gpDynamicSource'] = 'current-post'; - $defaults['container']['gpDynamicSourceInSameTerm'] = false; - $defaults['headline']['gpDynamicTextTaxonomy'] = ''; - $defaults['headline']['gpDynamicTextTaxonomySeparator'] = ', '; - - return $defaults; - } - - /** - * Generate our CSS for our options. - * - * @param string $name Name of the block. - * @param array $settings Our available settings. - * @param object $css Current desktop CSS object. - * @param object $desktop_css Current desktop-only CSS object. - * @param object $tablet_css Current tablet CSS object. - * @param object $tablet_only_css Current tablet-only CSS object. - * @param object $mobile_css Current mobile CSS object. - */ - public function generate_css( $name, $settings, $css, $desktop_css, $tablet_css, $tablet_only_css, $mobile_css ) { - if ( 'container' === $name ) { - if ( ! empty( $settings['bgImage'] ) ) { - if ( 'element' === $settings['bgOptions']['selector'] ) { - $css->set_selector( '.gb-container-' . $settings['uniqueId'] . '.gb-has-dynamic-bg' ); - } elseif ( 'pseudo-element' === $settings['bgOptions']['selector'] ) { - $css->set_selector( '.gb-container-' . $settings['uniqueId'] . '.gb-has-dynamic-bg:before' ); - } - - $css->add_property( 'background-image', 'var(--background-url)' ); - - if ( 'element' === $settings['bgOptions']['selector'] ) { - $css->set_selector( '.gb-container-' . $settings['uniqueId'] . '.gb-no-dynamic-bg' ); - } elseif ( 'pseudo-element' === $settings['bgOptions']['selector'] ) { - $css->set_selector( '.gb-container-' . $settings['uniqueId'] . '.gb-no-dynamic-bg:before' ); - } - - $css->add_property( 'background-image', 'none' ); - } - - if ( ! empty( $settings['gpInlinePostMeta'] ) ) { - $css->set_selector( '.gb-container-' . $settings['uniqueId'] . '.inline-post-meta-area > .gb-inside-container' ); - $css->add_property( 'display', 'flex' ); - $css->add_property( 'align-items', 'center' ); - $css->add_property( 'justify-content', $settings['gpInlinePostMetaJustify'] ); - - $tablet_css->set_selector( '.gb-container-' . $settings['uniqueId'] . '.inline-post-meta-area > .gb-inside-container' ); - $tablet_css->add_property( 'justify-content', $settings['gpInlinePostMetaJustifyTablet'] ); - - $mobile_css->set_selector( '.gb-container-' . $settings['uniqueId'] . '.inline-post-meta-area > .gb-inside-container' ); - $mobile_css->add_property( 'justify-content', $settings['gpInlinePostMetaJustifyMobile'] ); - } - } - } - - /** - * Set the attributes for our main Container wrapper. - * - * @param array $attributes The existing attributes. - * @param array $settings The settings for the block. - */ - public function set_dynamic_container_url( $attributes, $settings ) { - $link_type = ! empty( $settings['gpDynamicLinkType'] ) ? $settings['gpDynamicLinkType'] : ''; - - if ( - $link_type && - isset( $settings['url'] ) && - isset( $settings['linkType'] ) && - '' !== $settings['url'] && - ( 'wrapper' === $settings['linkType'] || 'hidden-link' === $settings['linkType'] ) - ) { - if ( ! empty( $link_type ) ) { - $source = ! empty( $settings['gpDynamicSource'] ) ? $settings['gpDynamicSource'] : 'current-post'; - $id = $this->get_source_id( $source, $settings ); - - if ( ! $id ) { - return $attributes; - } - - if ( 'post' === $link_type ) { - $attributes['href'] = esc_url( get_permalink( $id ) ); - } - - if ( 'post-meta' === $link_type ) { - if ( ! empty( $settings['gpDynamicLinkCustomField'] ) ) { - $custom_field = get_post_meta( $id, $settings['gpDynamicLinkCustomField'], true ); - - if ( $custom_field ) { - $attributes['href'] = esc_url( $custom_field ); - } - } - } - } - } - - return $attributes; - } - - /** - * Get our needed source ID. - * - * @param string $source The source attribute. - * @param array $attributes All block attributes. - */ - public function get_source_id( $source, $attributes = array() ) { - $id = get_the_ID(); - - if ( 'next-post' === $source ) { - $in_same_term = ! empty( $attributes['gpDynamicSourceInSameTerm'] ) ? true : false; - $term_taxonomy = ! empty( $attributes['gpDynamicSourceInSameTermTaxonomy'] ) ? $attributes['gpDynamicSourceInSameTermTaxonomy'] : 'category'; - $next_post = get_next_post( $in_same_term, '', $term_taxonomy ); - - if ( ! is_object( $next_post ) ) { - return false; - } - - $id = $next_post->ID; - } - - if ( 'previous-post' === $source ) { - $in_same_term = ! empty( $attributes['gpDynamicSourceInSameTerm'] ) ? true : false; - $term_taxonomy = ! empty( $attributes['gpDynamicSourceInSameTermTaxonomy'] ) ? $attributes['gpDynamicSourceInSameTermTaxonomy'] : 'category'; - $previous_post = get_previous_post( $in_same_term, '', $term_taxonomy ); - - if ( ! is_object( $previous_post ) ) { - return false; - } - - $id = $previous_post->ID; - } - - return apply_filters( 'generate_dynamic_element_source_id', $id, $source, $attributes ); - } - - /** - * Get our author ID. - * - * @param string $source The source attribute. - * @param array $attributes All block attributes. - */ - public function get_author_id( $source, $attributes ) { - global $post; - $post_info = $post; - - if ( 'next-post' === $source ) { - $in_same_term = ! empty( $attributes['gpDynamicSourceInSameTerm'] ) ? true : false; - $term_taxonomy = ! empty( $attributes['gpDynamicSourceInSameTermTaxonomy'] ) ? $attributes['gpDynamicSourceInSameTermTaxonomy'] : 'category'; - $next_post = get_next_post( $in_same_term, '', $term_taxonomy ); - - if ( ! is_object( $next_post ) ) { - return ''; - } - - $post_info = $next_post; - } - - if ( 'previous-post' === $source ) { - $in_same_term = ! empty( $attributes['gpDynamicSourceInSameTerm'] ) ? true : false; - $term_taxonomy = ! empty( $attributes['gpDynamicSourceInSameTermTaxonomy'] ) ? $attributes['gpDynamicSourceInSameTermTaxonomy'] : 'category'; - $previous_post = get_previous_post( $in_same_term, '', $term_taxonomy ); - - if ( ! is_object( $previous_post ) ) { - return ''; - } - - $post_info = $previous_post; - } - - if ( isset( $post_info->post_author ) ) { - return $post_info->post_author; - } - } - - /** - * Register our post meta. - */ - public function register_meta() { - register_meta( - 'post', - '_generate_block_element_editor_width', - array( - 'object_subtype' => 'gp_elements', - 'type' => 'string', - 'show_in_rest' => true, - 'auth_callback' => '__return_true', - 'single' => true, - 'sanitize_callback' => array( $this, 'sanitize_int' ), - ) - ); - - register_meta( - 'post', - '_generate_block_element_editor_width_unit', - array( - 'object_subtype' => 'gp_elements', - 'type' => 'string', - 'show_in_rest' => true, - 'auth_callback' => '__return_true', - 'single' => true, - 'sanitize_callback' => 'sanitize_text_field', - ) - ); - - register_meta( - 'post', - '_generate_block_type', - array( - 'object_subtype' => 'gp_elements', - 'type' => 'string', - 'show_in_rest' => true, - 'auth_callback' => '__return_true', - 'single' => true, - 'sanitize_callback' => 'sanitize_text_field', - ) - ); - - register_meta( - 'post', - '_generate_hook', - array( - 'object_subtype' => 'gp_elements', - 'type' => 'string', - 'show_in_rest' => true, - 'auth_callback' => '__return_true', - 'single' => true, - 'sanitize_callback' => 'sanitize_text_field', - ) - ); - - register_meta( - 'post', - '_generate_custom_hook', - array( - 'object_subtype' => 'gp_elements', - 'type' => 'string', - 'show_in_rest' => true, - 'auth_callback' => '__return_true', - 'single' => true, - 'sanitize_callback' => array( $this, 'sanitize_custom_hook' ), - ) - ); - - register_meta( - 'post', - '_generate_hook_priority', - array( - 'object_subtype' => 'gp_elements', - 'type' => 'string', - 'show_in_rest' => true, - 'auth_callback' => '__return_true', - 'single' => true, - 'sanitize_callback' => array( $this, 'sanitize_int' ), - ) - ); - - register_meta( - 'post', - '_generate_post_meta_location', - array( - 'object_subtype' => 'gp_elements', - 'type' => 'string', - 'show_in_rest' => true, - 'auth_callback' => '__return_true', - 'single' => true, - 'sanitize_callback' => array( $this, 'sanitize_text_field' ), - ) - ); - - register_meta( - 'post', - '_generate_post_loop_item_tagname', - array( - 'object_subtype' => 'gp_elements', - 'type' => 'string', - 'show_in_rest' => true, - 'auth_callback' => '__return_true', - 'single' => true, - 'sanitize_callback' => array( $this, 'sanitize_text_field' ), - ) - ); - - register_meta( - 'post', - '_generate_disable_primary_post_meta', - array( - 'object_subtype' => 'gp_elements', - 'type' => 'boolean', - 'show_in_rest' => true, - 'auth_callback' => '__return_true', - 'single' => true, - 'sanitize_callback' => array( $this, 'rest_sanitize_boolean' ), - ) - ); - - register_meta( - 'post', - '_generate_disable_secondary_post_meta', - array( - 'object_subtype' => 'gp_elements', - 'type' => 'boolean', - 'show_in_rest' => true, - 'auth_callback' => '__return_true', - 'single' => true, - 'sanitize_callback' => array( $this, 'rest_sanitize_boolean' ), - ) - ); - - register_meta( - 'post', - '_generate_disable_title', - array( - 'object_subtype' => 'gp_elements', - 'type' => 'boolean', - 'show_in_rest' => true, - 'auth_callback' => '__return_true', - 'single' => true, - 'sanitize_callback' => array( $this, 'rest_sanitize_boolean' ), - ) - ); - - register_meta( - 'post', - '_generate_disable_featured_image', - array( - 'object_subtype' => 'gp_elements', - 'type' => 'boolean', - 'show_in_rest' => true, - 'auth_callback' => '__return_true', - 'single' => true, - 'sanitize_callback' => array( $this, 'rest_sanitize_boolean' ), - ) - ); - - register_meta( - 'post', - '_generate_use_theme_post_container', - array( - 'object_subtype' => 'gp_elements', - 'type' => 'boolean', - 'show_in_rest' => true, - 'auth_callback' => '__return_true', - 'single' => true, - 'sanitize_callback' => array( $this, 'rest_sanitize_boolean' ), - ) - ); - - register_meta( - 'post', - '_generate_use_archive_navigation_container', - array( - 'object_subtype' => 'gp_elements', - 'type' => 'boolean', - 'show_in_rest' => true, - 'auth_callback' => '__return_true', - 'single' => true, - 'sanitize_callback' => array( $this, 'rest_sanitize_boolean' ), - ) - ); - - register_meta( - 'post', - '_generate_disable_post_navigation', - array( - 'object_subtype' => 'gp_elements', - 'type' => 'boolean', - 'show_in_rest' => true, - 'auth_callback' => '__return_true', - 'single' => true, - 'sanitize_callback' => array( $this, 'rest_sanitize_boolean' ), - ) - ); - - register_meta( - 'post', - '_generate_disable_archive_navigation', - array( - 'object_subtype' => 'gp_elements', - 'type' => 'boolean', - 'show_in_rest' => true, - 'auth_callback' => '__return_true', - 'single' => true, - 'sanitize_callback' => array( $this, 'rest_sanitize_boolean' ), - ) - ); - - register_meta( - 'post', - '_generate_post_loop_item_display', - array( - 'object_subtype' => 'gp_elements', - 'type' => 'string', - 'show_in_rest' => true, - 'auth_callback' => '__return_true', - 'single' => true, - 'sanitize_callback' => array( $this, 'sanitize_text_field' ), - ) - ); - - register_meta( - 'post', - '_generate_post_loop_item_display_tax', - array( - 'object_subtype' => 'gp_elements', - 'type' => 'string', - 'show_in_rest' => true, - 'auth_callback' => '__return_true', - 'single' => true, - 'sanitize_callback' => array( $this, 'sanitize_text_field' ), - ) - ); - - register_meta( - 'post', - '_generate_post_loop_item_display_term', - array( - 'object_subtype' => 'gp_elements', - 'type' => 'string', - 'show_in_rest' => true, - 'auth_callback' => '__return_true', - 'single' => true, - 'sanitize_callback' => array( $this, 'sanitize_text_field' ), - ) - ); - - register_meta( - 'post', - '_generate_post_loop_item_display_post_meta', - array( - 'object_subtype' => 'gp_elements', - 'type' => 'string', - 'show_in_rest' => true, - 'auth_callback' => '__return_true', - 'single' => true, - 'sanitize_callback' => array( $this, 'sanitize_text_field' ), - ) - ); - } - - /** - * Sanitize our custom hook field. - * - * @param string $value The value to sanitize. - */ - public function sanitize_custom_hook( $value ) { - $not_allowed = array( - 'muplugins_loaded', - 'registered_taxonomy', - 'plugins_loaded', - 'setup_theme', - 'after_setup_theme', - 'init', - 'widgets_init', - 'wp_loaded', - 'pre_get_posts', - 'wp', - 'template_redirect', - 'get_header', - 'wp_enqueue_scripts', - 'the_post', - 'dynamic_sidebar', - 'get_footer', - 'get_sidebar', - 'wp_print_footer_scripts', - 'shutdown', - ); - - if ( in_array( $value, $not_allowed ) ) { - return ''; - } - - return sanitize_key( $value ); - } - - /** - * Sanitize number values that can be empty. - * - * @param int $value The value to sanitize. - */ - public function sanitize_int( $value ) { - if ( ! is_numeric( $value ) ) { - return ''; - } - - return absint( $value ); - } - - /** - * Get our image size names and dimensions. - */ - public function get_image_sizes() { - global $_wp_additional_image_sizes; - - $default_image_sizes = get_intermediate_image_sizes(); - - foreach ( $default_image_sizes as $size ) { - $image_sizes[ $size ]['width'] = intval( get_option( "{$size}_size_w" ) ); - $image_sizes[ $size ]['height'] = intval( get_option( "{$size}_size_h" ) ); - $image_sizes[ $size ]['crop'] = get_option( "{$size}_crop" ) ? get_option( "{$size}_crop" ) : false; - } - - if ( isset( $_wp_additional_image_sizes ) && count( $_wp_additional_image_sizes ) ) { - $image_sizes = array_merge( $image_sizes, $_wp_additional_image_sizes ); - } - - return $image_sizes; - } - - /** - * Add front-end CSS. - */ - public function frontend_css() { - require_once GP_LIBRARY_DIRECTORY . 'class-make-css.php'; - $css = new GeneratePress_Pro_CSS(); - - $css->set_selector( '.dynamic-author-image-rounded' ); - $css->add_property( 'border-radius', '100%' ); - - $css->set_selector( '.dynamic-featured-image, .dynamic-author-image' ); - $css->add_property( 'vertical-align', 'middle' ); - - $css->set_selector( '.one-container.blog .dynamic-content-template:not(:last-child), .one-container.archive .dynamic-content-template:not(:last-child)' ); - $css->add_property( 'padding-bottom', '0px' ); - - $css->set_selector( '.dynamic-entry-excerpt > p:last-child' ); - $css->add_property( 'margin-bottom', '0px' ); - - wp_add_inline_style( 'generate-style', $css->css_output() ); - } -} - -GeneratePress_Block_Elements::get_instance(); diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/elements/class-block.php b/wp-content/upgrade-temp-backup/plugins/gp-premium/elements/class-block.php deleted file mode 100644 index 051d8e43..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/elements/class-block.php +++ /dev/null @@ -1,469 +0,0 @@ -post_id = $post_id; - $this->type = get_post_meta( $post_id, '_generate_block_type', true ); - $has_content_template_condition = get_post_meta( $post_id, '_generate_post_loop_item_display', true ); - - // Take over the $post_id temporarily if this is a child block. - // This allows us to inherit the parent block Display Rules. - if ( 'content-template' === $this->type && $has_content_template_condition ) { - $parent_block = wp_get_post_parent_id( $post_id ); - - if ( ! empty( $parent_block ) ) { - $this->has_parent = true; - $post_id = $parent_block; - } - } - - $display_conditions = get_post_meta( $post_id, '_generate_element_display_conditions', true ) ? get_post_meta( $post_id, '_generate_element_display_conditions', true ) : array(); - $exclude_conditions = get_post_meta( $post_id, '_generate_element_exclude_conditions', true ) ? get_post_meta( $post_id, '_generate_element_exclude_conditions', true ) : array(); - $user_conditions = get_post_meta( $post_id, '_generate_element_user_conditions', true ) ? get_post_meta( $post_id, '_generate_element_user_conditions', true ) : array(); - - $display = apply_filters( - 'generate_block_element_display', - GeneratePress_Conditions::show_data( - $display_conditions, - $exclude_conditions, - $user_conditions - ), - $post_id - ); - - /** - * Simplify filter name. - * - * @since 2.0.0 - */ - $display = apply_filters( - 'generate_element_display', - $display, - $post_id - ); - - // Restore our actual post ID if it's been changed. - if ( 'content-template' === $this->type && $has_content_template_condition ) { - $post_id = $this->post_id; - } - - if ( $display ) { - global $generate_elements; - - $generate_elements[ $post_id ] = array( - 'is_block_element' => true, - 'type' => $this->type, - 'id' => $post_id, - ); - - $hook = get_post_meta( $post_id, '_generate_hook', true ); - $custom_hook = get_post_meta( $post_id, '_generate_custom_hook', true ); - $priority = get_post_meta( $post_id, '_generate_hook_priority', true ); - - if ( '' === $priority ) { - $priority = 10; - } - - switch ( $this->type ) { - case 'site-header': - $hook = 'generate_header'; - break; - - case 'site-footer': - $hook = 'generate_footer'; - break; - - case 'right-sidebar': - $hook = 'generate_before_right_sidebar_content'; - break; - - case 'left-sidebar': - $hook = 'generate_before_left_sidebar_content'; - break; - - case 'content-template': - $hook = 'generate_before_do_template_part'; - break; - - case 'loop-template': - $hook = 'generate_before_main_content'; - break; - - case 'search-modal': - $hook = 'generate_inside_search_modal'; - break; - } - - if ( 'custom' === $hook && $custom_hook ) { - $hook = $custom_hook; - } - - if ( 'post-meta-template' === $this->type ) { - $post_meta_location = get_post_meta( $post_id, '_generate_post_meta_location', true ); - - if ( '' === $post_meta_location || 'after-post-title' === $post_meta_location ) { - $hook = 'generate_after_entry_title'; - - if ( is_page() ) { - $hook = 'generate_after_page_title'; - } - } elseif ( 'before-post-title' === $post_meta_location ) { - $hook = 'generate_before_entry_title'; - - if ( is_page() ) { - $hook = 'generate_before_page_title'; - } - } elseif ( 'after-content' === $post_meta_location ) { - $hook = 'generate_after_content'; - } - } - - if ( ! $hook ) { - return; - } - - if ( 'generate_header' === $hook ) { - remove_action( 'generate_header', 'generate_construct_header' ); - } - - if ( 'generate_footer' === $hook ) { - remove_action( 'generate_footer', 'generate_construct_footer' ); - } - - if ( 'content-template' === $this->type && ! $this->has_parent ) { - add_filter( 'generate_do_template_part', array( $this, 'do_template_part' ) ); - } - - if ( 'loop-template' === $this->type ) { - add_filter( 'generate_has_default_loop', '__return_false' ); - add_filter( 'generate_blog_columns', '__return_false' ); - add_filter( 'option_generate_blog_settings', array( $this, 'filter_blog_settings' ) ); - add_filter( 'post_class', array( $this, 'post_classes' ) ); - } - - if ( 'search-modal' === $this->type ) { - remove_action( 'generate_inside_search_modal', 'generate_do_search_fields' ); - } - - add_action( 'wp', array( $this, 'remove_elements' ), 100 ); - add_action( esc_attr( $hook ), array( $this, 'build_hook' ), absint( $priority ) ); - add_filter( 'generateblocks_do_content', array( $this, 'do_block_content' ) ); - } - } - - /** - * Disable our post loop items if needed. - * - * @param boolean $do Whether to display the default post loop item or not. - */ - public function do_template_part( $do ) { - if ( GeneratePress_Elements_Helper::should_render_content_template( $this->post_id ) ) { - return false; - } - - return $do; - } - - /** - * Tell GenerateBlocks about our block element content so it can build CSS. - * - * @since 1.11.0 - * @param string $content The existing content. - */ - public function do_block_content( $content ) { - if ( has_blocks( $this->post_id ) ) { - $block_element = get_post( $this->post_id ); - - if ( ! $block_element || 'gp_elements' !== $block_element->post_type ) { - return $content; - } - - if ( 'publish' !== $block_element->post_status || ! empty( $block_element->post_password ) ) { - return $content; - } - - $content .= $block_element->post_content; - } - - return $content; - } - - /** - * Remove existing sidebar widgets. - * - * @since 1.11.0 - * @param array $widgets The existing widgets. - */ - public function remove_sidebar_widgets( $widgets ) { - if ( 'right-sidebar' === $this->type ) { - unset( $widgets['sidebar-1'] ); - } - - if ( 'left-sidebar' === $this->type ) { - unset( $widgets['sidebar-2'] ); - } - - return $widgets; - } - - /** - * Filter some of our blog settings. - * - * @param array $settings Existing blog settings. - */ - public function filter_blog_settings( $settings ) { - if ( 'loop-template' === $this->type ) { - $settings['infinite_scroll'] = false; - $settings['read_more_button'] = false; - } - - return $settings; - } - - /** - * Add class to our loop template item posts. - * - * @param array $classes Post classes. - */ - public function post_classes( $classes ) { - if ( 'loop-template' === $this->type && is_main_query() ) { - $classes[] = 'is-loop-template-item'; - } - - return $classes; - } - - /** - * Remove existing elements. - * - * @since 2.0.0 - */ - public function remove_elements() { - if ( 'right-sidebar' === $this->type || 'left-sidebar' === $this->type ) { - add_filter( 'sidebars_widgets', array( $this, 'remove_sidebar_widgets' ) ); - add_filter( 'generate_show_default_sidebar_widgets', '__return_false' ); - } - - if ( 'page-hero' === $this->type ) { - $disable_title = get_post_meta( $this->post_id, '_generate_disable_title', true ); - $disable_featured_image = get_post_meta( $this->post_id, '_generate_disable_featured_image', true ); - $disable_primary_post_meta = get_post_meta( $this->post_id, '_generate_disable_primary_post_meta', true ); - - if ( $disable_title ) { - if ( is_singular() ) { - add_filter( 'generate_show_title', '__return_false' ); - } - - remove_action( 'generate_archive_title', 'generate_archive_title' ); - remove_filter( 'get_the_archive_title', 'generate_filter_the_archive_title' ); - - // WooCommerce removal. - if ( class_exists( 'WooCommerce' ) ) { - remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_title', 5 ); - add_filter( 'woocommerce_show_page_title', '__return_false' ); - remove_action( 'woocommerce_archive_description', 'woocommerce_taxonomy_archive_description' ); - remove_action( 'woocommerce_archive_description', 'woocommerce_product_archive_description' ); - } - } - - if ( $disable_primary_post_meta ) { - remove_action( 'generate_after_entry_title', 'generate_post_meta' ); - } - - if ( $disable_featured_image && is_singular() ) { - remove_action( 'generate_after_entry_header', 'generate_blog_single_featured_image' ); - remove_action( 'generate_before_content', 'generate_blog_single_featured_image' ); - remove_action( 'generate_after_header', 'generate_blog_single_featured_image' ); - remove_action( 'generate_before_content', 'generate_featured_page_header_inside_single' ); - remove_action( 'generate_after_header', 'generate_featured_page_header' ); - } - } - - if ( 'post-meta-template' === $this->type ) { - $post_meta_location = get_post_meta( $this->post_id, '_generate_post_meta_location', true ); - $disable_primary_post_meta = get_post_meta( $this->post_id, '_generate_disable_primary_post_meta', true ); - $disable_secondary_post_meta = get_post_meta( $this->post_id, '_generate_disable_secondary_post_meta', true ); - - if ( '' === $post_meta_location || 'after-post-title' === $post_meta_location || 'custom' === $post_meta_location ) { - if ( $disable_primary_post_meta ) { - remove_action( 'generate_after_entry_title', 'generate_post_meta' ); - } - } elseif ( 'before-post-title' === $post_meta_location || 'custom' === $post_meta_location ) { - if ( $disable_primary_post_meta ) { - remove_action( 'generate_after_entry_title', 'generate_post_meta' ); - } - } elseif ( 'after-content' === $post_meta_location || 'custom' === $post_meta_location ) { - if ( $disable_secondary_post_meta ) { - remove_action( 'generate_after_entry_content', 'generate_footer_meta' ); - } - } - } - - if ( 'post-navigation-template' === $this->type ) { - $disable_post_navigation = get_post_meta( $this->post_id, '_generate_disable_post_navigation', true ); - - if ( $disable_post_navigation ) { - add_filter( 'generate_footer_entry_meta_items', array( $this, 'disable_post_navigation' ) ); - } - } - - if ( 'archive-navigation-template' === $this->type ) { - $disable_archive_navigation = get_post_meta( $this->post_id, '_generate_disable_archive_navigation', true ); - - if ( $disable_archive_navigation ) { - remove_action( 'generate_after_loop', 'generate_do_post_navigation' ); - } - } - } - - /** - * Disable post navigation. - * - * @param array $items The post meta items. - */ - public function disable_post_navigation( $items ) { - return array_diff( $items, array( 'post-navigation' ) ); - } - - /** - * Builds the HTML structure for Page Headers. - * - * @since 1.11.0 - */ - public function build_hook() { - $post_id = $this->post_id; - - if ( 'content-template' === $this->type ) { - // Check for child templates if this isn't already one. - if ( ! $this->has_parent ) { - $children = get_posts( - array( - 'post_type' => 'gp_elements', - 'post_parent' => $post_id, - 'order' => 'ASC', - 'orderby' => 'menu_order', - 'no_found_rows' => true, - 'post_status' => 'publish', - 'numberposts' => 20, - 'fields' => 'ids', - ) - ); - - if ( ! empty( $children ) ) { - // Loop through any child templates and overwrite $post_id if applicable. - foreach ( (array) $children as $child_id ) { - if ( GeneratePress_Elements_Helper::should_render_content_template( $child_id ) ) { - $post_id = $child_id; - break; - } - } - } else { - // No children, check if parent should render. - if ( ! GeneratePress_Elements_Helper::should_render_content_template( $post_id ) ) { - return; - } - } - } else { - // No children, check if template should render. - if ( ! GeneratePress_Elements_Helper::should_render_content_template( $post_id ) ) { - return; - } - } - - // Don't display child elements - they will replace the parent element if applicable. - if ( $this->has_parent ) { - return; - } - - $tag_name_value = get_post_meta( $post_id, '_generate_post_loop_item_tagname', true ); - $use_theme_container = get_post_meta( $post_id, '_generate_use_theme_post_container', true ); - - if ( $tag_name_value ) { - $tag_name = $tag_name_value; - } else { - $tag_name = 'article'; - } - - printf( - '<%s id="%s" class="%s">', - esc_attr( $tag_name ), - 'post-' . get_the_ID(), - implode( ' ', get_post_class( 'dynamic-content-template' ) ) // phpcs:ignore -- No escaping needed. - ); - - if ( $use_theme_container ) { - echo '
'; - } - } - - if ( 'archive-navigation-template' === $this->type || 'post-navigation-template' === $this->type ) { - $use_theme_pagination_container = get_post_meta( $post_id, '_generate_use_archive_navigation_container', true ); - - if ( $use_theme_pagination_container ) { - echo '
'; - } - } - - echo GeneratePress_Elements_Helper::build_content( $post_id ); // phpcs:ignore -- No escaping needed. - - if ( 'content-template' === $this->type ) { - if ( $use_theme_container ) { - echo '
'; - } - - echo ''; - } - - if ( 'archive-navigation-template' === $this->type || 'post-navigation-template' === $this->type ) { - $use_theme_pagination_container = get_post_meta( $post_id, '_generate_use_archive_navigation_container', true ); - - if ( $use_theme_pagination_container ) { - echo '
'; - } - } - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/elements/class-conditions.php b/wp-content/upgrade-temp-backup/plugins/gp-premium/elements/class-conditions.php deleted file mode 100644 index 759d1f81..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/elements/class-conditions.php +++ /dev/null @@ -1,447 +0,0 @@ - array( - 'label' => esc_attr__( 'General', 'gp-premium' ), - 'locations' => array( - 'general:site' => esc_attr__( 'Entire Site', 'gp-premium' ), - 'general:front_page' => esc_attr__( 'Front Page', 'gp-premium' ), - 'general:blog' => esc_attr__( 'Blog', 'gp-premium' ), - 'general:singular' => esc_attr__( 'All Singular', 'gp-premium' ), - 'general:archive' => esc_attr__( 'All Archives', 'gp-premium' ), - 'general:author' => esc_attr__( 'Author Archives', 'gp-premium' ), - 'general:date' => esc_attr__( 'Date Archives', 'gp-premium' ), - 'general:search' => esc_attr__( 'Search Results', 'gp-premium' ), - 'general:no_results' => esc_attr__( 'No Search Results', 'gp-premium' ), - 'general:404' => esc_attr__( '404 Template', 'gp-premium' ), - 'general:is_paged' => esc_attr__( 'Paginated Results', 'gp-premium' ), - ), - ), - ); - - // Add the post types. - $post_types = get_post_types( - array( - 'public' => true, - ), - 'objects' - ); - - foreach ( $post_types as $post_type_slug => $post_type ) { - - if ( in_array( $post_type_slug, array( 'fl-theme-layout' ) ) ) { - continue; - } - - $post_type_object = get_post_type_object( $post_type_slug ); - $counts = wp_count_posts( $post_type_slug ); - $count = $counts->publish + $counts->future + $counts->draft + $counts->pending + $counts->private; - - // Add the post type. - $types[ $post_type_slug ] = array( - 'label' => esc_html( $post_type->labels->name ), - 'locations' => array( - 'post:' . $post_type_slug => esc_html( $post_type->labels->singular_name ), - ), - ); - - // Add the post type archive. - // We add this regardless of `has_archive` as we deal with that after taxonomies are added. - $types[ $post_type_slug . '_archive' ] = array( - /* translators: post type name */ - 'label' => sprintf( esc_html_x( '%s Archives', '%s is a singular post type name', 'gp-premium' ), $post_type->labels->singular_name ), - 'locations' => array( - /* translators: post type name */ - 'archive:' . $post_type_slug => sprintf( esc_html_x( '%s Archive', '%s is a singular post type name', 'gp-premium' ), $post_type->labels->singular_name ), - ), - ); - - // Add the taxonomies for the post type. - $taxonomies = get_object_taxonomies( $post_type_slug, 'objects' ); - - foreach ( $taxonomies as $taxonomy_slug => $taxonomy ) { - - $public = $taxonomy->public && $taxonomy->show_ui; - - if ( 'post_format' === $taxonomy_slug ) { - continue; - } elseif ( ! apply_filters( 'generate_elements_show_taxonomy', $public, $taxonomy ) ) { - continue; - } - - $label = str_replace( - array( - $post_type->labels->name, - $post_type->labels->singular_name, - ), - '', - $taxonomy->labels->singular_name - ); - - if ( isset( $types[ $post_type_slug . '_archive' ]['locations'] ) ) { - /* translators: '%1$s is post type label. %2$s is taxonomy label. */ - $types[ $post_type_slug . '_archive' ]['locations'][ 'taxonomy:' . $taxonomy_slug ] = sprintf( esc_html_x( '%1$s %2$s Archive', '%1$s is post type label. %2$s is taxonomy label.', 'gp-premium' ), $post_type->labels->singular_name, $label ); - } - - if ( isset( $types[ $post_type_slug ]['locations'] ) ) { - $types[ $post_type_slug ]['locations'][ $post_type_slug . ':taxonomy:' . $taxonomy_slug ] = esc_html( $post_type->labels->singular_name . ' ' . $label ); - } - } - - // Remove the archives location if `has_archive` is set to false. - if ( 'post' !== $post_type_slug && empty( $post_type_object->has_archive ) ) { - unset( $types[ $post_type_slug . '_archive' ]['locations'][ 'archive:' . $post_type_slug ] ); - } - - // Remove the entire item if no locations exist. - if ( 0 === count( (array) $types[ $post_type_slug . '_archive' ]['locations'] ) ) { - unset( $types[ $post_type_slug . '_archive' ] ); - } - } - - return $types; - } - - /** - * Output our available user conditions. - * - * @since 1.7 - * - * @return array - */ - public static function get_user_conditions() { - $rules = array( - 'general' => array( - 'label' => esc_attr__( 'General', 'gp-premium' ), - 'rules' => array( - 'general:all' => esc_attr__( 'All Users', 'gp-premium' ), - 'general:logged_in' => esc_attr__( 'Logged In', 'gp-premium' ), - 'general:logged_out' => esc_attr__( 'Logged Out', 'gp-premium' ), - ), - ), - 'role' => array( - 'label' => esc_attr__( 'Roles', 'gp-premium' ), - 'rules' => array(), - ), - ); - - $roles = get_editable_roles(); - - foreach ( $roles as $slug => $data ) { - $rules['role']['rules'][ $slug ] = $data['name']; - } - - return $rules; - } - - /** - * Get our current location. - * - * @since 1.7 - * - * @return array - */ - public static function get_current_location() { - global $wp_query; - global $post; - - $location = null; - $object = null; - $queried_object = get_queried_object(); - - // Get the location string. - if ( is_front_page() ) { - $location = 'general:front_page'; - } elseif ( is_home() ) { - $location = 'general:blog'; - } elseif ( is_author() ) { - $location = 'general:author'; - } elseif ( is_date() ) { - $location = 'general:date'; - } elseif ( is_search() ) { - $location = 'general:search'; - - global $wp_query; - - if ( 0 === $wp_query->found_posts ) { - $location = 'general:no_results'; - } - } elseif ( is_404() ) { - $location = 'general:404'; - } elseif ( is_category() ) { - - $location = 'taxonomy:category'; - - if ( is_object( $queried_object ) ) { - $object = $queried_object->term_id; - } - } elseif ( is_tag() ) { - - $location = 'taxonomy:post_tag'; - - if ( is_object( $queried_object ) ) { - $object = $queried_object->term_id; - } - } elseif ( is_tax() ) { - - $location = 'taxonomy:' . get_query_var( 'taxonomy' ); - - if ( is_object( $queried_object ) ) { - $location = 'taxonomy:' . $queried_object->taxonomy; - $object = $queried_object->term_id; - } - } elseif ( is_post_type_archive() ) { - $post_type = $wp_query->get( 'post_type' ); - - if ( is_array( $post_type ) ) { - $location = 'archive:' . $post_type[0]; - } else { - $location = 'archive:' . $post_type; - } - } elseif ( is_singular() ) { - - if ( is_object( $post ) ) { - $location = 'post:' . $post->post_type; - } - - if ( is_object( $queried_object ) ) { - $object = $queried_object->ID; - } - } - - if ( is_admin() && function_exists( 'get_current_screen' ) ) { - $current_screen = get_current_screen(); - - if ( isset( $current_screen->is_block_editor ) && $current_screen->is_block_editor ) { - $post_id = false; - - if ( isset( $_GET['post'] ) ) { // phpcs:ignore -- Just checking if it's set. - $post_id = absint( $_GET['post'] ); // phpcs:ignore -- No data processing going on. - } - - if ( $post_id ) { - // Get the location string. - $front_page_id = get_option( 'page_on_front' ); - $blog_id = get_option( 'page_for_posts' ); - - if ( (int) $post_id === (int) $front_page_id ) { - $location = 'general:front_page'; - } elseif ( (int) $post_id === (int) $blog_id ) { - $location = 'general:blog'; - } else { - if ( isset( $current_screen->post_type ) ) { - $location = 'post:' . $current_screen->post_type; - } - - $object = $post_id; - } - } elseif ( isset( $_GET['post_type'] ) ) { // phpcs:ignore -- Just checking if it's set. - $location = 'post:' . esc_attr( $_GET['post_type'] ); // phpcs:ignore -- No data processing going on. - } - } - } - - return array( - 'rule' => $location, - 'object' => $object, - ); - } - - /** - * Get info on the current user. - * - * @since 1.7 - * - * @return array - */ - public static function get_current_user() { - $status = array(); - if ( is_user_logged_in() ) { - $status[] = 'general:logged_in'; - } else { - $status[] = 'general:logged_out'; - } - - $user = wp_get_current_user(); - - foreach ( (array) $user->roles as $role ) { - $status[] = $role; - } - - return $status; - } - - /** - * Figure out if we should display the element or not. - * - * @since 1.7 - * - * @param array $conditionals The conditions. - * @param array $exclude The exclusions. - * @param array $roles The roles. - * @return bool - */ - public static function show_data( $conditionals, $exclude, $roles ) { - $current_location = self::get_current_location(); - $show = false; - - // Show depending on location conditionals. - if ( ! $show ) { - foreach ( (array) $conditionals as $conditional ) { - if ( in_array( 'general:site', $conditional ) ) { - $show = true; - } elseif ( is_singular() && in_array( 'general:singular', $conditional ) ) { - $show = true; - } elseif ( is_archive() && in_array( 'general:archive', $conditional ) ) { - $show = true; - } elseif ( ! empty( $current_location['rule'] ) && in_array( $current_location['rule'], $conditional ) ) { - if ( ! isset( $conditional['object'] ) || empty( $conditional['object'] ) ) { - $show = true; - } else { - if ( in_array( $current_location['object'], $conditional ) ) { - $show = true; - } - } - } elseif ( is_singular() && strstr( $conditional['rule'], ':taxonomy:' ) ) { - $tax = substr( $conditional['rule'], strrpos( $conditional['rule'], ':' ) + 1 ); - - if ( $tax && isset( $conditional['object'] ) && has_term( $conditional['object'], $tax ) ) { - $show = true; - } - } elseif ( is_front_page() && is_home() && ( in_array( 'general:blog', $conditional ) || in_array( 'general:front_page', $conditional ) ) ) { - // If the home page is the blog, both of general:blog and general:front_page apply. - $show = true; - } elseif ( in_array( 'general:is_paged', $conditional ) && is_paged() ) { - $show = true; - } - } - } - - // Exclude based on exclusion conditionals. - if ( $show ) { - foreach ( (array) $exclude as $conditional ) { - if ( is_singular() && in_array( 'general:singular', $conditional ) ) { - $show = false; - } elseif ( is_archive() && in_array( 'general:archive', $conditional ) ) { - $show = false; - } elseif ( ! empty( $current_location['rule'] ) && in_array( $current_location['rule'], $conditional ) ) { - if ( ! isset( $conditional['object'] ) || empty( $conditional['object'] ) ) { - $show = false; - } else { - if ( in_array( $current_location['object'], $conditional ) ) { - $show = false; - } - } - } elseif ( is_singular() && strstr( $conditional['rule'], ':taxonomy:' ) ) { - $tax = substr( $conditional['rule'], strrpos( $conditional['rule'], ':' ) + 1 ); - - if ( $tax && isset( $conditional['object'] ) && has_term( $conditional['object'], $tax ) ) { - $show = false; - } - } elseif ( is_front_page() && is_home() && ( in_array( 'general:blog', $conditional ) || in_array( 'general:front_page', $conditional ) ) ) { - // If the home page is the blog, both of general:blog and general:front_page apply. - $show = false; - } elseif ( in_array( 'general:is_paged', $conditional ) && is_paged() ) { - $show = false; - } - } - } - - // Exclude user roles. - if ( $show && ! empty( $roles ) ) { - $user_info = self::get_current_user(); - - $check = array_intersect( $roles, $user_info ); - if ( ! count( $check ) > 0 && ! in_array( 'general:all', $roles ) ) { - $show = false; - } - } - - return $show; - } - - /** - * Returns the label for a saved location. - * - * @since 1.7 - * @param string $saved_location The location. - * @return string|bool - */ - public static function get_saved_label( $saved_location ) { - $locations = self::get_conditions(); - - $rule = $saved_location['rule']; - $object_id = $saved_location['object']; - $object_type = ''; - $label = false; - - foreach ( $locations as $data ) { - if ( isset( $data['locations'][ $rule ] ) && ! $label ) { - $label = $data['locations'][ $rule ]; - - $object_types = explode( ':', $rule ); - - if ( in_array( 'taxonomy', $object_types ) && $object_id ) { - $term = get_term( $object_id ); - - if ( ! is_object( $term ) || is_wp_error( $term ) ) { - return false; - } - - $label .= ': ' . $term->name; - } elseif ( ( in_array( 'post', $object_types ) || in_array( 'page', $object_types ) ) && $object_id ) { - $post = get_post( $object_id ); - - if ( ! is_object( $post ) ) { - return false; - } - - $label .= ': ' . $post->post_title; - } - } - } - - return $label; - } -} - -GeneratePress_Conditions::get_instance(); diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/elements/class-elements-helper.php b/wp-content/upgrade-temp-backup/plugins/gp-premium/elements/class-elements-helper.php deleted file mode 100644 index c4ad532b..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/elements/class-elements-helper.php +++ /dev/null @@ -1,527 +0,0 @@ -post_type ) { - return ''; - } - - if ( 'publish' !== $block_element->post_status || ! empty( $block_element->post_password ) ) { - return ''; - } - - $block_type = get_post_meta( $id, '_generate_block_type', true ); - - if ( 'site-footer' === $block_type ) { - $block_element->post_content = str_replace( '{{current_year}}', date( 'Y' ), $block_element->post_content ); // phpcs:ignore -- Prefer date(). - } - - // Handle embeds for block elements. - global $wp_embed; - - if ( is_object( $wp_embed ) && method_exists( $wp_embed, 'autoembed' ) ) { - $block_element->post_content = $wp_embed->autoembed( $block_element->post_content ); - } - - return apply_filters( 'generate_do_block_element_content', do_blocks( $block_element->post_content ) ); - } - - /** - * Get our Element type label. - * - * @since 2.0.0 - * @param string $type The type value. - */ - public static function get_element_type_label( $type ) { - switch ( $type ) { - case 'block': - $label = __( 'Block', 'gp-premium' ); - break; - - case 'header': - $label = __( 'Header', 'gp-premium' ); - break; - - case 'hook': - $label = __( 'Hook', 'gp-premium' ); - break; - - case 'layout': - $label = __( 'Layout', 'gp-premium' ); - break; - - case 'site-header': - $label = __( 'Site Header', 'gp-premium' ); - break; - - case 'page-hero': - $label = __( 'Page Hero', 'gp-premium' ); - break; - - case 'content-template': - $label = __( 'Content Template', 'gp-premium' ); - break; - - case 'loop-template': - $label = __( 'Loop Template', 'gp-premium' ); - break; - - case 'post-meta-template': - $label = __( 'Post Meta Template', 'gp-premium' ); - break; - - case 'post-navigation-template': - $label = __( 'Post Navigation', 'gp-premium' ); - break; - - case 'archive-navigation-template': - $label = __( 'Archive Navigation', 'gp-premium' ); - break; - - case 'right-sidebar': - $label = __( 'Right Sidebar', 'gp-premium' ); - break; - - case 'left-sidebar': - $label = __( 'Left Sidebar', 'gp-premium' ); - break; - - case 'site-footer': - $label = __( 'Site Footer', 'gp-premium' ); - break; - - default: - $label = esc_html( str_replace( '-', ' ', ucfirst( $type ) ) ); - break; - } - - return $label; - } - - /** - * Check for content template conditions. - * - * @since 2.0.0 - * @param int $post_id The post to check. - */ - public static function should_render_content_template( $post_id ) { - $loop_item_display = get_post_meta( $post_id, '_generate_post_loop_item_display', true ); - $display = true; - - if ( 'has-term' === $loop_item_display ) { - $tax = get_post_meta( $post_id, '_generate_post_loop_item_display_tax', true ); - - if ( $tax ) { - $term = get_post_meta( $post_id, '_generate_post_loop_item_display_term', true ); - - // Add support for multiple comma separated terms. - if ( ! empty( $term ) ) { - $term = str_replace( ' ', '', $term ); - $term = explode( ',', $term ); - } - - if ( has_term( $term, $tax ) ) { - $display = true; - } else { - $display = false; - } - } - } - - if ( 'has-post-meta' === $loop_item_display ) { - $post_meta_name = get_post_meta( $post_id, '_generate_post_loop_item_display_post_meta', true ); - - if ( $post_meta_name ) { - $post_meta = get_post_meta( get_the_ID(), $post_meta_name, true ); - - if ( $post_meta ) { - $display = true; - } else { - $display = false; - } - } - } - - if ( 'is-first-post' === $loop_item_display ) { - global $wp_query; - - if ( 0 === $wp_query->current_post && ! is_paged() ) { - $display = true; - } else { - $display = false; - } - } - - return apply_filters( 'generate_should_render_content_template', $display, $post_id ); - } - - /** - * Build our entire list of hooks to display. - * - * @since 1.7 - * - * @return array Our list of hooks. - */ - public static function get_available_hooks() { - $hooks = array( - 'scripts' => array( - 'group' => esc_attr__( 'Scripts/Styles', 'gp-premium' ), - 'hooks' => array( - 'wp_head', - 'wp_body_open', - 'wp_footer', - ), - ), - 'header' => array( - 'group' => esc_attr__( 'Header', 'gp-premium' ), - 'hooks' => array( - 'generate_before_header', - 'generate_after_header', - 'generate_before_header_content', - 'generate_after_header_content', - 'generate_before_logo', - 'generate_after_logo', - 'generate_header', - ), - ), - 'navigation' => array( - 'group' => esc_attr__( 'Navigation', 'gp-premium' ), - 'hooks' => array( - 'generate_inside_navigation', - 'generate_after_primary_menu', - 'generate_inside_secondary_navigation', - 'generate_inside_mobile_menu', - 'generate_inside_mobile_menu_bar', - 'generate_inside_mobile_header', - 'generate_inside_slideout_navigation', - 'generate_after_slideout_navigation', - ), - ), - 'content' => array( - 'group' => esc_attr__( 'Content', 'gp-premium' ), - 'hooks' => array( - 'generate_inside_site_container', - 'generate_inside_container', - 'generate_before_main_content', - 'generate_after_main_content', - 'generate_before_content', - 'generate_after_content', - 'generate_after_entry_content', - 'generate_after_primary_content_area', - 'generate_before_entry_title', - 'generate_after_entry_title', - 'generate_after_entry_header', - 'generate_before_archive_title', - 'generate_after_archive_title', - 'generate_after_archive_description', - ), - ), - 'comments' => array( - 'group' => esc_attr__( 'Comments', 'gp-premium' ), - 'hooks' => array( - 'generate_before_comments_container', - 'generate_before_comments', - 'generate_inside_comments', - 'generate_below_comments_title', - ), - ), - 'sidebars' => array( - 'group' => esc_attr__( 'Sidebars', 'gp-premium' ), - 'hooks' => array( - 'generate_before_right_sidebar_content', - 'generate_after_right_sidebar_content', - 'generate_before_left_sidebar_content', - 'generate_after_left_sidebar_content', - ), - ), - 'footer' => array( - 'group' => esc_attr__( 'Footer', 'gp-premium' ), - 'hooks' => array( - 'generate_before_footer', - 'generate_after_footer', - 'generate_after_footer_widgets', - 'generate_before_footer_content', - 'generate_after_footer_content', - 'generate_footer', - ), - ), - ); - - if ( class_exists( 'WooCommerce' ) ) { - $hooks['navigation']['hooks'][] = 'generate_mobile_cart_items'; - - $hooks['woocommerce-global'] = array( - 'group' => esc_attr__( 'WooCommerce - Global', 'gp-premium' ), - 'hooks' => array( - 'woocommerce_before_main_content', - 'woocommerce_after_main_content', - 'woocommerce_sidebar', - 'woocommerce_breadcrumb', - ), - ); - - $hooks['woocommerce-shop'] = array( - 'group' => esc_attr__( 'WooCommerce - Shop', 'gp-premium' ), - 'hooks' => array( - 'woocommerce_archive_description', - 'woocommerce_before_shop_loop', - 'woocommerce_after_shop_loop', - 'woocommerce_before_shop_loop_item_title', - 'woocommerce_after_shop_loop_item_title', - ), - ); - - $hooks['woocommerce-product'] = array( - 'group' => esc_attr__( 'WooCommerce - Product', 'gp-premium' ), - 'hooks' => array( - 'woocommerce_before_single_product', - 'woocommerce_before_single_product_summary', - 'woocommerce_after_single_product_summary', - 'woocommerce_single_product_summary', - 'woocommerce_share', - 'woocommerce_simple_add_to_cart', - 'woocommerce_before_add_to_cart_form', - 'woocommerce_after_add_to_cart_form', - 'woocommerce_before_add_to_cart_button', - 'woocommerce_after_add_to_cart_button', - 'woocommerce_before_add_to_cart_quantity', - 'woocommerce_after_add_to_cart_quantity', - 'woocommerce_product_meta_start', - 'woocommerce_product_meta_end', - 'woocommerce_after_single_product', - ), - ); - - $hooks['woocommerce-cart'] = array( - 'group' => esc_attr__( 'WooCommerce - Cart', 'gp-premium' ), - 'hooks' => array( - 'woocommerce_before_calculate_totals', - 'woocommerce_after_calculate_totals', - 'woocommerce_before_cart', - 'woocommerce_after_cart_table', - 'woocommerce_before_cart_table', - 'woocommerce_before_cart_contents', - 'woocommerce_cart_contents', - 'woocommerce_after_cart_contents', - 'woocommerce_cart_coupon', - 'woocommerce_cart_actions', - 'woocommerce_before_cart_totals', - 'woocommerce_cart_totals_before_order_total', - 'woocommerce_cart_totals_after_order_total', - 'woocommerce_proceed_to_checkout', - 'woocommerce_after_cart_totals', - 'woocommerce_after_cart', - ), - ); - - $hooks['woocommerce-checkout'] = array( - 'group' => esc_attr__( 'WooCommerce - Checkout', 'gp-premium' ), - 'hooks' => array( - 'woocommerce_before_checkout_form', - 'woocommerce_checkout_before_customer_details', - 'woocommerce_checkout_after_customer_details', - 'woocommerce_checkout_billing', - 'woocommerce_before_checkout_billing_form', - 'woocommerce_after_checkout_billing_form', - 'woocommerce_before_order_notes', - 'woocommerce_after_order_notes', - 'woocommerce_checkout_shipping', - 'woocommerce_checkout_before_order_review', - 'woocommerce_checkout_order_review', - 'woocommerce_review_order_before_cart_contents', - 'woocommerce_review_order_after_cart_contents', - 'woocommerce_review_order_before_order_total', - 'woocommerce_review_order_after_order_total', - 'woocommerce_review_order_before_payment', - 'woocommerce_review_order_before_submit', - 'woocommerce_review_order_after_submit', - 'woocommerce_review_order_after_payment', - 'woocommerce_checkout_after_order_review', - 'woocommerce_after_checkout_form', - ), - ); - - $hooks['woocommerce-account'] = array( - 'group' => esc_attr__( 'WooCommerce - Account', 'gp-premium' ), - 'hooks' => array( - 'woocommerce_before_account_navigation', - 'woocommerce_account_navigation', - 'woocommerce_after_account_navigation', - ), - ); - } - - if ( function_exists( 'generate_is_using_flexbox' ) && generate_is_using_flexbox() ) { - $hooks['navigation']['hooks'][] = 'generate_menu_bar_items'; - } - - if ( defined( 'GENERATE_VERSION' ) && version_compare( GENERATE_VERSION, '3.0.0-alpha.1', '>' ) ) { - $hooks['navigation']['hooks'][] = 'generate_before_navigation'; - $hooks['navigation']['hooks'][] = 'generate_after_navigation'; - $hooks['navigation']['hooks'][] = 'generate_after_mobile_menu_button'; - $hooks['navigation']['hooks'][] = 'generate_inside_mobile_menu_control_wrapper'; - - $hooks['content']['hooks'][] = 'generate_after_loop'; - $hooks['content']['hooks'][] = 'generate_before_do_template_part'; - $hooks['content']['hooks'][] = 'generate_after_do_template_part'; - } - - return apply_filters( 'generate_hooks_list', $hooks ); - } - - /** - * Expand the wp_kses_post sanitization function to allow iframe HTML tags - * - * @param array $tags The allowed tags, attributes, and/or attribute values. - * @param string $context Context to judge allowed tags by. Allowed values are 'post'. - * @return array - */ - public static function expand_allowed_html( $tags, $context ) { - if ( ! isset( $tags['iframe'] ) ) { - $tags['iframe'] = [ - 'src' => true, - 'height' => true, - 'width' => true, - 'frameborder' => true, - 'allowfullscreen' => true, - 'title' => true, - ]; - } - - $tags = apply_filters( 'generate_dynamic_content_allowed_html', $tags, $context ); - - return $tags; - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/elements/class-hero.php b/wp-content/upgrade-temp-backup/plugins/gp-premium/elements/class-hero.php deleted file mode 100644 index 631b1185..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/elements/class-hero.php +++ /dev/null @@ -1,1041 +0,0 @@ -conditional = get_post_meta( $post_id, '_generate_element_display_conditions', true ); - } - - if ( get_post_meta( $post_id, '_generate_element_exclude_conditions', true ) ) { - $this->exclude = get_post_meta( $post_id, '_generate_element_exclude_conditions', true ); - } - - if ( get_post_meta( $post_id, '_generate_element_user_conditions', true ) ) { - $this->users = get_post_meta( $post_id, '_generate_element_user_conditions', true ); - } - - $display = apply_filters( 'generate_header_element_display', GeneratePress_Conditions::show_data( $this->conditional, $this->exclude, $this->users ), $post_id ); - - /** - * Simplify filter name. - * - * @since 2.0.0 - */ - $display = apply_filters( - 'generate_element_display', - $display, - $post_id - ); - - if ( $display ) { - global $generate_elements; - - $generate_elements[ $post_id ] = array( - 'is_block_element' => false, - 'type' => 'header', - 'id' => $post_id, - ); - - $location = apply_filters( 'generate_page_hero_location', 'generate_after_header', $post_id ); - - add_action( $location, array( $this, 'build_hero' ), 9 ); - add_action( 'wp_enqueue_scripts', array( $this, 'enqueue' ), 100 ); - add_action( 'wp', array( $this, 'after_setup' ), 100 ); - - self::$instances++; - } - - } - - /** - * Add necessary scripts and styles. - * - * @since 1.7 - */ - public function enqueue() { - $options = self::get_options(); - - wp_add_inline_style( 'generate-style', self::build_css() ); - - if ( $options['parallax'] ) { - wp_enqueue_script( 'generate-hero-parallax', plugin_dir_url( __FILE__ ) . 'assets/js/parallax.min.js', array(), GP_PREMIUM_VERSION, true ); - wp_localize_script( - 'generate-hero-parallax', - 'hero', - array( - 'parallax' => apply_filters( 'generate_hero_parallax_speed', 2 ), - ) - ); - } - } - - /** - * Builds the HTML structure for Page Headers. - * - * @since 1.7 - */ - public function build_hero() { - $options = self::get_options(); - - if ( empty( $options['content'] ) ) { - return; - } - - $options['container_classes'] = implode( - ' ', - array( - 'page-hero', - 'contained' === $options['container'] ? 'grid-container grid-parent' : '', - $options['classes'], - ) - ); - - $options['inner_container_classes'] = implode( - ' ', - array( - 'inside-page-hero', - 'full-width' !== $options['inner_container'] ? 'grid-container grid-parent' : '', - ) - ); - - $options['content'] = self::template_tags( $options['content'] ); - $options['content'] = do_shortcode( $options['content'] ); - - // phpcs:ignore -- No escaping needed. - echo apply_filters( - 'generate_page_hero_output', - sprintf( - '
-
- %3$s -
-
', - trim( $options['container_classes'] ), - trim( $options['inner_container_classes'] ), - $options['content'] - ), - $options - ); - } - - /** - * Builds all of our custom CSS for Page Headers. - * - * @since 1.7 - * - * @return string Dynamic CSS. - */ - public static function build_css() { - $options = self::get_options(); - - // Initiate our CSS class. - require_once GP_LIBRARY_DIRECTORY . 'class-make-css.php'; - $css = new GeneratePress_Pro_CSS(); - - $image_url = false; - if ( $options['background_image'] && function_exists( 'get_the_post_thumbnail_url' ) ) { - if ( 'featured-image' === $options['background_image'] ) { - if ( is_singular() ) { - $image_url = get_the_post_thumbnail_url( get_the_ID(), 'full' ); - } - - if ( ! $image_url ) { - $image_url = get_the_post_thumbnail_url( self::$post_id, 'full' ); - } - } - - if ( 'custom-image' === $options['background_image'] ) { - $image_url = get_the_post_thumbnail_url( self::$post_id, 'full' ); - } - } - - $image_url = apply_filters( 'generate_page_hero_background_image_url', $image_url, $options ); - - // Figure out desktop units. - $options['padding_top_unit'] = $options['padding_top_unit'] ? $options['padding_top_unit'] : 'px'; - $options['padding_right_unit'] = $options['padding_right_unit'] ? $options['padding_right_unit'] : 'px'; - $options['padding_bottom_unit'] = $options['padding_bottom_unit'] ? $options['padding_bottom_unit'] : 'px'; - $options['padding_left_unit'] = $options['padding_left_unit'] ? $options['padding_left_unit'] : 'px'; - - // Figure out mobile units. - $options['padding_top_unit_mobile'] = $options['padding_top_unit_mobile'] ? $options['padding_top_unit_mobile'] : 'px'; - $options['padding_right_unit_mobile'] = $options['padding_right_unit_mobile'] ? $options['padding_right_unit_mobile'] : 'px'; - $options['padding_bottom_unit_mobile'] = $options['padding_bottom_unit_mobile'] ? $options['padding_bottom_unit_mobile'] : 'px'; - $options['padding_left_unit_mobile'] = $options['padding_left_unit_mobile'] ? $options['padding_left_unit_mobile'] : 'px'; - - $padding_inside = false; - $using_flexbox = false; - - if ( function_exists( 'generate_is_using_flexbox' ) && generate_is_using_flexbox() ) { - $using_flexbox = true; - - if ( function_exists( 'generate_get_option' ) && 'text' === generate_get_option( 'container_alignment' ) ) { - $padding_inside = true; - } - } - - $css->set_selector( '.page-hero' ); - - if ( $options['background_color'] ) { - $css->add_property( 'background-color', esc_attr( $options['background_color'] ) ); - } - - if ( $image_url ) { - $css->add_property( 'background-image', 'url(' . esc_url( $image_url ) . ')' ); - $css->add_property( 'background-size', 'cover' ); - - if ( $options['background_color'] && $options['background_overlay'] ) { - $css->add_property( 'background-image', 'linear-gradient(0deg, ' . $options['background_color'] . ',' . $options['background_color'] . '), url(' . $image_url . ')' ); - } - - if ( $options['background_position'] ) { - $css->add_property( 'background-position', esc_attr( $options['background_position'] ) ); - } - - $css->add_property( 'background-repeat', 'no-repeat' ); - } - - if ( $options['text_color'] ) { - $css->add_property( 'color', esc_attr( $options['text_color'] ) ); - } - - if ( $options['padding_top'] ) { - $css->add_property( 'padding-top', absint( $options['padding_top'] ), false, esc_html( $options['padding_top_unit'] ) ); - } - - if ( $options['padding_right'] ) { - $css->add_property( 'padding-right', absint( $options['padding_right'] ), false, esc_html( $options['padding_right_unit'] ) ); - } - - if ( $options['padding_bottom'] ) { - $css->add_property( 'padding-bottom', absint( $options['padding_bottom'] ), false, esc_html( $options['padding_bottom_unit'] ) ); - } - - if ( $options['padding_left'] ) { - $css->add_property( 'padding-left', absint( $options['padding_left'] ), false, esc_html( $options['padding_left_unit'] ) ); - } - - if ( $options['horizontal_alignment'] ) { - $css->add_property( 'text-align', esc_html( $options['horizontal_alignment'] ) ); - } - - if ( ! $using_flexbox ) { - $css->add_property( 'box-sizing', 'border-box' ); - } - - if ( $options['site_header_merge'] && $options['full_screen'] ) { - $css->add_property( 'min-height', '100vh' ); - - if ( $options['vertical_alignment'] ) { - $css->add_property( 'display', '-webkit-flex' ); - $css->add_property( 'display', '-ms-flex' ); - $css->add_property( 'display', 'flex' ); - - if ( 'center' === $options['vertical_alignment'] ) { - $css->add_property( '-webkit-box', 'center' ); - $css->add_property( '-ms-flex-pack', 'center' ); - $css->add_property( 'justify-content', 'center' ); - } elseif ( 'bottom' === $options['vertical_alignment'] ) { - $css->add_property( '-webkit-box', 'end' ); - $css->add_property( '-ms-flex-pack', 'end' ); - $css->add_property( 'justify-content', 'flex-end' ); - } - - $css->add_property( '-webkit-box-orient', 'vertical' ); - $css->add_property( '-webkit-box-direction', 'normal' ); - $css->add_property( '-ms-flex-direction', 'column' ); - $css->add_property( 'flex-direction', 'column' ); - - $css->set_selector( '.page-hero .inside-page-hero' ); - $css->add_property( 'width', '100%' ); - } - } - - if ( $padding_inside && function_exists( 'generate_get_option' ) ) { - $container_width = generate_get_option( 'container_width' ); - $padding_right = '0px'; - $padding_left = '0px'; - - if ( $options['padding_right'] ) { - $padding_right = absint( $options['padding_right'] ) . $options['padding_right_unit']; - } - - if ( $options['padding_left'] ) { - $padding_left = absint( $options['padding_left'] ) . $options['padding_left_unit']; - } - - $css->set_selector( '.page-hero .inside-page-hero.grid-container' ); - - $css->add_property( - 'max-width', - sprintf( - 'calc(%1$s - %2$s - %3$s)', - $container_width . 'px', - $padding_right, - $padding_left - ) - ); - } - - $css->set_selector( '.page-hero h1, .page-hero h2, .page-hero h3, .page-hero h4, .page-hero h5, .page-hero h6' ); - if ( $options['text_color'] ) { - $css->add_property( 'color', esc_attr( $options['text_color'] ) ); - } - - $css->set_selector( '.inside-page-hero > *:last-child' ); - $css->add_property( 'margin-bottom', '0px' ); - - $css->set_selector( '.page-hero a, .page-hero a:visited' ); - - if ( $options['link_color'] ) { - $css->add_property( 'color', esc_attr( $options['link_color'] ) ); - } - - if ( $options['content'] ) { - $css->set_selector( '.page-hero time.updated' ); - $css->add_property( 'display', 'none' ); - } - - $css->set_selector( '.page-hero a:hover' ); - - if ( $options['link_color_hover'] ) { - $css->add_property( 'color', esc_attr( $options['link_color_hover'] ) ); - } - - if ( '' !== $options['site_header_merge'] ) { - if ( 'merge-desktop' === $options['site_header_merge'] ) { - $css->start_media_query( apply_filters( 'generate_not_mobile_media_query', '(min-width: 769px)' ) ); - } - - $header_background = $options['header_background_color'] ? $options['header_background_color'] : 'transparent'; - - if ( $options['site_header_height'] ) { - $css->set_selector( '.page-hero' ); - - if ( $options['padding_top'] ) { - $css->add_property( 'padding-top', 'calc(' . absint( $options['padding_top'] ) . esc_html( $options['padding_top_unit'] ) . ' + ' . absint( $options['site_header_height'] ) . 'px)' ); - } else { - $css->add_property( 'padding-top', absint( $options['site_header_height'] ), false, 'px' ); - } - } - - $css->set_selector( '.header-wrap' ); - $css->add_property( 'position', 'absolute' ); - $css->add_property( 'left', '0px' ); - $css->add_property( 'right', '0px' ); - $css->add_property( 'z-index', '10' ); - - $css->set_selector( '.header-wrap .site-header' ); - $css->add_property( 'background', $header_background ); - - $css->set_selector( '.header-wrap .main-title a, .header-wrap .main-title a:hover, .header-wrap .main-title a:visited' ); - $css->add_property( 'color', esc_attr( $options['header_title_color'] ) ); - - if ( ! GeneratePress_Elements_Helper::does_option_exist( 'navigation-as-header' ) ) { - $css->set_selector( '.header-wrap .mobile-header-navigation:not(.navigation-stick):not(.toggled) .main-title a, .header-wrap .mobile-header-navigation:not(.navigation-stick):not(.toggled) .main-title a:hover, .header-wrap .mobile-header-navigation:not(.navigation-stick):not(.toggled) .main-title a:visited' ); - $css->add_property( 'color', esc_attr( $options['header_title_color'] ) ); - } - - if ( function_exists( 'generate_get_color_defaults' ) ) { - $color_settings = wp_parse_args( - get_option( 'generate_settings', array() ), - generate_get_color_defaults() - ); - - if ( GeneratePress_Elements_Helper::does_option_exist( 'navigation-as-header' ) ) { - $css->set_selector( '.header-wrap .toggled .main-title a, .header-wrap .toggled .main-title a:hover, .header-wrap .toggled .main-title a:visited, .header-wrap .navigation-stick .main-title a, .header-wrap .navigation-stick .main-title a:hover, .header-wrap .navigation-stick .main-title a:visited' ); - $css->add_property( 'color', esc_attr( $color_settings['site_title_color'] ) ); - } - } - - $css->set_selector( '.header-wrap .site-description' ); - $css->add_property( 'color', esc_attr( $options['header_tagline_color'] ) ); - - if ( $options['navigation_colors'] ) { - $navigation_background = $options['navigation_background_color'] ? $options['navigation_background_color'] : 'transparent'; - $navigation_background_hover = $options['navigation_background_color_hover'] ? $options['navigation_background_color_hover'] : 'transparent'; - $navigation_background_current = $options['navigation_background_color_current'] ? $options['navigation_background_color_current'] : 'transparent'; - - $css->set_selector( '.header-wrap #site-navigation:not(.toggled), .header-wrap #mobile-header:not(.toggled):not(.navigation-stick), .has-inline-mobile-toggle .mobile-menu-control-wrapper' ); - $css->add_property( 'background', $navigation_background ); - - if ( function_exists( 'generate_is_using_flexbox' ) && generate_is_using_flexbox() ) { - $css->set_selector( '.header-wrap #site-navigation:not(.toggled) .main-nav > ul > li > a, .header-wrap #mobile-header:not(.toggled):not(.navigation-stick) .main-nav > ul > li > a, .header-wrap .main-navigation:not(.toggled):not(.navigation-stick) .menu-toggle, .header-wrap .main-navigation:not(.toggled):not(.navigation-stick) .menu-toggle:hover, .main-navigation:not(.toggled):not(.navigation-stick) .menu-bar-item:not(.close-search) > a' ); - } else { - $css->set_selector( '.header-wrap #site-navigation:not(.toggled) .main-nav > ul > li > a, .header-wrap #mobile-header:not(.toggled):not(.navigation-stick) .main-nav > ul > li > a, .header-wrap .main-navigation:not(.toggled):not(.navigation-stick) .menu-toggle, .header-wrap .main-navigation:not(.toggled):not(.navigation-stick) .menu-toggle:hover, .main-navigation:not(.toggled):not(.navigation-stick) .mobile-bar-items a, .main-navigation:not(.toggled):not(.navigation-stick) .mobile-bar-items a:hover, .main-navigation:not(.toggled):not(.navigation-stick) .mobile-bar-items a:focus' ); - } - - $css->add_property( 'color', esc_attr( $options['navigation_text_color'] ) ); - - if ( function_exists( 'generate_is_using_flexbox' ) && generate_is_using_flexbox() ) { - $css->set_selector( '.header-wrap #site-navigation:not(.toggled) .main-nav > ul > li:hover > a, .header-wrap #site-navigation:not(.toggled) .main-nav > ul > li:focus > a, .header-wrap #site-navigation:not(.toggled) .main-nav > ul > li.sfHover > a, .header-wrap #mobile-header:not(.toggled) .main-nav > ul > li:hover > a, .header-wrap #site-navigation:not(.toggled) .menu-bar-item:not(.close-search):hover > a, .header-wrap #mobile-header:not(.toggled) .menu-bar-item:not(.close-search):hover > a, .header-wrap #site-navigation:not(.toggled) .menu-bar-item:not(.close-search).sfHover > a, .header-wrap #mobile-header:not(.toggled) .menu-bar-item:not(.close-search).sfHover > a' ); - } else { - $css->set_selector( '.header-wrap #site-navigation:not(.toggled) .main-nav > ul > li:hover > a, .header-wrap #site-navigation:not(.toggled) .main-nav > ul > li:focus > a, .header-wrap #site-navigation:not(.toggled) .main-nav > ul > li.sfHover > a, .header-wrap #mobile-header:not(.toggled) .main-nav > ul > li:hover > a' ); - } - - $css->add_property( 'background', $navigation_background_hover ); - - if ( '' !== $options['navigation_text_color_hover'] ) { - $css->add_property( 'color', esc_attr( $options['navigation_text_color_hover'] ) ); - } else { - $css->add_property( 'color', esc_attr( $options['navigation_text_color'] ) ); - } - - $css->set_selector( '.header-wrap #site-navigation:not(.toggled) .main-nav > ul > li[class*="current-menu-"] > a, .header-wrap #mobile-header:not(.toggled) .main-nav > ul > li[class*="current-menu-"] > a, .header-wrap #site-navigation:not(.toggled) .main-nav > ul > li[class*="current-menu-"]:hover > a, .header-wrap #mobile-header:not(.toggled) .main-nav > ul > li[class*="current-menu-"]:hover > a' ); - $css->add_property( 'background', $navigation_background_current ); - - if ( '' !== $options['navigation_text_color_current'] ) { - $css->add_property( 'color', esc_attr( $options['navigation_text_color_current'] ) ); - } else { - $css->add_property( 'color', esc_attr( $options['navigation_text_color'] ) ); - } - } - - if ( $options['site_logo'] && GeneratePress_Elements_Helper::does_option_exist( 'navigation-as-header' ) ) { - $css->set_selector( '.main-navigation .site-logo, .main-navigation.toggled .page-hero-logo, .main-navigation.navigation-stick .page-hero-logo' ); - $css->add_property( 'display', 'none' ); - - $css->set_selector( '.main-navigation .page-hero-logo, .main-navigation.toggled .site-logo:not(.page-hero-logo), #mobile-header .mobile-header-logo' ); - $css->add_property( 'display', 'block' ); - - if ( ! GeneratePress_Elements_Helper::does_option_exist( 'sticky-navigation-logo' ) ) { - $css->set_selector( '.main-navigation.navigation-stick .site-logo:not(.page-hero-logo)' ); - $css->add_property( 'display', 'block' ); - - $css->set_selector( '.main-navigation.navigation-stick .page-hero-logo' ); - $css->add_property( 'display', 'none' ); - } - } - - if ( $options['navigation_logo'] && GeneratePress_Elements_Helper::does_option_exist( 'sticky-navigation' ) ) { - $css->set_selector( '#site-navigation:not(.navigation-stick):not(.toggled) .navigation-logo:not(.page-hero-navigation-logo)' ); - $css->add_property( 'display', 'none' ); - - $css->set_selector( '#sticky-navigation .page-hero-navigation-logo, #site-navigation.navigation-stick .page-hero-navigation-logo, #site-navigation.toggled .page-hero-navigation-logo' ); - $css->add_property( 'display', 'none' ); - } - - if ( $options['mobile_logo'] && GeneratePress_Elements_Helper::does_option_exist( 'mobile-logo' ) ) { - $css->set_selector( '#mobile-header:not(.navigation-stick):not(.toggled) .mobile-header-logo:not(.page-hero-mobile-logo)' ); - $css->add_property( 'display', 'none' ); - - $css->set_selector( '#mobile-header.navigation-stick .page-hero-mobile-logo, #mobile-header.toggled .page-hero-mobile-logo' ); - $css->add_property( 'display', 'none' ); - } - - if ( $options['site_logo'] && GeneratePress_Elements_Helper::does_option_exist( 'site-logo' ) ) { - $css->set_selector( '.site-logo:not(.page-hero-logo)' ); - $css->add_property( 'display', 'none' ); - } - - if ( 'merge-desktop' === $options['site_header_merge'] ) { - $css->stop_media_query(); - } - - if ( class_exists( 'Elementor\Plugin' ) ) { - $css->set_selector( '.elementor-editor-active .header-wrap' ); - $css->add_property( 'pointer-events', 'none' ); - } - } - - $css->start_media_query( generate_premium_get_media_query( 'mobile' ) ); - - $css->set_selector( '.page-hero' ); - - if ( $options['padding_top_mobile'] || '0' === $options['padding_top_mobile'] ) { - $css->add_property( 'padding-top', absint( $options['padding_top_mobile'] ), false, esc_html( $options['padding_top_unit_mobile'] ) ); - } - - if ( 'merge' === $options['site_header_merge'] && $options['site_header_height_mobile'] ) { - if ( $options['padding_top_mobile'] || '0' === $options['padding_top_mobile'] ) { - $css->add_property( 'padding-top', 'calc(' . absint( $options['padding_top_mobile'] ) . esc_html( $options['padding_top_unit_mobile'] ) . ' + ' . absint( $options['site_header_height_mobile'] ) . 'px)' ); - } elseif ( $options['padding_top'] ) { - $css->add_property( 'padding-top', 'calc(' . absint( $options['padding_top'] ) . esc_html( $options['padding_top_unit'] ) . ' + ' . absint( $options['site_header_height_mobile'] ) . 'px)' ); - } else { - $css->add_property( 'padding-top', absint( $options['site_header_height_mobile'] ), false, 'px' ); - } - } - - if ( $options['padding_right_mobile'] || '0' === $options['padding_right_mobile'] ) { - $css->add_property( 'padding-right', absint( $options['padding_right_mobile'] ), false, esc_html( $options['padding_right_unit_mobile'] ) ); - } - - if ( $options['padding_bottom_mobile'] || '0' === $options['padding_bottom_mobile'] ) { - $css->add_property( 'padding-bottom', absint( $options['padding_bottom_mobile'] ), false, esc_html( $options['padding_bottom_unit_mobile'] ) ); - } - - if ( $options['padding_left_mobile'] || '0' === $options['padding_left_mobile'] ) { - $css->add_property( 'padding-left', absint( $options['padding_left_mobile'] ), false, esc_html( $options['padding_left_unit_mobile'] ) ); - } - - if ( GeneratePress_Elements_Helper::does_option_exist( 'site-logo' ) && 'merge-desktop' === $options['site_header_merge'] ) { - $css->set_selector( '.inside-header .page-hero-logo, .main-navigation .page-hero-logo, #mobile-header .page-hero-mobile-logo' ); - $css->add_property( 'display', 'none' ); - } - - $css->stop_media_query(); - - return apply_filters( 'generate_page_hero_css_output', $css->css_output(), $options ); - } - - /** - * Put all of our meta options within an array. - * - * @since 1.7 - * - * @return array All Page Header options. - */ - public static function get_options() { - $post_id = self::$post_id; - - return apply_filters( - 'generate_hero_options', - array( - 'element_id' => $post_id, - 'content' => get_post_meta( $post_id, '_generate_element_content', true ), - 'classes' => get_post_meta( $post_id, '_generate_hero_custom_classes', true ), - 'container' => get_post_meta( $post_id, '_generate_hero_container', true ), - 'inner_container' => get_post_meta( $post_id, '_generate_hero_inner_container', true ), - 'horizontal_alignment' => get_post_meta( $post_id, '_generate_hero_horizontal_alignment', true ), - 'full_screen' => get_post_meta( $post_id, '_generate_hero_full_screen', true ), - 'vertical_alignment' => get_post_meta( $post_id, '_generate_hero_vertical_alignment', true ), - 'padding_top' => get_post_meta( $post_id, '_generate_hero_padding_top', true ), - 'padding_top_unit' => get_post_meta( $post_id, '_generate_hero_padding_top_unit', true ), - 'padding_right' => get_post_meta( $post_id, '_generate_hero_padding_right', true ), - 'padding_right_unit' => get_post_meta( $post_id, '_generate_hero_padding_right_unit', true ), - 'padding_bottom' => get_post_meta( $post_id, '_generate_hero_padding_bottom', true ), - 'padding_bottom_unit' => get_post_meta( $post_id, '_generate_hero_padding_bottom_unit', true ), - 'padding_left' => get_post_meta( $post_id, '_generate_hero_padding_left', true ), - 'padding_left_unit' => get_post_meta( $post_id, '_generate_hero_padding_left_unit', true ), - 'padding_top_mobile' => get_post_meta( $post_id, '_generate_hero_padding_top_mobile', true ), - 'padding_top_unit_mobile' => get_post_meta( $post_id, '_generate_hero_padding_top_unit_mobile', true ), - 'padding_right_mobile' => get_post_meta( $post_id, '_generate_hero_padding_right_mobile', true ), - 'padding_right_unit_mobile' => get_post_meta( $post_id, '_generate_hero_padding_right_unit_mobile', true ), - 'padding_bottom_mobile' => get_post_meta( $post_id, '_generate_hero_padding_bottom_mobile', true ), - 'padding_bottom_unit_mobile' => get_post_meta( $post_id, '_generate_hero_padding_bottom_unit_mobile', true ), - 'padding_left_mobile' => get_post_meta( $post_id, '_generate_hero_padding_left_mobile', true ), - 'padding_left_unit_mobile' => get_post_meta( $post_id, '_generate_hero_padding_left_unit_mobile', true ), - 'background_image' => get_post_meta( $post_id, '_generate_hero_background_image', true ), - 'disable_featured_image' => get_post_meta( $post_id, '_generate_hero_disable_featured_image', true ), - 'background_overlay' => get_post_meta( $post_id, '_generate_hero_background_overlay', true ), - 'background_position' => get_post_meta( $post_id, '_generate_hero_background_position', true ), - 'parallax' => get_post_meta( $post_id, '_generate_hero_background_parallax', true ), - 'background_color' => get_post_meta( $post_id, '_generate_hero_background_color', true ), - 'text_color' => get_post_meta( $post_id, '_generate_hero_text_color', true ), - 'link_color' => get_post_meta( $post_id, '_generate_hero_link_color', true ), - 'link_color_hover' => get_post_meta( $post_id, '_generate_hero_background_link_color_hover', true ), - 'site_header_merge' => get_post_meta( $post_id, '_generate_site_header_merge', true ), - 'site_header_height' => get_post_meta( $post_id, '_generate_site_header_height', true ), - 'site_header_height_mobile' => get_post_meta( $post_id, '_generate_site_header_height_mobile', true ), - 'site_logo' => get_post_meta( $post_id, '_generate_site_logo', true ), - 'retina_logo' => get_post_meta( $post_id, '_generate_retina_logo', true ), - 'navigation_logo' => get_post_meta( $post_id, '_generate_navigation_logo', true ), - 'mobile_logo' => get_post_meta( $post_id, '_generate_mobile_logo', true ), - 'navigation_location' => get_post_meta( $post_id, '_generate_navigation_location', true ), - 'header_background_color' => get_post_meta( $post_id, '_generate_site_header_background_color', true ), - 'header_title_color' => get_post_meta( $post_id, '_generate_site_header_title_color', true ), - 'header_tagline_color' => get_post_meta( $post_id, '_generate_site_header_tagline_color', true ), - 'navigation_colors' => get_post_meta( $post_id, '_generate_navigation_colors', true ), - 'navigation_background_color' => get_post_meta( $post_id, '_generate_navigation_background_color', true ), - 'navigation_text_color' => get_post_meta( $post_id, '_generate_navigation_text_color', true ), - 'navigation_background_color_hover' => get_post_meta( $post_id, '_generate_navigation_background_color_hover', true ), - 'navigation_text_color_hover' => get_post_meta( $post_id, '_generate_navigation_text_color_hover', true ), - 'navigation_background_color_current' => get_post_meta( $post_id, '_generate_navigation_background_color_current', true ), - 'navigation_text_color_current' => get_post_meta( $post_id, '_generate_navigation_text_color_current', true ), - ) - ); - } - - /** - * Does the bulk of the work after everything has initialized. - * - * @since 1.7 - */ - public function after_setup() { - $options = self::get_options(); - - if ( $options['disable_featured_image'] && is_singular() ) { - remove_action( 'generate_after_entry_header', 'generate_blog_single_featured_image' ); - remove_action( 'generate_before_content', 'generate_blog_single_featured_image' ); - remove_action( 'generate_after_header', 'generate_blog_single_featured_image' ); - remove_action( 'generate_before_content', 'generate_featured_page_header_inside_single' ); - remove_action( 'generate_after_header', 'generate_featured_page_header' ); - } - - if ( $options['site_logo'] && GeneratePress_Elements_Helper::does_option_exist( 'site-logo' ) ) { - if ( '' !== $options['site_header_merge'] ) { - add_action( 'generate_after_logo', array( $this, 'add_site_logo' ) ); - } else { - add_filter( 'theme_mod_custom_logo', array( $this, 'replace_logo' ) ); - - if ( $options['retina_logo'] && GeneratePress_Elements_Helper::does_option_exist( 'retina-logo' ) ) { - add_filter( 'generate_retina_logo', array( $this, 'replace_logo' ) ); - } - } - } - - if ( $options['navigation_logo'] && GeneratePress_Elements_Helper::does_option_exist( 'navigation-logo' ) ) { - if ( $options['site_header_merge'] && GeneratePress_Elements_Helper::does_option_exist( 'sticky-navigation' ) ) { - add_action( 'generate_inside_navigation', array( $this, 'add_navigation_logo' ) ); - } else { - add_filter( 'generate_navigation_logo', array( $this, 'replace_logo' ) ); - } - } - - if ( $options['mobile_logo'] && GeneratePress_Elements_Helper::does_option_exist( 'mobile-logo' ) ) { - if ( 'merge' === $options['site_header_merge'] ) { - add_action( 'generate_inside_mobile_header', array( $this, 'add_mobile_header_logo' ) ); - } else { - add_filter( 'generate_mobile_header_logo', array( $this, 'replace_logo' ) ); - } - } - - if ( $options['navigation_location'] ) { - add_filter( 'generate_navigation_location', array( $this, 'navigation_location' ) ); - } - - if ( '' !== $options['site_header_merge'] ) { - add_action( 'generate_before_header', array( $this, 'merged_header_start' ), 1 ); - add_action( 'generate_after_header', array( $this, 'merged_header_end' ), 8 ); - - if ( 'contained' === $options['container'] ) { - add_filter( 'generate_header_class', array( $this, 'site_header_classes' ) ); - } - } - - if ( $options['content'] ) { - self::remove_template_elements(); - } - } - - /** - * Returns our custom logos if set within the Page Header. - * - * @since 1.7 - * - * @return string New URLs to images. - */ - public static function replace_logo() { - $filter = current_filter(); - $options = self::get_options(); - - if ( 'theme_mod_custom_logo' === $filter ) { - return $options['site_logo']; - } - - if ( 'generate_retina_logo' === $filter ) { - return wp_get_attachment_url( $options['retina_logo'] ); - } - - if ( 'generate_navigation_logo' === $filter ) { - return wp_get_attachment_url( $options['navigation_logo'] ); - } - - if ( 'generate_mobile_header_logo' === $filter ) { - return wp_get_attachment_url( $options['mobile_logo'] ); - } - } - - /** - * Adds a new site logo element if our header is merged on desktop only. - * - * @since 1.7 - */ - public static function add_site_logo() { - $options = self::get_options(); - - $logo_url = wp_get_attachment_url( $options['site_logo'] ); - $retina_logo_url = wp_get_attachment_url( $options['retina_logo'] ); - - if ( ! $logo_url ) { - return; - } - - $attr = apply_filters( - 'generate_page_hero_logo_attributes', - array( - 'class' => 'header-image is-logo-image', - 'alt' => esc_attr( apply_filters( 'generate_logo_title', get_bloginfo( 'name', 'display' ) ) ), - 'src' => $logo_url, - 'title' => esc_attr( apply_filters( 'generate_logo_title', get_bloginfo( 'name', 'display' ) ) ), - ) - ); - - if ( '' !== $retina_logo_url ) { - $attr['srcset'] = $logo_url . ' 1x, ' . $retina_logo_url . ' 2x'; - - // Add dimensions to image if retina is set. This fixes a container width bug in Firefox. - $data = wp_get_attachment_metadata( $options['site_logo'] ); - - if ( ! empty( $data ) ) { - $attr['width'] = $data['width']; - $attr['height'] = $data['height']; - } - } - - $attr = array_map( 'esc_attr', $attr ); - $html_attr = ''; - - foreach ( $attr as $name => $value ) { - $html_attr .= " $name=" . '"' . $value . '"'; - } - - // phpcs:ignore -- Escaping not needed. - echo apply_filters( - 'generate_page_hero_logo_output', - sprintf( - '', - esc_url( apply_filters( 'generate_logo_href', home_url( '/' ) ) ), - esc_attr( apply_filters( 'generate_logo_title', get_bloginfo( 'name', 'display' ) ) ), - $html_attr - ), - $logo_url, - $html_attr - ); - } - - /** - * Adds the custom navigation logo if needed. - * Only needed if there's a sticky navigation. - * - * @since 1.7 - */ - public static function add_navigation_logo() { - $options = self::get_options(); - - printf( - '', - esc_url( apply_filters( 'generate_logo_href', home_url( '/' ) ) ), - esc_attr( apply_filters( 'generate_logo_title', get_bloginfo( 'name', 'display' ) ) ), - esc_url( wp_get_attachment_url( $options['navigation_logo'] ) ), - esc_attr( apply_filters( 'generate_logo_title', get_bloginfo( 'name', 'display' ) ) ) - ); - } - - /** - * Adds the custom mobile header if needed. - * Only needed if there's a sticky navigation. - * - * @since 1.7 - */ - public static function add_mobile_header_logo() { - $options = self::get_options(); - - if ( 'title' === GeneratePress_Elements_Helper::does_option_exist( 'mobile-header-branding' ) ) { - return; - } - - printf( - '', - esc_url( apply_filters( 'generate_logo_href', home_url( '/' ) ) ), - esc_attr( apply_filters( 'generate_logo_title', get_bloginfo( 'name', 'display' ) ) ), - esc_url( wp_get_attachment_url( $options['mobile_logo'] ) ), - esc_attr( apply_filters( 'generate_logo_title', get_bloginfo( 'name', 'display' ) ) ) - ); - } - - /** - * Set the navigation location if set. - * - * @since 1.7 - * - * @return string The navigation location. - */ - public static function navigation_location() { - $options = self::get_options(); - - if ( 'no-navigation' === $options['navigation_location'] ) { - return ''; - } else { - return $options['navigation_location']; - } - } - - /** - * The opening merged header element. - * - * @since 1.7 - */ - public static function merged_header_start() { - echo '
'; - } - - /** - * The closing merged header element. - * - * @since 1.7 - */ - public static function merged_header_end() { - echo '
'; - } - - /** - * Adds classes to the site header. - * - * @since 1.7 - * - * @param array $classes Existing classes. - * @return array New classes. - */ - public static function site_header_classes( $classes ) { - $classes[] = 'grid-container'; - $classes[] = 'grid-parent'; - - return $classes; - } - - /** - * Checks if template tags exist, and removes those elements from elsewhere. - * - * @since 1.7 - */ - public static function remove_template_elements() { - $options = self::get_options(); - - if ( strpos( $options['content'], '{{post_title}}' ) !== false ) { - if ( is_singular() ) { - add_filter( 'generate_show_title', '__return_false' ); - } - - remove_action( 'generate_archive_title', 'generate_archive_title' ); - remove_filter( 'get_the_archive_title', 'generate_filter_the_archive_title' ); - add_filter( 'post_class', array( self::$hero, 'remove_hentry' ) ); - } - - if ( strpos( $options['content'], '{{post_date}}' ) !== false ) { - add_filter( 'generate_post_date', '__return_false' ); - add_filter( 'post_class', array( self::$hero, 'remove_hentry' ) ); - } - - if ( strpos( $options['content'], '{{post_author}}' ) !== false ) { - add_filter( 'generate_post_author', '__return_false' ); - add_filter( 'post_class', array( self::$hero, 'remove_hentry' ) ); - } - - if ( strpos( $options['content'], '{{post_terms.category}}' ) !== false ) { - add_filter( 'generate_show_categories', '__return_false' ); - } - - if ( strpos( $options['content'], '{{post_terms.post_tag}}' ) !== false ) { - add_filter( 'generate_show_tags', '__return_false' ); - } - } - - /** - * Checks for template tags and replaces them. - * - * @since 1.7 - * - * @param string $content The content to check. - * @return mixed The content with the template tags replaced. - */ - public static function template_tags( $content ) { - $search = array(); - $replace = array(); - - $search[] = '{{post_title}}'; - $post_title = ''; - - if ( is_singular() ) { - $post_title = get_the_title(); - } elseif ( is_tax() || is_category() || is_tag() ) { - $post_title = get_queried_object()->name; - } elseif ( is_post_type_archive() ) { - $post_title = post_type_archive_title( '', false ); - } elseif ( is_archive() && function_exists( 'get_the_archive_title' ) ) { - $post_title = get_the_archive_title(); - - if ( is_author() ) { - $post_title = get_the_author(); - } - } elseif ( is_home() ) { - $post_title = __( 'Blog', 'gp-premium' ); - } - - $replace[] = apply_filters( 'generate_page_hero_post_title', $post_title ); - - if ( is_singular() ) { - $time_string = ''; - if ( get_the_time( 'U' ) !== get_the_modified_time( 'U' ) ) { - $time_string = '' . $time_string; - } - - $time_string = sprintf( - $time_string, - esc_attr( get_the_date( 'c' ) ), - esc_html( get_the_date() ), - esc_attr( get_the_modified_date( 'c' ) ), - esc_html( get_the_modified_date() ) - ); - - $search[] = '{{post_date}}'; - $replace[] = apply_filters( 'generate_page_hero_post_date', $time_string ); - - // Author. - global $post; - $author_id = $post->post_author; - - $author = sprintf( - '', - esc_url( get_author_posts_url( $author_id ) ), - /* translators: author name */ - esc_attr( sprintf( __( 'View all posts by %s', 'gp-premium' ), get_the_author_meta( 'display_name', $author_id ) ) ), - esc_html( get_the_author_meta( 'display_name', $author_id ) ) - ); - - $search[] = '{{post_author}}'; - $replace[] = apply_filters( 'generate_page_hero_post_author', $author ); - - // Post terms. - if ( strpos( $content, '{{post_terms' ) !== false ) { - $data = preg_match_all( '/{{post_terms.([^}]*)}}/', $content, $matches ); - foreach ( $matches[1] as $match ) { - $search[] = '{{post_terms.' . $match . '}}'; - $terms = get_the_term_list( get_the_ID(), $match, apply_filters( 'generate_page_hero_terms_before', '' ), apply_filters( 'generate_page_hero_terms_separator', ', ' ), apply_filters( 'generate_page_hero_terms_after', '' ) ); - - if ( ! is_wp_error( $terms ) ) { - $replace[] = $terms; - } - } - } - - // Custom field. - if ( strpos( $content, '{{custom_field' ) !== false ) { - $data = preg_match_all( '/{{custom_field.([^}]*)}}/', $content, $matches ); - foreach ( $matches[1] as $match ) { - if ( null !== get_post_meta( get_the_ID(), $match, true ) && '_thumbnail_id' !== $match ) { - $search[] = '{{custom_field.' . $match . '}}'; - $value = get_post_meta( get_the_ID(), $match, true ); - add_filter( 'wp_kses_allowed_html', [ 'GeneratePress_Elements_Helper', 'expand_allowed_html' ], 10, 2 ); - $value = wp_kses_post( $value ); - remove_filter( 'wp_kses_allowed_html', [ 'GeneratePress_Elements_Helper', 'expand_allowed_html' ], 10, 2 ); - $replace[] = $value; - } - } - - $thumbnail_id = get_post_meta( get_the_ID(), '_thumbnail_id', true ); - if ( null !== $thumbnail_id ) { - $search[] = '{{custom_field._thumbnail_id}}'; - $replace[] = wp_get_attachment_image( $thumbnail_id, apply_filters( 'generate_hero_thumbnail_id_size', 'medium' ) ); - } - } - } - - // Taxonomy description. - if ( is_tax() || is_category() || is_tag() ) { - if ( strpos( $content, '{{custom_field' ) !== false ) { - $search[] = '{{custom_field.description}}'; - $replace[] = term_description( get_queried_object()->term_id, get_queried_object()->taxonomy ); - } - } - - return str_replace( $search, $replace, $content ); - } - - /** - * When the post title, author or date are in the Page Hero, they appear outside of the - * hentry element. This causes errors in Google Search Console. - * - * @since 1.7 - * - * @param array $classes Existing classes. - * @return array - */ - public function remove_hentry( $classes ) { - $classes = array_diff( $classes, array( 'hentry' ) ); - - return $classes; - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/elements/class-hooks.php b/wp-content/upgrade-temp-backup/plugins/gp-premium/elements/class-hooks.php deleted file mode 100644 index dca87caa..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/elements/class-hooks.php +++ /dev/null @@ -1,223 +0,0 @@ -hook = get_post_meta( $post_id, '_generate_hook', true ); - - if ( empty( $this->hook ) ) { - return; - } - - $this->content = get_post_meta( $post_id, '_generate_element_content', true ); - - if ( get_post_meta( $post_id, '_generate_custom_hook', true ) ) { - $this->custom_hook = get_post_meta( $post_id, '_generate_custom_hook', true ); - } - - if ( get_post_meta( $post_id, '_generate_hook_disable_site_header', true ) ) { - $this->disable_site_header = get_post_meta( $post_id, '_generate_hook_disable_site_header', true ); - } - - if ( get_post_meta( $post_id, '_generate_hook_disable_site_footer', true ) ) { - $this->disable_site_footer = get_post_meta( $post_id, '_generate_hook_disable_site_footer', true ); - } - - if ( get_post_meta( $post_id, '_generate_hook_priority', true ) || '0' === get_post_meta( $post_id, '_generate_hook_priority', true ) ) { - $this->priority = get_post_meta( $post_id, '_generate_hook_priority', true ); - } - - if ( get_post_meta( $post_id, '_generate_hook_execute_php', true ) ) { - $this->php = get_post_meta( $post_id, '_generate_hook_execute_php', true ); - } - - if ( get_post_meta( $post_id, '_generate_hook_execute_shortcodes', true ) ) { - $this->shortcodes = get_post_meta( $post_id, '_generate_hook_execute_shortcodes', true ); - } - - if ( get_post_meta( $post_id, '_generate_element_display_conditions', true ) ) { - $this->conditional = get_post_meta( $post_id, '_generate_element_display_conditions', true ); - } - - if ( get_post_meta( $post_id, '_generate_element_exclude_conditions', true ) ) { - $this->exclude = get_post_meta( $post_id, '_generate_element_exclude_conditions', true ); - } - - if ( get_post_meta( $post_id, '_generate_element_user_conditions', true ) ) { - $this->users = get_post_meta( $post_id, '_generate_element_user_conditions', true ); - } - - if ( 'custom' === $this->hook && $this->custom_hook ) { - $this->hook = $this->custom_hook; - } - - $display = apply_filters( 'generate_hook_element_display', GeneratePress_Conditions::show_data( $this->conditional, $this->exclude, $this->users ), $post_id ); - - /** - * Simplify filter name. - * - * @since 2.0.0 - */ - $display = apply_filters( - 'generate_element_display', - $display, - $post_id - ); - - if ( $display ) { - global $generate_elements; - - $generate_elements[ $post_id ] = array( - 'is_block_element' => false, - 'type' => 'hook', - 'id' => $post_id, - ); - - if ( 'generate_header' === $this->hook && $this->disable_site_header ) { - remove_action( 'generate_header', 'generate_construct_header' ); - } - - if ( 'generate_footer' === $this->hook && $this->disable_site_footer ) { - remove_action( 'generate_footer', 'generate_construct_footer' ); - add_filter( 'generate_footer_widgets', '__return_null' ); - } - - add_action( esc_attr( $this->hook ), array( $this, 'execute_hook' ), absint( $this->priority ) ); - } - - } - - /** - * Output our hook content. - * - * @since 1.7 - */ - public function execute_hook() { - - $content = $this->content; - - if ( $this->shortcodes ) { - $content = do_shortcode( $content ); - } - - if ( $this->php && GeneratePress_Elements_Helper::should_execute_php() ) { - ob_start(); - eval( '?>' . $content . 'conditional = get_post_meta( $post_id, '_generate_element_display_conditions', true ); - } - - if ( get_post_meta( $post_id, '_generate_element_exclude_conditions', true ) ) { - $this->exclude = get_post_meta( $post_id, '_generate_element_exclude_conditions', true ); - } - - if ( get_post_meta( $post_id, '_generate_element_user_conditions', true ) ) { - $this->users = get_post_meta( $post_id, '_generate_element_user_conditions', true ); - } - - if ( get_post_meta( $post_id, '_generate_sidebar_layout', true ) ) { - $this->sidebar_layout = get_post_meta( $post_id, '_generate_sidebar_layout', true ); - } - - if ( get_post_meta( $post_id, '_generate_footer_widgets', true ) ) { - $this->footer_widgets = get_post_meta( $post_id, '_generate_footer_widgets', true ); - } - - if ( get_post_meta( $post_id, '_generate_disable_site_header', true ) ) { - $this->disable_site_header = get_post_meta( $post_id, '_generate_disable_site_header', true ); - } - - if ( get_post_meta( $post_id, '_generate_disable_mobile_header', true ) ) { - $this->disable_mobile_header = get_post_meta( $post_id, '_generate_disable_mobile_header', true ); - } - - if ( get_post_meta( $post_id, '_generate_disable_top_bar', true ) ) { - $this->disable_top_bar = get_post_meta( $post_id, '_generate_disable_top_bar', true ); - } - - if ( get_post_meta( $post_id, '_generate_disable_primary_navigation', true ) ) { - $this->disable_primary_navigation = get_post_meta( $post_id, '_generate_disable_primary_navigation', true ); - } - - if ( get_post_meta( $post_id, '_generate_disable_secondary_navigation', true ) ) { - $this->disable_secondary_navigation = get_post_meta( $post_id, '_generate_disable_secondary_navigation', true ); - } - - if ( get_post_meta( $post_id, '_generate_disable_featured_image', true ) ) { - $this->disable_featured_image = get_post_meta( $post_id, '_generate_disable_featured_image', true ); - } - - if ( get_post_meta( $post_id, '_generate_disable_content_title', true ) ) { - $this->disable_content_title = get_post_meta( $post_id, '_generate_disable_content_title', true ); - } - - if ( get_post_meta( $post_id, '_generate_disable_footer', true ) ) { - $this->disable_footer = get_post_meta( $post_id, '_generate_disable_footer', true ); - } - - if ( get_post_meta( $post_id, '_generate_content_area', true ) ) { - $this->content_area = get_post_meta( $post_id, '_generate_content_area', true ); - } - - if ( get_post_meta( $post_id, '_generate_content_width', true ) ) { - $this->content_width = get_post_meta( $post_id, '_generate_content_width', true ); - } - - $display = apply_filters( 'generate_layout_element_display', GeneratePress_Conditions::show_data( $this->conditional, $this->exclude, $this->users ), $post_id ); - - /** - * Simplify filter name. - * - * @since 2.0.0 - */ - $display = apply_filters( - 'generate_element_display', - $display, - $post_id - ); - - if ( $display ) { - global $generate_elements; - - $generate_elements[ $post_id ] = array( - 'is_block_element' => false, - 'type' => 'layout', - 'id' => $post_id, - ); - - add_action( 'wp', array( $this, 'after_setup' ), 100 ); - add_action( 'wp_enqueue_scripts', array( $this, 'build_css' ), 50 ); - - if ( is_admin() ) { - add_action( 'current_screen', array( $this, 'after_setup' ), 100 ); - add_action( 'enqueue_block_editor_assets', array( $this, 'build_css' ), 50 ); - } - } - - } - - /** - * Return our available options. - * - * @since 1.7 - * @deprecated 1.7.3 - * - * @return array - */ - public static function get_options() { - return false; - } - - /** - * Initiate our set layout changes. - * - * @since 1.7 - */ - public function after_setup() { - if ( $this->sidebar_layout && ! self::post_meta_exists( '_generate-sidebar-layout-meta' ) ) { - add_filter( 'generate_sidebar_layout', array( $this, 'filter_options' ) ); - } - - if ( $this->footer_widgets && ! self::post_meta_exists( '_generate-footer-widget-meta' ) ) { - add_filter( 'generate_footer_widgets', array( $this, 'filter_options' ) ); - } - - if ( $this->disable_site_header ) { - remove_action( 'generate_header', 'generate_construct_header' ); - } - - if ( $this->disable_mobile_header ) { - remove_action( 'generate_after_header', 'generate_menu_plus_mobile_header', 5 ); - } - - if ( $this->disable_top_bar ) { - remove_action( 'generate_before_header', 'generate_top_bar', 5 ); - remove_action( 'generate_inside_secondary_navigation', 'generate_secondary_nav_top_bar_widget', 5 ); - } - - if ( $this->disable_primary_navigation ) { - add_filter( 'generate_navigation_location', '__return_false', 20 ); - add_filter( 'generate_disable_mobile_header_menu', '__return_true' ); - } - - if ( $this->disable_secondary_navigation ) { - add_filter( 'has_nav_menu', array( $this, 'disable_secondary_navigation' ), 10, 2 ); - } - - if ( $this->disable_featured_image ) { - remove_action( 'generate_after_entry_header', 'generate_blog_single_featured_image' ); - remove_action( 'generate_before_content', 'generate_blog_single_featured_image' ); - remove_action( 'generate_after_header', 'generate_blog_single_featured_image' ); - remove_action( 'generate_before_content', 'generate_featured_page_header_inside_single' ); - remove_action( 'generate_after_header', 'generate_featured_page_header' ); - add_filter( 'body_class', array( $this, 'remove_featured_image_class' ), 20 ); - } - - if ( $this->disable_content_title ) { - add_filter( 'generate_show_title', '__return_false' ); - } - - if ( $this->disable_footer ) { - remove_action( 'generate_footer', 'generate_construct_footer' ); - add_filter( 'generate_footer_widgets', '__return_null' ); - } - - if ( $this->content_area ) { - add_filter( 'body_class', array( $this, 'body_classes' ) ); - } - - if ( is_admin() ) { - if ( $this->sidebar_layout && ! self::admin_post_meta_exists( '_generate-sidebar-layout-meta' ) ) { - add_filter( 'generate_block_editor_sidebar_layout', array( $this, 'filter_options' ) ); - } - - if ( $this->disable_content_title ) { - add_filter( 'generate_block_editor_show_content_title', '__return_false' ); - } - - if ( $this->content_area ) { - add_filter( 'generate_block_editor_content_area_type', array( $this, 'set_editor_content_area' ) ); - } - - if ( $this->content_width ) { - add_filter( 'generate_block_editor_container_width', array( $this, 'set_editor_content_width' ) ); - } - } - } - - /** - * Build dynamic CSS - */ - public function build_css() { - if ( $this->content_width ) { - wp_add_inline_style( 'generate-style', '#content {max-width: ' . absint( $this->content_width ) . 'px;margin-left: auto;margin-right: auto;}' ); - } - - if ( is_admin() ) { - $admin_css = ''; - - if ( version_compare( generate_premium_get_theme_version(), '3.2.0-alpha.1', '<' ) ) { - if ( 'full-width' === $this->content_area ) { - $admin_css .= 'html .editor-styles-wrapper .wp-block{max-width: 100%}'; - } - - if ( $this->content_width ) { - $admin_css .= 'html .editor-styles-wrapper .wp-block{max-width: ' . absint( $this->content_width ) . 'px;}'; - } - } - - if ( $this->content_area ) { - $admin_css .= '#generate-layout-page-builder-container {opacity: 0.5;pointer-events: none;}'; - } - - if ( $admin_css ) { - wp_add_inline_style( 'wp-edit-blocks', $admin_css ); - } - } - } - - /** - * Check to see if our individual post metabox has a value. - * - * @since 1.7 - * - * @param string $meta The meta key we're checking for. - * @return bool - */ - public static function post_meta_exists( $meta ) { - if ( ! is_singular() ) { - return false; - } - - $value = get_post_meta( get_the_ID(), $meta, true ); - - if ( '_generate-footer-widget-meta' === $meta && '0' === $value ) { - $value = true; - } - - if ( $value ) { - return true; - } - - return false; - } - - /** - * Check to see if our individual post metabox has a value in the admin area. - * - * @since 1.11.0 - * - * @param string $meta The meta key we're checking for. - * @return bool - */ - public static function admin_post_meta_exists( $meta ) { - if ( is_admin() ) { - $current_screen = get_current_screen(); - - if ( isset( $current_screen->is_block_editor ) && $current_screen->is_block_editor ) { - $post_id = false; - - if ( isset( $_GET['post'] ) ) { // phpcs:ignore -- No data processing happening here. - $post_id = absint( $_GET['post'] ); // phpcs:ignore -- No data processing happening here. - } - - if ( $post_id ) { - $value = get_post_meta( $post_id, $meta, true ); - - if ( '_generate-footer-widget-meta' === $meta && '0' === $value ) { - $value = true; - } - - if ( $value ) { - return true; - } - } else { - return false; - } - } - } - } - - /** - * Filter our filterable options. - * - * @since 1.7 - */ - public function filter_options() { - $filter = current_filter(); - - if ( 'generate_sidebar_layout' === $filter || 'generate_block_editor_sidebar_layout' === $filter ) { - return $this->sidebar_layout; - } - - if ( 'generate_footer_widgets' === $filter ) { - if ( 'no-widgets' === $this->footer_widgets ) { - return 0; - } else { - return $this->footer_widgets; - } - } - } - - /** - * Set the content area type in the editor. - * - * @param string $area Content area type. - */ - public function set_editor_content_area( $area ) { - if ( 'full-width' === $this->content_area ) { - $area = 'true'; - } - - if ( 'contained-container' === $this->content_area ) { - $area = 'contained'; - } - - return $area; - } - - /** - * Set the content width in the editor. - * - * @param string $width Content width with unit. - */ - public function set_editor_content_width( $width ) { - if ( $this->content_width ) { - $width = absint( $this->content_width ) . 'px'; - } - - return $width; - } - - /** - * Disable the Secondary Navigation if set. - * - * @since 1.7 - * - * @param bool $has_nav_menu The existing value. - * @param string $location The location we're checking. - * @return bool - */ - public static function disable_secondary_navigation( $has_nav_menu, $location ) { - if ( 'secondary' === $location ) { - return false; - } - - return $has_nav_menu; - } - - /** - * Sets any necessary body classes. - * - * @since 1.7 - * - * @param array $classes Our existing body classes. - * @return array Our new set of classes. - */ - public function body_classes( $classes ) { - if ( 'full-width' === $this->content_area ) { - $classes[] = 'full-width-content'; - } - - if ( 'contained' === $this->content_area ) { - $classes[] = 'contained-content'; - } - - return $classes; - } - - /** - * Remove the featured image class if it's disabled. - * - * @since 2.1.0 - * @param array $classes The body classes. - */ - public function remove_featured_image_class( $classes ) { - if ( is_singular() ) { - $classes = generate_premium_remove_featured_image_class( $classes, $this->disable_featured_image ); - } - - return $classes; - } - -} diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/elements/class-metabox.php b/wp-content/upgrade-temp-backup/plugins/gp-premium/elements/class-metabox.php deleted file mode 100644 index 1d8d54ba..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/elements/class-metabox.php +++ /dev/null @@ -1,2245 +0,0 @@ -is_block_editor ) ) { - $element_type = 'block'; - } - } - } - - return $element_type; - } - - /** - * Add a body class if we're using the Header element type. - * We do this so we can hide the Template Tags metabox for other types. - * - * @since 1.7 - * - * @param string $classes Existing classes. - * @return string - */ - public function body_class( $classes ) { - if ( 'gp_elements' === get_post_type() ) { - $element_type = self::get_element_type(); - - if ( $element_type ) { - $classes .= ' ' . $element_type . '-element-type'; - } else { - $classes .= ' no-element-type'; - } - - if ( 'header' === $element_type && get_post_meta( get_the_ID(), '_generate_element_content', true ) ) { - $classes .= ' element-has-page-hero'; - } - - $block_type = get_post_meta( get_the_ID(), '_generate_block_type', true ); - - if ( $block_type ) { - if ( 'content-template' === $block_type && get_post_meta( get_the_ID(), '_generate_use_theme_post_container', true ) ) { - $classes .= ' using-theme-post-container'; - } - - if ( ( 'archive-navigation-template' === $block_type || 'post-navigation-template' === $block_type ) && get_post_meta( get_the_ID(), '_generate_use_archive_navigation_container', true ) ) { - $classes .= ' using-theme-pagination-container'; - } - - $classes .= ' ' . $block_type . '-block-type'; - } - } - - return $classes; - } - - /** - * Enqueue any necessary scripts and styles. - * - * @since 1.7 - * - * @param string $hook The current page hook. - */ - public function scripts( $hook ) { - if ( in_array( $hook, array( 'post.php', 'post-new.php' ) ) ) { - if ( 'gp_elements' === get_post_type() ) { - $element_type = get_post_meta( get_the_ID(), '_generate_element_type', true ); - - // Remove autosave when dealing with non-content Elements. - // phpcs:ignore -- No data processing happening. - if ( 'block' !== $element_type || ( isset( $_GET['element_type'] ) && 'block' !== $_GET['element_type'] ) ) { - wp_dequeue_script( 'autosave' ); - } - - $deps = array( 'jquery' ); - - if ( function_exists( 'wp_enqueue_code_editor' ) ) { - $settings = wp_enqueue_code_editor( - array( - 'type' => 'application/x-httpd-php', - 'codemirror' => array( - 'indentUnit' => 2, - 'tabSize' => 2, - ), - ) - ); - - $deps[] = 'code-editor'; - } else { - $settings = false; - } - - $element_type = self::get_element_type(); - - wp_enqueue_script( 'generate-elements-metabox', plugin_dir_url( __FILE__ ) . 'assets/admin/metabox.js', $deps, GP_PREMIUM_VERSION, true ); - - wp_localize_script( - 'generate-elements-metabox', - 'elements', - array( - 'nonce' => wp_create_nonce( 'generate-elements-location' ), - 'settings' => $settings ? wp_json_encode( $settings ) : false, - 'type' => $element_type, - 'custom_image' => __( 'Custom Image', 'gp-premium' ), - 'fallback_image' => __( 'Fallback Image', 'gp-premium' ), - 'choose' => __( 'Choose...', 'gp-premium' ), - 'showID' => apply_filters( 'generate_elements_show_object_ids', false ), - ) - ); - - wp_enqueue_style( 'generate-elements-metabox', plugin_dir_url( __FILE__ ) . 'assets/admin/metabox.css', array(), GP_PREMIUM_VERSION ); - wp_enqueue_style( 'generate-elements-balloon', plugin_dir_url( __FILE__ ) . 'assets/admin/balloon.css', array(), GP_PREMIUM_VERSION ); - - wp_enqueue_media(); - wp_enqueue_script( 'wp-color-picker' ); - wp_enqueue_style( 'wp-color-picker' ); - wp_enqueue_script( 'wp-color-picker-alpha', GP_LIBRARY_DIRECTORY_URL . 'alpha-color-picker/wp-color-picker-alpha.min.js', array( 'wp-color-picker' ), '3.0.0', true ); - - wp_add_inline_script( - 'wp-color-picker-alpha', - 'jQuery( function() { jQuery( ".color-picker" ).wpColorPicker(); } );' - ); - - if ( function_exists( 'wp_add_inline_script' ) && function_exists( 'generate_get_default_color_palettes' ) ) { - // Grab our palette array and turn it into JS. - $palettes = wp_json_encode( generate_get_default_color_palettes() ); - - // Add our custom palettes. - // json_encode takes care of escaping. - wp_add_inline_script( 'wp-color-picker', 'jQuery.wp.wpColorPicker.prototype.options.palettes = ' . $palettes . ';' ); - } - - wp_enqueue_style( 'select2', GP_LIBRARY_DIRECTORY_URL . 'select2/select2.min.css', array(), '4.0.13' ); - wp_enqueue_script( 'select2', GP_LIBRARY_DIRECTORY_URL . 'select2/select2.full.min.js', array( 'jquery', 'generate-elements-metabox' ), '4.0.13', true ); - - $css = ''; - - if ( function_exists( 'generate_get_option' ) && 'separate-containers' === generate_get_option( 'content_layout_setting' ) ) { - $css .= 'body.left-sidebar-block-type .block-editor-block-list__layout.is-root-container, body.right-sidebar-block-type .block-editor-block-list__layout.is-root-container {background: ' . generate_get_option( 'background_color' ) . ';}'; - $css .= 'body.content-template-block-type:not(.using-theme-post-container) .block-editor-block-list__layout.is-root-container, body.archive-navigation-template-block-type:not(.using-theme-pagination-container) .block-editor-block-list__layout.is-root-container {background: ' . generate_get_option( 'background_color' ) . ';}'; - } - - wp_add_inline_style( 'generate-elements-metabox', $css ); - } - } - } - - /** - * Register our metabox. - * - * @since 1.7 - */ - public function register_metabox() { - // Title not translated on purpose. - add_meta_box( 'generate_premium_elements', 'Element', array( $this, 'element_fields' ), 'gp_elements', 'normal', 'high' ); - add_meta_box( 'generate_page_hero_template_tags', __( 'Template Tags', 'gp-premium' ), array( $this, 'template_tags' ), 'gp_elements', 'side', 'low' ); - remove_meta_box( 'slugdiv', 'gp_elements', 'normal' ); - } - - /** - * Output all of our metabox fields. - * - * @since 1.7 - * - * @param object $post Our post object. - */ - public function element_fields( $post ) { - wp_nonce_field( basename( __FILE__ ), 'generate_elements_nonce' ); - - $type = self::get_element_type(); - $page_hero_class = ''; - $merge = get_post_meta( get_the_ID(), '_generate_site_header_merge', true ); - $conditions_set = get_post_meta( get_the_ID(), '_generate_element_display_conditions', true ); - $post_status = get_post_status( get_the_ID() ); - - if ( 'header' === $type && get_post_meta( get_the_ID(), '_generate_element_content', true ) ) { - $page_hero_class = ' has-page-hero'; - } - ?> - - - -
-

-
- - -
- - - - - - - - - - - - - - - > - - - - - > - - - - - > - - - - - - - - - - - - - - - - - - - - - -
- - - /> -
- - - /> -
- - - - DISALLOW_FILE_EDIT' - ); - ?> - - /> - -
- - - - - - - - - - - - - - - - - - - - - - - - - - > - - - - - > - - - - - - - - - - - - - - - - - > - - - - - > - - - - - > - - - - - > - - - - - > - - - - - - - - - - - - - - - - - - - - - - - - - -
- - ? - - -
- - - -
- - - -
- - - -
- - - /> -
- - - -
- - -
- - -
- -
-
-
- - - -
- - -
- -
-
- - - -
- - -
- -
-
- - - -
- - -
- -
-
- - - -
- - -
-
- - -
- - - -
- - - - - -
- - - -
- - - /> -
- - ? - - /> -
- - ? - - /> -
- - - -
- - - -
- - - -
- - - -
- - - - - - - - - > - - - - - > - - - - - - > - - - - - - - > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > - - - - - > - - - - - > - - - - - > - - - - - > - - - - - > - - - - - > - - - - -
- - ? - - -
- - ? - - -
- - -
- -
-
- - px -
-
- - -
- - - -
- - - -
- - - -
- - -
-
- '; - } - ?> -
- - /> - - -
-
- - -
-
- '; - } - ?> -
- - /> - - -
-
- - -
-
- '; - } - ?> -
- - /> - - -
-
- - -
-
- '; - } - ?> -
- - /> - - -
-
- - - -
- - - /> -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - - - - - - - - -
- - -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
-
- - - - - - - - -
- - -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - /> -
- - - /> -
- - - /> -
- - - /> -
- - - /> -
- - - /> -
- - - /> -
- - - /> -
- - - - - - - - - - - - -
- - -
- -
- -
- -
- -
- -
-
- - - - px -
- - - - - - - - - - - - - - - - - - - > - - - - -
- - ? - - $value ) { - $type = explode( ':', $value['rule'] ); - - if ( in_array( 'post', $type ) || in_array( 'taxonomy', $type ) ) { - $show = true; - } else { - $show = false; - } - ?> -
- - - - - -
- -
- - - - - -
- - - - -
- - ? - - $value ) { - $type = explode( ':', $value['rule'] ); - - if ( in_array( 'post', $type ) || in_array( 'taxonomy', $type ) ) { - $show = true; - } else { - $show = false; - } - ?> -
- - - - - -
- -
- - - - - -
- - - - -
- - ? - - $value ) { - ?> -
- - - -
- -
- - - -
- - - - -
- - ? - - /> -
- - - - - - - - -
- 'text', - '_generate_custom_hook' => 'text', - '_generate_hook_priority' => 'number', - ); - - if ( 'hook' === $type_value ) { - $hook_values['_generate_hook_disable_site_header'] = 'key'; - $hook_values['_generate_hook_disable_site_footer'] = 'key'; - $hook_values['_generate_hook_execute_shortcodes'] = 'key'; - $hook_values['_generate_hook_execute_php'] = 'key'; - } - - // We don't want people to be able to use these hooks. - $blacklist = array( - 'muplugins_loaded', - 'registered_taxonomy', - 'plugins_loaded', - 'setup_theme', - 'after_setup_theme', - 'init', - 'widgets_init', - 'wp_loaded', - 'pre_get_posts', - 'wp', - 'template_redirect', - 'get_header', - 'wp_enqueue_scripts', - 'the_post', - 'dynamic_sidebar', - 'get_footer', - 'get_sidebar', - 'wp_print_footer_scripts', - 'shutdown', - ); - - foreach ( $hook_values as $key => $type ) { - $value = false; - - if ( isset( $_POST[ $key ] ) ) { - // Bail if we're using a blacklisted hook. - if ( '_generate_custom_hook' === $key ) { - if ( in_array( $_POST[ $key ], $blacklist ) ) { - continue; - } - } - - if ( 'number' === $type ) { - $value = absint( $_POST[ $key ] ); - } elseif ( 'key' === $type ) { - $value = sanitize_key( $_POST[ $key ] ); - } else { - $value = sanitize_text_field( $_POST[ $key ] ); - } - - // Need to temporarily change the $value so it returns true. - if ( '_generate_hook_priority' === $key ) { - if ( '0' === $_POST[ $key ] ) { - $value = 'zero'; - } - } - } - - if ( $value ) { - if ( 'zero' === $value ) { - $value = '0'; - } - - update_post_meta( $post_id, $key, $value ); - } else { - delete_post_meta( $post_id, $key ); - } - } - } - - // Page Header type. - if ( 'header' === $type_value ) { - $hero_values = array( - '_generate_hero_custom_classes' => 'attribute', - '_generate_hero_container' => 'text', - '_generate_hero_inner_container' => 'text', - '_generate_hero_horizontal_alignment' => 'text', - '_generate_hero_full_screen' => 'key', - '_generate_hero_vertical_alignment' => 'text', - '_generate_hero_padding_top' => 'number', - '_generate_hero_padding_top_unit' => 'text', - '_generate_hero_padding_right' => 'number', - '_generate_hero_padding_right_unit' => 'text', - '_generate_hero_padding_bottom' => 'number', - '_generate_hero_padding_bottom_unit' => 'text', - '_generate_hero_padding_left' => 'number', - '_generate_hero_padding_left_unit' => 'text', - '_generate_hero_padding_top_mobile' => 'number', - '_generate_hero_padding_top_unit_mobile' => 'text', - '_generate_hero_padding_right_mobile' => 'number', - '_generate_hero_padding_right_unit_mobile' => 'text', - '_generate_hero_padding_bottom_mobile' => 'number', - '_generate_hero_padding_bottom_unit_mobile' => 'text', - '_generate_hero_padding_left_mobile' => 'number', - '_generate_hero_padding_left_unit_mobile' => 'text', - '_generate_hero_background_image' => 'key', - '_generate_hero_disable_featured_image' => 'key', - '_generate_hero_background_color' => 'color', - '_generate_hero_text_color' => 'color', - '_generate_hero_link_color' => 'color', - '_generate_hero_background_link_color_hover' => 'color', - '_generate_hero_background_overlay' => 'key', - '_generate_hero_background_position' => 'text', - '_generate_hero_background_parallax' => 'key', - '_generate_site_header_merge' => 'key', - '_generate_site_header_height' => 'number', - '_generate_site_header_height_mobile' => 'number', - '_generate_navigation_colors' => 'key', - '_generate_site_logo' => 'number', - '_generate_retina_logo' => 'number', - '_generate_navigation_logo' => 'number', - '_generate_mobile_logo' => 'number', - '_generate_navigation_location' => 'key', - '_generate_site_header_background_color' => 'text', - '_generate_site_header_title_color' => 'text', - '_generate_site_header_tagline_color' => 'text', - '_generate_navigation_background_color' => 'text', - '_generate_navigation_text_color' => 'text', - '_generate_navigation_background_color_hover' => 'text', - '_generate_navigation_text_color_hover' => 'text', - '_generate_navigation_background_color_current' => 'text', - '_generate_navigation_text_color_current' => 'text', - ); - - foreach ( $hero_values as $key => $type ) { - $value = false; - - if ( isset( $_POST[ $key ] ) ) { - if ( 'number' === $type ) { - $value = absint( $_POST[ $key ] ); - } elseif ( 'key' === $type ) { - $value = sanitize_key( $_POST[ $key ] ); - } elseif ( 'attribute' === $type ) { - $value = esc_attr( $_POST[ $key ] ); - } else { - $value = sanitize_text_field( $_POST[ $key ] ); - } - } - - if ( - '_generate_hero_padding_top_mobile' === $key || - '_generate_hero_padding_right_mobile' === $key || - '_generate_hero_padding_bottom_mobile' === $key || - '_generate_hero_padding_left_mobile' === $key - ) { - if ( '0' === $_POST[ $key ] ) { - $value = 'zero'; - } - } - - if ( $value ) { - if ( 'zero' === $value ) { - $value = '0'; // String on purpose. - } - - update_post_meta( $post_id, $key, $value ); - } else { - delete_post_meta( $post_id, $key ); - } - } - } - - // Save Layout type. - if ( 'layout' === $type_value ) { - $layout_values = array( - '_generate_sidebar_layout' => 'key', - '_generate_footer_widgets' => 'key', - '_generate_disable_site_header' => 'key', - '_generate_disable_mobile_header' => 'key', - '_generate_disable_top_bar' => 'key', - '_generate_disable_primary_navigation' => 'key', - '_generate_disable_secondary_navigation' => 'key', - '_generate_disable_featured_image' => 'key', - '_generate_disable_content_title' => 'key', - '_generate_disable_footer' => 'key', - '_generate_content_area' => 'key', - '_generate_content_width' => 'number', - ); - - foreach ( $layout_values as $key => $type ) { - $value = false; - - if ( isset( $_POST[ $key ] ) ) { - if ( 'number' === $type ) { - $value = absint( $_POST[ $key ] ); - } elseif ( 'key' === $type ) { - $value = sanitize_key( $_POST[ $key ] ); - } else { - $value = sanitize_text_field( $_POST[ $key ] ); - } - } - - if ( $value ) { - update_post_meta( $post_id, $key, $value ); - } else { - delete_post_meta( $post_id, $key ); - } - } - } - - $ignore_languages = false; - - if ( isset( $_POST['_generate_element_ignore_languages'] ) ) { - $ignore_languages = sanitize_key( $_POST['_generate_element_ignore_languages'] ); - } - - if ( $ignore_languages ) { - update_post_meta( $post_id, '_generate_element_ignore_languages', $ignore_languages ); - } else { - delete_post_meta( $post_id, '_generate_element_ignore_languages' ); - } - - // Display conditions. - $conditions = get_post_meta( $post_id, '_generate_element_display_conditions', true ); - $new_conditions = array(); - - $rules = $_POST['display-condition']; - $objects = $_POST['display-condition-object']; - - $count = count( $rules ); - - for ( $i = 0; $i < $count; $i++ ) { - if ( '' !== $rules[ $i ] ) { - if ( in_array( $rules[ $i ], $rules ) ) { - $new_conditions[ $i ]['rule'] = sanitize_text_field( $rules[ $i ] ); - $new_conditions[ $i ]['object'] = sanitize_key( $objects[ $i ] ); - } else { - $new_conditions[ $i ]['rule'] = ''; - $new_conditions[ $i ]['object'] = ''; - } - } - } - - if ( 'block' === $type_value ) { - $dynamic_css_posts = get_option( 'generateblocks_dynamic_css_posts', array() ); - - if ( $dynamic_css_posts ) { - foreach ( $new_conditions as $condition ) { - if ( $condition['object'] && isset( $dynamic_css_posts[ $condition['object'] ] ) ) { - unset( $dynamic_css_posts[ $condition['object'] ] ); - } - - if ( ! $condition['object'] ) { - $dynamic_css_posts = array(); - break; - } - } - - update_option( 'generateblocks_dynamic_css_posts', $dynamic_css_posts ); - } - } - - if ( ! empty( $new_conditions ) && $new_conditions !== $conditions ) { - update_post_meta( $post_id, '_generate_element_display_conditions', $new_conditions ); - } elseif ( empty( $new_conditions ) && $conditions ) { - delete_post_meta( $post_id, '_generate_element_display_conditions', $conditions ); - } - - // Exclude conditions. - $exclude_conditions = get_post_meta( $post_id, '_generate_element_exclude_conditions', true ); - $new_exclude_conditions = array(); - - $exclude_rules = $_POST['exclude-condition']; - $exclude_objects = $_POST['exclude-condition-object']; - - $exclude_count = count( $exclude_rules ); - - for ( $i = 0; $i < $exclude_count; $i++ ) { - if ( '' !== $exclude_rules[ $i ] ) { - if ( in_array( $exclude_rules[ $i ], $exclude_rules ) ) { - $new_exclude_conditions[ $i ]['rule'] = sanitize_text_field( $exclude_rules[ $i ] ); - $new_exclude_conditions[ $i ]['object'] = sanitize_key( $exclude_objects[ $i ] ); - } else { - $new_exclude_conditions[ $i ]['rule'] = ''; - $new_exclude_conditions[ $i ]['object'] = ''; - } - } - } - - if ( ! empty( $new_exclude_conditions ) && $new_exclude_conditions !== $exclude_conditions ) { - update_post_meta( $post_id, '_generate_element_exclude_conditions', $new_exclude_conditions ); - } elseif ( empty( $new_exclude_conditions ) && $exclude_conditions ) { - delete_post_meta( $post_id, '_generate_element_exclude_conditions', $exclude_conditions ); - } - - // User conditions. - $user_conditions = get_post_meta( $post_id, '_generate_element_user_conditions', true ); - $new_user_conditions = array(); - - $user_rules = $_POST['user-condition']; - $user_count = count( $user_rules ); - - for ( $i = 0; $i < $user_count; $i++ ) { - if ( '' !== $user_rules[ $i ] ) { - if ( in_array( $user_rules[ $i ], $user_rules ) ) { - $new_user_conditions[ $i ] = sanitize_text_field( $user_rules[ $i ] ); - } else { - $new_user_conditions[ $i ] = ''; - } - } - } - - if ( ! empty( $new_user_conditions ) && $new_user_conditions !== $user_conditions ) { - update_post_meta( $post_id, '_generate_element_user_conditions', $new_user_conditions ); - } elseif ( empty( $new_user_conditions ) && $user_conditions ) { - delete_post_meta( $post_id, '_generate_element_user_conditions', $user_conditions ); - } - - // Internal notes. - $notes_key = '_generate_element_internal_notes'; - - if ( isset( $_POST[ $notes_key ] ) ) { - if ( function_exists( 'sanitize_textarea_field' ) ) { - $notes_value = sanitize_textarea_field( $_POST[ $notes_key ] ); - } else { - $notes_value = sanitize_text_field( $_POST[ $notes_key ] ); - } - - if ( $notes_value ) { - update_post_meta( $post_id, $notes_key, $notes_value ); - } else { - delete_post_meta( $post_id, $notes_key ); - } - } - } - - /** - * Get terms of a set taxonomy. - * - * @since 1.7 - */ - public function get_terms() { - check_ajax_referer( 'generate-elements-location', 'nonce' ); - - $current_user_can = 'manage_options'; - - if ( apply_filters( 'generate_elements_metabox_ajax_allow_editors', false ) ) { - $current_user_can = 'edit_posts'; - } - - if ( ! current_user_can( $current_user_can ) ) { - return; - } - - if ( ! isset( $_POST['id'] ) ) { - return; - } - - $tax_id = sanitize_text_field( $_POST['id'] ); - - echo wp_json_encode( self::get_taxonomy_terms( $tax_id ) ); - - die(); - } - - /** - * Get all posts inside a specific post type. - * - * @since 1.7 - */ - public function get_posts() { - check_ajax_referer( 'generate-elements-location', 'nonce' ); - - $current_user_can = 'manage_options'; - - if ( apply_filters( 'generate_elements_metabox_ajax_allow_editors', false ) ) { - $current_user_can = 'edit_posts'; - } - - if ( ! current_user_can( $current_user_can ) ) { - return; - } - - if ( ! isset( $_POST['id'] ) ) { - return; - } - - $post_type = sanitize_text_field( $_POST['id'] ); - - echo wp_json_encode( self::get_post_type_posts( $post_type ) ); - - die(); - } - - /** - * Get all of our posts and terms in one go on load. - * - * @since 2.0.0 - */ - public function get_all_objects() { - check_ajax_referer( 'generate-elements-location', 'nonce' ); - - $current_user_can = 'manage_options'; - - if ( apply_filters( 'generate_elements_metabox_ajax_allow_editors', false ) ) { - $current_user_can = 'edit_posts'; - } - - if ( ! current_user_can( $current_user_can ) ) { - return; - } - - if ( ! isset( $_POST['posts'] ) && ! isset( $_POST['terms'] ) ) { - return; - } - - $posts = array(); - $terms = array(); - - if ( ! empty( $_POST['posts'] ) ) { - $posts = array_map( 'sanitize_text_field', $_POST['posts'] ); - } - - if ( ! empty( $_POST['terms'] ) ) { - $terms = array_map( 'sanitize_text_field', $_POST['terms'] ); - } - - $all_posts = self::get_post_type_posts( $posts ); - $all_terms = self::get_taxonomy_terms( $terms ); - - echo wp_json_encode( array_merge( $all_posts, $all_terms ) ); - - die(); - } - - /** - * Look up posts inside a post type. - * - * @since 1.7 - * - * @param string|array $post_type The post type to look up. - * @return array - */ - public static function get_post_type_posts( $post_type ) { - if ( ! is_array( $post_type ) ) { - $post_type = array( $post_type ); - } - - $data = array(); - - foreach ( $post_type as $type ) { - global $wpdb; - - $post_status = array( 'publish', 'future', 'draft', 'pending', 'private' ); - - $object = get_post_type_object( $type ); - - $data[ $type ] = array( - 'type' => 'posts', - 'postType' => $type, - 'label' => $object->label, - 'objects' => array(), - ); - - if ( 'attachment' === $type ) { - $posts = $wpdb->get_results( $wpdb->prepare( "SELECT ID, post_title from $wpdb->posts where post_type = %s ORDER BY post_title", $type ) ); - - } else { - $format = implode( ', ', array_fill( 0, count( $post_status ), '%s' ) ); - $query = sprintf( "SELECT ID, post_title from $wpdb->posts where post_type = '%s' AND post_status IN(%s) ORDER BY post_title", $type, $format ); - // @codingStandardsIgnoreLine - $posts = $wpdb->get_results( $wpdb->prepare( $query, $post_status ) ); - } - - foreach ( $posts as $post ) { - $title = ( '' !== $post->post_title ) ? esc_attr( $post->post_title ) : $type . '-' . $post->ID; - $data[ $type ]['objects'][] = array( - 'id' => $post->ID, - 'name' => $title, - ); - } - } - - return $data; - } - - /** - * Get taxonomy terms for a specific taxonomy. - * - * @since 1.7 - * - * @param int|array $tax_id The taxonomy ID. - * @return array - */ - public static function get_taxonomy_terms( $tax_id ) { - if ( ! is_array( $tax_id ) ) { - $tax_id = array( $tax_id ); - } - - $data = array(); - - foreach ( $tax_id as $id ) { - $tax = get_taxonomy( $id ); - - $terms = get_terms( - array( - 'taxonomy' => $id, - 'hide_empty' => false, - ) - ); - - $data[ $id ] = array( - 'type' => 'terms', - 'taxonomy' => $id, - 'label' => $tax->label, - 'objects' => array(), - ); - - foreach ( $terms as $term ) { - $data[ $id ]['objects'][] = array( - 'id' => $term->term_id, - 'name' => esc_attr( $term->name ), - ); - } - } - - return $data; - } - - /** - * Build our entire list of hooks to display. - * - * @since 1.7 - * - * @return array Our list of hooks. - */ - public static function get_available_hooks() { - return GeneratePress_Elements_Helper::get_available_hooks(); - } - - /** - * Add available template tags to Header Elements. - * - * @since 1.7 - */ - public static function template_tags() { - ?> - -

- -

- - -

- -

- - -

- -

- - -

- -

- - -

- -

- _x( 'Elements', 'Post Type General Name', 'gp-premium' ), - 'singular_name' => _x( 'Element', 'Post Type Singular Name', 'gp-premium' ), - 'menu_name' => __( 'Elements', 'gp-premium' ), - 'all_items' => __( 'All Elements', 'gp-premium' ), - 'add_new' => __( 'Add New Element', 'gp-premium' ), - 'add_new_item' => __( 'Add New Element', 'gp-premium' ), - 'new_item' => __( 'New Element', 'gp-premium' ), - 'edit_item' => __( 'Edit Element', 'gp-premium' ), - 'update_item' => __( 'Update Element', 'gp-premium' ), - 'search_items' => __( 'Search Element', 'gp-premium' ), - 'featured_image' => __( 'Background Image', 'gp-premium' ), - 'set_featured_image' => __( 'Set background image', 'gp-premium' ), - 'remove_featured_image' => __( 'Remove background image', 'gp-premium' ), - 'item_published' => __( 'Element published.', 'gp-premium' ), - 'item_updated' => __( 'Element updated.', 'gp-premium' ), - 'item_scheduled' => __( 'Element scheduled.', 'gp-premium' ), - 'item_reverted_to_draft' => __( 'Element reverted to draft.', 'gp-premium' ), - ); - - $args = array( - 'labels' => $labels, - 'supports' => array( 'title', 'editor', 'thumbnail', 'custom-fields', 'page-attributes', 'revisions' ), - 'hierarchical' => true, - 'public' => false, - 'show_ui' => true, - 'show_in_menu' => false, - 'can_export' => true, - 'has_archive' => false, - 'exclude_from_search' => true, - 'show_in_rest' => true, - ); - - register_post_type( 'gp_elements', $args ); - } - - /** - * Disable editor and show_in_rest support for non-Block Elements. - * - * @since 1.11.0 - * @param array $args The existing args. - * @param string $post_type The current post type. - */ - public function set_standard_element( $args, $post_type ) { - if ( 'gp_elements' === $post_type ) { - $post_id = false; - $type = false; - - if ( isset( $_GET['post'] ) ) { // phpcs:ignore -- No processing happening. - $post_id = absint( $_GET['post'] ); // phpcs:ignore -- No processing happening. - } - - if ( $post_id ) { - $type = get_post_meta( $post_id, '_generate_element_type', true ); - } elseif ( isset( $_GET['element_type'] ) ) { // phpcs:ignore -- No processing happening. - $type = esc_html( $_GET['element_type'] ); // phpcs:ignore -- No processing happening. - } - - if ( ! $type ) { - return $args; - } - - if ( 'block' !== $type ) { - $args['supports'] = array( 'title', 'thumbnail' ); - $args['show_in_rest'] = false; - $args['hierarchical'] = false; - } - - if ( 'block' === $type ) { - $args['supports'] = array( 'title', 'editor', 'custom-fields', 'page-attributes', 'revisions' ); - } - - if ( 'layout' === $type ) { - $args['labels']['add_new_item'] = __( 'Add New Layout', 'gp-premium' ); - $args['labels']['edit_item'] = __( 'Edit Layout', 'gp-premium' ); - } - - if ( 'hook' === $type ) { - $args['labels']['add_new_item'] = __( 'Add New Hook', 'gp-premium' ); - $args['labels']['edit_item'] = __( 'Edit Hook', 'gp-premium' ); - } - - if ( 'header' === $type ) { - $args['labels']['add_new_item'] = __( 'Add New Header', 'gp-premium' ); - $args['labels']['edit_item'] = __( 'Edit Header', 'gp-premium' ); - } - } - - return $args; - } - - /** - * Register custom post type columns. - * - * @since 1.7 - * - * @param array $columns Existing CPT columns. - * @return array All our CPT columns. - */ - public function register_columns( $columns ) { - $columns['element_type'] = esc_html__( 'Type', 'gp-premium' ); - $columns['location'] = esc_html__( 'Location', 'gp-premium' ); - $columns['exclusions'] = esc_html__( 'Exclusions', 'gp-premium' ); - $columns['users'] = esc_html__( 'Users', 'gp-premium' ); - - $new_columns = array(); - - // Need to do some funky stuff to display these columns before the date. - foreach ( $columns as $key => $value ) { - if ( 'date' === $key ) { - $new_columns['element_type'] = esc_html__( 'Type', 'gp-premium' ); - $new_columns['location'] = esc_html__( 'Location', 'gp-premium' ); - $new_columns['exclusions'] = esc_html__( 'Exclusions', 'gp-premium' ); - $new_columns['users'] = esc_html__( 'Users', 'gp-premium' ); - } - - $new_columns[ $key ] = $value; - } - - return $new_columns; - } - - /** - * Add a filter select input to the admin list. - * - * @since 1.7 - */ - public function build_element_type_filter() { - $screen = function_exists( 'get_current_screen' ) ? get_current_screen() : false; - - if ( ! $screen ) { - return; - } - - if ( ! isset( $screen->post_type ) || 'gp_elements' !== $screen->post_type ) { - return; - } - - $values = array( - 'block' => esc_html__( 'Blocks', 'gp-premium' ), - 'header' => esc_html__( 'Headers', 'gp-premium' ), - 'hook' => esc_html__( 'Hooks', 'gp-premium' ), - 'layout' => esc_html__( 'Layouts', 'gp-premium' ), - ); - - $current_element_type = isset( $_GET['gp_element_type_filter'] ) ? esc_html( $_GET['gp_element_type_filter'] ) : ''; // phpcs:ignore -- No processing happening. - $current_block_type = isset( $_GET['gp_elements_block_type_filter'] ) ? esc_html( $_GET['gp_elements_block_type_filter'] ) : ''; // phpcs:ignore -- No processing happening. - ?> - - - - is_main_query() && '' !== $type ) { - $meta_query[] = array( - 'key' => '_generate_element_type', - 'value' => esc_attr( $type ), - 'compare' => '=', - ); - - $block_type = isset( $_GET['gp_elements_block_type_filter'] ) ? $_GET['gp_elements_block_type_filter'] : ''; // phpcs:ignore -- No processing happening. - - if ( 'block' === $type && '' !== $block_type ) { - $meta_query['relation'] = 'AND'; - - $meta_query[] = array( - 'key' => '_generate_block_type', - 'value' => esc_attr( $block_type ), - 'compare' => '=', - ); - } - - $query->set( 'meta_query', $meta_query ); - } - } - - /** - * Add content to our custom post type columns. - * - * @since 1.7 - * - * @param string $column The name of the column. - * @param int $post_id The ID of the post row. - */ - public function add_columns( $column, $post_id ) { - switch ( $column ) { - case 'element_type': - $type = get_post_meta( $post_id, '_generate_element_type', true ); - $hook_location = get_post_meta( $post_id, '_generate_hook', true ); - - if ( 'block' === $type ) { - echo esc_html__( 'Block', 'gp-premium' ); - - $block_type = get_post_meta( $post_id, '_generate_block_type', true ); - - if ( $block_type ) { - echo ' - ' . esc_html( GeneratePress_Elements_Helper::get_element_type_label( $block_type ) ); - - if ( 'hook' === $block_type && $hook_location ) { - echo '
'; - - if ( 'custom' === $hook_location ) { - $custom_hook = get_post_meta( $post_id, '_generate_custom_hook', true ); - echo '' . esc_html( $custom_hook ) . ''; - } else { - echo '' . esc_html( $hook_location ) . ''; - } - } - } - } - - if ( 'header' === $type ) { - echo esc_html__( 'Header', 'gp-premium' ); - } - - if ( 'hook' === $type ) { - echo esc_html__( 'Hook', 'gp-premium' ); - - if ( $hook_location ) { - echo '
'; - - if ( 'custom' === $hook_location ) { - $custom_hook = get_post_meta( $post_id, '_generate_custom_hook', true ); - echo '' . esc_html( $custom_hook ) . ''; - } else { - echo '' . esc_html( $hook_location ) . ''; - } - } - } - - if ( 'layout' === $type ) { - echo esc_html__( 'Layout', 'gp-premium' ); - } - break; - - case 'location': - $location = get_post_meta( $post_id, '_generate_element_display_conditions', true ); - $parent_block = wp_get_post_parent_id( $post_id ); - - if ( $location ) { - foreach ( (array) $location as $data ) { - echo esc_html( GeneratePress_Conditions::get_saved_label( $data ) ); - echo '
'; - } - } elseif ( ! empty( $parent_block ) ) { - echo esc_html__( 'Inherit from parent', 'gp-premium' ); - } else { - echo esc_html__( 'Not set', 'gp-premium' ); - } - break; - - case 'exclusions': - $location = get_post_meta( $post_id, '_generate_element_exclude_conditions', true ); - - if ( $location ) { - foreach ( (array) $location as $data ) { - echo esc_html( GeneratePress_Conditions::get_saved_label( $data ) ); - echo '
'; - } - } - break; - - case 'users': - $users = get_post_meta( $post_id, '_generate_element_user_conditions', true ); - - if ( $users ) { - foreach ( (array) $users as $data ) { - if ( strpos( $data, ':' ) !== false ) { - $data = substr( $data, strpos( $data, ':' ) + 1 ); - } - - $return = ucwords( str_replace( '_', ' ', $data ) ); - - echo esc_html( $return ) . '
'; - } - } - break; - } - } - - /** - * Create our admin menu item. - * - * @since 1.7 - */ - public function menu_item() { - add_submenu_page( - 'themes.php', - esc_html__( 'Elements', 'gp-premium' ), - esc_html__( 'Elements', 'gp-premium' ), - apply_filters( 'generate_elements_admin_menu_capability', 'manage_options' ), - 'edit.php?post_type=gp_elements' - ); - } - - /** - * Make sure our admin menu item is highlighted. - * - * @since 1.7 - */ - public function fix_current_item() { - global $parent_file, $submenu_file, $post_type; - - if ( 'gp_elements' === $post_type ) { - $parent_file = 'themes.php'; // phpcs:ignore - $submenu_file = 'edit.php?post_type=gp_elements'; // phpcs:ignore - } - } - - /** - * Add scripts to the edit/post area of Elements. - * - * @since 1.11.0 - * @param string $hook The current hook for the page. - */ - public function admin_scripts( $hook ) { - if ( ! function_exists( 'get_current_screen' ) ) { - return; - } - - $current_screen = get_current_screen(); - - if ( 'edit.php' === $hook || 'post.php' === $hook ) { - if ( 'gp_elements' === $current_screen->post_type ) { - wp_enqueue_script( 'generate-elements', plugin_dir_url( __FILE__ ) . 'assets/admin/elements.js', array( 'jquery' ), GP_PREMIUM_VERSION, true ); - wp_enqueue_style( 'generate-elements', plugin_dir_url( __FILE__ ) . 'assets/admin/elements.css', array(), GP_PREMIUM_VERSION ); - } - } - } - - /** - * Build the Add New Element modal. - * - * @since 1.11.0 - */ - public function element_modal() { - if ( ! function_exists( 'get_current_screen' ) ) { - return; - } - - $current_screen = get_current_screen(); - - if ( 'edit-gp_elements' === $current_screen->id || 'gp_elements' === $current_screen->id ) { - ?> - - 'gp_elements', - 'no_found_rows' => true, - 'post_status' => 'publish', - 'numberposts' => 500, // phpcs:ignore - 'fields' => 'ids', - 'suppress_filters' => false, - ); - - $custom_args = apply_filters( - 'generate_elements_custom_args', - array( - 'order' => 'ASC', - ) - ); - - $args = array_merge( $args, $custom_args ); - - // Prevent Polylang from altering the query. - if ( function_exists( 'pll_get_post_language' ) ) { - $args['lang'] = ''; - } - - $posts = get_posts( $args ); - - foreach ( $posts as $post_id ) { - $post_id = apply_filters( 'generate_element_post_id', $post_id ); - $type = get_post_meta( $post_id, '_generate_element_type', true ); - - if ( 'hook' === $type ) { - new GeneratePress_Hook( $post_id ); - } - - if ( 'header' === $type && ! GeneratePress_Hero::$instances ) { - new GeneratePress_Hero( $post_id ); - } - - if ( 'layout' === $type ) { - new GeneratePress_Site_Layout( $post_id ); - } - - if ( 'block' === $type ) { - new GeneratePress_Block_Element( $post_id ); - } - } -} - -add_filter( 'generate_dashboard_tabs', 'generate_elements_dashboard_tab' ); -/** - * Add the Sites tab to our Dashboard tabs. - * - * @since 1.6 - * - * @param array $tabs Existing tabs. - * @return array New tabs. - */ -function generate_elements_dashboard_tab( $tabs ) { - $screen = get_current_screen(); - - $tabs['Elements'] = array( - 'name' => __( 'Elements', 'gp-premium' ), - 'url' => admin_url( 'edit.php?post_type=gp_elements' ), - 'class' => 'edit-gp_elements' === $screen->id ? 'active' : '', - ); - - return $tabs; -} - -add_filter( 'generate_dashboard_screens', 'generate_elements_dashboard_screen' ); -/** - * Add the Sites tab to our Dashboard screens. - * - * @since 2.1.0 - * - * @param array $screens Existing screens. - * @return array New screens. - */ -function generate_elements_dashboard_screen( $screens ) { - $screens[] = 'edit-gp_elements'; - - return $screens; -} - -add_filter( 'generate_element_post_id', 'generate_elements_ignore_languages' ); -/** - * Disable Polylang elements if their language doesn't match. - * We disable their automatic quering so Elements with no language display by default. - * - * @since 1.8 - * - * @param int $post_id The current post ID. - * @return bool|int - */ -function generate_elements_ignore_languages( $post_id ) { - if ( function_exists( 'pll_get_post_language' ) && function_exists( 'pll_current_language' ) ) { - $language = pll_get_post_language( $post_id, 'locale' ); - $disable = get_post_meta( $post_id, '_generate_element_ignore_languages', true ); - - if ( $disable ) { - return $post_id; - } - - if ( $language && $language !== pll_current_language( 'locale' ) ) { // phpcs:ignore -- Using Yoda check I am. - return false; - } - } - - return $post_id; -} - -add_action( 'save_post_wp_block', 'generate_elements_wp_block_update', 10, 2 ); -/** - * Regenerate the GenerateBlocks CSS file when a re-usable block is saved. - * - * @since 1.11.0 - * @param int $post_id The post ID. - * @param object $post The post object. - */ -function generate_elements_wp_block_update( $post_id, $post ) { - $is_autosave = wp_is_post_autosave( $post_id ); - $is_revision = wp_is_post_revision( $post_id ); - - if ( $is_autosave || $is_revision || ! current_user_can( 'edit_post', $post_id ) ) { - return $post_id; - } - - if ( isset( $post->post_content ) ) { - if ( strpos( $post->post_content, 'wp:generateblocks' ) !== false ) { - global $wpdb; - - $option = get_option( 'generateblocks_dynamic_css_posts', array() ); - - $posts = $wpdb->get_col( "SELECT post_id FROM $wpdb->postmeta WHERE meta_key = '_generateblocks_reusable_blocks'" ); - - foreach ( (array) $posts as $id ) { - $display_conditions = get_post_meta( $id, '_generate_element_display_conditions', true ); - - if ( $display_conditions ) { - foreach ( (array) $display_conditions as $condition ) { - if ( 'general:site' === $condition['rule'] ) { - $option = array(); - break; - } - - if ( $condition['object'] && isset( $option[ $condition['object'] ] ) ) { - unset( $option[ $condition['object'] ] ); - } - } - } - } - - update_option( 'generateblocks_dynamic_css_posts', $option ); - } - } - -} - -add_filter( 'generate_do_block_element_content', 'generate_add_block_element_content_filters' ); -/** - * Apply content filters to our block elements. - * - * @since 1.11.0 - * @param string $content The block element content. - */ -function generate_add_block_element_content_filters( $content ) { - $content = shortcode_unautop( $content ); - $content = do_shortcode( $content ); - - if ( function_exists( 'wp_filter_content_tags' ) ) { - $content = wp_filter_content_tags( $content ); - } elseif ( function_exists( 'wp_make_content_images_responsive' ) ) { - $content = wp_make_content_images_responsive( $content ); - } - - return $content; -} - -add_action( 'admin_bar_menu', 'generate_add_elements_admin_bar', 100 ); -/** - * Add the Elementd admin bar item. - * - * @since 2.0.0 - */ -function generate_add_elements_admin_bar() { - $current_user_can = 'manage_options'; - - if ( apply_filters( 'generate_elements_metabox_ajax_allow_editors', false ) ) { - $current_user_can = 'edit_posts'; - } - - if ( ! current_user_can( $current_user_can ) ) { - return; - } - - global $wp_admin_bar; - global $generate_elements; - - $title = __( 'Elements', 'gp-premium' ); - $count = ! empty( $generate_elements ) ? count( $generate_elements ) : 0; - - // Prevent "Entire Site" Elements from being counted on non-edit pages in the admin. - if ( is_admin() && function_exists( 'get_current_screen' ) ) { - $screen = get_current_screen(); - - if ( ! isset( $screen->is_block_editor ) || ! $screen->is_block_editor ) { - $count = 0; - } - - if ( 'edit' !== $screen->parent_base ) { - $count = 0; - } - } - - if ( $count > 0 ) { - $title = sprintf( - /* translators: Active Element count. */ - __( 'Elements (%s)', 'gp-premium' ), - $count - ); - } - - $wp_admin_bar->add_menu( - array( - 'id' => 'gp_elements-menu', - 'title' => $title, - 'href' => esc_url( admin_url( 'edit.php?post_type=gp_elements' ) ), - ) - ); - - if ( ! empty( $generate_elements ) ) { - // Prevent "Entire Site" Elements from being counted on non-edit pages in the admin. - if ( is_admin() && function_exists( 'get_current_screen' ) ) { - $screen = get_current_screen(); - - if ( ! isset( $screen->is_block_editor ) || ! $screen->is_block_editor ) { - return; - } - - if ( 'edit' !== $screen->parent_base ) { - return; - } - } - - foreach ( (array) $generate_elements as $key => $data ) { - $label = GeneratePress_Elements_Helper::get_element_type_label( $data['type'] ); - - $wp_admin_bar->add_menu( - array( - 'id' => 'element-' . absint( $data['id'] ), - 'parent' => 'gp_elements-menu', - 'title' => get_the_title( $data['id'] ) . ' (' . $label . ')', - 'href' => get_edit_post_link( $data['id'] ), - ) - ); - } - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/general/class-external-file-css.php b/wp-content/upgrade-temp-backup/plugins/gp-premium/general/class-external-file-css.php deleted file mode 100644 index 9f59b66c..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/general/class-external-file-css.php +++ /dev/null @@ -1,449 +0,0 @@ -register_control_type( 'GeneratePress_Action_Button_Control' ); - } - - $wp_customize->add_setting( - 'generate_settings[css_print_method]', - array( - 'default' => $defaults['css_print_method'], - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_choices', - ) - ); - - $wp_customize->add_control( - 'generate_settings[css_print_method]', - array( - 'type' => 'select', - 'label' => __( 'Dynamic CSS Print Method', 'gp-premium' ), - 'description' => __( 'Generating your dynamic CSS in an external file offers significant performance advantages.', 'gp-premium' ), - 'section' => 'generate_general_section', - 'choices' => array( - 'inline' => __( 'Inline Embedding', 'gp-premium' ), - 'file' => __( 'External File', 'gp-premium' ), - ), - 'settings' => 'generate_settings[css_print_method]', - ) - ); - - $wp_customize->add_control( - new GeneratePress_Action_Button_Control( - $wp_customize, - 'generate_regenerate_external_css_file', - array( - 'section' => 'generate_general_section', - 'data_type' => 'regenerate_external_css', - 'nonce' => esc_html( wp_create_nonce( 'generatepress_regenerate_css_file' ) ), - 'label' => __( 'Regenerate CSS File', 'gp-premium' ), - 'settings' => ( isset( $wp_customize->selective_refresh ) ) ? array() : 'blogname', - 'active_callback' => 'generate_is_using_external_css_file_callback', - ) - ) - ); - } - - /** - * Set our CSS Print Method. - * - * @param string $method The existing method. - */ - public function set_print_method( $method ) { - if ( ! function_exists( 'generate_get_option' ) ) { - return $method; - } - - return generate_get_option( 'css_print_method' ); - } - - /** - * Determine if we're using file mode or inline mode. - */ - public function mode() { - $mode = generate_get_css_print_method(); - - if ( 'file' === $mode && $this->needs_update() ) { - $data = get_option( 'generatepress_dynamic_css_data', array() ); - - if ( ! isset( $data['updated_time'] ) ) { - // No time set, so set the current time minus 5 seconds so the file is still generated. - $data['updated_time'] = time() - 5; - update_option( 'generatepress_dynamic_css_data', $data ); - } - - // Only allow processing 1 file every 5 seconds. - $current_time = (int) time(); - $last_time = (int) $data['updated_time']; - - if ( 5 <= ( $current_time - $last_time ) ) { - - // Attempt to write to the file. - $mode = ( $this->can_write() && $this->make_css() ) ? 'file' : 'inline'; - - // Does again if the file exists. - if ( 'file' === $mode ) { - $mode = ( file_exists( $this->file( 'path' ) ) ) ? 'file' : 'inline'; - } - } - } - - return $mode; - } - - /** - * Set things up. - */ - public function init() { - if ( 'file' === $this->mode() ) { - add_filter( 'generate_using_dynamic_css_external_file', '__return_true' ); - add_filter( 'generate_dynamic_css_skip_cache', '__return_true', 20 ); - - // Remove inline CSS in GP < 3.0.0. - if ( ! function_exists( 'generate_get_dynamic_css' ) && function_exists( 'generate_enqueue_dynamic_css' ) ) { - remove_action( 'wp_enqueue_scripts', 'generate_enqueue_dynamic_css', 50 ); - } - } - } - - /** - * Enqueue the dynamic CSS. - */ - public function enqueue_dynamic_css() { - if ( 'file' === $this->mode() ) { - wp_enqueue_style( 'generatepress-dynamic', esc_url( $this->file( 'uri' ) ), array( 'generate-style' ), null ); // phpcs:ignore WordPress.WP.EnqueuedResourceParameters.MissingVersion - - // Move the child theme after our dynamic stylesheet. - if ( is_child_theme() && wp_style_is( 'generate-child', 'enqueued' ) ) { - wp_dequeue_style( 'generate-child' ); - wp_enqueue_style( 'generate-child' ); - } - - // Re-add no-cache CSS in GP < 3.0.0. - if ( ! function_exists( 'generate_get_dynamic_css' ) && function_exists( 'generate_no_cache_dynamic_css' ) ) { - $nocache_css = generate_no_cache_dynamic_css(); - - if ( function_exists( 'generate_do_icon_css' ) ) { - $nocache_css .= generate_do_icon_css(); - } - - wp_add_inline_style( 'generate-style', wp_strip_all_tags( $nocache_css ) ); - } - } - } - - /** - * Make our CSS. - */ - public function make_css() { - $content = ''; - - if ( function_exists( 'generate_get_dynamic_css' ) ) { - $content = generate_get_dynamic_css(); - } elseif ( function_exists( 'generate_base_css' ) && function_exists( 'generate_font_css' ) && function_exists( 'generate_advanced_css' ) && function_exists( 'generate_spacing_css' ) ) { - $content = generate_base_css() . generate_font_css() . generate_advanced_css() . generate_spacing_css(); - } - - $content = apply_filters( 'generate_external_dynamic_css_output', $content ); - - if ( ! $content ) { - return false; - } - - $filesystem = generate_premium_get_wp_filesystem(); - - if ( ! $filesystem ) { - return false; - } - - // Take care of domain mapping. - if ( defined( 'DOMAIN_MAPPING' ) && DOMAIN_MAPPING ) { - if ( function_exists( 'domain_mapping_siteurl' ) && function_exists( 'get_original_url' ) ) { - $mapped_domain = domain_mapping_siteurl( false ); - $original_domain = get_original_url( 'siteurl' ); - - $content = str_replace( $original_domain, $mapped_domain, $content ); - } - } - - if ( is_writable( $this->file( 'path' ) ) || ( ! file_exists( $this->file( 'path' ) ) && is_writable( dirname( $this->file( 'path' ) ) ) ) ) { - $chmod_file = 0644; - - if ( defined( 'FS_CHMOD_FILE' ) ) { - $chmod_file = FS_CHMOD_FILE; - } - - if ( ! $filesystem->put_contents( $this->file( 'path' ), wp_strip_all_tags( $content ), $chmod_file ) ) { - - // Fail! - return false; - - } else { - - $this->update_saved_time(); - - // Success! - return true; - - } - } - } - - /** - * Determines if the CSS file is writable. - */ - public function can_write() { - global $blog_id; - - // Get the upload directory for this site. - $upload_dir = wp_get_upload_dir(); - - // If this is a multisite installation, append the blogid to the filename. - $css_blog_id = ( is_multisite() && $blog_id > 1 ) ? '_blog-' . $blog_id : null; - - $file_name = '/style' . $css_blog_id . '.min.css'; - $folder_path = $upload_dir['basedir'] . DIRECTORY_SEPARATOR . 'generatepress'; - - // Does the folder exist? - if ( file_exists( $folder_path ) ) { - // Folder exists, but is the folder writable? - if ( ! is_writable( $folder_path ) ) { - // Folder is not writable. - // Does the file exist? - if ( ! file_exists( $folder_path . $file_name ) ) { - // File does not exist, therefore it can't be created - // since the parent folder is not writable. - return false; - } else { - // File exists, but is it writable? - if ( ! is_writable( $folder_path . $file_name ) ) { - // Nope, it's not writable. - return false; - } - } - } else { - // The folder is writable. - // Does the file exist? - if ( file_exists( $folder_path . $file_name ) ) { - // File exists. - // Is it writable? - if ( ! is_writable( $folder_path . $file_name ) ) { - // Nope, it's not writable. - return false; - } - } - } - } else { - // Can we create the folder? - // returns true if yes and false if not. - return wp_mkdir_p( $folder_path ); - } - - // all is well! - return true; - } - - /** - * Gets the css path or url to the stylesheet - * - * @param string $target path/url. - */ - public function file( $target = 'path' ) { - global $blog_id; - - // Get the upload directory for this site. - $upload_dir = wp_get_upload_dir(); - - // If this is a multisite installation, append the blogid to the filename. - $css_blog_id = ( is_multisite() && $blog_id > 1 ) ? '_blog-' . $blog_id : null; - - $file_name = 'style' . $css_blog_id . '.min.css'; - $folder_path = $upload_dir['basedir'] . DIRECTORY_SEPARATOR . 'generatepress'; - - // The complete path to the file. - $file_path = $folder_path . DIRECTORY_SEPARATOR . $file_name; - - // Get the URL directory of the stylesheet. - $css_uri_folder = $upload_dir['baseurl']; - - $css_uri = trailingslashit( $css_uri_folder ) . 'generatepress/' . $file_name; - - // Take care of domain mapping. - if ( defined( 'DOMAIN_MAPPING' ) && DOMAIN_MAPPING ) { - if ( function_exists( 'domain_mapping_siteurl' ) && function_exists( 'get_original_url' ) ) { - $mapped_domain = domain_mapping_siteurl( false ); - $original_domain = get_original_url( 'siteurl' ); - $css_uri = str_replace( $original_domain, $mapped_domain, $css_uri ); - } - } - - $css_uri = set_url_scheme( $css_uri ); - - if ( 'path' === $target ) { - return $file_path; - } elseif ( 'url' === $target || 'uri' === $target ) { - $timestamp = ( file_exists( $file_path ) ) ? '?ver=' . filemtime( $file_path ) : ''; - return $css_uri . $timestamp; - } - } - - /** - * Update the our updated file time. - */ - public function update_saved_time() { - $data = get_option( 'generatepress_dynamic_css_data', array() ); - $data['updated_time'] = time(); - - update_option( 'generatepress_dynamic_css_data', $data ); - } - - /** - * Delete the saved time. - */ - public function delete_saved_time() { - $data = get_option( 'generatepress_dynamic_css_data', array() ); - - if ( isset( $data['updated_time'] ) ) { - unset( $data['updated_time'] ); - } - - update_option( 'generatepress_dynamic_css_data', $data ); - } - - /** - * Update our plugin/theme versions. - */ - public function update_versions() { - $data = get_option( 'generatepress_dynamic_css_data', array() ); - - $data['theme_version'] = GENERATE_VERSION; - $data['plugin_version'] = GP_PREMIUM_VERSION; - - update_option( 'generatepress_dynamic_css_data', $data ); - } - - /** - * Do we need to update the CSS file? - */ - public function needs_update() { - $data = get_option( 'generatepress_dynamic_css_data', array() ); - $update = false; - - // If there's no updated time, needs update. - // The time is set in mode(). - if ( ! isset( $data['updated_time'] ) ) { - $update = true; - } - - // If we haven't set our versions, do so now. - if ( ! isset( $data['theme_version'] ) && ! isset( $data['plugin_version'] ) ) { - $update = true; - $this->update_versions(); - - // Bail early so we don't check undefined versions below. - return $update; - } - - // Version numbers have changed, needs update. - if ( (string) GENERATE_VERSION !== (string) $data['theme_version'] || (string) GP_PREMIUM_VERSION !== (string) $data['plugin_version'] ) { - $update = true; - $this->update_versions(); - } - - return $update; - } - - /** - * Regenerate the CSS file. - */ - public function regenerate_css_file() { - check_ajax_referer( 'generatepress_regenerate_css_file', '_nonce' ); - - if ( ! current_user_can( 'manage_options' ) ) { - wp_send_json_error( __( 'Security check failed.', 'gp-premium' ) ); - } - - $this->delete_saved_time(); - - wp_send_json_success(); - } -} - -GeneratePress_External_CSS_File::get_instance(); diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/general/enqueue-scripts.php b/wp-content/upgrade-temp-backup/plugins/gp-premium/general/enqueue-scripts.php deleted file mode 100644 index a9108a61..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/general/enqueue-scripts.php +++ /dev/null @@ -1,81 +0,0 @@ - $data ) { - $type = esc_html( GeneratePress_Elements_Helper::get_element_type_label( $data['type'] ) ); - - $active_elements[] = array( - 'type' => $type, - 'name' => get_the_title( $data['id'] ), - 'url' => get_edit_post_link( $data['id'] ), - ); - } - } - - $post_type_is_public = false; - - if ( get_post_type() ) { - $post_type = get_post_type_object( get_post_type() ); - - if ( is_object( $post_type ) && ! empty( $post_type->public ) ) { - $post_type_is_public = true; - } - } - - wp_localize_script( - 'gp-premium-editor', - 'gpPremiumEditor', - array( - 'isBlockElement' => 'gp_elements' === get_post_type(), - 'activeElements' => $active_elements, - 'elementsUrl' => esc_url( admin_url( 'edit.php?post_type=gp_elements' ) ), - 'postTypeIsPublic' => $post_type_is_public, - ) - ); - - wp_enqueue_style( - 'gp-premium-editor', - GP_PREMIUM_DIR_URL . 'dist/editor.css', - array( 'wp-edit-blocks' ), - filemtime( GP_PREMIUM_DIR_PATH . 'dist/editor.css' ) - ); -} diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/general/icons.php b/wp-content/upgrade-temp-backup/plugins/gp-premium/general/icons.php deleted file mode 100644 index 1b587f4c..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/general/icons.php +++ /dev/null @@ -1,87 +0,0 @@ - - - - - - '; - } - - if ( 'shopping-cart' === $icon ) { - $svg = ''; - } - - if ( 'shopping-basket' === $icon ) { - $svg = ''; - } - - if ( 'spinner' === $icon ) { - $svg = ''; - } - - if ( 'pro-menu-bars' === $icon ) { - $svg = ''; - } - - if ( 'pro-close' === $icon ) { - $svg = ''; - } - - if ( $svg ) { - $output = sprintf( - ' - %2$s - ', - $icon, - $svg - ); - } - - return $output; -} diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/general/icons/gp-premium.eot b/wp-content/upgrade-temp-backup/plugins/gp-premium/general/icons/gp-premium.eot deleted file mode 100644 index 72d97394..00000000 Binary files a/wp-content/upgrade-temp-backup/plugins/gp-premium/general/icons/gp-premium.eot and /dev/null differ diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/general/icons/gp-premium.svg b/wp-content/upgrade-temp-backup/plugins/gp-premium/general/icons/gp-premium.svg deleted file mode 100644 index e1c517d0..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/general/icons/gp-premium.svg +++ /dev/null @@ -1,20 +0,0 @@ - - - -Generated by IcoMoon - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/general/icons/gp-premium.ttf b/wp-content/upgrade-temp-backup/plugins/gp-premium/general/icons/gp-premium.ttf deleted file mode 100644 index 4bae85f6..00000000 Binary files a/wp-content/upgrade-temp-backup/plugins/gp-premium/general/icons/gp-premium.ttf and /dev/null differ diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/general/icons/gp-premium.woff b/wp-content/upgrade-temp-backup/plugins/gp-premium/general/icons/gp-premium.woff deleted file mode 100644 index 01c2cc17..00000000 Binary files a/wp-content/upgrade-temp-backup/plugins/gp-premium/general/icons/gp-premium.woff and /dev/null differ diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/general/icons/icons.css b/wp-content/upgrade-temp-backup/plugins/gp-premium/general/icons/icons.css deleted file mode 100644 index be13090e..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/general/icons/icons.css +++ /dev/null @@ -1,10 +0,0 @@ -@font-face { - font-family: 'GP Premium'; - src: url('gp-premium.eot'); - src: url('gp-premium.eot#iefix') format('embedded-opentype'), - url('gp-premium.woff') format('woff'), - url('gp-premium.ttf') format('truetype'), - url('gp-premium.svg#gp-premium') format('svg'); - font-weight: normal; - font-style: normal; -} diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/general/icons/icons.min.css b/wp-content/upgrade-temp-backup/plugins/gp-premium/general/icons/icons.min.css deleted file mode 100644 index 442a46bd..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/general/icons/icons.min.css +++ /dev/null @@ -1 +0,0 @@ -@font-face{font-family:'GP Premium';src:url(gp-premium.eot);src:url(gp-premium.eot#iefix) format('embedded-opentype'),url(gp-premium.woff) format('woff'),url(gp-premium.ttf) format('truetype'),url(gp-premium.svg#gp-premium) format('svg');font-weight:400;font-style:normal} \ No newline at end of file diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/general/js/smooth-scroll.js b/wp-content/upgrade-temp-backup/plugins/gp-premium/general/js/smooth-scroll.js deleted file mode 100644 index c2a8a5f7..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/general/js/smooth-scroll.js +++ /dev/null @@ -1,743 +0,0 @@ -/*! - * smooth-scroll v14.2.1: Animate scrolling to anchor links - * (c) 2018 Chris Ferdinandi - * MIT License - * http://github.com/cferdinandi/smooth-scroll - */ - -/** - * closest() polyfill - * @link https://developer.mozilla.org/en-US/docs/Web/API/Element/closest#Polyfill - */ -if (window.Element && !Element.prototype.closest) { - Element.prototype.closest = function(s) { - var matches = (this.document || this.ownerDocument).querySelectorAll(s), - i, - el = this; - do { - i = matches.length; - while (--i >= 0 && matches.item(i) !== el) {} - } while ((i < 0) && (el = el.parentElement)); - return el; - }; -} - -/** - * CustomEvent() polyfill - * https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent/CustomEvent#Polyfill - */ -(function () { - - if (typeof window.CustomEvent === "function") return false; - - function CustomEvent(event, params) { - params = params || { bubbles: false, cancelable: false, detail: undefined }; - var evt = document.createEvent('CustomEvent'); - evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail); - return evt; - } - - CustomEvent.prototype = window.Event.prototype; - - window.CustomEvent = CustomEvent; -})(); -/** - * requestAnimationFrame() polyfill - * By Erik Möller. Fixes from Paul Irish and Tino Zijdel. - * @link http://paulirish.com/2011/requestanimationframe-for-smart-animating/ - * @link http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating - * @license MIT - */ -(function() { - var lastTime = 0; - var vendors = ['ms', 'moz', 'webkit', 'o']; - for(var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) { - window.requestAnimationFrame = window[vendors[x]+'RequestAnimationFrame']; - window.cancelAnimationFrame = window[vendors[x]+'CancelAnimationFrame'] || - window[vendors[x]+'CancelRequestAnimationFrame']; - } - - if (!window.requestAnimationFrame) { - window.requestAnimationFrame = function(callback, element) { - var currTime = new Date().getTime(); - var timeToCall = Math.max(0, 16 - (currTime - lastTime)); - var id = window.setTimeout((function() { callback(currTime + timeToCall); }), - timeToCall); - lastTime = currTime + timeToCall; - return id; - }; - } - - if (!window.cancelAnimationFrame) { - window.cancelAnimationFrame = function(id) { - clearTimeout(id); - }; - } -}()); - -(function (root, factory) { - if (typeof define === 'function' && define.amd) { - define([], (function () { - return factory(root); - })); - } else if (typeof exports === 'object') { - module.exports = factory(root); - } else { - root.SmoothScroll = factory(root); - } -})(typeof global !== 'undefined' ? global : typeof window !== 'undefined' ? window : this, (function (window) { - - 'use strict'; - - // - // Default settings - // - - var defaults = { - // Selectors - ignore: '[data-scroll-ignore]', - header: null, - topOnEmptyHash: true, - - // Speed & Easing - speed: 500, - clip: true, - offset: 0, - easing: 'easeInOutCubic', - customEasing: null, - - // History - updateURL: true, - popstate: true, - - // Custom Events - emitEvents: true - }; - - - // - // Utility Methods - // - - /** - * Check if browser supports required methods - * @return {Boolean} Returns true if all required methods are supported - */ - var supports = function () { - return ( - 'querySelector' in document && - 'addEventListener' in window && - 'requestAnimationFrame' in window && - 'closest' in window.Element.prototype - ); - }; - - /** - * Merge two or more objects. Returns a new object. - * @param {Object} objects The objects to merge together - * @returns {Object} Merged values of defaults and options - */ - var extend = function () { - - // Variables - var extended = {}; - - // Merge the object into the extended object - var merge = function (obj) { - for (var prop in obj) { - if (obj.hasOwnProperty(prop)) { - extended[prop] = obj[prop]; - } - } - }; - - // Loop through each object and conduct a merge - for (var i = 0; i < arguments.length; i++) { - merge(arguments[i]); - } - - return extended; - - }; - - /** - * Check to see if user prefers reduced motion - * @param {Object} settings Script settings - */ - var reduceMotion = function (settings) { - if ('matchMedia' in window && window.matchMedia('(prefers-reduced-motion)').matches) { - return true; - } - return false; - }; - - /** - * Get the height of an element. - * @param {Node} elem The element to get the height of - * @return {Number} The element's height in pixels - */ - var getHeight = function (elem) { - return parseInt(window.getComputedStyle(elem).height, 10); - }; - - /** - * Decode a URI, with error check - * @param {String} hash The URI to decode - * @return {String} A decoded URI (or the original string if an error is thrown) - */ - var decode = function (hash) { - var decoded; - try { - decoded = decodeURIComponent(hash); - } catch(e) { - decoded = hash; - } - return decoded; - }; - - /** - * Escape special characters for use with querySelector - * @author Mathias Bynens - * @link https://github.com/mathiasbynens/CSS.escape - * @param {String} id The anchor ID to escape - */ - var escapeCharacters = function (id) { - - // Remove leading hash - if (id.charAt(0) === '#') { - id = id.substr(1); - } - - var string = String(id); - var length = string.length; - var index = -1; - var codeUnit; - var result = ''; - var firstCodeUnit = string.charCodeAt(0); - while (++index < length) { - codeUnit = string.charCodeAt(index); - // Note: there’s no need to special-case astral symbols, surrogate - // pairs, or lone surrogates. - - // If the character is NULL (U+0000), then throw an - // `InvalidCharacterError` exception and terminate these steps. - if (codeUnit === 0x0000) { - throw new InvalidCharacterError( - 'Invalid character: the input contains U+0000.' - ); - } - - if ( - // If the character is in the range [\1-\1F] (U+0001 to U+001F) or is - // U+007F, […] - (codeUnit >= 0x0001 && codeUnit <= 0x001F) || codeUnit == 0x007F || - // If the character is the first character and is in the range [0-9] - // (U+0030 to U+0039), […] - (index === 0 && codeUnit >= 0x0030 && codeUnit <= 0x0039) || - // If the character is the second character and is in the range [0-9] - // (U+0030 to U+0039) and the first character is a `-` (U+002D), […] - ( - index === 1 && - codeUnit >= 0x0030 && codeUnit <= 0x0039 && - firstCodeUnit === 0x002D - ) - ) { - // http://dev.w3.org/csswg/cssom/#escape-a-character-as-code-point - result += '\\' + codeUnit.toString(16) + ' '; - continue; - } - - // If the character is not handled by one of the above rules and is - // greater than or equal to U+0080, is `-` (U+002D) or `_` (U+005F), or - // is in one of the ranges [0-9] (U+0030 to U+0039), [A-Z] (U+0041 to - // U+005A), or [a-z] (U+0061 to U+007A), […] - if ( - codeUnit >= 0x0080 || - codeUnit === 0x002D || - codeUnit === 0x005F || - codeUnit >= 0x0030 && codeUnit <= 0x0039 || - codeUnit >= 0x0041 && codeUnit <= 0x005A || - codeUnit >= 0x0061 && codeUnit <= 0x007A - ) { - // the character itself - result += string.charAt(index); - continue; - } - - // Otherwise, the escaped character. - // http://dev.w3.org/csswg/cssom/#escape-a-character - result += '\\' + string.charAt(index); - - } - - // Return sanitized hash - var hash; - try { - hash = decodeURIComponent('#' + result); - } catch(e) { - hash = '#' + result; - } - return hash; - - }; - - /** - * Calculate the easing pattern - * @link https://gist.github.com/gre/1650294 - * @param {String} type Easing pattern - * @param {Number} time Time animation should take to complete - * @returns {Number} - */ - var easingPattern = function (settings, time) { - var pattern; - - // Default Easing Patterns - if (settings.easing === 'easeInQuad') pattern = time * time; // accelerating from zero velocity - if (settings.easing === 'easeOutQuad') pattern = time * (2 - time); // decelerating to zero velocity - if (settings.easing === 'easeInOutQuad') pattern = time < 0.5 ? 2 * time * time : -1 + (4 - 2 * time) * time; // acceleration until halfway, then deceleration - if (settings.easing === 'easeInCubic') pattern = time * time * time; // accelerating from zero velocity - if (settings.easing === 'easeOutCubic') pattern = (--time) * time * time + 1; // decelerating to zero velocity - if (settings.easing === 'easeInOutCubic') pattern = time < 0.5 ? 4 * time * time * time : (time - 1) * (2 * time - 2) * (2 * time - 2) + 1; // acceleration until halfway, then deceleration - if (settings.easing === 'easeInQuart') pattern = time * time * time * time; // accelerating from zero velocity - if (settings.easing === 'easeOutQuart') pattern = 1 - (--time) * time * time * time; // decelerating to zero velocity - if (settings.easing === 'easeInOutQuart') pattern = time < 0.5 ? 8 * time * time * time * time : 1 - 8 * (--time) * time * time * time; // acceleration until halfway, then deceleration - if (settings.easing === 'easeInQuint') pattern = time * time * time * time * time; // accelerating from zero velocity - if (settings.easing === 'easeOutQuint') pattern = 1 + (--time) * time * time * time * time; // decelerating to zero velocity - if (settings.easing === 'easeInOutQuint') pattern = time < 0.5 ? 16 * time * time * time * time * time : 1 + 16 * (--time) * time * time * time * time; // acceleration until halfway, then deceleration - - // Custom Easing Patterns - if (!!settings.customEasing) pattern = settings.customEasing(time); - - return pattern || time; // no easing, no acceleration - }; - - /** - * Determine the document's height - * @returns {Number} - */ - var getDocumentHeight = function () { - return Math.max( - document.body.scrollHeight, document.documentElement.scrollHeight, - document.body.offsetHeight, document.documentElement.offsetHeight, - document.body.clientHeight, document.documentElement.clientHeight - ); - }; - - /** - * Calculate how far to scroll - * Clip support added by robjtede - https://github.com/cferdinandi/smooth-scroll/issues/405 - * @param {Element} anchor The anchor element to scroll to - * @param {Number} headerHeight Height of a fixed header, if any - * @param {Number} offset Number of pixels by which to offset scroll - * @param {Boolean} clip If true, adjust scroll distance to prevent abrupt stops near the bottom of the page - * @returns {Number} - */ - var getEndLocation = function (anchor, headerHeight, offset, clip) { - var location = 0; - if (anchor.offsetParent) { - do { - location += anchor.offsetTop; - anchor = anchor.offsetParent; - } while (anchor); - } - location = Math.max(location - headerHeight - offset, 0); - if (clip) { - location = Math.min(location, getDocumentHeight() - window.innerHeight); - } - return location; - }; - - /** - * Get the height of the fixed header - * @param {Node} header The header - * @return {Number} The height of the header - */ - var getHeaderHeight = function (header) { - return !header ? 0 : (getHeight(header) + header.offsetTop); - }; - - /** - * Update the URL - * @param {Node} anchor The anchor that was scrolled to - * @param {Boolean} isNum If true, anchor is a number - * @param {Object} options Settings for Smooth Scroll - */ - var updateURL = function (anchor, isNum, options) { - - // Bail if the anchor is a number - if (isNum) return; - - // Verify that pushState is supported and the updateURL option is enabled - if (!history.pushState || !options.updateURL) return; - - // Update URL - history.pushState( - { - smoothScroll: JSON.stringify(options), - anchor: anchor.id - }, - document.title, - anchor === document.documentElement ? '#top' : '#' + anchor.id - ); - - }; - - /** - * Bring the anchored element into focus - * @param {Node} anchor The anchor element - * @param {Number} endLocation The end location to scroll to - * @param {Boolean} isNum If true, scroll is to a position rather than an element - */ - var adjustFocus = function (anchor, endLocation, isNum) { - - // Is scrolling to top of page, blur - if (anchor === 0) { - document.body.focus(); - } - - // Don't run if scrolling to a number on the page - if (isNum) return; - - // Otherwise, bring anchor element into focus - anchor.focus(); - if (document.activeElement !== anchor) { - anchor.setAttribute('tabindex', '-1'); - anchor.focus(); - anchor.style.outline = 'none'; - } - window.scrollTo(0 , endLocation); - - }; - - /** - * Emit a custom event - * @param {String} type The event type - * @param {Object} options The settings object - * @param {Node} anchor The anchor element - * @param {Node} toggle The toggle element - */ - var emitEvent = function (type, options, anchor, toggle) { - if (!options.emitEvents || typeof window.CustomEvent !== 'function') return; - var event = new CustomEvent(type, { - bubbles: true, - detail: { - anchor: anchor, - toggle: toggle - } - }); - document.dispatchEvent(event); - }; - - - // - // SmoothScroll Constructor - // - - var SmoothScroll = function (selector, options) { - - // - // Variables - // - - var smoothScroll = {}; // Object for public APIs - var settings, anchor, toggle, fixedHeader, headerHeight, eventTimeout, animationInterval; - - - // - // Methods - // - - /** - * Cancel a scroll-in-progress - */ - smoothScroll.cancelScroll = function (noEvent) { - cancelAnimationFrame(animationInterval); - animationInterval = null; - if (noEvent) return; - emitEvent('scrollCancel', settings); - }; - - /** - * Start/stop the scrolling animation - * @param {Node|Number} anchor The element or position to scroll to - * @param {Element} toggle The element that toggled the scroll event - * @param {Object} options - */ - smoothScroll.animateScroll = function (anchor, toggle, options) { - - // Local settings - var animateSettings = extend(settings || defaults, options || {}); // Merge user options with defaults - - // Selectors and variables - var isNum = Object.prototype.toString.call(anchor) === '[object Number]' ? true : false; - var anchorElem = isNum || !anchor.tagName ? null : anchor; - if (!isNum && !anchorElem) return; - var startLocation = window.pageYOffset; // Current location on the page - if (animateSettings.header && !fixedHeader) { - // Get the fixed header if not already set - fixedHeader = document.querySelector(animateSettings.header); - } - if (!headerHeight) { - // Get the height of a fixed header if one exists and not already set - headerHeight = getHeaderHeight(fixedHeader); - } - var endLocation = isNum ? anchor : getEndLocation(anchorElem, headerHeight, parseInt((typeof animateSettings.offset === 'function' ? animateSettings.offset(anchor, toggle) : animateSettings.offset), 10), animateSettings.clip); // Location to scroll to - var distance = endLocation - startLocation; // distance to travel - var documentHeight = getDocumentHeight(); - var timeLapsed = 0; - var start, percentage, position; - - /** - * Stop the scroll animation when it reaches its target (or the bottom/top of page) - * @param {Number} position Current position on the page - * @param {Number} endLocation Scroll to location - * @param {Number} animationInterval How much to scroll on this loop - */ - var stopAnimateScroll = function (position, endLocation) { - - // Get the current location - var currentLocation = window.pageYOffset; - - // Check if the end location has been reached yet (or we've hit the end of the document) - if (position == endLocation || currentLocation == endLocation || ((startLocation < endLocation && window.innerHeight + currentLocation) >= documentHeight)) { - - // Clear the animation timer - smoothScroll.cancelScroll(true); - - // Bring the anchored element into focus - adjustFocus(anchor, endLocation, isNum); - - // Emit a custom event - emitEvent('scrollStop', animateSettings, anchor, toggle); - - // Reset start - start = null; - animationInterval = null; - - return true; - - } - }; - - /** - * Loop scrolling animation - */ - var loopAnimateScroll = function (timestamp) { - if (!start) { start = timestamp; } - timeLapsed += timestamp - start; - percentage = (timeLapsed / parseInt(animateSettings.speed, 10)); - percentage = (percentage > 1) ? 1 : percentage; - position = startLocation + (distance * easingPattern(animateSettings, percentage)); - window.scrollTo(0, Math.floor(position)); - if (!stopAnimateScroll(position, endLocation)) { - animationInterval = window.requestAnimationFrame(loopAnimateScroll); - start = timestamp; - } - }; - - /** - * Reset position to fix weird iOS bug - * @link https://github.com/cferdinandi/smooth-scroll/issues/45 - */ - if (window.pageYOffset === 0) { - window.scrollTo(0, 0); - } - - // Update the URL - updateURL(anchor, isNum, animateSettings); - - // Emit a custom event - emitEvent('scrollStart', animateSettings, anchor, toggle); - - // Start scrolling animation - smoothScroll.cancelScroll(true); - window.requestAnimationFrame(loopAnimateScroll); - - }; - - /** - * If smooth scroll element clicked, animate scroll - */ - var clickHandler = function (event) { - - // Don't run if the user prefers reduced motion - if (reduceMotion(settings)) return; - - // Don't run if right-click or command/control + click - if (event.button !== 0 || event.metaKey || event.ctrlKey) return; - - // Check if event.target has closest() method - // By @totegi - https://github.com/cferdinandi/smooth-scroll/pull/401/ - if(!('closest' in event.target))return; - - // Check if a smooth scroll link was clicked - toggle = event.target.closest(selector); - if (!toggle || toggle.tagName.toLowerCase() !== 'a' || event.target.closest(settings.ignore)) return; - - // Only run if link is an anchor and points to the current page - if (toggle.hostname !== window.location.hostname || toggle.pathname !== window.location.pathname || !/#/.test(toggle.href)) return; - - // Get an escaped version of the hash - var hash = escapeCharacters(decode(toggle.hash)); - - // Get the anchored element - var anchor = settings.topOnEmptyHash && hash === '#' ? document.documentElement : document.querySelector(hash); - anchor = !anchor && hash === '#top' ? document.documentElement : anchor; - - // If anchored element exists, scroll to it - if (!anchor) return; - event.preventDefault(); - smoothScroll.animateScroll(anchor, toggle); - - }; - - /** - * Animate scroll on popstate events - */ - var popstateHandler = function (event) { - // Stop if history.state doesn't exist (ex. if clicking on a broken anchor link). - // fixes `Cannot read property 'smoothScroll' of null` error getting thrown. - if (history.state === null) return; - - // Only run if state is a popstate record for this instantiation - if (!history.state.smoothScroll || history.state.smoothScroll !== JSON.stringify(settings)) return; - - // Only run if state includes an anchor - if (!history.state.anchor) return; - - // Get the anchor - var anchor = document.querySelector(escapeCharacters(decode(history.state.anchor))); - if (!anchor) return; - - // Animate scroll to anchor link - smoothScroll.animateScroll(anchor, null, {updateURL: false}); - - }; - - /** - * On window scroll and resize, only run events at a rate of 15fps for better performance - */ - var resizeThrottler = function (event) { - if (!eventTimeout) { - eventTimeout = setTimeout((function() { - eventTimeout = null; // Reset timeout - headerHeight = getHeaderHeight(fixedHeader); // Get the height of a fixed header if one exists - }), 66); - } - }; - - /** - * Destroy the current initialization. - */ - smoothScroll.destroy = function () { - - // If plugin isn't already initialized, stop - if (!settings) return; - - // Remove event listeners - document.removeEventListener('click', clickHandler, false); - window.removeEventListener('resize', resizeThrottler, false); - window.removeEventListener('popstate', popstateHandler, false); - - // Cancel any scrolls-in-progress - smoothScroll.cancelScroll(); - - // Reset variables - settings = null; - anchor = null; - toggle = null; - fixedHeader = null; - headerHeight = null; - eventTimeout = null; - animationInterval = null; - - }; - - /** - * Initialize Smooth Scroll - * @param {Object} options User settings - */ - smoothScroll.init = function (options) { - - // feature test - if (!supports()) throw 'Smooth Scroll: This browser does not support the required JavaScript methods and browser APIs.'; - - // Destroy any existing initializations - smoothScroll.destroy(); - - // Selectors and variables - settings = extend(defaults, options || {}); // Merge user options with defaults - fixedHeader = settings.header ? document.querySelector(settings.header) : null; // Get the fixed header - headerHeight = getHeaderHeight(fixedHeader); - - // When a toggle is clicked, run the click handler - document.addEventListener('click', clickHandler, false); - - // If window is resized and there's a fixed header, recalculate its size - if (fixedHeader) { - window.addEventListener('resize', resizeThrottler, false); - } - - // If updateURL and popState are enabled, listen for pop events - if (settings.updateURL && settings.popstate) { - window.addEventListener('popstate', popstateHandler, false); - } - - }; - - - // - // Initialize plugin - // - - smoothScroll.init(options); - - - // - // Public APIs - // - - return smoothScroll; - - }; - - return SmoothScroll; - -})); - -/* GP */ -var gpscroll = new SmoothScroll( gpSmoothScroll.elements.join(), { - speed: gpSmoothScroll.duration, - offset: function( anchor, toggle ) { - var body = document.body, - nav = document.querySelector( '#site-navigation' ), - stickyNav = document.querySelector( '#sticky-navigation' ), - mobileHeader = document.querySelector( '#mobile-header' ), - menuToggle = document.querySelector( '.menu-toggle' ), - offset = 0; - - if ( mobileHeader && ( mobileHeader.offsetWidth || mobileHeader.offsetHeight || mobileHeader.getClientRects().length ) ) { - if ( body.classList.contains( 'mobile-header-sticky' ) ) { - offset = offset + mobileHeader.clientHeight; - } - } else if ( menuToggle && ( menuToggle.offsetWidth || menuToggle.offsetHeight || menuToggle.getClientRects().length ) ) { - if ( body.classList.contains( 'both-sticky-menu' ) || body.classList.contains( 'mobile-sticky-menu' ) ) { - if ( stickyNav ) { - offset = offset + stickyNav.clientHeight; - } else if ( nav ) { - offset = offset + nav.clientHeight; - } - } - } else if ( body.classList.contains( 'both-sticky-menu' ) || body.classList.contains( 'desktop-sticky-menu' ) ) { - if ( stickyNav ) { - offset = offset + stickyNav.clientHeight; - } else if ( nav ) { - offset = offset + nav.clientHeight; - } - } - - return gpSmoothScroll.offset - ? gpSmoothScroll.offset - : offset; - } -} ); diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/general/js/smooth-scroll.min.js b/wp-content/upgrade-temp-backup/plugins/gp-premium/general/js/smooth-scroll.min.js deleted file mode 100644 index 9fbd8c4e..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/general/js/smooth-scroll.min.js +++ /dev/null @@ -1 +0,0 @@ -window.Element&&!Element.prototype.closest&&(Element.prototype.closest=function(e){var t,n=(this.document||this.ownerDocument).querySelectorAll(e),o=this;do{for(t=n.length;0<=--t&&n.item(t)!==o;);}while(t<0&&(o=o.parentElement));return o}),function(){function e(e,t){t=t||{bubbles:!1,cancelable:!1,detail:void 0};var n=document.createEvent("CustomEvent");return n.initCustomEvent(e,t.bubbles,t.cancelable,t.detail),n}"function"!=typeof window.CustomEvent&&(e.prototype=window.Event.prototype,window.CustomEvent=e)}(),function(){for(var r=0,e=["ms","moz","webkit","o"],t=0;t=s)return S.cancelScroll(!0),e=t,n=p,0===(t=o)&&document.body.focus(),n||(t.focus(),document.activeElement!==t&&(t.setAttribute("tabindex","-1"),t.focus(),t.style.outline="none"),b.scrollTo(0,e)),C("scrollStop",h,o,i),!(w=l=null)},f=function(e){var t,n,o;m=(u+=e-(l=l||e))/parseInt(h.speed,10),m=r+c*(n=1 apply_filters( - 'generate_smooth_scroll_elements', - array( - '.smooth-scroll', - 'li.smooth-scroll a', - ) - ), - 'duration' => apply_filters( 'generate_smooth_scroll_duration', 800 ), - 'offset' => apply_filters( 'generate_smooth_scroll_offset', '' ), - ) - ); -} - -add_filter( 'generate_option_defaults', 'generate_smooth_scroll_default' ); -/** - * Add the smooth scroll option to our defaults. - * - * @since 1.6 - * - * @param array $defaults Existing defaults. - * @return array New defaults. - */ -function generate_smooth_scroll_default( $defaults ) { - $defaults['smooth_scroll'] = false; - - return $defaults; -} - -add_action( 'customize_register', 'generate_smooth_scroll_customizer', 99 ); -/** - * Add our smooth scroll option to the Customizer. - * - * @since 1.6 - * - * @param WP_Customize_Manager $wp_customize Theme Customizer object. - */ -function generate_smooth_scroll_customizer( $wp_customize ) { - if ( ! function_exists( 'generate_get_defaults' ) ) { - return; - } - - $defaults = generate_get_defaults(); - - require_once GP_LIBRARY_DIRECTORY . 'customizer-helpers.php'; - - $wp_customize->add_setting( - 'generate_settings[smooth_scroll]', - array( - 'default' => $defaults['smooth_scroll'], - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_checkbox', - ) - ); - - $wp_customize->add_control( - 'generate_settings[smooth_scroll]', - array( - 'type' => 'checkbox', - 'label' => __( 'Smooth scroll', 'gp-premium' ), - 'description' => __( 'Initiate smooth scroll on anchor links using the smooth-scroll class.', 'gp-premium' ), - 'section' => 'generate_general_section', - ) - ); -} diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/gp-premium.php b/wp-content/upgrade-temp-backup/plugins/gp-premium/gp-premium.php deleted file mode 100644 index 624b2f50..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/gp-premium.php +++ /dev/null @@ -1,307 +0,0 @@ -=' ) && ! defined( 'GENERATE_DISABLE_SITE_LIBRARY' ) ) { - require_once GP_PREMIUM_DIR_PATH . 'site-library/class-site-library-rest.php'; - require_once GP_PREMIUM_DIR_PATH . 'site-library/class-site-library-helper.php'; -} - -if ( is_admin() ) { - require_once GP_PREMIUM_DIR_PATH . 'inc/deprecated-admin.php'; - - if ( generatepress_is_module_active( 'generate_package_site_library', 'GENERATE_SITE_LIBRARY' ) && version_compare( PHP_VERSION, '5.4', '>=' ) && ! defined( 'GENERATE_DISABLE_SITE_LIBRARY' ) ) { - require_once GP_PREMIUM_DIR_PATH . 'site-library/class-site-library.php'; - } -} - -if ( ! function_exists( 'generate_premium_updater' ) ) { - add_action( 'admin_init', 'generate_premium_updater', 0 ); - /** - * Set up the updater - **/ - function generate_premium_updater() { - if ( ! class_exists( 'GeneratePress_Premium_Plugin_Updater' ) ) { - include GP_PREMIUM_DIR_PATH . 'library/class-plugin-updater.php'; - } - - $license_key = get_option( 'gen_premium_license_key' ); - - $edd_updater = new GeneratePress_Premium_Plugin_Updater( - 'https://generatepress.com', - __FILE__, - array( - 'version' => GP_PREMIUM_VERSION, - 'license' => trim( $license_key ), - 'item_name' => 'GP Premium', - 'author' => 'Tom Usborne', - 'url' => home_url(), - 'beta' => apply_filters( 'generate_premium_beta_tester', false ), - ) - ); - } -} - -add_filter( 'edd_sl_plugin_updater_api_params', 'generate_premium_set_updater_api_params', 10, 3 ); -/** - * Add the GeneratePress version to our updater params. - * - * @param array $api_params The array of data sent in the request. - * @param array $api_data The array of data set up in the class constructor. - * @param string $plugin_file The full path and filename of the file. - */ -function generate_premium_set_updater_api_params( $api_params, $api_data, $plugin_file ) { - /* - * Make sure $plugin_file matches your plugin's file path. You should have a constant for this - * or can use __FILE__ if this code goes in your plugin's main file. - */ - if ( __FILE__ === $plugin_file ) { - // Dynamically retrieve the current version number. - $api_params['generatepress_version'] = defined( 'GENERATE_VERSION' ) ? GENERATE_VERSION : ''; - } - - return $api_params; -} - -if ( ! function_exists( 'generate_premium_setup' ) ) { - add_action( 'after_setup_theme', 'generate_premium_setup' ); - /** - * Add useful functions to GP Premium - **/ - function generate_premium_setup() { - // This used to be in the theme but the WP.org review team asked for it to be removed. - // Not wanting people to have broken shortcodes in their widgets on update, I added it into premium. - add_filter( 'widget_text', 'do_shortcode' ); - } -} - -if ( ! function_exists( 'generate_premium_theme_information' ) ) { - add_action( 'admin_notices', 'generate_premium_theme_information' ); - /** - * Checks whether there's a theme update available and lets you know. - * Also checks to see if GeneratePress is the active theme. If not, tell them. - * - * @since 1.2.95 - **/ - function generate_premium_theme_information() { - $theme = wp_get_theme(); - - if ( 'GeneratePress' === $theme->name || 'generatepress' === $theme->template ) { - - // Get our information on updates. - // @see https://developer.wordpress.org/reference/functions/wp_prepare_themes_for_js/. - $updates = array(); - if ( current_user_can( 'update_themes' ) ) { - $updates_transient = get_site_transient( 'update_themes' ); - if ( isset( $updates_transient->response ) ) { - $updates = $updates_transient->response; - } - } - - $screen = get_current_screen(); - - // If a GeneratePress update exists, and we're not on the themes page. - // No need to tell people an update exists on the themes page, WP does that for us. - if ( isset( $updates['generatepress'] ) && 'themes' !== $screen->base ) { - printf( - '
-

%1$s %3$s

-
', - esc_html__( 'GeneratePress has an update available.', 'gp-premium' ), - esc_url( admin_url( 'themes.php' ) ), - esc_html__( 'Update now.', 'gp-premium' ) - ); - } - } else { - // GeneratePress isn't the active theme, let them know GP Premium won't work. - printf( - '
-

%1$s %2$s

-
', - esc_html__( 'GP Premium requires GeneratePress to be your active theme.', 'gp-premium' ), - esc_html__( 'Install now.', 'gp-premium' ), - esc_url( admin_url( 'theme-install.php?theme=generatepress' ) ) - ); - } - - } -} - -add_filter( 'plugin_action_links_' . plugin_basename( __FILE__ ), 'generate_add_configure_action_link' ); -/** - * Show a "Configure" link in the plugin action links. - * - * @since 1.3 - * @param array $links The existing plugin row links. - */ -function generate_add_configure_action_link( $links ) { - $configuration_link = '' . __( 'Configure', 'gp-premium' ) . ''; - - return array_merge( $links, array( $configuration_link ) ); -} - -add_action( 'admin_init', 'generatepress_deactivate_standalone_addons' ); -/** - * Deactivate any standalone add-ons if they're active. - * - * @since 1.3.1 - */ -function generatepress_deactivate_standalone_addons() { - $addons = array( - 'generate-backgrounds/generate-backgrounds.php', - 'generate-blog/generate-blog.php', - 'generate-colors/generate-colors.php', - 'generate-copyright/generate-copyright.php', - 'generate-disable-elements/generate-disable-elements.php', - 'generate-hooks/generate-hooks.php', - 'generate-ie/generate-ie.php', - 'generate-menu-plus/generate-menu-plus.php', - 'generate-page-header/generate-page-header.php', - 'generate-secondary-nav/generate-secondary-nav.php', - 'generate-sections/generate-sections.php', - 'generate-spacing/generate-spacing.php', - 'generate-typography/generate-fonts.php', - ); - - deactivate_plugins( $addons ); -} diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/hooks/functions/assets/css/hooks.css b/wp-content/upgrade-temp-backup/plugins/gp-premium/hooks/functions/assets/css/hooks.css deleted file mode 100644 index 5b981c5e..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/hooks/functions/assets/css/hooks.css +++ /dev/null @@ -1,59 +0,0 @@ -#gp_hooks_settings .form-table td, -#gp_hooks_settings .form-table th { - padding: 30px; - background: #FFF; - display: block; - width: 100%; - box-sizing: border-box; - margin-bottom: 0; -} - -#gp_hooks_settings .form-table th { - padding-bottom: 0; -} - -#gp_hooks_settings .form-table tr { - margin-bottom: 20px; - display: block; - max-width: 100%; - border: 1px solid #e5e5e5; - box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04); - box-sizing: border-box; -} - -.execute, div.disable { - background: none repeat scroll 0 0 #f1f1f1; - display: inline-block; - padding: 10px; - font-size: 14px; -} - -.admin-bar #gp_hooks_settings .sticky-scroll-box.fixed { - top: 52px; -} -#gp_hooks_settings .sticky-scroll-box.fixed { - position: fixed; - right: 18px; - top: 20px; -} - -.rtl #gp_hooks_settings .sticky-scroll-box.fixed { - position: fixed; - left: 18px; - right: auto; -} - -#gp_hooks_settings input[type="checkbox"] { - margin-top: 1px; - margin-right: 0px; -} - -#gp_hooks_settings .form-table { - margin-top: 0; -} - -.appearance_page_gp_hooks_settings #setting-error-true { - margin-left: 2px; - margin-right: 19px; - margin-top: 20px; -} \ No newline at end of file diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/hooks/functions/assets/js/admin.js b/wp-content/upgrade-temp-backup/plugins/gp-premium/hooks/functions/assets/js/admin.js deleted file mode 100644 index c4a41586..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/hooks/functions/assets/js/admin.js +++ /dev/null @@ -1,38 +0,0 @@ -jQuery(document).ready(function($) { - - jQuery('#hook-dropdown').on('change', function() { - var id = jQuery(this).children(":selected").attr("id"); - jQuery('#gp_hooks_settings .form-table tr').hide(); - jQuery('#gp_hooks_settings .form-table tr').eq(id).show(); - Cookies.set('remember_hook', $('#hook-dropdown option:selected').attr('id'), { expires: 90, path: '/'}); - - if ( jQuery('#hook-dropdown').val() == 'all' ) { - $('#gp_hooks_settings .form-table tr').show(); - Cookies.set('remember_hook', 'none', { expires: 90, path: '/'}); - } - - }); - - //checks if the cookie has been set - if( Cookies.get('remember_hook') === null || Cookies.get('remember_hook') === "" || Cookies.get('remember_hook') === "null" || Cookies.get('remember_hook') === "none" || Cookies.get('remember_hook') === undefined ) - { - $('#gp_hooks_settings .form-table tr').show(); - Cookies.set('remember_hook', 'none', { expires: 90, path: '/'}); - } else { - $('#hook-dropdown option[id="' + Cookies.get('remember_hook') + '"]').attr('selected', 'selected'); - $('#gp_hooks_settings .form-table tr').hide(); - $('#gp_hooks_settings .form-table tr').eq(Cookies.get('remember_hook')).show(); - } - - var top = $('.sticky-scroll-box').offset().top; - $(window).scroll(function (event) { - var y = $(this).scrollTop(); - if (y >= top) - $('.sticky-scroll-box').addClass('fixed'); - else - $('.sticky-scroll-box').removeClass('fixed'); - $('.sticky-scroll-box').width($('.sticky-scroll-box').parent().width()); - }); - -}); - diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/hooks/functions/assets/js/jquery.cookie.js b/wp-content/upgrade-temp-backup/plugins/gp-premium/hooks/functions/assets/js/jquery.cookie.js deleted file mode 100644 index e5733169..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/hooks/functions/assets/js/jquery.cookie.js +++ /dev/null @@ -1,165 +0,0 @@ -/*! - * JavaScript Cookie v2.1.3 - * https://github.com/js-cookie/js-cookie - * - * Copyright 2006, 2015 Klaus Hartl & Fagner Brack - * Released under the MIT license - */ -;(function (factory) { - var registeredInModuleLoader = false; - if (typeof define === 'function' && define.amd) { - define(factory); - registeredInModuleLoader = true; - } - if (typeof exports === 'object') { - module.exports = factory(); - registeredInModuleLoader = true; - } - if (!registeredInModuleLoader) { - var OldCookies = window.Cookies; - var api = window.Cookies = factory(); - api.noConflict = function () { - window.Cookies = OldCookies; - return api; - }; - } -}(function () { - function extend () { - var i = 0; - var result = {}; - for (; i < arguments.length; i++) { - var attributes = arguments[ i ]; - for (var key in attributes) { - result[key] = attributes[key]; - } - } - return result; - } - - function init (converter) { - function api (key, value, attributes) { - var result; - if (typeof document === 'undefined') { - return; - } - - // Write - - if (arguments.length > 1) { - attributes = extend({ - path: '/' - }, api.defaults, attributes); - - if (typeof attributes.expires === 'number') { - var expires = new Date(); - expires.setMilliseconds(expires.getMilliseconds() + attributes.expires * 864e+5); - attributes.expires = expires; - } - - // We're using "expires" because "max-age" is not supported by IE - attributes.expires = attributes.expires ? attributes.expires.toUTCString() : ''; - - try { - result = JSON.stringify(value); - if (/^[\{\[]/.test(result)) { - value = result; - } - } catch (e) {} - - if (!converter.write) { - value = encodeURIComponent(String(value)) - .replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g, decodeURIComponent); - } else { - value = converter.write(value, key); - } - - key = encodeURIComponent(String(key)); - key = key.replace(/%(23|24|26|2B|5E|60|7C)/g, decodeURIComponent); - key = key.replace(/[\(\)]/g, escape); - - var stringifiedAttributes = ''; - - for (var attributeName in attributes) { - if (!attributes[attributeName]) { - continue; - } - stringifiedAttributes += '; ' + attributeName; - if (attributes[attributeName] === true) { - continue; - } - stringifiedAttributes += '=' + attributes[attributeName]; - } - return (document.cookie = key + '=' + value + stringifiedAttributes); - } - - // Read - - if (!key) { - result = {}; - } - - // To prevent the for loop in the first place assign an empty array - // in case there are no cookies at all. Also prevents odd result when - // calling "get()" - var cookies = document.cookie ? document.cookie.split('; ') : []; - var rdecode = /(%[0-9A-Z]{2})+/g; - var i = 0; - - for (; i < cookies.length; i++) { - var parts = cookies[i].split('='); - var cookie = parts.slice(1).join('='); - - if (cookie.charAt(0) === '"') { - cookie = cookie.slice(1, -1); - } - - try { - var name = parts[0].replace(rdecode, decodeURIComponent); - cookie = converter.read ? - converter.read(cookie, name) : converter(cookie, name) || - cookie.replace(rdecode, decodeURIComponent); - - if (this.json) { - try { - cookie = JSON.parse(cookie); - } catch (e) {} - } - - if (key === name) { - result = cookie; - break; - } - - if (!key) { - result[name] = cookie; - } - } catch (e) {} - } - - return result; - } - - api.set = api; - api.get = function (key) { - return api.call(api, key); - }; - api.getJSON = function () { - return api.apply({ - json: true - }, [].slice.call(arguments)); - }; - api.defaults = {}; - - api.remove = function (key, attributes) { - api(key, '', extend(attributes, { - expires: -1 - })); - }; - - api.withConverter = init; - - return api; - } - - return init(function () {}); -})); \ No newline at end of file diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/hooks/functions/functions.php b/wp-content/upgrade-temp-backup/plugins/gp-premium/hooks/functions/functions.php deleted file mode 100644 index e0954f28..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/hooks/functions/functions.php +++ /dev/null @@ -1,542 +0,0 @@ - -

%1$s %2$s

- ', - esc_html__( 'DISALLOW_FILE_EDIT is defined. You should also disallow PHP execution in GP Hooks.', 'gp-premium' ), - esc_html__( 'Learn how', 'gp-premium' ) - ); - } - } -} - -if ( ! function_exists( 'generate_hooks_setup' ) ) { - function generate_hooks_setup() { - // Just to verify that we're activated. - } -} - -if ( ! class_exists( 'Generate_Hooks_Settings' ) ) { - class Generate_Hooks_Settings { - private $dir; - private $file; - private $assets_dir; - private $assets_url; - private $settings_base; - private $settings; - - public function __construct( $file ) { - $this->file = $file; - $this->dir = dirname( $this->file ); - $this->assets_dir = trailingslashit( $this->dir ) . 'assets'; - $this->assets_url = esc_url( trailingslashit( plugins_url( '/assets/', $this->file ) ) ); - $this->settings_base = ''; - - // Initialise settings - add_action( 'admin_init', array( $this, 'init' ) ); - - // Register plugin settings - add_action( 'admin_init' , array( $this, 'register_settings' ) ); - - // Add settings page to menu - add_action( 'admin_menu' , array( $this, 'add_menu_item' ) ); - - // Add settings link to plugins page - add_filter( 'plugin_action_links_' . plugin_basename( $this->file ) , array( $this, 'add_settings_link' ) ); - } - - /** - * Initialise settings - * @return void - */ - public function init() { - $this->settings = $this->settings_fields(); - } - - /** - * Add settings page to admin menu - * @return void - */ - public function add_menu_item() { - $page = add_theme_page( __( 'GP Hooks', 'gp-premium' ) , __( 'GP Hooks', 'gp-premium' ) , apply_filters( 'generate_hooks_capability','manage_options' ) , 'gp_hooks_settings' , array( $this, 'settings_page' ) ); - add_action( 'admin_print_styles-' . $page, array( $this, 'settings_assets' ) ); - } - - /** - * Load settings JS & CSS - * @return void - */ - public function settings_assets() { - wp_enqueue_script( 'gp-cookie', $this->assets_url . 'js/jquery.cookie.js', array( 'jquery' ), GENERATE_HOOKS_VERSION ); - wp_enqueue_script( 'gp-hooks', $this->assets_url . 'js/admin.js', array( 'jquery', 'gp-cookie' ), GENERATE_HOOKS_VERSION ); - wp_enqueue_style( 'gp-hooks', $this->assets_url . 'css/hooks.css' ); - } - - /** - * Add settings link to plugin list table - * @param array $links Existing links - * @return array Modified links - */ - public function add_settings_link( $links ) { - $settings_link = '' . __( 'GP Hooks', 'gp-premium' ) . ''; - array_push( $links, $settings_link ); - return $links; - } - - /** - * Build settings fields - * @return array Fields to be displayed on settings page - */ - private function settings_fields() { - - $settings['standard'] = array( - 'title' => '', - 'description' => '', - 'fields' => array( - array( - "name" => __( 'wp_head', 'gp-premium' ), - "id" => 'generate_wp_head', - "type" => 'textarea' - ), - - array( - "name" => __( 'Before Header', 'gp-premium' ), - "id" => 'generate_before_header', - "type" => 'textarea' - ), - - array( - "name" => __( 'Before Header Content', 'gp-premium' ), - "id" => 'generate_before_header_content', - "type" => 'textarea' - ), - - array( - "name" => __( 'After Header Content', 'gp-premium' ), - "id" => 'generate_after_header_content', - "type" => 'textarea' - ), - - array( - "name" => __( 'After Header', 'gp-premium' ), - "id" => 'generate_after_header', - "type" => 'textarea' - ), - - array( - "name" => __( 'Inside Content Container', 'gp-premium' ), - "id" => 'generate_before_main_content', - "type" => 'textarea' - ), - - array( - "name" => __( 'Before Content', 'gp-premium' ), - "id" => 'generate_before_content', - "type" => 'textarea' - ), - - array( - "name" => __( 'After Entry Title', 'gp-premium' ), - "id" => 'generate_after_entry_header', - "type" => 'textarea' - ), - - array( - "name" => __( 'After Content', 'gp-premium' ), - "id" => 'generate_after_content', - "type" => 'textarea' - ), - - array( - "name" => __( 'Before Right Sidebar Content', 'gp-premium' ), - "id" => 'generate_before_right_sidebar_content', - "type" => 'textarea' - ), - - array( - "name" => __( 'After Right Sidebar Content', 'gp-premium' ), - "id" => 'generate_after_right_sidebar_content', - "type" => 'textarea' - ), - - array( - "name" => __( 'Before Left Sidebar Content', 'gp-premium' ), - "id" => 'generate_before_left_sidebar_content', - "type" => 'textarea' - ), - - array( - "name" => __( 'After Left Sidebar Content', 'gp-premium' ), - "id" => 'generate_after_left_sidebar_content', - "type" => 'textarea' - ), - - array( - "name" => __( 'Before Footer', 'gp-premium' ), - "id" => 'generate_before_footer', - "type" => 'textarea' - ), - - array( - "name" => __( 'After Footer Widgets', 'gp-premium' ), - "id" => 'generate_after_footer_widgets', - "type" => 'textarea' - ), - - array( - "name" => __( 'Before Footer Content', 'gp-premium' ), - "id" => 'generate_before_footer_content', - "type" => 'textarea' - ), - - array( - "name" => __( 'After Footer Content', 'gp-premium' ), - "id" => 'generate_after_footer_content', - "type" => 'textarea' - ), - - array( - "name" => __( 'wp_footer', 'gp-premium' ), - "id" => 'generate_wp_footer', - "type" => 'textarea' - ) - ) - ); - - $settings = apply_filters( 'gp_hooks_settings_fields', $settings ); - - return $settings; - } - - /** - * Register plugin settings - * @return void - */ - public function register_settings() { - if ( is_array( $this->settings ) ) { - foreach( $this->settings as $section => $data ) { - - // Add section to page - add_settings_section( $section, $data['title'], array( $this, 'settings_section' ), 'gp_hooks_settings' ); - - foreach( $data['fields'] as $field ) { - - // Sanitizing isn't possible, as hooks allow any HTML, JS or PHP to be added. - // Allowing PHP can be a security issue if you have admin users who you don't trust. - // In that case, you can disable the ability to add PHP in hooks like this: define( 'GENERATE_HOOKS_DISALLOW_PHP', true ); - $validation = ''; - if( isset( $field['callback'] ) ) { - $validation = $field['callback']; - } - - // Register field - $option_name = $this->settings_base . $field['id']; - register_setting( 'gp_hooks_settings', 'generate_hooks', $validation ); - - // Add field to page - add_settings_field( 'generate_hooks[' . $field['id'] . ']', $field['name'], array( $this, 'display_field' ), 'gp_hooks_settings', $section, array( 'field' => $field ) ); - } - } - } - } - - public function settings_section( $section ) { - $html = ''; - echo $html; - } - - /** - * Generate HTML for displaying fields - * @param array $args Field data - * @return void - */ - public function display_field( $args ) { - - $field = $args['field']; - - $html = ''; - - $option_name = $this->settings_base . $field['id']; - $option = get_option( 'generate_hooks' ); - - $data = ''; - if( isset( $option[$option_name] ) ) { - $data = $option[$option_name]; - } elseif( isset( $field['default'] ) ) { - $data = $field['default']; - } - - - switch( $field['type'] ) { - - case 'textarea': - $checked = ''; - $checked2 = ''; - if( isset( $option[$field['id'] . '_php'] ) && 'true' == $option[$field['id'] . '_php'] ){ - $checked = 'checked="checked"'; - } - if( isset( $option[$field['id'] . '_disable'] ) && 'true' == $option[$field['id'] . '_disable'] ){ - $checked2 = 'checked="checked"'; - } - $html .= ''; - - if ( ! defined( 'GENERATE_HOOKS_DISALLOW_PHP' ) ) { - $html .= '
'; - } - $html .= '
'; - break; - - case 'checkbox': - - - break; - - } - - echo $html; - } - - /** - * Validate individual settings field - * @param string $data Inputted value - * @return string Validated value - */ - public function validate_field( $data ) { - if ( $data && strlen( $data ) > 0 && $data != '' ) { - $data = urlencode( strtolower( str_replace( ' ' , '-' , $data ) ) ); - } - return $data; - } - - /** - * Load settings page content - * @return void - */ - public function settings_page() { - - // Build page HTML - $html = '
'; - $html .= '
'; - $html .= '
'; - $html .= '
'; - $html .= '
'; - // Get settings fields - ob_start(); - settings_fields( 'gp_hooks_settings' ); - do_settings_sections( 'gp_hooks_settings' ); - $html .= ob_get_clean(); - $html .= '
'; - - $html .= '
'; - $html .= '
'; - $html .= '

' . __( 'GP Hooks', 'gp-premium' ) . '

'; - $html .= '
'; - $html .= '

' . __( 'Use these fields to insert anything you like throughout GeneratePress. Shortcodes are allowed, and you can even use PHP if you check the Execute PHP checkboxes.', 'gp-premium' ) . '

'; - $html .= ''; - $html .= '

'; - $html .= ''; - $html .= '

'; - $html .= '
'; - $html .= '
'; - $html .= '
'; - $html .= '
'; - $html .= '
'; - $html .= '
'; - $html .= '
'; - $html .= '
'; - - echo $html; - } - - } - $settings = new Generate_Hooks_Settings( __FILE__ ); -} - -if ( ! function_exists( 'generate_update_hooks' ) ) { - add_action( 'admin_init', 'generate_update_hooks' ); - /** - * Moving standalone db entries to generate_hooks db entry - */ - function generate_update_hooks() { - $generate_hooks = get_option( 'generate_hooks' ); - - // If we've done this before, bail - if ( ! empty( $generate_hooks ) ) { - return; - } - - // One last check - if ( 'true' == $generate_hooks['updated'] ) { - return; - } - - $hooks = generate_hooks_get_hooks(); - $generate_new_hooks = array(); - - foreach ( $hooks as $hook ) { - - $current_hook = get_option( $hook ); - - if ( isset( $current_hook ) && '' !== $current_hook ) { - - $generate_new_hooks[ $hook ] = get_option( $hook ); - $generate_new_hooks[ 'updated' ] = 'true'; - // Let's not delete the old options yet, just in case - //delete_option( $hook ); - - } - - } - - $generate_new_hook_settings = wp_parse_args( $generate_new_hooks, $generate_hooks ); - update_option( 'generate_hooks', $generate_new_hook_settings ); - - } -} - -if ( ! function_exists( 'generate_hooks_admin_errors' ) ) { - add_action( 'admin_notices', 'generate_hooks_admin_errors' ); - /** - * Add our admin notices - */ - function generate_hooks_admin_errors() { - $screen = get_current_screen(); - if ( 'appearance_page_gp_hooks_settings' !== $screen->base ) { - return; - } - - if ( isset( $_GET['settings-updated'] ) && 'true' == $_GET['settings-updated'] ) { - add_settings_error( 'generate-hook-notices', 'true', __( 'Hooks saved.', 'gp-premium' ), 'updated' ); - } - - settings_errors( 'generate-hook-notices' ); - } -} - -add_action( 'admin_head', 'generate_old_gp_hooks_fix_menu' ); -/** - * Set our current menu in the admin while in the old Page Header pages. - * - * @since 1.7 - */ -function generate_old_gp_hooks_fix_menu() { - if ( ! function_exists( 'generate_premium_do_elements' ) ) { - return; - } - - global $parent_file, $submenu_file, $post_type; - - $screen = get_current_screen(); - - if ( 'appearance_page_gp_hooks_settings' === $screen->base ) { - $parent_file = 'themes.php'; - $submenu_file = 'edit.php?post_type=gp_elements'; - } - - remove_submenu_page( 'themes.php', 'gp_hooks_settings' ); -} - -add_action( 'admin_head', 'generate_hooks_add_legacy_button', 999 ); -/** - * Add legacy buttons to our new GP Elements post type. - * - * @since 1.7 - */ -function generate_hooks_add_legacy_button() { - if ( ! function_exists( 'generate_premium_do_elements' ) ) { - return; - } - - $screen = get_current_screen(); - - if ( 'gp_elements' === $screen->post_type && 'edit' === $screen->base ) : - ?> - - $value array( - 'title' => __( 'Backgrounds', 'gp-premium' ), - 'description' => __( 'Set background images for various HTML elements.', 'gp-premium' ), - 'key' => 'generate_package_backgrounds', - 'settings' => 'generate_background_settings', - 'isActive' => 'activated' === get_option( 'generate_package_backgrounds', false ), - 'exportable' => true, - ), - 'Blog' => array( - 'title' => __( 'Blog', 'gp-premium' ), - 'description' => __( 'Set blog options like infinite scroll, masonry layouts and more.', 'gp-premium' ), - 'key' => 'generate_package_blog', - 'settings' => 'generate_blog_settings', - 'isActive' => 'activated' === get_option( 'generate_package_blog', false ), - 'exportable' => true, - ), - 'Colors' => array( - 'title' => __( 'Colors', 'gp-premium' ), - 'key' => 'generate_package_colors', - 'isActive' => 'activated' === get_option( 'generate_package_colors', false ), - ), - 'Copyright' => array( - 'title' => __( 'Copyright', 'gp-premium' ), - 'description' => __( 'Set a custom copyright message in your footer.', 'gp-premium' ), - 'key' => 'generate_package_copyright', - 'settings' => 'copyright', - 'isActive' => 'activated' === get_option( 'generate_package_copyright', false ), - 'exportable' => true, - ), - 'Disable Elements' => array( - 'title' => __( 'Disable Elements', 'gp-premium' ), - 'description' => __( 'Disable default theme elements on specific pages or inside a Layout Element.', 'gp-premium' ), - 'key' => 'generate_package_disable_elements', - 'isActive' => 'activated' === get_option( 'generate_package_disable_elements', false ), - ), - 'Elements' => array( - 'title' => __( 'Elements', 'gp-premium' ), - 'description' => __( 'Use our block editor theme builder, build advanced HTML hooks, and gain more Layout control.', 'gp-premium' ), - 'key' => 'generate_package_elements', - 'isActive' => 'activated' === get_option( 'generate_package_elements', false ), - ), - 'Hooks' => array( - 'title' => __( 'Hooks', 'gp-premium' ), - 'description' => __( 'This module has been deprecated. Please use Elements instead.', 'gp-premium' ), - 'key' => 'generate_package_hooks', - 'settings' => 'generate_hooks', - 'isActive' => 'activated' === get_option( 'generate_package_hooks', false ), - 'exportable' => true, - ), - 'Menu Plus' => array( - 'title' => __( 'Menu Plus', 'gp-premium' ), - 'description' => __( 'Set up a mobile header, sticky navigation or off-canvas panel.', 'gp-premium' ), - 'key' => 'generate_package_menu_plus', - 'settings' => 'generate_menu_plus_settings', - 'isActive' => 'activated' === get_option( 'generate_package_menu_plus', false ), - 'exportable' => true, - ), - 'Page Header' => array( - 'title' => __( 'Page Header', 'gp-premium' ), - 'description' => __( 'This module has been deprecated. Please use Elements instead.', 'gp-premium' ), - 'key' => 'generate_package_page_header', - 'settings' => 'generate_page_header_settings', - 'isActive' => 'activated' === get_option( 'generate_package_page_header', false ), - 'exportable' => true, - ), - 'Secondary Nav' => array( - 'title' => __( 'Secondary Nav', 'gp-premium' ), - 'description' => __( 'Add a fully-featured secondary navigation to your site.', 'gp-premium' ), - 'key' => 'generate_package_secondary_nav', - 'settings' => 'generate_secondary_nav_settings', - 'isActive' => 'activated' === get_option( 'generate_package_secondary_nav', false ), - 'exportable' => true, - ), - 'Sections' => array( - 'title' => __( 'Sections', 'gp-premium' ), - 'description' => __( 'This module has been deprecated. Please consider using our GenerateBlocks plugin instead.', 'gp-premium' ), - 'key' => 'generate_package_sections', - 'isActive' => 'activated' === get_option( 'generate_package_sections', false ), - ), - 'Spacing' => array( - 'title' => __( 'Spacing', 'gp-premium' ), - 'description' => __( 'Set the padding and overall spacing of your theme elements.', 'gp-premium' ), - 'key' => 'generate_package_spacing', - 'settings' => 'generate_spacing_settings', - 'isActive' => 'activated' === get_option( 'generate_package_spacing', false ), - 'exportable' => true, - ), - 'Typography' => array( - 'title' => __( 'Typography', 'gp-premium' ), - 'description' => __( 'This module has been deprecated. Switch to our dynamic typography system in Customize > General instead.', 'gp-premium' ), - 'key' => 'generate_package_typography', - 'isActive' => 'activated' === get_option( 'generate_package_typography', false ), - ), - 'WooCommerce' => array( - 'title' => __( 'WooCommerce', 'gp-premium' ), - 'description' => __( 'Add colors, typography, and layout options to your WooCommerce store.', 'gp-premium' ), - 'key' => 'generate_package_woocommerce', - 'settings' => 'generate_woocommerce_settings', - 'isActive' => 'activated' === get_option( 'generate_package_woocommerce', false ), - 'exportable' => true, - ), - ); - - if ( version_compare( PHP_VERSION, '5.4', '>=' ) && ! defined( 'GENERATE_DISABLE_SITE_LIBRARY' ) ) { - $modules['Site Library'] = array( - 'title' => __( 'Site Library', 'gp-premium' ), - 'description' => __( 'Choose from an extensive library of professionally designed starter sites.', 'gp-premium' ), - 'key' => 'generate_package_site_library', - 'isActive' => 'activated' === get_option( 'generate_package_site_library', false ), - ); - } - - if ( function_exists( 'generate_is_using_dynamic_typography' ) && generate_is_using_dynamic_typography() ) { - unset( $modules['Typography'] ); - } - - if ( version_compare( generate_premium_get_theme_version(), '3.1.0-alpha.1', '>=' ) ) { - unset( $modules['Colors'] ); - } - - $deprecated_modules = apply_filters( - 'generate_premium_deprecated_modules', - array( - 'Page Header', - 'Hooks', - 'Sections', - ) - ); - - foreach ( $deprecated_modules as $deprecated_module ) { - if ( isset( $modules[ $deprecated_module ] ) ) { - $modules[ $deprecated_module ]['deprecated'] = true; - } - } - - ksort( $modules ); - - return $modules; - } - - /** - * Get modules that can have their settings exported and imported. - */ - public static function get_exportable_modules() { - $modules = array( - 'Core' => array( - 'settings' => 'generate_settings', - 'title' => __( 'Core', 'gp-premium' ), - 'isActive' => true, - ), - ); - - foreach ( self::get_modules() as $key => $data ) { - if ( ! empty( $data['exportable'] ) && $data['isActive'] ) { - $modules[ $key ] = $data; - } - } - - return $modules; - } - - /** - * Get options using theme_mods. - */ - public static function get_theme_mods() { - $theme_mods = array( - 'font_body_variants', - 'font_body_category', - 'font_site_title_variants', - 'font_site_title_category', - 'font_site_tagline_variants', - 'font_site_tagline_category', - 'font_navigation_variants', - 'font_navigation_category', - 'font_secondary_navigation_variants', - 'font_secondary_navigation_category', - 'font_buttons_variants', - 'font_buttons_category', - 'font_heading_1_variants', - 'font_heading_1_category', - 'font_heading_2_variants', - 'font_heading_2_category', - 'font_heading_3_variants', - 'font_heading_3_category', - 'font_heading_4_variants', - 'font_heading_4_category', - 'font_heading_5_variants', - 'font_heading_5_category', - 'font_heading_6_variants', - 'font_heading_6_category', - 'font_widget_title_variants', - 'font_widget_title_category', - 'font_footer_variants', - 'font_footer_category', - 'generate_copyright', - ); - - if ( function_exists( 'generate_is_using_dynamic_typography' ) && generate_is_using_dynamic_typography() ) { - $theme_mods = array( - 'generate_copyright', - ); - } - - return $theme_mods; - } - - /** - * Get our setting keys. - */ - public static function get_setting_keys() { - return array( - 'generate_settings', - 'generate_background_settings', - 'generate_blog_settings', - 'generate_hooks', - 'generate_page_header_settings', - 'generate_secondary_nav_settings', - 'generate_spacing_settings', - 'generate_menu_plus_settings', - 'generate_woocommerce_settings', - ); - } - - /** - * Returns safely the license key. - */ - public static function get_license_key() { - $license_key = get_option( 'gen_premium_license_key', '' ); - - if ( $license_key && strlen( $license_key ) > 4 ) { - $hidden_length = strlen( $license_key ) - 4; - $safe_part = substr( $license_key, 0, 4 ); - $hidden_part = implode('', array_fill( 0, $hidden_length, '*' ) ); - - return $safe_part . $hidden_part; - } - - return $license_key; - } - - /** - * Add our scripts to the page. - */ - public function enqueue_scripts() { - if ( ! class_exists( 'GeneratePress_Dashboard' ) ) { - return; - } - - $dashboard_pages = GeneratePress_Dashboard::get_pages(); - $current_screen = get_current_screen(); - - if ( in_array( $current_screen->id, $dashboard_pages ) ) { - wp_enqueue_style( - 'generate-pro-dashboard', - GP_PREMIUM_DIR_URL . 'dist/style-dashboard.css', - array( 'wp-components' ), - GP_PREMIUM_VERSION - ); - - if ( 'appearance_page_generate-options' === $current_screen->id ) { - wp_enqueue_script( - 'generate-pro-dashboard', - GP_PREMIUM_DIR_URL . 'dist/dashboard.js', - array(), - GP_PREMIUM_VERSION, - true - ); - - wp_set_script_translations( 'generate-pro-dashboard', 'gp-premium', GP_PREMIUM_DIR_PATH . 'langs' ); - - wp_localize_script( - 'generate-pro-dashboard', - 'generateProDashboard', - array( - 'modules' => self::get_modules(), - 'exportableModules' => self::get_exportable_modules(), - 'siteLibraryUrl' => admin_url( 'themes.php?page=generatepress-library' ), - 'elementsUrl' => admin_url( 'edit.php?post_type=gp_elements' ), - 'hasWooCommerce' => class_exists( 'WooCommerce' ), - 'licenseKey' => self::get_license_key(), - 'licenseKeyStatus' => get_option( 'gen_premium_license_key_status', 'deactivated' ), - 'betaTester' => get_option( 'gp_premium_beta_testing', false ), - ) - ); - } - } - } - - /** - * Enable beta testing if our option is set. - * - * @since 2.1.0 - * @param boolean $value Whether beta testing is on or not. - */ - public function set_beta_tester( $value ) { - if ( get_option( 'gp_premium_beta_testing', false ) ) { - return true; - } - - return $value; - } - - /** - * Add the container for our start customizing app. - */ - public function module_list() { - echo '
'; - } - - /** - * Add the container for our start customizing app. - */ - public function license_key() { - echo '
'; - } - - /** - * Add the container for our start customizing app. - */ - public function import_export() { - echo '
'; - } - - /** - * Add the container for our reset app. - */ - public function reset() { - echo '
'; - } -} - -GeneratePress_Pro_Dashboard::get_instance(); diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/inc/class-rest.php b/wp-content/upgrade-temp-backup/plugins/gp-premium/inc/class-rest.php deleted file mode 100644 index e9bffe21..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/inc/class-rest.php +++ /dev/null @@ -1,570 +0,0 @@ -namespace . $this->version; - - register_rest_route( - $namespace, - '/modules/', - array( - 'methods' => WP_REST_Server::EDITABLE, - 'callback' => array( $this, 'update_module' ), - 'permission_callback' => array( $this, 'update_settings_permission' ), - ) - ); - - register_rest_route( - $namespace, - '/license/', - array( - 'methods' => WP_REST_Server::EDITABLE, - 'callback' => array( $this, 'update_licensing' ), - 'permission_callback' => array( $this, 'update_settings_permission' ), - ) - ); - - register_rest_route( - $namespace, - '/beta/', - array( - 'methods' => WP_REST_Server::EDITABLE, - 'callback' => array( $this, 'update_beta_testing' ), - 'permission_callback' => array( $this, 'update_settings_permission' ), - ) - ); - - register_rest_route( - $namespace, - '/export/', - array( - 'methods' => WP_REST_Server::EDITABLE, - 'callback' => array( $this, 'export' ), - 'permission_callback' => array( $this, 'update_settings_permission' ), - ) - ); - - register_rest_route( - $namespace, - '/import/', - array( - 'methods' => WP_REST_Server::EDITABLE, - 'callback' => array( $this, 'import' ), - 'permission_callback' => array( $this, 'update_settings_permission' ), - ) - ); - - register_rest_route( - $namespace, - '/reset/', - array( - 'methods' => WP_REST_Server::EDITABLE, - 'callback' => array( $this, 'reset' ), - 'permission_callback' => array( $this, 'update_settings_permission' ), - ) - ); - } - - /** - * Get edit options permissions. - * - * @return bool - */ - public function update_settings_permission() { - return current_user_can( 'manage_options' ); - } - - /** - * Update modules. - * - * @param WP_REST_Request $request request object. - * - * @return mixed - */ - public function update_module( WP_REST_Request $request ) { - $module_key = $request->get_param( 'key' ); - $action = $request->get_param( 'action' ); - $current_setting = get_option( $module_key, false ); - $modules = GeneratePress_Pro_Dashboard::get_modules(); - $safe_module_keys = array(); - - foreach ( $modules as $key => $data ) { - $safe_module_keys[] = $data['key']; - } - - if ( ! in_array( $module_key, $safe_module_keys ) ) { - return $this->failed( 'Bad module key.' ); - } - - $message = ''; - - if ( 'activate' === $action ) { - update_option( $module_key, 'activated' ); - $message = __( 'Module activated.', 'gp-premium' ); - } - - if ( 'deactivate' === $action ) { - update_option( $module_key, 'deactivated' ); - $message = __( 'Module deactivated.', 'gp-premium' ); - } - - return $this->success( $message ); - } - - /** - * Update licensing. - * - * @param WP_REST_Request $request request object. - * - * @return mixed - */ - public function update_licensing( WP_REST_Request $request ) { - $new_license_key = $request->get_param( 'key' ); - $old_license = get_option( 'gen_premium_license_key', '' ); - $old_status = get_option( 'gen_premium_license_key_status', 'deactivated' ); - $new_license = strpos( $new_license_key, '***' ) !== false - ? trim( $old_license ) - : trim( $new_license_key ); - - if ( $new_license ) { - $api_params = array( - 'edd_action' => 'activate_license', - 'license' => sanitize_key( $new_license ), - 'item_name' => rawurlencode( 'GP Premium' ), - 'url' => home_url(), - ); - } elseif ( $old_license && 'valid' === $old_status ) { - $api_params = array( - 'edd_action' => 'deactivate_license', - 'license' => sanitize_key( $old_license ), - 'item_name' => rawurlencode( 'GP Premium' ), - 'url' => home_url(), - ); - } - - if ( isset( $api_params ) ) { - $response = wp_remote_post( - 'https://generatepress.com', - array( - 'timeout' => 30, - 'sslverify' => false, - 'body' => $api_params, - ) - ); - - if ( is_wp_error( $response ) || 200 !== (int) wp_remote_retrieve_response_code( $response ) ) { - if ( is_object( $response ) ) { - return $this->failed( $response->get_error_message() ); - } elseif ( is_array( $response ) && isset( $response['response']['message'] ) ) { - if ( 'Forbidden' === $response['response']['message'] ) { - $message = __( '403 Forbidden. Your server is not able to communicate with generatepress.com in order to activate your license key.', 'gp-premium' ); - } else { - $message = $response['response']['message']; - } - } - } else { - $license_data = json_decode( wp_remote_retrieve_body( $response ) ); - - if ( false === $license_data->success ) { - switch ( $license_data->error ) { - case 'expired': - $message = sprintf( - /* translators: License key expiration date. */ - __( 'Your license key expired on %s.', 'gp-premium' ), - date_i18n( get_option( 'date_format' ), strtotime( $license_data->expires, current_time( 'timestamp' ) ) ) // phpcs:ignore - ); - break; - - case 'disabled': - case 'revoked': - $message = __( 'Your license key has been disabled.', 'gp-premium' ); - break; - - case 'missing': - $message = __( 'Invalid license.', 'gp-premium' ); - break; - - case 'invalid': - case 'site_inactive': - $message = __( 'Your license is not active for this URL.', 'gp-premium' ); - break; - - case 'item_name_mismatch': - /* translators: GP Premium */ - $message = sprintf( __( 'This appears to be an invalid license key for %s.', 'gp-premium' ), __( 'GP Premium', 'gp-premium' ) ); - break; - - case 'no_activations_left': - $message = __( 'Your license key has reached its activation limit.', 'gp-premium' ); - break; - - default: - $message = __( 'An error occurred, please try again.', 'gp-premium' ); - break; - } - } - } - - update_option( 'gen_premium_license_key_status', esc_attr( $license_data->license ) ); - } - - update_option( 'gen_premium_license_key', sanitize_key( $new_license ) ); - - if ( ! isset( $api_params ) ) { - return $this->success( __( 'Settings saved.', 'gp-premium' ) ); - } - - if ( ! empty( $message ) ) { - return $this->failed( $message ); - } - - return $this->success( $license_data ); - } - - /** - * Update licensing. - * - * @param WP_REST_Request $request request object. - * - * @return mixed - */ - public function update_beta_testing( WP_REST_Request $request ) { - $new_beta_tester = $request->get_param( 'beta' ); - - if ( ! empty( $new_beta_tester ) ) { - update_option( 'gp_premium_beta_testing', true, false ); - } else { - delete_option( 'gp_premium_beta_testing' ); - } - - if ( ! isset( $api_params ) ) { - return $this->success( __( 'Settings saved.', 'gp-premium' ) ); - } - - if ( ! empty( $message ) ) { - return $this->failed( $message ); - } - - return $this->success( $license_data ); - } - - /** - * Export settings. - * - * @param WP_REST_Request $request request object. - * - * @return mixed - */ - public function export( WP_REST_Request $request ) { - $exportable_modules = $request->get_param( 'items' ); - - if ( ! $exportable_modules ) { - $exportable_modules = GeneratePress_Pro_Dashboard::get_exportable_modules(); - } - - $export_type = $request->get_param( 'type' ); - - if ( 'all' === $export_type ) { - $data = array( - 'modules' => array(), - 'mods' => array(), - 'options' => array(), - ); - - $module_settings = array(); - - foreach ( $exportable_modules as $exported_module_key => $exported_module_data ) { - if ( isset( $exported_module_data['settings'] ) ) { - $module_settings[] = $exported_module_data['settings']; - } - } - - $modules = GeneratePress_Pro_Dashboard::get_modules(); - - // Export module status of the exported options. - foreach ( $modules as $module_key => $module_data ) { - if ( isset( $module_data['settings'] ) && in_array( $module_data['settings'], $module_settings ) ) { - $data['modules'][ $module_key ] = $module_data['key']; - } - } - - $theme_mods = GeneratePress_Pro_Dashboard::get_theme_mods(); - - foreach ( $theme_mods as $theme_mod ) { - if ( 'generate_copyright' === $theme_mod ) { - if ( in_array( 'copyright', $module_settings ) ) { - $data['mods'][ $theme_mod ] = get_theme_mod( $theme_mod ); - } - } else { - if ( in_array( 'generate_settings', $module_settings ) ) { - $data['mods'][ $theme_mod ] = get_theme_mod( $theme_mod ); - } - } - } - - $settings = GeneratePress_Pro_Dashboard::get_setting_keys(); - - foreach ( $settings as $setting ) { - if ( in_array( $setting, $module_settings ) ) { - $data['options'][ $setting ] = get_option( $setting ); - } - } - } - - if ( 'global-colors' === $export_type ) { - $data['global-colors'] = generate_get_option( 'global_colors' ); - } - - if ( 'typography' === $export_type ) { - $data['font-manager'] = generate_get_option( 'font_manager' ); - $data['typography'] = generate_get_option( 'typography' ); - } - - $data = apply_filters( 'generate_export_data', $data, $export_type ); - - return $this->success( $data ); - } - - /** - * Import settings. - * - * @param WP_REST_Request $request request object. - * - * @return mixed - */ - public function import( WP_REST_Request $request ) { - $settings = $request->get_param( 'import' ); - - if ( empty( $settings ) ) { - $this->failed( __( 'No settings to import.', 'gp-premium' ) ); - } - - if ( ! empty( $settings['typography'] ) ) { - $existing_settings = get_option( 'generate_settings', array() ); - $existing_settings['typography'] = $settings['typography']; - - if ( ! empty( $settings['font-manager'] ) ) { - $existing_settings['font_manager'] = $settings['font-manager']; - } - - update_option( 'generate_settings', $existing_settings ); - } elseif ( ! empty( $settings['global-colors'] ) ) { - $existing_settings = get_option( 'generate_settings', array() ); - $existing_settings['global_colors'] = $settings['global-colors']; - - update_option( 'generate_settings', $existing_settings ); - } else { - $modules = GeneratePress_Pro_Dashboard::get_modules(); - - foreach ( (array) $settings['modules'] as $key => $val ) { - if ( isset( $modules[ $key ] ) && in_array( $val, $modules[ $key ] ) ) { - update_option( $val, 'activated' ); - } - } - - foreach ( (array) $settings['mods'] as $key => $val ) { - if ( in_array( $key, GeneratePress_Pro_Dashboard::get_theme_mods() ) ) { - set_theme_mod( $key, $val ); - } - } - - foreach ( (array) $settings['options'] as $key => $val ) { - if ( in_array( $key, GeneratePress_Pro_Dashboard::get_setting_keys() ) ) { - update_option( $key, $val ); - } - } - } - - // Delete existing dynamic CSS cache. - delete_option( 'generate_dynamic_css_output' ); - delete_option( 'generate_dynamic_css_cached_version' ); - - $dynamic_css_data = get_option( 'generatepress_dynamic_css_data', array() ); - - if ( isset( $dynamic_css_data['updated_time'] ) ) { - unset( $dynamic_css_data['updated_time'] ); - } - - update_option( 'generatepress_dynamic_css_data', $dynamic_css_data ); - - return $this->success( __( 'Settings imported.', 'gp-premium' ) ); - } - - /** - * Reset settings. - * - * @param WP_REST_Request $request request object. - * - * @return mixed - */ - public function reset( WP_REST_Request $request ) { - $reset_items = $request->get_param( 'items' ); - - if ( ! $reset_items ) { - $reset_items = GeneratePress_Pro_Dashboard::get_exportable_modules(); - } - - $module_settings = array(); - - foreach ( $reset_items as $reset_module_key => $reset_module_data ) { - if ( isset( $reset_module_data['settings'] ) ) { - $module_settings[] = $reset_module_data['settings']; - } - } - - $theme_mods = GeneratePress_Pro_Dashboard::get_theme_mods(); - - foreach ( $theme_mods as $theme_mod ) { - if ( 'generate_copyright' === $theme_mod ) { - if ( in_array( 'copyright', $module_settings ) ) { - remove_theme_mod( $theme_mod ); - } - } else { - if ( in_array( 'generate_settings', $module_settings ) ) { - remove_theme_mod( $theme_mod ); - } - } - } - - $settings = GeneratePress_Pro_Dashboard::get_setting_keys(); - - foreach ( $settings as $setting ) { - if ( in_array( $setting, $module_settings ) ) { - delete_option( $setting ); - } - } - - // Delete our dynamic CSS option. - delete_option( 'generate_dynamic_css_output' ); - delete_option( 'generate_dynamic_css_cached_version' ); - - // Reset our dynamic CSS file updated time so it regenerates. - $dynamic_css_data = get_option( 'generatepress_dynamic_css_data', array() ); - - if ( isset( $dynamic_css_data['updated_time'] ) ) { - unset( $dynamic_css_data['updated_time'] ); - } - - update_option( 'generatepress_dynamic_css_data', $dynamic_css_data ); - - // Delete any GeneratePress Site CSS in Additional CSS. - $additional_css = wp_get_custom_css_post(); - - if ( ! empty( $additional_css ) ) { - $additional_css->post_content = preg_replace( '#(/\\* GeneratePress Site CSS \\*/).*?(/\\* End GeneratePress Site CSS \\*/)#s', '', $additional_css->post_content ); - wp_update_custom_css_post( $additional_css->post_content ); - } - - return $this->success( __( 'Settings reset.', 'gp-premium' ) ); - } - - /** - * Success rest. - * - * @param mixed $response response data. - * @return mixed - */ - public function success( $response ) { - return new WP_REST_Response( - array( - 'success' => true, - 'response' => $response, - ), - 200 - ); - } - - /** - * Failed rest. - * - * @param mixed $response response data. - * @return mixed - */ - public function failed( $response ) { - return new WP_REST_Response( - array( - 'success' => false, - 'response' => $response, - ), - 200 - ); - } - - /** - * Error rest. - * - * @param mixed $code error code. - * @param mixed $response response data. - * @return mixed - */ - public function error( $code, $response ) { - return new WP_REST_Response( - array( - 'error' => true, - 'success' => false, - 'error_code' => $code, - 'response' => $response, - ), - 401 - ); - } -} - -GeneratePress_Pro_Rest::get_instance(); diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/inc/deprecated-admin.php b/wp-content/upgrade-temp-backup/plugins/gp-premium/inc/deprecated-admin.php deleted file mode 100644 index afe92537..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/inc/deprecated-admin.php +++ /dev/null @@ -1,790 +0,0 @@ -id ) { - return true; - } - - return false; -} - -/** - * Add the Sites tab to our Dashboard tabs. - * - * @since 1.6 - * @deprecated 2.0.0 - * - * @param array $tabs Existing tabs. - * @return array New tabs. - */ -function generate_sites_dashboard_tab( $tabs ) { - $tabs['Sites'] = array( - 'name' => __( 'Site Library', 'gp-premium' ), - 'url' => admin_url( 'themes.php?page=generatepress-site-library' ), - 'class' => generate_is_sites_dashboard() ? 'active' : '', - ); - - return $tabs; -} - -/** - * Register our Site Library page. - * - * @since 1.7 - * @deprecated 2.0.0 - */ -function generate_site_library_register() { - add_submenu_page( - 'themes.php', - __( 'Site Library', 'gp-premium' ), - __( 'Site Library', 'gp-premium' ), - 'manage_options', - 'generatepress-site-library', - 'generate_sites_container' - ); -} - -/** - * Set our current menu item as the GeneratePress Dashboard. - * - * @since 1.7 - * @deprecated 2.0.0 - */ -function generate_site_library_fix_menu() { - global $parent_file, $submenu_file, $post_type; - - if ( generate_is_sites_dashboard() ) { - $parent_file = 'themes.php'; // phpcs:ignore -- Override necessary. - $submenu_file = 'generate-options'; // phpcs:ignore -- Override necessary. - } - - remove_submenu_page( 'themes.php', 'generatepress-site-library' ); -} - -/** - * Add our scripts for the site library. - * - * @since 1.8 - * @deprecated 2.0.0 - */ -function generate_sites_do_enqueue_scripts() { - if ( ! generate_is_sites_dashboard() ) { - return; - } - - $backup_data = get_option( '_generatepress_site_library_backup', array() ); - - wp_enqueue_script( - 'generate-sites-admin', - GENERATE_SITES_URL . 'assets/js/admin.js', - array( 'jquery', 'wp-util', 'updates', 'generate-sites-blazy' ), - GP_PREMIUM_VERSION, - true - ); - - wp_enqueue_script( - 'generate-sites-download', - GENERATE_SITES_URL . 'assets/js/download.js', - array( 'jquery', 'generate-sites-admin' ), - GP_PREMIUM_VERSION, - true - ); - - wp_enqueue_script( - 'generate-sites-blazy', - GENERATE_SITES_URL . 'assets/js/blazy.min.js', - array(), - GP_PREMIUM_VERSION, - true - ); - - wp_localize_script( - 'generate-sites-admin', - 'generate_sites_params', - array( - 'ajaxurl' => admin_url( 'admin-ajax.php' ), - 'nonce' => wp_create_nonce( 'generate_sites_nonce' ), - 'importing_options' => __( 'Importing options', 'gp-premium' ), - 'backing_up_options' => __( 'Backing up options', 'gp-premium' ), - 'checking_demo_content' => __( 'Checking demo content', 'gp-premium' ), - 'downloading_content' => __( 'Downloading content', 'gp-premium' ), - 'importing_content' => __( 'Importing content', 'gp-premium' ), - 'importing_site_options' => __( 'Importing site options', 'gp-premium' ), - 'importing_widgets' => __( 'Importing widgets', 'gp-premium' ), - 'activating_plugins' => __( 'Activating plugins', 'gp-premium' ), - 'installing_plugins' => __( 'Installing plugins', 'gp-premium' ), - 'automatic_plugins' => __( 'Automatic', 'gp-premium' ), - 'manual_plugins' => __( 'Manual', 'gp-premium' ), - 'home_url' => home_url(), - 'restoreThemeOptions' => __( 'Restoring theme options', 'gp-premium' ), - 'restoreSiteOptions' => __( 'Restoring site options', 'gp-premium' ), - 'restoreContent' => __( 'Removing imported content', 'gp-premium' ), - 'restorePlugins' => __( 'Deactivating imported plugins', 'gp-premium' ), - 'restoreWidgets' => __( 'Restoring widgets', 'gp-premium' ), - 'restoreCSS' => __( 'Restoring CSS', 'gp-premium' ), - 'cleanUp' => __( 'Cleaning up', 'gp-premium' ), - 'hasContentBackup' => ! empty( $backup_data['content'] ), - 'confirmRemoval' => __( 'This process makes changes to your database. If you have existing data, be sure to create a backup as a precaution.', 'gp-premium' ), - ) - ); - - wp_enqueue_style( - 'generate-sites-admin', - GENERATE_SITES_URL . 'assets/css/admin.css', - array(), - GP_PREMIUM_VERSION - ); - - wp_enqueue_style( - 'generate-premium-dashboard', - plugin_dir_url( dirname( __FILE__ ) ) . 'inc/assets/dashboard.css', - array(), - GP_PREMIUM_VERSION - ); -} - -/** - * Add a body class while in the Site Library. - * - * @since 1.8 - * @deprecated 2.0.0 - * - * @param array $classes Current body classes. - * @return array Existing and our new body classes - */ -function generate_sites_do_admin_body_classes( $classes ) { - if ( generate_is_sites_dashboard() ) { - $classes .= ' generate-sites'; - } - - return $classes; -} - -/** - * Add an opening wrapper element for our Dashboard tabs and page builder links. - * - * @since 1.8 - */ -function generate_sites_add_tabs_wrapper_open() { - echo '
'; -} - -/** - * Adds our Site dashboard container. - * - * @since 1.6 - * @deprecated 2.0.0 - */ -function generate_sites_container() { - ?> -
-
-
-
- -
- - -
-
-
- '; - - if ( ! empty( $page_builders ) ) : - ?> -
- -
- -
-
- - -
- -
- - - - -
-

- -
-

-

-
- -
- - - - -
-
- -
- -
- - - %2$s - -
', - esc_html( wp_create_nonce( 'refresh_sites_nonce' ) ), - __( 'Refresh Sites', 'gp-premium' ), - esc_url( admin_url( 'themes.php?page=generatepress-site-library' ) ), - __( 'Reload Page', 'gp-premium' ) - ); - ?> - - - get_post_types( array( 'public' => true ) ), - 'showposts' => -1, - 'meta_query' => array( - array( - 'key' => '_generate-select-page-header', - 'compare' => 'EXISTS', - ), - ), - ); - - $posts = get_posts( $args ); - $new_values = array(); - - foreach ( $posts as $post ) { - $page_header_id = get_post_meta( $post->ID, '_generate-select-page-header', true ); - - if ( $page_header_id ) { - $new_values[ $post->ID ] = $page_header_id; - } - } - - return $new_values; -} - -/** - * Get our Element display locations. - * - * @since 1.7 - * @deprecated 2.0.0 - * - * @return array - */ -function generate_sites_export_elements_location() { - $args = array( - 'post_type' => 'gp_elements', - 'showposts' => -1, - ); - - $posts = get_posts( $args ); - $new_values = array(); - - foreach ( $posts as $post ) { - $display_conditions = get_post_meta( $post->ID, '_generate_element_display_conditions', true ); - - if ( $display_conditions ) { - $new_values[ $post->ID ] = $display_conditions; - } - } - - return $new_values; -} - -/** - * Get our Element display locations. - * - * @since 1.7 - * @deprecated 2.0.0 - * - * @return array - */ -function generate_sites_export_elements_exclusion() { - $args = array( - 'post_type' => 'gp_elements', - 'showposts' => -1, - ); - - $posts = get_posts( $args ); - $new_values = array(); - - foreach ( $posts as $post ) { - $display_conditions = get_post_meta( $post->ID, '_generate_element_exclude_conditions', true ); - - if ( $display_conditions ) { - $new_values[ $post->ID ] = $display_conditions; - } - } - - return $new_values; -} - -/** - * List out compatible theme modules Sites can activate. - * - * @since 1.6 - * @deprecated 2.0.0 - * - * @return array - */ -function generatepress_get_site_premium_modules() { - return array( - 'Backgrounds' => 'generate_package_backgrounds', - 'Blog' => 'generate_package_blog', - 'Colors' => 'generate_package_colors', - 'Copyright' => 'generate_package_copyright', - 'Elements' => 'generate_package_elements', - 'Disable Elements' => 'generate_package_disable_elements', - 'Hooks' => 'generate_package_hooks', - 'Menu Plus' => 'generate_package_menu_plus', - 'Page Header' => 'generate_package_page_header', - 'Secondary Nav' => 'generate_package_secondary_nav', - 'Sections' => 'generate_package_sections', - 'Spacing' => 'generate_package_spacing', - 'Typography' => 'generate_package_typography', - 'WooCommerce' => 'generate_package_woocommerce', - ); -} - -/** - * Don't allow Sites to modify these options. - * - * @since 1.6 - * @deprecated 2.0.0 - * - * @return array - */ -function generatepress_sites_disallowed_options() { - return array( - 'admin_email', - 'siteurl', - 'home', - 'blog_charset', - 'blog_public', - 'current_theme', - 'stylesheet', - 'template', - 'default_role', - 'mailserver_login', - 'mailserver_pass', - 'mailserver_port', - 'mailserver_url', - 'permalink_structure', - 'rewrite_rules', - 'users_can_register', - ); -} - -/** - * Add our GeneratePress Site export checkbox to the Export module. - * - * @since 1.7 - * @deprecated 2.0.0 - */ -function generatepress_sites_add_export_checkbox() { - if ( ! apply_filters( 'generate_show_generatepress_site_export_option', false ) ) { - return; - } - ?> -
- - - $key ) { - if ( 'activated' === get_option( $key ) ) { - $data['modules'][ $name ] = $key; - } - } - - // Site options. - $data['site_options']['nav_menu_locations'] = get_theme_mod( 'nav_menu_locations' ); - $data['site_options']['custom_logo'] = wp_get_attachment_url( get_theme_mod( 'custom_logo' ) ); - $data['site_options']['show_on_front'] = get_option( 'show_on_front' ); - $data['site_options']['page_on_front'] = get_option( 'page_on_front' ); - $data['site_options']['page_for_posts'] = get_option( 'page_for_posts' ); - - // Page header. - $data['site_options']['page_header_global_locations'] = get_option( 'generate_page_header_global_locations' ); - $data['site_options']['page_headers'] = generate_sites_export_page_headers(); - - // Elements. - $data['site_options']['element_locations'] = generate_sites_export_elements_location(); - $data['site_options']['element_exclusions'] = generate_sites_export_elements_exclusion(); - - // Custom CSS. - if ( function_exists( 'wp_get_custom_css_post' ) ) { - $data['custom_css'] = wp_get_custom_css_post()->post_content; - } - - // WooCommerce. - if ( is_plugin_active( 'woocommerce/woocommerce.php' ) ) { - $data['site_options']['woocommerce_shop_page_id'] = get_option( 'woocommerce_shop_page_id' ); - $data['site_options']['woocommerce_cart_page_id'] = get_option( 'woocommerce_cart_page_id' ); - $data['site_options']['woocommerce_checkout_page_id'] = get_option( 'woocommerce_checkout_page_id' ); - $data['site_options']['woocommerce_myaccount_page_id'] = get_option( 'woocommerce_myaccount_page_id' ); - $data['site_options']['woocommerce_single_image_width'] = get_option( 'woocommerce_single_image_width' ); - $data['site_options']['woocommerce_thumbnail_image_width'] = get_option( 'woocommerce_thumbnail_image_width' ); - $data['site_options']['woocommerce_thumbnail_cropping'] = get_option( 'woocommerce_thumbnail_cropping' ); - $data['site_options']['woocommerce_shop_page_display'] = get_option( 'woocommerce_shop_page_display' ); - $data['site_options']['woocommerce_category_archive_display'] = get_option( 'woocommerce_category_archive_display' ); - $data['site_options']['woocommerce_default_catalog_orderby'] = get_option( 'woocommerce_default_catalog_orderby' ); - } - - // Elementor. - if ( is_plugin_active( 'elementor/elementor.php' ) ) { - $data['site_options']['elementor_container_width'] = get_option( 'elementor_container_width' ); - $data['site_options']['elementor_cpt_support'] = get_option( 'elementor_cpt_support' ); - $data['site_options']['elementor_css_print_method'] = get_option( 'elementor_css_print_method' ); - $data['site_options']['elementor_default_generic_fonts'] = get_option( 'elementor_default_generic_fonts' ); - $data['site_options']['elementor_disable_color_schemes'] = get_option( 'elementor_disable_color_schemes' ); - $data['site_options']['elementor_disable_typography_schemes'] = get_option( 'elementor_disable_typography_schemes' ); - $data['site_options']['elementor_editor_break_lines'] = get_option( 'elementor_editor_break_lines' ); - $data['site_options']['elementor_exclude_user_roles'] = get_option( 'elementor_exclude_user_roles' ); - $data['site_options']['elementor_global_image_lightbox'] = get_option( 'elementor_global_image_lightbox' ); - $data['site_options']['elementor_page_title_selector'] = get_option( 'elementor_page_title_selector' ); - $data['site_options']['elementor_scheme_color'] = get_option( 'elementor_scheme_color' ); - $data['site_options']['elementor_scheme_color-picker'] = get_option( 'elementor_scheme_color-picker' ); - $data['site_options']['elementor_scheme_typography'] = get_option( 'elementor_scheme_typography' ); - $data['site_options']['elementor_space_between_widgets'] = get_option( 'elementor_space_between_widgets' ); - $data['site_options']['elementor_stretched_section_container'] = get_option( 'elementor_stretched_section_container' ); - $data['site_options']['elementor_load_fa4_shim'] = get_option( 'elementor_load_fa4_shim' ); - $data['site_options']['elementor_active_kit'] = get_option( 'elementor_active_kit' ); - } - - // Beaver Builder. - if ( is_plugin_active( 'beaver-builder-lite-version/fl-builder.php' ) || is_plugin_active( 'bb-plugin/fl-builder.php' ) ) { - $data['site_options']['_fl_builder_enabled_icons'] = get_option( '_fl_builder_enabled_icons' ); - $data['site_options']['_fl_builder_enabled_modules'] = get_option( '_fl_builder_enabled_modules' ); - $data['site_options']['_fl_builder_post_types'] = get_option( '_fl_builder_post_types' ); - $data['site_options']['_fl_builder_color_presets'] = get_option( '_fl_builder_color_presets' ); - $data['site_options']['_fl_builder_services'] = get_option( '_fl_builder_services' ); - $data['site_options']['_fl_builder_settings'] = get_option( '_fl_builder_settings' ); - $data['site_options']['_fl_builder_user_access'] = get_option( '_fl_builder_user_access' ); - $data['site_options']['_fl_builder_enabled_templates'] = get_option( '_fl_builder_enabled_templates' ); - } - - // Menu Icons. - if ( is_plugin_active( 'menu-icons/menu-icons.php' ) ) { - $data['site_options']['menu-icons'] = get_option( 'menu-icons' ); - } - - // Ninja Forms. - if ( is_plugin_active( 'ninja-forms/ninja-forms.php' ) ) { - $data['site_options']['ninja_forms_settings'] = get_option( 'ninja_forms_settings' ); - } - - // Social Warfare. - if ( is_plugin_active( 'social-warfare/social-warfare.php' ) ) { - $data['site_options']['socialWarfareOptions'] = get_option( 'socialWarfareOptions' ); - } - - // Elements Plus. - if ( is_plugin_active( 'elements-plus/elements-plus.php' ) ) { - $data['site_options']['elements_plus_settings'] = get_option( 'elements_plus_settings' ); - } - - // Ank Google Map. - if ( is_plugin_active( 'ank-google-map/ank-google-map.php' ) ) { - $data['site_options']['ank_google_map'] = get_option( 'ank_google_map' ); - } - - // GP Social Share. - if ( is_plugin_active( 'gp-social-share-svg/gp-social-share.php' ) ) { - $data['site_options']['gp_social_settings'] = get_option( 'gp_social_settings' ); - } - - // Active plugins. - $active_plugins = get_option( 'active_plugins' ); - $all_plugins = get_plugins(); - - $ignore = apply_filters( - 'generate_sites_ignore_plugins', - array( - 'gp-premium/gp-premium.php', - 'widget-importer-exporter/widget-importer-exporter.php', - ) - ); - - foreach ( $ignore as $plugin ) { - unset( $all_plugins[ $plugin ] ); - } - - $activated_plugins = array(); - - foreach ( $active_plugins as $p ) { - if ( isset( $all_plugins[ $p ] ) ) { - $activated_plugins[ $all_plugins[ $p ]['Name'] ] = $p; - } - } - - $data['plugins'] = $activated_plugins; - - return $data; - -} - -/** - * Get our sites from the site server. - * - * @since 1.12.0' - * @deprecated 2.0.0 - */ -function generate_get_sites_from_library() { - $remote_sites = get_transient( 'generatepress_sites' ); - $trusted_authors = get_transient( 'generatepress_sites_trusted_providers' ); - - if ( empty( $remote_sites ) ) { - $sites = array(); - - $data = wp_safe_remote_get( 'https://gpsites.co/wp-json/wp/v2/sites?per_page=100' ); - - if ( is_wp_error( $data ) ) { - set_transient( 'generatepress_sites', 'no results', 5 * MINUTE_IN_SECONDS ); - return; - } - - $data = json_decode( wp_remote_retrieve_body( $data ), true ); - - if ( ! is_array( $data ) ) { - set_transient( 'generatepress_sites', 'no results', 5 * MINUTE_IN_SECONDS ); - return; - } - - foreach ( (array) $data as $site ) { - $sites[ $site['name'] ] = array( - 'name' => $site['name'], - 'directory' => $site['directory'], - 'preview_url' => $site['preview_url'], - 'author_name' => $site['author_name'], - 'author_url' => $site['author_url'], - 'description' => $site['description'], - 'page_builder' => $site['page_builder'], - 'min_version' => $site['min_version'], - 'uploads_url' => $site['uploads_url'], - 'plugins' => $site['plugins'], - 'documentation' => $site['documentation'], - ); - } - - $sites = apply_filters( 'generate_add_sites', $sites ); - - set_transient( 'generatepress_sites', $sites, 24 * HOUR_IN_SECONDS ); - } - - if ( empty( $trusted_authors ) ) { - $trusted_authors = wp_safe_remote_get( 'https://gpsites.co/wp-json/sites/site' ); - - if ( is_wp_error( $trusted_authors ) || empty( $trusted_authors ) ) { - set_transient( 'generatepress_sites_trusted_providers', 'no results', 5 * MINUTE_IN_SECONDS ); - return; - } - - $trusted_authors = json_decode( wp_remote_retrieve_body( $trusted_authors ), true ); - - $authors = array(); - foreach ( (array) $trusted_authors['trusted_author'] as $author ) { - $authors[] = $author; - } - - set_transient( 'generatepress_sites_trusted_providers', $authors, 24 * HOUR_IN_SECONDS ); - } -} - -/** - * Fetch our sites and trusted authors. Stores them in their own transients. - * We use current_screen instead of admin_init so we can check what admin page we're on. - * - * @since 1.6 - * @deprecated 2.0.0 - */ -function generatepress_sites_init() { - $screen = get_current_screen(); - - if ( 'appearance_page_generate-options' === $screen->id || 'appearance_page_generatepress-site-library' === $screen->id ) { - generate_get_sites_from_library(); - } -} - -/** - * Initiate our Sites once everything has loaded. - * We use current_screen instead of admin_init so we can check what admin page we're on. - * - * @since 1.6 - * @deprecated 2.0.0 - */ -function generatepress_sites_output() { - if ( ! class_exists( 'GeneratePress_Site' ) ) { - return; // Bail if we don't have the needed class. - } - - $sites = get_transient( 'generatepress_sites' ); - - if ( empty( $sites ) || ! is_array( $sites ) ) { - add_action( 'generate_inside_sites_container', 'generatepress_sites_no_results_error' ); - return; - } - - if ( apply_filters( 'generate_sites_randomize', false ) ) { - shuffle( $sites ); - } - - foreach ( $sites as $site ) { - new GeneratePress_Site( $site ); - } -} - -/** - * Show an error message when no sites exist. - * - * @since 1.8.2 - * @deprecated 2.0.0 - */ -function generatepress_sites_no_results_error() { - printf( - '
- %1$s %2$s -
', - __( 'No sites found.', 'gp-premium' ), - __( 'Why?', 'gp-premium' ), - 'https://docs.generatepress.com/article/site-library-unavailable/' - ); -} - -/** - * Build each site UI. - * - * @deprecated 2.0.0 - */ -class GeneratePress_Site { - /** - * Get it rockin' - * - * @param array $config The site configuration. - */ - public function __construct( $config = array() ) { - // Do nothing. - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/inc/deprecated.php b/wp-content/upgrade-temp-backup/plugins/gp-premium/inc/deprecated.php deleted file mode 100644 index 4c713be1..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/inc/deprecated.php +++ /dev/null @@ -1,718 +0,0 @@ -current_post == 0 && $paged == 1 ) ? true : false; - - // Get our Customizer options - $generate_blog_settings = wp_parse_args( - get_option( 'generate_blog_settings', array() ), - generate_blog_get_defaults() - ); - - $masonry_post_width = $generate_blog_settings['masonry_width']; - - // Get our post meta option - $stored_meta = ( isset( $post ) ) ? get_post_meta( $post->ID, '_generate-blog-post-class', true ) : ''; - - // If our post meta option is set, use it - // Or else, use our Customizer option - if ( '' !== $stored_meta ) { - if ( 'width4' == $stored_meta && 'width4' == $generate_blog_settings['masonry_width'] ) { - $masonry_post_width = 'medium'; - } else { - $masonry_post_width = $stored_meta; - } - } - - // Return our width class - return apply_filters( 'generate_masonry_post_width', $masonry_post_width ); - } -} - -if ( ! function_exists( 'generate_blog_add_post_class_meta_box' ) ) { - /** - * Create our masonry meta box - * - * @deprecated 1.5 - */ - function generate_blog_add_post_class_meta_box() { - $generate_blog_settings = wp_parse_args( - get_option( 'generate_blog_settings', array() ), - generate_blog_get_defaults() - ); - - if ( 'true' !== $generate_blog_settings['masonry'] ) { - return; - } - - $post_types = apply_filters( 'generate_blog_masonry_metabox', array( 'post' ) ); - - add_meta_box - ( - 'generate_blog_post_class_meta_box', // $id - __('Masonry Post Width','generate-blog'), // $title - 'generate_blog_show_post_class_metabox', // $callback - $post_types, // $page - 'side', // $context - 'default' // $priority - ); - } -} - -if ( ! function_exists( 'generate_blog_show_post_class_metabox' ) ) { - /** - * Outputs the content of the metabox - * @deprecated 1.5 - */ - function generate_blog_show_post_class_metabox( $post ) { - wp_nonce_field( basename( __FILE__ ), 'generate_blog_post_class_nonce' ); - $stored_meta = get_post_meta( $post->ID ); - - // Set defaults to avoid PHP notices - if ( isset($stored_meta['_generate-blog-post-class'][0]) ) { - $stored_meta['_generate-blog-post-class'][0] = $stored_meta['_generate-blog-post-class'][0]; - } else { - $stored_meta['_generate-blog-post-class'][0] = ''; - } - ?> -

-
- -

- max_num_pages; - } - - if ( ! $paged ) { - $paged = 1; - } - - $nextpage = intval( $paged ) + 1; - - if ( ! is_single() && ( $nextpage <= $max_page ) ) { - return next_posts( $max_page, false ); - } - } -} - -/** - * Fixes a bug in Safari where images with srcset won't display when using infinite scroll. - * - * @since 1.5.5 - * @deprecated 1.6 - */ -function generate_blog_disable_infinite_scroll_srcset() { - $settings = wp_parse_args( - get_option( 'generate_blog_settings', array() ), - generate_blog_get_defaults() - ); - - if ( ! is_singular() && $settings[ 'infinite_scroll' ] ) { - add_filter( 'wp_calculate_image_srcset', '__return_empty_array' ); - } -} - -if ( ! function_exists( 'generate_blog_init' ) ) { - function generate_blog_init() { - load_plugin_textdomain( 'generate-blog', false, 'gp-premium/langs/blog/' ); - } -} - -/** - * Colors module. - */ -if ( ! function_exists( 'generate_colors_init' ) ) { - function generate_colors_init() { - load_plugin_textdomain( 'generate-colors', false, 'gp-premium/langs/colors/' ); - } -} - -if ( ! function_exists( 'generate_colors_setup' ) ) { - function generate_colors_setup() { - // Here so we can check to see if Colors is activated - } -} - -/** - * Copyright module. - */ -if ( ! function_exists( 'generate_copyright_init' ) ) { - function generate_copyright_init() { - load_plugin_textdomain( 'generate-copyright', false, 'gp-premium/langs/copyright/' ); - } -} - -/** - * Disable Elements module. - */ -if ( ! function_exists('generate_disable_elements_init') ) { - function generate_disable_elements_init() { - load_plugin_textdomain( 'disable-elements', false, 'gp-premium/langs/disable-elements/' ); - } -} - -/** - * Hooks module. - */ -if ( ! function_exists( 'generate_hooks_init' ) ) { - function generate_hooks_init() { - load_plugin_textdomain( 'generate-hooks', false, 'gp-premium/langs/hooks/' ); - } -} - -/** - * Import/Export module. - */ -if ( ! function_exists( 'generate_ie_init' ) ) { - function generate_ie_init() { - load_plugin_textdomain( 'generate-ie', false, 'gp-premium/langs/import-export/' ); - } -} - -/** - * Menu Plus module. - */ -if ( ! function_exists( 'generate_slideout_navigation_class' ) ) { - /** - * Display the classes for the slideout navigation. - * - * @since 0.1 - * @param string|array $class One or more classes to add to the class list. - */ - function generate_slideout_navigation_class( $class = '' ) { - // Separates classes with a single space, collates classes for post DIV - echo 'class="' . join( ' ', generate_get_slideout_navigation_class( $class ) ) . '"'; - } -} - -if ( ! function_exists( 'generate_get_slideout_navigation_class' ) ) { - /** - * Retrieve the classes for the slideout navigation. - * - * @since 0.1 - * @param string|array $class One or more classes to add to the class list. - * @return array Array of classes. - */ - function generate_get_slideout_navigation_class( $class = '' ) { - $classes = array(); - - if ( !empty($class) ) { - if ( !is_array( $class ) ) - $class = preg_split('#\s+#', $class); - $classes = array_merge($classes, $class); - } - - $classes = array_map('esc_attr', $classes); - - return apply_filters('generate_slideout_navigation_class', $classes, $class); - } -} - -if ( ! function_exists( 'generate_slideout_menu_class' ) ) { - /** - * Display the classes for the slideout navigation. - * - * @since 0.1 - * @param string|array $class One or more classes to add to the class list. - */ - function generate_slideout_menu_class( $class = '' ) { - // Separates classes with a single space, collates classes for post DIV - echo 'class="' . join( ' ', generate_get_slideout_menu_class( $class ) ) . '"'; - } -} - -if ( ! function_exists( 'generate_get_slideout_menu_class' ) ) { - /** - * Retrieve the classes for the slideout navigation. - * - * @since 0.1 - * @param string|array $class One or more classes to add to the class list. - * @return array Array of classes. - */ - function generate_get_slideout_menu_class( $class = '' ) { - $classes = array(); - - if ( !empty($class) ) { - if ( !is_array( $class ) ) - $class = preg_split('#\s+#', $class); - $classes = array_merge($classes, $class); - } - - $classes = array_map('esc_attr', $classes); - - return apply_filters('generate_slideout_menu_class', $classes, $class); - } -} - -if ( ! function_exists( 'generate_slideout_menu_classes' ) ) { - /** - * Adds custom classes to the menu - * @since 0.1 - */ - function generate_slideout_menu_classes( $classes ) { - $classes[] = 'slideout-menu'; - return $classes; - } -} - -if ( ! function_exists( 'generate_slideout_navigation_classes' ) ) { - /** - * Adds custom classes to the navigation - * @since 0.1 - */ - function generate_slideout_navigation_classes( $classes ){ - $slideout_effect = apply_filters( 'generate_menu_slideout_effect','overlay' ); - $slideout_position = apply_filters( 'generate_menu_slideout_position','left' ); - - $classes[] = 'main-navigation'; - $classes[] = 'slideout-navigation'; - - return $classes; - } -} - -if ( ! function_exists( 'generate_menu_plus_init' ) ) { - function generate_menu_plus_init() { - load_plugin_textdomain( 'menu-plus', false, 'gp-premium/langs/menu-plus/' ); - } -} - -if ( ! function_exists( 'generate_slideout_menu_fallback' ) ) { - /** - * Menu fallback. - * - * @param array $args - * @return string - * @since 1.1.4 - */ - function generate_slideout_menu_fallback( $args ) { - - } -} - -/** - * Page header module. - */ -if ( ! function_exists( 'generate_page_header_inside' ) ) { - /** - * Add page header inside content - * @since 0.3 - */ - function generate_page_header_inside() { - if ( ! is_page() ) { - return; - } - - if ( 'inside-content' == generate_get_page_header_location() ) { - generate_page_header_area( 'page-header-image', 'page-header-content' ); - } - } -} - -if ( ! function_exists( 'generate_page_header_single_below_title' ) ) { - /** - * Add post header below title - * @since 0.3 - */ - function generate_page_header_single_below_title() { - if ( ! is_single() ) { - return; - } - - if ( 'below-title' == generate_get_page_header_location() ) { - generate_page_header_area( 'page-header-image-single page-header-below-title', 'page-header-content-single page-header-below-title' ); - } - } -} - -if ( ! function_exists( 'generate_page_header_single_above' ) ) { - /** - * Add post header above content - * @since 0.3 - */ - function generate_page_header_single_above() { - if ( ! is_single() ) { - return; - } - - if ( 'above-content' == generate_get_page_header_location() ) { - generate_page_header_area( 'page-header-image-single', 'page-header-content-single' ); - } - } -} - -if ( ! function_exists( 'generate_page_header_single' ) ) { - /** - * Add post header inside content - * @since 0.3 - */ - function generate_page_header_single() { - $image_class = 'page-header-image-single'; - $content_class = 'page-header-content-single'; - - if ( 'below-title' == generate_get_page_header_location() ) { - $image_class = 'page-header-image-single page-header-below-title'; - $content_class = 'page-header-content-single page-header-below-title'; - } - - if ( 'inside-content' == generate_get_page_header_location() ) { - generate_page_header_area( $image_class, $content_class ); - } - } -} - -if ( ! function_exists( 'generate_page_header_init' ) ) { - function generate_page_header_init() { - load_plugin_textdomain( 'page-header', false, 'gp-premium/langs/page-header/' ); - } -} - -/** - * Secondary Navigation module. - */ -if ( ! function_exists( 'generate_secondary_nav_init' ) ) { - function generate_secondary_nav_init() { - load_plugin_textdomain( 'secondary-nav', false, 'gp-premium/langs/secondary-nav/' ); - } -} - -/** - * Sections module. - */ -if ( ! function_exists( 'generate_sections_init' ) ) { - function generate_sections_init() { - load_plugin_textdomain( 'generate-sections', false, 'gp-premium/langs/sections/' ); - } -} - -if ( ! function_exists( 'generate_sections_metabox_init' ) ) { - /* - * Enqueue styles and scripts specific to metaboxs - */ - function generate_sections_metabox_init(){ - - // I prefer to enqueue the styles only on pages that are using the metaboxes - wp_enqueue_style( 'generate-sections-metabox', plugin_dir_url( __FILE__ ) . 'wpalchemy/css/meta.css'); - wp_enqueue_style( 'generate-style-grid', get_template_directory_uri() . '/css/unsemantic-grid.css', false, GENERATE_VERSION, 'all' ); - - //make sure we enqueue some scripts just in case ( only needed for repeating metaboxes ) - wp_enqueue_script( 'jquery' ); - wp_enqueue_script( 'jquery-ui-core' ); - wp_enqueue_script( 'jquery-ui-widget' ); - wp_enqueue_script( 'jquery-ui-mouse' ); - wp_enqueue_script( 'jquery-ui-sortable' ); - wp_enqueue_style( 'wp-color-picker' ); - - // special script for dealing with repeating textareas- needs to run AFTER all the tinyMCE init scripts, so make 'editor' a requirement - wp_enqueue_script( 'generate-sections-metabox', plugin_dir_url( __FILE__ ) . 'wpalchemy/js/sections-metabox.js', array( 'jquery', 'editor', 'media-upload', 'wp-color-picker' ), GENERATE_SECTIONS_VERSION, true ); - $translation_array = array( - 'no_content_error' => __( 'Error: Content already detected in default editor.', 'gp-premium' ), - 'use_visual_editor' => __( 'Please activate the "Visual" tab in your main editor before transferring content.', 'gp-premium' ) - ); - wp_localize_script( 'generate-sections-metabox', 'generate_sections', $translation_array ); - } -} - -/** - * Spacing module. - */ -if ( ! function_exists( 'generate_spacing_init' ) ) { - function generate_spacing_init() { - load_plugin_textdomain( 'generate-spacing', false, 'gp-premium/langs/spacing/' ); - } -} - -if ( ! function_exists( 'generate_spacing_setup' ) ) { - function generate_spacing_setup() { - // Here so we can check to see if Spacing is active - } -} - -/** - * Typography module. - */ -if ( ! function_exists( 'generate_typography_init' ) ) { - function generate_typography_init() { - load_plugin_textdomain( 'generate-typography', false, 'gp-premium/langs/typography/' ); - } -} - -if ( ! function_exists( 'generate_fonts_setup' ) ) { - function generate_fonts_setup() { - // Here to check if Typography is active - } -} - -/** - * WooCommerce module. - */ -if ( ! function_exists( 'generate_woocommerce_init' ) ) { - function generate_woocommerce_init() { - load_plugin_textdomain( 'generate-woocommerce', false, 'gp-premium/langs/woocommerce/' ); - } -} - -/** - * Use text instead of an icon if essentials are in use. - * - * @since 1.3 - * @deprecated 1.6 - * - * @param string $icon Existing icon HTML. - * @return string New icon HTML. - */ -function generatepress_wc_essentials_menu_icon( $icon ) { - if ( apply_filters( 'generate_fontawesome_essentials', false ) ) { - return __( 'Cart', 'gp-premium' ); - } - - return $icon; -} - -if ( ! function_exists( 'generate_activation_styles' ) ) { - function generate_activation_styles() { - // Added to dashboard.css - } -} - -if ( ! function_exists( 'generate_verify_styles' ) ) { - function generate_verify_styles() { - // Added to dashboard.css - } -} - -if ( ! function_exists( 'generate_add_license_key_field' ) ) { - function generate_add_license_key_field() { - // Replaced by generatepress_premium_license_key_field() - } -} - -if ( ! function_exists( 'generate_premium_license_key' ) ) { - function generate_premium_license_key() { - // Replaced by generatepress_premium_license_key_field() - } -} - -if ( ! function_exists( 'generate_save_premium_license_key' ) ) { - function generate_save_premium_license_key() { - // Replaced by generatepress_premium_process_license_key() - } -} - - -if ( ! function_exists( 'generate_process_license_key' ) ) { - function generate_process_license_key() { - // Replaced by generatepress_premium_process_license_key() - } -} - -/** - * Add the Refresh sites link after the list of sites. - * - * @since 1.6 - * @deprecated 1.7 - */ -function generate_sites_refresh_link() { - if ( ! generate_is_sites_dashboard() ) { - return; - } - - printf( - '
- %2$s -
', - wp_nonce_url( admin_url( 'themes.php?page=generate-options&area=generate-sites' ), 'refresh_sites', 'refresh_sites_nonce' ), - __( 'Refresh Sites', 'gp-premium' ) - ); -} - -/** - * Delete our sites transient if the Refresh sites link is clicked. - * - * @since 1.6 - * @deprecated 1.12.0 - */ -function generate_sites_refresh_list() { - if ( ! isset( $_GET['refresh_sites_nonce'] ) || ! wp_verify_nonce( $_GET['refresh_sites_nonce'], 'refresh_sites' ) ) { - return; - } - - delete_transient( 'generatepress_sites' ); -} - -if ( ! function_exists( 'generate_insert_import_export' ) ) { - /** - * @deprecated 1.7 - */ - function generate_insert_import_export() { - // Replaced by GeneratePress_Import_Export::build_html() - } -} - -if ( ! function_exists( 'generate_ie_import_form' ) ) { - /** - * @deprecated 1.7 - */ - function generate_ie_import_form() { - // Replaced by GeneratePress_Import_Export::build_html() - } -} - -if ( ! function_exists( 'generate_process_settings_export' ) ) { - /** - * Process a settings export that generates a .json file of the shop settings - * - * @deprecated 1.7 - */ - function generate_process_settings_export() { - // Replaced by GeneratePress_Import_Export::export() - } -} - -if ( ! function_exists( 'generate_process_settings_import' ) ) { - /** - * Process a settings import from a json file - * - * @deprecated 1.7 - */ - function generate_process_settings_import() { - // Replaced by GeneratePress_Import_Export::import() - } -} - -if ( ! function_exists( 'generate_ie_exportable' ) ) { - /** - * @deprecated 1.7 - */ - function generate_ie_exportable() { - // A check to see if other addons can add their export button - } -} - -/** - * Build our dynamic CSS. - * - * @since 1.6 - */ -function generate_menu_plus_make_css() { - // Replaced by generate_do_off_canvas_css() -} - -/** - * Enqueue our dynamic CSS. - * - * @since 1.6 - */ -function generate_menu_plus_enqueue_dynamic_css() { - // No longer needed. -} - -if ( ! function_exists( 'generate_hidden_secondary_navigation' ) && function_exists( 'is_customize_preview' ) ) { - /** - * Adds a hidden navigation if no navigation is set - * This allows us to use postMessage to position the navigation when it doesn't exist - */ - function generate_hidden_secondary_navigation() { - if ( is_customize_preview() && function_exists( 'generate_secondary_navigation_position' ) ) { - ?> -
- -
- $desktop, - 'tablet' => $tablet, - 'mobile' => $mobile, - 'mobile-menu' => $mobile_menu, - ) - ); - - return $queries[ $name ]; -} - -/** - * Get our CSS print method. - * - * @since 1.11.0 - */ -function generate_get_css_print_method() { - $mode = apply_filters( 'generatepress_dynamic_css_print_method', 'inline' ); - - if ( - ( function_exists( 'is_customize_preview' ) && is_customize_preview() ) - || - is_preview() - || - // AMP inlines all CSS, so inlining from the start improves CSS processing performance. - ( function_exists( 'is_amp_endpoint' ) && is_amp_endpoint() ) - ) { - return 'inline'; - } - - if ( ! defined( 'GENERATE_VERSION' ) ) { - return 'inline'; - } - - return $mode; -} - -/** - * Check to see if we have a Block Element. - * - * @since 2.0.0 - * @param string $element The type of element to check. - * @param boolean $block_element Whether it's a block element or not. - */ -function generate_has_active_element( $element, $block_element ) { - global $generate_elements; - - if ( ! empty( $generate_elements ) ) { - foreach ( (array) $generate_elements as $key => $data ) { - if ( $element === $data['type'] && $block_element === $data['is_block_element'] ) { - return true; - } - } - } - - return false; -} - -/** - * Check our GeneratePress version. - * - * @since 2.1.0 - */ -function generate_premium_get_theme_version() { - return defined( 'GENERATE_VERSION' ) ? GENERATE_VERSION : false; -} - -/** - * Remove the featured-image-active class if needed. - * - * @since 2.1.0 - */ -function generate_premium_remove_featured_image_class( $classes, $remove_class ) { - if ( $remove_class && in_array( 'featured-image-active', $classes ) ) { - $classes = array_diff( $classes, array( 'featured-image-active' ) ); - } - - return $classes; -} - -/** - * Returns the global $wp_filesystem with credentials set. - * Returns null in case of any errors. - * - * @return WP_Filesystem_Base|null - */ -function generate_premium_get_wp_filesystem() { - global $wp_filesystem; - - $success = true; - - // Initialize the file system if it has not been done yet. - if ( ! $wp_filesystem ) { - require_once ABSPATH . '/wp-admin/includes/file.php'; - - $constants = array( - 'hostname' => 'FTP_HOST', - 'username' => 'FTP_USER', - 'password' => 'FTP_PASS', - 'public_key' => 'FTP_PUBKEY', - 'private_key' => 'FTP_PRIKEY', - ); - - $credentials = array(); - - // We provide credentials based on wp-config.php constants. - // Reference https://developer.wordpress.org/apis/wp-config-php/#wordpress-upgrade-constants. - foreach ( $constants as $key => $constant ) { - if ( defined( $constant ) ) { - $credentials[ $key ] = constant( $constant ); - } - } - - $success = WP_Filesystem( $credentials ); - } - - if ( ! $success || $wp_filesystem->errors->has_errors() ) { - return null; - } - - return $wp_filesystem; -} diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/inc/legacy/activation.php b/wp-content/upgrade-temp-backup/plugins/gp-premium/inc/legacy/activation.php deleted file mode 100644 index 3d713e32..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/inc/legacy/activation.php +++ /dev/null @@ -1,623 +0,0 @@ -base ) { - return; - } - - wp_enqueue_style( 'generate-premium-dashboard', plugin_dir_url( __FILE__ ) . 'assets/dashboard.css', array(), GP_PREMIUM_VERSION ); - wp_enqueue_script( 'generate-premium-dashboard', plugin_dir_url( __FILE__ ) . 'assets/dashboard.js', array( 'jquery' ), GP_PREMIUM_VERSION, true ); - - wp_localize_script( - 'generate-premium-dashboard', - 'dashboard', - array( - 'deprecated_module' => esc_attr__( 'This module has been deprecated. Deactivating it will remove it from this list.', 'gp-premium' ), - ) - ); -} - -if ( ! function_exists( 'generate_premium_notices' ) ) { - add_action( 'admin_notices', 'generate_premium_notices' ); - /* - * Set up errors and messages - */ - function generate_premium_notices() { - if ( isset( $_GET['generate-message'] ) && 'addon_deactivated' == $_GET['generate-message'] ) { - add_settings_error( 'generate-premium-notices', 'addon_deactivated', __( 'Module deactivated.', 'gp-premium' ), 'updated' ); - } - - if ( isset( $_GET['generate-message'] ) && 'addon_activated' == $_GET['generate-message'] ) { - add_settings_error( 'generate-premium-notices', 'addon_activated', __( 'Module activated.', 'gp-premium' ), 'updated' ); - } - - settings_errors( 'generate-premium-notices' ); - } -} - -if ( ! function_exists( 'generate_license_errors' ) ) { - add_action( 'admin_notices', 'generate_license_errors' ); - /* - * Set up errors and messages - */ - function generate_license_errors() { - if ( isset( $_GET['generate-message'] ) && 'deactivation_passed' == $_GET['generate-message'] ) { - add_settings_error( 'generate-license-notices', 'deactivation_passed', __( 'License deactivated.', 'gp-premium' ), 'updated' ); - } - - if ( isset( $_GET['generate-message'] ) && 'license_activated' == $_GET['generate-message'] ) { - add_settings_error( 'generate-license-notices', 'license_activated', __( 'License activated.', 'gp-premium' ), 'updated' ); - } - - if ( isset( $_GET['sl_activation'] ) && ! empty( $_GET['message'] ) ) { - - switch ( $_GET['sl_activation'] ) { - - case 'false': - $message = urldecode( $_GET['message'] ); - add_settings_error( 'generate-license-notices', 'license_failed', $message, 'error' ); - break; - - case 'true': - default: - break; - - } - } - - settings_errors( 'generate-license-notices' ); - } -} - -if ( ! function_exists( 'generate_super_package_addons' ) ) { - add_action( 'generate_options_items', 'generate_super_package_addons', 5 ); - /** - * Build the area that allows us to activate and deactivate modules. - * - * @since 0.1 - */ - function generate_super_package_addons() { - $addons = array( - 'Backgrounds' => 'generate_package_backgrounds', - 'Blog' => 'generate_package_blog', - 'Colors' => 'generate_package_colors', - 'Copyright' => 'generate_package_copyright', - 'Disable Elements' => 'generate_package_disable_elements', - 'Elements' => 'generate_package_elements', - 'Hooks' => 'generate_package_hooks', - 'Menu Plus' => 'generate_package_menu_plus', - 'Page Header' => 'generate_package_page_header', - 'Secondary Nav' => 'generate_package_secondary_nav', - 'Sections' => 'generate_package_sections', - 'Spacing' => 'generate_package_spacing', - 'Typography' => 'generate_package_typography', - 'WooCommerce' => 'generate_package_woocommerce', - ); - - if ( version_compare( PHP_VERSION, '5.4', '>=' ) && ! defined( 'GENERATE_DISABLE_SITE_LIBRARY' ) ) { - $addons['Site Library'] = 'generate_package_site_library'; - } - - if ( function_exists( 'generate_is_using_dynamic_typography' ) && generate_is_using_dynamic_typography() ) { - unset( $addons['Typography'] ); - } - - if ( version_compare( generate_premium_get_theme_version(), '3.1.0-alpha.1', '>=' ) ) { - unset( $addons['Colors'] ); - } - - ksort( $addons ); - - $addon_count = 0; - foreach ( $addons as $k => $v ) { - if ( 'activated' == get_option( $v ) ) - $addon_count++; - } - - $key = get_option( 'gen_premium_license_key_status', 'deactivated' ); - $version = ( defined( 'GP_PREMIUM_VERSION' ) ) ? GP_PREMIUM_VERSION : ''; - - ?> -
-

-
-
-
-
-
- - - - -
-
- $v ) : - - $key = get_option( $v ); - - if( $key == 'activated' ) { ?> -
-
- - -
-
- - -
-
- -
- -
- type="checkbox" class="addon-checkbox" name="generate_addon_checkbox[]" value="" /> - -
- -
- - - - - - -
- -
-
'; - endforeach; - ?> - -
-
- - 'generate_package_typography', - 'Colors' => 'generate_package_colors', - 'Backgrounds' => 'generate_package_backgrounds', - 'Page Header' => 'generate_package_page_header', - 'Sections' => 'generate_package_sections', - 'Copyright' => 'generate_package_copyright', - 'Disable Elements' => 'generate_package_disable_elements', - 'Elements' => 'generate_package_elements', - 'Blog' => 'generate_package_blog', - 'Hooks' => 'generate_package_hooks', - 'Spacing' => 'generate_package_spacing', - 'Secondary Nav' => 'generate_package_secondary_nav', - 'Menu Plus' => 'generate_package_menu_plus', - 'WooCommerce' => 'generate_package_woocommerce', - ); - - if ( version_compare( PHP_VERSION, '5.4', '>=' ) && ! defined( 'GENERATE_DISABLE_SITE_LIBRARY' ) ) { - $addons['Site Library'] = 'generate_package_site_library'; - } - - foreach( $addons as $k => $v ) : - - if ( isset( $_POST[$v . '_activate_package'] ) ) { - - // If we didn't click the button, bail. - if ( ! check_admin_referer( $v . '_activate_nonce', $v . '_activate_nonce' ) ) { - return; - } - - // If we're not an administrator, bail. - if ( ! current_user_can( 'manage_options' ) ) { - return; - } - - $autoload = null; - - if ( 'generate_package_site_library' === $v ) { - $autoload = false; - } - - update_option( $v, 'activated', $autoload ); - wp_safe_redirect( admin_url( 'themes.php?page=generate-options&generate-message=addon_activated' ) ); - exit; - } - - endforeach; - } -} - -/*********************************************** -* Deactivate the plugin -***********************************************/ -if ( ! function_exists( 'generate_deactivate_super_package_addons' ) ) { - add_action( 'admin_init', 'generate_deactivate_super_package_addons' ); - - function generate_deactivate_super_package_addons() { - $addons = array( - 'Typography' => 'generate_package_typography', - 'Colors' => 'generate_package_colors', - 'Backgrounds' => 'generate_package_backgrounds', - 'Page Header' => 'generate_package_page_header', - 'Sections' => 'generate_package_sections', - 'Copyright' => 'generate_package_copyright', - 'Disable Elements' => 'generate_package_disable_elements', - 'Elements' => 'generate_package_elements', - 'Blog' => 'generate_package_blog', - 'Hooks' => 'generate_package_hooks', - 'Spacing' => 'generate_package_spacing', - 'Secondary Nav' => 'generate_package_secondary_nav', - 'Menu Plus' => 'generate_package_menu_plus', - 'WooCommerce' => 'generate_package_woocommerce', - ); - - if ( version_compare( PHP_VERSION, '5.4', '>=' ) && ! defined( 'GENERATE_DISABLE_SITE_LIBRARY' ) ) { - $addons['Site Library'] = 'generate_package_site_library'; - } - - foreach( $addons as $k => $v ) : - - if ( isset( $_POST[$v . '_deactivate_package'] ) ) { - - // If we didn't click the button, bail. - if ( ! check_admin_referer( $v . '_deactivate_nonce', $v . '_deactivate_nonce' ) ) { - return; - } - - // If we're not an administrator, bail. - if ( ! current_user_can( 'manage_options' ) ) { - return; - } - - $autoload = null; - - if ( 'generate_package_site_library' === $v ) { - $autoload = false; - } - - update_option( $v, 'deactivated', $autoload ); - wp_safe_redirect( admin_url('themes.php?page=generate-options&generate-message=addon_deactivated' ) ); - exit; - } - - endforeach; - } -} - -if ( ! function_exists( 'generate_premium_body_class' ) ) { - add_filter( 'admin_body_class', 'generate_premium_body_class' ); - /** - * Add a class or many to the body in the dashboard - */ - function generate_premium_body_class( $classes ) { - return "$classes gp_premium"; - } -} - -if ( ! function_exists( 'generate_activation_area' ) ) { - add_action( 'generate_admin_right_panel', 'generate_activation_area' ); - - function generate_activation_area() { - $license = get_option( 'gen_premium_license_key', '' ); - $key = get_option( 'gen_premium_license_key_status', 'deactivated' ); - - if ( 'valid' == $key ) { - $message = sprintf( '%s', __( 'Receiving updates', 'gp-premium' ) ); - } else { - $message = sprintf( '%s', __( 'Not receiving updates', 'gp-premium' ) ); - } - ?> -
-
-

- - - - [?] - -

- -
-
-

- -

- -

> - /> - -

- - - -
-
-
-
- 'activate_license', - 'license' => $new, - 'item_name' => urlencode( 'GP Premium' ), - 'url' => home_url() - ); - } - - // If we don't have a value (it's been cleared), run deactivation. - if ( '' == $new && 'valid' == get_option( 'gen_premium_license_key_status' ) ) { - $api_params = array( - 'edd_action' => 'deactivate_license', - 'license' => $old, - 'item_name' => urlencode( 'GP Premium' ), - 'url' => home_url() - ); - } - - // Nothing? Get out of here. - if ( ! isset( $api_params ) ) { - wp_safe_redirect( admin_url( 'themes.php?page=generate-options' ) ); - exit; - } - - // Phone home. - $license_response = wp_remote_post( 'https://generatepress.com', array( - 'timeout' => 60, - 'sslverify' => false, - 'body' => $api_params - ) ); - - // Make sure the response came back okay. - if ( is_wp_error( $license_response ) || 200 !== wp_remote_retrieve_response_code( $license_response ) ) { - if ( is_object( $license_response ) ) { - $message = $license_response->get_error_message(); - } elseif ( is_array( $license_response ) && isset( $license_response['response']['message'] ) ) { - if ( 'Forbidden' === $license_response['response']['message'] ) { - $message = __( '403 Forbidden. Your server is not able to communicate with generatepress.com in order to activate your license key.', 'gp-premium' ); - } else { - $message = $license_response['response']['message']; - } - } - } else { - - // Still here? Decode our response. - $license_data = json_decode( wp_remote_retrieve_body( $license_response ) ); - - if ( false === $license_data->success ) { - - switch ( $license_data->error ) { - - case 'expired' : - - $message = sprintf( - __( 'Your license key expired on %s.', 'gp-premium' ), - date_i18n( get_option( 'date_format' ), strtotime( $license_data->expires, current_time( 'timestamp' ) ) ) - ); - break; - - case 'revoked' : - - $message = __( 'Your license key has been disabled.', 'gp-premium' ); - break; - - case 'missing' : - - $message = __( 'Invalid license.', 'gp-premium' ); - break; - - case 'invalid' : - case 'site_inactive' : - - $message = __( 'Your license is not active for this URL.', 'gp-premium' ); - break; - - case 'item_name_mismatch' : - - $message = __( 'This appears to be an invalid license key for GP Premium.', 'gp-premium' ); - break; - - case 'no_activations_left': - - $message = __( 'Your license key has reached its activation limit.', 'gp-premium' ); - break; - - default : - - $message = __( 'An error occurred, please try again.', 'gp-premium' ); - break; - } - - } - - } - - // Check if anything passed on a message constituting a failure - if ( ! empty( $message ) ) { - delete_option( 'gen_premium_license_key_status' ); - $base_url = admin_url( 'themes.php?page=generate-options' ); - $redirect = add_query_arg( array( 'sl_activation' => 'false', 'message' => urlencode( $message ) ), esc_url( $base_url ) ); - wp_redirect( $redirect ); - exit(); - } - - // Update our license key status - update_option( 'gen_premium_license_key_status', $license_data->license ); - - if ( 'valid' == $license_data->license ) { - // Validated, go tell them - wp_safe_redirect( admin_url( 'themes.php?page=generate-options&generate-message=license_activated' ) ); - exit; - } elseif ( 'deactivated' == $license_data->license ) { - // Deactivated, go tell them - wp_safe_redirect( admin_url( 'themes.php?page=generate-options&generate-message=deactivation_passed' ) ); - exit; - } else { - // Failed, go tell them - wp_safe_redirect( admin_url( 'themes.php?page=generate-options&generate-message=license_failed' ) ); - exit; - } - } -} - -if ( ! function_exists( 'generate_license_missing' ) ) { - add_action( 'in_plugin_update_message-gp-premium/gp-premium.php', 'generate_license_missing', 10, 2 ); - /** - * Add a message to the plugin update area if no license key is set - */ - function generate_license_missing() { - $license = get_option( 'gen_premium_license_key_status' ); - - if ( 'valid' !== $license ) { - echo ' ' . __( 'Enter valid license key for automatic updates.', 'gp-premium' ) . ''; - } - } -} - -add_filter( 'generate_premium_beta_tester', 'generatepress_premium_beta_tester' ); -/** - * Enable beta testing if our option is set. - * - * @since 1.6 - */ -function generatepress_premium_beta_tester( $value ) { - if ( get_option( 'gp_premium_beta_testing', false ) ) { - return true; - } - - return $value; -} diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/inc/legacy/assets/dashboard.css b/wp-content/upgrade-temp-backup/plugins/gp-premium/inc/legacy/assets/dashboard.css deleted file mode 100644 index 700993cb..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/inc/legacy/assets/dashboard.css +++ /dev/null @@ -1,199 +0,0 @@ -.generatepress-dashboard-tabs { - margin-bottom: 40px; -} - -.generatepress-dashboard-tabs a { - background-color: rgba(255,255,255,0.5); - border: 1px solid #ddd; - padding: 10px 15px; - cursor: pointer; - color: #222; - display: inline-block; - text-decoration: none; -} - -.generatepress-dashboard-tabs a:not(:last-child) { - border-right: 0; -} - -.generatepress-dashboard-tabs a.active { - background-color: #ffffff; - border-color: #ccc; - font-weight: 500; -} - -input#generate-select-all, -.addon-checkbox { - margin-right: 15px !important; -} -.gp-premium-version, -.gp-addon-count { - display: block; - color:#ccc; -} - -.addon-container:before, -.addon-container:after { - content: "."; - display: block; - overflow: hidden; - visibility: hidden; - font-size: 0; - line-height: 0; - width: 0; - height: 0; -} - -.addon-container:after { - clear: both; -} - -.premium-addons .gp-clear { - margin: 0 !important; - border: 0; - padding: 0 !important; -} - -.premium-addons .add-on.gp-clear { - padding: 15px !important; - margin: 0 !important; - box-shadow: 0 -1px 0 rgba(0, 0, 0, 0.1) inset; -} - -.premium-addons .add-on:last-child { - border: 0 !important; -} - -.addon-action { - float: right; - clear: right; -} - -.addon-name { - float: left; -} - -.premium-addons .add-on.gp-clear.activated { - background-color:#F7FCFE !important; - border-left: 5px solid #2EA2CC !important; - font-weight: bold; - padding-left: 10px !important; -} - -.premium-addons .addon-action input[type="submit"], -.premium-addons .addon-action input[type="submit"]:visited { - background: none; - border: 0; - color: #0d72b2; - padding: 0; - font-size: inherit; - cursor: pointer; - box-shadow: 0 0 0 transparent; -} - -.premium-addons .addon-action input[type="submit"]:hover, -.premium-addons .addon-action input[type="submit"]:focus { - background: none; - border: 0; - color: #0f92e5; - padding: 0; - font-size: inherit; - box-shadow: 0 0 0 transparent; -} - -.premium-addons input[type="submit"].hide-customizer-button, -.premium-addons input[type="submit"]:visited.hide-customizer-button { - color: #a00; - font-weight: normal; -} - -.premium-addons input[type="submit"]:hover.hide-customizer-button, -.premium-addons input[type="submit"]:focus.hide-customizer-button { - color: red; - font-weight: normal; -} - -.premium-addons input[type="submit"].hide-customizer-button { - display: none; -} - -.premium-addons .add-on.activated:hover input[type="submit"].hide-customizer-button { - display: inline; -} - -.gp_premium input[name="generate_activate_all"] { - display: none; -} - -.email-container .addon-name { - width: 75%; - min-width: 150px; -} - -.license-key-container { - margin-bottom:15px; -} - -.license-key-container:last-child { - margin:0; -} - -.license-key-info { - float: right; - text-decoration: none; -} - -.license-key-container label { - font-size: 11px; - font-weight: normal; - color: #777; - display: inline-block; - margin-bottom: 0; -} - -.status { - position: absolute; - right:10px; - top:-1px; - background:rgba(255,255,255,0.9); -} - -.license-key-input { - width:100%; - box-sizing:border-box; - padding:10px; -} - -.license-key-input::-webkit-credentials-auto-fill-button { - visibility: hidden; - pointer-events: none; - position: absolute; - right: 0; -} - -.license-key-button { - position:relative; - top:1px; - width:100%; - box-sizing:border-box; - padding: 10px !important; - height:auto !important; - line-height:normal !important; -} - -.license-key-message { - font-size: 80%; - font-weight: normal; -} - -.license-key-message.receiving-updates { - color: green; -} - -.license-key-message.not-receiving-updates { - color: red; -} - -.mass-activate-select { - margin-top: 0; -} diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/inc/legacy/assets/dashboard.js b/wp-content/upgrade-temp-backup/plugins/gp-premium/inc/legacy/assets/dashboard.js deleted file mode 100644 index e789014f..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/inc/legacy/assets/dashboard.js +++ /dev/null @@ -1,48 +0,0 @@ -jQuery( function( $ ) { - $( '#generate-select-all' ).on( 'click', function() { - if ( this.checked ) { - $( '.addon-checkbox:not(:disabled)' ).each( function() { - this.checked = true; - } ); - } else { - $( '.addon-checkbox' ).each( function() { - this.checked = false; - } ); - } - } ); - - $( '#generate_license_key_gp_premium' ).on( 'input', function() { - if ( '' !== $.trim( this.value ) ) { - $( '.beta-testing-container' ).show(); - } else { - $( '.beta-testing-container' ).hide(); - } - } ); - - $( 'input[name="generate_package_hooks_deactivate_package"]' ).on( 'click', function() { - // eslint-disable-next-line no-alert - var check = confirm( dashboard.deprecated_module ); - - if ( ! check ) { - return false; - } - } ); - - $( 'input[name="generate_package_page_header_deactivate_package"]' ).on( 'click', function() { - // eslint-disable-next-line no-alert - var check = confirm( dashboard.deprecated_module ); - - if ( ! check ) { - return false; - } - } ); - - $( 'input[name="generate_package_sections_deactivate_package"]' ).on( 'click', function() { - // eslint-disable-next-line no-alert - var check = confirm( dashboard.deprecated_module ); - - if ( ! check ) { - return false; - } - } ); -} ); diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/inc/legacy/dashboard.php b/wp-content/upgrade-temp-backup/plugins/gp-premium/inc/legacy/dashboard.php deleted file mode 100644 index 2ea4d584..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/inc/legacy/dashboard.php +++ /dev/null @@ -1,47 +0,0 @@ - array( - 'name' => __( 'Modules', 'gp-premium' ), - 'url' => admin_url( 'themes.php?page=generate-options' ), - 'class' => 'appearance_page_generate-options' === $screen->id ? 'active' : '', - ), - ) ); - - // Don't print any markup if we only have one tab. - if ( count( $tabs ) === 1 ) { - return; - } - ?> -
- %3$s', - esc_url( $tab['url'] ), - esc_attr( $tab['class'] ), - esc_html( $tab['name'] ) - ); - } - ?> -
- -
-

-
-
-

- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

-

- - '' ) ); ?> -

-
- -

-
-

- -

-

- - - '' ) ); ?> -

-
-
-
- array(), - 'mods' => array(), - 'options' => array(), - ); - - foreach ( $modules as $name => $value ) { - if ( 'activated' === get_option( $value ) ) { - $data['modules'][ $name ] = $value; - } - } - - foreach ( $theme_mods as $theme_mod ) { - if ( 'generate_copyright' === $theme_mod ) { - if ( in_array( 'copyright', $_POST['module_group'] ) ) { - $data['mods'][ $theme_mod ] = get_theme_mod( $theme_mod ); - } - } else { - if ( in_array( 'generate_settings', $_POST['module_group'] ) ) { - $data['mods'][ $theme_mod ] = get_theme_mod( $theme_mod ); - } - } - } - - foreach ( $settings as $setting ) { - if ( in_array( $setting, $_POST['module_group'] ) ) { - $data['options'][ $setting ] = get_option( $setting ); - } - } - - $data = apply_filters( 'generate_export_data', $data ); - - nocache_headers(); - header( 'Content-Type: application/json; charset=utf-8' ); - header( 'Content-Disposition: attachment; filename=generate-settings-export-' . date( 'Ymd' ) . '.json' ); // phpcs:ignore -- Prefer date(). - header( 'Expires: 0' ); - - echo wp_json_encode( $data ); - exit; - } - - /** - * Import our exported file. - * - * @since 1.7 - */ - public static function import() { - if ( empty( $_POST['generate_action'] ) || 'import_settings' !== $_POST['generate_action'] ) { - return; - } - - if ( ! wp_verify_nonce( $_POST['generate_import_nonce'], 'generate_import_nonce' ) ) { - return; - } - - if ( ! current_user_can( 'manage_options' ) ) { - return; - } - - $filename = $_FILES['import_file']['name']; - $extension = end( explode( '.', $_FILES['import_file']['name'] ) ); - - if ( 'json' !== $extension ) { - wp_die( __( 'Please upload a valid .json file', 'gp-premium' ) ); - } - - $import_file = $_FILES['import_file']['tmp_name']; - - if ( empty( $import_file ) ) { - wp_die( __( 'Please upload a file to import', 'gp-premium' ) ); - } - - // Retrieve the settings from the file and convert the json object to an array. - $settings = json_decode( file_get_contents( $import_file ), true ); // phpcs:ignore -- file_get_contents() is fine here. - - foreach ( (array) $settings['modules'] as $key => $val ) { - if ( in_array( $val, self::get_modules() ) ) { - update_option( $val, 'activated' ); - } - } - - foreach ( (array) $settings['mods'] as $key => $val ) { - if ( in_array( $key, self::get_theme_mods() ) ) { - set_theme_mod( $key, $val ); - } - } - - foreach ( (array) $settings['options'] as $key => $val ) { - if ( in_array( $key, self::get_settings() ) ) { - update_option( $key, $val ); - } - } - - // Delete existing dynamic CSS cache. - delete_option( 'generate_dynamic_css_output' ); - delete_option( 'generate_dynamic_css_cached_version' ); - - $dynamic_css_data = get_option( 'generatepress_dynamic_css_data', array() ); - - if ( isset( $dynamic_css_data['updated_time'] ) ) { - unset( $dynamic_css_data['updated_time'] ); - } - - update_option( 'generatepress_dynamic_css_data', $dynamic_css_data ); - - wp_safe_redirect( admin_url( 'admin.php?page=generate-options&status=imported' ) ); - exit; - } - - /** - * List out our available modules. - * - * @since 1.7 - */ - public static function get_modules() { - return array( - 'Backgrounds' => 'generate_package_backgrounds', - 'Blog' => 'generate_package_blog', - 'Colors' => 'generate_package_colors', - 'Copyright' => 'generate_package_copyright', - 'Elements' => 'generate_package_elements', - 'Disable Elements' => 'generate_package_disable_elements', - 'Hooks' => 'generate_package_hooks', - 'Menu Plus' => 'generate_package_menu_plus', - 'Page Header' => 'generate_package_page_header', - 'Secondary Nav' => 'generate_package_secondary_nav', - 'Sections' => 'generate_package_sections', - 'Spacing' => 'generate_package_spacing', - 'Typography' => 'generate_package_typography', - 'WooCommerce' => 'generate_package_woocommerce', - ); - } - - /** - * List our our set theme mods. - * - * @since 1.7 - */ - public static function get_theme_mods() { - return array( - 'font_body_variants', - 'font_body_category', - 'font_site_title_variants', - 'font_site_title_category', - 'font_site_tagline_variants', - 'font_site_tagline_category', - 'font_navigation_variants', - 'font_navigation_category', - 'font_secondary_navigation_variants', - 'font_secondary_navigation_category', - 'font_buttons_variants', - 'font_buttons_category', - 'font_heading_1_variants', - 'font_heading_1_category', - 'font_heading_2_variants', - 'font_heading_2_category', - 'font_heading_3_variants', - 'font_heading_3_category', - 'font_heading_4_variants', - 'font_heading_4_category', - 'font_heading_5_variants', - 'font_heading_5_category', - 'font_heading_6_variants', - 'font_heading_6_category', - 'font_widget_title_variants', - 'font_widget_title_category', - 'font_footer_variants', - 'font_footer_category', - 'generate_copyright', - ); - } - - /** - * List out our available settings. - * - * @since 1.7 - */ - public static function get_settings() { - return array( - 'generate_settings', - 'generate_background_settings', - 'generate_blog_settings', - 'generate_hooks', - 'generate_page_header_settings', - 'generate_secondary_nav_settings', - 'generate_spacing_settings', - 'generate_menu_plus_settings', - 'generate_woocommerce_settings', - ); - } -} - -GeneratePress_Import_Export::get_instance(); diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/inc/legacy/reset.php b/wp-content/upgrade-temp-backup/plugins/gp-premium/inc/legacy/reset.php deleted file mode 100644 index bdcdca6f..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/inc/legacy/reset.php +++ /dev/null @@ -1,273 +0,0 @@ - -
-

-
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

-

- esc_js( $warning ), - 'id' => '', - ) - ); - ?> -

-
-
-
- array(), - 'options' => array(), - ); - - foreach ( $theme_mods as $theme_mod ) { - if ( 'generate_copyright' === $theme_mod ) { - if ( in_array( 'copyright', $_POST['module_group'] ) ) { - remove_theme_mod( $theme_mod ); - } - } else { - if ( in_array( 'generate_settings', $_POST['module_group'] ) ) { - remove_theme_mod( $theme_mod ); - } - } - } - - foreach ( $settings as $setting ) { - if ( in_array( $setting, $_POST['module_group'] ) ) { - delete_option( $setting ); - } - } - - // Delete our dynamic CSS option. - delete_option( 'generate_dynamic_css_output' ); - delete_option( 'generate_dynamic_css_cached_version' ); - - // Reset our dynamic CSS file updated time so it regenerates. - $dynamic_css_data = get_option( 'generatepress_dynamic_css_data', array() ); - - if ( isset( $dynamic_css_data['updated_time'] ) ) { - unset( $dynamic_css_data['updated_time'] ); - } - - update_option( 'generatepress_dynamic_css_data', $dynamic_css_data ); - - // Delete any GeneratePress Site CSS in Additional CSS. - $additional_css = wp_get_custom_css_post(); - - if ( ! empty( $additional_css ) ) { - $additional_css->post_content = preg_replace( '#(/\\* GeneratePress Site CSS \\*/).*?(/\\* End GeneratePress Site CSS \\*/)#s', '', $additional_css->post_content ); - wp_update_custom_css_post( $additional_css->post_content ); - } - - wp_safe_redirect( admin_url( 'themes.php?page=generate-options&status=reset' ) ); - exit; -} - -add_action( 'admin_head', 'generate_reset_options_css', 100 ); -/** - * Add CSS to the dashboard. - */ -function generate_reset_options_css() { - $screen = get_current_screen(); - - if ( ! is_object( $screen ) ) { - return; - } - - if ( 'appearance_page_generate-options' !== $screen->base ) { - return; - } - ?> - - base ) { - return; - } - ?> - - 1;"},"Post author name":["Nom de l'auteur de la publication"],"Post date":["Date de la publication"],"Title":["Titre"],"Dynamic text type":["Type de texte dynamique"],"Published date before text":["Texte avant la date de publication"],"Term archives":["Archives des termes"],"Author meta":["M\u00e9tadonn\u00e9es des auteurs"],"Previous page of posts":["Pr\u00e9c\u00e9dente page des publications"],"Next page of posts":["Prochaine page des publications"],"Comments area":["Zone des commentaires"],"Author archives":["Archives des auteurs"],"Single post":["Publication unique"],"Taxonomy":["Taxonomie"],"In same term":["Dans le m\u00eame terme"],"No previous post":["Pas de publication pr\u00e9c\u00e9dente"],"This will remove the current sidebar widgets for the selected sidebar. Your layout must have a sidebar set for this Element to show.":["Cela supprimera les widgets en cours pour la colonne lat\u00e9rale s\u00e9lectionn\u00e9e. Votre mise en page doit avoir des colonnes lat\u00e9rales d\u00e9finies pour que cet \u00e9l\u00e9ment soit visible."],"Site Footer":["Pied de page du site"],"None":["Aucun"],"Type":["Type"],"Right Sidebar":["Colonne lat\u00e9rale de droite"],"Left Sidebar":["Colonne lat\u00e9rale gauche"],"Priority":["Priorit\u00e9"],"Custom Hook":["Hook personnalis\u00e9"],"Custom":["Personnaliser"],"Site Header":["Ent\u00eate du site"],"Page Hero":["Banni\u00e8re"],"Hook":["Hook"],"Right":["Droite"],"Left":["Gauche"],"Center":["Centre"],"Location":["Emplacement"]}}} \ No newline at end of file diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-fr_FR-53e2a1d5945b8d2b1c35e81ae1e532f3.json b/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-fr_FR-53e2a1d5945b8d2b1c35e81ae1e532f3.json deleted file mode 100644 index a7b5560a..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-fr_FR-53e2a1d5945b8d2b1c35e81ae1e532f3.json +++ /dev/null @@ -1 +0,0 @@ -{"translation-revision-date":"2021-03-10 11:23:17+0000","generator":"WP-CLI\/2.6.0","source":"dist\/editor.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"fr","plural-forms":"nplurals=2; plural=n > 1;"},"All Elements":["Tous les \u00e9l\u00e9ments"]}}} \ No newline at end of file diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-fr_FR-92fa58377f1b6f7bef9c785c31ae29ff.json b/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-fr_FR-92fa58377f1b6f7bef9c785c31ae29ff.json deleted file mode 100644 index 0c595687..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-fr_FR-92fa58377f1b6f7bef9c785c31ae29ff.json +++ /dev/null @@ -1 +0,0 @@ -{"translation-revision-date":"2021-03-10 11:23:17+0000","generator":"WP-CLI\/2.6.0","source":"dist\/site-library.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"fr","plural-forms":"nplurals=2; plural=n > 1;"},"Why?":["Pourquoi?"],"This process restores your previous options, widgets and active plugins. It will also remove your imported content and CSS.":["Cette op\u00e9ration restaure vos r\u00e9glages pr\u00e9c\u00e9dents: options, widgets et extensions actives. Cela va aussi supprimer le contenu import\u00e9 est les CSS. "],"It is highly recommended that you remove the last site you imported before importing a new one.":["Il est vraiment recommand\u00e9 de supprimer le dernier site que vous avez import\u00e9 avant d'en importer un nouveau. "],"Existing Site Import Detected":["L'importation de ce site existe d\u00e9j\u00e0"],"Restoring theme options":["Restaurer les options du th\u00e8me"],"New URL":["Nouvelle URL"],"Old URL":["Ancienne URL"],"This site is using Elementor which means you will want to replace the imported image URLs.":["Ce site utilise Elementor ce qui veut dire que vous devrez remplacer les URLs des images import\u00e9es"],"Additional Cleanup":["Nettoyage suppl\u00e9mentaire"],"This site uses the following plugins.":["Ce site utilise les plugins suivants"],"Installing plugins":["Installation de plugins..."],"Activating plugins":["Activer les plugins"],"Importing widgets":["Importation des widgets"],"Importing site options":["Importation des options du site"],"Importing content":["Importation du contenu"],"None":["Aucun"],"Import":["Importer"]}}} \ No newline at end of file diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-fr_FR.mo b/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-fr_FR.mo deleted file mode 100644 index 09ab19f4..00000000 Binary files a/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-fr_FR.mo and /dev/null differ diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-hr.mo b/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-hr.mo deleted file mode 100644 index aa6b8ca5..00000000 Binary files a/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-hr.mo and /dev/null differ diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-hu_HU.mo b/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-hu_HU.mo deleted file mode 100644 index e0aa58e4..00000000 Binary files a/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-hu_HU.mo and /dev/null differ diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-it_IT.mo b/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-it_IT.mo deleted file mode 100644 index f92a2b4a..00000000 Binary files a/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-it_IT.mo and /dev/null differ diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-nb_NO.mo b/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-nb_NO.mo deleted file mode 100644 index 792e21a2..00000000 Binary files a/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-nb_NO.mo and /dev/null differ diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-nl_NL-42da344ccb044413769d16ed3484307b.json b/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-nl_NL-42da344ccb044413769d16ed3484307b.json deleted file mode 100644 index cd4fea2c..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-nl_NL-42da344ccb044413769d16ed3484307b.json +++ /dev/null @@ -1 +0,0 @@ -{"translation-revision-date":"2022-10-22 13:18:34+0000","generator":"WP-CLI\/2.6.0","source":"dist\/block-elements.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"nl","plural-forms":"nplurals=2; plural=n != 1;"},"Loop Template":["Loop thema"],"The taxonomy to check if in the same term.":["De taxonomie om te controleren of het om dezelfde term gaat."],"Check for posts with the same term as the current post.":["Zoek naar berichten met dezelfde term als het huidige bericht."],"Remove container condition":["Verwijder container conditie"],"Display Order":["Weergavevolgorde"],"Parent Element":["Bovenliggend element"],"First post":["Eerste bericht"],"No post meta":["Geen bericht-meta"],"No featured image":["Geen uitgelichte afbeelding"],"Keep default archive navigation container":["Behoud standaard archief navigatie container"],"Disable default pagination":["Standaard paginering uitschakelen"],"Add default archive navigation container":["Voeg standaard archief navigatie container toe"],"Disable default post navigation":["Standaard berichtnavigatie uitschakelen"],"Use the above template tag to add the current year to your footer.":["Gebruik bovenstaande template tag om het huidige jaartal aan je footer toe te voegen."],"Current year template tag":["Huidig jaartal template tag"],"Disable primary post meta":["Uitzetten primaire bericht-meta"],"Disable featured image":["Uitzetten uitgelichte afbeelding"],"Disable title":["Uitzetten titel"],"Keep default post container":["Behoud standaard berichtcontainer"],"Post meta name":["Berichtmeta-naam"],"Term name":["Termnaam"],"Posts with custom field":["Berichten met aangepast veld"],"Posts with term":["Berichten met term"],"All posts":["Alle berichten"],"Apply to":["Toepassen op"],"Tag name":["Tag-naam"],"Replace default secondary post meta":["Vervang standaard secundaire bericht-meta"],"Replace default primary post meta":["Vervang standaard primaire bericht-meta"],"Custom hook name":["Aangepaste hook naam"],"Choose your hook":["Kies je hook"],"Hook name":["Hook naam"],"Quick hook select":["Snelle hook selectie"],"Before post title":["Voor berichttitel"],"After post title":["Na bericht titel"],"This Element will replace your site footer area that holds your copyright message. It will not replace footer widgets if they exist.":["Dit element vervangt het footer gebied van je site waar het copyright bericht staat. Het vervangt niet je footer widgets als deze bestaan."],"Templates":["Templates"],"Element type":["Element type"],"Editor width":["Breedte editor"],"Install GenerateBlocks":["Installeer GenerateBlocks"],"Activate GenerateBlocks":["Activeer GenerateBlocks"],"To take full advantage of Block Elements, we suggest using our GenerateBlocks plugin.":["Om volledig gebruikt te kunnen maken Block Elements, raden we het gebruik van onze GenerateBlocks plug-in aan."],"Block Element":["Block Element"],"After content container":["Na inhoud-container"],"After content":["Na inhoud"],"Before content":["Voor inhoud"],"Before content container":["Voor inhoud-container"],"After header":["Na header"],"label\u0004Single post hero with excerpt":["Enkel bericht-hero met uittreksel"],"label\u0004Basic single post page hero":["Eenvoudige enkel bericht-hero "],"label\u0004Rounded buttons with icon":["Afgeronde knoppen met icoon"],"label\u0004Default next and previous buttons":["Standaard volgende en vorige knoppen"],"label\u0004Landscape layout":["Liggende layout"],"label\u0004Layout with offset content":["Layout met offset inhoud"],"label\u0004Basic layout with term buttons":["Eenvoudige layout met term-knoppen"],"label\u0004Full footer 2":["Volledige footer 2"],"label\u0004Full footer 1":["Volledige footer 1"],"label\u0004Term buttons":["Term-knoppen"],"label\u0004Stacked with avatar":["Gestapeld met avatar"],"label\u0004Inline with avatar":["Inline met avatar"],"label\u0004Two columns with background overlays":["Twee kolommen met achtergrond bedekking"],"label\u0004Two columns with arrows":["Twee kolommen met pijlen"],"label\u0004Two columns with featured image":["Twee kolommen met uitgelichte afbeelding"],"%s Units":["%s eenheden"],"A size unit for CSS markup\u0004Degree":["Graden"],"A size unit for CSS markup\u0004Percentage":["Percentage"],"A size unit for CSS markup\u0004Em":["Em"],"A size unit for CSS markup\u0004Pixel":["Pixel"],"Select Units":["Selecteer eenheden"],"Displays a dynamic image from your chosen source.":["Geef een dynamische afbeelding weer van je gekozen bron"],"Dynamic Image":["Dynamische afbeelding"],"Dynamic image placeholder":["Dynamische afbeelding placeholder"],"Choose your dynamic image type.":["Kies type dynamische afbeelding"],"Dynamic image":["Dynamische afbeelding"],"Make image rounded":["Maak afbeelding afgerond"],"Custom field name":["Aangepast veld-naam"],"Custom field":["Aangepast veld"],"Link to":["Link naar"],"Image height":["Afbeeldingshoogte"],"Image width":["Afbeeldingsbreedte"],"Image size":["Afbeeldingsgrootte"],"Author avatar":["Auteur avatar"],"Displays dynamic content based on your chosen source.":["Toont dynamische inhoud gebaseerd op je gekozen bron."],"Dynamic Content":["Dynamische inhoud"],"This is a placeholder for your description.":["Dit is een plaatshouder voor je beschrijving."],"Choose your dynamic content type.":["Selecteer je dynamische inhoudstype"],"Dynamic content":["Dynamische inhoud"],"Custom more link":["Aangepaste meer link"],"Use theme more link":["Gebruik thema meer link"],"Excerpt length":["Lengte uittreksel"],"Author description":["Schrijver omschrijving"],"Term description":["Term omschrijving"],"Post excerpt":["Bericht uittreksel"],"Post content":["Bericht-inhoud"],"Dynamic link type":["Dynamische link-type"],"Updated date before text":["Bijgewerkt datum voor tekst"],"Use % in place of the number of comments":["Gebruik % in de plaats van het aantal reacties"],"Plural comments text":["Meervoud reacties tekst"],"Singular comments text":["Enkelvoudige reacties tekst"],"No comments text":["Geen reacties tekst"],"Term separator":["Term scheidingsteken"],"Replace with updated date":["Vervang door bijgewerkt datum"],"Updated date":["Bijgewerkt datum"],"Date type":["Datumtype"],"Terms":["Termen"],"Hello World":["Hallo wereld"],"Comments number":["Aantal reacties"],"List of terms":["Termenlijst"],"Post author name":["Bericht auteurnaam"],"Post date":["Berichtdatum"],"Title":["Titel"],"Dynamic text type":["Dynamische tekst type"],"Published date before text":["Gepubliceerd datum voor tekst"],"Term archives":["Term archief"],"Author meta":["Auteur meta"],"Previous page of posts":["Vorige pagina van berichten"],"Next page of posts":["Volgende pagina van berichten"],"Comments area":["Reacties gebied"],"Author archives":["Auteur archieven"],"Single post":["Enkel bericht"],"Taxonomy":["Taxonomie"],"In same term":["In dezelfde term"],"No previous post":["Geen vorig bericht"],"No next post":["Geen volgend bericht"],"Space between":["Spatie tussen"],"Inline alignment":["Inline uitlijning"],"Inline post meta items":["Inline bericht meta-termen"],"Previous post":["Vorig bericht"],"Next post":["Volgend bericht"],"Current post":["huidig bericht"],"Source":["Bron"],"Post":["Bericht"],"Choose\u2026":["Selecteer..."],"Dynamic Link":["Dynamische link"],"Use fallback image":["Gebruik terugval-afbeelding"],"Meta field name":["Metaveld naam"],"Add a background image to this Container to make it dynamic.":["Voeg een achtergrond toe aan deze Container om deze dynamisch te maken."],"User meta":["Gebruiker meta"],"Term meta":["Term meta"],"Post meta":["Bericht meta"],"Featured image":["Uitgelichte afbeelding"],"Dynamic Background Image":["Dynamische achtergrond afbeelding"],"Dynamic options":["Dynamische instellingen"],"Archive Navigation":["Archief navigatie"],"Post Navigation":["Berichtnavigatie"],"Post Meta Template":["Bericht meta template"],"Content Template":["Inhoud template"],"% Comments":["% reacties"],"1 Comment":["1 reactie"],"No Comments":["Geen reacties"],"This is a placeholder for your content.":["Dit is een plaatshouder voor je inhoud."],"This will remove the current sidebar widgets for the selected sidebar. Your layout must have a sidebar set for this Element to show.":["Dit verwijdert de huidige zijbalkwidgets voor de geselecteerde zijbalk. Je lay-out moet een zijbalk hebben om dit Element te laten zien."],"Site Footer":["Site footer"],"None":["Geen"],"Type":["Type"],"Right Sidebar":["Rechter zijbalk"],"Left Sidebar":["Linker zijbalk"],"Priority":["Prioriteit"],"Custom Hook":["Aangepaste hook"],"Custom":["Aangepast"],"Site Header":["Site header"],"Page Hero":["Page Hero"],"Hook":["Hook"],"Right":["Rechts"],"Left":["Links"],"Center":["Midden"],"Location":["Locatie"]}}} \ No newline at end of file diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-nl_NL-53e2a1d5945b8d2b1c35e81ae1e532f3.json b/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-nl_NL-53e2a1d5945b8d2b1c35e81ae1e532f3.json deleted file mode 100644 index bd23357a..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-nl_NL-53e2a1d5945b8d2b1c35e81ae1e532f3.json +++ /dev/null @@ -1 +0,0 @@ -{"translation-revision-date":"2022-10-22 13:18:34+0000","generator":"WP-CLI\/2.6.0","source":"dist\/editor.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"nl","plural-forms":"nplurals=2; plural=n != 1;"},"Active Elements":["Actieve elementen"],"All Elements":["Alle elementen"]}}} \ No newline at end of file diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-nl_NL-92fa58377f1b6f7bef9c785c31ae29ff.json b/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-nl_NL-92fa58377f1b6f7bef9c785c31ae29ff.json deleted file mode 100644 index 0cc8e32a..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-nl_NL-92fa58377f1b6f7bef9c785c31ae29ff.json +++ /dev/null @@ -1 +0,0 @@ -{"translation-revision-date":"2022-10-22 13:18:34+0000","generator":"WP-CLI\/2.6.0","source":"dist\/site-library.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"nl","plural-forms":"nplurals=2; plural=n != 1;"},"Requires GeneratePress %s.":["Vereist GeneratePress %s."],"Built by":["Gebouwd door"],"Note: We do our best to ensure all imported images are licensed for open use. However, image licenses can change, so we strongly advise that you replace all imported images with your own.":["Opmerking: we doen ons best om ervoor te zorgen dat alle ge\u00efmporteerde afbeeldingen vrij gebruikt mogen worden. Afbeeldingslicenties kunnen echter veranderen, dus we raden je ten zeerste aan om alle ge\u00efmporteerde afbeeldingen te vervangen door je eigen afbeeldingen."],"Check out your new site and start making it yours!":["Bekijk je nieuwe site en geef het jouw unieke stijl!"],"Learn more here":["Leer hier meer"],"To disable it, find WP_DEBUG in your wp-config.php file and set it to false like the below.":["Zoek - om het uit te schakelen - naar WP_DEBUG in je wp-config.php-bestand en stel het in op false zoals hieronder."],"WordPress debug mode is currently enabled. With this, any errors from third-party plugins might affect the import process.":["De foutopsporingsmodus van WordPress is momenteel ingeschakeld. Hierdoor kunnen eventuele fouten van plug-ins van derden het importproces be\u00efnvloeden."],"Debug Mode Enabled":["Foutopsporingsmodus ingeschakeld"],"Preview mobile":["Voorbeeld mobiel"],"Preview tablet":["Voorbeeld tablet"],"Preview desktop":["Voorbeeld desktop"],"Elementor Tools":["Elementor Tools"],"Take note of the old and new URLs below, then head over to the Elementor Tools area to replace them.":["Noteer de oude en nieuwe URL's hieronder en ga naar het Elementor Tools-gebied om ze te vervangen."],"Begin Import":["Begin importeren"],"I understand":["Ik begrijp het"],"Confirm Import":["Bevestig importeren"],"Import Demo Content":["Importeer demo inhoud"],"This will install and activate needed plugins, import demo content, and import site options.":["Dit installeert en activeert de benodigde plug-ins, importeert de demo-inhoud en importeert site-instellingen."],"Import Theme Options":["Importeer thema-instellingen"],"This will import the options from the Customizer.":["Dit importeert de instellingen van de Customizer."],"These plugins need to be installed manually.":["Deze plug-ins moeten handmatig worden ge\u00efnstalleerd."],"These plugins are already installed.":["Deze plug-ins zijn al ge\u00efnstalleerd."],"These plugins can be installed automatically.":["Deze plug-ins kunnen automatisch worden ge\u00efnstalleerd."],"Gathering information":["Informatie aan het verzamelen."],"Refresh sites":["Vernieuw sites"],"Requires GP Premium %s.":["Vereist GP Premium %s."],"Page Builder":["Pagina bouwer"],"Category":["Categorie"],"No thanks":["Nee bedankt"],"Remove imported site":["Verwijder ge\u00efmporteerde site"],"This process makes changes to your website. If it contains important data, we suggest backing it up before proceeding.":["Dit proces maakt veranderingen aan je website. Als deze belangrijke data bevat, raden we aan om deze te back-uppen."],"Try again":["Nogmaals proberen"],"No sites were found.":["Geen sites gevonden."],"Restoring content":["Terugzetten inhoud"],"Installing %s":["%s wordt ge\u00efnstalleerd"],"Import Complete":["Import compleet"],"Importing theme options":["Thema-instellingen worden ge\u00efmporteerd"],"Why?":["Waarom?"],"This process restores your previous options, widgets and active plugins. It will also remove your imported content and CSS.":["Deze procedure zet de vorige instellingen, widgets, en actieve plugins terug. Het verwijdert ook de ge\u00efmporteerde inhoud en CSS."],"It is highly recommended that you remove the last site you imported before importing a new one.":["Het is aanbevolen dat je de laatste site verwijdert die je hebt ge\u00efmporteerd voordat je een nieuwe importeert."],"Existing Site Import Detected":["Bestaande site import gevonden"],"Restoring theme options":["Terugzetten thema-instellingen"],"New URL":["Nieuwe URL"],"Old URL":["Oude URL"],"This site is using Elementor which means you will want to replace the imported image URLs.":["Deze site maakt gebruik van Elementor, wat betekent dat je de ge\u00efmporteerde afbeeldings-URLs moet aanpassen."],"Additional Cleanup":["Extra opruimen"],"This site uses the following plugins.":["Deze site maakt gebruik van de volgende plugins:"],"All":["Alles"],"View Site":["Bekijk site"],"Get Started":["Nu beginnen"],"Plugins":["Plugins"],"Installing plugins":["Plugins aan het installeren"],"Activating plugins":["Plugins aan het activeren"],"Importing widgets":["Widgets aan het importeren"],"Importing site options":["Site-instellingen aan het importeren"],"Importing content":["Inhoud aan het importeren"],"None":["Geen"],"Import":["Importeren"]}}} \ No newline at end of file diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-nl_NL-cbab080b0f20fd6c323029398be6c986.json b/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-nl_NL-cbab080b0f20fd6c323029398be6c986.json deleted file mode 100644 index 2c6bc645..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-nl_NL-cbab080b0f20fd6c323029398be6c986.json +++ /dev/null @@ -1 +0,0 @@ -{"translation-revision-date":"2022-10-22 13:18:34+0000","generator":"WP-CLI\/2.6.0","source":"dist\/dashboard.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"nl","plural-forms":"nplurals=2; plural=n != 1;"},"This will delete all of your customizer settings. It cannot be undone.":["Dit zal al je customizer instellingen verwijderen. Het kan niet ongedaan worden gemaakt."],"Reset your customizer settings.":["Reset je customizer instellingen."],"Options imported.":["Opties ge\u00efmporteerd."],"This can overwrite existing settings and cannot be undone.":["Dit kan bestaande instellingen overschrijven en kan niet ongedaan worden gemaakt."],"Import your customizer settings.":["Importeer je customizer instellingen."],"Global Colors":["Globale kleuren"],"Export your customizer settings.":["Exporteer je customizer instellingen."],"Import \/ Export":["Importeren \/ exporteren"],"License key deactivated.":["Licentiesleutel gedeactiveerd."],"License key activated.":["Licentiesleutel geactiveerd."],"Get alpha and beta updates directly to your Dashboard.":["Ontvang alpha en beta updates direct in je Dashboard."],"Enter your license key to activate updates.":["Voer je licentiesleutel in om updates te activeren."],"Not receiving premium updates.":["Geen premium updates ontvangen."],"Receiving premium updates.":["Premium-updates ontvangen."],"Options exported":["Opties ge\u00ebxporteerd"],"This will delete all settings for this module. It cannot be undone.":["Hiermee worden alle instellingen voor deze module verwijderd. Dit kan niet ongedaan worden gemaakt."],"Open tools for this module.":["Open gereedschap voor deze module."],"Open Elements":["Open elementen"],"Open Site Library":["Open site bibliotheek"],"Settings reset.":["Instellingen gereset."],"Typography":["Typografie"],"All":["Alles"],"Reset":["Terugzetten"],"Modules":["Modules"],"License Key":["Licentiecode"],"Deactivate":["Deactiveren"],"Activate":["Activeren"],"This module has been deprecated. Deactivating it will remove it from this list.":["Deze module is verouderd. Als u deze deactiveert, wordt deze uit deze lijst verwijderd."],"Import":["Importeren"],"Export":["Exporteren"]}}} \ No newline at end of file diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-nl_NL-ecf9f3c2af10c4f2dfbf4f42504922d1.json b/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-nl_NL-ecf9f3c2af10c4f2dfbf4f42504922d1.json deleted file mode 100644 index 69729ba2..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-nl_NL-ecf9f3c2af10c4f2dfbf4f42504922d1.json +++ /dev/null @@ -1 +0,0 @@ -{"translation-revision-date":"2022-10-22 13:18:34+0000","generator":"WP-CLI\/2.6.0","source":"dist\/customizer.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"nl","plural-forms":"nplurals=2; plural=n != 1;"},"Related\/Upsell Product Titles":["Gerelateerde\/opwaarderende producttitels"],"Catalog Product Titles":["Catalogus product titels"],"Off-Canvas Sub-Menu Items":["Off-canvas submenu items"],"Off-Canvas Menu Items":["Off-canvas menu items"],"Secondary Mobile Menu Toggle":["Secundair mobiel menu toggle"],"Secondary Sub-Menu Items":["Secundaire submenu items"],"Secondary Menu Items":["Secundaire menu-items"],"Off-Canvas Panel":["Off-canvas paneel"],"WooCommerce":["WooCommerce"],"Secondary Navigation":["Secundaire navigatie"]}}} \ No newline at end of file diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-nl_NL.mo b/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-nl_NL.mo deleted file mode 100644 index d13ab9e4..00000000 Binary files a/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-nl_NL.mo and /dev/null differ diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-pl_PL.mo b/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-pl_PL.mo deleted file mode 100644 index 06c623d9..00000000 Binary files a/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-pl_PL.mo and /dev/null differ diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-pt_BR.mo b/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-pt_BR.mo deleted file mode 100644 index e453013e..00000000 Binary files a/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-pt_BR.mo and /dev/null differ diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-pt_PT-42da344ccb044413769d16ed3484307b.json b/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-pt_PT-42da344ccb044413769d16ed3484307b.json deleted file mode 100644 index 101c7110..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-pt_PT-42da344ccb044413769d16ed3484307b.json +++ /dev/null @@ -1 +0,0 @@ -{"translation-revision-date":"2020-08-08 21:16:06+0000","generator":"WP-CLI\/2.6.0","source":"dist\/block-elements.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"pt","plural-forms":"nplurals=2; plural=n != 1;"},"Site Footer":["Rodap\u00e9 do site"],"None":["Nenhuma"],"Type":["Tipo"],"Right Sidebar":["Barra lateral direita"],"Left Sidebar":["Barra lateral esquerda"],"Priority":["Prioridade"],"Custom Hook":["Hook personalizado"],"Custom":["Personalizado"],"Site Header":["Cabe\u00e7alho do site"],"Page Hero":["Hero de p\u00e1gina"],"Hook":["Hook"],"Right":["Direita"],"Left":["Esquerda"],"Center":["Centro"],"Location":["Localiza\u00e7\u00e3o"]}}} \ No newline at end of file diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-pt_PT-53e2a1d5945b8d2b1c35e81ae1e532f3.json b/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-pt_PT-53e2a1d5945b8d2b1c35e81ae1e532f3.json deleted file mode 100644 index 4fc6aaba..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-pt_PT-53e2a1d5945b8d2b1c35e81ae1e532f3.json +++ /dev/null @@ -1 +0,0 @@ -{"translation-revision-date":"2020-08-08 21:16:06+0000","generator":"WP-CLI\/2.6.0","source":"dist\/editor.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"pt","plural-forms":"nplurals=2; plural=n != 1;"},"All Elements":["Todos os elementos"]}}} \ No newline at end of file diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-pt_PT-92fa58377f1b6f7bef9c785c31ae29ff.json b/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-pt_PT-92fa58377f1b6f7bef9c785c31ae29ff.json deleted file mode 100644 index d60c4950..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-pt_PT-92fa58377f1b6f7bef9c785c31ae29ff.json +++ /dev/null @@ -1 +0,0 @@ -{"translation-revision-date":"2020-08-08 21:16:06+0000","generator":"WP-CLI\/2.6.0","source":"dist\/site-library.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"pt","plural-forms":"nplurals=2; plural=n != 1;"},"Why?":["Porqu\u00ea?"],"This process restores your previous options, widgets and active plugins. It will also remove your imported content and CSS.":["Este processo recupera as suas op\u00e7\u00f5es, widgets e plugins activos anteriores. Tamb\u00e9m ir\u00e1 remover o seu conte\u00fado importado e CSS."],"It is highly recommended that you remove the last site you imported before importing a new one.":["\u00c9 altamente recomendado que remova o site importado anteriormente antes de importar um novo."],"Existing Site Import Detected":["Detectado um site importado existente"],"Restoring theme options":["A recuperar op\u00e7\u00f5es do tema"],"New URL":["URL novo"],"Old URL":["URL antigo"],"This site is using Elementor which means you will want to replace the imported image URLs.":["Este site utiliza o Elementor, isto significa que dever\u00e1 substituir os URL das imagens importadas."],"Additional Cleanup":["Limpeza adicional"],"This site uses the following plugins.":["Este site utiliza os seguintes plugins."],"All":["Todos"],"View Site":["Ver site"],"Get Started":["Come\u00e7ar"],"Plugins":["Plugins"],"Installing plugins":["A instalar plugins"],"Activating plugins":["A activar plugins"],"Importing widgets":["A importar widgets"],"Importing site options":["A importar op\u00e7\u00f5es do site"],"Importing content":["A importar conte\u00fados"],"None":["Nenhuma"],"Import":["Importar"]}}} \ No newline at end of file diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-pt_PT.mo b/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-pt_PT.mo deleted file mode 100644 index 53b4c446..00000000 Binary files a/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-pt_PT.mo and /dev/null differ diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-ru_RU-42da344ccb044413769d16ed3484307b.json b/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-ru_RU-42da344ccb044413769d16ed3484307b.json deleted file mode 100644 index ff9ec0df..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-ru_RU-42da344ccb044413769d16ed3484307b.json +++ /dev/null @@ -1 +0,0 @@ -{"translation-revision-date":"2023-11-08 16:38:58+0000","generator":"WP-CLI\/2.6.0","source":"dist\/block-elements.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"ru","plural-forms":"nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);"},"Loop Template":["\u0428\u0430\u0431\u043b\u043e\u043d \u0446\u0438\u043a\u043b\u0430"],"The taxonomy to check if in the same term.":["\u041f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0442\u0430\u043a\u0441\u043e\u043d\u043e\u043c\u0438\u044e \u0435\u0441\u043b\u0438 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0439 \u0442\u0435\u0440\u043c\u0438\u043d."],"Check for posts with the same term as the current post.":["\u041f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0437\u0430\u043f\u0438\u0441\u0438 \u0441 \u0442\u0430\u043a\u0438\u043c \u0436\u0435 \u0438\u043c\u0435\u043d\u0435\u043c \u043a\u0430\u043a \u0442\u0435\u043a\u0443\u0449\u0430\u044f \u0437\u0430\u043f\u0438\u0441\u044c."],"Remove container condition":["\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430"],"Display Order":["\u041e\u0442\u043e\u0431\u0440\u0430\u0437\u0438\u0442\u044c \u0417\u0430\u043a\u0430\u0437"],"Parent Element":["\u0420\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442"],"First post":["\u041f\u0435\u0440\u0432\u0430\u044f \u0437\u0430\u043f\u0438\u0441\u044c"],"No post meta":["\u041d\u0435\u0442 \u043c\u0435\u0442\u0430-\u0434\u0430\u043d\u043d\u044b\u0445 \u0437\u0430\u043f\u0438\u0441\u0438"],"No featured image":["\u041d\u0435\u0442 \u0438\u0437\u0431\u0440\u0430\u043d\u043d\u043e\u0433\u043e \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f"],"Keep default archive navigation container":["\u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u043d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0438 \u0430\u0440\u0445\u0438\u0432\u0430 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e"],"Disable default pagination":["\u041e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043f\u0430\u0433\u0438\u043d\u0430\u0446\u0438\u044e \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e"],"Add default archive navigation container":["\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u043d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0438 \u043f\u043e \u0430\u0440\u0445\u0438\u0432\u0443 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e"],"Disable default post navigation":["\u041e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u044e \u043f\u043e \u0437\u0430\u043f\u0438\u0441\u044f\u043c \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e"],"Use the above template tag to add the current year to your footer.":["\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0439 \u0432\u044b\u0448\u0435 \u0442\u0435\u0433 \u0448\u0430\u0431\u043b\u043e\u043d\u0430, \u0447\u0442\u043e\u0431\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u0433\u043e\u0434 \u0432 \u043f\u043e\u0434\u0432\u0430\u043b"],"Current year template tag":["\u0422\u0435\u0433 \u0448\u0430\u0431\u043b\u043e\u043d\u0430 \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u0433\u043e\u0434\u0430"],"Disable primary post meta":["\u041e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043c\u0435\u0442\u0430-\u0434\u0430\u043d\u043d\u044b\u0435 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438"],"Disable featured image":["\u041e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0437\u0430\u043f\u0438\u0441\u0438"],"Disable title":["\u041e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a"],"Keep default post container":["\u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u0437\u0430\u043f\u0438\u0441\u0438 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e"],"Post meta name":["\u041c\u0435\u0442\u0430-\u0438\u043c\u044f \u0437\u0430\u043f\u0438\u0441\u0438"],"Term name":["\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0442\u0435\u0440\u043c\u0438\u043d\u0430"],"Posts with custom field":["\u0417\u0430\u043f\u0438\u0441\u0438 \u0441 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u044b\u043c \u043f\u043e\u043b\u0435\u043c"],"Posts with term":["\u0417\u0430\u043f\u0438\u0441\u0438 \u0441 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043c\u0438"],"All posts":["\u0412\u0441\u0435 \u0437\u0430\u043f\u0438\u0441\u0438"],"Apply to":["\u041f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u043a"],"Tag name":["\u0418\u043c\u044f \u0442\u0435\u0433\u0430"],"Replace default secondary post meta":["\u0417\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u043c\u0435\u0442\u0443 \u0432\u0442\u043e\u0440\u0438\u0447\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e"],"Replace default primary post meta":["\u0417\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u043c\u0435\u0442\u0430 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e"],"Custom hook name":["\u0418\u043c\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0433\u043e \u0445\u0443\u043a\u0430"],"Choose your hook":["\u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u0441\u0432\u043e\u0439 \u0445\u0443\u043a"],"Hook name":["\u0418\u043c\u044f \u0445\u0443\u043a\u0430"],"Quick hook select":["\u0411\u044b\u0441\u0442\u0440\u044b\u0439 \u0432\u044b\u0431\u043e\u0440 \u0445\u0443\u043a\u0430"],"Before post title":["\u041f\u0435\u0440\u0435\u0434 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u043e\u043c \u0437\u0430\u043f\u0438\u0441\u0438"],"After post title":["\u041f\u043e\u0441\u043b\u0435 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0430 \u0437\u0430\u043f\u0438\u0441\u0438"],"This Element will replace your site footer area that holds your copyright message. It will not replace footer widgets if they exist.":["\u042d\u0442\u043e\u0442 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0437\u0430\u043c\u0435\u043d\u0438\u0442 \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u043f\u043e\u0434\u0432\u0430\u043b\u0430 \u0432\u0430\u0448\u0435\u0433\u043e \u0441\u0430\u0439\u0442\u0430, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439 \u0432\u0430\u0448\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043e\u0431 \u0430\u0432\u0442\u043e\u0440\u0441\u043a\u0438\u0445 \u043f\u0440\u0430\u0432\u0430\u0445. \u041e\u043d \u043d\u0435 \u0437\u0430\u043c\u0435\u043d\u0438\u0442 \u0432\u0438\u0434\u0436\u0435\u0442\u044b \u043f\u043e\u0434\u0432\u0430\u043b\u0430, \u0435\u0441\u043b\u0438 \u043e\u043d\u0438 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442."],"Templates":["\u0428\u0430\u0431\u043b\u043e\u043d\u044b\u0439"],"Element type":["\u0422\u0438\u043f \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430"],"Editor width":["\u0428\u0438\u0440\u0438\u043d\u0430 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0430"],"Install GenerateBlocks":["\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c GenerateBlocks"],"Activate GenerateBlocks":["\u0410\u043a\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u0442\u044c GenerateBlocks"],"To take full advantage of Block Elements, we suggest using our GenerateBlocks plugin.":["\u0427\u0442\u043e\u0431\u044b \u0432 \u043f\u043e\u043b\u043d\u043e\u0439 \u043c\u0435\u0440\u0435 \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430\u043c\u0438 \u0431\u043b\u043e\u0447\u043d\u044b\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432, \u043c\u044b \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u0448 \u043f\u043b\u0430\u0433\u0438\u043d GenerateBlocks."],"Block Element":["\u042d\u043b\u0435\u043c\u0435\u043d\u0442 \u0411\u043b\u043e\u043a\u0430"],"After content container":["\u041f\u043e\u0441\u043b\u0435 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430"],"After content":["\u041f\u043e\u0441\u043b\u0435 \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430"],"Before content":["\u041f\u0435\u0440\u0435\u0434 \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u043e\u043c"],"Before content container":["\u041f\u0435\u0440\u0435\u0434 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u043c \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430"],"After header":["\u041f\u043e\u0441\u043b\u0435 \u0448\u0430\u043f\u043a\u0438"],"label\u0004Single post hero with excerpt":["Hero \u043e\u0434\u0438\u043d\u043e\u0447\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438 \u0441 \u043e\u0442\u0440\u044b\u0432\u043a\u0430\u043c\u0438"],"label\u0004Basic single post page hero":["Hero \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0441 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0435\u0434\u0438\u043d\u0438\u0447\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u044c\u044e"],"label\u0004Rounded buttons with icon":["\u041e\u043a\u0440\u0443\u0433\u043b\u044b\u0435 \u043a\u043d\u043e\u043f\u043a\u0438 \u0441\u043e \u0437\u043d\u0430\u0447\u043a\u043e\u043c"],"label\u0004Default next and previous buttons":["\u041a\u043d\u043e\u043f\u043a\u0438 \u00ab\u0414\u0430\u043b\u0435\u0435\u00bb \u0438 \u00ab\u041d\u0430\u0437\u0430\u0434\u00bb \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e"],"label\u0004Landscape layout":["\u0410\u043b\u044c\u0431\u043e\u043c\u043d\u0430\u044f \u043e\u0440\u0438\u0435\u043d\u0442\u0430\u0446\u0438\u044f"],"label\u0004Layout with offset content":["\u041c\u0430\u043a\u0435\u0442 \u0441\u043e \u0441\u043c\u0435\u0449\u0435\u043d\u043d\u044b\u043c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u044b\u043c"],"label\u0004Basic layout with term buttons":["\u0411\u0430\u0437\u043e\u0432\u044b\u0439 \u043c\u0430\u043a\u0435\u0442 \u0441 \u043a\u043d\u043e\u043f\u043a\u0430\u043c\u0438 \u0442\u0435\u0440\u043c\u0438\u043d\u043e\u0432"],"label\u0004Full footer 2":["\u041f\u043e\u043b\u043d\u044b\u0439 \u043f\u043e\u0434\u0432\u0430\u043b 2"],"label\u0004Full footer 1":["\u041f\u043e\u043b\u043d\u044b\u0439 \u043f\u043e\u0434\u0432\u0430\u043b 1"],"label\u0004Term buttons":["\u041a\u043d\u043e\u043f\u043a\u0438 \u0442\u0435\u0440\u043c\u0438\u043d\u043e\u0432"],"label\u0004Stacked with avatar":["\u0421\u043b\u043e\u0436\u0435\u043d\u044b \u0441 \u0430\u0432\u0430\u0442\u0430\u0440\u043e\u043c"],"label\u0004Inline with avatar":["\u041d\u0430 \u043b\u0438\u043d\u0438\u0438 \u0441 \u0430\u0432\u0430\u0442\u0430\u0440\u043e\u043c"],"label\u0004Two columns with background overlays":["\u0414\u0432\u0435 \u043a\u043e\u043b\u043e\u043d\u043a\u0438 \u0441 \u0444\u043e\u043d\u043e\u0432\u044b\u043c\u0438 \u043d\u0430\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u043c\u0438"],"label\u0004Two columns with arrows":["\u0414\u0432\u0435 \u043a\u043e\u043b\u043e\u043d\u043a\u0438 \u0441\u043e \u0441\u0442\u0440\u0435\u043b\u043a\u0430\u043c\u0438"],"label\u0004Two columns with featured image":["\u0414\u0432\u0435 \u043a\u043e\u043b\u043e\u043d\u043a\u0438 \u0441 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435\u043c \u0437\u0430\u043f\u0438\u0441\u0438"],"%s Units":["% \u0435\u0434\u0438\u043d\u0438\u0446"],"A size unit for CSS markup\u0004Degree":["\u0421\u0442\u0435\u043f\u0435\u043d\u044c"],"A size unit for CSS markup\u0004Percentage":["\u041f\u0440\u043e\u0446\u0435\u043d\u0442"],"A size unit for CSS markup\u0004Em":["\u0420\u0430\u0437\u043c\u0435\u0440"],"A size unit for CSS markup\u0004Pixel":["\u041f\u0438\u043a\u0441\u0435\u043b\u044c"],"Select Units":["\u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u0435\u0434\u0438\u043d\u0438\u0446\u044b"],"Displays a dynamic image from your chosen source.":["\u041e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u0442 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0438\u0437 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u0433\u043e \u0432\u0430\u043c\u0438 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430."],"Dynamic Image":["\u0414\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435"],"Dynamic image placeholder":["\u043f\u043e\u043b\u0435 \u0434\u043b\u044f \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f"],"Choose your dynamic image type.":["\u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u0442\u0438\u043f \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f."],"Dynamic image":["\u0414\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435"],"Make image rounded":["\u0421\u0434\u0435\u043b\u0430\u0442\u044c \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0437\u0430\u043a\u0440\u0443\u0433\u043b\u0435\u043d\u043d\u044b\u043c"],"Custom field name":["\u0418\u043c\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0433\u043e \u043f\u043e\u043b\u044f"],"Custom field":["\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0435 \u043f\u043e\u043b\u0435"],"Link to":["\u0421\u0441\u044b\u043b\u043a\u0430 \u043d\u0430"],"Image height":["\u0412\u044b\u0441\u043e\u0442\u0430 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f"],"Image width":["\u0428\u0438\u0440\u0438\u043d\u0430 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f"],"Image size":["\u0420\u0430\u0437\u043c\u0435\u0440 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438"],"Author avatar":["\u0410\u0432\u0430\u0442\u0430\u0440 \u0430\u0432\u0442\u043e\u0440\u0430"],"Displays dynamic content based on your chosen source.":["\u041e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u0442 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043a\u043e\u043d\u0442\u0435\u043d\u0442 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u0433\u043e \u0432\u0430\u043c\u0438 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430."],"Dynamic Content":["\u0414\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043a\u043e\u043d\u0442\u0435\u043d\u0442"],"This is a placeholder for your description.":["\u042d\u0442\u043e \u043f\u043e\u043b\u0435 \u0434\u043b\u044f \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0432\u0430\u0448\u0435\u0433\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f"],"Choose your dynamic content type.":["\u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u0442\u0438\u043f \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430."],"Dynamic content":["\u0414\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043a\u043e\u043d\u0442\u0435\u043d\u0442"],"Custom more link":["\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0430\u044f \u0441\u0441\u044b\u043b\u043a\u0430 \u0435\u0449\u0435"],"Use theme more link":["\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0441\u044b\u043b\u043a\u0443 \u0435\u0449\u0435 \u0442\u0435\u043c\u044b"],"Excerpt length":["\u0414\u043b\u0438\u043d\u0430 \u043e\u0442\u0440\u044b\u0432\u043a\u0430"],"Author description":["\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0430\u0432\u0442\u043e\u0440\u0430 "],"Term description":["\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0442\u0435\u0440\u043c\u0438\u043d\u0430"],"Post excerpt":["\u041e\u0442\u0440\u044b\u0432\u043e\u043a \u0437\u0430\u043f\u0438\u0441\u0438"],"Post content":["\u0421\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0437\u0430\u043f\u0438\u0441\u0438"],"Dynamic link type":["\u0422\u0438\u043f \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0441\u0441\u044b\u043b\u043a\u0438"],"Updated date before text":["\u0414\u0430\u0442\u0430 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u0435\u0434 \u0442\u0435\u043a\u0441\u0442\u043e\u043c"],"Use % in place of the number of comments":["\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 % \u0432\u043c\u0435\u0441\u0442\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0435\u0432"],"Plural comments text":["\u0422\u0435\u043a\u0441\u0442 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0435\u0432 \u0432\u043e \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u043c \u0447\u0438\u0441\u043b\u0435"],"Singular comments text":["\u0422\u0435\u043a\u0441\u0442 \u0435\u0434\u0438\u043d\u0438\u0447\u043d\u044b\u0445 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0435\u0432"],"No comments text":["\u0422\u0435\u043a\u0441\u0442 \u0431\u0435\u0437 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0435\u0432"],"Term separator":["\u0420\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u0435\u043b\u044c \u0442\u0435\u0440\u043c\u0438\u043d\u043e\u0432"],"Replace with updated date":["\u0417\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u043e\u0439 \u0434\u0430\u0442\u043e\u0439"],"Updated date":["\u0414\u0430\u0442\u0430 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f"],"Date type":["\u0422\u0438\u043f \u0434\u0430\u0442\u044b"],"Terms":["\u0422\u0435\u0440\u043c\u0438\u043d\u044b"],"Hello World":["\u041f\u0440\u0438\u0432\u0435\u0442, \u043c\u0438\u0440"],"Comments number":["\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0435\u0432"],"List of terms":["\u0421\u043f\u0438\u0441\u043e\u043a \u0442\u0435\u0440\u043c\u0438\u043d\u043e\u0432"],"Post author name":["\u0418\u043c\u044f \u0430\u0432\u0442\u043e\u0440\u0430 \u0437\u0430\u043f\u0438\u0441\u0438"],"Post date":["\u0414\u0430\u0442\u0430 \u0437\u0430\u043f\u0438\u0441\u0438"],"Title":["\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a"],"Dynamic text type":["\u0422\u0438\u043f \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0442\u0435\u043a\u0441\u0442\u0430"],"Published date before text":["\u0414\u0430\u0442\u0430 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438 \u043f\u0435\u0440\u0435\u0434 \u0442\u0435\u043a\u0441\u0442\u043e\u043c"],"Term archives":["\u0410\u0440\u0445\u0438\u0432\u044b \u0442\u0435\u0440\u043c\u0438\u043d\u043e\u0432"],"Author meta":["\u041c\u0435\u0442\u0430 \u0430\u0432\u0442\u043e\u0440\u0430"],"Previous page of posts":["\u041f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0430\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u0437\u0430\u043f\u0438\u0441\u0435\u0439"],"Next page of posts":["\u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0430\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u0437\u0430\u043f\u0438\u0441\u0435\u0439"],"Comments area":["\u041e\u0431\u043b\u0430\u0441\u0442\u044c \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0435\u0432"],"Author archives":["\u0410\u0440\u0445\u0438\u0432\u044b \u0430\u0432\u0442\u043e\u0440\u0430"],"Single post":["\u0415\u0434\u0438\u043d\u0438\u0447\u043d\u0430\u044f \u0437\u0430\u043f\u0438\u0441\u044c"],"Taxonomy":["\u0422\u0430\u043a\u0441\u043e\u043d\u043e\u043c\u0438\u044f"],"In same term":["\u0422\u0435\u043c \u0436\u0435 \u0442\u0435\u0440\u043c\u0438\u043d\u043e\u043c"],"No previous post":["\u041d\u0435\u0442 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0437\u0430\u043f\u0438\u0441\u0438"],"No next post":["\u041d\u0435\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0437\u0430\u043f\u0438\u0441\u0438"],"Space between":["\u041f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e \u043c\u0435\u0436\u0434\u0443"],"Inline alignment":["\u041b\u0438\u043d\u0435\u0439\u043d\u043e\u0435 \u0432\u044b\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u043d\u0438\u0435"],"Inline post meta items":["\u041c\u0435\u0442\u0430\u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u043b\u0438\u043d\u0435\u0439\u043d\u044b\u0445 \u0437\u0430\u043f\u0438\u0441\u0435\u0439"],"Previous post":["\u041f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0430\u044f \u0437\u0430\u043f\u0438\u0441\u044c"],"Next post":["\u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0430\u044f \u0437\u0430\u043f\u0438\u0441\u044c"],"Current post":["\u0422\u0435\u043a\u0443\u0449\u0430\u044f \u0437\u0430\u043f\u0438\u0441\u044c"],"Source":["\u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a"],"Post":["\u0417\u0430\u043f\u0438\u0441\u044c"],"Choose\u2026":["\u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435..."],"Dynamic Link":["\u0414\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0441\u0441\u044b\u043b\u043a\u0430"],"Use fallback image":["\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0440\u0435\u0437\u0435\u0440\u0432\u043d\u043e\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435"],"Meta field name":["\u0418\u043c\u044f \u043c\u0435\u0442\u0430\u043f\u043e\u043b\u044f"],"Add a background image to this Container to make it dynamic.":["\u0414\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0444\u043e\u043d\u043e\u0432\u043e\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0432 \u044d\u0442\u043e\u0442 \u041a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440, \u0447\u0442\u043e\u0431\u044b \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0435\u0433\u043e \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u043d\u044b\u043c."],"User meta":["\u041c\u0435\u0442\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f"],"Term meta":["\u0422\u0435\u0440\u043c\u0438\u043d \u043c\u0435\u0442\u0430"],"Post meta":["\u041c\u0435\u0442\u0430 \u0437\u0430\u043f\u0438\u0441\u0438"],"Featured image":["\u0418\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0437\u0430\u043f\u0438\u0441\u0438"],"Dynamic Background Image":["\u0414\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0444\u043e\u043d\u043e\u0432\u043e\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435"],"Dynamic options":["\u0414\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b"],"Archive Navigation":["\u041d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u044f \u043f\u043e \u0430\u0440\u0445\u0438\u0432\u0443"],"Post Navigation":["\u041d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u044f \u043f\u043e \u0437\u0430\u043f\u0438\u0441\u044f\u043c"],"Post Meta Template":["\u041c\u0435\u0442\u0430 \u0448\u0430\u0431\u043b\u043e\u043d \u0437\u0430\u043f\u0438\u0441\u0438"],"Content Template":["\u0428\u0430\u0431\u043b\u043e\u043d \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430"],"% Comments":["% \u041a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438"],"1 Comment":["1 \u041a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439"],"No Comments":["\u041d\u0435\u0442 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0435\u0432"],"This is a placeholder for your content.":["\u042d\u0442\u043e \u043f\u043e\u043b\u0435 \u0434\u043b\u044f \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u0432\u0430\u0448\u0435\u0433\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0433\u043e. "],"This will remove the current sidebar widgets for the selected sidebar. Your layout must have a sidebar set for this Element to show.":["\u042d\u0442\u043e \u0443\u0434\u0430\u043b\u0438\u0442 \u0442\u0435\u043a\u0443\u0449\u0438\u0435 \u0432\u0438\u0434\u0436\u0435\u0442\u044b \u0441\u0430\u0439\u0434\u0431\u0430\u0440\u0430 \u0434\u043b\u044f \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u0433\u043e \u0441\u0430\u0439\u0434\u0431\u0430\u0440\u0430. \u0412 \u0432\u0430\u0448\u0435\u043c \u043c\u0430\u043a\u0435\u0442\u0435 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d \u0441\u0430\u0439\u0434\u0431\u0430\u0440 \u0434\u043b\u044f \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u044d\u0442\u043e\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430."],"Site Footer":["\u041f\u043e\u0434\u0432\u0430\u043b \u0441\u0430\u0439\u0442\u0430"],"None":["\u041e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442"],"Type":["\u0422\u0438\u043f"],"Right Sidebar":["\u0412 \u043f\u0440\u0430\u0432\u043e\u043c \u0431\u043e\u043a\u043e\u0432\u0438\u043a\u0435"],"Left Sidebar":["\u0412 \u043b\u0435\u0432\u043e\u043c \u0431\u043e\u043a\u043e\u0432\u0438\u043a\u0435"],"Priority":["\u041f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442"],"Custom Hook":["\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 \u0445\u0443\u043a"],"Custom":["\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439"],"Site Header":["\u0428\u0430\u043f\u043a\u0430 \u0441\u0430\u0439\u0442\u0430"],"Page Hero":["Hero \u0421\u0442\u0440\u0430\u043d\u0438\u0446\u0430"],"Hook":["\u0425\u0443\u043a"],"Right":["\u0421\u043f\u0440\u0430\u0432\u0430"],"Left":["\u0421\u043b\u0435\u0432\u0430"],"Center":["\u041f\u043e \u0446\u0435\u043d\u0442\u0440\u0443"],"Location":["\u0420\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435"]}}} \ No newline at end of file diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-ru_RU-53e2a1d5945b8d2b1c35e81ae1e532f3.json b/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-ru_RU-53e2a1d5945b8d2b1c35e81ae1e532f3.json deleted file mode 100644 index 31dfd244..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-ru_RU-53e2a1d5945b8d2b1c35e81ae1e532f3.json +++ /dev/null @@ -1 +0,0 @@ -{"translation-revision-date":"2023-11-08 16:38:58+0000","generator":"WP-CLI\/2.6.0","source":"dist\/editor.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"ru","plural-forms":"nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);"},"Active Elements":["\u0410\u043a\u0442\u0438\u0432\u043d\u044b\u0435 \u042d\u0435\u043c\u0435\u043d\u0442\u044b"],"All Elements":["\u0412\u0441\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b"]}}} \ No newline at end of file diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-ru_RU-92fa58377f1b6f7bef9c785c31ae29ff.json b/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-ru_RU-92fa58377f1b6f7bef9c785c31ae29ff.json deleted file mode 100644 index 3b4bd9e2..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-ru_RU-92fa58377f1b6f7bef9c785c31ae29ff.json +++ /dev/null @@ -1 +0,0 @@ -{"translation-revision-date":"2023-11-08 16:38:58+0000","generator":"WP-CLI\/2.6.0","source":"dist\/site-library.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"ru","plural-forms":"nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);"},"Requires GeneratePress %s.":["\u0422\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f GeneratePress %s."],"Built by":["\u0421\u043e\u0437\u0434\u0430\u043d\u043e"],"Note: We do our best to ensure all imported images are licensed for open use. However, image licenses can change, so we strongly advise that you replace all imported images with your own.":["\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435. \u041c\u044b \u0434\u0435\u043b\u0430\u0435\u043c \u0432\u0441\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0435, \u0447\u0442\u043e\u0431\u044b \u0432\u0441\u0435 \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0431\u044b\u043b\u0438 \u043b\u0438\u0446\u0435\u043d\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u044b \u0434\u043b\u044f \u043e\u0442\u043a\u0440\u044b\u0442\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f. \u041e\u0434\u043d\u0430\u043a\u043e \u043b\u0438\u0446\u0435\u043d\u0437\u0438\u0438 \u043d\u0430 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u043c\u043e\u0433\u0443\u0442 \u043c\u0435\u043d\u044f\u0442\u044c\u0441\u044f, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u044b \u043d\u0430\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u043c \u0432\u0430\u043c \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u0432\u0441\u0435 \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0441\u0432\u043e\u0438\u043c\u0438 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u043c\u0438."],"Check out your new site and start making it yours!":["\u041f\u0440\u043e\u0432\u0435\u0440\u044c\u0442\u0435 \u0441\u0432\u043e\u0439 \u043d\u043e\u0432\u044b\u0439 \u0441\u0430\u0439\u0442 \u0438 \u043d\u0430\u0447\u043d\u0438\u0442\u0435 \u0434\u0435\u043b\u0430\u0442\u044c \u0435\u0433\u043e \u0441\u0432\u043e\u0438\u043c!"],"Learn more here":["\u0423\u0437\u043d\u0430\u0439\u0442\u0435 \u0431\u043e\u043b\u044c\u0448\u0435 \u0437\u0434\u0435\u0441\u044c"],"To disable it, find WP_DEBUG in your wp-config.php file and set it to false like the below.":["\u0427\u0442\u043e\u0431\u044b \u043e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c, \u043d\u0430\u0439\u0434\u0438\u0442\u0435 WP_DEBUG \u0432 \u0444\u0430\u0439\u043b\u0435 wp-config.php \u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 \u0434\u043b\u044f \u043d\u0435\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 false, \u043a\u0430\u043a \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e \u043d\u0438\u0436\u0435."],"WordPress debug mode is currently enabled. With this, any errors from third-party plugins might affect the import process.":["\u0412 \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0435\u0435 \u0432\u0440\u0435\u043c\u044f \u0432\u043a\u043b\u044e\u0447\u0435\u043d \u0440\u0435\u0436\u0438\u043c \u043e\u0442\u043b\u0430\u0434\u043a\u0438 WordPress. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u043b\u044e\u0431\u044b\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0445 \u043f\u043b\u0430\u0433\u0438\u043d\u043e\u0432 \u043c\u043e\u0433\u0443\u0442 \u043f\u043e\u0432\u043b\u0438\u044f\u0442\u044c \u043d\u0430 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0438\u043c\u043f\u043e\u0440\u0442\u0430."],"Debug Mode Enabled":["\u0412\u043a\u043b\u044e\u0447\u0435\u043d \u0440\u0435\u0436\u0438\u043c \u043e\u0442\u043b\u0430\u0434\u043a\u0438"],"Preview mobile":["\u041f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440 \u043d\u0430 \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u044b\u0445 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430\u0445"],"Preview tablet":["\u041f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440 \u043f\u043b\u0430\u043d\u0448\u0435\u0442\u0430"],"Preview desktop":["\u041f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440 \u0440\u0430\u0431\u043e\u0447\u0435\u0433\u043e \u0441\u0442\u043e\u043b\u0430"],"Elementor Tools":["\u0418\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b Elementor"],"Take note of the old and new URLs below, then head over to the Elementor Tools area to replace them.":["\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u0441\u0442\u0430\u0440\u044b\u0439 \u0438 \u043d\u043e\u0432\u044b\u0439 URL-\u0430\u0434\u0440\u0435\u0441\u0430 \u043d\u0438\u0436\u0435, \u0437\u0430\u0442\u0435\u043c \u043f\u0435\u0440\u0435\u0439\u0434\u0438\u0442\u0435 \u0432 \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 Elementor, \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u0438\u0445."],"Begin Import":["\u041d\u0430\u0447\u0430\u0442\u044c \u0438\u043c\u043f\u043e\u0440\u0442"],"I understand":["\u042f \u043f\u043e\u043d\u0438\u043c\u0430\u044e"],"Confirm Import":["\u041f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044c \u0438\u043c\u043f\u043e\u0440\u0442"],"Import Demo Content":["\u0418\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u043a\u043e\u043d\u0442\u0435\u043d\u0442"],"This will install and activate needed plugins, import demo content, and import site options.":["\u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0438 \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u043f\u043b\u0430\u0433\u0438\u043d\u044b, \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u043a\u043e\u043d\u0442\u0435\u043d\u0442 \u0438 \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0441\u0430\u0439\u0442\u0430."],"Import Theme Options":["\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0438\u043c\u043f\u043e\u0440\u0442\u0430 \u0442\u0435\u043c\u044b "],"This will import the options from the Customizer.":["\u0418\u043c\u043f\u043e\u0440\u0442 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0438\u0437 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u0449\u0438\u043a\u0430."],"These plugins need to be installed manually.":["\u042d\u0442\u0438 \u043f\u043b\u0430\u0433\u0438\u043d\u044b \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0432\u0440\u0443\u0447\u043d\u0443\u044e."],"These plugins are already installed.":["\u042d\u0442\u0438 \u043f\u043b\u0430\u0433\u0438\u043d\u044b \u0443\u0436\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u044b."],"These plugins can be installed automatically.":["\u042d\u0442\u0438 \u043f\u043b\u0430\u0433\u0438\u043d\u044b \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u044b \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438."],"Gathering information":["\u041f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0441\u0431\u043e\u0440 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438. "],"Refresh sites":["\u041e\u0431\u043d\u043e\u0432\u0438\u0442\u0435 \u0441\u0430\u0439\u0442\u044b"],"Requires GP Premium %s.":["\u0422\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u043f\u043b\u0430\u0433\u0438\u043d GP Premium %s."],"Page Builder":["\u041a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440 \u0441\u0442\u0440\u0430\u043d\u0438\u0446"],"Category":["\u041a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u044f"],"No thanks":["\u041d\u0435\u0442, \u0441\u043f\u0430\u0441\u0438\u0431\u043e"],"Remove imported site":["\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0441\u0430\u0439\u0442"],"This process makes changes to your website. If it contains important data, we suggest backing it up before proceeding.":["\u042d\u0442\u043e\u0442 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0432\u043d\u043e\u0441\u0438\u0442 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 \u0432\u0430\u0448 \u0441\u0430\u0439\u0442. \u0415\u0441\u043b\u0438 \u043e\u043d \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0432\u0430\u0436\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435, \u043c\u044b \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u043c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0440\u0435\u0437\u0435\u0440\u0432\u043d\u0443\u044e \u043a\u043e\u043f\u0438\u044e, \u043f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u044c."],"Try again":["\u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0439 \u0435\u0449\u0435 \u0440\u0430\u0437"],"No sites were found.":["\u0421\u0430\u0439\u0442\u043e\u0432 \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u043e."],"Restoring content":["\u0412\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0433\u043e"],"Installing %s":["\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 %s"],"Import Complete":["\u0418\u043c\u043f\u043e\u0440\u0442 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d"],"Importing theme options":["\u0418\u043c\u043f\u043e\u0440\u0442 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0442\u0435\u043c\u044b"],"Why?":["\u041f\u043e\u0447\u0435\u043c\u0443?"],"This process restores your previous options, widgets and active plugins. It will also remove your imported content and CSS.":["\u042d\u0442\u043e\u0442 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 \u0432\u0430\u0448\u0438 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b, \u0432\u0438\u0434\u0436\u0435\u0442\u044b \u0438 \u0430\u043a\u0442\u0438\u0432\u043d\u044b\u0435 \u043f\u043b\u0430\u0433\u0438\u043d\u044b. \u041e\u043d \u0442\u0430\u043a\u0436\u0435 \u0443\u0434\u0430\u043b\u0438\u0442 \u0432\u0430\u0448 \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043a\u043e\u043d\u0442\u0435\u043d\u0442 \u0438 CSS."],"It is highly recommended that you remove the last site you imported before importing a new one.":["\u041d\u0430\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442\u0441\u044f \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0441\u0430\u0439\u0442 \u043f\u0435\u0440\u0435\u0434 \u0438\u043c\u043f\u043e\u0440\u0442\u043e\u043c \u043d\u043e\u0432\u043e\u0433\u043e."],"Existing Site Import Detected":["\u041e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d \u0438\u043c\u043f\u043e\u0440\u0442 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0433\u043e \u0441\u0430\u0439\u0442\u0430"],"Restoring theme options":["\u0412\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a \u0442\u0435\u043c\u044b"],"New URL":["\u041d\u043e\u0432\u044b\u0439 \u0430\u0434\u0440\u0435\u0441 URL"],"Old URL":["\u0421\u0442\u0430\u0440\u044b\u0439 \u0430\u0434\u0440\u0435\u0441 URL"],"This site is using Elementor which means you will want to replace the imported image URLs.":["\u042d\u0442\u043e\u0442 \u0441\u0430\u0439\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 Elementor, \u0447\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u0412\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c URL-\u0430\u0434\u0440\u0435\u0441\u0430 \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439."],"Additional Cleanup":["\u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u043e\u0447\u0438\u0441\u0442\u043a\u0430"],"This site uses the following plugins.":["\u042d\u0442\u043e\u0442 \u0441\u0430\u0439\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043f\u043b\u0430\u0433\u0438\u043d\u044b."],"All":["\u0412\u0441\u0435"],"View Site":["\u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0441\u0430\u0439\u0442"],"Get Started":["\u041d\u0430\u0447\u0430\u0442\u044c"],"Plugins":["\u041f\u043b\u0430\u0433\u0438\u043d\u044b"],"Installing plugins":["\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043f\u043b\u0430\u0433\u0438\u043d\u043e\u0432"],"Activating plugins":["\u0410\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u044f \u043f\u043b\u0430\u0433\u0438\u043d\u043e\u0432"],"Importing widgets":["\u0418\u043c\u043f\u043e\u0440\u0442 \u0432\u0438\u0434\u0436\u0435\u0442\u043e\u0432"],"Importing site options":["\u0418\u043c\u043f\u043e\u0440\u0442 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a \u0441\u0430\u0439\u0442\u0430"],"Importing content":["\u0418\u043c\u043f\u043e\u0440\u0442 \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430"],"None":["\u041e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442"],"Import":["\u0418\u043c\u043f\u043e\u0440\u0442"]}}} \ No newline at end of file diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-ru_RU-cbab080b0f20fd6c323029398be6c986.json b/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-ru_RU-cbab080b0f20fd6c323029398be6c986.json deleted file mode 100644 index c12a39a7..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-ru_RU-cbab080b0f20fd6c323029398be6c986.json +++ /dev/null @@ -1 +0,0 @@ -{"translation-revision-date":"2023-11-08 16:38:58+0000","generator":"WP-CLI\/2.6.0","source":"dist\/dashboard.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"ru","plural-forms":"nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);"},"This will delete all of your customizer settings. It cannot be undone.":["\u042d\u0442\u043e \u0443\u0434\u0430\u043b\u0438\u0442 \u0432\u0441\u0435 \u0432\u0430\u0448\u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043a\u0430\u0441\u0442\u043e\u043c\u0430\u0439\u0437\u0435\u0440\u0430. \u042d\u0442\u043e \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043e\u0442\u043c\u0435\u043d\u0435\u043d\u043e."],"Reset your customizer settings.":["\u0421\u0431\u0440\u043e\u0441\u044c\u0442\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043a\u0430\u0441\u0442\u043e\u043c\u0430\u0439\u0437\u0435\u0440\u0430."],"Options imported.":["\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u044b."],"This can overwrite existing settings and cannot be undone.":["\u042d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0438 \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043e\u0442\u043c\u0435\u043d\u0435\u043d\u043e."],"Import your customizer settings.":["\u0418\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0439\u0442\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u041a\u0430\u0441\u0442\u043e\u043c\u0430\u0439\u0437\u0435\u0440\u0430."],"Global Colors":["\u0413\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0435 \u0446\u0432\u0435\u0442\u0430"],"Export your customizer settings.":["\u042d\u043a\u0441\u043f\u043e\u0440\u0442 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a \u043a\u0430\u0441\u0442\u043e\u043c\u0430\u0439\u0437\u0435\u0440\u0430."],"Import \/ Export":["\u0418\u043c\u043f\u043e\u0440\u0442 \/ \u042d\u043a\u0441\u043f\u043e\u0440\u0442"],"License key deactivated.":["\u041b\u0438\u0446\u0435\u043d\u0437\u0438\u043e\u043d\u043d\u044b\u0439 \u043a\u043b\u044e\u0447 \u0434\u0435\u0430\u043a\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u043d."],"License key activated.":["\u041b\u0438\u0446\u0435\u043d\u0437\u0438\u043e\u043d\u043d\u044b\u0439 \u043a\u043b\u044e\u0447 \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u043d."],"Get alpha and beta updates directly to your Dashboard.":["\u041f\u043e\u043b\u0443\u0447\u0430\u0439\u0442\u0435 \u0430\u043b\u044c\u0444\u0430- \u0438 \u0431\u0435\u0442\u0430-\u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u044f\u043c\u043e \u043d\u0430 \u041a\u043e\u043d\u0441\u043e\u043b\u0438."],"Enter your license key to activate updates.":["\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u043b\u0438\u0446\u0435\u043d\u0437\u0438\u043e\u043d\u043d\u044b\u0439 \u043a\u043b\u044e\u0447, \u0447\u0442\u043e\u0431\u044b \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f."],"Not receiving premium updates.":["\u041f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u043f\u0440\u0435\u043c\u0438\u0443\u043c \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0439 \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u043e."],"Receiving premium updates.":["\u041f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u043f\u0440\u0435\u043c\u0438\u0443\u043c \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0439 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u043e."],"Options exported":["\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u044b"],"This will delete all settings for this module. It cannot be undone.":["\u042d\u0442\u043e \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u0442 \u043a \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044e \u0432\u0441\u0435\u0445 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043c\u043e\u0434\u0443\u043b\u044f. \u042d\u0442\u043e \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043e\u0442\u043c\u0435\u043d\u0435\u043d\u043e."],"Open tools for this module.":["\u041e\u0442\u043a\u0440\u044b\u0442\u044c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043c\u043e\u0434\u0443\u043b\u044f."],"Open Elements":["\u041e\u0442\u043a\u0440\u044b\u0442\u044c \u042d\u043b\u0435\u043c\u0435\u043d\u0442\u044b"],"Open Site Library":["\u041e\u0442\u043a\u0440\u044b\u0442\u044c \u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u0421\u0430\u0439\u0442\u043e\u0432"],"Settings reset.":["\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0441\u0431\u0440\u043e\u0448\u0435\u043d\u044b"],"Typography":["\u0422\u0438\u043f\u043e\u0433\u0440\u0430\u0444\u0438\u043a\u0430"],"All":["\u0412\u0441\u0435"],"Reset":["\u0421\u0431\u0440\u043e\u0441"],"Modules":["\u041c\u043e\u0434\u0443\u043b\u0438"],"License Key":["\u041b\u0438\u0446\u0435\u043d\u0437\u0438\u043e\u043d\u043d\u044b\u0439 \u043a\u043b\u044e\u0447"],"Deactivate":["\u0414\u0435\u0430\u043a\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u0442\u044c"],"Activate":["\u0410\u043a\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u0442\u044c"],"This module has been deprecated. Deactivating it will remove it from this list.":["\u042d\u0442\u043e\u0442 \u043c\u043e\u0434\u0443\u043b\u044c \u0443\u0441\u0442\u0430\u0440\u0435\u043b. \u0414\u0435\u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u044f \u0443\u0434\u0430\u043b\u0438\u0442 \u0435\u0433\u043e \u0438\u0437 \u044d\u0442\u043e\u0433\u043e \u0441\u043f\u0438\u0441\u043a\u0430."],"Import":["\u0418\u043c\u043f\u043e\u0440\u0442"],"Export":["\u042d\u043a\u0441\u043f\u043e\u0440\u0442"]}}} \ No newline at end of file diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-ru_RU-ecf9f3c2af10c4f2dfbf4f42504922d1.json b/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-ru_RU-ecf9f3c2af10c4f2dfbf4f42504922d1.json deleted file mode 100644 index 37e7b72a..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-ru_RU-ecf9f3c2af10c4f2dfbf4f42504922d1.json +++ /dev/null @@ -1 +0,0 @@ -{"translation-revision-date":"2023-11-08 16:38:58+0000","generator":"WP-CLI\/2.6.0","source":"dist\/customizer.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"ru","plural-forms":"nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);"},"Related\/Upsell Product Titles":["\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043f\u043e\u0445\u043e\u0436\u0438\u0445\/\u0430\u043f\u0441\u0435\u043b\u043b \u0442\u043e\u0432\u0430\u0440\u043e\u0432"],"Catalog Product Titles":["\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u043e\u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0430"],"Off-Canvas Sub-Menu Items":["\u041f\u0443\u043d\u043a\u0442\u044b \u043f\u043e\u0434\u043c\u0435\u043d\u044e Off-Canvas"],"Off-Canvas Menu Items":["\u041f\u0443\u043d\u043a\u0442\u044b \u043c\u0435\u043d\u044e Off-Canvas"],"Secondary Mobile Menu Toggle":["\u041f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u0442\u0435\u043b\u044c \u0432\u0442\u043e\u0440\u0438\u0447\u043d\u043e\u0433\u043e \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u043e\u0433\u043e \u043c\u0435\u043d\u044e"],"Secondary Sub-Menu Items":["\u041f\u0443\u043d\u043a\u0442\u044b \u0432\u0442\u043e\u0440\u0438\u0447\u043d\u043e\u0433\u043e \u043f\u043e\u0434\u043c\u0435\u043d\u044e"],"Secondary Menu Items":["\u041f\u0443\u043d\u043a\u0442\u044b \u0432\u0442\u043e\u0440\u0438\u0447\u043d\u043e\u0433\u043e \u043c\u0435\u043d\u044e"],"Off-Canvas Panel":["\u041f\u0430\u043d\u0435\u043b\u044c Off-Canvas"],"WooCommerce":["WooCommerce"],"Secondary Navigation":["\u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u043c\u0435\u043d\u044e"]}}} \ No newline at end of file diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-ru_RU.mo b/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-ru_RU.mo deleted file mode 100644 index dd9262e2..00000000 Binary files a/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-ru_RU.mo and /dev/null differ diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-sv_SE-42da344ccb044413769d16ed3484307b.json b/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-sv_SE-42da344ccb044413769d16ed3484307b.json deleted file mode 100644 index 58f573c2..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-sv_SE-42da344ccb044413769d16ed3484307b.json +++ /dev/null @@ -1 +0,0 @@ -{"translation-revision-date":"2022-10-01 13:13:24+0000","generator":"WP-CLI\/2.6.0","source":"dist\/block-elements.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"sv_SE","plural-forms":"nplurals=2; plural=n != 1;"},"Loop Template":[""],"The taxonomy to check if in the same term.":[""],"Check for posts with the same term as the current post.":["Kolla efter inl\u00e4gg med samma term som det nuvarande inl\u00e4gget."],"Remove container condition":["Ta bort beh\u00e5llarens villkor"],"Display Order":[""],"Parent Element":["\u00d6verordnat element"],"First post":["F\u00f6rsta inl\u00e4gg"],"No post meta":[""],"No featured image":["Ingen utvald bild"],"Keep default archive navigation container":[""],"Disable default pagination":[""],"Add default archive navigation container":[""],"Disable default post navigation":[""],"Use the above template tag to add the current year to your footer.":[""],"Current year template tag":[""],"Disable primary post meta":["Inaktivera prim\u00e4r metadata f\u00f6r inl\u00e4gg"],"Disable featured image":["Inaktivera utvald bild"],"Disable title":["Inaktivera rubrik"],"Keep default post container":[""],"Post meta name":["Namn f\u00f6r metadata f\u00f6r inl\u00e4gg"],"Term name":["Termnamn"],"Posts with custom field":["Inl\u00e4gg med anpassat f\u00e4lt"],"Posts with term":["Inl\u00e4gg med term"],"All posts":["Alla inl\u00e4gg"],"Apply to":["Till\u00e4mpa p\u00e5"],"Tag name":["Etikettnamn"],"Replace default secondary post meta":[""],"Replace default primary post meta":[""],"Custom hook name":["V\u00e4lj namn f\u00f6r \u00e5tg\u00e4rds-hook"],"Choose your hook":["V\u00e4lj din \u00e5tg\u00e4rds-hook"],"Hook name":["Namn p\u00e5 \u00e5tg\u00e4rds-hook"],"Quick hook select":[""],"Before post title":["F\u00f6re inl\u00e4ggsrubrik"],"After post title":["Efter inl\u00e4ggsrubrik"],"This Element will replace your site footer area that holds your copyright message. It will not replace footer widgets if they exist.":["Detta element kommer att ers\u00e4tta ditt sidfotomr\u00e5de som inneh\u00e5ller ditt upphovsr\u00e4ttsmeddelande. Det ers\u00e4tter inte sidfotens widgetar om det finns."],"Templates":["Mallar"],"Element type":["Elementtyp"],"Editor width":["Redigeringsbredd"],"Install GenerateBlocks":["Installera GenerateBlocks"],"Activate GenerateBlocks":["Aktivera GenerateBlocks"],"To take full advantage of Block Elements, we suggest using our GenerateBlocks plugin.":["F\u00f6r att dra full nytta av Block Elements f\u00f6resl\u00e5r vi att du anv\u00e4nder v\u00e5rt till\u00e4gg GenerateBlocks."],"Block Element":["Block Element"],"After content container":["Efter inneh\u00e5llsbeh\u00e5llare"],"After content":["Efter inneh\u00e5ll"],"Before content":["F\u00f6re inneh\u00e5ll"],"Before content container":["F\u00f6re inneh\u00e5llsbeh\u00e5llare"],"After header":[""],"label\u0004Single post hero with excerpt":[""],"label\u0004Basic single post page hero":[""],"label\u0004Rounded buttons with icon":["Rundade knappar med ikon"],"label\u0004Default next and previous buttons":["Standardknappar f\u00f6r n\u00e4sta och f\u00f6reg\u00e5ende"],"label\u0004Landscape layout":["Liggande layout"],"label\u0004Layout with offset content":["Layout med f\u00f6rskjutet inneh\u00e5ll"],"label\u0004Basic layout with term buttons":[""],"label\u0004Full footer 2":["Hel sidfot 2"],"label\u0004Full footer 1":["Hel sidfot 1"],"label\u0004Term buttons":[""],"label\u0004Stacked with avatar":["Staplad med profilbild"],"label\u0004Inline with avatar":[""],"label\u0004Two columns with background overlays":["2 kolumner med bakgrund\u00f6verl\u00e4gg"],"label\u0004Two columns with arrows":["Tv\u00e5 kolumner med pilar"],"label\u0004Two columns with featured image":["Tv\u00e5 kolumner med utvald bild"],"%s Units":[""],"A size unit for CSS markup\u0004Degree":["Grad"],"A size unit for CSS markup\u0004Percentage":["Procentsats"],"A size unit for CSS markup\u0004Em":["Em"],"A size unit for CSS markup\u0004Pixel":["Pixel"],"Select Units":["V\u00e4lj enheter"],"Displays a dynamic image from your chosen source.":["Visar en dynamisk bild fr\u00e5n din valda k\u00e4lla."],"Dynamic Image":["Dynamisk bild"],"Dynamic image placeholder":["Platsh\u00e5llare f\u00f6r dynamisk bild"],"Choose your dynamic image type.":["V\u00e4lj din dynamiska bildtyp."],"Dynamic image":["Dynamisk bild"],"Make image rounded":["G\u00f6r bild rundad"],"Custom field name":["Anpassat f\u00e4ltnamn"],"Custom field":["Anpassat f\u00e4lt"],"Link to":["L\u00e4nk till"],"Image height":["Bildh\u00f6jd"],"Image width":["Bildbredd"],"Image size":["Bildstorlek"],"Author avatar":["Profilbild f\u00f6r f\u00f6rfattare"],"Displays dynamic content based on your chosen source.":["Visar dynamiskt inneh\u00e5ll baserat p\u00e5 din valda k\u00e4lla."],"Dynamic Content":["Dynamiskt inneh\u00e5ll"],"This is a placeholder for your description.":["Detta \u00e4r en platsh\u00e5llare f\u00f6r din beskrivning."],"Choose your dynamic content type.":["V\u00e4lj din dynamiska inneh\u00e5llstyp."],"Dynamic content":["Dynamiskt inneh\u00e5ll"],"Custom more link":["Anpassad l\u00e4nk f\u00f6r \u201dMer\u201d"],"Use theme more link":["Anv\u00e4nd temats l\u00e4nk f\u00f6r \u201dMer\u201d"],"Excerpt length":["Utdragsl\u00e4ngd"],"Author description":["F\u00f6rfattarbeskrivning"],"Term description":["Termbeskrivning"],"Post excerpt":["Inl\u00e4ggsutdrag"],"Post content":["Inl\u00e4ggsinneh\u00e5ll"],"Dynamic link type":["Dynamisk l\u00e4nktyp"],"Updated date before text":["Uppdateringsdatum f\u00f6re text"],"Use % in place of the number of comments":["Anv\u00e4nd % i st\u00e4llet f\u00f6r antalet kommentarer"],"Plural comments text":["Kommentarstext i plural"],"Singular comments text":["Kommentarstext i singular"],"No comments text":["Text f\u00f6r \u201dInga kommentarer\u201d"],"Term separator":[""],"Replace with updated date":["Ers\u00e4tt med uppdateringsdatum"],"Updated date":["Uppdateringsdatum"],"Date type":["Datumtyp"],"Terms":["Termer"],"Hello World":["Hej v\u00e4rlden"],"Comments number":["Antal kommentarer"],"List of terms":["Lista \u00f6ver termer"],"Post author name":["Inl\u00e4ggsf\u00f6rfattarens namn"],"Post date":["Publiceringsdatum"],"Title":["Rubrik"],"Dynamic text type":["Dynamisk texttyp"],"Published date before text":["Publiceringsdatum f\u00f6re text"],"Term archives":["Termarkiv"],"Author meta":["Meta f\u00f6r f\u00f6rfattare"],"Previous page of posts":["F\u00f6reg\u00e5ende sida med inl\u00e4gg"],"Next page of posts":["N\u00e4sta sida med inl\u00e4gg"],"Comments area":["Kommentaromr\u00e5de"],"Author archives":["F\u00f6rfattararkiv"],"Single post":["Enskilt inl\u00e4gg"],"Taxonomy":["Taxonomi"],"In same term":["I samma term"],"No previous post":["Inget f\u00f6reg\u00e5ende inl\u00e4gg"],"No next post":["Inget n\u00e4sta inl\u00e4gg"],"Space between":["Avst\u00e5nd mellan"],"Inline alignment":[""],"Inline post meta items":[""],"Previous post":["F\u00f6reg\u00e5ende inl\u00e4gg"],"Next post":["N\u00e4sta inl\u00e4gg"],"Current post":["Nuvarande inl\u00e4gg"],"Source":["K\u00e4lla"],"Post":["Inl\u00e4gg"],"Choose\u2026":["V\u00e4lj \u2026"],"Dynamic Link":["Dynamisk l\u00e4nk"],"Use fallback image":["Anv\u00e4nd reservbild"],"Meta field name":[""],"Add a background image to this Container to make it dynamic.":["L\u00e4gg till en bakgrundsbild i denna beh\u00e5llare f\u00f6r att g\u00f6ra den dynamisk."],"User meta":["Anv\u00e4ndarmeta"],"Term meta":[""],"Post meta":["Metadata f\u00f6r inl\u00e4gg"],"Featured image":["Utvald bild"],"Dynamic Background Image":["Dynamisk bakgrundsbild"],"Dynamic options":["Dynamiska alternativ"],"Archive Navigation":["Arkivnavigering"],"Post Navigation":["Inl\u00e4ggsnavigering"],"Post Meta Template":[""],"Content Template":["Inneh\u00e5llsmall"],"% Comments":["% kommentarer"],"1 Comment":["1 kommentar"],"No Comments":["Inga kommentarer"],"This is a placeholder for your content.":["Detta \u00e4r en platsh\u00e5llare f\u00f6r ditt inneh\u00e5ll."],"This will remove the current sidebar widgets for the selected sidebar. Your layout must have a sidebar set for this Element to show.":["Detta kommer ta bort nuvarande widgetar i sidopanelen f\u00f6r den valda sidopanelen. Din layout m\u00e5ste ha en sidopanel f\u00f6r att detta element ska visas."],"Site Footer":["Webbplatsens sidfot"],"None":["Ingen"],"Type":["Typ"],"Right Sidebar":["H\u00f6ger sidopanel"],"Left Sidebar":["V\u00e4nster sidopanel"],"Priority":["Prioritet"],"Custom Hook":["Anpassad \u00e5tg\u00e4rds-hook"],"Custom":["Anpassad"],"Site Header":["Webbplatsens sidhuvud"],"Page Hero":[""],"Hook":["\u00c5tg\u00e4rds-hook"],"Right":["H\u00f6ger"],"Left":["V\u00e4nster"],"Center":["Centrerat"],"Location":["Plats"]}}} \ No newline at end of file diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-sv_SE-53e2a1d5945b8d2b1c35e81ae1e532f3.json b/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-sv_SE-53e2a1d5945b8d2b1c35e81ae1e532f3.json deleted file mode 100644 index 5b924ae9..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-sv_SE-53e2a1d5945b8d2b1c35e81ae1e532f3.json +++ /dev/null @@ -1 +0,0 @@ -{"translation-revision-date":"2022-10-01 13:13:24+0000","generator":"WP-CLI\/2.6.0","source":"dist\/editor.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"sv_SE","plural-forms":"nplurals=2; plural=n != 1;"},"Active Elements":["Aktiva element"],"All Elements":["Alla element"]}}} \ No newline at end of file diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-sv_SE-92fa58377f1b6f7bef9c785c31ae29ff.json b/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-sv_SE-92fa58377f1b6f7bef9c785c31ae29ff.json deleted file mode 100644 index b2ff7285..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-sv_SE-92fa58377f1b6f7bef9c785c31ae29ff.json +++ /dev/null @@ -1 +0,0 @@ -{"translation-revision-date":"2022-10-01 13:13:24+0000","generator":"WP-CLI\/2.6.0","source":"dist\/site-library.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"sv_SE","plural-forms":"nplurals=2; plural=n != 1;"},"Requires GeneratePress %s.":["Kr\u00e4ver GeneratePress %s."],"Built by":["Byggd med"],"Note: We do our best to ensure all imported images are licensed for open use. However, image licenses can change, so we strongly advise that you replace all imported images with your own.":[""],"Check out your new site and start making it yours!":["Kolla in din nya webbplats och b\u00f6rja g\u00f6ra den till din egen!"],"Learn more here":["L\u00e4r dig mer h\u00e4r"],"To disable it, find WP_DEBUG in your wp-config.php file and set it to false like the below.":["F\u00f6r att inaktivera den, hitta WP_DEBUG i din wp-config.php-fil och st\u00e4ll in den p\u00e5 falsk som nedan."],"WordPress debug mode is currently enabled. With this, any errors from third-party plugins might affect the import process.":["WordPress fels\u00f6kningsl\u00e4ge \u00e4r f\u00f6r n\u00e4rvarande aktiverat. Med detta kan eventuella fel fr\u00e5n till\u00e4gg fr\u00e5n tredje part p\u00e5verka importprocessen."],"Debug Mode Enabled":["Fels\u00f6kningsl\u00e4ge aktiverat"],"Preview mobile":["F\u00f6rhandsgranska mobil"],"Preview tablet":["F\u00f6rhandsgranska surfplatta"],"Preview desktop":["F\u00f6rhandsgranska station\u00e4r dator"],"Elementor Tools":["Elementor-verktyg"],"Take note of the old and new URLs below, then head over to the Elementor Tools area to replace them.":[""],"Begin Import":["Starta import"],"I understand":["Jag f\u00f6rst\u00e5r"],"Confirm Import":["Bekr\u00e4fta import"],"Import Demo Content":["Importera demoinneh\u00e5ll"],"This will install and activate needed plugins, import demo content, and import site options.":["Detta kommer att installera och aktivera n\u00f6dv\u00e4ndiga till\u00e4gg, importera demo-inneh\u00e5ll och importera webbplatsalternativ."],"Import Theme Options":["Importera temaalternativ"],"This will import the options from the Customizer.":["Detta importerar alternativen fr\u00e5n anpassaren."],"These plugins need to be installed manually.":["Dessa till\u00e4gg m\u00e5ste installeras manuellt."],"These plugins are already installed.":["Dessa till\u00e4gg \u00e4r redan installerade."],"These plugins can be installed automatically.":["Dessa till\u00e4gg kan installeras automatiskt."],"Gathering information":["Samlar information"],"Refresh sites":["Uppdatera webbplatser"],"Requires GP Premium %s.":["Kr\u00e4ver GP Premium %s."],"Page Builder":["Sidbyggare"],"Category":["Kategori"],"No thanks":["Nej tack"],"Remove imported site":["Ta bort importerad webbplats"],"This process makes changes to your website. If it contains important data, we suggest backing it up before proceeding.":["Denna process g\u00f6r \u00e4ndringar p\u00e5 din webbplats. Om den inneh\u00e5ller viktiga data f\u00f6resl\u00e5r vi att du s\u00e4kerhetskopierar den innan du forts\u00e4tter."],"Try again":["F\u00f6rs\u00f6k igen"],"No sites were found.":["Inga webbplatser hittades."],"Restoring content":["\u00c5terst\u00e4ller inneh\u00e5ll"],"Installing %s":["Installerar %s"],"Import Complete":["Import slutf\u00f6rd"],"Importing theme options":["Importerar temaalternativ"],"Why?":["Varf\u00f6r?"],"This process restores your previous options, widgets and active plugins. It will also remove your imported content and CSS.":["Denna process \u00e5terst\u00e4ller dina f\u00f6reg\u00e5ende alternativ, widgetar och aktiva till\u00e4gg. Det tar ocks\u00e5 bort ditt importerade inneh\u00e5ll och CSS."],"It is highly recommended that you remove the last site you imported before importing a new one.":["Det rekommenderas starkt att du tar bort den senaste webbplatsen du importerade innan du importerar en ny."],"Existing Site Import Detected":["Befintlig webbplatsimport uppt\u00e4ckt"],"Restoring theme options":["\u00c5terst\u00e4ller temalternativ"],"New URL":["Ny URL"],"Old URL":["Gammal URL"],"This site is using Elementor which means you will want to replace the imported image URLs.":["Denna webbplats anv\u00e4nder Elementor vilket inneb\u00e4r att du beh\u00f6ver ers\u00e4tta de importerade bild-URL:erna."],"Additional Cleanup":["Ytterligare upprensning"],"This site uses the following plugins.":["Denna webbplats anv\u00e4nder f\u00f6ljande till\u00e4gg."],"All":["Alla"],"View Site":["Visa webbplats"],"Get Started":["Komma ig\u00e5ng"],"Plugins":["Till\u00e4gg"],"Installing plugins":["Installerar till\u00e4gg"],"Activating plugins":["Aktiverar till\u00e4gg"],"Importing widgets":["Importerar widgetar"],"Importing site options":["Importerar webbplatsalternativ"],"Importing content":["Importerar inneh\u00e5ll"],"None":["Ingen"],"Import":["Importera"]}}} \ No newline at end of file diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-sv_SE-cbab080b0f20fd6c323029398be6c986.json b/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-sv_SE-cbab080b0f20fd6c323029398be6c986.json deleted file mode 100644 index 4bad3bc6..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-sv_SE-cbab080b0f20fd6c323029398be6c986.json +++ /dev/null @@ -1 +0,0 @@ -{"translation-revision-date":"2022-10-01 13:13:24+0000","generator":"WP-CLI\/2.6.0","source":"dist\/dashboard.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"sv_SE","plural-forms":"nplurals=2; plural=n != 1;"},"This will delete all of your customizer settings. It cannot be undone.":["Detta kommer ta bort alla dina anpassningsinst\u00e4llningar. Det kan inte \u00e5ngras."],"Reset your customizer settings.":["\u00c5terst\u00e4ll dina inst\u00e4llningar f\u00f6r anpassaren."],"Options imported.":["Alternativ importerade."],"This can overwrite existing settings and cannot be undone.":["Detta kan skriva \u00f6ver befintliga inst\u00e4llningar och kan inte \u00e5ngras."],"Import your customizer settings.":["Importera dina inst\u00e4llningar f\u00f6r anpassaren."],"Global Colors":["Globala f\u00e4rger"],"Export your customizer settings.":["Exportera dina inst\u00e4llningar f\u00f6r anpassaren."],"Import \/ Export":["Import\/export"],"License key deactivated.":["Licensnyckel inaktiverad."],"License key activated.":["Licensnyckel aktiverad."],"Get alpha and beta updates directly to your Dashboard.":[""],"Enter your license key to activate updates.":["Ange din licensnyckel f\u00f6r att aktivera uppdateringar."],"Not receiving premium updates.":["Tar inte emot premiumuppdateringar."],"Receiving premium updates.":["Tar emot premiumuppdateringar."],"Options exported":["Alternativ exporterad"],"This will delete all settings for this module. It cannot be undone.":["Detta kommer ta bort alla inst\u00e4llningar f\u00f6r denna modul. Det kan inte \u00e5ngras."],"Open tools for this module.":["\u00d6ppna verktyg f\u00f6r denna modul."],"Open Elements":["\u00d6ppna element"],"Open Site Library":["\u00d6ppna webbplatsbibliotek"],"Settings reset.":["Inst\u00e4llningar \u00e5terst\u00e4lls."],"Typography":["Typografi"],"All":["Alla"],"Reset":["\u00c5terst\u00e4ll"],"Modules":["Moduler"],"License Key":["Licensnyckel"],"Deactivate":["Inaktivera"],"Activate":["Aktivera"],"This module has been deprecated. Deactivating it will remove it from this list.":["Denna modul har tagits ur bruk. Vid inaktivering kommer den att tas bort fr\u00e5n denna lista."],"Import":["Importera"],"Export":["Exportera"]}}} \ No newline at end of file diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-sv_SE-ecf9f3c2af10c4f2dfbf4f42504922d1.json b/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-sv_SE-ecf9f3c2af10c4f2dfbf4f42504922d1.json deleted file mode 100644 index f7a81aff..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-sv_SE-ecf9f3c2af10c4f2dfbf4f42504922d1.json +++ /dev/null @@ -1 +0,0 @@ -{"translation-revision-date":"2022-10-01 13:13:24+0000","generator":"WP-CLI\/2.6.0","source":"dist\/customizer.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"sv_SE","plural-forms":"nplurals=2; plural=n != 1;"},"Related\/Upsell Product Titles":["Produktrubriker f\u00f6r relaterad\/merf\u00f6rs\u00e4ljning"],"Catalog Product Titles":[""],"Off-Canvas Sub-Menu Items":[""],"Off-Canvas Menu Items":[""],"Secondary Mobile Menu Toggle":[""],"Secondary Sub-Menu Items":[""],"Secondary Menu Items":["Sekund\u00e4ra menyalternativ"],"Off-Canvas Panel":[""],"WooCommerce":["WooCommerce"],"Secondary Navigation":["Sekund\u00e4r navigation"]}}} \ No newline at end of file diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-sv_SE.mo b/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-sv_SE.mo deleted file mode 100644 index 2452b734..00000000 Binary files a/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-sv_SE.mo and /dev/null differ diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-uk.mo b/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-uk.mo deleted file mode 100644 index 007659aa..00000000 Binary files a/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-uk.mo and /dev/null differ diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-vi.mo b/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-vi.mo deleted file mode 100644 index 1838e84d..00000000 Binary files a/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-vi.mo and /dev/null differ diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-zh_CN.mo b/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-zh_CN.mo deleted file mode 100644 index cf5a1f2d..00000000 Binary files a/wp-content/upgrade-temp-backup/plugins/gp-premium/langs/gp-premium-zh_CN.mo and /dev/null differ diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/library/alpha-color-picker/wp-color-picker-alpha.js b/wp-content/upgrade-temp-backup/plugins/gp-premium/library/alpha-color-picker/wp-color-picker-alpha.js deleted file mode 100644 index bd407429..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/library/alpha-color-picker/wp-color-picker-alpha.js +++ /dev/null @@ -1,635 +0,0 @@ -/**! - * wp-color-picker-alpha - * - * Overwrite Automattic Iris for enabled Alpha Channel in wpColorPicker - * Only run in input and is defined data alpha in true - * - * Version: 3.0.0 - * https://github.com/kallookoo/wp-color-picker-alpha - * Licensed under the GPLv2 license or later. - */ - -( function( $, undef ) { - - var wpColorPickerAlpha = { - 'version' : 300 - }; - - // Always try to use the last version of this script. - if ( 'wpColorPickerAlpha' in window && 'version' in window.wpColorPickerAlpha ) { - var version = parseInt( window.wpColorPickerAlpha.version, 10 ); - if ( ! isNaN( version ) && version >= wpColorPickerAlpha.version ) { - return; - } - } - - // Prevent multiple initiations - if ( Color.fn.hasOwnProperty( 'to_s' ) ) { - return; - } - - // Create new method to replace the `Color.toString()` inside the scripts. - Color.fn.to_s = function( type ) { - type = ( type || 'hex' ); - // Change hex to rgba to return the correct color. - if ( 'hex' === type && this._alpha < 1 ) { - type = 'rgba'; - } - - var color = ''; - if ( 'hex' === type ) { - color = this.toString(); - } else if ( ! this.error ) { - color = this.toCSS( type ).replace( /\(\s+/, '(' ).replace( /\s+\)/, ')' ); - } - return color; - } - - // Register the global variable. - window.wpColorPickerAlpha = wpColorPickerAlpha; - - // Background image encoded - var backgroundImage = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAAHnlligAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAHJJREFUeNpi+P///4EDBxiAGMgCCCAGFB5AADGCRBgYDh48CCRZIJS9vT2QBAggFBkmBiSAogxFBiCAoHogAKIKAlBUYTELAiAmEtABEECk20G6BOmuIl0CIMBQ/IEMkO0myiSSraaaBhZcbkUOs0HuBwDplz5uFJ3Z4gAAAABJRU5ErkJggg=='; - - /** - * Iris - */ - $.widget( 'a8c.iris', $.a8c.iris, { - /** - * Alpha options - * - * @since 3.0.0 - * - * @type {Object} - */ - alphaOptions: { - alphaEnabled: false, - }, - /** - * Get the current color or the new color. - * - * @since 3.0.0 - * @access private - * - * @param {Object|*} The color instance if not defined return the cuurent color. - * - * @return {string} The element's color. - */ - _getColor: function( color ) { - if ( color === undef ) { - color = this._color; - } - - if ( this.alphaOptions.alphaEnabled ) { - color = color.to_s( this.alphaOptions.alphaColorType ); - if ( ! this.alphaOptions.alphaColorWithSpace ) { - color = color.replace( /\s+/g, '' ); - } - return color; - } - return color.toString(); - }, - /** - * Create widget - * - * @since 3.0.0 - * @access private - * - * @return {void} - */ - _create: function() { - try { - // Try to get the wpColorPicker alpha options. - this.alphaOptions = this.element.wpColorPicker( 'instance' ).alphaOptions; - } catch( e ) {} - - // We make sure there are all options - $.extend( {}, this.alphaOptions, { - alphaEnabled: false, - alphaCustomWidth: 130, - alphaReset: false, - alphaColorType: 'hex', - alphaColorWithSpace: false, - } ); - - this._super(); - }, - /** - * Binds event listeners to the Iris. - * - * @since 3.0.0 - * @access private - * - * @return {void} - */ - _addInputListeners: function( input ) { - var self = this, - debounceTimeout = 100, - callback = function( event ){ - var val = input.val(), - color = new Color( val ), - val = val.replace( /^(#|(rgb|hsl)a?)/, '' ), - type = self.alphaOptions.alphaColorType; - - input.removeClass( 'iris-error' ); - - if ( ! color.error ) { - // let's not do this on keyup for hex shortcodes - if ( 'hex' !== type || ! ( event.type === 'keyup' && val.match( /^[0-9a-fA-F]{3}$/ ) ) ) { - // Compare color ( #AARRGGBB ) - if ( color.toIEOctoHex() !== self._color.toIEOctoHex() ) { - self._setOption( 'color', self._getColor( color ) ); - } - } - } else if ( val !== '' ) { - input.addClass( 'iris-error' ); - } - }; - - input.on( 'change', callback ).on( 'keyup', self._debounce( callback, debounceTimeout ) ); - - // If we initialized hidden, show on first focus. The rest is up to you. - if ( self.options.hide ) { - input.one( 'focus', function() { - self.show(); - }); - } - }, - /** - * Init Controls - * - * @since 3.0.0 - * @access private - * - * @return {void} - */ - _initControls: function() { - this._super(); - - if ( this.alphaOptions.alphaEnabled ) { - // Create Alpha controls - var self = this, - stripAlpha = self.controls.strip.clone(false, false), - stripAlphaSlider = stripAlpha.find( '.iris-slider-offset' ), - controls = { - stripAlpha : stripAlpha, - stripAlphaSlider : stripAlphaSlider - }; - - stripAlpha.addClass( 'iris-strip-alpha' ); - stripAlphaSlider.addClass( 'iris-slider-offset-alpha' ); - stripAlpha.appendTo( self.picker.find( '.iris-picker-inner' ) ); - - // Push new controls - $.each( controls, function( k, v ) { - self.controls[k] = v; - } ); - - // Create slider - self.controls.stripAlphaSlider.slider( { - orientation : 'vertical', - min : 0, - max : 100, - step : 1, - value : parseInt( self._color._alpha * 100 ), - slide : function( event, ui ) { - self.active = 'strip'; - // Update alpha value - self._color._alpha = parseFloat( ui.value / 100 ); - self._change.apply( self, arguments ); - } - } ); - } - }, - /** - * Create the controls sizes - * - * @since 3.0.0 - * @access private - * - * @param {bool} reset Set to True for recreate the controls sizes. - * - * @return {void} - */ - _dimensions: function( reset ) { - this._super( reset ); - - if ( this.alphaOptions.alphaEnabled ) { - var self = this, - opts = self.options, - controls = self.controls, - square = controls.square, - strip = self.picker.find( '.iris-strip' ), - innerWidth, squareWidth, stripWidth, stripMargin, totalWidth; - - /** - * I use Math.round() to avoid possible size errors, - * this function returns the value of a number rounded - * to the nearest integer. - * - * The width to append all widgets, - * if border is enabled, 22 is subtracted. - * 20 for css left and right property - * 2 for css border - */ - innerWidth = Math.round( self.picker.outerWidth( true ) - ( opts.border ? 22 : 0 ) ); - // The width of the draggable, aka square. - squareWidth = Math.round( square.outerWidth() ); - // The width for the sliders - stripWidth = Math.round( ( innerWidth - squareWidth ) / 2 ); - // The margin for the sliders - stripMargin = Math.round( stripWidth / 2 ); - // The total width of the elements. - totalWidth = Math.round( squareWidth + ( stripWidth * 2 ) + ( stripMargin * 2 ) ); - - // Check and change if necessary. - while ( totalWidth > innerWidth ) { - stripWidth = Math.round( stripWidth - 2 ); - stripMargin = Math.round( stripMargin - 1 ); - totalWidth = Math.round( squareWidth + ( stripWidth * 2 ) + ( stripMargin * 2 ) ); - } - - - square.css( 'margin', '0' ); - strip.width( stripWidth ).css( 'margin-left', stripMargin + 'px' ); - } - }, - /** - * Callback to update the controls and the current color. - * - * @since 3.0.0 - * @access private - * - * @return {void} - */ - _change: function() { - var self = this, - active = self.active; - - self._super(); - - if ( self.alphaOptions.alphaEnabled ) { - var controls = self.controls, - alpha = parseInt( self._color._alpha * 100 ), - color = self._color.toRgb(), - gradient = [ - 'rgb(' + color.r + ',' + color.g + ',' + color.b + ') 0%', - 'rgba(' + color.r + ',' + color.g + ',' + color.b + ', 0) 100%' - ], - target = self.picker.closest( '.wp-picker-container' ).find( '.wp-color-result' ); - - self.options.color = self._getColor(); - // Generate background slider alpha, only for CSS3. - controls.stripAlpha.css( { 'background' : 'linear-gradient(to bottom, ' + gradient.join( ', ' ) + '), url(' + backgroundImage + ')' } ); - // Update alpha value - if ( active ) { - controls.stripAlphaSlider.slider( 'value', alpha ); - } - - if ( ! self._color.error ) { - self.element.removeClass( 'iris-error' ).val( self.options.color ); - } - - self.picker.find( '.iris-palette-container' ).on( 'click.palette', '.iris-palette', function() { - var color = $( this ).data( 'color' ); - if ( self.alphaOptions.alphaReset ) { - self._color._alpha = 1; - color = self._getColor(); - } - self._setOption( 'color', color ); - } ); - } - }, - /** - * Paint dimensions. - * - * @since 3.0.0 - * @access private - * - * @param {string} origin Origin (position). - * @param {string} control Type of the control, - * - * @return {void} - */ - _paintDimension: function( origin, control ) { - var self = this, - color = false; - - // Fix for slider hue opacity. - if ( self.alphaOptions.alphaEnabled && 'strip' === control ) { - color = self._color; - self._color = new Color( color.toString() ); - self.hue = self._color.h(); - } - - self._super( origin, control ); - - // Restore the color after paint. - if ( color ) { - self._color = color; - } - }, - /** - * To update the options, see original source to view the available options. - * - * @since 3.0.0 - * - * @param {string} key The Option name. - * @param {mixed} value The Option value to update. - * - * @return {void} - */ - _setOption: function( key, value ) { - var self = this; - if ( 'color' === key && self.alphaOptions.alphaEnabled ) { - // cast to string in case we have a number - value = '' + value; - newColor = new Color( value ).setHSpace( self.options.mode ); - // Check if error && Check the color to prevent callbacks with the same color. - if ( ! newColor.error && self._getColor( newColor ) !== self._getColor() ) { - self._color = newColor; - self.options.color = self._getColor(); - self.active = 'external'; - self._change(); - } - } else { - return self._super( key, value ); - } - }, - /** - * Returns the iris object if no new color is provided. If a new color is provided, it sets the new color. - * - * @param newColor {string|*} The new color to use. Can be undefined. - * - * @since 3.0.0 - * - * @return {string} The element's color. - */ - color: function( newColor ) { - if ( newColor === true ) { - return this._color.clone(); - } - if ( newColor === undef ) { - return this._getColor(); - } - this.option( 'color', newColor ); - }, - } ); - - /** - * wpColorPicker - */ - $.widget( 'wp.wpColorPicker', $.wp.wpColorPicker, { - /** - * Alpha options - * - * @since 3.0.0 - * - * @type {Object} - */ - alphaOptions: { - alphaEnabled: false, - }, - /** - * Get the alpha options. - * - * @since 3.0.0 - * @access private - * - * @return {object} The current alpha options. - */ - _getAlphaOptions: function() { - var el = this.element, - type = ( el.data( 'type' ) || this.options.type ), - color = ( el.data( 'defaultColor' ) || el.val() ), - options = { - alphaEnabled: ( el.data( 'alphaEnabled' ) || false ), - alphaCustomWidth: 130, - alphaReset: false, - alphaColorType: 'rgb', - alphaColorWithSpace: false, - }; - - if ( options.alphaEnabled ) { - options.alphaEnabled = ( el.is( 'input' ) && 'full' === type ); - } - - if ( ! options.alphaEnabled ) { - return options; - } - - options.alphaColorWithSpace = ( color && color.match( /\s/ ) ); - - $.each( options, function( name, defaultValue ) { - var value = ( el.data( name ) || defaultValue ); - switch ( name ) { - case 'alphaCustomWidth': - value = ( value ? parseInt( value, 10 ) : 0 ); - value = ( isNaN( value ) ? defaultValue : value ); - break; - case 'alphaColorType': - if ( ! value.match( /^(hex|(rgb|hsl)a?)$/ ) ) { - if ( color && color.match( /^#/ ) ) { - value = 'hex'; - } else if ( color && color.match( /^hsla?/ ) ) { - value = 'hsl'; - } else { - value = defaultValue; - } - } - break; - default: - value = !!value; - break; - } - options[name] = value; - } ); - - return options; - }, - /** - * Create widget - * - * @since 3.0.0 - * @access private - * - * @return {void} - */ - _create: function() { - // Return early if Iris support is missing. - if ( ! $.support.iris ) { - return; - } - - // Set the alpha options for the current instance. - this.alphaOptions = this._getAlphaOptions(); - - // Create widget. - this._super(); - }, - /** - * Binds event listeners to the color picker and create options, etc... - * - * @since 3.0.0 - * @access private - * - * @return {void} - */ - _addListeners: function() { - if ( ! this.alphaOptions.alphaEnabled ) { - return this._super(); - } - - var self = this, - el = self.element, - isDeprecated = self.toggler.is( 'a' ); - - this.alphaOptions.defaultWidth = el.width(); - if ( this.alphaOptions.alphaCustomWidth ) { - el.width( parseInt( this.alphaOptions.defaultWidth + this.alphaOptions.alphaCustomWidth, 10 ) ); - } - - self.toggler.css( { - 'position': 'relative', - 'background-image' : 'url(' + backgroundImage + ')' - } ); - - if ( isDeprecated ) { - self.toggler.html( '' ); - } else { - self.toggler.append( '' ); - } - - self.colorAlpha = self.toggler.find( 'span.color-alpha' ).css( { - 'width' : '30px', - 'height' : '100%', - 'position' : 'absolute', - 'top' : 0, - 'background-color' : el.val(), - } ); - - // Define the correct position for ltr or rtl direction. - if ( 'ltr' === self.colorAlpha.css( 'direction' ) ) { - self.colorAlpha.css( { - 'border-bottom-left-radius' : '2px', - 'border-top-left-radius' : '2px', - 'left' : 0 - } ); - } else { - self.colorAlpha.css( { - 'border-bottom-right-radius' : '2px', - 'border-top-right-radius' : '2px', - 'right' : 0 - } ); - } - - - el.iris( { - /** - * @summary Handles the onChange event if one has been defined in the options. - * - * Handles the onChange event if one has been defined in the options and additionally - * sets the background color for the toggler element. - * - * @since 3.0.0 - * - * @param {Event} event The event that's being called. - * @param {HTMLElement} ui The HTMLElement containing the color picker. - * - * @returns {void} - */ - change: function( event, ui ) { - self.colorAlpha.css( { 'background-color': ui.color.to_s( self.alphaOptions.alphaColorType ) } ); - - // fire change callback if we have one - if ( $.isFunction( self.options.change ) ) { - self.options.change.call( this, event, ui ); - } - } - } ); - - - /** - * Prevent any clicks inside this widget from leaking to the top and closing it. - * - * @since 3.0.0 - * - * @param {Event} event The event that's being called. - * - * @return {void} - */ - self.wrap.on( 'click.wpcolorpicker', function( event ) { - event.stopPropagation(); - }); - - /** - * Open or close the color picker depending on the class. - * - * @since 3.0.0 - */ - self.toggler.click( function() { - if ( self.toggler.hasClass( 'wp-picker-open' ) ) { - self.close(); - } else { - self.open(); - } - }); - - /** - * Checks if value is empty when changing the color in the color picker. - * If so, the background color is cleared. - * - * @since 3.0.0 - * - * @param {Event} event The event that's being called. - * - * @return {void} - */ - el.change( function( event ) { - var val = $( this ).val(); - - if ( el.hasClass( 'iris-error' ) || val === '' || val.match( /^(#|(rgb|hsl)a?)$/ ) ) { - if ( isDeprecated ) { - self.toggler.removeAttr( 'style' ); - } - - self.colorAlpha.css( 'background-color', '' ); - - // fire clear callback if we have one - if ( $.isFunction( self.options.clear ) ) { - self.options.clear.call( this, event ); - } - } - } ); - - /** - * Enables the user to either clear the color in the color picker or revert back to the default color. - * - * @since 3.0.0 - * - * @param {Event} event The event that's being called. - * - * @return {void} - */ - self.button.click( function( event ) { - if ( $( this ).hasClass( 'wp-picker-default' ) ) { - el.val( self.options.defaultColor ).change(); - } else if ( $( this ).hasClass( 'wp-picker-clear' ) ) { - el.val( '' ); - if ( isDeprecated ) { - self.toggler.removeAttr( 'style' ); - } - - self.colorAlpha.css( 'background-color', '' ); - - // fire clear callback if we have one - if ( $.isFunction( self.options.clear ) ) { - self.options.clear.call( this, event ); - } - - el.trigger( 'change' ); - } - } ); - }, - } ); -} ( jQuery ) ); diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/library/alpha-color-picker/wp-color-picker-alpha.min.js b/wp-content/upgrade-temp-backup/plugins/gp-premium/library/alpha-color-picker/wp-color-picker-alpha.min.js deleted file mode 100644 index fde8c833..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/library/alpha-color-picker/wp-color-picker-alpha.min.js +++ /dev/null @@ -1,11 +0,0 @@ -/**! - * wp-color-picker-alpha - * - * Overwrite Automattic Iris for enabled Alpha Channel in wpColorPicker - * Only run in input and is defined data alpha in true - * - * Version: 3.0.0 - * https://github.com/kallookoo/wp-color-picker-alpha - * Licensed under the GPLv2 license or later. - */ -!function(e,a){var l,o={version:300};if("wpColorPickerAlpha"in window&&"version"in window.wpColorPickerAlpha){var t=parseInt(window.wpColorPickerAlpha.version,10);if(!isNaN(t)&&o.version<=t)return}Color.fn.hasOwnProperty("to_s")||(Color.fn.to_s=function(o){"hex"===(o=o||"hex")&&this._alpha<1&&(o="rgba");var a="";return"hex"===o?a=this.toString():this.error||(a=this.toCSS(o).replace(/\(\s+/,"(").replace(/\s+\)/,")")),a},window.wpColorPickerAlpha=o,l="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAAHnlligAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAHJJREFUeNpi+P///4EDBxiAGMgCCCAGFB5AADGCRBgYDh48CCRZIJS9vT2QBAggFBkmBiSAogxFBiCAoHogAKIKAlBUYTELAiAmEtABEECk20G6BOmuIl0CIMBQ/IEMkO0myiSSraaaBhZcbkUOs0HuBwDplz5uFJ3Z4gAAAABJRU5ErkJggg==",e.widget("a8c.iris",e.a8c.iris,{alphaOptions:{alphaEnabled:!1},_getColor:function(o){return o===a&&(o=this._color),this.alphaOptions.alphaEnabled?(o=o.to_s(this.alphaOptions.alphaColorType),this.alphaOptions.alphaColorWithSpace||(o=o.replace(/\s+/g,"")),o):o.toString()},_create:function(){try{this.alphaOptions=this.element.wpColorPicker("instance").alphaOptions}catch(o){}e.extend({},this.alphaOptions,{alphaEnabled:!1,alphaCustomWidth:130,alphaReset:!1,alphaColorType:"hex",alphaColorWithSpace:!1}),this._super()},_addInputListeners:function(i){function o(o){var a=i.val(),t=new Color(a),a=a.replace(/^(#|(rgb|hsl)a?)/,""),r=l.alphaOptions.alphaColorType;i.removeClass("iris-error"),t.error?""!==a&&i.addClass("iris-error"):"hex"===r&&"keyup"===o.type&&a.match(/^[0-9a-fA-F]{3}$/)||t.toIEOctoHex()!==l._color.toIEOctoHex()&&l._setOption("color",l._getColor(t))}var l=this;i.on("change",o).on("keyup",l._debounce(o,100)),l.options.hide&&i.one("focus",function(){l.show()})},_initControls:function(){var t,o,a,r;this._super(),this.alphaOptions.alphaEnabled&&(a=(o=(t=this).controls.strip.clone(!1,!1)).find(".iris-slider-offset"),r={stripAlpha:o,stripAlphaSlider:a},o.addClass("iris-strip-alpha"),a.addClass("iris-slider-offset-alpha"),o.appendTo(t.picker.find(".iris-picker-inner")),e.each(r,function(o,a){t.controls[o]=a}),t.controls.stripAlphaSlider.slider({orientation:"vertical",min:0,max:100,step:1,value:parseInt(100*t._color._alpha),slide:function(o,a){t.active="strip",t._color._alpha=parseFloat(a.value/100),t._change.apply(t,arguments)}}))},_dimensions:function(o){if(this._super(o),this.alphaOptions.alphaEnabled){for(var a=this,t=a.options,r=a.controls.square,o=a.picker.find(".iris-strip"),i=Math.round(a.picker.outerWidth(!0)-(t.border?22:0)),l=Math.round(r.outerWidth()),e=Math.round((i-l)/2),s=Math.round(e/2),n=Math.round(l+2*e+2*s);i'):t.toggler.append(''),t.colorAlpha=t.toggler.find("span.color-alpha").css({width:"30px",height:"100%",position:"absolute",top:0,"background-color":r.val()}),"ltr"===t.colorAlpha.css("direction")?t.colorAlpha.css({"border-bottom-left-radius":"2px","border-top-left-radius":"2px",left:0}):t.colorAlpha.css({"border-bottom-right-radius":"2px","border-top-right-radius":"2px",right:0}),r.iris({change:function(o,a){t.colorAlpha.css({"background-color":a.color.to_s(t.alphaOptions.alphaColorType)}),e.isFunction(t.options.change)&&t.options.change.call(this,o,a)}}),t.wrap.on("click.wpcolorpicker",function(o){o.stopPropagation()}),t.toggler.click(function(){t.toggler.hasClass("wp-picker-open")?t.close():t.open()}),r.change(function(o){var a=e(this).val();(r.hasClass("iris-error")||""===a||a.match(/^(#|(rgb|hsl)a?)$/))&&(i&&t.toggler.removeAttr("style"),t.colorAlpha.css("background-color",""),e.isFunction(t.options.clear)&&t.options.clear.call(this,o))}),t.button.click(function(o){e(this).hasClass("wp-picker-default")?r.val(t.options.defaultColor).change():e(this).hasClass("wp-picker-clear")&&(r.val(""),i&&t.toggler.removeAttr("style"),t.colorAlpha.css("background-color",""),e.isFunction(t.options.clear)&&t.options.clear.call(this,o),r.trigger("change"))})}}))}(jQuery); diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/library/class-make-css.php b/wp-content/upgrade-temp-backup/plugins/gp-premium/library/class-make-css.php deleted file mode 100644 index 19876b27..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/library/class-make-css.php +++ /dev/null @@ -1,202 +0,0 @@ -_selector !== '' ){ - $this->add_selector_rules_to_output(); - } - $this->_selector = $selector; - return $this; - } - - /** - * Adds a css property with value to the css output - * - * @access public - * @since 1.0 - * - * @param string $property - the css property - * @param string $value - the value to be placed with the property - * @param string $og_default - check to see if the value matches the default - * @param string $unit - the unit for the value (px) - * @return $this - */ - public function add_property( $property, $value, $og_default = false, $unit = false ) { - // Add our unit to our value if it exists - if ( $unit && '' !== $unit ) { - $value = $value . $unit; - if ( '' !== $og_default ) { - $og_default = $og_default . $unit; - } - } - - // If we don't have a value or our value is the same as our og default, bail - if ( empty( $value ) || $og_default == $value ) - return false; - - $this->_css .= $property . ':' . $value . ';'; - return $this; - } - - /** - * Sets a media query in the class - * - * @since 1.1 - * @param string $value - * @return $this - */ - public function start_media_query( $value ) { - // Add the current rules to the output - $this->add_selector_rules_to_output(); - - // Add any previous media queries to the output - if ( ! empty( $this->_media_query ) ) { - $this->add_media_query_rules_to_output(); - } - - // Set the new media query - $this->_media_query = $value; - return $this; - } - - /** - * Stops using a media query. - * - * @see start_media_query() - * - * @since 1.1 - * @return $this - */ - public function stop_media_query() { - return $this->start_media_query( null ); - } - - /** - * Adds the current media query's rules to the class' output variable - * - * @since 1.1 - * @return $this - */ - private function add_media_query_rules_to_output() { - if( !empty( $this->_media_query_output ) ) { - $this->_output .= sprintf( '@media %1$s{%2$s}', $this->_media_query, $this->_media_query_output ); - - // Reset the media query output string - $this->_media_query_output = ''; - } - return $this; - } - - /** - * Adds the current selector rules to the output variable - * - * @access private - * @since 1.0 - * - * @return $this - */ - private function add_selector_rules_to_output() { - if( !empty( $this->_css ) ) { - $this->_selector_output = $this->_selector; - $selector_output = sprintf( '%1$s{%2$s}', $this->_selector_output, $this->_css ); - - // Add our CSS to the output - if ( ! empty( $this->_media_query ) ) { - $this->_media_query_output .= $selector_output; - $this->_css = ''; - } else { - $this->_output .= $selector_output; - } - - // Reset the css - $this->_css = ''; - } - - return $this; - } - - /** - * Returns the minified css in the $_output variable - * - * @access public - * @since 1.0 - * - * @return string - */ - public function css_output() - { - // Add current selector's rules to output - $this->add_selector_rules_to_output(); - - // Output minified css - return $this->_output; - } - -} -endif; diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/library/class-plugin-updater.php b/wp-content/upgrade-temp-backup/plugins/gp-premium/library/class-plugin-updater.php deleted file mode 100644 index 42fb1e09..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/library/class-plugin-updater.php +++ /dev/null @@ -1,676 +0,0 @@ -api_url = trailingslashit( $_api_url ); - $this->api_data = $_api_data; - $this->plugin_file = $_plugin_file; - $this->name = plugin_basename( $_plugin_file ); - $this->slug = basename( $_plugin_file, '.php' ); - $this->version = $_api_data['version']; - $this->wp_override = isset( $_api_data['wp_override'] ) ? (bool) $_api_data['wp_override'] : false; - $this->beta = ! empty( $this->api_data['beta'] ) ? true : false; - $this->failed_request_cache_key = 'edd_sl_failed_http_' . md5( $this->api_url ); - - $edd_plugin_data[ $this->slug ] = $this->api_data; - - /** - * Fires after the $edd_plugin_data is setup. - * - * @since x.x.x - * - * @param array $edd_plugin_data Array of EDD SL plugin data. - */ - do_action( 'post_edd_sl_plugin_updater_setup', $edd_plugin_data ); - - // Set up hooks. - $this->init(); - - } - - /** - * Set up WordPress filters to hook into WP's update process. - * - * @uses add_filter() - * - * @return void - */ - public function init() { - - add_filter( 'pre_set_site_transient_update_plugins', array( $this, 'check_update' ) ); - add_filter( 'plugins_api', array( $this, 'plugins_api_filter' ), 10, 3 ); - add_action( 'after_plugin_row', array( $this, 'show_update_notification' ), 10, 2 ); - add_action( 'admin_init', array( $this, 'show_changelog' ) ); - - } - - /** - * Check for Updates at the defined API endpoint and modify the update array. - * - * This function dives into the update API just when WordPress creates its update array, - * then adds a custom API call and injects the custom plugin data retrieved from the API. - * It is reassembled from parts of the native WordPress plugin update code. - * See wp-includes/update.php line 121 for the original wp_update_plugins() function. - * - * @uses api_request() - * - * @param array $_transient_data Update array build by WordPress. - * @return array Modified update array with custom plugin data. - */ - public function check_update( $_transient_data ) { - - global $pagenow; - - if ( ! is_object( $_transient_data ) ) { - $_transient_data = new stdClass(); - } - - if ( ! empty( $_transient_data->response ) && ! empty( $_transient_data->response[ $this->name ] ) && false === $this->wp_override ) { - return $_transient_data; - } - - $current = $this->get_repo_api_data(); - if ( false !== $current && is_object( $current ) && isset( $current->new_version ) ) { - if ( version_compare( $this->version, $current->new_version, '<' ) ) { - $_transient_data->response[ $this->name ] = $current; - } else { - // Populating the no_update information is required to support auto-updates in WordPress 5.5. - $_transient_data->no_update[ $this->name ] = $current; - } - } - $_transient_data->last_checked = time(); - $_transient_data->checked[ $this->name ] = $this->version; - - return $_transient_data; - } - - /** - * Get repo API data from store. - * Save to cache. - * - * @return \stdClass - */ - public function get_repo_api_data() { - $version_info = $this->get_cached_version_info(); - - if ( false === $version_info ) { - $version_info = $this->api_request( - 'plugin_latest_version', - array( - 'slug' => $this->slug, - 'beta' => $this->beta, - ) - ); - if ( ! $version_info ) { - return false; - } - - // This is required for your plugin to support auto-updates in WordPress 5.5. - $version_info->plugin = $this->name; - $version_info->id = $this->name; - $version_info->tested = $this->get_tested_version( $version_info ); - - $this->set_version_info_cache( $version_info ); - } - - return $version_info; - } - - /** - * Gets the plugin's tested version. - * - * @since 1.9.2 - * @param object $version_info - * @return null|string - */ - private function get_tested_version( $version_info ) { - - // There is no tested version. - if ( empty( $version_info->tested ) ) { - return null; - } - - // Strip off extra version data so the result is x.y or x.y.z. - list( $current_wp_version ) = explode( '-', get_bloginfo( 'version' ) ); - - // The tested version is greater than or equal to the current WP version, no need to do anything. - if ( version_compare( $version_info->tested, $current_wp_version, '>=' ) ) { - return $version_info->tested; - } - $current_version_parts = explode( '.', $current_wp_version ); - $tested_parts = explode( '.', $version_info->tested ); - - // The current WordPress version is x.y.z, so update the tested version to match it. - if ( isset( $current_version_parts[2] ) && $current_version_parts[0] === $tested_parts[0] && $current_version_parts[1] === $tested_parts[1] ) { - $tested_parts[2] = $current_version_parts[2]; - } - - return implode( '.', $tested_parts ); - } - - /** - * Show the update notification on multisite subsites. - * - * @param string $file - * @param array $plugin - */ - public function show_update_notification( $file, $plugin ) { - - // Return early if in the network admin, or if this is not a multisite install. - if ( is_network_admin() || ! is_multisite() ) { - return; - } - - // Allow single site admins to see that an update is available. - if ( ! current_user_can( 'activate_plugins' ) ) { - return; - } - - if ( $this->name !== $file ) { - return; - } - - // Do not print any message if update does not exist. - $update_cache = get_site_transient( 'update_plugins' ); - - if ( ! isset( $update_cache->response[ $this->name ] ) ) { - if ( ! is_object( $update_cache ) ) { - $update_cache = new stdClass(); - } - $update_cache->response[ $this->name ] = $this->get_repo_api_data(); - } - - // Return early if this plugin isn't in the transient->response or if the site is running the current or newer version of the plugin. - if ( empty( $update_cache->response[ $this->name ] ) || version_compare( $this->version, $update_cache->response[ $this->name ]->new_version, '>=' ) ) { - return; - } - - printf( - '', - $this->slug, - $file, - in_array( $this->name, $this->get_active_plugins(), true ) ? 'active' : 'inactive' - ); - - echo ''; - echo '

'; - - $changelog_link = ''; - if ( ! empty( $update_cache->response[ $this->name ]->sections->changelog ) ) { - $changelog_link = add_query_arg( - array( - 'edd_sl_action' => 'view_plugin_changelog', - 'plugin' => urlencode( $this->name ), - 'slug' => urlencode( $this->slug ), - 'TB_iframe' => 'true', - 'width' => 77, - 'height' => 911, - ), - self_admin_url( 'index.php' ) - ); - } - $update_link = add_query_arg( - array( - 'action' => 'upgrade-plugin', - 'plugin' => urlencode( $this->name ), - ), - self_admin_url( 'update.php' ) - ); - - printf( - /* translators: the plugin name. */ - esc_html__( 'There is a new version of %1$s available.', 'easy-digital-downloads' ), - esc_html( $plugin['Name'] ) - ); - - if ( ! current_user_can( 'update_plugins' ) ) { - echo ' '; - esc_html_e( 'Contact your network administrator to install the update.', 'easy-digital-downloads' ); - } elseif ( empty( $update_cache->response[ $this->name ]->package ) && ! empty( $changelog_link ) ) { - echo ' '; - printf( - /* translators: 1. opening anchor tag, do not translate 2. the new plugin version 3. closing anchor tag, do not translate. */ - __( '%1$sView version %2$s details%3$s.', 'easy-digital-downloads' ), - '', - esc_html( $update_cache->response[ $this->name ]->new_version ), - '' - ); - } elseif ( ! empty( $changelog_link ) ) { - echo ' '; - printf( - __( '%1$sView version %2$s details%3$s or %4$supdate now%5$s.', 'easy-digital-downloads' ), - '', - esc_html( $update_cache->response[ $this->name ]->new_version ), - '', - '', - '' - ); - } else { - printf( - ' %1$s%2$s%3$s', - '', - esc_html__( 'Update now.', 'easy-digital-downloads' ), - '' - ); - } - - do_action( "in_plugin_update_message-{$file}", $plugin, $plugin ); - - echo '

'; - } - - /** - * Gets the plugins active in a multisite network. - * - * @return array - */ - private function get_active_plugins() { - $active_plugins = (array) get_option( 'active_plugins' ); - $active_network_plugins = (array) get_site_option( 'active_sitewide_plugins' ); - - return array_merge( $active_plugins, array_keys( $active_network_plugins ) ); - } - - /** - * Updates information on the "View version x.x details" page with custom data. - * - * @uses api_request() - * - * @param mixed $_data - * @param string $_action - * @param object $_args - * @return object $_data - */ - public function plugins_api_filter( $_data, $_action = '', $_args = null ) { - - if ( 'plugin_information' !== $_action ) { - - return $_data; - - } - - if ( ! isset( $_args->slug ) || ( $_args->slug !== $this->slug ) ) { - - return $_data; - - } - - $to_send = array( - 'slug' => $this->slug, - 'is_ssl' => is_ssl(), - 'fields' => array( - 'banners' => array(), - 'reviews' => false, - 'icons' => array(), - ), - ); - - // Get the transient where we store the api request for this plugin for 24 hours - $edd_api_request_transient = $this->get_cached_version_info(); - - //If we have no transient-saved value, run the API, set a fresh transient with the API value, and return that value too right now. - if ( empty( $edd_api_request_transient ) ) { - - $api_response = $this->api_request( 'plugin_information', $to_send ); - - // Expires in 3 hours - $this->set_version_info_cache( $api_response ); - - if ( false !== $api_response ) { - $_data = $api_response; - } - } else { - $_data = $edd_api_request_transient; - } - - // Convert sections into an associative array, since we're getting an object, but Core expects an array. - if ( isset( $_data->sections ) && ! is_array( $_data->sections ) ) { - $_data->sections = $this->convert_object_to_array( $_data->sections ); - } - - // Convert banners into an associative array, since we're getting an object, but Core expects an array. - if ( isset( $_data->banners ) && ! is_array( $_data->banners ) ) { - $_data->banners = $this->convert_object_to_array( $_data->banners ); - } - - // Convert icons into an associative array, since we're getting an object, but Core expects an array. - if ( isset( $_data->icons ) && ! is_array( $_data->icons ) ) { - $_data->icons = $this->convert_object_to_array( $_data->icons ); - } - - // Convert contributors into an associative array, since we're getting an object, but Core expects an array. - if ( isset( $_data->contributors ) && ! is_array( $_data->contributors ) ) { - $_data->contributors = $this->convert_object_to_array( $_data->contributors ); - } - - if ( ! isset( $_data->plugin ) ) { - $_data->plugin = $this->name; - } - - return $_data; - } - - /** - * Convert some objects to arrays when injecting data into the update API - * - * Some data like sections, banners, and icons are expected to be an associative array, however due to the JSON - * decoding, they are objects. This method allows us to pass in the object and return an associative array. - * - * @since 3.6.5 - * - * @param stdClass $data - * - * @return array - */ - private function convert_object_to_array( $data ) { - if ( ! is_array( $data ) && ! is_object( $data ) ) { - return array(); - } - $new_data = array(); - foreach ( $data as $key => $value ) { - $new_data[ $key ] = is_object( $value ) ? $this->convert_object_to_array( $value ) : $value; - } - - return $new_data; - } - - /** - * Disable SSL verification in order to prevent download update failures - * - * @param array $args - * @param string $url - * @return object $array - */ - public function http_request_args( $args, $url ) { - - if ( strpos( $url, 'https://' ) !== false && strpos( $url, 'edd_action=package_download' ) ) { - $args['sslverify'] = $this->verify_ssl(); - } - return $args; - - } - - /** - * Calls the API and, if successfull, returns the object delivered by the API. - * - * @uses get_bloginfo() - * @uses wp_remote_post() - * @uses is_wp_error() - * - * @param string $_action The requested action. - * @param array $_data Parameters for the API action. - * @return false|object|void - */ - private function api_request( $_action, $_data ) { - $data = array_merge( $this->api_data, $_data ); - - if ( $data['slug'] !== $this->slug ) { - return; - } - - // Don't allow a plugin to ping itself - if ( trailingslashit( home_url() ) === $this->api_url ) { - return false; - } - - if ( $this->request_recently_failed() ) { - return false; - } - - return $this->get_version_from_remote(); - } - - /** - * Determines if a request has recently failed. - * - * @since 1.9.1 - * - * @return bool - */ - private function request_recently_failed() { - $failed_request_details = get_option( $this->failed_request_cache_key ); - - // Request has never failed. - if ( empty( $failed_request_details ) || ! is_numeric( $failed_request_details ) ) { - return false; - } - - /* - * Request previously failed, but the timeout has expired. - * This means we're allowed to try again. - */ - if ( time() > $failed_request_details ) { - delete_option( $this->failed_request_cache_key ); - - return false; - } - - return true; - } - - /** - * Logs a failed HTTP request for this API URL. - * We set a timestamp for 1 hour from now. This prevents future API requests from being - * made to this domain for 1 hour. Once the timestamp is in the past, API requests - * will be allowed again. This way if the site is down for some reason we don't bombard - * it with failed API requests. - * - * @see EDD_SL_Plugin_Updater::request_recently_failed - * - * @since 1.9.1 - */ - private function log_failed_request() { - update_option( $this->failed_request_cache_key, strtotime( '+1 hour' ) ); - } - - /** - * If available, show the changelog for sites in a multisite install. - */ - public function show_changelog() { - - if ( empty( $_REQUEST['edd_sl_action'] ) || 'view_plugin_changelog' !== $_REQUEST['edd_sl_action'] ) { - return; - } - - if ( empty( $_REQUEST['plugin'] ) ) { - return; - } - - if ( empty( $_REQUEST['slug'] ) || $this->slug !== $_REQUEST['slug'] ) { - return; - } - - if ( ! current_user_can( 'update_plugins' ) ) { - wp_die( esc_html__( 'You do not have permission to install plugin updates', 'easy-digital-downloads' ), esc_html__( 'Error', 'easy-digital-downloads' ), array( 'response' => 403 ) ); - } - - $version_info = $this->get_repo_api_data(); - if ( isset( $version_info->sections ) ) { - $sections = $this->convert_object_to_array( $version_info->sections ); - if ( ! empty( $sections['changelog'] ) ) { - echo '
' . wp_kses_post( $sections['changelog'] ) . '
'; - } - } - - exit; - } - - /** - * Gets the current version information from the remote site. - * - * @return array|false - */ - private function get_version_from_remote() { - $api_params = array( - 'edd_action' => 'get_version', - 'license' => ! empty( $this->api_data['license'] ) ? $this->api_data['license'] : '', - 'item_name' => isset( $this->api_data['item_name'] ) ? $this->api_data['item_name'] : false, - 'item_id' => isset( $this->api_data['item_id'] ) ? $this->api_data['item_id'] : false, - 'version' => isset( $this->api_data['version'] ) ? $this->api_data['version'] : false, - 'slug' => $this->slug, - 'author' => $this->api_data['author'], - 'url' => home_url(), - 'beta' => $this->beta, - 'php_version' => phpversion(), - 'wp_version' => get_bloginfo( 'version' ), - ); - - /** - * Filters the parameters sent in the API request. - * - * @param array $api_params The array of data sent in the request. - * @param array $this->api_data The array of data set up in the class constructor. - * @param string $this->plugin_file The full path and filename of the file. - */ - $api_params = apply_filters( 'edd_sl_plugin_updater_api_params', $api_params, $this->api_data, $this->plugin_file ); - - $request = wp_remote_post( - $this->api_url, - array( - 'timeout' => 15, - 'sslverify' => $this->verify_ssl(), - 'body' => $api_params, - ) - ); - - if ( is_wp_error( $request ) || ( 200 !== wp_remote_retrieve_response_code( $request ) ) ) { - $this->log_failed_request(); - - return false; - } - - $request = json_decode( wp_remote_retrieve_body( $request ) ); - - if ( $request && isset( $request->sections ) ) { - $request->sections = maybe_unserialize( $request->sections ); - } else { - $request = false; - } - - if ( $request && isset( $request->banners ) ) { - $request->banners = maybe_unserialize( $request->banners ); - } - - if ( $request && isset( $request->icons ) ) { - $request->icons = maybe_unserialize( $request->icons ); - } - - if ( ! empty( $request->sections ) ) { - foreach ( $request->sections as $key => $section ) { - $request->$key = (array) $section; - } - } - - return $request; - } - - /** - * Get the version info from the cache, if it exists. - * - * @param string $cache_key - * @return object - */ - public function get_cached_version_info( $cache_key = '' ) { - - if ( empty( $cache_key ) ) { - $cache_key = $this->get_cache_key(); - } - - $cache = get_option( $cache_key ); - - // Cache is expired - if ( empty( $cache['timeout'] ) || time() > $cache['timeout'] ) { - return false; - } - - // We need to turn the icons into an array, thanks to WP Core forcing these into an object at some point. - $cache['value'] = json_decode( $cache['value'] ); - if ( ! empty( $cache['value']->icons ) ) { - $cache['value']->icons = (array) $cache['value']->icons; - } - - return $cache['value']; - - } - - /** - * Adds the plugin version information to the database. - * - * @param string $value - * @param string $cache_key - */ - public function set_version_info_cache( $value = '', $cache_key = '' ) { - - if ( empty( $cache_key ) ) { - $cache_key = $this->get_cache_key(); - } - - $data = array( - 'timeout' => strtotime( '+3 hours', time() ), - 'value' => wp_json_encode( $value ), - ); - - update_option( $cache_key, $data, 'no' ); - - // Delete the duplicate option - delete_option( 'edd_api_request_' . md5( serialize( $this->slug . $this->api_data['license'] . $this->beta ) ) ); - } - - /** - * Returns if the SSL of the store should be verified. - * - * @since 1.6.13 - * @return bool - */ - private function verify_ssl() { - return (bool) apply_filters( 'edd_sl_api_request_verify_ssl', true, $this ); - } - - /** - * Gets the unique key (option name) for a plugin. - * - * @since 1.9.0 - * @return string - */ - private function get_cache_key() { - $string = $this->slug . $this->api_data['license'] . $this->beta; - - return 'edd_sl_' . md5( serialize( $string ) ); - } - -} diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/library/customizer-helpers.php b/wp-content/upgrade-temp-backup/plugins/gp-premium/library/customizer-helpers.php deleted file mode 100644 index 7bdb8f16..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/library/customizer-helpers.php +++ /dev/null @@ -1,531 +0,0 @@ - wp_create_nonce( 'gp_customize_nonce' ) ) ); - wp_localize_script( 'generatepress-pro-typography-customizer', 'typography_defaults', generate_typography_default_fonts() ); - wp_localize_script( - 'generatepress-pro-typography-customizer', - 'generatePressTypography', - array( - 'googleFonts' => apply_filters( 'generate_typography_customize_list', generate_get_all_google_fonts( $number_of_fonts ) ) - ) - ); - } - - wp_enqueue_script( 'generatepress-pro-customizer-controls', plugin_dir_url( __FILE__ ) . 'customizer/controls/js/generatepress-controls.js', array( 'customize-controls', 'jquery' ), GP_PREMIUM_VERSION, true ); - - $overlay_defaults = apply_filters( 'generate_off_canvas_overlay_style_defaults', array( - 'backgroundColor' => 'rgba(10,10,10,0.95)', - 'textColor' => '#ffffff', - 'backgroundHoverColor' => 'rgba(0,0,0,0)', - 'backgroundCurrentColor' => 'rgba(0,0,0,0)', - 'subMenuBackgroundColor' => 'rgba(0,0,0,0)', - 'subMenuTextColor' => '#ffffff', - 'subMenuBackgroundHoverColor' => 'rgba(0,0,0,0)', - 'subMenuBackgroundCurrentColor' => 'rgba(0,0,0,0)', - 'fontWeight' => 200, - 'fontSize' => 25, - ) ); - - wp_localize_script( - 'gp-button-actions', - 'gpButtonActions', - array( - 'warning' => esc_html__( 'This will design your overlay by changing options in the Customizer for you. Once saved, this can not be undone.', 'gp-premium' ), - 'styling' => $overlay_defaults, - ) - ); - - $controls_a11y = array( - 'fontSizeLabel' => esc_html__( 'Font size', 'gp-premium' ), - 'mobileHeaderFontSizeLabel' => esc_html__( 'Mobile header font size', 'gp-premium' ), - ); - - if ( function_exists( 'generate_get_default_fonts' ) ) { - $font_defaults = generate_get_default_fonts(); - - $controls_a11y['siteTitleFontSize'] = $font_defaults['site_title_font_size']; - $controls_a11y['mobileSiteTitleFontSize'] = $font_defaults['mobile_site_title_font_size']; - } - - if ( function_exists( 'generate_get_color_defaults' ) ) { - $color_defaults = generate_get_color_defaults(); - - $controls_a11y['navigationTextColor'] = $color_defaults['navigation_text_color']; - $controls_a11y['siteTitleTextColor'] = $color_defaults['site_title_color']; - } - - if ( function_exists( 'generate_get_defaults' ) ) { - $defaults = generate_get_defaults(); - - $controls_a11y['navigationAlignment'] = $defaults['nav_alignment_setting']; - } - - wp_localize_script( - 'generatepress-pro-customizer-controls', - 'gpControls', - $controls_a11y - ); - - wp_enqueue_script( - 'generate-pro-customizer-controls', - GP_PREMIUM_DIR_URL . 'dist/customizer.js', - array( 'customize-controls', 'wp-i18n', 'wp-element', 'customize-base' ), - GP_PREMIUM_VERSION, - true - ); - - if ( function_exists( 'wp_set_script_translations' ) ) { - wp_set_script_translations( 'generate-pro-customizer-controls', 'gp-premium' ); - } - - wp_localize_script( - 'generate-pro-customizer-controls', - 'gpCustomizerControls', - array( - 'hasSecondaryNav' => generatepress_is_module_active( 'generate_package_secondary_nav', 'GENERATE_SECONDARY_NAV' ), - 'hasMenuPlus' => generatepress_is_module_active( 'generate_package_menu_plus', 'GENERATE_MENU_PLUS' ), - 'hasWooCommerce' => class_exists( 'WooCommerce' ) && generatepress_is_module_active( 'generate_package_woocommerce', 'GENERATE_WOOCOMMERCE' ), - ) - ); -} - -add_action( 'customize_register', 'generate_premium_customizer_shortcut_controls', 100 ); -/** - * Add shortcuts to sections we don't control in this plugin. - * - * @since 1.8 - */ -function generate_premium_customizer_shortcut_controls( $wp_customize ) { - if ( ! class_exists( 'WP_Customize_Panel' ) ) { - return; - } - - if ( ! $wp_customize->get_panel( 'generate_layout_panel' ) ) { - return; - } - - if ( method_exists( $wp_customize, 'register_control_type' ) ) { - $wp_customize->register_control_type( 'GeneratePress_Section_Shortcut_Control' ); - } - - $wp_customize->add_control( - new GeneratePress_Section_Shortcut_Control( - $wp_customize, - 'generate_header_layout_shortcuts', - array( - 'section' => 'generate_layout_header', - 'element' => __( 'Header', 'gp-premium' ), - 'shortcuts' => array( - 'colors' => 'header_color_section', - 'typography' => 'font_header_section', - 'backgrounds' => 'generate_backgrounds_header', - ), - 'settings' => ( isset( $wp_customize->selective_refresh ) ) ? array() : 'blogname', - 'priority' => 1, - ) - ) - ); - - $wp_customize->add_control( - new GeneratePress_Section_Shortcut_Control( - $wp_customize, - 'generate_primary_navigation_layout_shortcuts', - array( - 'section' => 'generate_layout_navigation', - 'element' => __( 'Primary Navigation', 'gp-premium' ), - 'shortcuts' => array( - 'colors' => 'navigation_color_section', - 'typography' => 'font_navigation_section', - 'backgrounds' => 'generate_backgrounds_navigation', - ), - 'settings' => ( isset( $wp_customize->selective_refresh ) ) ? array() : 'blogname', - 'priority' => 1, - ) - ) - ); - - if ( $wp_customize->get_control( 'blogname' ) ) { - $wp_customize->get_control( 'generate_settings[container_width]' )->priority = 1; - } - - $wp_customize->add_control( - new GeneratePress_Section_Shortcut_Control( - $wp_customize, - 'generate_content_layout_shortcuts', - array( - 'section' => 'generate_layout_container', - 'element' => __( 'Content', 'gp-premium' ), - 'shortcuts' => array( - 'colors' => 'content_color_section', - 'typography' => 'font_content_section', - 'backgrounds' => 'generate_backgrounds_content', - ), - 'settings' => ( isset( $wp_customize->selective_refresh ) ) ? array() : 'blogname', - 'priority' => 0, - ) - ) - ); - - $wp_customize->add_control( - new GeneratePress_Section_Shortcut_Control( - $wp_customize, - 'generate_sidebar_layout_shortcuts', - array( - 'section' => 'generate_layout_sidebars', - 'element' => __( 'Sidebar', 'gp-premium' ), - 'shortcuts' => array( - 'colors' => 'sidebar_widget_color_section', - 'typography' => 'font_widget_section', - 'backgrounds' => 'generate_backgrounds_sidebars', - ), - 'settings' => ( isset( $wp_customize->selective_refresh ) ) ? array() : 'blogname', - 'priority' => 1, - ) - ) - ); - - $wp_customize->add_control( - new GeneratePress_Section_Shortcut_Control( - $wp_customize, - 'generate_footer_layout_shortcuts', - array( - 'section' => 'generate_layout_footer', - 'element' => __( 'Footer', 'gp-premium' ), - 'shortcuts' => array( - 'colors' => 'footer_color_section', - 'typography' => 'font_footer_section', - 'backgrounds' => 'generate_backgrounds_footer', - ), - 'settings' => ( isset( $wp_customize->selective_refresh ) ) ? array() : 'blogname', - 'priority' => 1, - ) - ) - ); - - $wp_customize->add_control( - new GeneratePress_Section_Shortcut_Control( - $wp_customize, - 'generate_colors_shortcuts', - array( - 'section' => 'generate_colors_section', - 'element' => __( 'Colors', 'gp-premium' ), - 'shortcuts' => array(), - 'settings' => ( isset( $wp_customize->selective_refresh ) ) ? array() : 'blogname', - 'priority' => 1, - ) - ) - ); - - $wp_customize->add_control( - new GeneratePress_Section_Shortcut_Control( - $wp_customize, - 'generate_typography_shortcuts', - array( - 'section' => 'generate_typography_section', - 'element' => __( 'Typography', 'gp-premium' ), - 'shortcuts' => array(), - 'settings' => ( isset( $wp_customize->selective_refresh ) ) ? array() : 'blogname', - 'priority' => 1, - ) - ) - ); -} - -add_action( 'customize_register', 'generate_premium_layout_block_element_messages', 1000 ); -/** - * Add shortcuts to sections we don't control in this plugin. - * - * @since 1.8 - */ -function generate_premium_layout_block_element_messages( $wp_customize ) { - if ( ! class_exists( 'WP_Customize_Panel' ) ) { - return; - } - - if ( method_exists( $wp_customize, 'register_control_type' ) ) { - $wp_customize->register_control_type( 'GeneratePress_Information_Customize_Control' ); - } - - if ( version_compare( PHP_VERSION, '5.6', '>=' ) ) { - $footer_sections = array( - 'generate_layout_footer', - 'footer_color_section', - 'font_footer_section', - 'generate_backgrounds_footer', - ); - - foreach ( $footer_sections as $section ) { - if ( $wp_customize->get_section( $section ) ) { - $wp_customize->add_control( - new GeneratePress_Information_Customize_Control( - $wp_customize, - 'generate_using_site_footer_element_' . $section, - array( - 'section' => $section, - 'description' => sprintf( - /* translators: URL to the Elements dashboard. */ - __( 'This page is using a Site Footer Element. Some of the options below may not apply.', 'gp-premium' ), - admin_url( 'edit.php?post_type=gp_elements' ) - ), - 'notice' => true, - 'settings' => ( isset( $wp_customize->selective_refresh ) ) ? array() : 'blogname', - 'active_callback' => function() { - $has_block_element = generate_has_active_element( 'site-footer', true ); - - if ( $has_block_element ) { - return true; - } - - return false; - }, - 'priority' => 0, - ) - ) - ); - } - } - - $header_sections = array( - 'generate_layout_header', - 'header_color_section', - 'font_header_section', - 'generate_backgrounds_header', - ); - - foreach ( $header_sections as $section ) { - if ( $wp_customize->get_section( $section ) ) { - $wp_customize->add_control( - new GeneratePress_Information_Customize_Control( - $wp_customize, - 'generate_using_site_header_element_' . $section, - array( - 'section' => $section, - 'description' => sprintf( - /* translators: URL to the Elements dashboard. */ - __( 'This page is using a Site Header Element. Some of the options below may not apply.', 'gp-premium' ), - admin_url( 'edit.php?post_type=gp_elements' ) - ), - 'notice' => true, - 'settings' => ( isset( $wp_customize->selective_refresh ) ) ? array() : 'blogname', - 'active_callback' => function() { - $has_block_element = generate_has_active_element( 'site-header', true ); - - if ( $has_block_element ) { - return true; - } - - return false; - }, - 'priority' => 0, - ) - ) - ); - } - } - - $sidebar_sections = array( - 'generate_layout_sidebars', - 'sidebar_widget_color_section', - 'font_widget_section', - 'generate_backgrounds_sidebars', - ); - - foreach ( $sidebar_sections as $section ) { - if ( $wp_customize->get_section( $section ) ) { - $wp_customize->add_control( - new GeneratePress_Information_Customize_Control( - $wp_customize, - 'generate_using_sidebar_element_' . $section, - array( - 'section' => $section, - 'description' => sprintf( - /* translators: URL to the Elements dashboard. */ - __( 'This page is using a Sidebar Element. Some of the options below may not apply.', 'gp-premium' ), - admin_url( 'edit.php?post_type=gp_elements' ) - ), - 'notice' => true, - 'settings' => ( isset( $wp_customize->selective_refresh ) ) ? array() : 'blogname', - 'active_callback' => function() { - $has_right_sidebar_block_element = generate_has_active_element( 'right-sidebar', true ); - - if ( $has_right_sidebar_block_element ) { - return true; - } - - $has_left_sidebar_block_element = generate_has_active_element( 'left-sidebar', true ); - - if ( $has_left_sidebar_block_element ) { - return true; - } - - return false; - }, - 'priority' => 0, - ) - ) - ); - } - } - - if ( $wp_customize->get_section( 'generate_blog_section' ) ) { - $wp_customize->add_control( - new GeneratePress_Information_Customize_Control( - $wp_customize, - 'generate_using_post_loop_item_element', - array( - 'section' => 'generate_blog_section', - 'description' => sprintf( - /* translators: URL to the Elements dashboard. */ - __( 'This page is using a Content Template Element. Some of the options below may not apply.', 'gp-premium' ), - admin_url( 'edit.php?post_type=gp_elements' ) - ), - 'notice' => true, - 'settings' => ( isset( $wp_customize->selective_refresh ) ) ? array() : 'blogname', - 'active_callback' => function() { - $has_block_element = generate_has_active_element( 'content-template', true ); - - if ( $has_block_element ) { - return true; - } - - return false; - }, - 'priority' => 0, - ) - ) - ); - - $wp_customize->add_control( - new GeneratePress_Information_Customize_Control( - $wp_customize, - 'generate_using_page_hero_element', - array( - 'section' => 'generate_blog_section', - 'description' => sprintf( - /* translators: URL to the Elements dashboard. */ - __( 'This page is using a Page Hero Element. Some of the options below may not apply.', 'gp-premium' ), - admin_url( 'edit.php?post_type=gp_elements' ) - ), - 'notice' => true, - 'settings' => ( isset( $wp_customize->selective_refresh ) ) ? array() : 'blogname', - 'active_callback' => function() { - $has_block_element = generate_has_active_element( 'page-hero', true ); - - if ( $has_block_element ) { - return true; - } - - return false; - }, - 'priority' => 0, - ) - ) - ); - - $wp_customize->add_control( - new GeneratePress_Information_Customize_Control( - $wp_customize, - 'generate_using_post_meta_area_element', - array( - 'section' => 'generate_blog_section', - 'description' => sprintf( - /* translators: URL to the Elements dashboard. */ - __( 'This page is using a Post Meta Template Element. Some of the options below may not apply.', 'gp-premium' ), - admin_url( 'edit.php?post_type=gp_elements' ) - ), - 'notice' => true, - 'settings' => ( isset( $wp_customize->selective_refresh ) ) ? array() : 'blogname', - 'active_callback' => function() { - $has_block_element = generate_has_active_element( 'post-meta-template', true ); - - if ( $has_block_element ) { - return true; - } - - return false; - }, - 'priority' => 0, - ) - ) - ); - } - } -} - -add_action( 'customize_controls_print_styles', 'generate_premium_customize_print_styles' ); -/** - * Print control styles for the Customizer. - * - * @since 1.9 - */ -function generate_premium_customize_print_styles() { - $sizes = apply_filters( 'generate_customizer_device_preview_sizes', array( - 'tablet' => 800, - 'mobile' => 411, - 'mobile_height' => 731, - ) ); - ?> - - json['data_type'] = $this->data_type; - $this->json['description'] = $this->description; - $this->json['nonce'] = $this->nonce; - } - - public function content_template() { - ?> - - <# if ( data.description ) { #> - -

{{{ data.description }}}

-
- <# } #> - json['palette'] = $this->palette; - $this->json['defaultValue'] = $this->setting->default; - $this->json[ 'link' ] = $this->get_link(); - $this->json[ 'show_opacity' ] = $this->show_opacity; - - if ( is_array( $this->json['palette'] ) ) { - $this->json['palette'] = implode( '|', $this->json['palette'] ); - } else { - // Default to true. - $this->json['palette'] = ( false === $this->json['palette'] || 'false' === $this->json['palette'] ) ? 'false' : 'true'; - } - - // Support passing show_opacity as string or boolean. Default to true. - $this->json[ 'show_opacity' ] = ( false === $this->json[ 'show_opacity' ] || 'false' === $this->json[ 'show_opacity' ] ) ? 'false' : 'true'; - } - - /** - * Render the control. - */ - public function render_content() {} - - public function content_template() { - ?> - <# if ( data.label && '' !== data.label ) { #> - {{ data.label }} - <# } #> - - json[ 'position_title' ] = esc_html__( 'left top, x% y%, xpos ypos (px)', 'gp-premium' ); - $this->json[ 'position_placeholder' ] = esc_html__( 'Position', 'gp-premium' ); - - foreach ( $this->settings as $setting_key => $setting_id ) { - $this->json[ $setting_key ] = array( - 'link' => $this->get_link( $setting_key ), - 'value' => $this->value( $setting_key ), - 'default' => isset( $setting_id->default ) ? $setting_id->default : '', - 'id' => isset( $setting_id->id ) ? $setting_id->id : '' - ); - - if ( 'repeat' === $setting_key ) { - $this->json[ $setting_key ]['choices'] = $this->get_repeat_choices(); - } - - if ( 'size' === $setting_key ) { - $this->json[ $setting_key ]['choices'] = $this->get_size_choices(); - } - - if ( 'attachment' === $setting_key ) { - $this->json[ $setting_key ]['choices'] = $this->get_attachment_choices(); - } - } - } - - public function content_template() { - ?> - <# if ( '' !== data.label ) { #> - {{ data.label }} - <# } #> - - <# if ( 'undefined' !== typeof ( data.repeat ) ) { #> -
- -
- <# } #> - - <# if ( 'undefined' !== typeof ( data.size ) ) { #> -
- -
- <# } #> - - <# if ( 'undefined' !== typeof ( data.attachment ) ) { #> -
- -
- <# } #> - - <# if ( 'undefined' !== typeof ( data.position ) ) { #> -
- -
- <# } #> - esc_html__( 'Repeat', 'gp-premium' ), - 'repeat-x' => esc_html__( 'Repeat x', 'gp-premium' ), - 'repeat-y' => esc_html__( 'Repeat y', 'gp-premium' ), - 'no-repeat' => esc_html__( 'No Repeat', 'gp-premium' ) - ); - } - - public function get_size_choices() { - return array( - '' => esc_html__( 'Size (Auto)', 'gp-premium' ), - '100' => esc_html__( '100% Width', 'gp-premium' ), - 'cover' => esc_html__( 'Cover', 'gp-premium' ), - 'contain' => esc_html__( 'Contain', 'gp-premium' ) - ); - } - - public function get_attachment_choices() { - return array( - '' => esc_html__( 'Attachment', 'gp-premium' ), - 'fixed' => esc_html__( 'Fixed', 'gp-premium' ), - 'local' => esc_html__( 'Local', 'gp-premium' ), - 'inherit' => esc_html__( 'Inherit', 'gp-premium' ) - ); - } - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/library/customizer/controls/class-control-toggle.php b/wp-content/upgrade-temp-backup/plugins/gp-premium/library/customizer/controls/class-control-toggle.php deleted file mode 100644 index 7c893a6e..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/library/customizer/controls/class-control-toggle.php +++ /dev/null @@ -1,37 +0,0 @@ -json[ 'targets' ] = $this->targets; - - } - - public function content_template() { - ?> -
- <# jQuery.each( data.targets, function( index, value ) { #> - - <# } ); #> -
- json[ 'link' ] = $this->get_link(); - $this->json[ 'value' ] = $this->value(); - $this->json[ 'id' ] = $this->id; - $this->json[ 'current_year' ] = __( '%current_year% to update year automatically.', 'gp-premium' ); - $this->json[ 'copyright' ] = __( '%copy% to include the copyright symbol.', 'gp-premium' ); - $this->json[ 'html' ] = __( 'HTML is allowed.', 'gp-premium' ); - $this->json[ 'shortcodes' ] = __( 'Shortcodes are allowed.', 'gp-premium' ); - } - /** - * Render the control's content. - * - * Allows the content to be overriden without having to rewrite the wrapper. - * - * @since 10/16/2012 - * @return void - */ - public function content_template() { - ?> - - json[ 'link' ] = $this->get_link(); - $this->json[ 'value' ] = $this->value(); - $this->json[ 'id' ] = $this->id; - $this->json[ 'default_value' ] = $this->default_value; - $this->json[ 'reset_title' ] = esc_attr__( 'Reset','generate-spacing' ); - $this->json[ 'unit' ] = $this->unit; - $this->json[ 'edit_field' ] = $this->edit_field; - } - - public function content_template() { - ?> - -
- <# if ( '' !== data.default_value ) { #>{{ data.reset_title }}<# } #> - json[ 'link' ] = $this->get_link(); - $this->json[ 'value' ] = absint( $this->value() ); - $this->json[ 'description' ] = esc_html( $this->description ); - } - - public function content_template() { - ?> - - type ) { - default: - case 'text' : ?> - - label ) ) echo '' . esc_html( $this->label ) . ''; - if ( ! empty( $this->description ) ) echo '' . esc_html( $this->description ) . ''; - if ( ! empty( $this->areas ) ) : - echo '
'; - foreach ( $this->areas as $value => $label ) : - echo '' . esc_html( $label ) . ''; - endforeach; - endif; - break; - - case 'line' : - echo '
'; - break; - } - } -} -endif; - -if ( class_exists( 'WP_Customize_Control' ) && ! class_exists( 'Generate_Backgrounds_Customize_Control' ) ) : -/* - * @deprecated 1.3 - */ -class Generate_Backgrounds_Customize_Control extends WP_Customize_Control { - public function render() {} -} -endif; - -if ( class_exists( 'WP_Customize_Control' ) && ! class_exists( 'Generate_Backgrounds_Customize_Misc_Control' ) ) : -/* - * No longer used - * Kept for back compat purposes - * @deprecated 1.2.95 - */ -class Generate_Backgrounds_Customize_Misc_Control extends WP_Customize_Control { - public function render() {} -} -endif; - -if ( class_exists( 'WP_Customize_Control' ) && ! class_exists( 'Generate_Blog_Customize_Control' ) ) : -/** - * Add our number input field for the featured image width - * @deprecated 1.3 - */ -class Generate_Blog_Customize_Control extends WP_Customize_Control { - public $type = 'gp-post-image-size'; - public $placeholder = ''; - - public function enqueue() { - wp_enqueue_script( 'gp-blog-customizer', trailingslashit( plugin_dir_url( __FILE__ ) ) . 'js/blog-customizer.js', array( 'customize-controls' ), GENERATE_BLOG_VERSION, true ); - } - - public function to_json() { - parent::to_json(); - $this->json[ 'link' ] = $this->get_link(); - $this->json[ 'value' ] = $this->value(); - $this->json[ 'placeholder' ] = $this->placeholder; - } - public function content_template() { - ?> - - json[ 'link' ] = $this->get_link(); - $this->json[ 'value' ] = $this->value(); - $this->json[ 'placeholder' ] = $this->placeholder; - } - public function content_template() { - ?> - - json[ 'text' ] = __( 'Apply image sizes','page-header' ); - } - - public function content_template() { - ?> - {{{ data.text }}} - json[ 'link' ] = $this->get_link(); - $this->json[ 'value' ] = $this->value(); - $this->json[ 'id' ] = $this->id; - } - - public function content_template() { - ?> - - - - - - json['description'] = $this->description; - $this->json['notice'] = $this->notice; - } - - public function content_template() { - ?> - <# if ( data.notice ) { #> -
- <# } #> - - <# if ( data.label ) { #> - {{ data.label }} - <# } #> - <# if ( data.description ) { #> -

{{{ data.description }}}

- <# } #> - - <# if ( data.notice ) { #> -
- <# } #> - json['choices'][$device]['min'] = ( isset( $this->choices[$device]['min'] ) ) ? $this->choices[$device]['min'] : '0'; - $this->json['choices'][$device]['max'] = ( isset( $this->choices[$device]['max'] ) ) ? $this->choices[$device]['max'] : '100'; - $this->json['choices'][$device]['step'] = ( isset( $this->choices[$device]['step'] ) ) ? $this->choices[$device]['step'] : '1'; - $this->json['choices'][$device]['edit'] = ( isset( $this->choices[$device]['edit'] ) ) ? $this->choices[$device]['edit'] : false; - $this->json['choices'][$device]['unit'] = ( isset( $this->choices[$device]['unit'] ) ) ? $this->choices[$device]['unit'] : false; - } - - foreach ( $this->settings as $setting_key => $setting_id ) { - $this->json[ $setting_key ] = array( - 'link' => $this->get_link( $setting_key ), - 'value' => $this->value( $setting_key ), - 'default' => isset( $setting_id->default ) ? $setting_id->default : '', - ); - } - - $this->json['desktop_label'] = __( 'Desktop', 'gp-premium' ); - $this->json['tablet_label'] = __( 'Tablet', 'gp-premium' ); - $this->json['mobile_label'] = __( 'Mobile', 'gp-premium' ); - $this->json['reset_label'] = __( 'Reset', 'gp-premium' ); - - $this->json['description'] = $this->description; - $this->json['sub_description'] = $this->sub_description; - } - /** - * Enqueue control related scripts/styles. - * - * @access public - */ - public function enqueue() { - wp_enqueue_script( 'generatepress-pro-range-slider', trailingslashit( plugin_dir_url( __FILE__ ) ) . 'js/slider-customizer.js', array( 'jquery', 'customize-base', 'jquery-ui-slider' ), GP_PREMIUM_VERSION, true ); - wp_enqueue_style( 'generatepress-pro-range-slider-css', trailingslashit( plugin_dir_url( __FILE__ ) ) . 'css/slider-customizer.css', GP_PREMIUM_VERSION ); - } - /** - * An Underscore (JS) template for this control's content (but not its container). - * - * Class variables for this control class are available in the `data` JS object; - * export custom variables by overriding {@see WP_Customize_Control::to_json()}. - * - * @see WP_Customize_Control::print_template() - * - * @access protected - */ - protected function content_template() { - ?> -
-
- <# if ( data.label || data.description ) { #> -
- <# if ( data.label ) { #> - {{{ data.label }}} - <# } #> - - <# if ( data.description ) { #> -

{{{ data.description }}}

- <# } #> -
- <# } #> - -
- - <# if ( 'undefined' !== typeof ( data.desktop ) ) { #> - - <# } #> - - <# if ( 'undefined' !== typeof (data.tablet) ) { #> - - <# } #> - - <# if ( 'undefined' !== typeof (data.mobile) ) { #> - - <# } #> - - - -
-
- -
- <# if ( 'undefined' !== typeof ( data.desktop ) ) { #> - - <# } #> - - <# if ( 'undefined' !== typeof ( data.tablet ) ) { #> - - <# } #> - - <# if ( 'undefined' !== typeof ( data.mobile ) ) { #> - - <# } #> -
- - <# if ( data.sub_description ) { #> -

{{{ data.sub_description }}}

- <# } #> -
- - {{{ data.label }}} - shortcuts as $name => $id ) { - if ( 'colors' === $name ) { - $name = esc_html__( 'Colors', 'gp-premium' ); - - if ( version_compare( generate_premium_get_theme_version(), '3.1.0-alpha.1', '>=' ) && 'generate_woocommerce_colors' !== $id ) { - $id = 'generate_colors_section'; - } - - if ( ! generatepress_is_module_active( 'generate_package_colors', 'GENERATE_COLORS' ) ) { - $id = false; - $name = false; - } - } - - if ( 'typography' === $name ) { - $name = esc_html__( 'Typography', 'gp-premium' ); - - if ( function_exists( 'generate_is_using_dynamic_typography' ) && generate_is_using_dynamic_typography() ) { - $id = 'generate_typography_section'; - } - - if ( ! generatepress_is_module_active( 'generate_package_typography', 'GENERATE_TYPOGRAPHY' ) ) { - $id = false; - $name = false; - } - } - - if ( 'backgrounds' === $name ) { - $name = esc_html__( 'Backgrounds', 'gp-premium' ); - - if ( ! generatepress_is_module_active( 'generate_package_backgrounds', 'GENERATE_BACKGROUNDS' ) ) { - $id = false; - $name = false; - } - } - - if ( 'layout' === $name ) { - $name = esc_html__( 'Layout', 'gp-premium' ); - } - - if ( $id && $name ) { - $shortcuts[ $id ] = $name; - } - } - - if ( ! empty( $shortcuts ) ) { - $this->json['shortcuts'] = $shortcuts; - } else { - $this->json['shortcuts'] = false; - } - - if ( 'WooCommerce' !== $this->element ) { - $this->element = strtolower( $this->element ); - } - - $this->json['more'] = sprintf( - __( 'More %s controls:', 'gp-premium' ), - '' . $this->element . '' - ); - - $this->json['return'] = __( 'Go Back', 'gp-premium' ); - - $this->json['section'] = $this->section; - - if ( apply_filters( 'generate_disable_customizer_shortcuts', false ) ) { - $this->json['shortcuts'] = false; - } - } - - public function content_template() { - ?> -
- <# if ( data.shortcuts ) { #> -
- - {{{ data.more }}} - - - - <# _.each( data.shortcuts, function( label, section ) { #> - - {{{ label }}} - - <# } ) #> - -
- <# } #> - - -
- - settings as $setting_key => $setting_id ) { - $this->json[ $setting_key ] = array( - 'link' => $this->get_link( $setting_key ), - 'value' => $this->value( $setting_key ) - ); - } - - $this->json[ 'element' ] = $this->element; - $this->json[ 'title' ] = __( 'Link values', 'gp-premium' ); - $this->json[ 'unlink_title' ] = __( 'Un-link values', 'gp-premium' ); - - $this->json['label_top'] = esc_html__( 'Top', 'gp-premium' ); - $this->json['label_right'] = esc_html__( 'Right', 'gp-premium' ); - $this->json['label_bottom'] = esc_html__( 'Bottom', 'gp-premium' ); - $this->json['label_left'] = esc_html__( 'Left', 'gp-premium' ); - $this->json['desktop_label'] = esc_html__( 'Desktop', 'gp-premium' ); - $this->json['tablet_label'] = esc_html__( 'Tablet', 'gp-premium' ); - $this->json['mobile_label'] = esc_html__( 'Mobile', 'gp-premium' ); - } - - public function content_template() { - ?> -
-
- <# if ( data.label || data.description ) { #> -
- <# if ( data.label ) { #> - - <# } #> - - <# if ( data.description ) { #> - {{{ data.description }}} - <# } #> -
- <# } #> - -
- - <# if ( 'undefined' !== typeof ( data.desktop_top ) ) { #> - - <# } #> - - <# if ( 'undefined' !== typeof (data.tablet_top) ) { #> - - <# } #> - - <# if ( 'undefined' !== typeof (data.mobile_top) ) { #> - - <# } #> - -
-
- -
- - - <# if ( 'undefined' !== typeof ( data.mobile_top ) ) { #> - - <# } #> -
-
- json[ 'title' ] = esc_html( $this->title ); - } - - public function content_template() { - ?> -
- {{ data.title }} -
- json[ 'default_fonts_title'] = __( 'System Fonts', 'gp-premium' ); - $this->json[ 'google_fonts_title'] = __( 'Google Fonts', 'gp-premium' ); - $this->json[ 'default_fonts' ] = generate_typography_default_fonts(); - $this->json[ 'family_title' ] = esc_html__( 'Font family', 'gp-premium' ); - $this->json[ 'weight_title' ] = esc_html__( 'Font weight', 'gp-premium' ); - $this->json[ 'transform_title' ] = esc_html__( 'Text transform', 'gp-premium' ); - $this->json[ 'category_title' ] = ''; - $this->json[ 'variant_title' ] = esc_html__( 'Variants', 'gp-premium' ); - - foreach ( $this->settings as $setting_key => $setting_id ) { - $this->json[ $setting_key ] = array( - 'link' => $this->get_link( $setting_key ), - 'value' => $this->value( $setting_key ), - 'default' => isset( $setting_id->default ) ? $setting_id->default : '', - 'id' => isset( $setting_id->id ) ? $setting_id->id : '' - ); - - if ( 'weight' === $setting_key ) { - $this->json[ $setting_key ]['choices'] = $this->get_font_weight_choices(); - } - - if ( 'transform' === $setting_key ) { - $this->json[ $setting_key ]['choices'] = $this->get_font_transform_choices(); - } - } - } - - public function content_template() { - ?> - <# if ( '' !== data.label ) { #> - {{ data.label }} - <# } #> - <# if ( 'undefined' !== typeof ( data.family ) ) { #> -
- -
- <# } #> - - <# if ( 'undefined' !== typeof ( data.variant ) ) { #> - <# - var id = data.family.value.split(' ').join('_').toLowerCase(); - var font_data = generatePressTypography.googleFonts[id]; - var variants = ''; - if ( typeof font_data !== 'undefined' ) { - variants = font_data.variants; - } - - if ( null === data.variant.value ) { - data.variant.value = data.variant.default; - } - #> -
- -
- <# } #> - - <# if ( 'undefined' !== typeof ( data.category ) ) { #> -
- -
- <# } #> - -
- <# if ( 'undefined' !== typeof ( data.weight ) ) { #> -
- -
- <# } #> - - <# if ( 'undefined' !== typeof ( data.transform ) ) { #> -
- -
- <# } #> -
- esc_html__( 'inherit', 'gp-premium' ), - 'normal' => esc_html__( 'normal', 'gp-premium' ), - 'bold' => esc_html__( 'bold', 'gp-premium' ), - '100' => esc_html( '100' ), - '200' => esc_html( '200' ), - '300' => esc_html( '300' ), - '400' => esc_html( '400' ), - '500' => esc_html( '500' ), - '600' => esc_html( '600' ), - '700' => esc_html( '700' ), - '800' => esc_html( '800' ), - '900' => esc_html( '900' ), - ); - } - - public function get_font_transform_choices() { - return array( - '' => esc_html__( 'inherit', 'gp-premium' ), - 'none' => esc_html__( 'none', 'gp-premium' ), - 'capitalize' => esc_html__( 'capitalize', 'gp-premium' ), - 'uppercase' => esc_html__( 'uppercase', 'gp-premium' ), - 'lowercase' => esc_html__( 'lowercase', 'gp-premium' ), - ); - } -} -endif; diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/library/customizer/controls/css/alpha-color-picker.css b/wp-content/upgrade-temp-backup/plugins/gp-premium/library/customizer/controls/css/alpha-color-picker.css deleted file mode 100644 index d820a935..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/library/customizer/controls/css/alpha-color-picker.css +++ /dev/null @@ -1,32 +0,0 @@ -/** - * Alpha Color Picker CSS - */ -.customize-control-gp-alpha-color .iris-picker .iris-square { - margin-right:10px; -} - -.customize-control-gp-alpha-color .alpha-slider.ui-widget-content, -.customize-control-gp-alpha-color .ui-widget-header{ - background: none; - border: 0; - box-shadow: 0 0 0 transparent; -} - -.alpha-color-picker-wrap a.iris-square-value:focus { - box-shadow: none; -} - -.gp-alpha-color-picker-container { - position: relative; - margin-left: 10px; - background-image: url(transparency-grid.png); -} - -.gp-alpha-color-picker-container .iris-picker .iris-strip .ui-slider-handle { - z-index: 100; -} - -.customize-control-gp-alpha-color .wp-picker-input-wrap .button.wp-picker-clear { - margin-left: 6px; - padding: 2px 8px; -} \ No newline at end of file diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/library/customizer/controls/css/button-actions.css b/wp-content/upgrade-temp-backup/plugins/gp-premium/library/customizer/controls/css/button-actions.css deleted file mode 100644 index 4c55423e..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/library/customizer/controls/css/button-actions.css +++ /dev/null @@ -1,19 +0,0 @@ -button[data-type="regenerate_external_css"]:before { - font: normal 20px/.5 dashicons; - display: inline-block; - padding: 0; - top: 9px; - left: -4px; - position: relative; - vertical-align: top; - content: "\f463"; -} - -button[data-type="regenerate_external_css"].loading:before { - animation: rotation 1s infinite linear; -} - -button[data-type="regenerate_external_css"].success:before { - content: "\f147"; - color: #46b450; -} diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/library/customizer/controls/css/control-toggle-customizer.css b/wp-content/upgrade-temp-backup/plugins/gp-premium/library/customizer/controls/css/control-toggle-customizer.css deleted file mode 100644 index b27e743b..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/library/customizer/controls/css/control-toggle-customizer.css +++ /dev/null @@ -1,21 +0,0 @@ -.generatepress-control-toggles { - display: flex; -} - -.generatepress-control-toggles button { - flex-basis: 100%; - background-color: #fafafa; - border: 1px solid #ddd; - cursor: pointer; - padding: 5px 10px; -} - -.generatepress-control-toggles button:last-child { - border-left: 0; -} - -.generatepress-control-toggles button.active { - background-color: #fff; - border: 1px solid #ccc; - font-weight: bold; -} \ No newline at end of file diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/library/customizer/controls/css/section-shortcuts.css b/wp-content/upgrade-temp-backup/plugins/gp-premium/library/customizer/controls/css/section-shortcuts.css deleted file mode 100644 index 71e4c4ec..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/library/customizer/controls/css/section-shortcuts.css +++ /dev/null @@ -1,43 +0,0 @@ -.generatepress-shortcuts > div { - background: #fff; - padding: 10px 15px; - border-width: 0 1px 1px 0; - border-color: #ddd; - border-style: solid; - margin-bottom: 10px; -} - -.customize-control-gp_section_shortcut { - margin-bottom: 0; -} - -.generatepress-shortcuts .more-controls { - font-weight: 600; - margin-right: 5px; - display: block; - font-size: 12px; - margin-bottom: 3px; -} - -.generatepress-shortcuts .shortcuts .shortcut:not(:last-child):after { - content: "\2022"; - padding: 0 1px; -} - -.generatepress-shortcuts .shortcut a { - text-decoration: none; -} - -.generatepress-shortcuts .shortcut { - font-size: 12px; -} - -.return-shortcut .dashicons { - float: right; - cursor: pointer; -} - -.return-shortcut a { - font-size: 12px; - text-decoration: none; -} diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/library/customizer/controls/css/selectWoo.min.css b/wp-content/upgrade-temp-backup/plugins/gp-premium/library/customizer/controls/css/selectWoo.min.css deleted file mode 100644 index 59fa33d3..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/library/customizer/controls/css/selectWoo.min.css +++ /dev/null @@ -1 +0,0 @@ -.select2-container{box-sizing:border-box;display:inline-block;margin:0;position:relative;vertical-align:middle}.select2-container .select2-selection--single{box-sizing:border-box;cursor:pointer;display:block;height:28px;user-select:none;-webkit-user-select:none}.select2-container .select2-selection--single .select2-selection__rendered{display:block;padding-left:8px;padding-right:20px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.select2-container .select2-selection--single .select2-selection__clear{position:relative}.select2-container[dir="rtl"] .select2-selection--single .select2-selection__rendered{padding-right:8px;padding-left:20px}.select2-container .select2-selection--multiple{box-sizing:border-box;cursor:pointer;display:block;min-height:32px;user-select:none;-webkit-user-select:none}.select2-container .select2-selection--multiple .select2-selection__rendered{display:inline-block;overflow:hidden;padding-left:8px;text-overflow:ellipsis;white-space:nowrap}.select2-container .select2-search--inline{float:left}.select2-container .select2-search--inline .select2-search__field{box-sizing:border-box;border:none;font-size:100%;margin-top:5px;padding:0}.select2-container .select2-search--inline .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-dropdown{background-color:white;border:1px solid #aaa;border-radius:4px;box-sizing:border-box;display:block;position:absolute;left:-100000px;width:100%;z-index:1051}.select2-results{display:block}.select2-results__options{list-style:none;margin:0;padding:0}.select2-results__option{padding:6px;user-select:none;-webkit-user-select:none}.select2-results__option[data-selected]{cursor:pointer}.select2-container--open .select2-dropdown{left:0}.select2-container--open .select2-dropdown--above{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--open .select2-dropdown--below{border-top:none;border-top-left-radius:0;border-top-right-radius:0}.select2-search--dropdown{display:block;padding:4px}.select2-search--dropdown .select2-search__field{padding:4px;width:100%;box-sizing:border-box}.select2-search--dropdown .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-search--dropdown.select2-search--hide{display:none}.select2-close-mask{border:0;margin:0;padding:0;display:block;position:fixed;left:0;top:0;min-height:100%;min-width:100%;height:auto;width:auto;opacity:0;z-index:99;background-color:#fff;filter:alpha(opacity=0)}.select2-hidden-accessible{border:0 !important;clip:rect(0 0 0 0) !important;height:1px !important;margin:-1px !important;overflow:hidden !important;padding:0 !important;position:absolute !important;width:1px !important}.select2-container--default .select2-selection--single{background-color:#fff;border:1px solid #aaa;border-radius:4px}.select2-container--default .select2-selection--single .select2-selection__rendered{color:#444;line-height:28px}.select2-container--default .select2-selection--single .select2-selection__clear{cursor:pointer;float:right;font-weight:bold}.select2-container--default .select2-selection--single .select2-selection__placeholder{color:#999}.select2-container--default .select2-selection--single .select2-selection__arrow{height:26px;position:absolute;top:1px;right:1px;width:20px}.select2-container--default .select2-selection--single .select2-selection__arrow b{border-color:#888 transparent transparent transparent;border-style:solid;border-width:5px 4px 0 4px;height:0;left:50%;margin-left:-4px;margin-top:-2px;position:absolute;top:50%;width:0}.select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__clear{float:left}.select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__arrow{left:1px;right:auto}.select2-container--default.select2-container--disabled .select2-selection--single{background-color:#eee;cursor:default}.select2-container--default.select2-container--disabled .select2-selection--single .select2-selection__clear{display:none}.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b{border-color:transparent transparent #888 transparent;border-width:0 4px 5px 4px}.select2-container--default .select2-selection--multiple{background-color:white;border:1px solid #aaa;border-radius:4px;cursor:text}.select2-container--default .select2-selection--multiple .select2-selection__rendered{box-sizing:border-box;list-style:none;margin:0;padding:0 5px;width:100%}.select2-container--default .select2-selection--multiple .select2-selection__rendered li{list-style:none}.select2-container--default .select2-selection--multiple .select2-selection__placeholder{color:#999;margin-top:5px;float:left}.select2-container--default .select2-selection--multiple .select2-selection__clear{cursor:pointer;float:right;font-weight:bold;margin-top:5px;margin-right:10px}.select2-container--default .select2-selection--multiple .select2-selection__choice{background-color:#e4e4e4;border:1px solid #aaa;border-radius:4px;cursor:default;float:left;margin-right:5px;margin-top:5px;padding:0 5px}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove{color:#999;cursor:pointer;display:inline-block;font-weight:bold;margin-right:2px}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover{color:#333}.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice,.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__placeholder,.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-search--inline{float:right}.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice{margin-left:5px;margin-right:auto}.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove{margin-left:2px;margin-right:auto}.select2-container--default.select2-container--focus .select2-selection--multiple{border:solid black 1px;outline:0}.select2-container--default.select2-container--disabled .select2-selection--multiple{background-color:#eee;cursor:default}.select2-container--default.select2-container--disabled .select2-selection__choice__remove{display:none}.select2-container--default.select2-container--open.select2-container--above .select2-selection--single,.select2-container--default.select2-container--open.select2-container--above .select2-selection--multiple{border-top-left-radius:0;border-top-right-radius:0}.select2-container--default.select2-container--open.select2-container--below .select2-selection--single,.select2-container--default.select2-container--open.select2-container--below .select2-selection--multiple{border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--default .select2-search--dropdown .select2-search__field{border:1px solid #aaa}.select2-container--default .select2-search--inline .select2-search__field{background:transparent;border:none;outline:0;box-shadow:none;-webkit-appearance:textfield}.select2-container--default .select2-results>.select2-results__options{max-height:200px;overflow-y:auto}.select2-container--default .select2-results__option[role=group]{padding:0}.select2-container--default .select2-results__option[aria-disabled=true]{color:#999}.select2-container--default .select2-results__option[data-selected=true]{background-color:#ddd}.select2-container--default .select2-results__option .select2-results__option{padding-left:1em}.select2-container--default .select2-results__option .select2-results__option .select2-results__group{padding-left:0}.select2-container--default .select2-results__option .select2-results__option .select2-results__option{margin-left:-1em;padding-left:2em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-2em;padding-left:3em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-3em;padding-left:4em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-4em;padding-left:5em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-5em;padding-left:6em}.select2-container--default .select2-results__option--highlighted[data-selected]{background-color:#5897fb;color:white}.select2-container--default .select2-results__group{cursor:default;display:block;padding:6px}.select2-container--classic .select2-selection--single{background-color:#f7f7f7;border:1px solid #aaa;border-radius:4px;outline:0;background-image:-webkit-linear-gradient(top, #fff 50%, #eee 100%);background-image:-o-linear-gradient(top, #fff 50%, #eee 100%);background-image:linear-gradient(to bottom, #fff 50%, #eee 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0)}.select2-container--classic .select2-selection--single:focus{border:1px solid #5897fb}.select2-container--classic .select2-selection--single .select2-selection__rendered{color:#444;line-height:28px}.select2-container--classic .select2-selection--single .select2-selection__clear{cursor:pointer;float:right;font-weight:bold;margin-right:10px}.select2-container--classic .select2-selection--single .select2-selection__placeholder{color:#999}.select2-container--classic .select2-selection--single .select2-selection__arrow{background-color:#ddd;border:none;border-left:1px solid #aaa;border-top-right-radius:4px;border-bottom-right-radius:4px;height:26px;position:absolute;top:1px;right:1px;width:20px;background-image:-webkit-linear-gradient(top, #eee 50%, #ccc 100%);background-image:-o-linear-gradient(top, #eee 50%, #ccc 100%);background-image:linear-gradient(to bottom, #eee 50%, #ccc 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFCCCCCC', GradientType=0)}.select2-container--classic .select2-selection--single .select2-selection__arrow b{border-color:#888 transparent transparent transparent;border-style:solid;border-width:5px 4px 0 4px;height:0;left:50%;margin-left:-4px;margin-top:-2px;position:absolute;top:50%;width:0}.select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__clear{float:left}.select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__arrow{border:none;border-right:1px solid #aaa;border-radius:0;border-top-left-radius:4px;border-bottom-left-radius:4px;left:1px;right:auto}.select2-container--classic.select2-container--open .select2-selection--single{border:1px solid #5897fb}.select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow{background:transparent;border:none}.select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow b{border-color:transparent transparent #888 transparent;border-width:0 4px 5px 4px}.select2-container--classic.select2-container--open.select2-container--above .select2-selection--single{border-top:none;border-top-left-radius:0;border-top-right-radius:0;background-image:-webkit-linear-gradient(top, #fff 0%, #eee 50%);background-image:-o-linear-gradient(top, #fff 0%, #eee 50%);background-image:linear-gradient(to bottom, #fff 0%, #eee 50%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0)}.select2-container--classic.select2-container--open.select2-container--below .select2-selection--single{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0;background-image:-webkit-linear-gradient(top, #eee 50%, #fff 100%);background-image:-o-linear-gradient(top, #eee 50%, #fff 100%);background-image:linear-gradient(to bottom, #eee 50%, #fff 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFFFFFFF', GradientType=0)}.select2-container--classic .select2-selection--multiple{background-color:white;border:1px solid #aaa;border-radius:4px;cursor:text;outline:0}.select2-container--classic .select2-selection--multiple:focus{border:1px solid #5897fb}.select2-container--classic .select2-selection--multiple .select2-selection__rendered{list-style:none;margin:0;padding:0 5px}.select2-container--classic .select2-selection--multiple .select2-selection__clear{display:none}.select2-container--classic .select2-selection--multiple .select2-selection__choice{background-color:#e4e4e4;border:1px solid #aaa;border-radius:4px;cursor:default;float:left;margin-right:5px;margin-top:5px;padding:0 5px}.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove{color:#888;cursor:pointer;display:inline-block;font-weight:bold;margin-right:2px}.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove:hover{color:#555}.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice{float:right}.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice{margin-left:5px;margin-right:auto}.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove{margin-left:2px;margin-right:auto}.select2-container--classic.select2-container--open .select2-selection--multiple{border:1px solid #5897fb}.select2-container--classic.select2-container--open.select2-container--above .select2-selection--multiple{border-top:none;border-top-left-radius:0;border-top-right-radius:0}.select2-container--classic.select2-container--open.select2-container--below .select2-selection--multiple{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--classic .select2-search--dropdown .select2-search__field{border:1px solid #aaa;outline:0}.select2-container--classic .select2-search--inline .select2-search__field{outline:0;box-shadow:none}.select2-container--classic .select2-dropdown{background-color:#fff;border:1px solid transparent}.select2-container--classic .select2-dropdown--above{border-bottom:none}.select2-container--classic .select2-dropdown--below{border-top:none}.select2-container--classic .select2-results>.select2-results__options{max-height:200px;overflow-y:auto}.select2-container--classic .select2-results__option[role=group]{padding:0}.select2-container--classic .select2-results__option[aria-disabled=true]{color:grey}.select2-container--classic .select2-results__option--highlighted[data-selected]{background-color:#3875d7;color:#fff}.select2-container--classic .select2-results__group{cursor:default;display:block;padding:6px}.select2-container--classic.select2-container--open .select2-dropdown{border-color:#5897fb} diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/library/customizer/controls/css/slider-customizer.css b/wp-content/upgrade-temp-backup/plugins/gp-premium/library/customizer/controls/css/slider-customizer.css deleted file mode 100644 index d7add5f7..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/library/customizer/controls/css/slider-customizer.css +++ /dev/null @@ -1,131 +0,0 @@ -.customize-control-generatepress-pro-range-slider .generatepress-slider { - position: relative; - width: calc(100% - 60px); - height: 6px; - background-color: rgba(0,0,0,.10); - cursor: pointer; - transition: background .5s; -} - -.customize-control-generatepress-pro-range-slider .has-unit .generatepress-slider { - width: calc(100% - 90px); -} - -.customize-control-generatepress-pro-range-slider .gp_range_value.hide-value { - display: none; -} - -.customize-control-generatepress-pro-range-slider .gp_range_value.hide-value + .generatepress-slider { - width: 100%; -} - -.customize-control-generatepress-pro-range-slider .generatepress-slider .ui-slider-handle { - height: 16px; - width: 16px; - background-color: #3498D9; - display: inline-block; - position: absolute; - top: 50%; - transform: translateY(-50%) translateX(-4px); - border-radius: 50%; - cursor: pointer; -} - -.customize-control-generatepress-pro-range-slider .wrapper { - display: flex; - justify-content: space-between; - align-items: center; -} - -.customize-control-generatepress-pro-range-slider .gp_range_value { - font-size: 14px; - padding: 0; - font-weight: 400; - width: 50px; - display: flex; -} - -.customize-control-generatepress-pro-range-slider .has-unit .gp_range_value { - width: 80px; -} - -.customize-control-generatepress-pro-range-slider .gp_range_value span.value { - font-size: 12px; - width: calc(100% - 2px); - text-align: center; - min-height: 30px; - background: #FFF; - line-height: 30px; - border: 1px solid #DDD; -} - -.customize-control-generatepress-pro-range-slider .has-unit .gp_range_value span.value { - width: calc(100% - 32px); - display: block; -} - -.customize-control-generatepress-pro-range-slider .gp_range_value .unit { - width: 29px; - text-align: center; - font-size: 12px; - line-height: 30px; - background: #fff; - border: 1px solid #ddd; - margin-left: 1px; -} - -.customize-control-generatepress-pro-range-slider .generatepress-pro-range-slider-reset span { - font-size: 16px; - line-height: 22px; -} - -.customize-control-generatepress-pro-range-slider .gp_range_value input { - font-size: 12px; - padding: 0px; - text-align: center; - min-height: 30px; - height: auto; - border-radius: 0; - border-color: #ddd; -} - -.customize-control-generatepress-pro-range-slider .has-unit .gp_range_value input { - width: calc(100% - 30px); -} - -.customize-control-generatepress-pro-range-slider .gp-range-title-area .dashicons { - cursor: pointer; - font-size: 11px; - width: 20px; - height: 20px; - line-height: 20px; - color: #222; - text-align: center; - position: relative; - top: 2px; -} - -.customize-control-generatepress-pro-range-slider .gp-range-title-area .dashicons:hover { - background: #fafafa; -} - -.customize-control-generatepress-pro-range-slider .gp-range-title-area .dashicons.selected { - background: #fff; - color: #222; -} - -.gp-range-title-area { - display: flex; -} - -.gp-range-slider-controls { - margin-left: auto; -} - -.customize-control-generatepress-pro-range-slider .gp-device-controls > span:first-child:last-child { - display: none; -} - -.customize-control-generatepress-pro-range-slider .sub-description { - margin-top: 10px; -} diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/library/customizer/controls/css/spacing-customizer.css b/wp-content/upgrade-temp-backup/plugins/gp-premium/library/customizer/controls/css/spacing-customizer.css deleted file mode 100644 index 058e9c60..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/library/customizer/controls/css/spacing-customizer.css +++ /dev/null @@ -1,101 +0,0 @@ -.gp-spacing-control-section-title-area { - display: flex; -} - -.gp-range-slider-controls { - margin-left: auto; -} - -.customize-control-spacing .description { - font-size: 10px; - text-transform: uppercase; - font-weight: bold; - font-style: normal; - opacity: 0.7; -} - -.spacing-values-area { - display: flex; -} - -.gp-spacing-section input { - min-height: 30px; - border-radius: 0; - border-color: #ddd; -} - -.gp-link-spacing-section span { - display: block; - color: #0073aa; - font-size: 14px; - cursor: pointer; - height: auto; - min-height: 28px; - line-height: 28px; - box-sizing: border-box; - width: 40px; - background: #fff; - border: 1px solid #ddd; -} - -.gp-link-spacing-section span.gp-unlink-spacing { - background-color: #0073aa; - color: #fff; -} - -.gp-spacing-section { - margin-right: 2px; - text-align:center -} - -.gp-link-spacing-section { - margin-right: 0; -} - -.gp-spacing-section .description { - font-size: 10px; - text-transform: uppercase; - font-weight: bold; - font-style: normal; - opacity: 0.7; -} - -.no-edit-field { - font-size: 11px; - opacity: 0.8; - font-weight: 600; -} - -/* - * Make sure slider is 100% wide. - * Old versions of Secondary Nav will have this set as 50% - * so we need to set !important to overwrite that. - */ -.customize-control.customize-control-gp-spacing-slider { - width: 100% !important; -} - -.customize-control-generatepress-spacing .gp-spacing-control-section-title-area .dashicons { - cursor: pointer; - font-size: 11px; - width: 20px; - height: 20px; - line-height: 20px; - color: #222; - text-align: center; - position: relative; - top: 2px; -} - -.customize-control-generatepress-spacing .gp-spacing-control-section-title-area .dashicons:hover { - background: #fafafa; -} - -.customize-control-generatepress-spacing .gp-spacing-control-section-title-area .dashicons.selected { - background: #fff; - color: #222; -} - -.customize-control-generatepress-spacing .gp-device-controls > span:first-child:last-child { - display: none; -} diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/library/customizer/controls/css/title-customizer.css b/wp-content/upgrade-temp-backup/plugins/gp-premium/library/customizer/controls/css/title-customizer.css deleted file mode 100644 index 9a1289e2..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/library/customizer/controls/css/title-customizer.css +++ /dev/null @@ -1,9 +0,0 @@ -.generatepress-customizer-title { - background: #FFF; - padding: 10px 12px; - font-weight: 600; - border-style: solid; - border-width: 0 1px 1px 0; - border-color: #ddd; - font-size: 15px; -} diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/library/customizer/controls/css/transparency-grid.png b/wp-content/upgrade-temp-backup/plugins/gp-premium/library/customizer/controls/css/transparency-grid.png deleted file mode 100644 index 20d0f653..00000000 Binary files a/wp-content/upgrade-temp-backup/plugins/gp-premium/library/customizer/controls/css/transparency-grid.png and /dev/null differ diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/library/customizer/controls/css/typography-customizer.css b/wp-content/upgrade-temp-backup/plugins/gp-premium/library/customizer/controls/css/typography-customizer.css deleted file mode 100644 index 53aadcda..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/library/customizer/controls/css/typography-customizer.css +++ /dev/null @@ -1,60 +0,0 @@ -.generatepress-font-family { - margin-bottom: 12px; -} - -.generatepress-weight-transform-wrapper { - display: flex; - justify-content: space-between; -} - -.generatepress-font-weight, -.generatepress-font-transform { - width: calc(50% - 5px); -} - -span.select2-container.select2-container--default.select2-container--open li.select2-results__option { - margin:0; -} - -span.select2-container.select2-container--default.select2-container--open{ - z-index:999999; -} - -.select2-selection__rendered li { - margin-bottom: 0; -} - -.select2-container--default .select2-selection--single, -.select2-container--default.select2-container .select2-selection--multiple, -.select2-dropdown, -.select2-container--default .select2-selection--multiple .select2-selection__choice { - border-color: #ddd; - border-radius: 0; -} - -.select2-container--default .select2-results__option[aria-selected=true] { - color: rgba(0,0,0,0.4); -} - -.select2-container .select2-search--inline { - display: none; -} - -#customize-control-single_content_title_control, -#customize-control-font_heading_2_control, -#customize-control-archive_content_title_control, -#customize-control-font_heading_3_control, -#customize-control-font_heading_4_control, -#customize-control-font_heading_5_control, -#customize-control-font_heading_6_control { - margin-top: 20px; -} - -.generatepress-weight-transform-wrapper select option[value=""] { - display: none; -} - -#customize-control-single_content_title_control .generatepress-weight-transform-wrapper select option[value=""], -#customize-control-archive_content_title_control .generatepress-weight-transform-wrapper select option[value=""] { - display: block; -} diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/library/customizer/controls/js/alpha-color-picker.js b/wp-content/upgrade-temp-backup/plugins/gp-premium/library/customizer/controls/js/alpha-color-picker.js deleted file mode 100644 index 319f7a1a..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/library/customizer/controls/js/alpha-color-picker.js +++ /dev/null @@ -1,277 +0,0 @@ -/** - * Alpha Color Picker JS - * - * This file includes several helper functions and the core control JS. - */ - -/** - * Override the stock color.js toString() method to add support for - * outputting RGBa or Hex. - */ -Color.prototype.toString = function( flag ) { - - // If our no-alpha flag has been passed in, output RGBa value with 100% opacity. - // This is used to set the background color on the opacity slider during color changes. - if ( 'no-alpha' == flag ) { - return this.toCSS( 'rgba', '1' ).replace( /\s+/g, '' ); - } - - // If we have a proper opacity value, output RGBa. - if ( 1 > this._alpha ) { - return this.toCSS( 'rgba', this._alpha ).replace( /\s+/g, '' ); - } - - // Proceed with stock color.js hex output. - var hex = parseInt( this._color, 10 ).toString( 16 ); - if ( this.error ) { return ''; } - if ( hex.length < 6 ) { - for ( var i = 6 - hex.length - 1; i >= 0; i-- ) { - hex = '0' + hex; - } - } - - return '#' + hex; -}; - -/** - * Given an RGBa, RGB, or hex color value, return the alpha channel value. - */ -function generate_get_alpha_value_from_color( value ) { - var alphaVal; - - // Remove all spaces from the passed in value to help our RGBa regex. - value = value.toString().replace( / /g, '' ); - - if ( value.match( /rgba\(\d+\,\d+\,\d+\,([^\)]+)\)/ ) ) { - alphaVal = parseFloat( value.match( /rgba\(\d+\,\d+\,\d+\,([^\)]+)\)/ )[1] ).toFixed(2) * 100; - alphaVal = parseInt( alphaVal ); - } else { - alphaVal = 100; - } - - return alphaVal; -} - -/** - * Force update the alpha value of the color picker object and maybe the alpha slider. - */ - function generate_update_alpha_value_on_color_control( alpha, $control, $alphaSlider, update_slider ) { - var iris, colorPicker, color; - - iris = $control.data( 'a8cIris' ); - colorPicker = $control.data( 'wpWpColorPicker' ); - - // Set the alpha value on the Iris object. - iris._color._alpha = alpha; - - // Store the new color value. - color = iris._color.toString(); - - // Set the value of the input. - $control.val( color ); - - // Update the background color of the color picker. - colorPicker.toggler.css({ - 'background-color': color - }); - - // Maybe update the alpha slider itself. - if ( update_slider ) { - generate_update_alpha_value_on_alpha_slider( alpha, $alphaSlider ); - } - - // Update the color value of the color picker object. - $control.wpColorPicker( 'color', color ); -} - -/** - * Update the slider handle position and label. - */ -function generate_update_alpha_value_on_alpha_slider( alpha, $alphaSlider ) { - $alphaSlider.slider( 'value', alpha ); - //$alphaSlider.find( '.ui-slider-handle' ).text( alpha.toString() ); -} - -/** - * Initialization trigger. - */ -jQuery( document ).ready( function( $ ) { - - // Loop over each control and transform it into our color picker. - $( '.gp-alpha-color-control' ).each( function() { - - // Scope the vars. - var $control, startingColor, paletteInput, showOpacity, defaultColor, palette, - colorPickerOptions, $container, $alphaSlider, alphaVal, sliderOptions, savedValue; - - // Store the control instance. - $control = $( this ); - - // Get our saved value - savedValue = wp.customize.value( $control.attr( 'data-customize-setting-link' ) )(); - - // Get a clean starting value for the option. - startingColor = savedValue.toString().replace( /\s+/g, '' ); - - // Get some data off the control. - paletteInput = $control.attr( 'data-palette' ); - showOpacity = $control.attr( 'data-show-opacity' ); - defaultColor = $control.attr( 'data-default-color' ); - - // Process the palette. - if ( paletteInput.indexOf( '|' ) !== -1 ) { - palette = paletteInput.split( '|' ); - } else if ( 'false' == paletteInput ) { - palette = false; - } else { - palette = true; - } - - // Set up the options that we'll pass to wpColorPicker(). - colorPickerOptions = { - change: function( event, ui ) { - var key, value, alpha, $transparency; - - key = $control.attr( 'data-customize-setting-link' ); - value = $control.wpColorPicker( 'color' ); - - // Send ajax request to wp.customize to trigger the Save action. - wp.customize( key, function( obj ) { - obj.set( value ); - }); - - $transparency = $container.find( '.transparency' ); - - // Always show the background color of the opacity slider at 100% opacity. - $alphaSlider.closest( '.gp-alpha-color-picker-container' ).css( 'background-color', ui.color.toString( 'no-alpha' ) ); - }, - palettes: palette - }; - - // Create the colorpicker. - $control.val( savedValue ).wpColorPicker( colorPickerOptions ); - - $container = $control.parents( '.wp-picker-container:first' ); - - // Insert our opacity slider. - $( '
' + - '
' + - '
' ).appendTo( $container.find( '.iris-picker-inner' ) ); - - $alphaSlider = $container.find( '.alpha-slider' ); - - // If starting value is in format RGBa, grab the alpha channel. - alphaVal = generate_get_alpha_value_from_color( startingColor ); - - // Get the solid color - solidColor = startingColor.toString().replace( '0.' + alphaVal, '100' ); - - // Set up jQuery UI slider() options. - sliderOptions = { - create: function( event, ui ) { - var value = $( this ).slider( 'value' ); - - // Set up initial values. - //$( this ).find( '.ui-slider-handle' ).text( value ); - $( this ).closest( '.iris-slider' ).css( 'background-color', solidColor ); - }, - value: alphaVal, - range: 'max', - step: 1, - min: 0, - max: 100, - animate: 300, - orientation: "vertical" - }; - - // Initialize jQuery UI slider with our options. - $alphaSlider.slider( sliderOptions ); - - // Bind event handler for clicking on a palette color. - $container.find( '.iris-palette' ).on( 'click', function() { - var color, alpha; - - color = $( this ).css( 'background-color' ); - alpha = generate_get_alpha_value_from_color( color ); - - generate_update_alpha_value_on_alpha_slider( alpha, $alphaSlider ); - - // Sometimes Iris doesn't set a perfect background-color on the palette, - // for example rgba(20, 80, 100, 0.3) becomes rgba(20, 80, 100, 0.298039). - // To compensante for this we round the opacity value on RGBa colors here - // and save it a second time to the color picker object. - if ( alpha != 100 ) { - color = color.toString().replace( /[^,]+(?=\))/, ( alpha / 100 ).toFixed( 2 ) ); - } - - $control.wpColorPicker( 'color', color ); - }); - - // Bind event handler for clicking on the 'Clear' button. - $container.find( '.button.wp-picker-clear' ).on( 'click', function() { - var key = $control.attr( 'data-customize-setting-link' ); - - // The #fff color is delibrate here. This sets the color picker to white instead of the - // defult black, which puts the color picker in a better place to visually represent empty. - $control.wpColorPicker( 'color', '#ffffff' ); - - // Set the actual option value to empty string. - wp.customize( key, function( obj ) { - obj.set( '' ); - }); - - generate_update_alpha_value_on_alpha_slider( 100, $alphaSlider ); - }); - - // Bind event handler for clicking on the 'Default' button. - $container.find( '.button.wp-picker-default' ).on( 'click', function() { - var alpha = generate_get_alpha_value_from_color( defaultColor ); - - generate_update_alpha_value_on_alpha_slider( alpha, $alphaSlider ); - }); - - // Bind event handler for typing or pasting into the input. - $control.on( 'input', function() { - var value = $( this ).val(); - - if ( '' === value ) { - var key = $control.attr( 'data-customize-setting-link' ); - - // The #fff color is delibrate here. This sets the color picker to white instead of the - // defult black, which puts the color picker in a better place to visually represent empty. - $control.wpColorPicker( 'color', '' ); - - // Set the actual option value to empty string. - wp.customize( key, function( obj ) { - obj.set( '' ); - }); - - generate_update_alpha_value_on_alpha_slider( 100, $alphaSlider ); - } else { - var alpha = generate_get_alpha_value_from_color( value ); - - generate_update_alpha_value_on_alpha_slider( alpha, $alphaSlider ); - } - }); - - // Update all the things when the slider is interacted with. - $alphaSlider.slider().on( 'slide', function( event, ui ) { - var alpha = parseFloat( ui.value ) / 100.0; - - generate_update_alpha_value_on_color_control( alpha, $control, $alphaSlider, false ); - }); - - }); -}); - -// Move the opacity bar next to the hue bar -jQuery( document ).ready( function( $ ) { - var container_width = $( '.customize-control-gp-alpha-color .iris-picker' ).width(); - var square_width = $( '.customize-control-gp-alpha-color .iris-square' ).width(); - var available_space = container_width - square_width; - var strip_width = ( available_space / 2 ) - 20; - var strip_height = $( '.customize-control-gp-alpha-color .iris-strip' ).height(); - $( '.customize-control-gp-alpha-color .iris-strip, .gp-alpha-color-picker-container' ).css( 'width', strip_width + 'px' ); - $( '.gp-alpha-color-picker-container' ).css( 'height', strip_height + 'px' ); - -}); \ No newline at end of file diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/library/customizer/controls/js/backgrounds-customizer.js b/wp-content/upgrade-temp-backup/plugins/gp-premium/library/customizer/controls/js/backgrounds-customizer.js deleted file mode 100644 index 74a4b2b7..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/library/customizer/controls/js/backgrounds-customizer.js +++ /dev/null @@ -1,31 +0,0 @@ -( function( api ) { - api.controlConstructor[ 'gp-background-images' ] = api.Control.extend( { - ready() { - var control = this; - - control.container.on( 'change', '.generatepress-backgrounds-repeat select', - function() { - control.settings.repeat.set( jQuery( this ).val() ); - } - ); - - control.container.on( 'change', '.generatepress-backgrounds-size select', - function() { - control.settings.size.set( jQuery( this ).val() ); - } - ); - - control.container.on( 'change', '.generatepress-backgrounds-attachment select', - function() { - control.settings.attachment.set( jQuery( this ).val() ); - } - ); - - control.container.on( 'input', '.generatepress-backgrounds-position input', - function() { - control.settings.position.set( jQuery( this ).val() ); - } - ); - }, - } ); -}( wp.customize ) ); diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/library/customizer/controls/js/button-actions.js b/wp-content/upgrade-temp-backup/plugins/gp-premium/library/customizer/controls/js/button-actions.js deleted file mode 100644 index 600c3072..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/library/customizer/controls/js/button-actions.js +++ /dev/null @@ -1,43 +0,0 @@ -jQuery( function( $ ) { - $( '[data-type="overlay_design"]' ).on( 'click', function( e ) { - e.preventDefault(); - - // eslint-disable-next-line no-alert - if ( ! confirm( gpButtonActions.warning ) ) { - return; - } - - ( function( api ) { - 'use strict'; - - api.instance( 'generate_settings[slideout_background_color]' ).set( gpButtonActions.styling.backgroundColor ); - api.instance( 'generate_settings[slideout_text_color]' ).set( gpButtonActions.styling.textColor ); - api.instance( 'generate_settings[slideout_background_hover_color]' ).set( gpButtonActions.styling.backgroundHoverColor ); - api.instance( 'generate_settings[slideout_background_current_color]' ).set( gpButtonActions.styling.backgroundCurrentColor ); - - api.instance( 'generate_settings[slideout_submenu_background_color]' ).set( gpButtonActions.styling.subMenuBackgroundColor ); - api.instance( 'generate_settings[slideout_submenu_text_color]' ).set( gpButtonActions.styling.subMenuTextColor ); - api.instance( 'generate_settings[slideout_submenu_background_hover_color]' ).set( gpButtonActions.styling.subMenuBackgroundHoverColor ); - api.instance( 'generate_settings[slideout_submenu_background_current_color]' ).set( gpButtonActions.styling.subMenuBackgroundCurrentColor ); - - api.instance( 'generate_settings[slideout_font_weight]' ).set( gpButtonActions.styling.fontWeight ); - api.instance( 'generate_settings[slideout_font_size]' ).set( gpButtonActions.styling.fontSize ); - - $( '.wp-color-picker' ).wpColorPicker().change(); - }( wp.customize ) ); - } ); - - $( '[data-type="regenerate_external_css"]' ).on( 'click', function( e ) { - var $thisButton = $( this ); // eslint-disable-line no-var - e.preventDefault(); - - $thisButton.removeClass( 'success' ).addClass( 'loading' ); - - $.post( ajaxurl, { - action: 'generatepress_regenerate_css_file', - _nonce: $thisButton.data( 'nonce' ), - } ).done( function() { - $thisButton.removeClass( 'loading' ).addClass( 'success' ); - } ); - } ); -} ); diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/library/customizer/controls/js/control-toggle-customizer.js b/wp-content/upgrade-temp-backup/plugins/gp-premium/library/customizer/controls/js/control-toggle-customizer.js deleted file mode 100644 index 76083b29..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/library/customizer/controls/js/control-toggle-customizer.js +++ /dev/null @@ -1,35 +0,0 @@ -jQuery( function( $ ) { - $( '.generatepress-control-toggles' ).each( function() { - $( this ).find( 'button' ).first().addClass( 'active' ); - } ); - - $( document ).on( 'click', '.generatepress-control-toggles button', function( e ) { - e.preventDefault(); - var button = $( this ), - target = button.data( 'target' ), - otherTargets = button.siblings(); - - button.addClass( 'active' ); - button.siblings().removeClass( 'active' ); - - $( 'li[data-control-section="' + target + '"]' ).css( { - visibility: 'visible', - height: '', - width: '', - margin: '', - overflow: '', - } ); - - $.each( otherTargets, function() { - var otherTarget = $( this ).data( 'target' ); - - $( 'li[data-control-section="' + otherTarget + '"]' ).css( { - visibility: 'hidden', - height: '0', - width: '0', - margin: '0', - overflow: 'hidden', - } ); - } ); - } ); -} ); diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/library/customizer/controls/js/copyright-customizer.js b/wp-content/upgrade-temp-backup/plugins/gp-premium/library/customizer/controls/js/copyright-customizer.js deleted file mode 100644 index 4d5b4eb8..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/library/customizer/controls/js/copyright-customizer.js +++ /dev/null @@ -1,12 +0,0 @@ -( function( $, api ) { - api.controlConstructor[ 'gp-copyright' ] = api.Control.extend( { - ready() { - var control = this; - $( '.gp-copyright-area', control.container ).on( 'change keyup', - function() { - control.setting.set( $( this ).val() ); - } - ); - }, - } ); -}( jQuery, wp.customize ) ); diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/library/customizer/controls/js/generatepress-controls.js b/wp-content/upgrade-temp-backup/plugins/gp-premium/library/customizer/controls/js/generatepress-controls.js deleted file mode 100644 index 2b3f2e08..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/library/customizer/controls/js/generatepress-controls.js +++ /dev/null @@ -1,151 +0,0 @@ -( function( $, api ) { - /** - * Set some controls when we're using the navigation as a header. - * - * @since 1.8 - */ - api( 'generate_menu_plus_settings[navigation_as_header]', function( value ) { - value.bind( function( newval ) { - var navAlignmentSetting = api.instance( 'generate_settings[nav_alignment_setting]' ), - navAlignment = gpControls.navigationAlignment, - siteTitleFontSizeSetting = api.instance( 'generate_settings[site_title_font_size]' ), - mobileSiteTitleFontSizeSetting = api.instance( 'generate_settings[mobile_site_title_font_size]' ), - siteTitleFontSize = gpControls.siteTitleFontSize, - mobileSiteTitleFontSize = gpControls.mobileSiteTitleFontSize, - mobileHeader = api.instance( 'generate_menu_plus_settings[mobile_header]' ).get(), - navTextColorSetting = api.instance( 'generate_settings[navigation_text_color]' ), - navTextColor = gpControls.navigationTextColor, - siteTitleTextColorSetting = api.instance( 'generate_settings[site_title_color]' ), - siteTitleTextColor = gpControls.siteTitleTextColor; - - if ( siteTitleFontSizeSetting && ! siteTitleFontSizeSetting._dirty && 25 !== siteTitleFontSizeSetting.get() ) { - siteTitleFontSize = siteTitleFontSizeSetting.get(); - } - - if ( mobileSiteTitleFontSizeSetting && ! mobileSiteTitleFontSizeSetting._dirty && 20 !== mobileSiteTitleFontSizeSetting.get() ) { - mobileSiteTitleFontSize = mobileSiteTitleFontSizeSetting.get(); - } - - if ( navTextColorSetting && ! navTextColorSetting._dirty ) { - navTextColor = navTextColorSetting.get(); - } - - if ( siteTitleTextColorSetting && ! siteTitleTextColorSetting._dirty ) { - siteTitleTextColor = siteTitleTextColorSetting.get(); - } - - if ( newval ) { - navAlignmentSetting.set( 'right' ); - - if ( siteTitleFontSizeSetting ) { - siteTitleFontSizeSetting.set( 25 ); - } - - if ( api.instance( 'generate_settings[site_title_color]' ) ) { - api.instance( 'generate_settings[site_title_color]' ).set( navTextColor ); - } - - if ( mobileSiteTitleFontSizeSetting && 'enable' !== mobileHeader ) { - mobileSiteTitleFontSizeSetting.set( 20 ); - } - } else { - navAlignmentSetting.set( navAlignment ); - - if ( siteTitleFontSizeSetting ) { - siteTitleFontSizeSetting.set( siteTitleFontSize ); - } - - if ( api.instance( 'generate_settings[site_title_color]' ) ) { - api.instance( 'generate_settings[site_title_color]' ).set( siteTitleTextColor ); - } - - if ( mobileSiteTitleFontSizeSetting && 'enable' !== mobileHeader ) { - mobileSiteTitleFontSizeSetting.set( mobileSiteTitleFontSize ); - } - } - } ); - - var showRegularHeader, - showRegularHeaderCallback; - - /** - * Determine whether we should display our header controls. - * - * @return {boolean} Whether we should show the regular header. - */ - showRegularHeader = function() { - if ( value.get() ) { - return false; - } - - return true; - }; - - /** - * Update a control's active state according to the navigation as header option. - * - * @param {wp.customize.Control} control The current control. - */ - showRegularHeaderCallback = function( control ) { - var setActiveState = function() { - control.active.set( showRegularHeader() ); - }; - - control.active.validate = showRegularHeader; - setActiveState(); - value.bind( setActiveState ); - }; - - api.control( 'generate_header_helper', showRegularHeaderCallback ); - api.control( 'generate_settings[header_layout_setting]', showRegularHeaderCallback ); - api.control( 'generate_settings[header_inner_width]', showRegularHeaderCallback ); - api.control( 'generate_settings[header_alignment_setting]', showRegularHeaderCallback ); - api.control( 'header_spacing', showRegularHeaderCallback ); - api.control( 'generate_settings[header_background_color]', showRegularHeaderCallback ); - api.control( 'header_text_color', showRegularHeaderCallback ); - api.control( 'header_link_color', showRegularHeaderCallback ); - api.control( 'header_link_hover_color', showRegularHeaderCallback ); - api.control( 'site_tagline_color', showRegularHeaderCallback ); - api.control( 'font_site_tagline_control', showRegularHeaderCallback ); - api.control( 'generate_settings[site_tagline_font_size]', showRegularHeaderCallback ); - api.control( 'generate_settings[nav_position_setting]', showRegularHeaderCallback ); - api.control( 'generate_settings[logo_width]', showRegularHeaderCallback ); - } ); - - /** - * Set the navigation branding font size label on mobile header branding change. - * - * @since 1.8 - */ - api( 'generate_menu_plus_settings[mobile_header_branding]', function( value ) { - value.bind( function( newval ) { - if ( api.instance( 'generate_settings[mobile_site_title_font_size]' ) && 'title' === newval ) { - api.instance( 'generate_settings[mobile_site_title_font_size]' ).set( 20 ); - } - } ); - } ); - - /** - * Set the navigation branding font size label on mobile header change. - * - * @since 1.8 - */ - api( 'generate_menu_plus_settings[mobile_header]', function( value ) { - value.bind( function( newval ) { - var mobileSiteTitleFontSizeSetting = api.instance( 'generate_settings[mobile_site_title_font_size]' ), - mobileSiteTitleFontSize = gpControls.mobileSiteTitleFontSize; - - if ( mobileSiteTitleFontSizeSetting && ! mobileSiteTitleFontSizeSetting._dirty && 20 !== mobileSiteTitleFontSizeSetting.get() ) { - mobileSiteTitleFontSize = mobileSiteTitleFontSizeSetting.get(); - } - - if ( api.instance( 'generate_settings[mobile_site_title_font_size]' ) ) { - if ( 'enable' === newval ) { - api.instance( 'generate_settings[mobile_site_title_font_size]' ).set( 20 ); - } else { - api.instance( 'generate_settings[mobile_site_title_font_size]' ).set( mobileSiteTitleFontSize ); - } - } - } ); - } ); -}( jQuery, wp.customize ) ); diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/library/customizer/controls/js/section-shortcuts.js b/wp-content/upgrade-temp-backup/plugins/gp-premium/library/customizer/controls/js/section-shortcuts.js deleted file mode 100644 index f1d93985..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/library/customizer/controls/js/section-shortcuts.js +++ /dev/null @@ -1,46 +0,0 @@ -jQuery( function( $ ) { - $( '.generatepress-shortcuts a' ).on( 'click', function( e ) { - e.preventDefault(); - var section = $( this ).attr( 'data-section' ), - currentSection = $( this ).attr( 'data-current-section' ), - destinationSectionElement = $( '[id$="' + section + '"]' ); - - if ( section ) { - wp.customize.section( section ).focus(); - - destinationSectionElement.find( '.show-shortcuts' ).hide(); - destinationSectionElement.find( '.return-shortcut' ).show(); - destinationSectionElement.find( '.return-shortcut a' ).attr( 'data-return', currentSection ); - } - } ); - - $( '.return-shortcut .dashicons' ).on( 'click', function() { - var container = $( this ).closest( '.generatepress-shortcuts' ); - - container.find( '.show-shortcuts' ).show(); - container.find( '.return-shortcut' ).hide(); - } ); - - $( '.return-shortcut a' ).on( 'click', function( e ) { - e.preventDefault(); - - var section = $( this ).attr( 'data-return' ); - var container = $( this ).closest( '.generatepress-shortcuts' ); - - if ( section ) { - wp.customize.section( section ).focus(); - - container.find( '.show-shortcuts' ).show(); - container.find( '.return-shortcut' ).hide(); - } - } ); - - var customizeSectionBack = $( '.customize-section-back' ); - - if ( customizeSectionBack ) { - customizeSectionBack.on( 'click', function() { - $( '.show-shortcuts' ).show(); - $( '.return-shortcut' ).hide(); - } ); - } -} ); diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/library/customizer/controls/js/selectWoo.min.js b/wp-content/upgrade-temp-backup/plugins/gp-premium/library/customizer/controls/js/selectWoo.min.js deleted file mode 100644 index c2de789f..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/library/customizer/controls/js/selectWoo.min.js +++ /dev/null @@ -1 +0,0 @@ -/*! Select2 1.0.8 | https://github.com/select2/select2/blob/master/LICENSE.md */!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof module&&module.exports?module.exports=function(b,c){return void 0===c&&(c="undefined"!=typeof window?require("jquery"):require("jquery")(b)),a(c),c}:a(jQuery)}(function(a){var b=function(){if(a&&a.fn&&a.fn.select2&&a.fn.select2.amd)var b=a.fn.select2.amd;var b;return function(){if(!b||!b.requirejs){b?c=b:b={};var a,c,d;!function(b){function e(a,b){return v.call(a,b)}function f(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o=b&&b.split("/"),p=t.map,q=p&&p["*"]||{};if(a){for(a=a.split("/"),g=a.length-1,t.nodeIdCompat&&x.test(a[g])&&(a[g]=a[g].replace(x,"")),"."===a[0].charAt(0)&&o&&(n=o.slice(0,o.length-1),a=n.concat(a)),k=0;k0&&(a.splice(k-1,2),k-=2)}a=a.join("/")}if((o||q)&&p){for(c=a.split("/"),k=c.length;k>0;k-=1){if(d=c.slice(0,k).join("/"),o)for(l=o.length;l>0;l-=1)if((e=p[o.slice(0,l).join("/")])&&(e=e[d])){f=e,h=k;break}if(f)break;!i&&q&&q[d]&&(i=q[d],j=k)}!f&&i&&(f=i,h=j),f&&(c.splice(0,h,f),a=c.join("/"))}return a}function g(a,c){return function(){var d=w.call(arguments,0);return"string"!=typeof d[0]&&1===d.length&&d.push(null),o.apply(b,d.concat([a,c]))}}function h(a){return function(b){return f(b,a)}}function i(a){return function(b){r[a]=b}}function j(a){if(e(s,a)){var c=s[a];delete s[a],u[a]=!0,n.apply(b,c)}if(!e(r,a)&&!e(u,a))throw new Error("No "+a);return r[a]}function k(a){var b,c=a?a.indexOf("!"):-1;return c>-1&&(b=a.substring(0,c),a=a.substring(c+1,a.length)),[b,a]}function l(a){return a?k(a):[]}function m(a){return function(){return t&&t.config&&t.config[a]||{}}}var n,o,p,q,r={},s={},t={},u={},v=Object.prototype.hasOwnProperty,w=[].slice,x=/\.js$/;p=function(a,b){var c,d=k(a),e=d[0],g=b[1];return a=d[1],e&&(e=f(e,g),c=j(e)),e?a=c&&c.normalize?c.normalize(a,h(g)):f(a,g):(a=f(a,g),d=k(a),e=d[0],a=d[1],e&&(c=j(e))),{f:e?e+"!"+a:a,n:a,pr:e,p:c}},q={require:function(a){return g(a)},exports:function(a){var b=r[a];return void 0!==b?b:r[a]={}},module:function(a){return{id:a,uri:"",exports:r[a],config:m(a)}}},n=function(a,c,d,f){var h,k,m,n,o,t,v,w=[],x=typeof d;if(f=f||a,t=l(f),"undefined"===x||"function"===x){for(c=!c.length&&d.length?["require","exports","module"]:c,o=0;o0&&(b.call(arguments,a.prototype.constructor),e=c.prototype.constructor),e.apply(this,arguments)}function e(){this.constructor=d}var f=b(c),g=b(a);c.displayName=a.displayName,d.prototype=new e;for(var h=0;h":">",'"':""","'":"'","/":"/"};return"string"!=typeof a?a:String(a).replace(/[&<>"'\/\\]/g,function(a){return b[a]})},c.entityDecode=function(a){var b=document.createElement("textarea");return b.innerHTML=a,b.value},c.appendMany=function(b,c){if("1.7"===a.fn.jquery.substr(0,3)){var d=a();a.map(c,function(a){d=d.add(a)}),c=d}b.append(c)},c.isTouchscreen=function(){return void 0===c._isTouchscreenCache&&(c._isTouchscreenCache="ontouchstart"in document.documentElement),c._isTouchscreenCache},c}),b.define("select2/results",["jquery","./utils"],function(a,b){function c(a,b,d){this.$element=a,this.data=d,this.options=b,c.__super__.constructor.call(this)}return b.Extend(c,b.Observable),c.prototype.render=function(){var b=a('
    ');return this.options.get("multiple")&&b.attr("aria-multiselectable","true"),this.$results=b,b},c.prototype.clear=function(){this.$results.empty()},c.prototype.displayMessage=function(b){var c=this.options.get("escapeMarkup");this.clear(),this.hideLoading();var d=a(''),e=this.options.get("translations").get(b.message);d.append(c(e(b.args))),d[0].className+=" select2-results__message",this.$results.append(d)},c.prototype.hideMessages=function(){this.$results.find(".select2-results__message").remove()},c.prototype.append=function(a){this.hideLoading();var b=[];if(null==a.results||0===a.results.length)return void(0===this.$results.children().length&&this.trigger("results:message",{message:"noResults"}));a.results=this.sort(a.results);for(var c=0;c0?b.first().trigger("mouseenter"):a.first().trigger("mouseenter"),this.ensureHighlightVisible()},c.prototype.setClasses=function(){var b=this;this.data.current(function(c){var d=a.map(c,function(a){return a.id.toString()});b.$results.find(".select2-results__option[data-selected]").each(function(){var b=a(this),c=a.data(this,"data"),e=""+c.id;null!=c.element&&c.element.selected||null==c.element&&a.inArray(e,d)>-1?b.attr("data-selected","true"):b.attr("data-selected","false")})})},c.prototype.showLoading=function(a){this.hideLoading();var b=this.options.get("translations").get("searching"),c={disabled:!0,loading:!0,text:b(a)},d=this.option(c);d.className+=" loading-results",this.$results.prepend(d)},c.prototype.hideLoading=function(){this.$results.find(".loading-results").remove()},c.prototype.option=function(b){var c=document.createElement("li");c.className="select2-results__option";var d={role:"option","data-selected":"false",tabindex:-1};b.disabled&&(delete d["data-selected"],d["aria-disabled"]="true"),null==b.id&&delete d["data-selected"],null!=b._resultId&&(c.id=b._resultId),b.title&&(c.title=b.title),b.children&&(d["aria-label"]=b.text,delete d["data-selected"]);for(var e in d){var f=d[e];c.setAttribute(e,f)}if(b.children){var g=a(c),h=document.createElement("strong");h.className="select2-results__group";var i=a(h);this.template(b,h),i.attr("role","presentation");for(var j=[],k=0;k",{class:"select2-results__options select2-results__options--nested",role:"listbox"});n.append(j),g.attr("role","list"),g.append(h),g.append(n)}else this.template(b,c);return a.data(c,"data",b),c},c.prototype.bind=function(b,c){var d=this,e=b.id+"-results";this.$results.attr("id",e),b.on("results:all",function(a){d.clear(),d.append(a.data),b.isOpen()&&(d.setClasses(),d.highlightFirstItem())}),b.on("results:append",function(a){d.append(a.data),b.isOpen()&&d.setClasses()}),b.on("query",function(a){d.hideMessages(),d.showLoading(a)}),b.on("select",function(){b.isOpen()&&(d.setClasses(),d.highlightFirstItem())}),b.on("unselect",function(){b.isOpen()&&(d.setClasses(),d.highlightFirstItem())}),b.on("open",function(){d.$results.attr("aria-expanded","true"),d.$results.attr("aria-hidden","false"),d.setClasses(),d.ensureHighlightVisible()}),b.on("close",function(){d.$results.attr("aria-expanded","false"),d.$results.attr("aria-hidden","true"),d.$results.removeAttr("aria-activedescendant")}),b.on("results:toggle",function(){var a=d.getHighlightedResults();0!==a.length&&a.trigger("mouseup")}),b.on("results:select",function(){var a=d.getHighlightedResults();if(0!==a.length){var b=a.data("data");"true"==a.attr("data-selected")?d.trigger("close",{}):d.trigger("select",{data:b})}}),b.on("results:previous",function(){var a=d.getHighlightedResults(),b=d.$results.find("[data-selected]"),c=b.index(a);if(0!==c){var e=c-1;0===a.length&&(e=0);var f=b.eq(e);f.trigger("mouseenter");var g=d.$results.offset().top,h=f.offset().top,i=d.$results.scrollTop()+(h-g);0===e?d.$results.scrollTop(0):h-g<0&&d.$results.scrollTop(i)}}),b.on("results:next",function(){var a=d.getHighlightedResults(),b=d.$results.find("[data-selected]"),c=b.index(a),e=c+1;if(!(e>=b.length)){var f=b.eq(e);f.trigger("mouseenter");var g=d.$results.offset().top+d.$results.outerHeight(!1),h=f.offset().top+f.outerHeight(!1),i=d.$results.scrollTop()+h-g;0===e?d.$results.scrollTop(0):h>g&&d.$results.scrollTop(i)}}),b.on("results:focus",function(a){a.element.addClass("select2-results__option--highlighted").attr("aria-selected","true"),d.$results.attr("aria-activedescendant",a.element.attr("id"))}),b.on("results:message",function(a){d.displayMessage(a)}),a.fn.mousewheel&&this.$results.on("mousewheel",function(a){var b=d.$results.scrollTop(),c=d.$results.get(0).scrollHeight-b+a.deltaY,e=a.deltaY>0&&b-a.deltaY<=0,f=a.deltaY<0&&c<=d.$results.height();e?(d.$results.scrollTop(0),a.preventDefault(),a.stopPropagation()):f&&(d.$results.scrollTop(d.$results.get(0).scrollHeight-d.$results.height()),a.preventDefault(),a.stopPropagation())}),this.$results.on("mouseup",".select2-results__option[data-selected]",function(b){var c=a(this),e=c.data("data");if("true"===c.attr("data-selected"))return void(d.options.get("multiple")?d.trigger("unselect",{originalEvent:b,data:e}):d.trigger("close",{}));d.trigger("select",{originalEvent:b,data:e})}),this.$results.on("mouseenter",".select2-results__option[data-selected]",function(b){var c=a(this).data("data");d.getHighlightedResults().removeClass("select2-results__option--highlighted").attr("aria-selected","false"),d.trigger("results:focus",{data:c,element:a(this)})})},c.prototype.getHighlightedResults=function(){return this.$results.find(".select2-results__option--highlighted")},c.prototype.destroy=function(){this.$results.remove()},c.prototype.ensureHighlightVisible=function(){var a=this.getHighlightedResults();if(0!==a.length){var b=this.$results.find("[data-selected]"),c=b.index(a),d=this.$results.offset().top,e=a.offset().top,f=this.$results.scrollTop()+(e-d),g=e-d;f-=2*a.outerHeight(!1),c<=2?this.$results.scrollTop(0):(g>this.$results.outerHeight()||g<0)&&this.$results.scrollTop(f)}},c.prototype.template=function(b,c){var d=this.options.get("templateResult"),e=this.options.get("escapeMarkup"),f=d(b,c);null==f?c.style.display="none":"string"==typeof f?c.innerHTML=e(f):a(c).append(f)},c}),b.define("select2/keys",[],function(){return{BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46}}),b.define("select2/selection/base",["jquery","../utils","../keys"],function(a,b,c){function d(a,b){this.$element=a,this.options=b,d.__super__.constructor.call(this)}return b.Extend(d,b.Observable),d.prototype.render=function(){var b=a('');return this._tabindex=0,null!=this.$element.data("old-tabindex")?this._tabindex=this.$element.data("old-tabindex"):null!=this.$element.attr("tabindex")&&(this._tabindex=this.$element.attr("tabindex")),b.attr("title",this.$element.attr("title")),b.attr("tabindex",this._tabindex),this.$selection=b,b},d.prototype.bind=function(a,b){var d=this,e=(a.id,a.id+"-results");this.options.get("minimumResultsForSearch");this.container=a,this.$selection.on("focus",function(a){d.trigger("focus",a)}),this.$selection.on("blur",function(a){d._handleBlur(a)}),this.$selection.on("keydown",function(a){d.trigger("keypress",a),a.which===c.SPACE&&a.preventDefault()}),a.on("results:focus",function(a){d.$selection.attr("aria-activedescendant",a.data._resultId)}),a.on("selection:update",function(a){d.update(a.data)}),a.on("open",function(){d.$selection.attr("aria-expanded","true"),d.$selection.attr("aria-owns",e),d._attachCloseHandler(a)}),a.on("close",function(){d.$selection.attr("aria-expanded","false"),d.$selection.removeAttr("aria-activedescendant"),d.$selection.removeAttr("aria-owns"),window.setTimeout(function(){d.$selection.focus()},1),d._detachCloseHandler(a)}),a.on("enable",function(){d.$selection.attr("tabindex",d._tabindex)}),a.on("disable",function(){d.$selection.attr("tabindex","-1")})},d.prototype._handleBlur=function(b){var c=this;window.setTimeout(function(){document.activeElement==c.$selection[0]||a.contains(c.$selection[0],document.activeElement)||c.trigger("blur",b)},1)},d.prototype._attachCloseHandler=function(b){a(document.body).on("mousedown.select2."+b.id,function(b){var c=a(b.target),d=c.closest(".select2");a(".select2.select2-container--open").each(function(){var b=a(this);this!=d[0]&&(b.data("element").select2("close"),setTimeout(function(){b.find("*:focus").blur(),c.focus()},1))})})},d.prototype._detachCloseHandler=function(b){a(document.body).off("mousedown.select2."+b.id)},d.prototype.position=function(a,b){b.find(".selection").append(a)},d.prototype.destroy=function(){this._detachCloseHandler(this.container)},d.prototype.update=function(a){throw new Error("The `update` method must be defined in child classes.")},d}),b.define("select2/selection/single",["jquery","./base","../utils","../keys"],function(a,b,c,d){function e(){e.__super__.constructor.apply(this,arguments)}return c.Extend(e,b),e.prototype.render=function(){var a=e.__super__.render.call(this);return a.addClass("select2-selection--single"),a.html(''),a},e.prototype.bind=function(a,b){var c=this;e.__super__.bind.apply(this,arguments);var d=a.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",d).attr("role","textbox").attr("aria-readonly","true"),this.$selection.attr("aria-labelledby",d),this.$selection.attr("role","combobox"),this.$selection.on("mousedown",function(a){1===a.which&&c.trigger("toggle",{originalEvent:a})}),this.$selection.on("focus",function(a){}),this.$selection.on("keydown",function(b){!a.isOpen()&&b.which>=48&&b.which<=90&&a.open()}),this.$selection.on("blur",function(a){}),a.on("focus",function(b){a.isOpen()||c.$selection.focus()}),a.on("selection:update",function(a){c.update(a.data)})},e.prototype.clear=function(){this.$selection.find(".select2-selection__rendered").empty()},e.prototype.display=function(a,b){var c=this.options.get("templateSelection");return this.options.get("escapeMarkup")(c(a,b))},e.prototype.selectionContainer=function(){return a("")},e.prototype.update=function(a){if(0===a.length)return void this.clear();var b=a[0],d=this.$selection.find(".select2-selection__rendered"),e=c.entityDecode(this.display(b,d));d.empty().text(e),d.prop("title",b.title||b.text)},e}),b.define("select2/selection/multiple",["jquery","./base","../utils"],function(a,b,c){function d(a,b){d.__super__.constructor.apply(this,arguments)}return c.Extend(d,b),d.prototype.render=function(){var a=d.__super__.render.call(this);return a.addClass("select2-selection--multiple"),a.html('
      '),a},d.prototype.bind=function(b,c){var e=this;d.__super__.bind.apply(this,arguments),this.$selection.on("click",function(a){e.trigger("toggle",{originalEvent:a})}),this.$selection.on("click",".select2-selection__choice__remove",function(b){if(!e.options.get("disabled")){var c=a(this),d=c.parent(),f=d.data("data");e.trigger("unselect",{originalEvent:b,data:f})}}),this.$selection.on("keydown",function(a){!b.isOpen()&&a.which>=48&&a.which<=90&&b.open()}),b.on("focus",function(){e.focusOnSearch()})},d.prototype.clear=function(){this.$selection.find(".select2-selection__rendered").empty()},d.prototype.display=function(a,b){var c=this.options.get("templateSelection");return this.options.get("escapeMarkup")(c(a,b))},d.prototype.selectionContainer=function(){return a('
    • ')},d.prototype.focusOnSearch=function(){var a=this;void 0!==a.$search&&setTimeout(function(){a._keyUpPrevented=!0,a.$search.focus()},1)},d.prototype.update=function(a){if(this.clear(),0!==a.length){for(var b=[],d=0;d1||c)return a.call(this,b);this.clear();var d=this.createPlaceholder(this.placeholder);this.$selection.find(".select2-selection__rendered").append(d)},b}),b.define("select2/selection/allowClear",["jquery","../keys"],function(a,b){function c(){}return c.prototype.bind=function(a,b,c){var d=this;a.call(this,b,c),null==this.placeholder&&this.options.get("debug")&&window.console&&console.error&&console.error("Select2: The `allowClear` option should be used in combination with the `placeholder` option."),this.$selection.on("mousedown",".select2-selection__clear",function(a){d._handleClear(a)}),b.on("keypress",function(a){d._handleKeyboardClear(a,b)})},c.prototype._handleClear=function(a,b){if(!this.options.get("disabled")){var c=this.$selection.find(".select2-selection__clear");if(0!==c.length){b.stopPropagation();for(var d=c.data("data"),e=0;e0||0===c.length)){var d=a('×');d.data("data",c),this.$selection.find(".select2-selection__rendered").prepend(d)}},c}),b.define("select2/selection/search",["jquery","../utils","../keys"],function(a,b,c){function d(a,b,c){a.call(this,b,c)}return d.prototype.render=function(b){var c=a('');this.$searchContainer=c,this.$search=c.find("input");var d=b.call(this);return this._transferTabIndex(),d},d.prototype.bind=function(a,b,d){var e=this,f=b.id+"-results";a.call(this,b,d),b.on("open",function(){e.$search.attr("aria-owns",f),e.$search.trigger("focus")}),b.on("close",function(){e.$search.val(""),e.$search.removeAttr("aria-activedescendant"),e.$search.removeAttr("aria-owns"),e.$search.trigger("focus")}),b.on("enable",function(){e.$search.prop("disabled",!1),e._transferTabIndex()}),b.on("disable",function(){e.$search.prop("disabled",!0)}),b.on("focus",function(a){e.$search.trigger("focus")}),b.on("results:focus",function(a){e.$search.attr("aria-activedescendant",a.data._resultId)}),this.$selection.on("focusin",".select2-search--inline",function(a){e.trigger("focus",a)}),this.$selection.on("focusout",".select2-search--inline",function(a){e._handleBlur(a)}),this.$selection.on("keydown",".select2-search--inline",function(a){if(a.stopPropagation(),e.trigger("keypress",a),e._keyUpPrevented=a.isDefaultPrevented(),a.which===c.BACKSPACE&&""===e.$search.val()){var d=e.$searchContainer.prev(".select2-selection__choice");if(d.length>0){var f=d.data("data");e.searchRemoveChoice(f),a.preventDefault()}}else a.which===c.ENTER&&(b.open(),a.preventDefault())});var g=document.documentMode,h=g&&g<=11;this.$selection.on("input.searchcheck",".select2-search--inline",function(a){if(h)return void e.$selection.off("input.search input.searchcheck");e.$selection.off("keyup.search")}),this.$selection.on("keyup.search input.search",".select2-search--inline",function(a){if(h&&"input"===a.type)return void e.$selection.off("input.search input.searchcheck");var b=a.which;b!=c.SHIFT&&b!=c.CTRL&&b!=c.ALT&&b!=c.TAB&&e.handleSearch(a)})},d.prototype._transferTabIndex=function(a){this.$search.attr("tabindex",this.$selection.attr("tabindex")),this.$selection.attr("tabindex","-1")},d.prototype.createPlaceholder=function(a,b){this.$search.attr("placeholder",b.text)},d.prototype.update=function(a,b){var c=this.$search[0]==document.activeElement;this.$search.attr("placeholder",""),a.call(this,b),this.$selection.find(".select2-selection__rendered").append(this.$searchContainer),this.resizeSearch(),c&&this.$search.focus()},d.prototype.handleSearch=function(){if(this.resizeSearch(),!this._keyUpPrevented){var a=this.$search.val();this.trigger("query",{term:a})}this._keyUpPrevented=!1},d.prototype.searchRemoveChoice=function(a,b){this.trigger("unselect",{data:b}),this.$search.val(b.text),this.handleSearch()},d.prototype.resizeSearch=function(){this.$search.css("width","25px");var a="";if(""!==this.$search.attr("placeholder"))a=this.$selection.find(".select2-selection__rendered").innerWidth();else{a=.75*(this.$search.val().length+1)+"em"}this.$search.css("width",a)},d}),b.define("select2/selection/eventRelay",["jquery"],function(a){function b(){}return b.prototype.bind=function(b,c,d){var e=this,f=["open","opening","close","closing","select","selecting","unselect","unselecting"],g=["opening","closing","selecting","unselecting"];b.call(this,c,d),c.on("*",function(b,c){if(-1!==a.inArray(b,f)){c=c||{};var d=a.Event("select2:"+b,{params:c});e.$element.trigger(d),-1!==a.inArray(b,g)&&(c.prevented=d.isDefaultPrevented())}})},b}),b.define("select2/translation",["jquery","require"],function(a,b){function c(a){this.dict=a||{}}return c.prototype.all=function(){return this.dict},c.prototype.get=function(a){return this.dict[a]},c.prototype.extend=function(b){this.dict=a.extend({},b.all(),this.dict)},c._cache={},c.loadPath=function(a){if(!(a in c._cache)){var d=b(a);c._cache[a]=d}return new c(c._cache[a])},c}),b.define("select2/diacritics",[],function(){return{"Ⓐ":"A","A":"A","À":"A","Á":"A","Â":"A","Ầ":"A","Ấ":"A","Ẫ":"A","Ẩ":"A","Ã":"A","Ā":"A","Ă":"A","Ằ":"A","Ắ":"A","Ẵ":"A","Ẳ":"A","Ȧ":"A","Ǡ":"A","Ä":"A","Ǟ":"A","Ả":"A","Å":"A","Ǻ":"A","Ǎ":"A","Ȁ":"A","Ȃ":"A","Ạ":"A","Ậ":"A","Ặ":"A","Ḁ":"A","Ą":"A","Ⱥ":"A","Ɐ":"A","Ꜳ":"AA","Æ":"AE","Ǽ":"AE","Ǣ":"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV","Ꜻ":"AV","Ꜽ":"AY","Ⓑ":"B","B":"B","Ḃ":"B","Ḅ":"B","Ḇ":"B","Ƀ":"B","Ƃ":"B","Ɓ":"B","Ⓒ":"C","C":"C","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","Ç":"C","Ḉ":"C","Ƈ":"C","Ȼ":"C","Ꜿ":"C","Ⓓ":"D","D":"D","Ḋ":"D","Ď":"D","Ḍ":"D","Ḑ":"D","Ḓ":"D","Ḏ":"D","Đ":"D","Ƌ":"D","Ɗ":"D","Ɖ":"D","Ꝺ":"D","DZ":"DZ","DŽ":"DZ","Dz":"Dz","Dž":"Dz","Ⓔ":"E","E":"E","È":"E","É":"E","Ê":"E","Ề":"E","Ế":"E","Ễ":"E","Ể":"E","Ẽ":"E","Ē":"E","Ḕ":"E","Ḗ":"E","Ĕ":"E","Ė":"E","Ë":"E","Ẻ":"E","Ě":"E","Ȅ":"E","Ȇ":"E","Ẹ":"E","Ệ":"E","Ȩ":"E","Ḝ":"E","Ę":"E","Ḙ":"E","Ḛ":"E","Ɛ":"E","Ǝ":"E","Ⓕ":"F","F":"F","Ḟ":"F","Ƒ":"F","Ꝼ":"F","Ⓖ":"G","G":"G","Ǵ":"G","Ĝ":"G","Ḡ":"G","Ğ":"G","Ġ":"G","Ǧ":"G","Ģ":"G","Ǥ":"G","Ɠ":"G","Ꞡ":"G","Ᵹ":"G","Ꝿ":"G","Ⓗ":"H","H":"H","Ĥ":"H","Ḣ":"H","Ḧ":"H","Ȟ":"H","Ḥ":"H","Ḩ":"H","Ḫ":"H","Ħ":"H","Ⱨ":"H","Ⱶ":"H","Ɥ":"H","Ⓘ":"I","I":"I","Ì":"I","Í":"I","Î":"I","Ĩ":"I","Ī":"I","Ĭ":"I","İ":"I","Ï":"I","Ḯ":"I","Ỉ":"I","Ǐ":"I","Ȉ":"I","Ȋ":"I","Ị":"I","Į":"I","Ḭ":"I","Ɨ":"I","Ⓙ":"J","J":"J","Ĵ":"J","Ɉ":"J","Ⓚ":"K","K":"K","Ḱ":"K","Ǩ":"K","Ḳ":"K","Ķ":"K","Ḵ":"K","Ƙ":"K","Ⱪ":"K","Ꝁ":"K","Ꝃ":"K","Ꝅ":"K","Ꞣ":"K","Ⓛ":"L","L":"L","Ŀ":"L","Ĺ":"L","Ľ":"L","Ḷ":"L","Ḹ":"L","Ļ":"L","Ḽ":"L","Ḻ":"L","Ł":"L","Ƚ":"L","Ɫ":"L","Ⱡ":"L","Ꝉ":"L","Ꝇ":"L","Ꞁ":"L","LJ":"LJ","Lj":"Lj","Ⓜ":"M","M":"M","Ḿ":"M","Ṁ":"M","Ṃ":"M","Ɱ":"M","Ɯ":"M","Ⓝ":"N","N":"N","Ǹ":"N","Ń":"N","Ñ":"N","Ṅ":"N","Ň":"N","Ṇ":"N","Ņ":"N","Ṋ":"N","Ṉ":"N","Ƞ":"N","Ɲ":"N","Ꞑ":"N","Ꞥ":"N","NJ":"NJ","Nj":"Nj","Ⓞ":"O","O":"O","Ò":"O","Ó":"O","Ô":"O","Ồ":"O","Ố":"O","Ỗ":"O","Ổ":"O","Õ":"O","Ṍ":"O","Ȭ":"O","Ṏ":"O","Ō":"O","Ṑ":"O","Ṓ":"O","Ŏ":"O","Ȯ":"O","Ȱ":"O","Ö":"O","Ȫ":"O","Ỏ":"O","Ő":"O","Ǒ":"O","Ȍ":"O","Ȏ":"O","Ơ":"O","Ờ":"O","Ớ":"O","Ỡ":"O","Ở":"O","Ợ":"O","Ọ":"O","Ộ":"O","Ǫ":"O","Ǭ":"O","Ø":"O","Ǿ":"O","Ɔ":"O","Ɵ":"O","Ꝋ":"O","Ꝍ":"O","Ƣ":"OI","Ꝏ":"OO","Ȣ":"OU","Ⓟ":"P","P":"P","Ṕ":"P","Ṗ":"P","Ƥ":"P","Ᵽ":"P","Ꝑ":"P","Ꝓ":"P","Ꝕ":"P","Ⓠ":"Q","Q":"Q","Ꝗ":"Q","Ꝙ":"Q","Ɋ":"Q","Ⓡ":"R","R":"R","Ŕ":"R","Ṙ":"R","Ř":"R","Ȑ":"R","Ȓ":"R","Ṛ":"R","Ṝ":"R","Ŗ":"R","Ṟ":"R","Ɍ":"R","Ɽ":"R","Ꝛ":"R","Ꞧ":"R","Ꞃ":"R","Ⓢ":"S","S":"S","ẞ":"S","Ś":"S","Ṥ":"S","Ŝ":"S","Ṡ":"S","Š":"S","Ṧ":"S","Ṣ":"S","Ṩ":"S","Ș":"S","Ş":"S","Ȿ":"S","Ꞩ":"S","Ꞅ":"S","Ⓣ":"T","T":"T","Ṫ":"T","Ť":"T","Ṭ":"T","Ț":"T","Ţ":"T","Ṱ":"T","Ṯ":"T","Ŧ":"T","Ƭ":"T","Ʈ":"T","Ⱦ":"T","Ꞇ":"T","Ꜩ":"TZ","Ⓤ":"U","U":"U","Ù":"U","Ú":"U","Û":"U","Ũ":"U","Ṹ":"U","Ū":"U","Ṻ":"U","Ŭ":"U","Ü":"U","Ǜ":"U","Ǘ":"U","Ǖ":"U","Ǚ":"U","Ủ":"U","Ů":"U","Ű":"U","Ǔ":"U","Ȕ":"U","Ȗ":"U","Ư":"U","Ừ":"U","Ứ":"U","Ữ":"U","Ử":"U","Ự":"U","Ụ":"U","Ṳ":"U","Ų":"U","Ṷ":"U","Ṵ":"U","Ʉ":"U","Ⓥ":"V","V":"V","Ṽ":"V","Ṿ":"V","Ʋ":"V","Ꝟ":"V","Ʌ":"V","Ꝡ":"VY","Ⓦ":"W","W":"W","Ẁ":"W","Ẃ":"W","Ŵ":"W","Ẇ":"W","Ẅ":"W","Ẉ":"W","Ⱳ":"W","Ⓧ":"X","X":"X","Ẋ":"X","Ẍ":"X","Ⓨ":"Y","Y":"Y","Ỳ":"Y","Ý":"Y","Ŷ":"Y","Ỹ":"Y","Ȳ":"Y","Ẏ":"Y","Ÿ":"Y","Ỷ":"Y","Ỵ":"Y","Ƴ":"Y","Ɏ":"Y","Ỿ":"Y","Ⓩ":"Z","Z":"Z","Ź":"Z","Ẑ":"Z","Ż":"Z","Ž":"Z","Ẓ":"Z","Ẕ":"Z","Ƶ":"Z","Ȥ":"Z","Ɀ":"Z","Ⱬ":"Z","Ꝣ":"Z","ⓐ":"a","a":"a","ẚ":"a","à":"a","á":"a","â":"a","ầ":"a","ấ":"a","ẫ":"a","ẩ":"a","ã":"a","ā":"a","ă":"a","ằ":"a","ắ":"a","ẵ":"a","ẳ":"a","ȧ":"a","ǡ":"a","ä":"a","ǟ":"a","ả":"a","å":"a","ǻ":"a","ǎ":"a","ȁ":"a","ȃ":"a","ạ":"a","ậ":"a","ặ":"a","ḁ":"a","ą":"a","ⱥ":"a","ɐ":"a","ꜳ":"aa","æ":"ae","ǽ":"ae","ǣ":"ae","ꜵ":"ao","ꜷ":"au","ꜹ":"av","ꜻ":"av","ꜽ":"ay","ⓑ":"b","b":"b","ḃ":"b","ḅ":"b","ḇ":"b","ƀ":"b","ƃ":"b","ɓ":"b","ⓒ":"c","c":"c","ć":"c","ĉ":"c","ċ":"c","č":"c","ç":"c","ḉ":"c","ƈ":"c","ȼ":"c","ꜿ":"c","ↄ":"c","ⓓ":"d","d":"d","ḋ":"d","ď":"d","ḍ":"d","ḑ":"d","ḓ":"d","ḏ":"d","đ":"d","ƌ":"d","ɖ":"d","ɗ":"d","ꝺ":"d","dz":"dz","dž":"dz","ⓔ":"e","e":"e","è":"e","é":"e","ê":"e","ề":"e","ế":"e","ễ":"e","ể":"e","ẽ":"e","ē":"e","ḕ":"e","ḗ":"e","ĕ":"e","ė":"e","ë":"e","ẻ":"e","ě":"e","ȅ":"e","ȇ":"e","ẹ":"e","ệ":"e","ȩ":"e","ḝ":"e","ę":"e","ḙ":"e","ḛ":"e","ɇ":"e","ɛ":"e","ǝ":"e","ⓕ":"f","f":"f","ḟ":"f","ƒ":"f","ꝼ":"f","ⓖ":"g","g":"g","ǵ":"g","ĝ":"g","ḡ":"g","ğ":"g","ġ":"g","ǧ":"g","ģ":"g","ǥ":"g","ɠ":"g","ꞡ":"g","ᵹ":"g","ꝿ":"g","ⓗ":"h","h":"h","ĥ":"h","ḣ":"h","ḧ":"h","ȟ":"h","ḥ":"h","ḩ":"h","ḫ":"h","ẖ":"h","ħ":"h","ⱨ":"h","ⱶ":"h","ɥ":"h","ƕ":"hv","ⓘ":"i","i":"i","ì":"i","í":"i","î":"i","ĩ":"i","ī":"i","ĭ":"i","ï":"i","ḯ":"i","ỉ":"i","ǐ":"i","ȉ":"i","ȋ":"i","ị":"i","į":"i","ḭ":"i","ɨ":"i","ı":"i","ⓙ":"j","j":"j","ĵ":"j","ǰ":"j","ɉ":"j","ⓚ":"k","k":"k","ḱ":"k","ǩ":"k","ḳ":"k","ķ":"k","ḵ":"k","ƙ":"k","ⱪ":"k","ꝁ":"k","ꝃ":"k","ꝅ":"k","ꞣ":"k","ⓛ":"l","l":"l","ŀ":"l","ĺ":"l","ľ":"l","ḷ":"l","ḹ":"l","ļ":"l","ḽ":"l","ḻ":"l","ſ":"l","ł":"l","ƚ":"l","ɫ":"l","ⱡ":"l","ꝉ":"l","ꞁ":"l","ꝇ":"l","lj":"lj","ⓜ":"m","m":"m","ḿ":"m","ṁ":"m","ṃ":"m","ɱ":"m","ɯ":"m","ⓝ":"n","n":"n","ǹ":"n","ń":"n","ñ":"n","ṅ":"n","ň":"n","ṇ":"n","ņ":"n","ṋ":"n","ṉ":"n","ƞ":"n","ɲ":"n","ʼn":"n","ꞑ":"n","ꞥ":"n","nj":"nj","ⓞ":"o","o":"o","ò":"o","ó":"o","ô":"o","ồ":"o","ố":"o","ỗ":"o","ổ":"o","õ":"o","ṍ":"o","ȭ":"o","ṏ":"o","ō":"o","ṑ":"o","ṓ":"o","ŏ":"o","ȯ":"o","ȱ":"o","ö":"o","ȫ":"o","ỏ":"o","ő":"o","ǒ":"o","ȍ":"o","ȏ":"o","ơ":"o","ờ":"o","ớ":"o","ỡ":"o","ở":"o","ợ":"o","ọ":"o","ộ":"o","ǫ":"o","ǭ":"o","ø":"o","ǿ":"o","ɔ":"o","ꝋ":"o","ꝍ":"o","ɵ":"o","ƣ":"oi","ȣ":"ou","ꝏ":"oo","ⓟ":"p","p":"p","ṕ":"p","ṗ":"p","ƥ":"p","ᵽ":"p","ꝑ":"p","ꝓ":"p","ꝕ":"p","ⓠ":"q","q":"q","ɋ":"q","ꝗ":"q","ꝙ":"q","ⓡ":"r","r":"r","ŕ":"r","ṙ":"r","ř":"r","ȑ":"r","ȓ":"r","ṛ":"r","ṝ":"r","ŗ":"r","ṟ":"r","ɍ":"r","ɽ":"r","ꝛ":"r","ꞧ":"r","ꞃ":"r","ⓢ":"s","s":"s","ß":"s","ś":"s","ṥ":"s","ŝ":"s","ṡ":"s","š":"s","ṧ":"s","ṣ":"s","ṩ":"s","ș":"s","ş":"s","ȿ":"s","ꞩ":"s","ꞅ":"s","ẛ":"s","ⓣ":"t","t":"t","ṫ":"t","ẗ":"t","ť":"t","ṭ":"t","ț":"t","ţ":"t","ṱ":"t","ṯ":"t","ŧ":"t","ƭ":"t","ʈ":"t","ⱦ":"t","ꞇ":"t","ꜩ":"tz","ⓤ":"u","u":"u","ù":"u","ú":"u","û":"u","ũ":"u","ṹ":"u","ū":"u","ṻ":"u","ŭ":"u","ü":"u","ǜ":"u","ǘ":"u","ǖ":"u","ǚ":"u","ủ":"u","ů":"u","ű":"u","ǔ":"u","ȕ":"u","ȗ":"u","ư":"u","ừ":"u","ứ":"u","ữ":"u","ử":"u","ự":"u","ụ":"u","ṳ":"u","ų":"u","ṷ":"u","ṵ":"u","ʉ":"u","ⓥ":"v","v":"v","ṽ":"v","ṿ":"v","ʋ":"v","ꝟ":"v","ʌ":"v","ꝡ":"vy","ⓦ":"w","w":"w","ẁ":"w","ẃ":"w","ŵ":"w","ẇ":"w","ẅ":"w","ẘ":"w","ẉ":"w","ⱳ":"w","ⓧ":"x","x":"x","ẋ":"x","ẍ":"x","ⓨ":"y","y":"y","ỳ":"y","ý":"y","ŷ":"y","ỹ":"y","ȳ":"y","ẏ":"y","ÿ":"y","ỷ":"y","ẙ":"y","ỵ":"y","ƴ":"y","ɏ":"y","ỿ":"y","ⓩ":"z","z":"z","ź":"z","ẑ":"z","ż":"z","ž":"z","ẓ":"z","ẕ":"z","ƶ":"z","ȥ":"z","ɀ":"z","ⱬ":"z","ꝣ":"z","Ά":"Α","Έ":"Ε","Ή":"Η","Ί":"Ι","Ϊ":"Ι","Ό":"Ο","Ύ":"Υ","Ϋ":"Υ","Ώ":"Ω","ά":"α","έ":"ε","ή":"η","ί":"ι","ϊ":"ι","ΐ":"ι","ό":"ο","ύ":"υ","ϋ":"υ","ΰ":"υ","ω":"ω","ς":"σ"}}),b.define("select2/data/base",["../utils"],function(a){function b(a,c){b.__super__.constructor.call(this)}return a.Extend(b,a.Observable),b.prototype.current=function(a){throw new Error("The `current` method must be defined in child classes.")},b.prototype.query=function(a,b){throw new Error("The `query` method must be defined in child classes.")},b.prototype.bind=function(a,b){},b.prototype.destroy=function(){},b.prototype.generateResultId=function(b,c){var d="";return d+=null!=b?b.id:a.generateChars(4),d+="-result-",d+=a.generateChars(4),null!=c.id?d+="-"+c.id.toString():d+="-"+a.generateChars(4),d},b}),b.define("select2/data/select",["./base","../utils","jquery"],function(a,b,c){function d(a,b){this.$element=a,this.options=b,d.__super__.constructor.call(this)}return b.Extend(d,a),d.prototype.current=function(a){var b=[],d=this;this.$element.find(":selected").each(function(){var a=c(this),e=d.item(a);b.push(e)}),a(b)},d.prototype.select=function(a){var b=this;if(a.selected=!0,c(a.element).is("option"))return a.element.selected=!0,void this.$element.trigger("change");if(this.$element.prop("multiple"))this.current(function(d){var e=[];a=[a],a.push.apply(a,d);for(var f=0;f=0){var k=f.filter(d(j)),l=this.item(k),m=c.extend(!0,{},j,l),n=this.option(m);k.replaceWith(n)}else{var o=this.option(j);if(j.children){var p=this.convertToOptions(j.children);b.appendMany(o,p)}h.push(o)}}return h},d}),b.define("select2/data/ajax",["./array","../utils","jquery"],function(a,b,c){function d(a,b){this.ajaxOptions=this._applyDefaults(b.get("ajax")),null!=this.ajaxOptions.processResults&&(this.processResults=this.ajaxOptions.processResults),d.__super__.constructor.call(this,a,b)}return b.Extend(d,a),d.prototype._applyDefaults=function(a){var b={data:function(a){return c.extend({},a,{q:a.term})},transport:function(a,b,d){var e=c.ajax(a);return e.then(b),e.fail(d),e}};return c.extend({},b,a,!0)},d.prototype.processResults=function(a){return a},d.prototype.query=function(a,b){function d(){var d=f.transport(f,function(d){var f=e.processResults(d,a);e.options.get("debug")&&window.console&&console.error&&(f&&f.results&&c.isArray(f.results)||console.error("Select2: The AJAX results did not return an array in the `results` key of the response.")),b(f),e.container.focusOnActiveElement()},function(){d.status&&"0"===d.status||e.trigger("results:message",{message:"errorLoading"})});e._request=d}var e=this;null!=this._request&&(c.isFunction(this._request.abort)&&this._request.abort(),this._request=null);var f=c.extend({type:"GET"},this.ajaxOptions);"function"==typeof f.url&&(f.url=f.url.call(this.$element,a)),"function"==typeof f.data&&(f.data=f.data.call(this.$element,a)),this.ajaxOptions.delay&&null!=a.term?(this._queryTimeout&&window.clearTimeout(this._queryTimeout),this._queryTimeout=window.setTimeout(d,this.ajaxOptions.delay)):d()},d}),b.define("select2/data/tags",["jquery"],function(a){function b(b,c,d){var e=d.get("tags"),f=d.get("createTag");void 0!==f&&(this.createTag=f);var g=d.get("insertTag");if(void 0!==g&&(this.insertTag=g),b.call(this,c,d),a.isArray(e))for(var h=0;h0&&b.term.length>this.maximumInputLength)return void this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:b.term,params:b}});a.call(this,b,c)},a}),b.define("select2/data/maximumSelectionLength",[],function(){function a(a,b,c){this.maximumSelectionLength=c.get("maximumSelectionLength"),a.call(this,b,c)}return a.prototype.query=function(a,b,c){var d=this;this.current(function(e){var f=null!=e?e.length:0;if(d.maximumSelectionLength>0&&f>=d.maximumSelectionLength)return void d.trigger("results:message",{message:"maximumSelected",args:{maximum:d.maximumSelectionLength}});a.call(d,b,c)})},a}),b.define("select2/dropdown",["jquery","./utils"],function(a,b){function c(a,b){this.$element=a,this.options=b,c.__super__.constructor.call(this)}return b.Extend(c,b.Observable),c.prototype.render=function(){var b=a('');return b.attr("dir",this.options.get("dir")),this.$dropdown=b,b},c.prototype.bind=function(){},c.prototype.position=function(a,b){},c.prototype.destroy=function(){this.$dropdown.remove()},c}),b.define("select2/dropdown/search",["jquery","../utils"],function(a,b){function c(){}return c.prototype.render=function(b){var c=b.call(this),d=a('');return this.$searchContainer=d,this.$search=d.find("input"),c.prepend(d),c},c.prototype.bind=function(b,c,d){var e=this,f=c.id+"-results";b.call(this,c,d),this.$search.on("keydown",function(a){e.trigger("keypress",a),e._keyUpPrevented=a.isDefaultPrevented()}),this.$search.on("input",function(b){a(this).off("keyup")}),this.$search.on("keyup input",function(a){e.handleSearch(a)}),c.on("open",function(){e.$search.attr("tabindex",0),e.$search.attr("aria-owns",f),e.$search.focus(),window.setTimeout(function(){e.$search.focus()},0)}),c.on("close",function(){e.$search.attr("tabindex",-1),e.$search.removeAttr("aria-activedescendant"),e.$search.removeAttr("aria-owns"),e.$search.val("")}),c.on("focus",function(){c.isOpen()||e.$search.focus()}),c.on("results:all",function(a){if(null==a.query.term||""===a.query.term){e.showSearch(a)?e.$searchContainer.removeClass("select2-search--hide"):e.$searchContainer.addClass("select2-search--hide")}}),c.on("results:focus",function(a){e.$search.attr("aria-activedescendant",a.data._resultId)})},c.prototype.handleSearch=function(a){if(!this._keyUpPrevented){var b=this.$search.val();this.trigger("query",{term:b})}this._keyUpPrevented=!1},c.prototype.showSearch=function(a,b){return!0},c}),b.define("select2/dropdown/hidePlaceholder",[],function(){function a(a,b,c,d){this.placeholder=this.normalizePlaceholder(c.get("placeholder")),a.call(this,b,c,d)}return a.prototype.append=function(a,b){b.results=this.removePlaceholder(b.results),a.call(this,b)},a.prototype.normalizePlaceholder=function(a,b){return"string"==typeof b&&(b={id:"",text:b}),b},a.prototype.removePlaceholder=function(a,b){for(var c=b.slice(0),d=b.length-1;d>=0;d--){var e=b[d];this.placeholder.id===e.id&&c.splice(d,1)}return c},a}),b.define("select2/dropdown/infiniteScroll",["jquery"],function(a){function b(a,b,c,d){this.lastParams={},a.call(this,b,c,d),this.$loadingMore=this.createLoadingMore(),this.loading=!1}return b.prototype.append=function(a,b){this.$loadingMore.remove(),this.loading=!1,a.call(this,b),this.showLoadingMore(b)&&this.$results.append(this.$loadingMore)},b.prototype.bind=function(b,c,d){var e=this;b.call(this,c,d),c.on("query",function(a){e.lastParams=a,e.loading=!0}),c.on("query:append",function(a){e.lastParams=a,e.loading=!0}),this.$results.on("scroll",function(){var b=a.contains(document.documentElement,e.$loadingMore[0]);if(!e.loading&&b){e.$results.offset().top+e.$results.outerHeight(!1)+50>=e.$loadingMore.offset().top+e.$loadingMore.outerHeight(!1)&&e.loadMore()}})},b.prototype.loadMore=function(){this.loading=!0;var b=a.extend({},{page:1},this.lastParams);b.page++,this.trigger("query:append",b)},b.prototype.showLoadingMore=function(a,b){return b.pagination&&b.pagination.more},b.prototype.createLoadingMore=function(){var b=a('
    • '),c=this.options.get("translations").get("loadingMore");return b.html(c(this.lastParams)),b},b}),b.define("select2/dropdown/attachBody",["jquery","../utils"],function(a,b){function c(b,c,d){this.$dropdownParent=d.get("dropdownParent")||a(document.body),b.call(this,c,d)}return c.prototype.bind=function(a,b,c){var d=this,e=!1;a.call(this,b,c),b.on("open",function(){d._showDropdown(),d._attachPositioningHandler(b),e||(e=!0,b.on("results:all",function(){d._positionDropdown(),d._resizeDropdown()}),b.on("results:append",function(){d._positionDropdown(),d._resizeDropdown()}))}),b.on("close",function(){d._hideDropdown(),d._detachPositioningHandler(b)}),this.$dropdownContainer.on("mousedown",function(a){a.stopPropagation()})},c.prototype.destroy=function(a){a.call(this),this.$dropdownContainer.remove()},c.prototype.position=function(a,b,c){b.attr("class",c.attr("class")),b.removeClass("select2"),b.addClass("select2-container--open"),b.css({position:"absolute",top:-999999}),this.$container=c},c.prototype.render=function(b){var c=a(""),d=b.call(this);return c.append(d),this.$dropdownContainer=c,c},c.prototype._hideDropdown=function(a){this.$dropdownContainer.detach()},c.prototype._attachPositioningHandler=function(c,d){var e=this,f="scroll.select2."+d.id,g="resize.select2."+d.id,h="orientationchange.select2."+d.id,i=this.$container.parents().filter(b.hasScroll);i.each(function(){a(this).data("select2-scroll-position",{x:a(this).scrollLeft(),y:a(this).scrollTop()})}),i.on(f,function(b){var c=a(this).data("select2-scroll-position");a(this).scrollTop(c.y)}),a(window).on(f+" "+g+" "+h,function(a){e._positionDropdown(),e._resizeDropdown()})},c.prototype._detachPositioningHandler=function(c,d){var e="scroll.select2."+d.id,f="resize.select2."+d.id,g="orientationchange.select2."+d.id;this.$container.parents().filter(b.hasScroll).off(e),a(window).off(e+" "+f+" "+g)},c.prototype._positionDropdown=function(){var b=a(window),c=this.$dropdown.hasClass("select2-dropdown--above"),d=this.$dropdown.hasClass("select2-dropdown--below"),e=null,f=this.$container.offset();f.bottom=f.top+this.$container.outerHeight(!1);var g={height:this.$container.outerHeight(!1)};g.top=f.top,g.bottom=f.top+g.height;var h={height:this.$dropdown.outerHeight(!1)},i={top:b.scrollTop(),bottom:b.scrollTop()+b.height()},j=i.topf.bottom+h.height,l={left:f.left,top:g.bottom},m=this.$dropdownParent;"static"===m.css("position")&&(m=m.offsetParent());var n=m.offset();l.top-=n.top,l.left-=n.left,c||d||(e="below"),k||!j||c?!j&&k&&c&&(e="below"):e="above",("above"==e||c&&"below"!==e)&&(l.top=g.top-n.top-h.height),null!=e&&(this.$dropdown.removeClass("select2-dropdown--below select2-dropdown--above").addClass("select2-dropdown--"+e),this.$container.removeClass("select2-container--below select2-container--above").addClass("select2-container--"+e)),this.$dropdownContainer.css(l)},c.prototype._resizeDropdown=function(){var a={width:this.$container.outerWidth(!1)+"px"};this.options.get("dropdownAutoWidth")&&(a.minWidth=a.width,a.position="relative",a.width="auto"),this.$dropdown.css(a)},c.prototype._showDropdown=function(a){this.$dropdownContainer.appendTo(this.$dropdownParent),this._positionDropdown(),this._resizeDropdown()},c}),b.define("select2/dropdown/minimumResultsForSearch",[],function(){function a(b){for(var c=0,d=0;d0&&(l.dataAdapter=j.Decorate(l.dataAdapter,r)),l.maximumInputLength>0&&(l.dataAdapter=j.Decorate(l.dataAdapter,s)),l.maximumSelectionLength>0&&(l.dataAdapter=j.Decorate(l.dataAdapter,t)),l.tags&&(l.dataAdapter=j.Decorate(l.dataAdapter,p)),null==l.tokenSeparators&&null==l.tokenizer||(l.dataAdapter=j.Decorate(l.dataAdapter,q)),null!=l.query){var C=b(l.amdBase+"compat/query");l.dataAdapter=j.Decorate(l.dataAdapter,C)}if(null!=l.initSelection){var D=b(l.amdBase+"compat/initSelection");l.dataAdapter=j.Decorate(l.dataAdapter,D)}}if(null==l.resultsAdapter&&(l.resultsAdapter=c,null!=l.ajax&&(l.resultsAdapter=j.Decorate(l.resultsAdapter,x)),null!=l.placeholder&&(l.resultsAdapter=j.Decorate(l.resultsAdapter,w)),l.selectOnClose&&(l.resultsAdapter=j.Decorate(l.resultsAdapter,A))),null==l.dropdownAdapter){if(l.multiple)l.dropdownAdapter=u;else{var E=j.Decorate(u,v);l.dropdownAdapter=E}if(0!==l.minimumResultsForSearch&&(l.dropdownAdapter=j.Decorate(l.dropdownAdapter,z)),l.closeOnSelect&&(l.dropdownAdapter=j.Decorate(l.dropdownAdapter,B)),null!=l.dropdownCssClass||null!=l.dropdownCss||null!=l.adaptDropdownCssClass){var F=b(l.amdBase+"compat/dropdownCss");l.dropdownAdapter=j.Decorate(l.dropdownAdapter,F)}l.dropdownAdapter=j.Decorate(l.dropdownAdapter,y)}if(null==l.selectionAdapter){if(l.multiple?l.selectionAdapter=e:l.selectionAdapter=d,null!=l.placeholder&&(l.selectionAdapter=j.Decorate(l.selectionAdapter,f)),l.allowClear&&(l.selectionAdapter=j.Decorate(l.selectionAdapter,g)),l.multiple&&(l.selectionAdapter=j.Decorate(l.selectionAdapter,h)),null!=l.containerCssClass||null!=l.containerCss||null!=l.adaptContainerCssClass){var G=b(l.amdBase+"compat/containerCss");l.selectionAdapter=j.Decorate(l.selectionAdapter,G)}l.selectionAdapter=j.Decorate(l.selectionAdapter,i)}if("string"==typeof l.language)if(l.language.indexOf("-")>0){var H=l.language.split("-"),I=H[0];l.language=[l.language,I]}else l.language=[l.language];if(a.isArray(l.language)){var J=new k;l.language.push("en");for(var K=l.language,L=0;L0){for(var f=a.extend(!0,{},e),g=e.children.length-1;g>=0;g--){null==c(d,e.children[g])&&f.children.splice(g,1)}return f.children.length>0?f:c(d,f)}var h=b(e.text).toUpperCase(),i=b(d.term).toUpperCase();return h.indexOf(i)>-1?e:null}this.defaults={amdBase:"./",amdLanguageBase:"./i18n/",closeOnSelect:!0,debug:!1,dropdownAutoWidth:!1,escapeMarkup:j.escapeMarkup,language:C,matcher:c,minimumInputLength:0,maximumInputLength:0,maximumSelectionLength:0,minimumResultsForSearch:0,selectOnClose:!1,sorter:function(a){return a},templateResult:function(a){return a.text},templateSelection:function(a){return a.text},theme:"default",width:"resolve"}},D.prototype.set=function(b,c){var d=a.camelCase(b),e={};e[d]=c;var f=j._convertData(e);a.extend(this.defaults,f)},new D}),b.define("select2/options",["require","jquery","./defaults","./utils"],function(a,b,c,d){function e(b,e){if(this.options=b,null!=e&&this.fromElement(e),this.options=c.apply(this.options),e&&e.is("input")){var f=a(this.get("amdBase")+"compat/inputData");this.options.dataAdapter=d.Decorate(this.options.dataAdapter,f)}}return e.prototype.fromElement=function(a){var c=["select2"];null==this.options.multiple&&(this.options.multiple=a.prop("multiple")),null==this.options.disabled&&(this.options.disabled=a.prop("disabled")),null==this.options.language&&(a.prop("lang")?this.options.language=a.prop("lang").toLowerCase():a.closest("[lang]").prop("lang")&&(this.options.language=a.closest("[lang]").prop("lang"))),null==this.options.dir&&(a.prop("dir")?this.options.dir=a.prop("dir"):a.closest("[dir]").prop("dir")?this.options.dir=a.closest("[dir]").prop("dir"):this.options.dir="ltr"),a.prop("disabled",this.options.disabled),a.prop("multiple",this.options.multiple),a.data("select2Tags")&&(this.options.debug&&window.console&&console.warn&&console.warn('Select2: The `data-select2-tags` attribute has been changed to use the `data-data` and `data-tags="true"` attributes and will be removed in future versions of Select2.'),a.data("data",a.data("select2Tags")),a.data("tags",!0)),a.data("ajaxUrl")&&(this.options.debug&&window.console&&console.warn&&console.warn("Select2: The `data-ajax-url` attribute has been changed to `data-ajax--url` and support for the old attribute will be removed in future versions of Select2."),a.attr("ajax--url",a.data("ajaxUrl")),a.data("ajax--url",a.data("ajaxUrl")));var e={};e=b.fn.jquery&&"1."==b.fn.jquery.substr(0,2)&&a[0].dataset?b.extend(!0,{},a[0].dataset,a.data()):a.data();var f=b.extend(!0,{},e);f=d._convertData(f);for(var g in f)b.inArray(g,c)>-1||(b.isPlainObject(this.options[g])?b.extend(this.options[g],f[g]):this.options[g]=f[g]);return this},e.prototype.get=function(a){return this.options[a]},e.prototype.set=function(a,b){this.options[a]=b},e}),b.define("select2/core",["jquery","./options","./utils","./keys"],function(a,b,c,d){var e=function(a,c){null!=a.data("select2")&&a.data("select2").destroy(),this.$element=a,this.id=this._generateId(a),c=c||{},this.options=new b(c,a),e.__super__.constructor.call(this);var d=a.attr("tabindex")||0;a.data("old-tabindex",d),a.attr("tabindex","-1");var f=this.options.get("dataAdapter");this.dataAdapter=new f(a,this.options);var g=this.render();this._placeContainer(g);var h=this.options.get("selectionAdapter");this.selection=new h(a,this.options),this.$selection=this.selection.render(),this.selection.position(this.$selection,g);var i=this.options.get("dropdownAdapter");this.dropdown=new i(a,this.options),this.$dropdown=this.dropdown.render(),this.dropdown.position(this.$dropdown,g);var j=this.options.get("resultsAdapter");this.results=new j(a,this.options,this.dataAdapter),this.$results=this.results.render(),this.results.position(this.$results,this.$dropdown);var k=this;this._bindAdapters(),this._registerDomEvents(),this._registerDataEvents(),this._registerSelectionEvents(),this._registerDropdownEvents(),this._registerResultsEvents(),this._registerEvents(),this.dataAdapter.current(function(a){k.trigger("selection:update",{data:a})}),a.addClass("select2-hidden-accessible"),a.attr("aria-hidden","true"),this._syncAttributes(),a.data("select2",this)};return c.Extend(e,c.Observable),e.prototype._generateId=function(a){var b="";return b=null!=a.attr("id")?a.attr("id"):null!=a.attr("name")?a.attr("name")+"-"+c.generateChars(2):c.generateChars(4),b=b.replace(/(:|\.|\[|\]|,)/g,""),b="select2-"+b},e.prototype._placeContainer=function(a){a.insertAfter(this.$element);var b=this._resolveWidth(this.$element,this.options.get("width"));null!=b&&a.css("width",b)},e.prototype._resolveWidth=function(a,b){var c=/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;if("resolve"==b){var d=this._resolveWidth(a,"style");return null!=d?d:this._resolveWidth(a,"element")}if("element"==b){var e=a.outerWidth(!1);return e<=0?"auto":e+"px"}if("style"==b){var f=a.attr("style");if("string"!=typeof f)return null;for(var g=f.split(";"),h=0,i=g.length;h=1)return k[1]}return null}return b},e.prototype._bindAdapters=function(){this.dataAdapter.bind(this,this.$container),this.selection.bind(this,this.$container),this.dropdown.bind(this,this.$container),this.results.bind(this,this.$container)},e.prototype._registerDomEvents=function(){var b=this;this.$element.on("change.select2",function(){b.dataAdapter.current(function(a){b.trigger("selection:update",{data:a})})}),this.$element.on("focus.select2",function(a){b.trigger("focus",a)}),this._syncA=c.bind(this._syncAttributes,this),this._syncS=c.bind(this._syncSubtree,this),this.$element[0].attachEvent&&this.$element[0].attachEvent("onpropertychange",this._syncA);var d=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;null!=d?(this._observer=new d(function(c){a.each(c,b._syncA),a.each(c,b._syncS)}),this._observer.observe(this.$element[0],{attributes:!0,childList:!0,subtree:!1})):this.$element[0].addEventListener&&(this.$element[0].addEventListener("DOMAttrModified",b._syncA,!1),this.$element[0].addEventListener("DOMNodeInserted",b._syncS,!1),this.$element[0].addEventListener("DOMNodeRemoved",b._syncS,!1))},e.prototype._registerDataEvents=function(){var a=this;this.dataAdapter.on("*",function(b,c){a.trigger(b,c)})},e.prototype._registerSelectionEvents=function(){var b=this,c=["toggle","focus"];this.selection.on("toggle",function(){b.toggleDropdown()}),this.selection.on("focus",function(a){b.focus(a)}),this.selection.on("*",function(d,e){-1===a.inArray(d,c)&&b.trigger(d,e)})},e.prototype._registerDropdownEvents=function(){var a=this;this.dropdown.on("*",function(b,c){a.trigger(b,c)})},e.prototype._registerResultsEvents=function(){var a=this;this.results.on("*",function(b,c){a.trigger(b,c)})},e.prototype._registerEvents=function(){var b=this;this.on("open",function(){b.$container.addClass("select2-container--open")}),this.on("close",function(){b.$container.removeClass("select2-container--open")}),this.on("enable",function(){b.$container.removeClass("select2-container--disabled")}),this.on("disable",function(){b.$container.addClass("select2-container--disabled")}),this.on("blur",function(){b.$container.removeClass("select2-container--focus")}),this.on("query",function(a){b.isOpen()||b.trigger("open",{}),this.dataAdapter.query(a,function(c){b.trigger("results:all",{data:c,query:a})})}),this.on("query:append",function(a){this.dataAdapter.query(a,function(c){b.trigger("results:append",{data:c,query:a})})}),this.on("open",function(){setTimeout(function(){b.focusOnActiveElement()},1)}),a(document).on("keydown",function(a){var c=a.which;if(b.isOpen()){c===d.ESC||c===d.UP&&a.altKey?(b.close(),a.preventDefault()):c===d.ENTER||c===d.TAB?(b.trigger("results:select",{}),a.preventDefault()):c===d.SPACE&&a.ctrlKey?(b.trigger("results:toggle",{}),a.preventDefault()):c===d.UP?(b.trigger("results:previous",{}),a.preventDefault()):c===d.DOWN&&(b.trigger("results:next",{}),a.preventDefault());var e=b.$dropdown.find(".select2-search__field");e.length||(e=b.$container.find(".select2-search__field")),c===d.DOWN||c===d.UP?b.focusOnActiveElement():(e.focus(),setTimeout(function(){b.focusOnActiveElement()},1e3))}else b.hasFocus()&&(c!==d.ENTER&&c!==d.SPACE&&c!==d.DOWN||(b.open(),a.preventDefault()))})},e.prototype.focusOnActiveElement=function(){this.isOpen()&&!c.isTouchscreen()&&this.$results.find("li.select2-results__option--highlighted").focus()},e.prototype._syncAttributes=function(){this.options.set("disabled",this.$element.prop("disabled")),this.options.get("disabled")?(this.isOpen()&&this.close(),this.trigger("disable",{})):this.trigger("enable",{})},e.prototype._syncSubtree=function(a,b){var c=!1,d=this;if(!a||!a.target||"OPTION"===a.target.nodeName||"OPTGROUP"===a.target.nodeName){if(b)if(b.addedNodes&&b.addedNodes.length>0)for(var e=0;e0&&(c=!0);else c=!0;c&&this.dataAdapter.current(function(a){d.trigger("selection:update",{data:a})})}},e.prototype.trigger=function(a,b){var c=e.__super__.trigger,d={open:"opening",close:"closing",select:"selecting",unselect:"unselecting"};if(void 0===b&&(b={}),a in d){var f=d[a],g={prevented:!1,name:a,args:b};if(c.call(this,f,g),g.prevented)return void(b.prevented=!0)}c.call(this,a,b)},e.prototype.toggleDropdown=function(){this.options.get("disabled")||(this.isOpen()?this.close():this.open())},e.prototype.open=function(){this.isOpen()||this.trigger("query",{})},e.prototype.close=function(){this.isOpen()&&this.trigger("close",{})},e.prototype.isOpen=function(){return this.$container.hasClass("select2-container--open")},e.prototype.hasFocus=function(){return this.$container.hasClass("select2-container--focus")},e.prototype.focus=function(a){this.hasFocus()||(this.$container.addClass("select2-container--focus"),this.trigger("focus",{}))},e.prototype.enable=function(a){this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("enable")` method has been deprecated and will be removed in later Select2 versions. Use $element.prop("disabled") instead.'),null!=a&&0!==a.length||(a=[!0]);var b=!a[0];this.$element.prop("disabled",b)},e.prototype.data=function(){this.options.get("debug")&&arguments.length>0&&window.console&&console.warn&&console.warn('Select2: Data can no longer be set using `select2("data")`. You should consider setting the value instead using `$element.val()`.');var a=[];return this.dataAdapter.current(function(b){a=b}),a},e.prototype.val=function(b){if(this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("val")` method has been deprecated and will be removed in later Select2 versions. Use $element.val() instead.'),null==b||0===b.length)return this.$element.val();var c=b[0];a.isArray(c)&&(c=a.map(c,function(a){return a.toString()})),this.$element.val(c).trigger("change")},e.prototype.destroy=function(){this.$container.remove(),this.$element[0].detachEvent&&this.$element[0].detachEvent("onpropertychange",this._syncA),null!=this._observer?(this._observer.disconnect(),this._observer=null):this.$element[0].removeEventListener&&(this.$element[0].removeEventListener("DOMAttrModified",this._syncA,!1),this.$element[0].removeEventListener("DOMNodeInserted",this._syncS,!1),this.$element[0].removeEventListener("DOMNodeRemoved",this._syncS,!1)),this._syncA=null,this._syncS=null,this.$element.off(".select2"),this.$element.attr("tabindex",this.$element.data("old-tabindex")),this.$element.removeClass("select2-hidden-accessible"),this.$element.attr("aria-hidden","false"),this.$element.removeData("select2"),this.dataAdapter.destroy(),this.selection.destroy(),this.dropdown.destroy(),this.results.destroy(),this.dataAdapter=null,this.selection=null,this.dropdown=null,this.results=null},e.prototype.render=function(){var b=a('');return b.attr("dir",this.options.get("dir")),this.$container=b,this.$container.addClass("select2-container--"+this.options.get("theme")),b.data("element",this.$element),b},e}),b.define("jquery-mousewheel",["jquery"],function(a){return a}),b.define("jquery.select2",["jquery","jquery-mousewheel","./select2/core","./select2/defaults"],function(a,b,c,d){if(null==a.fn.selectWoo){var e=["open","close","destroy"];a.fn.selectWoo=function(b){if("object"==typeof(b=b||{}))return this.each(function(){var d=a.extend(!0,{},b);new c(a(this),d)}),this;if("string"==typeof b){var d,f=Array.prototype.slice.call(arguments,1);return this.each(function(){var c=a(this).data("select2");null==c&&window.console&&console.error&&console.error("The select2('"+b+"') method was called on an element that is not using Select2."),d=c[b].apply(c,f)}),a.inArray(b,e)>-1?this:d}throw new Error("Invalid arguments for Select2: "+b)}}return null!=a.fn.select2&&null!=a.fn.select2.defaults&&(a.fn.selectWoo.defaults=a.fn.select2.defaults),null==a.fn.selectWoo.defaults&&(a.fn.selectWoo.defaults=d),a.fn.select2=a.fn.select2||a.fn.selectWoo,c}),{define:b.define,require:b.require}}(),c=b.require("jquery.select2");return a.fn.select2.amd=b,a.fn.selectWoo.amd=b,c}); \ No newline at end of file diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/library/customizer/controls/js/slider-customizer.js b/wp-content/upgrade-temp-backup/plugins/gp-premium/library/customizer/controls/js/slider-customizer.js deleted file mode 100644 index d517ffc9..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/library/customizer/controls/js/slider-customizer.js +++ /dev/null @@ -1,137 +0,0 @@ -wp.customize.controlConstructor[ 'generatepress-pro-range-slider' ] = wp.customize.Control.extend( { - ready() { - 'use strict'; - - var control = this, - value, - controlClass = '.customize-control-generatepress-pro-range-slider', - footerActions = jQuery( '#customize-footer-actions' ); - - // Set up the sliders - jQuery( '.generatepress-slider' ).each( function() { - var _this = jQuery( this ); - var _input = _this.closest( 'label' ).find( 'input[type="number"]' ); - var _text = _input.next( '.value' ); - - _this.slider( { - value: _input.val(), - min: _this.data( 'min' ), - max: _this.data( 'max' ), - step: _this.data( 'step' ), - slide( event, ui ) { - _input.val( ui.value ).change(); - _text.text( ui.value ); - }, - } ); - } ); - - // Update the range value based on the input value - jQuery( controlClass + ' .gp_range_value input[type=number]' ).on( 'input', function() { - value = jQuery( this ).attr( 'value' ); - - if ( '' == value ) { - value = -1; - } - - jQuery( this ).closest( 'label' ).find( '.generatepress-slider' ).slider( 'value', parseFloat( value ) ).change(); - } ); - - // Handle the reset button - jQuery( controlClass + ' .generatepress-reset' ).on( 'click', function() { - var icon = jQuery( this ), - visibleArea = icon.closest( '.gp-range-title-area' ).next( '.gp-range-slider-areas' ).children( 'label:visible' ), - input = visibleArea.find( 'input[type=number]' ), - sliderValue = visibleArea.find( '.generatepress-slider' ), - visualValue = visibleArea.find( '.gp_range_value' ), - resetValue = input.attr( 'data-reset_value' ); - - input.val( resetValue ).change(); - visualValue.find( 'input' ).val( resetValue ); - visualValue.find( '.value' ).text( resetValue ); - - if ( '' == resetValue ) { - resetValue = -1; - } - - sliderValue.slider( 'value', parseFloat( resetValue ) ); - } ); - - // Figure out which device icon to make active on load - jQuery( controlClass + ' .generatepress-range-slider-control' ).each( function() { - var _this = jQuery( this ); - - _this.find( '.gp-device-controls' ).children( 'span:first-child' ).addClass( 'selected' ); - _this.find( '.range-option-area:first-child' ).show(); - } ); - - // Do stuff when device icons are clicked - jQuery( controlClass + ' .gp-device-controls > span' ).on( 'click', function( event ) { - var device = jQuery( this ).data( 'option' ); - - jQuery( controlClass + ' .gp-device-controls span' ).each( function() { - var _this = jQuery( this ); - - if ( device === _this.attr( 'data-option' ) ) { - _this.addClass( 'selected' ); - _this.siblings().removeClass( 'selected' ); - } - } ); - - jQuery( controlClass + ' .gp-range-slider-areas label' ).each( function() { - var _this = jQuery( this ); - - if ( device === _this.attr( 'data-option' ) ) { - _this.show(); - _this.siblings().hide(); - } - } ); - - // Set the device we're currently viewing - wp.customize.previewedDevice.set( jQuery( event.currentTarget ).data( 'option' ) ); - } ); - - // Set the selected devices in our control when the Customizer devices are clicked - footerActions.find( '.devices button' ).on( 'click', function() { - var device = jQuery( this ).data( 'device' ); - - jQuery( controlClass + ' .gp-device-controls span' ).each( function() { - var _this = jQuery( this ); - - if ( device === _this.attr( 'data-option' ) ) { - _this.addClass( 'selected' ); - _this.siblings().removeClass( 'selected' ); - } - } ); - - jQuery( controlClass + ' .gp-range-slider-areas label' ).each( function() { - var _this = jQuery( this ); - - if ( device === _this.attr( 'data-option' ) ) { - _this.show(); - _this.siblings().hide(); - } - } ); - } ); - - // Apply changes when desktop slider is changed - control.container.on( 'input change', '.desktop-range', - function() { - control.settings.desktop.set( jQuery( this ).val() ); - } - ); - - // Apply changes when tablet slider is changed - control.container.on( 'input change', '.tablet-range', - function() { - control.settings.tablet.set( jQuery( this ).val() ); - } - ); - - // Apply changes when mobile slider is changed - control.container.on( 'input change', '.mobile-range', - function() { - control.settings.mobile.set( jQuery( this ).val() ); - } - ); - }, -} ); diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/library/customizer/controls/js/spacing-customizer.js b/wp-content/upgrade-temp-backup/plugins/gp-premium/library/customizer/controls/js/spacing-customizer.js deleted file mode 100644 index 35c205d4..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/library/customizer/controls/js/spacing-customizer.js +++ /dev/null @@ -1,203 +0,0 @@ -( function( $, api ) { - // No longer needed as of 1.2.95 - // Keeping it here just in case - api.controlConstructor.spacing = api.Control.extend( { - ready() { - var control = this; - $( '.generate-number-control', control.container ).on( 'change keyup', - function() { - control.setting.set( $( this ).val() ); - } - ); - }, - } ); - - api.controlConstructor[ 'gp-spacing-slider' ] = api.Control.extend( { - ready() { - var control = this; - $( '.slider-input', control.container ).on( 'change keyup', - function() { - control.setting.set( $( this ).val() ); - } - ); - }, - } ); - - api.controlConstructor[ 'generatepress-spacing' ] = api.Control.extend( { - ready() { - var control = this, - controlClass = '.customize-control-generatepress-spacing', - footerActions = jQuery( '#customize-footer-actions' ); - - // Figure out which device icon to make active on load - jQuery( controlClass + ' .gp-spacing-control-section' ).each( function() { - var _this = jQuery( this ); - _this.find( '.gp-device-controls' ).children( 'span:first-child' ).addClass( 'selected' ); - _this.find( '.spacing-values-area:first-child' ).show(); - } ); - - // Do stuff when device icons are clicked - jQuery( controlClass + ' .gp-device-controls > span' ).on( 'click', function( event ) { - var device = jQuery( this ).data( 'option' ); - - jQuery( controlClass + ' .gp-device-controls span' ).each( function() { - var _this = jQuery( this ); - - if ( device === _this.attr( 'data-option' ) ) { - _this.addClass( 'selected' ); - _this.siblings().removeClass( 'selected' ); - } - } ); - - jQuery( controlClass + ' .spacing-values-container .spacing-values-area' ).each( function() { - var _this = jQuery( this ); - - if ( device === _this.attr( 'data-option' ) ) { - _this.show(); - _this.siblings().hide(); - } - } ); - - // Set the device we're currently viewing - wp.customize.previewedDevice.set( jQuery( event.currentTarget ).data( 'option' ) ); - } ); - - // Set the selected devices in our control when the Customizer devices are clicked - footerActions.find( '.devices button' ).on( 'click', function() { - var device = jQuery( this ).data( 'device' ); - jQuery( controlClass + ' .gp-device-controls span' ).each( function() { - var _this = jQuery( this ); - - if ( device === _this.attr( 'data-option' ) ) { - _this.addClass( 'selected' ); - _this.siblings().removeClass( 'selected' ); - } - } ); - - jQuery( controlClass + ' .spacing-values-container .spacing-values-area' ).each( function() { - var _this = jQuery( this ); - - if ( device === _this.attr( 'data-option' ) ) { - _this.show(); - _this.siblings().hide(); - } - } ); - } ); - - control.container.on( 'change keyup', '.spacing-top', - function() { - control.settings.desktop_top.set( jQuery( this ).val() ); - } - ); - - control.container.on( 'change keyup', '.spacing-right', - function() { - control.settings.desktop_right.set( jQuery( this ).val() ); - } - ); - - control.container.on( 'change keyup', '.spacing-bottom', - function() { - control.settings.desktop_bottom.set( jQuery( this ).val() ); - } - ); - - control.container.on( 'change keyup', '.spacing-left', - function() { - control.settings.desktop_left.set( jQuery( this ).val() ); - } - ); - - control.container.on( 'change keyup', '.tablet-spacing-top', - function() { - control.settings.tablet_top.set( jQuery( this ).val() ); - } - ); - - control.container.on( 'change keyup', '.tablet-spacing-right', - function() { - control.settings.tablet_right.set( jQuery( this ).val() ); - } - ); - - control.container.on( 'change keyup', '.tablet-spacing-bottom', - function() { - control.settings.tablet_bottom.set( jQuery( this ).val() ); - } - ); - - control.container.on( 'change keyup', '.tablet-spacing-left', - function() { - control.settings.tablet_left.set( jQuery( this ).val() ); - } - ); - - control.container.on( 'change keyup', '.mobile-spacing-top', - function() { - control.settings.mobile_top.set( jQuery( this ).val() ); - } - ); - - control.container.on( 'change keyup', '.mobile-spacing-right', - function() { - control.settings.mobile_right.set( jQuery( this ).val() ); - } - ); - - control.container.on( 'change keyup', '.mobile-spacing-bottom', - function() { - control.settings.mobile_bottom.set( jQuery( this ).val() ); - } - ); - - control.container.on( 'change keyup', '.mobile-spacing-left', - function() { - control.settings.mobile_left.set( jQuery( this ).val() ); - } - ); - }, - } ); -}( jQuery, wp.customize ) ); - -jQuery( function( $ ) { - $( '.gp-link-spacing' ).on( 'click', function( e ) { - e.preventDefault(); - - // Set up variables - var _this = $( this ), - element = _this.data( 'element' ); - - // Add our linked-values class to the next 4 elements - _this.parent( '.gp-spacing-section' ).prevAll().slice( 0, 4 ).find( 'input' ).addClass( 'linked-values' ).attr( 'data-element', element ); - - // Change our link icon class - _this.hide(); - _this.next( 'span' ).show(); - } ); - - $( '.gp-unlink-spacing' ).on( 'click', function( e ) { - e.preventDefault(); - - // Set up variables - var _this = $( this ); - - // Remove our linked-values class to the next 4 elements - _this.parent( '.gp-spacing-section' ).prevAll().slice( 0, 4 ).find( 'input' ).removeClass( 'linked-values' ).attr( 'data-element', '' ); - - // Change our link icon class - _this.hide(); - _this.prev( 'span' ).show(); - } ); - - $( '.gp-spacing-section' ).on( 'input', '.linked-values', function() { - var _this = $( this ), - data = _this.attr( 'data-element' ), - val = _this.val(), - targetElements = _this.closest( '.spacing-values-area' ).find( '.linked-values[ data-element="' + data + '" ]' ); - - targetElements.each( function() { - var element = $( this ); - element.val( val ).change(); - } ); - } ); -} ); diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/library/customizer/controls/js/typography-customizer.js b/wp-content/upgrade-temp-backup/plugins/gp-premium/library/customizer/controls/js/typography-customizer.js deleted file mode 100644 index 1d8b2b3c..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/library/customizer/controls/js/typography-customizer.js +++ /dev/null @@ -1,148 +0,0 @@ -( function( api ) { - api.controlConstructor[ 'gp-pro-customizer-typography' ] = api.Control.extend( { - ready() { - var control = this; - - control.container.on( 'change', '.generatepress-font-family select', - function() { - var _this = jQuery( this ), - _value = _this.val(), - _categoryID = _this.attr( 'data-category' ), - _variantsID = _this.attr( 'data-variants' ); - - // Set our font family - control.settings.family.set( _this.val() ); - - // Bail if our controls don't exist - if ( 'undefined' === typeof control.settings.category || 'undefined' === typeof control.settings.variant ) { - return; - } - - setTimeout( function() { - // Send our request to the generate_get_all_google_fonts_ajax function - var response = jQuery.getJSON( { - type: 'POST', - url: ajaxurl, - data: { - action: 'generate_get_all_google_fonts_ajax', - gp_customize_nonce: gp_customize.nonce, - }, - async: false, - dataType: 'json', - } ); - - // Get our response - var fonts = response.responseJSON; - - // Create an ID from our selected font - var id = _value.split( ' ' ).join( '_' ).toLowerCase(); - - // Set our values if we have them - if ( id in fonts ) { - // Get existing variants if this font is already selected - var got_variants = false; - jQuery( '.generatepress-font-family select' ).not( _this ).each( function( key, select ) { - var parent = jQuery( this ).closest( '.generatepress-font-family' ); - - if ( _value == jQuery( select ).val() && _this.data( 'category' ) !== jQuery( select ).data( 'category' ) ) { - if ( ! got_variants ) { - updated_variants = jQuery( parent.next( '.generatepress-font-variant' ).find( 'select' ) ).val(); - got_variants = true; - } - } - } ); - - // We're using a Google font, so show the variants field - _this.closest( '.generatepress-font-family' ).next( 'div' ).show(); - - // Remove existing variants - jQuery( 'select[name="' + _variantsID + '"]' ).find( 'option' ).remove(); - - // Populate our select input with available variants - jQuery.each( fonts[ id ].variants, function( key, value ) { - jQuery( 'select[name="' + _variantsID + '"]' ).append( jQuery( '' ).attr( 'value', value ).text( value ) ); - } ); - - // Set our variants - if ( ! got_variants ) { - control.settings.variant.set( fonts[ id ].variants ); - } else { - control.settings.variant.set( updated_variants ); - } - - // Set our font category - control.settings.category.set( fonts[ id ].category ); - jQuery( 'input[name="' + _categoryID + '"' ).val( fonts[ id ].category ); - } else { - _this.closest( '.generatepress-font-family' ).next( 'div' ).hide(); - control.settings.category.set( '' ); - control.settings.variant.set( '' ); - jQuery( 'input[name="' + _categoryID + '"' ).val( '' ); - jQuery( 'select[name="' + _variantsID + '"]' ).find( 'option' ).remove(); - } - }, 25 ); - } - ); - - control.container.on( 'change', '.generatepress-font-variant select', - function() { - var _this = jQuery( this ); - var variants = _this.val(); - - control.settings.variant.set( variants ); - - jQuery( '.generatepress-font-variant select' ).each( function( key, value ) { - var this_control = jQuery( this ).closest( 'li' ).attr( 'id' ).replace( 'customize-control-', '' ); - var parent = jQuery( this ).closest( '.generatepress-font-variant' ); - var font_val = api.control( this_control ).settings.family.get(); - - if ( font_val == control.settings.family.get() && _this.attr( 'name' ) !== jQuery( value ).attr( 'name' ) ) { - jQuery( parent.find( 'select' ) ).not( _this ).val( variants ).triggerHandler( 'change' ); - api.control( this_control ).settings.variant.set( variants ); - } - } ); - } - ); - - control.container.on( 'change', '.generatepress-font-category input', - function() { - control.settings.category.set( jQuery( this ).val() ); - } - ); - - control.container.on( 'change', '.generatepress-font-weight select', - function() { - control.settings.weight.set( jQuery( this ).val() ); - } - ); - - control.container.on( 'change', '.generatepress-font-transform select', - function() { - control.settings.transform.set( jQuery( this ).val() ); - } - ); - }, - } ); -}( wp.customize ) ); - -jQuery( document ).ready( function( $ ) { - jQuery( '.generatepress-font-family select' ).selectWoo(); - jQuery( '.generatepress-font-variant' ).each( function( key, value ) { - var _this = $( this ); - value = _this.data( 'saved-value' ); - - if ( value ) { - value = value.toString().split( ',' ); - } - - _this.find( 'select' ).selectWoo().val( value ).trigger( 'change.select2' ); - } ); - - $( '.generatepress-font-family' ).each( function( key, value ) { - var _this = $( this ); - - if ( $.inArray( _this.find( 'select' ).val(), typography_defaults ) !== -1 ) { - _this.next( '.generatepress-font-variant' ).hide(); - } - } ); -} ); diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/library/customizer/deprecated.php b/wp-content/upgrade-temp-backup/plugins/gp-premium/library/customizer/deprecated.php deleted file mode 100644 index 00dd2f9e..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/library/customizer/deprecated.php +++ /dev/null @@ -1,324 +0,0 @@ -manager->get_control( $setting->id )->choices; - - // If the input is a valid key, return it; - // otherwise, return the default - return ( array_key_exists( $input, $choices ) ? $input : $setting->default ); -} -endif; - -if ( ! function_exists( 'generate_backgrounds_is_top_bar_active' ) ) : -/** - * Check to see if the top bar is active - * - * @since 1.3.45 - */ -function generate_backgrounds_is_top_bar_active() -{ - $top_bar = is_active_sidebar( 'top-bar' ) ? true : false; - return apply_filters( 'generate_is_top_bar_active', $top_bar ); -} -endif; - -if ( ! function_exists( 'generate_blog_sanitize_choices' ) ) : -/** - * Sanitize choices - */ -function generate_blog_sanitize_choices( $input, $setting ) { - - // Ensure input is a slug - $input = sanitize_key( $input ); - - // Get list of choices from the control - // associated with the setting - $choices = $setting->manager->get_control( $setting->id )->choices; - - // If the input is a valid key, return it; - // otherwise, return the default - return ( array_key_exists( $input, $choices ) ? $input : $setting->default ); -} -endif; - -if ( ! function_exists( 'generate_blog_is_posts_page' ) ) : -/** - * Check to see if we're on a posts page - */ -function generate_blog_is_posts_page() -{ - $blog = ( is_home() || is_archive() || is_attachment() || is_tax() ) ? true : false; - - return $blog; -} -endif; - -if ( ! function_exists( 'generate_blog_is_posts_page_single' ) ) : -/** - * Check to see if we're on a posts page or a single post - */ -function generate_blog_is_posts_page_single() -{ - $blog = ( is_home() || is_archive() || is_attachment() || is_tax() || is_single() ) ? true : false; - - return $blog; -} -endif; - -if ( ! function_exists( 'generate_blog_is_excerpt' ) ) : -/** - * Check to see if we're displaying excerpts - */ -function generate_blog_is_excerpt() -{ - if ( ! function_exists( 'generate_get_defaults' ) ) - return; - - $generate_settings = wp_parse_args( - get_option( 'generate_settings', array() ), - generate_get_defaults() - ); - - return ( 'excerpt' == $generate_settings['post_content'] ) ? true : false; -} -endif; - -if ( ! function_exists( 'generate_colors_sanitize_hex_color' ) ) : -/** - * Sanitize hex colors - * We don't use the core function as we want to allow empty values - * @since 0.1 - */ -function generate_colors_sanitize_hex_color( $color ) { - if ( '' === $color ) - return ''; - - // 3 or 6 hex digits, or the empty string. - if ( preg_match('|^#([A-Fa-f0-9]{3}){1,2}$|', $color ) ) - return $color; - - return ''; -} -endif; - -if ( ! function_exists( 'generate_colors_sanitize_rgba' ) ) : -/** - * Sanitize RGBA colors - * @since 1.3.42 - */ -function generate_colors_sanitize_rgba( $color ) { - if ( '' === $color ) - return ''; - - // If string does not start with 'rgba', then treat as hex - // sanitize the hex color and finally convert hex to rgba - if ( false === strpos( $color, 'rgba' ) ) { - return generate_colors_sanitize_hex_color( $color ); - } - - // By now we know the string is formatted as an rgba color so we need to further sanitize it. - $color = str_replace( ' ', '', $color ); - sscanf( $color, 'rgba(%d,%d,%d,%f)', $red, $green, $blue, $alpha ); - return 'rgba('.$red.','.$green.','.$blue.','.$alpha.')'; - - return ''; -} -endif; - -if ( ! function_exists( 'generate_menu_plus_sanitize_choices' ) ) : -/** - * Sanitize choices - */ -function generate_menu_plus_sanitize_choices( $input, $setting ) { - - // Ensure input is a slug - $input = sanitize_key( $input ); - - // Get list of choices from the control - // associated with the setting - $choices = $setting->manager->get_control( $setting->id )->choices; - - // If the input is a valid key, return it; - // otherwise, return the default - return ( array_key_exists( $input, $choices ) ? $input : $setting->default ); -} -endif; - -if ( ! function_exists( 'generate_page_header_is_posts_page' ) ) : -/** - * This is an active_callback - * Check if we're on a posts page - */ -function generate_page_header_is_posts_page() -{ - $blog = ( is_home() || is_archive() || is_attachment() || is_tax() ) ? true : false; - - return $blog; -} -endif; - -if ( ! function_exists( 'generate_page_header_is_posts_page_single' ) ) : -/** - * Check to see if we're on a posts page or a single post - */ -function generate_page_header_is_posts_page_single() -{ - $blog = ( is_home() || is_archive() || is_attachment() || is_tax() || is_single() ) ? true : false; - - return $blog; -} -endif; - -if ( ! function_exists( 'generate_secondary_nav_sanitize_choices' ) ) : -/** - * Sanitize choices - */ -function generate_secondary_nav_sanitize_choices( $input, $setting ) { - - // Ensure input is a slug - $input = sanitize_key( $input ); - - // Get list of choices from the control - // associated with the setting - $choices = $setting->manager->get_control( $setting->id )->choices; - - // If the input is a valid key, return it; - // otherwise, return the default - return ( array_key_exists( $input, $choices ) ? $input : $setting->default ); -} -endif; - -if ( ! function_exists( 'generate_spacing_sanitize_choices' ) ) : -/** - * Sanitize choices - */ -function generate_spacing_sanitize_choices( $input, $setting ) { - - // Ensure input is a slug - $input = sanitize_key( $input ); - - // Get list of choices from the control - // associated with the setting - $choices = $setting->manager->get_control( $setting->id )->choices; - - // If the input is a valid key, return it; - // otherwise, return the default - return ( array_key_exists( $input, $choices ) ? $input : $setting->default ); -} -endif; - -if ( ! function_exists( 'generate_premium_sanitize_typography' ) ) : -/** - * Sanitize typography dropdown - * @since 1.1.10 - * @deprecated 1.2.95 - */ -function generate_premium_sanitize_typography( $input ) -{ - if ( ! function_exists( 'generate_get_all_google_fonts' ) || ! function_exists( 'generate_typography_default_fonts' ) ) { - return 'Open Sans'; - } - - // Grab all of our fonts - $fonts = generate_get_all_google_fonts(); - - // Loop through all of them and grab their names - $font_names = array(); - foreach ( $fonts as $k => $fam ) { - $font_names[] = $fam['name']; - } - - // Get all non-Google font names - $not_google = generate_typography_default_fonts(); - - // Merge them both into one array - $valid = array_merge( $font_names, $not_google ); - - // Sanitize - if ( in_array( $input, $valid ) ) { - return $input; - } else { - return 'Open Sans'; - } -} -endif; - -if ( ! function_exists( 'generate_typography_sanitize_choices' ) ) : -/** - * Sanitize choices - * @since 1.3.24 - */ -function generate_typography_sanitize_choices( $input, $setting ) { - - // Ensure input is a slug - $input = sanitize_key( $input ); - - // Get list of choices from the control - // associated with the setting - $choices = $setting->manager->get_control( $setting->id )->choices; - - // If the input is a valid key, return it; - // otherwise, return the default - return ( array_key_exists( $input, $choices ) ? $input : $setting->default ); -} -endif; - -if ( ! function_exists( 'generate_page_header_sanitize_choices' ) ) : -/** - * Sanitize our select inputs - */ -function generate_page_header_sanitize_choices( $input, $setting ) { - - // Ensure input is a slug - $input = sanitize_key( $input ); - - // Get list of choices from the control - // associated with the setting - $choices = $setting->manager->get_control( $setting->id )->choices; - - // If the input is a valid key, return it; - // otherwise, return the default - return ( array_key_exists( $input, $choices ) ? $input : $setting->default ); -} -endif; - -if ( ! function_exists( 'generate_page_header_sanitize_hex_color' ) ) : -/** - * Sanitize colors - * We don't use the core function as we want to allow empty values - */ -function generate_page_header_sanitize_hex_color( $color ) { - if ( '' === $color ) - return ''; - - // 3 or 6 hex digits, or the empty string. - if ( preg_match('|^#([A-Fa-f0-9]{3}){1,2}$|', $color ) ) - return $color; - - return ''; -} -endif; - -if ( ! function_exists( 'generate_page_header_sanitize_html' ) ) : -/** - * Sanitize our fields that accept HTML - */ -function generate_page_header_sanitize_html( $input ) -{ - return wp_kses_post( $input ); -} -endif; \ No newline at end of file diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/library/customizer/sanitize.php b/wp-content/upgrade-temp-backup/plugins/gp-premium/library/customizer/sanitize.php deleted file mode 100644 index a0cb7efc..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/library/customizer/sanitize.php +++ /dev/null @@ -1,131 +0,0 @@ -manager->get_control( $setting->id )->choices; - - // If the input is a valid key, return it; - // otherwise, return the default - return ( array_key_exists( $input, $choices ) ? $input : $setting->default ); - } -} - -if ( ! function_exists( 'generate_premium_sanitize_checkbox' ) ) { - /** - * Sanitize checkbox - */ - function generate_premium_sanitize_checkbox( $checked ) { - // Boolean check. - return ( ( isset( $checked ) && true == $checked ) ? true : false ); - } -} - -if ( ! function_exists( 'generate_premium_sanitize_hex_color' ) ) { - /** - * Sanitize hex colors - * We don't use the core function as we want to allow empty values - * - * @since 0.1 - */ - function generate_premium_sanitize_hex_color( $color ) { - if ( '' === $color ) { - return ''; - } - - // 3 or 6 hex digits, or the empty string. - if ( preg_match('|^#([A-Fa-f0-9]{3}){1,2}$|', $color ) ) { - return $color; - } - - return ''; - } -} - -if ( ! function_exists( 'generate_premium_sanitize_rgba' ) ) { - /** - * Sanitize RGBA colors - * - * @since 1.3.42 - */ - function generate_premium_sanitize_rgba( $color ) { - if ( '' === $color ) { - return ''; - } - - // If string does not start with 'rgba', then treat as hex - // sanitize the hex color and finally convert hex to rgba - if ( false === strpos( $color, 'rgba' ) ) { - return generate_premium_sanitize_hex_color( $color ); - } - - // By now we know the string is formatted as an rgba color so we need to further sanitize it. - $color = str_replace( ' ', '', $color ); - sscanf( $color, 'rgba(%d,%d,%d,%f)', $red, $green, $blue, $alpha ); - return 'rgba('.$red.','.$green.','.$blue.','.$alpha.')'; - - return ''; - } -} - -if ( ! function_exists( 'generate_premium_sanitize_decimal_integer' ) ) { - /** - * Sanitize integers that can use decimals - * - * @since 1.3.41 - */ - function generate_premium_sanitize_decimal_integer( $input ) { - return abs( floatval( $input ) ); - } -} - -/** - * Sanitize integers that can use decimals - * @since 1.4 - */ -function generate_premium_sanitize_decimal_integer_empty( $input ) { - if ( '' == $input ) { - return ''; - } - - return abs( floatval( $input ) ); -} - -if ( ! function_exists( 'generate_premium_sanitize_html' ) ) { - /** - * Sanitize our fields that accept HTML - */ - function generate_premium_sanitize_html( $input ) { - return wp_kses_post( $input ); - } -} - -function generate_premium_sanitize_variants( $input ) { - if ( is_array( $input ) ) { - $input = implode( ',', $input ); - } - - return sanitize_text_field( $input ); -} diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/library/select2/select2.full.min.js b/wp-content/upgrade-temp-backup/plugins/gp-premium/library/select2/select2.full.min.js deleted file mode 100644 index fa781916..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/library/select2/select2.full.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ -!function(n){"function"==typeof define&&define.amd?define(["jquery"],n):"object"==typeof module&&module.exports?module.exports=function(e,t){return void 0===t&&(t="undefined"!=typeof window?require("jquery"):require("jquery")(e)),n(t),t}:n(jQuery)}(function(d){var e=function(){if(d&&d.fn&&d.fn.select2&&d.fn.select2.amd)var e=d.fn.select2.amd;var t,n,i,h,o,s,f,g,m,v,y,_,r,a,w,l;function b(e,t){return r.call(e,t)}function c(e,t){var n,i,r,o,s,a,l,c,u,d,p,h=t&&t.split("/"),f=y.map,g=f&&f["*"]||{};if(e){for(s=(e=e.split("/")).length-1,y.nodeIdCompat&&w.test(e[s])&&(e[s]=e[s].replace(w,"")),"."===e[0].charAt(0)&&h&&(e=h.slice(0,h.length-1).concat(e)),u=0;u":">",'"':""","'":"'","/":"/"};return"string"!=typeof e?e:String(e).replace(/[&<>"'\/\\]/g,function(e){return t[e]})},r.appendMany=function(e,t){if("1.7"===o.fn.jquery.substr(0,3)){var n=o();o.map(t,function(e){n=n.add(e)}),t=n}e.append(t)},r.__cache={};var n=0;return r.GetUniqueElementId=function(e){var t=e.getAttribute("data-select2-id");return null==t&&(e.id?(t=e.id,e.setAttribute("data-select2-id",t)):(e.setAttribute("data-select2-id",++n),t=n.toString())),t},r.StoreData=function(e,t,n){var i=r.GetUniqueElementId(e);r.__cache[i]||(r.__cache[i]={}),r.__cache[i][t]=n},r.GetData=function(e,t){var n=r.GetUniqueElementId(e);return t?r.__cache[n]&&null!=r.__cache[n][t]?r.__cache[n][t]:o(e).data(t):r.__cache[n]},r.RemoveData=function(e){var t=r.GetUniqueElementId(e);null!=r.__cache[t]&&delete r.__cache[t],e.removeAttribute("data-select2-id")},r}),e.define("select2/results",["jquery","./utils"],function(h,f){function i(e,t,n){this.$element=e,this.data=n,this.options=t,i.__super__.constructor.call(this)}return f.Extend(i,f.Observable),i.prototype.render=function(){var e=h('
        ');return this.options.get("multiple")&&e.attr("aria-multiselectable","true"),this.$results=e},i.prototype.clear=function(){this.$results.empty()},i.prototype.displayMessage=function(e){var t=this.options.get("escapeMarkup");this.clear(),this.hideLoading();var n=h(''),i=this.options.get("translations").get(e.message);n.append(t(i(e.args))),n[0].className+=" select2-results__message",this.$results.append(n)},i.prototype.hideMessages=function(){this.$results.find(".select2-results__message").remove()},i.prototype.append=function(e){this.hideLoading();var t=[];if(null!=e.results&&0!==e.results.length){e.results=this.sort(e.results);for(var n=0;n",{class:"select2-results__options select2-results__options--nested"});p.append(l),s.append(a),s.append(p)}else this.template(e,t);return f.StoreData(t,"data",e),t},i.prototype.bind=function(t,e){var l=this,n=t.id+"-results";this.$results.attr("id",n),t.on("results:all",function(e){l.clear(),l.append(e.data),t.isOpen()&&(l.setClasses(),l.highlightFirstItem())}),t.on("results:append",function(e){l.append(e.data),t.isOpen()&&l.setClasses()}),t.on("query",function(e){l.hideMessages(),l.showLoading(e)}),t.on("select",function(){t.isOpen()&&(l.setClasses(),l.options.get("scrollAfterSelect")&&l.highlightFirstItem())}),t.on("unselect",function(){t.isOpen()&&(l.setClasses(),l.options.get("scrollAfterSelect")&&l.highlightFirstItem())}),t.on("open",function(){l.$results.attr("aria-expanded","true"),l.$results.attr("aria-hidden","false"),l.setClasses(),l.ensureHighlightVisible()}),t.on("close",function(){l.$results.attr("aria-expanded","false"),l.$results.attr("aria-hidden","true"),l.$results.removeAttr("aria-activedescendant")}),t.on("results:toggle",function(){var e=l.getHighlightedResults();0!==e.length&&e.trigger("mouseup")}),t.on("results:select",function(){var e=l.getHighlightedResults();if(0!==e.length){var t=f.GetData(e[0],"data");"true"==e.attr("aria-selected")?l.trigger("close",{}):l.trigger("select",{data:t})}}),t.on("results:previous",function(){var e=l.getHighlightedResults(),t=l.$results.find("[aria-selected]"),n=t.index(e);if(!(n<=0)){var i=n-1;0===e.length&&(i=0);var r=t.eq(i);r.trigger("mouseenter");var o=l.$results.offset().top,s=r.offset().top,a=l.$results.scrollTop()+(s-o);0===i?l.$results.scrollTop(0):s-o<0&&l.$results.scrollTop(a)}}),t.on("results:next",function(){var e=l.getHighlightedResults(),t=l.$results.find("[aria-selected]"),n=t.index(e)+1;if(!(n>=t.length)){var i=t.eq(n);i.trigger("mouseenter");var r=l.$results.offset().top+l.$results.outerHeight(!1),o=i.offset().top+i.outerHeight(!1),s=l.$results.scrollTop()+o-r;0===n?l.$results.scrollTop(0):rthis.$results.outerHeight()||o<0)&&this.$results.scrollTop(r)}},i.prototype.template=function(e,t){var n=this.options.get("templateResult"),i=this.options.get("escapeMarkup"),r=n(e,t);null==r?t.style.display="none":"string"==typeof r?t.innerHTML=i(r):h(t).append(r)},i}),e.define("select2/keys",[],function(){return{BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46}}),e.define("select2/selection/base",["jquery","../utils","../keys"],function(n,i,r){function o(e,t){this.$element=e,this.options=t,o.__super__.constructor.call(this)}return i.Extend(o,i.Observable),o.prototype.render=function(){var e=n('');return this._tabindex=0,null!=i.GetData(this.$element[0],"old-tabindex")?this._tabindex=i.GetData(this.$element[0],"old-tabindex"):null!=this.$element.attr("tabindex")&&(this._tabindex=this.$element.attr("tabindex")),e.attr("title",this.$element.attr("title")),e.attr("tabindex",this._tabindex),e.attr("aria-disabled","false"),this.$selection=e},o.prototype.bind=function(e,t){var n=this,i=e.id+"-results";this.container=e,this.$selection.on("focus",function(e){n.trigger("focus",e)}),this.$selection.on("blur",function(e){n._handleBlur(e)}),this.$selection.on("keydown",function(e){n.trigger("keypress",e),e.which===r.SPACE&&e.preventDefault()}),e.on("results:focus",function(e){n.$selection.attr("aria-activedescendant",e.data._resultId)}),e.on("selection:update",function(e){n.update(e.data)}),e.on("open",function(){n.$selection.attr("aria-expanded","true"),n.$selection.attr("aria-owns",i),n._attachCloseHandler(e)}),e.on("close",function(){n.$selection.attr("aria-expanded","false"),n.$selection.removeAttr("aria-activedescendant"),n.$selection.removeAttr("aria-owns"),n.$selection.trigger("focus"),n._detachCloseHandler(e)}),e.on("enable",function(){n.$selection.attr("tabindex",n._tabindex),n.$selection.attr("aria-disabled","false")}),e.on("disable",function(){n.$selection.attr("tabindex","-1"),n.$selection.attr("aria-disabled","true")})},o.prototype._handleBlur=function(e){var t=this;window.setTimeout(function(){document.activeElement==t.$selection[0]||n.contains(t.$selection[0],document.activeElement)||t.trigger("blur",e)},1)},o.prototype._attachCloseHandler=function(e){n(document.body).on("mousedown.select2."+e.id,function(e){var t=n(e.target).closest(".select2");n(".select2.select2-container--open").each(function(){this!=t[0]&&i.GetData(this,"element").select2("close")})})},o.prototype._detachCloseHandler=function(e){n(document.body).off("mousedown.select2."+e.id)},o.prototype.position=function(e,t){t.find(".selection").append(e)},o.prototype.destroy=function(){this._detachCloseHandler(this.container)},o.prototype.update=function(e){throw new Error("The `update` method must be defined in child classes.")},o.prototype.isEnabled=function(){return!this.isDisabled()},o.prototype.isDisabled=function(){return this.options.get("disabled")},o}),e.define("select2/selection/single",["jquery","./base","../utils","../keys"],function(e,t,n,i){function r(){r.__super__.constructor.apply(this,arguments)}return n.Extend(r,t),r.prototype.render=function(){var e=r.__super__.render.call(this);return e.addClass("select2-selection--single"),e.html(''),e},r.prototype.bind=function(t,e){var n=this;r.__super__.bind.apply(this,arguments);var i=t.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",i).attr("role","textbox").attr("aria-readonly","true"),this.$selection.attr("aria-labelledby",i),this.$selection.on("mousedown",function(e){1===e.which&&n.trigger("toggle",{originalEvent:e})}),this.$selection.on("focus",function(e){}),this.$selection.on("blur",function(e){}),t.on("focus",function(e){t.isOpen()||n.$selection.trigger("focus")})},r.prototype.clear=function(){var e=this.$selection.find(".select2-selection__rendered");e.empty(),e.removeAttr("title")},r.prototype.display=function(e,t){var n=this.options.get("templateSelection");return this.options.get("escapeMarkup")(n(e,t))},r.prototype.selectionContainer=function(){return e("")},r.prototype.update=function(e){if(0!==e.length){var t=e[0],n=this.$selection.find(".select2-selection__rendered"),i=this.display(t,n);n.empty().append(i);var r=t.title||t.text;r?n.attr("title",r):n.removeAttr("title")}else this.clear()},r}),e.define("select2/selection/multiple",["jquery","./base","../utils"],function(r,e,l){function n(e,t){n.__super__.constructor.apply(this,arguments)}return l.Extend(n,e),n.prototype.render=function(){var e=n.__super__.render.call(this);return e.addClass("select2-selection--multiple"),e.html('
          '),e},n.prototype.bind=function(e,t){var i=this;n.__super__.bind.apply(this,arguments),this.$selection.on("click",function(e){i.trigger("toggle",{originalEvent:e})}),this.$selection.on("click",".select2-selection__choice__remove",function(e){if(!i.isDisabled()){var t=r(this).parent(),n=l.GetData(t[0],"data");i.trigger("unselect",{originalEvent:e,data:n})}})},n.prototype.clear=function(){var e=this.$selection.find(".select2-selection__rendered");e.empty(),e.removeAttr("title")},n.prototype.display=function(e,t){var n=this.options.get("templateSelection");return this.options.get("escapeMarkup")(n(e,t))},n.prototype.selectionContainer=function(){return r('
        • ×
        • ')},n.prototype.update=function(e){if(this.clear(),0!==e.length){for(var t=[],n=0;n×
          ');a.StoreData(i[0],"data",t),this.$selection.find(".select2-selection__rendered").prepend(i)}},e}),e.define("select2/selection/search",["jquery","../utils","../keys"],function(i,a,l){function e(e,t,n){e.call(this,t,n)}return e.prototype.render=function(e){var t=i('');this.$searchContainer=t,this.$search=t.find("input");var n=e.call(this);return this._transferTabIndex(),n},e.prototype.bind=function(e,t,n){var i=this,r=t.id+"-results";e.call(this,t,n),t.on("open",function(){i.$search.attr("aria-controls",r),i.$search.trigger("focus")}),t.on("close",function(){i.$search.val(""),i.$search.removeAttr("aria-controls"),i.$search.removeAttr("aria-activedescendant"),i.$search.trigger("focus")}),t.on("enable",function(){i.$search.prop("disabled",!1),i._transferTabIndex()}),t.on("disable",function(){i.$search.prop("disabled",!0)}),t.on("focus",function(e){i.$search.trigger("focus")}),t.on("results:focus",function(e){e.data._resultId?i.$search.attr("aria-activedescendant",e.data._resultId):i.$search.removeAttr("aria-activedescendant")}),this.$selection.on("focusin",".select2-search--inline",function(e){i.trigger("focus",e)}),this.$selection.on("focusout",".select2-search--inline",function(e){i._handleBlur(e)}),this.$selection.on("keydown",".select2-search--inline",function(e){if(e.stopPropagation(),i.trigger("keypress",e),i._keyUpPrevented=e.isDefaultPrevented(),e.which===l.BACKSPACE&&""===i.$search.val()){var t=i.$searchContainer.prev(".select2-selection__choice");if(0this.maximumInputLength?this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:t.term,params:t}}):e.call(this,t,n)},e}),e.define("select2/data/maximumSelectionLength",[],function(){function e(e,t,n){this.maximumSelectionLength=n.get("maximumSelectionLength"),e.call(this,t,n)}return e.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),t.on("select",function(){i._checkIfMaximumSelected()})},e.prototype.query=function(e,t,n){var i=this;this._checkIfMaximumSelected(function(){e.call(i,t,n)})},e.prototype._checkIfMaximumSelected=function(e,n){var i=this;this.current(function(e){var t=null!=e?e.length:0;0=i.maximumSelectionLength?i.trigger("results:message",{message:"maximumSelected",args:{maximum:i.maximumSelectionLength}}):n&&n()})},e}),e.define("select2/dropdown",["jquery","./utils"],function(t,e){function n(e,t){this.$element=e,this.options=t,n.__super__.constructor.call(this)}return e.Extend(n,e.Observable),n.prototype.render=function(){var e=t('');return e.attr("dir",this.options.get("dir")),this.$dropdown=e},n.prototype.bind=function(){},n.prototype.position=function(e,t){},n.prototype.destroy=function(){this.$dropdown.remove()},n}),e.define("select2/dropdown/search",["jquery","../utils"],function(o,e){function t(){}return t.prototype.render=function(e){var t=e.call(this),n=o('');return this.$searchContainer=n,this.$search=n.find("input"),t.prepend(n),t},t.prototype.bind=function(e,t,n){var i=this,r=t.id+"-results";e.call(this,t,n),this.$search.on("keydown",function(e){i.trigger("keypress",e),i._keyUpPrevented=e.isDefaultPrevented()}),this.$search.on("input",function(e){o(this).off("keyup")}),this.$search.on("keyup input",function(e){i.handleSearch(e)}),t.on("open",function(){i.$search.attr("tabindex",0),i.$search.attr("aria-controls",r),i.$search.trigger("focus"),window.setTimeout(function(){i.$search.trigger("focus")},0)}),t.on("close",function(){i.$search.attr("tabindex",-1),i.$search.removeAttr("aria-controls"),i.$search.removeAttr("aria-activedescendant"),i.$search.val(""),i.$search.trigger("blur")}),t.on("focus",function(){t.isOpen()||i.$search.trigger("focus")}),t.on("results:all",function(e){null!=e.query.term&&""!==e.query.term||(i.showSearch(e)?i.$searchContainer.removeClass("select2-search--hide"):i.$searchContainer.addClass("select2-search--hide"))}),t.on("results:focus",function(e){e.data._resultId?i.$search.attr("aria-activedescendant",e.data._resultId):i.$search.removeAttr("aria-activedescendant")})},t.prototype.handleSearch=function(e){if(!this._keyUpPrevented){var t=this.$search.val();this.trigger("query",{term:t})}this._keyUpPrevented=!1},t.prototype.showSearch=function(e,t){return!0},t}),e.define("select2/dropdown/hidePlaceholder",[],function(){function e(e,t,n,i){this.placeholder=this.normalizePlaceholder(n.get("placeholder")),e.call(this,t,n,i)}return e.prototype.append=function(e,t){t.results=this.removePlaceholder(t.results),e.call(this,t)},e.prototype.normalizePlaceholder=function(e,t){return"string"==typeof t&&(t={id:"",text:t}),t},e.prototype.removePlaceholder=function(e,t){for(var n=t.slice(0),i=t.length-1;0<=i;i--){var r=t[i];this.placeholder.id===r.id&&n.splice(i,1)}return n},e}),e.define("select2/dropdown/infiniteScroll",["jquery"],function(n){function e(e,t,n,i){this.lastParams={},e.call(this,t,n,i),this.$loadingMore=this.createLoadingMore(),this.loading=!1}return e.prototype.append=function(e,t){this.$loadingMore.remove(),this.loading=!1,e.call(this,t),this.showLoadingMore(t)&&(this.$results.append(this.$loadingMore),this.loadMoreIfNeeded())},e.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),t.on("query",function(e){i.lastParams=e,i.loading=!0}),t.on("query:append",function(e){i.lastParams=e,i.loading=!0}),this.$results.on("scroll",this.loadMoreIfNeeded.bind(this))},e.prototype.loadMoreIfNeeded=function(){var e=n.contains(document.documentElement,this.$loadingMore[0]);if(!this.loading&&e){var t=this.$results.offset().top+this.$results.outerHeight(!1);this.$loadingMore.offset().top+this.$loadingMore.outerHeight(!1)<=t+50&&this.loadMore()}},e.prototype.loadMore=function(){this.loading=!0;var e=n.extend({},{page:1},this.lastParams);e.page++,this.trigger("query:append",e)},e.prototype.showLoadingMore=function(e,t){return t.pagination&&t.pagination.more},e.prototype.createLoadingMore=function(){var e=n('
        • '),t=this.options.get("translations").get("loadingMore");return e.html(t(this.lastParams)),e},e}),e.define("select2/dropdown/attachBody",["jquery","../utils"],function(f,a){function e(e,t,n){this.$dropdownParent=f(n.get("dropdownParent")||document.body),e.call(this,t,n)}return e.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),t.on("open",function(){i._showDropdown(),i._attachPositioningHandler(t),i._bindContainerResultHandlers(t)}),t.on("close",function(){i._hideDropdown(),i._detachPositioningHandler(t)}),this.$dropdownContainer.on("mousedown",function(e){e.stopPropagation()})},e.prototype.destroy=function(e){e.call(this),this.$dropdownContainer.remove()},e.prototype.position=function(e,t,n){t.attr("class",n.attr("class")),t.removeClass("select2"),t.addClass("select2-container--open"),t.css({position:"absolute",top:-999999}),this.$container=n},e.prototype.render=function(e){var t=f(""),n=e.call(this);return t.append(n),this.$dropdownContainer=t},e.prototype._hideDropdown=function(e){this.$dropdownContainer.detach()},e.prototype._bindContainerResultHandlers=function(e,t){if(!this._containerResultsHandlersBound){var n=this;t.on("results:all",function(){n._positionDropdown(),n._resizeDropdown()}),t.on("results:append",function(){n._positionDropdown(),n._resizeDropdown()}),t.on("results:message",function(){n._positionDropdown(),n._resizeDropdown()}),t.on("select",function(){n._positionDropdown(),n._resizeDropdown()}),t.on("unselect",function(){n._positionDropdown(),n._resizeDropdown()}),this._containerResultsHandlersBound=!0}},e.prototype._attachPositioningHandler=function(e,t){var n=this,i="scroll.select2."+t.id,r="resize.select2."+t.id,o="orientationchange.select2."+t.id,s=this.$container.parents().filter(a.hasScroll);s.each(function(){a.StoreData(this,"select2-scroll-position",{x:f(this).scrollLeft(),y:f(this).scrollTop()})}),s.on(i,function(e){var t=a.GetData(this,"select2-scroll-position");f(this).scrollTop(t.y)}),f(window).on(i+" "+r+" "+o,function(e){n._positionDropdown(),n._resizeDropdown()})},e.prototype._detachPositioningHandler=function(e,t){var n="scroll.select2."+t.id,i="resize.select2."+t.id,r="orientationchange.select2."+t.id;this.$container.parents().filter(a.hasScroll).off(n),f(window).off(n+" "+i+" "+r)},e.prototype._positionDropdown=function(){var e=f(window),t=this.$dropdown.hasClass("select2-dropdown--above"),n=this.$dropdown.hasClass("select2-dropdown--below"),i=null,r=this.$container.offset();r.bottom=r.top+this.$container.outerHeight(!1);var o={height:this.$container.outerHeight(!1)};o.top=r.top,o.bottom=r.top+o.height;var s=this.$dropdown.outerHeight(!1),a=e.scrollTop(),l=e.scrollTop()+e.height(),c=ar.bottom+s,d={left:r.left,top:o.bottom},p=this.$dropdownParent;"static"===p.css("position")&&(p=p.offsetParent());var h={top:0,left:0};(f.contains(document.body,p[0])||p[0].isConnected)&&(h=p.offset()),d.top-=h.top,d.left-=h.left,t||n||(i="below"),u||!c||t?!c&&u&&t&&(i="below"):i="above",("above"==i||t&&"below"!==i)&&(d.top=o.top-h.top-s),null!=i&&(this.$dropdown.removeClass("select2-dropdown--below select2-dropdown--above").addClass("select2-dropdown--"+i),this.$container.removeClass("select2-container--below select2-container--above").addClass("select2-container--"+i)),this.$dropdownContainer.css(d)},e.prototype._resizeDropdown=function(){var e={width:this.$container.outerWidth(!1)+"px"};this.options.get("dropdownAutoWidth")&&(e.minWidth=e.width,e.position="relative",e.width="auto"),this.$dropdown.css(e)},e.prototype._showDropdown=function(e){this.$dropdownContainer.appendTo(this.$dropdownParent),this._positionDropdown(),this._resizeDropdown()},e}),e.define("select2/dropdown/minimumResultsForSearch",[],function(){function e(e,t,n,i){this.minimumResultsForSearch=n.get("minimumResultsForSearch"),this.minimumResultsForSearch<0&&(this.minimumResultsForSearch=1/0),e.call(this,t,n,i)}return e.prototype.showSearch=function(e,t){return!(function e(t){for(var n=0,i=0;i
          ');return e.attr("dir",this.options.get("dir")),this.$container=e,this.$container.addClass("select2-container--"+this.options.get("theme")),u.StoreData(e[0],"element",this.$element),e},d}),e.define("select2/compat/utils",["jquery"],function(s){return{syncCssClasses:function(e,t,n){var i,r,o=[];(i=s.trim(e.attr("class")))&&s((i=""+i).split(/\s+/)).each(function(){0===this.indexOf("select2-")&&o.push(this)}),(i=s.trim(t.attr("class")))&&s((i=""+i).split(/\s+/)).each(function(){0!==this.indexOf("select2-")&&null!=(r=n(this))&&o.push(r)}),e.attr("class",o.join(" "))}}}),e.define("select2/compat/containerCss",["jquery","./utils"],function(s,a){function l(e){return null}function e(){}return e.prototype.render=function(e){var t=e.call(this),n=this.options.get("containerCssClass")||"";s.isFunction(n)&&(n=n(this.$element));var i=this.options.get("adaptContainerCssClass");if(i=i||l,-1!==n.indexOf(":all:")){n=n.replace(":all:","");var r=i;i=function(e){var t=r(e);return null!=t?t+" "+e:e}}var o=this.options.get("containerCss")||{};return s.isFunction(o)&&(o=o(this.$element)),a.syncCssClasses(t,this.$element,i),t.css(o),t.addClass(n),t},e}),e.define("select2/compat/dropdownCss",["jquery","./utils"],function(s,a){function l(e){return null}function e(){}return e.prototype.render=function(e){var t=e.call(this),n=this.options.get("dropdownCssClass")||"";s.isFunction(n)&&(n=n(this.$element));var i=this.options.get("adaptDropdownCssClass");if(i=i||l,-1!==n.indexOf(":all:")){n=n.replace(":all:","");var r=i;i=function(e){var t=r(e);return null!=t?t+" "+e:e}}var o=this.options.get("dropdownCss")||{};return s.isFunction(o)&&(o=o(this.$element)),a.syncCssClasses(t,this.$element,i),t.css(o),t.addClass(n),t},e}),e.define("select2/compat/initSelection",["jquery"],function(i){function e(e,t,n){n.get("debug")&&window.console&&console.warn&&console.warn("Select2: The `initSelection` option has been deprecated in favor of a custom data adapter that overrides the `current` method. This method is now called multiple times instead of a single time when the instance is initialized. Support will be removed for the `initSelection` option in future versions of Select2"),this.initSelection=n.get("initSelection"),this._isInitialized=!1,e.call(this,t,n)}return e.prototype.current=function(e,t){var n=this;this._isInitialized?e.call(this,t):this.initSelection.call(null,this.$element,function(e){n._isInitialized=!0,i.isArray(e)||(e=[e]),t(e)})},e}),e.define("select2/compat/inputData",["jquery","../utils"],function(s,i){function e(e,t,n){this._currentData=[],this._valueSeparator=n.get("valueSeparator")||",","hidden"===t.prop("type")&&n.get("debug")&&console&&console.warn&&console.warn("Select2: Using a hidden input with Select2 is no longer supported and may stop working in the future. It is recommended to use a ` - - -1, - 'orderby' => 'title', - 'post_type' => 'generate_page_header', - 'suppress_filters' => false, - )); - - $options[ $type ] = ! isset( $options[ $type ] ) ? '' : $options[ $type ]; - - foreach( $page_headers as $header ) { - printf( '', - $header->ID, - selected( $options[ $type ], $header->ID ), - $header->post_title - ); - } - ?> - - ( window_height - offset ) ) { - jQuery( '.fullscreen-enabled' ).attr( 'style', 'height: initial !important' ); - } -} - -jQuery(document).ready(function($) { - - // Run the header height function - generateHeaderHeight(); - - // Set up the resize timer - var generateResizeTimer; - - if ( jQuery('.generate-page-header.fullscreen-enabled')[0] ) { - // Initiate full window height on resize - var width = $(window).width(); - $(window).resize(function() { - if($(window).width() != width){ - clearTimeout(generateResizeTimer); - generateResizeTimer = setTimeout(generateHeaderHeight, 200); - width = $(window).width(); - } - }); - - $( window ).on( "orientationchange", function( event ) { - if($(window).width() != width){ - clearTimeout(generateResizeTimer); - generateResizeTimer = setTimeout(generateHeaderHeight, 200); - width = $(window).width(); - } - }); - } - -}); \ No newline at end of file diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/page-header/functions/js/full-height.min.js b/wp-content/upgrade-temp-backup/plugins/gp-premium/page-header/functions/js/full-height.min.js deleted file mode 100644 index dd988e11..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/page-header/functions/js/full-height.min.js +++ /dev/null @@ -1 +0,0 @@ -function generateHeaderHeight(){if(jQuery(".fullscreen-enabled").length){var a,b=jQuery(window).height();a=jQuery(".inside-page-header").length?jQuery(".inside-page-header"):jQuery(".generate-inside-combined-content").length?jQuery(".generate-inside-combined-content"):jQuery(".generate-inside-page-header-content");var c=jQuery(".fullscreen-enabled").offset().top;jQuery(".fullscreen-enabled").css("height",b-c+"px"),a.outerHeight()>b-c&&jQuery(".fullscreen-enabled").attr("style","height: initial !important")}}function generateHeaderParallax(){var a=jQuery(".menu-toggle");if(!a.is(":visible")&&jQuery(".generate-page-header.parallax-enabled")[0]){if(jQuery(".page-header-contained")[0])var b=jQuery(".generate-page-header.parallax-enabled .inside-content-header");else var b=jQuery(".generate-page-header.parallax-enabled");var c=jQuery(this).scrollTop(),d=jQuery(".generate-page-header.parallax-enabled").data("parallax-speed");return b.css("background-position","center "+parseInt(-c/d)+"px")}}jQuery(document).ready(function(a){generateHeaderHeight();var b;if(jQuery(".generate-page-header.parallax-enabled")[0]&&a(document).scroll(function(){generateHeaderParallax()}),jQuery(".generate-page-header.fullscreen-enabled")[0]){var c=a(window).width();a(window).resize(function(){a(window).width()!=c&&(clearTimeout(b),b=setTimeout(generateHeaderHeight,200),c=a(window).width())}),a(window).on("orientationchange",function(d){a(window).width()!=c&&(clearTimeout(b),b=setTimeout(generateHeaderHeight,200),c=a(window).width())})}}); \ No newline at end of file diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/page-header/functions/js/jquery.vide.min.js b/wp-content/upgrade-temp-backup/plugins/gp-premium/page-header/functions/js/jquery.vide.min.js deleted file mode 100644 index d78004e0..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/page-header/functions/js/jquery.vide.min.js +++ /dev/null @@ -1,9 +0,0 @@ -/* - * Vide - v0.5.0 - * Easy as hell jQuery plugin for video backgrounds. - * http://vodkabears.github.io/vide/ - * - * Made by Ilya Makarov - * Under MIT License - */ -!function(a,b){"function"==typeof define&&define.amd?define(["jquery"],b):b("object"==typeof exports?require("jquery"):a.jQuery)}(this,function(a){"use strict";function b(a){var b,c,d,e,f,g,h,i={};for(f=a.replace(/\s*:\s*/g,":").replace(/\s*,\s*/g,",").split(","),h=0,g=f.length;g>h&&(c=f[h],-1===c.search(/^(http|https|ftp):\/\//)&&-1!==c.search(":"));h++)b=c.indexOf(":"),d=c.substring(0,b),e=c.substring(b+1),e||(e=void 0),"string"==typeof e&&(e="true"===e||("false"===e?!1:e)),"string"==typeof e&&(e=isNaN(e)?e:+e),i[d]=e;return null==d&&null==e?a:i}function c(a){a=""+a;var b,c,d,e=a.split(/\s+/),f="50%",g="50%";for(d=0,b=e.length;b>d;d++)c=e[d],"left"===c?f="0%":"right"===c?f="100%":"top"===c?g="0%":"bottom"===c?g="100%":"center"===c?0===d?f="50%":g="50%":0===d?f=c:g=c;return{x:f,y:g}}function d(b,c){var d=function(){c(this.src)};a('').load(d),a('').load(d),a('').load(d),a('').load(d)}function e(c,d,e){if(this.$element=a(c),"string"==typeof d&&(d=b(d)),e?"string"==typeof e&&(e=b(e)):e={},"string"==typeof d)d=d.replace(/\.\w*$/,"");else if("object"==typeof d)for(var f in d)d.hasOwnProperty(f)&&(d[f]=d[f].replace(/\.\w*$/,""));this.settings=a.extend({},g,e),this.path=d;try{this.init()}catch(i){if(i.message!==h)throw i}}var f="vide",g={volume:1,playbackRate:1,muted:!0,loop:!0,autoplay:!0,position:"50% 50%",posterType:"detect",resizing:!0,bgColor:"transparent",className:""},h="Not implemented";e.prototype.init=function(){var b,e,g=this,i=g.path,j=i,k="",l=g.$element,m=g.settings,n=c(m.position),o=m.posterType;e=g.$wrapper=a("
          ").addClass(m.className).css({position:"absolute","z-index":-1,top:0,left:0,bottom:0,right:0,overflow:"hidden","-webkit-background-size":"cover","-moz-background-size":"cover","-o-background-size":"cover","background-size":"cover","background-color":m.bgColor,"background-repeat":"no-repeat","background-position":n.x+" "+n.y}),"object"==typeof i&&(i.poster?j=i.poster:i.mp4?j=i.mp4:i.webm?j=i.webm:i.ogv&&(j=i.ogv)),"detect"===o?d(j,function(a){e.css("background-image","url("+a+")")}):"none"!==o&&e.css("background-image","url("+j+"."+o+")"),"static"===l.css("position")&&l.css("position","relative"),l.prepend(e),"object"==typeof i?(i.mp4&&(k+=''),i.webm&&(k+=''),i.ogv&&(k+=''),b=g.$video=a("")):b=g.$video=a('');try{b.prop({autoplay:m.autoplay,loop:m.loop,volume:m.volume,muted:m.muted,defaultMuted:m.muted,playbackRate:m.playbackRate,defaultPlaybackRate:m.playbackRate})}catch(p){throw new Error(h)}b.css({margin:"auto",position:"absolute","z-index":-1,top:n.y,left:n.x,"-webkit-transform":"translate(-"+n.x+", -"+n.y+")","-ms-transform":"translate(-"+n.x+", -"+n.y+")","-moz-transform":"translate(-"+n.x+", -"+n.y+")",transform:"translate(-"+n.x+", -"+n.y+")",visibility:"hidden",opacity:0}).one("canplaythrough."+f,function(){g.resize()}).one("playing."+f,function(){b.css({visibility:"visible",opacity:1}),e.css("background-image","none")}),l.on("resize."+f,function(){m.resizing&&g.resize()}),e.append(b)},e.prototype.getVideoObject=function(){return this.$video[0]},e.prototype.resize=function(){if(this.$video){var a=this.$wrapper,b=this.$video,c=b[0],d=c.videoHeight,e=c.videoWidth,f=a.height(),g=a.width();g/e>f/d?b.css({width:g+2,height:"auto"}):b.css({width:"auto",height:f+2})}},e.prototype.destroy=function(){delete a[f].lookup[this.index],this.$video&&this.$video.off(f),this.$element.off(f).removeData(f),this.$wrapper.remove()},a[f]={lookup:[]},a.fn[f]=function(b,c){var d;return this.each(function(){d=a.data(this,f),d&&d.destroy(),d=new e(this,b,c),d.index=a[f].lookup.push(d)-1,a.data(this,f,d)}),this},a(document).ready(function(){var b=a(window);b.on("resize."+f,function(){for(var b,c=a[f].lookup.length,d=0;c>d;d++)b=a[f].lookup[d],b&&b.settings.resizing&&b.resize()}),b.on("unload."+f,function(){return!1}),a(document).find("[data-"+f+"-bg]").each(function(b,c){var d=a(c),e=d.data(f+"-options"),g=d.data(f+"-bg");d[f](g,e)})})});jQuery(document).ready(function($) {var page_header_content = $( '.page-header-content' );if ( page_header_content.length ) {if ( page_header_content.hasClass( 'grid-container' ) ) {$( '.inside-page-header-container' ).data('vide').getVideoObject().play();} else {page_header_content.data('vide').getVideoObject().play();}}}); diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/page-header/functions/js/lc_switch.js b/wp-content/upgrade-temp-backup/plugins/gp-premium/page-header/functions/js/lc_switch.js deleted file mode 100644 index 89eae365..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/page-header/functions/js/lc_switch.js +++ /dev/null @@ -1,149 +0,0 @@ -/** - * lc_switch.js - * Version: 1.0 - * Author: LCweb - Luca Montanari - * Website: http://www.lcweb.it - * Licensed under the MIT license - */ - -(function($){ - if(typeof($.fn.lc_switch) != 'undefined') {return false;} // prevent dmultiple scripts inits - - $.fn.lc_switch = function(on_text, off_text) { - - // destruct - $.fn.lcs_destroy = function() { - - $(this).each(function() { - var $wrap = $(this).parents('.lcs_wrap'); - - $wrap.children().not('input').remove(); - $(this).unwrap(); - }); - - return true; - }; - - - // set to ON - $.fn.lcs_on = function() { - - $(this).each(function() { - var $wrap = $(this).parents('.lcs_wrap'); - var $input = $wrap.find('input'); - - if(typeof($.fn.prop) == 'function') { - $wrap.find('input').prop('checked', true); - } else { - $wrap.find('input').attr('checked', true); - } - - $wrap.find('input').trigger('lcs-on'); - $wrap.find('input').trigger('lcs-statuschange'); - $wrap.find('.lcs_switch').removeClass('lcs_off').addClass('lcs_on'); - - // if radio - disable other ones - if( $wrap.find('.lcs_switch').hasClass('lcs_radio_switch') ) { - var f_name = $input.attr('name'); - $wrap.parents('form').find('input[name='+f_name+']').not($input).lcs_off(); - } - }); - - return true; - }; - - - // set to OFF - $.fn.lcs_off = function() { - - $(this).each(function() { - var $wrap = $(this).parents('.lcs_wrap'); - - if(typeof($.fn.prop) == 'function') { - $wrap.find('input').prop('checked', false); - } else { - $wrap.find('input').attr('checked', false); - } - - $wrap.find('input').trigger('lcs-off'); - $wrap.find('input').trigger('lcs-statuschange'); - $wrap.find('.lcs_switch').removeClass('lcs_on').addClass('lcs_off'); - }); - - return true; - }; - - - // construct - return this.each(function(){ - - // check against double init - if( !$(this).parent().hasClass('lcs_wrap') ) { - - // default texts - var ckd_on_txt = (typeof(on_text) == 'undefined') ? 'ON' : on_text; - var ckd_off_txt = (typeof(off_text) == 'undefined') ? 'OFF' : off_text; - - // labels structure - var on_label = (ckd_on_txt) ? '
          '+ ckd_on_txt +'
          ' : ''; - var off_label = (ckd_off_txt) ? '
          '+ ckd_off_txt +'
          ' : ''; - - - // default states - var disabled = ($(this).is(':disabled')) ? true: false; - var active = ($(this).is(':checked')) ? true : false; - - var status_classes = ''; - status_classes += (active) ? ' lcs_on' : ' lcs_off'; - if(disabled) {status_classes += ' lcs_disabled';} - - - // wrap and append - var structure = - '
          ' + - '
          ' + - on_label + off_label + - '
          '; - - if( $(this).is(':input') && ($(this).attr('type') == 'checkbox' || $(this).attr('type') == 'radio') ) { - - $(this).wrap('
          '); - $(this).parent().append(structure); - - $(this).parent().find('.lcs_switch').addClass('lcs_'+ $(this).attr('type') +'_switch'); - } - } - }); - }; - - - - // handlers - $(document).ready(function() { - - // on click - $(document).delegate('.lcs_switch:not(.lcs_disabled)', 'click tap', function(e) { - - if( $(this).hasClass('lcs_on') ) { - if( !$(this).hasClass('lcs_radio_switch') ) { // not for radio - $(this).lcs_off(); - } - } else { - $(this).lcs_on(); - } - }); - - - // on checkbox status change - $(document).delegate('.lcs_wrap input', 'change', function() { - - if( $(this).is(':checked') ) { - $(this).lcs_on(); - } else { - $(this).lcs_off(); - } - }); - - }); - -})(jQuery); diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/page-header/functions/js/metabox.js b/wp-content/upgrade-temp-backup/plugins/gp-premium/page-header/functions/js/metabox.js deleted file mode 100644 index f1c0f66e..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/page-header/functions/js/metabox.js +++ /dev/null @@ -1,220 +0,0 @@ -jQuery(document).ready(function($) { - $( '#generate-tabs-container input[type="checkbox"]' ).lc_switch( '', '' ); - - $( '.generate-tabs-menu a' ).on( 'click', function( event ) { - event.preventDefault(); - $( this ).parent().addClass( 'generate-current' ); - $( this ).parent().siblings().removeClass( 'generate-current' ); - var tab = $( this ).attr( 'href' ); - $( '.generate-tab-content' ).not(tab).css( 'display', 'none' ); - $( tab ).fadeIn( 100 ); - - if ( '#generate-image-tab' == tab || '#generate-content-tab' == tab ) { - $( '.show-in-excerpt' ).show(); - } else { - $( '.show-in-excerpt' ).hide(); - } - } ); - - $( '#_meta-generate-page-header-content' ).on( 'input change', function() { - if ( this.value.length ) { - $( '.page-header-content-required' ).hide(); - } else { - $( '.page-header-content-required' ).show(); - } - }); -}); - -jQuery(window).on('load', function() { - if ( jQuery( '#_meta-generate-page-header-enable-image-crop' ).val() == 'enable' ) { - jQuery( '#crop-enabled' ).show(); - } - - jQuery( '#_meta-generate-page-header-enable-image-crop' ).change(function () { - if ( jQuery( this ).val() === 'enable' ) { - jQuery( '#crop-enabled' ).show(); - } else { - jQuery( '#crop-enabled' ).hide(); - } - }); - - if ( jQuery( '#_meta-generate-page-header-image-background' ).is( ':checked' ) ) { - jQuery( '.parallax' ).show(); - } else { - jQuery( '.parallax' ).hide(); - } - - jQuery('body').delegate('.image-background', 'lcs-statuschange', function() { - if (jQuery(this).is(":checked")) { - jQuery('.parallax').show(); - } else { - jQuery('.parallax').hide(); - jQuery('#_meta-generate-page-header-image-background-fixed').lcs_off(); - } - }); - - if ( jQuery('#_meta-generate-page-header-full-screen').is(':checked')) { - jQuery('.vertical-center').show(); - } else { - jQuery('.vertical-center').hide(); - } - - jQuery('body').delegate('#_meta-generate-page-header-full-screen', 'lcs-statuschange', function() { - if (jQuery(this).is(":checked")) { - jQuery('.vertical-center').show(); - } else { - jQuery('.vertical-center').hide(); - jQuery('#_meta-generate-page-header-vertical-center').lcs_off(); - } - }); - - if ( jQuery('#_meta-generate-page-header-transparent-navigation').is(':checked')) { - jQuery('.navigation-colors').show(); - } else { - jQuery('.navigation-colors').hide(); - } - - jQuery('body').delegate('#_meta-generate-page-header-transparent-navigation', 'lcs-statuschange', function() { - if (jQuery(this).is(":checked")) { - jQuery('.navigation-colors').show(); - } else { - jQuery('.navigation-colors').hide(); - } - }); - - if ( jQuery('#_meta-generate-page-header-combine').is(':checked')) { - jQuery('.combination-options').show(); - } else { - jQuery('.combination-options').hide(); - } - - jQuery('body').delegate('#_meta-generate-page-header-combine', 'lcs-statuschange', function() { - if (jQuery(this).is(":checked")) { - jQuery('.combination-options').show(); - } else { - jQuery('.combination-options').hide(); - } - }); - - if ( jQuery('#_meta-generate-page-header-image-background-type').val() == '' ) { - jQuery('.vertical-center').hide(); - jQuery('.fullscreen').hide(); - } - jQuery('#_meta-generate-page-header-image-background-type').change(function () { - if (jQuery(this).val() === '') { - jQuery('.vertical-center').hide(); - jQuery('#_meta-generate-page-header-vertical-center').lcs_off(); - jQuery('.fullscreen').hide(); - jQuery('#_meta-generate-page-header-full-screen').lcs_off(); - } else { - //jQuery('.vertical-center').show(); - jQuery('.fullscreen').show(); - } - }); - - var $set_button = jQuery('.generate-upload-file'); - /** - * open the media manager - */ - $set_button.click(function (e) { - e.preventDefault(); - - var $thisbutton = jQuery(this); - var frame = wp.media({ - title : $thisbutton.data('title'), - multiple : false, - library : { type : $thisbutton.data('type') }, - button : { text : $thisbutton.data('insert') } - }); - // close event media manager - frame.on('select', function () { - var attachment = frame.state().get('selection').first().toJSON(); - // set the file - //set_dfi(attachment.url); - $thisbutton.prev('input').val(attachment.url); - $thisbutton.nextAll('input.image-id').val(attachment.id); - if ( $thisbutton.data('prev') === true ) { - $thisbutton.prev('input').prevAll('#preview-image').children('.saved-image').remove(); - $thisbutton.prev('input').prevAll('#preview-image').append(''); - } - $thisbutton.nextAll( '.generate-page-header-remove-image' ).show(); - if ( 'upload_image' == $thisbutton.prev( 'input' ).attr( 'id' ) ) { - jQuery( '.featured-image-message' ).hide(); - jQuery( '.page-header-image-settings' ).show(); - jQuery( '.generate-page-header-set-featured-image' ).hide(); - } - }); - - // everthing is set open the media manager - frame.open(); - }); -}); -jQuery(document).ready(function($) { - $('#generate-tabs-container .color-picker').wpColorPicker(); - - jQuery( '.generate-page-header-remove-image' ).on( 'click', function( e ) { - e.preventDefault(); - var input = jQuery( this ).data( 'input' ); - var input_id = jQuery( this ).data( 'input-id' ); - var preview = jQuery( this ).data( 'prev' ); - jQuery( input ).attr( 'value', '' ); - jQuery( input_id ).attr( 'value', '' ); - jQuery( preview ).children( '.saved-image' ).remove(); - jQuery( this ).hide(); - if ( '-1' == jQuery( '#_thumbnail_id' ).attr( 'value' ) ) { - jQuery( '.page-header-image-settings' ).hide(); - jQuery( '.generate-page-header-set-featured-image' ).show(); - - } else { - jQuery( '.generate-page-header-set-featured-image' ).hide(); - jQuery( '.page-header-image-settings' ).show(); - jQuery( '.featured-image-message' ).show(); - } - return false; - }); - - $('#postimagediv').on( 'click', '#remove-post-thumbnail', function() { - // The featured image is gone, so we can hide the message - jQuery( '.featured-image-message' ).hide(); - - // If there's no other image set, we can hide the image settings - if ( '' == jQuery( '#_meta-generate-page-header-image-id' ).attr( 'value' ) ) { - jQuery( '.page-header-image-settings' ).hide(); - jQuery( '.generate-page-header-set-featured-image' ).show(); - } - - // No more featured image means we can show the 'show excerpt' option - jQuery( '.show-in-excerpt' ).show(); - - return false; - }); - - wp.media.featuredImage.frame().on('select', function() { - - // We have a featured image, so the 'show excerpt' function isn't necessary - jQuery( '.show-in-excerpt' ).hide(); - - // We can stop here if we have a custom image set - if ( '' !== jQuery( '#_meta-generate-page-header-image-id' ).attr( 'value' ) ) - return; - - // Hide the set your featured image message - jQuery( '.generate-page-header-set-featured-image' ).hide(); - - // Show the "using feaured image" message - jQuery( '.featured-image-message' ).show(); - - // Show the image settings (image link, resizing etc..) - jQuery( '.page-header-image-settings' ).show(); - }); - - $( '.generate-featured-image, .generate-page-header-set-featured-image a' ).on( 'click', function( event ) { - event.preventDefault(); - - // Stop propagation to prevent thickbox from activating. - event.stopPropagation(); - - // Open the featured image modal - wp.media.featuredImage.frame().open(); - }); -}); diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/page-header/functions/js/parallax.js b/wp-content/upgrade-temp-backup/plugins/gp-premium/page-header/functions/js/parallax.js deleted file mode 100644 index 8fe3b26c..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/page-header/functions/js/parallax.js +++ /dev/null @@ -1,17 +0,0 @@ -function generate_parallax_element( selector, context ) { - context = context || document; - var elements = context.querySelectorAll( selector ); - return Array.prototype.slice.call( elements ); -} - -window.addEventListener( "scroll", function() { - var scrolledHeight= window.pageYOffset; - generate_parallax_element( ".parallax-enabled" ).forEach( function( el, index, array ) { - var limit = el.offsetTop + el.offsetHeight; - if( scrolledHeight > el.offsetTop && scrolledHeight <= limit ) { - el.style.backgroundPositionY = ( scrolledHeight - el.offsetTop ) / el.getAttribute( 'data-parallax-speed' ) + "px"; - } else { - el.style.backgroundPositionY = "0"; - } - }); -}); \ No newline at end of file diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/page-header/functions/js/parallax.min.js b/wp-content/upgrade-temp-backup/plugins/gp-premium/page-header/functions/js/parallax.min.js deleted file mode 100644 index 8263a901..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/page-header/functions/js/parallax.min.js +++ /dev/null @@ -1 +0,0 @@ -function generate_parallax_element(e,t){var a=(t=t||document).querySelectorAll(e);return Array.prototype.slice.call(a)}window.addEventListener("scroll",function(){var e=window.pageYOffset;generate_parallax_element(".parallax-enabled").forEach(function(t,a,o){var r=t.offsetTop+t.offsetHeight;e>t.offsetTop&&e<=r?t.style.backgroundPositionY=(e-t.offsetTop)/t.getAttribute("data-parallax-speed")+"px":t.style.backgroundPositionY="0"})}); \ No newline at end of file diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/page-header/functions/metabox.php b/wp-content/upgrade-temp-backup/plugins/gp-premium/page-header/functions/metabox.php deleted file mode 100644 index 76b25c4a..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/page-header/functions/metabox.php +++ /dev/null @@ -1,782 +0,0 @@ - true ); - $post_types = get_post_types( $args ); - - // Bail if we're not using the old Page Header meta box - if ( 'generate_page_header' !== get_post_type() && '' == $stored_meta['_meta-generate-page-header-content'][0] && '' == $stored_meta['_meta-generate-page-header-image'][0] && '' == $stored_meta['_meta-generate-page-header-image-id'][0] ) { - if ( ! defined( 'GENERATE_LAYOUT_META_BOX' ) ) { - foreach ( $post_types as $type ) { - if ( 'attachment' !== $type ) { - add_meta_box( - 'generate_select_page_header_meta_box', - __( 'Page Header', 'gp-premium' ), - 'generate_do_select_page_header_meta_box', - $type, - 'normal', - 'high' - ); - } - } - } - - if ( ! apply_filters( 'generate_page_header_legacy_metabox', false ) ) { - return; - } - } - - array_push( $post_types, 'generate_page_header' ); - foreach ($post_types as $type) { - if ( 'attachment' !== $type ) { - add_meta_box( - 'generate_page_header_meta_box', - __( 'Page Header', 'gp-premium' ), - 'show_generate_page_header_meta_box', - $type, - 'normal', - 'high' - ); - } - } - } -} - -if ( ! function_exists( 'generate_page_header_metabox_enqueue' ) ) { - add_action( 'admin_enqueue_scripts', 'generate_page_header_metabox_enqueue' ); - /** - * Add our metabox scripts - */ - function generate_page_header_metabox_enqueue( $hook ) { - // I prefer to enqueue the styles only on pages that are using the metaboxes - if ( in_array( $hook, array( "post.php", "post-new.php" ) ) ) { - $args = array( 'public' => true ); - $post_types = get_post_types( $args ); - - $screen = get_current_screen(); - $post_type = $screen->id; - - if ( in_array( $post_type, (array) $post_types ) || 'generate_page_header' == get_post_type() ){ - wp_enqueue_media(); - wp_enqueue_script( 'wp-color-picker' ); - wp_enqueue_style( 'wp-color-picker' ); - wp_enqueue_script( 'wp-color-picker-alpha', GP_LIBRARY_DIRECTORY_URL . 'alpha-color-picker/wp-color-picker-alpha.min.js', array( 'wp-color-picker' ), '3.0.0', true ); - - wp_add_inline_script( - 'wp-color-picker-alpha', - 'jQuery( function() { jQuery( ".color-picker" ).wpColorPicker(); } );' - ); - - wp_enqueue_style( 'generate-page-header-metabox', plugin_dir_url( __FILE__ ) . 'css/metabox.css', array(), GENERATE_PAGE_HEADER_VERSION ); - wp_enqueue_script( 'generate-lc-switch', plugin_dir_url( __FILE__ ) . 'js/lc_switch.js', array( 'jquery' ), GENERATE_PAGE_HEADER_VERSION, false ); - wp_enqueue_script( 'generate-page-header-metabox', plugin_dir_url( __FILE__ ) . 'js/metabox.js', array( 'jquery','generate-lc-switch', 'wp-color-picker' ), GENERATE_PAGE_HEADER_VERSION, false ); - - if ( function_exists( 'wp_add_inline_script' ) && function_exists( 'generate_get_default_color_palettes' ) ) { - // Grab our palette array and turn it into JS - $palettes = json_encode( generate_get_default_color_palettes() ); - - // Add our custom palettes - // json_encode takes care of escaping - wp_add_inline_script( 'wp-color-picker', 'jQuery.wp.wpColorPicker.prototype.options.palettes = ' . $palettes . ';' ); - } - } - } - } -} - -/** - * Build our Select Page Header meta box. - * - * @since 1.4 - */ -function generate_do_select_page_header_meta_box( $post ) { - wp_nonce_field( basename( __FILE__ ), 'generate_page_header_nonce' ); - $stored_meta = get_post_meta( $post->ID ); - $stored_meta['_generate-select-page-header'][0] = ( isset( $stored_meta['_generate-select-page-header'][0] ) ) ? $stored_meta['_generate-select-page-header'][0] : ''; - - $page_headers = get_posts(array( - 'posts_per_page' => -1, - 'orderby' => 'title', - 'post_type' => 'generate_page_header', - )); - - if ( count( $page_headers ) > 0 ) : - ?> -

          - -

          - -

          - create one?', 'gp-premium' ), - esc_url( admin_url( 'post-new.php?post_type=generate_page_header' ) ) - ); - ?> -

          -

          %1$s

          ', - __( 'Content is required for the below settings to work.', 'gp-premium' ), - '' !== generate_page_header_get_post_meta( get_the_ID(), '_meta-generate-page-header-content', true ) ? 'style="display:none"' : '' - ); - - if ( '' !== generate_page_header_get_post_meta( get_the_ID(), '_meta-generate-page-header-content', true ) ) { - ?> - - -
          -
            -
          • - -
          • - -
          • - -
          • - -
          • - -
          • - - -
          • - -
          • - - -
          • - -
          • - - -
            > -

            -
            - /> -

            -
            - -
          -
          -
          - - - -
          - - - -
          - - - - - - - - -
          > -

          -
          - -

          - -

          -
          - -

          - - -
          -
          - -
          - - -

          - -
          - -
          -

          - /> - -

          - -

          - /> - -

          - -

          - /> - -

          - -

          - /> - -

          - -

          - /> - -

          - -

          - /> - -

          - -

          - /> - -

          -
          - -
          -

          -
          - -

          - -

          -
          - -

          - -

          -
          - -

          - -

          -
          - - -

          - -

          -
          - - -

          -
          - -
          -

          -
          - -

          - -

          -
          - -

          - -

          -
          - -

          - -

          -
          - -

          -
          -
          -
          -
          - - - - -
          - -

          - -

          - -
          - - - -
          - - - - - - - - -

          - -

          - -

          - -
          - - - -
          - - - - - - - - - -
          - - - -
          -
          - 'FILTER_CONTENT', - '_meta-generate-page-header-image' => 'FILTER_SANITIZE_URL', - '_meta-generate-page-header-image-id' => 'FILTER_SANITIZE_NUMBER_INT', - '_meta-generate-page-header-image-link' => 'FILTER_SANITIZE_URL', - '_meta-generate-page-header-enable-image-crop' => 'FILTER_SANITIZE_STRING', - '_meta-generate-page-header-image-crop' => 'FILTER_SANITIZE_STRING', - '_meta-generate-page-header-image-width' => 'FILTER_SANITIZE_NUMBER_INT', - '_meta-generate-page-header-image-height' => 'FILTER_SANITIZE_NUMBER_INT', - '_meta-generate-page-header-image-background-type' => 'FILTER_SANITIZE_STRING', - '_meta-generate-page-header-inner-container' => 'FILTER_SANITIZE_STRING', - '_meta-generate-page-header-image-background-alignment' => 'FILTER_SANITIZE_STRING', - '_meta-generate-page-header-image-background-spacing' => 'FILTER_SANITIZE_NUMBER_INT', - '_meta-generate-page-header-image-background-spacing-unit' => 'FILTER_SANITIZE_STRING', - '_meta-generate-page-header-left-right-padding' => 'FILTER_SANITIZE_NUMBER_INT', - '_meta-generate-page-header-left-right-padding-unit' => 'FILTER_SANITIZE_STRING', - '_meta-generate-page-header-image-background-color' => 'FILTER_SANITIZE_STRING', - '_meta-generate-page-header-image-background-text-color' => 'FILTER_SANITIZE_STRING', - '_meta-generate-page-header-image-background-link-color' => 'FILTER_SANITIZE_STRING', - '_meta-generate-page-header-image-background-link-color-hover' => 'FILTER_SANITIZE_STRING', - '_meta-generate-page-header-navigation-background' => 'FILTER_SANITIZE_STRING', - '_meta-generate-page-header-navigation-text' => 'FILTER_SANITIZE_STRING', - '_meta-generate-page-header-navigation-background-hover' => 'FILTER_SANITIZE_STRING', - '_meta-generate-page-header-navigation-text-hover' => 'FILTER_SANITIZE_STRING', - '_meta-generate-page-header-navigation-background-current' => 'FILTER_SANITIZE_STRING', - '_meta-generate-page-header-navigation-text-current' => 'FILTER_SANITIZE_STRING', - '_meta-generate-page-header-site-title' => 'FILTER_SANITIZE_STRING', - '_meta-generate-page-header-site-tagline' => 'FILTER_SANITIZE_STRING', - '_meta-generate-page-header-video' => 'FILTER_SANITIZE_URL', - '_meta-generate-page-header-video-ogv' => 'FILTER_SANITIZE_URL', - '_meta-generate-page-header-video-webm' => 'FILTER_SANITIZE_URL', - '_meta-generate-page-header-video-overlay' => 'FILTER_SANITIZE_STRING', - '_meta-generate-page-header-content-autop' => 'FILTER_SANITIZE_STRING', - '_meta-generate-page-header-content-padding' => 'FILTER_SANITIZE_STRING', - '_meta-generate-page-header-image-background' => 'FILTER_SANITIZE_STRING', - '_meta-generate-page-header-full-screen' => 'FILTER_SANITIZE_STRING', - '_meta-generate-page-header-vertical-center' => 'FILTER_SANITIZE_STRING', - '_meta-generate-page-header-image-background-fixed' => 'FILTER_SANITIZE_STRING', - '_meta-generate-page-header-image-background-overlay' => 'FILTER_SANITIZE_STRING', - '_meta-generate-page-header-combine' => 'FILTER_SANITIZE_STRING', - '_meta-generate-page-header-absolute-position' => 'FILTER_SANITIZE_STRING', - '_meta-generate-page-header-transparent-navigation' => 'FILTER_SANITIZE_STRING', - '_meta-generate-page-header-add-to-excerpt' => 'FILTER_SANITIZE_STRING', - '_meta-generate-page-header-logo' => 'FILTER_SANITIZE_URL', - '_meta-generate-page-header-logo-id' => 'FILTER_SANITIZE_NUMBER_INT', - '_meta-generate-page-header-navigation-logo' => 'FILTER_SANITIZE_URL', - '_meta-generate-page-header-navigation-logo-id' => 'FILTER_SANITIZE_NUMBER_INT', - ); - - if ( ! defined( 'GENERATE_LAYOUT_META_BOX' ) ) { - $options[ '_generate-select-page-header' ] = 'FILTER_SANITIZE_NUMBER_INT'; - } - - foreach ( $options as $key => $sanitize ) { - if ( 'FILTER_SANITIZE_STRING' == $sanitize ) { - $value = filter_input( INPUT_POST, $key, FILTER_SANITIZE_STRING ); - } elseif ( 'FILTER_SANITIZE_URL' == $sanitize ) { - $value = filter_input( INPUT_POST, $key, FILTER_SANITIZE_URL ); - } elseif ( 'FILTER_SANITIZE_NUMBER_INT' == $sanitize ) { - $value = filter_input( INPUT_POST, $key, FILTER_SANITIZE_NUMBER_INT ); - } elseif ( 'FILTER_CONTENT' == $sanitize && isset( $_POST[ $key ] ) ) { - if ( current_user_can( 'unfiltered_html' ) ) { - $value = $_POST[ $key ]; - } else { - $value = wp_kses_post( $_POST[ $key ] ); - } - } else { - $value = filter_input( INPUT_POST, $key, FILTER_DEFAULT ); - } - - if ( $value ) { - update_post_meta( $post_id, $key, $value ); - } else { - delete_post_meta( $post_id, $key ); - } - } - } -} - -add_action( 'add_meta_boxes', 'generate_page_header_tags_add_meta_box' ); -/** - * Add our Template Tags meta box. - * - * @param WP_Post $post Current post object. - * - * @since 1.4 - */ -function generate_page_header_tags_add_meta_box( $post ) { - add_meta_box( 'generate_page_header_tags', __( 'Template Tags', 'gp-premium' ), 'generate_page_header_tags_do_meta_box', 'generate_page_header', 'side', 'low' ); -} - -/** - * Meta box display callback. - * - * @param WP_Post $post Current post object. - * - * @since 1.4 - */ -function generate_page_header_tags_do_meta_box( $post ) { - ?> - -

          - - -

          - - -

          - - -

          - - -

          - - - -
        • - ( ! empty( $options[ 'background_video' ] ) ) ? 'mp4:' . esc_url( $options[ 'background_video' ] ) : null, - 'ogv' => ( ! empty( $options[ 'background_video_ogv' ] ) ) ? 'ogv:' . esc_url( $options[ 'background_video_ogv' ] ) : null, - 'webm' => ( ! empty( $options[ 'background_video_webm' ] ) ) ? 'webm:' . esc_url( $options[ 'background_video_webm' ] ) : null, - 'poster' => ( ! empty( $image_url ) ) ? 'poster:' . esc_url( $image_url ) : null - ); - - // Add our videos to a string - $video_output = array(); - foreach( $video_types as $video => $val ) { - $video_output[] = $val; - } - - $video = null; - // Video variable - if ( $video_enabled && '' !== $options[ 'content' ] ) { - - $ext = ( ! empty( $image_url ) ) ? pathinfo( $image_url, PATHINFO_EXTENSION ) : false; - $video_options = array(); - - if ( $ext ) { - $video_options[ 'posterType' ] = 'posterType:' . $ext; - } else { - $video_options[ 'posterType' ] = 'posterType: none'; - } - - $video_options[ 'className' ] = 'className:generate-page-header-video'; - - if ( apply_filters( 'generate_page_header_video_loop', true ) ) { - $video_options[ 'loop' ] = 'loop:true'; - } else { - $video_options[ 'loop' ] = 'loop:false'; - } - - if ( apply_filters( 'generate_page_header_video_muted', true ) ) { - $video_options[ 'muted' ] = 'muted:true'; - } else { - $video_options[ 'muted' ] = 'muted:false'; - } - - $video_options[ 'autoplay' ] = 'autoplay:false'; - - $video = sprintf( ' data-vide-bg="%1$s" data-vide-options="%2$s"', - implode( ', ', array_filter( $video_output ) ), - implode( ', ', array_filter( $video_options ) ) - ); - } - - // Write a class if we're merging the header - $combined_content = ( '' !== $options[ 'merge' ] ) ? ' generate-combined-page-header' : ''; - - // If content is set, show it - if ( '' !== $options[ 'content' ] && false !== $options[ 'content' ] ) { - printf( - '
          -
          ', - ( 'fluid' == $options[ 'container_type' ] ) ? $video : null, - $content_class . $parallax . $full_screen . $vertical_center_container . $container_type . $combined_content . ' generate-page-header generate-content-header', - ( 'fluid' !== $options[ 'container_type' ] ) ? $video : null, - $vertical_center, - ( '' !== $options[ 'merge' ] ) ? 'generate-merged-header' : '', - ( ! empty( $parallax ) ) ? 'data-parallax-speed="' . esc_attr( $parallax_speed ) . '"' : '', - $options[ 'page_header_id' ] - ); - } - - do_action( 'generate_inside_merged_page_header' ); - } -} - -if ( ! function_exists( 'generate_page_header_area' ) ) { - /** - * Build our entire page header. - * - * @since 0.1 - * - * @param $image_class The class to give our element if it's an image. - * @param $content_class The class to give our element if it's content. - */ - function generate_page_header_area( $image_class, $content_class ) { - // Get our options - $options = generate_page_header_get_options(); - - // Get out of here if we don't have content or an image - if ( '' == $options[ 'content' ] && ! generate_page_header_get_image( 'ALL' ) ) { - return; - } - - $inner_container = ( '' == $options[ 'inner_container' ] ) ? ' grid-container grid-parent' : ''; - - do_action( 'generate_before_page_header' ); - - // If an image is set and no content is set - if ( '' == $options[ 'content' ] && generate_page_header_get_image( 'ALL' ) ) { - - printf( - '
          - %2$s - %4$s - %3$s -
          ', - esc_attr( $image_class ) . $inner_container . ' generate-page-header', - ( ! empty( $options[ 'image_link' ] ) ) ? '' : null, - ( ! empty( $options[ 'image_link' ] ) ) ? '' : null, - generate_page_header_get_image_output() - ); - - } - - // If content is set, show it - if ( '' !== $options[ 'content' ] && false !== $options[ 'content' ] ) { - // If we're not merging our header, we can start the container here - // If we were merging, the container would be added in the generate_before_header hook - if ( '' == $options[ 'merge' ] ) { - generate_page_header_area_start_container( 'page-header-image', 'page-header-content' ); - } - - // Replace any found template tags - $options[ 'content' ] = generate_page_header_template_tags( $options[ 'content' ] ); - - // Print the rest of our page header HTML - // The starting elements are inside generate_page_header_area_start_container() - printf ( '
          -
          - %4$s - %6$s - %5$s -
          -
          -
          -
          ', - ( '' !== $options[ 'merge' ] ) ? 'generate-combined-content' : '', - $inner_container, - ( '' !== $options[ 'merge' ] ) ? 'generate-inside-combined-content' : 'generate-inside-page-header-content', - ( ! empty( $options[ 'add_padding' ] ) ) ? '
          ' : null, - ( ! empty( $options[ 'add_padding' ] ) ) ? '
          ' : null, - ( ! empty( $options[ 'autop' ] ) ) ? do_shortcode( wpautop( $options[ 'content' ] ) ) : do_shortcode( $options[ 'content' ] ) - ); - } - - do_action( 'generate_after_page_header' ); - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/page-header/functions/post-image.php b/wp-content/upgrade-temp-backup/plugins/gp-premium/page-header/functions/post-image.php deleted file mode 100644 index b88250ad..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/page-header/functions/post-image.php +++ /dev/null @@ -1,60 +0,0 @@ - - %2$s - %4$s - %3$s - ', - 'post-image page-header-post-image', - ( ! empty( $options[ 'image_link' ] ) ) ? '' : null, - ( ! empty( $options[ 'image_link' ] ) ) ? '' : null, - generate_page_header_get_image_output() - ); - } - - // If content is set, show it - if ( '' !== $options[ 'content' ] && false !== $options[ 'content' ] ) { - printf( - '
          -
          - %3$s - %5$s - %4$s -
          -
          ', - 'post-image generate-page-header generate-post-content-header page-header-post-image', - 'inside-page-header-container inside-post-content-header grid-container grid-parent', - ( ! empty( $options[ 'add_padding' ] ) ) ? '
          ' : null, - ( ! empty( $options[ 'add_padding' ] ) ) ? '
          ' : null, - ( ! empty( $options[ 'autop' ] ) ) ? do_shortcode( wpautop( $options[ 'content' ] ) ) : do_shortcode( $options[ 'content' ] ) - ); - } - } - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/page-header/functions/post-type.php b/wp-content/upgrade-temp-backup/plugins/gp-premium/page-header/functions/post-type.php deleted file mode 100644 index 9768b43c..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/page-header/functions/post-type.php +++ /dev/null @@ -1,236 +0,0 @@ - _x( 'Page Headers', 'Post Type General Name', 'gp-premium' ), - 'singular_name' => _x( 'Page Header', 'Post Type Singular Name', 'gp-premium' ), - 'menu_name' => __( 'Page Headers', 'gp-premium' ), - 'name_admin_bar' => __( 'Page Header', 'gp-premium' ), - 'archives' => __( 'Page Header Archives', 'gp-premium' ), - 'parent_item_colon' => __( 'Parent Page Header:', 'gp-premium' ), - 'all_items' => __( 'All Page Headers', 'gp-premium' ), - 'add_new_item' => __( 'Add New Page Header', 'gp-premium' ), - 'new_item' => __( 'New Page Header', 'gp-premium' ), - 'edit_item' => __( 'Edit Page Header', 'gp-premium' ), - 'update_item' => __( 'Update Page Header', 'gp-premium' ), - 'view_item' => __( 'View Page Header', 'gp-premium' ), - 'search_items' => __( 'Search Page Header', 'gp-premium' ), - 'insert_into_item' => __( 'Insert into Page Header', 'gp-premium' ), - 'uploaded_to_this_item' => __( 'Uploaded to this Page Header', 'gp-premium' ), - ); - $args = array( - 'label' => __( 'Page Header', 'gp-premium' ), - 'labels' => $labels, - 'supports' => array( 'title', 'thumbnail' ), - 'hierarchical' => false, - 'public' => false, - 'show_ui' => true, - 'show_in_menu' => function_exists( 'generate_premium_do_elements' ) ? false : true, - 'menu_position' => 100, - 'menu_icon' => 'dashicons-welcome-widgets-menus', - 'show_in_admin_bar' => false, - 'show_in_nav_menus' => false, - 'can_export' => true, - 'has_archive' => false, - 'exclude_from_search' => true, - 'publicly_queryable' => false, - 'capability_type' => 'page', - ); - register_post_type( 'generate_page_header', $args ); - - $post_types = get_post_types( array( 'public' => true ) ); - $term_args = array( - 'sanitize_callback' => 'int', - 'type' => 'string', - 'description' => '', - 'single' => true, - 'show_in_rest' => true, - ); - foreach ( $post_types as $type ) { - register_meta( $type, 'generate_page_header', $term_args ); - } - - $taxonomies = get_taxonomies( array( 'public' => true ) ); - if ( $taxonomies ) { - foreach ( $taxonomies as $taxonomy ) { - add_action( $taxonomy . '_add_form_fields', 'generate_page_header_tax_new_ph_field' ); - add_action( $taxonomy . '_edit_form_fields', 'generate_page_header_tax_edit_ph_field' ); - add_action( 'edit_' . $taxonomy, 'generate_page_header_tax_save_ph' ); - add_action( 'create_' . $taxonomy, 'generate_page_header_tax_save_ph' ); - } - } -} - -add_action( 'admin_menu', 'generate_old_page_header_options_page' ); -/** - * Add our submenu page to the Appearance tab. - * - * @since 1.7 - */ -function generate_old_page_header_options_page() { - if ( ! function_exists( 'generate_premium_do_elements' ) ) { - return; - } - - add_submenu_page( - 'themes.php', - esc_html__( 'Page Headers', 'gp-premium' ), - esc_html__( 'Page Headers', 'gp-premium' ), - 'manage_options', - 'edit.php?post_type=generate_page_header' - ); -} - -add_action( 'admin_head', 'generate_old_page_header_fix_menu' ); -/** - * Set our current menu in the admin while in the old Page Header pages. - * - * @since 1.7 - */ -function generate_old_page_header_fix_menu() { - if ( ! function_exists( 'generate_premium_do_elements' ) ) { - return; - } - - global $parent_file, $submenu_file, $post_type; - - $screen = get_current_screen(); - - if ( 'generate_page_header' === $post_type || 'appearance_page_page-header-global-locations' === $screen->base ) { - $parent_file = 'themes.php'; - $submenu_file = 'edit.php?post_type=gp_elements'; - } - - remove_submenu_page( 'themes.php', 'edit.php?post_type=generate_page_header' ); - remove_submenu_page( 'themes.php', 'page-header-global-locations' ); -} - -add_action( 'admin_head', 'generate_page_header_add_legacy_locations_button', 999 ); -/** - * Add legacy buttons to our new GP Elements post type. - * - * @since 1.7 - */ -function generate_page_header_add_legacy_locations_button() { - if ( ! function_exists( 'generate_premium_do_elements' ) ) { - return; - } - - $screen = get_current_screen(); - - if ( 'generate_page_header' === $screen->post_type ) : - ?> - - post_type && 'edit' === $screen->base ) : - ?> - - -
          - - -
          - - - - - - - - - - - tag in metabox -* Elements: Add generate_elements_metabox_ajax_allow_editors filter -* Elements: Add new 3.0 hooks to hook selector -* Elements: Re-add generate_elements_custom_args filter -* Menu Plus: Better prepare navigation as header for GP 3.0 -* Menu Plus: Better prepare Off-Canvas Panel for GP 3.0 -* Menu Plus: Better prepare sticky navigation for GP 3.0 -* Menu Plus: Add has-menu-bar-items class to mobile header if needed -* Menu Plus: Add is-logo-image class to all site logos -* Menu Plus: Fix mobile header alignment when it has menu bar items -* Secondary Nav: Better prepare sticky navigation for GP 3.0 -* Secondary Nav: Fix hidden navigation widget in top bar when merged with secondary nav -* Sites: Improve the option-only import feature -* Sites: Improve the refresh sites button functionality -* Sites: Improve the undo site import functionality -* Sites: Fix Elementor site import issues -* Sites: Re-add Elementor sites to library -* Spacing: Better prepare Customizer live preview for GP 3.0 -* Spacing: Fix blog column spacing Customizer live preview -* Spacing: Stop handling mobile header, widget and footer widget features added in GP 3.0 -* Typography: Add mobile font size control for H3 (when using GP 3.0) -* Typography: Add mobile font size control for H4 (when using GP 3.0) -* Typography: Add mobile font size control for H5 (when using GP 3.0) -* Typography: Allow empty tablet and mobile site title font size values -* Typography: Make menu toggle CSS selector specific to primary navigation -* WooCommerce: Use CSS for secondary product image functionality instead of JS -* WooCommerce: Only load .js file if needed -* WooCommerce: Fix quantity box functionality when multiple quantity boxes exist on the page -* General: Improve alpha color picker script for better 5.5 compatibility -* General: Move child theme stylesheet after dynamic stylesheet if enabled -* General: Update gp-premium-de_DE.mo -* General: Update gp-premium-es_ES.mo -* General: Update gp-premium-fi.mo -* General: Update gp-premium-pt_PT.mo -* General: Update gp-premium-sv_SE.mo - -= 1.11.3 = -* Blog: Set widths to grid-sizer element -* Elements: Fix legacy Page Header/Hooks buttons in the Elements dashboard -* Page Header: Replace .load() with .on('load') -* Page Header: Fix color picker error in WP 5.5 - -= 1.11.2 = -* Blog: Remove negative featured image top margin from columns when using one container -* Blog: Fix infinite scroll items loading above viewport when using columns -* Blog: Fix infinite scroll featured images not displaying in Safari -* Elements: Prevent error in editor when generate_get_option() function doesn't exist -* General: Load inline CSS in previews when using external CSS option -* General: Update gp-premium-es_ES.mo -* General: Update gp-premium-pt_PT.mo - -= 1.11.1 = -* Elements: Remove stray quote character in Layout Element metabox -* Sections: Fix color picker JS error in WP 5.5 -* General: Fix external CSS option not removing inline CSS in some cases - -= 1.11.0 = -* New: Block Elements -* New: Apply Layout Element options to the block editor if set -* New: Generate dynamic CSS in an external file -* Blog: Separate CSS and load only when needed -* Blog: Add column width classes to stylesheet -* Blog: Disable featured image itemprop if microdata is disabled -* Blog: Add generate_blog_masonry_init filter -* Blog: Add generate_blog_infinite_scroll_init filter -* Blog: Fix archive page header overlap when using no featured image padding/one container -* Blog: Replace screen reader text with aria-label in read more buttons -* Disable Elements: Add option to disable the Mobile Header -* Disable Elements: Disable top bar disables it even when combined with Secondary Nav -* Disable Elements: Use generate_show_post_navigation filter to disable single post navigation -* Elements: Use full hook name with generate_ prefix in dropdown -* Elements: Rebuild how Element types are chosen -* Elements: Add chosen hook under type column in edit.php -* Menu Plus: Add generate_after_mobile_header_menu_button filter -* Menu Plus: Add sticky placeholder only when nav becomes sticky -* Menu Plus: Add class to sticky nav when scrolling up -* Menu Plus: Fix navigation branding/mobile header layout when using RTL languages -* Page Header: Prevent PHP notices -* Secondary Nav: Clean up CSS -* Secondary Nav: Add generate_after_secondary_navigation hook -* Secondary Nav: Add generate_before_secondary_navigation hook -* Secondary Nav: Integrate with future flexbox option -* Secondary Nav: Add has-top-bar class if needed -* Secondary Nav: Add screen reader text to mobile menu toggle if no text exists -* Secondary Nav: Remove microdata if disabled -* Secondary Nav: Add generate_secondary_menu_bar_items hook -* Spacing: Set sidebar width in Customizer for future flexbox option -* WooCommerce: Add generate_woocommerce_show_add_to_cart_panel filter -* WooCommerce: Integrate with future flexbox option -* WooCommerce: Ensure WC()->cart is set -* WooCommerce: Remove left margin from SVG menu cart icon -* WooCommerce: Show sticky add to cart panel on sold individually products -* WooCommerce: Remove bottom margin from related/upsell products -* WooCommerce: Fix cart menu item spacing in RTL languages -* WooCommerce: Fix menu item cart dropdown design in RTL languages -* General: Update selectWoo -* General: Update select2 -* General: Run all CSS through PostCSS -* General: Fix various text domains -* General: Fix JS error when toggling nav as header option without Colors/Typography modules -* General: Update all translations over 90% complete -* General: PHP cleanup/coding standards -* General: Add off_canvas_desktop_toggle_label to wpml-config.xml - -= 1.10.0 = -* Blog: Remove existing on-the-fly featured image resizer (Image Processing Queue) -* Blog: Choose from existing image sizes for featured images -* Blog: Use CSS to further resize featured images if necessary -* Blog: Fix edge case persistent transient bug with old image resizer -* Elements: Fix broken closing element in metabox -* General: Change scroll variable to gpscroll in smooth scroll script to avoid conflicts -* General: Update responsive widths in Customizer -* General: Fix responsive Customizer views when using RTL -* Menu Plus: Don't output sticky nav branding if sticky nav is disabled -* Menu Plus: Fix focus when off canvas overlay is opened (a11y) -* Menu Plus: Fix sticky navigation jump when navigation branding is in use -* Sections: Fix visible block editor when Sections are enabled -* WooCommerce: Use minmax in grid template definitions to fix overflow issue -* WooCommerce: Prevent add to cart panel interfering with back to top button on mobile -* WooCommerce: WooCommerce: Fix secondary image position if HTML isn't ordered correctly -* General: Add/update all translations over 50% complete. Big thanks to all contributors! -* Translation: Added Arabic - thank you anass! -* Translation: Added Bengali - thank you gtmroy! -* Translation: Added Spanish (Spain) - thank you davidperez (closemarketing.es)! -* Translation: Added Spanish (Argentina) - thank you bratorr! -* Translation: Added Finnish - thank you Stedi! -* Translation: Add Dutch - thank you Robin! -* Translation: Added Ukrainian - thank you EUROMEDIA! -* Translation: Vietnamese added - thank you themevi! - -= 1.9.1 = -* Blog: Fix "null" in infinite scroll load more button text -* WooCommerce: Fix hidden added to cart panel on mobile when sticky nav active -* WooCommerce: Fix missing SVG icon in mobile added to cart panel - -= 1.9.0 = -* Blog: Support SVG icon feature -* Colors: Add navigation search color options -* Disable Elements: Disable mobile menu in Mobile Header if nav is disabled -* Elements: Add wp_body_open hook -* Elements: Allow 0 mobile padding in Elements -* Elements: Add generate_elements_admin_menu_capability filter -* Elements: Add generate_page_hero_css_output filter -* Elements: Prevent error in Header Element if taxonomy doesn't exist -* Elements: Fix double logo when Header Element has logo + using nav as header -* Elements: Fix mobile header logo not replacing if merge is disabled -* Elements: Fix missing arrow in Choose Element Type select in WP 5.3 -* Elements: Add generate_inside_site_container hook option -* Elements: Add generate_after_entry_content hook option -* Menu Plus: Add off canvas desktop toggle label option -* Menu Plus: Add generate_off_canvas_toggle_output filter -* Menu Plus: Support SVG icon feature -* Menu Plus: Fix sticky navigation overlapping BB controls -* Menu Plus: Add align-items: center to nav as header, mobile header and sticky nav with branding -* Sections: Fix text/visual switch bug in Firefox -* Sites: Add option to revert site import -* Sites: Increase site library limit to 100 -* Spacing: Add live preview to group container padding -* Typography: Add tablet site title/navigation font size options -* Typography: Add archive post title weight, transform, font size and line height -* Typography: Add single content title weight, transform, font size and line height -* Typography: Only call all google fonts once in the Customizer -* Typography: Get Google fonts from readable JSON list -* Typography: Make sure font settings aren't lost if list is changed -* Typography: Only call generate_get_all_google_fonts if needed -* WooCommerce: Add columns gap options (desktop, tablet, mobile) -* WooCommerce: Add tablet column options -* WooCommerce: Add related/upsell tablet column options -* WooCommerce: Support SVG icon feature -* WooCommerce: Prevent empty added to cart panel on single products -* WooCommerce: Fix woocommerce-ordering arrow in old FF versions -* WooCommerce: Make item/items string translatable -* General: Better customizer device widths -* General: Use generate_premium_get_media_query throughout modules -* General: Improve Customizer control styling - -= 1.8.3 = -* Menu Plus: Use flexbox for center aligned nav with nav branding -* Menu Plus: Center overlay off canvas exit button on mobile -* Menu Plus: Add alt tag to sticky nav logo -* Menu Plus: Set generate_not_mobile_menu_media_query filter based on mobile menu breakpoint -* Sections: Remember when text tab is active -* Sections: Disable visual editor if turned off in profile -* Typography: Add generate_google_font_display filter -* WooCommerce: Fix single product sidebar layout metabox option -* WooCommerce: Reduce carousel thumbnail max-width to 100px to match new thumbnail sizes - -= 1.8.2 = -* Elements: Use Page Hero site title color for mobile header site title -* Menu Plus: Give mobile header site title more left spacing -* Menu Plus: Fix nav search icon in sticky navigation when using nav branding in Firefox -* Site Library: Show Site Library tab even if no sites exist -* Site Library: Show an error message in Site Library if no sites exist -* Typography: Remove reference to generate_get_navigation_location() function -* WooCommerce: Remove quantity field arrows when using quantity buttons in Firefox -* WooCommerce: Remove extra border when loading quantity buttons -* WooCommerce: Use get_price_html() is sticky add to cart panel - -= 1.8.1 = -* Menu Plus: Revert sticky nav duplicate ID fix due to Cyrillic script bug - -= 1.8 = -* Blog: Apply columns filter to masonry grid sizer -* Colors: Merge Footer Widgets and Footer controls in Color panel -* Colors: Remove edit_theme_options capability to Customizer controls (set by default) -* Disable Elements: Make sure mobile header is disabled when primary navigation is disabled -* Elements: Add content width option in Layout Element -* Elements: Fix mobile header logo when mobile menu toggled -* Elements: Add generate_page_hero_location filter -* Elements: Add generate_elements_show_object_ids filter to show IDs in Display Rule values -* Elements: Prevent merged header wrap from conflicting with Elementor controls -* Elements: Change Container tab name to Content -* Elements: Add woocommerce_share option to Hooks -* Elements: Improve WPML compatibility -* Elements: Improve Polylang compatibility -* Elements: Prevent PHP notices when adding taxonomy locations to non-existent archives -* Elements: Add generate_mobile_cart_items hook to hook list -* Elements: Add generate_element_post_id filter -* Elements: Escape HTML elements inside Element textarea -* Elements: Add Beaver Builder templates to the Display Rules -* Menu Plus: Add mobile header breakpoint option -* Menu Plus: Add off canvas overlay option -* Menu Plus: Add navigation as header option -* Menu Plus: Remove navigation logo option if navigation as header set -* Menu Plus: Add sticky navigation logo option -* Menu Plus: Allow site title in mobile header instead of logo -* Menu Plus: Add option to move exit button inside the off canvas panel -* Menu Plus: Change Slideout Navigation name to Off Canvas Panel -* Menu Plus: Only re-focus after slideout close on escape key -* Menu Plus: Give close slideout event a name so it can be removed -* Menu Plus: Remove invalid transition-delay -* Menu Plus: Improve slideout overlay transition -* Menu Plus: Add mobile open/close icons to GPP font -* Menu Plus: Allow dynamic widget classes in off canvas panel (fixes WC range slider widget issue) -* Menu Plus: Basic compatibility with future SVG icons -* Menu Plus: Prevent duplicate IDs when sticky navigation is cloned -* Secondary Nav: Add dropdown direction option -* Secondary Nav: Basic compatibility with future SVG icons -* Sections: Fix section editor issues in WP 5.0 -* Sections: Show Better Font Awesome icon in editor -* Sites: Re-design UI -* Sites: Add option to activate as a module like all the other modules -* Sites: Don't show backup options button if no options exist -* Sites: Make JS action classes more specific to the site library -* Sites: Set mime types of content.xml and widgets.wie -* Spacing: Add header padding option for mobile -* Spacing: Add widget padding option for mobile -* Spacing: Add footer widgets padding option for mobile -* Spacing: Add content separator option -* Spacing: Apply mobile menu item width to mobile bar only -* WooCommerce: Add option for mini cart in the menu -* WooCommerce: Add option to open off overlay panel on add to cart -* WooCommerce: Add option to open sticky add to cart panel on single products -* WooCommerce: Add option to add +/- buttons to the quantity fields -* WooCommerce: Add option to show number of items in cart menu item -* WooCommerce: Add option to choose single product image area width -* WooCommerce: Add color options for price slider widget -* WooCommerce: Use CSS grid for the product archives -* WooCommerce: Horizontally align add to cart buttons -* WooCommerce: Re-design the cart widget -* WooCommerce: Tighten up product info spacing -* WooCommerce: Improve product tab design to look more like tabs -* WooCommerce: Simplify single product image display -* WooCommerce: Use flexbox for quantity/add to cart alignment -* WooCommerce: Improve rating star styles -* WooCommerce: Use product alignment setting for related/upsell products -* WooCommerce: Remove bottom margin from product image -* WooCommerce: Organize colors in the Customizer -* WooCommerce: Remove title attribute from menu cart item -* WooCommerce: Improve coupon field design -* WooCommerce: Improve result count/ordering styling -* WooCommerce: Add gap around WC single product images -* WooCommerce: Remove arrow from checkout button -* WooCommerce: Hide view cart link on add to cart click -* WooCommerce: Organize CSS -* Introduce in-Customizer shortcuts -* Add generate_disable_customizer_shortcuts filter diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/secondary-nav/fields/secondary-navigation.php b/wp-content/upgrade-temp-backup/plugins/gp-premium/secondary-nav/fields/secondary-navigation.php deleted file mode 100644 index d2bffea0..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/secondary-nav/fields/secondary-navigation.php +++ /dev/null @@ -1,174 +0,0 @@ - a, .secondary-navigation .main-nav ul li:not([class*="current-menu-"]):focus > a, .secondary-navigation .main-nav ul li.sfHover:not([class*="current-menu-"]) > a, .secondary-navigation .menu-bar-item:hover > a, .secondary-navigation .menu-bar-item.sfHover > a'; - $menu_current_selectors = '.secondary-navigation .main-nav ul li[class*="current-menu-"] > a'; - $submenu_hover_selectors = '.secondary-navigation .main-nav ul ul li:not([class*="current-menu-"]):hover > a, .secondary-navigation .main-nav ul ul li:not([class*="current-menu-"]):focus > a, .secondary-navigation .main-nav ul ul li.sfHover:not([class*="current-menu-"]) > a'; - $submenu_current_selectors = '.secondary-navigation .main-nav ul ul li[class*="current-menu-"] > a'; - - GeneratePress_Customize_Field::add_title( - 'generate_secondary_navigation_colors_title', - array( - 'section' => 'generate_colors_section', - 'title' => __( 'Secondary Navigation', 'gp-premium' ), - 'choices' => array( - 'toggleId' => 'secondary-navigation-colors', - ), - ) - ); - - // Navigation background group. - GeneratePress_Customize_Field::add_color_field_group( - 'secondary_navigation_background', - 'generate_colors_section', - 'secondary-navigation-colors', - array( - 'generate_secondary_nav_settings[navigation_background_color]' => array( - 'default_value' => $secondary_color_defaults['navigation_background_color'], - 'label' => __( 'Navigation Background', 'gp-premium' ), - 'tooltip' => __( 'Choose Initial Color', 'gp-premium' ), - 'element' => '.secondary-navigation', - 'property' => 'background-color', - 'hide_label' => false, - ), - 'generate_secondary_nav_settings[navigation_background_hover_color]' => array( - 'default_value' => $secondary_color_defaults['navigation_background_hover_color'], - 'label' => __( 'Navigation Background Hover', 'gp-premium' ), - 'tooltip' => __( 'Choose Hover Color', 'gp-premium' ), - 'element' => $menu_hover_selectors, - 'property' => 'background-color', - 'hide_label' => true, - ), - 'generate_secondary_nav_settings[navigation_background_current_color]' => array( - 'default_value' => $secondary_color_defaults['navigation_background_current_color'], - 'label' => __( 'Navigation Background Current', 'gp-premium' ), - 'tooltip' => __( 'Choose Current Color', 'gp-premium' ), - 'element' => $menu_current_selectors, - 'property' => 'background-color', - 'hide_label' => true, - ), - ) - ); - - // Navigation text group. - GeneratePress_Customize_Field::add_color_field_group( - 'secondary_navigation_text', - 'generate_colors_section', - 'secondary-navigation-colors', - array( - 'generate_secondary_nav_settings[navigation_text_color]' => array( - 'default_value' => $secondary_color_defaults['navigation_text_color'], - 'label' => __( 'Navigation Text', 'gp-premium' ), - 'tooltip' => __( 'Choose Initial Color', 'gp-premium' ), - 'element' => '.secondary-navigation .main-nav ul li a, .secondary-navigation .menu-toggle, .secondary-navigation button.menu-toggle:hover, .secondary-navigation button.menu-toggle:focus, .secondary-navigation .mobile-bar-items a, .secondary-navigation .mobile-bar-items a:hover, .secondary-navigation .mobile-bar-items a:focus, .secondary-navigation .menu-bar-items', - 'property' => 'color', - 'hide_label' => false, - ), - 'generate_secondary_nav_settings[navigation_text_hover_color]' => array( - 'default_value' => $secondary_color_defaults['navigation_text_hover_color'], - 'label' => __( 'Navigation Text Hover', 'gp-premium' ), - 'tooltip' => __( 'Choose Hover Color', 'gp-premium' ), - 'element' => $menu_hover_selectors, - 'property' => 'color', - 'hide_label' => true, - ), - 'generate_secondary_nav_settings[navigation_text_current_color]' => array( - 'default_value' => $secondary_color_defaults['navigation_text_current_color'], - 'label' => __( 'Navigation Text Current', 'gp-premium' ), - 'tooltip' => __( 'Choose Current Color', 'gp-premium' ), - 'element' => $menu_current_selectors, - 'property' => 'color', - 'hide_label' => true, - ), - ) - ); - - // Sub-Menu background group. - GeneratePress_Customize_Field::add_color_field_group( - 'secondary_navigation_submenu_background', - 'generate_colors_section', - 'secondary-navigation-colors', - array( - 'generate_secondary_nav_settings[subnavigation_background_color]' => array( - 'default_value' => $secondary_color_defaults['subnavigation_background_color'], - 'label' => __( 'Sub-Menu Background', 'gp-premium' ), - 'tooltip' => __( 'Choose Initial Color', 'gp-premium' ), - 'element' => '.secondary-navigation ul ul', - 'property' => 'background-color', - 'hide_label' => false, - ), - 'generate_secondary_nav_settings[subnavigation_background_hover_color]' => array( - 'default_value' => $secondary_color_defaults['subnavigation_background_hover_color'], - 'label' => __( 'Sub-Menu Background Hover', 'gp-premium' ), - 'tooltip' => __( 'Choose Hover Color', 'gp-premium' ), - 'element' => $submenu_hover_selectors, - 'property' => 'background-color', - 'hide_label' => true, - ), - 'generate_secondary_nav_settings[subnavigation_background_current_color]' => array( - 'default_value' => $secondary_color_defaults['subnavigation_background_current_color'], - 'label' => __( 'Sub-Menu Background Current', 'gp-premium' ), - 'tooltip' => __( 'Choose Current Color', 'gp-premium' ), - 'element' => $submenu_current_selectors, - 'property' => 'background-color', - 'hide_label' => true, - ), - ) - ); - - // Sub-Menu text group. - GeneratePress_Customize_Field::add_color_field_group( - 'secondary_navigation_submenu_text', - 'generate_colors_section', - 'secondary-navigation-colors', - array( - 'generate_secondary_nav_settings[subnavigation_text_color]' => array( - 'default_value' => $secondary_color_defaults['subnavigation_text_color'], - 'label' => __( 'Sub-Menu Text', 'gp-premium' ), - 'tooltip' => __( 'Choose Initial Color', 'gp-premium' ), - 'element' => '.secondary-navigation .main-nav ul ul li a', - 'property' => 'color', - 'hide_label' => false, - ), - 'generate_secondary_nav_settings[subnavigation_text_hover_color]' => array( - 'default_value' => $secondary_color_defaults['subnavigation_text_hover_color'], - 'label' => __( 'Sub-Menu Text Hover', 'gp-premium' ), - 'tooltip' => __( 'Choose Hover Color', 'gp-premium' ), - 'element' => $submenu_hover_selectors, - 'property' => 'color', - 'hide_label' => true, - ), - 'generate_secondary_nav_settings[subnavigation_text_current_color]' => array( - 'default_value' => $secondary_color_defaults['subnavigation_text_current_color'], - 'label' => __( 'Sub-Menu Text Current', 'gp-premium' ), - 'tooltip' => __( 'Choose Current Color', 'gp-premium' ), - 'element' => $submenu_current_selectors, - 'property' => 'color', - 'hide_label' => true, - ), - ) - ); - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/secondary-nav/functions/css.php b/wp-content/upgrade-temp-backup/plugins/gp-premium/secondary-nav/functions/css.php deleted file mode 100644 index 370c5ef8..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/secondary-nav/functions/css.php +++ /dev/null @@ -1,138 +0,0 @@ -_selector ) { - $this->add_selector_rules_to_output(); - } - - $this->_selector = $selector; - return $this; - } - - /** - * Adds a css property with value to the css output. - * - * @access public - * @since 1.0 - * - * @param string $property - the css property. - * @param string $value - the value to be placed with the property. - * @param string $og_default - check to see if the value matches the default. - * @param string $unit - the unit for the value (px). - * @return $this - */ - public function add_property( $property, $value, $og_default = false, $unit = false ) { - // Add our unit to the value if it exists. - if ( $unit && '' !== $unit ) { - $value = $value . $unit; - if ( '' !== $og_default ) { - $og_default = $og_default . $unit; - } - } - - // If we don't have a value or our value is the same as our og default, bail. - if ( empty( $value ) || $og_default == $value ) { - return false; - } - - $this->_css .= $property . ':' . $value . ';'; - return $this; - } - - /** - * Adds the current selector rules to the output variable - * - * @access private - * @since 1.0 - * - * @return $this - */ - private function add_selector_rules_to_output() { - if ( ! empty( $this->_css ) ) { - $this->_selector_output = $this->_selector; - $selector_output = sprintf( '%1$s{%2$s}', $this->_selector_output, $this->_css ); - - $this->_output .= $selector_output; - - // Reset the css. - $this->_css = ''; - } - - return $this; - } - - /** - * Returns the minified css in the $_output variable - * - * @access public - * @since 1.0 - * - * @return string - */ - public function css_output() { - // Add current selector's rules to output. - $this->add_selector_rules_to_output(); - - // Output minified css. - return $this->_output; - } - - } -endif; diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/secondary-nav/functions/css/main-mobile.css b/wp-content/upgrade-temp-backup/plugins/gp-premium/secondary-nav/functions/css/main-mobile.css deleted file mode 100644 index ed9b708c..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/secondary-nav/functions/css/main-mobile.css +++ /dev/null @@ -1,125 +0,0 @@ -.secondary-navigation.toggled ul ul { - transition: 0s; - visibility: hidden; - float: none; -} - -.secondary-navigation.toggled ul ul.toggled-on { - visibility: visible; -} - -.secondary-navigation.toggled .main-nav ul ul { - position: relative; - top: 0; - left: 0; - width: 100%; - box-shadow: none; - border-bottom: 1px solid rgba(0, 0, 0, 0.05); -} - -.secondary-navigation.toggled .main-nav ul ul li:last-child > ul { - border-bottom: 0; -} - -.secondary-navigation.toggled .main-nav ul ul.toggled-on { - position: relative; - top: 0; - left: auto !important; - right: auto !important; - width: 100%; - pointer-events: auto; - height: auto; - opacity: 1; - display: block; -} - -.secondary-navigation.toggled .main-nav > ul { - display: block; -} - -.secondary-navigation.toggled .main-nav .sf-menu > li { - float: none; - clear: both; - display: block !important; - text-align: left !important; -} - -.secondary-navigation.toggled .main-nav .sf-menu > li.hide-on-mobile { - display: none !important; -} - -.secondary-navigation.toggled .dropdown-menu-toggle:before { - content: "\f107" !important; -} - -.secondary-navigation.toggled .sfHover > a .dropdown-menu-toggle:before { - content: "\f106" !important; -} - -.secondary-navigation.toggled .menu-item-has-children .dropdown-menu-toggle { - float: right; -} - -.dropdown-hover .secondary-navigation.toggled ul li:hover > ul, -.dropdown-hover .secondary-navigation.toggled ul li.sfHover > ul { - transition-delay: 0s; -} - -.rtl .secondary-navigation.toggled .main-nav .sf-menu > li { - text-align: right !important; -} - -@media (max-width: 768px) { - .secondary-navigation .menu-toggle { - display: block; - } - .secondary-navigation ul, - .secondary-navigation:not(.toggled) .main-nav > ul { - display: none; - } - .secondary-navigation.toggled .main-nav { - flex-basis: 100%; - order: 3; - } - .secondary-nav-aligned-left .secondary-navigation.has-top-bar .menu-toggle { - text-align: left; - } - .secondary-nav-aligned-left .secondary-navigation .top-bar { - order: 2; - } - .secondary-nav-aligned-right .secondary-navigation.has-top-bar .menu-toggle { - text-align: right; - } - .secondary-navigation.has-top-bar .top-bar .inside-top-bar .widget { - margin: 0 20px; - } - .secondary-nav-aligned-center .secondary-navigation .top-bar { - flex-basis: 100%; - } - .secondary-nav-float-right .secondary-navigation { - margin-left: 0; - width: 100%; - margin-top: 1.5em; - } - .secondary-nav-float-right .header-widget { - margin-left: auto; - } - .secondary-nav-float-left .secondary-navigation, - .secondary-nav-float-left .multi-navigation-wrapper { - margin-left: 0; - width: 100%; - margin-top: 1.5em; - } - .secondary-nav-float-left:not(.nav-float-right) .header-widget { - margin-left: auto; - margin-right: auto; - order: unset; - } - .secondary-nav-float-left .site-logo, - .secondary-nav-float-left .site-branding { - order: unset; - } - .secondary-navigation.has-top-bar .inside-navigation, .secondary-navigation.has-menu-bar-items .inside-navigation { - justify-content: space-between; - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/secondary-nav/functions/css/main-mobile.min.css b/wp-content/upgrade-temp-backup/plugins/gp-premium/secondary-nav/functions/css/main-mobile.min.css deleted file mode 100644 index 567c5024..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/secondary-nav/functions/css/main-mobile.min.css +++ /dev/null @@ -1 +0,0 @@ -.secondary-navigation.toggled ul ul{transition:0s;visibility:hidden;float:none}.secondary-navigation.toggled ul ul.toggled-on{visibility:visible}.secondary-navigation.toggled .main-nav ul ul{position:relative;top:0;left:0;width:100%;box-shadow:none;border-bottom:1px solid rgba(0,0,0,.05)}.secondary-navigation.toggled .main-nav ul ul li:last-child>ul{border-bottom:0}.secondary-navigation.toggled .main-nav ul ul.toggled-on{position:relative;top:0;left:auto!important;right:auto!important;width:100%;pointer-events:auto;height:auto;opacity:1;display:block}.secondary-navigation.toggled .main-nav>ul{display:block}.secondary-navigation.toggled .main-nav .sf-menu>li{float:none;clear:both;display:block!important;text-align:left!important}.secondary-navigation.toggled .main-nav .sf-menu>li.hide-on-mobile{display:none!important}.secondary-navigation.toggled .dropdown-menu-toggle:before{content:"\f107"!important}.secondary-navigation.toggled .sfHover>a .dropdown-menu-toggle:before{content:"\f106"!important}.secondary-navigation.toggled .menu-item-has-children .dropdown-menu-toggle{float:right}.dropdown-hover .secondary-navigation.toggled ul li.sfHover>ul,.dropdown-hover .secondary-navigation.toggled ul li:hover>ul{transition-delay:0s}.rtl .secondary-navigation.toggled .main-nav .sf-menu>li{text-align:right!important}@media (max-width:768px){.secondary-navigation .menu-toggle{display:block}.secondary-navigation ul,.secondary-navigation:not(.toggled) .main-nav>ul{display:none}.secondary-navigation.toggled .main-nav{flex-basis:100%;order:3}.secondary-nav-aligned-left .secondary-navigation.has-top-bar .menu-toggle{text-align:left}.secondary-nav-aligned-left .secondary-navigation .top-bar{order:2}.secondary-nav-aligned-right .secondary-navigation.has-top-bar .menu-toggle{text-align:right}.secondary-navigation.has-top-bar .top-bar .inside-top-bar .widget{margin:0 20px}.secondary-nav-aligned-center .secondary-navigation .top-bar{flex-basis:100%}.secondary-nav-float-right .secondary-navigation{margin-left:0;width:100%;margin-top:1.5em}.secondary-nav-float-right .header-widget{margin-left:auto}.secondary-nav-float-left .multi-navigation-wrapper,.secondary-nav-float-left .secondary-navigation{margin-left:0;width:100%;margin-top:1.5em}.secondary-nav-float-left:not(.nav-float-right) .header-widget{margin-left:auto;margin-right:auto;order:unset}.secondary-nav-float-left .site-branding,.secondary-nav-float-left .site-logo{order:unset}.secondary-navigation.has-menu-bar-items .inside-navigation,.secondary-navigation.has-top-bar .inside-navigation{justify-content:space-between}} \ No newline at end of file diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/secondary-nav/functions/css/main.css b/wp-content/upgrade-temp-backup/plugins/gp-premium/secondary-nav/functions/css/main.css deleted file mode 100644 index 9540b8a4..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/secondary-nav/functions/css/main.css +++ /dev/null @@ -1,377 +0,0 @@ -.secondary-navigation { - z-index: 99; - padding: 0; -} - -.secondary-navigation .inside-navigation { - display: flex; - align-items: center; - flex-wrap: wrap; - justify-content: space-between; -} - -.secondary-navigation ul { - list-style: none; - margin: 0; - padding-left: 0; -} - -.secondary-navigation li { - position: relative; -} - -.secondary-navigation a { - display: block; - text-decoration: none; -} - -.secondary-navigation ul ul { - display: block; - box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1); - float: left; - position: absolute; - left: -99999px; - opacity: 0; - z-index: 99999; - width: 200px; - text-align: left; - top: auto; - transition: opacity 80ms linear; - transition-delay: 0s; - pointer-events: none; - height: 0; - overflow: hidden; -} - -.secondary-navigation ul ul li { - width: 100%; -} - -.secondary-navigation ul ul li a { - line-height: normal; - font-size: 90%; -} - -.secondary-navigation.sub-menu-left ul ul { - box-shadow: -1px 1px 0 rgba(0, 0, 0, 0.1); -} - -.secondary-navigation.sub-menu-left .sub-menu { - right: 0; -} - -.secondary-navigation .main-nav > ul { - display: flex; - flex-wrap: wrap; -} - -.secondary-navigation .main-nav ul ul li a { - line-height: normal; - font-size: 12px; - padding-left: 20px; - padding-right: 20px; - padding-top: 10px; - padding-bottom: 10px; -} - -.secondary-navigation .main-nav ul li.menu-item-has-children > a { - padding-right: 0; - position: relative; -} - -.secondary-navigation .main-nav ul li a { - font-family: inherit; - font-weight: normal; - text-transform: none; - font-size: 13px; - padding-left: 20px; - padding-right: 20px; - line-height: 40px; -} - -.secondary-navigation .menu-toggle { - font-family: inherit; - font-weight: normal; - text-transform: none; - font-size: 13px; - padding-left: 20px; - padding-right: 20px; - line-height: 40px; - margin: 0; -} - -.secondary-navigation .menu-item-has-children .dropdown-menu-toggle { - padding-right: 20px; -} - -.secondary-navigation .menu-item-has-children ul .dropdown-menu-toggle { - padding-top: 10px; - padding-bottom: 10px; - margin-top: -10px; -} - -.secondary-navigation .secondary-menu-bar-items { - display: flex; - align-items: center; - font-size: 13px; -} - -.secondary-navigation .menu-bar-item { - position: relative; -} - -.secondary-navigation .menu-bar-item.search-item { - z-index: 20; -} - -.secondary-navigation .menu-bar-item > a { - font-family: inherit; - font-weight: normal; - text-transform: none; - font-size: 13px; - padding-left: 20px; - padding-right: 20px; - line-height: 40px; -} - -.dropdown-hover .secondary-navigation:not(.toggled) ul li:hover > ul, -.dropdown-hover .secondary-navigation:not(.toggled) ul li.sfHover > ul { - left: auto; - opacity: 1; - transition-delay: 150ms; - pointer-events: auto; - height: auto; - overflow: visible; -} - -.dropdown-hover .secondary-navigation:not(.toggled) ul ul li:hover > ul, -.dropdown-hover .secondary-navigation:not(.toggled) ul ul li.sfHover > ul { - left: 100%; - top: 0; -} - -.dropdown-hover .secondary-navigation.sub-menu-left:not(.toggled) ul ul li:hover > ul, -.dropdown-hover .secondary-navigation.sub-menu-left:not(.toggled) ul ul li.sfHover > ul { - right: 100%; - top: 0; - left: auto; -} - -.secondary-nav-float-right .header-widget { - margin-left: 20px; -} - -.secondary-nav-float-right .secondary-navigation { - margin-left: auto; -} - -.secondary-nav-float-right .secondary-navigation .main-nav ul ul li a { - line-height: normal; -} - -.secondary-nav-float-right .secondary-navigation ul ul ul { - top: 0; -} - -.secondary-nav-float-right .multi-navigation-wrapper { - margin-left: auto; -} - -.secondary-nav-float-left .secondary-navigation, -.secondary-nav-float-left .multi-navigation-wrapper { - margin-right: auto; -} - -.secondary-nav-float-left .site-logo, -.secondary-nav-float-left .site-branding { - order: 5; -} - -.secondary-nav-float-left:not(.nav-float-right) .header-widget { - order: -10; - margin-left: 0; - margin-right: 20px; -} - -.secondary-nav-float-left.nav-float-right .site-branding, -.secondary-nav-float-left.nav-float-right .site-logo { - margin-left: auto; - margin-right: auto; -} - -.secondary-nav-float-left.nav-float-right .inside-header .main-navigation, -.secondary-nav-float-left.nav-float-right .header-widget { - order: 10; -} - -.secondary-nav-float-right.nav-float-left .secondary-navigation { - order: 10; -} - -.multi-navigation-wrapper { - display: flex; - flex-direction: column; -} - -.widget-area .secondary-navigation li { - display: block; - float: none; - margin: 0; - padding: 0; - width: 100%; -} - -.widget-area .secondary-navigation ul ul { - left: 100%; - top: 0; - width: 220px; -} - -.secondary-nav-aligned-right .secondary-navigation .inside-navigation { - justify-content: flex-end; -} - -.secondary-nav-aligned-right.rtl .secondary-navigation .inside-navigation { - justify-content: flex-start; -} - -.secondary-nav-aligned-center .secondary-navigation .inside-navigation { - justify-content: center; -} - -.secondary-nav-aligned-center .secondary-navigation .main-nav > ul { - justify-content: center; -} - -.secondary-nav-aligned-left.rtl .secondary-navigation .inside-navigation { - justify-content: flex-end; -} - -.dropdown-click .secondary-navigation ul ul { - visibility: hidden; - float: none; -} - -.dropdown-click .secondary-navigation ul.toggled-on, -.dropdown-click .secondary-navigation ul li.sfHover > ul.toggled-on { - left: auto; - opacity: 1; - visibility: visible; - pointer-events: auto; - height: auto; - overflow: visible; -} - -.dropdown-click .secondary-navigation ul ul ul.toggled-on { - left: 0; - top: auto; - position: relative; - box-shadow: none; - border-bottom: 1px solid rgba(0, 0, 0, 0.05); -} - -.dropdown-click .secondary-navigation ul ul li:last-child > ul.toggled-on { - border-bottom: 0; -} - -.dropdown-click .widget-area .secondary-navigation ul ul { - top: auto; - position: absolute; - float: none; - width: 100%; - left: -99999px; -} - -.dropdown-click .widget-area .secondary-navigation ul ul.toggled-on { - position: relative; - left: 0; - right: 0; -} - -.both-right .widget-area .secondary-navigation ul ul, -.right-sidebar .widget-area .secondary-navigation ul ul, -.both-sidebars .widget-area .inside-right-sidebar .secondary-navigation ul ul { - left: auto; - right: 100%; -} - -.dropdown-click.both-right .widget-area .secondary-navigation ul ul, -.dropdown-click.right-sidebar .widget-area .secondary-navigation ul ul, -.dropdown-click.both-sidebars .widget-area .inside-right-sidebar .secondary-navigation ul ul { - right: 0; -} - -.dropdown-hover .widget-area .secondary-navigation:not(.toggled) ul li:hover ul, -.dropdown-hover .widget-area .secondary-navigation:not(.toggled) ul li.sfHover > ul { - top: 0; - left: 100%; - width: 220px; -} - -.dropdown-hover.both-right .widget-area .secondary-navigation:not(.toggled) ul li:hover ul, -.dropdown-hover.both-right .widget-area .secondary-navigation:not(.toggled) ul li.sfHover ul, -.dropdown-hover.right-sidebar .widget-area .secondary-navigation:not(.toggled) ul li:hover ul, -.dropdown-hover.right-sidebar .widget-area .secondary-navigation:not(.toggled) ul li.sfHover ul, -.dropdown-hover.both-sidebars .widget-area .inside-right-sidebar .secondary-navigation:not(.toggled) ul li:hover ul, -.dropdown-hover.both-sidebars .widget-area .inside-right-sidebar .secondary-navigation:not(.toggled) ul li.sfHover ul { - right: 100%; - left: auto; -} - -.rtl .secondary-navigation ul ul { - float: right; - left: auto; - right: 0; - text-align: right; -} - -.rtl .secondary-navigation ul ul ul { - left: auto; - right: 100%; -} - -.rtl .secondary-navigation .menu-item-has-children ul .dropdown-menu-toggle { - transform: rotate(180deg); -} - -/* Top bar */ -.secondary-navigation.has-top-bar .menu-toggle, .secondary-navigation.has-menu-bar-items .menu-toggle { - flex-grow: 0; -} - -.secondary-navigation .top-bar { - background: transparent; -} - -.secondary-navigation .top-bar a { - display: inline; -} - -.secondary-navigation .inside-top-bar { - padding: 0; -} - -.secondary-nav-aligned-right .secondary-navigation .top-bar { - margin-right: auto; -} - -.secondary-nav-aligned-right .secondary-navigation .top-bar .inside-top-bar .widget { - margin: 0 10px; -} - -.secondary-nav-aligned-left .secondary-navigation .top-bar { - order: 2; - margin-left: auto; -} - -.secondary-nav-aligned-left .secondary-navigation .top-bar .inside-top-bar .widget { - margin-left: 10px; -} - -.secondary-nav-aligned-center .secondary-navigation.has-top-bar .inside-top-bar { - justify-content: center; -} - -.secondary-nav-aligned-center .secondary-navigation.has-top-bar .inside-navigation { - display: block; -} diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/secondary-nav/functions/css/main.min.css b/wp-content/upgrade-temp-backup/plugins/gp-premium/secondary-nav/functions/css/main.min.css deleted file mode 100644 index e21c11da..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/secondary-nav/functions/css/main.min.css +++ /dev/null @@ -1 +0,0 @@ -.secondary-navigation{z-index:99;padding:0}.secondary-navigation .inside-navigation{display:flex;align-items:center;flex-wrap:wrap;justify-content:space-between}.secondary-navigation ul{list-style:none;margin:0;padding-left:0}.secondary-navigation li{position:relative}.secondary-navigation a{display:block;text-decoration:none}.secondary-navigation ul ul{display:block;box-shadow:0 1px 1px rgba(0,0,0,.1);float:left;position:absolute;left:-99999px;opacity:0;z-index:99999;width:200px;text-align:left;top:auto;transition:opacity 80ms linear;transition-delay:0s;pointer-events:none;height:0;overflow:hidden}.secondary-navigation ul ul li{width:100%}.secondary-navigation ul ul li a{line-height:normal;font-size:90%}.secondary-navigation.sub-menu-left ul ul{box-shadow:-1px 1px 0 rgba(0,0,0,.1)}.secondary-navigation.sub-menu-left .sub-menu{right:0}.secondary-navigation .main-nav>ul{display:flex;flex-wrap:wrap}.secondary-navigation .main-nav ul ul li a{line-height:normal;font-size:12px;padding-left:20px;padding-right:20px;padding-top:10px;padding-bottom:10px}.secondary-navigation .main-nav ul li.menu-item-has-children>a{padding-right:0;position:relative}.secondary-navigation .main-nav ul li a{font-family:inherit;font-weight:400;text-transform:none;font-size:13px;padding-left:20px;padding-right:20px;line-height:40px}.secondary-navigation .menu-toggle{font-family:inherit;font-weight:400;text-transform:none;font-size:13px;padding-left:20px;padding-right:20px;line-height:40px;margin:0}.secondary-navigation .menu-item-has-children .dropdown-menu-toggle{padding-right:20px}.secondary-navigation .menu-item-has-children ul .dropdown-menu-toggle{padding-top:10px;padding-bottom:10px;margin-top:-10px}.secondary-navigation .secondary-menu-bar-items{display:flex;align-items:center;font-size:13px}.secondary-navigation .menu-bar-item{position:relative}.secondary-navigation .menu-bar-item.search-item{z-index:20}.secondary-navigation .menu-bar-item>a{font-family:inherit;font-weight:400;text-transform:none;font-size:13px;padding-left:20px;padding-right:20px;line-height:40px}.dropdown-hover .secondary-navigation:not(.toggled) ul li.sfHover>ul,.dropdown-hover .secondary-navigation:not(.toggled) ul li:hover>ul{left:auto;opacity:1;transition-delay:150ms;pointer-events:auto;height:auto;overflow:visible}.dropdown-hover .secondary-navigation:not(.toggled) ul ul li.sfHover>ul,.dropdown-hover .secondary-navigation:not(.toggled) ul ul li:hover>ul{left:100%;top:0}.dropdown-hover .secondary-navigation.sub-menu-left:not(.toggled) ul ul li.sfHover>ul,.dropdown-hover .secondary-navigation.sub-menu-left:not(.toggled) ul ul li:hover>ul{right:100%;top:0;left:auto}.secondary-nav-float-right .header-widget{margin-left:20px}.secondary-nav-float-right .secondary-navigation{margin-left:auto}.secondary-nav-float-right .secondary-navigation .main-nav ul ul li a{line-height:normal}.secondary-nav-float-right .secondary-navigation ul ul ul{top:0}.secondary-nav-float-right .multi-navigation-wrapper{margin-left:auto}.secondary-nav-float-left .multi-navigation-wrapper,.secondary-nav-float-left .secondary-navigation{margin-right:auto}.secondary-nav-float-left .site-branding,.secondary-nav-float-left .site-logo{order:5}.secondary-nav-float-left:not(.nav-float-right) .header-widget{order:-10;margin-left:0;margin-right:20px}.secondary-nav-float-left.nav-float-right .site-branding,.secondary-nav-float-left.nav-float-right .site-logo{margin-left:auto;margin-right:auto}.secondary-nav-float-left.nav-float-right .header-widget,.secondary-nav-float-left.nav-float-right .inside-header .main-navigation{order:10}.secondary-nav-float-right.nav-float-left .secondary-navigation{order:10}.multi-navigation-wrapper{display:flex;flex-direction:column}.widget-area .secondary-navigation li{display:block;float:none;margin:0;padding:0;width:100%}.widget-area .secondary-navigation ul ul{left:100%;top:0;width:220px}.secondary-nav-aligned-right .secondary-navigation .inside-navigation{justify-content:flex-end}.secondary-nav-aligned-right.rtl .secondary-navigation .inside-navigation{justify-content:flex-start}.secondary-nav-aligned-center .secondary-navigation .inside-navigation{justify-content:center}.secondary-nav-aligned-center .secondary-navigation .main-nav>ul{justify-content:center}.secondary-nav-aligned-left.rtl .secondary-navigation .inside-navigation{justify-content:flex-end}.dropdown-click .secondary-navigation ul ul{visibility:hidden;float:none}.dropdown-click .secondary-navigation ul li.sfHover>ul.toggled-on,.dropdown-click .secondary-navigation ul.toggled-on{left:auto;opacity:1;visibility:visible;pointer-events:auto;height:auto;overflow:visible}.dropdown-click .secondary-navigation ul ul ul.toggled-on{left:0;top:auto;position:relative;box-shadow:none;border-bottom:1px solid rgba(0,0,0,.05)}.dropdown-click .secondary-navigation ul ul li:last-child>ul.toggled-on{border-bottom:0}.dropdown-click .widget-area .secondary-navigation ul ul{top:auto;position:absolute;float:none;width:100%;left:-99999px}.dropdown-click .widget-area .secondary-navigation ul ul.toggled-on{position:relative;left:0;right:0}.both-right .widget-area .secondary-navigation ul ul,.both-sidebars .widget-area .inside-right-sidebar .secondary-navigation ul ul,.right-sidebar .widget-area .secondary-navigation ul ul{left:auto;right:100%}.dropdown-click.both-right .widget-area .secondary-navigation ul ul,.dropdown-click.both-sidebars .widget-area .inside-right-sidebar .secondary-navigation ul ul,.dropdown-click.right-sidebar .widget-area .secondary-navigation ul ul{right:0}.dropdown-hover .widget-area .secondary-navigation:not(.toggled) ul li.sfHover>ul,.dropdown-hover .widget-area .secondary-navigation:not(.toggled) ul li:hover ul{top:0;left:100%;width:220px}.dropdown-hover.both-right .widget-area .secondary-navigation:not(.toggled) ul li.sfHover ul,.dropdown-hover.both-right .widget-area .secondary-navigation:not(.toggled) ul li:hover ul,.dropdown-hover.both-sidebars .widget-area .inside-right-sidebar .secondary-navigation:not(.toggled) ul li.sfHover ul,.dropdown-hover.both-sidebars .widget-area .inside-right-sidebar .secondary-navigation:not(.toggled) ul li:hover ul,.dropdown-hover.right-sidebar .widget-area .secondary-navigation:not(.toggled) ul li.sfHover ul,.dropdown-hover.right-sidebar .widget-area .secondary-navigation:not(.toggled) ul li:hover ul{right:100%;left:auto}.rtl .secondary-navigation ul ul{float:right;left:auto;right:0;text-align:right}.rtl .secondary-navigation ul ul ul{left:auto;right:100%}.rtl .secondary-navigation .menu-item-has-children ul .dropdown-menu-toggle{transform:rotate(180deg)}.secondary-navigation.has-menu-bar-items .menu-toggle,.secondary-navigation.has-top-bar .menu-toggle{flex-grow:0}.secondary-navigation .top-bar{background:0 0}.secondary-navigation .top-bar a{display:inline}.secondary-navigation .inside-top-bar{padding:0}.secondary-nav-aligned-right .secondary-navigation .top-bar{margin-right:auto}.secondary-nav-aligned-right .secondary-navigation .top-bar .inside-top-bar .widget{margin:0 10px}.secondary-nav-aligned-left .secondary-navigation .top-bar{order:2;margin-left:auto}.secondary-nav-aligned-left .secondary-navigation .top-bar .inside-top-bar .widget{margin-left:10px}.secondary-nav-aligned-center .secondary-navigation.has-top-bar .inside-top-bar{justify-content:center}.secondary-nav-aligned-center .secondary-navigation.has-top-bar .inside-navigation{display:block} \ No newline at end of file diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/secondary-nav/functions/css/style-mobile.css b/wp-content/upgrade-temp-backup/plugins/gp-premium/secondary-nav/functions/css/style-mobile.css deleted file mode 100644 index 51b5e656..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/secondary-nav/functions/css/style-mobile.css +++ /dev/null @@ -1,97 +0,0 @@ -.secondary-navigation.toggled ul ul { - transition: 0s; - visibility: hidden; -} - -.secondary-navigation.toggled ul ul.toggled-on { - visibility: visible; -} - -.secondary-navigation.toggled .main-nav ul ul { - position: relative; - top: 0; - left: 0; - width: 100%; -} - -.secondary-navigation.toggled .main-nav ul ul.toggled-on { - position: relative; - top: 0; - left: auto !important; - right: auto !important; - width: 100%; - pointer-events: auto; - height: auto; - opacity: 1; - display: block; -} - -.secondary-navigation.toggled .main-nav > ul { - display: block; -} - -.secondary-navigation.toggled .main-nav .sf-menu > li { - float: none; - clear: both; - display: block !important; - text-align: left !important; -} - -.secondary-navigation.toggled .main-nav .sf-menu > li.hide-on-mobile { - display: none !important; -} - -.secondary-navigation.toggled .dropdown-menu-toggle:before { - content: "\f107" !important; -} - -.secondary-navigation.toggled .sfHover > a .dropdown-menu-toggle:before { - content: "\f106" !important; -} - -.secondary-navigation.toggled .menu-item-has-children .dropdown-menu-toggle { - float: right; -} - -.secondary-navigation.toggled .sf-menu > li.menu-item-float-right { - float: none !important; - display: inline-block; -} - -.dropdown-hover .secondary-navigation.toggled ul li:hover > ul, -.dropdown-hover .secondary-navigation.toggled ul li.sfHover > ul { - transition-delay: 0s; -} - -.rtl .secondary-navigation.toggled .main-nav .sf-menu > li { - text-align: right !important; -} - -@media (max-width: 768px) { - .secondary-nav-float-left .inside-header .secondary-navigation { - float: none; - } - .secondary-navigation .menu-toggle { - display: block; - } - .secondary-navigation ul { - display: none; - } - .secondary-nav-aligned-left .secondary-navigation .top-bar { - position: absolute; - right: 0; - } - .secondary-nav-aligned-left .secondary-navigation .top-bar + .menu-toggle { - text-align: left; - } - .secondary-nav-aligned-right .secondary-navigation .top-bar { - position: absolute; - left: 0; - } - .secondary-nav-aligned-right .secondary-navigation .top-bar + .menu-toggle { - text-align: right; - } - .secondary-nav-aligned-center .secondary-navigation .top-bar + .menu-toggle + div { - display: block; - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/secondary-nav/functions/css/style-mobile.min.css b/wp-content/upgrade-temp-backup/plugins/gp-premium/secondary-nav/functions/css/style-mobile.min.css deleted file mode 100644 index f1ded0a3..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/secondary-nav/functions/css/style-mobile.min.css +++ /dev/null @@ -1 +0,0 @@ -.secondary-navigation.toggled ul ul{transition:0s;visibility:hidden}.secondary-navigation.toggled ul ul.toggled-on{visibility:visible}.secondary-navigation.toggled .main-nav ul ul{position:relative;top:0;left:0;width:100%}.secondary-navigation.toggled .main-nav ul ul.toggled-on{position:relative;top:0;left:auto!important;right:auto!important;width:100%;pointer-events:auto;height:auto;opacity:1;display:block}.secondary-navigation.toggled .main-nav>ul{display:block}.secondary-navigation.toggled .main-nav .sf-menu>li{float:none;clear:both;display:block!important;text-align:left!important}.secondary-navigation.toggled .main-nav .sf-menu>li.hide-on-mobile{display:none!important}.secondary-navigation.toggled .dropdown-menu-toggle:before{content:"\f107"!important}.secondary-navigation.toggled .sfHover>a .dropdown-menu-toggle:before{content:"\f106"!important}.secondary-navigation.toggled .menu-item-has-children .dropdown-menu-toggle{float:right}.secondary-navigation.toggled .sf-menu>li.menu-item-float-right{float:none!important;display:inline-block}.dropdown-hover .secondary-navigation.toggled ul li.sfHover>ul,.dropdown-hover .secondary-navigation.toggled ul li:hover>ul{transition-delay:0s}.rtl .secondary-navigation.toggled .main-nav .sf-menu>li{text-align:right!important}@media (max-width:768px){.secondary-nav-float-left .inside-header .secondary-navigation{float:none}.secondary-navigation .menu-toggle{display:block}.secondary-navigation ul{display:none}.secondary-nav-aligned-left .secondary-navigation .top-bar{position:absolute;right:0}.secondary-nav-aligned-left .secondary-navigation .top-bar+.menu-toggle{text-align:left}.secondary-nav-aligned-right .secondary-navigation .top-bar{position:absolute;left:0}.secondary-nav-aligned-right .secondary-navigation .top-bar+.menu-toggle{text-align:right}.secondary-nav-aligned-center .secondary-navigation .top-bar+.menu-toggle+div{display:block}} \ No newline at end of file diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/secondary-nav/functions/css/style.css b/wp-content/upgrade-temp-backup/plugins/gp-premium/secondary-nav/functions/css/style.css deleted file mode 100644 index e24c07f1..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/secondary-nav/functions/css/style.css +++ /dev/null @@ -1,337 +0,0 @@ -.secondary-navigation { - clear: both; - z-index: 99; - padding: 0; -} - -.secondary-navigation ul { - list-style: none; - margin: 0; - padding-left: 0; -} - -.secondary-navigation li { - float: left; - position: relative; -} - -.secondary-navigation a { - display: block; - text-decoration: none; -} - -.secondary-navigation ul ul { - display: block; - box-shadow: 0 2px 2px rgba(0, 0, 0, 0.1); - float: left; - position: absolute; - left: -99999px; - opacity: 0; - z-index: 99999; - width: 200px; - text-align: left; - top: auto; - transition: opacity 80ms linear; - transition-delay: 0s; - pointer-events: none; - height: 0; - overflow: hidden; -} - -.secondary-navigation ul ul li { - width: 100%; -} - -.secondary-navigation ul ul li a { - line-height: normal; - font-size: 90%; -} - -.secondary-navigation.sub-menu-left .sub-menu { - right: 0; -} - -.secondary-navigation .main-nav ul ul li a { - line-height: normal; - font-size: 12px; - padding-left: 20px; - padding-right: 20px; - padding-top: 10px; - padding-bottom: 10px; -} - -.secondary-navigation .main-nav ul li.menu-item-has-children > a { - padding-right: 0; - position: relative; -} - -.secondary-navigation .main-nav ul li a { - font-family: inherit; - font-weight: normal; - text-transform: none; - font-size: 13px; - padding-left: 20px; - padding-right: 20px; - line-height: 40px; -} - -.secondary-navigation .menu-toggle { - font-family: inherit; - font-weight: normal; - text-transform: none; - font-size: 13px; - padding-left: 20px; - padding-right: 20px; - line-height: 40px; - margin: 0; -} - -.secondary-navigation .menu-item-has-children .dropdown-menu-toggle { - padding-right: 20px; -} - -.secondary-navigation .menu-item-has-children ul .dropdown-menu-toggle { - padding-top: 10px; - padding-bottom: 10px; - margin-top: -10px; -} - -.dropdown-hover .secondary-navigation:not(.toggled) ul li:hover > ul, -.dropdown-hover .secondary-navigation:not(.toggled) ul li.sfHover > ul { - left: auto; - opacity: 1; - transition-delay: 150ms; - pointer-events: auto; - height: auto; - overflow: visible; -} - -.dropdown-hover .secondary-navigation:not(.toggled) ul ul li:hover > ul, -.dropdown-hover .secondary-navigation:not(.toggled) ul ul li.sfHover > ul { - left: 100%; - top: 0; -} - -.dropdown-hover .secondary-navigation.sub-menu-left:not(.toggled) ul ul li:hover > ul, -.dropdown-hover .secondary-navigation.sub-menu-left:not(.toggled) ul ul li.sfHover > ul { - right: 100%; - top: 0; - left: auto; -} - -.secondary-nav-float-right .secondary-navigation { - float: right; -} - -.secondary-nav-float-right .secondary-navigation .main-nav ul ul li a { - line-height: normal; -} - -.secondary-nav-float-right .secondary-navigation ul ul ul { - top: 0; -} - -.secondary-nav-float-left .inside-header .secondary-navigation { - float: left; - clear: left; -} - -.secondary-nav-float-left .inside-header:after { - clear: both; - content: ''; - display: table; -} - -.secondary-nav-float-left:not(.nav-float-right) .inside-header .site-branding, -.secondary-nav-float-left:not(.nav-float-right) .inside-header .site-logo { - float: right; - clear: right; -} - -.secondary-nav-float-left.nav-float-right .inside-header .site-branding, -.secondary-nav-float-left.nav-float-right .inside-header .site-logo { - float: none; - clear: none; -} - -.secondary-nav-float-left.nav-float-right .site-header { - text-align: center; -} - -.secondary-nav-float-right.nav-float-left .inside-header .site-branding, -.secondary-nav-float-right.nav-float-left .inside-header .site-logo { - float: none; - clear: none; -} - -.secondary-nav-float-right.nav-float-left .site-header { - text-align: center; -} - -.widget-area .secondary-navigation li { - display: block; - float: none; - margin: 0; - padding: 0; - width: 100%; -} - -.widget-area .secondary-navigation ul ul { - left: 100%; - top: 0; - width: 220px; -} - -.both-right .widget-area .secondary-navigation ul ul, -.right-sidebar .widget-area .secondary-navigation ul ul, -.both-sidebars .widget-area .inside-right-sidebar .secondary-navigation ul ul { - left: auto; - right: 100%; -} - -.secondary-nav-aligned-right.secondary-nav-below-header .secondary-navigation .sf-menu > li, -.secondary-nav-aligned-right.secondary-nav-above-header .secondary-navigation .sf-menu > li, -.secondary-nav-aligned-center.secondary-nav-below-header .secondary-navigation .sf-menu > li, -.secondary-nav-aligned-center.secondary-nav-above-header .secondary-navigation .sf-menu > li { - float: none; - display: inline-block; -} - -.secondary-nav-aligned-right .secondary-navigation ul.secondary-menu, -.secondary-nav-aligned-center .secondary-navigation ul.secondary-menu { - font-size: 0px; -} - -.secondary-nav-aligned-left.secondary-nav-below-header .secondary-navigation, -.secondary-nav-aligned-left.secondary-nav-above-header .secondary-navigation { - text-align: left; -} - -.secondary-nav-aligned-left.secondary-nav-below-header .secondary-navigation:after, -.secondary-nav-aligned-left.secondary-nav-above-header .secondary-navigation:after { - clear: both; - content: ''; - display: table; -} - -.secondary-nav-aligned-center.secondary-nav-below-header .secondary-navigation, -.secondary-nav-aligned-center.secondary-nav-above-header .secondary-navigation { - text-align: center; -} - -.secondary-nav-aligned-right.secondary-nav-below-header .secondary-navigation, -.secondary-nav-aligned-right.secondary-nav-above-header .secondary-navigation { - text-align: right; -} - -.dropdown-click .secondary-navigation ul ul { - visibility: hidden; -} - -.dropdown-click .secondary-navigation ul.toggled-on, -.dropdown-click .secondary-navigation ul li.sfHover > ul.toggled-on { - left: auto; - opacity: 1; - visibility: visible; - pointer-events: auto; - height: auto; - overflow: visible; -} - -.dropdown-click .secondary-navigation ul ul ul.toggled-on { - left: 0; - top: auto; - position: relative; -} - -.dropdown-click .widget-area .secondary-navigation ul ul { - top: auto; - position: absolute; - float: none; - width: 100%; - left: -99999px; -} - -.dropdown-click .widget-area .secondary-navigation ul ul.toggled-on { - position: relative; - left: 0; - right: 0; -} - -.dropdown-click.both-right .widget-area .secondary-navigation ul ul, -.dropdown-click.right-sidebar .widget-area .secondary-navigation ul ul, -.dropdown-click.both-sidebars .widget-area .inside-right-sidebar .secondary-navigation ul ul { - right: 0; -} - -.dropdown-hover .widget-area .secondary-navigation:not(.toggled) ul li:hover ul, -.dropdown-hover .widget-area .secondary-navigation:not(.toggled) ul li.sfHover > ul { - top: 0; - left: 100%; - width: 220px; -} - -.dropdown-hover.both-right .widget-area .secondary-navigation:not(.toggled) ul li:hover ul, -.dropdown-hover.both-right .widget-area .secondary-navigation:not(.toggled) ul li.sfHover ul, -.dropdown-hover.right-sidebar .widget-area .secondary-navigation:not(.toggled) ul li:hover ul, -.dropdown-hover.right-sidebar .widget-area .secondary-navigation:not(.toggled) ul li.sfHover ul, -.dropdown-hover.both-sidebars .widget-area .inside-right-sidebar .secondary-navigation:not(.toggled) ul li:hover ul, -.dropdown-hover.both-sidebars .widget-area .inside-right-sidebar .secondary-navigation:not(.toggled) ul li.sfHover ul { - right: 100%; - left: auto; -} - -.rtl .secondary-navigation ul ul { - float: right; - left: auto; - right: 0; - text-align: right; -} - -.rtl .secondary-navigation ul ul ul { - left: auto; - right: 100%; -} - -.rtl .secondary-navigation .menu-item-has-children ul .dropdown-menu-toggle { - transform: rotate(180deg); -} - -/* Top bar */ -.secondary-navigation .top-bar { - background: transparent; -} - -.secondary-navigation .inside-top-bar { - padding: 0; -} - -.secondary-navigation .top-bar a { - display: inline; -} - -.secondary-nav-aligned-right .secondary-navigation .top-bar { - float: left; -} - -.secondary-nav-aligned-right .secondary-navigation .top-bar .inside-top-bar .widget { - margin: 0 10px; -} - -.secondary-nav-aligned-left .secondary-navigation .top-bar { - float: right; -} - -.secondary-nav-aligned-left .secondary-navigation .top-bar .inside-top-bar .widget { - margin-left: 10px; -} - -.secondary-nav-aligned-center .secondary-navigation .top-bar, -.secondary-nav-aligned-center .secondary-navigation .top-bar + .menu-toggle + div { - display: inline-block; - vertical-align: middle; -} - -.secondary-nav-aligned-center .secondary-navigation .top-bar .widget:not(:first-child) { - margin-left: 10px; -} diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/secondary-nav/functions/css/style.min.css b/wp-content/upgrade-temp-backup/plugins/gp-premium/secondary-nav/functions/css/style.min.css deleted file mode 100644 index 88215e4e..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/secondary-nav/functions/css/style.min.css +++ /dev/null @@ -1 +0,0 @@ -.secondary-navigation{clear:both;z-index:99;padding:0}.secondary-navigation ul{list-style:none;margin:0;padding-left:0}.secondary-navigation li{float:left;position:relative}.secondary-navigation a{display:block;text-decoration:none}.secondary-navigation ul ul{display:block;box-shadow:0 2px 2px rgba(0,0,0,.1);float:left;position:absolute;left:-99999px;opacity:0;z-index:99999;width:200px;text-align:left;top:auto;transition:opacity 80ms linear;transition-delay:0s;pointer-events:none;height:0;overflow:hidden}.secondary-navigation ul ul li{width:100%}.secondary-navigation ul ul li a{line-height:normal;font-size:90%}.secondary-navigation.sub-menu-left .sub-menu{right:0}.secondary-navigation .main-nav ul ul li a{line-height:normal;font-size:12px;padding-left:20px;padding-right:20px;padding-top:10px;padding-bottom:10px}.secondary-navigation .main-nav ul li.menu-item-has-children>a{padding-right:0;position:relative}.secondary-navigation .main-nav ul li a{font-family:inherit;font-weight:400;text-transform:none;font-size:13px;padding-left:20px;padding-right:20px;line-height:40px}.secondary-navigation .menu-toggle{font-family:inherit;font-weight:400;text-transform:none;font-size:13px;padding-left:20px;padding-right:20px;line-height:40px;margin:0}.secondary-navigation .menu-item-has-children .dropdown-menu-toggle{padding-right:20px}.secondary-navigation .menu-item-has-children ul .dropdown-menu-toggle{padding-top:10px;padding-bottom:10px;margin-top:-10px}.dropdown-hover .secondary-navigation:not(.toggled) ul li.sfHover>ul,.dropdown-hover .secondary-navigation:not(.toggled) ul li:hover>ul{left:auto;opacity:1;transition-delay:150ms;pointer-events:auto;height:auto;overflow:visible}.dropdown-hover .secondary-navigation:not(.toggled) ul ul li.sfHover>ul,.dropdown-hover .secondary-navigation:not(.toggled) ul ul li:hover>ul{left:100%;top:0}.dropdown-hover .secondary-navigation.sub-menu-left:not(.toggled) ul ul li.sfHover>ul,.dropdown-hover .secondary-navigation.sub-menu-left:not(.toggled) ul ul li:hover>ul{right:100%;top:0;left:auto}.secondary-nav-float-right .secondary-navigation{float:right}.secondary-nav-float-right .secondary-navigation .main-nav ul ul li a{line-height:normal}.secondary-nav-float-right .secondary-navigation ul ul ul{top:0}.secondary-nav-float-left .inside-header .secondary-navigation{float:left;clear:left}.secondary-nav-float-left .inside-header:after{clear:both;content:'';display:table}.secondary-nav-float-left:not(.nav-float-right) .inside-header .site-branding,.secondary-nav-float-left:not(.nav-float-right) .inside-header .site-logo{float:right;clear:right}.secondary-nav-float-left.nav-float-right .inside-header .site-branding,.secondary-nav-float-left.nav-float-right .inside-header .site-logo{float:none;clear:none}.secondary-nav-float-left.nav-float-right .site-header{text-align:center}.secondary-nav-float-right.nav-float-left .inside-header .site-branding,.secondary-nav-float-right.nav-float-left .inside-header .site-logo{float:none;clear:none}.secondary-nav-float-right.nav-float-left .site-header{text-align:center}.widget-area .secondary-navigation li{display:block;float:none;margin:0;padding:0;width:100%}.widget-area .secondary-navigation ul ul{left:100%;top:0;width:220px}.both-right .widget-area .secondary-navigation ul ul,.both-sidebars .widget-area .inside-right-sidebar .secondary-navigation ul ul,.right-sidebar .widget-area .secondary-navigation ul ul{left:auto;right:100%}.secondary-nav-aligned-center.secondary-nav-above-header .secondary-navigation .sf-menu>li,.secondary-nav-aligned-center.secondary-nav-below-header .secondary-navigation .sf-menu>li,.secondary-nav-aligned-right.secondary-nav-above-header .secondary-navigation .sf-menu>li,.secondary-nav-aligned-right.secondary-nav-below-header .secondary-navigation .sf-menu>li{float:none;display:inline-block}.secondary-nav-aligned-center .secondary-navigation ul.secondary-menu,.secondary-nav-aligned-right .secondary-navigation ul.secondary-menu{font-size:0}.secondary-nav-aligned-left.secondary-nav-above-header .secondary-navigation,.secondary-nav-aligned-left.secondary-nav-below-header .secondary-navigation{text-align:left}.secondary-nav-aligned-left.secondary-nav-above-header .secondary-navigation:after,.secondary-nav-aligned-left.secondary-nav-below-header .secondary-navigation:after{clear:both;content:'';display:table}.secondary-nav-aligned-center.secondary-nav-above-header .secondary-navigation,.secondary-nav-aligned-center.secondary-nav-below-header .secondary-navigation{text-align:center}.secondary-nav-aligned-right.secondary-nav-above-header .secondary-navigation,.secondary-nav-aligned-right.secondary-nav-below-header .secondary-navigation{text-align:right}.dropdown-click .secondary-navigation ul ul{visibility:hidden}.dropdown-click .secondary-navigation ul li.sfHover>ul.toggled-on,.dropdown-click .secondary-navigation ul.toggled-on{left:auto;opacity:1;visibility:visible;pointer-events:auto;height:auto;overflow:visible}.dropdown-click .secondary-navigation ul ul ul.toggled-on{left:0;top:auto;position:relative}.dropdown-click .widget-area .secondary-navigation ul ul{top:auto;position:absolute;float:none;width:100%;left:-99999px}.dropdown-click .widget-area .secondary-navigation ul ul.toggled-on{position:relative;left:0;right:0}.dropdown-click.both-right .widget-area .secondary-navigation ul ul,.dropdown-click.both-sidebars .widget-area .inside-right-sidebar .secondary-navigation ul ul,.dropdown-click.right-sidebar .widget-area .secondary-navigation ul ul{right:0}.dropdown-hover .widget-area .secondary-navigation:not(.toggled) ul li.sfHover>ul,.dropdown-hover .widget-area .secondary-navigation:not(.toggled) ul li:hover ul{top:0;left:100%;width:220px}.dropdown-hover.both-right .widget-area .secondary-navigation:not(.toggled) ul li.sfHover ul,.dropdown-hover.both-right .widget-area .secondary-navigation:not(.toggled) ul li:hover ul,.dropdown-hover.both-sidebars .widget-area .inside-right-sidebar .secondary-navigation:not(.toggled) ul li.sfHover ul,.dropdown-hover.both-sidebars .widget-area .inside-right-sidebar .secondary-navigation:not(.toggled) ul li:hover ul,.dropdown-hover.right-sidebar .widget-area .secondary-navigation:not(.toggled) ul li.sfHover ul,.dropdown-hover.right-sidebar .widget-area .secondary-navigation:not(.toggled) ul li:hover ul{right:100%;left:auto}.rtl .secondary-navigation ul ul{float:right;left:auto;right:0;text-align:right}.rtl .secondary-navigation ul ul ul{left:auto;right:100%}.rtl .secondary-navigation .menu-item-has-children ul .dropdown-menu-toggle{transform:rotate(180deg)}.secondary-navigation .top-bar{background:0 0}.secondary-navigation .inside-top-bar{padding:0}.secondary-navigation .top-bar a{display:inline}.secondary-nav-aligned-right .secondary-navigation .top-bar{float:left}.secondary-nav-aligned-right .secondary-navigation .top-bar .inside-top-bar .widget{margin:0 10px}.secondary-nav-aligned-left .secondary-navigation .top-bar{float:right}.secondary-nav-aligned-left .secondary-navigation .top-bar .inside-top-bar .widget{margin-left:10px}.secondary-nav-aligned-center .secondary-navigation .top-bar,.secondary-nav-aligned-center .secondary-navigation .top-bar+.menu-toggle+div{display:inline-block;vertical-align:middle}.secondary-nav-aligned-center .secondary-navigation .top-bar .widget:not(:first-child){margin-left:10px} \ No newline at end of file diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/secondary-nav/functions/functions.php b/wp-content/upgrade-temp-backup/plugins/gp-premium/secondary-nav/functions/functions.php deleted file mode 100644 index 5738848a..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/secondary-nav/functions/functions.php +++ /dev/null @@ -1,1356 +0,0 @@ - __( 'Secondary Menu', 'gp-premium' ), - ) - ); - } -} - -if ( ! function_exists( 'generate_secondary_nav_enqueue_scripts' ) ) { - add_action( 'wp_enqueue_scripts', 'generate_secondary_nav_enqueue_scripts', 100 ); - /** - * Add our necessary scripts. - * - * @since 0.1 - */ - function generate_secondary_nav_enqueue_scripts() { - // Bail if no Secondary menu is set. - if ( ! has_nav_menu( 'secondary' ) ) { - return; - } - - $suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min'; - - if ( function_exists( 'generate_is_using_flexbox' ) && generate_is_using_flexbox() ) { - wp_enqueue_style( 'generate-secondary-nav', plugin_dir_url( __FILE__ ) . "css/main{$suffix}.css", array(), GENERATE_SECONDARY_NAV_VERSION ); - wp_enqueue_style( 'generate-secondary-nav-mobile', plugin_dir_url( __FILE__ ) . "css/main-mobile{$suffix}.css", array(), GENERATE_SECONDARY_NAV_VERSION, 'all' ); - } else { - wp_enqueue_style( 'generate-secondary-nav', plugin_dir_url( __FILE__ ) . "css/style{$suffix}.css", array(), GENERATE_SECONDARY_NAV_VERSION ); - wp_enqueue_style( 'generate-secondary-nav-mobile', plugin_dir_url( __FILE__ ) . "css/style-mobile{$suffix}.css", array(), GENERATE_SECONDARY_NAV_VERSION, 'all' ); - } - - if ( ! defined( 'GENERATE_DISABLE_MOBILE' ) ) { - wp_add_inline_script( - 'generate-navigation', - "jQuery( document ).ready( function($) { - $( '.secondary-navigation .menu-toggle' ).on( 'click', function( e ) { - e.preventDefault(); - $( this ).closest( '.secondary-navigation' ).toggleClass( 'toggled' ); - $( this ).closest( '.secondary-navigation' ).attr( 'aria-expanded', $( this ).closest( '.secondary-navigation' ).attr( 'aria-expanded' ) === 'true' ? 'false' : 'true' ); - $( this ).toggleClass( 'toggled' ); - $( this ).children( 'i' ).toggleClass( 'fa-bars' ).toggleClass( 'fa-close' ); - $( this ).attr( 'aria-expanded', $( this ).attr( 'aria-expanded' ) === 'false' ? 'true' : 'false' ); - }); - });" - ); - } - } -} - -if ( ! function_exists( 'generate_secondary_nav_enqueue_customizer_scripts' ) ) { - add_action( 'customize_preview_init', 'generate_secondary_nav_enqueue_customizer_scripts' ); - /** - * Add our Customizer preview JS. - * - * @since 0.1 - */ - function generate_secondary_nav_enqueue_customizer_scripts() { - wp_enqueue_script( 'generate-secondary-nav-customizer', plugin_dir_url( __FILE__ ) . 'js/customizer.js', array( 'jquery', 'customize-preview' ), GENERATE_SECONDARY_NAV_VERSION, true ); - - wp_localize_script( - 'generate-secondary-nav-customizer', - 'generateSecondaryNav', - array( - 'isFlex' => function_exists( 'generate_is_using_flexbox' ) && generate_is_using_flexbox(), - ) - ); - } -} - -if ( ! function_exists( 'generate_secondary_nav_get_defaults' ) ) { - /** - * Set default options. - * - * @since 0.1 - * @param bool $filter Whether to filter the defaults or not. - */ - function generate_secondary_nav_get_defaults( $filter = true ) { - $generate_defaults = array( - 'secondary_nav_mobile_label' => 'Menu', - 'secondary_nav_layout_setting' => 'secondary-fluid-nav', - 'secondary_nav_inner_width' => 'contained', - 'secondary_nav_position_setting' => 'secondary-nav-above-header', - 'secondary_nav_alignment' => 'right', - 'secondary_nav_dropdown_direction' => 'right', - 'navigation_background_color' => '#636363', - 'navigation_text_color' => '#ffffff', - 'navigation_background_hover_color' => '#303030', - 'navigation_text_hover_color' => '#ffffff', - 'navigation_background_current_color' => '#ffffff', - 'navigation_text_current_color' => '#222222', - 'subnavigation_background_color' => '#303030', - 'subnavigation_text_color' => '#ffffff', - 'subnavigation_background_hover_color' => '#474747', - 'subnavigation_text_hover_color' => '#ffffff', - 'subnavigation_background_current_color' => '#474747', - 'subnavigation_text_current_color' => '#ffffff', - 'secondary_menu_item' => '20', - 'secondary_menu_item_height' => '40', - 'secondary_sub_menu_item_height' => '10', - 'font_secondary_navigation' => 'inherit', - 'font_secondary_navigation_variants' => '', - 'font_secondary_navigation_category' => '', - 'secondary_navigation_font_weight' => 'normal', - 'secondary_navigation_font_transform' => 'none', - 'secondary_navigation_font_size' => '13', - 'nav_image' => '', - 'nav_repeat' => '', - 'nav_item_image' => '', - 'nav_item_repeat' => '', - 'nav_item_hover_image' => '', - 'nav_item_hover_repeat' => '', - 'nav_item_current_image' => '', - 'nav_item_current_repeat' => '', - 'sub_nav_image' => '', - 'sub_nav_repeat' => '', - 'sub_nav_item_image' => '', - 'sub_nav_item_repeat' => '', - 'sub_nav_item_hover_image' => '', - 'sub_nav_item_hover_repeat' => '', - 'sub_nav_item_current_image' => '', - 'sub_nav_item_current_repeat' => '', - 'merge_top_bar' => false, - ); - - if ( $filter ) { - return apply_filters( 'generate_secondary_nav_option_defaults', $generate_defaults ); - } - - return $generate_defaults; - } -} - -if ( ! function_exists( 'generate_secondary_nav_customize_register' ) ) { - add_action( 'customize_register', 'generate_secondary_nav_customize_register', 100 ); - /** - * Register our options. - * - * @since 0.1 - * @param object $wp_customize The Customizer object. - */ - function generate_secondary_nav_customize_register( $wp_customize ) { - $defaults = generate_secondary_nav_get_defaults(); - - require_once GP_LIBRARY_DIRECTORY . 'customizer-helpers.php'; - - if ( method_exists( $wp_customize, 'register_control_type' ) ) { - $wp_customize->register_control_type( 'GeneratePress_Section_Shortcut_Control' ); - } - - // Use the Layout panel in the free theme if it exists. - if ( $wp_customize->get_panel( 'generate_layout_panel' ) ) { - $layout_panel = 'generate_layout_panel'; - } else { - $layout_panel = 'secondary_navigation_panel'; - } - - // Add our secondary navigation panel. - // This shouldn't be used anymore if the theme is up to date. - if ( class_exists( 'WP_Customize_Panel' ) ) { - $wp_customize->add_panel( - 'secondary_navigation_panel', - array( - 'priority' => 100, - 'capability' => 'edit_theme_options', - 'theme_supports' => '', - 'title' => __( 'Secondary Navigation', 'gp-premium' ), - 'description' => '', - ) - ); - } - - $wp_customize->add_section( - 'secondary_nav_section', - array( - 'title' => __( 'Secondary Navigation', 'gp-premium' ), - 'capability' => 'edit_theme_options', - 'priority' => 31, - 'panel' => $layout_panel, - ) - ); - - $wp_customize->add_control( - new GeneratePress_Section_Shortcut_Control( - $wp_customize, - 'generate_secondary_navigation_layout_shortcuts', - array( - 'section' => 'secondary_nav_section', - 'element' => __( 'Secondary Navigation', 'gp-premium' ), - 'shortcuts' => array( - 'colors' => 'secondary_navigation_color_section', - 'typography' => 'secondary_font_section', - 'backgrounds' => 'secondary_bg_images_section', - ), - 'settings' => ( isset( $wp_customize->selective_refresh ) ) ? array() : 'blogname', - 'priority' => 1, - ) - ) - ); - - $wp_customize->add_setting( - 'generate_secondary_nav_settings[secondary_nav_mobile_label]', - array( - 'default' => $defaults['secondary_nav_mobile_label'], - 'type' => 'option', - 'sanitize_callback' => 'wp_kses_post', - ) - ); - - $wp_customize->add_control( - 'secondary_nav_mobile_label_control', - array( - 'label' => __( 'Mobile Menu Label', 'gp-premium' ), - 'section' => 'secondary_nav_section', - 'settings' => 'generate_secondary_nav_settings[secondary_nav_mobile_label]', - 'priority' => 10, - ) - ); - - $wp_customize->add_setting( - 'generate_secondary_nav_settings[secondary_nav_layout_setting]', - array( - 'default' => $defaults['secondary_nav_layout_setting'], - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_choices', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - 'generate_secondary_nav_settings[secondary_nav_layout_setting]', - array( - 'type' => 'select', - 'label' => __( 'Navigation Width', 'gp-premium' ), - 'section' => 'secondary_nav_section', - 'choices' => array( - 'secondary-fluid-nav' => _x( 'Full', 'Width', 'gp-premium' ), - 'secondary-contained-nav' => _x( 'Contained', 'Width', 'gp-premium' ), - ), - 'settings' => 'generate_secondary_nav_settings[secondary_nav_layout_setting]', - 'priority' => 15, - ) - ); - - $wp_customize->add_setting( - 'generate_secondary_nav_settings[secondary_nav_inner_width]', - array( - 'default' => $defaults['secondary_nav_inner_width'], - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_choices', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - 'generate_secondary_nav_settings[secondary_nav_inner_width]', - array( - 'type' => 'select', - 'label' => __( 'Inner Navigation Width', 'gp-premium' ), - 'section' => 'secondary_nav_section', - 'choices' => array( - 'full-width' => _x( 'Full', 'Width', 'gp-premium' ), - 'contained' => _x( 'Contained', 'Width', 'gp-premium' ), - ), - 'settings' => 'generate_secondary_nav_settings[secondary_nav_inner_width]', - 'priority' => 15, - ) - ); - - $wp_customize->add_setting( - 'generate_secondary_nav_settings[secondary_nav_alignment]', - array( - 'default' => $defaults['secondary_nav_alignment'], - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_choices', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - 'generate_secondary_nav_settings[secondary_nav_alignment]', - array( - 'type' => 'select', - 'label' => __( 'Navigation Alignment', 'gp-premium' ), - 'section' => 'secondary_nav_section', - 'choices' => array( - 'left' => __( 'Left', 'gp-premium' ), - 'center' => __( 'Center', 'gp-premium' ), - 'right' => __( 'Right', 'gp-premium' ), - ), - 'settings' => 'generate_secondary_nav_settings[secondary_nav_alignment]', - 'priority' => 20, - ) - ); - - $wp_customize->add_setting( - 'generate_secondary_nav_settings[secondary_nav_position_setting]', - array( - 'default' => $defaults['secondary_nav_position_setting'], - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_choices', - ) - ); - - $wp_customize->add_control( - 'generate_secondary_nav_settings[secondary_nav_position_setting]', - array( - 'type' => 'select', - 'label' => __( 'Navigation Location', 'gp-premium' ), - 'section' => 'secondary_nav_section', - 'choices' => array( - 'secondary-nav-below-header' => __( 'Below Header', 'gp-premium' ), - 'secondary-nav-above-header' => __( 'Above Header', 'gp-premium' ), - 'secondary-nav-float-right' => __( 'Float Right', 'gp-premium' ), - 'secondary-nav-float-left' => __( 'Float Left', 'gp-premium' ), - 'secondary-nav-left-sidebar' => __( 'Left Sidebar', 'gp-premium' ), - 'secondary-nav-right-sidebar' => __( 'Right Sidebar', 'gp-premium' ), - '' => __( 'No Navigation', 'gp-premium' ), - ), - 'settings' => 'generate_secondary_nav_settings[secondary_nav_position_setting]', - 'priority' => 30, - ) - ); - - $wp_customize->add_setting( - 'generate_secondary_nav_settings[secondary_nav_dropdown_direction]', - array( - 'default' => $defaults['secondary_nav_dropdown_direction'], - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_choices', - ) - ); - - $wp_customize->add_control( - 'generate_secondary_nav_settings[secondary_nav_dropdown_direction]', - array( - 'type' => 'select', - 'label' => __( 'Dropdown Direction', 'gp-premium' ), - 'section' => 'secondary_nav_section', - 'choices' => array( - 'right' => __( 'Right', 'gp-premium' ), - 'left' => __( 'Left', 'gp-premium' ), - ), - 'settings' => 'generate_secondary_nav_settings[secondary_nav_dropdown_direction]', - 'priority' => 35, - ) - ); - - $wp_customize->add_setting( - 'generate_secondary_nav_settings[merge_top_bar]', - array( - 'default' => $defaults['merge_top_bar'], - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_checkbox', - ) - ); - - $wp_customize->add_control( - 'generate_secondary_nav_settings[merge_top_bar]', - array( - 'type' => 'checkbox', - 'label' => __( 'Merge with Secondary Navigation', 'gp-premium' ), - 'section' => 'generate_top_bar', - 'settings' => 'generate_secondary_nav_settings[merge_top_bar]', - 'priority' => 100, - 'active_callback' => 'generate_secondary_nav_show_merge_top_bar', - ) - ); - } -} - -if ( ! function_exists( 'generate_display_secondary_google_fonts' ) ) { - add_filter( 'generate_typography_google_fonts', 'generate_display_secondary_google_fonts', 50 ); - /** - * Add Google Fonts to wp_head if needed. - * - * @since 0.1 - * @param array $google_fonts Existing fonts. - */ - function generate_display_secondary_google_fonts( $google_fonts ) { - if ( ! has_nav_menu( 'secondary' ) ) { - return $google_fonts; - } - - $generate_secondary_nav_settings = wp_parse_args( - get_option( 'generate_secondary_nav_settings', array() ), - generate_secondary_nav_get_defaults() - ); - - if ( function_exists( 'generate_typography_default_fonts' ) ) { - $not_google = str_replace( ' ', '+', generate_typography_default_fonts() ); - } else { - $not_google = array( - 'inherit', - 'Arial,+Helvetica,+sans-serif', - 'Century+Gothic', - 'Comic+Sans+MS', - 'Courier+New', - 'Georgia,+Times+New+Roman,+Times,+serif', - 'Helvetica', - 'Impact', - 'Lucida+Console', - 'Lucida+Sans+Unicode', - 'Palatino+Linotype', - 'Tahoma,+Geneva,+sans-serif', - 'Trebuchet+MS,+Helvetica,+sans-serif', - 'Verdana,+Geneva,+sans-serif', - ); - } - - $secondary_google_fonts = array(); - - if ( function_exists( 'generate_get_google_font_variants' ) ) { - - // If our value is still using the old format, fix it. - if ( strpos( $generate_secondary_nav_settings['font_secondary_navigation'], ':' ) !== false ) { - $generate_secondary_nav_settings['font_secondary_navigation'] = current( explode( ':', $generate_secondary_nav_settings['font_secondary_navigation'] ) ); - } - - // Grab the variants using the plain name. - $variants = generate_get_google_font_variants( $generate_secondary_nav_settings['font_secondary_navigation'], 'font_secondary_navigation', generate_secondary_nav_get_defaults() ); - - } else { - $variants = ''; - } - - // Replace the spaces in the names with a plus. - $value = str_replace( ' ', '+', $generate_secondary_nav_settings['font_secondary_navigation'] ); - - // If we have variants, add them to our value. - $value = ! empty( $variants ) ? $value . ':' . $variants : $value; - - // Add our value to the array. - $secondary_google_fonts[] = $value; - - // Ignore any non-Google fonts. - $secondary_google_fonts = array_diff( $secondary_google_fonts, $not_google ); - - // Separate each different font with a bar. - $secondary_google_fonts = implode( '|', $secondary_google_fonts ); - - if ( ! empty( $secondary_google_fonts ) ) { - $print_secondary_fonts = '|' . $secondary_google_fonts; - } else { - $print_secondary_fonts = ''; - } - - // Remove any duplicates. - $return = $google_fonts . $print_secondary_fonts; - $return = implode( '|', array_unique( explode( '|', $return ) ) ); - return $return; - - } -} - -if ( ! function_exists( 'generate_add_secondary_navigation_after_header' ) ) { - add_action( 'generate_after_header', 'generate_add_secondary_navigation_after_header', 7 ); - /** - * Add the navigation after the header. - * - * @since 0.1 - */ - function generate_add_secondary_navigation_after_header() { - $generate_settings = wp_parse_args( - get_option( 'generate_secondary_nav_settings', array() ), - generate_secondary_nav_get_defaults() - ); - - if ( 'secondary-nav-below-header' === $generate_settings['secondary_nav_position_setting'] ) { - generate_secondary_navigation_position(); - } - - } -} - -if ( ! function_exists( 'generate_add_secondary_navigation_before_header' ) ) { - add_action( 'generate_before_header', 'generate_add_secondary_navigation_before_header', 7 ); - /** - * Add the navigation before the header. - * - * @since 0.1 - */ - function generate_add_secondary_navigation_before_header() { - $generate_settings = wp_parse_args( - get_option( 'generate_secondary_nav_settings', array() ), - generate_secondary_nav_get_defaults() - ); - - if ( 'secondary-nav-above-header' === $generate_settings['secondary_nav_position_setting'] ) { - generate_secondary_navigation_position(); - } - - } -} - -if ( ! function_exists( 'generate_add_secondary_navigation_float_right' ) ) { - add_action( 'generate_before_header_content', 'generate_add_secondary_navigation_float_right', 7 ); - /** - * Add the navigation inside the header so it can float right. - * - * @since 0.1 - */ - function generate_add_secondary_navigation_float_right() { - if ( function_exists( 'generate_is_using_flexbox' ) && generate_is_using_flexbox() ) { - return; - } - - $generate_settings = wp_parse_args( - get_option( 'generate_secondary_nav_settings', array() ), - generate_secondary_nav_get_defaults() - ); - - if ( 'secondary-nav-float-right' === $generate_settings['secondary_nav_position_setting'] || 'secondary-nav-float-left' === $generate_settings['secondary_nav_position_setting'] ) { - generate_secondary_navigation_position(); - } - - } -} - -add_action( 'generate_after_header_content', 'generate_do_secondary_navigation_float_right', 7 ); -/** - * Add the navigation inside the header so it can float right. - * - * @since 1.11.0 - */ -function generate_do_secondary_navigation_float_right() { - if ( ! function_exists( 'generate_is_using_flexbox' ) ) { - return; - } - - if ( ! generate_is_using_flexbox() ) { - return; - } - - $generate_settings = wp_parse_args( - get_option( 'generate_secondary_nav_settings', array() ), - generate_secondary_nav_get_defaults() - ); - - if ( 'secondary-nav-float-right' === $generate_settings['secondary_nav_position_setting'] || 'secondary-nav-float-left' === $generate_settings['secondary_nav_position_setting'] ) { - generate_secondary_navigation_position(); - } - -} - -add_action( 'generate_before_navigation', 'generate_do_multi_navigation_wrapper_open', 11 ); -/** - * Open our wrapper that puts both navigations inside one element. - * - * @since 1.11.0 - */ -function generate_do_multi_navigation_wrapper_open() { - if ( ! function_exists( 'generate_is_using_flexbox' ) ) { - return; - } - - if ( ! generate_is_using_flexbox() ) { - return; - } - - if ( ! function_exists( 'generate_get_option' ) ) { - return; - } - - if ( ! has_nav_menu( 'secondary' ) ) { - return; - } - - if ( function_exists( 'generate_menu_plus_get_defaults' ) ) { - $menu_settings = wp_parse_args( - get_option( 'generate_menu_plus_settings', array() ), - generate_menu_plus_get_defaults() - ); - - if ( $menu_settings['navigation_as_header'] ) { - return; - } - } - - $generate_settings = wp_parse_args( - get_option( 'generate_secondary_nav_settings', array() ), - generate_secondary_nav_get_defaults() - ); - - if ( - ( 'secondary-nav-float-right' === $generate_settings['secondary_nav_position_setting'] && 'nav-float-right' === generate_get_option( 'nav_position_setting' ) ) || - ( 'secondary-nav-float-left' === $generate_settings['secondary_nav_position_setting'] && 'nav-float-left' === generate_get_option( 'nav_position_setting' ) ) - ) { - echo '
          '; - } -} - -add_action( 'generate_after_secondary_navigation', 'generate_do_multi_navigation_wrapper_close', 7 ); -/** - * Close our wrapper that puts both navigations inside one element. - * - * @since 1.11.0 - */ -function generate_do_multi_navigation_wrapper_close() { - if ( ! function_exists( 'generate_is_using_flexbox' ) ) { - return; - } - - if ( ! generate_is_using_flexbox() ) { - return; - } - - if ( ! function_exists( 'generate_get_option' ) ) { - return; - } - - $generate_settings = wp_parse_args( - get_option( 'generate_secondary_nav_settings', array() ), - generate_secondary_nav_get_defaults() - ); - - if ( - ( 'secondary-nav-float-right' === $generate_settings['secondary_nav_position_setting'] && 'nav-float-right' === generate_get_option( 'nav_position_setting' ) ) || - ( 'secondary-nav-float-left' === $generate_settings['secondary_nav_position_setting'] && 'nav-float-left' === generate_get_option( 'nav_position_setting' ) ) - ) { - echo '
          '; - } -} - -if ( ! function_exists( 'generate_add_secondary_navigation_before_right_sidebar' ) ) { - add_action( 'generate_before_right_sidebar_content', 'generate_add_secondary_navigation_before_right_sidebar', 7 ); - /** - * Add the navigation into the right sidebar. - * - * @since 0.1 - */ - function generate_add_secondary_navigation_before_right_sidebar() { - $generate_settings = wp_parse_args( - get_option( 'generate_secondary_nav_settings', array() ), - generate_secondary_nav_get_defaults() - ); - - if ( 'secondary-nav-right-sidebar' === $generate_settings['secondary_nav_position_setting'] ) { - echo '
          '; - generate_secondary_navigation_position(); - echo '
          '; - } - - } -} - -if ( ! function_exists( 'generate_add_secondary_navigation_before_left_sidebar' ) ) { - add_action( 'generate_before_left_sidebar_content', 'generate_add_secondary_navigation_before_left_sidebar', 7 ); - /** - * Add the navigation into the left sidebar. - * - * @since 0.1 - */ - function generate_add_secondary_navigation_before_left_sidebar() { - $generate_settings = wp_parse_args( - get_option( 'generate_secondary_nav_settings', array() ), - generate_secondary_nav_get_defaults() - ); - - if ( 'secondary-nav-left-sidebar' === $generate_settings['secondary_nav_position_setting'] ) { - echo '
          '; - generate_secondary_navigation_position(); - echo '
          '; - } - - } -} - -if ( ! function_exists( 'generate_secondary_navigation_position' ) ) { - /** - * Build our secondary navigation. - * Would like to change this function name. - * - * @since 0.1 - */ - function generate_secondary_navigation_position() { - $generate_settings = wp_parse_args( - get_option( 'generate_secondary_nav_settings', array() ), - generate_secondary_nav_get_defaults() - ); - if ( has_nav_menu( 'secondary' ) ) : - do_action( 'generate_before_secondary_navigation' ); - - $microdata = ' itemtype="https://schema.org/SiteNavigationElement" itemscope="itemscope"'; - - if ( function_exists( 'generate_get_schema_type' ) && 'microdata' !== generate_get_schema_type() ) { - $microdata = ''; - } - ?> - - - - '; - do_action( 'generate_secondary_menu_bar_items' ); - echo ''; - } - } -} - -if ( ! function_exists( 'generate_secondary_nav_body_classes' ) ) { - add_filter( 'body_class', 'generate_secondary_nav_body_classes' ); - /** - * Adds custom classes to the array of body classes. - * - * @since 0.1 - * @param array $classes Existing body classes. - */ - function generate_secondary_nav_body_classes( $classes ) { - if ( ! has_nav_menu( 'secondary' ) ) { - return $classes; - } - - $generate_settings = wp_parse_args( - get_option( 'generate_secondary_nav_settings', array() ), - generate_secondary_nav_get_defaults() - ); - - $classes[] = ( $generate_settings['secondary_nav_position_setting'] ) ? $generate_settings['secondary_nav_position_setting'] : 'secondary-nav-below-header'; - - if ( 'left' === $generate_settings['secondary_nav_alignment'] ) { - $classes[] = 'secondary-nav-aligned-left'; - } elseif ( 'center' === $generate_settings['secondary_nav_alignment'] ) { - $classes[] = 'secondary-nav-aligned-center'; - } elseif ( 'right' === $generate_settings['secondary_nav_alignment'] ) { - $classes[] = 'secondary-nav-aligned-right'; - } else { - $classes[] = 'secondary-nav-aligned-left'; - } - - return $classes; - } -} - -if ( ! function_exists( 'generate_secondary_menu_classes' ) ) { - add_filter( 'generate_secondary_menu_class', 'generate_secondary_menu_classes' ); - /** - * Adds custom classes to the menu. - * - * @since 0.1 - * @param array $classes Existing classes. - */ - function generate_secondary_menu_classes( $classes ) { - - $classes[] = 'secondary-menu'; - $classes[] = 'sf-menu'; - - return $classes; - - } -} - -if ( ! function_exists( 'generate_secondary_navigation_classes' ) ) { - add_filter( 'generate_secondary_navigation_class', 'generate_secondary_navigation_classes' ); - /** - * Adds custom classes to the navigation. - * - * @since 0.1 - * @param array $classes Existing classes. - */ - function generate_secondary_navigation_classes( $classes ) { - $classes[] = 'secondary-navigation'; - - $generate_settings = wp_parse_args( - get_option( 'generate_secondary_nav_settings', array() ), - generate_secondary_nav_get_defaults() - ); - - $nav_layout = $generate_settings['secondary_nav_layout_setting']; - - if ( 'secondary-contained-nav' === $nav_layout ) { - if ( function_exists( 'generate_is_using_flexbox' ) && generate_is_using_flexbox() ) { - $navigation_location = $generate_settings['secondary_nav_position_setting']; - - if ( 'secondary-nav-float-right' !== $navigation_location && 'secondary-nav-float-left' !== $navigation_location ) { - $classes[] = 'grid-container'; - } - } else { - $classes[] = 'grid-container'; - $classes[] = 'grid-parent'; - } - } - - if ( 'left' === $generate_settings['secondary_nav_dropdown_direction'] ) { - $layout = $generate_settings['secondary_nav_position_setting']; - - switch ( $layout ) { - case 'secondary-nav-below-header': - case 'secondary-nav-above-header': - case 'secondary-nav-float-right': - case 'secondary-nav-float-left': - $classes[] = 'sub-menu-left'; - break; - } - } - - if ( $generate_settings['merge_top_bar'] && is_active_sidebar( 'top-bar' ) ) { - $classes[] = 'has-top-bar'; - } - - if ( generate_secondary_nav_has_menu_bar_items() ) { - $classes[] = 'has-menu-bar-items'; - } - - return $classes; - - } -} - -if ( ! function_exists( 'generate_inside_secondary_navigation_classes' ) ) { - add_filter( 'generate_inside_secondary_navigation_class', 'generate_inside_secondary_navigation_classes' ); - /** - * Adds custom classes to the inner navigation - * - * @since 1.3.41 - * @param array $classes Existing classes. - */ - function generate_inside_secondary_navigation_classes( $classes ) { - $classes[] = 'inside-navigation'; - - $generate_settings = wp_parse_args( - get_option( 'generate_secondary_nav_settings', array() ), - generate_secondary_nav_get_defaults() - ); - - $inner_nav_width = $generate_settings['secondary_nav_inner_width']; - - if ( 'full-width' !== $inner_nav_width ) { - $classes[] = 'grid-container'; - $classes[] = 'grid-parent'; - } - - return $classes; - - } -} - -if ( ! function_exists( 'generate_secondary_nav_css' ) ) { - /** - * Generate the CSS in the section using the Theme Customizer. - * - * @since 0.1 - */ - function generate_secondary_nav_css() { - - $generate_settings = wp_parse_args( - get_option( 'generate_secondary_nav_settings', array() ), - generate_secondary_nav_get_defaults() - ); - - if ( function_exists( 'generate_spacing_get_defaults' ) ) { - $spacing_settings = wp_parse_args( - get_option( 'generate_spacing_settings', array() ), - generate_spacing_get_defaults() - ); - $separator = $spacing_settings['separator']; - } else { - $separator = 20; - } - - // Check if we're using our legacy typography system. - $using_dynamic_typography = function_exists( 'generate_is_using_dynamic_typography' ) && generate_is_using_dynamic_typography(); - $secondary_nav_family = ''; - - if ( ! $using_dynamic_typography ) { - if ( function_exists( 'generate_get_font_family_css' ) ) { - $secondary_nav_family = generate_get_font_family_css( 'font_secondary_navigation', 'generate_secondary_nav_settings', generate_secondary_nav_get_defaults() ); - } else { - $secondary_nav_family = current( explode( ':', $generate_settings['font_secondary_navigation'] ) ); - } - - if ( '""' === $secondary_nav_family ) { - $secondary_nav_family = 'inherit'; - } - } - - // Get our untouched defaults. - $og_defaults = generate_secondary_nav_get_defaults( false ); - - $css = new GeneratePress_Secondary_Nav_CSS(); - - $css->set_selector( '.secondary-navigation' ); - $css->add_property( 'background-color', esc_attr( $generate_settings['navigation_background_color'] ) ); - $css->add_property( 'background-image', ! empty( $generate_settings['nav_image'] ) ? 'url(' . esc_url( $generate_settings['nav_image'] ) . ')' : '' ); - $css->add_property( 'background-repeat', esc_attr( $generate_settings['nav_repeat'] ) ); - - if ( function_exists( 'generate_is_using_flexbox' ) && generate_is_using_flexbox() ) { - if ( function_exists( 'generate_spacing_get_defaults' ) && function_exists( 'generate_get_option' ) && 'text' === generate_get_option( 'container_alignment' ) ) { - $spacing_settings = wp_parse_args( - get_option( 'generate_spacing_settings', array() ), - generate_spacing_get_defaults() - ); - - $navigation_left_padding = absint( $spacing_settings['header_left'] ) - absint( $generate_settings['secondary_menu_item'] ); - $navigation_right_padding = absint( $spacing_settings['header_right'] ) - absint( $generate_settings['secondary_menu_item'] ); - - $css->set_selector( '.secondary-nav-below-header .secondary-navigation .inside-navigation.grid-container, .secondary-nav-above-header .secondary-navigation .inside-navigation.grid-container' ); - $css->add_property( 'padding', generate_padding_css( 0, $navigation_right_padding, 0, $navigation_left_padding ) ); - } - } - - if ( 'secondary-nav-above-header' === $generate_settings['secondary_nav_position_setting'] && has_nav_menu( 'secondary' ) && is_active_sidebar( 'top-bar' ) ) { - $css->set_selector( '.secondary-navigation .top-bar' ); - $css->add_property( 'color', esc_attr( $generate_settings['navigation_text_color'] ) ); - $css->add_property( 'line-height', absint( $generate_settings['secondary_menu_item_height'] ), false, 'px' ); - - if ( ! $using_dynamic_typography ) { - $css->add_property( 'font-family', $secondary_nav_family ); - $css->add_property( 'font-weight', esc_attr( $generate_settings['secondary_navigation_font_weight'] ) ); - $css->add_property( 'text-transform', esc_attr( $generate_settings['secondary_navigation_font_transform'] ) ); - $css->add_property( 'font-size', absint( $generate_settings['secondary_navigation_font_size'] ), false, 'px' ); - } - - $css->set_selector( '.secondary-navigation .top-bar a' ); - $css->add_property( 'color', esc_attr( $generate_settings['navigation_text_color'] ) ); - - $css->set_selector( '.secondary-navigation .top-bar a:hover, .secondary-navigation .top-bar a:focus' ); - $css->add_property( 'color', esc_attr( $generate_settings['navigation_background_hover_color'] ) ); - } - - // Navigation text. - $css->set_selector( '.secondary-navigation .main-nav ul li a,.secondary-navigation .menu-toggle,.secondary-menu-bar-items .menu-bar-item > a' ); - $css->add_property( 'color', esc_attr( $generate_settings['navigation_text_color'] ) ); - - if ( ! $using_dynamic_typography ) { - $css->add_property( 'font-family', ( 'inherit' !== $secondary_nav_family ) ? $secondary_nav_family : null ); - $css->add_property( 'font-weight', esc_attr( $generate_settings['secondary_navigation_font_weight'] ), $og_defaults['secondary_navigation_font_weight'] ); - $css->add_property( 'text-transform', esc_attr( $generate_settings['secondary_navigation_font_transform'] ), $og_defaults['secondary_navigation_font_transform'] ); - $css->add_property( 'font-size', absint( $generate_settings['secondary_navigation_font_size'] ), $og_defaults['secondary_navigation_font_size'], 'px' ); - } - - $css->add_property( 'padding-left', absint( $generate_settings['secondary_menu_item'] ), $og_defaults['secondary_menu_item'], 'px' ); - $css->add_property( 'padding-right', absint( $generate_settings['secondary_menu_item'] ), $og_defaults['secondary_menu_item'], 'px' ); - $css->add_property( 'line-height', absint( $generate_settings['secondary_menu_item_height'] ), $og_defaults['secondary_menu_item_height'], 'px' ); - $css->add_property( 'background-image', ! empty( $generate_settings['nav_item_image'] ) ? 'url(' . esc_url( $generate_settings['nav_item_image'] ) . ')' : '' ); - $css->add_property( 'background-repeat', esc_attr( $generate_settings['nav_item_repeat'] ) ); - - $css->set_selector( '.secondary-navigation .secondary-menu-bar-items' ); - $css->add_property( 'color', $generate_settings['navigation_text_color'] ); - - if ( ! $using_dynamic_typography ) { - $css->add_property( 'font-size', absint( $generate_settings['secondary_navigation_font_size'] ), $og_defaults['secondary_navigation_font_size'], 'px' ); - } - - // Mobile menu text on hover. - $css->set_selector( 'button.secondary-menu-toggle:hover,button.secondary-menu-toggle:focus' ); - $css->add_property( 'color', esc_attr( $generate_settings['navigation_text_color'] ) ); - - // Widget area navigation. - $css->set_selector( '.widget-area .secondary-navigation' ); - $css->add_property( 'margin-bottom', absint( $separator ), false, 'px' ); - - // Sub-navigation background. - $css->set_selector( '.secondary-navigation ul ul' ); - $css->add_property( 'background-color', esc_attr( $generate_settings['subnavigation_background_color'] ) ); - $css->add_property( 'top', 'auto' ); // Added for compatibility purposes on 22/12/2016. - - // Sub-navigation text. - $css->set_selector( '.secondary-navigation .main-nav ul ul li a' ); - $css->add_property( 'color', esc_attr( $generate_settings['subnavigation_text_color'] ) ); - - if ( ! $using_dynamic_typography ) { - $css->add_property( 'font-size', absint( $generate_settings['secondary_navigation_font_size'] - 1 ), absint( $og_defaults['secondary_navigation_font_size'] - 1 ), 'px' ); - } - - $css->add_property( 'padding-left', absint( $generate_settings['secondary_menu_item'] ), $og_defaults['secondary_menu_item'], 'px' ); - $css->add_property( 'padding-right', absint( $generate_settings['secondary_menu_item'] ), $og_defaults['secondary_menu_item'], 'px' ); - $css->add_property( 'padding-top', absint( $generate_settings['secondary_sub_menu_item_height'] ), $og_defaults['secondary_sub_menu_item_height'], 'px' ); - $css->add_property( 'padding-bottom', absint( $generate_settings['secondary_sub_menu_item_height'] ), $og_defaults['secondary_sub_menu_item_height'], 'px' ); - $css->add_property( 'background-image', ! empty( $generate_settings['sub_nav_item_image'] ) ? 'url(' . esc_url( $generate_settings['sub_nav_item_image'] ) . ')' : '' ); - $css->add_property( 'background-repeat', esc_attr( $generate_settings['sub_nav_item_repeat'] ) ); - - // Menu item padding on RTL. - if ( is_rtl() ) { - $css->set_selector( 'nav.secondary-navigation .main-nav ul li.menu-item-has-children > a' ); - $css->add_property( 'padding-right', absint( $generate_settings['secondary_menu_item'] ), $og_defaults['secondary_menu_item'], 'px' ); - } - - // Dropdown arrow. - $css->set_selector( '.secondary-navigation .menu-item-has-children ul .dropdown-menu-toggle' ); - $css->add_property( 'padding-top', absint( $generate_settings['secondary_sub_menu_item_height'] ), $og_defaults['secondary_sub_menu_item_height'], 'px' ); - $css->add_property( 'padding-bottom', absint( $generate_settings['secondary_sub_menu_item_height'] ), $og_defaults['secondary_sub_menu_item_height'], 'px' ); - $css->add_property( 'margin-top', '-' . absint( $generate_settings['secondary_sub_menu_item_height'] ), '-' . absint( $og_defaults['secondary_sub_menu_item_height'] ), 'px' ); - - // Dropdown arrow. - $css->set_selector( '.secondary-navigation .menu-item-has-children .dropdown-menu-toggle' ); - $css->add_property( 'padding-right', absint( $generate_settings['secondary_menu_item'] ), $og_defaults['secondary_menu_item'], 'px' ); - - // Sub-navigation dropdown arrow. - $css->set_selector( '.secondary-navigation .menu-item-has-children ul .dropdown-menu-toggle' ); - $css->add_property( 'padding-top', absint( $generate_settings['secondary_sub_menu_item_height'] ), $og_defaults['secondary_sub_menu_item_height'], 'px' ); - $css->add_property( 'padding-bottom', absint( $generate_settings['secondary_sub_menu_item_height'] ), $og_defaults['secondary_sub_menu_item_height'], 'px' ); - $css->add_property( 'margin-top', '-' . absint( $generate_settings['secondary_sub_menu_item_height'] ), '-' . absint( $og_defaults['secondary_sub_menu_item_height'] ), 'px' ); - - // Navigation background/text on hover. - $css->set_selector( '.secondary-navigation .main-nav ul li:not([class*="current-menu-"]):hover > a, .secondary-navigation .main-nav ul li:not([class*="current-menu-"]):focus > a, .secondary-navigation .main-nav ul li.sfHover:not([class*="current-menu-"]) > a, .secondary-menu-bar-items .menu-bar-item:hover > a' ); - $css->add_property( 'color', esc_attr( $generate_settings['navigation_text_hover_color'] ) ); - $css->add_property( 'background-color', esc_attr( $generate_settings['navigation_background_hover_color'] ) ); - $css->add_property( 'background-image', ! empty( $generate_settings['nav_item_hover_image'] ) ? 'url(' . esc_url( $generate_settings['nav_item_hover_image'] ) . ')' : '' ); - $css->add_property( 'background-repeat', esc_attr( $generate_settings['nav_item_hover_repeat'] ) ); - - // Sub-Navigation background/text on hover. - $css->set_selector( '.secondary-navigation .main-nav ul ul li:not([class*="current-menu-"]):hover > a,.secondary-navigation .main-nav ul ul li:not([class*="current-menu-"]):focus > a,.secondary-navigation .main-nav ul ul li.sfHover:not([class*="current-menu-"]) > a' ); - $css->add_property( 'color', esc_attr( $generate_settings['subnavigation_text_hover_color'] ) ); - $css->add_property( 'background-color', esc_attr( $generate_settings['subnavigation_background_hover_color'] ) ); - $css->add_property( 'background-image', ! empty( $generate_settings['sub_nav_item_hover_image'] ) ? 'url(' . esc_url( $generate_settings['sub_nav_item_hover_image'] ) . ')' : '' ); - $css->add_property( 'background-repeat', esc_attr( $generate_settings['sub_nav_item_hover_repeat'] ) ); - - // Navigation background / text current + hover. - $css->set_selector( '.secondary-navigation .main-nav ul li[class*="current-menu-"] > a' ); - $css->add_property( 'color', esc_attr( $generate_settings['navigation_text_current_color'] ) ); - $css->add_property( 'background-color', esc_attr( $generate_settings['navigation_background_current_color'] ) ); - $css->add_property( 'background-image', ! empty( $generate_settings['nav_item_current_image'] ) ? 'url(' . esc_url( $generate_settings['nav_item_current_image'] ) . ')' : '' ); - $css->add_property( 'background-repeat', esc_attr( $generate_settings['nav_item_current_repeat'] ) ); - - // Sub-Navigation background / text current + hover. - $css->set_selector( '.secondary-navigation .main-nav ul ul li[class*="current-menu-"] > a' ); - $css->add_property( 'color', esc_attr( $generate_settings['subnavigation_text_current_color'] ) ); - $css->add_property( 'background-color', esc_attr( $generate_settings['subnavigation_background_current_color'] ) ); - $css->add_property( 'background-image', ! empty( $generate_settings['sub_nav_item_current_image'] ) ? 'url(' . esc_url( $generate_settings['sub_nav_item_current_image'] ) . ')' : '' ); - $css->add_property( 'background-repeat', esc_attr( $generate_settings['sub_nav_item_current_repeat'] ) ); - - // RTL menu item padding. - if ( is_rtl() ) { - $css->set_selector( '.secondary-navigation .main-nav ul li.menu-item-has-children > a' ); - $css->add_property( 'padding-right', absint( $generate_settings['secondary_menu_item'] ), false, 'px' ); - } - - if ( function_exists( 'generate_get_option' ) && function_exists( 'generate_get_defaults' ) ) { - $theme_defaults = generate_get_defaults(); - - if ( isset( $theme_defaults['icons'] ) ) { - if ( 'svg' === generate_get_option( 'icons' ) ) { - $css->set_selector( '.secondary-navigation.toggled .dropdown-menu-toggle:before' ); - $css->add_property( 'display', 'none' ); - } - } - } - - $mobile_css = '@media ' . generate_premium_get_media_query( 'mobile-menu' ) . ' {.secondary-menu-bar-items .menu-bar-item:hover > a{background: none;color: ' . $generate_settings['navigation_text_color'] . ';}}'; - - // Return our dynamic CSS. - return $css->css_output() . $mobile_css; - } -} - -if ( ! function_exists( 'generate_secondary_color_scripts' ) ) { - add_action( 'wp_enqueue_scripts', 'generate_secondary_color_scripts', 110 ); - /** - * Enqueue scripts and styles - */ - function generate_secondary_color_scripts() { - // Bail if no Secondary menu is set. - if ( ! has_nav_menu( 'secondary' ) ) { - return; - } - - wp_add_inline_style( 'generate-secondary-nav', generate_secondary_nav_css() ); - - if ( class_exists( 'GeneratePress_Typography' ) ) { - wp_add_inline_style( 'generate-secondary-nav', GeneratePress_Typography::get_css( 'secondary-nav' ) ); - } - } -} - -if ( ! function_exists( 'generate_secondary_navigation_class' ) ) { - /** - * Display the classes for the secondary navigation. - * - * @since 0.1 - * @param string|array $class One or more classes to add to the class list. - */ - function generate_secondary_navigation_class( $class = '' ) { - // Separates classes with a single space, collates classes for post DIV. - echo 'class="' . join( ' ', generate_get_secondary_navigation_class( $class ) ) . '"'; // phpcs:ignore -- Escaped in generate_get_secondary_navigation_class. - } -} - -if ( ! function_exists( 'generate_get_secondary_navigation_class' ) ) { - /** - * Retrieve the classes for the secondary navigation. - * - * @since 0.1 - * @param string|array $class One or more classes to add to the class list. - * @return array Array of classes. - */ - function generate_get_secondary_navigation_class( $class = '' ) { - $classes = array(); - - if ( ! empty( $class ) ) { - if ( ! is_array( $class ) ) { - $class = preg_split( '#\s+#', $class ); - } - - $classes = array_merge( $classes, $class ); - } - - $classes = array_map( 'esc_attr', $classes ); - - return apply_filters( 'generate_secondary_navigation_class', $classes, $class ); - } -} - -if ( ! function_exists( 'generate_secondary_menu_class' ) ) { - /** - * Display the classes for the secondary navigation. - * - * @since 0.1 - * @param string|array $class One or more classes to add to the class list. - */ - function generate_secondary_menu_class( $class = '' ) { - // Separates classes with a single space, collates classes for post DIV. - echo 'class="' . join( ' ', generate_get_secondary_menu_class( $class ) ) . '"'; // phpcs:ignore -- Escaped in generate_get_secondary_menu_class. - } -} - -if ( ! function_exists( 'generate_get_secondary_menu_class' ) ) { - /** - * Retrieve the classes for the secondary navigation. - * - * @since 0.1 - * @param string|array $class One or more classes to add to the class list. - * @return array Array of classes. - */ - function generate_get_secondary_menu_class( $class = '' ) { - $classes = array(); - - if ( ! empty( $class ) ) { - if ( ! is_array( $class ) ) { - $class = preg_split( '#\s+#', $class ); - } - - $classes = array_merge( $classes, $class ); - } - - $classes = array_map( 'esc_attr', $classes ); - - return apply_filters( 'generate_secondary_menu_class', $classes, $class ); - } -} - -if ( ! function_exists( 'generate_inside_secondary_navigation_class' ) ) { - /** - * Display the classes for the inner navigation. - * - * @since 0.1 - * @param string|array $class One or more classes to add to the class list. - */ - function generate_inside_secondary_navigation_class( $class = '' ) { - $classes = array(); - - if ( ! empty( $class ) ) { - if ( ! is_array( $class ) ) { - $class = preg_split( '#\s+#', $class ); - } - - $classes = array_merge( $classes, $class ); - } - - $classes = array_map( 'esc_attr', $classes ); - - $return = apply_filters( 'generate_inside_secondary_navigation_class', $classes, $class ); - - // Separates classes with a single space, collates classes for post DIV. - echo 'class="' . join( ' ', $return ) . '"'; // phpcs:ignore -- Escaped above. - } -} - -if ( ! function_exists( 'generate_secondary_nav_remove_top_bar' ) ) { - add_action( 'wp', 'generate_secondary_nav_remove_top_bar' ); - /** - * Remove the top bar and add it to the Secondary Navigation if it's set - */ - function generate_secondary_nav_remove_top_bar() { - $generate_settings = wp_parse_args( - get_option( 'generate_secondary_nav_settings', array() ), - generate_secondary_nav_get_defaults() - ); - - if ( $generate_settings['merge_top_bar'] && 'secondary-nav-above-header' === $generate_settings['secondary_nav_position_setting'] && has_nav_menu( 'secondary' ) && is_active_sidebar( 'top-bar' ) ) { - remove_action( 'generate_before_header', 'generate_top_bar', 5 ); - add_action( 'generate_inside_secondary_navigation', 'generate_secondary_nav_top_bar_widget', 5 ); - add_filter( 'generate_is_top_bar_active', '__return_false' ); - } - } -} - -if ( ! function_exists( 'generate_secondary_nav_top_bar_widget' ) ) { - /** - * Build the top bar widget area - * This is placed into the secondary navigation if set - */ - function generate_secondary_nav_top_bar_widget() { - if ( ! is_active_sidebar( 'top-bar' ) ) { - return; - } - ?> -
          -
          - -
          -
          - .secondary-navigation .main-nav ul li a, .secondary-navigation .menu-toggle, .secondary-menu-bar-items .menu-bar-item > a{padding: 0 ' + newval + 'px;}.secondary-navigation .menu-item-has-children .dropdown-menu-toggle{padding-right:' + newval + 'px;}' ); - setTimeout(function() { - jQuery( 'style#secondary_menu_item' ).not( ':last' ).remove(); - }, 50); - } ); - } ); - - wp.customize( 'generate_secondary_nav_settings[secondary_menu_item_height]', function( value ) { - value.bind( function( newval ) { - jQuery( 'head' ).append( '' ); - setTimeout(function() { - jQuery( 'style#secondary_menu_item_height' ).not( ':last' ).remove(); - }, 50); - } ); - } ); - - wp.customize( 'generate_secondary_nav_settings[secondary_sub_menu_item_height]', function( value ) { - value.bind( function( newval ) { - jQuery( 'head' ).append( '' ); - setTimeout(function() { - jQuery( 'style#secondary_sub_menu_item_height' ).not( ':last' ).remove(); - }, 50); - } ); - } ); - -})( jQuery ); diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/secondary-nav/generate-secondary-nav.php b/wp-content/upgrade-temp-backup/plugins/gp-premium/secondary-nav/generate-secondary-nav.php deleted file mode 100644 index 7c3e48eb..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/secondary-nav/generate-secondary-nav.php +++ /dev/null @@ -1,23 +0,0 @@ - *:last-child { - margin-bottom: 0; -} - -.generate-sections-container { - background-size: cover; -} - -.generate-sections-container.no-padding .generate-sections-inside-container { - padding: 0px !important; -} - -.generate-sections-enabled.one-container .site-content { - padding: 0; -} - -.generate-sections-enabled.one-container .container { - background: transparent; -} - -.generate-sections-enabled.one-container .site-main { - margin: 0 !important; -} - -.generate-sections-enabled .entry-content { - text-align: center; -} - -.separate-containers .site-main > .generate-sections-container { - margin-bottom: 0; -} \ No newline at end of file diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/sections/functions/css/style.min.css b/wp-content/upgrade-temp-backup/plugins/gp-premium/sections/functions/css/style.min.css deleted file mode 100644 index 802b011a..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/sections/functions/css/style.min.css +++ /dev/null @@ -1 +0,0 @@ -.sections-no-sidebars.generate-sections-enabled .container.grid-container,.sections-sidebars.no-sidebar.generate-sections-enabled .container.grid-container{max-width:100%}.sections-no-sidebars.generate-sections-enabled #primary.content-area,.sections-sidebars.no-sidebar.generate-sections-enabled #primary.content-area{width:100%}.sections-no-sidebars.generate-sections-enabled.separate-containers #main.site-main,.sections-no-sidebars.generate-sections-enabled.separate-containers .hentry,.sections-sidebars.no-sidebar.generate-sections-enabled.separate-containers #main.site-main,.sections-sidebars.no-sidebar.generate-sections-enabled.separate-containers .hentry{margin:0}.generate-sections-inside-container>:last-child{margin-bottom:0}.generate-sections-container{background-size:cover}.generate-sections-container.no-padding .generate-sections-inside-container{padding:0!important}.generate-sections-enabled.one-container .site-content{padding:0}.generate-sections-enabled.one-container .container{background:0 0}.generate-sections-enabled.one-container .site-main{margin:0!important}.generate-sections-enabled .entry-content{text-align:center}.separate-containers .site-main>.generate-sections-container{margin-bottom:0} \ No newline at end of file diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/sections/functions/generate-sections.php b/wp-content/upgrade-temp-backup/plugins/gp-premium/sections/functions/generate-sections.php deleted file mode 100644 index 2703c8e4..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/sections/functions/generate-sections.php +++ /dev/null @@ -1,329 +0,0 @@ -ID, '_generate_use_sections', TRUE) : ''; - - if ( is_home() || is_archive() || is_search() || is_attachment() || is_tax() ) { - return $template; - } - - if ( isset( $use_sections['use_sections'] ) && 'true' == $use_sections['use_sections'] ) { - - $new_template = dirname( __FILE__ ) . '/templates/template.php'; - - if ( '' != $new_template ) { - return $new_template; - } - } - return $template; - - } -} - -if ( ! function_exists( 'generate_sections_show_excerpt' ) ) { - add_filter( 'generate_show_excerpt', 'generate_sections_show_excerpt' ); - /** - * If Sections is enabled on a post, make sure we use the excerpt field on the blog page - */ - function generate_sections_show_excerpt( $show_excerpt ) { - global $post; - $use_sections = ( isset( $post ) ) ? get_post_meta( $post->ID, '_generate_use_sections', TRUE) : ''; - - if ( isset( $use_sections['use_sections'] ) && 'true' == $use_sections['use_sections'] ) { - return true; - } - - return $show_excerpt; - } -} - -if ( ! function_exists( 'generate_sections_styles' ) ) { - add_action( 'wp_enqueue_scripts', 'generate_sections_styles' ); - /** - * Enqueue necessary scripts if sections are enabled - */ - function generate_sections_styles() { - - global $post; - $use_sections = ( isset( $post ) ) ? get_post_meta( $post->ID, '_generate_use_sections', TRUE) : ''; - - // Bail if we're on a posts page - if ( is_home() || is_archive() || is_search() || is_attachment() || is_tax() ) { - return; - } - - if ( isset( $use_sections['use_sections'] ) && 'true' == $use_sections['use_sections'] ) { - wp_enqueue_style( 'generate-sections-styles', plugin_dir_url( __FILE__ ) . 'css/style.min.css' ); - wp_enqueue_script( 'generate-sections-parallax', plugin_dir_url( __FILE__ ) . 'js/parallax.min.js', array(), GENERATE_SECTIONS_VERSION, true ); - } - } -} - -if ( ! function_exists( 'generate_sections_body_classes' ) ) { - add_filter( 'body_class', 'generate_sections_body_classes' ); - /** - * Add classes to our element when sections are enabled - */ - function generate_sections_body_classes( $classes ) { - global $post; - $use_sections = ( isset( $post ) ) ? get_post_meta( $post->ID, '_generate_use_sections', TRUE) : ''; - $sidebars = apply_filters( 'generate_sections_sidebars', false ); - - // Bail if we're on a posts page - if ( is_home() || is_archive() || is_search() || is_attachment() || is_tax() ) { - return $classes; - } - - if ( isset( $use_sections['use_sections'] ) && 'true' == $use_sections['use_sections'] ) { - $classes[] = 'generate-sections-enabled'; - } - - if ( ( isset( $use_sections['use_sections'] ) && 'true' == $use_sections['use_sections'] ) && ! $sidebars ) { - $classes[] = 'sections-no-sidebars'; - } - - if ( ( isset( $use_sections['use_sections'] ) && 'true' == $use_sections['use_sections'] ) && $sidebars ) { - $classes[] = 'sections-sidebars'; - } - - return $classes; - } -} - -if ( ! function_exists( 'generate_sections_add_css' ) ) { - add_action( 'wp_enqueue_scripts', 'generate_sections_add_css', 500 ); - /** - * Create the CSS for our sections - */ - function generate_sections_add_css() { - global $post; - $use_sections = ( isset( $post ) ) ? get_post_meta( $post->ID, '_generate_use_sections', TRUE) : ''; - - if ( ! isset( $use_sections['use_sections'] ) ) { - return; - } - - if ( 'true' !== $use_sections['use_sections'] ) { - return; - } - - if ( is_home() || is_archive() || is_search() || is_attachment() || is_tax() ) { - return; - } - - if ( function_exists( 'generate_spacing_get_defaults' ) ) { - $spacing_settings = wp_parse_args( - get_option( 'generate_spacing_settings', array() ), - generate_spacing_get_defaults() - ); - - $left_padding = $spacing_settings['content_left']; - $right_padding = $spacing_settings['content_right']; - $mobile_padding_left = ( isset( $spacing_settings[ 'mobile_content_left' ] ) ) ? $spacing_settings[ 'mobile_content_left' ] : 30; - $mobile_padding_right = ( isset( $spacing_settings[ 'mobile_content_right' ] ) ) ? $spacing_settings[ 'mobile_content_right' ] : 30; - } else { - $right_padding = 40; - $left_padding = 40; - $mobile_padding = 30; - } - - $sections = ( isset( $post ) ) ? get_post_meta( $post->ID, '_generate_sections', TRUE) : ''; - - // check if the repeater field has rows of data - if ( $sections && '' !== $sections ) { - - $css = '.generate-sections-inside-container {padding-left:' . $left_padding . 'px;padding-right:' . $right_padding . 'px;}'; - // loop through the rows of data - $i = 0; - foreach ( $sections['sections'] as $section ) : - $i++; - - // Get image details - $image_id = ( isset( $section['background_image'] ) && '' !== $section['background_image'] ) ? intval( $section['background_image'] ) : ''; - $image_url = ( '' !== $image_id ) ? wp_get_attachment_image_src( $image_id, 'full' ) : ''; - - // Get the padding type - $padding_type = apply_filters( 'generate_sections_padding_type','px' ); - - // If someone has changed the padding type using a filter, use their value - if ( 'px' !== $padding_type ) { - $top_padding_type = $padding_type; - $bottom_padding_type = $padding_type; - } else { - $top_padding_type = ( isset( $section['top_padding_unit'] ) && '' !== $section['top_padding_unit'] ) ? $section['top_padding_unit'] : $padding_type; - $bottom_padding_type = ( isset( $section['bottom_padding_unit'] ) && '' !== $section['bottom_padding_unit'] ) ? $section['bottom_padding_unit'] : $padding_type; - } - - // Default padding top - $padding_top = apply_filters( 'generate_sections_default_padding_top','40' ); - - // Default padding bottom - $padding_bottom = apply_filters( 'generate_sections_default_padding_bottom','40' ); - - $custom_id = ( isset( $section['custom_id'] ) ) ? $section['custom_id'] : ''; - $custom_id = ( '' == $custom_id ) ? "generate-section-$i" : $custom_id; - - // Get the values - $background_color = ( isset( $section['background_color'] ) && '' !== $section['background_color'] ) ? 'background-color:' . esc_attr( $section['background_color'] ) . ';' : ''; - $background_image = ( ! empty( $image_url[0] ) ) ? 'background-image:url(' . esc_url( $image_url[0] ) . ');' : ''; - - if ( isset( $section['background_color_overlay'] ) && '' !== $section['background_color_overlay'] ) { - if ( '' !== $background_image && '' !== $background_color ) { - $background_image = 'background-image:linear-gradient(0deg, ' . $section['background_color'] . ',' . $section['background_color'] . '), url(' . esc_url( $image_url[0] ) . ');'; - $background_color = ''; - } - } - - $text_color = ( isset( $section['text_color'] ) && '' !== $section['text_color'] ) ? 'color:' . esc_attr( $section['text_color'] ) . ';' : ''; - $link_color = ( isset( $section['link_color'] ) && '' !== $section['link_color'] ) ? 'color:' . esc_attr( $section['link_color'] ) . ';' : ''; - $link_color_hover = ( isset( $section['link_color_hover'] ) && '' !== $section['link_color_hover'] ) ? 'color:' . esc_attr( $section['link_color_hover'] ) . ';' : ''; - $top_padding = ( isset( $section['top_padding'] ) && '' !== $section['top_padding'] ) ? 'padding-top:' . absint( $section['top_padding'] ) . $top_padding_type . ';' : 'padding-top:' . $padding_top . 'px;'; - $bottom_padding = ( isset( $section['bottom_padding'] ) && '' !== $section['bottom_padding'] ) ? 'padding-bottom:' . absint( $section['bottom_padding'] ) . $bottom_padding_type . ';' : 'padding-bottom:' . $padding_bottom . 'px;'; - - // Outer container - if ( '' !== $background_color || '' !== $background_image ) { - $css .= '#' . $custom_id . '.generate-sections-container{' . $background_color . $background_image . '}'; - } - - // Inner container - if ( '' !== $top_padding || '' !== $bottom_padding || '' !== $text_color ) { - $css .= '#' . $custom_id . ' .generate-sections-inside-container{' . $top_padding . $bottom_padding . $text_color . '}'; - } - - // Link color - if ( '' !== $link_color ) { - $css .= '#' . $custom_id . ' a,#generate-section-' . $i . ' a:visited{' . $link_color . '}'; - } - - // Link color hover - if ( '' !== $link_color_hover ) { - $css .= '#' . $custom_id . ' a:hover{' . $link_color_hover . '}'; - } - - $mobile = generate_premium_get_media_query( 'mobile' ); - $css .= '@media ' . esc_attr( $mobile ) . ' {.generate-sections-inside-container {padding-left: ' . $mobile_padding_left . 'px;padding-right: ' . $mobile_padding_right . 'px;}}'; - endforeach; - - // Build CSS - wp_add_inline_style( 'generate-style', $css ); - - } - } -} - -if ( ! function_exists( 'generate_sections_filter_admin_init' ) ) { - add_action( 'admin_init', 'generate_sections_filter_admin_init' ); - /* - * Recreate the default filters on the_content - * this will make it much easier to output the meta content with proper/expected formatting - */ - function generate_sections_filter_admin_init() { - if ( user_can_richedit() ) { - add_filter( 'generate_section_content', 'convert_smilies' ); - add_filter( 'generate_section_content', 'convert_chars' ); - add_filter( 'generate_section_content', 'wpautop' ); - add_filter( 'generate_section_content', 'shortcode_unautop' ); - add_filter( 'generate_section_content', 'prepend_attachment' ); - } - } -} - -if ( ! function_exists( 'generate_sections_filter' ) ) { - add_action( 'init', 'generate_sections_filter' ); - /* - * Recreate the default filters on the_content - * this will make it much easier to output the meta content with proper/expected formatting - */ - function generate_sections_filter() { - if ( is_admin() ) { - return; - } - - add_filter( 'generate_section_content', 'convert_smilies' ); - add_filter( 'generate_section_content', 'convert_chars' ); - add_filter( 'generate_section_content', 'wpautop' ); - add_filter( 'generate_section_content', 'shortcode_unautop' ); - add_filter( 'generate_section_content', 'prepend_attachment' ); - add_filter( 'generate_section_content', 'do_shortcode'); - - add_filter( 'generate_the_section_content', array($GLOBALS['wp_embed'], 'autoembed'), 9 ); - } -} - -if ( ! function_exists( 'generate_sections_save_content' ) ) { - add_action( 'save_post', 'generate_sections_save_content', 99, 4 ); - /* - * When we save our post, grab all of the section content and save it as regular content. - * - * This will prevent content loss/theme lock. - */ - function generate_sections_save_content( $post_id, $post ) { - - if ( ! isset( $_POST['_generate_sections_nonce'] ) || ! wp_verify_nonce( $_POST['_generate_sections_nonce'], 'generate_sections_nonce' ) ) { - return; - } - - if ( defined('DOING_AUTOSAVE') && DOING_AUTOSAVE ) { - return; - } - - if ( ! current_user_can('edit_post', $post_id ) ) { - return; - } - - // See if we're using sections - $use_sections = get_post_meta( $post_id, '_generate_use_sections', true); - - // Make sure use sections exists and that we're not saving a revision - if ( ! isset( $use_sections['use_sections'] ) || wp_is_post_revision( $post_id ) ) { - return; - } - - // Return if sections are set to false - if ( 'true' !== $use_sections['use_sections'] ) { - return; - } - - // Get our sections - $sections = get_post_meta( $post_id, '_generate_sections', true ); - - // Return if there's nothing in our sections - if ( ! isset( $sections ) || '' == $sections ) { - return; - } - - // Prevent infinite loop - remove_action( 'save_post', 'generate_sections_save_content', 99, 4 ); - - // Let's do some stuff if sections aren't empty - if ( '' !== $sections ) { - // Set up our content variable - $content = ''; - - // Loop through each section and add our content to the content variable - foreach ( $sections['sections'] as $section ) { - $content .= ( isset( $section['content'] ) && '' !== $section['content'] ) ? $section['content'] . "\n\n" : ''; - } - - // Now update our post if we have section content - if ( '' !== $content ) { - $post->post_content = $content; - wp_update_post( $post, true ); - } - } - - // Re-hook the save_post action - add_action('save_post', 'generate_sections_save_content', 99, 4); - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/sections/functions/js/parallax.js b/wp-content/upgrade-temp-backup/plugins/gp-premium/sections/functions/js/parallax.js deleted file mode 100644 index 2c49e753..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/sections/functions/js/parallax.js +++ /dev/null @@ -1,17 +0,0 @@ -function generate_sections_parallax_element( selector, context ) { - context = context || document; - var elements = context.querySelectorAll( selector ); - return Array.prototype.slice.call( elements ); -} - -window.addEventListener( "scroll", function() { - var scrolledHeight= window.pageYOffset; - generate_sections_parallax_element( ".generate-sections-container.enable-parallax" ).forEach( function( el, index, array ) { - var limit = el.offsetTop + el.offsetHeight; - if( scrolledHeight > el.offsetTop && scrolledHeight <= limit ) { - el.style.backgroundPositionY = ( scrolledHeight - el.offsetTop ) / el.getAttribute( 'data-speed' ) + "px"; - } else { - el.style.backgroundPositionY = "0"; - } - }); -}); \ No newline at end of file diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/sections/functions/js/parallax.min.js b/wp-content/upgrade-temp-backup/plugins/gp-premium/sections/functions/js/parallax.min.js deleted file mode 100644 index 7004f63b..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/sections/functions/js/parallax.min.js +++ /dev/null @@ -1 +0,0 @@ -function generate_sections_parallax_element(e,t){var o=(t=t||document).querySelectorAll(e);return Array.prototype.slice.call(o)}window.addEventListener("scroll",function(){var e=window.pageYOffset;generate_sections_parallax_element(".generate-sections-container.enable-parallax").forEach(function(t,o,n){var a=t.offsetTop+t.offsetHeight;e>t.offsetTop&&e<=a?t.style.backgroundPositionY=(e-t.offsetTop)/t.getAttribute("data-speed")+"px":t.style.backgroundPositionY="0"})}); \ No newline at end of file diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/sections/functions/metaboxes/css/generate-sections-metabox.css b/wp-content/upgrade-temp-backup/plugins/gp-premium/sections/functions/metaboxes/css/generate-sections-metabox.css deleted file mode 100644 index 6927a1b3..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/sections/functions/metaboxes/css/generate-sections-metabox.css +++ /dev/null @@ -1,348 +0,0 @@ -body { - -webkit-backface-visibility: hidden; -} -#_generate_sections_metabox { - opacity: 0; - height: 0; - overflow: hidden; -} - -#_generate_use_sections_metabox { - display: block !important; -} - -.generate_sections_control { - padding-top: 8px; -} - -.generate-sections-enabled #postdivrich { - opacity: 0; - height: 0; - overflow: hidden; -} -.generate-sections-enabled #_generate_sections_metabox { - opacity: 1; - height: auto; -} - -.generate_sections_control .warning { - color: red; -} -.generate_sections_control .dodelete-repeating_textareas { - float: right; -} -.generate_sections_control .section { - border: 1px solid #DFDFDF; - box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04); - margin: 6px 0px 8px; - overflow: hidden; - position: relative; - background: white; -} -.generate_sections_control .section .section-title { - font-size: 14px; - padding: 0 0 0 15px; - margin: 0; - max-height: 50px; -} -.generate_sections_control .section .section-title > span { - cursor: pointer; - overflow:hidden; - display:block; - max-height:50px; - line-height:50px; - width:100%; -} -.generate_sections_control .section .section-controls { - position: absolute; - top:0; - right:0; - text-align: right; -} -.rtl .generate_sections_control .section .section-controls { - right:auto;left:0; -} -.generate_sections_control .section .section-controls a { - color: #aaa; - display:block; - float:left; - border-left: 1px solid #efefef; -} -.generate_sections_control .section .section-controls a:hover { - color: #777; -} -.generate_sections_control .section textarea { - display: none; -} -.generate_sections_control .section h3 { - color: #999; - font-size: 1em; - margin: 15px 6px; - text-transform: uppercase; -} -.generate_sections_control .section .ui-sortable-placeholder { - line-height: 1.4em; - border: 3px dashed #DDD; -} -.generate-sections-modal .media-menu-item { - cursor: pointer; -} -.custom-classes input { - width:100%; -} -.js .generate_sections_control .move-section { - cursor: move; -} -.generate-sections-modal p { - margin-top:5px; -} -#_generate_sections_metabox { - box-shadow: 0 0 0 transparent; -} -.section-controls a { - line-height:50px; - padding: 0 15px; - width:initial; - height:initial; -} - -.generate_sections_control .section .section-controls a.delete-section:hover { - color: red; -} - -.generate_sections_control p { - margin: 5px; -} - -textarea#generate-sections-editor { - border:0; -} - -#generate-sections-editor_ifr { - min-height: 400px; -} - -a#generate-add-section, a#generate-delete-sections { - height: auto; - line-height: inherit; - padding: 10px 20px; -} - -#wp-generate-sections-editor-wrap.old-sections-js .wp-media-buttons > * { - display:none; -} - -#wp-generate-sections-editor-wrap.old-sections-js .wp-media-buttons > .generate-sections-add-media, -#wp-generate-sections-editor-wrap.old-sections-js .wp-media-buttons > .su-generator-button, -#wp-generate-sections-editor-wrap.old-sections-js .wp-media-buttons > .envira-gallery-choose-gallery, -#wp-generate-sections-editor-wrap.old-sections-js .wp-media-buttons > .gridable-insert-row-button { - display: inline-block; -} - -#custom-media-buttons > * { - display: none; -} - -#custom-media-buttons > .insert-media, -#custom-media-buttons > .su-generator-button, -#custom-media-buttons > .envira-gallery-choose-gallery, -#custom-media-buttons > .gridable-insert-row-button, -#custom-media-buttons > .bfa-iconpicker { - display: inline-block; -} - -#_generate_sections_metabox { - background: transparent; - border: 0; -} -#_generate_sections_metabox > .handlediv, #_generate_sections_metabox > .hndle { - display: none; -} -#_generate_sections_metabox > .inside { - padding-left: 0; - padding-right: 0; -} - -body.wp-admin .grid-container { - max-width: 100%; -} - -.generate-sections-modal h3 { - margin-top: 0; -} - -input#custom_classes, -input#custom_id { - width: 100%; - max-width: 300px; -} - -.box-type select, -.inner-box-type select, -.parallax-effect select, -.top-padding input, -.bottom-padding input { - width: 100%; - box-sizing: border-box; -} - -.send-to-editor { - display: inline-block; - margin-top: 15px !important; -} - -#generate-sections-modal-dialog .media-frame-title .dashicons-arrow-down { - display: none; -} - -.gs-grid-container { - margin-left: auto; - margin-right: auto; - max-width: 100%; - padding-left: 10px; - padding-right: 10px; -} - -.gs-grid-parent { - padding-left: 0; - padding-right: 0; -} - -.gs-grid-container:before, -.gs-grid-container:after { - content: "."; - display: block; - overflow: hidden; - visibility: hidden; - font-size: 0; - line-height: 0; - width: 0; - height: 0; - clear: both; -} - -@media screen and (min-width: 769px) { - .gs-grid-50:before, - .gs-grid-50:after, - .gs-grid-33:before, - .gs-grid-33:after, - .gs-grid-25:before, - .gs-grid-25:after - .gs-grid-20:before, - .gs-grid-20:after - .gs-grid-12:before, - .gs-grid-12:after { - content: "."; - display: block; - overflow: hidden; - visibility: hidden; - font-size: 0; - line-height: 0; - width: 0; - height: 0; - clear: both; - } - .gs-grid-50, - .gs-grid-33, - .gs-grid-25, - .gs-grid-20, - .gs-grid-12 { - box-sizing: border-box; - padding-left: 10px; - padding-right: 10px; - } - .gs-grid-50 { - width: 50% !important; - float: left; - } - .gs-grid-33 { - width: 33.333% !important; - float: left; - } - .gs-grid-25 { - width: 25% !important; - float: left; - } - .gs-grid-20 { - width: 20% !important; - float: left; - } - .gs-grid-12 { - width: 12.5% !important; - float: left; - } - .top-border { - border-top: 1px solid #EFEFEF; - } - .bottom-border { - border-bottom: 1px solid #EFEFEF; - } - .border-right { - border-right: 1px solid #EFEFEF; - } - .border-left { - border-left: 1px solid #EFEFEF; - } -} - -@media screen and (max-width: 768px) { - .gs-grid-50, .gs-grid-33, .gs-grid-25, .gs-grid-12 { - width: 100% !important; - } - .generate_sections_control .section .section-controls { - position: relative; - } -} - -@media screen and (max-width: 500px) { - .generate_sections_control .section .section-controls a:first-child { - border-left: 0; - } -} - -#generate-sections-modal-dialog .media-modal-close { - text-decoration: none; - text-align: center; -} -/* - The styles below were ripped from the Media Modal in WordPress 3.5 - ~~ Thanks for building a beautiful Modal UI ( that I could steal ) -*/ -body.generate-modal-open { overflow: hidden; } - -.generate-sections-modal .media-modal { z-index: 65535; } -.generate-sections-modal .media-modal-backdrop { z-index: 65534; } -.generate-sections-modal .media-frame-content .panel { display: none; padding: 2em; } -.generate-sections-modal .media-frame-content .panel.active { display: block; } -.generate-sections-modal .media-frame-content .panel .section-title input { width:100%;padding:10px; } -.generate-sections-modal .media-frame-content .panel .html-active .mce-panel { display: none; } -.generate-sections-modal .media-frame-content .panel .html-active .wp-editor-area { display: block !important; min-height: 300px; } -.generate-sections-modal .media-frame-content .panel .mce-wp-dfw, .generate-sections-modal .media-frame-content .panel .qt-dfw { display: none; } -.generate-sections-modal .media-frame-content .panel .generate-sections-remove-image { display: none; } - -textarea.no-rich-edit { - width: 100%; - min-height: 300px; -} - -.wp-picker-container .wp-color-result.button { - height: 24px; - margin: 0 6px 6px 0px; - padding: 0 0 0 30px; - font-size: 11px; -} - -.wp-color-result:after { - display: none; -} - -.wp-color-result-text { - background: #f7f7f7; - border-radius: 0 2px 2px 0; - border-left: 1px solid #ccc; - color: #555; - display: block; - line-height: 22px; - padding: 0 6px; - text-align: center; -} diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/sections/functions/metaboxes/css/lc_switch.css b/wp-content/upgrade-temp-backup/plugins/gp-premium/sections/functions/metaboxes/css/lc_switch.css deleted file mode 100644 index 5f95b304..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/sections/functions/metaboxes/css/lc_switch.css +++ /dev/null @@ -1,92 +0,0 @@ -.lcs_wrap { - display: inline-block; - direction: ltr; - height: 28px; - vertical-align: middle; -} -.lcs_wrap input { - display: none; -} - -.lcs_switch { - display: inline-block; - position: relative; - width: 73px; - height: 28px; - border-radius: 30px; - background: #ddd; - overflow: hidden; - cursor: pointer; - transition: all .2s ease-in-out; -} -.lcs_cursor { - display: inline-block; - position: absolute; - top: 3px; - width: 22px; - height: 22px; - border-radius: 100%; - background: #fff; - box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.2), 0 3px 4px 0 rgba(0, 0, 0, 0.1); - z-index: 10; - transition: all .2s linear; -} -.lcs_label { - font-family: "Trebuchet MS", Helvetica, sans-serif; - font-size: 12px; - letter-spacing: 1px; - line-height: 18px; - color: #fff; - font-weight: bold; - position: absolute; - width: 33px; - top: 5px; - overflow: hidden; - text-align: center; - opacity: 0; - transition: all .2s ease-in-out .1s; -} -.lcs_label.lcs_label_on { - left: -70px; - z-index: 6; -} -.lcs_label.lcs_label_off { - right: -70px; - z-index: 5; -} - - -/* on */ -.lcs_switch.lcs_on { - background: #75b936; - box-shadow: 0 0 2px #579022 inset; -} -.lcs_switch.lcs_on .lcs_cursor { - left: 48px; -} -.lcs_switch.lcs_on .lcs_label_on { - left: 10px; - opacity: 1; -} - - -/* off */ -.lcs_switch.lcs_off { - background: #b2b2b2; - box-shadow: 0px 0px 2px #a4a4a4 inset; -} -.lcs_switch.lcs_off .lcs_cursor { - left: 3px; -} -.lcs_switch.lcs_off .lcs_label_off { - right: 10px; - opacity: 1; -} - - -/* disabled */ -.lcs_switch.lcs_disabled { - opacity: 0.65; - filter: alpha(opacity=65); - cursor: default; -} \ No newline at end of file diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/sections/functions/metaboxes/js/generate-sections-metabox-4.9.js b/wp-content/upgrade-temp-backup/plugins/gp-premium/sections/functions/metaboxes/js/generate-sections-metabox-4.9.js deleted file mode 100644 index f9215062..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/sections/functions/metaboxes/js/generate-sections-metabox-4.9.js +++ /dev/null @@ -1,835 +0,0 @@ -/*-----------------------------------------------------------------------------------*/ -/* Generate Sections Metabox -/* -/* © Kathy Darling http://www.kathyisawesome.com -/* 2016-07-19. */ -/*-----------------------------------------------------------------------------------*/ - -/** - * @type {Object} JavaScript namespace for our application. - */ -var Generate_Sections = { - backbone_modal: { - __instance: undefined - } -}; - -(function($, Generate_Sections) { - - - // Model - Generate_Sections.Section = Backbone.Model.extend({ - defaults: { - "title": "", - "box_type": "", - "inner_box_type": "", - "custom_classes": "", - "custom_id": "", - "top_padding": "", - "bottom_padding": "", - "top_padding_unit": "", - "bottom_padding_unit": "", - "background_color": "", - "background_image": "", - "background_image_preview": "", - "parallax_effect": "", - "background_color_overlay": "", - "text_color": "", - "link_color": "", - "link_color_hover": "", - "content": "" - } - }); - - - // Collection - Generate_Sections.SectionsCollection = Backbone.Collection.extend({ - model: Generate_Sections.Section, - el: "#generate_sections_container", - comparator: function(model) { - return model.get('index'); - } - }); - - - /** - * Primary Modal Application Class - */ - Generate_Sections.backbone_modal.Application = Backbone.View.extend({ - - attributes: { - id: "generate-sections-modal-dialog", - class: "generate-sections-modal", - role: "dialog" - }, - - template: wp.template("generate-sections-modal-window"), - - mediaUploader: null, - - /*-----------------------------------------------------------------------------------*/ - /* tinyMCE settings - /*-----------------------------------------------------------------------------------*/ - - tmc_settings: {}, - - /*-----------------------------------------------------------------------------------*/ - /* tinyMCE defaults - /*-----------------------------------------------------------------------------------*/ - - tmc_defaults: { - theme: "modern", - menubar: false, - wpautop: true, - indent: false, - toolbar1: "bold,italic,underline,blockquote,strikethrough,bullist,numlist,alignleft,aligncenter,alignright,undo,redo,link,unlink,fullscreen", - plugins: "fullscreen,image,wordpress,wpeditimage,wplink", - max_height: 500 - }, - - /*-----------------------------------------------------------------------------------*/ - /* quicktags settings - /*-----------------------------------------------------------------------------------*/ - - qt_settings: {}, - - /*-----------------------------------------------------------------------------------*/ - /* quicktags defaults - /*-----------------------------------------------------------------------------------*/ - - qt_defaults: { - buttons: "strong,em,link,block,del,ins,img,ul,ol,li,code,more,close,fullscreen" - }, - - model: Generate_Sections.Section, - - events: { - "click .media-modal-backdrop, .media-modal-close, .media-button-close": "closeModal", - "click .media-button-insert": "saveModal", - "click .media-menu-item": "switchTab", - "keydown": "keydown", - "click .generate-sections-upload-button": "openMediaUploader", - "click .generate-sections-remove-image": "removeImage", - "click div.media-frame-title h1": "toggleMenu" - }, - - - - /** - * Simple object to store any UI elements we need to use over the life of the application. - */ - ui: { - nav: undefined, - content: undefined - }, - - - /** - * Instantiates the Template object and triggers load. - */ - initialize: function() { - _.bindAll(this, "render", "closeModal", "saveModal", "switchTab"); - - this.focusManager = new wp.media.view.FocusManager({ - el: this.el - }); - - this.changeInsertText(); - this.tinyMCEsettings(); - this.render(); - }, - - /** - * switch the insert button text to "insert section" - */ - changeInsertText: function(restore) { - - var restore = typeof restore !== 'undefined' && restore == true ? true : false; - - if (restore == false && typeof(wp.media.view.l10n.insertIntoPost) !== "undefined") { - this.insertIntoPost = wp.media.view.l10n.insertIntoPost; - wp.media.view.l10n.insertIntoPost = generate_sections_metabox_i18n.insert_into_section; - // switch the insert button text back - } else if (restore == true && typeof(this.insertIntoPost) !== "undefined") { - wp.media.view.l10n.insertIntoPost = this.insertIntoPost; - } - }, - - - /** - * Merge the default TinyMCE settings - */ - tinyMCEsettings: function() { - // get the #content"s tinyMCE settings or use default - var init_settings = typeof tinyMCEPreInit == "object" && "mceInit" in tinyMCEPreInit && "content" in tinyMCEPreInit.mceInit ? tinyMCEPreInit.mceInit.content : this.tmc_defaults; - - // get the #content"s quicktags settings or use default - var qt_settings = typeof tinyMCEPreInit == "object" && "qtInit" in tinyMCEPreInit && "content" in tinyMCEPreInit.qtInit ? tinyMCEPreInit.qtInit.content : this.qt_defaults; - - var _this = this; - var custom_settings = { - selector: "#generate-sections-editor", - wp_autoresize_on: false, - cache_suffix: "", - min_height: 400, - } - - // merge our settings with WordPress" and store for later use - this.tmc_settings = $.extend({}, init_settings, custom_settings); - - this.qt_settings = $.extend({}, qt_settings, { - id: "generate-sections-editor" - }); - }, - - - /** - * Assembles the UI from loaded template. - * @internal Obviously, if the template fail to load, our modal never launches. - */ - render: function() { - - "use strict"; - - // Build the base window and backdrop, attaching them to the $el. - // Setting the tab index allows us to capture focus and redirect it in Application.preserveFocus - this.$el.attr("tabindex", "0") - .html(this.template); - - // Handle any attempt to move focus out of the modal. - //jQuery(document).on("focusin", this.preserveFocus); - - // set overflow to "hidden" on the body so that it ignores any scroll events while the modal is active - // and append the modal to the body. - jQuery("body").addClass("generate-modal-open").prepend(this.$el); - - // aria hide the background - jQuery("#wpwrap").attr("aria-hidden", "true"); - - this.renderContent(); - - this.renderPreview(); - - this.selected(); - this.colorPicker(); - this.startTinyMCE(); - - // Set focus on the modal to prevent accidental actions in the underlying page - this.$el.focus(); - - return this; - }, - - /** - * Make the menu mobile-friendly - */ - toggleMenu: function() { - this.$el.find('.media-menu').toggleClass('visible'); - }, - - /** - * Create the nav tabs & panels - */ - renderContent: function() { - - var model = this.model; - - var menu_item = wp.template("generate-sections-modal-menu-item"); - - // Save a reference to the navigation bar"s unordered list and populate it with items. - this.ui.nav = this.$el.find(".media-menu"); - - // reference to content area - this.ui.panels = this.$el.find(".media-frame-content"); - - // loop through the tabs - if (generate_sections_metabox_i18n.tabs.length) { - - // for...of is nicer, but not supported by minify, so stay with for...in for now - for (var tab in generate_sections_metabox_i18n.tabs) { - - if (generate_sections_metabox_i18n.tabs.hasOwnProperty(tab)) { - - tab = generate_sections_metabox_i18n.tabs[tab]; - - var $new_tab = $(menu_item({ - target: tab.target, - name: tab.title - })); - - var panel = wp.template("generate-sections-edit-" + tab.target); - - var $new_panel = $(panel(model.toJSON())); - - if (tab.active == "true") { - $new_tab.addClass("active"); - $new_panel.addClass("active"); - } - - jQuery( 'body' ).on( 'generate_section_show_settings', function() { - jQuery( '.generate-sections-modal .media-menu-item' ).removeClass('active'); - jQuery( '.generate-sections-modal .panel' ).removeClass('active'); - jQuery( '.generate-section-item-style' ).addClass('active'); - jQuery( '.generate-section-settings' ).addClass('active'); - }); - - this.ui.nav.append($new_tab); - this.ui.panels.append($new_panel); - } - } - } - - }, - - - /** - * Render the background image preview - */ - renderPreview: function(image_id) { - - var image_id = typeof image_id !== 'undefined' ? image_id : this.model.get("background_image"); - - var $preview = $("#generate-section-image-preview"); - $preview.children().remove(); - - if (image_id > 0) { - this.background = new wp.media.model.Attachment.get(image_id); - - this.background.fetch({ - success: function(att) { - if (_.contains(['png', 'jpg', 'gif', 'jpeg'], att.get('subtype'))) { - $("").attr("src", att.attributes.sizes.thumbnail.url).appendTo($preview); - $preview.next().find(".generate-sections-remove-image").show(); - } - } - }); - } - - }, - - - /** - * Set the default option for the select boxes - */ - selected: function() { - - var _this = this; - - this.$el.find("select").each(function(index, select) { - - var attribute = jQuery(select).attr("name"); - var selected = _this.model.get(attribute); - jQuery(select).val(selected); - - }); - }, - - /** - * Start the colorpicker - */ - colorPicker: function() { - this.$el.find(".generate-sections-color").wpColorPicker(); - }, - - /** - * Start TinyMCE on the textarea - */ - startTinyMCE: function() { - - // set the default editor - this.ui.panels.find("#wp-generate-sections-editor-wrap").addClass(generate_sections_metabox_i18n.default_editor); - - // remove tool buttons if richedit disabled - if (!generate_sections_metabox_i18n.user_can_richedit) { - this.ui.panels.find(".wp-editor-tabs").remove(); - } - - // add our copy to the collection in the tinyMCEPreInit object because switch editors - if (typeof tinyMCEPreInit == 'object') { - tinyMCEPreInit.mceInit["generate-sections-editor"] = this.tmc_settings; - tinyMCEPreInit.qtInit["generate-sections-editor"] = this.qt_settings; - tinyMCEPreInit.mceInit["generate-sections-editor"].wp_keep_scroll_position = false; - } - - try { - - var rich = (typeof tinyMCE != "undefined"); - - // turn on the quicktags editor - quicktags(this.qt_settings); - - // attempt to fix problem of quicktags toolbar with no buttons - QTags._buttonsInit(); - - if (rich !== false) { - // turn on tinyMCE - tinyMCE.init(this.tmc_settings); - } - - } catch (e) {} - - }, - - /** - * Launch Media Uploader - */ - openMediaUploader: function(e) { - - var _this = this; - - $input = jQuery(e.currentTarget).prev("#generate-sections-background-image"); - - e.preventDefault(); - - // If the uploader object has already been created, reopen the dialog - if (this.mediaUploader) { - this.mediaUploader.open(); - return; - } - // Extend the wp.media object - this.mediaUploader = wp.media.frames.file_frame = wp.media({ - title: generate_sections_metabox_i18n.media_library_title, - button: { - text: generate_sections_metabox_i18n.media_library_button - }, - multiple: false - }); - - - // When a file is selected, grab the URL and set it as the text field"s value - this.mediaUploader.on("select", function() { - - attachment = _this.mediaUploader.state().get("selection").first().toJSON(); - - $input.val(attachment.id); - - _this.renderPreview(attachment.id); - }); - // Open the uploader dialog - this.mediaUploader.open(); - - }, - - /** - * Remove the background image - */ - removeImage: function(e) { - e.preventDefault(); - $("#generate-section-image-preview").children().remove(); - $("#generate-section-image-preview").next().find(".generate-sections-remove-image").hide(); - $("#generate-sections-background-image").val(""); - }, - - - /** - * Closes the modal and cleans up after the instance. - * @param e {object} A jQuery-normalized event object. - */ - closeModal: function(e) { - "use strict"; - - e.preventDefault(); - this.undelegateEvents(); - jQuery(document).off("focusin"); - jQuery("body").removeClass("generate-modal-open"); - jQuery("body").removeClass("generate-section-content"); - - // remove restricted media modal tab focus once it's closed - this.$el.undelegate('keydown'); - - // remove the tinymce editor - // this needs to be called before the modal is closed or it will fail in Firefox (that was fun to figure out...) - if (typeof tinyMCE != "undefined") { - tinymce.EditorManager.execCommand("mceRemoveEditor", true, "generate-sections-editor"); - } - - // remove modal and unset instances - this.remove(); - Generate_Sections.backbone_modal.__instance = undefined; - this.mediaUploader = null; - Generate_Sections.modalOpen = null; - - // switch the insert button text back - this.changeInsertText(true); - - // send focus back to where it was prior to modal open - Generate_Sections.lastFocus.focus(); - - // aria unhide the background - jQuery("#wpwrap").attr("aria-hidden", "false"); - - // Fix bug where the window scrolls down 50px on close - var topDistance = jQuery("body").offset().top; - if ( topDistance >= jQuery("body").scrollTop() ) { - jQuery("body").scrollTop(0); - } - - }, - - /** - * Responds to the btn-ok.click event - * @param e {object} A jQuery-normalized event object. - * @todo You should make this your own. - */ - saveModal: function(e) { - "use strict"; - - this.model.get("index"); - - var model = this.model; - - // send the tinymce content to the textarea - if (typeof tinyMCE != "undefined") { - tinymce.triggerSave(); - } - - var $inputs = this.ui.panels.find("input, select, textarea"); - - $inputs.each(function(index, input) { - - var name = $(input).attr("name"); - - if (model.attributes.hasOwnProperty(name)) { - var value = $(input).val(); - model.set(name, value); - } - - }); - - this.closeModal(e); - }, - - /** - * Handles tab clicks and switches to corresponding panel - * @param e {object} A jQuery-normalized event object. - */ - switchTab: function(e) { - "use strict"; - e.preventDefault(); - - // close lingering wp link windows - if (typeof tinyMCE != "undefined" && 'style' == jQuery( e.currentTarget ).data( 'target' ) && this.ui.panels.find( '#wp-generate-sections-editor-wrap' ).hasClass( 'tmce-active' )) { - tinyMCE.activeEditor.execCommand('wp_link_cancel'); - tinyMCE.activeEditor.execCommand('wp_media_cancel'); - } - - this.ui.nav.children().removeClass("active"); - this.ui.panels.children().removeClass("active"); - - var target = jQuery(e.currentTarget).addClass("active").data("target"); - - this.ui.panels.find("div[data-id=" + target + "]").addClass("active"); - }, - - /** - * close on keyboard shortcuts - * @param {Object} event - */ - keydown: function(e) { - // Close the modal when escape is pressed. - if (27 === e.which && this.$el.is(':visible')) { - this.closeModal(e); - e.stopImmediatePropagation(); - } - } - - }); - - - // Singular View - Generate_Sections.sectionView = Backbone.View.extend({ - - model: Generate_Sections.Section, - tagName: 'div', - - initialize: function() { - // re-render on all changes EXCEPT index - this.listenTo(this.model, "change", this.maybeRender); - }, - - attributes: { - class: "ui-state-default section" - }, - - // Get the template from the DOM - template: wp.template("generate-sections-section"), - - events: { - 'click .edit-section': 'editSection', - 'click .section-title > span': 'editSection', - 'click .delete-section': 'removeSection', - 'click .toggle-section': 'toggleSection', - 'reorder': 'reorder', - }, - - maybeRender: function(e) { - if (this.model.hasChanged('index')) return; - this.render(); - }, - - // Render the single model - include an index. - render: function() { - this.model.set('index', this.model.collection.indexOf(this.model)); - this.$el.html(this.template(this.model.toJSON())); - - if (!this.model.get('title')) { - this.$el.find('h3.section-title > span').text(generate_sections_metabox_i18n.default_title); - } - this.$el.find('textarea').val(JSON.stringify(this.model)); - - return this; - }, - - - // launch the edit modal - editSection: function(e) { - - // stash the current focus - Generate_Sections.lastFocus = document.activeElement; - Generate_Sections.modalOpen = true; - - e.preventDefault(); - if (Generate_Sections.backbone_modal.__instance === undefined) { - Generate_Sections.backbone_modal.__instance = new Generate_Sections.backbone_modal.Application({ - model: this.model - }); - } - - }, - - // reorder after sort - reorder: function(event, index) { - this.$el.trigger('update-sort', [this.model, index]); - }, - - // remove/destroy a model - removeSection: function(e) { - e.preventDefault(); - if (confirm(generate_sections_metabox_i18n.confirm)) { - this.model.destroy(); - Generate_Sections.sectionList.render(); // manually calling instead of listening since listening interferes with sorting - } - }, - }); - - - // List View - Generate_Sections.sectionListView = Backbone.View.extend({ - - el: "#generate_sections_container", - events: { - 'update-sort': 'updateSort', - // 'add-section': 'addOne' - }, - - // callback for clone button - addSection: function(model) { - this.collection.add(model); - this.addOne(model); - }, - - addOne: function(model) { - var view = new Generate_Sections.sectionView({ - model: model - }); - this.$el.append(view.render().el); - }, - - render: function() { - this.$el.children().remove(); - this.collection.each(this.addOne, this); - return this; - }, - - updateSort: function(event, model, position) { - this.collection.remove(model); - - // renumber remaining models around missing model - this.collection.each(function(model, index) { - - var new_index = index; - if (index >= position) { - new_index += 1; - } - model.set('index', new_index); - }); - - // set the index of the missing model - model.set('index', position); - - // add the model back to the collection - this.collection.add(model, { - at: position - }); - - this.render(); - - }, - - }); - - - // The Buttons & Nonce - Generate_Sections.ButtonControls = Backbone.View.extend({ - - attributes: { - class: "generate_sections_buttons" - }, - - tagName: 'p', - - el: "#_generate_sections_metabox", - - template: wp.template("generate-sections-buttons"), - - // Attach events - events: { - "click .button-primary": "newSection", - "click #generate-delete-sections": "clearAll", - 'click .edit-section': 'editSection', - }, - - // create new - newSection: function(e) { - e.preventDefault(); - var newSection = new Generate_Sections.Section(); - Generate_Sections.sectionList.addSection(newSection); - }, - - // clear all models - clearAll: function(e) { - e.preventDefault(); - if (confirm(generate_sections_metabox_i18n.confirm)) { - Generate_Sections.sectionCollection.reset(); - Generate_Sections.sectionList.render(); - } - }, - - render: function() { - this.$el.find(".generate_sections_control").append(this.template); - return this; - }, - - }); - - - // init - Generate_Sections.initApplication = function() { - - // Create Collection From Existing Meta - Generate_Sections.sectionCollection = new Generate_Sections.SectionsCollection(generate_sections_metabox_i18n.sections); - - // Create the List View - Generate_Sections.sectionList = new Generate_Sections.sectionListView({ - collection: Generate_Sections.sectionCollection - }); - Generate_Sections.sectionList.render(); - - // Buttons - Generate_Sections.Buttons = new Generate_Sections.ButtonControls({ - collection: Generate_Sections.sectionCollection - }); - Generate_Sections.Buttons.render(); - - }; - - - /*-----------------------------------------------------------------------------------*/ - /* Execute the above methods in the Generate_Sections object. - /*-----------------------------------------------------------------------------------*/ - - jQuery(document).ready(function($) { - - Generate_Sections.initApplication(); - - $( '#generate_sections_container' ).sortable({ - axis: "y", - opacity: 0.5, - grid: [20, 10], - tolerance: "pointer", - handle: ".move-section", - update: function(event, ui) { - ui.item.trigger("reorder", ui.item.index()); - } - } ); - - if ( $( '.use-sections-switch' ).is( ':checked' ) ) { - setTimeout( function() { - generateShowSections(); - }, 200 ); - } else { - generateHideSections(); - } - - $( '.use-sections-switch' ).on( 'change', function( e ) { - var status = ( $(this).is( ':checked' ) ) ? 'checked' : 'unchecked'; - - if ( 'checked' == status ) { - generateShowSections(); - } else if ( 'unchecked' == status ) { - generateHideSections(); - } - } ); - - function generateShowSections() { - - // Hide send to editor button - $('.send-to-editor').css('display', 'none'); - - // Hide the editor - $('#postdivrich').css({ - 'opacity': '0', - 'height': '0', - 'overflow': 'hidden' - }); - - // Show the sections - $('#_generate_sections_metabox').css({ - 'opacity': '1', - 'height': 'auto' - }); - - // Remove and add the default editor - this removes any visible toolbars etc.. - // We need to set a timeout for this to work - // if (typeof tinyMCE != "undefined") { - // tinyMCE.EditorManager.execCommand("mceRemoveEditor", true, "content"); - // $( '.use-sections-cover' ).css( 'z-index','10000' ); - // setTimeout('tinyMCE.EditorManager.execCommand("mceAddEditor", true, "content");', 1); - // setTimeout('jQuery( ".use-sections-cover" ).css( "z-index","-1" );', 1000); - // } - - // Set a trigger - $('body').trigger('generate_show_sections'); - - } - - function generateHideSections() { - - // Show send to editor button - $('.send-to-editor').css('display', 'inline-block'); - - // Show the editor - $('#postdivrich').css({ - 'opacity': '1', - 'height': 'auto' - }); - - // Hide the sections - $('#_generate_sections_metabox').css({ - 'opacity': '0', - 'height': '0', - 'overflow': 'hidden' - }); - - $('body').trigger('generate_hide_sections'); - - } - - $( document ).on( 'click', '.edit-section.edit-settings', function() { - $( 'body' ).trigger( 'generate_section_show_settings' ); - }); - - }); - - -})(jQuery, Generate_Sections); diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/sections/functions/metaboxes/js/generate-sections-metabox.js b/wp-content/upgrade-temp-backup/plugins/gp-premium/sections/functions/metaboxes/js/generate-sections-metabox.js deleted file mode 100644 index 4c498070..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/sections/functions/metaboxes/js/generate-sections-metabox.js +++ /dev/null @@ -1,858 +0,0 @@ -/*-----------------------------------------------------------------------------------*/ -/* Generate Sections Metabox -/* -/* © Kathy Darling http://www.kathyisawesome.com -/* 2016-07-19. */ -/*-----------------------------------------------------------------------------------*/ - -/** - * @type {Object} JavaScript namespace for our application. - */ -var Generate_Sections = { - backbone_modal: { - __instance: undefined - } -}; - -(function($, Generate_Sections) { - - - // Model - Generate_Sections.Section = Backbone.Model.extend({ - defaults: { - "title": "", - "box_type": "", - "inner_box_type": "", - "custom_classes": "", - "custom_id": "", - "top_padding": "", - "bottom_padding": "", - "top_padding_unit": "", - "bottom_padding_unit": "", - "background_color": "", - "background_image": "", - "background_image_preview": "", - "parallax_effect": "", - "background_color_overlay": "", - "text_color": "", - "link_color": "", - "link_color_hover": "", - "content": "" - } - }); - - - // Collection - Generate_Sections.SectionsCollection = Backbone.Collection.extend({ - model: Generate_Sections.Section, - el: "#generate_sections_container", - comparator: function(model) { - return model.get('index'); - } - }); - - - /** - * Primary Modal Application Class - */ - Generate_Sections.backbone_modal.Application = Backbone.View.extend({ - - attributes: { - id: "generate-sections-modal-dialog", - class: "generate-sections-modal", - role: "dialog" - }, - - template: wp.template("generate-sections-modal-window"), - - mediaUploader: null, - - /*-----------------------------------------------------------------------------------*/ - /* tinyMCE settings - /*-----------------------------------------------------------------------------------*/ - - tmc_settings: {}, - - /*-----------------------------------------------------------------------------------*/ - /* tinyMCE defaults - /*-----------------------------------------------------------------------------------*/ - - tmc_defaults: { - theme: "modern", - menubar: false, - wpautop: true, - indent: false, - toolbar1: "bold,italic,underline,blockquote,strikethrough,bullist,numlist,alignleft,aligncenter,alignright,undo,redo,link,unlink,fullscreen", - plugins: "fullscreen,image,wordpress,wpeditimage,wplink", - max_height: 500 - }, - - /*-----------------------------------------------------------------------------------*/ - /* quicktags settings - /*-----------------------------------------------------------------------------------*/ - - qt_settings: {}, - - /*-----------------------------------------------------------------------------------*/ - /* quicktags defaults - /*-----------------------------------------------------------------------------------*/ - - qt_defaults: { - buttons: "strong,em,link,block,del,ins,img,ul,ol,li,code,more,close,fullscreen" - }, - - model: Generate_Sections.Section, - - events: { - "click .media-modal-backdrop, .media-modal-close, .media-button-close": "closeModal", - "click .media-button-insert": "saveModal", - "click .media-menu-item": "switchTab", - "keydown": "keydown", - "click .generate-sections-upload-button": "openMediaUploader", - "click .generate-sections-remove-image": "removeImage", - "click div.media-frame-title h1": "toggleMenu" - }, - - - - /** - * Simple object to store any UI elements we need to use over the life of the application. - */ - ui: { - nav: undefined, - content: undefined - }, - - - /** - * Instantiates the Template object and triggers load. - */ - initialize: function() { - _.bindAll(this, "render", "closeModal", "saveModal", "switchTab"); - - this.focusManager = new wp.media.view.FocusManager({ - el: this.el - }); - - this.changeInsertText(); - //this.tinyMCEsettings(); - this.render(); - }, - - /** - * switch the insert button text to "insert section" - */ - changeInsertText: function(restore) { - - var restore = typeof restore !== 'undefined' && restore == true ? true : false; - - if (restore == false && typeof(wp.media.view.l10n.insertIntoPost) !== "undefined") { - this.insertIntoPost = wp.media.view.l10n.insertIntoPost; - wp.media.view.l10n.insertIntoPost = generate_sections_metabox_i18n.insert_into_section; - // switch the insert button text back - } else if (restore == true && typeof(this.insertIntoPost) !== "undefined") { - wp.media.view.l10n.insertIntoPost = this.insertIntoPost; - } - }, - - /** - * Assembles the UI from loaded template. - * @internal Obviously, if the template fail to load, our modal never launches. - */ - render: function() { - - "use strict"; - - // Build the base window and backdrop, attaching them to the $el. - // Setting the tab index allows us to capture focus and redirect it in Application.preserveFocus - this.$el.attr("tabindex", "0").html(this.template); - - // Handle any attempt to move focus out of the modal. - //jQuery(document).on("focusin", this.preserveFocus); - - // set overflow to "hidden" on the body so that it ignores any scroll events while the modal is active - // and append the modal to the body. - jQuery("body").addClass("generate-modal-open").prepend(this.$el); - - // aria hide the background - jQuery("#wpwrap").attr("aria-hidden", "true"); - - this.renderContent(); - - this.renderPreview(); - - this.selected(); - this.colorPicker(); - //this.startTinyMCE(); - this.launchEditor(); - - // Set focus on the modal to prevent accidental actions in the underlying page - this.$el.focus(); - - return this; - }, - - launchEditor: function() { - var id = this.ui.panels.find( ".generate-sections-editor-wrap" ).find( 'textarea' ).attr( 'id' ), - customButtonsContainer = this.ui.panels.find( '.generate-sections-editor-wrap' ).find( '#custom-media-buttons' ); - - customButtonsContainer.find( '.insert-media' ).remove(); - var customButtons = customButtonsContainer.html(); - customButtonsContainer.remove(); - - var init_settings = true; - - if ( typeof tinyMCEPreInit == "object" && "mceInit" in tinyMCEPreInit && "content" in tinyMCEPreInit.mceInit ) { - init_settings = tinyMCEPreInit.mceInit.content; - } else if ( typeof window.wpEditorL10n !== "undefined" ) { - init_settings = window.wpEditorL10n.tinymce.settings; - } else { - init_settings = this.tmc_defaults; - } - - var thisPanel = this.ui.panels; - - var custom_settings = { - wp_autoresize_on: false, - cache_suffix: "", - min_height: 400, - wp_keep_scroll_position: false, - setup: function( editor ) { - editor.on( 'init', function( e ) { - if ( 'html-active' === generate_sections_metabox_i18n.default_editor && generate_sections_metabox_i18n.user_can_richedit ) { - thisPanel.find( '#wp-generate-sections-editor-wrap' ).removeClass( 'tmce-active' ).addClass( 'html-active' ); - editor.hidden = true; - } - } ); - } - } - - init_settings = $.extend({}, init_settings, custom_settings); - - var qt_settings = true; - - if ( typeof tinyMCEPreInit == "object" && "qtInit" in tinyMCEPreInit && "content" in tinyMCEPreInit.qtInit ) { - qt_settings = tinyMCEPreInit.qtInit.content; - } else { - qt_settings = this.qt_defaults; - } - - if ( ! generate_sections_metabox_i18n.user_can_richedit ) { - init_settings = false; - } - - wp.sectionsEditor.initialize( id, { - tinymce: init_settings, - quicktags: qt_settings, - mediaButtons: true - } ); - - var buttonsElement = this.ui.panels.find( '#wp-generate-sections-editor-wrap' ).find( '.wp-media-buttons' ); - buttonsElement.attr( 'id', 'custom-media-buttons' ); - $( customButtons ).appendTo( buttonsElement ); - - if ( ! generate_sections_metabox_i18n.user_can_richedit ) { - this.ui.panels.find( '#generate-sections-editor' ).addClass( 'no-rich-edit' ); - } - }, - - /** - * Make the menu mobile-friendly - */ - toggleMenu: function() { - this.$el.find('.media-menu').toggleClass('visible'); - }, - - /** - * Create the nav tabs & panels - */ - renderContent: function() { - - var model = this.model; - - var menu_item = wp.template("generate-sections-modal-menu-item"); - - // Save a reference to the navigation bar"s unordered list and populate it with items. - this.ui.nav = this.$el.find(".media-menu"); - - // reference to content area - this.ui.panels = this.$el.find(".media-frame-content"); - - // loop through the tabs - if (generate_sections_metabox_i18n.tabs.length) { - - // for...of is nicer, but not supported by minify, so stay with for...in for now - for (var tab in generate_sections_metabox_i18n.tabs) { - - if (generate_sections_metabox_i18n.tabs.hasOwnProperty(tab)) { - - tab = generate_sections_metabox_i18n.tabs[tab]; - - var $new_tab = $(menu_item({ - target: tab.target, - name: tab.title - })); - - var panel = wp.template("generate-sections-edit-" + tab.target); - - var $new_panel = $(panel(model.toJSON())); - - if (tab.active == "true") { - $new_tab.addClass("active"); - $new_panel.addClass("active"); - } - - jQuery( 'body' ).on( 'generate_section_show_settings', function() { - jQuery( '.generate-sections-modal .media-menu-item' ).removeClass('active'); - jQuery( '.generate-sections-modal .panel' ).removeClass('active'); - jQuery( '.generate-section-item-style' ).addClass('active'); - jQuery( '.generate-section-settings' ).addClass('active'); - }); - - this.ui.nav.append($new_tab); - this.ui.panels.append($new_panel); - } - } - } - - }, - - - /** - * Render the background image preview - */ - renderPreview: function(image_id) { - - var image_id = typeof image_id !== 'undefined' ? image_id : this.model.get("background_image"); - - var $preview = $("#generate-section-image-preview"); - $preview.children().remove(); - - if (image_id > 0) { - this.background = new wp.media.model.Attachment.get(image_id); - - this.background.fetch({ - success: function(att) { - if (_.contains(['png', 'jpg', 'gif', 'jpeg'], att.get('subtype'))) { - $("").attr("src", att.attributes.sizes.thumbnail.url).appendTo($preview); - $preview.next().find(".generate-sections-remove-image").show(); - } - } - }); - } - - }, - - - /** - * Set the default option for the select boxes - */ - selected: function() { - - var _this = this; - - this.$el.find("select").each(function(index, select) { - - var attribute = jQuery(select).attr("name"); - var selected = _this.model.get(attribute); - jQuery(select).val(selected); - - }); - }, - - /** - * Start the colorpicker - */ - colorPicker: function() { - this.$el.find(".generate-sections-color").wpColorPicker(); - }, - - /** - * Launch Media Uploader - */ - openMediaUploader: function(e) { - - var _this = this; - - $input = jQuery(e.currentTarget).prev("#generate-sections-background-image"); - - e.preventDefault(); - - // If the uploader object has already been created, reopen the dialog - if (this.mediaUploader) { - this.mediaUploader.open(); - return; - } - // Extend the wp.media object - this.mediaUploader = wp.media.frames.file_frame = wp.media({ - title: generate_sections_metabox_i18n.media_library_title, - button: { - text: generate_sections_metabox_i18n.media_library_button - }, - multiple: false - }); - - - // When a file is selected, grab the URL and set it as the text field"s value - this.mediaUploader.on("select", function() { - - attachment = _this.mediaUploader.state().get("selection").first().toJSON(); - - $input.val(attachment.id); - - _this.renderPreview(attachment.id); - }); - // Open the uploader dialog - this.mediaUploader.open(); - - }, - - /** - * Remove the background image - */ - removeImage: function(e) { - e.preventDefault(); - $("#generate-section-image-preview").children().remove(); - $("#generate-section-image-preview").next().find(".generate-sections-remove-image").hide(); - $("#generate-sections-background-image").val(""); - }, - - - /** - * Closes the modal and cleans up after the instance. - * @param e {object} A jQuery-normalized event object. - */ - closeModal: function(e) { - "use strict"; - - e.preventDefault(); - this.undelegateEvents(); - jQuery(document).off("focusin"); - jQuery("body").removeClass("generate-modal-open"); - jQuery("body").removeClass("generate-section-content"); - - // remove restricted media modal tab focus once it's closed - this.$el.undelegate('keydown'); - - // remove the tinymce editor - // this needs to be called before the modal is closed or it will fail in Firefox (that was fun to figure out...) - if (typeof tinyMCE != "undefined") { - tinymce.EditorManager.execCommand("mceRemoveEditor", true, "generate-sections-editor"); - } - - // remove modal and unset instances - this.remove(); - Generate_Sections.backbone_modal.__instance = undefined; - this.mediaUploader = null; - Generate_Sections.modalOpen = null; - - // switch the insert button text back - this.changeInsertText(true); - - // send focus back to where it was prior to modal open - Generate_Sections.lastFocus.focus(); - - // aria unhide the background - jQuery("#wpwrap").attr("aria-hidden", "false"); - - // Fix bug where the window scrolls down 50px on close - var topDistance = jQuery("body").offset().top; - if ( topDistance >= jQuery("body").scrollTop() ) { - jQuery("body").scrollTop(0); - } - - }, - - /** - * Responds to the btn-ok.click event - * @param e {object} A jQuery-normalized event object. - * @todo You should make this your own. - */ - saveModal: function(e) { - "use strict"; - - this.model.get("index"); - - var model = this.model; - - // send the tinymce content to the textarea - if (typeof tinyMCE != "undefined") { - tinymce.triggerSave(); - } - - var $inputs = this.ui.panels.find("input, select, textarea"); - - $inputs.each(function(index, input) { - - var name = $(input).attr("name"); - - if (model.attributes.hasOwnProperty(name)) { - var value = $(input).val(); - model.set(name, value); - } - - }); - - this.closeModal(e); - }, - - /** - * Handles tab clicks and switches to corresponding panel - * @param e {object} A jQuery-normalized event object. - */ - switchTab: function(e) { - "use strict"; - e.preventDefault(); - - // close lingering wp link windows - if (typeof tinyMCE != "undefined" && 'style' == jQuery( e.currentTarget ).data( 'target' ) && this.ui.panels.find( '#wp-generate-sections-editor-wrap' ).hasClass( 'tmce-active' )) { - tinyMCE.activeEditor.execCommand('wp_link_cancel'); - tinyMCE.activeEditor.execCommand('wp_media_cancel'); - } - - this.ui.nav.children().removeClass("active"); - this.ui.panels.children().removeClass("active"); - - var target = jQuery(e.currentTarget).addClass("active").data("target"); - - this.ui.panels.find("div[data-id=" + target + "]").addClass("active"); - }, - - /** - * close on keyboard shortcuts - * @param {Object} event - */ - keydown: function(e) { - // Close the modal when escape is pressed. - if (27 === e.which && this.$el.is(':visible')) { - this.closeModal(e); - e.stopImmediatePropagation(); - } - } - - }); - - - // Singular View - Generate_Sections.sectionView = Backbone.View.extend({ - - model: Generate_Sections.Section, - tagName: 'div', - - initialize: function() { - // re-render on all changes EXCEPT index - this.listenTo(this.model, "change", this.maybeRender); - }, - - attributes: { - class: "ui-state-default section" - }, - - // Get the template from the DOM - template: wp.template("generate-sections-section"), - - events: { - 'click .edit-section': 'editSection', - 'click .section-title > span': 'editSection', - 'click .delete-section': 'removeSection', - 'click .toggle-section': 'toggleSection', - 'reorder': 'reorder', - }, - - maybeRender: function(e) { - if (this.model.hasChanged('index')) return; - this.render(); - }, - - // Render the single model - include an index. - render: function() { - this.model.set('index', this.model.collection.indexOf(this.model)); - this.$el.html(this.template(this.model.toJSON())); - - if (!this.model.get('title')) { - this.$el.find('h3.section-title > span').text(generate_sections_metabox_i18n.default_title); - } - this.$el.find('textarea').val(JSON.stringify(this.model)); - - return this; - }, - - - // launch the edit modal - editSection: function(e) { - - // stash the current focus - Generate_Sections.lastFocus = document.activeElement; - Generate_Sections.modalOpen = true; - - e.preventDefault(); - if (Generate_Sections.backbone_modal.__instance === undefined) { - Generate_Sections.backbone_modal.__instance = new Generate_Sections.backbone_modal.Application({ - model: this.model - }); - } - - }, - - // reorder after sort - reorder: function(event, index) { - this.$el.trigger('update-sort', [this.model, index]); - }, - - // remove/destroy a model - removeSection: function(e) { - e.preventDefault(); - if (confirm(generate_sections_metabox_i18n.confirm)) { - this.model.destroy(); - Generate_Sections.sectionList.render(); // manually calling instead of listening since listening interferes with sorting - } - }, - }); - - - // List View - Generate_Sections.sectionListView = Backbone.View.extend({ - - el: "#generate_sections_container", - events: { - 'update-sort': 'updateSort', - // 'add-section': 'addOne' - }, - - // callback for clone button - addSection: function(model) { - this.collection.add(model); - this.addOne(model); - }, - - addOne: function(model) { - var view = new Generate_Sections.sectionView({ - model: model - }); - this.$el.append(view.render().el); - }, - - render: function() { - this.$el.children().remove(); - this.collection.each(this.addOne, this); - return this; - }, - - updateSort: function(event, model, position) { - this.collection.remove(model); - - // renumber remaining models around missing model - this.collection.each(function(model, index) { - - var new_index = index; - if (index >= position) { - new_index += 1; - } - model.set('index', new_index); - }); - - // set the index of the missing model - model.set('index', position); - - // add the model back to the collection - this.collection.add(model, { - at: position - }); - - this.render(); - - }, - - }); - - - // The Buttons & Nonce - Generate_Sections.ButtonControls = Backbone.View.extend({ - - attributes: { - class: "generate_sections_buttons" - }, - - tagName: 'p', - - el: "#_generate_sections_metabox", - - template: wp.template("generate-sections-buttons"), - - // Attach events - events: { - "click .button-primary": "newSection", - "click #generate-delete-sections": "clearAll", - 'click .edit-section': 'editSection', - }, - - // create new - newSection: function(e) { - e.preventDefault(); - var newSection = new Generate_Sections.Section(); - Generate_Sections.sectionList.addSection(newSection); - }, - - // clear all models - clearAll: function(e) { - e.preventDefault(); - if (confirm(generate_sections_metabox_i18n.confirm)) { - Generate_Sections.sectionCollection.reset(); - Generate_Sections.sectionList.render(); - } - }, - - render: function() { - this.$el.find(".generate_sections_control").append(this.template); - return this; - }, - - }); - - - // init - Generate_Sections.initApplication = function() { - - // Create Collection From Existing Meta - Generate_Sections.sectionCollection = new Generate_Sections.SectionsCollection(generate_sections_metabox_i18n.sections); - - // Create the List View - Generate_Sections.sectionList = new Generate_Sections.sectionListView({ - collection: Generate_Sections.sectionCollection - }); - Generate_Sections.sectionList.render(); - - // Buttons - Generate_Sections.Buttons = new Generate_Sections.ButtonControls({ - collection: Generate_Sections.sectionCollection - }); - Generate_Sections.Buttons.render(); - - }; - - - /*-----------------------------------------------------------------------------------*/ - /* Execute the above methods in the Generate_Sections object. - /*-----------------------------------------------------------------------------------*/ - - jQuery( function( $ ) { - - Generate_Sections.initApplication(); - - $( '#generate_sections_container' ).sortable({ - axis: "y", - opacity: 0.5, - grid: [20, 10], - tolerance: "pointer", - handle: ".move-section", - update: function(event, ui) { - ui.item.trigger("reorder", ui.item.index()); - } - } ); - - if ( $( '.use-sections-switch' ).is( ':checked' ) ) { - setTimeout( function() { - generateShowSections(); - }, 200 ); - } else { - generateHideSections(); - } - - $( '.use-sections-switch' ).on( 'change', function( e ) { - var status = ( $(this).is( ':checked' ) ) ? 'checked' : 'unchecked'; - - if ( 'checked' == status ) { - generateShowSections(); - } else if ( 'unchecked' == status ) { - generateHideSections(); - } - } ); - - function generateShowSections() { - - // Hide send to editor button - $('.send-to-editor').css('display', 'none'); - - // Hide the editor - $('#postdivrich').css({ - 'opacity': '0', - 'height': '0', - 'overflow': 'hidden' - }); - - $( '.block-editor-block-list__layout' ).hide(); - - $( '.edit-post-layout .edit-post-visual-editor' ).css( { - 'flex-grow': 'unset', - 'flex-basis': '0' - } ); - - $( '.edit-post-visual-editor .block-editor-writing-flow__click-redirect' ).css( { - 'min-height': '0' - } ); - - $( '.edit-post-layout__metaboxes:not(:empty)' ).css( 'border-top', '0' ); - - // Show the sections - $('#_generate_sections_metabox').css({ - 'opacity': '1', - 'height': 'auto' - }); - - // Remove and add the default editor - this removes any visible toolbars etc.. - // We need to set a timeout for this to work - // if (typeof tinyMCE != "undefined") { - // tinyMCE.EditorManager.execCommand("mceRemoveEditor", true, "content"); - // $( '.use-sections-cover' ).css( 'z-index','10000' ); - // setTimeout('tinyMCE.EditorManager.execCommand("mceAddEditor", true, "content");', 1); - // setTimeout('jQuery( ".use-sections-cover" ).css( "z-index","-1" );', 1000); - // } - - // Set a trigger - $('body').trigger('generate_show_sections'); - - } - - function generateHideSections() { - - // Show send to editor button - $('.send-to-editor').css('display', 'inline-block'); - - // Show the editor - $('#postdivrich').css({ - 'opacity': '1', - 'height': 'auto' - }); - - $( '.block-editor-block-list__layout' ).show(); - - $( '.edit-post-layout .edit-post-visual-editor' ).css( { - 'flex-grow': '', - 'flex-basis': '' - } ); - - $( '.edit-post-visual-editor .block-editor-writing-flow__click-redirect' ).css( { - 'min-height': '' - } ); - - $( '.edit-post-layout__metaboxes:not(:empty)' ).css( 'border-top', '' ); - - // Hide the sections - $('#_generate_sections_metabox').css({ - 'opacity': '0', - 'height': '0', - 'overflow': 'hidden' - }); - - $('body').trigger('generate_hide_sections'); - - } - - $( document ).on( 'click', '.edit-section.edit-settings', function() { - $( 'body' ).trigger( 'generate_section_show_settings' ); - }); - - }); - - -})(jQuery, Generate_Sections); diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/sections/functions/metaboxes/metabox-functions.php b/wp-content/upgrade-temp-backup/plugins/gp-premium/sections/functions/metaboxes/metabox-functions.php deleted file mode 100644 index 402614ec..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/sections/functions/metaboxes/metabox-functions.php +++ /dev/null @@ -1,396 +0,0 @@ -ID, '_generate_use_sections', TRUE) : ''; - - if ( isset( $use_sections['use_sections'] ) && 'true' == $use_sections['use_sections'] ) { - $classes .= ' generate-sections-enabled'; - } - - return $classes; - } -} - -if ( ! function_exists( 'generate_sections_content_width' ) ) { - add_action( 'wp', 'generate_sections_content_width', 50 ); - /** - * Set our content width when sections are enabled - */ - function generate_sections_content_width() { - global $post; - $use_sections = ( isset( $post ) ) ? get_post_meta( $post->ID, '_generate_use_sections', TRUE) : ''; - - if ( isset( $use_sections['use_sections'] ) && 'true' == $use_sections['use_sections'] ) { - global $content_width; - $content_width = 2000; - } - } -} - -if ( ! function_exists( 'generate_sections_add_metaboxes' ) ) { - add_action( 'add_meta_boxes', 'generate_sections_add_metaboxes', 5 ); - /* - * Functions for creating the metaboxes - */ - function generate_sections_add_metaboxes() { - - $post_types = apply_filters( 'generate_sections_post_types', array( 'page', 'post' ) ); - - add_meta_box( - '_generate_use_sections_metabox', - __( 'Sections', 'gp-premium' ), - 'generate_sections_use_sections_metabox', - $post_types, - 'side', - 'high' - ); - - add_meta_box( - '_generate_sections_metabox', - __( 'Sections', 'gp-premium' ), - 'generate_sections_sections_metabox', - $post_types, - 'normal', - 'high' - ); - - } -} - -if ( ! function_exists( 'generate_sections_sanitize_function' ) ) { - /* - * Sanitize our settings - */ - function generate_sections_sanitize_function( $data, $post_id ) { - - $section = array(); - - if ( isset( $data['title'] ) ) { - $section['title'] = sanitize_text_field( $data['title'] ); - } - - if ( isset( $data['content'] ) ) { - $section['content'] = sanitize_post_field( 'post_content', $data['content'], $post_id, 'db' ); - } - - if ( isset( $data['custom_classes'] ) ) { - $section['custom_classes'] = sanitize_text_field( $data['custom_classes'] ); - } - - if ( isset( $data['custom_id'] ) ) { - $section['custom_id'] = sanitize_text_field( $data['custom_id'] ); - } - - if ( isset( $data['top_padding'] ) ) { - $section['top_padding'] = '' == $data['top_padding'] ? $data['top_padding'] : absint( $data['top_padding'] ); - } - - if ( isset( $data['bottom_padding'] ) ) { - $section['bottom_padding'] = '' == $data['bottom_padding'] ? $data['bottom_padding'] : absint( $data['bottom_padding'] ); - } - - if ( isset( $data['top_padding_unit'] ) ) { - $section['top_padding_unit'] = $data['top_padding_unit'] == '%' ? '%' : ''; - } - - if ( isset( $data['bottom_padding_unit'] ) ) { - $section['bottom_padding_unit'] = $data['bottom_padding_unit'] == '%' ? '%' : ''; - } - - if ( isset( $data['background_image'] ) ) { - $section['background_image'] = absint( $data['background_image'] ); - } - - if ( isset( $data['background_color'] ) ) { - $section['background_color'] = generate_sections_sanitize_rgba( $data['background_color'] ); - } - - if ( isset( $data['text_color'] ) ) { - $section['text_color'] = generate_sections_sanitize_hex_color( $data['text_color'] ); - } - - if ( isset( $data['link_color'] ) ) { - $section['link_color'] = generate_sections_sanitize_hex_color( $data['link_color'] ); - } - - if ( isset( $data['link_color_hover'] ) ) { - $section['link_color_hover'] = generate_sections_sanitize_hex_color( $data['link_color_hover'] ); - } - - if ( isset( $data['box_type'] ) ) { - $section['box_type'] = $data['box_type'] == 'contained' ? 'contained' : ''; - } - - if ( isset( $data['inner_box_type'] ) ) { - $section['inner_box_type'] = $data['inner_box_type'] == 'fluid' ? 'fluid' : ''; - } - - if ( isset( $data['parallax_effect'] ) ) { - $section['parallax_effect'] = $data['parallax_effect'] == 'enable' ? 'enable' : ''; - } - - if ( isset( $data['background_color_overlay'] ) ) { - $section['background_color_overlay'] = $data['background_color_overlay'] == 'enable' ? 'enable' : ''; - } - - return $section; - - } -} - -if ( ! function_exists( 'generate_sections_metabox_scripts' ) ) { - add_action( 'admin_enqueue_scripts', 'generate_sections_metabox_scripts', 20 ); - /* - * Enqueue styles and scripts specific to metaboxs - */ - function generate_sections_metabox_scripts( $hook ) { - // I prefer to enqueue the styles only on pages that are using the metaboxes - if ( in_array( $hook, array( "post.php", "post-new.php" ) ) ) { - - $post_types = apply_filters( 'generate_sections_post_types', array( 'page', 'post' ) ); - - $screen = get_current_screen(); - $post_type = $screen->id; - - if ( in_array( $post_type, (array) $post_types ) ) { - wp_enqueue_style( 'generate-sections-metabox', plugin_dir_url( __FILE__ ) . 'css/generate-sections-metabox.css', false, GENERATE_SECTIONS_VERSION ); - wp_enqueue_style( 'generate-lc-switch', plugin_dir_url( __FILE__ ) . 'css/lc_switch.css', false, GENERATE_SECTIONS_VERSION ); - - //make sure we enqueue some scripts just in case ( only needed for repeating metaboxes ) - wp_enqueue_script( 'jquery' ); - wp_enqueue_script( 'jquery-ui-core' ); - wp_enqueue_script( 'jquery-ui-widget' ); - wp_enqueue_script( 'jquery-ui-mouse' ); - wp_enqueue_script( 'jquery-ui-sortable' ); - wp_enqueue_script( 'editor' ); - wp_enqueue_script( 'media-upload' ); - wp_enqueue_script( 'wp-color-picker' ); - wp_enqueue_style( 'wp-color-picker' ); - wp_enqueue_script( 'wp-color-picker-alpha', GP_LIBRARY_DIRECTORY_URL . 'alpha-color-picker/wp-color-picker-alpha.min.js', array( 'wp-color-picker' ), '3.0.0', true ); - - wp_add_inline_script( - 'wp-color-picker-alpha', - 'jQuery( function() { jQuery( ".color-picker" ).wpColorPicker(); } );' - ); - - wp_enqueue_media(); - - if ( function_exists( 'wp_enqueue_editor' ) ) { - wp_enqueue_editor(); - - wp_add_inline_script( - 'editor', - 'window.wp.sectionsEditor = window.wp.editor;', - 'after' - ); - } - - if ( version_compare( get_bloginfo( 'version' ), '5.0', '<' ) ) { - wp_enqueue_script( 'generate-sections-metabox', plugin_dir_url( __FILE__ ) . 'js/generate-sections-metabox-4.9.js', array( 'jquery', 'jquery-ui-core', 'jquery-ui-widget', 'jquery-ui-mouse', 'jquery-ui-sortable', 'editor', 'media-upload', 'wp-color-picker' ), GENERATE_SECTIONS_VERSION, true ); - } else { - wp_enqueue_script( 'generate-sections-metabox', plugin_dir_url( __FILE__ ) . 'js/generate-sections-metabox.js', array( 'jquery', 'jquery-ui-core', 'jquery-ui-widget', 'jquery-ui-mouse', 'jquery-ui-sortable', 'editor', 'media-upload', 'wp-color-picker' ), GENERATE_SECTIONS_VERSION, true ); - } - - if ( function_exists( 'wp_add_inline_script' ) ) { - if ( function_exists( 'generate_get_default_color_palettes' ) ) { - // Grab our palette array and turn it into JS - $palettes = json_encode( generate_get_default_color_palettes() ); - - // Add our custom palettes - // json_encode takes care of escaping - wp_add_inline_script( 'wp-color-picker', 'jQuery.wp.wpColorPicker.prototype.options.palettes = ' . $palettes . ';' ); - } - } - } - } - } -} - -if ( ! function_exists( 'generate_sections_admin_footer_scripts' ) ) { - add_action( 'admin_footer', 'generate_sections_admin_footer_scripts' ); - - function generate_sections_admin_footer_scripts() { - // We don't need this if wp_add_inline_script exists - if ( function_exists( 'wp_add_inline_script' ) ) { - return; - } - ?> - - ID, '_generate_sections', true ); - - $sections = isset( $meta['sections'] ) && is_array( $meta['sections' ] ) ? $meta['sections'] : array(); - - $translation_array = array( - 'confirm' => __( 'This action can not be undone, are you sure?', 'gp-premium' ), - 'post_id' => $post->ID, - 'sections' => $sections, - 'default_title' => __( 'Section', 'gp-premium' ), - 'default_content_title' => __( 'Content', 'gp-premium' ), - 'tabs' => array( - array( 'title' => __( 'Settings', 'gp-premium' ), 'target' => 'style', 'active' => 'false' ), - array( 'title' => __( 'Content', 'gp-premium' ), 'target' => 'content', 'active' => 'true' ), - //array( 'title' => __( 'Layout', 'gp-premium' ), 'target' => 'layout', 'active' => 'false' ), - ), - 'top_padding' => apply_filters( 'generate_sections_default_padding_top','40' ), - 'bottom_padding' => apply_filters( 'generate_sections_default_padding_bottom','40' ), - 'media_library_title' => __('Section Background', 'gp-premium' ), - 'media_library_button' => __( 'Set as Section Background', 'gp-premium' ), - 'generate_nonce' => wp_create_nonce( 'generate_sections_nonce' ), - 'default_editor' => user_can_richedit() && wp_default_editor() == 'tinymce' ? 'tmce-active' : 'html-active', - 'user_can_richedit' => user_can_richedit(), - 'insert_into_section' => __( 'Insert into Section', 'gp-premium' ), - 'edit_section' => __( 'Edit Section', 'gp-premium' ) - - ); - wp_localize_script( 'generate-sections-metabox', 'generate_sections_metabox_i18n', $translation_array ); - - include_once( plugin_dir_path( __FILE__ ) . 'views/sections.php' ); - include_once( plugin_dir_path( __FILE__ ) . 'views/sections-template.php' ); - add_action( 'print_media_templates', 'generate_sections_print_templates' ); - - do_action( 'generate_sections_metabox' ); - } -} - -if ( ! function_exists( 'generate_sections_save_use_metabox' ) ) { - add_action( 'save_post', 'generate_sections_save_use_metabox' ); - /* - * Save the "use" metabox - */ - function generate_sections_save_use_metabox( $post_id ) { - if ( ! isset( $_POST['_generate_sections_use_sections_nonce'] ) || ! wp_verify_nonce( $_POST['_generate_sections_use_sections_nonce'], 'generate_sections_use_sections_nonce' ) ) { - return $post_id; - } - - if ( defined('DOING_AUTOSAVE') && DOING_AUTOSAVE ) { - return $post_id; - } - - if ( ! current_user_can('edit_post', $post_id ) ) { - return $post_id; - } - - if ( isset ( $_POST['_generate_use_sections'] ) && isset ( $_POST['_generate_use_sections']['use_sections'] ) && $_POST['_generate_use_sections']['use_sections'] == 'true' ) { - update_post_meta( $post_id, '_generate_use_sections', array( 'use_sections' => 'true' ) ); - } else { - delete_post_meta( $post_id, '_generate_use_sections' ); - } - } -} - -if ( ! function_exists( 'generate_sections_save_sections_metabox' ) ) { - add_action( 'save_post', 'generate_sections_save_sections_metabox', 20 ); - /* - * Save the sections metabox - */ - function generate_sections_save_sections_metabox( $post_id ) { - - if ( ! isset( $_POST['_generate_sections_nonce'] ) || ! wp_verify_nonce( $_POST['_generate_sections_nonce'], 'generate_sections_nonce' ) ) { - return $post_id; - } - - if ( defined('DOING_AUTOSAVE') && DOING_AUTOSAVE ) { - return $post_id; - } - - if ( ! current_user_can('edit_post', $post_id ) ) { - return $post_id; - } - - $clean = array(); - - if ( isset ( $_POST['_generate_sections'] ) && isset( $_POST['_generate_sections']['sections'] ) && is_array( $_POST['_generate_sections']['sections'] ) ) { - - foreach( $_POST['_generate_sections']['sections'] as $section ) { - - $section = json_decode( stripslashes( trim($section) ), true); - - $section = generate_sections_sanitize_function( $section, $post_id ); - if ( ! empty( $section ) ){ - $clean[] = $section; - } - - } - - } - - // save data - if ( ! empty( $clean ) ) { - // this maintains data structure of previous version - $meta = array( 'sections' => $clean ); - update_post_meta( $post_id, '_generate_sections', $meta ); - } else { - delete_post_meta( $post_id, '_generate_sections' ); - } - - } -} - -if ( ! function_exists( 'generate_sections_sanitize_hex_color' ) ) { - /* - * Sanitize colors - * We don't use the built in function so we can use empty values - */ - function generate_sections_sanitize_hex_color( $color ) { - if ( '' === $color ) { - return ''; - } - - // 3 or 6 hex digits, or the empty string. - if ( preg_match('|^#([A-Fa-f0-9]{3}){1,2}$|', $color ) ) { - return $color; - } - - return null; - } -} - -if ( ! function_exists( 'generate_sections_sanitize_rgba' ) ) { - /** - * Sanitize RGBA colors - * @since 1.3.42 - */ - function generate_sections_sanitize_rgba( $color ) { - if ( '' === $color ) { - return ''; - } - - // If string does not start with 'rgba', then treat as hex - // sanitize the hex color and finally convert hex to rgba - if ( false === strpos( $color, 'rgba' ) ) { - return generate_sections_sanitize_hex_color( $color ); - } - - // By now we know the string is formatted as an rgba color so we need to further sanitize it. - $color = str_replace( ' ', '', $color ); - sscanf( $color, 'rgba(%d,%d,%d,%f)', $red, $green, $blue, $alpha ); - return 'rgba('.$red.','.$green.','.$blue.','.$alpha.')'; - - return ''; - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/sections/functions/metaboxes/views/sections-template.php b/wp-content/upgrade-temp-backup/plugins/gp-premium/sections/functions/metaboxes/views/sections-template.php deleted file mode 100644 index 4fd904bf..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/sections/functions/metaboxes/views/sections-template.php +++ /dev/null @@ -1,279 +0,0 @@ - - - - - - - - - - - - - - - - - - - - -
          - - - -
          - -
          \ No newline at end of file diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/sections/functions/metaboxes/views/use-sections.php b/wp-content/upgrade-temp-backup/plugins/gp-premium/sections/functions/metaboxes/views/use-sections.php deleted file mode 100644 index d2aa993f..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/sections/functions/metaboxes/views/use-sections.php +++ /dev/null @@ -1,17 +0,0 @@ - -
          - - ID, '_generate_use_sections', true ); - //$use_sections = isset( $use_sections['use_sections'] ) && 'true' == $use_sections['use_sections'] ? true : false; - wp_nonce_field( 'generate_sections_use_sections_nonce', '_generate_sections_use_sections_nonce' ); - ?> - -
          diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/sections/functions/templates/template.php b/wp-content/upgrade-temp-backup/plugins/gp-premium/sections/functions/templates/template.php deleted file mode 100644 index daf0d21e..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/sections/functions/templates/template.php +++ /dev/null @@ -1,122 +0,0 @@ -ID, '_generate_sections', TRUE) : ''; -$sidebars = apply_filters( 'generate_sections_sidebars', false ); -?> - -
          > -
          > - - - -
          > -
          -
          - -
          -
          -
          - - - - '; - $container['after'] = '
          '; - else : - $container['before'] = '
          '; - $container['after'] = '
          '; - endif; - - // Create inner container - if ( 'fluid' == $inner_box_type ) : - $inner_container['before'] = '
          '; - $inner_container['after'] = '
          '; - else : - $inner_container['before'] = '
          '; - $inner_container['after'] = '
          '; - endif; - - // Output the container - $return .= $container['before']; - $return .= $inner_container['before']; - - // Output the content - // Add \n\n to fix issue where paragraph wrapping was off - $return .= "\n\n" . $content; - - // Output the closing containers - $return .= $container['after']; - $return .= $inner_container['after']; - - endforeach; - - // Return our sections through the_content filter - echo apply_filters( 'the_content', $return ); - else : - ?> -
          -
          - -
          -
          - - - - - - - - - $widgets ) { - // Skip inactive widgets (should not be in export file). - if ( 'wp_inactive_widgets' === $sidebar_id ) { - continue; - } - - if ( is_array( $widgets ) ) { - foreach ( $widgets as $widget_instance_id => $widget ) { - $all_widgets[] = $widget; - } - } - } - - $results['wp_inactive_widgets'] = $all_widgets; - - update_option( 'sidebars_widgets', $results ); - - } - - /** - * Checks to see whether options exist or not. - * - * @since 1.8 - * - * @return bool - */ - public static function do_options_exist() { - $theme_mods = self::get_theme_mods(); - $settings = self::get_theme_settings(); - - $has_data = array( - 'mods' => array(), - 'options' => array(), - ); - - foreach ( $theme_mods as $theme_mod ) { - if ( get_theme_mod( $theme_mod ) ) { - $has_data['mods'][ $theme_mod ] = get_theme_mod( $theme_mod ); - } - } - - foreach ( $settings as $setting ) { - if ( get_option( $setting ) ) { - - // The blog module runs a migration script on activation for now. This checks if those migrated values have been changed. - if ( 'generate_blog_settings' === $setting && function_exists( 'generate_blog_get_defaults' ) ) { - $defaults = generate_blog_get_defaults(); - $options = get_option( $setting ); - $diff = array(); - - foreach ( $options as $option => $value ) { - if ( isset( $defaults[ $option ] ) && $value !== $defaults[ $option ] ) { - $diff[ $option ] = $value; - } - } - - if ( empty( $diff ) ) { - continue; - } - } - - $has_data['options'][ $setting ] = get_option( $setting ); - } - } - - if ( ! array_filter( $has_data ) ) { - return false; - } else { - return true; - } - } - - /** - * Imports our content and custom CSS. - * - * @since 1.6 - * @param string $path Path to the file. - * @param string $slug File slug. - */ - public static function import_xml( $path, $slug ) { - if ( ! class_exists( 'WP_Importer' ) ) { - require_once ABSPATH . '/wp-admin/includes/class-wp-importer.php'; - } - - require_once GP_PREMIUM_DIR_PATH . 'site-library/libs/wxr-importer/WXRImporter.php'; - require_once GP_PREMIUM_DIR_PATH . 'site-library/libs/wxr-importer/WPImporterLogger.php'; - require_once GP_PREMIUM_DIR_PATH . 'site-library/libs/wxr-importer/WXRImportInfo.php'; - require_once GP_PREMIUM_DIR_PATH . 'site-library/classes/class-content-importer.php'; - - if ( ! function_exists( 'wp_crop_image' ) ) { - require_once ABSPATH . 'wp-admin/includes/image.php'; - } - - add_filter( 'upload_mimes', array( __CLASS__, 'mime_types' ) ); - add_filter( 'wp_check_filetype_and_ext', array( __CLASS__, 'check_real_mime_type' ), 10, 4 ); - add_filter( 'wp_prepare_attachment_for_js', array( __CLASS__, 'add_svg_image_support' ), 10, 3 ); - - $options = array( - 'fetch_attachments' => true, - 'default_author' => 0, - ); - - $current_css = wp_get_custom_css_post(); - - $logger = new GeneratePress\WPContentImporter2\WPImporterLogger(); - $importer = new GeneratePress_Sites_Content_Importer( $options ); - $importer->set_logger( $logger ); - $result = $importer->import( $path ); - - // Get all mapped post and term data. - $existing_data = self::get_mapped_post_ids( $slug ); - $mapped_data = $importer->get_importer_data(); - $mapped_posts = $mapped_data['mapping']['post']; - - // Merge exiting mapped posts with any new ones. Existing posts don't get mapped, so we need to preserve them. - $all_data = $mapped_posts + $existing_data; - - // Set our site specific mapped posts with all of our data. - update_option( 'generatepress_sites_mapped_ids_' . $slug, $all_data, false ); - - // Set mapped term IDs. - // These are always the same, even if the site has been imported before. No fancy stuff needed. - $term_mapping = $mapped_data['mapping']['term_id']; - set_transient( 'generatepress_sites_mapped_term_ids', $term_mapping, 0.1 * HOUR_IN_SECONDS ); - - wp_update_custom_css_post( $current_css->post_content ); - - // Page builders need so much extra work. - self::update_page_builder_content(); - - remove_filter( 'upload_mimes', array( __CLASS__, 'mime_types' ) ); - remove_filter( 'wp_check_filetype_and_ext', array( __CLASS__, 'check_real_mime_type' ), 10, 4 ); - remove_filter( 'wp_prepare_attachment_for_js', array( __CLASS__, 'add_svg_image_support' ), 10, 3 ); - } - - /** - * List plugins that have a pro version. - * - * We want to check to see if these exist before installing or activating - * the free versions. - * - * @since 1.6 - * - * @return array - */ - public static function check_for_pro_plugins() { - return apply_filters( - 'generate_sites_pro_plugins', - array( - 'beaver-builder-lite-version/fl-builder.php' => 'bb-plugin/fl-builder.php', - 'ultimate-addons-for-beaver-builder-lite/bb-ultimate-addon.php' => 'bb-ultimate-addon/bb-ultimate-addon.php', - 'powerpack-addon-for-beaver-builder/bb-powerpack-lite.php' => 'bbpowerpack/bb-powerpack.php', - ) - ); - } - - /** - * Check to see if required plugins are active. - * - * @since 1.6 - * - * @param string $plugin The plugin to check for. - */ - public static function is_plugin_installed( $plugin ) { - $pro_plugins = self::check_for_pro_plugins(); - - // Check to see if this plugin has a pro version. - if ( array_key_exists( $plugin, $pro_plugins ) ) { - if ( file_exists( WP_PLUGIN_DIR . '/' . $pro_plugins[ $plugin ] ) ) { - return true; - } - } - - if ( file_exists( WP_PLUGIN_DIR . '/' . $plugin ) ) { - return true; - } - - return false; - - } - - /** - * Allow SVG images. - * - * @since 1.6 - * - * @param array $response Attachment response. - * @param object $attachment Attachment object. - * @param array $meta Attachment meta data. - */ - public static function add_svg_image_support( $response, $attachment, $meta ) { - if ( ! function_exists( 'simplexml_load_file' ) ) { - return $response; - } - - if ( ! empty( $response['sizes'] ) ) { - return $response; - } - - if ( 'image/svg+xml' !== $response['mime'] ) { - return $response; - } - - $svg_path = get_attached_file( $attachment->ID ); - - $dimensions = self::get_svg_dimensions( $svg_path ); - - $response['sizes'] = array( - 'full' => array( - 'url' => $response['url'], - 'width' => $dimensions->width, - 'height' => $dimensions->height, - 'orientation' => $dimensions->width > $dimensions->height ? 'landscape' : 'portrait', - ), - ); - - return $response; - } - - /** - * Get the dimensions of the uploaded SVG. - * - * @since 1.6 - * - * @param string $svg SVG file path. - * @return array Return SVG file height & width for valid SVG file. - */ - public static function get_svg_dimensions( $svg ) { - $svg = simplexml_load_file( $svg ); - - if ( false === $svg ) { - $width = '0'; - $height = '0'; - } else { - $attributes = $svg->attributes(); - $width = (string) $attributes->width; - $height = (string) $attributes->height; - } - - return (object) array( - 'width' => $width, - 'height' => $height, - ); - } - - /** - * Taken from the core media_sideload_image function and - * modified to return an array of data instead of html. - * - * @since 1.6 - * - * @param string $file The image file path. - * @return array An array of image data. - */ - public static function sideload_image( $file ) { - - $data = new stdClass(); - - if ( ! function_exists( 'media_handle_sideload' ) ) { - require_once ABSPATH . 'wp-admin/includes/media.php'; - require_once ABSPATH . 'wp-admin/includes/file.php'; - require_once ABSPATH . 'wp-admin/includes/image.php'; - } - - add_filter( 'upload_mimes', array( __CLASS__, 'mime_types' ) ); - add_filter( 'wp_check_filetype_and_ext', array( __CLASS__, 'check_real_mime_type' ), 10, 4 ); - add_filter( 'wp_prepare_attachment_for_js', array( __CLASS__, 'add_svg_image_support' ), 10, 3 ); - - if ( ! empty( $file ) ) { - - // Set variables for storage, fix file filename for query strings. - preg_match( '/[^\?]+\.(jpe?g|jpe|svg|gif|png)\b/i', $file, $matches ); - $file_array = array(); - $file_array['name'] = basename( $matches[0] ); - - // Download file to temp location. - $file_array['tmp_name'] = download_url( $file ); - - // If error storing temporarily, return the error. - if ( is_wp_error( $file_array['tmp_name'] ) ) { - return $file_array['tmp_name']; - } - - // Do the validation and storage stuff. - $id = media_handle_sideload( $file_array, 0 ); - - // If error storing permanently, unlink. - if ( is_wp_error( $id ) ) { - @unlink( $file_array['tmp_name'] ); // phpcs:ignore - return $id; - } - - // Build the object to return. - $meta = wp_get_attachment_metadata( $id ); - $data->attachment_id = $id; - $data->url = wp_get_attachment_url( $id ); - $data->thumbnail_url = wp_get_attachment_thumb_url( $id ); - - if ( isset( $meta['height'] ) ) { - $data->height = $meta['height']; - } - - if ( isset( $meta['width'] ) ) { - $data->width = $meta['width']; - } - } - - remove_filter( 'upload_mimes', array( __CLASS__, 'mime_types' ) ); - remove_filter( 'wp_check_filetype_and_ext', array( __CLASS__, 'check_real_mime_type' ), 10, 4 ); - remove_filter( 'wp_prepare_attachment_for_js', array( __CLASS__, 'add_svg_image_support' ), 10, 3 ); - - return $data; - - } - - /** - * Re-maps menu locations. - * - * @since 1.6 - * - * @param array $locations Incoming locations. - */ - public static function set_nav_menu_locations( $locations = array() ) { - $menu_locations = array(); - - $term_ids = self::get_mapped_term_ids(); - - if ( isset( $locations ) ) { - self::log( '== Start mapping menu locations ==' ); - - foreach ( $locations as $menu => $value ) { - if ( empty( $value ) ) { - continue; - } - - $menu_locations[ $menu ] = $term_ids[ $value ]; - self::log( $value . ' -> ' . $term_ids[ $value ] ); - } - - set_theme_mod( 'nav_menu_locations', $menu_locations ); - } - } - - /** - * Re-maps the front page and posts page. - * - * @since 1.6 - * - * @param string $name Name of the option to update. - * @param string $value Title of the page. - * @param string $slug Slug of the page. - */ - public static function set_reading_pages( $name, $value, $slug ) { - if ( empty( $value ) ) { - return; - } - - self::log( '== Start mapping front and blog pages ==' ); - - // Get import data, with new menu IDs. - $post_ids = self::get_mapped_post_ids( $slug ); - - update_option( $name, $post_ids[ $value ] ); - self::log( $value . ' -> ' . $post_ids[ $value ] ); - } - - /** - * Re-maps WooCommerce pages. - * - * @since 1.6 - * - * @param string $name Name of the option to update. - * @param string $value Title of the page. - * @param string $slug Slug of the page. - */ - public static function set_woocommerce_pages( $name, $value, $slug ) { - if ( empty( $value ) ) { - return; - } - - self::log( '== Start mapping WooCommerce pages ==' ); - - $post_ids = self::get_mapped_post_ids( $slug ); - - update_option( $name, $post_ids[ $value ] ); - self::log( $value . ' -> ' . $post_ids[ $value ] ); - } - - /** - * Change the menu IDs in the custom menu widgets in the widget import data. - * This solves the issue with custom menu widgets not having the correct (new) menu ID, because they - * have the old menu ID from the export site. - * - * @param array $widget The widget settings array. - */ - public static function fix_custom_menu_widget_ids( $widget ) { - // Skip (no changes needed), if this is not a custom menu widget. - if ( ! array_key_exists( 'nav_menu', $widget ) || empty( $widget['nav_menu'] ) || ! is_int( $widget['nav_menu'] ) ) { - return $widget; - } - - // Get import data, with new menu IDs. - $term_ids = self::get_mapped_term_ids(); - - if ( ! isset( $term_ids[ $widget['nav_menu'] ] ) ) { - return $widget; - } - - self::log( '== Start mapping navigation widgets ==' ); - self::log( $widget['nav_menu'] . ' -> ' . $term_ids[ $widget['nav_menu'] ] ); - - // Set the new menu ID for the widget. - $widget['nav_menu'] = $term_ids[ $widget['nav_menu'] ]; - - return $widget; - } - - /** - * Re-maps the element locations. - * - * @since 1.7 - * - * @param array $locations Incoming locations. - * @param string $slug Element slug. - */ - public static function set_element_locations( $locations, $slug ) { - $post_ids = self::get_mapped_post_ids( $slug ); - - if ( isset( $locations ) && ! empty( $locations ) ) { - self::log( '== Start mapping element locations ==' ); - - foreach ( (array) $locations as $key => $value ) { - $new_locations = array(); - if ( empty( $value ) ) { - continue; - } - - foreach ( (array) $value as $data ) { - if ( $data['object'] ) { - self::log( $data['object'] . ' -> ' . $post_ids[ $data['object'] ] ); - $data['object'] = $post_ids[ $data['object'] ]; - } - - $new_locations[] = $data; - } - - update_post_meta( $post_ids[ $key ], '_generate_element_display_conditions', $new_locations ); - } - } - } - - /** - * Re-maps the element exclusions. - * - * @since 1.7 - * - * @param array $locations Incoming locations. - * @param string $slug Element slug. - */ - public static function set_element_exclusions( $locations, $slug ) { - $post_ids = self::get_mapped_post_ids( $slug ); - - if ( isset( $locations ) && ! empty( $locations ) ) { - self::log( '== Start mapping element exclusions ==' ); - - foreach ( (array) $locations as $key => $value ) { - $new_locations = array(); - if ( empty( $value ) ) { - continue; - } - - foreach ( (array) $value as $data ) { - if ( $data['object'] ) { - self::log( $data['object'] . ' -> ' . $post_ids[ $data['object'] ] ); - $data['object'] = $post_ids[ $data['object'] ]; - } - - $new_locations[] = $data; - } - - update_post_meta( $post_ids[ $key ], '_generate_element_exclude_conditions', $new_locations ); - } - } - } - - /** - * Update menu URLs. - * - * @since 1.7.3 - * @param string $url Preview URL. - */ - public static function update_menu_urls( $url ) { - $args = array( - 'post_type' => 'nav_menu_item', - 'fields' => 'ids', - 'no_found_rows' => true, - 'post_status' => 'any', - 'numberposts' => 50, - ); - - $items = get_posts( $args ); - - foreach ( $items as $item_id ) { - $item_type = get_post_meta( $item_id, '_menu_item_type', true ); - - if ( 'custom' === $item_type ) { - $item_url = get_post_meta( $item_id, '_menu_item_url', true ); - - if ( $item_url && '#' !== $item_url ) { - $item_url = str_replace( $url, site_url(), $item_url ); - - update_post_meta( $item_id, '_menu_item_url', $item_url ); - } - } - } - } - - /** - * Allow other files types to be uploaded. - * - * @since 1.6 - * - * @param array $mimes Existing types. - * @return array Merged types. - */ - public static function mime_types( $mimes ) { - $mimes = array_merge( - $mimes, - array( - 'xml' => 'text/xml', - 'wie' => 'text/plain', - 'svg' => 'image/svg+xml', - 'svgz' => 'image/svg+xml', - ) - ); - - return $mimes; - } - - /** - * Different MIME type of different PHP version - * - * Filters the "real" file type of the given file. - * - * @since 1.8 - * - * @param array $defaults Default file types. - * @param string $file Full path to the file. - * @param string $filename The name of the file (may differ from $file due to $file being in a tmp directory). - * @param array $mimes Key is the file extension with value as the mime type. - */ - public static function check_real_mime_type( $defaults, $file, $filename, $mimes ) { - if ( 'content.xml' === $filename ) { - $defaults['ext'] = 'xml'; - $defaults['type'] = 'text/xml'; - } - - if ( 'widgets.wie' === $filename ) { - $defaults['ext'] = 'wie'; - $defaults['type'] = 'text/plain'; - } - - return $defaults; - } - - /** - * Download a file to WordPress from a URL. - * - * @since 1.6 - * - * @param string $file URL of the file. - * @return array - */ - public static function download_file( $file ) { - add_filter( 'upload_mimes', array( __CLASS__, 'mime_types' ) ); - add_filter( 'wp_check_filetype_and_ext', array( __CLASS__, 'check_real_mime_type' ), 10, 4 ); - add_filter( 'wp_prepare_attachment_for_js', array( __CLASS__, 'add_svg_image_support' ), 10, 3 ); - - // Gives us access to the download_url() and wp_handle_sideload() functions. - require_once ABSPATH . 'wp-admin/includes/file.php'; - - // URL to the WordPress logo. - $url = $file; - $timeout_seconds = 10; - - // Download file to temp dir. - $temp_file = download_url( $url, $timeout_seconds ); - - if ( is_wp_error( $temp_file ) ) { - - return array( - 'success' => false, - 'data' => $temp_file->get_error_message(), - ); - - } - - // Array based on $_FILE as seen in PHP file uploads. - $file = array( - 'name' => basename( $url ), - 'tmp_name' => $temp_file, - 'error' => 0, - 'size' => filesize( $temp_file ), - ); - - $overrides = array( - 'test_form' => false, - 'test_size' => true, - ); - - // Move the temporary file into the uploads directory. - $results = wp_handle_sideload( $file, $overrides ); - - // Clean up. - remove_filter( 'upload_mimes', array( __CLASS__, 'mime_types' ) ); - remove_filter( 'wp_check_filetype_and_ext', array( __CLASS__, 'check_real_mime_type' ), 10, 4 ); - remove_filter( 'wp_prepare_attachment_for_js', array( __CLASS__, 'add_svg_image_support' ), 10, 3 ); - - if ( empty( $results['error'] ) ) { - - return array( - 'success' => true, - 'data' => $results, - ); - - } else { - - return array( - 'success' => false, - 'error' => $results['error'], - ); - - } - - } - - /** - * Get data from the options.json file. - * - * @since 1.6 - * - * @param string $url URL of the file. - * @return array - */ - public static function get_options( $url ) { - $url = wp_safe_remote_get( esc_url( $url ) ); - - if ( is_wp_error( $url ) ) { - return false; - } - - return json_decode( wp_remote_retrieve_body( $url ), true ); - } - - /** - * Check to see if a remote file exists. - * - * @since 1.6 - * - * @param string $url URL of the file. - * @return bool - */ - public static function file_exists( $url ) { - $response = wp_safe_remote_get( esc_url( $url ) ); - - if ( is_wp_error( $response ) ) { - self::log( $response->get_error_message() ); - return false; - } - - return strlen( $response['body'] ) > 100 && ( '200' === (string) $response['response']['code'] || '301' === (string) $response['response']['code'] ) ? true : false; - } - - /** - * Log events to the debug.log file. - * - * @since 1.6 - * @param mixed $log Log data. - * @return void - */ - public static function log( $log ) { - if ( ! WP_DEBUG_LOG ) { - return; - } - - if ( is_array( $log ) || is_object( $log ) ) { - error_log( print_r( $log, true ) ); // phpcs:ignore -- Needed to log events. - } else { - error_log( $log ); // phpcs:ignore -- Needed to log events. - } - } - - /** - * Get all posts to run through batch processing. - * - * @since 1.6 - * - * @return object All posts. - */ - public static function get_all_posts() { - $args = array( - 'post_type' => 'any', - 'fields' => 'ids', - 'no_found_rows' => true, - 'post_status' => 'publish', - 'numberposts' => -1, - 'meta_query' => array( - 'relation' => 'OR', - array( - 'key' => '_fl_builder_data', - 'compare' => 'EXISTS', - ), - array( - 'key' => '_elementor_data', - 'compare' => 'EXISTS', - ), - ), - ); - - $posts = get_posts( $args ); - - if ( $posts ) { - return $posts; - } - - return false; - } - - /** - * Searches Elementor and Beaver Builder content for images to download. - * - * @since 1.6 - */ - public static function update_page_builder_content() { - include_once ABSPATH . 'wp-admin/includes/plugin.php'; - - // Add "bb-plugin" in import [queue]. - // Add "beaver-builder-lite-version" in import [queue]. - if ( is_plugin_active( 'beaver-builder-lite-version/fl-builder.php' ) || is_plugin_active( 'bb-plugin/fl-builder.php' ) ) { - require_once GP_PREMIUM_DIR_PATH . 'site-library/classes/class-beaver-builder-batch-processing.php'; - require_once GP_PREMIUM_DIR_PATH . 'site-library/classes/class-site-import-image.php'; - - $beaver_builder = new GeneratePress_Sites_Process_Beaver_Builder(); - $beaver_builder->import(); - } - } - - /** - * Clear Elementor & Beaver Builder caches when needed. - * - * @since 1.6 - */ - public static function clear_page_builder_cache() { - - if ( class_exists( 'FLBuilderModel' ) && method_exists( 'FLBuilderModel', 'delete_asset_cache_for_all_posts' ) ) { - // Clear all cache. - FLBuilderModel::delete_asset_cache_for_all_posts(); - self::log( 'Cleared Beaver Builder cache.' ); - } - - if ( class_exists( 'Elementor\Plugin' ) && method_exists( 'Elementor\Posts_CSS_Manager', 'clear_cache' ) ) { - // !important, Clear the cache after images import. - Elementor\Plugin::instance()->posts_css_manager->clear_cache(); - self::log( 'Cleared Elementor cache.' ); - } - - } - - /** - * List out GP option names. - * - * @since 1.6 - * - * @return array - */ - public static function get_theme_settings() { - return array( - 'generate_settings', - 'generate_background_settings', - 'generate_blog_settings', - 'generate_page_header_settings', - 'generate_secondary_nav_settings', - 'generate_spacing_settings', - 'generate_menu_plus_settings', - 'generate_woocommerce_settings', - ); - } - - /** - * List out GP theme mods. - * - * @since 1.6 - * - * @return array - */ - public static function get_theme_mods() { - return array( - 'font_body_variants', - 'font_body_category', - 'font_site_title_variants', - 'font_site_title_category', - 'font_site_tagline_variants', - 'font_site_tagline_category', - 'font_navigation_variants', - 'font_navigation_category', - 'font_secondary_navigation_variants', - 'font_secondary_navigation_category', - 'font_buttons_variants', - 'font_buttons_category', - 'font_heading_1_variants', - 'font_heading_1_category', - 'font_heading_2_variants', - 'font_heading_2_category', - 'font_heading_3_variants', - 'font_heading_3_category', - 'font_heading_4_variants', - 'font_heading_4_category', - 'font_heading_5_variants', - 'font_heading_5_category', - 'font_heading_6_variants', - 'font_heading_6_category', - 'font_widget_title_variants', - 'font_widget_title_category', - 'font_footer_variants', - 'font_footer_category', - 'generate_copyright', - ); - } - - /** - * Build the loading icon. - * - * @since 1.6 - */ - public static function loading_icon() { - ?> - - - - - - - - - - - - - 'generate_package_backgrounds', - 'Blog' => 'generate_package_blog', - 'Colors' => 'generate_package_colors', - 'Copyright' => 'generate_package_copyright', - 'Elements' => 'generate_package_elements', - 'Disable Elements' => 'generate_package_disable_elements', - 'Hooks' => 'generate_package_hooks', - 'Menu Plus' => 'generate_package_menu_plus', - 'Page Header' => 'generate_package_page_header', - 'Secondary Nav' => 'generate_package_secondary_nav', - 'Sections' => 'generate_package_sections', - 'Spacing' => 'generate_package_spacing', - 'Typography' => 'generate_package_typography', - 'WooCommerce' => 'generate_package_woocommerce', - ); - } - - /** - * A list of options we shouldn't be able to touch. - */ - public static function disallowed_options() { - return array( - 'admin_email', - 'siteurl', - 'home', - 'blog_charset', - 'blog_public', - 'current_theme', - 'stylesheet', - 'template', - 'default_role', - 'mailserver_login', - 'mailserver_pass', - 'mailserver_port', - 'mailserver_url', - 'permalink_structure', - 'rewrite_rules', - 'users_can_register', - ); - } - - /** - * Track Imported Post - * - * @param int $post_id Post ID. - * @return void - */ - public static function track_post( $post_id ) { - update_post_meta( $post_id, '_generatepress_sites_imported_post', true ); - } - - /** - * Track Imported Term - * - * @param int $term_id Term ID. - * @return void - */ - public static function track_term( $term_id ) { - $term = get_term( $term_id ); - - update_term_meta( $term_id, '_generatepress_sites_imported_term', true ); - } - - /** - * Prevent WooCommerce from creating new pages if we're importing them. - * generate_woocommerce_no_create_pages is set during Site Library import. - */ - public static function woocommerce_no_new_pages() { - if ( ! function_exists( 'is_woocommerce' ) ) { - return; - } - - $woocommerce_version = get_option( 'woocommerce_db_version' ); - - if ( empty( $woocommerce_version ) ) { - $no_new_pages = get_option( 'generate_woocommerce_no_create_pages', false ); - - if ( $no_new_pages ) { - add_filter( 'woocommerce_create_pages', '__return_empty_array' ); - delete_option( 'generate_woocommerce_no_create_pages' ); - } - } - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/site-library/class-site-library-rest.php b/wp-content/upgrade-temp-backup/plugins/gp-premium/site-library/class-site-library-rest.php deleted file mode 100644 index 2f8e9284..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/site-library/class-site-library-rest.php +++ /dev/null @@ -1,922 +0,0 @@ -namespace . $this->version; - - // Get Templates. - register_rest_route( - $namespace, - '/get_sites/', - array( - 'methods' => WP_REST_Server::EDITABLE, - 'callback' => array( $this, 'get_sites' ), - 'permission_callback' => array( $this, 'update_settings_permission' ), - ) - ); - - // Get Templates. - register_rest_route( - $namespace, - '/get_site_data/', - array( - 'methods' => WP_REST_Server::EDITABLE, - 'callback' => array( $this, 'get_site_data' ), - 'permission_callback' => array( $this, 'update_settings_permission' ), - ) - ); - - // Get Templates. - register_rest_route( - $namespace, - '/import_theme_options/', - array( - 'methods' => WP_REST_Server::EDITABLE, - 'callback' => array( $this, 'import_options' ), - 'permission_callback' => array( $this, 'update_settings_permission' ), - ) - ); - - // Get Templates. - register_rest_route( - $namespace, - '/activate_plugins/', - array( - 'methods' => WP_REST_Server::EDITABLE, - 'callback' => array( $this, 'activate_plugins' ), - 'permission_callback' => array( $this, 'update_settings_permission' ), - ) - ); - - // Get Templates. - register_rest_route( - $namespace, - '/import_content/', - array( - 'methods' => WP_REST_Server::EDITABLE, - 'callback' => array( $this, 'import_content' ), - 'permission_callback' => array( $this, 'update_settings_permission' ), - ) - ); - - // Get Templates. - register_rest_route( - $namespace, - '/import_site_options/', - array( - 'methods' => WP_REST_Server::EDITABLE, - 'callback' => array( $this, 'import_site_options' ), - 'permission_callback' => array( $this, 'update_settings_permission' ), - ) - ); - - // Get Templates. - register_rest_route( - $namespace, - '/import_widgets/', - array( - 'methods' => WP_REST_Server::EDITABLE, - 'callback' => array( $this, 'import_widgets' ), - 'permission_callback' => array( $this, 'update_settings_permission' ), - ) - ); - - // Get Templates. - register_rest_route( - $namespace, - '/restore_theme_options/', - array( - 'methods' => WP_REST_Server::EDITABLE, - 'callback' => array( $this, 'restore_theme_options' ), - 'permission_callback' => array( $this, 'update_settings_permission' ), - ) - ); - - // Get Templates. - register_rest_route( - $namespace, - '/restore_content/', - array( - 'methods' => WP_REST_Server::EDITABLE, - 'callback' => array( $this, 'restore_content' ), - 'permission_callback' => array( $this, 'update_settings_permission' ), - ) - ); - } - - /** - * Get edit options permissions. - * - * @return bool - */ - public function update_settings_permission() { - return current_user_can( 'manage_options' ); - } - - /** - * Export a group of assets. - * - * @param WP_REST_Request $request request object. - * - * @return mixed - */ - public function get_sites( WP_REST_Request $request ) { - $force_refresh = $request->get_param( 'forceRefresh' ); - $sites = get_option( 'generatepress_sites', array() ); - - $time_now = strtotime( 'now' ); - $sites_expire = get_option( 'generatepress_sites_expiration', sanitize_text_field( $time_now ) ); - - if ( $force_refresh || empty( $sites ) || $sites_expire < $time_now ) { - $sites = array(); - - $data = wp_safe_remote_get( 'https://gpsites.co/wp-json/wp/v2/sites?per_page=100' ); - - if ( is_wp_error( $data ) ) { - update_option( 'generatepress_sites', 'no results', false ); - update_option( 'generatepress_sites_expiration', strtotime( '+5 minutes' ), false ); - return $this->failed( 'no results' ); - } - - $data = json_decode( wp_remote_retrieve_body( $data ), true ); - - if ( ! is_array( $data ) ) { - update_option( 'generatepress_sites', 'no results', false ); - update_option( 'generatepress_sites_expiration', strtotime( '+5 minutes' ), false ); - return $this->failed( 'no results' ); - } - - foreach ( (array) $data as $site ) { - $sites[ $site['name'] ] = array( - 'name' => $site['name'], - 'directory' => $site['directory'], - 'preview_url' => $site['preview_url'], - 'author_name' => $site['author_name'], - 'author_url' => $site['author_url'], - 'description' => $site['description'], - 'page_builder' => $site['page_builder'], - 'category' => $site['category'], - 'min_version' => $site['min_version'], - 'min_theme_version' => $site['min_theme_version'], - 'min_generateblocks_version' => $site['min_generateblocks_version'], - 'uploads_url' => $site['uploads_url'], - 'plugins' => $site['plugins'], - 'documentation' => $site['documentation'], - 'image_width' => ! empty( $site['image_width'] ) ? $site['image_width'] : 600, - 'image_height' => ! empty( $site['image_height'] ) ? $site['image_height'] : 600, - ); - } - - update_option( 'generatepress_sites', $sites, false ); - update_option( 'generatepress_sites_expiration', strtotime( '+1 day' ), false ); - } - - $sites = apply_filters( 'generate_add_sites', $sites ); - - return $this->success( $sites ); - } - - /** - * Export a group of assets. - * - * @param WP_REST_Request $request request object. - * - * @return mixed - */ - public function get_site_data( WP_REST_Request $request ) { - $site_data = $request->get_param( 'siteData' ); - - if ( GeneratePress_Site_Library_Helper::file_exists( $site_data['directory'] . '/options.json' ) ) { - $settings = GeneratePress_Site_Library_Helper::get_options( $site_data['directory'] . '/options.json' ); - - $data['options'] = true; - $data['modules'] = $settings['modules']; - $data['plugins'] = $settings['plugins']; - - if ( is_array( $data['plugins'] ) ) { - include_once ABSPATH . 'wp-admin/includes/plugin.php'; - $plugin_data = array(); - - foreach ( $data['plugins'] as $name => $slug ) { - $basename = strtok( $slug, '/' ); - $plugin_data[ $name ] = array( - 'name' => $name, - 'slug' => $slug, - 'installed' => GeneratePress_Site_Library_Helper::is_plugin_installed( $slug ) ? true : false, - 'active' => is_plugin_active( $slug ) ? true : false, - 'repo' => GeneratePress_Site_Library_Helper::file_exists( 'https://api.wordpress.org/plugins/info/1.0/' . $basename ) ? true : false, - ); - } - - $data['plugin_data'] = $plugin_data; - } - } - - if ( GeneratePress_Site_Library_Helper::file_exists( $site_data['directory'] . '/content.xml' ) ) { - $data['content'] = true; - } else { - $data['content'] = false; - } - - if ( GeneratePress_Site_Library_Helper::file_exists( $site_data['directory'] . '/widgets.wie' ) ) { - $data['widgets'] = true; - } else { - $data['widgets'] = false; - } - - return $this->success( $data ); - } - - /** - * Export a group of assets. - * - * @param WP_REST_Request $request request object. - * - * @return mixed - */ - public function import_options( WP_REST_Request $request ) { - $site_data = $request->get_param( 'siteData' ); - - if ( ! GeneratePress_Site_Library_Helper::file_exists( $site_data['directory'] . '/options.json' ) ) { - return $this->failed( 'No theme options exist.' ); - } - - // Delete existing backup. - delete_option( '_generatepress_site_library_backup' ); - - // Backup options. - $backup_data = get_option( '_generatepress_site_library_backup', array() ); - - $theme_mods = GeneratePress_Site_Library_Helper::get_theme_mods(); - $settings = GeneratePress_Site_Library_Helper::get_theme_settings(); - - $data = array( - 'mods' => array(), - 'options' => array(), - ); - - foreach ( $theme_mods as $theme_mod ) { - $data['mods'][ $theme_mod ] = get_theme_mod( $theme_mod ); - } - - foreach ( $settings as $setting ) { - $data['options'][ $setting ] = get_option( $setting ); - } - - $backup_data['theme_options'] = $data; - - $modules = GeneratePress_Site_Library_Helper::premium_modules(); - - $active_modules = array(); - foreach ( $modules as $name => $key ) { - if ( 'activated' === get_option( $key ) ) { - $active_modules[ $name ] = $key; - } - } - - $backup_data['modules'] = $active_modules; - - $settings = GeneratePress_Site_Library_Helper::get_options( $site_data['directory'] . '/options.json' ); - - // Remove all existing theme options. - $option_keys = array( - 'generate_settings', - 'generate_background_settings', - 'generate_blog_settings', - 'generate_hooks', - 'generate_page_header_settings', - 'generate_secondary_nav_settings', - 'generate_spacing_settings', - 'generate_menu_plus_settings', - 'generate_woocommerce_settings', - ); - - foreach ( $option_keys as $key ) { - delete_option( $key ); - } - - // Need to backup these items before we remove all theme mods. - $backup_data['site_options']['nav_menu_locations'] = get_theme_mod( 'nav_menu_locations' ); - $backup_data['site_options']['custom_logo'] = get_theme_mod( 'custom_logo' ); - - // Remove existing theme mods. - remove_theme_mods(); - - // Remove existing activated premium modules. - $premium_modules = GeneratePress_Site_Library_Helper::premium_modules(); - - foreach ( $premium_modules as $name => $key ) { - delete_option( $key ); - } - - // Activate necessary modules. - foreach ( $settings['modules'] as $name => $key ) { - // Only allow valid premium modules. - if ( ! in_array( $key, $premium_modules ) ) { - GeneratePress_Site_Library_Helper::log( 'Bad premium module key: ' . $key ); - continue; - } - - update_option( $key, 'activated' ); - } - - // Set theme mods. - foreach ( $settings['mods'] as $key => $val ) { - // Only allow valid theme mods. - if ( ! in_array( $key, GeneratePress_Site_Library_Helper::get_theme_mods() ) ) { - GeneratePress_Site_Library_Helper::log( 'Bad theme mod key: ' . $key ); - continue; - } - - set_theme_mod( $key, $val ); - } - - // Set theme options. - foreach ( $settings['options'] as $key => $val ) { - // Only allow valid options. - if ( ! in_array( $key, GeneratePress_Site_Library_Helper::get_theme_settings() ) ) { - GeneratePress_Site_Library_Helper::log( 'Bad theme setting key: ' . $key ); - continue; - } - - if ( is_array( $val ) || is_object( $val ) ) { - foreach ( $val as $option_name => $option_value ) { - // Import any images. - if ( is_string( $option_value ) && preg_match( '/\.(jpg|jpeg|png|gif)/i', $option_value ) ) { - $data = GeneratePress_Site_Library_Helper::sideload_image( $option_value ); - - if ( ! is_wp_error( $data ) ) { - $val[ $option_name ] = $data->url; - } - } - - // Set these options if we import content. - unset( $val['hide_title'] ); - unset( $val['hide_tagline'] ); - unset( $val['logo_width'] ); - } - } - - update_option( $key, $val ); - } - - // Re-add non-theme option related theme mods. - set_theme_mod( 'nav_menu_locations', $backup_data['site_options']['nav_menu_locations'] ); - set_theme_mod( 'custom_logo', $backup_data['site_options']['custom_logo'] ); - - $existing_settings = get_option( 'generate_settings', array() ); - - if ( isset( $backup_data['theme_options']['options']['generate_settings']['hide_title'] ) ) { - $existing_settings['hide_title'] = $backup_data['theme_options']['options']['generate_settings']['hide_title']; - } - - if ( isset( $backup_data['theme_options']['options']['generate_settings']['hide_tagline'] ) ) { - $existing_settings['hide_tagline'] = $backup_data['theme_options']['options']['generate_settings']['hide_tagline']; - } - - if ( isset( $backup_data['theme_options']['options']['generate_settings']['logo_width'] ) ) { - $existing_settings['logo_width'] = $backup_data['theme_options']['options']['generate_settings']['logo_width']; - } - - update_option( 'generate_settings', $existing_settings ); - - // Remove dynamic CSS cache. - delete_option( 'generate_dynamic_css_output' ); - delete_option( 'generate_dynamic_css_cached_version' ); - - $dynamic_css_data = get_option( 'generatepress_dynamic_css_data', array() ); - - if ( isset( $dynamic_css_data['updated_time'] ) ) { - unset( $dynamic_css_data['updated_time'] ); - } - - update_option( 'generatepress_dynamic_css_data', $dynamic_css_data ); - - // Custom CSS. - $css = $settings['custom_css']; - $css = '/* GeneratePress Site CSS */ ' . $css . ' /* End GeneratePress Site CSS */'; - - $current_css = wp_get_custom_css_post(); - - if ( isset( $current_css->post_content ) ) { - $current_css->post_content = preg_replace( '#(/\\* GeneratePress Site CSS \\*/).*?(/\\* End GeneratePress Site CSS \\*/)#s', '', $current_css->post_content ); - $css = $current_css->post_content . $css; - } - - wp_update_custom_css_post( $css ); - - update_option( '_generatepress_site_library_backup', $backup_data ); - - return $this->success( __( 'Options imported', 'gp-premium' ) ); - } - - /** - * Export a group of assets. - * - * @param WP_REST_Request $request request object. - * - * @return mixed - */ - public function activate_plugins( WP_REST_Request $request ) { - $site_data = $request->get_param( 'siteData' ); - $settings = GeneratePress_Site_Library_Helper::get_options( $site_data['directory'] . '/options.json' ); - $plugins = $settings['plugins']; - - // Backup plugins. - $backup_data = get_option( '_generatepress_site_library_backup', array() ); - $backup_data['plugins'] = get_option( 'active_plugins', array() ); - update_option( '_generatepress_site_library_backup', $backup_data ); - - if ( ! empty( $plugins ) ) { - $pro_plugins = GeneratePress_Site_Library_Helper::check_for_pro_plugins(); - include_once ABSPATH . 'wp-admin/includes/plugin.php'; - - foreach ( $plugins as $plugin ) { - // If the plugin has a pro version and it exists, activate it instead. - if ( array_key_exists( $plugin, $pro_plugins ) ) { - if ( file_exists( WP_PLUGIN_DIR . '/' . $pro_plugins[ $plugin ] ) ) { - $plugin = $pro_plugins[ $plugin ]; - } - } - - // Install BB lite if pro doesn't exist. - if ( 'bb-plugin/fl-builder.php' === $plugin && ! file_exists( WP_PLUGIN_DIR . '/bb-plugin/fl-builder.php' ) ) { - $plugin = 'beaver-builder-lite-version/fl-builder.php'; - } - - if ( ! is_plugin_active( $plugin ) ) { - activate_plugin( $plugin, '', false, true ); - - if ( 'woocommerce/woocommerce.php' === $plugin ) { - add_option( 'generate_woocommerce_no_create_pages', true ); - } - } - } - - return $this->success( __( 'Plugins activated', 'gp-premium' ) ); - } - } - - /** - * Export a group of assets. - * - * @param WP_REST_Request $request request object. - * - * @return mixed - */ - public function import_content( WP_REST_Request $request ) { - $site_data = $request->get_param( 'siteData' ); - $site_slug = $request->get_param( 'siteSlug' ); - $import_options = $request->get_param( 'importOptions' ); - $import_content = $request->get_param( 'importContent' ); - - // Increase PHP max execution time. - set_time_limit( apply_filters( 'generate_sites_content_import_time_limit', 300 ) ); - - $xml_path = $site_data['directory'] . '/content.xml'; - $xml_file = GeneratePress_Site_Library_Helper::download_file( $xml_path ); - $xml_path = $xml_file['data']['file']; - - if ( ! $xml_path ) { - return $this->failed( 'No content found.' ); - } - - // Increase PHP max execution time. - set_time_limit( apply_filters( 'generate_sites_content_import_time_limit', 300 ) ); - - // Disable import of authors. - add_filter( 'wxr_importer.pre_process.user', '__return_false' ); - - // Keep track of our progress. - add_action( 'wxr_importer.processed.post', array( 'GeneratePress_Site_Library_Helper', 'track_post' ) ); - add_action( 'wxr_importer.processed.term', array( 'GeneratePress_Site_Library_Helper', 'track_term' ) ); - - // Disables generation of multiple image sizes (thumbnails) in the content import step. - if ( ! apply_filters( 'generate_sites_regen_thumbnails', true ) ) { - add_filter( 'intermediate_image_sizes_advanced', '__return_null' ); - } - - $backup_data = get_option( '_generatepress_site_library_backup', array() ); - $backup_data['content'] = true; - update_option( '_generatepress_site_library_backup', $backup_data ); - - GeneratePress_Site_Library_Helper::import_xml( $xml_path, $site_slug ); - - return $this->success( 'Content imported' ); - } - - /** - * Export a group of assets. - * - * @param WP_REST_Request $request request object. - * - * @return mixed - */ - public function import_site_options( WP_REST_Request $request ) { - $site_data = $request->get_param( 'siteData' ); - $site_slug = $request->get_param( 'siteSlug' ); - $backup_data = get_option( '_generatepress_site_library_backup', array() ); - - $settings = GeneratePress_Site_Library_Helper::get_options( $site_data['directory'] . '/options.json' ); - - foreach ( $settings['site_options'] as $key => $val ) { - switch ( $key ) { - case 'page_for_posts': - case 'page_on_front': - $backup_data['site_options'][ $key ] = get_option( $key ); - GeneratePress_Site_Library_Helper::set_reading_pages( $key, $val, $site_slug ); - break; - - case 'woocommerce_shop_page_id': - case 'woocommerce_cart_page_id': - case 'woocommerce_checkout_page_id': - case 'woocommerce_myaccount_page_id': - $backup_data['site_options'][ $key ] = get_option( $key ); - GeneratePress_Site_Library_Helper::set_woocommerce_pages( $key, $val, $site_slug ); - break; - - case 'nav_menu_locations': - if ( ! isset( $backup_data['site_options']['nav_menu_location'] ) ) { - $backup_data['site_options']['nav_menu_locations'] = get_theme_mod( 'nav_menu_locations' ); - } - - GeneratePress_Site_Library_Helper::set_nav_menu_locations( $val ); - break; - - case 'element_locations': - GeneratePress_Site_Library_Helper::set_element_locations( $val, $site_slug ); - break; - - case 'element_exclusions': - GeneratePress_Site_Library_Helper::set_element_exclusions( $val, $site_slug ); - break; - - case 'custom_logo': - if ( ! isset( $backup_data['site_options']['custom_logo'] ) ) { - $backup_data['site_options']['custom_logo'] = get_theme_mod( 'custom_logo' ); - } - - $data = GeneratePress_Site_Library_Helper::sideload_image( $val ); - - if ( ! is_wp_error( $data ) && isset( $data->attachment_id ) ) { - set_theme_mod( 'custom_logo', $data->attachment_id ); - update_post_meta( $data->attachment_id, '_wp_attachment_is_custom_header', get_option( 'stylesheet' ) ); - } else { - remove_theme_mod( 'custom_logo' ); - } - - break; - - default: - if ( in_array( $key, (array) GeneratePress_Site_Library_Helper::disallowed_options() ) ) { - GeneratePress_Site_Library_Helper::log( 'Disallowed option: ' . $key ); - } else { - $backup_data['site_options'][ $key ] = get_option( $key ); - delete_option( $key ); - update_option( $key, $val ); - } - break; - } - } - - // Set theme options. - $theme_settings = get_option( 'generate_settings', array() ); - $update_theme_settings = false; - - foreach ( $settings['options'] as $key => $val ) { - if ( 'generate_settings' !== $key ) { - continue; - } - - if ( is_array( $val ) || is_object( $val ) ) { - foreach ( $val as $option_name => $option_value ) { - if ( 'hide_title' === $option_name ) { - $theme_settings['hide_title'] = $option_value; - $update_theme_settings = true; - } - - if ( 'hide_tagline' === $option_name ) { - $theme_settings['hide_tagline'] = $option_value; - $update_theme_settings = true; - } - - if ( 'logo_width' === $option_name ) { - $theme_settings['logo_width'] = $option_value; - $update_theme_settings = true; - } - } - } - } - - if ( $update_theme_settings ) { - update_option( 'generate_settings', $theme_settings ); - - // Remove dynamic CSS cache. - delete_option( 'generate_dynamic_css_output' ); - delete_option( 'generate_dynamic_css_cached_version' ); - - $dynamic_css_data = get_option( 'generatepress_dynamic_css_data', array() ); - - if ( isset( $dynamic_css_data['updated_time'] ) ) { - unset( $dynamic_css_data['updated_time'] ); - } - - update_option( 'generatepress_dynamic_css_data', $dynamic_css_data ); - } - - // Set our backed up options. - update_option( '_generatepress_site_library_backup', $backup_data ); - - // Update any custom menu link URLs. - GeneratePress_Site_Library_Helper::update_menu_urls( $site_data['preview_url'] ); - - // Clear page builder cache. - GeneratePress_Site_Library_Helper::clear_page_builder_cache(); - - return $this->success( 'Site options imported' ); - } - - /** - * Export a group of assets. - * - * @param WP_REST_Request $request request object. - * - * @return mixed - */ - public function import_widgets( WP_REST_Request $request ) { - $site_data = $request->get_param( 'siteData' ); - - require_once GP_PREMIUM_DIR_PATH . 'site-library/classes/class-site-widget-importer.php'; - - $widgets_path = $site_data['directory'] . '/widgets.wie'; - - $wie_file = GeneratePress_Site_Library_Helper::download_file( $widgets_path ); - $wie_path = $wie_file['data']['file']; - - $data = implode( '', file( $wie_path ) ); - $data = json_decode( $data ); - - GeneratePress_Site_Library_Helper::clear_widgets(); - - add_filter( 'wie_widget_settings_array', array( 'GeneratePress_Site_Library_Helper', 'fix_custom_menu_widget_ids' ) ); - $widgets_importer = GeneratePress_Sites_Widget_Importer::instance(); - $widgets_importer->wie_import_data( $data ); - remove_filter( 'wie_widget_settings_array', array( 'GeneratePress_Site_Library_Helper', 'fix_custom_menu_widget_ids' ) ); - - return $this->success( 'Widgets imported' ); - } - - /** - * Restore our theme options. - */ - public function restore_theme_options() { - $backup_data = get_option( '_generatepress_site_library_backup', array() ); - - if ( ! empty( $backup_data ) ) { - if ( ! empty( $backup_data['theme_options']['mods'] ) ) { - remove_theme_mods(); - } - - if ( ! empty( $backup_data['theme_options']['options'] ) ) { - $option_keys = array( - 'generate_settings', - 'generate_background_settings', - 'generate_blog_settings', - 'generate_hooks', - 'generate_page_header_settings', - 'generate_secondary_nav_settings', - 'generate_spacing_settings', - 'generate_menu_plus_settings', - 'generate_woocommerce_settings', - ); - - foreach ( $option_keys as $key ) { - delete_option( $key ); - } - } - - if ( ! empty( $backup_data['modules'] ) ) { - $modules = GeneratePress_Site_Library_Helper::premium_modules(); - - foreach ( $modules as $name => $key ) { - delete_option( $key ); - } - - foreach ( (array) $backup_data['modules'] as $name => $key ) { - update_option( $key, 'activated' ); - } - } - - if ( ! empty( $backup_data['theme_options']['mods'] ) ) { - foreach ( $backup_data['theme_options']['mods'] as $key => $val ) { - // Only allow valid theme mods. - if ( ! in_array( $key, GeneratePress_Site_Library_Helper::get_theme_mods() ) ) { - GeneratePress_Site_Library_Helper::log( 'Bad theme mod key: ' . $key ); - continue; - } - - set_theme_mod( $key, $val ); - } - } - - if ( ! empty( $backup_data['theme_options']['options'] ) ) { - foreach ( $backup_data['theme_options']['options'] as $key => $val ) { - // Only allow valid options. - if ( ! in_array( $key, GeneratePress_Site_Library_Helper::get_theme_settings() ) ) { - GeneratePress_Site_Library_Helper::log( 'Bad theme setting key: ' . $key ); - continue; - } - - update_option( $key, $val ); - } - } - - // Re-add non-theme option related theme mods. - if ( isset( $backup_data['site_options']['nav_menu_locations'] ) ) { - set_theme_mod( 'nav_menu_locations', $backup_data['site_options']['nav_menu_locations'] ); - } - - if ( isset( $backup_data['site_options']['custom_logo'] ) ) { - set_theme_mod( 'custom_logo', $backup_data['site_options']['custom_logo'] ); - } - } - - return $this->success( __( 'Theme options restored.', 'gp-premium' ) ); - } - - /** - * Restore content. - */ - public function restore_content() { - $backup_data = get_option( '_generatepress_site_library_backup', array() ); - - // Plugins. - if ( ! empty( $backup_data['plugins'] ) && ! empty( $backup_data['site_options'] ) ) { - update_option( 'active_plugins', $backup_data['plugins'] ); - } - - // Content. - if ( ! empty( $backup_data ) ) { - global $wpdb; - $post_ids = $wpdb->get_col( "SELECT post_id FROM {$wpdb->postmeta} WHERE meta_key='_generatepress_sites_imported_post'" ); - $term_ids = $wpdb->get_col( "SELECT term_id FROM {$wpdb->termmeta} WHERE meta_key='_generatepress_sites_imported_term'" ); - - foreach ( $post_ids as $id ) { - wp_delete_post( $id, true ); - } - } - - // Site options. - if ( ! empty( $backup_data['site_options'] ) ) { - foreach ( $backup_data['site_options'] as $key => $val ) { - if ( in_array( $key, (array) GeneratePress_Site_Library_Helper::disallowed_options() ) ) { - GeneratePress_Site_Library_Helper::log( 'Disallowed option: ' . $key ); - continue; - } - - if ( 'nav_menu_locations' === $key || 'custom_logo' === $key ) { - set_theme_mod( $key, $val ); - } else { - if ( ! $val && ! is_numeric( $val ) ) { - delete_option( $key ); - } else { - update_option( $key, $val ); - } - } - } - } - - // Widgets. - if ( ! empty( $backup_data['widgets'] ) ) { - update_option( 'sidebars_widgets', $backup_data['widgets'] ); - } - - // CSS. - $current_css = wp_get_custom_css_post(); - - if ( isset( $current_css->post_content ) ) { - // Remove existing library CSS. - $current_css->post_content = preg_replace( '#(/\\* GeneratePress Site CSS \\*/).*?(/\\* End GeneratePress Site CSS \\*/)#s', '', $current_css->post_content ); - } - - wp_update_custom_css_post( $current_css->post_content ); - - // Clean up. - delete_option( 'generate_dynamic_css_output' ); - delete_option( 'generate_dynamic_css_cached_version' ); - delete_option( '_generatepress_site_library_backup' ); - - return $this->success( __( 'Content restored.', 'gp-premium' ) ); - } - - /** - * Success rest. - * - * @param mixed $response response data. - * @return mixed - */ - public function success( $response ) { - return new WP_REST_Response( - array( - 'success' => true, - 'response' => $response, - ), - 200 - ); - } - - /** - * Failed rest. - * - * @param mixed $response response data. - * @return mixed - */ - public function failed( $response ) { - return new WP_REST_Response( - array( - 'success' => false, - 'response' => $response, - ), - 200 - ); - } - - /** - * Error rest. - * - * @param mixed $code error code. - * @param mixed $response response data. - * @return mixed - */ - public function error( $code, $response ) { - return new WP_REST_Response( - array( - 'error' => true, - 'success' => false, - 'error_code' => $code, - 'response' => $response, - ), - 401 - ); - } -} - -GeneratePress_Site_Library_Rest::get_instance(); diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/site-library/class-site-library.php b/wp-content/upgrade-temp-backup/plugins/gp-premium/site-library/class-site-library.php deleted file mode 100644 index e29438c6..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/site-library/class-site-library.php +++ /dev/null @@ -1,412 +0,0 @@ -id ) { - $parent_file = 'themes.php'; // phpcs:ignore -- Override necessary. - $submenu_file = 'generate-options'; // phpcs:ignore -- Override necessary. - } - - remove_submenu_page( 'themes.php', 'generatepress-library' ); - } - - /** - * Add our scripts. - */ - public function enqueue_scripts() { - $screen = get_current_screen(); - - if ( 'appearance_page_generatepress-library' === $screen->id ) { - wp_enqueue_script( - 'generatepress-pro-site-library', - GP_PREMIUM_DIR_URL . 'dist/site-library.js', - array( 'wp-api', 'wp-i18n', 'wp-components', 'wp-element', 'wp-api-fetch', 'wp-util', 'wp-html-entities', 'updates' ), - GP_PREMIUM_VERSION, - true - ); - - if ( function_exists( 'wp_set_script_translations' ) ) { - wp_set_script_translations( 'generatepress-pro-site-library', 'gp-premium', GP_PREMIUM_DIR_PATH . 'langs' ); - } - - if ( function_exists( 'wp_get_upload_dir' ) ) { - $uploads_url = wp_get_upload_dir(); - } else { - $uploads_url = wp_upload_dir( null, false ); - } - - wp_localize_script( - 'generatepress-pro-site-library', - 'gppSiteLibrary', - array( - 'homeUrl' => esc_url( home_url() ), - 'hasBackup' => ! empty( get_option( '_generatepress_site_library_backup', array() ) ), - 'gppVersion' => GP_PREMIUM_VERSION, - 'gpVersion' => generate_premium_get_theme_version(), - 'generateblocksVersion' => defined( 'GENERATEBLOCKS_VERSION' ) ? GENERATEBLOCKS_VERSION : '', - 'elementorReplaceUrls' => esc_url( admin_url( 'admin.php?page=elementor-tools#tab-replace_url' ) ), - 'uploadsUrl' => $uploads_url['baseurl'], - 'isDebugEnabled' => defined( 'WP_DEBUG' ) && true === WP_DEBUG, - ) - ); - - wp_enqueue_style( - 'generatepress-pro-site-library', - GP_PREMIUM_DIR_URL . 'dist/site-library.css', - array( 'wp-components' ), - GP_PREMIUM_VERSION - ); - - if ( ! class_exists( 'GeneratePress_Dashboard' ) ) { - wp_enqueue_style( - 'generate-premium-dashboard', - GP_PREMIUM_DIR_URL . 'inc/legacy/assets/dashboard.css', - array(), - GP_PREMIUM_VERSION - ); - } - } - } - - /** - * Add our page. - */ - public function library_page() { - if ( ! class_exists( 'GeneratePress_Dashboard' ) ) : - ?> -
          -
          -
          - -
          - - -
          -
          - - -
          - __( 'Site Library', 'gp-premium' ), - 'url' => admin_url( 'themes.php?page=generatepress-library' ), - 'class' => 'appearance_page_generatepress-library' === $screen->id ? 'active' : '', - ); - - return $tabs; - } - - /** - * Tell GeneratePress this is an admin page. - * - * @param array $screens Existing screens. - */ - public function add_dashboard_screen( $screens ) { - $screens[] = 'appearance_page_generatepress-library'; - - return $screens; - } - - /** - * Add our GeneratePress Site export checkbox to the Export module. - */ - public function add_export_checkbox() { - if ( ! apply_filters( 'generate_show_generatepress_site_export_option', false ) ) { - return; - } - ?> -
          - - - $key ) { - if ( 'activated' === get_option( $key ) ) { - $data['modules'][ $name ] = $key; - } - } - - // Site options. - $data['site_options']['nav_menu_locations'] = get_theme_mod( 'nav_menu_locations' ); - $data['site_options']['custom_logo'] = wp_get_attachment_url( get_theme_mod( 'custom_logo' ) ); - $data['site_options']['show_on_front'] = get_option( 'show_on_front' ); - $data['site_options']['page_on_front'] = get_option( 'page_on_front' ); - $data['site_options']['page_for_posts'] = get_option( 'page_for_posts' ); - - // Elements. - $data['site_options']['element_locations'] = $this->get_elements_locations(); - $data['site_options']['element_exclusions'] = $this->get_elements_exclusions(); - - // Custom CSS. - if ( function_exists( 'wp_get_custom_css_post' ) ) { - $data['custom_css'] = wp_get_custom_css_post()->post_content; - } - - // WooCommerce. - if ( is_plugin_active( 'woocommerce/woocommerce.php' ) ) { - $data['site_options']['woocommerce_shop_page_id'] = get_option( 'woocommerce_shop_page_id' ); - $data['site_options']['woocommerce_cart_page_id'] = get_option( 'woocommerce_cart_page_id' ); - $data['site_options']['woocommerce_checkout_page_id'] = get_option( 'woocommerce_checkout_page_id' ); - $data['site_options']['woocommerce_myaccount_page_id'] = get_option( 'woocommerce_myaccount_page_id' ); - $data['site_options']['woocommerce_single_image_width'] = get_option( 'woocommerce_single_image_width' ); - $data['site_options']['woocommerce_thumbnail_image_width'] = get_option( 'woocommerce_thumbnail_image_width' ); - $data['site_options']['woocommerce_thumbnail_cropping'] = get_option( 'woocommerce_thumbnail_cropping' ); - $data['site_options']['woocommerce_shop_page_display'] = get_option( 'woocommerce_shop_page_display' ); - $data['site_options']['woocommerce_category_archive_display'] = get_option( 'woocommerce_category_archive_display' ); - $data['site_options']['woocommerce_default_catalog_orderby'] = get_option( 'woocommerce_default_catalog_orderby' ); - } - - // Elementor. - if ( is_plugin_active( 'elementor/elementor.php' ) ) { - $data['site_options']['elementor_container_width'] = get_option( 'elementor_container_width' ); - $data['site_options']['elementor_cpt_support'] = get_option( 'elementor_cpt_support' ); - $data['site_options']['elementor_css_print_method'] = get_option( 'elementor_css_print_method' ); - $data['site_options']['elementor_default_generic_fonts'] = get_option( 'elementor_default_generic_fonts' ); - $data['site_options']['elementor_disable_color_schemes'] = get_option( 'elementor_disable_color_schemes' ); - $data['site_options']['elementor_disable_typography_schemes'] = get_option( 'elementor_disable_typography_schemes' ); - $data['site_options']['elementor_editor_break_lines'] = get_option( 'elementor_editor_break_lines' ); - $data['site_options']['elementor_exclude_user_roles'] = get_option( 'elementor_exclude_user_roles' ); - $data['site_options']['elementor_global_image_lightbox'] = get_option( 'elementor_global_image_lightbox' ); - $data['site_options']['elementor_page_title_selector'] = get_option( 'elementor_page_title_selector' ); - $data['site_options']['elementor_scheme_color'] = get_option( 'elementor_scheme_color' ); - $data['site_options']['elementor_scheme_color-picker'] = get_option( 'elementor_scheme_color-picker' ); - $data['site_options']['elementor_scheme_typography'] = get_option( 'elementor_scheme_typography' ); - $data['site_options']['elementor_space_between_widgets'] = get_option( 'elementor_space_between_widgets' ); - $data['site_options']['elementor_stretched_section_container'] = get_option( 'elementor_stretched_section_container' ); - $data['site_options']['elementor_load_fa4_shim'] = get_option( 'elementor_load_fa4_shim' ); - $data['site_options']['elementor_active_kit'] = get_option( 'elementor_active_kit' ); - } - - // Beaver Builder. - if ( is_plugin_active( 'beaver-builder-lite-version/fl-builder.php' ) || is_plugin_active( 'bb-plugin/fl-builder.php' ) ) { - $data['site_options']['_fl_builder_enabled_icons'] = get_option( '_fl_builder_enabled_icons' ); - $data['site_options']['_fl_builder_enabled_modules'] = get_option( '_fl_builder_enabled_modules' ); - $data['site_options']['_fl_builder_post_types'] = get_option( '_fl_builder_post_types' ); - $data['site_options']['_fl_builder_color_presets'] = get_option( '_fl_builder_color_presets' ); - $data['site_options']['_fl_builder_services'] = get_option( '_fl_builder_services' ); - $data['site_options']['_fl_builder_settings'] = get_option( '_fl_builder_settings' ); - $data['site_options']['_fl_builder_user_access'] = get_option( '_fl_builder_user_access' ); - $data['site_options']['_fl_builder_enabled_templates'] = get_option( '_fl_builder_enabled_templates' ); - } - - // Menu Icons. - if ( is_plugin_active( 'menu-icons/menu-icons.php' ) ) { - $data['site_options']['menu-icons'] = get_option( 'menu-icons' ); - } - - // Ninja Forms. - if ( is_plugin_active( 'ninja-forms/ninja-forms.php' ) ) { - $data['site_options']['ninja_forms_settings'] = get_option( 'ninja_forms_settings' ); - } - - // Social Warfare. - if ( is_plugin_active( 'social-warfare/social-warfare.php' ) ) { - $data['site_options']['socialWarfareOptions'] = get_option( 'socialWarfareOptions' ); - } - - // Elements Plus. - if ( is_plugin_active( 'elements-plus/elements-plus.php' ) ) { - $data['site_options']['elements_plus_settings'] = get_option( 'elements_plus_settings' ); - } - - // Ank Google Map. - if ( is_plugin_active( 'ank-google-map/ank-google-map.php' ) ) { - $data['site_options']['ank_google_map'] = get_option( 'ank_google_map' ); - } - - // GP Social Share. - if ( is_plugin_active( 'gp-social-share-svg/gp-social-share.php' ) ) { - $data['site_options']['gp_social_settings'] = get_option( 'gp_social_settings' ); - } - - // Active plugins. - $active_plugins = get_option( 'active_plugins' ); - $all_plugins = get_plugins(); - - $ignore = apply_filters( - 'generate_sites_ignore_plugins', - array( - 'gp-premium/gp-premium.php', - 'widget-importer-exporter/widget-importer-exporter.php', - ) - ); - - foreach ( $ignore as $plugin ) { - unset( $all_plugins[ $plugin ] ); - } - - $activated_plugins = array(); - - foreach ( $active_plugins as $p ) { - if ( isset( $all_plugins[ $p ] ) ) { - $activated_plugins[ $all_plugins[ $p ]['Name'] ] = $p; - } - } - - $data['plugins'] = $activated_plugins; - - return $data; - - } - - /** - * Get our Element display locations. - * - * @return array - */ - public function get_elements_locations() { - $args = array( - 'post_type' => 'gp_elements', - 'showposts' => -1, - ); - - $posts = get_posts( $args ); - $new_values = array(); - - foreach ( $posts as $post ) { - $display_conditions = get_post_meta( $post->ID, '_generate_element_display_conditions', true ); - - if ( $display_conditions ) { - $new_values[ $post->ID ] = $display_conditions; - } - } - - return $new_values; - } - - /** - * Get our Element display locations. - * - * @return array - */ - public function get_elements_exclusions() { - $args = array( - 'post_type' => 'gp_elements', - 'showposts' => -1, - ); - - $posts = get_posts( $args ); - $new_values = array(); - - foreach ( $posts as $post ) { - $display_conditions = get_post_meta( $post->ID, '_generate_element_exclude_conditions', true ); - - if ( $display_conditions ) { - $new_values[ $post->ID ] = $display_conditions; - } - } - - return $new_values; - } -} - -GeneratePress_Site_Library::get_instance(); diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/site-library/classes/class-beaver-builder-batch-processing.php b/wp-content/upgrade-temp-backup/plugins/gp-premium/site-library/classes/class-beaver-builder-batch-processing.php deleted file mode 100644 index 6ec1cbdc..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/site-library/classes/class-beaver-builder-batch-processing.php +++ /dev/null @@ -1,163 +0,0 @@ -image_importer = new GeneratePress_Sites_Image_Importer(); - } - - /** - * Import - * - * @since 1.6 - * @return void - */ - public function import() { - GeneratePress_Site_Library_Helper::log( '== Start Processing Beaver Builder Images ==' ); - - $post_ids = GeneratePress_Site_Library_Helper::get_all_posts(); - - if ( is_array( $post_ids ) ) { - foreach ( $post_ids as $post_id ) { - $this->import_single_post( $post_id ); - } - } - } - - /** - * Update post meta. - * - * @param integer $post_id Post ID. - * @return void - */ - public function import_single_post( $post_id = 0 ) { - - if ( ! empty( $post_id ) ) { - - // Get page builder data. - $data = get_post_meta( $post_id, '_fl_builder_data', true ); - - if ( ! empty( $data ) ) { - foreach ( $data as $key => $el ) { - // Import background images. - if ( 'row' === $el->type || 'column' === $el->type ) { - $data[ $key ]->settings = $this->import_background_images( $el->settings ); - } - - // Import module images. - if ( 'module' === $el->type ) { - $data[ $key ]->settings = $this->import_module_images( $el->settings ); - } - } - - // Update page builder data. - update_post_meta( $post_id, '_fl_builder_data', $data ); - update_post_meta( $post_id, '_fl_builder_draft', $data ); - - // Clear all cache. - FLBuilderModel::delete_asset_cache_for_all_posts(); - } - } - } - - /** - * Import Module Images. - * - * @param object $settings Module settings object. - * @return object - */ - public function import_module_images( $settings ) { - - /** - * 1) Set photos. - */ - $settings = $this->import_photo( $settings ); - - /** - * 2) Set `$settings->data` for Only type 'image-icon' - * - * @todo Remove the condition `'image-icon' === $settings->type` if `$settings->data` is used only for the Image Icon. - */ - if ( isset( $settings->data ) && isset( $settings->photo ) && ! empty( $settings->photo ) && 'image-icon' === $settings->type ) { - $settings->data = FLBuilderPhoto::get_attachment_data( $settings->photo ); - } - - /** - * 3) Set `list item` module images - */ - if ( isset( $settings->add_list_item ) ) { - foreach ( $settings->add_list_item as $key => $value ) { - $settings->add_list_item[ $key ] = $this->import_photo( $value ); - } - } - - return $settings; - } - - /** - * Helper: Import BG Images. - * - * @param object $settings Row settings object. - * @return object - */ - public function import_background_images( $settings ) { - - if ( ! empty( $settings->bg_image ) && ! empty( $settings->bg_image_src ) ) { - $image = array( - 'url' => $settings->bg_image_src, - 'id' => $settings->bg_image, - ); - - $downloaded_image = $this->image_importer->import( $image ); - - $settings->bg_image_src = $downloaded_image['url']; - $settings->bg_image = $downloaded_image['id']; - } - - return $settings; - } - - /** - * Helper: Import Photo. - * - * @param object $settings Row settings object. - * @return object - */ - public function import_photo( $settings ) { - - if ( ! empty( $settings->photo ) && ! empty( $settings->photo_src ) ) { - $image = array( - 'url' => $settings->photo_src, - 'id' => $settings->photo, - ); - - $downloaded_image = $this->image_importer->import( $image ); - - $settings->photo_src = $downloaded_image['url']; - $settings->photo = $downloaded_image['id']; - } - - return $settings; - } - - -} diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/site-library/classes/class-content-importer.php b/wp-content/upgrade-temp-backup/plugins/gp-premium/site-library/classes/class-content-importer.php deleted file mode 100644 index f2198499..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/site-library/classes/class-content-importer.php +++ /dev/null @@ -1,49 +0,0 @@ -mapping['user_slug'][ $current_user_obj->user_login ] = $current_user_obj->ID; - } - - /** - * Get all protected variables from the WXR_Importer needed for continuing the import. - */ - public function get_importer_data() { - return array( - 'mapping' => $this->mapping, - ); - } - - /** - * Sets all protected variables from the WXR_Importer needed for continuing the import. - * - * @param array $data with set variables. - */ - public function set_importer_data( $data ) { - // phpcs:ignore -- Commented out code for now. - // $this->mapping = empty( $data['mapping'] ) ? array() : $data['mapping']; - // $this->requires_remapping = empty( $data['requires_remapping'] ) ? array() : $data['requires_remapping']; - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/site-library/classes/class-site-import-image.php b/wp-content/upgrade-temp-backup/plugins/gp-premium/site-library/classes/class-site-import-image.php deleted file mode 100644 index bd8226fe..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/site-library/classes/class-site-import-image.php +++ /dev/null @@ -1,200 +0,0 @@ - $attachment ) { - $downloaded_images[] = $this->import( $attachment ); - } - - return $downloaded_images; - } - - /** - * Get Hash Image. - * - * @since 1.6 - * @param string $attachment_url Attachment URL. - * @return string Hash string. - */ - private function get_hash_image( $attachment_url ) { - return sha1( $attachment_url ); - } - - /** - * Get Saved Image. - * - * @since 1.6 - * @param string $attachment Attachment Data. - * @return string Hash string. - */ - private function get_saved_image( $attachment ) { - - global $wpdb; - - // Already imported? Then return! - if ( isset( $this->already_imported_ids[ $attachment['id'] ] ) ) { - GeneratePress_Site_Library_Helper::log( 'Successfully replaced: ' . $attachment['url'] ); - - return $this->already_imported_ids[ $attachment['id'] ]; - } - - // 1. Is already imported in Batch Import Process? - $post_id = $wpdb->get_var( - $wpdb->prepare( - 'SELECT `post_id` FROM `' . $wpdb->postmeta . '` - WHERE `meta_key` = \'_generatepress_sites_image_hash\' - AND `meta_value` = %s - ;', - $this->get_hash_image( $attachment['url'] ) - ) - ); - - // 2. Is image already imported though XML? - if ( empty( $post_id ) ) { - // Get file name without extension. - // To check it exist in attachment. - $filename = preg_replace( '/\\.[^.\\s]{3,4}$/', '', basename( $attachment['url'] ) ); - - $post_id = $wpdb->get_var( - $wpdb->prepare( - 'SELECT `post_id` FROM `' . $wpdb->postmeta . '` - WHERE `meta_key` = \'_wp_attached_file\' - AND `meta_value` LIKE %s - ;', - '%' . $filename . '%' - ) - ); - - GeneratePress_Site_Library_Helper::log( 'Successfully replaced: ' . $attachment['url'] ); - } - - if ( $post_id ) { - $new_attachment = array( - 'id' => $post_id, - 'url' => wp_get_attachment_url( $post_id ), - ); - - $this->already_imported_ids[ $attachment['id'] ] = $new_attachment; - - return $new_attachment; - } - - return false; - } - - /** - * Import Image - * - * @since 1.6 - * @param array $attachment Attachment array. - * @return array Attachment array. - */ - public function import( $attachment ) { - - $saved_image = $this->get_saved_image( $attachment ); - - if ( $saved_image ) { - return $saved_image; - } - - $file_content = wp_remote_retrieve_body( wp_safe_remote_get( $attachment['url'] ) ); - - // Empty file content? - if ( empty( $file_content ) ) { - GeneratePress_Site_Library_Helper::log( 'Failed to replace: ' . $attachment['url'] ); - GeneratePress_Site_Library_Helper::log( 'Error: Failed wp_remote_retrieve_body().' ); - - return $attachment; - } - - // Extract the file name and extension from the URL. - $filename = basename( $attachment['url'] ); - - $upload = wp_upload_bits( - $filename, - null, - $file_content - ); - - $post = array( - 'post_title' => $filename, - 'guid' => $upload['url'], - ); - - $info = wp_check_filetype( $upload['file'] ); - - if ( $info ) { - $post['post_mime_type'] = $info['type']; - } else { - // For now just return the origin attachment. - return $attachment; - } - - $post_id = wp_insert_attachment( $post, $upload['file'] ); - - wp_update_attachment_metadata( - $post_id, - wp_generate_attachment_metadata( $post_id, $upload['file'] ) - ); - - update_post_meta( $post_id, '_generatepress_sites_image_hash', $this->get_hash_image( $attachment['url'] ) ); - - $new_attachment = array( - 'id' => $post_id, - 'url' => $upload['url'], - ); - - GeneratePress_Site_Library_Helper::log( 'Successfully replaced: ' . $attachment['url'] ); - - $this->already_imported_ids[ $attachment['id'] ] = $new_attachment; - - return $new_attachment; - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/site-library/classes/class-site-widget-importer.php b/wp-content/upgrade-temp-backup/plugins/gp-premium/site-library/classes/class-site-widget-importer.php deleted file mode 100644 index ed1b611a..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/site-library/classes/class-site-widget-importer.php +++ /dev/null @@ -1,275 +0,0 @@ - true, - ) - ); - } - - // Hook before import. - do_action( 'wie_before_import' ); // phpcs:ignore -- Keep the plugin prefix. - - $data = apply_filters( 'wie_import_data', $data ); // phpcs:ignore -- Keep the plugin prefix. - - // Get all available widgets site supports. - $available_widgets = $this->wie_available_widgets(); - - // Get all existing widget instances. - $widget_instances = array(); - - foreach ( $available_widgets as $widget_data ) { - $widget_instances[ $widget_data['id_base'] ] = get_option( 'widget_' . $widget_data['id_base'] ); - } - - // Begin results. - $results = array(); - - // Loop import data's sidebars. - foreach ( $data as $sidebar_id => $widgets ) { - // Skip inactive widgets (should not be in export file). - if ( 'wp_inactive_widgets' === $sidebar_id ) { - continue; - } - - // Check if sidebar is available on this site. - // Otherwise add widgets to inactive, and say so. - if ( isset( $wp_registered_sidebars[ $sidebar_id ] ) ) { - $sidebar_available = true; - $use_sidebar_id = $sidebar_id; - $sidebar_message_type = 'success'; - $sidebar_message = ''; - } else { - $sidebar_available = false; - $use_sidebar_id = 'wp_inactive_widgets'; // Add to inactive if sidebar does not exist in theme. - $sidebar_message_type = 'error'; - $sidebar_message = esc_html__( 'Widget area does not exist in theme (using Inactive)', 'widget-importer-exporter' ); - } - - // Result for sidebar - // Sidebar name if theme supports it; otherwise ID. - $results[ $sidebar_id ]['name'] = ! empty( $wp_registered_sidebars[ $sidebar_id ]['name'] ) ? $wp_registered_sidebars[ $sidebar_id ]['name'] : $sidebar_id; - $results[ $sidebar_id ]['message_type'] = $sidebar_message_type; - $results[ $sidebar_id ]['message'] = $sidebar_message; - $results[ $sidebar_id ]['widgets'] = array(); - - // Loop widgets. - foreach ( $widgets as $widget_instance_id => $widget ) { - $fail = false; - - // Get id_base (remove -# from end) and instance ID number. - $id_base = preg_replace( '/-[0-9]+$/', '', $widget_instance_id ); - $instance_id_number = str_replace( $id_base . '-', '', $widget_instance_id ); - - // Does site support this widget? - if ( ! $fail && ! isset( $available_widgets[ $id_base ] ) ) { - $fail = true; - $widget_message_type = 'error'; - $widget_message = esc_html__( 'Site does not support widget', 'widget-importer-exporter' ); // Explain why widget not imported. - } - - // Filter to modify settings object before conversion to array and import - // Leave this filter here for backwards compatibility with manipulating objects (before conversion to array below) - // Ideally the newer wie_widget_settings_array below will be used instead of this. - $widget = apply_filters( 'wie_widget_settings', $widget ); // phpcs:ignore -- Keep the plugin prefix. - - // Convert multidimensional objects to multidimensional arrays - // Some plugins like Jetpack Widget Visibility store settings as multidimensional arrays - // Without this, they are imported as objects and cause fatal error on Widgets page - // If this creates problems for plugins that do actually intend settings in objects then may need to consider other approach: https://wordpress.org/support/topic/problem-with-array-of-arrays - // It is probably much more likely that arrays are used than objects, however. - $widget = json_decode( wp_json_encode( $widget ), true ); - - // Filter to modify settings array - // This is preferred over the older wie_widget_settings filter above - // Do before identical check because changes may make it identical to end result (such as URL replacements). - $widget = apply_filters( 'wie_widget_settings_array', $widget ); // phpcs:ignore -- Keep the plugin prefix. - - // Does widget with identical settings already exist in same sidebar? - if ( ! $fail && isset( $widget_instances[ $id_base ] ) ) { - // Get existing widgets in this sidebar. - $sidebars_widgets = get_option( 'sidebars_widgets' ); - $sidebar_widgets = isset( $sidebars_widgets[ $use_sidebar_id ] ) ? $sidebars_widgets[ $use_sidebar_id ] : array(); // Check Inactive if that's where will go. - - // Loop widgets with ID base. - $single_widget_instances = ! empty( $widget_instances[ $id_base ] ) ? $widget_instances[ $id_base ] : array(); - - foreach ( $single_widget_instances as $check_id => $check_widget ) { - // Is widget in same sidebar and has identical settings? - if ( in_array( "$id_base-$check_id", $sidebar_widgets, true ) && (array) $widget === $check_widget ) { - $fail = true; - $widget_message_type = 'warning'; - // Explain why widget not imported. - $widget_message = esc_html__( 'Widget already exists', 'widget-importer-exporter' ); - break; - } - } - } - - // No failure. - if ( ! $fail ) { - // Add widget instance. - $single_widget_instances = get_option( 'widget_' . $id_base ); // All instances for that widget ID base, get fresh every time. - - $single_widget_instances = ! empty( $single_widget_instances ) ? $single_widget_instances : array( - '_multiwidget' => 1, // Start fresh if have to. - ); - - $single_widget_instances[] = $widget; // Add it. - - // Get the key it was given. - end( $single_widget_instances ); - - $new_instance_id_number = key( $single_widget_instances ); - - // If key is 0, make it 1 - // When 0, an issue can occur where adding a widget causes data from other widget to load, - // and the widget doesn't stick (reload wipes it). - if ( '0' === strval( $new_instance_id_number ) ) { - $new_instance_id_number = 1; - $single_widget_instances[ $new_instance_id_number ] = $single_widget_instances[0]; - unset( $single_widget_instances[0] ); - } - - // Move _multiwidget to end of array for uniformity. - if ( isset( $single_widget_instances['_multiwidget'] ) ) { - $multiwidget = $single_widget_instances['_multiwidget']; - unset( $single_widget_instances['_multiwidget'] ); - $single_widget_instances['_multiwidget'] = $multiwidget; - } - - // Update option with new widget. - update_option( 'widget_' . $id_base, $single_widget_instances ); - - // Assign widget instance to sidebar. - // Which sidebars have which widgets, get fresh every time. - $sidebars_widgets = get_option( 'sidebars_widgets' ); - - // Avoid rarely fatal error when the option is an empty string - // https://github.com/stevengliebe/widget-importer-exporter/pull/11. - if ( ! $sidebars_widgets ) { - $sidebars_widgets = array(); - } - - // Use ID number from new widget instance. - $new_instance_id = $id_base . '-' . $new_instance_id_number; - - // Add new instance to sidebar. - $sidebars_widgets[ $use_sidebar_id ][] = $new_instance_id; - - // Save the amended data. - update_option( 'sidebars_widgets', $sidebars_widgets ); - - // After widget import action. - $after_widget_import = array( - 'sidebar' => $use_sidebar_id, - 'sidebar_old' => $sidebar_id, - 'widget' => $widget, - 'widget_type' => $id_base, - 'widget_id' => $new_instance_id, - 'widget_id_old' => $widget_instance_id, - 'widget_id_num' => $new_instance_id_number, - 'widget_id_num_old' => $instance_id_number, - ); - - do_action( 'wie_after_widget_import', $after_widget_import ); // phpcs:ignore -- Keep the plugin prefix. - - // Success message. - if ( $sidebar_available ) { - $widget_message_type = 'success'; - $widget_message = esc_html__( 'Imported', 'widget-importer-exporter' ); - } else { - $widget_message_type = 'warning'; - $widget_message = esc_html__( 'Imported to Inactive', 'widget-importer-exporter' ); - } - } - - // Result for widget instance. - $results[ $sidebar_id ]['widgets'][ $widget_instance_id ]['name'] = isset( $available_widgets[ $id_base ]['name'] ) ? $available_widgets[ $id_base ]['name'] : $id_base; // Widget name or ID if name not available (not supported by site). - $results[ $sidebar_id ]['widgets'][ $widget_instance_id ]['title'] = ! empty( $widget['title'] ) ? $widget['title'] : esc_html__( 'No Title', 'widget-importer-exporter' ); // Show "No Title" if widget instance is untitled. - $results[ $sidebar_id ]['widgets'][ $widget_instance_id ]['message_type'] = $widget_message_type; - $results[ $sidebar_id ]['widgets'][ $widget_instance_id ]['message'] = $widget_message; - } - } - - // Hook after import. - do_action( 'wie_after_import' ); // phpcs:ignore -- Keep the plugin prefix. - - // Return results. - return apply_filters( 'wie_import_results', $results ); // phpcs:ignore -- Keep the plugin prefix. - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/site-library/libs/wxr-importer/WPImporterLogger.php b/wp-content/upgrade-temp-backup/plugins/gp-premium/site-library/libs/wxr-importer/WPImporterLogger.php deleted file mode 100644 index 08183915..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/site-library/libs/wxr-importer/WPImporterLogger.php +++ /dev/null @@ -1,138 +0,0 @@ -log( 'emergency', $message, $context ); - } - - /** - * Action must be taken immediately. - * - * Example: Entire website down, database unavailable, etc. This should - * trigger the SMS alerts and wake you up. - * - * @param string $message - * @param array $context - * @return null - */ - public function alert( $message, array $context = array() ) { - return $this->log( 'alert', $message, $context ); - } - - /** - * Critical conditions. - * - * Example: Application component unavailable, unexpected exception. - * - * @param string $message - * @param array $context - * @return null - */ - public function critical( $message, array $context = array() ) { - return $this->log( 'critical', $message, $context ); - } - - /** - * Runtime errors that do not require immediate action but should typically - * be logged and monitored. - * - * @param string $message - * @param array $context - * @return null - */ - public function error( $message, array $context = array()) { - return $this->log( 'error', $message, $context ); - } - - /** - * Exceptional occurrences that are not errors. - * - * Example: Use of deprecated APIs, poor use of an API, undesirable things - * that are not necessarily wrong. - * - * @param string $message - * @param array $context - * @return null - */ - public function warning( $message, array $context = array() ) { - return $this->log( 'warning', $message, $context ); - } - - /** - * Normal but significant events. - * - * @param string $message - * @param array $context - * @return null - */ - public function notice( $message, array $context = array() ) { - return $this->log( 'notice', $message, $context ); - } - - /** - * Interesting events. - * - * Example: User logs in, SQL logs. - * - * @param string $message - * @param array $context - * @return null - */ - public function info( $message, array $context = array() ) { - return $this->log( 'info', $message, $context ); - } - - /** - * Detailed debug information. - * - * @param string $message - * @param array $context - * @return null - */ - public function debug( $message, array $context = array() ) { - return $this->log( 'debug', $message, $context ); - } - - /** - * Logs with an arbitrary level. - * - * @param mixed $level - * @param string $message - * @param array $context - * @return null - */ - public function log( $level, $message, array $context = array() ) { - $this->messages[] = array( - 'timestamp' => time(), - 'level' => $level, - 'message' => $message, - 'context' => $context, - ); - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/site-library/libs/wxr-importer/WXRImportInfo.php b/wp-content/upgrade-temp-backup/plugins/gp-premium/site-library/libs/wxr-importer/WXRImportInfo.php deleted file mode 100644 index a7e75aa0..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/site-library/libs/wxr-importer/WXRImportInfo.php +++ /dev/null @@ -1,16 +0,0 @@ -` tag at the start of the file. - * - * @var string - */ - protected $version = '1.0'; - - // information to import from WXR file - protected $categories = array(); - protected $tags = array(); - protected $base_url = ''; - - // TODO: REMOVE THESE - protected $processed_terms = array(); - protected $processed_posts = array(); - protected $processed_menu_items = array(); - protected $menu_item_orphans = array(); - protected $missing_menu_items = array(); - - // NEW STYLE - protected $mapping = array(); - protected $requires_remapping = array(); - protected $exists = array(); - protected $user_slug_override = array(); - - protected $url_remap = array(); - protected $featured_images = array(); - - /** - * Logger instance. - * - * @var WP_Importer_Logger - */ - protected $logger; - - /** - * Constructor - * - * @param array $options { - * @var bool $prefill_existing_posts Should we prefill `post_exists` calls? (True prefills and uses more memory, false checks once per imported post and takes longer. Default is true.) - * @var bool $prefill_existing_comments Should we prefill `comment_exists` calls? (True prefills and uses more memory, false checks once per imported comment and takes longer. Default is true.) - * @var bool $prefill_existing_terms Should we prefill `term_exists` calls? (True prefills and uses more memory, false checks once per imported term and takes longer. Default is true.) - * @var bool $update_attachment_guids Should attachment GUIDs be updated to the new URL? (True updates the GUID, which keeps compatibility with v1, false doesn't update, and allows deduplication and reimporting. Default is false.) - * @var bool $fetch_attachments Fetch attachments from the remote server. (True fetches and creates attachment posts, false skips attachments. Default is false.) - * @var bool $aggressive_url_search Should we search/replace for URLs aggressively? (True searches all posts' content for old URLs and replaces, false checks for `` only. Default is false.) - * @var int $default_author User ID to use if author is missing or invalid. (Default is null, which leaves posts unassigned.) - * } - */ - public function __construct( $options = array() ) { - // Initialize some important variables - $empty_types = array( - 'post' => array(), - 'comment' => array(), - 'term' => array(), - 'user' => array(), - ); - - $this->mapping = $empty_types; - $this->mapping['user_slug'] = array(); - $this->mapping['term_id'] = array(); - $this->requires_remapping = $empty_types; - $this->exists = $empty_types; - - $this->options = wp_parse_args( $options, array( - 'prefill_existing_posts' => true, - 'prefill_existing_comments' => true, - 'prefill_existing_terms' => true, - 'update_attachment_guids' => false, - 'fetch_attachments' => false, - 'aggressive_url_search' => false, - 'default_author' => null, - ) ); - } - - public function set_logger( $logger ) { - $this->logger = $logger; - } - - /** - * Get a stream reader for the file. - * - * @param string $file Path to the XML file. - * @return XMLReader|WP_Error Reader instance on success, error otherwise. - */ - protected function get_reader( $file ) { - // Avoid loading external entities for security - $old_value = null; - if ( function_exists( 'libxml_disable_entity_loader' ) ) { - // $old_value = libxml_disable_entity_loader( true ); - } - - $reader = new \XMLReader(); - $status = $reader->open( $file ); - - if ( ! is_null( $old_value ) ) { - // libxml_disable_entity_loader( $old_value ); - } - - if ( ! $status ) { - return new \WP_Error( 'wxr_importer.cannot_parse', __( 'Could not open the file for parsing', 'wordpress-importer' ) ); - } - - return $reader; - } - - /** - * The main controller for the actual import stage. - * - * @param string $file Path to the WXR file for importing - */ - public function get_preliminary_information( $file ) { - // Let's run the actual importer now, woot - $reader = $this->get_reader( $file ); - if ( is_wp_error( $reader ) ) { - return $reader; - } - - // Set the version to compatibility mode first - $this->version = '1.0'; - - // Start parsing! - $data = new WXRImportInfo(); - while ( $reader->read() ) { - // Only deal with element opens - if ( $reader->nodeType !== \XMLReader::ELEMENT ) { - continue; - } - - switch ( $reader->name ) { - case 'wp:wxr_version': - // Upgrade to the correct version - $this->version = $reader->readString(); - - if ( version_compare( $this->version, self::MAX_WXR_VERSION, '>' ) ) { - $this->logger->warning( sprintf( - __( 'This WXR file (version %s) is newer than the importer (version %s) and may not be supported. Please consider updating.', 'wordpress-importer' ), - $this->version, - self::MAX_WXR_VERSION - ) ); - } - - // Handled everything in this node, move on to the next - $reader->next(); - break; - - case 'generator': - $data->generator = $reader->readString(); - $reader->next(); - break; - - case 'title': - $data->title = $reader->readString(); - $reader->next(); - break; - - case 'wp:base_site_url': - $data->siteurl = $reader->readString(); - $reader->next(); - break; - - case 'wp:base_blog_url': - $data->home = $reader->readString(); - $reader->next(); - break; - - case 'wp:author': - $node = $reader->expand(); - - $parsed = $this->parse_author_node( $node ); - if ( is_wp_error( $parsed ) ) { - $this->log_error( $parsed ); - - // Skip the rest of this post - $reader->next(); - break; - } - - $data->users[] = $parsed; - - // Handled everything in this node, move on to the next - $reader->next(); - break; - - case 'item': - $node = $reader->expand(); - $parsed = $this->parse_post_node( $node ); - if ( is_wp_error( $parsed ) ) { - $this->log_error( $parsed ); - - // Skip the rest of this post - $reader->next(); - break; - } - - if ( $parsed['data']['post_type'] === 'attachment' ) { - $data->media_count++; - } else { - $data->post_count++; - } - $data->comment_count += count( $parsed['comments'] ); - - // Handled everything in this node, move on to the next - $reader->next(); - break; - - case 'wp:category': - case 'wp:tag': - case 'wp:term': - $data->term_count++; - - // Handled everything in this node, move on to the next - $reader->next(); - break; - } - } - - $data->version = $this->version; - - return $data; - } - - /** - * The main controller for the actual import stage. - * - * @param string $file Path to the WXR file for importing - */ - public function parse_authors( $file ) { - // Let's run the actual importer now, woot - $reader = $this->get_reader( $file ); - if ( is_wp_error( $reader ) ) { - return $reader; - } - - // Set the version to compatibility mode first - $this->version = '1.0'; - - // Start parsing! - $authors = array(); - while ( $reader->read() ) { - // Only deal with element opens - if ( $reader->nodeType !== \XMLReader::ELEMENT ) { - continue; - } - - switch ( $reader->name ) { - case 'wp:wxr_version': - // Upgrade to the correct version - $this->version = $reader->readString(); - - if ( version_compare( $this->version, self::MAX_WXR_VERSION, '>' ) ) { - $this->logger->warning( sprintf( - __( 'This WXR file (version %s) is newer than the importer (version %s) and may not be supported. Please consider updating.', 'wordpress-importer' ), - $this->version, - self::MAX_WXR_VERSION - ) ); - } - - // Handled everything in this node, move on to the next - $reader->next(); - break; - - case 'wp:author': - $node = $reader->expand(); - - $parsed = $this->parse_author_node( $node ); - if ( is_wp_error( $parsed ) ) { - $this->log_error( $parsed ); - - // Skip the rest of this post - $reader->next(); - break; - } - - $authors[] = $parsed; - - // Handled everything in this node, move on to the next - $reader->next(); - break; - } - } - - return $authors; - } - - /** - * The main controller for the actual import stage. - * - * @param string $file Path to the WXR file for importing - */ - public function import( $file ) { - add_filter( 'import_post_meta_key', array( $this, 'is_valid_meta_key' ) ); - add_filter( 'http_request_timeout', array( &$this, 'bump_request_timeout' ) ); - - /* - * Elementor fix for excessive use of `wp_slash` after our update v3.0.2. - * Method in Elementor: \Elementor\Compatibility::register_actions - * https://wordpress.org/support/topic/version-2-6-0-breaks-every-elementor-theme/ - * - * This can be removed after Elementor skips the functionality in above method if our plugin is in use. - */ - if ( method_exists( '\Elementor\Compatibility', 'on_wxr_importer_pre_process_post_meta' ) ) { - remove_action( 'wxr_importer.pre_process.post_meta', array( 'Elementor\Compatibility', 'on_wxr_importer_pre_process_post_meta' ) ); - } - - $result = $this->import_start( $file ); - if ( is_wp_error( $result ) ) { - return $result; - } - - // Let's run the actual importer now, woot - $reader = $this->get_reader( $file ); - if ( is_wp_error( $reader ) ) { - return $reader; - } - - // Set the version to compatibility mode first - $this->version = '1.0'; - - // Reset other variables - $this->base_url = ''; - - // Start parsing! - while ( $reader->read() ) { - // Only deal with element opens - if ( $reader->nodeType !== \XMLReader::ELEMENT ) { - continue; - } - - switch ( $reader->name ) { - case 'wp:wxr_version': - // Upgrade to the correct version - $this->version = $reader->readString(); - - if ( version_compare( $this->version, self::MAX_WXR_VERSION, '>' ) ) { - $this->logger->warning( sprintf( - __( 'This WXR file (version %s) is newer than the importer (version %s) and may not be supported. Please consider updating.', 'wordpress-importer' ), - $this->version, - self::MAX_WXR_VERSION - ) ); - } - - // Handled everything in this node, move on to the next - $reader->next(); - break; - - case 'wp:base_site_url': - $this->base_url = $reader->readString(); - - // Handled everything in this node, move on to the next - $reader->next(); - break; - - case 'item': - $node = $reader->expand(); - $parsed = $this->parse_post_node( $node ); - if ( is_wp_error( $parsed ) ) { - $this->log_error( $parsed ); - - // Skip the rest of this post - $reader->next(); - break; - } - - $this->process_post( $parsed['data'], $parsed['meta'], $parsed['comments'], $parsed['terms'] ); - - // Handled everything in this node, move on to the next - $reader->next(); - break; - - case 'wp:author': - $node = $reader->expand(); - - $parsed = $this->parse_author_node( $node ); - if ( is_wp_error( $parsed ) ) { - $this->log_error( $parsed ); - - // Skip the rest of this post - $reader->next(); - break; - } - - $status = $this->process_author( $parsed['data'], $parsed['meta'] ); - if ( is_wp_error( $status ) ) { - $this->log_error( $status ); - } - - // Handled everything in this node, move on to the next - $reader->next(); - break; - - case 'wp:category': - $node = $reader->expand(); - - $parsed = $this->parse_term_node( $node, 'category' ); - if ( is_wp_error( $parsed ) ) { - $this->log_error( $parsed ); - - // Skip the rest of this post - $reader->next(); - break; - } - - $status = $this->process_term( $parsed['data'], $parsed['meta'] ); - - // Handled everything in this node, move on to the next - $reader->next(); - break; - - case 'wp:tag': - $node = $reader->expand(); - - $parsed = $this->parse_term_node( $node, 'tag' ); - if ( is_wp_error( $parsed ) ) { - $this->log_error( $parsed ); - - // Skip the rest of this post - $reader->next(); - break; - } - - $status = $this->process_term( $parsed['data'], $parsed['meta'] ); - - // Handled everything in this node, move on to the next - $reader->next(); - break; - - case 'wp:term': - $node = $reader->expand(); - - $parsed = $this->parse_term_node( $node ); - if ( is_wp_error( $parsed ) ) { - $this->log_error( $parsed ); - - // Skip the rest of this post - $reader->next(); - break; - } - - $status = $this->process_term( $parsed['data'], $parsed['meta'] ); - - // Handled everything in this node, move on to the next - $reader->next(); - break; - - default: - // Skip this node, probably handled by something already - break; - } - } - - // Now that we've done the main processing, do any required - // post-processing and remapping. - $this->post_process(); - - if ( $this->options['aggressive_url_search'] ) { - $this->replace_attachment_urls_in_content(); - } - - $this->remap_featured_images(); - - $this->import_end(); - } - - /** - * Log an error instance to the logger. - * - * @param WP_Error $error Error instance to log. - */ - protected function log_error( WP_Error $error ) { - $this->logger->warning( $error->get_error_message() ); - - // Log the data as debug info too - $data = $error->get_error_data(); - if ( ! empty( $data ) ) { - $this->logger->debug( var_export( $data, true ) ); - } - } - - /** - * Parses the WXR file and prepares us for the task of processing parsed data - * - * @param string $file Path to the WXR file for importing - */ - protected function import_start( $file ) { - if ( ! is_file( $file ) ) { - return new \WP_Error( 'wxr_importer.file_missing', __( 'The file does not exist, please try again.', 'wordpress-importer' ) ); - } - - // Suspend bunches of stuff in WP core - wp_defer_term_counting( true ); - wp_defer_comment_counting( true ); - wp_suspend_cache_invalidation( true ); - - // Prefill exists calls if told to - if ( $this->options['prefill_existing_posts'] ) { - $this->prefill_existing_posts(); - } - if ( $this->options['prefill_existing_comments'] ) { - $this->prefill_existing_comments(); - } - if ( $this->options['prefill_existing_terms'] ) { - $this->prefill_existing_terms(); - } - - /** - * Begin the import. - * - * Fires before the import process has begun. If you need to suspend - * caching or heavy processing on hooks, do so here. - */ - do_action( 'generate_import_start' ); - } - - /** - * Performs post-import cleanup of files and the cache - */ - protected function import_end() { - // Re-enable stuff in core - wp_suspend_cache_invalidation( false ); - wp_cache_flush(); - foreach ( get_taxonomies() as $tax ) { - delete_option( "{$tax}_children" ); - _get_term_hierarchy( $tax ); - } - - wp_defer_term_counting( false ); - wp_defer_comment_counting( false ); - - /** - * Complete the import. - * - * Fires after the import process has finished. If you need to update - * your cache or re-enable processing, do so here. - */ - do_action( 'generate_import_end' ); - } - - /** - * Set the user mapping. - * - * @param array $mapping List of map arrays (containing `old_slug`, `old_id`, `new_id`) - */ - public function set_user_mapping( $mapping ) { - foreach ( $mapping as $map ) { - if ( empty( $map['old_slug'] ) || empty( $map['old_id'] ) || empty( $map['new_id'] ) ) { - $this->logger->warning( __( 'Invalid author mapping', 'wordpress-importer' ) ); - $this->logger->debug( var_export( $map, true ) ); - continue; - } - - $old_slug = $map['old_slug']; - $old_id = $map['old_id']; - $new_id = $map['new_id']; - - $this->mapping['user'][ $old_id ] = $new_id; - $this->mapping['user_slug'][ $old_slug ] = $new_id; - } - } - - /** - * Set the user slug overrides. - * - * Allows overriding the slug in the import with a custom/renamed version. - * - * @param string[] $overrides Map of old slug to new slug. - */ - public function set_user_slug_overrides( $overrides ) { - foreach ( $overrides as $original => $renamed ) { - $this->user_slug_override[ $original ] = $renamed; - } - } - - /** - * Parse a post node into post data. - * - * @param DOMElement $node Parent node of post data (typically `item`). - * @return array|WP_Error Post data array on success, error otherwise. - */ - protected function parse_post_node( $node ) { - $data = array(); - $meta = array(); - $comments = array(); - $terms = array(); - - foreach ( $node->childNodes as $child ) { - // We only care about child elements - if ( $child->nodeType !== XML_ELEMENT_NODE ) { - continue; - } - - switch ( $child->tagName ) { - case 'wp:post_type': - $data['post_type'] = $child->textContent; - break; - - case 'title': - $data['post_title'] = $child->textContent; - break; - - case 'guid': - $data['guid'] = $child->textContent; - break; - - case 'dc:creator': - $data['post_author'] = $child->textContent; - break; - - case 'content:encoded': - $data['post_content'] = $child->textContent; - break; - - case 'excerpt:encoded': - $data['post_excerpt'] = $child->textContent; - break; - - case 'wp:post_id': - $data['post_id'] = $child->textContent; - break; - - case 'wp:post_date': - $data['post_date'] = $child->textContent; - break; - - case 'wp:post_date_gmt': - $data['post_date_gmt'] = $child->textContent; - break; - - case 'wp:comment_status': - $data['comment_status'] = $child->textContent; - break; - - case 'wp:ping_status': - $data['ping_status'] = $child->textContent; - break; - - case 'wp:post_name': - $data['post_name'] = $child->textContent; - break; - - case 'wp:status': - $data['post_status'] = $child->textContent; - - if ( $data['post_status'] === 'auto-draft' ) { - // Bail now - return new \WP_Error( - 'wxr_importer.post.cannot_import_draft', - __( 'Cannot import auto-draft posts' ), - $data - ); - } - break; - - case 'wp:post_parent': - $data['post_parent'] = $child->textContent; - break; - - case 'wp:menu_order': - $data['menu_order'] = $child->textContent; - break; - - case 'wp:post_password': - $data['post_password'] = $child->textContent; - break; - - case 'wp:is_sticky': - $data['is_sticky'] = $child->textContent; - break; - - case 'wp:attachment_url': - $data['attachment_url'] = $child->textContent; - break; - - case 'wp:postmeta': - $meta_item = $this->parse_meta_node( $child ); - if ( ! empty( $meta_item ) ) { - $meta[] = $meta_item; - } - break; - - case 'wp:comment': - $comment_item = $this->parse_comment_node( $child ); - if ( ! empty( $comment_item ) ) { - $comments[] = $comment_item; - } - break; - - case 'category': - $term_item = $this->parse_category_node( $child ); - if ( ! empty( $term_item ) ) { - $terms[] = $term_item; - } - break; - } - } - - return compact( 'data', 'meta', 'comments', 'terms' ); - } - - /** - * Create new posts based on import information - * - * Posts marked as having a parent which doesn't exist will become top level items. - * Doesn't create a new post if: the post type doesn't exist, the given post ID - * is already noted as imported or a post with the same title and date already exists. - * Note that new/updated terms, comments and meta are imported for the last of the above. - */ - protected function process_post( $data, $meta, $comments, $terms ) { - /** - * Pre-process post data. - * - * @param array $data Post data. (Return empty to skip.) - * @param array $meta Meta data. - * @param array $comments Comments on the post. - * @param array $terms Terms on the post. - */ - $data = apply_filters( 'wxr_importer.pre_process.post', $data, $meta, $comments, $terms ); - if ( empty( $data ) ) { - return false; - } - - $original_id = isset( $data['post_id'] ) ? (int) $data['post_id'] : 0; - $parent_id = isset( $data['post_parent'] ) ? (int) $data['post_parent'] : 0; - $author_id = isset( $data['post_author'] ) ? (int) $data['post_author'] : 0; - - // Have we already processed this? - if ( isset( $this->mapping['post'][ $original_id ] ) ) { - return; - } - - $post_type_object = get_post_type_object( $data['post_type'] ); - - // Is this type even valid? - if ( ! $post_type_object ) { - $this->logger->warning( sprintf( - __( 'Failed to import "%s": Invalid post type %s', 'wordpress-importer' ), - $data['post_title'], - $data['post_type'] - ) ); - return false; - } - - $post_exists = $this->post_exists( $data ); - if ( $post_exists ) { - $this->logger->info( sprintf( - __( '%s "%s" already exists.', 'wordpress-importer' ), - $post_type_object->labels->singular_name, - $data['post_title'] - ) ); - - /** - * Post processing already imported. - * - * @param array $data Raw data imported for the post. - */ - do_action( 'wxr_importer.process_already_imported.post', $data ); - - // Even though this post already exists, new comments might need importing - $this->process_comments( $comments, $original_id, $data, $post_exists ); - - return false; - } - - // Map the parent post, or mark it as one we need to fix - $requires_remapping = false; - if ( $parent_id ) { - if ( isset( $this->mapping['post'][ $parent_id ] ) ) { - $data['post_parent'] = $this->mapping['post'][ $parent_id ]; - } else { - $meta[] = array( 'key' => '_wxr_import_parent', 'value' => $parent_id ); - $requires_remapping = true; - - $data['post_parent'] = 0; - } - } - - // Map the author, or mark it as one we need to fix - $author = sanitize_user( $data['post_author'], true ); - if ( empty( $author ) ) { - // Missing or invalid author, use default if available. - $data['post_author'] = $this->options['default_author']; - } elseif ( isset( $this->mapping['user_slug'][ $author ] ) ) { - $data['post_author'] = $this->mapping['user_slug'][ $author ]; - } else { - $meta[] = array( 'key' => '_wxr_import_user_slug', 'value' => $author ); - $requires_remapping = true; - - $data['post_author'] = (int) get_current_user_id(); - } - - // Does the post look like it contains attachment images? - if ( preg_match( self::REGEX_HAS_ATTACHMENT_REFS, $data['post_content'] ) ) { - $meta[] = array( 'key' => '_wxr_import_has_attachment_refs', 'value' => true ); - $requires_remapping = true; - } - - // Whitelist to just the keys we allow - $postdata = array( - 'import_id' => $data['post_id'], - ); - $allowed = array( - 'post_author' => true, - 'post_date' => true, - 'post_date_gmt' => true, - 'post_content' => true, - 'post_excerpt' => true, - 'post_title' => true, - 'post_status' => true, - 'post_name' => true, - 'comment_status' => true, - 'ping_status' => true, - 'guid' => true, - 'post_parent' => true, - 'menu_order' => true, - 'post_type' => true, - 'post_password' => true, - ); - foreach ( $data as $key => $value ) { - if ( ! isset( $allowed[ $key ] ) ) { - continue; - } - - $postdata[ $key ] = $data[ $key ]; - } - - $postdata = apply_filters( 'wp_import_post_data_processed', wp_slash( $postdata ), $data ); - - if ( 'attachment' === $postdata['post_type'] ) { - if ( ! $this->options['fetch_attachments'] ) { - $this->logger->notice( sprintf( - __( 'Skipping attachment "%s", fetching attachments disabled' ), - $data['post_title'] - ) ); - /** - * Post processing skipped. - * - * @param array $data Raw data imported for the post. - * @param array $meta Raw meta data, already processed by {@see process_post_meta}. - */ - do_action( 'wxr_importer.process_skipped.post', $data, $meta ); - return false; - } - $remote_url = ! empty( $data['attachment_url'] ) ? $data['attachment_url'] : $data['guid']; - $post_id = $this->process_attachment( $postdata, $meta, $remote_url ); - } else { - $post_id = wp_insert_post( $postdata, true ); - do_action( 'wp_import_insert_post', $post_id, $original_id, $postdata, $data ); - } - - if ( is_wp_error( $post_id ) ) { - $this->logger->error( sprintf( - __( 'Failed to import "%s" (%s)', 'wordpress-importer' ), - $data['post_title'], - $post_type_object->labels->singular_name - ) ); - $this->logger->debug( $post_id->get_error_message() ); - - /** - * Post processing failed. - * - * @param WP_Error $post_id Error object. - * @param array $data Raw data imported for the post. - * @param array $meta Raw meta data, already processed by {@see process_post_meta}. - * @param array $comments Raw comment data, already processed by {@see process_comments}. - * @param array $terms Raw term data, already processed. - */ - do_action( 'wxr_importer.process_failed.post', $post_id, $data, $meta, $comments, $terms ); - return false; - } - - // Ensure stickiness is handled correctly too - if ( $data['is_sticky'] === '1' ) { - stick_post( $post_id ); - } - - // map pre-import ID to local ID - $this->mapping['post'][ $original_id ] = (int) $post_id; - if ( $requires_remapping ) { - $this->requires_remapping['post'][ $post_id ] = true; - } - $this->mark_post_exists( $data, $post_id ); - - $this->logger->info( sprintf( - __( 'Imported "%s" (%s)', 'wordpress-importer' ), - $data['post_title'], - $post_type_object->labels->singular_name - ) ); - $this->logger->debug( sprintf( - __( 'Post %d remapped to %d', 'wordpress-importer' ), - $original_id, - $post_id - ) ); - - // Handle the terms too - $terms = apply_filters( 'wp_import_post_terms', $terms, $post_id, $data ); - - if ( ! empty( $terms ) ) { - $term_ids = array(); - foreach ( $terms as $term ) { - $taxonomy = $term['taxonomy']; - $key = sha1( $taxonomy . ':' . $term['slug'] ); - - if ( isset( $this->mapping['term'][ $key ] ) ) { - $term_ids[ $taxonomy ][] = (int) $this->mapping['term'][ $key ]; - } else { - $meta[] = array( 'key' => '_wxr_import_term', 'value' => $term ); - $requires_remapping = true; - } - } - - foreach ( $term_ids as $tax => $ids ) { - $tt_ids = wp_set_post_terms( $post_id, $ids, $tax ); - do_action( 'wp_import_set_post_terms', $tt_ids, $ids, $tax, $post_id, $data ); - } - } - - $this->process_comments( $comments, $post_id, $data ); - $this->process_post_meta( $meta, $post_id, $data ); - - if ( 'nav_menu_item' === $data['post_type'] ) { - $this->process_menu_item_meta( $post_id, $data, $meta ); - } - - /** - * Post processing completed. - * - * @param int $post_id New post ID. - * @param array $data Raw data imported for the post. - * @param array $meta Raw meta data, already processed by {@see process_post_meta}. - * @param array $comments Raw comment data, already processed by {@see process_comments}. - * @param array $terms Raw term data, already processed. - */ - do_action( 'wxr_importer.processed.post', $post_id, $data, $meta, $comments, $terms ); - } - - /** - * Attempt to create a new menu item from import data - * - * Fails for draft, orphaned menu items and those without an associated nav_menu - * or an invalid nav_menu term. If the post type or term object which the menu item - * represents doesn't exist then the menu item will not be imported (waits until the - * end of the import to retry again before discarding). - * - * @param array $item Menu item details from WXR file - */ - protected function process_menu_item_meta( $post_id, $data, $meta ) { - - $item_type = get_post_meta( $post_id, '_menu_item_type', true ); - $original_object_id = get_post_meta( $post_id, '_menu_item_object_id', true ); - $object_id = null; - - $this->logger->debug( sprintf( 'Processing menu item %s', $item_type ) ); - - $requires_remapping = false; - switch ( $item_type ) { - case 'taxonomy': - if ( isset( $this->mapping['term_id'][ $original_object_id ] ) ) { - $object_id = $this->mapping['term_id'][ $original_object_id ]; - } else { - add_post_meta( $post_id, '_wxr_import_menu_item', wp_slash( $original_object_id ) ); - $requires_remapping = true; - } - break; - - case 'post_type': - if ( isset( $this->mapping['post'][ $original_object_id ] ) ) { - $object_id = $this->mapping['post'][ $original_object_id ]; - } else { - add_post_meta( $post_id, '_wxr_import_menu_item', wp_slash( $original_object_id ) ); - $requires_remapping = true; - } - break; - - case 'custom': - // Custom refers to itself, wonderfully easy. - $object_id = $post_id; - break; - - default: - // associated object is missing or not imported yet, we'll retry later - $this->missing_menu_items[] = $item; - $this->logger->debug( 'Unknown menu item type' ); - break; - } - - if ( $requires_remapping ) { - $this->requires_remapping['post'][ $post_id ] = true; - } - - if ( empty( $object_id ) ) { - // Nothing needed here. - return; - } - - $this->logger->debug( sprintf( 'Menu item %d mapped to %d', $original_object_id, $object_id ) ); - update_post_meta( $post_id, '_menu_item_object_id', wp_slash( $object_id ) ); - } - - /** - * If fetching attachments is enabled then attempt to create a new attachment - * - * @param array $post Attachment post details from WXR - * @param string $url URL to fetch attachment from - * @return int|WP_Error Post ID on success, WP_Error otherwise - */ - protected function process_attachment( $post, $meta, $remote_url ) { - // try to use _wp_attached file for upload folder placement to ensure the same location as the export site - // e.g. location is 2003/05/image.jpg but the attachment post_date is 2010/09, see media_handle_upload() - $post['upload_date'] = $post['post_date']; - foreach ( $meta as $meta_item ) { - if ( $meta_item['key'] !== '_wp_attached_file' ) { - continue; - } - - if ( preg_match( '%^[0-9]{4}/[0-9]{2}%', $meta_item['value'], $matches ) ) { - $post['upload_date'] = $matches[0]; - } - break; - } - - // if the URL is absolute, but does not contain address, then upload it assuming base_site_url - if ( preg_match( '|^/[\w\W]+$|', $remote_url ) ) { - $remote_url = rtrim( $this->base_url, '/' ) . $remote_url; - } - - $upload = $this->fetch_remote_file( $remote_url, $post ); - if ( is_wp_error( $upload ) ) { - return $upload; - } - - $info = wp_check_filetype( $upload['file'] ); - if ( ! $info ) { - return new \WP_Error( 'attachment_processing_error', __( 'Invalid file type', 'wordpress-importer' ) ); - } - - $post['post_mime_type'] = $info['type']; - - // WP really likes using the GUID for display. Allow updating it. - // See https://core.trac.wordpress.org/ticket/33386 - if ( $this->options['update_attachment_guids'] ) { - $post['guid'] = $upload['url']; - } - - // as per wp-admin/includes/upload.php - $post_id = wp_insert_attachment( $post, $upload['file'] ); - if ( is_wp_error( $post_id ) ) { - return $post_id; - } - - $attachment_metadata = wp_generate_attachment_metadata( $post_id, $upload['file'] ); - wp_update_attachment_metadata( $post_id, $attachment_metadata ); - - // Map this image URL later if we need to - $this->url_remap[ $remote_url ] = $upload['url']; - - // If we have a HTTPS URL, ensure the HTTP URL gets replaced too - if ( substr( $remote_url, 0, 8 ) === 'https://' ) { - $insecure_url = 'http' . substr( $remote_url, 5 ); - $this->url_remap[ $insecure_url ] = $upload['url']; - } - - if ( $this->options['aggressive_url_search'] ) { - // remap resized image URLs, works by stripping the extension and remapping the URL stub. - /*if ( preg_match( '!^image/!', $info['type'] ) ) { - $parts = pathinfo( $remote_url ); - $name = basename( $parts['basename'], ".{$parts['extension']}" ); // PATHINFO_FILENAME in PHP 5.2 - - $parts_new = pathinfo( $upload['url'] ); - $name_new = basename( $parts_new['basename'], ".{$parts_new['extension']}" ); - - $this->url_remap[$parts['dirname'] . '/' . $name] = $parts_new['dirname'] . '/' . $name_new; - }*/ - } - - return $post_id; - } - - /** - * Parse a meta node into meta data. - * - * @param DOMElement $node Parent node of meta data (typically `wp:postmeta` or `wp:commentmeta`). - * @return array|null Meta data array on success, or null on error. - */ - protected function parse_meta_node( $node ) { - foreach ( $node->childNodes as $child ) { - // We only care about child elements - if ( $child->nodeType !== XML_ELEMENT_NODE ) { - continue; - } - - switch ( $child->tagName ) { - case 'wp:meta_key': - $key = $child->textContent; - break; - - case 'wp:meta_value': - $value = $child->textContent; - break; - } - } - - if ( empty( $key ) || empty( $value ) ) { - return null; - } - - return compact( 'key', 'value' ); - } - - /** - * Process and import post meta items. - * - * @param array $meta List of meta data arrays - * @param int $post_id Post to associate with - * @param array $post Post data - * @return int|WP_Error Number of meta items imported on success, error otherwise. - */ - protected function process_post_meta( $meta, $post_id, $post ) { - if ( empty( $meta ) ) { - return true; - } - - foreach ( $meta as $meta_item ) { - /** - * Pre-process post meta data. - * - * @param array $meta_item Meta data. (Return empty to skip.) - * @param int $post_id Post the meta is attached to. - */ - $meta_item = apply_filters( 'wxr_importer.pre_process.post_meta', $meta_item, $post_id ); - if ( empty( $meta_item ) ) { - return false; - } - - $key = apply_filters( 'import_post_meta_key', $meta_item['key'], $post_id, $post ); - $value = false; - - if ( '_edit_last' === $key ) { - $value = intval( $meta_item['value'] ); - if ( ! isset( $this->mapping['user'][ $value ] ) ) { - // Skip! - continue; - } - - $value = $this->mapping['user'][ $value ]; - } - - if ( $key ) { - // export gets meta straight from the DB so could have a serialized string - if ( ! $value ) { - $value = maybe_unserialize( $meta_item['value'] ); - } - - if ( function_exists( 'wp_slash_strings_only' ) ) { - add_post_meta( $post_id, wp_slash( $key ), wp_slash_strings_only( $value ) ); - } else { - add_post_meta( $post_id, $key, $value ); - } - - do_action( 'import_post_meta', $post_id, $key, $value ); - - // if the post has a featured image, take note of this in case of remap - if ( '_thumbnail_id' === $key ) { - $this->featured_images[ $post_id ] = (int) $value; - } - } - } - - return true; - } - - /** - * Parse a comment node into comment data. - * - * @param DOMElement $node Parent node of comment data (typically `wp:comment`). - * @return array Comment data array. - */ - protected function parse_comment_node( $node ) { - $data = array( - 'commentmeta' => array(), - ); - - foreach ( $node->childNodes as $child ) { - // We only care about child elements - if ( $child->nodeType !== XML_ELEMENT_NODE ) { - continue; - } - - switch ( $child->tagName ) { - case 'wp:comment_id': - $data['comment_id'] = $child->textContent; - break; - case 'wp:comment_author': - $data['comment_author'] = $child->textContent; - break; - - case 'wp:comment_author_email': - $data['comment_author_email'] = $child->textContent; - break; - - case 'wp:comment_author_IP': - $data['comment_author_IP'] = $child->textContent; - break; - - case 'wp:comment_author_url': - $data['comment_author_url'] = $child->textContent; - break; - - case 'wp:comment_user_id': - $data['comment_user_id'] = $child->textContent; - break; - - case 'wp:comment_date': - $data['comment_date'] = $child->textContent; - break; - - case 'wp:comment_date_gmt': - $data['comment_date_gmt'] = $child->textContent; - break; - - case 'wp:comment_content': - $data['comment_content'] = $child->textContent; - break; - - case 'wp:comment_approved': - $data['comment_approved'] = $child->textContent; - break; - - case 'wp:comment_type': - $data['comment_type'] = $child->textContent; - break; - - case 'wp:comment_parent': - $data['comment_parent'] = $child->textContent; - break; - - case 'wp:commentmeta': - $meta_item = $this->parse_meta_node( $child ); - if ( ! empty( $meta_item ) ) { - $data['commentmeta'][] = $meta_item; - } - break; - } - } - - return $data; - } - - /** - * Process and import comment data. - * - * @param array $comments List of comment data arrays. - * @param int $post_id Post to associate with. - * @param array $post Post data. - * @return int|WP_Error Number of comments imported on success, error otherwise. - */ - protected function process_comments( $comments, $post_id, $post, $post_exists = false ) { - - $comments = apply_filters( 'wp_import_post_comments', $comments, $post_id, $post ); - if ( empty( $comments ) ) { - return 0; - } - - $num_comments = 0; - - // Sort by ID to avoid excessive remapping later - usort( $comments, array( $this, 'sort_comments_by_id' ) ); - - foreach ( $comments as $key => $comment ) { - /** - * Pre-process comment data - * - * @param array $comment Comment data. (Return empty to skip.) - * @param int $post_id Post the comment is attached to. - */ - $comment = apply_filters( 'wxr_importer.pre_process.comment', $comment, $post_id ); - if ( empty( $comment ) ) { - return false; - } - - $original_id = isset( $comment['comment_id'] ) ? (int) $comment['comment_id'] : 0; - $parent_id = isset( $comment['comment_parent'] ) ? (int) $comment['comment_parent'] : 0; - $author_id = isset( $comment['comment_user_id'] ) ? (int) $comment['comment_user_id'] : 0; - - // if this is a new post we can skip the comment_exists() check - // TODO: Check comment_exists for performance - if ( $post_exists ) { - $existing = $this->comment_exists( $comment ); - if ( $existing ) { - - /** - * Comment processing already imported. - * - * @param array $comment Raw data imported for the comment. - */ - do_action( 'wxr_importer.process_already_imported.comment', $comment ); - - $this->mapping['comment'][ $original_id ] = $existing; - continue; - } - } - - // Remove meta from the main array - $meta = isset( $comment['commentmeta'] ) ? $comment['commentmeta'] : array(); - unset( $comment['commentmeta'] ); - - // Map the parent comment, or mark it as one we need to fix - $requires_remapping = false; - if ( $parent_id ) { - if ( isset( $this->mapping['comment'][ $parent_id ] ) ) { - $comment['comment_parent'] = $this->mapping['comment'][ $parent_id ]; - } else { - // Prepare for remapping later - $meta[] = array( 'key' => '_wxr_import_parent', 'value' => $parent_id ); - $requires_remapping = true; - - // Wipe the parent for now - $comment['comment_parent'] = 0; - } - } - - // Map the author, or mark it as one we need to fix - if ( $author_id ) { - if ( isset( $this->mapping['user'][ $author_id ] ) ) { - $comment['user_id'] = $this->mapping['user'][ $author_id ]; - } else { - // Prepare for remapping later - $meta[] = array( 'key' => '_wxr_import_user', 'value' => $author_id ); - $requires_remapping = true; - - // Wipe the user for now - $comment['user_id'] = 0; - } - } - - // Run standard core filters - $comment['comment_post_ID'] = $post_id; - $comment = wp_filter_comment( $comment ); - - // wp_insert_comment expects slashed data - $comment_id = wp_insert_comment( wp_slash( $comment ) ); - $this->mapping['comment'][ $original_id ] = $comment_id; - if ( $requires_remapping ) { - $this->requires_remapping['comment'][ $comment_id ] = true; - } - $this->mark_comment_exists( $comment, $comment_id ); - - /** - * Comment has been imported. - * - * @param int $comment_id New comment ID - * @param array $comment Comment inserted (`comment_id` item refers to the original ID) - * @param int $post_id Post parent of the comment - * @param array $post Post data - */ - do_action( 'wp_import_insert_comment', $comment_id, $comment, $post_id, $post ); - - // Process the meta items - foreach ( $meta as $meta_item ) { - $value = maybe_unserialize( $meta_item['value'] ); - add_comment_meta( $comment_id, wp_slash( $meta_item['key'] ), wp_slash( $value ) ); - } - - /** - * Post processing completed. - * - * @param int $post_id New post ID. - * @param array $comment Raw data imported for the comment. - * @param array $meta Raw meta data, already processed by {@see process_post_meta}. - * @param array $post_id Parent post ID. - */ - do_action( 'wxr_importer.processed.comment', $comment_id, $comment, $meta, $post_id ); - - $num_comments++; - } - - return $num_comments; - } - - protected function parse_category_node( $node ) { - $data = array( - // Default taxonomy to "category", since this is a `` tag - 'taxonomy' => 'category', - ); - $meta = array(); - - if ( $node->hasAttribute( 'domain' ) ) { - $data['taxonomy'] = $node->getAttribute( 'domain' ); - } - if ( $node->hasAttribute( 'nicename' ) ) { - $data['slug'] = $node->getAttribute( 'nicename' ); - } - - $data['name'] = $node->textContent; - - if ( empty( $data['slug'] ) ) { - return null; - } - - // Just for extra compatibility - if ( $data['taxonomy'] === 'tag' ) { - $data['taxonomy'] = 'post_tag'; - } - - return $data; - } - - /** - * Callback for `usort` to sort comments by ID - * - * @param array $a Comment data for the first comment - * @param array $b Comment data for the second comment - * @return int - */ - public static function sort_comments_by_id( $a, $b ) { - if ( empty( $a['comment_id'] ) ) { - return 1; - } - - if ( empty( $b['comment_id'] ) ) { - return -1; - } - - return $a['comment_id'] - $b['comment_id']; - } - - protected function parse_author_node( $node ) { - $data = array(); - $meta = array(); - foreach ( $node->childNodes as $child ) { - // We only care about child elements - if ( $child->nodeType !== XML_ELEMENT_NODE ) { - continue; - } - - switch ( $child->tagName ) { - case 'wp:author_login': - $data['user_login'] = $child->textContent; - break; - - case 'wp:author_id': - $data['ID'] = $child->textContent; - break; - - case 'wp:author_email': - $data['user_email'] = $child->textContent; - break; - - case 'wp:author_display_name': - $data['display_name'] = $child->textContent; - break; - - case 'wp:author_first_name': - $data['first_name'] = $child->textContent; - break; - - case 'wp:author_last_name': - $data['last_name'] = $child->textContent; - break; - } - } - - return compact( 'data', 'meta' ); - } - - protected function process_author( $data, $meta ) { - /** - * Pre-process user data. - * - * @param array $data User data. (Return empty to skip.) - * @param array $meta Meta data. - */ - $data = apply_filters( 'wxr_importer.pre_process.user', $data, $meta ); - if ( empty( $data ) ) { - return false; - } - - // Have we already handled this user? - $original_id = isset( $data['ID'] ) ? $data['ID'] : 0; - $original_slug = $data['user_login']; - - if ( isset( $this->mapping['user'][ $original_id ] ) ) { - $existing = $this->mapping['user'][ $original_id ]; - - // Note the slug mapping if we need to too - if ( ! isset( $this->mapping['user_slug'][ $original_slug ] ) ) { - $this->mapping['user_slug'][ $original_slug ] = $existing; - } - - return false; - } - - if ( isset( $this->mapping['user_slug'][ $original_slug ] ) ) { - $existing = $this->mapping['user_slug'][ $original_slug ]; - - // Ensure we note the mapping too - $this->mapping['user'][ $original_id ] = $existing; - - return false; - } - - // Allow overriding the user's slug - $login = $original_slug; - if ( isset( $this->user_slug_override[ $login ] ) ) { - $login = $this->user_slug_override[ $login ]; - } - - $userdata = array( - 'user_login' => sanitize_user( $login, true ), - 'user_pass' => wp_generate_password(), - ); - - $allowed = array( - 'user_email' => true, - 'display_name' => true, - 'first_name' => true, - 'last_name' => true, - ); - foreach ( $data as $key => $value ) { - if ( ! isset( $allowed[ $key ] ) ) { - continue; - } - - $userdata[ $key ] = $data[ $key ]; - } - - $user_id = wp_insert_user( wp_slash( $userdata ) ); - if ( is_wp_error( $user_id ) ) { - $this->logger->error( sprintf( - __( 'Failed to import user "%s"', 'wordpress-importer' ), - $userdata['user_login'] - ) ); - $this->logger->debug( $user_id->get_error_message() ); - - /** - * User processing failed. - * - * @param WP_Error $user_id Error object. - * @param array $userdata Raw data imported for the user. - */ - do_action( 'wxr_importer.process_failed.user', $user_id, $userdata ); - return false; - } - - if ( $original_id ) { - $this->mapping['user'][ $original_id ] = $user_id; - } - $this->mapping['user_slug'][ $original_slug ] = $user_id; - - $this->logger->info( sprintf( - __( 'Imported user "%s"', 'wordpress-importer' ), - $userdata['user_login'] - ) ); - $this->logger->debug( sprintf( - __( 'User %d remapped to %d', 'wordpress-importer' ), - $original_id, - $user_id - ) ); - - // TODO: Implement meta handling once WXR includes it - /** - * User processing completed. - * - * @param int $user_id New user ID. - * @param array $userdata Raw data imported for the user. - */ - do_action( 'wxr_importer.processed.user', $user_id, $userdata ); - } - - protected function parse_term_node( $node, $type = 'term' ) { - $data = array(); - $meta = array(); - - $tag_name = array( - 'id' => 'wp:term_id', - 'taxonomy' => 'wp:term_taxonomy', - 'slug' => 'wp:term_slug', - 'parent' => 'wp:term_parent', - 'name' => 'wp:term_name', - 'description' => 'wp:term_description', - ); - $taxonomy = null; - - // Special casing! - switch ( $type ) { - case 'category': - $tag_name['slug'] = 'wp:category_nicename'; - $tag_name['parent'] = 'wp:category_parent'; - $tag_name['name'] = 'wp:cat_name'; - $tag_name['description'] = 'wp:category_description'; - $tag_name['taxonomy'] = null; - - $data['taxonomy'] = 'category'; - break; - - case 'tag': - $tag_name['slug'] = 'wp:tag_slug'; - $tag_name['parent'] = null; - $tag_name['name'] = 'wp:tag_name'; - $tag_name['description'] = 'wp:tag_description'; - $tag_name['taxonomy'] = null; - - $data['taxonomy'] = 'post_tag'; - break; - } - - foreach ( $node->childNodes as $child ) { - // We only care about child elements - if ( $child->nodeType !== XML_ELEMENT_NODE ) { - continue; - } - - $key = array_search( $child->tagName, $tag_name ); - if ( $key ) { - $data[ $key ] = $child->textContent; - } - } - - if ( empty( $data['taxonomy'] ) ) { - return null; - } - - // Compatibility with WXR 1.0 - if ( $data['taxonomy'] === 'tag' ) { - $data['taxonomy'] = 'post_tag'; - } - - return compact( 'data', 'meta' ); - } - - protected function process_term( $data, $meta ) { - /** - * Pre-process term data. - * - * @param array $data Term data. (Return empty to skip.) - * @param array $meta Meta data. - */ - $data = apply_filters( 'wxr_importer.pre_process.term', $data, $meta ); - if ( empty( $data ) ) { - return false; - } - - $original_id = isset( $data['id'] ) ? (int) $data['id'] : 0; - $parent_id = isset( $data['parent'] ) ? (int) $data['parent'] : 0; - - $mapping_key = sha1( $data['taxonomy'] . ':' . $data['slug'] ); - $existing = $this->term_exists( $data ); - if ( $existing ) { - - /** - * Term processing already imported. - * - * @param array $data Raw data imported for the term. - */ - do_action( 'wxr_importer.process_already_imported.term', $data ); - - $this->mapping['term'][ $mapping_key ] = $existing; - $this->mapping['term_id'][ $original_id ] = $existing; - return false; - } - - // WP really likes to repeat itself in export files - if ( isset( $this->mapping['term'][ $mapping_key ] ) ) { - return false; - } - - $termdata = array(); - $allowed = array( - 'slug' => true, - 'description' => true, - ); - - // Map the parent comment, or mark it as one we need to fix - // TODO: add parent mapping and remapping - /*$requires_remapping = false; - if ( $parent_id ) { - if ( isset( $this->mapping['term'][ $parent_id ] ) ) { - $data['parent'] = $this->mapping['term'][ $parent_id ]; - } else { - // Prepare for remapping later - $meta[] = array( 'key' => '_wxr_import_parent', 'value' => $parent_id ); - $requires_remapping = true; - - // Wipe the parent for now - $data['parent'] = 0; - } - }*/ - - foreach ( $data as $key => $value ) { - if ( ! isset( $allowed[ $key ] ) ) { - continue; - } - - $termdata[ $key ] = $data[ $key ]; - } - - $result = wp_insert_term( $data['name'], $data['taxonomy'], $termdata ); - if ( is_wp_error( $result ) ) { - $this->logger->warning( sprintf( - __( 'Failed to import %s %s', 'wordpress-importer' ), - $data['taxonomy'], - $data['name'] - ) ); - $this->logger->debug( $result->get_error_message() ); - do_action( 'wp_import_insert_term_failed', $result, $data ); - - /** - * Term processing failed. - * - * @param WP_Error $result Error object. - * @param array $data Raw data imported for the term. - * @param array $meta Meta data supplied for the term. - */ - do_action( 'wxr_importer.process_failed.term', $result, $data, $meta ); - return false; - } - - $term_id = $result['term_id']; - - $this->mapping['term'][ $mapping_key ] = $term_id; - $this->mapping['term_id'][ $original_id ] = $term_id; - - $this->logger->info( sprintf( - __( 'Imported "%s" (%s)', 'wordpress-importer' ), - $data['name'], - $data['taxonomy'] - ) ); - $this->logger->debug( sprintf( - __( 'Term %d remapped to %d', 'wordpress-importer' ), - $original_id, - $term_id - ) ); - - do_action( 'wp_import_insert_term', $term_id, $data ); - - /** - * Term processing completed. - * - * @param int $term_id New term ID. - * @param array $data Raw data imported for the term. - */ - do_action( 'wxr_importer.processed.term', $term_id, $data ); - } - - /** - * Attempt to download a remote file attachment - * - * @param string $url URL of item to fetch - * @param array $post Attachment details - * @return array|WP_Error Local file location details on success, WP_Error otherwise - */ - protected function fetch_remote_file( $url, $post ) { - // extract the file name and extension from the url - $file_name = basename( $url ); - - // get placeholder file in the upload dir with a unique, sanitized filename - $upload = wp_upload_bits( $file_name, 0, '', $post['upload_date'] ); - if ( $upload['error'] ) { - return new \WP_Error( 'upload_dir_error', $upload['error'] ); - } - - // fetch the remote url and write it to the placeholder file - $response = wp_remote_get( $url, array( - 'stream' => true, - 'filename' => $upload['file'], - ) ); - - // request failed - if ( is_wp_error( $response ) ) { - unlink( $upload['file'] ); - return $response; - } - - $code = (int) wp_remote_retrieve_response_code( $response ); - - // make sure the fetch was successful - if ( $code !== 200 ) { - unlink( $upload['file'] ); - return new \WP_Error( - 'import_file_error', - sprintf( - __( 'Remote server returned %1$d %2$s for %3$s', 'wordpress-importer' ), - $code, - get_status_header_desc( $code ), - $url - ) - ); - } - - $filesize = filesize( $upload['file'] ); - $headers = wp_remote_retrieve_headers( $response ); - - if ( isset( $headers['content-length'] ) && $filesize !== (int) $headers['content-length'] ) { - unlink( $upload['file'] ); - return new \WP_Error( 'import_file_error', __( 'Remote file is incorrect size', 'wordpress-importer' ) ); - } - - if ( 0 === $filesize ) { - unlink( $upload['file'] ); - return new \WP_Error( 'import_file_error', __( 'Zero size file downloaded', 'wordpress-importer' ) ); - } - - $max_size = (int) $this->max_attachment_size(); - if ( ! empty( $max_size ) && $filesize > $max_size ) { - unlink( $upload['file'] ); - $message = sprintf( __( 'Remote file is too large, limit is %s', 'wordpress-importer' ), size_format( $max_size ) ); - return new \WP_Error( 'import_file_error', $message ); - } - - return $upload; - } - - protected function post_process() { - // Time to tackle any left-over bits - if ( ! empty( $this->requires_remapping['post'] ) ) { - $this->post_process_posts( $this->requires_remapping['post'] ); - } - if ( ! empty( $this->requires_remapping['comment'] ) ) { - $this->post_process_comments( $this->requires_remapping['comment'] ); - } - } - - protected function post_process_posts( $todo ) { - foreach ( $todo as $post_id => $_ ) { - $this->logger->debug( sprintf( - // Note: title intentionally not used to skip extra processing - // for when debug logging is off - __( 'Running post-processing for post %d', 'wordpress-importer' ), - $post_id - ) ); - - $data = array(); - - $parent_id = get_post_meta( $post_id, '_wxr_import_parent', true ); - if ( ! empty( $parent_id ) ) { - // Have we imported the parent now? - if ( isset( $this->mapping['post'][ $parent_id ] ) ) { - $data['post_parent'] = $this->mapping['post'][ $parent_id ]; - } else { - $this->logger->warning( sprintf( - __( 'Could not find the post parent for "%s" (post #%d)', 'wordpress-importer' ), - get_the_title( $post_id ), - $post_id - ) ); - $this->logger->debug( sprintf( - __( 'Post %d was imported with parent %d, but could not be found', 'wordpress-importer' ), - $post_id, - $parent_id - ) ); - } - } - - $author_slug = get_post_meta( $post_id, '_wxr_import_user_slug', true ); - if ( ! empty( $author_slug ) ) { - // Have we imported the user now? - if ( isset( $this->mapping['user_slug'][ $author_slug ] ) ) { - $data['post_author'] = $this->mapping['user_slug'][ $author_slug ]; - } else { - $this->logger->warning( sprintf( - __( 'Could not find the author for "%s" (post #%d)', 'wordpress-importer' ), - get_the_title( $post_id ), - $post_id - ) ); - $this->logger->debug( sprintf( - __( 'Post %d was imported with author "%s", but could not be found', 'wordpress-importer' ), - $post_id, - $author_slug - ) ); - } - } - - $has_attachments = get_post_meta( $post_id, '_wxr_import_has_attachment_refs', true ); - if ( ! empty( $has_attachments ) ) { - $post = get_post( $post_id ); - $content = $post->post_content; - - // Replace all the URLs we've got - $new_content = str_replace( array_keys( $this->url_remap ), $this->url_remap, $content ); - if ( $new_content !== $content ) { - $data['post_content'] = $new_content; - } - } - - if ( get_post_type( $post_id ) === 'nav_menu_item' ) { - $this->post_process_menu_item( $post_id ); - } - - // Do we have updates to make? - if ( empty( $data ) ) { - $this->logger->debug( sprintf( - __( 'Post %d was marked for post-processing, but none was required.', 'wordpress-importer' ), - $post_id - ) ); - continue; - } - - // Run the update - $data['ID'] = $post_id; - - if ( isset( $data['post_content'] ) ) { - $data['post_content'] = wp_slash( $data['post_content'] ); - } - - $result = wp_update_post( $data, true ); - - if ( is_wp_error( $result ) ) { - $this->logger->warning( sprintf( - __( 'Could not update "%s" (post #%d) with mapped data', 'wordpress-importer' ), - get_the_title( $post_id ), - $post_id - ) ); - $this->logger->debug( $result->get_error_message() ); - continue; - } - - // Clear out our temporary meta keys - delete_post_meta( $post_id, '_wxr_import_parent' ); - delete_post_meta( $post_id, '_wxr_import_user_slug' ); - delete_post_meta( $post_id, '_wxr_import_has_attachment_refs' ); - } - } - - protected function post_process_menu_item( $post_id ) { - $menu_object_id = get_post_meta( $post_id, '_wxr_import_menu_item', true ); - if ( empty( $menu_object_id ) ) { - // No processing needed! - return; - } - - $menu_item_type = get_post_meta( $post_id, '_menu_item_type', true ); - switch ( $menu_item_type ) { - case 'taxonomy': - if ( isset( $this->mapping['term_id'][ $menu_object_id ] ) ) { - $menu_object = $this->mapping['term_id'][ $menu_object_id ]; - } - break; - - case 'post_type': - if ( isset( $this->mapping['post'][ $menu_object_id ] ) ) { - $menu_object = $this->mapping['post'][ $menu_object_id ]; - } - break; - - default: - // Cannot handle this. - return; - } - - if ( ! empty( $menu_object ) ) { - update_post_meta( $post_id, '_menu_item_object_id', wp_slash( $menu_object ) ); - } else { - $this->logger->warning( sprintf( - __( 'Could not find the menu object for "%s" (post #%d)', 'wordpress-importer' ), - get_the_title( $post_id ), - $post_id - ) ); - $this->logger->debug( sprintf( - __( 'Post %d was imported with object "%d" of type "%s", but could not be found', 'wordpress-importer' ), - $post_id, - $menu_object_id, - $menu_item_type - ) ); - } - - delete_post_meta( $post_id, '_wxr_import_menu_item' ); - } - - - protected function post_process_comments( $todo ) { - foreach ( $todo as $comment_id => $_ ) { - $data = array(); - - $parent_id = get_comment_meta( $comment_id, '_wxr_import_parent', true ); - if ( ! empty( $parent_id ) ) { - // Have we imported the parent now? - if ( isset( $this->mapping['comment'][ $parent_id ] ) ) { - $data['comment_parent'] = $this->mapping['comment'][ $parent_id ]; - } else { - $this->logger->warning( sprintf( - __( 'Could not find the comment parent for comment #%d', 'wordpress-importer' ), - $comment_id - ) ); - $this->logger->debug( sprintf( - __( 'Comment %d was imported with parent %d, but could not be found', 'wordpress-importer' ), - $comment_id, - $parent_id - ) ); - } - } - - $author_id = get_comment_meta( $comment_id, '_wxr_import_user', true ); - if ( ! empty( $author_id ) ) { - // Have we imported the user now? - if ( isset( $this->mapping['user'][ $author_id ] ) ) { - $data['user_id'] = $this->mapping['user'][ $author_id ]; - } else { - $this->logger->warning( sprintf( - __( 'Could not find the author for comment #%d', 'wordpress-importer' ), - $comment_id - ) ); - $this->logger->debug( sprintf( - __( 'Comment %d was imported with author %d, but could not be found', 'wordpress-importer' ), - $comment_id, - $author_id - ) ); - } - } - - // Do we have updates to make? - if ( empty( $data ) ) { - continue; - } - - // Run the update - $data['comment_ID'] = $comment_ID; - $result = wp_update_comment( wp_slash( $data ) ); - if ( empty( $result ) ) { - $this->logger->warning( sprintf( - __( 'Could not update comment #%d with mapped data', 'wordpress-importer' ), - $comment_id - ) ); - continue; - } - - // Clear out our temporary meta keys - delete_comment_meta( $comment_id, '_wxr_import_parent' ); - delete_comment_meta( $comment_id, '_wxr_import_user' ); - } - } - - /** - * Use stored mapping information to update old attachment URLs - */ - protected function replace_attachment_urls_in_content() { - global $wpdb; - // make sure we do the longest urls first, in case one is a substring of another - uksort( $this->url_remap, array( $this, 'cmpr_strlen' ) ); - - foreach ( $this->url_remap as $from_url => $to_url ) { - // remap urls in post_content - $query = $wpdb->prepare( "UPDATE {$wpdb->posts} SET post_content = REPLACE(post_content, %s, %s)", $from_url, $to_url ); - $wpdb->query( $query ); - - // remap enclosure urls - $query = $wpdb->prepare( "UPDATE {$wpdb->postmeta} SET meta_value = REPLACE(meta_value, %s, %s) WHERE meta_key='enclosure'", $from_url, $to_url ); - $result = $wpdb->query( $query ); - } - } - - /** - * Update _thumbnail_id meta to new, imported attachment IDs - */ - function remap_featured_images() { - - if ( empty( $this->featured_images ) ) { - return; - } - - // cycle through posts that have a featured image - $this->logger->info( 'Starting remapping of featured images' ); - - foreach ( $this->featured_images as $post_id => $value ) { - if ( isset( $this->mapping['post'][ $value ] ) ) { - $new_id = $this->mapping['post'][ $value ]; - - // only update if there's a difference - if ( $new_id !== $value ) { - $this->logger->info( sprintf( 'Remapping featured image ID %d to new ID %d for post ID %d',$value, $new_id, $post_id ) ); - update_post_meta( $post_id, '_thumbnail_id', $new_id ); - } - } - } - } - - /** - * Decide if the given meta key maps to information we will want to import - * - * @param string $key The meta key to check - * @return string|bool The key if we do want to import, false if not - */ - public function is_valid_meta_key( $key ) { - // skip attachment metadata since we'll regenerate it from scratch - // skip _edit_lock as not relevant for import - if ( in_array( $key, array( '_wp_attached_file', '_wp_attachment_metadata', '_edit_lock' ) ) ) { - return false; - } - - return $key; - } - - /** - * Decide what the maximum file size for downloaded attachments is. - * Default is 0 (unlimited), can be filtered via import_attachment_size_limit - * - * @return int Maximum attachment file size to import - */ - protected function max_attachment_size() { - return apply_filters( 'import_attachment_size_limit', 0 ); - } - - /** - * Added to http_request_timeout filter to force timeout at 60 seconds during import - * - * @access protected - * @return int 60 - */ - function bump_request_timeout($val) { - return 60; - } - - // return the difference in length between two strings - function cmpr_strlen( $a, $b ) { - return strlen( $b ) - strlen( $a ); - } - - /** - * Prefill existing post data. - * - * This preloads all GUIDs into memory, allowing us to avoid hitting the - * database when we need to check for existence. With larger imports, this - * becomes prohibitively slow to perform SELECT queries on each. - * - * By preloading all this data into memory, it's a constant-time lookup in - * PHP instead. However, this does use a lot more memory, so for sites doing - * small imports onto a large site, it may be a better tradeoff to use - * on-the-fly checking instead. - */ - protected function prefill_existing_posts() { - global $wpdb; - $posts = $wpdb->get_results( "SELECT ID, guid FROM {$wpdb->posts}" ); - - foreach ( $posts as $item ) { - $this->exists['post'][ $item->guid ] = $item->ID; - } - } - - /** - * Does the post exist? - * - * @param array $data Post data to check against. - * @return int|bool Existing post ID if it exists, false otherwise. - */ - protected function post_exists( $data ) { - // Constant-time lookup if we prefilled - $exists_key = $data['guid']; - - $exists = null; - - if ( $this->options['prefill_existing_posts'] ) { - // Sites: fix for custom post types. The guids in the prefilled section are escaped, so these ones should be as well. - $exists_key = htmlentities( $exists_key ); - $exists = isset( $this->exists['post'][ $exists_key ] ) ? $this->exists['post'][ $exists_key ] : false; - } else if ( isset( $this->exists['post'][ $exists_key ] ) ) { - // No prefilling, but might have already handled it - $exists = $this->exists['post'][ $exists_key ]; - } else { - // Still nothing, try post_exists, and cache it - $exists = post_exists( $data['post_title'], $data['post_content'], $data['post_date'] ); - } - - /** - * Filter ID of the existing post corresponding to post currently importing. - * - * Return 0 to force the post to be imported. Filter the ID to be something else - * to override which existing post is mapped to the imported post. - * - * @see post_exists() - * - * @param int $post_exists Post ID, or 0 if post did not exist. - * @param array $data The post array to be inserted. - */ - $exists = apply_filters( 'wp_import_existing_post', $exists, $data ); - - $this->exists['post'][ $exists_key ] = $exists; - - return $exists; - } - - /** - * Mark the post as existing. - * - * @param array $data Post data to mark as existing. - * @param int $post_id Post ID. - */ - protected function mark_post_exists( $data, $post_id ) { - $exists_key = $data['guid']; - $this->exists['post'][ $exists_key ] = $post_id; - } - - /** - * Prefill existing comment data. - * - * @see self::prefill_existing_posts() for justification of why this exists. - */ - protected function prefill_existing_comments() { - global $wpdb; - $posts = $wpdb->get_results( "SELECT comment_ID, comment_author, comment_date FROM {$wpdb->comments}" ); - - foreach ( $posts as $item ) { - $exists_key = sha1( $item->comment_author . ':' . $item->comment_date ); - $this->exists['comment'][ $exists_key ] = $item->comment_ID; - } - } - - /** - * Does the comment exist? - * - * @param array $data Comment data to check against. - * @return int|bool Existing comment ID if it exists, false otherwise. - */ - protected function comment_exists( $data ) { - $exists_key = sha1( $data['comment_author'] . ':' . $data['comment_date'] ); - - // Constant-time lookup if we prefilled - if ( $this->options['prefill_existing_comments'] ) { - return isset( $this->exists['comment'][ $exists_key ] ) ? $this->exists['comment'][ $exists_key ] : false; - } - - // No prefilling, but might have already handled it - if ( isset( $this->exists['comment'][ $exists_key ] ) ) { - return $this->exists['comment'][ $exists_key ]; - } - - // Still nothing, try comment_exists, and cache it - $exists = comment_exists( $data['comment_author'], $data['comment_date'] ); - $this->exists['comment'][ $exists_key ] = $exists; - - return $exists; - } - - /** - * Mark the comment as existing. - * - * @param array $data Comment data to mark as existing. - * @param int $comment_id Comment ID. - */ - protected function mark_comment_exists( $data, $comment_id ) { - $exists_key = sha1( $data['comment_author'] . ':' . $data['comment_date'] ); - $this->exists['comment'][ $exists_key ] = $comment_id; - } - - /** - * Prefill existing term data. - * - * @see self::prefill_existing_posts() for justification of why this exists. - */ - protected function prefill_existing_terms() { - global $wpdb; - $query = "SELECT t.term_id, tt.taxonomy, t.slug FROM {$wpdb->terms} AS t"; - $query .= " JOIN {$wpdb->term_taxonomy} AS tt ON t.term_id = tt.term_id"; - $terms = $wpdb->get_results( $query ); - - foreach ( $terms as $item ) { - $exists_key = sha1( $item->taxonomy . ':' . $item->slug ); - $this->exists['term'][ $exists_key ] = $item->term_id; - } - } - - /** - * Does the term exist? - * - * @param array $data Term data to check against. - * @return int|bool Existing term ID if it exists, false otherwise. - */ - protected function term_exists( $data ) { - $exists_key = sha1( $data['taxonomy'] . ':' . $data['slug'] ); - - // Constant-time lookup if we prefilled - if ( $this->options['prefill_existing_terms'] ) { - return isset( $this->exists['term'][ $exists_key ] ) ? $this->exists['term'][ $exists_key ] : false; - } - - // No prefilling, but might have already handled it - if ( isset( $this->exists['term'][ $exists_key ] ) ) { - return $this->exists['term'][ $exists_key ]; - } - - // Still nothing, try comment_exists, and cache it - $exists = term_exists( $data['slug'], $data['taxonomy'] ); - if ( is_array( $exists ) ) { - $exists = $exists['term_id']; - } - - $this->exists['term'][ $exists_key ] = $exists; - - return $exists; - } - - /** - * Mark the term as existing. - * - * @param array $data Term data to mark as existing. - * @param int $term_id Term ID. - */ - protected function mark_term_exists( $data, $term_id ) { - $exists_key = sha1( $data['taxonomy'] . ':' . $data['slug'] ); - $this->exists['term'][ $exists_key ] = $term_id; - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/spacing/functions/customizer/content-spacing.php b/wp-content/upgrade-temp-backup/plugins/gp-premium/spacing/functions/customizer/content-spacing.php deleted file mode 100644 index 3b90e405..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/spacing/functions/customizer/content-spacing.php +++ /dev/null @@ -1,244 +0,0 @@ -add_section( - 'generate_spacing_content', - array( - 'title' => __( 'Content', 'gp-premium' ), - 'capability' => 'edit_theme_options', - 'priority' => 10, - 'panel' => 'generate_spacing_panel', - ) -); - -// If we don't have a layout panel, use our old spacing section. -if ( $wp_customize->get_panel( 'generate_layout_panel' ) ) { - $content_section = 'generate_layout_container'; -} else { - $content_section = 'generate_spacing_content'; -} - -// Take control of the container width control. -// This control is handled by the free theme, but we take control of it here for consistency between control styles. -$wp_customize->add_control( - new GeneratePress_Pro_Range_Slider_Control( - $wp_customize, - 'generate_settings[container_width]', - array( - 'label' => __( 'Container Width', 'gp-premium' ), - 'section' => 'generate_layout_container', - 'settings' => array( - 'desktop' => 'generate_settings[container_width]', - ), - 'choices' => array( - 'desktop' => array( - 'min' => 700, - 'max' => 2000, - 'step' => 5, - 'edit' => true, - 'unit' => 'px', - ), - ), - 'priority' => 0, - ) - ) -); - -// Separating space. -$wp_customize->add_setting( - 'generate_spacing_settings[separator]', - array( - 'default' => $defaults['separator'], - 'type' => 'option', - 'capability' => 'edit_theme_options', - 'sanitize_callback' => 'absint', - 'transport' => 'postMessage', - ) -); - -$wp_customize->add_control( - new GeneratePress_Pro_Range_Slider_Control( - $wp_customize, - 'generate_spacing_settings[separator]', - array( - 'label' => __( 'Separating Space', 'gp-premium' ), - 'section' => $content_section, - 'settings' => array( - 'desktop' => 'generate_spacing_settings[separator]', - ), - 'choices' => array( - 'desktop' => array( - 'min' => 0, - 'max' => 100, - 'step' => 1, - 'edit' => true, - 'unit' => 'px', - ), - ), - ) - ) -); - -// Content padding top. -$wp_customize->add_setting( - 'generate_spacing_settings[content_top]', - array( - 'default' => $defaults['content_top'], - 'type' => 'option', - 'sanitize_callback' => 'absint', - 'transport' => 'postMessage', - ) -); - -// Content padding right. -$wp_customize->add_setting( - 'generate_spacing_settings[content_right]', - array( - 'default' => $defaults['content_right'], - 'type' => 'option', - 'sanitize_callback' => 'absint', - 'transport' => 'postMessage', - ) -); - -// Content padding bottom. -$wp_customize->add_setting( - 'generate_spacing_settings[content_bottom]', - array( - 'default' => $defaults['content_bottom'], - 'type' => 'option', - 'sanitize_callback' => 'absint', - 'transport' => 'postMessage', - ) -); - -// Content padding left. -$wp_customize->add_setting( - 'generate_spacing_settings[content_left]', - array( - 'default' => $defaults['content_left'], - 'type' => 'option', - 'sanitize_callback' => 'absint', - 'transport' => 'postMessage', - ) -); - -$content_padding_settings = array( - 'desktop_top' => 'generate_spacing_settings[content_top]', - 'desktop_right' => 'generate_spacing_settings[content_right]', - 'desktop_bottom' => 'generate_spacing_settings[content_bottom]', - 'desktop_left' => 'generate_spacing_settings[content_left]', -); - -// If mobile_content_top is set, the rest of them are too. -// We have to check as these defaults are set in the theme. -if ( isset( $defaults['mobile_content_top'] ) ) { - $content_padding_settings['mobile_top'] = 'generate_spacing_settings[mobile_content_top]'; - $content_padding_settings['mobile_right'] = 'generate_spacing_settings[mobile_content_right]'; - $content_padding_settings['mobile_bottom'] = 'generate_spacing_settings[mobile_content_bottom]'; - $content_padding_settings['mobile_left'] = 'generate_spacing_settings[mobile_content_left]'; - - // Mobile content padding top. - $wp_customize->add_setting( - 'generate_spacing_settings[mobile_content_top]', - array( - 'default' => $defaults['mobile_content_top'], - 'type' => 'option', - 'sanitize_callback' => 'absint', - 'transport' => 'postMessage', - ) - ); - - // Content padding right. - $wp_customize->add_setting( - 'generate_spacing_settings[mobile_content_right]', - array( - 'default' => $defaults['mobile_content_right'], - 'type' => 'option', - 'sanitize_callback' => 'absint', - 'transport' => 'postMessage', - ) - ); - - // Content padding bottom. - $wp_customize->add_setting( - 'generate_spacing_settings[mobile_content_bottom]', - array( - 'default' => $defaults['mobile_content_bottom'], - 'type' => 'option', - 'sanitize_callback' => 'absint', - 'transport' => 'postMessage', - ) - ); - - // Content padding left. - $wp_customize->add_setting( - 'generate_spacing_settings[mobile_content_left]', - array( - 'default' => $defaults['mobile_content_left'], - 'type' => 'option', - 'sanitize_callback' => 'absint', - 'transport' => 'postMessage', - ) - ); -} - -// Make use of the content padding settings. -$wp_customize->add_control( - new GeneratePress_Spacing_Control( - $wp_customize, - 'content_spacing', - array( - 'type' => 'generatepress-spacing', - 'label' => esc_html__( 'Content Padding', 'gp-premium' ), - 'section' => $content_section, - 'settings' => $content_padding_settings, - 'element' => 'content', - 'priority' => 99, - ) - ) -); - -$wp_customize->add_setting( - 'generate_spacing_settings[content_element_separator]', - array( - 'default' => $defaults['content_element_separator'], - 'type' => 'option', - 'capability' => 'edit_theme_options', - 'sanitize_callback' => 'generate_premium_sanitize_decimal_integer', - 'transport' => 'postMessage', - ) -); - -$wp_customize->add_control( - new GeneratePress_Pro_Range_Slider_Control( - $wp_customize, - 'generate_spacing_settings[content_element_separator]', - array( - 'label' => __( 'Content Separator', 'gp-premium' ), - 'sub_description' => __( 'The content separator controls the space between the featured image, title, content and entry meta.', 'gp-premium' ), - 'section' => $content_section, - 'settings' => array( - 'desktop' => 'generate_spacing_settings[content_element_separator]', - ), - 'choices' => array( - 'desktop' => array( - 'min' => 0, - 'max' => 10, - 'step' => .1, - 'edit' => true, - 'unit' => 'em', - ), - ), - ) - ) -); diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/spacing/functions/customizer/footer-spacing.php b/wp-content/upgrade-temp-backup/plugins/gp-premium/spacing/functions/customizer/footer-spacing.php deleted file mode 100644 index 3ffc54af..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/spacing/functions/customizer/footer-spacing.php +++ /dev/null @@ -1,207 +0,0 @@ -add_section( - 'generate_spacing_footer', - array( - 'title' => __( 'Footer', 'gp-premium' ), - 'capability' => 'edit_theme_options', - 'priority' => 20, - 'panel' => 'generate_spacing_panel', - ) -); - -// Use our layout panel if it exists. -if ( $wp_customize->get_panel( 'generate_layout_panel' ) ) { - $footer_section = 'generate_layout_footer'; -} else { - $footer_section = 'generate_spacing_footer'; -} - -// Footer widget area padding top. -$wp_customize->add_setting( - 'generate_spacing_settings[footer_widget_container_top]', - array( - 'default' => $defaults['footer_widget_container_top'], - 'type' => 'option', - 'sanitize_callback' => 'absint', - 'transport' => 'postMessage', - ) -); - -// Footer widget area padding right. -$wp_customize->add_setting( - 'generate_spacing_settings[footer_widget_container_right]', - array( - 'default' => $defaults['footer_widget_container_right'], - 'type' => 'option', - 'sanitize_callback' => 'absint', - 'transport' => 'postMessage', - ) -); - -// Footer widget area padding bottom. -$wp_customize->add_setting( - 'generate_spacing_settings[footer_widget_container_bottom]', - array( - 'default' => $defaults['footer_widget_container_bottom'], - 'type' => 'option', - 'sanitize_callback' => 'absint', - 'transport' => 'postMessage', - ) -); - -// Footer widget area padding left. -$wp_customize->add_setting( - 'generate_spacing_settings[footer_widget_container_left]', - array( - 'default' => $defaults['footer_widget_container_left'], - 'type' => 'option', - 'sanitize_callback' => 'absint', - 'transport' => 'postMessage', - ) -); - -// Footer widget area padding top. -$wp_customize->add_setting( - 'generate_spacing_settings[mobile_footer_widget_container_top]', - array( - 'default' => $defaults['mobile_footer_widget_container_top'], - 'type' => 'option', - 'sanitize_callback' => 'absint', - 'transport' => 'postMessage', - ) -); - -// Footer widget area padding right. -$wp_customize->add_setting( - 'generate_spacing_settings[mobile_footer_widget_container_right]', - array( - 'default' => $defaults['mobile_footer_widget_container_right'], - 'type' => 'option', - 'sanitize_callback' => 'absint', - 'transport' => 'postMessage', - ) -); - -// Footer widget area padding bottom. -$wp_customize->add_setting( - 'generate_spacing_settings[mobile_footer_widget_container_bottom]', - array( - 'default' => $defaults['mobile_footer_widget_container_bottom'], - 'type' => 'option', - 'sanitize_callback' => 'absint', - 'transport' => 'postMessage', - ) -); - -// Footer widget area padding left. -$wp_customize->add_setting( - 'generate_spacing_settings[mobile_footer_widget_container_left]', - array( - 'default' => $defaults['mobile_footer_widget_container_left'], - 'type' => 'option', - 'sanitize_callback' => 'absint', - 'transport' => 'postMessage', - ) -); - -// Make use of the Footer widget area padding settings. -$wp_customize->add_control( - new GeneratePress_Spacing_Control( - $wp_customize, - 'footer_widget_area_spacing', - array( - 'type' => 'generatepress-spacing', - 'label' => esc_html__( 'Footer Widget Area Padding', 'gp-premium' ), - 'section' => $footer_section, - 'settings' => array( - 'desktop_top' => 'generate_spacing_settings[footer_widget_container_top]', - 'desktop_right' => 'generate_spacing_settings[footer_widget_container_right]', - 'desktop_bottom' => 'generate_spacing_settings[footer_widget_container_bottom]', - 'desktop_left' => 'generate_spacing_settings[footer_widget_container_left]', - 'mobile_top' => 'generate_spacing_settings[mobile_footer_widget_container_top]', - 'mobile_right' => 'generate_spacing_settings[mobile_footer_widget_container_right]', - 'mobile_bottom' => 'generate_spacing_settings[mobile_footer_widget_container_bottom]', - 'mobile_left' => 'generate_spacing_settings[mobile_footer_widget_container_left]', - ), - 'element' => 'footer_widget_area', - 'priority' => 99, - ) - ) -); - -// Footer padding top. -$wp_customize->add_setting( - 'generate_spacing_settings[footer_top]', - array( - 'default' => $defaults['footer_top'], - 'type' => 'option', - 'sanitize_callback' => 'absint', - 'transport' => 'postMessage', - ) -); - -// Footer padding right. -$wp_customize->add_setting( - 'generate_spacing_settings[footer_right]', - array( - 'default' => $defaults['footer_right'], - 'type' => 'option', - 'sanitize_callback' => 'absint', - 'transport' => 'postMessage', - ) -); - -// Footer padding bottom. -$wp_customize->add_setting( - 'generate_spacing_settings[footer_bottom]', - array( - 'default' => $defaults['footer_bottom'], - 'type' => 'option', - 'sanitize_callback' => 'absint', - 'transport' => 'postMessage', - ) -); - -// Footer padding left. -$wp_customize->add_setting( - 'generate_spacing_settings[footer_left]', - array( - 'default' => $defaults['footer_left'], - 'type' => 'option', - 'sanitize_callback' => 'absint', - 'transport' => 'postMessage', - ) -); - -// Make use of the footer padding settings. -$wp_customize->add_control( - new GeneratePress_Spacing_Control( - $wp_customize, - 'footer_spacing', - array( - 'type' => 'generatepress-spacing', - 'label' => esc_html__( 'Footer Padding', 'gp-premium' ), - 'section' => $footer_section, - 'settings' => array( - 'desktop_top' => 'generate_spacing_settings[footer_top]', - 'desktop_right' => 'generate_spacing_settings[footer_right]', - 'desktop_bottom' => 'generate_spacing_settings[footer_bottom]', - 'desktop_left' => 'generate_spacing_settings[footer_left]', - ), - 'element' => 'footer', - 'priority' => 105, - ) - ) -); diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/spacing/functions/customizer/header-spacing.php b/wp-content/upgrade-temp-backup/plugins/gp-premium/spacing/functions/customizer/header-spacing.php deleted file mode 100644 index f937d91b..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/spacing/functions/customizer/header-spacing.php +++ /dev/null @@ -1,135 +0,0 @@ -add_section( - 'generate_spacing_header', - array( - 'title' => __( 'Header', 'gp-premium' ), - 'capability' => 'edit_theme_options', - 'priority' => 5, - 'panel' => 'generate_spacing_panel', - ) -); - -// If we don't have a layout panel, use our old spacing section. -$header_section = ( $wp_customize->get_panel( 'generate_layout_panel' ) ) ? 'generate_layout_header' : 'generate_spacing_header'; - -// Header top. -$wp_customize->add_setting( - 'generate_spacing_settings[header_top]', - array( - 'default' => $defaults['header_top'], - 'type' => 'option', - 'sanitize_callback' => 'absint', - 'transport' => 'postMessage', - ) -); - -// Header right. -$wp_customize->add_setting( - 'generate_spacing_settings[header_right]', - array( - 'default' => $defaults['header_right'], - 'type' => 'option', - 'sanitize_callback' => 'absint', - 'transport' => 'postMessage', - ) -); - -// Header bottom. -$wp_customize->add_setting( - 'generate_spacing_settings[header_bottom]', - array( - 'default' => $defaults['header_bottom'], - 'type' => 'option', - 'sanitize_callback' => 'absint', - 'transport' => 'postMessage', - ) -); - -// Header left. -$wp_customize->add_setting( - 'generate_spacing_settings[header_left]', - array( - 'default' => $defaults['header_left'], - 'type' => 'option', - 'sanitize_callback' => 'absint', - 'transport' => 'postMessage', - ) -); - -$wp_customize->add_setting( - 'generate_spacing_settings[mobile_header_top]', - array( - 'default' => $defaults['mobile_header_top'], - 'type' => 'option', - 'sanitize_callback' => 'absint', - 'transport' => 'postMessage', - ) -); - -// Header right. -$wp_customize->add_setting( - 'generate_spacing_settings[mobile_header_right]', - array( - 'default' => $defaults['mobile_header_right'], - 'type' => 'option', - 'sanitize_callback' => 'absint', - 'transport' => 'postMessage', - ) -); - -// Header bottom. -$wp_customize->add_setting( - 'generate_spacing_settings[mobile_header_bottom]', - array( - 'default' => $defaults['mobile_header_bottom'], - 'type' => 'option', - 'sanitize_callback' => 'absint', - 'transport' => 'postMessage', - ) -); - -// Header left. -$wp_customize->add_setting( - 'generate_spacing_settings[mobile_header_left]', - array( - 'default' => $defaults['mobile_header_left'], - 'type' => 'option', - 'sanitize_callback' => 'absint', - 'transport' => 'postMessage', - ) -); - -// Do something with our header controls. -$wp_customize->add_control( - new GeneratePress_Spacing_Control( - $wp_customize, - 'header_spacing', - array( - 'type' => 'generatepress-spacing', - 'label' => esc_html__( 'Header Padding', 'gp-premium' ), - 'section' => $header_section, - 'settings' => array( - 'desktop_top' => 'generate_spacing_settings[header_top]', - 'desktop_right' => 'generate_spacing_settings[header_right]', - 'desktop_bottom' => 'generate_spacing_settings[header_bottom]', - 'desktop_left' => 'generate_spacing_settings[header_left]', - 'mobile_top' => 'generate_spacing_settings[mobile_header_top]', - 'mobile_right' => 'generate_spacing_settings[mobile_header_right]', - 'mobile_bottom' => 'generate_spacing_settings[mobile_header_bottom]', - 'mobile_left' => 'generate_spacing_settings[mobile_header_left]', - ), - 'element' => 'header', - ) - ) -); diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/spacing/functions/customizer/js/customizer.js b/wp-content/upgrade-temp-backup/plugins/gp-premium/spacing/functions/customizer/js/customizer.js deleted file mode 100644 index 966c3eaa..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/spacing/functions/customizer/js/customizer.js +++ /dev/null @@ -1,661 +0,0 @@ -function generate_spacing_live_update( name, id, selector, property, negative, divide, media, unit ) { - settings = typeof settings !== 'undefined' ? settings : 'generate_spacing_settings'; - wp.customize( settings + '[' + id + ']', function( value ) { - value.bind( function( newval ) { - negative = typeof negative !== 'undefined' ? negative : false; - media = typeof media !== 'undefined' ? media : ''; - divide = typeof divide !== 'undefined' ? divide : false; - unit = typeof unit !== 'undefined' ? unit : 'px'; - - // Get new value - newval = ( divide ) ? newval / 2 : newval; - - // Check if negative integer - negative = ( negative ) ? '-' : ''; - - var isTablet = ( 'tablet' == id.substring( 0, 6 ) ) ? true : false, - isMobile = ( 'mobile' == id.substring( 0, 6 ) ) ? true : false; - - if ( isTablet ) { - if ( '' == wp.customize(settings + '[' + id + ']').get() ) { - var desktopID = id.replace( 'tablet_', '' ); - newval = wp.customize(settings + '[' + desktopID + ']').get(); - } - } - - if ( isMobile ) { - if ( '' == wp.customize(settings + '[' + id + ']').get() ) { - var desktopID = id.replace( 'mobile_', '' ); - newval = wp.customize(settings + '[' + desktopID + ']').get(); - } - } - - // We're using a desktop value - if ( ! isTablet && ! isMobile ) { - - var tabletValue = ( typeof wp.customize(settings + '[tablet_' + id + ']') !== 'undefined' ) ? wp.customize(settings + '[tablet_' + id + ']').get() : '', - mobileValue = ( typeof wp.customize(settings + '[mobile_' + id + ']') !== 'undefined' ) ? wp.customize(settings + '[mobile_' + id + ']').get() : ''; - - // The tablet setting exists, mobile doesn't - if ( '' !== tabletValue && '' == mobileValue ) { - media = gp_spacing.desktop + ', ' + gp_spacing.mobile; - } - - // The tablet setting doesn't exist, mobile does - if ( '' == tabletValue && '' !== mobileValue ) { - media = gp_spacing.desktop + ', ' + gp_spacing.tablet; - } - - // The tablet setting doesn't exist, neither does mobile - if ( '' == tabletValue && '' == mobileValue ) { - media = gp_spacing.desktop + ', ' + gp_spacing.tablet + ', ' + gp_spacing.mobile; - } - - } - - // Check if media query - media_query = ( '' !== media ) ? 'media="' + media + '"' : ''; - - jQuery( 'head' ).append( '' ); - setTimeout(function() { - jQuery( 'style#' + name ).not( ':last' ).remove(); - }, 50 ); - - jQuery('body').trigger('generate_spacing_updated'); - } ); - } ); -} - -/** - * Top bar padding - */ -generate_spacing_live_update( 'top_bar_top', 'top_bar_top', '.inside-top-bar', 'padding-top' ); -generate_spacing_live_update( 'top_bar_right', 'top_bar_right', '.inside-top-bar', 'padding-right' ); -generate_spacing_live_update( 'top_bar_bottom', 'top_bar_bottom', '.inside-top-bar', 'padding-bottom' ); -generate_spacing_live_update( 'top_bar_left', 'top_bar_left', '.inside-top-bar', 'padding-left' ); - -/** - * Header padding - */ -generate_spacing_live_update( 'header_top', 'header_top', '.inside-header', 'padding-top', false, false, gp_spacing.desktop ); -generate_spacing_live_update( 'header_right', 'header_right', '.inside-header', 'padding-right', false, false, gp_spacing.desktop ); -generate_spacing_live_update( 'header_bottom', 'header_bottom', '.inside-header', 'padding-bottom', false, false, gp_spacing.desktop ); -generate_spacing_live_update( 'header_left', 'header_left', '.inside-header', 'padding-left', false, false, gp_spacing.desktop ); - -generate_spacing_live_update( 'mobile_header_top', 'mobile_header_top', '.inside-header', 'padding-top', false, false, gp_spacing.mobile ); -generate_spacing_live_update( 'mobile_header_right', 'mobile_header_right', '.inside-header', 'padding-right', false, false, gp_spacing.mobile ); -generate_spacing_live_update( 'mobile_header_bottom', 'mobile_header_bottom', '.inside-header', 'padding-bottom', false, false, gp_spacing.mobile ); -generate_spacing_live_update( 'mobile_header_left', 'mobile_header_left', '.inside-header', 'padding-left', false, false, gp_spacing.mobile ); - -jQuery( window ).on( 'load', function() { - var containerAlignment = wp.customize( 'generate_settings[container_alignment]' ); - - if ( gp_spacing.isFlex && containerAlignment && 'text' === containerAlignment.get() ) { - generate_spacing_live_update( 'header_left_sticky_nav', 'header_left', '.main-navigation.navigation-stick:not(.has-branding) .inside-navigation.grid-container', 'padding-left', false, false, gp_spacing.desktop ); - generate_spacing_live_update( 'header_right_sticky_nav', 'header_right', '.main-navigation.navigation-stick:not(.has-branding) .inside-navigation.grid-container', 'padding-right', false, false, gp_spacing.desktop ); - - generate_spacing_live_update( 'mobile_header_left_sticky_nav', 'mobile_header_left', '.main-navigation.navigation-stick:not(.has-branding) .inside-navigation.grid-container', 'padding-left', false, false, gp_spacing.mobile ); - generate_spacing_live_update( 'mobile_header_right_sticky_nav', 'mobile_header_right', '.main-navigation.navigation-stick:not(.has-branding) .inside-navigation.grid-container', 'padding-right', false, false, gp_spacing.mobile ); - } -} ); - -/** - * Content padding - */ -var content_areas = '.separate-containers .inside-article, \ - .separate-containers .comments-area, \ - .separate-containers .page-header, \ - .separate-containers .paging-navigation, \ - .one-container .site-content, \ - .inside-page-header, \ - .wp-block-group__inner-container'; - -generate_spacing_live_update( 'content_top', 'content_top', content_areas, 'padding-top', false, false, gp_spacing.desktop ); -generate_spacing_live_update( 'content_right', 'content_right', content_areas, 'padding-right', false, false, gp_spacing.desktop ); -generate_spacing_live_update( 'content_bottom', 'content_bottom', content_areas, 'padding-bottom', false, false, gp_spacing.desktop ); -generate_spacing_live_update( 'content_left', 'content_left', content_areas, 'padding-left', false, false, gp_spacing.desktop ); - -jQuery( window ).on( 'load', function() { - var containerAlignment = wp.customize( 'generate_settings[container_alignment]' ); - - if ( gp_spacing.isFlex && containerAlignment && 'text' === containerAlignment.get() ) { - generate_spacing_live_update( 'content_left_nav_as_header', 'content_left', '.main-navigation.has-branding .inside-navigation.grid-container, .main-navigation.has-branding .inside-navigation.grid-container', 'padding-left', false, false, gp_spacing.desktop ); - generate_spacing_live_update( 'content_right_nav_as_header', 'content_right', '.main-navigation.has-branding .inside-navigation.grid-container, .main-navigation.has-branding .inside-navigation.grid-container', 'padding-right', false, false, gp_spacing.desktop ); - } -} ); - -generate_spacing_live_update( 'one_container_post_content_bottom', 'content_bottom', '.one-container.archive .post:not(:last-child):not(.is-loop-template-item),.one-container.blog .post:not(:last-child):not(.is-loop-template-item)', 'padding-bottom' ); - -/* Mobile content padding */ -generate_spacing_live_update( 'mobile_content_top', 'mobile_content_top', content_areas, 'padding-top', false, false, gp_spacing.mobile ); -generate_spacing_live_update( 'mobile_content_right', 'mobile_content_right', content_areas, 'padding-right', false, false, gp_spacing.mobile ); -generate_spacing_live_update( 'mobile_content_bottom', 'mobile_content_bottom', content_areas, 'padding-bottom', false, false, gp_spacing.mobile ); -generate_spacing_live_update( 'mobile_content_left', 'mobile_content_left', content_areas, 'padding-left', false, false, gp_spacing.mobile ); - -generate_spacing_live_update( 'content-margin-right', 'content_right', '.one-container.right-sidebar .site-main,.one-container.both-right .site-main', 'margin-right' ); -generate_spacing_live_update( 'content-margin-left', 'content_left', '.one-container.left-sidebar .site-main,.one-container.both-left .site-main', 'margin-left' ); -generate_spacing_live_update( 'content-margin-right-both', 'content_right', '.one-container.both-sidebars .site-main', 'margin-right' ); -generate_spacing_live_update( 'content-margin-left-both', 'content_left', '.one-container.both-sidebars .site-main', 'margin-left' ); - -/* Content element separator */ - -generate_spacing_live_update( 'content_element_separator_top', 'content_element_separator', '.post-image:not(:first-child), .page-content:not(:first-child), .entry-content:not(:first-child), .entry-summary:not(:first-child), footer.entry-meta', 'margin-top', false, false, false, 'em' ); -generate_spacing_live_update( 'content_element_separator_bottom', 'content_element_separator', '.post-image-above-header .inside-article div.featured-image, .post-image-above-header .inside-article div.post-image', 'margin-bottom', false, false, false, 'em' ); - -/** - * Featured image padding - */ -var featured_image_no_padding_x = '.post-image-below-header.post-image-aligned-center .no-featured-image-padding .post-image, \ - .post-image-below-header.post-image-aligned-center .no-featured-image-padding .featured-image'; - -generate_spacing_live_update( 'featured_image_padding_right', 'content_right', featured_image_no_padding_x, 'margin-right', true, false, gp_spacing.desktop ); -generate_spacing_live_update( 'featured_image_padding_left', 'content_left', featured_image_no_padding_x, 'margin-left', true, false, gp_spacing.desktop ); -generate_spacing_live_update( 'mobile_featured_image_padding_right', 'mobile_content_right', featured_image_no_padding_x, 'margin-right', true, false, gp_spacing.mobile ); -generate_spacing_live_update( 'mobile_featured_image_padding_left', 'mobile_content_left', featured_image_no_padding_x, 'margin-left', true, false, gp_spacing.mobile ); - -var featured_image_no_padding_y = '.post-image-above-header.post-image-aligned-center .no-featured-image-padding .post-image, \ - .post-image-above-header.post-image-aligned-center .no-featured-image-padding .featured-image'; - -generate_spacing_live_update( 'featured_image_padding_top', 'content_top', featured_image_no_padding_y, 'margin-top', true, false, gp_spacing.desktop ); -generate_spacing_live_update( 'featured_image_padding_right', 'content_right', featured_image_no_padding_y, 'margin-right', true, false, gp_spacing.desktop ); -generate_spacing_live_update( 'featured_image_padding_left', 'content_left', featured_image_no_padding_y, 'margin-left', true, false, gp_spacing.desktop ); -generate_spacing_live_update( 'mobile_featured_image_padding_top', 'mobile_content_top', featured_image_no_padding_y, 'margin-top', true, false, gp_spacing.mobile ); -generate_spacing_live_update( 'mobile_featured_image_padding_right', 'mobile_content_right', featured_image_no_padding_y, 'margin-right', true, false, gp_spacing.mobile ); -generate_spacing_live_update( 'mobile_featured_image_padding_left', 'mobile_content_left', featured_image_no_padding_y, 'margin-left', true, false, gp_spacing.mobile ); - -/** - * Main navigation spacing - */ -var menu_items = '.main-navigation .main-nav ul li a,\ - .main-navigation .menu-toggle,\ - .main-navigation .mobile-bar-items a,\ - .main-navigation .menu-bar-item > a'; - -// Menu item width -generate_spacing_live_update( 'menu_item_padding_left', 'menu_item', menu_items + ', .slideout-navigation button.slideout-exit', 'padding-left', false, false, gp_spacing.desktop ); -generate_spacing_live_update( 'menu_item_padding_right', 'menu_item', menu_items + ', .slideout-navigation button.slideout-exit', 'padding-right', false, false, gp_spacing.desktop ); - -// Tablet menu item width -//generate_spacing_live_update( 'tablet_menu_item_padding_left', 'tablet_menu_item', menu_items, 'padding-left', false, false, gp_spacing.tablet ); -//generate_spacing_live_update( 'tablet_menu_item_padding_right', 'tablet_menu_item', menu_items, 'padding-right', false, false, gp_spacing.tablet ); - -// Mobile menu item width -generate_spacing_live_update( 'mobile_menu_item_padding_left', 'mobile_menu_item', '.main-navigation .menu-toggle,.main-navigation .mobile-bar-items a, .main-navigation .menu-bar-item > a', 'padding-left', false, false, gp_spacing.mobile ); -generate_spacing_live_update( 'mobile_menu_item_padding_right', 'mobile_menu_item', '.main-navigation .menu-toggle,.main-navigation .mobile-bar-items a, .main-navigation .menu-bar-item > a', 'padding-right', false, false, gp_spacing.mobile ); - -// Menu item height -generate_spacing_live_update( 'menu_item_height', 'menu_item_height', menu_items, 'line-height', false, false, gp_spacing.desktop ); -generate_spacing_live_update( 'navigation_logo_height', 'menu_item_height', '.main-navigation .navigation-logo img, .main-navigation .site-logo img', 'height', false, false, gp_spacing.desktop ); -generate_spacing_live_update( 'nav_title_height', 'menu_item_height', '.navigation-branding .main-title', 'line-height', false, false, gp_spacing.desktop ); -generate_spacing_live_update( 'mobile_header_logo_height', 'menu_item_height', '.mobile-header-navigation .mobile-header-logo img', 'height', false, false, gp_spacing.desktop ); - -//generate_spacing_live_update( 'tablet_menu_item_height', 'tablet_menu_item_height', menu_items, 'line-height', false, false, gp_spacing.tablet ); -//generate_spacing_live_update( 'tablet_navigation_logo_height', 'tablet_menu_item_height', '.main-navigation .navigation-logo img', 'height', false, false, gp_spacing.tablet ); -//generate_spacing_live_update( 'tablet_mobile_header_logo_height', 'tablet_menu_item_height', '.mobile-header-navigation .mobile-header-logo img', 'height', false, false, gp_spacing.tablet ); - -generate_spacing_live_update( 'mobile_menu_item_height', 'mobile_menu_item_height', menu_items, 'line-height', false, false, gp_spacing.mobile ); -generate_spacing_live_update( 'mobile_navigation_logo_height', 'mobile_menu_item_height', '.main-navigation .site-logo.navigation-logo img, .main-navigation .site-logo img, .main-navigation .navigation-branding img', 'height', false, false, gp_spacing.mobile ); -generate_spacing_live_update( 'mobile_nav_title_height', 'menu_item_height', '.navigation-branding .main-title', 'line-height', false, false, gp_spacing.mobile ); -generate_spacing_live_update( 'mobile_mobile_header_logo_height', 'mobile_menu_item_height', '.mobile-header-navigation .site-logo.mobile-header-logo img', 'height', false, false, gp_spacing.mobile ); - -// Off canvas menu item height -wp.customize( 'generate_spacing_settings[off_canvas_menu_item_height]', function( value ) { - value.bind( function( newval ) { - - if ( '' == newval ) { - newval = wp.customize('generate_spacing_settings[menu_item_height]').get(); - } - - jQuery( 'head' ).append( '' ); - setTimeout(function() { - jQuery( 'style#off_canvas_menu_item_height' ).not( ':last' ).remove(); - }, 200 ); - - } ); -} ); - -/** - * Main sub-navigation spacing - */ -generate_spacing_live_update( 'sub_menu_item_height_top', 'sub_menu_item_height', '.main-navigation .main-nav ul ul li a', 'padding-top' ); -generate_spacing_live_update( 'sub_menu_item_height_right', 'menu_item', '.main-navigation .main-nav ul ul li a', 'padding-right', false, false, gp_spacing.desktop ); -//generate_spacing_live_update( 'tablet_sub_menu_item_height_right', 'tablet_menu_item', '.main-navigation .main-nav ul ul li a', 'padding-right', false, false, gp_spacing.tablet ); -generate_spacing_live_update( 'sub_menu_item_height_bottom', 'sub_menu_item_height', '.main-navigation .main-nav ul ul li a', 'padding-bottom' ); -generate_spacing_live_update( 'sub_menu_item_height_left', 'menu_item', '.main-navigation .main-nav ul ul li a', 'padding-left', false, false, gp_spacing.desktop ); -//generate_spacing_live_update( 'tablet_sub_menu_item_height_left', 'tablet_menu_item', '.main-navigation .main-nav ul ul li a', 'padding-left', false, false, gp_spacing.tablet ); -generate_spacing_live_update( 'sub_menu_item_offset', 'menu_item_height', '.main-navigation ul ul', 'top' ); - -/** - * Main navigation RTL arrow spacing - */ -generate_spacing_live_update( 'dropdown_menu_arrow', 'menu_item', '.menu-item-has-children .dropdown-menu-toggle', 'padding-right', false, false, gp_spacing.desktop ); -//generate_spacing_live_update( 'tablet_dropdown_menu_arrow', 'tablet_menu_item', '.menu-item-has-children .dropdown-menu-toggle', 'padding-right', false, false, gp_spacing.tablet ); - -/** - * Main sub-navigation arrow spacing - */ -generate_spacing_live_update( 'dropdown_submenu_arrow_top', 'sub_menu_item_height', '.menu-item-has-children ul .dropdown-menu-toggle', 'padding-top' ); -generate_spacing_live_update( 'dropdown_submenu_arrow_bottom', 'sub_menu_item_height', '.menu-item-has-children ul .dropdown-menu-toggle', 'padding-bottom' ); -generate_spacing_live_update( 'dropdown_submenu_arrow_margin', 'sub_menu_item_height', '.menu-item-has-children ul .dropdown-menu-toggle', 'margin-top', true ); - -/** - * Sub-Menu Width - */ -generate_spacing_live_update( 'sub_menu_width', 'sub_menu_width', '.main-navigation ul ul', 'width' ); - -/** - - * Sticky menu item height - - */ -wp.customize( 'generate_spacing_settings[sticky_menu_item_height]', function( value ) { - value.bind( function( newval ) { - - if ( '' == newval ) { - newval = wp.customize('generate_spacing_settings[menu_item_height]').get(); - } - - jQuery( 'head' ).append( '' ); - jQuery( 'head' ).append( '' ); - jQuery( 'head' ).append( '' ); - setTimeout(function() { - jQuery( 'style#sticky_menu_item_height' ).not( ':last' ).remove(); - jQuery( 'style#sticky_menu_item_logo_height' ).not( ':last' ).remove(); - jQuery( 'style#sticky_menu_item_height_transition' ).remove(); - }, 200 ); - - } ); -} ); - -// Disable the transition while we resize -wp.customize( 'generate_spacing_settings[menu_item_height]', function( value ) { - value.bind( function( newval ) { - - jQuery( 'head' ).append( '' ); - setTimeout(function() { - jQuery( 'style#menu_item_height_transition' ).remove(); - }, 200 ); - - } ); -} ); - -wp.customize( 'generate_spacing_settings[off_canvas_menu_item_height]', function( value ) { - value.bind( function( newval ) { - - jQuery( 'head' ).append( '' ); - setTimeout(function() { - jQuery( 'style#off_canvas_menu_item_height_transition' ).remove(); - }, 200 ); - - } ); -} ); - -/** - * Widget padding - */ -generate_spacing_live_update( 'widget_top', 'widget_top', '.widget-area .widget, .one-container .widget-area .widget', 'padding-top', false, false, gp_spacing.desktop ); -generate_spacing_live_update( 'widget_right', 'widget_right', '.widget-area .widget, .one-container .widget-area .widget', 'padding-right', false, false, gp_spacing.desktop ); -generate_spacing_live_update( 'widget_bottom', 'widget_bottom', '.widget-area .widget, .one-container .widget-area .widget', 'padding-bottom', false, false, gp_spacing.desktop ); -generate_spacing_live_update( 'widget_left', 'widget_left', '.widget-area .widget, .one-container .widget-area .widget', 'padding-left', false, false, gp_spacing.desktop ); - -generate_spacing_live_update( 'mobile_widget_top', 'mobile_widget_top', '.widget-area .widget', 'padding-top', false, false, gp_spacing.mobile ); -generate_spacing_live_update( 'mobile_widget_right', 'mobile_widget_right', '.widget-area .widget', 'padding-right', false, false, gp_spacing.mobile ); -generate_spacing_live_update( 'mobile_widget_bottom', 'mobile_widget_bottom', '.widget-area .widget', 'padding-bottom', false, false, gp_spacing.mobile ); -generate_spacing_live_update( 'mobile_widget_left', 'mobile_widget_left', '.widget-area .widget', 'padding-left', false, false, gp_spacing.mobile ); - - -if ( gp_spacing.isFlex ) { - /** - * Footer widget area - */ - generate_spacing_live_update( 'footer_widget_container_top', 'footer_widget_container_top', '.footer-widgets-container', 'padding-top', false, false, gp_spacing.desktop ); - generate_spacing_live_update( 'footer_widget_container_right', 'footer_widget_container_right', '.footer-widgets-container', 'padding-right', false, false, gp_spacing.desktop ); - generate_spacing_live_update( 'footer_widget_container_bottom', 'footer_widget_container_bottom', '.footer-widgets-container', 'padding-bottom', false, false, gp_spacing.desktop ); - generate_spacing_live_update( 'footer_widget_container_left', 'footer_widget_container_left', '.footer-widgets-container', 'padding-left', false, false, gp_spacing.desktop ); - - generate_spacing_live_update( 'mobile_footer_widget_container_top', 'mobile_footer_widget_container_top', '.footer-widgets-container', 'padding-top', false, false, gp_spacing.mobile ); - generate_spacing_live_update( 'mobile_footer_widget_container_right', 'mobile_footer_widget_container_right', '.footer-widgets-container', 'padding-right', false, false, gp_spacing.mobile ); - generate_spacing_live_update( 'mobile_footer_widget_container_bottom', 'mobile_footer_widget_container_bottom', '.footer-widgets-container', 'padding-bottom', false, false, gp_spacing.mobile ); - generate_spacing_live_update( 'mobile_footer_widget_container_left', 'mobile_footer_widget_container_left', '.footer-widgets-container', 'padding-left', false, false, gp_spacing.mobile ); - - /** - * Footer - */ - generate_spacing_live_update( 'footer_top', 'footer_top', '.inside-site-info', 'padding-top' ); - generate_spacing_live_update( 'footer_right', 'footer_right', '.inside-site-info', 'padding-right' ); - generate_spacing_live_update( 'footer_bottom', 'footer_bottom', '.inside-site-info', 'padding-bottom' ); - generate_spacing_live_update( 'footer_left', 'footer_left', '.inside-site-info', 'padding-left' ); -} else { - /** - * Footer widget area - */ - generate_spacing_live_update( 'footer_widget_container_top', 'footer_widget_container_top', '.footer-widgets', 'padding-top', false, false, gp_spacing.desktop ); - generate_spacing_live_update( 'footer_widget_container_right', 'footer_widget_container_right', '.footer-widgets', 'padding-right', false, false, gp_spacing.desktop ); - generate_spacing_live_update( 'footer_widget_container_bottom', 'footer_widget_container_bottom', '.footer-widgets', 'padding-bottom', false, false, gp_spacing.desktop ); - generate_spacing_live_update( 'footer_widget_container_left', 'footer_widget_container_left', '.footer-widgets', 'padding-left', false, false, gp_spacing.desktop ); - - generate_spacing_live_update( 'mobile_footer_widget_container_top', 'mobile_footer_widget_container_top', '.footer-widgets', 'padding-top', false, false, gp_spacing.mobile ); - generate_spacing_live_update( 'mobile_footer_widget_container_right', 'mobile_footer_widget_container_right', '.footer-widgets', 'padding-right', false, false, gp_spacing.mobile ); - generate_spacing_live_update( 'mobile_footer_widget_container_bottom', 'mobile_footer_widget_container_bottom', '.footer-widgets', 'padding-bottom', false, false, gp_spacing.mobile ); - generate_spacing_live_update( 'mobile_footer_widget_container_left', 'mobile_footer_widget_container_left', '.footer-widgets', 'padding-left', false, false, gp_spacing.mobile ); - - /** - * Footer - */ - generate_spacing_live_update( 'footer_top', 'footer_top', '.site-info', 'padding-top' ); - generate_spacing_live_update( 'footer_right', 'footer_right', '.site-info', 'padding-right' ); - generate_spacing_live_update( 'footer_bottom', 'footer_bottom', '.site-info', 'padding-bottom' ); - generate_spacing_live_update( 'footer_left', 'footer_left', '.site-info', 'padding-left' ); -} - - -/** - * Separator - */ - -/* Masonry */ -if ( jQuery( 'body' ).hasClass( 'masonry-enabled' ) ) { - generate_spacing_live_update( 'masonry_separator', 'separator', '.masonry-post .inside-article', 'margin-left' ); - generate_spacing_live_update( 'masonry_separator_bottom', 'separator', '.masonry-container > article', 'margin-bottom' ); - generate_spacing_live_update( 'masonry_separator_container', 'separator', '.masonry-container', 'margin-left', 'negative' ); - generate_spacing_live_update( 'masonry_separator_page_header_left', 'separator', '.masonry-enabled .page-header', 'margin-left' ); - generate_spacing_live_update( 'masonry_separator_page_header_bottom', 'separator', '.masonry-enabled .page-header', 'margin-bottom' ); - generate_spacing_live_update( 'masonry_separator_load_more', 'separator', '.separate-containers .site-main > .masonry-load-more', 'margin-bottom' ); -} - -/* Columns */ -if ( jQuery( 'body' ).hasClass( 'generate-columns-activated' ) ) { - generate_spacing_live_update( 'columns_bottom', 'separator', '.generate-columns', 'margin-bottom' ); - generate_spacing_live_update( 'columns_left', 'separator', '.generate-columns', 'padding-left' ); - generate_spacing_live_update( 'columns_container', 'separator', '.generate-columns-container', 'margin-left', 'negative' ); - generate_spacing_live_update( 'columns_page_header_bottom', 'separator', '.generate-columns-container .page-header', 'margin-bottom' ); - generate_spacing_live_update( 'columns_page_header_left', 'separator', '.generate-columns-container .page-header', 'margin-left' ); - generate_spacing_live_update( 'columns_pagination', 'separator', '.separate-containers .generate-columns-container > .paging-navigation', 'margin-left' ); -} - -/* Right sidebar */ -if ( jQuery( 'body' ).hasClass( 'right-sidebar' ) ) { - generate_spacing_live_update( 'right_sidebar_sepatator_top', 'separator', '.right-sidebar.separate-containers .site-main', 'margin-top' ); - generate_spacing_live_update( 'right_sidebar_sepatator_right', 'separator', '.right-sidebar.separate-containers .site-main', 'margin-right' ); - generate_spacing_live_update( 'right_sidebar_sepatator_bottom', 'separator', '.right-sidebar.separate-containers .site-main', 'margin-bottom' ); -} - -/* Left sidebar */ -if ( jQuery( 'body' ).hasClass( 'left-sidebar' ) ) { - generate_spacing_live_update( 'left_sidebar_sepatator_top', 'separator', '.left-sidebar.separate-containers .site-main', 'margin-top' ); - generate_spacing_live_update( 'left_sidebar_sepatator_left', 'separator', '.left-sidebar.separate-containers .site-main', 'margin-left' ); - generate_spacing_live_update( 'left_sidebar_sepatator_bottom', 'separator', '.left-sidebar.separate-containers .site-main', 'margin-bottom' ); -} - -/* Both sidebars */ -if ( jQuery( 'body' ).hasClass( 'both-sidebars' ) ) { - generate_spacing_live_update( 'both_sidebars_sepatator', 'separator', '.both-sidebars.separate-containers .site-main', 'margin' ); -} - -/* Both sidebars right */ -if ( jQuery( 'body' ).hasClass( 'both-right' ) ) { - generate_spacing_live_update( 'both_right_sidebar_sepatator_top', 'separator', '.both-right.separate-containers .site-main', 'margin-top' ); - generate_spacing_live_update( 'both_right_sidebar_sepatator_right', 'separator', '.both-right.separate-containers .site-main', 'margin-right' ); - generate_spacing_live_update( 'both_right_sidebar_sepatator_bottom', 'separator', '.both-right.separate-containers .site-main', 'margin-bottom' ); - - if ( gp_spacing.isFlex ) { - generate_spacing_live_update( 'both_right_left_sidebar', 'separator', '.both-right .inside-left-sidebar', 'margin-right', false, true ); - generate_spacing_live_update( 'both_right_right_sidebar', 'separator', '.both-right .inside-right-sidebar', 'margin-left', false, true ); - } else { - generate_spacing_live_update( 'both_right_left_sidebar', 'separator', '.both-right.separate-containers .inside-left-sidebar', 'margin-right', false, true ); - generate_spacing_live_update( 'both_right_right_sidebar', 'separator', '.both-right.separate-containers .inside-right-sidebar', 'margin-left', false, true ); - } -} - -/* Both sidebars left */ -if ( jQuery( 'body' ).hasClass( 'both-left' ) ) { - generate_spacing_live_update( 'both_left_sidebar_sepatator_top', 'separator', '.both-left.separate-containers .site-main', 'margin-top' ); - generate_spacing_live_update( 'both_left_sidebar_sepatator_right', 'separator', '.both-left.separate-containers .site-main', 'margin-bottom' ); - generate_spacing_live_update( 'both_left_sidebar_sepatator_bottom', 'separator', '.both-left.separate-containers .site-main', 'margin-left' ); - - if ( gp_spacing.isFlex ) { - generate_spacing_live_update( 'both_left_left_sidebar', 'separator', '.both-left .inside-left-sidebar', 'margin-right', false, true ); - generate_spacing_live_update( 'both_left_right_sidebar', 'separator', '.both-left .inside-right-sidebar', 'margin-left', false, true ); - } else { - generate_spacing_live_update( 'both_left_left_sidebar', 'separator', '.both-left.separate-containers .inside-left-sidebar', 'margin-right', false, true ); - generate_spacing_live_update( 'both_left_right_sidebar', 'separator', '.both-left.separate-containers .inside-right-sidebar', 'margin-left', false, true ); - } -} - -/* Main element margin */ -generate_spacing_live_update( 'site_main_separator_top', 'separator', '.separate-containers .site-main', 'margin-top' ); -generate_spacing_live_update( 'site_main_separator_bottom', 'separator', '.separate-containers .site-main', 'margin-bottom' ); - -/* Page header element */ -if ( gp_spacing.isFlex ) { - generate_spacing_live_update( 'page_header_separator_top', 'separator', '.separate-containers .featured-image', 'margin-top' ); -} else { - generate_spacing_live_update( 'page_header_separator_top', 'separator', - '.separate-containers .page-header-image, \ - .separate-containers .page-header-contained, \ - .separate-containers .page-header-image-single, \ - .separate-containers .page-header-content-single', 'margin-top' ); -} - -/* Top and bottom sidebar margin */ -generate_spacing_live_update( 'right_sidebar_separator_top', 'separator', '.separate-containers .inside-right-sidebar, .separate-containers .inside-left-sidebar', 'margin-top' ); -generate_spacing_live_update( 'right_sidebar_separator_bottom', 'separator', '.separate-containers .inside-right-sidebar, .separate-containers .inside-left-sidebar', 'margin-bottom' ); - -/* Element separators */ -if ( gp_spacing.isFlex ) { - generate_spacing_live_update( 'content_separator', 'separator', - '.sidebar .widget, \ - .site-main > *, \ - .page-header, \ - .widget-area .main-navigation', 'margin-bottom' ); -} else { - generate_spacing_live_update( 'content_separator', 'separator', - '.separate-containers .widget, \ - .separate-containers .site-main > *, \ - .separate-containers .page-header, \ - .widget-area .main-navigation', 'margin-bottom' ); -} - -/** - * Right sidebar width - */ -wp.customize( 'generate_spacing_settings[right_sidebar_width]', function( value ) { - value.bind( function( newval ) { - var body = jQuery( 'body' ); - - if ( jQuery( '#right-sidebar' ).length ) { - if ( gp_spacing.isFlex ) { - var contentWidth = 100, - leftSidebar = jQuery( '#left-sidebar' ).length ? wp.customize.value('generate_spacing_settings[left_sidebar_width]')() : 0; - - if ( body.hasClass( 'right-sidebar' ) ) { - contentWidth = ( Number( contentWidth ) - Number( newval ) ); - } else if ( ! body.hasClass( 'left-sidebar' ) && ! body.hasClass( 'no-sidebar' ) ) { - var totalSidebarWidth = ( Number( leftSidebar ) + Number( newval ) ); - - contentWidth = ( Number( contentWidth ) - Number( totalSidebarWidth ) ); - } - - jQuery( 'head' ).append( '' ); - - setTimeout(function() { - jQuery( 'style#right_sidebar_width' ).not( ':last' ).remove(); - }, 200 ); - } else { - // Left sidebar width - var left_sidebar = ( jQuery( '#left-sidebar' ).length ) ? wp.customize.value('generate_spacing_settings[left_sidebar_width]')() : 0; - - // Right sidebar class - jQuery( "#right-sidebar" ).removeClass(function (index, css) { - return (css.match (/(^|\s)grid-\S+/g) || []).join(' '); - }).removeClass(function (index, css) { - return (css.match (/(^|\s)tablet-grid-\S+/g) || []).join(' '); - }).addClass( 'grid-' + newval ).addClass( 'tablet-grid-' + newval ).addClass( 'grid-parent' ); - - // Content area class - jQuery( ".content-area" ).removeClass(function (index, css) { - return (css.match (/(^|\s)grid-\S+/g) || []).join(' '); - }).removeClass(function (index, css) { - return (css.match (/(^|\s)tablet-grid-\S+/g) || []).join(' '); - }).addClass( 'grid-' + ( 100 - newval - left_sidebar ) ).addClass( 'tablet-grid-' + ( 100 - newval - left_sidebar ) ).addClass( 'grid-parent' ); - - if ( body.hasClass( 'both-sidebars' ) ) { - var content_width = ( 100 - newval - left_sidebar ); - jQuery( '#left-sidebar' ).removeClass(function (index, css) { - return (css.match (/(^|\s)pull-\S+/g) || []).join(' '); - }).removeClass(function (index, css) { - return (css.match (/(^|\s)tablet-pull-\S+/g) || []).join(' '); - }).removeClass(function (index, css) { - return (css.match (/(^|\s)push-\S+/g) || []).join(' '); - }).removeClass(function (index, css) { - return (css.match (/(^|\s)tablet-push-\S+/g) || []).join(' '); - }).addClass( 'pull-' + ( content_width ) ).addClass( 'tablet-pull-' + ( content_width ) ); - } - - if ( body.hasClass( 'both-left' ) ) { - var total_sidebar_width = ( parseInt( left_sidebar ) + parseInt( newval ) ); - - jQuery( '#right-sidebar' ).removeClass(function (index, css) { - return (css.match (/(^|\s)pull-\S+/g) || []).join(' '); - }).removeClass(function (index, css) { - return (css.match (/(^|\s)tablet-pull-\S+/g) || []).join(' '); - }).addClass( 'pull-' + ( 100 - total_sidebar_width ) ).addClass( 'tablet-pull-' + ( 100 - total_sidebar_width ) ); - - jQuery( '#left-sidebar' ).removeClass(function (index, css) { - return (css.match (/(^|\s)pull-\S+/g) || []).join(' '); - }).removeClass(function (index, css) { - return (css.match (/(^|\s)tablet-pull-\S+/g) || []).join(' '); - }).addClass( 'pull-' + ( 100 - total_sidebar_width ) ).addClass( 'tablet-pull-' + ( 100 - total_sidebar_width ) ); - - jQuery( '.content-area' ).removeClass(function (index, css) { - return (css.match (/(^|\s)pull-\S+/g) || []).join(' '); - }).removeClass(function (index, css) { - return (css.match (/(^|\s)tablet-pull-\S+/g) || []).join(' '); - }).removeClass(function (index, css) { - return (css.match (/(^|\s)push-\S+/g) || []).join(' '); - }).removeClass(function (index, css) { - return (css.match (/(^|\s)tablet-push-\S+/g) || []).join(' '); - }).addClass( 'push-' + ( total_sidebar_width ) ).addClass( 'tablet-push-' + ( total_sidebar_width ) ); - } - } - jQuery('body').trigger('generate_spacing_updated'); - } - } ); -} ); - -/** - * Left sidebar width - */ -wp.customize( 'generate_spacing_settings[left_sidebar_width]', function( value ) { - value.bind( function( newval ) { - var body = jQuery( 'body' ); - if ( jQuery( '#left-sidebar' ).length ) { - if ( gp_spacing.isFlex ) { - var contentWidth = 100, - rightSidebar = jQuery( '#right-sidebar' ).length ? wp.customize.value('generate_spacing_settings[right_sidebar_width]')() : 0; - - if ( body.hasClass( 'left-sidebar' ) ) { - contentWidth = ( Number( contentWidth ) - Number( newval ) ); - } else if ( ! body.hasClass( 'right-sidebar' ) && ! body.hasClass( 'no-sidebar' ) ) { - var totalSidebarWidth = ( Number( rightSidebar ) + Number( newval ) ); - - contentWidth = ( Number( contentWidth ) - Number( totalSidebarWidth ) ); - } - - jQuery( 'head' ).append( '' ); - - setTimeout(function() { - jQuery( 'style#left_sidebar_width' ).not( ':last' ).remove(); - }, 200 ); - } else { - // Right sidebar width - var right_sidebar = ( jQuery( '#right-sidebar' ).length ) ? wp.customize.value('generate_spacing_settings[right_sidebar_width]')() : 0; - - // Right sidebar class - jQuery( "#left-sidebar" ).removeClass(function (index, css) { - return (css.match (/(^|\s)grid-\S+/g) || []).join(' '); - }).removeClass(function (index, css) { - return (css.match (/(^|\s)tablet-grid-\S+/g) || []).join(' '); - }).addClass( 'grid-' + newval ).addClass( 'tablet-grid-' + newval ).addClass( 'grid-parent' ); - - // Content area class - jQuery( ".content-area" ).removeClass(function (index, css) { - return (css.match (/(^|\s)grid-\S+/g) || []).join(' '); - }).removeClass(function (index, css) { - return (css.match (/(^|\s)tablet-grid-\S+/g) || []).join(' '); - }).addClass( 'grid-' + ( 100 - newval - right_sidebar ) ).addClass( 'tablet-grid-' + ( 100 - newval - right_sidebar ) ).addClass( 'grid-parent' ); - - if ( body.hasClass( 'left-sidebar' ) ) { - jQuery( '#left-sidebar' ).removeClass(function (index, css) { - return (css.match (/(^|\s)pull-\S+/g) || []).join(' '); - }).removeClass(function (index, css) { - return (css.match (/(^|\s)tablet-pull-\S+/g) || []).join(' '); - }).removeClass(function (index, css) { - return (css.match (/(^|\s)push-\S+/g) || []).join(' '); - }).removeClass(function (index, css) { - return (css.match (/(^|\s)tablet-push-\S+/g) || []).join(' '); - }).addClass( 'pull-' + ( 100 - newval ) ).addClass( 'tablet-pull-' + ( 100 - newval ) ); - - jQuery( '.content-area' ).removeClass(function (index, css) { - return (css.match (/(^|\s)pull-\S+/g) || []).join(' '); - }).removeClass(function (index, css) { - return (css.match (/(^|\s)tablet-pull-\S+/g) || []).join(' '); - }).removeClass(function (index, css) { - return (css.match (/(^|\s)push-\S+/g) || []).join(' '); - }).removeClass(function (index, css) { - return (css.match (/(^|\s)tablet-push-\S+/g) || []).join(' '); - }).addClass( 'push-' + newval ).addClass( 'tablet-push-' + newval ).addClass( 'grid-' + ( 100 - newval ) ).addClass( 'tablet-grid-' + ( 100 - newval ) ); - } - - if ( body.hasClass( 'both-sidebars' ) ) { - var content_width = ( 100 - newval - right_sidebar ); - jQuery( '#left-sidebar' ).removeClass(function (index, css) { - return (css.match (/(^|\s)pull-\S+/g) || []).join(' '); - }).removeClass(function (index, css) { - return (css.match (/(^|\s)tablet-pull-\S+/g) || []).join(' '); - }).removeClass(function (index, css) { - return (css.match (/(^|\s)push-\S+/g) || []).join(' '); - }).removeClass(function (index, css) { - return (css.match (/(^|\s)tablet-push-\S+/g) || []).join(' '); - }).addClass( 'pull-' + ( content_width ) ).addClass( 'tablet-pull-' + ( content_width ) ); - - jQuery( '.content-area' ).removeClass(function (index, css) { - return (css.match (/(^|\s)pull-\S+/g) || []).join(' '); - }).removeClass(function (index, css) { - return (css.match (/(^|\s)tablet-pull-\S+/g) || []).join(' '); - }).removeClass(function (index, css) { - return (css.match (/(^|\s)push-\S+/g) || []).join(' '); - }).removeClass(function (index, css) { - return (css.match (/(^|\s)tablet-push-\S+/g) || []).join(' '); - }).addClass( 'push-' + ( newval ) ).addClass( 'tablet-push-' + ( newval ) ); - } - - if ( body.hasClass( 'both-left' ) ) { - var content_width = ( 100 - newval - right_sidebar ); - var total_sidebar_width = ( parseInt( right_sidebar ) + parseInt( newval ) ); - - jQuery( '#right-sidebar' ).removeClass(function (index, css) { - return (css.match (/(^|\s)pull-\S+/g) || []).join(' '); - }).removeClass(function (index, css) { - return (css.match (/(^|\s)tablet-pull-\S+/g) || []).join(' '); - }).addClass( 'pull-' + ( 100 - total_sidebar_width ) ).addClass( 'tablet-pull-' + ( 100 - total_sidebar_width ) ); - - jQuery( '#left-sidebar' ).removeClass(function (index, css) { - return (css.match (/(^|\s)pull-\S+/g) || []).join(' '); - }).removeClass(function (index, css) { - return (css.match (/(^|\s)tablet-pull-\S+/g) || []).join(' '); - }).addClass( 'pull-' + ( 100 - total_sidebar_width ) ).addClass( 'tablet-pull-' + ( 100 - total_sidebar_width ) ); - - jQuery( '.content-area' ).removeClass(function (index, css) { - return (css.match (/(^|\s)pull-\S+/g) || []).join(' '); - }).removeClass(function (index, css) { - return (css.match (/(^|\s)tablet-pull-\S+/g) || []).join(' '); - }).removeClass(function (index, css) { - return (css.match (/(^|\s)push-\S+/g) || []).join(' '); - }).removeClass(function (index, css) { - return (css.match (/(^|\s)tablet-push-\S+/g) || []).join(' '); - }).addClass( 'push-' + ( total_sidebar_width ) ).addClass( 'tablet-push-' + ( total_sidebar_width ) ); - } - } - jQuery('body').trigger('generate_spacing_updated'); - } - } ); -} ); diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/spacing/functions/customizer/navigation-spacing.php b/wp-content/upgrade-temp-backup/plugins/gp-premium/spacing/functions/customizer/navigation-spacing.php deleted file mode 100644 index 09884e67..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/spacing/functions/customizer/navigation-spacing.php +++ /dev/null @@ -1,281 +0,0 @@ -add_section( - 'generate_spacing_navigation', - array( - 'title' => __( 'Primary Navigation', 'gp-premium' ), - 'capability' => 'edit_theme_options', - 'priority' => 15, - 'panel' => 'generate_spacing_panel', - ) -); - -// If our new Layout section doesn't exist, use the old navigation section. -$navigation_section = ( $wp_customize->get_panel( 'generate_layout_panel' ) ) ? 'generate_layout_navigation' : 'generate_spacing_navigation'; - -// Menu item width. -$wp_customize->add_setting( - 'generate_spacing_settings[menu_item]', - array( - 'default' => $defaults['menu_item'], - 'type' => 'option', - 'capability' => 'edit_theme_options', - 'sanitize_callback' => 'absint', - 'transport' => 'postMessage', - ) -); - -$wp_customize->add_setting( - 'generate_spacing_settings[mobile_menu_item]', - array( - 'default' => $defaults['mobile_menu_item'], - 'type' => 'option', - 'capability' => 'edit_theme_options', - 'sanitize_callback' => 'generate_premium_sanitize_empty_absint', - 'transport' => 'postMessage', - ) -); - -$wp_customize->add_control( - new GeneratePress_Pro_Range_Slider_Control( - $wp_customize, - 'generate_spacing_settings[menu_item]', - array( - 'label' => __( 'Menu Item Width', 'gp-premium' ), - 'section' => $navigation_section, - 'settings' => array( - 'desktop' => 'generate_spacing_settings[menu_item]', - 'mobile' => 'generate_spacing_settings[mobile_menu_item]', - ), - 'choices' => array( - 'desktop' => array( - 'min' => 0, - 'max' => 100, - 'step' => 1, - 'edit' => true, - 'unit' => 'px', - ), - 'mobile' => array( - 'min' => 0, - 'max' => 100, - 'step' => 1, - 'edit' => true, - 'unit' => 'px', - ), - ), - 'priority' => 220, - ) - ) -); - -// Menu item height. -$wp_customize->add_setting( - 'generate_spacing_settings[menu_item_height]', - array( - 'default' => $defaults['menu_item_height'], - 'type' => 'option', - 'capability' => 'edit_theme_options', - 'sanitize_callback' => 'absint', - 'transport' => 'postMessage', - ) -); - -$wp_customize->add_setting( - 'generate_spacing_settings[mobile_menu_item_height]', - array( - 'default' => $defaults['mobile_menu_item_height'], - 'type' => 'option', - 'capability' => 'edit_theme_options', - 'sanitize_callback' => 'generate_premium_sanitize_empty_absint', - 'transport' => 'postMessage', - ) -); - -$wp_customize->add_control( - new GeneratePress_Pro_Range_Slider_Control( - $wp_customize, - 'generate_spacing_settings[menu_item_height]', - array( - 'label' => __( 'Menu Item Height', 'gp-premium' ), - 'section' => $navigation_section, - 'settings' => array( - 'desktop' => 'generate_spacing_settings[menu_item_height]', - 'mobile' => 'generate_spacing_settings[mobile_menu_item_height]', - ), - 'choices' => array( - 'desktop' => array( - 'min' => 20, - 'max' => 150, - 'step' => 1, - 'edit' => true, - 'unit' => 'px', - ), - 'mobile' => array( - 'min' => 20, - 'max' => 150, - 'step' => 1, - 'edit' => true, - 'unit' => 'px', - ), - ), - 'priority' => 240, - ) - ) -); - -// Sub-menu item height. -$wp_customize->add_setting( - 'generate_spacing_settings[sub_menu_item_height]', - array( - 'default' => $defaults['sub_menu_item_height'], - 'type' => 'option', - 'capability' => 'edit_theme_options', - 'sanitize_callback' => 'absint', - 'transport' => 'postMessage', - ) -); - -$wp_customize->add_control( - new GeneratePress_Pro_Range_Slider_Control( - $wp_customize, - 'generate_spacing_settings[sub_menu_item_height]', - array( - 'label' => __( 'Sub-Menu Item Height', 'gp-premium' ), - 'section' => $navigation_section, - 'settings' => array( - 'desktop' => 'generate_spacing_settings[sub_menu_item_height]', - ), - 'choices' => array( - 'desktop' => array( - 'min' => 0, - 'max' => 50, - 'step' => 1, - 'edit' => true, - 'unit' => 'px', - ), - ), - 'priority' => 260, - ) - ) -); - -if ( isset( $defaults['sub_menu_width'] ) ) { - $wp_customize->add_setting( - 'generate_spacing_settings[sub_menu_width]', - array( - 'default' => $defaults['sub_menu_width'], - 'type' => 'option', - 'capability' => 'edit_theme_options', - 'sanitize_callback' => 'absint', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - new GeneratePress_Pro_Range_Slider_Control( - $wp_customize, - 'generate_spacing_settings[sub_menu_width]', - array( - 'label' => __( 'Sub-Menu Width', 'gp-premium' ), - 'section' => $navigation_section, - 'settings' => array( - 'desktop' => 'generate_spacing_settings[sub_menu_width]', - ), - 'choices' => array( - 'desktop' => array( - 'min' => 100, - 'max' => 500, - 'step' => 1, - 'edit' => true, - 'unit' => 'px', - ), - ), - 'priority' => 265, - ) - ) - ); -} - -// Sticky menu height. -$wp_customize->add_setting( - 'generate_spacing_settings[sticky_menu_item_height]', - array( - 'default' => $defaults['sticky_menu_item_height'], - 'type' => 'option', - 'capability' => 'edit_theme_options', - 'sanitize_callback' => 'generate_premium_sanitize_empty_absint', - 'transport' => 'postMessage', - ) -); - -$wp_customize->add_control( - new GeneratePress_Pro_Range_Slider_Control( - $wp_customize, - 'generate_spacing_settings[sticky_menu_item_height]', - array( - 'label' => __( 'Menu Item Height', 'gp-premium' ), - 'section' => 'menu_plus_sticky_menu', - 'settings' => array( - 'desktop' => 'generate_spacing_settings[sticky_menu_item_height]', - ), - 'choices' => array( - 'desktop' => array( - 'min' => 20, - 'max' => 150, - 'step' => 1, - 'edit' => true, - 'unit' => 'px', - ), - ), - 'priority' => 150, - 'active_callback' => 'generate_sticky_navigation_activated', - ) - ) -); - -// Off canvas menu height. -$wp_customize->add_setting( - 'generate_spacing_settings[off_canvas_menu_item_height]', - array( - 'default' => $defaults['off_canvas_menu_item_height'], - 'type' => 'option', - 'capability' => 'edit_theme_options', - 'sanitize_callback' => 'generate_premium_sanitize_empty_absint', - 'transport' => 'postMessage', - ) -); - -$wp_customize->add_control( - new GeneratePress_Pro_Range_Slider_Control( - $wp_customize, - 'generate_spacing_settings[off_canvas_menu_item_height]', - array( - 'label' => __( 'Menu Item Height', 'gp-premium' ), - 'section' => 'menu_plus_slideout_menu', - 'settings' => array( - 'desktop' => 'generate_spacing_settings[off_canvas_menu_item_height]', - ), - 'choices' => array( - 'desktop' => array( - 'min' => 20, - 'max' => 150, - 'step' => 1, - 'edit' => true, - 'unit' => 'px', - ), - ), - 'priority' => 200, - 'active_callback' => 'generate_slideout_navigation_activated', - ) - ) -); diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/spacing/functions/customizer/secondary-nav-spacing.php b/wp-content/upgrade-temp-backup/plugins/gp-premium/spacing/functions/customizer/secondary-nav-spacing.php deleted file mode 100644 index dd565a57..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/spacing/functions/customizer/secondary-nav-spacing.php +++ /dev/null @@ -1,159 +0,0 @@ -get_section( 'secondary_nav_section' ) ) { - return; - } - - // Get our controls. - require_once GP_LIBRARY_DIRECTORY . 'customizer-helpers.php'; - - // Get our defaults. - $defaults = generate_secondary_nav_get_defaults(); - - // Remove our old label control if it exists. - // It only would if the user is using an old Secondary Nav add-on version. - if ( $wp_customize->get_control( 'generate_secondary_navigation_spacing_title' ) ) { - $wp_customize->remove_control( 'generate_secondary_navigation_spacing_title' ); - } - - // Menu item width. - $wp_customize->add_setting( - 'generate_secondary_nav_settings[secondary_menu_item]', - array( - 'default' => $defaults['secondary_menu_item'], - 'type' => 'option', - 'capability' => 'edit_theme_options', - 'sanitize_callback' => 'absint', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - new GeneratePress_Pro_Range_Slider_Control( - $wp_customize, - 'generate_secondary_nav_settings[secondary_menu_item]', - array( - 'label' => __( 'Menu Item Width', 'gp-premium' ), - 'section' => 'secondary_nav_section', - 'settings' => array( - 'desktop' => 'generate_secondary_nav_settings[secondary_menu_item]', - ), - 'choices' => array( - 'desktop' => array( - 'min' => 0, - 'max' => 100, - 'step' => 1, - 'edit' => true, - 'unit' => 'px', - ), - ), - 'priority' => 220, - ) - ) - ); - - // Menu item height. - $wp_customize->add_setting( - 'generate_secondary_nav_settings[secondary_menu_item_height]', - array( - 'default' => $defaults['secondary_menu_item_height'], - 'type' => 'option', - 'capability' => 'edit_theme_options', - 'sanitize_callback' => 'absint', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - new GeneratePress_Pro_Range_Slider_Control( - $wp_customize, - 'generate_secondary_nav_settings[secondary_menu_item_height]', - array( - 'label' => __( 'Menu Item Height', 'gp-premium' ), - 'section' => 'secondary_nav_section', - 'settings' => array( - 'desktop' => 'generate_secondary_nav_settings[secondary_menu_item_height]', - ), - 'choices' => array( - 'desktop' => array( - 'min' => 20, - 'max' => 150, - 'step' => 1, - 'edit' => true, - 'unit' => 'px', - ), - ), - 'priority' => 240, - ) - ) - ); - - // Sub-menu height. - $wp_customize->add_setting( - 'generate_secondary_nav_settings[secondary_sub_menu_item_height]', - array( - 'default' => $defaults['secondary_sub_menu_item_height'], - 'type' => 'option', - 'capability' => 'edit_theme_options', - 'sanitize_callback' => 'absint', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - new GeneratePress_Pro_Range_Slider_Control( - $wp_customize, - 'generate_secondary_nav_settings[secondary_sub_menu_item_height]', - array( - 'label' => __( 'Sub-Menu Item Height', 'gp-premium' ), - 'section' => 'secondary_nav_section', - 'settings' => array( - 'desktop' => 'generate_secondary_nav_settings[secondary_sub_menu_item_height]', - ), - 'choices' => array( - 'desktop' => array( - 'min' => 0, - 'max' => 50, - 'step' => 1, - 'edit' => true, - 'unit' => 'px', - ), - ), - 'priority' => 260, - ) - ) - ); - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/spacing/functions/customizer/sidebar-spacing.php b/wp-content/upgrade-temp-backup/plugins/gp-premium/spacing/functions/customizer/sidebar-spacing.php deleted file mode 100644 index b8c3b0c7..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/spacing/functions/customizer/sidebar-spacing.php +++ /dev/null @@ -1,211 +0,0 @@ -add_section( - 'generate_spacing_sidebar', - array( - 'title' => __( 'Sidebars', 'gp-premium' ), - 'capability' => 'edit_theme_options', - 'priority' => 15, - 'panel' => 'generate_spacing_panel', - ) -); - -// Add our controls to the Layout panel if it exists. -// If not, use the old section. -$widget_section = ( $wp_customize->get_panel( 'generate_layout_panel' ) ) ? 'generate_layout_sidebars' : 'generate_spacing_sidebar'; - -// Widget padding top. -$wp_customize->add_setting( - 'generate_spacing_settings[widget_top]', - array( - 'default' => $defaults['widget_top'], - 'type' => 'option', - 'sanitize_callback' => 'absint', - 'transport' => 'postMessage', - ) -); - -// Widget padding right. -$wp_customize->add_setting( - 'generate_spacing_settings[widget_right]', - array( - 'default' => $defaults['widget_right'], - 'type' => 'option', - 'sanitize_callback' => 'absint', - 'transport' => 'postMessage', - ) -); - -// Widget padding bottom. -$wp_customize->add_setting( - 'generate_spacing_settings[widget_bottom]', - array( - 'default' => $defaults['widget_bottom'], - 'type' => 'option', - 'sanitize_callback' => 'absint', - 'transport' => 'postMessage', - ) -); - -// Widget padding left. -$wp_customize->add_setting( - 'generate_spacing_settings[widget_left]', - array( - 'default' => $defaults['widget_left'], - 'type' => 'option', - 'sanitize_callback' => 'absint', - 'transport' => 'postMessage', - ) -); - -// Widget padding top. -$wp_customize->add_setting( - 'generate_spacing_settings[mobile_widget_top]', - array( - 'default' => $defaults['mobile_widget_top'], - 'type' => 'option', - 'sanitize_callback' => 'absint', - 'transport' => 'postMessage', - ) -); - -// Widget padding right. -$wp_customize->add_setting( - 'generate_spacing_settings[mobile_widget_right]', - array( - 'default' => $defaults['mobile_widget_right'], - 'type' => 'option', - 'sanitize_callback' => 'absint', - 'transport' => 'postMessage', - ) -); - -// Widget padding bottom. -$wp_customize->add_setting( - 'generate_spacing_settings[mobile_widget_bottom]', - array( - 'default' => $defaults['mobile_widget_bottom'], - 'type' => 'option', - 'sanitize_callback' => 'absint', - 'transport' => 'postMessage', - ) -); - -// Widget padding left. -$wp_customize->add_setting( - 'generate_spacing_settings[mobile_widget_left]', - array( - 'default' => $defaults['mobile_widget_left'], - 'type' => 'option', - 'sanitize_callback' => 'absint', - 'transport' => 'postMessage', - ) -); - -// Make use of the widget padding settings. -$wp_customize->add_control( - new GeneratePress_Spacing_Control( - $wp_customize, - 'widget_spacing', - array( - 'type' => 'generatepress-spacing', - 'label' => esc_html__( 'Widget Padding', 'gp-premium' ), - 'section' => $widget_section, - 'settings' => array( - 'desktop_top' => 'generate_spacing_settings[widget_top]', - 'desktop_right' => 'generate_spacing_settings[widget_right]', - 'desktop_bottom' => 'generate_spacing_settings[widget_bottom]', - 'desktop_left' => 'generate_spacing_settings[widget_left]', - 'mobile_top' => 'generate_spacing_settings[mobile_widget_top]', - 'mobile_right' => 'generate_spacing_settings[mobile_widget_right]', - 'mobile_bottom' => 'generate_spacing_settings[mobile_widget_bottom]', - 'mobile_left' => 'generate_spacing_settings[mobile_widget_left]', - ), - 'element' => 'widget', - 'priority' => 99, - ) - ) -); - -// Left sidebar width. -$wp_customize->add_setting( - 'generate_spacing_settings[left_sidebar_width]', - array( - 'default' => $defaults['left_sidebar_width'], - 'type' => 'option', - 'capability' => 'edit_theme_options', - 'sanitize_callback' => 'absint', - 'transport' => 'postMessage', - ) -); - -$wp_customize->add_control( - new GeneratePress_Pro_Range_Slider_Control( - $wp_customize, - 'generate_spacing_settings[left_sidebar_width]', - array( - 'label' => esc_html__( 'Left Sidebar Width', 'gp-premium' ), - 'section' => $widget_section, - 'settings' => array( - 'desktop' => 'generate_spacing_settings[left_sidebar_width]', - ), - 'choices' => array( - 'desktop' => array( - 'min' => 15, - 'max' => 50, - 'step' => 5, - 'edit' => false, - 'unit' => '%', - ), - ), - 'priority' => 125, - ) - ) -); - -// Right sidebar width. -$wp_customize->add_setting( - 'generate_spacing_settings[right_sidebar_width]', - array( - 'default' => $defaults['right_sidebar_width'], - 'type' => 'option', - 'capability' => 'edit_theme_options', - 'sanitize_callback' => 'absint', - 'transport' => 'postMessage', - ) -); - -$wp_customize->add_control( - new GeneratePress_Pro_Range_Slider_Control( - $wp_customize, - 'generate_spacing_settings[right_sidebar_width]', - array( - 'label' => esc_html__( 'Right Sidebar Width', 'gp-premium' ), - 'section' => $widget_section, - 'settings' => array( - 'desktop' => 'generate_spacing_settings[right_sidebar_width]', - ), - 'choices' => array( - 'desktop' => array( - 'min' => 15, - 'max' => 50, - 'step' => 5, - 'edit' => false, - 'unit' => '%', - ), - ), - 'priority' => 125, - ) - ) -); diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/spacing/functions/customizer/top-bar-spacing.php b/wp-content/upgrade-temp-backup/plugins/gp-premium/spacing/functions/customizer/top-bar-spacing.php deleted file mode 100644 index ecc0f085..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/spacing/functions/customizer/top-bar-spacing.php +++ /dev/null @@ -1,73 +0,0 @@ -add_setting( - 'generate_spacing_settings[top_bar_top]', - array( - 'default' => $defaults['top_bar_top'], - 'type' => 'option', - 'sanitize_callback' => 'absint', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_setting( - 'generate_spacing_settings[top_bar_right]', - array( - 'default' => $defaults['top_bar_right'], - 'type' => 'option', - 'sanitize_callback' => 'absint', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_setting( - 'generate_spacing_settings[top_bar_bottom]', - array( - 'default' => $defaults['top_bar_bottom'], - 'type' => 'option', - 'sanitize_callback' => 'absint', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_setting( - 'generate_spacing_settings[top_bar_left]', - array( - 'default' => $defaults['top_bar_left'], - 'type' => 'option', - 'sanitize_callback' => 'absint', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - new GeneratePress_Spacing_Control( - $wp_customize, - 'top_bar_spacing', - array( - 'type' => 'generatepress-spacing', - 'label' => esc_html__( 'Top Bar Padding', 'gp-premium' ), - 'section' => 'generate_top_bar', - 'settings' => array( - 'desktop_top' => 'generate_spacing_settings[top_bar_top]', - 'desktop_right' => 'generate_spacing_settings[top_bar_right]', - 'desktop_bottom' => 'generate_spacing_settings[top_bar_bottom]', - 'desktop_left' => 'generate_spacing_settings[top_bar_left]', - ), - 'element' => 'top_bar', - 'priority' => 99, - 'active_callback' => 'generate_premium_is_top_bar_active', - ) - ) - ); -} diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/spacing/functions/functions.php b/wp-content/upgrade-temp-backup/plugins/gp-premium/spacing/functions/functions.php deleted file mode 100644 index a428989c..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/spacing/functions/functions.php +++ /dev/null @@ -1,362 +0,0 @@ -register_control_type( 'GeneratePress_Pro_Range_Slider_Control' ); - $wp_customize->register_control_type( 'GeneratePress_Spacing_Control' ); - } - - // Add our Spacing panel. - // This is only used if the Layout panel in the free theme doesn't exist. - if ( class_exists( 'WP_Customize_Panel' ) ) { - if ( ! $wp_customize->get_panel( 'generate_spacing_panel' ) ) { - $wp_customize->add_panel( - 'generate_spacing_panel', - array( - 'capability' => 'edit_theme_options', - 'theme_supports' => '', - 'title' => __( 'Spacing', 'gp-premium' ), - 'description' => __( 'Change the spacing for various elements using pixels.', 'gp-premium' ), - 'priority' => 35, - ) - ); - } - } - - require_once plugin_dir_path( __FILE__ ) . 'customizer/top-bar-spacing.php'; - require_once plugin_dir_path( __FILE__ ) . 'customizer/header-spacing.php'; - require_once plugin_dir_path( __FILE__ ) . 'customizer/content-spacing.php'; - require_once plugin_dir_path( __FILE__ ) . 'customizer/sidebar-spacing.php'; - require_once plugin_dir_path( __FILE__ ) . 'customizer/navigation-spacing.php'; - require_once plugin_dir_path( __FILE__ ) . 'customizer/footer-spacing.php'; - - } -} - -if ( ! function_exists( 'generate_right_sidebar_width' ) ) { - add_filter( 'generate_right_sidebar_width', 'generate_right_sidebar_width' ); - /** - * Set our right sidebar width. - * - * @param int $width The sidebar width. - */ - function generate_right_sidebar_width( $width ) { - // Bail if we don't have our defaults. - if ( ! function_exists( 'generate_spacing_get_defaults' ) ) { - return $width; - } - - $spacing_settings = wp_parse_args( - get_option( 'generate_spacing_settings', array() ), - generate_spacing_get_defaults() - ); - - return absint( $spacing_settings['right_sidebar_width'] ); - } -} - -if ( ! function_exists( 'generate_left_sidebar_width' ) ) { - add_filter( 'generate_left_sidebar_width', 'generate_left_sidebar_width' ); - /** - * Set our left sidebar width. - * - * @param int $width The sidebar width. - */ - function generate_left_sidebar_width( $width ) { - // Bail if we don't have our defaults. - if ( ! function_exists( 'generate_spacing_get_defaults' ) ) { - return $width; - } - - $spacing_settings = wp_parse_args( - get_option( 'generate_spacing_settings', array() ), - generate_spacing_get_defaults() - ); - - return absint( $spacing_settings['left_sidebar_width'] ); - } -} - -if ( ! function_exists( 'generate_spacing_customizer_live_preview' ) ) { - add_action( 'customize_preview_init', 'generate_spacing_customizer_live_preview' ); - /** - * Add our live preview JS - */ - function generate_spacing_customizer_live_preview() { - wp_enqueue_script( - 'generate-spacing-customizer', - trailingslashit( plugin_dir_url( __FILE__ ) ) . 'customizer/js/customizer.js', - array( 'jquery', 'customize-preview' ), - GENERATE_SPACING_VERSION, - true - ); - - wp_localize_script( - 'generate-spacing-customizer', - 'gp_spacing', - array( - 'mobile' => generate_premium_get_media_query( 'mobile' ), - 'tablet' => generate_premium_get_media_query( 'tablet' ), - 'desktop' => generate_premium_get_media_query( 'desktop' ), - 'isFlex' => function_exists( 'generate_is_using_flexbox' ) && generate_is_using_flexbox(), - ) - ); - } -} - -if ( ! function_exists( 'generate_include_spacing_defaults' ) ) { - /** - * Check if we should include our default.css file. - * - * @since 1.3.42 - */ - function generate_include_spacing_defaults() { - return true; - } -} - -if ( ! function_exists( 'generate_spacing_premium_defaults' ) ) { - add_filter( 'generate_spacing_option_defaults', 'generate_spacing_premium_defaults' ); - /** - * Add premium spacing defaults. - * - * @since 1.3 - * @param array $defaults The existing defaults. - */ - function generate_spacing_premium_defaults( $defaults ) { - $defaults['mobile_menu_item'] = ''; - $defaults['mobile_menu_item_height'] = ''; - $defaults['sticky_menu_item_height'] = ''; - $defaults['off_canvas_menu_item_height'] = ''; - $defaults['content_element_separator'] = '2'; // em. - - // These defaults were added to GeneratePress (free) in 3.0.0. - if ( defined( 'GENERATE_VERSION' ) && version_compare( GENERATE_VERSION, '3.0.0-alpha.1', '<' ) ) { - $defaults['mobile_header_top'] = ''; - $defaults['mobile_header_right'] = ''; - $defaults['mobile_header_bottom'] = ''; - $defaults['mobile_header_left'] = ''; - - $defaults['mobile_widget_top'] = ''; - $defaults['mobile_widget_right'] = ''; - $defaults['mobile_widget_bottom'] = ''; - $defaults['mobile_widget_left'] = ''; - - $defaults['mobile_footer_widget_container_top'] = ''; - $defaults['mobile_footer_widget_container_right'] = ''; - $defaults['mobile_footer_widget_container_bottom'] = ''; - $defaults['mobile_footer_widget_container_left'] = ''; - } - - return $defaults; - } -} - -/** - * Build our premium CSS. - */ -function generate_spacing_do_premium_css() { - // Bail if we don't have our defaults. - if ( ! function_exists( 'generate_spacing_get_defaults' ) ) { - return; - } - - $spacing_settings = wp_parse_args( - get_option( 'generate_spacing_settings', array() ), - generate_spacing_get_defaults() - ); - - require_once GP_LIBRARY_DIRECTORY . 'class-make-css.php'; - $premium_css = new GeneratePress_Pro_CSS(); - $css_output = ''; - - // Mobile spacing. - $premium_css->start_media_query( generate_premium_get_media_query( 'mobile-menu' ) ); - - if ( '' !== $spacing_settings['mobile_menu_item'] ) { - $premium_css->set_selector( '.main-navigation .menu-toggle,.main-navigation .mobile-bar-items a,.main-navigation .menu-bar-item > a' ); - $premium_css->add_property( 'padding-left', absint( $spacing_settings['mobile_menu_item'] ), false, 'px' ); - $premium_css->add_property( 'padding-right', absint( $spacing_settings['mobile_menu_item'] ), false, 'px' ); - } - - if ( '' !== $spacing_settings['mobile_menu_item_height'] ) { - $premium_css->set_selector( '.main-navigation .main-nav ul li a,.main-navigation .menu-toggle,.main-navigation .mobile-bar-items a,.main-navigation .menu-bar-item > a' ); - $premium_css->add_property( 'line-height', absint( $spacing_settings['mobile_menu_item_height'] ), false, 'px' ); - - $premium_css->set_selector( '.main-navigation .site-logo.navigation-logo img, .mobile-header-navigation .site-logo.mobile-header-logo img, .navigation-search input[type="search"]' ); - $premium_css->add_property( 'height', absint( $spacing_settings['mobile_menu_item_height'] ), false, 'px' ); - } - - $premium_css->stop_media_query(); - - // This CSS was added to GeneratePress (free) in 3.0.0. - if ( defined( 'GENERATE_VERSION' ) && version_compare( GENERATE_VERSION, '3.0.0-alpha.1', '<' ) ) { - $premium_css->start_media_query( generate_premium_get_media_query( 'mobile' ) ); - - $premium_css->set_selector( '.inside-header' ); - - if ( '' !== $spacing_settings['mobile_header_top'] ) { - $premium_css->add_property( 'padding-top', absint( $spacing_settings['mobile_header_top'] ), false, 'px' ); - } - - if ( '' !== $spacing_settings['mobile_header_right'] ) { - $premium_css->add_property( 'padding-right', absint( $spacing_settings['mobile_header_right'] ), false, 'px' ); - } - - if ( '' !== $spacing_settings['mobile_header_bottom'] ) { - $premium_css->add_property( 'padding-bottom', absint( $spacing_settings['mobile_header_bottom'] ), false, 'px' ); - } - - if ( '' !== $spacing_settings['mobile_header_left'] ) { - $premium_css->add_property( 'padding-left', absint( $spacing_settings['mobile_header_left'] ), false, 'px' ); - } - - $premium_css->set_selector( '.widget-area .widget' ); - - if ( '' !== $spacing_settings['mobile_widget_top'] ) { - $premium_css->add_property( 'padding-top', absint( $spacing_settings['mobile_widget_top'] ), false, 'px' ); - } - - if ( '' !== $spacing_settings['mobile_widget_right'] ) { - $premium_css->add_property( 'padding-right', absint( $spacing_settings['mobile_widget_right'] ), false, 'px' ); - } - - if ( '' !== $spacing_settings['mobile_widget_bottom'] ) { - $premium_css->add_property( 'padding-bottom', absint( $spacing_settings['mobile_widget_bottom'] ), false, 'px' ); - } - - if ( '' !== $spacing_settings['mobile_widget_left'] ) { - $premium_css->add_property( 'padding-left', absint( $spacing_settings['mobile_widget_left'] ), false, 'px' ); - } - - $premium_css->set_selector( '.footer-widgets' ); - - if ( '' !== $spacing_settings['mobile_footer_widget_container_top'] ) { - $premium_css->add_property( 'padding-top', absint( $spacing_settings['mobile_footer_widget_container_top'] ), false, 'px' ); - } - - if ( '' !== $spacing_settings['mobile_footer_widget_container_right'] ) { - $premium_css->add_property( 'padding-right', absint( $spacing_settings['mobile_footer_widget_container_right'] ), false, 'px' ); - } - - if ( '' !== $spacing_settings['mobile_footer_widget_container_bottom'] ) { - $premium_css->add_property( 'padding-bottom', absint( $spacing_settings['mobile_footer_widget_container_bottom'] ), false, 'px' ); - } - - if ( '' !== $spacing_settings['mobile_footer_widget_container_left'] ) { - $premium_css->add_property( 'padding-left', absint( $spacing_settings['mobile_footer_widget_container_left'] ), false, 'px' ); - } - - $premium_css->stop_media_query(); - - $premium_css->set_selector( '.post-image, .page-content, .entry-content, .entry-summary, footer.entry-meta' ); - $premium_css->add_property( 'margin-top', floatval( $spacing_settings['content_element_separator'] ), '2', 'em' ); - } else { - $premium_css->set_selector( '.post-image:not(:first-child), .page-content:not(:first-child), .entry-content:not(:first-child), .entry-summary:not(:first-child), footer.entry-meta' ); - $premium_css->add_property( 'margin-top', floatval( $spacing_settings['content_element_separator'] ), '2', 'em' ); - } - - $premium_css->set_selector( '.post-image-above-header .inside-article div.featured-image, .post-image-above-header .inside-article div.post-image' ); - $premium_css->add_property( 'margin-bottom', floatval( $spacing_settings['content_element_separator'] ), '2', 'em' ); - - if ( function_exists( 'generate_menu_plus_get_defaults' ) ) { - $menu_plus = wp_parse_args( - get_option( 'generate_menu_plus_settings', array() ), - generate_menu_plus_get_defaults() - ); - - if ( 'false' !== $menu_plus['sticky_menu'] && '' !== $spacing_settings['sticky_menu_item_height'] ) { - $premium_css->start_media_query( generate_premium_get_media_query( 'tablet' ) . ',' . generate_premium_get_media_query( 'desktop' ) ); - - if ( function_exists( 'generate_is_using_flexbox' ) && generate_is_using_flexbox() ) { - $premium_css->set_selector( '.main-navigation.sticky-navigation-transition .main-nav > ul > li > a,.sticky-navigation-transition .menu-toggle,.main-navigation.sticky-navigation-transition .menu-bar-item > a, .sticky-navigation-transition .navigation-branding .main-title' ); - } else { - $premium_css->set_selector( '.main-navigation.sticky-navigation-transition .main-nav > ul > li > a,.sticky-navigation-transition .menu-toggle,.main-navigation.sticky-navigation-transition .mobile-bar-items a, .sticky-navigation-transition .navigation-branding .main-title' ); - } - - $premium_css->add_property( 'line-height', absint( $spacing_settings['sticky_menu_item_height'] ), false, 'px' ); - - $premium_css->set_selector( '.main-navigation.sticky-navigation-transition .site-logo img, .main-navigation.sticky-navigation-transition .navigation-search input[type="search"], .main-navigation.sticky-navigation-transition .navigation-branding img' ); - $premium_css->add_property( 'height', absint( $spacing_settings['sticky_menu_item_height'] ), false, 'px' ); - - $premium_css->stop_media_query(); - } - - if ( 'false' !== $menu_plus['slideout_menu'] ) { - $premium_css->set_selector( '.main-navigation.slideout-navigation .main-nav > ul > li > a' ); - if ( '' !== $spacing_settings['off_canvas_menu_item_height'] ) { - $premium_css->add_property( 'line-height', absint( $spacing_settings['off_canvas_menu_item_height'] ), false, 'px' ); - } - } - } - - if ( '' !== $premium_css->css_output() ) { - $css_output = $premium_css->css_output(); - } - - return $css_output; -} - -if ( ! function_exists( 'generate_spacing_premium_css' ) ) { - add_action( 'wp_enqueue_scripts', 'generate_spacing_premium_css', 105 ); - /** - * Add premium spacing CSS - * - * @since 1.3 - */ - function generate_spacing_premium_css() { - $css = generate_spacing_do_premium_css(); - - if ( 'inline' === generate_get_css_print_method() && $css ) { - wp_add_inline_style( 'generate-style', $css ); - } - } -} - -add_filter( 'generate_external_dynamic_css_output', 'generate_spacing_add_to_external_stylesheet' ); -/** - * Add CSS to the external stylesheet. - * - * @since 1.11.0 - * @param string $css Existing CSS. - */ -function generate_spacing_add_to_external_stylesheet( $css ) { - if ( 'inline' === generate_get_css_print_method() ) { - return $css; - } - - $css .= generate_spacing_do_premium_css(); - - return $css; -} diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/spacing/functions/migration.php b/wp-content/upgrade-temp-backup/plugins/gp-premium/spacing/functions/migration.php deleted file mode 100644 index 1eac04b6..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/spacing/functions/migration.php +++ /dev/null @@ -1,102 +0,0 @@ -register_control_type( 'GeneratePress_Pro_Range_Slider_Control' ); - $wp_customize->register_control_type( 'GeneratePress_Pro_Typography_Customize_Control' ); - $wp_customize->register_control_type( 'GeneratePress_Section_Shortcut_Control' ); - } - - // Add the typography panel. - if ( class_exists( 'WP_Customize_Panel' ) ) { - $wp_customize->add_panel( - 'generate_typography_panel', - array( - 'priority' => 30, - 'capability' => 'edit_theme_options', - 'theme_supports' => '', - 'title' => __( 'Typography', 'gp-premium' ), - 'description' => '', - ) - ); - } - - // Body section. - $wp_customize->add_section( - 'font_section', - array( - 'title' => __( 'Body', 'gp-premium' ), - 'capability' => 'edit_theme_options', - 'description' => '', - 'priority' => 30, - 'panel' => 'generate_typography_panel', - ) - ); - - $wp_customize->add_control( - new GeneratePress_Section_Shortcut_Control( - $wp_customize, - 'generate_body_typography_shortcuts', - array( - 'section' => 'font_section', - 'element' => __( 'Body', 'gp-premium' ), - 'shortcuts' => array( - 'colors' => 'body_section', - 'backgrounds' => 'generate_backgrounds_body', - ), - 'settings' => ( isset( $wp_customize->selective_refresh ) ) ? array() : 'blogname', - 'priority' => 0, - ) - ) - ); - - $wp_customize->add_setting( - 'generate_settings[font_body]', - array( - 'default' => $defaults['font_body'], - 'type' => 'option', - 'sanitize_callback' => 'sanitize_text_field', - ) - ); - - $wp_customize->add_setting( - 'font_body_variants', - array( - 'default' => $defaults['font_body_variants'], - 'sanitize_callback' => 'generate_premium_sanitize_variants', - ) - ); - - $wp_customize->add_setting( - 'font_body_category', - array( - 'default' => $defaults['font_body_category'], - 'sanitize_callback' => 'sanitize_text_field', - ) - ); - - $wp_customize->add_setting( - 'generate_settings[body_font_weight]', - array( - 'default' => $defaults['body_font_weight'], - 'type' => 'option', - 'sanitize_callback' => 'sanitize_key', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_setting( - 'generate_settings[body_font_transform]', - array( - 'default' => $defaults['body_font_transform'], - 'type' => 'option', - 'sanitize_callback' => 'sanitize_key', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - new GeneratePress_Pro_Typography_Customize_Control( - $wp_customize, - 'body_typography', - array( - 'section' => 'font_section', - 'priority' => 1, - 'settings' => array( - 'family' => 'generate_settings[font_body]', - 'variant' => 'font_body_variants', - 'category' => 'font_body_category', - 'weight' => 'generate_settings[body_font_weight]', - 'transform' => 'generate_settings[body_font_transform]', - ), - ) - ) - ); - - $wp_customize->add_setting( - 'generate_settings[body_font_size]', - array( - 'default' => $defaults['body_font_size'], - 'type' => 'option', - 'sanitize_callback' => 'absint', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - new GeneratePress_Pro_Range_Slider_Control( - $wp_customize, - 'generate_settings[body_font_size]', - array( - 'description' => __( 'Font size', 'gp-premium' ), - 'section' => 'font_section', - 'priority' => 40, - 'settings' => array( - 'desktop' => 'generate_settings[body_font_size]', - ), - 'choices' => array( - 'desktop' => array( - 'min' => 6, - 'max' => 25, - 'step' => 1, - 'edit' => true, - 'unit' => 'px', - ), - ), - ) - ) - ); - - $wp_customize->add_setting( - 'generate_settings[body_line_height]', - array( - 'default' => $defaults['body_line_height'], - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_decimal_integer', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - new GeneratePress_Pro_Range_Slider_Control( - $wp_customize, - 'generate_settings[body_line_height]', - array( - 'description' => __( 'Line height', 'gp-premium' ), - 'section' => 'font_section', - 'priority' => 45, - 'settings' => array( - 'desktop' => 'generate_settings[body_line_height]', - ), - 'choices' => array( - 'desktop' => array( - 'min' => 1, - 'max' => 5, - 'step' => .1, - 'edit' => true, - 'unit' => '', - ), - ), - ) - ) - ); - - $wp_customize->add_setting( - 'generate_settings[paragraph_margin]', - array( - 'default' => $defaults['paragraph_margin'], - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_decimal_integer', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - new GeneratePress_Pro_Range_Slider_Control( - $wp_customize, - 'generate_settings[paragraph_margin]', - array( - 'description' => __( 'Paragraph margin', 'gp-premium' ), - 'section' => 'font_section', - 'priority' => 47, - 'settings' => array( - 'desktop' => 'generate_settings[paragraph_margin]', - ), - 'choices' => array( - 'desktop' => array( - 'min' => 0, - 'max' => 5, - 'step' => .1, - 'edit' => true, - 'unit' => 'em', - ), - ), - ) - ) - ); - - $wp_customize->add_section( - 'generate_top_bar_typography', - array( - 'title' => __( 'Top Bar', 'gp-premium' ), - 'capability' => 'edit_theme_options', - 'description' => '', - 'priority' => 30, - 'panel' => 'generate_typography_panel', - ) - ); - - if ( isset( $defaults['font_top_bar'] ) && function_exists( 'generate_is_top_bar_active' ) ) { - $wp_customize->add_setting( - 'generate_settings[font_top_bar]', - array( - 'default' => $defaults['font_top_bar'], - 'type' => 'option', - 'sanitize_callback' => 'sanitize_text_field', - ) - ); - - $wp_customize->add_setting( - 'font_top_bar_category', - array( - 'default' => '', - 'sanitize_callback' => 'sanitize_text_field', - ) - ); - - $wp_customize->add_setting( - 'font_top_bar_variants', - array( - 'default' => '', - 'sanitize_callback' => 'generate_premium_sanitize_variants', - ) - ); - - $wp_customize->add_setting( - 'generate_settings[top_bar_font_weight]', - array( - 'default' => $defaults['top_bar_font_weight'], - 'type' => 'option', - 'sanitize_callback' => 'sanitize_key', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_setting( - 'generate_settings[top_bar_font_transform]', - array( - 'default' => $defaults['top_bar_font_transform'], - 'type' => 'option', - 'sanitize_callback' => 'sanitize_key', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - new GeneratePress_Pro_Typography_Customize_Control( - $wp_customize, - 'top_bar_typography', - array( - 'section' => 'generate_top_bar_typography', - 'settings' => array( - 'family' => 'generate_settings[font_top_bar]', - 'variant' => 'font_top_bar_variants', - 'category' => 'font_top_bar_category', - 'weight' => 'generate_settings[top_bar_font_weight]', - 'transform' => 'generate_settings[top_bar_font_transform]', - ), - 'active_callback' => 'generate_premium_is_top_bar_active', - ) - ) - ); - - } - - if ( isset( $defaults['top_bar_font_size'] ) && function_exists( 'generate_is_top_bar_active' ) ) { - $wp_customize->add_setting( - 'generate_settings[top_bar_font_size]', - array( - 'default' => $defaults['top_bar_font_size'], - 'type' => 'option', - 'sanitize_callback' => 'absint', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - new GeneratePress_Pro_Range_Slider_Control( - $wp_customize, - 'generate_settings[top_bar_font_size]', - array( - 'description' => __( 'Font size', 'gp-premium' ), - 'section' => 'generate_top_bar_typography', - 'priority' => 75, - 'settings' => array( - 'desktop' => 'generate_settings[top_bar_font_size]', - ), - 'choices' => array( - 'desktop' => array( - 'min' => 6, - 'max' => 25, - 'step' => 1, - 'edit' => true, - 'unit' => 'px', - ), - ), - 'active_callback' => 'generate_premium_is_top_bar_active', - ) - ) - ); - } - - $wp_customize->add_section( - 'font_header_section', - array( - 'title' => __( 'Header', 'gp-premium' ), - 'capability' => 'edit_theme_options', - 'description' => '', - 'priority' => 40, - 'panel' => 'generate_typography_panel', - ) - ); - - $wp_customize->add_control( - new GeneratePress_Section_Shortcut_Control( - $wp_customize, - 'generate_header_typography_shortcuts', - array( - 'section' => 'font_header_section', - 'element' => __( 'Header', 'gp-premium' ), - 'shortcuts' => array( - 'layout' => 'generate_layout_header', - 'colors' => 'header_color_section', - 'backgrounds' => 'generate_backgrounds_header', - ), - 'settings' => ( isset( $wp_customize->selective_refresh ) ) ? array() : 'blogname', - 'priority' => 1, - ) - ) - ); - - $wp_customize->add_setting( - 'generate_settings[font_site_title]', - array( - 'default' => $defaults['font_site_title'], - 'type' => 'option', - 'sanitize_callback' => 'sanitize_text_field', - ) - ); - - $wp_customize->add_setting( - 'font_site_title_category', - array( - 'default' => '', - 'sanitize_callback' => 'sanitize_text_field', - ) - ); - - $wp_customize->add_setting( - 'font_site_title_variants', - array( - 'default' => '', - 'sanitize_callback' => 'generate_premium_sanitize_variants', - ) - ); - - $wp_customize->add_setting( - 'generate_settings[site_title_font_weight]', - array( - 'default' => $defaults['site_title_font_weight'], - 'type' => 'option', - 'sanitize_callback' => 'sanitize_key', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_setting( - 'generate_settings[site_title_font_transform]', - array( - 'default' => $defaults['site_title_font_transform'], - 'type' => 'option', - 'sanitize_callback' => 'sanitize_key', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - new GeneratePress_Pro_Typography_Customize_Control( - $wp_customize, - 'site_title_typography', - array( - 'label' => __( 'Site Title', 'gp-premium' ), - 'section' => 'font_header_section', - 'settings' => array( - 'family' => 'generate_settings[font_site_title]', - 'variant' => 'font_site_title_variants', - 'category' => 'font_site_title_category', - 'weight' => 'generate_settings[site_title_font_weight]', - 'transform' => 'generate_settings[site_title_font_transform]', - ), - 'priority' => 50, - ) - ) - ); - - $wp_customize->add_setting( - 'generate_settings[site_title_font_size]', - array( - 'default' => $defaults['site_title_font_size'], - 'type' => 'option', - 'sanitize_callback' => 'absint', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_setting( - 'generate_settings[tablet_site_title_font_size]', - array( - 'default' => $defaults['tablet_site_title_font_size'], - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_empty_absint', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_setting( - 'generate_settings[mobile_site_title_font_size]', - array( - 'default' => $defaults['mobile_site_title_font_size'], - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_empty_absint', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - new GeneratePress_Pro_Range_Slider_Control( - $wp_customize, - 'generate_settings[site_title_font_size]', - array( - 'description' => __( 'Font size', 'gp-premium' ), - 'section' => 'font_header_section', - 'priority' => 75, - 'settings' => array( - 'desktop' => 'generate_settings[site_title_font_size]', - 'tablet' => 'generate_settings[tablet_site_title_font_size]', - 'mobile' => 'generate_settings[mobile_site_title_font_size]', - ), - 'choices' => array( - 'desktop' => array( - 'min' => 10, - 'max' => 200, - 'step' => 1, - 'edit' => true, - 'unit' => 'px', - ), - 'tablet' => array( - 'min' => 10, - 'max' => 200, - 'step' => 1, - 'edit' => true, - 'unit' => 'px', - ), - 'mobile' => array( - 'min' => 10, - 'max' => 200, - 'step' => 1, - 'edit' => true, - 'unit' => 'px', - ), - ), - ) - ) - ); - - $wp_customize->add_setting( - 'generate_settings[font_site_tagline]', - array( - 'default' => $defaults['font_site_tagline'], - 'type' => 'option', - 'sanitize_callback' => 'sanitize_text_field', - ) - ); - - $wp_customize->add_setting( - 'font_site_tagline_category', - array( - 'default' => '', - 'sanitize_callback' => 'sanitize_text_field', - ) - ); - - $wp_customize->add_setting( - 'font_site_tagline_variants', - array( - 'default' => '', - 'sanitize_callback' => 'generate_premium_sanitize_variants', - ) - ); - - $wp_customize->add_setting( - 'generate_settings[site_tagline_font_weight]', - array( - 'default' => $defaults['site_tagline_font_weight'], - 'type' => 'option', - 'sanitize_callback' => 'sanitize_key', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_setting( - 'generate_settings[site_tagline_font_transform]', - array( - 'default' => $defaults['site_tagline_font_transform'], - 'type' => 'option', - 'sanitize_callback' => 'sanitize_key', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - new GeneratePress_Pro_Typography_Customize_Control( - $wp_customize, - 'font_site_tagline_control', - array( - 'label' => __( 'Site Tagline', 'gp-premium' ), - 'section' => 'font_header_section', - 'settings' => array( - 'family' => 'generate_settings[font_site_tagline]', - 'variant' => 'font_site_tagline_variants', - 'category' => 'font_site_tagline_category', - 'weight' => 'generate_settings[site_tagline_font_weight]', - 'transform' => 'generate_settings[site_tagline_font_transform]', - ), - 'priority' => 80, - ) - ) - ); - - $wp_customize->add_setting( - 'generate_settings[site_tagline_font_size]', - array( - 'default' => $defaults['site_tagline_font_size'], - 'type' => 'option', - 'sanitize_callback' => 'absint', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - new GeneratePress_Pro_Range_Slider_Control( - $wp_customize, - 'generate_settings[site_tagline_font_size]', - array( - 'description' => __( 'Font size', 'gp-premium' ), - 'section' => 'font_header_section', - 'priority' => 105, - 'settings' => array( - 'desktop' => 'generate_settings[site_tagline_font_size]', - ), - 'choices' => array( - 'desktop' => array( - 'min' => 6, - 'max' => 50, - 'step' => 1, - 'edit' => true, - 'unit' => 'px', - ), - ), - ) - ) - ); - - $wp_customize->add_section( - 'font_navigation_section', - array( - 'title' => __( 'Primary Navigation', 'gp-premium' ), - 'capability' => 'edit_theme_options', - 'description' => '', - 'priority' => 50, - 'panel' => 'generate_typography_panel', - ) - ); - - $wp_customize->add_control( - new GeneratePress_Section_Shortcut_Control( - $wp_customize, - 'generate_primary_navigation_typography_shortcuts', - array( - 'section' => 'font_navigation_section', - 'element' => __( 'Primary Navigation', 'gp-premium' ), - 'shortcuts' => array( - 'layout' => 'generate_layout_navigation', - 'colors' => 'navigation_color_section', - 'backgrounds' => 'generate_backgrounds_navigation', - ), - 'settings' => ( isset( $wp_customize->selective_refresh ) ) ? array() : 'blogname', - 'priority' => 1, - ) - ) - ); - - $wp_customize->add_setting( - 'generate_settings[font_navigation]', - array( - 'default' => $defaults['font_navigation'], - 'type' => 'option', - 'sanitize_callback' => 'sanitize_text_field', - ) - ); - - $wp_customize->add_setting( - 'font_navigation_category', - array( - 'default' => '', - 'sanitize_callback' => 'sanitize_text_field', - ) - ); - - $wp_customize->add_setting( - 'font_navigation_variants', - array( - 'default' => '', - 'sanitize_callback' => 'generate_premium_sanitize_variants', - ) - ); - - $wp_customize->add_setting( - 'generate_settings[navigation_font_weight]', - array( - 'default' => $defaults['navigation_font_weight'], - 'type' => 'option', - 'sanitize_callback' => 'sanitize_key', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_setting( - 'generate_settings[navigation_font_transform]', - array( - 'default' => $defaults['navigation_font_transform'], - 'type' => 'option', - 'sanitize_callback' => 'sanitize_key', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - new GeneratePress_Pro_Typography_Customize_Control( - $wp_customize, - 'google_font_site_navigation_control', - array( - 'section' => 'font_navigation_section', - 'settings' => array( - 'family' => 'generate_settings[font_navigation]', - 'variant' => 'font_navigation_variants', - 'category' => 'font_navigation_category', - 'weight' => 'generate_settings[navigation_font_weight]', - 'transform' => 'generate_settings[navigation_font_transform]', - ), - 'priority' => 120, - ) - ) - ); - - $wp_customize->add_setting( - 'generate_settings[navigation_font_size]', - array( - 'default' => $defaults['navigation_font_size'], - 'type' => 'option', - 'sanitize_callback' => 'absint', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_setting( - 'generate_settings[tablet_navigation_font_size]', - array( - 'default' => $defaults['tablet_navigation_font_size'], - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_empty_absint', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_setting( - 'generate_settings[mobile_navigation_font_size]', - array( - 'default' => $defaults['mobile_navigation_font_size'], - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_empty_absint', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - new GeneratePress_Pro_Range_Slider_Control( - $wp_customize, - 'generate_settings[navigation_font_size]', - array( - 'description' => __( 'Font size', 'gp-premium' ), - 'section' => 'font_navigation_section', - 'priority' => 165, - 'settings' => array( - 'desktop' => 'generate_settings[navigation_font_size]', - 'tablet' => 'generate_settings[tablet_navigation_font_size]', - 'mobile' => 'generate_settings[mobile_navigation_font_size]', - ), - 'choices' => array( - 'desktop' => array( - 'min' => 6, - 'max' => 30, - 'step' => 1, - 'edit' => true, - 'unit' => 'px', - ), - 'tablet' => array( - 'min' => 6, - 'max' => 30, - 'step' => 1, - 'edit' => true, - 'unit' => 'px', - ), - 'mobile' => array( - 'min' => 6, - 'max' => 30, - 'step' => 1, - 'edit' => true, - 'unit' => 'px', - ), - ), - ) - ) - ); - - $wp_customize->add_section( - 'font_buttons_section', - array( - 'title' => __( 'Buttons', 'gp-premium' ), - 'capability' => 'edit_theme_options', - 'description' => '', - 'priority' => 55, - 'panel' => 'generate_typography_panel', - ) - ); - - $wp_customize->add_control( - new GeneratePress_Section_Shortcut_Control( - $wp_customize, - 'generate_buttons_typography_shortcuts', - array( - 'section' => 'font_buttons_section', - 'element' => __( 'Button', 'gp-premium' ), - 'shortcuts' => array( - 'colors' => 'buttons_color_section', - ), - 'settings' => ( isset( $wp_customize->selective_refresh ) ) ? array() : 'blogname', - 'priority' => 1, - ) - ) - ); - - if ( isset( $defaults['font_buttons'] ) ) { - $wp_customize->add_setting( - 'generate_settings[font_buttons]', - array( - 'default' => $defaults['font_buttons'], - 'type' => 'option', - 'sanitize_callback' => 'sanitize_text_field', - ) - ); - - $wp_customize->add_setting( - 'font_buttons_category', - array( - 'default' => '', - 'sanitize_callback' => 'sanitize_text_field', - ) - ); - - $wp_customize->add_setting( - 'font_buttons_variants', - array( - 'default' => '', - 'sanitize_callback' => 'generate_premium_sanitize_variants', - ) - ); - - $wp_customize->add_setting( - 'generate_settings[buttons_font_weight]', - array( - 'default' => $defaults['buttons_font_weight'], - 'type' => 'option', - 'sanitize_callback' => 'sanitize_key', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_setting( - 'generate_settings[buttons_font_transform]', - array( - 'default' => $defaults['buttons_font_transform'], - 'type' => 'option', - 'sanitize_callback' => 'sanitize_key', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - new GeneratePress_Pro_Typography_Customize_Control( - $wp_customize, - 'font_buttons_control', - array( - 'section' => 'font_buttons_section', - 'settings' => array( - 'family' => 'generate_settings[font_buttons]', - 'variant' => 'font_buttons_variants', - 'category' => 'font_buttons_category', - 'weight' => 'generate_settings[buttons_font_weight]', - 'transform' => 'generate_settings[buttons_font_transform]', - ), - ) - ) - ); - - $wp_customize->add_setting( - 'generate_settings[buttons_font_size]', - array( - 'default' => $defaults['buttons_font_size'], - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_empty_absint', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - new GeneratePress_Pro_Range_Slider_Control( - $wp_customize, - 'buttons_font_sizes', - array( - 'description' => __( 'Font size', 'gp-premium' ), - 'section' => 'font_buttons_section', - 'settings' => array( - 'desktop' => 'generate_settings[buttons_font_size]', - ), - 'choices' => array( - 'desktop' => array( - 'min' => 5, - 'max' => 100, - 'step' => 1, - 'edit' => true, - 'unit' => 'px', - ), - ), - ) - ) - ); - } - - $wp_customize->add_section( - 'font_content_section', - array( - 'title' => __( 'Headings', 'gp-premium' ), - 'capability' => 'edit_theme_options', - 'description' => '', - 'priority' => 60, - 'panel' => 'generate_typography_panel', - ) - ); - - $wp_customize->add_control( - new GeneratePress_Section_Shortcut_Control( - $wp_customize, - 'generate_headings_typography_shortcuts', - array( - 'section' => 'font_content_section', - 'element' => __( 'Content', 'gp-premium' ), - 'shortcuts' => array( - 'layout' => 'generate_layout_container', - 'colors' => 'content_color_section', - ), - 'settings' => ( isset( $wp_customize->selective_refresh ) ) ? array() : 'blogname', - 'priority' => 1, - ) - ) - ); - - $wp_customize->add_setting( - 'generate_settings[font_heading_1]', - array( - 'default' => $defaults['font_heading_1'], - 'type' => 'option', - 'sanitize_callback' => 'sanitize_text_field', - ) - ); - - $wp_customize->add_setting( - 'font_heading_1_category', - array( - 'default' => '', - 'sanitize_callback' => 'sanitize_text_field', - ) - ); - - $wp_customize->add_setting( - 'font_heading_1_variants', - array( - 'default' => '', - 'sanitize_callback' => 'generate_premium_sanitize_variants', - ) - ); - - $wp_customize->add_setting( - 'generate_settings[heading_1_weight]', - array( - 'default' => $defaults['heading_1_weight'], - 'type' => 'option', - 'sanitize_callback' => 'sanitize_key', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_setting( - 'generate_settings[heading_1_transform]', - array( - 'default' => $defaults['heading_1_transform'], - 'type' => 'option', - 'sanitize_callback' => 'sanitize_key', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - new GeneratePress_Pro_Typography_Customize_Control( - $wp_customize, - 'font_heading_1_control', - array( - 'label' => __( 'Heading 1 (H1)', 'gp-premium' ), - 'section' => 'font_content_section', - 'settings' => array( - 'family' => 'generate_settings[font_heading_1]', - 'variant' => 'font_heading_1_variants', - 'category' => 'font_heading_1_category', - 'weight' => 'generate_settings[heading_1_weight]', - 'transform' => 'generate_settings[heading_1_transform]', - ), - ) - ) - ); - - $wp_customize->add_setting( - 'generate_settings[heading_1_font_size]', - array( - 'default' => $defaults['heading_1_font_size'], - 'type' => 'option', - 'sanitize_callback' => 'absint', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_setting( - 'generate_settings[mobile_heading_1_font_size]', - array( - 'default' => $defaults['mobile_heading_1_font_size'], - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_empty_absint', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - new GeneratePress_Pro_Range_Slider_Control( - $wp_customize, - 'h1_font_sizes', - array( - 'description' => __( 'Font size', 'gp-premium' ), - 'section' => 'font_content_section', - 'settings' => array( - 'desktop' => 'generate_settings[heading_1_font_size]', - 'mobile' => 'generate_settings[mobile_heading_1_font_size]', - ), - 'choices' => array( - 'desktop' => array( - 'min' => 15, - 'max' => 100, - 'step' => 1, - 'edit' => true, - 'unit' => 'px', - ), - 'mobile' => array( - 'min' => 15, - 'max' => 100, - 'step' => 1, - 'edit' => true, - 'unit' => 'px', - ), - ), - ) - ) - ); - - if ( isset( $defaults['heading_1_line_height'] ) ) { - $wp_customize->add_setting( - 'generate_settings[heading_1_line_height]', - array( - 'default' => $defaults['heading_1_line_height'], - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_decimal_integer', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - new GeneratePress_Pro_Range_Slider_Control( - $wp_customize, - 'generate_settings[heading_1_line_height]', - array( - 'description' => __( 'Line height', 'gp-premium' ), - 'section' => 'font_content_section', - 'settings' => array( - 'desktop' => 'generate_settings[heading_1_line_height]', - ), - 'choices' => array( - 'desktop' => array( - 'min' => 0, - 'max' => 5, - 'step' => .1, - 'edit' => true, - 'unit' => 'em', - ), - ), - ) - ) - ); - } - - if ( isset( $defaults['heading_1_margin_bottom'] ) ) { - $wp_customize->add_setting( - 'generate_settings[heading_1_margin_bottom]', - array( - 'default' => $defaults['heading_1_margin_bottom'], - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_decimal_integer', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - new GeneratePress_Pro_Range_Slider_Control( - $wp_customize, - 'generate_settings[heading_1_margin_bottom]', - array( - 'description' => __( 'Bottom margin', 'gp-premium' ), - 'section' => 'font_content_section', - 'settings' => array( - 'desktop' => 'generate_settings[heading_1_margin_bottom]', - ), - 'choices' => array( - 'desktop' => array( - 'min' => 0, - 'max' => 100, - 'step' => 1, - 'edit' => true, - 'unit' => 'px', - ), - ), - ) - ) - ); - } - - $wp_customize->add_setting( - 'generate_settings[single_post_title_weight]', - array( - 'default' => $defaults['single_post_title_weight'], - 'type' => 'option', - 'sanitize_callback' => 'sanitize_key', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_setting( - 'generate_settings[single_post_title_transform]', - array( - 'default' => $defaults['single_post_title_transform'], - 'type' => 'option', - 'sanitize_callback' => 'sanitize_key', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - new GeneratePress_Pro_Typography_Customize_Control( - $wp_customize, - 'single_content_title_control', - array( - 'label' => __( 'Single Content Title (H1)', 'gp-premium' ), - 'section' => 'font_content_section', - 'settings' => array( - 'weight' => 'generate_settings[single_post_title_weight]', - 'transform' => 'generate_settings[single_post_title_transform]', - ), - ) - ) - ); - - $wp_customize->add_setting( - 'generate_settings[single_post_title_font_size]', - array( - 'default' => $defaults['single_post_title_font_size'], - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_empty_absint', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_setting( - 'generate_settings[single_post_title_font_size_mobile]', - array( - 'default' => $defaults['single_post_title_font_size_mobile'], - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_empty_absint', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - new GeneratePress_Pro_Range_Slider_Control( - $wp_customize, - 'single_post_title_font_sizes', - array( - 'description' => __( 'Font size', 'gp-premium' ), - 'section' => 'font_content_section', - 'settings' => array( - 'desktop' => 'generate_settings[single_post_title_font_size]', - 'mobile' => 'generate_settings[single_post_title_font_size_mobile]', - ), - 'choices' => array( - 'desktop' => array( - 'min' => 15, - 'max' => 100, - 'step' => 1, - 'edit' => true, - 'unit' => 'px', - ), - 'mobile' => array( - 'min' => 15, - 'max' => 100, - 'step' => 1, - 'edit' => true, - 'unit' => 'px', - ), - ), - ) - ) - ); - - $wp_customize->add_setting( - 'generate_settings[single_post_title_line_height]', - array( - 'default' => $defaults['single_post_title_line_height'], - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_decimal_integer_empty', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - new GeneratePress_Pro_Range_Slider_Control( - $wp_customize, - 'generate_settings[single_post_title_line_height]', - array( - 'description' => __( 'Line height', 'gp-premium' ), - 'section' => 'font_content_section', - 'settings' => array( - 'desktop' => 'generate_settings[single_post_title_line_height]', - ), - 'choices' => array( - 'desktop' => array( - 'min' => 0, - 'max' => 5, - 'step' => .1, - 'edit' => true, - 'unit' => 'em', - ), - ), - ) - ) - ); - - $wp_customize->add_setting( - 'generate_settings[font_heading_2]', - array( - 'default' => $defaults['font_heading_2'], - 'type' => 'option', - 'sanitize_callback' => 'sanitize_text_field', - ) - ); - - $wp_customize->add_setting( - 'font_heading_2_category', - array( - 'default' => '', - 'sanitize_callback' => 'sanitize_text_field', - ) - ); - - $wp_customize->add_setting( - 'font_heading_2_variants', - array( - 'default' => '', - 'sanitize_callback' => 'generate_premium_sanitize_variants', - ) - ); - - $wp_customize->add_setting( - 'generate_settings[heading_2_weight]', - array( - 'default' => $defaults['heading_2_weight'], - 'type' => 'option', - 'sanitize_callback' => 'sanitize_key', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_setting( - 'generate_settings[heading_2_transform]', - array( - 'default' => $defaults['heading_2_transform'], - 'type' => 'option', - 'sanitize_callback' => 'sanitize_key', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - new GeneratePress_Pro_Typography_Customize_Control( - $wp_customize, - 'font_heading_2_control', - array( - 'label' => __( 'Heading 2 (H2)', 'gp-premium' ), - 'section' => 'font_content_section', - 'settings' => array( - 'family' => 'generate_settings[font_heading_2]', - 'variant' => 'font_heading_2_variants', - 'category' => 'font_heading_2_category', - 'weight' => 'generate_settings[heading_2_weight]', - 'transform' => 'generate_settings[heading_2_transform]', - ), - ) - ) - ); - - $wp_customize->add_setting( - 'generate_settings[heading_2_font_size]', - array( - 'default' => $defaults['heading_2_font_size'], - 'type' => 'option', - 'sanitize_callback' => 'absint', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_setting( - 'generate_settings[mobile_heading_2_font_size]', - array( - 'default' => $defaults['mobile_heading_2_font_size'], - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_empty_absint', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - new GeneratePress_Pro_Range_Slider_Control( - $wp_customize, - 'h2_font_sizes', - array( - 'description' => __( 'Font size', 'gp-premium' ), - 'section' => 'font_content_section', - 'settings' => array( - 'desktop' => 'generate_settings[heading_2_font_size]', - 'mobile' => 'generate_settings[mobile_heading_2_font_size]', - ), - 'choices' => array( - 'desktop' => array( - 'min' => 10, - 'max' => 80, - 'step' => 1, - 'edit' => true, - 'unit' => 'px', - ), - 'mobile' => array( - 'min' => 10, - 'max' => 80, - 'step' => 1, - 'edit' => true, - 'unit' => 'px', - ), - ), - ) - ) - ); - - if ( isset( $defaults['heading_2_line_height'] ) ) { - $wp_customize->add_setting( - 'generate_settings[heading_2_line_height]', - array( - 'default' => $defaults['heading_2_line_height'], - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_decimal_integer', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - new GeneratePress_Pro_Range_Slider_Control( - $wp_customize, - 'generate_settings[heading_2_line_height]', - array( - 'description' => __( 'Line height', 'gp-premium' ), - 'section' => 'font_content_section', - 'settings' => array( - 'desktop' => 'generate_settings[heading_2_line_height]', - ), - 'choices' => array( - 'desktop' => array( - 'min' => 0, - 'max' => 5, - 'step' => .1, - 'edit' => true, - 'unit' => 'em', - ), - ), - ) - ) - ); - } - - if ( isset( $defaults['heading_2_margin_bottom'] ) ) { - $wp_customize->add_setting( - 'generate_settings[heading_2_margin_bottom]', - array( - 'default' => $defaults['heading_2_margin_bottom'], - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_decimal_integer', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - new GeneratePress_Pro_Range_Slider_Control( - $wp_customize, - 'generate_settings[heading_2_margin_bottom]', - array( - 'description' => __( 'Bottom margin', 'gp-premium' ), - 'section' => 'font_content_section', - 'settings' => array( - 'desktop' => 'generate_settings[heading_2_margin_bottom]', - ), - 'choices' => array( - 'desktop' => array( - 'min' => 0, - 'max' => 100, - 'step' => 1, - 'edit' => true, - 'unit' => 'px', - ), - ), - ) - ) - ); - } - - $wp_customize->add_setting( - 'generate_settings[archive_post_title_weight]', - array( - 'default' => $defaults['archive_post_title_weight'], - 'type' => 'option', - 'sanitize_callback' => 'sanitize_key', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_setting( - 'generate_settings[archive_post_title_transform]', - array( - 'default' => $defaults['archive_post_title_transform'], - 'type' => 'option', - 'sanitize_callback' => 'sanitize_key', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - new GeneratePress_Pro_Typography_Customize_Control( - $wp_customize, - 'archive_content_title_control', - array( - 'label' => __( 'Archive Content Title (H2)', 'gp-premium' ), - 'section' => 'font_content_section', - 'settings' => array( - 'weight' => 'generate_settings[archive_post_title_weight]', - 'transform' => 'generate_settings[archive_post_title_transform]', - ), - ) - ) - ); - - $wp_customize->add_setting( - 'generate_settings[archive_post_title_font_size]', - array( - 'default' => $defaults['archive_post_title_font_size'], - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_empty_absint', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_setting( - 'generate_settings[archive_post_title_font_size_mobile]', - array( - 'default' => $defaults['archive_post_title_font_size_mobile'], - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_empty_absint', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - new GeneratePress_Pro_Range_Slider_Control( - $wp_customize, - 'archive_post_title_font_sizes', - array( - 'description' => __( 'Font size', 'gp-premium' ), - 'section' => 'font_content_section', - 'settings' => array( - 'desktop' => 'generate_settings[archive_post_title_font_size]', - 'mobile' => 'generate_settings[archive_post_title_font_size_mobile]', - ), - 'choices' => array( - 'desktop' => array( - 'min' => 15, - 'max' => 100, - 'step' => 1, - 'edit' => true, - 'unit' => 'px', - ), - 'mobile' => array( - 'min' => 15, - 'max' => 100, - 'step' => 1, - 'edit' => true, - 'unit' => 'px', - ), - ), - ) - ) - ); - - $wp_customize->add_setting( - 'generate_settings[archive_post_title_line_height]', - array( - 'default' => $defaults['archive_post_title_line_height'], - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_decimal_integer_empty', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - new GeneratePress_Pro_Range_Slider_Control( - $wp_customize, - 'generate_settings[archive_post_title_line_height]', - array( - 'description' => __( 'Line height', 'gp-premium' ), - 'section' => 'font_content_section', - 'settings' => array( - 'desktop' => 'generate_settings[archive_post_title_line_height]', - ), - 'choices' => array( - 'desktop' => array( - 'min' => 0, - 'max' => 5, - 'step' => .1, - 'edit' => true, - 'unit' => 'em', - ), - ), - ) - ) - ); - - $wp_customize->add_setting( - 'generate_settings[font_heading_3]', - array( - 'default' => $defaults['font_heading_3'], - 'type' => 'option', - 'sanitize_callback' => 'sanitize_text_field', - ) - ); - - $wp_customize->add_setting( - 'font_heading_3_category', - array( - 'default' => '', - 'sanitize_callback' => 'sanitize_text_field', - ) - ); - - $wp_customize->add_setting( - 'font_heading_3_variants', - array( - 'default' => '', - 'sanitize_callback' => 'generate_premium_sanitize_variants', - ) - ); - - $wp_customize->add_setting( - 'generate_settings[heading_3_weight]', - array( - 'default' => $defaults['heading_3_weight'], - 'type' => 'option', - 'sanitize_callback' => 'sanitize_key', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_setting( - 'generate_settings[heading_3_transform]', - array( - 'default' => $defaults['heading_3_transform'], - 'type' => 'option', - 'sanitize_callback' => 'sanitize_key', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - new GeneratePress_Pro_Typography_Customize_Control( - $wp_customize, - 'font_heading_3_control', - array( - 'label' => __( 'Heading 3 (H3)', 'gp-premium' ), - 'section' => 'font_content_section', - 'settings' => array( - 'family' => 'generate_settings[font_heading_3]', - 'variant' => 'font_heading_3_variants', - 'category' => 'font_heading_3_category', - 'weight' => 'generate_settings[heading_3_weight]', - 'transform' => 'generate_settings[heading_3_transform]', - ), - ) - ) - ); - - $wp_customize->add_setting( - 'generate_settings[heading_3_font_size]', - array( - 'default' => $defaults['heading_3_font_size'], - 'type' => 'option', - 'sanitize_callback' => 'absint', - 'transport' => 'postMessage', - ) - ); - - $h3_font_size_options = array( - 'desktop' => array( - 'min' => 10, - 'max' => 80, - 'step' => 1, - 'edit' => true, - 'unit' => 'px', - ), - ); - - $h3_font_size_settings = array( - 'desktop' => 'generate_settings[heading_3_font_size]', - ); - - if ( isset( $defaults['mobile_heading_3_font_size'] ) ) { - $wp_customize->add_setting( - 'generate_settings[mobile_heading_3_font_size]', - array( - 'default' => $defaults['mobile_heading_3_font_size'], - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_empty_absint', - 'transport' => 'postMessage', - ) - ); - - $h3_font_size_options['mobile'] = array( - 'min' => 10, - 'max' => 80, - 'step' => 1, - 'edit' => true, - 'unit' => 'px', - ); - - $h3_font_size_settings['mobile'] = 'generate_settings[mobile_heading_3_font_size]'; - } - - $wp_customize->add_control( - new GeneratePress_Pro_Range_Slider_Control( - $wp_customize, - 'h3_font_sizes', - array( - 'description' => __( 'Font size', 'gp-premium' ), - 'section' => 'font_content_section', - 'settings' => $h3_font_size_settings, - 'choices' => $h3_font_size_options, - ) - ) - ); - - if ( isset( $defaults['heading_3_line_height'] ) ) { - $wp_customize->add_setting( - 'generate_settings[heading_3_line_height]', - array( - 'default' => $defaults['heading_3_line_height'], - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_decimal_integer', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - new GeneratePress_Pro_Range_Slider_Control( - $wp_customize, - 'generate_settings[heading_3_line_height]', - array( - 'description' => __( 'Line height', 'gp-premium' ), - 'section' => 'font_content_section', - 'settings' => array( - 'desktop' => 'generate_settings[heading_3_line_height]', - ), - 'choices' => array( - 'desktop' => array( - 'min' => 0, - 'max' => 5, - 'step' => .1, - 'edit' => true, - 'unit' => 'em', - ), - ), - ) - ) - ); - } - - if ( isset( $defaults['heading_3_margin_bottom'] ) ) { - $wp_customize->add_setting( - 'generate_settings[heading_3_margin_bottom]', - array( - 'default' => $defaults['heading_3_margin_bottom'], - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_decimal_integer', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - new GeneratePress_Pro_Range_Slider_Control( - $wp_customize, - 'generate_settings[heading_3_margin_bottom]', - array( - 'description' => __( 'Bottom margin', 'gp-premium' ), - 'section' => 'font_content_section', - 'settings' => array( - 'desktop' => 'generate_settings[heading_3_margin_bottom]', - ), - 'choices' => array( - 'desktop' => array( - 'min' => 0, - 'max' => 100, - 'step' => 1, - 'edit' => true, - 'unit' => 'px', - ), - ), - ) - ) - ); - } - - if ( isset( $defaults['font_heading_4'] ) ) { - $wp_customize->add_setting( - 'generate_settings[font_heading_4]', - array( - 'default' => $defaults['font_heading_4'], - 'type' => 'option', - 'sanitize_callback' => 'sanitize_text_field', - ) - ); - - $wp_customize->add_setting( - 'font_heading_4_category', - array( - 'default' => '', - 'sanitize_callback' => 'sanitize_text_field', - ) - ); - - $wp_customize->add_setting( - 'font_heading_4_variants', - array( - 'default' => '', - 'sanitize_callback' => 'generate_premium_sanitize_variants', - ) - ); - - $wp_customize->add_setting( - 'generate_settings[heading_4_weight]', - array( - 'default' => $defaults['heading_4_weight'], - 'type' => 'option', - 'sanitize_callback' => 'sanitize_key', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_setting( - 'generate_settings[heading_4_transform]', - array( - 'default' => $defaults['heading_4_transform'], - 'type' => 'option', - 'sanitize_callback' => 'sanitize_key', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - new GeneratePress_Pro_Typography_Customize_Control( - $wp_customize, - 'font_heading_4_control', - array( - 'label' => __( 'Heading 4 (H4)', 'gp-premium' ), - 'section' => 'font_content_section', - 'settings' => array( - 'family' => 'generate_settings[font_heading_4]', - 'variant' => 'font_heading_4_variants', - 'category' => 'font_heading_4_category', - 'weight' => 'generate_settings[heading_4_weight]', - 'transform' => 'generate_settings[heading_4_transform]', - ), - ) - ) - ); - - $wp_customize->add_setting( - 'generate_settings[heading_4_font_size]', - array( - 'default' => $defaults['heading_4_font_size'], - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_empty_absint', - 'transport' => 'postMessage', - ) - ); - - $h4_font_size_options = array( - 'desktop' => array( - 'min' => 10, - 'max' => 80, - 'step' => 1, - 'edit' => true, - 'unit' => 'px', - ), - ); - - $h4_font_size_settings = array( - 'desktop' => 'generate_settings[heading_4_font_size]', - ); - - if ( isset( $defaults['mobile_heading_4_font_size'] ) ) { - $wp_customize->add_setting( - 'generate_settings[mobile_heading_4_font_size]', - array( - 'default' => $defaults['mobile_heading_4_font_size'], - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_empty_absint', - 'transport' => 'postMessage', - ) - ); - - $h4_font_size_options['mobile'] = array( - 'min' => 10, - 'max' => 80, - 'step' => 1, - 'edit' => true, - 'unit' => 'px', - ); - - $h4_font_size_settings['mobile'] = 'generate_settings[mobile_heading_4_font_size]'; - } - - $wp_customize->add_control( - new GeneratePress_Pro_Range_Slider_Control( - $wp_customize, - 'h4_font_sizes', - array( - 'description' => __( 'Font size', 'gp-premium' ), - 'section' => 'font_content_section', - 'settings' => $h4_font_size_settings, - 'choices' => $h4_font_size_options, - ) - ) - ); - - $wp_customize->add_setting( - 'generate_settings[heading_4_line_height]', - array( - 'default' => $defaults['heading_4_line_height'], - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_decimal_integer_empty', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - new GeneratePress_Pro_Range_Slider_Control( - $wp_customize, - 'generate_settings[heading_4_line_height]', - array( - 'description' => __( 'Line height', 'gp-premium' ), - 'section' => 'font_content_section', - 'settings' => array( - 'desktop' => 'generate_settings[heading_4_line_height]', - ), - 'choices' => array( - 'desktop' => array( - 'min' => 0, - 'max' => 5, - 'step' => .1, - 'edit' => true, - 'unit' => 'em', - ), - ), - ) - ) - ); - } - - if ( isset( $defaults['font_heading_5'] ) ) { - $wp_customize->add_setting( - 'generate_settings[font_heading_5]', - array( - 'default' => $defaults['font_heading_5'], - 'type' => 'option', - 'sanitize_callback' => 'sanitize_text_field', - ) - ); - - $wp_customize->add_setting( - 'font_heading_5_category', - array( - 'default' => '', - 'sanitize_callback' => 'sanitize_text_field', - ) - ); - - $wp_customize->add_setting( - 'font_heading_5_variants', - array( - 'default' => '', - 'sanitize_callback' => 'generate_premium_sanitize_variants', - ) - ); - - $wp_customize->add_setting( - 'generate_settings[heading_5_weight]', - array( - 'default' => $defaults['heading_5_weight'], - 'type' => 'option', - 'sanitize_callback' => 'sanitize_key', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_setting( - 'generate_settings[heading_5_transform]', - array( - 'default' => $defaults['heading_5_transform'], - 'type' => 'option', - 'sanitize_callback' => 'sanitize_key', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - new GeneratePress_Pro_Typography_Customize_Control( - $wp_customize, - 'font_heading_5_control', - array( - 'label' => __( 'Heading 5 (H5)', 'gp-premium' ), - 'section' => 'font_content_section', - 'settings' => array( - 'family' => 'generate_settings[font_heading_5]', - 'variant' => 'font_heading_5_variants', - 'category' => 'font_heading_5_category', - 'weight' => 'generate_settings[heading_5_weight]', - 'transform' => 'generate_settings[heading_5_transform]', - ), - ) - ) - ); - - $wp_customize->add_setting( - 'generate_settings[heading_5_font_size]', - array( - 'default' => $defaults['heading_5_font_size'], - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_empty_absint', - 'transport' => 'postMessage', - ) - ); - - $h5_font_size_options = array( - 'desktop' => array( - 'min' => 10, - 'max' => 80, - 'step' => 1, - 'edit' => true, - 'unit' => 'px', - ), - ); - - $h5_font_size_settings = array( - 'desktop' => 'generate_settings[heading_5_font_size]', - ); - - if ( isset( $defaults['mobile_heading_5_font_size'] ) ) { - $wp_customize->add_setting( - 'generate_settings[mobile_heading_5_font_size]', - array( - 'default' => $defaults['mobile_heading_5_font_size'], - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_empty_absint', - 'transport' => 'postMessage', - ) - ); - - $h5_font_size_options['mobile'] = array( - 'min' => 10, - 'max' => 80, - 'step' => 1, - 'edit' => true, - 'unit' => 'px', - ); - - $h5_font_size_settings['mobile'] = 'generate_settings[mobile_heading_5_font_size]'; - } - - $wp_customize->add_control( - new GeneratePress_Pro_Range_Slider_Control( - $wp_customize, - 'h5_font_sizes', - array( - 'description' => __( 'Font size', 'gp-premium' ), - 'section' => 'font_content_section', - 'settings' => $h5_font_size_settings, - 'choices' => $h5_font_size_options, - ) - ) - ); - - $wp_customize->add_setting( - 'generate_settings[heading_5_line_height]', - array( - 'default' => $defaults['heading_5_line_height'], - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_decimal_integer_empty', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - new GeneratePress_Pro_Range_Slider_Control( - $wp_customize, - 'generate_settings[heading_5_line_height]', - array( - 'description' => __( 'Line height', 'gp-premium' ), - 'section' => 'font_content_section', - 'settings' => array( - 'desktop' => 'generate_settings[heading_5_line_height]', - ), - 'choices' => array( - 'desktop' => array( - 'min' => 0, - 'max' => 5, - 'step' => .1, - 'edit' => true, - 'unit' => 'em', - ), - ), - ) - ) - ); - } - - if ( isset( $defaults['font_heading_6'] ) ) { - $wp_customize->add_setting( - 'generate_settings[font_heading_6]', - array( - 'default' => $defaults['font_heading_6'], - 'type' => 'option', - 'sanitize_callback' => 'sanitize_text_field', - ) - ); - - $wp_customize->add_setting( - 'font_heading_6_category', - array( - 'default' => '', - 'sanitize_callback' => 'sanitize_text_field', - ) - ); - - $wp_customize->add_setting( - 'font_heading_6_variants', - array( - 'default' => '', - 'sanitize_callback' => 'generate_premium_sanitize_variants', - ) - ); - - $wp_customize->add_setting( - 'generate_settings[heading_6_weight]', - array( - 'default' => $defaults['heading_6_weight'], - 'type' => 'option', - 'sanitize_callback' => 'sanitize_key', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_setting( - 'generate_settings[heading_6_transform]', - array( - 'default' => $defaults['heading_6_transform'], - 'type' => 'option', - 'sanitize_callback' => 'sanitize_key', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - new GeneratePress_Pro_Typography_Customize_Control( - $wp_customize, - 'font_heading_6_control', - array( - 'label' => __( 'Heading 6 (H6)', 'gp-premium' ), - 'section' => 'font_content_section', - 'settings' => array( - 'family' => 'generate_settings[font_heading_6]', - 'variant' => 'font_heading_6_variants', - 'category' => 'font_heading_6_category', - 'weight' => 'generate_settings[heading_6_weight]', - 'transform' => 'generate_settings[heading_6_transform]', - ), - ) - ) - ); - - $wp_customize->add_setting( - 'generate_settings[heading_6_font_size]', - array( - 'default' => $defaults['heading_6_font_size'], - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_empty_absint', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - new GeneratePress_Pro_Range_Slider_Control( - $wp_customize, - 'h6_font_sizes', - array( - 'description' => __( 'Font size', 'gp-premium' ), - 'section' => 'font_content_section', - 'settings' => array( - 'desktop' => 'generate_settings[heading_6_font_size]', - ), - 'choices' => array( - 'desktop' => array( - 'min' => 10, - 'max' => 80, - 'step' => 1, - 'edit' => true, - 'unit' => 'px', - ), - ), - ) - ) - ); - - $wp_customize->add_setting( - 'generate_settings[heading_6_line_height]', - array( - 'default' => $defaults['heading_6_line_height'], - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_decimal_integer_empty', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - new GeneratePress_Pro_Range_Slider_Control( - $wp_customize, - 'generate_settings[heading_6_line_height]', - array( - 'description' => __( 'Line height', 'gp-premium' ), - 'section' => 'font_content_section', - 'settings' => array( - 'desktop' => 'generate_settings[heading_6_line_height]', - ), - 'choices' => array( - 'desktop' => array( - 'min' => 0, - 'max' => 5, - 'step' => .1, - 'edit' => true, - 'unit' => 'em', - ), - ), - ) - ) - ); - } - - $wp_customize->add_section( - 'font_widget_section', - array( - 'title' => __( 'Widgets', 'gp-premium' ), - 'capability' => 'edit_theme_options', - 'description' => '', - 'priority' => 60, - 'panel' => 'generate_typography_panel', - ) - ); - - $wp_customize->add_control( - new GeneratePress_Section_Shortcut_Control( - $wp_customize, - 'generate_widgets_typography_shortcuts', - array( - 'section' => 'font_widget_section', - 'element' => __( 'Widgets', 'gp-premium' ), - 'shortcuts' => array( - 'layout' => 'generate_layout_sidebars', - 'colors' => 'sidebar_widget_color_section', - 'backgrounds' => 'generate_backgrounds_sidebars', - ), - 'settings' => ( isset( $wp_customize->selective_refresh ) ) ? array() : 'blogname', - 'priority' => 1, - ) - ) - ); - - $wp_customize->add_setting( - 'generate_settings[font_widget_title]', - array( - 'default' => $defaults['font_widget_title'], - 'type' => 'option', - 'sanitize_callback' => 'sanitize_text_field', - ) - ); - - $wp_customize->add_setting( - 'font_widget_title_category', - array( - 'default' => '', - 'sanitize_callback' => 'sanitize_text_field', - ) - ); - - $wp_customize->add_setting( - 'font_widget_title_variants', - array( - 'default' => '', - 'sanitize_callback' => 'generate_premium_sanitize_variants', - ) - ); - - $wp_customize->add_setting( - 'generate_settings[widget_title_font_weight]', - array( - 'default' => $defaults['widget_title_font_weight'], - 'type' => 'option', - 'sanitize_callback' => 'sanitize_key', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_setting( - 'generate_settings[widget_title_font_transform]', - array( - 'default' => $defaults['widget_title_font_transform'], - 'type' => 'option', - 'sanitize_callback' => 'sanitize_key', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - new GeneratePress_Pro_Typography_Customize_Control( - $wp_customize, - 'google_font_widget_title_control', - array( - 'label' => __( 'Widget Titles', 'gp-premium' ), - 'section' => 'font_widget_section', - 'settings' => array( - 'family' => 'generate_settings[font_widget_title]', - 'variant' => 'font_widget_title_variants', - 'category' => 'font_widget_title_category', - 'weight' => 'generate_settings[widget_title_font_weight]', - 'transform' => 'generate_settings[widget_title_font_transform]', - ), - ) - ) - ); - - $wp_customize->add_setting( - 'generate_settings[widget_title_font_size]', - array( - 'default' => $defaults['widget_title_font_size'], - 'type' => 'option', - 'sanitize_callback' => 'absint', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - new GeneratePress_Pro_Range_Slider_Control( - $wp_customize, - 'generate_settings[widget_title_font_size]', - array( - 'description' => __( 'Font size', 'gp-premium' ), - 'section' => 'font_widget_section', - 'settings' => array( - 'desktop' => 'generate_settings[widget_title_font_size]', - ), - 'choices' => array( - 'desktop' => array( - 'min' => 6, - 'max' => 30, - 'step' => 1, - 'edit' => true, - 'unit' => 'px', - ), - ), - ) - ) - ); - - if ( isset( $defaults['widget_title_separator'] ) ) { - $wp_customize->add_setting( - 'generate_settings[widget_title_separator]', - array( - 'default' => $defaults['widget_title_separator'], - 'type' => 'option', - 'sanitize_callback' => 'absint', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - new GeneratePress_Pro_Range_Slider_Control( - $wp_customize, - 'generate_settings[widget_title_separator]', - array( - 'description' => __( 'Bottom margin', 'gp-premium' ), - 'section' => 'font_widget_section', - 'settings' => array( - 'desktop' => 'generate_settings[widget_title_separator]', - ), - 'choices' => array( - 'desktop' => array( - 'min' => 0, - 'max' => 100, - 'step' => 1, - 'edit' => true, - 'unit' => 'px', - ), - ), - ) - ) - ); - } - - $wp_customize->add_setting( - 'generate_settings[widget_content_font_size]', - array( - 'default' => $defaults['widget_content_font_size'], - 'type' => 'option', - 'sanitize_callback' => 'absint', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - new GeneratePress_Pro_Range_Slider_Control( - $wp_customize, - 'generate_settings[widget_content_font_size]', - array( - 'description' => __( 'Content font size', 'gp-premium' ), - 'section' => 'font_widget_section', - 'priority' => 240, - 'settings' => array( - 'desktop' => 'generate_settings[widget_content_font_size]', - ), - 'choices' => array( - 'desktop' => array( - 'min' => 6, - 'max' => 30, - 'step' => 1, - 'edit' => true, - 'unit' => 'px', - ), - ), - ) - ) - ); - - $wp_customize->add_section( - 'font_footer_section', - array( - 'title' => __( 'Footer', 'gp-premium' ), - 'capability' => 'edit_theme_options', - 'description' => '', - 'priority' => 70, - 'panel' => 'generate_typography_panel', - ) - ); - - $wp_customize->add_control( - new GeneratePress_Section_Shortcut_Control( - $wp_customize, - 'generate_footer_typography_shortcuts', - array( - 'section' => 'font_footer_section', - 'element' => __( 'Footer', 'gp-premium' ), - 'shortcuts' => array( - 'layout' => 'generate_layout_footer', - 'colors' => 'footer_color_section', - 'backgrounds' => 'generate_backgrounds_footer', - ), - 'settings' => ( isset( $wp_customize->selective_refresh ) ) ? array() : 'blogname', - 'priority' => 1, - ) - ) - ); - - if ( isset( $defaults['font_footer'] ) ) { - $wp_customize->add_setting( - 'generate_settings[font_footer]', - array( - 'default' => $defaults['font_footer'], - 'type' => 'option', - 'sanitize_callback' => 'sanitize_text_field', - ) - ); - - $wp_customize->add_setting( - 'font_footer_category', - array( - 'default' => '', - 'sanitize_callback' => 'sanitize_text_field', - ) - ); - - $wp_customize->add_setting( - 'font_footer_variants', - array( - 'default' => '', - 'sanitize_callback' => 'generate_premium_sanitize_variants', - ) - ); - - $wp_customize->add_setting( - 'generate_settings[footer_weight]', - array( - 'default' => $defaults['footer_weight'], - 'type' => 'option', - 'sanitize_callback' => 'sanitize_key', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_setting( - 'generate_settings[footer_transform]', - array( - 'default' => $defaults['footer_transform'], - 'type' => 'option', - 'sanitize_callback' => 'sanitize_key', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - new GeneratePress_Pro_Typography_Customize_Control( - $wp_customize, - 'font_footer_control', - array( - 'section' => 'font_footer_section', - 'settings' => array( - 'family' => 'generate_settings[font_footer]', - 'variant' => 'font_footer_variants', - 'category' => 'font_footer_category', - 'weight' => 'generate_settings[footer_weight]', - 'transform' => 'generate_settings[footer_transform]', - ), - ) - ) - ); - } - - $wp_customize->add_setting( - 'generate_settings[footer_font_size]', - array( - 'default' => $defaults['footer_font_size'], - 'type' => 'option', - 'sanitize_callback' => 'absint', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - new GeneratePress_Pro_Range_Slider_Control( - $wp_customize, - 'generate_settings[footer_font_size]', - array( - 'description' => __( 'Font size', 'gp-premium' ), - 'section' => 'font_footer_section', - 'settings' => array( - 'desktop' => 'generate_settings[footer_font_size]', - ), - 'choices' => array( - 'desktop' => array( - 'min' => 6, - 'max' => 30, - 'step' => 1, - 'edit' => true, - 'unit' => 'px', - ), - ), - ) - ) - ); - } -} - -if ( ! function_exists( 'generate_enqueue_google_fonts' ) ) { - add_action( 'wp_enqueue_scripts', 'generate_enqueue_google_fonts', 0 ); - /** - * Enqueue Google Fonts. - * - * @since 0.1 - */ - function generate_enqueue_google_fonts() { - // Bail if we don't have our defaults function. - if ( ! function_exists( 'generate_get_default_fonts' ) ) { - return; - } - - $generate_settings = wp_parse_args( - get_option( 'generate_settings', array() ), - generate_get_default_fonts() - ); - - // List our non-Google fonts. - $not_google = str_replace( ' ', '+', generate_typography_default_fonts() ); - - // Grab our font family settings. - $font_settings = array( - 'font_body', - 'font_top_bar', - 'font_site_title', - 'font_site_tagline', - 'font_navigation', - 'font_widget_title', - 'font_buttons', - 'font_heading_1', - 'font_heading_2', - 'font_heading_3', - 'font_heading_4', - 'font_heading_5', - 'font_heading_6', - 'font_footer', - ); - - // Create our Google Fonts array. - $google_fonts = array(); - if ( ! empty( $font_settings ) ) { - foreach ( $font_settings as $key ) { - // If the key isn't set, move on. - if ( ! isset( $generate_settings[ $key ] ) ) { - continue; - } - - // If our value is still using the old format, fix it. - if ( strpos( $generate_settings[ $key ], ':' ) !== false ) { - $generate_settings[ $key ] = current( explode( ':', $generate_settings[ $key ] ) ); - } - - // Replace the spaces in the names with a plus. - $value = str_replace( ' ', '+', $generate_settings[ $key ] ); - - // Grab the variants using the plain name. - $variants = generate_get_google_font_variants( $generate_settings[ $key ], $key, generate_get_default_fonts() ); - - // If we have variants, add them to our value. - $value = ! empty( $variants ) ? $value . ':' . $variants : $value; - - // Make sure we don't add the same font twice. - if ( ! in_array( $value, $google_fonts ) ) { - $google_fonts[] = $value; - } - } - } - - // Ignore any non-Google fonts. - $google_fonts = array_diff( $google_fonts, $not_google ); - - // Separate each different font with a bar. - $google_fonts = implode( '|', $google_fonts ); - - // Apply a filter to the output. - $google_fonts = apply_filters( 'generate_typography_google_fonts', $google_fonts ); - - // Get the subset. - $subset = apply_filters( 'generate_fonts_subset', '' ); - - // Set up our arguments. - $font_args = array(); - $font_args['family'] = $google_fonts; - if ( '' !== $subset ) { - $font_args['subset'] = urlencode( $subset ); // phpcs:ignore -- Keeping legacy urlencode(). - } - - $display = apply_filters( 'generate_google_font_display', '' ); - - if ( $display ) { - $font_args['display'] = $display; - } - - // Create our URL using the arguments. - $fonts_url = add_query_arg( $font_args, '//fonts.googleapis.com/css' ); - - // Enqueue our fonts. - if ( $google_fonts ) { - wp_enqueue_style( 'generate-fonts', $fonts_url, array(), null, 'all' ); // phpcs:ignore -- Version not needed. - } - } -} - -if ( ! function_exists( 'generate_get_all_google_fonts' ) ) { - /** - * Return an array of all of our Google Fonts. - * - * @since 1.3.0 - * @param string $amount The number of fonts to load. - */ - function generate_get_all_google_fonts( $amount = 'all' ) { - ob_start(); - include wp_normalize_path( dirname( __FILE__ ) . '/google-fonts.json' ); // phpcs:ignore WPThemeReview.CoreFunctionality.FileInclude - $fonts_json = ob_get_clean(); - $google_fonts = json_decode( $fonts_json ); - - // Loop through them and put what we need into our fonts array. - $fonts = array(); - foreach ( (array) $google_fonts as $item ) { - - // Grab what we need from our big list. - $atts = array( - 'name' => $item->family, - 'category' => $item->category, - 'variants' => $item->variants, - ); - - // Create an ID using our font family name. - $id = strtolower( str_replace( ' ', '_', $item->family ) ); - - // Add our attributes to our new array. - $fonts[ $id ] = $atts; - } - - if ( 'all' !== $amount ) { - $fonts = array_slice( $fonts, 0, $amount ); - } - - // Alphabetize our fonts. - if ( apply_filters( 'generate_alphabetize_google_fonts', true ) ) { - asort( $fonts ); - } - - // Filter to allow us to modify the fonts array. - return apply_filters( 'generate_google_fonts_array', $fonts ); - } -} - -if ( ! function_exists( 'generate_get_all_google_fonts_ajax' ) ) { - add_action( 'wp_ajax_generate_get_all_google_fonts_ajax', 'generate_get_all_google_fonts_ajax' ); - /** - * Return an array of all of our Google Fonts. - * - * @since 1.3.0 - */ - function generate_get_all_google_fonts_ajax() { - // Bail if the nonce doesn't check out. - if ( ! isset( $_POST['gp_customize_nonce'] ) || ! wp_verify_nonce( $_POST['gp_customize_nonce'], 'gp_customize_nonce' ) ) { - wp_die(); - } - - // Do another nonce check. - check_ajax_referer( 'gp_customize_nonce', 'gp_customize_nonce' ); - - // Bail if user can't edit theme options. - if ( ! current_user_can( 'edit_theme_options' ) ) { - wp_die(); - } - - // Get all of our fonts. - $fonts = apply_filters( 'generate_typography_customize_list', generate_get_all_google_fonts() ); - - // Send all of our fonts in JSON format. - echo wp_json_encode( $fonts ); - - die(); - } -} - -if ( ! function_exists( 'generate_get_google_font_variants' ) ) { - /** - * Wrapper function to find variants for chosen Google Fonts - * Example: generate_get_google_font_variation( 'Open Sans' ) - * - * @since 1.3.0 - * @param string $font The font we're checking. - * @param string $key The key we're checking. - * @param array $default The defaults we're checking. - */ - function generate_get_google_font_variants( $font, $key = '', $default = '' ) { - // Bail if we don't have our defaults function. - if ( ! function_exists( 'generate_get_default_fonts' ) ) { - return; - } - - // Don't need variants if we're using a system font. - if ( in_array( $font, generate_typography_default_fonts() ) ) { - return; - } - - // Return if we have our variants saved. - if ( '' !== $key && get_theme_mod( $key . '_variants' ) ) { - return get_theme_mod( $key . '_variants' ); - } - - // Make sure we have defaults. - if ( '' == $default ) { // phpcs:ignore -- Non-strict allowed. - $default = generate_get_default_fonts(); - } - - // If our default font is selected and the category isn't saved, we already know the category. - if ( $default[ $key ] == $font ) { // phpcs:ignore -- Non-strict allowed. - return $default[ $key . '_variants' ]; - } - - // Grab all of our fonts. - // It's a big list, so hopefully we're not even still reading. - $fonts = generate_get_all_google_fonts(); - - // Get the ID from our font. - $id = strtolower( str_replace( ' ', '_', $font ) ); - - // If the ID doesn't exist within our fonts, we can bail. - if ( ! array_key_exists( $id, $fonts ) ) { - return; - } - - // Grab all of the variants associated with our font. - $variants = $fonts[ $id ]['variants']; - - // Loop through them and put them into an array, then turn them into a comma separated list. - $output = array(); - if ( $variants ) { - foreach ( $variants as $variant ) { - $output[] = $variant; - } - - return implode( ',', apply_filters( 'generate_typography_variants', $output ) ); - } - } -} - -if ( ! function_exists( 'generate_get_google_font_category' ) ) { - /** - * Wrapper function to find the category for chosen Google Font - * Example: generate_get_google_font_category( 'Open Sans' ) - * - * @since 1.3.0 - * @param string $font The font we're checking. - * @param string $key The key we're checking. - * @param array $default The defaults we're checking. - */ - function generate_get_google_font_category( $font, $key = '', $default = '' ) { - // Bail if we don't have our defaults function. - if ( ! function_exists( 'generate_get_default_fonts' ) ) { - return; - } - - // Don't need a category if we're using a system font. - if ( in_array( $font, generate_typography_default_fonts() ) ) { - return; - } - - // Return if we have our variants saved. - if ( '' !== $key && get_theme_mod( $key . '_category' ) ) { - return ', ' . get_theme_mod( $key . '_category' ); - } - - // Make sure we have defaults. - if ( '' == $default ) { // phpcs:ignore -- Non-strict allowed. - $default = generate_get_default_fonts(); - } - - // If our default font is selected and the category isn't saved, we already know the category. - if ( $default[ $key ] == $font ) { // phpcs:ignore -- Non-strict allowed. - return ', ' . $default[ $key . '_category' ]; - } - - // Get all of our fonts. - // It's a big list, so hopefully we're not even still reading. - $fonts = generate_get_all_google_fonts(); - - // Get the ID from our font. - $id = strtolower( str_replace( ' ', '_', $font ) ); - - // If the ID doesn't exist within our fonts, we can bail. - if ( ! array_key_exists( $id, $fonts ) ) { - return; - } - - // Let's grab our category to go with our font. - $category = ! empty( $fonts[ $id ]['category'] ) ? ', ' . $fonts[ $id ]['category'] : ''; - - // Return it to be used by our function. - return $category; - - } -} - -if ( ! function_exists( 'generate_get_font_family_css' ) ) { - /** - * Wrapper function to create font-family value for CSS. - * - * @since 1.3.0 - * @param string $font The font we're checking. - * @param array $settings The settings we're checking. - * @param array $default The defaults we're checking. - */ - function generate_get_font_family_css( $font, $settings, $default ) { - $generate_settings = wp_parse_args( - get_option( $settings, array() ), - $default - ); - - // We don't want to wrap quotes around these values. - $no_quotes = array( - 'inherit', - 'Arial, Helvetica, sans-serif', - 'Georgia, Times New Roman, Times, serif', - 'Helvetica', - 'Impact', - 'Segoe UI, Helvetica Neue, Helvetica, sans-serif', - 'Tahoma, Geneva, sans-serif', - 'Trebuchet MS, Helvetica, sans-serif', - 'Verdana, Geneva, sans-serif', - apply_filters( 'generate_typography_system_stack', '-apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"' ), - ); - - // Get our font. - $font_family = $generate_settings[ $font ]; - - if ( 'System Stack' === $font_family ) { - $font_family = apply_filters( 'generate_typography_system_stack', '-apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"' ); - } - - // If our value is still using the old format, fix it. - if ( strpos( $font_family, ':' ) !== false ) { - $font_family = current( explode( ':', $font_family ) ); - } - - // Set up our wrapper. - if ( in_array( $font_family, $no_quotes ) ) { - $wrapper_start = null; - $wrapper_end = null; - } else { - $wrapper_start = '"'; - $wrapper_end = '"' . generate_get_google_font_category( $font_family, $font, $default ); - } - - // Output the CSS. - $output = ( 'inherit' === $font_family ) ? 'inherit' : $wrapper_start . $font_family . $wrapper_end; - return $output; - } -} - -if ( ! function_exists( 'generate_typography_customizer_live_preview' ) ) { - add_action( 'customize_preview_init', 'generate_typography_customizer_live_preview' ); - /** - * Add our live preview JS - */ - function generate_typography_customizer_live_preview() { - wp_enqueue_script( - 'generate-typography-customizer', - trailingslashit( plugin_dir_url( __FILE__ ) ) . 'js/customizer.js', - array( 'jquery', 'customize-preview' ), - GENERATE_FONT_VERSION, - true - ); - - wp_localize_script( - 'generate-typography-customizer', - 'gp_typography', - array( - 'mobile' => generate_premium_get_media_query( 'mobile' ), - 'tablet' => generate_premium_get_media_query( 'tablet' ), - 'desktop' => generate_premium_get_media_query( 'desktop' ), - ) - ); - } -} - -if ( ! function_exists( 'generate_typography_default_fonts' ) ) { - /** - * Get our system fonts - */ - function generate_typography_default_fonts() { - $fonts = array( - 'inherit', - 'System Stack', - 'Arial, Helvetica, sans-serif', - 'Century Gothic', - 'Comic Sans MS', - 'Courier New', - 'Georgia, Times New Roman, Times, serif', - 'Helvetica', - 'Impact', - 'Lucida Console', - 'Lucida Sans Unicode', - 'Palatino Linotype', - 'Segoe UI, Helvetica Neue, Helvetica, sans-serif', - 'Tahoma, Geneva, sans-serif', - 'Trebuchet MS, Helvetica, sans-serif', - 'Verdana, Geneva, sans-serif', - ); - - return apply_filters( 'generate_typography_default_fonts', $fonts ); - } -} - -if ( ! function_exists( 'generate_include_typography_defaults' ) ) { - /** - * Check if we should include our default.css file. - * - * @since 1.3.42 - */ - function generate_include_typography_defaults() { - return true; - } -} - -if ( ! function_exists( 'generate_typography_premium_css_defaults' ) ) { - add_filter( 'generate_font_option_defaults', 'generate_typography_premium_css_defaults' ); - /** - * Add premium control defaults - * - * @since 1.3 - * @param array $defaults The existing defaults. - */ - function generate_typography_premium_css_defaults( $defaults ) { - $defaults['tablet_site_title_font_size'] = ''; - $defaults['tablet_navigation_font_size'] = ''; - $defaults['mobile_navigation_font_size'] = ''; - - $defaults['single_post_title_weight'] = ''; - $defaults['single_post_title_transform'] = ''; - $defaults['single_post_title_font_size'] = ''; - $defaults['single_post_title_font_size_mobile'] = ''; - $defaults['single_post_title_line_height'] = ''; - - $defaults['archive_post_title_weight'] = ''; - $defaults['archive_post_title_transform'] = ''; - $defaults['archive_post_title_font_size'] = ''; - $defaults['archive_post_title_font_size_mobile'] = ''; - $defaults['archive_post_title_line_height'] = ''; - - return $defaults; - } -} - -/** - * Premium typography CSS output. - */ -function generate_typography_get_premium_css() { - if ( ! function_exists( 'generate_get_default_fonts' ) ) { - return; - } - - $generate_settings = wp_parse_args( - get_option( 'generate_settings', array() ), - generate_get_default_fonts() - ); - - // Initiate our CSS class. - require_once GP_LIBRARY_DIRECTORY . 'class-make-css.php'; - - $premium_css = new GeneratePress_Pro_CSS(); - - $site_title_family = false; - if ( function_exists( 'generate_get_font_family_css' ) ) { - $site_title_family = generate_get_font_family_css( 'font_site_title', 'generate_settings', generate_get_default_fonts() ); - } - - $premium_css->set_selector( 'h1.entry-title' ); - $premium_css->add_property( 'font-weight', esc_attr( $generate_settings['single_post_title_weight'] ) ); - $premium_css->add_property( 'text-transform', esc_attr( $generate_settings['single_post_title_transform'] ) ); - - if ( '' !== $generate_settings['single_post_title_font_size'] ) { - $premium_css->add_property( 'font-size', absint( $generate_settings['single_post_title_font_size'] ), false, 'px' ); - } - - if ( '' !== $generate_settings['single_post_title_line_height'] ) { - $premium_css->add_property( 'line-height', floatval( $generate_settings['single_post_title_line_height'] ), false, 'em' ); - } - - $premium_css->set_selector( 'h2.entry-title' ); - $premium_css->add_property( 'font-weight', esc_attr( $generate_settings['archive_post_title_weight'] ) ); - $premium_css->add_property( 'text-transform', esc_attr( $generate_settings['archive_post_title_transform'] ) ); - - if ( '' !== $generate_settings['archive_post_title_font_size'] ) { - $premium_css->add_property( 'font-size', absint( $generate_settings['archive_post_title_font_size'] ), false, 'px' ); - } - - if ( '' !== $generate_settings['archive_post_title_line_height'] ) { - $premium_css->add_property( 'line-height', floatval( $generate_settings['archive_post_title_line_height'] ), false, 'em' ); - } - - if ( function_exists( 'generate_menu_plus_get_defaults' ) ) { - $menu_settings = wp_parse_args( - get_option( 'generate_menu_plus_settings', array() ), - generate_menu_plus_get_defaults() - ); - - if ( $menu_settings['navigation_as_header'] || $menu_settings['sticky_navigation_logo'] || 'enable' === $menu_settings['mobile_header'] ) { - $premium_css->set_selector( '.navigation-branding .main-title' ); - $premium_css->add_property( 'font-weight', esc_attr( $generate_settings['site_title_font_weight'] ) ); - $premium_css->add_property( 'text-transform', esc_attr( $generate_settings['site_title_font_transform'] ) ); - $premium_css->add_property( 'font-size', absint( $generate_settings['site_title_font_size'] ), false, 'px' ); - - if ( $site_title_family ) { - $premium_css->add_property( 'font-family', 'inherit' !== $generate_settings['font_site_title'] ? $site_title_family : null ); - } - } - } - - $premium_css->start_media_query( generate_premium_get_media_query( 'tablet' ) ); - - if ( '' !== $generate_settings['tablet_navigation_font_size'] ) { - $premium_css->set_selector( '.main-navigation:not(.slideout-navigation) a, .main-navigation .menu-toggle, .main-navigation .menu-bar-items' ); - $premium_css->add_property( 'font-size', absint( $generate_settings['tablet_navigation_font_size'] ), false, 'px' ); - - $tablet_subnav_font_size = $generate_settings['tablet_navigation_font_size'] - 1; - - if ( $generate_settings['tablet_navigation_font_size'] >= 17 ) { - $tablet_subnav_font_size = $generate_settings['tablet_navigation_font_size'] - 3; - } - - $premium_css->set_selector( '.main-navigation:not(.slideout-navigation) .main-nav ul ul li a' ); - $premium_css->add_property( 'font-size', absint( $tablet_subnav_font_size ), false, 'px' ); - } - - if ( '' !== $generate_settings['tablet_site_title_font_size'] ) { - $premium_css->set_selector( '.main-title, .navigation-branding .main-title' ); - $premium_css->add_property( 'font-size', absint( $generate_settings['tablet_site_title_font_size'] ), false, 'px' ); - } - - $premium_css->stop_media_query(); - - $premium_css->start_media_query( generate_premium_get_media_query( 'mobile' ) ); - - $premium_css->set_selector( 'h1.entry-title' ); - - if ( '' !== $generate_settings['single_post_title_font_size_mobile'] ) { - $premium_css->add_property( 'font-size', absint( $generate_settings['single_post_title_font_size_mobile'] ), false, 'px' ); - } - - $premium_css->set_selector( 'h2.entry-title' ); - - if ( '' !== $generate_settings['archive_post_title_font_size_mobile'] ) { - $premium_css->add_property( 'font-size', absint( $generate_settings['archive_post_title_font_size_mobile'] ), false, 'px' ); - } - - $premium_css->stop_media_query(); - - $premium_css->start_media_query( generate_premium_get_media_query( 'mobile-menu' ) ); - - if ( ! empty( $generate_settings['mobile_navigation_font_size'] ) ) { - $premium_css->set_selector( '.main-navigation:not(.slideout-navigation) a, .main-navigation .menu-toggle, .main-navigation .menu-bar-items' ); - $premium_css->add_property( 'font-size', absint( $generate_settings['mobile_navigation_font_size'] ), false, 'px' ); - - $mobile_subnav_font_size = $generate_settings['mobile_navigation_font_size'] - 1; - - if ( $generate_settings['mobile_navigation_font_size'] >= 17 ) { - $mobile_subnav_font_size = $generate_settings['mobile_navigation_font_size'] - 3; - } - - $premium_css->set_selector( '.main-navigation:not(.slideout-navigation) .main-nav ul ul li a' ); - $premium_css->add_property( 'font-size', absint( $mobile_subnav_font_size ), false, 'px' ); - } - - if ( function_exists( 'generate_menu_plus_get_defaults' ) ) { - $menu_settings = wp_parse_args( - get_option( 'generate_menu_plus_settings', array() ), - generate_menu_plus_get_defaults() - ); - - if ( $menu_settings['navigation_as_header'] || $menu_settings['sticky_navigation_logo'] || 'enable' === $menu_settings['mobile_header'] ) { - if ( ! empty( $generate_settings['mobile_site_title_font_size'] ) ) { - $premium_css->set_selector( '.navigation-branding .main-title' ); - $premium_css->add_property( 'font-size', absint( $generate_settings['mobile_site_title_font_size'] ), false, 'px' ); - } - } - } - - $premium_css->stop_media_query(); - - return $premium_css->css_output(); -} - -if ( ! function_exists( 'generate_typography_premium_css' ) ) { - add_action( 'wp_enqueue_scripts', 'generate_typography_premium_css', 100 ); - /** - * Add premium control CSS - * - * @since 1.3 - */ - function generate_typography_premium_css() { - if ( 'inline' === generate_get_css_print_method() ) { - wp_add_inline_style( 'generate-style', generate_typography_get_premium_css() ); - } - } -} - -add_filter( 'generate_external_dynamic_css_output', 'generate_typography_add_to_external_stylesheet' ); -/** - * Add CSS to the external stylesheet. - * - * @since 1.11.0 - * @param string $css Existing CSS. - */ -function generate_typography_add_to_external_stylesheet( $css ) { - if ( 'inline' === generate_get_css_print_method() ) { - return $css; - } - - $css .= generate_typography_get_premium_css(); - - return $css; -} diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/typography/functions/google-fonts.json b/wp-content/upgrade-temp-backup/plugins/gp-premium/typography/functions/google-fonts.json deleted file mode 100644 index a574abcf..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/typography/functions/google-fonts.json +++ /dev/null @@ -1,6835 +0,0 @@ -[ - { - "family": "Roboto", - "category": "sans-serif", - "variants": [ - "100", - "100italic", - "300", - "300italic", - "regular", - "italic", - "500", - "500italic", - "700", - "700italic", - "900", - "900italic" - ] - }, - { - "family": "Open Sans", - "category": "sans-serif", - "variants": [ - "300", - "300italic", - "regular", - "italic", - "600", - "600italic", - "700", - "700italic", - "800", - "800italic" - ] - }, - { - "family": "Lato", - "category": "sans-serif", - "variants": [ - "100", - "100italic", - "300", - "300italic", - "regular", - "italic", - "700", - "700italic", - "900", - "900italic" - ] - }, - { - "family": "Slabo 27px", - "category": "serif", - "variants": [ - "regular" - ] - }, - { - "family": "Oswald", - "category": "sans-serif", - "variants": [ - "200", - "300", - "regular", - "500", - "600", - "700" - ] - }, - { - "family": "Roboto Condensed", - "category": "sans-serif", - "variants": [ - "300", - "300italic", - "regular", - "italic", - "700", - "700italic" - ] - }, - { - "family": "Source Sans Pro", - "category": "sans-serif", - "variants": [ - "200", - "200italic", - "300", - "300italic", - "regular", - "italic", - "600", - "600italic", - "700", - "700italic", - "900", - "900italic" - ] - }, - { - "family": "Montserrat", - "category": "sans-serif", - "variants": [ - "100", - "100italic", - "200", - "200italic", - "300", - "300italic", - "regular", - "italic", - "500", - "500italic", - "600", - "600italic", - "700", - "700italic", - "800", - "800italic", - "900", - "900italic" - ] - }, - { - "family": "Raleway", - "category": "sans-serif", - "variants": [ - "100", - "100italic", - "200", - "200italic", - "300", - "300italic", - "regular", - "italic", - "500", - "500italic", - "600", - "600italic", - "700", - "700italic", - "800", - "800italic", - "900", - "900italic" - ] - }, - { - "family": "PT Sans", - "category": "sans-serif", - "variants": [ - "regular", - "italic", - "700", - "700italic" - ] - }, - { - "family": "Roboto Slab", - "category": "serif", - "variants": [ - "100", - "300", - "regular", - "700" - ] - }, - { - "family": "Merriweather", - "category": "serif", - "variants": [ - "300", - "300italic", - "regular", - "italic", - "700", - "700italic", - "900", - "900italic" - ] - }, - { - "family": "Open Sans Condensed", - "category": "sans-serif", - "variants": [ - "300", - "300italic", - "700" - ] - }, - { - "family": "Droid Sans", - "category": "sans-serif", - "variants": [ - "regular", - "700" - ] - }, - { - "family": "Lora", - "category": "serif", - "variants": [ - "regular", - "italic", - "700", - "700italic" - ] - }, - { - "family": "Ubuntu", - "category": "sans-serif", - "variants": [ - "300", - "300italic", - "regular", - "italic", - "500", - "500italic", - "700", - "700italic" - ] - }, - { - "family": "Droid Serif", - "category": "serif", - "variants": [ - "regular", - "italic", - "700", - "700italic" - ] - }, - { - "family": "Playfair Display", - "category": "serif", - "variants": [ - "regular", - "italic", - "700", - "700italic", - "900", - "900italic" - ] - }, - { - "family": "Arimo", - "category": "sans-serif", - "variants": [ - "regular", - "italic", - "700", - "700italic" - ] - }, - { - "family": "Noto Sans", - "category": "sans-serif", - "variants": [ - "regular", - "italic", - "700", - "700italic" - ] - }, - { - "family": "PT Serif", - "category": "serif", - "variants": [ - "regular", - "italic", - "700", - "700italic" - ] - }, - { - "family": "Titillium Web", - "category": "sans-serif", - "variants": [ - "200", - "200italic", - "300", - "300italic", - "regular", - "italic", - "600", - "600italic", - "700", - "700italic", - "900" - ] - }, - { - "family": "PT Sans Narrow", - "category": "sans-serif", - "variants": [ - "regular", - "700" - ] - }, - { - "family": "Muli", - "category": "sans-serif", - "variants": [ - "200", - "200italic", - "300", - "300italic", - "regular", - "italic", - "600", - "600italic", - "700", - "700italic", - "800", - "800italic", - "900", - "900italic" - ] - }, - { - "family": "Indie Flower", - "category": "handwriting", - "variants": [ - "regular" - ] - }, - { - "family": "Bitter", - "category": "serif", - "variants": [ - "regular", - "italic", - "700" - ] - }, - { - "family": "Poppins", - "category": "sans-serif", - "variants": [ - "300", - "regular", - "500", - "600", - "700" - ] - }, - { - "family": "Inconsolata", - "category": "monospace", - "variants": [ - "regular", - "700" - ] - }, - { - "family": "Dosis", - "category": "sans-serif", - "variants": [ - "200", - "300", - "regular", - "500", - "600", - "700", - "800" - ] - }, - { - "family": "Fjalla One", - "category": "sans-serif", - "variants": [ - "regular" - ] - }, - { - "family": "Oxygen", - "category": "sans-serif", - "variants": [ - "300", - "regular", - "700" - ] - }, - { - "family": "Hind", - "category": "sans-serif", - "variants": [ - "300", - "regular", - "500", - "600", - "700" - ] - }, - { - "family": "Cabin", - "category": "sans-serif", - "variants": [ - "regular", - "italic", - "500", - "500italic", - "600", - "600italic", - "700", - "700italic" - ] - }, - { - "family": "Anton", - "category": "sans-serif", - "variants": [ - "regular" - ] - }, - { - "family": "Arvo", - "category": "serif", - "variants": [ - "regular", - "italic", - "700", - "700italic" - ] - }, - { - "family": "Noto Serif", - "category": "serif", - "variants": [ - "regular", - "italic", - "700", - "700italic" - ] - }, - { - "family": "Crimson Text", - "category": "serif", - "variants": [ - "regular", - "italic", - "600", - "600italic", - "700", - "700italic" - ] - }, - { - "family": "Lobster", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Yanone Kaffeesatz", - "category": "sans-serif", - "variants": [ - "200", - "300", - "regular", - "700" - ] - }, - { - "family": "Nunito", - "category": "sans-serif", - "variants": [ - "200", - "200italic", - "300", - "300italic", - "regular", - "italic", - "600", - "600italic", - "700", - "700italic", - "800", - "800italic", - "900", - "900italic" - ] - }, - { - "family": "Bree Serif", - "category": "serif", - "variants": [ - "regular" - ] - }, - { - "family": "Catamaran", - "category": "sans-serif", - "variants": [ - "100", - "200", - "300", - "regular", - "500", - "600", - "700", - "800", - "900" - ] - }, - { - "family": "Libre Baskerville", - "category": "serif", - "variants": [ - "regular", - "italic", - "700" - ] - }, - { - "family": "Abel", - "category": "sans-serif", - "variants": [ - "regular" - ] - }, - { - "family": "Josefin Sans", - "category": "sans-serif", - "variants": [ - "100", - "100italic", - "300", - "300italic", - "regular", - "italic", - "600", - "600italic", - "700", - "700italic" - ] - }, - { - "family": "Fira Sans", - "category": "sans-serif", - "variants": [ - "100", - "100italic", - "200", - "200italic", - "300", - "300italic", - "regular", - "italic", - "500", - "500italic", - "600", - "600italic", - "700", - "700italic", - "800", - "800italic", - "900", - "900italic" - ] - }, - { - "family": "Gloria Hallelujah", - "category": "handwriting", - "variants": [ - "regular" - ] - }, - { - "family": "Abril Fatface", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Exo 2", - "category": "sans-serif", - "variants": [ - "100", - "100italic", - "200", - "200italic", - "300", - "300italic", - "regular", - "italic", - "500", - "500italic", - "600", - "600italic", - "700", - "700italic", - "800", - "800italic", - "900", - "900italic" - ] - }, - { - "family": "Merriweather Sans", - "category": "sans-serif", - "variants": [ - "300", - "300italic", - "regular", - "italic", - "700", - "700italic", - "800", - "800italic" - ] - }, - { - "family": "Pacifico", - "category": "handwriting", - "variants": [ - "regular" - ] - }, - { - "family": "Roboto Mono", - "category": "monospace", - "variants": [ - "100", - "100italic", - "300", - "300italic", - "regular", - "italic", - "500", - "500italic", - "700", - "700italic" - ] - }, - { - "family": "Varela Round", - "category": "sans-serif", - "variants": [ - "regular" - ] - }, - { - "family": "Asap", - "category": "sans-serif", - "variants": [ - "regular", - "italic", - "500", - "500italic", - "700", - "700italic" - ] - }, - { - "family": "Amatic SC", - "category": "handwriting", - "variants": [ - "regular", - "700" - ] - }, - { - "family": "Quicksand", - "category": "sans-serif", - "variants": [ - "300", - "regular", - "500", - "700" - ] - }, - { - "family": "Karla", - "category": "sans-serif", - "variants": [ - "regular", - "italic", - "700", - "700italic" - ] - }, - { - "family": "Ubuntu Condensed", - "category": "sans-serif", - "variants": [ - "regular" - ] - }, - { - "family": "Signika", - "category": "sans-serif", - "variants": [ - "300", - "regular", - "600", - "700" - ] - }, - { - "family": "Alegreya", - "category": "serif", - "variants": [ - "regular", - "italic", - "700", - "700italic", - "900", - "900italic" - ] - }, - { - "family": "Questrial", - "category": "sans-serif", - "variants": [ - "regular" - ] - }, - { - "family": "Rubik", - "category": "sans-serif", - "variants": [ - "300", - "300italic", - "regular", - "italic", - "500", - "500italic", - "700", - "700italic", - "900", - "900italic" - ] - }, - { - "family": "Shadows Into Light", - "category": "handwriting", - "variants": [ - "regular" - ] - }, - { - "family": "PT Sans Caption", - "category": "sans-serif", - "variants": [ - "regular", - "700" - ] - }, - { - "family": "Archivo Narrow", - "category": "sans-serif", - "variants": [ - "regular", - "italic", - "700", - "700italic" - ] - }, - { - "family": "Play", - "category": "sans-serif", - "variants": [ - "regular", - "700" - ] - }, - { - "family": "Cuprum", - "category": "sans-serif", - "variants": [ - "regular", - "italic", - "700", - "700italic" - ] - }, - { - "family": "Dancing Script", - "category": "handwriting", - "variants": [ - "regular", - "700" - ] - }, - { - "family": "Rokkitt", - "category": "serif", - "variants": [ - "100", - "200", - "300", - "regular", - "500", - "600", - "700", - "800", - "900" - ] - }, - { - "family": "Work Sans", - "category": "sans-serif", - "variants": [ - "100", - "200", - "300", - "regular", - "500", - "600", - "700", - "800", - "900" - ] - }, - { - "family": "Francois One", - "category": "sans-serif", - "variants": [ - "regular" - ] - }, - { - "family": "Vollkorn", - "category": "serif", - "variants": [ - "regular", - "italic", - "700", - "700italic" - ] - }, - { - "family": "Source Code Pro", - "category": "monospace", - "variants": [ - "200", - "300", - "regular", - "500", - "600", - "700", - "900" - ] - }, - { - "family": "Exo", - "category": "sans-serif", - "variants": [ - "100", - "100italic", - "200", - "200italic", - "300", - "300italic", - "regular", - "italic", - "500", - "500italic", - "600", - "600italic", - "700", - "700italic", - "800", - "800italic", - "900", - "900italic" - ] - }, - { - "family": "Maven Pro", - "category": "sans-serif", - "variants": [ - "regular", - "500", - "700", - "900" - ] - }, - { - "family": "Architects Daughter", - "category": "handwriting", - "variants": [ - "regular" - ] - }, - { - "family": "Orbitron", - "category": "sans-serif", - "variants": [ - "regular", - "500", - "700", - "900" - ] - }, - { - "family": "Pathway Gothic One", - "category": "sans-serif", - "variants": [ - "regular" - ] - }, - { - "family": "Acme", - "category": "sans-serif", - "variants": [ - "regular" - ] - }, - { - "family": "Ropa Sans", - "category": "sans-serif", - "variants": [ - "regular", - "italic" - ] - }, - { - "family": "Patua One", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "EB Garamond", - "category": "serif", - "variants": [ - "regular" - ] - }, - { - "family": "Lobster Two", - "category": "display", - "variants": [ - "regular", - "italic", - "700", - "700italic" - ] - }, - { - "family": "Crete Round", - "category": "serif", - "variants": [ - "regular", - "italic" - ] - }, - { - "family": "Cinzel", - "category": "serif", - "variants": [ - "regular", - "700", - "900" - ] - }, - { - "family": "Josefin Slab", - "category": "serif", - "variants": [ - "100", - "100italic", - "300", - "300italic", - "regular", - "italic", - "600", - "600italic", - "700", - "700italic" - ] - }, - { - "family": "Source Serif Pro", - "category": "serif", - "variants": [ - "regular", - "600", - "700" - ] - }, - { - "family": "Alegreya Sans", - "category": "sans-serif", - "variants": [ - "100", - "100italic", - "300", - "300italic", - "regular", - "italic", - "500", - "500italic", - "700", - "700italic", - "800", - "800italic", - "900", - "900italic" - ] - }, - { - "family": "Comfortaa", - "category": "display", - "variants": [ - "300", - "regular", - "700" - ] - }, - { - "family": "Russo One", - "category": "sans-serif", - "variants": [ - "regular" - ] - }, - { - "family": "News Cycle", - "category": "sans-serif", - "variants": [ - "regular", - "700" - ] - }, - { - "family": "ABeeZee", - "category": "sans-serif", - "variants": [ - "regular", - "italic" - ] - }, - { - "family": "Yellowtail", - "category": "handwriting", - "variants": [ - "regular" - ] - }, - { - "family": "Noticia Text", - "category": "serif", - "variants": [ - "regular", - "italic", - "700", - "700italic" - ] - }, - { - "family": "Monda", - "category": "sans-serif", - "variants": [ - "regular", - "700" - ] - }, - { - "family": "Quattrocento Sans", - "category": "sans-serif", - "variants": [ - "regular", - "italic", - "700", - "700italic" - ] - }, - { - "family": "Hammersmith One", - "category": "sans-serif", - "variants": [ - "regular" - ] - }, - { - "family": "Libre Franklin", - "category": "sans-serif", - "variants": [ - "100", - "100italic", - "200", - "200italic", - "300", - "300italic", - "regular", - "italic", - "500", - "500italic", - "600", - "600italic", - "700", - "700italic", - "800", - "800italic", - "900", - "900italic" - ] - }, - { - "family": "Satisfy", - "category": "handwriting", - "variants": [ - "regular" - ] - }, - { - "family": "Pontano Sans", - "category": "sans-serif", - "variants": [ - "regular" - ] - }, - { - "family": "Righteous", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Poiret One", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "BenchNine", - "category": "sans-serif", - "variants": [ - "300", - "regular", - "700" - ] - }, - { - "family": "Arapey", - "category": "serif", - "variants": [ - "regular", - "italic" - ] - }, - { - "family": "Kaushan Script", - "category": "handwriting", - "variants": [ - "regular" - ] - }, - { - "family": "Economica", - "category": "sans-serif", - "variants": [ - "regular", - "italic", - "700", - "700italic" - ] - }, - { - "family": "Kanit", - "category": "sans-serif", - "variants": [ - "100", - "100italic", - "200", - "200italic", - "300", - "300italic", - "regular", - "italic", - "500", - "500italic", - "600", - "600italic", - "700", - "700italic", - "800", - "800italic", - "900", - "900italic" - ] - }, - { - "family": "Old Standard TT", - "category": "serif", - "variants": [ - "regular", - "italic", - "700" - ] - }, - { - "family": "Sanchez", - "category": "serif", - "variants": [ - "regular", - "italic" - ] - }, - { - "family": "Courgette", - "category": "handwriting", - "variants": [ - "regular" - ] - }, - { - "family": "Quattrocento", - "category": "serif", - "variants": [ - "regular", - "700" - ] - }, - { - "family": "Domine", - "category": "serif", - "variants": [ - "regular", - "700" - ] - }, - { - "family": "Gudea", - "category": "sans-serif", - "variants": [ - "regular", - "italic", - "700" - ] - }, - { - "family": "Permanent Marker", - "category": "handwriting", - "variants": [ - "regular" - ] - }, - { - "family": "Armata", - "category": "sans-serif", - "variants": [ - "regular" - ] - }, - { - "family": "Cantarell", - "category": "sans-serif", - "variants": [ - "regular", - "italic", - "700", - "700italic" - ] - }, - { - "family": "Archivo Black", - "category": "sans-serif", - "variants": [ - "regular" - ] - }, - { - "family": "Istok Web", - "category": "sans-serif", - "variants": [ - "regular", - "italic", - "700", - "700italic" - ] - }, - { - "family": "Cardo", - "category": "serif", - "variants": [ - "regular", - "italic", - "700" - ] - }, - { - "family": "Playfair Display SC", - "category": "serif", - "variants": [ - "regular", - "italic", - "700", - "700italic", - "900", - "900italic" - ] - }, - { - "family": "Passion One", - "category": "display", - "variants": [ - "regular", - "700", - "900" - ] - }, - { - "family": "Tinos", - "category": "serif", - "variants": [ - "regular", - "italic", - "700", - "700italic" - ] - }, - { - "family": "Cookie", - "category": "handwriting", - "variants": [ - "regular" - ] - }, - { - "family": "Cormorant Garamond", - "category": "serif", - "variants": [ - "300", - "300italic", - "regular", - "italic", - "500", - "500italic", - "600", - "600italic", - "700", - "700italic" - ] - }, - { - "family": "Philosopher", - "category": "sans-serif", - "variants": [ - "regular", - "italic", - "700", - "700italic" - ] - }, - { - "family": "Yantramanav", - "category": "sans-serif", - "variants": [ - "100", - "300", - "regular", - "500", - "700", - "900" - ] - }, - { - "family": "Chewy", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Antic Slab", - "category": "serif", - "variants": [ - "regular" - ] - }, - { - "family": "Handlee", - "category": "handwriting", - "variants": [ - "regular" - ] - }, - { - "family": "Teko", - "category": "sans-serif", - "variants": [ - "300", - "regular", - "500", - "600", - "700" - ] - }, - { - "family": "Boogaloo", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Vidaloka", - "category": "serif", - "variants": [ - "regular" - ] - }, - { - "family": "Audiowide", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Coming Soon", - "category": "handwriting", - "variants": [ - "regular" - ] - }, - { - "family": "Alfa Slab One", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Cabin Condensed", - "category": "sans-serif", - "variants": [ - "regular", - "500", - "600", - "700" - ] - }, - { - "family": "Ruda", - "category": "sans-serif", - "variants": [ - "regular", - "700", - "900" - ] - }, - { - "family": "Ek Mukta", - "category": "sans-serif", - "variants": [ - "200", - "300", - "regular", - "500", - "600", - "700", - "800" - ] - }, - { - "family": "Changa One", - "category": "display", - "variants": [ - "regular", - "italic" - ] - }, - { - "family": "Tangerine", - "category": "handwriting", - "variants": [ - "regular", - "700" - ] - }, - { - "family": "Great Vibes", - "category": "handwriting", - "variants": [ - "regular" - ] - }, - { - "family": "Sintony", - "category": "sans-serif", - "variants": [ - "regular", - "700" - ] - }, - { - "family": "Khand", - "category": "sans-serif", - "variants": [ - "300", - "regular", - "500", - "600", - "700" - ] - }, - { - "family": "Bevan", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Kalam", - "category": "handwriting", - "variants": [ - "300", - "regular", - "700" - ] - }, - { - "family": "Days One", - "category": "sans-serif", - "variants": [ - "regular" - ] - }, - { - "family": "Bangers", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Rajdhani", - "category": "sans-serif", - "variants": [ - "300", - "regular", - "500", - "600", - "700" - ] - }, - { - "family": "Droid Sans Mono", - "category": "monospace", - "variants": [ - "regular" - ] - }, - { - "family": "Kreon", - "category": "serif", - "variants": [ - "300", - "regular", - "700" - ] - }, - { - "family": "Rambla", - "category": "sans-serif", - "variants": [ - "regular", - "italic", - "700", - "700italic" - ] - }, - { - "family": "Shrikhand", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Fredoka One", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Shadows Into Light Two", - "category": "handwriting", - "variants": [ - "regular" - ] - }, - { - "family": "Playball", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Neuton", - "category": "serif", - "variants": [ - "200", - "300", - "regular", - "italic", - "700", - "800" - ] - }, - { - "family": "Copse", - "category": "serif", - "variants": [ - "regular" - ] - }, - { - "family": "Didact Gothic", - "category": "sans-serif", - "variants": [ - "regular" - ] - }, - { - "family": "Signika Negative", - "category": "sans-serif", - "variants": [ - "300", - "regular", - "600", - "700" - ] - }, - { - "family": "Amiri", - "category": "serif", - "variants": [ - "regular", - "italic", - "700", - "700italic" - ] - }, - { - "family": "Gentium Book Basic", - "category": "serif", - "variants": [ - "regular", - "italic", - "700", - "700italic" - ] - }, - { - "family": "Glegoo", - "category": "serif", - "variants": [ - "regular", - "700" - ] - }, - { - "family": "Oleo Script", - "category": "display", - "variants": [ - "regular", - "700" - ] - }, - { - "family": "Voltaire", - "category": "sans-serif", - "variants": [ - "regular" - ] - }, - { - "family": "Actor", - "category": "sans-serif", - "variants": [ - "regular" - ] - }, - { - "family": "Amaranth", - "category": "sans-serif", - "variants": [ - "regular", - "italic", - "700", - "700italic" - ] - }, - { - "family": "Paytone One", - "category": "sans-serif", - "variants": [ - "regular" - ] - }, - { - "family": "Volkhov", - "category": "serif", - "variants": [ - "regular", - "italic", - "700", - "700italic" - ] - }, - { - "family": "Sorts Mill Goudy", - "category": "serif", - "variants": [ - "regular", - "italic" - ] - }, - { - "family": "Bad Script", - "category": "handwriting", - "variants": [ - "regular" - ] - }, - { - "family": "Coda", - "category": "display", - "variants": [ - "regular", - "800" - ] - }, - { - "family": "Damion", - "category": "handwriting", - "variants": [ - "regular" - ] - }, - { - "family": "Sacramento", - "category": "handwriting", - "variants": [ - "regular" - ] - }, - { - "family": "Squada One", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Rock Salt", - "category": "handwriting", - "variants": [ - "regular" - ] - }, - { - "family": "Adamina", - "category": "serif", - "variants": [ - "regular" - ] - }, - { - "family": "Alice", - "category": "serif", - "variants": [ - "regular" - ] - }, - { - "family": "Cantata One", - "category": "serif", - "variants": [ - "regular" - ] - }, - { - "family": "Luckiest Guy", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Rochester", - "category": "handwriting", - "variants": [ - "regular" - ] - }, - { - "family": "Covered By Your Grace", - "category": "handwriting", - "variants": [ - "regular" - ] - }, - { - "family": "Heebo", - "category": "sans-serif", - "variants": [ - "100", - "300", - "regular", - "500", - "700", - "800", - "900" - ] - }, - { - "family": "VT323", - "category": "monospace", - "variants": [ - "regular" - ] - }, - { - "family": "Nothing You Could Do", - "category": "handwriting", - "variants": [ - "regular" - ] - }, - { - "family": "Patrick Hand", - "category": "handwriting", - "variants": [ - "regular" - ] - }, - { - "family": "Gentium Basic", - "category": "serif", - "variants": [ - "regular", - "italic", - "700", - "700italic" - ] - }, - { - "family": "Nobile", - "category": "sans-serif", - "variants": [ - "regular", - "italic", - "700", - "700italic" - ] - }, - { - "family": "Rancho", - "category": "handwriting", - "variants": [ - "regular" - ] - }, - { - "family": "Marck Script", - "category": "handwriting", - "variants": [ - "regular" - ] - }, - { - "family": "Special Elite", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Julius Sans One", - "category": "sans-serif", - "variants": [ - "regular" - ] - }, - { - "family": "Varela", - "category": "sans-serif", - "variants": [ - "regular" - ] - }, - { - "family": "PT Mono", - "category": "monospace", - "variants": [ - "regular" - ] - }, - { - "family": "Alex Brush", - "category": "handwriting", - "variants": [ - "regular" - ] - }, - { - "family": "Homemade Apple", - "category": "handwriting", - "variants": [ - "regular" - ] - }, - { - "family": "Scada", - "category": "sans-serif", - "variants": [ - "regular", - "italic", - "700", - "700italic" - ] - }, - { - "family": "Jura", - "category": "sans-serif", - "variants": [ - "300", - "regular", - "500", - "600" - ] - }, - { - "family": "Antic", - "category": "sans-serif", - "variants": [ - "regular" - ] - }, - { - "family": "Gochi Hand", - "category": "handwriting", - "variants": [ - "regular" - ] - }, - { - "family": "Sarala", - "category": "sans-serif", - "variants": [ - "regular", - "700" - ] - }, - { - "family": "Electrolize", - "category": "sans-serif", - "variants": [ - "regular" - ] - }, - { - "family": "Sigmar One", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Candal", - "category": "sans-serif", - "variants": [ - "regular" - ] - }, - { - "family": "Prata", - "category": "serif", - "variants": [ - "regular" - ] - }, - { - "family": "Homenaje", - "category": "sans-serif", - "variants": [ - "regular" - ] - }, - { - "family": "Pinyon Script", - "category": "handwriting", - "variants": [ - "regular" - ] - }, - { - "family": "Unica One", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Basic", - "category": "sans-serif", - "variants": [ - "regular" - ] - }, - { - "family": "Neucha", - "category": "handwriting", - "variants": [ - "regular" - ] - }, - { - "family": "Convergence", - "category": "sans-serif", - "variants": [ - "regular" - ] - }, - { - "family": "Molengo", - "category": "sans-serif", - "variants": [ - "regular" - ] - }, - { - "family": "Caveat Brush", - "category": "handwriting", - "variants": [ - "regular" - ] - }, - { - "family": "Monoton", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Calligraffitti", - "category": "handwriting", - "variants": [ - "regular" - ] - }, - { - "family": "Kameron", - "category": "serif", - "variants": [ - "regular", - "700" - ] - }, - { - "family": "Share", - "category": "display", - "variants": [ - "regular", - "italic", - "700", - "700italic" - ] - }, - { - "family": "Alegreya Sans SC", - "category": "sans-serif", - "variants": [ - "100", - "100italic", - "300", - "300italic", - "regular", - "italic", - "500", - "500italic", - "700", - "700italic", - "800", - "800italic", - "900", - "900italic" - ] - }, - { - "family": "Enriqueta", - "category": "serif", - "variants": [ - "regular", - "700" - ] - }, - { - "family": "Martel", - "category": "serif", - "variants": [ - "200", - "300", - "regular", - "600", - "700", - "800", - "900" - ] - }, - { - "family": "Black Ops One", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Just Another Hand", - "category": "handwriting", - "variants": [ - "regular" - ] - }, - { - "family": "Caveat", - "category": "handwriting", - "variants": [ - "regular", - "700" - ] - }, - { - "family": "PT Serif Caption", - "category": "serif", - "variants": [ - "regular", - "italic" - ] - }, - { - "family": "Ultra", - "category": "serif", - "variants": [ - "regular" - ] - }, - { - "family": "Ubuntu Mono", - "category": "monospace", - "variants": [ - "regular", - "italic", - "700", - "700italic" - ] - }, - { - "family": "Carme", - "category": "sans-serif", - "variants": [ - "regular" - ] - }, - { - "family": "Cousine", - "category": "monospace", - "variants": [ - "regular", - "italic", - "700", - "700italic" - ] - }, - { - "family": "Cherry Cream Soda", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Reenie Beanie", - "category": "handwriting", - "variants": [ - "regular" - ] - }, - { - "family": "Hind Siliguri", - "category": "sans-serif", - "variants": [ - "300", - "regular", - "500", - "600", - "700" - ] - }, - { - "family": "Bubblegum Sans", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Aldrich", - "category": "sans-serif", - "variants": [ - "regular" - ] - }, - { - "family": "Lustria", - "category": "serif", - "variants": [ - "regular" - ] - }, - { - "family": "Alef", - "category": "sans-serif", - "variants": [ - "regular", - "700" - ] - }, - { - "family": "Freckle Face", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Fanwood Text", - "category": "serif", - "variants": [ - "regular", - "italic" - ] - }, - { - "family": "Advent Pro", - "category": "sans-serif", - "variants": [ - "100", - "200", - "300", - "regular", - "500", - "600", - "700" - ] - }, - { - "family": "Allura", - "category": "handwriting", - "variants": [ - "regular" - ] - }, - { - "family": "Ceviche One", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Press Start 2P", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Overlock", - "category": "display", - "variants": [ - "regular", - "italic", - "700", - "700italic", - "900", - "900italic" - ] - }, - { - "family": "Niconne", - "category": "handwriting", - "variants": [ - "regular" - ] - }, - { - "family": "Limelight", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Frank Ruhl Libre", - "category": "sans-serif", - "variants": [ - "300", - "regular", - "500", - "700", - "900" - ] - }, - { - "family": "Allerta Stencil", - "category": "sans-serif", - "variants": [ - "regular" - ] - }, - { - "family": "Marcellus", - "category": "serif", - "variants": [ - "regular" - ] - }, - { - "family": "Pragati Narrow", - "category": "sans-serif", - "variants": [ - "regular", - "700" - ] - }, - { - "family": "Michroma", - "category": "sans-serif", - "variants": [ - "regular" - ] - }, - { - "family": "Fauna One", - "category": "serif", - "variants": [ - "regular" - ] - }, - { - "family": "Syncopate", - "category": "sans-serif", - "variants": [ - "regular", - "700" - ] - }, - { - "family": "Telex", - "category": "sans-serif", - "variants": [ - "regular" - ] - }, - { - "family": "Marvel", - "category": "sans-serif", - "variants": [ - "regular", - "italic", - "700", - "700italic" - ] - }, - { - "family": "Cabin Sketch", - "category": "display", - "variants": [ - "regular", - "700" - ] - }, - { - "family": "Hanuman", - "category": "serif", - "variants": [ - "regular", - "700" - ] - }, - { - "family": "Cairo", - "category": "sans-serif", - "variants": [ - "200", - "300", - "regular", - "600", - "700", - "900" - ] - }, - { - "family": "Chivo", - "category": "sans-serif", - "variants": [ - "300", - "300italic", - "regular", - "italic", - "700", - "700italic", - "900", - "900italic" - ] - }, - { - "family": "Allerta", - "category": "sans-serif", - "variants": [ - "regular" - ] - }, - { - "family": "Fugaz One", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Viga", - "category": "sans-serif", - "variants": [ - "regular" - ] - }, - { - "family": "Ruslan Display", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Nixie One", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Marmelad", - "category": "sans-serif", - "variants": [ - "regular" - ] - }, - { - "family": "Average", - "category": "serif", - "variants": [ - "regular" - ] - }, - { - "family": "Spinnaker", - "category": "sans-serif", - "variants": [ - "regular" - ] - }, - { - "family": "Leckerli One", - "category": "handwriting", - "variants": [ - "regular" - ] - }, - { - "family": "Judson", - "category": "serif", - "variants": [ - "regular", - "italic", - "700" - ] - }, - { - "family": "Lusitana", - "category": "serif", - "variants": [ - "regular", - "700" - ] - }, - { - "family": "Montserrat Alternates", - "category": "sans-serif", - "variants": [ - "100", - "100italic", - "200", - "200italic", - "300", - "300italic", - "regular", - "italic", - "500", - "500italic", - "600", - "600italic", - "700", - "700italic", - "800", - "800italic", - "900", - "900italic" - ] - }, - { - "family": "Contrail One", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Oranienbaum", - "category": "serif", - "variants": [ - "regular" - ] - }, - { - "family": "Hind Vadodara", - "category": "sans-serif", - "variants": [ - "300", - "regular", - "500", - "600", - "700" - ] - }, - { - "family": "Rufina", - "category": "serif", - "variants": [ - "regular", - "700" - ] - }, - { - "family": "Quantico", - "category": "sans-serif", - "variants": [ - "regular", - "italic", - "700", - "700italic" - ] - }, - { - "family": "Concert One", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Marcellus SC", - "category": "serif", - "variants": [ - "regular" - ] - }, - { - "family": "Jockey One", - "category": "sans-serif", - "variants": [ - "regular" - ] - }, - { - "family": "Parisienne", - "category": "handwriting", - "variants": [ - "regular" - ] - }, - { - "family": "Carter One", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Arbutus Slab", - "category": "serif", - "variants": [ - "regular" - ] - }, - { - "family": "Slabo 13px", - "category": "serif", - "variants": [ - "regular" - ] - }, - { - "family": "Tauri", - "category": "sans-serif", - "variants": [ - "regular" - ] - }, - { - "family": "Goudy Bookletter 1911", - "category": "serif", - "variants": [ - "regular" - ] - }, - { - "family": "Carrois Gothic", - "category": "sans-serif", - "variants": [ - "regular" - ] - }, - { - "family": "Sue Ellen Francisco", - "category": "handwriting", - "variants": [ - "regular" - ] - }, - { - "family": "Walter Turncoat", - "category": "handwriting", - "variants": [ - "regular" - ] - }, - { - "family": "Annie Use Your Telescope", - "category": "handwriting", - "variants": [ - "regular" - ] - }, - { - "family": "Puritan", - "category": "sans-serif", - "variants": [ - "regular", - "italic", - "700", - "700italic" - ] - }, - { - "family": "Grand Hotel", - "category": "handwriting", - "variants": [ - "regular" - ] - }, - { - "family": "Yesteryear", - "category": "handwriting", - "variants": [ - "regular" - ] - }, - { - "family": "Jaldi", - "category": "sans-serif", - "variants": [ - "regular", - "700" - ] - }, - { - "family": "Khula", - "category": "sans-serif", - "variants": [ - "300", - "regular", - "600", - "700", - "800" - ] - }, - { - "family": "Cinzel Decorative", - "category": "display", - "variants": [ - "regular", - "700", - "900" - ] - }, - { - "family": "Crafty Girls", - "category": "handwriting", - "variants": [ - "regular" - ] - }, - { - "family": "Merienda", - "category": "handwriting", - "variants": [ - "regular", - "700" - ] - }, - { - "family": "Hind Guntur", - "category": "sans-serif", - "variants": [ - "300", - "regular", - "500", - "600", - "700" - ] - }, - { - "family": "Cutive", - "category": "serif", - "variants": [ - "regular" - ] - }, - { - "family": "Prompt", - "category": "sans-serif", - "variants": [ - "100", - "100italic", - "200", - "200italic", - "300", - "300italic", - "regular", - "italic", - "500", - "500italic", - "600", - "600italic", - "700", - "700italic", - "800", - "800italic", - "900", - "900italic" - ] - }, - { - "family": "Coustard", - "category": "serif", - "variants": [ - "regular", - "900" - ] - }, - { - "family": "Arima Madurai", - "category": "display", - "variants": [ - "100", - "200", - "300", - "regular", - "500", - "700", - "800", - "900" - ] - }, - { - "family": "Doppio One", - "category": "sans-serif", - "variants": [ - "regular" - ] - }, - { - "family": "Radley", - "category": "serif", - "variants": [ - "regular", - "italic" - ] - }, - { - "family": "Fontdiner Swanky", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Iceland", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Alegreya SC", - "category": "serif", - "variants": [ - "regular", - "italic", - "700", - "700italic", - "900", - "900italic" - ] - }, - { - "family": "Halant", - "category": "serif", - "variants": [ - "300", - "regular", - "500", - "600", - "700" - ] - }, - { - "family": "Schoolbell", - "category": "handwriting", - "variants": [ - "regular" - ] - }, - { - "family": "Waiting for the Sunrise", - "category": "handwriting", - "variants": [ - "regular" - ] - }, - { - "family": "Italianno", - "category": "handwriting", - "variants": [ - "regular" - ] - }, - { - "family": "Fredericka the Great", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Average Sans", - "category": "sans-serif", - "variants": [ - "regular" - ] - }, - { - "family": "Rosario", - "category": "sans-serif", - "variants": [ - "regular", - "italic", - "700", - "700italic" - ] - }, - { - "family": "Mr Dafoe", - "category": "handwriting", - "variants": [ - "regular" - ] - }, - { - "family": "Port Lligat Slab", - "category": "serif", - "variants": [ - "regular" - ] - }, - { - "family": "Aclonica", - "category": "sans-serif", - "variants": [ - "regular" - ] - }, - { - "family": "Graduate", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Racing Sans One", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Berkshire Swash", - "category": "handwriting", - "variants": [ - "regular" - ] - }, - { - "family": "Forum", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Anonymous Pro", - "category": "monospace", - "variants": [ - "regular", - "italic", - "700", - "700italic" - ] - }, - { - "family": "Love Ya Like A Sister", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Nunito Sans", - "category": "sans-serif", - "variants": [ - "200", - "200italic", - "300", - "300italic", - "regular", - "italic", - "600", - "600italic", - "700", - "700italic", - "800", - "800italic", - "900", - "900italic" - ] - }, - { - "family": "Magra", - "category": "sans-serif", - "variants": [ - "regular", - "700" - ] - }, - { - "family": "Lateef", - "category": "handwriting", - "variants": [ - "regular" - ] - }, - { - "family": "Assistant", - "category": "sans-serif", - "variants": [ - "200", - "300", - "regular", - "600", - "700", - "800" - ] - }, - { - "family": "Six Caps", - "category": "sans-serif", - "variants": [ - "regular" - ] - }, - { - "family": "Gilda Display", - "category": "serif", - "variants": [ - "regular" - ] - }, - { - "family": "Oregano", - "category": "display", - "variants": [ - "regular", - "italic" - ] - }, - { - "family": "Metrophobic", - "category": "sans-serif", - "variants": [ - "regular" - ] - }, - { - "family": "Lalezar", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Caudex", - "category": "serif", - "variants": [ - "regular", - "italic", - "700", - "700italic" - ] - }, - { - "family": "Kelly Slab", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Reem Kufi", - "category": "sans-serif", - "variants": [ - "regular" - ] - }, - { - "family": "Cambay", - "category": "sans-serif", - "variants": [ - "regular", - "italic", - "700", - "700italic" - ] - }, - { - "family": "Gruppo", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Give You Glory", - "category": "handwriting", - "variants": [ - "regular" - ] - }, - { - "family": "GFS Didot", - "category": "serif", - "variants": [ - "regular" - ] - }, - { - "family": "Duru Sans", - "category": "sans-serif", - "variants": [ - "regular" - ] - }, - { - "family": "Andika", - "category": "sans-serif", - "variants": [ - "regular" - ] - }, - { - "family": "Tenor Sans", - "category": "sans-serif", - "variants": [ - "regular" - ] - }, - { - "family": "Knewave", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Averia Serif Libre", - "category": "display", - "variants": [ - "300", - "300italic", - "regular", - "italic", - "700", - "700italic" - ] - }, - { - "family": "Eczar", - "category": "serif", - "variants": [ - "regular", - "500", - "600", - "700", - "800" - ] - }, - { - "family": "Inder", - "category": "sans-serif", - "variants": [ - "regular" - ] - }, - { - "family": "Martel Sans", - "category": "sans-serif", - "variants": [ - "200", - "300", - "regular", - "600", - "700", - "800", - "900" - ] - }, - { - "family": "Trocchi", - "category": "serif", - "variants": [ - "regular" - ] - }, - { - "family": "Wire One", - "category": "sans-serif", - "variants": [ - "regular" - ] - }, - { - "family": "Petit Formal Script", - "category": "handwriting", - "variants": [ - "regular" - ] - }, - { - "family": "Mako", - "category": "sans-serif", - "variants": [ - "regular" - ] - }, - { - "family": "Frijole", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Zeyada", - "category": "handwriting", - "variants": [ - "regular" - ] - }, - { - "family": "Slackey", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Karma", - "category": "serif", - "variants": [ - "300", - "regular", - "500", - "600", - "700" - ] - }, - { - "family": "Mate", - "category": "serif", - "variants": [ - "regular", - "italic" - ] - }, - { - "family": "Belleza", - "category": "sans-serif", - "variants": [ - "regular" - ] - }, - { - "family": "Montez", - "category": "handwriting", - "variants": [ - "regular" - ] - }, - { - "family": "Quando", - "category": "serif", - "variants": [ - "regular" - ] - }, - { - "family": "Capriola", - "category": "sans-serif", - "variants": [ - "regular" - ] - }, - { - "family": "Lilita One", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Trirong", - "category": "serif", - "variants": [ - "100", - "100italic", - "200", - "200italic", - "300", - "300italic", - "regular", - "italic", - "500", - "500italic", - "600", - "600italic", - "700", - "700italic", - "800", - "800italic", - "900", - "900italic" - ] - }, - { - "family": "Lekton", - "category": "sans-serif", - "variants": [ - "regular", - "italic", - "700" - ] - }, - { - "family": "Just Me Again Down Here", - "category": "handwriting", - "variants": [ - "regular" - ] - }, - { - "family": "Bowlby One SC", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "The Girl Next Door", - "category": "handwriting", - "variants": [ - "regular" - ] - }, - { - "family": "Happy Monkey", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Merienda One", - "category": "handwriting", - "variants": [ - "regular" - ] - }, - { - "family": "Alike", - "category": "serif", - "variants": [ - "regular" - ] - }, - { - "family": "Chelsea Market", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Unkempt", - "category": "display", - "variants": [ - "regular", - "700" - ] - }, - { - "family": "Anaheim", - "category": "sans-serif", - "variants": [ - "regular" - ] - }, - { - "family": "Strait", - "category": "sans-serif", - "variants": [ - "regular" - ] - }, - { - "family": "Brawler", - "category": "serif", - "variants": [ - "regular" - ] - }, - { - "family": "Clicker Script", - "category": "handwriting", - "variants": [ - "regular" - ] - }, - { - "family": "Delius", - "category": "handwriting", - "variants": [ - "regular" - ] - }, - { - "family": "Mouse Memoirs", - "category": "sans-serif", - "variants": [ - "regular" - ] - }, - { - "family": "IM Fell Double Pica", - "category": "serif", - "variants": [ - "regular", - "italic" - ] - }, - { - "family": "Crushed", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Rammetto One", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Prosto One", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Kranky", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "IM Fell English", - "category": "serif", - "variants": [ - "regular", - "italic" - ] - }, - { - "family": "Aladin", - "category": "handwriting", - "variants": [ - "regular" - ] - }, - { - "family": "Mr De Haviland", - "category": "handwriting", - "variants": [ - "regular" - ] - }, - { - "family": "NTR", - "category": "sans-serif", - "variants": [ - "regular" - ] - }, - { - "family": "Londrina Solid", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Skranji", - "category": "display", - "variants": [ - "regular", - "700" - ] - }, - { - "family": "Allan", - "category": "display", - "variants": [ - "regular", - "700" - ] - }, - { - "family": "Baumans", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Ovo", - "category": "serif", - "variants": [ - "regular" - ] - }, - { - "family": "Changa", - "category": "sans-serif", - "variants": [ - "200", - "300", - "regular", - "500", - "600", - "700", - "800" - ] - }, - { - "family": "Lemon", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Federo", - "category": "sans-serif", - "variants": [ - "regular" - ] - }, - { - "family": "Herr Von Muellerhoff", - "category": "handwriting", - "variants": [ - "regular" - ] - }, - { - "family": "Arizonia", - "category": "handwriting", - "variants": [ - "regular" - ] - }, - { - "family": "Bowlby One", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Orienta", - "category": "sans-serif", - "variants": [ - "regular" - ] - }, - { - "family": "Short Stack", - "category": "handwriting", - "variants": [ - "regular" - ] - }, - { - "family": "Bungee Inline", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Andada", - "category": "serif", - "variants": [ - "regular" - ] - }, - { - "family": "Baloo Paaji", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Oxygen Mono", - "category": "monospace", - "variants": [ - "regular" - ] - }, - { - "family": "Yeseva One", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "UnifrakturMaguntia", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Bentham", - "category": "serif", - "variants": [ - "regular" - ] - }, - { - "family": "Londrina Outline", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Pompiere", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Gabriela", - "category": "serif", - "variants": [ - "regular" - ] - }, - { - "family": "Qwigley", - "category": "handwriting", - "variants": [ - "regular" - ] - }, - { - "family": "Nova Square", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Poly", - "category": "serif", - "variants": [ - "regular", - "italic" - ] - }, - { - "family": "Sniglet", - "category": "display", - "variants": [ - "regular", - "800" - ] - }, - { - "family": "Patrick Hand SC", - "category": "handwriting", - "variants": [ - "regular" - ] - }, - { - "family": "Gravitas One", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Khmer", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Shojumaru", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Kurale", - "category": "serif", - "variants": [ - "regular" - ] - }, - { - "family": "Gafata", - "category": "sans-serif", - "variants": [ - "regular" - ] - }, - { - "family": "Biryani", - "category": "sans-serif", - "variants": [ - "200", - "300", - "regular", - "600", - "700", - "800", - "900" - ] - }, - { - "family": "Cambo", - "category": "serif", - "variants": [ - "regular" - ] - }, - { - "family": "Titan One", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Carrois Gothic SC", - "category": "sans-serif", - "variants": [ - "regular" - ] - }, - { - "family": "La Belle Aurore", - "category": "handwriting", - "variants": [ - "regular" - ] - }, - { - "family": "Holtwood One SC", - "category": "serif", - "variants": [ - "regular" - ] - }, - { - "family": "Oleo Script Swash Caps", - "category": "display", - "variants": [ - "regular", - "700" - ] - }, - { - "family": "Headland One", - "category": "serif", - "variants": [ - "regular" - ] - }, - { - "family": "Cherry Swash", - "category": "display", - "variants": [ - "regular", - "700" - ] - }, - { - "family": "Belgrano", - "category": "serif", - "variants": [ - "regular" - ] - }, - { - "family": "Norican", - "category": "handwriting", - "variants": [ - "regular" - ] - }, - { - "family": "Mountains of Christmas", - "category": "display", - "variants": [ - "regular", - "700" - ] - }, - { - "family": "Julee", - "category": "handwriting", - "variants": [ - "regular" - ] - }, - { - "family": "Ramabhadra", - "category": "sans-serif", - "variants": [ - "regular" - ] - }, - { - "family": "Mallanna", - "category": "sans-serif", - "variants": [ - "regular" - ] - }, - { - "family": "Kristi", - "category": "handwriting", - "variants": [ - "regular" - ] - }, - { - "family": "Imprima", - "category": "sans-serif", - "variants": [ - "regular" - ] - }, - { - "family": "Lily Script One", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Chau Philomene One", - "category": "sans-serif", - "variants": [ - "regular", - "italic" - ] - }, - { - "family": "Bilbo Swash Caps", - "category": "handwriting", - "variants": [ - "regular" - ] - }, - { - "family": "Finger Paint", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Voces", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Itim", - "category": "handwriting", - "variants": [ - "regular" - ] - }, - { - "family": "Megrim", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Simonetta", - "category": "display", - "variants": [ - "regular", - "italic", - "900", - "900italic" - ] - }, - { - "family": "Cutive Mono", - "category": "monospace", - "variants": [ - "regular" - ] - }, - { - "family": "Stardos Stencil", - "category": "display", - "variants": [ - "regular", - "700" - ] - }, - { - "family": "IM Fell DW Pica", - "category": "serif", - "variants": [ - "regular", - "italic" - ] - }, - { - "family": "Unna", - "category": "serif", - "variants": [ - "regular", - "italic", - "700", - "700italic" - ] - }, - { - "family": "Loved by the King", - "category": "handwriting", - "variants": [ - "regular" - ] - }, - { - "family": "Prociono", - "category": "serif", - "variants": [ - "regular" - ] - }, - { - "family": "Corben", - "category": "display", - "variants": [ - "regular", - "700" - ] - }, - { - "family": "Amiko", - "category": "sans-serif", - "variants": [ - "regular", - "600", - "700" - ] - }, - { - "family": "Denk One", - "category": "sans-serif", - "variants": [ - "regular" - ] - }, - { - "family": "Palanquin", - "category": "sans-serif", - "variants": [ - "100", - "200", - "300", - "regular", - "500", - "600", - "700" - ] - }, - { - "family": "Baloo", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Fondamento", - "category": "handwriting", - "variants": [ - "regular", - "italic" - ] - }, - { - "family": "Seaweed Script", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Shanti", - "category": "sans-serif", - "variants": [ - "regular" - ] - }, - { - "family": "Wendy One", - "category": "sans-serif", - "variants": [ - "regular" - ] - }, - { - "family": "Raleway Dots", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Amethysta", - "category": "serif", - "variants": [ - "regular" - ] - }, - { - "family": "Vast Shadow", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Stalemate", - "category": "handwriting", - "variants": [ - "regular" - ] - }, - { - "family": "Fira Mono", - "category": "monospace", - "variants": [ - "regular", - "500", - "700" - ] - }, - { - "family": "Expletus Sans", - "category": "display", - "variants": [ - "regular", - "italic", - "500", - "500italic", - "600", - "600italic", - "700", - "700italic" - ] - }, - { - "family": "Scheherazade", - "category": "serif", - "variants": [ - "regular", - "700" - ] - }, - { - "family": "Fenix", - "category": "serif", - "variants": [ - "regular" - ] - }, - { - "family": "Delius Swash Caps", - "category": "handwriting", - "variants": [ - "regular" - ] - }, - { - "family": "Rouge Script", - "category": "handwriting", - "variants": [ - "regular" - ] - }, - { - "family": "Life Savers", - "category": "display", - "variants": [ - "regular", - "700" - ] - }, - { - "family": "IM Fell English SC", - "category": "serif", - "variants": [ - "regular" - ] - }, - { - "family": "Meddon", - "category": "handwriting", - "variants": [ - "regular" - ] - }, - { - "family": "Tienne", - "category": "serif", - "variants": [ - "regular", - "700", - "900" - ] - }, - { - "family": "Over the Rainbow", - "category": "handwriting", - "variants": [ - "regular" - ] - }, - { - "family": "Share Tech Mono", - "category": "monospace", - "variants": [ - "regular" - ] - }, - { - "family": "Abhaya Libre", - "category": "serif", - "variants": [ - "regular", - "500", - "600", - "700", - "800" - ] - }, - { - "family": "Kotta One", - "category": "serif", - "variants": [ - "regular" - ] - }, - { - "family": "Pridi", - "category": "serif", - "variants": [ - "200", - "300", - "regular", - "500", - "600", - "700" - ] - }, - { - "family": "Euphoria Script", - "category": "handwriting", - "variants": [ - "regular" - ] - }, - { - "family": "Engagement", - "category": "handwriting", - "variants": [ - "regular" - ] - }, - { - "family": "Podkova", - "category": "serif", - "variants": [ - "regular", - "500", - "600", - "700", - "800" - ] - }, - { - "family": "Salsa", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Sofia", - "category": "handwriting", - "variants": [ - "regular" - ] - }, - { - "family": "Suranna", - "category": "serif", - "variants": [ - "regular" - ] - }, - { - "family": "Mada", - "category": "sans-serif", - "variants": [ - "300", - "regular", - "500", - "900" - ] - }, - { - "family": "Chonburi", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Ledger", - "category": "serif", - "variants": [ - "regular" - ] - }, - { - "family": "Italiana", - "category": "serif", - "variants": [ - "regular" - ] - }, - { - "family": "Dawning of a New Day", - "category": "handwriting", - "variants": [ - "regular" - ] - }, - { - "family": "Nokora", - "category": "serif", - "variants": [ - "regular", - "700" - ] - }, - { - "family": "Angkor", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Medula One", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Taviraj", - "category": "serif", - "variants": [ - "100", - "100italic", - "200", - "200italic", - "300", - "300italic", - "regular", - "italic", - "500", - "500italic", - "600", - "600italic", - "700", - "700italic", - "800", - "800italic", - "900", - "900italic" - ] - }, - { - "family": "Vampiro One", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Englebert", - "category": "sans-serif", - "variants": [ - "regular" - ] - }, - { - "family": "Nova Mono", - "category": "monospace", - "variants": [ - "regular" - ] - }, - { - "family": "Dorsa", - "category": "sans-serif", - "variants": [ - "regular" - ] - }, - { - "family": "Averia Sans Libre", - "category": "display", - "variants": [ - "300", - "300italic", - "regular", - "italic", - "700", - "700italic" - ] - }, - { - "family": "Cedarville Cursive", - "category": "handwriting", - "variants": [ - "regular" - ] - }, - { - "family": "Geo", - "category": "sans-serif", - "variants": [ - "regular", - "italic" - ] - }, - { - "family": "Rationale", - "category": "sans-serif", - "variants": [ - "regular" - ] - }, - { - "family": "Balthazar", - "category": "serif", - "variants": [ - "regular" - ] - }, - { - "family": "Sunshiney", - "category": "handwriting", - "variants": [ - "regular" - ] - }, - { - "family": "Aguafina Script", - "category": "handwriting", - "variants": [ - "regular" - ] - }, - { - "family": "Mystery Quest", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Fjord One", - "category": "serif", - "variants": [ - "regular" - ] - }, - { - "family": "Fira Sans Extra Condensed", - "category": "sans-serif", - "variants": [ - "100", - "100italic", - "200", - "200italic", - "300", - "300italic", - "regular", - "italic", - "500", - "500italic", - "600", - "600italic", - "700", - "700italic", - "800", - "800italic", - "900", - "900italic" - ] - }, - { - "family": "Kadwa", - "category": "serif", - "variants": [ - "regular", - "700" - ] - }, - { - "family": "McLaren", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Rye", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Sail", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Athiti", - "category": "sans-serif", - "variants": [ - "200", - "300", - "regular", - "500", - "600", - "700" - ] - }, - { - "family": "Rosarivo", - "category": "serif", - "variants": [ - "regular", - "italic" - ] - }, - { - "family": "Kite One", - "category": "sans-serif", - "variants": [ - "regular" - ] - }, - { - "family": "Odor Mean Chey", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Numans", - "category": "sans-serif", - "variants": [ - "regular" - ] - }, - { - "family": "Artifika", - "category": "serif", - "variants": [ - "regular" - ] - }, - { - "family": "Poller One", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Gurajada", - "category": "serif", - "variants": [ - "regular" - ] - }, - { - "family": "Inika", - "category": "serif", - "variants": [ - "regular", - "700" - ] - }, - { - "family": "Mandali", - "category": "sans-serif", - "variants": [ - "regular" - ] - }, - { - "family": "Bungee Shade", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Suwannaphum", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Mate SC", - "category": "serif", - "variants": [ - "regular" - ] - }, - { - "family": "Creepster", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Arsenal", - "category": "sans-serif", - "variants": [ - "regular", - "italic", - "700", - "700italic" - ] - }, - { - "family": "Montserrat Subrayada", - "category": "sans-serif", - "variants": [ - "regular", - "700" - ] - }, - { - "family": "Metamorphous", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Palanquin Dark", - "category": "sans-serif", - "variants": [ - "regular", - "500", - "600", - "700" - ] - }, - { - "family": "Coda Caption", - "category": "sans-serif", - "variants": [ - "800" - ] - }, - { - "family": "Dynalight", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Maitree", - "category": "serif", - "variants": [ - "200", - "300", - "regular", - "500", - "600", - "700" - ] - }, - { - "family": "IM Fell French Canon", - "category": "serif", - "variants": [ - "regular", - "italic" - ] - }, - { - "family": "Amarante", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Quintessential", - "category": "handwriting", - "variants": [ - "regular" - ] - }, - { - "family": "Codystar", - "category": "display", - "variants": [ - "300", - "regular" - ] - }, - { - "family": "Cantora One", - "category": "sans-serif", - "variants": [ - "regular" - ] - }, - { - "family": "Aref Ruqaa", - "category": "serif", - "variants": [ - "regular", - "700" - ] - }, - { - "family": "Griffy", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Revalia", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Buenard", - "category": "serif", - "variants": [ - "regular", - "700" - ] - }, - { - "family": "Donegal One", - "category": "serif", - "variants": [ - "regular" - ] - }, - { - "family": "IM Fell DW Pica SC", - "category": "serif", - "variants": [ - "regular" - ] - }, - { - "family": "Habibi", - "category": "serif", - "variants": [ - "regular" - ] - }, - { - "family": "Share Tech", - "category": "sans-serif", - "variants": [ - "regular" - ] - }, - { - "family": "Flamenco", - "category": "display", - "variants": [ - "300", - "regular" - ] - }, - { - "family": "Mitr", - "category": "sans-serif", - "variants": [ - "200", - "300", - "regular", - "500", - "600", - "700" - ] - }, - { - "family": "Maiden Orange", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Diplomata SC", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Cormorant", - "category": "serif", - "variants": [ - "300", - "300italic", - "regular", - "italic", - "500", - "500italic", - "600", - "600italic", - "700", - "700italic" - ] - }, - { - "family": "Delius Unicase", - "category": "handwriting", - "variants": [ - "regular", - "700" - ] - }, - { - "family": "Stoke", - "category": "serif", - "variants": [ - "300", - "regular" - ] - }, - { - "family": "Vibur", - "category": "handwriting", - "variants": [ - "regular" - ] - }, - { - "family": "Sarpanch", - "category": "sans-serif", - "variants": [ - "regular", - "500", - "600", - "700", - "800", - "900" - ] - }, - { - "family": "Baloo Bhaina", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Baloo Tamma", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Averia Libre", - "category": "display", - "variants": [ - "300", - "300italic", - "regular", - "italic", - "700", - "700italic" - ] - }, - { - "family": "Esteban", - "category": "serif", - "variants": [ - "regular" - ] - }, - { - "family": "Battambang", - "category": "display", - "variants": [ - "regular", - "700" - ] - }, - { - "family": "Bokor", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Wallpoet", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "IM Fell Great Primer", - "category": "serif", - "variants": [ - "regular", - "italic" - ] - }, - { - "family": "Tulpen One", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Proza Libre", - "category": "sans-serif", - "variants": [ - "regular", - "italic", - "500", - "500italic", - "600", - "600italic", - "700", - "700italic", - "800", - "800italic" - ] - }, - { - "family": "IM Fell French Canon SC", - "category": "serif", - "variants": [ - "regular" - ] - }, - { - "family": "Vesper Libre", - "category": "serif", - "variants": [ - "regular", - "500", - "700", - "900" - ] - }, - { - "family": "Rozha One", - "category": "serif", - "variants": [ - "regular" - ] - }, - { - "family": "Sansita", - "category": "sans-serif", - "variants": [ - "regular", - "italic", - "700", - "700italic", - "800", - "800italic", - "900", - "900italic" - ] - }, - { - "family": "Kavoon", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Della Respira", - "category": "serif", - "variants": [ - "regular" - ] - }, - { - "family": "Milonga", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Condiment", - "category": "handwriting", - "variants": [ - "regular" - ] - }, - { - "family": "Junge", - "category": "serif", - "variants": [ - "regular" - ] - }, - { - "family": "New Rocker", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Chicle", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Mrs Saint Delafield", - "category": "handwriting", - "variants": [ - "regular" - ] - }, - { - "family": "League Script", - "category": "handwriting", - "variants": [ - "regular" - ] - }, - { - "family": "Miniver", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Galindo", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Moul", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Amatica SC", - "category": "display", - "variants": [ - "regular", - "700" - ] - }, - { - "family": "Stint Ultra Expanded", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Yrsa", - "category": "serif", - "variants": [ - "300", - "regular", - "500", - "600", - "700" - ] - }, - { - "family": "Stint Ultra Condensed", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Suez One", - "category": "serif", - "variants": [ - "regular" - ] - }, - { - "family": "Text Me One", - "category": "sans-serif", - "variants": [ - "regular" - ] - }, - { - "family": "Buda", - "category": "display", - "variants": [ - "300" - ] - }, - { - "family": "Ruluko", - "category": "sans-serif", - "variants": [ - "regular" - ] - }, - { - "family": "Sonsie One", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Krona One", - "category": "sans-serif", - "variants": [ - "regular" - ] - }, - { - "family": "Elsie", - "category": "display", - "variants": [ - "regular", - "900" - ] - }, - { - "family": "Pangolin", - "category": "handwriting", - "variants": [ - "regular" - ] - }, - { - "family": "Linden Hill", - "category": "serif", - "variants": [ - "regular", - "italic" - ] - }, - { - "family": "Secular One", - "category": "sans-serif", - "variants": [ - "regular" - ] - }, - { - "family": "IM Fell Double Pica SC", - "category": "serif", - "variants": [ - "regular" - ] - }, - { - "family": "Alike Angular", - "category": "serif", - "variants": [ - "regular" - ] - }, - { - "family": "Sancreek", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Bilbo", - "category": "handwriting", - "variants": [ - "regular" - ] - }, - { - "family": "Antic Didone", - "category": "serif", - "variants": [ - "regular" - ] - }, - { - "family": "Paprika", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Asul", - "category": "sans-serif", - "variants": [ - "regular", - "700" - ] - }, - { - "family": "David Libre", - "category": "serif", - "variants": [ - "regular", - "500", - "700" - ] - }, - { - "family": "Almendra", - "category": "serif", - "variants": [ - "regular", - "italic", - "700", - "700italic" - ] - }, - { - "family": "Sriracha", - "category": "handwriting", - "variants": [ - "regular" - ] - }, - { - "family": "Miriam Libre", - "category": "sans-serif", - "variants": [ - "regular", - "700" - ] - }, - { - "family": "Ribeye", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Swanky and Moo Moo", - "category": "handwriting", - "variants": [ - "regular" - ] - }, - { - "family": "Trade Winds", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Overlock SC", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Nova Round", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Cagliostro", - "category": "sans-serif", - "variants": [ - "regular" - ] - }, - { - "family": "Glass Antiqua", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Offside", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "El Messiri", - "category": "sans-serif", - "variants": [ - "regular", - "500", - "600", - "700" - ] - }, - { - "family": "Bigshot One", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "IM Fell Great Primer SC", - "category": "serif", - "variants": [ - "regular" - ] - }, - { - "family": "Akronim", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Fira Sans Condensed", - "category": "sans-serif", - "variants": [ - "100", - "100italic", - "200", - "200italic", - "300", - "300italic", - "regular", - "italic", - "500", - "500italic", - "600", - "600italic", - "700", - "700italic", - "800", - "800italic", - "900", - "900italic" - ] - }, - { - "family": "Nosifer", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Autour One", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Pirata One", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Port Lligat Sans", - "category": "sans-serif", - "variants": [ - "regular" - ] - }, - { - "family": "Scope One", - "category": "serif", - "variants": [ - "regular" - ] - }, - { - "family": "Sumana", - "category": "serif", - "variants": [ - "regular", - "700" - ] - }, - { - "family": "Lemonada", - "category": "display", - "variants": [ - "300", - "regular", - "600", - "700" - ] - }, - { - "family": "Montaga", - "category": "serif", - "variants": [ - "regular" - ] - }, - { - "family": "Iceberg", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Ruthie", - "category": "handwriting", - "variants": [ - "regular" - ] - }, - { - "family": "Content", - "category": "display", - "variants": [ - "regular", - "700" - ] - }, - { - "family": "Henny Penny", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Nova Slim", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Hind Madurai", - "category": "sans-serif", - "variants": [ - "300", - "regular", - "500", - "600", - "700" - ] - }, - { - "family": "Harmattan", - "category": "sans-serif", - "variants": [ - "regular" - ] - }, - { - "family": "UnifrakturCook", - "category": "display", - "variants": [ - "700" - ] - }, - { - "family": "Sarina", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Bubbler One", - "category": "sans-serif", - "variants": [ - "regular" - ] - }, - { - "family": "Dekko", - "category": "handwriting", - "variants": [ - "regular" - ] - }, - { - "family": "Redressed", - "category": "handwriting", - "variants": [ - "regular" - ] - }, - { - "family": "Laila", - "category": "serif", - "variants": [ - "300", - "regular", - "500", - "600", - "700" - ] - }, - { - "family": "Faster One", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Arya", - "category": "sans-serif", - "variants": [ - "regular", - "700" - ] - }, - { - "family": "Peralta", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Meie Script", - "category": "handwriting", - "variants": [ - "regular" - ] - }, - { - "family": "Overpass", - "category": "sans-serif", - "variants": [ - "100", - "100italic", - "200", - "200italic", - "300", - "300italic", - "regular", - "italic", - "600", - "600italic", - "700", - "700italic", - "800", - "800italic", - "900", - "900italic" - ] - }, - { - "family": "Monsieur La Doulaise", - "category": "handwriting", - "variants": [ - "regular" - ] - }, - { - "family": "Bungee", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Snippet", - "category": "sans-serif", - "variants": [ - "regular" - ] - }, - { - "family": "Emilys Candy", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Trykker", - "category": "serif", - "variants": [ - "regular" - ] - }, - { - "family": "MedievalSharp", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Space Mono", - "category": "monospace", - "variants": [ - "regular", - "italic", - "700", - "700italic" - ] - }, - { - "family": "Croissant One", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Monofett", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Lovers Quarrel", - "category": "handwriting", - "variants": [ - "regular" - ] - }, - { - "family": "Oldenburg", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Galdeano", - "category": "sans-serif", - "variants": [ - "regular" - ] - }, - { - "family": "Spicy Rice", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Wellfleet", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Germania One", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "GFS Neohellenic", - "category": "sans-serif", - "variants": [ - "regular", - "italic", - "700", - "700italic" - ] - }, - { - "family": "Baloo Thambi", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Jolly Lodger", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Rubik Mono One", - "category": "sans-serif", - "variants": [ - "regular" - ] - }, - { - "family": "Pattaya", - "category": "sans-serif", - "variants": [ - "regular" - ] - }, - { - "family": "Joti One", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Siemreap", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Ranga", - "category": "display", - "variants": [ - "regular", - "700" - ] - }, - { - "family": "Chango", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Miltonian Tattoo", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Koulen", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Eagle Lake", - "category": "handwriting", - "variants": [ - "regular" - ] - }, - { - "family": "Nova Flat", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Petrona", - "category": "serif", - "variants": [ - "regular" - ] - }, - { - "family": "Jacques Francois", - "category": "serif", - "variants": [ - "regular" - ] - }, - { - "family": "Amita", - "category": "handwriting", - "variants": [ - "regular", - "700" - ] - }, - { - "family": "Plaster", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Ramaraja", - "category": "serif", - "variants": [ - "regular" - ] - }, - { - "family": "Sura", - "category": "serif", - "variants": [ - "regular", - "700" - ] - }, - { - "family": "Kenia", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Fresca", - "category": "sans-serif", - "variants": [ - "regular" - ] - }, - { - "family": "Jomhuria", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Lancelot", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Pavanam", - "category": "sans-serif", - "variants": [ - "regular" - ] - }, - { - "family": "Rum Raisin", - "category": "sans-serif", - "variants": [ - "regular" - ] - }, - { - "family": "Almendra SC", - "category": "serif", - "variants": [ - "regular" - ] - }, - { - "family": "Purple Purse", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Kumar One", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Modern Antiqua", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Piedra", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Irish Grover", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Molle", - "category": "handwriting", - "variants": [ - "italic" - ] - }, - { - "family": "Cormorant Infant", - "category": "serif", - "variants": [ - "300", - "300italic", - "regular", - "italic", - "500", - "500italic", - "600", - "600italic", - "700", - "700italic" - ] - }, - { - "family": "Margarine", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Sahitya", - "category": "serif", - "variants": [ - "regular", - "700" - ] - }, - { - "family": "Mukta Vaani", - "category": "sans-serif", - "variants": [ - "200", - "300", - "regular", - "500", - "600", - "700", - "800" - ] - }, - { - "family": "Astloch", - "category": "display", - "variants": [ - "regular", - "700" - ] - }, - { - "family": "Snowburst One", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Rhodium Libre", - "category": "serif", - "variants": [ - "regular" - ] - }, - { - "family": "Smythe", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Asset", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Ewert", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Keania One", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Ranchers", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Gorditas", - "category": "display", - "variants": [ - "regular", - "700" - ] - }, - { - "family": "Sirin Stencil", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Averia Gruesa Libre", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Trochut", - "category": "display", - "variants": [ - "regular", - "italic", - "700" - ] - }, - { - "family": "Baloo Chettan", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Kdam Thmor", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Timmana", - "category": "sans-serif", - "variants": [ - "regular" - ] - }, - { - "family": "Original Surfer", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Supermercado One", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Mirza", - "category": "display", - "variants": [ - "regular", - "500", - "600", - "700" - ] - }, - { - "family": "Passero One", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Nova Oval", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Caesar Dressing", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Taprom", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Fascinate", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Seymour One", - "category": "sans-serif", - "variants": [ - "regular" - ] - }, - { - "family": "Freehand", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Ravi Prakash", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Coiny", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Atomic Age", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Jacques Francois Shadow", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Diplomata", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Dr Sugiyama", - "category": "handwriting", - "variants": [ - "regular" - ] - }, - { - "family": "Miltonian", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Ribeye Marrow", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Elsie Swash Caps", - "category": "display", - "variants": [ - "regular", - "900" - ] - }, - { - "family": "Felipa", - "category": "handwriting", - "variants": [ - "regular" - ] - }, - { - "family": "Galada", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Nova Script", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Bayon", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Underdog", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Devonshire", - "category": "handwriting", - "variants": [ - "regular" - ] - }, - { - "family": "Atma", - "category": "display", - "variants": [ - "300", - "regular", - "500", - "600", - "700" - ] - }, - { - "family": "Londrina Shadow", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Sofadi One", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Tillana", - "category": "handwriting", - "variants": [ - "regular", - "500", - "600", - "700", - "800" - ] - }, - { - "family": "Inknut Antiqua", - "category": "serif", - "variants": [ - "300", - "regular", - "500", - "600", - "700", - "800", - "900" - ] - }, - { - "family": "Goblin One", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Rakkas", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Metal", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Farsan", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Londrina Sketch", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Nova Cut", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "BioRhyme", - "category": "serif", - "variants": [ - "200", - "300", - "regular", - "700", - "800" - ] - }, - { - "family": "Warnes", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Romanesco", - "category": "handwriting", - "variants": [ - "regular" - ] - }, - { - "family": "Fascinate Inline", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Mrs Sheppards", - "category": "handwriting", - "variants": [ - "regular" - ] - }, - { - "family": "Princess Sofia", - "category": "handwriting", - "variants": [ - "regular" - ] - }, - { - "family": "Modak", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Spirax", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Cormorant Upright", - "category": "serif", - "variants": [ - "300", - "regular", - "500", - "600", - "700" - ] - }, - { - "family": "Geostar Fill", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Cormorant SC", - "category": "serif", - "variants": [ - "300", - "regular", - "500", - "600", - "700" - ] - }, - { - "family": "Baloo Bhai", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Sree Krushnadevaraya", - "category": "serif", - "variants": [ - "regular" - ] - }, - { - "family": "Smokum", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Arbutus", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Fruktur", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Geostar", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Marko One", - "category": "serif", - "variants": [ - "regular" - ] - }, - { - "family": "Erica One", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Yatra One", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Uncial Antiqua", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Combo", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Gidugu", - "category": "sans-serif", - "variants": [ - "regular" - ] - }, - { - "family": "Aubrey", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Jim Nightshade", - "category": "handwriting", - "variants": [ - "regular" - ] - }, - { - "family": "Butterfly Kids", - "category": "handwriting", - "variants": [ - "regular" - ] - }, - { - "family": "Metal Mania", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Macondo", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Chenla", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Miss Fajardose", - "category": "handwriting", - "variants": [ - "regular" - ] - }, - { - "family": "Macondo Swash Caps", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Barrio", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Sevillana", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Bigelow Rules", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Rasa", - "category": "serif", - "variants": [ - "300", - "regular", - "500", - "600", - "700" - ] - }, - { - "family": "Risque", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Federant", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Dangrek", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Chathura", - "category": "sans-serif", - "variants": [ - "100", - "300", - "regular", - "700", - "800" - ] - }, - { - "family": "Almendra Display", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Chela One", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Bonbon", - "category": "handwriting", - "variants": [ - "regular" - ] - }, - { - "family": "Stalinist One", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Mr Bedfort", - "category": "handwriting", - "variants": [ - "regular" - ] - }, - { - "family": "Eater", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Fasthand", - "category": "serif", - "variants": [ - "regular" - ] - }, - { - "family": "Mogra", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Padauk", - "category": "sans-serif", - "variants": [ - "regular", - "700" - ] - }, - { - "family": "Preahvihear", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Flavors", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Ruge Boogie", - "category": "handwriting", - "variants": [ - "regular" - ] - }, - { - "family": "Tenali Ramakrishna", - "category": "sans-serif", - "variants": [ - "regular" - ] - }, - { - "family": "Unlock", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Butcherman", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Baloo Da", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Lakki Reddy", - "category": "handwriting", - "variants": [ - "regular" - ] - }, - { - "family": "Cormorant Unicase", - "category": "serif", - "variants": [ - "300", - "regular", - "500", - "600", - "700" - ] - }, - { - "family": "Katibeh", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Asar", - "category": "serif", - "variants": [ - "regular" - ] - }, - { - "family": "Emblema One", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Moulpali", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Meera Inimai", - "category": "sans-serif", - "variants": [ - "regular" - ] - }, - { - "family": "Kantumruy", - "category": "sans-serif", - "variants": [ - "300", - "regular", - "700" - ] - }, - { - "family": "Suravaram", - "category": "serif", - "variants": [ - "regular" - ] - }, - { - "family": "Bungee Hairline", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Overpass Mono", - "category": "monospace", - "variants": [ - "300", - "regular", - "600", - "700" - ] - }, - { - "family": "Peddana", - "category": "serif", - "variants": [ - "regular" - ] - }, - { - "family": "Bahiana", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Kumar One Outline", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Hanalei Fill", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Dhurjati", - "category": "sans-serif", - "variants": [ - "regular" - ] - }, - { - "family": "Hanalei", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "Kavivanar", - "category": "handwriting", - "variants": [ - "regular" - ] - }, - { - "family": "Bungee Outline", - "category": "display", - "variants": [ - "regular" - ] - }, - { - "family": "BioRhyme Expanded", - "category": "serif", - "variants": [ - "200", - "300", - "regular", - "700", - "800" - ] - } -] diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/typography/functions/js/customizer.js b/wp-content/upgrade-temp-backup/plugins/gp-premium/typography/functions/js/customizer.js deleted file mode 100644 index f214b655..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/typography/functions/js/customizer.js +++ /dev/null @@ -1,250 +0,0 @@ -function gp_premium_typography_live_update( id, selector, property, unit, media, settings ) { - settings = typeof settings !== 'undefined' ? settings : 'generate_settings'; - wp.customize( settings + '[' + id + ']', function( value ) { - value.bind( function( newval ) { - // Get our unit if applicable - unit = typeof unit !== 'undefined' ? unit : ''; - - var isTablet = ( 'tablet' == id.substring( 0, 6 ) ) ? true : false, - isMobile = ( 'mobile' == id.substring( 0, 6 ) ) ? true : false; - - if ( isTablet ) { - if ( '' == wp.customize(settings + '[' + id + ']').get() ) { - var desktopID = id.replace( 'tablet_', '' ); - newval = wp.customize(settings + '[' + desktopID + ']').get(); - } - } - - if ( isMobile ) { - if ( '' == wp.customize(settings + '[' + id + ']').get() ) { - var desktopID = id.replace( 'mobile_', '' ); - newval = wp.customize(settings + '[' + desktopID + ']').get(); - } - } - - if ( 'buttons_font_size' == id && '' == wp.customize('generate_settings[buttons_font_size]').get() ) { - newval = wp.customize('generate_settings[body_font_size]').get(); - } - - if ( 'single_post_title_weight' == id && '' == wp.customize('generate_settings[single_post_title_weight]').get() ) { - newval = wp.customize('generate_settings[heading_1_weight]').get(); - } - - if ( 'single_post_title_transform' == id && '' == wp.customize('generate_settings[single_post_title_transform]').get() ) { - newval = wp.customize('generate_settings[heading_1_transform]').get(); - } - - if ( 'archive_post_title_weight' == id && '' == wp.customize('generate_settings[archive_post_title_weight]').get() ) { - newval = wp.customize('generate_settings[heading_2_weight]').get(); - } - - if ( 'archive_post_title_transform' == id && '' == wp.customize('generate_settings[archive_post_title_transform]').get() ) { - newval = wp.customize('generate_settings[heading_2_transform]').get(); - } - - // We're using a desktop value - if ( ! isTablet && ! isMobile ) { - - var tabletValue = ( typeof wp.customize(settings + '[tablet_' + id + ']') !== 'undefined' ) ? wp.customize(settings + '[tablet_' + id + ']').get() : '', - mobileValue = ( typeof wp.customize(settings + '[mobile_' + id + ']') !== 'undefined' ) ? wp.customize(settings + '[mobile_' + id + ']').get() : ''; - - // The tablet setting exists, mobile doesn't - if ( '' !== tabletValue && '' == mobileValue ) { - media = gp_typography.desktop + ', ' + gp_typography.mobile; - } - - // The tablet setting doesn't exist, mobile does - if ( '' == tabletValue && '' !== mobileValue ) { - media = gp_typography.desktop + ', ' + gp_typography.tablet; - } - - // The tablet setting doesn't exist, neither does mobile - if ( '' == tabletValue && '' == mobileValue ) { - media = gp_typography.desktop + ', ' + gp_typography.tablet + ', ' + gp_typography.mobile; - } - - } - - // Check if media query - media_query = typeof media !== 'undefined' ? 'media="' + media + '"' : ''; - - jQuery( 'head' ).append( '' ); - setTimeout(function() { - jQuery( 'style#' + id ).not( ':last' ).remove(); - }, 1000); - - setTimeout("jQuery('body').trigger('generate_spacing_updated');", 1000); - } ); - } ); -} - -/** - * Body font size, weight and transform - */ -gp_premium_typography_live_update( 'body_font_size', 'body, button, input, select, textarea', 'font-size', 'px' ); -gp_premium_typography_live_update( 'body_line_height', 'body', 'line-height', '' ); -gp_premium_typography_live_update( 'paragraph_margin', 'p, .entry-content > [class*="wp-block-"]:not(:last-child)', 'margin-bottom', 'em' ); -gp_premium_typography_live_update( 'body_font_weight', 'body, button, input, select, textarea', 'font-weight' ); -gp_premium_typography_live_update( 'body_font_transform', 'body, button, input, select, textarea', 'text-transform' ); - -/** - * Top bar font size, weight and transform - */ -gp_premium_typography_live_update( 'top_bar_font_size', '.top-bar', 'font-size', 'px' ); -gp_premium_typography_live_update( 'top_bar_font_weight', '.top-bar', 'font-weight' ); -gp_premium_typography_live_update( 'top_bar_font_transform', '.top-bar', 'text-transform' ); - -/** - * Site title font size, weight and transform - */ -gp_premium_typography_live_update( 'site_title_font_size', '.main-title, .navigation-branding .main-title', 'font-size', 'px', gp_typography.desktop ); -gp_premium_typography_live_update( 'tablet_site_title_font_size', '.main-title, .navigation-branding .main-title', 'font-size', 'px', gp_typography.tablet ); -gp_premium_typography_live_update( 'mobile_site_title_font_size', '.main-title, .navigation-branding .main-title', 'font-size', 'px', gp_typography.mobile ); -gp_premium_typography_live_update( 'site_title_font_weight', '.main-title, .navigation-branding .main-title', 'font-weight' ); -gp_premium_typography_live_update( 'site_title_font_transform', '.main-title, .navigation-branding .main-title', 'text-transform' ); - -/** - * Site description font size, weight and transform - */ -gp_premium_typography_live_update( 'site_tagline_font_size', '.site-description', 'font-size', 'px' ); -gp_premium_typography_live_update( 'site_tagline_font_weight', '.site-description', 'font-weight' ); -gp_premium_typography_live_update( 'site_tagline_font_transform', '.site-description', 'text-transform' ); - -/** - * Main navigation font size, weight and transform - */ -gp_premium_typography_live_update( 'navigation_font_size', '.main-navigation a, .menu-toggle, .main-navigation .menu-bar-items', 'font-size', 'px', gp_typography.desktop ); -gp_premium_typography_live_update( 'tablet_navigation_font_size', '.main-navigation a, .menu-toggle, .main-navigation .menu-bar-items', 'font-size', 'px', gp_typography.tablet ); -gp_premium_typography_live_update( 'mobile_navigation_font_size', '.main-navigation:not(.slideout-navigation) a, .menu-toggle, .main-navigation .menu-bar-items', 'font-size', 'px', gp_typography.mobile ); -gp_premium_typography_live_update( 'navigation_font_weight', '.main-navigation a, .menu-toggle', 'font-weight' ); -gp_premium_typography_live_update( 'navigation_font_transform', '.main-navigation a, .menu-toggle', 'text-transform' ); - -/** - * Site title when in navigation. - */ - gp_premium_typography_live_update( 'navigation_site_title_font_size', '.navigation-branding .main-title', 'font-size', 'px', gp_typography.desktop ); - gp_premium_typography_live_update( 'tablet_navigation_site_title_font_size', '.navigation-branding .main-title', 'font-size', 'px', gp_typography.tablet ); - gp_premium_typography_live_update( 'mobile_navigation_site_title_font_size', '.navigation-branding .main-title', 'font-size', 'px', gp_typography.mobile ); - -/** - * Secondary navigation font size, weight and transform - */ -gp_premium_typography_live_update( 'secondary_navigation_font_size', '.secondary-navigation .main-nav ul li a,.secondary-navigation .menu-toggle, .secondary-navigation .top-bar, .secondary-navigation .secondary-menu-bar-items', 'font-size', 'px', '', 'generate_secondary_nav_settings' ); -gp_premium_typography_live_update( 'secondary_navigation_font_weight', '.secondary-navigation .main-nav ul li a,.secondary-navigation .menu-toggle, .secondary-navigation .top-bar', 'font-weight', '', '', 'generate_secondary_nav_settings' ); -gp_premium_typography_live_update( 'secondary_navigation_font_transform', '.secondary-navigation .main-nav ul li a,.secondary-navigation .menu-toggle, .secondary-navigation .top-bar', 'text-transform', '', '', 'generate_secondary_nav_settings' ); - -/** - * Buttons - */ -gp_premium_typography_live_update( 'buttons_font_size', 'button:not(.menu-toggle),html input[type="button"],input[type="reset"],input[type="submit"],.button,.button:visited,.wp-block-button .wp-block-button__link,.woocommerce #respond input#submit, .woocommerce a.button, .woocommerce button.button, .woocommerce input.button', 'font-size', 'px' ); -gp_premium_typography_live_update( 'buttons_font_weight', 'button:not(.menu-toggle),html input[type="button"],input[type="reset"],input[type="submit"],.button,.button:visited,.wp-block-button .wp-block-button__link,.woocommerce #respond input#submit, .woocommerce a.button, .woocommerce button.button, .woocommerce input.button', 'font-weight' ); -gp_premium_typography_live_update( 'buttons_font_transform', 'button:not(.menu-toggle),html input[type="button"],input[type="reset"],input[type="submit"],.button,.button:visited,.wp-block-button .wp-block-button__link,.woocommerce #respond input#submit, .woocommerce a.button, .woocommerce button.button, .woocommerce input.button', 'text-transform' ); - -/** - * H1 font size, weight and transform - */ -gp_premium_typography_live_update( 'heading_1_font_size', 'h1', 'font-size', 'px', gp_typography.desktop ); -gp_premium_typography_live_update( 'mobile_heading_1_font_size', 'h1', 'font-size', 'px', gp_typography.mobile ); -gp_premium_typography_live_update( 'heading_1_weight', 'h1', 'font-weight' ); -gp_premium_typography_live_update( 'heading_1_transform', 'h1', 'text-transform' ); -gp_premium_typography_live_update( 'heading_1_line_height', 'h1', 'line-height', 'em' ); -gp_premium_typography_live_update( 'heading_1_margin_bottom', 'h1', 'margin-bottom', 'px' ); - -/** - * Single content title (h1) - */ -gp_premium_typography_live_update( 'single_post_title_font_size', 'h1.entry-title', 'font-size', 'px', gp_typography.desktop ); -gp_premium_typography_live_update( 'single_post_title_font_size_mobile', 'h1.entry-title', 'font-size', 'px', gp_typography.mobile ); -gp_premium_typography_live_update( 'single_post_title_weight', 'h1.entry-title', 'font-weight' ); -gp_premium_typography_live_update( 'single_post_title_transform', 'h1.entry-title', 'text-transform' ); -gp_premium_typography_live_update( 'single_post_title_line_height', 'h1.entry-title', 'line-height', 'em' ); - -/** - * H2 font size, weight and transform - */ -gp_premium_typography_live_update( 'heading_2_font_size', 'h2', 'font-size', 'px', gp_typography.desktop ); -gp_premium_typography_live_update( 'mobile_heading_2_font_size', 'h2', 'font-size', 'px', gp_typography.mobile ); -gp_premium_typography_live_update( 'heading_2_weight', 'h2', 'font-weight' ); -gp_premium_typography_live_update( 'heading_2_transform', 'h2', 'text-transform' ); -gp_premium_typography_live_update( 'heading_2_line_height', 'h2', 'line-height', 'em' ); -gp_premium_typography_live_update( 'heading_2_margin_bottom', 'h2', 'margin-bottom', 'px' ); - -/** - * Archive post title (h1) - */ -gp_premium_typography_live_update( 'archive_post_title_font_size', 'h2.entry-title', 'font-size', 'px', gp_typography.desktop ); -gp_premium_typography_live_update( 'archive_post_title_font_size_mobile', 'h2.entry-title', 'font-size', 'px', gp_typography.mobile ); -gp_premium_typography_live_update( 'archive_post_title_weight', 'h2.entry-title', 'font-weight' ); -gp_premium_typography_live_update( 'archive_post_title_transform', 'h2.entry-title', 'text-transform' ); -gp_premium_typography_live_update( 'archive_post_title_line_height', 'h2.entry-title', 'line-height', 'em' ); - -/** - * H3 font size, weight and transform - */ -gp_premium_typography_live_update( 'heading_3_font_size', 'h3', 'font-size', 'px', gp_typography.desktop ); -gp_premium_typography_live_update( 'mobile_heading_3_font_size', 'h3', 'font-size', 'px', gp_typography.mobile ); -gp_premium_typography_live_update( 'heading_3_weight', 'h3', 'font-weight' ); -gp_premium_typography_live_update( 'heading_3_transform', 'h3', 'text-transform' ); -gp_premium_typography_live_update( 'heading_3_line_height', 'h3', 'line-height', 'em' ); -gp_premium_typography_live_update( 'heading_3_margin_bottom', 'h3', 'margin-bottom', 'px' ); - -/** - * H4 font size, weight and transform - */ -gp_premium_typography_live_update( 'heading_4_font_size', 'h4', 'font-size', 'px', gp_typography.desktop ); -gp_premium_typography_live_update( 'mobile_heading_4_font_size', 'h4', 'font-size', 'px', gp_typography.mobile ); -gp_premium_typography_live_update( 'heading_4_weight', 'h4', 'font-weight' ); -gp_premium_typography_live_update( 'heading_4_transform', 'h4', 'text-transform' ); -gp_premium_typography_live_update( 'heading_4_line_height', 'h4', 'line-height', 'em' ); - -/** - * H5 font size, weight and transform - */ -gp_premium_typography_live_update( 'heading_5_font_size', 'h5', 'font-size', 'px', gp_typography.desktop ); -gp_premium_typography_live_update( 'mobile_heading_5_font_size', 'h5', 'font-size', 'px', gp_typography.mobile ); -gp_premium_typography_live_update( 'heading_5_weight', 'h5', 'font-weight' ); -gp_premium_typography_live_update( 'heading_5_transform', 'h5', 'text-transform' ); -gp_premium_typography_live_update( 'heading_5_line_height', 'h5', 'line-height', 'em' ); - -/** - * H6 font size, weight and transform - */ -gp_premium_typography_live_update( 'heading_6_font_size', 'h6', 'font-size', 'px' ); -gp_premium_typography_live_update( 'heading_6_weight', 'h6', 'font-weight' ); -gp_premium_typography_live_update( 'heading_6_transform', 'h6', 'text-transform' ); -gp_premium_typography_live_update( 'heading_6_line_height', 'h6', 'line-height', 'em' ); - -/** - * Widget title font size, weight and transform - */ -gp_premium_typography_live_update( 'widget_title_font_size', '.widget-title', 'font-size', 'px' ); -gp_premium_typography_live_update( 'widget_title_font_weight', '.widget-title', 'font-weight' ); -gp_premium_typography_live_update( 'widget_title_font_transform', '.widget-title', 'text-transform' ); -gp_premium_typography_live_update( 'widget_title_separator', '.widget-title', 'margin-bottom', 'px' ); -gp_premium_typography_live_update( 'widget_content_font_size', '.sidebar .widget, .footer-widgets .widget', 'font-size', 'px' ); - -/** - * Footer font size, weight and transform - */ -gp_premium_typography_live_update( 'footer_font_size', '.site-info', 'font-size', 'px' ); -gp_premium_typography_live_update( 'footer_weight', '.site-info', 'font-weight' ); -gp_premium_typography_live_update( 'footer_transform', '.site-info', 'text-transform' ); -gp_premium_typography_live_update( 'footer_line_height', '.site-info', 'line-height', 'em' ); - -/** - * WooCommerce product title - */ -gp_premium_typography_live_update( 'wc_product_title_font_size', '.woocommerce ul.products li.product .woocommerce-LoopProduct-link h2, .woocommerce ul.products li.product .woocommerce-loop-category__title', 'font-size', 'px', gp_typography.desktop ); -gp_premium_typography_live_update( 'mobile_wc_product_title_font_size', '.woocommerce ul.products li.product .woocommerce-LoopProduct-link h2, .woocommerce ul.products li.product .woocommerce-loop-category__title', 'font-size', 'px', gp_typography.mobile ); -gp_premium_typography_live_update( 'wc_product_title_font_weight', '.woocommerce ul.products li.product .woocommerce-LoopProduct-link h2, .woocommerce ul.products li.product .woocommerce-loop-category__title', 'font-weight' ); -gp_premium_typography_live_update( 'wc_product_title_font_transform', '.woocommerce ul.products li.product .woocommerce-LoopProduct-link h2, .woocommerce ul.products li.product .woocommerce-loop-category__title', 'text-transform' ); - -gp_premium_typography_live_update( 'wc_related_product_title_font_size', '.woocommerce .up-sells ul.products li.product .woocommerce-LoopProduct-link h2, .woocommerce .cross-sells ul.products li.product .woocommerce-LoopProduct-link h2, .woocommerce .related ul.products li.product .woocommerce-LoopProduct-link h2', 'font-size', 'px' ); - -/** - * Slideout navigation font size, weight and transform - */ -gp_premium_typography_live_update( 'slideout_font_size', '.slideout-navigation.main-navigation .main-nav ul li a', 'font-size', 'px', gp_typography.desktop ); -gp_premium_typography_live_update( 'slideout_mobile_font_size', '.slideout-navigation.main-navigation .main-nav ul li a', 'font-size', 'px', gp_typography.mobile ); -gp_premium_typography_live_update( 'slideout_font_weight', '.slideout-navigation.main-navigation .main-nav ul li a', 'font-weight' ); -gp_premium_typography_live_update( 'slideout_font_transform', '.slideout-navigation.main-navigation .main-nav ul li a', 'text-transform' ); diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/typography/functions/migration.php b/wp-content/upgrade-temp-backup/plugins/gp-premium/typography/functions/migration.php deleted file mode 100644 index c2ea0e08..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/typography/functions/migration.php +++ /dev/null @@ -1,359 +0,0 @@ - $generate_settings[ $setting ], - 'variants' => $variants, - 'category' => $category ? $category : 'sans-serif', - ); - } - - if ( function_exists( 'generate_secondary_nav_get_defaults' ) ) { - $secondary_nav_settings = wp_parse_args( - get_option( 'generate_secondary_nav_settings', array() ), - generate_secondary_nav_get_defaults() - ); - - $secondary_nav_id = strtolower( str_replace( ' ', '_', $secondary_nav_settings[ 'font_secondary_navigation' ] ) ); - - if ( ! array_key_exists( $secondary_nav_id, $select_fonts ) && ! in_array( $secondary_nav_settings[ 'font_secondary_navigation' ], generate_typography_default_fonts() ) ) { - $variants = get_theme_mod( 'font_secondary_navigation_variants', array() ); - $category = get_theme_mod( 'font_secondary_navigation_category' ); - - if ( ! empty( $variants ) && ! is_array( $variants ) ) { - $variants = explode( ',', $variants ); - } - - if ( ! $variants ) { - if ( ! $all_fonts ) { - $all_fonts = generate_get_all_google_fonts(); - } - - if ( array_key_exists( $secondary_nav_id, $all_fonts ) ) { - $variants = $all_fonts[ $secondary_nav_id ]['variants']; - } - } - - if ( ! $category ) { - if ( ! $all_fonts ) { - $all_fonts = generate_get_all_google_fonts(); - } - - if ( array_key_exists( $secondary_nav_id, $all_fonts ) ) { - $category = $all_fonts[ $secondary_nav_id ]['category']; - } - } - - $fonts[ $secondary_nav_id ] = array( - 'name' => $secondary_nav_settings[ 'font_secondary_navigation' ], - 'variants' => $variants, - 'category' => $category ? $category : 'sans-serif', - ); - } - } - - return $fonts; - } -} - -if ( ! function_exists( 'generate_typography_set_font_data' ) ) { - add_action( 'admin_init', 'generate_typography_set_font_data' ); - /** - * This function will check to see if your category and variants are saved - * If not, it will set them for you, and won't run again - * - * @since 1.2.90 - */ - function generate_typography_set_font_data() { - // Bail if we don't have our defaults - if ( ! function_exists( 'generate_get_default_fonts' ) ) { - return; - } - - // Get our defaults - $defaults = generate_get_default_fonts(); - - // Get our settings - $generate_settings = wp_parse_args( - get_option( 'generate_settings', array() ), - generate_get_default_fonts() - ); - - // We need to loop through these settings - $font_settings = array( - 'font_body', - 'font_site_title', - 'font_site_tagline', - 'font_navigation', - 'font_widget_title', - 'font_heading_1', - 'font_heading_2', - 'font_heading_3' - ); - - // Add secondary navigation to the array last if it exists - if ( function_exists( 'generate_secondary_nav_get_defaults' ) ) { - $font_settings[ 'font_secondary_navigation' ] = 'font_secondary_navigation'; - } - - // Start looping - foreach( $font_settings as $setting ) { - - // Change our variables for the secondary navigation - this will run last - if ( function_exists( 'generate_secondary_nav_get_defaults' ) && 'font_secondary_navigation' == $setting ) { - $generate_settings = wp_parse_args( - get_option( 'generate_secondary_nav_settings', array() ), - generate_secondary_nav_get_defaults() - ); - $defaults = generate_secondary_nav_get_defaults(); - } - - // We don't need to do this if we're using the default font, as these values have defaults already - if ( $defaults[ $setting ] == $generate_settings[ $setting ] ) { - continue; - } - - // Don't need to continue if we're using a system font or our default font - if ( in_array( $generate_settings[ $setting ], generate_typography_default_fonts() ) || 'Open Sans' == $generate_settings[ $setting ] ) { - continue; - } - - // Don't continue if our category and variants are already set - if ( get_theme_mod( $setting . '_category' ) && get_theme_mod( $setting . '_variants' ) ) { - continue; - } - - // Get all of our fonts - $fonts = generate_get_all_google_fonts(); - - // Get the ID from our font - $id = strtolower( str_replace( ' ', '_', $generate_settings[ $setting ] ) ); - - // If the ID doesn't exist within our fonts, we can bail - if ( ! array_key_exists( $id, $fonts ) ) { - continue; - } - - // Let's grab our category to go with our font - $category = ! empty( $fonts[$id]['category'] ) ? $fonts[$id]['category'] : ''; - - // Grab all of the variants associated with our font - $variants = $fonts[$id]['variants']; - - // Loop through our variants and put them into an array, then turn them into a comma separated list - $output = array(); - if ( $variants ) { - foreach ( $variants as $variant ) { - $output[] = $variant; - } - - $variants = implode( ',', $output ); - } - - // Set our theme mods with our new settings - if ( '' !== $category ) { - set_theme_mod( $setting . '_category', $category ); - } - - if ( '' !== $variants ) { - set_theme_mod( $setting . '_variants', $variants ); - } - } - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/typography/functions/secondary-nav-fonts.php b/wp-content/upgrade-temp-backup/plugins/gp-premium/typography/functions/secondary-nav-fonts.php deleted file mode 100644 index 76081000..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/typography/functions/secondary-nav-fonts.php +++ /dev/null @@ -1,176 +0,0 @@ -get_section( 'secondary_nav_section' ) ) { - return; - } - - // Get our controls - require_once GP_LIBRARY_DIRECTORY . 'customizer-helpers.php'; - - // Get our defaults - $defaults = generate_secondary_nav_get_defaults(); - - // Register our custom controls - if ( method_exists( $wp_customize,'register_control_type' ) ) { - $wp_customize->register_control_type( 'GeneratePress_Pro_Typography_Customize_Control' ); - $wp_customize->register_control_type( 'GeneratePress_Pro_Range_Slider_Control' ); - $wp_customize->register_control_type( 'GeneratePress_Section_Shortcut_Control' ); - } - - // Add our section - $wp_customize->add_section( - 'secondary_font_section', - array( - 'title' => __( 'Secondary Navigation', 'gp-premium' ), - 'capability' => 'edit_theme_options', - 'description' => '', - 'priority' => 51, - 'panel' => 'generate_typography_panel' - ) - ); - - $wp_customize->add_control( - new GeneratePress_Section_Shortcut_Control( - $wp_customize, - 'generate_secondary_navigation_typography_shortcuts', - array( - 'section' => 'secondary_font_section', - 'element' => __( 'Secondary Navigation', 'gp-premium' ), - 'shortcuts' => array( - 'layout' => 'secondary_nav_section', - 'colors' => 'secondary_navigation_color_section', - 'backgrounds' => 'secondary_bg_images_section', - ), - 'settings' => ( isset( $wp_customize->selective_refresh ) ) ? array() : 'blogname', - 'priority' => 1, - ) - ) - ); - - // Font family - $wp_customize->add_setting( - 'generate_secondary_nav_settings[font_secondary_navigation]', - array( - 'default' => $defaults['font_secondary_navigation'], - 'type' => 'option', - 'sanitize_callback' => 'sanitize_text_field' - ) - ); - - // Category - $wp_customize->add_setting( - 'font_secondary_navigation_category', - array( - 'default' => $defaults['font_secondary_navigation_category'], - 'sanitize_callback' => 'sanitize_text_field' - ) - ); - - // Variants - $wp_customize->add_setting( - 'font_secondary_navigation_variants', - array( - 'default' => $defaults['font_secondary_navigation_variants'], - 'sanitize_callback' => 'generate_premium_sanitize_variants' - ) - ); - - // Font weight - $wp_customize->add_setting( - 'generate_secondary_nav_settings[secondary_navigation_font_weight]', - array( - 'default' => $defaults['secondary_navigation_font_weight'], - 'type' => 'option', - 'sanitize_callback' => 'sanitize_key', - 'transport' => 'postMessage' - ) - ); - - // Font transform - $wp_customize->add_setting( - 'generate_secondary_nav_settings[secondary_navigation_font_transform]', - array( - 'default' => $defaults['secondary_navigation_font_transform'], - 'type' => 'option', - 'sanitize_callback' => 'sanitize_key', - 'transport' => 'postMessage' - ) - ); - - $wp_customize->add_control( - new GeneratePress_Pro_Typography_Customize_Control( - $wp_customize, - 'google_font_site_secondary_navigation_control', - array( - 'section' => 'secondary_font_section', - 'settings' => array( - 'family' => 'generate_secondary_nav_settings[font_secondary_navigation]', - 'variant' => 'font_secondary_navigation_variants', - 'category' => 'font_secondary_navigation_category', - 'weight' => 'generate_secondary_nav_settings[secondary_navigation_font_weight]', - 'transform' => 'generate_secondary_nav_settings[secondary_navigation_font_transform]', - ), - ) - ) - ); - - // Font size - $wp_customize->add_setting( - 'generate_secondary_nav_settings[secondary_navigation_font_size]', - array( - 'default' => $defaults['secondary_navigation_font_size'], - 'type' => 'option', - 'sanitize_callback' => 'absint', - 'transport' => 'postMessage' - ) - ); - - $wp_customize->add_control( - new GeneratePress_Pro_Range_Slider_Control( - $wp_customize, - 'generate_secondary_nav_settings[secondary_navigation_font_size]', - array( - 'description' => __( 'Font size', 'gp-premium' ), - 'section' => 'secondary_font_section', - 'priority' => 165, - 'settings' => array( - 'desktop' => 'generate_secondary_nav_settings[secondary_navigation_font_size]', - ), - 'choices' => array( - 'desktop' => array( - 'min' => 6, - 'max' => 30, - 'step' => 1, - 'edit' => true, - 'unit' => 'px', - ), - ), - ) - ) - ); - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/typography/functions/slideout-nav-fonts.php b/wp-content/upgrade-temp-backup/plugins/gp-premium/typography/functions/slideout-nav-fonts.php deleted file mode 100644 index a6619549..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/typography/functions/slideout-nav-fonts.php +++ /dev/null @@ -1,149 +0,0 @@ -register_control_type( 'GeneratePress_Pro_Range_Slider_Control' ); - $wp_customize->register_control_type( 'GeneratePress_Pro_Typography_Customize_Control' ); - $wp_customize->register_control_type( 'GeneratePress_Section_Shortcut_Control' ); - } - - // Bail if Menu Plus isn't activated - if ( ! $wp_customize->get_section( 'menu_plus_slideout_menu' ) ) { - return; - } - - $wp_customize->add_section( - 'generate_slideout_typography', - array( - 'title' => __( 'Off Canvas Panel', 'gp-premium' ), - 'capability' => 'edit_theme_options', - 'priority' => 52, - 'panel' => 'generate_typography_panel' - ) - ); - - $wp_customize->add_control( - new GeneratePress_Section_Shortcut_Control( - $wp_customize, - 'generate_off_canvas_panel_typography_shortcuts', - array( - 'section' => 'generate_slideout_typography', - 'element' => esc_html__( 'Off Canvas Panel', 'gp-premium' ), - 'shortcuts' => array( - 'colors' => 'slideout_color_section', - 'layout' => 'menu_plus_slideout_menu', - ), - 'settings' => ( isset( $wp_customize->selective_refresh ) ) ? array() : 'blogname', - 'priority' => 1, - ) - ) - ); - - $wp_customize->add_setting( - 'generate_settings[slideout_font_weight]', - array( - 'default' => $defaults['slideout_font_weight'], - 'type' => 'option', - 'sanitize_callback' => 'sanitize_key', - 'transport' => 'postMessage' - ) - ); - - // Text transform - $wp_customize->add_setting( - 'generate_settings[slideout_font_transform]', - array( - 'default' => $defaults['slideout_font_transform'], - 'type' => 'option', - 'sanitize_callback' => 'sanitize_key', - 'transport' => 'postMessage' - ) - ); - - $wp_customize->add_control( - new GeneratePress_Pro_Typography_Customize_Control( - $wp_customize, - 'slideout_navigation_typography', - array( - 'label' => esc_html__( 'Menu Items', 'gp-premium' ), - 'section' => 'generate_slideout_typography', - 'settings' => array( - 'weight' => 'generate_settings[slideout_font_weight]', - 'transform' => 'generate_settings[slideout_font_transform]', - ), - ) - ) - ); - - // Font size - $wp_customize->add_setting( - 'generate_settings[slideout_font_size]', - array( - 'default' => $defaults['slideout_font_size'], - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_empty_absint', - 'transport' => 'postMessage' - ) - ); - - $wp_customize->add_setting( - 'generate_settings[slideout_mobile_font_size]', - array( - 'default' => $defaults['slideout_mobile_font_size'], - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_empty_absint', - 'transport' => 'postMessage' - ) - ); - - $wp_customize->add_control( - new GeneratePress_Pro_Range_Slider_Control( - $wp_customize, - 'generate_settings[slideout_font_size]', - array( - 'description' => __( 'Font size', 'gp-premium' ), - 'section' => 'generate_slideout_typography', - 'settings' => array( - 'desktop' => 'generate_settings[slideout_font_size]', - 'mobile' => 'generate_settings[slideout_mobile_font_size]', - ), - 'choices' => array( - 'desktop' => array( - 'min' => 10, - 'max' => 80, - 'step' => 1, - 'edit' => true, - 'unit' => 'px', - ), - 'mobile' => array( - 'min' => 10, - 'max' => 80, - 'step' => 1, - 'edit' => true, - 'unit' => 'px', - ), - ), - ) - ) - ); -} diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/typography/functions/woocommerce-fonts.php b/wp-content/upgrade-temp-backup/plugins/gp-premium/typography/functions/woocommerce-fonts.php deleted file mode 100644 index b1d0b3c1..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/typography/functions/woocommerce-fonts.php +++ /dev/null @@ -1,179 +0,0 @@ -register_control_type( 'GeneratePress_Pro_Range_Slider_Control' ); - $wp_customize->register_control_type( 'GeneratePress_Pro_Typography_Customize_Control' ); - $wp_customize->register_control_type( 'GeneratePress_Section_Shortcut_Control' ); - } - - // Bail if WooCommerce isn't activated - if ( ! $wp_customize->get_section( 'generate_woocommerce_typography' ) ) { - return; - } - - $wp_customize->add_control( - new GeneratePress_Section_Shortcut_Control( - $wp_customize, - 'generate_woocommerce_typography_shortcuts', - array( - 'section' => 'generate_woocommerce_typography', - 'element' => __( 'WooCommerce', 'gp-premium' ), - 'shortcuts' => array( - 'layout' => 'generate_woocommerce_layout', - 'colors' => 'generate_woocommerce_colors', - ), - 'settings' => ( isset( $wp_customize->selective_refresh ) ) ? array() : 'blogname', - 'priority' => 0, - ) - ) - ); - - // WooCommerce - $wp_customize->add_setting( - 'generate_settings[wc_product_title_font_weight]', - array( - 'default' => $defaults['wc_product_title_font_weight'], - 'type' => 'option', - 'sanitize_callback' => 'sanitize_key', - 'transport' => 'postMessage' - ) - ); - - // Text transform - $wp_customize->add_setting( - 'generate_settings[wc_product_title_font_transform]', - array( - 'default' => $defaults['wc_product_title_font_transform'], - 'type' => 'option', - 'sanitize_callback' => 'sanitize_key', - 'transport' => 'postMessage' - ) - ); - - $wp_customize->add_control( - new GeneratePress_Pro_Typography_Customize_Control( - $wp_customize, - 'google_wc_product_title_control', - array( - 'label' => __( 'Shop Product Titles', 'gp-premium' ), - 'section' => 'generate_woocommerce_typography', - 'settings' => array( - 'weight' => 'generate_settings[wc_product_title_font_weight]', - 'transform' => 'generate_settings[wc_product_title_font_transform]', - ), - ) - ) - ); - - // Font size - $wp_customize->add_setting( - 'generate_settings[wc_product_title_font_size]', - array( - 'default' => $defaults['wc_product_title_font_size'], - 'type' => 'option', - 'sanitize_callback' => 'absint', - 'transport' => 'postMessage' - ) - ); - - $wp_customize->add_setting( - 'generate_settings[mobile_wc_product_title_font_size]', - array( - 'default' => $defaults['mobile_wc_product_title_font_size'], - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_empty_absint', - 'transport' => 'postMessage' - ) - ); - - $wp_customize->add_control( - new GeneratePress_Pro_Range_Slider_Control( - $wp_customize, - 'generate_settings[wc_product_title_font_size]', - array( - 'description' => __( 'Font size', 'gp-premium' ), - 'section' => 'generate_woocommerce_typography', - 'priority' => 240, - 'settings' => array( - 'desktop' => 'generate_settings[wc_product_title_font_size]', - 'mobile' => 'generate_settings[mobile_wc_product_title_font_size]', - ), - 'choices' => array( - 'desktop' => array( - 'min' => 10, - 'max' => 80, - 'step' => 1, - 'edit' => true, - 'unit' => 'px', - ), - 'mobile' => array( - 'min' => 10, - 'max' => 80, - 'step' => 1, - 'edit' => true, - 'unit' => 'px', - ), - ), - ) - ) - ); - - // Font size - $wp_customize->add_setting( - 'generate_settings[wc_related_product_title_font_size]', - array( - 'default' => $defaults['wc_related_product_title_font_size'], - 'type' => 'option', - 'sanitize_callback' => 'absint', - 'transport' => 'postMessage' - ) - ); - - $wp_customize->add_control( - new GeneratePress_Pro_Range_Slider_Control( - $wp_customize, - 'generate_settings[wc_related_product_title_font_size]', - array( - 'description' => __( 'Related/upsell title font size', 'gp-premium' ), - 'section' => 'generate_woocommerce_typography', - 'priority' => 240, - 'settings' => array( - 'desktop' => 'generate_settings[wc_related_product_title_font_size]', - 'mobile' => 'generate_settings[mobile_wc_product_title_font_size]', - ), - 'choices' => array( - 'desktop' => array( - 'min' => 10, - 'max' => 80, - 'step' => 1, - 'edit' => true, - 'unit' => 'px', - ), - ), - ) - ) - ); - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/typography/generate-fonts.php b/wp-content/upgrade-temp-backup/plugins/gp-premium/typography/generate-fonts.php deleted file mode 100644 index fd8a9939..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/typography/generate-fonts.php +++ /dev/null @@ -1,20 +0,0 @@ -add_control( - new GeneratePress_Section_Shortcut_Control( - $wp_customize, - 'generate_woocommerce_colors_shortcuts', - array( - 'section' => 'generate_woocommerce_colors', - 'element' => __( 'WooCommerce', 'gp-premium' ), - 'shortcuts' => array( - 'layout' => 'generate_woocommerce_layout', - 'typography' => 'generate_woocommerce_typography', - ), - 'settings' => ( isset( $wp_customize->selective_refresh ) ) ? array() : 'blogname', - 'priority' => 0, - ) - ) - ); - - $color_defaults = generate_get_color_defaults(); - - $wp_customize->add_section( - 'generate_woocommerce_colors', - array( - 'title' => __( 'Colors', 'gp-premium' ), - 'priority' => 40, - 'panel' => 'woocommerce', - ) - ); - - GeneratePress_Customize_Field::add_title( - 'generate_woocommerce_button_colors_title', - array( - 'section' => 'generate_woocommerce_colors', - 'title' => __( 'Buttons', 'gp-premium' ), - 'choices' => array( - 'toggleId' => 'woocommerce-button-colors', - ), - ) - ); - - GeneratePress_Customize_Field::add_color_field_group( - 'woocommerce_alt_button_background', - 'generate_woocommerce_colors', - 'woocommerce-button-colors', - array( - 'generate_settings[wc_alt_button_background]' => array( - 'default_value' => $color_defaults['wc_alt_button_background'], - 'label' => __( 'Alt Button Background', 'gp-premium' ), - 'tooltip' => __( 'Choose Initial Color', 'gp-premium' ), - 'element' => '.woocommerce #respond input#submit.alt, .woocommerce a.button.alt, .woocommerce button.button.alt, .woocommerce input.button.alt, .woocommerce #respond input#submit.alt.disabled, .woocommerce #respond input#submit.alt.disabled:hover, .woocommerce #respond input#submit.alt:disabled, .woocommerce #respond input#submit.alt:disabled:hover, .woocommerce #respond input#submit.alt:disabled[disabled], .woocommerce #respond input#submit.alt:disabled[disabled]:hover, .woocommerce a.button.alt.disabled, .woocommerce a.button.alt.disabled:hover, .woocommerce a.button.alt:disabled, .woocommerce a.button.alt:disabled:hover, .woocommerce a.button.alt:disabled[disabled], .woocommerce a.button.alt:disabled[disabled]:hover, .woocommerce button.button.alt.disabled, .woocommerce button.button.alt.disabled:hover, .woocommerce button.button.alt:disabled, .woocommerce button.button.alt:disabled:hover, .woocommerce button.button.alt:disabled[disabled], .woocommerce button.button.alt:disabled[disabled]:hover, .woocommerce input.button.alt.disabled, .woocommerce input.button.alt.disabled:hover, .woocommerce input.button.alt:disabled, .woocommerce input.button.alt:disabled:hover, .woocommerce input.button.alt:disabled[disabled], .woocommerce input.button.alt:disabled[disabled]:hover', - 'property' => 'background-color', - 'hide_label' => false, - ), - 'generate_settings[wc_alt_button_background_hover]' => array( - 'default_value' => $color_defaults['wc_alt_button_background_hover'], - 'label' => __( 'Alt Button Background Hover', 'gp-premium' ), - 'tooltip' => __( 'Choose Hover Color', 'gp-premium' ), - 'element' => '.woocommerce #respond input#submit.alt:hover, .woocommerce a.button.alt:hover, .woocommerce button.button.alt:hover, .woocommerce input.button.alt:hover', - 'property' => 'background-color', - 'hide_label' => true, - ), - ) - ); - - GeneratePress_Customize_Field::add_color_field_group( - 'woocommerce_alt_button_text', - 'generate_woocommerce_colors', - 'woocommerce-button-colors', - array( - 'generate_settings[wc_alt_button_text]' => array( - 'default_value' => $color_defaults['wc_alt_button_text'], - 'label' => __( 'Alt Button Text', 'gp-premium' ), - 'tooltip' => __( 'Choose Initial Color', 'gp-premium' ), - 'element' => '.woocommerce #respond input#submit.alt, .woocommerce a.button.alt, .woocommerce button.button.alt, .woocommerce input.button.alt, .woocommerce #respond input#submit.alt.disabled, .woocommerce #respond input#submit.alt.disabled:hover, .woocommerce #respond input#submit.alt:disabled, .woocommerce #respond input#submit.alt:disabled:hover, .woocommerce #respond input#submit.alt:disabled[disabled], .woocommerce #respond input#submit.alt:disabled[disabled]:hover, .woocommerce a.button.alt.disabled, .woocommerce a.button.alt.disabled:hover, .woocommerce a.button.alt:disabled, .woocommerce a.button.alt:disabled:hover, .woocommerce a.button.alt:disabled[disabled], .woocommerce a.button.alt:disabled[disabled]:hover, .woocommerce button.button.alt.disabled, .woocommerce button.button.alt.disabled:hover, .woocommerce button.button.alt:disabled, .woocommerce button.button.alt:disabled:hover, .woocommerce button.button.alt:disabled[disabled], .woocommerce button.button.alt:disabled[disabled]:hover, .woocommerce input.button.alt.disabled, .woocommerce input.button.alt.disabled:hover, .woocommerce input.button.alt:disabled, .woocommerce input.button.alt:disabled:hover, .woocommerce input.button.alt:disabled[disabled], .woocommerce input.button.alt:disabled[disabled]:hover', - 'property' => 'color', - 'hide_label' => false, - ), - 'generate_settings[wc_alt_button_text_hover]' => array( - 'default_value' => $color_defaults['wc_alt_button_text_hover'], - 'label' => __( 'Alt Button Text Hover', 'gp-premium' ), - 'tooltip' => __( 'Choose Hover Color', 'gp-premium' ), - 'element' => '.woocommerce #respond input#submit.alt:hover, .woocommerce a.button.alt:hover, .woocommerce button.button.alt:hover, .woocommerce input.button.alt:hover', - 'property' => 'color', - 'hide_label' => true, - ), - ) - ); - - GeneratePress_Customize_Field::add_title( - 'generate_woocommerce_product_colors_title', - array( - 'section' => 'generate_woocommerce_colors', - 'title' => __( 'Products', 'gp-premium' ), - 'choices' => array( - 'toggleId' => 'woocommerce-product-colors', - ), - ) - ); - - GeneratePress_Customize_Field::add_color_field_group( - 'woocommerce_product_title', - 'generate_woocommerce_colors', - 'woocommerce-product-colors', - array( - 'generate_settings[wc_product_title_color]' => array( - 'default_value' => $color_defaults['wc_product_title_color'], - 'label' => __( 'Product Title', 'gp-premium' ), - 'tooltip' => __( 'Choose Initial Color', 'gp-premium' ), - 'element' => '.woocommerce ul.products li.product .woocommerce-LoopProduct-link', - 'property' => 'color', - 'hide_label' => false, - ), - 'generate_settings[wc_product_title_color_hover]' => array( - 'default_value' => $color_defaults['wc_product_title_color_hover'], - 'label' => __( 'Product Title Hover', 'gp-premium' ), - 'tooltip' => __( 'Choose Hover Color', 'gp-premium' ), - 'element' => '.woocommerce ul.products li.product .woocommerce-LoopProduct-link:hover', - 'property' => 'color', - 'hide_label' => true, - ), - ) - ); - - GeneratePress_Customize_Field::add_color_field_group( - 'woocommerce_rating_stars', - 'generate_woocommerce_colors', - 'woocommerce-product-colors', - array( - 'generate_settings[wc_rating_stars]' => array( - 'default_value' => $color_defaults['wc_rating_stars'], - 'label' => __( 'Star Ratings', 'gp-premium' ), - 'tooltip' => __( 'Choose Color', 'gp-premium' ), - 'element' => '.woocommerce .star-rating span:before, .woocommerce p.stars:hover a::before', - 'property' => 'color', - 'hide_label' => false, - ), - ) - ); - - GeneratePress_Customize_Field::add_color_field_group( - 'woocommerce_sale_sticker_background', - 'generate_woocommerce_colors', - 'woocommerce-product-colors', - array( - 'generate_settings[wc_sale_sticker_background]' => array( - 'default_value' => $color_defaults['wc_sale_sticker_background'], - 'label' => __( 'Sale Sticker Background', 'gp-premium' ), - 'tooltip' => __( 'Choose Color', 'gp-premium' ), - 'element' => '.woocommerce span.onsale', - 'property' => 'background-color', - 'hide_label' => false, - ), - ) - ); - - GeneratePress_Customize_Field::add_color_field_group( - 'woocommerce_sale_sticker_text', - 'generate_woocommerce_colors', - 'woocommerce-product-colors', - array( - 'generate_settings[wc_sale_sticker_text]' => array( - 'default_value' => $color_defaults['wc_sale_sticker_text'], - 'label' => __( 'Sale Sticker Text', 'gp-premium' ), - 'tooltip' => __( 'Choose Color', 'gp-premium' ), - 'element' => '.woocommerce span.onsale', - 'property' => 'color', - 'hide_label' => false, - ), - ) - ); - - GeneratePress_Customize_Field::add_color_field_group( - 'woocommerce_price_text', - 'generate_woocommerce_colors', - 'woocommerce-product-colors', - array( - 'generate_settings[wc_price_color]' => array( - 'default_value' => $color_defaults['wc_price_color'], - 'label' => __( 'Price', 'gp-premium' ), - 'tooltip' => __( 'Choose Color', 'gp-premium' ), - 'element' => '.woocommerce ul.products li.product .price, .woocommerce div.product p.price', - 'property' => 'color', - 'hide_label' => false, - ), - ) - ); - - GeneratePress_Customize_Field::add_title( - 'generate_woocommerce_panel_cart_colors_title', - array( - 'section' => 'generate_woocommerce_colors', - 'title' => __( 'Sticky Panel Cart', 'gp-premium' ), - 'choices' => array( - 'toggleId' => 'woocommerce-panel-cart-colors', - ), - ) - ); - - GeneratePress_Customize_Field::add_color_field_group( - 'woocommerce_panel_cart_background', - 'generate_woocommerce_colors', - 'woocommerce-panel-cart-colors', - array( - 'generate_settings[wc_panel_cart_background_color]' => array( - 'default_value' => $color_defaults['wc_panel_cart_background_color'], - 'label' => __( 'Background Color', 'gp-premium' ), - 'tooltip' => __( 'Choose Color', 'gp-premium' ), - 'element' => '.add-to-cart-panel', - 'property' => 'background-color', - 'hide_label' => false, - ), - ) - ); - - GeneratePress_Customize_Field::add_color_field_group( - 'woocommerce_panel_cart_text', - 'generate_woocommerce_colors', - 'woocommerce-panel-cart-colors', - array( - 'generate_settings[wc_panel_cart_text_color]' => array( - 'default_value' => $color_defaults['wc_panel_cart_text_color'], - 'label' => __( 'Text Color', 'gp-premium' ), - 'tooltip' => __( 'Choose Color', 'gp-premium' ), - 'element' => '.add-to-cart-panel, .add-to-cart-panel a:not(.button)', - 'property' => 'color', - 'hide_label' => false, - ), - ) - ); - - GeneratePress_Customize_Field::add_color_field_group( - 'woocommerce_panel_cart_button_background', - 'generate_woocommerce_colors', - 'woocommerce-panel-cart-colors', - array( - 'generate_settings[wc_panel_cart_button_background]' => array( - 'default_value' => $color_defaults['wc_panel_cart_button_background'], - 'label' => __( 'Button Background', 'gp-premium' ), - 'tooltip' => __( 'Choose Initial Color', 'gp-premium' ), - 'element' => '#wc-sticky-cart-panel .button', - 'property' => 'background-color', - 'hide_label' => false, - ), - 'generate_settings[wc_panel_cart_button_background_hover]' => array( - 'default_value' => $color_defaults['wc_panel_cart_button_background_hover'], - 'label' => __( 'Button Background Hover', 'gp-premium' ), - 'tooltip' => __( 'Choose Hover Color', 'gp-premium' ), - 'element' => '#wc-sticky-cart-panel .button:hover, #wc-sticky-cart-panel .button:focus, #wc-sticky-cart-panel .button:active', - 'property' => 'background-color', - 'hide_label' => true, - ), - ) - ); - - GeneratePress_Customize_Field::add_color_field_group( - 'woocommerce_panel_cart_button_text', - 'generate_woocommerce_colors', - 'woocommerce-panel-cart-colors', - array( - 'generate_settings[wc_panel_cart_button_text]' => array( - 'default_value' => $color_defaults['wc_panel_cart_button_text'], - 'label' => __( 'Button Text', 'gp-premium' ), - 'tooltip' => __( 'Choose Initial Color', 'gp-premium' ), - 'element' => '#wc-sticky-cart-panel .button', - 'property' => 'color', - 'hide_label' => false, - ), - 'generate_settings[wc_panel_cart_button_text_hover]' => array( - 'default_value' => $color_defaults['wc_panel_cart_button_text_hover'], - 'label' => __( 'Button Text Hover', 'gp-premium' ), - 'tooltip' => __( 'Choose Hover Color', 'gp-premium' ), - 'element' => '#wc-sticky-cart-panel .button:hover, #wc-sticky-cart-panel .button:focus, #wc-sticky-cart-panel .button:active', - 'property' => 'color', - 'hide_label' => true, - ), - ) - ); - - GeneratePress_Customize_Field::add_title( - 'generate_woocommerce_mini_cart_colors_title', - array( - 'section' => 'generate_woocommerce_colors', - 'title' => __( 'Menu Mini Cart', 'gp-premium' ), - 'choices' => array( - 'toggleId' => 'woocommerce-mini-cart-colors', - ), - ) - ); - - GeneratePress_Customize_Field::add_color_field_group( - 'woocommerce_mini_cart_background', - 'generate_woocommerce_colors', - 'woocommerce-mini-cart-colors', - array( - 'generate_settings[wc_mini_cart_background_color]' => array( - 'default_value' => $color_defaults['wc_mini_cart_background_color'], - 'label' => __( 'Background Color', 'gp-premium' ), - 'tooltip' => __( 'Choose Color', 'gp-premium' ), - 'element' => '#wc-mini-cart', - 'property' => 'background-color', - 'hide_label' => false, - ), - ) - ); - - GeneratePress_Customize_Field::add_color_field_group( - 'woocommerce_mini_cart_text', - 'generate_woocommerce_colors', - 'woocommerce-mini-cart-colors', - array( - 'generate_settings[wc_mini_cart_text_color]' => array( - 'default_value' => $color_defaults['wc_mini_cart_text_color'], - 'label' => __( 'Text Color', 'gp-premium' ), - 'tooltip' => __( 'Choose Color', 'gp-premium' ), - 'element' => '#wc-mini-cart', - 'property' => 'color', - 'hide_label' => false, - ), - ) - ); - - GeneratePress_Customize_Field::add_color_field_group( - 'woocommerce_mini_cart_button_background', - 'generate_woocommerce_colors', - 'woocommerce-mini-cart-colors', - array( - 'generate_settings[wc_mini_cart_button_background]' => array( - 'default_value' => $color_defaults['wc_mini_cart_button_background'], - 'label' => __( 'Button Background', 'gp-premium' ), - 'tooltip' => __( 'Choose Initial Color', 'gp-premium' ), - 'element' => '#wc-mini-cart .button', - 'property' => 'background-color', - 'hide_label' => false, - ), - 'generate_settings[wc_mini_cart_button_background_hover]' => array( - 'default_value' => $color_defaults['wc_mini_cart_button_background_hover'], - 'label' => __( 'Button Background Hover', 'gp-premium' ), - 'tooltip' => __( 'Choose Hover Color', 'gp-premium' ), - 'element' => '#wc-mini-cart .button:hover, #wc-mini-cart .button:focus, #wc-mini-cart .button:active', - 'property' => 'background-color', - 'hide_label' => true, - ), - ) - ); - - GeneratePress_Customize_Field::add_color_field_group( - 'woocommerce_mini_cart_button_text', - 'generate_woocommerce_colors', - 'woocommerce-mini-cart-colors', - array( - 'generate_settings[wc_mini_cart_button_text]' => array( - 'default_value' => $color_defaults['wc_mini_cart_button_text'], - 'label' => __( 'Button Text', 'gp-premium' ), - 'tooltip' => __( 'Choose Initial Color', 'gp-premium' ), - 'element' => '#wc-mini-cart .button', - 'property' => 'color', - 'hide_label' => false, - ), - 'generate_settings[wc_mini_cart_button_text_hover]' => array( - 'default_value' => $color_defaults['wc_mini_cart_button_text_hover'], - 'label' => __( 'Button Text Hover', 'gp-premium' ), - 'tooltip' => __( 'Choose Hover Color', 'gp-premium' ), - 'element' => '#wc-mini-cart .button:hover, #wc-mini-cart .button:focus, #wc-mini-cart .button:active', - 'property' => 'color', - 'hide_label' => true, - ), - ) - ); - - GeneratePress_Customize_Field::add_title( - 'generate_woocommerce_price_slider_colors_title', - array( - 'section' => 'generate_woocommerce_colors', - 'title' => __( 'Price Slider Widget', 'gp-premium' ), - 'choices' => array( - 'toggleId' => 'woocommerce-price-slider-colors', - ), - ) - ); - - GeneratePress_Customize_Field::add_color_field_group( - 'woocommerce_price_slider_background', - 'generate_woocommerce_colors', - 'woocommerce-price-slider-colors', - array( - 'generate_settings[wc_price_slider_background_color]' => array( - 'default_value' => $color_defaults['wc_price_slider_background_color'], - 'label' => __( 'Slider Background Color', 'gp-premium' ), - 'tooltip' => __( 'Choose Color', 'gp-premium' ), - 'element' => '.woocommerce .widget_price_filter .price_slider_wrapper .ui-widget-content', - 'property' => 'background-color', - 'hide_label' => false, - ), - ) - ); - - GeneratePress_Customize_Field::add_color_field_group( - 'woocommerce_price_slider_bar', - 'generate_woocommerce_colors', - 'woocommerce-price-slider-colors', - array( - 'generate_settings[wc_price_slider_bar_color]' => array( - 'default_value' => $color_defaults['wc_price_slider_bar_color'], - 'label' => __( 'Slider Bar Color', 'gp-premium' ), - 'tooltip' => __( 'Choose Color', 'gp-premium' ), - 'element' => '.woocommerce .widget_price_filter .ui-slider .ui-slider-range, .woocommerce .widget_price_filter .ui-slider .ui-slider-handle', - 'property' => 'background-color', - 'hide_label' => false, - ), - ) - ); - - GeneratePress_Customize_Field::add_title( - 'generate_woocommerce_product_tabs_colors_title', - array( - 'section' => 'generate_woocommerce_colors', - 'title' => __( 'Product Tabs', 'gp-premium' ), - 'choices' => array( - 'toggleId' => 'woocommerce-product-tabs-colors', - ), - ) - ); - - GeneratePress_Customize_Field::add_color_field_group( - 'woocommerce_product_tab_text', - 'generate_woocommerce_colors', - 'woocommerce-product-tabs-colors', - array( - 'generate_settings[wc_product_tab]' => array( - 'default_value' => $color_defaults['wc_product_tab'], - 'label' => __( 'Product Tab Text', 'gp-premium' ), - 'tooltip' => __( 'Choose Color', 'gp-premium' ), - 'element' => '.woocommerce div.product .woocommerce-tabs ul.tabs li a', - 'property' => 'color', - 'hide_label' => false, - ), - ) - ); - - GeneratePress_Customize_Field::add_color_field_group( - 'woocommerce_product_tab_text', - 'generate_woocommerce_colors', - 'woocommerce-product-tabs-colors', - array( - 'generate_settings[wc_product_tab_highlight]' => array( - 'default_value' => $color_defaults['wc_product_tab_highlight'], - 'label' => __( 'Product Tab Active', 'gp-premium' ), - 'tooltip' => __( 'Choose Color', 'gp-premium' ), - 'element' => '.woocommerce div.product .woocommerce-tabs ul.tabs li a:hover, .woocommerce div.product .woocommerce-tabs ul.tabs li.active a', - 'property' => 'color', - 'hide_label' => false, - ), - ) - ); - - GeneratePress_Customize_Field::add_title( - 'generate_woocommerce_messages_colors_title', - array( - 'section' => 'generate_woocommerce_colors', - 'title' => __( 'Messages', 'gp-premium' ), - 'choices' => array( - 'toggleId' => 'woocommerce-messages-colors', - ), - ) - ); - - GeneratePress_Customize_Field::add_color_field_group( - 'woocommerce_success_message_background', - 'generate_woocommerce_colors', - 'woocommerce-messages-colors', - array( - 'generate_settings[wc_success_message_background]' => array( - 'default_value' => $color_defaults['wc_success_message_background'], - 'label' => __( 'Success Message Background', 'gp-premium' ), - 'tooltip' => __( 'Choose Color', 'gp-premium' ), - 'element' => '.woocommerce-message', - 'property' => 'background-color', - 'hide_label' => false, - ), - ) - ); - - GeneratePress_Customize_Field::add_color_field_group( - 'woocommerce_success_message_text', - 'generate_woocommerce_colors', - 'woocommerce-messages-colors', - array( - 'generate_settings[wc_success_message_text]' => array( - 'default_value' => $color_defaults['wc_success_message_text'], - 'label' => __( 'Success Message Text', 'gp-premium' ), - 'tooltip' => __( 'Choose Color', 'gp-premium' ), - 'element' => '.woocommerce-message', - 'property' => 'color', - 'hide_label' => false, - ), - ) - ); - - GeneratePress_Customize_Field::add_color_field_group( - 'woocommerce_info_message_background', - 'generate_woocommerce_colors', - 'woocommerce-messages-colors', - array( - 'generate_settings[wc_info_message_background]' => array( - 'default_value' => $color_defaults['wc_info_message_background'], - 'label' => __( 'Info Message Background', 'gp-premium' ), - 'tooltip' => __( 'Choose Color', 'gp-premium' ), - 'element' => '.woocommerce-info', - 'property' => 'background-color', - 'hide_label' => false, - ), - ) - ); - - GeneratePress_Customize_Field::add_color_field_group( - 'woocommerce_info_message_text', - 'generate_woocommerce_colors', - 'woocommerce-messages-colors', - array( - 'generate_settings[wc_info_message_text]' => array( - 'default_value' => $color_defaults['wc_info_message_text'], - 'label' => __( 'Info Message Text', 'gp-premium' ), - 'tooltip' => __( 'Choose Color', 'gp-premium' ), - 'element' => '.woocommerce-info', - 'property' => 'color', - 'hide_label' => false, - ), - ) - ); - - GeneratePress_Customize_Field::add_color_field_group( - 'woocommerce_error_message_background', - 'generate_woocommerce_colors', - 'woocommerce-messages-colors', - array( - 'generate_settings[wc_error_message_background]' => array( - 'default_value' => $color_defaults['wc_error_message_background'], - 'label' => __( 'Error Message Background', 'gp-premium' ), - 'tooltip' => __( 'Choose Color', 'gp-premium' ), - 'element' => '.woocommerce-error', - 'property' => 'background-color', - 'hide_label' => false, - ), - ) - ); - - GeneratePress_Customize_Field::add_color_field_group( - 'woocommerce_error_message_text', - 'generate_woocommerce_colors', - 'woocommerce-messages-colors', - array( - 'generate_settings[wc_error_message_text]' => array( - 'default_value' => $color_defaults['wc_error_message_text'], - 'label' => __( 'Error Message Text', 'gp-premium' ), - 'tooltip' => __( 'Choose Color', 'gp-premium' ), - 'element' => '.woocommerce-error', - 'property' => 'color', - 'hide_label' => false, - ), - ) - ); - - GeneratePress_Customize_Field::add_title( - 'woocommerce_colors_redirect', - array( - 'section' => 'generate_colors_section', - 'title' => __( 'WooCommerce', 'gp-premium' ), - 'choices' => array( - 'sectionRedirect' => true, - 'toggleId' => 'generate_woocommerce_colors', - ), - ) - ); - - GeneratePress_Customize_Field::add_title( - 'generate_colors_redirect', - array( - 'section' => 'generate_woocommerce_colors', - 'title' => __( 'Other Theme Colors', 'gp-premium' ), - 'choices' => array( - 'sectionRedirect' => true, - 'toggleId' => 'generate_colors_section', - ), - ) - ); -} diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/woocommerce/functions/css/woocommerce-mobile.css b/wp-content/upgrade-temp-backup/plugins/gp-premium/woocommerce/functions/css/woocommerce-mobile.css deleted file mode 100644 index bb3462da..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/woocommerce/functions/css/woocommerce-mobile.css +++ /dev/null @@ -1,201 +0,0 @@ -.woocommerce-product-gallery { - margin-right: 0; -} - -.woocommerce .woocommerce-ordering, -.woocommerce-page .woocommerce-ordering { - float: none; -} - -.woocommerce .woocommerce-ordering select { - max-width: 100%; -} - -.woocommerce #wc-column-container.wc-mobile-columns-1 .products, -.wc-related-upsell-mobile-columns-1 .related ul.products, -.wc-related-upsell-mobile-columns-1 .up-sells ul.products { - -ms-grid-columns: 1fr; - grid-template-columns: repeat(1, minmax(0, 1fr)); -} - -.woocommerce #wc-column-container.wc-mobile-columns-2 .products, -.wc-related-upsell-mobile-columns-2 .related ul.products, -.wc-related-upsell-mobile-columns-2 .up-sells ul.products { - -ms-grid-columns: 1fr 1fr; - grid-template-columns: repeat(2, minmax(0, 1fr)); -} - -.woocommerce #wc-column-container.wc-mobile-columns-3 .products, -.wc-related-upsell-mobile-columns-3 .related ul.products, -.wc-related-upsell-mobile-columns-3 .up-sells ul.products { - -ms-grid-columns: 1fr 1fr 1fr; - grid-template-columns: repeat(3, minmax(0, 1fr)); -} - -.woocommerce ul.products li.product a img { - width: auto; - margin-left: auto; - margin-right: auto; -} - -.woocommerce div.product .woocommerce-tabs ul.tabs, -.woocommerce div.product .woocommerce-tabs .panel { - float: none; - width: 100%; -} - -.woocommerce div.product .woocommerce-tabs .panel { - margin-top: 20px; -} - -.wc-tabs .active a:after { - transform: rotate(90deg); - padding-right: 3px; -} - -.woocommerce .col2-set, -.woocommerce-page .col2-set { - width: 100%; - float: none; - margin-right: 0; -} - -#customer_details + #wc_checkout_add_ons, -#order_review, -#order_review_heading { - width: 100%; - float: none; - margin-right: 0; -} - -.woocommerce ul.products li.product.woocommerce-image-align-left .wc-product-image, -.woocommerce ul.products li.product.woocommerce-image-align-right .wc-product-image { - float: none; - margin: 0; -} - -.woocommerce ul.products li.product.woocommerce-image-align-left a .wc-product-image img, -.woocommerce ul.products li.product.woocommerce-image-align-right a .wc-product-image img { - width: 100%; -} - -.woocommerce .related ul.products li.product, -.woocommerce-page .related ul.products li.product, -.woocommerce-page[class*=columns-] .related ul.products li.product, -.woocommerce[class*=columns-] .related ul.products li.product, -.woocommerce .up-sells ul.products li.product, -.woocommerce-page .up-sells ul.products li.product, -.woocommerce-page[class*=columns-] .up-sells ul.products li.product, -.woocommerce[class*=columns-] .up-sells ul.products li.product { - width: 100%; - margin-left: 0; - margin-right: 0; -} - -.woocommerce form .woocommerce-billing-fields__field-wrapper .form-row-first, -.woocommerce form .woocommerce-billing-fields__field-wrapper .form-row-last, -.woocommerce-page form .woocommerce-billing-fields__field-wrapper .form-row-first, -.woocommerce-page form .woocommerce-billing-fields__field-wrapper .form-row-last { - float: none; - width: 100%; -} - -.woocommerce-account .woocommerce-MyAccount-navigation { - width: 100%; -} - -.woocommerce-MyAccount-navigation li.is-active a:after { - content: "\e901"; -} - -#wc-mini-cart { - display: none; -} - -.do-quantity-buttons div.quantity { - justify-content: flex-end; -} - -.woocommerce div.product .woocommerce-tabs ul.tabs { - flex-direction: column; -} - -.woocommerce div.product .woocommerce-tabs ul.tabs li { - border-left-width: 1px; -} - -.woocommerce div.product .woocommerce-tabs ul.tabs li:last-child { - border-bottom-color: rgba(0, 0, 0, 0.08); - border-bottom-width: 1px; -} - -.woocommerce .coupon .button { - font-size: 14px; - padding: 10px; -} - -.woocommerce .woocommerce-ordering { - margin-bottom: 0; -} - -.add-to-cart-panel { - bottom: 0; - top: auto; - transform: translateY(0px) !important; -} - -.add-to-cart-panel .continue-shopping:not(.has-svg-icon):before { - content: "\f00d"; - font-family: 'GP Premium'; - line-height: 1em; - width: 1.28571429em; - text-align: center; - display: inline-block; - padding: 10px; -} - -#wc-sticky-cart-panel .quantity, -.add-to-cart-panel .continue-shopping-link { - display: none; -} - -.add-to-cart-panel .continue-shopping { - order: 5; - margin-left: auto; - margin-right: 0; - position: absolute; - top: -20px; - left: 10px; - height: 50px; - width: 50px; - text-align: center; - border-radius: 50%; - line-height: 50px; - cursor: pointer; -} - -.add-to-cart-panel .continue-shopping .gp-icon { - display: block; -} - -.add-to-cart-panel .product-image, -.add-to-cart-panel .cart { - flex-shrink: 0; -} - -.add-to-cart-panel .product-title { - padding-right: 20px; - margin-left: 10px; -} - -.add-to-cart-panel .cart-info { - margin-right: auto; -} - -.add-to-cart-panel .product-price { - font-size: 13px; -} - -.add-to-cart-panel:not(.item-added):not(.show-sticky-add-to-cart) { - pointer-events: none; -} diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/woocommerce/functions/css/woocommerce-mobile.min.css b/wp-content/upgrade-temp-backup/plugins/gp-premium/woocommerce/functions/css/woocommerce-mobile.min.css deleted file mode 100644 index 489a04fd..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/woocommerce/functions/css/woocommerce-mobile.min.css +++ /dev/null @@ -1 +0,0 @@ -.woocommerce-product-gallery{margin-right:0}.woocommerce .woocommerce-ordering,.woocommerce-page .woocommerce-ordering{float:none}.woocommerce .woocommerce-ordering select{max-width:100%}.wc-related-upsell-mobile-columns-1 .related ul.products,.wc-related-upsell-mobile-columns-1 .up-sells ul.products,.woocommerce #wc-column-container.wc-mobile-columns-1 .products{-ms-grid-columns:1fr;grid-template-columns:repeat(1,minmax(0,1fr))}.wc-related-upsell-mobile-columns-2 .related ul.products,.wc-related-upsell-mobile-columns-2 .up-sells ul.products,.woocommerce #wc-column-container.wc-mobile-columns-2 .products{-ms-grid-columns:1fr 1fr;grid-template-columns:repeat(2,minmax(0,1fr))}.wc-related-upsell-mobile-columns-3 .related ul.products,.wc-related-upsell-mobile-columns-3 .up-sells ul.products,.woocommerce #wc-column-container.wc-mobile-columns-3 .products{-ms-grid-columns:1fr 1fr 1fr;grid-template-columns:repeat(3,minmax(0,1fr))}.woocommerce ul.products li.product a img{width:auto;margin-left:auto;margin-right:auto}.woocommerce div.product .woocommerce-tabs .panel,.woocommerce div.product .woocommerce-tabs ul.tabs{float:none;width:100%}.woocommerce div.product .woocommerce-tabs .panel{margin-top:20px}.wc-tabs .active a:after{transform:rotate(90deg);padding-right:3px}.woocommerce .col2-set,.woocommerce-page .col2-set{width:100%;float:none;margin-right:0}#customer_details+#wc_checkout_add_ons,#order_review,#order_review_heading{width:100%;float:none;margin-right:0}.woocommerce ul.products li.product.woocommerce-image-align-left .wc-product-image,.woocommerce ul.products li.product.woocommerce-image-align-right .wc-product-image{float:none;margin:0}.woocommerce ul.products li.product.woocommerce-image-align-left a .wc-product-image img,.woocommerce ul.products li.product.woocommerce-image-align-right a .wc-product-image img{width:100%}.woocommerce .related ul.products li.product,.woocommerce .up-sells ul.products li.product,.woocommerce-page .related ul.products li.product,.woocommerce-page .up-sells ul.products li.product,.woocommerce-page[class*=columns-] .related ul.products li.product,.woocommerce-page[class*=columns-] .up-sells ul.products li.product,.woocommerce[class*=columns-] .related ul.products li.product,.woocommerce[class*=columns-] .up-sells ul.products li.product{width:100%;margin-left:0;margin-right:0}.woocommerce form .woocommerce-billing-fields__field-wrapper .form-row-first,.woocommerce form .woocommerce-billing-fields__field-wrapper .form-row-last,.woocommerce-page form .woocommerce-billing-fields__field-wrapper .form-row-first,.woocommerce-page form .woocommerce-billing-fields__field-wrapper .form-row-last{float:none;width:100%}.woocommerce-account .woocommerce-MyAccount-navigation{width:100%}.woocommerce-MyAccount-navigation li.is-active a:after{content:"\e901"}#wc-mini-cart{display:none}.do-quantity-buttons div.quantity{justify-content:flex-end}.woocommerce div.product .woocommerce-tabs ul.tabs{flex-direction:column}.woocommerce div.product .woocommerce-tabs ul.tabs li{border-left-width:1px}.woocommerce div.product .woocommerce-tabs ul.tabs li:last-child{border-bottom-color:rgba(0,0,0,.08);border-bottom-width:1px}.woocommerce .coupon .button{font-size:14px;padding:10px}.woocommerce .woocommerce-ordering{margin-bottom:0}.add-to-cart-panel{bottom:0;top:auto;transform:translateY(0)!important}.add-to-cart-panel .continue-shopping:not(.has-svg-icon):before{content:"\f00d";font-family:'GP Premium';line-height:1em;width:1.28571429em;text-align:center;display:inline-block;padding:10px}#wc-sticky-cart-panel .quantity,.add-to-cart-panel .continue-shopping-link{display:none}.add-to-cart-panel .continue-shopping{order:5;margin-left:auto;margin-right:0;position:absolute;top:-20px;left:10px;height:50px;width:50px;text-align:center;border-radius:50%;line-height:50px;cursor:pointer}.add-to-cart-panel .continue-shopping .gp-icon{display:block}.add-to-cart-panel .cart,.add-to-cart-panel .product-image{flex-shrink:0}.add-to-cart-panel .product-title{padding-right:20px;margin-left:10px}.add-to-cart-panel .cart-info{margin-right:auto}.add-to-cart-panel .product-price{font-size:13px}.add-to-cart-panel:not(.item-added):not(.show-sticky-add-to-cart){pointer-events:none} \ No newline at end of file diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/woocommerce/functions/css/woocommerce.css b/wp-content/upgrade-temp-backup/plugins/gp-premium/woocommerce/functions/css/woocommerce.css deleted file mode 100644 index a7eb7ad8..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/woocommerce/functions/css/woocommerce.css +++ /dev/null @@ -1,1284 +0,0 @@ -@supports (display: grid) { - .woocommerce ul.products li.product { - display: flex; - flex-direction: column; - } -} - -.woocommerce ul.products li.product.woocommerce-image-align-left, -.woocommerce ul.products li.product.woocommerce-image-align-right { - display: block; -} - -.woocommerce ul.products li.product .woocommerce-LoopProduct-link { - display: block; - margin-bottom: auto; -} - -.woocommerce ul.products li.product .button { - margin-left: auto; - margin-right: auto; -} - -.woocommerce ul.products li.product.woocommerce-text-align-left .button { - margin-left: 0; -} - -.woocommerce ul.products li.product.woocommerce-text-align-right .button { - margin-right: 0; -} - -.woocommerce ul.products li.product .woocommerce-LoopProduct-link > *:not(:first-child) { - margin-top: 10px; - margin-bottom: 0; -} - -.woocommerce ul.products li.product .woocommerce-LoopProduct-link > .secondary-image + img { - margin-top: 0; -} - -.woocommerce ul.products li.product .onsale, -.woocommerce span.onsale { - position: relative; - border-radius: 0; - min-height: 15px; - min-width: initial; - font-weight: inherit; - font-size: inherit; - padding: 8px 13px; - line-height: 1; - display: inline-block; - top: auto; - left: auto; - font-size: 80%; - text-transform: uppercase; - font-weight: bold; -} - -.woocommerce ul.products li.product.sales-flash-overlay .onsale { - position: absolute; - top: 0; - right: 0; - margin: 0; -} - -.single-product span.onsale { - margin-bottom: 15px; -} - -.woocommerce-product-gallery { - margin-right: 4%; -} - -.rtl .woocommerce-product-gallery { - margin-right: 0; - margin-left: 4%; -} - -.woocommerce div.product div.images .flex-control-thumbs li { - max-width: 100px; - padding-top: 5px; - padding-right: 5px; - box-sizing: border-box; -} - -.woocommerce ul.products li.product .woocommerce-loop-product__title { - padding: 0; -} - -.woocommerce .page-header-image-single { - display: none; -} - -.woocommerce .entry-content, -.woocommerce .product .entry-summary { - margin-top: 0; -} - -.related.products { - clear: both; -} - -.checkout-subscribe-prompt.clear { - visibility: visible; - height: initial; - width: initial; -} - -.woocommerce .add_to_cart_button + .added_to_cart { - display: none; -} - -.woocommerce-result-count { - font-size: 14px; - padding: 10px 0; - border: 1px solid transparent; -} - -.woocommerce-ordering select { - font-size: 14px; - font-weight: 500; - padding: 10px 40px 10px 12px; - -webkit-appearance: none; - -moz-appearance: none; - width: 100%; - background: transparent; - border-color: rgba(0, 0, 0, 0.1); - color: inherit; - cursor: pointer; -} - -.woocommerce-ordering select::-ms-expand { - display: none; -} - -.woocommerce-ordering:after { - content: "\e903"; - font-family: "GP Premium"; - display: inline-block; - position: absolute; - pointer-events: none; - color: inherit; - top: 10px; - right: 15px; - font-size: 16px; -} - -.woocommerce-ordering select option { - color: initial; -} - -.woocommerce .woocommerce-ordering, -.woocommerce .woocommerce-result-count { - margin-bottom: 30px; -} - -.woocommerce-variation-add-to-cart { - display: flex; - flex-wrap: wrap; -} - -/* Columns */ -@supports (display: grid) { - #wc-column-container .product { - float: none; - width: auto; - margin: 0; - } - .woocommerce .wc-columns-container .products::after, - .woocommerce .wc-columns-container .products::before, - .woocommerce .related ul.products::after, - .woocommerce .related ul.products::before, - .woocommerce .up-sells ul.products::after, - .woocommerce .up-sells ul.products::before { - display: none; - } - .wc-columns-container .products, - .woocommerce .related ul.products, - .woocommerce .up-sells ul.products { - display: -ms-grid; - display: grid; - grid-gap: 50px; - width: 100%; - } - .wc-columns-container.wc-columns-6 .products, - .wc-related-upsell-columns-6 .related ul.products, - .wc-related-upsell-columns-6 .up-sells ul.products { - grid-template-columns: repeat(6, minmax(0, 1fr)); - } - .wc-columns-container.wc-columns-5 .products, - .wc-related-upsell-columns-5 .related ul.products, - .wc-related-upsell-columns-5 .up-sells ul.products { - grid-template-columns: repeat(5, minmax(0, 1fr)); - } - .woocommerce .wc-columns-container.wc-columns-4 .products, - .wc-related-upsell-columns-4 .related ul.products, - .wc-related-upsell-columns-4 .up-sells ul.products { - grid-template-columns: repeat(4, minmax(0, 1fr)); - } - .woocommerce .wc-columns-container.wc-columns-3 .products, - .wc-related-upsell-columns-3 .related ul.products, - .wc-related-upsell-columns-3 .up-sells ul.products { - grid-template-columns: repeat(3, minmax(0, 1fr)); - } - .woocommerce .wc-columns-container.wc-columns-2 .products, - .wc-related-upsell-columns-2 .related ul.products, - .wc-related-upsell-columns-2 .up-sells ul.products { - grid-template-columns: repeat(2, minmax(0, 1fr)); - } - .woocommerce .wc-columns-container.wc-columns-1 .products, - .wc-related-upsell-columns-1 .related ul.products, - .wc-related-upsell-columns-1 .up-sells ul.products { - width: 100%; - } - .woocommerce .wc-columns-1 ul.products li.product, - .woocommerce-page .wc-columns-1 ul.products li.product { - margin-left: 0; - margin-right: 0; - } -} - -/* Mini Cart */ -#wc-mini-cart ul.woocommerce-mini-cart { - position: relative; - left: auto; - right: auto; - opacity: 1; - pointer-events: auto; - height: auto; - width: auto; - float: none; - background-color: transparent; - box-shadow: 0 0 0; - visibility: visible; -} - -.wc-mini-cart { - position: absolute; - width: 300px; - right: 0; - box-shadow: 0 2px 2px rgba(0, 0, 0, 0.1); - z-index: 99999; - left: -99999px; - opacity: 0; - height: 0; - overflow: hidden; - pointer-events: none; - transition: opacity 80ms linear; - transition-delay: 0s; - visibility: hidden; -} - -.wc-menu-item:hover .wc-mini-cart, -.wc-menu-item.sfHover .wc-mini-cart { - left: auto; - opacity: 1; - transition-delay: 150ms; - pointer-events: auto; - height: auto; - overflow: visible; - visibility: visible; -} - -.dropdown-click ul li.wc-menu-item:hover ul { - display: block; -} - -.sidebar .wc-mini-cart { - right: 100%; - top: 0; -} - -.sidebar .wc-mini-cart .widget { - background: none; -} - -body:not(.using-mouse) .wc-menu-item.sfHover .wc-mini-cart { - display: none; -} - -.wc-menu-item .sub-menu { - left: auto; - right: 0; - width: 300px; -} - -.wc-menu-item .wc-mini-cart .widget_shopping_cart_content li:hover a, -.wc-menu-item .wc-mini-cart .widget_shopping_cart_content li.sfHover a { - background: none; -} - -.wc-menu-item .wc-mini-cart .widget_shopping_cart { - padding: 15px; -} - -.woocommerce.widget_shopping_cart .cart_list li { - padding: 0 0 0 4em; - margin: 0; - box-sizing: border-box; - min-height: 3em; -} - -.woocommerce.widget_shopping_cart { - font-size: 14px; -} - -.widget_shopping_cart .woocommerce-mini-cart__buttons { - margin-bottom: 0; - display: flex; -} - -.woocommerce.widget_shopping_cart .woocommerce-mini-cart__buttons a { - margin: 0; - width: calc(50% - 10px); - text-align: center; - padding: 10px 15px; - line-height: inherit; - font-size: 14px; -} - -.woocommerce.widget_shopping_cart .woocommerce-mini-cart__buttons a:first-child { - margin-right: 2px; -} - -.woocommerce.widget_shopping_cart .woocommerce-mini-cart__buttons a:last-child { - margin-left: 2px; -} - -.woocommerce.widget_shopping_cart .cart_list li a.remove { - right: 0; - left: auto; - height: 20px; - width: 20px; - border-width: 1px; - border-style: solid; - border-radius: 50%; - padding: 0; - font-size: 16px; - line-height: 17px; - font-weight: normal; - position: relative; - float: right; -} - -.woocommerce ul.cart_list li img { - position: absolute; - left: 0; - width: 3em; - height: auto; - top: 0; - margin-left: 0; -} - -#wc-mini-cart .woocommerce-mini-cart-item a { - padding: 0; -} - -.woocommerce-mini-cart-item .quantity { - font-size: 12px; - display: block; -} - -.woocommerce.widget_shopping_cart .total { - margin: 15px 0; - padding: 15px; - background: rgba(0, 0, 0, 0.05); - border: 0; - font-size: 14px; -} - -#wc-mini-cart .total { - padding: 15px; - margin: 15px -15px 15px; - text-align: left; -} - -#generate-slideout-menu .total { - padding: 10px 20px; - margin: 20px -20px 20px; -} - -#generate-slideout-menu.do-overlay .total { - margin: 20px 0; -} - -.woocommerce.widget_shopping_cart a.button.wc-forward:after { - display: none; -} - -.woocommerce.widget_shopping_cart .cart_list li.woocommerce-mini-cart-item:not(:last-child) { - margin-bottom: 15px; -} - -.rtl .wc-mini-cart .woocommerce.widget_shopping_cart .cart_list li { - padding: 0 4em 0 0; -} - -.rtl .wc-mini-cart .woocommerce.widget_shopping_cart .cart_list li a.remove { - float: left; -} - -.rtl .wc-mini-cart .woocommerce ul.cart_list li img { - right: 0; -} - -.slideout-widget .widget_shopping_cart_content, -.slideout-widget .widget_shopping_cart_content a { - font-size: 14px; -} - -#generate-slideout-menu.do-overlay li.woocommerce-mini-cart-item { - text-align: left; -} - -#wc-mini-cart a:not(.button) { - font-family: inherit; -} - -.wc-menu-item:not(.has-items) .wc-mini-cart { - display: none; -} - -.woocommerce-mini-cart__empty-message { - margin-bottom: 0; -} - -.secondary-nav-aligned-right .secondary-navigation ul.woocommerce-mini-cart, -.secondary-nav-aligned-center .secondary-navigation ul.woocommerce-mini-cart { - font-size: inherit; -} - -#wc-mini-cart .widgettitle { - display: none; -} - -/* Related/Upsell products */ -@supports (display: grid) { - .woocommerce .related ul.products li.product, - .woocommerce .up-sells ul.products li.product { - width: auto; - margin-left: 0; - margin-right: 0; - margin-bottom: 0; - } -} - -.woocommerce #respond input#submit, -.woocommerce a.button, -.woocommerce button.button, -.woocommerce input.button { - border-radius: 0px; - font-weight: inherit; - font-size: inherit; - line-height: inherit; - padding: 10px 20px; -} - -ul.products .woocommerce-text-align-center { - text-align: center; -} - -ul.products li.product.woocommerce-text-align-center .price, -ul.products li.product.woocommerce-text-align-center .star-rating { - margin-left: auto; - margin-right: auto; -} - -ul.products li.product.woocommerce-text-align-right .price, -ul.products li.product.woocommerce-text-align-right .star-rating { - margin-left: auto; -} - -.woocommerce .star-rating:before { - color: rgba(0, 0, 0, 0.4); -} - -.woocommerce p.stars a { - color: rgba(0, 0, 0, 0.4); -} - -.woocommerce p.stars.selected a:before { - color: #ffa200; -} - -.woocommerce ul.products li.product .price del { - display: inline; - padding-right: 10px; -} - -ul.products .woocommerce-text-align-right { - text-align: right; -} - -/*-------------------------------------------------------------- -# Single Product ---------------------------------------------------------------*/ -.woocommerce #content div.product div.images, -.woocommerce div.product div.images, -.woocommerce-page #content div.product div.images, -.woocommerce-page div.product div.images { - width: 50%; -} - -.woocommerce #content div.product div.summary, -.woocommerce div.product div.summary, -.woocommerce-page #content div.product div.summary, -.woocommerce-page div.product div.summary { - width: auto; - float: none; - overflow: hidden; -} - -.product_meta { - font-size: 80%; - border-top: 1px solid rgba(0, 0, 0, 0.1); - padding-top: 30px; -} - -.product_meta > span { - display: block; -} - -.up-sells { - margin-top: 40px; -} - -.woocommerce div.product.do-quantity-buttons form.cart, -.add-to-cart-panel form.cart { - display: flex; - flex-wrap: wrap; -} - -.woocommerce div.product form.cart > *:not(.quantity):not(.single_add_to_cart_button) { - width: 100%; -} - -.add-to-cart-panel form.cart { - flex-shrink: 0; -} - -.woocommerce .quantity .qty { - height: 100%; - width: auto; - max-width: 80px; - background: transparent; - border: 1px solid rgba(0, 0, 0, 0.1); - padding: 0 10px; - height: 50px; -} - -.do-quantity-buttons .quantity:not(.buttons-added) .qty { - width: 50px; -} - -.do-quantity-buttons div.quantity, -.add-to-cart-panel .cart.do-quantity-buttons div.quantity { - display: flex; - align-items: center; -} - -.woocommerce form .quantity.buttons-added .qty, -.woocommerce form .quantity.buttons-added .minus, -.woocommerce form .quantity.buttons-added .plus, -.do-quantity-buttons form .quantity:not(.buttons-added):not(.hidden):before, -.do-quantity-buttons form .quantity:not(.buttons-added):not(.hidden):after { - display: block; - width: 50px; - height: 100%; - min-height: 50px; - background-color: transparent; - border: 1px solid rgba(0, 0, 0, 0.1); - margin: 0; - padding: 0; - text-align: center; - vertical-align: middle; - -moz-appearance: textfield !important; - -webkit-appearance: none; - border-radius: 0; - color: inherit; - box-sizing: border-box; - text-decoration: none; -} - -.do-quantity-buttons form .quantity:not(.buttons-added):not(.hidden):before, -.do-quantity-buttons form .quantity:not(.buttons-added):not(.hidden):after, -.woocommerce form .quantity.buttons-added .minus, -.woocommerce form .quantity.buttons-added .plus { - display: flex; - align-items: center; - justify-content: center; -} - -.do-quantity-buttons form .quantity:not(.buttons-added):not(.hidden):before { - content: "-"; - border-right: 0; -} - -.do-quantity-buttons form .quantity:not(.buttons-added):not(.hidden):after { - content: "+"; - border-left: 0; -} - -.woocommerce form .quantity.buttons-added .qty:focus { - border-color: rgba(0, 0, 0, 0.1); -} - -.do-quantity-buttons form .quantity input[type=number]::-webkit-inner-spin-button, -.do-quantity-buttons form .quantity input[type=number]::-webkit-outer-spin-button { - -webkit-appearance: none; - margin: 0; -} - -.woocommerce form .quantity.buttons-added .minus, -.do-quantity-buttons form .quantity:not(.buttons-added):before { - border-right-width: 0; -} - -.woocommerce form .quantity.buttons-added .plus, -.do-quantity-buttons form .quantity:not(.buttons-added):after { - border-left-width: 0; -} - -.do-quantity-buttons .elementor-add-to-cart form .quantity:not(.buttons-added):before, -.do-quantity-buttons .elementor-add-to-cart form .quantity:not(.buttons-added):after, -.do-quantity-buttons form .quantity.hidden { - display: none; -} - -.woocommerce div.product form.cart div.quantity.hidden { - margin: 0; -} - -/*-------------------------------------------------------------- -## Tabs ---------------------------------------------------------------*/ -.woocommerce div.product .woocommerce-tabs ul.tabs li::after, -.woocommerce div.product .woocommerce-tabs ul.tabs li::before, -.woocommerce div.product .woocommerce-tabs ul.tabs::before { - display: none; - border: 0; -} - -.woocommerce div.product .woocommerce-tabs ul.tabs { - display: flex; - margin-left: 0; - padding-left: 0; -} - -.woocommerce div.product .woocommerce-tabs ul.tabs li { - background-color: rgba(0, 0, 0, 0.02); - margin: 0; - border-radius: 0; - border-width: 1px 1px 0 0; - border-color: rgba(0, 0, 0, 0.08); -} - -.woocommerce div.product .woocommerce-tabs ul.tabs li:first-child { - border-left-width: 1px; -} - -.woocommerce-ordering { - float: left; - margin-right: 1em; - margin-bottom: 0; - position: relative; - padding: 0; -} - -/*-------------------------------------------------------------- -# Menu Item ---------------------------------------------------------------*/ -nav li.wc-menu-item { - float: right; -} - -.cart-contents > span { - line-height: 0; -} - -.cart-contents > span:not(:empty) { - margin-left: 10px; -} - -.rtl .cart-contents > span:not(:empty) { - margin-left: 0; - margin-right: 10px; -} - -.cart-contents > span.gp-icon { - margin-left: 0; -} - -.rtl .cart-contents > span.gp-icon { - margin-right: 0; -} - -nav span.count { - font-size: 0.8em; - opacity: 0.5; -} - -/*-------------------------------------------------------------- -# Cart ---------------------------------------------------------------*/ -.woocommerce a.remove { - color: inherit !important; - background: transparent !important; - border: 1px solid !important; - border-color: inherit; - font-weight: normal; - font-size: 16px; - width: 20px; - height: 20px; - line-height: 17px; - font-family: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol" !important; -} - -.woocommerce a.remove:hover { - color: inherit !important; - background: transparent !important; - opacity: 0.7; -} - -.woocommerce .star-rating:before { - opacity: 0.25; - content: "SSSSS"; -} - -.woocommerce div.product .woocommerce-product-rating { - margin: 1em 0; -} - -.woocommerce div.product p.price, -.woocommerce div.product span.price { - color: inherit; -} - -.wc-has-gallery .secondary-image { - position: absolute; - opacity: 0; - transition: opacity 100ms ease-in-out; - left: 50%; - transform: translate(-50%, 0px); - top: 0; -} - -.wc-has-gallery picture.secondary-image { - width: 100%; - height: 100%; -} - -.wc-product-image:hover .secondary-image { - opacity: 1; -} - -.woocommerce ul.products li.product a img { - margin-bottom: 0; -} - -.woocommerce div.product .woocommerce-tabs ul.tabs li a, -.woocommerce div.product .woocommerce-tabs ul.tabs li.active a { - color: initial; -} - -.woocommerce ul.products li.product .price, .woocommerce div.product p.price { - font-weight: bold; -} - -div.woocommerce-message a.button, -div.woocommerce-message a.button:hover, -div.woocommerce-message a.button:focus, -div.woocommerce-info a.button, -div.woocommerce-info a.button:hover, -div.woocommerce-info a.button:focus, -div.woocommerce-error a.button, -div.woocommerce-error a.button:hover, -div.woocommerce-error a.button:focus { - background: transparent; - padding: 0; -} - -.woocommerce-error a, -.woocommerce-info a, -.woocommerce-message a { - font-weight: bold; -} - -.woocommerce-error, -.woocommerce-info, -.woocommerce-message { - padding: 20px 30px; - border: 0; - border-left: 10px solid rgba(0, 0, 0, 0.3); -} - -.woocommerce-message::before, -.woocommerce-info::before, -.woocommerce-error::before { - display: none; -} - -a.button.wc-forward:after { - content: "\e901"; - font-family: "GP Premium"; - line-height: 1em; - padding-left: 10px; - position: relative; - top: 2px; -} - -.rtl a.button.wc-forward:after { - display: none; -} - -.woocommerce-checkout .col2-set .col-2, -.woocommerce-checkout .col2-set .col-1 { - float: none; - width: 100%; - margin: 0; -} - -.woocommerce-checkout .col2-set { - width: 52.9411764706%; - float: left; - margin-right: 5.8823529412%; -} - -.rtl.woocommerce-checkout .col2-set { - float: right; - margin-right: 0; - margin-left: 5.8823529412%; -} - -#customer_details + #wc_checkout_add_ons, -#order_review, -#order_review_heading { - width: 41.1764705882%; - float: right; - margin-right: 0; -} - -.woocommerce-additional-fields > h3 { - margin-top: 20px; -} - -.woocommerce table.shop_table, -.woocommerce table.shop_table tfoot th, -.woocommerce table.shop_table tfoot td { - border: 0; - border-radius: 0; -} - -.woocommerce table.shop_table th { - background-color: rgba(0, 0, 0, 0.03); -} - -.woocommerce table.shop_table th, -.woocommerce table.shop_table td { - padding: 20px; - border: 0; -} - -.woocommerce table.shop_table td { - background-color: rgba(0, 0, 0, 0.005); - border-bottom: 1px solid rgba(0, 0, 0, 0.1); -} - -#add_payment_method .cart-collaterals .cart_totals tr td, -#add_payment_method .cart-collaterals .cart_totals tr th, -.woocommerce-cart .cart-collaterals .cart_totals tr td, -.woocommerce-cart .cart-collaterals .cart_totals tr th, -.woocommerce-checkout .cart-collaterals .cart_totals tr td, -.woocommerce-checkout .cart-collaterals .cart_totals tr th { - border-top: 0; -} - -#add_payment_method #payment, -.woocommerce-cart #payment, -.woocommerce-checkout #payment, -#add_payment_method #payment div.payment_box, -.woocommerce-cart #payment div.payment_box, -.woocommerce-checkout #payment div.payment_box { - background-color: transparent; - color: inherit; -} - -#add_payment_method #payment div.payment_box:before, -.woocommerce-cart #payment div.payment_box:before, -.woocommerce-checkout #payment div.payment_box:before { - display: none; -} - -#payment .payment_methods > .wc_payment_method > label { - padding: 20px; - background-color: rgba(0, 0, 0, 0.04); - display: block; - cursor: pointer; -} - -#payment .payment_methods li.wc_payment_method > input[type=radio]:first-child:checked + label { - font-weight: bold; - background-color: rgba(0, 0, 0, 0.07); -} - -#payment .payment_methods li.wc_payment_method > input[type=radio]:first-child { - clip: rect(1px, 1px, 1px, 1px); - position: absolute !important; -} - -#payment .payment_methods > .wc_payment_method > label:before { - display: inline-block; - font-size: inherit; - -webkit-font-smoothing: antialiased; - content: "\e902"; - margin-right: .5407911001em; - transition: color,ease,.2s; - font-family: "GP Premium"; -} - -#payment .payment_methods li.wc_payment_method > input[type=radio]:first-child:checked + label:before { - content: "\e904"; -} - -#add_payment_method #payment ul.payment_methods, -.woocommerce-cart #payment ul.payment_methods, -.woocommerce-checkout #payment ul.payment_methods { - padding: 0; - border: 0; -} - -.woocommerce #payment #place_order, -.woocommerce-page #payment #place_order { - float: none; - width: 100%; - padding-top: 20px; - padding-bottom: 20px; - font-weight: bold; - font-size: 150%; -} - -#add_payment_method #payment div.form-row, -.woocommerce-cart #payment div.form-row, -.woocommerce-checkout #payment div.form-row { - padding-left: 0; - padding-right: 0; - padding-top: 0; -} - -#add_payment_method #payment ul.payment_methods li img, -.woocommerce-cart #payment ul.payment_methods li img, -.woocommerce-checkout #payment ul.payment_methods li img { - float: right; -} - -#add_payment_method #payment .payment_method_paypal .about_paypal, -.woocommerce-cart #payment .payment_method_paypal .about_paypal, -.woocommerce-checkout #payment .payment_method_paypal .about_paypal { - float: none; - display: inline-block; - line-height: 1; -} - -a.checkout-button:after { - display: none; -} - -.woocommerce #content table.cart td.actions .input-text, -.woocommerce table.cart td.actions .input-text, -.woocommerce-page #content table.cart td.actions .input-text, -.woocommerce-page table.cart td.actions .input-text { - width: 150px; - padding: 10px 15px; -} - -.woocommerce .coupon .button { - border: 1px solid transparent; -} - -.woocommerce ul.products li.product .woocommerce-product-details__short-description p:last-child { - margin-bottom: 0; -} - -.wc-product-image { - text-align: center; -} - -.woocommerce-text-align-left .wc-product-image { - text-align: left; -} - -.woocommerce-text-align-right .wc-product-image { - text-align: right; -} - -.inside-wc-product-image { - position: relative; - display: inline-block; -} - -.woocommerce ul.products li.product.woocommerce-image-align-left .wc-product-image { - float: left; - margin-right: 2em; -} - -.woocommerce ul.products li.product.woocommerce-image-align-right .wc-product-image { - float: right; - margin-left: 2em; -} - -.woocommerce ul.products li.product.woocommerce-image-align-left a .wc-product-image img, -.woocommerce ul.products li.product.woocommerce-image-align-right a .wc-product-image img { - width: auto; -} - -.woocommerce-cart ul.products li.product.woocommerce-image-align-left .wc-product-image, -.woocommerce-cart ul.products li.product.woocommerce-image-align-right .wc-product-image { - float: none; - margin: 0; -} - -.woocommerce-cart ul.products li.product.woocommerce-image-align-left a .wc-product-image img, -.woocommerce-cart ul.products li.product.woocommerce-image-align-right a .wc-product-image img { - width: 100%; -} - -.woocommerce .widget_price_filter .price_slider_amount .button { - font-size: 1em; - line-height: normal; -} - -.woocommerce .related ul.products li.product a img, -.woocommerce .up-sells ul.products li.product a img { - margin-bottom: 0; -} - -.woocommerce-review-link { - font-size: 80%; -} - -.woocommerce-Reviews .comment-reply-title { - font-size: 120%; - font-weight: bold; - display: block; - margin-bottom: 10px; -} - -.woocommerce-MyAccount-navigation ul { - margin: 0; - border-top: 1px solid rgba(0, 0, 0, 0.1); -} - -.site-main .woocommerce-MyAccount-navigation li { - margin: 0; - padding: 0; -} - -.woocommerce-MyAccount-navigation li a { - display: block; - padding: 20px 0; - border-bottom: 1px solid rgba(0, 0, 0, 0.1); - font-size: 85%; -} - -.woocommerce-MyAccount-navigation li.is-active a { - font-weight: bold; -} - -.woocommerce-MyAccount-navigation li a:hover { - border-bottom: 1px solid rgba(0, 0, 0, 0.2); -} - -.woocommerce-MyAccount-navigation li.is-active a:after { - font-family: "GP Premium"; - content: "\e901"; - float: right; - font-weight: bold; - font-size: 115%; -} - -.woocommerce-account .woocommerce-MyAccount-navigation { - width: 25%; -} - -.woocommerce #payment .terms { - padding: 20px; -} - -h2.woocommerce-loop-category__title mark { - background: none; - font-size: 80%; - opacity: 0.5; -} - -.woocommerce form.checkout_coupon, -.woocommerce form.login, -.woocommerce form.register { - padding: 0; - margin: 0 0 1.5em; - border: 0; -} - -#ship-to-different-address { - padding: 3px; - font-size: inherit; -} - -.woocommerce-image-align-left .products ul, -.woocommerce-image-align-left ul.products, -.woocommerce-image-align-left .products ul:after, -.woocommerce-image-align-left ul.products:after, -.woocommerce-image-align-right .products ul, -.woocommerce-image-align-right ul.products, -.woocommerce-image-align-right .products ul:after, -.woocommerce-image-align-right ul.products:after { - clear: none; -} - -.woocommerce nav.woocommerce-pagination { - margin-top: 60px; - clear: both; -} - -.woocommerce input.button:disabled, -.woocommerce input.button:disabled[disabled], -.woocommerce input.button:disabled:hover, -.woocommerce input.button:disabled[disabled]:hover { - background-color: transparent; - color: initial; - opacity: 0.3; -} - -.entry-summary + .up-sells { - clear: both; -} - -.woocommerce form .form-row input.input-text, -.woocommerce form .form-row textarea { - line-height: 1.5; -} - -.main-navigation a.cart-contents:not(.has-svg-icon):before, -.secondary-navigation a.cart-contents:not(.has-svg-icon):before { - content: "\f07a"; - display: inline-block; - font-family: "GP Premium"; - font-style: normal; - font-weight: normal; - font-variant: normal; - text-transform: none; - line-height: 1; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; -} - -.main-navigation a.cart-contents:not(.has-svg-icon).shopping-bag:before, -.secondary-navigation a.cart-contents:not(.has-svg-icon).shopping-bag:before { - content: "\f290"; -} - -.main-navigation a.cart-contents:not(.has-svg-icon).shopping-basket:before, -.secondary-navigation a.cart-contents:not(.has-svg-icon).shopping-basket:before { - content: "\f291"; -} - -.cart-contents > span.number-of-items { - font-size: 11px; - display: inline-block; - background: rgba(255, 255, 255, 0.1); - line-height: 1.7em; - height: 1.7em; - width: 1.7em; - text-align: center; - border-radius: 50%; - margin-left: 5px; - position: relative; - top: -5px; - display: none; -} - -.cart-contents > span.number-of-items.no-items { - display: none; -} - -.woocommerce-MyAccount-navigation ul { - list-style-type: none; -} - -/* Fix BlockUI */ -form.checkout:after, -form.checkout:before { - content: ''; - display: table; -} - -form.checkout:after { - clear: both; -} - -/* Add to Cart panel */ -.add-to-cart-panel { - position: fixed; - top: 0; - left: 0; - right: 0; - background: #fff; - padding: 20px; - opacity: 0; - transition: opacity 500ms ease-in-out, transform 500ms ease-in-out; - box-shadow: 0 2px 2px -2px rgba(0, 0, 0, 0.2); - z-index: 101; - font-size: 90%; - box-sizing: border-box; - transform: translateY(-100%); -} - -.add-to-cart-panel.item-added, -.add-to-cart-panel.show-sticky-add-to-cart { - opacity: 1; -} - -.add-to-cart-panel > div { - display: flex; - align-items: center; -} - -.add-to-cart-panel .continue-shopping { - margin-right: auto; -} - -.add-to-cart-panel .continue-shopping .gp-icon { - display: none; -} - -.add-to-cart-panel .cart-info { - margin-right: 20px; -} - -.add-to-cart-panel img { - height: 50px; - width: auto; - vertical-align: middle; -} - -.add-to-cart-panel .product-title { - margin-left: 20px; - margin-right: auto; - font-weight: 600; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; -} - -.add-to-cart-panel .product-price { - margin-right: 20px; -} - -.add-to-cart-panel div.quantity { - margin-right: 4px; -} - -.add-to-cart-panel .cart-data { - font-size: 12px; -} - -.add-to-cart-panel del { - opacity: 0.4; -} - -.do-quantity-buttons input.qty::-webkit-outer-spin-button, -.do-quantity-buttons input.qty::-webkit-inner-spin-button { - -webkit-appearance: none; -} - -.wc-menu-cart-activated .menu-toggle { - text-align: left; -} - -.woocommerce-order-received .woocommerce-customer-details .col2-set { - float: none; - width: auto; -} - -.woocommerce-order-received .woocommerce-customer-details .col2-set .col-1 { - margin-bottom: 1.5em; -} diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/woocommerce/functions/css/woocommerce.min.css b/wp-content/upgrade-temp-backup/plugins/gp-premium/woocommerce/functions/css/woocommerce.min.css deleted file mode 100644 index 4533dae1..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/woocommerce/functions/css/woocommerce.min.css +++ /dev/null @@ -1 +0,0 @@ -@supports (display:grid){.woocommerce ul.products li.product{display:flex;flex-direction:column}}.woocommerce ul.products li.product.woocommerce-image-align-left,.woocommerce ul.products li.product.woocommerce-image-align-right{display:block}.woocommerce ul.products li.product .woocommerce-LoopProduct-link{display:block;margin-bottom:auto}.woocommerce ul.products li.product .button{margin-left:auto;margin-right:auto}.woocommerce ul.products li.product.woocommerce-text-align-left .button{margin-left:0}.woocommerce ul.products li.product.woocommerce-text-align-right .button{margin-right:0}.woocommerce ul.products li.product .woocommerce-LoopProduct-link>:not(:first-child){margin-top:10px;margin-bottom:0}.woocommerce ul.products li.product .woocommerce-LoopProduct-link>.secondary-image+img{margin-top:0}.woocommerce span.onsale,.woocommerce ul.products li.product .onsale{position:relative;border-radius:0;min-height:15px;min-width:initial;font-weight:inherit;font-size:inherit;padding:8px 13px;line-height:1;display:inline-block;top:auto;left:auto;font-size:80%;text-transform:uppercase;font-weight:700}.woocommerce ul.products li.product.sales-flash-overlay .onsale{position:absolute;top:0;right:0;margin:0}.single-product span.onsale{margin-bottom:15px}.woocommerce-product-gallery{margin-right:4%}.rtl .woocommerce-product-gallery{margin-right:0;margin-left:4%}.woocommerce div.product div.images .flex-control-thumbs li{max-width:100px;padding-top:5px;padding-right:5px;box-sizing:border-box}.woocommerce ul.products li.product .woocommerce-loop-product__title{padding:0}.woocommerce .page-header-image-single{display:none}.woocommerce .entry-content,.woocommerce .product .entry-summary{margin-top:0}.related.products{clear:both}.checkout-subscribe-prompt.clear{visibility:visible;height:initial;width:initial}.woocommerce .add_to_cart_button+.added_to_cart{display:none}.woocommerce-result-count{font-size:14px;padding:10px 0;border:1px solid transparent}.woocommerce-ordering select{font-size:14px;font-weight:500;padding:10px 40px 10px 12px;-webkit-appearance:none;-moz-appearance:none;width:100%;background:0 0;border-color:rgba(0,0,0,.1);color:inherit;cursor:pointer}.woocommerce-ordering select::-ms-expand{display:none}.woocommerce-ordering:after{content:"\e903";font-family:"GP Premium";display:inline-block;position:absolute;pointer-events:none;color:inherit;top:10px;right:15px;font-size:16px}.woocommerce-ordering select option{color:initial}.woocommerce .woocommerce-ordering,.woocommerce .woocommerce-result-count{margin-bottom:30px}.woocommerce-variation-add-to-cart{display:flex;flex-wrap:wrap}@supports (display:grid){#wc-column-container .product{float:none;width:auto;margin:0}.woocommerce .related ul.products::after,.woocommerce .related ul.products::before,.woocommerce .up-sells ul.products::after,.woocommerce .up-sells ul.products::before,.woocommerce .wc-columns-container .products::after,.woocommerce .wc-columns-container .products::before{display:none}.wc-columns-container .products,.woocommerce .related ul.products,.woocommerce .up-sells ul.products{display:-ms-grid;display:grid;grid-gap:50px;width:100%}.wc-columns-container.wc-columns-6 .products,.wc-related-upsell-columns-6 .related ul.products,.wc-related-upsell-columns-6 .up-sells ul.products{grid-template-columns:repeat(6,minmax(0,1fr))}.wc-columns-container.wc-columns-5 .products,.wc-related-upsell-columns-5 .related ul.products,.wc-related-upsell-columns-5 .up-sells ul.products{grid-template-columns:repeat(5,minmax(0,1fr))}.wc-related-upsell-columns-4 .related ul.products,.wc-related-upsell-columns-4 .up-sells ul.products,.woocommerce .wc-columns-container.wc-columns-4 .products{grid-template-columns:repeat(4,minmax(0,1fr))}.wc-related-upsell-columns-3 .related ul.products,.wc-related-upsell-columns-3 .up-sells ul.products,.woocommerce .wc-columns-container.wc-columns-3 .products{grid-template-columns:repeat(3,minmax(0,1fr))}.wc-related-upsell-columns-2 .related ul.products,.wc-related-upsell-columns-2 .up-sells ul.products,.woocommerce .wc-columns-container.wc-columns-2 .products{grid-template-columns:repeat(2,minmax(0,1fr))}.wc-related-upsell-columns-1 .related ul.products,.wc-related-upsell-columns-1 .up-sells ul.products,.woocommerce .wc-columns-container.wc-columns-1 .products{width:100%}.woocommerce .wc-columns-1 ul.products li.product,.woocommerce-page .wc-columns-1 ul.products li.product{margin-left:0;margin-right:0}}#wc-mini-cart ul.woocommerce-mini-cart{position:relative;left:auto;right:auto;opacity:1;pointer-events:auto;height:auto;width:auto;float:none;background-color:transparent;box-shadow:0 0 0;visibility:visible}.wc-mini-cart{position:absolute;width:300px;right:0;box-shadow:0 2px 2px rgba(0,0,0,.1);z-index:99999;left:-99999px;opacity:0;height:0;overflow:hidden;pointer-events:none;transition:opacity 80ms linear;transition-delay:0s;visibility:hidden}.wc-menu-item.sfHover .wc-mini-cart,.wc-menu-item:hover .wc-mini-cart{left:auto;opacity:1;transition-delay:150ms;pointer-events:auto;height:auto;overflow:visible;visibility:visible}.dropdown-click ul li.wc-menu-item:hover ul{display:block}.sidebar .wc-mini-cart{right:100%;top:0}.sidebar .wc-mini-cart .widget{background:0 0}body:not(.using-mouse) .wc-menu-item.sfHover .wc-mini-cart{display:none}.wc-menu-item .sub-menu{left:auto;right:0;width:300px}.wc-menu-item .wc-mini-cart .widget_shopping_cart_content li.sfHover a,.wc-menu-item .wc-mini-cart .widget_shopping_cart_content li:hover a{background:0 0}.wc-menu-item .wc-mini-cart .widget_shopping_cart{padding:15px}.woocommerce.widget_shopping_cart .cart_list li{padding:0 0 0 4em;margin:0;box-sizing:border-box;min-height:3em}.woocommerce.widget_shopping_cart{font-size:14px}.widget_shopping_cart .woocommerce-mini-cart__buttons{margin-bottom:0;display:flex}.woocommerce.widget_shopping_cart .woocommerce-mini-cart__buttons a{margin:0;width:calc(50% - 10px);text-align:center;padding:10px 15px;line-height:inherit;font-size:14px}.woocommerce.widget_shopping_cart .woocommerce-mini-cart__buttons a:first-child{margin-right:2px}.woocommerce.widget_shopping_cart .woocommerce-mini-cart__buttons a:last-child{margin-left:2px}.woocommerce.widget_shopping_cart .cart_list li a.remove{right:0;left:auto;height:20px;width:20px;border-width:1px;border-style:solid;border-radius:50%;padding:0;font-size:16px;line-height:17px;font-weight:400;position:relative;float:right}.woocommerce ul.cart_list li img{position:absolute;left:0;width:3em;height:auto;top:0;margin-left:0}#wc-mini-cart .woocommerce-mini-cart-item a{padding:0}.woocommerce-mini-cart-item .quantity{font-size:12px;display:block}.woocommerce.widget_shopping_cart .total{margin:15px 0;padding:15px;background:rgba(0,0,0,.05);border:0;font-size:14px}#wc-mini-cart .total{padding:15px;margin:15px -15px 15px;text-align:left}#generate-slideout-menu .total{padding:10px 20px;margin:20px -20px 20px}#generate-slideout-menu.do-overlay .total{margin:20px 0}.woocommerce.widget_shopping_cart a.button.wc-forward:after{display:none}.woocommerce.widget_shopping_cart .cart_list li.woocommerce-mini-cart-item:not(:last-child){margin-bottom:15px}.rtl .wc-mini-cart .woocommerce.widget_shopping_cart .cart_list li{padding:0 4em 0 0}.rtl .wc-mini-cart .woocommerce.widget_shopping_cart .cart_list li a.remove{float:left}.rtl .wc-mini-cart .woocommerce ul.cart_list li img{right:0}.slideout-widget .widget_shopping_cart_content,.slideout-widget .widget_shopping_cart_content a{font-size:14px}#generate-slideout-menu.do-overlay li.woocommerce-mini-cart-item{text-align:left}#wc-mini-cart a:not(.button){font-family:inherit}.wc-menu-item:not(.has-items) .wc-mini-cart{display:none}.woocommerce-mini-cart__empty-message{margin-bottom:0}.secondary-nav-aligned-center .secondary-navigation ul.woocommerce-mini-cart,.secondary-nav-aligned-right .secondary-navigation ul.woocommerce-mini-cart{font-size:inherit}#wc-mini-cart .widgettitle{display:none}@supports (display:grid){.woocommerce .related ul.products li.product,.woocommerce .up-sells ul.products li.product{width:auto;margin-left:0;margin-right:0;margin-bottom:0}}.woocommerce #respond input#submit,.woocommerce a.button,.woocommerce button.button,.woocommerce input.button{border-radius:0;font-weight:inherit;font-size:inherit;line-height:inherit;padding:10px 20px}ul.products .woocommerce-text-align-center{text-align:center}ul.products li.product.woocommerce-text-align-center .price,ul.products li.product.woocommerce-text-align-center .star-rating{margin-left:auto;margin-right:auto}ul.products li.product.woocommerce-text-align-right .price,ul.products li.product.woocommerce-text-align-right .star-rating{margin-left:auto}.woocommerce .star-rating:before{color:rgba(0,0,0,.4)}.woocommerce p.stars a{color:rgba(0,0,0,.4)}.woocommerce p.stars.selected a:before{color:#ffa200}.woocommerce ul.products li.product .price del{display:inline;padding-right:10px}ul.products .woocommerce-text-align-right{text-align:right}.woocommerce #content div.product div.images,.woocommerce div.product div.images,.woocommerce-page #content div.product div.images,.woocommerce-page div.product div.images{width:50%}.woocommerce #content div.product div.summary,.woocommerce div.product div.summary,.woocommerce-page #content div.product div.summary,.woocommerce-page div.product div.summary{width:auto;float:none;overflow:hidden}.product_meta{font-size:80%;border-top:1px solid rgba(0,0,0,.1);padding-top:30px}.product_meta>span{display:block}.up-sells{margin-top:40px}.add-to-cart-panel form.cart,.woocommerce div.product.do-quantity-buttons form.cart{display:flex;flex-wrap:wrap}.woocommerce div.product form.cart>:not(.quantity):not(.single_add_to_cart_button){width:100%}.add-to-cart-panel form.cart{flex-shrink:0}.woocommerce .quantity .qty{height:100%;width:auto;max-width:80px;background:0 0;border:1px solid rgba(0,0,0,.1);padding:0 10px;height:50px}.do-quantity-buttons .quantity:not(.buttons-added) .qty{width:50px}.add-to-cart-panel .cart.do-quantity-buttons div.quantity,.do-quantity-buttons div.quantity{display:flex;align-items:center}.do-quantity-buttons form .quantity:not(.buttons-added):not(.hidden):after,.do-quantity-buttons form .quantity:not(.buttons-added):not(.hidden):before,.woocommerce form .quantity.buttons-added .minus,.woocommerce form .quantity.buttons-added .plus,.woocommerce form .quantity.buttons-added .qty{display:block;width:50px;height:100%;min-height:50px;background-color:transparent;border:1px solid rgba(0,0,0,.1);margin:0;padding:0;text-align:center;vertical-align:middle;-moz-appearance:textfield!important;-webkit-appearance:none;border-radius:0;color:inherit;box-sizing:border-box;text-decoration:none}.do-quantity-buttons form .quantity:not(.buttons-added):not(.hidden):after,.do-quantity-buttons form .quantity:not(.buttons-added):not(.hidden):before,.woocommerce form .quantity.buttons-added .minus,.woocommerce form .quantity.buttons-added .plus{display:flex;align-items:center;justify-content:center}.do-quantity-buttons form .quantity:not(.buttons-added):not(.hidden):before{content:"-";border-right:0}.do-quantity-buttons form .quantity:not(.buttons-added):not(.hidden):after{content:"+";border-left:0}.woocommerce form .quantity.buttons-added .qty:focus{border-color:rgba(0,0,0,.1)}.do-quantity-buttons form .quantity input[type=number]::-webkit-inner-spin-button,.do-quantity-buttons form .quantity input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.do-quantity-buttons form .quantity:not(.buttons-added):before,.woocommerce form .quantity.buttons-added .minus{border-right-width:0}.do-quantity-buttons form .quantity:not(.buttons-added):after,.woocommerce form .quantity.buttons-added .plus{border-left-width:0}.do-quantity-buttons .elementor-add-to-cart form .quantity:not(.buttons-added):after,.do-quantity-buttons .elementor-add-to-cart form .quantity:not(.buttons-added):before,.do-quantity-buttons form .quantity.hidden{display:none}.woocommerce div.product form.cart div.quantity.hidden{margin:0}.woocommerce div.product .woocommerce-tabs ul.tabs li::after,.woocommerce div.product .woocommerce-tabs ul.tabs li::before,.woocommerce div.product .woocommerce-tabs ul.tabs::before{display:none;border:0}.woocommerce div.product .woocommerce-tabs ul.tabs{display:flex;margin-left:0;padding-left:0}.woocommerce div.product .woocommerce-tabs ul.tabs li{background-color:rgba(0,0,0,.02);margin:0;border-radius:0;border-width:1px 1px 0 0;border-color:rgba(0,0,0,.08)}.woocommerce div.product .woocommerce-tabs ul.tabs li:first-child{border-left-width:1px}.woocommerce-ordering{float:left;margin-right:1em;margin-bottom:0;position:relative;padding:0}nav li.wc-menu-item{float:right}.cart-contents>span{line-height:0}.cart-contents>span:not(:empty){margin-left:10px}.rtl .cart-contents>span:not(:empty){margin-left:0;margin-right:10px}.cart-contents>span.gp-icon{margin-left:0}.rtl .cart-contents>span.gp-icon{margin-right:0}nav span.count{font-size:.8em;opacity:.5}.woocommerce a.remove{color:inherit!important;background:0 0!important;border:1px solid!important;border-color:inherit;font-weight:400;font-size:16px;width:20px;height:20px;line-height:17px;font-family:-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol"!important}.woocommerce a.remove:hover{color:inherit!important;background:0 0!important;opacity:.7}.woocommerce .star-rating:before{opacity:.25;content:"SSSSS"}.woocommerce div.product .woocommerce-product-rating{margin:1em 0}.woocommerce div.product p.price,.woocommerce div.product span.price{color:inherit}.wc-has-gallery .secondary-image{position:absolute;opacity:0;transition:opacity .1s ease-in-out;left:50%;transform:translate(-50%,0);top:0}.wc-has-gallery picture.secondary-image{width:100%;height:100%}.wc-product-image:hover .secondary-image{opacity:1}.woocommerce ul.products li.product a img{margin-bottom:0}.woocommerce div.product .woocommerce-tabs ul.tabs li a,.woocommerce div.product .woocommerce-tabs ul.tabs li.active a{color:initial}.woocommerce div.product p.price,.woocommerce ul.products li.product .price{font-weight:700}div.woocommerce-error a.button,div.woocommerce-error a.button:focus,div.woocommerce-error a.button:hover,div.woocommerce-info a.button,div.woocommerce-info a.button:focus,div.woocommerce-info a.button:hover,div.woocommerce-message a.button,div.woocommerce-message a.button:focus,div.woocommerce-message a.button:hover{background:0 0;padding:0}.woocommerce-error a,.woocommerce-info a,.woocommerce-message a{font-weight:700}.woocommerce-error,.woocommerce-info,.woocommerce-message{padding:20px 30px;border:0;border-left:10px solid rgba(0,0,0,.3)}.woocommerce-error::before,.woocommerce-info::before,.woocommerce-message::before{display:none}a.button.wc-forward:after{content:"\e901";font-family:"GP Premium";line-height:1em;padding-left:10px;position:relative;top:2px}.rtl a.button.wc-forward:after{display:none}.woocommerce-checkout .col2-set .col-1,.woocommerce-checkout .col2-set .col-2{float:none;width:100%;margin:0}.woocommerce-checkout .col2-set{width:52.9411764706%;float:left;margin-right:5.8823529412%}.rtl.woocommerce-checkout .col2-set{float:right;margin-right:0;margin-left:5.8823529412%}#customer_details+#wc_checkout_add_ons,#order_review,#order_review_heading{width:41.1764705882%;float:right;margin-right:0}.woocommerce-additional-fields>h3{margin-top:20px}.woocommerce table.shop_table,.woocommerce table.shop_table tfoot td,.woocommerce table.shop_table tfoot th{border:0;border-radius:0}.woocommerce table.shop_table th{background-color:rgba(0,0,0,.03)}.woocommerce table.shop_table td,.woocommerce table.shop_table th{padding:20px;border:0}.woocommerce table.shop_table td{background-color:rgba(0,0,0,.005);border-bottom:1px solid rgba(0,0,0,.1)}#add_payment_method .cart-collaterals .cart_totals tr td,#add_payment_method .cart-collaterals .cart_totals tr th,.woocommerce-cart .cart-collaterals .cart_totals tr td,.woocommerce-cart .cart-collaterals .cart_totals tr th,.woocommerce-checkout .cart-collaterals .cart_totals tr td,.woocommerce-checkout .cart-collaterals .cart_totals tr th{border-top:0}#add_payment_method #payment,#add_payment_method #payment div.payment_box,.woocommerce-cart #payment,.woocommerce-cart #payment div.payment_box,.woocommerce-checkout #payment,.woocommerce-checkout #payment div.payment_box{background-color:transparent;color:inherit}#add_payment_method #payment div.payment_box:before,.woocommerce-cart #payment div.payment_box:before,.woocommerce-checkout #payment div.payment_box:before{display:none}#payment .payment_methods>.wc_payment_method>label{padding:20px;background-color:rgba(0,0,0,.04);display:block;cursor:pointer}#payment .payment_methods li.wc_payment_method>input[type=radio]:first-child:checked+label{font-weight:700;background-color:rgba(0,0,0,.07)}#payment .payment_methods li.wc_payment_method>input[type=radio]:first-child{clip:rect(1px,1px,1px,1px);position:absolute!important}#payment .payment_methods>.wc_payment_method>label:before{display:inline-block;font-size:inherit;-webkit-font-smoothing:antialiased;content:"\e902";margin-right:.5407911001em;transition:color,ease,.2s;font-family:"GP Premium"}#payment .payment_methods li.wc_payment_method>input[type=radio]:first-child:checked+label:before{content:"\e904"}#add_payment_method #payment ul.payment_methods,.woocommerce-cart #payment ul.payment_methods,.woocommerce-checkout #payment ul.payment_methods{padding:0;border:0}.woocommerce #payment #place_order,.woocommerce-page #payment #place_order{float:none;width:100%;padding-top:20px;padding-bottom:20px;font-weight:700;font-size:150%}#add_payment_method #payment div.form-row,.woocommerce-cart #payment div.form-row,.woocommerce-checkout #payment div.form-row{padding-left:0;padding-right:0;padding-top:0}#add_payment_method #payment ul.payment_methods li img,.woocommerce-cart #payment ul.payment_methods li img,.woocommerce-checkout #payment ul.payment_methods li img{float:right}#add_payment_method #payment .payment_method_paypal .about_paypal,.woocommerce-cart #payment .payment_method_paypal .about_paypal,.woocommerce-checkout #payment .payment_method_paypal .about_paypal{float:none;display:inline-block;line-height:1}a.checkout-button:after{display:none}.woocommerce #content table.cart td.actions .input-text,.woocommerce table.cart td.actions .input-text,.woocommerce-page #content table.cart td.actions .input-text,.woocommerce-page table.cart td.actions .input-text{width:150px;padding:10px 15px}.woocommerce .coupon .button{border:1px solid transparent}.woocommerce ul.products li.product .woocommerce-product-details__short-description p:last-child{margin-bottom:0}.wc-product-image{text-align:center}.woocommerce-text-align-left .wc-product-image{text-align:left}.woocommerce-text-align-right .wc-product-image{text-align:right}.inside-wc-product-image{position:relative;display:inline-block}.woocommerce ul.products li.product.woocommerce-image-align-left .wc-product-image{float:left;margin-right:2em}.woocommerce ul.products li.product.woocommerce-image-align-right .wc-product-image{float:right;margin-left:2em}.woocommerce ul.products li.product.woocommerce-image-align-left a .wc-product-image img,.woocommerce ul.products li.product.woocommerce-image-align-right a .wc-product-image img{width:auto}.woocommerce-cart ul.products li.product.woocommerce-image-align-left .wc-product-image,.woocommerce-cart ul.products li.product.woocommerce-image-align-right .wc-product-image{float:none;margin:0}.woocommerce-cart ul.products li.product.woocommerce-image-align-left a .wc-product-image img,.woocommerce-cart ul.products li.product.woocommerce-image-align-right a .wc-product-image img{width:100%}.woocommerce .widget_price_filter .price_slider_amount .button{font-size:1em;line-height:normal}.woocommerce .related ul.products li.product a img,.woocommerce .up-sells ul.products li.product a img{margin-bottom:0}.woocommerce-review-link{font-size:80%}.woocommerce-Reviews .comment-reply-title{font-size:120%;font-weight:700;display:block;margin-bottom:10px}.woocommerce-MyAccount-navigation ul{margin:0;border-top:1px solid rgba(0,0,0,.1)}.site-main .woocommerce-MyAccount-navigation li{margin:0;padding:0}.woocommerce-MyAccount-navigation li a{display:block;padding:20px 0;border-bottom:1px solid rgba(0,0,0,.1);font-size:85%}.woocommerce-MyAccount-navigation li.is-active a{font-weight:700}.woocommerce-MyAccount-navigation li a:hover{border-bottom:1px solid rgba(0,0,0,.2)}.woocommerce-MyAccount-navigation li.is-active a:after{font-family:"GP Premium";content:"\e901";float:right;font-weight:700;font-size:115%}.woocommerce-account .woocommerce-MyAccount-navigation{width:25%}.woocommerce #payment .terms{padding:20px}h2.woocommerce-loop-category__title mark{background:0 0;font-size:80%;opacity:.5}.woocommerce form.checkout_coupon,.woocommerce form.login,.woocommerce form.register{padding:0;margin:0 0 1.5em;border:0}#ship-to-different-address{padding:3px;font-size:inherit}.woocommerce-image-align-left .products ul,.woocommerce-image-align-left .products ul:after,.woocommerce-image-align-left ul.products,.woocommerce-image-align-left ul.products:after,.woocommerce-image-align-right .products ul,.woocommerce-image-align-right .products ul:after,.woocommerce-image-align-right ul.products,.woocommerce-image-align-right ul.products:after{clear:none}.woocommerce nav.woocommerce-pagination{margin-top:60px;clear:both}.woocommerce input.button:disabled,.woocommerce input.button:disabled:hover,.woocommerce input.button:disabled[disabled],.woocommerce input.button:disabled[disabled]:hover{background-color:transparent;color:initial;opacity:.3}.entry-summary+.up-sells{clear:both}.woocommerce form .form-row input.input-text,.woocommerce form .form-row textarea{line-height:1.5}.main-navigation a.cart-contents:not(.has-svg-icon):before,.secondary-navigation a.cart-contents:not(.has-svg-icon):before{content:"\f07a";display:inline-block;font-family:"GP Premium";font-style:normal;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.main-navigation a.cart-contents:not(.has-svg-icon).shopping-bag:before,.secondary-navigation a.cart-contents:not(.has-svg-icon).shopping-bag:before{content:"\f290"}.main-navigation a.cart-contents:not(.has-svg-icon).shopping-basket:before,.secondary-navigation a.cart-contents:not(.has-svg-icon).shopping-basket:before{content:"\f291"}.cart-contents>span.number-of-items{font-size:11px;display:inline-block;background:rgba(255,255,255,.1);line-height:1.7em;height:1.7em;width:1.7em;text-align:center;border-radius:50%;margin-left:5px;position:relative;top:-5px;display:none}.cart-contents>span.number-of-items.no-items{display:none}.woocommerce-MyAccount-navigation ul{list-style-type:none}form.checkout:after,form.checkout:before{content:'';display:table}form.checkout:after{clear:both}.add-to-cart-panel{position:fixed;top:0;left:0;right:0;background:#fff;padding:20px;opacity:0;transition:opacity .5s ease-in-out,transform .5s ease-in-out;box-shadow:0 2px 2px -2px rgba(0,0,0,.2);z-index:101;font-size:90%;box-sizing:border-box;transform:translateY(-100%)}.add-to-cart-panel.item-added,.add-to-cart-panel.show-sticky-add-to-cart{opacity:1}.add-to-cart-panel>div{display:flex;align-items:center}.add-to-cart-panel .continue-shopping{margin-right:auto}.add-to-cart-panel .continue-shopping .gp-icon{display:none}.add-to-cart-panel .cart-info{margin-right:20px}.add-to-cart-panel img{height:50px;width:auto;vertical-align:middle}.add-to-cart-panel .product-title{margin-left:20px;margin-right:auto;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.add-to-cart-panel .product-price{margin-right:20px}.add-to-cart-panel div.quantity{margin-right:4px}.add-to-cart-panel .cart-data{font-size:12px}.add-to-cart-panel del{opacity:.4}.do-quantity-buttons input.qty::-webkit-inner-spin-button,.do-quantity-buttons input.qty::-webkit-outer-spin-button{-webkit-appearance:none}.wc-menu-cart-activated .menu-toggle{text-align:left}.woocommerce-order-received .woocommerce-customer-details .col2-set{float:none;width:auto}.woocommerce-order-received .woocommerce-customer-details .col2-set .col-1{margin-bottom:1.5em} \ No newline at end of file diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/woocommerce/functions/customizer/customizer.php b/wp-content/upgrade-temp-backup/plugins/gp-premium/woocommerce/functions/customizer/customizer.php deleted file mode 100644 index a03e0370..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/woocommerce/functions/customizer/customizer.php +++ /dev/null @@ -1,1031 +0,0 @@ -register_control_type( 'GeneratePress_Title_Customize_Control' ); - $wp_customize->register_control_type( 'GeneratePress_Pro_Range_Slider_Control' ); - $wp_customize->register_control_type( 'GeneratePress_Information_Customize_Control' ); - $wp_customize->register_control_type( 'GeneratePress_Section_Shortcut_Control' ); - } - - $wp_customize->add_section( - 'generate_woocommerce_layout', - array( - 'title' => __( 'WooCommerce', 'gp-premium' ), - 'capability' => 'edit_theme_options', - 'priority' => 100, - 'panel' => 'generate_layout_panel' - ) - ); - - $wp_customize->add_control( - new GeneratePress_Section_Shortcut_Control( - $wp_customize, - 'generate_woocommerce_layout_shortcuts', - array( - 'section' => 'generate_woocommerce_layout', - 'element' => __( 'WooCommerce', 'gp-premium' ), - 'shortcuts' => array( - 'colors' => 'generate_woocommerce_colors', - 'typography' => 'generate_woocommerce_typography', - ), - 'settings' => ( isset( $wp_customize->selective_refresh ) ) ? array() : 'blogname', - 'priority' => 0, - ) - ) - ); - - $wp_customize->add_control( - new GeneratePress_Title_Customize_Control( - $wp_customize, - 'generate_woocommerce_general_title', - array( - 'section' => 'generate_woocommerce_layout', - 'type' => 'generatepress-customizer-title', - 'title' => __( 'General', 'gp-premium' ), - 'settings' => ( isset( $wp_customize->selective_refresh ) ) ? array() : 'blogname' - ) - ) - ); - - $wp_customize->add_setting( - 'generate_woocommerce_settings[cart_menu_item]', - array( - 'default' => $defaults['cart_menu_item'], - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_checkbox' - ) - ); - - $wp_customize->add_control( - 'generate_woocommerce_settings[cart_menu_item]', - array( - 'type' => 'checkbox', - 'label' => __( 'Display cart in menu', 'gp-premium' ), - 'section' => 'generate_woocommerce_layout', - 'settings' => 'generate_woocommerce_settings[cart_menu_item]', - ) - ); - - $wp_customize->add_setting( - 'generate_woocommerce_settings[menu_mini_cart]', - array( - 'default' => $defaults['menu_mini_cart'], - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_checkbox' - ) - ); - - $wp_customize->add_control( - 'generate_woocommerce_settings[menu_mini_cart]', - array( - 'type' => 'checkbox', - 'label' => __( 'Display mini cart sub-menu', 'gp-premium' ), - 'section' => 'generate_woocommerce_layout', - 'settings' => 'generate_woocommerce_settings[menu_mini_cart]', - 'active_callback' => 'generate_premium_wc_menu_item_active', - ) - ); - - $wp_customize->add_setting( - 'generate_woocommerce_settings[cart_menu_item_icon]', - array( - 'default' => $defaults['cart_menu_item_icon'], - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_choices' - ) - ); - - $wp_customize->add_control( - 'generate_woocommerce_settings[cart_menu_item_icon]', - array( - 'type' => 'select', - 'label' => __( 'Menu Item Icon', 'gp-premium' ), - 'section' => 'generate_woocommerce_layout', - 'choices' => array( - 'shopping-cart' => __( 'Shopping Cart', 'gp-premium' ), - 'shopping-bag' => __( 'Shopping Bag', 'gp-premium' ), - 'shopping-basket' => __( 'Shopping Basket', 'gp-premium' ), - ), - 'settings' => 'generate_woocommerce_settings[cart_menu_item_icon]', - 'active_callback' => 'generatepress_wc_menu_cart_active', - ) - ); - - $wp_customize->add_setting( - 'generate_woocommerce_settings[cart_menu_item_content]', - array( - 'default' => $defaults['cart_menu_item_content'], - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_choices' - ) - ); - - $wp_customize->add_control( - 'generate_woocommerce_settings[cart_menu_item_content]', - array( - 'type' => 'select', - 'label' => __( 'Menu Item Content', 'gp-premium' ), - 'section' => 'generate_woocommerce_layout', - 'choices' => array( - 'amount' => __( 'Amount', 'gp-premium' ), - 'number' => __( 'Number of Items', 'gp-premium' ), - ), - 'settings' => 'generate_woocommerce_settings[cart_menu_item_content]', - 'active_callback' => 'generatepress_wc_menu_cart_active', - ) - ); - - $wp_customize->add_setting( - 'generate_woocommerce_settings[breadcrumbs]', - array( - 'default' => $defaults['breadcrumbs'], - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_checkbox' - ) - ); - - $wp_customize->add_control( - 'generate_woocommerce_settings[breadcrumbs]', - array( - 'type' => 'checkbox', - 'label' => __( 'Display breadcrumbs', 'gp-premium' ), - 'section' => 'generate_woocommerce_layout', - 'settings' => 'generate_woocommerce_settings[breadcrumbs]', - ) - ); - - $wp_customize->add_control( - new GeneratePress_Title_Customize_Control( - $wp_customize, - 'generate_woocommerce_shop_page_title', - array( - 'section' => 'generate_woocommerce_layout', - 'type' => 'generatepress-customizer-title', - 'title' => __( 'Shop', 'gp-premium' ), - 'settings' => ( isset( $wp_customize->selective_refresh ) ) ? array() : 'blogname' - ) - ) - ); - - $wp_customize->add_setting( - 'generate_woocommerce_settings[sidebar_layout]', - array( - 'default' => $defaults['sidebar_layout'], - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_choices' - ) - ); - - $wp_customize->add_control( - 'generate_woocommerce_settings[sidebar_layout]', - array( - 'type' => 'select', - 'label' => __( 'Sidebar Layout', 'gp-premium' ), - 'section' => 'generate_woocommerce_layout', - 'choices' => array( - 'left-sidebar' => __( 'Sidebar / Content', 'gp-premium' ), - 'right-sidebar' => __( 'Content / Sidebar', 'gp-premium' ), - 'no-sidebar' => __( 'Content (no sidebars)', 'gp-premium' ), - 'both-sidebars' => __( 'Sidebar / Content / Sidebar', 'gp-premium' ), - 'both-left' => __( 'Sidebar / Sidebar / Content', 'gp-premium' ), - 'both-right' => __( 'Content / Sidebar / Sidebar', 'gp-premium' ) - ), - 'settings' => 'generate_woocommerce_settings[sidebar_layout]', - ) - ); - - $wp_customize->add_setting( - 'generate_woocommerce_settings[columns]', array( - 'default' => $defaults['columns'], - 'type' => 'option', - 'capability' => 'edit_theme_options', - 'sanitize_callback' => 'absint' - ) - ); - - $wp_customize->add_setting( - 'generate_woocommerce_settings[tablet_columns]', array( - 'default' => $defaults['tablet_columns'], - 'type' => 'option', - 'capability' => 'edit_theme_options', - 'sanitize_callback' => 'absint' - ) - ); - - $wp_customize->add_setting( - 'generate_woocommerce_settings[mobile_columns]', array( - 'default' => $defaults['mobile_columns'], - 'type' => 'option', - 'capability' => 'edit_theme_options', - 'sanitize_callback' => 'absint' - ) - ); - - $wp_customize->add_control( - new GeneratePress_Pro_Range_Slider_Control( - $wp_customize, - 'gp_woocommerce_columns', - array( - 'label' => __( 'Product Columns', 'gp-premium' ), - 'section' => 'generate_woocommerce_layout', - 'settings' => array( - 'desktop' => 'generate_woocommerce_settings[columns]', - 'tablet' => 'generate_woocommerce_settings[tablet_columns]', - 'mobile' => 'generate_woocommerce_settings[mobile_columns]', - ), - 'choices' => array( - 'desktop' => array( - 'min' => 1, - 'max' => 6, - 'step' => 1, - 'edit' => false, - 'unit' => 'Col', - ), - 'tablet' => array( - 'min' => 1, - 'max' => 3, - 'step' => 1, - 'edit' => false, - 'unit' => 'Col', - ), - 'mobile' => array( - 'min' => 1, - 'max' => 3, - 'step' => 1, - 'edit' => false, - 'unit' => 'Col', - ), - ), - ) - ) - ); - - $wp_customize->add_setting( - 'generate_woocommerce_settings[columns_gap]', array( - 'default' => $defaults['columns_gap'], - 'type' => 'option', - 'capability' => 'edit_theme_options', - 'sanitize_callback' => 'absint' - ) - ); - - $wp_customize->add_setting( - 'generate_woocommerce_settings[tablet_columns_gap]', array( - 'default' => $defaults['tablet_columns_gap'], - 'type' => 'option', - 'capability' => 'edit_theme_options', - 'sanitize_callback' => 'generate_premium_sanitize_empty_absint' - ) - ); - - $wp_customize->add_setting( - 'generate_woocommerce_settings[mobile_columns_gap]', array( - 'default' => $defaults['mobile_columns_gap'], - 'type' => 'option', - 'capability' => 'edit_theme_options', - 'sanitize_callback' => 'generate_premium_sanitize_empty_absint' - ) - ); - - $wp_customize->add_control( - new GeneratePress_Pro_Range_Slider_Control( - $wp_customize, - 'gp_woocommerce_column_gap', - array( - 'label' => __( 'Column Gap', 'gp-premium' ), - 'section' => 'generate_woocommerce_layout', - 'settings' => array( - 'desktop' => 'generate_woocommerce_settings[columns_gap]', - 'tablet' => 'generate_woocommerce_settings[tablet_columns_gap]', - 'mobile' => 'generate_woocommerce_settings[mobile_columns_gap]', - ), - 'choices' => array( - 'desktop' => array( - 'min' => 0, - 'max' => 100, - 'step' => 5, - 'edit' => true, - 'unit' => 'px', - ), - 'tablet' => array( - 'min' => 0, - 'max' => 100, - 'step' => 5, - 'edit' => true, - 'unit' => 'px', - ), - 'mobile' => array( - 'min' => 0, - 'max' => 100, - 'step' => 5, - 'edit' => true, - 'unit' => 'px', - ), - ), - ) - ) - ); - - $wp_customize->add_setting( - 'generate_woocommerce_settings[product_archive_image_alignment]', - array( - 'default' => $defaults['product_archive_image_alignment'], - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_choices' - ) - ); - - $wp_customize->add_control( - 'generate_woocommerce_settings[product_archive_image_alignment]', - array( - 'type' => 'radio', - 'label' => __( 'Image Alignment', 'gp-premium' ), - 'section' => 'generate_woocommerce_layout', - 'choices' => array( - 'left' => __( 'Left', 'gp-premium' ), - 'center' => __( 'Center', 'gp-premium' ), - 'right' => __( 'Right', 'gp-premium' ), - ), - 'settings' => 'generate_woocommerce_settings[product_archive_image_alignment]', - ) - ); - - $wp_customize->add_setting( - 'generate_woocommerce_settings[products_per_page]', - array( - 'default' => $defaults['products_per_page'], - 'type' => 'option', - 'sanitize_callback' => 'absint' - ) - ); - - $wp_customize->add_control( - 'generate_woocommerce_settings[products_per_page]', - array( - 'type' => 'text', - 'label' => __( 'Products Per Page', 'gp-premium' ), - 'section' => 'generate_woocommerce_layout', - 'settings' => 'generate_woocommerce_settings[products_per_page]', - ) - ); - - $wp_customize->add_setting( - 'generate_woocommerce_settings[product_archive_alignment]', - array( - 'default' => $defaults['product_archive_alignment'], - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_choices' - ) - ); - - $wp_customize->add_control( - 'generate_woocommerce_settings[product_archive_alignment]', - array( - 'type' => 'radio', - 'label' => __( 'Text Alignment', 'gp-premium' ), - 'section' => 'generate_woocommerce_layout', - 'choices' => array( - 'left' => __( 'Left', 'gp-premium' ), - 'center' => __( 'Center', 'gp-premium' ), - 'right' => __( 'Right', 'gp-premium' ), - ), - 'settings' => 'generate_woocommerce_settings[product_archive_alignment]', - ) - ); - - $wp_customize->add_setting( - 'generate_woocommerce_settings[off_canvas_panel_on_add_to_cart]', - array( - 'default' => $defaults['off_canvas_panel_on_add_to_cart'], - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_checkbox' - ) - ); - - $wp_customize->add_control( - 'generate_woocommerce_settings[off_canvas_panel_on_add_to_cart]', - array( - 'type' => 'checkbox', - 'label' => __( 'Display cart panel on add to cart', 'gp-premium' ), - 'section' => 'generate_woocommerce_layout', - 'settings' => 'generate_woocommerce_settings[off_canvas_panel_on_add_to_cart]', - ) - ); - - $wp_customize->add_setting( - 'generate_woocommerce_settings[shop_page_title]', - array( - 'default' => $defaults['shop_page_title'], - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_checkbox' - ) - ); - - $wp_customize->add_control( - 'generate_woocommerce_settings[shop_page_title]', - array( - 'type' => 'checkbox', - 'label' => __( 'Display page title', 'gp-premium' ), - 'section' => 'generate_woocommerce_layout', - 'settings' => 'generate_woocommerce_settings[shop_page_title]', - ) - ); - - $wp_customize->add_setting( - 'generate_woocommerce_settings[product_results_count]', - array( - 'default' => $defaults['product_results_count'], - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_checkbox' - ) - ); - - $wp_customize->add_control( - 'generate_woocommerce_settings[product_results_count]', - array( - 'type' => 'checkbox', - 'label' => __( 'Display product results count', 'gp-premium' ), - 'section' => 'generate_woocommerce_layout', - 'settings' => 'generate_woocommerce_settings[product_results_count]', - ) - ); - - $wp_customize->add_setting( - 'generate_woocommerce_settings[product_sorting]', - array( - 'default' => $defaults['product_sorting'], - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_checkbox' - ) - ); - - $wp_customize->add_control( - 'generate_woocommerce_settings[product_sorting]', - array( - 'type' => 'checkbox', - 'label' => __( 'Display product sorting', 'gp-premium' ), - 'section' => 'generate_woocommerce_layout', - 'settings' => 'generate_woocommerce_settings[product_sorting]', - ) - ); - - $wp_customize->add_setting( - 'generate_woocommerce_settings[product_archive_image]', - array( - 'default' => $defaults['product_archive_image'], - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_checkbox' - ) - ); - - $wp_customize->add_control( - 'generate_woocommerce_settings[product_archive_image]', - array( - 'type' => 'checkbox', - 'label' => __( 'Display product image', 'gp-premium' ), - 'section' => 'generate_woocommerce_layout', - 'settings' => 'generate_woocommerce_settings[product_archive_image]', - ) - ); - - $wp_customize->add_setting( - 'generate_woocommerce_settings[product_secondary_image]', - array( - 'default' => $defaults['product_secondary_image'], - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_checkbox' - ) - ); - - $wp_customize->add_control( - 'generate_woocommerce_settings[product_secondary_image]', - array( - 'type' => 'checkbox', - 'label' => __( 'Display secondary image on hover', 'gp-premium' ), - 'section' => 'generate_woocommerce_layout', - 'settings' => 'generate_woocommerce_settings[product_secondary_image]', - ) - ); - - $wp_customize->add_setting( - 'generate_woocommerce_settings[product_archive_title]', - array( - 'default' => $defaults['product_archive_title'], - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_checkbox' - ) - ); - - $wp_customize->add_control( - 'generate_woocommerce_settings[product_archive_title]', - array( - 'type' => 'checkbox', - 'label' => __( 'Display product title', 'gp-premium' ), - 'section' => 'generate_woocommerce_layout', - 'settings' => 'generate_woocommerce_settings[product_archive_title]', - ) - ); - - $wp_customize->add_setting( - 'generate_woocommerce_settings[product_archive_sale_flash]', - array( - 'default' => $defaults['product_archive_sale_flash'], - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_checkbox' - ) - ); - - $wp_customize->add_control( - 'generate_woocommerce_settings[product_archive_sale_flash]', - array( - 'type' => 'checkbox', - 'label' => __( 'Display sale flash', 'gp-premium' ), - 'section' => 'generate_woocommerce_layout', - 'settings' => 'generate_woocommerce_settings[product_archive_sale_flash]', - ) - ); - - $wp_customize->add_setting( - 'generate_woocommerce_settings[product_archive_sale_flash_overlay]', - array( - 'default' => $defaults['product_archive_sale_flash_overlay'], - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_checkbox' - ) - ); - - $wp_customize->add_control( - 'generate_woocommerce_settings[product_archive_sale_flash_overlay]', - array( - 'type' => 'checkbox', - 'label' => __( 'Sale flash over image', 'gp-premium' ), - 'section' => 'generate_woocommerce_layout', - 'settings' => 'generate_woocommerce_settings[product_archive_sale_flash_overlay]', - ) - ); - - $wp_customize->add_setting( - 'generate_woocommerce_settings[product_archive_rating]', - array( - 'default' => $defaults['product_archive_rating'], - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_checkbox' - ) - ); - - $wp_customize->add_control( - 'generate_woocommerce_settings[product_archive_rating]', - array( - 'type' => 'checkbox', - 'label' => __( 'Display rating', 'gp-premium' ), - 'section' => 'generate_woocommerce_layout', - 'settings' => 'generate_woocommerce_settings[product_archive_rating]', - ) - ); - - $wp_customize->add_setting( - 'generate_woocommerce_settings[product_archive_price]', - array( - 'default' => $defaults['product_archive_price'], - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_checkbox' - ) - ); - - $wp_customize->add_control( - 'generate_woocommerce_settings[product_archive_price]', - array( - 'type' => 'checkbox', - 'label' => __( 'Display price', 'gp-premium' ), - 'section' => 'generate_woocommerce_layout', - 'settings' => 'generate_woocommerce_settings[product_archive_price]', - ) - ); - - $wp_customize->add_setting( - 'generate_woocommerce_settings[product_archive_add_to_cart]', - array( - 'default' => $defaults['product_archive_add_to_cart'], - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_checkbox' - ) - ); - - $wp_customize->add_control( - 'generate_woocommerce_settings[product_archive_add_to_cart]', - array( - 'type' => 'checkbox', - 'label' => __( 'Display add to cart button', 'gp-premium' ), - 'section' => 'generate_woocommerce_layout', - 'settings' => 'generate_woocommerce_settings[product_archive_add_to_cart]', - ) - ); - - $wp_customize->add_setting( - 'generate_woocommerce_settings[product_archive_description]', - array( - 'default' => $defaults['product_archive_description'], - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_checkbox' - ) - ); - - $wp_customize->add_control( - 'generate_woocommerce_settings[product_archive_description]', - array( - 'type' => 'checkbox', - 'label' => __( 'Display short description', 'gp-premium' ), - 'section' => 'generate_woocommerce_layout', - 'settings' => 'generate_woocommerce_settings[product_archive_description]', - ) - ); - - $wp_customize->add_control( - new GeneratePress_Title_Customize_Control( - $wp_customize, - 'generate_woocommerce_single_product_title', - array( - 'section' => 'generate_woocommerce_layout', - 'type' => 'generatepress-customizer-title', - 'title' => __( 'Single Product', 'gp-premium' ), - 'settings' => ( isset( $wp_customize->selective_refresh ) ) ? array() : 'blogname' - ) - ) - ); - - $wp_customize->add_setting( - 'generate_woocommerce_settings[single_sidebar_layout]', - array( - 'default' => $defaults['single_sidebar_layout'], - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_choices' - ) - ); - - $wp_customize->add_control( - 'generate_woocommerce_settings[single_sidebar_layout]', - array( - 'type' => 'select', - 'label' => __( 'Sidebar Layout', 'gp-premium' ), - 'section' => 'generate_woocommerce_layout', - 'choices' => array( - 'inherit' => __( 'Inherit', 'gp-premium' ), - 'left-sidebar' => __( 'Sidebar / Content', 'gp-premium' ), - 'right-sidebar' => __( 'Content / Sidebar', 'gp-premium' ), - 'no-sidebar' => __( 'Content (no sidebars)', 'gp-premium' ), - 'both-sidebars' => __( 'Sidebar / Content / Sidebar', 'gp-premium' ), - 'both-left' => __( 'Sidebar / Sidebar / Content', 'gp-premium' ), - 'both-right' => __( 'Content / Sidebar / Sidebar', 'gp-premium' ) - ), - 'settings' => 'generate_woocommerce_settings[single_sidebar_layout]', - ) - ); - - $wp_customize->add_setting( - 'generate_woocommerce_settings[single_product_image_width]', array( - 'default' => $defaults['single_product_image_width'], - 'type' => 'option', - 'capability' => 'edit_theme_options', - 'sanitize_callback' => 'absint' - ) - ); - - $wp_customize->add_control( - new GeneratePress_Pro_Range_Slider_Control( - $wp_customize, - 'gp_woocommerce_single_product_image_width', - array( - 'label' => __( 'Product Image Area Width', 'gp-premium' ), - 'section' => 'generate_woocommerce_layout', - 'settings' => array( - 'desktop' => 'generate_woocommerce_settings[single_product_image_width]', - ), - 'choices' => array( - 'desktop' => array( - 'min' => 10, - 'max' => 100, - 'step' => 5, - 'edit' => true, - 'unit' => '%', - ), - ), - ) - ) - ); - - $wp_customize->add_setting( - 'generate_woocommerce_settings[sticky_add_to_cart_panel]', - array( - 'default' => $defaults['sticky_add_to_cart_panel'], - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_checkbox' - ) - ); - - $wp_customize->add_control( - 'generate_woocommerce_settings[sticky_add_to_cart_panel]', - array( - 'type' => 'checkbox', - 'label' => __( 'Display add to cart panel on scroll', 'gp-premium' ), - 'section' => 'generate_woocommerce_layout', - 'settings' => 'generate_woocommerce_settings[sticky_add_to_cart_panel]', - ) - ); - - $wp_customize->add_setting( - 'generate_woocommerce_settings[quantity_buttons]', - array( - 'default' => $defaults['quantity_buttons'], - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_checkbox' - ) - ); - - $wp_customize->add_control( - 'generate_woocommerce_settings[quantity_buttons]', - array( - 'type' => 'checkbox', - 'label' => __( 'Display quantity buttons', 'gp-premium' ), - 'section' => 'generate_woocommerce_layout', - 'settings' => 'generate_woocommerce_settings[quantity_buttons]', - ) - ); - - $wp_customize->add_setting( - 'generate_woocommerce_settings[single_product_sale_flash]', - array( - 'default' => $defaults['single_product_sale_flash'], - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_checkbox' - ) - ); - - $wp_customize->add_control( - 'generate_woocommerce_settings[single_product_sale_flash]', - array( - 'type' => 'checkbox', - 'label' => __( 'Display sale flash', 'gp-premium' ), - 'section' => 'generate_woocommerce_layout', - 'settings' => 'generate_woocommerce_settings[single_product_sale_flash]', - ) - ); - - $wp_customize->add_setting( - 'generate_woocommerce_settings[product_tabs]', - array( - 'default' => $defaults['product_tabs'], - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_checkbox' - ) - ); - - $wp_customize->add_control( - 'generate_woocommerce_settings[product_tabs]', - array( - 'type' => 'checkbox', - 'label' => __( 'Display product tabs', 'gp-premium' ), - 'section' => 'generate_woocommerce_layout', - 'settings' => 'generate_woocommerce_settings[product_tabs]', - ) - ); - - $wp_customize->add_setting( - 'generate_woocommerce_settings[product_related]', - array( - 'default' => $defaults['product_related'], - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_checkbox' - ) - ); - - $wp_customize->add_control( - 'generate_woocommerce_settings[product_related]', - array( - 'type' => 'checkbox', - 'label' => __( 'Display related products', 'gp-premium' ), - 'section' => 'generate_woocommerce_layout', - 'settings' => 'generate_woocommerce_settings[product_related]', - ) - ); - - $wp_customize->add_setting( - 'generate_woocommerce_settings[product_upsells]', - array( - 'default' => $defaults['product_upsells'], - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_checkbox' - ) - ); - - $wp_customize->add_control( - 'generate_woocommerce_settings[product_upsells]', - array( - 'type' => 'checkbox', - 'label' => __( 'Display upsell products', 'gp-premium' ), - 'section' => 'generate_woocommerce_layout', - 'settings' => 'generate_woocommerce_settings[product_upsells]', - ) - ); - - $wp_customize->add_setting( - 'generate_woocommerce_settings[related_upsell_columns]', array( - 'default' => $defaults['related_upsell_columns'], - 'type' => 'option', - 'capability' => 'edit_theme_options', - 'sanitize_callback' => 'absint' - ) - ); - - $wp_customize->add_setting( - 'generate_woocommerce_settings[tablet_related_upsell_columns]', array( - 'default' => $defaults['tablet_related_upsell_columns'], - 'type' => 'option', - 'capability' => 'edit_theme_options', - 'sanitize_callback' => 'absint' - ) - ); - - $wp_customize->add_setting( - 'generate_woocommerce_settings[mobile_related_upsell_columns]', array( - 'default' => $defaults['mobile_related_upsell_columns'], - 'type' => 'option', - 'capability' => 'edit_theme_options', - 'sanitize_callback' => 'absint' - ) - ); - - $wp_customize->add_control( - new GeneratePress_Pro_Range_Slider_Control( - $wp_customize, - 'gp_woocommerce_related_upsell_columns', - array( - 'label' => __( 'Related/Upsell Columns', 'gp-premium' ), - 'section' => 'generate_woocommerce_layout', - 'settings' => array( - 'desktop' => 'generate_woocommerce_settings[related_upsell_columns]', - 'tablet' => 'generate_woocommerce_settings[tablet_related_upsell_columns]', - 'mobile' => 'generate_woocommerce_settings[mobile_related_upsell_columns]', - ), - 'choices' => array( - 'desktop' => array( - 'min' => 1, - 'max' => 6, - 'step' => 1, - 'edit' => false, - 'unit' => 'Col', - ), - 'tablet' => array( - 'min' => 1, - 'max' => 3, - 'step' => 1, - 'edit' => false, - 'unit' => 'Col', - ), - 'mobile' => array( - 'min' => 1, - 'max' => 3, - 'step' => 1, - 'edit' => false, - 'unit' => 'Col', - ), - ), - ) - ) - ); - - $wp_customize->add_setting( - 'generate_woocommerce_settings[product_meta]', - array( - 'default' => $defaults['product_meta'], - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_checkbox' - ) - ); - - $wp_customize->add_control( - 'generate_woocommerce_settings[product_meta]', - array( - 'type' => 'checkbox', - 'label' => __( 'Display product meta data', 'gp-premium' ), - 'section' => 'generate_woocommerce_layout', - 'settings' => 'generate_woocommerce_settings[product_meta]', - ) - ); - - $wp_customize->add_setting( - 'generate_woocommerce_settings[product_description]', - array( - 'default' => $defaults['product_description'], - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_checkbox' - ) - ); - - $wp_customize->add_control( - 'generate_woocommerce_settings[product_description]', - array( - 'type' => 'checkbox', - 'label' => __( 'Display short description', 'gp-premium' ), - 'section' => 'generate_woocommerce_layout', - 'settings' => 'generate_woocommerce_settings[product_description]', - ) - ); - - $wp_customize->add_section( - 'generate_woocommerce_colors', - array( - 'title' => __( 'WooCommerce', 'gp-premium' ), - 'capability' => 'edit_theme_options', - 'priority' => 200, - 'panel' => 'generate_colors_panel' - ) - ); - - $wp_customize->add_section( - 'generate_woocommerce_typography', - array( - 'title' => __( 'WooCommerce', 'gp-premium' ), - 'capability' => 'edit_theme_options', - 'priority' => 200, - 'panel' => 'generate_typography_panel' - ) - ); - - $wp_customize->add_control( - new GeneratePress_Title_Customize_Control( - $wp_customize, - 'generate_woocommerce_checkout_title', - array( - 'section' => 'generate_woocommerce_layout', - 'type' => 'generatepress-customizer-title', - 'title' => __( 'Checkout', 'gp-premium' ), - 'settings' => ( isset( $wp_customize->selective_refresh ) ) ? array() : 'blogname' - ) - ) - ); - - $wp_customize->add_setting( - 'generate_woocommerce_settings[distraction_free]', - array( - 'default' => $defaults['distraction_free'], - 'type' => 'option', - 'sanitize_callback' => 'generate_premium_sanitize_checkbox' - ) - ); - - $wp_customize->add_control( - 'generate_woocommerce_settings[distraction_free]', - array( - 'type' => 'checkbox', - 'label' => __( 'Distraction-free mode', 'gp-premium' ), - 'description' => __( 'Remove unnecessary distractions like sidebars, footer widgets and sticky menus.', 'gp-premium' ), - 'section' => 'generate_woocommerce_layout', - 'settings' => 'generate_woocommerce_settings[distraction_free]', - ) - ); - -} diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/woocommerce/functions/customizer/js/customizer.js b/wp-content/upgrade-temp-backup/plugins/gp-premium/woocommerce/functions/customizer/js/customizer.js deleted file mode 100644 index a455a2f7..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/woocommerce/functions/customizer/js/customizer.js +++ /dev/null @@ -1,6 +0,0 @@ -jQuery( function( $ ) { - $( '#customize-control-generate_woocommerce_primary_button_message a' ).on( 'click', function( e ) { - e.preventDefault(); - wp.customize.control( 'generate_settings[form_button_background_color]' ).focus(); - } ); -} ); diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/woocommerce/functions/functions.php b/wp-content/upgrade-temp-backup/plugins/gp-premium/woocommerce/functions/functions.php deleted file mode 100644 index 7451494a..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/woocommerce/functions/functions.php +++ /dev/null @@ -1,1532 +0,0 @@ - true, - 'cart_menu_item_icon' => 'shopping-cart', - 'cart_menu_item_content' => 'amount', - 'menu_mini_cart' => false, - 'off_canvas_panel_on_add_to_cart' => false, - 'sticky_add_to_cart_panel' => false, - 'sidebar_layout' => 'right-sidebar', - 'single_sidebar_layout' => 'inherit', - 'products_per_page' => 9, - 'columns' => 4, - 'tablet_columns' => 2, - 'mobile_columns' => 1, - 'columns_gap' => 50, - 'tablet_columns_gap' => '', - 'mobile_columns_gap' => '', - 'related_upsell_columns' => 4, - 'tablet_related_upsell_columns' => 2, - 'mobile_related_upsell_columns' => 1, - 'product_archive_image_alignment' => 'center', - 'product_archive_alignment' => 'center', - 'shop_page_title' => true, - 'product_results_count' => true, - 'product_sorting' => true, - 'product_archive_image' => true, - 'product_secondary_image' => true, - 'product_archive_title' => true, - 'product_archive_sale_flash' => true, - 'product_archive_sale_flash_overlay' => true, - 'product_archive_rating' => true, - 'product_archive_price' => true, - 'product_archive_add_to_cart' => true, - 'single_product_sale_flash' => true, - 'single_product_image_width' => '50', - 'product_tabs' => true, - 'product_related' => true, - 'product_upsells' => true, - 'product_meta' => true, - 'product_description' => true, - 'quantity_buttons' => true, - 'breadcrumbs' => true, - 'distraction_free' => true, - 'product_archive_description' => false, - ) ); -} - -add_filter( 'generate_color_option_defaults', 'generatepress_wc_color_defaults' ); -/** - * Set the WC color option defaults. - * - * @since 1.3 - */ -function generatepress_wc_color_defaults( $defaults ) { - $defaults[ 'wc_alt_button_background' ] = '#1e73be'; - $defaults[ 'wc_alt_button_background_hover' ] = '#377fbf'; - $defaults[ 'wc_alt_button_text' ] = '#ffffff'; - $defaults[ 'wc_alt_button_text_hover' ] = '#ffffff'; - $defaults[ 'wc_rating_stars' ] = '#ffa200'; - $defaults[ 'wc_sale_sticker_background' ] = '#222222'; - $defaults[ 'wc_sale_sticker_text' ] = '#ffffff'; - $defaults[ 'wc_price_color' ] = '#222222'; - $defaults[ 'wc_product_tab' ] = '#222222'; - $defaults[ 'wc_product_tab_highlight' ] = '#1e73be'; - $defaults[ 'wc_success_message_background' ] = '#0b9444'; - $defaults[ 'wc_success_message_text' ] = '#ffffff'; - $defaults[ 'wc_info_message_background' ] = '#1e73be'; - $defaults[ 'wc_info_message_text' ] = '#ffffff'; - $defaults[ 'wc_error_message_background' ] = '#e8626d'; - $defaults[ 'wc_error_message_text' ] = '#ffffff'; - $defaults[ 'wc_product_title_color' ] = ''; - $defaults[ 'wc_product_title_color_hover' ] = ''; - - $defaults['wc_mini_cart_background_color'] = '#ffffff'; - $defaults['wc_mini_cart_text_color'] = '#000000'; - $defaults['wc_mini_cart_button_background'] = ''; - $defaults['wc_mini_cart_button_text'] = ''; - $defaults['wc_mini_cart_button_background_hover'] = ''; - $defaults['wc_mini_cart_button_text_hover'] = ''; - - $defaults['wc_panel_cart_background_color'] = '#ffffff'; - $defaults['wc_panel_cart_text_color'] = '#000000'; - $defaults['wc_panel_cart_button_background'] = ''; - $defaults['wc_panel_cart_button_text'] = ''; - $defaults['wc_panel_cart_button_background_hover'] = ''; - $defaults['wc_panel_cart_button_text_hover'] = ''; - - $defaults['wc_price_slider_background_color'] = '#dddddd'; - $defaults['wc_price_slider_bar_color'] = '#666666'; - - return $defaults; -} - -add_filter( 'generate_font_option_defaults', 'generatepress_wc_typography_defaults' ); -/** - * Set the WC typography option defaults. - * - * @since 1.3 - */ -function generatepress_wc_typography_defaults( $defaults ) { - $defaults[ 'wc_product_title_font_weight' ] = 'normal'; - $defaults[ 'wc_product_title_font_transform' ] = 'none'; - $defaults[ 'wc_product_title_font_size' ] = '20'; - $defaults[ 'mobile_wc_product_title_font_size' ] = ''; - $defaults[ 'wc_related_product_title_font_size' ] = '20'; - return $defaults; -} - -add_filter( 'generate_navigation_class', 'generatepress_wc_navigation_class' ); -/** - * Add navigation class when the menu icon is enabled. - * - * @since 1.3 - */ -function generatepress_wc_navigation_class( $classes ) { - $classes[] = ( generatepress_wc_get_setting( 'cart_menu_item' ) ) ? 'wc-menu-cart-activated' : ''; - return $classes; -} - -add_filter( 'post_class', 'generatepress_wc_post_class' ); -add_filter( 'product_cat_class', 'generatepress_wc_post_class' ); -/** - * Add post classes to the products. - * - * @since 1.3 - * - * @param array $classes Existing product classes. - * @return array - */ -function generatepress_wc_post_class( $classes ) { - if ( 'product' == get_post_type() ) { - $classes[] = ( generatepress_wc_get_setting( 'product_archive_sale_flash_overlay' ) && generatepress_wc_get_setting( 'product_archive_image' ) ) ? 'sales-flash-overlay' : ''; - $classes[] = 'woocommerce-text-align-' . generatepress_wc_get_setting( 'product_archive_alignment' ); - - if ( is_single() ) { - $classes[] = 'wc-related-upsell-columns-' . generatepress_wc_get_setting( 'related_upsell_columns' ); - $classes[] = 'wc-related-upsell-tablet-columns-' . generatepress_wc_get_setting( 'tablet_related_upsell_columns' ); - $classes[] = 'wc-related-upsell-mobile-columns-' . generatepress_wc_get_setting( 'mobile_related_upsell_columns' ); - } else { - $classes[] = 'woocommerce-image-align-' . generatepress_wc_get_setting( 'product_archive_image_alignment' ); - } - } - - if ( 'product' === get_post_type() || is_cart() ) { - if ( generatepress_wc_get_setting( 'quantity_buttons' ) ) { - $classes[] = 'do-quantity-buttons'; - $product = wc_get_product( get_the_ID() ); - - $check_stock = is_callable( array( $product, 'managing_stock' ) ) && - is_callable( array( $product, 'get_stock_quantity' ) ) && - is_callable( array( $product, 'backorders_allowed' ) ) && - is_callable( array( $product, 'is_sold_individually' ) ) && - function_exists( 'is_product' ) && - is_product() && - defined( 'WC_VERSION' ); - - if ( $check_stock && version_compare( WC_VERSION, '7.4.0', '>=' ) ) { - $managing_stock = $product->managing_stock(); - $stock_quantity = $product->get_stock_quantity(); - $backorders_allowed = $product->backorders_allowed(); - $sold_individually = $product->is_sold_individually(); - - if ( $sold_individually || ( $managing_stock && $stock_quantity < 2 && ! $backorders_allowed ) ) { - $classes = array_diff( $classes, array( 'do-quantity-buttons' ) ); - } - } - } - } - - return $classes; -} - -add_action( 'woocommerce_before_shop_loop', 'generatepress_wc_before_shop_loop' ); -/** - * Add opening element inside shop page. - * - * @since 1.3 - */ -function generatepress_wc_before_shop_loop() { - $classes = apply_filters( 'generate_woocommerce_container_classes', array( - 'wc-columns-container', - 'wc-columns-' . generatepress_wc_get_setting( 'columns' ), - 'wc-tablet-columns-' . generatepress_wc_get_setting( 'tablet_columns' ), - 'wc-mobile-columns-' . generatepress_wc_get_setting( 'mobile_columns' ), - ) ); - - $classes = array_map('esc_attr', $classes); - echo '
          '; -} - -add_action( 'woocommerce_after_shop_loop', 'generatepress_wc_after_shop_loop' ); -/** - * Add closing element inside shop page. - * - * @since 1.3 - */ -function generatepress_wc_after_shop_loop() { - echo '
          '; -} - -add_action( 'wp_enqueue_scripts', 'generatepress_wc_scripts', 100 ); -/** - * Add scripts and styles. - * - * @since 1.3 - */ -function generatepress_wc_scripts() { - if ( ! function_exists( 'is_checkout' ) ) { - return; - } - - $suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min'; - wp_enqueue_style( 'generate-woocommerce', plugin_dir_url( __FILE__ ) . "css/woocommerce{$suffix}.css", array(), GENERATE_WOOCOMMERCE_VERSION ); - wp_enqueue_style( 'generate-woocommerce-mobile', plugin_dir_url( __FILE__ ) . "css/woocommerce-mobile{$suffix}.css", array(), GENERATE_WOOCOMMERCE_VERSION, generate_premium_get_media_query( 'mobile' ) ); - - if ( - generatepress_wc_get_setting( 'cart_menu_item' ) || - generatepress_wc_get_setting( 'off_canvas_panel_on_add_to_cart' ) || - generatepress_wc_show_sticky_add_to_cart() || - generatepress_wc_get_setting( 'quantity_buttons' ) - ) { - wp_enqueue_script( 'generate-woocommerce', plugin_dir_url( __FILE__ ) . "js/woocommerce{$suffix}.js", array( 'jquery' ), GENERATE_WOOCOMMERCE_VERSION, true ); - } - - $show_add_to_cart_panel = false; - - if ( ! is_singular() && generatepress_wc_get_setting( 'off_canvas_panel_on_add_to_cart' ) ) { - $show_add_to_cart_panel = true; - } - - wp_localize_script( - 'generate-woocommerce', - 'generateWooCommerce', - array( - 'quantityButtons' => generatepress_wc_get_setting( 'quantity_buttons' ), - 'stickyAddToCart' => generatepress_wc_show_sticky_add_to_cart(), - 'addToCartPanel' => apply_filters( 'generate_woocommerce_show_add_to_cart_panel', $show_add_to_cart_panel ), - ) - ); - - if ( generatepress_wc_get_setting( 'distraction_free' ) && is_checkout() ) { - wp_dequeue_script( 'generate-advanced-sticky' ); - wp_dequeue_script( 'generate-sticky' ); - } - - $font_icons = true; - - if ( function_exists( 'generate_get_option' ) ) { - if ( 'font' !== generate_get_option( 'icons' ) ) { - $font_icons = false; - } - } - - if ( $font_icons ) { - wp_enqueue_style( 'gp-premium-icons' ); - } -} - -/** - * Wrapper class to get the options. - * - * @since 1.3 - * - * @return string $setting The option name. - * @return string The value. - */ -function generatepress_wc_get_setting( $setting ) { - $settings = wp_parse_args( - get_option( 'generate_woocommerce_settings', array() ), - generatepress_wc_defaults() - ); - - return $settings[ $setting ]; -} - -add_filter( 'generate_sidebar_layout', 'generatepress_wc_sidebar_layout' ); -/** - * Set the WC sidebars. - * - * @since 1.3 - * - * @param string Existing layout - * @return string New layout - */ -function generatepress_wc_sidebar_layout( $layout ) { - if ( function_exists( 'is_woocommerce' ) && is_woocommerce() ) { - $layout = generatepress_wc_get_setting( 'sidebar_layout' ); - - if ( is_single() ) { - if ( 'inherit' !== generatepress_wc_get_setting( 'single_sidebar_layout' ) ) { - $layout = generatepress_wc_get_setting( 'single_sidebar_layout' ); - } - - if ( get_post_meta( get_the_ID(), '_generate-sidebar-layout-meta', true ) ) { - $layout = get_post_meta( get_the_ID(), '_generate-sidebar-layout-meta', true ); - } - } - } - - return $layout; -} - -add_filter( 'loop_shop_columns', 'generatepress_wc_product_columns', 999 ); -/** - * Set the WC column number. - * - * @since 1.3 - */ -function generatepress_wc_product_columns() { - return generatepress_wc_get_setting( 'columns' ); -} - -add_filter( 'loop_shop_per_page', 'generatepress_wc_products_per_page', 20 ); -/** - * Set the WC products per page. - * - * @since 1.3 - */ -function generatepress_wc_products_per_page() { - return generatepress_wc_get_setting( 'products_per_page' ); -} - -add_action( 'wp', 'generatepress_wc_setup' ); -/** - * Set up WC. - * - * @since 1.3 - */ -function generatepress_wc_setup() { - - // Add support for WC features - add_theme_support( 'wc-product-gallery-zoom' ); - add_theme_support( 'wc-product-gallery-lightbox' ); - add_theme_support( 'wc-product-gallery-slider' ); - - remove_action( 'wp_enqueue_scripts', 'generate_woocommerce_css', 100 ); - - remove_action( 'woocommerce_before_shop_loop', 'woocommerce_catalog_ordering', 30 ); - add_action( 'woocommerce_before_shop_loop', 'woocommerce_catalog_ordering', 10 ); - - add_action( 'woocommerce_before_shop_loop_item_title', 'generatepress_wc_image_wrapper_open', 8 ); - add_action( 'woocommerce_before_subcategory_title', 'generatepress_wc_image_wrapper_open', 8 ); - add_action( 'woocommerce_shop_loop_item_title', 'generatepress_wc_image_wrapper_close', 8 ); - add_action( 'woocommerce_before_subcategory_title', 'generatepress_wc_image_wrapper_close', 20 ); - - $archive_results_count = generatepress_wc_get_setting( 'product_results_count' ); - $archive_sorting = generatepress_wc_get_setting( 'product_sorting' ); - $archive_image = generatepress_wc_get_setting( 'product_archive_image' ); - $archive_sale_flash = generatepress_wc_get_setting( 'product_archive_sale_flash' ); - $archive_sale_flash_overlay = generatepress_wc_get_setting( 'product_archive_sale_flash_overlay' ); - $archive_rating = generatepress_wc_get_setting( 'product_archive_rating' ); - $archive_price = generatepress_wc_get_setting( 'product_archive_price' ); - $archive_add_to_cart = generatepress_wc_get_setting( 'product_archive_add_to_cart' ); - $archive_title = generatepress_wc_get_setting( 'product_archive_title' ); - $single_product_sale_flash = generatepress_wc_get_setting( 'single_product_sale_flash' ); - $product_tabs = generatepress_wc_get_setting( 'product_tabs' ); - $product_related = generatepress_wc_get_setting( 'product_related' ); - $product_upsells = generatepress_wc_get_setting( 'product_upsells' ); - $product_meta = generatepress_wc_get_setting( 'product_meta' ); - $product_description = generatepress_wc_get_setting( 'product_description' ); - $breadcrumbs = generatepress_wc_get_setting( 'breadcrumbs' ); - $page_title = generatepress_wc_get_setting( 'shop_page_title' ); - $distraction_free = generatepress_wc_get_setting( 'distraction_free' ); - $archive_description = generatepress_wc_get_setting( 'product_archive_description' ); - - if ( false === $page_title ) { - add_filter( 'woocommerce_show_page_title', '__return_false' ); - } - - if ( false === $archive_results_count ) { - remove_action( 'woocommerce_after_shop_loop', 'woocommerce_result_count', 20 ); - remove_action( 'woocommerce_before_shop_loop', 'woocommerce_result_count', 20 ); - } - - if ( false === $archive_sorting ) { - remove_action( 'woocommerce_before_shop_loop', 'woocommerce_catalog_ordering', 10 ); - } - - if ( false === $archive_image ) { - remove_action( 'woocommerce_before_shop_loop_item_title', 'woocommerce_template_loop_product_thumbnail', 10 ); - } - - if ( false === $archive_sale_flash_overlay ) { - remove_action( 'woocommerce_before_shop_loop_item_title', 'woocommerce_show_product_loop_sale_flash', 10 ); - add_action( 'woocommerce_after_shop_loop_item_title', 'woocommerce_show_product_loop_sale_flash', 6 ); - } - - if ( false === $archive_sale_flash ) { - if ( false === $archive_sale_flash_overlay ) { - remove_action( 'woocommerce_after_shop_loop_item_title', 'woocommerce_show_product_loop_sale_flash', 6 ); - } else { - remove_action( 'woocommerce_before_shop_loop_item_title', 'woocommerce_show_product_loop_sale_flash', 10 ); - } - } - - if ( false === $single_product_sale_flash ) { - remove_action( 'woocommerce_before_single_product_summary', 'woocommerce_show_product_sale_flash', 10 ); - } - - if ( false === $archive_rating ) { - remove_action( 'woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_rating', 5 ); - } - - if ( false === $archive_price ) { - remove_action( 'woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_price', 10 ); - } - - if ( false === $archive_add_to_cart ) { - remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart', 10 ); - } - - if ( false === $archive_title ) { - remove_action( 'woocommerce_shop_loop_item_title', 'woocommerce_template_loop_product_title', 10 ); - } - - if ( false === $product_tabs ) { - remove_action( 'woocommerce_after_single_product_summary', 'woocommerce_output_product_data_tabs', 10 ); - } - - if ( false === $product_related ) { - remove_action( 'woocommerce_after_single_product_summary', 'woocommerce_output_related_products', 20 ); - } - - if ( false === $product_upsells ) { - remove_action( 'woocommerce_after_single_product_summary', 'woocommerce_upsell_display', 15 ); - } - - if ( false === $product_meta ) { - remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_meta', 40 ); - } - - if ( false === $product_description ) { - remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_excerpt', 20 ); - } - - if ( false === $breadcrumbs ) { - remove_action( 'woocommerce_before_main_content', 'woocommerce_breadcrumb', 20, 0); - } - - if ( true === $distraction_free ) { - add_filter( 'generate_sidebar_layout', 'generatepress_wc_checkout_sidebar_layout' ); - add_filter( 'generate_footer_widgets', 'generatepress_wc_checkout_footer_widgets' ); - } - - if ( true === $archive_description && ! is_single() && ! is_cart() ) { - add_action( 'woocommerce_after_shop_loop_item_title', 'woocommerce_template_single_excerpt', 5 ); - add_action( 'woocommerce_after_subcategory_title', 'generatepress_wc_category_description', 12 ); - } -} - -/** - * Set the WC checkout sidebar layout. - * - * @since 1.3 - * - * @param string $layout Existing sidebar layout. - * @return string New sidebar layout. - */ -function generatepress_wc_checkout_sidebar_layout( $layout ) { - if ( ! function_exists( 'is_checkout' ) ) { - return $layout; - } - - if ( is_checkout() ) { - return 'no-sidebar'; - } - - return $layout; -} - -/** - * Set the WC checkout footer widgets. - * - * @since 1.3 - * - * @param int $widgets Existing number of widgets. - * @return int New number of widgets. - */ -function generatepress_wc_checkout_footer_widgets( $widgets ) { - if ( ! function_exists( 'is_checkout' ) ) { - return $widgets; - } - - if ( is_checkout() ) { - return '0'; - } - - return $widgets; -} - -add_filter( 'wp_nav_menu_items', 'generatepress_wc_menu_cart', 10, 2 ); -/** - * Add the WC cart menu item. - * - * @since 1.3 - * - * @param string $nav The HTML list content for the menu items. - * @param stdClass $args An object containing wp_nav_menu() arguments. - * @return string The search icon menu item. - */ -function generatepress_wc_menu_cart( $nav, $args ) { - if ( function_exists( 'generate_is_using_flexbox' ) && generate_is_using_flexbox() ) { - return $nav; - } - - // If our primary menu is set, add the search icon. - if ( apply_filters( 'generate_woocommerce_menu_item_location', 'primary' ) === $args->theme_location && generatepress_wc_get_setting( 'cart_menu_item' ) ) { - if ( ! class_exists( 'WooCommerce' ) ) { - return; - } - - if ( ! isset( WC()->cart ) ) { - return; - } - - $has_items = false; - - if ( ! WC()->cart->is_empty() ) { - $has_items = 'has-items'; - } - - return sprintf( - '%1$s - ', - $nav, - generatepress_wc_cart_link(), - is_cart() ? 'current-menu-item' : '', - $has_items - ); - } - - // Our primary menu isn't set, return the regular nav. - return $nav; -} - -add_action( 'wp', 'generatepress_wc_add_menu_bar_items' ); -/** - * Add to the menu bar items. - * - * @since 1.11.0 - */ -function generatepress_wc_add_menu_bar_items() { - if ( function_exists( 'generate_is_using_flexbox' ) && generate_is_using_flexbox() ) { - if ( 'secondary' === apply_filters( 'generate_woocommerce_menu_item_location', 'primary' ) && generatepress_wc_get_setting( 'cart_menu_item' ) ) { - add_action( 'generate_secondary_menu_bar_items', 'generate_wc_do_cart_secondary_menu_item', 5 ); - } - - if ( 'primary' === apply_filters( 'generate_woocommerce_menu_item_location', 'primary' ) && generatepress_wc_get_setting( 'cart_menu_item' ) ) { - add_action( 'generate_menu_bar_items', 'generate_wc_do_cart_menu_item', 5 ); - } - } -} - -/** - * Add the cart menu item to the secondary navigation. - */ -function generate_wc_do_cart_secondary_menu_item() { - if ( function_exists( 'generate_is_using_flexbox' ) && generate_is_using_flexbox() ) { - if ( 'secondary' === apply_filters( 'generate_woocommerce_menu_item_location', 'primary' ) && generatepress_wc_get_setting( 'cart_menu_item' ) ) { - if ( ! class_exists( 'WooCommerce' ) ) { - return; - } - - if ( ! isset( WC()->cart ) ) { - return; - } - - $has_items = false; - - if ( ! WC()->cart->is_empty() ) { - $has_items = 'has-items'; - } - - printf( - ' - %1$s - ', - generatepress_wc_cart_link(), - is_cart() ? 'current-menu-item' : '', - $has_items - ); - } - } -} - -/** - * Add the cart menu item to the navigation. - * - * @since 1.11.0 - */ -function generate_wc_do_cart_menu_item() { - if ( function_exists( 'generate_is_using_flexbox' ) && generate_is_using_flexbox() ) { - if ( 'primary' === apply_filters( 'generate_woocommerce_menu_item_location', 'primary' ) && generatepress_wc_get_setting( 'cart_menu_item' ) ) { - if ( ! class_exists( 'WooCommerce' ) ) { - return; - } - - if ( ! isset( WC()->cart ) ) { - return; - } - - $has_items = false; - - if ( ! WC()->cart->is_empty() ) { - $has_items = 'has-items'; - } - - printf( - ' - %1$s - ', - generatepress_wc_cart_link(), - is_cart() ? 'current-menu-item' : '', - $has_items - ); - } - } -} - -/** - * Build the menu cart link. - * - * @since 1.3 - */ -function generatepress_wc_cart_link() { - // Kept for backward compatibility. - $legacy_icon = apply_filters( 'generate_woocommerce_menu_cart_icon', '' ); - - // Get the icon type. - $icon_type = generatepress_wc_get_setting( 'cart_menu_item_icon' ); - - $icon = ''; - - if ( function_exists( 'generate_get_svg_icon' ) ) { - $icon = generate_get_svg_icon( $icon_type ); - } - - ob_start(); - - if ( ! class_exists( 'WooCommerce' ) ) { - return; - } - - if ( ! isset( WC()->cart ) ) { - return; - } - - $no_items = ''; - - if ( ! WC()->cart->get_cart_contents_count() > 0 ) { - $no_items = 'no-items'; - } - - printf( - '%5$s%6$s%7$s%8$s', - esc_url( wc_get_cart_url() ), - esc_attr( $icon_type ), - $icon ? 'has-svg-icon' : '', - esc_attr__( 'View your shopping cart', 'gp-premium' ), - $icon, - sprintf( - '%2$s', - $no_items, - WC()->cart->get_cart_contents_count() - ), - $legacy_icon, - WC()->cart->subtotal > 0 ? wp_kses_data( WC()->cart->get_cart_subtotal() ) : '' - ); - - if ( generatepress_wc_get_setting( 'menu_mini_cart' ) && ! is_cart() ) : ?> - - cart ) ) { - $fragments['.cart-contents span.amount'] = ( WC()->cart->subtotal > 0 ) ? '' . wp_kses_data( WC()->cart->get_cart_subtotal() ) . '' : ''; - $fragments['.cart-contents span.number-of-items'] = ( WC()->cart->get_cart_contents_count() > 0 ) ? '' . wp_kses_data( WC()->cart->get_cart_contents_count() ) . '' : ''; - } - - return $fragments; -} - -/** - * Add the cart icon in the mobile menu. - * - * @since 1.3 - */ -function generatepress_wc_mobile_cart_link() { - if ( function_exists( 'generate_is_using_flexbox' ) && generate_is_using_flexbox() ) { - return; - } - - if ( ! generatepress_wc_get_setting( 'cart_menu_item' ) || 'primary' !== apply_filters( 'generate_woocommerce_menu_item_location', 'primary' ) ) { - return; - } - - if ( ! class_exists( 'WooCommerce' ) ) { - return; - } - - if ( ! isset( WC()->cart ) ) { - return; - } - - $has_items = false; - - if ( ! WC()->cart->is_empty() ) { - $has_items = ' has-items'; - } - ?> -
          - - -
          - set_selector( '.woocommerce ul.products li.product .woocommerce-LoopProduct-link' ); - $css->add_property( 'color', esc_attr( $settings['wc_product_title_color'] ) ); - - // Product title color hover. - $css->set_selector( '.woocommerce ul.products li.product .woocommerce-LoopProduct-link:hover' ); - $css->add_property( 'color', esc_attr( $settings['wc_product_title_color_hover'] ) ); - - if ( ! $using_dynamic_typography ) { - // Product title font size. - $css->set_selector( '.woocommerce ul.products li.product .woocommerce-LoopProduct-link h2, .woocommerce ul.products li.product .woocommerce-loop-category__title' ); - $css->add_property( 'font-weight', esc_attr( $settings['wc_product_title_font_weight'] ) ); - $css->add_property( 'text-transform', esc_attr( $settings['wc_product_title_font_transform'] ) ); - $css->add_property( 'font-size', esc_attr( $settings['wc_product_title_font_size'] ), false, 'px' ); - - $css->set_selector( '.woocommerce .up-sells ul.products li.product .woocommerce-LoopProduct-link h2, .woocommerce .cross-sells ul.products li.product .woocommerce-LoopProduct-link h2, .woocommerce .related ul.products li.product .woocommerce-LoopProduct-link h2' ); - if ( '' !== $settings['wc_related_product_title_font_size'] ) { - $css->add_property( 'font-size', esc_attr( $settings['wc_related_product_title_font_size'] ), false, 'px' ); - } - } - - // Primary button. - $css->set_selector( '.woocommerce #respond input#submit, .woocommerce a.button, .woocommerce button.button, .woocommerce input.button' ); - $css->add_property( 'color', esc_attr( $settings['form_button_text_color'] ) ); - $css->add_property( 'background-color', esc_attr( $settings['form_button_background_color'] ) ); - - if ( ! $using_dynamic_typography && isset( $settings['buttons_font_size'] ) ) { - $css->add_property( 'font-weight', esc_attr( $settings['buttons_font_weight'] ) ); - $css->add_property( 'text-transform', esc_attr( $settings['buttons_font_transform'] ) ); - - if ( '' !== $settings['buttons_font_size'] ) { - $css->add_property( 'font-size', absint( $settings['buttons_font_size'] ), false, 'px' ); - } - } - - if ( $using_dynamic_typography && class_exists( 'GeneratePress_Typography' ) ) { - $typography = generate_get_option( 'typography' ); - - foreach ( (array) $typography as $key => $data ) { - if ( 'buttons' === $data['selector'] ) { - $unit = isset( $data['fontSizeUnit'] ) ? $data['fontSizeUnit'] : 'px'; - - if ( ! empty( $data['fontSize'] ) ) { - $css->add_property( 'font-size', floatval( $data['fontSize'] ), false, $unit ); - } - - if ( ! empty( $data['fontWeight'] ) ) { - $css->add_property( 'font-weight', esc_attr( $data['fontWeight'] ) ); - } - - if ( ! empty( $data['textTransform'] ) ) { - $css->add_property( 'text-transform', esc_attr( $data['textTransform'] ) ); - } - - if ( ! empty( $data['fontSizeTablet'] ) ) { - $css->start_media_query( generate_premium_get_media_query( 'tablet' ) ); - $css->add_property( 'font-size', floatval( $data['fontSizeTablet'] ), false, $unit ); - $css->stop_media_query(); - } - - if ( ! empty( $data['fontSizeMobile'] ) ) { - $css->start_media_query( generate_premium_get_media_query( 'mobile' ) ); - $css->add_property( 'font-size', floatval( $data['fontSizeMobile'] ), false, $unit ); - $css->stop_media_query(); - } - } - } - } - - // Primary button hover. - $css->set_selector( '.woocommerce #respond input#submit:hover, .woocommerce a.button:hover, .woocommerce button.button:hover, .woocommerce input.button:hover' ); - $css->add_property( 'color', esc_attr( $settings['form_button_text_color_hover'] ) ); - $css->add_property( 'background-color', esc_attr( $settings['form_button_background_color_hover'] ) ); - - // Alt button. - $css->set_selector( '.woocommerce #respond input#submit.alt, .woocommerce a.button.alt, .woocommerce button.button.alt, .woocommerce input.button.alt, .woocommerce #respond input#submit.alt.disabled, .woocommerce #respond input#submit.alt.disabled:hover, .woocommerce #respond input#submit.alt:disabled, .woocommerce #respond input#submit.alt:disabled:hover, .woocommerce #respond input#submit.alt:disabled[disabled], .woocommerce #respond input#submit.alt:disabled[disabled]:hover, .woocommerce a.button.alt.disabled, .woocommerce a.button.alt.disabled:hover, .woocommerce a.button.alt:disabled, .woocommerce a.button.alt:disabled:hover, .woocommerce a.button.alt:disabled[disabled], .woocommerce a.button.alt:disabled[disabled]:hover, .woocommerce button.button.alt.disabled, .woocommerce button.button.alt.disabled:hover, .woocommerce button.button.alt:disabled, .woocommerce button.button.alt:disabled:hover, .woocommerce button.button.alt:disabled[disabled], .woocommerce button.button.alt:disabled[disabled]:hover, .woocommerce input.button.alt.disabled, .woocommerce input.button.alt.disabled:hover, .woocommerce input.button.alt:disabled, .woocommerce input.button.alt:disabled:hover, .woocommerce input.button.alt:disabled[disabled], .woocommerce input.button.alt:disabled[disabled]:hover' ); - $css->add_property( 'color', esc_attr( $settings['wc_alt_button_text'] ) ); - $css->add_property( 'background-color', esc_attr( $settings['wc_alt_button_background'] ) ); - - // Alt button hover. - $css->set_selector( '.woocommerce #respond input#submit.alt:hover, .woocommerce a.button.alt:hover, .woocommerce button.button.alt:hover, .woocommerce input.button.alt:hover' ); - $css->add_property( 'color', esc_attr( $settings['wc_alt_button_text_hover'] ) ); - $css->add_property( 'background-color', esc_attr( $settings['wc_alt_button_background_hover'] ) ); - - // Star rating. - $css->set_selector( '.woocommerce .star-rating span:before, .woocommerce p.stars:hover a::before' ); - $css->add_property( 'color', esc_attr( $settings['wc_rating_stars'] ) ); - - // Sale sticker. - $css->set_selector( '.woocommerce span.onsale' ); - $css->add_property( 'background-color', esc_attr( $settings['wc_sale_sticker_background'] ) ); - $css->add_property( 'color', esc_attr( $settings['wc_sale_sticker_text'] ) ); - - // Price. - $css->set_selector( '.woocommerce ul.products li.product .price, .woocommerce div.product p.price' ); - $css->add_property( 'color', esc_attr( $settings['wc_price_color'] ) ); - - // Product tab. - $css->set_selector( '.woocommerce div.product .woocommerce-tabs ul.tabs li a' ); - $css->add_property( 'color', esc_attr( $settings['wc_product_tab'] ) ); - - // Highlight product tab. - $css->set_selector( '.woocommerce div.product .woocommerce-tabs ul.tabs li a:hover, .woocommerce div.product .woocommerce-tabs ul.tabs li.active a' ); - $css->add_property( 'color', esc_attr( $settings['wc_product_tab_highlight'] ) ); - - // Success message. - $css->set_selector( '.woocommerce-message' ); - $css->add_property( 'background-color', esc_attr( $settings['wc_success_message_background'] ) ); - $css->add_property( 'color', esc_attr( $settings['wc_success_message_text'] ) ); - - $css->set_selector( 'div.woocommerce-message a.button, div.woocommerce-message a.button:focus, div.woocommerce-message a.button:hover, div.woocommerce-message a, div.woocommerce-message a:focus, div.woocommerce-message a:hover' ); - $css->add_property( 'color', esc_attr( $settings['wc_success_message_text'] ) ); - - // Info message. - $css->set_selector( '.woocommerce-info' ); - $css->add_property( 'background-color', esc_attr( $settings['wc_info_message_background'] ) ); - $css->add_property( 'color', esc_attr( $settings['wc_info_message_text'] ) ); - - $css->set_selector( 'div.woocommerce-info a.button, div.woocommerce-info a.button:focus, div.woocommerce-info a.button:hover, div.woocommerce-info a, div.woocommerce-info a:focus, div.woocommerce-info a:hover' ); - $css->add_property( 'color', esc_attr( $settings['wc_info_message_text'] ) ); - - // Info message. - $css->set_selector( '.woocommerce-error' ); - $css->add_property( 'background-color', esc_attr( $settings['wc_error_message_background'] ) ); - $css->add_property( 'color', esc_attr( $settings['wc_error_message_text'] ) ); - - $css->set_selector( 'div.woocommerce-error a.button, div.woocommerce-error a.button:focus, div.woocommerce-error a.button:hover, div.woocommerce-error a, div.woocommerce-error a:focus, div.woocommerce-error a:hover' ); - $css->add_property( 'color', esc_attr( $settings['wc_error_message_text'] ) ); - - // Archive short description. - $css->set_selector( '.woocommerce-product-details__short-description' ); - if ( '' !== $settings['content_text_color'] ) { - $css->add_property( 'color', esc_attr( $settings['content_text_color'] ) ); - } else { - $css->add_property( 'color', esc_attr( $settings['text_color'] ) ); - } - - $css->set_selector( '#wc-mini-cart' ); - $css->add_property( 'background-color', esc_attr( $settings['wc_mini_cart_background_color'] ) ); - $css->add_property( 'color', esc_attr( $settings['wc_mini_cart_text_color'] ) ); - - $css->set_selector( '#wc-mini-cart a:not(.button), #wc-mini-cart a.remove' ); - $css->add_property( 'color', esc_attr( $settings['wc_mini_cart_text_color'] ) ); - - $css->set_selector( '#wc-mini-cart .button' ); - if ( $settings['wc_mini_cart_button_background'] ) { - $css->add_property( 'background-color', esc_attr( $settings['wc_mini_cart_button_background'] ) ); - } - - if ( $settings['wc_mini_cart_button_text'] ) { - $css->add_property( 'color', esc_attr( $settings['wc_mini_cart_button_text'] ) ); - } else { - $css->add_property( 'color', esc_attr( $settings['form_button_text_color'] ) ); - } - - $css->set_selector( '#wc-mini-cart .button:hover, #wc-mini-cart .button:focus, #wc-mini-cart .button:active' ); - $css->add_property( 'background-color', esc_attr( $settings['wc_mini_cart_button_background_hover'] ) ); - - if ( $settings['wc_mini_cart_button_text_hover'] ) { - $css->add_property( 'color', esc_attr( $settings['wc_mini_cart_button_text_hover'] ) ); - } else { - $css->add_property( 'color', esc_attr( $settings['form_button_text_color_hover'] ) ); - } - - $css->set_selector( '.woocommerce #content div.product div.images, .woocommerce div.product div.images, .woocommerce-page #content div.product div.images, .woocommerce-page div.product div.images' ); - $css->add_property( 'width', absint( generatepress_wc_get_setting( 'single_product_image_width' ) ), false, '%' ); - - if ( ! $using_dynamic_typography && function_exists( 'generate_get_font_family_css' ) ) { - $buttons_family = generate_get_font_family_css( 'font_buttons', 'generate_settings', generate_get_default_fonts() ); - $css->set_selector( '.woocommerce.widget_shopping_cart .woocommerce-mini-cart__buttons a' ); - $css->add_property( 'font-family', $buttons_family ); - } - - $css->set_selector( '.add-to-cart-panel' ); - $css->add_property( 'background-color', esc_attr( $settings['wc_panel_cart_background_color'] ) ); - $css->add_property( 'color', esc_attr( $settings['wc_panel_cart_text_color'] ) ); - - $css->set_selector( '.add-to-cart-panel a:not(.button)' ); - $css->add_property( 'color', esc_attr( $settings['wc_panel_cart_text_color'] ) ); - - $css->set_selector( '#wc-sticky-cart-panel .button' ); - $css->add_property( 'background-color', esc_attr( $settings['wc_panel_cart_button_background'] ) ); - $css->add_property( 'color', esc_attr( $settings['wc_panel_cart_button_text'] ) ); - - $css->set_selector( '#wc-sticky-cart-panel .button:hover, #wc-sticky-cart-panel .button:focus, #wc-sticky-cart-panel .button:active' ); - $css->add_property( 'background-color', esc_attr( $settings['wc_panel_cart_button_background_hover'] ) ); - $css->add_property( 'color', esc_attr( $settings['wc_panel_cart_button_text_hover'] ) ); - - $transparent_border_color = $settings['text_color']; - - if ( $settings['content_text_color'] ) { - $transparent_border_color = $settings['content_text_color']; - } - - $transparent_border_color = generate_premium_check_text_color( $transparent_border_color ); - - if ( 'light' === $transparent_border_color ) { - $transparent_border_elements = '.woocommerce-ordering select, .variations .value select'; - - if ( generatepress_wc_get_setting( 'quantity_buttons' ) ) { - $transparent_border_elements = '.woocommerce form .quantity.buttons-added .qty, .woocommerce form .quantity.buttons-added .minus, .woocommerce form .quantity.buttons-added .plus, .do-quantity-buttons form .quantity:not(.buttons-added):before, .do-quantity-buttons form .quantity:not(.buttons-added):after, .woocommerce-ordering select, .variations .value select'; - } - - $css->set_selector( $transparent_border_elements ); - $css->add_property( 'border-color', 'rgba(255,255,255,0.1)' ); - - if ( generatepress_wc_get_setting( 'sticky_add_to_cart_panel' ) ) { - $css->set_selector( '#wc-sticky-cart-panel .quantity.buttons-added .qty, #wc-sticky-cart-panel .quantity.buttons-added .minus, #wc-sticky-cart-panel .quantity.buttons-added .plus' ); - $css->add_property( 'border-color', 'rgba(255,255,255,0.1)' ); - } - } - - $css->set_selector( '.woocommerce .widget_price_filter .price_slider_wrapper .ui-widget-content' ); - $css->add_property( 'background-color', esc_attr( $settings['wc_price_slider_background_color'] ) ); - - $css->set_selector( '.woocommerce .widget_price_filter .ui-slider .ui-slider-range, .woocommerce .widget_price_filter .ui-slider .ui-slider-handle' ); - $css->add_property( 'background-color', esc_attr( $settings['wc_price_slider_bar_color'] ) ); - - if ( 'number' === generatepress_wc_get_setting( 'cart_menu_item_content' ) ) { - $nav_text_color = generate_premium_check_text_color( $settings['navigation_text_color'] ); - - $css->set_selector( '.cart-contents > span.number-of-items' ); - if ( 'light' === $nav_text_color ) { - $css->add_property( 'background-color', 'rgba(255,255,255,0.1)' ); - } else { - $css->add_property( 'background-color', 'rgba(0,0,0,0.05)' ); - } - - $css->set_selector( '.cart-contents .amount' ); - $css->add_property( 'display', 'none' ); - - $css->set_selector( '.cart-contents > span.number-of-items' ); - $css->add_property( 'display', 'inline-block' ); - } - - $font_icons = true; - - if ( function_exists( 'generate_get_option' ) ) { - if ( 'font' !== generate_get_option( 'icons' ) ) { - $font_icons = false; - } - } - - if ( ! $font_icons ) { - $css->set_selector( '.woocommerce-MyAccount-navigation li.is-active a:after, a.button.wc-forward:after' ); - $css->add_property( 'display', 'none' ); - - $css->set_selector( '#payment .payment_methods>.wc_payment_method>label:before' ); - $css->add_property( 'font-family', 'WooCommerce' ); - $css->add_property( 'content', '"\e039"' ); - - $css->set_selector( '#payment .payment_methods li.wc_payment_method>input[type=radio]:first-child:checked+label:before' ); - $css->add_property( 'content', '"\e03c"' ); - - $css->set_selector( '.woocommerce-ordering:after' ); - $css->add_property( 'font-family', 'WooCommerce' ); - $css->add_property( 'content', '"\e00f"' ); - } - - $css->set_selector( '.wc-columns-container .products, .woocommerce .related ul.products, .woocommerce .up-sells ul.products' ); - - if ( '' !== generatepress_wc_get_setting( 'columns_gap' ) ) { - $css->add_property( 'grid-gap', generatepress_wc_get_setting( 'columns_gap' ), false, 'px' ); - } - - $css->start_media_query( generate_premium_get_media_query( 'tablet' ) ); - $css->set_selector( '.wc-columns-container .products, .woocommerce .related ul.products, .woocommerce .up-sells ul.products' ); - - if ( '' !== generatepress_wc_get_setting( 'tablet_columns_gap' ) ) { - $css->add_property( 'grid-gap', generatepress_wc_get_setting( 'tablet_columns_gap' ), false, 'px' ); - } - - if ( 3 === generatepress_wc_get_setting( 'tablet_columns' ) ) { - $css->set_selector( '.woocommerce .wc-columns-container.wc-tablet-columns-3 .products' ); - $css->add_property( '-ms-grid-columns', '(1fr)[3]' ); - $css->add_property( 'grid-template-columns', 'repeat(3, 1fr)' ); - } - - if ( 2 === generatepress_wc_get_setting( 'tablet_columns' ) ) { - $css->set_selector( '.woocommerce .wc-columns-container.wc-tablet-columns-2 .products' ); - $css->add_property( '-ms-grid-columns', '(1fr)[2]' ); - $css->add_property( 'grid-template-columns', 'repeat(2, 1fr)' ); - } - - if ( 1 === generatepress_wc_get_setting( 'tablet_columns' ) ) { - $css->set_selector( '.woocommerce .wc-columns-container.wc-tablet-columns-1 .products' ); - $css->add_property( 'width', '100%' ); - $css->add_property( '-ms-grid-columns', '1fr' ); - $css->add_property( 'grid-template-columns', '1fr' ); - } - - if ( 3 === generatepress_wc_get_setting( 'tablet_related_upsell_columns' ) ) { - $css->set_selector( '.wc-related-upsell-tablet-columns-3 .related ul.products, .wc-related-upsell-tablet-columns-3 .up-sells ul.products' ); - $css->add_property( '-ms-grid-columns', '(1fr)[3]' ); - $css->add_property( 'grid-template-columns', 'repeat(3, 1fr)' ); - } - - if ( 2 === generatepress_wc_get_setting( 'tablet_related_upsell_columns' ) ) { - $css->set_selector( '.wc-related-upsell-tablet-columns-2 .related ul.products, .wc-related-upsell-tablet-columns-2 .up-sells ul.products' ); - $css->add_property( '-ms-grid-columns', '(1fr)[2]' ); - $css->add_property( 'grid-template-columns', 'repeat(2, 1fr)' ); - } - - if ( 1 === generatepress_wc_get_setting( 'tablet_related_upsell_columns' ) ) { - $css->set_selector( '.wc-related-upsell-tablet-columns-1 .related ul.products, .wc-related-upsell-tablet-columns-1 .up-sells ul.products' ); - $css->add_property( 'width', '100%' ); - $css->add_property( '-ms-grid-columns', '1fr' ); - $css->add_property( 'grid-template-columns', '1fr' ); - } - $css->stop_media_query(); - - $css->start_media_query( generate_premium_get_media_query( 'mobile' ) ); - if ( ! $using_dynamic_typography ) { - $css->set_selector( '.woocommerce ul.products li.product .woocommerce-LoopProduct-link h2, .woocommerce ul.products li.product .woocommerce-loop-category__title' ); - if ( '' !== $settings[ 'mobile_wc_product_title_font_size' ] ) { - $css->add_property( 'font-size', esc_attr( $settings[ 'mobile_wc_product_title_font_size' ] ), false, 'px' ); - } - } - - $css->set_selector( '.add-to-cart-panel .continue-shopping' ); - $css->add_property( 'background-color', esc_attr( $settings['wc_panel_cart_background_color'] ) ); - - $css->set_selector( '.wc-columns-container .products, .woocommerce .related ul.products, .woocommerce .up-sells ul.products' ); - - if ( '' !== generatepress_wc_get_setting( 'mobile_columns_gap' ) ) { - $css->add_property( 'grid-gap', generatepress_wc_get_setting( 'mobile_columns_gap' ), false, 'px' ); - } - - $css->set_selector( '.woocommerce #content div.product div.images,.woocommerce div.product div.images,.woocommerce-page #content div.product div.images,.woocommerce-page div.product div.images' ); - $css->add_property( 'width', '100%' ); - $css->stop_media_query(); - - $using_flex = false; - - if ( function_exists( 'generate_is_using_flexbox' ) && generate_is_using_flexbox() ) { - $using_flex = true; - } - - $css->start_media_query( generate_premium_get_media_query( 'mobile-menu' ) ); - if ( ! $using_flex ) { - $css->set_selector( '.mobile-bar-items + .menu-toggle' ); - $css->add_property( 'text-align', 'left' ); - } - - $css->set_selector( 'nav.toggled .main-nav li.wc-menu-item' ); - $css->add_property( 'display', 'none !important' ); - - if ( ! $using_flex ) { - $css->set_selector( 'body.nav-search-enabled .wc-menu-cart-activated:not(#mobile-header) .mobile-bar-items' ); - $css->add_property( 'float', 'right' ); - $css->add_property( 'position', 'relative' ); - - $css->set_selector( '.nav-search-enabled .wc-menu-cart-activated:not(#mobile-header) .menu-toggle' ); - $css->add_property( 'float', 'left' ); - $css->add_property( 'width', 'auto' ); - } - - $css->set_selector( '.mobile-bar-items.wc-mobile-cart-items' ); - $css->add_property( 'z-index', '1' ); - $css->stop_media_query(); - - return $css->css_output(); -} - -add_action( 'wp_enqueue_scripts', 'generatepress_wc_enqueue_css', 100 ); -/** - * Enqueue our dynamic CSS. - * - * @since 1.3 - */ -function generatepress_wc_enqueue_css() { - wp_add_inline_style( 'generate-woocommerce', generatepress_wc_css() ); - - if ( class_exists( 'GeneratePress_Typography' ) ) { - wp_add_inline_style( 'generate-woocommerce', GeneratePress_Typography::get_css( 'woocommerce' ) ); - } -} - -/** - * Open WC image wrapper. - * - * @since 1.3 - */ -function generatepress_wc_image_wrapper_open() { - if ( generatepress_wc_get_setting( 'product_archive_image' ) ) { - echo '
          '; - } -} - -/** - * Close WC image wrapper. - * - * @since 1.3 - */ -function generatepress_wc_image_wrapper_close() { - if ( generatepress_wc_get_setting( 'product_archive_image' ) ) { - echo '
          '; - } -} - -add_filter( 'post_class', 'generatepress_wc_product_has_gallery' ); -add_filter( 'product_cat_class', 'generatepress_wc_product_has_gallery' ); -/** - * Add product image post classes to products. - * - * @since 1.3 - * - * @param array $classes Existing classes. - * @return array New classes. - */ -function generatepress_wc_product_has_gallery( $classes ) { - - $post_type = get_post_type( get_the_ID() ); - - if ( 'product' === $post_type && method_exists( 'WC_Product', 'get_gallery_image_ids' ) ) { - $product = wc_get_product( get_the_ID() ); - $attachment_ids = $product->get_gallery_image_ids(); - - if ( $attachment_ids && generatepress_wc_get_setting( 'product_secondary_image' ) && generatepress_wc_get_setting( 'product_archive_image' ) && has_post_thumbnail() ) { - $classes[] = 'wc-has-gallery'; - } - } - - return $classes; -} - -add_action( 'woocommerce_before_shop_loop_item_title', 'generatepress_wc_secondary_product_image' ); -/** - * Add secondary product image. - * - * @since 1.3 - */ -function generatepress_wc_secondary_product_image() { - $post_type = get_post_type( get_the_ID() ); - - if ( 'product' === $post_type && method_exists( 'WC_Product', 'get_gallery_image_ids' ) ) { - $product = wc_get_product( get_the_ID() ); - $attachment_ids = $product->get_gallery_image_ids(); - - if ( $attachment_ids && generatepress_wc_get_setting( 'product_secondary_image' ) && generatepress_wc_get_setting( 'product_archive_image' ) && has_post_thumbnail() ) { - $secondary_image_id = $attachment_ids['0']; - echo wp_get_attachment_image( $secondary_image_id, 'woocommerce_thumbnail', '', $attr = array( 'class' => 'secondary-image attachment-shop-catalog' ) ); - } - } -} - -add_filter( 'woocommerce_product_get_rating_html', 'generatepress_wc_rating_html', 10, 2 ); -/** - * Always show ratings area to make sure products are similar heights. - * - * @since 1.3.1 - * - * @param string $rating_html - * @param int $rating - * @return string - */ -function generatepress_wc_rating_html( $rating_html, $rating ) { - if ( $rating > 0 ) { - $title = sprintf( __( 'Rated %s out of 5', 'gp-premium' ), $rating ); - } else { - $title = __( 'Not yet rated', 'gp-premium' ); - $rating = 0; - } - - $rating_html = '
          '; - $rating_html .= '' . $rating . ' ' . __( 'out of 5', 'gp-premium' ) . ''; - $rating_html .= '
          '; - - return $rating_html; -} - -/** - * Add WC category description. - * - * @since 1.3 - * - * @param array $category - * @return string - */ -function generatepress_wc_category_description( $category ) { - $prod_term = get_term( $category->term_id, 'product_cat' ); - $description = $prod_term->description; - echo '
          ' . $description . '
          '; -} - -add_action( 'generate_after_footer', 'generatepress_wc_add_to_cart_helper' ); -/** - * Adds a sticky/slide down navigation with add to cart details. - * - * @since 1.8 - */ -function generatepress_wc_add_to_cart_helper() { - if ( ! generatepress_wc_get_setting( 'off_canvas_panel_on_add_to_cart' ) && ! generatepress_wc_get_setting( 'sticky_add_to_cart_panel' ) ) { - return; - } - - $outer_classes = array( - 'add-to-cart-panel', - ); - - $inner_classes = array( - 'inside-add-to-cart-panel', - ); - - if ( function_exists( 'generate_get_option' ) ) { - if ( 'contained-nav' === generate_get_option( 'nav_layout_setting' ) ) { - $outer_classes[] = 'grid-container grid-parent'; - } - - if ( 'contained' === generate_get_option( 'nav_inner_width' ) ) { - $inner_classes[] = 'grid-container grid-parent'; - } - } - ?> -
          -
          - - -
          - - -
          - -
          -
          - -
          - -
          - cart ) ) { - echo sprintf( _n( '%d item', '%d items', WC()->cart->get_cart_contents_count(), 'gp-premium' ), WC()->cart->get_cart_contents_count() ); ?> - cart->get_cart_total(); - } - ?> -
          -
          - - - %s -
          ', - esc_url( wc_get_checkout_url() ), - esc_html__( 'Checkout', 'gp-premium' ) - ) - ); - ?> - -
          - -
          - -
          - -
          - - get_price() ) : ?> -
          - get_price_html(); ?> -
          - is_type( 'simple' ) ) { - $args = array( - 'min_value' => apply_filters( 'woocommerce_quantity_input_min', $product->get_min_purchase_quantity(), $product ), - 'max_value' => apply_filters( 'woocommerce_quantity_input_max', $product->get_max_purchase_quantity(), $product ), - ); - - $action = sprintf( - '
          - %3$s - -
          ', - esc_url( $product->add_to_cart_url() ), - $quantity_buttons, - woocommerce_quantity_input( $args, $product, false ), - esc_html( $product->add_to_cart_text() ) - ); - } - - if ( $product->is_type( 'variable' ) ) { - $action = sprintf( - '', - esc_html( $product->add_to_cart_text() ) - ); - } - - if ( $product->is_type( 'external' ) ) { - $action = sprintf( - '
          - -
          ', - esc_url( $product->add_to_cart_url() ), - esc_html( $product->add_to_cart_text() ) - ); - } - - echo apply_filters( 'generate_wc_sticky_add_to_cart_action', $action, $product ); // phpcs:ignore -- No escaping needed. - endif; - ?> - -
          - - cart ) ) { - $fragments['.add-to-cart-panel .cart-data'] = '
          ' . sprintf( _n( '%d item', '%d items', WC()->cart->get_cart_contents_count(), 'gp-premium' ), WC()->cart->get_cart_contents_count() ) . ' - ' . WC()->cart->get_cart_total() . '
          '; - } - - return $fragments; -} - -/** - * If we should display the sticky add to cart panel. - * - * @since 1.8 - */ -function generatepress_wc_show_sticky_add_to_cart() { - if ( ! function_exists( 'wc_get_product' ) ) { - return false; - } - - $product = wc_get_product( get_the_ID() ); - $show = false; - - if ( ! $product || ! generatepress_wc_get_setting( 'sticky_add_to_cart_panel' ) || ! is_singular( 'product' ) ) { - return false; - } - - if ( ( $product->is_type( 'simple' ) || $product->is_type( 'variable' ) ) && $product->is_purchasable() && $product->is_in_stock() ) { - $show = true; - } - - if ( $product->is_type( 'external' ) ) { - $show = true; - } - - return apply_filters( 'generate_wc_show_sticky_add_to_cart', $show ); -} - -/** - * Checks if a color is light or dark. - * - * @since 1.8 - * @param string $color The color to check. - */ -function generate_premium_check_text_color( $color ) { - // Get the hex value if we're using variables. - if ( function_exists( 'generate_get_option' ) && strpos( $color, 'var(' ) !== false ) { - $global_colors = generate_get_option( 'global_colors' ); - $found_color = false; - - // Remove whitespace if it's been added. - $color = str_replace( ' ', '', $color ); - - foreach ( (array) $global_colors as $key => $data ) { - // Check for the full variable - var(--color) - or a variable with a fallback - var(--color,#fff). - if ( 'var(--' . $data['slug'] . ')' === $color || strpos( $color, 'var(--' . $data['slug'] . ',' ) !== false ) { - $color = $data['color']; - $found_color = true; - break; - } - } - - // If we didn't find the hex value, bail. - if ( ! $found_color ) { - return; - } - } - - $r = hexdec( substr( $color, 1, 2 ) ); - $g = hexdec( substr( $color, 3, 2 ) ); - $b = hexdec( substr( $color, 5, 2 ) ); - $yiq = ( ( $r * 299 ) + ( $g * 587 ) + ( $b * 114 ) ) / 1000; - - return ( $yiq >= 128 ) ? 'light' : 'dark'; -} - -add_filter( 'generate_typography_css_selector', 'generate_woocommerce_typography_selectors' ); -/** - * Add the WooCommerce typography CSS selectors. - * - * @since 2.1.0 - * @param string $selector The selector we're targeting. - */ -function generate_woocommerce_typography_selectors( $selector ) { - switch ( $selector ) { - case 'woocommerce-catalog-product-titles': - $selector = '.woocommerce ul.products li.product .woocommerce-LoopProduct-link h2, .woocommerce ul.products li.product .woocommerce-loop-category__title'; - break; - - case 'woocommerce-related-product-titles': - $selector = '.woocommerce .up-sells ul.products li.product .woocommerce-LoopProduct-link h2, .woocommerce .cross-sells ul.products li.product .woocommerce-LoopProduct-link h2, .woocommerce .related ul.products li.product .woocommerce-LoopProduct-link h2'; - break; - } - - return $selector; -} diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/woocommerce/functions/js/woocommerce.js b/wp-content/upgrade-temp-backup/plugins/gp-premium/woocommerce/functions/js/woocommerce.js deleted file mode 100644 index 6950977f..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/woocommerce/functions/js/woocommerce.js +++ /dev/null @@ -1,285 +0,0 @@ -jQuery( function( $ ) { - var debounce = function( callback, wait ) { - var timeout; - - return function() { - clearTimeout( timeout ); - - timeout = setTimeout( function() { - timeout = undefined; - callback.call(); - }, wait ); - }; - }; - - $( 'body' ).on( 'added_to_cart', function() { - if ( ! $( '.wc-menu-item' ).hasClass( 'has-items' ) ) { - $( '.wc-menu-item' ).addClass( 'has-items' ); - } - - if ( ! $( '.wc-mobile-cart-items' ).hasClass( 'has-items' ) ) { - $( '.wc-mobile-cart-items' ).addClass( 'has-items' ); - } - } ); - - $( 'body' ).on( 'removed_from_cart', function() { - var numberOfItems = $( '.number-of-items' ); - - if ( numberOfItems.length ) { - if ( numberOfItems.hasClass( 'no-items' ) ) { - $( '.wc-menu-item' ).removeClass( 'has-items' ); - $( '.wc-mobile-cart-items' ).removeClass( 'has-items' ); - } - } - } ); - - if ( generateWooCommerce.addToCartPanel ) { - $( document.body ).on( 'added_to_cart', function() { - var adminBar = $( '#wpadminbar' ), - stickyNav = $( '.navigation-stick' ), - top = 0; - - if ( adminBar.length ) { - top = adminBar.outerHeight(); - } - - if ( stickyNav.length && '0px' === stickyNav.css( 'top' ) ) { - top = top + stickyNav.outerHeight(); - } - - $( '.add-to-cart-panel' ).addClass( 'item-added' ).css( { - '-webkit-transform': 'translateY(' + top + 'px)', - '-ms-transform': 'translateY(' + top + 'px)', - transform: 'translateY(' + top + 'px)', - } ); - } ); - - $( '.add-to-cart-panel .continue-shopping' ).on( 'click', function( e ) { - e.preventDefault(); - - $( '.add-to-cart-panel' ).removeClass( 'item-added' ).css( { - '-webkit-transform': 'translateY(-100%)', - '-ms-transform': 'translateY(-100%)', - transform: 'translateY(-100%)', - } ); - } ); - - $( window ).on( 'scroll', debounce( function() { - var panel = $( '.add-to-cart-panel' ); - - if ( panel.hasClass( 'item-added' ) ) { - panel.removeClass( 'item-added' ).css( { - '-webkit-transform': 'translateY(-100%)', - '-ms-transform': 'translateY(-100%)', - transform: 'translateY(-100%)', - } ); - } - }, 250 ) ); - } - - if ( generateWooCommerce.stickyAddToCart ) { - var lastScroll = 0; - var scrollDownTimeout = 300; - - $( window ).on( 'scroll', debounce( function() { - var adminBar = $( '#wpadminbar' ), - stickyNav = $( '.navigation-stick' ), - stuckElement = $( '.stuckElement' ), - top = 0, - scrollTop = $( window ).scrollTop(), - panel = $( '.add-to-cart-panel' ), - panelPosition = panel.offset().top + panel.outerHeight(), - button = $( '.single_add_to_cart_button' ), - buttonTop = button.offset().top, - buttonHeight = button.outerHeight(), - footerTop = $( '.site-footer' ).offset().top; - - if ( stuckElement.length === 0 ) { - scrollDownTimeout = 0; - } - - if ( scrollTop > ( buttonTop + buttonHeight ) && panelPosition < footerTop ) { - setTimeout( function() { - if ( adminBar.length ) { - top = adminBar.outerHeight(); - } - - if ( stickyNav.length ) { - if ( stickyNav.hasClass( 'auto-hide-sticky' ) ) { - if ( scrollTop < lastScroll && '0px' === stickyNav.css( 'top' ) ) { - top = top + stickyNav.outerHeight(); - } else { - top = top; - } - - lastScroll = scrollTop; - } else { - top = top + stickyNav.outerHeight(); - } - } - - panel.addClass( 'show-sticky-add-to-cart' ).css( { - '-webkit-transform': 'translateY(' + top + 'px)', - '-ms-transform': 'translateY(' + top + 'px)', - transform: 'translateY(' + top + 'px)', - } ); - }, scrollDownTimeout ); - } else { - panel.removeClass( 'show-sticky-add-to-cart' ).css( { - '-webkit-transform': '', - '-ms-transform': '', - transform: '', - } ); - } - }, 50 ) ); - - $( '.go-to-variables' ).on( 'click', function( e ) { - e.preventDefault(); - - var offset = 0, - stickyNav = $( '.navigation-stick' ), - adminBar = $( '#wpadminbar' ); - - if ( stickyNav.length ) { - offset = stickyNav.outerHeight(); - } - - if ( adminBar.length ) { - offset = offset + adminBar.outerHeight(); - } - - $( 'html, body' ).animate( { - scrollTop: $( '.variations' ).offset().top - offset, - }, 250 ); - } ); - } - - $( function() { - 'use strict'; - - if ( generateWooCommerce.quantityButtons ) { - generateQuantityButtons(); - } - } ); - - $( document ).ajaxComplete( function() { - 'use strict'; - - if ( generateWooCommerce.quantityButtons ) { - generateQuantityButtons(); - } - } ); - - function generateQuantityButtons() { - // Check if we have an overwrite hook for this function - try { - return generateWooCommerce.hooks.generateQuantityButtons(); - } catch ( e ) { - // No hook in place, carry on - } - - // Grab the FIRST available cart form on the page - var cart = $( '.woocommerce div.product form.cart' ).first(); - - // Check if we see elementor style classes - if ( cart.closest( '.elementor-add-to-cart' ).length ) { - // Found classes, remove them and finish here - $( '.elementor.product' ).removeClass( 'do-quantity-buttons' ); - return; - } - - // Grab all the quantity boxes that need dynamic buttons adding - var quantityBoxes; - - try { - // Is there a hook available? - quantityBoxes = generateWooCommerce.selectors.generateQuantityButtons.quantityBoxes; - } catch ( e ) { - // Use the default plugin selector functionality - quantityBoxes = $( '.cart div.quantity:not(.buttons-added), .cart td.quantity:not(.buttons-added)' ).find( '.qty' ); - } - - // Test the elements have length and greater than 0 - // Try, catch here to provide basic error checking on hooked data - try { - // Nothing found... stop here - if ( quantityBoxes.length === 0 ) { - return false; - } - } catch ( e ) { - return false; - } - - // Allow the each loop callback to be completely overwritten - var quantityBoxesCallback; - - try { - // Try assign a hooked callback - quantityBoxesCallback = generateWooCommerce.callbacks.generateQuantityButtons.quantityBoxes; - } catch ( e ) { - // Use the default callback handler - quantityBoxesCallback = function( key, value ) { - var box = $( value ); - - // Check allowed types - if ( [ 'date', 'hidden' ].indexOf( box.prop( 'type' ) ) !== -1 ) { - return; - } - - // Add plus and minus icons - box.parent().addClass( 'buttons-added' ).prepend( '-' ); - box.after( '+' ); - - // Enforce min value on the input - var min = parseFloat( $( this ).attr( 'min' ) ); - - if ( min && min > 0 && parseFloat( $( this ).val() ) < min ) { - $( this ).val( min ); - } - - // Add event handlers to plus and minus (within this scope) - box.parent().find( '.plus, .minus' ).on( 'click', function() { - // Get values - var currentQuantity = parseFloat( box.val() ), - maxQuantity = parseFloat( box.attr( 'max' ) ), - minQuantity = parseFloat( box.attr( 'min' ) ), - step = box.attr( 'step' ); - - // Fallback default values - if ( ! currentQuantity || '' === currentQuantity || 'NaN' === currentQuantity ) { - currentQuantity = 0; - } - - if ( '' === maxQuantity || 'NaN' === maxQuantity ) { - maxQuantity = ''; - } - - if ( '' === minQuantity || 'NaN' === minQuantity ) { - minQuantity = 0; - } - - if ( 'any' === step || '' === step || undefined === step || 'NaN' === parseFloat( step ) ) { - step = 1; - } - - if ( $( this ).is( '.plus' ) ) { - if ( maxQuantity && ( maxQuantity === currentQuantity || currentQuantity > maxQuantity ) ) { - box.val( maxQuantity ); - } else { - box.val( currentQuantity + parseFloat( step ) ); - } - } else if ( minQuantity && ( minQuantity === currentQuantity || currentQuantity < minQuantity ) ) { - box.val( minQuantity ); - } else if ( currentQuantity > 0 ) { - box.val( currentQuantity - parseFloat( step ) ); - } - - // Trigger change event - box.trigger( 'change' ); - } ); - }; - } - - $.each( quantityBoxes, quantityBoxesCallback ); - } -} ); diff --git a/wp-content/upgrade-temp-backup/plugins/gp-premium/woocommerce/functions/js/woocommerce.min.js b/wp-content/upgrade-temp-backup/plugins/gp-premium/woocommerce/functions/js/woocommerce.min.js deleted file mode 100644 index 97f0e7aa..00000000 --- a/wp-content/upgrade-temp-backup/plugins/gp-premium/woocommerce/functions/js/woocommerce.min.js +++ /dev/null @@ -1 +0,0 @@ -jQuery(function(d){function t(t,a){var e;return function(){clearTimeout(e),e=setTimeout(function(){e=void 0,t.call()},a)}}var m,u;function a(){try{return generateWooCommerce.hooks.generateQuantityButtons()}catch(t){}var a,e;if(d(".woocommerce div.product form.cart").first().closest(".elementor-add-to-cart").length)d(".elementor.product").removeClass("do-quantity-buttons");else{try{a=generateWooCommerce.selectors.generateQuantityButtons.quantityBoxes}catch(t){a=d(".cart div.quantity:not(.buttons-added), .cart td.quantity:not(.buttons-added)").find(".qty")}try{if(0===a.length)return}catch(t){return}try{e=generateWooCommerce.callbacks.generateQuantityButtons.quantityBoxes}catch(t){e=function(t,a){var s=d(a);-1===["date","hidden"].indexOf(s.prop("type"))&&(s.parent().addClass("buttons-added").prepend('-'),s.after('+'),(a=parseFloat(d(this).attr("min")))&&0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - gp_elements - - - _generate_element_content - _generate_element_type - _generate_block_type - _generate_element_display_conditions - _generate_element_exclude_conditions - _generate_element_user_conditions - _generate_hook - _generate_hook_execute_shortcodes - _generate_hook_execute_php - _generate_hook_priority - _generate_hook_disable_site_header - _generate_hook_disable_site_footer - _generate_hero_custom_classes - _generate_hero_container - _generate_hero_inner_container - _generate_hero_horizontal_alignment - _generate_hero_padding_top - _generate_hero_padding_right - _generate_hero_padding_bottom - _generate_hero_padding_left - _generate_hero_padding_top_unit - _generate_hero_padding_right_unit - _generate_hero_padding_bottom_unit - _generate_hero_padding_left_unit - _generate_hero_padding_top_mobile - _generate_hero_padding_right_mobile - _generate_hero_padding_bottom_mobile - _generate_hero_padding_left_mobile - _generate_hero_padding_top_unit_mobile - _generate_hero_padding_right_unit_mobile - _generate_hero_padding_bottom_unit_mobile - _generate_hero_padding_left_unit_mobile - _generate_hero_background_image - _generate_hero_background_position - _generate_hero_background_parallax - _generate_hero_disable_featured_image - _generate_hero_background_overlay - _generate_hero_background_color - _generate_hero_text_color - _generate_hero_link_color - _generate_hero_background_link_color_hover - _generate_site_header_merge - _generate_site_header_height - _generate_site_header_height_mobile - _generate_site_header_background_color - _generate_site_header_title_color - _generate_site_header_tagline_color - _generate_site_logo - _generate_retina_logo - _generate_navigation_logo - _generate_mobile_logo - _generate_navigation_location - _generate_navigation_colors - _generate_navigation_background_color - _generate_navigation_text_color - _generate_navigation_background_color_hover - _generate_navigation_text_color_hover - _generate_navigation_background_color_current - _generate_navigation_text_color_current - _generate_sidebar_layout - _generate_footer_widgets - _generate_disable_site_header - _generate_disable_top_bar - _generate_disable_primary_navigation - _generate_disable_secondary_navigation - _generate_disable_featured_image - _generate_disable_content_title - _generate_disable_footer - _generate_content_area - _generate_content_width - - diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/CHANGELOG.md b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/CHANGELOG.md deleted file mode 100644 index c4e75def..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/CHANGELOG.md +++ /dev/null @@ -1,242 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file. - -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) -and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - -## 2.1.0 - 2024-04-10 -### Added -- Add data to WAF logs and add toggle for users to opt-in to share more data with us if needed. [#36377] -- Added firewall standalone mode indicator. [#34840] -- Added onboarding flows. [#34649] - -### Changed -- General: indicate compatibility with the upcoming version of WordPress, 6.5. [#35820] -- Updated package dependencies. [#36325] -- Updated package lockfile. [#35672] -- Use blog ID instead of site slug in checkout links. [#35004] - -### Fixed -- Jetpack Protect footer: Ensured that links to the cloud and the promotion around it are not shown if you are on a platform where the firewall is not supported. [#36794] -- Prevent text orphans in the site scanning header. [#35935] - -## 2.0.0 - 2024-01-18 -### Changed -- Firewall: use datetime versioning for rules file updates. [#34698] -- General: unify display of notifications across Scan and Firewall screens [#34702] -- General: indicate full compatibility with the latest version of WordPress, 6.4. [#33776] -- General: update PHP requirement to PHP 7.0+ [#34126] -- General: update WordPress version requirements to WordPress 6.3. [#34127] -- General: update package dependencies. [#34882] -- General: update lockfile. [#33607] - -### Fixed -- Fix Modal component overflow scrolling. [#34475] -- Fix Popover component styling. [#34424] -- Improved helper script installer logging. [#34297] - -## 1.4.2 - 2023-10-19 -### Changed -- General: update WordPress version requirements to WordPress 6.2. [#32762] [#32772] -- Updated Jetpack submenu sort order so individual features are alpha-sorted. [#32958] -- Updated method used to render Connection initial state. [#32499] -- Updated package dependencies. [#33692] - -## 1.4.1 - 2023-07-18 -### Changed -- Brute Force Protection: add access to feature in environments that otherwise do not support the WAF. [#31952] -- General: indicate full compatibility with the latest version of WordPress, 6.3. [#31910] -- Update WordPress version requirements. Now requires version 6.1. [#30120] -- Update package dependencies. [#31952] - -### Fixed -- Scan: Fixed sorting of threats by severity. [#31124] -- License Activation: add filtering for unattached and unrevoked licenses within upgrade flow check. [#31086] - -## 1.4.0 - 2023-05-05 -### Added -- Add brute force protection. [#28401] - -### Changed -- General: indicate full compatibility with the latest version of WordPress, 6.2. [#29341] -- Improve the firewall status heading to provide more information based on the current configuration. [#28401] -- Updated package dependencies. [#29480] - -## 1.3.0 - 2023-03-13 -### Added -- Add ability to toggle automatic and manual firewall rules independently. [#27726] -- Add improved messaging for currently enabled firewall features. [#27845] -- Disable Jetpack Firewall on unsupported environments. [#27939] -- Add link to pricing page for getting started with an existing plan or license key. [#27745] - -### Changed -- Updated package dependencies. [#29297] -- Update to React 18. [#28710] -- Use `flex-start`/`flex-end` instead of `start`/`end` for better browser compatibility. [#28530] - -### Fixed -- Fix connection button loading indicators. [#28514] -- Fix Protect status report caching. [#28766] -- Remove unnecessary full path from example in UI. [#29037] -- Other assorted fixes for minor bugs and grammar. [#27846] [#28091] [#28397] [#28273] - -## 1.2.0 - 2023-01-16 -### Added -- Add web application firewall (WAF) features [#27528] -- Add progress bar to site scannnig screen [#27171] - -### Fixed -- Poll for scan status while scanner is provisioning [#28275] -- Bug fixes - -## 1.1.2 - 2022-11-30 -### Changed -- changed description and author [#27618] -- Updated package dependencies. [#27043] - -## 1.1.1 - 2022-11-18 -### Fixed -- Fix issue with plugin activation. - -## 1.1.0 - 2022-11-17 -### Added -- Add features for paid Jetpack Scan users, including file and database threats, on-demand scanning, and threat auto-fixers. - -### Changed -- Compatibility: WordPress 6.1 compatibility - -### Fixed -- Adjust alignment of spinner icon and loading text on the in-progress scan screen. - -## 1.0.4 - 2022-08-29 -### Fixed -- Fixed NaN error that prevented the pricing interstitial from rendering. - -## 1.0.3 - 2022-08-26 -### Added -- Added a default 'See all results' label to the mobile navigation button. -- Added a spinner to the in progress scan page in admin -- Added JITM functionality -- Added threat descriptions. -- My Jetpack includes JITMs - -### Changed -- Add condition to check plugin activation context before redirecting - -### Fixed -- Fixed alignment of long navigation item labels on mobile screen sizes. - -## 1.0.2 - 2022-07-27 -### Changed -- Updated package dependencies. - -### Fixed -- Fix protect admin toolbar icon display when Jetpack enabled and connected -- Minor bug fix - added isset() checks for report data properties - -## 1.0.1 - 2022-07-07 -### Added -- Added two new FAQ entries -- Protect: record even just after the site is registered - -### Changed -- Moved normalization of the Protect status report data to the server side. -- Renamed `master` references to `trunk` -- Reorder JS imports for `import/order` eslint rule. - -### Fixed -- Fixed bug that would not display Core vulnerabilities. -- Removed legacy code and documentation and adds new docs for the debug helper plugin. -- Fixed recommendation for plugins that don't have a fix yet -- Protect: Fix visual issue of the Interstitial page - -## 1.0.0 - 2022-05-31 -### Added -- Add additional tracking events -- Add Alert icon to the error admin page -- Add checks to the Site Health page -- Add custom hook to handle viewport sizes via CSS -- Add error message when adding plugin fails -- Add first approach of Interstitial page -- Add Jetpack Scan to promotion section when site doesn't have Security bundle -- Add missing prop-types module dependency -- Add Navigation dropdown mode and use it for small/medium screens -- Add ProductOffer component -- Add product offer component -- Add title and redirect for vul at wpscan -- Add 'get themes' to synced callables in Protect -- Add installedThemes to the initial state -- Add notifications to the menu item and the admin bar -- Add status polling to the Protect admin page. -- Added details to the FAQ question on how Jetpack Protect is different from other Jetpack products. -- Added Jetpack Protect readme file for the plugin listing. -- Added option to display terms of service below product activation button. -- Added Social card to My Jetpack. -- Added the list of installed plugins to the initial state -- Change ConnectScreen by the Interstitial component -- Creates Status Class -- Empty state screen -- Expose and use IconsCard component -- Flush cache on plugin deactivation -- Footer component -- Handle error in the UI -- Hooks on plugin activation and deactivation -- Hook to read data from the initial state -- Implement Footer -- Implement Add Security bundle workflow -- Introduce Accordion component -- Introduce Navigation component -- Introduce Summary component -- Introduce VulnerabilitiesList component -- JS Components: Introduce Alert component. Add error to ProductOffer components -- More options to the testing api responses -- Record admin page-view and get security from footer events -- Render Security component with data provided by wpcom -- Request and expose to the client the Security bundle data -- Update logo - -### Changed -- Add empty state for no vuls -- Add popover at Badge -- Cache empty statuses for a short period of time -- Changed connection screen to the one that does not require a product -- Changed the method used to disconnect -- Changed the wording for the initial screen. -- Change expiration time of plugin cache -- Clean connection data. Update to latest connection API -- Configure Sync to only what we need to sync -- Janitorial: require a more recent version of WordPress now that WP 6.0 is coming out. -- JS Components: Add subTitle prop to ProductOffer component -- JS Components: iterate over Dialog component -- Improve Dialog layout in medium viewport size -- Move VulnerabilitiesList to section hero -- New VulsList -- Redesign Summary component -- Re-implement "Your results will be ready soon" layout -- Re-implement Admin page by using Dialog component -- Remove use of `pnpx` in preparation for pnpm 7.0. -- Replace deprecated external-link variation by using isExternalLink prop -- Require only site level connection -- Truncate items at NavigationGroup -- Tweak footer -- Update Footer and VulsList for small/medium viewport -- Update Navigation to be external controlled -- Update Protect icon -- Update VulnerabilitiesList to remove severity and add fixed in -- Updated package dependencies. -- Update package.json metadata. -- Updates CTA wording to reduce confusion when user already has Jetpack Security Bundle which includes Jetpack Scan -- Update the Status when connection is established -- Use data provided by My Jetpack to render Product offer -- Use weight Button prop to style the "learn more" footer link -- Use a different copy when there are no found vulnerabilities but there are still some unchecked items - -### Removed -- Removed Full Sync from loaded modules as Full Sync Immediately is present by default now - -### Fixed -- Adjust spacing and overflow properties of the navigation labels to improve display of long names. -- Fix Connectino initialization -- Fix fatal when checking whether site site has vuls -- Fix right margin in primary layout diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/LICENSE.txt b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/LICENSE.txt deleted file mode 100644 index e82774c1..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/LICENSE.txt +++ /dev/null @@ -1,357 +0,0 @@ -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - - -=================================== - - -GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - -Copyright (C) 1989, 1991 Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -Everyone is permitted to copy and distribute verbatim copies -of this license document, but changing it is not allowed. - - Preamble - -The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Lesser General Public License instead.) You can apply it to -your programs, too. - -When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - -To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - -For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - -We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - -Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - -Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - -The precise terms and conditions for copying, distribution and -modification follow. - -GNU GENERAL PUBLIC LICENSE -TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - -0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - -1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - -2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - -a) You must cause the modified files to carry prominent notices -stating that you changed the files and the date of any change. - -b) You must cause any work that you distribute or publish, that in -whole or in part contains or is derived from the Program or any -part thereof, to be licensed as a whole at no charge to all third -parties under the terms of this License. - -c) If the modified program normally reads commands interactively -when run, you must cause it, when started running for such -interactive use in the most ordinary way, to print or display an -announcement including an appropriate copyright notice and a -notice that there is no warranty (or else, saying that you provide -a warranty) and that users may redistribute the program under -these conditions, and telling the user how to view a copy of this -License. (Exception: if the Program itself is interactive but -does not normally print such an announcement, your work based on -the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - -3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - -a) Accompany it with the complete corresponding machine-readable -source code, which must be distributed under the terms of Sections -1 and 2 above on a medium customarily used for software interchange; or, - -b) Accompany it with a written offer, valid for at least three -years, to give any third party, for a charge no more than your -cost of physically performing source distribution, a complete -machine-readable copy of the corresponding source code, to be -distributed under the terms of Sections 1 and 2 above on a medium -customarily used for software interchange; or, - -c) Accompany it with the information you received as to the offer -to distribute corresponding source code. (This alternative is -allowed only for noncommercial distribution and only if you -received the program in object code or executable form with such -an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - -4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - -5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - -6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - -7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - -8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - -9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - -10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - -11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - -12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - -How to Apply These Terms to Your New Programs - -If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - -To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - -Copyright (C) - -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along -with this program; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - -Gnomovision version 69, Copyright (C) year name of author -Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. -This is free software, and you are welcome to redistribute it -under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - -Yoyodyne, Inc., hereby disclaims all copyright interest in the program -`Gnomovision' (which makes passes at compilers) written by James Hacker. - -, 1 April 1989 -Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/SECURITY.md b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/SECURITY.md deleted file mode 100644 index 98f48dd1..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/SECURITY.md +++ /dev/null @@ -1,47 +0,0 @@ -# Security Policy - -Full details of the Automattic Security Policy can be found on [automattic.com](https://automattic.com/security/). - -## Supported Versions - -Generally, only the latest version of Jetpack and its associated plugins have continued support. If a critical vulnerability is found in the current version of a plugin, we may opt to backport any patches to previous versions. - -## Reporting a Vulnerability - -Our HackerOne program covers the below plugin software, as well as a variety of related projects and infrastructure: - -* [Jetpack](https://jetpack.com/) -* Jetpack Backup -* Jetpack Boost -* Jetpack CRM -* Jetpack Protect -* Jetpack Search -* Jetpack Social -* Jetpack VideoPress - -**For responsible disclosure of security issues and to be eligible for our bug bounty program, please submit your report via the [HackerOne](https://hackerone.com/automattic) portal.** - -Our most critical targets are: - -* Jetpack and the Jetpack composer packages (all within this repo) -* Jetpack.com -- the primary marketing site. -* cloud.jetpack.com -- a management site. -* wordpress.com -- the shared management site for both Jetpack and WordPress.com sites. - -For more targets, see the `In Scope` section on [HackerOne](https://hackerone.com/automattic). - -_Please note that the **WordPress software is a separate entity** from Automattic. Please report vulnerabilities for WordPress through [the WordPress Foundation's HackerOne page](https://hackerone.com/wordpress)._ - -## Guidelines - -We're committed to working with security researchers to resolve the vulnerabilities they discover. You can help us by following these guidelines: - -* Follow [HackerOne's disclosure guidelines](https://www.hackerone.com/disclosure-guidelines). -* Pen-testing Production: - * Please **setup a local environment** instead whenever possible. Most of our code is open source (see above). - * If that's not possible, **limit any data access/modification** to the bare minimum necessary to reproduce a PoC. - * **_Don't_ automate form submissions!** That's very annoying for us, because it adds extra work for the volunteers who manage those systems, and reduces the signal/noise ratio in our communication channels. - * To be eligible for a bounty, all of these guidelines must be followed. -* Be Patient - Give us a reasonable time to correct the issue before you disclose the vulnerability. - -We also expect you to comply with all applicable laws. You're responsible to pay any taxes associated with your bounties. diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/assets/fonts/jetpack-protect.eot b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/assets/fonts/jetpack-protect.eot deleted file mode 100644 index 51f012dd..00000000 Binary files a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/assets/fonts/jetpack-protect.eot and /dev/null differ diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/assets/fonts/jetpack-protect.svg b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/assets/fonts/jetpack-protect.svg deleted file mode 100644 index 51e14560..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/assets/fonts/jetpack-protect.svg +++ /dev/null @@ -1,11 +0,0 @@ - - - -Generated by IcoMoon - - - - - - - \ No newline at end of file diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/assets/fonts/jetpack-protect.ttf b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/assets/fonts/jetpack-protect.ttf deleted file mode 100644 index c44c262f..00000000 Binary files a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/assets/fonts/jetpack-protect.ttf and /dev/null differ diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/assets/fonts/jetpack-protect.woff b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/assets/fonts/jetpack-protect.woff deleted file mode 100644 index dc898ac5..00000000 Binary files a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/assets/fonts/jetpack-protect.woff and /dev/null differ diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/assets/jetpack-protect.css b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/assets/jetpack-protect.css deleted file mode 100644 index d194c5b1..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/assets/jetpack-protect.css +++ /dev/null @@ -1,30 +0,0 @@ -@font-face { - font-family: 'jetpack-protect'; - src: url('fonts/jetpack-protect.eot?31wpn'); - src: url('fonts/jetpack-protect.eot?31wpn#iefix') format('embedded-opentype'), - url('fonts/jetpack-protect.ttf?31wpn') format('truetype'), - url('fonts/jetpack-protect.woff?31wpn') format('woff'), - url('fonts/jetpack-protect.svg?31wpn#jetpack-protect') format('svg'); - font-weight: normal; - font-style: normal; - font-display: block; - } - -[class^="jp-protect-icon"], [class*=" jp-protect-icon"] { - /* use !important to prevent issues with browser extensions that change fonts */ - font-family: 'jetpack-protect' !important; - speak: never; - font-style: normal; - font-weight: normal; - font-variant: normal; - text-transform: none; - line-height: 1; - - /* Better Font Rendering =========== */ - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; -} - -.jp-protect-icon:before { - content: "\e900"; -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/build/images/in-progress-db145d62b5ef09c05ad7.png b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/build/images/in-progress-db145d62b5ef09c05ad7.png deleted file mode 100644 index 21176718..00000000 Binary files a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/build/images/in-progress-db145d62b5ef09c05ad7.png and /dev/null differ diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/build/index.asset.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/build/index.asset.php deleted file mode 100644 index a96a7f88..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/build/index.asset.php +++ /dev/null @@ -1 +0,0 @@ - array('moment', 'react', 'wp-api-fetch', 'wp-components', 'wp-compose', 'wp-data', 'wp-date', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives', 'wp-url'), 'version' => 'c12994dcc943f0a86ea0'); diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/build/index.css b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/build/index.css deleted file mode 100644 index 6ee84fc0..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/build/index.css +++ /dev/null @@ -1 +0,0 @@ -.p4qz2tkq0p9hxucJ6Qk2{--padding:calc(var(--spacing-base)*4);color:var(--jp-black)}.lbNDyXioOwvyvbALtCBm{--gap:calc(var(--spacing-base)*3);padding:var(--padding) 0;position:relative}.s2Lsn4kbm6BrS3DSndRB .lbNDyXioOwvyvbALtCBm{column-gap:var(--gap);display:grid;grid-auto-flow:column;grid-template-columns:repeat(var(--columns),1fr);grid-template-rows:repeat(var(--rows),minmax(min-content,max-content))}.cLaNK_XcbTGlRQ4Tp43Q{margin-top:var(--padding)}.s2Lsn4kbm6BrS3DSndRB .cLaNK_XcbTGlRQ4Tp43Q{display:contents}.cLaNK_XcbTGlRQ4Tp43Q.CYt1X0eH1icRjhtJ28jx>*{background:var(--jp-white);position:relative}.cLaNK_XcbTGlRQ4Tp43Q.CYt1X0eH1icRjhtJ28jx>:after{bottom:0;box-shadow:0 4px 24px #0000000d;content:"";left:0;position:absolute;right:0;top:0;z-index:-1}.cLaNK_XcbTGlRQ4Tp43Q>:first-child{border-top-left-radius:var(--jp-border-radius);border-top-right-radius:var(--jp-border-radius);border-width:1px 1px 0}.cLaNK_XcbTGlRQ4Tp43Q>:last-child{border-bottom-left-radius:var(--jp-border-radius);border-bottom-right-radius:var(--jp-border-radius);border-width:0 1px 1px}.DAkZc1P9A3K12fjEliMg{display:flex;flex-direction:column;justify-content:space-between;padding:var(--padding)}.WUBuYABl8nymjs9NnCEL{align-items:center;display:flex;padding-bottom:calc(var(--spacing-base)*2);position:relative}.WUBuYABl8nymjs9NnCEL:not(:nth-child(2)){padding-top:calc(var(--spacing-base)*2)}.WUBuYABl8nymjs9NnCEL:not(:nth-child(2)):before{background-color:var(--jp-gray);content:"";height:1px;left:var(--padding);position:absolute;right:var(--padding);top:0;z-index:5}.s2Lsn4kbm6BrS3DSndRB .WUBuYABl8nymjs9NnCEL:not(:nth-child(2)):before{left:0;right:unset;width:calc(100% + var(--gap))}.s2Lsn4kbm6BrS3DSndRB .lbNDyXioOwvyvbALtCBm>:last-child .WUBuYABl8nymjs9NnCEL:not(:nth-child(2)):before{width:100%}.ANtCFeb41NhA8PA3H7ZN,.WUBuYABl8nymjs9NnCEL:last-of-type{padding-bottom:var(--padding)}.Ql2gy_148yW8Vw5vhaKD{padding-left:var(--padding);padding-right:var(--padding)}.EAQrAnQEW1z1BfdY5gbC{margin:0 var(--spacing-base);fill:var(--jp-gray);flex-shrink:0}.EAQrAnQEW1z1BfdY5gbC.JDSTlLoOC_4aUoH2oNM2{fill:var(--jp-green-40)}.EAQrAnQEW1z1BfdY5gbC.zNdQRJ1w7BvaQOYyqzHK{fill:var(--jp-red-50)}.lr7vbX95SKtoe7DarJcZ{margin-left:auto}.s2Lsn4kbm6BrS3DSndRB .lr7vbX95SKtoe7DarJcZ{margin:0 var(--spacing-base);top:1px}.WUBuYABl8nymjs9NnCEL .KRrGp2xdkeBOxLZeuQ6X{fill:var(--jp-gray-20);flex-shrink:0}.H_ZJiRVJg0LiMXPGOcmt{text-align:center;width:fit-content}.H_ZJiRVJg0LiMXPGOcmt>a{color:#000}.s2Lsn4kbm6BrS3DSndRB .H_ZJiRVJg0LiMXPGOcmt{grid-column:2;overflow:hidden;padding-left:var(--padding);padding-right:var(--padding);white-space:nowrap}.x21z_DixObRDsDaWotP1{align-items:right;display:flex;justify-content:right;margin:0 calc(var(--spacing-base)*4)}.WQVtrU6q0L1Igcj7wCrQ{margin:0;padding:0}.UujoBFTnQNY2cWU2SIsH{font-size:var(--font-headline-medium);font-weight:700;line-height:52px}.TeGO5V_thHw5lDAm1_2M{font-weight:700}.TeGO5V_thHw5lDAm1_2M,.WolQzb2MsSgiNmLtc7_j{font-size:var(--font-headline-small);line-height:40px}.WolQzb2MsSgiNmLtc7_j{font-weight:400}.hUB0JT8p1T2Hw28N6qC8{font-weight:500}.gKZWDv5chz3_O3Syp74H,.hUB0JT8p1T2Hw28N6qC8{font-size:var(--font-title-medium);line-height:32px}.gKZWDv5chz3_O3Syp74H{font-weight:600}.zY2No8Ga4b8shbOQGhnv{font-size:var(--font-title-small);font-weight:500;line-height:30px}.tIj0D1t8Cc892ikmgFPZ{font-size:var(--font-body);font-weight:400;line-height:24px}.KdcN0BnOaVeVhyLRKqhS{font-size:var(--font-body-small);font-weight:400;line-height:24px}.dso3Rh3tl3Xv1GumBktz{font-weight:400}.dso3Rh3tl3Xv1GumBktz,.mQ1UlbN9u4Mg9byO8m7v{font-size:var(--font-body-extra-small);line-height:20px}.mQ1UlbN9u4Mg9byO8m7v{font-weight:700}.PItlW5vRExLnTj4a8eLE{font-size:var(--font-body-extra-small);font-weight:600;line-height:16px}.TwRpPlktzxhmFVeua7P5{margin:calc(var( --spacing-base )*0)}.zVfqx7gyb3o9mxfGynn1{margin-left:calc(var( --spacing-base )*0);margin-right:calc(var( --spacing-base )*0)}.iSHVzNiB9iVleGljaQxy{margin-bottom:calc(var( --spacing-base )*0)}.iSHVzNiB9iVleGljaQxy,.xqDIp6cNVr_E6RXaiPyD{margin-top:calc(var( --spacing-base )*0)}.S8EwaXk1kyPizt6x4WH2{margin-right:calc(var( --spacing-base )*0)}.ODX5Vr1TARoLFkDDFooD{margin-bottom:calc(var( --spacing-base )*0)}.cphJ8dCpfimnky7P2FHg{margin-left:calc(var( --spacing-base )*0)}.PFgIhNxIyiSuNvQjAIYj{margin:calc(var( --spacing-base )*1)}.M2jKmUzDxvJjjVEPU3zn{margin-left:calc(var( --spacing-base )*1);margin-right:calc(var( --spacing-base )*1)}.io15gAh8tMTNbSEfwJKk{margin-bottom:calc(var( --spacing-base )*1)}.io15gAh8tMTNbSEfwJKk,.rcTN5uw9xIEeMEGL3Xi_{margin-top:calc(var( --spacing-base )*1)}.CQSkybjq2TcRM1Xo9COV{margin-right:calc(var( --spacing-base )*1)}.hfqOWgq6_MEGdFE82eOY{margin-bottom:calc(var( --spacing-base )*1)}.I8MxZQYTbuu595yfesWA{margin-left:calc(var( --spacing-base )*1)}.kQkc6rmdpvLKPkyoJtVQ{margin:calc(var( --spacing-base )*2)}.j6vFPxWuu4Jan2ldoxpp{margin-left:calc(var( --spacing-base )*2);margin-right:calc(var( --spacing-base )*2)}.hqr39dC4H_AbactPAkCG{margin-bottom:calc(var( --spacing-base )*2)}.c3dQnMi16C6J6Ecy4283,.hqr39dC4H_AbactPAkCG{margin-top:calc(var( --spacing-base )*2)}.YNZmHOuRo6hU7zzKfPdP{margin-right:calc(var( --spacing-base )*2)}.Db8lbak1_wunpPk8NwKU{margin-bottom:calc(var( --spacing-base )*2)}.ftsYE5J9hLzquQ0tA5dY{margin-left:calc(var( --spacing-base )*2)}.Det4MHzLUW7EeDnafPzq{margin:calc(var( --spacing-base )*3)}.h_8EEAztC29Vve1datb5{margin-left:calc(var( --spacing-base )*3);margin-right:calc(var( --spacing-base )*3)}.YXIXJ0h1k47u6hzK8KcM{margin-bottom:calc(var( --spacing-base )*3)}.YXIXJ0h1k47u6hzK8KcM,.soADBBkcIKCBXzCTuV9_{margin-top:calc(var( --spacing-base )*3)}.zSX59ziEaEWGjnpZa4uV{margin-right:calc(var( --spacing-base )*3)}.yrVTnq_WBMbejg89c2ZQ{margin-bottom:calc(var( --spacing-base )*3)}.UKtHPJnI2cXBWtPDm5hM{margin-left:calc(var( --spacing-base )*3)}.guexok_Tqd5Tf52hRlbT{margin:calc(var( --spacing-base )*4)}.oS1E2KfTBZkJ3F0tN7T6{margin-left:calc(var( --spacing-base )*4);margin-right:calc(var( --spacing-base )*4)}.DN1OhhXi6AoBgEdDSbGd{margin-bottom:calc(var( --spacing-base )*4)}.DN1OhhXi6AoBgEdDSbGd,.ot2kkMcYHv53hLZ4LSn0{margin-top:calc(var( --spacing-base )*4)}.A1krOZZhlQ6Sp8Cy4bly{margin-right:calc(var( --spacing-base )*4)}.pkDbXXXL32237M0hokEh{margin-bottom:calc(var( --spacing-base )*4)}.XXv4kDTGvEnQeuGKOPU3{margin-left:calc(var( --spacing-base )*4)}.yGqHk1a57gaISwkXwXe6{margin:calc(var( --spacing-base )*5)}.X8cghM358X3DkXLc9aNK{margin-left:calc(var( --spacing-base )*5);margin-right:calc(var( --spacing-base )*5)}.GdfSmGwHlFnN2S6xBn1f{margin-bottom:calc(var( --spacing-base )*5)}.GdfSmGwHlFnN2S6xBn1f,.yqeuzwyGQ7zG0avrGqi_{margin-top:calc(var( --spacing-base )*5)}.g9emeCkuHvYhveiJbfXO{margin-right:calc(var( --spacing-base )*5)}.Lvk3dqcyHbZ07QCRlrUQ{margin-bottom:calc(var( --spacing-base )*5)}.r3yQECDQ9qX0XZzXlVAg{margin-left:calc(var( --spacing-base )*5)}.aQhlPwht2Cz1X_63Miw0{margin:calc(var( --spacing-base )*6)}.JyHb0vK3wJgpblL9s5j8{margin-left:calc(var( --spacing-base )*6);margin-right:calc(var( --spacing-base )*6)}.cY2gULL1lAv6WPNIRuf3{margin-bottom:calc(var( --spacing-base )*6)}.NBWQ9Lwhh_fnry3lg_p7,.cY2gULL1lAv6WPNIRuf3{margin-top:calc(var( --spacing-base )*6)}.yIOniNe5E40C8fWvBm5V{margin-right:calc(var( --spacing-base )*6)}.t30usboNSyqfQWIwHvT3{margin-bottom:calc(var( --spacing-base )*6)}.Nm_TyFkYCMhOoghoToKJ{margin-left:calc(var( --spacing-base )*6)}.C4qJKoBXpgKtpmrqtEKB{margin:calc(var( --spacing-base )*7)}.S93Srbu6NQ_PBr7DmTiD{margin-left:calc(var( --spacing-base )*7);margin-right:calc(var( --spacing-base )*7)}.fJj8k6gGJDks3crUZxOS{margin-bottom:calc(var( --spacing-base )*7)}.cW6D6djs7Ppm7fD7TeoV,.fJj8k6gGJDks3crUZxOS{margin-top:calc(var( --spacing-base )*7)}.DuCnqNfcxcP3Z__Yo5Ro{margin-right:calc(var( --spacing-base )*7)}.im8407m2fw5vOg7O2zsw{margin-bottom:calc(var( --spacing-base )*7)}.G0fbeBgvz2sh3uTP9gNl{margin-left:calc(var( --spacing-base )*7)}.kvW3sBCxRxUqz1jrVMJl{margin:calc(var( --spacing-base )*8)}.tOjEqjLONQdkiYx_XRnw{margin-left:calc(var( --spacing-base )*8);margin-right:calc(var( --spacing-base )*8)}.op5hFSx318zgxsoZZNLN{margin-bottom:calc(var( --spacing-base )*8)}.c9WfNHP6TFKWIfLxv52J,.op5hFSx318zgxsoZZNLN{margin-top:calc(var( --spacing-base )*8)}.sBA75QqcqRwwYSHJh2wc{margin-right:calc(var( --spacing-base )*8)}.GpL6idrXmSOM6jB8Ohsf{margin-bottom:calc(var( --spacing-base )*8)}.HbtWJoQwpgGycz8dGzeT{margin-left:calc(var( --spacing-base )*8)}.uxX3khU88VQ_Ah49Ejsa{padding:calc(var( --spacing-base )*0)}.KX0FhpBKwKzs9fOUdbNz{padding-left:calc(var( --spacing-base )*0);padding-right:calc(var( --spacing-base )*0)}.PfK8vKDyN32dnimlzYjz{padding-bottom:calc(var( --spacing-base )*0)}.PfK8vKDyN32dnimlzYjz,.emxLHRjQuJsImnPbQIzE{padding-top:calc(var( --spacing-base )*0)}.kJ8WzlpTVgdViXt8ukP9{padding-right:calc(var( --spacing-base )*0)}.tg_UIUI11VBzrTAn2AzJ{padding-bottom:calc(var( --spacing-base )*0)}.uczvl8kaz84oPQJ2DB2R{padding-left:calc(var( --spacing-base )*0)}.o7UHPcdVK3lt7q3lqV4o{padding:calc(var( --spacing-base )*1)}.IDqEOxvDoYrFYxELPmtX{padding-left:calc(var( --spacing-base )*1);padding-right:calc(var( --spacing-base )*1)}.DdywPW2qSYlu2pt8tpO2{padding-bottom:calc(var( --spacing-base )*1)}.DdywPW2qSYlu2pt8tpO2,.npy3hw4A5QSkDicb2CJJ{padding-top:calc(var( --spacing-base )*1)}.LgbptTApNY5NwLQvEFAt{padding-right:calc(var( --spacing-base )*1)}.WZQy2SZuZso59bUsXXyl{padding-bottom:calc(var( --spacing-base )*1)}.o331apInxNunbYB3SfPE{padding-left:calc(var( --spacing-base )*1)}.fMPIyD9Vqki1Lrc_yJnG{padding:calc(var( --spacing-base )*2)}.i2pMcTcdrr10IQoiSm_L{padding-left:calc(var( --spacing-base )*2);padding-right:calc(var( --spacing-base )*2)}.eA702gn32kwptiI1obXH{padding-bottom:calc(var( --spacing-base )*2)}.eA702gn32kwptiI1obXH,.o9bGieUKcYc8o0Ij9oZX{padding-top:calc(var( --spacing-base )*2)}.SwZcFez1RDqWsOFjB5iG{padding-right:calc(var( --spacing-base )*2)}.eHpLc_idmuEqeqCTvqkN{padding-bottom:calc(var( --spacing-base )*2)}.vU39i2B4P1fUTMB2l6Vo{padding-left:calc(var( --spacing-base )*2)}.JHWNzBnE29awhdu5BEh1{padding:calc(var( --spacing-base )*3)}.X72lGbb56L3KFzC2xQ9N{padding-left:calc(var( --spacing-base )*3);padding-right:calc(var( --spacing-base )*3)}.BzfNhRG8wXdCEB5ocQ6e{padding-bottom:calc(var( --spacing-base )*3)}.BzfNhRG8wXdCEB5ocQ6e,.srV0KSDC83a2fiimSMMQ{padding-top:calc(var( --spacing-base )*3)}.lUWfkmbQjCskhcNwkyCm{padding-right:calc(var( --spacing-base )*3)}.Ts0dIlc3aTSL7V4cIHis{padding-bottom:calc(var( --spacing-base )*3)}.CzlqQXXhX6MvorArFZ8B{padding-left:calc(var( --spacing-base )*3)}.TqMPkQtR_DdZuKb5vBoV{padding:calc(var( --spacing-base )*4)}.a7UrjhI69Vetlcj9ZVzz{padding-left:calc(var( --spacing-base )*4);padding-right:calc(var( --spacing-base )*4)}.StEhBzGs2Gi5dDEkjhAv{padding-bottom:calc(var( --spacing-base )*4)}.FGneZfZyvYrt1dG0zcnm,.StEhBzGs2Gi5dDEkjhAv{padding-top:calc(var( --spacing-base )*4)}.APEH216rpdlJWgD2fHc8{padding-right:calc(var( --spacing-base )*4)}.oGwXC3ohCic9XnAj6x69{padding-bottom:calc(var( --spacing-base )*4)}.U6gnT9y42ViPNOcNzBwb{padding-left:calc(var( --spacing-base )*4)}.IpdRLBwnHqbqFrixgbYC{padding:calc(var( --spacing-base )*5)}.HgNeXvkBa9o3bQ5fvFZm{padding-left:calc(var( --spacing-base )*5);padding-right:calc(var( --spacing-base )*5)}.tJtFZM3XfPG9v9TSDfN1{padding-bottom:calc(var( --spacing-base )*5)}.PdifHW45QeXYfK568uD8,.tJtFZM3XfPG9v9TSDfN1{padding-top:calc(var( --spacing-base )*5)}.mbLkWTTZ0Za_BBbFZ5b2{padding-right:calc(var( --spacing-base )*5)}.vVWpZpLlWrkTt0hMk8XU{padding-bottom:calc(var( --spacing-base )*5)}.RxfaJj5a1Nt6IavEo5Zl{padding-left:calc(var( --spacing-base )*5)}.SppJULDGdnOGcjZNCYBy{padding:calc(var( --spacing-base )*6)}.palY2nLwdoyooPUm9Hhk{padding-left:calc(var( --spacing-base )*6);padding-right:calc(var( --spacing-base )*6)}.WYw1JvZC0ppLdvSAPhr_{padding-bottom:calc(var( --spacing-base )*6)}.WYw1JvZC0ppLdvSAPhr_,.YEEJ9b90ueQaPfiU8aeN{padding-top:calc(var( --spacing-base )*6)}.QE0ssnsKvWJMqlhPbY5u{padding-right:calc(var( --spacing-base )*6)}.n8yA3jHlMRyLd5UIfoND{padding-bottom:calc(var( --spacing-base )*6)}.tXHmxYnHzbwtfxEaG51n{padding-left:calc(var( --spacing-base )*6)}.kBTsPKkO_3g_tLkj77Um{padding:calc(var( --spacing-base )*7)}.RyhrFx6Y1FGDrGAAyaxm{padding-left:calc(var( --spacing-base )*7);padding-right:calc(var( --spacing-base )*7)}.CBwRpB0bDN3iEdQPPMJO{padding-bottom:calc(var( --spacing-base )*7)}.CBwRpB0bDN3iEdQPPMJO,.vQVSq6SvWKbOMu6r4H6b{padding-top:calc(var( --spacing-base )*7)}.oBy5__aEADMsH46mrgFX{padding-right:calc(var( --spacing-base )*7)}.KVEXoJqf1s92j0JMdNmN{padding-bottom:calc(var( --spacing-base )*7)}.ZMXGNrNaKW3k_3TLz0Fq{padding-left:calc(var( --spacing-base )*7)}.tuiR9PhkHXhGyEgzRZRI{padding:calc(var( --spacing-base )*8)}.U7454qyWkQNa2iaSJziu{padding-left:calc(var( --spacing-base )*8);padding-right:calc(var( --spacing-base )*8)}.VLYIv2GVocjuN93e8HC8{padding-bottom:calc(var( --spacing-base )*8)}.VLYIv2GVocjuN93e8HC8,.X1rm9DQ1zLGLfogja5Gn{padding-top:calc(var( --spacing-base )*8)}.JS7G6kAuqJo5GIuF8S5t{padding-right:calc(var( --spacing-base )*8)}.Y8F9ga1TDCMbM1lj4gUz{padding-bottom:calc(var( --spacing-base )*8)}.AJuyNGrI63BOWql719H8{padding-left:calc(var( --spacing-base )*8)}:root{--font-title-large:36px;--font-title-small:24px;--font-body:16px;--font-label:12px;--jp-black:#000;--jp-black-80:#2c3338;--jp-white:#fff;--jp-white-off:#f9f9f6;--jp-gray:#dcdcde;--jp-gray-0:#f6f7f7;--jp-gray-5:#dcdcde;--jp-gray-10:#c3c4c7;--jp-gray-20:#a7aaad;--jp-gray-30:#8c8f94;--jp-gray-40:#787c82;--jp-gray-50:#646970;--jp-gray-60:#50575e;--jp-gray-70:#3c434a;--jp-gray-80:#2c3338;--jp-gray-90:#1d2327;--jp-gray-100:#101517;--jp-gray-off:#e2e2df;--jp-yellow-5:#f5e6b3;--jp-yellow-10:#f2cf75;--jp-orange-20:#faa754;--jp-blue-5:#ced9f2;--jp-red-0:#f7ebec;--jp-red-50:#d63638;--jp-red-60:#b32d2e;--jp-red-80:#8a2424;--jp-red:#d63639;--jp-pink:#c9356e;--jp-green-0:#f0f2eb;--jp-green-5:#d0e6b8;--jp-green-10:#9dd977;--jp-green-20:#64ca43;--jp-green-30:#2fb41f;--jp-green-40:#069e08;--jp-green-50:#008710;--jp-green-60:#007117;--jp-green-70:#005b18;--jp-green-80:#004515;--jp-green-90:#003010;--jp-green-100:#001c09;--jp-green:#069e08;--jp-green-primary:var(--jp-green-40);--jp-green-secondary:var(--jp-green-30);--jp-border-radius:4px;--jp-border-radius-rna:8px;--jp-menu-border-height:1px;--jp-underline-thickness:2px;--jp-modal-padding-large:32px;--jp-modal-padding:24px;--jp-modal-padding-small:16px;--jp-modal-radius:8px;--jp-button-padding:8px;--jp-button-radius:4px;--jp-gap:16px;--jp-highlight:#3858e9}body{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;margin:0;min-height:100%;padding:0}.jp-wrap{align-items:center;display:flex;flex-wrap:wrap;margin:0 auto;max-width:1128px}.jp-row{display:grid;grid-gap:24px;grid-template-columns:repeat(4,1fr);margin:0 16px;width:100%}@media(min-width:600px){.jp-row{grid-template-columns:repeat(8,1fr);margin:0 18px}}@media(min-width:960px){.jp-row{grid-template-columns:repeat(12,1fr);margin:0 24px;max-width:1128px}}.sm-col-span-1{grid-column-end:span 1}.sm-col-span-2{grid-column-end:span 2}.sm-col-span-3{grid-column-end:span 3}.sm-col-span-4{grid-column-end:span 4}@media(min-width:600px){.md-col-span-1{grid-column-end:span 1}.md-col-span-2{grid-column-end:span 2}.md-col-span-3{grid-column-end:span 3}.md-col-span-4{grid-column-end:span 4}.md-col-span-5{grid-column-end:span 5}.md-col-span-6{grid-column-end:span 6}.md-col-span-7{grid-column-end:span 7}.md-col-span-8{grid-column-end:span 8}}@media(min-width:960px){.lg-col-span-1{grid-column-end:span 1}.lg-col-span-2{grid-column-end:span 2}.lg-col-span-3{grid-column-end:span 3}.lg-col-span-4{grid-column-end:span 4}.lg-col-span-5{grid-column-end:span 5}.lg-col-span-6{grid-column-end:span 6}.lg-col-span-7{grid-column-end:span 7}.lg-col-span-8{grid-column-end:span 8}.lg-col-span-9{grid-column-end:span 9}.lg-col-span-10{grid-column-end:span 10}.lg-col-span-11{grid-column-end:span 11}.lg-col-span-12{grid-column-end:span 12}}@media(max-width:960px){.md-col-span-0{display:none}}@media(max-width:600px){.sm-col-span-0{display:none}}.jp-cut{border:2px solid var(--jp-green-primary);border-radius:var(--jp-border-radius);margin:32px 0;padding:16px 64px 16px 24px;position:relative;text-decoration:none}.jp-cut,.jp-cut span{display:block}.jp-cut span:last-of-type{font-weight:600}.jp-cut:focus span:last-of-type,.jp-cut:hover span:last-of-type{text-decoration:underline;text-decoration-thickness:var(--jp-underline-thickness)}.jp-cut:focus:after,.jp-cut:hover:after{transform:translateY(-50%) translateX(8px)}.jp-cut:after{color:var(--jp-green-primary);content:"→";font-size:24px;font-weight:600;position:absolute;right:24px;top:50%;transform:translateY(-50%);transition:transform .15s ease-out}.components-popover:not(.is-without-arrow):before{border-color:var(--jp-gray)}.icon-tooltip-helper .components-popover:not([data-y-axis=middle])[data-x-axis=left] .components-popover__content{margin-right:-62px}.icon-tooltip-helper .components-popover:not([data-y-axis=middle])[data-x-axis=right] .components-popover__content{margin-left:-62px}.icon-tooltip-helper .components-popover[data-y-axis=bottom] .components-popover__content{top:2px!important}.icon-tooltip-helper .components-popover:not(.is-without-arrow)[data-y-axis=bottom]:before{top:-6px!important}.icon-tooltip-helper .components-popover:not(.is-without-arrow)[data-y-axis=bottom]:after{top:-4px!important}.icon-tooltip-helper .components-popover[data-y-axis=top] .components-popover__content{bottom:10px!important}.icon-tooltip-helper .components-popover:not(.is-without-arrow)[data-y-axis=top]:before{bottom:3px}.icon-tooltip-helper .components-popover:not(.is-without-arrow)[data-y-axis=top]:after{bottom:4px}.icon-tooltip-helper.is-wide .components-popover__content{width:440px}.icon-tooltip-wrapper{color:var(--jp-black);display:inline-block;position:relative}.icon-tooltip-wrapper .components-button.is-link:focus:not(:disabled){box-shadow:none}.icon-tooltip-helper{height:18px;left:-53px;pointer-events:none;position:absolute;top:0;width:124px}.icon-tooltip-container{pointer-events:all}.icon-tooltip-container .components-popover__content{border:1px solid var(--jp-gray);border-radius:4px;margin:0 10px;max-width:90vw;outline:none;padding:24px;white-space:normal;width:304px}.icon-tooltip-title{font-size:16px;font-weight:600;line-height:19px}.icon-tooltip-title:not(:last-child){margin-bottom:8px}.icon-tooltip-content{font-size:14px;font-weight:400;line-height:24px}.icon-tooltip-content ul{list-style-type:disc;margin:0 0 0 1rem}.icon-tooltip-content ul li:last-child{margin-bottom:0}.zI5tJ_qhWE6Oe6Lk75GY{--wp-admin-theme-color:var(--jp-black);--wp-admin-theme-color-darker-10:var(--jp-black-80);--wp-admin-theme-color-darker-20:var(--jp-black-80);--wp-admin-border-width-focus:1.51px;border-radius:var(--jp-border-radius);font-weight:600;justify-content:center}.zI5tJ_qhWE6Oe6Lk75GY.tuBt2DLqimiImoqVzPqo{height:calc(var(--spacing-base)*5);padding:var(--spacing-base);width:calc(var(--spacing-base)*5)}.zI5tJ_qhWE6Oe6Lk75GY.tuBt2DLqimiImoqVzPqo>svg:first-child{margin:0;padding:0}.zI5tJ_qhWE6Oe6Lk75GY.tuBt2DLqimiImoqVzPqo.Na39I683LAaSA99REg14{height:calc(var(--spacing-base)*4);min-width:calc(var(--spacing-base)*4);padding:calc(var(--spacing-base)/2);width:calc(var(--spacing-base)*4)}.zI5tJ_qhWE6Oe6Lk75GY.ipS7tKy9GntCS4R3vekF:not(.tuBt2DLqimiImoqVzPqo){font-size:var(--font-body);height:auto;line-height:24px;padding:var(--spacing-base) calc(var(--spacing-base)*3)}.zI5tJ_qhWE6Oe6Lk75GY.ipS7tKy9GntCS4R3vekF:not(.tuBt2DLqimiImoqVzPqo).paGLQwtPEaJmtArCcmyK{padding:var(--spacing-base) calc(var(--spacing-base)*2)}.zI5tJ_qhWE6Oe6Lk75GY.Na39I683LAaSA99REg14:not(.tuBt2DLqimiImoqVzPqo){font-size:var(--font-body-extra-small);height:auto;line-height:20px;padding:calc(var(--spacing-base)/2) var(--spacing-base)}.zI5tJ_qhWE6Oe6Lk75GY.Na39I683LAaSA99REg14:not(.tuBt2DLqimiImoqVzPqo).paGLQwtPEaJmtArCcmyK>svg:first-child{margin-right:calc(var(--spacing-base)/2)}.zI5tJ_qhWE6Oe6Lk75GY.Na39I683LAaSA99REg14:not(.tuBt2DLqimiImoqVzPqo)>.components-spinner{height:20px}.zI5tJ_qhWE6Oe6Lk75GY.lZAo6_oGfclXOO9CC6Rd{font-weight:400}.zI5tJ_qhWE6Oe6Lk75GY.xJDOiJxTt0R_wSl8Ipz_{min-width:100%}.zI5tJ_qhWE6Oe6Lk75GY.is-primary:disabled,.zI5tJ_qhWE6Oe6Lk75GY.is-secondary:disabled{background:var(--jp-gray);color:var(--jp-gray-20)}.zI5tJ_qhWE6Oe6Lk75GY.is-secondary{background:var(--jp-white);box-shadow:inset 0 0 0 1.51px var(--jp-black)}.zI5tJ_qhWE6Oe6Lk75GY.is-secondary:active:not(:disabled),.zI5tJ_qhWE6Oe6Lk75GY.is-secondary:hover:not(:disabled){background:var(--jp-gray-0)}.zI5tJ_qhWE6Oe6Lk75GY.is-link.Na39I683LAaSA99REg14,.zI5tJ_qhWE6Oe6Lk75GY.is-link.ipS7tKy9GntCS4R3vekF{padding:0}.zI5tJ_qhWE6Oe6Lk75GY.is-link:hover:not(:disabled){text-decoration-thickness:3px}.zI5tJ_qhWE6Oe6Lk75GY.is-link:focus:not(:disabled){text-decoration-line:none}.zI5tJ_qhWE6Oe6Lk75GY.is-destructive.is-primary{box-shadow:none}.zI5tJ_qhWE6Oe6Lk75GY.is-destructive.is-primary:not(:disabled){background:var(--jp-red-50);box-shadow:inset 0 0 0 1px var(--jp-red-50);color:var(--jp-white)}.zI5tJ_qhWE6Oe6Lk75GY.is-destructive.is-primary:hover:not(:disabled){background:var(--jp-red-60);box-shadow:inset 0 0 0 1px var(--jp-red-60)}.zI5tJ_qhWE6Oe6Lk75GY.is-destructive.is-primary:focus:not(:disabled){background:var(--jp-red-70);box-shadow:inset 0 0 0 1px var(--jp-white),0 0 0 var(--wp-admin-border-width-focus) var(--jp-red-70);color:var(--jp-white)}.zI5tJ_qhWE6Oe6Lk75GY.is-destructive.is-primary:active:not(:disabled){background:var(--jp-red-50)}.zI5tJ_qhWE6Oe6Lk75GY.is-destructive.is-secondary{box-shadow:none}.zI5tJ_qhWE6Oe6Lk75GY.is-destructive.is-secondary:not(:disabled){background:var(--jp-white);box-shadow:inset 0 0 0 1.5px var(--jp-red-50);color:var(--jp-red-50)}.zI5tJ_qhWE6Oe6Lk75GY.is-destructive.is-secondary:hover:not(:disabled){background:var(--jp-red-0);box-shadow:inset 0 0 0 1.5px var(--jp-red-60);color:var(--jp-red-60)}.zI5tJ_qhWE6Oe6Lk75GY.is-destructive.is-secondary:focus:not(:disabled){box-shadow:inset 0 0 0 1px var(--jp-white),0 0 0 var(--wp-admin-border-width-focus) var(--jp-red-70);color:var(--jp-red-70)}.zI5tJ_qhWE6Oe6Lk75GY.is-destructive.is-secondary:active:not(:disabled){background:var(--jp-gray-0)}.zI5tJ_qhWE6Oe6Lk75GY.is-destructive.is-link:not(:disabled){color:var(--jp-red-50)}.zI5tJ_qhWE6Oe6Lk75GY.is-destructive.is-link:hover:not(:disabled){box-shadow:none;color:var(--jp-red-60)}.zI5tJ_qhWE6Oe6Lk75GY.is-destructive.is-link:focus:not(:disabled){box-shadow:inset 0 0 0 1px var(--jp-white),0 0 0 var(--wp-admin-border-width-focus) var(--jp-red-70);color:var(--jp-red-70)}.zI5tJ_qhWE6Oe6Lk75GY.q_tVWqMjl39RcY6WtQA6{position:relative}.zI5tJ_qhWE6Oe6Lk75GY.q_tVWqMjl39RcY6WtQA6.has-icon{justify-content:center}.zI5tJ_qhWE6Oe6Lk75GY.q_tVWqMjl39RcY6WtQA6>:not(.components-spinner){visibility:hidden}.zI5tJ_qhWE6Oe6Lk75GY.q_tVWqMjl39RcY6WtQA6>.components-spinner{margin:0;position:absolute}.CDuBjJp_8jxzx5j6Nept{margin-left:calc(var(--spacing-base)/2)}.gridicon{fill:currentColor;display:inline-block}.gridicon.needs-offset g{transform:translate(1px,1px)}.gridicon.needs-offset-x g{transform:translate(1px)}.gridicon.needs-offset-y g{transform:translateY(1px)}.terms-of-service{color:var(--jp-black);font-size:var(--font-body)}.terms-of-service .terms-of-service__link{color:var(--jp-green-50);text-decoration:underline;white-space:nowrap}.dovianZYLKhnbnh9I06o{align-items:flex-start;display:flex;flex-wrap:wrap;justify-content:flex-end}.lljtQMhW7lq5tE5SDJEf{align-items:flex-start;display:flex;flex-basis:0;flex-grow:2}.lljtQMhW7lq5tE5SDJEf .NubApIV1vQCRUNprfm6b{margin-left:auto}.dhFQXpZfMwVI8vuYHnwC{align-items:flex-start;display:inline-flex;flex:0 0 auto;position:relative}.dhFQXpZfMwVI8vuYHnwC:first-child{margin-right:calc(var(--spacing-base)*2)}.dhFQXpZfMwVI8vuYHnwC.eD7hzxFmdtG_MgmBtl_k{color:var(--jp-gray-20)}.dhFQXpZfMwVI8vuYHnwC.eD7hzxFmdtG_MgmBtl_k:after{background:var(--jp-red);border-radius:var(--jp-border-radius);content:" ";display:block;height:3px;margin-top:-2px;pointer-events:none;position:absolute;top:50%;width:100%}.C64ZjjUAqJC1T2Sa7apS{align-items:flex-start;display:flex;flex-wrap:wrap;justify-content:flex-start;margin-bottom:calc(var(--spacing-base)*3)}.UpZDGew6Ay1hPoP6eI7b{color:var(--jp-gray-40);font-size:var(--font-body-small);line-height:20px}.UpZDGew6Ay1hPoP6eI7b:after{content:"​"}.NubApIV1vQCRUNprfm6b{background-color:var(--jp-yellow-10);border-radius:4px;font-size:13px;font-weight:600;margin-left:var(--spacing-base);padding-left:var(--spacing-base);padding-right:var(--spacing-base)}.TDiiPbuW1Z0_05u_pvcK{font-weight:400}.UL3B1tQ854mN7r6taB61{align-items:center;display:flex;flex-wrap:wrap;justify-content:space-between}.IG56Hw7ZR_7rKVsM78qw:focus:not(:disabled){box-shadow:none}.sexr0jUxC1jVixdKiDnC{margin-left:-20px}@media(max-width:782px){.sexr0jUxC1jVixdKiDnC{margin-left:-10px}}.sexr0jUxC1jVixdKiDnC.vKQ11sLeAM45M04P1ccj{background-color:var(--jp-white)}.SqdhUZkXCRuIpErj1B3z{--max-container-width:1128px;--vertical-gutter:24px;--horizontal-spacing:8px;column-gap:var(--vertical-gutter);display:grid;margin:0 auto;max-width:var(--max-container-width);width:100%}@media(max-width:599px){.SqdhUZkXCRuIpErj1B3z{grid-template-columns:repeat(4,minmax(0,1fr));padding:0 16px}}@media(min-width:600px)and (max-width:959px){.SqdhUZkXCRuIpErj1B3z{grid-template-columns:repeat(8,minmax(0,1fr));padding:0 18px}}@media(min-width:960px){.SqdhUZkXCRuIpErj1B3z{grid-template-columns:repeat(12,minmax(0,1fr));padding:0 24px}}.SqdhUZkXCRuIpErj1B3z.OZC_9a1LhpWF9dv15Gdh{max-width:none;padding:unset}@media(max-width:599px){.RuVLl3q4lxTQa3wbhBJB{grid-column-end:span 1}.f9LZTRG4MMK42rS89afW{grid-column-start:1}.bHe_zKxjjpUwHw_MdYE1{grid-column-end:2}.QZbNrOqE2aNSn50xVhpU{grid-column-end:span 2}.ev7W3z7zVYPeHAlYqZjf{grid-column-start:2}.NJWd1m_e7lOiPYru2ZMP{grid-column-end:3}.Xc6nt1Qc1DI0Z2A3gt1r{grid-column-end:span 3}.UIcN_GXiPRoIsin8Kohg{grid-column-start:3}.GRKCyqb5LufCSCgykKFc{grid-column-end:4}.i_qTq8gqhhC3vIUepVRB{grid-column-end:span 4}.G3qaZ3Jpbvam_1XvGxgc{grid-column-start:4}.VRCNYKZtO9zukEwmgP1y{grid-column-end:5}}@media(min-width:600px)and (max-width:959px){.tRm008K_WJL79WoNZTNL{grid-column-end:span 1}.l5T2P_bgKts4tdaRkS1d{grid-column-start:1}.zOCxfLZpF6BlgC7a_Yq1{grid-column-end:2}.F80DdgVn0m5OpvtSQWka{grid-column-end:span 2}.oI1c7JYfiJtMQHbhngtU{grid-column-start:2}.pMQtA_4jh1_1lVknqEP5{grid-column-end:3}.VenqMpdgyKQVUNNQcfqd{grid-column-end:span 3}.seNYL99uoczf9V4MxBxT{grid-column-start:3}.YKfF1HFhI9KygA5l3b2J{grid-column-end:4}.yAi0Cv1xDWkoqsaUhvhR{grid-column-end:span 4}.ubhnyZOnkgxNhh6XtVWv{grid-column-start:4}.RGOPGQbWMJ9Ei5oFxS7X{grid-column-end:5}.Sz1E2aWbX483ijdi6yge{grid-column-end:span 5}.tku6_bRYrX9tMbgYGmIl{grid-column-start:5}.b5JHttOhSEcI1WBlqAjk{grid-column-end:6}.FboSx5MoKTAWbxXyYlCw{grid-column-end:span 6}.Jhs8yEEmodG30edbJvag{grid-column-start:6}.IpzbbKVqEqPcfIGkXkwt{grid-column-end:7}.mhCPwfAZ4Kmm_empzJAq{grid-column-end:span 7}.x034ilrJF7rO9UJB2rI1{grid-column-start:7}.Wt8t2e16viRrOJ1lLA5v{grid-column-end:8}.S6pIrEy9AMLKx9bgh_Ae{grid-column-end:span 8}.kEfI4tGyuWfHTlRnvIab{grid-column-start:8}.PUzX4RRsKq1dnsz3gebS{grid-column-end:9}}@media(min-width:960px){.X_pdcLJikd8LS_YAdJlB{grid-column-end:span 1}.tl936d14Huby4khYp05X{grid-column-start:1}.hnge0LnR69d3NXEtEE1t{grid-column-end:2}.fj0NUMuyZQcPNgKcjp5Z{grid-column-end:span 2}.R2ncBX7a2NigdYCcV1OX{grid-column-start:2}.t8vMSDVYno9k9itRwnXb{grid-column-end:3}.wsDuEN2GqHx6qzo8dUdk{grid-column-end:span 3}.cIEVPUweWtLBy3xaXnMx{grid-column-start:3}.fajUWBwu1m2B479j3jmz{grid-column-end:4}.YR0c7fQTgMkDdWzwSyLp{grid-column-end:span 4}.xlwp8BmplxkKNMI7gamo{grid-column-start:4}._C4O1w9DUqx1m3gPf8aA{grid-column-end:5}.Z54F1hAErckAIrKlxnXW{grid-column-end:span 5}.ezSDWkRHmKSxDJXxuiOH{grid-column-start:5}.T0ChoeAjGJjkkNrYhD4g{grid-column-end:6}.qtMoMPF6yHvGJnWHSsde{grid-column-end:span 6}.gdoywN5VPiWERfIBqkph{grid-column-start:6}.wUev_VH5uf_pwFFlbnAU{grid-column-end:7}.egIPDFJsOpownTClq9XP{grid-column-end:span 7}.yGhp9yoAW7k0kQik9AB7{grid-column-start:7}.SJ43U9mR5wUg5V2qBeQA{grid-column-end:8}.cTuyHfMwSUJxN_HdIEgd{grid-column-end:span 8}.smCr8DaIagcumdvdldiK{grid-column-start:8}.T03NHzQJvzwL6wAfIiTL{grid-column-end:9}.pMvxM3RJGjqyNdf9qg1Y{grid-column-end:span 9}.iIVpNRwEnQ_JI5gpp9EN{grid-column-start:9}.ZbQ4u4vGSX5rJOje4uGL{grid-column-end:10}.gKb5wuIDAlKGbrjK2vxy{grid-column-end:span 10}.Z7pINdImE2WJiYnZBTqm{grid-column-start:10}.ZTxp6qpvwurMdOnLLSz1{grid-column-end:11}.NnQTlbfnxPDR6cQ7rygg{grid-column-end:span 11}.O137wZd6Yl0olSA9PsXR{grid-column-start:11}.zf2OJtQ2MPz6SDoh6CB0{grid-column-end:12}.U3H6UHW6HqRt9hdzVg3O{grid-column-end:span 12}.zynnNeS_ZBTxABcVpUQH{grid-column-start:12}.vI8tltFZtFUNAy9Iag9s{grid-column-end:13}}.jp-dashboard-footer{align-items:center;color:var(--jp-black);display:flex;flex-wrap:wrap;font-size:var(--font-body-extra-small);line-height:1.333;max-width:1128px;width:100%}.jp-dashboard-footer a{text-decoration:none}.jp-dashboard-footer a:any-link,.jp-dashboard-footer a[role=button]{color:inherit}.jp-dashboard-footer a:hover{text-decoration:underline;text-decoration-thickness:1.5px}.jp-dashboard-footer a:focus{border-radius:2px;box-shadow:none;outline:1.5px solid currentColor;outline-offset:3px}.jp-dashboard-footer.is-sm>ul{gap:.125rem}.jp-dashboard-footer.is-md,.jp-dashboard-footer.is-sm>ul{align-items:flex-start;flex-direction:column}.jp-dashboard-footer>ul{align-items:center;display:flex;flex-wrap:wrap;gap:1rem;list-style:none;margin:0;padding:0;width:100%}.jp-dashboard-footer>ul>li{margin-bottom:0}.jp-dashboard-footer>ul>li>a{align-items:center;display:flex;gap:.25rem;min-height:44px}.jp-dashboard-footer__accessible-external-link{border:0;clip:rect(1px,1px,1px,1px);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;overflow-wrap:normal;padding:0;position:absolute;width:1px}.jp-dashboard-footer__jp-item{font-weight:600;padding-inline-end:1rem}.jp-dashboard-footer.is-sm .jp-dashboard-footer__jp-item{padding-bottom:1rem}.jp-dashboard-footer.is-lg .jp-dashboard-footer__a8c-item{margin-inline-start:auto}.jp-dashboard-footer.is-sm .jp-dashboard-footer__a8c-item{padding-top:1rem}.jp-dashboard-footer__a8c-item>a,.jp-dashboard-footer__jp-item>a{text-decoration:none}.vMa4i_Dza2t5Zi_Bw9Nf{background:var(--jp-white-off)}._aiMxmJRAw5jRPbZFX57{background-color:var(--jp-gray-90);border-radius:var(--jp-border-radius);color:var(--jp-white);display:flex;overflow:hidden}._aiMxmJRAw5jRPbZFX57.eWgNBUaexiR66ZI1Px4U{border-left:4px solid var(--jp-yellow-20);margin-bottom:calc(var(--spacing-base)*3)}._aiMxmJRAw5jRPbZFX57.ZGELG1CO333FilJXOaeI{margin-left:calc(var(--spacing-base)*3);position:fixed;right:calc(var(--spacing-base)*3);top:calc(var(--spacing-base)*6)}@media(max-width:782px){._aiMxmJRAw5jRPbZFX57.ZGELG1CO333FilJXOaeI{top:calc(var(--spacing-base)*8)}}._aiMxmJRAw5jRPbZFX57 a,._aiMxmJRAw5jRPbZFX57 a:active,._aiMxmJRAw5jRPbZFX57 a:hover,._aiMxmJRAw5jRPbZFX57 a:link,._aiMxmJRAw5jRPbZFX57 a:visited{color:var(--jp-white)}.BnI88X_e8ItF1c9Uozmj{background-color:var(--jp-yellow-30);fill:var(--jp-white);align-items:center;display:flex;justify-content:center;padding:calc(var(--spacing-base)*1.5)}.hRRUwTCPRpurhMwRNZkg .BnI88X_e8ItF1c9Uozmj{background-color:var(--jp-green-50)}.Z6q3IxY_uR1y2lAPTkVF .BnI88X_e8ItF1c9Uozmj{background-color:var(--jp-red)}.eWgNBUaexiR66ZI1Px4U .BnI88X_e8ItF1c9Uozmj{fill:var(--jp-yellow-50);background-color:var(--jp-yellow-5)}.ST8sowTbBVLRPrk4ZQrn{font-size:14px;padding:calc(var(--spacing-base)*1.75)}.eWgNBUaexiR66ZI1Px4U .ST8sowTbBVLRPrk4ZQrn{background-color:var(--jp-yellow-5);color:var(--jp-gray-90)}.lMkO08Vd8YQMfwrwaI8u{fill:var(--jp-gray);align-items:center;background:#0000;border:none;cursor:pointer;display:flex;justify-content:center;padding:calc(var(--spacing-base)*1.5)}.lyrXe0pA852TUmyekDb5{display:flex}.KgEeDTKgTC5ZjzYlbTqN{color:var(--jp-black);font-size:var(--font-body);line-height:1.5;margin-right:calc(var(--spacing-base)*4);padding:var(--spacing-base) 0;text-decoration:none}.KgEeDTKgTC5ZjzYlbTqN:last-child{margin-right:0}.KgEeDTKgTC5ZjzYlbTqN:focus,.KgEeDTKgTC5ZjzYlbTqN:hover{border-bottom-color:var(--jp-green);box-shadow:none;color:var(--jp-green)}.Lv4WoNVkeJntqvUyG4dX{border-bottom:1px solid var(--jp-black)}.vvXnRXxrU1kP1KsdSr4J{margin-top:calc(var(--spacing-base)*3*-1)}.aDCTkUFaJEeZzYYE6qv5{background-color:var(--jp-green);border-radius:32px;color:var(--jp-white);font-size:12px;letter-spacing:-2%;line-height:1;margin-left:var(--spacing-base);padding:calc(var(--spacing-base)/2) var(--spacing-base);position:relative;top:-1px}.uQlXhcfYn9tbnK27_Gct{align-items:center;display:flex}.uQlXhcfYn9tbnK27_Gct input[type=checkbox]:checked,.uQlXhcfYn9tbnK27_Gct input[type=checkbox]:indeterminate{background:var(--jp-green-40);border-color:var(--jp-green-40)}.uQlXhcfYn9tbnK27_Gct input[type=checkbox]:focus{box-shadow:0 0 0 2px #fff,0 0 0 4px var(--jp-green-40)}.PO9zDOaSkcv_RqpfZF_v,.e5YHJiYcvfgdEEJsS_YM{margin-bottom:calc(var(--spacing-base)*7);margin-top:calc(var(--spacing-base)*7)}@media(max-width:599px){.PO9zDOaSkcv_RqpfZF_v{margin-top:0}}svg.V6B8ltQ7TH3UKzUC_qy1{color:var(--jp-black);height:32px;margin:0;width:32px}.C9hcvYAbgHPhN2Tl22xg{align-items:center;display:flex;flex-wrap:wrap;justify-content:flex-start}.C9hcvYAbgHPhN2Tl22xg .XkbIpr2gzB4XEhHgzkY4{margin-right:calc(var(--spacing-base)/2)}.BfcZn0_X33Ajdd1Gl18G{display:flex}.BfcZn0_X33Ajdd1Gl18G>.rBmVJIeTNpd0RJWaRGuJ{display:flex;margin-left:calc(var(--spacing-base)/2);fill:var(--jp-gray-20)}.jVq5444f1Xh6nNkz0Qe_{margin-top:calc(var(--spacing-base)*4)}.amF9cOnMiv2nHbkMXQiQ{align-items:center;display:flex;flex-wrap:wrap;justify-content:space-between}.FodE_7RbLD8zeBSd6eVR{display:flex;flex-wrap:wrap;margin-left:auto}.FodE_7RbLD8zeBSd6eVR>:first-child{margin-right:calc(var(--spacing-base)*3)}.twyPhW_K164HITnDrwEg{padding:calc(var(--spacing-base)*2);width:250px}.tbcd9xc_TjcFdokOt3F_{font-size:18px}@media(max-width:599px){.pnoqLV3l30xuvj2hLlJc{width:90%}.FodE_7RbLD8zeBSd6eVR{margin-top:calc(var(--spacing-base)*3)}.FodE_7RbLD8zeBSd6eVR>:first-child{margin-bottom:var(--spacing-base);margin-right:0}}.bZ4b33s2MdcOjaDKBbeV{--spacing-base:8px;--wp-admin-border-width-focus:1.5px;align-items:center;display:flex;white-space:nowrap}.UzkzDaqt2mXprJh2OXRz{background-color:var(--jp-gray-50);border-radius:50%;flex-shrink:0;height:.666em;width:.666em}.QuS0vdcr87FsiBvSSrvA{font-weight:600;line-height:1.666;margin-left:calc(var(--spacing-base)/2)}.bZ4b33s2MdcOjaDKBbeV.bGx0wbQAwuY7k8P3PHVQ a,.bZ4b33s2MdcOjaDKBbeV.bGx0wbQAwuY7k8P3PHVQ span{color:var(--jp-green-50)}.bZ4b33s2MdcOjaDKBbeV.bGx0wbQAwuY7k8P3PHVQ .UzkzDaqt2mXprJh2OXRz{background-color:var(--jp-green-50)}.bZ4b33s2MdcOjaDKBbeV.wR8Cz8uHgObTQavolv5y a,.bZ4b33s2MdcOjaDKBbeV.wR8Cz8uHgObTQavolv5y span{color:var(--jp-gray-50)}.bZ4b33s2MdcOjaDKBbeV.wR8Cz8uHgObTQavolv5y .UzkzDaqt2mXprJh2OXRz{background-color:var(--jp-gray-50)}.bZ4b33s2MdcOjaDKBbeV.IzbBYGwBKhSYFUQlIMww a,.bZ4b33s2MdcOjaDKBbeV.IzbBYGwBKhSYFUQlIMww span{color:var(--jp-red-50)}.bZ4b33s2MdcOjaDKBbeV.IzbBYGwBKhSYFUQlIMww .UzkzDaqt2mXprJh2OXRz{background-color:var(--jp-red-50)}.bZ4b33s2MdcOjaDKBbeV.Kdvp_HJf89IBrZuCaLm8 a,.bZ4b33s2MdcOjaDKBbeV.Kdvp_HJf89IBrZuCaLm8 span{color:var(--jp-yellow-30)}.bZ4b33s2MdcOjaDKBbeV.Kdvp_HJf89IBrZuCaLm8 .UzkzDaqt2mXprJh2OXRz{background-color:var(--jp-yellow-30)}.bZ4b33s2MdcOjaDKBbeV.hVf5vsbBWm8OFye7cy7a a,.bZ4b33s2MdcOjaDKBbeV.hVf5vsbBWm8OFye7cy7a span{color:var(--jp-blue-40)}.bZ4b33s2MdcOjaDKBbeV.hVf5vsbBWm8OFye7cy7a .UzkzDaqt2mXprJh2OXRz{background-color:var(--jp-blue-40)}.IunwKwdvL271DxBIniPb[type=checkbox]{display:none}.svA9WxEcOByd5S2fZonA{border:2px solid var(--jp-black);border-radius:100px;box-sizing:border-box;cursor:pointer;display:inline-block;height:24px;outline:0;padding:2px;position:relative;transition:all .4s ease,box-shadow 0s;vertical-align:middle;width:48px}.svA9WxEcOByd5S2fZonA:after{background:var(--jp-black);border-radius:50%;content:"";display:block;height:16px;left:0;position:relative;transition:all .2s ease;width:16px}.IunwKwdvL271DxBIniPb:checked+.svA9WxEcOByd5S2fZonA:after{left:22px}.IunwKwdvL271DxBIniPb:checked:disabled+.svA9WxEcOByd5S2fZonA{background-color:var(--jp-black);border-color:var(--jp-black)}.IunwKwdvL271DxBIniPb:checked:disabled+.svA9WxEcOByd5S2fZonA:after{background-color:var(--jp-white)}.IunwKwdvL271DxBIniPb:checked:not(:disabled)+.svA9WxEcOByd5S2fZonA{background-color:var(--jp-green);border-color:var(--jp-green)}.IunwKwdvL271DxBIniPb:checked:not(:disabled)+.svA9WxEcOByd5S2fZonA:after{background-color:var(--jp-white)}.IunwKwdvL271DxBIniPb:disabled+span.svA9WxEcOByd5S2fZonA{cursor:default;opacity:.25}.IunwKwdvL271DxBIniPb.wOd7DeP76v1fczKfah5n+.svA9WxEcOByd5S2fZonA{border-radius:8px;height:16px;width:24px}.IunwKwdvL271DxBIniPb.wOd7DeP76v1fczKfah5n+.svA9WxEcOByd5S2fZonA:after{height:12px;width:12px}.IunwKwdvL271DxBIniPb.wOd7DeP76v1fczKfah5n:checked+.svA9WxEcOByd5S2fZonA:after{left:8px}.Clxt94RgGnDrhORZZyPr,.K2OG1vK5PSOYDWKtqKKG{margin-bottom:calc(var(--spacing-base)*7);margin-top:calc(var(--spacing-base)*7)}.msOlyh2T7D6uhbM6AROg{align-items:center;background:none;border:2px solid var(--jp-green-40);border-radius:var(--jp-border-radius);color:var(--jp-gray-80);display:flex;gap:calc(var(--spacing-base)*3);justify-content:space-between;padding:calc(var(--spacing-base)*2) calc(var(--spacing-base)*3);position:relative;text-align:left;width:100%}.msOlyh2T7D6uhbM6AROg a,.msOlyh2T7D6uhbM6AROg button{all:unset;color:var(--jp-gray-80);cursor:pointer}.msOlyh2T7D6uhbM6AROg a:after,.msOlyh2T7D6uhbM6AROg button:after{content:"";height:100%;left:0;position:absolute;top:0;width:100%}.msOlyh2T7D6uhbM6AROg:focus-within{border-color:var(--jp-black)}.msOlyh2T7D6uhbM6AROg:focus-within .cPN7USVqSBpxUswfDtUZ,.msOlyh2T7D6uhbM6AROg:hover .cPN7USVqSBpxUswfDtUZ{transform:translateX(calc(var(--spacing-base)*2))}.msOlyh2T7D6uhbM6AROg:focus-within .EmnJAyEzzn1QpA8HtypY,.msOlyh2T7D6uhbM6AROg:hover .EmnJAyEzzn1QpA8HtypY{text-decoration:underline;text-decoration-thickness:2px}.EmnJAyEzzn1QpA8HtypY,.msOlyh2T7D6uhbM6AROg .EmnJAyEzzn1QpA8HtypY{font-weight:700}.cPN7USVqSBpxUswfDtUZ{fill:var(--jp-green-40);pointer-events:none;transition:transform .1s ease-out}.vV7YZikAz0oHYsuvtxMq{display:inline;margin:0 0 0 calc(var(--spacing-base)/3);vertical-align:middle}.vV7YZikAz0oHYsuvtxMq svg{position:relative;z-index:10}.T1YaMupeZmBIpXZHY9EZ{display:inline}.rigH8UdiDrmmSLQMUurD{background-color:var(--jp-white);border:1px solid var(--jp-gray-10);border-radius:var(--jp-border-radius);color:var(--jp-black);display:block;font-size:var(--font-body);letter-spacing:-.02em;line-height:1.5;padding:var(--spacing-base) calc(var(--spacing-base)*1.5);transition:box-shadow .1s ease-out;width:100%}.rigH8UdiDrmmSLQMUurD::placeholder{color:var(--jp-gray-20)}.rigH8UdiDrmmSLQMUurD:focus{box-shadow:0 0 0 2px var(--jp-green-5)}.rigH8UdiDrmmSLQMUurD:focus,.rigH8UdiDrmmSLQMUurD:hover:not(:disabled){border:1px solid var(--jp-green)}.rigH8UdiDrmmSLQMUurD:disabled{background-color:var(--jp-gray-0);color:var(--jp-gray-30)}.V8FDM08CpcwQs4UwN2nI{color:var(--jp-black);display:block;font-size:var(--font-title-small);font-weight:600;margin-bottom:var(--spacing-base)}.DM4b8iQ0ewvRYdIPxvZ8{max-width:calc(744px + var(--spacing-base)*6);width:100%}.bW6ZuNzJBYU5PVPktE2S{display:flex}.bW6ZuNzJBYU5PVPktE2S:not(:first-child){margin-top:calc(var(--spacing-base)*7)}.di3wjXHrX1rk_H6rlxKM{margin-right:calc(var(--spacing-base)*2);padding-top:calc(var(--spacing-base)/2)}@media(min-width:600px){.di3wjXHrX1rk_H6rlxKM{margin-right:calc(var(--spacing-base)*5)}}.IrzHnNkRvORtyCL0yiWa{width:100%}.sU82bpLEYPC9n_CFAKoz{align-items:center;display:flex}.ZZc0LldcbJpcftqCe43T .IrzHnNkRvORtyCL0yiWa{opacity:.5}.T17WOOJI7XHN7KRmYaCe>:last-child{margin-top:calc(var(--spacing-base)*2)}@media(min-width:600px){.T17WOOJI7XHN7KRmYaCe{display:flex;justify-content:space-between}}.typbjN2keZ97hj2TmuMC{display:flex;flex-wrap:wrap;margin-top:calc(var(--spacing-base)*2)}.UUXAN8VTAZY0h8t9rCHG{color:var(--jp-green-50);margin-right:calc(var(--spacing-base)/2)}.eFjcadLMEXY5O61vsTrx{color:var(--jp-gray-50)}.Tr5uYvclUiwlC5kuGk7E{color:var(--jp-red-50)}.zPZcNgYx2X5778nHHtlH{display:flex;flex-wrap:wrap}.lNtkRXnB1z_kYB28MUWq{color:var(--jp-gray-50)}.JgH5ykcLynEgqXYurT78{margin-right:calc(var(--spacing-base)/2)}.JgH5ykcLynEgqXYurT78,.xlWW0IoKZwTZt1Ti0tcQ{color:var(--jp-green-50)}.zhBcgCUGgyC7PvWk8ewB{margin-top:calc(var(--spacing-base)*3)}@media(min-width:600px){.zhBcgCUGgyC7PvWk8ewB{padding-left:calc(var(--spacing-base)*11)}}.mah_f2OWxZ3Vqt_jRFdR{margin-bottom:calc(var(--spacing-base)*4)}.pRMFiIODonlw4XMdNHaU{margin-bottom:calc(var(--spacing-base)*2);margin-top:calc(var(--spacing-base)*6)}.Ax2SmW57c0U5xOTjZuAA{margin:calc(var(--spacing-base)*-1) calc(var(--spacing-base)*-2)}.xGZeYQr0_nPJTFmd8pW4{align-items:center;border:1px solid var(--jp-gray-30);border-radius:4px;color:var(--jp-gray-30);display:flex;font-size:12px;height:21px;margin-bottom:calc(var(--spacing-base)*2);margin-left:var(--spacing-base);padding:calc(var(--spacing-base)/2)}.RYTIt8kwLbKcUbWOfG4g{padding:calc(var(--spacing-base)*3);width:304px}.BqXge2rIUP0a_74yvYbr{display:flex;justify-content:space-between}.Lr10UUCcSLF3T_0QqoPr{margin:calc(var(--spacing-base)*-1) calc(var(--spacing-base)*-3)}.Lr10UUCcSLF3T_0QqoPr:focus,.Lr10UUCcSLF3T_0QqoPr:focus:not(:disabled){box-shadow:none}.th_VukMuODIOVLC7oJo6{display:flex;justify-content:flex-end}.Gxtap1Zcl5X5UEHfSdQ4{color:var(--jp-gray-50)}.Gxtap1Zcl5X5UEHfSdQ4:before{background:var(--jp-gray-50);border-radius:50%;content:"";display:inline-block;height:8px;margin-right:var(--spacing-base);width:8px}.Gxtap1Zcl5X5UEHfSdQ4.dSfmCVUK_Ez7sxdqOIdy{color:var(--jp-green-40)}.Gxtap1Zcl5X5UEHfSdQ4.dSfmCVUK_Ez7sxdqOIdy:before{background:var(--jp-green-40)}.e6JXg_theht0XwCBgqdA{margin-bottom:calc(var(--spacing-base)*3);margin-top:calc(var(--spacing-base)*2)}.VHYulMcpzbr10HWR0iSE{align-items:flex-start;border:1px solid var(--jp-black);border-color:var(--jp-gray-5);border-left-width:6px;border-radius:4px;display:flex;font-size:var(--font-body);padding:24px 31px 27px 18px}.FGpSkMCiIHQjszcV0dbn{margin-right:20px}.FGpSkMCiIHQjszcV0dbn,.KoWZcCwhW13xvkEb0QON{height:calc(var(--spacing-base)*3);width:calc(var(--spacing-base)*3)}.KoWZcCwhW13xvkEb0QON{background-color:#0000;border:none;cursor:pointer;outline:none}@media screen and (max-width:600px){.VHYulMcpzbr10HWR0iSE{box-shadow:0 4px 8px #00000008,0 1px 2px #0000000f;padding-top:68px;position:relative}.FGpSkMCiIHQjszcV0dbn{left:24px;position:absolute;top:24px}.KoWZcCwhW13xvkEb0QON{position:absolute;right:24px;top:24px}}.smrfczkC53EaFM8OJUXs{flex-grow:1}.IKYRWoPwt9xOVEx1wzNS{font-weight:600;margin-bottom:8px}.qM0qY6mPYp1MPN54A3Kg{align-items:center;display:flex;margin-top:20px}.qM0qY6mPYp1MPN54A3Kg a,.qM0qY6mPYp1MPN54A3Kg a:active,.qM0qY6mPYp1MPN54A3Kg a:focus,.qM0qY6mPYp1MPN54A3Kg a:hover{color:var(--jp-black)}.qM0qY6mPYp1MPN54A3Kg>*{margin-right:24px}.A5YkDkkXuiYgavrY6Nux{border-left-color:var(--jp-red)}.A5YkDkkXuiYgavrY6Nux .y_IPyP1wIAOhyNaqvXJq{fill:var(--jp-red)}.cT5rwuPMZzWvi5o6shMl{border-left-color:var(--jp-yellow-20)}.cT5rwuPMZzWvi5o6shMl .y_IPyP1wIAOhyNaqvXJq{fill:var(--jp-yellow-20)}.yo0O3uvNomPsYUXFCpAS{border-left-color:var(--black)}.yo0O3uvNomPsYUXFCpAS .y_IPyP1wIAOhyNaqvXJq{fill:var(--black)}.oZdDFf1jBLkzn5ICCC6x{border-left-color:var(--jp-green)}.oZdDFf1jBLkzn5ICCC6x .y_IPyP1wIAOhyNaqvXJq{fill:var(--jp-green)}._Wc3apZobag_9Ag_THTb{display:flex;justify-content:space-between}.kdsaL7c4bpTwf_A4fIUT{padding-bottom:calc(var(--spacing-base)*6);padding-top:calc(var(--spacing-base)*6);text-align:center}.b0eN3as5AgxQW7EAkarg{margin-bottom:0}@keyframes rotate-spinner{to{transform:rotate(1turn)}}.jp-components-spinner{align-items:center;display:flex}.jp-components-spinner__inner,.jp-components-spinner__outer{animation:3s linear infinite;animation-name:rotate-spinner;border:.1em solid #0000;border-radius:50%;box-sizing:border-box;margin:auto}.jp-components-spinner__outer{border-top-color:#fff}.jp-components-spinner__inner{border-right-color:#fff;border-top-color:#fff;height:100%;opacity:.4;width:100%}.JiJhrZaThvWCpM2AfGen{border-radius:32px;flex-shrink:0;font-size:12px;font-style:normal;font-weight:600;line-height:16px;padding:calc(var(--spacing-base)/2);position:relative;text-align:center;width:60px}._7SGksgOpcPbHfPPpQTV{background:var(--jp-red-5);color:var(--jp-red-60)}.pGNquShR54adQ61sx3lP{background:var(--jp-yellow-5);color:var(--jp-yellow-60)}.IM5kkexAfwGLM6zz0Exd{background:var(--jp-gray-0);color:var(--jp-gray-50)}.NHzH3tt6CypjZ92CvK9x{border:1px solid var(--jp-gray);border-radius:var(--jp-border-radius);display:flex;padding:calc(var(--spacing-base)*2)}.NHzH3tt6CypjZ92CvK9x:first-of-type{border-top-left-radius:var(--jp-border-radius);border-top-right-radius:var(--jp-border-radius)}.NHzH3tt6CypjZ92CvK9x:last-of-type{border-bottom-left-radius:var(--jp-border-radius);border-bottom-right-radius:var(--jp-border-radius)}.NHzH3tt6CypjZ92CvK9x+.NHzH3tt6CypjZ92CvK9x{border-top:0}.D9zvYDUrOP_zwSm0yJMs{margin-right:calc(var(--spacing-base)*2);min-width:24px}._XISfmbjoVlqhB61hHYn{width:100%}.AQDPBnMZFu7BOBuo8mYW{font-size:18px;font-weight:600;line-height:24px;margin-bottom:0}.cZ9s5eCAZe3R82Y6Ru3z{color:var(--jp-gray-80);font-size:14px;line-height:21px}.AKnbWQiViZ2O_dwCV8Fw,.W6alQ2_S5Rh06djX9m27{align-self:center;margin-left:calc(var(--spacing-base)*2);margin-right:var(--spacing-base)}.uUEJGMrSV3XoBwX5xEwA{display:flex;justify-content:space-between}.sQkG5Cu80gPaeFj3L_wa{margin-bottom:calc(var(--spacing-base)*5)}.oIl6GCMeUnzE0inXbuj9{display:flex;justify-content:space-between}.RP2MVoGqaCFXPKZhhxQ1{margin-bottom:calc(var(--spacing-base)*5)}.YpEs8b7KE7fzVuXUbOEb{display:flex;justify-content:space-between}.EqpwvErHtRi_WQkJKgi1{border:1px solid var(--jp-gray);border-radius:var(--jp-border-radius);display:flex;margin-bottom:calc(var(--spacing-base)*3);padding:calc(var(--spacing-base)*2)}.EicvN1QaJu5OJLzdUN5A{margin-right:calc(var(--spacing-base)*2);min-width:24px}.b7ynAmUwGlxK_vxyIN0y{width:100%}.uSV9HYRxjL4S6zIZDlqP{font-size:18px;font-weight:600;line-height:24px;margin-bottom:0}.XpW8Mvw_XFEbqxUdw155{color:var(--jp-gray-80);font-size:14px;line-height:21px}.Fkj60BmQ5sUo9zHcJwVv{align-self:center;margin-left:calc(var(--spacing-base)*2);margin-right:var(--spacing-base)}.XLzPr74ad3osCq9kxy2q{display:flex;justify-content:space-between}.jNlU3vgp4xEGwmX5aTyK{background-color:var(--jp-gray-5)}.gE8s4nh3f7iGIBrFeyCT{list-style-type:disc;padding-left:calc(var(--spacing-base)*2.5)}.WtVEv641JBaLl929sZq2{align-items:flex-start;background-color:#00000040;bottom:0;display:flex;justify-content:center;left:0;overflow-y:auto;padding-top:calc(var(--spacing-base)*12 + 2px);position:fixed;right:0;top:0;z-index:1000001}.G0aPt7WmA1rkUE0wcTno{background:var(--jp-white);border:1px solid var(--jp-gray);border-radius:calc(var(--jp-border-radius)*2);box-shadow:0 8px 20px #00000040;padding:calc(var(--spacing-base)*4);position:relative;width:616px}.VkrhWjfEIlIwYEumycbP{background:none;border:none;cursor:pointer;padding:0;position:absolute;right:calc(var(--spacing-base)*3);top:calc(var(--spacing-base)*3)}.yFzeV4cmWRbZKk5tIyEw{display:block}.EU0Rvu4PDqVtnCAmbgHg{height:56px;margin-bottom:calc(var(--spacing-base)*8);width:48px}.EU0Rvu4PDqVtnCAmbgHg>svg{left:-40px;position:relative;top:-36px}.vzMlFr1AXWqefpRrb976{align-items:center;display:flex;justify-content:space-between;margin-bottom:calc(var(--spacing-base)*3)}.gYSOMa4xxLXmsNzvFPkW{width:100%}.hNJWdt5qmZkWYAH_vjIp{background-color:var(--jp-green-40);border-radius:calc(var(--spacing-base)*3);height:9px;transition:width .2s}.DHMUfGyHbl5BgD5vjxVz{color:var(--jp-gray-90);font-weight:600;line-height:24px;margin-left:auto;padding-left:var(--spacing-base)}.GqFcAwJvIrg1v7f6QUfw{display:flex;flex-direction:column;min-height:230px;padding:calc(var(--spacing-base)*3);width:304px}.GqFcAwJvIrg1v7f6QUfw .OENx8kmm62tkWGukzP2S{display:flex;justify-content:space-between;margin-bottom:calc(var(--spacing-base)*2)}.GqFcAwJvIrg1v7f6QUfw .OENx8kmm62tkWGukzP2S .KnqJLKwSceJTwFJrPGHq{max-width:226px}.GqFcAwJvIrg1v7f6QUfw .OENx8kmm62tkWGukzP2S .PJU0_yA9jNf7ao0jhHut{background-color:var(--jp-white);color:var(--jp-gray-90);flex-shrink:0;height:calc(var(--spacing-base)*3);min-width:unset;width:calc(var(--spacing-base)*3)}.GqFcAwJvIrg1v7f6QUfw .OENx8kmm62tkWGukzP2S .PJU0_yA9jNf7ao0jhHut:hover:not(:focus){box-shadow:none}.GqFcAwJvIrg1v7f6QUfw .rrORM3zqHfGvqiPduEXY{align-items:flex-end;display:flex;flex-grow:1;height:calc(var(--spacing-base)*6);justify-content:flex-end;margin-top:calc(var(--spacing-base)*2)}.GqFcAwJvIrg1v7f6QUfw .rrORM3zqHfGvqiPduEXY .Q7fUcDUGhteXEr18rZPC{color:var(--jp-gray-60);flex-grow:1;margin-bottom:var(--spacing-base)}.GqFcAwJvIrg1v7f6QUfw .rrORM3zqHfGvqiPduEXY .S5LAeskUiEQ0JlPhr0Ze{flex-shrink:0}._fUXxnSp5pagKBp9gSN7 *{box-sizing:border-box}.ZMBDiTLzs27F012iOsMK>:first-child{flex:1}@media(min-width:960px){.ZMBDiTLzs27F012iOsMK{align-items:center;display:flex}}.zI2DKzqRc1MhF6aq5eHt{align-items:center;color:var(--jp-black);display:flex}.iHgPFku9KaLz8FIQV1Qw{margin-left:-4px;margin-right:var(--spacing-base)}.ctq2nQkzIfSoMkldF9t9{margin-top:calc(var(--spacing-base)*2);width:100%}@media(min-width:960px){.ctq2nQkzIfSoMkldF9t9{margin-left:calc(var(--spacing-base)*2);margin-top:0;width:auto}}.cuoSlhSNrqf1dozY22Xb{fill:#000}.JLquNpQVlysAamuh5lJO,.lAIiifeLMmZAPlQ9n9ZR{fill:var(--jp-green-primary)}.cbOwD8Y4tFjwimmtchQI{fill:#757575}.cbOwD8Y4tFjwimmtchQI.aLWBKY0yRghEk7tNCgK3{fill:var(--color-bluesky)}.cbOwD8Y4tFjwimmtchQI.aHOlEBGD5EA8NKRw3xTw{fill:var(--color-facebook);border-radius:50%!important}.cbOwD8Y4tFjwimmtchQI.af4Y_zItXvLAOEoSDPSv{fill:var(--color-twitter)}.cbOwD8Y4tFjwimmtchQI.f68aqF3XSD1OBvXR1get{fill:var(--color-linkedin)}.cbOwD8Y4tFjwimmtchQI.xFI0dt3UiXRlRQdqPWkx{fill:var(--color-tumblr)}.cbOwD8Y4tFjwimmtchQI.q7JEoyymveP6kF747M43{fill:var(--color-gplus)}.cbOwD8Y4tFjwimmtchQI.DKOBOTVmTLbh26gUH_73{fill:var(--color-mastodon)}.cbOwD8Y4tFjwimmtchQI.n5XodNsuMfMAAvqHFmbw{fill:var(--color-nextdoor);border-radius:50%}.cbOwD8Y4tFjwimmtchQI.cL3m0xBYTYhIKI7lCqDB{fill:var(--color-instagram)}.cbOwD8Y4tFjwimmtchQI.fftumuc_lJ6v0tq4UMVR{fill:var(--color-whatsapp)}.OtDl6kocO_m2s9sRHaqX{align-items:center;display:flex;flex-direction:column;height:100%;justify-content:center;max-height:600px;width:100%}.BjwJh1S1YVPI7AjmTx6a+.BjwJh1S1YVPI7AjmTx6a{margin-top:calc(var(--spacing-base)*5)}.YWfK8VTp2wnByBauYPKg{background-color:var(--jp-gray-0);overflow-x:scroll;padding:calc(var(--spacing-base)*3)}.pkw2LnOTd8VvQ3oT8sXQ{justify-content:flex-end;margin-top:calc(var(--spacing-base)*3);padding-top:calc(var(--spacing-base)*3)}.ap6lG79CncSqdigJS_WA{margin-top:calc(var(--spacing-base)*4)}.uym7dGHhp6ifjF57yOAO{align-items:flex-end;display:flex;margin-bottom:calc(var(--spacing-base)*2.25)}.e_2eFTR8RyHwmfeqJL4F{flex:1;margin-bottom:0}.r4Id5qht2FD68jCAH2Cl{margin-left:calc(var(--spacing-base)*2)}.pkw2LnOTd8VvQ3oT8sXQ{border-top:1px solid var(--jp-gray);display:flex;justify-content:right;padding-top:calc(var(--spacing-base)*4);width:100%}.pkw2LnOTd8VvQ3oT8sXQ>:last-child{margin-left:calc(var(--spacing-base)*2)}.ZSZPabDoB8MVVPttP0tu{background-color:#fff;border:1px solid var(--jp-gray);border-bottom:none;color:var(--jp-gray-50);display:grid;grid-template-columns:repeat(9,1fr);padding:calc(var(--spacing-base)*2) calc(var(--spacing-base)*3);width:100%}.ZSZPabDoB8MVVPttP0tu>span:first-child{grid-column:1/7}.ZSZPabDoB8MVVPttP0tu>span:not(:first-child){text-align:center}.iJ_biSBRDribuNKX0Zuw{margin:calc(var(--spacing-base)*4) calc(var(--spacing-base)*8);text-align:center}.iJ_biSBRDribuNKX0Zuw>button span{color:var(--jp-gray-70);font-size:var(--font-body-small);font-weight:400}.iJ_biSBRDribuNKX0Zuw button:hover:not(:disabled){text-decoration-line:none}.iJ_biSBRDribuNKX0Zuw button:focus:not(:disabled){box-shadow:none}@media(max-width:599px){.uym7dGHhp6ifjF57yOAO{margin-bottom:calc(var(--spacing-base)*3)}.e_2eFTR8RyHwmfeqJL4F{display:none}.r4Id5qht2FD68jCAH2Cl{flex:1}.r4Id5qht2FD68jCAH2Cl:first-of-type{margin-left:0}.pkw2LnOTd8VvQ3oT8sXQ{justify-content:center}.pkw2LnOTd8VvQ3oT8sXQ>*{width:50%}}.x8UuVEhWucPfdq0hEJg6{border:1px solid var(--jp-gray);border-radius:var(--jp-border-radius)}.x8UuVEhWucPfdq0hEJg6>:not(:last-child){border-bottom:1px solid var(--jp-gray)}.eb6Ovfvm1yONz4mdOwbH{background-color:var(--jp-white)}.jF9LXpXR3TxZVDw7TVXT{align-items:center;background:none;border:none;box-sizing:border-box;cursor:pointer;display:grid;grid-template-columns:repeat(9,1fr);margin:0;outline-color:var(--jp-black);padding:calc(var(--spacing-base)*2) calc(var(--spacing-base)*3);text-align:start;width:100%}.jF9LXpXR3TxZVDw7TVXT>:first-of-type{grid-column:1/8}.jF9LXpXR3TxZVDw7TVXT>:last-of-type{grid-column:9}.jF9LXpXR3TxZVDw7TVXT:hover{background:var(--jp-gray-0)}.lNQgAfpwdAUSOLZd8dlD{align-items:center;display:flex;font-size:var(--font-body-small);font-weight:400}.WRQwDYPdffWznX158azR{margin-right:var(--spacing-base)}.dJx9pvlYjDnKn11n5wo8{font-weight:600;margin-bottom:var(--spacing-base);margin-left:calc(var(--spacing-base)*4)}.EKcbLuSblRc7UpzgsFXw{align-items:center}.ILMBWlMLcXc0n97IisrG{overflow:hidden;transform-origin:top center}.T8XIzCNJBQy1UETN5gjU{max-height:0;padding:0;transform:scaleY(0);transition:all .1s}.kWoHGiaZSbq9XJVyUOMC{max-height:1000px;padding:calc(var(--spacing-base)*4) calc(var(--spacing-base)*7);transform:scaleY(1);transition:max-height .3s,transform .2s}.HQgjxePFDRJHamBAGcVU{background-color:var(--jp-white);border-radius:var(--jp-border-radius);box-shadow:0 0 40px #00000014;margin:0;padding:var(--spacing-base) 0}.KtdsNIMumOoHNWMLmuAJ{align-items:center;display:flex;justify-content:space-between;margin:0;padding:calc(var(--spacing-base)*2);text-align:left}.KtdsNIMumOoHNWMLmuAJ.ewyV4ZGn34WDNXmK3ej2{cursor:pointer;outline-color:var(--jp-black)}.KtdsNIMumOoHNWMLmuAJ.ewyV4ZGn34WDNXmK3ej2:focus:not(.owofT85W_XvVdb5vr1GN),.KtdsNIMumOoHNWMLmuAJ.ewyV4ZGn34WDNXmK3ej2:hover:not(.owofT85W_XvVdb5vr1GN){background-color:var(--jp-gray-0)}.KtdsNIMumOoHNWMLmuAJ.owofT85W_XvVdb5vr1GN{background-color:var(--jp-black)}.KtdsNIMumOoHNWMLmuAJ.owofT85W_XvVdb5vr1GN .NESnw2xCLrBpP6WlYZL4{color:var(--jp-white)}.KtdsNIMumOoHNWMLmuAJ.owofT85W_XvVdb5vr1GN .aohnd_y_1lrMuww8NH63{fill:var(--jp-white)}.KtdsNIMumOoHNWMLmuAJ.owofT85W_XvVdb5vr1GN .Rnas_2_2_eLZSYfZ347E{background-color:var(--jp-red);border:1px solid var(--jp-red);color:var(--jp-white)}.NESnw2xCLrBpP6WlYZL4{align-items:center;display:flex;overflow-x:hidden;padding-right:var(--spacing-base)}.m4_14yNRByDyO9yf9pGg{display:block;overflow-x:hidden;text-overflow:ellipsis}.aohnd_y_1lrMuww8NH63{margin-right:calc(var(--spacing-base)*2)}.Rnas_2_2_eLZSYfZ347E{align-items:center;border:1px solid var(--jp-red-60);border-radius:50%;box-sizing:border-box;color:var(--jp-red-60);display:flex;justify-content:center;min-width:30px;padding:calc(var(--spacing-base)/2) var(--spacing-base)}.X8NRHUTBa_4wDvoHN9TT{fill:var(--jp-green-50)}.CsuOteurQlJm4IjXqyZ0{fill:var(--jp-gray-20)}.fvbewglUxEvV1o04yzzp{--icon-size:28px;--item-spacing:calc(var( --spacing-base )*2);--left-spacing:calc(var( --icon-size ) + var( --item-spacing ));list-style:none}.DINy59MKjwiQanaoDTiV{padding:calc(var(--spacing-base)*2)}.XoacHJljw8zRW_fkBSyg{padding:0}.mXM4WZRePVTa07dhQ6MD{margin-left:var(--left-spacing)}.sI3V8khLdCqxkhJQ_XnI{display:flex;justify-content:flex-start;padding:calc(var(--spacing-base)*2)}.hgdxMuIvZwTZ0sfXaols{padding:calc(var(--spacing-base)*2);width:250px}.UErHS2HAh1gszGfYuVIf{align-items:center;background-color:var(--jp-white);border:1px solid var(--jp-gray-10);border-radius:var(--jp-border-radius);display:flex;justify-content:space-between;padding:calc(var(--spacing-base)*2);width:100%}.lEhH1hvCcxLVFMHI8Gwv{display:flex;justify-content:flex-start}.c57Vj4QhAHwcK_HZMxtN{margin-right:var(--spacing-base)}.LumryWNddoF092fZgN2O{font-size:var(--font-body);line-height:1.5}.NFMwU3H5k2qArZe2TTp9{background-color:var(--jp-gray-10);font-weight:600;padding:calc(var(--spacing-base)/2) var(--spacing-base)}.G5W9M8qfo3sGl2OIbwg9{background-color:var(--jp-gray-0);display:flex;flex-direction:row;font-family:Courier\ 10 Pitch,Courier,monospace;overflow-x:scroll;white-space:pre}.Bx4RDCUR316fm_jgGS8N{background-color:var(--jp-gray-10);color:var(--jp-gray-50);display:flex;flex-direction:column;padding:0 var(--spacing-base);text-align:right}.GhN0JvAyRQI3SnVWp2Ot{display:flex;flex-direction:column;flex-grow:1;overflow-x:visible}.GhN0JvAyRQI3SnVWp2Ot del,.GhN0JvAyRQI3SnVWp2Ot div,.GhN0JvAyRQI3SnVWp2Ot ins{padding:0 var(--spacing-base);text-decoration:none}.GhN0JvAyRQI3SnVWp2Ot del{background-color:var(--jp-red-0);color:var(--jp-red-60)}.GhN0JvAyRQI3SnVWp2Ot ins{background-color:var(--jp-green-5);color:var(--jp-green-60)}.xpPHTch5ul0xuZaUoTNa{background-color:var(--jp-gray-0);display:flex;flex-direction:row;font-family:monospace;overflow-x:scroll;padding:0}.AMOpkL9LURkyTK8316cw{background-color:var(--jp-red-0)}.i0_0xMrNWoak1brIaDQq{display:flex;flex-direction:column;text-align:right}.C9fLawPLkMNSZthfwxj6{background-color:var(--jp-gray-10);color:var(--font-body);padding:0 calc(var(--spacing-base)/2)}.C9fLawPLkMNSZthfwxj6.AMOpkL9LURkyTK8316cw{background-color:var(--jp-red-50);color:var(--jp-white)}.ogixgg8fRGekmYGtevh1{display:flex;flex:1;flex-direction:column;overflow-x:visible;white-space:pre}.jYPCgKMDRKfT3vnx0mdG{padding-left:var(--spacing-base)}.UEQ1NqkrwNmaQR7qdEK3{background-color:var(--jp-red);border-radius:calc(var(--jp-border-radius)/2);color:var(--jp-white);padding:calc(var(--spacing-base)/4) calc(var(--spacing-base)/2)}.sfXsfklfkeSRtE9ivQwF{border:1px solid var(--jp-gray);border-radius:var(--jp-border-radius);display:inline-block;width:100%}.sfXsfklfkeSRtE9ivQwF>:not(:last-child){border-bottom:1px solid var(--jp-gray)}.ozRrKPlj1QFGUyd3oVke{background-color:var(--jp-white)}.PyvnSHQuuUkZvVsArigy{align-items:center;background:none;border:none;box-sizing:border-box;cursor:pointer;display:grid;grid-template-columns:repeat(9,1fr);margin:0;outline-color:var(--jp-black);padding:calc(var(--spacing-base)*2) calc(var(--spacing-base)*3);text-align:start;width:100%}.PyvnSHQuuUkZvVsArigy>:first-of-type{grid-column:1/7}.PyvnSHQuuUkZvVsArigy>:last-of-type{grid-column:9}.PyvnSHQuuUkZvVsArigy>:not(:first-child){margin:auto}.PyvnSHQuuUkZvVsArigy:hover{background:var(--jp-gray-0)}.u9Xod5s8bCRNj9MR1Drl{align-items:center;display:flex;font-size:var(--font-body-small);font-weight:400}.IbeyulkpO9kjYJ4OkYUD{margin-right:var(--spacing-base)}.KiCgmjHm2f0JDU3cMsgf{font-weight:600;margin-bottom:var(--spacing-base);margin-left:calc(var(--spacing-base)*4)}.kJ8t3FAtd5VAYjk31SfA{align-items:center}.JP0IJZcYRohfgntEozjm{overflow:hidden;transform-origin:top center}.y7c6zi2wjEnbW3F29fmP{max-height:0;padding:0;transform:scaleY(0);transition:all .1s}.wQWiN_J0SqgduvadyGnm{max-height:1000px;padding:calc(var(--spacing-base)*4) calc(var(--spacing-base)*7);transform:scaleY(1);transition:max-height .3s,transform .2s}.v1fUFCBPmd6miSCf_ehK{fill:var(--jp-green-40)}@media(max-width:599px){.PyvnSHQuuUkZvVsArigy{display:grid;grid-auto-rows:minmax(auto,auto)}.PyvnSHQuuUkZvVsArigy>:first-child{grid-column:1/8;grid-row:1}.PyvnSHQuuUkZvVsArigy>:nth-child(2){grid-row:2;padding-left:calc(var(--spacing-base)*4)}.PyvnSHQuuUkZvVsArigy>:nth-child(3){grid-row:2}.PyvnSHQuuUkZvVsArigy>:nth-child(3) span{margin-top:var(--spacing-base);position:absolute}.PyvnSHQuuUkZvVsArigy>:last-child{grid-column:10;grid-row:1/3}}.A6a9HOtaZnLUleNgxQrX{padding:calc(var(--spacing-base)*7) 0}.CGT5fOs6LDTFHWCAgIiT,.RFKxbzQ8N58qEyVO0yzW{align-items:center;display:flex}.RFKxbzQ8N58qEyVO0yzW{height:100%}.RFKxbzQ8N58qEyVO0yzW img{object-fit:cover;width:100%}.SvMuuouOkDt2sE0PAn_D{margin-top:calc(var(--spacing-base)*3 + 1px)}.urouayitSUT8zW0V3p_0{margin-bottom:0}.iXXJlk08gFDeCvsTTlNQ{border:1px solid var(--jp-gray);border-left:6px solid var(--jp-red-50);border-radius:var(--jp-border-radius);box-shadow:0 4px 8px #00000008,0 1px 2px #0000000f;box-sizing:border-box;color:var(--jp-gray-80);font-size:16px;line-height:22px;margin:0;padding:calc(var(--spacing-base)*2) calc(var(--spacing-base)*3) calc(var(--spacing-base)*2) calc(var(--spacing-base)*3)}.iXXJlk08gFDeCvsTTlNQ.is-error{background-color:var(--jp-white)}.iXXJlk08gFDeCvsTTlNQ .components-notice__content{align-items:flex-start;display:flex;flex-direction:column;margin:0;padding:12px 4px}.iXXJlk08gFDeCvsTTlNQ .is-link{color:var(--jp-black);font-size:16px;font-weight:600}.iXXJlk08gFDeCvsTTlNQ .components-notice__dismiss{align-self:center}.iXXJlk08gFDeCvsTTlNQ .MWqRqr7q6fgvLxitcWYk,.iXXJlk08gFDeCvsTTlNQ .MWqRqr7q6fgvLxitcWYk:active,.iXXJlk08gFDeCvsTTlNQ .MWqRqr7q6fgvLxitcWYk:hover,.iXXJlk08gFDeCvsTTlNQ .MWqRqr7q6fgvLxitcWYk:visited{align-items:center;background:#000;border-radius:var(--jp-border-radius);color:var(--jp-white);cursor:pointer;font-size:16px;font-weight:600;justify-content:center;letter-spacing:-.01em;line-height:24px;margin-left:calc(var(--spacing-base)*2 + 24px);margin-top:24px;padding:8px 24px;text-decoration:none}.iXXJlk08gFDeCvsTTlNQ.YLcXAoc82nypTPaKSAcd .MWqRqr7q6fgvLxitcWYk,.iXXJlk08gFDeCvsTTlNQ.YLcXAoc82nypTPaKSAcd .MWqRqr7q6fgvLxitcWYk:active,.iXXJlk08gFDeCvsTTlNQ.YLcXAoc82nypTPaKSAcd .MWqRqr7q6fgvLxitcWYk:hover,.iXXJlk08gFDeCvsTTlNQ.YLcXAoc82nypTPaKSAcd .MWqRqr7q6fgvLxitcWYk:visited{margin-left:0;margin-top:0;white-space:nowrap}.iXXJlk08gFDeCvsTTlNQ.YLcXAoc82nypTPaKSAcd .components-notice__content{align-items:center;flex-direction:row}.e6hHy8BZ7ZKPSXbIC0UG{margin-bottom:25px}.jXz8LnXNzMDdtHqkG0sZ{display:flex;flex-grow:1;margin-right:var(--spacing-base)}.jXz8LnXNzMDdtHqkG0sZ>svg{align-self:flex-start;flex-shrink:0}.jXz8LnXNzMDdtHqkG0sZ .jp-components-spinner,.jXz8LnXNzMDdtHqkG0sZ>svg{margin-right:calc(var(--spacing-base)*2)}*{box-sizing:border-box} \ No newline at end of file diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/build/index.js b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/build/index.js deleted file mode 100644 index 4f19ae5b..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/build/index.js +++ /dev/null @@ -1,48 +0,0 @@ -/*! For license information please see index.js.LICENSE.txt */ -(()=>{var e={9487:(e,t,a)=>{"use strict";a.d(t,{X:()=>c});const n={AED:{symbol:"د.إ.‏",grouping:",",decimal:".",precision:2},AFN:{symbol:"؋",grouping:",",decimal:".",precision:2},ALL:{symbol:"Lek",grouping:".",decimal:",",precision:2},AMD:{symbol:"֏",grouping:",",decimal:".",precision:2},ANG:{symbol:"ƒ",grouping:",",decimal:".",precision:2},AOA:{symbol:"Kz",grouping:",",decimal:".",precision:2},ARS:{symbol:"$",grouping:".",decimal:",",precision:2},AUD:{symbol:"A$",grouping:",",decimal:".",precision:2},AWG:{symbol:"ƒ",grouping:",",decimal:".",precision:2},AZN:{symbol:"₼",grouping:" ",decimal:",",precision:2},BAM:{symbol:"КМ",grouping:".",decimal:",",precision:2},BBD:{symbol:"Bds$",grouping:",",decimal:".",precision:2},BDT:{symbol:"৳",grouping:",",decimal:".",precision:0},BGN:{symbol:"лв.",grouping:" ",decimal:",",precision:2},BHD:{symbol:"د.ب.‏",grouping:",",decimal:".",precision:3},BIF:{symbol:"FBu",grouping:",",decimal:".",precision:0},BMD:{symbol:"$",grouping:",",decimal:".",precision:2},BND:{symbol:"$",grouping:".",decimal:",",precision:0},BOB:{symbol:"Bs",grouping:".",decimal:",",precision:2},BRL:{symbol:"R$",grouping:".",decimal:",",precision:2},BSD:{symbol:"$",grouping:",",decimal:".",precision:2},BTC:{symbol:"Ƀ",grouping:",",decimal:".",precision:2},BTN:{symbol:"Nu.",grouping:",",decimal:".",precision:1},BWP:{symbol:"P",grouping:",",decimal:".",precision:2},BYR:{symbol:"р.",grouping:" ",decimal:",",precision:2},BZD:{symbol:"BZ$",grouping:",",decimal:".",precision:2},CAD:{symbol:"C$",grouping:",",decimal:".",precision:2},CDF:{symbol:"FC",grouping:",",decimal:".",precision:2},CHF:{symbol:"CHF",grouping:"'",decimal:".",precision:2},CLP:{symbol:"$",grouping:".",decimal:",",precision:2},CNY:{symbol:"¥",grouping:",",decimal:".",precision:2},COP:{symbol:"$",grouping:".",decimal:",",precision:2},CRC:{symbol:"₡",grouping:".",decimal:",",precision:2},CUC:{symbol:"CUC",grouping:",",decimal:".",precision:2},CUP:{symbol:"$MN",grouping:",",decimal:".",precision:2},CVE:{symbol:"$",grouping:",",decimal:".",precision:2},CZK:{symbol:"Kč",grouping:" ",decimal:",",precision:2},DJF:{symbol:"Fdj",grouping:",",decimal:".",precision:0},DKK:{symbol:"kr.",grouping:"",decimal:",",precision:2},DOP:{symbol:"RD$",grouping:",",decimal:".",precision:2},DZD:{symbol:"د.ج.‏",grouping:",",decimal:".",precision:2},EGP:{symbol:"ج.م.‏",grouping:",",decimal:".",precision:2},ERN:{symbol:"Nfk",grouping:",",decimal:".",precision:2},ETB:{symbol:"ETB",grouping:",",decimal:".",precision:2},EUR:{symbol:"€",grouping:".",decimal:",",precision:2},FJD:{symbol:"FJ$",grouping:",",decimal:".",precision:2},FKP:{symbol:"£",grouping:",",decimal:".",precision:2},GBP:{symbol:"£",grouping:",",decimal:".",precision:2},GEL:{symbol:"Lari",grouping:" ",decimal:",",precision:2},GHS:{symbol:"₵",grouping:",",decimal:".",precision:2},GIP:{symbol:"£",grouping:",",decimal:".",precision:2},GMD:{symbol:"D",grouping:",",decimal:".",precision:2},GNF:{symbol:"FG",grouping:",",decimal:".",precision:0},GTQ:{symbol:"Q",grouping:",",decimal:".",precision:2},GYD:{symbol:"G$",grouping:",",decimal:".",precision:2},HKD:{symbol:"HK$",grouping:",",decimal:".",precision:2},HNL:{symbol:"L.",grouping:",",decimal:".",precision:2},HRK:{symbol:"kn",grouping:".",decimal:",",precision:2},HTG:{symbol:"G",grouping:",",decimal:".",precision:2},HUF:{symbol:"Ft",grouping:".",decimal:",",precision:0},IDR:{symbol:"Rp",grouping:".",decimal:",",precision:0},ILS:{symbol:"₪",grouping:",",decimal:".",precision:2},INR:{symbol:"₹",grouping:",",decimal:".",precision:2},IQD:{symbol:"د.ع.‏",grouping:",",decimal:".",precision:2},IRR:{symbol:"﷼",grouping:",",decimal:"/",precision:2},ISK:{symbol:"kr.",grouping:".",decimal:",",precision:0},JMD:{symbol:"J$",grouping:",",decimal:".",precision:2},JOD:{symbol:"د.ا.‏",grouping:",",decimal:".",precision:3},JPY:{symbol:"¥",grouping:",",decimal:".",precision:0},KES:{symbol:"S",grouping:",",decimal:".",precision:2},KGS:{symbol:"сом",grouping:" ",decimal:"-",precision:2},KHR:{symbol:"៛",grouping:",",decimal:".",precision:0},KMF:{symbol:"CF",grouping:",",decimal:".",precision:2},KPW:{symbol:"₩",grouping:",",decimal:".",precision:0},KRW:{symbol:"₩",grouping:",",decimal:".",precision:0},KWD:{symbol:"د.ك.‏",grouping:",",decimal:".",precision:3},KYD:{symbol:"$",grouping:",",decimal:".",precision:2},KZT:{symbol:"₸",grouping:" ",decimal:"-",precision:2},LAK:{symbol:"₭",grouping:",",decimal:".",precision:0},LBP:{symbol:"ل.ل.‏",grouping:",",decimal:".",precision:2},LKR:{symbol:"₨",grouping:",",decimal:".",precision:0},LRD:{symbol:"L$",grouping:",",decimal:".",precision:2},LSL:{symbol:"M",grouping:",",decimal:".",precision:2},LYD:{symbol:"د.ل.‏",grouping:",",decimal:".",precision:3},MAD:{symbol:"د.م.‏",grouping:",",decimal:".",precision:2},MDL:{symbol:"lei",grouping:",",decimal:".",precision:2},MGA:{symbol:"Ar",grouping:",",decimal:".",precision:0},MKD:{symbol:"ден.",grouping:".",decimal:",",precision:2},MMK:{symbol:"K",grouping:",",decimal:".",precision:2},MNT:{symbol:"₮",grouping:" ",decimal:",",precision:2},MOP:{symbol:"MOP$",grouping:",",decimal:".",precision:2},MRO:{symbol:"UM",grouping:",",decimal:".",precision:2},MTL:{symbol:"₤",grouping:",",decimal:".",precision:2},MUR:{symbol:"₨",grouping:",",decimal:".",precision:2},MVR:{symbol:"MVR",grouping:",",decimal:".",precision:1},MWK:{symbol:"MK",grouping:",",decimal:".",precision:2},MXN:{symbol:"MX$",grouping:",",decimal:".",precision:2},MYR:{symbol:"RM",grouping:",",decimal:".",precision:2},MZN:{symbol:"MT",grouping:",",decimal:".",precision:0},NAD:{symbol:"N$",grouping:",",decimal:".",precision:2},NGN:{symbol:"₦",grouping:",",decimal:".",precision:2},NIO:{symbol:"C$",grouping:",",decimal:".",precision:2},NOK:{symbol:"kr",grouping:" ",decimal:",",precision:2},NPR:{symbol:"₨",grouping:",",decimal:".",precision:2},NZD:{symbol:"NZ$",grouping:",",decimal:".",precision:2},OMR:{symbol:"﷼",grouping:",",decimal:".",precision:3},PAB:{symbol:"B/.",grouping:",",decimal:".",precision:2},PEN:{symbol:"S/.",grouping:",",decimal:".",precision:2},PGK:{symbol:"K",grouping:",",decimal:".",precision:2},PHP:{symbol:"₱",grouping:",",decimal:".",precision:2},PKR:{symbol:"₨",grouping:",",decimal:".",precision:2},PLN:{symbol:"zł",grouping:" ",decimal:",",precision:2},PYG:{symbol:"₲",grouping:".",decimal:",",precision:2},QAR:{symbol:"﷼",grouping:",",decimal:".",precision:2},RON:{symbol:"lei",grouping:".",decimal:",",precision:2},RSD:{symbol:"Дин.",grouping:".",decimal:",",precision:2},RUB:{symbol:"₽",grouping:" ",decimal:",",precision:2},RWF:{symbol:"RWF",grouping:" ",decimal:",",precision:2},SAR:{symbol:"﷼",grouping:",",decimal:".",precision:2},SBD:{symbol:"S$",grouping:",",decimal:".",precision:2},SCR:{symbol:"₨",grouping:",",decimal:".",precision:2},SDD:{symbol:"LSd",grouping:",",decimal:".",precision:2},SDG:{symbol:"£‏",grouping:",",decimal:".",precision:2},SEK:{symbol:"kr",grouping:",",decimal:".",precision:2},SGD:{symbol:"S$",grouping:",",decimal:".",precision:2},SHP:{symbol:"£",grouping:",",decimal:".",precision:2},SLL:{symbol:"Le",grouping:",",decimal:".",precision:2},SOS:{symbol:"S",grouping:",",decimal:".",precision:2},SRD:{symbol:"$",grouping:",",decimal:".",precision:2},STD:{symbol:"Db",grouping:",",decimal:".",precision:2},SVC:{symbol:"₡",grouping:",",decimal:".",precision:2},SYP:{symbol:"£",grouping:",",decimal:".",precision:2},SZL:{symbol:"E",grouping:",",decimal:".",precision:2},THB:{symbol:"฿",grouping:",",decimal:".",precision:2},TJS:{symbol:"TJS",grouping:" ",decimal:";",precision:2},TMT:{symbol:"m",grouping:" ",decimal:",",precision:0},TND:{symbol:"د.ت.‏",grouping:",",decimal:".",precision:3},TOP:{symbol:"T$",grouping:",",decimal:".",precision:2},TRY:{symbol:"TL",grouping:".",decimal:",",precision:2},TTD:{symbol:"TT$",grouping:",",decimal:".",precision:2},TVD:{symbol:"$T",grouping:",",decimal:".",precision:2},TWD:{symbol:"NT$",grouping:",",decimal:".",precision:2},TZS:{symbol:"TSh",grouping:",",decimal:".",precision:2},UAH:{symbol:"₴",grouping:" ",decimal:",",precision:2},UGX:{symbol:"USh",grouping:",",decimal:".",precision:2},USD:{symbol:"$",grouping:",",decimal:".",precision:2},UYU:{symbol:"$U",grouping:".",decimal:",",precision:2},UZS:{symbol:"сўм",grouping:" ",decimal:",",precision:2},VEB:{symbol:"Bs.",grouping:",",decimal:".",precision:2},VEF:{symbol:"Bs. F.",grouping:".",decimal:",",precision:2},VND:{symbol:"₫",grouping:".",decimal:",",precision:1},VUV:{symbol:"VT",grouping:",",decimal:".",precision:0},WST:{symbol:"WS$",grouping:",",decimal:".",precision:2},XAF:{symbol:"F",grouping:",",decimal:".",precision:2},XCD:{symbol:"$",grouping:",",decimal:".",precision:2},XOF:{symbol:"F",grouping:" ",decimal:",",precision:2},XPF:{symbol:"F",grouping:",",decimal:".",precision:2},YER:{symbol:"﷼",grouping:",",decimal:".",precision:2},ZAR:{symbol:"R",grouping:" ",decimal:",",precision:2},ZMW:{symbol:"ZK",grouping:",",decimal:".",precision:2},WON:{symbol:"₩",grouping:",",decimal:".",precision:2}};function c(e){return n[e]||{symbol:"$",grouping:",",decimal:".",precision:2}}},8899:(e,t,a)=>{"use strict";a.d(t,{LR:()=>r});var n=a(9487),c=a(2003);function r(e,t,a={}){const r=(0,n.X)(t);if(!r||isNaN(e))return null;const{decimal:l,grouping:s,precision:i,symbol:o}={...r,...a},m=e<0?"-":"",u=Math.abs(e),d=Math.floor(u);return{sign:m,symbol:o,integer:(0,c.Z)(u,i,l,s).split(l)[0],fraction:i>0?(0,c.Z)(u-d,i,l,s).slice(1):""}}},2003:(e,t,a)=>{"use strict";function n(e,t=0,a=".",n=","){const c=(e+"").replace(/[^0-9+\-Ee.]/g,""),r=isFinite(+c)?+c:0,l=isFinite(+t)?Math.abs(t):0,s=(l?function(e,t){const a=Math.pow(10,t);return""+(Math.round(e*a)/a).toFixed(t)}(r,l):""+Math.round(r)).split(".");return s[0].length>3&&(s[0]=s[0].replace(/\B(?=(?:\d{3})+(?!\d))/g,n)),(s[1]||"").lengthn})},1074:(e,t,a)=>{"use strict";a.d(t,{Z:()=>c});var n=a(9307);const c=(0,n.forwardRef)((function({icon:e,size:t=24,...a},c){return(0,n.cloneElement)(e,{width:t,height:t,...a,ref:c})}))},3259:(e,t,a)=>{"use strict";a.d(t,{Z:()=>r});var n=a(9196),c=a(444);const r=(0,n.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,n.createElement)(c.Path,{d:"M20 11.2H6.8l3.7-3.7-1-1L3.9 12l5.6 5.5 1-1-3.7-3.7H20z"}))},495:(e,t,a)=>{"use strict";a.d(t,{Z:()=>r});var n=a(9196),c=a(444);const r=(0,n.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,n.createElement)(c.Path,{d:"m14.5 6.5-1 1 3.7 3.7H4v1.6h13.2l-3.7 3.7 1 1 5.6-5.5z"}))},9201:(e,t,a)=>{"use strict";a.d(t,{Z:()=>r});var n=a(9196),c=a(444);const r=(0,n.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,n.createElement)(c.Path,{d:"M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"}))},2229:(e,t,a)=>{"use strict";a.d(t,{Z:()=>r});var n=a(9196),c=a(444);const r=(0,n.createElement)(c.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,n.createElement)(c.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"}))},7489:(e,t,a)=>{"use strict";a.d(t,{Z:()=>r});var n=a(9196),c=a(444);const r=(0,n.createElement)(c.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,n.createElement)(c.Path,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"}))},6163:(e,t,a)=>{"use strict";a.d(t,{Z:()=>r});var n=a(9196),c=a(444);const r=(0,n.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,n.createElement)(c.Path,{d:"M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z"}))},9517:(e,t,a)=>{"use strict";a.d(t,{Z:()=>r});var n=a(9196),c=a(444);const r=(0,n.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,n.createElement)(c.Path,{d:"M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"}))},4160:(e,t,a)=>{"use strict";a.d(t,{Z:()=>r});var n=a(9196),c=a(444);const r=(0,n.createElement)(c.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,n.createElement)(c.Path,{d:"M20.8 10.7l-4.3-4.3-1.1 1.1 4.3 4.3c.1.1.1.3 0 .4l-4.3 4.3 1.1 1.1 4.3-4.3c.7-.8.7-1.9 0-2.6zM4.2 11.8l4.3-4.3-1-1-4.3 4.3c-.7.7-.7 1.8 0 2.5l4.3 4.3 1.1-1.1-4.3-4.3c-.2-.1-.2-.3-.1-.4z"}))},8960:(e,t,a)=>{"use strict";a.d(t,{Z:()=>r});var n=a(9196),c=a(444);const r=(0,n.createElement)(c.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,n.createElement)(c.Path,{d:"M17.2 10.9c-.5-1-1.2-2.1-2.1-3.2-.6-.9-1.3-1.7-2.1-2.6L12 4l-1 1.1c-.6.9-1.3 1.7-2 2.6-.8 1.2-1.5 2.3-2 3.2-.6 1.2-1 2.2-1 3 0 3.4 2.7 6.1 6.1 6.1s6.1-2.7 6.1-6.1c0-.8-.3-1.8-1-3zm-5.1 7.6c-2.5 0-4.6-2.1-4.6-4.6 0-.3.1-1 .8-2.3.5-.9 1.1-1.9 2-3.1.7-.9 1.3-1.7 1.8-2.3.7.8 1.3 1.6 1.8 2.3.8 1.1 1.5 2.2 2 3.1.7 1.3.8 2 .8 2.3 0 2.5-2.1 4.6-4.6 4.6z"}))},5381:(e,t,a)=>{"use strict";a.d(t,{Z:()=>r});var n=a(9196),c=a(444);const r=(0,n.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,n.createElement)(c.Path,{d:"M19.5 4.5h-7V6h4.44l-5.97 5.97 1.06 1.06L18 7.06v4.44h1.5v-7Zm-13 1a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-3H17v3a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-10a.5.5 0 0 1 .5-.5h3V5.5h-3Z"}))},6376:(e,t,a)=>{"use strict";a.d(t,{Z:()=>r});var n=a(9196),c=a(444);const r=(0,n.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,n.createElement)(c.Path,{d:"m3 5c0-1.10457.89543-2 2-2h13.5c1.1046 0 2 .89543 2 2v13.5c0 1.1046-.8954 2-2 2h-13.5c-1.10457 0-2-.8954-2-2zm2-.5h6v6.5h-6.5v-6c0-.27614.22386-.5.5-.5zm-.5 8v6c0 .2761.22386.5.5.5h6v-6.5zm8 0v6.5h6c.2761 0 .5-.2239.5-.5v-6zm0-8v6.5h6.5v-6c0-.27614-.2239-.5-.5-.5z",fillRule:"evenodd",clipRule:"evenodd"}))},1646:(e,t,a)=>{"use strict";a.d(t,{Z:()=>r});var n=a(9196),c=a(444);const r=(0,n.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,n.createElement)(c.Path,{d:"M12 4.75a7.25 7.25 0 100 14.5 7.25 7.25 0 000-14.5zM3.25 12a8.75 8.75 0 1117.5 0 8.75 8.75 0 01-17.5 0zM12 8.75a1.5 1.5 0 01.167 2.99c-.465.052-.917.44-.917 1.01V14h1.5v-.845A3 3 0 109 10.25h1.5a1.5 1.5 0 011.5-1.5zM11.25 15v1.5h1.5V15h-1.5z"}))},496:(e,t,a)=>{"use strict";a.d(t,{Z:()=>r});var n=a(9196),c=a(444);const r=(0,n.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,n.createElement)(c.Path,{d:"M12 3.2c-4.8 0-8.8 3.9-8.8 8.8 0 4.8 3.9 8.8 8.8 8.8 4.8 0 8.8-3.9 8.8-8.8 0-4.8-4-8.8-8.8-8.8zm0 16c-4 0-7.2-3.3-7.2-7.2C4.8 8 8 4.8 12 4.8s7.2 3.3 7.2 7.2c0 4-3.2 7.2-7.2 7.2zM11 17h2v-6h-2v6zm0-8h2V7h-2v2z"}))},7663:(e,t,a)=>{"use strict";a.d(t,{Z:()=>r});var n=a(9196),c=a(444);const r=(0,n.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,n.createElement)(c.Path,{d:"M10.5 4v4h3V4H15v4h1.5a1 1 0 011 1v4l-3 4v2a1 1 0 01-1 1h-3a1 1 0 01-1-1v-2l-3-4V9a1 1 0 011-1H9V4h1.5zm.5 12.5v2h2v-2l3-4v-3H8v3l3 4z"}))},797:(e,t,a)=>{"use strict";a.d(t,{Z:()=>r});var n=a(9196),c=a(444);const r=(0,n.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},(0,n.createElement)(c.Path,{d:"M10 2c4.42 0 8 3.58 8 8s-3.58 8-8 8-8-3.58-8-8 3.58-8 8-8zm1.13 9.38l.35-6.46H8.52l.35 6.46h2.26zm-.09 3.36c.24-.23.37-.55.37-.96 0-.42-.12-.74-.36-.97s-.59-.35-1.06-.35-.82.12-1.07.35-.37.55-.37.97c0 .41.13.73.38.96.26.23.61.34 1.06.34s.8-.11 1.05-.34z"}))},2817:(e,t,a)=>{"use strict";a.d(t,{Z:()=>r});var n=a(9196),c=a(444);const r=(0,n.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},(0,n.createElement)(c.Path,{d:"M20 10c0-5.51-4.49-10-10-10C4.48 0 0 4.49 0 10c0 5.52 4.48 10 10 10 5.51 0 10-4.48 10-10zM7.78 15.37L4.37 6.22c.55-.02 1.17-.08 1.17-.08.5-.06.44-1.13-.06-1.11 0 0-1.45.11-2.37.11-.18 0-.37 0-.58-.01C4.12 2.69 6.87 1.11 10 1.11c2.33 0 4.45.87 6.05 2.34-.68-.11-1.65.39-1.65 1.58 0 .74.45 1.36.9 2.1.35.61.55 1.36.55 2.46 0 1.49-1.4 5-1.4 5l-3.03-8.37c.54-.02.82-.17.82-.17.5-.05.44-1.25-.06-1.22 0 0-1.44.12-2.38.12-.87 0-2.33-.12-2.33-.12-.5-.03-.56 1.2-.06 1.22l.92.08 1.26 3.41zM17.41 10c.24-.64.74-1.87.43-4.25.7 1.29 1.05 2.71 1.05 4.25 0 3.29-1.73 6.24-4.4 7.78.97-2.59 1.94-5.2 2.92-7.78zM6.1 18.09C3.12 16.65 1.11 13.53 1.11 10c0-1.3.23-2.48.72-3.59C3.25 10.3 4.67 14.2 6.1 18.09zm4.03-6.63l2.58 6.98c-.86.29-1.76.45-2.71.45-.79 0-1.57-.11-2.29-.33.81-2.38 1.62-4.74 2.42-7.1z"}))},4769:e=>{"use strict";function t(e){return e&&"object"==typeof e?c(e)||r(e)?e:n(e)?function(e,t){if(e.map)return e.map(t);for(var a=[],n=0;n{var a;!function(){"use strict";var n={}.hasOwnProperty;function c(){for(var e=[],t=0;t{t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const a="color: "+this.color;t.splice(1,0,a,"color: inherit");let n=0,c=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(n++,"%c"===e&&(c=n))})),t.splice(c,0,a)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG);return e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=a(1741)(t);const{formatters:n}=e.exports;n.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},1741:(e,t,a)=>{e.exports=function(e){function t(e){let a,c,r,l=null;function s(...e){if(!s.enabled)return;const n=s,c=Number(new Date),r=c-(a||c);n.diff=r,n.prev=a,n.curr=c,a=c,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let l=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((a,c)=>{if("%%"===a)return"%";l++;const r=t.formatters[c];if("function"==typeof r){const t=e[l];a=r.call(n,t),e.splice(l,1),l--}return a})),t.formatArgs.call(n,e);(n.log||t.log).apply(n,e)}return s.namespace=e,s.useColors=t.useColors(),s.color=t.selectColor(e),s.extend=n,s.destroy=t.destroy,Object.defineProperty(s,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==l?l:(c!==t.namespaces&&(c=t.namespaces,r=t.enabled(e)),r),set:e=>{l=e}}),"function"==typeof t.init&&t.init(s),s}function n(e,a){const n=t(this.namespace+(void 0===a?":":a)+e);return n.log=this.log,n}function c(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},t.disable=function(){const e=[...t.names.map(c),...t.skips.map(c).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let a;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const n=("string"==typeof e?e:"").split(/[\s,]+/),c=n.length;for(a=0;a{t[a]=e[a]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let a=0;for(let t=0;t{"use strict";t.G=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=e.split(/\r\n|[\n\v\f\r\x85]/),n=e.match(/\r\n|[\n\v\f\r\x85]/g)||[],c=[],r=0;function l(){var e={};for(c.push(e);r{"use strict";a.d(t,{Ep:()=>p,aU:()=>n,cP:()=>h,q_:()=>o});var n,c=a(255);!function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"}(n||(n={}));var r=function(e){return e};var l="beforeunload",s="hashchange",i="popstate";function o(e){void 0===e&&(e={});var t=e.window,a=void 0===t?document.defaultView:t,o=a.history;function g(){var e=h(a.location.hash.substr(1)),t=e.pathname,n=void 0===t?"/":t,c=e.search,l=void 0===c?"":c,s=e.hash,i=void 0===s?"":s,m=o.state||{};return[m.idx,r({pathname:n,search:l,hash:i,state:m.usr||null,key:m.key||"default"})]}var f=null;function v(){if(f)Z.call(f),f=null;else{var e=n.Pop,t=g(),a=t[0],c=t[1];if(Z.length){if(null!=a){var r=b-a;r&&(f={action:e,location:c,retry:function(){N(-1*r)}},N(r))}}else S(e)}}a.addEventListener(i,v),a.addEventListener(s,(function(){p(g()[1])!==p(w)&&v()}));var E=n.Pop,k=g(),b=k[0],w=k[1],y=u(),Z=u();function C(e){return function(){var e=document.querySelector("base"),t="";if(e&&e.getAttribute("href")){var n=a.location.href,c=n.indexOf("#");t=-1===c?n:n.slice(0,c)}return t}()+"#"+("string"==typeof e?e:p(e))}function _(e,t){return void 0===t&&(t=null),r((0,c.Z)({pathname:w.pathname,hash:"",search:""},"string"==typeof e?h(e):e,{state:t,key:d()}))}function R(e,t){return[{usr:e.state,key:e.key,idx:t},C(e)]}function j(e,t,a){return!Z.length||(Z.call({action:e,location:t,retry:a}),!1)}function S(e){E=e;var t=g();b=t[0],w=t[1],y.call({action:E,location:w})}function N(e){o.go(e)}null==b&&(b=0,o.replaceState((0,c.Z)({},o.state,{idx:b}),""));var P={get action(){return E},get location(){return w},createHref:C,push:function e(t,c){var r=n.Push,l=_(t,c);if(j(r,l,(function(){e(t,c)}))){var s=R(l,b+1),i=s[0],m=s[1];try{o.pushState(i,"",m)}catch(e){a.location.assign(m)}S(r)}},replace:function e(t,a){var c=n.Replace,r=_(t,a);if(j(c,r,(function(){e(t,a)}))){var l=R(r,b),s=l[0],i=l[1];o.replaceState(s,"",i),S(c)}},go:N,back:function(){N(-1)},forward:function(){N(1)},listen:function(e){return y.push(e)},block:function(e){var t=Z.push(e);return 1===Z.length&&a.addEventListener(l,m),function(){t(),Z.length||a.removeEventListener(l,m)}}};return P}function m(e){e.preventDefault(),e.returnValue=""}function u(){var e=[];return{get length(){return e.length},push:function(t){return e.push(t),function(){e=e.filter((function(e){return e!==t}))}},call:function(t){e.forEach((function(e){return e&&e(t)}))}}}function d(){return Math.random().toString(36).substr(2,8)}function p(e){var t=e.pathname,a=void 0===t?"/":t,n=e.search,c=void 0===n?"":n,r=e.hash,l=void 0===r?"":r;return c&&"?"!==c&&(a+="?"===c.charAt(0)?c:"?"+c),l&&"#"!==l&&(a+="#"===l.charAt(0)?l:"#"+l),a}function h(e){var t={};if(e){var a=e.indexOf("#");a>=0&&(t.hash=e.substr(a),e=e.substr(0,a));var n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}},7329:(e,t,a)=>{"use strict";a.d(t,{Z:()=>n});const n={wrapper:"GqFcAwJvIrg1v7f6QUfw",header:"OENx8kmm62tkWGukzP2S",title:"KnqJLKwSceJTwFJrPGHq","close-button":"PJU0_yA9jNf7ao0jhHut",footer:"rrORM3zqHfGvqiPduEXY",steps:"Q7fUcDUGhteXEr18rZPC","action-button":"S5LAeskUiEQ0JlPhr0Ze"}},1494:(e,t,a)=>{"use strict";a.d(t,{Z:()=>n});const n={"admin-page":"sexr0jUxC1jVixdKiDnC",background:"vKQ11sLeAM45M04P1ccj"}},281:(e,t,a)=>{"use strict";a.d(t,{Z:()=>n});const n={"section-hero":"vMa4i_Dza2t5Zi_Bw9Nf"}},3466:(e,t,a)=>{"use strict";a.d(t,{Z:()=>n});const n={button:"zI5tJ_qhWE6Oe6Lk75GY","is-icon-button":"tuBt2DLqimiImoqVzPqo",small:"Na39I683LAaSA99REg14",normal:"ipS7tKy9GntCS4R3vekF",icon:"paGLQwtPEaJmtArCcmyK",regular:"lZAo6_oGfclXOO9CC6Rd","full-width":"xJDOiJxTt0R_wSl8Ipz_",loading:"q_tVWqMjl39RcY6WtQA6","external-icon":"CDuBjJp_8jxzx5j6Nept"}},1489:(e,t,a)=>{"use strict";a.d(t,{Z:()=>n});const n={cut:"msOlyh2T7D6uhbM6AROg",icon:"cPN7USVqSBpxUswfDtUZ",cta:"EmnJAyEzzn1QpA8HtypY",iconContainer:"vV7YZikAz0oHYsuvtxMq",description:"T1YaMupeZmBIpXZHY9EZ"}},5785:()=>{},1275:()=>{},5612:(e,t,a)=>{"use strict";a.d(t,{Z:()=>n});const n={"star-icon":"cuoSlhSNrqf1dozY22Xb",jetpack:"lAIiifeLMmZAPlQ9n9ZR","checkmark-icon":"JLquNpQVlysAamuh5lJO",socialIcon:"cbOwD8Y4tFjwimmtchQI",bluesky:"aLWBKY0yRghEk7tNCgK3",facebook:"aHOlEBGD5EA8NKRw3xTw",instagram:"cL3m0xBYTYhIKI7lCqDB",twitter:"af4Y_zItXvLAOEoSDPSv",linkedin:"f68aqF3XSD1OBvXR1get",tumblr:"xFI0dt3UiXRlRQdqPWkx",google:"q7JEoyymveP6kF747M43",mastodon:"DKOBOTVmTLbh26gUH_73",nextdoor:"n5XodNsuMfMAAvqHFmbw",whatsapp:"fftumuc_lJ6v0tq4UMVR"}},9054:()=>{},3247:(e,t,a)=>{"use strict";a.d(t,{Z:()=>n});const n={sm:"(max-width: 599px)",md:"(min-width: 600px) and (max-width: 959px)",lg:"(min-width: 960px)"}},3080:(e,t,a)=>{"use strict";a.d(t,{Z:()=>n});const n={sm:"(max-width: 599px)",md:"(min-width: 600px) and (max-width: 959px)",lg:"(min-width: 960px)",smCols:"4",mdCols:"8",lgCols:"12","col-sm-1":"RuVLl3q4lxTQa3wbhBJB","col-sm-1-start":"f9LZTRG4MMK42rS89afW","col-sm-1-end":"bHe_zKxjjpUwHw_MdYE1","col-sm-2":"QZbNrOqE2aNSn50xVhpU","col-sm-2-start":"ev7W3z7zVYPeHAlYqZjf","col-sm-2-end":"NJWd1m_e7lOiPYru2ZMP","col-sm-3":"Xc6nt1Qc1DI0Z2A3gt1r","col-sm-3-start":"UIcN_GXiPRoIsin8Kohg","col-sm-3-end":"GRKCyqb5LufCSCgykKFc","col-sm-4":"i_qTq8gqhhC3vIUepVRB","col-sm-4-start":"G3qaZ3Jpbvam_1XvGxgc","col-sm-4-end":"VRCNYKZtO9zukEwmgP1y","col-md-1":"tRm008K_WJL79WoNZTNL","col-md-1-start":"l5T2P_bgKts4tdaRkS1d","col-md-1-end":"zOCxfLZpF6BlgC7a_Yq1","col-md-2":"F80DdgVn0m5OpvtSQWka","col-md-2-start":"oI1c7JYfiJtMQHbhngtU","col-md-2-end":"pMQtA_4jh1_1lVknqEP5","col-md-3":"VenqMpdgyKQVUNNQcfqd","col-md-3-start":"seNYL99uoczf9V4MxBxT","col-md-3-end":"YKfF1HFhI9KygA5l3b2J","col-md-4":"yAi0Cv1xDWkoqsaUhvhR","col-md-4-start":"ubhnyZOnkgxNhh6XtVWv","col-md-4-end":"RGOPGQbWMJ9Ei5oFxS7X","col-md-5":"Sz1E2aWbX483ijdi6yge","col-md-5-start":"tku6_bRYrX9tMbgYGmIl","col-md-5-end":"b5JHttOhSEcI1WBlqAjk","col-md-6":"FboSx5MoKTAWbxXyYlCw","col-md-6-start":"Jhs8yEEmodG30edbJvag","col-md-6-end":"IpzbbKVqEqPcfIGkXkwt","col-md-7":"mhCPwfAZ4Kmm_empzJAq","col-md-7-start":"x034ilrJF7rO9UJB2rI1","col-md-7-end":"Wt8t2e16viRrOJ1lLA5v","col-md-8":"S6pIrEy9AMLKx9bgh_Ae","col-md-8-start":"kEfI4tGyuWfHTlRnvIab","col-md-8-end":"PUzX4RRsKq1dnsz3gebS","col-lg-1":"X_pdcLJikd8LS_YAdJlB","col-lg-1-start":"tl936d14Huby4khYp05X","col-lg-1-end":"hnge0LnR69d3NXEtEE1t","col-lg-2":"fj0NUMuyZQcPNgKcjp5Z","col-lg-2-start":"R2ncBX7a2NigdYCcV1OX","col-lg-2-end":"t8vMSDVYno9k9itRwnXb","col-lg-3":"wsDuEN2GqHx6qzo8dUdk","col-lg-3-start":"cIEVPUweWtLBy3xaXnMx","col-lg-3-end":"fajUWBwu1m2B479j3jmz","col-lg-4":"YR0c7fQTgMkDdWzwSyLp","col-lg-4-start":"xlwp8BmplxkKNMI7gamo","col-lg-4-end":"_C4O1w9DUqx1m3gPf8aA","col-lg-5":"Z54F1hAErckAIrKlxnXW","col-lg-5-start":"ezSDWkRHmKSxDJXxuiOH","col-lg-5-end":"T0ChoeAjGJjkkNrYhD4g","col-lg-6":"qtMoMPF6yHvGJnWHSsde","col-lg-6-start":"gdoywN5VPiWERfIBqkph","col-lg-6-end":"wUev_VH5uf_pwFFlbnAU","col-lg-7":"egIPDFJsOpownTClq9XP","col-lg-7-start":"yGhp9yoAW7k0kQik9AB7","col-lg-7-end":"SJ43U9mR5wUg5V2qBeQA","col-lg-8":"cTuyHfMwSUJxN_HdIEgd","col-lg-8-start":"smCr8DaIagcumdvdldiK","col-lg-8-end":"T03NHzQJvzwL6wAfIiTL","col-lg-9":"pMvxM3RJGjqyNdf9qg1Y","col-lg-9-start":"iIVpNRwEnQ_JI5gpp9EN","col-lg-9-end":"ZbQ4u4vGSX5rJOje4uGL","col-lg-10":"gKb5wuIDAlKGbrjK2vxy","col-lg-10-start":"Z7pINdImE2WJiYnZBTqm","col-lg-10-end":"ZTxp6qpvwurMdOnLLSz1","col-lg-11":"NnQTlbfnxPDR6cQ7rygg","col-lg-11-start":"O137wZd6Yl0olSA9PsXR","col-lg-11-end":"zf2OJtQ2MPz6SDoh6CB0","col-lg-12":"U3H6UHW6HqRt9hdzVg3O","col-lg-12-start":"zynnNeS_ZBTxABcVpUQH","col-lg-12-end":"vI8tltFZtFUNAy9Iag9s"}},8730:(e,t,a)=>{"use strict";a.d(t,{Z:()=>n});const n={sm:"(max-width: 599px)",md:"(min-width: 600px) and (max-width: 959px)",lg:"(min-width: 960px)",container:"SqdhUZkXCRuIpErj1B3z",fluid:"OZC_9a1LhpWF9dv15Gdh"}},7703:(e,t,a)=>{"use strict";a.d(t,{Z:()=>n});const n={container:"VHYulMcpzbr10HWR0iSE","icon-wrapper":"FGpSkMCiIHQjszcV0dbn","close-button":"KoWZcCwhW13xvkEb0QON","main-content":"smrfczkC53EaFM8OJUXs",title:"IKYRWoPwt9xOVEx1wzNS","action-bar":"qM0qY6mPYp1MPN54A3Kg","is-error":"A5YkDkkXuiYgavrY6Nux",icon:"y_IPyP1wIAOhyNaqvXJq","is-warning":"cT5rwuPMZzWvi5o6shMl","is-info":"yo0O3uvNomPsYUXFCpAS","is-success":"oZdDFf1jBLkzn5ICCC6x"}},9929:(e,t,a)=>{"use strict";a.d(t,{Z:()=>n});const n={container:"p4qz2tkq0p9hxucJ6Qk2",table:"lbNDyXioOwvyvbALtCBm","is-viewport-large":"s2Lsn4kbm6BrS3DSndRB",card:"cLaNK_XcbTGlRQ4Tp43Q","is-primary":"CYt1X0eH1icRjhtJ28jx",header:"DAkZc1P9A3K12fjEliMg",item:"WUBuYABl8nymjs9NnCEL","last-feature":"ANtCFeb41NhA8PA3H7ZN",value:"Ql2gy_148yW8Vw5vhaKD",icon:"EAQrAnQEW1z1BfdY5gbC","icon-check":"JDSTlLoOC_4aUoH2oNM2","icon-cross":"zNdQRJ1w7BvaQOYyqzHK",popover:"lr7vbX95SKtoe7DarJcZ","popover-icon":"KRrGp2xdkeBOxLZeuQ6X",tos:"H_ZJiRVJg0LiMXPGOcmt","tos-container":"x21z_DixObRDsDaWotP1"}},9184:(e,t,a)=>{"use strict";a.d(t,{Z:()=>n});const n={container:"dovianZYLKhnbnh9I06o","price-container":"lljtQMhW7lq5tE5SDJEf","promo-label":"NubApIV1vQCRUNprfm6b",price:"dhFQXpZfMwVI8vuYHnwC","is-not-off-price":"eD7hzxFmdtG_MgmBtl_k",footer:"C64ZjjUAqJC1T2Sa7apS",legend:"UpZDGew6Ay1hPoP6eI7b",symbol:"TDiiPbuW1Z0_05u_pvcK"}},1683:()=>{},514:(e,t,a)=>{"use strict";a.d(t,{Z:()=>n});const n={status:"bZ4b33s2MdcOjaDKBbeV",status__indicator:"UzkzDaqt2mXprJh2OXRz",status__label:"QuS0vdcr87FsiBvSSrvA","is-active":"bGx0wbQAwuY7k8P3PHVQ","is-inactive":"wR8Cz8uHgObTQavolv5y","is-error":"IzbBYGwBKhSYFUQlIMww","is-action":"Kdvp_HJf89IBrZuCaLm8","is-initializing":"hVf5vsbBWm8OFye7cy7a"}},7920:()=>{},3280:(e,t,a)=>{"use strict";a.d(t,{Z:()=>n});const n={reset:"WQVtrU6q0L1Igcj7wCrQ","headline-medium":"UujoBFTnQNY2cWU2SIsH","headline-small":"TeGO5V_thHw5lDAm1_2M","headline-small-regular":"WolQzb2MsSgiNmLtc7_j","title-medium":"hUB0JT8p1T2Hw28N6qC8","title-medium-semi-bold":"gKZWDv5chz3_O3Syp74H","title-small":"zY2No8Ga4b8shbOQGhnv",body:"tIj0D1t8Cc892ikmgFPZ","body-small":"KdcN0BnOaVeVhyLRKqhS","body-extra-small":"dso3Rh3tl3Xv1GumBktz","body-extra-small-bold":"mQ1UlbN9u4Mg9byO8m7v",label:"PItlW5vRExLnTj4a8eLE","m-0":"TwRpPlktzxhmFVeua7P5","mx-0":"zVfqx7gyb3o9mxfGynn1","my-0":"iSHVzNiB9iVleGljaQxy","mt-0":"xqDIp6cNVr_E6RXaiPyD","mr-0":"S8EwaXk1kyPizt6x4WH2","mb-0":"ODX5Vr1TARoLFkDDFooD","ml-0":"cphJ8dCpfimnky7P2FHg","m-1":"PFgIhNxIyiSuNvQjAIYj","mx-1":"M2jKmUzDxvJjjVEPU3zn","my-1":"io15gAh8tMTNbSEfwJKk","mt-1":"rcTN5uw9xIEeMEGL3Xi_","mr-1":"CQSkybjq2TcRM1Xo9COV","mb-1":"hfqOWgq6_MEGdFE82eOY","ml-1":"I8MxZQYTbuu595yfesWA","m-2":"kQkc6rmdpvLKPkyoJtVQ","mx-2":"j6vFPxWuu4Jan2ldoxpp","my-2":"hqr39dC4H_AbactPAkCG","mt-2":"c3dQnMi16C6J6Ecy4283","mr-2":"YNZmHOuRo6hU7zzKfPdP","mb-2":"Db8lbak1_wunpPk8NwKU","ml-2":"ftsYE5J9hLzquQ0tA5dY","m-3":"Det4MHzLUW7EeDnafPzq","mx-3":"h_8EEAztC29Vve1datb5","my-3":"YXIXJ0h1k47u6hzK8KcM","mt-3":"soADBBkcIKCBXzCTuV9_","mr-3":"zSX59ziEaEWGjnpZa4uV","mb-3":"yrVTnq_WBMbejg89c2ZQ","ml-3":"UKtHPJnI2cXBWtPDm5hM","m-4":"guexok_Tqd5Tf52hRlbT","mx-4":"oS1E2KfTBZkJ3F0tN7T6","my-4":"DN1OhhXi6AoBgEdDSbGd","mt-4":"ot2kkMcYHv53hLZ4LSn0","mr-4":"A1krOZZhlQ6Sp8Cy4bly","mb-4":"pkDbXXXL32237M0hokEh","ml-4":"XXv4kDTGvEnQeuGKOPU3","m-5":"yGqHk1a57gaISwkXwXe6","mx-5":"X8cghM358X3DkXLc9aNK","my-5":"GdfSmGwHlFnN2S6xBn1f","mt-5":"yqeuzwyGQ7zG0avrGqi_","mr-5":"g9emeCkuHvYhveiJbfXO","mb-5":"Lvk3dqcyHbZ07QCRlrUQ","ml-5":"r3yQECDQ9qX0XZzXlVAg","m-6":"aQhlPwht2Cz1X_63Miw0","mx-6":"JyHb0vK3wJgpblL9s5j8","my-6":"cY2gULL1lAv6WPNIRuf3","mt-6":"NBWQ9Lwhh_fnry3lg_p7","mr-6":"yIOniNe5E40C8fWvBm5V","mb-6":"t30usboNSyqfQWIwHvT3","ml-6":"Nm_TyFkYCMhOoghoToKJ","m-7":"C4qJKoBXpgKtpmrqtEKB","mx-7":"S93Srbu6NQ_PBr7DmTiD","my-7":"fJj8k6gGJDks3crUZxOS","mt-7":"cW6D6djs7Ppm7fD7TeoV","mr-7":"DuCnqNfcxcP3Z__Yo5Ro","mb-7":"im8407m2fw5vOg7O2zsw","ml-7":"G0fbeBgvz2sh3uTP9gNl","m-8":"kvW3sBCxRxUqz1jrVMJl","mx-8":"tOjEqjLONQdkiYx_XRnw","my-8":"op5hFSx318zgxsoZZNLN","mt-8":"c9WfNHP6TFKWIfLxv52J","mr-8":"sBA75QqcqRwwYSHJh2wc","mb-8":"GpL6idrXmSOM6jB8Ohsf","ml-8":"HbtWJoQwpgGycz8dGzeT","p-0":"uxX3khU88VQ_Ah49Ejsa","px-0":"KX0FhpBKwKzs9fOUdbNz","py-0":"PfK8vKDyN32dnimlzYjz","pt-0":"emxLHRjQuJsImnPbQIzE","pr-0":"kJ8WzlpTVgdViXt8ukP9","pb-0":"tg_UIUI11VBzrTAn2AzJ","pl-0":"uczvl8kaz84oPQJ2DB2R","p-1":"o7UHPcdVK3lt7q3lqV4o","px-1":"IDqEOxvDoYrFYxELPmtX","py-1":"DdywPW2qSYlu2pt8tpO2","pt-1":"npy3hw4A5QSkDicb2CJJ","pr-1":"LgbptTApNY5NwLQvEFAt","pb-1":"WZQy2SZuZso59bUsXXyl","pl-1":"o331apInxNunbYB3SfPE","p-2":"fMPIyD9Vqki1Lrc_yJnG","px-2":"i2pMcTcdrr10IQoiSm_L","py-2":"eA702gn32kwptiI1obXH","pt-2":"o9bGieUKcYc8o0Ij9oZX","pr-2":"SwZcFez1RDqWsOFjB5iG","pb-2":"eHpLc_idmuEqeqCTvqkN","pl-2":"vU39i2B4P1fUTMB2l6Vo","p-3":"JHWNzBnE29awhdu5BEh1","px-3":"X72lGbb56L3KFzC2xQ9N","py-3":"BzfNhRG8wXdCEB5ocQ6e","pt-3":"srV0KSDC83a2fiimSMMQ","pr-3":"lUWfkmbQjCskhcNwkyCm","pb-3":"Ts0dIlc3aTSL7V4cIHis","pl-3":"CzlqQXXhX6MvorArFZ8B","p-4":"TqMPkQtR_DdZuKb5vBoV","px-4":"a7UrjhI69Vetlcj9ZVzz","py-4":"StEhBzGs2Gi5dDEkjhAv","pt-4":"FGneZfZyvYrt1dG0zcnm","pr-4":"APEH216rpdlJWgD2fHc8","pb-4":"oGwXC3ohCic9XnAj6x69","pl-4":"U6gnT9y42ViPNOcNzBwb","p-5":"IpdRLBwnHqbqFrixgbYC","px-5":"HgNeXvkBa9o3bQ5fvFZm","py-5":"tJtFZM3XfPG9v9TSDfN1","pt-5":"PdifHW45QeXYfK568uD8","pr-5":"mbLkWTTZ0Za_BBbFZ5b2","pb-5":"vVWpZpLlWrkTt0hMk8XU","pl-5":"RxfaJj5a1Nt6IavEo5Zl","p-6":"SppJULDGdnOGcjZNCYBy","px-6":"palY2nLwdoyooPUm9Hhk","py-6":"WYw1JvZC0ppLdvSAPhr_","pt-6":"YEEJ9b90ueQaPfiU8aeN","pr-6":"QE0ssnsKvWJMqlhPbY5u","pb-6":"n8yA3jHlMRyLd5UIfoND","pl-6":"tXHmxYnHzbwtfxEaG51n","p-7":"kBTsPKkO_3g_tLkj77Um","px-7":"RyhrFx6Y1FGDrGAAyaxm","py-7":"CBwRpB0bDN3iEdQPPMJO","pt-7":"vQVSq6SvWKbOMu6r4H6b","pr-7":"oBy5__aEADMsH46mrgFX","pb-7":"KVEXoJqf1s92j0JMdNmN","pl-7":"ZMXGNrNaKW3k_3TLz0Fq","p-8":"tuiR9PhkHXhGyEgzRZRI","px-8":"U7454qyWkQNa2iaSJziu","py-8":"VLYIv2GVocjuN93e8HC8","pt-8":"X1rm9DQ1zLGLfogja5Gn","pr-8":"JS7G6kAuqJo5GIuF8S5t","pb-8":"Y8F9ga1TDCMbM1lj4gUz","pl-8":"AJuyNGrI63BOWql719H8"}},3591:(e,t,a)=>{"use strict";a.d(t,{Z:()=>n});const n={global:"_fUXxnSp5pagKBp9gSN7"}},9836:(e,t,a)=>{"use strict";a.d(t,{Z:()=>n});const n={heading:"urouayitSUT8zW0V3p_0",notice:"iXXJlk08gFDeCvsTTlNQ",button:"MWqRqr7q6fgvLxitcWYk","bigger-than-medium":"YLcXAoc82nypTPaKSAcd",error:"e6hHy8BZ7ZKPSXbIC0UG",message:"jXz8LnXNzMDdtHqkG0sZ"}},3900:(e,t,a)=>{"use strict";a.d(t,{Z:()=>n});const n={navigation:"vvXnRXxrU1kP1KsdSr4J",badge:"aDCTkUFaJEeZzYYE6qv5"}},9993:(e,t,a)=>{"use strict";a.d(t,{Z:()=>n});const n={container:"EU0Rvu4PDqVtnCAmbgHg"}},4424:(e,t,a)=>{"use strict";a.d(t,{Z:()=>n});const n={loading:"kdsaL7c4bpTwf_A4fIUT",loading__message:"b0eN3as5AgxQW7EAkarg"}},3064:(e,t,a)=>{"use strict";a.d(t,{Z:()=>n});const n={footer:"_Wc3apZobag_9Ag_THTb"}},9137:(e,t,a)=>{"use strict";a.d(t,{Z:()=>n});const n={"diff-viewer":"LumryWNddoF092fZgN2O","diff-viewer__filename":"NFMwU3H5k2qArZe2TTp9","diff-viewer__file":"G5W9M8qfo3sGl2OIbwg9","diff-viewer__line-numbers":"Bx4RDCUR316fm_jgGS8N","diff-viewer__lines":"GhN0JvAyRQI3SnVWp2Ot"}},3932:(e,t,a)=>{"use strict";a.d(t,{Z:()=>n});const n={"footer-checkbox":"uQlXhcfYn9tbnK27_Gct","standalone-mode-section":"e5YHJiYcvfgdEEJsS_YM","share-data-section":"PO9zDOaSkcv_RqpfZF_v"}},8452:(e,t,a)=>{"use strict";a.d(t,{Z:()=>n});const n={spinner:"V6B8ltQ7TH3UKzUC_qy1","firewall-subheading":"C9hcvYAbgHPhN2Tl22xg","brute-force-protection-subheading":"XkbIpr2gzB4XEhHgzkY4","firewall-subheading__content":"BfcZn0_X33Ajdd1Gl18G","icon-popover":"rBmVJIeTNpd0RJWaRGuJ","upgrade-button":"jVq5444f1Xh6nNkz0Qe_","firewall-header":"amF9cOnMiv2nHbkMXQiQ","stat-card-wrapper":"FodE_7RbLD8zeBSd6eVR","popover-text":"twyPhW_K164HITnDrwEg","loading-text":"tbcd9xc_TjcFdokOt3F_","firewall-heading":"pnoqLV3l30xuvj2hLlJc"}},4854:(e,t,a)=>{"use strict";a.d(t,{Z:()=>n});const n={container:"DM4b8iQ0ewvRYdIPxvZ8","toggle-section":"bW6ZuNzJBYU5PVPktE2S","toggle-section__control":"di3wjXHrX1rk_H6rlxKM","toggle-section__content":"IrzHnNkRvORtyCL0yiWa","toggle-section__title":"sU82bpLEYPC9n_CFAKoz","toggle-section--disabled":"ZZc0LldcbJpcftqCe43T","toggle-section__details":"T17WOOJI7XHN7KRmYaCe","automatic-rules-stats":"typbjN2keZ97hj2TmuMC","automatic-rules-stats__version":"UUXAN8VTAZY0h8t9rCHG","automatic-rules-stats__last-updated":"eFjcadLMEXY5O61vsTrx","automatic-rules-stats__failed-install":"Tr5uYvclUiwlC5kuGk7E","manual-rules-stats":"zPZcNgYx2X5778nHHtlH","manual-rules-stats__no-rules":"lNtkRXnB1z_kYB28MUWq","manual-rules-stats__block-list-count":"JgH5ykcLynEgqXYurT78","manual-rules-stats__allow-list-count":"xlWW0IoKZwTZt1Ti0tcQ","upgrade-trigger-section":"zhBcgCUGgyC7PvWk8ewB","manual-rules-section":"mah_f2OWxZ3Vqt_jRFdR","brute-force-rules-section":"pRMFiIODonlw4XMdNHaU","go-back-button":"Ax2SmW57c0U5xOTjZuAA",badge:"xGZeYQr0_nPJTFmd8pW4",popover:"RYTIt8kwLbKcUbWOfG4g",popover__header:"BqXge2rIUP0a_74yvYbr",popover__button:"Lr10UUCcSLF3T_0QqoPr",popover__footer:"th_VukMuODIOVLC7oJo6",status:"Gxtap1Zcl5X5UEHfSdQ4",active:"dSfmCVUK_Ez7sxdqOIdy","current-ip-text":"e6JXg_theht0XwCBgqdA"}},5823:(e,t,a)=>{"use strict";a.d(t,{Z:()=>n});const n={list:"sQkG5Cu80gPaeFj3L_wa",footer:"oIl6GCMeUnzE0inXbuj9"}},7279:(e,t,a)=>{"use strict";a.d(t,{Z:()=>n});const n={list:"RP2MVoGqaCFXPKZhhxQ1",footer:"YpEs8b7KE7fzVuXUbOEb"}},1234:(e,t,a)=>{"use strict";a.d(t,{Z:()=>n});const n={"form-toggle":"IunwKwdvL271DxBIniPb","form-toggle__switch":"svA9WxEcOByd5S2fZonA","is-compact":"wOd7DeP76v1fczKfah5n"}},9122:(e,t,a)=>{"use strict";a.d(t,{Z:()=>n});const n={accordion:"x8UuVEhWucPfdq0hEJg6","accordion-item":"eb6Ovfvm1yONz4mdOwbH","accordion-header":"jF9LXpXR3TxZVDw7TVXT","accordion-header-label":"lNQgAfpwdAUSOLZd8dlD","accordion-header-label-icon":"WRQwDYPdffWznX158azR","accordion-header-description":"dJx9pvlYjDnKn11n5wo8","accordion-header-button":"EKcbLuSblRc7UpzgsFXw","accordion-body":"ILMBWlMLcXc0n97IisrG","accordion-body-close":"T8XIzCNJBQy1UETN5gjU","accordion-body-open":"kWoHGiaZSbq9XJVyUOMC"}},6983:(e,t,a)=>{"use strict";a.d(t,{Z:()=>n});const n={threat:"EqpwvErHtRi_WQkJKgi1",threat__icon:"EicvN1QaJu5OJLzdUN5A",threat__summary:"b7ynAmUwGlxK_vxyIN0y",threat__summary__label:"uSV9HYRxjL4S6zIZDlqP",threat__summary__title:"XpW8Mvw_XFEbqxUdw155",threat__severity:"Fkj60BmQ5sUo9zHcJwVv",footer:"XLzPr74ad3osCq9kxy2q"}},2951:(e,t,a)=>{"use strict";a.d(t,{Z:()=>n});const n={"protect-header":"UL3B1tQ854mN7r6taB61","get-started-button":"IG56Hw7ZR_7rKVsM78qw"}},8735:(e,t,a)=>{"use strict";a.d(t,{Z:()=>n});const n={"marked-lines":"xpPHTch5ul0xuZaUoTNa","marked-lines__marked-line":"AMOpkL9LURkyTK8316cw","marked-lines__line-numbers":"i0_0xMrNWoak1brIaDQq","marked-lines__line-number":"C9fLawPLkMNSZthfwxj6","marked-lines__lines":"ogixgg8fRGekmYGtevh1","marked-lines__line":"jYPCgKMDRKfT3vnx0mdG","marked-lines__mark":"UEQ1NqkrwNmaQR7qdEK3"}},9980:(e,t,a)=>{"use strict";a.d(t,{Z:()=>n});const n={modal:"WtVEv641JBaLl929sZq2",modal__window:"G0aPt7WmA1rkUE0wcTno",modal__close:"VkrhWjfEIlIwYEumycbP",modal__close__icon:"yFzeV4cmWRbZKk5tIyEw"}},513:(e,t,a)=>{"use strict";a.d(t,{Z:()=>n});const n={navigation:"HQgjxePFDRJHamBAGcVU","navigation-item":"KtdsNIMumOoHNWMLmuAJ",clickable:"ewyV4ZGn34WDNXmK3ej2",selected:"owofT85W_XvVdb5vr1GN","navigation-item-label":"NESnw2xCLrBpP6WlYZL4","navigation-item-icon":"aohnd_y_1lrMuww8NH63","navigation-item-badge":"Rnas_2_2_eLZSYfZ347E","navigation-item-label-text":"m4_14yNRByDyO9yf9pGg","navigation-item-check-badge":"X8NRHUTBa_4wDvoHN9TT","navigation-item-info-badge":"CsuOteurQlJm4IjXqyZ0","navigation-group":"fvbewglUxEvV1o04yzzp","navigation-group-label":"DINy59MKjwiQanaoDTiV","navigation-group-content":"XoacHJljw8zRW_fkBSyg","navigation-group-list":"mXM4WZRePVTa07dhQ6MD","navigation-group-truncate":"sI3V8khLdCqxkhJQ_XnI","popover-text":"hgdxMuIvZwTZ0sfXaols","navigation-dropdown-button":"UErHS2HAh1gszGfYuVIf","navigation-dropdown-label":"lEhH1hvCcxLVFMHI8Gwv","navigation-dropdown-icon":"c57Vj4QhAHwcK_HZMxtN"}},8212:(e,t,a)=>{"use strict";a.d(t,{Z:()=>n});const n={notice:"_aiMxmJRAw5jRPbZFX57","notice--info":"eWgNBUaexiR66ZI1Px4U","notice--floating":"ZGELG1CO333FilJXOaeI",notice__icon:"BnI88X_e8ItF1c9Uozmj","notice--success":"hRRUwTCPRpurhMwRNZkg","notice--error":"Z6q3IxY_uR1y2lAPTkVF",notice__message:"ST8sowTbBVLRPrk4ZQrn",notice__close:"lMkO08Vd8YQMfwrwaI8u"}},7324:(e,t,a)=>{"use strict";a.d(t,{Z:()=>n});const n={accordion:"sfXsfklfkeSRtE9ivQwF","accordion-item":"ozRrKPlj1QFGUyd3oVke","accordion-header":"PyvnSHQuuUkZvVsArigy","accordion-header-label":"u9Xod5s8bCRNj9MR1Drl","accordion-header-label-icon":"IbeyulkpO9kjYJ4OkYUD","accordion-header-description":"KiCgmjHm2f0JDU3cMsgf","accordion-header-button":"kJ8t3FAtd5VAYjk31SfA","accordion-body":"JP0IJZcYRohfgntEozjm","accordion-body-close":"y7c6zi2wjEnbW3F29fmP","accordion-body-open":"wQWiN_J0SqgduvadyGnm","icon-check":"v1fUFCBPmd6miSCf_ehK"}},6067:(e,t,a)=>{"use strict";a.d(t,{Z:()=>n});const n={"progress-bar":"vzMlFr1AXWqefpRrb976","progress-bar__wrapper":"gYSOMa4xxLXmsNzvFPkW","progress-bar__bar":"hNJWdt5qmZkWYAH_vjIp","progress-bar__percent":"DHMUfGyHbl5BgD5vjxVz"}},8383:(e,t,a)=>{"use strict";a.d(t,{Z:()=>n});const n={"product-section":"Clxt94RgGnDrhORZZyPr","info-section":"K2OG1vK5PSOYDWKtqKKG"}},61:(e,t,a)=>{"use strict";a.d(t,{Z:()=>n});const n={"main-content":"A6a9HOtaZnLUleNgxQrX","loading-content":"CGT5fOs6LDTFHWCAgIiT",illustration:"RFKxbzQ8N58qEyVO0yzW","connection-error-col":"SvMuuouOkDt2sE0PAn_D"}},8131:(e,t,a)=>{"use strict";a.d(t,{Z:()=>n});const n={"threat-severity-badge":"JiJhrZaThvWCpM2AfGen","is-critical":"_7SGksgOpcPbHfPPpQTV","is-high":"pGNquShR54adQ61sx3lP","is-low":"IM5kkexAfwGLM6zz0Exd"}},8911:(e,t,a)=>{"use strict";a.d(t,{Z:()=>n});const n={mark:"jNlU3vgp4xEGwmX5aTyK",list:"gE8s4nh3f7iGIBrFeyCT"}},6561:(e,t,a)=>{"use strict";a.d(t,{Z:()=>n});const n={summary:"ZMBDiTLzs27F012iOsMK",summary__title:"zI2DKzqRc1MhF6aq5eHt",summary__icon:"iHgPFku9KaLz8FIQV1Qw","summary__scan-button":"ctq2nQkzIfSoMkldF9t9"}},5714:(e,t,a)=>{"use strict";a.d(t,{Z:()=>n});const n={tabs:"lyrXe0pA852TUmyekDb5",tab:"KgEeDTKgTC5ZjzYlbTqN","tab--active":"Lv4WoNVkeJntqvUyG4dX"}},8063:(e,t,a)=>{"use strict";a.d(t,{Z:()=>n});const n={textarea:"rigH8UdiDrmmSLQMUurD",label:"V8FDM08CpcwQs4UwN2nI"}},9971:(e,t,a)=>{"use strict";a.d(t,{Z:()=>n});const n={threat:"NHzH3tt6CypjZ92CvK9x",threat__icon:"D9zvYDUrOP_zwSm0yJMs",threat__summary:"_XISfmbjoVlqhB61hHYn",threat__summary__label:"AQDPBnMZFu7BOBuo8mYW",threat__summary__title:"cZ9s5eCAZe3R82Y6Ru3z",threat__severity:"AKnbWQiViZ2O_dwCV8Fw",threat__checkbox:"W6alQ2_S5Rh06djX9m27"}},9709:(e,t,a)=>{"use strict";a.d(t,{Z:()=>n});const n={empty:"OtDl6kocO_m2s9sRHaqX","threat-section":"BjwJh1S1YVPI7AjmTx6a","threat-filename":"YWfK8VTp2wnByBauYPKg","threat-footer":"pkw2LnOTd8VvQ3oT8sXQ","threat-item-cta":"ap6lG79CncSqdigJS_WA","list-header":"uym7dGHhp6ifjF57yOAO","list-title":"e_2eFTR8RyHwmfeqJL4F","list-header-button":"r4Id5qht2FD68jCAH2Cl","accordion-heading":"ZSZPabDoB8MVVPttP0tu","manual-scan":"iJ_biSBRDribuNKX0Zuw"}},541:(e,t,a)=>{"use strict";a.d(t,{Z:()=>n});const n={footer:"uUEJGMrSV3XoBwX5xEwA"}},1155:()=>{},3171:e=>{var t=1e3,a=60*t,n=60*a,c=24*n,r=7*c,l=365.25*c;function s(e,t,a,n){var c=t>=1.5*a;return Math.round(e/a)+" "+n+(c?"s":"")}e.exports=function(e,i){i=i||{};var o=typeof e;if("string"===o&&e.length>0)return function(e){if((e=String(e)).length>100)return;var s=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!s)return;var i=parseFloat(s[1]);switch((s[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return i*l;case"weeks":case"week":case"w":return i*r;case"days":case"day":case"d":return i*c;case"hours":case"hour":case"hrs":case"hr":case"h":return i*n;case"minutes":case"minute":case"mins":case"min":case"m":return i*a;case"seconds":case"second":case"secs":case"sec":case"s":return i*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return i;default:return}}(e);if("number"===o&&isFinite(e))return i.long?function(e){var r=Math.abs(e);if(r>=c)return s(e,r,c,"day");if(r>=n)return s(e,r,n,"hour");if(r>=a)return s(e,r,a,"minute");if(r>=t)return s(e,r,t,"second");return e+" ms"}(e):function(e){var r=Math.abs(e);if(r>=c)return Math.round(e/c)+"d";if(r>=n)return Math.round(e/n)+"h";if(r>=a)return Math.round(e/a)+"m";if(r>=t)return Math.round(e/t)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},469:(e,t,a)=>{"use strict";var n=a(758);function c(){}function r(){}r.resetWarningCache=c,e.exports=function(){function e(e,t,a,c,r,l){if(l!==n){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var a={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:r,resetWarningCache:c};return a.PropTypes=a,a}},5162:(e,t,a)=>{e.exports=a(469)()},758:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},554:(e,t,a)=>{"use strict";a.d(t,{OL:()=>d,UT:()=>m});var n=a(9196),c=a(5250),r=a(5439);function l(){return l=Object.assign||function(e){for(var t=1;t=0||(c[a]=e[a]);return c}const i=["onClick","reloadDocument","replace","state","target","to"],o=["aria-current","caseSensitive","className","end","style","to","children"];function m(e){let{basename:t,children:a,window:l}=e,s=(0,n.useRef)();null==s.current&&(s.current=(0,c.q_)({window:l}));let i=s.current,[o,m]=(0,n.useState)({action:i.action,location:i.location});return(0,n.useLayoutEffect)((()=>i.listen(m)),[i]),(0,n.createElement)(r.F0,{basename:t,children:a,location:o.location,navigationType:o.action,navigator:i})}const u=(0,n.forwardRef)((function(e,t){let{onClick:a,reloadDocument:o,replace:m=!1,state:u,target:d,to:p}=e,h=s(e,i),g=(0,r.oQ)(p),f=function(e,t){let{target:a,replace:l,state:s}=void 0===t?{}:t,i=(0,r.s0)(),o=(0,r.TH)(),m=(0,r.WU)(e);return(0,n.useCallback)((t=>{if(!(0!==t.button||a&&"_self"!==a||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(t))){t.preventDefault();let a=!!l||(0,c.Ep)(o)===(0,c.Ep)(m);i(e,{replace:a,state:s})}}),[o,i,m,l,s,a,e])}(p,{replace:m,state:u,target:d});return(0,n.createElement)("a",l({},h,{href:g,onClick:function(e){a&&a(e),e.defaultPrevented||o||f(e)},ref:t,target:d}))}));const d=(0,n.forwardRef)((function(e,t){let{"aria-current":a="page",caseSensitive:c=!1,className:i="",end:m=!1,style:d,to:p,children:h}=e,g=s(e,o),f=(0,r.TH)(),v=(0,r.WU)(p),E=f.pathname,k=v.pathname;c||(E=E.toLowerCase(),k=k.toLowerCase());let b,w=E===k||!m&&E.startsWith(k)&&"/"===E.charAt(k.length),y=w?a:void 0;b="function"==typeof i?i({isActive:w}):[i,w?"active":null].filter(Boolean).join(" ");let Z="function"==typeof d?d({isActive:w}):d;return(0,n.createElement)(u,l({},g,{"aria-current":y,className:b,ref:t,style:Z,to:p}),"function"==typeof h?h({isActive:w}):h)}))},5439:(e,t,a)=>{"use strict";a.d(t,{AW:()=>o,F0:()=>m,TH:()=>h,WU:()=>f,Z5:()=>u,oQ:()=>d,s0:()=>g});var n=a(9196),c=a(5250);function r(e,t){if(!e)throw new Error(t)}const l=(0,n.createContext)(null);const s=(0,n.createContext)(null);const i=(0,n.createContext)({outlet:null,matches:[]});function o(e){r(!1)}function m(e){let{basename:t="/",children:a=null,location:i,navigationType:o=c.aU.Pop,navigator:m,static:u=!1}=e;p()&&r(!1);let d=M(t),h=(0,n.useMemo)((()=>({basename:d,navigator:m,static:u})),[d,m,u]);"string"==typeof i&&(i=(0,c.cP)(i));let{pathname:g="/",search:f="",hash:v="",state:E=null,key:k="default"}=i,b=(0,n.useMemo)((()=>{let e=x(g,d);return null==e?null:{pathname:e,search:f,hash:v,state:E,key:k}}),[d,g,f,v,E,k]);return null==b?null:(0,n.createElement)(l.Provider,{value:h},(0,n.createElement)(s.Provider,{children:a,value:{location:b,navigationType:o}}))}function u(e){let{children:t,location:a}=e;return function(e,t){p()||r(!1);let{matches:a}=(0,n.useContext)(i),l=a[a.length-1],s=l?l.params:{},o=(l&&l.pathname,l?l.pathnameBase:"/");l&&l.route;0;let m,u=h();if(t){var d;let e="string"==typeof t?(0,c.cP)(t):t;"/"===o||(null==(d=e.pathname)?void 0:d.startsWith(o))||r(!1),m=e}else m=u;let g=m.pathname||"/",f="/"===o?g:g.slice(o.length)||"/",v=function(e,t,a){void 0===a&&(a="/");let n="string"==typeof t?(0,c.cP)(t):t,r=x(n.pathname||"/",a);if(null==r)return null;let l=E(e);!function(e){e.sort(((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){let a=e.length===t.length&&e.slice(0,-1).every(((e,a)=>e===t[a]));return a?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map((e=>e.childrenIndex)),t.routesMeta.map((e=>e.childrenIndex)))))}(l);let s=null;for(let e=0;null==s&&eObject.assign({},e,{params:Object.assign({},s,e.params),pathname:z([o,e.pathname]),pathnameBase:"/"===e.pathnameBase?o:z([o,e.pathnameBase])}))),a)}(v(t),a)}function d(e){p()||r(!1);let{basename:t,navigator:a}=(0,n.useContext)(l),{hash:s,pathname:i,search:o}=f(e),m=i;if("/"!==t){let a=function(e){return""===e||""===e.pathname?"/":"string"==typeof e?(0,c.cP)(e).pathname:e.pathname}(e),n=null!=a&&a.endsWith("/");m="/"===i?t+(n?"/":""):z([t,i])}return a.createHref({pathname:m,search:o,hash:s})}function p(){return null!=(0,n.useContext)(s)}function h(){return p()||r(!1),(0,n.useContext)(s).location}function g(){p()||r(!1);let{basename:e,navigator:t}=(0,n.useContext)(l),{matches:a}=(0,n.useContext)(i),{pathname:c}=h(),s=JSON.stringify(a.map((e=>e.pathnameBase))),o=(0,n.useRef)(!1);return(0,n.useEffect)((()=>{o.current=!0})),(0,n.useCallback)((function(a,n){if(void 0===n&&(n={}),!o.current)return;if("number"==typeof a)return void t.go(a);let r=P(a,JSON.parse(s),c);"/"!==e&&(r.pathname=z([e,r.pathname])),(n.replace?t.replace:t.push)(r,n.state)}),[e,t,s,c])}function f(e){let{matches:t}=(0,n.useContext)(i),{pathname:a}=h(),c=JSON.stringify(t.map((e=>e.pathnameBase)));return(0,n.useMemo)((()=>P(e,JSON.parse(c),a)),[e,c,a])}function v(e){let t=[];return n.Children.forEach(e,(e=>{if(!(0,n.isValidElement)(e))return;if(e.type===n.Fragment)return void t.push.apply(t,v(e.props.children));e.type!==o&&r(!1);let a={caseSensitive:e.props.caseSensitive,element:e.props.element,index:e.props.index,path:e.props.path};e.props.children&&(a.children=v(e.props.children)),t.push(a)})),t}function E(e,t,a,n){return void 0===t&&(t=[]),void 0===a&&(a=[]),void 0===n&&(n=""),e.forEach(((e,c)=>{let l={relativePath:e.path||"",caseSensitive:!0===e.caseSensitive,childrenIndex:c,route:e};l.relativePath.startsWith("/")&&(l.relativePath.startsWith(n)||r(!1),l.relativePath=l.relativePath.slice(n.length));let s=z([n,l.relativePath]),i=a.concat(l);e.children&&e.children.length>0&&(!0===e.index&&r(!1),E(e.children,t,i,s)),(null!=e.path||e.index)&&t.push({path:s,score:R(s,e.index),routesMeta:i})})),t}const k=/^:\w+$/,b=3,w=2,y=1,Z=10,C=-2,_=e=>"*"===e;function R(e,t){let a=e.split("/"),n=a.length;return a.some(_)&&(n+=C),t&&(n+=w),a.filter((e=>!_(e))).reduce(((e,t)=>e+(k.test(t)?b:""===t?y:Z)),n)}function j(e,t){let{routesMeta:a}=e,n={},c="/",r=[];for(let e=0;e(0,n.createElement)(i.Provider,{children:void 0!==c.route.element?c.route.element:a,value:{outlet:a,matches:t.concat(e.slice(0,r+1))}})),null)}function N(e,t){"string"==typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[a,n]=function(e,t,a){void 0===t&&(t=!1);void 0===a&&(a=!0);let n=[],c="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/:(\w+)/g,((e,t)=>(n.push(t),"([^\\/]+)")));e.endsWith("*")?(n.push("*"),c+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):c+=a?"\\/*$":"(?:(?=[.~-]|%[0-9A-F]{2})|\\b|\\/|$)";let r=new RegExp(c,t?void 0:"i");return[r,n]}(e.path,e.caseSensitive,e.end),c=t.match(a);if(!c)return null;let r=c[0],l=r.replace(/(.)\/+$/,"$1"),s=c.slice(1);return{params:n.reduce(((e,t,a)=>{if("*"===t){let e=s[a]||"";l=r.slice(0,r.length-e.length).replace(/(.)\/+$/,"$1")}return e[t]=function(e,t){try{return decodeURIComponent(e)}catch(t){return e}}(s[a]||""),e}),{}),pathname:r,pathnameBase:l,pattern:e}}function P(e,t,a){let n,r="string"==typeof e?(0,c.cP)(e):e,l=""===e||""===r.pathname?"/":r.pathname;if(null==l)n=a;else{let e=t.length-1;if(l.startsWith("..")){let t=l.split("/");for(;".."===t[0];)t.shift(),e-=1;r.pathname=t.join("/")}n=e>=0?t[e]:"/"}let s=function(e,t){void 0===t&&(t="/");let{pathname:a,search:n="",hash:r=""}="string"==typeof e?(0,c.cP)(e):e,l=a?a.startsWith("/")?a:function(e,t){let a=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((e=>{".."===e?a.length>1&&a.pop():"."!==e&&a.push(e)})),a.length>1?a.join("/"):"/"}(a,t):t;return{pathname:l,search:L(n),hash:I(r)}}(r,n);return l&&"/"!==l&&l.endsWith("/")&&!s.pathname.endsWith("/")&&(s.pathname+="/"),s}function x(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let a=e.charAt(t.length);return a&&"/"!==a?null:e.slice(t.length)||"/"}const z=e=>e.join("/").replace(/\/\/+/g,"/"),M=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),L=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",I=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:""},2659:(e,t,a)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}var c,r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==n(e)&&"function"!=typeof e)return{default:e};var a=i(t);if(a&&a.has(e))return a.get(e);var c={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var l in e)if("default"!=l&&Object.prototype.hasOwnProperty.call(e,l)){var s=r?Object.getOwnPropertyDescriptor(e,l):null;s&&(s.get||s.set)?Object.defineProperty(c,l,s):c[l]=e[l]}return c.default=e,a&&a.set(e,c),c}(a(9196)),l=(c=a(5162))&&c.__esModule?c:{default:c},s=["size","onClick","icon","className"];function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,a=new WeakMap;return(i=function(e){return e?a:t})(e)}function o(){return o=Object.assign||function(e){for(var t,a=1;a{"use strict";a.d(t,{Z:()=>i});var n=a(951);const c=a.n(n)()("dops:analytics");let r,l;window._tkq=window._tkq||[],window.ga=window.ga||function(){(window.ga.q=window.ga.q||[]).push(arguments)},window.ga.l=+new Date;const s={initialize:function(e,t,a){s.setUser(e,t),s.setSuperProps(a),s.identifyUser()},setGoogleAnalyticsEnabled:function(e,t=null){this.googleAnalyticsEnabled=e,this.googleAnalyticsKey=t},setMcAnalyticsEnabled:function(e){this.mcAnalyticsEnabled=e},setUser:function(e,t){l={ID:e,username:t}},setSuperProps:function(e){r=e},assignSuperProps:function(e){r=Object.assign(r||{},e)},mc:{bumpStat:function(e,t){const a=function(e,t){let a="";if("object"==typeof e){for(const t in e)a+="&x_"+encodeURIComponent(t)+"="+encodeURIComponent(e[t]);c("Bumping stats %o",e)}else a="&x_"+encodeURIComponent(e)+"="+encodeURIComponent(t),c('Bumping stat "%s" in group "%s"',t,e);return a}(e,t);s.mcAnalyticsEnabled&&((new Image).src=document.location.protocol+"//pixel.wp.com/g.gif?v=wpcom-no-pv"+a+"&t="+Math.random())},bumpStatWithPageView:function(e,t){const a=function(e,t){let a="";if("object"==typeof e){for(const t in e)a+="&"+encodeURIComponent(t)+"="+encodeURIComponent(e[t]);c("Built stats %o",e)}else a="&"+encodeURIComponent(e)+"="+encodeURIComponent(t),c('Built stat "%s" in group "%s"',t,e);return a}(e,t);s.mcAnalyticsEnabled&&((new Image).src=document.location.protocol+"//pixel.wp.com/g.gif?v=wpcom"+a+"&t="+Math.random())}},pageView:{record:function(e,t){s.tracks.recordPageView(e),s.ga.recordPageView(e,t)}},purchase:{record:function(e,t,a,n,c,r,l){s.ga.recordPurchase(e,t,a,n,c,r,l)}},tracks:{recordEvent:function(e,t){t=t||{},0===e.indexOf("akismet_")||0===e.indexOf("jetpack_")?(r&&(c("- Super Props: %o",r),t=Object.assign(t,r)),c('Record event "%s" called with props %s',e,JSON.stringify(t)),window._tkq.push(["recordEvent",e,t])):c('- Event name must be prefixed by "akismet_" or "jetpack_"')},recordJetpackClick:function(e){const t="object"==typeof e?e:{target:e};s.tracks.recordEvent("jetpack_wpa_click",t)},recordPageView:function(e){s.tracks.recordEvent("akismet_page_view",{path:e})},setOptOut:function(e){c("Pushing setOptOut: %o",e),window._tkq.push(["setOptOut",e])}},ga:{initialized:!1,initialize:function(){let e={};s.ga.initialized||(l&&(e={userId:"u-"+l.ID}),window.ga("create",this.googleAnalyticsKey,"auto",e),s.ga.initialized=!0)},recordPageView:function(e,t){s.ga.initialize(),c("Recording Page View ~ [URL: "+e+"] [Title: "+t+"]"),this.googleAnalyticsEnabled&&(window.ga("set","page",e),window.ga("send",{hitType:"pageview",page:e,title:t}))},recordEvent:function(e,t,a,n){s.ga.initialize();let r="Recording Event ~ [Category: "+e+"] [Action: "+t+"]";void 0!==a&&(r+=" [Option Label: "+a+"]"),void 0!==n&&(r+=" [Option Value: "+n+"]"),c(r),this.googleAnalyticsEnabled&&window.ga("send","event",e,t,a,n)},recordPurchase:function(e,t,a,n,c,r,l){window.ga("require","ecommerce"),window.ga("ecommerce:addTransaction",{id:e,revenue:n,currency:l}),window.ga("ecommerce:addItem",{id:e,name:t,sku:a,price:c,quantity:r}),window.ga("ecommerce:send")}},identifyUser:function(){l&&window._tkq.push(["identifyUser",l.ID,l.username])},setProperties:function(e){window._tkq.push(["setProperties",e])},clearedIdentity:function(){window._tkq.push(["clearIdentity"])}},i=s},4743:(e,t,a)=>{"use strict";a.d(t,{ZP:()=>u});var n=a(1132),c=a(6483);function r(e){class t extends Error{constructor(...t){super(...t),this.name=e}}return t}const l=r("JsonParseError"),s=r("JsonParseAfterRedirectError"),i=r("Api404Error"),o=r("Api404AfterRedirectError"),m=r("FetchNetworkError");const u=new function(e,t){let a=e,r=e,l={"X-WP-Nonce":t},s={credentials:"same-origin",headers:l},i={method:"post",credentials:"same-origin",headers:Object.assign({},l,{"Content-type":"application/json"})},o=function(e){const t=e.split("?"),a=t.length>1?t[1]:"",n=a.length?a.split("&"):[];return n.push("_cacheBuster="+(new Date).getTime()),t[0]+"?"+n.join("&")};const m={setApiRoot(e){a=e},setWpcomOriginApiUrl(e){r=e},setApiNonce(e){l={"X-WP-Nonce":e},s={credentials:"same-origin",headers:l},i={method:"post",credentials:"same-origin",headers:Object.assign({},l,{"Content-type":"application/json"})}},setCacheBusterCallback:e=>{o=e},registerSite:(e,t)=>{const c={registration_nonce:e,no_iframe:!0};return(0,n.jetpackConfigHas)("consumer_slug")&&(c.plugin_slug=(0,n.jetpackConfigGet)("consumer_slug")),null!==t&&(c.redirect_uri=t),h(`${a}jetpack/v4/connection/register`,i,{body:JSON.stringify(c)}).then(d).then(p)},fetchAuthorizationUrl:e=>u((0,c.addQueryArgs)(`${a}jetpack/v4/connection/authorize_url`,{no_iframe:"1",redirect_uri:e}),s).then(d).then(p),fetchSiteConnectionData:()=>u(`${a}jetpack/v4/connection/data`,s).then(p),fetchSiteConnectionStatus:()=>u(`${a}jetpack/v4/connection`,s).then(p),fetchSiteConnectionTest:()=>u(`${a}jetpack/v4/connection/test`,s).then(d).then(p),fetchUserConnectionData:()=>u(`${a}jetpack/v4/connection/data`,s).then(p),fetchUserTrackingSettings:()=>u(`${a}jetpack/v4/tracking/settings`,s).then(d).then(p),updateUserTrackingSettings:e=>h(`${a}jetpack/v4/tracking/settings`,i,{body:JSON.stringify(e)}).then(d).then(p),disconnectSite:()=>h(`${a}jetpack/v4/connection`,i,{body:JSON.stringify({isActive:!1})}).then(d).then(p),fetchConnectUrl:()=>u(`${a}jetpack/v4/connection/url`,s).then(d).then(p),unlinkUser:()=>h(`${a}jetpack/v4/connection/user`,i,{body:JSON.stringify({linked:!1})}).then(d).then(p),reconnect:()=>h(`${a}jetpack/v4/connection/reconnect`,i).then(d).then(p),fetchConnectedPlugins:()=>u(`${a}jetpack/v4/connection/plugins`,s).then(d).then(p),setHasSeenWCConnectionModal:()=>h(`${a}jetpack/v4/seen-wc-connection-modal`,i).then(d).then(p),fetchModules:()=>u(`${a}jetpack/v4/module/all`,s).then(d).then(p),fetchModule:e=>u(`${a}jetpack/v4/module/${e}`,s).then(d).then(p),activateModule:e=>h(`${a}jetpack/v4/module/${e}/active`,i,{body:JSON.stringify({active:!0})}).then(d).then(p),deactivateModule:e=>h(`${a}jetpack/v4/module/${e}/active`,i,{body:JSON.stringify({active:!1})}),updateModuleOptions:(e,t)=>h(`${a}jetpack/v4/module/${e}`,i,{body:JSON.stringify(t)}).then(d).then(p),updateSettings:e=>h(`${a}jetpack/v4/settings`,i,{body:JSON.stringify(e)}).then(d).then(p),getProtectCount:()=>u(`${a}jetpack/v4/module/protect/data`,s).then(d).then(p),resetOptions:e=>h(`${a}jetpack/v4/options/${e}`,i,{body:JSON.stringify({reset:!0})}).then(d).then(p),activateVaultPress:()=>h(`${a}jetpack/v4/plugins`,i,{body:JSON.stringify({slug:"vaultpress",status:"active"})}).then(d).then(p),getVaultPressData:()=>u(`${a}jetpack/v4/module/vaultpress/data`,s).then(d).then(p),installPlugin:(e,t)=>{const n={slug:e,status:"active"};return t&&(n.source=t),h(`${a}jetpack/v4/plugins`,i,{body:JSON.stringify(n)}).then(d).then(p)},activateAkismet:()=>h(`${a}jetpack/v4/plugins`,i,{body:JSON.stringify({slug:"akismet",status:"active"})}).then(d).then(p),getAkismetData:()=>u(`${a}jetpack/v4/module/akismet/data`,s).then(d).then(p),checkAkismetKey:()=>u(`${a}jetpack/v4/module/akismet/key/check`,s).then(d).then(p),checkAkismetKeyTyped:e=>h(`${a}jetpack/v4/module/akismet/key/check`,i,{body:JSON.stringify({api_key:e})}).then(d).then(p),fetchStatsData:e=>u(function(e){let t=`${a}jetpack/v4/module/stats/data`;-1!==t.indexOf("?")?t+=`&range=${encodeURIComponent(e)}`:t+=`?range=${encodeURIComponent(e)}`;return t}(e),s).then(d).then(p).then(f),getPluginUpdates:()=>u(`${a}jetpack/v4/updates/plugins`,s).then(d).then(p),getPlans:()=>u(`${a}jetpack/v4/plans`,s).then(d).then(p),fetchSettings:()=>u(`${a}jetpack/v4/settings`,s).then(d).then(p),updateSetting:e=>h(`${a}jetpack/v4/settings`,i,{body:JSON.stringify(e)}).then(d).then(p),fetchSiteData:()=>u(`${a}jetpack/v4/site`,s).then(d).then(p).then((e=>JSON.parse(e.data))),fetchSiteFeatures:()=>u(`${a}jetpack/v4/site/features`,s).then(d).then(p).then((e=>JSON.parse(e.data))),fetchSiteProducts:()=>u(`${a}jetpack/v4/site/products`,s).then(d).then(p),fetchSitePurchases:()=>u(`${a}jetpack/v4/site/purchases`,s).then(d).then(p).then((e=>JSON.parse(e.data))),fetchSiteBenefits:()=>u(`${a}jetpack/v4/site/benefits`,s).then(d).then(p).then((e=>JSON.parse(e.data))),fetchSiteDiscount:()=>u(`${a}jetpack/v4/site/discount`,s).then(d).then(p).then((e=>e.data)),fetchSetupQuestionnaire:()=>u(`${a}jetpack/v4/setup/questionnaire`,s).then(d).then(p),fetchRecommendationsData:()=>u(`${a}jetpack/v4/recommendations/data`,s).then(d).then(p),fetchRecommendationsProductSuggestions:()=>u(`${a}jetpack/v4/recommendations/product-suggestions`,s).then(d).then(p),fetchRecommendationsUpsell:()=>u(`${a}jetpack/v4/recommendations/upsell`,s).then(d).then(p),fetchRecommendationsConditional:()=>u(`${a}jetpack/v4/recommendations/conditional`,s).then(d).then(p),saveRecommendationsData:e=>h(`${a}jetpack/v4/recommendations/data`,i,{body:JSON.stringify({data:e})}).then(d),fetchProducts:()=>u(`${a}jetpack/v4/products`,s).then(d).then(p),fetchRewindStatus:()=>u(`${a}jetpack/v4/rewind`,s).then(d).then(p).then((e=>JSON.parse(e.data))),fetchScanStatus:()=>u(`${a}jetpack/v4/scan`,s).then(d).then(p).then((e=>JSON.parse(e.data))),dismissJetpackNotice:e=>h(`${a}jetpack/v4/notice/${e}`,i,{body:JSON.stringify({dismissed:!0})}).then(d).then(p),fetchPluginsData:()=>u(`${a}jetpack/v4/plugins`,s).then(d).then(p),fetchIntroOffers:()=>u(`${a}jetpack/v4/intro-offers`,s).then(d).then(p),fetchVerifySiteGoogleStatus:e=>u(null!==e?`${a}jetpack/v4/verify-site/google/${e}`:`${a}jetpack/v4/verify-site/google`,s).then(d).then(p),verifySiteGoogle:e=>h(`${a}jetpack/v4/verify-site/google`,i,{body:JSON.stringify({keyring_id:e})}).then(d).then(p),submitSurvey:e=>h(`${a}jetpack/v4/marketing/survey`,i,{body:JSON.stringify(e)}).then(d).then(p),saveSetupQuestionnaire:e=>h(`${a}jetpack/v4/setup/questionnaire`,i,{body:JSON.stringify(e)}).then(d).then(p),updateLicensingError:e=>h(`${a}jetpack/v4/licensing/error`,i,{body:JSON.stringify(e)}).then(d).then(p),updateLicenseKey:e=>h(`${a}jetpack/v4/licensing/set-license`,i,{body:JSON.stringify({license:e})}).then(d).then(p),getUserLicensesCounts:()=>u(`${a}jetpack/v4/licensing/user/counts`,s).then(d).then(p),getUserLicenses:()=>u(`${a}jetpack/v4/licensing/user/licenses`,s).then(d).then(p),updateLicensingActivationNoticeDismiss:e=>h(`${a}jetpack/v4/licensing/user/activation-notice-dismiss`,i,{body:JSON.stringify({last_detached_count:e})}).then(d).then(p),updateRecommendationsStep:e=>h(`${a}jetpack/v4/recommendations/step`,i,{body:JSON.stringify({step:e})}).then(d),confirmIDCSafeMode:()=>h(`${a}jetpack/v4/identity-crisis/confirm-safe-mode`,i).then(d),startIDCFresh:e=>h(`${a}jetpack/v4/identity-crisis/start-fresh`,i,{body:JSON.stringify({redirect_uri:e})}).then(d).then(p),migrateIDC:()=>h(`${a}jetpack/v4/identity-crisis/migrate`,i).then(d),attachLicenses:e=>h(`${a}jetpack/v4/licensing/attach-licenses`,i,{body:JSON.stringify({licenses:e})}).then(d).then(p),fetchSearchPlanInfo:()=>u(`${r}jetpack/v4/search/plan`,s).then(d).then(p),fetchSearchSettings:()=>u(`${r}jetpack/v4/search/settings`,s).then(d).then(p),updateSearchSettings:e=>h(`${r}jetpack/v4/search/settings`,i,{body:JSON.stringify(e)}).then(d).then(p),fetchSearchStats:()=>u(`${r}jetpack/v4/search/stats`,s).then(d).then(p),fetchWafSettings:()=>u(`${a}jetpack/v4/waf`,s).then(d).then(p),updateWafSettings:e=>h(`${a}jetpack/v4/waf`,i,{body:JSON.stringify(e)}).then(d).then(p),fetchWordAdsSettings:()=>u(`${a}jetpack/v4/wordads/settings`,s).then(d).then(p),updateWordAdsSettings:e=>h(`${a}jetpack/v4/wordads/settings`,i,{body:JSON.stringify(e)}),fetchSearchPricing:()=>u(`${r}jetpack/v4/search/pricing`,s).then(d).then(p),fetchMigrationStatus:()=>u(`${a}jetpack/v4/migration/status`,s).then(d).then(p),fetchBackupUndoEvent:()=>u(`${a}jetpack/v4/site/backup/undo-event`,s).then(d).then(p),fetchBackupPreflightStatus:()=>u(`${a}jetpack/v4/site/backup/preflight`,s).then(d).then(p)};function u(e,t){return fetch(o(e),t)}function h(e,t,a){return fetch(e,Object.assign({},t,a)).catch(g)}function f(e){return e.general&&void 0===e.general.response||e.week&&void 0===e.week.response||e.month&&void 0===e.month.response?e:{}}Object.assign(this,m)};function d(e){return e.status>=200&&e.status<300?e:404===e.status?new Promise((()=>{throw e.redirected?new o(e.redirected):new i})):e.json().catch((e=>h(e))).then((t=>{const a=new Error(`${t.message} (Status ${e.status})`);throw a.response=t,a.name="ApiError",a}))}function p(e){return e.json().catch((t=>h(t,e.redirected,e.url)))}function h(e,t,a){throw t?new s(a):new l}function g(){throw new m}},4471:(e,t,a)=>{"use strict";a.d(t,{Z:()=>u});var n=a(5609),c=a(5736),r=a(9517),l=a(526),s=a(2054),i=a(5106),o=a(8275),m=a(7329);const __=c.__,u=({hideCloseButton:e=!1,title:t,children:a,step:u=null,totalSteps:d=null,buttonContent:p=null,buttonDisabled:h=!1,buttonHref:g=null,buttonExternalLink:f=!1,offset:v=32,onClose:E,onClick:k,...b})=>{const[w]=(0,s.Z)("sm");if(!t||!a||!p)return null;b.position||(b.position=w?"top center":"middle right");const y={...b,offset:v},Z=Number.isFinite(u)&&Number.isFinite(d);let C=null;return Z&&(C=(0,c.sprintf)(/* translators: 1 Current step, 2 Total steps */ -__("%1$d of %2$d","jetpack-protect"),u,d)),React.createElement(n.Popover,y,React.createElement(o.ZP,null,React.createElement("div",{className:m.Z.wrapper},React.createElement("div",{className:m.Z.header},React.createElement(i.ZP,{variant:"title-small",className:m.Z.title},t),!e&&React.createElement(React.Fragment,null,React.createElement(l.Z,{size:"small",variant:"tertiary","aria-label":"close",className:m.Z["close-button"],icon:r.Z,iconSize:16,onClick:E}))),a,React.createElement("div",{className:m.Z.footer},Z&&React.createElement(i.ZP,{variant:"body",className:m.Z.steps},C),React.createElement(l.Z,{variant:"primary",className:m.Z["action-button"],disabled:h,onClick:k,isExternalLink:f,href:g},p)))))}},9105:(e,t,a)=>{"use strict";a.d(t,{Z:()=>u});var n=a(5736),c=a(5235),r=a.n(c),l=a(8237),s=a(8868),i=a(3846),o=a(3363),m=a(1494);const __=n.__,u=({children:e,moduleName:t=__("Jetpack","jetpack-protect"),moduleNameHref:a,showHeader:n=!0,showFooter:c=!0,showBackground:u=!0,header:d})=>{const p=r()(m.Z["admin-page"],{[m.Z.background]:u});return React.createElement("div",{className:p},n&&React.createElement(o.Z,{horizontalSpacing:5},React.createElement(i.Z,null,d||React.createElement(s.Z,null))),React.createElement(o.Z,{fluid:!0,horizontalSpacing:0},React.createElement(i.Z,null,e)),c&&React.createElement(o.Z,{horizontalSpacing:5},React.createElement(i.Z,null,React.createElement(l.Z,{moduleName:t,moduleNameHref:a}))))}},216:(e,t,a)=>{"use strict";a.d(t,{Z:()=>l});var n=a(9196),c=a.n(n),r=a(281);const l=({children:e})=>c().createElement("div",{className:r.Z["section-hero"]},e)},7525:(e,t,a)=>{"use strict";a.d(t,{Z:()=>m});var n=a(2674),c=a.n(n),r=a(5736),l=a(5235),s=a.n(l),i=a(9196),o=a.n(i);const __=r.__,m=({title:e=__("An Automattic Airline","jetpack-protect"),height:t=7,className:a,...n})=>o().createElement("svg",c()({role:"img",x:"0",y:"0",viewBox:"0 0 935 38.2",enableBackground:"new 0 0 935 38.2","aria-labelledby":"jp-automattic-byline-logo-title",height:t,className:s()("jp-automattic-byline-logo",a)},n),o().createElement("desc",{id:"jp-automattic-byline-logo-title"},e),o().createElement("path",{d:"M317.1 38.2c-12.6 0-20.7-9.1-20.7-18.5v-1.2c0-9.6 8.2-18.5 20.7-18.5 12.6 0 20.8 8.9 20.8 18.5v1.2C337.9 29.1 329.7 38.2 317.1 38.2zM331.2 18.6c0-6.9-5-13-14.1-13s-14 6.1-14 13v0.9c0 6.9 5 13.1 14 13.1s14.1-6.2 14.1-13.1V18.6zM175 36.8l-4.7-8.8h-20.9l-4.5 8.8h-7L157 1.3h5.5L182 36.8H175zM159.7 8.2L152 23.1h15.7L159.7 8.2zM212.4 38.2c-12.7 0-18.7-6.9-18.7-16.2V1.3h6.6v20.9c0 6.6 4.3 10.5 12.5 10.5 8.4 0 11.9-3.9 11.9-10.5V1.3h6.7V22C231.4 30.8 225.8 38.2 212.4 38.2zM268.6 6.8v30h-6.7v-30h-15.5V1.3h37.7v5.5H268.6zM397.3 36.8V8.7l-1.8 3.1 -14.9 25h-3.3l-14.7-25 -1.8-3.1v28.1h-6.5V1.3h9.2l14 24.4 1.7 3 1.7-3 13.9-24.4h9.1v35.5H397.3zM454.4 36.8l-4.7-8.8h-20.9l-4.5 8.8h-7l19.2-35.5h5.5l19.5 35.5H454.4zM439.1 8.2l-7.7 14.9h15.7L439.1 8.2zM488.4 6.8v30h-6.7v-30h-15.5V1.3h37.7v5.5H488.4zM537.3 6.8v30h-6.7v-30h-15.5V1.3h37.7v5.5H537.3zM569.3 36.8V4.6c2.7 0 3.7-1.4 3.7-3.4h2.8v35.5L569.3 36.8 569.3 36.8zM628 11.3c-3.2-2.9-7.9-5.7-14.2-5.7 -9.5 0-14.8 6.5-14.8 13.3v0.7c0 6.7 5.4 13 15.3 13 5.9 0 10.8-2.8 13.9-5.7l4 4.2c-3.9 3.8-10.5 7.1-18.3 7.1 -13.4 0-21.6-8.7-21.6-18.3v-1.2c0-9.6 8.9-18.7 21.9-18.7 7.5 0 14.3 3.1 18 7.1L628 11.3zM321.5 12.4c1.2 0.8 1.5 2.4 0.8 3.6l-6.1 9.4c-0.8 1.2-2.4 1.6-3.6 0.8l0 0c-1.2-0.8-1.5-2.4-0.8-3.6l6.1-9.4C318.7 11.9 320.3 11.6 321.5 12.4L321.5 12.4z"}),o().createElement("path",{d:"M37.5 36.7l-4.7-8.9H11.7l-4.6 8.9H0L19.4 0.8H25l19.7 35.9H37.5zM22 7.8l-7.8 15.1h15.9L22 7.8zM82.8 36.7l-23.3-24 -2.3-2.5v26.6h-6.7v-36H57l22.6 24 2.3 2.6V0.8h6.7v35.9H82.8z"}),o().createElement("path",{d:"M719.9 37l-4.8-8.9H694l-4.6 8.9h-7.1l19.5-36h5.6l19.8 36H719.9zM704.4 8l-7.8 15.1h15.9L704.4 8zM733 37V1h6.8v36H733zM781 37c-1.8 0-2.6-2.5-2.9-5.8l-0.2-3.7c-0.2-3.6-1.7-5.1-8.4-5.1h-12.8V37H750V1h19.6c10.8 0 15.7 4.3 15.7 9.9 0 3.9-2 7.7-9 9 7 0.5 8.5 3.7 8.6 7.9l0.1 3c0.1 2.5 0.5 4.3 2.2 6.1V37H781zM778.5 11.8c0-2.6-2.1-5.1-7.9-5.1h-13.8v10.8h14.4c5 0 7.3-2.4 7.3-5.2V11.8zM794.8 37V1h6.8v30.4h28.2V37H794.8zM836.7 37V1h6.8v36H836.7zM886.2 37l-23.4-24.1 -2.3-2.5V37h-6.8V1h6.5l22.7 24.1 2.3 2.6V1h6.8v36H886.2zM902.3 37V1H935v5.6h-26v9.2h20v5.5h-20v10.1h26V37H902.3z"}))},526:(e,t,a)=>{"use strict";a.d(t,{Z:()=>g});var n=a(2674),c=a.n(n),r=a(5609),l=a(5736),s=a(1074),i=a(5381),o=a(5235),m=a.n(o),u=a(9196),d=a.n(u),p=a(3466);const __=l.__,h=(0,u.forwardRef)(((e,t)=>{const{children:a,variant:n="primary",size:l="normal",weight:o="bold",icon:u,iconSize:h,disabled:g,isDestructive:f,isLoading:v,isExternalLink:E,className:k,text:b,fullWidth:w,...y}=e,Z=m()(p.Z.button,k,{[p.Z.normal]:"normal"===l,[p.Z.small]:"small"===l,[p.Z.icon]:Boolean(u),[p.Z.loading]:v,[p.Z.regular]:"regular"===o,[p.Z["full-width"]]:w,[p.Z["is-icon-button"]]:Boolean(u)&&!a});y.ref=t;const C="normal"===l?20:16,_=E&&d().createElement(d().Fragment,null,d().createElement(s.Z,{size:C,icon:i.Z,className:p.Z["external-icon"]}),d().createElement(r.VisuallyHidden,{as:"span"},/* translators: accessibility text */ -__("(opens in a new tab)","jetpack-protect"))),R=E?"_blank":void 0,j=a?.[0]&&null!==a[0]&&"components-tooltip"!==a?.[0]?.props?.className;return d().createElement(r.Button,c()({target:R,variant:n,className:m()(Z,{"has-text":!!u&&j}),icon:E?void 0:u,iconSize:h,disabled:g,"aria-disabled":g,isDestructive:f,text:b},y),v&&d().createElement(r.Spinner,null),d().createElement("span",null,a),_)}));h.displayName="Button";const g=h},857:(e,t,a)=>{"use strict";a.d(t,{Z:()=>m});var n=a(1074),c=a(495),r=a(5235),l=a.n(r),s=a(9665),i=a(5106),o=a(1489);const m=({description:e,cta:t,onClick:a,href:r,openInNewTab:m=!1,className:u,tooltipText:d=""})=>{const p=void 0!==r?"a":"button",h="a"===p?{href:r,...m&&{target:"_blank"}}:{onClick:a};return React.createElement("div",{className:l()(o.Z.cut,u)},React.createElement("div",null,React.createElement("div",null,React.createElement(i.ZP,{className:o.Z.description},e),d&&React.createElement(s.Z,{className:o.Z.iconContainer,iconSize:16,offset:4},React.createElement(i.ZP,{variant:"body-small"},d))),React.createElement("div",null,React.createElement(p,h,React.createElement(i.ZP,{className:o.Z.cta},t)))),React.createElement(n.Z,{icon:c.Z,className:o.Z.icon,size:30}))}},7172:(e,t,a)=>{"use strict";a.d(t,{Z:()=>i});var n=a(5736),c=a(5235),r=a.n(c),l=a(9196);a(5785);const __=n.__;class s extends l.Component{static defaultProps={"aria-hidden":"false",focusable:"true"};needsOffset(e,t){return["gridicons-arrow-left","gridicons-arrow-right","gridicons-calendar","gridicons-cart","gridicons-folder","gridicons-info","gridicons-info-outline","gridicons-posts","gridicons-star-outline","gridicons-star"].indexOf(e)>=0&&t%18==0}getSVGDescription(e){if("description"in this.props)return this.props.description;switch(e){default:return"";case"gridicons-audio":return __("Has audio.","jetpack-protect");case"gridicons-arrow-left":return __("Arrow left","jetpack-protect");case"gridicons-arrow-right":return __("Arrow right","jetpack-protect");case"gridicons-calendar":return __("Is an event.","jetpack-protect");case"gridicons-cart":return __("Is a product.","jetpack-protect");case"chevron-down":return __("Show filters","jetpack-protect");case"gridicons-comment":return __("Matching comment.","jetpack-protect");case"gridicons-cross":return __("Close.","jetpack-protect");case"gridicons-filter":return __("Toggle search filters.","jetpack-protect");case"gridicons-folder":return __("Category","jetpack-protect");case"gridicons-info":case"gridicons-info-outline":return __("Information.","jetpack-protect");case"gridicons-image-multiple":return __("Has multiple images.","jetpack-protect");case"gridicons-image":return __("Has an image.","jetpack-protect");case"gridicons-page":return __("Page","jetpack-protect");case"gridicons-post":return __("Post","jetpack-protect");case"gridicons-jetpack-search":case"gridicons-search":return __("Magnifying Glass","jetpack-protect");case"gridicons-tag":return __("Tag","jetpack-protect");case"gridicons-video":return __("Has a video.","jetpack-protect")}}renderIcon(e){switch(e){default:return null;case"gridicons-audio":return React.createElement("g",null,React.createElement("path",{d:"M8 4v10.184C7.686 14.072 7.353 14 7 14c-1.657 0-3 1.343-3 3s1.343 3 3 3 3-1.343 3-3V7h7v4.184c-.314-.112-.647-.184-1-.184-1.657 0-3 1.343-3 3s1.343 3 3 3 3-1.343 3-3V4H8z"}));case"gridicons-arrow-left":return React.createElement("g",null,React.createElement("path",{d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"}));case"gridicons-arrow-right":return React.createElement("g",null,React.createElement("path",{d:"M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8-8-8z"}));case"gridicons-block":return React.createElement("g",null,React.createElement("path",{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zM4 12c0-4.418 3.582-8 8-8 1.848 0 3.545.633 4.9 1.686L5.686 16.9C4.633 15.545 4 13.848 4 12zm8 8c-1.848 0-3.546-.633-4.9-1.686L18.314 7.1C19.367 8.455 20 10.152 20 12c0 4.418-3.582 8-8 8z"}));case"gridicons-calendar":return React.createElement("g",null,React.createElement("path",{d:"M19 4h-1V2h-2v2H8V2H6v2H5c-1.105 0-2 .896-2 2v13c0 1.104.895 2 2 2h14c1.104 0 2-.896 2-2V6c0-1.104-.896-2-2-2zm0 15H5V8h14v11z"}));case"gridicons-cart":return React.createElement("g",null,React.createElement("path",{d:"M9 20c0 1.1-.9 2-2 2s-1.99-.9-1.99-2S5.9 18 7 18s2 .9 2 2zm8-2c-1.1 0-1.99.9-1.99 2s.89 2 1.99 2 2-.9 2-2-.9-2-2-2zm.396-5c.937 0 1.75-.65 1.952-1.566L21 5H7V4c0-1.105-.895-2-2-2H3v2h2v11c0 1.105.895 2 2 2h12c0-1.105-.895-2-2-2H7v-2h10.396z"}));case"gridicons-checkmark":return React.createElement("g",null,React.createElement("path",{d:"M11 17.768l-4.884-4.884 1.768-1.768L11 14.232l8.658-8.658C17.823 3.39 15.075 2 12 2 6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10c0-1.528-.353-2.97-.966-4.266L11 17.768z"}));case"gridicons-chevron-left":return React.createElement("g",null,React.createElement("path",{d:"M16.443 7.41L15.0399 6L9.06934 12L15.0399 18L16.443 16.59L11.8855 12L16.443 7.41Z"}));case"gridicons-chevron-right":return React.createElement("g",null,React.createElement("path",{d:"M10.2366 6L8.8335 7.41L13.391 12L8.8335 16.59L10.2366 18L16.2072 12L10.2366 6Z"}));case"gridicons-chevron-down":return React.createElement("g",null,React.createElement("path",{d:"M20 9l-8 8-8-8 1.414-1.414L12 14.172l6.586-6.586"}));case"gridicons-comment":return React.createElement("g",null,React.createElement("path",{d:"M3 6v9c0 1.105.895 2 2 2h9v5l5.325-3.804c1.05-.75 1.675-1.963 1.675-3.254V6c0-1.105-.895-2-2-2H5c-1.105 0-2 .895-2 2z"}));case"gridicons-computer":return React.createElement("g",null,React.createElement("path",{d:"M20 2H4c-1.104 0-2 .896-2 2v12c0 1.104.896 2 2 2h6v2H7v2h10v-2h-3v-2h6c1.104 0 2-.896 2-2V4c0-1.104-.896-2-2-2zm0 14H4V4h16v12z"}));case"gridicons-cross":return React.createElement("g",null,React.createElement("path",{d:"M18.36 19.78L12 13.41l-6.36 6.37-1.42-1.42L10.59 12 4.22 5.64l1.42-1.42L12 10.59l6.36-6.36 1.41 1.41L13.41 12l6.36 6.36z"}));case"gridicons-filter":return React.createElement("g",null,React.createElement("path",{d:"M10 19h4v-2h-4v2zm-4-6h12v-2H6v2zM3 5v2h18V5H3z"}));case"gridicons-folder":return React.createElement("g",null,React.createElement("path",{d:"M18 19H6c-1.1 0-2-.9-2-2V7c0-1.1.9-2 2-2h3c1.1 0 2 .9 2 2h7c1.1 0 2 .9 2 2v8c0 1.1-.9 2-2 2z"}));case"gridicons-image":return React.createElement("g",null,React.createElement("path",{d:"M13 9.5c0-.828.672-1.5 1.5-1.5s1.5.672 1.5 1.5-.672 1.5-1.5 1.5-1.5-.672-1.5-1.5zM22 6v12c0 1.105-.895 2-2 2H4c-1.105 0-2-.895-2-2V6c0-1.105.895-2 2-2h16c1.105 0 2 .895 2 2zm-2 0H4v7.444L8 9l5.895 6.55 1.587-1.85c.798-.932 2.24-.932 3.037 0L20 15.426V6z"}));case"gridicons-image-multiple":return React.createElement("g",null,React.createElement("path",{d:"M15 7.5c0-.828.672-1.5 1.5-1.5s1.5.672 1.5 1.5S17.328 9 16.5 9 15 8.328 15 7.5zM4 20h14c0 1.105-.895 2-2 2H4c-1.1 0-2-.9-2-2V8c0-1.105.895-2 2-2v14zM22 4v12c0 1.105-.895 2-2 2H8c-1.105 0-2-.895-2-2V4c0-1.105.895-2 2-2h12c1.105 0 2 .895 2 2zM8 4v6.333L11 7l4.855 5.395.656-.73c.796-.886 2.183-.886 2.977 0l.513.57V4H8z"}));case"gridicons-info":return React.createElement("g",null,React.createElement("path",{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"}));case"gridicons-info-outline":return React.createElement("g",null,React.createElement("path",{d:"M13 9h-2V7h2v2zm0 2h-2v6h2v-6zm-1-7c-4.411 0-8 3.589-8 8s3.589 8 8 8 8-3.589 8-8-3.589-8-8-8m0-2c5.523 0 10 4.477 10 10s-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2z"}));case"gridicons-jetpack-search":return React.createElement("g",null,React.createElement("path",{d:"M0 9.257C0 4.15 4.151 0 9.257 0c5.105 0 9.256 4.151 9.256 9.257a9.218 9.218 0 01-2.251 6.045l.034.033h1.053L24 22.01l-1.986 1.989-6.664-6.662v-1.055l-.033-.033a9.218 9.218 0 01-6.06 2.264C4.15 18.513 0 14.362 0 9.257zm4.169 1.537h4.61V1.82l-4.61 8.973zm5.547-3.092v8.974l4.61-8.974h-4.61z"}));case"gridicons-phone":return React.createElement("g",null,React.createElement("path",{d:"M16 2H8c-1.104 0-2 .896-2 2v16c0 1.104.896 2 2 2h8c1.104 0 2-.896 2-2V4c0-1.104-.896-2-2-2zm-3 19h-2v-1h2v1zm3-2H8V5h8v14z"}));case"gridicons-pages":return React.createElement("g",null,React.createElement("path",{d:"M16 8H8V6h8v2zm0 2H8v2h8v-2zm4-6v12l-6 6H6c-1.105 0-2-.895-2-2V4c0-1.105.895-2 2-2h12c1.105 0 2 .895 2 2zm-2 10V4H6v16h6v-4c0-1.105.895-2 2-2h4z"}));case"gridicons-posts":return React.createElement("g",null,React.createElement("path",{d:"M16 19H3v-2h13v2zm5-10H3v2h18V9zM3 5v2h11V5H3zm14 0v2h4V5h-4zm-6 8v2h10v-2H11zm-8 0v2h5v-2H3z"}));case"gridicons-search":return React.createElement("g",null,React.createElement("path",{d:"M21 19l-5.154-5.154C16.574 12.742 17 11.42 17 10c0-3.866-3.134-7-7-7s-7 3.134-7 7 3.134 7 7 7c1.42 0 2.742-.426 3.846-1.154L19 21l2-2zM5 10c0-2.757 2.243-5 5-5s5 2.243 5 5-2.243 5-5 5-5-2.243-5-5z"}));case"gridicons-star-outline":return React.createElement("g",null,React.createElement("path",{d:"M12 6.308l1.176 3.167.347.936.997.042 3.374.14-2.647 2.09-.784.62.27.963.91 3.25-2.813-1.872-.83-.553-.83.552-2.814 1.87.91-3.248.27-.962-.783-.62-2.648-2.092 3.374-.14.996-.04.347-.936L12 6.308M12 2L9.418 8.953 2 9.257l5.822 4.602L5.82 21 12 16.89 18.18 21l-2.002-7.14L22 9.256l-7.418-.305L12 2z"}));case"gridicons-star":return React.createElement("g",null,React.createElement("path",{d:"M12 2l2.582 6.953L22 9.257l-5.822 4.602L18.18 21 12 16.89 5.82 21l2.002-7.14L2 9.256l7.418-.304"}));case"gridicons-tag":return React.createElement("g",null,React.createElement("path",{d:"M20 2.007h-7.087c-.53 0-1.04.21-1.414.586L2.592 11.5c-.78.78-.78 2.046 0 2.827l7.086 7.086c.78.78 2.046.78 2.827 0l8.906-8.906c.376-.374.587-.883.587-1.413V4.007c0-1.105-.895-2-2-2zM17.007 9c-1.105 0-2-.895-2-2s.895-2 2-2 2 .895 2 2-.895 2-2 2z"}));case"gridicons-video":return React.createElement("g",null,React.createElement("path",{d:"M20 4v2h-2V4H6v2H4V4c-1.105 0-2 .895-2 2v12c0 1.105.895 2 2 2v-2h2v2h12v-2h2v2c1.105 0 2-.895 2-2V6c0-1.105-.895-2-2-2zM6 16H4v-3h2v3zm0-5H4V8h2v3zm4 4V9l4.5 3-4.5 3zm10 1h-2v-3h2v3zm0-5h-2V8h2v3z"}));case"gridicons-lock":return React.createElement(React.Fragment,null,React.createElement("g",{id:"lock"},React.createElement("path",{d:"M18,8h-1V7c0-2.757-2.243-5-5-5S7,4.243,7,7v1H6c-1.105,0-2,0.895-2,2v10c0,1.105,0.895,2,2,2h12c1.105,0,2-0.895,2-2V10 C20,8.895,19.105,8,18,8z M9,7c0-1.654,1.346-3,3-3s3,1.346,3,3v1H9V7z M13,15.723V18h-2v-2.277c-0.595-0.346-1-0.984-1-1.723 c0-1.105,0.895-2,2-2s2,0.895,2,2C14,14.738,13.595,15.376,13,15.723z"})),React.createElement("g",{id:"Layer_1"}));case"gridicons-external":return React.createElement("g",null,React.createElement("path",{d:"M19 13v6c0 1.105-.895 2-2 2H5c-1.105 0-2-.895-2-2V7c0-1.105.895-2 2-2h6v2H5v12h12v-6h2zM13 3v2h4.586l-7.793 7.793 1.414 1.414L19 6.414V11h2V3h-8z"}))}}render(){const{size:e=24,className:t=""}=this.props,a=this.props.height||e,n=this.props.width||e,c=this.props.style||{height:a,width:n},l="gridicons-"+this.props.icon,s=r()("gridicon",l,t,{"needs-offset":this.needsOffset(l,e)}),i=this.getSVGDescription(l);return React.createElement("svg",{className:s,focusable:this.props.focusable,height:a,onClick:this.props.onClick,style:c,viewBox:"0 0 24 24",width:n,xmlns:"http://www.w3.org/2000/svg","aria-hidden":this.props["aria-hidden"]},i?React.createElement("desc",null,i):null,this.renderIcon(l))}}const i=s},9665:(e,t,a)=>{"use strict";a.d(t,{Z:()=>u});var n=a(5609),c=a(5235),r=a.n(c),l=a(9196),s=a.n(l),i=a(526),o=a(7172);a(1275);const m=e=>({"top-end":"top left",top:"top center","top-start":"top right","bottom-end":"bottom left",bottom:"bottom center","bottom-start":"bottom right"}[e]),u=({className:e="",iconClassName:t="",placement:a="bottom-end",animate:c=!0,iconCode:u="info-outline",iconSize:d=18,offset:p=10,title:h,children:g,popoverAnchorStyle:f="icon",forceShow:v=!1,wide:E=!1,inline:k=!0,shift:b=!1})=>{const[w,y]=(0,l.useState)(!1),Z=(0,l.useCallback)((()=>y(!1)),[y]),C=(0,l.useCallback)((e=>{e.preventDefault(),y(!w)}),[w,y]),_={position:m(a),placement:a,animate:c,noArrow:!1,resize:!1,flip:!1,offset:p,focusOnMount:"container",onClose:Z,className:"icon-tooltip-container",inline:k,shift:b},R="wrapper"===f,j=r()("icon-tooltip-wrapper",e),S={left:R?0:-(62-d/2)+"px"},N=R&&v;return s().createElement("div",{className:j,"data-testid":"icon-tooltip_wrapper"},!R&&s().createElement(i.Z,{variant:"link",onMouseDown:C},s().createElement(o.Z,{className:t,icon:u,size:d})),s().createElement("div",{className:r()("icon-tooltip-helper",{"is-wide":E}),style:S},(N||w)&&s().createElement(n.Popover,_,s().createElement("div",null,h&&s().createElement("div",{className:"icon-tooltip-title"},h),s().createElement("div",{className:"icon-tooltip-content"},g)))))}},3396:(e,t,a)=>{"use strict";a.d(t,{VS:()=>u});var n=a(2674),c=a.n(n),r=a(5609),l=a(5235),s=a.n(l),i=(a(2659),a(5612));const o=({className:e,size:t=24,viewBox:a="0 0 24 24",opacity:n=1,color:l="#2C3338",children:o})=>{const m={className:s()(i.Z.iconWrapper,e),width:t,height:t,viewBox:a,opacity:n,fill:void 0};return l&&(m.fill=l),React.createElement(r.SVG,c()({},m,{fillRule:"evenodd",clipRule:"evenodd",xmlns:"http://www.w3.org/2000/svg"}),React.createElement(r.G,{opacity:n},o))},m={...{"anti-spam":({opacity:e=1,size:t,color:a})=>React.createElement(o,{size:t,opacity:e,color:a},React.createElement(r.Path,{d:"M13.2,4.7l4.7,12.8c0.4,1.1,1,1.5,2.1,1.6c0.1,0,0.1,0,0.1,0l0.1,0.1l0.1,0.1c0,0.1,0,0.1,0,0.2c0,0.1,0,0.1,0,0.1 s0,0.1-0.1,0.1c-0.1,0-0.1,0.1-0.1,0.1s-0.1,0-0.2,0h-5.1c-0.1,0-0.1,0-0.2,0c-0.1,0-0.1-0.1-0.1-0.1l-0.1-0.1c0-0.1,0-0.1,0-0.1 c0-0.1,0-0.1,0-0.2s0-0.1,0.1-0.1l0.1-0.1c0,0,0.1,0,0.2,0c0.5,0,1.1-0.2,1.1-0.8c0-0.3-0.1-0.5-0.2-0.8l-1.1-3.1 c-0.1-0.2-0.1-0.2-0.2-0.2h-4.3c-0.7,0-1.5,0-1.9,0.9l-1.1,2.4C7.1,17.6,7,17.8,7,18.1c0,0.8,1,0.9,1.6,0.9c0.1,0,0.1,0,0.2,0 L8.8,19l0.1,0.1c0,0.1,0,0.1,0,0.2c0,0.1,0,0.1,0,0.1s-0.1,0.1-0.1,0.1l-0.1,0.1c-0.1,0-0.1,0-0.2,0H4.1c-0.1,0-0.1,0-0.1,0 c-0.1,0-0.1-0.1-0.1-0.1l-0.1-0.1c0-0.1,0-0.1,0-0.1c0-0.1,0-0.1,0-0.2s0-0.1,0.1-0.1L4,19c0,0,0.1,0,0.1,0C5.2,19,5.5,18.5,6,17.5 l5.4-12.4c0.2-0.5,0.8-1,1.3-1C13,4.2,13.1,4.4,13.2,4.7z M9.1,13.1c0,0.1-0.1,0.1-0.1,0.2c0,0.1,0.1,0.1,0.1,0.1h4.4 c0.3,0,0.4-0.1,0.4-0.3c0-0.1,0-0.2-0.1-0.3l-1.2-3.5c-0.3-0.8-0.8-1.9-0.8-2.7c0-0.1,0-0.1-0.1-0.1c0,0-0.1,0-0.1,0.1 c-0.1,0.6-0.4,1.2-0.7,1.7L9.1,13.1z"}),React.createElement(r.Path,{d:"M13.2,4.7l4.7,12.8c0.4,1.1,1,1.5,2.1,1.6c0.1,0,0.1,0,0.1,0l0.1,0.1l0.1,0.1c0,0.1,0,0.1,0,0.2c0,0.1,0,0.1,0,0.1 s0,0.1-0.1,0.1c-0.1,0-0.1,0.1-0.1,0.1s-0.1,0-0.2,0h-5.1c-0.1,0-0.1,0-0.2,0c-0.1,0-0.1-0.1-0.1-0.1l-0.1-0.1c0-0.1,0-0.1,0-0.1 c0-0.1,0-0.1,0-0.2s0-0.1,0.1-0.1l0.1-0.1c0,0,0.1,0,0.2,0c0.5,0,1.1-0.2,1.1-0.8c0-0.3-0.1-0.5-0.2-0.8l-1.1-3.1 c-0.1-0.2-0.1-0.2-0.2-0.2h-4.3c-0.7,0-1.5,0-1.9,0.9l-1.1,2.4C7.1,17.6,7,17.8,7,18.1c0,0.8,1,0.9,1.6,0.9c0.1,0,0.1,0,0.2,0 L8.8,19l0.1,0.1c0,0.1,0,0.1,0,0.2c0,0.1,0,0.1,0,0.1s-0.1,0.1-0.1,0.1l-0.1,0.1c-0.1,0-0.1,0-0.2,0H4.1c-0.1,0-0.1,0-0.1,0 c-0.1,0-0.1-0.1-0.1-0.1l-0.1-0.1c0-0.1,0-0.1,0-0.1c0-0.1,0-0.1,0-0.2s0-0.1,0.1-0.1L4,19c0,0,0.1,0,0.1,0C5.2,19,5.5,18.5,6,17.5 l5.4-12.4c0.2-0.5,0.8-1,1.3-1C13,4.2,13.1,4.4,13.2,4.7z M9.1,13.1c0,0.1-0.1,0.1-0.1,0.2c0,0.1,0.1,0.1,0.1,0.1h4.4 c0.3,0,0.4-0.1,0.4-0.3c0-0.1,0-0.2-0.1-0.3l-1.2-3.5c-0.3-0.8-0.8-1.9-0.8-2.7c0-0.1,0-0.1-0.1-0.1c0,0-0.1,0-0.1,0.1 c-0.1,0.6-0.4,1.2-0.7,1.7L9.1,13.1z"}),React.createElement(r.Path,{d:"M21.6,12.5c0,0.6-0.3,1-0.9,1c-0.6,0-0.8-0.3-0.8-0.8c0-0.6,0.4-1,0.9-1C21.3,11.7,21.6,12.1,21.6,12.5z"}),React.createElement(r.Path,{d:"M4.1,12.5c0,0.6-0.3,1-0.9,1s-0.8-0.3-0.8-0.8c0-0.6,0.4-1,0.9-1S4.1,12.1,4.1,12.5z"})),backup:({opacity:e=1,size:t,color:a})=>React.createElement(o,{size:t,opacity:e,color:a},React.createElement(r.Path,{d:"M2.1,5.8c0-0.1,0-0.1,0-0.2c0-0.2,0.1-0.5,0.1-0.7c0.1-0.4,0.4-0.6,0.7-0.8l8.3-2.9c0.1-0.1,0.3-0.1,0.4-0.1l0.5,0.1 l8.3,2.9c0.3,0.2,0.5,0.4,0.7,0.7c0.2,0.2,0.2,0.4,0.2,0.7c0,0.1,0,0.1,0,0.2v0.1c-0.1,0.5-0.2,0.9-0.3,1.4 c-0.2,0.4-0.3,1.2-0.7,2.2c-0.3,1-0.7,2.1-1.1,3.1c-0.5,1-1,2.1-1.6,3.3s-1.4,2.3-2.2,3.5c-0.9,1.1-1.8,2.2-2.8,3.1 c-0.2,0.2-0.5,0.4-0.9,0.4c-0.3,0-0.6-0.1-0.9-0.4c-1.2-1.1-2.4-2.4-3.5-4c-1-1.6-1.9-3-2.5-4.3c-0.6-1.3-1.1-2.7-1.6-4 C2.8,8.7,2.5,7.6,2.3,7C2.3,6.5,2.1,6.1,2.1,5.8z M2.9,5.9c0,0.2,0.1,0.4,0.1,0.8C3.1,7,3.2,7.5,3.5,8.2C3.7,9,3.9,9.7,4.2,10.6 c0.3,0.7,0.7,1.7,1.1,2.7c0.4,1,1,2,1.5,2.9c0.5,1,1.2,1.9,1.9,2.9c0.8,1,1.6,1.9,2.4,2.6c0.2,0.2,0.4,0.2,0.5,0.2 c0.2,0,0.4-0.1,0.5-0.2c1.2-1,2.2-2.3,3.2-3.8c1-1.5,1.8-2.8,2.3-4c0.6-1.3,1.1-2.5,1.5-3.9c0.4-1.3,0.7-2.2,0.9-2.8 c0.1-0.5,0.2-1,0.3-1.3c0-0.1,0-0.1,0-0.1c0-0.2,0-0.3-0.1-0.4C20.3,5.2,20.2,5.1,20,5L12,2.1c0,0-0.1,0-0.2,0s-0.1,0-0.1,0h-0.2 l-8,2.8C3.2,5,3.1,5.2,3,5.3C2.9,5.5,2.9,5.6,2.9,5.8C2.9,5.8,2.9,5.8,2.9,5.9z M5.9,6.7h3l2.8,7l2.8-7h3c-0.1,0.1-0.2,0.5-0.3,0.8 C17,7.8,17,8.2,16.8,8.4c-0.1,0.3-0.2,0.5-0.4,0.8c0,0.1-0.1,0.1-0.1,0.1s-0.1,0.1-0.2,0.1c-0.1,0-0.1,0-0.1,0 c-0.1,0-0.2,0.1-0.2,0.2c0,0-0.1,0.1-0.1,0.1s-0.1,0.1-0.1,0.1c0,0,0,0.1-0.1,0.2c0,0.1-0.1,0.1-0.1,0.1l-0.4,1.1 c-1.3,3.3-2.1,5.2-2.3,5.8h-2.2l-1-2.4c-0.1-0.3-0.3-0.8-0.5-1.3c-0.1-0.3-0.3-0.8-0.5-1.3L8,10.8c-0.1-0.1-0.1-0.2-0.1-0.4 C7.8,10.2,7.7,10,7.7,9.8C7.6,9.7,7.5,9.5,7.4,9.4C7.3,9.3,7.3,9.3,7.3,9.3c-0.1,0-0.2,0-0.2,0s-0.1,0-0.1,0 C6.6,8.5,6.3,7.6,5.9,6.7z"})),boost:({opacity:e=1,size:t,color:a})=>React.createElement(o,{size:t,opacity:e,color:a},React.createElement(r.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M4.19505 16.2545C4.47368 16.561 4.94802 16.5836 5.25451 16.3049L10.2595 11.7549L14.2842 15.2765L19 10.5607V13.75H20.5V9.5V8.75239V8.7476V8H19.7529H19.7471H19H14.75V9.5H17.9393L14.2158 13.2235L10.2405 9.74507L4.2455 15.195C3.93901 15.4737 3.91642 15.948 4.19505 16.2545Z"})),crm:({opacity:e=1,size:t,color:a})=>React.createElement(o,{size:t,opacity:e,color:a},React.createElement(r.Path,{d:"M15.5 9.5a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm0 1.5a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5Zm-2.25 6v-2a2.75 2.75 0 0 0-2.75-2.75h-4A2.75 2.75 0 0 0 3.75 15v2h1.5v-2c0-.69.56-1.25 1.25-1.25h4c.69 0 1.25.56 1.25 1.25v2h1.5Zm7-2v2h-1.5v-2c0-.69-.56-1.25-1.25-1.25H15v-1.5h2.5A2.75 2.75 0 0 1 20.25 15ZM9.5 8.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0Zm1.5 0a2.5 2.5 0 1 1-5 0 2.5 2.5 0 0 1 5 0Z"})),extras:({opacity:e=1,size:t,color:a})=>React.createElement(o,{size:t,opacity:e,color:a},React.createElement(r.Path,{d:"M18.5 5.5V8H20V5.5h2.5V4H20V1.5h-1.5V4H16v1.5h2.5ZM12 4H6a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-6h-1.5v6a.5.5 0 0 1-.5.5H6a.5.5 0 0 1-.5-.5V6a.5.5 0 0 1 .5-.5h6V4Z"})),protect:({opacity:e=1,size:t,className:a,color:n})=>React.createElement(o,{className:a,size:t,opacity:e,color:n},React.createElement(r.Path,{d:"M12 3.17627L18.75 6.24445V10.8183C18.75 14.7173 16.2458 18.4089 12.7147 19.5735C12.2507 19.7265 11.7493 19.7265 11.2853 19.5735C7.75416 18.4089 5.25 14.7173 5.25 10.8183V6.24445L12 3.17627ZM6.75 7.21032V10.8183C6.75 14.1312 8.89514 17.2057 11.7551 18.149C11.914 18.2014 12.086 18.2014 12.2449 18.149C15.1049 17.2057 17.25 14.1312 17.25 10.8183V7.21032L12 4.82396L6.75 7.21032Z"}),React.createElement(r.Path,{d:"M15.5291 10.0315L11.1818 14.358L8.47095 11.66L9.52907 10.5968L11.1818 12.2417L14.4709 8.96826L15.5291 10.0315Z"})),scan:({opacity:e=1,size:t,color:a})=>React.createElement(o,{size:t,opacity:e,color:a},React.createElement(r.Path,{d:"m12 3.176 6.75 3.068v4.574c0 3.9-2.504 7.59-6.035 8.755a2.283 2.283 0 0 1-1.43 0c-3.53-1.164-6.035-4.856-6.035-8.755V6.244L12 3.176ZM6.75 7.21v3.608c0 3.313 2.145 6.388 5.005 7.33.159.053.331.053.49 0 2.86-.942 5.005-4.017 5.005-7.33V7.21L12 4.824 6.75 7.21Z"})),search:({opacity:e=1,size:t,color:a})=>React.createElement(o,{size:t,opacity:e,color:a},React.createElement(r.Path,{d:"M17.5 11.5a4 4 0 1 1-8 0 4 4 0 0 1 8 0Zm1.5 0a5.5 5.5 0 0 1-9.142 4.121l-3.364 2.943-.988-1.128 3.373-2.952A5.5 5.5 0 1 1 19 11.5Z"})),social:({opacity:e=1,size:t,color:a})=>React.createElement(o,{size:t,opacity:e,color:a},React.createElement(r.Path,{d:"M15.5 3.97809V18.0219L7.5 15.5977V20H6V15.1431L3.27498 14.3173C2.22086 13.9979 1.5 13.0262 1.5 11.9248V10.0752C1.5 8.97375 2.22087 8.00207 3.27498 7.68264L15.5 3.97809ZM14 16L7.5 14.0303L7.5 7.96969L14 5.99999V16ZM6 8.42423L6 13.5757L3.70999 12.8818C3.28835 12.754 3 12.3654 3 11.9248V10.0752C3 9.63462 3.28835 9.24595 3.70999 9.11818L6 8.42423ZM17.5 11.75H21.5V10.25H17.5V11.75ZM21.5 16L17.5 15V13.5L21.5 14.5V16ZM17.5 8.5L21.5 7.5V6L17.5 7V8.5Z"})),star:({size:e,className:t=i.Z["star-icon"],color:a})=>React.createElement(o,{className:t,size:e,color:a},React.createElement(r.Path,{d:"M12 2l2.582 6.953L22 9.257l-5.822 4.602L18.18 21 12 16.89 5.82 21l2.002-7.14L2 9.256l7.418-.304"})),videopress:({opacity:e=1,size:t,color:a})=>React.createElement(o,{size:t,opacity:e,color:a},React.createElement(r.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M4.3,6.2c0.8,0,1.6,0.6,1.8,1.4l2.3,7.9c0,0,0,0,0,0l2.7-9.3h1.5h4.2c2.9,0,4.9,1.9,4.9,4.7c0,2.9-2,4.7-5,4.7 h-2h-2.5l-0.5,1.5c-0.4,1.4-1.7,2.3-3.2,2.3c-1.4,0-2.7-0.9-3.2-2.3L2.5,8.7C2.1,7.4,3,6.2,4.3,6.2z M13,12.8h2.9c1.3,0,2-0.7,2-1.9 c0-1.2-0.8-1.8-2-1.8h-1.7L13,12.8z"})),jetpack:({size:e,className:t=i.Z.jetpack,color:a})=>React.createElement(o,{className:t,size:e,color:a,viewBox:"0 0 32 32"},React.createElement(r.Path,{className:"jetpack-logo__icon-circle",d:"M16,0C7.2,0,0,7.2,0,16s7.2,16,16,16s16-7.2,16-16S24.8,0,16,0z"}),React.createElement(r.Polygon,{fill:"#fff",points:"15,19 7,19 15,3"}),React.createElement(r.Polygon,{fill:"#fff",points:"17,29 17,13 25,13"})),share:({size:e=16,className:t,color:a})=>React.createElement(o,{className:t,size:e,color:a,viewBox:"0 0 16 16"},React.createElement(r.Path,{fill:"#161722",fillRule:"evenodd",d:"M8.3 4.66C3.85 5.308.727 9.75.034 13.69l-.02.117c-.137.842.809 1.232 1.446.68 2.013-1.745 3.648-2.475 5.318-2.719a10.482 10.482 0 011.524-.103v2.792c0 .694.82 1.041 1.3.55l6.176-6.307a.79.79 0 00.012-1.088L9.614 1.004C9.14.496 8.301.84 8.301 1.542v3.117zm1.525-1.175v1.85a.773.773 0 01-.654.77l-.655.096c-2.133.311-3.987 1.732-5.295 3.672-.472.7-.854 1.44-1.143 2.18a12.32 12.32 0 011.675-.972c1.58-.75 3.048-.972 4.548-.972h.762a.77.77 0 01.762.779v1.69l4.347-4.44-4.347-4.653z",clipRule:"evenodd"})),ai:({size:e=24,color:t="#069e08"})=>React.createElement(o,{color:t,size:e,viewBox:"0 0 32 32"},React.createElement(r.Path,{className:"spark-first",d:"M9.33301 5.33325L10.4644 8.20188L13.333 9.33325L10.4644 10.4646L9.33301 13.3333L8.20164 10.4646L5.33301 9.33325L8.20164 8.20188L9.33301 5.33325Z"}),React.createElement(r.Path,{className:"spark-second",d:"M21.3333 5.33333L22.8418 9.15817L26.6667 10.6667L22.8418 12.1752L21.3333 16L19.8248 12.1752L16 10.6667L19.8248 9.15817L21.3333 5.33333Z"}),React.createElement(r.Path,{className:"spark-third",d:"M14.6667 13.3333L16.5523 18.1144L21.3333 20L16.5523 21.8856L14.6667 26.6667L12.781 21.8856L8 20L12.781 18.1144L14.6667 13.3333Z"}))}};function u(e){return m[e]?m[e]:null}},8237:(e,t,a)=>{"use strict";a.d(t,{Z:()=>w});var n=a(2674),c=a.n(n),r=a(9818),l=a(5736),s=a(1074),i=a(5381),o=a(5235),m=a.n(o),u=a(9196),d=a.n(u),p=a(6895),h=a(428),g=a(2497),f=a(7525),v=(a(9054),a(8868)),E=a(2054);const __=l.__,_x=l._x,k=()=>d().createElement(v.Z,{logoColor:"#000",showText:!1,height:16,"aria-hidden":"true"}),b=()=>d().createElement(d().Fragment,null,d().createElement(s.Z,{icon:i.Z,size:16}),d().createElement("span",{className:"jp-dashboard-footer__accessible-external-link"},/* translators: accessibility text */ -__("(opens in a new tab)","jetpack-protect"))),w=({moduleName:e=__("Jetpack","jetpack-protect"),className:t,moduleNameHref:a="https://jetpack.com",menu:n,onAboutClick:l,onPrivacyClick:s,onTermsClick:i,...o})=>{const[u]=(0,E.Z)("sm","<="),[v]=(0,E.Z)("md","<="),[w]=(0,E.Z)("lg",">"),{isActive:y,connectedPlugins:Z}=(0,r.useSelect)((e=>{const t=e(h.t);return{connectedPlugins:t?.getConnectedPlugins(),...t.getConnectionStatus()}}),[h.t]),C=(0,g.Z)(),_=C&&y&&Z?.some((({slug:e})=>"jetpack"===e));let R=[{label:_x("About","Link to learn more about Jetpack.","jetpack-protect"),title:__("About Jetpack","jetpack-protect"),href:_?new URL("admin.php?page=jetpack_about",C).href:(0,p.Z)("jetpack-about"),target:_?"_self":"_blank",onClick:l},{label:_x("Privacy","Shorthand for Privacy Policy.","jetpack-protect"),title:__("Automattic's Privacy Policy","jetpack-protect"),href:_?new URL("admin.php?page=jetpack#/privacy",C).href:(0,p.Z)("a8c-privacy"),target:_?"_self":"_blank",onClick:s},{label:_x("Terms","Shorthand for Terms of Service.","jetpack-protect"),title:__("WordPress.com Terms of Service","jetpack-protect"),href:(0,p.Z)("wpcom-tos"),target:"_blank",onClick:i}];n&&(R=[...R,...n]);const j=d().createElement(d().Fragment,null,d().createElement(k,null),e);return d().createElement("footer",c()({className:m()("jp-dashboard-footer",{"is-sm":u,"is-md":v,"is-lg":w},t),"aria-label":__("Jetpack","jetpack-protect")},o),d().createElement("ul",null,d().createElement("li",{className:"jp-dashboard-footer__jp-item"},a?d().createElement("a",{href:a},j):j),R.map((e=>{const t="button"===e.role,a=!t&&"_blank"===e.target;return d().createElement("li",{key:e.label},d().createElement("a",{href:e.href,title:e.title,target:e.target,onClick:e.onClick,onKeyDown:e.onKeyDown,className:m()("jp-dashboard-footer__menu-item",{"is-external":a}),role:e.role,rel:a?"noopener noreferrer":void 0,tabIndex:t?0:void 0},e.label,a&&d().createElement(b,null)))})),d().createElement("li",{className:"jp-dashboard-footer__a8c-item"},d().createElement("a",{href:_?new URL("admin.php?page=jetpack_about",C).href:(0,p.Z)("a8c-about"),"aria-label":__("An Automattic Airline","jetpack-protect")},d().createElement(f.Z,{"aria-hidden":"true"})))))}},8868:(e,t,a)=>{"use strict";a.d(t,{Z:()=>m});var n=a(2674),c=a.n(n),r=a(5736),l=a(5235),s=a.n(l),i=a(9196),o=a.n(i);const __=r.__,m=({logoColor:e="#069e08",showText:t=!0,className:a,height:n=32,...r})=>{const l=t?"0 0 118 32":"0 0 32 32";return o().createElement("svg",c()({xmlns:"http://www.w3.org/2000/svg",x:"0px",y:"0px",viewBox:l,className:s()("jetpack-logo",a),"aria-labelledby":"jetpack-logo-title",height:n},r,{role:"img"}),o().createElement("title",{id:"jetpack-logo-title"},__("Jetpack Logo","jetpack-protect")),o().createElement("path",{fill:e,d:"M16,0C7.2,0,0,7.2,0,16s7.2,16,16,16s16-7.2,16-16S24.8,0,16,0z M15,19H7l8-16V19z M17,29V13h8L17,29z"}),t&&o().createElement(o().Fragment,null,o().createElement("path",{d:"M41.3,26.6c-0.5-0.7-0.9-1.4-1.3-2.1c2.3-1.4,3-2.5,3-4.6V8h-3V6h6v13.4C46,22.8,45,24.8,41.3,26.6z"}),o().createElement("path",{d:"M65,18.4c0,1.1,0.8,1.3,1.4,1.3c0.5,0,2-0.2,2.6-0.4v2.1c-0.9,0.3-2.5,0.5-3.7,0.5c-1.5,0-3.2-0.5-3.2-3.1V12H60v-2h2.1V7.1 H65V10h4v2h-4V18.4z"}),o().createElement("path",{d:"M71,10h3v1.3c1.1-0.8,1.9-1.3,3.3-1.3c2.5,0,4.5,1.8,4.5,5.6s-2.2,6.3-5.8,6.3c-0.9,0-1.3-0.1-2-0.3V28h-3V10z M76.5,12.3 c-0.8,0-1.6,0.4-2.5,1.2v5.9c0.6,0.1,0.9,0.2,1.8,0.2c2,0,3.2-1.3,3.2-3.9C79,13.4,78.1,12.3,76.5,12.3z"}),o().createElement("path",{d:"M93,22h-3v-1.5c-0.9,0.7-1.9,1.5-3.5,1.5c-1.5,0-3.1-1.1-3.1-3.2c0-2.9,2.5-3.4,4.2-3.7l2.4-0.3v-0.3c0-1.5-0.5-2.3-2-2.3 c-0.7,0-2.3,0.5-3.7,1.1L84,11c1.2-0.4,3-1,4.4-1c2.7,0,4.6,1.4,4.6,4.7L93,22z M90,16.4l-2.2,0.4c-0.7,0.1-1.4,0.5-1.4,1.6 c0,0.9,0.5,1.4,1.3,1.4s1.5-0.5,2.3-1V16.4z"}),o().createElement("path",{d:"M104.5,21.3c-1.1,0.4-2.2,0.6-3.5,0.6c-4.2,0-5.9-2.4-5.9-5.9c0-3.7,2.3-6,6.1-6c1.4,0,2.3,0.2,3.2,0.5V13 c-0.8-0.3-2-0.6-3.2-0.6c-1.7,0-3.2,0.9-3.2,3.6c0,2.9,1.5,3.8,3.3,3.8c0.9,0,1.9-0.2,3.2-0.7V21.3z"}),o().createElement("path",{d:"M110,15.2c0.2-0.3,0.2-0.8,3.8-5.2h3.7l-4.6,5.7l5,6.3h-3.7l-4.2-5.8V22h-3V6h3V15.2z"}),o().createElement("path",{d:"M58.5,21.3c-1.5,0.5-2.7,0.6-4.2,0.6c-3.6,0-5.8-1.8-5.8-6c0-3.1,1.9-5.9,5.5-5.9s4.9,2.5,4.9,4.9c0,0.8,0,1.5-0.1,2h-7.3 c0.1,2.5,1.5,2.8,3.6,2.8c1.1,0,2.2-0.3,3.4-0.7C58.5,19,58.5,21.3,58.5,21.3z M56,15c0-1.4-0.5-2.9-2-2.9c-1.4,0-2.3,1.3-2.4,2.9 C51.6,15,56,15,56,15z"})))}},3846:(e,t,a)=>{"use strict";a.d(t,{Z:()=>m});var n=a(5235),c=a.n(n),r=a(9196),l=a(3080);const s=Number(l.Z.smCols),i=Number(l.Z.mdCols),o=Number(l.Z.lgCols),m=e=>{const{children:t,tagName:a="div",className:n}=e,m=Math.min(s,"number"==typeof e.sm?e.sm:s),u=Math.min(s,"object"==typeof e.sm?e.sm.start:0),d=Math.min(s,"object"==typeof e.sm?e.sm.end:0),p=Math.min(i,"number"==typeof e.md?e.md:i),h=Math.min(i,"object"==typeof e.md?e.md.start:0),g=Math.min(i,"object"==typeof e.md?e.md.end:0),f=Math.min(o,"number"==typeof e.lg?e.lg:o),v=Math.min(o,"object"==typeof e.lg?e.lg.start:0),E=Math.min(o,"object"==typeof e.lg?e.lg.end:0),k=c()(n,{[l.Z[`col-sm-${m}`]]:!(u&&d),[l.Z[`col-sm-${u}-start`]]:u>0,[l.Z[`col-sm-${d}-end`]]:d>0,[l.Z[`col-md-${p}`]]:!(h&&g),[l.Z[`col-md-${h}-start`]]:h>0,[l.Z[`col-md-${g}-end`]]:g>0,[l.Z[`col-lg-${f}`]]:!(v&&E),[l.Z[`col-lg-${v}-start`]]:v>0,[l.Z[`col-lg-${E}-end`]]:E>0});return(0,r.createElement)(a,{className:k},t)}},3363:(e,t,a)=>{"use strict";a.d(t,{Z:()=>s});var n=a(5235),c=a.n(n),r=a(9196),l=a(8730);const s=({children:e,fluid:t=!1,tagName:a="div",className:n,horizontalGap:s=1,horizontalSpacing:i=1})=>{const o=(0,r.useMemo)((()=>{const e=`calc( var(--horizontal-spacing) * ${i} )`;return{paddingTop:e,paddingBottom:e,rowGap:`calc( var(--horizontal-spacing) * ${s} )`}}),[s,i]),m=c()(n,l.Z.container,{[l.Z.fluid]:t});return(0,r.createElement)(a,{className:m,style:o},e)}},2054:(e,t,a)=>{"use strict";a.d(t,{Z:()=>l});var n=a(4333),c=a(3247);const r=["sm","md","lg"],l=(e,t)=>{const a=Array.isArray(e)?e:[e],l=Array.isArray(t)?t:[t],[s,i,o]=r,m={sm:(0,n.useMediaQuery)(c.Z[s]),md:(0,n.useMediaQuery)(c.Z[i]),lg:(0,n.useMediaQuery)(c.Z[o])};return a.map(((e,t)=>{const a=l[t];return a?((e,t,a)=>{const n=r.indexOf(e),c=n+1,l=t.includes("=");let s=[];return t.startsWith("<")&&(s=r.slice(0,l?c:n)),t.startsWith(">")&&(s=r.slice(l?n:c)),s?.length?s.some((e=>a[e])):a[e]})(e,a,m):m[e]}))}},1342:(e,t,a)=>{"use strict";a.d(t,{Z:()=>g});var n=a(797),c=a(496),r=a(9201),l=a(1074),s=a(9517),i=a(5235),o=a.n(i),m=a(9196),u=a.n(m),d=a(7703);const p=e=>{switch(e){case"error":case"warning":default:return n.Z;case"info":return c.Z;case"success":return r.Z}},h=({level:e,title:t,children:a,actions:n,hideCloseButton:c,onClose:r})=>{const i=o()(d.Z.container,d.Z[`is-${e}`]);return u().createElement("div",{className:i},u().createElement("div",{className:d.Z["icon-wrapper"]},u().createElement(l.Z,{icon:p(e),className:d.Z.icon})),u().createElement("div",{className:d.Z["main-content"]},u().createElement("div",{className:d.Z.title},t),a,n&&n.length>0&&u().createElement("div",{className:d.Z["action-bar"]},n.map(((e,t)=>u().createElement("div",{key:t,className:d.Z.action},e))))),!c&&u().createElement("button",{"aria-label":"close",className:d.Z["close-button"],onClick:r},u().createElement(l.Z,{icon:s.Z})))};h.defaultProps={level:"info",hideCloseButton:!1};const g=h},9608:(e,t,a)=>{"use strict";a.d(t,{NE:()=>w,ZP:()=>Z,kF:()=>b,oK:()=>y});var n=a(5736),c=a(1074),r=a(9201),l=a(6163),s=a(5235),i=a.n(s),o=a(9196),m=a.n(o),u=a(9665),d=a(2054),p=a(7325),h=a(5106),g=a(9929);const __=n.__,f=__("Included","jetpack-protect"),v=__("Not included","jetpack-protect"),E=__("Coming soon","jetpack-protect"),k=(0,o.createContext)(void 0),b=({isIncluded:e=!1,isComingSoon:t=!1,index:a=0,label:s=null,tooltipInfo:p,tooltipTitle:b,tooltipClassName:w=""})=>{const[y]=(0,d.Z)("lg"),Z=(0,o.useContext)(k)[a],C=t||e,_=Z.name,R=Z.tooltipInfo,j=Z.tooltipTitle,S=p||!y&&R,N=((e,t,a)=>e?{lg:E, -// translators: Name of the current feature -default:(0,n.sprintf)(__("%s coming soon","jetpack-protect"),a)}:{lg:t?f:v,default:t?a:(0,n.sprintf)(/* translators: Name of the current feature */ -__("%s not included","jetpack-protect"),a)})(t,e,_),P=y?N.lg:N.default;return m().createElement("div",{className:i()(g.Z.item,g.Z.value)},m().createElement(c.Z,{className:i()(g.Z.icon,C?g.Z["icon-check"]:g.Z["icon-cross"]),size:32,icon:C?r.Z:l.Z}),m().createElement(h.ZP,{variant:"body-small"},s||P),S&&m().createElement(u.Z,{title:b||j,iconClassName:g.Z["popover-icon"],className:i()(g.Z.popover,w),placement:"bottom-end",iconSize:14,offset:4,wide:Boolean(b&&p)},m().createElement(h.ZP,{variant:"body-small",component:"div"},p||R)))},w=({children:e})=>m().createElement("div",{className:g.Z.header},e),y=({primary:e=!1,children:t})=>{let a=0;return m().createElement("div",{className:i()(g.Z.card,{[g.Z["is-primary"]]:e})},o.Children.map(t,(e=>{const t=e;return t.type===b?(a++,(0,o.cloneElement)(t,{index:a-1})):t})))},Z=({title:e,items:t,children:a,showIntroOfferDisclaimer:n=!1})=>{const[c]=(0,d.Z)("lg");return m().createElement(k.Provider,{value:t},m().createElement("div",{className:i()(g.Z.container,{[g.Z["is-viewport-large"]]:c}),style:{"--rows":t.length+1,"--columns":o.Children.toArray(a).length+1}},m().createElement("div",{className:g.Z.table},m().createElement(h.ZP,{variant:"headline-small"},e),c&&t.map(((e,a)=>m().createElement("div",{className:i()(g.Z.item,{[g.Z["last-feature"]]:a===t.length-1}),key:a},m().createElement(h.ZP,{variant:"body-small"},m().createElement("strong",null,e.name)),e.tooltipInfo&&m().createElement(u.Z,{title:e.tooltipTitle,iconClassName:g.Z["popover-icon"],className:g.Z.popover,placement:e.tooltipPlacement?e.tooltipPlacement:"bottom-end",iconSize:14,offset:4,wide:Boolean(e.tooltipTitle&&e.tooltipInfo)},m().createElement(h.ZP,{variant:"body-small"},e.tooltipInfo))))),a)),m().createElement("div",{className:g.Z["tos-container"]},m().createElement("div",{className:g.Z.tos},n&&m().createElement(h.ZP,{variant:"body-small"},__("Reduced pricing is a limited offer for the first year and renews at regular price.","jetpack-protect")),m().createElement(p.Z,{multipleButtons:!0}))))}},5347:(e,t,a)=>{"use strict";a.d(t,{Z:()=>o});var n=a(5736),c=a(5235),r=a.n(c),l=a(5106),s=a(3789),i=a(9184);const __=n.__,o=({price:e,offPrice:t,currency:a="",showNotOffPrice:n=!0,hideDiscountLabel:c=!0,promoLabel:o="",legend:m=__("/month, paid yearly","jetpack-protect"),isNotConvenientPrice:u=!1,hidePriceFraction:d=!1,children:p})=>{if(null==e&&null==t||!a)return null;n=n&&null!=t;const h="number"==typeof e&&"number"==typeof t?Math.floor((e-t)/e*100):0,g=!c&&h&&h>0?h+__("% off","jetpack-protect"):null;return React.createElement(React.Fragment,null,React.createElement("div",{className:i.Z.container},React.createElement("div",{className:r()(i.Z["price-container"],"product-price_container")},React.createElement(s.t,{value:t??e,currency:a,isOff:!u,hidePriceFraction:d}),n&&React.createElement(s.t,{value:e,currency:a,isOff:!1,hidePriceFraction:d}),g&&React.createElement(l.ZP,{className:r()(i.Z["promo-label"],"product-price_promo_label")},g))),React.createElement("div",{className:i.Z.footer},p||React.createElement(l.ZP,{className:r()(i.Z.legend,"product-price_legend")},m),o&&React.createElement(l.ZP,{className:r()(i.Z["promo-label"],"product-price_promo_label")},o)))}},3789:(e,t,a)=>{"use strict";a.d(t,{t:()=>i});var n=a(8899),c=a(5235),r=a.n(c),l=a(5106),s=a(9184);const i=({value:e,currency:t,isOff:a,hidePriceFraction:c})=>{const i=r()(s.Z.price,"product-price_price",{[s.Z["is-not-off-price"]]:!a}),{symbol:o,integer:m,fraction:u}=(0,n.LR)(e,t),d=!c||!u.endsWith("00");return React.createElement(l.ZP,{className:i,variant:"headline-medium",component:"p"},React.createElement(l.ZP,{className:s.Z.symbol,component:"sup",variant:"title-medium"},o),m,d&&React.createElement(l.ZP,{component:"sup",variant:"body-small","data-testid":"PriceFraction"},React.createElement("strong",null,u)))}},5033:(e,t,a)=>{"use strict";a.d(t,{Z:()=>i});var n=a(5162),c=a.n(n),r=a(9196),l=a.n(r);a(1683);const s=e=>{const t=e.className+" jp-components-spinner",a={width:e.size,height:e.size,fontSize:e.size,borderTopColor:e.color},n={borderTopColor:e.color,borderRightColor:e.color};return l().createElement("div",{className:t},l().createElement("div",{className:"jp-components-spinner__outer",style:a},l().createElement("div",{className:"jp-components-spinner__inner",style:n})))};s.propTypes={color:c().string,className:c().string,size:c().number},s.defaultProps={color:"#FFFFFF",className:"",size:20};const i=s},3474:(e,t,a)=>{"use strict";a.d(t,{Z:()=>i});var n=a(5736),c=a(5235),r=a.n(c),l=a(5106),s=a(514);const __=n.__,i=({className:e,label:t,status:a="inactive"})=>{const n={active:__("Active","jetpack-protect"),error:__("Error","jetpack-protect"),action:__("Action needed","jetpack-protect"),inactive:__("Inactive","jetpack-protect"),initializing:__("Setting up","jetpack-protect")};return React.createElement(l.ZP,{variant:"body-extra-small",className:r()(s.Z.status,{[s.Z[`is-${a}`]]:a},e)},React.createElement("span",{className:s.Z.status__indicator}),React.createElement("span",{className:s.Z.status__label},t||""===t?t:n[a]))}},7325:(e,t,a)=>{"use strict";a.d(t,{Z:()=>d});var n=a(9307),c=a(5736),r=a(5235),l=a.n(r),s=a(6895),i=a(5106);a(7920);const __=c.__,o=()=>(0,n.createInterpolateElement)(__("By clicking the buttons above, you agree to our Terms of Service and to share details with WordPress.com.","jetpack-protect"),{tosLink:React.createElement(u,{slug:"wpcom-tos"}),shareDetailsLink:React.createElement(u,{slug:"jetpack-support-what-data-does-jetpack-sync"})}),m=({agreeButtonLabel:e})=>(0,n.createInterpolateElement)((0,c.sprintf)(/* translators: %s is a button label */ -__("By clicking the %s button, you agree to our Terms of Service and to share details with WordPress.com.","jetpack-protect"),e),{strong:React.createElement("strong",null),tosLink:React.createElement(u,{slug:"wpcom-tos"}),shareDetailsLink:React.createElement(u,{slug:"jetpack-support-what-data-does-jetpack-sync"})}),u=({slug:e,children:t})=>React.createElement("a",{className:"terms-of-service__link",href:(0,s.Z)(e),rel:"noopener noreferrer",target:"_blank"},t),d=({className:e,multipleButtons:t,agreeButtonLabel:a})=>React.createElement(i.ZP,{className:l()(e,"terms-of-service")},t?React.createElement(o,null):React.createElement(m,{agreeButtonLabel:a}))},6017:(e,t,a)=>{"use strict";a.d(t,{h:()=>n,s:()=>c});const n={"headline-medium":"h1","headline-small":"h2","headline-small-regular":"h2","title-medium":"h3","title-medium-semi-bold":"h3","title-small":"h4",body:"p","body-small":"p","body-extra-small":"p","body-extra-small-bold":"p",label:"p"},c=["mt","mr","mb","ml","mx","my","m","pt","pr","pb","pl","px","py","p"]},5106:(e,t,a)=>{"use strict";a.d(t,{Dx:()=>h,H3:()=>p,ZP:()=>d});var n=a(2674),c=a.n(n),r=a(5235),l=a.n(r),s=a(9196),i=a.n(s),o=a(6017),m=a(3280);const u=(0,s.forwardRef)((({variant:e="body",children:t,component:a,className:n,...r},u)=>{const d=a||o.h[e]||"span",p=(0,s.useMemo)((()=>o.s.reduce(((e,t)=>(void 0!==r[t]&&(e+=m.Z[`${t}-${r[t]}`]+" ",delete r[t]),e)),"")),[r]);return r.ref=u,i().createElement(d,c()({className:l()(m.Z.reset,m.Z[e],n,p)},r),t)}));u.displayName="Text";const d=u,p=({children:e,weight:t="bold",...a})=>{const n="headline-small"+("bold"===t?"":`-${t}`);return i().createElement(u,c()({variant:n,mb:3},a),e)},h=({children:e,size:t="medium",...a})=>i().createElement(u,c()({variant:`title-${t}`,mb:1},a),e)},8275:(e,t,a)=>{"use strict";a.d(t,{ZP:()=>d});var n=a(9196),c=a.n(n),r=a(3591);const l={"--font-headline-medium":"48px","--font-headline-small":"36px","--font-title-medium":"24px","--font-title-small":"20px","--font-body":"16px","--font-body-small":"14px","--font-body-extra-small":"12px","--font-title-large":"var(--font-headline-small)","--font-label":"var(--font-body-extra-small)"},s={"--jp-black":"#000000","--jp-black-80":"#2c3338","--jp-white":"#ffffff","--jp-white-off":"#f9f9f6","--jp-gray":"#dcdcde","--jp-gray-0":"#F6F7F7","--jp-gray-10":"#C3C4C7","--jp-gray-20":"#A7AAAD","--jp-gray-40":"#787C82","--jp-gray-50":"#646970","--jp-gray-60":"#50575E","--jp-gray-70":"#3C434A","--jp-gray-80":"#2C3338","--jp-gray-90":"#1d2327","--jp-gray-off":"#e2e2df","--jp-red-0":"#F7EBEC","--jp-red-5":"#FACFD2","--jp-red-40":"#E65054","--jp-red-50":"#D63638","--jp-red-60":"#B32D2E","--jp-red-70":"#8A2424","--jp-red-80":"#691C1C","--jp-red":"#d63639","--jp-yellow-5":"#F5E6B3","--jp-yellow-10":"#F2CF75","--jp-yellow-20":"#F0C930","--jp-yellow-30":"#DEB100","--jp-yellow-40":"#C08C00","--jp-yellow-50":"#9D6E00","--jp-yellow-60":"#7D5600","--jp-blue-20":"#68B3E8","--jp-blue-40":"#1689DB","--jp-pink":"#C9356E","--jp-green-0":"#f0f2eb","--jp-green-5":"#d0e6b8","--jp-green-10":"#9dd977","--jp-green-20":"#64ca43","--jp-green-30":"#2fb41f","--jp-green-40":"#069e08","--jp-green-50":"#008710","--jp-green-60":"#007117","--jp-green-70":"#005b18","--jp-green-80":"#004515","--jp-green-90":"#003010","--jp-green-100":"#001c09","--jp-green":"#069e08","--jp-green-primary":"var( --jp-green-40 )","--jp-green-secondary":"var( --jp-green-30 )"},i={"--jp-border-radius":"4px","--jp-menu-border-height":"1px","--jp-underline-thickness":"2px"},o={"--spacing-base":"8px"},m={},u=(e,t,a)=>{const n={...l,...s,...i,...o};for(const t in n)e.style.setProperty(t,n[t]);a&&e.classList.add(r.Z.global),t&&(m[t]={provided:!0,root:e})},d=({children:e=null,targetDom:t,id:a,withGlobalStyles:r=!0})=>{const l=(0,n.useRef)(),s=m?.[a]?.provided;return(0,n.useLayoutEffect)((()=>{if(!s)return t?u(t,a,r):void(l?.current&&u(l.current,a,r))}),[t,l,s,a,r]),t?c().createElement(c().Fragment,null,e):c().createElement("div",{ref:l},e)}},2497:(e,t,a)=>{"use strict";function n(){return window.Initial_State?.adminUrl||window.Jetpack_Editor_Initial_State?.adminUrl||window?.myJetpackInitialState?.adminUrl||null}a.d(t,{Z:()=>n})},6895:(e,t,a)=>{"use strict";function n(e,t={}){const a={};let n;if("undefined"!=typeof window&&(n=window?.JP_CONNECTION_INITIAL_STATE?.calypsoEnv),0===e.search("https://")){const t=new URL(e);e=`https://${t.host}${t.pathname}`,a.url=encodeURIComponent(e)}else a.source=encodeURIComponent(e);for(const e in t)a[e]=encodeURIComponent(t[e]);!Object.keys(a).includes("site")&&"undefined"!=typeof jetpack_redirects&&jetpack_redirects.hasOwnProperty("currentSiteRawUrl")&&(a.site=jetpack_redirects.currentBlogID??jetpack_redirects.currentSiteRawUrl),n&&(a.calypso_env=n);return"https://jetpack.com/redirect/?"+Object.keys(a).map((e=>e+"="+a[e])).join("&")}a.d(t,{Z:()=>n})},1132:(e,t,a)=>{let n={};try{n=a(6436)}catch{console.error("jetpackConfig is missing in your webpack config file. See @automattic/jetpack-config"),n={missingConfig:!0}}const c=e=>n.hasOwnProperty(e);e.exports={jetpackConfigHas:c,jetpackConfigGet:e=>{if(!c(e))throw'This app requires the "'+e+'" Jetpack Config to be defined in your webpack configuration file. See details in @automattic/jetpack-config package docs.';return n[e]}}},6186:(e,t,a)=>{"use strict";a.d(t,{Z:()=>p});var n=a(2054),c=a(5033),r=a(5609),l=a(5736),s=a(5162),i=a.n(s),o=a(9196),m=a.n(o),u=a(9836);const __=l.__,d=e=>{const{message:t,isRestoringConnection:a,restoreConnectionCallback:s,restoreConnectionError:i}=e,[o]=(0,n.Z)(["md"],[">"]),d=u.Z.notice+(o?" "+u.Z["bigger-than-medium"]:""),p=m().createElement(r.Icon,{icon:m().createElement(r.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},m().createElement(r.Path,{d:"M11.7815 4.93772C11.8767 4.76626 12.1233 4.76626 12.2185 4.93772L20.519 19.8786C20.6116 20.0452 20.4911 20.25 20.3005 20.25H3.69951C3.50889 20.25 3.3884 20.0452 3.48098 19.8786L11.7815 4.93772Z",stroke:"#D63638",strokeWidth:"1.5"}),m().createElement(r.Path,{d:"M13 10H11V15H13V10Z",fill:"#D63638"}),m().createElement(r.Path,{d:"M13 16H11V18H13V16Z",fill:"#D63638"}))});if(!t)return null;if(a)return m().createElement(r.Notice,{status:"error",isDismissible:!1,className:d},m().createElement("div",{className:u.Z.message},m().createElement(c.Z,{color:"#B32D2E",size:24}),__("Reconnecting Jetpack","jetpack-protect")));const h=i?m().createElement(r.Notice,{status:"error",isDismissible:!1,className:d+" "+u.Z.error},m().createElement("div",{className:u.Z.message},p,(0,l.sprintf)(/* translators: placeholder is the error. */ -__("There was an error reconnecting Jetpack. Error: %s","jetpack-protect"),i))):null;return m().createElement(m().Fragment,null,h,m().createElement(r.Notice,{status:"error",isDismissible:!1,className:d},m().createElement("div",{className:u.Z.message},p,t),s&&m().createElement("a",{onClick:s,onKeyDown:s,className:u.Z.button,href:"#"},__("Restore Connection","jetpack-protect"))))};d.propTypes={message:i().string.isRequired,restoreConnectionCallback:i().func,isRestoringConnection:i().bool,restoreConnectionError:i().string};const p=d},1294:(e,t,a)=>{"use strict";a.d(t,{Z:()=>i});var n=a(4743),c=a(9818),r=a(9196),l=a(428);const s=window?.JP_CONNECTION_INITIAL_STATE?window.JP_CONNECTION_INITIAL_STATE:{},i=({registrationNonce:e=s.registrationNonce,apiRoot:t=s.apiRoot,apiNonce:a=s.apiNonce,redirectUri:i,autoTrigger:o,from:m,skipUserConnection:u}={})=>{const{registerSite:d,connectUser:p,refreshConnectedPlugins:h}=(0,c.useDispatch)(l.t),g=(0,c.useSelect)((e=>e(l.t).getRegistrationError())),{siteIsRegistering:f,userIsConnecting:v,userConnectionData:E,connectedPlugins:k,connectionErrors:b,isRegistered:w,isUserConnected:y,hasConnectedOwner:Z,isOfflineMode:C}=(0,c.useSelect)((e=>({siteIsRegistering:e(l.t).getSiteIsRegistering(),userIsConnecting:e(l.t).getUserIsConnecting(),userConnectionData:e(l.t).getUserConnectionData(),connectedPlugins:e(l.t).getConnectedPlugins(),connectionErrors:e(l.t).getConnectionErrors(),isOfflineMode:e(l.t).getIsOfflineMode(),...e(l.t).getConnectionStatus()}))),_=()=>u?i?(window.location=i,Promise.resolve(i)):Promise.resolve():p({from:m,redirectUri:i}),R=t=>(t&&t.preventDefault(),w?_():d({registrationNonce:e,redirectUri:i}).then((()=>_())));return(0,r.useEffect)((()=>{n.ZP.setApiRoot(t),n.ZP.setApiNonce(a)}),[t,a]),(0,r.useEffect)((()=>{!o||f||v||R()}),[]),{handleRegisterSite:R,handleConnectUser:_,refreshConnectedPlugins:h,isRegistered:w,isUserConnected:y,siteIsRegistering:f,userIsConnecting:v,registrationError:g,userConnectionData:E,hasConnectedOwner:Z,connectedPlugins:k,connectionErrors:b,isOfflineMode:C}}},7711:(e,t,a)=>{"use strict";function n(){switch("undefined"!=typeof window&&window?.JP_CONNECTION_INITIAL_STATE?.calypsoEnv){case"development":return"http://calypso.localhost:3000/";case"wpcalypso":return"https://wpcalypso.wordpress.com/";case"horizon":return"https://horizon.wordpress.com/";default:return"https://wordpress.com/"}}a.d(t,{Z:()=>n})},3329:(e,t,a)=>{"use strict";a.d(t,{Z:()=>l,h:()=>s});var n=a(6186),c=a(1294),r=a(1045);function l(){const{connectionErrors:e}=(0,c.Z)({}),t=Object.values(e).shift(),a=t&&Object.values(t).length&&Object.values(t).shift().error_message;return{hasConnectionError:Boolean(a),connectionErrorMessage:a}}const s=()=>{const{hasConnectionError:e,connectionErrorMessage:t}=l(),{restoreConnection:a,isRestoringConnection:c,restoreConnectionError:s}=(0,r.Z)();return e?React.createElement(n.Z,{isRestoringConnection:c,restoreConnectionError:s,restoreConnectionCallback:a,message:t}):null}},8258:(e,t,a)=>{"use strict";a.d(t,{Z:()=>v});var n=a(4743),c=a(7711),r=a(9818),l=a(951),s=a.n(l),i=a(9196),o=a(1294),m=a(428);const u=s()("jetpack:connection:useProductCheckoutWorkflow"),{registrationNonce:d,apiRoot:p,apiNonce:h,siteSuffix:g}=window?.JP_CONNECTION_INITIAL_STATE?window.JP_CONNECTION_INITIAL_STATE:{},f="undefined"!=typeof window?window?.myJetpackInitialState?.adminUrl:null;function v({productSlug:e,redirectUrl:t,siteSuffix:a=g,adminUrl:l=f,connectAfterCheckout:s=!1,siteProductAvailabilityHandler:v=null,quantity:E=null,from:k,useBlogIdSuffix:b=!1}={}){u("productSlug is %s",e),u("redirectUrl is %s",t),u("siteSuffix is %s",a),u("from is %s",k);const[w,y]=(0,i.useState)(!1),{registerSite:Z}=(0,r.useDispatch)(m.t),C=(0,r.useSelect)((e=>e(m.t).getBlogId()),[m.t]);u("blogID is %s",C??"undefined"),b=b&&!!C;const{isUserConnected:_,isRegistered:R,handleConnectUser:j}=(0,o.Z)({redirectUri:t,from:k}),S=(0,i.useMemo)((()=>{const n=(0,c.Z)(),r=(!R||!_)&&s,i=r?"checkout/jetpack/":`checkout/${b?C.toString():a}/`,o=new URL(`${n}${i}${e}${null!=E?`:-q-${E}`:""}`);return r?(o.searchParams.set("connect_after_checkout",!0),o.searchParams.set("admin_url",l),o.searchParams.set("from_site_slug",a)):o.searchParams.set("site",a),o.searchParams.set("source",k),o.searchParams.set("redirect_to",t),_||o.searchParams.set("unlinked","1"),o}),[R,_,s,a,E,e,k,t,l,b,C]);u("isRegistered is %s",R),u("isUserConnected is %s",_),u("connectAfterCheckout is %s",s),u("checkoutUrl is %s",S);const N=(e=null)=>Promise.resolve(v&&v()).then((t=>{if(e&&S.searchParams.set("redirect_to",e),t)return u("handleAfterRegistration: Site has a product associated"),j();u("handleAfterRegistration: Site does not have a product associated. Redirecting to checkout %s",S),window.location.href=S}));return(0,i.useEffect)((()=>{n.ZP.setApiRoot(p),n.ZP.setApiNonce(h)}),[]),{run:(e,a=null)=>(e&&e.preventDefault(),y(!0),s?((e=null)=>{e&&S.searchParams.set("redirect_to",e),u("Redirecting to connectAfterCheckout flow: %s",S),window.location.href=S})(a):R?N(a):void Z({registrationNonce:d,redirectUri:t}).then((()=>N(a)))),isRegistered:R,hasCheckoutStarted:w}}},1045:(e,t,a)=>{"use strict";a.d(t,{Z:()=>o});var n=a(4743),c=a(9818),r=a(9196),l=a(428);const{apiRoot:s,apiNonce:i}=window?.JP_CONNECTION_INITIAL_STATE?window.JP_CONNECTION_INITIAL_STATE:{};function o(){const[e,t]=(0,r.useState)(!1),[a,o]=(0,r.useState)(null),{disconnectUserSuccess:m,setConnectionErrors:u}=(0,c.useDispatch)(l.t);return(0,r.useEffect)((()=>{n.ZP.setApiRoot(s),n.ZP.setApiNonce(i)}),[]),{restoreConnection:(e=!0)=>(t(!0),o(null),n.ZP.reconnect().then((t=>("in_progress"===t.status?(m(),u({}),e&&(window.location.href="/wp-admin/admin.php?page=my-jetpack#/connection")):window.location.reload(),t))).catch((e=>{throw o(e),t(!1),e}))),isRestoringConnection:e,restoreConnectionError:a}}},7523:(e,t,a)=>{"use strict";a.d(t,{LI:()=>r,N4:()=>s,Qo:()=>u,T1:()=>o,TS:()=>m,ZP:()=>y,b5:()=>p,i6:()=>c,qJ:()=>h,qV:()=>i,r7:()=>l,wQ:()=>d});var n=a(4743);const c="SET_CONNECTION_STATUS",r="SET_CONNECTION_STATUS_IS_FETCHING",l="SET_SITE_IS_REGISTERING",s="SET_USER_IS_CONNECTING",i="SET_REGISTRATION_ERROR",o="CLEAR_REGISTRATION_ERROR",m="SET_AUTHORIZATION_URL",u="DISCONNECT_USER_SUCCESS",d="SET_CONNECTED_PLUGINS",p="SET_CONNECTION_ERRORS",h="SET_IS_OFFLINE_MODE",g=e=>({type:c,connectionStatus:e}),f=e=>({type:l,isRegistering:e}),v=e=>({type:s,isConnecting:e}),E=e=>({type:i,registrationError:e}),k=()=>({type:o}),b=e=>({type:m,authorizationUrl:e}),w=e=>({type:d,connectedPlugins:e});const y={setConnectionStatus:g,setConnectionStatusIsFetching:e=>({type:r,isFetching:e}),fetchConnectionStatus:()=>({type:"FETCH_CONNECTION_STATUS"}),fetchAuthorizationUrl:e=>({type:"FETCH_AUTHORIZATION_URL",redirectUri:e}),setSiteIsRegistering:f,setUserIsConnecting:v,setRegistrationError:E,clearRegistrationError:k,setAuthorizationUrl:b,registerSite:function*({registrationNonce:e,redirectUri:t}){yield k(),yield f(!0);try{const a=yield{type:"REGISTER_SITE",registrationNonce:e,redirectUri:t};return yield g({isRegistered:!0}),yield b(a.authorizeUrl),yield f(!1),Promise.resolve(a)}catch(e){return yield E(e),yield f(!1),Promise.reject(e)}},connectUser:function*({from:e,redirectFunc:t,redirectUri:a}={}){yield v(!0),yield{type:"CONNECT_USER",from:e,redirectFunc:t,redirectUri:a}},disconnectUserSuccess:()=>({type:u}),setConnectedPlugins:w,refreshConnectedPlugins:()=>async({dispatch:e})=>await new Promise((t=>n.ZP.fetchConnectedPlugins().then((a=>{e(w(a)),t(a)})))),setConnectionErrors:e=>({type:p,connectionErrors:e}),setIsOfflineMode:e=>({type:h,isOfflineMode:e})}},1432:(e,t,a)=>{"use strict";a.d(t,{Z:()=>l});var n=a(4743),c=a(9818),r=a(7057);const l={FETCH_AUTHORIZATION_URL:({redirectUri:e})=>n.ZP.fetchAuthorizationUrl(e),REGISTER_SITE:({registrationNonce:e,redirectUri:t})=>n.ZP.registerSite(e,t),CONNECT_USER:(0,c.createRegistryControl)((({resolveSelect:e})=>({from:t,redirectFunc:a,redirectUri:n}={})=>new Promise(((c,l)=>{e(r.Z).getAuthorizationUrl(n).then((e=>{const n=a||(e=>window.location.assign(e)),r=new URL(e);t&&r.searchParams.set("from",encodeURIComponent(t));const l=r.toString();n(l),c(l)})).catch((e=>{l(e)}))}))))}},1479:(e,t,a)=>{"use strict";a.d(t,{Z:()=>r});var n=a(9818),c=a(7523);const r=(0,n.combineReducers)({connectionStatus:(e={},t)=>{switch(t.type){case c.i6:return{...e,...t.connectionStatus};case c.Qo:return{...e,isUserConnected:!1}}return e},connectionStatusIsFetching:(e=!1,t)=>t.type===c.LI?t.isFetching:e,siteIsRegistering:(e=!1,t)=>t.type===c.r7?t.isRegistering:e,userIsConnecting:(e=!1,t)=>t.type===c.N4?t.isConnecting:e,registrationError:(e,t)=>{switch(t.type){case c.T1:return!1;case c.qV:return t.registrationError;default:return e}},authorizationUrl:(e,t)=>t.type===c.TS?t.authorizationUrl:e,userConnectionData:(e,t)=>(t.type,e),connectedPlugins:(e={},t)=>t.type===c.wQ?t.connectedPlugins:e,connectionErrors:(e={},t)=>t.type===c.b5?t.connectionErrors:e,isOfflineMode:(e=!1,t)=>t.type===c.qJ?t.isConnecting:e})},7728:(e,t,a)=>{"use strict";a.d(t,{Z:()=>l});var n=a(9818),c=a(7523),r=a(7057);const l={...{getAuthorizationUrl:{isFulfilled:(e,...t)=>{const a=Boolean(e.authorizationUrl),c=(0,n.select)(r.Z).hasFinishedResolution("getAuthorizationUrl",t);return a&&!c&&(0,n.dispatch)(r.Z).finishResolution("getAuthorizationUrl",t),a},*fulfill(e){const t=yield c.ZP.fetchAuthorizationUrl(e);yield c.ZP.setAuthorizationUrl(t.authorizeUrl)}}}}},2725:(e,t,a)=>{"use strict";a.d(t,{Z:()=>n});const n={...{getConnectionStatus:e=>e.connectionStatus||{},getConnectionStatusIsFetching:()=>!1,getSiteIsRegistering:e=>e.siteIsRegistering||!1,getUserIsConnecting:e=>e.userIsConnecting||!1,getRegistrationError:e=>e.registrationError||!1,getAuthorizationUrl:e=>e.authorizationUrl||!1,getUserConnectionData:e=>e.userConnectionData||!1,getConnectedPlugins:e=>e.connectedPlugins||[],getConnectionErrors:e=>e.connectionErrors||[],getIsOfflineMode:e=>e.isOfflineMode||!1,getWpcomUser:e=>e?.userConnectionData?.currentUser?.wpcomUser,getBlogId:e=>e?.userConnectionData?.currentUser?.blogId}}},3535:(e,t,a)=>{"use strict";a.d(t,{Z:()=>r});var n=a(9818);class c{static store=null;static mayBeInit(e,t){null===c.store&&(c.store=(0,n.createReduxStore)(e,t),(0,n.register)(c.store))}}const r=c},7057:(e,t,a)=>{"use strict";a.d(t,{Z:()=>n});const n="jetpack-connection"},428:(e,t,a)=>{"use strict";a.d(t,{t:()=>o.Z});var n=a(7523),c=a(1432),r=a(1479),l=a(7728),s=a(2725),i=a(3535),o=a(7057);const m=window.JP_CONNECTION_INITIAL_STATE;m||console.error("Jetpack Connection package: Initial state is missing. Check documentation to see how to use the Connection composer package to set up the initial state."),i.Z.mayBeInit(o.Z,{__experimentalUseThunks:!0,reducer:r.Z,actions:n.ZP,selectors:s.Z,resolvers:l.Z,controls:c.Z,initialState:m||{}})},1827:(e,t,a)=>{"use strict";a.d(t,{Z:()=>s});var n=a(6989),c=a.n(n),r=a(4769),l=a.n(r);const s={fetchWaf:()=>c()({path:"jetpack-protect/v1/waf",method:"GET"}).then(l()),toggleWaf:()=>c()({method:"POST",path:"jetpack-protect/v1/toggle-waf"}),updateWaf:e=>c()({method:"POST",path:"jetpack/v4/waf",data:e}),wafSeen:()=>c()({path:"jetpack-protect/v1/waf-seen",method:"POST"}),wafUpgradeSeen:()=>c()({path:"jetpack-protect/v1/waf-upgrade-seen",method:"POST"}),fetchOnboardingProgress:()=>c()({path:"jetpack-protect/v1/onboarding-progress",method:"GET"}),completeOnboardingSteps:e=>c()({path:"jetpack-protect/v1/onboarding-progress",method:"POST",data:{step_ids:e}})}},7267:(e,t,a)=>{"use strict";a.d(t,{Z:()=>C});var n=a(2674),c=a.n(n),r=a(9105),l=a(3363),s=a(8258),i=a(6989),o=a.n(i),m=a(9818),u=a(5736),d=a(6483),p=a(9196),h=a.n(p),g=a(3898),f=a(8963),v=a(4633),E=a(6402),k=a(8266),b=a(291),w=a(3324),y=a(3900),Z=a(2770);const __=u.__,C=({children:e})=>{(0,Z.Z)();const{isSeen:t}=(0,f.Z)(),a=(0,m.useSelect)((e=>e(v.t).getNotice())),{refreshPlan:n,startScanOptimistically:i,refreshStatus:u}=(0,m.useDispatch)(v.t),{adminUrl:C}=window.jetpackProtectInitialState||{},{run:_,isRegistered:R,hasCheckoutStarted:j}=(0,s.Z)({productSlug:g.o,redirectUrl:(0,d.addQueryArgs)(C,{checkPlan:!0}),siteProductAvailabilityHandler:async()=>o()({path:"jetpack-protect/v1/check-plan",method:"GET"}).then((e=>e)),useBlogIdSuffix:!0});return(0,p.useEffect)((()=>{(0,d.getQueryArg)(window.location.search,"checkPlan")&&(i(),setTimeout((()=>{n(),u(!0)}),5e3))}),[n,u,i]),!R||j?h().createElement(E.Z,{onScanAdd:_}):h().createElement(r.Z,{moduleName:__("Jetpack Protect","jetpack-protect"),header:h().createElement(k.Z,null)},a.message&&h().createElement(b.Z,c()({floating:!0,dismissable:!0},a)),h().createElement(l.Z,{horizontalSpacing:0},h().createElement(w.Z,{className:y.Z.navigation},h().createElement(w.O,{link:"/",label:__("Scan","jetpack-protect")}),h().createElement(w.O,{link:"/firewall",label:h().createElement(h().Fragment,null,__("Firewall","jetpack-protect"),!1===t&&h().createElement("span",{className:y.Z.badge},__("New","jetpack-protect")))}))),e)}},2770:(e,t,a)=>{"use strict";a.d(t,{Z:()=>s});var n=a(1294),c=a(9818),r=a(9196),l=a(4633);const s=()=>{const{isRegistered:e}=(0,n.Z)(),{refreshStatus:t}=(0,c.useDispatch)(l.t),a=(0,c.useSelect)((e=>e(l.t).getStatus()));(0,r.useEffect)((()=>{e&&!a.status&&t()}),[e])}},4948:(e,t,a)=>{"use strict";a.d(t,{Z:()=>s});var n=a(5609),c=a(9196),r=a.n(c),l=a(9993);function s({className:e,color:t="#D63638"}){return r().createElement("div",{className:l.Z.container},r().createElement(n.SVG,{className:e,width:"127",height:"136",viewBox:"0 0 127 136",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r().createElement(n.G,{filter:"url(#filter0_d_2716_19567)"},r().createElement(n.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M63.4061 36L86.8123 46.4057V61.9177C86.8123 75.141 78.1289 87.6611 65.8844 91.6107C64.2754 92.1298 62.5369 92.1297 60.9279 91.6107C48.6834 87.6611 40 75.141 40 61.9177V46.4057L63.4061 36Z",fill:t}),r().createElement(n.Rect,{x:"59.8953",y:"72.1666",width:"7.02184",height:"7",rx:"3.5",fill:"white"}),r().createElement(n.Path,{d:"M59.9619 51.0626C59.9258 50.4868 60.383 50 60.9599 50H65.8524C66.4293 50 66.8866 50.4868 66.8505 51.0626L65.8056 67.7292C65.7725 68.2562 65.3355 68.6667 64.8075 68.6667H62.0048C61.4769 68.6667 61.0398 68.2562 61.0068 67.7292L59.9619 51.0626Z",fill:"white"})),r().createElement("defs",null,r().createElement("filter",{id:"filter0_d_2716_19567",x:"0",y:"0",width:"126.812",height:"136",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},r().createElement("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),r().createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),r().createElement("feOffset",{dy:"4"}),r().createElement("feGaussianBlur",{stdDeviation:"20"}),r().createElement("feComposite",{in2:"hardAlpha",operator:"out"}),r().createElement("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.08 0"}),r().createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow_2716_19567"}),r().createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow_2716_19567",result:"shape"})))))}},9974:(e,t,a)=>{"use strict";a.d(t,{Z:()=>o});var n=a(5033),c=a(9818),r=a(5736),l=a(4633),s=a(9886),i=a(4424);const __=r.__,o=({children:e})=>{const{checkCredentials:t}=(0,c.useDispatch)(l.t),{credentials:a,credentialsIsFetching:r}=(0,c.useSelect)((e=>({credentials:e(l.t).getCredentials(),credentialsIsFetching:e(l.t).getCredentialsIsFetching()})));return a||r||t(),a?0===a.length?React.createElement(s.Z,null):e:React.createElement("div",{className:i.Z.loading},React.createElement(n.Z,{color:"black",style:{color:"black",marginTop:0,marginLeft:0}}),React.createElement("p",{className:i.Z.loading__message},__("Checking credentials…","jetpack-protect")))}},9886:(e,t,a)=>{"use strict";a.d(t,{Z:()=>d});var n=a(5106),c=a(526),r=a(6895),l=a(9818),s=a(5736),i=a(9196),o=a(4633),m=a(291),u=a(3064);const __=s.__,d=()=>{const{setModal:e}=(0,l.useDispatch)(o.t),{siteSuffix:t,blogID:a}=window.jetpackProtectInitialState,{checkCredentials:s}=(0,l.useDispatch)(o.t),d=(0,l.useSelect)((e=>e(o.t).getCredentials()));return(0,i.useEffect)((()=>{const e=setInterval((()=>{d&&0!==d.length||s()}),3e3);return()=>clearInterval(e)}),[s,d]),React.createElement(React.Fragment,null,React.createElement(n.ZP,{variant:"title-medium",mb:2},__("Site credentials needed","jetpack-protect")),React.createElement(m.Z,{type:"info",message:__("Before Jetpack Protect can auto-fix threats on your site, it needs your server credentials.","jetpack-protect")}),React.createElement(n.ZP,{mb:3},__("Your server credentials allow Jetpack Protect to access the server that’s powering your website. This information is securely saved and only used to perform fix threats detected on your site.","jetpack-protect")),React.createElement(n.ZP,{mb:3},__("Once you’ve entered server credentials, Jetpack Protect will be fixing the selected threats.","jetpack-protect")),React.createElement("div",{className:u.Z.footer},React.createElement(c.Z,{variant:"secondary",onClick:t=>{t.preventDefault(),e({type:null})}},__("Not now","jetpack-protect")),React.createElement(c.Z,{isExternalLink:!0,weight:"regular",href:(0,r.Z)("jetpack-settings-security-credentials",{site:a??t})},__("Enter server credentials","jetpack-protect"))))}},7127:(e,t,a)=>{"use strict";a.d(t,{C:()=>s});var n=a(7470),c=a(9196),r=a(9137);const l=e=>{const t=e.lastIndexOf("/");return t>-1?[e.slice(0,t),e.slice(t)]:["",e]},s=({diff:e})=>React.createElement("div",{className:r.Z["diff-viewer"]},(0,n.G)(e).map(((e,t)=>React.createElement(c.Fragment,{key:t},React.createElement("div",{key:`file-${t}`,className:r.Z["diff-viewer__filename"]},(({oldFileName:e,newFileName:t})=>{const a="a"===e[0]&&"/"===e[1]&&"b"===t[0]&&"/"===t[1],[n,s]=a?[e.slice(2),t.slice(2)]:[e,t];if(n===s){const[e,t]=l(n);return React.createElement(c.Fragment,null,e&&React.createElement("span",{className:r.Z["diff-viewer__path-prefix"]},e),React.createElement("span",{className:r.Z["diff-viewer__path"]},t))}const i=Math.max(n.length,s.length);for(let e=0,t=0;e{let a=0;return e.lines.map(((n,c)=>React.createElement("div",{key:`${t}-${c}`},"+"===n[0]?" ":e.oldStart+a++)))}))),React.createElement("div",{key:"right-numbers",className:r.Z["diff-viewer__line-numbers"]},e.hunks.map(((e,t)=>{let a=0;return e.lines.map(((n,c)=>React.createElement("div",{key:`${t}-${c}`},"-"===n[0]?" ":e.newStart+a++)))}))),React.createElement("div",{className:r.Z["diff-viewer__lines"]},e.hunks.map(((e,t)=>e.lines.map(((e,a)=>{const n=e.slice(1).replace(/^\s*$/," "),c=`${t}-${a}`;switch(e[0]){case" ":return React.createElement("div",{key:c},n);case"-":return React.createElement("del",{key:c},n);case"+":return React.createElement("ins",{key:c},n)}}))))))))))},8431:(e,t,a)=>{"use strict";a.d(t,{Z:()=>k});var n=a(5106),c=a(526),r=a(216),l=a(5609),s=a(9818),i=a(9307),o=a(5736),m=a(9196),u=a(3898),d=a(8963),p=a(4633),h=a(9909),g=a(3932);const __=o.__,f=()=>{const{setModal:e}=(0,s.useDispatch)(p.t);return React.createElement("div",{className:g.Z["standalone-mode-section"]},React.createElement(n.Dx,null,__("Standalone mode","jetpack-protect")),React.createElement(n.ZP,{mb:2},__("Learn how you can execute the firewall before WordPress initializes. This mode offers the most protection.","jetpack-protect")),React.createElement(c.Z,{variant:"link",isExternalLink:!0,weight:"regular",onClick:t=>{t.preventDefault(),e({type:"STANDALONE_MODE"})}},__("Learn more","jetpack-protect")))},v=()=>{const{config:e,isUpdating:t,toggleShareDebugData:a}=(0,d.Z)(),{jetpackWafShareDebugData:c}=e||{},{setNotice:r}=(0,s.useDispatch)(p.t),[o,h]=(0,m.useState)({jetpack_waf_share_debug_data:c}),f=(0,m.useCallback)((()=>{h({...o,jetpack_waf_share_debug_data:!o.jetpack_waf_share_debug_data}),a().then((()=>r({type:"success",duration:5e3,dismissable:!0,message:__("Changes saved.","jetpack-protect")}))).catch((()=>{r({type:"error",dismissable:!0,message:(0,i.createInterpolateElement)(__("An error ocurred. Please try again or contact support.","jetpack-protect"),{supportLink:React.createElement(l.ExternalLink,{href:u.K})})})}))}),[o,a,r]);return(0,m.useEffect)((()=>{h({jetpack_waf_share_debug_data:c})}),[c]),React.createElement("div",{className:g.Z["share-data-section"]},React.createElement(n.Dx,{mb:2},__(" Share detailed data with Jetpack","jetpack-protect")),React.createElement("div",{className:g.Z["footer-checkbox"]},React.createElement(l.CheckboxControl,{checked:Boolean(o.jetpack_waf_share_debug_data),onChange:f,disabled:t}),React.createElement(n.ZP,null,__("Allow Jetpack to collect detailed data from blocked requests to enhance firewall protection and accuracy.","jetpack-protect"))))},E=()=>{const{config:e,isUpdating:t,toggleShareData:a}=(0,d.Z)(),{jetpackWafShareData:c}=e||{},{setNotice:r}=(0,s.useDispatch)(p.t),[o,h]=(0,m.useState)({jetpack_waf_share_data:c}),f=(0,m.useCallback)((()=>{h({...o,jetpack_waf_share_data:!o.jetpack_waf_share_data}),a().then((()=>r({type:"success",duration:5e3,dismissable:!0,message:__("Changes saved.","jetpack-protect")}))).catch((()=>{r({type:"error",dismissable:!0,message:(0,i.createInterpolateElement)(__("An error ocurred. Please try again or contact support.","jetpack-protect"),{supportLink:React.createElement(l.ExternalLink,{href:u.K})})})}))}),[o,a,r]);return(0,m.useEffect)((()=>{h({jetpack_waf_share_data:c})}),[c]),React.createElement("div",{className:g.Z["share-data-section"]},React.createElement(n.Dx,{mb:2},__(" Share basic data with Jetpack","jetpack-protect")),React.createElement("div",{className:g.Z["footer-checkbox"]},React.createElement(l.CheckboxControl,{checked:Boolean(o.jetpack_waf_share_data),onChange:f,disabled:t}),React.createElement(n.ZP,null,__("Allow Jetpack to collect basic data from blocked requests to improve firewall protection and accuracy.","jetpack-protect"))))},k=()=>{const{isEnabled:e}=(0,d.Z)();return React.createElement(r.Z,null,React.createElement(h.Z,{main:React.createElement(f,null),secondary:e&&React.createElement(React.Fragment,null,React.createElement(E,null),React.createElement(v,null)),preserveSecondaryOnMobile:!0}))}},2651:(e,t,a)=>{"use strict";a.d(t,{Z:()=>R});var n=a(526),c=a(5106),r=a(216),l=a(3363),s=a(3846),i=a(3474),o=a(8258),m=a(5609),u=a(5736),d=a(1074),p=a(1646),h=a(9196),g=a.n(h),f=a(3898),v=a(6477),E=a(5773),k=a(8963),b=a(8452);const __=u.__,w=()=>{const{adminUrl:e}=window.jetpackProtectInitialState||{},t=e+"#/firewall",{config:{automaticRulesAvailable:a}}=(0,k.Z)(),{run:c}=(0,o.Z)({productSlug:f.o,redirectUrl:t,useBlogIdSuffix:!0}),{recordEventHandler:r}=(0,v.Z)(),l=r("jetpack_protect_waf_header_get_scan_link_click",c);return g().createElement(n.Z,{className:b.Z["upgrade-button"],onClick:l},a?__("Upgrade to update automatic security rules","jetpack-protect",0):__("Upgrade to enable automatic firewall protection","jetpack-protect"))},y=({children:e=__("The free version of the firewall does not receive updates to automatic security rules.","jetpack-protect")})=>{const[t,a]=(0,h.useState)(!1),n=(0,h.useCallback)((()=>{a(!0)}),[]),r=(0,h.useCallback)((()=>{a(!1)}),[]);return g().createElement("div",{className:b.Z["icon-popover"],onMouseLeave:r,onMouseEnter:n,onClick:n,onFocus:n,onBlur:r,role:"presentation"},g().createElement(d.Z,{icon:p.Z}),t&&g().createElement(m.Popover,{noArrow:!1,offset:5,inline:!0},g().createElement(c.ZP,{className:b.Z["popover-text"],variant:"body-small"},e)))},Z=({className:e,text:t="",popover:a=!1,children:n})=>g().createElement("div",{className:b.Z["firewall-subheading__content"]},g().createElement(c.ZP,{className:b.Z[e],weight:600},t),a&&g().createElement(y,{children:n})),C=({hasRequiredPlan:e,automaticRulesAvailable:t,jetpackWafIpList:a,jetpackWafAutomaticRules:n,bruteForceProtectionIsEnabled:c,wafSupported:r})=>{const l=r&&n&&a,s=r&&n&&!a,i=r&&!n&&a,o=r&&!n&&!a;return g().createElement(g().Fragment,null,g().createElement("div",{className:b.Z["firewall-subheading"]},r&&c&&g().createElement(Z,{className:"brute-force-protection-subheading",text:__("Brute force protection is active.","jetpack-protect")}),o&&g().createElement(Z,{text:__("There are no firewall rules applied.","jetpack-protect")}),s&&g().createElement(Z,{text:__("Automatic firewall protection is enabled.","jetpack-protect"),popover:!e}),i&&g().createElement(Z,{text:__("Only manual IP list rules apply.","jetpack-protect"),popover:!e&&!t,children:__("The free version of the firewall only allows for use of manual rules.","jetpack-protect")}),l&&g().createElement(Z,{text:__("All firewall rules apply.","jetpack-protect"),popover:!e})),!e&&g().createElement(w,null))},_=({status:e,hasRequiredPlan:t,automaticRulesEnabled:a,automaticRulesAvailable:n,jetpackWafIpList:o,jetpackWafAutomaticRules:u,bruteForceProtectionIsEnabled:d,wafSupported:p,standaloneMode:h})=>g().createElement(r.Z,null,g().createElement(l.Z,{className:b.Z["firewall-header"],horizontalSpacing:7,horizontalGap:0},g().createElement(s.Z,null,"on"===e&&g().createElement(g().Fragment,null,g().createElement(i.Z,{status:"active",label:h?__("Standalone mode","jetpack-protect"):__("Active","jetpack-protect",0)})," ",g().createElement(c.H3,{className:b.Z["firewall-heading"],mb:1,mt:2},!p&&__("Brute force protection is active","jetpack-protect"),p&&(a?__("Automatic firewall is on","jetpack-protect"):__("Firewall is on","jetpack-protect",0))),g().createElement(C,{jetpackWafIpList:o,jetpackWafAutomaticRules:u,bruteForceProtectionIsEnabled:d,hasRequiredPlan:t,automaticRulesAvailable:n,wafSupported:p})),"off"===e&&g().createElement(g().Fragment,null,g().createElement(i.Z,{status:"inactive",label:__("Inactive","jetpack-protect")}),g().createElement(c.H3,{className:b.Z["firewall-heading"],mb:1,mt:2},!p&&__("Brute force protection is disabled","jetpack-protect"),p&&(n?__("Automatic firewall is off","jetpack-protect"):__("Firewall is off","jetpack-protect",0))),g().createElement(C,{jetpackWafIpList:o,jetpackWafAutomaticRules:u,bruteForceProtectionIsEnabled:d,hasRequiredPlan:t,automaticRulesAvailable:n,wafSupported:p})),"loading"===e&&g().createElement(g().Fragment,null,g().createElement(m.Spinner,{className:b.Z.spinner}),g().createElement(c.H3,{className:b.Z["firewall-heading"],mb:2,mt:2},__("Automatic firewall is being set up","jetpack-protect")),g().createElement(c.ZP,{className:b.Z["loading-text"],weight:600},__("Please wait…","jetpack-protect")))),g().createElement(s.Z,null,g().createElement("div",{className:b.Z["stat-card-wrapper"]})))),R=()=>{const{config:{jetpackWafAutomaticRules:e,jetpackWafIpList:t,standaloneMode:a,automaticRulesAvailable:n,bruteForceProtection:c},isToggling:r,wafSupported:l,isEnabled:s}=(0,k.Z)(),{hasRequiredPlan:i}=(0,E.Z)(),o=(l?s:c)?"on":"off";return g().createElement(_,{status:r?"loading":o,hasRequiredPlan:i,automaticRulesEnabled:e,automaticRulesAvailable:n,jetpackWafIpList:t,jetpackWafAutomaticRules:e,bruteForceProtectionIsEnabled:c,wafSupported:l,standaloneMode:a})}},5975:(e,t,a)=>{"use strict";a.d(t,{Z:()=>A});var n=a(2054),c=a(1342),r=a(5106),l=a(526),s=a(857),i=a(3363),o=a(3846),m=a(8258),u=a(5609),d=a(9818),p=a(9307),h=a(5736),g=a(1074),f=a(6163),v=a(3259),E=a(6292),k=a.n(E),b=a(9196),w=a(1827),y=a(3898),Z=a(6477),C=a(5773),_=a(8963),R=a(4633),j=a(7267),S=a(8431),N=a(2651),P=a(5678),x=a(5800),z=a(9265),M=a(4854);const __=h.__,_n=h._n,L=window?.jetpackProtectInitialState?.adminUrl,I=5e3,A=()=>{const[e]=(0,n.Z)(["sm","lg"],[null,"<"]),{setWafIsSeen:t,setWafUpgradeIsSeen:a,setNotice:E}=(0,d.useDispatch)(R.t),{config:{jetpackWafAutomaticRules:A,jetpackWafIpList:T,jetpackWafIpBlockList:O,jetpackWafIpAllowList:V,automaticRulesAvailable:F,bruteForceProtection:H},currentIp:D,isEnabled:U,isSeen:B,upgradeIsSeen:W,displayUpgradeBadge:J,wafSupported:G,isUpdating:$,stats:{ipAllowListCount:q,ipBlockListCount:K,automaticRulesLastUpdated:X},toggleAutomaticRules:Q,toggleManualRules:Y,toggleBruteForceProtection:ee,toggleWaf:te,updateConfig:ae}=(0,_.Z)(),{hasRequiredPlan:ne}=(0,C.Z)(),{run:ce}=(0,m.Z)({productSlug:y.o,redirectUrl:`${L}#/firewall`,useBlogIdSuffix:!0}),{recordEventHandler:re,recordEvent:le}=(0,Z.Z)(),se=U&&(ne||F),[ie,oe]=(0,b.useState)(!1),[me,ue]=(0,b.useState)({jetpack_waf_automatic_rules:A,jetpack_waf_ip_list:T,jetpack_waf_ip_block_list:O,jetpack_waf_ip_allow_list:V,brute_force_protection:H}),[de,pe]=(0,b.useState)(!1),[he,ge]=(0,b.useState)(!1),fe=(0,b.useCallback)((e=>{switch(e.code){case"file_system_error":return __("A filesystem error occurred.","jetpack-protect");case"rules_api_error":return __("An error occurred retrieving the latest firewall rules from Jetpack.","jetpack-protect");default:return!1}}),[]),ve=(0,b.useCallback)((e=>{const t=fe(e)||__("An error occurred.","jetpack-protect"),a=(0,p.createInterpolateElement)(__("Please try again or contact support.","jetpack-protect"),{supportLink:React.createElement(u.ExternalLink,{href:y.K})});E({type:"error",message:React.createElement(React.Fragment,null,t," ",a)})}),[fe,E]),Ee=re("jetpack_protect_waf_page_get_scan_link_click",ce),ke=(0,b.useCallback)((()=>{pe(!0),ae(me).then((()=>E({type:"success",duration:I,message:__("Changes saved.","jetpack-protect")}))).catch(ve).finally((()=>pe(!1)))}),[ae,me,ve,E]),be=(0,b.useCallback)((e=>{const{value:t,id:a}=e.target;ue({...me,[a]:t})}),[me]),we=(0,b.useCallback)((()=>{pe(!0);const e=!me.jetpack_waf_automatic_rules;ue({...me,jetpack_waf_automatic_rules:e}),Q().then((()=>{oe(!1),E({type:"success",duration:I,message:e?__("Automatic firewall protection is enabled.","jetpack-protect"):__("Automatic firewall protection is disabled.","jetpack-protect",0)}),le(e?"jetpack_protect_automatic_rules_enabled":"jetpack_protect_automatic_rules_disabled")})).then((()=>{W||(a(!0),w.Z.wafUpgradeSeen())})).catch((e=>{oe(!0),ve(e)})).finally((()=>pe(!1)))}),[me,Q,E,le,W,a,ve]),ye=(0,b.useCallback)((()=>{pe(!0);const e=!me.brute_force_protection;ue({...me,brute_force_protection:e}),ee().then((()=>{E({type:"success",duration:I,message:e?__("Brute force protection is enabled.","jetpack-protect"):__("Brute force protection is disabled.","jetpack-protect",0)}),le(e?"jetpack_protect_brute_force_protection_enabled":"jetpack_protect_brute_force_protection_disabled")})).catch(ve).finally((()=>pe(!1)))}),[me,ee,ve,E,le]),Ze=(0,b.useCallback)((()=>{const e=!me.jetpack_waf_ip_list;pe(!0),ue({...me,jetpack_waf_ip_list:e}),Y().then((()=>{E({type:"success",duration:I,message:e?__("Manual rules are active.","jetpack-protect"):__("Manual rules are disabled.","jetpack-protect",0)}),le(e?"jetpack_protect_manual_rules_enabled":"jetpack_protect_manual_rules_disabled")})).catch(ve).finally((()=>pe(!1)))}),[me,Y,ve,E,le]),Ce=(0,b.useCallback)((()=>{ge(!he)}),[he,ge]),_e=(0,b.useCallback)((()=>{a(!0),w.Z.wafUpgradeSeen()}),[a]),Re=(0,b.useMemo)((()=>me.jetpack_waf_ip_allow_list.includes(D)),[me.jetpack_waf_ip_allow_list,D]),je=(0,b.useCallback)((()=>{const e=me.jetpack_waf_ip_allow_list.length>0?`${me.jetpack_waf_ip_allow_list}\n${D}`:D;ue((t=>({...t,jetpack_waf_ip_allow_list:e})))}),[me.jetpack_waf_ip_allow_list,D]);(0,b.useEffect)((()=>{$||ue({jetpack_waf_automatic_rules:A,jetpack_waf_ip_list:T,jetpack_waf_ip_block_list:O,jetpack_waf_ip_allow_list:V,brute_force_protection:H})}),[T,O,V,A,H,$]),(0,b.useEffect)((()=>{B||(t(!0),w.Z.wafSeen())}),[B,t]),(0,Z.Z)({pageViewEventName:"protect_waf",pageViewEventProperties:{has_plan:ne}});const Se=React.createElement(c.Z,{level:"error",title:"Jetpack Firewall is currently disabled.",children:React.createElement(r.ZP,null,__("Re-enable the Firewall to continue.","jetpack-protect")),actions:[React.createElement(l.Z,{variant:"link",onClick:te,isLoading:$,disabled:$},__("Enable Firewall","jetpack-protect"))],hideCloseButton:!0}),Ne=React.createElement(React.Fragment,null,React.createElement("div",{className:`${M.Z["toggle-section"]} ${se?"":M.Z["toggle-section--disabled"]}`},React.createElement("div",{className:M.Z["toggle-section__control"]},React.createElement(P.Z,{checked:!!se&&me.jetpack_waf_automatic_rules,onChange:we,disabled:!U||de||!se}),ne&&!1===W&&React.createElement(u.Popover,{noArrow:!1,offset:8,position:"top right",inline:!0},React.createElement("div",{className:M.Z.popover},React.createElement("div",{className:M.Z.popover__header},React.createElement(r.ZP,{className:M.Z.popover__title,variant:"title-small"},__("Thanks for upgrading!","jetpack-protect")),React.createElement(l.Z,{className:M.Z.popover__button,variant:"icon"},React.createElement(g.Z,{onClick:_e,icon:f.Z,size:24,"aria-label":__("Close Window","jetpack-protect")}))),React.createElement(r.ZP,{className:M.Z.popover__description,variant:"body",mt:2,mb:3},__("Turn on Jetpack Firewall to automatically protect your site with the latest security rules.","jetpack-protect")),React.createElement("div",{className:M.Z.popover__footer},React.createElement(l.Z,{onClick:_e},__("Got it","jetpack-protect")))))),React.createElement("div",{className:M.Z["toggle-section__content"]},React.createElement("div",{className:M.Z["toggle-section__title"]},React.createElement(r.ZP,{variant:"title-medium",mb:2},__("Enable automatic firewall protection","jetpack-protect")),!e&&ne&&J&&React.createElement("span",{className:M.Z.badge},__("NOW AVAILABLE","jetpack-protect"))),React.createElement(r.ZP,null,__("Block untrusted traffic sources by scanning every request made to your site. Jetpack’s advanced security rules are automatically kept up-to-date to protect your site from the latest threats.","jetpack-protect")),React.createElement("div",{className:M.Z["toggle-section__details"]},A&&X&&!ie&&React.createElement("div",{className:M.Z["automatic-rules-stats"]},React.createElement(r.ZP,{className:M.Z["automatic-rules-stats__version"],variant:"body-small"},__("Automatic security rules installed.","jetpack-protect")),React.createElement(r.ZP,{className:M.Z["automatic-rules-stats__last-updated"],variant:"body-small"},(0,h.sprintf)( -// translators: placeholder is the date latest rules were updated i.e. "September 23, 2022". -__("Last updated on %s.","jetpack-protect"),k().unix(X).format("MMMM D, YYYY")))),ie&&React.createElement(React.Fragment,null,React.createElement(r.ZP,{className:M.Z["automatic-rules-stats__failed-install"],variant:"body-small",mt:2},__("Failed to update automatic firewall rules.","jetpack-protect")," ",fe(ie)),React.createElement(l.Z,{variant:"link",href:y.K},React.createElement(r.ZP,{variant:"body-small"},__("Contact support","jetpack-protect"))))))),!ne&&React.createElement("div",{className:M.Z["upgrade-trigger-section"]},React.createElement(s.Z,{className:M.Z["upgrade-trigger"],description:se?__("Your site is not receiving the latest updates to automatic rules","jetpack-protect",0):__("Set up automatic rules with one click","jetpack-protect"),cta:se?__("Upgrade to keep your site secure with up-to-date firewall rules","jetpack-protect",0):__("Upgrade to enable automatic firewall protection","jetpack-protect"),onClick:Ee}))),Pe=React.createElement(React.Fragment,null,React.createElement("div",{className:M.Z["brute-force-rules-section"]},React.createElement(z.Z,{id:"jetpack_waf_ip_allow_list",label:__("Always allowed IP addresses","jetpack-protect"),description:React.createElement(React.Fragment,null,React.createElement(r.ZP,{mb:1},__("IP addresses added to this list will never be blocked by Jetpack's brute force protection.","jetpack-protect")),React.createElement("div",{className:M.Z["current-ip-text"]},React.createElement(r.ZP,{variant:"body-small",mb:1},(0,p.createInterpolateElement)((0,h.sprintf)( -// translators: placeholder is the user's current IP address. -__("Your current IP: %s","jetpack-protect"),D),{strong:React.createElement("strong",null)})),React.createElement(l.Z,{variant:"secondary",size:"small",onClick:je,disabled:de||Re},__("+ Add to Allow List","jetpack-protect")))),placeholder:__("Example:","jetpack-protect")+"\n12.12.12.1\n12.12.12.2",rows:3,value:me.jetpack_waf_ip_allow_list,onChange:be,disabled:de})),React.createElement(l.Z,{onClick:ke,isLoading:de,disabled:de},__("Save changes","jetpack-protect"))),xe=React.createElement(React.Fragment,null,React.createElement("div",{className:M.Z["toggle-section"]},React.createElement("div",{className:M.Z["toggle-section__control"]},React.createElement(P.Z,{id:"brute_force_protection",checked:me.brute_force_protection,onChange:ye,disabled:de})),React.createElement("div",{className:M.Z["toggle-section__content"]},React.createElement(r.ZP,{variant:"title-medium",mb:2},__("Enable brute force protection","jetpack-protect")),React.createElement(r.ZP,null,__("Prevent bots and hackers from attempting to log in to your website with common username and password combinations.","jetpack-protect")))),!G&&me.brute_force_protection&&Pe),ze=React.createElement("div",{className:M.Z["toggle-wrapper"]},G&&Ne,xe,G&&React.createElement("div",{className:`${M.Z["toggle-section"]} ${H||U?"":M.Z["toggle-section--disabled"]}`},React.createElement("div",{className:M.Z["toggle-section__control"]},React.createElement(P.Z,{id:"jetpack_waf_ip_list",checked:(U||H)&&me.jetpack_waf_ip_list,onChange:Ze,disabled:de||!U&&!H})),React.createElement("div",{className:M.Z["toggle-section__content"]},React.createElement(r.ZP,{variant:"title-medium",mb:2},__("Enable manual block and allow lists","jetpack-protect")),React.createElement(r.ZP,null,__("Manually block or allow traffic from specific IP addresses.","jetpack-protect")),T&&React.createElement("div",{className:M.Z["toggle-section__details"]},React.createElement("div",{className:M.Z["manual-rules-stats"]},0===q&&0===K&&React.createElement(r.ZP,{className:M.Z["manual-rules-stats__no-rules"],variant:"body-small",mt:2},__("No manual rules are being applied.","jetpack-protect")),K>0&&React.createElement(r.ZP,{className:M.Z["manual-rules-stats__block-list-count"],variant:"body-small",mt:2},(0,h.sprintf)( -// translators: placeholder is a number of blocked IP addresses i.e. "5 IPs are being blocked". -_n("%s IP is being blocked. ","%s IPs are being blocked. ",K,"jetpack-protect"),1===K?"One":K)),q>0&&React.createElement(r.ZP,{className:M.Z["manual-rules-stats__allow-list-count"],variant:"body-small",mt:2},(0,h.sprintf)( -// translators: placeholder is a number of allowed IP addresses i.e. "5 IPs are being allowed". -_n("%s IP is being allowed.","%s IPs are being allowed.",q,"jetpack-protect"),1===q?"One":q))),React.createElement(l.Z,{variant:"link",disabled:!U&&!H},React.createElement(r.ZP,{variant:"body-small",onClick:Ce},__("Edit manual rules","jetpack-protect"))))))),Me=React.createElement("div",null,React.createElement(l.Z,{className:M.Z["go-back-button"],variant:"icon",icon:v.Z,onClick:Ce},React.createElement(r.ZP,null,__("Go back","jetpack-protect"))),React.createElement(r.ZP,{variant:"title-medium",mt:4,mb:2},__("Manual rules","jetpack-protect")),React.createElement(r.ZP,{mb:4},__("Add manual rules for what IP traffic the Jetpack Firewall and brute force protection should block or allow.","jetpack-protect")),G&&React.createElement("div",{className:M.Z["manual-rules-section"]},React.createElement(z.Z,{id:"jetpack_waf_ip_block_list",label:__("Blocked IP addresses","jetpack-protect"),placeholder:__("Example:","jetpack-protect")+"\n12.12.12.1\n12.12.12.2",rows:3,value:me.jetpack_waf_ip_block_list,onChange:be,disabled:de})),React.createElement("div",{className:M.Z["manual-rules-section"]},React.createElement(z.Z,{id:"jetpack_waf_ip_allow_list",label:__("Always allowed IP addresses","jetpack-protect"),description:React.createElement("div",{className:M.Z["current-ip-text"]},React.createElement(r.ZP,{variant:"body-small",mb:1},(0,p.createInterpolateElement)((0,h.sprintf)( -// translators: placeholder is the user's current IP address. -__("Your current IP: %s","jetpack-protect"),D),{strong:React.createElement("strong",null)})),React.createElement(l.Z,{variant:"secondary",size:"small",onClick:je,disabled:de||Re},__("+ Add to Allow List","jetpack-protect"))),placeholder:__("Example:","jetpack-protect")+"\n12.12.12.1\n12.12.12.2",rows:3,value:me.jetpack_waf_ip_allow_list,onChange:be,disabled:de})),React.createElement(l.Z,{onClick:ke,isLoading:de,disabled:de},__("Save changes","jetpack-protect")));return React.createElement(j.Z,null,React.createElement(N.Z,null),React.createElement(i.Z,{className:M.Z.container,horizontalSpacing:8,horizontalGap:4},G&&!U&&React.createElement(o.Z,null,Se," "),React.createElement(o.Z,null,he?Me:ze)),G?React.createElement(S.Z,null):React.createElement(x.Z,null))}},8840:(e,t,a)=>{"use strict";a.d(t,{Z:()=>p});var n=a(5106),c=a(526),r=a(9818),l=a(5736),s=a(9196),i=a(4633),o=a(9974),m=a(8891),u=a(2854),d=a(5823);const __=l.__,p=({threatList:e=[]})=>{const{setModal:t,fixThreats:a}=(0,r.useDispatch)(i.t),{threatsUpdating:l}=(0,r.useSelect)((e=>e(i.t).getThreatsUpdating())),[p,h]=(0,s.useState)(e.map((({id:e})=>e))),g=(0,s.useCallback)(((e,t)=>{h(e?p.push(t.id):p.filter((e=>e!==t.id)))}),[p]);return React.createElement(u.Z,null,React.createElement(o.Z,null,React.createElement(n.ZP,{variant:"title-medium",mb:2},__("Fix all threats","jetpack-protect")),React.createElement(n.ZP,{mb:3},__("Jetpack will be fixing the selected threats:","jetpack-protect")),React.createElement("div",{className:d.Z.list},e.map((e=>React.createElement(m.Z,{key:e.id,threat:e,fixAllDialog:!0,onCheckFix:g})))),React.createElement("div",{className:d.Z.footer},React.createElement(c.Z,{variant:"secondary",onClick:e=>{e.preventDefault(),t({type:null})}},__("Cancel","jetpack-protect")),React.createElement(c.Z,{isLoading:Boolean(l)&&l[p[0]],onClick:async e=>{e.preventDefault(),a(p,(()=>{t({type:null})}))}},__("Fix all threats","jetpack-protect")))))}},1593:(e,t,a)=>{"use strict";a.d(t,{Z:()=>d});var n=a(5106),c=a(526),r=a(9818),l=a(5736),s=a(4633),i=a(9974),o=a(8891),m=a(2854),u=a(7279);const __=l.__,d=({id:e,fixable:t,label:a,icon:l,severity:d})=>{const{setModal:p,fixThreats:h}=(0,r.useDispatch)(s.t),g=(0,r.useSelect)((e=>e(s.t).getThreatsUpdating()));return React.createElement(m.Z,null,React.createElement(i.Z,null,React.createElement(n.ZP,{variant:"title-medium",mb:2},__("Fix Threat","jetpack-protect")),React.createElement(n.ZP,{mb:3},__("Jetpack will be fixing the selected threat:","jetpack-protect")),React.createElement("div",{className:u.Z.list},React.createElement(o.Z,{threat:{id:e,fixable:t,label:a,icon:l,severity:d},fixAllDialog:!1})),React.createElement("div",{className:u.Z.footer},React.createElement(c.Z,{variant:"secondary",onClick:e=>{e.preventDefault(),p({type:null})}},__("Cancel","jetpack-protect")),React.createElement(c.Z,{isLoading:Boolean(g&&g[e]),onClick:async t=>{t.preventDefault(),h([e],(()=>{p({type:null})}))}},__("Fix threat","jetpack-protect")))))}},5678:(e,t,a)=>{"use strict";a.d(t,{Z:()=>r});var n=a(9196),c=a(1234);const r=({ariaLabel:e,checked:t=!1,className:a="",disabled:r=!1,id:l,onChange:s=(()=>{}),onKeyDown:i=(()=>{}),switchClassNames:o="",toggling:m})=>{const u=(0,n.useCallback)((e=>{r||s(e)}),[r,s]),d=(0,n.useCallback)((e=>{r||("Enter"!==e.key&&" "!==e.key||(e.preventDefault(),s(e)),i(e))}),[r,s,i]);return React.createElement(React.Fragment,null,React.createElement("div",null,React.createElement("input",{className:`${c.Z["form-toggle"]} ${a} ${m?c.Z["is-toggling"]:""}`,type:"checkbox",checked:t,readOnly:!0,disabled:r}),React.createElement("span",{className:`${c.Z["form-toggle__switch"]} ${o}`,disabled:r,id:l,onClick:u,onKeyDown:d,role:"checkbox","aria-checked":t,"aria-label":e,tabIndex:r?-1:0})))}},3584:(e,t,a)=>{"use strict";a.d(t,{U:()=>p,Z:()=>h});var n=a(5106),c=a(1074),r=a(7489),l=a(2229),s=a(5235),i=a.n(s),o=a(9196),m=a.n(o),u=a(9122);const d=m().createContext(),p=({id:e,title:t,label:a,icon:s,children:p,onOpen:h})=>{const g=(0,o.useContext)(d),f=g?.open===e,v=g?.setOpen,E=i()(u.Z["accordion-body"],{[u.Z["accordion-body-open"]]:f,[u.Z["accordion-body-close"]]:!f}),k=(0,o.useCallback)((()=>{f||h?.(),v((t=>t===e?null:e))}),[f,h,v,e]);return m().createElement("div",{className:u.Z["accordion-item"]},m().createElement("button",{className:u.Z["accordion-header"],onClick:k},m().createElement("div",null,m().createElement(n.ZP,{className:u.Z["accordion-header-label"],mb:1},m().createElement(c.Z,{icon:s,className:u.Z["accordion-header-label-icon"]}),a),m().createElement(n.ZP,{className:u.Z["accordion-header-description"],variant:f?"title-small":"body"},t)),m().createElement("div",{className:u.Z["accordion-header-button"]},m().createElement(c.Z,{icon:f?r.Z:l.Z,size:38}))),m().createElement("div",{className:E,"aria-hidden":f?"false":"true"},p))},h=({children:e})=>{const[t,a]=(0,o.useState)();return m().createElement(d.Provider,{value:{open:t,setOpen:a}},m().createElement("div",{className:u.Z.accordion},e))}},3116:(e,t,a)=>{"use strict";a.d(t,{Z:()=>h});var n=a(6895),c=a(5106),r=a(526),l=a(9818),s=a(9307),i=a(5736),o=a(1074),m=a(4633),u=a(2251),d=a(2854),p=a(6983);const __=i.__,h=({id:e,title:t,label:a,icon:i,severity:h})=>{const{setModal:g,ignoreThreat:f}=(0,l.useDispatch)(m.t),v=(0,l.useSelect)((e=>e(m.t).getThreatsUpdating())),E=(0,n.Z)("jetpack-protect-codeable-referral");return React.createElement(d.Z,null,React.createElement(c.ZP,{variant:"title-medium",mb:2},__("Do you really want to ignore this threat?","jetpack-protect")),React.createElement(c.ZP,{mb:3},__("Jetpack will ignore the threat:","jetpack-protect")),React.createElement("div",{className:p.Z.threat},React.createElement(o.Z,{icon:i,className:p.Z.threat__icon}),React.createElement("div",{className:p.Z.threat__summary},React.createElement(c.ZP,{className:p.Z.threat__summary__label,mb:1},a),React.createElement(c.ZP,{className:p.Z.threat__summary__title},t)),React.createElement("div",{className:p.Z.threat__severity},React.createElement(u.Z,{severity:h}))),React.createElement(c.ZP,{mb:4},(0,s.createInterpolateElement)(__("By ignoring this threat you confirm that you have reviewed the detected code and assume the risks of keeping a potentially malicious or vulnerable file on your site. If you are unsure please request an estimate with Codeable.","jetpack-protect"),{codeableLink:React.createElement(r.Z,{variant:"link",isExternalLink:!0,href:E})})),React.createElement("div",{className:p.Z.footer},React.createElement(r.Z,{variant:"secondary",onClick:e=>{e.preventDefault(),g({type:null})}},__("Cancel","jetpack-protect")),React.createElement(r.Z,{isDestructive:!0,isLoading:Boolean(v&&v[e]),onClick:async t=>{t.preventDefault(),f(e,(()=>{g({type:null})}))}},__("Ignore threat","jetpack-protect"))))}},6402:(e,t,a)=>{"use strict";a.d(t,{Z:()=>f});var n=a(9105),c=a(5106),r=a(216),l=a(3363),s=a(3846),i=a(9307),o=a(5736),m=a(9196),u=a.n(m),d=a(6477),p=a(8266),h=a(9401),g=a(2951);const __=o.__,f=({onScanAdd:e})=>((0,d.Z)({pageViewEventName:"protect_interstitial"}),u().createElement(n.Z,{moduleName:__("Jetpack Protect","jetpack-protect"),header:u().createElement("div",{className:g.Z["protect-header"]},u().createElement(p.Z,null),u().createElement(c.ZP,{variant:"body-small"},(0,i.createInterpolateElement)(__("Already have an existing plan or license key? Click here to get started","jetpack-protect"),{a:u().createElement("a",{href:"admin.php?page=my-jetpack#/add-license"})})))},u().createElement(r.Z,null,u().createElement(l.Z,{horizontalSpacing:3,horizontalGap:3},u().createElement(s.Z,{sm:4,md:8,lg:12},u().createElement(h.Z,{onScanAdd:e}))))))},8266:(e,t,a)=>{"use strict";a.d(t,{Z:()=>l});var n=a(5609),c=a(9196),r=a.n(c);function l({iconColor:e="#069E08",color:t="#000"}){return r().createElement(n.SVG,{fillRule:"evenodd",clipRule:"evenodd",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 245 41",width:245},r().createElement(n.Path,{d:"M159.347 27.3605H156.978V7.9082H162.371C163.176 7.9082 163.917 7.95666 164.596 8.05359C165.284 8.15051 165.914 8.30074 166.486 8.50428C167.649 8.92104 168.531 9.54619 169.132 10.3797C169.733 11.2036 170.033 12.2213 170.033 13.4328C170.033 14.4214 169.834 15.2937 169.437 16.0497C169.049 16.796 168.482 17.4211 167.736 17.9251C166.99 18.4291 166.079 18.812 165.003 19.0737C163.937 19.3257 162.725 19.4517 161.368 19.4517C160.719 19.4517 160.045 19.4226 159.347 19.3644V27.3605ZM159.347 17.1982C159.667 17.237 160.002 17.2661 160.35 17.2854C160.699 17.3048 161.029 17.3145 161.339 17.3145C162.454 17.3145 163.403 17.2273 164.189 17.0528C164.974 16.8784 165.613 16.6264 166.108 16.2968C166.602 15.9576 166.961 15.5505 167.183 15.0756C167.406 14.591 167.518 14.0434 167.518 13.4328C167.518 12.6768 167.334 12.0565 166.965 11.5719C166.607 11.0873 166.093 10.719 165.424 10.467C165.008 10.3119 164.528 10.2053 163.985 10.1471C163.442 10.0793 162.812 10.0453 162.095 10.0453H159.347V17.1982Z",fill:t}),r().createElement(n.Path,{d:"M181.093 15.3809H180.919C180.386 15.3809 179.862 15.4294 179.349 15.5263C178.835 15.6232 178.35 15.7735 177.895 15.977C177.449 16.1708 177.042 16.4131 176.674 16.7039C176.315 16.9947 176.014 17.3388 175.772 17.7361V27.3605H173.519V13.5491H175.263L175.699 15.7444H175.743C175.966 15.3858 176.237 15.0514 176.557 14.7412C176.887 14.4311 177.255 14.1597 177.662 13.9271C178.069 13.6945 178.515 13.5152 179 13.3892C179.484 13.2535 179.993 13.1856 180.526 13.1856C180.623 13.1856 180.72 13.1905 180.817 13.2002C180.924 13.2002 181.016 13.205 181.093 13.2147V15.3809Z",fill:t}),r().createElement(n.Path,{d:"M193.302 20.4694C193.302 19.6164 193.195 18.8604 192.982 18.2014C192.779 17.5326 192.488 16.9705 192.11 16.5149C191.741 16.0497 191.3 15.7008 190.787 15.4682C190.273 15.2258 189.711 15.1047 189.1 15.1047C188.49 15.1047 187.928 15.2258 187.414 15.4682C186.9 15.7008 186.454 16.0497 186.076 16.5149C185.708 16.9705 185.417 17.5326 185.204 18.2014C185.001 18.8604 184.899 19.6164 184.899 20.4694C184.899 21.3126 185.001 22.0686 185.204 22.7373C185.417 23.3964 185.713 23.9537 186.091 24.4092C186.469 24.8648 186.915 25.2137 187.428 25.456C187.942 25.6886 188.504 25.8049 189.115 25.8049C189.725 25.8049 190.283 25.6886 190.787 25.456C191.3 25.2137 191.741 24.8648 192.11 24.4092C192.488 23.9537 192.779 23.3964 192.982 22.7373C193.195 22.0686 193.302 21.3126 193.302 20.4694ZM195.657 20.4694C195.657 21.5549 195.502 22.5435 195.192 23.4352C194.882 24.3269 194.441 25.0926 193.869 25.7322C193.307 26.3622 192.623 26.8517 191.819 27.2006C191.015 27.5495 190.113 27.724 189.115 27.724C188.088 27.724 187.167 27.5495 186.353 27.2006C185.548 26.8517 184.86 26.3622 184.288 25.7322C183.726 25.0926 183.295 24.3269 182.994 23.4352C182.694 22.5435 182.544 21.5549 182.544 20.4694C182.544 19.3741 182.699 18.3807 183.009 17.489C183.319 16.5973 183.755 15.8316 184.317 15.1919C184.889 14.5522 185.577 14.0579 186.382 13.709C187.196 13.3601 188.102 13.1856 189.1 13.1856C190.118 13.1856 191.034 13.3601 191.848 13.709C192.662 14.0579 193.35 14.5522 193.913 15.1919C194.475 15.8316 194.906 16.5973 195.206 17.489C195.507 18.3807 195.657 19.3741 195.657 20.4694Z",fill:t}),r().createElement(n.Path,{d:"M206.354 27.3896C206.16 27.4672 205.864 27.5398 205.467 27.6077C205.07 27.6755 204.595 27.7143 204.042 27.724C203.315 27.724 202.685 27.6319 202.152 27.4478C201.619 27.2733 201.173 27.0213 200.815 26.6918C200.466 26.3525 200.204 25.9455 200.03 25.4705C199.855 24.9956 199.768 24.4674 199.768 23.8859V15.4827H197.107V13.5491H199.768V9.76911H202.021V13.5491H206.15V15.4827H202.021V23.5369C202.021 23.8568 202.065 24.1524 202.152 24.4238C202.249 24.6952 202.395 24.9326 202.588 25.1362C202.792 25.33 203.049 25.4851 203.359 25.6014C203.669 25.708 204.042 25.7613 204.478 25.7613C204.779 25.7613 205.094 25.7371 205.423 25.6886C205.763 25.6402 206.073 25.5772 206.354 25.4996V27.3896Z",fill:t}),r().createElement(n.Path,{d:"M214.681 15.1192C214.167 15.1192 213.687 15.221 213.242 15.4245C212.805 15.6281 212.423 15.9043 212.093 16.2532C211.764 16.6021 211.497 17.0141 211.293 17.489C211.09 17.9542 210.964 18.4534 210.915 18.9864H217.894C217.894 18.4437 217.821 17.9397 217.676 17.4744C217.54 16.9995 217.337 16.5876 217.065 16.2387C216.794 15.8898 216.459 15.6184 216.062 15.4245C215.665 15.221 215.204 15.1192 214.681 15.1192ZM215.917 25.7613C216.663 25.7613 217.341 25.7032 217.952 25.5869C218.572 25.4609 219.188 25.2864 219.798 25.0635V26.9389C219.304 27.1812 218.693 27.3702 217.967 27.5059C217.24 27.6513 216.459 27.724 215.626 27.724C214.637 27.724 213.707 27.598 212.835 27.346C211.972 27.094 211.216 26.6869 210.567 26.1248C209.917 25.5626 209.403 24.8309 209.025 23.9295C208.657 23.0184 208.473 21.9232 208.473 20.6438C208.473 19.3838 208.647 18.2934 208.996 17.3727C209.345 16.4422 209.811 15.6668 210.392 15.0465C210.974 14.4262 211.642 13.961 212.398 13.6509C213.154 13.3407 213.944 13.1856 214.768 13.1856C215.544 13.1856 216.266 13.3165 216.934 13.5782C217.613 13.8302 218.199 14.2324 218.693 14.7849C219.188 15.3373 219.575 16.0497 219.857 16.922C220.147 17.7943 220.293 18.8411 220.293 20.0623C220.293 20.1786 220.293 20.2804 220.293 20.3676C220.293 20.4451 220.288 20.6293 220.278 20.92H210.799C210.799 21.802 210.93 22.5532 211.192 23.1735C211.463 23.7841 211.827 24.2832 212.282 24.6709C212.747 25.0489 213.29 25.3252 213.91 25.4996C214.531 25.6741 215.199 25.7613 215.917 25.7613Z",fill:t}),r().createElement(n.Path,{d:"M229.885 13.1856C230.553 13.1856 231.193 13.2583 231.804 13.4037C232.414 13.5394 232.938 13.7332 233.374 13.9852V15.8607C232.763 15.6281 232.201 15.4536 231.687 15.3373C231.174 15.221 230.65 15.1628 230.117 15.1628C229.555 15.1628 228.998 15.2549 228.445 15.4391C227.893 15.6232 227.398 15.9285 226.962 16.355C226.526 16.7718 226.172 17.3291 225.901 18.0269C225.639 18.7151 225.508 19.5728 225.508 20.6002C225.508 21.3465 225.605 22.0346 225.799 22.6646C226.003 23.2946 226.298 23.8423 226.686 24.3075C227.083 24.763 227.578 25.1216 228.169 25.3833C228.76 25.6353 229.444 25.7613 230.219 25.7613C230.781 25.7613 231.348 25.7032 231.92 25.5869C232.492 25.4609 233.049 25.2864 233.592 25.0635V26.9389C233.427 27.0358 233.209 27.1328 232.938 27.2297C232.676 27.3266 232.385 27.409 232.065 27.4768C231.745 27.5544 231.406 27.6125 231.048 27.6513C230.689 27.6998 230.33 27.724 229.972 27.724C229.041 27.724 228.159 27.5835 227.326 27.3024C226.502 27.0213 225.78 26.59 225.16 26.0085C224.539 25.4269 224.05 24.6903 223.691 23.7986C223.333 22.907 223.153 21.8505 223.153 20.6293C223.153 19.7182 223.245 18.8992 223.429 18.1723C223.623 17.4454 223.885 16.8057 224.215 16.2532C224.544 15.7008 224.927 15.2307 225.363 14.843C225.809 14.4553 226.279 14.1403 226.773 13.898C227.277 13.646 227.796 13.4667 228.329 13.3601C228.862 13.2438 229.381 13.1856 229.885 13.1856Z",fill:t}),r().createElement(n.Path,{d:"M244.143 27.3896C243.949 27.4672 243.654 27.5398 243.256 27.6077C242.859 27.6755 242.384 27.7143 241.832 27.724C241.105 27.724 240.475 27.6319 239.942 27.4478C239.409 27.2733 238.963 27.0213 238.604 26.6918C238.255 26.3525 237.993 25.9455 237.819 25.4705C237.645 24.9956 237.557 24.4674 237.557 23.8859V15.4827H234.897V13.5491H237.557V9.76911H239.811V13.5491H243.94V15.4827H239.811V23.5369C239.811 23.8568 239.854 24.1524 239.942 24.4238C240.039 24.6952 240.184 24.9326 240.378 25.1362C240.581 25.33 240.838 25.4851 241.148 25.6014C241.458 25.708 241.832 25.7613 242.268 25.7613C242.568 25.7613 242.883 25.7371 243.213 25.6886C243.552 25.6402 243.862 25.5772 244.143 25.4996V27.3896Z",fill:t}),r().createElement(n.Path,{d:"M20.1063 40.2111C31.2106 40.2111 40.2126 31.2091 40.2126 20.1048C40.2126 9.00048 31.2106 0 20.1063 0C9.00197 0 0 9.00197 0 20.1063C0 31.2106 9.00197 40.2111 20.1063 40.2111Z",fill:e}),r().createElement(n.Path,{d:"M21.104 16.7295V36.2209L31.1571 16.7295H21.104Z",fill:"white"}),r().createElement(n.Path,{d:"M19.0701 23.4444V3.99023L9.05566 23.4444H19.0701Z",fill:"white"}),r().createElement(n.Path,{d:"M51.9141 33.3819C51.3379 32.499 50.8019 31.6176 50.2644 30.7733C53.1038 29.0462 54.0626 27.666 54.0626 25.0559V9.97619H50.7245V7.09961H57.8236V24.2891C57.8236 28.6635 56.558 31.1188 51.9141 33.3819Z",fill:t}),r().createElement(n.Path,{d:"M81.6522 23.0994C81.6522 24.557 82.6885 24.7104 83.3793 24.7104C84.0702 24.7104 85.0677 24.4796 85.8345 24.2503V26.9363C84.7595 27.2817 83.6473 27.5497 82.1122 27.5497C80.2705 27.5497 78.122 26.8589 78.122 23.6354V15.7307H76.1655V13.006H78.122V8.97852H81.6522V13.0075H86.1025V15.7322H81.6522V23.0994Z",fill:t}),r().createElement(n.Path,{d:"M89.0193 34.7251V12.9691H92.3961V14.2734C93.7391 13.2371 95.2355 12.585 97.0773 12.585C100.262 12.585 102.795 14.8109 102.795 19.6067C102.795 24.3652 100.033 27.5113 95.4663 27.5113C94.3541 27.5113 93.4711 27.358 92.5495 27.1659V34.6864H89.0193V34.7251ZM96.1557 15.5017C95.1194 15.5017 93.8151 16.0005 92.5867 17.0755V24.4814C93.3535 24.6347 94.1605 24.7494 95.234 24.7494C97.7279 24.7494 99.1484 23.1756 99.1484 19.8762C99.1484 16.8447 98.1121 15.5017 96.1557 15.5017Z",fill:t}),r().createElement(n.Path,{d:"M116.683 27.2051H113.384V25.6313H113.306C112.155 26.5142 110.735 27.4731 108.625 27.4731C106.783 27.4731 104.788 26.1301 104.788 23.4054C104.788 19.7605 107.896 19.0696 110.083 18.7629L113.19 18.3416V17.9202C113.19 16.001 112.423 15.3876 110.619 15.3876C109.736 15.3876 107.665 15.6556 105.976 16.3464L105.67 13.5071C107.205 12.9696 109.315 12.5869 111.08 12.5869C114.533 12.5869 116.759 13.9686 116.759 18.0736V27.2051H116.683ZM113.153 20.5675L110.236 21.0276C109.353 21.1422 108.433 21.6797 108.433 22.984C108.433 24.1349 109.085 24.7871 110.044 24.7871C111.08 24.7871 112.193 24.1736 113.152 23.4828V20.5675H113.153Z",fill:t}),r().createElement(n.Path,{d:"M131.264 26.745C129.806 27.2438 128.502 27.5505 126.851 27.5505C121.556 27.5505 119.445 24.5191 119.445 20.1074C119.445 15.465 122.362 12.5869 127.08 12.5869C128.845 12.5869 129.92 12.8936 131.109 13.2778V16.2705C130.073 15.8863 128.577 15.465 127.119 15.465C124.97 15.465 123.129 16.6159 123.129 19.9153C123.129 23.5602 124.97 24.6739 127.311 24.6739C128.423 24.6739 129.652 24.4431 131.301 23.791V26.745H131.264Z",fill:t}),r().createElement(n.Path,{d:"M137.941 19.1093C138.247 18.7639 138.478 18.4185 142.928 13.0077H147.532L141.776 19.7615L148.068 27.2432H143.464L137.978 20.4895V27.2432H134.449V7.09973H137.979V19.1093H137.941Z",fill:t}),r().createElement(n.Path,{d:"M73.5167 26.7445C71.6749 27.3207 70.1011 27.55 68.2593 27.55C63.7316 27.55 60.9309 25.2869 60.9309 19.9908C60.9309 16.1152 63.3102 12.585 67.8752 12.585C72.403 12.585 73.9768 15.731 73.9768 18.7238C73.9768 19.7213 73.8993 20.2588 73.8621 20.8335H64.7306C64.808 23.9409 66.5724 24.6705 69.2197 24.6705C70.6773 24.6705 71.9816 24.325 73.4795 23.7875V26.7416H73.5167V26.7445ZM70.2947 18.4945C70.2947 16.7673 69.7185 15.271 67.8395 15.271C66.0751 15.271 65.0001 16.5365 64.7693 18.4945H70.2947Z",fill:t}))}},4257:(e,t,a)=>{"use strict";a.d(t,{Z:()=>r});var n=a(8735);const c=e=>React.createElement("mark",{key:e,className:n.Z["marked-lines__mark"]},e),r=({context:e})=>{const{marks:t,...a}=e;return React.createElement("div",{className:n.Z["marked-lines"]},React.createElement("div",{className:n.Z["marked-lines__line-numbers"]},Object.keys(a).map((e=>{const a=t.hasOwnProperty(e);return React.createElement("div",{key:e,className:`${n.Z["marked-lines__line-number"]} ${a?n.Z["marked-lines__marked-line"]:""}`},e)}))),React.createElement("div",{className:n.Z["marked-lines__lines"]},Object.keys(a).map((e=>{const r=a[e]||" ",l=t.hasOwnProperty(e);return React.createElement("div",{key:e,className:`${n.Z["marked-lines__line"]} ${l?n.Z["marked-lines__marked-line"]:""} `},React.createElement(React.Fragment,null,l?((e,t)=>{const[a,n]=e.reduce((([e,a],[n,r])=>{const l=t.slice(n,r);return[[...e,...n>a?[t.slice(a,n),c(l)]:[c(l)]],r]}),[[],0]);return n{"use strict";a.d(t,{Z:()=>g});var n=a(9818),c=a(5736),r=a(1074),l=a(9517),s=a(4633),i=a(9886),o=a(8840),m=a(1593),u=a(3116),d=a(8959),p=a(9980);const __=c.__,h={IGNORE_THREAT:u.Z,FIX_THREAT:m.Z,FIX_ALL_THREATS:o.Z,CREDENTIALS_NEEDED:i.Z,STANDALONE_MODE:d.Z},g=()=>{const e=(0,n.useSelect)((e=>e(s.t).getModalType())),t=(0,n.useSelect)((e=>e(s.t).getModalProps())),{setModal:a}=(0,n.useDispatch)(s.t);if(!e)return null;const c=h[e];return React.createElement("div",{className:p.Z.modal},React.createElement("div",{className:p.Z.modal__window},React.createElement("button",{onClick:e=>{e.preventDefault(),a({type:null})},className:p.Z.modal__close,title:__("Close Modal Window","jetpack-protect")},React.createElement(r.Z,{icon:l.Z,size:24,className:p.Z.modal__close__icon,"aria-label":__("Close Modal Window","jetpack-protect")})),React.createElement(c,t)))}},5167:(e,t,a)=>{"use strict";a.d(t,{Z:()=>g});var n=a(5106),c=a(5609),r=a(5736),l=a(1074),s=a(496),i=a(9201),o=a(5162),m=a.n(o),u=a(9196),d=a.n(u),p=a(513);const __=r.__,h=({count:e,checked:t})=>{const{popoverText:a,badgeElement:r}=((e,t)=>t?0===e?{popoverText:__("No known threats found to affect this version","jetpack-protect"),badgeElement:d().createElement(l.Z,{icon:i.Z,size:28,className:p.Z["navigation-item-check-badge"]})}:{popoverText:null,badgeElement:d().createElement(n.ZP,{variant:"body-extra-small",className:p.Z["navigation-item-badge"],component:"div"},e)}:{popoverText:__("This item was added to your site after the most recent scan. We will check for threats during the next scheduled one.","jetpack-protect"),badgeElement:d().createElement(l.Z,{icon:s.Z,size:28,className:p.Z["navigation-item-info-badge"]})})(e,t),[o,m]=(0,u.useState)(!1),h=(0,u.useCallback)((()=>{m(!0)}),[]),g=(0,u.useCallback)((()=>{m(!1)}),[]);return d().createElement("div",{onMouseLeave:a?g:null,onMouseEnter:a?h:null,onClick:a?h:null,onFocus:a?h:null,onBlur:a?g:null,role:"presentation"},r,o&&d().createElement(c.Popover,{noArrow:!1,inline:!0},d().createElement(n.ZP,{variant:"body-small",className:p.Z["popover-text"]},a)))};h.propTypes={count:m().number,checked:m().bool};const g=h},2328:(e,t,a)=>{"use strict";a.d(t,{Z:()=>m});var n=a(526),c=a(5736),r=a(9196),l=a.n(r),s=a(2389),i=a(513),o=a(246);const __=c.__,m=({icon:e,label:t,children:a})=>{const[m,u]=(0,r.useState)(!0),{mode:d}=(0,r.useContext)(o.k),p=Array.isArray(a)&&a?.length>=8&&"list"===d,h=p&&m?a.slice(0,8):a,g=p?a?.length-8:0,f=(0,r.useCallback)((()=>{u((e=>!e))}),[]);return l().createElement("li",{tabIndex:-1,role:"menuitem",className:i.Z["navigation-group"]},l().createElement(s.Z,{icon:e,className:i.Z["navigation-group-label"]},t),l().createElement("div",{className:i.Z["navigation-group-list"]},l().createElement("ul",{className:i.Z["navigation-group-content"]},h),p&&l().createElement("div",{className:i.Z["navigation-group-truncate"]},l().createElement(n.Z,{variant:"link",onClick:f},m?(0,c.sprintf)(/* translators: %s: Number of hide items */ -__("Show %s more","jetpack-protect"),g):(0,c.sprintf)(/* translators: %s: Number of hide items */ -__("Hide %s items","jetpack-protect"),g)))))}},5338:(e,t,a)=>{"use strict";a.d(t,{Dx:()=>d.Z,KB:()=>u.Z,ZP:()=>v});var n=a(5106),c=a(5609),r=a(5736),l=a(1074),s=a(7489),i=a(2229),o=a(9196),m=a.n(o),u=a(2328),d=a(6119),p=a(513),h=a(246);const __=r.__,g=({children:e})=>m().createElement("ul",{className:p.Z.navigation,role:"menu"},e),f=({children:e,data:t})=>{const a=(0,o.useRef)(),[r,u]=(0,o.useState)(!1),d=t?.items?.find((e=>e?.id===t?.selectedItem))??{label:__("See all results","jetpack-protect")},{label:h,icon:g}=d,f=(0,o.useCallback)((()=>{u((e=>!e))}),[]);return m().createElement("button",{className:p.Z["navigation-dropdown-button"],onClick:f,ref:a},m().createElement("div",{className:p.Z["navigation-dropdown-label"]},g&&m().createElement(l.Z,{icon:g,className:p.Z["navigation-dropdown-icon"]}),m().createElement(n.ZP,null,h)),m().createElement(l.Z,{icon:r?s.Z:i.Z,size:32}),m().createElement(c.Popover,{position:"bottom center",anchorRef:a?.current,inline:!0},m().createElement("div",{style:{display:r?"block":"none",width:a?.current?.getBoundingClientRect?.()?.width}},e)))},v=({children:e,selected:t,onSelect:a,mode:n="list"})=>{const c=(0,h.Z)({selected:t,onSelect:a}),r=(e=>{switch(e){case"list":default:return g;case"dropdown":return f}})(n);return m().createElement(h.k.Provider,{value:{...c,mode:n}},m().createElement(r,{data:c},e))}},6119:(e,t,a)=>{"use strict";a.d(t,{Z:()=>u});var n=a(5235),c=a.n(n),r=a(9196),l=a.n(r),s=a(5167),i=a(2389),o=a(513),m=a(246);const u=({id:e,label:t,icon:a,badge:n,disabled:u,onClick:d,onKeyDown:p,onFocus:h,checked:g})=>{const f=(0,r.useContext)(m.k),v=f?.selectedItem===e,E=f?.registerItem,k=f?.registerRef,b=f?.handleClickItem,w=f?.handleKeyDownItem,y=f?.handleFocusItem,Z=c()(o.Z["navigation-item"],{[o.Z.clickable]:!u,[o.Z.selected]:v}),C=(0,r.useCallback)((t=>{d?.(t),b?.(e)}),[b,e,d]),_=(0,r.useCallback)((e=>{p?.(e),w?.(e)}),[w,p]),R=(0,r.useCallback)((t=>{k(t,e)}),[k,e]),j=(0,r.useCallback)((t=>{h?.(t),y?.(e)}),[y,e,h]);return(0,r.useEffect)((()=>{E({id:e,disabled:u,label:t,icon:a})}),[]),l().createElement("li",{className:Z,onClick:u?null:C,onKeyDown:_,onFocus:u?null:j,role:"menuitem",tabIndex:u?-1:0,ref:R},l().createElement(i.Z,{icon:a},t),l().createElement(s.Z,{count:n,checked:g}))}},2389:(e,t,a)=>{"use strict";a.d(t,{Z:()=>p});var n=a(5106),c=a(1074),r=a(5235),l=a.n(r),s=a(5162),i=a.n(s),o=a(9196),m=a.n(o),u=a(513);const d=({icon:e,children:t,className:a})=>m().createElement(n.ZP,{className:l()(u.Z["navigation-item-label"],a)},e&&m().createElement(c.Z,{icon:e,className:u.Z["navigation-item-icon"],size:28}),m().createElement("span",{className:u.Z["navigation-item-label-content"]},t));d.propTypes={icon:i().node,children:i().node.isRequired};const p=d},246:(e,t,a)=>{"use strict";a.d(t,{Z:()=>r,k:()=>c});var n=a(9196);const c=a.n(n)().createContext(),r=({selected:e,onSelect:t})=>{const[a,c]=(0,n.useState)([]),[r,l]=(0,n.useState)([]),[s,i]=(0,n.useState)(),o=(e,t)=>{const n=e-1,c=n<0?t:n,r=a[c];return r?.disabled?o(c,t):r},m=(e,t)=>{const n=e+1,c=n>t?0:n,r=a[c];return r?.disabled?m(c,t):r};return{selectedItem:e,handleClickItem:e=>{t(e)},handleKeyDownItem:n=>{const c=n?.code,l=a.findIndex((t=>t?.id===e)),i=a.length-1;let u;if("ArrowUp"===c){const e=o(l,i);u=e?.id}else if("ArrowDown"===c){const e=m(l,i);u=e?.id}else"Enter"!==c&&"Space"!==c||!s||(u=s);if(u){const e=r[u];e?.focus(),t(u)}},handleFocusItem:e=>{i(e)},registerRef:(e,t)=>{l((a=>!a[t]&&e?{...a,[t]:e}:a))},registerItem:e=>{c((t=>{const a=[...t],n=e?.id,c=a.findIndex((e=>e?.id===n));return c>=0?a[c]=e:a.push(e),a}))},items:a}}},291:(e,t,a)=>{"use strict";a.d(t,{Z:()=>p});var n=a(9818),c=a(5736),r=a(9201),l=a(797),s=a(496),i=a(1074),o=a(9517),m=a(9196),u=a(4633),d=a(8212);const __=c.__,p=({dismissable:e=!1,duration:t=null,floating:a=!1,message:c,type:p="success"})=>{const{clearNotice:h}=(0,n.useDispatch)(u.t);let g;switch(p){case"success":g=r.Z;break;case"error":g=l.Z;break;default:g=s.Z}const f=(0,m.useCallback)((()=>{h()}),[h]);return(0,m.useEffect)((()=>{let e;return t&&(e=setTimeout(h,t)),()=>clearTimeout(e)}),[h,t,c]),React.createElement("div",{className:`${d.Z.notice} ${d.Z[`notice--${p}`]} ${a?d.Z["notice--floating"]:""}`},React.createElement("div",{className:d.Z.notice__icon},React.createElement(i.Z,{icon:g})),React.createElement("div",{className:d.Z.notice__message},c),e&&React.createElement("button",{className:d.Z.notice__close,"aria-label":__("Dismiss notice.","jetpack-protect"),onClick:f},React.createElement(i.Z,{icon:o.Z})))}},1707:(e,t,a)=>{"use strict";a.d(t,{Z:()=>s});var n=a(4471),c=a(5736),r=a(9196),l=a(2218);const __=c.__,s=({id:e,anchor:t,position:a})=>{const{stepsCount:c,currentStep:s,currentStepCount:i,completeCurrentStep:o,completeAllCurrentSteps:m}=(0,l.ZP)(),{setRenderedSteps:u}=(0,r.useContext)(l.Yx);return(0,r.useEffect)((()=>(u((t=>[...t,e])),()=>{u((t=>t.filter((t=>t!==e))))})),[e,u]),s?.id!==e?null:React.createElement(n.Z,{anchor:t,title:s.title,noArrow:!1,children:s.description,buttonContent:i{"use strict";a.d(t,{Z:()=>w,c:()=>b});var n=a(2054),c=a(5106),r=a(5033),l=a(9818),s=a(5736),i=a(1074),o=a(9201),m=a(7489),u=a(2229),d=a(5235),p=a.n(d),h=a(9196),g=a.n(h),f=a(4633),v=a(2251),E=a(7324);const __=s.__,k=g().createContext(),b=({id:e,title:t,label:a,icon:s,fixable:d,severity:b,children:w,onOpen:y})=>{const Z=(0,h.useContext)(k),C=Z?.open===e,_=Z?.setOpen,R=(0,l.useSelect)((e=>e(f.t).getThreatsAreFixing())),j=p()(E.Z["accordion-body"],{[E.Z["accordion-body-open"]]:C,[E.Z["accordion-body-close"]]:!C}),S=(0,h.useCallback)((()=>{C||y?.(),_((t=>t===e?null:e))}),[C,y,_,e]),[N]=(0,n.Z)(["sm","lg"],[null,"<"]);return g().createElement("div",{className:E.Z["accordion-item"]},g().createElement("button",{className:E.Z["accordion-header"],onClick:S},g().createElement("div",null,g().createElement(c.ZP,{className:E.Z["accordion-header-label"],mb:1},g().createElement(i.Z,{icon:s,className:E.Z["accordion-header-label-icon"]}),a),g().createElement(c.ZP,{className:E.Z["accordion-header-description"],variant:C?"title-small":"body"},t)),g().createElement("div",null,g().createElement(v.Z,{severity:b})),g().createElement("div",null,d&&g().createElement(g().Fragment,null,R.indexOf(e)>=0?g().createElement(r.Z,{color:"black"}):g().createElement(i.Z,{icon:o.Z,className:E.Z["icon-check"],size:28}),N&&g().createElement("span",null,__("Auto-fix","jetpack-protect")))),g().createElement("div",{className:E.Z["accordion-header-button"]},g().createElement(i.Z,{icon:C?m.Z:u.Z,size:38}))),g().createElement("div",{className:j,"aria-hidden":C?"false":"true"},w))},w=({children:e})=>{const[t,a]=(0,h.useState)();return g().createElement(k.Provider,{value:{open:t,setOpen:a}},g().createElement("div",{className:E.Z.accordion},e))}},9401:(e,t,a)=>{"use strict";a.d(t,{Z:()=>g});var n=a(9608),c=a(5347),r=a(526),l=a(1294),s=a(9818),i=a(5736),o=a(9196),m=a.n(o),u=a(6477),d=a(5773),p=a(8963),h=a(4633);const __=i.__,g=({onScanAdd:e})=>{const{handleRegisterSite:t,registrationError:a}=(0,l.Z)({skipUserConnection:!0}),{refreshPlan:i,refreshStatus:g}=(0,s.useDispatch)(h.t),[f,v]=(0,o.useState)(!1),[E,k]=(0,o.useState)(!1),{jetpackScan:b}=(0,d.Z)(),{refreshWaf:w}=(0,p.Z)(),{pricingForUi:y}=b,{introductoryOffer:Z,currencyCode:C="USD"}=y,_=y.cost?Math.ceil(y.cost/12*100)/100:null,R=Z?.costPerInterval?Math.ceil(Z.costPerInterval/12*100)/100:null,{recordEvent:j,recordEventHandler:S}=(0,u.Z)(),N=S("jetpack_protect_pricing_table_get_scan_link_click",(()=>{k(!0),e()})),P=(0,o.useCallback)((()=>{j("jetpack_protect_connected_product_activated"),v(!0),t().then((()=>v(!1))).then((()=>{i(),w(),g(!0)}))}),[t,j,w,i,g]),x={title:__("Stay one step ahead of threats","jetpack-protect"),items:[{name:__("Scan for threats and vulnerabilities","jetpack-protect")},{name:__("Daily automated scans","jetpack-protect")},{name:__("Web Application Firewall","jetpack-protect")},{name:__("Brute force protection","jetpack-protect")},{name:__("Access to scan on Cloud","jetpack-protect")},{name:__("One-click auto fixes","jetpack-protect")},{name:__("Notifications","jetpack-protect")},{name:__("Severity labels","jetpack-protect")}]};return m().createElement(m().Fragment,null,m().createElement(n.ZP,x,m().createElement(n.oK,{primary:!0},m().createElement(n.NE,null,m().createElement(c.Z,{price:_,offPrice:R,leyend:__("/month, billed yearly","jetpack-protect"),currency:C,hideDiscountLabel:!1}),m().createElement(r.Z,{fullWidth:!0,onClick:N,isLoading:E,disabled:f||E},__("Get Jetpack Protect","jetpack-protect"))),m().createElement(n.kF,{isIncluded:!0,label:m().createElement("strong",null,__("Line by line malware scanning","jetpack-protect"))}),m().createElement(n.kF,{isIncluded:!0,label:m().createElement("strong",null,__("Plus on-demand manual scans","jetpack-protect"))}),m().createElement(n.kF,{isIncluded:!0,label:m().createElement("strong",null,__("Automatic protection and rule updates","jetpack-protect"))}),m().createElement(n.kF,{isIncluded:!0}),m().createElement(n.kF,{isIncluded:!0}),m().createElement(n.kF,{isIncluded:!0}),m().createElement(n.kF,{isIncluded:!0}),m().createElement(n.kF,{isIncluded:!0})),m().createElement(n.oK,null,m().createElement(n.NE,null,m().createElement(c.Z,{price:0,leyend:__("Free forever","jetpack-protect"),currency:C,hidePriceFraction:!0}),m().createElement(r.Z,{fullWidth:!0,variant:"secondary",onClick:P,isLoading:f,disabled:f||E,error:a?__("An error occurred. Please try again.","jetpack-protect"):null},__("Start for free","jetpack-protect"))),m().createElement(n.kF,{isIncluded:!0,label:__("Check items against database","jetpack-protect")}),m().createElement(n.kF,{isIncluded:!0}),m().createElement(n.kF,{isIncluded:!0,label:__("Manual rules only","jetpack-protect")}),m().createElement(n.kF,{isIncluded:!0}),m().createElement(n.kF,{isIncluded:!1}),m().createElement(n.kF,{isIncluded:!1}),m().createElement(n.kF,{isIncluded:!1}),m().createElement(n.kF,{isIncluded:!1}))))}},1233:(e,t,a)=>{"use strict";a.d(t,{Z:()=>l});var n=a(5235),c=a.n(n),r=a(6067);const l=({className:e,total:t=100,value:a})=>{if(null==a)return null;const n=Math.min(Math.round(a/t*100),100),l={width:`${n}%`};return React.createElement("div",{className:c()(e,r.Z["progress-bar"])},React.createElement("div",{className:r.Z["progress-bar__wrapper"]},React.createElement("div",{"aria-valuemax":t,"aria-valuemin":0,"aria-valuenow":Math.min(a,t),className:r.Z["progress-bar__bar"],role:"progressbar",style:l})),React.createElement("p",{className:r.Z["progress-bar__percent"]},`${n}%`))}},5800:(e,t,a)=>{"use strict";a.d(t,{Z:()=>b});var n=a(6895),c=a(5106),r=a(526),l=a(857),s=a(3363),i=a(3846),o=a(8258),m=a(5736),u=a(9196),d=a.n(u),p=a(3898),h=a(6477),g=a(5773),f=a(9909),v=a(8383);const __=m.__,E=()=>{const{adminUrl:e,siteSuffix:t,blogID:a}=window.jetpackProtectInitialState||{},{run:s}=(0,o.Z)({productSlug:p.o,redirectUrl:e,useBlogIdSuffix:!0}),{recordEventHandler:i}=(0,h.Z)(),m=i("jetpack_protect_footer_get_scan_link_click",s),{hasRequiredPlan:u}=(0,g.Z)();if(u){const e=(0,n.Z)("jetpack-scan-dash",{site:a??t});return d().createElement("div",{className:v.Z["product-section"]},d().createElement(c.Dx,null,__("Get access to our Cloud","jetpack-protect")),d().createElement(c.ZP,{mb:3},__("With your Protect upgrade, you have free access to scan your site on our Cloud, so you can be aware and fix your threats even if your site goes down. ","jetpack-protect")),d().createElement(r.Z,{variant:"secondary",weight:"regular",href:e},__("Go to Cloud","jetpack-protect")))}return d().createElement("div",{className:v.Z["product-section"]},d().createElement(c.Dx,null,__("Advanced scan results","jetpack-protect")),d().createElement(c.ZP,{mb:3},__("Upgrade Jetpack Protect to get advanced scan tools, including one-click fixes for most threats and malware scanning.","jetpack-protect")),d().createElement(l.Z,{description:__("Looking for advanced scan results and one-click fixes?","jetpack-protect"),cta:__("Upgrade Jetpack Protect now","jetpack-protect"),onClick:m}))},k=()=>{const{hasRequiredPlan:e}=(0,g.Z)();if(e){const e=(0,n.Z)("protect-footer-learn-more-scan");return d().createElement("div",{className:v.Z["info-section"]},d().createElement(c.Dx,null,__("Line-by-line scanning","jetpack-protect")),d().createElement(c.ZP,{mb:2},__("We actively review line-by-line of your site files to identify threats and vulnerabilities. Jetpack monitors millions of websites to keep your site secure all the time. ","jetpack-protect"),d().createElement(r.Z,{variant:"link",target:"_blank",weight:"regular",href:e},__("Learn more","jetpack-protect"))))}const t=(0,n.Z)("jetpack-protect-footer-learn-more");return d().createElement("div",{className:v.Z["info-section"]},d().createElement(c.Dx,null,__("Over 22,000 listed vulnerabilities","jetpack-protect")),d().createElement(c.ZP,{mb:3},__("Every day we check your plugin, theme, and WordPress versions against our 22,000 listed vulnerabilities powered by WPScan, an Automattic brand.","jetpack-protect")),d().createElement(r.Z,{variant:"link",isExternalLink:!0,href:t,weight:"regular"},__("Learn more","jetpack-protect")))},b=()=>{const{waf:e}=window.jetpackProtectInitialState||{};return e.wafSupported?d().createElement(f.Z,{main:d().createElement(E,null),secondary:d().createElement(k,null),preserveSecondaryOnMobile:!0}):d().createElement(s.Z,{horizontalSpacing:0,horizontalGap:0,fluid:!1},d().createElement(i.Z,null,d().createElement(k,null)))}},8686:(e,t,a)=>{"use strict";a.d(t,{Z:()=>N});var n=a(216),c=a(3363),r=a(3846),l=a(5106),s=a(3329),i=a(5609),o=a(9818),m=a(5736),u=a(9196),d=a.n(u),p=a(6477),h=a(2218),g=a(5773),f=a(4633),v=a(7267),E=a(4948),k=a(1233),b=a(5800),w=a(9909),y=a(4910),Z=a(5207),C=a(5983),_=a(6809),R=a(61),j=a(8264),S=a(6165);const __=m.__,N=()=>{const{lastChecked:e,currentStatus:t,errorCode:a,errorMessage:m,hasRequiredPlan:N}=(0,g.Z)(),{hasConnectionError:P}=(0,s.Z)(),{refreshStatus:x}=(0,o.useDispatch)(f.t),{statusIsFetching:z,scanIsUnavailable:M,status:L}=(0,o.useSelect)((e=>({statusIsFetching:e(f.t).getStatusIsFetching(),scanIsUnavailable:e(f.t).getScanIsUnavailable(),status:e(f.t).getStatus()}))),{currentProgress:I}=L;let A;if(A="error"===t||M?"error":e?"active":"in_progress",(0,S.Z)(),(0,j.Z)(),(0,u.useEffect)((()=>{z||"unavailable"!==L.status||M||x(!0)}),[z,L.status,x,M]),(0,p.Z)({pageViewEventName:"protect_admin",pageViewEventProperties:{check_status:A,has_plan:N}}),"error"===t||M){let e=m?`${m} (${a}).`:__("We are having problems scanning your site.","jetpack-protect");return e+=" "+__("Try again in a few minutes.","jetpack-protect"),d().createElement(v.Z,null,d().createElement(n.Z,null,d().createElement(c.Z,{horizontalSpacing:0},P&&d().createElement(r.Z,{className:R.Z["connection-error-col"]},d().createElement(s.h,null)),d().createElement(r.Z,null,d().createElement("div",{id:"jp-admin-notices",className:"my-jetpack-jitm-card"}))),d().createElement(w.Z,{main:d().createElement("div",{className:R.Z["main-content"]},d().createElement(E.Z,{className:R.Z["alert-icon-wrapper"]}),d().createElement(l.H3,null,__("We’re having problems scanning your site","jetpack-protect")),d().createElement(l.ZP,null,e)),secondary:d().createElement("div",{className:R.Z.illustration},d().createElement("img",{src:C,alt:""})),preserveSecondaryOnMobile:!1})),d().createElement(b.Z,null))}return["scheduled","scanning","optimistically_scanning"].indexOf(L.status)>=0||!e?d().createElement(v.Z,null,d().createElement(n.Z,null,d().createElement(c.Z,{horizontalSpacing:0},P&&d().createElement(r.Z,{className:R.Z["connection-error-col"]},d().createElement(s.h,null)),d().createElement(r.Z,null,d().createElement("div",{id:"jp-admin-notices",className:"my-jetpack-jitm-card"}))),d().createElement(w.Z,{main:d().createElement("div",{className:R.Z["main-content"]},d().createElement(c.Z,{horizontalSpacing:3,horizontalGap:7},d().createElement(r.Z,{className:R.Z["loading-content"]},d().createElement(i.Spinner,{style:{color:"black",marginTop:0,marginLeft:0}}),d().createElement("span",null,__("Scanning your site…","jetpack-protect"))),d().createElement(r.Z,null,d().createElement(l.H3,{style:{textWrap:"balance"}},__("Your results will be ready soon","jetpack-protect")),null!==I&&I>=0&&d().createElement(k.Z,{value:I}),d().createElement(l.ZP,null,__("We are scanning for security threats from our more than 22,000 listed vulnerabilities, powered by WPScan. This could take a minute or two.","jetpack-protect"))))),secondary:d().createElement("div",{className:R.Z.illustration},d().createElement("img",{src:C,alt:""})),preserveSecondaryOnMobile:!1})),d().createElement(b.Z,null)):d().createElement(h.em.Provider,{value:_.Z},d().createElement(v.Z,null,d().createElement(n.Z,null,d().createElement(c.Z,{horizontalSpacing:0},P&&d().createElement(r.Z,{className:R.Z["connection-error-col"]},d().createElement(s.h,null)),d().createElement(r.Z,null,d().createElement("div",{id:"jp-admin-notices",className:"my-jetpack-jitm-card"}))),d().createElement(c.Z,{horizontalSpacing:3,horizontalGap:7},d().createElement(r.Z,null,d().createElement(y.Z,null)),d().createElement(r.Z,null,d().createElement(Z.Z,null)))),d().createElement(b.Z,null)))}},6809:(e,t,a)=>{"use strict";a.d(t,{Z:()=>E});var n=a(2674),c=a.n(n),r=a(5106),l=a(526),s=a(6895),i=a(8258),o=a(9307),m=a(5736),u=a(3898),d=a(6477);const __=m.__,{adminUrl:p,siteSuffix:h}=window.jetpackProtectInitialState,g=__("Your scan results","jetpack-protect"),f=React.createElement(r.ZP,null,__("Navigate through the results of the scan on your WordPress installation, plugins, themes, and other files","jetpack-protect")),v=e=>{const{run:t}=(0,i.Z)({productSlug:u.o,redirectUrl:p}),{recordEventHandler:a}=(0,d.Z)(),n=a("jetpack_protect_onboarding_get_scan_link_click",t);return React.createElement(l.Z,c()({variant:"link",weight:"regular",onClick:n},e))},E=[{id:"free-scan-results",title:g,description:f},{id:"free-daily-scans",title:__("Daily automated scans","jetpack-protect"),description:React.createElement(r.ZP,null,(0,o.createInterpolateElement)(__("We run daily automated scans. Do you want ot be able to scan manually? Upgrade","jetpack-protect"),{upgradeLink:React.createElement(v,null)}))},{id:"paid-scan-results",title:g,description:f},{id:"paid-fix-all-threats",title:__("Auto-fix with one click","jetpack-protect"),description:React.createElement(r.ZP,null,__("Jetpack Protect offers one-click fixes for most threats. Press this button to be safe again.","jetpack-protect"),React.createElement("br",null),React.createElement("br",null),(0,o.createInterpolateElement)(__("Note that you'll have to input your server credentials first.","jetpack-protect"),{credentialsLink:React.createElement(l.Z,{variant:"link",weight:"regular",href:(0,s.Z)("jetpack-settings-security-credentials",{site:h})})}))},{id:"paid-understand-severity",title:__("Understand severity","jetpack-protect"),description:React.createElement(r.ZP,null,__("Learn how critical these threats are for the security of your site by glancing at the severity labels.","jetpack-protect"))},{id:"paid-daily-and-manual-scans",title:__("Daily & manual scanning","jetpack-protect"),description:React.createElement(r.ZP,null,__("We run daily automated scans but you can also run on-demand scans if you want to check the latest status.","jetpack-protect"))}]},8264:(e,t,a)=>{"use strict";a.d(t,{Z:()=>l});var n=a(9818),c=a(9196),r=a(4633);const l=()=>{const{checkCredentials:e}=(0,n.useDispatch)(r.t),t=(0,n.useSelect)((e=>e(r.t).getCredentials()));(0,c.useEffect)((()=>{t||e()}),[e,t])}},6165:(e,t,a)=>{"use strict";a.d(t,{Z:()=>u});var n=a(6989),c=a.n(n),r=a(9818),l=a(4769),s=a.n(l),i=a(9196),o=a(6477),m=a(4633);const u=()=>{const{recordEvent:e}=(0,o.Z)(),t=(0,r.useSelect)((e=>e(m.t).getStatus())),{setStatus:a,setStatusProgress:n,setStatusIsFetching:l,setScanIsUnavailable:u}=(0,r.useDispatch)(m.t);(0,i.useEffect)((()=>{let r;const i=e=>["scheduled","scanning"].indexOf(e)>=0,o=(e,t)=>!t&&"idle"===e,m=()=>new Promise(((e,t)=>{c()({path:"jetpack-protect/v1/status?hard_refresh=true",method:"GET"}).then((a=>{if(a?.error)throw a?.error_message;if(i(a?.status)||o(a?.status,a?.last_checked))return n(a?.current_progress),void(r=setTimeout((()=>{m().then((t=>e(t))).catch((e=>t(e)))}),1e4));e(a)})).catch((()=>{setTimeout((()=>{m().then((t=>e(t))).catch((e=>t(e)))}),5e3)}))}));if(i(t?.status)||o(t?.status,t?.lastChecked))return r=setTimeout((()=>{l(!0),m().then((t=>{u("unavailable"===t.status),a(s()(t)),e("jetpack_protect_scan_completed",{scan_status:t.status})})).finally((()=>{l(!1)}))}),1e4),()=>clearTimeout(r)}),[t?.status,t?.lastChecked,u,a,n,l,e])}},9909:(e,t,a)=>{"use strict";a.d(t,{Z:()=>i});var n=a(2054),c=a(3363),r=a(3846),l=a(9196),s=a.n(l);const i=({main:e,secondary:t,preserveSecondaryOnMobile:a=!1})=>{const[l,i]=(0,n.Z)(["sm","lg"]),o=!a&&l;return s().createElement(c.Z,{horizontalSpacing:0,horizontalGap:0,fluid:!1},!o&&s().createElement(s().Fragment,null,s().createElement(r.Z,{sm:12,md:4,lg:6},e),i&&s().createElement(r.Z,{lg:1}),s().createElement(r.Z,{sm:12,md:4,lg:5},t)),o&&s().createElement(r.Z,null,e))}},2251:(e,t,a)=>{"use strict";a.d(t,{Z:()=>l});var n=a(5736),c=a(8131);const __=n.__,r=e=>e>=5?"is-critical":e>=3&&e<5?"is-high":"is-low",l=({severity:e})=>React.createElement("div",{className:`${c.Z["threat-severity-badge"]} ${c.Z[r(e)]}`},(e=>{const t=__("Critical","jetpack-protect"),a=__("High","jetpack-protect"),n=__("Low","jetpack-protect");return e>=5?t:e>=3&&e<5?a:n})(e))},8959:(e,t,a)=>{"use strict";a.d(t,{Z:()=>s});var n=a(5106),c=a(9307),r=a(5736),l=a(8911);const __=r.__,s=()=>React.createElement(React.Fragment,null,React.createElement(n.ZP,{variant:"title-medium-semi-bold",mb:2},__("Enhanced protection","jetpack-protect")),React.createElement(n.ZP,{mb:2},__("Learn how you can execute Jetpack Firewall before WordPress initializes. This mode offers the most protection.","jetpack-protect")),React.createElement("ul",{className:l.Z.list},React.createElement("li",{className:l.Z["list-item"]},React.createElement(n.ZP,{variant:"body-small"},(0,c.createInterpolateElement)(__("To ensure the firewall can best protect your site, please update: auto_prepend_file PHP directive to point to wp-content/jetpack-waf/bootstrap.php Typically this is set either in an .htaccess file or in the global PHP configuration; contact your host for further assistance.","jetpack-protect"),{mark:React.createElement("mark",{className:l.Z.mark})}))),React.createElement("li",{className:l.Z["list-item"]},React.createElement(n.ZP,{variant:"body-small"},__("Don't forget to undo this action when Firewall is turned off, or when you uninstall Jetpack.","jetpack-protect")))))},4910:(e,t,a)=>{"use strict";a.d(t,{Z:()=>E});var n=a(2054),c=a(3396),r=a(3363),l=a(3846),s=a(5106),i=a(526),o=a(9818),m=a(9771),u=a(5736),d=a(9196),p=a.n(d),h=a(5773),g=a(4633),f=a(1707),v=a(6561);const __=u.__,E=()=>{const[e]=(0,n.Z)("sm"),{numThreats:t,lastChecked:a,hasRequiredPlan:E}=(0,h.Z)(),k=(0,o.useSelect)((e=>e(g.t).getScanIsEnqueuing())),{scan:b}=(0,o.useDispatch)(g.t),w=(0,c.VS)("protect"),[y,Z]=(0,d.useState)(null),[C,_]=(0,d.useState)(null);return p().createElement(r.Z,{fluid:!0},p().createElement(l.Z,null,p().createElement("div",{className:v.Z.summary},p().createElement("div",null,p().createElement(s.Dx,{size:"small",className:v.Z.summary__title},p().createElement(w,{size:32,className:v.Z.summary__icon}),p().createElement("div",{ref:Z},(0,u.sprintf)(/* translators: %s: Latest check date */ -__("Latest results as of %s","jetpack-protect"),(0,m.dateI18n)("F jS",a))),!E&&p().createElement(f.Z,{id:"free-daily-scans",position:e?"bottom":"middle right",anchor:y})),t>0&&p().createElement(s.ZP,{variant:"headline-small",component:"h1"},(0,u.sprintf)(/* translators: %s: Total number of threats */ -__("%1$s %2$s found","jetpack-protect"),t,1===t?"threat":"threats"))),E&&0===t&&p().createElement(p().Fragment,null,p().createElement(i.Z,{ref:_,variant:"secondary",className:v.Z["summary__scan-button"],isLoading:k,onClick:e=>{e.preventDefault(),b()}},__("Scan now","jetpack-protect")),p().createElement(f.Z,{id:"paid-daily-and-manual-scans",position:"middle left",anchor:C})))))}},3324:(e,t,a)=>{"use strict";a.d(t,{O:()=>r,Z:()=>l});var n=a(554),c=a(5714);const r=({label:e,link:t})=>React.createElement(n.OL,{to:t,className:({isActive:e})=>e?`${c.Z.tab} ${c.Z["tab--active"]}`:c.Z.tab},e),l=({children:e,className:t=""})=>React.createElement("nav",{className:`${c.Z.tabs} ${t}`},e)},9265:(e,t,a)=>{"use strict";a.d(t,{Z:()=>c});var n=a(8063);const c=({disabled:e=!1,id:t,label:a="",description:c="",placeholder:r="",rows:l=3,value:s="",onChange:i=(()=>{})})=>React.createElement("div",null,Boolean(a)&&React.createElement("label",{className:n.Z.label,htmlFor:t},a),Boolean(c)&&c,React.createElement("textarea",{className:n.Z.textarea,disabled:e,placeholder:r,rows:l,id:t,name:t,onChange:i,value:s||""}))},8891:(e,t,a)=>{"use strict";a.d(t,{Z:()=>u});var n=a(5106),c=a(5736),r=a(1074),l=a(9196),s=a.n(l),i=a(2251),o=a(9971);const __=c.__,m=e=>{switch(e.fixer){case"replace":return __("Jetpack Scan will replace the affected file or directory.","jetpack-protect");case"delete":return __("Jetpack Scan will delete the affected file or directory.","jetpack-protect");case"update":return e.target?(0,c.sprintf)(/* translators: %s: Version that the plugin will be upgraded to */ -__("Jetpack Scan will update to a newer version %s.","jetpack-protect"),e.target):__("Jetpack Scan will update to a newer version.","jetpack-protect");case"edit":return __("Jetpack Scan will edit the affected file or directory.","jetpack-protect");case"rollback":return e.target?(0,c.sprintf)(/* translators: %s: Version that the plugin will be upgraded to */ -__("Jetpack Scan will rollback the affected file to the version from %s.","jetpack-protect"),e.target):__("Jetpack Scan will rollback the affected file to an older (clean) version.","jetpack-protect");default:return __("Jetpack Scan will resolve the threat.","jetpack-protect")}};function u({threat:e,fixAllDialog:t,onCheckFix:a}){const[c,u]=(0,l.useState)(!0),d=(0,l.useCallback)((t=>{u(t.target.checked),a(t.target.checked,e)}),[a,e]);return s().createElement(s().Fragment,null,s().createElement("div",{className:o.Z.threat},s().createElement(r.Z,{icon:e.icon,className:o.Z.threat__icon}),s().createElement("div",{className:o.Z.threat__summary},s().createElement(n.ZP,{className:o.Z.threat__summary__label,mb:1},e.label),s().createElement(n.ZP,{className:o.Z.threat__summary__title},m(e.fixable))),s().createElement("div",{className:o.Z.threat__severity},s().createElement(i.Z,{severity:e.severity})),t&&s().createElement("div",{className:o.Z.threat__checkbox},s().createElement("input",{type:"checkbox",checked:c,onChange:d,value:e.id}))))}},5658:(e,t,a)=>{"use strict";a.d(t,{Z:()=>m});var n=a(5106),c=a(9307),r=a(5736),l=a(9196),s=a(5773),i=a(9709);const __=r.__,_n=r._n,o=()=>React.createElement("svg",{width:"80",height:"96",viewBox:"0 0 80 96",fill:"none",xmlns:"http://www.w3.org/2000/svg"},React.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M40 0.00634766L80 17.7891V44.2985C80 66.8965 65.1605 88.2927 44.2352 95.0425C41.4856 95.9295 38.5144 95.9295 35.7648 95.0425C14.8395 88.2927 0 66.8965 0 44.2985V17.7891L40 0.00634766Z",fill:"#069E08"}),React.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M60.9 33.6909L35.375 67.9124L19.2047 55.9263L22.7848 51.1264L34.1403 59.5436L56.0851 30.122L60.9 33.6909Z",fill:"white"})),m=()=>{const{lastChecked:e}=(0,s.Z)(),t=(0,l.useMemo)((()=>e?(e=>{const t=new Date,a=6e4*t.getTimezoneOffset(),n=Math.floor((new Date(t.getTime()+a).getTime()-e)/1e3);let c=n/31536e3;return c>1?(0,r.sprintf)( -// translators: placeholder is a number amount of years i.e. "5 years ago". -_n("%s year ago","%s years ago",Math.floor(c),"jetpack-protect"),Math.floor(c)):(c=n/2592e3,c>1?(0,r.sprintf)( -// translators: placeholder is a number amount of months i.e. "5 months ago". -_n("%s month ago","%s months ago",Math.floor(c),"jetpack-protect"),Math.floor(c)):(c=n/86400,c>1?(0,r.sprintf)( -// translators: placeholder is a number amount of days i.e. "5 days ago". -_n("%s day ago","%s days ago",Math.floor(c),"jetpack-protect"),Math.floor(c)):(c=n/3600,c>1?(0,r.sprintf)( -// translators: placeholder is a number amount of hours i.e. "5 hours ago". -_n("%s hour ago","%s hours ago",Math.floor(c),"jetpack-protect"),Math.floor(c)):(c=n/60,c>1?(0,r.sprintf)( -// translators: placeholder is a number amount of minutes i.e. "5 minutes ago". -_n("%s minute ago","%s minutes ago",Math.floor(c),"jetpack-protect"),Math.floor(c)):__("a few seconds ago","jetpack-protect")))))})(Date.parse(e)):null),[e]);return React.createElement("div",{className:i.Z.empty},React.createElement(o,null),React.createElement(n.H3,{weight:"bold",mt:8},__("Don't worry about a thing","jetpack-protect")),React.createElement(n.ZP,null,(0,c.createInterpolateElement)((0,r.sprintf)( -// translators: placeholder is the amount of time since the last scan, i.e. "5 minutes ago". -__("The last Protect scan ran %s and everything looked great.","jetpack-protect"),t),{strong:React.createElement("strong",null)})))}},2831:(e,t,a)=>{"use strict";a.d(t,{Z:()=>g});var n=a(526),c=a(5106),r=a(857),l=a(8258),s=a(5736),i=a(9196),o=a.n(i),m=a(3898),u=a(6477),d=a(3584),p=a(9709);const __=s.__,h=({description:e,filename:t,fixedIn:a,icon:h,id:g,name:f,source:v,table:E,title:k,type:b,version:w})=>{const{adminUrl:y}=window.jetpackProtectInitialState||{},{run:Z}=(0,l.Z)({productSlug:m.o,redirectUrl:y,useBlogIdSuffix:!0}),{recordEventHandler:C}=(0,u.Z)(),_=C("jetpack_protect_threat_list_get_scan_link_click",Z),R=v?o().createElement(n.Z,{variant:"link",isExternalLink:!0,weight:"regular",href:v},__("See more technical details of this threat","jetpack-protect")):null,j=(0,i.useCallback)((()=>f&&w?`${f} (${w})`:t?t.split("/").pop():E||void 0),[t,f,E,w]);return o().createElement(d.U,{id:g,label:j(),title:k,icon:h,onOpen:(0,i.useCallback)((()=>{["core","plugin","theme"].includes(b)&&C(`jetpack_protect_${b}_threat_open`)}),[C,b])},e&&o().createElement("div",{className:p.Z["threat-section"]},o().createElement(c.ZP,{variant:"title-small",mb:2},__("What is the problem?","jetpack-protect")),o().createElement(c.ZP,{mb:2},e),R),a&&o().createElement("div",{className:p.Z["threat-section"]},o().createElement(c.ZP,{variant:"title-small",mb:2},__("How to fix it?","jetpack-protect")),o().createElement(c.ZP,{mb:2},/* translators: Translates to Update to. %1$s: Name. %2$s: Fixed version */ /* translators: Translates to Update to. %1$s: Name. %2$s: Fixed version */ -(0,s.sprintf)(__("Update to %1$s %2$s","jetpack-protect"),f,a)),o().createElement(r.Z,{description:__("Looking for advanced scan results and one-click fixes?","jetpack-protect"),cta:__("Upgrade Jetpack Protect now","jetpack-protect"),onClick:_,className:p.Z["threat-item-cta"]})),!e&&o().createElement("div",{className:p.Z["threat-section"]},R))},g=({list:e})=>o().createElement(d.Z,null,e.map((({description:e,fixedIn:t,icon:a,id:n,name:c,source:r,table:l,title:s,type:i,version:m})=>o().createElement(h,{description:e,fixedIn:t,icon:a,id:n,key:n,name:c,source:r,table:l,title:s,type:i,version:m}))))},5207:(e,t,a)=>{"use strict";a.d(t,{Z:()=>w});var n=a(2054),c=a(3363),r=a(3846),l=a(5106),s=a(526),i=a(9818),o=a(5736),m=a(9196),u=a.n(m),d=a(5773),p=a(4633),h=a(1707),g=a(5658),f=a(2831),v=a(4289),E=a(1400),k=a(9709),b=a(7930);const __=o.__,w=()=>{const{hasRequiredPlan:e}=(0,d.Z)(),{item:t,list:a,selected:w,setSelected:y}=(0,b.Z)(),Z=a.filter((e=>e.fixable)),[C]=(0,n.Z)("sm"),{setModal:_}=(0,i.useDispatch)(p.t),{scan:R}=(0,i.useDispatch)(p.t),j=(0,i.useSelect)((e=>e(p.t).getScanIsEnqueuing())),[S,N]=(0,m.useState)(null),[P,x]=(0,m.useState)(null),[z,M]=(0,m.useState)(null),[L,I]=(0,m.useState)(null),A=(0,m.useCallback)((()=>{switch(w){case"all":return 1===a.length?__("All threats","jetpack-protect"):(0,o.sprintf)(/* translators: placeholder is the amount of threats found on the site. */ -__("All %s threats","jetpack-protect"),a.length);case"files":return(0,o.sprintf)(/* translators: placeholder is the amount of file threats found on the site. */ -__("%1$s file %2$s","jetpack-protect"),a.length,1===a.length?"threat":"threats");case"database":return(0,o.sprintf)(/* translators: placeholder is the amount of database threats found on the site. */ -__("%1$s database %2$s","jetpack-protect"),a.length,1===a.length?"threat":"threats");default:return(0,o.sprintf)(/* translators: Translates to Update to. %1$s: Name. %2$s: Fixed version */ -__("%1$s %2$s in your %3$s %4$s","jetpack-protect"),a.length,1===a.length?"threat":"threats",t?.name,t?.version)}}),[w,a,t]);return u().createElement(c.Z,{fluid:!0,horizontalSpacing:0,horizontalGap:3},u().createElement(r.Z,{lg:4},u().createElement("div",{ref:N},u().createElement(v.Z,{selected:w,onSelect:y})),u().createElement(h.Z,{id:e?"paid-scan-results":"free-scan-results",position:"top",anchor:S})),u().createElement(r.Z,{lg:8},a?.length>0?u().createElement(u().Fragment,null,u().createElement("div",{className:k.Z["list-header"]},u().createElement(l.Dx,{className:k.Z["list-title"]},A()),e&&u().createElement(u().Fragment,null,Z.length>0&&u().createElement(u().Fragment,null,u().createElement(s.Z,{ref:x,variant:"primary",className:k.Z["list-header-button"],onClick:(T=Z,e=>{e.preventDefault(),_({type:"FIX_ALL_THREATS",props:{threatList:T}})})},(0,o.sprintf)(/* translators: Translates to Auto fix all. $s: Number of fixable threats. */ -__("Auto fix all (%s)","jetpack-protect"),Z.length)),u().createElement(h.Z,{id:"paid-fix-all-threats",position:C?"bottom right":"middle left",anchor:P})),u().createElement(s.Z,{ref:I,variant:"secondary",className:k.Z["list-header-button"],isLoading:j,onClick:e=>{e.preventDefault(),R()}},__("Scan now","jetpack-protect")),u().createElement(h.Z,{id:"paid-daily-and-manual-scans",position:C?"bottom left":"middle left",anchor:L}))),e?u().createElement(u().Fragment,null,u().createElement("div",{ref:M},u().createElement(E.Z,{list:a})),u().createElement(h.Z,{id:"paid-understand-severity",position:"top",anchor:z})):u().createElement(f.Z,{list:a})):u().createElement(g.Z,null)));var T}},4289:(e,t,a)=>{"use strict";a.d(t,{Z:()=>g});var n=a(2054),c=a(5736),r=a(797),l=a(2817),s=a(7663),i=a(8960),o=a(4160),m=a(6376),u=a(9196),d=a(6477),p=a(5773),h=a(5338);const __=c.__,g=({selected:e,onSelect:t})=>{const{plugins:a,themes:c,numThreats:g,numCoreThreats:f,numFilesThreats:v,numDatabaseThreats:E,hasRequiredPlan:k}=(0,p.Z)(),{recordEvent:b}=(0,d.Z)(),[w]=(0,n.Z)("lg","<"),y=(0,u.useCallback)((()=>{b("jetpack_protect_navigation_all_click")}),[b]),Z=(0,u.useCallback)((()=>{b("jetpack_protect_navigation_core_click")}),[b]),C=(0,u.useCallback)((()=>{b("jetpack_protect_navigation_plugin_click")}),[b]),_=(0,u.useCallback)((()=>{b("jetpack_protect_navigation_theme_click")}),[b]),R=(0,u.useCallback)((()=>{b("jetpack_protect_navigation_file_click")}),[b]),j=(0,u.useCallback)((()=>{b("jetpack_protect_navigation_database_click")}),[b]);return React.createElement(h.ZP,{selected:e,onSelect:t,mode:w?"dropdown":"list"},React.createElement(h.Dx,{initial:!0,id:"all",label:__("All threats","jetpack-protect"),icon:r.Z,badge:g,disabled:g<=0,onClick:y,checked:!0}),React.createElement(h.Dx,{id:"wordpress",label:__("WordPress","jetpack-protect"),icon:l.Z,badge:f,disabled:f<=0,onClick:Z,checked:!0}),React.createElement(h.KB,{label:__("Plugins","jetpack-protect"),icon:s.Z},a.map((({name:e,threats:t,checked:a})=>React.createElement(h.Dx,{key:e,id:e,label:e,checked:a,badge:t?.length,disabled:t?.length<=0,onClick:C})))),React.createElement(h.KB,{label:__("Themes","jetpack-protect"),icon:i.Z},c.map((({name:e,threats:t,checked:a})=>React.createElement(h.Dx,{key:e,id:e,label:e,checked:a,badge:t?.length,disabled:t?.length<=0,onClick:_})))),k&&React.createElement(React.Fragment,null,React.createElement(h.Dx,{id:"files",label:__("Files","jetpack-protect"),icon:o.Z,badge:v,disabled:v<=0,onClick:R,checked:!0}),React.createElement(h.Dx,{id:"database",label:__("Database","jetpack-protect"),icon:m.Z,badge:E,disabled:E<=0,onClick:j,checked:!0})))}},1400:(e,t,a)=>{"use strict";a.d(t,{Z:()=>E});var n=a(526),c=a(5106),r=a(2054),l=a(9818),s=a(9307),i=a(5736),o=a(9196),m=a.n(o),u=a(6477),d=a(4633),p=a(7127),h=a(4257),g=a(289),f=a(9709);const __=i.__,v=({context:e,description:t,diff:a,filename:r,fixedIn:s,icon:v,fixable:E,id:k,label:b,name:w,source:y,title:Z,type:C,severity:_})=>{const{setModal:R}=(0,l.useDispatch)(d.t),{recordEvent:j}=(0,u.Z)(),S=y?m().createElement(n.Z,{variant:"link",isExternalLink:!0,weight:"regular",href:y},__("See more technical details of this threat","jetpack-protect")):null;return m().createElement(g.c,{id:k,label:b,title:Z,icon:v,fixable:E,severity:_,onOpen:(0,o.useCallback)((()=>{["core","plugin","theme","file","database"].includes(C)&&j(`jetpack_protect_${C}_threat_open`)}),[j,C])},t&&m().createElement("div",{className:f.Z["threat-section"]},m().createElement(c.ZP,{variant:"title-small",mb:2},__("What is the problem?","jetpack-protect")),m().createElement(c.ZP,{mb:2},t),S),(r||e||a)&&m().createElement(c.ZP,{variant:"title-small",mb:2},__("The technical details","jetpack-protect")),r&&m().createElement(m().Fragment,null,m().createElement(c.ZP,{mb:2},/* translators: filename follows in separate line; e.g. "PHP.Injection.5 in: `post.php`" */ -__("Threat found in file:","jetpack-protect")),m().createElement("pre",{className:f.Z["threat-filename"]},r)),e&&m().createElement(h.Z,{context:e}),a&&m().createElement(p.C,{diff:a}),s&&m().createElement("div",{className:f.Z["threat-section"]},m().createElement(c.ZP,{variant:"title-small",mb:2},__("How to fix it?","jetpack-protect")),m().createElement(c.ZP,{mb:2},/* translators: Translates to Update to. %1$s: Name. %2$s: Fixed version */ /* translators: Translates to Update to. %1$s: Name. %2$s: Fixed version */ -(0,i.sprintf)(__("Update to %1$s %2$s","jetpack-protect"),w,s))),!t&&m().createElement("div",{className:f.Z["threat-section"]},S),m().createElement("div",{className:f.Z["threat-footer"]},m().createElement(n.Z,{isDestructive:!0,variant:"secondary",onClick:e=>{e.preventDefault(),R({type:"IGNORE_THREAT",props:{id:k,label:b,title:Z,icon:v,severity:_}})}},__("Ignore threat","jetpack-protect")),E&&m().createElement(n.Z,{onClick:e=>{e.preventDefault(),R({type:"FIX_THREAT",props:{id:k,label:b,title:Z,icon:v,severity:_,fixable:E}})}},__("Fix threat","jetpack-protect"))))},E=({list:e})=>{const{scan:t}=(0,l.useDispatch)(d.t),a=(0,s.createInterpolateElement)(__("If you have manually fixed any of the threats listed above, you can run a manual scan now or wait for Jetpack to scan your site later today.","jetpack-protect"),{manualScanLink:m().createElement(n.Z,{variant:"link",onClick:e=>{e.preventDefault(),t()}})}),[i]=(0,r.Z)(["sm","lg"],[null,"<"]),o=e=>e.name&&e.version?`${e.name} (${e.version})`:e.filename?e.filename.split("/").pop():e.table?e.table:void 0;return e=e.map((e=>({label:o(e),...e}))),m().createElement(m().Fragment,null,!i&&m().createElement("div",{className:f.Z["accordion-heading"]},m().createElement("span",null,__("Details","jetpack-protect")),m().createElement("span",null,__("Severity","jetpack-protect")),m().createElement("span",null,__("Auto-fix","jetpack-protect")),m().createElement("span",null)),m().createElement(g.Z,null,e.map((({context:e,description:t,diff:a,filename:n,fixedIn:c,icon:r,fixable:l,id:s,label:i,name:o,severity:u,source:d,table:p,title:h,type:g,version:f})=>m().createElement(v,{context:e,description:t,diff:a,filename:n,fixedIn:c,icon:r,fixable:l,id:s,key:s,label:i,name:o,severity:u,source:d,table:p,title:h,type:g,version:f})))),m().createElement(c.ZP,{className:f.Z["manual-scan"],variant:"body-small"},a))}},7930:(e,t,a)=>{"use strict";a.d(t,{Z:()=>d});var n=a(2817),c=a(4160),r=a(6376),l=a(7663),s=a(8960),i=a(9196),o=a(5773);const m=(e,t)=>t.severity-e.severity,u=(e,t)=>"object"==typeof e&&0===Object.keys(e).length?[]:Array.isArray(e)?e.map((e=>u(e,t))).flat():e?.threats.map((a=>({...a,...e,...t}))),d=()=>{const[e,t]=(0,i.useState)("all"),{plugins:a,themes:d,core:p,files:h,database:g}=(0,o.Z)(),{unsortedList:f,item:v}=(0,i.useMemo)((()=>{if(e&&"all"!==e){switch(e){case"wordpress":return{unsortedList:u(p,{icon:n.Z}),item:p};case"files":return{unsortedList:u(h,{icon:c.Z}),item:h};case"database":return{unsortedList:u(g,{icon:r.Z}),item:g}}const t=a.find((t=>t?.name===e));if(t)return{unsortedList:u(t,{icon:l.Z}),item:t};const i=d.find((t=>t?.name===e));if(i)return{unsortedList:u(i,{icon:s.Z}),item:i}}return{unsortedList:[...u(p,{icon:n.Z}),...u(a,{icon:l.Z}),...u(d,{icon:s.Z}),...u(h,{icon:c.Z}),...u(g,{icon:r.Z})],item:null}}),[p,g,h,a,e,d]);return{item:v,list:(0,i.useMemo)((()=>[...f].sort(m)),[f]),selected:e,setSelected:t}}},2854:(e,t,a)=>{"use strict";a.d(t,{Z:()=>r});var n=a(1294),c=a(8227);const r=({children:e})=>{const{isUserConnected:t,hasConnectedOwner:a}=(0,n.Z)();return t&&a?e:React.createElement(c.Z,null)}},8227:(e,t,a)=>{"use strict";a.d(t,{Z:()=>u});var n=a(5106),c=a(526),r=a(1294),l=a(9818),s=a(5736),i=a(4633),o=a(291),m=a(541);const __=s.__,u=()=>{const{setModal:e}=(0,l.useDispatch)(i.t),{userIsConnecting:t,handleConnectUser:a}=(0,r.Z)({redirectUri:"admin.php?page=jetpack-protect"});return React.createElement(React.Fragment,null,React.createElement(n.ZP,{variant:"title-medium",mb:2},__("User connection needed","jetpack-protect")),React.createElement(o.Z,{type:"info",message:__("Before Jetpack Protect can ignore and auto-fix threats on your site, a user connection is needed.","jetpack-protect")}),React.createElement(n.ZP,{mb:3},__("A user connection provides Jetpack Protect the access necessary to perform these tasks.","jetpack-protect")),React.createElement(n.ZP,{mb:3},__("Once you’ve secured a user connection, all Jetpack Protect features will be available for use.","jetpack-protect")),React.createElement("div",{className:m.Z.footer},React.createElement(c.Z,{variant:"secondary",onClick:t=>{t.preventDefault(),e({type:null})}},__("Not now","jetpack-protect")),React.createElement(c.Z,{isExternalLink:!0,weight:"regular",isLoading:t,onClick:a},__("Connect your user account","jetpack-protect"))))}},3898:(e,t,a)=>{"use strict";a.d(t,{K:()=>n,o:()=>c});const n="https://wordpress.org/support/plugin/jetpack-protect/",c="jetpack_scan"},6477:(e,t,a)=>{"use strict";a.d(t,{Z:()=>l});var n=a(6975),c=a(1294),r=a(9196);const l=({pageViewEventName:e,pageViewNamespace:t="jetpack",pageViewSuffix:a="page_view",pageViewEventProperties:l={}}={})=>{const{isUserConnected:s,isRegistered:i,userConnectionData:o}=(0,c.Z)(),{login:m,ID:u}=o.currentUser?.wpcomUser||{},{tracks:d}=n.Z,{recordEvent:p}=d,h=(0,r.useCallback)((async(e,t)=>{p(e,t)}),[p]),g=(0,r.useCallback)(((e,t,a=(()=>{}))=>(a="function"==typeof t?t:a,t="function"==typeof t?{}:t,()=>h(e,t).then(a))),[h]);(0,r.useEffect)((()=>{s&&u&&m&&n.Z.initialize(u,m)}),[s,u,m]);const f=e?`${t}_${e}_${a}`:null;return(0,r.useEffect)((()=>{i&&f&&p(f,l)}),[]),{recordEvent:h,recordEventHandler:g}}},2218:(e,t,a)=>{"use strict";a.d(t,{Yx:()=>i,ZP:()=>m,em:()=>s,um:()=>o});var n=a(9818),c=a(9196),r=a(1827),l=a(4633);const s=(0,c.createContext)([]),i=(0,c.createContext)([]),o=({children:e})=>{const[t,a]=(0,c.useState)([]);return React.createElement(i.Provider,{value:{renderedSteps:t,setRenderedSteps:a}},e)},m=()=>{const{completeOnboardingSteps:e,fetchOnboardingProgress:t}=r.Z,a=(0,c.useContext)(s),{renderedSteps:o}=(0,c.useContext)(i),m=(0,n.useSelect)((e=>e(l.t).getOnboardingProgress())),{setOnboardingProgress:u}=(0,n.useDispatch)(l.t),{currentStep:d,currentStepCount:p,stepsCount:h}=(0,c.useMemo)((()=>a.reduce(((e,t)=>(o.includes(t.id)&&(e.stepsCount++,e.currentStep||-1!==(m||[]).indexOf(t.id)||(e.currentStep=t,e.currentStepCount=e.stepsCount)),e)),{currentStep:null,currentStepCount:null,stepsCount:0})),[m,o,a]),g=(0,c.useCallback)((()=>{d&&(u([...m,d.id]),e([d.id]))}),[d,u,m,e]),f=(0,c.useCallback)((()=>{const t=a.reduce(((e,t)=>(t.id.startsWith("free-")&&e.push(t.id),e)),[]),n=[...m,...t];u([...new Set(n)]),e(t)}),[a,m,u,e]),v=(0,c.useCallback)((()=>{const t=a.reduce(((e,t)=>(t.id.startsWith("paid-")&&e.push(t.id),e)),[]),n=[...m,...t];u([...new Set(n)]),e(t)}),[a,m,u,e]),E=(0,c.useCallback)((()=>{d.id.startsWith("paid-")?v():f()}),[f,v,d]);return(0,c.useEffect)((()=>{null===m&&t().then((e=>u(e)))}),[t,m,u]),{progress:m,stepsCount:h,currentStep:d,currentStepCount:p,completeCurrentStep:g,completeAllCurrentSteps:E}}},5773:(e,t,a)=>{"use strict";a.d(t,{Z:()=>l});var n=a(9818),c=a(9196),r=a(4633);function l(){const{statusIsFetching:e,status:t,jetpackScan:a,hasRequiredPlan:l}=(0,n.useSelect)((e=>({statusIsFetching:e(r.t).getStatusIsFetching(),status:e(r.t).getStatus(),jetpackScan:e(r.t).getJetpackScan(),hasRequiredPlan:e(r.t).hasRequiredPlan()})));let s="error";!0===e?s="loading":t.status&&(s=t.status);const i=(0,c.useMemo)((()=>t.core?.threats?.length||0),[t.core]),o=(0,c.useMemo)((()=>(t.plugins||[]).reduce(((e,t)=>e+t.threats.length),0)),[t.plugins]),m=(0,c.useMemo)((()=>(t.themes||[]).reduce(((e,t)=>e+t.threats.length),0)),[t.themes]),u=(0,c.useMemo)((()=>t.files?.length||0),[t.files]),d=(0,c.useMemo)((()=>t.database?.length||0),[t.database]);return{numThreats:i+o+m+u+d,numCoreThreats:i,numPluginsThreats:o,numThemesThreats:m,numFilesThreats:u,numDatabaseThreats:d,lastChecked:t.lastChecked||null,errorCode:t.errorCode||null,errorMessage:t.errorMessage||null,core:t.core||{},plugins:t.plugins||[],themes:t.themes||[],files:{threats:t.files||[]},database:{threats:t.database||[]},currentStatus:s,hasUncheckedItems:t.hasUncheckedItems,jetpackScan:a,hasRequiredPlan:l}}},8963:(e,t,a)=>{"use strict";a.d(t,{Z:()=>s});var n=a(9818),c=a(9196),r=a(1827),l=a(4633);const s=()=>{const{setWafConfig:e,setWafStats:t,setWafIsEnabled:a,setWafIsUpdating:s,setWafIsToggling:i}=(0,n.useDispatch)(l.t),o=(0,n.useSelect)((e=>e(l.t).getWaf())),m=(0,c.useCallback)((()=>(s(!0),r.Z.fetchWaf().then((n=>{a(n?.isEnabled),e(n?.config),t(n?.stats)})).finally((()=>s(!1))))),[e,t,a,s]),u=(0,c.useCallback)((()=>(o.isEnabled||i(!0),s(!0),r.Z.toggleWaf().then(m).finally((()=>{i(!1),s(!1)})))),[m,o.isEnabled,i,s]),d=(0,c.useCallback)((()=>o.isEnabled?Promise.resolve():u()),[u,o.isEnabled]),p=(0,c.useCallback)((()=>(s(!0),d().then((()=>r.Z.updateWaf({jetpack_waf_automatic_rules:!o.config.jetpackWafAutomaticRules}))).then(m).finally((()=>s(!1))))),[d,m,s,o.config.jetpackWafAutomaticRules]),h=(0,c.useCallback)((()=>(s(!0),r.Z.updateWaf({jetpack_waf_ip_list:!o.config.jetpackWafIpList}).then(m).finally((()=>s(!1))))),[m,s,o.config.jetpackWafIpList]),g=(0,c.useCallback)((()=>(s(!0),r.Z.updateWaf({brute_force_protection:!o.config.bruteForceProtection}).then(m).finally((()=>s(!1))))),[m,s,o.config.bruteForceProtection]),f=(0,c.useCallback)((()=>(s(!0),d().then((()=>r.Z.updateWaf({jetpack_waf_share_data:!o.config.jetpackWafShareData}))).then(m).finally((()=>s(!1))))),[d,m,s,o.config.jetpackWafShareData]),v=(0,c.useCallback)((()=>(s(!0),d().then((()=>r.Z.updateWaf({jetpack_waf_share_debug_data:!o.config.jetpackWafShareDebugData}))).then(m).finally((()=>s(!1))))),[d,m,s,o.config.jetpackWafShareDebugData]),E=(0,c.useCallback)((e=>(s(!0),r.Z.updateWaf(e).then(m).finally((()=>s(!1))))),[m,s]);return(0,c.useEffect)((()=>{void 0!==o.config||o.isFetching||m()}),[o.config,o.isFetching,s,m]),{...o,refreshWaf:m,toggleWaf:u,toggleAutomaticRules:p,toggleManualRules:h,toggleBruteForceProtection:g,toggleShareData:f,toggleShareDebugData:v,updateConfig:E}}},5230:(e,t,a)=>{"use strict";a.d(t,{Au:()=>R,BZ:()=>w,Gk:()=>p,Oc:()=>P,Ot:()=>N,PF:()=>x,P_:()=>E,RR:()=>f,Rj:()=>j,U2:()=>v,VF:()=>Z,Xm:()=>b,Y2:()=>d,ZP:()=>q,_N:()=>i,d0:()=>m,dG:()=>C,eG:()=>h,hI:()=>g,i0:()=>y,jA:()=>o,kd:()=>S,l:()=>M,o9:()=>u,r0:()=>_,tu:()=>k,y:()=>z});var n=a(6989),c=a.n(n),r=a(5736),l=a(4769),s=a.n(l);const _n=r._n,__=r.__,i="SET_CREDENTIALS_STATE_IS_FETCHING",o="SET_CREDENTIALS_STATE",m="SET_STATUS",u="SET_STATUS_PROGRESS",d="START_SCAN_OPTIMISTICALLY",p="SET_STATUS_IS_FETCHING",h="SET_SCAN_IS_UNAVAILABLE",g="SET_SCAN_IS_ENQUEUING",f="SET_INSTALLED_PLUGINS",v="SET_INSTALLED_THEMES",E="SET_WP_VERSION",k="SET_JETPACK_SCAN",b="SET_THREAT_IS_UPDATING",w="SET_THREATS_ARE_FIXING",y="SET_MODAL",Z="SET_NOTICE",C="CLEAR_NOTICE",_="SET_HAS_REQUIRED_PLAN",R="SET_ONBOARDING_PROGRESS",j="SET_WAF_IS_SEEN",S="SET_WAF_UPGRADE_IS_SEEN",N="SET_WAF_IS_ENABLED",P="SET_WAF_IS_UPDATING",x="SET_WAF_IS_TOGGLING",z="SET_WAF_CONFIG",M="SET_WAF_STATS",L=e=>({type:m,status:e}),I=()=>({type:d}),A=e=>c()({path:"jetpack-protect/v1/status"+(e?"?hard_refresh=true":""),method:"GET"}),T=(e=!1)=>async({dispatch:t})=>(t(H(!0)),await new Promise(((a,n)=>A(e).then(O).then((e=>{t(D("unavailable"===e.status)),t(L(s()(e))),a(e)})).catch((e=>{n(e)})).finally((()=>{t(H(!1))}))))),O=(e,t=0)=>new Promise(((a,n)=>{"unavailable"===e.status&&t<3?A(!0).then((e=>{setTimeout((()=>{O(e,t+1).then((e=>a(e))).catch((e=>n(e)))}),5e3)})).catch(n):a(e)})),V=e=>({type:i,isFetching:e}),F=e=>({type:o,credentials:e}),H=e=>({type:p,status:e}),D=e=>({type:h,status:e}),U=e=>({type:g,isEnqueuing:e}),B=(e,t)=>({type:b,payload:{threatId:e,isUpdating:t}}),W=e=>({type:w,threatIds:e}),J=e=>async({dispatch:t})=>{const a=e.reduce(((e,t)=>`${e}threat_ids[]=${t}&`),"jetpack-protect/v1/fix-threats-status?");return t(W(e)),await c()({path:a,method:"GET"}).then((async a=>{const n=Object.values(a.threats);if(n.filter((e=>"in_progress"===e.status)).length>0)return await new Promise((()=>{setTimeout((()=>{t(J(e))}),1e3)}));if(!n.filter((e=>"fixed"===e.status)).length===e.length)throw"Not all threats could be fixed."})).then((()=>{t(T()),t(G({type:"success",message:(0,r.sprintf)( -// translators: placeholder is the number amount of fixed threats. -_n("%s threat was fixed successfully","%s threats were fixed successfully",e.length,"jetpack-protect"),e.length)}))})).catch((()=>{t(G({type:"error",message:__("Not all threats could be fixed. Please contact our support.","jetpack-protect")}))})).finally((()=>{t(W([]))}))},G=e=>({type:Z,payload:e}),$=e=>({type:_,hasRequiredPlan:e}),q={checkCredentials:()=>async({dispatch:e})=>await new Promise(((t,a)=>(e(V(!0)),c()({path:"jetpack-protect/v1/check-credentials",method:"POST"}).then((a=>{e(F(a)),t(a)})).catch((e=>{a(e)})).finally((()=>{e(V(!1))}))))),setCredentials:F,setCredentialsIsFetching:V,setStatus:L,setStatusProgress:e=>({type:u,currentProgress:e}),startScanOptimistically:I,refreshStatus:T,setStatusIsFetching:H,setScanIsEnqueuing:U,setInstalledPlugins:e=>({type:f,plugins:e}),setInstalledThemes:e=>({type:v,themes:e}),setwpVersion:e=>({type:E,version:e}),setJetpackScan:e=>({type:k,scan:e}),ignoreThreat:(e,t=(()=>{}))=>async({dispatch:a})=>(a(B(e,!0)),await new Promise((()=>c()({path:`jetpack-protect/v1/ignore-threat?threat_id=${e}`,method:"POST"}).then((()=>a(T()))).then((()=>a(G({type:"success",message:__("Threat ignored","jetpack-protect")})))).catch((()=>a(G({type:"error",message:__("An error ocurred ignoring the threat.","jetpack-protect")})))).finally((()=>{a(B(e,!1)),t()}))))),setModal:e=>({type:y,payload:e}),setNotice:G,clearNotice:()=>({type:C}),fixThreats:(e,t=(()=>{}))=>async({dispatch:a})=>(e.forEach((e=>{a(B(e,!0))})),await new Promise((()=>c()({path:`jetpack-protect/v1/fix-threats?threat_ids=${e}`,method:"POST",data:{threatIds:e}}).then((()=>a(G({type:"success",message:__("We're hard at work fixing this threat in the background. Please check back shortly.","jetpack-protect")})))).then((()=>{setTimeout((()=>a(J(e))),1e3)})).catch((()=>a(G({type:"error",message:__("Error fixing threats. Please contact support.","jetpack-protect")})))).finally((()=>{e.forEach((e=>{a(B(e,!1))})),t()}))))),scan:(e=(()=>{}))=>async({dispatch:t})=>(t(U(!0)),await new Promise((()=>c()({path:"jetpack-protect/v1/scan",method:"POST"}).then((()=>{t(I()),setTimeout((()=>t(T(!0))),5e3)})).catch((()=>t(G({type:"error",message:__("An error ocurred enqueuing the scan","jetpack-protect")})))).finally((()=>{t(U(!1)),e()}))))),setThreatsAreFixing:W,refreshPlan:()=>({dispatch:e})=>{c()({path:"jetpack-protect/v1/check-plan",method:"GET"}).then((t=>e($(t))))},setHasRequiredPlan:$,setScanIsUnavailable:D,setOnboardingProgress:e=>({type:R,progress:e}),setWafIsEnabled:e=>({type:N,isEnabled:e}),setWafIsSeen:e=>({type:j,isSeen:e}),setWafUpgradeIsSeen:e=>({type:S,upgradeIsSeen:e}),setWafIsUpdating:e=>({type:P,isUpdating:e}),setWafIsToggling:e=>({type:x,isToggling:e}),setWafConfig:e=>({type:z,config:e}),setWafStats:e=>({type:M,stats:e})}},3638:(e,t,a)=>{"use strict";a.d(t,{Z:()=>l});var n=a(9818),c=a(5230);const r={wafSupported:null,bruteForceSupported:null,isSeen:!1,upgradeIsSeen:!1,isEnabled:!1,isUpdating:!1,isToggling:!1,config:void 0,stats:void 0},l=(0,n.combineReducers)({credentials:(e=null,t)=>t.type===c.jA?t.credentials:e,credentialsIsFetching:(e=!1,t)=>t.type===c._N?t.isFetching:e,status:(e={},t)=>{switch(t.type){case c.d0:return t.status;case c.o9:return{...e,currentProgress:t.currentProgress};case c.Y2:return{...e,currentProgress:0,status:"optimistically_scanning"}}return e},statusIsFetching:(e=!1,t)=>t.type===c.Gk?t.status:e,scanIsUnavailable:(e=!1,t)=>t.type===c.eG?t.status:e,scanIsEnqueuing:(e=!1,t)=>t.type===c.hI?t.isEnqueuing:e,installedPlugins:(e={},t)=>t.type===c.RR?t.plugins:e,installedThemes:(e={},t)=>t.type===c.U2?t.themes:e,wpVersion:(e={},t)=>t.type===c.P_?t.version:e,jetpackScan:(e={},t)=>t.type===c.tu?t.scan:e,threatsUpdating:(e={},t)=>t.type===c.Xm?{...e,[t.payload.threatId]:t.payload.isUpdating}:e,modal:(e={},t)=>t.type===c.i0?{...e,...t.payload}:e,notice:(e={},t)=>{switch(t.type){case c.VF:return{...e,...t.payload};case c.dG:return{}}return e},setThreatsFixing:(e=[],t)=>t.type===c.BZ?t.threatIds:e,hasRequiredPlan:(e=!1,t)=>t.type===c.r0?t.hasRequiredPlan:e,onboardingProgress:(e=null,t)=>t.type===c.Au?t.progress:e,waf:(e=r,t)=>{switch(t.type){case c.Rj:return{...e,isSeen:t.isSeen};case c.kd:return{...e,upgradeIsSeen:t.upgradeIsSeen};case c.Ot:return{...e,isEnabled:t.isEnabled};case c.y:return{...e,config:t.config};case c.l:return{...e,stats:t.stats};case c.Oc:return{...e,isUpdating:t.isUpdating};case c.PF:return{...e,isToggling:t.isToggling}}return e}})},1056:(e,t,a)=>{"use strict";a.d(t,{Z:()=>l});var n=a(6989),c=a.n(n),r=a(5230);const l={getJetpackScan:{isFulfilled:e=>Object.keys(e?.jetpackScan).length>0,fulfill:()=>async({dispatch:e})=>{const t=await c()({path:"/my-jetpack/v1/site/products/scan",method:"GET"});e(r.ZP.setJetpackScan(t))}}}},6850:(e,t,a)=>{"use strict";a.d(t,{Z:()=>n});const n={getCredentials:e=>e.credentials||null,getCredentialsIsFetching:e=>e.credentialsIsFetching||!1,getInstalledPlugins:e=>e.installedPlugins||{},getInstalledThemes:e=>e.installedThemes||{},getStatus:e=>e.status||{},getStatusIsFetching:e=>e.statusIsFetching||!1,getScanIsUnavailable:e=>e.scanIsUnavailable||!1,getScanIsEnqueuing:e=>e.scanIsEnqueuing||!1,getWpVersion:e=>e.wpVersion||"",getJetpackScan:e=>e.jetpackScan||{},getThreatsUpdating:e=>e.threatsUpdating||{},getModalType:e=>e.modal?.type||null,getModalProps:e=>e.modal?.props||{},getNotice:e=>e.notice||null,getThreatsAreFixing:e=>e.threatsAreFixing||[],hasRequiredPlan:e=>e.hasRequiredPlan||!1,getOnboardingProgress:e=>e.onboardingProgress||null,getWaf:e=>e.waf}},5217:(e,t,a)=>{"use strict";a.d(t,{Z:()=>r});var n=a(9818);class c{static store=null;static mayBeInit(e,t){null===c.store&&(c.store=(0,n.createReduxStore)(e,t),(0,n.register)(c.store))}}const r=c},4633:(e,t,a)=>{"use strict";a.d(t,{N:()=>u,t:()=>m});var n=a(4769),c=a.n(n),r=a(5230),l=a(3638),s=a(1056),i=a(6850),o=a(5217);const m="jetpack-protect";function u(){o.Z.mayBeInit(m,{__experimentalUseThunks:!0,reducer:l.Z,actions:r.ZP,selectors:i.Z,resolvers:s.Z,initialState:c()(window.jetpackProtectInitialState)||{}})}},5983:(e,t,a)=>{"use strict";e.exports=a.p+"images/in-progress-db145d62b5ef09c05ad7.png"},6436:e=>{"use strict";if(void 0==={consumer_slug:"jetpack-protect"}){var t=new Error('Cannot find module \'{"consumer_slug":"jetpack-protect"}\'');throw t.code="MODULE_NOT_FOUND",t}e.exports={consumer_slug:"jetpack-protect"}},9196:e=>{"use strict";e.exports=window.React},6292:e=>{"use strict";e.exports=window.moment},6989:e=>{"use strict";e.exports=window.wp.apiFetch},5609:e=>{"use strict";e.exports=window.wp.components},4333:e=>{"use strict";e.exports=window.wp.compose},9818:e=>{"use strict";e.exports=window.wp.data},9771:e=>{"use strict";e.exports=window.wp.date},9307:e=>{"use strict";e.exports=window.wp.element},5736:e=>{"use strict";e.exports=window.wp.i18n},444:e=>{"use strict";e.exports=window.wp.primitives},6483:e=>{"use strict";e.exports=window.wp.url},2674:e=>{function t(){return e.exports=t=Object.assign?Object.assign.bind():function(e){for(var t=1;t{"use strict";function n(){return n=Object.assign?Object.assign.bind():function(e){for(var t=1;tn})}},t={};function a(n){var c=t[n];if(void 0!==c)return c.exports;var r=t[n]={exports:{}};return e[n](r,r.exports,a),r.exports}a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},a.d=(e,t)=>{for(var n in t)a.o(t,n)&&!a.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},a.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e;a.g.importScripts&&(e=a.g.location+"");var t=a.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");n.length&&(e=n[n.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),a.p=e})(),(()=>{"use strict";var e=a(8275),t=a(9307),n=a(9196),c=a.n(n),r=a(5439),l=a(554),s=a(5975),i=a(8257),o=a(8686),m=a(2218),u=a(4633);a(1155);function d(){const e=(0,r.TH)();return(0,n.useEffect)((()=>window.scrollTo(0,0)),[e]),null}(0,u.N)(),function(){const a=document.getElementById("jetpack-protect-root");if(null===a)return;const n=c().createElement(e.ZP,null,c().createElement(m.um,{value:{renderedSteps:[]}},c().createElement(l.UT,null,c().createElement(d,null),c().createElement(r.Z5,null,c().createElement(r.AW,{path:"/",element:c().createElement(o.Z,null)}),c().createElement(r.AW,{path:"/firewall",element:c().createElement(s.Z,null)}))),c().createElement(i.Z,null)));t.createRoot(a).render(n)}()})()})(); \ No newline at end of file diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/build/index.js.LICENSE.txt b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/build/index.js.LICENSE.txt deleted file mode 100644 index 84a0513f..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/build/index.js.LICENSE.txt +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Exposes number format capability - * - * @copyright Copyright (c) 2013 Kevin van Zonneveld (http://kvz.io) and Contributors (http://phpjs.org/authors). - * @license See CREDITS.md - * @see https://github.com/kvz/phpjs/blob/ffe1356af23a6f2512c84c954dd4e828e92579fa/functions/strings/number_format.js - */ - -/*! - Copyright (c) 2018 Jed Watson. - Licensed under the MIT License (MIT), see - http://jedwatson.github.io/classnames -*/ - -/** - * React Router DOM v6.2.2 - * - * Copyright (c) Remix Software Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE.md file in the root directory of this source tree. - * - * @license MIT - */ - -/** - * React Router v6.2.2 - * - * Copyright (c) Remix Software Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE.md file in the root directory of this source tree. - * - * @license MIT - */ diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/build/index.rtl.css b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/build/index.rtl.css deleted file mode 100644 index 06163c60..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/build/index.rtl.css +++ /dev/null @@ -1 +0,0 @@ -.p4qz2tkq0p9hxucJ6Qk2{--padding:calc(var(--spacing-base)*4);color:var(--jp-black)}.lbNDyXioOwvyvbALtCBm{--gap:calc(var(--spacing-base)*3);padding:var(--padding) 0;position:relative}.s2Lsn4kbm6BrS3DSndRB .lbNDyXioOwvyvbALtCBm{column-gap:var(--gap);display:grid;grid-auto-flow:column;grid-template-columns:repeat(var(--columns),1fr);grid-template-rows:repeat(var(--rows),minmax(min-content,max-content))}.cLaNK_XcbTGlRQ4Tp43Q{margin-top:var(--padding)}.s2Lsn4kbm6BrS3DSndRB .cLaNK_XcbTGlRQ4Tp43Q{display:contents}.cLaNK_XcbTGlRQ4Tp43Q.CYt1X0eH1icRjhtJ28jx>*{background:var(--jp-white);position:relative}.cLaNK_XcbTGlRQ4Tp43Q.CYt1X0eH1icRjhtJ28jx>:after{bottom:0;box-shadow:0 4px 24px #0000000d;content:"";left:0;position:absolute;right:0;top:0;z-index:-1}.cLaNK_XcbTGlRQ4Tp43Q>:first-child{border-top-left-radius:var(--jp-border-radius);border-top-right-radius:var(--jp-border-radius);border-width:1px 1px 0}.cLaNK_XcbTGlRQ4Tp43Q>:last-child{border-bottom-left-radius:var(--jp-border-radius);border-bottom-right-radius:var(--jp-border-radius);border-width:0 1px 1px}.DAkZc1P9A3K12fjEliMg{display:flex;flex-direction:column;justify-content:space-between;padding:var(--padding)}.WUBuYABl8nymjs9NnCEL{align-items:center;display:flex;padding-bottom:calc(var(--spacing-base)*2);position:relative}.WUBuYABl8nymjs9NnCEL:not(:nth-child(2)){padding-top:calc(var(--spacing-base)*2)}.WUBuYABl8nymjs9NnCEL:not(:nth-child(2)):before{background-color:var(--jp-gray);content:"";height:1px;left:var(--padding);position:absolute;right:var(--padding);top:0;z-index:5}.s2Lsn4kbm6BrS3DSndRB .WUBuYABl8nymjs9NnCEL:not(:nth-child(2)):before{left:unset;right:0;width:calc(100% + var(--gap))}.s2Lsn4kbm6BrS3DSndRB .lbNDyXioOwvyvbALtCBm>:last-child .WUBuYABl8nymjs9NnCEL:not(:nth-child(2)):before{width:100%}.ANtCFeb41NhA8PA3H7ZN,.WUBuYABl8nymjs9NnCEL:last-of-type{padding-bottom:var(--padding)}.Ql2gy_148yW8Vw5vhaKD{padding-left:var(--padding);padding-right:var(--padding)}.EAQrAnQEW1z1BfdY5gbC{margin:0 var(--spacing-base);fill:var(--jp-gray);flex-shrink:0}.EAQrAnQEW1z1BfdY5gbC.JDSTlLoOC_4aUoH2oNM2{fill:var(--jp-green-40)}.EAQrAnQEW1z1BfdY5gbC.zNdQRJ1w7BvaQOYyqzHK{fill:var(--jp-red-50)}.lr7vbX95SKtoe7DarJcZ{margin-right:auto}.s2Lsn4kbm6BrS3DSndRB .lr7vbX95SKtoe7DarJcZ{margin:0 var(--spacing-base);top:1px}.WUBuYABl8nymjs9NnCEL .KRrGp2xdkeBOxLZeuQ6X{fill:var(--jp-gray-20);flex-shrink:0}.H_ZJiRVJg0LiMXPGOcmt{text-align:center;width:fit-content}.H_ZJiRVJg0LiMXPGOcmt>a{color:#000}.s2Lsn4kbm6BrS3DSndRB .H_ZJiRVJg0LiMXPGOcmt{grid-column:2;overflow:hidden;padding-left:var(--padding);padding-right:var(--padding);white-space:nowrap}.x21z_DixObRDsDaWotP1{align-items:right;display:flex;justify-content:right;margin:0 calc(var(--spacing-base)*4)}.WQVtrU6q0L1Igcj7wCrQ{margin:0;padding:0}.UujoBFTnQNY2cWU2SIsH{font-size:var(--font-headline-medium);font-weight:700;line-height:52px}.TeGO5V_thHw5lDAm1_2M{font-weight:700}.TeGO5V_thHw5lDAm1_2M,.WolQzb2MsSgiNmLtc7_j{font-size:var(--font-headline-small);line-height:40px}.WolQzb2MsSgiNmLtc7_j{font-weight:400}.hUB0JT8p1T2Hw28N6qC8{font-weight:500}.gKZWDv5chz3_O3Syp74H,.hUB0JT8p1T2Hw28N6qC8{font-size:var(--font-title-medium);line-height:32px}.gKZWDv5chz3_O3Syp74H{font-weight:600}.zY2No8Ga4b8shbOQGhnv{font-size:var(--font-title-small);font-weight:500;line-height:30px}.tIj0D1t8Cc892ikmgFPZ{font-size:var(--font-body);font-weight:400;line-height:24px}.KdcN0BnOaVeVhyLRKqhS{font-size:var(--font-body-small);font-weight:400;line-height:24px}.dso3Rh3tl3Xv1GumBktz{font-weight:400}.dso3Rh3tl3Xv1GumBktz,.mQ1UlbN9u4Mg9byO8m7v{font-size:var(--font-body-extra-small);line-height:20px}.mQ1UlbN9u4Mg9byO8m7v{font-weight:700}.PItlW5vRExLnTj4a8eLE{font-size:var(--font-body-extra-small);font-weight:600;line-height:16px}.TwRpPlktzxhmFVeua7P5{margin:calc(var( --spacing-base )*0)}.zVfqx7gyb3o9mxfGynn1{margin-left:calc(var( --spacing-base )*0);margin-right:calc(var( --spacing-base )*0)}.iSHVzNiB9iVleGljaQxy{margin-bottom:calc(var( --spacing-base )*0)}.iSHVzNiB9iVleGljaQxy,.xqDIp6cNVr_E6RXaiPyD{margin-top:calc(var( --spacing-base )*0)}.S8EwaXk1kyPizt6x4WH2{margin-left:calc(var( --spacing-base )*0)}.ODX5Vr1TARoLFkDDFooD{margin-bottom:calc(var( --spacing-base )*0)}.cphJ8dCpfimnky7P2FHg{margin-right:calc(var( --spacing-base )*0)}.PFgIhNxIyiSuNvQjAIYj{margin:calc(var( --spacing-base )*1)}.M2jKmUzDxvJjjVEPU3zn{margin-left:calc(var( --spacing-base )*1);margin-right:calc(var( --spacing-base )*1)}.io15gAh8tMTNbSEfwJKk{margin-bottom:calc(var( --spacing-base )*1)}.io15gAh8tMTNbSEfwJKk,.rcTN5uw9xIEeMEGL3Xi_{margin-top:calc(var( --spacing-base )*1)}.CQSkybjq2TcRM1Xo9COV{margin-left:calc(var( --spacing-base )*1)}.hfqOWgq6_MEGdFE82eOY{margin-bottom:calc(var( --spacing-base )*1)}.I8MxZQYTbuu595yfesWA{margin-right:calc(var( --spacing-base )*1)}.kQkc6rmdpvLKPkyoJtVQ{margin:calc(var( --spacing-base )*2)}.j6vFPxWuu4Jan2ldoxpp{margin-left:calc(var( --spacing-base )*2);margin-right:calc(var( --spacing-base )*2)}.hqr39dC4H_AbactPAkCG{margin-bottom:calc(var( --spacing-base )*2)}.c3dQnMi16C6J6Ecy4283,.hqr39dC4H_AbactPAkCG{margin-top:calc(var( --spacing-base )*2)}.YNZmHOuRo6hU7zzKfPdP{margin-left:calc(var( --spacing-base )*2)}.Db8lbak1_wunpPk8NwKU{margin-bottom:calc(var( --spacing-base )*2)}.ftsYE5J9hLzquQ0tA5dY{margin-right:calc(var( --spacing-base )*2)}.Det4MHzLUW7EeDnafPzq{margin:calc(var( --spacing-base )*3)}.h_8EEAztC29Vve1datb5{margin-left:calc(var( --spacing-base )*3);margin-right:calc(var( --spacing-base )*3)}.YXIXJ0h1k47u6hzK8KcM{margin-bottom:calc(var( --spacing-base )*3)}.YXIXJ0h1k47u6hzK8KcM,.soADBBkcIKCBXzCTuV9_{margin-top:calc(var( --spacing-base )*3)}.zSX59ziEaEWGjnpZa4uV{margin-left:calc(var( --spacing-base )*3)}.yrVTnq_WBMbejg89c2ZQ{margin-bottom:calc(var( --spacing-base )*3)}.UKtHPJnI2cXBWtPDm5hM{margin-right:calc(var( --spacing-base )*3)}.guexok_Tqd5Tf52hRlbT{margin:calc(var( --spacing-base )*4)}.oS1E2KfTBZkJ3F0tN7T6{margin-left:calc(var( --spacing-base )*4);margin-right:calc(var( --spacing-base )*4)}.DN1OhhXi6AoBgEdDSbGd{margin-bottom:calc(var( --spacing-base )*4)}.DN1OhhXi6AoBgEdDSbGd,.ot2kkMcYHv53hLZ4LSn0{margin-top:calc(var( --spacing-base )*4)}.A1krOZZhlQ6Sp8Cy4bly{margin-left:calc(var( --spacing-base )*4)}.pkDbXXXL32237M0hokEh{margin-bottom:calc(var( --spacing-base )*4)}.XXv4kDTGvEnQeuGKOPU3{margin-right:calc(var( --spacing-base )*4)}.yGqHk1a57gaISwkXwXe6{margin:calc(var( --spacing-base )*5)}.X8cghM358X3DkXLc9aNK{margin-left:calc(var( --spacing-base )*5);margin-right:calc(var( --spacing-base )*5)}.GdfSmGwHlFnN2S6xBn1f{margin-bottom:calc(var( --spacing-base )*5)}.GdfSmGwHlFnN2S6xBn1f,.yqeuzwyGQ7zG0avrGqi_{margin-top:calc(var( --spacing-base )*5)}.g9emeCkuHvYhveiJbfXO{margin-left:calc(var( --spacing-base )*5)}.Lvk3dqcyHbZ07QCRlrUQ{margin-bottom:calc(var( --spacing-base )*5)}.r3yQECDQ9qX0XZzXlVAg{margin-right:calc(var( --spacing-base )*5)}.aQhlPwht2Cz1X_63Miw0{margin:calc(var( --spacing-base )*6)}.JyHb0vK3wJgpblL9s5j8{margin-left:calc(var( --spacing-base )*6);margin-right:calc(var( --spacing-base )*6)}.cY2gULL1lAv6WPNIRuf3{margin-bottom:calc(var( --spacing-base )*6)}.NBWQ9Lwhh_fnry3lg_p7,.cY2gULL1lAv6WPNIRuf3{margin-top:calc(var( --spacing-base )*6)}.yIOniNe5E40C8fWvBm5V{margin-left:calc(var( --spacing-base )*6)}.t30usboNSyqfQWIwHvT3{margin-bottom:calc(var( --spacing-base )*6)}.Nm_TyFkYCMhOoghoToKJ{margin-right:calc(var( --spacing-base )*6)}.C4qJKoBXpgKtpmrqtEKB{margin:calc(var( --spacing-base )*7)}.S93Srbu6NQ_PBr7DmTiD{margin-left:calc(var( --spacing-base )*7);margin-right:calc(var( --spacing-base )*7)}.fJj8k6gGJDks3crUZxOS{margin-bottom:calc(var( --spacing-base )*7)}.cW6D6djs7Ppm7fD7TeoV,.fJj8k6gGJDks3crUZxOS{margin-top:calc(var( --spacing-base )*7)}.DuCnqNfcxcP3Z__Yo5Ro{margin-left:calc(var( --spacing-base )*7)}.im8407m2fw5vOg7O2zsw{margin-bottom:calc(var( --spacing-base )*7)}.G0fbeBgvz2sh3uTP9gNl{margin-right:calc(var( --spacing-base )*7)}.kvW3sBCxRxUqz1jrVMJl{margin:calc(var( --spacing-base )*8)}.tOjEqjLONQdkiYx_XRnw{margin-left:calc(var( --spacing-base )*8);margin-right:calc(var( --spacing-base )*8)}.op5hFSx318zgxsoZZNLN{margin-bottom:calc(var( --spacing-base )*8)}.c9WfNHP6TFKWIfLxv52J,.op5hFSx318zgxsoZZNLN{margin-top:calc(var( --spacing-base )*8)}.sBA75QqcqRwwYSHJh2wc{margin-left:calc(var( --spacing-base )*8)}.GpL6idrXmSOM6jB8Ohsf{margin-bottom:calc(var( --spacing-base )*8)}.HbtWJoQwpgGycz8dGzeT{margin-right:calc(var( --spacing-base )*8)}.uxX3khU88VQ_Ah49Ejsa{padding:calc(var( --spacing-base )*0)}.KX0FhpBKwKzs9fOUdbNz{padding-left:calc(var( --spacing-base )*0);padding-right:calc(var( --spacing-base )*0)}.PfK8vKDyN32dnimlzYjz{padding-bottom:calc(var( --spacing-base )*0)}.PfK8vKDyN32dnimlzYjz,.emxLHRjQuJsImnPbQIzE{padding-top:calc(var( --spacing-base )*0)}.kJ8WzlpTVgdViXt8ukP9{padding-left:calc(var( --spacing-base )*0)}.tg_UIUI11VBzrTAn2AzJ{padding-bottom:calc(var( --spacing-base )*0)}.uczvl8kaz84oPQJ2DB2R{padding-right:calc(var( --spacing-base )*0)}.o7UHPcdVK3lt7q3lqV4o{padding:calc(var( --spacing-base )*1)}.IDqEOxvDoYrFYxELPmtX{padding-left:calc(var( --spacing-base )*1);padding-right:calc(var( --spacing-base )*1)}.DdywPW2qSYlu2pt8tpO2{padding-bottom:calc(var( --spacing-base )*1)}.DdywPW2qSYlu2pt8tpO2,.npy3hw4A5QSkDicb2CJJ{padding-top:calc(var( --spacing-base )*1)}.LgbptTApNY5NwLQvEFAt{padding-left:calc(var( --spacing-base )*1)}.WZQy2SZuZso59bUsXXyl{padding-bottom:calc(var( --spacing-base )*1)}.o331apInxNunbYB3SfPE{padding-right:calc(var( --spacing-base )*1)}.fMPIyD9Vqki1Lrc_yJnG{padding:calc(var( --spacing-base )*2)}.i2pMcTcdrr10IQoiSm_L{padding-left:calc(var( --spacing-base )*2);padding-right:calc(var( --spacing-base )*2)}.eA702gn32kwptiI1obXH{padding-bottom:calc(var( --spacing-base )*2)}.eA702gn32kwptiI1obXH,.o9bGieUKcYc8o0Ij9oZX{padding-top:calc(var( --spacing-base )*2)}.SwZcFez1RDqWsOFjB5iG{padding-left:calc(var( --spacing-base )*2)}.eHpLc_idmuEqeqCTvqkN{padding-bottom:calc(var( --spacing-base )*2)}.vU39i2B4P1fUTMB2l6Vo{padding-right:calc(var( --spacing-base )*2)}.JHWNzBnE29awhdu5BEh1{padding:calc(var( --spacing-base )*3)}.X72lGbb56L3KFzC2xQ9N{padding-left:calc(var( --spacing-base )*3);padding-right:calc(var( --spacing-base )*3)}.BzfNhRG8wXdCEB5ocQ6e{padding-bottom:calc(var( --spacing-base )*3)}.BzfNhRG8wXdCEB5ocQ6e,.srV0KSDC83a2fiimSMMQ{padding-top:calc(var( --spacing-base )*3)}.lUWfkmbQjCskhcNwkyCm{padding-left:calc(var( --spacing-base )*3)}.Ts0dIlc3aTSL7V4cIHis{padding-bottom:calc(var( --spacing-base )*3)}.CzlqQXXhX6MvorArFZ8B{padding-right:calc(var( --spacing-base )*3)}.TqMPkQtR_DdZuKb5vBoV{padding:calc(var( --spacing-base )*4)}.a7UrjhI69Vetlcj9ZVzz{padding-left:calc(var( --spacing-base )*4);padding-right:calc(var( --spacing-base )*4)}.StEhBzGs2Gi5dDEkjhAv{padding-bottom:calc(var( --spacing-base )*4)}.FGneZfZyvYrt1dG0zcnm,.StEhBzGs2Gi5dDEkjhAv{padding-top:calc(var( --spacing-base )*4)}.APEH216rpdlJWgD2fHc8{padding-left:calc(var( --spacing-base )*4)}.oGwXC3ohCic9XnAj6x69{padding-bottom:calc(var( --spacing-base )*4)}.U6gnT9y42ViPNOcNzBwb{padding-right:calc(var( --spacing-base )*4)}.IpdRLBwnHqbqFrixgbYC{padding:calc(var( --spacing-base )*5)}.HgNeXvkBa9o3bQ5fvFZm{padding-left:calc(var( --spacing-base )*5);padding-right:calc(var( --spacing-base )*5)}.tJtFZM3XfPG9v9TSDfN1{padding-bottom:calc(var( --spacing-base )*5)}.PdifHW45QeXYfK568uD8,.tJtFZM3XfPG9v9TSDfN1{padding-top:calc(var( --spacing-base )*5)}.mbLkWTTZ0Za_BBbFZ5b2{padding-left:calc(var( --spacing-base )*5)}.vVWpZpLlWrkTt0hMk8XU{padding-bottom:calc(var( --spacing-base )*5)}.RxfaJj5a1Nt6IavEo5Zl{padding-right:calc(var( --spacing-base )*5)}.SppJULDGdnOGcjZNCYBy{padding:calc(var( --spacing-base )*6)}.palY2nLwdoyooPUm9Hhk{padding-left:calc(var( --spacing-base )*6);padding-right:calc(var( --spacing-base )*6)}.WYw1JvZC0ppLdvSAPhr_{padding-bottom:calc(var( --spacing-base )*6)}.WYw1JvZC0ppLdvSAPhr_,.YEEJ9b90ueQaPfiU8aeN{padding-top:calc(var( --spacing-base )*6)}.QE0ssnsKvWJMqlhPbY5u{padding-left:calc(var( --spacing-base )*6)}.n8yA3jHlMRyLd5UIfoND{padding-bottom:calc(var( --spacing-base )*6)}.tXHmxYnHzbwtfxEaG51n{padding-right:calc(var( --spacing-base )*6)}.kBTsPKkO_3g_tLkj77Um{padding:calc(var( --spacing-base )*7)}.RyhrFx6Y1FGDrGAAyaxm{padding-left:calc(var( --spacing-base )*7);padding-right:calc(var( --spacing-base )*7)}.CBwRpB0bDN3iEdQPPMJO{padding-bottom:calc(var( --spacing-base )*7)}.CBwRpB0bDN3iEdQPPMJO,.vQVSq6SvWKbOMu6r4H6b{padding-top:calc(var( --spacing-base )*7)}.oBy5__aEADMsH46mrgFX{padding-left:calc(var( --spacing-base )*7)}.KVEXoJqf1s92j0JMdNmN{padding-bottom:calc(var( --spacing-base )*7)}.ZMXGNrNaKW3k_3TLz0Fq{padding-right:calc(var( --spacing-base )*7)}.tuiR9PhkHXhGyEgzRZRI{padding:calc(var( --spacing-base )*8)}.U7454qyWkQNa2iaSJziu{padding-left:calc(var( --spacing-base )*8);padding-right:calc(var( --spacing-base )*8)}.VLYIv2GVocjuN93e8HC8{padding-bottom:calc(var( --spacing-base )*8)}.VLYIv2GVocjuN93e8HC8,.X1rm9DQ1zLGLfogja5Gn{padding-top:calc(var( --spacing-base )*8)}.JS7G6kAuqJo5GIuF8S5t{padding-left:calc(var( --spacing-base )*8)}.Y8F9ga1TDCMbM1lj4gUz{padding-bottom:calc(var( --spacing-base )*8)}.AJuyNGrI63BOWql719H8{padding-right:calc(var( --spacing-base )*8)}:root{--font-title-large:36px;--font-title-small:24px;--font-body:16px;--font-label:12px;--jp-black:#000;--jp-black-80:#2c3338;--jp-white:#fff;--jp-white-off:#f9f9f6;--jp-gray:#dcdcde;--jp-gray-0:#f6f7f7;--jp-gray-5:#dcdcde;--jp-gray-10:#c3c4c7;--jp-gray-20:#a7aaad;--jp-gray-30:#8c8f94;--jp-gray-40:#787c82;--jp-gray-50:#646970;--jp-gray-60:#50575e;--jp-gray-70:#3c434a;--jp-gray-80:#2c3338;--jp-gray-90:#1d2327;--jp-gray-100:#101517;--jp-gray-off:#e2e2df;--jp-yellow-5:#f5e6b3;--jp-yellow-10:#f2cf75;--jp-orange-20:#faa754;--jp-blue-5:#ced9f2;--jp-red-0:#f7ebec;--jp-red-50:#d63638;--jp-red-60:#b32d2e;--jp-red-80:#8a2424;--jp-red:#d63639;--jp-pink:#c9356e;--jp-green-0:#f0f2eb;--jp-green-5:#d0e6b8;--jp-green-10:#9dd977;--jp-green-20:#64ca43;--jp-green-30:#2fb41f;--jp-green-40:#069e08;--jp-green-50:#008710;--jp-green-60:#007117;--jp-green-70:#005b18;--jp-green-80:#004515;--jp-green-90:#003010;--jp-green-100:#001c09;--jp-green:#069e08;--jp-green-primary:var(--jp-green-40);--jp-green-secondary:var(--jp-green-30);--jp-border-radius:4px;--jp-border-radius-rna:8px;--jp-menu-border-height:1px;--jp-underline-thickness:2px;--jp-modal-padding-large:32px;--jp-modal-padding:24px;--jp-modal-padding-small:16px;--jp-modal-radius:8px;--jp-button-padding:8px;--jp-button-radius:4px;--jp-gap:16px;--jp-highlight:#3858e9}body{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;margin:0;min-height:100%;padding:0}.jp-wrap{align-items:center;display:flex;flex-wrap:wrap;margin:0 auto;max-width:1128px}.jp-row{display:grid;grid-gap:24px;grid-template-columns:repeat(4,1fr);margin:0 16px;width:100%}@media(min-width:600px){.jp-row{grid-template-columns:repeat(8,1fr);margin:0 18px}}@media(min-width:960px){.jp-row{grid-template-columns:repeat(12,1fr);margin:0 24px;max-width:1128px}}.sm-col-span-1{grid-column-end:span 1}.sm-col-span-2{grid-column-end:span 2}.sm-col-span-3{grid-column-end:span 3}.sm-col-span-4{grid-column-end:span 4}@media(min-width:600px){.md-col-span-1{grid-column-end:span 1}.md-col-span-2{grid-column-end:span 2}.md-col-span-3{grid-column-end:span 3}.md-col-span-4{grid-column-end:span 4}.md-col-span-5{grid-column-end:span 5}.md-col-span-6{grid-column-end:span 6}.md-col-span-7{grid-column-end:span 7}.md-col-span-8{grid-column-end:span 8}}@media(min-width:960px){.lg-col-span-1{grid-column-end:span 1}.lg-col-span-2{grid-column-end:span 2}.lg-col-span-3{grid-column-end:span 3}.lg-col-span-4{grid-column-end:span 4}.lg-col-span-5{grid-column-end:span 5}.lg-col-span-6{grid-column-end:span 6}.lg-col-span-7{grid-column-end:span 7}.lg-col-span-8{grid-column-end:span 8}.lg-col-span-9{grid-column-end:span 9}.lg-col-span-10{grid-column-end:span 10}.lg-col-span-11{grid-column-end:span 11}.lg-col-span-12{grid-column-end:span 12}}@media(max-width:960px){.md-col-span-0{display:none}}@media(max-width:600px){.sm-col-span-0{display:none}}.jp-cut{border:2px solid var(--jp-green-primary);border-radius:var(--jp-border-radius);margin:32px 0;padding:16px 24px 16px 64px;position:relative;text-decoration:none}.jp-cut,.jp-cut span{display:block}.jp-cut span:last-of-type{font-weight:600}.jp-cut:focus span:last-of-type,.jp-cut:hover span:last-of-type{text-decoration:underline;text-decoration-thickness:var(--jp-underline-thickness)}.jp-cut:focus:after,.jp-cut:hover:after{transform:translateY(-50%) translateX(-8px)}.jp-cut:after{color:var(--jp-green-primary);content:"→";font-size:24px;font-weight:600;left:24px;position:absolute;top:50%;transform:translateY(-50%);transition:transform .15s ease-out}.components-popover:not(.is-without-arrow):before{border-color:var(--jp-gray)}.icon-tooltip-helper .components-popover:not([data-y-axis=middle])[data-x-axis=left] .components-popover__content{margin-left:-62px}.icon-tooltip-helper .components-popover:not([data-y-axis=middle])[data-x-axis=right] .components-popover__content{margin-right:-62px}.icon-tooltip-helper .components-popover[data-y-axis=bottom] .components-popover__content{top:2px!important}.icon-tooltip-helper .components-popover:not(.is-without-arrow)[data-y-axis=bottom]:before{top:-6px!important}.icon-tooltip-helper .components-popover:not(.is-without-arrow)[data-y-axis=bottom]:after{top:-4px!important}.icon-tooltip-helper .components-popover[data-y-axis=top] .components-popover__content{bottom:10px!important}.icon-tooltip-helper .components-popover:not(.is-without-arrow)[data-y-axis=top]:before{bottom:3px}.icon-tooltip-helper .components-popover:not(.is-without-arrow)[data-y-axis=top]:after{bottom:4px}.icon-tooltip-helper.is-wide .components-popover__content{width:440px}.icon-tooltip-wrapper{color:var(--jp-black);display:inline-block;position:relative}.icon-tooltip-wrapper .components-button.is-link:focus:not(:disabled){box-shadow:none}.icon-tooltip-helper{height:18px;pointer-events:none;position:absolute;right:-53px;top:0;width:124px}.icon-tooltip-container{pointer-events:all}.icon-tooltip-container .components-popover__content{border:1px solid var(--jp-gray);border-radius:4px;margin:0 10px;max-width:90vw;outline:none;padding:24px;white-space:normal;width:304px}.icon-tooltip-title{font-size:16px;font-weight:600;line-height:19px}.icon-tooltip-title:not(:last-child){margin-bottom:8px}.icon-tooltip-content{font-size:14px;font-weight:400;line-height:24px}.icon-tooltip-content ul{list-style-type:disc;margin:0 1rem 0 0}.icon-tooltip-content ul li:last-child{margin-bottom:0}.zI5tJ_qhWE6Oe6Lk75GY{--wp-admin-theme-color:var(--jp-black);--wp-admin-theme-color-darker-10:var(--jp-black-80);--wp-admin-theme-color-darker-20:var(--jp-black-80);--wp-admin-border-width-focus:1.51px;border-radius:var(--jp-border-radius);font-weight:600;justify-content:center}.zI5tJ_qhWE6Oe6Lk75GY.tuBt2DLqimiImoqVzPqo{height:calc(var(--spacing-base)*5);padding:var(--spacing-base);width:calc(var(--spacing-base)*5)}.zI5tJ_qhWE6Oe6Lk75GY.tuBt2DLqimiImoqVzPqo>svg:first-child{margin:0;padding:0}.zI5tJ_qhWE6Oe6Lk75GY.tuBt2DLqimiImoqVzPqo.Na39I683LAaSA99REg14{height:calc(var(--spacing-base)*4);min-width:calc(var(--spacing-base)*4);padding:calc(var(--spacing-base)/2);width:calc(var(--spacing-base)*4)}.zI5tJ_qhWE6Oe6Lk75GY.ipS7tKy9GntCS4R3vekF:not(.tuBt2DLqimiImoqVzPqo){font-size:var(--font-body);height:auto;line-height:24px;padding:var(--spacing-base) calc(var(--spacing-base)*3)}.zI5tJ_qhWE6Oe6Lk75GY.ipS7tKy9GntCS4R3vekF:not(.tuBt2DLqimiImoqVzPqo).paGLQwtPEaJmtArCcmyK{padding:var(--spacing-base) calc(var(--spacing-base)*2)}.zI5tJ_qhWE6Oe6Lk75GY.Na39I683LAaSA99REg14:not(.tuBt2DLqimiImoqVzPqo){font-size:var(--font-body-extra-small);height:auto;line-height:20px;padding:calc(var(--spacing-base)/2) var(--spacing-base)}.zI5tJ_qhWE6Oe6Lk75GY.Na39I683LAaSA99REg14:not(.tuBt2DLqimiImoqVzPqo).paGLQwtPEaJmtArCcmyK>svg:first-child{margin-left:calc(var(--spacing-base)/2)}.zI5tJ_qhWE6Oe6Lk75GY.Na39I683LAaSA99REg14:not(.tuBt2DLqimiImoqVzPqo)>.components-spinner{height:20px}.zI5tJ_qhWE6Oe6Lk75GY.lZAo6_oGfclXOO9CC6Rd{font-weight:400}.zI5tJ_qhWE6Oe6Lk75GY.xJDOiJxTt0R_wSl8Ipz_{min-width:100%}.zI5tJ_qhWE6Oe6Lk75GY.is-primary:disabled,.zI5tJ_qhWE6Oe6Lk75GY.is-secondary:disabled{background:var(--jp-gray);color:var(--jp-gray-20)}.zI5tJ_qhWE6Oe6Lk75GY.is-secondary{background:var(--jp-white);box-shadow:inset 0 0 0 1.51px var(--jp-black)}.zI5tJ_qhWE6Oe6Lk75GY.is-secondary:active:not(:disabled),.zI5tJ_qhWE6Oe6Lk75GY.is-secondary:hover:not(:disabled){background:var(--jp-gray-0)}.zI5tJ_qhWE6Oe6Lk75GY.is-link.Na39I683LAaSA99REg14,.zI5tJ_qhWE6Oe6Lk75GY.is-link.ipS7tKy9GntCS4R3vekF{padding:0}.zI5tJ_qhWE6Oe6Lk75GY.is-link:hover:not(:disabled){text-decoration-thickness:3px}.zI5tJ_qhWE6Oe6Lk75GY.is-link:focus:not(:disabled){text-decoration-line:none}.zI5tJ_qhWE6Oe6Lk75GY.is-destructive.is-primary{box-shadow:none}.zI5tJ_qhWE6Oe6Lk75GY.is-destructive.is-primary:not(:disabled){background:var(--jp-red-50);box-shadow:inset 0 0 0 1px var(--jp-red-50);color:var(--jp-white)}.zI5tJ_qhWE6Oe6Lk75GY.is-destructive.is-primary:hover:not(:disabled){background:var(--jp-red-60);box-shadow:inset 0 0 0 1px var(--jp-red-60)}.zI5tJ_qhWE6Oe6Lk75GY.is-destructive.is-primary:focus:not(:disabled){background:var(--jp-red-70);box-shadow:inset 0 0 0 1px var(--jp-white),0 0 0 var(--wp-admin-border-width-focus) var(--jp-red-70);color:var(--jp-white)}.zI5tJ_qhWE6Oe6Lk75GY.is-destructive.is-primary:active:not(:disabled){background:var(--jp-red-50)}.zI5tJ_qhWE6Oe6Lk75GY.is-destructive.is-secondary{box-shadow:none}.zI5tJ_qhWE6Oe6Lk75GY.is-destructive.is-secondary:not(:disabled){background:var(--jp-white);box-shadow:inset 0 0 0 1.5px var(--jp-red-50);color:var(--jp-red-50)}.zI5tJ_qhWE6Oe6Lk75GY.is-destructive.is-secondary:hover:not(:disabled){background:var(--jp-red-0);box-shadow:inset 0 0 0 1.5px var(--jp-red-60);color:var(--jp-red-60)}.zI5tJ_qhWE6Oe6Lk75GY.is-destructive.is-secondary:focus:not(:disabled){box-shadow:inset 0 0 0 1px var(--jp-white),0 0 0 var(--wp-admin-border-width-focus) var(--jp-red-70);color:var(--jp-red-70)}.zI5tJ_qhWE6Oe6Lk75GY.is-destructive.is-secondary:active:not(:disabled){background:var(--jp-gray-0)}.zI5tJ_qhWE6Oe6Lk75GY.is-destructive.is-link:not(:disabled){color:var(--jp-red-50)}.zI5tJ_qhWE6Oe6Lk75GY.is-destructive.is-link:hover:not(:disabled){box-shadow:none;color:var(--jp-red-60)}.zI5tJ_qhWE6Oe6Lk75GY.is-destructive.is-link:focus:not(:disabled){box-shadow:inset 0 0 0 1px var(--jp-white),0 0 0 var(--wp-admin-border-width-focus) var(--jp-red-70);color:var(--jp-red-70)}.zI5tJ_qhWE6Oe6Lk75GY.q_tVWqMjl39RcY6WtQA6{position:relative}.zI5tJ_qhWE6Oe6Lk75GY.q_tVWqMjl39RcY6WtQA6.has-icon{justify-content:center}.zI5tJ_qhWE6Oe6Lk75GY.q_tVWqMjl39RcY6WtQA6>:not(.components-spinner){visibility:hidden}.zI5tJ_qhWE6Oe6Lk75GY.q_tVWqMjl39RcY6WtQA6>.components-spinner{margin:0;position:absolute}.CDuBjJp_8jxzx5j6Nept{margin-right:calc(var(--spacing-base)/2)}.gridicon{fill:currentColor;display:inline-block}.gridicon.needs-offset g{transform:translate(-1px,1px)}.gridicon.needs-offset-x g{transform:translate(-1px)}.gridicon.needs-offset-y g{transform:translateY(1px)}.terms-of-service{color:var(--jp-black);font-size:var(--font-body)}.terms-of-service .terms-of-service__link{color:var(--jp-green-50);text-decoration:underline;white-space:nowrap}.dovianZYLKhnbnh9I06o{align-items:flex-start;display:flex;flex-wrap:wrap;justify-content:flex-end}.lljtQMhW7lq5tE5SDJEf{align-items:flex-start;display:flex;flex-basis:0;flex-grow:2}.lljtQMhW7lq5tE5SDJEf .NubApIV1vQCRUNprfm6b{margin-right:auto}.dhFQXpZfMwVI8vuYHnwC{align-items:flex-start;display:inline-flex;flex:0 0 auto;position:relative}.dhFQXpZfMwVI8vuYHnwC:first-child{margin-left:calc(var(--spacing-base)*2)}.dhFQXpZfMwVI8vuYHnwC.eD7hzxFmdtG_MgmBtl_k{color:var(--jp-gray-20)}.dhFQXpZfMwVI8vuYHnwC.eD7hzxFmdtG_MgmBtl_k:after{background:var(--jp-red);border-radius:var(--jp-border-radius);content:" ";display:block;height:3px;margin-top:-2px;pointer-events:none;position:absolute;top:50%;width:100%}.C64ZjjUAqJC1T2Sa7apS{align-items:flex-start;display:flex;flex-wrap:wrap;justify-content:flex-start;margin-bottom:calc(var(--spacing-base)*3)}.UpZDGew6Ay1hPoP6eI7b{color:var(--jp-gray-40);font-size:var(--font-body-small);line-height:20px}.UpZDGew6Ay1hPoP6eI7b:after{content:"​"}.NubApIV1vQCRUNprfm6b{background-color:var(--jp-yellow-10);border-radius:4px;font-size:13px;font-weight:600;margin-right:var(--spacing-base);padding-left:var(--spacing-base);padding-right:var(--spacing-base)}.TDiiPbuW1Z0_05u_pvcK{font-weight:400}.UL3B1tQ854mN7r6taB61{align-items:center;display:flex;flex-wrap:wrap;justify-content:space-between}.IG56Hw7ZR_7rKVsM78qw:focus:not(:disabled){box-shadow:none}.sexr0jUxC1jVixdKiDnC{margin-right:-20px}@media(max-width:782px){.sexr0jUxC1jVixdKiDnC{margin-right:-10px}}.sexr0jUxC1jVixdKiDnC.vKQ11sLeAM45M04P1ccj{background-color:var(--jp-white)}.SqdhUZkXCRuIpErj1B3z{--max-container-width:1128px;--vertical-gutter:24px;--horizontal-spacing:8px;column-gap:var(--vertical-gutter);display:grid;margin:0 auto;max-width:var(--max-container-width);width:100%}@media(max-width:599px){.SqdhUZkXCRuIpErj1B3z{grid-template-columns:repeat(4,minmax(0,1fr));padding:0 16px}}@media(min-width:600px)and (max-width:959px){.SqdhUZkXCRuIpErj1B3z{grid-template-columns:repeat(8,minmax(0,1fr));padding:0 18px}}@media(min-width:960px){.SqdhUZkXCRuIpErj1B3z{grid-template-columns:repeat(12,minmax(0,1fr));padding:0 24px}}.SqdhUZkXCRuIpErj1B3z.OZC_9a1LhpWF9dv15Gdh{max-width:none;padding:unset}@media(max-width:599px){.RuVLl3q4lxTQa3wbhBJB{grid-column-end:span 1}.f9LZTRG4MMK42rS89afW{grid-column-start:1}.bHe_zKxjjpUwHw_MdYE1{grid-column-end:2}.QZbNrOqE2aNSn50xVhpU{grid-column-end:span 2}.ev7W3z7zVYPeHAlYqZjf{grid-column-start:2}.NJWd1m_e7lOiPYru2ZMP{grid-column-end:3}.Xc6nt1Qc1DI0Z2A3gt1r{grid-column-end:span 3}.UIcN_GXiPRoIsin8Kohg{grid-column-start:3}.GRKCyqb5LufCSCgykKFc{grid-column-end:4}.i_qTq8gqhhC3vIUepVRB{grid-column-end:span 4}.G3qaZ3Jpbvam_1XvGxgc{grid-column-start:4}.VRCNYKZtO9zukEwmgP1y{grid-column-end:5}}@media(min-width:600px)and (max-width:959px){.tRm008K_WJL79WoNZTNL{grid-column-end:span 1}.l5T2P_bgKts4tdaRkS1d{grid-column-start:1}.zOCxfLZpF6BlgC7a_Yq1{grid-column-end:2}.F80DdgVn0m5OpvtSQWka{grid-column-end:span 2}.oI1c7JYfiJtMQHbhngtU{grid-column-start:2}.pMQtA_4jh1_1lVknqEP5{grid-column-end:3}.VenqMpdgyKQVUNNQcfqd{grid-column-end:span 3}.seNYL99uoczf9V4MxBxT{grid-column-start:3}.YKfF1HFhI9KygA5l3b2J{grid-column-end:4}.yAi0Cv1xDWkoqsaUhvhR{grid-column-end:span 4}.ubhnyZOnkgxNhh6XtVWv{grid-column-start:4}.RGOPGQbWMJ9Ei5oFxS7X{grid-column-end:5}.Sz1E2aWbX483ijdi6yge{grid-column-end:span 5}.tku6_bRYrX9tMbgYGmIl{grid-column-start:5}.b5JHttOhSEcI1WBlqAjk{grid-column-end:6}.FboSx5MoKTAWbxXyYlCw{grid-column-end:span 6}.Jhs8yEEmodG30edbJvag{grid-column-start:6}.IpzbbKVqEqPcfIGkXkwt{grid-column-end:7}.mhCPwfAZ4Kmm_empzJAq{grid-column-end:span 7}.x034ilrJF7rO9UJB2rI1{grid-column-start:7}.Wt8t2e16viRrOJ1lLA5v{grid-column-end:8}.S6pIrEy9AMLKx9bgh_Ae{grid-column-end:span 8}.kEfI4tGyuWfHTlRnvIab{grid-column-start:8}.PUzX4RRsKq1dnsz3gebS{grid-column-end:9}}@media(min-width:960px){.X_pdcLJikd8LS_YAdJlB{grid-column-end:span 1}.tl936d14Huby4khYp05X{grid-column-start:1}.hnge0LnR69d3NXEtEE1t{grid-column-end:2}.fj0NUMuyZQcPNgKcjp5Z{grid-column-end:span 2}.R2ncBX7a2NigdYCcV1OX{grid-column-start:2}.t8vMSDVYno9k9itRwnXb{grid-column-end:3}.wsDuEN2GqHx6qzo8dUdk{grid-column-end:span 3}.cIEVPUweWtLBy3xaXnMx{grid-column-start:3}.fajUWBwu1m2B479j3jmz{grid-column-end:4}.YR0c7fQTgMkDdWzwSyLp{grid-column-end:span 4}.xlwp8BmplxkKNMI7gamo{grid-column-start:4}._C4O1w9DUqx1m3gPf8aA{grid-column-end:5}.Z54F1hAErckAIrKlxnXW{grid-column-end:span 5}.ezSDWkRHmKSxDJXxuiOH{grid-column-start:5}.T0ChoeAjGJjkkNrYhD4g{grid-column-end:6}.qtMoMPF6yHvGJnWHSsde{grid-column-end:span 6}.gdoywN5VPiWERfIBqkph{grid-column-start:6}.wUev_VH5uf_pwFFlbnAU{grid-column-end:7}.egIPDFJsOpownTClq9XP{grid-column-end:span 7}.yGhp9yoAW7k0kQik9AB7{grid-column-start:7}.SJ43U9mR5wUg5V2qBeQA{grid-column-end:8}.cTuyHfMwSUJxN_HdIEgd{grid-column-end:span 8}.smCr8DaIagcumdvdldiK{grid-column-start:8}.T03NHzQJvzwL6wAfIiTL{grid-column-end:9}.pMvxM3RJGjqyNdf9qg1Y{grid-column-end:span 9}.iIVpNRwEnQ_JI5gpp9EN{grid-column-start:9}.ZbQ4u4vGSX5rJOje4uGL{grid-column-end:10}.gKb5wuIDAlKGbrjK2vxy{grid-column-end:span 10}.Z7pINdImE2WJiYnZBTqm{grid-column-start:10}.ZTxp6qpvwurMdOnLLSz1{grid-column-end:11}.NnQTlbfnxPDR6cQ7rygg{grid-column-end:span 11}.O137wZd6Yl0olSA9PsXR{grid-column-start:11}.zf2OJtQ2MPz6SDoh6CB0{grid-column-end:12}.U3H6UHW6HqRt9hdzVg3O{grid-column-end:span 12}.zynnNeS_ZBTxABcVpUQH{grid-column-start:12}.vI8tltFZtFUNAy9Iag9s{grid-column-end:13}}.jp-dashboard-footer{align-items:center;color:var(--jp-black);display:flex;flex-wrap:wrap;font-size:var(--font-body-extra-small);line-height:1.333;max-width:1128px;width:100%}.jp-dashboard-footer a{text-decoration:none}.jp-dashboard-footer a:any-link,.jp-dashboard-footer a[role=button]{color:inherit}.jp-dashboard-footer a:hover{text-decoration:underline;text-decoration-thickness:1.5px}.jp-dashboard-footer a:focus{border-radius:2px;box-shadow:none;outline:1.5px solid currentColor;outline-offset:3px}.jp-dashboard-footer.is-sm>ul{gap:.125rem}.jp-dashboard-footer.is-md,.jp-dashboard-footer.is-sm>ul{align-items:flex-start;flex-direction:column}.jp-dashboard-footer>ul{align-items:center;display:flex;flex-wrap:wrap;gap:1rem;list-style:none;margin:0;padding:0;width:100%}.jp-dashboard-footer>ul>li{margin-bottom:0}.jp-dashboard-footer>ul>li>a{align-items:center;display:flex;gap:.25rem;min-height:44px}.jp-dashboard-footer__accessible-external-link{border:0;clip:rect(1px,1px,1px,1px);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;overflow-wrap:normal;padding:0;position:absolute;width:1px}.jp-dashboard-footer__jp-item{font-weight:600;padding-inline-end:1rem}.jp-dashboard-footer.is-sm .jp-dashboard-footer__jp-item{padding-bottom:1rem}.jp-dashboard-footer.is-lg .jp-dashboard-footer__a8c-item{margin-inline-start:auto}.jp-dashboard-footer.is-sm .jp-dashboard-footer__a8c-item{padding-top:1rem}.jp-dashboard-footer__a8c-item>a,.jp-dashboard-footer__jp-item>a{text-decoration:none}.vMa4i_Dza2t5Zi_Bw9Nf{background:var(--jp-white-off)}._aiMxmJRAw5jRPbZFX57{background-color:var(--jp-gray-90);border-radius:var(--jp-border-radius);color:var(--jp-white);display:flex;overflow:hidden}._aiMxmJRAw5jRPbZFX57.eWgNBUaexiR66ZI1Px4U{border-right:4px solid var(--jp-yellow-20);margin-bottom:calc(var(--spacing-base)*3)}._aiMxmJRAw5jRPbZFX57.ZGELG1CO333FilJXOaeI{left:calc(var(--spacing-base)*3);margin-right:calc(var(--spacing-base)*3);position:fixed;top:calc(var(--spacing-base)*6)}@media(max-width:782px){._aiMxmJRAw5jRPbZFX57.ZGELG1CO333FilJXOaeI{top:calc(var(--spacing-base)*8)}}._aiMxmJRAw5jRPbZFX57 a,._aiMxmJRAw5jRPbZFX57 a:active,._aiMxmJRAw5jRPbZFX57 a:hover,._aiMxmJRAw5jRPbZFX57 a:link,._aiMxmJRAw5jRPbZFX57 a:visited{color:var(--jp-white)}.BnI88X_e8ItF1c9Uozmj{background-color:var(--jp-yellow-30);fill:var(--jp-white);align-items:center;display:flex;justify-content:center;padding:calc(var(--spacing-base)*1.5)}.hRRUwTCPRpurhMwRNZkg .BnI88X_e8ItF1c9Uozmj{background-color:var(--jp-green-50)}.Z6q3IxY_uR1y2lAPTkVF .BnI88X_e8ItF1c9Uozmj{background-color:var(--jp-red)}.eWgNBUaexiR66ZI1Px4U .BnI88X_e8ItF1c9Uozmj{fill:var(--jp-yellow-50);background-color:var(--jp-yellow-5)}.ST8sowTbBVLRPrk4ZQrn{font-size:14px;padding:calc(var(--spacing-base)*1.75)}.eWgNBUaexiR66ZI1Px4U .ST8sowTbBVLRPrk4ZQrn{background-color:var(--jp-yellow-5);color:var(--jp-gray-90)}.lMkO08Vd8YQMfwrwaI8u{fill:var(--jp-gray);align-items:center;background:#0000;border:none;cursor:pointer;display:flex;justify-content:center;padding:calc(var(--spacing-base)*1.5)}.lyrXe0pA852TUmyekDb5{display:flex}.KgEeDTKgTC5ZjzYlbTqN{color:var(--jp-black);font-size:var(--font-body);line-height:1.5;margin-left:calc(var(--spacing-base)*4);padding:var(--spacing-base) 0;text-decoration:none}.KgEeDTKgTC5ZjzYlbTqN:last-child{margin-left:0}.KgEeDTKgTC5ZjzYlbTqN:focus,.KgEeDTKgTC5ZjzYlbTqN:hover{border-bottom-color:var(--jp-green);box-shadow:none;color:var(--jp-green)}.Lv4WoNVkeJntqvUyG4dX{border-bottom:1px solid var(--jp-black)}.vvXnRXxrU1kP1KsdSr4J{margin-top:calc(var(--spacing-base)*3*-1)}.aDCTkUFaJEeZzYYE6qv5{background-color:var(--jp-green);border-radius:32px;color:var(--jp-white);font-size:12px;letter-spacing:-2%;line-height:1;margin-right:var(--spacing-base);padding:calc(var(--spacing-base)/2) var(--spacing-base);position:relative;top:-1px}.uQlXhcfYn9tbnK27_Gct{align-items:center;display:flex}.uQlXhcfYn9tbnK27_Gct input[type=checkbox]:checked,.uQlXhcfYn9tbnK27_Gct input[type=checkbox]:indeterminate{background:var(--jp-green-40);border-color:var(--jp-green-40)}.uQlXhcfYn9tbnK27_Gct input[type=checkbox]:focus{box-shadow:0 0 0 2px #fff,0 0 0 4px var(--jp-green-40)}.PO9zDOaSkcv_RqpfZF_v,.e5YHJiYcvfgdEEJsS_YM{margin-bottom:calc(var(--spacing-base)*7);margin-top:calc(var(--spacing-base)*7)}@media(max-width:599px){.PO9zDOaSkcv_RqpfZF_v{margin-top:0}}svg.V6B8ltQ7TH3UKzUC_qy1{color:var(--jp-black);height:32px;margin:0;width:32px}.C9hcvYAbgHPhN2Tl22xg{align-items:center;display:flex;flex-wrap:wrap;justify-content:flex-start}.C9hcvYAbgHPhN2Tl22xg .XkbIpr2gzB4XEhHgzkY4{margin-left:calc(var(--spacing-base)/2)}.BfcZn0_X33Ajdd1Gl18G{display:flex}.BfcZn0_X33Ajdd1Gl18G>.rBmVJIeTNpd0RJWaRGuJ{display:flex;margin-right:calc(var(--spacing-base)/2);fill:var(--jp-gray-20)}.jVq5444f1Xh6nNkz0Qe_{margin-top:calc(var(--spacing-base)*4)}.amF9cOnMiv2nHbkMXQiQ{align-items:center;display:flex;flex-wrap:wrap;justify-content:space-between}.FodE_7RbLD8zeBSd6eVR{display:flex;flex-wrap:wrap;margin-right:auto}.FodE_7RbLD8zeBSd6eVR>:first-child{margin-left:calc(var(--spacing-base)*3)}.twyPhW_K164HITnDrwEg{padding:calc(var(--spacing-base)*2);width:250px}.tbcd9xc_TjcFdokOt3F_{font-size:18px}@media(max-width:599px){.pnoqLV3l30xuvj2hLlJc{width:90%}.FodE_7RbLD8zeBSd6eVR{margin-top:calc(var(--spacing-base)*3)}.FodE_7RbLD8zeBSd6eVR>:first-child{margin-bottom:var(--spacing-base);margin-left:0}}.bZ4b33s2MdcOjaDKBbeV{--spacing-base:8px;--wp-admin-border-width-focus:1.5px;align-items:center;display:flex;white-space:nowrap}.UzkzDaqt2mXprJh2OXRz{background-color:var(--jp-gray-50);border-radius:50%;flex-shrink:0;height:.666em;width:.666em}.QuS0vdcr87FsiBvSSrvA{font-weight:600;line-height:1.666;margin-right:calc(var(--spacing-base)/2)}.bZ4b33s2MdcOjaDKBbeV.bGx0wbQAwuY7k8P3PHVQ a,.bZ4b33s2MdcOjaDKBbeV.bGx0wbQAwuY7k8P3PHVQ span{color:var(--jp-green-50)}.bZ4b33s2MdcOjaDKBbeV.bGx0wbQAwuY7k8P3PHVQ .UzkzDaqt2mXprJh2OXRz{background-color:var(--jp-green-50)}.bZ4b33s2MdcOjaDKBbeV.wR8Cz8uHgObTQavolv5y a,.bZ4b33s2MdcOjaDKBbeV.wR8Cz8uHgObTQavolv5y span{color:var(--jp-gray-50)}.bZ4b33s2MdcOjaDKBbeV.wR8Cz8uHgObTQavolv5y .UzkzDaqt2mXprJh2OXRz{background-color:var(--jp-gray-50)}.bZ4b33s2MdcOjaDKBbeV.IzbBYGwBKhSYFUQlIMww a,.bZ4b33s2MdcOjaDKBbeV.IzbBYGwBKhSYFUQlIMww span{color:var(--jp-red-50)}.bZ4b33s2MdcOjaDKBbeV.IzbBYGwBKhSYFUQlIMww .UzkzDaqt2mXprJh2OXRz{background-color:var(--jp-red-50)}.bZ4b33s2MdcOjaDKBbeV.Kdvp_HJf89IBrZuCaLm8 a,.bZ4b33s2MdcOjaDKBbeV.Kdvp_HJf89IBrZuCaLm8 span{color:var(--jp-yellow-30)}.bZ4b33s2MdcOjaDKBbeV.Kdvp_HJf89IBrZuCaLm8 .UzkzDaqt2mXprJh2OXRz{background-color:var(--jp-yellow-30)}.bZ4b33s2MdcOjaDKBbeV.hVf5vsbBWm8OFye7cy7a a,.bZ4b33s2MdcOjaDKBbeV.hVf5vsbBWm8OFye7cy7a span{color:var(--jp-blue-40)}.bZ4b33s2MdcOjaDKBbeV.hVf5vsbBWm8OFye7cy7a .UzkzDaqt2mXprJh2OXRz{background-color:var(--jp-blue-40)}.IunwKwdvL271DxBIniPb[type=checkbox]{display:none}.svA9WxEcOByd5S2fZonA{border:2px solid var(--jp-black);border-radius:100px;box-sizing:border-box;cursor:pointer;display:inline-block;height:24px;outline:0;padding:2px;position:relative;transition:all .4s ease,box-shadow 0s;vertical-align:middle;width:48px}.svA9WxEcOByd5S2fZonA:after{background:var(--jp-black);border-radius:50%;content:"";display:block;height:16px;position:relative;right:0;transition:all .2s ease;width:16px}.IunwKwdvL271DxBIniPb:checked+.svA9WxEcOByd5S2fZonA:after{right:22px}.IunwKwdvL271DxBIniPb:checked:disabled+.svA9WxEcOByd5S2fZonA{background-color:var(--jp-black);border-color:var(--jp-black)}.IunwKwdvL271DxBIniPb:checked:disabled+.svA9WxEcOByd5S2fZonA:after{background-color:var(--jp-white)}.IunwKwdvL271DxBIniPb:checked:not(:disabled)+.svA9WxEcOByd5S2fZonA{background-color:var(--jp-green);border-color:var(--jp-green)}.IunwKwdvL271DxBIniPb:checked:not(:disabled)+.svA9WxEcOByd5S2fZonA:after{background-color:var(--jp-white)}.IunwKwdvL271DxBIniPb:disabled+span.svA9WxEcOByd5S2fZonA{cursor:default;opacity:.25}.IunwKwdvL271DxBIniPb.wOd7DeP76v1fczKfah5n+.svA9WxEcOByd5S2fZonA{border-radius:8px;height:16px;width:24px}.IunwKwdvL271DxBIniPb.wOd7DeP76v1fczKfah5n+.svA9WxEcOByd5S2fZonA:after{height:12px;width:12px}.IunwKwdvL271DxBIniPb.wOd7DeP76v1fczKfah5n:checked+.svA9WxEcOByd5S2fZonA:after{right:8px}.Clxt94RgGnDrhORZZyPr,.K2OG1vK5PSOYDWKtqKKG{margin-bottom:calc(var(--spacing-base)*7);margin-top:calc(var(--spacing-base)*7)}.msOlyh2T7D6uhbM6AROg{align-items:center;background:none;border:2px solid var(--jp-green-40);border-radius:var(--jp-border-radius);color:var(--jp-gray-80);display:flex;gap:calc(var(--spacing-base)*3);justify-content:space-between;padding:calc(var(--spacing-base)*2) calc(var(--spacing-base)*3);position:relative;text-align:right;width:100%}.msOlyh2T7D6uhbM6AROg a,.msOlyh2T7D6uhbM6AROg button{all:unset;color:var(--jp-gray-80);cursor:pointer}.msOlyh2T7D6uhbM6AROg a:after,.msOlyh2T7D6uhbM6AROg button:after{content:"";height:100%;position:absolute;right:0;top:0;width:100%}.msOlyh2T7D6uhbM6AROg:focus-within{border-color:var(--jp-black)}.msOlyh2T7D6uhbM6AROg:focus-within .cPN7USVqSBpxUswfDtUZ,.msOlyh2T7D6uhbM6AROg:hover .cPN7USVqSBpxUswfDtUZ{transform:translateX(calc((var(--spacing-base)*2)*-1))}.msOlyh2T7D6uhbM6AROg:focus-within .EmnJAyEzzn1QpA8HtypY,.msOlyh2T7D6uhbM6AROg:hover .EmnJAyEzzn1QpA8HtypY{text-decoration:underline;text-decoration-thickness:2px}.EmnJAyEzzn1QpA8HtypY,.msOlyh2T7D6uhbM6AROg .EmnJAyEzzn1QpA8HtypY{font-weight:700}.cPN7USVqSBpxUswfDtUZ{fill:var(--jp-green-40);pointer-events:none;transition:transform .1s ease-out}.vV7YZikAz0oHYsuvtxMq{display:inline;margin:0 calc(var(--spacing-base)/3) 0 0;vertical-align:middle}.vV7YZikAz0oHYsuvtxMq svg{position:relative;z-index:10}.T1YaMupeZmBIpXZHY9EZ{display:inline}.rigH8UdiDrmmSLQMUurD{background-color:var(--jp-white);border:1px solid var(--jp-gray-10);border-radius:var(--jp-border-radius);color:var(--jp-black);display:block;font-size:var(--font-body);letter-spacing:-.02em;line-height:1.5;padding:var(--spacing-base) calc(var(--spacing-base)*1.5);transition:box-shadow .1s ease-out;width:100%}.rigH8UdiDrmmSLQMUurD::placeholder{color:var(--jp-gray-20)}.rigH8UdiDrmmSLQMUurD:focus{box-shadow:0 0 0 2px var(--jp-green-5)}.rigH8UdiDrmmSLQMUurD:focus,.rigH8UdiDrmmSLQMUurD:hover:not(:disabled){border:1px solid var(--jp-green)}.rigH8UdiDrmmSLQMUurD:disabled{background-color:var(--jp-gray-0);color:var(--jp-gray-30)}.V8FDM08CpcwQs4UwN2nI{color:var(--jp-black);display:block;font-size:var(--font-title-small);font-weight:600;margin-bottom:var(--spacing-base)}.DM4b8iQ0ewvRYdIPxvZ8{max-width:calc(744px + var(--spacing-base)*6);width:100%}.bW6ZuNzJBYU5PVPktE2S{display:flex}.bW6ZuNzJBYU5PVPktE2S:not(:first-child){margin-top:calc(var(--spacing-base)*7)}.di3wjXHrX1rk_H6rlxKM{margin-left:calc(var(--spacing-base)*2);padding-top:calc(var(--spacing-base)/2)}@media(min-width:600px){.di3wjXHrX1rk_H6rlxKM{margin-left:calc(var(--spacing-base)*5)}}.IrzHnNkRvORtyCL0yiWa{width:100%}.sU82bpLEYPC9n_CFAKoz{align-items:center;display:flex}.ZZc0LldcbJpcftqCe43T .IrzHnNkRvORtyCL0yiWa{opacity:.5}.T17WOOJI7XHN7KRmYaCe>:last-child{margin-top:calc(var(--spacing-base)*2)}@media(min-width:600px){.T17WOOJI7XHN7KRmYaCe{display:flex;justify-content:space-between}}.typbjN2keZ97hj2TmuMC{display:flex;flex-wrap:wrap;margin-top:calc(var(--spacing-base)*2)}.UUXAN8VTAZY0h8t9rCHG{color:var(--jp-green-50);margin-left:calc(var(--spacing-base)/2)}.eFjcadLMEXY5O61vsTrx{color:var(--jp-gray-50)}.Tr5uYvclUiwlC5kuGk7E{color:var(--jp-red-50)}.zPZcNgYx2X5778nHHtlH{display:flex;flex-wrap:wrap}.lNtkRXnB1z_kYB28MUWq{color:var(--jp-gray-50)}.JgH5ykcLynEgqXYurT78{margin-left:calc(var(--spacing-base)/2)}.JgH5ykcLynEgqXYurT78,.xlWW0IoKZwTZt1Ti0tcQ{color:var(--jp-green-50)}.zhBcgCUGgyC7PvWk8ewB{margin-top:calc(var(--spacing-base)*3)}@media(min-width:600px){.zhBcgCUGgyC7PvWk8ewB{padding-right:calc(var(--spacing-base)*11)}}.mah_f2OWxZ3Vqt_jRFdR{margin-bottom:calc(var(--spacing-base)*4)}.pRMFiIODonlw4XMdNHaU{margin-bottom:calc(var(--spacing-base)*2);margin-top:calc(var(--spacing-base)*6)}.Ax2SmW57c0U5xOTjZuAA{margin:calc(var(--spacing-base)*-1) calc(var(--spacing-base)*-2)}.xGZeYQr0_nPJTFmd8pW4{align-items:center;border:1px solid var(--jp-gray-30);border-radius:4px;color:var(--jp-gray-30);display:flex;font-size:12px;height:21px;margin-bottom:calc(var(--spacing-base)*2);margin-right:var(--spacing-base);padding:calc(var(--spacing-base)/2)}.RYTIt8kwLbKcUbWOfG4g{padding:calc(var(--spacing-base)*3);width:304px}.BqXge2rIUP0a_74yvYbr{display:flex;justify-content:space-between}.Lr10UUCcSLF3T_0QqoPr{margin:calc(var(--spacing-base)*-1) calc(var(--spacing-base)*-3)}.Lr10UUCcSLF3T_0QqoPr:focus,.Lr10UUCcSLF3T_0QqoPr:focus:not(:disabled){box-shadow:none}.th_VukMuODIOVLC7oJo6{display:flex;justify-content:flex-end}.Gxtap1Zcl5X5UEHfSdQ4{color:var(--jp-gray-50)}.Gxtap1Zcl5X5UEHfSdQ4:before{background:var(--jp-gray-50);border-radius:50%;content:"";display:inline-block;height:8px;margin-left:var(--spacing-base);width:8px}.Gxtap1Zcl5X5UEHfSdQ4.dSfmCVUK_Ez7sxdqOIdy{color:var(--jp-green-40)}.Gxtap1Zcl5X5UEHfSdQ4.dSfmCVUK_Ez7sxdqOIdy:before{background:var(--jp-green-40)}.e6JXg_theht0XwCBgqdA{margin-bottom:calc(var(--spacing-base)*3);margin-top:calc(var(--spacing-base)*2)}.VHYulMcpzbr10HWR0iSE{align-items:flex-start;border:1px solid var(--jp-black);border-color:var(--jp-gray-5);border-radius:4px;border-right-width:6px;display:flex;font-size:var(--font-body);padding:24px 18px 27px 31px}.FGpSkMCiIHQjszcV0dbn{margin-left:20px}.FGpSkMCiIHQjszcV0dbn,.KoWZcCwhW13xvkEb0QON{height:calc(var(--spacing-base)*3);width:calc(var(--spacing-base)*3)}.KoWZcCwhW13xvkEb0QON{background-color:#0000;border:none;cursor:pointer;outline:none}@media screen and (max-width:600px){.VHYulMcpzbr10HWR0iSE{box-shadow:0 4px 8px #00000008,0 1px 2px #0000000f;padding-top:68px;position:relative}.FGpSkMCiIHQjszcV0dbn{position:absolute;right:24px;top:24px}.KoWZcCwhW13xvkEb0QON{left:24px;position:absolute;top:24px}}.smrfczkC53EaFM8OJUXs{flex-grow:1}.IKYRWoPwt9xOVEx1wzNS{font-weight:600;margin-bottom:8px}.qM0qY6mPYp1MPN54A3Kg{align-items:center;display:flex;margin-top:20px}.qM0qY6mPYp1MPN54A3Kg a,.qM0qY6mPYp1MPN54A3Kg a:active,.qM0qY6mPYp1MPN54A3Kg a:focus,.qM0qY6mPYp1MPN54A3Kg a:hover{color:var(--jp-black)}.qM0qY6mPYp1MPN54A3Kg>*{margin-left:24px}.A5YkDkkXuiYgavrY6Nux{border-right-color:var(--jp-red)}.A5YkDkkXuiYgavrY6Nux .y_IPyP1wIAOhyNaqvXJq{fill:var(--jp-red)}.cT5rwuPMZzWvi5o6shMl{border-right-color:var(--jp-yellow-20)}.cT5rwuPMZzWvi5o6shMl .y_IPyP1wIAOhyNaqvXJq{fill:var(--jp-yellow-20)}.yo0O3uvNomPsYUXFCpAS{border-right-color:var(--black)}.yo0O3uvNomPsYUXFCpAS .y_IPyP1wIAOhyNaqvXJq{fill:var(--black)}.oZdDFf1jBLkzn5ICCC6x{border-right-color:var(--jp-green)}.oZdDFf1jBLkzn5ICCC6x .y_IPyP1wIAOhyNaqvXJq{fill:var(--jp-green)}._Wc3apZobag_9Ag_THTb{display:flex;justify-content:space-between}.kdsaL7c4bpTwf_A4fIUT{padding-bottom:calc(var(--spacing-base)*6);padding-top:calc(var(--spacing-base)*6);text-align:center}.b0eN3as5AgxQW7EAkarg{margin-bottom:0}@keyframes rotate-spinner{to{transform:rotate(-1turn)}}.jp-components-spinner{align-items:center;display:flex}.jp-components-spinner__inner,.jp-components-spinner__outer{animation:3s linear infinite;animation-name:rotate-spinner;border:.1em solid #0000;border-radius:50%;box-sizing:border-box;margin:auto}.jp-components-spinner__outer{border-top-color:#fff}.jp-components-spinner__inner{border-left-color:#fff;border-top-color:#fff;height:100%;opacity:.4;width:100%}.JiJhrZaThvWCpM2AfGen{border-radius:32px;flex-shrink:0;font-size:12px;font-style:normal;font-weight:600;line-height:16px;padding:calc(var(--spacing-base)/2);position:relative;text-align:center;width:60px}._7SGksgOpcPbHfPPpQTV{background:var(--jp-red-5);color:var(--jp-red-60)}.pGNquShR54adQ61sx3lP{background:var(--jp-yellow-5);color:var(--jp-yellow-60)}.IM5kkexAfwGLM6zz0Exd{background:var(--jp-gray-0);color:var(--jp-gray-50)}.NHzH3tt6CypjZ92CvK9x{border:1px solid var(--jp-gray);border-radius:var(--jp-border-radius);display:flex;padding:calc(var(--spacing-base)*2)}.NHzH3tt6CypjZ92CvK9x:first-of-type{border-top-left-radius:var(--jp-border-radius);border-top-right-radius:var(--jp-border-radius)}.NHzH3tt6CypjZ92CvK9x:last-of-type{border-bottom-left-radius:var(--jp-border-radius);border-bottom-right-radius:var(--jp-border-radius)}.NHzH3tt6CypjZ92CvK9x+.NHzH3tt6CypjZ92CvK9x{border-top:0}.D9zvYDUrOP_zwSm0yJMs{margin-left:calc(var(--spacing-base)*2);min-width:24px}._XISfmbjoVlqhB61hHYn{width:100%}.AQDPBnMZFu7BOBuo8mYW{font-size:18px;font-weight:600;line-height:24px;margin-bottom:0}.cZ9s5eCAZe3R82Y6Ru3z{color:var(--jp-gray-80);font-size:14px;line-height:21px}.AKnbWQiViZ2O_dwCV8Fw,.W6alQ2_S5Rh06djX9m27{align-self:center;margin-left:var(--spacing-base);margin-right:calc(var(--spacing-base)*2)}.uUEJGMrSV3XoBwX5xEwA{display:flex;justify-content:space-between}.sQkG5Cu80gPaeFj3L_wa{margin-bottom:calc(var(--spacing-base)*5)}.oIl6GCMeUnzE0inXbuj9{display:flex;justify-content:space-between}.RP2MVoGqaCFXPKZhhxQ1{margin-bottom:calc(var(--spacing-base)*5)}.YpEs8b7KE7fzVuXUbOEb{display:flex;justify-content:space-between}.EqpwvErHtRi_WQkJKgi1{border:1px solid var(--jp-gray);border-radius:var(--jp-border-radius);display:flex;margin-bottom:calc(var(--spacing-base)*3);padding:calc(var(--spacing-base)*2)}.EicvN1QaJu5OJLzdUN5A{margin-left:calc(var(--spacing-base)*2);min-width:24px}.b7ynAmUwGlxK_vxyIN0y{width:100%}.uSV9HYRxjL4S6zIZDlqP{font-size:18px;font-weight:600;line-height:24px;margin-bottom:0}.XpW8Mvw_XFEbqxUdw155{color:var(--jp-gray-80);font-size:14px;line-height:21px}.Fkj60BmQ5sUo9zHcJwVv{align-self:center;margin-left:var(--spacing-base);margin-right:calc(var(--spacing-base)*2)}.XLzPr74ad3osCq9kxy2q{display:flex;justify-content:space-between}.jNlU3vgp4xEGwmX5aTyK{background-color:var(--jp-gray-5)}.gE8s4nh3f7iGIBrFeyCT{list-style-type:disc;padding-right:calc(var(--spacing-base)*2.5)}.WtVEv641JBaLl929sZq2{align-items:flex-start;background-color:#00000040;bottom:0;display:flex;justify-content:center;left:0;overflow-y:auto;padding-top:calc(var(--spacing-base)*12 + 2px);position:fixed;right:0;top:0;z-index:1000001}.G0aPt7WmA1rkUE0wcTno{background:var(--jp-white);border:1px solid var(--jp-gray);border-radius:calc(var(--jp-border-radius)*2);box-shadow:0 8px 20px #00000040;padding:calc(var(--spacing-base)*4);position:relative;width:616px}.VkrhWjfEIlIwYEumycbP{background:none;border:none;cursor:pointer;left:calc(var(--spacing-base)*3);padding:0;position:absolute;top:calc(var(--spacing-base)*3)}.yFzeV4cmWRbZKk5tIyEw{display:block}.EU0Rvu4PDqVtnCAmbgHg{height:56px;margin-bottom:calc(var(--spacing-base)*8);width:48px}.EU0Rvu4PDqVtnCAmbgHg>svg{position:relative;right:-40px;top:-36px}.vzMlFr1AXWqefpRrb976{align-items:center;display:flex;justify-content:space-between;margin-bottom:calc(var(--spacing-base)*3)}.gYSOMa4xxLXmsNzvFPkW{width:100%}.hNJWdt5qmZkWYAH_vjIp{background-color:var(--jp-green-40);border-radius:calc(var(--spacing-base)*3);height:9px;transition:width .2s}.DHMUfGyHbl5BgD5vjxVz{color:var(--jp-gray-90);font-weight:600;line-height:24px;margin-right:auto;padding-right:var(--spacing-base)}.GqFcAwJvIrg1v7f6QUfw{display:flex;flex-direction:column;min-height:230px;padding:calc(var(--spacing-base)*3);width:304px}.GqFcAwJvIrg1v7f6QUfw .OENx8kmm62tkWGukzP2S{display:flex;justify-content:space-between;margin-bottom:calc(var(--spacing-base)*2)}.GqFcAwJvIrg1v7f6QUfw .OENx8kmm62tkWGukzP2S .KnqJLKwSceJTwFJrPGHq{max-width:226px}.GqFcAwJvIrg1v7f6QUfw .OENx8kmm62tkWGukzP2S .PJU0_yA9jNf7ao0jhHut{background-color:var(--jp-white);color:var(--jp-gray-90);flex-shrink:0;height:calc(var(--spacing-base)*3);min-width:unset;width:calc(var(--spacing-base)*3)}.GqFcAwJvIrg1v7f6QUfw .OENx8kmm62tkWGukzP2S .PJU0_yA9jNf7ao0jhHut:hover:not(:focus){box-shadow:none}.GqFcAwJvIrg1v7f6QUfw .rrORM3zqHfGvqiPduEXY{align-items:flex-end;display:flex;flex-grow:1;height:calc(var(--spacing-base)*6);justify-content:flex-end;margin-top:calc(var(--spacing-base)*2)}.GqFcAwJvIrg1v7f6QUfw .rrORM3zqHfGvqiPduEXY .Q7fUcDUGhteXEr18rZPC{color:var(--jp-gray-60);flex-grow:1;margin-bottom:var(--spacing-base)}.GqFcAwJvIrg1v7f6QUfw .rrORM3zqHfGvqiPduEXY .S5LAeskUiEQ0JlPhr0Ze{flex-shrink:0}._fUXxnSp5pagKBp9gSN7 *{box-sizing:border-box}.ZMBDiTLzs27F012iOsMK>:first-child{flex:1}@media(min-width:960px){.ZMBDiTLzs27F012iOsMK{align-items:center;display:flex}}.zI2DKzqRc1MhF6aq5eHt{align-items:center;color:var(--jp-black);display:flex}.iHgPFku9KaLz8FIQV1Qw{margin-left:var(--spacing-base);margin-right:-4px}.ctq2nQkzIfSoMkldF9t9{margin-top:calc(var(--spacing-base)*2);width:100%}@media(min-width:960px){.ctq2nQkzIfSoMkldF9t9{margin-right:calc(var(--spacing-base)*2);margin-top:0;width:auto}}.cuoSlhSNrqf1dozY22Xb{fill:#000}.JLquNpQVlysAamuh5lJO,.lAIiifeLMmZAPlQ9n9ZR{fill:var(--jp-green-primary)}.cbOwD8Y4tFjwimmtchQI{fill:#757575}.cbOwD8Y4tFjwimmtchQI.aLWBKY0yRghEk7tNCgK3{fill:var(--color-bluesky)}.cbOwD8Y4tFjwimmtchQI.aHOlEBGD5EA8NKRw3xTw{fill:var(--color-facebook);border-radius:50%!important}.cbOwD8Y4tFjwimmtchQI.af4Y_zItXvLAOEoSDPSv{fill:var(--color-twitter)}.cbOwD8Y4tFjwimmtchQI.f68aqF3XSD1OBvXR1get{fill:var(--color-linkedin)}.cbOwD8Y4tFjwimmtchQI.xFI0dt3UiXRlRQdqPWkx{fill:var(--color-tumblr)}.cbOwD8Y4tFjwimmtchQI.q7JEoyymveP6kF747M43{fill:var(--color-gplus)}.cbOwD8Y4tFjwimmtchQI.DKOBOTVmTLbh26gUH_73{fill:var(--color-mastodon)}.cbOwD8Y4tFjwimmtchQI.n5XodNsuMfMAAvqHFmbw{fill:var(--color-nextdoor);border-radius:50%}.cbOwD8Y4tFjwimmtchQI.cL3m0xBYTYhIKI7lCqDB{fill:var(--color-instagram)}.cbOwD8Y4tFjwimmtchQI.fftumuc_lJ6v0tq4UMVR{fill:var(--color-whatsapp)}.OtDl6kocO_m2s9sRHaqX{align-items:center;display:flex;flex-direction:column;height:100%;justify-content:center;max-height:600px;width:100%}.BjwJh1S1YVPI7AjmTx6a+.BjwJh1S1YVPI7AjmTx6a{margin-top:calc(var(--spacing-base)*5)}.YWfK8VTp2wnByBauYPKg{background-color:var(--jp-gray-0);overflow-x:scroll;padding:calc(var(--spacing-base)*3)}.pkw2LnOTd8VvQ3oT8sXQ{justify-content:flex-end;margin-top:calc(var(--spacing-base)*3);padding-top:calc(var(--spacing-base)*3)}.ap6lG79CncSqdigJS_WA{margin-top:calc(var(--spacing-base)*4)}.uym7dGHhp6ifjF57yOAO{align-items:flex-end;display:flex;margin-bottom:calc(var(--spacing-base)*2.25)}.e_2eFTR8RyHwmfeqJL4F{flex:1;margin-bottom:0}.r4Id5qht2FD68jCAH2Cl{margin-right:calc(var(--spacing-base)*2)}.pkw2LnOTd8VvQ3oT8sXQ{border-top:1px solid var(--jp-gray);display:flex;justify-content:right;padding-top:calc(var(--spacing-base)*4);width:100%}.pkw2LnOTd8VvQ3oT8sXQ>:last-child{margin-right:calc(var(--spacing-base)*2)}.ZSZPabDoB8MVVPttP0tu{background-color:#fff;border:1px solid var(--jp-gray);border-bottom:none;color:var(--jp-gray-50);display:grid;grid-template-columns:repeat(9,1fr);padding:calc(var(--spacing-base)*2) calc(var(--spacing-base)*3);width:100%}.ZSZPabDoB8MVVPttP0tu>span:first-child{grid-column:1/7}.ZSZPabDoB8MVVPttP0tu>span:not(:first-child){text-align:center}.iJ_biSBRDribuNKX0Zuw{margin:calc(var(--spacing-base)*4) calc(var(--spacing-base)*8);text-align:center}.iJ_biSBRDribuNKX0Zuw>button span{color:var(--jp-gray-70);font-size:var(--font-body-small);font-weight:400}.iJ_biSBRDribuNKX0Zuw button:hover:not(:disabled){text-decoration-line:none}.iJ_biSBRDribuNKX0Zuw button:focus:not(:disabled){box-shadow:none}@media(max-width:599px){.uym7dGHhp6ifjF57yOAO{margin-bottom:calc(var(--spacing-base)*3)}.e_2eFTR8RyHwmfeqJL4F{display:none}.r4Id5qht2FD68jCAH2Cl{flex:1}.r4Id5qht2FD68jCAH2Cl:first-of-type{margin-right:0}.pkw2LnOTd8VvQ3oT8sXQ{justify-content:center}.pkw2LnOTd8VvQ3oT8sXQ>*{width:50%}}.x8UuVEhWucPfdq0hEJg6{border:1px solid var(--jp-gray);border-radius:var(--jp-border-radius)}.x8UuVEhWucPfdq0hEJg6>:not(:last-child){border-bottom:1px solid var(--jp-gray)}.eb6Ovfvm1yONz4mdOwbH{background-color:var(--jp-white)}.jF9LXpXR3TxZVDw7TVXT{align-items:center;background:none;border:none;box-sizing:border-box;cursor:pointer;display:grid;grid-template-columns:repeat(9,1fr);margin:0;outline-color:var(--jp-black);padding:calc(var(--spacing-base)*2) calc(var(--spacing-base)*3);text-align:start;width:100%}.jF9LXpXR3TxZVDw7TVXT>:first-of-type{grid-column:1/8}.jF9LXpXR3TxZVDw7TVXT>:last-of-type{grid-column:9}.jF9LXpXR3TxZVDw7TVXT:hover{background:var(--jp-gray-0)}.lNQgAfpwdAUSOLZd8dlD{align-items:center;display:flex;font-size:var(--font-body-small);font-weight:400}.WRQwDYPdffWznX158azR{margin-left:var(--spacing-base)}.dJx9pvlYjDnKn11n5wo8{font-weight:600;margin-bottom:var(--spacing-base);margin-right:calc(var(--spacing-base)*4)}.EKcbLuSblRc7UpzgsFXw{align-items:center}.ILMBWlMLcXc0n97IisrG{overflow:hidden;transform-origin:top center}.T8XIzCNJBQy1UETN5gjU{max-height:0;padding:0;transform:scaleY(0);transition:all .1s}.kWoHGiaZSbq9XJVyUOMC{max-height:1000px;padding:calc(var(--spacing-base)*4) calc(var(--spacing-base)*7);transform:scaleY(1);transition:max-height .3s,transform .2s}.HQgjxePFDRJHamBAGcVU{background-color:var(--jp-white);border-radius:var(--jp-border-radius);box-shadow:0 0 40px #00000014;margin:0;padding:var(--spacing-base) 0}.KtdsNIMumOoHNWMLmuAJ{align-items:center;display:flex;justify-content:space-between;margin:0;padding:calc(var(--spacing-base)*2);text-align:right}.KtdsNIMumOoHNWMLmuAJ.ewyV4ZGn34WDNXmK3ej2{cursor:pointer;outline-color:var(--jp-black)}.KtdsNIMumOoHNWMLmuAJ.ewyV4ZGn34WDNXmK3ej2:focus:not(.owofT85W_XvVdb5vr1GN),.KtdsNIMumOoHNWMLmuAJ.ewyV4ZGn34WDNXmK3ej2:hover:not(.owofT85W_XvVdb5vr1GN){background-color:var(--jp-gray-0)}.KtdsNIMumOoHNWMLmuAJ.owofT85W_XvVdb5vr1GN{background-color:var(--jp-black)}.KtdsNIMumOoHNWMLmuAJ.owofT85W_XvVdb5vr1GN .NESnw2xCLrBpP6WlYZL4{color:var(--jp-white)}.KtdsNIMumOoHNWMLmuAJ.owofT85W_XvVdb5vr1GN .aohnd_y_1lrMuww8NH63{fill:var(--jp-white)}.KtdsNIMumOoHNWMLmuAJ.owofT85W_XvVdb5vr1GN .Rnas_2_2_eLZSYfZ347E{background-color:var(--jp-red);border:1px solid var(--jp-red);color:var(--jp-white)}.NESnw2xCLrBpP6WlYZL4{align-items:center;display:flex;overflow-x:hidden;padding-left:var(--spacing-base)}.m4_14yNRByDyO9yf9pGg{display:block;overflow-x:hidden;text-overflow:ellipsis}.aohnd_y_1lrMuww8NH63{margin-left:calc(var(--spacing-base)*2)}.Rnas_2_2_eLZSYfZ347E{align-items:center;border:1px solid var(--jp-red-60);border-radius:50%;box-sizing:border-box;color:var(--jp-red-60);display:flex;justify-content:center;min-width:30px;padding:calc(var(--spacing-base)/2) var(--spacing-base)}.X8NRHUTBa_4wDvoHN9TT{fill:var(--jp-green-50)}.CsuOteurQlJm4IjXqyZ0{fill:var(--jp-gray-20)}.fvbewglUxEvV1o04yzzp{--icon-size:28px;--item-spacing:calc(var( --spacing-base )*2);--left-spacing:calc(var( --icon-size ) + var( --item-spacing ));list-style:none}.DINy59MKjwiQanaoDTiV{padding:calc(var(--spacing-base)*2)}.XoacHJljw8zRW_fkBSyg{padding:0}.mXM4WZRePVTa07dhQ6MD{margin-right:var(--left-spacing)}.sI3V8khLdCqxkhJQ_XnI{display:flex;justify-content:flex-start;padding:calc(var(--spacing-base)*2)}.hgdxMuIvZwTZ0sfXaols{padding:calc(var(--spacing-base)*2);width:250px}.UErHS2HAh1gszGfYuVIf{align-items:center;background-color:var(--jp-white);border:1px solid var(--jp-gray-10);border-radius:var(--jp-border-radius);display:flex;justify-content:space-between;padding:calc(var(--spacing-base)*2);width:100%}.lEhH1hvCcxLVFMHI8Gwv{display:flex;justify-content:flex-start}.c57Vj4QhAHwcK_HZMxtN{margin-left:var(--spacing-base)}.LumryWNddoF092fZgN2O{font-size:var(--font-body);line-height:1.5}.NFMwU3H5k2qArZe2TTp9{background-color:var(--jp-gray-10);font-weight:600;padding:calc(var(--spacing-base)/2) var(--spacing-base)}.G5W9M8qfo3sGl2OIbwg9{background-color:var(--jp-gray-0);display:flex;flex-direction:row;font-family:Courier\ 10 Pitch,Courier,monospace;overflow-x:scroll;white-space:pre}.Bx4RDCUR316fm_jgGS8N{background-color:var(--jp-gray-10);color:var(--jp-gray-50);display:flex;flex-direction:column;padding:0 var(--spacing-base);text-align:left}.GhN0JvAyRQI3SnVWp2Ot{display:flex;flex-direction:column;flex-grow:1;overflow-x:visible}.GhN0JvAyRQI3SnVWp2Ot del,.GhN0JvAyRQI3SnVWp2Ot div,.GhN0JvAyRQI3SnVWp2Ot ins{padding:0 var(--spacing-base);text-decoration:none}.GhN0JvAyRQI3SnVWp2Ot del{background-color:var(--jp-red-0);color:var(--jp-red-60)}.GhN0JvAyRQI3SnVWp2Ot ins{background-color:var(--jp-green-5);color:var(--jp-green-60)}.xpPHTch5ul0xuZaUoTNa{background-color:var(--jp-gray-0);display:flex;flex-direction:row;font-family:monospace;overflow-x:scroll;padding:0}.AMOpkL9LURkyTK8316cw{background-color:var(--jp-red-0)}.i0_0xMrNWoak1brIaDQq{display:flex;flex-direction:column;text-align:left}.C9fLawPLkMNSZthfwxj6{background-color:var(--jp-gray-10);color:var(--font-body);padding:0 calc(var(--spacing-base)/2)}.C9fLawPLkMNSZthfwxj6.AMOpkL9LURkyTK8316cw{background-color:var(--jp-red-50);color:var(--jp-white)}.ogixgg8fRGekmYGtevh1{display:flex;flex:1;flex-direction:column;overflow-x:visible;white-space:pre}.jYPCgKMDRKfT3vnx0mdG{padding-right:var(--spacing-base)}.UEQ1NqkrwNmaQR7qdEK3{background-color:var(--jp-red);border-radius:calc(var(--jp-border-radius)/2);color:var(--jp-white);padding:calc(var(--spacing-base)/4) calc(var(--spacing-base)/2)}.sfXsfklfkeSRtE9ivQwF{border:1px solid var(--jp-gray);border-radius:var(--jp-border-radius);display:inline-block;width:100%}.sfXsfklfkeSRtE9ivQwF>:not(:last-child){border-bottom:1px solid var(--jp-gray)}.ozRrKPlj1QFGUyd3oVke{background-color:var(--jp-white)}.PyvnSHQuuUkZvVsArigy{align-items:center;background:none;border:none;box-sizing:border-box;cursor:pointer;display:grid;grid-template-columns:repeat(9,1fr);margin:0;outline-color:var(--jp-black);padding:calc(var(--spacing-base)*2) calc(var(--spacing-base)*3);text-align:start;width:100%}.PyvnSHQuuUkZvVsArigy>:first-of-type{grid-column:1/7}.PyvnSHQuuUkZvVsArigy>:last-of-type{grid-column:9}.PyvnSHQuuUkZvVsArigy>:not(:first-child){margin:auto}.PyvnSHQuuUkZvVsArigy:hover{background:var(--jp-gray-0)}.u9Xod5s8bCRNj9MR1Drl{align-items:center;display:flex;font-size:var(--font-body-small);font-weight:400}.IbeyulkpO9kjYJ4OkYUD{margin-left:var(--spacing-base)}.KiCgmjHm2f0JDU3cMsgf{font-weight:600;margin-bottom:var(--spacing-base);margin-right:calc(var(--spacing-base)*4)}.kJ8t3FAtd5VAYjk31SfA{align-items:center}.JP0IJZcYRohfgntEozjm{overflow:hidden;transform-origin:top center}.y7c6zi2wjEnbW3F29fmP{max-height:0;padding:0;transform:scaleY(0);transition:all .1s}.wQWiN_J0SqgduvadyGnm{max-height:1000px;padding:calc(var(--spacing-base)*4) calc(var(--spacing-base)*7);transform:scaleY(1);transition:max-height .3s,transform .2s}.v1fUFCBPmd6miSCf_ehK{fill:var(--jp-green-40)}@media(max-width:599px){.PyvnSHQuuUkZvVsArigy{display:grid;grid-auto-rows:minmax(auto,auto)}.PyvnSHQuuUkZvVsArigy>:first-child{grid-column:1/8;grid-row:1}.PyvnSHQuuUkZvVsArigy>:nth-child(2){grid-row:2;padding-right:calc(var(--spacing-base)*4)}.PyvnSHQuuUkZvVsArigy>:nth-child(3){grid-row:2}.PyvnSHQuuUkZvVsArigy>:nth-child(3) span{margin-top:var(--spacing-base);position:absolute}.PyvnSHQuuUkZvVsArigy>:last-child{grid-column:10;grid-row:1/3}}.A6a9HOtaZnLUleNgxQrX{padding:calc(var(--spacing-base)*7) 0}.CGT5fOs6LDTFHWCAgIiT,.RFKxbzQ8N58qEyVO0yzW{align-items:center;display:flex}.RFKxbzQ8N58qEyVO0yzW{height:100%}.RFKxbzQ8N58qEyVO0yzW img{object-fit:cover;width:100%}.SvMuuouOkDt2sE0PAn_D{margin-top:calc(var(--spacing-base)*3 + 1px)}.urouayitSUT8zW0V3p_0{margin-bottom:0}.iXXJlk08gFDeCvsTTlNQ{border:1px solid var(--jp-gray);border-radius:var(--jp-border-radius);border-right:6px solid var(--jp-red-50);box-shadow:0 4px 8px #00000008,0 1px 2px #0000000f;box-sizing:border-box;color:var(--jp-gray-80);font-size:16px;line-height:22px;margin:0;padding:calc(var(--spacing-base)*2) calc(var(--spacing-base)*3) calc(var(--spacing-base)*2) calc(var(--spacing-base)*3)}.iXXJlk08gFDeCvsTTlNQ.is-error{background-color:var(--jp-white)}.iXXJlk08gFDeCvsTTlNQ .components-notice__content{align-items:flex-start;display:flex;flex-direction:column;margin:0;padding:12px 4px}.iXXJlk08gFDeCvsTTlNQ .is-link{color:var(--jp-black);font-size:16px;font-weight:600}.iXXJlk08gFDeCvsTTlNQ .components-notice__dismiss{align-self:center}.iXXJlk08gFDeCvsTTlNQ .MWqRqr7q6fgvLxitcWYk,.iXXJlk08gFDeCvsTTlNQ .MWqRqr7q6fgvLxitcWYk:active,.iXXJlk08gFDeCvsTTlNQ .MWqRqr7q6fgvLxitcWYk:hover,.iXXJlk08gFDeCvsTTlNQ .MWqRqr7q6fgvLxitcWYk:visited{align-items:center;background:#000;border-radius:var(--jp-border-radius);color:var(--jp-white);cursor:pointer;font-size:16px;font-weight:600;justify-content:center;letter-spacing:-.01em;line-height:24px;margin-right:calc(var(--spacing-base)*2 + 24px);margin-top:24px;padding:8px 24px;text-decoration:none}.iXXJlk08gFDeCvsTTlNQ.YLcXAoc82nypTPaKSAcd .MWqRqr7q6fgvLxitcWYk,.iXXJlk08gFDeCvsTTlNQ.YLcXAoc82nypTPaKSAcd .MWqRqr7q6fgvLxitcWYk:active,.iXXJlk08gFDeCvsTTlNQ.YLcXAoc82nypTPaKSAcd .MWqRqr7q6fgvLxitcWYk:hover,.iXXJlk08gFDeCvsTTlNQ.YLcXAoc82nypTPaKSAcd .MWqRqr7q6fgvLxitcWYk:visited{margin-right:0;margin-top:0;white-space:nowrap}.iXXJlk08gFDeCvsTTlNQ.YLcXAoc82nypTPaKSAcd .components-notice__content{align-items:center;flex-direction:row}.e6hHy8BZ7ZKPSXbIC0UG{margin-bottom:25px}.jXz8LnXNzMDdtHqkG0sZ{display:flex;flex-grow:1;margin-left:var(--spacing-base)}.jXz8LnXNzMDdtHqkG0sZ>svg{align-self:flex-start;flex-shrink:0}.jXz8LnXNzMDdtHqkG0sZ .jp-components-spinner,.jXz8LnXNzMDdtHqkG0sZ>svg{margin-left:calc(var(--spacing-base)*2)}*{box-sizing:border-box} \ No newline at end of file diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/composer.json b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/composer.json deleted file mode 100644 index b9a50ff8..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/composer.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "name": "automattic/jetpack-protect", - "description": "Social plugin", - "type": "wordpress-plugin", - "license": "GPL-2.0-or-later", - "require": { - "ext-json": "*", - "automattic/jetpack-assets": "^2.1.4", - "automattic/jetpack-admin-ui": "^0.4.1", - "automattic/jetpack-autoloader": "^3.0.3", - "automattic/jetpack-composer-plugin": "^2.0.1", - "automattic/jetpack-config": "^2.0.1", - "automattic/jetpack-identity-crisis": "^0.17.3", - "automattic/jetpack-my-jetpack": "^4.17.0", - "automattic/jetpack-plugins-installer": "^0.3.2", - "automattic/jetpack-sync": "^2.10.1", - "automattic/jetpack-transport-helper": "^0.2.2", - "automattic/jetpack-plans": "^0.4.3", - "automattic/jetpack-waf": "^0.16.0.1", - "automattic/jetpack-status": "^2.1.2" - }, - "require-dev": { - "yoast/phpunit-polyfills": "1.1.0", - "automattic/jetpack-changelogger": "^4.1.1", - "automattic/wordbless": "0.4.2" - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "scripts": { - "phpunit": [ - "./vendor/phpunit/phpunit/phpunit --colors=always" - ], - "test-php": [ - "@composer phpunit" - ], - "build-development": [ - "pnpm run build" - ], - "build-production": [ - "pnpm run build-production-concurrently" - ], - "watch": [ - "Composer\\Config::disableProcessTimeout", - "pnpm run watch" - ], - "post-install-cmd": "WorDBless\\Composer\\InstallDropin::copy", - "post-update-cmd": "WorDBless\\Composer\\InstallDropin::copy" - }, - "repositories": [], - "minimum-stability": "dev", - "prefer-stable": true, - "extra": { - "mirror-repo": "Automattic/jetpack-protect-plugin", - "autorelease": true, - "autotagger": { - "v": false - }, - "release-branch-prefix": "protect", - "wp-plugin-slug": "jetpack-protect", - "wp-svn-autopublish": true, - "version-constants": { - "JETPACK_PROTECT_VERSION": "jetpack-protect.php" - } - }, - "config": { - "allow-plugins": { - "roots/wordpress-core-installer": true, - "automattic/jetpack-autoloader": true, - "automattic/jetpack-composer-plugin": true - }, - "autoloader-suffix": "c4802e05bbcf59fd3b6350e8d3e5482c_protectⓥ2_1_0" - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack-protect.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack-protect.php deleted file mode 100644 index 0d7ae7e6..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack-protect.php +++ /dev/null @@ -1,123 +0,0 @@ - -
          -

          - this document to set up your development environment. Jetpack Protect must have Composer dependencies installed and built via the build command.', 'jetpack-protect' ), - array( - 'a' => array( - 'href' => array(), - 'target' => array(), - 'rel' => array(), - ), - ) - ), - 'https://github.com/Automattic/jetpack/blob/trunk/docs/development-environment.md#building-your-project' - ); - ?> -

          -
          - ' . __( 'Dashboard', 'jetpack-protect' ) . ''; - array_unshift( $actions, $settings_link ); - - return $actions; - } -); - -register_activation_hook( __FILE__, array( 'Jetpack_Protect', 'plugin_activation' ) ); -register_deactivation_hook( __FILE__, array( 'Jetpack_Protect', 'plugin_deactivation' ) ); - -// Main plugin class. -new Jetpack_Protect(); diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-a8c-mc-stats/CHANGELOG.md b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-a8c-mc-stats/CHANGELOG.md deleted file mode 100644 index ee8ebb51..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-a8c-mc-stats/CHANGELOG.md +++ /dev/null @@ -1,166 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file. - -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) -and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - -## [2.0.1] - 2024-03-12 -### Changed -- Internal updates. - -## [2.0.0] - 2023-11-20 -### Changed -- Updated required PHP version to >= 7.0. [#34192] - -## [1.4.22] - 2023-09-19 - -- Minor internal updates. - -## [1.4.21] - 2023-08-23 -### Changed -- Updated package dependencies. [#32605] - -## [1.4.20] - 2023-04-10 -### Added -- Add Jetpack Autoloader package suggestion. [#29988] - -## [1.4.19] - 2023-02-20 -### Changed -- Minor internal updates. - -## [1.4.18] - 2023-01-11 -### Changed -- Updated package dependencies. - -## [1.4.17] - 2022-12-02 -### Changed -- Updated package dependencies. [#27688] - -## [1.4.16] - 2022-11-22 -### Changed -- Updated package dependencies. [#27043] - -## [1.4.15] - 2022-07-26 -### Changed -- Updated package dependencies. [#25158] - -## [1.4.14] - 2022-06-21 -### Changed -- Renaming master to trunk. - -## [1.4.13] - 2022-04-26 -### Changed -- Updated package dependencies. - -## [1.4.12] - 2022-01-25 -### Changed -- Updated package dependencies. - -## [1.4.11] - 2022-01-04 -### Changed -- Switch to pcov for code coverage. -- Updated package dependencies - -## [1.4.10] - 2021-12-14 -### Changed -- Updated package dependencies. - -## [1.4.9] - 2021-11-02 -### Changed -- Set `convertDeprecationsToExceptions` true in PHPUnit config. -- Update PHPUnit configs to include just what needs coverage rather than include everything then try to exclude stuff that doesn't. - -## [1.4.8] - 2021-10-13 -### Changed -- Updated package dependencies. - -## [1.4.7] - 2021-10-12 -### Changed -- Updated package dependencies - -## [1.4.6] - 2021-09-28 -### Changed -- Updated package dependencies. - -## [1.4.5] - 2021-08-30 -### Changed -- Run composer update on test-php command instead of phpunit -- Tests: update PHPUnit polyfills dependency (yoast/phpunit-polyfills). -- updated annotations versions - -## [1.4.4] - 2021-05-25 -### Changed -- Updated package dependencies. - -## [1.4.3] - 2021-04-08 -### Changed -- Packaging and build changes, no change to the package itself. - -## [1.4.2] - 2021-03-30 -### Added -- Composer alias for dev-master, to improve dependencies - -### Changed -- Update package dependencies. - -### Fixed -- Use `composer update` rather than `install` in scripts, as composer.lock isn't checked in. - -## [1.4.1] - 2021-02-05 - -- CI: Make tests more generic - -## [1.4.0] - 2021-01-20 - -- Add mirror-repo information to all current composer packages - -## [1.3.0] - 2020-12-17 - -- Coverage Update whitelist for backend tests -- Pin dependencies -- Packages: Update for PHP 8 testing - -## [1.2.0] - 2020-09-17 - -## [1.1.1] - 2020-09-17 - -- a8c-mc-stats: Do not distribute test files - -## [1.1.0] - 2020-08-13 - -- CI: Try collect js coverage - -## 1.0.0 - 2020-07-27 - -- Creates the MC Stats package - -[2.0.1]: https://github.com/Automattic/jetpack-a8c-mc-stats/compare/v2.0.0...v2.0.1 -[2.0.0]: https://github.com/Automattic/jetpack-a8c-mc-stats/compare/v1.4.22...v2.0.0 -[1.4.22]: https://github.com/Automattic/jetpack-a8c-mc-stats/compare/v1.4.21...v1.4.22 -[1.4.21]: https://github.com/Automattic/jetpack-a8c-mc-stats/compare/v1.4.20...v1.4.21 -[1.4.20]: https://github.com/Automattic/jetpack-a8c-mc-stats/compare/v1.4.19...v1.4.20 -[1.4.19]: https://github.com/Automattic/jetpack-a8c-mc-stats/compare/v1.4.18...v1.4.19 -[1.4.18]: https://github.com/Automattic/jetpack-a8c-mc-stats/compare/v1.4.17...v1.4.18 -[1.4.17]: https://github.com/Automattic/jetpack-a8c-mc-stats/compare/v1.4.16...v1.4.17 -[1.4.16]: https://github.com/Automattic/jetpack-a8c-mc-stats/compare/v1.4.15...v1.4.16 -[1.4.15]: https://github.com/Automattic/jetpack-a8c-mc-stats/compare/v1.4.14...v1.4.15 -[1.4.14]: https://github.com/Automattic/jetpack-a8c-mc-stats/compare/v1.4.13...v1.4.14 -[1.4.13]: https://github.com/Automattic/jetpack-a8c-mc-stats/compare/v1.4.12...v1.4.13 -[1.4.12]: https://github.com/Automattic/jetpack-a8c-mc-stats/compare/v1.4.11...v1.4.12 -[1.4.11]: https://github.com/Automattic/jetpack-a8c-mc-stats/compare/v1.4.10...v1.4.11 -[1.4.10]: https://github.com/Automattic/jetpack-a8c-mc-stats/compare/v1.4.9...v1.4.10 -[1.4.9]: https://github.com/Automattic/jetpack-a8c-mc-stats/compare/v1.4.8...v1.4.9 -[1.4.8]: https://github.com/Automattic/jetpack-a8c-mc-stats/compare/v1.4.7...v1.4.8 -[1.4.7]: https://github.com/Automattic/jetpack-a8c-mc-stats/compare/v1.4.6...v1.4.7 -[1.4.6]: https://github.com/Automattic/jetpack-a8c-mc-stats/compare/v1.4.5...v1.4.6 -[1.4.5]: https://github.com/Automattic/jetpack-a8c-mc-stats/compare/v1.4.4...v1.4.5 -[1.4.4]: https://github.com/Automattic/jetpack-a8c-mc-stats/compare/v1.4.3...v1.4.4 -[1.4.3]: https://github.com/Automattic/jetpack-a8c-mc-stats/compare/v1.4.2...v1.4.3 -[1.4.2]: https://github.com/Automattic/jetpack-a8c-mc-stats/compare/v1.4.1...v1.4.2 -[1.4.1]: https://github.com/Automattic/jetpack-a8c-mc-stats/compare/v1.4.0...v1.4.1 -[1.4.0]: https://github.com/Automattic/jetpack-a8c-mc-stats/compare/v1.3.0...v1.4.0 -[1.3.0]: https://github.com/Automattic/jetpack-a8c-mc-stats/compare/v1.2.0...v1.3.0 -[1.2.0]: https://github.com/Automattic/jetpack-a8c-mc-stats/compare/v1.1.1...v1.2.0 -[1.1.1]: https://github.com/Automattic/jetpack-a8c-mc-stats/compare/v1.1.0...v1.1.1 -[1.1.0]: https://github.com/Automattic/jetpack-a8c-mc-stats/compare/v1.0.0...v1.1.0 diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-a8c-mc-stats/SECURITY.md b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-a8c-mc-stats/SECURITY.md deleted file mode 100644 index 98f48dd1..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-a8c-mc-stats/SECURITY.md +++ /dev/null @@ -1,47 +0,0 @@ -# Security Policy - -Full details of the Automattic Security Policy can be found on [automattic.com](https://automattic.com/security/). - -## Supported Versions - -Generally, only the latest version of Jetpack and its associated plugins have continued support. If a critical vulnerability is found in the current version of a plugin, we may opt to backport any patches to previous versions. - -## Reporting a Vulnerability - -Our HackerOne program covers the below plugin software, as well as a variety of related projects and infrastructure: - -* [Jetpack](https://jetpack.com/) -* Jetpack Backup -* Jetpack Boost -* Jetpack CRM -* Jetpack Protect -* Jetpack Search -* Jetpack Social -* Jetpack VideoPress - -**For responsible disclosure of security issues and to be eligible for our bug bounty program, please submit your report via the [HackerOne](https://hackerone.com/automattic) portal.** - -Our most critical targets are: - -* Jetpack and the Jetpack composer packages (all within this repo) -* Jetpack.com -- the primary marketing site. -* cloud.jetpack.com -- a management site. -* wordpress.com -- the shared management site for both Jetpack and WordPress.com sites. - -For more targets, see the `In Scope` section on [HackerOne](https://hackerone.com/automattic). - -_Please note that the **WordPress software is a separate entity** from Automattic. Please report vulnerabilities for WordPress through [the WordPress Foundation's HackerOne page](https://hackerone.com/wordpress)._ - -## Guidelines - -We're committed to working with security researchers to resolve the vulnerabilities they discover. You can help us by following these guidelines: - -* Follow [HackerOne's disclosure guidelines](https://www.hackerone.com/disclosure-guidelines). -* Pen-testing Production: - * Please **setup a local environment** instead whenever possible. Most of our code is open source (see above). - * If that's not possible, **limit any data access/modification** to the bare minimum necessary to reproduce a PoC. - * **_Don't_ automate form submissions!** That's very annoying for us, because it adds extra work for the volunteers who manage those systems, and reduces the signal/noise ratio in our communication channels. - * To be eligible for a bounty, all of these guidelines must be followed. -* Be Patient - Give us a reasonable time to correct the issue before you disclose the vulnerability. - -We also expect you to comply with all applicable laws. You're responsible to pay any taxes associated with your bounties. diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-a8c-mc-stats/composer.json b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-a8c-mc-stats/composer.json deleted file mode 100644 index 27b72455..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-a8c-mc-stats/composer.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "name": "automattic/jetpack-a8c-mc-stats", - "description": "Used to record internal usage stats for Automattic. Not visible to site owners.", - "type": "jetpack-library", - "license": "GPL-2.0-or-later", - "require": { - "php": ">=7.0" - }, - "require-dev": { - "yoast/phpunit-polyfills": "1.1.0", - "automattic/jetpack-changelogger": "^4.1.1" - }, - "suggest": { - "automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package." - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "scripts": { - "phpunit": [ - "./vendor/phpunit/phpunit/phpunit --colors=always" - ], - "test-php": [ - "@composer phpunit" - ] - }, - "minimum-stability": "dev", - "prefer-stable": true, - "extra": { - "autotagger": true, - "mirror-repo": "Automattic/jetpack-a8c-mc-stats", - "changelogger": { - "link-template": "https://github.com/Automattic/jetpack-a8c-mc-stats/compare/v${old}...v${new}" - }, - "branch-alias": { - "dev-trunk": "2.0.x-dev" - } - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-a8c-mc-stats/src/class-a8c-mc-stats.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-a8c-mc-stats/src/class-a8c-mc-stats.php deleted file mode 100644 index 9e573cd7..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-a8c-mc-stats/src/class-a8c-mc-stats.php +++ /dev/null @@ -1,181 +0,0 @@ -use_transparent_pixel = $use_transparent_pixel; - } - - /** - * Store a stat for later output. - * - * @param string $group The stat group. - * @param string $name The stat name to bump. - * - * @return boolean true if stat successfully added - */ - public function add( $group, $name ) { - - if ( ! \is_string( $group ) || ! \is_string( $name ) ) { - return false; - } - - if ( ! isset( $this->stats[ $group ] ) ) { - $this->stats[ $group ] = array(); - } - - if ( \in_array( $name, $this->stats[ $group ], true ) ) { - return false; - } - - $this->stats[ $group ][] = $name; - - return true; - } - - /** - * Gets current stats stored to be processed - * - * @return array $stats - */ - public function get_current_stats() { - return $this->stats; - } - - /** - * Return the stats from a group in an array ready to be added as parameters in a query string - * - * @param string $group_name The name of the group to retrieve. - * @return array Array with one item, where the key is the prefixed group and the value are all stats concatenated with a comma. If group not found, an empty array will be returned - */ - public function get_group_query_args( $group_name ) { - $stats = $this->get_current_stats(); - if ( isset( $stats[ $group_name ] ) && ! empty( $stats[ $group_name ] ) ) { - return array( "x_jetpack-{$group_name}" => implode( ',', $stats[ $group_name ] ) ); - } - return array(); - } - - /** - * Gets a list of trac URLs for every stored URL - * - * @return array An array of URLs - */ - public function get_stats_urls() { - - $urls = array(); - - foreach ( $this->get_current_stats() as $group => $stat ) { - $group_query_string = $this->get_group_query_args( $group ); - $urls[] = $this->build_stats_url( $group_query_string ); - } - - return $urls; - } - - /** - * Outputs the tracking pixels for the current stats and empty the stored stats from the object - * - * @return void - */ - public function do_stats() { - $urls = $this->get_stats_urls(); - foreach ( $urls as $url ) { - echo ''; - } - $this->stats = array(); - } - - /** - * Pings the stats server for the current stats and empty the stored stats from the object - * - * @return void - */ - public function do_server_side_stats() { - $urls = $this->get_stats_urls(); - foreach ( $urls as $url ) { - $this->do_server_side_stat( $url ); - } - $this->stats = array(); - } - - /** - * Runs stats code for a one-off, server-side. - * - * @param string $url string The URL to be pinged. Should include `x_jetpack-{$group}={$stats}` or whatever we want to store. - * - * @return bool If it worked. - */ - public function do_server_side_stat( $url ) { - $response = wp_remote_get( esc_url_raw( $url ) ); - if ( is_wp_error( $response ) ) { - return false; - } - - if ( 200 !== wp_remote_retrieve_response_code( $response ) ) { - return false; - } - - return true; - } - - /** - * Builds the stats url. - * - * @param array $args array|string The arguments to append to the URL. - * - * @return string The URL to be pinged. - */ - public function build_stats_url( $args ) { - $defaults = array( - 'v' => 'wpcom2', - 'rand' => md5( wp_rand( 0, 999 ) . time() ), - ); - $args = wp_parse_args( $args, $defaults ); - $gifname = true === $this->use_transparent_pixel ? 'b.gif' : 'g.gif'; - - /** - * Filter the URL used as the Stats tracking pixel. - * - * @since-jetpack 2.3.2 - * @since 1.0.0 - * - * @param string $url Base URL used as the Stats tracking pixel. - */ - $base_url = apply_filters( - 'jetpack_stats_base_url', - 'https://pixel.wp.com/' . $gifname - ); - $url = add_query_arg( $args, $base_url ); - return $url; - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-admin-ui/CHANGELOG.md b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-admin-ui/CHANGELOG.md deleted file mode 100644 index 5a2181d0..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-admin-ui/CHANGELOG.md +++ /dev/null @@ -1,178 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file. - -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) -and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - -## [0.4.1] - 2024-03-12 -### Changed -- Internal updates. - -## [0.4.0] - 2024-03-01 -### Added -- Register menus in network admin as well as regular admin. [#36058] - -## [0.3.2] - 2024-01-29 -### Fixed -- Wait until 'admin_menu' action to call `add_menu()`, to avoid triggering the l10n load too early. [#35279] - -## [0.3.1] - 2023-11-24 - -## [0.3.0] - 2023-11-20 -### Changed -- Updated required PHP version to >= 7.0. [#34192] - -## [0.2.25] - 2023-11-14 - -## [0.2.24] - 2023-10-30 -### Fixed -- Handle Akismet submenu even if Jetpack is present, as Jetpack now relies on this package to do so. [#33559] - -## [0.2.23] - 2023-09-19 -### Changed -- Updated Jetpack submenu sort order so individual features are alpha-sorted. [#32958] - -## [0.2.22] - 2023-09-11 -### Fixed -- Akismet: update naming to common form [#32908] - -## [0.2.21] - 2023-08-23 -### Changed -- Updated package dependencies. [#32605] - -## [0.2.20] - 2023-04-25 -### Fixed -- Avoid errors when used in combination with an older version of the Logo package. [#30136] - -## [0.2.19] - 2023-04-10 -### Added -- Add Jetpack Autoloader package suggestion. [#29988] - -## [0.2.18] - 2023-04-04 -### Changed -- Menu icon: update to latest version of the Jetpack logo [#29418] - -## [0.2.17] - 2023-02-20 -### Changed -- Minor internal updates. - -## [0.2.16] - 2023-01-25 -### Changed -- Minor internal updates. - -## [0.2.15] - 2023-01-11 -### Changed -- Updated package dependencies. - -## [0.2.14] - 2022-12-02 -### Changed -- Updated package dependencies. [#27688] - -## [0.2.13] - 2022-11-22 -### Changed -- Updated package dependencies. [#27043] - -## [0.2.12] - 2022-09-20 -### Changed -- Updated package dependencies. - -## [0.2.11] - 2022-07-26 -### Changed -- Updated package dependencies. [#25158] - -## [0.2.10] - 2022-07-12 -### Changed -- Updated package dependencies. - -## [0.2.9] - 2022-06-21 -### Changed -- Renaming master to trunk. - -## [0.2.8] - 2022-06-14 -### Changed -- Updated package dependencies. - -## [0.2.7] - 2022-04-26 -### Changed -- Update package.json metadata. - -## [0.2.6] - 2022-04-05 -### Changed -- Updated package dependencies. - -## [0.2.5] - 2022-03-08 -### Fixed -- Do not handle Akismet submenu if Jetpack plugin is present - -## [0.2.4] - 2022-02-09 -### Added -- Support for akismet menu with stand-alone plugins - -### Fixed -- Fixes menu order working around a bug in add_submenu_page - -## [0.2.3] - 2022-01-25 -### Changed -- Updated package dependencies. - -## [0.2.2] - 2022-01-18 -### Changed -- General: update required node version to v16.13.2 - -## [0.2.1] - 2022-01-04 -### Changed -- Switch to pcov for code coverage. -- Updated package dependencies - -## [0.2.0] - 2021-12-14 -### Added -- New method to get the top level menu item - -## [0.1.1] - 2021-11-17 -### Changed -- Set `convertDeprecationsToExceptions` true in PHPUnit config. -- Update PHPUnit configs to include just what needs coverage rather than include everything then try to exclude stuff that doesn't. - -## 0.1.0 - 2021-10-13 -### Added -- Created the package. - -### Changed -- Updated package dependencies. - -### Fixed -- Fixing menu visibility issues. - -[0.4.1]: https://github.com/Automattic/jetpack-admin-ui/compare/0.4.0...0.4.1 -[0.4.0]: https://github.com/Automattic/jetpack-admin-ui/compare/0.3.2...0.4.0 -[0.3.2]: https://github.com/Automattic/jetpack-admin-ui/compare/0.3.1...0.3.2 -[0.3.1]: https://github.com/Automattic/jetpack-admin-ui/compare/0.3.0...0.3.1 -[0.3.0]: https://github.com/Automattic/jetpack-admin-ui/compare/0.2.25...0.3.0 -[0.2.25]: https://github.com/Automattic/jetpack-admin-ui/compare/0.2.24...0.2.25 -[0.2.24]: https://github.com/Automattic/jetpack-admin-ui/compare/0.2.23...0.2.24 -[0.2.23]: https://github.com/Automattic/jetpack-admin-ui/compare/0.2.22...0.2.23 -[0.2.22]: https://github.com/Automattic/jetpack-admin-ui/compare/0.2.21...0.2.22 -[0.2.21]: https://github.com/Automattic/jetpack-admin-ui/compare/0.2.20...0.2.21 -[0.2.20]: https://github.com/Automattic/jetpack-admin-ui/compare/0.2.19...0.2.20 -[0.2.19]: https://github.com/Automattic/jetpack-admin-ui/compare/0.2.18...0.2.19 -[0.2.18]: https://github.com/Automattic/jetpack-admin-ui/compare/0.2.17...0.2.18 -[0.2.17]: https://github.com/Automattic/jetpack-admin-ui/compare/0.2.16...0.2.17 -[0.2.16]: https://github.com/Automattic/jetpack-admin-ui/compare/0.2.15...0.2.16 -[0.2.15]: https://github.com/Automattic/jetpack-admin-ui/compare/0.2.14...0.2.15 -[0.2.14]: https://github.com/Automattic/jetpack-admin-ui/compare/0.2.13...0.2.14 -[0.2.13]: https://github.com/Automattic/jetpack-admin-ui/compare/0.2.12...0.2.13 -[0.2.12]: https://github.com/Automattic/jetpack-admin-ui/compare/0.2.11...0.2.12 -[0.2.11]: https://github.com/Automattic/jetpack-admin-ui/compare/0.2.10...0.2.11 -[0.2.10]: https://github.com/Automattic/jetpack-admin-ui/compare/0.2.9...0.2.10 -[0.2.9]: https://github.com/Automattic/jetpack-admin-ui/compare/0.2.8...0.2.9 -[0.2.8]: https://github.com/Automattic/jetpack-admin-ui/compare/0.2.7...0.2.8 -[0.2.7]: https://github.com/Automattic/jetpack-admin-ui/compare/0.2.6...0.2.7 -[0.2.6]: https://github.com/Automattic/jetpack-admin-ui/compare/0.2.5...0.2.6 -[0.2.5]: https://github.com/Automattic/jetpack-admin-ui/compare/0.2.4...0.2.5 -[0.2.4]: https://github.com/Automattic/jetpack-admin-ui/compare/0.2.3...0.2.4 -[0.2.3]: https://github.com/Automattic/jetpack-admin-ui/compare/0.2.2...0.2.3 -[0.2.2]: https://github.com/Automattic/jetpack-admin-ui/compare/0.2.1...0.2.2 -[0.2.1]: https://github.com/Automattic/jetpack-admin-ui/compare/0.2.0...0.2.1 -[0.2.0]: https://github.com/Automattic/jetpack-admin-ui/compare/0.1.1...0.2.0 -[0.1.1]: https://github.com/Automattic/jetpack-admin-ui/compare/0.1.0...0.1.1 diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-admin-ui/LICENSE.txt b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-admin-ui/LICENSE.txt deleted file mode 100644 index e82774c1..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-admin-ui/LICENSE.txt +++ /dev/null @@ -1,357 +0,0 @@ -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - - -=================================== - - -GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - -Copyright (C) 1989, 1991 Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -Everyone is permitted to copy and distribute verbatim copies -of this license document, but changing it is not allowed. - - Preamble - -The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Lesser General Public License instead.) You can apply it to -your programs, too. - -When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - -To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - -For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - -We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - -Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - -Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - -The precise terms and conditions for copying, distribution and -modification follow. - -GNU GENERAL PUBLIC LICENSE -TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - -0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - -1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - -2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - -a) You must cause the modified files to carry prominent notices -stating that you changed the files and the date of any change. - -b) You must cause any work that you distribute or publish, that in -whole or in part contains or is derived from the Program or any -part thereof, to be licensed as a whole at no charge to all third -parties under the terms of this License. - -c) If the modified program normally reads commands interactively -when run, you must cause it, when started running for such -interactive use in the most ordinary way, to print or display an -announcement including an appropriate copyright notice and a -notice that there is no warranty (or else, saying that you provide -a warranty) and that users may redistribute the program under -these conditions, and telling the user how to view a copy of this -License. (Exception: if the Program itself is interactive but -does not normally print such an announcement, your work based on -the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - -3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - -a) Accompany it with the complete corresponding machine-readable -source code, which must be distributed under the terms of Sections -1 and 2 above on a medium customarily used for software interchange; or, - -b) Accompany it with a written offer, valid for at least three -years, to give any third party, for a charge no more than your -cost of physically performing source distribution, a complete -machine-readable copy of the corresponding source code, to be -distributed under the terms of Sections 1 and 2 above on a medium -customarily used for software interchange; or, - -c) Accompany it with the information you received as to the offer -to distribute corresponding source code. (This alternative is -allowed only for noncommercial distribution and only if you -received the program in object code or executable form with such -an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - -4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - -5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - -6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - -7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - -8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - -9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - -10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - -11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - -12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - -How to Apply These Terms to Your New Programs - -If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - -To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - -Copyright (C) - -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along -with this program; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - -Gnomovision version 69, Copyright (C) year name of author -Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. -This is free software, and you are welcome to redistribute it -under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - -Yoyodyne, Inc., hereby disclaims all copyright interest in the program -`Gnomovision' (which makes passes at compilers) written by James Hacker. - -, 1 April 1989 -Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-admin-ui/SECURITY.md b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-admin-ui/SECURITY.md deleted file mode 100644 index 98f48dd1..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-admin-ui/SECURITY.md +++ /dev/null @@ -1,47 +0,0 @@ -# Security Policy - -Full details of the Automattic Security Policy can be found on [automattic.com](https://automattic.com/security/). - -## Supported Versions - -Generally, only the latest version of Jetpack and its associated plugins have continued support. If a critical vulnerability is found in the current version of a plugin, we may opt to backport any patches to previous versions. - -## Reporting a Vulnerability - -Our HackerOne program covers the below plugin software, as well as a variety of related projects and infrastructure: - -* [Jetpack](https://jetpack.com/) -* Jetpack Backup -* Jetpack Boost -* Jetpack CRM -* Jetpack Protect -* Jetpack Search -* Jetpack Social -* Jetpack VideoPress - -**For responsible disclosure of security issues and to be eligible for our bug bounty program, please submit your report via the [HackerOne](https://hackerone.com/automattic) portal.** - -Our most critical targets are: - -* Jetpack and the Jetpack composer packages (all within this repo) -* Jetpack.com -- the primary marketing site. -* cloud.jetpack.com -- a management site. -* wordpress.com -- the shared management site for both Jetpack and WordPress.com sites. - -For more targets, see the `In Scope` section on [HackerOne](https://hackerone.com/automattic). - -_Please note that the **WordPress software is a separate entity** from Automattic. Please report vulnerabilities for WordPress through [the WordPress Foundation's HackerOne page](https://hackerone.com/wordpress)._ - -## Guidelines - -We're committed to working with security researchers to resolve the vulnerabilities they discover. You can help us by following these guidelines: - -* Follow [HackerOne's disclosure guidelines](https://www.hackerone.com/disclosure-guidelines). -* Pen-testing Production: - * Please **setup a local environment** instead whenever possible. Most of our code is open source (see above). - * If that's not possible, **limit any data access/modification** to the bare minimum necessary to reproduce a PoC. - * **_Don't_ automate form submissions!** That's very annoying for us, because it adds extra work for the volunteers who manage those systems, and reduces the signal/noise ratio in our communication channels. - * To be eligible for a bounty, all of these guidelines must be followed. -* Be Patient - Give us a reasonable time to correct the issue before you disclose the vulnerability. - -We also expect you to comply with all applicable laws. You're responsible to pay any taxes associated with your bounties. diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-admin-ui/composer.json b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-admin-ui/composer.json deleted file mode 100644 index b49d52f6..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-admin-ui/composer.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "name": "automattic/jetpack-admin-ui", - "description": "Generic Jetpack wp-admin UI elements", - "type": "jetpack-library", - "license": "GPL-2.0-or-later", - "require": { - "php": ">=7.0" - }, - "require-dev": { - "yoast/phpunit-polyfills": "1.1.0", - "automattic/jetpack-changelogger": "^4.1.1", - "automattic/jetpack-logo": "^2.0.1", - "automattic/wordbless": "dev-master" - }, - "suggest": { - "automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package." - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "scripts": { - "phpunit": [ - "./vendor/phpunit/phpunit/phpunit --colors=always" - ], - "test-php": [ - "@composer phpunit" - ], - "post-install-cmd": "WorDBless\\Composer\\InstallDropin::copy", - "post-update-cmd": "WorDBless\\Composer\\InstallDropin::copy" - }, - "minimum-stability": "dev", - "prefer-stable": true, - "extra": { - "autotagger": true, - "mirror-repo": "Automattic/jetpack-admin-ui", - "textdomain": "jetpack-admin-ui", - "changelogger": { - "link-template": "https://github.com/Automattic/jetpack-admin-ui/compare/${old}...${new}" - }, - "branch-alias": { - "dev-trunk": "0.4.x-dev" - }, - "version-constants": { - "::PACKAGE_VERSION": "src/class-admin-menu.php" - } - }, - "config": { - "allow-plugins": { - "roots/wordpress-core-installer": true - } - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-admin-ui/src/class-admin-menu.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-admin-ui/src/class-admin-menu.php deleted file mode 100644 index 2e7d16ad..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-admin-ui/src/class-admin-menu.php +++ /dev/null @@ -1,208 +0,0 @@ -get_base64_logo() - : 'dashicons-admin-plugins'; - - if ( ! $jetpack_plugin_present ) { - add_menu_page( - 'Jetpack', - 'Jetpack', - 'read', - 'jetpack', - '__return_null', - $icon, - 3 - ); - - // If Jetpack plugin is not present, user will only be able to see this menu if they have enough capability to at least one of the sub menus being added. - $can_see_toplevel_menu = false; - } - - /** - * The add_sub_menu function has a bug and will not keep the right order of menu items. - * - * @see https://core.trac.wordpress.org/ticket/52035 - * Let's order the items before registering them. - * Since this all happens after the Jetpack plugin menu items were added, all items will be added after Jetpack plugin items - unless position is very low number (smaller than the number of menu items present in Jetpack plugin). - */ - usort( - self::$menu_items, - function ( $a, $b ) { - $position_a = empty( $a['position'] ) ? 0 : $a['position']; - $position_b = empty( $b['position'] ) ? 0 : $b['position']; - $result = $position_a <=> $position_b; - - if ( 0 === $result ) { - $result = strcmp( $a['menu_title'], $b['menu_title'] ); - } - - return $result; - } - ); - - foreach ( self::$menu_items as $menu_item ) { - if ( ! current_user_can( $menu_item['capability'] ) ) { - continue; - } - - $can_see_toplevel_menu = true; - - add_submenu_page( - 'jetpack', - $menu_item['page_title'], - $menu_item['menu_title'], - $menu_item['capability'], - $menu_item['menu_slug'], - $menu_item['function'], - $menu_item['position'] - ); - } - - if ( ! $jetpack_plugin_present ) { - remove_submenu_page( 'jetpack', 'jetpack' ); - } - - if ( ! $can_see_toplevel_menu ) { - remove_menu_page( 'jetpack' ); - } - } - - /** - * Adds a new submenu to the Jetpack Top level menu - * - * The parameters this method accepts are the same as @see add_submenu_page. This class will - * aggreagate all menu items registered by stand-alone plugins and make sure they all go under the same - * Jetpack top level menu. It will also handle the top level menu registration in case the Jetpack plugin is not present. - * - * @param string $page_title The text to be displayed in the title tags of the page when the menu - * is selected. - * @param string $menu_title The text to be used for the menu. - * @param string $capability The capability required for this menu to be displayed to the user. - * @param string $menu_slug The slug name to refer to this menu by. Should be unique for this menu - * and only include lowercase alphanumeric, dashes, and underscores characters - * to be compatible with sanitize_key(). - * @param callable $function The function to be called to output the content for this page. - * @param int $position The position in the menu order this item should appear. Leave empty typically. - * - * @return string The resulting page's hook_suffix - */ - public static function add_menu( $page_title, $menu_title, $capability, $menu_slug, $function, $position = null ) { - self::init(); - self::$menu_items[] = compact( 'page_title', 'menu_title', 'capability', 'menu_slug', 'function', 'position' ); - - /** - * Let's return the page hook so consumers can use. - * We know all pages will be under Jetpack top level menu page, so we can hardcode the first part of the string. - * Using get_plugin_page_hookname here won't work because the top level page is not registered yet. - */ - return 'jetpack_page_' . $menu_slug; - } - - /** - * Gets the slug for the first item under the Jetpack top level menu - * - * @return string|null - */ - public static function get_top_level_menu_item_slug() { - global $submenu; - if ( ! empty( $submenu['jetpack'] ) ) { - $item = reset( $submenu['jetpack'] ); - if ( isset( $item[2] ) ) { - return $item[2]; - } - } - } - - /** - * Gets the URL for the first item under the Jetpack top level menu - * - * @param string $fallback If Jetpack menu is not there or no children is found, return this fallback instead. Default to admin_url(). - * @return string - */ - public static function get_top_level_menu_item_url( $fallback = false ) { - $slug = self::get_top_level_menu_item_slug(); - - if ( $slug ) { - $url = menu_page_url( $slug, false ); - return $url; - } - - $url = $fallback ? $fallback : admin_url(); - return $url; - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-assets/CHANGELOG.md b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-assets/CHANGELOG.md deleted file mode 100644 index 5ae09fd8..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-assets/CHANGELOG.md +++ /dev/null @@ -1,515 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file. - -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) -and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - -## [2.1.4] - 2024-03-12 -### Changed -- Internal updates. - -## [2.1.3] - 2024-03-12 -### Changed -- Updated package dependencies. [#36325] - -## [2.1.2] - 2024-03-04 -### Changed -- Updated package dependencies. [#36095] - -## [2.1.1] - 2024-02-13 -### Changed -- Updated package dependencies. [#35608] - -## [2.1.0] - 2024-02-05 -### Added -- Add support for script enqueuing strategies implemented in WordPress 6.3 [#34072] - -### Changed -- Updated package dependencies. [#35384] - -## [2.0.4] - 2024-01-04 -### Changed -- Updated package dependencies. [#34815] - -## [2.0.3] - 2023-12-11 -### Changed -- Updated package dependencies. [#34492] - -## [2.0.2] - 2023-12-03 -### Changed -- Updated package dependencies. [#34411] [#34427] - -## [2.0.1] - 2023-11-21 - -## [2.0.0] - 2023-11-20 -### Changed -- Updated required PHP version to >= 7.0. [#34192] - -## [1.18.15] - 2023-11-14 -### Changed -- Updated package dependencies. [#34093] - -## [1.18.14] - 2023-11-03 - -## [1.18.13] - 2023-10-19 -### Changed -- Updated package dependencies. [#33687] - -## [1.18.12] - 2023-10-10 -### Changed -- Updated package dependencies. [#33428] - -### Fixed -- Pass `false`, not `null`, to `WP_Scripts->add()`. [#33513] - -## [1.18.11] - 2023-09-19 - -- Minor internal updates. - -## [1.18.10] - 2023-09-04 -### Changed -- Updated package dependencies. [#32803] - -## [1.18.9] - 2023-08-23 -### Changed -- Updated package dependencies. [#32605] - -## [1.18.8] - 2023-08-09 -### Changed -- Updated package dependencies. [#32166] - -## [1.18.7] - 2023-07-11 -### Changed -- Updated package dependencies. [#31785] - -## [1.18.6] - 2023-07-05 -### Changed -- Updated package dependencies. [#31659] - -## [1.18.5] - 2023-06-21 -### Changed -- Updated package dependencies. [#31468] - -## [1.18.4] - 2023-06-06 -### Changed -- Updated package dependencies. [#31129] - -## [1.18.3] - 2023-05-15 -### Changed -- Internal updates. - -## [1.18.2] - 2023-05-02 -### Changed -- Updated package dependencies. [#30375] - -## [1.18.1] - 2023-04-10 -### Added -- Add Jetpack Autoloader package suggestion. [#29988] - -## [1.18.0] - 2023-04-04 -### Changed -- Async script enqueuing: switch to static method. [#29780] -- Updated package dependencies. [#29854] - -## [1.17.34] - 2023-03-20 -### Changed -- Updated package dependencies. [#29471] - -## [1.17.33] - 2023-03-08 -### Changed -- Updated package dependencies. [#29216] - -## [1.17.32] - 2023-02-20 -### Changed -- Minor internal updates. - -## [1.17.31] - 2023-02-15 -### Changed -- Update to React 18. [#28710] - -## [1.17.30] - 2023-01-25 -### Changed -- Minor internal updates. - -## [1.17.29] - 2023-01-11 -### Changed -- Updated package dependencies. - -## [1.17.28] - 2022-12-02 -### Changed -- Updated package dependencies. - -## [1.17.27] - 2022-11-28 -### Changed -- Updated package dependencies. [#27576] - -## [1.17.26] - 2022-11-22 -### Changed -- Updated package dependencies. [#27043] - -## [1.17.25] - 2022-11-08 -### Changed -- Updated package dependencies. [#27289] - -## [1.17.24] - 2022-11-01 -### Changed -- Updated package dependencies. - -## [1.17.23] - 2022-10-13 -### Changed -- Updated package dependencies. [#26791] - -## [1.17.22] - 2022-10-05 -### Changed -- Updated package dependencies. [#26568] - -## [1.17.21] - 2022-08-25 -### Changed -- Updated package dependencies. [#25814] - -## [1.17.20] - 2022-07-26 -### Changed -- Updated package dependencies. [#25158] - -## [1.17.19] - 2022-07-12 -### Changed -- Updated package dependencies. - -## [1.17.18] - 2022-07-06 -### Changed -- Updated package dependencies - -## [1.17.17] - 2022-06-21 -### Changed -- Renaming master to trunk. - -## [1.17.16] - 2022-06-14 - -## [1.17.15] - 2022-06-08 -### Changed -- Reorder JS imports for `import/order` eslint rule. [#24601] - -## [1.17.14] - 2022-05-18 -### Changed -- Updated package dependencies [#24372] - -## [1.17.13] - 2022-05-10 -### Changed -- Updated package dependencies. [#24302] - -## [1.17.12] - 2022-05-04 -### Added -- Add missing JavaScript dependencies, and fix a test. [#24096] - -## [1.17.11] - 2022-04-26 -### Changed -- Updated package dependencies. - -## [1.17.10] - 2022-04-19 -### Fixed -- Assets: Defer the enqueued script instead of its translations - -## [1.17.9] - 2022-04-05 -### Changed -- Updated package dependencies. - -## [1.17.8] - 2022-03-29 -### Changed -- Updated package dependencies. - -## [1.17.7] - 2022-03-23 -### Changed -- Updated package dependencies. - -## [1.17.6] - 2022-03-02 -### Changed -- Updated package dependencies. - -## [1.17.5] - 2022-02-16 -### Changed -- Updated package dependencies. - -## [1.17.4] - 2022-02-09 -### Changed -- Updated package dependencies. - -## [1.17.3] - 2022-02-02 -### Fixed -- Fixed minor coding standard violation. - -## [1.17.2] - 2022-02-01 -### Changed -- Build: remove unneeded files from production build. - -## [1.17.1] - 2022-01-27 -### Changed -- Updated package dependencies. - -## [1.17.0] - 2022-01-25 -### Added -- Accept package path prefixes from jetpack-composer-plugin and use them when lazy-loading JS translations. -- Generate the `wp-jp-i18n-loader` module needed by the new i18n-loader-webpack-plugin. - -### Deprecated -- Deprecated the `wp-jp-i18n-state` module. - -## [1.16.2] - 2022-01-18 -### Fixed -- Handle the case where `WP_LANG_DIR` is in `WP_CONTENT_DIR`, but `WP_CONTENT_DIR` is not in `ABSPATH`. - -## [1.16.1] - 2022-01-05 -### Fixed -- Don't issue a "doing it wrong" warning for registering aliases during plugin activation. - -## [1.16.0] - 2022-01-04 -### Added -- Document use of jetpack-assets, jetpack-composer-plugin, and i18n-loader-webpack-plugin together. - -### Changed -- Switch to pcov for code coverage. -- Updated package dependencies -- Updated package textdomain from `jetpack` to `jetpack-assets`. - -## [1.15.0] - 2021-12-20 -### Added -- Add `alias_textdomain()`. - -## [1.14.0] - 2021-12-14 -### Added -- Generate `wp-jp-i18n-state` script. - -## [1.13.1] - 2021-11-22 -### Fixed -- Call `_doing_it_wrong` correctly. - -## [1.13.0] - 2021-11-22 -### Added -- Have `Assets::register_script()` accept a textdomain for `wp_set_script_translations` (and complain if no textdomain is passed when `wp-i18n` is depended on). - -### Changed -- Updated package dependencies - -### Fixed -- Added missing option doc for `Assets::register_script()`. - -## [1.12.0] - 2021-11-15 -### Added -- Add `Assets::register_script()` for easier loading of Webpack-built scripts. - -## [1.11.10] - 2021-11-02 -### Changed -- Set `convertDeprecationsToExceptions` true in PHPUnit config. -- Update PHPUnit configs to include just what needs coverage rather than include everything then try to exclude stuff that doesn't. - -## [1.11.9] - 2021-10-13 -### Changed -- Updated package dependencies. - -## [1.11.8] - 2021-10-06 -### Changed -- Updated package dependencies - -## [1.11.7] - 2021-09-28 -### Changed -- Updated package dependencies. - -## [1.11.6] - 2021-08-30 -### Changed -- Run composer update on test-php command instead of phpunit -- Tests: update PHPUnit polyfills dependency (yoast/phpunit-polyfills). -- update annotations versions - -## [1.11.5] - 2021-05-25 -### Changed -- Updated package dependencies. - -## [1.11.4] - 2021-04-08 -### Changed -- Packaging and build changes, no change to the package itself. - -## [1.11.3] - 2021-03-30 -### Added -- Composer alias for dev-master, to improve dependencies - -### Changed -- Update package dependencies. - -### Fixed -- Use `composer update` rather than `install` in scripts, as composer.lock isn't checked in. - -## [1.11.2] - 2021-02-23 - -- CI: Make tests more generic - -## [1.11.1] - 2021-01-26 - -- Add mirror-repo information to all current composer packages -- Monorepo: Reorganize all projects - -## [1.11.0] - 2021-01-05 - -- Update dependency brain/monkey to v2.6.0 - -## [1.10.0] - 2020-12-08 - -- Assets: introduce new method to process static resources -- Assets: Use defer for script tags -- Pin dependencies -- Packages: Update for PHP 8 testing - -## [1.9.1] - 2020-11-24 - -- Update dependency brain/monkey to v2.5.0 -- Updated PHPCS: Packages and Debugger - -## [1.9.0] - 2020-10-27 - -- Instagram oEmbed: Simplify - -## [1.8.0] - 2020-09-29 - -- Consolidate the Lazy Images package to rely on the Assets package - -## [1.7.0] - 2020-08-25 - -- Packages: Update filenames after #16810 -- CI: Try collect js coverage -- Docker: Add package testing shortcut - -## [1.6.0] - 2020-07-28 - -- Various: Use wp_resource_hints - -## [1.5.0] - 2020-06-30 - -- PHPCS: Clean up the packages -- WooCommerce Analytics: avoid 404 error when enqueuing script - -## [1.4.0] - 2020-05-26 - -- Add Jetpack Scan threat notifications - -## [1.3.0] - 2020-04-28 - -- Update dependencies to latest stable - -## [1.2.0] - 2020-03-31 - -- Update dependencies to latest stable - -## [1.1.1] - 2020-01-27 - -- Pin dependency brain/monkey to 2.4.0 - -## [1.1.0] - 2020-01-14 - -- Packages: Various improvements for wp.com or self-contained consumers - -## [1.0.3] - 2019-11-08 - -- Packages: Use classmap instead of PSR-4 - -## [1.0.1] - 2019-10-28 - -- PHPCS: JITM and Assets packages -- Packages: Add gitattributes files to all packages that need th… - -## 1.0.0 - 2019-09-14 - -- Statically access asset tools - -[2.1.4]: https://github.com/Automattic/jetpack-assets/compare/v2.1.3...v2.1.4 -[2.1.3]: https://github.com/Automattic/jetpack-assets/compare/v2.1.2...v2.1.3 -[2.1.2]: https://github.com/Automattic/jetpack-assets/compare/v2.1.1...v2.1.2 -[2.1.1]: https://github.com/Automattic/jetpack-assets/compare/v2.1.0...v2.1.1 -[2.1.0]: https://github.com/Automattic/jetpack-assets/compare/v2.0.4...v2.1.0 -[2.0.4]: https://github.com/Automattic/jetpack-assets/compare/v2.0.3...v2.0.4 -[2.0.3]: https://github.com/Automattic/jetpack-assets/compare/v2.0.2...v2.0.3 -[2.0.2]: https://github.com/Automattic/jetpack-assets/compare/v2.0.1...v2.0.2 -[2.0.1]: https://github.com/Automattic/jetpack-assets/compare/v2.0.0...v2.0.1 -[2.0.0]: https://github.com/Automattic/jetpack-assets/compare/v1.18.15...v2.0.0 -[1.18.15]: https://github.com/Automattic/jetpack-assets/compare/v1.18.14...v1.18.15 -[1.18.14]: https://github.com/Automattic/jetpack-assets/compare/v1.18.13...v1.18.14 -[1.18.13]: https://github.com/Automattic/jetpack-assets/compare/v1.18.12...v1.18.13 -[1.18.12]: https://github.com/Automattic/jetpack-assets/compare/v1.18.11...v1.18.12 -[1.18.11]: https://github.com/Automattic/jetpack-assets/compare/v1.18.10...v1.18.11 -[1.18.10]: https://github.com/Automattic/jetpack-assets/compare/v1.18.9...v1.18.10 -[1.18.9]: https://github.com/Automattic/jetpack-assets/compare/v1.18.8...v1.18.9 -[1.18.8]: https://github.com/Automattic/jetpack-assets/compare/v1.18.7...v1.18.8 -[1.18.7]: https://github.com/Automattic/jetpack-assets/compare/v1.18.6...v1.18.7 -[1.18.6]: https://github.com/Automattic/jetpack-assets/compare/v1.18.5...v1.18.6 -[1.18.5]: https://github.com/Automattic/jetpack-assets/compare/v1.18.4...v1.18.5 -[1.18.4]: https://github.com/Automattic/jetpack-assets/compare/v1.18.3...v1.18.4 -[1.18.3]: https://github.com/Automattic/jetpack-assets/compare/v1.18.2...v1.18.3 -[1.18.2]: https://github.com/Automattic/jetpack-assets/compare/v1.18.1...v1.18.2 -[1.18.1]: https://github.com/Automattic/jetpack-assets/compare/v1.18.0...v1.18.1 -[1.18.0]: https://github.com/Automattic/jetpack-assets/compare/v1.17.34...v1.18.0 -[1.17.34]: https://github.com/Automattic/jetpack-assets/compare/v1.17.33...v1.17.34 -[1.17.33]: https://github.com/Automattic/jetpack-assets/compare/v1.17.32...v1.17.33 -[1.17.32]: https://github.com/Automattic/jetpack-assets/compare/v1.17.31...v1.17.32 -[1.17.31]: https://github.com/Automattic/jetpack-assets/compare/v1.17.30...v1.17.31 -[1.17.30]: https://github.com/Automattic/jetpack-assets/compare/v1.17.29...v1.17.30 -[1.17.29]: https://github.com/Automattic/jetpack-assets/compare/v1.17.28...v1.17.29 -[1.17.28]: https://github.com/Automattic/jetpack-assets/compare/v1.17.27...v1.17.28 -[1.17.27]: https://github.com/Automattic/jetpack-assets/compare/v1.17.26...v1.17.27 -[1.17.26]: https://github.com/Automattic/jetpack-assets/compare/v1.17.25...v1.17.26 -[1.17.25]: https://github.com/Automattic/jetpack-assets/compare/v1.17.24...v1.17.25 -[1.17.24]: https://github.com/Automattic/jetpack-assets/compare/v1.17.23...v1.17.24 -[1.17.23]: https://github.com/Automattic/jetpack-assets/compare/v1.17.22...v1.17.23 -[1.17.22]: https://github.com/Automattic/jetpack-assets/compare/v1.17.21...v1.17.22 -[1.17.21]: https://github.com/Automattic/jetpack-assets/compare/v1.17.20...v1.17.21 -[1.17.20]: https://github.com/Automattic/jetpack-assets/compare/v1.17.19...v1.17.20 -[1.17.19]: https://github.com/Automattic/jetpack-assets/compare/v1.17.18...v1.17.19 -[1.17.18]: https://github.com/Automattic/jetpack-assets/compare/v1.17.17...v1.17.18 -[1.17.17]: https://github.com/Automattic/jetpack-assets/compare/v1.17.16...v1.17.17 -[1.17.16]: https://github.com/Automattic/jetpack-assets/compare/v1.17.15...v1.17.16 -[1.17.15]: https://github.com/Automattic/jetpack-assets/compare/v1.17.14...v1.17.15 -[1.17.14]: https://github.com/Automattic/jetpack-assets/compare/v1.17.13...v1.17.14 -[1.17.13]: https://github.com/Automattic/jetpack-assets/compare/v1.17.12...v1.17.13 -[1.17.12]: https://github.com/Automattic/jetpack-assets/compare/v1.17.11...v1.17.12 -[1.17.11]: https://github.com/Automattic/jetpack-assets/compare/v1.17.10...v1.17.11 -[1.17.10]: https://github.com/Automattic/jetpack-assets/compare/v1.17.9...v1.17.10 -[1.17.9]: https://github.com/Automattic/jetpack-assets/compare/v1.17.8...v1.17.9 -[1.17.8]: https://github.com/Automattic/jetpack-assets/compare/v1.17.7...v1.17.8 -[1.17.7]: https://github.com/Automattic/jetpack-assets/compare/v1.17.6...v1.17.7 -[1.17.6]: https://github.com/Automattic/jetpack-assets/compare/v1.17.5...v1.17.6 -[1.17.5]: https://github.com/Automattic/jetpack-assets/compare/v1.17.4...v1.17.5 -[1.17.4]: https://github.com/Automattic/jetpack-assets/compare/v1.17.3...v1.17.4 -[1.17.3]: https://github.com/Automattic/jetpack-assets/compare/v1.17.2...v1.17.3 -[1.17.2]: https://github.com/Automattic/jetpack-assets/compare/v1.17.1...v1.17.2 -[1.17.1]: https://github.com/Automattic/jetpack-assets/compare/v1.17.0...v1.17.1 -[1.17.0]: https://github.com/Automattic/jetpack-assets/compare/v1.16.2...v1.17.0 -[1.16.2]: https://github.com/Automattic/jetpack-assets/compare/v1.16.1...v1.16.2 -[1.16.1]: https://github.com/Automattic/jetpack-assets/compare/v1.16.0...v1.16.1 -[1.16.0]: https://github.com/Automattic/jetpack-assets/compare/v1.15.0...v1.16.0 -[1.15.0]: https://github.com/Automattic/jetpack-assets/compare/v1.14.0...v1.15.0 -[1.14.0]: https://github.com/Automattic/jetpack-assets/compare/v1.13.1...v1.14.0 -[1.13.1]: https://github.com/Automattic/jetpack-assets/compare/v1.13.0...v1.13.1 -[1.13.0]: https://github.com/Automattic/jetpack-assets/compare/v1.12.0...v1.13.0 -[1.12.0]: https://github.com/Automattic/jetpack-assets/compare/v1.11.10...v1.12.0 -[1.11.10]: https://github.com/Automattic/jetpack-assets/compare/v1.11.9...v1.11.10 -[1.11.9]: https://github.com/Automattic/jetpack-assets/compare/v1.11.8...v1.11.9 -[1.11.8]: https://github.com/Automattic/jetpack-assets/compare/v1.11.7...v1.11.8 -[1.11.7]: https://github.com/Automattic/jetpack-assets/compare/v1.11.6...v1.11.7 -[1.11.6]: https://github.com/Automattic/jetpack-assets/compare/v1.11.5...v1.11.6 -[1.11.5]: https://github.com/Automattic/jetpack-assets/compare/v1.11.4...v1.11.5 -[1.11.4]: https://github.com/Automattic/jetpack-assets/compare/v1.11.3...v1.11.4 -[1.11.3]: https://github.com/Automattic/jetpack-assets/compare/v1.11.2...v1.11.3 -[1.11.2]: https://github.com/Automattic/jetpack-assets/compare/v1.11.1...v1.11.2 -[1.11.1]: https://github.com/Automattic/jetpack-assets/compare/v1.11.0...v1.11.1 -[1.11.0]: https://github.com/Automattic/jetpack-assets/compare/v1.10.0...v1.11.0 -[1.10.0]: https://github.com/Automattic/jetpack-assets/compare/v1.9.1...v1.10.0 -[1.9.1]: https://github.com/Automattic/jetpack-assets/compare/v1.9.0...v1.9.1 -[1.9.0]: https://github.com/Automattic/jetpack-assets/compare/v1.8.0...v1.9.0 -[1.8.0]: https://github.com/Automattic/jetpack-assets/compare/v1.7.0...v1.8.0 -[1.7.0]: https://github.com/Automattic/jetpack-assets/compare/v1.6.0...v1.7.0 -[1.6.0]: https://github.com/Automattic/jetpack-assets/compare/v1.5.0...v1.6.0 -[1.5.0]: https://github.com/Automattic/jetpack-assets/compare/v1.4.0...v1.5.0 -[1.4.0]: https://github.com/Automattic/jetpack-assets/compare/v1.3.0...v1.4.0 -[1.3.0]: https://github.com/Automattic/jetpack-assets/compare/v1.2.0...v1.3.0 -[1.2.0]: https://github.com/Automattic/jetpack-assets/compare/v1.1.1...v1.2.0 -[1.1.1]: https://github.com/Automattic/jetpack-assets/compare/v1.1.0...v1.1.1 -[1.1.0]: https://github.com/Automattic/jetpack-assets/compare/v1.0.3...v1.1.0 -[1.0.3]: https://github.com/Automattic/jetpack-assets/compare/v1.0.1...v1.0.3 -[1.0.1]: https://github.com/Automattic/jetpack-assets/compare/v1.0.0...v1.0.1 diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-assets/LICENSE.txt b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-assets/LICENSE.txt deleted file mode 100644 index e82774c1..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-assets/LICENSE.txt +++ /dev/null @@ -1,357 +0,0 @@ -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - - -=================================== - - -GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - -Copyright (C) 1989, 1991 Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -Everyone is permitted to copy and distribute verbatim copies -of this license document, but changing it is not allowed. - - Preamble - -The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Lesser General Public License instead.) You can apply it to -your programs, too. - -When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - -To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - -For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - -We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - -Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - -Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - -The precise terms and conditions for copying, distribution and -modification follow. - -GNU GENERAL PUBLIC LICENSE -TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - -0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - -1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - -2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - -a) You must cause the modified files to carry prominent notices -stating that you changed the files and the date of any change. - -b) You must cause any work that you distribute or publish, that in -whole or in part contains or is derived from the Program or any -part thereof, to be licensed as a whole at no charge to all third -parties under the terms of this License. - -c) If the modified program normally reads commands interactively -when run, you must cause it, when started running for such -interactive use in the most ordinary way, to print or display an -announcement including an appropriate copyright notice and a -notice that there is no warranty (or else, saying that you provide -a warranty) and that users may redistribute the program under -these conditions, and telling the user how to view a copy of this -License. (Exception: if the Program itself is interactive but -does not normally print such an announcement, your work based on -the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - -3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - -a) Accompany it with the complete corresponding machine-readable -source code, which must be distributed under the terms of Sections -1 and 2 above on a medium customarily used for software interchange; or, - -b) Accompany it with a written offer, valid for at least three -years, to give any third party, for a charge no more than your -cost of physically performing source distribution, a complete -machine-readable copy of the corresponding source code, to be -distributed under the terms of Sections 1 and 2 above on a medium -customarily used for software interchange; or, - -c) Accompany it with the information you received as to the offer -to distribute corresponding source code. (This alternative is -allowed only for noncommercial distribution and only if you -received the program in object code or executable form with such -an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - -4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - -5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - -6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - -7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - -8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - -9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - -10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - -11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - -12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - -How to Apply These Terms to Your New Programs - -If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - -To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - -Copyright (C) - -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along -with this program; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - -Gnomovision version 69, Copyright (C) year name of author -Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. -This is free software, and you are welcome to redistribute it -under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - -Yoyodyne, Inc., hereby disclaims all copyright interest in the program -`Gnomovision' (which makes passes at compilers) written by James Hacker. - -, 1 April 1989 -Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-assets/SECURITY.md b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-assets/SECURITY.md deleted file mode 100644 index 98f48dd1..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-assets/SECURITY.md +++ /dev/null @@ -1,47 +0,0 @@ -# Security Policy - -Full details of the Automattic Security Policy can be found on [automattic.com](https://automattic.com/security/). - -## Supported Versions - -Generally, only the latest version of Jetpack and its associated plugins have continued support. If a critical vulnerability is found in the current version of a plugin, we may opt to backport any patches to previous versions. - -## Reporting a Vulnerability - -Our HackerOne program covers the below plugin software, as well as a variety of related projects and infrastructure: - -* [Jetpack](https://jetpack.com/) -* Jetpack Backup -* Jetpack Boost -* Jetpack CRM -* Jetpack Protect -* Jetpack Search -* Jetpack Social -* Jetpack VideoPress - -**For responsible disclosure of security issues and to be eligible for our bug bounty program, please submit your report via the [HackerOne](https://hackerone.com/automattic) portal.** - -Our most critical targets are: - -* Jetpack and the Jetpack composer packages (all within this repo) -* Jetpack.com -- the primary marketing site. -* cloud.jetpack.com -- a management site. -* wordpress.com -- the shared management site for both Jetpack and WordPress.com sites. - -For more targets, see the `In Scope` section on [HackerOne](https://hackerone.com/automattic). - -_Please note that the **WordPress software is a separate entity** from Automattic. Please report vulnerabilities for WordPress through [the WordPress Foundation's HackerOne page](https://hackerone.com/wordpress)._ - -## Guidelines - -We're committed to working with security researchers to resolve the vulnerabilities they discover. You can help us by following these guidelines: - -* Follow [HackerOne's disclosure guidelines](https://www.hackerone.com/disclosure-guidelines). -* Pen-testing Production: - * Please **setup a local environment** instead whenever possible. Most of our code is open source (see above). - * If that's not possible, **limit any data access/modification** to the bare minimum necessary to reproduce a PoC. - * **_Don't_ automate form submissions!** That's very annoying for us, because it adds extra work for the volunteers who manage those systems, and reduces the signal/noise ratio in our communication channels. - * To be eligible for a bounty, all of these guidelines must be followed. -* Be Patient - Give us a reasonable time to correct the issue before you disclose the vulnerability. - -We also expect you to comply with all applicable laws. You're responsible to pay any taxes associated with your bounties. diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-assets/actions.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-assets/actions.php deleted file mode 100644 index 1c8becda..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-assets/actions.php +++ /dev/null @@ -1,19 +0,0 @@ - 1, - 'function' => array( Automattic\Jetpack\Assets::class, 'wp_default_scripts_hook' ), - ); -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-assets/build/i18n-loader.asset.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-assets/build/i18n-loader.asset.php deleted file mode 100644 index bf326283..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-assets/build/i18n-loader.asset.php +++ /dev/null @@ -1 +0,0 @@ - array('wp-i18n'), 'version' => 'b5d2a25bb8ad1698db1c'); diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-assets/build/i18n-loader.js b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-assets/build/i18n-loader.js deleted file mode 100644 index f3903315..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-assets/build/i18n-loader.js +++ /dev/null @@ -1 +0,0 @@ -(()=>{var e={356:function(e){e.exports=function(e){function r(t){if(n[t])return n[t].exports;var o=n[t]={i:t,l:!1,exports:{}};return e[t].call(o.exports,o,o.exports,r),o.l=!0,o.exports}var n={};return r.m=e,r.c=n,r.i=function(e){return e},r.d=function(e,n,t){r.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:t})},r.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(n,"a",n),n},r.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},r.p="",r(r.s=1)}([function(e,r,n){"use strict";function t(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(r,"__esModule",{value:!0});var o=function(){function e(e,r){for(var n=0;n>>32-o)+n&4294967295}},{key:"ff",value:function(r,n,t,o,a,i,f){return e.cmn(n&t|~n&o,r,n,a,i,f)}},{key:"gg",value:function(r,n,t,o,a,i,f){return e.cmn(n&o|t&~o,r,n,a,i,f)}},{key:"hh",value:function(r,n,t,o,a,i,f){return e.cmn(n^t^o,r,n,a,i,f)}},{key:"ii",value:function(r,n,t,o,a,i,f){return e.cmn(t^(n|~o),r,n,a,i,f)}},{key:"md51",value:function(r){for(var n=r.length,t=[1732584193,-271733879,-1732584194,271733878],o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],a=0,i=64;i<=n;i+=64)e.md5cycle(t,e.md5blk(r.substring(i-64,i)));for(r=r.substring(i-64),i=0,a=r.length;i>2]|=r.charCodeAt(i)<<(i%4<<3);if(o[i>>2]|=128<<(i%4<<3),i>55)for(e.md5cycle(t,o),i=0;i<16;i++)o[i]=0;return o[14]=8*n,e.md5cycle(t,o),t}},{key:"md5blk",value:function(e){for(var r=[],n=0;n<64;n+=4)r[n>>2]=e.charCodeAt(n)+(e.charCodeAt(n+1)<<8)+(e.charCodeAt(n+2)<<16)+(e.charCodeAt(n+3)<<24);return r}},{key:"rhex",value:function(r){var n="";return n+=e.hexArray[r>>4&15]+e.hexArray[15&r],n+=e.hexArray[r>>12&15]+e.hexArray[r>>8&15],(n+=e.hexArray[r>>20&15]+e.hexArray[r>>16&15])+(e.hexArray[r>>28&15]+e.hexArray[r>>24&15])}},{key:"hex",value:function(r){for(var n=r.length,t=0;t{const t=n(736),{default:o}=n(356),a={plugin:"plugins/",theme:"themes/",core:""},i=(e,r)=>Object.prototype.hasOwnProperty.call(e,r);e.exports={state:{baseUrl:null,locale:null,domainMap:{},domainPaths:{}},async downloadI18n(e,r,n){const f=this.state;if(!f||"string"!=typeof f.baseUrl)throw new Error("wp.jpI18nLoader.state is not set");if("en_US"===f.locale)return;if("undefined"==typeof fetch)throw new Error("Fetch API is not available.");const u=i(f.domainPaths,r)?f.domainPaths[r]:"";let c,h;const l=e.indexOf("?");l>=0?(c=o.hash(u+e.substring(0,l)),h=e.substring(l)):(c=o.hash(u+e),h="");const s=i(f.domainMap,r)?f.domainMap[r]:a[n]+r,g=await fetch(`${f.baseUrl}${s}-${f.locale}-${c}.json${h}`);if(!g.ok)throw new Error(`HTTP request failed: ${g.status} ${g.statusText}`);const d=await g.json(),p=i(d.locale_data,r)?d.locale_data[r]:d.locale_data.messages;p[""].domain=r,t.setLocaleData(p,r)}}},736:e=>{"use strict";e.exports=window.wp.i18n}},r={};var n=function n(t){var o=r[t];if(void 0!==o)return o.exports;var a=r[t]={exports:{}};return e[t].call(a.exports,a,a.exports,n),a.exports}(618);(window.wp=window.wp||{}).jpI18nLoader=n})(); \ No newline at end of file diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-assets/composer.json b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-assets/composer.json deleted file mode 100644 index 5524958d..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-assets/composer.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "name": "automattic/jetpack-assets", - "description": "Asset management utilities for Jetpack ecosystem packages", - "type": "jetpack-library", - "license": "GPL-2.0-or-later", - "require": { - "php": ">=7.0", - "automattic/jetpack-constants": "^2.0.1" - }, - "require-dev": { - "brain/monkey": "2.6.1", - "yoast/phpunit-polyfills": "1.1.0", - "automattic/jetpack-changelogger": "^4.1.1", - "wikimedia/testing-access-wrapper": "^1.0 || ^2.0 || ^3.0" - }, - "suggest": { - "automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package." - }, - "autoload": { - "files": [ - "actions.php" - ], - "classmap": [ - "src/" - ] - }, - "scripts": { - "build-development": [ - "pnpm run build" - ], - "build-production": [ - "pnpm run build-production" - ], - "phpunit": [ - "./vendor/phpunit/phpunit/phpunit --colors=always" - ], - "test-js": [ - "pnpm run test" - ], - "test-php": [ - "@composer phpunit" - ] - }, - "minimum-stability": "dev", - "prefer-stable": true, - "extra": { - "autotagger": true, - "mirror-repo": "Automattic/jetpack-assets", - "textdomain": "jetpack-assets", - "changelogger": { - "link-template": "https://github.com/Automattic/jetpack-assets/compare/v${old}...v${new}" - }, - "branch-alias": { - "dev-trunk": "2.1.x-dev" - } - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-assets/src/class-assets.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-assets/src/class-assets.php deleted file mode 100644 index 2d003c77..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-assets/src/class-assets.php +++ /dev/null @@ -1,754 +0,0 @@ - array( string target_domain, string target_type, string semver, string path_prefix ) )`. - */ - private static $domain_map = array(); - - /** - * Constructor. - * - * Static-only class, so nothing here. - */ - private function __construct() {} - - // //////////////////// - // region Async script loading - - /** - * Get the singleton instance of the class. - * - * @return Assets - */ - public static function instance() { - if ( ! isset( self::$instance ) ) { - self::$instance = new Assets(); - } - - return self::$instance; - } - - /** - * A public method for adding the async script. - * - * @deprecated Since 2.1.0, the `strategy` feature should be used instead, with the "defer" setting. - * - * @param string $script_handle Script handle. - */ - public static function add_async_script( $script_handle ) { - _deprecated_function( __METHOD__, '2.1.0' ); - - wp_script_add_data( $script_handle, 'strategy', 'defer' ); - } - - /** - * Add an async attribute to scripts that can be loaded deferred. - * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script - * - * @deprecated Since 2.1.0, the `strategy` feature should be used instead. - * - * @param string $tag The - ' . esc_html__( 'Every Jetpack site needs at least one connected admin for the features to work properly. Please connect to your WordPress.com account via the button below. Once you connect, you may refresh this page to see an option to change the connection owner.', 'jetpack-connection' ) . '

          '; - $connect_url = $connection_manager->get_authorization_url(); - $connect_url = add_query_arg( 'from', 'delete_connection_owner_notice', $connect_url ); - echo "" . esc_html__( 'Connect to WordPress.com', 'jetpack-connection' ) . ''; - } - - echo '

          '; - printf( - wp_kses( - /* translators: URL to Jetpack support doc regarding the primary user. */ - __( "Learn more about the connection owner and what will break if you do not have one.", 'jetpack-connection' ), - array( - 'a' => array( - 'href' => true, - 'target' => true, - 'rel' => true, - ), - ) - ), - esc_url( Redirect::get_url( 'jetpack-support-primary-user' ) ) - ); - echo '

          '; - echo '

          '; - printf( - wp_kses( - /* translators: URL to contact Jetpack support. */ - __( 'As always, feel free to contact our support team if you have any questions.', 'jetpack-connection' ), - array( - 'a' => array( - 'href' => true, - 'target' => true, - 'rel' => true, - ), - ) - ), - esc_url( Redirect::get_url( 'jetpack-contact-support' ) ) - ); - echo '

          '; - echo ''; - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-connection/src/class-error-handler.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-connection/src/class-error-handler.php deleted file mode 100644 index b0690438..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-connection/src/class-error-handler.php +++ /dev/null @@ -1,775 +0,0 @@ - [ - * $user_id => [ - * $error_details - * ] - * ] - * ] - * - * For each error code we store a maximum of 5 errors for 5 different user ids. - * - * An user ID can be - * * 0 for blog tokens - * * positive integer for user tokens - * * 'invalid' for malformed tokens - * - * @since 1.14.2 - */ -class Error_Handler { - - /** - * The name of the option that stores the errors - * - * @since 1.14.2 - * - * @var string - */ - const STORED_ERRORS_OPTION = 'jetpack_connection_xmlrpc_errors'; - - /** - * The name of the option that stores the errors - * - * @since 1.14.2 - * - * @var string - */ - const STORED_VERIFIED_ERRORS_OPTION = 'jetpack_connection_xmlrpc_verified_errors'; - - /** - * The prefix of the transient that controls the gate for each error code - * - * @since 1.14.2 - * - * @var string - */ - const ERROR_REPORTING_GATE = 'jetpack_connection_error_reporting_gate_'; - - /** - * Time in seconds a test should live in the database before being discarded - * - * @since 1.14.2 - */ - const ERROR_LIFE_TIME = DAY_IN_SECONDS; - - /** - * The error code for event tracking purposes. - * If there are many, only the first error code will be tracked. - * - * @var string - */ - private $error_code; - - /** - * List of known errors. Only error codes in this list will be handled - * - * @since 1.14.2 - * - * @var array - */ - public $known_errors = array( - 'malformed_token', - 'malformed_user_id', - 'unknown_user', - 'no_user_tokens', - 'empty_master_user_option', - 'no_token_for_user', - 'token_malformed', - 'user_id_mismatch', - 'no_possible_tokens', - 'no_valid_user_token', - 'no_valid_blog_token', - 'unknown_token', - 'could_not_sign', - 'invalid_scheme', - 'invalid_secret', - 'invalid_token', - 'token_mismatch', - 'invalid_body', - 'invalid_signature', - 'invalid_body_hash', - 'invalid_nonce', - 'signature_mismatch', - 'invalid_connection_owner', - ); - - /** - * Holds the instance of this singleton class - * - * @since 1.14.2 - * - * @var Error_Handler $instance - */ - public static $instance = null; - - /** - * Initialize instance, hookds and load verified errors handlers - * - * @since 1.14.2 - */ - private function __construct() { - defined( 'JETPACK__ERRORS_PUBLIC_KEY' ) || define( 'JETPACK__ERRORS_PUBLIC_KEY', 'KdZY80axKX+nWzfrOcizf0jqiFHnrWCl9X8yuaClKgM=' ); - - add_action( 'rest_api_init', array( $this, 'register_verify_error_endpoint' ) ); - - $this->handle_verified_errors(); - - // If the site gets reconnected, clear errors. - add_action( 'jetpack_site_registered', array( $this, 'delete_all_errors' ) ); - add_action( 'jetpack_get_site_data_success', array( $this, 'delete_all_api_errors' ) ); - add_filter( 'jetpack_connection_disconnect_site_wpcom', array( $this, 'delete_all_errors_and_return_unfiltered_value' ) ); - add_filter( 'jetpack_connection_delete_all_tokens', array( $this, 'delete_all_errors_and_return_unfiltered_value' ) ); - add_action( 'jetpack_unlinked_user', array( $this, 'delete_all_errors' ) ); - add_action( 'jetpack_updated_user_token', array( $this, 'delete_all_errors' ) ); - } - - /** - * Gets the list of verified errors and act upon them - * - * @since 1.14.2 - * - * @return void - */ - public function handle_verified_errors() { - $verified_errors = $this->get_verified_errors(); - foreach ( array_keys( $verified_errors ) as $error_code ) { - switch ( $error_code ) { - case 'malformed_token': - case 'token_malformed': - case 'no_possible_tokens': - case 'no_valid_user_token': - case 'no_valid_blog_token': - case 'unknown_token': - case 'could_not_sign': - case 'invalid_token': - case 'token_mismatch': - case 'invalid_signature': - case 'signature_mismatch': - case 'no_user_tokens': - case 'no_token_for_user': - case 'invalid_connection_owner': - add_action( 'admin_notices', array( $this, 'generic_admin_notice_error' ) ); - add_action( 'react_connection_errors_initial_state', array( $this, 'jetpack_react_dashboard_error' ) ); - $this->error_code = $error_code; - - // Since we are only generically handling errors, we don't need to trigger error messages for each one of them. - break 2; - } - } - } - - /** - * Gets the instance of this singleton class - * - * @since 1.14.2 - * - * @return Error_Handler $instance - */ - public static function get_instance() { - if ( self::$instance === null ) { - self::$instance = new self(); - } - return self::$instance; - } - - /** - * Keep track of a connection error that was encountered - * - * @param \WP_Error $error The error object. - * @param boolean $force Force the report, even if should_report_error is false. - * @param boolean $skip_wpcom_verification Set to 'true' to verify the error locally and skip the WP.com verification. - * - * @return void - * @since 1.14.2 - */ - public function report_error( \WP_Error $error, $force = false, $skip_wpcom_verification = false ) { - if ( in_array( $error->get_error_code(), $this->known_errors, true ) && $this->should_report_error( $error ) || $force ) { - $stored_error = $this->store_error( $error ); - if ( $stored_error ) { - $skip_wpcom_verification ? $this->verify_error( $stored_error ) : $this->send_error_to_wpcom( $stored_error ); - } - } - } - - /** - * Checks the status of the gate - * - * This protects the site (and WPCOM) against over loads. - * - * @since 1.14.2 - * - * @param \WP_Error $error the error object. - * @return boolean $should_report True if gate is open and the error should be reported. - */ - public function should_report_error( \WP_Error $error ) { - if ( defined( 'JETPACK_DEV_DEBUG' ) && JETPACK_DEV_DEBUG ) { - return true; - } - - /** - * Whether to bypass the gate for the error handling - * - * By default, we only process errors once an hour for each error code. - * This is done to avoid overflows. If you need to disable this gate, you can set this variable to true. - * - * This filter is useful for unit testing - * - * @since 1.14.2 - * - * @param boolean $bypass_gate whether to bypass the gate. Default is false, do not bypass. - */ - $bypass_gate = apply_filters( 'jetpack_connection_bypass_error_reporting_gate', false ); - if ( true === $bypass_gate ) { - return true; - } - - $transient = self::ERROR_REPORTING_GATE . $error->get_error_code(); - - if ( get_transient( $transient ) ) { - return false; - } - - set_transient( $transient, true, HOUR_IN_SECONDS ); - return true; - } - - /** - * Stores the error in the database so we know there is an issue and can inform the user - * - * @since 1.14.2 - * - * @param \WP_Error $error the error object. - * @return boolean|array False if stored errors were not updated and the error array if it was successfully stored. - */ - public function store_error( \WP_Error $error ) { - - $stored_errors = $this->get_stored_errors(); - $error_array = $this->wp_error_to_array( $error ); - $error_code = $error->get_error_code(); - $user_id = $error_array['user_id']; - - if ( ! isset( $stored_errors[ $error_code ] ) || ! is_array( $stored_errors[ $error_code ] ) ) { - $stored_errors[ $error_code ] = array(); - } - - $stored_errors[ $error_code ][ $user_id ] = $error_array; - - // Let's store a maximum of 5 different user ids for each error code. - $error_code_count = is_countable( $stored_errors[ $error_code ] ) ? count( $stored_errors[ $error_code ] ) : 0; - if ( $error_code_count > 5 ) { - // array_shift will destroy keys here because they are numeric, so manually remove first item. - $keys = array_keys( $stored_errors[ $error_code ] ); - unset( $stored_errors[ $error_code ][ $keys[0] ] ); - } - - if ( update_option( self::STORED_ERRORS_OPTION, $stored_errors ) ) { - return $error_array; - } - - return false; - } - - /** - * Converts a WP_Error object in the array representation we store in the database - * - * @since 1.14.2 - * - * @param \WP_Error $error the error object. - * @return boolean|array False if error is invalid or the error array - */ - public function wp_error_to_array( \WP_Error $error ) { - - $data = $error->get_error_data(); - - if ( ! isset( $data['signature_details'] ) || ! is_array( $data['signature_details'] ) ) { - return false; - } - - $signature_details = $data['signature_details']; - - if ( ! isset( $signature_details['token'] ) ) { - return false; - } - - $user_id = $this->get_user_id_from_token( $signature_details['token'] ); - - $error_array = array( - 'error_code' => $error->get_error_code(), - 'user_id' => $user_id, - 'error_message' => $error->get_error_message(), - 'error_data' => $signature_details, - 'timestamp' => time(), - 'nonce' => wp_generate_password( 10, false ), - 'error_type' => empty( $data['error_type'] ) ? '' : $data['error_type'], - ); - - return $error_array; - } - - /** - * Sends the error to WP.com to be verified - * - * @since 1.14.2 - * - * @param array $error_array The array representation of the error as it is stored in the database. - * @return bool - */ - public function send_error_to_wpcom( $error_array ) { - - $blog_id = \Jetpack_Options::get_option( 'id' ); - - $encrypted_data = $this->encrypt_data_to_wpcom( $error_array ); - - if ( false === $encrypted_data ) { - return false; - } - - $args = array( - 'body' => array( - 'error_data' => $encrypted_data, - ), - ); - - // send encrypted data to WP.com Public-API v2. - wp_remote_post( "https://public-api.wordpress.com/wpcom/v2/sites/{$blog_id}/jetpack-report-error/", $args ); - return true; - } - - /** - * Encrypt data to be sent over to WP.com - * - * @since 1.14.2 - * - * @param array|string $data the data to be encoded. - * @return boolean|string The encoded string on success, false on failure - */ - public function encrypt_data_to_wpcom( $data ) { - - try { - // phpcs:disable WordPress.PHP.DiscouragedPHPFunctions.obfuscation_base64_decode - // phpcs:disable WordPress.PHP.DiscouragedPHPFunctions.obfuscation_base64_encode - $encrypted_data = base64_encode( sodium_crypto_box_seal( wp_json_encode( $data ), base64_decode( JETPACK__ERRORS_PUBLIC_KEY ) ) ); - // phpcs:enable WordPress.PHP.DiscouragedPHPFunctions.obfuscation_base64_decode - // phpcs:enable WordPress.PHP.DiscouragedPHPFunctions.obfuscation_base64_encode - } catch ( \SodiumException $e ) { - // error encrypting data. - return false; - } - - return $encrypted_data; - } - - /** - * Extracts the user ID from a token - * - * @since 1.14.2 - * - * @param string $token the token used to make the request. - * @return string $the user id or `invalid` if user id not present. - */ - public function get_user_id_from_token( $token ) { - $user_id = 'invalid'; - - if ( $token ) { - $parsed_token = explode( ':', wp_unslash( $token ) ); - - if ( isset( $parsed_token[2] ) && ctype_digit( $parsed_token[2] ) ) { - $user_id = $parsed_token[2]; - } - } - - return $user_id; - } - - /** - * Gets the reported errors stored in the database - * - * @since 1.14.2 - * - * @return array $errors - */ - public function get_stored_errors() { - - $stored_errors = get_option( self::STORED_ERRORS_OPTION ); - - if ( ! is_array( $stored_errors ) ) { - $stored_errors = array(); - } - - $stored_errors = $this->garbage_collector( $stored_errors ); - - return $stored_errors; - } - - /** - * Gets the verified errors stored in the database - * - * @since 1.14.2 - * - * @return array $errors - */ - public function get_verified_errors() { - - $verified_errors = get_option( self::STORED_VERIFIED_ERRORS_OPTION ); - - if ( ! is_array( $verified_errors ) ) { - $verified_errors = array(); - } - - $verified_errors = $this->garbage_collector( $verified_errors ); - - return $verified_errors; - } - - /** - * Removes expired errors from the array - * - * This method is called by get_stored_errors and get_verified errors and filters their result - * Whenever a new error is stored to the database or verified, this will be triggered and the - * expired error will be permantently removed from the database - * - * @since 1.14.2 - * - * @param array $errors array of errors as stored in the database. - * @return array - */ - private function garbage_collector( $errors ) { - foreach ( $errors as $error_code => $users ) { - foreach ( $users as $user_id => $error ) { - if ( self::ERROR_LIFE_TIME < time() - (int) $error['timestamp'] ) { - unset( $errors[ $error_code ][ $user_id ] ); - } - } - } - // Clear empty error codes. - $errors = array_filter( - $errors, - function ( $user_errors ) { - return ! empty( $user_errors ); - } - ); - return $errors; - } - - /** - * Delete all stored and verified errors from the database - * - * @since 1.14.2 - * - * @return void - */ - public function delete_all_errors() { - $this->delete_stored_errors(); - $this->delete_verified_errors(); - } - - /** - * Delete all stored and verified API errors from the database, leave the non-API errors intact. - * - * @since 1.54.0 - * - * @return void - */ - public function delete_all_api_errors() { - $type_filter = function ( $errors ) { - if ( is_array( $errors ) ) { - foreach ( $errors as $key => $error ) { - if ( ! empty( $error['error_type'] ) && in_array( $error['error_type'], array( 'xmlrpc', 'rest' ), true ) ) { - unset( $errors[ $key ] ); - } - } - } - - return count( $errors ) ? $errors : null; - }; - - $stored_errors = $this->get_stored_errors(); - if ( is_array( $stored_errors ) && count( $stored_errors ) ) { - $stored_errors = array_filter( array_map( $type_filter, $stored_errors ) ); - if ( count( $stored_errors ) ) { - update_option( static::STORED_ERRORS_OPTION, $stored_errors ); - } else { - delete_option( static::STORED_ERRORS_OPTION ); - } - } - - $verified_errors = $this->get_verified_errors(); - if ( is_array( $verified_errors ) && count( $verified_errors ) ) { - $verified_errors = array_filter( array_map( $type_filter, $verified_errors ) ); - if ( count( $verified_errors ) ) { - update_option( static::STORED_VERIFIED_ERRORS_OPTION, $verified_errors ); - } else { - delete_option( static::STORED_VERIFIED_ERRORS_OPTION ); - } - } - } - - /** - * Delete all stored and verified errors from the database and returns unfiltered value - * - * This is used to hook into a couple of filters that expect true to not short circuit the disconnection flow - * - * @since 8.9.0 - * - * @param mixed $check The input sent by the filter. - * @return boolean - */ - public function delete_all_errors_and_return_unfiltered_value( $check ) { - $this->delete_all_errors(); - return $check; - } - - /** - * Delete the reported errors stored in the database - * - * @since 1.14.2 - * - * @return boolean True, if option is successfully deleted. False on failure. - */ - public function delete_stored_errors() { - return delete_option( self::STORED_ERRORS_OPTION ); - } - - /** - * Delete the verified errors stored in the database - * - * @since 1.14.2 - * - * @return boolean True, if option is successfully deleted. False on failure. - */ - public function delete_verified_errors() { - return delete_option( self::STORED_VERIFIED_ERRORS_OPTION ); - } - - /** - * Gets an error based on the nonce - * - * Receives a nonce and finds the related error. - * - * @since 1.14.2 - * - * @param string $nonce The nonce created for the error we want to get. - * @return null|array Returns the error array representation or null if error not found. - */ - public function get_error_by_nonce( $nonce ) { - $errors = $this->get_stored_errors(); - foreach ( $errors as $user_group ) { - foreach ( $user_group as $error ) { - if ( $error['nonce'] === $nonce ) { - return $error; - } - } - } - return null; - } - - /** - * Adds an error to the verified error list - * - * @since 1.14.2 - * - * @param array $error The error array, as it was saved in the unverified errors list. - * @return void - */ - public function verify_error( $error ) { - - $verified_errors = $this->get_verified_errors(); - $error_code = $error['error_code']; - $user_id = $error['user_id']; - - if ( ! isset( $verified_errors[ $error_code ] ) ) { - $verified_errors[ $error_code ] = array(); - } - - $verified_errors[ $error_code ][ $user_id ] = $error; - - update_option( self::STORED_VERIFIED_ERRORS_OPTION, $verified_errors ); - } - - /** - * Register REST API end point for error hanlding. - * - * @since 1.14.2 - * - * @return void - */ - public function register_verify_error_endpoint() { - register_rest_route( - 'jetpack/v4', - '/verify_xmlrpc_error', - array( - 'methods' => \WP_REST_Server::CREATABLE, - 'callback' => array( $this, 'verify_xml_rpc_error' ), - 'permission_callback' => '__return_true', - 'args' => array( - 'nonce' => array( - 'required' => true, - 'type' => 'string', - ), - ), - ) - ); - } - - /** - * Handles verification that a xml rpc error is legit and came from WordPres.com - * - * @since 1.14.2 - * - * @param \WP_REST_Request $request The request sent to the WP REST API. - * - * @return boolean - */ - public function verify_xml_rpc_error( \WP_REST_Request $request ) { - $error = $this->get_error_by_nonce( $request['nonce'] ); - - if ( $error ) { - $this->verify_error( $error ); - return new \WP_REST_Response( true, 200 ); - } - - return new \WP_REST_Response( false, 200 ); - } - - /** - * Prints a generic error notice for all connection errors - * - * @since 8.9.0 - * - * @return void - */ - public function generic_admin_notice_error() { - // do not add admin notice to the jetpack dashboard. - global $pagenow; - if ( 'admin.php' === $pagenow || isset( $_GET['page'] ) && 'jetpack' === $_GET['page'] ) { // phpcs:ignore - return; - } - - if ( ! current_user_can( 'jetpack_connect' ) ) { - return; - } - - /** - * Filters the message to be displayed in the admin notices area when there's a connection error. - * - * By default we don't display any errors. - * - * Return an empty value to disable the message. - * - * @since 8.9.0 - * - * @param string $message The error message. - * @param array $errors The array of errors. See Automattic\Jetpack\Connection\Error_Handler for details on the array structure. - */ - $message = apply_filters( 'jetpack_connection_error_notice_message', '', $this->get_verified_errors() ); - - /** - * Fires inside the admin_notices hook just before displaying the error message for a broken connection. - * - * If you want to disable the default message from being displayed, return an emtpy value in the jetpack_connection_error_notice_message filter. - * - * @since 8.9.0 - * - * @param array $errors The array of errors. See Automattic\Jetpack\Connection\Error_Handler for details on the array structure. - */ - do_action( 'jetpack_connection_error_notice', $this->get_verified_errors() ); - - if ( empty( $message ) ) { - return; - } - - ?> - - 'connection_error', - 'message' => __( 'Your connection with WordPress.com seems to be broken. If you\'re experiencing issues, please try reconnecting.', 'jetpack-connection' ), - 'action' => 'reconnect', - 'data' => array( 'api_error_code' => $this->error_code ), - ); - return $errors; - } - - /** - * Check REST API response for errors, and report them to WP.com if needed. - * - * @see wp_remote_request() For more information on the $http_response array format. - * @param array|\WP_Error $http_response The response or WP_Error on failure. - * @param array $auth_data Auth data, allowed keys: `token`, `timestamp`, `nonce`, `body-hash`. - * @param string $url Request URL. - * @param string $method Request method. - * @param string $error_type The source of an error: 'xmlrpc' or 'rest'. - * - * @return void - */ - public function check_api_response_for_errors( $http_response, $auth_data, $url, $method, $error_type ) { - if ( 200 === wp_remote_retrieve_response_code( $http_response ) || ! is_array( $auth_data ) || ! $url || ! $method ) { - return; - } - - $body_raw = wp_remote_retrieve_body( $http_response ); - if ( ! $body_raw ) { - return; - } - - $body = json_decode( $body_raw, true ); - if ( empty( $body['error'] ) || ( ! is_string( $body['error'] ) && ! is_int( $body['error'] ) ) ) { - return; - } - - $error = new \WP_Error( - $body['error'], - empty( $body['message'] ) ? '' : $body['message'], - array( - 'signature_details' => array( - 'token' => empty( $auth_data['token'] ) ? '' : $auth_data['token'], - 'timestamp' => empty( $auth_data['timestamp'] ) ? '' : $auth_data['timestamp'], - 'nonce' => empty( $auth_data['nonce'] ) ? '' : $auth_data['nonce'], - 'body_hash' => empty( $auth_data['body_hash'] ) ? '' : $auth_data['body_hash'], - 'method' => $method, - 'url' => $url, - ), - 'error_type' => in_array( $error_type, array( 'xmlrpc', 'rest' ), true ) ? $error_type : '', - ) - ); - - $this->report_error( $error, false, true ); - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-connection/src/class-heartbeat.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-connection/src/class-heartbeat.php deleted file mode 100644 index b5d9a1a4..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-connection/src/class-heartbeat.php +++ /dev/null @@ -1,252 +0,0 @@ -cron_name, array( $this, 'cron_exec' ) ); - - if ( ! wp_next_scheduled( $this->cron_name ) ) { - // Deal with the old pre-3.0 weekly one. - $timestamp = wp_next_scheduled( 'jetpack_heartbeat' ); - if ( $timestamp ) { - wp_unschedule_event( $timestamp, 'jetpack_heartbeat' ); - } - - wp_schedule_event( time(), 'daily', $this->cron_name ); - } - - add_filter( 'jetpack_xmlrpc_unauthenticated_methods', array( __CLASS__, 'jetpack_xmlrpc_methods' ) ); - - if ( defined( 'WP_CLI' ) && WP_CLI ) { - WP_CLI::add_command( 'jetpack-heartbeat', array( $this, 'cli_callback' ) ); - } - } - - /** - * Method that gets executed on the wp-cron call - * - * @since 1.0.0 - * @since-jetpack 2.3.3 - * @global string $wp_version - */ - public function cron_exec() { - - $a8c_mc_stats = new A8c_Mc_Stats(); - - /* - * This should run daily. Figuring in for variances in - * WP_CRON, don't let it run more than every 23 hours at most. - * - * i.e. if it ran less than 23 hours ago, fail out. - */ - $last = (int) Jetpack_Options::get_option( 'last_heartbeat' ); - if ( $last && ( $last + DAY_IN_SECONDS - HOUR_IN_SECONDS > time() ) ) { - return; - } - - /* - * Check for an identity crisis - * - * If one exists: - * - Bump stat for ID crisis - * - Email site admin about potential ID crisis - */ - - // Coming Soon! - - foreach ( self::generate_stats_array( 'v2-' ) as $key => $value ) { - if ( is_array( $value ) ) { - foreach ( $value as $v ) { - $a8c_mc_stats->add( $key, (string) $v ); - } - } else { - $a8c_mc_stats->add( $key, (string) $value ); - } - } - - Jetpack_Options::update_option( 'last_heartbeat', time() ); - - $a8c_mc_stats->do_server_side_stats(); - - /** - * Fires when we synchronize all registered options on heartbeat. - * - * @since 3.3.0 - */ - do_action( 'jetpack_heartbeat' ); - } - - /** - * Generates heartbeat stats data. - * - * @param string $prefix Prefix to add before stats identifier. - * - * @return array The stats array. - */ - public static function generate_stats_array( $prefix = '' ) { - - /** - * This filter is used to build the array of stats that are bumped once a day by Jetpack Heartbeat. - * - * Filter the array and add key => value pairs where - * * key is the stat group name - * * value is the stat name. - * - * Example: - * add_filter( 'jetpack_heartbeat_stats_array', function( $stats ) { - * $stats['is-https'] = is_ssl() ? 'https' : 'http'; - * }); - * - * This will bump the stats for the 'is-https/https' or 'is-https/http' stat. - * - * @param array $stats The stats to be filtered. - * @param string $prefix The prefix that will automatically be added at the begining at each stat group name. - */ - $stats = apply_filters( 'jetpack_heartbeat_stats_array', array(), $prefix ); - $return = array(); - - // Apply prefix to stats. - foreach ( $stats as $stat => $value ) { - $return[ "$prefix$stat" ] = $value; - } - - return $return; - } - - /** - * Registers jetpack.getHeartbeatData xmlrpc method - * - * @param array $methods The list of methods to be filtered. - * @return array $methods - */ - public static function jetpack_xmlrpc_methods( $methods ) { - $methods['jetpack.getHeartbeatData'] = array( __CLASS__, 'xmlrpc_data_response' ); - return $methods; - } - - /** - * Handles the response for the jetpack.getHeartbeatData xmlrpc method - * - * @param array $params The parameters received in the request. - * @return array $params all the stats that heartbeat handles. - */ - public static function xmlrpc_data_response( $params = array() ) { - // The WordPress XML-RPC server sets a default param of array() - // if no argument is passed on the request and the method handlers get this array in $params. - // generate_stats_array() needs a string as first argument. - $params = empty( $params ) ? '' : $params; - return self::generate_stats_array( $params ); - } - - /** - * Clear scheduled events - * - * @return void - */ - public function deactivate() { - // Deal with the old pre-3.0 weekly one. - $timestamp = wp_next_scheduled( 'jetpack_heartbeat' ); - if ( $timestamp ) { - wp_unschedule_event( $timestamp, 'jetpack_heartbeat' ); - } - - $timestamp = wp_next_scheduled( $this->cron_name ); - wp_unschedule_event( $timestamp, $this->cron_name ); - } - - /** - * Interact with the Heartbeat - * - * ## OPTIONS - * - * inspect (default): Gets the list of data that is going to be sent in the heartbeat and the date/time of the last heartbeat - * - * @param array $args Arguments passed via CLI. - * - * @return void - */ - public function cli_callback( $args ) { - - $allowed_args = array( - 'inspect', - ); - - if ( isset( $args[0] ) && ! in_array( $args[0], $allowed_args, true ) ) { - /* translators: %s is a command like "prompt" */ - WP_CLI::error( sprintf( __( '%s is not a valid command.', 'jetpack-connection' ), $args[0] ) ); - } - - $stats = self::generate_stats_array(); - $formatted_stats = array(); - - foreach ( $stats as $stat_name => $bin ) { - $formatted_stats[] = array( - 'Stat name' => $stat_name, - 'Bin' => $bin, - ); - } - - WP_CLI\Utils\format_items( 'table', $formatted_stats, array( 'Stat name', 'Bin' ) ); - - $last_heartbeat = Jetpack_Options::get_option( 'last_heartbeat' ); - - if ( $last_heartbeat ) { - $last_date = gmdate( 'Y-m-d H:i:s', $last_heartbeat ); - /* translators: %s is the full datetime of the last heart beat e.g. 2020-01-01 12:21:23 */ - WP_CLI::line( sprintf( __( 'Last heartbeat sent at: %s', 'jetpack-connection' ), $last_date ) ); - } - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-connection/src/class-initial-state.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-connection/src/class-initial-state.php deleted file mode 100644 index 5d23562d..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-connection/src/class-initial-state.php +++ /dev/null @@ -1,61 +0,0 @@ - esc_url_raw( rest_url() ), - 'apiNonce' => wp_create_nonce( 'wp_rest' ), - 'registrationNonce' => wp_create_nonce( 'jetpack-registration-nonce' ), - 'connectionStatus' => REST_Connector::connection_status( false ), - 'userConnectionData' => REST_Connector::get_user_connection_data( false ), - 'connectedPlugins' => REST_Connector::get_connection_plugins( false ), - 'wpVersion' => $wp_version, - 'siteSuffix' => $status->get_site_suffix(), - 'connectionErrors' => Error_Handler::get_instance()->get_verified_errors(), - 'isOfflineMode' => $status->is_offline_mode(), - 'calypsoEnv' => ( new Status\Host() )->get_calypso_env(), - ); - } - - /** - * Render the initial state into a JavaScript variable. - * - * @return string - */ - public static function render() { - return 'var JP_CONNECTION_INITIAL_STATE; typeof JP_CONNECTION_INITIAL_STATE === "object" || (JP_CONNECTION_INITIAL_STATE = JSON.parse(decodeURIComponent("' . rawurlencode( wp_json_encode( self::get_data() ) ) . '")));'; - } - - /** - * Render the initial state using an inline script. - * - * @param string $handle The JS script handle. - * - * @return void - */ - public static function render_script( $handle ) { - wp_add_inline_script( $handle, static::render(), 'before' ); - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-connection/src/class-manager.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-connection/src/class-manager.php deleted file mode 100644 index a7db3e9d..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-connection/src/class-manager.php +++ /dev/null @@ -1,2596 +0,0 @@ -set_plugin_instance( new Plugin( $plugin_slug ) ); - } - } - - /** - * Initializes required listeners. This is done separately from the constructors - * because some objects sometimes need to instantiate separate objects of this class. - * - * @todo Implement a proper nonce verification. - */ - public static function configure() { - $manager = new self(); - - add_filter( - 'jetpack_constant_default_value', - __NAMESPACE__ . '\Utils::jetpack_api_constant_filter', - 10, - 2 - ); - - $manager->setup_xmlrpc_handlers( - $_GET, // phpcs:ignore WordPress.Security.NonceVerification.Recommended - $manager->has_connected_owner(), - $manager->verify_xml_rpc_signature() - ); - - $manager->error_handler = Error_Handler::get_instance(); - - if ( $manager->is_connected() ) { - add_filter( 'xmlrpc_methods', array( $manager, 'public_xmlrpc_methods' ) ); - add_filter( 'shutdown', array( new Package_Version_Tracker(), 'maybe_update_package_versions' ) ); - } - - add_action( 'rest_api_init', array( $manager, 'initialize_rest_api_registration_connector' ) ); - - ( new Nonce_Handler() )->init_schedule(); - - add_action( 'plugins_loaded', __NAMESPACE__ . '\Plugin_Storage::configure', 100 ); - - add_filter( 'map_meta_cap', array( $manager, 'jetpack_connection_custom_caps' ), 1, 4 ); - - Heartbeat::init(); - add_filter( 'jetpack_heartbeat_stats_array', array( $manager, 'add_stats_to_heartbeat' ) ); - - Webhooks::init( $manager ); - - // Set up package version hook. - add_filter( 'jetpack_package_versions', __NAMESPACE__ . '\Package_Version::send_package_version_to_tracker' ); - - if ( defined( 'JETPACK__SANDBOX_DOMAIN' ) && JETPACK__SANDBOX_DOMAIN ) { - ( new Server_Sandbox() )->init(); - } - - // Initialize connection notices. - new Connection_Notice(); - - // Initialize token locks. - new Tokens_Locks(); - - // Initial Partner management. - Partner::init(); - } - - /** - * Sets up the XMLRPC request handlers. - * - * @since 1.25.0 Deprecate $is_active param. - * - * @param array $request_params incoming request parameters. - * @param bool $has_connected_owner Whether the site has a connected owner. - * @param bool $is_signed whether the signature check has been successful. - * @param \Jetpack_XMLRPC_Server $xmlrpc_server (optional) an instance of the server to use instead of instantiating a new one. - */ - public function setup_xmlrpc_handlers( - $request_params, - $has_connected_owner, - $is_signed, - \Jetpack_XMLRPC_Server $xmlrpc_server = null - ) { - add_filter( 'xmlrpc_blog_options', array( $this, 'xmlrpc_options' ), 1000, 2 ); - - if ( - ! isset( $request_params['for'] ) - || 'jetpack' !== $request_params['for'] - ) { - return false; - } - - // Alternate XML-RPC, via ?for=jetpack&jetpack=comms. - if ( - isset( $request_params['jetpack'] ) - && 'comms' === $request_params['jetpack'] - ) { - if ( ! Constants::is_defined( 'XMLRPC_REQUEST' ) ) { - // Use the real constant here for WordPress' sake. - define( 'XMLRPC_REQUEST', true ); - } - - add_action( 'template_redirect', array( $this, 'alternate_xmlrpc' ) ); - - add_filter( 'xmlrpc_methods', array( $this, 'remove_non_jetpack_xmlrpc_methods' ), 1000 ); - } - - if ( ! Constants::get_constant( 'XMLRPC_REQUEST' ) ) { - return false; - } - // Display errors can cause the XML to be not well formed. - @ini_set( 'display_errors', false ); // phpcs:ignore - - if ( $xmlrpc_server ) { - $this->xmlrpc_server = $xmlrpc_server; - } else { - $this->xmlrpc_server = new \Jetpack_XMLRPC_Server(); - } - - $this->require_jetpack_authentication(); - - if ( $is_signed ) { - // If the site is connected either at a site or user level and the request is signed, expose the methods. - // The callback is responsible to determine whether the request is signed with blog or user token and act accordingly. - // The actual API methods. - $callback = array( $this->xmlrpc_server, 'xmlrpc_methods' ); - - // Hack to preserve $HTTP_RAW_POST_DATA. - add_filter( 'xmlrpc_methods', array( $this, 'xmlrpc_methods' ) ); - - } elseif ( $has_connected_owner && ! $is_signed ) { - // The jetpack.authorize method should be available for unauthenticated users on a site with an - // active Jetpack connection, so that additional users can link their account. - $callback = array( $this->xmlrpc_server, 'authorize_xmlrpc_methods' ); - } else { - // Any other unsigned request should expose the bootstrap methods. - $callback = array( $this->xmlrpc_server, 'bootstrap_xmlrpc_methods' ); - new XMLRPC_Connector( $this ); - } - - add_filter( 'xmlrpc_methods', $callback ); - - // Now that no one can authenticate, and we're whitelisting all XML-RPC methods, force enable_xmlrpc on. - add_filter( 'pre_option_enable_xmlrpc', '__return_true' ); - return true; - } - - /** - * Initializes the REST API connector on the init hook. - */ - public function initialize_rest_api_registration_connector() { - new REST_Connector( $this ); - } - - /** - * Since a lot of hosts use a hammer approach to "protecting" WordPress sites, - * and just blanket block all requests to /xmlrpc.php, or apply other overly-sensitive - * security/firewall policies, we provide our own alternate XML RPC API endpoint - * which is accessible via a different URI. Most of the below is copied directly - * from /xmlrpc.php so that we're replicating it as closely as possible. - * - * @todo Tighten $wp_xmlrpc_server_class a bit to make sure it doesn't do bad things. - * - * @return never - */ - public function alternate_xmlrpc() { - // Some browser-embedded clients send cookies. We don't want them. - $_COOKIE = array(); - - include_once ABSPATH . 'wp-admin/includes/admin.php'; - include_once ABSPATH . WPINC . '/class-IXR.php'; - include_once ABSPATH . WPINC . '/class-wp-xmlrpc-server.php'; - - /** - * Filters the class used for handling XML-RPC requests. - * - * @since 1.7.0 - * @since-jetpack 3.1.0 - * - * @param string $class The name of the XML-RPC server class. - */ - $wp_xmlrpc_server_class = apply_filters( 'wp_xmlrpc_server_class', 'wp_xmlrpc_server' ); - $wp_xmlrpc_server = new $wp_xmlrpc_server_class(); - - // Fire off the request. - nocache_headers(); - $wp_xmlrpc_server->serve_request(); - - exit; - } - - /** - * Removes all XML-RPC methods that are not `jetpack.*`. - * Only used in our alternate XML-RPC endpoint, where we want to - * ensure that Core and other plugins' methods are not exposed. - * - * @param array $methods a list of registered WordPress XMLRPC methods. - * @return array filtered $methods - */ - public function remove_non_jetpack_xmlrpc_methods( $methods ) { - $jetpack_methods = array(); - - foreach ( $methods as $method => $callback ) { - if ( str_starts_with( $method, 'jetpack.' ) ) { - $jetpack_methods[ $method ] = $callback; - } - } - - return $jetpack_methods; - } - - /** - * Removes all other authentication methods not to allow other - * methods to validate unauthenticated requests. - */ - public function require_jetpack_authentication() { - // Don't let anyone authenticate. - $_COOKIE = array(); - remove_all_filters( 'authenticate' ); - remove_all_actions( 'wp_login_failed' ); - - if ( $this->is_connected() ) { - // Allow Jetpack authentication. - add_filter( 'authenticate', array( $this, 'authenticate_jetpack' ), 10, 3 ); - } - } - - /** - * Authenticates XML-RPC and other requests from the Jetpack Server - * - * @param WP_User|Mixed $user user object if authenticated. - * @param String $username username. - * @param String $password password string. - * @return WP_User|Mixed authenticated user or error. - */ - public function authenticate_jetpack( $user, $username, $password ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable - if ( is_a( $user, '\\WP_User' ) ) { - return $user; - } - - $token_details = $this->verify_xml_rpc_signature(); - - if ( ! $token_details ) { - return $user; - } - - if ( 'user' !== $token_details['type'] ) { - return $user; - } - - if ( ! $token_details['user_id'] ) { - return $user; - } - - nocache_headers(); - - return new \WP_User( $token_details['user_id'] ); - } - - /** - * Verifies the signature of the current request. - * - * @return false|array - */ - public function verify_xml_rpc_signature() { - if ( $this->xmlrpc_verification === null ) { - $this->xmlrpc_verification = $this->internal_verify_xml_rpc_signature(); - - if ( is_wp_error( $this->xmlrpc_verification ) ) { - /** - * Action for logging XMLRPC signature verification errors. This data is sensitive. - * - * @since 1.7.0 - * @since-jetpack 7.5.0 - * - * @param WP_Error $signature_verification_error The verification error - */ - do_action( 'jetpack_verify_signature_error', $this->xmlrpc_verification ); - - Error_Handler::get_instance()->report_error( $this->xmlrpc_verification ); - - } - } - - return is_wp_error( $this->xmlrpc_verification ) ? false : $this->xmlrpc_verification; - } - - /** - * Verifies the signature of the current request. - * - * This function has side effects and should not be used. Instead, - * use the memoized version `->verify_xml_rpc_signature()`. - * - * @internal - * @todo Refactor to use proper nonce verification. - */ - private function internal_verify_xml_rpc_signature() { - // phpcs:disable WordPress.Security.NonceVerification.Recommended, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized - // It's not for us. - if ( ! isset( $_GET['token'] ) || empty( $_GET['signature'] ) ) { - return false; - } - - $signature_details = array( - 'token' => isset( $_GET['token'] ) ? wp_unslash( $_GET['token'] ) : '', - 'timestamp' => isset( $_GET['timestamp'] ) ? wp_unslash( $_GET['timestamp'] ) : '', - 'nonce' => isset( $_GET['nonce'] ) ? wp_unslash( $_GET['nonce'] ) : '', - 'body_hash' => isset( $_GET['body-hash'] ) ? wp_unslash( $_GET['body-hash'] ) : '', - 'method' => isset( $_SERVER['REQUEST_METHOD'] ) ? wp_unslash( $_SERVER['REQUEST_METHOD'] ) : null, - 'url' => wp_unslash( ( isset( $_SERVER['HTTP_HOST'] ) ? $_SERVER['HTTP_HOST'] : null ) . ( isset( $_SERVER['REQUEST_URI'] ) ? $_SERVER['REQUEST_URI'] : null ) ), // Temp - will get real signature URL later. - 'signature' => isset( $_GET['signature'] ) ? wp_unslash( $_GET['signature'] ) : '', - ); - - $error_type = 'xmlrpc'; - - // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged - @list( $token_key, $version, $user_id ) = explode( ':', wp_unslash( $_GET['token'] ) ); - // phpcs:enable WordPress.Security.NonceVerification.Recommended, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized - - $jetpack_api_version = Constants::get_constant( 'JETPACK__API_VERSION' ); - - if ( - empty( $token_key ) - || - empty( $version ) || (string) $jetpack_api_version !== $version ) { - return new \WP_Error( 'malformed_token', 'Malformed token in request', compact( 'signature_details', 'error_type' ) ); - } - - if ( '0' === $user_id ) { - $token_type = 'blog'; - $user_id = 0; - } else { - $token_type = 'user'; - if ( empty( $user_id ) || ! ctype_digit( $user_id ) ) { - return new \WP_Error( - 'malformed_user_id', - 'Malformed user_id in request', - compact( 'signature_details', 'error_type' ) - ); - } - $user_id = (int) $user_id; - - $user = new \WP_User( $user_id ); - if ( ! $user || ! $user->exists() ) { - return new \WP_Error( - 'unknown_user', - sprintf( 'User %d does not exist', $user_id ), - compact( 'signature_details', 'error_type' ) - ); - } - } - - $token = $this->get_tokens()->get_access_token( $user_id, $token_key, false ); - if ( is_wp_error( $token ) ) { - $token->add_data( compact( 'signature_details', 'error_type' ) ); - return $token; - } elseif ( ! $token ) { - return new \WP_Error( - 'unknown_token', - sprintf( 'Token %s:%s:%d does not exist', $token_key, $version, $user_id ), - compact( 'signature_details', 'error_type' ) - ); - } - - $jetpack_signature = new \Jetpack_Signature( $token->secret, (int) \Jetpack_Options::get_option( 'time_diff' ) ); - // phpcs:disable WordPress.Security.NonceVerification.Missing - if ( isset( $_POST['_jetpack_is_multipart'] ) ) { - $post_data = $_POST; - $file_hashes = array(); - foreach ( $post_data as $post_data_key => $post_data_value ) { - if ( ! str_starts_with( $post_data_key, '_jetpack_file_hmac_' ) ) { - continue; - } - $post_data_key = substr( $post_data_key, strlen( '_jetpack_file_hmac_' ) ); - $file_hashes[ $post_data_key ] = $post_data_value; - } - - foreach ( $file_hashes as $post_data_key => $post_data_value ) { - unset( $post_data[ "_jetpack_file_hmac_{$post_data_key}" ] ); - $post_data[ $post_data_key ] = $post_data_value; - } - - ksort( $post_data ); - - $body = http_build_query( stripslashes_deep( $post_data ) ); - } elseif ( $this->raw_post_data === null ) { - $body = file_get_contents( 'php://input' ); - } else { - $body = null; - } - // phpcs:enable - - $signature = $jetpack_signature->sign_current_request( - array( 'body' => $body === null ? $this->raw_post_data : $body ) - ); - - $signature_details['url'] = $jetpack_signature->current_request_url; - - if ( ! $signature ) { - return new \WP_Error( - 'could_not_sign', - 'Unknown signature error', - compact( 'signature_details', 'error_type' ) - ); - } elseif ( is_wp_error( $signature ) ) { - return $signature; - } - - // phpcs:disable WordPress.Security.NonceVerification.Recommended - $timestamp = (int) $_GET['timestamp']; - $nonce = wp_unslash( (string) $_GET['nonce'] ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- WP Core doesn't sanitize nonces either. - // phpcs:enable WordPress.Security.NonceVerification.Recommended - - // Use up the nonce regardless of whether the signature matches. - if ( ! ( new Nonce_Handler() )->add( $timestamp, $nonce ) ) { - return new \WP_Error( - 'invalid_nonce', - 'Could not add nonce', - compact( 'signature_details', 'error_type' ) - ); - } - - // Be careful about what you do with this debugging data. - // If a malicious requester has access to the expected signature, - // bad things might be possible. - $signature_details['expected'] = $signature; - - // phpcs:ignore WordPress.Security.NonceVerification.Recommended - if ( ! hash_equals( $signature, wp_unslash( $_GET['signature'] ) ) ) { - return new \WP_Error( - 'signature_mismatch', - 'Signature mismatch', - compact( 'signature_details', 'error_type' ) - ); - } - - /** - * Action for additional token checking. - * - * @since 1.7.0 - * @since-jetpack 7.7.0 - * - * @param array $post_data request data. - * @param array $token_data token data. - */ - return apply_filters( - 'jetpack_signature_check_token', - array( - 'type' => $token_type, - 'token_key' => $token_key, - 'user_id' => $token->external_user_id, - ), - $token, - $this->raw_post_data - ); - } - - /** - * Returns true if the current site is connected to WordPress.com and has the minimum requirements to enable Jetpack UI. - * - * This method is deprecated since version 1.25.0 of this package. Please use has_connected_owner instead. - * - * Since this method has a wide spread use, we decided not to throw any deprecation warnings for now. - * - * @deprecated 1.25.0 - * @see Manager::has_connected_owner - * @return Boolean is the site connected? - */ - public function is_active() { - return (bool) $this->get_tokens()->get_access_token( true ); - } - - /** - * Obtains an instance of the Tokens class. - * - * @return Tokens the Tokens object - */ - public function get_tokens() { - return new Tokens(); - } - - /** - * Returns true if the site has both a token and a blog id, which indicates a site has been registered. - * - * @access public - * @deprecated 1.12.1 Use is_connected instead - * @see Manager::is_connected - * - * @return bool - */ - public function is_registered() { - _deprecated_function( __METHOD__, '1.12.1' ); - return $this->is_connected(); - } - - /** - * Returns true if the site has both a token and a blog id, which indicates a site has been connected. - * - * @access public - * @since 1.21.1 - * - * @return bool - */ - public function is_connected() { - $has_blog_id = (bool) \Jetpack_Options::get_option( 'id' ); - $has_blog_token = (bool) $this->get_tokens()->get_access_token(); - return $has_blog_id && $has_blog_token; - } - - /** - * Returns true if the site has at least one connected administrator. - * - * @access public - * @since 1.21.1 - * - * @return bool - */ - public function has_connected_admin() { - return (bool) count( $this->get_connected_users( 'manage_options' ) ); - } - - /** - * Returns true if the site has any connected user. - * - * @access public - * @since 1.21.1 - * - * @return bool - */ - public function has_connected_user() { - return (bool) count( $this->get_connected_users( 'any', 1 ) ); - } - - /** - * Returns an array of users that have user tokens for communicating with wpcom. - * Able to select by specific capability. - * - * @since 9.9.1 Added $limit parameter. - * - * @param string $capability The capability of the user. - * @param int|null $limit How many connected users to get before returning. - * @return WP_User[] Array of WP_User objects if found. - */ - public function get_connected_users( $capability = 'any', $limit = null ) { - $connected_users = array(); - $user_tokens = $this->get_tokens()->get_user_tokens(); - - if ( ! is_array( $user_tokens ) || empty( $user_tokens ) ) { - return $connected_users; - } - $connected_user_ids = array_keys( $user_tokens ); - - if ( ! empty( $connected_user_ids ) ) { - foreach ( $connected_user_ids as $id ) { - // Check for capability. - if ( 'any' !== $capability && ! user_can( $id, $capability ) ) { - continue; - } - - $user_data = get_userdata( $id ); - if ( $user_data instanceof \WP_User ) { - $connected_users[] = $user_data; - if ( $limit && count( $connected_users ) >= $limit ) { - return $connected_users; - } - } - } - } - - return $connected_users; - } - - /** - * Returns true if the site has a connected Blog owner (master_user). - * - * @access public - * @since 1.21.1 - * - * @return bool - */ - public function has_connected_owner() { - return (bool) $this->get_connection_owner_id(); - } - - /** - * Returns true if the site is connected only at a site level. - * - * Note that we are explicitly checking for the existence of the master_user option in order to account for cases where we don't have any user tokens (user-level connection) but the master_user option is set, which could be the result of a problematic user connection. - * - * @access public - * @since 1.25.0 - * @deprecated 1.27.0 - * - * @return bool - */ - public function is_userless() { - _deprecated_function( __METHOD__, '1.27.0', 'Automattic\\Jetpack\\Connection\\Manager::is_site_connection' ); - return $this->is_site_connection(); - } - - /** - * Returns true if the site is connected only at a site level. - * - * Note that we are explicitly checking for the existence of the master_user option in order to account for cases where we don't have any user tokens (user-level connection) but the master_user option is set, which could be the result of a problematic user connection. - * - * @access public - * @since 1.27.0 - * - * @return bool - */ - public function is_site_connection() { - return $this->is_connected() && ! $this->has_connected_user() && ! \Jetpack_Options::get_option( 'master_user' ); - } - - /** - * Checks to see if the connection owner of the site is missing. - * - * @return bool - */ - public function is_missing_connection_owner() { - $connection_owner = $this->get_connection_owner_id(); - if ( ! get_user_by( 'id', $connection_owner ) ) { - return true; - } - - return false; - } - - /** - * Returns true if the user with the specified identifier is connected to - * WordPress.com. - * - * @param int $user_id the user identifier. Default is the current user. - * @return bool Boolean is the user connected? - */ - public function is_user_connected( $user_id = false ) { - $user_id = false === $user_id ? get_current_user_id() : absint( $user_id ); - if ( ! $user_id ) { - return false; - } - - return (bool) $this->get_tokens()->get_access_token( $user_id ); - } - - /** - * Returns the local user ID of the connection owner. - * - * @return bool|int Returns the ID of the connection owner or False if no connection owner found. - */ - public function get_connection_owner_id() { - $owner = $this->get_connection_owner(); - return $owner instanceof \WP_User ? $owner->ID : false; - } - - /** - * Get the wpcom user data of the current|specified connected user. - * - * @todo Refactor to properly load the XMLRPC client independently. - * - * @param Integer $user_id the user identifier. - * @return bool|array An array with the WPCOM user data on success, false otherwise. - */ - public function get_connected_user_data( $user_id = null ) { - if ( ! $user_id ) { - $user_id = get_current_user_id(); - } - - // Check if the user is connected and return false otherwise. - if ( ! $this->is_user_connected( $user_id ) ) { - return false; - } - - $transient_key = "jetpack_connected_user_data_$user_id"; - $cached_user_data = get_transient( $transient_key ); - - if ( $cached_user_data ) { - return $cached_user_data; - } - - $xml = new Jetpack_IXR_Client( - array( - 'user_id' => $user_id, - ) - ); - $xml->query( 'wpcom.getUser' ); - - if ( ! $xml->isError() ) { - $user_data = $xml->getResponse(); - set_transient( $transient_key, $xml->getResponse(), DAY_IN_SECONDS ); - return $user_data; - } - - return false; - } - - /** - * Returns a user object of the connection owner. - * - * @return WP_User|false False if no connection owner found. - */ - public function get_connection_owner() { - - $user_id = \Jetpack_Options::get_option( 'master_user' ); - - if ( ! $user_id ) { - return false; - } - - // Make sure user is connected. - $user_token = $this->get_tokens()->get_access_token( $user_id ); - - $connection_owner = false; - - if ( $user_token && is_object( $user_token ) && isset( $user_token->external_user_id ) ) { - $connection_owner = get_userdata( $user_token->external_user_id ); - } - - if ( $connection_owner === false ) { - Error_Handler::get_instance()->report_error( - new WP_Error( - 'invalid_connection_owner', - 'Invalid connection owner', - array( - 'user_id' => $user_id, - 'has_user_token' => (bool) $user_token, - 'error_type' => 'connection', - 'signature_details' => array( - 'token' => '', - ), - ) - ), - false, - true - ); - } - - return $connection_owner; - } - - /** - * Returns true if the provided user is the Jetpack connection owner. - * If user ID is not specified, the current user will be used. - * - * @param Integer|Boolean $user_id the user identifier. False for current user. - * @return Boolean True the user the connection owner, false otherwise. - */ - public function is_connection_owner( $user_id = false ) { - if ( ! $user_id ) { - $user_id = get_current_user_id(); - } - - return ( (int) $user_id ) === $this->get_connection_owner_id(); - } - - /** - * Connects the user with a specified ID to a WordPress.com user using the - * remote login flow. - * - * @access public - * - * @param Integer $user_id (optional) the user identifier, defaults to current user. - * @param String $redirect_url the URL to redirect the user to for processing, defaults to - * admin_url(). - * @return WP_Error only in case of a failed user lookup. - */ - public function connect_user( $user_id = null, $redirect_url = null ) { - $user = null; - if ( null === $user_id ) { - $user = wp_get_current_user(); - } else { - $user = get_user_by( 'ID', $user_id ); - } - - if ( empty( $user ) ) { - return new \WP_Error( 'user_not_found', 'Attempting to connect a non-existent user.' ); - } - - if ( null === $redirect_url ) { - $redirect_url = admin_url(); - } - - // Using wp_redirect intentionally because we're redirecting outside. - wp_redirect( $this->get_authorization_url( $user, $redirect_url ) ); // phpcs:ignore WordPress.Security.SafeRedirect - exit(); - } - - /** - * Unlinks the current user from the linked WordPress.com user. - * - * @access public - * @static - * - * @todo Refactor to properly load the XMLRPC client independently. - * - * @param Integer $user_id the user identifier. - * @param bool $can_overwrite_primary_user Allow for the primary user to be disconnected. - * @param bool $force_disconnect_locally Disconnect user locally even if we were unable to disconnect them from WP.com. - * @return Boolean Whether the disconnection of the user was successful. - */ - public function disconnect_user( $user_id = null, $can_overwrite_primary_user = false, $force_disconnect_locally = false ) { - $user_id = empty( $user_id ) ? get_current_user_id() : (int) $user_id; - $is_primary_user = Jetpack_Options::get_option( 'master_user' ) === $user_id; - - if ( $is_primary_user && ! $can_overwrite_primary_user ) { - return false; - } - - // Attempt to disconnect the user from WordPress.com. - $is_disconnected_from_wpcom = $this->unlink_user_from_wpcom( $user_id ); - - $is_disconnected_locally = false; - if ( $is_disconnected_from_wpcom || $force_disconnect_locally ) { - // Disconnect the user locally. - $is_disconnected_locally = $this->get_tokens()->disconnect_user( $user_id ); - - if ( $is_disconnected_locally ) { - // Delete cached connected user data. - $transient_key = "jetpack_connected_user_data_$user_id"; - delete_transient( $transient_key ); - - /** - * Fires after the current user has been unlinked from WordPress.com. - * - * @since 1.7.0 - * @since-jetpack 4.1.0 - * - * @param int $user_id The current user's ID. - */ - do_action( 'jetpack_unlinked_user', $user_id ); - - if ( $is_primary_user ) { - Jetpack_Options::delete_option( 'master_user' ); - } - } - } - - return $is_disconnected_from_wpcom && $is_disconnected_locally; - } - - /** - * Request to wpcom for a user to be unlinked from their WordPress.com account - * - * @param int $user_id The user identifier. - * - * @return bool Whether the disconnection of the user was successful. - */ - public function unlink_user_from_wpcom( $user_id ) { - // Attempt to disconnect the user from WordPress.com. - $xml = new Jetpack_IXR_Client(); - - $xml->query( 'jetpack.unlink_user', $user_id ); - if ( $xml->isError() ) { - return false; - } - - return (bool) $xml->getResponse(); - } - - /** - * Update the connection owner. - * - * @since 1.29.0 - * - * @param Integer $new_owner_id The ID of the user to become the connection owner. - * - * @return true|WP_Error True if owner successfully changed, WP_Error otherwise. - */ - public function update_connection_owner( $new_owner_id ) { - $roles = new Roles(); - if ( ! user_can( $new_owner_id, $roles->translate_role_to_cap( 'administrator' ) ) ) { - return new WP_Error( - 'new_owner_not_admin', - __( 'New owner is not admin', 'jetpack-connection' ), - array( 'status' => 400 ) - ); - } - - $old_owner_id = $this->get_connection_owner_id(); - - if ( $old_owner_id === $new_owner_id ) { - return new WP_Error( - 'new_owner_is_existing_owner', - __( 'New owner is same as existing owner', 'jetpack-connection' ), - array( 'status' => 400 ) - ); - } - - if ( ! $this->is_user_connected( $new_owner_id ) ) { - return new WP_Error( - 'new_owner_not_connected', - __( 'New owner is not connected', 'jetpack-connection' ), - array( 'status' => 400 ) - ); - } - - // Notify WPCOM about the connection owner change. - $owner_updated_wpcom = $this->update_connection_owner_wpcom( $new_owner_id ); - - if ( $owner_updated_wpcom ) { - // Update the connection owner in Jetpack only if they were successfully updated on WPCOM. - // This will ensure consistency with WPCOM. - \Jetpack_Options::update_option( 'master_user', $new_owner_id ); - - // Track it. - ( new Tracking() )->record_user_event( 'set_connection_owner_success' ); - - return true; - } - return new WP_Error( - 'error_setting_new_owner', - __( 'Could not confirm new owner.', 'jetpack-connection' ), - array( 'status' => 500 ) - ); - } - - /** - * Request to WPCOM to update the connection owner. - * - * @since 1.29.0 - * - * @param Integer $new_owner_id The ID of the user to become the connection owner. - * - * @return Boolean Whether the ownership transfer was successful. - */ - public function update_connection_owner_wpcom( $new_owner_id ) { - // Notify WPCOM about the connection owner change. - $xml = new Jetpack_IXR_Client( - array( - 'user_id' => get_current_user_id(), - ) - ); - $xml->query( - 'jetpack.switchBlogOwner', - array( - 'new_blog_owner' => $new_owner_id, - ) - ); - if ( $xml->isError() ) { - return false; - } - - return (bool) $xml->getResponse(); - } - - /** - * Returns the requested Jetpack API URL. - * - * @param String $relative_url the relative API path. - * @return String API URL. - */ - public function api_url( $relative_url ) { - $api_base = Constants::get_constant( 'JETPACK__API_BASE' ); - $api_version = '/' . Constants::get_constant( 'JETPACK__API_VERSION' ) . '/'; - - /** - * Filters the API URL that Jetpack uses for server communication. - * - * @since 1.7.0 - * @since-jetpack 8.0.0 - * - * @param String $url the generated URL. - * @param String $relative_url the relative URL that was passed as an argument. - * @param String $api_base the API base string that is being used. - * @param String $api_version the API version string that is being used. - */ - return apply_filters( - 'jetpack_api_url', - rtrim( $api_base . $relative_url, '/\\' ) . $api_version, - $relative_url, - $api_base, - $api_version - ); - } - - /** - * Returns the Jetpack XMLRPC WordPress.com API endpoint URL. - * - * @return String XMLRPC API URL. - */ - public function xmlrpc_api_url() { - $base = preg_replace( - '#(https?://[^?/]+)(/?.*)?$#', - '\\1', - Constants::get_constant( 'JETPACK__API_BASE' ) - ); - return untrailingslashit( $base ) . '/xmlrpc.php'; - } - - /** - * Attempts Jetpack registration which sets up the site for connection. Should - * remain public because the call to action comes from the current site, not from - * WordPress.com. - * - * @param String $api_endpoint (optional) an API endpoint to use, defaults to 'register'. - * @return true|WP_Error The error object. - */ - public function register( $api_endpoint = 'register' ) { - // Clean-up leftover tokens just in-case. - // This fixes an edge case that was preventing users to register when the blog token was missing but - // there were still leftover user tokens present. - $this->delete_all_connection_tokens( true ); - - add_action( 'pre_update_jetpack_option_register', array( '\\Jetpack_Options', 'delete_option' ) ); - $secrets = ( new Secrets() )->generate( 'register', get_current_user_id(), 600 ); - - if ( false === $secrets ) { - return new WP_Error( 'cannot_save_secrets', __( 'Jetpack experienced an issue trying to save options (cannot_save_secrets). We suggest that you contact your hosting provider, and ask them for help checking that the options table is writable on your site.', 'jetpack-connection' ) ); - } - - if ( - empty( $secrets['secret_1'] ) || - empty( $secrets['secret_2'] ) || - empty( $secrets['exp'] ) - ) { - return new \WP_Error( 'missing_secrets' ); - } - - // Better to try (and fail) to set a higher timeout than this system - // supports than to have register fail for more users than it should. - $timeout = $this->set_min_time_limit( 60 ) / 2; - - $gmt_offset = get_option( 'gmt_offset' ); - if ( ! $gmt_offset ) { - $gmt_offset = 0; - } - - $stats_options = get_option( 'stats_options' ); - $stats_id = isset( $stats_options['blog_id'] ) - ? $stats_options['blog_id'] - : null; - - /* This action is documented in src/class-package-version-tracker.php */ - $package_versions = apply_filters( 'jetpack_package_versions', array() ); - - $active_plugins_using_connection = Plugin_Storage::get_all(); - - /** - * Filters the request body for additional property addition. - * - * @since 1.7.0 - * @since-jetpack 7.7.0 - * - * @param array $post_data request data. - * @param Array $token_data token data. - */ - $body = apply_filters( - 'jetpack_register_request_body', - array_merge( - array( - 'siteurl' => Urls::site_url(), - 'home' => Urls::home_url(), - 'gmt_offset' => $gmt_offset, - 'timezone_string' => (string) get_option( 'timezone_string' ), - 'site_name' => (string) get_option( 'blogname' ), - 'secret_1' => $secrets['secret_1'], - 'secret_2' => $secrets['secret_2'], - 'site_lang' => get_locale(), - 'timeout' => $timeout, - 'stats_id' => $stats_id, - 'state' => get_current_user_id(), - 'site_created' => $this->get_assumed_site_creation_date(), - 'jetpack_version' => Constants::get_constant( 'JETPACK__VERSION' ), - 'ABSPATH' => Constants::get_constant( 'ABSPATH' ), - 'current_user_email' => wp_get_current_user()->user_email, - 'connect_plugin' => $this->get_plugin() ? $this->get_plugin()->get_slug() : null, - 'package_versions' => $package_versions, - 'active_connected_plugins' => $active_plugins_using_connection, - ), - self::$extra_register_params - ) - ); - - $args = array( - 'method' => 'POST', - 'body' => $body, - 'headers' => array( - 'Accept' => 'application/json', - ), - 'timeout' => $timeout, - ); - - $args['body'] = static::apply_activation_source_to_args( $args['body'] ); - - // TODO: fix URLs for bad hosts. - $response = Client::_wp_remote_request( - $this->api_url( $api_endpoint ), - $args, - true - ); - - // Make sure the response is valid and does not contain any Jetpack errors. - $registration_details = $this->validate_remote_register_response( $response ); - - if ( is_wp_error( $registration_details ) ) { - return $registration_details; - } elseif ( ! $registration_details ) { - return new \WP_Error( - 'unknown_error', - 'Unknown error registering your Jetpack site.', - wp_remote_retrieve_response_code( $response ) - ); - } - - if ( empty( $registration_details->jetpack_secret ) || ! is_string( $registration_details->jetpack_secret ) ) { - return new \WP_Error( - 'jetpack_secret', - 'Unable to validate registration of your Jetpack site.', - wp_remote_retrieve_response_code( $response ) - ); - } - - if ( isset( $registration_details->jetpack_public ) ) { - $jetpack_public = (int) $registration_details->jetpack_public; - } else { - $jetpack_public = false; - } - - Jetpack_Options::update_options( - array( - 'id' => (int) $registration_details->jetpack_id, - 'public' => $jetpack_public, - ) - ); - - update_option( Package_Version_Tracker::PACKAGE_VERSION_OPTION, $package_versions ); - - $this->get_tokens()->update_blog_token( (string) $registration_details->jetpack_secret ); - - if ( ! Jetpack_Options::get_option( 'id' ) || ! $this->get_tokens()->get_access_token() ) { - return new WP_Error( - 'connection_data_save_failed', - 'Failed to save connection data in the database' - ); - } - - $alternate_authorization_url = isset( $registration_details->alternate_authorization_url ) ? $registration_details->alternate_authorization_url : ''; - - add_filter( - 'jetpack_register_site_rest_response', - function ( $response ) use ( $alternate_authorization_url ) { - $response['alternateAuthorizeUrl'] = $alternate_authorization_url; - return $response; - } - ); - - /** - * Fires when a site is registered on WordPress.com. - * - * @since 1.7.0 - * @since-jetpack 3.7.0 - * - * @param int $json->jetpack_id Jetpack Blog ID. - * @param string $json->jetpack_secret Jetpack Blog Token. - * @param int|bool $jetpack_public Is the site public. - */ - do_action( - 'jetpack_site_registered', - $registration_details->jetpack_id, - $registration_details->jetpack_secret, - $jetpack_public - ); - - if ( isset( $registration_details->token ) ) { - /** - * Fires when a user token is sent along with the registration data. - * - * @since 1.7.0 - * @since-jetpack 7.6.0 - * - * @param object $token the administrator token for the newly registered site. - */ - do_action( 'jetpack_site_registered_user_token', $registration_details->token ); - } - - return true; - } - - /** - * Attempts Jetpack registration. - * - * @param bool $tos_agree Whether the user agreed to TOS. - * - * @return bool|WP_Error - */ - public function try_registration( $tos_agree = true ) { - if ( $tos_agree ) { - $terms_of_service = new Terms_Of_Service(); - $terms_of_service->agree(); - } - - /** - * Action fired when the user attempts the registration. - * - * @since 1.26.0 - */ - $pre_register = apply_filters( 'jetpack_pre_register', null ); - - if ( is_wp_error( $pre_register ) ) { - return $pre_register; - } - - $tracking_data = array(); - - if ( null !== $this->get_plugin() ) { - $tracking_data['plugin_slug'] = $this->get_plugin()->get_slug(); - } - - $tracking = new Tracking(); - $tracking->record_user_event( 'jpc_register_begin', $tracking_data ); - - add_filter( 'jetpack_register_request_body', array( Utils::class, 'filter_register_request_body' ) ); - - $result = $this->register(); - - remove_filter( 'jetpack_register_request_body', array( Utils::class, 'filter_register_request_body' ) ); - - // If there was an error with registration and the site was not registered, record this so we can show a message. - if ( ! $result || is_wp_error( $result ) ) { - return $result; - } - - return true; - } - - /** - * Adds a parameter to the register request body - * - * @since 1.26.0 - * - * @param string $name The name of the parameter to be added. - * @param string $value The value of the parameter to be added. - * - * @throws \InvalidArgumentException If supplied arguments are not strings. - * @return void - */ - public function add_register_request_param( $name, $value ) { - if ( ! is_string( $name ) || ! is_string( $value ) ) { - throw new \InvalidArgumentException( 'name and value must be strings' ); - } - self::$extra_register_params[ $name ] = $value; - } - - /** - * Takes the response from the Jetpack register new site endpoint and - * verifies it worked properly. - * - * @since 1.7.0 - * @since-jetpack 2.6.0 - * - * @param Mixed $response the response object, or the error object. - * @return string|WP_Error A JSON object on success or WP_Error on failures - **/ - protected function validate_remote_register_response( $response ) { - if ( is_wp_error( $response ) ) { - return new \WP_Error( - 'register_http_request_failed', - $response->get_error_message() - ); - } - - $code = wp_remote_retrieve_response_code( $response ); - $entity = wp_remote_retrieve_body( $response ); - - if ( $entity ) { - $registration_response = json_decode( $entity ); - } else { - $registration_response = false; - } - - $code_type = (int) ( $code / 100 ); - if ( 5 === $code_type ) { - return new \WP_Error( 'wpcom_5??', $code ); - } elseif ( 408 === $code ) { - return new \WP_Error( 'wpcom_408', $code ); - } elseif ( ! empty( $registration_response->error ) ) { - if ( - 'xml_rpc-32700' === $registration_response->error - && ! function_exists( 'xml_parser_create' ) - ) { - $error_description = __( "PHP's XML extension is not available. Jetpack requires the XML extension to communicate with WordPress.com. Please contact your hosting provider to enable PHP's XML extension.", 'jetpack-connection' ); - } else { - $error_description = isset( $registration_response->error_description ) - ? (string) $registration_response->error_description - : ''; - } - - return new \WP_Error( - (string) $registration_response->error, - $error_description, - $code - ); - } elseif ( 200 !== $code ) { - return new \WP_Error( 'wpcom_bad_response', $code ); - } - - // Jetpack ID error block. - if ( empty( $registration_response->jetpack_id ) ) { - return new \WP_Error( - 'jetpack_id', - /* translators: %s is an error message string */ - sprintf( __( 'Error Details: Jetpack ID is empty. Do not publicly post this error message! %s', 'jetpack-connection' ), $entity ), - $entity - ); - } elseif ( ! is_scalar( $registration_response->jetpack_id ) ) { - return new \WP_Error( - 'jetpack_id', - /* translators: %s is an error message string */ - sprintf( __( 'Error Details: Jetpack ID is not a scalar. Do not publicly post this error message! %s', 'jetpack-connection' ), $entity ), - $entity - ); - } elseif ( preg_match( '/[^0-9]/', $registration_response->jetpack_id ) ) { - return new \WP_Error( - 'jetpack_id', - /* translators: %s is an error message string */ - sprintf( __( 'Error Details: Jetpack ID begins with a numeral. Do not publicly post this error message! %s', 'jetpack-connection' ), $entity ), - $entity - ); - } - - return $registration_response; - } - - /** - * Adds a used nonce to a list of known nonces. - * - * @param int $timestamp the current request timestamp. - * @param string $nonce the nonce value. - * @return bool whether the nonce is unique or not. - * - * @deprecated since 1.24.0 - * @see Nonce_Handler::add() - */ - public function add_nonce( $timestamp, $nonce ) { - _deprecated_function( __METHOD__, '1.24.0', 'Automattic\\Jetpack\\Connection\\Nonce_Handler::add' ); - return ( new Nonce_Handler() )->add( $timestamp, $nonce ); - } - - /** - * Cleans nonces that were saved when calling ::add_nonce. - * - * @todo Properly prepare the query before executing it. - * - * @param bool $all whether to clean even non-expired nonces. - * - * @deprecated since 1.24.0 - * @see Nonce_Handler::clean_all() - */ - public function clean_nonces( $all = false ) { - _deprecated_function( __METHOD__, '1.24.0', 'Automattic\\Jetpack\\Connection\\Nonce_Handler::clean_all' ); - ( new Nonce_Handler() )->clean_all( $all ? PHP_INT_MAX : ( time() - Nonce_Handler::LIFETIME ) ); - } - - /** - * Sets the Connection custom capabilities. - * - * @param string[] $caps Array of the user's capabilities. - * @param string $cap Capability name. - * @param int $user_id The user ID. - * @param array $args Adds the context to the cap. Typically the object ID. - */ - public function jetpack_connection_custom_caps( $caps, $cap, $user_id, $args ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable - switch ( $cap ) { - case 'jetpack_connect': - case 'jetpack_reconnect': - $is_offline_mode = ( new Status() )->is_offline_mode(); - if ( $is_offline_mode ) { - $caps = array( 'do_not_allow' ); - break; - } - // Pass through. If it's not offline mode, these should match disconnect. - // Let users disconnect if it's offline mode, just in case things glitch. - case 'jetpack_disconnect': - /** - * Filters the jetpack_disconnect capability. - * - * @since 1.14.2 - * - * @param array An array containing the capability name. - */ - $caps = apply_filters( 'jetpack_disconnect_cap', array( 'manage_options' ) ); - break; - case 'jetpack_connect_user': - $is_offline_mode = ( new Status() )->is_offline_mode(); - if ( $is_offline_mode ) { - $caps = array( 'do_not_allow' ); - break; - } - // With site connections in mind, non-admin users can connect their account only if a connection owner exists. - $caps = $this->has_connected_owner() ? array( 'read' ) : array( 'manage_options' ); - break; - } - return $caps; - } - - /** - * Builds the timeout limit for queries talking with the wpcom servers. - * - * Based on local php max_execution_time in php.ini - * - * @since 1.7.0 - * @since-jetpack 5.4.0 - * @return int - **/ - public function get_max_execution_time() { - $timeout = (int) ini_get( 'max_execution_time' ); - - // Ensure exec time set in php.ini. - if ( ! $timeout ) { - $timeout = 30; - } - return $timeout; - } - - /** - * Sets a minimum request timeout, and returns the current timeout - * - * @since 1.7.0 - * @since-jetpack 5.4.0 - * @param Integer $min_timeout the minimum timeout value. - **/ - public function set_min_time_limit( $min_timeout ) { - $timeout = $this->get_max_execution_time(); - if ( $timeout < $min_timeout ) { - $timeout = $min_timeout; - set_time_limit( $timeout ); - } - return $timeout; - } - - /** - * Get our assumed site creation date. - * Calculated based on the earlier date of either: - * - Earliest admin user registration date. - * - Earliest date of post of any post type. - * - * @since 1.7.0 - * @since-jetpack 7.2.0 - * - * @return string Assumed site creation date and time. - */ - public function get_assumed_site_creation_date() { - $cached_date = get_transient( 'jetpack_assumed_site_creation_date' ); - if ( ! empty( $cached_date ) ) { - return $cached_date; - } - - $earliest_registered_users = get_users( - array( - 'role' => 'administrator', - 'orderby' => 'user_registered', - 'order' => 'ASC', - 'fields' => array( 'user_registered' ), - 'number' => 1, - ) - ); - $earliest_registration_date = $earliest_registered_users[0]->user_registered; - - $earliest_posts = get_posts( - array( - 'posts_per_page' => 1, - 'post_type' => 'any', - 'post_status' => 'any', - 'orderby' => 'date', - 'order' => 'ASC', - ) - ); - - // If there are no posts at all, we'll count only on user registration date. - if ( $earliest_posts ) { - $earliest_post_date = $earliest_posts[0]->post_date; - } else { - $earliest_post_date = PHP_INT_MAX; - } - - $assumed_date = min( $earliest_registration_date, $earliest_post_date ); - set_transient( 'jetpack_assumed_site_creation_date', $assumed_date ); - - return $assumed_date; - } - - /** - * Adds the activation source string as a parameter to passed arguments. - * - * @todo Refactor to use rawurlencode() instead of urlencode(). - * - * @param array $args arguments that need to have the source added. - * @return array $amended arguments. - */ - public static function apply_activation_source_to_args( $args ) { - list( $activation_source_name, $activation_source_keyword ) = get_option( 'jetpack_activation_source' ); - - if ( $activation_source_name ) { - // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.urlencode_urlencode - $args['_as'] = urlencode( $activation_source_name ); - } - - if ( $activation_source_keyword ) { - // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.urlencode_urlencode - $args['_ak'] = urlencode( $activation_source_keyword ); - } - - return $args; - } - - /** - * Generates two secret tokens and the end of life timestamp for them. - * - * @param String $action The action name. - * @param Integer $user_id The user identifier. - * @param Integer $exp Expiration time in seconds. - */ - public function generate_secrets( $action, $user_id = false, $exp = 600 ) { - return ( new Secrets() )->generate( $action, $user_id, $exp ); - } - - /** - * Returns two secret tokens and the end of life timestamp for them. - * - * @deprecated 1.24.0 Use Automattic\Jetpack\Connection\Secrets->get() instead. - * - * @param String $action The action name. - * @param Integer $user_id The user identifier. - * @return string|array an array of secrets or an error string. - */ - public function get_secrets( $action, $user_id ) { - _deprecated_function( __METHOD__, '1.24.0', 'Automattic\\Jetpack\\Connection\\Secrets->get' ); - return ( new Secrets() )->get( $action, $user_id ); - } - - /** - * Deletes secret tokens in case they, for example, have expired. - * - * @deprecated 1.24.0 Use Automattic\Jetpack\Connection\Secrets->delete() instead. - * - * @param String $action The action name. - * @param Integer $user_id The user identifier. - */ - public function delete_secrets( $action, $user_id ) { - _deprecated_function( __METHOD__, '1.24.0', 'Automattic\\Jetpack\\Connection\\Secrets->delete' ); - ( new Secrets() )->delete( $action, $user_id ); - } - - /** - * Deletes all connection tokens and transients from the local Jetpack site. - * If the plugin object has been provided in the constructor, the function first checks - * whether it's the only active connection. - * If there are any other connections, the function will do nothing and return `false` - * (unless `$ignore_connected_plugins` is set to `true`). - * - * @param bool $ignore_connected_plugins Delete the tokens even if there are other connected plugins. - * - * @return bool True if disconnected successfully, false otherwise. - */ - public function delete_all_connection_tokens( $ignore_connected_plugins = false ) { - // refuse to delete if we're not the last Jetpack plugin installed. - if ( ! $ignore_connected_plugins && null !== $this->plugin && ! $this->plugin->is_only() ) { - return false; - } - - /** - * Fires upon the disconnect attempt. - * Return `false` to prevent the disconnect. - * - * @since 1.14.2 - */ - if ( ! apply_filters( 'jetpack_connection_delete_all_tokens', true ) ) { - return false; - } - - \Jetpack_Options::delete_option( - array( - 'master_user', - 'time_diff', - 'fallback_no_verify_ssl_certs', - ) - ); - - ( new Secrets() )->delete_all(); - $this->get_tokens()->delete_all(); - - // Delete cached connected user data. - $transient_key = 'jetpack_connected_user_data_' . get_current_user_id(); - delete_transient( $transient_key ); - - // Delete all XML-RPC errors. - Error_Handler::get_instance()->delete_all_errors(); - - return true; - } - - /** - * Tells WordPress.com to disconnect the site and clear all tokens from cached site. - * If the plugin object has been provided in the constructor, the function first check - * whether it's the only active connection. - * If there are any other connections, the function will do nothing and return `false` - * (unless `$ignore_connected_plugins` is set to `true`). - * - * @param bool $ignore_connected_plugins Delete the tokens even if there are other connected plugins. - * - * @return bool True if disconnected successfully, false otherwise. - */ - public function disconnect_site_wpcom( $ignore_connected_plugins = false ) { - if ( ! $ignore_connected_plugins && null !== $this->plugin && ! $this->plugin->is_only() ) { - return false; - } - - if ( ( new Status() )->is_offline_mode() && ! apply_filters( 'jetpack_connection_disconnect_site_wpcom_offline_mode', false ) ) { - // Prevent potential disconnect of the live site by removing WPCOM tokens. - return false; - } - - /** - * Fires upon the disconnect attempt. - * Return `false` to prevent the disconnect. - * - * @since 1.14.2 - */ - if ( ! apply_filters( 'jetpack_connection_disconnect_site_wpcom', true, $this ) ) { - return false; - } - - $xml = new Jetpack_IXR_Client(); - $xml->query( 'jetpack.deregister', get_current_user_id() ); - - return true; - } - - /** - * Disconnect the plugin and remove the tokens. - * This function will automatically perform "soft" or "hard" disconnect depending on whether other plugins are using the connection. - * This is a proxy method to simplify the Connection package API. - * - * @see Manager::disconnect_site() - * - * @param boolean $disconnect_wpcom Should disconnect_site_wpcom be called. - * @param bool $ignore_connected_plugins Delete the tokens even if there are other connected plugins. - * @return bool - */ - public function remove_connection( $disconnect_wpcom = true, $ignore_connected_plugins = false ) { - - $this->disconnect_site( $disconnect_wpcom, $ignore_connected_plugins ); - - return true; - } - - /** - * Completely clearing up the connection, and initiating reconnect. - * - * @return true|WP_Error True if reconnected successfully, a `WP_Error` object otherwise. - */ - public function reconnect() { - ( new Tracking() )->record_user_event( 'restore_connection_reconnect' ); - - $this->disconnect_site_wpcom( true ); - - return $this->register(); - } - - /** - * Validate the tokens, and refresh the invalid ones. - * - * @return string|bool|WP_Error True if connection restored or string indicating what's to be done next. A `WP_Error` object or false otherwise. - */ - public function restore() { - // If this is a site connection we need to trigger a full reconnection as our only secure means of - // communication with WPCOM, aka the blog token, is compromised. - if ( $this->is_site_connection() ) { - return $this->reconnect(); - } - - $validate_tokens_response = $this->get_tokens()->validate(); - - // If token validation failed, trigger a full reconnection. - if ( is_array( $validate_tokens_response ) && - isset( $validate_tokens_response['blog_token']['is_healthy'] ) && - isset( $validate_tokens_response['user_token']['is_healthy'] ) ) { - $blog_token_healthy = $validate_tokens_response['blog_token']['is_healthy']; - $user_token_healthy = $validate_tokens_response['user_token']['is_healthy']; - } else { - $blog_token_healthy = false; - $user_token_healthy = false; - } - - // Tokens are both valid, or both invalid. We can't fix the problem we don't see, so the full reconnection is needed. - if ( $blog_token_healthy === $user_token_healthy ) { - $result = $this->reconnect(); - return ( true === $result ) ? 'authorize' : $result; - } - - if ( ! $blog_token_healthy ) { - return $this->refresh_blog_token(); - } - - if ( ! $user_token_healthy ) { - return ( true === $this->refresh_user_token() ) ? 'authorize' : false; - } - - return false; - } - - /** - * Responds to a WordPress.com call to register the current site. - * Should be changed to protected. - * - * @param array $registration_data Array of [ secret_1, user_id ]. - */ - public function handle_registration( array $registration_data ) { - list( $registration_secret_1, $registration_user_id ) = $registration_data; - if ( empty( $registration_user_id ) ) { - return new \WP_Error( 'registration_state_invalid', __( 'Invalid Registration State', 'jetpack-connection' ), 400 ); - } - - return ( new Secrets() )->verify( 'register', $registration_secret_1, (int) $registration_user_id ); - } - - /** - * Perform the API request to validate the blog and user tokens. - * - * @deprecated 1.24.0 Use Automattic\Jetpack\Connection\Tokens->validate_tokens() instead. - * - * @param int|null $user_id ID of the user we need to validate token for. Current user's ID by default. - * - * @return array|false|WP_Error The API response: `array( 'blog_token_is_healthy' => true|false, 'user_token_is_healthy' => true|false )`. - */ - public function validate_tokens( $user_id = null ) { - _deprecated_function( __METHOD__, '1.24.0', 'Automattic\\Jetpack\\Connection\\Tokens->validate' ); - return $this->get_tokens()->validate( $user_id ); - } - - /** - * Verify a Previously Generated Secret. - * - * @deprecated 1.24.0 Use Automattic\Jetpack\Connection\Secrets->verify() instead. - * - * @param string $action The type of secret to verify. - * @param string $secret_1 The secret string to compare to what is stored. - * @param int $user_id The user ID of the owner of the secret. - * @return \WP_Error|string WP_Error on failure, secret_2 on success. - */ - public function verify_secrets( $action, $secret_1, $user_id ) { - _deprecated_function( __METHOD__, '1.24.0', 'Automattic\\Jetpack\\Connection\\Secrets->verify' ); - return ( new Secrets() )->verify( $action, $secret_1, $user_id ); - } - - /** - * Responds to a WordPress.com call to authorize the current user. - * Should be changed to protected. - */ - public function handle_authorization() { - } - - /** - * Obtains the auth token. - * - * @param array $data The request data. - * @return object|\WP_Error Returns the auth token on success. - * Returns a \WP_Error on failure. - */ - public function get_token( $data ) { - return $this->get_tokens()->get( $data, $this->api_url( 'token' ) ); - } - - /** - * Builds a URL to the Jetpack connection auth page. - * - * @param WP_User $user (optional) defaults to the current logged in user. - * @param String $redirect (optional) a redirect URL to use instead of the default. - * @return string Connect URL. - */ - public function get_authorization_url( $user = null, $redirect = null ) { - if ( empty( $user ) ) { - $user = wp_get_current_user(); - } - - $roles = new Roles(); - $role = $roles->translate_user_to_role( $user ); - $signed_role = $this->get_tokens()->sign_role( $role ); - - /** - * Filter the URL of the first time the user gets redirected back to your site for connection - * data processing. - * - * @since 1.7.0 - * @since-jetpack 8.0.0 - * - * @param string $redirect_url Defaults to the site admin URL. - */ - $processing_url = apply_filters( 'jetpack_connect_processing_url', admin_url( 'admin.php' ) ); - - /** - * Filter the URL to redirect the user back to when the authorization process - * is complete. - * - * @since 1.7.0 - * @since-jetpack 8.0.0 - * - * @param string $redirect_url Defaults to the site URL. - */ - $redirect = apply_filters( 'jetpack_connect_redirect_url', $redirect ); - - $secrets = ( new Secrets() )->generate( 'authorize', $user->ID, 2 * HOUR_IN_SECONDS ); - - /** - * Filter the type of authorization. - * 'calypso' completes authorization on wordpress.com/jetpack/connect - * while 'jetpack' ( or any other value ) completes the authorization at jetpack.wordpress.com. - * - * @since 1.7.0 - * @since-jetpack 4.3.3 - * - * @param string $auth_type Defaults to 'calypso', can also be 'jetpack'. - */ - $auth_type = apply_filters( 'jetpack_auth_type', 'calypso' ); - - /** - * Filters the user connection request data for additional property addition. - * - * @since 1.7.0 - * @since-jetpack 8.0.0 - * - * @param array $request_data request data. - */ - $body = apply_filters( - 'jetpack_connect_request_body', - array( - 'response_type' => 'code', - 'client_id' => \Jetpack_Options::get_option( 'id' ), - 'redirect_uri' => add_query_arg( - array( - 'handler' => 'jetpack-connection-webhooks', - 'action' => 'authorize', - '_wpnonce' => wp_create_nonce( "jetpack-authorize_{$role}_{$redirect}" ), - 'redirect' => $redirect ? rawurlencode( $redirect ) : false, - ), - esc_url( $processing_url ) - ), - 'state' => $user->ID, - 'scope' => $signed_role, - 'user_email' => $user->user_email, - 'user_login' => $user->user_login, - 'is_active' => $this->has_connected_owner(), // TODO Deprecate this. - 'jp_version' => (string) Constants::get_constant( 'JETPACK__VERSION' ), - 'auth_type' => $auth_type, - 'secret' => $secrets['secret_1'], - 'blogname' => get_option( 'blogname' ), - 'site_url' => Urls::site_url(), - 'home_url' => Urls::home_url(), - 'site_icon' => get_site_icon_url(), - 'site_lang' => get_locale(), - 'site_created' => $this->get_assumed_site_creation_date(), - 'allow_site_connection' => ! $this->has_connected_owner(), - 'calypso_env' => ( new Host() )->get_calypso_env(), - 'source' => ( new Host() )->get_source_query(), - ) - ); - - $body = static::apply_activation_source_to_args( urlencode_deep( $body ) ); - - $api_url = $this->api_url( 'authorize' ); - - $url = add_query_arg( $body, $api_url ); - - /** This filter is documented in plugins/jetpack/class-jetpack.php */ - return apply_filters( 'jetpack_build_authorize_url', $url ); - } - - /** - * Authorizes the user by obtaining and storing the user token. - * - * @param array $data The request data. - * @return string|\WP_Error Returns a string on success. - * Returns a \WP_Error on failure. - */ - public function authorize( $data = array() ) { - /** - * Action fired when user authorization starts. - * - * @since 1.7.0 - * @since-jetpack 8.0.0 - */ - do_action( 'jetpack_authorize_starting' ); - - $roles = new Roles(); - $role = $roles->translate_current_user_to_role(); - - if ( ! $role ) { - return new \WP_Error( 'no_role', 'Invalid request.', 400 ); - } - - $cap = $roles->translate_role_to_cap( $role ); - if ( ! $cap ) { - return new \WP_Error( 'no_cap', 'Invalid request.', 400 ); - } - - if ( ! empty( $data['error'] ) ) { - return new \WP_Error( $data['error'], 'Error included in the request.', 400 ); - } - - if ( ! isset( $data['state'] ) ) { - return new \WP_Error( 'no_state', 'Request must include state.', 400 ); - } - - if ( ! ctype_digit( $data['state'] ) ) { - return new \WP_Error( $data['error'], 'State must be an integer.', 400 ); - } - - $current_user_id = get_current_user_id(); - if ( $current_user_id !== (int) $data['state'] ) { - return new \WP_Error( 'wrong_state', 'State does not match current user.', 400 ); - } - - if ( empty( $data['code'] ) ) { - return new \WP_Error( 'no_code', 'Request must include an authorization code.', 400 ); - } - - $token = $this->get_tokens()->get( $data, $this->api_url( 'token' ) ); - - if ( is_wp_error( $token ) ) { - $code = $token->get_error_code(); - if ( empty( $code ) ) { - $code = 'invalid_token'; - } - return new \WP_Error( $code, $token->get_error_message(), 400 ); - } - - if ( ! $token ) { - return new \WP_Error( 'no_token', 'Error generating token.', 400 ); - } - - $is_connection_owner = ! $this->has_connected_owner(); - - $this->get_tokens()->update_user_token( $current_user_id, sprintf( '%s.%d', $token, $current_user_id ), $is_connection_owner ); - - /** - * Fires after user has successfully received an auth token. - * - * @since 1.7.0 - * @since-jetpack 3.9.0 - */ - do_action( 'jetpack_user_authorized' ); - - if ( ! $is_connection_owner ) { - /** - * Action fired when a secondary user has been authorized. - * - * @since 1.7.0 - * @since-jetpack 8.0.0 - */ - do_action( 'jetpack_authorize_ending_linked' ); - return 'linked'; - } - - /** - * Action fired when the master user has been authorized. - * - * @since 1.7.0 - * @since-jetpack 8.0.0 - * - * @param array $data The request data. - */ - do_action( 'jetpack_authorize_ending_authorized', $data ); - - \Jetpack_Options::delete_raw_option( 'jetpack_last_connect_url_check' ); - - ( new Nonce_Handler() )->reschedule(); - - return 'authorized'; - } - - /** - * Disconnects from the Jetpack servers. - * Forgets all connection details and tells the Jetpack servers to do the same. - * - * @param boolean $disconnect_wpcom Should disconnect_site_wpcom be called. - * @param bool $ignore_connected_plugins Delete the tokens even if there are other connected plugins. - */ - public function disconnect_site( $disconnect_wpcom = true, $ignore_connected_plugins = true ) { - if ( ! $ignore_connected_plugins && null !== $this->plugin && ! $this->plugin->is_only() ) { - return false; - } - - wp_clear_scheduled_hook( 'jetpack_clean_nonces' ); - - ( new Nonce_Handler() )->clean_all(); - - /** - * Fires when a site is disconnected. - * - * @since 1.36.3 - */ - do_action( 'jetpack_site_before_disconnected' ); - - // If the site is in an IDC because sync is not allowed, - // let's make sure to not disconnect the production site. - if ( $disconnect_wpcom ) { - $tracking = new Tracking(); - $tracking->record_user_event( 'disconnect_site', array() ); - - $this->disconnect_site_wpcom( $ignore_connected_plugins ); - } - - $this->delete_all_connection_tokens( $ignore_connected_plugins ); - - // Remove tracked package versions, since they depend on the Jetpack Connection. - delete_option( Package_Version_Tracker::PACKAGE_VERSION_OPTION ); - - $jetpack_unique_connection = \Jetpack_Options::get_option( 'unique_connection' ); - if ( $jetpack_unique_connection ) { - // Check then record unique disconnection if site has never been disconnected previously. - if ( - 1 === $jetpack_unique_connection['disconnected'] ) { - $jetpack_unique_connection['disconnected'] = 1; - } else { - if ( 0 === $jetpack_unique_connection['disconnected'] ) { - $a8c_mc_stats_instance = new A8c_Mc_Stats(); - $a8c_mc_stats_instance->add( 'connections', 'unique-disconnect' ); - $a8c_mc_stats_instance->do_server_side_stats(); - } - // increment number of times disconnected. - $jetpack_unique_connection['disconnected'] += 1; - } - - \Jetpack_Options::update_option( 'unique_connection', $jetpack_unique_connection ); - } - - /** - * Fires when a site is disconnected. - * - * @since 1.30.1 - */ - do_action( 'jetpack_site_disconnected' ); - } - - /** - * The Base64 Encoding of the SHA1 Hash of the Input. - * - * @param string $text The string to hash. - * @return string - */ - public function sha1_base64( $text ) { - return base64_encode( sha1( $text, true ) ); // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.obfuscation_base64_encode - } - - /** - * This function mirrors Jetpack_Data::is_usable_domain() in the WPCOM codebase. - * - * @param string $domain The domain to check. - * - * @return bool|WP_Error - */ - public function is_usable_domain( $domain ) { - - // If it's empty, just fail out. - if ( ! $domain ) { - return new \WP_Error( - 'fail_domain_empty', - /* translators: %1$s is a domain name. */ - sprintf( __( 'Domain `%1$s` just failed is_usable_domain check as it is empty.', 'jetpack-connection' ), $domain ) - ); - } - - /** - * Skips the usuable domain check when connecting a site. - * - * Allows site administrators with domains that fail gethostname-based checks to pass the request to WP.com - * - * @since 1.7.0 - * @since-jetpack 4.1.0 - * - * @param bool If the check should be skipped. Default false. - */ - if ( apply_filters( 'jetpack_skip_usuable_domain_check', false ) ) { - return true; - } - - // None of the explicit localhosts. - $forbidden_domains = array( - 'wordpress.com', - 'localhost', - 'localhost.localdomain', - 'local.wordpress.test', // VVV pattern. - 'local.wordpress-trunk.test', // VVV pattern. - 'src.wordpress-develop.test', // VVV pattern. - 'build.wordpress-develop.test', // VVV pattern. - ); - if ( in_array( $domain, $forbidden_domains, true ) ) { - return new \WP_Error( - 'fail_domain_forbidden', - sprintf( - /* translators: %1$s is a domain name. */ - __( - 'Domain `%1$s` just failed is_usable_domain check as it is in the forbidden array.', - 'jetpack-connection' - ), - $domain - ) - ); - } - - // No .test or .local domains. - if ( preg_match( '#\.(test|local)$#i', $domain ) ) { - return new \WP_Error( - 'fail_domain_tld', - sprintf( - /* translators: %1$s is a domain name. */ - __( - 'Domain `%1$s` just failed is_usable_domain check as it uses an invalid top level domain.', - 'jetpack-connection' - ), - $domain - ) - ); - } - - // No WPCOM subdomains. - if ( preg_match( '#\.WordPress\.com$#i', $domain ) ) { - return new \WP_Error( - 'fail_subdomain_wpcom', - sprintf( - /* translators: %1$s is a domain name. */ - __( - 'Domain `%1$s` just failed is_usable_domain check as it is a subdomain of WordPress.com.', - 'jetpack-connection' - ), - $domain - ) - ); - } - - // If PHP was compiled without support for the Filter module (very edge case). - if ( ! function_exists( 'filter_var' ) ) { - // Just pass back true for now, and let wpcom sort it out. - return true; - } - - $domain = preg_replace( '#^https?://#', '', untrailingslashit( $domain ) ); - - if ( filter_var( $domain, FILTER_VALIDATE_IP ) - && ! filter_var( $domain, FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE ) - ) { - return new \WP_Error( - 'fail_ip_forbidden', - sprintf( - /* translators: %1$s is a domain name. */ - __( - 'IP address `%1$s` just failed is_usable_domain check as it is in the private network.', - 'jetpack-connection' - ), - $domain - ) - ); - } - - return true; - } - - /** - * Gets the requested token. - * - * @deprecated 1.24.0 Use Automattic\Jetpack\Connection\Tokens->get_access_token() instead. - * - * @param int|false $user_id false: Return the Blog Token. int: Return that user's User Token. - * @param string|false $token_key If provided, check that the token matches the provided input. - * @param bool|true $suppress_errors If true, return a falsy value when the token isn't found; When false, return a descriptive WP_Error when the token isn't found. - * - * @return object|false - * - * @see $this->get_tokens()->get_access_token() - */ - public function get_access_token( $user_id = false, $token_key = false, $suppress_errors = true ) { - _deprecated_function( __METHOD__, '1.24.0', 'Automattic\\Jetpack\\Connection\\Tokens->get_access_token' ); - return $this->get_tokens()->get_access_token( $user_id, $token_key, $suppress_errors ); - } - - /** - * In some setups, $HTTP_RAW_POST_DATA can be emptied during some IXR_Server paths - * since it is passed by reference to various methods. - * Capture it here so we can verify the signature later. - * - * @param array $methods an array of available XMLRPC methods. - * @return array the same array, since this method doesn't add or remove anything. - */ - public function xmlrpc_methods( $methods ) { - $this->raw_post_data = isset( $GLOBALS['HTTP_RAW_POST_DATA'] ) ? $GLOBALS['HTTP_RAW_POST_DATA'] : null; - return $methods; - } - - /** - * Resets the raw post data parameter for testing purposes. - */ - public function reset_raw_post_data() { - $this->raw_post_data = null; - } - - /** - * Registering an additional method. - * - * @param array $methods an array of available XMLRPC methods. - * @return array the amended array in case the method is added. - */ - public function public_xmlrpc_methods( $methods ) { - if ( array_key_exists( 'wp.getOptions', $methods ) ) { - $methods['wp.getOptions'] = array( $this, 'jetpack_get_options' ); - } - return $methods; - } - - /** - * Handles a getOptions XMLRPC method call. - * - * @param array $args method call arguments. - * @return an amended XMLRPC server options array. - */ - public function jetpack_get_options( $args ) { - global $wp_xmlrpc_server; - - $wp_xmlrpc_server->escape( $args ); - - $username = $args[1]; - $password = $args[2]; - - $user = $wp_xmlrpc_server->login( $username, $password ); - if ( ! $user ) { - return $wp_xmlrpc_server->error; - } - - $options = array(); - $user_data = $this->get_connected_user_data(); - if ( is_array( $user_data ) ) { - $options['jetpack_user_id'] = array( - 'desc' => __( 'The WP.com user ID of the connected user', 'jetpack-connection' ), - 'readonly' => true, - 'value' => $user_data['ID'], - ); - $options['jetpack_user_login'] = array( - 'desc' => __( 'The WP.com username of the connected user', 'jetpack-connection' ), - 'readonly' => true, - 'value' => $user_data['login'], - ); - $options['jetpack_user_email'] = array( - 'desc' => __( 'The WP.com user email of the connected user', 'jetpack-connection' ), - 'readonly' => true, - 'value' => $user_data['email'], - ); - $options['jetpack_user_site_count'] = array( - 'desc' => __( 'The number of sites of the connected WP.com user', 'jetpack-connection' ), - 'readonly' => true, - 'value' => $user_data['site_count'], - ); - } - $wp_xmlrpc_server->blog_options = array_merge( $wp_xmlrpc_server->blog_options, $options ); - $args = stripslashes_deep( $args ); - return $wp_xmlrpc_server->wp_getOptions( $args ); - } - - /** - * Adds Jetpack-specific options to the output of the XMLRPC options method. - * - * @param array $options standard Core options. - * @return array amended options. - */ - public function xmlrpc_options( $options ) { - $jetpack_client_id = false; - if ( $this->is_connected() ) { - $jetpack_client_id = \Jetpack_Options::get_option( 'id' ); - } - $options['jetpack_version'] = array( - 'desc' => __( 'Jetpack Plugin Version', 'jetpack-connection' ), - 'readonly' => true, - 'value' => Constants::get_constant( 'JETPACK__VERSION' ), - ); - - $options['jetpack_client_id'] = array( - 'desc' => __( 'The Client ID/WP.com Blog ID of this site', 'jetpack-connection' ), - 'readonly' => true, - 'value' => $jetpack_client_id, - ); - return $options; - } - - /** - * Resets the saved authentication state in between testing requests. - */ - public function reset_saved_auth_state() { - $this->xmlrpc_verification = null; - } - - /** - * Sign a user role with the master access token. - * If not specified, will default to the current user. - * - * @access public - * - * @param string $role User role. - * @param int $user_id ID of the user. - * @return string Signed user role. - */ - public function sign_role( $role, $user_id = null ) { - return $this->get_tokens()->sign_role( $role, $user_id ); - } - - /** - * Set the plugin instance. - * - * @param Plugin $plugin_instance The plugin instance. - * - * @return $this - */ - public function set_plugin_instance( Plugin $plugin_instance ) { - $this->plugin = $plugin_instance; - - return $this; - } - - /** - * Retrieve the plugin management object. - * - * @return Plugin|null - */ - public function get_plugin() { - return $this->plugin; - } - - /** - * Get all connected plugins information, excluding those disconnected by user. - * WARNING: the method cannot be called until Plugin_Storage::configure is called, which happens on plugins_loaded - * Even if you don't use Jetpack Config, it may be introduced later by other plugins, - * so please make sure not to run the method too early in the code. - * - * @return array|WP_Error - */ - public function get_connected_plugins() { - $maybe_plugins = Plugin_Storage::get_all(); - - if ( $maybe_plugins instanceof WP_Error ) { - return $maybe_plugins; - } - - return $maybe_plugins; - } - - /** - * Force plugin disconnect. After its called, the plugin will not be allowed to use the connection. - * Note: this method does not remove any access tokens. - * - * @deprecated since 1.39.0 - * @return bool - */ - public function disable_plugin() { - return null; - } - - /** - * Force plugin reconnect after user-initiated disconnect. - * After its called, the plugin will be allowed to use the connection again. - * Note: this method does not initialize access tokens. - * - * @deprecated since 1.39.0. - * @return bool - */ - public function enable_plugin() { - return null; - } - - /** - * Whether the plugin is allowed to use the connection, or it's been disconnected by user. - * If no plugin slug was passed into the constructor, always returns true. - * - * @deprecated 1.42.0 This method no longer has a purpose after the removal of the soft disconnect feature. - * - * @return bool - */ - public function is_plugin_enabled() { - return true; - } - - /** - * Perform the API request to refresh the blog token. - * Note that we are making this request on behalf of the Jetpack master user, - * given they were (most probably) the ones that registered the site at the first place. - * - * @return WP_Error|bool The result of updating the blog_token option. - */ - public function refresh_blog_token() { - ( new Tracking() )->record_user_event( 'restore_connection_refresh_blog_token' ); - - $blog_id = \Jetpack_Options::get_option( 'id' ); - if ( ! $blog_id ) { - return new WP_Error( 'site_not_registered', 'Site not registered.' ); - } - - $url = sprintf( - '%s/%s/v%s/%s', - Constants::get_constant( 'JETPACK__WPCOM_JSON_API_BASE' ), - 'wpcom', - '2', - 'sites/' . $blog_id . '/jetpack-refresh-blog-token' - ); - $method = 'POST'; - $user_id = get_current_user_id(); - - $response = Client::remote_request( compact( 'url', 'method', 'user_id' ) ); - - if ( is_wp_error( $response ) ) { - return new WP_Error( 'refresh_blog_token_http_request_failed', $response->get_error_message() ); - } - - $code = wp_remote_retrieve_response_code( $response ); - $entity = wp_remote_retrieve_body( $response ); - - if ( $entity ) { - $json = json_decode( $entity ); - } else { - $json = false; - } - - if ( 200 !== $code ) { - if ( empty( $json->code ) ) { - return new WP_Error( 'unknown', '', $code ); - } - - /* translators: Error description string. */ - $error_description = isset( $json->message ) ? sprintf( __( 'Error Details: %s', 'jetpack-connection' ), (string) $json->message ) : ''; - - return new WP_Error( (string) $json->code, $error_description, $code ); - } - - if ( empty( $json->jetpack_secret ) || ! is_scalar( $json->jetpack_secret ) ) { - return new WP_Error( 'jetpack_secret', '', $code ); - } - - Error_Handler::get_instance()->delete_all_errors(); - - return $this->get_tokens()->update_blog_token( (string) $json->jetpack_secret ); - } - - /** - * Disconnect the user from WP.com, and initiate the reconnect process. - * - * @return bool - */ - public function refresh_user_token() { - ( new Tracking() )->record_user_event( 'restore_connection_refresh_user_token' ); - $this->disconnect_user( null, true, true ); - return true; - } - - /** - * Fetches a signed token. - * - * @deprecated 1.24.0 Use Automattic\Jetpack\Connection\Tokens->get_signed_token() instead. - * - * @param object $token the token. - * @return WP_Error|string a signed token - */ - public function get_signed_token( $token ) { - _deprecated_function( __METHOD__, '1.24.0', 'Automattic\\Jetpack\\Connection\\Tokens->get_signed_token' ); - return $this->get_tokens()->get_signed_token( $token ); - } - - /** - * If the site-level connection is active, add the list of plugins using connection to the heartbeat (except Jetpack itself) - * - * @param array $stats The Heartbeat stats array. - * @return array $stats - */ - public function add_stats_to_heartbeat( $stats ) { - - if ( ! $this->is_connected() ) { - return $stats; - } - - $active_plugins_using_connection = Plugin_Storage::get_all(); - foreach ( array_keys( $active_plugins_using_connection ) as $plugin_slug ) { - if ( 'jetpack' !== $plugin_slug ) { - $stats_group = isset( $active_plugins_using_connection['jetpack'] ) ? 'combined-connection' : 'standalone-connection'; - $stats[ $stats_group ][] = $plugin_slug; - } - } - return $stats; - } - - /** - * Get the WPCOM or self-hosted site ID. - * - * @param bool $quiet Return null instead of an error. - * - * @return int|WP_Error|null - */ - public static function get_site_id( $quiet = false ) { - $is_wpcom = ( defined( 'IS_WPCOM' ) && IS_WPCOM ); - $site_id = $is_wpcom ? get_current_blog_id() : \Jetpack_Options::get_option( 'id' ); - if ( ! $site_id ) { - return $quiet - ? null - : new \WP_Error( - 'unavailable_site_id', - __( 'Sorry, something is wrong with your Jetpack connection.', 'jetpack-connection' ), - 403 - ); - } - return (int) $site_id; - } - - /** - * Check if Jetpack is ready for uninstall cleanup. - * - * @param string $current_plugin_slug The current plugin's slug. - * - * @return bool - */ - public static function is_ready_for_cleanup( $current_plugin_slug ) { - $active_plugins = get_option( Plugin_Storage::ACTIVE_PLUGINS_OPTION_NAME ); - - return empty( $active_plugins ) || ! is_array( $active_plugins ) - || ( count( $active_plugins ) === 1 && array_key_exists( $current_plugin_slug, $active_plugins ) ); - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-connection/src/class-nonce-handler.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-connection/src/class-nonce-handler.php deleted file mode 100644 index 48e14a15..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-connection/src/class-nonce-handler.php +++ /dev/null @@ -1,212 +0,0 @@ -db = $wpdb; - } - - /** - * Scheduling the WP-cron cleanup event. - */ - public function init_schedule() { - add_action( 'jetpack_clean_nonces', array( __CLASS__, 'clean_scheduled' ) ); - if ( ! wp_next_scheduled( 'jetpack_clean_nonces' ) ) { - wp_schedule_event( time(), 'hourly', 'jetpack_clean_nonces' ); - } - } - - /** - * Reschedule the WP-cron cleanup event to make it start sooner. - */ - public function reschedule() { - wp_clear_scheduled_hook( 'jetpack_clean_nonces' ); - wp_schedule_event( time(), 'hourly', 'jetpack_clean_nonces' ); - } - - /** - * Adds a used nonce to a list of known nonces. - * - * @param int $timestamp the current request timestamp. - * @param string $nonce the nonce value. - * - * @return bool whether the nonce is unique or not. - */ - public function add( $timestamp, $nonce ) { - if ( isset( static::$nonces_used_this_request[ "$timestamp:$nonce" ] ) ) { - return static::$nonces_used_this_request[ "$timestamp:$nonce" ]; - } - - // This should always have gone through Jetpack_Signature::sign_request() first to check $timestamp and $nonce. - $timestamp = (int) $timestamp; - $nonce = esc_sql( $nonce ); - - // Raw query so we can avoid races: add_option will also update. - $show_errors = $this->db->hide_errors(); - - // Running `try...finally` to make sure that we re-enable errors in case of an exception. - try { - $old_nonce = $this->db->get_row( - $this->db->prepare( "SELECT 1 FROM `{$this->db->options}` WHERE option_name = %s", "jetpack_nonce_{$timestamp}_{$nonce}" ) - ); - - if ( $old_nonce === null ) { - $return = (bool) $this->db->query( - $this->db->prepare( - "INSERT INTO `{$this->db->options}` (`option_name`, `option_value`, `autoload`) VALUES (%s, %s, %s)", - "jetpack_nonce_{$timestamp}_{$nonce}", - time(), - 'no' - ) - ); - } else { - $return = false; - } - } finally { - $this->db->show_errors( $show_errors ); - } - - static::$nonces_used_this_request[ "$timestamp:$nonce" ] = $return; - - return $return; - } - - /** - * Removing all existing nonces, or at least as many as possible. - * Capped at 20 seconds to avoid breaking the site. - * - * @param int $cutoff_timestamp All nonces added before this timestamp will be removed. - * @param int $time_limit How long the cleanup can run (in seconds). - * - * @return true - */ - public function clean_all( $cutoff_timestamp = PHP_INT_MAX, $time_limit = 20 ) { - // phpcs:ignore Generic.CodeAnalysis.ForLoopWithTestFunctionCall.NotAllowed - for ( $end_time = time() + $time_limit; time() < $end_time; ) { - $result = $this->delete( static::CLEAN_ALL_LIMIT_PER_BATCH, $cutoff_timestamp ); - - if ( ! $result ) { - break; - } - } - - return true; - } - - /** - * Scheduled clean up of the expired nonces. - */ - public static function clean_scheduled() { - /** - * Adjust the time limit for the scheduled cleanup. - * - * @since 9.5.0 - * - * @param int $time_limit How long the cleanup can run (in seconds). - */ - $time_limit = apply_filters( 'jetpack_connection_nonce_cleanup_runtime_limit', static::SCHEDULED_CLEANUP_TIME_LIMIT ); - - ( new static() )->clean_all( time() - static::LIFETIME, $time_limit ); - } - - /** - * Delete the nonces. - * - * @param int $limit How many nonces to delete. - * @param null|int $cutoff_timestamp All nonces added before this timestamp will be removed. - * - * @return int|false Number of removed nonces, or `false` if nothing to remove (or in case of a database error). - */ - public function delete( $limit = 10, $cutoff_timestamp = null ) { - global $wpdb; - - $ids = $wpdb->get_col( - $wpdb->prepare( - "SELECT option_id FROM `{$wpdb->options}`" - . " WHERE `option_name` >= 'jetpack_nonce_' AND `option_name` < %s" - . ' LIMIT %d', - 'jetpack_nonce_' . $cutoff_timestamp, - $limit - ) - ); - - if ( ! is_array( $ids ) ) { - // There's an error and we can't proceed. - return false; - } - - // Removing zeroes in case AUTO_INCREMENT of the options table is broken, and all ID's are zeroes. - $ids = array_filter( $ids ); - - if ( array() === $ids ) { - // There's nothing to remove. - return false; - } - - $ids_fill = implode( ', ', array_fill( 0, count( $ids ), '%d' ) ); - - $args = $ids; - $args[] = 'jetpack_nonce_%'; - - // The Code Sniffer is unable to understand what's going on... - // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared,WordPress.DB.PreparedSQLPlaceholders.ReplacementsWrongNumber - return $wpdb->query( $wpdb->prepare( "DELETE FROM `{$wpdb->options}` WHERE `option_id` IN ( {$ids_fill} ) AND option_name LIKE %s", $args ) ); - } - - /** - * Clean the cached nonces valid during the current request, therefore making them invalid. - * - * @return bool - */ - public static function invalidate_request_nonces() { - static::$nonces_used_this_request = array(); - - return true; - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-connection/src/class-package-version-tracker.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-connection/src/class-package-version-tracker.php deleted file mode 100644 index 2d1b3743..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-connection/src/class-package-version-tracker.php +++ /dev/null @@ -1,176 +0,0 @@ -is_rate_limiting() ) { - return; - } - - /** - * Obtains the package versions. - * - * @since 1.30.2 - * - * @param array An associative array of Jetpack package slugs and their corresponding versions as key/value pairs. - */ - $filter_versions = apply_filters( 'jetpack_package_versions', array() ); - - if ( ! is_array( $filter_versions ) ) { - return; - } - - $option_versions = get_option( self::PACKAGE_VERSION_OPTION, array() ); - - foreach ( $filter_versions as $package => $version ) { - if ( ! is_string( $package ) || ! is_string( $version ) ) { - unset( $filter_versions[ $package ] ); - } - } - - if ( ! is_array( $option_versions ) - || count( array_diff_assoc( $filter_versions, $option_versions ) ) - || count( array_diff_assoc( $option_versions, $filter_versions ) ) - ) { - $this->update_package_versions_option( $filter_versions ); - } - } - - /** - * Updates the package versions option. - * - * @param array $package_versions The package versions. - */ - protected function update_package_versions_option( $package_versions ) { - if ( ! $this->is_sync_enabled() ) { - $this->update_package_versions_via_remote_request( $package_versions ); - return; - } - - update_option( self::PACKAGE_VERSION_OPTION, $package_versions ); - } - - /** - * Whether Jetpack Sync is enabled. - * - * @return boolean true if Sync is present and enabled, false otherwise - */ - protected function is_sync_enabled() { - if ( class_exists( 'Automattic\Jetpack\Sync\Settings' ) && \Automattic\Jetpack\Sync\Settings::is_sync_enabled() ) { - - return true; - } - - return false; - } - - /** - * Fallback for updating the package versions via a remote request when Sync is not present. - * - * Updates the package versions as follows: - * - Sends the updated package versions to wpcom. - * - Updates the 'jetpack_package_versions' option. - * - * @param array $package_versions The package versions. - */ - protected function update_package_versions_via_remote_request( $package_versions ) { - $connection = new Manager(); - if ( ! $connection->is_connected() ) { - return; - } - - $site_id = \Jetpack_Options::get_option( 'id' ); - - $last_failed_attempt_within_hour = get_transient( self::CACHED_FAILED_REQUEST_KEY ); - - if ( $last_failed_attempt_within_hour ) { - return; - } - - $body = wp_json_encode( - array( - 'package_versions' => $package_versions, - ) - ); - - $response = Client::wpcom_json_api_request_as_blog( - sprintf( '/sites/%d/jetpack-package-versions', $site_id ), - '2', - array( - 'headers' => array( 'content-type' => 'application/json' ), - 'method' => 'POST', - ), - $body, - 'wpcom' - ); - - if ( 200 === wp_remote_retrieve_response_code( $response ) ) { - update_option( self::PACKAGE_VERSION_OPTION, $package_versions ); - } else { - set_transient( self::CACHED_FAILED_REQUEST_KEY, time(), self::CACHED_FAILED_REQUEST_EXPIRATION ); - } - } - - /** - * Check if version check is being rate limited, and update the rate limiting transient if needed. - * - * @return bool - */ - private function is_rate_limiting() { - if ( get_transient( static::RATE_LIMITER_KEY ) ) { - return true; - } - - set_transient( static::RATE_LIMITER_KEY, time(), static::RATE_LIMITER_TIMEOUT ); - - return false; - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-connection/src/class-package-version.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-connection/src/class-package-version.php deleted file mode 100644 index 13dcb4a1..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-connection/src/class-package-version.php +++ /dev/null @@ -1,30 +0,0 @@ - array( - 'name' => 'IONOS', - 'logo' => array( - 'src' => '/images/ionos-logo.jpg', - 'width' => 119, - 'height' => 32, - ), - ), - ); - - /** - * A list of supported presets. - * - * @var array - */ - private static $supported_presets = array( - 'IONA' => 'jetpack_backup_daily', - ); - - /** - * Get singleton instance of class. - * - * @return Partner_Coupon - */ - public static function get_instance() { - if ( self::$instance === null ) { - self::$instance = new Partner_Coupon( array( Connection_Client::class, 'wpcom_json_api_request_as_blog' ) ); - } - - return self::$instance; - } - - /** - * Constructor. - * - * @param callable $request_as_blog Callable that executes a blog-authenticated request. - */ - public function __construct( $request_as_blog ) { - $this->request_as_blog = $request_as_blog; - } - - /** - * Register hooks to catch and purge coupon. - * - * @param string $plugin_slug The plugin slug to differentiate between Jetpack connections. - * @param string $redirect_location The location we should redirect to after catching the coupon. - */ - public static function register_coupon_admin_hooks( $plugin_slug, $redirect_location ) { - $instance = self::get_instance(); - - // We have to use an anonymous function, so we can pass along relevant information - // and not have to hardcode values for a single plugin. - // This open up the opportunity for e.g. the "all-in-one" and backup plugins - // to both implement partner coupon logic. - add_action( - 'admin_init', - function () use ( $plugin_slug, $redirect_location, $instance ) { - $instance->catch_coupon( $plugin_slug, $redirect_location ); - $instance->maybe_purge_coupon( $plugin_slug ); - } - ); - } - - /** - * Catch partner coupon and redirect to claim component. - * - * @param string $plugin_slug The plugin slug to differentiate between Jetpack connections. - * @param string $redirect_location The location we should redirect to after catching the coupon. - */ - public function catch_coupon( $plugin_slug, $redirect_location ) { - // Accept and store a partner coupon if present, and redirect to Jetpack connection screen. - $partner_coupon = isset( $_GET['jetpack-partner-coupon'] ) ? sanitize_text_field( wp_unslash( $_GET['jetpack-partner-coupon'] ) ) : false; // phpcs:ignore WordPress.Security.NonceVerification.Recommended - if ( $partner_coupon ) { - Jetpack_Options::update_options( - array( - self::$coupon_option => $partner_coupon, - self::$added_option => time(), - ) - ); - - $connection = new Connection_Manager( $plugin_slug ); - if ( $connection->is_connected() ) { - $redirect_location = add_query_arg( array( 'showCouponRedemption' => 1 ), $redirect_location ); - wp_safe_redirect( $redirect_location ); - } else { - wp_safe_redirect( $redirect_location ); - } - } - } - - /** - * Purge partner coupon. - * - * We try to remotely check if a coupon looks valid. We also automatically purge - * partner coupons after a certain amount of time to prevent unnecessary look-ups - * and/or promoting a product for months or years in the future due to unknown - * errors. - * - * @param string $plugin_slug The plugin slug to differentiate between Jetpack connections. - */ - public function maybe_purge_coupon( $plugin_slug ) { - // Only run coupon checks on Jetpack admin pages. - // The "admin-ui" package is responsible for registering the Jetpack admin - // page for all Jetpack plugins and has hardcoded the settings page to be - // "jetpack", so we shouldn't need to allow for dynamic/custom values. - // phpcs:ignore WordPress.Security.NonceVerification.Recommended - if ( ! isset( $_GET['page'] ) || 'jetpack' !== $_GET['page'] ) { - return; - } - - if ( ( new Status() )->is_offline_mode() ) { - return; - } - - $connection = new Connection_Manager( $plugin_slug ); - if ( ! $connection->is_connected() ) { - return; - } - - if ( $this->maybe_purge_coupon_by_added_date() ) { - return; - } - - // Limit checks to happen once a minute at most. - if ( get_transient( self::$last_check_transient ) ) { - return; - } - - set_transient( self::$last_check_transient, true, MINUTE_IN_SECONDS ); - - $this->maybe_purge_coupon_by_availability_check(); - } - - /** - * Purge coupon based on local added date. - * - * We automatically remove the coupon after a month to "self-heal" if - * something in the claim process has broken with the site. - * - * @return bool Return whether we should skip further purge checks. - */ - protected function maybe_purge_coupon_by_added_date() { - $date = Jetpack_Options::get_option( self::$added_option, '' ); - - if ( empty( $date ) ) { - return true; - } - - $expire_date = strtotime( '+30 days', $date ); - $today = time(); - - if ( $today >= $expire_date ) { - $this->delete_coupon_data(); - - return true; - } - - return false; - } - - /** - * Purge coupon based on availability check. - * - * @return bool Return whether we deleted coupon data. - */ - protected function maybe_purge_coupon_by_availability_check() { - $blog_id = Jetpack_Options::get_option( 'id', false ); - - if ( ! $blog_id ) { - return false; - } - - $coupon = self::get_coupon(); - - if ( ! $coupon ) { - return false; - } - - $response = call_user_func_array( - $this->request_as_blog, - array( - add_query_arg( - array( 'coupon_code' => $coupon['coupon_code'] ), - sprintf( - '/sites/%d/jetpack-partner/coupon/v1/site/coupon', - $blog_id - ) - ), - 2, - array( 'method' => 'GET' ), - null, - 'wpcom', - ) - ); - - $body = json_decode( wp_remote_retrieve_body( $response ), true ); - - if ( - 200 === wp_remote_retrieve_response_code( $response ) && - is_array( $body ) && - isset( $body['available'] ) && - false === $body['available'] - ) { - $this->delete_coupon_data(); - - return true; - } - - return false; - } - - /** - * Delete all coupon data. - */ - protected function delete_coupon_data() { - Jetpack_Options::delete_option( - array( - self::$coupon_option, - self::$added_option, - ) - ); - } - - /** - * Get partner coupon data. - * - * @return array|bool - */ - public static function get_coupon() { - $coupon_code = Jetpack_Options::get_option( self::$coupon_option, '' ); - - if ( ! is_string( $coupon_code ) || empty( $coupon_code ) ) { - return false; - } - - $instance = self::get_instance(); - $partner = $instance->get_coupon_partner( $coupon_code ); - - if ( ! $partner ) { - return false; - } - - $preset = $instance->get_coupon_preset( $coupon_code ); - - if ( ! $preset ) { - return false; - } - - $product = $instance->get_coupon_product( $preset ); - - if ( ! $product ) { - return false; - } - - return array( - 'coupon_code' => $coupon_code, - 'partner' => $partner, - 'preset' => $preset, - 'product' => $product, - ); - } - - /** - * Get coupon partner. - * - * @param string $coupon_code Coupon code to go through. - * @return array|bool - */ - private function get_coupon_partner( $coupon_code ) { - if ( ! is_string( $coupon_code ) || false === strpos( $coupon_code, '_' ) ) { - return false; - } - - $prefix = strtok( $coupon_code, '_' ); - $supported_partners = $this->get_supported_partners(); - - if ( ! isset( $supported_partners[ $prefix ] ) ) { - return false; - } - - return array( - 'name' => $supported_partners[ $prefix ]['name'], - 'prefix' => $prefix, - 'logo' => isset( $supported_partners[ $prefix ]['logo'] ) ? $supported_partners[ $prefix ]['logo'] : null, - ); - } - - /** - * Get coupon product. - * - * @param string $coupon_preset The preset we wish to find a product for. - * @return array|bool - */ - private function get_coupon_product( $coupon_preset ) { - if ( ! is_string( $coupon_preset ) ) { - return false; - } - - /** - * Allow for plugins to register supported products. - * - * @since 1.6.0 - * - * @param array A list of product details. - * @return array - */ - $product_details = apply_filters( 'jetpack_partner_coupon_products', array() ); - $product_slug = $this->get_supported_presets()[ $coupon_preset ]; - - foreach ( $product_details as $product ) { - if ( ! $this->array_keys_exist( array( 'title', 'slug', 'description', 'features' ), $product ) ) { - continue; - } - - if ( $product_slug === $product['slug'] ) { - return $product; - } - } - - return false; - } - - /** - * Checks if multiple keys are present in an array. - * - * @param array $needles The keys we wish to check for. - * @param array $haystack The array we want to compare keys against. - * - * @return bool - */ - private function array_keys_exist( $needles, $haystack ) { - foreach ( $needles as $needle ) { - if ( ! isset( $haystack[ $needle ] ) ) { - return false; - } - } - - return true; - } - - /** - * Get coupon preset. - * - * @param string $coupon_code Coupon code to go through. - * @return string|bool - */ - private function get_coupon_preset( $coupon_code ) { - if ( ! is_string( $coupon_code ) ) { - return false; - } - - $regex = '/^.*?_(?P.*?)_.+$/'; - $matches = array(); - - if ( ! preg_match( $regex, $coupon_code, $matches ) ) { - return false; - } - - return isset( $this->get_supported_presets()[ $matches['slug'] ] ) ? $matches['slug'] : false; - } - - /** - * Get supported partners. - * - * @return array - */ - private function get_supported_partners() { - /** - * Allow external code to add additional supported partners. - * - * @since partner-1.6.0 - * @since 2.0.0 - * - * @param array $supported_partners A list of supported partners. - * @return array - */ - return apply_filters( 'jetpack_partner_coupon_supported_partners', self::$supported_partners ); - } - - /** - * Get supported presets. - * - * @return array - */ - private function get_supported_presets() { - /** - * Allow external code to add additional supported presets. - * - * @since partner-1.6.0 - * @since 2.0.0 - * - * @param array $supported_presets A list of supported presets. - * @return array - */ - return apply_filters( 'jetpack_partner_coupon_supported_presets', self::$supported_presets ); - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-connection/src/class-partner.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-connection/src/class-partner.php deleted file mode 100644 index cfb7bb7e..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-connection/src/class-partner.php +++ /dev/null @@ -1,215 +0,0 @@ -add_code_as_query_arg( self::SUBSIDIARY_CODE, $url ); - } - - /** - * Adds the affiliate code to the passed URL. - * - * @param string $url The URL. - * - * @return string - */ - public function add_affiliate_code_as_query_arg( $url ) { - return $this->add_code_as_query_arg( self::AFFILIATE_CODE, $url ); - } - - /** - * Adds the partner subsidiary code to the passed array. - * - * @since partner-1.5.0 - * @since 2.0.0 - * - * @param array $params The parameters array. - * - * @return array - */ - public function add_subsidiary_id_to_params_array( $params ) { - if ( ! is_array( $params ) ) { - return $params; - } - return array_merge( $params, $this->get_code_as_array( self::SUBSIDIARY_CODE ) ); - } - - /** - * Adds the affiliate code to the passed array. - * - * @since partner-1.5.0 - * @since 2.0.0 - * - * @param array $params The parameters array. - * - * @return array - */ - public function add_affiliate_code_to_params_array( $params ) { - if ( ! is_array( $params ) ) { - return $params; - } - return array_merge( $params, $this->get_code_as_array( self::AFFILIATE_CODE ) ); - } - - /** - * Returns the passed URL with the partner code added as a URL query arg. - * - * @since partner-1.0.0 - * @since 2.0.0 - * - * @param string $type The partner code. - * @param string $url The URL where the partner subsidiary id will be added. - * - * @return string The passed URL with the partner code added. - */ - public function add_code_as_query_arg( $type, $url ) { - return add_query_arg( $this->get_code_as_array( $type ), $url ); - } - - /** - * Gets the partner code in an associative array format - * - * @since partner-1.5.0 - * @since 2.0.0 - * - * @param string $type The partner code. - * @return array - */ - private function get_code_as_array( $type ) { - switch ( $type ) { - case self::AFFILIATE_CODE: - $query_arg_name = 'aff'; - break; - case self::SUBSIDIARY_CODE: - $query_arg_name = 'subsidiaryId'; - break; - default: - return array(); - } - - $code = $this->get_partner_code( $type ); - - if ( '' === $code ) { - return array(); - } - - return array( $query_arg_name => $code ); - } - - /** - * Returns a partner code. - * - * @since partner-1.0.0 - * @since 2.0.0 - * - * @param string $type This can be either 'affiliate' or 'subsidiary'. Returns empty string when code is unknown. - * - * @return string The partner code. - */ - public function get_partner_code( $type ) { - switch ( $type ) { - case self::AFFILIATE_CODE: - /** - * Allow to filter the affiliate code. - * - * @since partner-1.0.0 - * @since-jetpack 6.9.0 - * @since 2.0.0 - * - * @param string $affiliate_code The affiliate code, blank by default. - */ - return apply_filters( 'jetpack_affiliate_code', get_option( 'jetpack_affiliate_code', '' ) ); - case self::SUBSIDIARY_CODE: - /** - * Allow to filter the partner subsidiary id. - * - * @since partner-1.0.0 - * @since 2.0.0 - * - * @param string $subsidiary_id The partner subsidiary id, blank by default. - */ - return apply_filters( - 'jetpack_partner_subsidiary_id', - get_option( 'jetpack_partner_subsidiary_id', '' ) - ); - default: - return ''; - } - } - - /** - * Resets the singleton for testing purposes. - */ - public static function reset() { - self::$instance = null; - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-connection/src/class-plugin-storage.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-connection/src/class-plugin-storage.php deleted file mode 100644 index db4f0b17..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-connection/src/class-plugin-storage.php +++ /dev/null @@ -1,268 +0,0 @@ -is_connected() ) { - return; - } - - $site_id = \Jetpack_Options::get_option( 'id' ); - - $body = wp_json_encode( - array( - 'active_connected_plugins' => self::$plugins, - ) - ); - - Client::wpcom_json_api_request_as_blog( - sprintf( '/sites/%d/jetpack-active-connected-plugins', $site_id ), - '2', - array( - 'headers' => array( 'content-type' => 'application/json' ), - 'method' => 'POST', - ), - $body, - 'wpcom' - ); - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-connection/src/class-plugin.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-connection/src/class-plugin.php deleted file mode 100644 index 10b5c7b9..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-connection/src/class-plugin.php +++ /dev/null @@ -1,122 +0,0 @@ -slug = $slug; - } - - /** - * Get the plugin slug. - * - * @return string - */ - public function get_slug() { - return $this->slug; - } - - /** - * Add the plugin connection info into Jetpack. - * - * @param string $name Plugin name, required. - * @param array $args Plugin arguments, optional. - * - * @return $this - * @see $this->arguments_whitelist - */ - public function add( $name, array $args = array() ) { - $args = compact( 'name' ) + array_intersect_key( $args, array_flip( $this->arguments_whitelist ) ); - - Plugin_Storage::upsert( $this->slug, $args ); - - return $this; - } - - /** - * Remove the plugin connection info from Jetpack. - * - * @return $this - */ - public function remove() { - Plugin_Storage::delete( $this->slug ); - - return $this; - } - - /** - * Determine if this plugin connection is the only one active at the moment, if any. - * - * @return bool - */ - public function is_only() { - $plugins = Plugin_Storage::get_all(); - - return ! $plugins || ( array_key_exists( $this->slug, $plugins ) && 1 === count( $plugins ) ); - } - - /** - * Add the plugin to the set of disconnected ones. - * - * @deprecated since 1.39.0. - * - * @return bool - */ - public function disable() { - return true; - } - - /** - * Remove the plugin from the set of disconnected ones. - * - * @deprecated since 1.39.0. - * - * @return bool - */ - public function enable() { - return true; - } - - /** - * Whether this plugin is allowed to use the connection. - * - * @deprecated since 11.0 - * @return bool - */ - public function is_enabled() { - return true; - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-connection/src/class-rest-authentication.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-connection/src/class-rest-authentication.php deleted file mode 100644 index c5a89f53..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-connection/src/class-rest-authentication.php +++ /dev/null @@ -1,220 +0,0 @@ -connection_manager = new Manager(); - } - - /** - * Controls the single instance of this class. - * - * @static - */ - public static function init() { - if ( ! self::$instance ) { - self::$instance = new self(); - - add_filter( 'determine_current_user', array( self::$instance, 'wp_rest_authenticate' ) ); - add_filter( 'rest_authentication_errors', array( self::$instance, 'wp_rest_authentication_errors' ) ); - } - - return self::$instance; - } - - /** - * Authenticates requests from Jetpack server to WP REST API endpoints. - * Uses the existing XMLRPC request signing implementation. - * - * @param int|bool $user User ID if one has been determined, false otherwise. - * - * @return int|null The user id or null if the request was authenticated via blog token, or not authenticated at all. - */ - public function wp_rest_authenticate( $user ) { - if ( $this->doing_determine_current_user_filter ) { - return $user; - } - - $this->doing_determine_current_user_filter = true; - - try { - if ( ! empty( $user ) ) { - // Another authentication method is in effect. - return $user; - } - - add_filter( - 'jetpack_constant_default_value', - __NAMESPACE__ . '\Utils::jetpack_api_constant_filter', - 10, - 2 - ); - - // phpcs:ignore WordPress.Security.NonceVerification.Recommended - if ( ! isset( $_GET['_for'] ) || 'jetpack' !== $_GET['_for'] ) { - // Nothing to do for this authentication method. - return null; - } - - // phpcs:ignore WordPress.Security.NonceVerification.Recommended - if ( ! isset( $_GET['token'] ) && ! isset( $_GET['signature'] ) ) { - // Nothing to do for this authentication method. - return null; - } - - if ( ! isset( $_SERVER['REQUEST_METHOD'] ) ) { - $this->rest_authentication_status = new \WP_Error( - 'rest_invalid_request', - __( 'The request method is missing.', 'jetpack-connection' ), - array( 'status' => 400 ) - ); - return null; - } - - // Only support specific request parameters that have been tested and - // are known to work with signature verification. A different method - // can be passed to the WP REST API via the '?_method=' parameter if - // needed. - if ( 'GET' !== $_SERVER['REQUEST_METHOD'] && 'POST' !== $_SERVER['REQUEST_METHOD'] ) { - $this->rest_authentication_status = new \WP_Error( - 'rest_invalid_request', - __( 'This request method is not supported.', 'jetpack-connection' ), - array( 'status' => 400 ) - ); - return null; - } - if ( 'POST' !== $_SERVER['REQUEST_METHOD'] && ! empty( file_get_contents( 'php://input' ) ) ) { - $this->rest_authentication_status = new \WP_Error( - 'rest_invalid_request', - __( 'This request method does not support body parameters.', 'jetpack-connection' ), - array( 'status' => 400 ) - ); - return null; - } - - $verified = $this->connection_manager->verify_xml_rpc_signature(); - - if ( - $verified && - isset( $verified['type'] ) && - 'blog' === $verified['type'] - ) { - // Site-level authentication successful. - $this->rest_authentication_status = true; - $this->rest_authentication_type = 'blog'; - return null; - } - - if ( - $verified && - isset( $verified['type'] ) && - 'user' === $verified['type'] && - ! empty( $verified['user_id'] ) - ) { - // User-level authentication successful. - $this->rest_authentication_status = true; - $this->rest_authentication_type = 'user'; - return $verified['user_id']; - } - - // Something else went wrong. Probably a signature error. - $this->rest_authentication_status = new \WP_Error( - 'rest_invalid_signature', - __( 'The request is not signed correctly.', 'jetpack-connection' ), - array( 'status' => 400 ) - ); - return null; - } finally { - $this->doing_determine_current_user_filter = false; - } - } - - /** - * Report authentication status to the WP REST API. - * - * @param WP_Error|mixed $value Error from another authentication handler, null if we should handle it, or another value if not. - * @return WP_Error|boolean|null {@see WP_JSON_Server::check_authentication} - */ - public function wp_rest_authentication_errors( $value ) { - if ( null !== $value ) { - return $value; - } - return $this->rest_authentication_status; - } - - /** - * Resets the saved authentication state in between testing requests. - */ - public function reset_saved_auth_state() { - $this->rest_authentication_status = null; - $this->connection_manager->reset_saved_auth_state(); - } - - /** - * Whether the request was signed with a blog token. - * - * @since 1.29.0 - * - * @return bool True if the request was signed with a valid blog token, false otherwise. - */ - public static function is_signed_with_blog_token() { - $instance = self::init(); - - return true === $instance->rest_authentication_status && 'blog' === $instance->rest_authentication_type; - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-connection/src/class-rest-connector.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-connection/src/class-rest-connector.php deleted file mode 100644 index ae9fc2d3..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-connection/src/class-rest-connector.php +++ /dev/null @@ -1,937 +0,0 @@ -connection = $connection; - - self::$user_permissions_error_msg = esc_html__( - 'You do not have the correct user permissions to perform this action. - Please contact your site admin if you think this is a mistake.', - 'jetpack-connection' - ); - - $jp_version = Constants::get_constant( 'JETPACK__VERSION' ); - - if ( ! $this->connection->has_connected_owner() ) { - // Register a site. - register_rest_route( - 'jetpack/v4', - '/verify_registration', - array( - 'methods' => WP_REST_Server::EDITABLE, - 'callback' => array( $this, 'verify_registration' ), - 'permission_callback' => '__return_true', - ) - ); - } - - // Authorize a remote user. - register_rest_route( - 'jetpack/v4', - '/remote_authorize', - array( - 'methods' => WP_REST_Server::EDITABLE, - 'callback' => __CLASS__ . '::remote_authorize', - 'permission_callback' => '__return_true', - ) - ); - - // Authorize a remote user. - register_rest_route( - 'jetpack/v4', - '/remote_provision', - array( - 'methods' => WP_REST_Server::EDITABLE, - 'callback' => array( $this, 'remote_provision' ), - 'permission_callback' => array( $this, 'remote_provision_permission_check' ), - ) - ); - - register_rest_route( - 'jetpack/v4', - '/remote_register', - array( - 'methods' => WP_REST_Server::EDITABLE, - 'callback' => array( $this, 'remote_register' ), - 'permission_callback' => array( $this, 'remote_register_permission_check' ), - ) - ); - - // Get current connection status of Jetpack. - register_rest_route( - 'jetpack/v4', - '/connection', - array( - 'methods' => WP_REST_Server::READABLE, - 'callback' => __CLASS__ . '::connection_status', - 'permission_callback' => '__return_true', - ) - ); - - // Disconnect site. - register_rest_route( - 'jetpack/v4', - '/connection', - array( - 'methods' => WP_REST_Server::EDITABLE, - 'callback' => __CLASS__ . '::disconnect_site', - 'permission_callback' => __CLASS__ . '::disconnect_site_permission_check', - 'args' => array( - 'isActive' => array( - 'description' => __( 'Set to false will trigger the site to disconnect.', 'jetpack-connection' ), - 'validate_callback' => function ( $value ) { - if ( false !== $value ) { - return new WP_Error( - 'rest_invalid_param', - __( 'The isActive argument should be set to false.', 'jetpack-connection' ), - array( 'status' => 400 ) - ); - } - - return true; - }, - 'required' => true, - ), - ), - ) - ); - - // We are only registering this route if Jetpack-the-plugin is not active or it's version is ge 10.0-alpha. - // The reason for doing so is to avoid conflicts between the Connection package and - // older versions of Jetpack, registering the same route twice. - if ( empty( $jp_version ) || version_compare( $jp_version, '10.0-alpha', '>=' ) ) { - // Get current user connection data. - register_rest_route( - 'jetpack/v4', - '/connection/data', - array( - 'methods' => WP_REST_Server::READABLE, - 'callback' => __CLASS__ . '::get_user_connection_data', - 'permission_callback' => __CLASS__ . '::user_connection_data_permission_check', - ) - ); - } - - // Get list of plugins that use the Jetpack connection. - register_rest_route( - 'jetpack/v4', - '/connection/plugins', - array( - 'methods' => WP_REST_Server::READABLE, - 'callback' => array( __CLASS__, 'get_connection_plugins' ), - 'permission_callback' => __CLASS__ . '::connection_plugins_permission_check', - ) - ); - - // Full or partial reconnect in case of connection issues. - register_rest_route( - 'jetpack/v4', - '/connection/reconnect', - array( - 'methods' => WP_REST_Server::EDITABLE, - 'callback' => array( $this, 'connection_reconnect' ), - 'permission_callback' => __CLASS__ . '::jetpack_reconnect_permission_check', - ) - ); - - // Register the site (get `blog_token`). - register_rest_route( - 'jetpack/v4', - '/connection/register', - array( - 'methods' => WP_REST_Server::EDITABLE, - 'callback' => array( $this, 'connection_register' ), - 'permission_callback' => __CLASS__ . '::jetpack_register_permission_check', - 'args' => array( - 'from' => array( - 'description' => __( 'Indicates where the registration action was triggered for tracking/segmentation purposes', 'jetpack-connection' ), - 'type' => 'string', - ), - 'registration_nonce' => array( - 'description' => __( 'The registration nonce', 'jetpack-connection' ), - 'type' => 'string', - 'required' => true, - ), - 'redirect_uri' => array( - 'description' => __( 'URI of the admin page where the user should be redirected after connection flow', 'jetpack-connection' ), - 'type' => 'string', - ), - 'plugin_slug' => array( - 'description' => __( 'Indicates from what plugin the request is coming from', 'jetpack-connection' ), - 'type' => 'string', - ), - ), - ) - ); - - // Get authorization URL. - register_rest_route( - 'jetpack/v4', - '/connection/authorize_url', - array( - 'methods' => WP_REST_Server::READABLE, - 'callback' => array( $this, 'connection_authorize_url' ), - 'permission_callback' => __CLASS__ . '::user_connection_data_permission_check', - 'args' => array( - 'redirect_uri' => array( - 'description' => __( 'URI of the admin page where the user should be redirected after connection flow', 'jetpack-connection' ), - 'type' => 'string', - ), - ), - ) - ); - - register_rest_route( - 'jetpack/v4', - '/user-token', - array( - array( - 'methods' => WP_REST_Server::EDITABLE, - 'callback' => array( static::class, 'update_user_token' ), - 'permission_callback' => array( static::class, 'update_user_token_permission_check' ), - 'args' => array( - 'user_token' => array( - 'description' => __( 'New user token', 'jetpack-connection' ), - 'type' => 'string', - 'required' => true, - ), - 'is_connection_owner' => array( - 'description' => __( 'Is connection owner', 'jetpack-connection' ), - 'type' => 'boolean', - ), - ), - ), - ) - ); - - // Set the connection owner. - register_rest_route( - 'jetpack/v4', - '/connection/owner', - array( - 'methods' => WP_REST_Server::EDITABLE, - 'callback' => array( static::class, 'set_connection_owner' ), - 'permission_callback' => array( static::class, 'set_connection_owner_permission_check' ), - 'args' => array( - 'owner' => array( - 'description' => __( 'New owner', 'jetpack-connection' ), - 'type' => 'integer', - 'required' => true, - ), - ), - ) - ); - } - - /** - * Handles verification that a site is registered. - * - * @since 1.7.0 - * @since-jetpack 5.4.0 - * - * @param WP_REST_Request $request The request sent to the WP REST API. - * - * @return string|WP_Error - */ - public function verify_registration( WP_REST_Request $request ) { - $registration_data = array( $request['secret_1'], $request['state'] ); - - return $this->connection->handle_registration( $registration_data ); - } - - /** - * Handles verification that a site is registered - * - * @since 1.7.0 - * @since-jetpack 5.4.0 - * - * @param WP_REST_Request $request The request sent to the WP REST API. - * - * @return array|wp-error - */ - public static function remote_authorize( $request ) { - $xmlrpc_server = new Jetpack_XMLRPC_Server(); - $result = $xmlrpc_server->remote_authorize( $request ); - - if ( is_a( $result, 'IXR_Error' ) ) { - $result = new WP_Error( $result->code, $result->message ); - } - - return $result; - } - - /** - * Initiate the site provisioning process. - * - * @since 2.5.0 - * - * @param WP_REST_Request $request The request sent to the WP REST API. - * - * @return WP_Error|array - */ - public static function remote_provision( WP_REST_Request $request ) { - $xmlrpc_server = new Jetpack_XMLRPC_Server(); - $result = $xmlrpc_server->remote_provision( $request ); - - if ( is_a( $result, 'IXR_Error' ) ) { - $result = new WP_Error( $result->code, $result->message ); - } - - return $result; - } - - /** - * Register the site so that a plan can be provisioned. - * - * @since 2.5.0 - * - * @param WP_REST_Request $request The request object. - * - * @return WP_Error|array - */ - public function remote_register( WP_REST_Request $request ) { - $xmlrpc_server = new Jetpack_XMLRPC_Server(); - $result = $xmlrpc_server->remote_register( $request ); - - if ( is_a( $result, 'IXR_Error' ) ) { - $result = new WP_Error( $result->code, $result->message ); - } - - return $result; - } - - /** - * Remote provision endpoint permission check. - * - * @return true|WP_Error - */ - public function remote_provision_permission_check() { - return Rest_Authentication::is_signed_with_blog_token() - ? true - : new WP_Error( 'invalid_permission_remote_provision', self::get_user_permissions_error_msg(), array( 'status' => rest_authorization_required_code() ) ); - } - - /** - * Remote register endpoint permission check. - * - * @return true|WP_Error - */ - public function remote_register_permission_check() { - if ( $this->connection->has_connected_owner() ) { - return Rest_Authentication::is_signed_with_blog_token() - ? true - : new WP_Error( 'already_registered', __( 'Blog is already registered', 'jetpack-connection' ), 400 ); - } - - return true; - } - - /** - * Get connection status for this Jetpack site. - * - * @since 1.7.0 - * @since-jetpack 4.3.0 - * - * @param bool $rest_response Should we return a rest response or a simple array. Default to rest response. - * - * @return WP_REST_Response|array Connection information. - */ - public static function connection_status( $rest_response = true ) { - $status = new Status(); - $connection = new Manager(); - - $connection_status = array( - 'isActive' => $connection->has_connected_owner(), // TODO deprecate this. - 'isStaging' => $status->is_staging_site(), - 'isRegistered' => $connection->is_connected(), - 'isUserConnected' => $connection->is_user_connected(), - 'hasConnectedOwner' => $connection->has_connected_owner(), - 'offlineMode' => array( - 'isActive' => $status->is_offline_mode(), - 'constant' => defined( 'JETPACK_DEV_DEBUG' ) && JETPACK_DEV_DEBUG, - 'url' => $status->is_local_site(), - /** This filter is documented in packages/status/src/class-status.php */ - 'filter' => ( apply_filters( 'jetpack_development_mode', false ) || apply_filters( 'jetpack_offline_mode', false ) ), // jetpack_development_mode is deprecated. - 'wpLocalConstant' => defined( 'WP_LOCAL_DEV' ) && WP_LOCAL_DEV, - ), - 'isPublic' => '1' == get_option( 'blog_public' ), // phpcs:ignore Universal.Operators.StrictComparisons.LooseEqual - ); - - /** - * Filters the connection status data. - * - * @since 1.25.0 - * - * @param array An array containing the connection status data. - */ - $connection_status = apply_filters( 'jetpack_connection_status', $connection_status ); - - if ( $rest_response ) { - return rest_ensure_response( - $connection_status - ); - } else { - return $connection_status; - } - } - - /** - * Get plugins connected to the Jetpack. - * - * @param bool $rest_response Should we return a rest response or a simple array. Default to rest response. - * - * @since 1.13.1 - * @since 1.38.0 Added $rest_response param. - * - * @return WP_REST_Response|WP_Error Response or error object, depending on the request result. - */ - public static function get_connection_plugins( $rest_response = true ) { - $plugins = ( new Manager() )->get_connected_plugins(); - - if ( is_wp_error( $plugins ) ) { - return $plugins; - } - - array_walk( - $plugins, - function ( &$data, $slug ) { - $data['slug'] = $slug; - } - ); - - if ( $rest_response ) { - return rest_ensure_response( array_values( $plugins ) ); - } - - return array_values( $plugins ); - } - - /** - * Verify that user can view Jetpack admin page and can activate plugins. - * - * @since 1.15.0 - * - * @return bool|WP_Error Whether user has the capability 'activate_plugins'. - */ - public static function activate_plugins_permission_check() { - if ( current_user_can( 'activate_plugins' ) ) { - return true; - } - - return new WP_Error( 'invalid_user_permission_activate_plugins', self::get_user_permissions_error_msg(), array( 'status' => rest_authorization_required_code() ) ); - } - - /** - * Permission check for the connection_plugins endpoint - * - * @return bool|WP_Error - */ - public static function connection_plugins_permission_check() { - if ( true === static::activate_plugins_permission_check() ) { - return true; - } - - if ( true === static::is_request_signed_by_jetpack_debugger() ) { - return true; - } - - return new WP_Error( 'invalid_user_permission_activate_plugins', self::get_user_permissions_error_msg(), array( 'status' => rest_authorization_required_code() ) ); - } - - /** - * Permission check for the disconnect site endpoint. - * - * @since 1.30.1 - * - * @return bool|WP_Error True if user is able to disconnect the site. - */ - public static function disconnect_site_permission_check() { - if ( current_user_can( 'jetpack_disconnect' ) ) { - return true; - } - - return new WP_Error( - 'invalid_user_permission_jetpack_disconnect', - self::get_user_permissions_error_msg(), - array( 'status' => rest_authorization_required_code() ) - ); - } - - /** - * Get miscellaneous user data related to the connection. Similar data available in old "My Jetpack". - * Information about the master/primary user. - * Information about the current user. - * - * @param bool $rest_response Should we return a rest response or a simple array. Default to rest response. - * - * @since 1.30.1 - * - * @return \WP_REST_Response|array - */ - public static function get_user_connection_data( $rest_response = true ) { - $blog_id = \Jetpack_Options::get_option( 'id' ); - - $connection = new Manager(); - - $current_user = wp_get_current_user(); - $connection_owner = $connection->get_connection_owner(); - - $owner_display_name = false === $connection_owner ? null : $connection_owner->display_name; - - $is_user_connected = $connection->is_user_connected(); - $is_master_user = false === $connection_owner ? false : ( $current_user->ID === $connection_owner->ID ); - $wpcom_user_data = $connection->get_connected_user_data(); - - // Add connected user gravatar to the returned wpcom_user_data. - // Probably we shouldn't do this when $wpcom_user_data is false, but we have been since 2016 so - // clients probably expect that by now. - if ( false === $wpcom_user_data ) { - $wpcom_user_data = array(); - } - $wpcom_user_data['avatar'] = ( ! empty( $wpcom_user_data['email'] ) ? - get_avatar_url( - $wpcom_user_data['email'], - array( - 'size' => 64, - 'default' => 'mysteryman', - ) - ) - : false ); - - $current_user_connection_data = array( - 'isConnected' => $is_user_connected, - 'isMaster' => $is_master_user, - 'username' => $current_user->user_login, - 'id' => $current_user->ID, - 'blogId' => $blog_id, - 'wpcomUser' => $wpcom_user_data, - 'gravatar' => get_avatar_url( $current_user->ID, 64, 'mm', '', array( 'force_display' => true ) ), - 'permissions' => array( - 'connect' => current_user_can( 'jetpack_connect' ), - 'connect_user' => current_user_can( 'jetpack_connect_user' ), - 'disconnect' => current_user_can( 'jetpack_disconnect' ), - ), - ); - - /** - * Filters the current user connection data. - * - * @since 1.30.1 - * - * @param array An array containing the current user connection data. - */ - $current_user_connection_data = apply_filters( 'jetpack_current_user_connection_data', $current_user_connection_data ); - - $response = array( - 'currentUser' => $current_user_connection_data, - 'connectionOwner' => $owner_display_name, - ); - - if ( $rest_response ) { - return rest_ensure_response( $response ); - } - - return $response; - } - - /** - * Permission check for the connection/data endpoint - * - * @return bool|WP_Error - */ - public static function user_connection_data_permission_check() { - if ( current_user_can( 'jetpack_connect_user' ) ) { - return true; - } - - return new WP_Error( - 'invalid_user_permission_user_connection_data', - self::get_user_permissions_error_msg(), - array( 'status' => rest_authorization_required_code() ) - ); - } - - /** - * Verifies if the request was signed with the Jetpack Debugger key - * - * @param string|null $pub_key The public key used to verify the signature. Default is the Jetpack Debugger key. This is used for testing purposes. - * - * @return bool - */ - public static function is_request_signed_by_jetpack_debugger( $pub_key = null ) { - // phpcs:disable WordPress.Security.NonceVerification.Recommended - if ( ! isset( $_GET['signature'] ) || ! isset( $_GET['timestamp'] ) || ! isset( $_GET['url'] ) || ! isset( $_GET['rest_route'] ) ) { - return false; - } - - // signature timestamp must be within 5min of current time. - if ( abs( time() - (int) $_GET['timestamp'] ) > 300 ) { - return false; - } - - $signature = base64_decode( filter_var( wp_unslash( $_GET['signature'] ) ) ); // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.obfuscation_base64_decode - - $signature_data = wp_json_encode( - array( - 'rest_route' => filter_var( wp_unslash( $_GET['rest_route'] ) ), - 'timestamp' => (int) $_GET['timestamp'], - 'url' => filter_var( wp_unslash( $_GET['url'] ) ), - ) - ); - - if ( - ! function_exists( 'openssl_verify' ) - || 1 !== openssl_verify( - $signature_data, - $signature, - $pub_key ? $pub_key : static::JETPACK__DEBUGGER_PUBLIC_KEY - ) - ) { - return false; - } - - // phpcs:enable WordPress.Security.NonceVerification.Recommended - - return true; - } - - /** - * Verify that user is allowed to disconnect Jetpack. - * - * @since 1.15.0 - * - * @return bool|WP_Error Whether user has the capability 'jetpack_disconnect'. - */ - public static function jetpack_reconnect_permission_check() { - if ( current_user_can( 'jetpack_reconnect' ) ) { - return true; - } - - return new WP_Error( 'invalid_user_permission_jetpack_disconnect', self::get_user_permissions_error_msg(), array( 'status' => rest_authorization_required_code() ) ); - } - - /** - * Returns generic error message when user is not allowed to perform an action. - * - * @return string The error message. - */ - public static function get_user_permissions_error_msg() { - return self::$user_permissions_error_msg; - } - - /** - * The endpoint tried to partially or fully reconnect the website to WP.com. - * - * @since 1.15.0 - * - * @return \WP_REST_Response|WP_Error - */ - public function connection_reconnect() { - $response = array(); - - $next = null; - - $result = $this->connection->restore(); - - if ( is_wp_error( $result ) ) { - $response = $result; - } elseif ( is_string( $result ) ) { - $next = $result; - } else { - $next = true === $result ? 'completed' : 'failed'; - } - - switch ( $next ) { - case 'authorize': - $response['status'] = 'in_progress'; - $response['authorizeUrl'] = $this->connection->get_authorization_url(); - break; - case 'completed': - $response['status'] = 'completed'; - /** - * Action fired when reconnection has completed successfully. - * - * @since 1.18.1 - */ - do_action( 'jetpack_reconnection_completed' ); - break; - case 'failed': - $response = new WP_Error( 'Reconnect failed' ); - break; - } - - return rest_ensure_response( $response ); - } - - /** - * Verify that user is allowed to connect Jetpack. - * - * @since 1.26.0 - * - * @return bool|WP_Error Whether user has the capability 'jetpack_connect'. - */ - public static function jetpack_register_permission_check() { - if ( current_user_can( 'jetpack_connect' ) ) { - return true; - } - - return new WP_Error( 'invalid_user_permission_jetpack_connect', self::get_user_permissions_error_msg(), array( 'status' => rest_authorization_required_code() ) ); - } - - /** - * The endpoint tried to partially or fully reconnect the website to WP.com. - * - * @since 1.7.0 - * @since-jetpack 7.7.0 - * - * @param \WP_REST_Request $request The request sent to the WP REST API. - * - * @return \WP_REST_Response|WP_Error - */ - public function connection_register( $request ) { - if ( ! wp_verify_nonce( $request->get_param( 'registration_nonce' ), 'jetpack-registration-nonce' ) ) { - return new WP_Error( 'invalid_nonce', __( 'Unable to verify your request.', 'jetpack-connection' ), array( 'status' => 403 ) ); - } - - if ( isset( $request['from'] ) ) { - $this->connection->add_register_request_param( 'from', (string) $request['from'] ); - } - - if ( ! empty( $request['plugin_slug'] ) ) { - // If `plugin_slug` matches a plugin using the connection, let's inform the plugin that is establishing the connection. - $connected_plugin = Plugin_Storage::get_one( (string) $request['plugin_slug'] ); - if ( ! is_wp_error( $connected_plugin ) && ! empty( $connected_plugin ) ) { - $this->connection->set_plugin_instance( new Plugin( (string) $request['plugin_slug'] ) ); - } - } - - $result = $this->connection->try_registration(); - - if ( is_wp_error( $result ) ) { - return $result; - } - - $redirect_uri = $request->get_param( 'redirect_uri' ) ? admin_url( $request->get_param( 'redirect_uri' ) ) : null; - - if ( class_exists( 'Jetpack' ) ) { - $authorize_url = \Jetpack::build_authorize_url( $redirect_uri ); - } else { - $authorize_url = $this->connection->get_authorization_url( null, $redirect_uri ); - } - - /** - * Filters the response of jetpack/v4/connection/register endpoint - * - * @param array $response Array response - * @since 1.27.0 - */ - $response_body = apply_filters( - 'jetpack_register_site_rest_response', - array() - ); - - // We manipulate the alternate URLs after the filter is applied, so they can not be overwritten. - $response_body['authorizeUrl'] = $authorize_url; - if ( ! empty( $response_body['alternateAuthorizeUrl'] ) ) { - $response_body['alternateAuthorizeUrl'] = Redirect::get_url( $response_body['alternateAuthorizeUrl'] ); - } - - return rest_ensure_response( $response_body ); - } - - /** - * Get the authorization URL. - * - * @since 1.27.0 - * - * @param \WP_REST_Request $request The request sent to the WP REST API. - * - * @return \WP_REST_Response|WP_Error - */ - public function connection_authorize_url( $request ) { - $redirect_uri = $request->get_param( 'redirect_uri' ) ? admin_url( $request->get_param( 'redirect_uri' ) ) : null; - $authorize_url = $this->connection->get_authorization_url( null, $redirect_uri ); - - return rest_ensure_response( - array( - 'authorizeUrl' => $authorize_url, - ) - ); - } - - /** - * The endpoint tried to partially or fully reconnect the website to WP.com. - * - * @since 1.29.0 - * - * @param \WP_REST_Request $request The request sent to the WP REST API. - * - * @return \WP_REST_Response|WP_Error - */ - public static function update_user_token( $request ) { - $token_parts = explode( '.', $request['user_token'] ); - - if ( count( $token_parts ) !== 3 || ! (int) $token_parts[2] || ! ctype_digit( $token_parts[2] ) ) { - return new WP_Error( 'invalid_argument_user_token', esc_html__( 'Invalid user token is provided', 'jetpack-connection' ) ); - } - - $user_id = (int) $token_parts[2]; - - if ( false === get_userdata( $user_id ) ) { - return new WP_Error( 'invalid_argument_user_id', esc_html__( 'Invalid user id is provided', 'jetpack-connection' ) ); - } - - $connection = new Manager(); - - if ( ! $connection->is_connected() ) { - return new WP_Error( 'site_not_connected', esc_html__( 'Site is not connected', 'jetpack-connection' ) ); - } - - $is_connection_owner = isset( $request['is_connection_owner'] ) - ? (bool) $request['is_connection_owner'] - : ( new Manager() )->get_connection_owner_id() === $user_id; - - ( new Tokens() )->update_user_token( $user_id, $request['user_token'], $is_connection_owner ); - - /** - * Fires when the user token gets successfully replaced. - * - * @since 1.29.0 - * - * @param int $user_id User ID. - * @param string $token New user token. - */ - do_action( 'jetpack_updated_user_token', $user_id, $request['user_token'] ); - - return rest_ensure_response( - array( - 'success' => true, - ) - ); - } - - /** - * Disconnects Jetpack from the WordPress.com Servers - * - * @since 1.30.1 - * - * @return bool|WP_Error True if Jetpack successfully disconnected. - */ - public static function disconnect_site() { - $connection = new Manager(); - - if ( $connection->is_connected() ) { - $connection->disconnect_site(); - return rest_ensure_response( array( 'code' => 'success' ) ); - } - - return new WP_Error( - 'disconnect_failed', - esc_html__( 'Failed to disconnect the site as it appears already disconnected.', 'jetpack-connection' ), - array( 'status' => 400 ) - ); - } - - /** - * Verify that the API client is allowed to replace user token. - * - * @since 1.29.0 - * - * @return bool|WP_Error. - */ - public static function update_user_token_permission_check() { - return Rest_Authentication::is_signed_with_blog_token() - ? true - : new WP_Error( 'invalid_permission_update_user_token', self::get_user_permissions_error_msg(), array( 'status' => rest_authorization_required_code() ) ); - } - - /** - * Change the connection owner. - * - * @since 1.29.0 - * - * @param WP_REST_Request $request The request sent to the WP REST API. - * - * @return \WP_REST_Response|WP_Error - */ - public static function set_connection_owner( $request ) { - $new_owner_id = $request['owner']; - - $owner_set = ( new Manager() )->update_connection_owner( $new_owner_id ); - - if ( is_wp_error( $owner_set ) ) { - return $owner_set; - } - - return rest_ensure_response( - array( - 'code' => 'success', - ) - ); - } - - /** - * Check that user has permission to change the master user. - * - * @since 1.7.0 - * @since-jetpack 6.2.0 - * @since-jetpack 7.7.0 Update so that any user with jetpack_disconnect privs can set owner. - * - * @return bool|WP_Error True if user is able to change master user. - */ - public static function set_connection_owner_permission_check() { - if ( current_user_can( 'jetpack_disconnect' ) ) { - return true; - } - - return new WP_Error( 'invalid_user_permission_set_connection_owner', self::get_user_permissions_error_msg(), array( 'status' => rest_authorization_required_code() ) ); - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-connection/src/class-secrets.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-connection/src/class-secrets.php deleted file mode 100644 index 81e72500..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-connection/src/class-secrets.php +++ /dev/null @@ -1,281 +0,0 @@ - time() - ) { - return $secrets[ $secret_name ]; - } - - $secret_value = array( - 'secret_1' => call_user_func( $callable ), - 'secret_2' => call_user_func( $callable ), - 'exp' => time() + $exp, - ); - - $secrets[ $secret_name ] = $secret_value; - - $res = Jetpack_Options::update_raw_option( self::LEGACY_SECRETS_OPTION_NAME, $secrets ); - return $res ? $secrets[ $secret_name ] : false; - } - - /** - * Returns two secret tokens and the end of life timestamp for them. - * - * @param String $action The action name. - * @param Integer $user_id The user identifier. - * @return string|array an array of secrets or an error string. - */ - public function get( $action, $user_id ) { - $secret_name = 'jetpack_' . $action . '_' . $user_id; - $secrets = Jetpack_Options::get_raw_option( - self::LEGACY_SECRETS_OPTION_NAME, - array() - ); - - if ( ! isset( $secrets[ $secret_name ] ) ) { - return self::SECRETS_MISSING; - } - - if ( $secrets[ $secret_name ]['exp'] < time() ) { - $this->delete( $action, $user_id ); - return self::SECRETS_EXPIRED; - } - - return $secrets[ $secret_name ]; - } - - /** - * Deletes secret tokens in case they, for example, have expired. - * - * @param String $action The action name. - * @param Integer $user_id The user identifier. - */ - public function delete( $action, $user_id ) { - $secret_name = 'jetpack_' . $action . '_' . $user_id; - $secrets = Jetpack_Options::get_raw_option( - self::LEGACY_SECRETS_OPTION_NAME, - array() - ); - if ( isset( $secrets[ $secret_name ] ) ) { - unset( $secrets[ $secret_name ] ); - Jetpack_Options::update_raw_option( self::LEGACY_SECRETS_OPTION_NAME, $secrets ); - } - } - - /** - * Verify a Previously Generated Secret. - * - * @param string $action The type of secret to verify. - * @param string $secret_1 The secret string to compare to what is stored. - * @param int $user_id The user ID of the owner of the secret. - * @return WP_Error|string WP_Error on failure, secret_2 on success. - */ - public function verify( $action, $secret_1, $user_id ) { - $allowed_actions = array( 'register', 'authorize', 'publicize' ); - if ( ! in_array( $action, $allowed_actions, true ) ) { - return new WP_Error( 'unknown_verification_action', 'Unknown Verification Action', 400 ); - } - - $user = get_user_by( 'id', $user_id ); - - /** - * We've begun verifying the previously generated secret. - * - * @since 1.7.0 - * @since-jetpack 7.5.0 - * - * @param string $action The type of secret to verify. - * @param \WP_User $user The user object. - */ - do_action( 'jetpack_verify_secrets_begin', $action, $user ); - - $return_error = function ( WP_Error $error ) use ( $action, $user ) { - /** - * Verifying of the previously generated secret has failed. - * - * @since 1.7.0 - * @since-jetpack 7.5.0 - * - * @param string $action The type of secret to verify. - * @param \WP_User $user The user object. - * @param WP_Error $error The error object. - */ - do_action( 'jetpack_verify_secrets_fail', $action, $user, $error ); - - return $error; - }; - - $stored_secrets = $this->get( $action, $user_id ); - $this->delete( $action, $user_id ); - - $error = null; - if ( empty( $secret_1 ) ) { - $error = $return_error( - new WP_Error( - 'verify_secret_1_missing', - /* translators: "%s" is the name of a paramter. It can be either "secret_1" or "state". */ - sprintf( __( 'The required "%s" parameter is missing.', 'jetpack-connection' ), 'secret_1' ), - 400 - ) - ); - } elseif ( ! is_string( $secret_1 ) ) { - $error = $return_error( - new WP_Error( - 'verify_secret_1_malformed', - /* translators: "%s" is the name of a paramter. It can be either "secret_1" or "state". */ - sprintf( __( 'The required "%s" parameter is malformed.', 'jetpack-connection' ), 'secret_1' ), - 400 - ) - ); - } elseif ( empty( $user_id ) ) { - // $user_id is passed around during registration as "state". - $error = $return_error( - new WP_Error( - 'state_missing', - /* translators: "%s" is the name of a paramter. It can be either "secret_1" or "state". */ - sprintf( __( 'The required "%s" parameter is missing.', 'jetpack-connection' ), 'state' ), - 400 - ) - ); - } elseif ( ! ctype_digit( (string) $user_id ) ) { - $error = $return_error( - new WP_Error( - 'state_malformed', - /* translators: "%s" is the name of a paramter. It can be either "secret_1" or "state". */ - sprintf( __( 'The required "%s" parameter is malformed.', 'jetpack-connection' ), 'state' ), - 400 - ) - ); - } elseif ( self::SECRETS_MISSING === $stored_secrets ) { - $error = $return_error( - new WP_Error( - 'verify_secrets_missing', - __( 'Verification secrets not found', 'jetpack-connection' ), - 400 - ) - ); - } elseif ( self::SECRETS_EXPIRED === $stored_secrets ) { - $error = $return_error( - new WP_Error( - 'verify_secrets_expired', - __( 'Verification took too long', 'jetpack-connection' ), - 400 - ) - ); - } elseif ( ! $stored_secrets ) { - $error = $return_error( - new WP_Error( - 'verify_secrets_empty', - __( 'Verification secrets are empty', 'jetpack-connection' ), - 400 - ) - ); - } elseif ( is_wp_error( $stored_secrets ) ) { - $stored_secrets->add_data( 400 ); - $error = $return_error( $stored_secrets ); - } elseif ( empty( $stored_secrets['secret_1'] ) || empty( $stored_secrets['secret_2'] ) || empty( $stored_secrets['exp'] ) ) { - $error = $return_error( - new WP_Error( - 'verify_secrets_incomplete', - __( 'Verification secrets are incomplete', 'jetpack-connection' ), - 400 - ) - ); - } elseif ( ! hash_equals( $secret_1, $stored_secrets['secret_1'] ) ) { - $error = $return_error( - new WP_Error( - 'verify_secrets_mismatch', - __( 'Secret mismatch', 'jetpack-connection' ), - 400 - ) - ); - } - - // Something went wrong during the checks, returning the error. - if ( ! empty( $error ) ) { - return $error; - } - - /** - * We've succeeded at verifying the previously generated secret. - * - * @since 1.7.0 - * @since-jetpack 7.5.0 - * - * @param string $action The type of secret to verify. - * @param \WP_User $user The user object. - */ - do_action( 'jetpack_verify_secrets_success', $action, $user ); - - return $stored_secrets['secret_2']; - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-connection/src/class-server-sandbox.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-connection/src/class-server-sandbox.php deleted file mode 100644 index 711480bb..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-connection/src/class-server-sandbox.php +++ /dev/null @@ -1,243 +0,0 @@ - new URL, 'host' => new Host, 'new_signature => New signature if url was changed ] - */ - public function server_sandbox_request_parameters( $sandbox, $url, $headers, $data = null, $method = 'GET' ) { - $host = ''; - $new_signature = ''; - - if ( ! is_string( $sandbox ) || ! is_string( $url ) ) { - return array( - 'url' => $url, - 'host' => $host, - 'new_signature' => $new_signature, - ); - } - - $url_host = wp_parse_url( $url, PHP_URL_HOST ); - - switch ( $url_host ) { - case 'public-api.wordpress.com': - case 'jetpack.wordpress.com': - case 'jetpack.com': - case 'dashboard.wordpress.com': - $host = isset( $headers['Host'] ) ? $headers['Host'] : $url_host; - $original_url = $url; - $url = preg_replace( - '@^(https?://)' . preg_quote( $url_host, '@' ) . '(?=[/?#].*|$)@', - '${1}' . $sandbox, - $url, - 1 - ); - - /** - * Whether to add the X Debug query parameter to the request made to the Sandbox - * - * @since 1.36.0 - * - * @param bool $add_parameter Whether to add the parameter to the request or not. Default is to false. - * @param string $url The URL of the request being made. - * @param string $host The host of the request being made. - */ - if ( apply_filters( 'jetpack_sandbox_add_profile_parameter', false, $url, $host ) ) { - $url = add_query_arg( 'XDEBUG_PROFILE', 1, $url ); - - // URL has been modified since the signature was created. We'll need a new one. - $original_url = add_query_arg( 'XDEBUG_PROFILE', 1, $original_url ); - $new_signature = $this->get_new_signature( $original_url, $headers, $data, $method ); - - } - } - - return compact( 'url', 'host', 'new_signature' ); - } - - /** - * Gets a new signature for the request - * - * @param string $url The new URL to be signed. - * @param array $headers The headers of the request about to be made. - * @param string $data The body of request about to be made. - * @param string $method The method of the request about to be made. - * @return string|null - */ - private function get_new_signature( $url, $headers, $data, $method ) { - - if ( ! empty( $headers['Authorization'] ) ) { - $a_headers = $this->extract_authorization_headers( $headers ); - if ( ! empty( $a_headers ) ) { - $token_details = explode( ':', $a_headers['token'] ); - - if ( count( $token_details ) === 3 ) { - $user_id = $token_details[2]; - $token = ( new Tokens() )->get_access_token( $user_id ); - $time_diff = (int) \Jetpack_Options::get_option( 'time_diff' ); - $jetpack_signature = new \Jetpack_Signature( $token->secret, $time_diff ); - - $signature = $jetpack_signature->sign_request( - $a_headers['token'], - $a_headers['timestamp'], - $a_headers['nonce'], - $a_headers['body-hash'], - $method, - $url, - $data, - false - ); - - if ( $signature && ! is_wp_error( $signature ) ) { - return $signature; - } elseif ( is_wp_error( $signature ) ) { - $this->log_new_signature_error( $signature->get_error_message() ); - } - } else { - $this->log_new_signature_error( 'Malformed token on Authorization Header' ); - } - } else { - $this->log_new_signature_error( 'Error extracting Authorization Header' ); - } - } else { - $this->log_new_signature_error( 'Empty Authorization Header' ); - } - } - - /** - * Logs error if the attempt to create a new signature fails - * - * @param string $message The error message. - * @return void - */ - private function log_new_signature_error( $message ) { - if ( defined( 'WP_DEBUG' ) && WP_DEBUG ) { - error_log( sprintf( "SANDBOXING: Error re-signing the request. '%s'", $message ) ); // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_error_log - } - } - - /** - * Extract the values in the Authorization header into an array - * - * @param array $headers The headers of the request about to be made. - * @return array|null - */ - public function extract_authorization_headers( $headers ) { - if ( ! empty( $headers['Authorization'] ) && is_string( $headers['Authorization'] ) ) { - $header = str_replace( 'X_JETPACK ', '', $headers['Authorization'] ); - $vars = explode( ' ', $header ); - $result = array(); - foreach ( $vars as $var ) { - $elements = explode( '"', $var ); - if ( count( $elements ) === 3 ) { - $result[ substr( $elements[0], 0, -1 ) ] = $elements[1]; - } - } - return $result; - } - } - - /** - * Modifies parameters of request in order to send the request to the - * server specified by `JETPACK__SANDBOX_DOMAIN`. - * - * Attached to the `requests-requests.before_request` filter. - * - * @param string $url URL of request about to be made. - * @param array $headers Headers of request about to be made. - * @param array|string $data Data of request about to be made. - * @param string $type Type of request about to be made. - * @return void - */ - public function server_sandbox( &$url, &$headers, &$data = null, &$type = null ) { - if ( ! Constants::get_constant( 'JETPACK__SANDBOX_DOMAIN' ) ) { - return; - } - - $original_url = $url; - - $request_parameters = $this->server_sandbox_request_parameters( Constants::get_constant( 'JETPACK__SANDBOX_DOMAIN' ), $url, $headers, $data, $type ); - - $url = $request_parameters['url']; - - if ( $request_parameters['host'] ) { - $headers['Host'] = $request_parameters['host']; - - if ( $request_parameters['new_signature'] ) { - $headers['Authorization'] = preg_replace( '/signature=\"[^\"]+\"/', 'signature="' . $request_parameters['new_signature'] . '"', $headers['Authorization'] ); - } - - if ( defined( 'WP_DEBUG' ) && WP_DEBUG ) { - error_log( sprintf( "SANDBOXING via '%s': '%s'", Constants::get_constant( 'JETPACK__SANDBOX_DOMAIN' ), $original_url ) ); // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_error_log - } - } - } - - /** - * Adds a "Jetpack API Sandboxed" item to the admin bar if the JETPACK__SANDBOX_DOMAIN - * constant is set. - * - * Attached to the `admin_bar_menu` action. - * - * @param WP_Admin_Bar $wp_admin_bar The WP_Admin_Bar instance. - */ - public function admin_bar_add_sandbox_item( $wp_admin_bar ) { - if ( ! Constants::get_constant( 'JETPACK__SANDBOX_DOMAIN' ) ) { - return; - } - - $node = array( - 'id' => 'jetpack-connection-api-sandbox', - 'title' => 'Jetpack API Sandboxed', - 'meta' => array( - 'title' => 'Sandboxing via ' . Constants::get_constant( 'JETPACK__SANDBOX_DOMAIN' ), - ), - ); - - $wp_admin_bar->add_menu( $node ); - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-connection/src/class-terms-of-service.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-connection/src/class-terms-of-service.php deleted file mode 100644 index b208123f..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-connection/src/class-terms-of-service.php +++ /dev/null @@ -1,111 +0,0 @@ -set_agree(); - /** - * Acton fired when the master user has agreed to the terms of service. - * - * @since 1.0.4 - * @since-jetpack 7.9.0 - */ - do_action( 'jetpack_agreed_to_terms_of_service' ); - } - - /** - * Allow the site to reject to the terms of service. - */ - public function reject() { - $this->set_reject(); - /** - * Acton fired when the master user has revoked their agreement to the terms of service. - * - * @since 1.0.4 - * @since-jetpack 7.9.1 - */ - do_action( 'jetpack_reject_terms_of_service' ); - } - - /** - * Returns whether the master user has agreed to the terms of service. - * - * The following conditions have to be met in order to agree to the terms of service. - * 1. The master user has gone though the connect flow. - * 2. The site is not in dev mode. - * 3. The master user of the site is still connected (deprecated @since 1.4.0). - * - * @return bool - */ - public function has_agreed() { - if ( $this->is_offline_mode() ) { - return false; - } - /** - * Before 1.4.0 we used to also check if the master user of the site is connected - * by calling the Connection related `is_active` method. - * As of 1.4.0 we have removed this check in order to resolve the - * circular dependencies it was introducing to composer packages. - * - * @since 1.4.0 - */ - return $this->get_raw_has_agreed(); - } - - /** - * Abstracted for testing purposes. - * Tells us if the site is in dev mode. - * - * @return bool - */ - protected function is_offline_mode() { - return ( new Status() )->is_offline_mode(); - } - - /** - * Gets just the Jetpack Option that contains the terms of service state. - * Abstracted for testing purposes. - * - * @return bool - */ - protected function get_raw_has_agreed() { - return \Jetpack_Options::get_option( self::OPTION_NAME, false ); - } - - /** - * Sets the correct Jetpack Option to mark the that the site has agreed to the terms of service. - * Abstracted for testing purposes. - */ - protected function set_agree() { - \Jetpack_Options::update_option( self::OPTION_NAME, true ); - } - - /** - * Sets the correct Jetpack Option to mark that the site has rejected the terms of service. - * Abstracted for testing purposes. - */ - protected function set_reject() { - \Jetpack_Options::update_option( self::OPTION_NAME, false ); - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-connection/src/class-tokens-locks.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-connection/src/class-tokens-locks.php deleted file mode 100644 index e6819a7c..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-connection/src/class-tokens-locks.php +++ /dev/null @@ -1,76 +0,0 @@ -init_aiowpm(); - - static::$is_initialized = true; - } - - /** - * Set the token lock for AIOWPM plugin export. - * - * @param array $params The filter parameters. - * - * @return array - */ - public function aiowpm_set_lock( $params ) { - ( new Tokens() )->set_lock(); - return $params; - } - - /** - * Remove the token lock for AIOWPM plugin export. - * - * @param array $params The filter parameters. - * - * @return array - */ - public function aiowpm_remove_lock( $params ) { - ( new Tokens() )->remove_lock(); - return $params; - } - - /** - * Initialize the All-in-One-WP-Migration plugin hooks. - * - * @return void - */ - private function init_aiowpm() { - add_filter( 'ai1wm_export', array( $this, 'aiowpm_set_lock' ), 180 ); - add_filter( 'ai1wm_export', array( $this, 'aiowpm_remove_lock' ), 250 ); - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-connection/src/class-tokens.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-connection/src/class-tokens.php deleted file mode 100644 index 1b10356d..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-connection/src/class-tokens.php +++ /dev/null @@ -1,687 +0,0 @@ -remove_lock(); - } - - /** - * Perform the API request to validate the blog and user tokens. - * - * @param int|null $user_id ID of the user we need to validate token for. Current user's ID by default. - * - * @return array|false|WP_Error The API response: `array( 'blog_token_is_healthy' => true|false, 'user_token_is_healthy' => true|false )`. - */ - public function validate( $user_id = null ) { - $blog_id = Jetpack_Options::get_option( 'id' ); - if ( ! $blog_id ) { - return new WP_Error( 'site_not_registered', 'Site not registered.' ); - } - $url = sprintf( - '%s/%s/v%s/%s', - Constants::get_constant( 'JETPACK__WPCOM_JSON_API_BASE' ), - 'wpcom', - '2', - 'sites/' . $blog_id . '/jetpack-token-health' - ); - - $user_token = $this->get_access_token( $user_id ? $user_id : get_current_user_id() ); - $blog_token = $this->get_access_token(); - - // Cannot validate non-existent tokens. - if ( false === $user_token || false === $blog_token ) { - return false; - } - - $method = 'POST'; - $body = array( - 'user_token' => $this->get_signed_token( $user_token ), - 'blog_token' => $this->get_signed_token( $blog_token ), - ); - $response = Client::_wp_remote_request( $url, compact( 'body', 'method' ) ); - - if ( is_wp_error( $response ) || ! wp_remote_retrieve_body( $response ) || 200 !== wp_remote_retrieve_response_code( $response ) ) { - return false; - } - - $body = json_decode( wp_remote_retrieve_body( $response ), true ); - - return $body ? $body : false; - } - - /** - * Perform the API request to validate only the blog. - * - * @return bool|WP_Error Boolean with the test result. WP_Error if test cannot be performed. - */ - public function validate_blog_token() { - $blog_id = Jetpack_Options::get_option( 'id' ); - if ( ! $blog_id ) { - return new WP_Error( 'site_not_registered', 'Site not registered.' ); - } - $url = sprintf( - '%s/%s/v%s/%s', - Constants::get_constant( 'JETPACK__WPCOM_JSON_API_BASE' ), - 'wpcom', - '2', - 'sites/' . $blog_id . '/jetpack-token-health/blog' - ); - - $method = 'GET'; - $response = Client::remote_request( compact( 'url', 'method' ) ); - - if ( is_wp_error( $response ) || ! wp_remote_retrieve_body( $response ) || 200 !== wp_remote_retrieve_response_code( $response ) ) { - return false; - } - - $body = json_decode( wp_remote_retrieve_body( $response ), true ); - - return is_array( $body ) && isset( $body['is_healthy'] ) && true === $body['is_healthy']; - } - - /** - * Obtains the auth token. - * - * @param array $data The request data. - * @param string $token_api_url The URL of the Jetpack "token" API. - * @return object|WP_Error Returns the auth token on success. - * Returns a WP_Error on failure. - */ - public function get( $data, $token_api_url ) { - $roles = new Roles(); - $role = $roles->translate_current_user_to_role(); - - if ( ! $role ) { - return new WP_Error( 'role', __( 'An administrator for this blog must set up the Jetpack connection.', 'jetpack-connection' ) ); - } - - $client_secret = $this->get_access_token(); - if ( ! $client_secret ) { - return new WP_Error( 'client_secret', __( 'You need to register your Jetpack before connecting it.', 'jetpack-connection' ) ); - } - - /** - * Filter the URL of the first time the user gets redirected back to your site for connection - * data processing. - * - * @since 1.7.0 - * @since-jetpack 8.0.0 - * - * @param string $redirect_url Defaults to the site admin URL. - */ - $processing_url = apply_filters( 'jetpack_token_processing_url', admin_url( 'admin.php' ) ); - - $redirect = isset( $data['redirect'] ) ? esc_url_raw( (string) $data['redirect'] ) : ''; - - /** - * Filter the URL to redirect the user back to when the authentication process - * is complete. - * - * @since 1.7.0 - * @since-jetpack 8.0.0 - * - * @param string $redirect_url Defaults to the site URL. - */ - $redirect = apply_filters( 'jetpack_token_redirect_url', $redirect ); - - $redirect_uri = ( 'calypso' === $data['auth_type'] ) - ? $data['redirect_uri'] - : add_query_arg( - array( - 'handler' => 'jetpack-connection-webhooks', - 'action' => 'authorize', - '_wpnonce' => wp_create_nonce( "jetpack-authorize_{$role}_{$redirect}" ), - 'redirect' => $redirect ? rawurlencode( $redirect ) : false, - ), - esc_url( $processing_url ) - ); - - /** - * Filters the token request data. - * - * @since 1.7.0 - * @since-jetpack 8.0.0 - * - * @param array $request_data request data. - */ - $body = apply_filters( - 'jetpack_token_request_body', - array( - 'client_id' => Jetpack_Options::get_option( 'id' ), - 'client_secret' => $client_secret->secret, - 'grant_type' => 'authorization_code', - 'code' => $data['code'], - 'redirect_uri' => $redirect_uri, - ) - ); - - $args = array( - 'method' => 'POST', - 'body' => $body, - 'headers' => array( - 'Accept' => 'application/json', - ), - ); - add_filter( 'http_request_timeout', array( $this, 'return_30' ), PHP_INT_MAX - 1 ); - $response = Client::_wp_remote_request( $token_api_url, $args ); - remove_filter( 'http_request_timeout', array( $this, 'return_30' ), PHP_INT_MAX - 1 ); - - if ( is_wp_error( $response ) ) { - return new WP_Error( 'token_http_request_failed', $response->get_error_message() ); - } - - $code = wp_remote_retrieve_response_code( $response ); - $entity = wp_remote_retrieve_body( $response ); - - if ( $entity ) { - $json = json_decode( $entity ); - } else { - $json = false; - } - - if ( 200 !== $code || ! empty( $json->error ) ) { - if ( empty( $json->error ) ) { - return new WP_Error( 'unknown', '', $code ); - } - - /* translators: Error description string. */ - $error_description = isset( $json->error_description ) ? sprintf( __( 'Error Details: %s', 'jetpack-connection' ), (string) $json->error_description ) : ''; - - return new WP_Error( (string) $json->error, $error_description, $code ); - } - - if ( empty( $json->access_token ) || ! is_scalar( $json->access_token ) ) { - return new WP_Error( 'access_token', '', $code ); - } - - if ( empty( $json->token_type ) || 'X_JETPACK' !== strtoupper( $json->token_type ) ) { - return new WP_Error( 'token_type', '', $code ); - } - - if ( empty( $json->scope ) ) { - return new WP_Error( 'scope', 'No Scope', $code ); - } - - // TODO: get rid of the error silencer. - // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged - @list( $role, $hmac ) = explode( ':', $json->scope ); - if ( empty( $role ) || empty( $hmac ) ) { - return new WP_Error( 'scope', 'Malformed Scope', $code ); - } - - if ( $this->sign_role( $role ) !== $json->scope ) { - return new WP_Error( 'scope', 'Invalid Scope', $code ); - } - - $cap = $roles->translate_role_to_cap( $role ); - if ( ! $cap ) { - return new WP_Error( 'scope', 'No Cap', $code ); - } - - if ( ! current_user_can( $cap ) ) { - return new WP_Error( 'scope', 'current_user_cannot', $code ); - } - - return (string) $json->access_token; - } - - /** - * Enters a user token into the user_tokens option - * - * @param int $user_id The user id. - * @param string $token The user token. - * @param bool $is_master_user Whether the user is the master user. - * @return bool - */ - public function update_user_token( $user_id, $token, $is_master_user ) { - // Not designed for concurrent updates. - $user_tokens = $this->get_user_tokens(); - if ( ! is_array( $user_tokens ) ) { - $user_tokens = array(); - } - $user_tokens[ $user_id ] = $token; - if ( $is_master_user ) { - $master_user = $user_id; - $options = compact( 'user_tokens', 'master_user' ); - } else { - $options = compact( 'user_tokens' ); - } - return Jetpack_Options::update_options( $options ); - } - - /** - * Sign a user role with the master access token. - * If not specified, will default to the current user. - * - * @access public - * - * @param string $role User role. - * @param int $user_id ID of the user. - * @return string Signed user role. - */ - public function sign_role( $role, $user_id = null ) { - if ( empty( $user_id ) ) { - $user_id = (int) get_current_user_id(); - } - - if ( ! $user_id ) { - return false; - } - - $token = $this->get_access_token(); - if ( ! $token || is_wp_error( $token ) ) { - return false; - } - - return $role . ':' . hash_hmac( 'md5', "{$role}|{$user_id}", $token->secret ); - } - - /** - * Increases the request timeout value to 30 seconds. - * - * @return int Returns 30. - */ - public function return_30() { - return 30; - } - - /** - * Gets the requested token. - * - * Tokens are one of two types: - * 1. Blog Tokens: These are the "main" tokens. Each site typically has one Blog Token, - * though some sites can have multiple "Special" Blog Tokens (see below). These tokens - * are not associated with a user account. They represent the site's connection with - * the Jetpack servers. - * 2. User Tokens: These are "sub-"tokens. Each connected user account has one User Token. - * - * All tokens look like "{$token_key}.{$private}". $token_key is a public ID for the - * token, and $private is a secret that should never be displayed anywhere or sent - * over the network; it's used only for signing things. - * - * Blog Tokens can be "Normal" or "Special". - * * Normal: The result of a normal connection flow. They look like - * "{$random_string_1}.{$random_string_2}" - * That is, $token_key and $private are both random strings. - * Sites only have one Normal Blog Token. Normal Tokens are found in either - * Jetpack_Options::get_option( 'blog_token' ) (usual) or the JETPACK_BLOG_TOKEN - * constant (rare). - * * Special: A connection token for sites that have gone through an alternative - * connection flow. They look like: - * ";{$special_id}{$special_version};{$wpcom_blog_id};.{$random_string}" - * That is, $private is a random string and $token_key has a special structure with - * lots of semicolons. - * Most sites have zero Special Blog Tokens. Special tokens are only found in the - * JETPACK_BLOG_TOKEN constant. - * - * In particular, note that Normal Blog Tokens never start with ";" and that - * Special Blog Tokens always do. - * - * When searching for a matching Blog Tokens, Blog Tokens are examined in the following - * order: - * 1. Defined Special Blog Tokens (via the JETPACK_BLOG_TOKEN constant) - * 2. Stored Normal Tokens (via Jetpack_Options::get_option( 'blog_token' )) - * 3. Defined Normal Tokens (via the JETPACK_BLOG_TOKEN constant) - * - * @param int|false $user_id false: Return the Blog Token. int: Return that user's User Token. - * @param string|false $token_key If provided, check that the token matches the provided input. - * @param bool|true $suppress_errors If true, return a falsy value when the token isn't found; When false, return a descriptive WP_Error when the token isn't found. - * - * @return object|false|WP_Error - */ - public function get_access_token( $user_id = false, $token_key = false, $suppress_errors = true ) { - if ( $this->is_locked() ) { - $this->delete_all(); - return false; - } - - $possible_special_tokens = array(); - $possible_normal_tokens = array(); - $user_tokens = $this->get_user_tokens(); - - if ( $user_id ) { - if ( ! $user_tokens ) { - return $suppress_errors ? false : new WP_Error( 'no_user_tokens', __( 'No user tokens found', 'jetpack-connection' ) ); - } - if ( true === $user_id ) { // connection owner. - $user_id = Jetpack_Options::get_option( 'master_user' ); - if ( ! $user_id ) { - return $suppress_errors ? false : new WP_Error( 'empty_master_user_option', __( 'No primary user defined', 'jetpack-connection' ) ); - } - } - if ( ! isset( $user_tokens[ $user_id ] ) || ! $user_tokens[ $user_id ] ) { - // translators: %s is the user ID. - return $suppress_errors ? false : new WP_Error( 'no_token_for_user', sprintf( __( 'No token for user %d', 'jetpack-connection' ), $user_id ) ); - } - $user_token_chunks = explode( '.', $user_tokens[ $user_id ] ); - if ( empty( $user_token_chunks[1] ) || empty( $user_token_chunks[2] ) ) { - // translators: %s is the user ID. - return $suppress_errors ? false : new WP_Error( 'token_malformed', sprintf( __( 'Token for user %d is malformed', 'jetpack-connection' ), $user_id ) ); - } - if ( $user_token_chunks[2] !== (string) $user_id ) { - // translators: %1$d is the ID of the requested user. %2$d is the user ID found in the token. - return $suppress_errors ? false : new WP_Error( 'user_id_mismatch', sprintf( __( 'Requesting user_id %1$d does not match token user_id %2$d', 'jetpack-connection' ), $user_id, $user_token_chunks[2] ) ); - } - $possible_normal_tokens[] = "{$user_token_chunks[0]}.{$user_token_chunks[1]}"; - } else { - $stored_blog_token = Jetpack_Options::get_option( 'blog_token' ); - if ( $stored_blog_token ) { - $possible_normal_tokens[] = $stored_blog_token; - } - - $defined_tokens_string = Constants::get_constant( 'JETPACK_BLOG_TOKEN' ); - - if ( $defined_tokens_string ) { - $defined_tokens = explode( ',', $defined_tokens_string ); - foreach ( $defined_tokens as $defined_token ) { - if ( ';' === $defined_token[0] ) { - $possible_special_tokens[] = $defined_token; - } else { - $possible_normal_tokens[] = $defined_token; - } - } - } - } - - if ( self::MAGIC_NORMAL_TOKEN_KEY === $token_key ) { - $possible_tokens = $possible_normal_tokens; - } else { - $possible_tokens = array_merge( $possible_special_tokens, $possible_normal_tokens ); - } - - if ( ! $possible_tokens ) { - // If no user tokens were found, it would have failed earlier, so this is about blog token. - return $suppress_errors ? false : new WP_Error( 'no_possible_tokens', __( 'No blog token found', 'jetpack-connection' ) ); - } - - $valid_token = false; - - if ( false === $token_key ) { - // Use first token. - $valid_token = $possible_tokens[0]; - } elseif ( self::MAGIC_NORMAL_TOKEN_KEY === $token_key ) { - // Use first normal token. - $valid_token = $possible_tokens[0]; // $possible_tokens only contains normal tokens because of earlier check. - } else { - // Use the token matching $token_key or false if none. - // Ensure we check the full key. - $token_check = rtrim( $token_key, '.' ) . '.'; - - foreach ( $possible_tokens as $possible_token ) { - if ( hash_equals( substr( $possible_token, 0, strlen( $token_check ) ), $token_check ) ) { - $valid_token = $possible_token; - break; - } - } - } - - if ( ! $valid_token ) { - if ( $user_id ) { - // translators: %d is the user ID. - return $suppress_errors ? false : new WP_Error( 'no_valid_user_token', sprintf( __( 'Invalid token for user %d', 'jetpack-connection' ), $user_id ) ); - } else { - return $suppress_errors ? false : new WP_Error( 'no_valid_blog_token', __( 'Invalid blog token', 'jetpack-connection' ) ); - } - } - - return (object) array( - 'secret' => $valid_token, - 'external_user_id' => (int) $user_id, - ); - } - - /** - * Updates the blog token to a new value. - * - * @access public - * - * @param string $token the new blog token value. - * @return Boolean Whether updating the blog token was successful. - */ - public function update_blog_token( $token ) { - return Jetpack_Options::update_option( 'blog_token', $token ); - } - - /** - * Unlinks the current user from the linked WordPress.com user. - * - * @access public - * @static - * - * @todo Refactor to properly load the XMLRPC client independently. - * - * @param int $user_id The user identifier. - * - * @return bool Whether the disconnection of the user was successful. - */ - public function disconnect_user( $user_id ) { - $tokens = $this->get_user_tokens(); - if ( ! $tokens ) { - return false; - } - - if ( ! isset( $tokens[ $user_id ] ) ) { - return false; - } - - unset( $tokens[ $user_id ] ); - - $this->update_user_tokens( $tokens ); - - return true; - } - - /** - * Returns an array of user_id's that have user tokens for communicating with wpcom. - * Able to select by specific capability. - * - * @deprecated 1.30.0 - * @see Manager::get_connected_users - * - * @param string $capability The capability of the user. - * @param int|null $limit How many connected users to get before returning. - * @return array Array of WP_User objects if found. - */ - public function get_connected_users( $capability = 'any', $limit = null ) { - _deprecated_function( __METHOD__, '1.30.0' ); - return ( new Manager( 'jetpack' ) )->get_connected_users( $capability, $limit ); - } - - /** - * Fetches a signed token. - * - * @param object $token the token. - * @return WP_Error|string a signed token - */ - public function get_signed_token( $token ) { - if ( ! isset( $token->secret ) || empty( $token->secret ) ) { - return new WP_Error( 'invalid_token' ); - } - - list( $token_key, $token_secret ) = explode( '.', $token->secret ); - - $token_key = sprintf( - '%s:%d:%d', - $token_key, - Constants::get_constant( 'JETPACK__API_VERSION' ), - $token->external_user_id - ); - - $timestamp = time(); - - if ( function_exists( 'wp_generate_password' ) ) { - $nonce = wp_generate_password( 10, false ); - } else { - $nonce = substr( sha1( wp_rand( 0, 1000000 ) ), 0, 10 ); - } - - $normalized_request_string = implode( - "\n", - array( - $token_key, - $timestamp, - $nonce, - ) - ) . "\n"; - - // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.obfuscation_base64_encode - $signature = base64_encode( hash_hmac( 'sha1', $normalized_request_string, $token_secret, true ) ); - - $auth = array( - 'token' => $token_key, - 'timestamp' => $timestamp, - 'nonce' => $nonce, - 'signature' => $signature, - ); - - $header_pieces = array(); - foreach ( $auth as $key => $value ) { - $header_pieces[] = sprintf( '%s="%s"', $key, $value ); - } - - return implode( ' ', $header_pieces ); - } - - /** - * Gets the list of user tokens - * - * @since 1.30.0 - * - * @return bool|array An array of user tokens where keys are user IDs and values are the tokens. False if no user token is found. - */ - public function get_user_tokens() { - return Jetpack_Options::get_option( 'user_tokens' ); - } - - /** - * Updates the option that stores the user tokens - * - * @since 1.30.0 - * - * @param array $tokens An array of user tokens where keys are user IDs and values are the tokens. - * @return bool Was the option successfully updated? - * - * @todo add validate the input. - */ - public function update_user_tokens( $tokens ) { - return Jetpack_Options::update_option( 'user_tokens', $tokens ); - } - - /** - * Lock the tokens to the current site URL. - * - * @param int $timespan How long the tokens should be locked, in seconds. - * - * @return bool - */ - public function set_lock( $timespan = HOUR_IN_SECONDS ) { - try { - $expires = ( new DateTime() )->add( DateInterval::createFromDateString( (int) $timespan . ' seconds' ) ); - } catch ( Exception $e ) { - return false; - } - - if ( false === $expires ) { - return false; - } - - // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.obfuscation_base64_encode - return Jetpack_Options::update_option( 'token_lock', $expires->format( static::DATE_FORMAT_ATOM ) . '|||' . base64_encode( Urls::site_url() ) ); - } - - /** - * Remove the site lock from tokens. - * - * @return bool - */ - public function remove_lock() { - Jetpack_Options::delete_option( 'token_lock' ); - - return true; - } - - /** - * Check if the domain is locked, remove the lock if needed. - * Possible scenarios: - * - lock expired, site URL matches the lock URL: remove the lock, return false. - * - lock not expired, site URL matches the lock URL: return false. - * - site URL does not match the lock URL (expiration date is ignored): return true, do not remove the lock. - * - * @return bool - */ - public function is_locked() { - $the_lock = Jetpack_Options::get_option( 'token_lock' ); - if ( ! $the_lock ) { - // Not locked. - return false; - } - - $the_lock = explode( '|||', $the_lock, 2 ); - if ( count( $the_lock ) !== 2 ) { - // Something's wrong with the lock. - $this->remove_lock(); - return false; - } - - // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.obfuscation_base64_decode - $locked_site_url = base64_decode( $the_lock[1] ); - $expires = $the_lock[0]; - - $expiration_date = DateTime::createFromFormat( static::DATE_FORMAT_ATOM, $expires ); - if ( false === $expiration_date || ! $locked_site_url ) { - // Something's wrong with the lock. - $this->remove_lock(); - return false; - } - - if ( Urls::site_url() === $locked_site_url ) { - if ( new DateTime() > $expiration_date ) { - // Site lock expired. - // Site URL matches, removing the lock. - $this->remove_lock(); - } - - return false; - } - - // Site URL doesn't match. - return true; - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-connection/src/class-tracking.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-connection/src/class-tracking.php deleted file mode 100644 index 1ff9f06c..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-connection/src/class-tracking.php +++ /dev/null @@ -1,318 +0,0 @@ -product_name = $product_name; - $this->connection = $connection; - if ( $this->connection === null ) { - // TODO We should always pass a Connection. - $this->connection = new Connection\Manager(); - } - - if ( ! did_action( 'jetpack_set_tracks_ajax_hook' ) ) { - add_action( 'wp_ajax_jetpack_tracks', array( $this, 'ajax_tracks' ) ); - - /** - * Fires when the Tracking::ajax_tracks() callback has been hooked to the - * wp_ajax_jetpack_tracks action. This action is used to ensure that - * the callback is hooked only once. - * - * @since 1.13.11 - */ - do_action( 'jetpack_set_tracks_ajax_hook' ); - } - } - - /** - * Universal method for for all tracking events triggered via the JavaScript client. - * - * @access public - */ - public function ajax_tracks() { - // Check for nonce. - if ( - empty( $_REQUEST['tracksNonce'] ) - || ! wp_verify_nonce( $_REQUEST['tracksNonce'], 'jp-tracks-ajax-nonce' ) // phpcs:ignore WordPress.Security.ValidatedSanitizedInput -- WP core doesn't pre-sanitize nonces either. - ) { - wp_send_json_error( - __( 'You aren’t authorized to do that.', 'jetpack-connection' ), - 403 - ); - } - - if ( ! isset( $_REQUEST['tracksEventName'] ) || ! isset( $_REQUEST['tracksEventType'] ) ) { - wp_send_json_error( - __( 'No valid event name or type.', 'jetpack-connection' ), - 403 - ); - } - - $tracks_data = array(); - if ( 'click' === $_REQUEST['tracksEventType'] && isset( $_REQUEST['tracksEventProp'] ) ) { - if ( is_array( $_REQUEST['tracksEventProp'] ) ) { - $tracks_data = array_map( 'filter_var', wp_unslash( $_REQUEST['tracksEventProp'] ) ); - } else { - $tracks_data = array( 'clicked' => filter_var( wp_unslash( $_REQUEST['tracksEventProp'] ) ) ); - } - } - - $this->record_user_event( filter_var( wp_unslash( $_REQUEST['tracksEventName'] ) ), $tracks_data, null, false ); - - wp_send_json_success(); - } - - /** - * Register script necessary for tracking. - * - * @param boolean $enqueue Also enqueue? defaults to false. - */ - public static function register_tracks_functions_scripts( $enqueue = false ) { - - // Register jp-tracks as it is a dependency. - wp_register_script( - 'jp-tracks', - '//stats.wp.com/w.js', - array(), - gmdate( 'YW' ), - true - ); - - Assets::register_script( - 'jp-tracks-functions', - '../dist/tracks-callables.js', - __FILE__, - array( - 'dependencies' => array( 'jp-tracks' ), - 'enqueue' => $enqueue, - 'in_footer' => true, - ) - ); - } - - /** - * Enqueue script necessary for tracking. - */ - public function enqueue_tracks_scripts() { - Assets::register_script( - 'jptracks', - '../dist/tracks-ajax.js', - __FILE__, - array( - 'dependencies' => array( 'jquery' ), - 'enqueue' => true, - 'in_footer' => true, - ) - ); - - wp_localize_script( - 'jptracks', - 'jpTracksAJAX', - array( - 'ajaxurl' => admin_url( 'admin-ajax.php' ), - 'jpTracksAJAX_nonce' => wp_create_nonce( 'jp-tracks-ajax-nonce' ), - ) - ); - } - - /** - * Send an event in Tracks. - * - * @param string $event_type Type of the event. - * @param array $data Data to send with the event. - * @param mixed $user Username, user_id, or WP_user object. - * @param bool $use_product_prefix Whether to use the object's product name as a prefix to the event type. If - * set to false, the prefix will be 'jetpack_'. - */ - public function record_user_event( $event_type, $data = array(), $user = null, $use_product_prefix = true ) { - if ( ! $user ) { - $user = wp_get_current_user(); - } - $site_url = get_option( 'siteurl' ); - - $data['_via_ua'] = isset( $_SERVER['HTTP_USER_AGENT'] ) ? filter_var( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) ) : ''; - $data['_via_ip'] = isset( $_SERVER['REMOTE_ADDR'] ) ? filter_var( wp_unslash( $_SERVER['REMOTE_ADDR'] ) ) : ''; - $data['_lg'] = isset( $_SERVER['HTTP_ACCEPT_LANGUAGE'] ) ? filter_var( wp_unslash( $_SERVER['HTTP_ACCEPT_LANGUAGE'] ) ) : ''; - $data['blog_url'] = $site_url; - $data['blog_id'] = \Jetpack_Options::get_option( 'id' ); - - // Top level events should not be namespaced. - if ( '_aliasUser' !== $event_type ) { - $prefix = $use_product_prefix ? $this->product_name : 'jetpack'; - $event_type = $prefix . '_' . $event_type; - } - - $data['jetpack_version'] = defined( 'JETPACK__VERSION' ) ? JETPACK__VERSION : '0'; - - return $this->tracks_record_event( $user, $event_type, $data ); - } - - /** - * Record an event in Tracks - this is the preferred way to record events from PHP. - * - * @param mixed $user username, user_id, or WP_user object. - * @param string $event_name The name of the event. - * @param array $properties Custom properties to send with the event. - * @param int $event_timestamp_millis The time in millis since 1970-01-01 00:00:00 when the event occurred. - * - * @return bool true for success | \WP_Error if the event pixel could not be fired - */ - public function tracks_record_event( $user, $event_name, $properties = array(), $event_timestamp_millis = false ) { - - // We don't want to track user events during unit tests/CI runs. - if ( $user instanceof \WP_User && 'wptests_capabilities' === $user->cap_key ) { - return false; - } - $terms_of_service = new Terms_Of_Service(); - $status = new Status(); - // Don't track users who have not agreed to our TOS. - if ( ! $this->should_enable_tracking( $terms_of_service, $status ) ) { - return false; - } - - $event_obj = $this->tracks_build_event_obj( $user, $event_name, $properties, $event_timestamp_millis ); - - if ( is_wp_error( $event_obj->error ) ) { - return $event_obj->error; - } - - return $event_obj->record(); - } - - /** - * Determines whether tracking should be enabled. - * - * @param Automattic\Jetpack\Terms_Of_Service $terms_of_service A Terms_Of_Service object. - * @param Automattic\Jetpack\Status $status A Status object. - * - * @return boolean True if tracking should be enabled, else false. - */ - public function should_enable_tracking( $terms_of_service, $status ) { - if ( $status->is_offline_mode() ) { - return false; - } - - return $terms_of_service->has_agreed() || $this->connection->is_user_connected(); - } - - /** - * Procedurally build a Tracks Event Object. - * NOTE: Use this only when the simpler Automattic\Jetpack\Tracking->jetpack_tracks_record_event() function won't work for you. - * - * @param WP_user $user WP_user object. - * @param string $event_name The name of the event. - * @param array $properties Custom properties to send with the event. - * @param int $event_timestamp_millis The time in millis since 1970-01-01 00:00:00 when the event occurred. - * - * @return \Jetpack_Tracks_Event|\WP_Error - */ - private function tracks_build_event_obj( $user, $event_name, $properties = array(), $event_timestamp_millis = false ) { - $identity = $this->tracks_get_identity( $user->ID ); - - $properties['user_lang'] = $user->get( 'WPLANG' ); - - $blog_details = array( - 'blog_lang' => isset( $properties['blog_lang'] ) ? $properties['blog_lang'] : get_bloginfo( 'language' ), - ); - - $timestamp = ( false !== $event_timestamp_millis ) ? $event_timestamp_millis : round( microtime( true ) * 1000 ); - $timestamp_string = is_string( $timestamp ) ? $timestamp : number_format( $timestamp, 0, '', '' ); - - return new \Jetpack_Tracks_Event( - array_merge( - $blog_details, - (array) $properties, - $identity, - array( - '_en' => $event_name, - '_ts' => $timestamp_string, - ) - ) - ); - } - - /** - * Get the identity to send to tracks. - * - * @param int $user_id The user id of the local user. - * - * @return array $identity - */ - public function tracks_get_identity( $user_id ) { - - // Meta is set, and user is still connected. Use WPCOM ID. - $wpcom_id = get_user_meta( $user_id, 'jetpack_tracks_wpcom_id', true ); - if ( $wpcom_id && $this->connection->is_user_connected( $user_id ) ) { - return array( - '_ut' => 'wpcom:user_id', - '_ui' => $wpcom_id, - ); - } - - // User is connected, but no meta is set yet. Use WPCOM ID and set meta. - if ( $this->connection->is_user_connected( $user_id ) ) { - $wpcom_user_data = $this->connection->get_connected_user_data( $user_id ); - update_user_meta( $user_id, 'jetpack_tracks_wpcom_id', $wpcom_user_data['ID'] ); - - return array( - '_ut' => 'wpcom:user_id', - '_ui' => $wpcom_user_data['ID'], - ); - } - - // User isn't linked at all. Fall back to anonymous ID. - $anon_id = get_user_meta( $user_id, 'jetpack_tracks_anon_id', true ); - if ( ! $anon_id ) { - $anon_id = \Jetpack_Tracks_Client::get_anon_id(); - add_user_meta( $user_id, 'jetpack_tracks_anon_id', $anon_id, false ); - } - - if ( ! isset( $_COOKIE['tk_ai'] ) && ! headers_sent() ) { - setcookie( 'tk_ai', $anon_id, 0, COOKIEPATH, COOKIE_DOMAIN, is_ssl(), false ); // phpcs:ignore Jetpack.Functions.SetCookie -- This is a random string and should be fine. - } - - return array( - '_ut' => 'anon', - '_ui' => $anon_id, - ); - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-connection/src/class-urls.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-connection/src/class-urls.php deleted file mode 100644 index d411d5b4..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-connection/src/class-urls.php +++ /dev/null @@ -1,192 +0,0 @@ -update_user_token() instead. - * - * @param int $user_id The user id. - * @param string $token The user token. - * @param bool $is_master_user Whether the user is the master user. - * @return bool - */ - public static function update_user_token( $user_id, $token, $is_master_user ) { - _deprecated_function( __METHOD__, '1.24.0', 'Automattic\\Jetpack\\Connection\\Tokens->update_user_token' ); - return ( new Tokens() )->update_user_token( $user_id, $token, $is_master_user ); - } - - /** - * Filters the value of the api constant. - * - * @param String $constant_value The constant value. - * @param String $constant_name The constant name. - * @return mixed | null - */ - public static function jetpack_api_constant_filter( $constant_value, $constant_name ) { - if ( $constant_value !== null ) { - // If the constant value was already set elsewhere, use that value. - return $constant_value; - } - - if ( defined( "self::DEFAULT_$constant_name" ) ) { - return constant( "self::DEFAULT_$constant_name" ); - } - - return null; - } - - /** - * Add a filter to initialize default values of the constants. - */ - public static function init_default_constants() { - add_filter( - 'jetpack_constant_default_value', - array( __CLASS__, 'jetpack_api_constant_filter' ), - 10, - 2 - ); - } - - /** - * Filters the registration request body to include tracking properties. - * - * @param array $properties Already prepared tracking properties. - * @return array amended properties. - */ - public static function filter_register_request_body( $properties ) { - $tracking = new Tracking(); - $tracks_identity = $tracking->tracks_get_identity( get_current_user_id() ); - - return array_merge( - $properties, - array( - '_ui' => $tracks_identity['_ui'], - '_ut' => $tracks_identity['_ut'], - ) - ); - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-connection/src/class-webhooks.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-connection/src/class-webhooks.php deleted file mode 100644 index 1869a953..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-connection/src/class-webhooks.php +++ /dev/null @@ -1,213 +0,0 @@ -connection = $connection; - } - - /** - * Initialize the webhooks. - * - * @param Manager $connection The Connection Manager object. - */ - public static function init( $connection ) { - $webhooks = new static( $connection ); - - add_action( 'init', array( $webhooks, 'controller' ) ); - add_action( 'load-toplevel_page_jetpack', array( $webhooks, 'fallback_jetpack_controller' ) ); - } - - /** - * Jetpack plugin used to trigger this webhooks in Jetpack::admin_page_load() - * - * The Jetpack toplevel menu is still accessible for stand-alone plugins, and while there's no content for that page, there are still - * actions from Calypso and WPCOM that reach that route regardless of the site having the Jetpack plugin or not. That's why we are still handling it here. - */ - public function fallback_jetpack_controller() { - $this->controller( true ); - } - - /** - * The "controller" decides which handler we need to run. - * - * @param bool $force Do not check if it's a webhook request and just run the controller. - */ - public function controller( $force = false ) { - if ( ! $force ) { - // The nonce is verified in specific handlers. - // phpcs:ignore WordPress.Security.NonceVerification.Recommended - if ( empty( $_GET['handler'] ) || 'jetpack-connection-webhooks' !== $_GET['handler'] ) { - return; - } - } - - // phpcs:ignore WordPress.Security.NonceVerification.Recommended - if ( isset( $_GET['connect_url_redirect'] ) ) { - $this->handle_connect_url_redirect(); - } - - // phpcs:ignore WordPress.Security.NonceVerification.Recommended - if ( empty( $_GET['action'] ) ) { - return; - } - - // The nonce is verified in specific handlers. - // phpcs:ignore WordPress.Security.NonceVerification.Recommended - switch ( $_GET['action'] ) { - case 'authorize': - $this->handle_authorize(); - $this->do_exit(); - break; // @phan-suppress-current-line PhanPluginUnreachableCode -- Safer to include it even though do_exit never returns. - case 'authorize_redirect': - $this->handle_authorize_redirect(); - $this->do_exit(); - break; // @phan-suppress-current-line PhanPluginUnreachableCode -- Safer to include it even though do_exit never returns. - // Class Jetpack::admin_page_load() still handles other cases. - } - } - - /** - * Perform the authorization action. - */ - public function handle_authorize() { - if ( $this->connection->is_connected() && $this->connection->is_user_connected() ) { - $redirect_url = apply_filters( 'jetpack_client_authorize_already_authorized_url', admin_url() ); - wp_safe_redirect( $redirect_url ); - - return; - } - do_action( 'jetpack_client_authorize_processing' ); - - $data = stripslashes_deep( $_GET ); - $data['auth_type'] = 'client'; - $roles = new Roles(); - $role = $roles->translate_current_user_to_role(); - $redirect = isset( $data['redirect'] ) ? esc_url_raw( (string) $data['redirect'] ) : ''; - - check_admin_referer( "jetpack-authorize_{$role}_{$redirect}" ); - - $tracking = new Tracking(); - - $result = $this->connection->authorize( $data ); - - if ( is_wp_error( $result ) ) { - do_action( 'jetpack_client_authorize_error', $result ); - - $tracking->record_user_event( - 'jpc_client_authorize_fail', - array( - 'error_code' => $result->get_error_code(), - 'error_message' => $result->get_error_message(), - ) - ); - } else { - /** - * Fires after the Jetpack client is authorized to communicate with WordPress.com. - * - * @param int Jetpack Blog ID. - * - * @since 1.7.0 - * @since-jetpack 4.2.0 - */ - do_action( 'jetpack_client_authorized', Jetpack_Options::get_option( 'id' ) ); - - $tracking->record_user_event( 'jpc_client_authorize_success' ); - } - - $fallback_redirect = apply_filters( 'jetpack_client_authorize_fallback_url', admin_url() ); - $redirect = wp_validate_redirect( $redirect ) ? $redirect : $fallback_redirect; - - wp_safe_redirect( $redirect ); - } - - /** - * The authorhize_redirect webhook handler - */ - public function handle_authorize_redirect() { - $authorize_redirect_handler = new Webhooks\Authorize_Redirect( $this->connection ); - $authorize_redirect_handler->handle(); - } - - /** - * The `exit` is wrapped into a method so we could mock it. - * - * @return never - */ - protected function do_exit() { - exit; - } - - /** - * Handle the `connect_url_redirect` action, - * which is usually called to repeat an attempt for user to authorize the connection. - * - * @return void - */ - public function handle_connect_url_redirect() { - // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- no site changes. - $from = ! empty( $_GET['from'] ) ? sanitize_text_field( wp_unslash( $_GET['from'] ) ) : 'iframe'; - - // phpcs:ignore WordPress.Security.NonceVerification.Recommended, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- no site changes, sanitization happens in get_authorization_url() - $redirect = ! empty( $_GET['redirect_after_auth'] ) ? wp_unslash( $_GET['redirect_after_auth'] ) : false; - - add_filter( 'allowed_redirect_hosts', array( Host::class, 'allow_wpcom_environments' ) ); - - if ( ! $this->connection->is_user_connected() ) { - if ( ! $this->connection->is_connected() ) { - $this->connection->register(); - } - - $connect_url = add_query_arg( 'from', $from, $this->connection->get_authorization_url( null, $redirect ) ); - - // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- no site changes. - if ( isset( $_GET['notes_iframe'] ) ) { - $connect_url .= '¬es_iframe'; - } - wp_safe_redirect( $connect_url ); - $this->do_exit(); - } elseif ( ! isset( $_GET['calypso_env'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- no site changes. - ( new CookieState() )->state( 'message', 'already_authorized' ); - wp_safe_redirect( $redirect ); - $this->do_exit(); - } else { - $connect_url = add_query_arg( - array( - 'from' => $from, - 'already_authorized' => true, - ), - $this->connection->get_authorization_url() - ); - wp_safe_redirect( $connect_url ); - $this->do_exit(); - } - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-connection/src/class-xmlrpc-async-call.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-connection/src/class-xmlrpc-async-call.php deleted file mode 100644 index bc525104..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-connection/src/class-xmlrpc-async-call.php +++ /dev/null @@ -1,106 +0,0 @@ - [ - * $user_id => [ - * arrat of Jetpack_IXR_ClientMulticall - * ] - * ] - * ] - * - * @var array - */ - public static $clients = array(); - - /** - * Adds a new XMLRPC call to the queue to be processed on shutdown - * - * @param string $method The XML-RPC method. - * @param integer $user_id The user ID used to make the request (will use this user's token); Use 0 for the blog token. - * @param mixed ...$args This function accepts any number of additional arguments, that will be passed to the call. - * @return void - */ - public static function add_call( $method, $user_id = 0, ...$args ) { - global $blog_id; - - $client_blog_id = is_multisite() ? $blog_id : 0; - - if ( ! isset( self::$clients[ $client_blog_id ] ) ) { - self::$clients[ $client_blog_id ] = array(); - } - - if ( ! isset( self::$clients[ $client_blog_id ][ $user_id ] ) ) { - self::$clients[ $client_blog_id ][ $user_id ] = new Jetpack_IXR_ClientMulticall( array( 'user_id' => $user_id ) ); - } - - // https://plugins.trac.wordpress.org/ticket/2041 - if ( function_exists( 'ignore_user_abort' ) ) { - ignore_user_abort( true ); - } - - array_unshift( $args, $method ); - - call_user_func_array( array( self::$clients[ $client_blog_id ][ $user_id ], 'addCall' ), $args ); - - if ( false === has_action( 'shutdown', array( 'Automattic\Jetpack\Connection\XMLRPC_Async_Call', 'do_calls' ) ) ) { - add_action( 'shutdown', array( 'Automattic\Jetpack\Connection\XMLRPC_Async_Call', 'do_calls' ) ); - } - } - - /** - * Trigger the calls at shutdown - * - * @return void - */ - public static function do_calls() { - foreach ( self::$clients as $client_blog_id => $blog_clients ) { - if ( $client_blog_id > 0 ) { - $switch_success = switch_to_blog( $client_blog_id ); - - if ( ! $switch_success ) { - continue; - } - } - - foreach ( $blog_clients as $client ) { - if ( empty( $client->calls ) ) { - continue; - } - - flush(); - $client->query(); - } - - if ( $client_blog_id > 0 ) { - restore_current_blog(); - } - } - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-connection/src/class-xmlrpc-connector.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-connection/src/class-xmlrpc-connector.php deleted file mode 100644 index c3d786d8..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-connection/src/class-xmlrpc-connector.php +++ /dev/null @@ -1,83 +0,0 @@ -connection = $connection; - - // Adding the filter late to avoid being overwritten by Jetpack's XMLRPC server. - add_filter( 'xmlrpc_methods', array( $this, 'xmlrpc_methods' ), 20 ); - } - - /** - * Attached to the `xmlrpc_methods` filter. - * - * @param array $methods The already registered XML-RPC methods. - * @return array - */ - public function xmlrpc_methods( $methods ) { - return array_merge( - $methods, - array( - 'jetpack.verifyRegistration' => array( $this, 'verify_registration' ), - ) - ); - } - - /** - * Handles verification that a site is registered. - * - * @param array $registration_data The data sent by the XML-RPC client: - * [ $secret_1, $user_id ]. - * - * @return string|IXR_Error - */ - public function verify_registration( $registration_data ) { - return $this->output( $this->connection->handle_registration( $registration_data ) ); - } - - /** - * Normalizes output for XML-RPC. - * - * @param mixed $data The data to output. - */ - private function output( $data ) { - if ( is_wp_error( $data ) ) { - $code = $data->get_error_data(); - if ( ! $code ) { - $code = -10520; - } - - if ( ! class_exists( \IXR_Error::class ) ) { - require_once ABSPATH . WPINC . '/class-IXR.php'; - } - return new \IXR_Error( - $code, - sprintf( 'Jetpack: [%s] %s', $data->get_error_code(), $data->get_error_message() ) - ); - } - - return $data; - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-connection/src/interface-manager.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-connection/src/interface-manager.php deleted file mode 100644 index 804f3848..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-connection/src/interface-manager.php +++ /dev/null @@ -1,17 +0,0 @@ -connection = $connection; - } - - /** - * Handle the webhook - * - * This method implements what's in Jetpack::admin_page_load when the Jetpack plugin is not present - * - * @return never - */ - public function handle() { - - add_filter( - 'allowed_redirect_hosts', - function ( $domains ) { - $domains[] = 'jetpack.com'; - $domains[] = 'jetpack.wordpress.com'; - $domains[] = 'wordpress.com'; - // Calypso envs. - $domains[] = 'calypso.localhost'; - $domains[] = 'wpcalypso.wordpress.com'; - $domains[] = 'horizon.wordpress.com'; - return array_unique( $domains ); - } - ); - - // phpcs:ignore WordPress.Security.NonceVerification.Recommended - $dest_url = empty( $_GET['dest_url'] ) ? null : esc_url_raw( wp_unslash( $_GET['dest_url'] ) ); - - if ( ! $dest_url || ( 0 === stripos( $dest_url, 'https://jetpack.com/' ) && 0 === stripos( $dest_url, 'https://wordpress.com/' ) ) ) { - // The destination URL is missing or invalid, nothing to do here. - exit; - } - - // The user is either already connected, or finished the connection process. - if ( $this->connection->is_connected() && $this->connection->is_user_connected() ) { - if ( class_exists( '\Automattic\Jetpack\Licensing' ) && method_exists( '\Automattic\Jetpack\Licensing', 'handle_user_connected_redirect' ) ) { - Licensing::instance()->handle_user_connected_redirect( $dest_url ); - } - - wp_safe_redirect( $dest_url ); - exit; - } elseif ( ! empty( $_GET['done'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended - // The user decided not to proceed with setting up the connection. - - wp_safe_redirect( Admin_Menu::get_top_level_menu_item_url() ); - exit; - } - - $redirect_args = array( - 'page' => 'jetpack', - 'action' => 'authorize_redirect', - 'dest_url' => rawurlencode( $dest_url ), - 'done' => '1', - ); - - // phpcs:ignore WordPress.Security.NonceVerification.Recommended - if ( ! empty( $_GET['from'] ) && 'jetpack_site_only_checkout' === $_GET['from'] ) { - $redirect_args['from'] = 'jetpack_site_only_checkout'; - } - - wp_safe_redirect( $this->build_authorize_url( add_query_arg( $redirect_args, admin_url( 'admin.php' ) ) ) ); - exit; - } - - /** - * Create the Jetpack authorization URL. Copied from Jetpack class. - * - * @param bool|string $redirect URL to redirect to. - * - * @todo Update default value for redirect since the called function expects a string. - * - * @return mixed|void - */ - public function build_authorize_url( $redirect = false ) { - - add_filter( 'jetpack_connect_request_body', array( __CLASS__, 'filter_connect_request_body' ) ); - add_filter( 'jetpack_connect_redirect_url', array( __CLASS__, 'filter_connect_redirect_url' ) ); - - $url = $this->connection->get_authorization_url( wp_get_current_user(), $redirect ); - - remove_filter( 'jetpack_connect_request_body', array( __CLASS__, 'filter_connect_request_body' ) ); - remove_filter( 'jetpack_connect_redirect_url', array( __CLASS__, 'filter_connect_redirect_url' ) ); - - /** This filter is documented in plugins/jetpack/class-jetpack.php */ - return apply_filters( 'jetpack_build_authorize_url', $url ); - } - - /** - * Filters the redirection URL that is used for connect requests. The redirect - * URL should return the user back to the Jetpack console. - * Copied from Jetpack class. - * - * @param String $redirect the default redirect URL used by the package. - * @return String the modified URL. - */ - public static function filter_connect_redirect_url( $redirect ) { - $jetpack_admin_page = esc_url_raw( admin_url( 'admin.php?page=jetpack' ) ); - $redirect = $redirect - ? wp_validate_redirect( esc_url_raw( $redirect ), $jetpack_admin_page ) - : $jetpack_admin_page; - - // phpcs:ignore WordPress.Security.NonceVerification.Recommended - if ( isset( $_REQUEST['is_multisite'] ) ) { - $redirect = Jetpack_Network::init()->get_url( 'network_admin_page' ); - } - - return $redirect; - } - - /** - * Filters the connection URL parameter array. - * Copied from Jetpack class. - * - * @param array $args default URL parameters used by the package. - * @return array the modified URL arguments array. - */ - public static function filter_connect_request_body( $args ) { - if ( - Constants::is_defined( 'JETPACK__GLOTPRESS_LOCALES_PATH' ) - && include_once Constants::get_constant( 'JETPACK__GLOTPRESS_LOCALES_PATH' ) - ) { - $gp_locale = GP_Locales::by_field( 'wp_locale', get_locale() ); - $args['locale'] = isset( $gp_locale ) && isset( $gp_locale->slug ) - ? $gp_locale->slug - : ''; - } - - $tracking = new Tracking(); - $tracks_identity = $tracking->tracks_get_identity( $args['state'] ); - - $args = array_merge( - $args, - array( - '_ui' => $tracks_identity['_ui'], - '_ut' => $tracks_identity['_ut'], - ) - ); - - $calypso_env = self::get_calypso_env(); - - if ( ! empty( $calypso_env ) ) { - $args['calypso_env'] = $calypso_env; - } - - return $args; - } - - /** - * Return Calypso environment value; used for developing Jetpack and pairing - * it with different Calypso enrionments, such as localhost. - * Copied from Jetpack class. - * - * @since 1.37.1 - * - * @return string Calypso environment - */ - public static function get_calypso_env() { - // phpcs:ignore WordPress.Security.NonceVerification.Recommended - if ( isset( $_GET['calypso_env'] ) ) { - // phpcs:ignore WordPress.Security.NonceVerification.Recommended - return sanitize_key( $_GET['calypso_env'] ); - } - - if ( getenv( 'CALYPSO_ENV' ) ) { - return sanitize_key( getenv( 'CALYPSO_ENV' ) ); - } - - if ( defined( 'CALYPSO_ENV' ) && CALYPSO_ENV ) { - return sanitize_key( CALYPSO_ENV ); - } - - return ''; - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-constants/CHANGELOG.md b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-constants/CHANGELOG.md deleted file mode 100644 index 1e694fc8..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-constants/CHANGELOG.md +++ /dev/null @@ -1,199 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file. - -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) -and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - -## [2.0.1] - 2024-03-12 -### Changed -- Internal updates. - -## [2.0.0] - 2023-11-20 -### Changed -- Updated required PHP version to >= 7.0. [#34192] - -## [1.6.23] - 2023-08-23 -### Changed -- Updated package dependencies. [#32605] - -## [1.6.22] - 2023-04-10 -### Added -- Add Jetpack Autoloader package suggestion. [#29988] - -## [1.6.21] - 2023-02-20 -### Changed -- Minor internal updates. - -## [1.6.20] - 2022-12-02 -### Changed -- Updated package dependencies. [#27688] - -## [1.6.19] - 2022-11-22 -### Changed -- Updated package dependencies. [#27043] - -## [1.6.18] - 2022-07-26 -### Changed -- Updated package dependencies. [#25158] - -## [1.6.17] - 2022-06-21 -### Changed -- Renaming master to trunk. - -## [1.6.16] - 2022-04-26 -### Changed -- Updated package dependencies. - -## [1.6.15] - 2022-01-25 -### Changed -- Updated package dependencies. - -## [1.6.14] - 2022-01-04 -### Changed -- Switch to pcov for code coverage. -- Updated package dependencies - -## [1.6.13] - 2021-12-14 -### Changed -- Updated package dependencies. - -## [1.6.12] - 2021-11-22 -### Changed -- Updated package dependencies - -## [1.6.11] - 2021-11-02 -### Changed -- Set `convertDeprecationsToExceptions` true in PHPUnit config. -- Update PHPUnit configs to include just what needs coverage rather than include everything then try to exclude stuff that doesn't. - -## [1.6.10] - 2021-10-26 -### Fixed -- Updated is_true docblock to be more accurate. - -## [1.6.9] - 2021-10-13 -### Changed -- Updated package dependencies. - -## [1.6.8] - 2021-10-06 -### Changed -- Updated package dependencies - -## [1.6.7] - 2021-09-28 -### Changed -- Updated package dependencies. - -## [1.6.6] - 2021-08-30 -### Changed -- Run composer update on test-php command instead of phpunit -- Tests: update PHPUnit polyfills dependency (yoast/phpunit-polyfills). -- Updated versions in annotations - -## [1.6.5] - 2021-05-25 -### Changed -- Updated package dependencies. - -## [1.6.4] - 2021-04-08 -### Changed -- Packaging and build changes, no change to the package itself. - -## [1.6.3] - 2021-03-30 -### Added -- Composer alias for dev-master, to improve dependencies - -### Changed -- Update package dependencies. - -### Fixed -- Use `composer update` rather than `install` in scripts, as composer.lock isn't checked in. - -## [1.6.2] - 2021-02-05 - -- CI: Make tests more generic - -## [1.6.1] - 2021-01-19 - -- Add mirror-repo information to all current composer packages -- Monorepo: Reorganize all projects - -## [1.6.0] - 2020-12-14 - -- Update dependency brain/monkey to v2.6.0 -- Pin dependencies -- Packages: Update for PHP 8 testing - -## [1.5.1] - 2020-10-28 - -- Updated PHPCS: Packages and Debugger - -## [1.5.0] - 2020-08-13 - -- CI: Try collect js coverage -- Docker: Add package testing shortcut - -## [1.4.0] - 2020-07-01 - -- Package Unit tests: update test file names to make sure they runs in Travis - -## [1.3.0] - 2020-06-22 - -- PHPCS: Clean up the packages - -## [1.2.0] - 2020-04-15 - -- Use jp.com redirect in all links -- Connection: add a filter for setting Jetpack api constants - -## [1.1.3] - 2019-11-08 - -- Packages: Use classmap instead of PSR-4 - -## [1.1.2] - 2019-10-28 - -- Packages: Add gitattributes files to all packages that need th… - -## [1.1.1] - 2019-09-20 - -- Docs: Unify usage of @package phpdoc tags - -## [1.1.0] - 2019-09-14 - -## 1.0.0 - 2019-07-09 - -- Packages: Finish the constants package - -[2.0.1]: https://github.com/Automattic/jetpack-constants/compare/v2.0.0...v2.0.1 -[2.0.0]: https://github.com/Automattic/jetpack-constants/compare/v1.6.23...v2.0.0 -[1.6.23]: https://github.com/Automattic/jetpack-constants/compare/v1.6.22...v1.6.23 -[1.6.22]: https://github.com/Automattic/jetpack-constants/compare/v1.6.21...v1.6.22 -[1.6.21]: https://github.com/Automattic/jetpack-constants/compare/v1.6.20...v1.6.21 -[1.6.20]: https://github.com/Automattic/jetpack-constants/compare/v1.6.19...v1.6.20 -[1.6.19]: https://github.com/Automattic/jetpack-constants/compare/v1.6.18...v1.6.19 -[1.6.18]: https://github.com/Automattic/jetpack-constants/compare/v1.6.17...v1.6.18 -[1.6.17]: https://github.com/Automattic/jetpack-constants/compare/v1.6.16...v1.6.17 -[1.6.16]: https://github.com/Automattic/jetpack-constants/compare/v1.6.15...v1.6.16 -[1.6.15]: https://github.com/Automattic/jetpack-constants/compare/v1.6.14...v1.6.15 -[1.6.14]: https://github.com/Automattic/jetpack-constants/compare/v1.6.13...v1.6.14 -[1.6.13]: https://github.com/Automattic/jetpack-constants/compare/v1.6.12...v1.6.13 -[1.6.12]: https://github.com/Automattic/jetpack-constants/compare/v1.6.11...v1.6.12 -[1.6.11]: https://github.com/Automattic/jetpack-constants/compare/v1.6.10...v1.6.11 -[1.6.10]: https://github.com/Automattic/jetpack-constants/compare/v1.6.9...v1.6.10 -[1.6.9]: https://github.com/Automattic/jetpack-constants/compare/v1.6.8...v1.6.9 -[1.6.8]: https://github.com/Automattic/jetpack-constants/compare/v1.6.7...v1.6.8 -[1.6.7]: https://github.com/Automattic/jetpack-constants/compare/v1.6.6...v1.6.7 -[1.6.6]: https://github.com/Automattic/jetpack-constants/compare/v1.6.5...v1.6.6 -[1.6.5]: https://github.com/Automattic/jetpack-constants/compare/v1.6.4...v1.6.5 -[1.6.4]: https://github.com/Automattic/jetpack-constants/compare/v1.6.3...v1.6.4 -[1.6.3]: https://github.com/Automattic/jetpack-constants/compare/v1.6.2...v1.6.3 -[1.6.2]: https://github.com/Automattic/jetpack-constants/compare/v1.6.1...v1.6.2 -[1.6.1]: https://github.com/Automattic/jetpack-constants/compare/v1.6.0...v1.6.1 -[1.6.0]: https://github.com/Automattic/jetpack-constants/compare/v1.5.1...v1.6.0 -[1.5.1]: https://github.com/Automattic/jetpack-constants/compare/v1.5.0...v1.5.1 -[1.5.0]: https://github.com/Automattic/jetpack-constants/compare/v1.4.0...v1.5.0 -[1.4.0]: https://github.com/Automattic/jetpack-constants/compare/v1.3.0...v1.4.0 -[1.3.0]: https://github.com/Automattic/jetpack-constants/compare/v1.2.0...v1.3.0 -[1.2.0]: https://github.com/Automattic/jetpack-constants/compare/v1.1.3...v1.2.0 -[1.1.3]: https://github.com/Automattic/jetpack-constants/compare/v1.1.2...v1.1.3 -[1.1.2]: https://github.com/Automattic/jetpack-constants/compare/v1.1.1...v1.1.2 -[1.1.1]: https://github.com/Automattic/jetpack-constants/compare/v1.1.0...v1.1.1 -[1.1.0]: https://github.com/Automattic/jetpack-constants/compare/v1.0.0...v1.1.0 diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-constants/LICENSE.txt b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-constants/LICENSE.txt deleted file mode 100644 index e82774c1..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-constants/LICENSE.txt +++ /dev/null @@ -1,357 +0,0 @@ -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - - -=================================== - - -GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - -Copyright (C) 1989, 1991 Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -Everyone is permitted to copy and distribute verbatim copies -of this license document, but changing it is not allowed. - - Preamble - -The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Lesser General Public License instead.) You can apply it to -your programs, too. - -When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - -To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - -For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - -We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - -Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - -Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - -The precise terms and conditions for copying, distribution and -modification follow. - -GNU GENERAL PUBLIC LICENSE -TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - -0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - -1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - -2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - -a) You must cause the modified files to carry prominent notices -stating that you changed the files and the date of any change. - -b) You must cause any work that you distribute or publish, that in -whole or in part contains or is derived from the Program or any -part thereof, to be licensed as a whole at no charge to all third -parties under the terms of this License. - -c) If the modified program normally reads commands interactively -when run, you must cause it, when started running for such -interactive use in the most ordinary way, to print or display an -announcement including an appropriate copyright notice and a -notice that there is no warranty (or else, saying that you provide -a warranty) and that users may redistribute the program under -these conditions, and telling the user how to view a copy of this -License. (Exception: if the Program itself is interactive but -does not normally print such an announcement, your work based on -the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - -3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - -a) Accompany it with the complete corresponding machine-readable -source code, which must be distributed under the terms of Sections -1 and 2 above on a medium customarily used for software interchange; or, - -b) Accompany it with a written offer, valid for at least three -years, to give any third party, for a charge no more than your -cost of physically performing source distribution, a complete -machine-readable copy of the corresponding source code, to be -distributed under the terms of Sections 1 and 2 above on a medium -customarily used for software interchange; or, - -c) Accompany it with the information you received as to the offer -to distribute corresponding source code. (This alternative is -allowed only for noncommercial distribution and only if you -received the program in object code or executable form with such -an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - -4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - -5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - -6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - -7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - -8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - -9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - -10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - -11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - -12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - -How to Apply These Terms to Your New Programs - -If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - -To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - -Copyright (C) - -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along -with this program; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - -Gnomovision version 69, Copyright (C) year name of author -Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. -This is free software, and you are welcome to redistribute it -under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - -Yoyodyne, Inc., hereby disclaims all copyright interest in the program -`Gnomovision' (which makes passes at compilers) written by James Hacker. - -, 1 April 1989 -Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-constants/SECURITY.md b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-constants/SECURITY.md deleted file mode 100644 index 98f48dd1..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-constants/SECURITY.md +++ /dev/null @@ -1,47 +0,0 @@ -# Security Policy - -Full details of the Automattic Security Policy can be found on [automattic.com](https://automattic.com/security/). - -## Supported Versions - -Generally, only the latest version of Jetpack and its associated plugins have continued support. If a critical vulnerability is found in the current version of a plugin, we may opt to backport any patches to previous versions. - -## Reporting a Vulnerability - -Our HackerOne program covers the below plugin software, as well as a variety of related projects and infrastructure: - -* [Jetpack](https://jetpack.com/) -* Jetpack Backup -* Jetpack Boost -* Jetpack CRM -* Jetpack Protect -* Jetpack Search -* Jetpack Social -* Jetpack VideoPress - -**For responsible disclosure of security issues and to be eligible for our bug bounty program, please submit your report via the [HackerOne](https://hackerone.com/automattic) portal.** - -Our most critical targets are: - -* Jetpack and the Jetpack composer packages (all within this repo) -* Jetpack.com -- the primary marketing site. -* cloud.jetpack.com -- a management site. -* wordpress.com -- the shared management site for both Jetpack and WordPress.com sites. - -For more targets, see the `In Scope` section on [HackerOne](https://hackerone.com/automattic). - -_Please note that the **WordPress software is a separate entity** from Automattic. Please report vulnerabilities for WordPress through [the WordPress Foundation's HackerOne page](https://hackerone.com/wordpress)._ - -## Guidelines - -We're committed to working with security researchers to resolve the vulnerabilities they discover. You can help us by following these guidelines: - -* Follow [HackerOne's disclosure guidelines](https://www.hackerone.com/disclosure-guidelines). -* Pen-testing Production: - * Please **setup a local environment** instead whenever possible. Most of our code is open source (see above). - * If that's not possible, **limit any data access/modification** to the bare minimum necessary to reproduce a PoC. - * **_Don't_ automate form submissions!** That's very annoying for us, because it adds extra work for the volunteers who manage those systems, and reduces the signal/noise ratio in our communication channels. - * To be eligible for a bounty, all of these guidelines must be followed. -* Be Patient - Give us a reasonable time to correct the issue before you disclose the vulnerability. - -We also expect you to comply with all applicable laws. You're responsible to pay any taxes associated with your bounties. diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-constants/composer.json b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-constants/composer.json deleted file mode 100644 index cffcc416..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-constants/composer.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "name": "automattic/jetpack-constants", - "description": "A wrapper for defining constants in a more testable way.", - "type": "jetpack-library", - "license": "GPL-2.0-or-later", - "require": { - "php": ">=7.0" - }, - "require-dev": { - "brain/monkey": "2.6.1", - "yoast/phpunit-polyfills": "1.1.0", - "automattic/jetpack-changelogger": "^4.1.1" - }, - "suggest": { - "automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package." - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "scripts": { - "phpunit": [ - "./vendor/phpunit/phpunit/phpunit --colors=always" - ], - "test-php": [ - "@composer phpunit" - ] - }, - "minimum-stability": "dev", - "prefer-stable": true, - "extra": { - "autotagger": true, - "mirror-repo": "Automattic/jetpack-constants", - "changelogger": { - "link-template": "https://github.com/Automattic/jetpack-constants/compare/v${old}...v${new}" - }, - "branch-alias": { - "dev-trunk": "2.0.x-dev" - } - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-constants/src/class-constants.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-constants/src/class-constants.php deleted file mode 100644 index eaad50be..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-constants/src/class-constants.php +++ /dev/null @@ -1,124 +0,0 @@ -= 7.0. [#34192] - -## [1.5.1] - 2023-11-14 - -## [1.5.0] - 2023-11-13 -### Added -- Added 'cookieinformationscanner' and 'facebookexternalhit' to the bot user agent list. [#34026] - -## [1.4.27] - 2023-08-23 -### Changed -- Updated package dependencies. [#32605] - -## [1.4.26] - 2023-06-12 -### Fixed -- Catch PHP notice if User Agent is not available [#31279] - -## [1.4.25] - 2023-04-10 -### Added -- Add Jetpack Autoloader package suggestion. [#29988] - -## [1.4.24] - 2023-02-20 -### Changed -- Minor internal updates. - -## [1.4.23] - 2023-01-11 -### Changed -- Updated package dependencies. - -## [1.4.22] - 2022-12-02 -### Changed -- Updated package dependencies. [#27688] - -## [1.4.21] - 2022-11-22 -### Added -- Add a guard in `functions.php` against being loaded twice from different copies of the package. [#27475] - -### Changed -- Updated package dependencies. [#27043] - -## [1.4.20] - 2022-11-07 -### Fixed -- Ensure that User_Agent is loaded in environments without autoload enabled. (e.g.: WordPress.com and Super Cache) [#27223] - -## [1.4.19] - 2022-10-25 -### Changed -- Update `wp_unslash` wrapper to possibly run on wpcom before WordPress is loaded. [#26971] - -## [1.4.18] - 2022-07-26 -### Changed -- Updated package dependencies. [#25158] - -## [1.4.17] - 2022-06-21 -### Changed -- Renaming master to trunk. - -## [1.4.16] - 2022-04-26 -### Changed -- Updated package dependencies. - -## [1.4.15] - 2022-04-19 -### Changed -- PHPCS: Fix `WordPress.Security.ValidatedSanitizedInput` - -## [1.4.14] - 2022-03-29 -### Changed -- Microperformance: Use === null instead of is_null - -## [1.4.13] - 2022-02-09 -### Fixed -- Fixed some new PHPCS warnings. - -## [1.4.12] - 2022-01-25 -### Changed -- Updated package dependencies. - -## [1.4.11] - 2022-01-04 -### Changed -- Switch to pcov for code coverage. -- Updated package dependencies - -## [1.4.10] - 2021-12-14 -### Changed -- Updated package dependencies. - -## [1.4.9] - 2021-11-16 -### Fixed -- Verify $_SERVER['HTTP_USER_AGENT'] exists before use. - -## [1.4.8] - 2021-11-02 -### Changed -- Set `convertDeprecationsToExceptions` true in PHPUnit config. -- Update PHPUnit configs to include just what needs coverage rather than include everything then try to exclude stuff that doesn't. - -## [1.4.7] - 2021-10-19 -### Deprecated -- General: remove numerous long-deprecated functions. - -## [1.4.6] - 2021-10-13 -### Changed -- Updated package dependencies. - -## [1.4.5] - 2021-10-12 -### Changed -- Updated package dependencies - -## [1.4.4] - 2021-09-28 -### Changed -- Updated package dependencies. - -## [1.4.3] - 2021-08-31 -### Changed -- Run composer update on test-php command instead of phpunit. -- Tests: update PHPUnit polyfills dependency (yoast/phpunit-polyfills). -- Updated versions in annotations. - -## [1.4.2] - 2021-05-25 -### Changed -- Updated package dependencies. - -## [1.4.1] - 2021-04-27 -### Changed -- Updated package dependencies. - -## [1.4.0] - 2021-03-30 -### Added -- Added Opera Desktop detection -- Composer alias for dev-master, to improve dependencies - -### Changed -- Update package dependencies. - -### Fixed -- Use `composer update` rather than `install` in scripts, as composer.lock isn't checked in. - -## [1.3.2] - 2021-02-05 - -- CI: Make tests more generic - -## [1.3.1] - 2021-01-19 - -- Add mirror-repo information to all current composer packages -- Monorepo: Reorganize all projects - -## [1.3.0] - 2020-12-09 - -- Codesniffer: Update mediawiki/mediawiki-codesniffer dependency -- Pin dependencies -- Packages: Update for PHP 8 testing - -## [1.2.1] - 2020-11-10 - -- Improve PHP 8 compatibility -- Updated PHPCS: Packages and Debugger - -## [1.2.0] - 2020-10-19 - -- Replaced intval() with (int) as part of issue #17432. - -## [1.1.0] - 2020-08-13 - -- CI: Try collect js coverage - -## 1.0.0 - 2020-06-25 - -- Moving jetpack_is_mobile into a package - -[2.1.2]: https://github.com/Automattic/jetpack-device-detection/compare/v2.1.1...v2.1.2 -[2.1.1]: https://github.com/Automattic/jetpack-device-detection/compare/v2.1.0...v2.1.1 -[2.1.0]: https://github.com/Automattic/jetpack-device-detection/compare/v2.0.1...v2.1.0 -[2.0.1]: https://github.com/Automattic/jetpack-device-detection/compare/v2.0.0...v2.0.1 -[2.0.0]: https://github.com/Automattic/jetpack-device-detection/compare/v1.5.1...v2.0.0 -[1.5.1]: https://github.com/Automattic/jetpack-device-detection/compare/v1.5.0...v1.5.1 -[1.5.0]: https://github.com/Automattic/jetpack-device-detection/compare/v1.4.27...v1.5.0 -[1.4.27]: https://github.com/Automattic/jetpack-device-detection/compare/v1.4.26...v1.4.27 -[1.4.26]: https://github.com/Automattic/jetpack-device-detection/compare/v1.4.25...v1.4.26 -[1.4.25]: https://github.com/Automattic/jetpack-device-detection/compare/v1.4.24...v1.4.25 -[1.4.24]: https://github.com/Automattic/jetpack-device-detection/compare/v1.4.23...v1.4.24 -[1.4.23]: https://github.com/Automattic/jetpack-device-detection/compare/v1.4.22...v1.4.23 -[1.4.22]: https://github.com/Automattic/jetpack-device-detection/compare/v1.4.21...v1.4.22 -[1.4.21]: https://github.com/Automattic/jetpack-device-detection/compare/v1.4.20...v1.4.21 -[1.4.20]: https://github.com/Automattic/jetpack-device-detection/compare/v1.4.19...v1.4.20 -[1.4.19]: https://github.com/Automattic/jetpack-device-detection/compare/v1.4.18...v1.4.19 -[1.4.18]: https://github.com/Automattic/jetpack-device-detection/compare/v1.4.17...v1.4.18 -[1.4.17]: https://github.com/Automattic/jetpack-device-detection/compare/v1.4.16...v1.4.17 -[1.4.16]: https://github.com/Automattic/jetpack-device-detection/compare/v1.4.15...v1.4.16 -[1.4.15]: https://github.com/Automattic/jetpack-device-detection/compare/v1.4.14...v1.4.15 -[1.4.14]: https://github.com/Automattic/jetpack-device-detection/compare/v1.4.13...v1.4.14 -[1.4.13]: https://github.com/Automattic/jetpack-device-detection/compare/v1.4.12...v1.4.13 -[1.4.12]: https://github.com/Automattic/jetpack-device-detection/compare/v1.4.11...v1.4.12 -[1.4.11]: https://github.com/Automattic/jetpack-device-detection/compare/v1.4.10...v1.4.11 -[1.4.10]: https://github.com/Automattic/jetpack-device-detection/compare/v1.4.9...v1.4.10 -[1.4.9]: https://github.com/Automattic/jetpack-device-detection/compare/v1.4.8...v1.4.9 -[1.4.8]: https://github.com/Automattic/jetpack-device-detection/compare/v1.4.7...v1.4.8 -[1.4.7]: https://github.com/Automattic/jetpack-device-detection/compare/v1.4.6...v1.4.7 -[1.4.6]: https://github.com/Automattic/jetpack-device-detection/compare/v1.4.5...v1.4.6 -[1.4.5]: https://github.com/Automattic/jetpack-device-detection/compare/v1.4.4...v1.4.5 -[1.4.4]: https://github.com/Automattic/jetpack-device-detection/compare/v1.4.3...v1.4.4 -[1.4.3]: https://github.com/Automattic/jetpack-device-detection/compare/v1.4.2...v1.4.3 -[1.4.2]: https://github.com/Automattic/jetpack-device-detection/compare/v1.4.1...v1.4.2 -[1.4.1]: https://github.com/Automattic/jetpack-device-detection/compare/v1.4.0...v1.4.1 -[1.4.0]: https://github.com/Automattic/jetpack-device-detection/compare/v1.3.2...v1.4.0 -[1.3.2]: https://github.com/Automattic/jetpack-device-detection/compare/v1.3.1...v1.3.2 -[1.3.1]: https://github.com/Automattic/jetpack-device-detection/compare/v1.3.0...v1.3.1 -[1.3.0]: https://github.com/Automattic/jetpack-device-detection/compare/v1.2.1...v1.3.0 -[1.2.1]: https://github.com/Automattic/jetpack-device-detection/compare/v1.2.0...v1.2.1 -[1.2.0]: https://github.com/Automattic/jetpack-device-detection/compare/v1.1.0...v1.2.0 -[1.1.0]: https://github.com/Automattic/jetpack-device-detection/compare/v1.0.0...v1.1.0 diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-device-detection/LICENSE.txt b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-device-detection/LICENSE.txt deleted file mode 100644 index e82774c1..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-device-detection/LICENSE.txt +++ /dev/null @@ -1,357 +0,0 @@ -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - - -=================================== - - -GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - -Copyright (C) 1989, 1991 Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -Everyone is permitted to copy and distribute verbatim copies -of this license document, but changing it is not allowed. - - Preamble - -The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Lesser General Public License instead.) You can apply it to -your programs, too. - -When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - -To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - -For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - -We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - -Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - -Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - -The precise terms and conditions for copying, distribution and -modification follow. - -GNU GENERAL PUBLIC LICENSE -TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - -0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - -1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - -2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - -a) You must cause the modified files to carry prominent notices -stating that you changed the files and the date of any change. - -b) You must cause any work that you distribute or publish, that in -whole or in part contains or is derived from the Program or any -part thereof, to be licensed as a whole at no charge to all third -parties under the terms of this License. - -c) If the modified program normally reads commands interactively -when run, you must cause it, when started running for such -interactive use in the most ordinary way, to print or display an -announcement including an appropriate copyright notice and a -notice that there is no warranty (or else, saying that you provide -a warranty) and that users may redistribute the program under -these conditions, and telling the user how to view a copy of this -License. (Exception: if the Program itself is interactive but -does not normally print such an announcement, your work based on -the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - -3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - -a) Accompany it with the complete corresponding machine-readable -source code, which must be distributed under the terms of Sections -1 and 2 above on a medium customarily used for software interchange; or, - -b) Accompany it with a written offer, valid for at least three -years, to give any third party, for a charge no more than your -cost of physically performing source distribution, a complete -machine-readable copy of the corresponding source code, to be -distributed under the terms of Sections 1 and 2 above on a medium -customarily used for software interchange; or, - -c) Accompany it with the information you received as to the offer -to distribute corresponding source code. (This alternative is -allowed only for noncommercial distribution and only if you -received the program in object code or executable form with such -an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - -4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - -5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - -6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - -7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - -8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - -9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - -10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - -11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - -12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - -How to Apply These Terms to Your New Programs - -If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - -To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - -Copyright (C) - -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along -with this program; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - -Gnomovision version 69, Copyright (C) year name of author -Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. -This is free software, and you are welcome to redistribute it -under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - -Yoyodyne, Inc., hereby disclaims all copyright interest in the program -`Gnomovision' (which makes passes at compilers) written by James Hacker. - -, 1 April 1989 -Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-device-detection/SECURITY.md b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-device-detection/SECURITY.md deleted file mode 100644 index 98f48dd1..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-device-detection/SECURITY.md +++ /dev/null @@ -1,47 +0,0 @@ -# Security Policy - -Full details of the Automattic Security Policy can be found on [automattic.com](https://automattic.com/security/). - -## Supported Versions - -Generally, only the latest version of Jetpack and its associated plugins have continued support. If a critical vulnerability is found in the current version of a plugin, we may opt to backport any patches to previous versions. - -## Reporting a Vulnerability - -Our HackerOne program covers the below plugin software, as well as a variety of related projects and infrastructure: - -* [Jetpack](https://jetpack.com/) -* Jetpack Backup -* Jetpack Boost -* Jetpack CRM -* Jetpack Protect -* Jetpack Search -* Jetpack Social -* Jetpack VideoPress - -**For responsible disclosure of security issues and to be eligible for our bug bounty program, please submit your report via the [HackerOne](https://hackerone.com/automattic) portal.** - -Our most critical targets are: - -* Jetpack and the Jetpack composer packages (all within this repo) -* Jetpack.com -- the primary marketing site. -* cloud.jetpack.com -- a management site. -* wordpress.com -- the shared management site for both Jetpack and WordPress.com sites. - -For more targets, see the `In Scope` section on [HackerOne](https://hackerone.com/automattic). - -_Please note that the **WordPress software is a separate entity** from Automattic. Please report vulnerabilities for WordPress through [the WordPress Foundation's HackerOne page](https://hackerone.com/wordpress)._ - -## Guidelines - -We're committed to working with security researchers to resolve the vulnerabilities they discover. You can help us by following these guidelines: - -* Follow [HackerOne's disclosure guidelines](https://www.hackerone.com/disclosure-guidelines). -* Pen-testing Production: - * Please **setup a local environment** instead whenever possible. Most of our code is open source (see above). - * If that's not possible, **limit any data access/modification** to the bare minimum necessary to reproduce a PoC. - * **_Don't_ automate form submissions!** That's very annoying for us, because it adds extra work for the volunteers who manage those systems, and reduces the signal/noise ratio in our communication channels. - * To be eligible for a bounty, all of these guidelines must be followed. -* Be Patient - Give us a reasonable time to correct the issue before you disclose the vulnerability. - -We also expect you to comply with all applicable laws. You're responsible to pay any taxes associated with your bounties. diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-device-detection/composer.json b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-device-detection/composer.json deleted file mode 100644 index 12aa1e91..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-device-detection/composer.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "name": "automattic/jetpack-device-detection", - "description": "A way to detect device types based on User-Agent header.", - "type": "jetpack-library", - "license": "GPL-2.0-or-later", - "require": { - "php": ">=7.0" - }, - "require-dev": { - "yoast/phpunit-polyfills": "1.1.0", - "automattic/jetpack-changelogger": "^4.1.2" - }, - "suggest": { - "automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package." - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "scripts": { - "phpunit": [ - "./vendor/phpunit/phpunit/phpunit --colors=always" - ], - "test-php": [ - "@composer phpunit" - ] - }, - "minimum-stability": "dev", - "prefer-stable": true, - "extra": { - "autotagger": true, - "mirror-repo": "Automattic/jetpack-device-detection", - "changelogger": { - "link-template": "https://github.com/Automattic/jetpack-device-detection/compare/v${old}...v${new}" - }, - "branch-alias": { - "dev-trunk": "2.1.x-dev" - } - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-device-detection/src/class-device-detection.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-device-detection/src/class-device-detection.php deleted file mode 100644 index 14fb0709..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-device-detection/src/class-device-detection.php +++ /dev/null @@ -1,222 +0,0 @@ - (bool) Whether the current device is a mobile phone. - * 'is_smartphone' => (bool) Whether the current device is a smartphone. - * 'is_tablet' => (bool) Whether the current device is a tablet device. - * 'is_handheld' => (bool) Whether the current device is a handheld device. - * 'is_desktop' => (bool) Whether the current device is a laptop / desktop device. - * 'platform' => (string) Detected platform. - * 'is_phone_matched_ua' => (string) Matched UA. - * ); - */ - public static function get_info( $ua = '' ) { - $ua_info = new User_Agent_Info( $ua ); - - $info = array( - 'is_phone' => self::is_mobile( 'any', false, $ua_info ), - 'is_phone_matched_ua' => self::is_mobile( 'any', true, $ua_info ), - 'is_smartphone' => self::is_mobile( 'smart', false, $ua_info ), - 'is_tablet' => $ua_info->is_tablet(), - 'platform' => $ua_info->get_platform(), - ); - - $info['is_handheld'] = $info['is_phone'] || $info['is_tablet']; - $info['is_desktop'] = ! $info['is_handheld']; - - if ( function_exists( 'apply_filters' ) ) { - /** - * Filter the value of Device_Detection::get_info. - * - * @since 1.0.0 - * - * @param array $info Array of device information. - * @param string $ua User agent string passed to Device_Detection::get_info. - * @param User_Agent_Info $ua_info Instance of Automattic\Jetpack\Device_Detection\User_Agent_Info. - */ - $info = apply_filters( 'jetpack_device_detection_get_info', $info, $ua, $ua_info ); - } - return $info; - } - - /** - * Detects phone devices. - * - * @param string $ua User-Agent string. - * - * @return bool - */ - public static function is_phone( $ua = '' ) { - $device_info = self::get_info( $ua ); - return true === $device_info['is_phone']; - } - - /** - * Detects smartphone devices. - * - * @param string $ua User-Agent string. - * - * @return bool - */ - public static function is_smartphone( $ua = '' ) { - $device_info = self::get_info( $ua ); - return true === $device_info['is_smartphone']; - } - - /** - * Detects tablet devices. - * - * @param string $ua User-Agent string. - * - * @return bool - */ - public static function is_tablet( $ua = '' ) { - $device_info = self::get_info( $ua ); - return true === $device_info['is_tablet']; - } - - /** - * Detects desktop devices. - * - * @param string $ua User-Agent string. - * - * @return bool - */ - public static function is_desktop( $ua = '' ) { - $device_info = self::get_info( $ua ); - return true === $device_info['is_desktop']; - } - - /** - * Detects handheld (i.e. phone + tablet) devices. - * - * @param string $ua User-Agent string. - * - * @return bool - */ - public static function is_handheld( $ua = '' ) { - $device_info = self::get_info( $ua ); - return true === $device_info['is_handheld']; - } - - /** - * Determine if the current User Agent matches the passed $kind. - * - * @param string $kind Category of mobile device to check for. Either: any, dumb, smart. - * @param bool $return_matched_agent Boolean indicating if the UA should be returned. - * @param User_Agent_Info $ua_info Boolean indicating if the UA should be returned. - * - * @return bool|string Boolean indicating if current UA matches $kind. If `$return_matched_agent` is true, returns the UA string. - */ - private static function is_mobile( $kind, $return_matched_agent, $ua_info ) { - $kinds = array( - 'smart' => false, - 'dumb' => false, - 'any' => false, - ); - $first_run = true; - $matched_agent = ''; - - // If an invalid kind is passed in, reset it to default. - if ( ! isset( $kinds[ $kind ] ) ) { - $kind = 'any'; - } - - if ( empty( $_SERVER['HTTP_USER_AGENT'] ) ) { - return false; - } - - $agent = strtolower( filter_var( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) ) ); - if ( strpos( $agent, 'ipad' ) ) { - return false; - } - - // Remove Samsung Galaxy tablets (SCH-I800) from being mobile devices. - if ( strpos( $agent, 'sch-i800' ) ) { - return false; - } - - if ( $ua_info->is_android_tablet() && false === $ua_info->is_kindle_touch() ) { - return false; - } - - if ( $ua_info->is_blackberry_tablet() ) { - return false; - } - - if ( $first_run ) { - $first_run = false; - - // checks for iPhoneTier devices & RichCSS devices. - if ( $ua_info->isTierIphone() || $ua_info->isTierRichCSS() ) { - $kinds['smart'] = true; - $matched_agent = $ua_info->matched_agent; - } - - if ( ! $kinds['smart'] ) { - // if smart, we are not dumb so no need to check. - $dumb_agents = $ua_info->dumb_agents; - - foreach ( $dumb_agents as $dumb_agent ) { - if ( false !== strpos( $agent, $dumb_agent ) ) { - $kinds['dumb'] = true; - $matched_agent = $dumb_agent; - - break; - } - } - - if ( ! $kinds['dumb'] ) { - if ( isset( $_SERVER['HTTP_X_WAP_PROFILE'] ) ) { - $kinds['dumb'] = true; - $matched_agent = 'http_x_wap_profile'; - } elseif ( isset( $_SERVER['HTTP_ACCEPT'] ) && ( preg_match( '/wap\.|\.wap/i', $_SERVER['HTTP_ACCEPT'] ) || false !== strpos( strtolower( $_SERVER['HTTP_ACCEPT'] ), 'application/vnd.wap.xhtml+xml' ) ) ) { // phpcs:ignore WordPress.Security.ValidatedSanitizedInput -- This is doing the validating. - $kinds['dumb'] = true; - $matched_agent = 'vnd.wap.xhtml+xml'; - } - } - } - - if ( $kinds['dumb'] || $kinds['smart'] ) { - $kinds['any'] = true; - } - } - - $value = $kinds[ $kind ]; - - if ( $return_matched_agent ) { - $value = $matched_agent; - } - return $value; - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-device-detection/src/class-user-agent-info.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-device-detection/src/class-user-agent-info.php deleted file mode 100644 index 416fcd0a..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-device-detection/src/class-user-agent-info.php +++ /dev/null @@ -1,1592 +0,0 @@ -useragent = $ua; - } elseif ( ! empty( $_SERVER['HTTP_USER_AGENT'] ) ) { - $this->useragent = strtolower( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- This class is all about validating. - } - } - - /** - * This method detects the mobile User Agent name. - * - * @return string The matched User Agent name, false otherwise. - */ - public function get_mobile_user_agent_name() { - if ( static::is_chrome_for_iOS() ) { // Keep this check before the safari rule. - return 'chrome-for-ios'; - } elseif ( static::is_iphone_or_ipod( 'iphone-safari' ) ) { - return 'iphone'; - } elseif ( static::is_ipad( 'ipad-safari' ) ) { - return 'ipad'; - } elseif ( static::is_android_tablet() ) { // Keep this check before the android rule. - return 'android_tablet'; - } elseif ( static::is_android() ) { - return 'android'; - } elseif ( static::is_blackberry_10() ) { - return 'blackberry_10'; - } elseif ( static::is_blackbeberry() ) { - return 'blackberry'; - } elseif ( static::is_WindowsPhone7() ) { - return 'win7'; - } elseif ( static::is_windows_phone_8() ) { - return 'winphone8'; - } elseif ( static::is_opera_mini() ) { - return 'opera-mini'; - } elseif ( static::is_opera_mini_dumb() ) { - return 'opera-mini-dumb'; - } elseif ( static::is_opera_mobile() ) { - return 'opera-mobi'; - } elseif ( static::is_blackberry_tablet() ) { - return 'blackberry_tablet'; - } elseif ( static::is_kindle_fire() ) { - return 'kindle-fire'; - } elseif ( static::is_PalmWebOS() ) { - return 'webos'; - } elseif ( static::is_S60_OSSBrowser() ) { - return 'series60'; - } elseif ( static::is_firefox_os() ) { - return 'firefoxOS'; - } elseif ( static::is_firefox_mobile() ) { - return 'firefox_mobile'; - } elseif ( static::is_MaemoTablet() ) { - return 'maemo'; - } elseif ( static::is_MeeGo() ) { - return 'meego'; - } elseif ( static::is_TouchPad() ) { - return 'hp_tablet'; - } elseif ( static::is_facebook_for_iphone() ) { - return 'facebook-for-iphone'; - } elseif ( static::is_facebook_for_ipad() ) { - return 'facebook-for-ipad'; - } elseif ( static::is_twitter_for_iphone() ) { - return 'twitter-for-iphone'; - } elseif ( static::is_twitter_for_ipad() ) { - return 'twitter-for-ipad'; - } elseif ( static::is_wordpress_for_ios() ) { - return 'ios-app'; - } elseif ( static::is_iphone_or_ipod( 'iphone-not-safari' ) ) { - return 'iphone-unknown'; - } elseif ( static::is_ipad( 'ipad-not-safari' ) ) { - return 'ipad-unknown'; - } elseif ( static::is_Nintendo_3DS() ) { - return 'nintendo-3ds'; - } else { - $agent = $this->useragent; - $dumb_agents = $this->dumb_agents; - foreach ( $dumb_agents as $dumb_agent ) { - if ( false !== strpos( $agent, $dumb_agent ) ) { - return $dumb_agent; - } - } - } - - return false; - } - - /** - * This method detects the mobile device's platform. All return strings are from the class constants. - * Note that this function returns the platform name, not the UA name/type. You should use a different function - * if you need to test the UA capabilites. - * - * @return string|bool Name of the platform, false otherwise. - */ - public function get_platform() { - if ( isset( $this->platform ) ) { - return $this->platform; - } - - if ( empty( $this->useragent ) ) { - return false; - } - - if ( strpos( $this->useragent, 'windows phone' ) !== false ) { - $this->platform = self::PLATFORM_WINDOWS; - } elseif ( strpos( $this->useragent, 'windows ce' ) !== false ) { - $this->platform = self::PLATFORM_WINDOWS; - } elseif ( strpos( $this->useragent, 'ipad' ) !== false ) { - $this->platform = self::PLATFORM_IPAD; - } elseif ( strpos( $this->useragent, 'ipod' ) !== false ) { - $this->platform = self::PLATFORM_IPOD; - } elseif ( strpos( $this->useragent, 'iphone' ) !== false ) { - $this->platform = self::PLATFORM_IPHONE; - } elseif ( strpos( $this->useragent, 'android' ) !== false ) { - if ( static::is_android_tablet() ) { - $this->platform = self::PLATFORM_ANDROID_TABLET; - } else { - $this->platform = self::PLATFORM_ANDROID; - } - } elseif ( static::is_kindle_fire() ) { - $this->platform = self::PLATFORM_ANDROID_TABLET; - } elseif ( static::is_blackberry_10() ) { - $this->platform = self::PLATFORM_BLACKBERRY_10; - } elseif ( strpos( $this->useragent, 'blackberry' ) !== false ) { - $this->platform = self::PLATFORM_BLACKBERRY; - } elseif ( static::is_blackberry_tablet() ) { - $this->platform = self::PLATFORM_BLACKBERRY; - } elseif ( static::is_symbian_platform() ) { - $this->platform = self::PLATFORM_SYMBIAN; - } elseif ( static::is_symbian_s40_platform() ) { - $this->platform = self::PLATFORM_SYMBIAN_S40; - } elseif ( static::is_J2ME_platform() ) { - $this->platform = self::PLATFORM_J2ME_MIDP; - } elseif ( static::is_firefox_os() ) { - $this->platform = self::PLATFORM_FIREFOX_OS; - } else { - $this->platform = false; - } - - return $this->platform; - } - - /** - * This method detects for UA which can display iPhone-optimized web content. - * Includes iPhone, iPod Touch, Android, WebOS, Fennec (Firefox mobile), etc. - */ - public function isTierIphone() { - if ( isset( $this->isTierIphone ) ) { - return $this->isTierIphone; - } - if ( $this->is_iphoneOrIpod() ) { - $this->matched_agent = 'iphone'; - $this->isTierIphone = true; - $this->isTierRichCss = false; - $this->isTierGenericMobile = false; - } elseif ( static::is_android() ) { - $this->matched_agent = 'android'; - $this->isTierIphone = true; - $this->isTierRichCss = false; - $this->isTierGenericMobile = false; - } elseif ( static::is_windows_phone_8() ) { - $this->matched_agent = 'winphone8'; - $this->isTierIphone = true; - $this->isTierRichCss = false; - $this->isTierGenericMobile = false; - } elseif ( static::is_WindowsPhone7() ) { - $this->matched_agent = 'win7'; - $this->isTierIphone = true; - $this->isTierRichCss = false; - $this->isTierGenericMobile = false; - } elseif ( static::is_blackberry_10() ) { - $this->matched_agent = 'blackberry-10'; - $this->isTierIphone = true; - $this->isTierRichCss = false; - $this->isTierGenericMobile = false; - } elseif ( static::is_blackbeberry() && 'blackberry-webkit' === static::detect_blackberry_browser_version() ) { - $this->matched_agent = 'blackberry-webkit'; - $this->isTierIphone = true; - $this->isTierRichCss = false; - $this->isTierGenericMobile = false; - } elseif ( static::is_blackberry_tablet() ) { - $this->matched_agent = 'blackberry_tablet'; - $this->isTierIphone = true; - $this->isTierRichCss = false; - $this->isTierGenericMobile = false; - } elseif ( static::is_PalmWebOS() ) { - $this->matched_agent = 'webos'; - $this->isTierIphone = true; - $this->isTierRichCss = false; - $this->isTierGenericMobile = false; - } elseif ( static::is_TouchPad() ) { - $this->matched_agent = 'hp_tablet'; - $this->isTierIphone = true; - $this->isTierRichCss = false; - $this->isTierGenericMobile = false; - } elseif ( static::is_firefox_os() ) { - $this->matched_agent = 'firefoxOS'; - $this->isTierIphone = true; - $this->isTierRichCss = false; - $this->isTierGenericMobile = false; - } elseif ( static::is_firefox_mobile() ) { - $this->matched_agent = 'fennec'; - $this->isTierIphone = true; - $this->isTierRichCss = false; - $this->isTierGenericMobile = false; - } elseif ( static::is_opera_mobile() ) { - $this->matched_agent = 'opera-mobi'; - $this->isTierIphone = true; - $this->isTierRichCss = false; - $this->isTierGenericMobile = false; - } elseif ( static::is_MaemoTablet() ) { - $this->matched_agent = 'maemo'; - $this->isTierIphone = true; - $this->isTierRichCss = false; - $this->isTierGenericMobile = false; - } elseif ( static::is_MeeGo() ) { - $this->matched_agent = 'meego'; - $this->isTierIphone = true; - $this->isTierRichCss = false; - $this->isTierGenericMobile = false; - } elseif ( static::is_kindle_touch() ) { - $this->matched_agent = 'kindle-touch'; - $this->isTierIphone = true; - $this->isTierRichCss = false; - $this->isTierGenericMobile = false; - } elseif ( static::is_Nintendo_3DS() ) { - $this->matched_agent = 'nintendo-3ds'; - $this->isTierIphone = true; - $this->isTierRichCss = false; - $this->isTierGenericMobile = false; - } else { - $this->isTierIphone = false; - } - return $this->isTierIphone; - } - - /** - * This method detects for UA which are likely to be capable - * but may not necessarily support JavaScript. - * Excludes all iPhone Tier UA. - */ - public function isTierRichCss() { - if ( isset( $this->isTierRichCss ) ) { - return $this->isTierRichCss; - } - if ( $this->isTierIphone() ) { - return false; - } - - // The following devices are explicitly ok. - if ( static::is_S60_OSSBrowser() ) { - $this->matched_agent = 'series60'; - $this->isTierIphone = false; - $this->isTierRichCss = true; - $this->isTierGenericMobile = false; - } elseif ( static::is_opera_mini() ) { - $this->matched_agent = 'opera-mini'; - $this->isTierIphone = false; - $this->isTierRichCss = true; - $this->isTierGenericMobile = false; - } elseif ( static::is_blackbeberry() ) { - $detectedDevice = static::detect_blackberry_browser_version(); - if ( - 'blackberry-5' === $detectedDevice - || 'blackberry-4.7' === $detectedDevice - || 'blackberry-4.6' === $detectedDevice - ) { - $this->matched_agent = $detectedDevice; - $this->isTierIphone = false; - $this->isTierRichCss = true; - $this->isTierGenericMobile = false; - } - } else { - $this->isTierRichCss = false; - } - - return $this->isTierRichCss; - } - - /** - * Detects if the user is using a tablet. - * props Corey Gilmore, BGR.com - * - * @return bool - */ - public function is_tablet() { - return ( 0 // Never true, but makes it easier to manage our list of tablet conditions. - || self::is_ipad() - || self::is_android_tablet() - || self::is_blackberry_tablet() - || self::is_kindle_fire() - || self::is_MaemoTablet() - || self::is_TouchPad() - ); - } - - /** - * Detects if the current UA is the default iPhone or iPod Touch Browser. - * - * DEPRECATED: use is_iphone_or_ipod - */ - public function is_iphoneOrIpod() { - if ( empty( $_SERVER['HTTP_USER_AGENT'] ) ) { - return false; - } - - $ua = strtolower( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- This is validating. - if ( ( strpos( $ua, 'iphone' ) !== false ) || ( strpos( $ua, 'ipod' ) !== false ) ) { - if ( self::is_opera_mini() || self::is_opera_mobile() || self::is_firefox_mobile() ) { - return false; - } else { - return true; - } - } else { - return false; - } - } - - /** - * Detects if the current UA is iPhone Mobile Safari or another iPhone or iPod Touch Browser. - * - * They type can check for any iPhone, an iPhone using Safari, or an iPhone using something other than Safari. - * - * Note: If you want to check for Opera mini, Opera mobile or Firefox mobile (or any 3rd party iPhone browser), - * you should put the check condition before the check for 'iphone-any' or 'iphone-not-safari'. - * Otherwise those browsers will be 'catched' by the iphone string. - * - * @param string $type Type of iPhone detection. - */ - public static function is_iphone_or_ipod( $type = 'iphone-any' ) { - if ( empty( $_SERVER['HTTP_USER_AGENT'] ) ) { - return false; - } - - $ua = strtolower( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- This is validating. - $is_iphone = ( strpos( $ua, 'iphone' ) !== false ) || ( strpos( $ua, 'ipod' ) !== false ); - $is_safari = ( false !== strpos( $ua, 'safari' ) ); - - if ( 'iphone-safari' === $type ) { - return $is_iphone && $is_safari; - } elseif ( 'iphone-not-safari' === $type ) { - return $is_iphone && ! $is_safari; - } else { - return $is_iphone; - } - } - - /** - * Detects if the current UA is Chrome for iOS - * - * The User-Agent string in Chrome for iOS is the same as the Mobile Safari User-Agent, with CriOS/ instead of Version/. - * - Mozilla/5.0 (iPhone; U; CPU iPhone OS 5_1_1 like Mac OS X; en) AppleWebKit/534.46.0 (KHTML, like Gecko) CriOS/19.0.1084.60 Mobile/9B206 Safari/7534.48.3 - */ - public static function is_chrome_for_iOS() { - if ( empty( $_SERVER['HTTP_USER_AGENT'] ) ) { - return false; - } - - if ( self::is_iphone_or_ipod( 'iphone-safari' ) === false ) { - return false; - } - - $ua = strtolower( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- This is validating. - - if ( strpos( $ua, 'crios/' ) !== false ) { - return true; - } else { - return false; - } - } - - /** - * Detects if the current UA is Twitter for iPhone - * - * Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_3_5 like Mac OS X; nb-no) AppleWebKit/533.17.9 (KHTML, like Gecko) Mobile/8L1 Twitter for iPhone - * Mozilla/5.0 (iPhone; CPU iPhone OS 5_1_1 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Mobile/9B206 Twitter for iPhone - */ - public static function is_twitter_for_iphone() { - if ( empty( $_SERVER['HTTP_USER_AGENT'] ) ) { - return false; - } - - $ua = strtolower( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- This is validating. - - if ( strpos( $ua, 'ipad' ) !== false ) { - return false; - } - - if ( strpos( $ua, 'twitter for iphone' ) !== false ) { - return true; - } else { - return false; - } - } - - /** - * Detects if the current UA is Twitter for iPad - * - * Old version 4.X - Mozilla/5.0 (iPad; U; CPU OS 4_3_5 like Mac OS X; en-us) AppleWebKit/533.17.9 (KHTML, like Gecko) Mobile/8L1 Twitter for iPad - * Ver 5.0 or Higher - Mozilla/5.0 (iPad; CPU OS 5_1_1 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Mobile/9B206 Twitter for iPhone - */ - public static function is_twitter_for_ipad() { - if ( empty( $_SERVER['HTTP_USER_AGENT'] ) ) { - return false; - } - - $ua = strtolower( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- This is validating. - - if ( strpos( $ua, 'twitter for ipad' ) !== false ) { - return true; - } elseif ( strpos( $ua, 'ipad' ) !== false && strpos( $ua, 'twitter for iphone' ) !== false ) { - return true; - } else { - return false; - } - } - - /** - * Detects if the current UA is Facebook for iPhone - * - Facebook 4020.0 (iPhone; iPhone OS 5.0.1; fr_FR) - * - Mozilla/5.0 (iPhone; U; CPU iPhone OS 5_0 like Mac OS X; en_US) AppleWebKit (KHTML, like Gecko) Mobile [FBAN/FBForIPhone;FBAV/4.0.2;FBBV/4020.0;FBDV/iPhone3,1;FBMD/iPhone;FBSN/iPhone OS;FBSV/5.0;FBSS/2; FBCR/O2;FBID/phone;FBLC/en_US;FBSF/2.0] - * - Mozilla/5.0 (iPhone; CPU iPhone OS 5_1_1 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Mobile/9B206 [FBAN/FBIOS;FBAV/5.0;FBBV/47423;FBDV/iPhone3,1;FBMD/iPhone;FBSN/iPhone OS;FBSV/5.1.1;FBSS/2; FBCR/3ITA;FBID/phone;FBLC/en_US] - */ - public static function is_facebook_for_iphone() { - if ( empty( $_SERVER['HTTP_USER_AGENT'] ) ) { - return false; - } - - $ua = strtolower( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- This is validating. - - if ( false === strpos( $ua, 'iphone' ) ) { - return false; - } - - if ( false !== strpos( $ua, 'facebook' ) && false === strpos( $ua, 'ipad' ) ) { - return true; - } elseif ( false !== strpos( $ua, 'fbforiphone' ) && false === strpos( $ua, 'tablet' ) ) { - return true; - } elseif ( false !== strpos( $ua, 'fban/fbios;' ) && false === strpos( $ua, 'tablet' ) ) { // FB app v5.0 or higher. - return true; - } else { - return false; - } - } - - /** - * Detects if the current UA is Facebook for iPad - * - Facebook 4020.0 (iPad; iPhone OS 5.0.1; en_US) - * - Mozilla/5.0 (iPad; U; CPU iPhone OS 5_0 like Mac OS X; en_US) AppleWebKit (KHTML, like Gecko) Mobile [FBAN/FBForIPhone;FBAV/4.0.2;FBBV/4020.0;FBDV/iPad2,1;FBMD/iPad;FBSN/iPhone OS;FBSV/5.0;FBSS/1; FBCR/;FBID/tablet;FBLC/en_US;FBSF/1.0] - * - Mozilla/5.0 (iPad; CPU OS 6_0 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Mobile/10A403 [FBAN/FBIOS;FBAV/5.0;FBBV/47423;FBDV/iPad2,1;FBMD/iPad;FBSN/iPhone OS;FBSV/6.0;FBSS/1; FBCR/;FBID/tablet;FBLC/en_US] - */ - public static function is_facebook_for_ipad() { - if ( empty( $_SERVER['HTTP_USER_AGENT'] ) ) { - return false; - } - - $ua = strtolower( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- This is validating. - - if ( false === strpos( $ua, 'ipad' ) ) { - return false; - } - - if ( false !== strpos( $ua, 'facebook' ) || false !== strpos( $ua, 'fbforiphone' ) || false !== strpos( $ua, 'fban/fbios;' ) ) { - return true; - } else { - return false; - } - } - - /** - * Detects if the current UA is WordPress for iOS - */ - public static function is_wordpress_for_ios() { - if ( empty( $_SERVER['HTTP_USER_AGENT'] ) ) { - return false; - } - - $ua = strtolower( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- This is validating. - if ( false !== strpos( $ua, 'wp-iphone' ) ) { - return true; - } else { - return false; - } - } - - /** - * Detects if the current device is an iPad. - * They type can check for any iPad, an iPad using Safari, or an iPad using something other than Safari. - * - * Note: If you want to check for Opera mini, Opera mobile or Firefox mobile (or any 3rd party iPad browser), - * you should put the check condition before the check for 'iphone-any' or 'iphone-not-safari'. - * Otherwise those browsers will be 'catched' by the ipad string. - * - * @param string $type iPad type. - */ - public static function is_ipad( $type = 'ipad-any' ) { - - if ( empty( $_SERVER['HTTP_USER_AGENT'] ) ) { - return false; - } - - $ua = strtolower( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- This is validating. - - $is_ipad = ( false !== strpos( $ua, 'ipad' ) ); - $is_safari = ( false !== strpos( $ua, 'safari' ) ); - - if ( 'ipad-safari' === $type ) { - return $is_ipad && $is_safari; - } elseif ( 'ipad-not-safari' === $type ) { - return $is_ipad && ! $is_safari; - } else { - return $is_ipad; - } - } - - /** - * Detects if the current browser is Firefox Mobile (Fennec) - * - * See http://www.useragentstring.com/pages/Fennec/ - * Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.1.1) Gecko/20110415 Firefox/4.0.2pre Fennec/4.0.1 - * Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1b2pre) Gecko/20081015 Fennec/1.0a1 - */ - public static function is_firefox_mobile() { - - if ( empty( $_SERVER['HTTP_USER_AGENT'] ) ) { - return false; - } - - $ua = strtolower( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- This is validating. - - if ( strpos( $ua, 'fennec' ) !== false ) { - return true; - } else { - return false; - } - } - - /** - * Detects if the current browser is Firefox for desktop - * - * See https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/User-Agent/Firefox - * Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion - * The platform section will include 'Mobile' for phones and 'Tablet' for tablets. - */ - public static function is_firefox_desktop() { - - if ( empty( $_SERVER['HTTP_USER_AGENT'] ) ) { - return false; - } - - $ua = strtolower( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- This is validating. - - if ( false !== strpos( $ua, 'firefox' ) && false === strpos( $ua, 'mobile' ) && false === strpos( $ua, 'tablet' ) ) { - return true; - } else { - return false; - } - } - - /** - * Detects if the current browser is FirefoxOS Native browser - * - * Mozilla/5.0 (Mobile; rv:14.0) Gecko/14.0 Firefox/14.0 - */ - public static function is_firefox_os() { - - if ( empty( $_SERVER['HTTP_USER_AGENT'] ) ) { - return false; - } - - $ua = strtolower( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- This is validating. - - if ( strpos( $ua, 'mozilla' ) !== false && strpos( $ua, 'mobile' ) !== false && strpos( $ua, 'gecko' ) !== false && strpos( $ua, 'firefox' ) !== false ) { - return true; - } else { - return false; - } - } - - /** - * Detect modern Opera desktop - * - * Mozilla/5.0 (Macintosh; Intel Mac OS X 11_2_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.182 Safari/537.36 OPR/74.0.3911.203 - * - * Looking for "OPR/" specifically. - */ - public static function is_opera_desktop() { - if ( empty( $_SERVER['HTTP_USER_AGENT'] ) ) { - return false; - } - - if ( false === strpos( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ), 'OPR/' ) ) { // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- This is validating. - return false; - } - - return true; - } - - /** - * Detects if the current browser is Opera Mobile - * - * What is the difference between Opera Mobile and Opera Mini? - * - Opera Mobile is a full Internet browser for mobile devices. - * - Opera Mini always uses a transcoder to convert the page for a small display. - * (it uses Opera advanced server compression technology to compress web content before it gets to a device. - * The rendering engine is on Opera's server.) - * - * Opera/9.80 (Windows NT 6.1; Opera Mobi/14316; U; en) Presto/2.7.81 Version/11.00" - * Opera/9.50 (Nintendo DSi; Opera/507; U; en-US) - */ - public static function is_opera_mobile() { - if ( empty( $_SERVER['HTTP_USER_AGENT'] ) ) { - return false; - } - - $ua = strtolower( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- This is validating. - - if ( strpos( $ua, 'opera' ) !== false && strpos( $ua, 'mobi' ) !== false ) { - return true; - } elseif ( strpos( $ua, 'opera' ) !== false && strpos( $ua, 'nintendo dsi' ) !== false ) { - return true; - } else { - return false; - } - } - - /** - * Detects if the current browser is Opera Mini - * - * Opera/8.01 (J2ME/MIDP; Opera Mini/3.0.6306/1528; en; U; ssr) - * Opera/9.80 (Android;Opera Mini/6.0.24212/24.746 U;en) Presto/2.5.25 Version/10.5454 - * Opera/9.80 (iPhone; Opera Mini/5.0.019802/18.738; U; en) Presto/2.4.15 - * Opera/9.80 (J2ME/iPhone;Opera Mini/5.0.019802/886; U; ja) Presto/2.4.15 - * Opera/9.80 (J2ME/iPhone;Opera Mini/5.0.019802/886; U; ja) Presto/2.4.15 - * Opera/9.80 (Series 60; Opera Mini/5.1.22783/23.334; U; en) Presto/2.5.25 Version/10.54 - * Opera/9.80 (BlackBerry; Opera Mini/5.1.22303/22.387; U; en) Presto/2.5.25 Version/10.54 - */ - public static function is_opera_mini() { - if ( empty( $_SERVER['HTTP_USER_AGENT'] ) ) { - return false; - } - - $ua = strtolower( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- This is validating. - - if ( strpos( $ua, 'opera' ) !== false && strpos( $ua, 'mini' ) !== false ) { - return true; - } else { - return false; - } - } - - /** - * Detects if the current browser is Opera Mini, but not on a smart device OS(Android, iOS, etc) - * Used to send users on dumb devices to m.wor - */ - public static function is_opera_mini_dumb() { - if ( empty( $_SERVER['HTTP_USER_AGENT'] ) ) { - return false; - } - $ua = strtolower( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- This is validating. - - if ( self::is_opera_mini() ) { - if ( strpos( $ua, 'android' ) !== false || strpos( $ua, 'iphone' ) !== false || strpos( $ua, 'ipod' ) !== false - || strpos( $ua, 'ipad' ) !== false || strpos( $ua, 'blackberry' ) !== false ) { - return false; - } else { - return true; - } - } else { - return false; - } - } - - /** - * Detects if the current browser is a Windows Phone 7 device. - * ex: Mozilla/4.0 (compatible; MSIE 7.0; Windows Phone OS 7.0; Trident/3.1; IEMobile/7.0; LG; GW910) - */ - public static function is_WindowsPhone7() { - if ( empty( $_SERVER['HTTP_USER_AGENT'] ) ) { - return false; - } - - $ua = strtolower( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- This is validating. - - if ( false === strpos( $ua, 'windows phone os 7' ) ) { - return false; - } elseif ( self::is_opera_mini() || self::is_opera_mobile() || self::is_firefox_mobile() ) { - return false; - } else { - return true; - } - } - - /** - * Detects if the current browser is a Windows Phone 8 device. - * ex: Mozilla/5.0 (compatible; MSIE 10.0; Windows Phone 8.0; Trident/6.0; ARM; Touch; IEMobile/10.0; ; [;]) - */ - public static function is_windows_phone_8() { - if ( empty( $_SERVER['HTTP_USER_AGENT'] ) ) { - return false; - } - - $ua = strtolower( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- This is validating. - if ( strpos( $ua, 'windows phone 8' ) === false ) { - return false; - } else { - return true; - } - } - - /** - * Detects if the current browser is on a Palm device running the new WebOS. This EXCLUDES TouchPad. - * - * Ex1: Mozilla/5.0 (webOS/1.4.0; U; en-US) AppleWebKit/532.2 (KHTML, like Gecko) Version/1.0 Safari/532.2 Pre/1.1 - * Ex2: Mozilla/5.0 (webOS/1.4.0; U; en-US) AppleWebKit/532.2 (KHTML, like Gecko) Version/1.0 Safari/532.2 Pixi/1.1 - */ - public static function is_PalmWebOS() { - if ( empty( $_SERVER['HTTP_USER_AGENT'] ) ) { - return false; - } - - $ua = strtolower( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- This is validating. - - if ( false === strpos( $ua, 'webos' ) ) { - return false; - } elseif ( self::is_opera_mini() || self::is_opera_mobile() || self::is_firefox_mobile() ) { - return false; - } else { - return true; - } - } - - /** - * Detects if the current browser is the HP TouchPad default browser. This excludes phones wt WebOS. - * - * TouchPad Emulator: Mozilla/5.0 (hp-desktop; Linux; hpwOS/2.0; U; it-IT) AppleWebKit/534.6 (KHTML, like Gecko) wOSBrowser/233.70 Safari/534.6 Desktop/1.0 - * TouchPad: Mozilla/5.0 (hp-tablet; Linux; hpwOS/3.0.0; U; en-US) AppleWebKit/534.6 (KHTML, like Gecko) wOSBrowser/233.70 Safari/534.6 TouchPad/1.0 - */ - public static function is_TouchPad() { - if ( empty( $_SERVER['HTTP_USER_AGENT'] ) ) { - return false; - } - - $http_user_agent = strtolower( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- This is validating. - if ( false !== strpos( $http_user_agent, 'hp-tablet' ) || false !== strpos( $http_user_agent, 'hpwos' ) || false !== strpos( $http_user_agent, 'touchpad' ) ) { - if ( self::is_opera_mini() || self::is_opera_mobile() || self::is_firefox_mobile() ) { - return false; - } else { - return true; - } - } else { - return false; - } - } - - /** - * Detects if the current browser is the Series 60 Open Source Browser. - * - * OSS Browser 3.2 on E75: Mozilla/5.0 (SymbianOS/9.3; U; Series60/3.2 NokiaE75-1/110.48.125 Profile/MIDP-2.1 Configuration/CLDC-1.1 ) AppleWebKit/413 (KHTML, like Gecko) Safari/413 - * - * 7.0 Browser (Nokia 5800 XpressMusic (v21.0.025)) : Mozilla/5.0 (SymbianOS/9.4; U; Series60/5.0 Nokia5800d-1/21.0.025; Profile/MIDP-2.1 Configuration/CLDC-1.1 ) AppleWebKit/413 (KHTML, like Gecko) Safari/413 - * - * Browser 7.1 (Nokia N97 (v12.0.024)) : Mozilla/5.0 (SymbianOS/9.4; Series60/5.0 NokiaN97-1/12.0.024; Profile/MIDP-2.1 Configuration/CLDC-1.1; en-us) AppleWebKit/525 (KHTML, like Gecko) BrowserNG/7.1.12344 - */ - public static function is_S60_OSSBrowser() { - - if ( empty( $_SERVER['HTTP_USER_AGENT'] ) ) { - return false; - } - - $agent = strtolower( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- This is validating. - if ( self::is_opera_mini() || self::is_opera_mobile() || self::is_firefox_mobile() ) { - return false; - } - - $pos_webkit = strpos( $agent, 'webkit' ); - if ( false !== $pos_webkit ) { - // First, test for WebKit, then make sure it's either Symbian or S60. - if ( strpos( $agent, 'symbian' ) !== false || strpos( $agent, 'series60' ) !== false ) { - return true; - } else { - return false; - } - } elseif ( strpos( $agent, 'symbianos' ) !== false && strpos( $agent, 'series60' ) !== false ) { - return true; - } elseif ( strpos( $agent, 'nokia' ) !== false && strpos( $agent, 'series60' ) !== false ) { - return true; - } - - return false; - } - - /** - * Detects if the device platform is the Symbian Series 60. - */ - public static function is_symbian_platform() { - - if ( empty( $_SERVER['HTTP_USER_AGENT'] ) ) { - return false; - } - - $agent = strtolower( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- This is validating. - - $pos_webkit = strpos( $agent, 'webkit' ); - if ( false !== $pos_webkit ) { - // First, test for WebKit, then make sure it's either Symbian or S60. - if ( strpos( $agent, 'symbian' ) !== false || strpos( $agent, 'series60' ) !== false ) { - return true; - } else { - return false; - } - } elseif ( strpos( $agent, 'symbianos' ) !== false && strpos( $agent, 'series60' ) !== false ) { - return true; - } elseif ( strpos( $agent, 'nokia' ) !== false && strpos( $agent, 'series60' ) !== false ) { - return true; - } elseif ( strpos( $agent, 'opera mini' ) !== false ) { - if ( strpos( $agent, 'symbianos' ) !== false || strpos( $agent, 'symbos' ) !== false || strpos( $agent, 'series 60' ) !== false ) { - return true; - } - } - - return false; - } - - /** - * Detects if the device platform is the Symbian Series 40. - * Nokia Browser for Series 40 is a proxy based browser, previously known as Ovi Browser. - * This browser will report 'NokiaBrowser' in the header, however some older version will also report 'OviBrowser'. - */ - public static function is_symbian_s40_platform() { - - if ( empty( $_SERVER['HTTP_USER_AGENT'] ) ) { - return false; - } - - $agent = strtolower( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- This is validating. - - if ( strpos( $agent, 'series40' ) !== false ) { - if ( strpos( $agent, 'nokia' ) !== false || strpos( $agent, 'ovibrowser' ) !== false || strpos( $agent, 'nokiabrowser' ) !== false ) { - return true; - } - } - - return false; - } - - /** - * Returns if the device belongs to J2ME capable family. - * - * @return bool - */ - public static function is_J2ME_platform() { - - if ( empty( $_SERVER['HTTP_USER_AGENT'] ) ) { - return false; - } - - $agent = strtolower( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- This is validating. - - if ( strpos( $agent, 'j2me/midp' ) !== false ) { - return true; - } elseif ( strpos( $agent, 'midp' ) !== false && strpos( $agent, 'cldc' ) ) { - return true; - } - return false; - } - - /** - * Detects if the current UA is on one of the Maemo-based Nokia Internet Tablets. - */ - public static function is_MaemoTablet() { - - if ( empty( $_SERVER['HTTP_USER_AGENT'] ) ) { - return false; - } - - $agent = strtolower( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- This is validating. - - $pos_maemo = strpos( $agent, 'maemo' ); - if ( false === $pos_maemo ) { - return false; - } - - // Must be Linux + Tablet, or else it could be something else. - if ( strpos( $agent, 'tablet' ) !== false && strpos( $agent, 'linux' ) !== false ) { - if ( self::is_opera_mini() || self::is_opera_mobile() || self::is_firefox_mobile() ) { - return false; - } else { - return true; - } - } else { - return false; - } - } - - /** - * Detects if the current UA is a MeeGo device (Nokia Smartphone). - */ - public static function is_MeeGo() { - - if ( empty( $_SERVER['HTTP_USER_AGENT'] ) ) { - return false; - } - - $ua = strtolower( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- This is validating. - - if ( false === strpos( $ua, 'meego' ) ) { - return false; - } elseif ( self::is_opera_mini() || self::is_opera_mobile() || self::is_firefox_mobile() ) { - return false; - } else { - return true; - } - } - - /** - * The is_webkit() method can be used to check the User Agent for an webkit generic browser. - */ - public static function is_webkit() { - - if ( empty( $_SERVER['HTTP_USER_AGENT'] ) ) { - return false; - } - - $agent = strtolower( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- This is validating. - - $pos_webkit = strpos( $agent, 'webkit' ); - - if ( false !== $pos_webkit ) { - return true; - } else { - return false; - } - } - - /** - * Detects if the current browser is the Native Android browser. - * - * @return boolean true if the browser is Android otherwise false - */ - public static function is_android() { - if ( empty( $_SERVER['HTTP_USER_AGENT'] ) ) { - return false; - } - - $agent = strtolower( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- This is validating. - $pos_android = strpos( $agent, 'android' ); - if ( false !== $pos_android ) { - if ( self::is_opera_mini() || self::is_opera_mobile() || self::is_firefox_mobile() ) { - return false; - } else { - return true; - } - } else { - return false; - } - } - - /** - * Detects if the current browser is the Native Android Tablet browser. - * Assumes 'Android' should be in the user agent, but not 'mobile' - * - * @return boolean true if the browser is Android and not 'mobile' otherwise false - */ - public static function is_android_tablet() { - if ( empty( $_SERVER['HTTP_USER_AGENT'] ) ) { - return false; - } - - $agent = strtolower( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- This is validating. - - $pos_android = strpos( $agent, 'android' ); - $pos_mobile = strpos( $agent, 'mobile' ); - $post_android_app = strpos( $agent, 'wp-android' ); - - if ( false !== $pos_android && false === $pos_mobile && false === $post_android_app ) { - if ( self::is_opera_mini() || self::is_opera_mobile() || self::is_firefox_mobile() ) { - return false; - } else { - return true; - } - } else { - return false; - } - } - - /** - * Detects if the current browser is the Kindle Fire Native browser. - * - * Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_3; en-us; Silk/1.1.0-84) AppleWebKit/533.16 (KHTML, like Gecko) Version/5.0 Safari/533.16 Silk-Accelerated=true - * Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_3; en-us; Silk/1.1.0-84) AppleWebKit/533.16 (KHTML, like Gecko) Version/5.0 Safari/533.16 Silk-Accelerated=false - * - * @return boolean true if the browser is Kindle Fire Native browser otherwise false - */ - public static function is_kindle_fire() { - if ( empty( $_SERVER['HTTP_USER_AGENT'] ) ) { - return false; - } - - $agent = strtolower( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- This is validating. - $pos_silk = strpos( $agent, 'silk/' ); - $pos_silk_acc = strpos( $agent, 'silk-accelerated=' ); - if ( false !== $pos_silk && false !== $pos_silk_acc ) { - return true; - } else { - return false; - } - } - - /** - * Detects if the current browser is the Kindle Touch Native browser - * - * Mozilla/5.0 (X11; U; Linux armv7l like Android; en-us) AppleWebKit/531.2+ (KHTML, like Gecko) Version/5.0 Safari/533.2+ Kindle/3.0+ - * - * @return boolean true if the browser is Kindle monochrome Native browser otherwise false - */ - public static function is_kindle_touch() { - if ( empty( $_SERVER['HTTP_USER_AGENT'] ) ) { - return false; - } - $agent = strtolower( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- This is validating. - $pos_kindle_touch = strpos( $agent, 'kindle/3.0+' ); - if ( false !== $pos_kindle_touch && false === self::is_kindle_fire() ) { - return true; - } else { - return false; - } - } - - /** - * Detect if user agent is the WordPress.com Windows 8 app (used ONLY on the custom oauth stylesheet) - */ - public static function is_windows8_auth() { - if ( empty( $_SERVER['HTTP_USER_AGENT'] ) ) { - return false; - } - - $agent = strtolower( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- This is validating. - $pos = strpos( $agent, 'msauthhost' ); - if ( false !== $pos ) { - return true; - } else { - return false; - } - } - - /** - * Detect if user agent is the WordPress.com Windows 8 app. - */ - public static function is_wordpress_for_win8() { - if ( empty( $_SERVER['HTTP_USER_AGENT'] ) ) { - return false; - } - - $agent = strtolower( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- This is validating. - $pos = strpos( $agent, 'wp-windows8' ); - if ( false !== $pos ) { - return true; - } else { - return false; - } - } - - /** - * Detect if user agent is the WordPress.com Desktop app. - */ - public static function is_wordpress_desktop_app() { - if ( empty( $_SERVER['HTTP_USER_AGENT'] ) ) { - return false; - } - - $agent = strtolower( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- This is validating. - $pos = strpos( $agent, 'WordPressDesktop' ); - if ( false !== $pos ) { - return true; - } else { - return false; - } - } - - /** - * The is_blackberry_tablet() method can be used to check the User Agent for a RIM blackberry tablet. - * The user agent of the BlackBerry® Tablet OS follows a format similar to the following: - * Mozilla/5.0 (PlayBook; U; RIM Tablet OS 1.0.0; en-US) AppleWebKit/534.8+ (KHTML, like Gecko) Version/0.0.1 Safari/534.8+ - */ - public static function is_blackberry_tablet() { - - if ( empty( $_SERVER['HTTP_USER_AGENT'] ) ) { - return false; - } - - $agent = strtolower( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- This is validating. - $pos_playbook = stripos( $agent, 'PlayBook' ); - $pos_rim_tablet = stripos( $agent, 'RIM Tablet' ); - - if ( ( false === $pos_playbook ) || ( false === $pos_rim_tablet ) ) { - return false; - } else { - return true; - } - } - - /** - * The is_blackbeberry() method can be used to check the User Agent for a blackberry device. - * Note that opera mini on BB matches this rule. - */ - public static function is_blackbeberry() { - if ( empty( $_SERVER['HTTP_USER_AGENT'] ) ) { - return false; - } - - $agent = strtolower( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- This is validating. - - $pos_blackberry = strpos( $agent, 'blackberry' ); - if ( false !== $pos_blackberry ) { - if ( self::is_opera_mini() || self::is_opera_mobile() || self::is_firefox_mobile() ) { - return false; - } else { - return true; - } - } else { - return false; - } - } - - /** - * The is_blackberry_10() method can be used to check the User Agent for a BlackBerry 10 device. - */ - public static function is_blackberry_10() { - if ( empty( $_SERVER['HTTP_USER_AGENT'] ) ) { - return false; - } - $agent = strtolower( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- This is validating. - return ( strpos( $agent, 'bb10' ) !== false ) && ( strpos( $agent, 'mobile' ) !== false ); - } - - /** - * Retrieve the blackberry OS version. - * - * Return strings are from the following list: - * - blackberry-10 - * - blackberry-7 - * - blackberry-6 - * - blackberry-torch //only the first edition. The 2nd edition has the OS7 onboard and doesn't need any special rule. - * - blackberry-5 - * - blackberry-4.7 - * - blackberry-4.6 - * - blackberry-4.5 - * - * @return string Version of the BB OS. - * If version is not found, get_blackbeberry_OS_version will return boolean false. - */ - public static function get_blackbeberry_OS_version() { - - if ( empty( $_SERVER['HTTP_USER_AGENT'] ) ) { - return false; - } - - if ( self::is_blackberry_10() ) { - return 'blackberry-10'; - } - - $agent = strtolower( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- This is validating. - - $pos_blackberry = stripos( $agent, 'blackberry' ); - if ( false === $pos_blackberry ) { - // Not a blackberry device. - return false; - } - - // Blackberry devices OS 6.0 or higher. - // Mozilla/5.0 (BlackBerry; U; BlackBerry 9670; en) AppleWebKit/534.3+ (KHTML, like Gecko) Version/6.0.0.286 Mobile Safari/534.3+. - // Mozilla/5.0 (BlackBerry; U; BlackBerry 9800; en) AppleWebKit/534.1+ (KHTML, Like Gecko) Version/6.0.0.141 Mobile Safari/534.1+. - // Mozilla/5.0 (BlackBerry; U; BlackBerry 9900; en-US) AppleWebKit/534.11+ (KHTML, like Gecko) Version/7.0.0 Mobile Safari/534.11+. - $pos_webkit = stripos( $agent, 'webkit' ); - if ( false !== $pos_webkit ) { - // Detected blackberry webkit browser. - $pos_torch = stripos( $agent, 'BlackBerry 9800' ); - if ( false !== $pos_torch ) { - return 'blackberry-torch'; // Match the torch first edition. the 2nd edition should use the OS7 and doesn't need any special rule. - } elseif ( preg_match( '#Version\/([\d\.]+)#i', $agent, $matches ) ) { // Detecting the BB OS version for devices running OS 6.0 or higher. - $version = $matches[1]; - $version_num = explode( '.', $version ); - if ( false === is_array( $version_num ) || count( $version_num ) <= 1 ) { - return 'blackberry-6'; // not a BB device that match our rule. - } else { - return 'blackberry-' . $version_num[0]; - } - } else { - // if doesn't match returns the minimun version with a webkit browser. we should never fall here. - return 'blackberry-6'; // not a BB device that match our rule. - } - } - - // Blackberry devices <= 5.XX. - // BlackBerry9000/5.0.0.93 Profile/MIDP-2.0 Configuration/CLDC-1.1 VendorID/179. - if ( preg_match( '#BlackBerry\w+\/([\d\.]+)#i', $agent, $matches ) ) { - $version = $matches[1]; - } else { - return false; // not a BB device that match our rule. - } - - $version_num = explode( '.', $version ); - - if ( is_array( $version_num ) === false || count( $version_num ) <= 1 ) { - return false; - } - - $version_num_major = (int) $version_num[0]; - $version_num_minor = (int) $version_num[1]; - - if ( 5 === $version_num_major ) { - return 'blackberry-5'; - } elseif ( 4 === $version_num_major && 7 === $version_num_minor ) { - return 'blackberry-4.7'; - } elseif ( 4 === $version_num_major && 6 === $version_num_minor ) { - return 'blackberry-4.6'; - } elseif ( 4 === $version_num_major && 5 === $version_num_minor ) { - return 'blackberry-4.5'; - } else { - return false; - } - } - - /** - * Retrieve the blackberry browser version. - * - * Return string are from the following list: - * - blackberry-10 - * - blackberry-webkit - * - blackberry-5 - * - blackberry-4.7 - * - blackberry-4.6 - * - * @return string Type of the BB browser. - * If browser's version is not found, detect_blackbeberry_browser_version will return boolean false. - */ - public static function detect_blackberry_browser_version() { - - if ( empty( $_SERVER['HTTP_USER_AGENT'] ) ) { - return false; - } - - $agent = strtolower( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- This is validating. - - if ( self::is_blackberry_10() ) { - return 'blackberry-10'; - } - - $pos_blackberry = strpos( $agent, 'blackberry' ); - if ( false === $pos_blackberry ) { - // Not a blackberry device. - return false; - } - - $pos_webkit = strpos( $agent, 'webkit' ); - - if ( ! ( false === $pos_webkit ) ) { - return 'blackberry-webkit'; - } else { - if ( ! preg_match( '#BlackBerry\w+\/([\d\.]+)#i', $agent, $matches ) ) { - return false; // not a BB device that match our rule. - } - - $version_num = explode( '.', $matches[1] ); - - if ( false === is_array( $version_num ) || count( $version_num ) <= 1 ) { - return false; - } - - $version_num_major = (int) $version_num[0]; - $version_num_minor = (int) $version_num[1]; - - if ( 5 === $version_num_major ) { - return 'blackberry-5'; - } elseif ( 4 === $version_num_major && 7 === $version_num_minor ) { - return 'blackberry-4.7'; - } elseif ( 4 === $version_num_major && 6 === $version_num_minor ) { - return 'blackberry-4.6'; - } else { - // A very old BB device is found or this is a BB device that doesn't match our rules. - return false; - } - } - } - - /** - * Checks if a visitor is coming from one of the WordPress mobile apps. - * - * @return bool - */ - public static function is_mobile_app() { - - if ( empty( $_SERVER['HTTP_USER_AGENT'] ) ) { - return false; - } - - $agent = strtolower( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- This is validating. - - if ( isset( $_SERVER['X_USER_AGENT'] ) && preg_match( '|wp-webos|', $_SERVER['X_USER_AGENT'] ) ) { // phpcs:ignore WordPress.Security.ValidatedSanitizedInput -- This is validating. - return true; // Wp4webos 1.1 or higher. - } - - $app_agents = array( 'wp-android', 'wp-blackberry', 'wp-iphone', 'wp-nokia', 'wp-webos', 'wp-windowsphone' ); - // the mobile reader on iOS has an incorrect UA when loading the reader - // currently it is the default one provided by the iOS framework which - // causes problems with 2-step-auth - // User-Agent WordPress/3.1.4 CFNetwork/609 Darwin/13.0.0. - $app_agents[] = 'wordpress/3.1'; - - foreach ( $app_agents as $app_agent ) { - if ( false !== strpos( $agent, $app_agent ) ) { - return true; - } - } - return false; - } - - /** - * Detects if the current browser is Nintendo 3DS handheld. - * - * Example: Mozilla/5.0 (Nintendo 3DS; U; ; en) Version/1.7498.US - * can differ in language, version and region - */ - public static function is_Nintendo_3DS() { - if ( empty( $_SERVER['HTTP_USER_AGENT'] ) ) { - return false; - } - - $ua = strtolower( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- This is validating. - if ( strpos( $ua, 'nintendo 3ds' ) !== false ) { - return true; - } - return false; - } - - /** - * Was the current request made by a known bot? - * - * @return boolean - */ - public static function is_bot() { - static $is_bot = null; - - if ( empty( $_SERVER['HTTP_USER_AGENT'] ) ) { - return false; - } - - if ( $is_bot === null ) { - $is_bot = self::is_bot_user_agent( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- This is validating. - } - - return $is_bot; - } - - /** - * Is the given user-agent a known bot? - * If you want an is_bot check for the current request's UA, use is_bot() instead of passing a user-agent to this method. - * - * @param string $ua A user-agent string. - * - * @return boolean - */ - public static function is_bot_user_agent( $ua = null ) { - - if ( empty( $ua ) ) { - return false; - } - - $bot_agents = array( - 'alexa', - 'altavista', - 'ask jeeves', - 'attentio', - 'baiduspider', - 'bingbot', - 'chtml generic', - 'crawler', - 'fastmobilecrawl', - 'feedfetcher-google', - 'firefly', - 'froogle', - 'gigabot', - 'googlebot', - 'googlebot-mobile', - 'heritrix', - 'httrack', - 'ia_archiver', - 'irlbot', - 'iescholar', - 'infoseek', - 'jumpbot', - 'linkcheck', - 'lycos', - 'mediapartners', - 'mediobot', - 'motionbot', - 'msnbot', - 'mshots', - 'openbot', - 'pss-webkit-request', - 'pythumbnail', - 'scooter', - 'slurp', - 'snapbot', - 'spider', - 'taptubot', - 'technoratisnoop', - 'teoma', - 'twiceler', - 'yahooseeker', - 'yahooysmcm', - 'yammybot', - 'ahrefsbot', - 'pingdom.com_bot', - 'kraken', - 'yandexbot', - 'twitterbot', - 'tweetmemebot', - 'openhosebot', - 'queryseekerspider', - 'linkdexbot', - 'grokkit-crawler', - 'livelapbot', - 'germcrawler', - 'domaintunocrawler', - 'grapeshotcrawler', - 'cloudflare-alwaysonline', - 'cookieinformationscanner', // p1699315886066389-slack-C0438NHCLSY - 'facebookexternalhit', // https://www.facebook.com/externalhit_uatext.php - 'feedburner', - 'yacybot', // http://yacy.net/bot.html - 'trendictionbot', // http://www.trendiction.de/bot; - 'elisabot', - 'linkfluence', // http://linkfluence.com/ - 'semrushbot', // https://www.semrush.com/bot/ - 'archive.org_bot', // http://archive.org/details/archive.org_bot - 'ezlynxbot', // https://www.ezoic.com/bot - 'siteauditbot', // https://www.semrush.com/bot/ - 'snapchat', // https://developers.snap.com/robots - 'applebot', // https://support.apple.com/en-ca/HT204683 - 'bne.es_bot', // https://www.bne.es/es/colecciones/archivo-web-espanola/aviso-webmasters - 'google-safety;', // https://www.google.com/bot.html - 'mojeekbot', // https://www.mojeek.com/bot.html - ); - - foreach ( $bot_agents as $bot_agent ) { - if ( false !== stripos( $ua, $bot_agent ) ) { - return true; - } - } - - return false; - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-device-detection/src/functions.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-device-detection/src/functions.php deleted file mode 100644 index a530e7f9..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-device-detection/src/functions.php +++ /dev/null @@ -1,36 +0,0 @@ -= 7.0. [#34192] - -## [0.11.3] - 2023-11-14 -### Changed -- Updated package dependencies. [#34093] - -## [0.11.2] - 2023-11-03 - -## [0.11.1] - 2023-10-19 -### Changed -- Updated package dependencies. [#33687] - -### Fixed -- Fix possible use of an undefined variable. [#33668] - -## [0.11.0] - 2023-10-17 -### Changed -- Updated package dependencies. [#33646] - -### Fixed -- Added search and replace protection for wpcom urls stored in the database. [#33412] - -## [0.10.7] - 2023-10-16 -### Changed -- Updated package dependencies. [#33429] - -## [0.10.6] - 2023-10-10 -### Changed -- Updated package dependencies. [#33428] - -## [0.10.5] - 2023-09-19 -### Changed -- Updated package dependencies. [#33001] - -## [0.10.4] - 2023-09-11 -### Changed -- General: remove WP 6.1 backwards compatibility checks [#32772] - -## [0.10.3] - 2023-09-04 -### Changed -- Updated package dependencies. [#32803] -- Updated package dependencies. [#32804] - -## [0.10.2] - 2023-08-23 -### Changed -- Updated package dependencies. [#32605] - -## [0.10.1] - 2023-08-09 -### Changed -- Updated package dependencies. [#32166] - -## [0.10.0] - 2023-08-07 -### Changed -- Make IDC container ID adjustable. - -## [0.9.0] - 2023-08-01 -### Added -- URL secret to detect multi-domain sites. [#32005] - -## [0.8.52] - 2023-07-25 -### Changed -- Updated package dependencies. [#32040] - -## [0.8.51] - 2023-07-17 -### Changed -- Updated package dependencies. [#31785] - -## [0.8.50] - 2023-07-05 -### Changed -- Updated package dependencies. [#31659] - -## [0.8.49] - 2023-06-26 -### Changed -- Updated package dependencies. [#31468] - -## [0.8.48] - 2023-06-06 -### Changed -- Updated package dependencies. [#31129] - -## [0.8.47] - 2023-05-15 -### Changed -- Internal updates. - -## [0.8.46] - 2023-05-02 -### Changed -- Updated package dependencies. - -## [0.8.45] - 2023-05-01 -### Changed -- Internal updates. - -## [0.8.44] - 2023-04-17 -### Changed -- Updated package dependencies. [#30019] - -## [0.8.43] - 2023-04-10 -### Added -- Add Jetpack Autoloader package suggestion. [#29988] - -## [0.8.42] - 2023-04-04 -### Changed -- Updated package dependencies. [#29854] - -## [0.8.41] - 2023-04-03 -### Changed -- Internal updates. - -## [0.8.40] - 2023-03-20 -### Changed -- Updated package dependencies. [#29471] - -## [0.8.39] - 2023-03-08 -### Changed -- Updated package dependencies. [#29216] - -## [0.8.38] - 2023-02-20 -### Changed -- Minor internal updates. - -## [0.8.37] - 2023-02-15 -### Changed -- Update to React 18. [#28710] - -## [0.8.36] - 2023-02-08 -### Changed -- Updated package dependencies. [#28682] - -## [0.8.35] - 2023-01-25 -### Changed -- Minor internal updates. - -## [0.8.34] - 2023-01-11 -### Changed -- Updated package dependencies. [#28127] - -## [0.8.33] - 2022-12-02 -### Changed -- Updated package dependencies. [#27688] - -## [0.8.32] - 2022-11-22 -### Changed -- Updated package dependencies. [#27043] - -## [0.8.31] - 2022-11-10 -### Changed -- Updated package dependencies. [#27319] - -## [0.8.30] - 2022-11-08 -### Changed -- Updated package dependencies. [#27289] - -## [0.8.29] - 2022-11-07 -### Changed -- Updated package dependencies. [#27278] - -## [0.8.28] - 2022-11-01 -### Changed -- Updated package dependencies. [#27196] - -## [0.8.27] - 2022-10-25 -### Changed -- Updated package dependencies. [#26705] - -## [0.8.26] - 2022-10-13 -### Changed -- Updated package dependencies. [#26791] - -## [0.8.25] - 2022-10-05 -### Changed -- Updated package dependencies. [#26568] - -## [0.8.24] - 2022-09-20 -### Changed -- Updated package dependencies. - -## [0.8.23] - 2022-09-08 -### Changed -- Updated package dependencies. - -## [0.8.22] - 2022-08-29 -### Changed -- Updated package dependencies. - -## [0.8.21] - 2022-08-25 -### Changed -- Updated package dependencies. [#25814] - -## [0.8.20] - 2022-08-23 -### Changed -- Updated package dependencies. [#25338, #25339, #25628, #25762] - -## [0.8.19] - 2022-08-03 -### Changed -- Updated package dependencies. [#25300, #25315] - -## [0.8.18] - 2022-07-26 -### Changed -- Updated package dependencies. [#25158] - -## [0.8.17] - 2022-07-12 -### Changed -- Updated package dependencies. - -## [0.8.16] - 2022-07-06 -### Changed -- Updated package dependencies. [#24923] - -## [0.8.15] - 2022-06-21 -### Changed -- Renaming master to trunk. [#24661] - -## [0.8.14] - 2022-06-14 -### Changed -- Updated package dependencies. [#24529] - -## [0.8.13] - 2022-06-08 -### Changed -- Reorder JS imports for `import/order` eslint rule. [#24601] - -## [0.8.12] - 2022-05-30 -### Changed -- Updated package dependencies - -## [0.8.11] - 2022-05-18 -### Changed -- Updated package dependencies [#24372] - -## [0.8.10] - 2022-05-10 -### Changed -- Updated package dependencies. [#24302] - -## [0.8.9] - 2022-05-04 -### Added -- Add missing JavaScript dependencies. [#24096] - -### Changed -- Updated package dependencies. [#24095] [#24198] - -### Deprecated -- Moved the options class into Connection. [#24095] - -## [0.8.8] - 2022-04-26 -### Changed -- Updated package dependencies. -- Update package.json metadata. - -## [0.8.7] - 2022-04-19 -### Changed -- PHPCS: Fix `WordPress.Security.ValidatedSanitizedInput` - -## [0.8.6] - 2022-04-12 -### Changed -- Updated package dependencies. - -## [0.8.5] - 2022-04-06 -### Changed -- Updated package dependencies - -### Removed -- Removed tracking dependency. - -## [0.8.4] - 2022-03-29 -### Changed -- Microperformance: Use === null instead of is_null -- Updated package dependencies. - -## [0.8.3] - 2022-03-23 -### Changed -- Updated package dependencies - -## [0.8.2] - 2022-03-15 -### Changed -- Updated package dependencies. - -## [0.8.1] - 2022-03-08 -### Changed -- Updated package dependencies. - -## [0.8.0] - 2022-03-02 -### Added -- IDC: add detection for possibly dynamic HTTP_HOST being used in WP_SITEURL or WP_HOME. - -### Changed -- Bring back the IDC screen in Staging mode. -- Updated package dependencies. - -## [0.7.4] - 2022-02-22 -### Added -- Add blog ID to event tracking. - -## [0.7.3] - 2022-02-16 -### Changed -- Updated package dependencies. - -## [0.7.2] - 2022-02-09 -### Changed -- Updated package dependencies - -## [0.7.1] - 2022-02-02 -### Changed -- Updated package dependencies. - -## [0.7.0] - 2022-01-27 -### Changed -- IDC "Safe Mode" admin bar button redesign. - -## [0.6.4] - 2022-01-25 -### Changed -- Add class notice to the IDC container div. -- Add missing JS peer dependency. -- Updated package dependencies. - -## [0.6.3] - 2022-01-18 -### Changed -- General: update required node version to v16.13.2 - -## [0.6.2] - 2022-01-11 -### Changed -- Updated package dependencies. - -## [0.6.1] - 2022-01-11 -### Fixed -- Do not add IDC query args to authenticated request when in offline or staging mode. - -## [0.6.0] - 2022-01-04 -### Added -- Build and display the new RNA IDC banner. - -### Changed -- Switch to pcov for code coverage. -- Updated package dependencies. -- Updated package textdomain from `jetpack` to `jetpack-idc`. -- Updated references to '.jp-recommendations__app-badge' to its new name '.apps-badge' - -## [0.5.0] - 2021-12-14 -### Added -- Add a method to determine the safe mode status. - -### Changed -- Updated package dependencies. - -## [0.4.4] - 2021-11-30 -### Changed -- Colors: update Jetpack Primary color to match latest brand book. -- Remove now-redundant `output.filename` from Webpack config. - -## [0.4.3] - 2021-11-23 -### Changed -- Updated package dependencies. - -## [0.4.2] - 2021-11-17 - -## [0.4.1] - 2021-11-16 -### Added -- Use monorepo `validate-es` script to validate Webpack builds. - -### Changed -- Updated package dependencies - -## [0.4.0] - 2021-11-09 -### Added -- Add a method to unambiguously determine whether the site is experiencing identity crisis. - -### Changed -- Updated package dependencies. -- Update webpack build config. Removes IE 11 support in the JavaScript. - -## [0.3.1] - 2021-11-02 -### Changed -- Add the idc url query args to remote requests -- Set `convertDeprecationsToExceptions` true in PHPUnit config. -- Update PHPUnit configs to include just what needs coverage rather than include everything then try to exclude stuff that doesn't. - -## [0.3.0] - 2021-10-26 -### Added -- Add redirect_uri parameter for IDC Start Fresh endpoint. -- Delete the migrate_for_idc option when a remote request returns migrated_for_idc - -### Changed -- Updated package dependencies - -## [0.2.8] - 2021-10-13 -### Changed -- Updated package dependencies. - -## [0.2.7] - 2021-10-12 -### Added -- Add the new check_response_for_idc method to the Identity_Crisis class - -### Changed -- Updated package dependencies - -## [0.2.6] - 2021-09-28 -### Changed -- Allow Node ^14.17.6 to be used in this project. This shouldn't change the behavior of the code itself. -- IDC: Rename the Identity_Crisis::sync_idc_optin method to Identity_Crisis:should_handle_idc. Add a new filter and constant that use the new name. -- Updated package dependencies. - -## [0.2.5] - 2021-08-31 -### Changed -- Updated package dependencies. - -## [0.2.4] - 2021-08-30 -### Changed -- Bump changelogger version -- Tests: update PHPUnit polyfills dependency (yoast/phpunit-polyfills). -- update annotations versions -- Update to latest webpack, webpack-cli and calypso-build -- Use Node 16.7.0 in tooling. This shouldn't change the behavior of the code itself. - -## [0.2.3] - 2021-08-12 -### Changed -- Updated package dependencies - -## [0.2.2] - 2021-07-27 -### Added -- Add jetpack_connection_disconnect_site_wpcom filter. - -## [0.2.1] - 2021-07-13 -### Changed -- Updated package dependencies. - -## [0.2.0] - 2021-06-29 -### Added -- Add jetpack_idc_disconnect hook to properly disconnect based on IDC settings and clear IDC options. - -### Changed -- Migrate jetpack/v4/identity-crisis endpoints into package. -- Update node version requirement to 14.16.1 - -## 0.1.0 - 2021-06-15 -### Added -- Sync: Adding the Identity_Crisis package. - -### Changed -- Updated package dependencies. -- Use Connection/Urls for home_url and site_url functions migrated from Sync. - -[0.17.3]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.17.2...v0.17.3 -[0.17.2]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.17.1...v0.17.2 -[0.17.1]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.17.0...v0.17.1 -[0.17.0]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.16.0...v0.17.0 -[0.16.0]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.15.1...v0.16.0 -[0.15.1]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.15.0...v0.15.1 -[0.15.0]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.14.1...v0.15.0 -[0.14.1]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.14.0...v0.14.1 -[0.14.0]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.13.0...v0.14.0 -[0.13.0]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.12.1...v0.13.0 -[0.12.1]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.12.0...v0.12.1 -[0.12.0]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.11.3...v0.12.0 -[0.11.3]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.11.2...v0.11.3 -[0.11.2]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.11.1...v0.11.2 -[0.11.1]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.11.0...v0.11.1 -[0.11.0]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.10.7...v0.11.0 -[0.10.7]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.10.6...v0.10.7 -[0.10.6]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.10.5...v0.10.6 -[0.10.5]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.10.4...v0.10.5 -[0.10.4]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.10.3...v0.10.4 -[0.10.3]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.10.2...v0.10.3 -[0.10.2]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.10.1...v0.10.2 -[0.10.1]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.10.0...v0.10.1 -[0.10.0]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.9.0...v0.10.0 -[0.9.0]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.8.52...v0.9.0 -[0.8.52]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.8.51...v0.8.52 -[0.8.51]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.8.50...v0.8.51 -[0.8.50]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.8.49...v0.8.50 -[0.8.49]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.8.48...v0.8.49 -[0.8.48]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.8.47...v0.8.48 -[0.8.47]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.8.46...v0.8.47 -[0.8.46]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.8.45...v0.8.46 -[0.8.45]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.8.44...v0.8.45 -[0.8.44]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.8.43...v0.8.44 -[0.8.43]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.8.42...v0.8.43 -[0.8.42]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.8.41...v0.8.42 -[0.8.41]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.8.40...v0.8.41 -[0.8.40]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.8.39...v0.8.40 -[0.8.39]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.8.38...v0.8.39 -[0.8.38]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.8.37...v0.8.38 -[0.8.37]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.8.36...v0.8.37 -[0.8.36]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.8.35...v0.8.36 -[0.8.35]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.8.34...v0.8.35 -[0.8.34]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.8.33...v0.8.34 -[0.8.33]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.8.32...v0.8.33 -[0.8.32]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.8.31...v0.8.32 -[0.8.31]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.8.30...v0.8.31 -[0.8.30]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.8.29...v0.8.30 -[0.8.29]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.8.28...v0.8.29 -[0.8.28]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.8.27...v0.8.28 -[0.8.27]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.8.26...v0.8.27 -[0.8.26]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.8.25...v0.8.26 -[0.8.25]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.8.24...v0.8.25 -[0.8.24]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.8.23...v0.8.24 -[0.8.23]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.8.22...v0.8.23 -[0.8.22]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.8.21...v0.8.22 -[0.8.21]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.8.20...v0.8.21 -[0.8.20]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.8.19...v0.8.20 -[0.8.19]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.8.18...v0.8.19 -[0.8.18]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.8.17...v0.8.18 -[0.8.17]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.8.16...v0.8.17 -[0.8.16]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.8.15...v0.8.16 -[0.8.15]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.8.14...v0.8.15 -[0.8.14]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.8.13...v0.8.14 -[0.8.13]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.8.12...v0.8.13 -[0.8.12]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.8.11...v0.8.12 -[0.8.11]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.8.10...v0.8.11 -[0.8.10]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.8.9...v0.8.10 -[0.8.9]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.8.8...v0.8.9 -[0.8.8]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.8.7...v0.8.8 -[0.8.7]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.8.6...v0.8.7 -[0.8.6]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.8.5...v0.8.6 -[0.8.5]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.8.4...v0.8.5 -[0.8.4]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.8.3...v0.8.4 -[0.8.3]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.8.2...v0.8.3 -[0.8.2]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.8.1...v0.8.2 -[0.8.1]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.8.0...v0.8.1 -[0.8.0]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.7.4...v0.8.0 -[0.7.4]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.7.3...v0.7.4 -[0.7.3]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.7.2...v0.7.3 -[0.7.2]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.7.1...v0.7.2 -[0.7.1]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.7.0...v0.7.1 -[0.7.0]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.6.4...v0.7.0 -[0.6.4]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.6.3...v0.6.4 -[0.6.3]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.6.2...v0.6.3 -[0.6.2]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.6.1...v0.6.2 -[0.6.1]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.6.0...v0.6.1 -[0.6.0]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.5.0...v0.6.0 -[0.5.0]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.4.4...v0.5.0 -[0.4.4]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.4.3...v0.4.4 -[0.4.3]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.4.2...v0.4.3 -[0.4.2]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.4.1...v0.4.2 -[0.4.1]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.4.0...v0.4.1 -[0.4.0]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.3.1...v0.4.0 -[0.3.1]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.3.0...v0.3.1 -[0.3.0]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.2.8...v0.3.0 -[0.2.8]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.2.7...v0.2.8 -[0.2.7]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.2.6...v0.2.7 -[0.2.6]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.2.5...v0.2.6 -[0.2.5]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.2.4...v0.2.5 -[0.2.4]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.2.3...v0.2.4 -[0.2.3]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.2.2...v0.2.3 -[0.2.2]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.2.1...v0.2.2 -[0.2.1]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.2.0...v0.2.1 -[0.2.0]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.1.0...v0.2.0 diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-identity-crisis/LICENSE.txt b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-identity-crisis/LICENSE.txt deleted file mode 100644 index e82774c1..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-identity-crisis/LICENSE.txt +++ /dev/null @@ -1,357 +0,0 @@ -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - - -=================================== - - -GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - -Copyright (C) 1989, 1991 Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -Everyone is permitted to copy and distribute verbatim copies -of this license document, but changing it is not allowed. - - Preamble - -The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Lesser General Public License instead.) You can apply it to -your programs, too. - -When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - -To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - -For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - -We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - -Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - -Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - -The precise terms and conditions for copying, distribution and -modification follow. - -GNU GENERAL PUBLIC LICENSE -TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - -0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - -1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - -2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - -a) You must cause the modified files to carry prominent notices -stating that you changed the files and the date of any change. - -b) You must cause any work that you distribute or publish, that in -whole or in part contains or is derived from the Program or any -part thereof, to be licensed as a whole at no charge to all third -parties under the terms of this License. - -c) If the modified program normally reads commands interactively -when run, you must cause it, when started running for such -interactive use in the most ordinary way, to print or display an -announcement including an appropriate copyright notice and a -notice that there is no warranty (or else, saying that you provide -a warranty) and that users may redistribute the program under -these conditions, and telling the user how to view a copy of this -License. (Exception: if the Program itself is interactive but -does not normally print such an announcement, your work based on -the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - -3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - -a) Accompany it with the complete corresponding machine-readable -source code, which must be distributed under the terms of Sections -1 and 2 above on a medium customarily used for software interchange; or, - -b) Accompany it with a written offer, valid for at least three -years, to give any third party, for a charge no more than your -cost of physically performing source distribution, a complete -machine-readable copy of the corresponding source code, to be -distributed under the terms of Sections 1 and 2 above on a medium -customarily used for software interchange; or, - -c) Accompany it with the information you received as to the offer -to distribute corresponding source code. (This alternative is -allowed only for noncommercial distribution and only if you -received the program in object code or executable form with such -an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - -4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - -5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - -6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - -7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - -8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - -9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - -10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - -11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - -12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - -How to Apply These Terms to Your New Programs - -If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - -To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - -Copyright (C) - -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along -with this program; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - -Gnomovision version 69, Copyright (C) year name of author -Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. -This is free software, and you are welcome to redistribute it -under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - -Yoyodyne, Inc., hereby disclaims all copyright interest in the program -`Gnomovision' (which makes passes at compilers) written by James Hacker. - -, 1 April 1989 -Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-identity-crisis/SECURITY.md b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-identity-crisis/SECURITY.md deleted file mode 100644 index 98f48dd1..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-identity-crisis/SECURITY.md +++ /dev/null @@ -1,47 +0,0 @@ -# Security Policy - -Full details of the Automattic Security Policy can be found on [automattic.com](https://automattic.com/security/). - -## Supported Versions - -Generally, only the latest version of Jetpack and its associated plugins have continued support. If a critical vulnerability is found in the current version of a plugin, we may opt to backport any patches to previous versions. - -## Reporting a Vulnerability - -Our HackerOne program covers the below plugin software, as well as a variety of related projects and infrastructure: - -* [Jetpack](https://jetpack.com/) -* Jetpack Backup -* Jetpack Boost -* Jetpack CRM -* Jetpack Protect -* Jetpack Search -* Jetpack Social -* Jetpack VideoPress - -**For responsible disclosure of security issues and to be eligible for our bug bounty program, please submit your report via the [HackerOne](https://hackerone.com/automattic) portal.** - -Our most critical targets are: - -* Jetpack and the Jetpack composer packages (all within this repo) -* Jetpack.com -- the primary marketing site. -* cloud.jetpack.com -- a management site. -* wordpress.com -- the shared management site for both Jetpack and WordPress.com sites. - -For more targets, see the `In Scope` section on [HackerOne](https://hackerone.com/automattic). - -_Please note that the **WordPress software is a separate entity** from Automattic. Please report vulnerabilities for WordPress through [the WordPress Foundation's HackerOne page](https://hackerone.com/wordpress)._ - -## Guidelines - -We're committed to working with security researchers to resolve the vulnerabilities they discover. You can help us by following these guidelines: - -* Follow [HackerOne's disclosure guidelines](https://www.hackerone.com/disclosure-guidelines). -* Pen-testing Production: - * Please **setup a local environment** instead whenever possible. Most of our code is open source (see above). - * If that's not possible, **limit any data access/modification** to the bare minimum necessary to reproduce a PoC. - * **_Don't_ automate form submissions!** That's very annoying for us, because it adds extra work for the volunteers who manage those systems, and reduces the signal/noise ratio in our communication channels. - * To be eligible for a bounty, all of these guidelines must be followed. -* Be Patient - Give us a reasonable time to correct the issue before you disclose the vulnerability. - -We also expect you to comply with all applicable laws. You're responsible to pay any taxes associated with your bounties. diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-identity-crisis/build/index.asset.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-identity-crisis/build/index.asset.php deleted file mode 100644 index cf2a65ee..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-identity-crisis/build/index.asset.php +++ /dev/null @@ -1 +0,0 @@ - array('react', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-url'), 'version' => '607b018606bd0a465d3b'); diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-identity-crisis/build/index.css b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-identity-crisis/build/index.css deleted file mode 100644 index f33c0f0b..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-identity-crisis/build/index.css +++ /dev/null @@ -1 +0,0 @@ -#wpadminbar #wp-admin-bar-jetpack-idc{margin-right:5px}#wpadminbar #wp-admin-bar-jetpack-idc .jp-idc-admin-bar{border-radius:2px;color:#efeff0;font-size:14px;font-weight:500;line-height:20px;padding:6px 8px}#wpadminbar #wp-admin-bar-jetpack-idc.hide{display:none}#wpadminbar #wp-admin-bar-jetpack-idc .dashicons{font-family:dashicons;margin-top:-6px}#wpadminbar #wp-admin-bar-jetpack-idc .dashicons:before{font-size:18px}#wpadminbar #wp-admin-bar-jetpack-idc .ab-item{background:#e68b28;padding:0}#jp-identity-crisis-container .jp-idc__idc-screen{margin-bottom:40px;margin-top:40px}#jp-identity-crisis-container.notice{background:none;border:none}.jp-idc__idc-screen{background:#fff;border-left:4px solid #e68b28;border-radius:4px;box-shadow:0 0 40px #0000000a;box-sizing:border-box;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;margin:0 auto;max-width:1128px;padding:10px}.jp-idc__idc-screen.jp-idc__idc-screen__success{border-color:#069e08}@media(min-width:600px){.jp-idc__idc-screen{padding:48px}}.jp-idc__idc-screen .jp-idc__idc-screen__header{align-items:center;display:flex}.jp-idc__idc-screen .jp-idc__idc-screen__header .jp-idc__idc-screen__logo-image{max-height:100px;max-width:100px}.jp-idc__idc-screen .jp-idc__idc-screen__header .jp-idc__idc-screen__logo-label{font-size:14px;line-height:22px;margin:-7px 0 0 8px}.jp-idc__idc-screen h2{font-size:24px;font-weight:600;line-height:28px;margin:32px 0 0}.jp-idc__idc-screen h3{font-size:20px;font-weight:600;line-height:28px;margin:24px 0 0}.jp-idc__idc-screen p{color:#2c3338;font-size:16px;line-height:24px;margin:16px 0 0;max-width:710px}.jp-idc__idc-screen a{color:#2c3338}.jp-idc__idc-screen .jp-idc__idc-screen__cards{align-items:center;display:flex;flex-direction:column;flex-wrap:wrap}@media only screen and (min-width:1403px){.jp-idc__idc-screen .jp-idc__idc-screen__cards{align-items:normal;flex-direction:row}}.jp-idc__idc-screen .jp-idc__idc-screen__cards .jp-idc__idc-screen__cards-separator{align-self:center;color:#23282d;font-size:20px;font-weight:600;line-height:28px;margin:0 24px}.jp-idc__idc-screen .jp-idc__idc-screen__cards .jp-idc__idc-screen__card-action-base{border:1px solid #c3c4c7;border-radius:4px;box-sizing:border-box;display:flex;flex-direction:column;justify-content:space-between;margin:24px 0;max-width:100%;padding:10px;width:480px}@media(min-width:600px){.jp-idc__idc-screen .jp-idc__idc-screen__cards .jp-idc__idc-screen__card-action-base{padding:24px}}.jp-idc__idc-screen .jp-idc__idc-screen__cards .jp-idc__idc-screen__card-action-base h4{font-size:20px;font-weight:400;line-height:28px;margin:0 0 8px}.jp-idc__idc-screen .jp-idc__idc-screen__cards .jp-idc__idc-screen__card-action-base p{margin:0 0 24px}.jp-idc__idc-screen .jp-idc__idc-screen__cards .jp-idc__idc-screen__card-action-base .jp-idc__idc-screen__card-action-sitename{background:#f9f9f6;border-radius:33px;box-sizing:border-box;color:#2c3338;font-size:16px;font-weight:700;line-height:24px;overflow-wrap:anywhere;padding:16px;text-align:center;width:100%}.jp-idc__idc-screen .jp-idc__idc-screen__cards .jp-idc__idc-screen__card-action-base .jp-idc__idc-screen__card-action-separator{display:block;margin:12px auto}.jp-idc__idc-screen .jp-idc__idc-screen__cards .jp-idc__idc-screen__card-action-base .jp-idc__idc-screen__card-action-button{padding:8px 24px;width:100%}.jp-idc__idc-screen .jp-idc__idc-screen__card-action-button{background:#000;border-radius:4px;color:#fff;font-size:16px;font-weight:600;height:auto;justify-content:center;line-height:24px;margin-top:24px;min-height:40px;padding:8px}.jp-idc__idc-screen .jp-idc__idc-screen__card-action-button-migrated{margin-top:64px;width:141px}.jp-idc__idc-screen .jp-idc__idc-screen__card-migrated{align-items:center;display:flex;flex-direction:column;flex-wrap:wrap;margin-top:24px;width:100%}.jp-idc__idc-screen .jp-idc__idc-screen__card-migrated .jp-idc__idc-screen__card-migrated-hostname{border:1px solid #c3c4c7;border-radius:4px;color:#2c3338;flex-grow:1;font-size:16px;font-weight:700;line-height:24px;padding:24px;width:100%}.jp-idc__idc-screen .jp-idc__idc-screen__card-migrated .jp-idc__idc-screen__card-migrated-separator-wide{display:none}.jp-idc__idc-screen .jp-idc__idc-screen__card-migrated .jp-idc__idc-screen__card-migrated-separator{display:block}.jp-idc__idc-screen .jp-idc__idc-screen__card-migrated .jp-idc__idc-screen__card-migrated-separator,.jp-idc__idc-screen .jp-idc__idc-screen__card-migrated .jp-idc__idc-screen__card-migrated-separator-wide{margin:28px}@media only screen and (min-width:1400px){.jp-idc__idc-screen .jp-idc__idc-screen__card-migrated{flex-direction:row;width:auto}.jp-idc__idc-screen .jp-idc__idc-screen__card-migrated .jp-idc__idc-screen__card-migrated-separator{display:none}.jp-idc__idc-screen .jp-idc__idc-screen__card-migrated .jp-idc__idc-screen__card-migrated-separator-wide{display:block}.jp-idc__idc-screen .jp-idc__idc-screen__card-migrated .jp-idc__idc-screen__card-migrated-hostname{width:auto}}@keyframes rotate-spinner{to{transform:rotate(1turn)}}.jp-components-spinner{align-items:center;display:flex}.jp-components-spinner__inner,.jp-components-spinner__outer{animation:3s linear infinite;animation-name:rotate-spinner;border:.1em solid #0000;border-radius:50%;box-sizing:border-box;margin:auto}.jp-components-spinner__outer{border-top-color:#fff}.jp-components-spinner__inner{border-right-color:#fff;border-top-color:#fff;height:100%;opacity:.4;width:100%}:root{--font-title-large:36px;--font-title-small:24px;--font-body:16px;--font-label:12px;--jp-black:#000;--jp-black-80:#2c3338;--jp-white:#fff;--jp-white-off:#f9f9f6;--jp-gray:#dcdcde;--jp-gray-0:#f6f7f7;--jp-gray-5:#dcdcde;--jp-gray-10:#c3c4c7;--jp-gray-20:#a7aaad;--jp-gray-30:#8c8f94;--jp-gray-40:#787c82;--jp-gray-50:#646970;--jp-gray-60:#50575e;--jp-gray-70:#3c434a;--jp-gray-80:#2c3338;--jp-gray-90:#1d2327;--jp-gray-100:#101517;--jp-gray-off:#e2e2df;--jp-yellow-5:#f5e6b3;--jp-yellow-10:#f2cf75;--jp-orange-20:#faa754;--jp-blue-5:#ced9f2;--jp-red-0:#f7ebec;--jp-red-50:#d63638;--jp-red-60:#b32d2e;--jp-red-80:#8a2424;--jp-red:#d63639;--jp-pink:#c9356e;--jp-green-0:#f0f2eb;--jp-green-5:#d0e6b8;--jp-green-10:#9dd977;--jp-green-20:#64ca43;--jp-green-30:#2fb41f;--jp-green-40:#069e08;--jp-green-50:#008710;--jp-green-60:#007117;--jp-green-70:#005b18;--jp-green-80:#004515;--jp-green-90:#003010;--jp-green-100:#001c09;--jp-green:#069e08;--jp-green-primary:var(--jp-green-40);--jp-green-secondary:var(--jp-green-30);--jp-border-radius:4px;--jp-border-radius-rna:8px;--jp-menu-border-height:1px;--jp-underline-thickness:2px;--jp-modal-padding-large:32px;--jp-modal-padding:24px;--jp-modal-padding-small:16px;--jp-modal-radius:8px;--jp-button-padding:8px;--jp-button-radius:4px;--jp-gap:16px;--jp-highlight:#3858e9}body{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;margin:0;min-height:100%;padding:0}.jp-wrap{align-items:center;display:flex;flex-wrap:wrap;margin:0 auto;max-width:1128px}.jp-row{display:grid;grid-gap:24px;grid-template-columns:repeat(4,1fr);margin:0 16px;width:100%}@media(min-width:600px){.jp-row{grid-template-columns:repeat(8,1fr);margin:0 18px}}@media(min-width:960px){.jp-row{grid-template-columns:repeat(12,1fr);margin:0 24px;max-width:1128px}}.sm-col-span-1{grid-column-end:span 1}.sm-col-span-2{grid-column-end:span 2}.sm-col-span-3{grid-column-end:span 3}.sm-col-span-4{grid-column-end:span 4}@media(min-width:600px){.md-col-span-1{grid-column-end:span 1}.md-col-span-2{grid-column-end:span 2}.md-col-span-3{grid-column-end:span 3}.md-col-span-4{grid-column-end:span 4}.md-col-span-5{grid-column-end:span 5}.md-col-span-6{grid-column-end:span 6}.md-col-span-7{grid-column-end:span 7}.md-col-span-8{grid-column-end:span 8}}@media(min-width:960px){.lg-col-span-1{grid-column-end:span 1}.lg-col-span-2{grid-column-end:span 2}.lg-col-span-3{grid-column-end:span 3}.lg-col-span-4{grid-column-end:span 4}.lg-col-span-5{grid-column-end:span 5}.lg-col-span-6{grid-column-end:span 6}.lg-col-span-7{grid-column-end:span 7}.lg-col-span-8{grid-column-end:span 8}.lg-col-span-9{grid-column-end:span 9}.lg-col-span-10{grid-column-end:span 10}.lg-col-span-11{grid-column-end:span 11}.lg-col-span-12{grid-column-end:span 12}}@media(max-width:960px){.md-col-span-0{display:none}}@media(max-width:600px){.sm-col-span-0{display:none}}.jp-cut{border:2px solid var(--jp-green-primary);border-radius:var(--jp-border-radius);margin:32px 0;padding:16px 64px 16px 24px;position:relative;text-decoration:none}.jp-cut,.jp-cut span{display:block}.jp-cut span:last-of-type{font-weight:600}.jp-cut:focus span:last-of-type,.jp-cut:hover span:last-of-type{text-decoration:underline;text-decoration-thickness:var(--jp-underline-thickness)}.jp-cut:focus:after,.jp-cut:hover:after{transform:translateY(-50%) translateX(8px)}.jp-cut:after{color:var(--jp-green-primary);content:"→";font-size:24px;font-weight:600;position:absolute;right:24px;top:50%;transform:translateY(-50%);transition:transform .15s ease-out}.jp-idc__idc-screen .jp-idc__error-message{align-items:center;color:var(--jp-red);display:flex;flex-direction:row;justify-content:center;margin:15px 0}.jp-idc__idc-screen .jp-idc__error-message .error-gridicon{margin-right:8px;fill:var(--jp-red)}.jp-idc__idc-screen .jp-idc__error-message a,.jp-idc__idc-screen .jp-idc__error-message span{color:var(--jp-red);font-size:var(--font-body)}.jp-idc__idc-screen .jp-idc__safe-mode .jp-idc__error-message{margin-top:5px}.jp-idc__idc-screen .jp-idc__idc-screen__cards.jp-idc__idc-screen__cards-error .jp-idc__idc-screen__card-action-base{padding-bottom:75px}.jp-idc__idc-screen .jp-idc__idc-screen__cards.jp-idc__idc-screen__cards-error .jp-idc__idc-screen__card-action-base.jp-idc__idc-screen__card-action-error{padding-bottom:5px}.jp-idc__idc-screen .jp-idc__idc-screen__cards.jp-idc__idc-screen__cards-error .jp-idc__idc-screen__card-action-base .jp-idc__error-message{height:40px}.jp-idc__idc-screen .jp-idc__safe-mode{text-align:center}.jp-idc__idc-screen .jp-idc__safe-mode .jp-idc__safe-mode__staying-safe{display:flex;justify-content:center;padding:6px}.jp-idc__idc-screen .jp-idc__safe-mode .jp-idc__safe-mode__staying-safe .jp-components-spinner{margin:0 10px}.jp-idc__idc-screen .jp-idc__safe-mode,.jp-idc__idc-screen .jp-idc__safe-mode button{color:#2c3338;font-size:16px;line-height:24px}.jp-idc__idc-screen .jp-idc__safe-mode button{padding:0;text-decoration:underline} \ No newline at end of file diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-identity-crisis/build/index.js b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-identity-crisis/build/index.js deleted file mode 100644 index 89694ac0..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-identity-crisis/build/index.js +++ /dev/null @@ -1,5 +0,0 @@ -/*! For license information please see index.js.LICENSE.txt */ -(()=>{var e={235:(e,t)=>{var n;!function(){"use strict";var r={}.hasOwnProperty;function s(){for(var e=[],t=0;t{t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;t.splice(1,0,n,"color: inherit");let r=0,s=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(r++,"%c"===e&&(s=r))})),t.splice(s,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG);return e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=n(741)(t);const{formatters:r}=e.exports;r.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},741:(e,t,n)=>{e.exports=function(e){function t(e){let n,s,a,i=null;function o(...e){if(!o.enabled)return;const r=o,s=Number(new Date),a=s-(n||s);r.diff=a,r.prev=n,r.curr=s,n=s,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let i=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((n,s)=>{if("%%"===n)return"%";i++;const a=t.formatters[s];if("function"==typeof a){const t=e[i];n=a.call(r,t),e.splice(i,1),i--}return n})),t.formatArgs.call(r,e);(r.log||t.log).apply(r,e)}return o.namespace=e,o.useColors=t.useColors(),o.color=t.selectColor(e),o.extend=r,o.destroy=t.destroy,Object.defineProperty(o,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==i?i:(s!==t.namespaces&&(s=t.namespaces,a=t.enabled(e)),a),set:e=>{i=e}}),"function"==typeof t.init&&t.init(o),o}function r(e,n){const r=t(this.namespace+(void 0===n?":":n)+e);return r.log=this.log,r}function s(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},t.disable=function(){const e=[...t.names.map(s),...t.skips.map(s).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let n;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const r=("string"==typeof e?e:"").split(/[\s,]+/),s=r.length;for(n=0;n{t[n]=e[n]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let n=0;for(let t=0;t{},611:()=>{},724:()=>{},310:()=>{},171:e=>{var t=1e3,n=60*t,r=60*n,s=24*r,a=7*s,i=365.25*s;function o(e,t,n,r){var s=t>=1.5*n;return Math.round(e/n)+" "+r+(s?"s":"")}e.exports=function(e,c){c=c||{};var l=typeof e;if("string"===l&&e.length>0)return function(e){if((e=String(e)).length>100)return;var o=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!o)return;var c=parseFloat(o[1]);switch((o[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return c*i;case"weeks":case"week":case"w":return c*a;case"days":case"day":case"d":return c*s;case"hours":case"hour":case"hrs":case"hr":case"h":return c*r;case"minutes":case"minute":case"mins":case"min":case"m":return c*n;case"seconds":case"second":case"secs":case"sec":case"s":return c*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return c;default:return}}(e);if("number"===l&&isFinite(e))return c.long?function(e){var a=Math.abs(e);if(a>=s)return o(e,a,s,"day");if(a>=r)return o(e,a,r,"hour");if(a>=n)return o(e,a,n,"minute");if(a>=t)return o(e,a,t,"second");return e+" ms"}(e):function(e){var a=Math.abs(e);if(a>=s)return Math.round(e/s)+"d";if(a>=r)return Math.round(e/r)+"h";if(a>=n)return Math.round(e/n)+"m";if(a>=t)return Math.round(e/t)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},469:(e,t,n)=>{"use strict";var r=n(758);function s(){}function a(){}a.resetWarningCache=s,e.exports=function(){function e(e,t,n,s,a,i){if(i!==r){var o=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw o.name="Invariant Violation",o}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:s};return n.PropTypes=n,n}},162:(e,t,n)=>{e.exports=n(469)()},758:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},975:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var r=n(951);const s=n.n(r)()("dops:analytics");let a,i;window._tkq=window._tkq||[],window.ga=window.ga||function(){(window.ga.q=window.ga.q||[]).push(arguments)},window.ga.l=+new Date;const o={initialize:function(e,t,n){o.setUser(e,t),o.setSuperProps(n),o.identifyUser()},setGoogleAnalyticsEnabled:function(e,t=null){this.googleAnalyticsEnabled=e,this.googleAnalyticsKey=t},setMcAnalyticsEnabled:function(e){this.mcAnalyticsEnabled=e},setUser:function(e,t){i={ID:e,username:t}},setSuperProps:function(e){a=e},assignSuperProps:function(e){a=Object.assign(a||{},e)},mc:{bumpStat:function(e,t){const n=function(e,t){let n="";if("object"==typeof e){for(const t in e)n+="&x_"+encodeURIComponent(t)+"="+encodeURIComponent(e[t]);s("Bumping stats %o",e)}else n="&x_"+encodeURIComponent(e)+"="+encodeURIComponent(t),s('Bumping stat "%s" in group "%s"',t,e);return n}(e,t);o.mcAnalyticsEnabled&&((new Image).src=document.location.protocol+"//pixel.wp.com/g.gif?v=wpcom-no-pv"+n+"&t="+Math.random())},bumpStatWithPageView:function(e,t){const n=function(e,t){let n="";if("object"==typeof e){for(const t in e)n+="&"+encodeURIComponent(t)+"="+encodeURIComponent(e[t]);s("Built stats %o",e)}else n="&"+encodeURIComponent(e)+"="+encodeURIComponent(t),s('Built stat "%s" in group "%s"',t,e);return n}(e,t);o.mcAnalyticsEnabled&&((new Image).src=document.location.protocol+"//pixel.wp.com/g.gif?v=wpcom"+n+"&t="+Math.random())}},pageView:{record:function(e,t){o.tracks.recordPageView(e),o.ga.recordPageView(e,t)}},purchase:{record:function(e,t,n,r,s,a,i){o.ga.recordPurchase(e,t,n,r,s,a,i)}},tracks:{recordEvent:function(e,t){t=t||{},0===e.indexOf("akismet_")||0===e.indexOf("jetpack_")?(a&&(s("- Super Props: %o",a),t=Object.assign(t,a)),s('Record event "%s" called with props %s',e,JSON.stringify(t)),window._tkq.push(["recordEvent",e,t])):s('- Event name must be prefixed by "akismet_" or "jetpack_"')},recordJetpackClick:function(e){const t="object"==typeof e?e:{target:e};o.tracks.recordEvent("jetpack_wpa_click",t)},recordPageView:function(e){o.tracks.recordEvent("akismet_page_view",{path:e})},setOptOut:function(e){s("Pushing setOptOut: %o",e),window._tkq.push(["setOptOut",e])}},ga:{initialized:!1,initialize:function(){let e={};o.ga.initialized||(i&&(e={userId:"u-"+i.ID}),window.ga("create",this.googleAnalyticsKey,"auto",e),o.ga.initialized=!0)},recordPageView:function(e,t){o.ga.initialize(),s("Recording Page View ~ [URL: "+e+"] [Title: "+t+"]"),this.googleAnalyticsEnabled&&(window.ga("set","page",e),window.ga("send",{hitType:"pageview",page:e,title:t}))},recordEvent:function(e,t,n,r){o.ga.initialize();let a="Recording Event ~ [Category: "+e+"] [Action: "+t+"]";void 0!==n&&(a+=" [Option Label: "+n+"]"),void 0!==r&&(a+=" [Option Value: "+r+"]"),s(a),this.googleAnalyticsEnabled&&window.ga("send","event",e,t,n,r)},recordPurchase:function(e,t,n,r,s,a,i){window.ga("require","ecommerce"),window.ga("ecommerce:addTransaction",{id:e,revenue:r,currency:i}),window.ga("ecommerce:addItem",{id:e,name:t,sku:n,price:s,quantity:a}),window.ga("ecommerce:send")}},identifyUser:function(){i&&window._tkq.push(["identifyUser",i.ID,i.username])},setProperties:function(e){window._tkq.push(["setProperties",e])},clearedIdentity:function(){window._tkq.push(["clearIdentity"])}},c=o},743:(e,t,n)=>{"use strict";n.d(t,{ZP:()=>u});var r=n(132),s=n(483);function a(e){class t extends Error{constructor(...t){super(...t),this.name=e}}return t}const i=a("JsonParseError"),o=a("JsonParseAfterRedirectError"),c=a("Api404Error"),l=a("Api404AfterRedirectError"),d=a("FetchNetworkError");const u=new function(e,t){let n=e,a=e,i={"X-WP-Nonce":t},o={credentials:"same-origin",headers:i},c={method:"post",credentials:"same-origin",headers:Object.assign({},i,{"Content-type":"application/json"})},l=function(e){const t=e.split("?"),n=t.length>1?t[1]:"",r=n.length?n.split("&"):[];return r.push("_cacheBuster="+(new Date).getTime()),t[0]+"?"+r.join("&")};const d={setApiRoot(e){n=e},setWpcomOriginApiUrl(e){a=e},setApiNonce(e){i={"X-WP-Nonce":e},o={credentials:"same-origin",headers:i},c={method:"post",credentials:"same-origin",headers:Object.assign({},i,{"Content-type":"application/json"})}},setCacheBusterCallback:e=>{l=e},registerSite:(e,t)=>{const s={registration_nonce:e,no_iframe:!0};return(0,r.jetpackConfigHas)("consumer_slug")&&(s.plugin_slug=(0,r.jetpackConfigGet)("consumer_slug")),null!==t&&(s.redirect_uri=t),h(`${n}jetpack/v4/connection/register`,c,{body:JSON.stringify(s)}).then(p).then(m)},fetchAuthorizationUrl:e=>u((0,s.addQueryArgs)(`${n}jetpack/v4/connection/authorize_url`,{no_iframe:"1",redirect_uri:e}),o).then(p).then(m),fetchSiteConnectionData:()=>u(`${n}jetpack/v4/connection/data`,o).then(m),fetchSiteConnectionStatus:()=>u(`${n}jetpack/v4/connection`,o).then(m),fetchSiteConnectionTest:()=>u(`${n}jetpack/v4/connection/test`,o).then(p).then(m),fetchUserConnectionData:()=>u(`${n}jetpack/v4/connection/data`,o).then(m),fetchUserTrackingSettings:()=>u(`${n}jetpack/v4/tracking/settings`,o).then(p).then(m),updateUserTrackingSettings:e=>h(`${n}jetpack/v4/tracking/settings`,c,{body:JSON.stringify(e)}).then(p).then(m),disconnectSite:()=>h(`${n}jetpack/v4/connection`,c,{body:JSON.stringify({isActive:!1})}).then(p).then(m),fetchConnectUrl:()=>u(`${n}jetpack/v4/connection/url`,o).then(p).then(m),unlinkUser:()=>h(`${n}jetpack/v4/connection/user`,c,{body:JSON.stringify({linked:!1})}).then(p).then(m),reconnect:()=>h(`${n}jetpack/v4/connection/reconnect`,c).then(p).then(m),fetchConnectedPlugins:()=>u(`${n}jetpack/v4/connection/plugins`,o).then(p).then(m),setHasSeenWCConnectionModal:()=>h(`${n}jetpack/v4/seen-wc-connection-modal`,c).then(p).then(m),fetchModules:()=>u(`${n}jetpack/v4/module/all`,o).then(p).then(m),fetchModule:e=>u(`${n}jetpack/v4/module/${e}`,o).then(p).then(m),activateModule:e=>h(`${n}jetpack/v4/module/${e}/active`,c,{body:JSON.stringify({active:!0})}).then(p).then(m),deactivateModule:e=>h(`${n}jetpack/v4/module/${e}/active`,c,{body:JSON.stringify({active:!1})}),updateModuleOptions:(e,t)=>h(`${n}jetpack/v4/module/${e}`,c,{body:JSON.stringify(t)}).then(p).then(m),updateSettings:e=>h(`${n}jetpack/v4/settings`,c,{body:JSON.stringify(e)}).then(p).then(m),getProtectCount:()=>u(`${n}jetpack/v4/module/protect/data`,o).then(p).then(m),resetOptions:e=>h(`${n}jetpack/v4/options/${e}`,c,{body:JSON.stringify({reset:!0})}).then(p).then(m),activateVaultPress:()=>h(`${n}jetpack/v4/plugins`,c,{body:JSON.stringify({slug:"vaultpress",status:"active"})}).then(p).then(m),getVaultPressData:()=>u(`${n}jetpack/v4/module/vaultpress/data`,o).then(p).then(m),installPlugin:(e,t)=>{const r={slug:e,status:"active"};return t&&(r.source=t),h(`${n}jetpack/v4/plugins`,c,{body:JSON.stringify(r)}).then(p).then(m)},activateAkismet:()=>h(`${n}jetpack/v4/plugins`,c,{body:JSON.stringify({slug:"akismet",status:"active"})}).then(p).then(m),getAkismetData:()=>u(`${n}jetpack/v4/module/akismet/data`,o).then(p).then(m),checkAkismetKey:()=>u(`${n}jetpack/v4/module/akismet/key/check`,o).then(p).then(m),checkAkismetKeyTyped:e=>h(`${n}jetpack/v4/module/akismet/key/check`,c,{body:JSON.stringify({api_key:e})}).then(p).then(m),fetchStatsData:e=>u(function(e){let t=`${n}jetpack/v4/module/stats/data`;-1!==t.indexOf("?")?t+=`&range=${encodeURIComponent(e)}`:t+=`?range=${encodeURIComponent(e)}`;return t}(e),o).then(p).then(m).then(f),getPluginUpdates:()=>u(`${n}jetpack/v4/updates/plugins`,o).then(p).then(m),getPlans:()=>u(`${n}jetpack/v4/plans`,o).then(p).then(m),fetchSettings:()=>u(`${n}jetpack/v4/settings`,o).then(p).then(m),updateSetting:e=>h(`${n}jetpack/v4/settings`,c,{body:JSON.stringify(e)}).then(p).then(m),fetchSiteData:()=>u(`${n}jetpack/v4/site`,o).then(p).then(m).then((e=>JSON.parse(e.data))),fetchSiteFeatures:()=>u(`${n}jetpack/v4/site/features`,o).then(p).then(m).then((e=>JSON.parse(e.data))),fetchSiteProducts:()=>u(`${n}jetpack/v4/site/products`,o).then(p).then(m),fetchSitePurchases:()=>u(`${n}jetpack/v4/site/purchases`,o).then(p).then(m).then((e=>JSON.parse(e.data))),fetchSiteBenefits:()=>u(`${n}jetpack/v4/site/benefits`,o).then(p).then(m).then((e=>JSON.parse(e.data))),fetchSiteDiscount:()=>u(`${n}jetpack/v4/site/discount`,o).then(p).then(m).then((e=>e.data)),fetchSetupQuestionnaire:()=>u(`${n}jetpack/v4/setup/questionnaire`,o).then(p).then(m),fetchRecommendationsData:()=>u(`${n}jetpack/v4/recommendations/data`,o).then(p).then(m),fetchRecommendationsProductSuggestions:()=>u(`${n}jetpack/v4/recommendations/product-suggestions`,o).then(p).then(m),fetchRecommendationsUpsell:()=>u(`${n}jetpack/v4/recommendations/upsell`,o).then(p).then(m),fetchRecommendationsConditional:()=>u(`${n}jetpack/v4/recommendations/conditional`,o).then(p).then(m),saveRecommendationsData:e=>h(`${n}jetpack/v4/recommendations/data`,c,{body:JSON.stringify({data:e})}).then(p),fetchProducts:()=>u(`${n}jetpack/v4/products`,o).then(p).then(m),fetchRewindStatus:()=>u(`${n}jetpack/v4/rewind`,o).then(p).then(m).then((e=>JSON.parse(e.data))),fetchScanStatus:()=>u(`${n}jetpack/v4/scan`,o).then(p).then(m).then((e=>JSON.parse(e.data))),dismissJetpackNotice:e=>h(`${n}jetpack/v4/notice/${e}`,c,{body:JSON.stringify({dismissed:!0})}).then(p).then(m),fetchPluginsData:()=>u(`${n}jetpack/v4/plugins`,o).then(p).then(m),fetchIntroOffers:()=>u(`${n}jetpack/v4/intro-offers`,o).then(p).then(m),fetchVerifySiteGoogleStatus:e=>u(null!==e?`${n}jetpack/v4/verify-site/google/${e}`:`${n}jetpack/v4/verify-site/google`,o).then(p).then(m),verifySiteGoogle:e=>h(`${n}jetpack/v4/verify-site/google`,c,{body:JSON.stringify({keyring_id:e})}).then(p).then(m),submitSurvey:e=>h(`${n}jetpack/v4/marketing/survey`,c,{body:JSON.stringify(e)}).then(p).then(m),saveSetupQuestionnaire:e=>h(`${n}jetpack/v4/setup/questionnaire`,c,{body:JSON.stringify(e)}).then(p).then(m),updateLicensingError:e=>h(`${n}jetpack/v4/licensing/error`,c,{body:JSON.stringify(e)}).then(p).then(m),updateLicenseKey:e=>h(`${n}jetpack/v4/licensing/set-license`,c,{body:JSON.stringify({license:e})}).then(p).then(m),getUserLicensesCounts:()=>u(`${n}jetpack/v4/licensing/user/counts`,o).then(p).then(m),getUserLicenses:()=>u(`${n}jetpack/v4/licensing/user/licenses`,o).then(p).then(m),updateLicensingActivationNoticeDismiss:e=>h(`${n}jetpack/v4/licensing/user/activation-notice-dismiss`,c,{body:JSON.stringify({last_detached_count:e})}).then(p).then(m),updateRecommendationsStep:e=>h(`${n}jetpack/v4/recommendations/step`,c,{body:JSON.stringify({step:e})}).then(p),confirmIDCSafeMode:()=>h(`${n}jetpack/v4/identity-crisis/confirm-safe-mode`,c).then(p),startIDCFresh:e=>h(`${n}jetpack/v4/identity-crisis/start-fresh`,c,{body:JSON.stringify({redirect_uri:e})}).then(p).then(m),migrateIDC:()=>h(`${n}jetpack/v4/identity-crisis/migrate`,c).then(p),attachLicenses:e=>h(`${n}jetpack/v4/licensing/attach-licenses`,c,{body:JSON.stringify({licenses:e})}).then(p).then(m),fetchSearchPlanInfo:()=>u(`${a}jetpack/v4/search/plan`,o).then(p).then(m),fetchSearchSettings:()=>u(`${a}jetpack/v4/search/settings`,o).then(p).then(m),updateSearchSettings:e=>h(`${a}jetpack/v4/search/settings`,c,{body:JSON.stringify(e)}).then(p).then(m),fetchSearchStats:()=>u(`${a}jetpack/v4/search/stats`,o).then(p).then(m),fetchWafSettings:()=>u(`${n}jetpack/v4/waf`,o).then(p).then(m),updateWafSettings:e=>h(`${n}jetpack/v4/waf`,c,{body:JSON.stringify(e)}).then(p).then(m),fetchWordAdsSettings:()=>u(`${n}jetpack/v4/wordads/settings`,o).then(p).then(m),updateWordAdsSettings:e=>h(`${n}jetpack/v4/wordads/settings`,c,{body:JSON.stringify(e)}),fetchSearchPricing:()=>u(`${a}jetpack/v4/search/pricing`,o).then(p).then(m),fetchMigrationStatus:()=>u(`${n}jetpack/v4/migration/status`,o).then(p).then(m),fetchBackupUndoEvent:()=>u(`${n}jetpack/v4/site/backup/undo-event`,o).then(p).then(m),fetchBackupPreflightStatus:()=>u(`${n}jetpack/v4/site/backup/preflight`,o).then(p).then(m)};function u(e,t){return fetch(l(e),t)}function h(e,t,n){return fetch(e,Object.assign({},t,n)).catch(g)}function f(e){return e.general&&void 0===e.general.response||e.week&&void 0===e.week.response||e.month&&void 0===e.month.response?e:{}}Object.assign(this,d)};function p(e){return e.status>=200&&e.status<300?e:404===e.status?new Promise((()=>{throw e.redirected?new l(e.redirected):new c})):e.json().catch((e=>h(e))).then((t=>{const n=new Error(`${t.message} (Status ${e.status})`);throw n.response=t,n.name="ApiError",n}))}function m(e){return e.json().catch((t=>h(t,e.redirected,e.url)))}function h(e,t,n){throw t?new o(n):new i}function g(){throw new d}},868:(e,t,n)=>{"use strict";n.d(t,{Z:()=>d});var r=n(674),s=n.n(r),a=n(736),i=n(235),o=n.n(i),c=n(196),l=n.n(c);const __=a.__,d=({logoColor:e="#069e08",showText:t=!0,className:n,height:r=32,...a})=>{const i=t?"0 0 118 32":"0 0 32 32";return l().createElement("svg",s()({xmlns:"http://www.w3.org/2000/svg",x:"0px",y:"0px",viewBox:i,className:o()("jetpack-logo",n),"aria-labelledby":"jetpack-logo-title",height:r},a,{role:"img"}),l().createElement("title",{id:"jetpack-logo-title"},__("Jetpack Logo","jetpack-idc")),l().createElement("path",{fill:e,d:"M16,0C7.2,0,0,7.2,0,16s7.2,16,16,16s16-7.2,16-16S24.8,0,16,0z M15,19H7l8-16V19z M17,29V13h8L17,29z"}),t&&l().createElement(l().Fragment,null,l().createElement("path",{d:"M41.3,26.6c-0.5-0.7-0.9-1.4-1.3-2.1c2.3-1.4,3-2.5,3-4.6V8h-3V6h6v13.4C46,22.8,45,24.8,41.3,26.6z"}),l().createElement("path",{d:"M65,18.4c0,1.1,0.8,1.3,1.4,1.3c0.5,0,2-0.2,2.6-0.4v2.1c-0.9,0.3-2.5,0.5-3.7,0.5c-1.5,0-3.2-0.5-3.2-3.1V12H60v-2h2.1V7.1 H65V10h4v2h-4V18.4z"}),l().createElement("path",{d:"M71,10h3v1.3c1.1-0.8,1.9-1.3,3.3-1.3c2.5,0,4.5,1.8,4.5,5.6s-2.2,6.3-5.8,6.3c-0.9,0-1.3-0.1-2-0.3V28h-3V10z M76.5,12.3 c-0.8,0-1.6,0.4-2.5,1.2v5.9c0.6,0.1,0.9,0.2,1.8,0.2c2,0,3.2-1.3,3.2-3.9C79,13.4,78.1,12.3,76.5,12.3z"}),l().createElement("path",{d:"M93,22h-3v-1.5c-0.9,0.7-1.9,1.5-3.5,1.5c-1.5,0-3.1-1.1-3.1-3.2c0-2.9,2.5-3.4,4.2-3.7l2.4-0.3v-0.3c0-1.5-0.5-2.3-2-2.3 c-0.7,0-2.3,0.5-3.7,1.1L84,11c1.2-0.4,3-1,4.4-1c2.7,0,4.6,1.4,4.6,4.7L93,22z M90,16.4l-2.2,0.4c-0.7,0.1-1.4,0.5-1.4,1.6 c0,0.9,0.5,1.4,1.3,1.4s1.5-0.5,2.3-1V16.4z"}),l().createElement("path",{d:"M104.5,21.3c-1.1,0.4-2.2,0.6-3.5,0.6c-4.2,0-5.9-2.4-5.9-5.9c0-3.7,2.3-6,6.1-6c1.4,0,2.3,0.2,3.2,0.5V13 c-0.8-0.3-2-0.6-3.2-0.6c-1.7,0-3.2,0.9-3.2,3.6c0,2.9,1.5,3.8,3.3,3.8c0.9,0,1.9-0.2,3.2-0.7V21.3z"}),l().createElement("path",{d:"M110,15.2c0.2-0.3,0.2-0.8,3.8-5.2h3.7l-4.6,5.7l5,6.3h-3.7l-4.2-5.8V22h-3V6h3V15.2z"}),l().createElement("path",{d:"M58.5,21.3c-1.5,0.5-2.7,0.6-4.2,0.6c-3.6,0-5.8-1.8-5.8-6c0-3.1,1.9-5.9,5.5-5.9s4.9,2.5,4.9,4.9c0,0.8,0,1.5-0.1,2h-7.3 c0.1,2.5,1.5,2.8,3.6,2.8c1.1,0,2.2-0.3,3.4-0.7C58.5,19,58.5,21.3,58.5,21.3z M56,15c0-1.4-0.5-2.9-2-2.9c-1.4,0-2.3,1.3-2.4,2.9 C51.6,15,56,15,56,15z"})))}},33:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var r=n(162),s=n.n(r),a=n(196),i=n.n(a);n(683);const o=e=>{const t=e.className+" jp-components-spinner",n={width:e.size,height:e.size,fontSize:e.size,borderTopColor:e.color},r={borderTopColor:e.color,borderRightColor:e.color};return i().createElement("div",{className:t},i().createElement("div",{className:"jp-components-spinner__outer",style:n},i().createElement("div",{className:"jp-components-spinner__inner",style:r})))};o.propTypes={color:s().string,className:s().string,size:s().number},o.defaultProps={color:"#FFFFFF",className:"",size:20};const c=o},895:(e,t,n)=>{"use strict";function r(e,t={}){const n={};let r;if("undefined"!=typeof window&&(r=window?.JP_CONNECTION_INITIAL_STATE?.calypsoEnv),0===e.search("https://")){const t=new URL(e);e=`https://${t.host}${t.pathname}`,n.url=encodeURIComponent(e)}else n.source=encodeURIComponent(e);for(const e in t)n[e]=encodeURIComponent(t[e]);!Object.keys(n).includes("site")&&"undefined"!=typeof jetpack_redirects&&jetpack_redirects.hasOwnProperty("currentSiteRawUrl")&&(n.site=jetpack_redirects.currentBlogID??jetpack_redirects.currentSiteRawUrl),r&&(n.calypso_env=r);return"https://jetpack.com/redirect/?"+Object.keys(n).map((e=>e+"="+n[e])).join("&")}n.d(t,{Z:()=>r})},132:(e,t,n)=>{let r={};try{r=n(510)}catch{console.error("jetpackConfig is missing in your webpack config file. See @automattic/jetpack-config"),r={missingConfig:!0}}const s=e=>r.hasOwnProperty(e);e.exports={jetpackConfigHas:s,jetpackConfigGet:e=>{if(!s(e))throw'This app requires the "'+e+'" Jetpack Config to be defined in your webpack configuration file. See details in @automattic/jetpack-config package docs.';return r[e]}}},477:(e,t,n)=>{"use strict";n.d(t,{Z:()=>k});var r=n(895),s=n(33),a=n(609),i=n(818),o=n(307),c=n(736),l=n(162),d=n.n(l),u=n(196),p=n.n(u),m=n(678),h=n(144),g=n(115),f=n(637);const __=c.__,y=e=>{const{isStartingFresh:t,startFreshCallback:n,customContent:l,hasError:d}=e,u=(0,g.Z)(e.wpcomHomeUrl),h=(0,g.Z)(e.currentUrl),y=(0,i.useSelect)((e=>e(m.t).getIsActionInProgress()),[]),k=l.startFreshButtonLabel||__("Create a fresh connection","jetpack-idc");return p().createElement("div",{className:"jp-idc__idc-screen__card-action-base"+(d?" jp-idc__idc-screen__card-action-error":"")},p().createElement("div",{className:"jp-idc__idc-screen__card-action-top"},p().createElement("h4",null,l.startFreshCardTitle?(0,o.createInterpolateElement)(l.startFreshCardTitle,{em:p().createElement("em",null)}):__("Treat each site as independent sites","jetpack-idc")),p().createElement("p",null,(0,o.createInterpolateElement)(l.startFreshCardBodyText||(0,c.sprintf)(/* translators: %1$s: The current site domain name. %2$s: The original site domain name. */ -__("%1$s settings, stats, and subscribers will start fresh. %2$s will keep its data as is.","jetpack-idc"),h,u),{hostname:p().createElement("strong",null),em:p().createElement("em",null),strong:p().createElement("strong",null)}))),p().createElement("div",{className:"jp-idc__idc-screen__card-action-bottom"},p().createElement("div",{className:"jp-idc__idc-screen__card-action-sitename"},u),p().createElement(a.Dashicon,{icon:"minus",className:"jp-idc__idc-screen__card-action-separator"}),p().createElement("div",{className:"jp-idc__idc-screen__card-action-sitename"},h),p().createElement(a.Button,{className:"jp-idc__idc-screen__card-action-button",label:k,onClick:n,disabled:y},t?p().createElement(s.Z,null):k),d&&(C=l.supportURL,p().createElement(f.Z,null,(0,o.createInterpolateElement)(__("Could not create the connection. Retry or find out more here.","jetpack-idc"),{a:p().createElement("a",{href:C||(0,r.Z)("jetpack-support-safe-mode"),rel:"noopener noreferrer",target:"_blank"})})))));var C};y.propTypes={wpcomHomeUrl:d().string.isRequired,currentUrl:d().string.isRequired,isStartingFresh:d().bool.isRequired,startFreshCallback:d().func.isRequired,customContent:d().shape(h.Z),hasError:d().bool.isRequired},y.defaultProps={isStartingFresh:!1,startFreshCallback:()=>{},customContent:{},hasError:!1};const k=y},596:(e,t,n)=>{"use strict";n.d(t,{Z:()=>k});var r=n(895),s=n(33),a=n(609),i=n(818),o=n(307),c=n(736),l=n(162),d=n.n(l),u=n(196),p=n.n(u),m=n(678),h=n(144),g=n(115),f=n(637);const __=c.__,y=e=>{const t=(0,g.Z)(e.wpcomHomeUrl),n=(0,g.Z)(e.currentUrl),l=(0,i.useSelect)((e=>e(m.t).getIsActionInProgress()),[]),{isMigrating:d,migrateCallback:u,customContent:h,hasError:y}=e,k=h.migrateButtonLabel||__("Move your settings","jetpack-idc");return p().createElement("div",{className:"jp-idc__idc-screen__card-action-base"+(y?" jp-idc__idc-screen__card-action-error":"")},p().createElement("div",{className:"jp-idc__idc-screen__card-action-top"},p().createElement("h4",null,h.migrateCardTitle?(0,o.createInterpolateElement)(h.migrateCardTitle,{em:p().createElement("em",null)}):__("Move Jetpack data","jetpack-idc")),p().createElement("p",null,(0,o.createInterpolateElement)(h.migrateCardBodyText||(0,c.sprintf)(/* translators: %1$s: The current site domain name. %2$s: The original site domain name. */ -__("Move all your settings, stats and subscribers to your other URL, %1$s. %2$s will be disconnected from Jetpack.","jetpack-idc"),n,t),{hostname:p().createElement("strong",null),em:p().createElement("em",null),strong:p().createElement("strong",null)}))),p().createElement("div",{className:"jp-idc__idc-screen__card-action-bottom"},p().createElement("div",{className:"jp-idc__idc-screen__card-action-sitename"},t),p().createElement(a.Dashicon,{icon:"arrow-down-alt",className:"jp-idc__idc-screen__card-action-separator"}),p().createElement("div",{className:"jp-idc__idc-screen__card-action-sitename"},n),p().createElement(a.Button,{className:"jp-idc__idc-screen__card-action-button",label:k,onClick:u,disabled:l},d?p().createElement(s.Z,null):k),y&&(C=h.supportURL,p().createElement(f.Z,null,(0,o.createInterpolateElement)(__("Could not move your settings. Retry or find out more here.","jetpack-idc"),{a:p().createElement("a",{href:C||(0,r.Z)("jetpack-support-safe-mode"),rel:"noopener noreferrer",target:"_blank"})})))));var C};y.propTypes={wpcomHomeUrl:d().string.isRequired,currentUrl:d().string.isRequired,isMigrating:d().bool.isRequired,migrateCallback:d().func.isRequired,customContent:d().shape(h.Z),hasError:d().bool.isRequired},y.defaultProps={isMigrating:!1,migrateCallback:()=>{},customContent:{},hasError:!1};const k=y},489:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(196),s=n.n(r);const a=()=>s().createElement("svg",{className:"error-gridicon",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",height:24},s().createElement("rect",{x:"0",fill:"none",width:"24",height:"24"}),s().createElement("g",null,s().createElement("path",{d:"M12 4c4.411 0 8 3.589 8 8s-3.589 8-8 8-8-3.589-8-8 3.589-8 8-8m0-2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm1 13h-2v2h2v-2zm-2-2h2l.5-6h-3l.5 6z"})))},637:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(196),s=n.n(r),a=n(489);n(611);const i=e=>{const{children:t}=e;return s().createElement("div",{className:"jp-idc__error-message"},s().createElement(a.Z,null),s().createElement("span",null,t))}},381:(e,t,n)=>{"use strict";n.d(t,{Z:()=>y});var r=n(743),s=n(818),a=n(162),i=n.n(a),o=n(196),c=n.n(o),l=n(970),d=n(272),u=n(105),p=n(678),m=n(144),h=n(521),g=n(567);const f=e=>{const{logo:t,customContent:n,wpcomHomeUrl:a,currentUrl:i,apiNonce:m,apiRoot:f,redirectUri:y,tracksUserData:k,tracksEventData:C,isAdmin:v,possibleDynamicSiteUrlDetected:_}=e,[b,E]=(0,o.useState)(!1),w=(0,s.useSelect)((e=>e(p.t).getErrorType()),[]),{isMigrating:j,migrateCallback:S}=(0,l.Z)((0,o.useCallback)((()=>{E(!0)}),[E])),{isStartingFresh:F,startFreshCallback:I}=(0,u.Z)(y),{isFinishingMigration:U,finishMigrationCallback:R}=(0,d.Z)();return(0,o.useEffect)((()=>{r.ZP.setApiRoot(f),r.ZP.setApiNonce(m),(0,h.M)(C,k),C&&(C.hasOwnProperty("isAdmin")&&C.isAdmin?(0,h.Z)("notice_view"):(0,h.Z)("non_admin_notice_view",{page:!!C.hasOwnProperty("currentScreen")&&C.currentScreen}))}),[f,m,k,C]),c().createElement(g.Z,{logo:t,customContent:n,wpcomHomeUrl:a,currentUrl:i,redirectUri:y,isMigrating:j,migrateCallback:S,isMigrated:b,finishMigrationCallback:R,isFinishingMigration:U,isStartingFresh:F,startFreshCallback:I,isAdmin:v,hasStaySafeError:"safe-mode"===w,hasFreshError:"start-fresh"===w,hasMigrateError:"migrate"===w,possibleDynamicSiteUrlDetected:_})};f.propTypes={logo:i().object,customContent:i().shape(m.Z),wpcomHomeUrl:i().string.isRequired,currentUrl:i().string.isRequired,redirectUri:i().string.isRequired,apiRoot:i().string.isRequired,apiNonce:i().string.isRequired,tracksUserData:i().object,tracksEventData:i().object,isAdmin:i().bool.isRequired,possibleDynamicSiteUrlDetected:i().bool},f.defaultProps={customContent:{}};const y=f},533:(e,t,n)=>{"use strict";n.d(t,{Z:()=>g});var r=n(895),s=n(307),a=n(736),i=n(162),o=n.n(i),c=n(196),l=n.n(c),d=n(144),u=n(477),p=n(596),m=n(899);const __=a.__,h=e=>{const{wpcomHomeUrl:t,currentUrl:n,isMigrating:a,migrateCallback:i,isStartingFresh:o,startFreshCallback:c,customContent:d,hasMigrateError:h,hasFreshError:g,hasStaySafeError:f,possibleDynamicSiteUrlDetected:y}=e;return l().createElement(l().Fragment,null,l().createElement("h2",null,d.mainTitle?(0,s.createInterpolateElement)(d.mainTitle,{em:l().createElement("em",null)}):__("Safe Mode has been activated","jetpack-idc")),l().createElement("p",null,(0,s.createInterpolateElement)(d.mainBodyText||__("Your site is in Safe Mode because you have 2 Jetpack-powered sites that appear to be duplicates. 2 sites that are telling Jetpack they’re the same site. Learn more about safe mode.","jetpack-idc"),{safeModeLink:l().createElement("a",{href:d.supportURL||(0,r.Z)("jetpack-support-safe-mode"),rel:"noopener noreferrer",target:"_blank"}),em:l().createElement("em",null),strong:l().createElement("strong",null)})),y&&l().createElement("p",null,(0,s.createInterpolateElement)(d.dynamicSiteUrlText||__("Notice: It appears that your 'wp-config.php' file might be using dynamic site URL values. Dynamic site URLs could cause Jetpack to enter Safe Mode. Learn how to set a static site URL.","jetpack-idc"),{dynamicSiteUrlSupportLink:l().createElement("a",{href:d.dynamicSiteUrlSupportLink||(0,r.Z)("jetpack-idcscreen-dynamic-site-urls"),rel:"noopener noreferrer",target:"_blank"}),em:l().createElement("em",null),strong:l().createElement("strong",null)})),l().createElement("h3",null,__("Please select an option","jetpack-idc")),l().createElement("div",{className:"jp-idc__idc-screen__cards"+(h||g?" jp-idc__idc-screen__cards-error":"")},l().createElement(p.Z,{wpcomHomeUrl:t,currentUrl:n,isMigrating:a,migrateCallback:i,customContent:d,hasError:h}),l().createElement("div",{className:"jp-idc__idc-screen__cards-separator"},"or"),l().createElement(u.Z,{wpcomHomeUrl:t,currentUrl:n,isStartingFresh:o,startFreshCallback:c,customContent:d,hasError:g})),l().createElement(m.Z,{hasError:f,customContent:d}))};h.propTypes={wpcomHomeUrl:o().string.isRequired,currentUrl:o().string.isRequired,isMigrating:o().bool.isRequired,migrateCallback:o().func,isStartingFresh:o().bool.isRequired,startFreshCallback:o().func,customContent:o().shape(d.Z),hasMigrateError:o().bool.isRequired,hasFreshError:o().bool.isRequired,hasStaySafeError:o().bool.isRequired,possibleDynamicSiteUrlDetected:o().bool},h.defaultProps={isMigrating:!1,isStartingFresh:!1,customContent:{},hasMigrateError:!1,hasFreshError:!1,hasStaySafeError:!1,possibleDynamicSiteUrlDetected:!1};const g=h},52:(e,t,n)=>{"use strict";n.d(t,{Z:()=>h});var r=n(33),s=n(609),a=n(307),i=n(736),o=n(162),c=n.n(o),l=n(196),d=n.n(l),u=n(144),p=n(115);const __=i.__,m=e=>{const{finishCallback:t,isFinishing:n,customContent:o}=e,c=(0,p.Z)(e.wpcomHomeUrl),l=(0,p.Z)(e.currentUrl),u=__("Got it, thanks","jetpack-idc");return d().createElement(d().Fragment,null,d().createElement("h2",null,o.migratedTitle?(0,a.createInterpolateElement)(o.migratedTitle,{em:d().createElement("em",null)}):__("Your Jetpack settings have migrated successfully","jetpack-idc")),d().createElement("p",null,(0,a.createInterpolateElement)(o.migratedBodyText||(0,i.sprintf)(/* translators: %1$s: The current site domain name. */ -__("Safe Mode has been switched off for %1$s website and Jetpack is fully functional.","jetpack-idc"),l),{hostname:d().createElement("strong",null),em:d().createElement("em",null),strong:d().createElement("strong",null)})),d().createElement("div",{className:"jp-idc__idc-screen__card-migrated"},d().createElement("div",{className:"jp-idc__idc-screen__card-migrated-hostname"},c),d().createElement(s.Dashicon,{icon:"arrow-down-alt",className:"jp-idc__idc-screen__card-migrated-separator"}),d().createElement(s.Dashicon,{icon:"arrow-right-alt",className:"jp-idc__idc-screen__card-migrated-separator-wide"}),d().createElement("div",{className:"jp-idc__idc-screen__card-migrated-hostname"},l)),d().createElement(s.Button,{className:"jp-idc__idc-screen__card-action-button jp-idc__idc-screen__card-action-button-migrated",onClick:t,label:u},n?d().createElement(r.Z,null):u))};m.propTypes={wpcomHomeUrl:c().string.isRequired,currentUrl:c().string.isRequired,finishCallback:c().func,isFinishing:c().bool.isRequired,customContent:c().shape(u.Z)},m.defaultProps={finishCallback:()=>{},isFinishing:!1,customContent:{}};const h=m},64:(e,t,n)=>{"use strict";n.d(t,{Z:()=>p});var r=n(895),s=n(307),a=n(736),i=n(162),o=n.n(i),c=n(196),l=n.n(c),d=n(144);const __=a.__,u=e=>{const{customContent:t}=e;return l().createElement(l().Fragment,null,l().createElement("h2",null,t.nonAdminTitle?(0,s.createInterpolateElement)(t.nonAdminTitle,{em:l().createElement("em",null)}):__("Safe Mode has been activated","jetpack-idc")),l().createElement("p",null,(0,s.createInterpolateElement)(t.nonAdminBodyText||__("This site is in Safe Mode because there are 2 Jetpack-powered sites that appear to be duplicates. 2 sites that are telling Jetpack they’re the same site. Learn more about safe mode.","jetpack-idc"),{safeModeLink:l().createElement("a",{href:t.supportURL||(0,r.Z)("jetpack-support-safe-mode"),rel:"noopener noreferrer",target:"_blank"}),em:l().createElement("em",null),strong:l().createElement("strong",null)})),t.nonAdminBodyText?"":l().createElement("p",null,__("An administrator of this site can take Jetpack out of Safe Mode.","jetpack-idc")))};u.propTypes={customContent:o().shape(d.Z)},u.defaultProps={customContent:{}};const p=u},567:(e,t,n)=>{"use strict";n.d(t,{Z:()=>g});var r=n(868),s=n(307),a=n(736),i=n(162),o=n.n(i),c=n(196),l=n.n(c),d=n(144),u=n(533),p=n(52),m=n(64);n(724);const __=a.__,h=e=>{const{logo:t,customContent:n,wpcomHomeUrl:r,currentUrl:a,redirectUri:i,isMigrating:o,migrateCallback:c,isMigrated:d,finishMigrationCallback:h,isFinishingMigration:g,isStartingFresh:f,startFreshCallback:y,isAdmin:k,hasMigrateError:C,hasFreshError:v,hasStaySafeError:_,possibleDynamicSiteUrlDetected:b}=e,E=k?"":l().createElement(m.Z,{customContent:n});let w="";return k&&(w=d?l().createElement(p.Z,{wpcomHomeUrl:r,currentUrl:a,finishCallback:h,isFinishing:g,customContent:n}):l().createElement(u.Z,{wpcomHomeUrl:r,currentUrl:a,redirectUri:i,customContent:n,isMigrating:o,migrateCallback:c,isStartingFresh:f,startFreshCallback:y,hasMigrateError:C,hasFreshError:v,hasStaySafeError:_,possibleDynamicSiteUrlDetected:b})),l().createElement("div",{className:"jp-idc__idc-screen"+(d?" jp-idc__idc-screen__success":"")},l().createElement("div",{className:"jp-idc__idc-screen__header"},l().createElement("div",{className:"jp-idc__idc-screen__logo"},((e,t)=>"string"==typeof e||e instanceof String?l().createElement("img",{src:e,alt:t,className:"jp-idc__idc-screen__logo-image"}):e)(t,n.logoAlt||"")),l().createElement("div",{className:"jp-idc__idc-screen__logo-label"},n.headerText?(0,s.createInterpolateElement)(n.headerText,{em:l().createElement("em",null),strong:l().createElement("strong",null)}):__("Safe Mode","jetpack-idc"))),E,w)};h.propTypes={logo:o().object.isRequired,customContent:o().shape(d.Z),wpcomHomeUrl:o().string.isRequired,currentUrl:o().string.isRequired,redirectUri:o().string.isRequired,isMigrating:o().bool.isRequired,migrateCallback:o().func,isMigrated:o().bool.isRequired,finishMigrationCallback:o().func,isFinishingMigration:o().bool.isRequired,isStartingFresh:o().bool.isRequired,startFreshCallback:o().func,isAdmin:o().bool.isRequired,hasMigrateError:o().bool.isRequired,hasFreshError:o().bool.isRequired,hasStaySafeError:o().bool.isRequired,possibleDynamicSiteUrlDetected:o().bool},h.defaultProps={logo:l().createElement(r.Z,{height:24}),isMigrated:!1,isFinishingMigration:!1,isMigrating:!1,isStartingFresh:!1,customContent:{},hasMigrateError:!1,hasFreshError:!1,hasStaySafeError:!1,possibleDynamicSiteUrlDetected:!1};const g=h},899:(e,t,n)=>{"use strict";n.d(t,{Z:()=>_});var r=n(743),s=n(33),a=n(895),i=n(609),o=n(333),c=n(818),l=n(307),d=n(736),u=n(483),p=n(162),m=n.n(p),h=n(196),g=n.n(h),f=n(678),y=n(144),k=n(521),C=n(637);n(310);const __=d.__,v=e=>{const{isActionInProgress:t,setIsActionInProgress:n,setErrorType:o,clearErrorType:c,hasError:d,customContent:p}=e,[m,f]=(0,h.useState)(!1),y=(0,h.useCallback)((()=>{t||(f(!0),n(!0),c(),(0,k.Z)("confirm_safe_mode"),r.ZP.confirmIDCSafeMode().then((()=>{window.location.href=(0,u.removeQueryArgs)(window.location.href,"jetpack_idc_clear_confirmation","_wpnonce")})).catch((e=>{throw n(!1),f(!1),o("safe-mode"),e})))}),[t,n,o,c]);return g().createElement("div",{className:"jp-idc__safe-mode"},m?g().createElement("div",{className:"jp-idc__safe-mode__staying-safe"},g().createElement(s.Z,{color:"black"}),g().createElement("span",null,__("Finishing setting up Safe mode…","jetpack-idc"))):(_=y,b=t,(0,l.createInterpolateElement)(__("Or decide later and stay in ","jetpack-idc"),{button:g().createElement(i.Button,{label:__("Safe mode","jetpack-idc"),variant:"link",onClick:_,disabled:b})})),d&&(v=p.supportURL,g().createElement(C.Z,null,(0,l.createInterpolateElement)(__("Could not stay in safe mode. Retry or find out more here.","jetpack-idc"),{a:g().createElement("a",{href:v||(0,a.Z)("jetpack-support-safe-mode"),rel:"noopener noreferrer",target:"_blank"})}))));var v,_,b};v.propTypes={isActionInProgress:m().bool,setIsActionInProgress:m().func.isRequired,setErrorType:m().func.isRequired,clearErrorType:m().func.isRequired,hasError:m().bool.isRequired,customContent:m().shape(y.Z)},v.defaultProps={hasError:!1};const _=(0,o.compose)([(0,c.withSelect)((e=>({isActionInProgress:e(f.t).getIsActionInProgress()}))),(0,c.withDispatch)((e=>({setIsActionInProgress:e(f.t).setIsActionInProgress,setErrorType:e(f.t).setErrorType,clearErrorType:e(f.t).clearErrorType})))])(v)},272:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(196);const s=()=>{const[e,t]=(0,r.useState)(!1),n=(0,r.useCallback)((()=>{e||(t(!0),window.location.reload())}),[e,t]);return{isFinishingMigration:e,finishMigrationCallback:n}}},970:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var r=n(743),s=n(818),a=n(196),i=n(678),o=n(521);const c=e=>{const[t,n]=(0,a.useState)(!1),c=(0,s.useSelect)((e=>e(i.t).getIsActionInProgress()),[]),{setIsActionInProgress:l,setErrorType:d,clearErrorType:u}=(0,s.useDispatch)(i.t);return{isMigrating:t,migrateCallback:(0,a.useCallback)((()=>{c||((0,o.Z)("migrate"),l(!0),n(!0),u(),r.ZP.migrateIDC().then((()=>{n(!1),e&&"[object Function]"==={}.toString.call(e)&&e()})).catch((e=>{throw l(!1),n(!1),d("migrate"),e})))}),[n,e,c,l,d,u])}}},105:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var r=n(743),s=n(818),a=n(196),i=n(678),o=n(521);const c=e=>{const[t,n]=(0,a.useState)(!1),c=(0,s.useSelect)((e=>e(i.t).getIsActionInProgress()),[]),{setIsActionInProgress:l,setErrorType:d,clearErrorType:u}=(0,s.useDispatch)(i.t);return{isStartingFresh:t,startFreshCallback:(0,a.useCallback)((()=>{c||((0,o.Z)("start_fresh"),l(!0),n(!0),u(),r.ZP.startIDCFresh(e).then((e=>{window.location.href=e+"&from=idc-notice"})).catch((e=>{throw l(!1),n(!1),d("start-fresh"),e})))}),[n,c,l,e,d,u])}}},136:(e,t,n)=>{"use strict";n.d(t,{ZP:()=>i,hG:()=>r,jk:()=>a,vC:()=>s});const r="SET_IS_ACTION_IN_PROGRESS",s="SET_ERROR_TYPE",a="CLEAR_ERROR_TYPE",i={setIsActionInProgress:e=>({type:r,isInProgress:e}),setErrorType:e=>({type:s,errorType:e}),clearErrorType:()=>({type:a})}},773:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(818),s=n(136);const a=(0,r.combineReducers)({isActionInProgress:(e=!1,t)=>t.type===s.hG?t.isInProgress:e,errorType:(e=null,t)=>{switch(t.type){case s.vC:return t.errorType;case s.jk:return null}return e}})},416:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r={getIsActionInProgress:e=>e.isActionInProgress||!1,getErrorType:e=>e.errorType||null}},943:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(818);class s{static store=null;static mayBeInit(e,t){null===s.store&&(s.store=(0,r.createReduxStore)(e,t),(0,r.register)(s.store))}}const a=s},678:(e,t,n)=>{"use strict";n.d(t,{t:()=>o});var r=n(136),s=n(773),a=n(416),i=n(943);const o="jetpack-idc";i.Z.mayBeInit(o,{reducer:s.Z,actions:r.ZP,selectors:a.Z})},144:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(162),s=n.n(r);const a={headerText:s().string,logoAlt:s().string,mainTitle:s().string,mainBodyText:s().string,migratedTitle:s().string,migratedBodyText:s().string,migrateCardTitle:s().string,migrateButtonLabel:s().string,migrateCardBodyText:s().string,startFreshCardTitle:s().string,startFreshCardBodyText:s().string,startFreshButtonLabel:s().string,nonAdminTitle:s().string,nonAdminBodyText:s().string,supportURL:s().string}},115:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=e=>/^https?:\/\//.test(e)?new URL(e).hostname:e.replace(/\/$/,"")},521:(e,t,n)=>{"use strict";n.d(t,{M:()=>s,Z:()=>a});var r=n(975);function s(e,t){t&&t.hasOwnProperty("userid")&&t.hasOwnProperty("username")&&r.Z.initialize(t.userid,t.username),e&&(e.hasOwnProperty("blogID")&&r.Z.assignSuperProps({blog_id:e.blogID}),e.hasOwnProperty("platform")&&r.Z.assignSuperProps({platform:e.platform})),r.Z.setMcAnalyticsEnabled(!0)}function a(e,t={}){void 0!==t&&"object"==typeof t||(t={}),e&&e.length&&void 0!==r.Z&&r.Z.tracks&&r.Z.mc&&(e=0!==(e=e.replace(/-/g,"_")).indexOf("jetpack_idc_")?"jetpack_idc_"+e:e,r.Z.tracks.recordEvent(e,t),e=(e=e.replace("jetpack_idc_","")).replace(/_/g,"-"),r.Z.mc.bumpStat("jetpack-idc",e))}},510:e=>{"use strict";if(void 0==={consumer_slug:"identity_crisis"}){var t=new Error('Cannot find module \'{"consumer_slug":"identity_crisis"}\'');throw t.code="MODULE_NOT_FOUND",t}e.exports={consumer_slug:"identity_crisis"}},196:e=>{"use strict";e.exports=window.React},609:e=>{"use strict";e.exports=window.wp.components},333:e=>{"use strict";e.exports=window.wp.compose},818:e=>{"use strict";e.exports=window.wp.data},307:e=>{"use strict";e.exports=window.wp.element},736:e=>{"use strict";e.exports=window.wp.i18n},483:e=>{"use strict";e.exports=window.wp.url},674:e=>{function t(){return e.exports=t=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";var e=n(381),t=n(307),r=n(196),s=n.n(r);window.addEventListener("load",(()=>function(){if(!window.hasOwnProperty("JP_IDENTITY_CRISIS__INITIAL_STATE"))return;const n=document.getElementById(window.JP_IDENTITY_CRISIS__INITIAL_STATE.containerID||"jp-identity-crisis-container");if(null===n)return;const{WP_API_root:r,WP_API_nonce:a,wpcomHomeUrl:i,currentUrl:o,redirectUri:c,tracksUserData:l,tracksEventData:d,isSafeModeConfirmed:u,consumerData:p,isAdmin:m,possibleDynamicSiteUrlDetected:h}=window.JP_IDENTITY_CRISIS__INITIAL_STATE;if(!u){const u=s().createElement(e.Z,{wpcomHomeUrl:i,currentUrl:o,apiRoot:r,apiNonce:a,redirectUri:c,tracksUserData:l||{},tracksEventData:d,customContent:p.hasOwnProperty("customContent")?p.customContent:{},isAdmin:m,logo:p.hasOwnProperty("logo")?p.logo:void 0,possibleDynamicSiteUrlDetected:h});t.createRoot(n).render(u)}}()))})()})(); \ No newline at end of file diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-identity-crisis/build/index.js.LICENSE.txt b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-identity-crisis/build/index.js.LICENSE.txt deleted file mode 100644 index 827f2732..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-identity-crisis/build/index.js.LICENSE.txt +++ /dev/null @@ -1,5 +0,0 @@ -/*! - Copyright (c) 2018 Jed Watson. - Licensed under the MIT License (MIT), see - http://jedwatson.github.io/classnames -*/ diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-identity-crisis/build/index.rtl.css b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-identity-crisis/build/index.rtl.css deleted file mode 100644 index 9897ac57..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-identity-crisis/build/index.rtl.css +++ /dev/null @@ -1 +0,0 @@ -#wpadminbar #wp-admin-bar-jetpack-idc{margin-left:5px}#wpadminbar #wp-admin-bar-jetpack-idc .jp-idc-admin-bar{border-radius:2px;color:#efeff0;font-size:14px;font-weight:500;line-height:20px;padding:6px 8px}#wpadminbar #wp-admin-bar-jetpack-idc.hide{display:none}#wpadminbar #wp-admin-bar-jetpack-idc .dashicons{font-family:dashicons;margin-top:-6px}#wpadminbar #wp-admin-bar-jetpack-idc .dashicons:before{font-size:18px}#wpadminbar #wp-admin-bar-jetpack-idc .ab-item{background:#e68b28;padding:0}#jp-identity-crisis-container .jp-idc__idc-screen{margin-bottom:40px;margin-top:40px}#jp-identity-crisis-container.notice{background:none;border:none}.jp-idc__idc-screen{background:#fff;border-radius:4px;border-right:4px solid #e68b28;box-shadow:0 0 40px #0000000a;box-sizing:border-box;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;margin:0 auto;max-width:1128px;padding:10px}.jp-idc__idc-screen.jp-idc__idc-screen__success{border-color:#069e08}@media(min-width:600px){.jp-idc__idc-screen{padding:48px}}.jp-idc__idc-screen .jp-idc__idc-screen__header{align-items:center;display:flex}.jp-idc__idc-screen .jp-idc__idc-screen__header .jp-idc__idc-screen__logo-image{max-height:100px;max-width:100px}.jp-idc__idc-screen .jp-idc__idc-screen__header .jp-idc__idc-screen__logo-label{font-size:14px;line-height:22px;margin:-7px 8px 0 0}.jp-idc__idc-screen h2{font-size:24px;font-weight:600;line-height:28px;margin:32px 0 0}.jp-idc__idc-screen h3{font-size:20px;font-weight:600;line-height:28px;margin:24px 0 0}.jp-idc__idc-screen p{color:#2c3338;font-size:16px;line-height:24px;margin:16px 0 0;max-width:710px}.jp-idc__idc-screen a{color:#2c3338}.jp-idc__idc-screen .jp-idc__idc-screen__cards{align-items:center;display:flex;flex-direction:column;flex-wrap:wrap}@media only screen and (min-width:1403px){.jp-idc__idc-screen .jp-idc__idc-screen__cards{align-items:normal;flex-direction:row}}.jp-idc__idc-screen .jp-idc__idc-screen__cards .jp-idc__idc-screen__cards-separator{align-self:center;color:#23282d;font-size:20px;font-weight:600;line-height:28px;margin:0 24px}.jp-idc__idc-screen .jp-idc__idc-screen__cards .jp-idc__idc-screen__card-action-base{border:1px solid #c3c4c7;border-radius:4px;box-sizing:border-box;display:flex;flex-direction:column;justify-content:space-between;margin:24px 0;max-width:100%;padding:10px;width:480px}@media(min-width:600px){.jp-idc__idc-screen .jp-idc__idc-screen__cards .jp-idc__idc-screen__card-action-base{padding:24px}}.jp-idc__idc-screen .jp-idc__idc-screen__cards .jp-idc__idc-screen__card-action-base h4{font-size:20px;font-weight:400;line-height:28px;margin:0 0 8px}.jp-idc__idc-screen .jp-idc__idc-screen__cards .jp-idc__idc-screen__card-action-base p{margin:0 0 24px}.jp-idc__idc-screen .jp-idc__idc-screen__cards .jp-idc__idc-screen__card-action-base .jp-idc__idc-screen__card-action-sitename{background:#f9f9f6;border-radius:33px;box-sizing:border-box;color:#2c3338;font-size:16px;font-weight:700;line-height:24px;overflow-wrap:anywhere;padding:16px;text-align:center;width:100%}.jp-idc__idc-screen .jp-idc__idc-screen__cards .jp-idc__idc-screen__card-action-base .jp-idc__idc-screen__card-action-separator{display:block;margin:12px auto}.jp-idc__idc-screen .jp-idc__idc-screen__cards .jp-idc__idc-screen__card-action-base .jp-idc__idc-screen__card-action-button{padding:8px 24px;width:100%}.jp-idc__idc-screen .jp-idc__idc-screen__card-action-button{background:#000;border-radius:4px;color:#fff;font-size:16px;font-weight:600;height:auto;justify-content:center;line-height:24px;margin-top:24px;min-height:40px;padding:8px}.jp-idc__idc-screen .jp-idc__idc-screen__card-action-button-migrated{margin-top:64px;width:141px}.jp-idc__idc-screen .jp-idc__idc-screen__card-migrated{align-items:center;display:flex;flex-direction:column;flex-wrap:wrap;margin-top:24px;width:100%}.jp-idc__idc-screen .jp-idc__idc-screen__card-migrated .jp-idc__idc-screen__card-migrated-hostname{border:1px solid #c3c4c7;border-radius:4px;color:#2c3338;flex-grow:1;font-size:16px;font-weight:700;line-height:24px;padding:24px;width:100%}.jp-idc__idc-screen .jp-idc__idc-screen__card-migrated .jp-idc__idc-screen__card-migrated-separator-wide{display:none}.jp-idc__idc-screen .jp-idc__idc-screen__card-migrated .jp-idc__idc-screen__card-migrated-separator{display:block}.jp-idc__idc-screen .jp-idc__idc-screen__card-migrated .jp-idc__idc-screen__card-migrated-separator,.jp-idc__idc-screen .jp-idc__idc-screen__card-migrated .jp-idc__idc-screen__card-migrated-separator-wide{margin:28px}@media only screen and (min-width:1400px){.jp-idc__idc-screen .jp-idc__idc-screen__card-migrated{flex-direction:row;width:auto}.jp-idc__idc-screen .jp-idc__idc-screen__card-migrated .jp-idc__idc-screen__card-migrated-separator{display:none}.jp-idc__idc-screen .jp-idc__idc-screen__card-migrated .jp-idc__idc-screen__card-migrated-separator-wide{display:block}.jp-idc__idc-screen .jp-idc__idc-screen__card-migrated .jp-idc__idc-screen__card-migrated-hostname{width:auto}}@keyframes rotate-spinner{to{transform:rotate(-1turn)}}.jp-components-spinner{align-items:center;display:flex}.jp-components-spinner__inner,.jp-components-spinner__outer{animation:3s linear infinite;animation-name:rotate-spinner;border:.1em solid #0000;border-radius:50%;box-sizing:border-box;margin:auto}.jp-components-spinner__outer{border-top-color:#fff}.jp-components-spinner__inner{border-left-color:#fff;border-top-color:#fff;height:100%;opacity:.4;width:100%}:root{--font-title-large:36px;--font-title-small:24px;--font-body:16px;--font-label:12px;--jp-black:#000;--jp-black-80:#2c3338;--jp-white:#fff;--jp-white-off:#f9f9f6;--jp-gray:#dcdcde;--jp-gray-0:#f6f7f7;--jp-gray-5:#dcdcde;--jp-gray-10:#c3c4c7;--jp-gray-20:#a7aaad;--jp-gray-30:#8c8f94;--jp-gray-40:#787c82;--jp-gray-50:#646970;--jp-gray-60:#50575e;--jp-gray-70:#3c434a;--jp-gray-80:#2c3338;--jp-gray-90:#1d2327;--jp-gray-100:#101517;--jp-gray-off:#e2e2df;--jp-yellow-5:#f5e6b3;--jp-yellow-10:#f2cf75;--jp-orange-20:#faa754;--jp-blue-5:#ced9f2;--jp-red-0:#f7ebec;--jp-red-50:#d63638;--jp-red-60:#b32d2e;--jp-red-80:#8a2424;--jp-red:#d63639;--jp-pink:#c9356e;--jp-green-0:#f0f2eb;--jp-green-5:#d0e6b8;--jp-green-10:#9dd977;--jp-green-20:#64ca43;--jp-green-30:#2fb41f;--jp-green-40:#069e08;--jp-green-50:#008710;--jp-green-60:#007117;--jp-green-70:#005b18;--jp-green-80:#004515;--jp-green-90:#003010;--jp-green-100:#001c09;--jp-green:#069e08;--jp-green-primary:var(--jp-green-40);--jp-green-secondary:var(--jp-green-30);--jp-border-radius:4px;--jp-border-radius-rna:8px;--jp-menu-border-height:1px;--jp-underline-thickness:2px;--jp-modal-padding-large:32px;--jp-modal-padding:24px;--jp-modal-padding-small:16px;--jp-modal-radius:8px;--jp-button-padding:8px;--jp-button-radius:4px;--jp-gap:16px;--jp-highlight:#3858e9}body{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;margin:0;min-height:100%;padding:0}.jp-wrap{align-items:center;display:flex;flex-wrap:wrap;margin:0 auto;max-width:1128px}.jp-row{display:grid;grid-gap:24px;grid-template-columns:repeat(4,1fr);margin:0 16px;width:100%}@media(min-width:600px){.jp-row{grid-template-columns:repeat(8,1fr);margin:0 18px}}@media(min-width:960px){.jp-row{grid-template-columns:repeat(12,1fr);margin:0 24px;max-width:1128px}}.sm-col-span-1{grid-column-end:span 1}.sm-col-span-2{grid-column-end:span 2}.sm-col-span-3{grid-column-end:span 3}.sm-col-span-4{grid-column-end:span 4}@media(min-width:600px){.md-col-span-1{grid-column-end:span 1}.md-col-span-2{grid-column-end:span 2}.md-col-span-3{grid-column-end:span 3}.md-col-span-4{grid-column-end:span 4}.md-col-span-5{grid-column-end:span 5}.md-col-span-6{grid-column-end:span 6}.md-col-span-7{grid-column-end:span 7}.md-col-span-8{grid-column-end:span 8}}@media(min-width:960px){.lg-col-span-1{grid-column-end:span 1}.lg-col-span-2{grid-column-end:span 2}.lg-col-span-3{grid-column-end:span 3}.lg-col-span-4{grid-column-end:span 4}.lg-col-span-5{grid-column-end:span 5}.lg-col-span-6{grid-column-end:span 6}.lg-col-span-7{grid-column-end:span 7}.lg-col-span-8{grid-column-end:span 8}.lg-col-span-9{grid-column-end:span 9}.lg-col-span-10{grid-column-end:span 10}.lg-col-span-11{grid-column-end:span 11}.lg-col-span-12{grid-column-end:span 12}}@media(max-width:960px){.md-col-span-0{display:none}}@media(max-width:600px){.sm-col-span-0{display:none}}.jp-cut{border:2px solid var(--jp-green-primary);border-radius:var(--jp-border-radius);margin:32px 0;padding:16px 24px 16px 64px;position:relative;text-decoration:none}.jp-cut,.jp-cut span{display:block}.jp-cut span:last-of-type{font-weight:600}.jp-cut:focus span:last-of-type,.jp-cut:hover span:last-of-type{text-decoration:underline;text-decoration-thickness:var(--jp-underline-thickness)}.jp-cut:focus:after,.jp-cut:hover:after{transform:translateY(-50%) translateX(-8px)}.jp-cut:after{color:var(--jp-green-primary);content:"→";font-size:24px;font-weight:600;left:24px;position:absolute;top:50%;transform:translateY(-50%);transition:transform .15s ease-out}.jp-idc__idc-screen .jp-idc__error-message{align-items:center;color:var(--jp-red);display:flex;flex-direction:row;justify-content:center;margin:15px 0}.jp-idc__idc-screen .jp-idc__error-message .error-gridicon{margin-left:8px;fill:var(--jp-red)}.jp-idc__idc-screen .jp-idc__error-message a,.jp-idc__idc-screen .jp-idc__error-message span{color:var(--jp-red);font-size:var(--font-body)}.jp-idc__idc-screen .jp-idc__safe-mode .jp-idc__error-message{margin-top:5px}.jp-idc__idc-screen .jp-idc__idc-screen__cards.jp-idc__idc-screen__cards-error .jp-idc__idc-screen__card-action-base{padding-bottom:75px}.jp-idc__idc-screen .jp-idc__idc-screen__cards.jp-idc__idc-screen__cards-error .jp-idc__idc-screen__card-action-base.jp-idc__idc-screen__card-action-error{padding-bottom:5px}.jp-idc__idc-screen .jp-idc__idc-screen__cards.jp-idc__idc-screen__cards-error .jp-idc__idc-screen__card-action-base .jp-idc__error-message{height:40px}.jp-idc__idc-screen .jp-idc__safe-mode{text-align:center}.jp-idc__idc-screen .jp-idc__safe-mode .jp-idc__safe-mode__staying-safe{display:flex;justify-content:center;padding:6px}.jp-idc__idc-screen .jp-idc__safe-mode .jp-idc__safe-mode__staying-safe .jp-components-spinner{margin:0 10px}.jp-idc__idc-screen .jp-idc__safe-mode,.jp-idc__idc-screen .jp-idc__safe-mode button{color:#2c3338;font-size:16px;line-height:24px}.jp-idc__idc-screen .jp-idc__safe-mode button{padding:0;text-decoration:underline} \ No newline at end of file diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-identity-crisis/composer.json b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-identity-crisis/composer.json deleted file mode 100644 index f57ecb86..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-identity-crisis/composer.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "name": "automattic/jetpack-identity-crisis", - "description": "Identity Crisis.", - "type": "jetpack-library", - "license": "GPL-2.0-or-later", - "require": { - "php": ">=7.0", - "automattic/jetpack-connection": "^2.4.1", - "automattic/jetpack-constants": "^2.0.1", - "automattic/jetpack-status": "^2.1.2", - "automattic/jetpack-logo": "^2.0.1", - "automattic/jetpack-assets": "^2.1.4" - }, - "require-dev": { - "automattic/jetpack-changelogger": "^4.1.1", - "yoast/phpunit-polyfills": "1.1.0", - "automattic/wordbless": "@dev" - }, - "suggest": { - "automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package." - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "scripts": { - "build-development": [ - "pnpm run build" - ], - "build-production": [ - "NODE_ENV='production' pnpm run build" - ], - "phpunit": [ - "./vendor/phpunit/phpunit/phpunit --colors=always" - ], - "test-php": [ - "@composer phpunit" - ], - "post-install-cmd": "WorDBless\\Composer\\InstallDropin::copy", - "post-update-cmd": "WorDBless\\Composer\\InstallDropin::copy", - "watch": [ - "Composer\\Config::disableProcessTimeout", - "pnpm run watch" - ] - }, - "minimum-stability": "dev", - "prefer-stable": true, - "extra": { - "autotagger": true, - "mirror-repo": "Automattic/jetpack-identity-crisis", - "textdomain": "jetpack-idc", - "version-constants": { - "::PACKAGE_VERSION": "src/class-identity-crisis.php" - }, - "changelogger": { - "link-template": "https://github.com/Automattic/jetpack-identity-crisis/compare/v${old}...v${new}" - }, - "branch-alias": { - "dev-trunk": "0.17.x-dev" - } - }, - "config": { - "allow-plugins": { - "roots/wordpress-core-installer": true - } - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-identity-crisis/src/_inc/admin-bar.scss b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-identity-crisis/src/_inc/admin-bar.scss deleted file mode 100644 index 262b0819..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-identity-crisis/src/_inc/admin-bar.scss +++ /dev/null @@ -1,30 +0,0 @@ -#wpadminbar #wp-admin-bar-jetpack-idc { - margin-right: 5px; - - .jp-idc-admin-bar { - border-radius: 2px; - font-weight: 500; - font-size: 14px; - line-height: 20px; - color: #EFEFF0; - padding: 6px 8px; - } - - &.hide { - display: none; - } - - .dashicons { - font-family: 'dashicons'; - margin-top: -6px; - - &:before { - font-size: 18px; - } - } - - .ab-item { - padding: 0; - background: #E68B28; - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-identity-crisis/src/_inc/admin.jsx b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-identity-crisis/src/_inc/admin.jsx deleted file mode 100644 index bec5ead0..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-identity-crisis/src/_inc/admin.jsx +++ /dev/null @@ -1,60 +0,0 @@ -import { IDCScreen } from '@automattic/jetpack-idc'; -import * as WPElement from '@wordpress/element'; -import React from 'react'; - -import './admin-bar.scss'; -import './style.scss'; - -/** - * The initial renderer function. - */ -function render() { - if ( ! window.hasOwnProperty( 'JP_IDENTITY_CRISIS__INITIAL_STATE' ) ) { - return; - } - - const container = document.getElementById( - window.JP_IDENTITY_CRISIS__INITIAL_STATE.containerID || 'jp-identity-crisis-container' - ); - - if ( null === container ) { - return; - } - - const { - WP_API_root, - WP_API_nonce, - wpcomHomeUrl, - currentUrl, - redirectUri, - tracksUserData, - tracksEventData, - isSafeModeConfirmed, - consumerData, - isAdmin, - possibleDynamicSiteUrlDetected, - } = window.JP_IDENTITY_CRISIS__INITIAL_STATE; - - if ( ! isSafeModeConfirmed ) { - const component = ( - - ); - WPElement.createRoot( container ).render( component ); - } -} - -window.addEventListener( 'load', () => render() ); diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-identity-crisis/src/_inc/style.scss b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-identity-crisis/src/_inc/style.scss deleted file mode 100644 index 14f09db9..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-identity-crisis/src/_inc/style.scss +++ /dev/null @@ -1,9 +0,0 @@ -#jp-identity-crisis-container .jp-idc__idc-screen { - margin-top: 40px; - margin-bottom: 40px; -} - -#jp-identity-crisis-container.notice { - background: none; - border: none; -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-identity-crisis/src/class-exception.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-identity-crisis/src/class-exception.php deleted file mode 100644 index 5305208e..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-identity-crisis/src/class-exception.php +++ /dev/null @@ -1,13 +0,0 @@ -disconnect_site( true ); - } else { - $connection->disconnect_site( false ); - } - - delete_option( static::PERSISTENT_BLOG_ID_OPTION_NAME ); - - // Clear IDC options. - self::clear_all_idc_options(); - } - - /** - * Filter to prevent site from disconnecting from WPCOM if it's in an IDC. - * - * @see jetpack_connection_disconnect_site_wpcom filter. - * - * @return bool False if the site is in IDC, true otherwise. - */ - public static function jetpack_connection_disconnect_site_wpcom_filter() { - return ! self::validate_sync_error_idc_option(); - } - - /** - * Gets the link to the support document used to explain Safe Mode to users. - * - * @deprecated since 0.17.0 Use `@automattic/jetpack-idc` instead. - * @return string - */ - public static function get_safe_mod_doc_url() { - _deprecated_function( __METHOD__, 'package-0.17.0' ); - return Redirect::get_url( 'jetpack-support-safe-mode' ); - } - - /** - * This method loops through the array of processed items from sync and checks if one of the items was the - * home_url or site_url callable. If so, then we delete the jetpack_migrate_for_idc option. - * - * @param array $processed_items Array of processed items that were synced to WordPress.com. - */ - public function maybe_clear_migrate_option( $processed_items ) { - foreach ( (array) $processed_items as $item ) { - - // First, is this item a jetpack_sync_callable action? If so, then proceed. - $callable_args = ( is_array( $item ) && isset( $item[0] ) && isset( $item[1] ) && 'jetpack_sync_callable' === $item[0] ) - ? $item[1] - : null; - - // Second, if $callable_args is set, check if the callable was home_url or site_url. If so, - // clear the migrate option. - if ( - isset( $callable_args[0] ) - && ( 'home_url' === $callable_args[0] || 'site_url' === $callable_args[1] ) - ) { - Jetpack_Options::delete_option( 'migrate_for_idc' ); - break; - } - } - } - - /** - * WordPress init. - * - * @return void - */ - public function wordpress_init() { - if ( current_user_can( 'jetpack_disconnect' ) ) { - if ( - isset( $_GET['jetpack_idc_clear_confirmation'] ) && isset( $_GET['_wpnonce'] ) && - wp_verify_nonce( $_GET['_wpnonce'], 'jetpack_idc_clear_confirmation' ) // phpcs:ignore WordPress.Security.ValidatedSanitizedInput -- WordPress core doesn't unslash or verify nonces either. - ) { - Jetpack_Options::delete_option( 'safe_mode_confirmed' ); - self::$is_safe_mode_confirmed = false; - } else { - self::$is_safe_mode_confirmed = (bool) Jetpack_Options::get_option( 'safe_mode_confirmed' ); - } - } - - // 121 Priority so that it's the most inner Jetpack item in the admin bar. - add_action( 'admin_bar_menu', array( $this, 'display_admin_bar_button' ), 121 ); - - UI::init(); - } - - /** - * Add the idc query arguments to the url. - * - * @param string $url The remote request url. - */ - public function add_idc_query_args_to_url( $url ) { - $status = new Status(); - if ( ! is_string( $url ) - || $status->is_offline_mode() - || self::validate_sync_error_idc_option() ) { - return $url; - } - $home_url = Urls::home_url(); - $site_url = Urls::site_url(); - $hostname = wp_parse_url( $site_url, PHP_URL_HOST ); - - // If request is from an IP, make sure ip_requester option is set - if ( self::url_is_ip( $hostname ) ) { - self::maybe_update_ip_requester( $hostname ); - } - - $query_args = array( - 'home' => $home_url, - 'siteurl' => $site_url, - ); - - if ( self::should_handle_idc() ) { - $query_args['idc'] = true; - } - - if ( \Jetpack_Options::get_option( 'migrate_for_idc', false ) ) { - $query_args['migrate_for_idc'] = true; - } - - if ( is_multisite() ) { - $query_args['multisite'] = true; - } - - return add_query_arg( $query_args, $url ); - } - - /** - * Renders the admin bar button. - * - * @return void - */ - public function display_admin_bar_button() { - global $wp_admin_bar; - - $href = is_admin() - ? add_query_arg( 'jetpack_idc_clear_confirmation', '1' ) - : add_query_arg( 'jetpack_idc_clear_confirmation', '1', admin_url() ); - - $href = wp_nonce_url( $href, 'jetpack_idc_clear_confirmation' ); - - $consumer_data = UI::get_consumer_data(); - $label = isset( $consumer_data['customContent']['adminBarSafeModeLabel'] ) - ? esc_html( $consumer_data['customContent']['adminBarSafeModeLabel'] ) - : esc_html__( 'Jetpack Safe Mode', 'jetpack-idc' ); - - $title = sprintf( - '', - '', - $label - ); - - $menu = array( - 'id' => 'jetpack-idc', - 'title' => $title, - 'href' => esc_url( $href ), - 'parent' => 'top-secondary', - ); - - if ( ! self::$is_safe_mode_confirmed ) { - $menu['meta'] = array( - 'class' => 'hide', - ); - } - - $wp_admin_bar->add_node( $menu ); - } - - /** - * Checks if the site is currently in an identity crisis. - * - * @return array|bool Array of options that are in a crisis, or false if everything is OK. - */ - public static function check_identity_crisis() { - $connection = new Connection_Manager( 'jetpack' ); - - if ( ! $connection->is_connected() || ( new Status() )->is_offline_mode() || ! self::validate_sync_error_idc_option() ) { - return false; - } - return Jetpack_Options::get_option( 'sync_error_idc' ); - } - - /** - * Checks the HTTP response body for the 'idc_detected' key. If the key exists, - * checks the idc_detected value for a valid idc error. - * - * @param array|WP_Error $http_response The HTTP response. - * - * @return bool Whether the site is in an identity crisis. - */ - public function check_http_response_for_idc_detected( $http_response ) { - if ( ! is_array( $http_response ) ) { - return false; - } - $response_body = json_decode( wp_remote_retrieve_body( $http_response ), true ); - - if ( isset( $response_body['idc_detected'] ) ) { - return $this->check_response_for_idc( $response_body['idc_detected'] ); - } - - if ( isset( $response_body['migrated_for_idc'] ) ) { - Jetpack_Options::delete_option( 'migrate_for_idc' ); - } - - return false; - } - - /** - * Checks the WPCOM response to determine if the site is in an identity crisis. Updates the - * sync_error_idc option if it is. - * - * @param array $response The response data. - * - * @return bool Whether the site is in an identity crisis. - */ - public function check_response_for_idc( $response ) { - if ( ! is_array( $response ) ) { - return false; - } - - if ( is_array( $response ) && isset( $response['error_code'] ) ) { - $error_code = $response['error_code']; - $allowed_idc_error_codes = array( - 'jetpack_url_mismatch', - 'jetpack_home_url_mismatch', - 'jetpack_site_url_mismatch', - ); - - if ( in_array( $error_code, $allowed_idc_error_codes, true ) ) { - Jetpack_Options::update_option( - 'sync_error_idc', - self::get_sync_error_idc_option( $response ) - ); - } - - return true; - } - - return false; - } - - /** - * Prepare URL for display. - * - * @deprecated since 0.17.0 Use `@automattic/jetpack-idc` instead. - * @param string $url URL to display. - * - * @return string - */ - public static function prepare_url_for_display( $url ) { - _deprecated_function( __METHOD__, 'package-0.17.0' ); - return untrailingslashit( self::normalize_url_protocol_agnostic( $url ) ); - } - - /** - * Clears all IDC specific options. This method is used on disconnect and reconnect. - * - * @return void - */ - public static function clear_all_idc_options() { - // If the site is currently in IDC, let's also clear the VaultPress connection options. - // We have to check if the site is in IDC, otherwise we'd be clearing the VaultPress - // connection any time the Jetpack connection is cycled. - if ( self::validate_sync_error_idc_option() ) { - delete_option( 'vaultpress' ); - delete_option( 'vaultpress_auto_register' ); - } - - Jetpack_Options::delete_option( - array( - 'sync_error_idc', - 'safe_mode_confirmed', - 'migrate_for_idc', - ) - ); - - delete_transient( 'jetpack_idc_possible_dynamic_site_url_detected' ); - } - - /** - * Checks whether the sync_error_idc option is valid or not, and if not, will do cleanup. - * - * @return bool - * @since-jetpack 5.4.0 Do not call get_sync_error_idc_option() unless site is in IDC - * - * @since 0.2.0 - * @since-jetpack 4.4.0 - */ - public static function validate_sync_error_idc_option() { - $is_valid = false; - - // Is the site opted in and does the stored sync_error_idc option match what we now generate? - $sync_error = Jetpack_Options::get_option( 'sync_error_idc' ); - if ( $sync_error && self::should_handle_idc() ) { - $local_options = self::get_sync_error_idc_option(); - - // Ensure all values are set. - if ( isset( $sync_error['home'] ) && isset( $local_options['home'] ) && isset( $sync_error['siteurl'] ) && isset( $local_options['siteurl'] ) ) { - // If the WP.com expected home and siteurl match local home and siteurl it is not valid IDC. - if ( - isset( $sync_error['wpcom_home'] ) && - isset( $sync_error['wpcom_siteurl'] ) && - $sync_error['wpcom_home'] === $local_options['home'] && - $sync_error['wpcom_siteurl'] === $local_options['siteurl'] - ) { - $is_valid = false; - // Enable migrate_for_idc so that sync actions are accepted. - Jetpack_Options::update_option( 'migrate_for_idc', true ); - } elseif ( $sync_error['home'] === $local_options['home'] && $sync_error['siteurl'] === $local_options['siteurl'] ) { - $is_valid = true; - } - } - } - - /** - * Filters whether the sync_error_idc option is valid. - * - * @param bool $is_valid If the sync_error_idc is valid or not. - * - * @since 0.2.0 - * @since-jetpack 4.4.0 - */ - $is_valid = (bool) apply_filters( 'jetpack_sync_error_idc_validation', $is_valid ); - - if ( ! $is_valid && $sync_error ) { - // Since the option exists, and did not validate, delete it. - Jetpack_Options::delete_option( 'sync_error_idc' ); - } - - return $is_valid; - } - - /** - * Reverses WP.com URLs stored in sync_error_idc option. - * - * @param array $sync_error error option containing reversed URLs. - * @return array - */ - public static function reverse_wpcom_urls_for_idc( $sync_error ) { - if ( isset( $sync_error['reversed_url'] ) ) { - if ( array_key_exists( 'wpcom_siteurl', $sync_error ) ) { - $sync_error['wpcom_siteurl'] = strrev( $sync_error['wpcom_siteurl'] ); - } - if ( array_key_exists( 'wpcom_home', $sync_error ) ) { - $sync_error['wpcom_home'] = strrev( $sync_error['wpcom_home'] ); - } - } - return $sync_error; - } - - /** - * Normalizes a url by doing three things: - * - Strips protocol - * - Strips www - * - Adds a trailing slash - * - * @param string $url URL to parse. - * - * @return WP_Error|string - * @since 0.2.0 - * @since-jetpack 4.4.0 - */ - public static function normalize_url_protocol_agnostic( $url ) { - $parsed_url = wp_parse_url( trailingslashit( esc_url_raw( $url ) ) ); - if ( ! $parsed_url || empty( $parsed_url['host'] ) || empty( $parsed_url['path'] ) ) { - return new WP_Error( - 'cannot_parse_url', - sprintf( - /* translators: %s: URL to parse. */ - esc_html__( 'Cannot parse URL %s', 'jetpack-idc' ), - $url - ) - ); - } - - // Strip www and protocols. - $url = preg_replace( '/^www\./i', '', $parsed_url['host'] . $parsed_url['path'] ); - - return $url; - } - - /** - * Gets the value that is to be saved in the jetpack_sync_error_idc option. - * - * @param array $response HTTP response. - * - * @return array Array of the local urls, wpcom urls, and error code. - * @since 0.2.0 - * @since-jetpack 4.4.0 - * @since-jetpack 5.4.0 Add transient since home/siteurl retrieved directly from DB. - */ - public static function get_sync_error_idc_option( $response = array() ) { - // Since the local options will hit the database directly, store the values - // in a transient to allow for autoloading and caching on subsequent views. - $local_options = get_transient( 'jetpack_idc_local' ); - if ( false === $local_options ) { - $local_options = array( - 'home' => Urls::home_url(), - 'siteurl' => Urls::site_url(), - ); - set_transient( 'jetpack_idc_local', $local_options, MINUTE_IN_SECONDS ); - } - - $options = array_merge( $local_options, $response ); - - $returned_values = array(); - foreach ( $options as $key => $option ) { - if ( 'error_code' === $key ) { - $returned_values[ $key ] = $option; - continue; - } - - $normalized_url = self::normalize_url_protocol_agnostic( $option ); - if ( is_wp_error( $normalized_url ) ) { - continue; - } - - $returned_values[ $key ] = $normalized_url; - } - // We need to protect WPCOM URLs from search & replace by reversing them. See https://wp.me/pf5801-3R - // Add 'reversed_url' key for backward compatibility - if ( array_key_exists( 'wpcom_home', $returned_values ) && array_key_exists( 'wpcom_siteurl', $returned_values ) ) { - $returned_values['reversed_url'] = true; - $returned_values = self::reverse_wpcom_urls_for_idc( $returned_values ); - } - - return $returned_values; - } - - /** - * Returns the value of the jetpack_should_handle_idc filter or constant. - * If set to true, the site will be put into staging mode. - * - * This method uses both the current jetpack_should_handle_idc filter - * and constant to determine whether an IDC should be handled. - * - * @return bool - * @since 0.2.6 - */ - public static function should_handle_idc() { - if ( Constants::is_defined( 'JETPACK_SHOULD_HANDLE_IDC' ) ) { - $default = Constants::get_constant( 'JETPACK_SHOULD_HANDLE_IDC' ); - } else { - $default = ! Constants::is_defined( 'SUNRISE' ) && ! is_multisite(); - } - - /** - * Allows sites to opt in for IDC mitigation which blocks the site from syncing to WordPress.com when the home - * URL or site URL do not match what WordPress.com expects. The default value is either true, or the value of - * JETPACK_SHOULD_HANDLE_IDC constant if set. - * - * @param bool $default Whether the site is opted in to IDC mitigation. - * - * @since 0.2.6 - */ - return (bool) apply_filters( 'jetpack_should_handle_idc', $default ); - } - - /** - * Is a container for the error notices. - * Will be shown/controlled by jQuery in idc-notice.js. - * - * @deprecated 0.17.0 Use `@automattic/jetpack-idc` instead. - * @return void - */ - public function render_error_notice() { - _deprecated_function( __METHOD__, 'package-0.17.0' ); - ?> - - - - - - Safe mode because we noticed this is an exact copy of %3$s.', 'jetpack-idc' ), - esc_url( self::get_safe_mod_doc_url() ), - esc_url( self::$wpcom_home_url ), - self::prepare_url_for_display( esc_url_raw( self::$wpcom_home_url ) ) - ), - array( 'a' => array( 'href' => array() ) ) - ); - - /** - * Allows overriding of the default header text in the first step of the Safe Mode notice. - * - * @param string $html The HTML to be displayed. - * - * @since 0.2.0 - * @since-jetpack 4.4.0 - */ - return apply_filters( 'jetpack_idc_first_step_header_lead', $html ); - } - - /** - * Returns the first step header explanation. - * - * @deprecated since 0.17.0 Use `@automattic/jetpack-idc` instead. - * - * @return string - */ - public function get_first_step_header_explanation() { - _deprecated_function( __METHOD__, 'package-0.17.0' ); - $html = wp_kses( - sprintf( - /* translators: %s: Safe mode docs URL. */ - __( 'Please confirm Safe Mode or fix the Jetpack connection. Select one of the options below or learn more about Safe Mode.', 'jetpack-idc' ), - esc_url( self::get_safe_mod_doc_url() ) - ), - array( 'a' => array( 'href' => array() ) ) - ); - - /** - * Allows overriding of the default header explanation text in the first step of the Safe Mode notice. - * - * @param string $html The HTML to be displayed. - * - * @since 0.2.0 - * @since-jetpack 4.4.0 - */ - return apply_filters( 'jetpack_idc_first_step_header_explanation', $html ); - } - - /** - * Returns the confirm safe mode explanation. - * - * @deprecated since 0.17.0 Use `@automattic/jetpack-idc` instead. - * @return string - */ - public function get_confirm_safe_mode_action_explanation() { - _deprecated_function( __METHOD__, 'package-0.17.0' ); - $html = wp_kses( - sprintf( - /* translators: %s: Site URL. */ - __( 'Is this website a temporary duplicate of %2$s for the purposes of testing, staging or development? If so, we recommend keeping it in Safe Mode.', 'jetpack-idc' ), - esc_url( untrailingslashit( self::$wpcom_home_url ) ), - self::prepare_url_for_display( esc_url( self::$wpcom_home_url ) ) - ), - array( 'a' => array( 'href' => array() ) ) - ); - - /** - * Allows overriding of the default text used to explain the confirm safe mode action. - * - * @param string $html The HTML to be displayed. - * - * @since 0.2.0 - * @since-jetpack 4.4.0 - */ - return apply_filters( 'jetpack_idc_confirm_safe_mode_explanation', $html ); - } - - /** - * Returns the confirm safe mode button text. - * - * @deprecated since 0.17.0 Use `@automattic/jetpack-idc` instead. - * @return string - */ - public function get_confirm_safe_mode_button_text() { - _deprecated_function( __METHOD__, 'package-0.17.0' ); - $string = esc_html__( 'Confirm Safe Mode', 'jetpack-idc' ); - - /** - * Allows overriding of the default text used for the confirm safe mode action button. - * - * @param string $string The string to be displayed. - * - * @since 0.2.0 - * @since-jetpack 4.4.0 - */ - return apply_filters( 'jetpack_idc_confirm_safe_mode_button_text', $string ); - } - - /** - * Returns the first step fix connection action explanation. - * - * @deprecated since 0.17.0 Use `@automattic/jetpack-idc` instead. - * @return string - */ - public function get_first_step_fix_connection_action_explanation() { - _deprecated_function( __METHOD__, 'package-0.17.0' ); - $html = wp_kses( - sprintf( - /* translators: %s: Site URL. */ - __( 'If this is a separate and new website, or the new home of %2$s, we recommend turning Safe Mode off, and re-establishing your connection to WordPress.com.', 'jetpack-idc' ), - esc_url( untrailingslashit( self::$wpcom_home_url ) ), - self::prepare_url_for_display( esc_url( self::$wpcom_home_url ) ) - ), - array( 'a' => array( 'href' => array() ) ) - ); - - /** - * Allows overriding of the default text used to explain the fix Jetpack connection action. - * - * @param string $html The HTML to be displayed. - * - * @since 0.2.0 - * @since-jetpack 4.4.0 - */ - return apply_filters( 'jetpack_idc_first_fix_connection_explanation', $html ); - } - - /** - * Returns the first step fix connection button text. - * - * @deprecated since 0.17.0 Use `@automattic/jetpack-idc` instead. - * @return string - */ - public function get_first_step_fix_connection_button_text() { - _deprecated_function( __METHOD__, 'package-0.17.0' ); - $string = esc_html__( "Fix Jetpack's Connection", 'jetpack-idc' ); - - /** - * Allows overriding of the default text used for the fix Jetpack connection action button. - * - * @param string $string The string to be displayed. - * - * @since 0.2.0 - * @since-jetpack 4.4.0 - */ - return apply_filters( 'jetpack_idc_first_step_fix_connection_button_text', $string ); - } - - /** - * Returns the second step header lead. - * - * @deprecated since 0.17.0 Use `@automattic/jetpack-idc` instead. - * @return string - */ - public function get_second_step_header_lead() { - _deprecated_function( __METHOD__, 'package-0.17.0' ); - $string = sprintf( - /* translators: %s: Site URL. */ - esc_html__( 'Is %1$s the new home of %2$s?', 'jetpack-idc' ), - untrailingslashit( self::normalize_url_protocol_agnostic( get_home_url() ) ), - untrailingslashit( self::normalize_url_protocol_agnostic( esc_url_raw( self::$wpcom_home_url ) ) ) - ); - - /** - * Allows overriding of the default header text in the second step of the Safe Mode notice. - * - * @param string $html The HTML to be displayed. - * - * @since 0.2.0 - * @since-jetpack 4.4.0 - */ - return apply_filters( 'jetpack_idc_second_step_header_lead', $string ); - } - - /** - * Returns the site action explanation. - * - * @deprecated since 0.17.0 Use `@automattic/jetpack-idc` instead. - * @return string - */ - public function get_migrate_site_action_explanation() { - _deprecated_function( __METHOD__, 'package-0.17.0' ); - $html = wp_kses( - sprintf( - /* translators: %s: Site URL. */ - __( 'Yes. %2$s is replacing %4$s. I would like to migrate my stats and subscribers from %4$s to %2$s.', 'jetpack-idc' ), - esc_url( get_home_url() ), - self::prepare_url_for_display( get_home_url() ), - esc_url( self::$wpcom_home_url ), - untrailingslashit( self::normalize_url_protocol_agnostic( esc_url_raw( self::$wpcom_home_url ) ) ) - ), - array( 'a' => array( 'href' => array() ) ) - ); - - /** - * Allows overriding of the default text for explaining the migrate site action. - * - * @param string $html The HTML to be displayed. - * - * @since 0.2.0 - * @since-jetpack 4.4.0 - */ - return apply_filters( 'jetpack_idc_migrate_site_explanation', $html ); - } - - /** - * Returns the migrate site button text. - * - * @deprecated since 0.17.0 Use `@automattic/jetpack-idc` instead. - * @return string - */ - public function get_migrate_site_button_text() { - _deprecated_function( __METHOD__, 'package-0.17.0' ); - $string = esc_html__( 'Migrate Stats & Subscribers', 'jetpack-idc' ); - - /** - * Allows overriding of the default text used for the migrate site action button. - * - * @param string $string The string to be displayed. - * - * @since 0.2.0 - * @since-jetpack 4.4.0 - */ - return apply_filters( 'jetpack_idc_migrate_site_button_text', $string ); - } - - /** - * Returns the start fresh explanation. - * - * @deprecated since 0.17.0 Use `@automattic/jetpack-idc` instead. - * @return string - */ - public function get_start_fresh_action_explanation() { - _deprecated_function( __METHOD__, 'package-0.17.0' ); - $html = wp_kses( - sprintf( - /* translators: %s: Site URL. */ - __( 'No. %2$s is a new and different website that\'s separate from %4$s. It requires a new connection to WordPress.com for new stats and subscribers.', 'jetpack-idc' ), - esc_url( get_home_url() ), - self::prepare_url_for_display( get_home_url() ), - esc_url( self::$wpcom_home_url ), - untrailingslashit( self::normalize_url_protocol_agnostic( esc_url_raw( self::$wpcom_home_url ) ) ) - ), - array( 'a' => array( 'href' => array() ) ) - ); - - /** - * Allows overriding of the default text for explaining the start fresh action. - * - * @param string $html The HTML to be displayed. - * - * @since 0.2.0 - * @since-jetpack 4.4.0 - */ - return apply_filters( 'jetpack_idc_start_fresh_explanation', $html ); - } - - /** - * Returns the start fresh button text. - * - * @deprecated since 0.17.0 Use `@automattic/jetpack-idc` instead. - * @return string - */ - public function get_start_fresh_button_text() { - _deprecated_function( __METHOD__, 'package-0.17.0' ); - $string = esc_html__( 'Start Fresh & Create New Connection', 'jetpack-idc' ); - - /** - * Allows overriding of the default text used for the start fresh action button. - * - * @param string $string The string to be displayed. - * - * @since 0.2.0 - * @since-jetpack 4.4.0 - */ - return apply_filters( 'jetpack_idc_start_fresh_button_text', $string ); - } - - /** - * Returns the unsure prompt text. - * - * @deprecated since 0.17.0 Use `@automattic/jetpack-idc` instead. - * @return string - */ - public function get_unsure_prompt() { - _deprecated_function( __METHOD__, 'package-0.17.0' ); - $html = wp_kses( - sprintf( - /* translators: %s: Safe mode docs URL. */ - __( 'Unsure what to do? Read more about Jetpack Safe Mode', 'jetpack-idc' ), - esc_url( self::get_safe_mod_doc_url() ) - ), - array( 'a' => array( 'href' => array() ) ) - ); - - /** - * Allows overriding of the default text using in the "Unsure what to do?" prompt. - * - * @param string $html The HTML to be displayed. - * - * @since 0.2.0 - * @since-jetpack 4.4.0 - */ - return apply_filters( 'jetpack_idc_unsure_prompt', $html ); - } - - /** - * Whether the site is undergoing identity crisis. - * - * @return bool - */ - public static function has_identity_crisis() { - return false !== static::check_identity_crisis() && ! static::$is_safe_mode_confirmed; - } - - /** - * Whether an admin has confirmed safe mode. - * Unlike `static::$is_safe_mode_confirmed` this function always returns the actual flag value. - * - * @return bool - */ - public static function safe_mode_is_confirmed() { - return Jetpack_Options::get_option( 'safe_mode_confirmed' ); - } - - /** - * Returns the mismatched URLs. - * - * @return array|bool The mismatched urls, or false if the site is not connected, offline, in safe mode, or the IDC error is not valid. - */ - public static function get_mismatched_urls() { - if ( ! static::has_identity_crisis() ) { - return false; - } - - $data = static::check_identity_crisis(); - - if ( ! $data || - ! isset( $data['error_code'] ) || - ! isset( $data['wpcom_home'] ) || - ! isset( $data['home'] ) || - ! isset( $data['wpcom_siteurl'] ) || - ! isset( $data['siteurl'] ) - ) { - // The jetpack_sync_error_idc option is missing a key. - return false; - } - - if ( 'jetpack_site_url_mismatch' === $data['error_code'] ) { - return array( - 'wpcom_url' => $data['wpcom_siteurl'], - 'current_url' => $data['siteurl'], - ); - } - - return array( - 'wpcom_url' => $data['wpcom_home'], - 'current_url' => $data['home'], - ); - } - - /** - * Try to detect $_SERVER['HTTP_HOST'] being used within WP_SITEURL or WP_HOME definitions inside of wp-config. - * - * If `HTTP_HOST` usage is found, it's possbile (though not certain) that site URLs are dynamic. - * - * When a site URL is dynamic, it can lead to a Jetpack IDC. If potentially dynamic usage is detected, - * helpful support info will be shown on the IDC UI about setting a static site/home URL. - * - * @return bool True if potentially dynamic site urls were detected in wp-config, false otherwise. - */ - public static function detect_possible_dynamic_site_url() { - $transient_key = 'jetpack_idc_possible_dynamic_site_url_detected'; - $transient_val = get_transient( $transient_key ); - - if ( false !== $transient_val ) { - return (bool) $transient_val; - } - - $path = self::locate_wp_config(); - $wp_config = $path ? file_get_contents( $path ) : false; // phpcs:ignore WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents - if ( $wp_config ) { - $matched = preg_match( - '/define ?\( ?[\'"](?:WP_SITEURL|WP_HOME).+(?:HTTP_HOST).+\);/', - $wp_config - ); - - if ( $matched ) { - set_transient( $transient_key, 1, HOUR_IN_SECONDS ); - return true; - } - } - - set_transient( $transient_key, 0, HOUR_IN_SECONDS ); - return false; - } - - /** - * Gets path to WordPress configuration. - * Source: https://github.com/wp-cli/wp-cli/blob/master/php/utils.php - * - * @return string - */ - public static function locate_wp_config() { - static $path; - - if ( null === $path ) { - $path = false; - - if ( getenv( 'WP_CONFIG_PATH' ) && file_exists( getenv( 'WP_CONFIG_PATH' ) ) ) { - $path = getenv( 'WP_CONFIG_PATH' ); - } elseif ( file_exists( ABSPATH . 'wp-config.php' ) ) { - $path = ABSPATH . 'wp-config.php'; - } elseif ( file_exists( dirname( ABSPATH ) . '/wp-config.php' ) && ! file_exists( dirname( ABSPATH ) . '/wp-settings.php' ) ) { - $path = dirname( ABSPATH ) . '/wp-config.php'; - } - - if ( $path ) { - $path = realpath( $path ); - } - } - - return $path; - } - - /** - * Adds `url_secret` to the `jetpack.idcUrlValidation` URL validation endpoint. - * Adds `url_secret_error` in case of an error. - * - * @param array $response The endpoint response that we're modifying. - * - * @return array - * phpcs:ignore Squiz.Commenting.FunctionCommentThrowTag -- The exception is being caught, false positive. - */ - public static function add_secret_to_url_validation_response( array $response ) { - try { - $secret = new URL_Secret(); - - $secret->create(); - - if ( $secret->exists() ) { - $response['url_secret'] = $secret->get_secret(); - } - } catch ( Exception $e ) { - $response['url_secret_error'] = new WP_Error( 'unable_to_create_url_secret', $e->getMessage() ); - } - - return $response; - } - - /** - * Check if URL is an IP. - * - * @param string $hostname The hostname to check. - * @return bool - */ - public static function url_is_ip( $hostname = null ) { - - if ( ! $hostname ) { - $hostname = wp_parse_url( Urls::site_url(), PHP_URL_HOST ); - } - - $is_ip = filter_var( $hostname, FILTER_VALIDATE_IP ) !== false ? $hostname : false; - return $is_ip; - } - - /** - * Add IDC-related data to the registration query. - * - * @param array $params The existing query params. - * - * @return array - */ - public static function register_request_body( array $params ) { - $persistent_blog_id = get_option( static::PERSISTENT_BLOG_ID_OPTION_NAME ); - if ( $persistent_blog_id ) { - $params['persistent_blog_id'] = $persistent_blog_id; - $params['url_secret'] = URL_Secret::create_secret( 'registration_request_url_secret_failed' ); - } - - return $params; - } - - /** - * Set the necessary options when site gets registered. - * - * @param int $blog_id The blog ID. - * - * @return void - */ - public static function site_registered( $blog_id ) { - update_option( static::PERSISTENT_BLOG_ID_OPTION_NAME, (int) $blog_id, false ); - } - - /** - * Check if we need to update the ip_requester option. - * - * @param string $hostname The hostname to check. - * - * @return void - */ - public static function maybe_update_ip_requester( $hostname ) { - // Check if transient exists - $transient_key = ip2long( $hostname ); - if ( $transient_key && ! get_transient( 'jetpack_idc_ip_requester_' . $transient_key ) ) { - self::set_ip_requester_for_idc( $hostname, $transient_key ); - } - } - - /** - * If URL is an IP, add the IP value to the ip_requester option with its expiry value. - * - * @param string $hostname The hostname to check. - * @param int $transient_key The transient key. - */ - public static function set_ip_requester_for_idc( $hostname, $transient_key ) { - // Check if option exists - $data = Jetpack_Options::get_option( 'identity_crisis_ip_requester' ); - - $ip_requester = array( - 'ip' => $hostname, - 'expires_at' => time() + 360, - ); - - // If not set, initialize it - if ( empty( $data ) ) { - $data = array( $ip_requester ); - } else { - $updated_data = array(); - $updated_value = false; - - // Remove expired values and update existing IP - foreach ( $data as $item ) { - if ( time() > $item['expires_at'] ) { - continue; // Skip expired IP - } - - if ( $item['ip'] === $hostname ) { - $item['expires_at'] = time() + 360; - $updated_value = true; - } - - $updated_data[] = $item; - } - - if ( ! $updated_value || empty( $updated_data ) ) { - $updated_data[] = $ip_requester; - } - - $data = $updated_data; - } - - self::update_ip_requester( $data, $transient_key ); - } - - /** - * Update the ip_requester option and set a transient to expire in 5 minutes. - * - * @param array $data The data to be updated. - * @param int $transient_key The transient key. - * - * @return void - */ - public static function update_ip_requester( $data, $transient_key ) { - // Update the option - $updated = Jetpack_Options::update_option( 'identity_crisis_ip_requester', $data ); - // Set a transient to expire in 5 minutes - if ( $updated ) { - $transient_name = 'jetpack_idc_ip_requester_' . $transient_key; - set_transient( $transient_name, $data, 300 ); - } - } - - /** - * Adds `ip_requester` to the `jetpack.idcUrlValidation` URL validation endpoint. - * - * @param array $response The enpoint response that we're modifying. - * - * @return array - */ - public static function add_ip_requester_to_url_validation_response( array $response ) { - $requesters = Jetpack_Options::get_option( 'identity_crisis_ip_requester' ); - if ( $requesters ) { - // Loop through the requesters and add the IP to the response if it's not expired - $i = 0; - foreach ( $requesters as $ip ) { - if ( $ip['expires_at'] > time() ) { - $response['ip_requester'][] = $ip['ip']; - } - // Limit the response to five IPs - $i = ++$i; - if ( $i === 5 ) { - break; - } - } - } - return $response; - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-identity-crisis/src/class-rest-endpoints.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-identity-crisis/src/class-rest-endpoints.php deleted file mode 100644 index 4ebc5dae..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-identity-crisis/src/class-rest-endpoints.php +++ /dev/null @@ -1,295 +0,0 @@ - WP_REST_Server::EDITABLE, - 'callback' => __CLASS__ . '::confirm_safe_mode', - 'permission_callback' => __CLASS__ . '::identity_crisis_mitigation_permission_check', - ) - ); - - // Handles the request to migrate stats and subscribers during an identity crisis. - register_rest_route( - 'jetpack/v4', - 'identity-crisis/migrate', - array( - 'methods' => WP_REST_Server::EDITABLE, - 'callback' => __CLASS__ . '::migrate_stats_and_subscribers', - 'permission_callback' => __CLASS__ . '::identity_crisis_mitigation_permission_check', - ) - ); - - // IDC resolve: create an entirely new shadow site for this URL. - register_rest_route( - 'jetpack/v4', - '/identity-crisis/start-fresh', - array( - 'methods' => WP_REST_Server::EDITABLE, - 'callback' => __CLASS__ . '::start_fresh_connection', - 'permission_callback' => __CLASS__ . '::identity_crisis_mitigation_permission_check', - 'args' => array( - 'redirect_uri' => array( - 'description' => __( 'URI of the admin page where the user should be redirected after connection flow', 'jetpack-idc' ), - 'type' => 'string', - ), - ), - ) - ); - - // Fetch URL verification secret. - register_rest_route( - 'jetpack/v4', - '/identity-crisis/url-secret', - array( - 'methods' => WP_REST_Server::READABLE, - 'callback' => array( static::class, 'fetch_url_secret' ), - 'permission_callback' => array( static::class, 'url_secret_permission_check' ), - ) - ); - - // Fetch URL verification secret. - register_rest_route( - 'jetpack/v4', - '/identity-crisis/compare-url-secret', - array( - 'methods' => WP_REST_Server::EDITABLE, - 'callback' => array( static::class, 'compare_url_secret' ), - 'permission_callback' => array( static::class, 'compare_url_secret_permission_check' ), - 'args' => array( - 'secret' => array( - 'description' => __( 'URL secret to compare to the ones stored in the database.', 'jetpack-idc' ), - 'type' => 'string', - 'required' => true, - ), - ), - ) - ); - } - - /** - * Handles identity crisis mitigation, confirming safe mode for this site. - * - * @since 0.2.0 - * @since-jetpack 4.4.0 - * - * @return bool | WP_Error True if option is properly set. - */ - public static function confirm_safe_mode() { - $updated = Jetpack_Options::update_option( 'safe_mode_confirmed', true ); - if ( $updated ) { - return rest_ensure_response( - array( - 'code' => 'success', - ) - ); - } - - return new WP_Error( - 'error_setting_jetpack_safe_mode', - esc_html__( 'Could not confirm safe mode.', 'jetpack-idc' ), - array( 'status' => 500 ) - ); - } - - /** - * Handles identity crisis mitigation, migrating stats and subscribers from old url to this, new url. - * - * @since 0.2.0 - * @since-jetpack 4.4.0 - * - * @return bool | WP_Error True if option is properly set. - */ - public static function migrate_stats_and_subscribers() { - if ( Jetpack_Options::get_option( 'sync_error_idc' ) && ! Jetpack_Options::delete_option( 'sync_error_idc' ) ) { - return new WP_Error( - 'error_deleting_sync_error_idc', - esc_html__( 'Could not delete sync error option.', 'jetpack-idc' ), - array( 'status' => 500 ) - ); - } - - if ( Jetpack_Options::get_option( 'migrate_for_idc' ) || Jetpack_Options::update_option( 'migrate_for_idc', true ) ) { - return rest_ensure_response( - array( - 'code' => 'success', - ) - ); - } - return new WP_Error( - 'error_setting_jetpack_migrate', - esc_html__( 'Could not confirm migration.', 'jetpack-idc' ), - array( 'status' => 500 ) - ); - } - - /** - * This IDC resolution will disconnect the site and re-connect to a completely new - * and separate shadow site than the original. - * - * It will first will disconnect the site without phoning home as to not disturb the production site. - * It then builds a fresh connection URL and sends it back along with the response. - * - * @since 0.2.0 - * @since-jetpack 4.4.0 - * - * @param \WP_REST_Request $request The request sent to the WP REST API. - * - * @return \WP_REST_Response|WP_Error - */ - public static function start_fresh_connection( $request ) { - /** - * Fires when Users have requested through Identity Crisis for the connection to be reset. - * Should be used to disconnect any connections and reset options. - * - * @since 0.2.0 - */ - do_action( 'jetpack_idc_disconnect' ); - - $connection = new Connection_Manager(); - $result = $connection->try_registration( true ); - - // early return if site registration fails. - if ( ! $result || is_wp_error( $result ) ) { - return rest_ensure_response( $result ); - } - - $redirect_uri = $request->get_param( 'redirect_uri' ) ? admin_url( $request->get_param( 'redirect_uri' ) ) : null; - - /** - * Filters the connection url that users should be redirected to for re-establishing their connection. - * - * @since 0.2.0 - * - * @param \WP_REST_Response|WP_Error $connection_url Connection URL user should be redirected to. - */ - return apply_filters( 'jetpack_idc_authorization_url', rest_ensure_response( $connection->get_authorization_url( null, $redirect_uri ) ) ); - } - - /** - * Verify that user can mitigate an identity crisis. - * - * @since 0.2.0 - * @since-jetpack 4.4.0 - * - * @return true|WP_Error True if the user has capability 'jetpack_disconnect', an error object otherwise. - */ - public static function identity_crisis_mitigation_permission_check() { - if ( current_user_can( 'jetpack_disconnect' ) ) { - return true; - } - $error_msg = esc_html__( - 'You do not have the correct user permissions to perform this action. - Please contact your site admin if you think this is a mistake.', - 'jetpack-idc' - ); - - return new WP_Error( 'invalid_user_permission_identity_crisis', $error_msg, array( 'status' => rest_authorization_required_code() ) ); - } - - /** - * Endpoint for fetching the existing secret. - * - * @return WP_Error|\WP_REST_Response - */ - public static function fetch_url_secret() { - $secret = new URL_Secret(); - - if ( ! $secret->exists() ) { - return new WP_Error( 'missing_url_secret', esc_html__( 'URL secret does not exist.', 'jetpack-idc' ) ); - } - - return rest_ensure_response( - array( - 'code' => 'success', - 'data' => array( - 'secret' => $secret->get_secret(), - 'expires_at' => $secret->get_expires_at(), - ), - ) - ); - } - - /** - * Endpoint for comparing the existing secret. - * - * @param \WP_REST_Request $request The request sent to the WP REST API. - * - * @return WP_Error|\WP_REST_Response - */ - public static function compare_url_secret( $request ) { - $match = false; - - $storage = new URL_Secret(); - - if ( $storage->exists() ) { - $remote_secret = $request->get_param( 'secret' ); - $match = $remote_secret && hash_equals( $storage->get_secret(), $remote_secret ); - } - - return rest_ensure_response( - array( - 'code' => 'success', - 'match' => $match, - ) - ); - } - - /** - * Verify url_secret create/fetch permissions (valid blog token authentication). - * - * @return true|WP_Error - */ - public static function url_secret_permission_check() { - return Rest_Authentication::is_signed_with_blog_token() - ? true - : new WP_Error( - 'invalid_user_permission_identity_crisis', - esc_html__( 'You do not have the correct user permissions to perform this action.', 'jetpack-idc' ), - array( 'status' => rest_authorization_required_code() ) - ); - } - - /** - * The endpoint is only available on non-connected sites. - * use `/identity-crisis/url-secret` for connected sites. - * - * @return true|WP_Error - */ - public static function compare_url_secret_permission_check() { - return ( new Connection_Manager() )->is_connected() - ? new WP_Error( - 'invalid_connection_status', - esc_html__( 'The endpoint is not available on connected sites.', 'jetpack-idc' ), - array( 'status' => 403 ) - ) - : true; - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-identity-crisis/src/class-ui.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-identity-crisis/src/class-ui.php deleted file mode 100644 index 7fb75b73..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-identity-crisis/src/class-ui.php +++ /dev/null @@ -1,201 +0,0 @@ - true, - 'textdomain' => 'jetpack-idc', - ) - ); - Assets::enqueue_script( 'jp_identity_crisis_banner' ); - wp_add_inline_script( 'jp_identity_crisis_banner', static::get_initial_state(), 'before' ); - - add_action( 'admin_notices', array( static::class, 'render_container' ) ); - } - } - - /** - * Create the container element for the IDC banner. - */ - public static function render_container() { - ?> -
          - esc_url_raw( rest_url() ), - 'WP_API_nonce' => wp_create_nonce( 'wp_rest' ), - 'wpcomHomeUrl' => ( is_array( $idc_urls ) && array_key_exists( 'wpcom_url', $idc_urls ) ) ? $idc_urls['wpcom_url'] : null, - 'currentUrl' => ( is_array( $idc_urls ) && array_key_exists( 'current_url', $idc_urls ) ) ? $idc_urls['current_url'] : null, - 'redirectUri' => isset( $_SERVER['REQUEST_URI'] ) ? str_replace( '/wp-admin/', '/', filter_var( wp_unslash( $_SERVER['REQUEST_URI'] ) ) ) : '', - 'tracksUserData' => Jetpack_Tracks_Client::get_connected_user_tracks_identity(), - 'tracksEventData' => array( - 'isAdmin' => $is_admin, - 'currentScreen' => $current_screen ? $current_screen->id : false, - 'blogID' => Jetpack_Options::get_option( 'id' ), - 'platform' => static::get_platform(), - ), - 'isSafeModeConfirmed' => Identity_Crisis::$is_safe_mode_confirmed, - 'consumerData' => static::get_consumer_data(), - 'isAdmin' => $is_admin, - 'possibleDynamicSiteUrlDetected' => $possible_dynamic_site_url_detected, - - /** - * Use the filter to provide custom HTML elecontainer ID. - * - * @since 0.10.0 - * - * @param string|null $containerID The container ID. - */ - 'containerID' => apply_filters( 'identity_crisis_container_id', null ), - ); - } - - /** - * Get the package consumer data. - * - * @return array - */ - public static function get_consumer_data() { - if ( null !== static::$consumers ) { - return static::$consumers; - } - - $consumers = apply_filters( 'jetpack_idc_consumers', array() ); - - if ( ! $consumers ) { - return array(); - } - - usort( - $consumers, - function ( $c1, $c2 ) { - $priority1 = ( array_key_exists( 'priority', $c1 ) && (int) $c1['priority'] ) ? (int) $c1['priority'] : 10; - $priority2 = ( array_key_exists( 'priority', $c2 ) && (int) $c2['priority'] ) ? (int) $c2['priority'] : 10; - - return $priority1 <=> $priority2; - } - ); - - $consumer_chosen = null; - $consumer_url_length = 0; - - foreach ( $consumers as $consumer ) { - if ( empty( $consumer['admin_page'] ) || ! is_string( $consumer['admin_page'] ) ) { - continue; - } - - if ( isset( $_SERVER['REQUEST_URI'] ) && str_starts_with( filter_var( wp_unslash( $_SERVER['REQUEST_URI'] ) ), $consumer['admin_page'] ) && strlen( $consumer['admin_page'] ) > $consumer_url_length ) { - $consumer_chosen = $consumer; - $consumer_url_length = strlen( $consumer['admin_page'] ); - } - } - - static::$consumers = $consumer_chosen ? $consumer_chosen : array_shift( $consumers ); - - return static::$consumers; - } - - /** - * Get the site platform. - * - * @return string - */ - private static function get_platform() { - $host = new Host(); - - if ( $host->is_woa_site() ) { - return 'woa'; - } - - if ( $host->is_vip_site() ) { - return 'vip'; - } - - if ( $host->is_newspack_site() ) { - return 'newspack'; - } - - return 'self-hosted'; - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-identity-crisis/src/class-url-secret.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-identity-crisis/src/class-url-secret.php deleted file mode 100644 index 3d2f453c..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-identity-crisis/src/class-url-secret.php +++ /dev/null @@ -1,157 +0,0 @@ -fetch(); - - if ( $secret_data !== null ) { - $this->secret = $secret_data['secret']; - $this->expires_at = $secret_data['expires_at']; - } - } - - /** - * Fetch the URL secret from the database. - * - * @return array|null - */ - private function fetch() { - $data = Jetpack_Options::get_option( static::OPTION_KEY ); - - if ( $data === false || empty( $data['secret'] ) || empty( $data['expires_at'] ) ) { - return null; - } - - if ( time() > $data['expires_at'] ) { - Jetpack_Options::delete_option( static::OPTION_KEY ); - return null; - } - - return $data; - } - - /** - * Create new secret and save it in the options. - * - * @throws Exception Thrown if unable to save the new secret. - * - * @return bool - */ - public function create() { - $secret_data = array( - 'secret' => $this->generate_secret(), - 'expires_at' => time() + static::LIFESPAN, - ); - - $result = Jetpack_Options::update_option( static::OPTION_KEY, $secret_data ); - - if ( ! $result ) { - throw new Exception( esc_html__( 'Unable to save new URL secret', 'jetpack-idc' ) ); - } - - $this->secret = $secret_data['secret']; - $this->expires_at = $secret_data['expires_at']; - - return true; - } - - /** - * Get the URL secret. - * - * @return string|null - */ - public function get_secret() { - return $this->secret; - } - - /** - * Get the URL secret expiration date. - * - * @return string|null - */ - public function get_expires_at() { - return $this->expires_at; - } - - /** - * Check if the secret exists. - * - * @return bool - */ - public function exists() { - return $this->secret && $this->expires_at; - } - - /** - * Generate the secret string. - * - * @return string - */ - private function generate_secret() { - return wp_generate_password( 12, false ); - } - - /** - * Generate secret for response. - * - * @param string $flow used to tell which flow generated the exception. - * @return string - */ - public static function create_secret( $flow = 'generating_secret_failed' ) { - $secret = null; - try { - - $secret = new self(); - $secret->create(); - - if ( $secret->exists() ) { - $secret = $secret->get_secret(); - } - } catch ( Exception $e ) { - // Track the error and proceed. - ( new Tracking() )->record_user_event( $flow, array( 'current_url' => Urls::site_url() ) ); - } - return $secret; - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-ip/CHANGELOG.md b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-ip/CHANGELOG.md deleted file mode 100644 index 812a1281..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-ip/CHANGELOG.md +++ /dev/null @@ -1,58 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file. - -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) -and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - -## [0.2.2] - 2024-03-12 -### Changed -- Internal updates. - -## [0.2.1] - 2023-11-21 -### Changed -- Added a note of non-usage of PHP8+ functions yet. [#34137] - -## [0.2.0] - 2023-11-20 -### Changed -- Updated required PHP version to >= 7.0. [#34192] - -## [0.1.6] - 2023-09-19 - -- Minor internal updates. - -## [0.1.5] - 2023-08-23 -### Changed -- Updated package dependencies. [#32605] - -## [0.1.4] - 2023-05-29 -### Changed -- Internal updates. - -## [0.1.3] - 2023-05-11 - -- Updated package dependencies - -## [0.1.2] - 2023-04-10 -### Added -- Add Jetpack Autoloader package suggestion. [#29988] - -## [0.1.1] - 2023-03-28 -### Changed -- Update README.md [#28401] - -## 0.1.0 - 2023-02-28 -### Added -- Added a utility function to extract an array of IP addresses from a given string. [#29131] -- Add jetpack-ip package functionality [#28846] -- Initialized the package. [#28765] - -[0.2.2]: https://github.com/automattic/jetpack-ip/compare/v0.2.1...v0.2.2 -[0.2.1]: https://github.com/automattic/jetpack-ip/compare/v0.2.0...v0.2.1 -[0.2.0]: https://github.com/automattic/jetpack-ip/compare/v0.1.6...v0.2.0 -[0.1.6]: https://github.com/automattic/jetpack-ip/compare/v0.1.5...v0.1.6 -[0.1.5]: https://github.com/automattic/jetpack-ip/compare/v0.1.4...v0.1.5 -[0.1.4]: https://github.com/automattic/jetpack-ip/compare/v0.1.3...v0.1.4 -[0.1.3]: https://github.com/automattic/jetpack-ip/compare/v0.1.2...v0.1.3 -[0.1.2]: https://github.com/automattic/jetpack-ip/compare/v0.1.1...v0.1.2 -[0.1.1]: https://github.com/automattic/jetpack-ip/compare/v0.1.0...v0.1.1 diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-ip/LICENSE.txt b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-ip/LICENSE.txt deleted file mode 100644 index e82774c1..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-ip/LICENSE.txt +++ /dev/null @@ -1,357 +0,0 @@ -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - - -=================================== - - -GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - -Copyright (C) 1989, 1991 Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -Everyone is permitted to copy and distribute verbatim copies -of this license document, but changing it is not allowed. - - Preamble - -The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Lesser General Public License instead.) You can apply it to -your programs, too. - -When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - -To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - -For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - -We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - -Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - -Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - -The precise terms and conditions for copying, distribution and -modification follow. - -GNU GENERAL PUBLIC LICENSE -TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - -0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - -1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - -2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - -a) You must cause the modified files to carry prominent notices -stating that you changed the files and the date of any change. - -b) You must cause any work that you distribute or publish, that in -whole or in part contains or is derived from the Program or any -part thereof, to be licensed as a whole at no charge to all third -parties under the terms of this License. - -c) If the modified program normally reads commands interactively -when run, you must cause it, when started running for such -interactive use in the most ordinary way, to print or display an -announcement including an appropriate copyright notice and a -notice that there is no warranty (or else, saying that you provide -a warranty) and that users may redistribute the program under -these conditions, and telling the user how to view a copy of this -License. (Exception: if the Program itself is interactive but -does not normally print such an announcement, your work based on -the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - -3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - -a) Accompany it with the complete corresponding machine-readable -source code, which must be distributed under the terms of Sections -1 and 2 above on a medium customarily used for software interchange; or, - -b) Accompany it with a written offer, valid for at least three -years, to give any third party, for a charge no more than your -cost of physically performing source distribution, a complete -machine-readable copy of the corresponding source code, to be -distributed under the terms of Sections 1 and 2 above on a medium -customarily used for software interchange; or, - -c) Accompany it with the information you received as to the offer -to distribute corresponding source code. (This alternative is -allowed only for noncommercial distribution and only if you -received the program in object code or executable form with such -an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - -4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - -5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - -6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - -7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - -8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - -9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - -10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - -11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - -12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - -How to Apply These Terms to Your New Programs - -If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - -To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - -Copyright (C) - -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along -with this program; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - -Gnomovision version 69, Copyright (C) year name of author -Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. -This is free software, and you are welcome to redistribute it -under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - -Yoyodyne, Inc., hereby disclaims all copyright interest in the program -`Gnomovision' (which makes passes at compilers) written by James Hacker. - -, 1 April 1989 -Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-ip/SECURITY.md b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-ip/SECURITY.md deleted file mode 100644 index 98f48dd1..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-ip/SECURITY.md +++ /dev/null @@ -1,47 +0,0 @@ -# Security Policy - -Full details of the Automattic Security Policy can be found on [automattic.com](https://automattic.com/security/). - -## Supported Versions - -Generally, only the latest version of Jetpack and its associated plugins have continued support. If a critical vulnerability is found in the current version of a plugin, we may opt to backport any patches to previous versions. - -## Reporting a Vulnerability - -Our HackerOne program covers the below plugin software, as well as a variety of related projects and infrastructure: - -* [Jetpack](https://jetpack.com/) -* Jetpack Backup -* Jetpack Boost -* Jetpack CRM -* Jetpack Protect -* Jetpack Search -* Jetpack Social -* Jetpack VideoPress - -**For responsible disclosure of security issues and to be eligible for our bug bounty program, please submit your report via the [HackerOne](https://hackerone.com/automattic) portal.** - -Our most critical targets are: - -* Jetpack and the Jetpack composer packages (all within this repo) -* Jetpack.com -- the primary marketing site. -* cloud.jetpack.com -- a management site. -* wordpress.com -- the shared management site for both Jetpack and WordPress.com sites. - -For more targets, see the `In Scope` section on [HackerOne](https://hackerone.com/automattic). - -_Please note that the **WordPress software is a separate entity** from Automattic. Please report vulnerabilities for WordPress through [the WordPress Foundation's HackerOne page](https://hackerone.com/wordpress)._ - -## Guidelines - -We're committed to working with security researchers to resolve the vulnerabilities they discover. You can help us by following these guidelines: - -* Follow [HackerOne's disclosure guidelines](https://www.hackerone.com/disclosure-guidelines). -* Pen-testing Production: - * Please **setup a local environment** instead whenever possible. Most of our code is open source (see above). - * If that's not possible, **limit any data access/modification** to the bare minimum necessary to reproduce a PoC. - * **_Don't_ automate form submissions!** That's very annoying for us, because it adds extra work for the volunteers who manage those systems, and reduces the signal/noise ratio in our communication channels. - * To be eligible for a bounty, all of these guidelines must be followed. -* Be Patient - Give us a reasonable time to correct the issue before you disclose the vulnerability. - -We also expect you to comply with all applicable laws. You're responsible to pay any taxes associated with your bounties. diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-ip/composer.json b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-ip/composer.json deleted file mode 100644 index bb4decf0..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-ip/composer.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "name": "automattic/jetpack-ip", - "description": "Utilities for working with IP addresses.", - "type": "jetpack-library", - "license": "GPL-2.0-or-later", - "require": { - "php": ">=7.0" - }, - "require-dev": { - "brain/monkey": "2.6.1", - "yoast/phpunit-polyfills": "1.1.0", - "automattic/jetpack-changelogger": "^4.1.1" - }, - "suggest": { - "automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package." - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "scripts": { - "phpunit": [ - "./vendor/phpunit/phpunit/phpunit --colors=always" - ], - "test-php": [ - "@composer phpunit" - ] - }, - "minimum-stability": "dev", - "prefer-stable": true, - "extra": { - "autotagger": true, - "mirror-repo": "Automattic/jetpack-ip", - "changelogger": { - "link-template": "https://github.com/automattic/jetpack-ip/compare/v${old}...v${new}" - }, - "branch-alias": { - "dev-trunk": "0.2.x-dev" - }, - "textdomain": "jetpack-ip", - "version-constants": { - "::PACKAGE_VERSION": "src/class-utils.php" - } - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-ip/src/class-utils.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-ip/src/class-utils.php deleted file mode 100644 index 53dd3323..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-ip/src/class-utils.php +++ /dev/null @@ -1,209 +0,0 @@ -trusted_header ) && isset( $_SERVER[ $trusted_header_data->trusted_header ] ) ) { - $ip = wp_unslash( $_SERVER[ $trusted_header_data->trusted_header ] ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- clean_ip does it below. - $segments = $trusted_header_data->segments; - $reverse_order = $trusted_header_data->reverse; - } else { - $ip = isset( $_SERVER['REMOTE_ADDR'] ) ? wp_unslash( $_SERVER['REMOTE_ADDR'] ) : null; // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- clean_ip does it below. - } - - if ( ! $ip ) { - return false; - } - - $ips = explode( ',', $ip ); - if ( ! isset( $segments ) || ! $segments ) { - $segments = 1; - } - if ( isset( $reverse_order ) && $reverse_order ) { - $ips = array_reverse( $ips ); - } - $ip_count = count( $ips ); - if ( 1 === $ip_count ) { - return self::clean_ip( $ips[0] ); - } elseif ( $ip_count >= $segments ) { - $the_one = $ip_count - $segments; - return self::clean_ip( $ips[ $the_one ] ); - } else { - return self::clean_ip( isset( $_SERVER['REMOTE_ADDR'] ) ? wp_unslash( $_SERVER['REMOTE_ADDR'] ) : null ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- clean_ip does it. - } - } - - /** - * Clean IP address. - * - * @param string $ip The IP address to clean. - * @return string|false The cleaned IP address. - */ - public static function clean_ip( $ip ) { - - // Some misconfigured servers give back extra info, which comes after "unless". - $ips = explode( ' unless ', $ip ); - $ip = $ips[0]; - - $ip = strtolower( trim( $ip ) ); - - // Check for IPv4 with port. - if ( preg_match( '/^(\d+\.\d+\.\d+\.\d+):\d+$/', $ip, $matches ) ) { - $ip = $matches[1]; - } - - // Check for IPv6 (or IPvFuture) with brackets and optional port. - if ( preg_match( '/^\[([a-z0-9\-._~!$&\'()*+,;=:]+)\](?::\d+)?$/', $ip, $matches ) ) { - $ip = $matches[1]; - } - - // Check for IPv4 IP cast as IPv6. - if ( preg_match( '/^::ffff:(\d+\.\d+\.\d+\.\d+)$/', $ip, $matches ) ) { - $ip = $matches[1]; - } - - // Validate and return. - return filter_var( $ip, FILTER_VALIDATE_IP ) ? $ip : false; - } - - /** - * Checks an IP to see if it is within a private range. - * - * @param int $ip IP address. - * @return bool True if IP address is private, false otherwise. - */ - public static function ip_is_private( $ip ) { - // We are dealing with ipv6, so we can simply rely on filter_var. - // Note: str_contains() is not used here, as wp-includes/compat.php may not be loaded in this file. - if ( false === strpos( $ip, '.' ) ) { - return ! filter_var( $ip, FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE ); - } - // We are dealing with ipv4. - $private_ip4_addresses = array( - '10.0.0.0|10.255.255.255', // Single class A network. - '172.16.0.0|172.31.255.255', // 16 contiguous class B network. - '192.168.0.0|192.168.255.255', // 256 contiguous class C network. - '169.254.0.0|169.254.255.255', // Link-local address also referred to as Automatic Private IP Addressing. - '127.0.0.0|127.255.255.255', // localhost. - ); - $long_ip = ip2long( $ip ); - if ( -1 !== $long_ip ) { - foreach ( $private_ip4_addresses as $pri_addr ) { - list ( $start, $end ) = explode( '|', $pri_addr ); - if ( $long_ip >= ip2long( $start ) && $long_ip <= ip2long( $end ) ) { - return true; - } - } - } - return false; - } - - /** - * Uses inet_pton if available to convert an IP address to a binary string. - * Returns false if an invalid IP address is given. - * - * @param mixed $ip IP address. - * @return int|string|bool - */ - public static function convert_ip_address( $ip ) { - return inet_pton( $ip ); - } - - /** - * Checks that a given IP address is within a given low - high range. - * - * @param mixed $ip IP. - * @param mixed $range_low Range Low. - * @param mixed $range_high Range High. - * @return Bool - */ - public static function ip_address_is_in_range( $ip, $range_low, $range_high ) { - $ip_num = inet_pton( $ip ); - $ip_low = inet_pton( $range_low ); - $ip_high = inet_pton( $range_high ); - if ( $ip_num && $ip_low && $ip_high && strcmp( $ip_num, $ip_low ) >= 0 && strcmp( $ip_num, $ip_high ) <= 0 ) { - return true; - } - return false; - } - - /** - * Extracts IP addresses from a given string. - * - * We allow for both, one IP per line or comma-; semicolon; or whitespace-separated lists. This also validates the IP addresses - * and only returns the ones that look valid. IP ranges using the "-" character are also supported. - * - * @param string $ips List of ips - example: "8.8.8.8\n4.4.4.4,2.2.2.2;1.1.1.1 9.9.9.9,5555.5555.5555.5555,1.1.1.10-1.1.1.20". - * @return array List of valid IP addresses. - example based on input example: array('8.8.8.8', '4.4.4.4', '2.2.2.2', '1.1.1.1', '9.9.9.9', '1.1.1.10-1.1.1.20') - */ - public static function get_ip_addresses_from_string( $ips ) { - $ips = (string) $ips; - $ips = preg_split( '/[\s,;]/', $ips ); - - $result = array(); - - foreach ( $ips as $ip ) { - // Validate both IP values from the range. - $range = explode( '-', $ip ); - if ( count( $range ) === 2 ) { - if ( self::validate_ip_range( $range[0], $range[1] ) ) { - $result[] = $ip; - } - continue; - } - - // Validate the single IP value. - if ( filter_var( $ip, FILTER_VALIDATE_IP ) !== false ) { - $result[] = $ip; - } - } - - return $result; - } - - /** - * Validates the low and high IP addresses of a range. - * - * @param string $range_low Low IP address. - * @param string $range_high High IP address. - * @return bool True if the range is valid, false otherwise. - */ - public static function validate_ip_range( $range_low, $range_high ) { - // Validate that both IP addresses are valid. - if ( ! filter_var( $range_low, FILTER_VALIDATE_IP ) || ! filter_var( $range_high, FILTER_VALIDATE_IP ) ) { - return false; - } - - // Validate that the $range_low is lower or equal to $range_high. - // The inet_pton will give us binary string of an ipv4 or ipv6. - // We can then use strcmp to see if the address is in range. - $ip_low = inet_pton( $range_low ); - $ip_high = inet_pton( $range_high ); - if ( false === $ip_low || false === $ip_high ) { - return false; - } - if ( strcmp( $ip_low, $ip_high ) > 0 ) { - return false; - } - - return true; - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-jitm/CHANGELOG.md b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-jitm/CHANGELOG.md deleted file mode 100644 index 85e272ae..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-jitm/CHANGELOG.md +++ /dev/null @@ -1,828 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file. - -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) -and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - -## [3.1.1] - 2024-03-14 -### Changed -- Internal updates. - -## [3.1.0] - 2024-03-12 -### Changed -- Performance: only enqueue the JITM JavaScript on pages where it will be used. [#35997] -- Updated package dependencies. [#36325] - -## [3.0.5] - 2024-03-04 -### Changed -- Updated package dependencies. [#36095] - -## [3.0.4] - 2024-02-13 -### Changed -- Updated package dependencies. [#35608] - -## [3.0.3] - 2024-02-05 -### Changed -- Updated package dependencies. [#35384] - -## [3.0.2] - 2024-01-04 -### Changed -- Updated package dependencies. [#34815] - -## [3.0.1] - 2023-12-03 -### Changed -- Updated package dependencies. [#34411] - -## [3.0.0] - 2023-11-20 -### Changed -- Updated required PHP version to >= 7.0. [#34192] - -### Removed -- Removed the Partner package requirement. Relying on the Connection package instead. [#33832] - -## [2.5.3] - 2023-11-14 -### Changed -- Updated package dependencies. [#34093] - -## [2.5.2] - 2023-11-03 - -## [2.5.1] - 2023-10-19 -### Changed -- Updated package dependencies. [#33687] - -## [2.5.0] - 2023-10-10 -### Added -- JITMs can now redirect to a specific Jetpack settings page. [#32826] - -### Changed -- Update color of WooCommerce logo. [#33491] -- Updated package dependencies. [#33428] - -## [2.4.0] - 2023-09-28 -### Changed -- Moved tracking for JITM buttons into JITM script, added message_path property [#33252] - -## [2.3.19] - 2023-09-19 - -- Minor internal updates. - -## [2.3.18] - 2023-09-04 -### Changed -- Updated package dependencies. [#32803] - -## [2.3.17] - 2023-08-23 -### Changed -- Updated package dependencies. [#32605] - -## [2.3.16] - 2023-08-21 -### Fixed -- Update secondary button styling [#32503] - -## [2.3.15] - 2023-08-09 -### Changed -- Updated package dependencies. [#32166] - -## [2.3.14] - 2023-07-25 -### Changed -- Updated package dependencies. [#32040] - -## [2.3.13] - 2023-07-17 -### Changed -- Generate query string when using the WPCOM API to fetch JITMs [#31809] - -## [2.3.12] - 2023-07-11 -### Changed -- Updated package dependencies. [#31785] - -## [2.3.11] - 2023-07-05 -### Changed -- Updated package dependencies. [#31659] - -## [2.3.10] - 2023-06-23 -### Changed -- Updated package dependencies. [#31468] - -## [2.3.9] - 2023-06-06 -### Changed -- Updated package dependencies. [#31129] - -## [2.3.8] - 2023-05-08 -### Added -- JITM: Add jetpack-videopress to JITM refetch on hashchange list [#30465] - -## [2.3.7] - 2023-05-02 -### Changed -- Updated package dependencies. [#30375] - -## [2.3.6] - 2023-04-10 -### Added -- Add Jetpack Autoloader package suggestion. [#29988] - -## [2.3.5] - 2023-04-04 -### Added -- Add external link icons in JITM [#29654] - -### Changed -- Updated package dependencies. [#29854] - -## [2.3.4] - 2023-03-28 -### Fixed -- JITM: Fix button overflow when text length is too big [#29749] - -## [2.3.3] - 2023-03-27 -### Changed -- JITM: Update styles [#29709] - -## [2.3.2] - 2023-03-20 -### Changed -- Updated package dependencies. [#29471] - -## [2.3.1] - 2023-03-08 -### Changed -- Updated package dependencies. [#29216] - -## [2.3.0] - 2023-02-20 -### Changed -- Moving deleting connection owner notice from JITM to Connection package. [#28516] - -## [2.2.42] - 2023-02-15 -### Changed -- Update to React 18. [#28710] - -## [2.2.41] - 2023-02-06 -### Fixed -- JITM: minor fix for styles on Safari browser. - -## [2.2.40] - 2023-01-30 -### Changed -- Updated styles for Just in Time Messages (notices) [#27515] - -## [2.2.39] - 2023-01-25 -### Changed -- Minor internal updates. - -## [2.2.38] - 2023-01-23 -### Fixed -- Prevent the activation page from displaying the JP License Activation JITM. [#27959] - -## [2.2.37] - 2023-01-11 -### Changed -- Updated package dependencies. - -## [2.2.36] - 2022-12-27 -### Removed -- Remove src/js files from final bundle [#27930] - -## [2.2.35] - 2022-12-02 -### Changed -- Updated package dependencies. [#27696] - -## [2.2.34] - 2022-11-22 -### Changed -- Updated package dependencies. [#27043] - -## [2.2.33] - 2022-11-08 -### Changed -- Updated package dependencies. [#27289] - -## [2.2.32] - 2022-11-07 -### Changed -- Updated package dependencies. [#27278] - -## [2.2.31] - 2022-11-01 -### Changed -- Updated package dependencies. [#27196] - -## [2.2.30] - 2022-10-25 -### Changed -- Updated package dependencies. [#26705] - -## [2.2.29] - 2022-10-13 -### Changed -- Updated package dependencies. [#26791] - -## [2.2.28] - 2022-10-05 -### Changed -- Updated package dependencies. [#26568] - -## [2.2.27] - 2022-09-08 -### Changed -- Updated package dependencies. - -## [2.2.26] - 2022-08-29 -### Changed -- Updated package dependencies. - -## [2.2.25] - 2022-08-25 -### Changed -- Updated package dependencies. [#25814] - -## [2.2.24] - 2022-08-23 -### Added -- Add custom styling rules for the JITMs displayed in My Jetpack. [#22452] -- Updated JITM readme. [#25739] - -### Changed -- Updated package dependencies. [#25628] - -## [2.2.23] - 2022-08-03 -### Changed -- Updated package dependencies. [#25300, #25315] - -## [2.2.22] - 2022-07-26 -### Changed -- Updated package dependencies. [#25158] - -## [2.2.21] - 2022-07-12 -### Changed -- Updated package dependencies. - -## [2.2.20] - 2022-06-21 -### Changed -- Renaming master to trunk. [#24661] - -## [2.2.19] - 2022-06-14 -### Changed -- Updated package dependencies. [#24529] - -## [2.2.18] - 2022-06-08 -### Changed -- Reorder JS imports for `import/order` eslint rule. [#24601] - -## [2.2.17] - 2022-05-18 -### Changed -- Updated package dependencies [#24372] - -## [2.2.16] - 2022-05-10 -### Changed -- Updated package dependencies. [#24302] - -## [2.2.15] - 2022-05-04 -### Changed -- Remove use of `pnpx` in preparation for pnpm 7.0. [#24210] -- Updated package dependencies. [#24095] - -### Deprecated -- Moved the options class into Connection. [#24095] - -## [2.2.14] - 2022-04-26 -### Changed -- Updated package dependencies. -- Update package.json metadata. - -## [2.2.13] - 2022-04-19 -### Changed -- PHPCS: Fix `WordPress.Security.ValidatedSanitizedInput` - -## [2.2.12] - 2022-04-12 -### Changed -- Updated package dependencies. - -## [2.2.11] - 2022-04-06 -### Changed -- Updated package dependencies - -### Removed -- Removed tracking dependency. - -## [2.2.10] - 2022-03-29 -### Changed -- Updated package dependencies. - -## [2.2.9] - 2022-03-23 -### Changed -- Updated package dependencies. - -## [2.2.8] - 2022-03-02 -### Changed -- Updated package dependencies - -## [2.2.7] - 2022-02-22 -### Changed -- Updated package dependencies. - -## [2.2.6] - 2022-02-16 -### Changed -- Updated package dependencies. - -## [2.2.5] - 2022-02-09 -### Changed -- Updated package dependencies. - -## [2.2.4] - 2022-02-02 -### Changed -- Build: remove unneeded files from production build. -- Update use of old jQuery interfaces - -## [2.2.3] - 2022-01-25 -### Changed -- Updated package dependencies. - -## [2.2.2] - 2022-01-18 -### Changed -- General: update required node version to v16.13.2 - -## [2.2.1] - 2022-01-11 -### Changed -- Updated package dependencies. - -## [2.2.0] - 2022-01-04 -### Changed -- Switch to pcov for code coverage. -- Updated package dependencies. -- Updated package textdomain from `jetpack` to `jetpack-jitm`. - -## [2.1.1] - 2021-12-14 -### Changed -- Updated package dependencies. - -## [2.1.0] - 2021-11-30 -### Added -- Add proper JS and CSS builder. -- Adds filters to allow sideloading of the Jetpack Backup plugin through JITMs. -- JITM: Added ability to sideload Jetpack Boost plugin. - -### Changed -- Add `output.filename` in Webpack config to override changed default. -- Colors: update Jetpack Primary color to match latest brand book. - -### Fixed -- JITM: wrap CTA below text on small viewports - -## [2.0.8] - 2021-11-23 -### Changed -- Updated package dependencies. - -## [2.0.7] - 2021-11-16 -### Added -- Use monorepo `validate-es` script to validate Webpack builds. - -### Changed -- Updated package dependencies. - -## [2.0.6] - 2021-11-09 -### Changed -- Update webpack build config. - -## [2.0.5] - 2021-11-02 -### Changed -- Set `convertDeprecationsToExceptions` true in PHPUnit config. -- Update PHPUnit configs to include just what needs coverage rather than include everything then try to exclude stuff that doesn't. - -## [2.0.4] - 2021-10-26 -### Changed -- Updated package dependencies. - -## [2.0.3] - 2021-10-19 -### Changed -- Updated package dependencies. - -## [2.0.2] - 2021-10-12 -### Changed -- Updated package dependencies - -## [2.0.1] - 2021-09-28 -### Changed -- Allow Node ^14.17.6 to be used in this project. This shouldn't change the behavior of the code itself. -- Updated package dependencies. - -## [2.0.0] - 2021-08-31 -### Changed -- Run composer update on test-php command instead of phpunit. -- Tests: update PHPUnit polyfills dependency (yoast/phpunit-polyfills). -- Update annotations versions. -- Updated package dependencies. -- Update to latest webpack, webpack-cli and calypso-build. -- Upgrade to Webpack 5. -- Use Node 16.7.0 in tooling. - -### Removed -- Removed IE11 support. - -## [1.16.2] - 2021-07-27 -### Changed -- Updated package dependencies. - -## [1.16.1] - 2021-06-29 -### Changed -- Update package dependencies. -- Update node version requirement to 14.16.1 -- Update the usage of Redirect lib and passes the unlinked param as a query argument. - -## [1.16.0] - 2021-05-25 -### Added -- JITM: allow the plugin to set the icon for pre-connection JITMs. -- JITM: move sync updated option hook to the JITM package. - -### Changed -- JITM: prevent JITMs from being registered more than once. -- JITM: remove jetpack-constants dependency from composer.json -- JITM: set the default values of the jetpack_just_in_time_msgs and jetpack_just_in_time_msg_cache filters to true. -- JITM: Use an action instead of a property to prevent JITMs from being registered multiple times -- JITM: Use the Device_Detection package to determine if the device is mobile. -- Updated package dependencies -- update jetpack-redirect dependency - -## [1.15.1] - 2021-05-03 -### Changed -- JITM: Use manager::get_authorization_url to obtain the authorization url in the user deletion notice. - -## [1.15.0] - 2021-04-27 -### Added -- Move JITM's REST API endpoints into the package - -### Changed -- Always display pre-connection JITMs, without the need to set a filter. -- Avoid wrapping text in the main CTA button. -- Bump JITM package version requirement. -- JITM: Update CTA redirect url with unlinked query arg to indicate current user is not connected. -- Update package dependencies. -- Use the a8c-mc-stats package to generate stats. - -## [1.14.1] - 2021-03-30 -### Added -- Composer alias for dev-master, to improve dependencies - -### Changed -- Use is_connected instead of is_active to instantiate Pre/Post_Connection_JITM -- Add a jetpack_pre_connection_jitms filter. -- Update colors to match upcoming WP 5.7 color changes -- Update Node to match latest LTS 12 -- Update package dependencies. - -### Fixed -- Use `composer update` rather than `install` in scripts, as composer.lock isn't checked in. - -## [1.14.0] - 2021-02-23 - -- Recommendations: Hide JITMs when banner is displaying -- Setup Wizard: Remove setup wizard -- JITM: move jetpack-jitm.js to the JITM package -- CI: Make tests more generic - -## [1.13.5] - 2021-02-08 - -- Update dependencies to latest stable - -## [1.13.4] - 2021-01-28 - -- Update dependencies to latest stable - -## [1.13.3] - 2021-01-26 - -- Update dependencies to latest stable - -## [1.13.2] - 2021-01-26 - -- Update dependencies to latest stable - -## [1.13.1] - 2021-01-26 - -- Add mirror-repo information to all current composer packages -- Monorepo: Reorganize all projects - -## [1.13.0] - 2021-01-05 - -- Update dependency brain/monkey to v2.6.0 -- Pin dependencies -- Packages: Update for PHP 8 testing - -## [1.12.2] - 2020-12-09 - -- Update dependencies to latest stable - -## [1.12.1] - 2020-11-24 - -- Version packages for release - -## [1.12.0] - 2020-11-24 - -- Status: Introduce get_site_suffix method -- General: update minimum required version to WordPress 5.5 -- Updated PHPCS: Packages and Debugger - -## [1.11.2] - 2020-11-05 - -- Update dependencies to latest stable - -## [1.11.1] - 2020-10-29 - -- Update dependencies to latest stable - -## [1.11.0] - 2020-10-27 - -- JITM: add a Pre_Connection_JITM::generate_admin_url method -- JITM: use is_active from the connection package -- JITM: regenerate assets - -## [1.10.4] - 2020-10-14 - -- Update dependencies to latest stable - -## [1.10.3] - 2020-10-09 - -- Update dependencies to latest stable - -## [1.10.2] - 2020-10-06 - -- Update dependencies to latest stable - -## [1.10.1] - 2020-10-01 - -- Update dependencies to latest stable - -## [1.10.0] - 2020-09-29 - -- Update dependencies to latest stable - -## [1.9.1] - 2020-09-09 - -- Update dependencies to latest stable - -## [1.9.0] - 2020-08-26 - -- Compat: add new Creative Mail compat file -- Packages: Update filenames after #16810 -- CI: Try collect js coverage -- Docker: Add package testing shortcut - -## [1.8.2] - 2020-08-10 - -- Update dependencies to latest stable - -## [1.8.1] - 2020-08-10 - -- Update dependencies to latest stable - -## [1.8.0] - 2020-07-28 - -- Core Compat: Site Environment -- Core REST API: Add permission callback to delete_jitm_message endpoint - -## [1.7.2] - 2020-07-06 - -- Update dependencies to latest stable - -## [1.7.1] - 2020-07-01 - -- Update dependencies to latest stable - -## [1.7.0] - 2020-06-30 - -- PHPCS: Clean up the packages -- Hide pre-connection JITM on the posts page when few posts are published -- Jetpack Setup Wizard: Do not show pre-connection JITMs to non admins -- JITM: change 'setup' to 'set up' in pre-connection JITMs -- Pre-connection JITMS: Link to connect-in-place flow -- JITM: add Redirect use statement - -## [1.6.5] - 2020-06-01 - -- Hide pre-connection JITM on the posts page when few posts are published - -## [1.6.4] - 2020-06-01 - -- Update dependencies to latest stable - -## [1.6.3] - 2020-05-29 - -- Jetpack Setup Wizard: Do not show pre-connection JITMs to non admins - -## [1.6.2] - 2020-05-29 - -- JITM: change 'setup' to 'set up' in pre-connection JITMs -- Pre-connection JITMS: Link to connect-in-place flow - -## [1.6.1] - 2020-05-28 - -- JITM: add Redirect use statement - -## [1.6.0] - 2020-05-26 - -- JITM: expand docs and tests to account for pre-connection messages -- Improve responsiveness of JITMs -- JITM: fix the use statements -- Implement pre-connection JITMs -- JITM: Allow JITM on stats pages - -## [1.5.1] - 2020-04-30 - -- JITM: Allow JITM on stats pages - -## [1.5.0] - 2020-04-28 - -- Use jp.com redirect in all links - -## [1.4.0] - 2020-03-31 - -- Update dependencies to latest stable - -## [1.3.0] - 2020-03-31 - -- Use dynamic Jetpack logos on JITMs - -## [1.2.0] - 2020-02-25 - -- JITM: Show ToS update notice - -## [1.1.2] - 2020-02-14 - -- SSO: do not display JITM when not in wp-admin - -## [1.1.1] - 2020-01-23 - -- Moved JITM initialization to plugins_loaded. - -## [1.1.0] - 2020-01-07 - -- Add partner subsidiary id to upgrade URLs. - -## [1.0.10] - 2019-11-25 - -- Connection Owner Deletion Notice: Fix display bug and sanitize… - -## [1.0.9] - 2019-11-19 - -- Don't show JITMs on Gutenberg editor pages (for now) - -## [1.0.8] - 2019-11-08 - -- Packages: Use classmap instead of PSR-4 - -## [1.0.7] - 2019-11-08 - -- Remove unused get_emblem method - -## [1.0.6] - 2019-10-31 - -- Inherit 400 weight for button fonts - -## [1.0.5] - 2019-10-28 - -- PHPCS: JITM and Assets packages - -## [1.0.4] - 2019-10-24 - -- Update Jetpack button and card styles to match WordPress 5.3 - -## [1.0.3] - 2019-10-23 - -- Use spread operator instead of func_get_args - -## [1.0.2] - 2019-10-17 - -- Change the class in the add_filter() calls to $this. Also fix some - -## [1.0.1] - 2019-09-27 - -- Initial trial of prefer-dist -- JITM: Send the user's role in the request for JITM messages - -## 1.0.0 - 2019-09-14 - -- Update Jetpack to use new JITM package - -[3.1.1]: https://github.com/Automattic/jetpack-jitm/compare/v3.1.0...v3.1.1 -[3.1.0]: https://github.com/Automattic/jetpack-jitm/compare/v3.0.5...v3.1.0 -[3.0.5]: https://github.com/Automattic/jetpack-jitm/compare/v3.0.4...v3.0.5 -[3.0.4]: https://github.com/Automattic/jetpack-jitm/compare/v3.0.3...v3.0.4 -[3.0.3]: https://github.com/Automattic/jetpack-jitm/compare/v3.0.2...v3.0.3 -[3.0.2]: https://github.com/Automattic/jetpack-jitm/compare/v3.0.1...v3.0.2 -[3.0.1]: https://github.com/Automattic/jetpack-jitm/compare/v3.0.0...v3.0.1 -[3.0.0]: https://github.com/Automattic/jetpack-jitm/compare/v2.5.3...v3.0.0 -[2.5.3]: https://github.com/Automattic/jetpack-jitm/compare/v2.5.2...v2.5.3 -[2.5.2]: https://github.com/Automattic/jetpack-jitm/compare/v2.5.1...v2.5.2 -[2.5.1]: https://github.com/Automattic/jetpack-jitm/compare/v2.5.0...v2.5.1 -[2.5.0]: https://github.com/Automattic/jetpack-jitm/compare/v2.4.0...v2.5.0 -[2.4.0]: https://github.com/Automattic/jetpack-jitm/compare/v2.3.19...v2.4.0 -[2.3.19]: https://github.com/Automattic/jetpack-jitm/compare/v2.3.18...v2.3.19 -[2.3.18]: https://github.com/Automattic/jetpack-jitm/compare/v2.3.17...v2.3.18 -[2.3.17]: https://github.com/Automattic/jetpack-jitm/compare/v2.3.16...v2.3.17 -[2.3.16]: https://github.com/Automattic/jetpack-jitm/compare/v2.3.15...v2.3.16 -[2.3.15]: https://github.com/Automattic/jetpack-jitm/compare/v2.3.14...v2.3.15 -[2.3.14]: https://github.com/Automattic/jetpack-jitm/compare/v2.3.13...v2.3.14 -[2.3.13]: https://github.com/Automattic/jetpack-jitm/compare/v2.3.12...v2.3.13 -[2.3.12]: https://github.com/Automattic/jetpack-jitm/compare/v2.3.11...v2.3.12 -[2.3.11]: https://github.com/Automattic/jetpack-jitm/compare/v2.3.10...v2.3.11 -[2.3.10]: https://github.com/Automattic/jetpack-jitm/compare/v2.3.9...v2.3.10 -[2.3.9]: https://github.com/Automattic/jetpack-jitm/compare/v2.3.8...v2.3.9 -[2.3.8]: https://github.com/Automattic/jetpack-jitm/compare/v2.3.7...v2.3.8 -[2.3.7]: https://github.com/Automattic/jetpack-jitm/compare/v2.3.6...v2.3.7 -[2.3.6]: https://github.com/Automattic/jetpack-jitm/compare/v2.3.5...v2.3.6 -[2.3.5]: https://github.com/Automattic/jetpack-jitm/compare/v2.3.4...v2.3.5 -[2.3.4]: https://github.com/Automattic/jetpack-jitm/compare/v2.3.3...v2.3.4 -[2.3.3]: https://github.com/Automattic/jetpack-jitm/compare/v2.3.2...v2.3.3 -[2.3.2]: https://github.com/Automattic/jetpack-jitm/compare/v2.3.1...v2.3.2 -[2.3.1]: https://github.com/Automattic/jetpack-jitm/compare/v2.3.0...v2.3.1 -[2.3.0]: https://github.com/Automattic/jetpack-jitm/compare/v2.2.42...v2.3.0 -[2.2.42]: https://github.com/Automattic/jetpack-jitm/compare/v2.2.41...v2.2.42 -[2.2.41]: https://github.com/Automattic/jetpack-jitm/compare/v2.2.40...v2.2.41 -[2.2.40]: https://github.com/Automattic/jetpack-jitm/compare/v2.2.39...v2.2.40 -[2.2.39]: https://github.com/Automattic/jetpack-jitm/compare/v2.2.38...v2.2.39 -[2.2.38]: https://github.com/Automattic/jetpack-jitm/compare/v2.2.37...v2.2.38 -[2.2.37]: https://github.com/Automattic/jetpack-jitm/compare/v2.2.36...v2.2.37 -[2.2.36]: https://github.com/Automattic/jetpack-jitm/compare/v2.2.35...v2.2.36 -[2.2.35]: https://github.com/Automattic/jetpack-jitm/compare/v2.2.34...v2.2.35 -[2.2.34]: https://github.com/Automattic/jetpack-jitm/compare/v2.2.33...v2.2.34 -[2.2.33]: https://github.com/Automattic/jetpack-jitm/compare/v2.2.32...v2.2.33 -[2.2.32]: https://github.com/Automattic/jetpack-jitm/compare/v2.2.31...v2.2.32 -[2.2.31]: https://github.com/Automattic/jetpack-jitm/compare/v2.2.30...v2.2.31 -[2.2.30]: https://github.com/Automattic/jetpack-jitm/compare/v2.2.29...v2.2.30 -[2.2.29]: https://github.com/Automattic/jetpack-jitm/compare/v2.2.28...v2.2.29 -[2.2.28]: https://github.com/Automattic/jetpack-jitm/compare/v2.2.27...v2.2.28 -[2.2.27]: https://github.com/Automattic/jetpack-jitm/compare/v2.2.26...v2.2.27 -[2.2.26]: https://github.com/Automattic/jetpack-jitm/compare/v2.2.25...v2.2.26 -[2.2.25]: https://github.com/Automattic/jetpack-jitm/compare/v2.2.24...v2.2.25 -[2.2.24]: https://github.com/Automattic/jetpack-jitm/compare/v2.2.23...v2.2.24 -[2.2.23]: https://github.com/Automattic/jetpack-jitm/compare/v2.2.22...v2.2.23 -[2.2.22]: https://github.com/Automattic/jetpack-jitm/compare/v2.2.21...v2.2.22 -[2.2.21]: https://github.com/Automattic/jetpack-jitm/compare/v2.2.20...v2.2.21 -[2.2.20]: https://github.com/Automattic/jetpack-jitm/compare/v2.2.19...v2.2.20 -[2.2.19]: https://github.com/Automattic/jetpack-jitm/compare/v2.2.18...v2.2.19 -[2.2.18]: https://github.com/Automattic/jetpack-jitm/compare/v2.2.17...v2.2.18 -[2.2.17]: https://github.com/Automattic/jetpack-jitm/compare/v2.2.16...v2.2.17 -[2.2.16]: https://github.com/Automattic/jetpack-jitm/compare/v2.2.15...v2.2.16 -[2.2.15]: https://github.com/Automattic/jetpack-jitm/compare/v2.2.14...v2.2.15 -[2.2.14]: https://github.com/Automattic/jetpack-jitm/compare/v2.2.13...v2.2.14 -[2.2.13]: https://github.com/Automattic/jetpack-jitm/compare/v2.2.12...v2.2.13 -[2.2.12]: https://github.com/Automattic/jetpack-jitm/compare/v2.2.11...v2.2.12 -[2.2.11]: https://github.com/Automattic/jetpack-jitm/compare/v2.2.10...v2.2.11 -[2.2.10]: https://github.com/Automattic/jetpack-jitm/compare/v2.2.9...v2.2.10 -[2.2.9]: https://github.com/Automattic/jetpack-jitm/compare/v2.2.8...v2.2.9 -[2.2.8]: https://github.com/Automattic/jetpack-jitm/compare/v2.2.7...v2.2.8 -[2.2.7]: https://github.com/Automattic/jetpack-jitm/compare/v2.2.6...v2.2.7 -[2.2.6]: https://github.com/Automattic/jetpack-jitm/compare/v2.2.5...v2.2.6 -[2.2.5]: https://github.com/Automattic/jetpack-jitm/compare/v2.2.4...v2.2.5 -[2.2.4]: https://github.com/Automattic/jetpack-jitm/compare/v2.2.3...v2.2.4 -[2.2.3]: https://github.com/Automattic/jetpack-jitm/compare/v2.2.2...v2.2.3 -[2.2.2]: https://github.com/Automattic/jetpack-jitm/compare/v2.2.1...v2.2.2 -[2.2.1]: https://github.com/Automattic/jetpack-jitm/compare/v2.2.0...v2.2.1 -[2.2.0]: https://github.com/Automattic/jetpack-jitm/compare/v2.1.1...v2.2.0 -[2.1.1]: https://github.com/Automattic/jetpack-jitm/compare/v2.1.0...v2.1.1 -[2.1.0]: https://github.com/Automattic/jetpack-jitm/compare/v2.0.8...v2.1.0 -[2.0.8]: https://github.com/Automattic/jetpack-jitm/compare/v2.0.7...v2.0.8 -[2.0.7]: https://github.com/Automattic/jetpack-jitm/compare/v2.0.6...v2.0.7 -[2.0.6]: https://github.com/Automattic/jetpack-jitm/compare/v2.0.5...v2.0.6 -[2.0.5]: https://github.com/Automattic/jetpack-jitm/compare/v2.0.4...v2.0.5 -[2.0.4]: https://github.com/Automattic/jetpack-jitm/compare/v2.0.3...v2.0.4 -[2.0.3]: https://github.com/Automattic/jetpack-jitm/compare/v2.0.2...v2.0.3 -[2.0.2]: https://github.com/Automattic/jetpack-jitm/compare/v2.0.1...v2.0.2 -[2.0.1]: https://github.com/Automattic/jetpack-jitm/compare/v2.0.0...v2.0.1 -[2.0.0]: https://github.com/Automattic/jetpack-jitm/compare/v1.16.2...v2.0.0 -[1.16.2]: https://github.com/Automattic/jetpack-jitm/compare/v1.16.1...v1.16.2 -[1.16.1]: https://github.com/Automattic/jetpack-jitm/compare/v1.16.0...v1.16.1 -[1.16.0]: https://github.com/Automattic/jetpack-jitm/compare/v1.15.1...v1.16.0 -[1.15.1]: https://github.com/Automattic/jetpack-jitm/compare/v1.15.0...v1.15.1 -[1.15.0]: https://github.com/Automattic/jetpack-jitm/compare/v1.14.1...v1.15.0 -[1.14.1]: https://github.com/Automattic/jetpack-jitm/compare/v1.14.0...v1.14.1 -[1.14.0]: https://github.com/Automattic/jetpack-jitm/compare/v1.13.5...v1.14.0 -[1.13.5]: https://github.com/Automattic/jetpack-jitm/compare/v1.13.4...v1.13.5 -[1.13.4]: https://github.com/Automattic/jetpack-jitm/compare/v1.13.3...v1.13.4 -[1.13.3]: https://github.com/Automattic/jetpack-jitm/compare/v1.13.2...v1.13.3 -[1.13.2]: https://github.com/Automattic/jetpack-jitm/compare/v1.13.1...v1.13.2 -[1.13.1]: https://github.com/Automattic/jetpack-jitm/compare/v1.13.0...v1.13.1 -[1.13.0]: https://github.com/Automattic/jetpack-jitm/compare/v1.12.2...v1.13.0 -[1.12.2]: https://github.com/Automattic/jetpack-jitm/compare/v1.12.1...v1.12.2 -[1.12.1]: https://github.com/Automattic/jetpack-jitm/compare/v1.12.0...v1.12.1 -[1.12.0]: https://github.com/Automattic/jetpack-jitm/compare/v1.11.2...v1.12.0 -[1.11.2]: https://github.com/Automattic/jetpack-jitm/compare/v1.11.1...v1.11.2 -[1.11.1]: https://github.com/Automattic/jetpack-jitm/compare/v1.11.0...v1.11.1 -[1.11.0]: https://github.com/Automattic/jetpack-jitm/compare/v1.10.4...v1.11.0 -[1.10.4]: https://github.com/Automattic/jetpack-jitm/compare/v1.10.3...v1.10.4 -[1.10.3]: https://github.com/Automattic/jetpack-jitm/compare/v1.10.2...v1.10.3 -[1.10.2]: https://github.com/Automattic/jetpack-jitm/compare/v1.10.1...v1.10.2 -[1.10.1]: https://github.com/Automattic/jetpack-jitm/compare/v1.10.0...v1.10.1 -[1.10.0]: https://github.com/Automattic/jetpack-jitm/compare/v1.9.1...v1.10.0 -[1.9.1]: https://github.com/Automattic/jetpack-jitm/compare/v1.9.0...v1.9.1 -[1.9.0]: https://github.com/Automattic/jetpack-jitm/compare/v1.8.2...v1.9.0 -[1.8.2]: https://github.com/Automattic/jetpack-jitm/compare/v1.8.1...v1.8.2 -[1.8.1]: https://github.com/Automattic/jetpack-jitm/compare/v1.8.0...v1.8.1 -[1.8.0]: https://github.com/Automattic/jetpack-jitm/compare/v1.7.2...v1.8.0 -[1.7.2]: https://github.com/Automattic/jetpack-jitm/compare/v1.7.1...v1.7.2 -[1.7.1]: https://github.com/Automattic/jetpack-jitm/compare/v1.7.0...v1.7.1 -[1.7.0]: https://github.com/Automattic/jetpack-jitm/compare/v1.6.5...v1.7.0 -[1.6.5]: https://github.com/Automattic/jetpack-jitm/compare/v1.6.4...v1.6.5 -[1.6.4]: https://github.com/Automattic/jetpack-jitm/compare/v1.6.3...v1.6.4 -[1.6.3]: https://github.com/Automattic/jetpack-jitm/compare/v1.6.2...v1.6.3 -[1.6.2]: https://github.com/Automattic/jetpack-jitm/compare/v1.6.1...v1.6.2 -[1.6.1]: https://github.com/Automattic/jetpack-jitm/compare/v1.6.0...v1.6.1 -[1.6.0]: https://github.com/Automattic/jetpack-jitm/compare/v1.5.1...v1.6.0 -[1.5.1]: https://github.com/Automattic/jetpack-jitm/compare/v1.5.0...v1.5.1 -[1.5.0]: https://github.com/Automattic/jetpack-jitm/compare/v1.4.0...v1.5.0 -[1.4.0]: https://github.com/Automattic/jetpack-jitm/compare/v1.3.0...v1.4.0 -[1.3.0]: https://github.com/Automattic/jetpack-jitm/compare/v1.2.0...v1.3.0 -[1.2.0]: https://github.com/Automattic/jetpack-jitm/compare/v1.1.2...v1.2.0 -[1.1.2]: https://github.com/Automattic/jetpack-jitm/compare/v1.1.1...v1.1.2 -[1.1.1]: https://github.com/Automattic/jetpack-jitm/compare/v1.1.0...v1.1.1 -[1.1.0]: https://github.com/Automattic/jetpack-jitm/compare/v1.0.10...v1.1.0 -[1.0.10]: https://github.com/Automattic/jetpack-jitm/compare/v1.0.9...v1.0.10 -[1.0.9]: https://github.com/Automattic/jetpack-jitm/compare/v1.0.8...v1.0.9 -[1.0.8]: https://github.com/Automattic/jetpack-jitm/compare/v1.0.7...v1.0.8 -[1.0.7]: https://github.com/Automattic/jetpack-jitm/compare/v1.0.6...v1.0.7 -[1.0.6]: https://github.com/Automattic/jetpack-jitm/compare/v1.0.5...v1.0.6 -[1.0.5]: https://github.com/Automattic/jetpack-jitm/compare/v1.0.4...v1.0.5 -[1.0.4]: https://github.com/Automattic/jetpack-jitm/compare/v1.0.3...v1.0.4 -[1.0.3]: https://github.com/Automattic/jetpack-jitm/compare/v1.0.2...v1.0.3 -[1.0.2]: https://github.com/Automattic/jetpack-jitm/compare/v1.0.1...v1.0.2 -[1.0.1]: https://github.com/Automattic/jetpack-jitm/compare/v1.0.0...v1.0.1 diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-jitm/LICENSE.txt b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-jitm/LICENSE.txt deleted file mode 100644 index e82774c1..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-jitm/LICENSE.txt +++ /dev/null @@ -1,357 +0,0 @@ -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - - -=================================== - - -GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - -Copyright (C) 1989, 1991 Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -Everyone is permitted to copy and distribute verbatim copies -of this license document, but changing it is not allowed. - - Preamble - -The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Lesser General Public License instead.) You can apply it to -your programs, too. - -When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - -To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - -For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - -We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - -Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - -Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - -The precise terms and conditions for copying, distribution and -modification follow. - -GNU GENERAL PUBLIC LICENSE -TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - -0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - -1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - -2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - -a) You must cause the modified files to carry prominent notices -stating that you changed the files and the date of any change. - -b) You must cause any work that you distribute or publish, that in -whole or in part contains or is derived from the Program or any -part thereof, to be licensed as a whole at no charge to all third -parties under the terms of this License. - -c) If the modified program normally reads commands interactively -when run, you must cause it, when started running for such -interactive use in the most ordinary way, to print or display an -announcement including an appropriate copyright notice and a -notice that there is no warranty (or else, saying that you provide -a warranty) and that users may redistribute the program under -these conditions, and telling the user how to view a copy of this -License. (Exception: if the Program itself is interactive but -does not normally print such an announcement, your work based on -the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - -3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - -a) Accompany it with the complete corresponding machine-readable -source code, which must be distributed under the terms of Sections -1 and 2 above on a medium customarily used for software interchange; or, - -b) Accompany it with a written offer, valid for at least three -years, to give any third party, for a charge no more than your -cost of physically performing source distribution, a complete -machine-readable copy of the corresponding source code, to be -distributed under the terms of Sections 1 and 2 above on a medium -customarily used for software interchange; or, - -c) Accompany it with the information you received as to the offer -to distribute corresponding source code. (This alternative is -allowed only for noncommercial distribution and only if you -received the program in object code or executable form with such -an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - -4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - -5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - -6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - -7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - -8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - -9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - -10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - -11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - -12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - -How to Apply These Terms to Your New Programs - -If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - -To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - -Copyright (C) - -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along -with this program; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - -Gnomovision version 69, Copyright (C) year name of author -Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. -This is free software, and you are welcome to redistribute it -under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - -Yoyodyne, Inc., hereby disclaims all copyright interest in the program -`Gnomovision' (which makes passes at compilers) written by James Hacker. - -, 1 April 1989 -Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-jitm/SECURITY.md b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-jitm/SECURITY.md deleted file mode 100644 index 98f48dd1..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-jitm/SECURITY.md +++ /dev/null @@ -1,47 +0,0 @@ -# Security Policy - -Full details of the Automattic Security Policy can be found on [automattic.com](https://automattic.com/security/). - -## Supported Versions - -Generally, only the latest version of Jetpack and its associated plugins have continued support. If a critical vulnerability is found in the current version of a plugin, we may opt to backport any patches to previous versions. - -## Reporting a Vulnerability - -Our HackerOne program covers the below plugin software, as well as a variety of related projects and infrastructure: - -* [Jetpack](https://jetpack.com/) -* Jetpack Backup -* Jetpack Boost -* Jetpack CRM -* Jetpack Protect -* Jetpack Search -* Jetpack Social -* Jetpack VideoPress - -**For responsible disclosure of security issues and to be eligible for our bug bounty program, please submit your report via the [HackerOne](https://hackerone.com/automattic) portal.** - -Our most critical targets are: - -* Jetpack and the Jetpack composer packages (all within this repo) -* Jetpack.com -- the primary marketing site. -* cloud.jetpack.com -- a management site. -* wordpress.com -- the shared management site for both Jetpack and WordPress.com sites. - -For more targets, see the `In Scope` section on [HackerOne](https://hackerone.com/automattic). - -_Please note that the **WordPress software is a separate entity** from Automattic. Please report vulnerabilities for WordPress through [the WordPress Foundation's HackerOne page](https://hackerone.com/wordpress)._ - -## Guidelines - -We're committed to working with security researchers to resolve the vulnerabilities they discover. You can help us by following these guidelines: - -* Follow [HackerOne's disclosure guidelines](https://www.hackerone.com/disclosure-guidelines). -* Pen-testing Production: - * Please **setup a local environment** instead whenever possible. Most of our code is open source (see above). - * If that's not possible, **limit any data access/modification** to the bare minimum necessary to reproduce a PoC. - * **_Don't_ automate form submissions!** That's very annoying for us, because it adds extra work for the volunteers who manage those systems, and reduces the signal/noise ratio in our communication channels. - * To be eligible for a bounty, all of these guidelines must be followed. -* Be Patient - Give us a reasonable time to correct the issue before you disclose the vulnerability. - -We also expect you to comply with all applicable laws. You're responsible to pay any taxes associated with your bounties. diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-jitm/build/images/background-165b2f00927a762c8cf4.png b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-jitm/build/images/background-165b2f00927a762c8cf4.png deleted file mode 100644 index c2d50e1b..00000000 Binary files a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-jitm/build/images/background-165b2f00927a762c8cf4.png and /dev/null differ diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-jitm/build/index.asset.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-jitm/build/index.asset.php deleted file mode 100644 index 80931e68..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-jitm/build/index.asset.php +++ /dev/null @@ -1 +0,0 @@ - array('jquery', 'wp-polyfill'), 'version' => '42733b29f872f13c5451'); diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-jitm/build/index.css b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-jitm/build/index.css deleted file mode 100644 index 97507d07..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-jitm/build/index.css +++ /dev/null @@ -1 +0,0 @@ -.jitm-button{-webkit-appearance:none;appearance:none;background:#fff;border:1px solid #000;border-radius:4px;box-sizing:border-box;color:#000;cursor:pointer;display:inline-block;font-size:14px;font-weight:600;margin:0;min-width:90px;outline:0;overflow:hidden;padding:7px 14px 9px;text-align:center;text-decoration:none;text-overflow:ellipsis;vertical-align:top;width:100%}.jitm-button.is-primary{background:#000;color:#fff}.jitm-button.is-primary .gridicons-external-link{fill:#fff}.jitm-button.is-secondary .gridicons-external-link{fill:#000}.jitm-button.is-secondary:hover{background:#f6f7f7;color:#000}.jitm-button.is-secondary:hover .gridicons-external-link{fill:#000}.jitm-button:focus,.jitm-button:hover{background:#414141;border-color:#414141;color:#fff}.jitm-button:focus{box-shadow:0 0 0 1px #fff,0 0 0 3px #2271b1}.jitm-button:disabled,.jitm-button[disabled]{background:#dcdcde;border-color:#dcdcde;color:#a7aaad;cursor:default}.jitm-button.is-compact{font-size:14px;height:32px;line-height:1;white-space:nowrap}.jitm-button.is-compact .gridicon{margin-top:-8px;top:4px}.jitm-button.is-compact .gridicons-plus-small{margin-left:-4px}.jitm-button.is-compact .gridicons-plus-small:last-of-type{margin-left:0}.jitm-button.is-compact .gridicons-plus-small+.gridicon{margin-left:-4px}.jitm-button.is-compact .gridicons-external-link{margin:-3px 0 -3px 2px}.jitm-button.hidden{display:none}.jitm-card{background-color:#fff;background-image:url(images/background-165b2f00927a762c8cf4.png);background-position:100%;background-repeat:no-repeat;border:1px solid #fff;border-radius:2px;box-shadow:0 1px 4px #00000029;box-sizing:border-box;clear:both;display:block;margin:3rem 1.25rem 0 auto;padding:1rem 1rem 1rem 1.25rem;position:relative}.jitm-card:after{clear:both;content:".";display:block;height:0;visibility:hidden}.jitm-card.is-compact{margin-bottom:.0625rem}@media(min-width:481px){.jitm-card.is-compact{margin-bottom:1px;padding:1rem 1.5rem}}.jitm-card.is-card-link{padding-right:3rem}.my-jetpack-jitm-card .jitm-card{margin-bottom:0;margin-right:0}#screen-meta-links+.jitm-card{margin:2.5rem 1.5385em 0 auto}.post-php .jitm-card{margin-right:0}.jp-lower .jitm-card{margin:0 0 1.5rem}.jitm-banner.jitm-card{display:flex;position:relative;z-index:2}.jitm-banner.jitm-card:before{border-bottom-left-radius:1px;border-top-left-radius:1px;content:"";height:100%;left:0;position:absolute;top:0;width:4px}@media(max-width:480px){.jitm-banner.jitm-card{display:flex;flex-direction:column}}.jitm-banner.jitm-card.is-card-link{padding:.75rem 3rem .75rem 1rem}.jitm-banner.jitm-card.is-dismissible{padding-right:3rem}.jitm-banner.jitm-card:before{background-color:#4ab866}.jitm-banner.jitm-card .jitm-banner__icon{color:#4ab866}.jitm-banner.jitm-card .jitm-banner__icon-circle{background-color:#4ab866}.jitm-banner.jitm-card.is-upgrade-personal:before{background-color:#f0b849}.jitm-banner.jitm-card.is-upgrade-personal .jitm-banner__icon{color:#f0b849}.jitm-banner.jitm-card.is-upgrade-personal .jitm-banner__icon-circle{background-color:#f0b849}.jitm-banner.jitm-card.is-upgrade-premium:before{background-color:#069e08}.jitm-banner.jitm-card.is-upgrade-premium .jitm-banner__icon{color:#069e08}.jitm-banner.jitm-card.is-upgrade-premium .jitm-banner__icon-circle{background-color:#069e08}.jitm-banner.jitm-card.is-upgrade-business:before,.jitm-banner.jitm-card.woo-jitm:before{background-color:#855da6}.jitm-banner.jitm-card.is-upgrade-business .jitm-banner__icon,.jitm-banner.jitm-card.woo-jitm .jitm-banner__icon{color:#855da6}.jitm-banner.jitm-card.is-upgrade-business .jitm-banner__icon-circle,.jitm-banner.jitm-card.woo-jitm .jitm-banner__icon-circle{background-color:#855da6}.jitm-banner.jitm-card .jitm-card__link-indicator{align-items:center;color:#0087be;display:flex}.jitm-banner.jitm-card:hover{transition:all .1s ease-in-out}.jitm-banner.jitm-card:hover.is-card-link{box-shadow:0 0 0 1px #a2a2a2,0 2px 4px #d5d5d5}.jitm-banner.jitm-card:hover .jitm-card__link-indicator{color:#005082}@media(min-width:481px){.jitm-banner.jitm-card{padding:1rem 1rem 1rem 1.25rem}.jitm-banner.jitm-card.is-dismissible{padding-right:1rem}}.jitm-banner__buttons_container{display:flex;gap:1rem;height:50%;margin:auto 1rem auto 0;overflow:hidden}@media(min-width:481px){.jitm-banner__buttons_container{margin-left:1rem}}.jitm-banner__icons{display:flex}.jitm-banner__icons .jitm-banner__icon,.jitm-banner__icons .jitm-banner__icon-circle{border-radius:50%;flex-shrink:0;height:1.5rem;margin-right:1rem;margin-top:-.125rem;text-align:center;top:.25rem;width:1.5rem}.jitm-banner__icons .jitm-banner__icon{align-self:center;color:#fff;display:block}.jitm-banner__icons .jitm-banner__icon-circle{color:#fff;display:none;padding:.1875rem .25rem .25rem .1875rem}@media(min-width:481px){.jitm-banner__icons{align-items:center}.jitm-banner__icons .jitm-banner__icon{display:none}.jitm-banner__icons .jitm-banner__icon-circle{display:block}}.jitm-banner__icon-plan{display:flex;margin-right:1rem}.jitm-banner__icon-plan .dops-plan-icon{height:2rem;width:2rem}.jitm-banner__icon-plan .jp-emblem{position:relative;top:.125rem}@media(max-width:480px){.jitm-banner__icon-plan .jp-emblem{margin-bottom:1rem}}.jitm-banner__icon-plan .jp-emblem svg{height:2rem;width:2rem;fill:#069e08}.jitm-banner__icon-plan .jp-emblem .jitm-jp-logo{height:inherit;width:2.5rem;fill:inherit}@media(min-width:481px){.jitm-banner__icon-plan{align-items:center}}.jitm-banner__content{align-items:center;display:flex;flex-grow:1;flex-shrink:100000;flex-wrap:wrap}@media(max-width:480px){.jitm-banner__content{margin-right:0}}@media(min-width:481px){.jitm-banner__content{flex-wrap:nowrap}}@media(max-width:960px){.jitm-banner__content{margin-right:5px}}.jitm-banner__info{flex-grow:1;line-height:1.4}@media(min-width:481px){.jitm-banner__info{flex-basis:50%}}@media(min-width:961px){.jitm-banner__info{flex-basis:70%}}.jitm-banner__info .jitm-banner__description,.jitm-banner__info .jitm-banner__description a,.jitm-banner__info .jitm-banner__title{color:#000}.jitm-banner__info .jitm-banner__title{font-size:.9375rem;font-weight:700;line-height:136%}.jitm-banner__info .jitm-banner__description{font-size:.8125rem;line-height:150%;margin-top:.125rem}.jitm-banner__info .banner__list{font-size:12px;list-style:none;margin:10px 0}.jitm-banner__info .banner__list li{margin:6px 0}.jitm-banner__info .banner__list li .gridicon{fill:#a2a2a2;display:inline;margin-right:12px;vertical-align:bottom}.jitm-banner__action{align-self:center;font-size:.75rem;overflow:hidden;text-align:left}.jitm-banner__action .jitm-banner__prices{display:flex;justify-content:flex-start}.jitm-banner__action .jitm-banner__prices .dops-plan-price{margin-bottom:0}.jitm-banner__action .jitm-banner__prices .dops-plan-price.is-discounted,.jitm-banner__action .jitm-banner__prices .dops-plan-price.is-discounted .dops-plan-price__currency-symbol{color:#414141}.has-call-to-action .jitm-banner__action .jitm-banner__prices .dops-plan-price{margin-bottom:.5rem}@media(max-width:480px){.jitm-banner__action{margin-top:1rem}}@media(min-width:481px){.jitm-banner__action{text-align:center;width:auto}.jitm-banner__action .is-dismissible{margin-top:2.5rem}.jitm-banner__action .jitm-banner__prices{justify-content:flex-end;text-align:right}}.jitm-banner__dismiss{display:block;line-height:.5;margin-bottom:auto;margin-top:auto;text-decoration:none}.jitm-banner__dismiss:before{color:#6f6f6f;content:"";font:400 20px/1 dashicons}@media(min-width:661px){.jitm-banner__dismiss{margin-right:-.5rem}}@media(max-width:480px){.jitm-banner__dismiss{align-items:center;display:flex;height:48px;justify-content:center;margin:0;position:absolute;right:0;top:0;width:48px}}.jitm-banner__action+.jitm-banner__dismiss{margin-left:.625rem}#dolly+.jitm-card{margin:3rem 1rem 0 auto} \ No newline at end of file diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-jitm/build/index.js b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-jitm/build/index.js deleted file mode 100644 index 3ada5cc7..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-jitm/build/index.js +++ /dev/null @@ -1 +0,0 @@ -(()=>{"use strict";var t,a={567:t=>{t.exports=window.jQuery}},e={};function n(t){var i=e[t];if(void 0!==i)return i.exports;var c=e[t]={exports:{}};return a[t](c,c.exports,n),c.exports}n.n=t=>{var a=t&&t.__esModule?()=>t.default:()=>t;return n.d(a,{a:a}),a},n.d=(t,a)=>{for(var e in a)n.o(a,e)&&!n.o(t,e)&&Object.defineProperty(t,e,{enumerable:!0,get:a[e]})},n.o=(t,a)=>Object.prototype.hasOwnProperty.call(t,a),t=n(567),n.n(t)()(document).ready((function(t){var a={default:function(a){const e='\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t';var n='
          ';if(n+='
          ',n+='
          '+a.content.icon+"
          ",n+='
          ',n+='
          '+a.content.message+"
          ",a.content.description&&""!==a.content.description){if(n+='
          '+a.content.description,a.content.list.length>0){n+='
          "}if(n+="
          ",n+="
          ",n+='
          ',a.activate_module&&(n+='",a.module_settings_link&&(n+='")),a.CTA.message){var o="jitm-button is-compact";a.CTA.primary&&null===a.activate_module?o+=" is-primary":o+=" is-secondary";var s=a.CTA.ajax_action,r=a.CTA.newWindow&&!s;n+='"}return n+="
          ",a.is_dismissible&&(n+=''),t(n+="
          ")}},e=function(){t(".jetpack-jitm-message").each((function(){var e=t(this),n=e.data("message-path"),i=e.data("query"),c=e.data("redirect"),o=location.hash;o=o.replace(/#\//,"_"),n.includes("jetpack_page_my-jetpack")?n=n.replace("jetpack_page_my-jetpack","jetpack_page_my-jetpack"+o):"_dashboard"!==o&&(n=n.replace("toplevel_page_jetpack","toplevel_page_jetpack"+o));var s=!!t(".jetpack-logo__masthead").length;t.get(window.jitm_config.api_root+"jetpack/v4/jitm",{message_path:n,query:i,full_jp_logo_exists:s,_wpnonce:e.data("nonce")}).then((function(n){"object"==typeof n&&n[1]&&(n=[n[1]]),0!==n.length&&n[0].content&&function(e,n,i){var c;(c=n.template)&&a[c]||(c="default"),n.url=n.url+"&redirect="+i;var o,s=a[c](n);s.find(".jitm-banner__dismiss").on("click",(o=s,function(a){a.preventDefault(),o.hide(),t.ajax({url:window.jitm_config.api_root+"jetpack/v4/jitm",method:"POST",beforeSend:function(t){t.setRequestHeader("X-WP-Nonce",window.jitm_config.nonce)},data:{id:n.id,feature_class:n.feature_class}})})),t("#jp-admin-notices").length>0?(e.innerHTML=s,t("#jp-admin-notices").find(".jitm-card")&&t(".jitm-card").replaceWith(s),s.prependTo(t("#jp-admin-notices"))):e.replaceWith(s),s.find("#jitm-banner__activate a").on("click",(function(){var a=t(this);if(a.attr("disabled"))return!1;t.ajax({url:window.jitm_config.api_root+"jetpack/v4/module/"+a.data("module")+"/active",method:"POST",beforeSend:function(a){a.setRequestHeader("X-WP-Nonce",e.data("nonce")),t("#jitm-banner__activate a").text(window.jitm_config.activating_module_text),t("#jitm-banner__activate a").attr("disabled",!0)}}).done((function(){if(t("#jitm-banner__activate a").text(window.jitm_config.activated_module_text),t("#jitm-banner__activate a").attr("disabled",!0),a.data("settings_link"))return t("#jitm-banner__settings").show(),void t("#jitm-banner__activate").hide();setTimeout((function(){s.fadeOut("slow")}),2e3)}))})),s.find(".jitm-button[data-ajax-action]").on("click",(function(a){a.preventDefault();var n=t(this);return n.attr("disabled",!0),t.post(window.ajaxurl,{action:n.data("ajax-action"),_nonce:e.data("ajax-nonce")}).done((function(){s.fadeOut("slow")})).fail((function(){n.attr("disabled",!1)})),!1})),s.find(".jitm-button").on("click",(function(a){var e=t(this),n=e.attr("data-jptracks-name");if(void 0!==n){var i={clicked:e.attr("data-jptracks-prop")||!1,jitm_message_path:e.attr("data-jitm-path")||!1};window.jpTracksAJAX&&window.jpTracksAJAX.record_ajax_event(n,"click",i)}}))}(e,n[0],c)}))}))};e(),t(window).on("hashchange",(function(t){const a=t.originalEvent.newURL;if(["jetpack","my-jetpack","jetpack-backup","jetpack-boost","jetpack-protect","jetpack-search","jetpack-social","jetpack-videopress"].some((t=>a.includes(`admin.php?page=${t}`)))){var n=document.querySelector(".jitm-card");n&&n.remove(),e()}}))}))})(); \ No newline at end of file diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-jitm/build/index.rtl.css b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-jitm/build/index.rtl.css deleted file mode 100644 index ce1294c9..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-jitm/build/index.rtl.css +++ /dev/null @@ -1 +0,0 @@ -.jitm-button{-webkit-appearance:none;appearance:none;background:#fff;border:1px solid #000;border-radius:4px;box-sizing:border-box;color:#000;cursor:pointer;display:inline-block;font-size:14px;font-weight:600;margin:0;min-width:90px;outline:0;overflow:hidden;padding:7px 14px 9px;text-align:center;text-decoration:none;text-overflow:ellipsis;vertical-align:top;width:100%}.jitm-button.is-primary{background:#000;color:#fff}.jitm-button.is-primary .gridicons-external-link{fill:#fff}.jitm-button.is-secondary .gridicons-external-link{fill:#000}.jitm-button.is-secondary:hover{background:#f6f7f7;color:#000}.jitm-button.is-secondary:hover .gridicons-external-link{fill:#000}.jitm-button:focus,.jitm-button:hover{background:#414141;border-color:#414141;color:#fff}.jitm-button:focus{box-shadow:0 0 0 1px #fff,0 0 0 3px #2271b1}.jitm-button:disabled,.jitm-button[disabled]{background:#dcdcde;border-color:#dcdcde;color:#a7aaad;cursor:default}.jitm-button.is-compact{font-size:14px;height:32px;line-height:1;white-space:nowrap}.jitm-button.is-compact .gridicon{margin-top:-8px;top:4px}.jitm-button.is-compact .gridicons-plus-small{margin-right:-4px}.jitm-button.is-compact .gridicons-plus-small:last-of-type{margin-right:0}.jitm-button.is-compact .gridicons-plus-small+.gridicon{margin-right:-4px}.jitm-button.is-compact .gridicons-external-link{margin:-3px 2px -3px 0}.jitm-button.hidden{display:none}.jitm-card{background-color:#fff;background-image:url(images/background-165b2f00927a762c8cf4.png);background-position:0;background-repeat:no-repeat;border:1px solid #fff;border-radius:2px;box-shadow:0 1px 4px #00000029;box-sizing:border-box;clear:both;display:block;margin:3rem auto 0 1.25rem;padding:1rem 1.25rem 1rem 1rem;position:relative}.jitm-card:after{clear:both;content:".";display:block;height:0;visibility:hidden}.jitm-card.is-compact{margin-bottom:.0625rem}@media(min-width:481px){.jitm-card.is-compact{margin-bottom:1px;padding:1rem 1.5rem}}.jitm-card.is-card-link{padding-left:3rem}.my-jetpack-jitm-card .jitm-card{margin-bottom:0;margin-left:0}#screen-meta-links+.jitm-card{margin:2.5rem auto 0 1.5385em}.post-php .jitm-card{margin-left:0}.jp-lower .jitm-card{margin:0 0 1.5rem}.jitm-banner.jitm-card{display:flex;position:relative;z-index:2}.jitm-banner.jitm-card:before{border-bottom-right-radius:1px;border-top-right-radius:1px;content:"";height:100%;position:absolute;right:0;top:0;width:4px}@media(max-width:480px){.jitm-banner.jitm-card{display:flex;flex-direction:column}}.jitm-banner.jitm-card.is-card-link{padding:.75rem 1rem .75rem 3rem}.jitm-banner.jitm-card.is-dismissible{padding-left:3rem}.jitm-banner.jitm-card:before{background-color:#4ab866}.jitm-banner.jitm-card .jitm-banner__icon{color:#4ab866}.jitm-banner.jitm-card .jitm-banner__icon-circle{background-color:#4ab866}.jitm-banner.jitm-card.is-upgrade-personal:before{background-color:#f0b849}.jitm-banner.jitm-card.is-upgrade-personal .jitm-banner__icon{color:#f0b849}.jitm-banner.jitm-card.is-upgrade-personal .jitm-banner__icon-circle{background-color:#f0b849}.jitm-banner.jitm-card.is-upgrade-premium:before{background-color:#069e08}.jitm-banner.jitm-card.is-upgrade-premium .jitm-banner__icon{color:#069e08}.jitm-banner.jitm-card.is-upgrade-premium .jitm-banner__icon-circle{background-color:#069e08}.jitm-banner.jitm-card.is-upgrade-business:before,.jitm-banner.jitm-card.woo-jitm:before{background-color:#855da6}.jitm-banner.jitm-card.is-upgrade-business .jitm-banner__icon,.jitm-banner.jitm-card.woo-jitm .jitm-banner__icon{color:#855da6}.jitm-banner.jitm-card.is-upgrade-business .jitm-banner__icon-circle,.jitm-banner.jitm-card.woo-jitm .jitm-banner__icon-circle{background-color:#855da6}.jitm-banner.jitm-card .jitm-card__link-indicator{align-items:center;color:#0087be;display:flex}.jitm-banner.jitm-card:hover{transition:all .1s ease-in-out}.jitm-banner.jitm-card:hover.is-card-link{box-shadow:0 0 0 1px #a2a2a2,0 2px 4px #d5d5d5}.jitm-banner.jitm-card:hover .jitm-card__link-indicator{color:#005082}@media(min-width:481px){.jitm-banner.jitm-card{padding:1rem 1.25rem 1rem 1rem}.jitm-banner.jitm-card.is-dismissible{padding-left:1rem}}.jitm-banner__buttons_container{display:flex;gap:1rem;height:50%;margin:auto 0 auto 1rem;overflow:hidden}@media(min-width:481px){.jitm-banner__buttons_container{margin-right:1rem}}.jitm-banner__icons{display:flex}.jitm-banner__icons .jitm-banner__icon,.jitm-banner__icons .jitm-banner__icon-circle{border-radius:50%;flex-shrink:0;height:1.5rem;margin-left:1rem;margin-top:-.125rem;text-align:center;top:.25rem;width:1.5rem}.jitm-banner__icons .jitm-banner__icon{align-self:center;color:#fff;display:block}.jitm-banner__icons .jitm-banner__icon-circle{color:#fff;display:none;padding:.1875rem .1875rem .25rem .25rem}@media(min-width:481px){.jitm-banner__icons{align-items:center}.jitm-banner__icons .jitm-banner__icon{display:none}.jitm-banner__icons .jitm-banner__icon-circle{display:block}}.jitm-banner__icon-plan{display:flex;margin-left:1rem}.jitm-banner__icon-plan .dops-plan-icon{height:2rem;width:2rem}.jitm-banner__icon-plan .jp-emblem{position:relative;top:.125rem}@media(max-width:480px){.jitm-banner__icon-plan .jp-emblem{margin-bottom:1rem}}.jitm-banner__icon-plan .jp-emblem svg{height:2rem;width:2rem;fill:#069e08}.jitm-banner__icon-plan .jp-emblem .jitm-jp-logo{height:inherit;width:2.5rem;fill:inherit}@media(min-width:481px){.jitm-banner__icon-plan{align-items:center}}.jitm-banner__content{align-items:center;display:flex;flex-grow:1;flex-shrink:100000;flex-wrap:wrap}@media(max-width:480px){.jitm-banner__content{margin-left:0}}@media(min-width:481px){.jitm-banner__content{flex-wrap:nowrap}}@media(max-width:960px){.jitm-banner__content{margin-left:5px}}.jitm-banner__info{flex-grow:1;line-height:1.4}@media(min-width:481px){.jitm-banner__info{flex-basis:50%}}@media(min-width:961px){.jitm-banner__info{flex-basis:70%}}.jitm-banner__info .jitm-banner__description,.jitm-banner__info .jitm-banner__description a,.jitm-banner__info .jitm-banner__title{color:#000}.jitm-banner__info .jitm-banner__title{font-size:.9375rem;font-weight:700;line-height:136%}.jitm-banner__info .jitm-banner__description{font-size:.8125rem;line-height:150%;margin-top:.125rem}.jitm-banner__info .banner__list{font-size:12px;list-style:none;margin:10px 0}.jitm-banner__info .banner__list li{margin:6px 0}.jitm-banner__info .banner__list li .gridicon{fill:#a2a2a2;display:inline;margin-left:12px;vertical-align:bottom}.jitm-banner__action{align-self:center;font-size:.75rem;overflow:hidden;text-align:right}.jitm-banner__action .jitm-banner__prices{display:flex;justify-content:flex-start}.jitm-banner__action .jitm-banner__prices .dops-plan-price{margin-bottom:0}.jitm-banner__action .jitm-banner__prices .dops-plan-price.is-discounted,.jitm-banner__action .jitm-banner__prices .dops-plan-price.is-discounted .dops-plan-price__currency-symbol{color:#414141}.has-call-to-action .jitm-banner__action .jitm-banner__prices .dops-plan-price{margin-bottom:.5rem}@media(max-width:480px){.jitm-banner__action{margin-top:1rem}}@media(min-width:481px){.jitm-banner__action{text-align:center;width:auto}.jitm-banner__action .is-dismissible{margin-top:2.5rem}.jitm-banner__action .jitm-banner__prices{justify-content:flex-end;text-align:left}}.jitm-banner__dismiss{display:block;line-height:.5;margin-bottom:auto;margin-top:auto;text-decoration:none}.jitm-banner__dismiss:before{color:#6f6f6f;content:"";font:400 20px/1 dashicons}@media(min-width:661px){.jitm-banner__dismiss{margin-left:-.5rem}}@media(max-width:480px){.jitm-banner__dismiss{align-items:center;display:flex;height:48px;justify-content:center;left:0;margin:0;position:absolute;top:0;width:48px}}.jitm-banner__action+.jitm-banner__dismiss{margin-right:.625rem}#dolly+.jitm-card{margin:3rem auto 0 1rem} \ No newline at end of file diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-jitm/composer.json b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-jitm/composer.json deleted file mode 100644 index 4354ab62..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-jitm/composer.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "name": "automattic/jetpack-jitm", - "description": "Just in time messages for Jetpack", - "type": "jetpack-library", - "license": "GPL-2.0-or-later", - "require": { - "php": ">=7.0", - "automattic/jetpack-a8c-mc-stats": "^2.0.1", - "automattic/jetpack-assets": "^2.1.4", - "automattic/jetpack-connection": "^2.4.1", - "automattic/jetpack-device-detection": "^2.1.1", - "automattic/jetpack-logo": "^2.0.1", - "automattic/jetpack-redirect": "^2.0.1", - "automattic/jetpack-status": "^2.1.2" - }, - "require-dev": { - "brain/monkey": "2.6.1", - "yoast/phpunit-polyfills": "1.1.0", - "automattic/jetpack-changelogger": "^4.1.1" - }, - "suggest": { - "automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package." - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "scripts": { - "build-production": [ - "pnpm run build-production" - ], - "build-development": [ - "pnpm run build" - ], - "phpunit": [ - "./vendor/phpunit/phpunit/phpunit --colors=always" - ], - "test-php": [ - "@composer phpunit" - ], - "watch": [ - "Composer\\Config::disableProcessTimeout", - "pnpm run watch" - ] - }, - "minimum-stability": "dev", - "prefer-stable": true, - "extra": { - "autotagger": true, - "mirror-repo": "Automattic/jetpack-jitm", - "textdomain": "jetpack-jitm", - "version-constants": { - "::PACKAGE_VERSION": "src/class-jitm.php" - }, - "changelogger": { - "link-template": "https://github.com/Automattic/jetpack-jitm/compare/v${old}...v${new}" - }, - "branch-alias": { - "dev-trunk": "3.1.x-dev" - } - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-jitm/src/class-jitm.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-jitm/src/class-jitm.php deleted file mode 100644 index 08e37a21..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-jitm/src/class-jitm.php +++ /dev/null @@ -1,347 +0,0 @@ -register(); - } - - /** - * Pre/Post Connection JITM factory metod - * - * @return Post_Connection_JITM|Pre_Connection_JITM JITM instance. - */ - public static function get_instance() { - if ( ( new Connection_Manager() )->is_connected() ) { - $jitm = new Post_Connection_JITM(); - } else { - $jitm = new Pre_Connection_JITM(); - } - return $jitm; - } - - /** - * Sets up JITM action callbacks if needed. - */ - public function register() { - if ( did_action( 'jetpack_registered_jitms' ) ) { - // JITMs have already been registered. - return; - } - - if ( ! $this->jitms_enabled() ) { - // Do nothing. - return; - } - - add_action( 'rest_api_init', array( __NAMESPACE__ . '\\Rest_Api_Endpoints', 'register_endpoints' ) ); - - add_action( 'current_screen', array( $this, 'prepare_jitms' ) ); - - /** - * These are sync actions that we need to keep track of for jitms. - */ - add_filter( 'jetpack_sync_before_send_updated_option', array( $this, 'jetpack_track_last_sync_callback' ), 99 ); - - /** - * Fires when the JITMs are registered. This action is used to ensure that - * JITMs are registered only once. - * - * @since 1.16.0 - */ - do_action( 'jetpack_registered_jitms' ); - } - - /** - * Checks the jetpack_just_in_time_msgs filters and whether the site - * is offline to determine whether JITMs are enabled. - * - * @return bool True if JITMs are enabled, else false. - */ - public function jitms_enabled() { - /** - * Filter to turn off all just in time messages - * - * @since 1.1.0 - * @since-jetpack 3.7.0 - * @since-jetpack 5.4.0 Correct docblock to reflect default arg value - * - * @param bool true Whether to show just in time messages. - */ - if ( ! apply_filters( 'jetpack_just_in_time_msgs', true ) ) { - return false; - } - - // Folks cannot connect to WordPress.com and won't really be able to act on the pre-connection messages. So bail. - if ( ( new Status() )->is_offline_mode() ) { - return false; - } - - return true; - } - - /** - * Prepare actions according to screen and post type. - * - * @since 1.1.0 - * @since-jetpack 3.8.2 - * - * @uses Jetpack_Autoupdate::get_possible_failures() - * - * @param \WP_Screen $screen WP Core's screen object. - */ - public function prepare_jitms( $screen ) { - /** - * Filter to hide JITMs on certain screens. - * - * @since 1.14.0 - * - * @param bool true Whether to show just in time messages. - * @param string $string->id The ID of the current screen. - */ - if ( apply_filters( 'jetpack_display_jitms_on_screen', true, $screen->id ) ) { - add_action( 'admin_enqueue_scripts', array( $this, 'jitm_enqueue_files' ) ); - add_action( 'admin_notices', array( $this, 'ajax_message' ) ); - add_action( 'edit_form_top', array( $this, 'ajax_message' ) ); - } - } - - /** - * Check if the current page is a Jetpack or WooCommerce admin page. - * Noting that this is a very basic check, and pages from other plugins may also match. - * - * @since 3.1.0 - * - * @return bool True if the current page is a Jetpack or WooCommerce admin page, else false. - */ - public function is_a8c_admin_page() { - if ( ! function_exists( 'get_current_screen' ) ) { - return false; - } - - $current_screen = get_current_screen(); - - // We never want to show JITMs on the block editor. - if ( - method_exists( $current_screen, 'is_block_editor' ) - && $current_screen->is_block_editor() - ) { - return false; - } - - return ( - $current_screen - && $current_screen->id - && (bool) preg_match( '/jetpack|woo|shop|product/', $current_screen->id ) - ); - } - - /** - * Function to enqueue jitm css and js - */ - public function jitm_enqueue_files() { - // Only load those files on the Jetpack or Woo admin pages. - if ( ! $this->is_a8c_admin_page() ) { - return; - } - - Assets::register_script( - 'jetpack-jitm', - '../build/index.js', - __FILE__, - array( - 'in_footer' => true, - 'dependencies' => array( 'jquery' ), - 'enqueue' => true, - ) - ); - wp_localize_script( - 'jetpack-jitm', - 'jitm_config', - array( - 'api_root' => esc_url_raw( rest_url() ), - 'activate_module_text' => esc_html__( 'Activate', 'jetpack-jitm' ), - 'activated_module_text' => esc_html__( 'Activated', 'jetpack-jitm' ), - 'activating_module_text' => esc_html__( 'Activating', 'jetpack-jitm' ), - 'settings_module_text' => esc_html__( 'Settings', 'jetpack-jitm' ), - 'nonce' => wp_create_nonce( 'wp_rest' ), - ) - ); - } - - /** - * Is the current page a block editor page? - * - * @since 1.1.0 - * @since-jetpack 8.0.0 - * - * @deprecated 3.1.0 - */ - public function is_gutenberg_page() { - _deprecated_function( __METHOD__, '3.1.0' ); - $current_screen = get_current_screen(); - return ( method_exists( $current_screen, 'is_block_editor' ) && $current_screen->is_block_editor() ); - } - - /** - * Get's the current message path for display of a JITM - * - * @return string The message path - */ - public function get_message_path() { - $screen = get_current_screen(); - - return 'wp:' . $screen->id . ':' . current_filter(); - } - - /** - * Injects the dom to show a JITM inside of wp-admin. - */ - public function ajax_message() { - if ( ! is_admin() ) { - return; - } - - // Only add this to Jetpack or Woo admin pages. - if ( ! $this->is_a8c_admin_page() ) { - return; - } - - $message_path = $this->get_message_path(); - $query_string = _http_build_query( $_GET, '', ',' ); // phpcs:ignore WordPress.Security.NonceVerification.Recommended - $current_screen = isset( $_SERVER['REQUEST_URI'] ) ? wp_unslash( $_SERVER['REQUEST_URI'] ) : ''; // phpcs:ignore WordPress.Security.ValidatedSanitizedInput -- Escaped below - ?> -
          - ' . ( ( $full_jp_logo_exists ) ? $jetpack_logo->get_jp_emblem() : $jetpack_logo->get_jp_emblem_larger() ) . ''; - break; - case 'woocommerce': - $content_icon = ''; - break; - default: - $content_icon = ''; - break; - } - return $content_icon; - } - - /** - * Returns an array containing the supported icons for JITMs. - * - * The list includes an empty string, which is used when no icon should be displayed. - * - * @return array The list of supported icons. - */ - public function get_supported_icons() { - return array( - 'jetpack', - 'woocommerce', - '', - ); - } - - /** - * Stores dismiss data into an option - * - * @param string $key Dismiss key. - */ - public function save_dismiss( $key ) { - $hide_jitm = \Jetpack_Options::get_option( 'hide_jitm' ); - if ( ! is_array( $hide_jitm ) ) { - $hide_jitm = array(); - } - - if ( ! isset( $hide_jitm[ $key ] ) || ! is_array( $hide_jitm[ $key ] ) ) { - $hide_jitm[ $key ] = array( - 'last_dismissal' => 0, - 'number' => 0, - ); - } - - $hide_jitm[ $key ] = array( - 'last_dismissal' => time(), - 'number' => $hide_jitm[ $key ]['number'] + 1, - ); - - \Jetpack_Options::update_option( 'hide_jitm', $hide_jitm ); - } - - /** - * Sets the 'jetpack_last_plugin_sync' transient when the active_plugins option is synced. - * - * @param array $params The action parameters. - * - * @return array Returns the action parameters unchanged. - */ - public function jetpack_track_last_sync_callback( $params ) { - /** - * This filter is documented in the Automattic\Jetpack\JITMS\Post_Connection_JITM class. - */ - if ( ! apply_filters( 'jetpack_just_in_time_msg_cache', true ) ) { - return $params; - } - - if ( is_array( $params ) && isset( $params[0] ) ) { - $option = $params[0]; - if ( 'active_plugins' === $option ) { - // Use the cache if we can, but not terribly important if it gets evicted. - set_transient( 'jetpack_last_plugin_sync', time(), HOUR_IN_SECONDS ); - } - } - - return $params; - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-jitm/src/class-post-connection-jitm.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-jitm/src/class-post-connection-jitm.php deleted file mode 100644 index bd18d3ab..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-jitm/src/class-post-connection-jitm.php +++ /dev/null @@ -1,417 +0,0 @@ -tracking = new Tracking(); - } - - /** - * A special filter for WooCommerce, to set a message based on local state. - * - * @param string $content The current message. - * - * @return array The new message. - */ - public static function jitm_woocommerce_services_msg( $content ) { - if ( ! function_exists( 'wc_get_base_location' ) ) { - return $content; - } - - $base_location = wc_get_base_location(); - - switch ( $base_location['country'] ) { - case 'US': - $content->message = esc_html__( 'New free service: Show USPS shipping rates on your store! Added bonus: print shipping labels without leaving WooCommerce.', 'jetpack-jitm' ); - break; - case 'CA': - $content->message = esc_html__( 'New free service: Show Canada Post shipping rates on your store!', 'jetpack-jitm' ); - break; - default: - $content->message = ''; - } - - return $content; - } - - /** - * A special filter for WooCommerce Call To Action button - * - * @return string The new CTA - */ - public static function jitm_jetpack_woo_services_install() { - return wp_nonce_url( - add_query_arg( - array( - 'wc-services-action' => 'install', - ), - admin_url( 'admin.php?page=wc-settings' ) - ), - 'wc-services-install' - ); - } - - /** - * A special filter for WooCommerce Call To Action button. - * - * @return string The new CTA - */ - public static function jitm_jetpack_woo_services_activate() { - return wp_nonce_url( - add_query_arg( - array( - 'wc-services-action' => 'activate', - ), - admin_url( 'admin.php?page=wc-settings' ) - ), - 'wc-services-install' - ); - } - - /** - * A special filter used in the CTA of a JITM offering to install the Creative Mail plugin. - * - * @return string The new CTA - */ - public static function jitm_jetpack_creative_mail_install() { - return wp_nonce_url( - add_query_arg( - array( - 'creative-mail-action' => 'install', - ), - admin_url( 'edit.php?post_type=feedback' ) - ), - 'creative-mail-install' - ); - } - - /** - * A special filter used in the CTA of a JITM offering to activate the Creative Mail plugin. - * - * @return string The new CTA - */ - public static function jitm_jetpack_creative_mail_activate() { - return wp_nonce_url( - add_query_arg( - array( - 'creative-mail-action' => 'activate', - ), - admin_url( 'edit.php?post_type=feedback' ) - ), - 'creative-mail-install' - ); - } - - /** - * A special filter used in the CTA of a JITM offering to install the Jetpack Backup plugin. - * - * @return string The new CTA - */ - public static function jitm_jetpack_backup_install() { - return wp_nonce_url( - add_query_arg( - array( - 'jetpack-backup-action' => 'install', - ), - admin_url( 'admin.php?page=jetpack' ) - ), - 'jetpack-backup-install' - ); - } - - /** - * A special filter used in the CTA of a JITM offering to activate the Jetpack Backup plugin. - * - * @return string The new CTA - */ - public static function jitm_jetpack_backup_activate() { - return wp_nonce_url( - add_query_arg( - array( - 'jetpack-backup-action' => 'activate', - ), - admin_url( 'admin.php?page=jetpack' ) - ), - 'jetpack-backup-install' - ); - } - - /** - * A special filter used in the CTA of a JITM offering to install the Jetpack Boost plugin. - * - * @return string The new CTA - */ - public static function jitm_jetpack_boost_install() { - return wp_nonce_url( - add_query_arg( - array( - 'jetpack-boost-action' => 'install', - ), - admin_url( 'admin.php?page=jetpack' ) - ), - 'jetpack-boost-install' - ); - } - - /** - * A special filter used in the CTA of a JITM offering to activate the Jetpack Boost plugin. - * - * @return string The new CTA - */ - public static function jitm_jetpack_boost_activate() { - return wp_nonce_url( - add_query_arg( - array( - 'jetpack-boost-action' => 'activate', - ), - admin_url( 'admin.php?page=jetpack' ) - ), - 'jetpack-boost-install' - ); - } - - /** - * Dismisses a JITM feature class so that it will no longer be shown. - * - * @param string $id The id of the JITM that was dismissed. - * @param string $feature_class The feature class of the JITM that was dismissed. - * - * @return bool Always true. - */ - public function dismiss( $id, $feature_class ) { - $this->tracking->record_user_event( - 'jitm_dismiss_client', - array( - 'jitm_id' => $id, - 'feature_class' => $feature_class, - ) - ); - $this->save_dismiss( $feature_class ); - return true; - } - - /** - * Asks the wpcom API for the current message to display keyed on query string and message path - * - * @param string $message_path The message path to ask for. - * @param string $query The query string originally from the front end. - * @param bool $full_jp_logo_exists If there is a full Jetpack logo already on the page. - * - * @return array The JITM's to show, or an empty array if there is nothing to show - */ - public function get_messages( $message_path, $query, $full_jp_logo_exists ) { - // WooCommerce Services. - add_filter( 'jitm_woocommerce_services_msg', array( $this, 'jitm_woocommerce_services_msg' ) ); - add_filter( 'jitm_jetpack_woo_services_install', array( $this, 'jitm_jetpack_woo_services_install' ) ); - add_filter( 'jitm_jetpack_woo_services_activate', array( $this, 'jitm_jetpack_woo_services_activate' ) ); - - // Creative Mail. - add_filter( 'jitm_jetpack_creative_mail_install', array( $this, 'jitm_jetpack_creative_mail_install' ) ); - add_filter( 'jitm_jetpack_creative_mail_activate', array( $this, 'jitm_jetpack_creative_mail_activate' ) ); - - // Jetpack Backup. - add_filter( 'jitm_jetpack_backup_install', array( $this, 'jitm_jetpack_backup_install' ) ); - add_filter( 'jitm_jetpack_backup_activate', array( $this, 'jitm_jetpack_backup_activate' ) ); - - // Jetpack Boost. - add_filter( 'jitm_jetpack_boost_install', array( $this, 'jitm_jetpack_boost_install' ) ); - add_filter( 'jitm_jetpack_boost_activate', array( $this, 'jitm_jetpack_boost_activate' ) ); - - $user = wp_get_current_user(); - - // Unauthenticated or invalid requests just bail. - if ( ! $user ) { - return array(); - } - - $user_roles = implode( ',', $user->roles ); - $site_id = \Jetpack_Options::get_option( 'id' ); - - // Build our jitm request. - $path = add_query_arg( - array( - 'external_user_id' => urlencode_deep( $user->ID ), - 'user_roles' => urlencode_deep( $user_roles ), - 'query_string' => urlencode_deep( build_query( $query ) ), - 'mobile_browser' => Device_Detection::is_smartphone() ? 1 : 0, - '_locale' => get_user_locale(), - ), - sprintf( '/sites/%d/jitm/%s', $site_id, $message_path ) - ); - - // Attempt to get from cache. - $envelopes = get_transient( 'jetpack_jitm_' . substr( md5( $path ), 0, 31 ) ); - - // If something is in the cache and it was put in the cache after the last sync we care about, use it. - $use_cache = false; - - /** - * Filter to turn off jitm caching - * - * @since 1.1.0 - * @since-jetpack 5.4.0 - * - * @param bool true Whether to cache just in time messages - */ - if ( apply_filters( 'jetpack_just_in_time_msg_cache', true ) ) { - $use_cache = true; - } - - if ( $use_cache ) { - $last_sync = (int) get_transient( 'jetpack_last_plugin_sync' ); - $from_cache = $envelopes && $last_sync > 0 && $last_sync < $envelopes['last_response_time']; - } else { - $from_cache = false; - } - - // Otherwise, ask again. - if ( ! $from_cache ) { - $wpcom_response = Client::wpcom_json_api_request_as_blog( - $path, - '2', - array( - 'user_id' => $user->ID, - 'user_roles' => implode( ',', $user->roles ), - ), - null, - 'wpcom' - ); - - // silently fail...might be helpful to track it? - if ( is_wp_error( $wpcom_response ) ) { - return array(); - } - - $envelopes = json_decode( $wpcom_response['body'] ); - - if ( ! is_array( $envelopes ) ) { - return array(); - } - - $expiration = isset( $envelopes[0] ) ? $envelopes[0]->ttl : 300; - - // Do not cache if expiration is 0 or we're not using the cache. - if ( 0 !== $expiration && $use_cache ) { - $envelopes['last_response_time'] = time(); - - set_transient( 'jetpack_jitm_' . substr( md5( $path ), 0, 31 ), $envelopes, $expiration ); - } - } - - $hidden_jitms = \Jetpack_Options::get_option( 'hide_jitm' ); - unset( $envelopes['last_response_time'] ); - - /** - * Allow adding your own custom JITMs after a set of JITMs has been received. - * - * @since 1.1.0 - * @since-jetpack 6.9.0 - * @since-jetpack 8.3.0 - Added Message path. - * - * @param array $envelopes array of existing JITMs. - * @param string $message_path The message path to ask for. - */ - $envelopes = apply_filters( 'jetpack_jitm_received_envelopes', $envelopes, $message_path ); - - foreach ( $envelopes as $idx => &$envelope ) { - - $dismissed_feature = isset( $hidden_jitms[ $envelope->feature_class ] ) && is_array( $hidden_jitms[ $envelope->feature_class ] ) ? $hidden_jitms[ $envelope->feature_class ] : null; - - // If the this feature class has been dismissed and the request has not passed the ttl, skip it as it's been dismissed. - if ( is_array( $dismissed_feature ) && ( time() - $dismissed_feature['last_dismissal'] < $envelope->expires || $dismissed_feature['number'] >= $envelope->max_dismissal ) ) { - unset( $envelopes[ $idx ] ); - continue; - } - - $this->tracking->record_user_event( - 'jitm_view_client', - array( - 'jitm_id' => $envelope->id, - 'jitm_message_path' => $message_path, - ) - ); - - $url_params = array( - 'u' => $user->ID, - ); - - // Get affiliate code and add it to the array of URL parameters. - $aff = Partner::init()->get_partner_code( Partner::AFFILIATE_CODE ); - if ( '' !== $aff ) { - $url_params['aff'] = $aff; - } - - // Check if the current user has connected their WP.com account - // and if not add this information to the the array of URL parameters. - if ( ! ( new Manager() )->is_user_connected( $user->ID ) ) { - $url_params['query'] = 'unlinked=1'; - } - $envelope->url = esc_url( Redirect::get_url( "jitm-$envelope->id", $url_params ) ); - - $stats = new A8c_Mc_Stats(); - - $envelope->jitm_stats_url = $stats->build_stats_url( array( 'x_jetpack-jitm' => $envelope->id ) ); - - // phpcs:disable WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase - // $CTA is not valid per PHPCS, but it is part of the return from WordPress.com, so allowing. - if ( $envelope->CTA->hook ) { - $envelope->url = apply_filters( 'jitm_' . $envelope->CTA->hook, $envelope->url ); - unset( $envelope->CTA->hook ); - } - // phpcs:enable - - if ( isset( $envelope->content->hook ) ) { - $envelope->content = apply_filters( 'jitm_' . $envelope->content->hook, $envelope->content ); - unset( $envelope->content->hook ); - } - - // No point in showing an empty message. - if ( empty( $envelope->content->message ) ) { - unset( $envelopes[ $idx ] ); - continue; - } - - $envelope->content->icon = $this->generate_icon( $envelope->content->icon, $full_jp_logo_exists ); - $envelope->message_path = esc_attr( $message_path ); - - $stats->add( 'jitm', $envelope->id . '-viewed' ); - $stats->do_server_side_stats(); - } - - return $envelopes; - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-jitm/src/class-pre-connection-jitm.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-jitm/src/class-pre-connection-jitm.php deleted file mode 100644 index 6a779873..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-jitm/src/class-pre-connection-jitm.php +++ /dev/null @@ -1,171 +0,0 @@ -validate_messages( $messages ); - - $formatted_messages = array(); - - foreach ( $messages as $message ) { - if ( ! preg_match( $message['message_path'], $message_path ) ) { - continue; - } - - $obj = new \stdClass(); - $obj->CTA = array( // phpcs:ignore WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase - 'message' => $message['button_caption'], - 'newWindow' => false, - ); - $obj->url = $message['button_link']; - $obj->id = $message['id']; - $obj->is_dismissible = true; - $obj->content = array( - 'message' => $message['message'], - 'description' => $message['description'], - 'list' => array(), - 'icon' => $this->get_message_icon( $message ), - ); - - $formatted_messages[] = $obj; - } - - return $formatted_messages; - } - - /** - * Validates that each of the messages contains all of the required keys: - * - id - * - message_path - * - message - * - description - * - button_link - * - button_caption - * - * @param array $messages An array of JITM messages. - * - * @return array An array of JITM messages that contain all of the required keys. - */ - private function validate_messages( $messages ) { - if ( ! is_array( $messages ) ) { - return array(); - } - - $expected_keys = array_flip( array( 'id', 'message_path', 'message', 'description', 'button_link', 'button_caption' ) ); - - foreach ( $messages as $index => $message ) { - if ( count( array_intersect_key( $expected_keys, $message ) ) !== count( $expected_keys ) ) { - // Remove any messages that are missing expected keys. - unset( $messages[ $index ] ); - } - } - - return $messages; - } - - /** - * Get the icon for the message. - * - * The message may contain an 'icon' key. If the value of the 'icon' key matches a supported icon (or empty string), the value is used. - * If the message does not contain an icon key or if the value does not match a supported icon, the Jetpack icon is used by default. - * - * @param array $message A pre-connection JITM. - * - * @return string The icon to use in the JITM. - */ - private function get_message_icon( $message ) { - // Default to the Jetpack icon. - $icon = 'jetpack'; - - if ( ! isset( $message['icon'] ) ) { - return $icon; - } - - $supported_icons = $this->get_supported_icons(); - - if ( in_array( $message['icon'], $supported_icons, true ) ) { - // Only use the message icon if it's a supported icon or an empty string (for no icon). - $icon = $message['icon']; - } - - return $icon; - } - - /** - * Retrieve the current message to display keyed on query string and message path - * - * @param string $message_path The message path to ask for. - * @param string $query The query string originally from the front end. Unused in this subclass. - * @param bool $full_jp_logo_exists If there is a full Jetpack logo already on the page. - * - * @return array The JITMs to show, or an empty array if there is nothing to show - */ - public function get_messages( $message_path, $query, $full_jp_logo_exists ) { - if ( ! current_user_can( 'install_plugins' ) ) { - return array(); - } - - $messages = $this->filter_messages( $message_path ); - - if ( empty( $messages ) ) { - return array(); - } - - $hidden_jitms = \Jetpack_Options::get_option( 'hide_jitm' ); - - foreach ( $messages as $idx => &$envelope ) { - $dismissed_feature = isset( $hidden_jitms[ 'pre-connection-' . $envelope->id ] ) && - is_array( $hidden_jitms[ 'pre-connection-' . $envelope->id ] ) ? $hidden_jitms[ 'pre-connection-' . $envelope->id ] : null; - - if ( is_array( $dismissed_feature ) ) { - unset( $messages[ $idx ] ); - continue; - } - - $envelope->content['icon'] = $this->generate_icon( $envelope->content['icon'], $full_jp_logo_exists ); - } - - return $messages; - } - - /** - * Dismisses a JITM ID so that it will no longer be shown. - * - * @param string $id The id of the JITM that was dismissed. - * - * @return bool Always true - */ - public function dismiss( $id ) { - $this->save_dismiss( 'pre-connection-' . $id ); - return true; - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-jitm/src/class-rest-api-endpoints.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-jitm/src/class-rest-api-endpoints.php deleted file mode 100644 index e7d97dc8..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-jitm/src/class-rest-api-endpoints.php +++ /dev/null @@ -1,96 +0,0 @@ - WP_REST_Server::READABLE, - 'callback' => __CLASS__ . '::get_jitm_message', - 'permission_callback' => '__return_true', - ) - ); - - register_rest_route( - 'jetpack/v4', - '/jitm', - array( - 'methods' => WP_REST_Server::CREATABLE, - 'callback' => __CLASS__ . '::delete_jitm_message', - 'permission_callback' => __CLASS__ . '::delete_jitm_message_permission_callback', - ) - ); - } - - /** - * Asks for a jitm, unless they've been disabled, in which case it returns an empty array - * - * @param WP_REST_Request $request The request object. - * - * @return array An array of jitms - */ - public static function get_jitm_message( $request ) { - $jitm = JITM::get_instance(); - - if ( ! $jitm->jitms_enabled() ) { - return array(); - } - - // add the search term to the query params if it exists - $query = $request['query']; - if ( ! empty( $request['s'] ) ) { - $query['s'] = $request['s']; - } - - return $jitm->get_messages( $request['message_path'], urldecode_deep( $query ), 'true' === $request['full_jp_logo_exists'] ? true : false ); - } - - /** - * Dismisses a jitm. - * - * @param WP_REST_Request $request The request object. - * - * @return bool Always True - */ - public static function delete_jitm_message( $request ) { - $jitm = JITM::get_instance(); - - if ( ! $jitm->jitms_enabled() ) { - return true; - } - - return $jitm->dismiss( $request['id'], $request['feature_class'] ); - } - - /** - * Verify that the user can dismiss JITM messages. - * - * @return bool|WP_Error True if user is able to dismiss JITM messages. - */ - public static function delete_jitm_message_permission_callback() { - if ( current_user_can( 'read' ) ) { - return true; - } - - return new \WP_Error( 'invalid_user_permission_jetpack_delete_jitm_message', REST_Connector::get_user_permissions_error_msg(), array( 'status' => rest_authorization_required_code() ) ); - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-jitm/src/css/jetpack-admin-jitm.scss b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-jitm/src/css/jetpack-admin-jitm.scss deleted file mode 100644 index f36beefe..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-jitm/src/css/jetpack-admin-jitm.scss +++ /dev/null @@ -1,501 +0,0 @@ -// Just in Time Messaging - message prompts - -// TODO: Switch to using the `@automattic/jetpack-base-styles` package when its ready. -@import '../../plugins/jetpack/_inc/client/scss/functions/rem'; -@import '../../plugins/jetpack/_inc/client/scss/variables/colors'; -@import '../../plugins/jetpack/_inc/client/scss/mixins/breakpoints'; -@import '../../plugins/jetpack/_inc/client/scss/calypso-colors'; - -@mixin clear-fix { - &::after { - content: "."; - display: block; - height: 0; - clear: both; - visibility: hidden; - } -} - -@mixin jitm-banner-color( $color ) { - &::before { - background-color: $color; - } - - .jitm-banner__icon { - color: $color; - } - - .jitm-banner__icon-circle { - background-color: $color; - } -} - -// New JITMS - modified calypso banner styles -$blue-medium-dark: #2271b1; -$jp-gray: #dcdcde; -$jp-gray-0: #f6f7f7; -$jp-gray-20: #a7aaad; - -.jitm-button { - border-style: solid; - border-width: 1px; - cursor: pointer; - display: inline-block; - margin: 0; - outline: 0; - overflow: hidden; - text-overflow: ellipsis; - text-decoration: none; - vertical-align: top; - box-sizing: border-box; - font-size: 14px; - border-radius: 4px; - padding: 7px 14px 9px; - -webkit-appearance: none; - appearance: none; - text-align: center; - min-width: 90px; - font-weight: 600; - border-color: black; - background: $white; - color: black; - width: 100%; - - // Primary buttons - &.is-primary { - background: black; - color: $white; - .gridicons-external-link { - fill: $white; - } - } - - // Secondary buttons - &.is-secondary { - .gridicons-external-link { - fill: black; - } - &:hover{ - color: black; - background: $jp-gray-0; - .gridicons-external-link { - fill: black; - } - } - } - - &:hover, - &:focus { - border-color: $gray-dark; - background: $gray-dark; - color: $white; - } - &:focus { - box-shadow: - 0 0 0 1px $white, - 0 0 0 3px $blue-medium-dark; - } - - &[disabled], - &:disabled { - color: $jp-gray-20; - background: $jp-gray; - border-color: $jp-gray; - cursor: default; - } - &.is-compact { - height: 32px; - font-size: 14px; - line-height: 1; - white-space: nowrap; - - .gridicon { - top: 4px; - margin-top: -8px; - } - // Make the left margin of the small plus icon visually less huge - .gridicons-plus-small { - margin-left: -4px; - } - // Reset the left margin if the button contains only the plus icon - .gridicons-plus-small:last-of-type { - margin-left: 0; - } - // Make plus icon nudged closer to adjacent icons for add-people and add-plugin type buttons - .gridicons-plus-small + .gridicon { - margin-left: -4px; - } - - // Properly align icon with the button text - .gridicons-external-link { - margin: -3px 0 -3px 2px; - } - } - &.hidden { - display: none; - } -} - -.jitm-card { - display: block; - clear: both; - position: relative; - margin: rem( 48px ) rem( 20px ) 0 auto; - padding: rem( 16px ); - padding-left: rem( 20px ); - box-sizing: border-box; - background-color: $white; - background-image: url( "../images/background.png" ); - background-repeat: no-repeat; - background-position: right center; - border: 1px solid $white; - border-radius: 2px; - box-shadow: 0px 1px 4px rgba(0, 0, 0, 0.16); - - @include clear-fix; - - // Compact Card - &.is-compact { - margin-bottom: rem( 1px ); - - @include breakpoint( ">480px" ) { - margin-bottom: 1px; - padding: rem( 16px ) rem( 24px ); - } - } - - &.is-card-link { - padding-right: rem( 48px ); - } -} - -// Minor adjustments for the display in My Jetpack. -.my-jetpack-jitm-card { - .jitm-card { - margin-right: 0; - margin-bottom: 0; - } -} - -// if JITM appears directly below WordPress "help" menu adjust margins -#screen-meta-links+.jitm-card { - margin: rem( 40px ) 1.5385em 0 auto; -} - -// if JITM appears directly below WordPress hello dolly adjust margins -#dolly+.jitm-card { - margin: 3rem 1rem 0 auto; -} - -// remove right margin for jitms in the editor -.post-php .jitm-card { - margin-right: 0; -} - - // if JITM appears inside of the jetpack dashboard adjust margins - .jp-lower .jitm-card { - margin: 0 0 rem( 24px ); - } - -.jitm-banner.jitm-card { - display: flex; - position: relative; - z-index: 2; - - &::before { - content: ''; - width: 4px; - position: absolute; - top: 0; - left: 0; - height: 100%; - border-top-left-radius: 1px; - border-bottom-left-radius: 1px; - } - - @include breakpoint( "<480px" ) { - display: flex; - flex-direction: column; - } - - &.is-card-link { - padding: rem( 12px ) rem( 48px ) rem( 12px ) rem( 16px ); - } - &.is-dismissible { - padding-right: rem( 48px ); - } - - @include jitm-banner-color( $alert-green ); - - &.is-upgrade-personal { - @include jitm-banner-color( $alert-yellow ); - } - &.is-upgrade-premium { - @include jitm-banner-color( #069e08 ); - } - &.is-upgrade-business, - &.woo-jitm { - @include jitm-banner-color( $alert-purple ); - } - - .jitm-card__link-indicator { - align-items: center; - color: $blue-wordpress; - display: flex; - } - - &:hover { - transition: all 100ms ease-in-out; - &.is-card-link { - box-shadow: 0 0 0 1px $gray, 0 2px 4px lighten( $gray, 20% ); - } - .jitm-card__link-indicator { - color: $blue-dark; - } - } - - @include breakpoint( ">480px" ) { - padding: rem( 16px ); - padding-left: rem( 20px ); - - &.is-dismissible { - padding-right: rem( 16px ); - } - } -} - -.jitm-banner__buttons_container { - display: flex; - height: 50%; - margin: auto rem( 16px ) auto 0; - gap: rem( 16px ); - overflow: hidden; - - @include breakpoint( ">480px" ) { - margin-left: rem( 16px ); - } -} - -.jitm-banner__icons { - display: flex; - - .jitm-banner__icon, - .jitm-banner__icon-circle { - border-radius: 50%; - flex-shrink: 0; - height: rem( 24px ); - width: rem( 24px ); - margin-right: rem( 16px ); - margin-top: rem( -2px ); - text-align: center; - top: rem( 4px ); - } - - .jitm-banner__icon { - align-self: center; - color: $white; - display: block; - } - - .jitm-banner__icon-circle { - color: white; - display: none; - padding: rem( 3px ) rem( 4px ) rem( 4px ) rem( 3px ); - } - - @include breakpoint( ">480px" ) { - align-items: center; - - .jitm-banner__icon { - display: none; - } - .jitm-banner__icon-circle { - display: block; - } - } -} - -.jitm-banner__icon-plan { - display: flex; - margin-right: rem( 16px ); - - .dops-plan-icon { - height: rem( 32px ); - width: rem( 32px ); - } - - .jp-emblem { - position: relative; - top: rem( 2px ); - - @include breakpoint( "<480px" ) { - margin-bottom: rem( 16px ); - } - - svg { - height: rem( 32px ); - width: rem( 32px ); - fill: $green-primary; - } - - .jitm-jp-logo { - height: inherit; - width: rem( 40px ); - fill: inherit; - } - } - - @include breakpoint( ">480px" ) { - align-items: center; - } -} - -.jitm-banner__content { - align-items: center; - display: flex; - flex-grow: 1; - flex-wrap: wrap; - flex-shrink: 100000; - - @include breakpoint( "<480px" ) { - margin-right: 0; - } - - @include breakpoint( ">480px" ) { - flex-wrap: nowrap; - } - - @include breakpoint( "<960px" ) { - margin-right: 5px; - } -} - -.jitm-banner__info { - flex-grow: 1; - line-height: 1.4; - - @include breakpoint( ">480px" ) { - flex-basis: 50%; - } - - @include breakpoint( ">960px" ) { - flex-basis: 70%; - } - - .jitm-banner__title, - .jitm-banner__description, - .jitm-banner__description a { - color: black; - } - - .jitm-banner__title { - font-size: rem( 15px ); - font-weight: 700; - line-height: 136%; - } - - .jitm-banner__description { - font-size: rem( 13px ); - line-height: 150%; - margin-top: rem( 2px ); - } - - .banner__list { - font-size: 12px; - list-style: none; - margin: 10px 0; - li { - margin: 6px 0; - .gridicon { - fill: $gray; - display: inline; - margin-right: 12px; - vertical-align: bottom; - } - } - } -} - -.jitm-banner__action { - align-self: center; - font-size: rem( 12px ); - text-align: left; - overflow: hidden; - - .jitm-banner__prices { - display: flex; - justify-content: flex-start; - - .dops-plan-price { - margin-bottom: 0; - } - - .dops-plan-price.is-discounted, - .dops-plan-price.is-discounted .dops-plan-price__currency-symbol { - color: $gray-dark; - } - - .has-call-to-action & .dops-plan-price { - margin-bottom: rem( 8px ); - } - } - - @include breakpoint( "<480px" ) { - margin-top: 1rem; - } - - @include breakpoint( ">480px" ) { - text-align: center; - width: auto; - - .is-dismissible { - margin-top: rem( 40px ); - } - - .jitm-banner__prices { - justify-content: flex-end; - text-align: right; - } - } -} - -.jitm-banner__dismiss { - display: block; - text-decoration: none; - line-height: .5; - margin-top: auto; - margin-bottom: auto; - - &::before { - color: darken($gray, 20%); - font: 400 20px/1 dashicons; - content: '\f335'; - } - - @include breakpoint( ">660px" ) { - margin-right: rem( -8px ); - } - - @include breakpoint( "<480px" ) { - position: absolute; - top: 0; - right: 0; - - display: flex; - justify-content: center; - align-items: center; - margin: 0; - - // Minimum touch area - width: 48px; - height: 48px; - } -} - -.jitm-banner__action + .jitm-banner__dismiss { - margin-left: rem( 10px ); -} - -#dolly + .jitm-card { - margin: 3rem 1rem 0 auto; -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-jitm/src/images/background.png b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-jitm/src/images/background.png deleted file mode 100644 index c2d50e1b..00000000 Binary files a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-jitm/src/images/background.png and /dev/null differ diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-licensing/CHANGELOG.md b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-licensing/CHANGELOG.md deleted file mode 100644 index 4ea85437..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-licensing/CHANGELOG.md +++ /dev/null @@ -1,320 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file. - -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) -and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - -## [2.0.2] - 2024-03-14 -### Changed -- Internal updates. - -## [2.0.1] - 2023-11-21 - -## [2.0.0] - 2023-11-20 -### Changed -- Updated required PHP version to >= 7.0. [#34192] - -## [1.8.4] - 2023-09-19 - -- Minor internal updates. - -## [1.8.3] - 2023-08-23 -### Changed -- Updated package dependencies. [#32605] - -## [1.8.2] - 2023-04-10 -### Added -- Add Jetpack Autoloader package suggestion. [#29988] - -## [1.8.1] - 2023-02-20 -### Changed -- Minor internal updates. - -## [1.8.0] - 2023-02-08 -### Added -- After connection flow, load unattached licenses. If any of them match the product that's being connected, redirect users to the license activation page. [#28509] - -## [1.7.14] - 2023-01-11 -### Changed -- Updated package dependencies. - -## [1.7.13] - 2022-12-02 -### Changed -- Updated package dependencies. [#27688] - -## [1.7.12] - 2022-11-22 -### Changed -- Updated package dependencies. [#27043] - -## [1.7.11] - 2022-10-25 -### Changed -- Updated package dependencies. [#26705] - -## [1.7.10] - 2022-09-20 -### Changed -- Updated package dependencies. - -## [1.7.9] - 2022-09-08 -### Changed -- Updated package dependencies. - -## [1.7.8] - 2022-08-29 -### Changed -- Updated package dependencies. - -## [1.7.7] - 2022-08-23 -### Changed -- Updated package dependencies. [#25628] - -## [1.7.6] - 2022-08-03 -### Changed -- Updated package dependencies. [#25300, #25315] - -## [1.7.5] - 2022-07-26 -### Changed -- Updated package dependencies. [#25158] - -## [1.7.4] - 2022-06-21 -### Changed -- Renaming master to trunk. - -## [1.7.3] - 2022-06-14 -### Changed -- Updated package dependencies. [#24529] - -## [1.7.2] - 2022-05-04 -### Changed -- Updated package dependencies. [#24095] - -### Deprecated -- Moved the options class into Connection. [#24095] - -## [1.7.1] - 2022-04-26 -### Changed -- Updated package dependencies. - -## [1.7.0] - 2022-04-19 -### Changed -- Moved licensing endpoints from the Jetpack plugin to the Licensing package - -## [1.6.4] - 2022-04-12 -### Changed -- Updated package dependencies. - -## [1.6.3] - 2022-03-02 -### Changed -- Updated package dependencies. - -## [1.6.2] - 2022-01-25 -### Changed -- Updated package dependencies. - -## [1.6.1] - 2022-01-18 -### Changed -- Updated package dependencies. - -## [1.6.0] - 2022-01-04 -### Changed -- Switch to pcov for code coverage. -- Updated package dependencies -- Updated package textdomain from `jetpack` to `jetpack-licensing`. - -## [1.5.4] - 2021-12-14 -### Changed -- Updated package dependencies. - -## [1.5.3] - 2021-12-03 -### Changed -- Increases the timeout of the license activation request from 10 to 30 seconds. - -## [1.5.2] - 2021-11-30 -### Changed -- Updated package dependencies. - -## [1.5.1] - 2021-11-23 -### Changed -- Updated package dependencies. - -## [1.5.0] - 2021-11-16 -### Added -- Add a test for update to WPCOM return change. -- Added get_license_activation_notice_dismiss() function. - -## [1.4.9] - 2021-11-02 -### Changed -- Set `convertDeprecationsToExceptions` true in PHPUnit config. -- Update PHPUnit configs to include just what needs coverage rather than include everything then try to exclude stuff that doesn't. - -## [1.4.8] - 2021-10-19 -### Changed -- Updated package dependencies. - -## [1.4.7] - 2021-10-12 -### Changed -- Updated package dependencies - -## [1.4.6] - 2021-09-28 -### Changed -- Updated package dependencies. - -## [1.4.5] - 2021-08-31 -### Changed -- Run composer update on test-php command instead of phpunit. -- Tests: update PHPUnit polyfills dependency (yoast/phpunit-polyfills). -- Updated versions in annotations. - -## [1.4.4] - 2021-07-27 -### Changed -- Updated package dependencies. - -## [1.4.3] - 2021-06-29 -### Changed -- Updated package dependencies. - -## [1.4.2] - 2021-05-25 -### Changed -- Updated package dependencies. - -## [1.4.1] - 2021-04-27 -### Changed -- Updated package dependencies. - -## [1.4.0] - 2021-03-30 -### Added -- Composer alias for dev-master, to improve dependencies -- Dashboard: add new option to input license key. - -### Changed -- Replace usage of deprecated is_active method -- Update package dependencies. - -### Fixed -- Fix stored licenses not being attached on option creation -- Use `composer update` rather than `install` in scripts, as composer.lock isn't checked in. - -## [1.3.4] - 2021-02-23 - -- CI: Make tests more generic -- codesniffer: Hack around mediawiki-codesniffer bug - -## [1.3.3] - 2021-02-08 - -- Update dependencies to latest stable - -## [1.3.2] - 2021-01-28 - -- Update dependencies to latest stable - -## [1.3.1] - 2021-01-26 - -- Add mirror-repo information to all current composer packages -- Monorepo: Reorganize all projects - -## [1.3.0] - 2021-01-05 - -- Pin dependencies -- Packages: Update for PHP 8 testing - -## [1.2.4] - 2020-11-24 - -- Version packages for release - -## [1.2.3] - 2020-11-24 - -- Updated PHPCS: Packages and Debugger - -## [1.2.2] - 2020-11-05 - -- Update dependencies to latest stable - -## [1.2.1] - 2020-10-29 - -- Update dependencies to latest stable - -## [1.2.0] - 2020-10-27 - -- Licensing: use Oxford comma in error message - -## [1.1.4] - 2020-10-14 - -- Update dependencies to latest stable - -## [1.1.3] - 2020-10-09 - -- Update dependencies to latest stable - -## [1.1.2] - 2020-10-06 - -- Update dependencies to latest stable - -## [1.1.1] - 2020-10-01 - -- Update dependencies to latest stable - -## [1.1.0] - 2020-09-29 - -- Update dependencies to latest stable - -## 1.0.0 - 2020-09-24 - -- Licensing: Add support for Jetpack licenses - -[2.0.2]: https://github.com/Automattic/jetpack-licensing/compare/v2.0.1...v2.0.2 -[2.0.1]: https://github.com/Automattic/jetpack-licensing/compare/v2.0.0...v2.0.1 -[2.0.0]: https://github.com/Automattic/jetpack-licensing/compare/v1.8.4...v2.0.0 -[1.8.4]: https://github.com/Automattic/jetpack-licensing/compare/v1.8.3...v1.8.4 -[1.8.3]: https://github.com/Automattic/jetpack-licensing/compare/v1.8.2...v1.8.3 -[1.8.2]: https://github.com/Automattic/jetpack-licensing/compare/v1.8.1...v1.8.2 -[1.8.1]: https://github.com/Automattic/jetpack-licensing/compare/v1.8.0...v1.8.1 -[1.8.0]: https://github.com/Automattic/jetpack-licensing/compare/v1.7.14...v1.8.0 -[1.7.14]: https://github.com/Automattic/jetpack-licensing/compare/v1.7.13...v1.7.14 -[1.7.13]: https://github.com/Automattic/jetpack-licensing/compare/v1.7.12...v1.7.13 -[1.7.12]: https://github.com/Automattic/jetpack-licensing/compare/v1.7.11...v1.7.12 -[1.7.11]: https://github.com/Automattic/jetpack-licensing/compare/v1.7.10...v1.7.11 -[1.7.10]: https://github.com/Automattic/jetpack-licensing/compare/v1.7.9...v1.7.10 -[1.7.9]: https://github.com/Automattic/jetpack-licensing/compare/v1.7.8...v1.7.9 -[1.7.8]: https://github.com/Automattic/jetpack-licensing/compare/v1.7.7...v1.7.8 -[1.7.7]: https://github.com/Automattic/jetpack-licensing/compare/v1.7.6...v1.7.7 -[1.7.6]: https://github.com/Automattic/jetpack-licensing/compare/v1.7.5...v1.7.6 -[1.7.5]: https://github.com/Automattic/jetpack-licensing/compare/v1.7.4...v1.7.5 -[1.7.4]: https://github.com/Automattic/jetpack-licensing/compare/v1.7.3...v1.7.4 -[1.7.3]: https://github.com/Automattic/jetpack-licensing/compare/v1.7.2...v1.7.3 -[1.7.2]: https://github.com/Automattic/jetpack-licensing/compare/v1.7.1...v1.7.2 -[1.7.1]: https://github.com/Automattic/jetpack-licensing/compare/v1.7.0...v1.7.1 -[1.7.0]: https://github.com/Automattic/jetpack-licensing/compare/v1.6.4...v1.7.0 -[1.6.4]: https://github.com/Automattic/jetpack-licensing/compare/v1.6.3...v1.6.4 -[1.6.3]: https://github.com/Automattic/jetpack-licensing/compare/v1.6.2...v1.6.3 -[1.6.2]: https://github.com/Automattic/jetpack-licensing/compare/v1.6.1...v1.6.2 -[1.6.1]: https://github.com/Automattic/jetpack-licensing/compare/v1.6.0...v1.6.1 -[1.6.0]: https://github.com/Automattic/jetpack-licensing/compare/v1.5.4...v1.6.0 -[1.5.4]: https://github.com/Automattic/jetpack-licensing/compare/v1.5.3...v1.5.4 -[1.5.3]: https://github.com/Automattic/jetpack-licensing/compare/v1.5.2...v1.5.3 -[1.5.2]: https://github.com/Automattic/jetpack-licensing/compare/v1.5.1...v1.5.2 -[1.5.1]: https://github.com/Automattic/jetpack-licensing/compare/v1.5.0...v1.5.1 -[1.5.0]: https://github.com/Automattic/jetpack-licensing/compare/v1.4.9...v1.5.0 -[1.4.9]: https://github.com/Automattic/jetpack-licensing/compare/v1.4.8...v1.4.9 -[1.4.8]: https://github.com/Automattic/jetpack-licensing/compare/v1.4.7...v1.4.8 -[1.4.7]: https://github.com/Automattic/jetpack-licensing/compare/v1.4.6...v1.4.7 -[1.4.6]: https://github.com/Automattic/jetpack-licensing/compare/v1.4.5...v1.4.6 -[1.4.5]: https://github.com/Automattic/jetpack-licensing/compare/v1.4.4...v1.4.5 -[1.4.4]: https://github.com/Automattic/jetpack-licensing/compare/v1.4.3...v1.4.4 -[1.4.3]: https://github.com/Automattic/jetpack-licensing/compare/v1.4.2...v1.4.3 -[1.4.2]: https://github.com/Automattic/jetpack-licensing/compare/v1.4.1...v1.4.2 -[1.4.1]: https://github.com/Automattic/jetpack-licensing/compare/v1.4.0...v1.4.1 -[1.4.0]: https://github.com/Automattic/jetpack-licensing/compare/v1.3.4...v1.4.0 -[1.3.4]: https://github.com/Automattic/jetpack-licensing/compare/v1.3.3...v1.3.4 -[1.3.3]: https://github.com/Automattic/jetpack-licensing/compare/v1.3.2...v1.3.3 -[1.3.2]: https://github.com/Automattic/jetpack-licensing/compare/v1.3.1...v1.3.2 -[1.3.1]: https://github.com/Automattic/jetpack-licensing/compare/v1.3.0...v1.3.1 -[1.3.0]: https://github.com/Automattic/jetpack-licensing/compare/v1.2.4...v1.3.0 -[1.2.4]: https://github.com/Automattic/jetpack-licensing/compare/v1.2.3...v1.2.4 -[1.2.3]: https://github.com/Automattic/jetpack-licensing/compare/v1.2.2...v1.2.3 -[1.2.2]: https://github.com/Automattic/jetpack-licensing/compare/v1.2.1...v1.2.2 -[1.2.1]: https://github.com/Automattic/jetpack-licensing/compare/v1.2.0...v1.2.1 -[1.2.0]: https://github.com/Automattic/jetpack-licensing/compare/v1.1.4...v1.2.0 -[1.1.4]: https://github.com/Automattic/jetpack-licensing/compare/v1.1.3...v1.1.4 -[1.1.3]: https://github.com/Automattic/jetpack-licensing/compare/v1.1.2...v1.1.3 -[1.1.2]: https://github.com/Automattic/jetpack-licensing/compare/v1.1.1...v1.1.2 -[1.1.1]: https://github.com/Automattic/jetpack-licensing/compare/v1.1.0...v1.1.1 -[1.1.0]: https://github.com/Automattic/jetpack-licensing/compare/v1.0.0...v1.1.0 diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-licensing/LICENSE.txt b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-licensing/LICENSE.txt deleted file mode 100644 index e82774c1..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-licensing/LICENSE.txt +++ /dev/null @@ -1,357 +0,0 @@ -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - - -=================================== - - -GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - -Copyright (C) 1989, 1991 Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -Everyone is permitted to copy and distribute verbatim copies -of this license document, but changing it is not allowed. - - Preamble - -The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Lesser General Public License instead.) You can apply it to -your programs, too. - -When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - -To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - -For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - -We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - -Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - -Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - -The precise terms and conditions for copying, distribution and -modification follow. - -GNU GENERAL PUBLIC LICENSE -TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - -0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - -1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - -2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - -a) You must cause the modified files to carry prominent notices -stating that you changed the files and the date of any change. - -b) You must cause any work that you distribute or publish, that in -whole or in part contains or is derived from the Program or any -part thereof, to be licensed as a whole at no charge to all third -parties under the terms of this License. - -c) If the modified program normally reads commands interactively -when run, you must cause it, when started running for such -interactive use in the most ordinary way, to print or display an -announcement including an appropriate copyright notice and a -notice that there is no warranty (or else, saying that you provide -a warranty) and that users may redistribute the program under -these conditions, and telling the user how to view a copy of this -License. (Exception: if the Program itself is interactive but -does not normally print such an announcement, your work based on -the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - -3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - -a) Accompany it with the complete corresponding machine-readable -source code, which must be distributed under the terms of Sections -1 and 2 above on a medium customarily used for software interchange; or, - -b) Accompany it with a written offer, valid for at least three -years, to give any third party, for a charge no more than your -cost of physically performing source distribution, a complete -machine-readable copy of the corresponding source code, to be -distributed under the terms of Sections 1 and 2 above on a medium -customarily used for software interchange; or, - -c) Accompany it with the information you received as to the offer -to distribute corresponding source code. (This alternative is -allowed only for noncommercial distribution and only if you -received the program in object code or executable form with such -an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - -4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - -5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - -6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - -7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - -8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - -9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - -10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - -11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - -12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - -How to Apply These Terms to Your New Programs - -If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - -To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - -Copyright (C) - -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along -with this program; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - -Gnomovision version 69, Copyright (C) year name of author -Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. -This is free software, and you are welcome to redistribute it -under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - -Yoyodyne, Inc., hereby disclaims all copyright interest in the program -`Gnomovision' (which makes passes at compilers) written by James Hacker. - -, 1 April 1989 -Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-licensing/SECURITY.md b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-licensing/SECURITY.md deleted file mode 100644 index 98f48dd1..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-licensing/SECURITY.md +++ /dev/null @@ -1,47 +0,0 @@ -# Security Policy - -Full details of the Automattic Security Policy can be found on [automattic.com](https://automattic.com/security/). - -## Supported Versions - -Generally, only the latest version of Jetpack and its associated plugins have continued support. If a critical vulnerability is found in the current version of a plugin, we may opt to backport any patches to previous versions. - -## Reporting a Vulnerability - -Our HackerOne program covers the below plugin software, as well as a variety of related projects and infrastructure: - -* [Jetpack](https://jetpack.com/) -* Jetpack Backup -* Jetpack Boost -* Jetpack CRM -* Jetpack Protect -* Jetpack Search -* Jetpack Social -* Jetpack VideoPress - -**For responsible disclosure of security issues and to be eligible for our bug bounty program, please submit your report via the [HackerOne](https://hackerone.com/automattic) portal.** - -Our most critical targets are: - -* Jetpack and the Jetpack composer packages (all within this repo) -* Jetpack.com -- the primary marketing site. -* cloud.jetpack.com -- a management site. -* wordpress.com -- the shared management site for both Jetpack and WordPress.com sites. - -For more targets, see the `In Scope` section on [HackerOne](https://hackerone.com/automattic). - -_Please note that the **WordPress software is a separate entity** from Automattic. Please report vulnerabilities for WordPress through [the WordPress Foundation's HackerOne page](https://hackerone.com/wordpress)._ - -## Guidelines - -We're committed to working with security researchers to resolve the vulnerabilities they discover. You can help us by following these guidelines: - -* Follow [HackerOne's disclosure guidelines](https://www.hackerone.com/disclosure-guidelines). -* Pen-testing Production: - * Please **setup a local environment** instead whenever possible. Most of our code is open source (see above). - * If that's not possible, **limit any data access/modification** to the bare minimum necessary to reproduce a PoC. - * **_Don't_ automate form submissions!** That's very annoying for us, because it adds extra work for the volunteers who manage those systems, and reduces the signal/noise ratio in our communication channels. - * To be eligible for a bounty, all of these guidelines must be followed. -* Be Patient - Give us a reasonable time to correct the issue before you disclose the vulnerability. - -We also expect you to comply with all applicable laws. You're responsible to pay any taxes associated with your bounties. diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-licensing/composer.json b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-licensing/composer.json deleted file mode 100644 index 353c53d9..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-licensing/composer.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "name": "automattic/jetpack-licensing", - "description": "Everything needed to manage Jetpack licenses client-side.", - "type": "jetpack-library", - "license": "GPL-2.0-or-later", - "require": { - "php": ">=7.0", - "automattic/jetpack-connection": "^2.4.1" - }, - "require-dev": { - "automattic/wordbless": "@dev", - "yoast/phpunit-polyfills": "1.1.0", - "automattic/jetpack-changelogger": "^4.1.1" - }, - "suggest": { - "automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package." - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "scripts": { - "phpunit": [ - "./vendor/phpunit/phpunit/phpunit --colors=always" - ], - "post-install-cmd": "WorDBless\\Composer\\InstallDropin::copy", - "post-update-cmd": "WorDBless\\Composer\\InstallDropin::copy", - "test-php": [ - "@composer phpunit" - ] - }, - "minimum-stability": "dev", - "prefer-stable": true, - "extra": { - "autotagger": true, - "mirror-repo": "Automattic/jetpack-licensing", - "textdomain": "jetpack-licensing", - "changelogger": { - "link-template": "https://github.com/Automattic/jetpack-licensing/compare/v${old}...v${new}" - }, - "branch-alias": { - "dev-trunk": "2.0.x-dev" - } - }, - "config": { - "allow-plugins": { - "roots/wordpress-core-installer": true - } - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-licensing/src/class-endpoints.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-licensing/src/class-endpoints.php deleted file mode 100644 index 39e40d23..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-licensing/src/class-endpoints.php +++ /dev/null @@ -1,447 +0,0 @@ - \WP_REST_Server::READABLE, - 'callback' => __CLASS__ . '::get_licensing_error', - 'permission_callback' => __CLASS__ . '::can_manage_options_check', - ), - array( - 'methods' => \WP_REST_Server::EDITABLE, - 'callback' => __CLASS__ . '::update_licensing_error', - 'permission_callback' => __CLASS__ . '::can_manage_options_check', - 'args' => array( - 'error' => array( - 'required' => true, - 'type' => 'string', - 'validate_callback' => __CLASS__ . '::validate_string', - 'sanitize_callback' => 'sanitize_text_field', - ), - ), - ), - ) - ); - - /** - * Sets a license. This is still used as part of the first pass at licensing done for partners. - * - * See https://github.com/Automattic/jetpack/pull/23687 for more details. - */ - register_rest_route( - 'jetpack/v4', - '/licensing/set-license', - array( - 'methods' => \WP_REST_Server::EDITABLE, - 'callback' => __CLASS__ . '::set_jetpack_license', - 'permission_callback' => __CLASS__ . '::set_jetpack_license_key_permission_check', - 'args' => array( - 'license' => array( - 'required' => true, - 'type' => 'string', - 'validate_callback' => __CLASS__ . '::validate_string', - 'sanitize_callback' => 'sanitize_text_field', - ), - ), - ) - ); - - /** - * Get Jetpack user licenses. - */ - register_rest_route( - 'jetpack/v4', - 'licensing/user/licenses', - array( - 'methods' => \WP_REST_Server::READABLE, - 'callback' => __CLASS__ . '::get_user_licenses', - 'permission_callback' => __CLASS__ . '::user_licensing_permission_check', - ) - ); - - /** - * Get Jetpack user license counts. - */ - register_rest_route( - 'jetpack/v4', - 'licensing/user/counts', - array( - 'methods' => \WP_REST_Server::READABLE, - 'callback' => __CLASS__ . '::get_user_license_counts', - 'permission_callback' => __CLASS__ . '::user_licensing_permission_check', - ) - ); - - /** - * Update user-licensing activation notice dismiss info. - */ - register_rest_route( - 'jetpack/v4', - 'licensing/user/activation-notice-dismiss', - array( - 'methods' => \WP_REST_Server::EDITABLE, - 'callback' => __CLASS__ . '::update_licensing_activation_notice_dismiss', - 'permission_callback' => __CLASS__ . '::user_licensing_permission_check', - 'args' => array( - 'last_detached_count' => array( - 'required' => true, - 'type' => 'integer', - 'validate_callback' => __CLASS__ . '::validate_non_neg_int', - ), - ), - ) - ); - - /** - * Attach licenses to user account - */ - register_rest_route( - 'jetpack/v4', - '/licensing/attach-licenses', - array( - 'methods' => \WP_REST_Server::EDITABLE, - 'callback' => __CLASS__ . '::attach_jetpack_licenses', - 'permission_callback' => __CLASS__ . '::user_licensing_permission_check', - 'args' => array( - 'licenses' => array( - 'required' => true, - 'type' => 'array', - 'items' => array( - 'type' => 'string', - ), - ), - ), - ) - ); - } - - /** - * Verify that the user can set a Jetpack license key - * - * @since 1.7.0 - * - * @since-jetpack 9.5.0 - * - * @return bool|WP_Error True if user is able to set a Jetpack license key - */ - public static function set_jetpack_license_key_permission_check() { - if ( Licensing::instance()->is_licensing_input_enabled() ) { - return true; - } - - return new WP_Error( 'invalid_user_permission_set_jetpack_license_key', self::$user_permissions_error_msg, array( 'status' => rest_authorization_required_code() ) ); - } - - /** - * Verify that user can view and update user-licensing data. - * - * @since 1.7.0 - * - * @return bool Whether the user is currently connected and they are the connection owner. - */ - public static function user_licensing_permission_check() { - $connection_manager = new Connection_Manager( 'jetpack' ); - - if ( $connection_manager->is_user_connected() && $connection_manager->is_connection_owner() ) { - return true; - } - - return new WP_Error( 'invalid_permission_manage_user_licenses', self::$user_permissions_error_msg, array( 'status' => rest_authorization_required_code() ) ); - } - - /** - * Verify that user can manage_options - * - * @since 1.7.0 - * - * @return bool Whether user has the capability 'manage_options'. - */ - public static function can_manage_options_check() { - if ( current_user_can( 'manage_options' ) ) { - return true; - } - - return new WP_Error( 'invalid_user_permission_view_admin', self::$user_permissions_error_msg, array( 'status' => rest_authorization_required_code() ) ); - } - - /** - * Validates that the parameter is a string. - * - * @since 1.7.0 - * - * @since-jetpack 4.3.0 - * - * @param string $value Value to check. - * @param WP_REST_Request $request The request sent to the WP REST API. - * @param string $param Name of the parameter passed to endpoint holding $value. - * - * @return bool|WP_Error - */ - public static function validate_string( $value, $request, $param ) { - if ( ! is_string( $value ) ) { - /* translators: %s: The literal parameter name. Should not be translated. */ - return new WP_Error( 'invalid_param', sprintf( esc_html__( '%s must be a string.', 'jetpack-licensing' ), $param ) ); - } - return true; - } - - /** - * Validates that the parameter is a non-negative integer (includes 0). - * - * @since 1.7.0 - * - * @since-jetpack 10.4.0 - * - * @param int $value Value to check. - * @param WP_REST_Request $request The request sent to the WP REST API. - * @param string $param Name of the parameter passed to endpoint holding $value. - * - * @return bool|WP_Error - */ - public static function validate_non_neg_int( $value, $request, $param ) { - if ( ! is_numeric( $value ) || $value < 0 ) { - return new WP_Error( - 'invalid_param', - /* translators: %s: The literal parameter name. Should not be translated. */ - sprintf( esc_html__( '%s must be a non-negative integer.', 'jetpack-licensing' ), $param ) - ); - } - return true; - } - - /** - * Update the last licensing error message. - * - * @since 1.7.0 - * - * @since-jetpack 9.0.0 - * - * @param WP_REST_Request $request The request. - * - * @return bool true. - */ - public static function update_licensing_error( $request ) { - Licensing::instance()->log_error( $request['error'] ); - - return true; - } - - /** - * Get the last licensing error message, if any. - * - * @since 1.7.0 - * - * @since-jetpack 9.0.0 - * - * @return string Licensing error message or empty string. - */ - public static function get_licensing_error() { - return Licensing::instance()->last_error(); - } - - /** - * Set a Jetpack license - * - * @since 1.7.0 - * - * @since-jetpack 9.6.0 - * - * @param WP_REST_Request $request The request. - * - * @return WP_REST_Response|WP_Error A response object if the option was successfully updated, or a WP_Error if it failed. - */ - public static function set_jetpack_license( $request ) { - $license = trim( sanitize_text_field( $request['license'] ) ); - - if ( Licensing::instance()->append_license( $license ) ) { - return rest_ensure_response( array( 'code' => 'success' ) ); - } - - return new WP_Error( - 'setting_license_key_failed', - esc_html__( 'Could not set this license key. Please try again.', 'jetpack-licensing' ), - array( 'status' => 500 ) - ); - } - - /** - * Gets the users licenses. - * - * @since 1.7.0 - * - * @since-jetpack 10.4.0 - * - * @return string|WP_Error A JSON object of user licenses if the request was successful, or a WP_Error otherwise. - */ - public static function get_user_licenses() { - $wpcom_request = Client::wpcom_json_api_request_as_user( - '/jetpack-licensing/user/licenses', - '2', - array( - 'method' => 'GET', - 'headers' => array( - 'Content-Type' => 'application/json', - 'X-Forwarded-For' => ( new Visitor() )->get_ip( true ), - ), - ) - ); - - $response_code = wp_remote_retrieve_response_code( $wpcom_request ); - if ( 200 === $response_code ) { - $licenses = json_decode( wp_remote_retrieve_body( $wpcom_request ) ); - return $licenses; - } else { - return new WP_Error( - 'failed_to_fetch_data', - esc_html__( 'Unable to fetch the requested data.', 'jetpack-licensing' ), - array( 'status' => $response_code ) - ); - } - } - - /** - * Gets the users licenses counts. - * - * @since 1.7.0 - * - * @since-jetpack 10.4.0 - * - * @return string|WP_Error A JSON object of user license counts if the request was successful, or a WP_Error otherwise. - */ - public static function get_user_license_counts() { - $wpcom_request = Client::wpcom_json_api_request_as_user( - '/jetpack-licensing/user/licenses/counts', - '2', - array( - 'method' => 'GET', - 'headers' => array( - 'Content-Type' => 'application/json', - 'X-Forwarded-For' => ( new Visitor() )->get_ip( true ), - ), - ) - ); - - $response_code = wp_remote_retrieve_response_code( $wpcom_request ); - if ( 200 === $response_code ) { - $license_counts = json_decode( wp_remote_retrieve_body( $wpcom_request ) ); - return $license_counts; - } else { - return new WP_Error( - 'failed_to_fetch_data', - esc_html__( 'Unable to fetch the requested data.', 'jetpack-licensing' ), - array( 'status' => $response_code ) - ); - } - } - - /** - * Update the user-licenses activation notice dismissal data. - * - * @since 1.7.0 - * - * @since-jetpack 10.4.0 - * - * @param WP_REST_Request $request The request sent to the WP REST API. - * - * @return array|WP_Error - */ - public static function update_licensing_activation_notice_dismiss( $request ) { - - if ( ! isset( $request['last_detached_count'] ) ) { - return new WP_Error( 'invalid_param', esc_html__( 'Missing parameter "last_detached_count".', 'jetpack-licensing' ), array( 'status' => 404 ) ); - } - - $default = array( - 'last_detached_count' => null, - 'last_dismissed_time' => null, - ); - $last_detached_count = ( '' === $request['last_detached_count'] ) - ? $default['last_detached_count'] - : $request['last_detached_count']; - $last_dismissed_time = ( '' === $request['last_detached_count'] ) - ? $default['last_dismissed_time'] - // Use UTC timezone and convert to ISO8601 format(DateTime::W3C) for best compatibility with JavaScript Date in all browsers. - : ( new \DateTime( 'NOW', new \DateTimeZone( 'UTC' ) ) )->format( \DateTime::W3C ); - - $notice_data = array( - 'last_detached_count' => $last_detached_count, - 'last_dismissed_time' => $last_dismissed_time, - ); - - Jetpack_Options::update_option( 'licensing_activation_notice_dismiss', $notice_data, true ); - return rest_ensure_response( $notice_data ); - } - - /** - * Attach Jetpack licenses - * - * @since 1.7.0 - * - * @since-jetpack 10.4.0 - * - * @param WP_REST_Request $request The request. - * - * @return WP_REST_Response|WP_Error A response object - */ - public static function attach_jetpack_licenses( $request ) { - $licenses = array_map( - function ( $license ) { - return trim( sanitize_text_field( $license ) ); - }, - $request['licenses'] - ); - return rest_ensure_response( Licensing::instance()->attach_licenses( $licenses ) ); - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-licensing/src/class-licensing.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-licensing/src/class-licensing.php deleted file mode 100644 index 13982d71..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-licensing/src/class-licensing.php +++ /dev/null @@ -1,359 +0,0 @@ -register_endpoints(); - } - - /** - * Get Jetpack connection manager instance. - * - * @return Connection_Manager - */ - protected function connection() { - static $connection; - - if ( null === $connection ) { - $connection = new Connection_Manager(); - } - - return $connection; - } - - /** - * Get the last license attach request error that has occurred, if any. - * - * @return string Human-readable error message or an empty string. - */ - public function last_error() { - return Jetpack_Options::get_option( 'licensing_error', '' ); - } - - /** - * Log an error to be surfaced to the user at a later time. - * - * @param string $error Human-readable error message. - * @return void - */ - public function log_error( $error ) { - $substr = function_exists( 'mb_substr' ) ? 'mb_substr' : 'substr'; - Jetpack_Options::update_option( 'licensing_error', $substr( $error, 0, 1024 ) ); - } - - /** - * Get all stored licenses. - * - * @return string[] License keys. - */ - public function stored_licenses() { - $licenses = (array) get_option( self::LICENSES_OPTION_NAME, array() ); - $licenses = array_filter( $licenses, 'is_scalar' ); - $licenses = array_map( 'strval', $licenses ); - $licenses = array_filter( $licenses ); - - return $licenses; - } - - /** - * Append a license - * - * @param string $license A jetpack license key. - * @return bool True if the option was updated with the new license, false otherwise. - */ - public function append_license( $license ) { - $licenses = $this->stored_licenses(); - - array_push( $licenses, $license ); - - return update_option( self::LICENSES_OPTION_NAME, $licenses ); - } - - /** - * Make an authenticated WP.com XMLRPC multicall request to attach the provided license keys. - * - * @param string[] $licenses License keys to attach. - * @return Jetpack_IXR_ClientMulticall - */ - protected function attach_licenses_request( array $licenses ) { - $xml = new Jetpack_IXR_ClientMulticall( array( 'timeout' => 30 ) ); - - foreach ( $licenses as $license ) { - $xml->addCall( 'jetpack.attachLicense', $license ); - } - - $xml->query(); - - return $xml; - } - - /** - * Attach the given licenses. - * - * @param string[] $licenses Licenses to attach. - * @return array|WP_Error Results for each license (which may include WP_Error instances) or a WP_Error instance. - */ - public function attach_licenses( array $licenses ) { - if ( ! $this->connection()->has_connected_owner() ) { - return new WP_Error( 'not_connected', __( 'Jetpack doesn\'t have a connected owner.', 'jetpack-licensing' ) ); - } - - if ( empty( $licenses ) ) { - return array(); - } - - $xml = $this->attach_licenses_request( $licenses ); - - if ( $xml->isError() ) { - $error = new WP_Error( 'request_failed', __( 'License attach request failed.', 'jetpack-licensing' ) ); - $error->add( $xml->getErrorCode(), $xml->getErrorMessage() ); - return $error; - } - - $results = array_map( - function ( $response ) { - if ( isset( $response['faultCode'] ) || isset( $response['faultString'] ) ) { - return new WP_Error( $response['faultCode'], $response['faultString'] ); - } - - return $response; - }, - (array) $xml->getResponse() - ); - - return $results; - } - - /** - * Attach all stored licenses. - * - * @return array|WP_Error Results for each license (which may include WP_Error instances) or a WP_Error instance. - */ - public function attach_stored_licenses() { - $licenses = $this->stored_licenses(); - $results = $this->attach_licenses( $licenses ); - - if ( is_wp_error( $results ) ) { - if ( 'request_failed' === $results->get_error_code() ) { - $this->log_error( - __( 'Failed to attach your Jetpack license(s). Please try reconnecting Jetpack.', 'jetpack-licensing' ) - ); - } - - return $results; - } - - $failed = array(); - - foreach ( $results as $index => $result ) { - if ( isset( $licenses[ $index ] ) && is_wp_error( $result ) ) { - $failed[] = $licenses[ $index ]; - } - } - - if ( ! empty( $failed ) ) { - $this->log_error( - sprintf( - /* translators: %s is a comma-separated list of license keys. */ - __( 'The following Jetpack licenses are invalid, already in use, or revoked: %s', 'jetpack-licensing' ), - implode( ', ', $failed ) - ) - ); - } - - return $results; - } - - /** - * Attach all stored licenses during connection flow for the connection owner. - * - * @return void - */ - public function attach_stored_licenses_on_connection() { - if ( $this->connection()->is_connection_owner() ) { - $this->attach_stored_licenses(); - } - } - - /** - * Is the current user allowed to use the Licensing Input UI? - * - * @since 1.4.0 - * @return bool - */ - public static function is_licensing_input_enabled() { - /** - * Filter that checks if the user is allowed to see the Licensing UI. `true` enables it. - * - * @since 1.4.0 - * - * @param bool False by default. - */ - return apply_filters( 'jetpack_licensing_ui_enabled', false ) && current_user_can( 'jetpack_connect_user' ); - } - - /** - * Gets the user-licensing activation notice dismissal info. - * - * @since 10.4.0 - * @return array - */ - public function get_license_activation_notice_dismiss() { - - $default = array( - 'last_detached_count' => null, - 'last_dismissed_time' => null, - ); - - if ( $this->connection()->is_user_connected() && $this->connection()->is_connection_owner() ) { - return Jetpack_Options::get_option( 'licensing_activation_notice_dismiss', $default ); - } - - return $default; - } - - /** - * Load current user's licenses. - * - * @param bool $unattached_only Only return unattached licenses. - * - * @return array - */ - public function get_user_licenses( $unattached_only = false ) { - $licenses = Endpoints::get_user_licenses(); - - if ( empty( $licenses->items ) ) { - return array(); - } - - $items = $licenses->items; - - if ( $unattached_only ) { - $items = array_filter( - $items, - static function ( $item ) { - return $item->attached_at === null; - } - ); - } - - return $items; - } - - /** - * If the destination URL is checkout page, - * see if there are unattached licenses they could use instead of getting a new one. - * If found, redirect the user to license activation. - * - * @param string $dest_url User's destination URL. - * - * @return void - */ - public function handle_user_connected_redirect( $dest_url ) { - if ( ! preg_match( '#^https://[^/]+/checkout/#i', $dest_url ) ) { - return; - } - - $licenses = $this->get_user_licenses( true ); - $plugin_slug = null; - - $query_string = wp_parse_url( $dest_url, PHP_URL_QUERY ); - if ( $query_string ) { - parse_str( $query_string, $query_args ); - - if ( $query_args['redirect_to'] - && preg_match( '/^admin\.php\?page=(jetpack-\w+)/i', $query_args['redirect_to'], $matches ) - ) { - $plugin_slug = $matches[1]; - } - } - - /** - * Check for the user's unattached licenses. - * - * @since 3.8.2 - * - * @param bool $has_license Whether a license was already found. - * @param array $licenses Unattached licenses belonging to the user. - * @param string $plugin_slug Slug of the plugin that initiated the flow. - */ - if ( $plugin_slug && count( $licenses ) - && apply_filters( 'jetpack_connection_user_has_license', false, $licenses, $plugin_slug ) - ) { - wp_safe_redirect( '/wp-admin/admin.php?page=my-jetpack#/add-license' ); - exit; - } - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-logo/CHANGELOG.md b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-logo/CHANGELOG.md deleted file mode 100644 index 01ee2d3d..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-logo/CHANGELOG.md +++ /dev/null @@ -1,213 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file. - -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) -and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - -## [2.0.2] - 2024-03-18 -### Changed -- Internal updates. - -## [2.0.1] - 2024-03-12 -### Changed -- Internal updates. - -## [2.0.0] - 2023-11-20 -### Changed -- Updated required PHP version to >= 7.0. [#34192] - -## [1.6.3] - 2023-09-19 - -- Minor internal updates. - -## [1.6.2] - 2023-08-23 -### Changed -- Updated package dependencies. [#32605] - -## [1.6.1] - 2023-04-10 -### Added -- Add Jetpack Autoloader package suggestion. [#29988] - -## [1.6.0] - 2023-04-04 -### Added -- Add new method to get a base64 encoded SVG of the Jetpack logo. [#29418] - -## [1.5.22] - 2023-02-20 -### Changed -- Minor internal updates. - -## [1.5.21] - 2023-01-30 -### Changed -- Updated styles for Just in Time Messages (notices) [#27515] - -## [1.5.20] - 2022-12-02 -### Changed -- Updated package dependencies. [#27688] - -## [1.5.19] - 2022-11-22 -### Changed -- Updated package dependencies. [#27043] - -## [1.5.18] - 2022-11-07 -### Changed -- Updated package dependencies. - -## [1.5.17] - 2022-07-26 -### Changed -- Updated package dependencies. [#25158] - -## [1.5.16] - 2022-06-21 -### Changed -- Renaming master to trunk. [#24661] - -## [1.5.15] - 2022-04-26 -### Changed -- Updated package dependencies. - -## [1.5.14] - 2022-01-25 -### Changed -- Updated package dependencies. - -## [1.5.13] - 2022-01-04 -### Changed -- Switch to pcov for code coverage. -- Updated package dependencies - -## [1.5.12] - 2021-12-14 -### Changed -- Updated package dependencies. - -## [1.5.11] - 2021-11-30 -### Changed -- Colors: update Jetpack Primary color to match latest brand book. - -## [1.5.10] - 2021-11-02 -### Changed -- Set `convertDeprecationsToExceptions` true in PHPUnit config. -- Update PHPUnit configs to include just what needs coverage rather than include everything then try to exclude stuff that doesn't. - -## [1.5.9] - 2021-10-13 -### Changed -- Updated package dependencies. - -## [1.5.8] - 2021-10-07 -### Changed -- Updated package dependencies - -## [1.5.7] - 2021-09-28 -### Changed -- Updated package dependencies. - -## [1.5.6] - 2021-08-30 -### Changed -- Run composer update on test-php command instead of phpunit -- Tests: update PHPUnit polyfills dependency (yoast/phpunit-polyfills). -- update annotations versions - -## [1.5.5] - 2021-05-25 -### Changed -- Updated package dependencies. - -## [1.5.4] - 2021-04-27 -### Changed -- Updated package dependencies. - -## [1.5.3] - 2021-03-30 -### Added -- Composer alias for dev-master, to improve dependencies - -### Changed -- Update package dependencies. - -### Fixed -- Use `composer update` rather than `install` in scripts, as composer.lock isn't checked in. - -## [1.5.2] - 2021-02-05 - -- CI: Make tests more generic - -## [1.5.1] - 2021-01-19 - -- Add mirror-repo information to all current composer packages -- Monorepo: Reorganize all projects - -## [1.5.0] - 2020-12-07 - -- Pin dependencies -- Packages: Update for PHP 8 testing - -## [1.4.0] - 2020-08-13 - -- CI: Try collect js coverage - -## [1.3.0] - 2020-06-22 - -- PHPCS: Clean up the packages -- PHPCS Updates after WPCS 2.3 - -## [1.2.0] - 2020-03-27 - -- Use dynamic Jetpack logos on JITMs - -## [1.1.4] - 2019-11-08 - -- Packages: Use classmap instead of PSR-4 - -## [1.1.2] - 2019-10-28 - -- Packages: Add gitattributes files to all packages that need th… - -## [1.1.1] - 2019-09-20 - -- Docs: Unify usage of @package phpdoc tags - -## [1.1.0] - 2019-06-11 - -- Feature/jetpack packages pt 1. (May 31 - June 6) -- Update/package logo add gray -- Packages: Move JITM tests to package and fix deps -- Update Jetpack to use new JITM package -- Packages: Make logo package tests independent - -## 1.0.0 - 2019-05-29 - -- Packages: Add a basic Jetpack Logo package - -[2.0.2]: https://github.com/Automattic/jetpack-logo/compare/v2.0.1...v2.0.2 -[2.0.1]: https://github.com/Automattic/jetpack-logo/compare/v2.0.0...v2.0.1 -[2.0.0]: https://github.com/Automattic/jetpack-logo/compare/v1.6.3...v2.0.0 -[1.6.3]: https://github.com/Automattic/jetpack-logo/compare/v1.6.2...v1.6.3 -[1.6.2]: https://github.com/Automattic/jetpack-logo/compare/v1.6.1...v1.6.2 -[1.6.1]: https://github.com/Automattic/jetpack-logo/compare/v1.6.0...v1.6.1 -[1.6.0]: https://github.com/Automattic/jetpack-logo/compare/v1.5.22...v1.6.0 -[1.5.22]: https://github.com/Automattic/jetpack-logo/compare/v1.5.21...v1.5.22 -[1.5.21]: https://github.com/Automattic/jetpack-logo/compare/v1.5.20...v1.5.21 -[1.5.20]: https://github.com/Automattic/jetpack-logo/compare/v1.5.19...v1.5.20 -[1.5.19]: https://github.com/Automattic/jetpack-logo/compare/v1.5.18...v1.5.19 -[1.5.18]: https://github.com/Automattic/jetpack-logo/compare/v1.5.17...v1.5.18 -[1.5.17]: https://github.com/Automattic/jetpack-logo/compare/v1.5.16...v1.5.17 -[1.5.16]: https://github.com/Automattic/jetpack-logo/compare/v1.5.15...v1.5.16 -[1.5.15]: https://github.com/Automattic/jetpack-logo/compare/v1.5.14...v1.5.15 -[1.5.14]: https://github.com/Automattic/jetpack-logo/compare/v1.5.13...v1.5.14 -[1.5.13]: https://github.com/Automattic/jetpack-logo/compare/v1.5.12...v1.5.13 -[1.5.12]: https://github.com/Automattic/jetpack-logo/compare/v1.5.11...v1.5.12 -[1.5.11]: https://github.com/Automattic/jetpack-logo/compare/v1.5.10...v1.5.11 -[1.5.10]: https://github.com/Automattic/jetpack-logo/compare/v1.5.9...v1.5.10 -[1.5.9]: https://github.com/Automattic/jetpack-logo/compare/v1.5.8...v1.5.9 -[1.5.8]: https://github.com/Automattic/jetpack-logo/compare/v1.5.7...v1.5.8 -[1.5.7]: https://github.com/Automattic/jetpack-logo/compare/v1.5.6...v1.5.7 -[1.5.6]: https://github.com/Automattic/jetpack-logo/compare/v1.5.5...v1.5.6 -[1.5.5]: https://github.com/Automattic/jetpack-logo/compare/v1.5.4...v1.5.5 -[1.5.4]: https://github.com/Automattic/jetpack-logo/compare/v1.5.3...v1.5.4 -[1.5.3]: https://github.com/Automattic/jetpack-logo/compare/v1.5.2...v1.5.3 -[1.5.2]: https://github.com/Automattic/jetpack-logo/compare/v1.5.1...v1.5.2 -[1.5.1]: https://github.com/Automattic/jetpack-logo/compare/v1.5.0...v1.5.1 -[1.5.0]: https://github.com/Automattic/jetpack-logo/compare/v1.4.0...v1.5.0 -[1.4.0]: https://github.com/Automattic/jetpack-logo/compare/v1.3.0...v1.4.0 -[1.3.0]: https://github.com/Automattic/jetpack-logo/compare/v1.2.0...v1.3.0 -[1.2.0]: https://github.com/Automattic/jetpack-logo/compare/v1.1.4...v1.2.0 -[1.1.4]: https://github.com/Automattic/jetpack-logo/compare/v1.1.2...v1.1.4 -[1.1.2]: https://github.com/Automattic/jetpack-logo/compare/v1.1.1...v1.1.2 -[1.1.1]: https://github.com/Automattic/jetpack-logo/compare/v1.1.0...v1.1.1 -[1.1.0]: https://github.com/Automattic/jetpack-logo/compare/v1.0.0...v1.1.0 diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-logo/LICENSE.txt b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-logo/LICENSE.txt deleted file mode 100644 index e82774c1..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-logo/LICENSE.txt +++ /dev/null @@ -1,357 +0,0 @@ -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - - -=================================== - - -GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - -Copyright (C) 1989, 1991 Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -Everyone is permitted to copy and distribute verbatim copies -of this license document, but changing it is not allowed. - - Preamble - -The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Lesser General Public License instead.) You can apply it to -your programs, too. - -When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - -To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - -For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - -We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - -Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - -Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - -The precise terms and conditions for copying, distribution and -modification follow. - -GNU GENERAL PUBLIC LICENSE -TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - -0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - -1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - -2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - -a) You must cause the modified files to carry prominent notices -stating that you changed the files and the date of any change. - -b) You must cause any work that you distribute or publish, that in -whole or in part contains or is derived from the Program or any -part thereof, to be licensed as a whole at no charge to all third -parties under the terms of this License. - -c) If the modified program normally reads commands interactively -when run, you must cause it, when started running for such -interactive use in the most ordinary way, to print or display an -announcement including an appropriate copyright notice and a -notice that there is no warranty (or else, saying that you provide -a warranty) and that users may redistribute the program under -these conditions, and telling the user how to view a copy of this -License. (Exception: if the Program itself is interactive but -does not normally print such an announcement, your work based on -the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - -3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - -a) Accompany it with the complete corresponding machine-readable -source code, which must be distributed under the terms of Sections -1 and 2 above on a medium customarily used for software interchange; or, - -b) Accompany it with a written offer, valid for at least three -years, to give any third party, for a charge no more than your -cost of physically performing source distribution, a complete -machine-readable copy of the corresponding source code, to be -distributed under the terms of Sections 1 and 2 above on a medium -customarily used for software interchange; or, - -c) Accompany it with the information you received as to the offer -to distribute corresponding source code. (This alternative is -allowed only for noncommercial distribution and only if you -received the program in object code or executable form with such -an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - -4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - -5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - -6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - -7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - -8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - -9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - -10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - -11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - -12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - -How to Apply These Terms to Your New Programs - -If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - -To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - -Copyright (C) - -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along -with this program; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - -Gnomovision version 69, Copyright (C) year name of author -Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. -This is free software, and you are welcome to redistribute it -under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - -Yoyodyne, Inc., hereby disclaims all copyright interest in the program -`Gnomovision' (which makes passes at compilers) written by James Hacker. - -, 1 April 1989 -Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-logo/SECURITY.md b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-logo/SECURITY.md deleted file mode 100644 index 98f48dd1..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-logo/SECURITY.md +++ /dev/null @@ -1,47 +0,0 @@ -# Security Policy - -Full details of the Automattic Security Policy can be found on [automattic.com](https://automattic.com/security/). - -## Supported Versions - -Generally, only the latest version of Jetpack and its associated plugins have continued support. If a critical vulnerability is found in the current version of a plugin, we may opt to backport any patches to previous versions. - -## Reporting a Vulnerability - -Our HackerOne program covers the below plugin software, as well as a variety of related projects and infrastructure: - -* [Jetpack](https://jetpack.com/) -* Jetpack Backup -* Jetpack Boost -* Jetpack CRM -* Jetpack Protect -* Jetpack Search -* Jetpack Social -* Jetpack VideoPress - -**For responsible disclosure of security issues and to be eligible for our bug bounty program, please submit your report via the [HackerOne](https://hackerone.com/automattic) portal.** - -Our most critical targets are: - -* Jetpack and the Jetpack composer packages (all within this repo) -* Jetpack.com -- the primary marketing site. -* cloud.jetpack.com -- a management site. -* wordpress.com -- the shared management site for both Jetpack and WordPress.com sites. - -For more targets, see the `In Scope` section on [HackerOne](https://hackerone.com/automattic). - -_Please note that the **WordPress software is a separate entity** from Automattic. Please report vulnerabilities for WordPress through [the WordPress Foundation's HackerOne page](https://hackerone.com/wordpress)._ - -## Guidelines - -We're committed to working with security researchers to resolve the vulnerabilities they discover. You can help us by following these guidelines: - -* Follow [HackerOne's disclosure guidelines](https://www.hackerone.com/disclosure-guidelines). -* Pen-testing Production: - * Please **setup a local environment** instead whenever possible. Most of our code is open source (see above). - * If that's not possible, **limit any data access/modification** to the bare minimum necessary to reproduce a PoC. - * **_Don't_ automate form submissions!** That's very annoying for us, because it adds extra work for the volunteers who manage those systems, and reduces the signal/noise ratio in our communication channels. - * To be eligible for a bounty, all of these guidelines must be followed. -* Be Patient - Give us a reasonable time to correct the issue before you disclose the vulnerability. - -We also expect you to comply with all applicable laws. You're responsible to pay any taxes associated with your bounties. diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-logo/composer.json b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-logo/composer.json deleted file mode 100644 index 7cefccaa..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-logo/composer.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "name": "automattic/jetpack-logo", - "description": "A logo for Jetpack", - "type": "jetpack-library", - "license": "GPL-2.0-or-later", - "require": { - "php": ">=7.0" - }, - "require-dev": { - "yoast/phpunit-polyfills": "1.1.0", - "automattic/jetpack-changelogger": "^4.1.2" - }, - "suggest": { - "automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package." - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "scripts": { - "phpunit": [ - "./vendor/phpunit/phpunit/phpunit --colors=always" - ], - "test-php": [ - "@composer phpunit" - ] - }, - "minimum-stability": "dev", - "prefer-stable": true, - "extra": { - "autotagger": true, - "mirror-repo": "Automattic/jetpack-logo", - "changelogger": { - "link-template": "https://github.com/Automattic/jetpack-logo/compare/v${old}...v${new}" - }, - "branch-alias": { - "dev-trunk": "2.0.x-dev" - } - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-logo/src/class-logo.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-logo/src/class-logo.php deleted file mode 100644 index 05622de3..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-logo/src/class-logo.php +++ /dev/null @@ -1,122 +0,0 @@ - tag. - * - jetpack-logo__icon-circle: the circle of the Jetpack mark. - * - jetpack-logo__icon-triangle: two shapes that correspond to each triangle in the Jetpack mark. - * - jetpack-logo__icon-text: the Jetpack lettering. - * - * @var string - */ -const JETPACK_LOGO_SVG = <<<'EOSVG' - -EOSVG; - -/** - * Create and render a Jetpack logo. - */ -class Logo { - - /** - * Return the Jetpack logo. - * - * @return string The Jetpack logo. - */ - public function render() { - return JETPACK_LOGO_SVG; - } - - /** - * Return string containing the Jetpack logo. - * - * @since 1.1.4 - * @since-jetpack 7.5.0 - * - * @param bool $logotype Should we use the full logotype (logo + text). Default to false. - * - * @return string - */ - public function get_jp_emblem( $logotype = false ) { - $logo_text = $this->get_jp_logo_parts(); - return sprintf( - '%2$s', - ( true === $logotype ? '118' : '32' ), - ( true === $logotype ? $logo_text['logo'] . $logo_text['text'] : $logo_text['logo'] ) - ); - } - - /** - * Return string containing the Jetpack logo in a slightly larger format than get_jp_emblem(). - * - * @since 1.1.4 - * @param bool $logotype Should we use the full logotype (logo + text). Default to false. - * @return string - */ - public function get_jp_emblem_larger( $logotype = false ) { - $logo_text = $this->get_jp_logo_parts(); - return sprintf( - '', - ( true === $logotype ? '118' : '32' ), - ( true === $logotype ? $logo_text['logo'] . $logo_text['text'] : $logo_text['logo'] ) - ); - } - - /** - * Return array containing the Jetpack logo and text - * - * @since 1.6.0 - Added $color parameter. - * - * @param string $color The color of the logo. - * - * @return array - */ - private function get_jp_logo_parts( $color = '#069e08' ) { - return array( - 'logo' => '', - 'text' => ' - - - - - - ', - ); - } - - /** - * Return a base64 encoded SVG of the Jetpack logo. - * Can be used as a data URI to use the logo inline in CSS. - * - * @since 1.6.0 - * - * @param string $color The color of the logo. - * - * @return string - */ - public function get_base64_logo( $color = '#ffffff' ) { - $logo_text = $this->get_jp_logo_parts( $color ); - $base_logo = sprintf( - '%1$s', - $logo_text['logo'] - ); - $encoded_logo = base64_encode( $base_logo ); // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.obfuscation_base64_encode -- The encoded version is used as data URI to use the logo in CSS. - - return 'data:image/svg+xml;base64,' . $encoded_logo; - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/CHANGELOG.md b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/CHANGELOG.md deleted file mode 100644 index 4af55f49..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/CHANGELOG.md +++ /dev/null @@ -1,1514 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file. - -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) -and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - -## [4.17.0] - 2024-03-14 -### Changed -- Rewrite My Jetpack hooks to Typescript [#36288] - -## [4.16.0] - 2024-03-12 -### Added -- Add a red bubble notification that shows if the site is disconnected [#36263] -- Add README to data directory [#36301] -- Add whitelist to show errors only for certain queries [#36261] - -### Changed -- Migrate Stats counts out of redux and into tanstack queries [#36195] -- Replace window state calls with util function [#36271] -- Rewrite My Jetpack utils to typescript [#36296] -- Show small stats card in table if large stats card isn't showing [#36136] -- Updated package dependencies. [#36325] -- Update query hooks for my-jetpack data" [#36257] -- Update useMyJetpackConnection hook to TypeScript [#36300] - -### Removed -- Removing redux store [#36256] - -## [4.15.0] - 2024-03-07 -### Added -- Refactor My Jetpack's backup related redux state to react query. [#35982] - -### Changed -- Migrate dismiss welcome banner to tanstack [#36199] -- Migrate global notices to context [#36201] -- Migrate My Jetpack's licenses query and state to react-query [#36029] -- Moved lifecycle stats function out of redux [#36205] -- Updating purchase related redux data to tanstack/react [#35994] - -### Removed -- Connected Product offer is not being used, removing it to clean up a bit [#36203] - -### Fixed -- fix a few My Jetpack bugs when main plugin is not installed [#36139] -- Intersitital tables were not visibly loading when pressed [#36236] - -## [4.14.0] - 2024-03-04 -### Changed -- Migrate My Jetpack zendesk state to react-query [#36028] -- Updated package dependencies. - -### Fixed -- Add registration nonce to connect screen in My Jetpack [#36133] - -## [4.13.0] - 2024-03-01 -### Added -- Add site lifecycle status guess to My Jetpack [#35815] - -### Changed -- Changed product plan checks on My Jetpack cards [#36046] -- Display different Boost card tooltip content based on score letter grade. [#35863] -- Improve consistency and fix bugs in product start and checkout flows [#35908] -- Instanciate the Boost Score API (new Speed_Score()) in My Jetpack. [#36080] -- My Jetpack: add Tracks events to connection section [#35804] -- Refactor react-query to reduce code repetition [#35990] - -### Fixed -- fixed the purchase query for the boost card [#36004] - -## [4.12.1] - 2024-02-27 -### Added -- My Jetpack: Add an info popover in the Boost product card. [#35731] - -## [4.12.0] - 2024-02-26 -### Changed -- My Jetpack: decouple Jetpack AI insterstitial component [#35836] -- Remove translation of product names [#35830] -- Updating purchases state to use data query instead of redux [#35697] - -### Removed -- Remove kebab menu on My Jetpack cards [#35829] - -## [4.11.0] - 2024-02-22 -### Added -- Adding accesible text for external links on connection page and footer [#35733] - -### Changed -- change status and action of My Jetpack cards when plugin is missing [#35718] -- ESlint: disabled redundant role rule [#35800] -- My Jetpack: add product slugs to click events on interstitials [#35740] -- My Jetpack: let tier data pass on quantity data to checkout process for proper checkout URL crafting [#35817] -- Updated package dependencies. [#35793] - -### Fixed -- Backup Card: made stats readable by screen readers [#35786] -- Connection Screen: make VoiceOver announce lists as such [#35736] -- Do not initialize My Jetpack when in Offline mode. [#35807] -- Fix wrong prop type passed to ConnectedProductCard [#35789] - -## [4.10.0] - 2024-02-19 -### Added -- Add Boost Speed Score into My Jetpack Boost product card [#35606] -- Add connection indicator for screen readers [#35714] - -### Fixed -- Improved accessibility of Dismiss button in Connection Banner [#35694] -- My Jeptack Connection: Make footer logos a list for better screen readers interpretation. [#35667] -- My Jetpack: add label for screen readers to connect page close button [#35712] - -## [4.9.2] - 2024-02-13 -### Changed -- My Jetpack: various improvements to the Stats card. [#35355] -- Updated package dependencies. [#35608] - -## [4.9.1] - 2024-02-12 -### Added -- Add My Jetpack link to standalone plugins missing it [#35523] - -## [4.9.0] - 2024-02-07 -### Changed -- Add pricing info for AI and CRM on My Jetpack [#35457] -- Update the description of some cards to better describe the product on My Jetpack page [#35428] - -### Fixed -- Fixes issue on My Jetpack interstitials where some prices are 1 cent off [#35492] - -## [4.8.0] - 2024-02-05 -### Added -- Add tracking info to the Jetpack Manage Banner CTA [#35378] -- My Jetpack: support redirect_to parameter on the product interstitial. [#35263] - -### Changed -- Update CTA copy on the connection banner to make it clear which type of connection we are going to request [#35401] -- Updated package dependencies. -- Update product cards on My Jetpack to always display the status indidicator. [#35377] - -### Fixed -- Fix issue where most products are not installing their standalone product upon purchase [#35399] - -## [4.7.0] - 2024-01-29 -### Changed -- Update the UpsellBanner to use the Card component from WP components. [#35223] - -### Removed -- UpsellBanner component moved to js-packages/components [#35228] - -## [4.6.2] - 2024-01-22 -### Added -- My Jetpack: add contact us event for Jetpack AI [#35136] - -## [4.6.1] - 2024-01-22 -### Changed -- Display Jetpack Protect product card for all users. [#35142] -- Ensure that interstitial tables go straight to checkout just like insterstitial cards [#35049] - -## [4.6.0] - 2024-01-18 -### Added -- Add hosting provider check. [#34864] -- Add Jetpack Manage banner. [#35078] - -## [4.5.0] - 2024-01-18 -### Changed -- Use blog ID instead of site slug in checkout URL. [#34976] - -## [4.4.0] - 2024-01-15 -### Changed -- add plan check to My Jetpack Akismet product card [#34905] -- Prevent new users from seeing JITMs [#34927] -- To avoid displaying the Welcome banner to every user, now we only display it to new users. [#34883] - -## [4.3.0] - 2024-01-08 -### Added -- Add a check to determine if a user is "new" to Jetpack. [#34821] -- Add a button that links to the connection screen to the Welcome Banner in My Jetpack. [#34858] - -### Changed -- Add a product interstitial in My Jetpack for stats. [#34772] -- Added an image to Social interstitial. [#34814] -- Update Akismet card on My Jetpack to go to interstitial screen when there is no API key. [#34817] - -## [4.2.1] - 2024-01-04 -### Changed -- Updated package dependencies. [#34815] [#34816] - -### Fixed -- My Jetpack: Jetpack footer links are now consistent with footers in rest of Jetpack screens. [#34787] - -## [4.2.0] - 2024-01-02 -### Fixed -- Show JP Creator as active when JP Complete is purchased. [#34806] - -## [4.1.4] - 2023-12-20 -### Changed -- Updated package dependencies. [#34694] - -## [4.1.3] - 2023-12-11 -### Changed -- Updated Jetpack AI interstitial to repeat the feature's list on all the tiers. [#34541] - -## [4.1.2] - 2023-12-06 -### Changed -- Updated package dependencies. [#34416] - -### Fixed -- Creator Card: fix typo. [#34478] - -## [4.1.1] - 2023-12-05 -### Fixed -- My Jetpack: Fix outdated product cache issue when enabling tiers. [#34428] - -## [4.1.0] - 2023-12-03 -### Added -- Added Jetpack Creator to My Jetpack. [#34307] -- Added the welcome banner to My Jetpack. [#34384] -- Display a "Jetpack Manage" menu item to connected users. [#34353] -- Updated connection message to only display if the welcome banner has been dismissed. [#34420] - -### Changed -- Updated package dependencies. [#34411] [#34427] -- Updated the API calls used for My Jetpack backup card. [#34197] -- Updated the CTAs in My Jetpack for more clarity and to avoid inconsistencies. [#34300] - -### Fixed -- Dashboard: Prevented display of any notices from third-party services. [#34364] -- Fixed checkout error while selling the unlimited Jetpack AI plan. [#34339] -- Fixed Jetpack AI bi-yearly plan on product card. [#34276] -- Fixed product card menus. [#34285] - -## [4.0.3] - 2023-11-24 -### Changed -- Changed Jetpack AI insterstitial contact link to Jetpack Redirect. [#34252] -- Link Jetpack AI Contact Us button to support email on interstitial page. [#34240] -- Removed hardcoded tiers from Jetpack AI interstitial. [#34259] -- Trust next tier provided by the Jetpack AI feature endpoint. [#34239] - -## [4.0.2] - 2023-11-21 -### Changed -- Replace usage of strpos() with str_contains(). [#34137] - -## [4.0.1] - 2023-11-21 -### Added -- Marked Jetpack AI as upgradable in the interstitial page. [#34215] - -## [4.0.0] - 2023-11-20 -### Added -- Display an "Activity Log" menu item to connected users. [#34174] -- Added direct checkout support for products with quantity-based plans. [#34177] -- Added Jetpack AI prices by tier to the interstitial page. [#34196] - -### Changed -- Replaced usage of strpos() with str_starts_with(). [#34135] -- Updated required PHP version to >= 7.0. [#34126] -- Removed condition from the backup undoable event call, this datapoint will be removed. [#33997] - -## [3.12.2] - 2023-11-14 -### Changed -- My Jetpack: Fix a bug causing PHP fatal errors when the Jetpack AI feature information is not available. [#34095] -- Updated package dependencies. [#34093] - -## [3.12.1] - 2023-11-13 -### Changed -- AI Assistant: Updated the text and image for the interstitial based on AI plan tiers. [#33981] -- AI Assistant: Removed the ToS notice from the interstitial page. [#34076] - -## [3.12.0] - 2023-11-08 -### Added -- Updated purchased state for VaultPress backup card on My Jetpack. [#33927] - -## [3.11.1] - 2023-11-03 - -## [3.11.0] - 2023-10-30 -### Added -- Add site data to unpurchased state of VaultPress Backup card to My Jetpack. [#33607] - -## [3.10.0] - 2023-10-23 -### Added -- Add jetpack-plans dependency. It will be use to restore the reverted change on #33410. [#33706] - -### Changed -- Update checkout flow to connect "After" checkout vs before (if not connected). [#33257] - -### Fixed -- Use Current_Plan to check/return from has_required_plan on VP product class. [#33708] - -## [3.9.1] - 2023-10-19 -### Changed -- Make has_required_plan return true (as it was before #33410) as a way to revert the change. [#33697] -- Updated package dependencies. [#33687] - -## [3.9.0] - 2023-10-17 -### Added -- Add has_required_plan method for VideoPress product class, check plan purchase exists for site [#33410] - -### Changed -- Updated package dependencies. [#33646] - -## [3.8.2] - 2023-10-16 -### Changed -- Updated package dependencies. [#33429, #33584] - -## [3.8.1] - 2023-10-10 -### Changed -- Changes title of the my-jetpack page to "My Jetpack" [#33486] -- Updated package dependencies. [#33428] - -### Fixed -- My Jetpack: fix fatal error [#33523] -- My Jetpack: fix Stats card status when not connected [#33521] - -## [3.8.0] - 2023-10-03 -### Added -- Display a new section on My Jetpack to display the stats of the site. [#33283] - -## [3.7.0] - 2023-09-28 -### Added -- Add a section to display stats from Jetpack Stats in My Jetpack [#33160] - -### Changed -- Redirect to a proper upgrade page for free license owners [#33297] - -## [3.6.0] - 2023-09-25 -### Added -- Add barebones infrastructure for querying jetpack product data. [#33095] - -### Changed -- Stats: link to purchase page within WP Admin. [#33227] - -## [3.5.0] - 2023-09-19 -### Changed -- Added support for upgradable products. Updated the Stats card to handle upgradeable products. [#33058] -- Updated Jetpack submenu sort order so individual features are alpha-sorted. [#32958] - -### Fixed -- My Jetpack: Add AI Assistant Monthly to required plan check [#33078] - -## [3.4.5] - 2023-09-13 -### Changed -- Updated package dependencies. [#33001] - -## [3.4.4] - 2023-09-11 -### Changed -- General: remove WP 6.1 backwards compatibility checks [#32772] - -### Fixed -- Stats: stop showing upgrade button for sites with Complete plan [#32870] - -## [3.4.3] - 2023-09-04 -### Changed -- Updated package dependencies. [#32803] -- Updated package dependencies. [#32804] - -## [3.4.2] - 2023-08-23 -### Changed -- Updated package dependencies. [#32605] - -## [3.4.1] - 2023-08-22 -### Changed -- Connection: allow dismissing the IDC modal. [#32594] - -## [3.4.0] - 2023-08-21 -### Added -- Support Jetpack AI Yearly offering [#32130] - -### Changed -- Use the new method to render Connection initial state. [#32499] - -## [3.3.3] - 2023-08-14 -### Added -- Make My Jetpack the default WP-Admin page for Jetpack. [#32385] - -### Changed -- Start showing My Jetpack for authors, editors, and contributors [#32420] - -## [3.3.2] - 2023-08-09 -### Fixed -- Revert My Jetpack as first menu item. [#32384] - -## [3.3.1] - 2023-08-09 -### Changed -- Updated package dependencies. [#32166] - -## [3.3.0] - 2023-08-07 -### Added -- Add Identity Crisis screen modal. [#32249] - -### Changed -- Move 'My Jetpack' sub-menu item to first position. [#32240] - -### Fixed -- Fix IDC modal height issue. [#32316] - -## [3.2.1] - 2023-08-01 -### Added -- Add transient caching for zendesk jwt auth token. [#32140] - -### Changed -- My Jetpack: Rename the namespace of the JWT endpoint, and register it only when it isn't already registered [#32081] - -## [3.2.0] - 2023-07-25 -### Added -- My Jetpack: register jetpack-ai-jwt endpoint [#31965] -- My Jetpack: release Paid Stats to the public [#32020] - -### Changed -- My Jetpack: changed Stats features wording [#32046] -- Updated package dependencies. [#31999] -- Updated package dependencies. [#32040] - -### Fixed -- Make Jetpack logo in footer smaller [#31627] -- My Jetpack: enabled Stats purchase flow returning to Stats Dashboard [#31959] - -## [3.1.3] - 2023-07-17 -### Changed -- Updated package dependencies. [#31872] - -### Fixed -- Hide connection owner information if the data is invalid -- Don't suggest user connection if user is already connected, but connection owner is invalid [#31618] - -## [3.1.2] - 2023-07-11 -### Changed -- Updated package dependencies. [#31785] - -## [3.1.1] - 2023-07-10 -### Fixed -- Make product card primary buttons links when applicable [#31611] - -## [3.1.0] - 2023-07-05 -### Added -- Added Jetpack Stats card to My Jetpack [#31589] - -### Changed -- Jetpack Stats: Enable skipping interstitial page [#31629] -- Updated package dependencies. [#31659] - -### Fixed -- My Jetpack: hide Stats card for standalone plugins [#31689] -- Organize product cards in list [#31606] - -## [3.0.0] - 2023-06-26 -### Added -- Add authentication to Zendesk chat. [#31339] -- Stats: add stats card to my Jetpack. [#31531] - -## [2.15.0] - 2023-06-23 -### Added -- My Jetpack: add Stats product [#31368] - -### Changed -- Updated package dependencies. [#31468] - -## [2.14.3] - 2023-06-12 -### Added -- My Jetpack: populate the Jetpack AI product with feature data [#31238] - -## [2.14.2] - 2023-06-06 -### Changed -- Filter out revoked licenses from the license activation options. [#31088] -- Updated package dependencies. [#31129] - -## [2.14.1] - 2023-05-29 -### Added -- My Jetpack: Add new Jetpack AI card [#30904] - -### Changed -- My Jetpack: Enable Jetpack AI card [#30988] -- My Jetpack: Update AI class to be product and not module [#30905] -- My Jetpack: Update AI interstitial background [#30992] - -## [2.14.0] - 2023-05-22 -### Added -- Added ability to purchase Jetpack AI monthly product [#30793] -- Added tier data to the Boost product to support a pricing table interstitial page. [#29931] - -## [2.13.0] - 2023-05-15 -### Added -- Added My Jetpack interstitial for Jetpack AI [#30543] - -## [2.12.2] - 2023-05-11 -### Changed -- PHP 8.1 compatibility updates [#30517] - -## [2.12.1] - 2023-05-08 -### Added -- My Jetpack: Add deactivate plugin menu action on product card [#30489] - -### Changed -- My Jetpack: Remove icon from plugin activation action in product card [#30458] -- My Jetpack: Remove manage option from menu [#30440] -- My Jetpack: Remove product card icon [#30441] -- My Jetpack: Set a post-checkout redirect destination on the "Purchase a plan" link. [#27693] - -### Fixed -- My Jetpack: Add check for product status before requesting stats [#30430] -- My Jetpack: Reload page after successful license activation [#30364] -- My Jetpack: Use a single column for the page title section [#30406] - -## [2.12.0] - 2023-05-02 -### Added -- Add API to query Zendesk chat availability and use it to conditionally display zendesk chat. [#29942] -- Add pricing table interstitial view for Jetpack Protect. [#29930] -- My Jetpack: Add product detail table component for comparing product tiers. [#29759] - -### Changed -- My Jetpack: Move logic out of Product Card component. [#30274] -- Updated package dependencies. - -### Fixed -- Fix activation and layout on Protect interstatial page. [#29525] -- My Jetpack: Keep product card action button disabled while installing standalone plugin. [#30346] - -## [2.11.0] - 2023-05-01 -### Added -- Added Jetpack Starter bundle post-activation screen and plan header [#30368] - -## [2.10.3] - 2023-04-25 -### Added -- My Jetpack: Add flags field in initial state [#30241] -- My Jetpack: Add Install/Activate menu actions based on the standalone plugin status. [#30153] -- My Jetpack: Add neutral color in contextual card [#30250] -- My Jetpack: Add side-effect action to request the standalone plugin installation on the backend. [#30143] -- My Jetpack: Add stats to VideoPress card [#30197] -- My Jetpack: Enable menu for all hybrid products [#30247] -- My Jetpack: Reload page after standalone action [#30221] - -### Changed -- My Jetpack: Connect the standalone plugin menu options so they trigger the installation and activation when clicked. [#30168] -- MyJetpack: set the Social standalone page as the default admin one [#30193] -- MyJetpack: Try to activate the product module after installing the standalone plugin [#30215] -- Updated package dependencies. [#30015] - -## [2.10.2] - 2023-04-17 -### Added -- Ad missing TOS in Jetpack interstitial. [#29683] -- My Jetpack: Add endpoint to install the standalone plugin for hybrid products. [#30045] -- My Jetpack: Expose information about standalone plugin status on My Jetpack product initial state. [#29977] - -### Changed -- Backup and Scan: redirect after checkout to Jetpack recommendations page if Jetpack plugin is active. Otherwise, redirect back to plugin admin page. [#29708] -- My Jetpack: Adjustments in Product Card [#30014] -- Updated package dependencies. [#30019] - -## [2.10.1] - 2023-04-10 -### Added -- Add Jetpack Autoloader package suggestion. [#29988] -- My Jetpack: Introduce absent_with_plan status [#29920] - -### Changed -- My Jetpack: Turn Search into a hybrid product to handle it as module and as standalone plugin. [#29946] -- My Jetpack: Turn Social into a hybrid product to handle it as module and as standalone plugin. [#29935] -- My Jetpack: Turn VaultPress Backup into a Hybrid product to handle it as module and as standalone plugin. [#29928] -- My Jetpack: Turn VideoPress into a Hybrid product to handle it as module and as standalone plugin. [#29918] - -## [2.10.0] - 2023-04-04 -### Added -- My Jetpack: Adds a selector, reducer and resolver machinery to fetch product stats. [#29764] -- My Jetpack: Enhance Product Card [#29787] -- My Jetpack: Introduce menu in Product Card [#29815] - -### Changed -- * Updated add-anti-spam path to add-akismet to match the product key - * Updated product interstitial component to accept an existingLicenseKeyUrl - * Updated product interstitial component to display a product name instead of a title where preferProductName is set - * Make is_plugin_active available from the API [#29598] -- My Jetpack: Change the bottom of My Jetpack screen to use single-column rows on small viewports. [#29844] -- Updated package dependencies. [#29854] - -## [2.9.2] - 2023-04-03 -### Changed -- Internal updates. - -## [2.9.1] - 2023-03-28 -### Changed -- Move GoldenTokenModal component to licensing package. [#29748] - -## [2.9.0] - 2023-03-27 -### Added -- Adds new route for Golden Token. Also the experience of redeeming one [#29644] -- Clarified when license activation fails that a user connection is required, added a link to complete the connection, and added functionality to redirect back to license activation when the connection is done. [#29443] - -## [2.8.1] - 2023-03-20 -### Changed -- Product Interstitial: Use browser history to go back, in case they're coming from somewhere outside of the app. [#29138] -- Updated My Jetpack wpwrap color to --jp-white-off [#29568] -- Updated package dependencies. [#29471] - -## [2.8.0] - 2023-03-13 -### Added -- Add Zendesk chat module to My Jetpack page [#28712] - -## [2.7.13] - 2023-03-08 -### Changed -- Updated package dependencies. [#29216] - -## [2.7.12] - 2023-02-28 -### Changed -- Update billing language [#29126] - -## [2.7.11] - 2023-02-20 -### Fixed -- My Jetpack: Fix button to add bundle in product interstitial component [#28984] - -## [2.7.10] - 2023-02-15 -### Changed -- Update to React 18. [#28710] - -## [2.7.9] - 2023-02-08 -### Changed -- Updated package dependencies. [#28682, #28700] - -## [2.7.8] - 2023-02-06 -### Changed -- Updated package dependencies. - -## [2.7.7] - 2023-01-26 -### Changed -- Use `flex-start` instead of `start` for better browser compatibility. [#28530] - -## [2.7.6] - 2023-01-25 -### Changed -- Minor internal updates. - -## [2.7.5] - 2023-01-23 -### Fixed -- Components: Fix usage of box-sizing across the elements [#28489] -- Fixes the price display for products with intro offers for the first month. [#28424] - -## [2.7.4] - 2023-01-16 -### Changed -- Updated package dependencies. [#28303] - -## [2.7.3] - 2023-01-11 -### Changed -- Updated package dependencies. - -## [2.7.2] - 2023-01-02 -### Added -- My Jetpack: Move VideoPress from Hybrid [#28097] - -### Changed -- My Jetpack: Move Search out of hybrid and deprecate Hybrid_Product class [#28113] - -## [2.7.1] - 2022-12-27 -### Changed -- Fix layout visual issues [#28055] -- My Jetpack: Move Backup out of hybrid product [#28022] -- My Jetpack: Move Social out of hybrid product [#28074] - -## [2.7.0] - 2022-12-19 -### Added -- Implement detached licenses redux store. [#27609] - -### Changed -- Updated package dependencies. [#27916] - -### Fixed -- Add translation context to Security product name. [#27920] - -## [2.6.1] - 2022-12-12 -### Changed -- Updated package dependencies. [#27888] - -## [2.6.0] - 2022-12-05 -### Changed -- Improve design of the error notice. [#27340] -- Updated package dependencies. [#27340] - -## [2.5.2] - 2022-12-02 -### Changed -- My Jetpack: Requires connection only if needed [#27615] -- Updated package dependencies. [#27697] - -## [2.5.1] - 2022-11-30 - -## [2.5.0] - 2022-11-28 -### Changed -- My Jetpack: rename Backup and Anti-Spam to new product names [#27377] -- Show My Jetpack even if site is disconnected [#26967] -- Updated package dependencies. [#27576] - -## [2.4.1] - 2022-11-22 -### Changed -- Updated package dependencies. [#27043] - -## [2.4.0] - 2022-11-17 -### Added -- Added Jetpack Protect to My Jetpack. [#26069] - -### Changed -- Updated package dependencies. [#26736] - -## [2.3.5] - 2022-11-10 -### Changed -- Updated package dependencies. [#27319] - -## [2.3.4] - 2022-11-08 -### Changed -- Updated package dependencies. [#27289] - -## [2.3.3] - 2022-11-01 -### Changed -- Updated package dependencies. [#27196] - -## [2.3.2] - 2022-10-25 -### Changed -- Updated package dependencies. [#26705] - -## [2.3.1] - 2022-10-25 -### Added -- Add a flag to indicate if the pricing is introductory with product price [#26982] -- My Jetpack: Support trial [#27033] - -### Changed -- Search: now support 38 languages [#27025] - -### Fixed -- Don't show old price when it's the same as new one [#27015] -- Search: check if free plan and new pricing is active using wpcom API [#27016] - -## [2.3.0] - 2022-10-19 -### Added -- Added support for free product and added free product for Search [#26808] - -### Changed -- Updated package dependencies. [#26883] - -## [2.2.3] - 2022-10-17 -### Changed -- Updated package dependencies. [#26851] - -## [2.2.2] - 2022-10-13 -### Changed -- Updated package dependencies. [#26790] - -## [2.2.1] - 2022-10-11 -### Changed -- Updated package dependencies. [#25973] - -## [2.2.0] - 2022-10-05 -### Added -- Integrate the new connection error message React component into My Jetpack. [#26485] -- Search: add post type breakdown endpoint [#26463] -- Trigger restore connection flow. [#26489] - -### Changed -- Updated package dependencies. [#26457] - -## [2.1.1] - 2022-09-27 -### Changed -- Updated package dependencies. - -## [2.1.0] - 2022-09-20 -### Added -- Added the ConnectionErrorNotice React component. [#26259] - -### Changed -- Updated package dependencies. - -### Fixed -- Fixed the tests for the Module_Product class by creating and using a sample, test-only module product class as the test subject instead of relying on Videopress or other concrete products. [#26227] - -## [2.0.5] - 2022-09-08 -### Changed -- Change VideoPress into a Hybrid product in My Jetpack [#25954] -- Updated package dependencies. - -## [2.0.4] - 2022-08-31 -### Added -- Allow plugins to override a product class. [#25891] - -### Changed -- Updated package dependencies. [#25856] - -## [2.0.3] - 2022-08-29 -### Changed -- Updated package dependencies. - -## [2.0.2] - 2022-08-25 -### Changed -- Activate plugins in normal mode to trigger plugin_activated hooks [#25727] -- Updated package dependencies. [#25814] - -### Fixed -- Licensing: do not enable the Licensing UI if My Jetpack cannot be enabled. [#25667] -- Search: increased search plan/pricing API timeouts to 5s [#25775] - -## [2.0.1] - 2022-08-23 -### Added -- My Jetpack: Add container for JITMs [#22452] - -### Changed -- Updated package dependencies. [#25338, #25339, #25377, #25422, #25628, #25762, #25764] - -## [2.0.0] - 2022-08-09 -### Added -- Make product cards compatible with disclaimers and add disclaimer for backup card [#25265] - -### Changed -- Search: changed to only require site level connection [#24477] - -## [1.8.3] - 2022-08-03 -### Changed -- Updated package dependencies. [#25300, #25315] - -## [1.8.2] - 2022-07-27 -### Changed -- My Jetpack: changed link used in ProductCard component to a button when the plugin is absent - -## [1.8.1] - 2022-07-26 -### Changed -- My Jetpack: changed button used in ProductCard component from WordPress to Jetpack default [#25146] -- Updated package dependencies. [#25147] - -## [1.8.0] - 2022-07-19 -### Added -- My Jetpack: scroll window to top on route change [#25086] - -### Changed -- Updated package dependencies. [#24710] - -## [1.7.4] - 2022-07-12 -### Changed -- Updated package dependencies. [#25048, #25055] - -## [1.7.3] - 2022-07-06 -### Added -- Display alert when we cant automatically install the plugin [#24884] - -### Changed -- Updated package dependencies. [#24923] - -## [1.7.2] - 2022-06-28 -### Changed -- Disambiguate redirectUrls vars [#24839] -- Search: use centralized search pricing API [#24795] -- Updated package dependencies. [#24826] - -### Fixed -- Search Pricing: fix pricing fetch issue before site is connected [#24826] - -## [1.7.1] - 2022-06-21 -### Fixed -- My Jetpack: Replace wordpress from PNG to SVG at Connection [#24793] - -## [1.7.0] - 2022-06-21 -### Changed -- My Jetpack: set products grid to 3x3 for large viewport size -- Renaming master to trunk. -- Renaming `master` references to `trunk` - -## [1.6.2] - 2022-06-14 -### Changed -- Updated package dependencies. [#24529] - -## [1.6.1] - 2022-06-08 -### Changed -- Reorder JS imports for `import/order` eslint rule. [#24601] -- Updated package dependencies. [#24510] - -## [1.6.0] - 2022-05-30 -### Added -- Added Social to My Jetpack. - -### Changed -- Make My Jetpack use the new Modules class -- Replace deprecated external-link variation by using isExternalLink prop -- Updated package dependencies - -## [1.5.0] - 2022-05-24 -### Changed -- Default licensing UI in My Jetpack to be enabled [#24396] -- Updated package dependencies. [#24449] - -## [1.4.1] - 2022-05-19 -### Changed -- Updated package dependencies. [#24395] - -## [1.4.0] - 2022-05-18 -### Added -- Added a filter to allow stand-alone plugins to add product specific activation routines [#24334] -- My Jetpack: Add Protect class [#24347] -- My Jetpack: compute Search plugin price based on price tier [#24337] - -### Changed -- Add tiered pricing copy and update titles for Jetpack Search [#24357] -- Hide Activate a license link if there is no user connection since user connection is required [#24251] -- My Jetpack Hybrid products: Install Jetpack if stand-alone plugin installation fails [#24335] -- Updated Jetpack Scan feature list. [#23863] [#23795] [#24361] [#24372] - -## [1.3.0] - 2022-05-10 -### Changed -- Adds from arg to connection screen in My Jetpack so that we can begin tracking connections originating from My Jetpack [#24283] -- Updated package dependencies. [#24189] -- Updated references to old licensing activation UI to licensing activation UI in My Jetpack [#24189] - -## [1.2.1] - 2022-05-04 -### Added -- Add missing JavaScript dependencies. [#24096] - -### Changed -- My Jetpack: remove duplicated site suffix stored on rawUrl. Use siteSuffix instead. [#24094] -- Updated package dependencies. [#24095] [#24198] - -### Deprecated -- Moved the options class into Connection. [#24095] - -## [1.2.0] - 2022-04-26 -### Added -- Added activation screen component to My Jetpack licensing page - -### Changed -- Updated package dependencies. -- Update package.json metadata. - -## [1.1.0] - 2022-04-19 -### Added -- Adds a skeleton for the licensing UI along with a feature flag -- Better error handling for when the WPCOM server is unreachable -- Introduced ConnectedProductOffer component - -### Changed -- Turn Search into a Hybrid Product -- Updated package dependencies -- use connected plugin list from the connection store and ask for an update after activating a product - -## [1.0.2] - 2022-04-12 -### Changed -- Updated package dependencies. - -### Fixed -- Fixed bug in checkout URLs for sites installed in subdirs. - -## [1.0.1] - 2022-04-06 -### Removed -- Removed tracking dependency. - -## [1.0.0] - 2022-04-05 -### Added -- My Jetpack: improve Product and Interstitial components. - -### Changed -- Bump My Jetpack package to major version 1.0.0. -- My Jetpack: align price boxes in the interstitial product page. -- Updated package dependencies. - -## [0.6.13] - 2022-03-31 -### Added -- Added tracking events to Plans section external links - -### Changed -- My Jetpack: tweak plans section typography and descriptive text - -## [0.6.12] - 2022-03-29 -### Added -- Add missing JS peer dependencies. - -### Changed -- Microperformance: Use === null instead of is_null -- My Jetpack: Moved in product icon components -- My Jetpack: Tweak plan sections styles/sizes -- My Jetpack: Update ProductDetailCard to use components and theme variables -- My Jetpack: Use components to render headers elements -- Use different URLs for manage and purchase links in plans section - -### Fixed -- My Jetpack: Connect Screen logos quality - -## [0.6.11] - 2022-03-23 -### Added -- My Jetpack: add error styles to the whole Product card component -- My Jetpack: Make whole Product card clickable - -### Changed -- Changed opacity of product icons to 40% -- Changed title -- Improved should_initialize method -- My Jetpack: remove dropdown from CTA button in Product cards -- My Jetpack: Use Text and CSS vars on ProductCard -- Updated Boost product icon for clarity -- Updated package dependencies. -- Updated package dependencies. -- Updated styles for each product card status -- Update organization and copy of the Plans section - -### Removed -- My Jetpack: Remove client code that allows to deactivate a product - -### Fixed -- Fix Plans section top margin for plan list -- My Jetpack: jetpack_my_jetpack_should_initialize filter now respected when set to true. - -## [0.6.10] - 2022-03-15 -### Changed -- Make Backup go through the purchase flow after activation -- My Jetpack: Use ThemeProvider instead base-styles -- Updated package dependencies - -### Removed -- Removed Beta badge from menu item - -## [0.6.9] - 2022-03-09 -### Changed -- Updated package dependencies. - -## [0.6.8] - 2022-03-08 -### Added -- Added connected plugins slugs to My Jetpack tracking events -- Add link to jetpack.com in the footer -- My Jetpack: Add jetpack features link on connection screen -- My Jetpack: tidy Product card component -- My Jetpack: update Spinner in checkout button - -### Changed -- Components: update attributes used within the Button component to match recent deprecations and changes. -- My Jetpack: Add Connected Product Card stories -- My Jetpack: Add connection screen footer -- My Jetpack: clean/tidy Product data -- My Jetpack: Remove Layout component -- Only consider Backup product active when the plan is purchased - -### Fixed -- Fixed Backup flow when Jetpack plugin is active -- My Jetpack: align CTA buttons of My Jetpack overview -- My Jetpack: Fix button height in the Interstitial pages - -## [0.6.7] - 2022-03-02 -### Added -- Add My Jetpack action link to all Jetpack plugins -- My Jetpack: Handle cosmetic tweaks -- My Jetpack: Pass requiresUserConnection to ConnectionStatusCard - -### Changed -- Refactor and simplify Products class -- Updated package dependencies. - -### Fixed -- Disable browser cache for My Jetpack -- My Jetpack: fix products card section story -- My Jetpack: fix stories for the Interstitial pages - -## [0.6.6] - 2022-02-28 -### Fixed -- Re-doing 0.6.5 to fixup bad release. - -## [0.6.5] - 2022-02-28 -### Changed -- Tweak product card box model. - -### Fixed -- Use namespace in My Jetpack REST Products class to prevent fatal - -## [0.6.4] - 2022-02-25 -### Added -- Activate Jetpack plugin from Extras product card -- Added list of connected plugins to Disconnect dialog in My Jetpack -- Add Extras interstitial page -- My Jetpack: Handle cosmetic tweaks -- My Jetpack: Remove global notices when in my jetpack page -- My Jetpack: set height of Jetpack logo in the footer -- My Jetpack: tweak height of Jetpack Logo -- My Jetpack: update Product logos - -### Changed -- Disable My Jetpack on MS -- My Jetpack: compress extras product image -- Updated package dependencies. -- Update My Jetpack dashboard headline - -### Removed -- Remove unnecessary line from My Jetpack Initial state - -### Fixed -- Fix beta badge for RTL languages -- Handle plugin activating from Hybrid class -- Memoized RecordEvent from usAnalytics hook -- My Jetpack: Fix post activation url redirect -- My Jetpack: Move product list that requires user connection to selector -- Products::get_products_names should not load all product information -- Update automattic logo href in the footer - -## [0.6.3] - 2022-02-22 -### Changed -- Updated inline documentation - -### Fixed -- Use Jetpack namespace to fix fatal error - -## [0.6.2] - 2022-02-22 -### Added -- Add Beta badge -- Add Extras class -- Apply coupon discount to Product price when it exists -- Filesystem write access to the initial state -- Improve Product detail layout -- Implement close link on layout nav -- Prevent calling activation hook when activating backup - -### Changed -- Bump package versions. -- Improve My Jetpack link styles -- Improve redirect process after installing Product -- Fix interstitial CTA buttons layout -- Move from isPressed to CSS vars -- Redirect connect user to connection interstitial -- Point the link of the Manage button of CRM to its dashboard -- Redirect to post_activation_url after product activation from iterstitial screen -- Remove conditional loading depending on constant -- Send My Jetpack version with fired events -- Update the layout of interstitial page when it has an upgradable bundle - -### Fixed -- Check if product is active before checking if requires plan -- Fix check for plugin installation for hybrid products -- Fix click on security and add click on My Jetpack interstitial -- Fix clicks on VideoPress and CRM cards -- Fix Product prices -- Make Scan and Search interstitials install the plugin -- Purchases: ensure we retrieve translated version of active purchases -- Return needs purchase status for products module - -## [0.6.1] - 2022-02-16 -### Added -- Add Anti-Spam Product detail card -- Add CRM interstitial page -- Added wpcom plan slug to product info -- add manage and post activation urls -- Add Scan product: interstitial, route, data, etc... -- Add Security Product Bundle -- Add VideoPress data -- Add VideoPress interstitial cmp. Story. -- Add `#/add-videopress` route -- Change the discount value for all Products to 50 -- checks and activation for Security Bundle -- consume prices dynamically -- Do not show Porduct price when plan has required plan -- Finish Backup, Anti-Spam and Scan interstitial pages -- Fire Tracks Event when user clicks on Product Interstitial Back link -- Install proudcts from interstitial pages -- Make click on Fix connection show connection route -- package version to main class -- Pull product discount from wpcom -- Refactoring -> add icons component -> tweak icons for interstitial pages -- Register `#/add-anti-spam` route. Connect with interstitial page -- Restore Security bundle card in the UI -- Set default values for product data in the client (custom hook) -- set product status as error if active and requiring a missing user connection -- Set properly the checkout link for Products -- Set unlink=1 in the checkout URL when the user is not connected -- Tidy Product stories -- Update Backup product data. Tweak Icon. -- Update mock data for Search product. useMyJetpackNavigate() hook - -### Changed -- Adapt Scan actiavtion behavior as it is not a module -- Add global notices for activate/deactivate failures -- Add manage redirect -- Apply correct style for CTA buttons on Interstitial -- Avoid usage of 100vh on layout -- Fix setting height of the Product title in the detail component -- Implement is fulfilled handler for product resolver -- Improve global notice layout -- Reduce size of boost and search interstitial images -- Update structure with Layout component -- Only pass a productUrl if the product is not free on interstitial pages -- Only show the deactivate action when it makes sense -- Pass slug prop to event firing on product card button actions instead of name -- Remove unnecessary payload from request to activate or deactivate a product -- Replace renderActionButton function for ActionButton component -- Updated package dependencies. -- Use useMyJetpackNavigate when it's worth it - -### Fixed -- Fixed connection check labels and error message -- Fix upgradability for anti-spam and backup products -- Remove duplicted Icon in Product Card story -- Use key when looping through product detail icons - -## [0.6.0] - 2022-02-09 -### Added -- Add Boost interstitial cmp. -- Add has_required_plan to product info and implement method in Search -- Add Product princign harcoded data -- Add search product data -- Add title and features to products data -- anti spam product class -- Connect Boost card with the interstitial page via /add-boost root -- Fire Tracks event when clicking CTA button on product Interstitial page -- Fire Tracks event when clicking Manage button on product card -- Fire Tracks event when clickn Add link on My Jetpack product card -- Fire Tracks event when showing the Interstitial page -- Implement Free price for Boost product -- Implement Search product interstitial -- Introduce basic Layout component. Add GoBackLink component -- Introduce ProductDetailCard component -- My Jetpack: Add Connection screen -- Pass slug prop to ProductCard' -- Plan verification for Backup and Scan -- Restore getProduct() resolver -- Set the checkout URL for the Product detail component -- useCallback for functions that are bound to onEvents - -### Changed -- My Jetpack: Implement handler of connection notices -- My Jetpack: Update notice style and implements redirect for connection route -- Support multiple possible folder for each plugin -- Updated package dependencies - -### Removed -- dependency from search package - -### Fixed -- Fix My Jetpack's reducer for SET_PRODUCT_STATUS -- Fix the redirect URL value -- Show discounted price in Product Detail card -- typo - -## [0.5.0] - 2022-02-02 -### Added -- Added plugin installation functionality -- Adds Tracks events for activating and deactivating products from the product cards -- Fixes stories for ProductCard component -- Handle when site is not connected -- Initial approach to handle global notice -- Module Products -- My Jetpack: Add route handling -- My Jetpack: connect all product cards with data provider -- My Jetpack: connect Backup product class with Product class. Add long description and features fields. -- My Jetpack: handle redirect when no connection #22549 -- My Jetpack: reorganize stores by project/name -- Remove getProduct() resolver -- Support to Hybrid products -- Tweak dimms of the Product card status -- Update data handling - Implement request status in Product Card -- User connection requirement to product info -- uses the Plugin Installer package to safely checks plugins statuses - -### Changed -- Added filter for disabling the initialization of the My Jetpack package -- Build: remove unneeded files from production build. -- Do not initialize My Jetpack id site is not connected -- My Jetpack: Refactor styles to use layout components and theme provider -- My Jetpack: Update gap between product cards section -- Pick API root and nonce values from a new window var myJetpackRest -- Updated package dependencies. -- Update plugin absent status consistently - -### Fixed -- added unit test mock for new global variable myJetpackRest -- Fix tests -- Fix unsafe optional chaining. -- my-jetpack: fix tracking event when activating product -- Resolved minor code standard violation after implementing a stricter rule. - -## [0.4.0] - 2022-01-25 -### Added -- add API endpoints to manipulate products -- Added css module for My Jetpack Plans Section -- Added useAnalytics hook -- Added Visitor class for status regarding the site visitor. -- Add first data approach -- Add Products and REST_Products basic classes -- Adds very basic product cards section component to my jetpack -- My Jetpack: Add Product Card component -- My Jetpack: check user connectivity before to hit wpcom side -- My Jetpack: Implement data handling for enable/disable products -- Removed endpoint plans superseded by purchases - -### Changed -- Add Connections Section wrapping the Connection Status Card to My Jetpack -- Build: do not ship raw files in production bundle. - -### Removed -- Remove unused usePlans() custom react hook - -### Fixed -- Fixed svg attribute strokeWidth for Boost Card - -## [0.3.3] - 2022-01-18 -### Added -- Added redux store specific to my-jetpack -- Implement plans list properly in the PlansSection -- My Jetpack: Add scripts for JS tests -- My Jetpack: Include wordpress components as dep -- Reduxify purchases data - -### Changed -- General: update required node version to v16.13.2 -- Properly style the Plans Section according to proposed design -- Updated package dependencies. - -## [0.3.2] - 2022-01-13 -### Added -- My Jetpack: add story to `` component -- My Jetpack: first PlanSection implementation - -### Fixed -- Rename method enqueue_scritps to enqueue_scripts - -## [0.3.1] - 2022-01-11 -### Added -- Add devvelopment testing instructions to doc. - -### Changed -- Updated package dependencies. - -### Removed -- Remove use of deprecated `~` in sass-loader imports. - -## [0.3.0] - 2022-01-04 -### Changed -- Drop isRegistered and isUserConnected params from ConnectionStatusCard component -- Switch to pcov for code coverage. -- Updated package dependencies. -- Updated package textdomain from `jetpack` to `jetpack-my-jetpack`. - -## [0.2.0] - 2021-12-14 -### Added -- Added Connection Status Card to the page. -- Janitorial: add watch command to the plugin. - -### Changed -- Adapt to new layout components. -- Build: do not ship scss and jsx files in production build. - -### Fixed -- Build minimized JS for the production build. -- Fix JavaScript i18n strings. - -## [0.1.3] - 2021-12-07 -### Changed -- Updated package dependencies. - -## [0.1.2] - 2021-11-30 -### Added -- Janitorial: create mirror repo for the package. - -### Changed -- Remove now-redundant `output.filename` from Webpack config. - -## 0.1.1 - 2021-11-23 -### Changed -- Updated package dependencies. - -## 0.1.0 - 2021-11-17 -### Added -- Created package - -[4.17.0]: https://github.com/Automattic/jetpack-my-jetpack/compare/4.16.0...4.17.0 -[4.16.0]: https://github.com/Automattic/jetpack-my-jetpack/compare/4.15.0...4.16.0 -[4.15.0]: https://github.com/Automattic/jetpack-my-jetpack/compare/4.14.0...4.15.0 -[4.14.0]: https://github.com/Automattic/jetpack-my-jetpack/compare/4.13.0...4.14.0 -[4.13.0]: https://github.com/Automattic/jetpack-my-jetpack/compare/4.12.1...4.13.0 -[4.12.1]: https://github.com/Automattic/jetpack-my-jetpack/compare/4.12.0...4.12.1 -[4.12.0]: https://github.com/Automattic/jetpack-my-jetpack/compare/4.11.0...4.12.0 -[4.11.0]: https://github.com/Automattic/jetpack-my-jetpack/compare/4.10.0...4.11.0 -[4.10.0]: https://github.com/Automattic/jetpack-my-jetpack/compare/4.9.2...4.10.0 -[4.9.2]: https://github.com/Automattic/jetpack-my-jetpack/compare/4.9.1...4.9.2 -[4.9.1]: https://github.com/Automattic/jetpack-my-jetpack/compare/4.9.0...4.9.1 -[4.9.0]: https://github.com/Automattic/jetpack-my-jetpack/compare/4.8.0...4.9.0 -[4.8.0]: https://github.com/Automattic/jetpack-my-jetpack/compare/4.7.0...4.8.0 -[4.7.0]: https://github.com/Automattic/jetpack-my-jetpack/compare/4.6.2...4.7.0 -[4.6.2]: https://github.com/Automattic/jetpack-my-jetpack/compare/4.6.1...4.6.2 -[4.6.1]: https://github.com/Automattic/jetpack-my-jetpack/compare/4.6.0...4.6.1 -[4.6.0]: https://github.com/Automattic/jetpack-my-jetpack/compare/4.5.0...4.6.0 -[4.5.0]: https://github.com/Automattic/jetpack-my-jetpack/compare/4.4.0...4.5.0 -[4.4.0]: https://github.com/Automattic/jetpack-my-jetpack/compare/4.3.0...4.4.0 -[4.3.0]: https://github.com/Automattic/jetpack-my-jetpack/compare/4.2.1...4.3.0 -[4.2.1]: https://github.com/Automattic/jetpack-my-jetpack/compare/4.2.0...4.2.1 -[4.2.0]: https://github.com/Automattic/jetpack-my-jetpack/compare/4.1.4...4.2.0 -[4.1.4]: https://github.com/Automattic/jetpack-my-jetpack/compare/4.1.3...4.1.4 -[4.1.3]: https://github.com/Automattic/jetpack-my-jetpack/compare/4.1.2...4.1.3 -[4.1.2]: https://github.com/Automattic/jetpack-my-jetpack/compare/4.1.1...4.1.2 -[4.1.1]: https://github.com/Automattic/jetpack-my-jetpack/compare/4.1.0...4.1.1 -[4.1.0]: https://github.com/Automattic/jetpack-my-jetpack/compare/4.0.3...4.1.0 -[4.0.3]: https://github.com/Automattic/jetpack-my-jetpack/compare/4.0.2...4.0.3 -[4.0.2]: https://github.com/Automattic/jetpack-my-jetpack/compare/4.0.1...4.0.2 -[4.0.1]: https://github.com/Automattic/jetpack-my-jetpack/compare/4.0.0...4.0.1 -[4.0.0]: https://github.com/Automattic/jetpack-my-jetpack/compare/3.12.2...4.0.0 -[3.12.2]: https://github.com/Automattic/jetpack-my-jetpack/compare/3.12.1...3.12.2 -[3.12.1]: https://github.com/Automattic/jetpack-my-jetpack/compare/3.12.0...3.12.1 -[3.12.0]: https://github.com/Automattic/jetpack-my-jetpack/compare/3.11.1...3.12.0 -[3.11.1]: https://github.com/Automattic/jetpack-my-jetpack/compare/3.11.0...3.11.1 -[3.11.0]: https://github.com/Automattic/jetpack-my-jetpack/compare/3.10.0...3.11.0 -[3.10.0]: https://github.com/Automattic/jetpack-my-jetpack/compare/3.9.1...3.10.0 -[3.9.1]: https://github.com/Automattic/jetpack-my-jetpack/compare/3.9.0...3.9.1 -[3.9.0]: https://github.com/Automattic/jetpack-my-jetpack/compare/3.8.2...3.9.0 -[3.8.2]: https://github.com/Automattic/jetpack-my-jetpack/compare/3.8.1...3.8.2 -[3.8.1]: https://github.com/Automattic/jetpack-my-jetpack/compare/3.8.0...3.8.1 -[3.8.0]: https://github.com/Automattic/jetpack-my-jetpack/compare/3.7.0...3.8.0 -[3.7.0]: https://github.com/Automattic/jetpack-my-jetpack/compare/3.6.0...3.7.0 -[3.6.0]: https://github.com/Automattic/jetpack-my-jetpack/compare/3.5.0...3.6.0 -[3.5.0]: https://github.com/Automattic/jetpack-my-jetpack/compare/3.4.5...3.5.0 -[3.4.5]: https://github.com/Automattic/jetpack-my-jetpack/compare/3.4.4...3.4.5 -[3.4.4]: https://github.com/Automattic/jetpack-my-jetpack/compare/3.4.3...3.4.4 -[3.4.3]: https://github.com/Automattic/jetpack-my-jetpack/compare/3.4.2...3.4.3 -[3.4.2]: https://github.com/Automattic/jetpack-my-jetpack/compare/3.4.1...3.4.2 -[3.4.1]: https://github.com/Automattic/jetpack-my-jetpack/compare/3.4.0...3.4.1 -[3.4.0]: https://github.com/Automattic/jetpack-my-jetpack/compare/3.3.3...3.4.0 -[3.3.3]: https://github.com/Automattic/jetpack-my-jetpack/compare/3.3.2...3.3.3 -[3.3.2]: https://github.com/Automattic/jetpack-my-jetpack/compare/3.3.1...3.3.2 -[3.3.1]: https://github.com/Automattic/jetpack-my-jetpack/compare/3.3.0...3.3.1 -[3.3.0]: https://github.com/Automattic/jetpack-my-jetpack/compare/3.2.1...3.3.0 -[3.2.1]: https://github.com/Automattic/jetpack-my-jetpack/compare/3.2.0...3.2.1 -[3.2.0]: https://github.com/Automattic/jetpack-my-jetpack/compare/3.1.3...3.2.0 -[3.1.3]: https://github.com/Automattic/jetpack-my-jetpack/compare/3.1.2...3.1.3 -[3.1.2]: https://github.com/Automattic/jetpack-my-jetpack/compare/3.1.1...3.1.2 -[3.1.1]: https://github.com/Automattic/jetpack-my-jetpack/compare/3.1.0...3.1.1 -[3.1.0]: https://github.com/Automattic/jetpack-my-jetpack/compare/3.0.0...3.1.0 -[3.0.0]: https://github.com/Automattic/jetpack-my-jetpack/compare/2.15.0...3.0.0 -[2.15.0]: https://github.com/Automattic/jetpack-my-jetpack/compare/2.14.3...2.15.0 -[2.14.3]: https://github.com/Automattic/jetpack-my-jetpack/compare/2.14.2...2.14.3 -[2.14.2]: https://github.com/Automattic/jetpack-my-jetpack/compare/2.14.1...2.14.2 -[2.14.1]: https://github.com/Automattic/jetpack-my-jetpack/compare/2.14.0...2.14.1 -[2.14.0]: https://github.com/Automattic/jetpack-my-jetpack/compare/2.13.0...2.14.0 -[2.13.0]: https://github.com/Automattic/jetpack-my-jetpack/compare/2.12.2...2.13.0 -[2.12.2]: https://github.com/Automattic/jetpack-my-jetpack/compare/2.12.1...2.12.2 -[2.12.1]: https://github.com/Automattic/jetpack-my-jetpack/compare/2.12.0...2.12.1 -[2.12.0]: https://github.com/Automattic/jetpack-my-jetpack/compare/2.11.0...2.12.0 -[2.11.0]: https://github.com/Automattic/jetpack-my-jetpack/compare/2.10.3...2.11.0 -[2.10.3]: https://github.com/Automattic/jetpack-my-jetpack/compare/2.10.2...2.10.3 -[2.10.2]: https://github.com/Automattic/jetpack-my-jetpack/compare/2.10.1...2.10.2 -[2.10.1]: https://github.com/Automattic/jetpack-my-jetpack/compare/2.10.0...2.10.1 -[2.10.0]: https://github.com/Automattic/jetpack-my-jetpack/compare/2.9.2...2.10.0 -[2.9.2]: https://github.com/Automattic/jetpack-my-jetpack/compare/2.9.1...2.9.2 -[2.9.1]: https://github.com/Automattic/jetpack-my-jetpack/compare/2.9.0...2.9.1 -[2.9.0]: https://github.com/Automattic/jetpack-my-jetpack/compare/2.8.1...2.9.0 -[2.8.1]: https://github.com/Automattic/jetpack-my-jetpack/compare/2.8.0...2.8.1 -[2.8.0]: https://github.com/Automattic/jetpack-my-jetpack/compare/2.7.13...2.8.0 -[2.7.13]: https://github.com/Automattic/jetpack-my-jetpack/compare/2.7.12...2.7.13 -[2.7.12]: https://github.com/Automattic/jetpack-my-jetpack/compare/2.7.11...2.7.12 -[2.7.11]: https://github.com/Automattic/jetpack-my-jetpack/compare/2.7.10...2.7.11 -[2.7.10]: https://github.com/Automattic/jetpack-my-jetpack/compare/2.7.9...2.7.10 -[2.7.9]: https://github.com/Automattic/jetpack-my-jetpack/compare/2.7.8...2.7.9 -[2.7.8]: https://github.com/Automattic/jetpack-my-jetpack/compare/2.7.7...2.7.8 -[2.7.7]: https://github.com/Automattic/jetpack-my-jetpack/compare/2.7.6...2.7.7 -[2.7.6]: https://github.com/Automattic/jetpack-my-jetpack/compare/2.7.5...2.7.6 -[2.7.5]: https://github.com/Automattic/jetpack-my-jetpack/compare/2.7.4...2.7.5 -[2.7.4]: https://github.com/Automattic/jetpack-my-jetpack/compare/2.7.3...2.7.4 -[2.7.3]: https://github.com/Automattic/jetpack-my-jetpack/compare/2.7.2...2.7.3 -[2.7.2]: https://github.com/Automattic/jetpack-my-jetpack/compare/2.7.1...2.7.2 -[2.7.1]: https://github.com/Automattic/jetpack-my-jetpack/compare/2.7.0...2.7.1 -[2.7.0]: https://github.com/Automattic/jetpack-my-jetpack/compare/2.6.1...2.7.0 -[2.6.1]: https://github.com/Automattic/jetpack-my-jetpack/compare/2.6.0...2.6.1 -[2.6.0]: https://github.com/Automattic/jetpack-my-jetpack/compare/2.5.2...2.6.0 -[2.5.2]: https://github.com/Automattic/jetpack-my-jetpack/compare/2.5.1...2.5.2 -[2.5.1]: https://github.com/Automattic/jetpack-my-jetpack/compare/2.5.0...2.5.1 -[2.5.0]: https://github.com/Automattic/jetpack-my-jetpack/compare/2.4.1...2.5.0 -[2.4.1]: https://github.com/Automattic/jetpack-my-jetpack/compare/2.4.0...2.4.1 -[2.4.0]: https://github.com/Automattic/jetpack-my-jetpack/compare/2.3.5...2.4.0 -[2.3.5]: https://github.com/Automattic/jetpack-my-jetpack/compare/2.3.4...2.3.5 -[2.3.4]: https://github.com/Automattic/jetpack-my-jetpack/compare/2.3.3...2.3.4 -[2.3.3]: https://github.com/Automattic/jetpack-my-jetpack/compare/2.3.2...2.3.3 -[2.3.2]: https://github.com/Automattic/jetpack-my-jetpack/compare/2.3.1...2.3.2 -[2.3.1]: https://github.com/Automattic/jetpack-my-jetpack/compare/2.3.0...2.3.1 -[2.3.0]: https://github.com/Automattic/jetpack-my-jetpack/compare/2.2.3...2.3.0 -[2.2.3]: https://github.com/Automattic/jetpack-my-jetpack/compare/2.2.2...2.2.3 -[2.2.2]: https://github.com/Automattic/jetpack-my-jetpack/compare/2.2.1...2.2.2 -[2.2.1]: https://github.com/Automattic/jetpack-my-jetpack/compare/2.2.0...2.2.1 -[2.2.0]: https://github.com/Automattic/jetpack-my-jetpack/compare/2.1.1...2.2.0 -[2.1.1]: https://github.com/Automattic/jetpack-my-jetpack/compare/2.1.0...2.1.1 -[2.1.0]: https://github.com/Automattic/jetpack-my-jetpack/compare/2.0.5...2.1.0 -[2.0.5]: https://github.com/Automattic/jetpack-my-jetpack/compare/2.0.4...2.0.5 -[2.0.4]: https://github.com/Automattic/jetpack-my-jetpack/compare/2.0.3...2.0.4 -[2.0.3]: https://github.com/Automattic/jetpack-my-jetpack/compare/2.0.2...2.0.3 -[2.0.2]: https://github.com/Automattic/jetpack-my-jetpack/compare/2.0.1...2.0.2 -[2.0.1]: https://github.com/Automattic/jetpack-my-jetpack/compare/2.0.0...2.0.1 -[2.0.0]: https://github.com/Automattic/jetpack-my-jetpack/compare/1.8.3...2.0.0 -[1.8.3]: https://github.com/Automattic/jetpack-my-jetpack/compare/1.8.2...1.8.3 -[1.8.2]: https://github.com/Automattic/jetpack-my-jetpack/compare/1.8.1...1.8.2 -[1.8.1]: https://github.com/Automattic/jetpack-my-jetpack/compare/1.8.0...1.8.1 -[1.8.0]: https://github.com/Automattic/jetpack-my-jetpack/compare/1.7.4...1.8.0 -[1.7.4]: https://github.com/Automattic/jetpack-my-jetpack/compare/1.7.3...1.7.4 -[1.7.3]: https://github.com/Automattic/jetpack-my-jetpack/compare/1.7.2...1.7.3 -[1.7.2]: https://github.com/Automattic/jetpack-my-jetpack/compare/1.7.1...1.7.2 -[1.7.1]: https://github.com/Automattic/jetpack-my-jetpack/compare/1.7.0...1.7.1 -[1.7.0]: https://github.com/Automattic/jetpack-my-jetpack/compare/1.6.2...1.7.0 -[1.6.2]: https://github.com/Automattic/jetpack-my-jetpack/compare/1.6.1...1.6.2 -[1.6.1]: https://github.com/Automattic/jetpack-my-jetpack/compare/1.6.0...1.6.1 -[1.6.0]: https://github.com/Automattic/jetpack-my-jetpack/compare/1.5.0...1.6.0 -[1.5.0]: https://github.com/Automattic/jetpack-my-jetpack/compare/1.4.1...1.5.0 -[1.4.1]: https://github.com/Automattic/jetpack-my-jetpack/compare/1.4.0...1.4.1 -[1.4.0]: https://github.com/Automattic/jetpack-my-jetpack/compare/1.3.0...1.4.0 -[1.3.0]: https://github.com/Automattic/jetpack-my-jetpack/compare/1.2.1...1.3.0 -[1.2.1]: https://github.com/Automattic/jetpack-my-jetpack/compare/1.2.0...1.2.1 -[1.2.0]: https://github.com/Automattic/jetpack-my-jetpack/compare/1.1.0...1.2.0 -[1.1.0]: https://github.com/Automattic/jetpack-my-jetpack/compare/1.0.2...1.1.0 -[1.0.2]: https://github.com/Automattic/jetpack-my-jetpack/compare/1.0.1...1.0.2 -[1.0.1]: https://github.com/Automattic/jetpack-my-jetpack/compare/1.0.0...1.0.1 -[1.0.0]: https://github.com/Automattic/jetpack-my-jetpack/compare/0.6.13...1.0.0 -[0.6.13]: https://github.com/Automattic/jetpack-my-jetpack/compare/0.6.12...0.6.13 -[0.6.12]: https://github.com/Automattic/jetpack-my-jetpack/compare/0.6.11...0.6.12 -[0.6.11]: https://github.com/Automattic/jetpack-my-jetpack/compare/0.6.10...0.6.11 -[0.6.10]: https://github.com/Automattic/jetpack-my-jetpack/compare/0.6.9...0.6.10 -[0.6.9]: https://github.com/Automattic/jetpack-my-jetpack/compare/0.6.8...0.6.9 -[0.6.8]: https://github.com/Automattic/jetpack-my-jetpack/compare/0.6.7...0.6.8 -[0.6.7]: https://github.com/Automattic/jetpack-my-jetpack/compare/0.6.6...0.6.7 -[0.6.6]: https://github.com/Automattic/jetpack-my-jetpack/compare/0.6.5...0.6.6 -[0.6.5]: https://github.com/Automattic/jetpack-my-jetpack/compare/0.6.4...0.6.5 -[0.6.4]: https://github.com/Automattic/jetpack-my-jetpack/compare/0.6.3...0.6.4 -[0.6.3]: https://github.com/Automattic/jetpack-my-jetpack/compare/0.6.2...0.6.3 -[0.6.2]: https://github.com/Automattic/jetpack-my-jetpack/compare/0.6.1...0.6.2 -[0.6.1]: https://github.com/Automattic/jetpack-my-jetpack/compare/0.6.0...0.6.1 -[0.6.0]: https://github.com/Automattic/jetpack-my-jetpack/compare/0.5.0...0.6.0 -[0.5.0]: https://github.com/Automattic/jetpack-my-jetpack/compare/0.4.0...0.5.0 -[0.4.0]: https://github.com/Automattic/jetpack-my-jetpack/compare/0.3.3...0.4.0 -[0.3.3]: https://github.com/Automattic/jetpack-my-jetpack/compare/0.3.2...0.3.3 -[0.3.2]: https://github.com/Automattic/jetpack-my-jetpack/compare/0.3.1...0.3.2 -[0.3.1]: https://github.com/Automattic/jetpack-my-jetpack/compare/0.3.0...0.3.1 -[0.3.0]: https://github.com/Automattic/jetpack-my-jetpack/compare/0.2.0...0.3.0 -[0.2.0]: https://github.com/Automattic/jetpack-my-jetpack/compare/0.1.3...0.2.0 -[0.1.3]: https://github.com/Automattic/jetpack-my-jetpack/compare/0.1.2...0.1.3 -[0.1.2]: https://github.com/Automattic/jetpack-my-jetpack/compare/0.1.1...0.1.2 diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/LICENSE.txt b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/LICENSE.txt deleted file mode 100644 index e82774c1..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/LICENSE.txt +++ /dev/null @@ -1,357 +0,0 @@ -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - - -=================================== - - -GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - -Copyright (C) 1989, 1991 Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -Everyone is permitted to copy and distribute verbatim copies -of this license document, but changing it is not allowed. - - Preamble - -The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Lesser General Public License instead.) You can apply it to -your programs, too. - -When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - -To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - -For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - -We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - -Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - -Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - -The precise terms and conditions for copying, distribution and -modification follow. - -GNU GENERAL PUBLIC LICENSE -TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - -0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - -1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - -2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - -a) You must cause the modified files to carry prominent notices -stating that you changed the files and the date of any change. - -b) You must cause any work that you distribute or publish, that in -whole or in part contains or is derived from the Program or any -part thereof, to be licensed as a whole at no charge to all third -parties under the terms of this License. - -c) If the modified program normally reads commands interactively -when run, you must cause it, when started running for such -interactive use in the most ordinary way, to print or display an -announcement including an appropriate copyright notice and a -notice that there is no warranty (or else, saying that you provide -a warranty) and that users may redistribute the program under -these conditions, and telling the user how to view a copy of this -License. (Exception: if the Program itself is interactive but -does not normally print such an announcement, your work based on -the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - -3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - -a) Accompany it with the complete corresponding machine-readable -source code, which must be distributed under the terms of Sections -1 and 2 above on a medium customarily used for software interchange; or, - -b) Accompany it with a written offer, valid for at least three -years, to give any third party, for a charge no more than your -cost of physically performing source distribution, a complete -machine-readable copy of the corresponding source code, to be -distributed under the terms of Sections 1 and 2 above on a medium -customarily used for software interchange; or, - -c) Accompany it with the information you received as to the offer -to distribute corresponding source code. (This alternative is -allowed only for noncommercial distribution and only if you -received the program in object code or executable form with such -an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - -4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - -5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - -6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - -7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - -8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - -9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - -10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - -11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - -12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - -How to Apply These Terms to Your New Programs - -If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - -To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - -Copyright (C) - -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along -with this program; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - -Gnomovision version 69, Copyright (C) year name of author -Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. -This is free software, and you are welcome to redistribute it -under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - -Yoyodyne, Inc., hereby disclaims all copyright interest in the program -`Gnomovision' (which makes passes at compilers) written by James Hacker. - -, 1 April 1989 -Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/SECURITY.md b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/SECURITY.md deleted file mode 100644 index 98f48dd1..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/SECURITY.md +++ /dev/null @@ -1,47 +0,0 @@ -# Security Policy - -Full details of the Automattic Security Policy can be found on [automattic.com](https://automattic.com/security/). - -## Supported Versions - -Generally, only the latest version of Jetpack and its associated plugins have continued support. If a critical vulnerability is found in the current version of a plugin, we may opt to backport any patches to previous versions. - -## Reporting a Vulnerability - -Our HackerOne program covers the below plugin software, as well as a variety of related projects and infrastructure: - -* [Jetpack](https://jetpack.com/) -* Jetpack Backup -* Jetpack Boost -* Jetpack CRM -* Jetpack Protect -* Jetpack Search -* Jetpack Social -* Jetpack VideoPress - -**For responsible disclosure of security issues and to be eligible for our bug bounty program, please submit your report via the [HackerOne](https://hackerone.com/automattic) portal.** - -Our most critical targets are: - -* Jetpack and the Jetpack composer packages (all within this repo) -* Jetpack.com -- the primary marketing site. -* cloud.jetpack.com -- a management site. -* wordpress.com -- the shared management site for both Jetpack and WordPress.com sites. - -For more targets, see the `In Scope` section on [HackerOne](https://hackerone.com/automattic). - -_Please note that the **WordPress software is a separate entity** from Automattic. Please report vulnerabilities for WordPress through [the WordPress Foundation's HackerOne page](https://hackerone.com/wordpress)._ - -## Guidelines - -We're committed to working with security researchers to resolve the vulnerabilities they discover. You can help us by following these guidelines: - -* Follow [HackerOne's disclosure guidelines](https://www.hackerone.com/disclosure-guidelines). -* Pen-testing Production: - * Please **setup a local environment** instead whenever possible. Most of our code is open source (see above). - * If that's not possible, **limit any data access/modification** to the bare minimum necessary to reproduce a PoC. - * **_Don't_ automate form submissions!** That's very annoying for us, because it adds extra work for the volunteers who manage those systems, and reduces the signal/noise ratio in our communication channels. - * To be eligible for a bounty, all of these guidelines must be followed. -* Be Patient - Give us a reasonable time to correct the issue before you disclose the vulnerability. - -We also expect you to comply with all applicable laws. You're responsible to pay any taxes associated with your bounties. diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/apple-92dacafad84e79708a74.svg b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/apple-92dacafad84e79708a74.svg deleted file mode 100644 index 478fcfd9..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/apple-92dacafad84e79708a74.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/boost-a54137485af36fdffe9c.png b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/boost-a54137485af36fdffe9c.png deleted file mode 100644 index dd818e46..00000000 Binary files a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/boost-a54137485af36fdffe9c.png and /dev/null differ diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/cloud-81ac85ba680343200f54.svg b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/cloud-81ac85ba680343200f54.svg deleted file mode 100644 index a033545d..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/cloud-81ac85ba680343200f54.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/connect-f27775ac15cf885713c2.png b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/connect-f27775ac15cf885713c2.png deleted file mode 100644 index 66f8710a..00000000 Binary files a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/connect-f27775ac15cf885713c2.png and /dev/null differ diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/crm-7e7684ae2c40327d8fed.png b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/crm-7e7684ae2c40327d8fed.png deleted file mode 100644 index cfec3eed..00000000 Binary files a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/crm-7e7684ae2c40327d8fed.png and /dev/null differ diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/disconnect-confirm-dc9fe8f5c68cfd1320e0.jpg b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/disconnect-confirm-dc9fe8f5c68cfd1320e0.jpg deleted file mode 100644 index 13f5651c..00000000 Binary files a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/disconnect-confirm-dc9fe8f5c68cfd1320e0.jpg and /dev/null differ diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/disconnect-thanks-5873bfac56a9bd7322cd.jpg b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/disconnect-thanks-5873bfac56a9bd7322cd.jpg deleted file mode 100644 index a191ec9e..00000000 Binary files a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/disconnect-thanks-5873bfac56a9bd7322cd.jpg and /dev/null differ diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/empty-avatar-fea23feddfa99b07c2e8.svg b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/empty-avatar-fea23feddfa99b07c2e8.svg deleted file mode 100644 index d648cc87..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/empty-avatar-fea23feddfa99b07c2e8.svg +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/extras-26daf36507504c96d066.png b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/extras-26daf36507504c96d066.png deleted file mode 100644 index d4d49627..00000000 Binary files a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/extras-26daf36507504c96d066.png and /dev/null differ diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/google-dec2a429bf1d8e83f9ad.svg b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/google-dec2a429bf1d8e83f9ad.svg deleted file mode 100644 index 5794583d..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/google-dec2a429bf1d8e83f9ad.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/jetpack-9de1caef5eb5c22da5d6.svg b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/jetpack-9de1caef5eb5c22da5d6.svg deleted file mode 100644 index f8dbeb91..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/jetpack-9de1caef5eb5c22da5d6.svg +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/jetpack-ai-1a265a198f75543e342e.png b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/jetpack-ai-1a265a198f75543e342e.png deleted file mode 100644 index bff62ed5..00000000 Binary files a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/jetpack-ai-1a265a198f75543e342e.png and /dev/null differ diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/jetpack-license-activation-with-lock-7b01c1a4cf56de799cd7.png b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/jetpack-license-activation-with-lock-7b01c1a4cf56de799cd7.png deleted file mode 100644 index ea421dc0..00000000 Binary files a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/jetpack-license-activation-with-lock-7b01c1a4cf56de799cd7.png and /dev/null differ diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/jetpack-license-activation-with-success-cad524ede4e793cc0ece.png b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/jetpack-license-activation-with-success-cad524ede4e793cc0ece.png deleted file mode 100644 index a2562d9b..00000000 Binary files a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/jetpack-license-activation-with-success-cad524ede4e793cc0ece.png and /dev/null differ diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/jetpack-manage-3a7ecaa604823c98c3cf.svg b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/jetpack-manage-3a7ecaa604823c98c3cf.svg deleted file mode 100644 index 1cbd2e82..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/jetpack-manage-3a7ecaa604823c98c3cf.svg +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/search-f9756bd9c926d905fe70.png b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/search-f9756bd9c926d905fe70.png deleted file mode 100644 index 0f77309b..00000000 Binary files a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/search-f9756bd9c926d905fe70.png and /dev/null differ diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/site-cards-143fca7aec7a8c370e82.png b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/site-cards-143fca7aec7a8c370e82.png deleted file mode 100644 index ac5b9981..00000000 Binary files a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/site-cards-143fca7aec7a8c370e82.png and /dev/null differ diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/social-e3fb80b2f32534fefe63.png b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/social-e3fb80b2f32534fefe63.png deleted file mode 100644 index ed91b93e..00000000 Binary files a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/social-e3fb80b2f32534fefe63.png and /dev/null differ diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/stats-9802380852610a4d5908.png b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/stats-9802380852610a4d5908.png deleted file mode 100644 index 0c6ae45e..00000000 Binary files a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/stats-9802380852610a4d5908.png and /dev/null differ diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/videopress-9591093a9a238cc48a35.png b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/videopress-9591093a9a238cc48a35.png deleted file mode 100644 index 9a8f1dfb..00000000 Binary files a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/videopress-9591093a9a238cc48a35.png and /dev/null differ diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/wordpress-1fc3e0ba6c52e9707900.svg b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/wordpress-1fc3e0ba6c52e9707900.svg deleted file mode 100644 index b1cd75b6..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/images/wordpress-1fc3e0ba6c52e9707900.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/index.asset.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/index.asset.php deleted file mode 100644 index 6757fb75..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/index.asset.php +++ /dev/null @@ -1 +0,0 @@ - array('react', 'wp-api-fetch', 'wp-components', 'wp-compose', 'wp-data', 'wp-date', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives', 'wp-url'), 'version' => '5782f9bf704638c25046'); diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/index.css b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/index.css deleted file mode 100644 index 561f42f4..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/index.css +++ /dev/null @@ -1 +0,0 @@ -#my-jetpack-container{--wp-admin-theme-color:var(--jp-black);--wp-admin-theme-color-darker-10:var(--jp-black-80);--wp-admin-theme-color-darker-20:var(--jp-black-80);height:100%}#my-jetpack-container .jp-dashboard-footer__jetpack-symbol{height:16px}#wpbody-content>.notice{display:none!important}#wpwrap{background-color:var(--jp-white-off)}._fUXxnSp5pagKBp9gSN7 *{box-sizing:border-box}.jErCC9oKHSM15BxzFyQK{margin-bottom:0}.oVoYbwbFB6U2o90Njusk{border:1px solid var(--jp-gray);border-left:6px solid var(--jp-red-50);border-radius:var(--jp-border-radius);box-shadow:0 4px 8px rgba(0,0,0,.03),0 1px 2px rgba(0,0,0,.06);color:var(--jp-gray-80);font-size:16px;line-height:22px;margin:0;padding:calc(var(--spacing-base)*2) calc(var(--spacing-base)*3) calc(var(--spacing-base)*2) calc(var(--spacing-base)*3)}.oVoYbwbFB6U2o90Njusk.is-error{background-color:var(--jp-white)}.oVoYbwbFB6U2o90Njusk .components-notice__content{align-items:flex-start;display:flex;flex-direction:column;margin:0;padding:12px 4px}.oVoYbwbFB6U2o90Njusk .is-link{color:var(--jp-black);font-size:16px;font-weight:600}.oVoYbwbFB6U2o90Njusk .components-notice__dismiss{align-self:center}.oVoYbwbFB6U2o90Njusk .components-notice__action{align-items:center;background:#000;border-radius:var(--jp-border-radius);color:var(--jp-white);cursor:pointer;font-size:16px;font-weight:600;height:auto;justify-content:center;letter-spacing:-.01em;line-height:24px;margin-left:calc(var(--spacing-base)*2 + 24px);margin-top:24px;padding:8px 24px;text-decoration:none}.oVoYbwbFB6U2o90Njusk.Snc8NEmDelsbhlH4285s .components-notice__action{margin-left:0;margin-top:0;white-space:nowrap}.oVoYbwbFB6U2o90Njusk.Snc8NEmDelsbhlH4285s .components-notice__content{align-items:center;flex-direction:row}.wBVXH4OTNwLHPRpN4nsq{display:flex;flex-grow:1;margin-right:var(--spacing-base)}.wBVXH4OTNwLHPRpN4nsq>svg{fill:var(--jp-red-60);align-self:flex-start;flex-shrink:0;margin-right:calc(var(--spacing-base)*2)}.wBVXH4OTNwLHPRpN4nsq>svg.F1qvEnFfHs5nz3zFZUOV{fill:none}.pIsYsXFAJ9KX2VrS5rmY{min-height:200px}.gmPKCDKZcfQt9WieTyKS{flex-grow:1}.fDBaV7I4yUO6w5AWVEtr{align-items:center;display:flex;flex-wrap:wrap;justify-content:space-between;margin-top:calc(var(--spacing-base)*3);min-height:28px;width:100%}.SelsBZT7eIWRQyl1dasZ{display:flex;gap:var(--spacing-base);justify-content:flex-start}.LHYJUrOej3toDvOAiz4k{align-items:center;display:flex;gap:var(--spacing-base);justify-content:space-between;margin-bottom:calc(var(--spacing-base)*.5);width:100%}.LHYJUrOej3toDvOAiz4k h3{font-weight:700;line-height:28px}.JFjbc0JgC4qC92ehOiUr{display:flex;position:relative}.JFjbc0JgC4qC92ehOiUr .NBZgqk_CGGfY3Q16OHjT{align-items:center;border:.5px solid var(--jp-black);border-bottom-right-radius:var(--jp-border-radius);border-top-right-radius:var(--jp-border-radius);box-shadow:inset 0 0 0 1px var(--jp-black);cursor:pointer;display:flex;justify-content:center;padding:0}.JFjbc0JgC4qC92ehOiUr .Jh6TlOGQNgBwU_fFxPrm{background-color:var(--jp-black);margin-left:.5px}.JFjbc0JgC4qC92ehOiUr .VBxTkBZVxHaVoyhMRJcz{background-color:var(--jp-white);border-left-width:0;margin-left:-.5px}.UZ3NDyOSbGY9NZWb3bUD{background:var(--jp-white);border-radius:calc(var(--jp-border-radius)/2);box-shadow:0 1px 1px 0 rgba(0,0,0,.1),0 1px 1.5px 0 rgba(0,0,0,.1),0 2px 3px -.5px rgba(0,0,0,.1);left:0;padding:var(--spacing-base);position:absolute;top:calc(100% + var(--spacing-base))}.UZ3NDyOSbGY9NZWb3bUD .IpJGe_nvXXUiBOsAOkaV{align-items:center;background-color:var(--jp-white);border:none;cursor:pointer;display:flex;gap:calc(var(--spacing-base)*7);padding:var(--spacing-base);width:100%}.UZ3NDyOSbGY9NZWb3bUD .IpJGe_nvXXUiBOsAOkaV:hover{background-color:var(--jp-gray-0)}.UZ3NDyOSbGY9NZWb3bUD .SjzpxiAAVsU_xRrw55ub{align-items:center;display:flex;font-size:var(--font-label);gap:calc(var(--spacing-base)*.5)}.UZ3NDyOSbGY9NZWb3bUD .GQy61X1G7Wv3L3erNwxR{background-color:var(--jp-green-50);height:25px;width:25px}.QSePbRSFylCvM2cX8nN_ a,.QSePbRSFylCvM2cX8nN_ button{border-bottom-right-radius:0;border-top-right-radius:0}.f5VJYwuJmjxH8PVxEbbv{align-items:center;display:flex;height:28px;white-space:nowrap}.f5VJYwuJmjxH8PVxEbbv:before{border-radius:50%;content:"";display:inline-block;height:8px;margin-right:var(--spacing-base);width:8px}.f5VJYwuJmjxH8PVxEbbv.ry3pxoGtmQ0ZeSwp7F_3{color:var(--jp-green-50)}.f5VJYwuJmjxH8PVxEbbv.ry3pxoGtmQ0ZeSwp7F_3:before{background:var(--jp-green-50)}.f5VJYwuJmjxH8PVxEbbv.LZzE3EG7m3CDR46wwwEr{color:var(--jp-gray-50)}.f5VJYwuJmjxH8PVxEbbv.LZzE3EG7m3CDR46wwwEr:before{background:var(--jp-gray-50)}.f5VJYwuJmjxH8PVxEbbv.TZUP7W6QYGajITiMNYas{color:var(--jp-yellow-40)}.f5VJYwuJmjxH8PVxEbbv.TZUP7W6QYGajITiMNYas:before{background:var(--jp-yellow-40)}.f5VJYwuJmjxH8PVxEbbv.Vx_jpT02r8W6NfsRSB02{color:var(--jp-red-60)}.f5VJYwuJmjxH8PVxEbbv.Vx_jpT02r8W6NfsRSB02:before{background:var(--jp-red-60)}.f5VJYwuJmjxH8PVxEbbv.PdsJCfyyjSgrNDheF2qi:before{animation:dWP7ypkVXudMbAa38W5Z .5s linear infinite}@keyframes dWP7ypkVXudMbAa38W5Z{0%{opacity:0}50%{opacity:.5}to{opacity:0}}.zI5tJ_qhWE6Oe6Lk75GY{--wp-admin-theme-color:var(--jp-black);--wp-admin-theme-color-darker-10:var(--jp-black-80);--wp-admin-theme-color-darker-20:var(--jp-black-80);--wp-admin-border-width-focus:1.51px;border-radius:var(--jp-border-radius);font-weight:600;justify-content:center}.zI5tJ_qhWE6Oe6Lk75GY.tuBt2DLqimiImoqVzPqo{height:calc(var(--spacing-base)*5);padding:var(--spacing-base);width:calc(var(--spacing-base)*5)}.zI5tJ_qhWE6Oe6Lk75GY.tuBt2DLqimiImoqVzPqo>svg:first-child{margin:0;padding:0}.zI5tJ_qhWE6Oe6Lk75GY.tuBt2DLqimiImoqVzPqo.Na39I683LAaSA99REg14{height:calc(var(--spacing-base)*4);min-width:calc(var(--spacing-base)*4);padding:calc(var(--spacing-base)/2);width:calc(var(--spacing-base)*4)}.zI5tJ_qhWE6Oe6Lk75GY.ipS7tKy9GntCS4R3vekF:not(.tuBt2DLqimiImoqVzPqo){font-size:var(--font-body);height:auto;line-height:24px;padding:var(--spacing-base) calc(var(--spacing-base)*3)}.zI5tJ_qhWE6Oe6Lk75GY.ipS7tKy9GntCS4R3vekF:not(.tuBt2DLqimiImoqVzPqo).paGLQwtPEaJmtArCcmyK{padding:var(--spacing-base) calc(var(--spacing-base)*2)}.zI5tJ_qhWE6Oe6Lk75GY.Na39I683LAaSA99REg14:not(.tuBt2DLqimiImoqVzPqo){font-size:var(--font-body-extra-small);height:auto;line-height:20px;padding:calc(var(--spacing-base)/2) var(--spacing-base)}.zI5tJ_qhWE6Oe6Lk75GY.Na39I683LAaSA99REg14:not(.tuBt2DLqimiImoqVzPqo).paGLQwtPEaJmtArCcmyK>svg:first-child{margin-right:calc(var(--spacing-base)/2)}.zI5tJ_qhWE6Oe6Lk75GY.Na39I683LAaSA99REg14:not(.tuBt2DLqimiImoqVzPqo)>.components-spinner{height:20px}.zI5tJ_qhWE6Oe6Lk75GY.lZAo6_oGfclXOO9CC6Rd{font-weight:400}.zI5tJ_qhWE6Oe6Lk75GY.xJDOiJxTt0R_wSl8Ipz_{min-width:100%}.zI5tJ_qhWE6Oe6Lk75GY.is-primary:disabled,.zI5tJ_qhWE6Oe6Lk75GY.is-secondary:disabled{background:var(--jp-gray);color:var(--jp-gray-20)}.zI5tJ_qhWE6Oe6Lk75GY.is-secondary{background:var(--jp-white);box-shadow:inset 0 0 0 1.51px var(--jp-black)}.zI5tJ_qhWE6Oe6Lk75GY.is-secondary:active:not(:disabled),.zI5tJ_qhWE6Oe6Lk75GY.is-secondary:hover:not(:disabled){background:var(--jp-gray-0)}.zI5tJ_qhWE6Oe6Lk75GY.is-link.Na39I683LAaSA99REg14,.zI5tJ_qhWE6Oe6Lk75GY.is-link.ipS7tKy9GntCS4R3vekF{padding:0}.zI5tJ_qhWE6Oe6Lk75GY.is-link:hover:not(:disabled){text-decoration-thickness:3px}.zI5tJ_qhWE6Oe6Lk75GY.is-link:focus:not(:disabled){text-decoration-line:none}.zI5tJ_qhWE6Oe6Lk75GY.is-destructive.is-primary{box-shadow:none}.zI5tJ_qhWE6Oe6Lk75GY.is-destructive.is-primary:not(:disabled){background:var(--jp-red-50);box-shadow:inset 0 0 0 1px var(--jp-red-50);color:var(--jp-white)}.zI5tJ_qhWE6Oe6Lk75GY.is-destructive.is-primary:hover:not(:disabled){background:var(--jp-red-60);box-shadow:inset 0 0 0 1px var(--jp-red-60)}.zI5tJ_qhWE6Oe6Lk75GY.is-destructive.is-primary:focus:not(:disabled){background:var(--jp-red-70);box-shadow:inset 0 0 0 1px var(--jp-white),0 0 0 var(--wp-admin-border-width-focus) var(--jp-red-70);color:var(--jp-white)}.zI5tJ_qhWE6Oe6Lk75GY.is-destructive.is-primary:active:not(:disabled){background:var(--jp-red-50)}.zI5tJ_qhWE6Oe6Lk75GY.is-destructive.is-secondary{box-shadow:none}.zI5tJ_qhWE6Oe6Lk75GY.is-destructive.is-secondary:not(:disabled){background:var(--jp-white);box-shadow:inset 0 0 0 1.5px var(--jp-red-50);color:var(--jp-red-50)}.zI5tJ_qhWE6Oe6Lk75GY.is-destructive.is-secondary:hover:not(:disabled){background:var(--jp-red-0);box-shadow:inset 0 0 0 1.5px var(--jp-red-60);color:var(--jp-red-60)}.zI5tJ_qhWE6Oe6Lk75GY.is-destructive.is-secondary:focus:not(:disabled){box-shadow:inset 0 0 0 1px var(--jp-white),0 0 0 var(--wp-admin-border-width-focus) var(--jp-red-70);color:var(--jp-red-70)}.zI5tJ_qhWE6Oe6Lk75GY.is-destructive.is-secondary:active:not(:disabled){background:var(--jp-gray-0)}.zI5tJ_qhWE6Oe6Lk75GY.is-destructive.is-link:not(:disabled){color:var(--jp-red-50)}.zI5tJ_qhWE6Oe6Lk75GY.is-destructive.is-link:hover:not(:disabled){box-shadow:none;color:var(--jp-red-60)}.zI5tJ_qhWE6Oe6Lk75GY.is-destructive.is-link:focus:not(:disabled){box-shadow:inset 0 0 0 1px var(--jp-white),0 0 0 var(--wp-admin-border-width-focus) var(--jp-red-70);color:var(--jp-red-70)}.zI5tJ_qhWE6Oe6Lk75GY.q_tVWqMjl39RcY6WtQA6{position:relative}.zI5tJ_qhWE6Oe6Lk75GY.q_tVWqMjl39RcY6WtQA6.has-icon{justify-content:center}.zI5tJ_qhWE6Oe6Lk75GY.q_tVWqMjl39RcY6WtQA6>:not(.components-spinner){visibility:hidden}.zI5tJ_qhWE6Oe6Lk75GY.q_tVWqMjl39RcY6WtQA6>.components-spinner{margin:0;position:absolute}.CDuBjJp_8jxzx5j6Nept{margin-left:calc(var(--spacing-base)/2)}.urouayitSUT8zW0V3p_0{margin-bottom:0}.iXXJlk08gFDeCvsTTlNQ{border:1px solid var(--jp-gray);border-left:6px solid var(--jp-red-50);border-radius:var(--jp-border-radius);box-shadow:0 4px 8px rgba(0,0,0,.03),0 1px 2px rgba(0,0,0,.06);box-sizing:border-box;color:var(--jp-gray-80);font-size:16px;line-height:22px;margin:0;padding:calc(var(--spacing-base)*2) calc(var(--spacing-base)*3) calc(var(--spacing-base)*2) calc(var(--spacing-base)*3)}.iXXJlk08gFDeCvsTTlNQ.is-error{background-color:var(--jp-white)}.iXXJlk08gFDeCvsTTlNQ .components-notice__content{align-items:flex-start;display:flex;flex-direction:column;margin:0;padding:12px 4px}.iXXJlk08gFDeCvsTTlNQ .is-link{color:var(--jp-black);font-size:16px;font-weight:600}.iXXJlk08gFDeCvsTTlNQ .components-notice__dismiss{align-self:center}.iXXJlk08gFDeCvsTTlNQ .MWqRqr7q6fgvLxitcWYk,.iXXJlk08gFDeCvsTTlNQ .MWqRqr7q6fgvLxitcWYk:active,.iXXJlk08gFDeCvsTTlNQ .MWqRqr7q6fgvLxitcWYk:hover,.iXXJlk08gFDeCvsTTlNQ .MWqRqr7q6fgvLxitcWYk:visited{align-items:center;background:#000;border-radius:var(--jp-border-radius);color:var(--jp-white);cursor:pointer;font-size:16px;font-weight:600;justify-content:center;letter-spacing:-.01em;line-height:24px;margin-left:calc(var(--spacing-base)*2 + 24px);margin-top:24px;padding:8px 24px;text-decoration:none}.iXXJlk08gFDeCvsTTlNQ.YLcXAoc82nypTPaKSAcd .MWqRqr7q6fgvLxitcWYk,.iXXJlk08gFDeCvsTTlNQ.YLcXAoc82nypTPaKSAcd .MWqRqr7q6fgvLxitcWYk:active,.iXXJlk08gFDeCvsTTlNQ.YLcXAoc82nypTPaKSAcd .MWqRqr7q6fgvLxitcWYk:hover,.iXXJlk08gFDeCvsTTlNQ.YLcXAoc82nypTPaKSAcd .MWqRqr7q6fgvLxitcWYk:visited{margin-left:0;margin-top:0;white-space:nowrap}.iXXJlk08gFDeCvsTTlNQ.YLcXAoc82nypTPaKSAcd .components-notice__content{align-items:center;flex-direction:row}.e6hHy8BZ7ZKPSXbIC0UG{margin-bottom:25px}.jXz8LnXNzMDdtHqkG0sZ{display:flex;flex-grow:1;margin-right:var(--spacing-base)}.jXz8LnXNzMDdtHqkG0sZ>svg{align-self:flex-start;flex-shrink:0}.jXz8LnXNzMDdtHqkG0sZ .jp-components-spinner,.jXz8LnXNzMDdtHqkG0sZ>svg{margin-right:calc(var(--spacing-base)*2)}@keyframes rotate-spinner{to{transform:rotate(1turn)}}.jp-components-spinner{align-items:center;display:flex}.jp-components-spinner__inner,.jp-components-spinner__outer{animation:3s linear infinite;animation-name:rotate-spinner;border:.1em solid transparent;border-radius:50%;box-sizing:border-box;margin:auto}.jp-components-spinner__outer{border-top-color:#fff}.jp-components-spinner__inner{border-right-color:#fff;border-top-color:#fff;height:100%;opacity:.4;width:100%}.sexr0jUxC1jVixdKiDnC{margin-left:-20px}@media(max-width:782px){.sexr0jUxC1jVixdKiDnC{margin-left:-10px}}.sexr0jUxC1jVixdKiDnC.vKQ11sLeAM45M04P1ccj{background-color:var(--jp-white)}.SqdhUZkXCRuIpErj1B3z{--max-container-width:1128px;--vertical-gutter:24px;--horizontal-spacing:8px;column-gap:var(--vertical-gutter);display:grid;margin:0 auto;max-width:var(--max-container-width);width:100%}@media(max-width:599px){.SqdhUZkXCRuIpErj1B3z{grid-template-columns:repeat(4,minmax(0,1fr));padding:0 16px}}@media(min-width:600px)and (max-width:959px){.SqdhUZkXCRuIpErj1B3z{grid-template-columns:repeat(8,minmax(0,1fr));padding:0 18px}}@media(min-width:960px){.SqdhUZkXCRuIpErj1B3z{grid-template-columns:repeat(12,minmax(0,1fr));padding:0 24px}}.SqdhUZkXCRuIpErj1B3z.OZC_9a1LhpWF9dv15Gdh{max-width:none;padding:unset}@media(max-width:599px){.RuVLl3q4lxTQa3wbhBJB{grid-column-end:span 1}.f9LZTRG4MMK42rS89afW{grid-column-start:1}.bHe_zKxjjpUwHw_MdYE1{grid-column-end:2}.QZbNrOqE2aNSn50xVhpU{grid-column-end:span 2}.ev7W3z7zVYPeHAlYqZjf{grid-column-start:2}.NJWd1m_e7lOiPYru2ZMP{grid-column-end:3}.Xc6nt1Qc1DI0Z2A3gt1r{grid-column-end:span 3}.UIcN_GXiPRoIsin8Kohg{grid-column-start:3}.GRKCyqb5LufCSCgykKFc{grid-column-end:4}.i_qTq8gqhhC3vIUepVRB{grid-column-end:span 4}.G3qaZ3Jpbvam_1XvGxgc{grid-column-start:4}.VRCNYKZtO9zukEwmgP1y{grid-column-end:5}}@media(min-width:600px)and (max-width:959px){.tRm008K_WJL79WoNZTNL{grid-column-end:span 1}.l5T2P_bgKts4tdaRkS1d{grid-column-start:1}.zOCxfLZpF6BlgC7a_Yq1{grid-column-end:2}.F80DdgVn0m5OpvtSQWka{grid-column-end:span 2}.oI1c7JYfiJtMQHbhngtU{grid-column-start:2}.pMQtA_4jh1_1lVknqEP5{grid-column-end:3}.VenqMpdgyKQVUNNQcfqd{grid-column-end:span 3}.seNYL99uoczf9V4MxBxT{grid-column-start:3}.YKfF1HFhI9KygA5l3b2J{grid-column-end:4}.yAi0Cv1xDWkoqsaUhvhR{grid-column-end:span 4}.ubhnyZOnkgxNhh6XtVWv{grid-column-start:4}.RGOPGQbWMJ9Ei5oFxS7X{grid-column-end:5}.Sz1E2aWbX483ijdi6yge{grid-column-end:span 5}.tku6_bRYrX9tMbgYGmIl{grid-column-start:5}.b5JHttOhSEcI1WBlqAjk{grid-column-end:6}.FboSx5MoKTAWbxXyYlCw{grid-column-end:span 6}.Jhs8yEEmodG30edbJvag{grid-column-start:6}.IpzbbKVqEqPcfIGkXkwt{grid-column-end:7}.mhCPwfAZ4Kmm_empzJAq{grid-column-end:span 7}.x034ilrJF7rO9UJB2rI1{grid-column-start:7}.Wt8t2e16viRrOJ1lLA5v{grid-column-end:8}.S6pIrEy9AMLKx9bgh_Ae{grid-column-end:span 8}.kEfI4tGyuWfHTlRnvIab{grid-column-start:8}.PUzX4RRsKq1dnsz3gebS{grid-column-end:9}}@media(min-width:960px){.X_pdcLJikd8LS_YAdJlB{grid-column-end:span 1}.tl936d14Huby4khYp05X{grid-column-start:1}.hnge0LnR69d3NXEtEE1t{grid-column-end:2}.fj0NUMuyZQcPNgKcjp5Z{grid-column-end:span 2}.R2ncBX7a2NigdYCcV1OX{grid-column-start:2}.t8vMSDVYno9k9itRwnXb{grid-column-end:3}.wsDuEN2GqHx6qzo8dUdk{grid-column-end:span 3}.cIEVPUweWtLBy3xaXnMx{grid-column-start:3}.fajUWBwu1m2B479j3jmz{grid-column-end:4}.YR0c7fQTgMkDdWzwSyLp{grid-column-end:span 4}.xlwp8BmplxkKNMI7gamo{grid-column-start:4}._C4O1w9DUqx1m3gPf8aA{grid-column-end:5}.Z54F1hAErckAIrKlxnXW{grid-column-end:span 5}.ezSDWkRHmKSxDJXxuiOH{grid-column-start:5}.T0ChoeAjGJjkkNrYhD4g{grid-column-end:6}.qtMoMPF6yHvGJnWHSsde{grid-column-end:span 6}.gdoywN5VPiWERfIBqkph{grid-column-start:6}.wUev_VH5uf_pwFFlbnAU{grid-column-end:7}.egIPDFJsOpownTClq9XP{grid-column-end:span 7}.yGhp9yoAW7k0kQik9AB7{grid-column-start:7}.SJ43U9mR5wUg5V2qBeQA{grid-column-end:8}.cTuyHfMwSUJxN_HdIEgd{grid-column-end:span 8}.smCr8DaIagcumdvdldiK{grid-column-start:8}.T03NHzQJvzwL6wAfIiTL{grid-column-end:9}.pMvxM3RJGjqyNdf9qg1Y{grid-column-end:span 9}.iIVpNRwEnQ_JI5gpp9EN{grid-column-start:9}.ZbQ4u4vGSX5rJOje4uGL{grid-column-end:10}.gKb5wuIDAlKGbrjK2vxy{grid-column-end:span 10}.Z7pINdImE2WJiYnZBTqm{grid-column-start:10}.ZTxp6qpvwurMdOnLLSz1{grid-column-end:11}.NnQTlbfnxPDR6cQ7rygg{grid-column-end:span 11}.O137wZd6Yl0olSA9PsXR{grid-column-start:11}.zf2OJtQ2MPz6SDoh6CB0{grid-column-end:12}.U3H6UHW6HqRt9hdzVg3O{grid-column-end:span 12}.zynnNeS_ZBTxABcVpUQH{grid-column-start:12}.vI8tltFZtFUNAy9Iag9s{grid-column-end:13}}.jp-dashboard-footer{align-items:center;color:var(--jp-black);display:flex;flex-wrap:wrap;font-size:var(--font-body-extra-small);line-height:1.333;max-width:1128px;width:100%}.jp-dashboard-footer a{text-decoration:none}.jp-dashboard-footer a:any-link,.jp-dashboard-footer a[role=button]{color:inherit}.jp-dashboard-footer a:hover{text-decoration:underline;text-decoration-thickness:1.5px}.jp-dashboard-footer a:focus{border-radius:2px;box-shadow:none;outline:1.5px solid currentColor;outline-offset:3px}.jp-dashboard-footer.is-sm>ul{gap:.125rem}.jp-dashboard-footer.is-md,.jp-dashboard-footer.is-sm>ul{align-items:flex-start;flex-direction:column}.jp-dashboard-footer>ul{align-items:center;display:flex;flex-wrap:wrap;gap:1rem;list-style:none;margin:0;padding:0;width:100%}.jp-dashboard-footer>ul>li{margin-bottom:0}.jp-dashboard-footer>ul>li>a{align-items:center;display:flex;gap:.25rem;min-height:44px}.jp-dashboard-footer__accessible-external-link{border:0;clip:rect(1px,1px,1px,1px);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;overflow-wrap:normal;padding:0;position:absolute;width:1px}.jp-dashboard-footer__jp-item{font-weight:600;padding-inline-end:1rem}.jp-dashboard-footer.is-sm .jp-dashboard-footer__jp-item{padding-bottom:1rem}.jp-dashboard-footer.is-lg .jp-dashboard-footer__a8c-item{margin-inline-start:auto}.jp-dashboard-footer.is-sm .jp-dashboard-footer__a8c-item{padding-top:1rem}.jp-dashboard-footer__a8c-item>a,.jp-dashboard-footer__jp-item>a{text-decoration:none}.HeJe1crc9XaWWpLvIPit .components-modal__frame{border-bottom-left-radius:4px;border-left:4px solid #e68b28;border-top-left-radius:4px;max-height:100%}.HeJe1crc9XaWWpLvIPit .components-modal__content{margin-top:0;padding:0}.HeJe1crc9XaWWpLvIPit .components-modal__header{display:none}.HeJe1crc9XaWWpLvIPit .or0JUScxkJPmNsfrxkEK .jp-idc__idc-screen{border:0}.vMa4i_Dza2t5Zi_Bw9Nf{background:var(--jp-white-off)}.biqv3OiSCRunE35s4DC6{position:relative}.biqv3OiSCRunE35s4DC6>.T0VRsfCJrRslmORTYa8X{overflow:hidden;padding:0}.biqv3OiSCRunE35s4DC6>.v77JdlkwyPAXfzeRW4DQ{background-color:var(--jp-white);border-radius:50%;box-shadow:0 0 5px 1px rgba(0,0,0,.1);padding:8px;position:absolute;right:16px;top:16px;transform:scale(.75)}.biqv3OiSCRunE35s4DC6>.v77JdlkwyPAXfzeRW4DQ:focus,.biqv3OiSCRunE35s4DC6>.v77JdlkwyPAXfzeRW4DQ:hover{background-color:var(--jp-white)}.UQccyTHMg7XnAWr5VSGt{margin-top:24px}.SpY2tzcf1aTWPaBpAaQU{padding:0}._G5mdH1mZpQzrtTJKHAO{padding:24px 16px}@media screen and (min-width:600){._G5mdH1mZpQzrtTJKHAO{padding:32px 24px}}@media screen and (min-width:960px){._G5mdH1mZpQzrtTJKHAO{padding:48px 12px 48px 48px}}.g2nzjIQcPzgwZqW4523t{background-image:url(images/site-cards-143fca7aec7a8c370e82.png),radial-gradient(circle at 90% 30%,rgba(6,158,8,.15) 0,hsla(0,0%,100%,0) 35%),radial-gradient(circle at 75% 65%,rgba(206,217,242,.5) 5%,hsla(0,0%,100%,0) 15%),radial-gradient(circle at 90% 90%,hsla(46,77%,83%,.5) 0,hsla(0,0%,100%,0) 25%);background-repeat:no-repeat;background-size:cover}@media screen and (max-width:960px){.g2nzjIQcPzgwZqW4523t{background-image:url(images/site-cards-143fca7aec7a8c370e82.png),radial-gradient(circle at 55% 30%,rgba(6,158,8,.15) 0,hsla(0,0%,100%,0) 100%),radial-gradient(circle at 25% 40%,rgba(206,217,242,.5) 5%,hsla(0,0%,100%,0) 50%),radial-gradient(circle at 50% 85%,hsla(46,77%,83%,.3) 0,hsla(0,0%,100%,0) 35%);min-height:160px;order:-1}}.OpMBda4vebhRbW8Fm6YC{background:var(--jp-white);border:1px solid var(--jp-gray-5);border-radius:var(--jp-border-radius-rna);box-shadow:0 4px 12px 0 rgba(0,0,0,.06);display:flex;flex-direction:column;height:100%;padding:calc(var(--spacing-base)*3)}.OpMBda4vebhRbW8Fm6YC.BghJAx9hSagUdHWOUaYE{background:none;background-color:var(--jp-white-off);color:var(--jp-black-80);text-decoration:none}.OpMBda4vebhRbW8Fm6YC.BghJAx9hSagUdHWOUaYE:focus{background-color:var(--jp-white);box-shadow:0 0 0 1.5px var(--jp-black);outline:3px solid transparent}.OpMBda4vebhRbW8Fm6YC.IWsEW5nnNWUqqcT3K5L1{box-shadow:0 0 0 1.5px var(--jp-red-60)}.r3UCwgwCthua6lDCvIBI{align-items:center;display:flex;gap:var(--spacing-base);justify-content:space-between;margin-bottom:var(--spacing-base);width:100%}.r3UCwgwCthua6lDCvIBI h3{font-weight:700}.vpluqUMgmwx9_f8wCVIn{align-items:center;display:flex;flex-wrap:wrap-reverse;gap:var(--spacing-base);height:100%}.WQVtrU6q0L1Igcj7wCrQ{margin:0;padding:0}.UujoBFTnQNY2cWU2SIsH{font-size:var(--font-headline-medium);font-weight:700;line-height:52px}.TeGO5V_thHw5lDAm1_2M{font-weight:700}.TeGO5V_thHw5lDAm1_2M,.WolQzb2MsSgiNmLtc7_j{font-size:var(--font-headline-small);line-height:40px}.WolQzb2MsSgiNmLtc7_j{font-weight:400}.hUB0JT8p1T2Hw28N6qC8{font-weight:500}.gKZWDv5chz3_O3Syp74H,.hUB0JT8p1T2Hw28N6qC8{font-size:var(--font-title-medium);line-height:32px}.gKZWDv5chz3_O3Syp74H{font-weight:600}.zY2No8Ga4b8shbOQGhnv{font-size:var(--font-title-small);font-weight:500;line-height:30px}.tIj0D1t8Cc892ikmgFPZ{font-size:var(--font-body);font-weight:400;line-height:24px}.KdcN0BnOaVeVhyLRKqhS{font-size:var(--font-body-small);font-weight:400;line-height:24px}.dso3Rh3tl3Xv1GumBktz{font-weight:400}.dso3Rh3tl3Xv1GumBktz,.mQ1UlbN9u4Mg9byO8m7v{font-size:var(--font-body-extra-small);line-height:20px}.mQ1UlbN9u4Mg9byO8m7v{font-weight:700}.PItlW5vRExLnTj4a8eLE{font-size:var(--font-body-extra-small);font-weight:600;line-height:16px}.TwRpPlktzxhmFVeua7P5{margin:calc(var( --spacing-base )*0)}.zVfqx7gyb3o9mxfGynn1{margin-left:calc(var( --spacing-base )*0);margin-right:calc(var( --spacing-base )*0)}.iSHVzNiB9iVleGljaQxy{margin-bottom:calc(var( --spacing-base )*0)}.iSHVzNiB9iVleGljaQxy,.xqDIp6cNVr_E6RXaiPyD{margin-top:calc(var( --spacing-base )*0)}.S8EwaXk1kyPizt6x4WH2{margin-right:calc(var( --spacing-base )*0)}.ODX5Vr1TARoLFkDDFooD{margin-bottom:calc(var( --spacing-base )*0)}.cphJ8dCpfimnky7P2FHg{margin-left:calc(var( --spacing-base )*0)}.PFgIhNxIyiSuNvQjAIYj{margin:calc(var( --spacing-base )*1)}.M2jKmUzDxvJjjVEPU3zn{margin-left:calc(var( --spacing-base )*1);margin-right:calc(var( --spacing-base )*1)}.io15gAh8tMTNbSEfwJKk{margin-bottom:calc(var( --spacing-base )*1)}.io15gAh8tMTNbSEfwJKk,.rcTN5uw9xIEeMEGL3Xi_{margin-top:calc(var( --spacing-base )*1)}.CQSkybjq2TcRM1Xo9COV{margin-right:calc(var( --spacing-base )*1)}.hfqOWgq6_MEGdFE82eOY{margin-bottom:calc(var( --spacing-base )*1)}.I8MxZQYTbuu595yfesWA{margin-left:calc(var( --spacing-base )*1)}.kQkc6rmdpvLKPkyoJtVQ{margin:calc(var( --spacing-base )*2)}.j6vFPxWuu4Jan2ldoxpp{margin-left:calc(var( --spacing-base )*2);margin-right:calc(var( --spacing-base )*2)}.hqr39dC4H_AbactPAkCG{margin-bottom:calc(var( --spacing-base )*2)}.c3dQnMi16C6J6Ecy4283,.hqr39dC4H_AbactPAkCG{margin-top:calc(var( --spacing-base )*2)}.YNZmHOuRo6hU7zzKfPdP{margin-right:calc(var( --spacing-base )*2)}.Db8lbak1_wunpPk8NwKU{margin-bottom:calc(var( --spacing-base )*2)}.ftsYE5J9hLzquQ0tA5dY{margin-left:calc(var( --spacing-base )*2)}.Det4MHzLUW7EeDnafPzq{margin:calc(var( --spacing-base )*3)}.h_8EEAztC29Vve1datb5{margin-left:calc(var( --spacing-base )*3);margin-right:calc(var( --spacing-base )*3)}.YXIXJ0h1k47u6hzK8KcM{margin-bottom:calc(var( --spacing-base )*3)}.YXIXJ0h1k47u6hzK8KcM,.soADBBkcIKCBXzCTuV9_{margin-top:calc(var( --spacing-base )*3)}.zSX59ziEaEWGjnpZa4uV{margin-right:calc(var( --spacing-base )*3)}.yrVTnq_WBMbejg89c2ZQ{margin-bottom:calc(var( --spacing-base )*3)}.UKtHPJnI2cXBWtPDm5hM{margin-left:calc(var( --spacing-base )*3)}.guexok_Tqd5Tf52hRlbT{margin:calc(var( --spacing-base )*4)}.oS1E2KfTBZkJ3F0tN7T6{margin-left:calc(var( --spacing-base )*4);margin-right:calc(var( --spacing-base )*4)}.DN1OhhXi6AoBgEdDSbGd{margin-bottom:calc(var( --spacing-base )*4)}.DN1OhhXi6AoBgEdDSbGd,.ot2kkMcYHv53hLZ4LSn0{margin-top:calc(var( --spacing-base )*4)}.A1krOZZhlQ6Sp8Cy4bly{margin-right:calc(var( --spacing-base )*4)}.pkDbXXXL32237M0hokEh{margin-bottom:calc(var( --spacing-base )*4)}.XXv4kDTGvEnQeuGKOPU3{margin-left:calc(var( --spacing-base )*4)}.yGqHk1a57gaISwkXwXe6{margin:calc(var( --spacing-base )*5)}.X8cghM358X3DkXLc9aNK{margin-left:calc(var( --spacing-base )*5);margin-right:calc(var( --spacing-base )*5)}.GdfSmGwHlFnN2S6xBn1f{margin-bottom:calc(var( --spacing-base )*5)}.GdfSmGwHlFnN2S6xBn1f,.yqeuzwyGQ7zG0avrGqi_{margin-top:calc(var( --spacing-base )*5)}.g9emeCkuHvYhveiJbfXO{margin-right:calc(var( --spacing-base )*5)}.Lvk3dqcyHbZ07QCRlrUQ{margin-bottom:calc(var( --spacing-base )*5)}.r3yQECDQ9qX0XZzXlVAg{margin-left:calc(var( --spacing-base )*5)}.aQhlPwht2Cz1X_63Miw0{margin:calc(var( --spacing-base )*6)}.JyHb0vK3wJgpblL9s5j8{margin-left:calc(var( --spacing-base )*6);margin-right:calc(var( --spacing-base )*6)}.cY2gULL1lAv6WPNIRuf3{margin-bottom:calc(var( --spacing-base )*6)}.NBWQ9Lwhh_fnry3lg_p7,.cY2gULL1lAv6WPNIRuf3{margin-top:calc(var( --spacing-base )*6)}.yIOniNe5E40C8fWvBm5V{margin-right:calc(var( --spacing-base )*6)}.t30usboNSyqfQWIwHvT3{margin-bottom:calc(var( --spacing-base )*6)}.Nm_TyFkYCMhOoghoToKJ{margin-left:calc(var( --spacing-base )*6)}.C4qJKoBXpgKtpmrqtEKB{margin:calc(var( --spacing-base )*7)}.S93Srbu6NQ_PBr7DmTiD{margin-left:calc(var( --spacing-base )*7);margin-right:calc(var( --spacing-base )*7)}.fJj8k6gGJDks3crUZxOS{margin-bottom:calc(var( --spacing-base )*7)}.cW6D6djs7Ppm7fD7TeoV,.fJj8k6gGJDks3crUZxOS{margin-top:calc(var( --spacing-base )*7)}.DuCnqNfcxcP3Z__Yo5Ro{margin-right:calc(var( --spacing-base )*7)}.im8407m2fw5vOg7O2zsw{margin-bottom:calc(var( --spacing-base )*7)}.G0fbeBgvz2sh3uTP9gNl{margin-left:calc(var( --spacing-base )*7)}.kvW3sBCxRxUqz1jrVMJl{margin:calc(var( --spacing-base )*8)}.tOjEqjLONQdkiYx_XRnw{margin-left:calc(var( --spacing-base )*8);margin-right:calc(var( --spacing-base )*8)}.op5hFSx318zgxsoZZNLN{margin-bottom:calc(var( --spacing-base )*8)}.c9WfNHP6TFKWIfLxv52J,.op5hFSx318zgxsoZZNLN{margin-top:calc(var( --spacing-base )*8)}.sBA75QqcqRwwYSHJh2wc{margin-right:calc(var( --spacing-base )*8)}.GpL6idrXmSOM6jB8Ohsf{margin-bottom:calc(var( --spacing-base )*8)}.HbtWJoQwpgGycz8dGzeT{margin-left:calc(var( --spacing-base )*8)}.uxX3khU88VQ_Ah49Ejsa{padding:calc(var( --spacing-base )*0)}.KX0FhpBKwKzs9fOUdbNz{padding-left:calc(var( --spacing-base )*0);padding-right:calc(var( --spacing-base )*0)}.PfK8vKDyN32dnimlzYjz{padding-bottom:calc(var( --spacing-base )*0)}.PfK8vKDyN32dnimlzYjz,.emxLHRjQuJsImnPbQIzE{padding-top:calc(var( --spacing-base )*0)}.kJ8WzlpTVgdViXt8ukP9{padding-right:calc(var( --spacing-base )*0)}.tg_UIUI11VBzrTAn2AzJ{padding-bottom:calc(var( --spacing-base )*0)}.uczvl8kaz84oPQJ2DB2R{padding-left:calc(var( --spacing-base )*0)}.o7UHPcdVK3lt7q3lqV4o{padding:calc(var( --spacing-base )*1)}.IDqEOxvDoYrFYxELPmtX{padding-left:calc(var( --spacing-base )*1);padding-right:calc(var( --spacing-base )*1)}.DdywPW2qSYlu2pt8tpO2{padding-bottom:calc(var( --spacing-base )*1)}.DdywPW2qSYlu2pt8tpO2,.npy3hw4A5QSkDicb2CJJ{padding-top:calc(var( --spacing-base )*1)}.LgbptTApNY5NwLQvEFAt{padding-right:calc(var( --spacing-base )*1)}.WZQy2SZuZso59bUsXXyl{padding-bottom:calc(var( --spacing-base )*1)}.o331apInxNunbYB3SfPE{padding-left:calc(var( --spacing-base )*1)}.fMPIyD9Vqki1Lrc_yJnG{padding:calc(var( --spacing-base )*2)}.i2pMcTcdrr10IQoiSm_L{padding-left:calc(var( --spacing-base )*2);padding-right:calc(var( --spacing-base )*2)}.eA702gn32kwptiI1obXH{padding-bottom:calc(var( --spacing-base )*2)}.eA702gn32kwptiI1obXH,.o9bGieUKcYc8o0Ij9oZX{padding-top:calc(var( --spacing-base )*2)}.SwZcFez1RDqWsOFjB5iG{padding-right:calc(var( --spacing-base )*2)}.eHpLc_idmuEqeqCTvqkN{padding-bottom:calc(var( --spacing-base )*2)}.vU39i2B4P1fUTMB2l6Vo{padding-left:calc(var( --spacing-base )*2)}.JHWNzBnE29awhdu5BEh1{padding:calc(var( --spacing-base )*3)}.X72lGbb56L3KFzC2xQ9N{padding-left:calc(var( --spacing-base )*3);padding-right:calc(var( --spacing-base )*3)}.BzfNhRG8wXdCEB5ocQ6e{padding-bottom:calc(var( --spacing-base )*3)}.BzfNhRG8wXdCEB5ocQ6e,.srV0KSDC83a2fiimSMMQ{padding-top:calc(var( --spacing-base )*3)}.lUWfkmbQjCskhcNwkyCm{padding-right:calc(var( --spacing-base )*3)}.Ts0dIlc3aTSL7V4cIHis{padding-bottom:calc(var( --spacing-base )*3)}.CzlqQXXhX6MvorArFZ8B{padding-left:calc(var( --spacing-base )*3)}.TqMPkQtR_DdZuKb5vBoV{padding:calc(var( --spacing-base )*4)}.a7UrjhI69Vetlcj9ZVzz{padding-left:calc(var( --spacing-base )*4);padding-right:calc(var( --spacing-base )*4)}.StEhBzGs2Gi5dDEkjhAv{padding-bottom:calc(var( --spacing-base )*4)}.FGneZfZyvYrt1dG0zcnm,.StEhBzGs2Gi5dDEkjhAv{padding-top:calc(var( --spacing-base )*4)}.APEH216rpdlJWgD2fHc8{padding-right:calc(var( --spacing-base )*4)}.oGwXC3ohCic9XnAj6x69{padding-bottom:calc(var( --spacing-base )*4)}.U6gnT9y42ViPNOcNzBwb{padding-left:calc(var( --spacing-base )*4)}.IpdRLBwnHqbqFrixgbYC{padding:calc(var( --spacing-base )*5)}.HgNeXvkBa9o3bQ5fvFZm{padding-left:calc(var( --spacing-base )*5);padding-right:calc(var( --spacing-base )*5)}.tJtFZM3XfPG9v9TSDfN1{padding-bottom:calc(var( --spacing-base )*5)}.PdifHW45QeXYfK568uD8,.tJtFZM3XfPG9v9TSDfN1{padding-top:calc(var( --spacing-base )*5)}.mbLkWTTZ0Za_BBbFZ5b2{padding-right:calc(var( --spacing-base )*5)}.vVWpZpLlWrkTt0hMk8XU{padding-bottom:calc(var( --spacing-base )*5)}.RxfaJj5a1Nt6IavEo5Zl{padding-left:calc(var( --spacing-base )*5)}.SppJULDGdnOGcjZNCYBy{padding:calc(var( --spacing-base )*6)}.palY2nLwdoyooPUm9Hhk{padding-left:calc(var( --spacing-base )*6);padding-right:calc(var( --spacing-base )*6)}.WYw1JvZC0ppLdvSAPhr_{padding-bottom:calc(var( --spacing-base )*6)}.WYw1JvZC0ppLdvSAPhr_,.YEEJ9b90ueQaPfiU8aeN{padding-top:calc(var( --spacing-base )*6)}.QE0ssnsKvWJMqlhPbY5u{padding-right:calc(var( --spacing-base )*6)}.n8yA3jHlMRyLd5UIfoND{padding-bottom:calc(var( --spacing-base )*6)}.tXHmxYnHzbwtfxEaG51n{padding-left:calc(var( --spacing-base )*6)}.kBTsPKkO_3g_tLkj77Um{padding:calc(var( --spacing-base )*7)}.RyhrFx6Y1FGDrGAAyaxm{padding-left:calc(var( --spacing-base )*7);padding-right:calc(var( --spacing-base )*7)}.CBwRpB0bDN3iEdQPPMJO{padding-bottom:calc(var( --spacing-base )*7)}.CBwRpB0bDN3iEdQPPMJO,.vQVSq6SvWKbOMu6r4H6b{padding-top:calc(var( --spacing-base )*7)}.oBy5__aEADMsH46mrgFX{padding-right:calc(var( --spacing-base )*7)}.KVEXoJqf1s92j0JMdNmN{padding-bottom:calc(var( --spacing-base )*7)}.ZMXGNrNaKW3k_3TLz0Fq{padding-left:calc(var( --spacing-base )*7)}.tuiR9PhkHXhGyEgzRZRI{padding:calc(var( --spacing-base )*8)}.U7454qyWkQNa2iaSJziu{padding-left:calc(var( --spacing-base )*8);padding-right:calc(var( --spacing-base )*8)}.VLYIv2GVocjuN93e8HC8{padding-bottom:calc(var( --spacing-base )*8)}.VLYIv2GVocjuN93e8HC8,.X1rm9DQ1zLGLfogja5Gn{padding-top:calc(var( --spacing-base )*8)}.JS7G6kAuqJo5GIuF8S5t{padding-right:calc(var( --spacing-base )*8)}.Y8F9ga1TDCMbM1lj4gUz{padding-bottom:calc(var( --spacing-base )*8)}.AJuyNGrI63BOWql719H8{padding-left:calc(var( --spacing-base )*8)}.Jvb1njqMy7ML1zikhbWn{margin-top:1rem}.mpr8_ygU8woV4bVR1xvw{align-items:center;display:flex;font-size:var(--font-title-small);font-weight:500;line-height:1.5;margin-bottom:.5rem;margin-top:0}.gwO_Q0L0jbwMARVlBezu{color:var(--jp-gray-60);font-family:SF Pro Text,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:var(--font-body-small);font-weight:400;letter-spacing:-.15px;line-height:20px;margin-left:.75rem}.qwy7CsLeEbXvaPwgC9WV{display:flex;flex-flow:row nowrap;max-width:100%;overflow-x:scroll;padding:1px;scrollbar-width:none}.qwy7CsLeEbXvaPwgC9WV::-webkit-scrollbar{display:none}.qwy7CsLeEbXvaPwgC9WV .Hrbg7DeSJs6gas9zdPDR{border-color:var(--jp-gray-5);border-radius:5px;margin-bottom:0;margin-right:1.5rem;min-width:180px;padding:1rem 1.5rem;width:100%}@media only screen and (min-width:960px){.qwy7CsLeEbXvaPwgC9WV .Hrbg7DeSJs6gas9zdPDR{min-width:220px}}.qwy7CsLeEbXvaPwgC9WV .Hrbg7DeSJs6gas9zdPDR:last-child{margin-right:0}.NFpbo5AINn6I6avKFGby{margin-bottom:1.5rem}.aoQZCG0JeyWmy2J6vVxF{font-weight:500;line-height:20px;margin-bottom:.25rem}.M6ApyXg79vuXo6GwDkbO{align-items:flex-end;display:flex;flex-wrap:wrap;font-size:36px;font-weight:400;line-height:40px}.M6ApyXg79vuXo6GwDkbO.DYHb5e6QhgXejWyo9s78{cursor:pointer}.OlInbY5YnDO06MEQHv98{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;line-height:1;margin-right:.5rem}.EtbKbd5m85w7oYT4stIs{color:var(--jp-gray-20);display:none;font-size:var(--font-body-small);font-weight:600;line-height:24px;fill:var(--jp-gray-20)}@media screen and (min-width:960px){.EtbKbd5m85w7oYT4stIs{align-items:center;display:flex}}.EtbKbd5m85w7oYT4stIs.Awr7zl75sfAsFPHK9kDG{color:var(--jp-red-50);fill:var(--jp-red-50)}.EtbKbd5m85w7oYT4stIs.QFSZbIKFdWO3HEPBZyhc{color:var(--jp-green-50);fill:var(--jp-green-50)}.GgJAnS4gaEEGmRCP5n8y{align-content:flex-end;display:flex}.mjiNtwdbKpfo9edGVes4{margin-right:2px}.pAt4v_KG9Ir19wNcEtEj{align-items:center;display:flex;flex-wrap:wrap;justify-content:space-between;margin-top:calc(var(--spacing-base)*2.5);min-height:28px;width:100%}.g4lyov8aMDggdD4yOi1p{align-items:baseline;display:flex;margin-top:calc(var(--spacing-base)/2)}.g4lyov8aMDggdD4yOi1p .Ys5ScZ_dYn2O2AzDE5Yi{font-size:32px;font-weight:400;line-height:36px;margin-right:var(--spacing-base)}.sUNg_b7XteVXOrpHAkJg :last-child{margin-top:4px}.cF6QAJf1vXXAMuutXPcq{align-items:baseline;display:flex}.cF6QAJf1vXXAMuutXPcq.coY634LconQ7gzDDNJeu{color:var(--jp-gray-10);fill:var(--jp-gray-10)}.cF6QAJf1vXXAMuutXPcq.kyqpwKaL2FyQ8CtxJQ0f{color:var(--jp-green-50);fill:var(--jp-green-50)}.cF6QAJf1vXXAMuutXPcq.aXf37lEOcjpNV8ImLaYK{color:var(--jp-red-40);fill:var(--jp-red-40)}.cF6QAJf1vXXAMuutXPcq .OyGdoGzsQ48VaVVR99_H{left:2px;position:relative;top:2px}.cF6QAJf1vXXAMuutXPcq .cKLicfMCaDSGPlX222jF{font-size:14px;font-weight:600;line-height:24px}.wm7Alh6CwbsWkVSODgI2{margin-top:calc(var(--spacing-base)/2)}.qpN923qyxjI06NCgFC8j>li{margin-bottom:0}.wI7QgVzPXvVVu6kfnTT8{align-items:center;color:var(--jp-black);display:flex;justify-content:space-between;margin-top:1rem}.wI7QgVzPXvVVu6kfnTT8 .eqyxcUmdF0s3gmmlZGyD{display:flex;gap:1.5rem}.wI7QgVzPXvVVu6kfnTT8 .gxY6D0PeVtGk9iSB5E_u{align-items:center;display:flex;font-size:var(--font-body-small);gap:2px;margin:0}.wI7QgVzPXvVVu6kfnTT8 .D_uE0LD5CvpfM2FNp55k{align-items:center;display:flex;gap:2px}.wI7QgVzPXvVVu6kfnTT8 .VTBUdi1D4DW34F0yixMk{font-size:var(--font-body-small);margin:0}.BXQQYCO_pEmYmzBBwYxR{align-items:center;color:var(--jp-black);display:flex;gap:.25rem;margin-top:1rem}.BXQQYCO_pEmYmzBBwYxR .qdvOzzbrd3KQK7DNg8eg{font-size:var(--font-body-small);margin:0}.PFbMp_gtGLBMWbbYtO0q{display:flex;flex-grow:1;flex-wrap:wrap;gap:.25rem;justify-content:space-between}.ZFCNMiywyFvaifoIQI5w{color:var(--jp-gray-40)}.mj-boost-speed-score__grade{align-items:center;column-gap:1em;display:flex;font-size:var(--font-body-small);justify-content:space-between;line-height:24px;margin:8px 0}.mj-boost-speed-score__grade--letter{position:relative}.mj-boost-speed-score__grade--letter>button{all:unset;border-radius:var(--jp-border-radius);color:var(--jp-green);cursor:pointer;font-size:var(--font-title-small);font-weight:700;line-height:24px;padding:0 5px}.mj-boost-speed-score__grade--letter>button:focus{outline:1px dotted var(--jp-black)}.boost-score-tooltip__heading{color:#000;font-size:var(--font-title-small);line-height:30px;margin:0}.boost-score-tooltip__content{font-size:var(--font-body);line-height:24px}.components-popover{max-width:340px;min-height:150px;width:calc(100% - 63px)}@media(min-width:783px){.components-popover{width:100%}}.components-popover__content{padding:24px;width:100%}.components-popover__content p:last-child{margin-bottom:0}.mj-boost-speed-score__bar .jb-score-bar__label{display:none}.mj-boost-speed-score__bar .jb-score-bar__filler{border-radius:12px;min-width:49px}.mj-boost-speed-score__bar .jb-score-bar__bounds{border-radius:12px;height:24px;margin-left:0}.mj-boost-speed-score__bar .jb-score-bar__score{border-radius:12px;height:24px;width:30px}.jb-score-bar__label,.jb-score-bar__loading,.jb-score-bar__score{align-items:center;background-color:#fff;border:2px solid transparent;border-radius:42px;display:flex;height:42px}.jb-score-bar{color:var(--jp-gray-70);display:flex;width:100%}.jb-score-bar--mobile{margin-bottom:1.5rem}@media(max-width:767px){.jb-score-bar{flex-direction:column}.jb-score-bar__label{background-color:transparent}}.jb-score-bar__loading{align-items:center;display:flex;justify-content:center;width:42px}.jb-score-bar__label{display:grid;grid-template-columns:24px 1fr;grid-column-gap:10px;font-size:14px;justify-content:center;position:relative}@media(min-width:768px){.jb-score-bar__label{padding-left:15px;padding-right:15px;width:200px;z-index:50}}.jb-score-bar__score{border-radius:100%;font-weight:700;height:42px;justify-content:center;position:absolute;right:-1px;width:42px}.jb-score-bar__bounds{background-color:#f1f1f1;border-radius:21px;display:flex;height:42px;max-width:100%;position:relative;width:100%;z-index:40}@media(min-width:768px){.jb-score-bar__bounds{margin-left:-21px;width:calc(100% + 21px)}}.jb-score-bar__filler{border-radius:0 42px 42px 0;display:flex;justify-content:flex-end;min-width:85px;position:relative;transition:width .3s ease-in-out;width:0;will-change:width}@media(max-width:767px){.jb-score-bar__filler{border-radius:inherit;min-width:43px}}.jb-score-bar__no_boost_score{--clearance-space:74px;background:#fff;background-clip:padding-box;border:2px solid transparent;border-radius:50%;cursor:pointer;font-size:.7em;height:28px;line-height:1.625;padding:3px;position:absolute;text-align:center;top:6px;width:28px;z-index:2}.jb-score-bar__no_boost_score:hover{border:2px solid hsla(0,0%,100%,.5)}.jb-score-bar__no_boost_score:after{border-bottom:6px solid #fff;border-left:6px solid transparent;border-right:6px solid transparent;content:" ";height:0;left:6px;position:absolute;top:28px;width:0}.jb-score-bar__no_boost_score_tooltip{background:#fff;border-radius:4px;box-shadow:0 0 20px 0 hsla(0,0%,67%,.28);display:none;left:-10em;margin:0 16px;padding:16px;position:absolute;top:-62px;width:20em}.jb-score-bar__no_boost_score_tooltip:after{border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid #fff;bottom:-6px;content:" ";height:0;left:10em;margin:0 -10px;position:absolute;width:0}.jb-score-bar__no_boost_score:hover .jb-score-bar__no_boost_score_tooltip{display:block}.jb-score-bar .fill-loading{background-color:var(--jp-white)}.jb-score-bar .fill-good{background-color:var(--jp-green)}.jb-score-bar .fill-mediocre{background-color:var(--jp-orange-20)}.jb-score-bar .fill-bad{background-color:var(--jp-red-50)}.gridicon{fill:currentColor;display:inline-block}.gridicon.needs-offset g{transform:translate(1px,1px)}.gridicon.needs-offset-x g{transform:translate(1px)}.gridicon.needs-offset-y g{transform:translateY(1px)}@keyframes R2i0K45dEF157drbVRPI{0%{opacity:.6}50%{opacity:1}to{opacity:.6}}.NisihrgiIKl_knpYJtfg{animation:R2i0K45dEF157drbVRPI 1.5s infinite;background-color:var(--jp-gray);height:100%;width:100%}.components-surface.components-card{border-radius:var(--jp-border-radius-rna)}.upsell-banner{background:#f9f9f6;background:linear-gradient(133deg,#ced9f2,#f9f9f6 10%,#f9f9f6 80%,#f5e6b3);display:flex;flex-direction:column}@media screen and (min-width:660px){.upsell-banner{flex-direction:row}}.upsell-banner.components-card__body.components-card-body{border-radius:var(--jp-border-radius-rna);padding:36px}.upsell-banner .upsell-banner--icon{align-items:flex-start;display:flex;margin-bottom:16px;margin-right:0;margin-top:16px}@media screen and (min-width:660px){.upsell-banner .upsell-banner--icon{align-items:center;margin-bottom:0;margin-right:28px;margin-top:0}}.upsell-banner .upsell-banner--content{display:flex;flex:1;flex-direction:column;justify-content:space-between}@media screen and (min-width:660px){.upsell-banner .upsell-banner--content{flex-direction:row}}.upsell-banner .upsell-banner--content .upsell-banner--content-info{display:flex;flex-direction:column}.upsell-banner .upsell-banner--content .upsell-banner--content-info h3{font-size:1.5rem;font-weight:500;line-height:32px;margin:0}.upsell-banner .upsell-banner--content .upsell-banner--content-info p{font-size:1rem;margin:8px 0 0}.upsell-banner .upsell-banner--content .upsell-banner--content-cta{align-items:center;display:flex;flex-direction:row;margin-left:0;margin-top:16px}@media screen and (min-width:660px){.upsell-banner .upsell-banner--content .upsell-banner--content-cta{margin-left:16px;margin-top:0}}.upsell-banner .upsell-banner--content .upsell-banner--content-cta .upsell-banner--content-cta-button{box-shadow:inset 0 0 0 1.5px #000;font-weight:400;padding:8px 16px;white-space:nowrap}.upsell-banner .upsell-banner--content .upsell-banner--content-cta .upsell-banner--content-cta-button.secondary{background-color:var(--jp-white);color:var(--jp-black)}.upsell-banner .upsell-banner--content .upsell-banner--content-cta .upsell-banner--content-cta-button.primary{margin-left:8px}.cAbGtJDGgLubucBnz7vM{background-color:var(--jp-white)}.wiobThfXJCuhGNrbFIT6 a,.wiobThfXJCuhGNrbFIT6 a:active,.wiobThfXJCuhGNrbFIT6 a:hover{color:var(--jp-black)}.VgAxgahF9bC2M__FiIgV{display:flex;margin-bottom:calc(var(--spacing-base)*3)}.dbRwkMLqcMF67njPoAF7{margin-right:8px}.Doju0RxvvN9JS12mf489{line-height:calc(var(--spacing-base)*3);margin:0 0 var(--spacing-base) 0}.yWUvvF4WJLNDSpMgBMfm{align-items:center;display:flex;flex-wrap:wrap;margin:0 auto;max-width:1128px}.ka1fVHj2HOkHjhdoEFOZ{display:grid;grid-gap:24px;grid-template-columns:repeat(4,1fr);margin:0 16px;width:100%}@media(min-width:600px){.ka1fVHj2HOkHjhdoEFOZ{grid-template-columns:repeat(8,1fr);margin:0 18px}}@media(min-width:960px){.ka1fVHj2HOkHjhdoEFOZ{grid-template-columns:repeat(12,1fr);margin:0 24px;max-width:1128px}}.JMOO4Y_9yhTO9lwLnRUx{grid-column-end:span 1}.PFDPAqk51qox_ChLqJwm{grid-column-end:span 2}.ault0jHVfWpShqOGooIP{grid-column-end:span 3}.GqpvdRzmzPJELtSm4FEN{grid-column-end:span 4}@media(min-width:600px){.Ym4_YneEGD_iZD6W1C2o{grid-column-end:span 1}.NbvHnnDtWw8n9BEUQ0Oy{grid-column-end:span 2}.ElMT7rhxe5ZJKO41MnhW{grid-column-end:span 3}.yKjnqjibn_wW_1tWWt5Q{grid-column-end:span 4}.Pb30lOcQFpzUX57GwflS{grid-column-end:span 5}.pC1wxc_R8y4pNILHsiiY{grid-column-end:span 6}.pChscSCnudQoWGjMFKI_{grid-column-end:span 7}.qw1H2gAgF3lDCI2Tbkmb{grid-column-end:span 8}}@media(min-width:960px){.VzcA_rrxBK3g4ozA0oD9{grid-column-end:span 1}.pNAa7O2adRZD8Slgk9iR{grid-column-end:span 2}.tlIMLlipexblj8CeOx4B{grid-column-end:span 3}.Dvt0u5l2Rr1BhBmvYAzl{grid-column-end:span 4}.BiUsgNTc0tyc7tC5jnzE{grid-column-end:span 5}.ulJXAsj7G2ROJ1g3_s28{grid-column-end:span 6}.HsoVlyVLsXYClx9Atox0{grid-column-end:span 7}.oXxjRQNNj2cfIpFBqC1W{grid-column-end:span 8}.qXgUn4Adg9xE_JnbuDio{grid-column-end:span 9}.xMpqTLiLfYFEJiRPQQQq{grid-column-end:span 10}.IiGo3Sz2FDZN7_eGElwA{grid-column-end:span 11}.Om8BNCjfgqQ_wmPQjfOY{grid-column-end:span 12}}@media(max-width:960px){.t10ZWzP7ADjJnR4tqxRS{display:none}}@media(max-width:600px){.eOUlZG8Pelh_Xj0aSoHG{display:none}}.l546LrwBEePz434NFK5Q{border:2px solid var(--jp-green-primary);border-radius:var(--jp-border-radius);display:block;margin:32px 0;padding:16px 64px 16px 24px;position:relative;text-decoration:none}.l546LrwBEePz434NFK5Q span{display:block}.l546LrwBEePz434NFK5Q span:last-of-type{font-weight:600}.l546LrwBEePz434NFK5Q:focus span:last-of-type,.l546LrwBEePz434NFK5Q:hover span:last-of-type{text-decoration:underline;text-decoration-thickness:var(--jp-underline-thickness)}.l546LrwBEePz434NFK5Q:focus:after,.l546LrwBEePz434NFK5Q:hover:after{transform:translateY(-50%) translateX(8px)}.l546LrwBEePz434NFK5Q:after{color:var(--jp-green-primary);content:"→";font-size:24px;font-weight:600;position:absolute;right:24px;top:50%;transform:translateY(-50%);transition:transform .15s ease-out}.Q7w4fcEcemZ2nlwaYNog{fill:var(--jp-yellow-30)!important;display:inline-block!important;width:1.1em!important}.AoNQsOaTt6gSf0H6Yasz{display:inline-block;position:relative}.v13ZwGzUnecPA7Y3URAl{height:18px;left:-53px;pointer-events:none;position:absolute;top:0;width:124px}.EeDbu9pXFWTsCzfTpv2v{pointer-events:all}.BmSvoIi3rErkcrRiOi2W{color:var(--jp-black);font-size:16px;font-weight:600;line-height:19px}.BmSvoIi3rErkcrRiOi2W:not(:last-child){margin-bottom:8px}.mojRoVuWdDJo0E6LEjJw{font-size:14px;font-weight:400;line-height:24px}.golden-token-icon-tooltip .components-popover:not([data-y-axis=middle])[data-x-axis=left] .components-popover__content{margin-right:-62px}.golden-token-icon-tooltip .components-popover:not([data-y-axis=middle])[data-x-axis=right] .components-popover__content{margin-left:-62px}.golden-token-icon-tooltip .components-popover[data-y-axis=bottom] .components-popover__content{top:2px!important}.golden-token-icon-tooltip .components-popover:not(.is-without-arrow)[data-y-axis=bottom]:before{top:-6px!important}.golden-token-icon-tooltip .components-popover:not(.is-without-arrow)[data-y-axis=bottom]:after{top:-4px!important}.golden-token-icon-tooltip .components-popover[data-y-axis=top] .components-popover__content{bottom:10px!important}.golden-token-icon-tooltip .components-popover:not(.is-without-arrow)[data-y-axis=top]:before{bottom:3px}.golden-token-icon-tooltip .components-popover:not(.is-without-arrow)[data-y-axis=top]:after{bottom:4px}.golden-token-icon-tooltip .components-popover__content{border:1px solid var(--jp-gray);border-radius:4px;outline:none;padding:24px;white-space:normal;width:304px}.golden-token-icon-tooltip .components-button.is-link:focus:not(:disabled){box-shadow:none}.cuoSlhSNrqf1dozY22Xb{fill:#000}.JLquNpQVlysAamuh5lJO,.lAIiifeLMmZAPlQ9n9ZR{fill:var(--jp-green-primary)}.cbOwD8Y4tFjwimmtchQI{fill:#757575}.cbOwD8Y4tFjwimmtchQI.aLWBKY0yRghEk7tNCgK3{fill:var(--color-bluesky)}.cbOwD8Y4tFjwimmtchQI.aHOlEBGD5EA8NKRw3xTw{fill:var(--color-facebook);border-radius:50%!important}.cbOwD8Y4tFjwimmtchQI.af4Y_zItXvLAOEoSDPSv{fill:var(--color-twitter)}.cbOwD8Y4tFjwimmtchQI.f68aqF3XSD1OBvXR1get{fill:var(--color-linkedin)}.cbOwD8Y4tFjwimmtchQI.xFI0dt3UiXRlRQdqPWkx{fill:var(--color-tumblr)}.cbOwD8Y4tFjwimmtchQI.q7JEoyymveP6kF747M43{fill:var(--color-gplus)}.cbOwD8Y4tFjwimmtchQI.DKOBOTVmTLbh26gUH_73{fill:var(--color-mastodon)}.cbOwD8Y4tFjwimmtchQI.n5XodNsuMfMAAvqHFmbw{fill:var(--color-nextdoor);border-radius:50%}.cbOwD8Y4tFjwimmtchQI.cL3m0xBYTYhIKI7lCqDB{fill:var(--color-instagram)}.cbOwD8Y4tFjwimmtchQI.fftumuc_lJ6v0tq4UMVR{fill:var(--color-whatsapp)}.kezuOHNvu9vdvlJ86Fwg .qJizORs2q_CVCj9L6XLe{align-items:center;display:flex;gap:var(--spacing-base);margin-bottom:calc(var(--spacing-base)*3)}.kezuOHNvu9vdvlJ86Fwg .qJizORs2q_CVCj9L6XLe .VmtuLc2xRqmsO6cK8qjF{position:relative}.kezuOHNvu9vdvlJ86Fwg .qJizORs2q_CVCj9L6XLe .MdTRfQ3eo5qZKChZlzNj{width:32px}.kezuOHNvu9vdvlJ86Fwg .qJizORs2q_CVCj9L6XLe .PbEpL02SEH9VNAlbKCfV{width:30px}.kezuOHNvu9vdvlJ86Fwg .qJizORs2q_CVCj9L6XLe .TD4AUM9gcTVAB6JHB5ZR{border-radius:50%;margin-left:-10px;position:absolute;width:32px}.kezuOHNvu9vdvlJ86Fwg .qJizORs2q_CVCj9L6XLe .yjl73qv0VWoPP8IhGreh{border-top-style:solid;border-top:2px dashed var(--jp-black);height:0;width:67px}.kezuOHNvu9vdvlJ86Fwg .qJizORs2q_CVCj9L6XLe .rq8YRaj9OyUUXJUHiUgI{border-color:var(--jp-red)}.kezuOHNvu9vdvlJ86Fwg .YZ7FNKEm9qpvQ4ZkbAz5{transform:rotate(180deg)}.kezuOHNvu9vdvlJ86Fwg .oH9tzGE80LnB6Og69RFz{margin-bottom:var(--spacing-base)}.kezuOHNvu9vdvlJ86Fwg .oH9tzGE80LnB6Og69RFz,.kezuOHNvu9vdvlJ86Fwg .xXVEWvQllVsFGmJY8WEp{align-items:center;display:flex;gap:var(--spacing-base)}.kezuOHNvu9vdvlJ86Fwg .xXVEWvQllVsFGmJY8WEp.J0GIu2rNR7rXocQTyd8p{color:var(--jp-red);fill:var(--jp-red)}.jp-connection__manage-dialog{--spacing-base:8px;border-radius:3px;margin:auto;width:1200px}.jp-connection__manage-dialog__content{align-items:center;background:var(--jp-white-off);display:flex;flex-direction:column;justify-content:center;padding:80px;text-align:center}.jp-connection__manage-dialog__content h1{font-size:var(--font-title-large);font-weight:700;line-height:1.2;margin:0}.jp-connection__manage-dialog__large-text{font-size:1.25rem;font-weight:600;margin-bottom:calc(var(--spacing-base)*4);margin-top:calc(var(--spacing-base)*3);max-width:60%}.jp-connection__manage-dialog__actions{align-items:center;background:var(--jp-white);border-top:1px solid var(--jp-gray);bottom:0;box-sizing:border-box;margin:0!important;max-width:1200px!important;padding:calc(var(--spacing-base)*4) calc(var(--spacing-base)*5);position:sticky}.jp-connection__manage-dialog__link{color:var(--jp-black)}.jp-connection__manage-dialog__link:hover{color:var(--jp-black);text-decoration-thickness:var(--jp-underline-thickness)}.jp-connection__manage-dialog__link:focus{color:var(--jp-black)}.jp-connection__manage-dialog__button-wrap button{float:right}.jp-connection__manage-dialog__action-card{background-color:var(--jp-white);border:none;border-radius:3px;box-shadow:0 0 15px var(--jp-gray-off);margin:var(--spacing-base) auto;max-width:100%;padding:1rem 2rem;text-align:left;width:750px}.jp-connection__manage-dialog__action-card__card-headline{font-size:var(--font-body);font-weight:600;line-height:calc(var(--spacing-base)*3);text-decoration:none}.jp-connection__manage-dialog__action-card__icon{float:right}.jp-connection__manage-dialog__action-card .transfer{color:var(--jp-black);fill:var(--jp-black)}.jp-connection__manage-dialog__action-card .disconnect{color:var(--jp-red);fill:var(--jp-red)}.jp-connection__manage-dialog .components-modal__header{display:none}.jp-connection__manage-dialog .components-modal__content{margin:0;padding:0}.jp-connection__disconnect-dialog h1{font-size:var(--font-title-small);font-weight:600;line-height:1.2;margin-top:0}.jp-connection__disconnect-dialog h2{font-size:var(--font-title-small);font-weight:400;line-height:1.2;margin:0}.jp-connection__disconnect-dialog p{font-size:var(--font-body);margin-top:0}.jp-connection__disconnect-dialog p.jp-connection__disconnect-dialog__large-text,.jp-connection__disconnect-dialog__large-text{font-size:1.25rem}.jp-connection__disconnect-dialog .jp-connection__disconnect-dialog__link,.jp-connection__disconnect-dialog__link{color:var(--jp-black);font-size:var(--font-body);font:inherit;height:auto;padding:0;text-decoration:underline}.jp-connection__disconnect-dialog .jp-connection__disconnect-dialog__link:hover,.jp-connection__disconnect-dialog__link:hover{color:var(--jp-black);text-decoration-thickness:var(--jp-underline-thickness)}.jp-connection__disconnect-dialog .jp-connection__disconnect-dialog__link:focus,.jp-connection__disconnect-dialog__link:focus{box-shadow:none!important;color:var(--jp-black)}.jp-connection__disconnect-dialog .jp-connection__disconnect-dialog__link--bold,.jp-connection__disconnect-dialog__link--bold{font-weight:700}.jp-connection__disconnect-dialog .components-button{border-radius:4px;font-size:var(--font-body-small);height:40px}.jp-connection__disconnect-dialog .components-modal__content{display:flex;flex-direction:column;flex-grow:1;margin:0;padding:0}.jp-connection__disconnect-dialog .components-modal__content:before,.jp-connection__disconnect-dialog .components-modal__header{display:none}.jp-connection__disconnect-dialog .jp-row{align-items:center;width:calc(100% - 48px)}.jp-connection__disconnect-dialog__content{align-items:center;background:var(--jp-white-off);border-radius:4px;display:flex;flex-direction:column;flex-grow:1;justify-content:center;margin:0;padding:2rem 1rem;text-align:center}.jp-connection__disconnect-dialog__actions{background:var(--jp-white);border-top:1px solid var(--jp-gray);bottom:0;padding:2rem 0;position:sticky}.jp-connection__disconnect-dialog__actions p{margin-bottom:0}.jp-connection__disconnect-dialog__actions:before{background:linear-gradient(to bottom,transparent,var(--jp-white-off));bottom:calc(100% + 1px);content:"";display:block;height:80px;left:0;position:absolute;width:100%}.jp-connection__disconnect-dialog__btn-dismiss,.jp-connection__disconnect-dialog__btn-dismiss.components-button{background:var(--jp-black)!important;margin-right:10px}.jp-connection__disconnect-dialog__btn-disconnect{background:var(--jp-red)!important}.jp-connection__disconnect-dialog__btn-back-to-wp{background:var(--jp-black)!important}.jp-connection__disconnect-dialog__button-wrap{text-align:left}@media(min-width:960px){.jp-connection__disconnect-dialog__button-wrap{text-align:center}}.jp-connection__disconnect-dialog__error{color:var(--jp-red)}.jp-connection__disconnect-dialog__survey{margin-bottom:1.5rem;max-width:100%}.jp-connection__disconnect-dialog__step-copy{margin:0 auto;max-width:800px}.jp-connection__disconnect-dialog__step-copy--narrow{max-width:600px}@media(max-height:900px){.jp-connection__disconnect-dialog__content .jp-components__decorative-card{display:none}}@media(min-width:600px){.jp-connection__disconnect-dialog,.jp-connection__disconnect-dialog.components-modal__frame{max-width:calc(100% - 32px);width:100%}.jp-connection__disconnect-dialog__actions,.jp-connection__disconnect-dialog__content{padding:2rem}}@media(min-width:960px){.jp-connection__disconnect-dialog,.jp-connection__disconnect-dialog.components-modal__frame{display:flex;flex-direction:column;height:900px;width:1200px}.jp-connection__disconnect-dialog h1{font-size:var(--font-title-large)}.jp-connection__disconnect-dialog p.jp-connection__disconnect-dialog__large-text,.jp-connection__disconnect-dialog__large-text{font-size:1.5rem}.jp-connection__disconnect-dialog__content{padding:80px}.jp-connection__disconnect-dialog__actions{padding:2rem 3rem}.jp-row{margin-left:0}}.jp-connection__disconnect-card{background-color:var(--jp-white);border:none;border-radius:3px;box-shadow:0 0 15px var(--jp-gray-off);margin:0 auto 1rem;max-width:100%;padding:1rem 2rem;text-align:left;width:800px}.jp-connection__disconnect-card__group{margin-bottom:1rem;max-width:100%}.jp-connection__disconnect-card__card-content{display:block;font-size:.875rem}@media only screen and (min-width:782px){.jp-connection__disconnect-card__card-content{align-items:center;display:flex;justify-content:space-between}}.jp-connection__disconnect-card .jp-connection__disconnect-card__card-headline,.jp-connection__disconnect-card__card-headline{flex-shrink:0;font-size:1.25rem;font-weight:600;margin-bottom:0;margin-top:0}@media only screen and (min-width:782px){.jp-connection__disconnect-card .jp-connection__disconnect-card__card-headline,.jp-connection__disconnect-card__card-headline{font-size:1.5rem;margin-right:1.5rem}}@media only screen and (max-width:782px){.jp-connection__disconnect-card .jp-connection__disconnect-card__card-headline+.jp-disconnect-card__card-stat-block,.jp-connection__disconnect-card__card-headline+.jp-disconnect-card__card-stat-block{margin-top:.5rem}}.jp-connection__disconnect-card__card-stat-block{align-items:baseline;display:flex;flex-grow:1}@media only screen and (min-width:782px){.jp-connection__disconnect-card__card-stat-block{flex-direction:row-reverse}}.jp-connection__disconnect-card__card-description{flex-grow:1}@media only screen and (min-width:782px){.jp-connection__disconnect-card__card-description{text-align:right}}.jp-connection__disconnect-card__card-stat{font-size:1rem;font-weight:600;margin-right:.5rem}@media only screen and (min-width:782px){.jp-connection__disconnect-card__card-stat{font-size:1.5rem;margin-left:1rem;margin-right:0}}.jp-components__decorative-card{border-radius:8px;box-shadow:0 0 15px var(--jp-gray);display:flex;height:280px;margin:0 auto 3rem;max-width:100%;overflow:hidden;position:relative;width:360px}.jp-components__decorative-card__content,.jp-components__decorative-card__image{width:50%}.jp-components__decorative-card__image{background:var(--jp-gray);background-size:cover;position:relative}.jp-components__decorative-card__image:before{background-image:url('data:image/svg+xml;uf8,');content:"";display:block;height:8px;left:24px;position:absolute;top:24px;width:38px}.jp-components__decorative-card__content{background:#fff;padding:2rem}.jp-components__decorative-card__icon-container{background:var(--jp-red);border-radius:50px;height:80px;left:50%;position:absolute;top:50%;transform:translate(-50%,-50%);width:80px}.jp-components__decorative-card__icon{background-position:50%,50%;background-repeat:no-repeat;height:40px;left:50%;position:absolute;top:50%;transform:translate(-50%,-50%);width:40px}.jp-components__decorative-card__icon--unlink{background-image:url('data:image/svg+xml;uf8, ')}.jp-components__decorative-card__lines,.jp-components__decorative-card__lines:after,.jp-components__decorative-card__lines:before{background:#e9eff5;border-radius:6px;display:block;height:12px;position:relative;width:100%}.jp-components__decorative-card__lines:after,.jp-components__decorative-card__lines:before{content:"";top:calc(100% + 16px)}.jp-components__decorative-card__lines:after{top:calc(100% + 32px);width:75%}.jp-components__decorative-card--vertical{flex-direction:column}.jp-components__decorative-card--vertical .jp-components__decorative-card__content,.jp-components__decorative-card--vertical .jp-components__decorative-card__image{height:50%;width:100%}.jp-components__decorative-card--vertical .jp-components__decorative-card__lines{margin-left:auto;margin-right:auto;max-width:135px}.jp-components__decorative-card--vertical .jp-components__decorative-card__lines:after,.jp-components__decorative-card--vertical .jp-components__decorative-card__lines:before{margin-left:auto;margin-right:auto}.jp-connect__disconnect-survey-card{border:2px solid transparent;border-radius:4px;box-shadow:0 0 15px var(--jp-gray-off);margin-left:auto;margin-right:auto;max-width:100%;padding:1rem;position:relative;text-align:left;width:800px}.jp-connect__disconnect-survey-card--selected{background:var(--jp-gray-off);border-color:var(--jp-black)}.jp-connect__disconnect-survey-card:after{border-right:2px solid var(--jp-black);border-top:2px solid var(--jp-black);content:"";display:block;height:5px;position:absolute;right:1.5rem;top:50%;transform:translateY(-50%) rotate(45deg);width:5px}.jp-connect__disconnect-survey-card:hover{cursor:pointer}.jp-connect__disconnect-survey-card:focus:not(.jp-disconnect-survey-card--selected),.jp-connect__disconnect-survey-card:hover:not(.jp-disconnect-survey-card--selected){border-color:var(--jp-black-80)}.jp-connect__disconnect-survey-card__answer{align-items:center;display:flex;font-weight:700;margin:0}input.jp-connect__disconnect-survey-card__input{-webkit-appearance:none;background-color:transparent;border:none;color:var(--jp-black-80);flex-grow:1;max-width:calc(100% - 40px);padding-right:40px}.zvd4dCB_bBDiXJKKDqXm{position:relative}.ly4o9lSswAGHFXqGUEIO{position:absolute;right:32px;top:32px;z-index:1}.u64Go3kwEZ7MD9eji0H1{color:var(--jp-gray-50);font-size:13px;margin-bottom:16px;width:60%}._RT41NE3LU4R0ubcij2y{align-items:center;display:flex}._RT41NE3LU4R0ubcij2y li{background:none!important;margin:0!important;padding:0!important}.cFGWJeRiGHjAr8D7CWJW{margin-right:8px;max-width:110px}.Iz3l7a05TP6HK9S92TIL{width:16px}.lmQ0wFmnk4kKkGVjokPA{height:18px;margin-left:8px}.AoIs8wD92wKR8RpQj6Uc{align-items:center;display:inline-flex}.rV_5QyvhDnsVjCX4pb0h{--gray-90:#1e1e1e;fill:var(--gray-90);width:24px}.MO1jDNY8VPqeNS9xL8jE{align-items:center;display:flex;text-decoration:none}.jp-connection__connect-screen{--spacing-base:8px}.jp-connection__connect-screen__loading{display:none}.jp-connection__connect-screen .terms-of-service{margin-bottom:calc(var(--spacing-base)*3);margin-top:calc(var(--spacing-base)*4);max-width:360px}.jp-connection__connect-screen .terms-of-service a{text-decoration:underline}.jp-connection__connect-screen .jp-action-button{margin-top:40px}.jp-connection__connect-screen .jp-action-button--button{border-radius:4px;font-weight:600}.jp-connection__connect-screen .jp-action-button button{max-width:100%}.jp-connection__connect-screen .jp-action-button button:disabled{color:hsla(0,0%,100%,.4)}@media(max-width:782px){.jp-connection__connect-screen .jp-action-button button{max-width:none;width:100%}}.jp-connection__connect-screen__loading-message{position:absolute;clip:rect(1px,1px,1px,1px);border:0;height:1px;overflow:hidden;padding:0;white-space:nowrap;width:1px}.jp-connection__connect-screen__loading-message:empty{display:none}.jp-connection__connect-screen__footer{margin-top:32px}.jp-connection__connect-screen-layout{background:var(--jp-white);border-radius:4px;box-shadow:0 0 40px rgba(0,0,0,.08)}.jp-connection__connect-screen-layout__loading{display:none}.jp-connection__connect-screen-layout__left,.jp-connection__connect-screen-layout__right{box-sizing:border-box}.jp-connection__connect-screen-layout__left{padding:calc(var(--spacing-base)*3)}@media(min-width:600px){.jp-connection__connect-screen-layout__left{padding:64px 96px}}.jp-connection__connect-screen-layout__left .jetpack-logo{margin-bottom:24px}.jp-connection__connect-screen-layout__left h2{color:var(--jp-black);font-size:36px;font-style:normal;font-weight:700;line-height:40px;margin-bottom:0;margin-top:32px}.jp-connection__connect-screen-layout__left h3{color:var(--jp-black);font-size:24px;font-style:normal;font-weight:500;line-height:32px;margin-bottom:0;margin-top:32px}.jp-connection__connect-screen-layout__left li,.jp-connection__connect-screen-layout__left p{font-size:16px;font-style:normal;font-weight:400;line-height:24px}.jp-connection__connect-screen-layout__left p{color:#101517;margin:16px 0}.jp-connection__connect-screen-layout__left a{color:var(--jp-black);font-size:var(--font-body);font:inherit;height:auto;padding:0;text-decoration:underline}.jp-connection__connect-screen-layout__left a:hover{color:var(--jp-black);text-decoration-thickness:var(--jp-underline-thickness)}.jp-connection__connect-screen-layout__left a:focus{box-shadow:none!important;color:var(--jp-black)}.jp-connection__connect-screen-layout__left ul{list-style-type:none;padding:0}.jp-connection__connect-screen-layout__left ul li{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAANlBMVEVHcEwFnwUInggGnggGnggHnAcAnwUFnQcAnwcGnwkFnQgGnQgFnwcGnQYFnQcFnAcGnQkDnwdhiL0pAAAAEnRSTlMAMF//f2Aw7yBQ3+9gcIBgcED+HDbkAAAAZklEQVR4Ae3LNwICARDDQC0+cv7/Y8mwV9odSfWIcf/+VegnGkIvDaGXKvTTn/Gz+Uf5xTL0K1XotS7fs5H6GHvvaO8d7c3j7rdgHne/A/PYt/cO+R42oYdN6OEQetiFHo4A//6dAXqtBEkmtWutAAAAAElFTkSuQmCC) no-repeat;background-size:24px;color:var(--jp-black);margin-bottom:9px;padding-left:30px}.jp-connection__connect-screen-layout__right{padding:64px 0}.jp-connection__connect-screen-layout__right img{max-width:100%}.jp-connection__connect-screen-layout__two-columns{display:flex;flex-wrap:wrap}.jp-connection__connect-screen-layout__two-columns .jp-connection__connect-screen-layout__left{flex-basis:100%;flex-grow:1}@media(min-width:1080px){.jp-connection__connect-screen-layout__two-columns .jp-connection__connect-screen-layout__left{flex-basis:52%}}.jp-connection__connect-screen-layout__two-columns .jp-connection__connect-screen-layout__right{background:#f9f9f6;display:none;flex-basis:47%;flex-grow:1}@media(min-width:1080px){.jp-connection__connect-screen-layout__two-columns .jp-connection__connect-screen-layout__right{display:block}}.rna{overflow:hidden}.rna .jp-connection__connect-screen-layout__left{position:relative;z-index:2}.rna .jp-connection__connect-screen-layout__left h2{font-weight:700;margin-top:0}.rna .jp-connection__connect-screen-layout__left h3{margin-top:24px}@media(min-width:600px){.rna .jp-connection__connect-screen-layout__left{padding:4rem 6rem 4rem 4rem}}@media(min-width:1080px){.rna .jp-connection__connect-screen-required-plan__pricing-card{position:absolute;right:calc(var(--spacing-base)*-45);top:calc(var(--spacing-base)*9.25)}}.rna .jp-connection__connect-screen-required-plan__pricing-card .jp-components__pricing-card{border-radius:var(--jp-border-radius-rna);max-width:100%;width:425px}.rna .jp-connection__connect-screen-required-plan__pricing-card .jp-components__pricing-card__title{margin-top:.625rem}@media(min-width:960px){.rna .jp-connection__connect-screen-required-plan__pricing-card .jp-components__pricing-card{padding:3rem}}.rna .jp-connection__connect-screen-required-plan__pricing-card .components-button{margin-bottom:0}.rna .jp-backup-dashboard-promotion ul.jp-product-promote li{margin-bottom:.75rem}.rna .jp-connection__connect-screen-layout__color-blobs{clip-path:polygon(100% 0,100% 100%,0 0,0 0);display:none;height:677px;position:absolute;right:0;top:0;width:363px;z-index:1}.rna .jp-connection__connect-screen-layout__color-blobs__blue,.rna .jp-connection__connect-screen-layout__color-blobs__green,.rna .jp-connection__connect-screen-layout__color-blobs__yellow{border-radius:50%;filter:blur(50px);position:absolute}.rna .jp-connection__connect-screen-layout__color-blobs__blue{background-color:var(--jp-blue-5);height:400px;right:-100px;top:-275px;width:400px;z-index:3}.rna .jp-connection__connect-screen-layout__color-blobs__yellow{background-color:var(--jp-yellow-5);height:250px;right:-25px;top:10px;width:250px;z-index:2}.rna .jp-connection__connect-screen-layout__color-blobs__green{background-color:var(--jp-green-5);height:300px;right:0;top:175px;width:300px;z-index:1}@media(min-width:1080px){.rna .jp-connection__connect-screen-layout__color-blobs{display:initial}}.terms-of-service{color:var(--jp-black);font-size:var(--font-body)}.terms-of-service .terms-of-service__link{color:var(--jp-green-50);text-decoration:underline;white-space:nowrap}.TcCZnGE6mad8Dvz9pCZi{background:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgZmlsbD0ibm9uZSI+PHBhdGggc3Ryb2tlPSIjRDYzNjM5IiBzdHJva2Utd2lkdGg9IjEuNSIgZD0iTTEyIDIwYTggOCAwIDEgMCAwLTE2IDggOCAwIDAgMCAwIDE2WiIvPjxwYXRoIGZpbGw9IiNENjM2MzkiIGQ9Ik0xMyA3aC0ydjZoMnpNMTMgMTVoLTJ2MmgyeiIvPjwvc3ZnPg==) no-repeat 0 0;color:var(--jp-red);line-height:25px;padding-left:25px}._mn6o2Dtm5pfFWc8_A1K{--spacing-base:8px;min-width:264px}.SWwV4Pw6OZ5vU3PqPXmr{--product-card-shadow:rgb(0 0 0/3%);background-color:var(--jp-white);border:1px solid var(--jp-gray);border-radius:var(--jp-border-radius);box-shadow:0 2px 6px var(--product-card-shadow),0 1px 2px var(--product-card-shadow)}.r7tUofa9Z3A5ziKVR1H7{align-items:center;display:flex}.r7tUofa9Z3A5ziKVR1H7 img{object-fit:cover;width:100%}.i_AnOR3MaQLraGvb2QU5{background-color:#f9f9f6}.YcYvLvdvWrb1EUZoVsE8{display:flex;flex-wrap:wrap;gap:calc(var(--horizontal-spacing)*2);justify-content:space-between}.uGTTsKoIOoZdYhk6uPnl{white-space:nowrap}.uGTTsKoIOoZdYhk6uPnl>span{font-size:var(--font-body-small)}.hdasSNj9k3Sc5PwXK4uE{margin-right:4px;width:16px}.eWN8Hj0SBRDq1F48n_Fg{--gray-70:#3c434a;align-items:center;color:var(--gray-70);display:flex;font-size:14px;text-decoration:none}.p4qz2tkq0p9hxucJ6Qk2{--padding:calc(var(--spacing-base)*4);color:var(--jp-black)}.lbNDyXioOwvyvbALtCBm{--gap:calc(var(--spacing-base)*3);padding:var(--padding) 0;position:relative}.s2Lsn4kbm6BrS3DSndRB .lbNDyXioOwvyvbALtCBm{column-gap:var(--gap);display:grid;grid-auto-flow:column;grid-template-columns:repeat(var(--columns),1fr);grid-template-rows:repeat(var(--rows),minmax(min-content,max-content))}.cLaNK_XcbTGlRQ4Tp43Q{margin-top:var(--padding)}.s2Lsn4kbm6BrS3DSndRB .cLaNK_XcbTGlRQ4Tp43Q{display:contents}.cLaNK_XcbTGlRQ4Tp43Q.CYt1X0eH1icRjhtJ28jx>*{background:var(--jp-white);position:relative}.cLaNK_XcbTGlRQ4Tp43Q.CYt1X0eH1icRjhtJ28jx>:after{bottom:0;box-shadow:0 4px 24px rgba(0,0,0,.05);content:"";left:0;position:absolute;right:0;top:0;z-index:-1}.cLaNK_XcbTGlRQ4Tp43Q>:first-child{border-top-left-radius:var(--jp-border-radius);border-top-right-radius:var(--jp-border-radius);border-width:1px 1px 0}.cLaNK_XcbTGlRQ4Tp43Q>:last-child{border-bottom-left-radius:var(--jp-border-radius);border-bottom-right-radius:var(--jp-border-radius);border-width:0 1px 1px}.DAkZc1P9A3K12fjEliMg{display:flex;flex-direction:column;justify-content:space-between;padding:var(--padding)}.WUBuYABl8nymjs9NnCEL{align-items:center;display:flex;padding-bottom:calc(var(--spacing-base)*2);position:relative}.WUBuYABl8nymjs9NnCEL:not(:nth-child(2)){padding-top:calc(var(--spacing-base)*2)}.WUBuYABl8nymjs9NnCEL:not(:nth-child(2)):before{background-color:var(--jp-gray);content:"";height:1px;left:var(--padding);position:absolute;right:var(--padding);top:0;z-index:5}.s2Lsn4kbm6BrS3DSndRB .WUBuYABl8nymjs9NnCEL:not(:nth-child(2)):before{left:0;right:unset;width:calc(100% + var(--gap))}.s2Lsn4kbm6BrS3DSndRB .lbNDyXioOwvyvbALtCBm>:last-child .WUBuYABl8nymjs9NnCEL:not(:nth-child(2)):before{width:100%}.ANtCFeb41NhA8PA3H7ZN,.WUBuYABl8nymjs9NnCEL:last-of-type{padding-bottom:var(--padding)}.Ql2gy_148yW8Vw5vhaKD{padding-left:var(--padding);padding-right:var(--padding)}.EAQrAnQEW1z1BfdY5gbC{margin:0 var(--spacing-base);fill:var(--jp-gray);flex-shrink:0}.EAQrAnQEW1z1BfdY5gbC.JDSTlLoOC_4aUoH2oNM2{fill:var(--jp-green-40)}.EAQrAnQEW1z1BfdY5gbC.zNdQRJ1w7BvaQOYyqzHK{fill:var(--jp-red-50)}.lr7vbX95SKtoe7DarJcZ{margin-left:auto}.s2Lsn4kbm6BrS3DSndRB .lr7vbX95SKtoe7DarJcZ{margin:0 var(--spacing-base);top:1px}.WUBuYABl8nymjs9NnCEL .KRrGp2xdkeBOxLZeuQ6X{fill:var(--jp-gray-20);flex-shrink:0}.H_ZJiRVJg0LiMXPGOcmt{text-align:center;width:fit-content}.H_ZJiRVJg0LiMXPGOcmt>a{color:#000}.s2Lsn4kbm6BrS3DSndRB .H_ZJiRVJg0LiMXPGOcmt{grid-column:2;overflow:hidden;padding-left:var(--padding);padding-right:var(--padding);white-space:nowrap}.x21z_DixObRDsDaWotP1{align-items:right;display:flex;justify-content:right;margin:0 calc(var(--spacing-base)*4)}.components-popover:not(.is-without-arrow):before{border-color:var(--jp-gray)}.icon-tooltip-helper .components-popover:not([data-y-axis=middle])[data-x-axis=left] .components-popover__content{margin-right:-62px}.icon-tooltip-helper .components-popover:not([data-y-axis=middle])[data-x-axis=right] .components-popover__content{margin-left:-62px}.icon-tooltip-helper .components-popover[data-y-axis=bottom] .components-popover__content{top:2px!important}.icon-tooltip-helper .components-popover:not(.is-without-arrow)[data-y-axis=bottom]:before{top:-6px!important}.icon-tooltip-helper .components-popover:not(.is-without-arrow)[data-y-axis=bottom]:after{top:-4px!important}.icon-tooltip-helper .components-popover[data-y-axis=top] .components-popover__content{bottom:10px!important}.icon-tooltip-helper .components-popover:not(.is-without-arrow)[data-y-axis=top]:before{bottom:3px}.icon-tooltip-helper .components-popover:not(.is-without-arrow)[data-y-axis=top]:after{bottom:4px}.icon-tooltip-helper.is-wide .components-popover__content{width:440px}.icon-tooltip-wrapper{color:var(--jp-black);display:inline-block;position:relative}.icon-tooltip-wrapper .components-button.is-link:focus:not(:disabled){box-shadow:none}.icon-tooltip-helper{height:18px;left:-53px;pointer-events:none;position:absolute;top:0;width:124px}.icon-tooltip-container{pointer-events:all}.icon-tooltip-container .components-popover__content{border:1px solid var(--jp-gray);border-radius:4px;margin:0 10px;max-width:90vw;outline:none;padding:24px;white-space:normal;width:304px}.icon-tooltip-title{font-size:16px;font-weight:600;line-height:19px}.icon-tooltip-title:not(:last-child){margin-bottom:8px}.icon-tooltip-content{font-size:14px;font-weight:400;line-height:24px}.icon-tooltip-content ul{list-style-type:disc;margin:0 0 0 1rem}.icon-tooltip-content ul li:last-child{margin-bottom:0}.dovianZYLKhnbnh9I06o{align-items:flex-start;display:flex;flex-wrap:wrap;justify-content:flex-end}.lljtQMhW7lq5tE5SDJEf{align-items:flex-start;display:flex;flex-basis:0;flex-grow:2}.lljtQMhW7lq5tE5SDJEf .NubApIV1vQCRUNprfm6b{margin-left:auto}.dhFQXpZfMwVI8vuYHnwC{align-items:flex-start;display:inline-flex;flex:0 0 auto;position:relative}.dhFQXpZfMwVI8vuYHnwC:first-child{margin-right:calc(var(--spacing-base)*2)}.dhFQXpZfMwVI8vuYHnwC.eD7hzxFmdtG_MgmBtl_k{color:var(--jp-gray-20)}.dhFQXpZfMwVI8vuYHnwC.eD7hzxFmdtG_MgmBtl_k:after{background:var(--jp-red);border-radius:var(--jp-border-radius);content:" ";display:block;height:3px;margin-top:-2px;pointer-events:none;position:absolute;top:50%;width:100%}.C64ZjjUAqJC1T2Sa7apS{align-items:flex-start;display:flex;flex-wrap:wrap;justify-content:flex-start;margin-bottom:calc(var(--spacing-base)*3)}.UpZDGew6Ay1hPoP6eI7b{color:var(--jp-gray-40);font-size:var(--font-body-small);line-height:20px}.UpZDGew6Ay1hPoP6eI7b:after{content:"​"}.NubApIV1vQCRUNprfm6b{background-color:var(--jp-yellow-10);border-radius:4px;font-size:13px;font-weight:600;margin-left:var(--spacing-base);padding-left:var(--spacing-base);padding-right:var(--spacing-base)}.TDiiPbuW1Z0_05u_pvcK{font-weight:400}.VHYulMcpzbr10HWR0iSE{align-items:flex-start;border:1px solid var(--jp-black);border-color:var(--jp-gray-5);border-left-width:6px;border-radius:4px;display:flex;font-size:var(--font-body);padding:24px 31px 27px 18px}.FGpSkMCiIHQjszcV0dbn{margin-right:20px}.FGpSkMCiIHQjszcV0dbn,.KoWZcCwhW13xvkEb0QON{height:calc(var(--spacing-base)*3);width:calc(var(--spacing-base)*3)}.KoWZcCwhW13xvkEb0QON{background-color:transparent;border:none;cursor:pointer;outline:none}@media screen and (max-width:600px){.VHYulMcpzbr10HWR0iSE{box-shadow:0 4px 8px rgba(0,0,0,.03),0 1px 2px rgba(0,0,0,.06);padding-top:68px;position:relative}.FGpSkMCiIHQjszcV0dbn{left:24px;position:absolute;top:24px}.KoWZcCwhW13xvkEb0QON{position:absolute;right:24px;top:24px}}.smrfczkC53EaFM8OJUXs{flex-grow:1}.IKYRWoPwt9xOVEx1wzNS{font-weight:600;margin-bottom:8px}.qM0qY6mPYp1MPN54A3Kg{align-items:center;display:flex;margin-top:20px}.qM0qY6mPYp1MPN54A3Kg a,.qM0qY6mPYp1MPN54A3Kg a:active,.qM0qY6mPYp1MPN54A3Kg a:focus,.qM0qY6mPYp1MPN54A3Kg a:hover{color:var(--jp-black)}.qM0qY6mPYp1MPN54A3Kg>*{margin-right:24px}.A5YkDkkXuiYgavrY6Nux{border-left-color:var(--jp-red)}.A5YkDkkXuiYgavrY6Nux .y_IPyP1wIAOhyNaqvXJq{fill:var(--jp-red)}.cT5rwuPMZzWvi5o6shMl{border-left-color:var(--jp-yellow-20)}.cT5rwuPMZzWvi5o6shMl .y_IPyP1wIAOhyNaqvXJq{fill:var(--jp-yellow-20)}.yo0O3uvNomPsYUXFCpAS{border-left-color:var(--black)}.yo0O3uvNomPsYUXFCpAS .y_IPyP1wIAOhyNaqvXJq{fill:var(--black)}.oZdDFf1jBLkzn5ICCC6x{border-left-color:var(--jp-green)}.oZdDFf1jBLkzn5ICCC6x .y_IPyP1wIAOhyNaqvXJq{fill:var(--jp-green)}.q0T8YyQxRawhpDtvJjxI{background-color:var(--jp-white);height:100%;padding:calc(var(--spacing-base)*8);position:relative}.B7JDqI_vtKxSy5GjvqA1{display:flex;flex-direction:column;height:100%}.zj7xadmhIWeuf7ZwvVTS{align-items:center;background:var(--jp-black);border-radius:var(--jp-border-radius) var(--jp-border-radius) 0 0;color:var(--jp-white);display:flex;height:calc(var(--spacing-base)*4);left:0;padding:0 var(--spacing-base);position:absolute;top:0;width:100%}.GsioW6IsC8EMYE3U6788{fill:var(--jp-white);margin-right:var(--spacing-base)}.cfEO8udWbRGPFJzW8Jg5,.dbz07JqxOlivjKO4vBEF{align-items:center;display:flex;height:calc(var(--spacing-base)*4);margin-bottom:calc(var(--spacing-base)*4)}.zlh3zbjUe4Z8cBs7uVVe{fill:#8c8f94;height:24px;line-height:24px}.qoZuzG5EcDa231hC6t0P{align-items:center;display:flex;justify-content:center}.qoZuzG5EcDa231hC6t0P svg{margin-right:var(--spacing-base)}.Q6uUUQCPWS6_6nLxIn68{display:inline-block;min-height:42px;padding:.5em 2em;text-align:center;width:100%}.Q6uUUQCPWS6_6nLxIn68 .YU4iBCRze09ZP3iCsdcb{margin:0}.Q6uUUQCPWS6_6nLxIn68.components-button.is-primary{height:auto;white-space:normal}.Q6uUUQCPWS6_6nLxIn68.is-secondary:hover:not(:disabled){background-color:var(--jp-black);color:var(--jp-white)}.OrQG7DjDd9Ha2Xj1Mx3L{margin-top:calc(var(--spacing-base)*2)}.Q1jaYDpa2AVfJpA29wT0{flex-grow:1;margin:0;margin-bottom:calc(var(--spacing-base)*2);padding:0}.Q1jaYDpa2AVfJpA29wT0 li{align-items:flex-start;display:flex;list-style:none;margin-bottom:var(--spacing-base)}.Q1jaYDpa2AVfJpA29wT0 svg{fill:var(--jp-green-primary);flex-shrink:0;margin-right:var(--spacing-base)}.HL4gSxsF0skYGhGuqH90 li:last-of-type{font-weight:700}.sEcLfpWjo0GF7QrxD3Lt{margin-top:calc(var(--spacing-base)*2)}.xgv3jRkeF39aEQELCwru{align-items:flex-end;color:var(--jp-black);display:flex;flex-wrap:wrap}.twlleZ5Ehq4bB7CvKVSW{position:relative}.twlleZ5Ehq4bB7CvKVSW:first-child{margin-right:calc(var(--spacing-base)*2)}.twlleZ5Ehq4bB7CvKVSW.Qg4rPEvXsqmod1s_31d8{color:var(--jp-gray-20)}.twlleZ5Ehq4bB7CvKVSW.Qg4rPEvXsqmod1s_31d8:after{background:var(--jp-red);border-radius:var(--jp-border-radius);content:" ";display:block;height:3px;margin-top:-2px;pointer-events:none;position:absolute;top:50%;width:100%}.ApsgxIornVy_3KnciVeJ{color:var(--jp-gray-40);margin-bottom:calc(var(--spacing-base)*3)}.NMxcZL17aEP7v81uG3zD{margin-top:calc(var(--spacing-base)*5)}.gCTKfAPzJqZas7CaRbKN{margin-bottom:calc(var(--spacing-base)*4)}.demNsMJjhi7BLY7xhjU5{align-items:center;display:flex;font-size:var(--font-body);line-height:calc(var(--spacing-base)*3);margin:calc(var(--spacing-base)*2) 0;min-height:calc(var(--spacing-base)*3)}.QiUjdjJSkqh6nH7YMG5A{align-self:flex-start;height:calc(var(--spacing-base)*3);margin-right:calc(var(--spacing-base)/2);width:calc(var(--spacing-base)*3)}.Q080AHcq29J2fc68Hhk5{color:var(--jp-red)}.Q080AHcq29J2fc68Hhk5 .hYWbIwhppukXmGnsiT9H{fill:var(--jp-red)}.JjHuxWly0HI9C60gorbq{color:var(--jp-yellow-40)}.JjHuxWly0HI9C60gorbq .hYWbIwhppukXmGnsiT9H{fill:var(--jp-yellow-40)}.Cm8ZFHi3mngl4cj9Gatx{color:var(--jp-blue-40)}.Cm8ZFHi3mngl4cj9Gatx .hYWbIwhppukXmGnsiT9H{fill:var(--jp-blue-40)}.ytGBsU015p3LGwOPwFDx{color:var(--jp-green)}.ytGBsU015p3LGwOPwFDx .hYWbIwhppukXmGnsiT9H{fill:var(--jp-green)}.svE2cJL5t2FarzcDQYNe{--product-card-shadow:rgb(0 0 0/3%);background-color:var(--jp-white);border:1px solid var(--jp-gray);border-radius:var(--jp-border-radius);box-shadow:0 2px 6px var(--product-card-shadow),0 1px 2px var(--product-card-shadow)}.dvEJEDNTnmVfVxtLa4uU{align-items:center;display:flex}.dvEJEDNTnmVfVxtLa4uU img{object-fit:cover;width:100%}.K1VY4DNP8PHMWAEVBC_h{background-color:#f9f9f6}.nk_COGPrkBNLp7lVt4sQ{display:flex;flex-wrap:wrap;gap:calc(var(--horizontal-spacing)*2);justify-content:space-between}.ukgQ5TmLablG3svUKjdw{white-space:nowrap}.ukgQ5TmLablG3svUKjdw>span{font-size:var(--font-body-small)}.EUcF2LKeC2GyhWD2FKCP{background-color:var(--jp-white);height:100%;padding:calc(var(--spacing-base)*8);position:relative}.Bm21LIBQtpRo3ZhOxXBG{display:flex;gap:calc(var(--spacing-base)*2)}.jp-license-activation-screen-controls{background:var(--jp-white);display:flex;flex-direction:column;justify-content:space-between;padding:32px}.jp-license-activation-screen-controls h1{font-size:44px;font-weight:700;line-height:1.4;margin:.67em 0}.jp-license-activation-screen-controls p{font-size:var(--font-body);margin:1em 0}.jp-license-activation-screen-controls label{font-size:var(--font-body);font-weight:600}@media screen and (min-width:780px){.jp-license-activation-screen-controls{padding:64px}}.jp-license-activation-screen-controls .jp-license-activation-screen-controls--license-field,.jp-license-activation-screen-controls .jp-license-activation-screen-controls--license-field-with-error{max-width:500px}.jp-license-activation-screen-controls .jp-license-activation-screen-controls--license-field .components-input-control__label.components-input-control__label.components-input-control__label,.jp-license-activation-screen-controls .jp-license-activation-screen-controls--license-field-with-error .components-input-control__label.components-input-control__label.components-input-control__label{font-size:var(--font-body);font-weight:600}.jp-license-activation-screen-controls .jp-license-activation-screen-controls--license-field input.components-text-control__input,.jp-license-activation-screen-controls .jp-license-activation-screen-controls--license-field select.components-select-control__input,.jp-license-activation-screen-controls .jp-license-activation-screen-controls--license-field-with-error input.components-text-control__input,.jp-license-activation-screen-controls .jp-license-activation-screen-controls--license-field-with-error select.components-select-control__input{border-radius:var(--jp-border-radius);font-size:18px;line-height:24px;margin:0;min-height:48px}.jp-license-activation-screen-controls .jp-license-activation-screen-controls--license-field input.components-text-control__input{border:1px solid var(--jp-gray-40)}.jp-license-activation-screen-controls .jp-license-activation-screen-controls--license-field-with-error input.components-text-control__input,.jp-license-activation-screen-controls .jp-license-activation-screen-controls--license-field-with-error select.components-select-control__input{border:1px solid var(--jp-red)}.jp-license-activation-screen-controls .jp-license-activation-screen-controls--license-field-error{align-items:flex-start;color:var(--jp-red);display:flex;flex-direction:row;max-width:500px}.jp-license-activation-screen-controls .jp-license-activation-screen-controls--license-field-error svg{margin-right:4px;fill:var(--jp-red);min-width:24px}.jp-license-activation-screen-controls .jp-license-activation-screen-controls--license-field-error span{font-size:var(--font-body)}.jp-license-activation-screen-controls .jp-license-activation-screen-controls--button,.jp-license-activation-screen-controls .jp-license-activation-screen-controls--button:active{background-color:var(--jp-black);border-radius:4px;color:var(--jp-white);display:flex;font-size:16px;font-size:var(--font-body);font-style:normal;font-weight:600;justify-content:center;line-height:24px;margin-top:24px;min-height:48px;min-width:158px;padding:13.5px 45px;width:100%}@media screen and (min-width:480px){.jp-license-activation-screen-controls .jp-license-activation-screen-controls--button,.jp-license-activation-screen-controls .jp-license-activation-screen-controls--button:active{width:auto}}.jp-license-activation-screen-controls .jp-license-activation-screen-controls--button:active:hover,.jp-license-activation-screen-controls .jp-license-activation-screen-controls--button:hover{background-color:var(--jp-black-80);color:var(--jp-white)}.jp-license-activation-screen-controls .jp-license-activation-screen-controls--button:active:focus,.jp-license-activation-screen-controls .jp-license-activation-screen-controls--button:focus{background-color:var(--jp-black-80);border:1px solid var(--jp-white);color:var(--jp-white)}.jp-license-activation-screen-controls .jp-license-activation-screen-controls--button:active:disabled,.jp-license-activation-screen-controls .jp-license-activation-screen-controls--button:active[disabled],.jp-license-activation-screen-controls .jp-license-activation-screen-controls--button:disabled,.jp-license-activation-screen-controls .jp-license-activation-screen-controls--button[disabled]{background-color:var(--jp-gray);color:var(--jp-gray-20)}.jp-license-activation-screen-controls .jp-license-activation-screen-controls--button .jp-components-spinner,.jp-license-activation-screen-controls .jp-license-activation-screen-controls--button:active .jp-components-spinner{width:100%}.jp-license-activation-screen-illustration{align-items:center;background:var(--jp-white-off);display:flex;flex-direction:column;justify-content:space-between;padding:32px}.jp-license-activation-screen-illustration--wrapper{display:flex;flex:1}.jp-license-activation-screen-illustration--wrapper img{align-self:center;height:auto;max-width:100%}.jp-license-activation-screen-illustration--support-link{flex:0}.components-button.jp-license-activation-screen-success-info--button,.components-button.jp-license-activation-screen-success-info--button:active,.components-button.jp-license-activation-screen-success-info--button:visited{background-color:var(--jp-black);border-radius:4px;color:var(--jp-white);font-size:16px;font-size:var(--font-body);font-style:normal;font-weight:600;justify-content:center;line-height:24px;margin:0 40px 20px 0;min-height:48px;min-width:158px;padding:13.5px 45px;width:100%}@media screen and (min-width:480px){.components-button.jp-license-activation-screen-success-info--button,.components-button.jp-license-activation-screen-success-info--button:active,.components-button.jp-license-activation-screen-success-info--button:visited{width:auto}}.components-button.jp-license-activation-screen-success-info--button:active:hover,.components-button.jp-license-activation-screen-success-info--button:hover,.components-button.jp-license-activation-screen-success-info--button:visited:hover{background-color:var(--jp-black-80);color:var(--jp-white)}.components-button.jp-license-activation-screen-success-info--button:active:focus,.components-button.jp-license-activation-screen-success-info--button:focus,.components-button.jp-license-activation-screen-success-info--button:visited:focus{background-color:var(--jp-black-80);border:1px solid var(--jp-white);color:var(--jp-white)}.components-button.jp-license-activation-screen-success-info--button:active:disabled,.components-button.jp-license-activation-screen-success-info--button:active[disabled],.components-button.jp-license-activation-screen-success-info--button:disabled,.components-button.jp-license-activation-screen-success-info--button:visited:disabled,.components-button.jp-license-activation-screen-success-info--button:visited[disabled],.components-button.jp-license-activation-screen-success-info--button[disabled]{background-color:var(--jp-gray);color:var(--jp-gray-20)}.components-button.jp-license-activation-screen-success-info--button .jp-components-spinner,.components-button.jp-license-activation-screen-success-info--button:active .jp-components-spinner,.components-button.jp-license-activation-screen-success-info--button:visited .jp-components-spinner{width:100%}.jp-license-activation-screen-success-info--product-details h1{line-height:52px}.jp-license-activation-screen-success-info--product-details a{color:var(--jp-black);text-decoration:underline!important}.jp-license-activation-screen-success-info--external-link{color:var(--jp-black);font-size:16px;font-style:normal;font-weight:600;text-decoration:underline!important;white-space:nowrap}.jp-wrap{align-items:center;display:flex;flex-wrap:wrap;margin:0 auto;max-width:1128px}.jp-row{display:grid;grid-gap:24px;grid-template-columns:repeat(4,1fr);margin:0 16px;width:100%}@media(min-width:600px){.jp-row{grid-template-columns:repeat(8,1fr);margin:0 18px}}@media(min-width:960px){.jp-row{grid-template-columns:repeat(12,1fr);margin:0 24px;max-width:1128px}}.sm-col-span-1{grid-column-end:span 1}.sm-col-span-2{grid-column-end:span 2}.sm-col-span-3{grid-column-end:span 3}.sm-col-span-4{grid-column-end:span 4}@media(min-width:600px){.md-col-span-1{grid-column-end:span 1}.md-col-span-2{grid-column-end:span 2}.md-col-span-3{grid-column-end:span 3}.md-col-span-4{grid-column-end:span 4}.md-col-span-5{grid-column-end:span 5}.md-col-span-6{grid-column-end:span 6}.md-col-span-7{grid-column-end:span 7}.md-col-span-8{grid-column-end:span 8}}@media(min-width:960px){.lg-col-span-1{grid-column-end:span 1}.lg-col-span-2{grid-column-end:span 2}.lg-col-span-3{grid-column-end:span 3}.lg-col-span-4{grid-column-end:span 4}.lg-col-span-5{grid-column-end:span 5}.lg-col-span-6{grid-column-end:span 6}.lg-col-span-7{grid-column-end:span 7}.lg-col-span-8{grid-column-end:span 8}.lg-col-span-9{grid-column-end:span 9}.lg-col-span-10{grid-column-end:span 10}.lg-col-span-11{grid-column-end:span 11}.lg-col-span-12{grid-column-end:span 12}}@media(max-width:960px){.md-col-span-0{display:none}}@media(max-width:600px){.sm-col-span-0{display:none}}.jp-cut{border:2px solid var(--jp-green-primary);border-radius:var(--jp-border-radius);margin:32px 0;padding:16px 64px 16px 24px;position:relative;text-decoration:none}.jp-cut,.jp-cut span{display:block}.jp-cut span:last-of-type{font-weight:600}.jp-cut:focus span:last-of-type,.jp-cut:hover span:last-of-type{text-decoration:underline;text-decoration-thickness:var(--jp-underline-thickness)}.jp-cut:focus:after,.jp-cut:hover:after{transform:translateY(-50%) translateX(8px)}.jp-cut:after{color:var(--jp-green-primary);content:"→";font-size:24px;font-weight:600;position:absolute;right:24px;top:50%;transform:translateY(-50%);transition:transform .15s ease-out}.jp-license-activation-screen-success-info{background:var(--jp-white);display:flex;flex-direction:column;justify-content:space-between;padding:32px}.jp-license-activation-screen-success-info h1{font-size:44px;font-weight:700;line-height:1.4;margin:.67em 0}.jp-license-activation-screen-success-info p{font-size:var(--font-body);margin:1em 0}.jp-license-activation-screen-success-info label{font-size:var(--font-body);font-weight:600}@media screen and (min-width:780px){.jp-license-activation-screen-success-info{padding:64px}}@media screen and (max-width:480px){.jp-license-activation-screen-success-info .jp-license-activation-screen-success-info--buttons{text-align:center}}:root{--font-title-large:36px;--font-title-small:24px;--font-body:16px;--font-label:12px;--jp-black:#000;--jp-black-80:#2c3338;--jp-white:#fff;--jp-white-off:#f9f9f6;--jp-gray:#dcdcde;--jp-gray-0:#f6f7f7;--jp-gray-5:#dcdcde;--jp-gray-10:#c3c4c7;--jp-gray-20:#a7aaad;--jp-gray-30:#8c8f94;--jp-gray-40:#787c82;--jp-gray-50:#646970;--jp-gray-60:#50575e;--jp-gray-70:#3c434a;--jp-gray-80:#2c3338;--jp-gray-90:#1d2327;--jp-gray-100:#101517;--jp-gray-off:#e2e2df;--jp-yellow-5:#f5e6b3;--jp-yellow-10:#f2cf75;--jp-orange-20:#faa754;--jp-blue-5:#ced9f2;--jp-red-0:#f7ebec;--jp-red-50:#d63638;--jp-red-60:#b32d2e;--jp-red-80:#8a2424;--jp-red:#d63639;--jp-pink:#c9356e;--jp-green-0:#f0f2eb;--jp-green-5:#d0e6b8;--jp-green-10:#9dd977;--jp-green-20:#64ca43;--jp-green-30:#2fb41f;--jp-green-40:#069e08;--jp-green-50:#008710;--jp-green-60:#007117;--jp-green-70:#005b18;--jp-green-80:#004515;--jp-green-90:#003010;--jp-green-100:#001c09;--jp-green:#069e08;--jp-green-primary:var(--jp-green-40);--jp-green-secondary:var(--jp-green-30);--jp-border-radius:4px;--jp-border-radius-rna:8px;--jp-menu-border-height:1px;--jp-underline-thickness:2px;--jp-modal-padding-large:32px;--jp-modal-padding:24px;--jp-modal-padding-small:16px;--jp-modal-radius:8px;--jp-button-padding:8px;--jp-button-radius:4px;--jp-gap:16px;--jp-highlight:#3858e9}body{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;margin:0;min-height:100%;padding:0}.EiaNctK1_P9pPqOeiaSI{align-items:center;display:flex;flex-wrap:wrap;margin:0 auto;max-width:1128px}.ogHZg_sJCljylz3VJfsf{display:grid;grid-gap:24px;grid-template-columns:repeat(4,1fr);margin:0 16px;width:100%}@media(min-width:600px){.ogHZg_sJCljylz3VJfsf{grid-template-columns:repeat(8,1fr);margin:0 18px}}@media(min-width:960px){.ogHZg_sJCljylz3VJfsf{grid-template-columns:repeat(12,1fr);margin:0 24px;max-width:1128px}}.zv7eGvijKRkbPVakubHw{grid-column-end:span 1}.VoJNoiya_1ck3_kXS6_C{grid-column-end:span 2}.ecv0NO526NoTNbpALA1A{grid-column-end:span 3}.OfBdkceMzeHvRbzhqDlP{grid-column-end:span 4}@media(min-width:600px){.JLb3NpEKN8pOaWd7K1bu{grid-column-end:span 1}.fsMPGqPKE4mjMIPFwl77{grid-column-end:span 2}.DIK_zdaGAQ09eKspBJ4E{grid-column-end:span 3}.shXYpxPu3WCJsR8aOHtz{grid-column-end:span 4}.s7ElrOqG_yGd5SIfwqOR{grid-column-end:span 5}.Cxml9uzGvArAL8_RDs_p{grid-column-end:span 6}.aANxBKDGx72eDqU0iUPj{grid-column-end:span 7}.XxyzuTY3mnQcl9EGZadm{grid-column-end:span 8}}@media(min-width:960px){.Sfo4WaSNIWInJ93Abd3w{grid-column-end:span 1}.tQS7SKUGrU4THhWMysbo{grid-column-end:span 2}.I94U7mpY4h16pcOksZNF{grid-column-end:span 3}.uWMb9k77kQxBdS5MTt0s{grid-column-end:span 4}.rKwEEZQxK9s_POMg5Jss{grid-column-end:span 5}.UcPXX_s06IPCkF7ZjH3D{grid-column-end:span 6}.CrQdtiCFkRbzY6K2dFvt{grid-column-end:span 7}.rEUALOmOdUBXO0Us871z{grid-column-end:span 8}.NqXa9TlcTEviVsB53hBV{grid-column-end:span 9}.OnWVeiQiwgQ9lzdGPW66{grid-column-end:span 10}.D2PkTcy7b8u2K9QXY6VQ{grid-column-end:span 11}.EcqBhzAyxo5RDc2Y6m7K{grid-column-end:span 12}}@media(max-width:960px){.gB1mWzHOM38d80lrhBRX{display:none}}@media(max-width:600px){.KNQXLP78ejczOkour3zg{display:none}}.rBVbaVWBnBRtTMrUKZxm{border:2px solid var(--jp-green-primary);border-radius:var(--jp-border-radius);display:block;margin:32px 0;padding:16px 64px 16px 24px;position:relative;text-decoration:none}.rBVbaVWBnBRtTMrUKZxm span{display:block}.rBVbaVWBnBRtTMrUKZxm span:last-of-type{font-weight:600}.rBVbaVWBnBRtTMrUKZxm:focus span:last-of-type,.rBVbaVWBnBRtTMrUKZxm:hover span:last-of-type{text-decoration:underline;text-decoration-thickness:var(--jp-underline-thickness)}.rBVbaVWBnBRtTMrUKZxm:focus:after,.rBVbaVWBnBRtTMrUKZxm:hover:after{transform:translateY(-50%) translateX(8px)}.rBVbaVWBnBRtTMrUKZxm:after{color:var(--jp-green-primary);content:"→";font-size:24px;font-weight:600;position:absolute;right:24px;top:50%;transform:translateY(-50%);transition:transform .15s ease-out}.gfM_DIJrVbRhmKdAphIm{background:var(--jp-white);border-radius:var(--jp-modal-radius);box-shadow:0 12px 16px -.5px rgba(0,0,0,.15);height:max-content;margin:3rem auto;max-width:414px;overflow:hidden;position:relative;transition:height .25s cubic-bezier(.59,.37,.18,1.19) 0;width:90%;will-change:height}.gfM_DIJrVbRhmKdAphIm>div:first-child{padding:0}.gfM_DIJrVbRhmKdAphIm *{box-sizing:border-box;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif}.gfM_DIJrVbRhmKdAphIm p{color:var(--jp-black)}.gfM_DIJrVbRhmKdAphIm .zfJfONxRAw0fHjXUS7LN{display:none}.gfM_DIJrVbRhmKdAphIm.pnwbCuWbV0PNQr1LFpRh{height:614px;transition-delay:2.15s}.gfM_DIJrVbRhmKdAphIm.pnwbCuWbV0PNQr1LFpRh h2{margin-top:0}._j4GWTmW5psCHFYh6R0x{align-self:flex-start;margin-top:var(--jp-gap)!important;padding:8px var(--jp-modal-padding-small)!important;width:100%}.saSAjv8yulVXQDoqDJEI{font-weight:500;line-height:110%;margin-bottom:8px}.O_hcdbeMivIhBn7ApDnS{line-height:140%}@media(min-width:760px){.gfM_DIJrVbRhmKdAphIm{height:740px;max-width:1360px;position:relative;width:95%}.gfM_DIJrVbRhmKdAphIm .zfJfONxRAw0fHjXUS7LN{display:block;left:64px;position:absolute;top:64px;z-index:99}.gfM_DIJrVbRhmKdAphIm .zfJfONxRAw0fHjXUS7LN clipPath,.gfM_DIJrVbRhmKdAphIm .zfJfONxRAw0fHjXUS7LN path{fill:#000}.gfM_DIJrVbRhmKdAphIm .zfJfONxRAw0fHjXUS7LN path.FCnyb_xCK7DhJ63p6TEd{fill:#fff}.gfM_DIJrVbRhmKdAphIm.pnwbCuWbV0PNQr1LFpRh{height:740px;transition-delay:0}.gfM_DIJrVbRhmKdAphIm.pnwbCuWbV0PNQr1LFpRh .zfJfONxRAw0fHjXUS7LN clipPath,.gfM_DIJrVbRhmKdAphIm.pnwbCuWbV0PNQr1LFpRh .zfJfONxRAw0fHjXUS7LN path{transition:fill 2s ease .5s;fill:#fff}.gfM_DIJrVbRhmKdAphIm.pnwbCuWbV0PNQr1LFpRh .zfJfONxRAw0fHjXUS7LN path.FCnyb_xCK7DhJ63p6TEd{transition:fill 2s ease .5s;fill:#000}}@keyframes OmAVpCQ270MqI4IsT9Ky{20%{transform:translateY(0) scale(1)}65%{transform:translateY(16%) scale(1.4)}to{transform:translateY(0) scale(1)}}.Qn5xayjI_jH2m1d6BEoq{border-radius:var(--jp-button-radius);display:flex;height:50%;justify-content:center;min-height:400px;overflow:hidden;position:relative;transition:height .55s cubic-bezier(.59,.37,.18,1) 0s;will-change:height}.pnwbCuWbV0PNQr1LFpRh .Qn5xayjI_jH2m1d6BEoq{height:100%;transition-delay:.65s}.pnwbCuWbV0PNQr1LFpRh .Qn5xayjI_jH2m1d6BEoq video{animation:OmAVpCQ270MqI4IsT9Ky 1.5s ease-in-out forwards}.Qn5xayjI_jH2m1d6BEoq video{height:100%;left:0;object-fit:cover;position:absolute;top:0;transform:scale(1);transition:all .85s cubic-bezier(1,0,.39,1) 0s;width:100%;will-change:transform}@media(min-width:760px){@keyframes Axe8f2LgqEBZHVcsRgY5{0%{animation-timing-function:cubic-bezier(.86,0,.07,1);left:60%;top:32px}50%{animation-timing-function:cubic-bezier(.17,.84,.44,1);bottom:32px;left:32px;top:32px;width:100%}to{left:32px;width:40%}}.Qn5xayjI_jH2m1d6BEoq{border-radius:12px;bottom:32px;display:block;height:auto;left:60%;overflow:hidden;position:absolute;right:32px;top:32px;transition-delay:0;transition:width .55s ease 0s;z-index:3}.Qn5xayjI_jH2m1d6BEoq video{height:100%;left:0;object-fit:cover;position:absolute;top:0;width:100%}.pnwbCuWbV0PNQr1LFpRh .Qn5xayjI_jH2m1d6BEoq{animation-delay:.25s;animation-duration:2s;animation-fill-mode:forwards;animation-name:Axe8f2LgqEBZHVcsRgY5;height:auto}}.iBMDoShSmqpt72YfJb36{padding:var(--jp-modal-padding)}.iBMDoShSmqpt72YfJb36 h2{font-size:clamp(1.5rem,-.7353rem + 4.7059vw,3.5rem)}.iBMDoShSmqpt72YfJb36 p{font-size:clamp(1rem,.6974rem + 1.1696vw,1.75rem)}.iBMDoShSmqpt72YfJb36 p.eQG1KKK8jjKtQyzfv573{display:none;font-size:clamp(1.25rem,1.1491rem + .3899vw,1.5rem)}@media(min-width:760px){.iBMDoShSmqpt72YfJb36{bottom:15%;display:flex;flex-direction:column;gap:64px;left:64px;padding:0 var(--jp-modal-padding) 0 0;position:absolute;width:55%}.iBMDoShSmqpt72YfJb36 .l35bIyiqYJiZ6tVYvJtC{align-items:flex-start;display:flex;flex-direction:column;gap:16px;padding:0 32px 0 0}.iBMDoShSmqpt72YfJb36 .l35bIyiqYJiZ6tVYvJtC h2,.iBMDoShSmqpt72YfJb36 .l35bIyiqYJiZ6tVYvJtC p{margin:0}.iBMDoShSmqpt72YfJb36 p.eQG1KKK8jjKtQyzfv573{display:block}.iBMDoShSmqpt72YfJb36 ._j4GWTmW5psCHFYh6R0x{align-self:flex-start;padding:16px var(--jp-modal-padding-large)!important;width:auto}.pnwbCuWbV0PNQr1LFpRh .iBMDoShSmqpt72YfJb36{left:-20px;opacity:0;transition:all .55s cubic-bezier(.59,.37,.18,1) .3s}}.HQVDZ6J3x6SJNYFX5khS{background:var(--jp-white);left:0;opacity:0;position:absolute;top:100%;transition:transform .45s cubic-bezier(.59,.37,.18,1) 2s,opacity .45s linear;width:100%;will-change:transform,opacity;z-index:2}.pnwbCuWbV0PNQr1LFpRh .HQVDZ6J3x6SJNYFX5khS{opacity:1;transform:translateY(-100%);transition-delay:2s}@media(min-width:760px){.HQVDZ6J3x6SJNYFX5khS{align-items:flex-end;bottom:5%;container-type:inline-size;display:flex;flex-direction:column;gap:40px;left:45%;padding:0;right:32px;transform:translateY(0);transition-delay:0;transition:none;width:auto}.HQVDZ6J3x6SJNYFX5khS h2{width:100%}.HQVDZ6J3x6SJNYFX5khS ._j4GWTmW5psCHFYh6R0x{margin-right:var(--jp-modal-padding-large)}.pnwbCuWbV0PNQr1LFpRh .HQVDZ6J3x6SJNYFX5khS{bottom:12%;left:45%;opacity:1;right:32px;top:unset;transform:translateY(0);transition:all .45s cubic-bezier(.59,.37,.18,1) 2s,opacity .45s linear;transition-delay:2s;width:auto}.pnwbCuWbV0PNQr1LFpRh .HQVDZ6J3x6SJNYFX5khS .l35bIyiqYJiZ6tVYvJtC{padding-left:32px}.pnwbCuWbV0PNQr1LFpRh .HQVDZ6J3x6SJNYFX5khS ._j4GWTmW5psCHFYh6R0x{align-self:flex-end}}.KdvmPIjelQIFiPQGuIYf{background:var(--jp-gray-0);display:flex;flex-direction:column;gap:var(--jp-gap)}.KdvmPIjelQIFiPQGuIYf div{background-color:var(--jp-white);border:1px solid var(--jp-gray-10);border-radius:var(--jp-button-radius);box-shadow:0 0 40px 0 rgba(0,0,0,.08);flex:1;padding:var(--jp-modal-padding)}.KdvmPIjelQIFiPQGuIYf h3{font-size:24px;line-height:normal;margin:0}.KdvmPIjelQIFiPQGuIYf p{font-size:14px}@media(min-width:760px){.KdvmPIjelQIFiPQGuIYf{flex-direction:row;padding:var(--jp-modal-padding-large)}.KdvmPIjelQIFiPQGuIYf div{border:none;box-shadow:0 2px 16px rgba(0,0,0,.08),0 2px 2px rgba(0,0,0,.1)}.KdvmPIjelQIFiPQGuIYf div p{margin:8px 0}.KdvmPIjelQIFiPQGuIYf svg{margin-bottom:var(--jp-modal-padding-small)}}@container (max-width: 600px){.KdvmPIjelQIFiPQGuIYf div{padding:var(--jp-modal-padding-small)}}.jp-license-activation-screen{border-radius:4px;box-shadow:0 4px 24px 0 rgba(0,0,0,.149);display:flex;flex-direction:column;min-height:540px;overflow:hidden}@media screen and (min-width:780px){.jp-license-activation-screen{flex-direction:row}} \ No newline at end of file diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/index.js b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/index.js deleted file mode 100644 index 9722218b..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/index.js +++ /dev/null @@ -1,63 +0,0 @@ -/*! For license information please see index.js.LICENSE.txt */ -(()=>{var e={9487:(e,t,a)=>{"use strict";a.d(t,{X:()=>c});const n={AED:{symbol:"د.إ.‏",grouping:",",decimal:".",precision:2},AFN:{symbol:"؋",grouping:",",decimal:".",precision:2},ALL:{symbol:"Lek",grouping:".",decimal:",",precision:2},AMD:{symbol:"֏",grouping:",",decimal:".",precision:2},ANG:{symbol:"ƒ",grouping:",",decimal:".",precision:2},AOA:{symbol:"Kz",grouping:",",decimal:".",precision:2},ARS:{symbol:"$",grouping:".",decimal:",",precision:2},AUD:{symbol:"A$",grouping:",",decimal:".",precision:2},AWG:{symbol:"ƒ",grouping:",",decimal:".",precision:2},AZN:{symbol:"₼",grouping:" ",decimal:",",precision:2},BAM:{symbol:"КМ",grouping:".",decimal:",",precision:2},BBD:{symbol:"Bds$",grouping:",",decimal:".",precision:2},BDT:{symbol:"৳",grouping:",",decimal:".",precision:0},BGN:{symbol:"лв.",grouping:" ",decimal:",",precision:2},BHD:{symbol:"د.ب.‏",grouping:",",decimal:".",precision:3},BIF:{symbol:"FBu",grouping:",",decimal:".",precision:0},BMD:{symbol:"$",grouping:",",decimal:".",precision:2},BND:{symbol:"$",grouping:".",decimal:",",precision:0},BOB:{symbol:"Bs",grouping:".",decimal:",",precision:2},BRL:{symbol:"R$",grouping:".",decimal:",",precision:2},BSD:{symbol:"$",grouping:",",decimal:".",precision:2},BTC:{symbol:"Ƀ",grouping:",",decimal:".",precision:2},BTN:{symbol:"Nu.",grouping:",",decimal:".",precision:1},BWP:{symbol:"P",grouping:",",decimal:".",precision:2},BYR:{symbol:"р.",grouping:" ",decimal:",",precision:2},BZD:{symbol:"BZ$",grouping:",",decimal:".",precision:2},CAD:{symbol:"C$",grouping:",",decimal:".",precision:2},CDF:{symbol:"FC",grouping:",",decimal:".",precision:2},CHF:{symbol:"CHF",grouping:"'",decimal:".",precision:2},CLP:{symbol:"$",grouping:".",decimal:",",precision:2},CNY:{symbol:"¥",grouping:",",decimal:".",precision:2},COP:{symbol:"$",grouping:".",decimal:",",precision:2},CRC:{symbol:"₡",grouping:".",decimal:",",precision:2},CUC:{symbol:"CUC",grouping:",",decimal:".",precision:2},CUP:{symbol:"$MN",grouping:",",decimal:".",precision:2},CVE:{symbol:"$",grouping:",",decimal:".",precision:2},CZK:{symbol:"Kč",grouping:" ",decimal:",",precision:2},DJF:{symbol:"Fdj",grouping:",",decimal:".",precision:0},DKK:{symbol:"kr.",grouping:"",decimal:",",precision:2},DOP:{symbol:"RD$",grouping:",",decimal:".",precision:2},DZD:{symbol:"د.ج.‏",grouping:",",decimal:".",precision:2},EGP:{symbol:"ج.م.‏",grouping:",",decimal:".",precision:2},ERN:{symbol:"Nfk",grouping:",",decimal:".",precision:2},ETB:{symbol:"ETB",grouping:",",decimal:".",precision:2},EUR:{symbol:"€",grouping:".",decimal:",",precision:2},FJD:{symbol:"FJ$",grouping:",",decimal:".",precision:2},FKP:{symbol:"£",grouping:",",decimal:".",precision:2},GBP:{symbol:"£",grouping:",",decimal:".",precision:2},GEL:{symbol:"Lari",grouping:" ",decimal:",",precision:2},GHS:{symbol:"₵",grouping:",",decimal:".",precision:2},GIP:{symbol:"£",grouping:",",decimal:".",precision:2},GMD:{symbol:"D",grouping:",",decimal:".",precision:2},GNF:{symbol:"FG",grouping:",",decimal:".",precision:0},GTQ:{symbol:"Q",grouping:",",decimal:".",precision:2},GYD:{symbol:"G$",grouping:",",decimal:".",precision:2},HKD:{symbol:"HK$",grouping:",",decimal:".",precision:2},HNL:{symbol:"L.",grouping:",",decimal:".",precision:2},HRK:{symbol:"kn",grouping:".",decimal:",",precision:2},HTG:{symbol:"G",grouping:",",decimal:".",precision:2},HUF:{symbol:"Ft",grouping:".",decimal:",",precision:0},IDR:{symbol:"Rp",grouping:".",decimal:",",precision:0},ILS:{symbol:"₪",grouping:",",decimal:".",precision:2},INR:{symbol:"₹",grouping:",",decimal:".",precision:2},IQD:{symbol:"د.ع.‏",grouping:",",decimal:".",precision:2},IRR:{symbol:"﷼",grouping:",",decimal:"/",precision:2},ISK:{symbol:"kr.",grouping:".",decimal:",",precision:0},JMD:{symbol:"J$",grouping:",",decimal:".",precision:2},JOD:{symbol:"د.ا.‏",grouping:",",decimal:".",precision:3},JPY:{symbol:"¥",grouping:",",decimal:".",precision:0},KES:{symbol:"S",grouping:",",decimal:".",precision:2},KGS:{symbol:"сом",grouping:" ",decimal:"-",precision:2},KHR:{symbol:"៛",grouping:",",decimal:".",precision:0},KMF:{symbol:"CF",grouping:",",decimal:".",precision:2},KPW:{symbol:"₩",grouping:",",decimal:".",precision:0},KRW:{symbol:"₩",grouping:",",decimal:".",precision:0},KWD:{symbol:"د.ك.‏",grouping:",",decimal:".",precision:3},KYD:{symbol:"$",grouping:",",decimal:".",precision:2},KZT:{symbol:"₸",grouping:" ",decimal:"-",precision:2},LAK:{symbol:"₭",grouping:",",decimal:".",precision:0},LBP:{symbol:"ل.ل.‏",grouping:",",decimal:".",precision:2},LKR:{symbol:"₨",grouping:",",decimal:".",precision:0},LRD:{symbol:"L$",grouping:",",decimal:".",precision:2},LSL:{symbol:"M",grouping:",",decimal:".",precision:2},LYD:{symbol:"د.ل.‏",grouping:",",decimal:".",precision:3},MAD:{symbol:"د.م.‏",grouping:",",decimal:".",precision:2},MDL:{symbol:"lei",grouping:",",decimal:".",precision:2},MGA:{symbol:"Ar",grouping:",",decimal:".",precision:0},MKD:{symbol:"ден.",grouping:".",decimal:",",precision:2},MMK:{symbol:"K",grouping:",",decimal:".",precision:2},MNT:{symbol:"₮",grouping:" ",decimal:",",precision:2},MOP:{symbol:"MOP$",grouping:",",decimal:".",precision:2},MRO:{symbol:"UM",grouping:",",decimal:".",precision:2},MTL:{symbol:"₤",grouping:",",decimal:".",precision:2},MUR:{symbol:"₨",grouping:",",decimal:".",precision:2},MVR:{symbol:"MVR",grouping:",",decimal:".",precision:1},MWK:{symbol:"MK",grouping:",",decimal:".",precision:2},MXN:{symbol:"MX$",grouping:",",decimal:".",precision:2},MYR:{symbol:"RM",grouping:",",decimal:".",precision:2},MZN:{symbol:"MT",grouping:",",decimal:".",precision:0},NAD:{symbol:"N$",grouping:",",decimal:".",precision:2},NGN:{symbol:"₦",grouping:",",decimal:".",precision:2},NIO:{symbol:"C$",grouping:",",decimal:".",precision:2},NOK:{symbol:"kr",grouping:" ",decimal:",",precision:2},NPR:{symbol:"₨",grouping:",",decimal:".",precision:2},NZD:{symbol:"NZ$",grouping:",",decimal:".",precision:2},OMR:{symbol:"﷼",grouping:",",decimal:".",precision:3},PAB:{symbol:"B/.",grouping:",",decimal:".",precision:2},PEN:{symbol:"S/.",grouping:",",decimal:".",precision:2},PGK:{symbol:"K",grouping:",",decimal:".",precision:2},PHP:{symbol:"₱",grouping:",",decimal:".",precision:2},PKR:{symbol:"₨",grouping:",",decimal:".",precision:2},PLN:{symbol:"zł",grouping:" ",decimal:",",precision:2},PYG:{symbol:"₲",grouping:".",decimal:",",precision:2},QAR:{symbol:"﷼",grouping:",",decimal:".",precision:2},RON:{symbol:"lei",grouping:".",decimal:",",precision:2},RSD:{symbol:"Дин.",grouping:".",decimal:",",precision:2},RUB:{symbol:"₽",grouping:" ",decimal:",",precision:2},RWF:{symbol:"RWF",grouping:" ",decimal:",",precision:2},SAR:{symbol:"﷼",grouping:",",decimal:".",precision:2},SBD:{symbol:"S$",grouping:",",decimal:".",precision:2},SCR:{symbol:"₨",grouping:",",decimal:".",precision:2},SDD:{symbol:"LSd",grouping:",",decimal:".",precision:2},SDG:{symbol:"£‏",grouping:",",decimal:".",precision:2},SEK:{symbol:"kr",grouping:",",decimal:".",precision:2},SGD:{symbol:"S$",grouping:",",decimal:".",precision:2},SHP:{symbol:"£",grouping:",",decimal:".",precision:2},SLL:{symbol:"Le",grouping:",",decimal:".",precision:2},SOS:{symbol:"S",grouping:",",decimal:".",precision:2},SRD:{symbol:"$",grouping:",",decimal:".",precision:2},STD:{symbol:"Db",grouping:",",decimal:".",precision:2},SVC:{symbol:"₡",grouping:",",decimal:".",precision:2},SYP:{symbol:"£",grouping:",",decimal:".",precision:2},SZL:{symbol:"E",grouping:",",decimal:".",precision:2},THB:{symbol:"฿",grouping:",",decimal:".",precision:2},TJS:{symbol:"TJS",grouping:" ",decimal:";",precision:2},TMT:{symbol:"m",grouping:" ",decimal:",",precision:0},TND:{symbol:"د.ت.‏",grouping:",",decimal:".",precision:3},TOP:{symbol:"T$",grouping:",",decimal:".",precision:2},TRY:{symbol:"TL",grouping:".",decimal:",",precision:2},TTD:{symbol:"TT$",grouping:",",decimal:".",precision:2},TVD:{symbol:"$T",grouping:",",decimal:".",precision:2},TWD:{symbol:"NT$",grouping:",",decimal:".",precision:2},TZS:{symbol:"TSh",grouping:",",decimal:".",precision:2},UAH:{symbol:"₴",grouping:" ",decimal:",",precision:2},UGX:{symbol:"USh",grouping:",",decimal:".",precision:2},USD:{symbol:"$",grouping:",",decimal:".",precision:2},UYU:{symbol:"$U",grouping:".",decimal:",",precision:2},UZS:{symbol:"сўм",grouping:" ",decimal:",",precision:2},VEB:{symbol:"Bs.",grouping:",",decimal:".",precision:2},VEF:{symbol:"Bs. F.",grouping:".",decimal:",",precision:2},VND:{symbol:"₫",grouping:".",decimal:",",precision:1},VUV:{symbol:"VT",grouping:",",decimal:".",precision:0},WST:{symbol:"WS$",grouping:",",decimal:".",precision:2},XAF:{symbol:"F",grouping:",",decimal:".",precision:2},XCD:{symbol:"$",grouping:",",decimal:".",precision:2},XOF:{symbol:"F",grouping:" ",decimal:",",precision:2},XPF:{symbol:"F",grouping:",",decimal:".",precision:2},YER:{symbol:"﷼",grouping:",",decimal:".",precision:2},ZAR:{symbol:"R",grouping:" ",decimal:",",precision:2},ZMW:{symbol:"ZK",grouping:",",decimal:".",precision:2},WON:{symbol:"₩",grouping:",",decimal:".",precision:2}};function c(e){return n[e]||{symbol:"$",grouping:",",decimal:".",precision:2}}},8899:(e,t,a)=>{"use strict";a.d(t,{LR:()=>r});var n=a(9487),c=a(2003);function r(e,t,a={}){const r=(0,n.X)(t);if(!r||isNaN(e))return null;const{decimal:s,grouping:i,precision:l,symbol:o}={...r,...a},u=e<0?"-":"",d=Math.abs(e),m=Math.floor(d);return{sign:u,symbol:o,integer:(0,c.Z)(d,l,s,i).split(s)[0],fraction:l>0?(0,c.Z)(d-m,l,s,i).slice(1):""}}},2003:(e,t,a)=>{"use strict";function n(e,t=0,a=".",n=","){const c=(e+"").replace(/[^0-9+\-Ee.]/g,""),r=isFinite(+c)?+c:0,s=isFinite(+t)?Math.abs(t):0,i=(s?function(e,t){const a=Math.pow(10,t);return""+(Math.round(e*a)/a).toFixed(t)}(r,s):""+Math.round(r)).split(".");return i[0].length>3&&(i[0]=i[0].replace(/\B(?=(?:\d{3})+(?!\d))/g,n)),(i[1]||"").lengthn})},3170:(e,t,a)=>{"use strict";function n(){return n=Object.assign?Object.assign.bind():function(e){for(var t=1;td,RQ:()=>V,WK:()=>I,Zn:()=>R,Zq:()=>L,aU:()=>c,cP:()=>m,fp:()=>v,kG:()=>i,pC:()=>P,q_:()=>s}),function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"}(c||(c={}));const r="popstate";function s(e){return void 0===e&&(e={}),p((function(e,t){let{pathname:a="/",search:n="",hash:c=""}=m(e.location.hash.substr(1));return u("",{pathname:a,search:n,hash:c},t.state&&t.state.usr||null,t.state&&t.state.key||"default")}),(function(e,t){let a=e.document.querySelector("base"),n="";if(a&&a.getAttribute("href")){let t=e.location.href,a=t.indexOf("#");n=-1===a?t:t.slice(0,a)}return n+"#"+("string"==typeof t?t:d(t))}),(function(e,t){l("/"===e.pathname.charAt(0),"relative pathnames are not supported in hash history.push("+JSON.stringify(t)+")")}),e)}function i(e,t){if(!1===e||null==e)throw new Error(t)}function l(e,t){if(!e){"undefined"!=typeof console&&console.warn(t);try{throw new Error(t)}catch(e){}}}function o(e){return{usr:e.state,key:e.key}}function u(e,t,a,c){return void 0===a&&(a=null),n({pathname:"string"==typeof e?e:e.pathname,search:"",hash:""},"string"==typeof t?m(t):t,{state:a,key:t&&t.key||c||Math.random().toString(36).substr(2,8)})}function d(e){let{pathname:t="/",search:a="",hash:n=""}=e;return a&&"?"!==a&&(t+="?"===a.charAt(0)?a:"?"+a),n&&"#"!==n&&(t+="#"===n.charAt(0)?n:"#"+n),t}function m(e){let t={};if(e){let a=e.indexOf("#");a>=0&&(t.hash=e.substr(a),e=e.substr(0,a));let n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}function h(e){let t="undefined"!=typeof window&&void 0!==window.location&&"null"!==window.location.origin?window.location.origin:window.location.href,a="string"==typeof e?e:d(e);return i(t,"No window.location.(origin|href) available to create URL for href: "+a),new URL(a,t)}function p(e,t,a,n){void 0===n&&(n={});let{window:s=document.defaultView,v5Compat:i=!1}=n,l=s.history,m=c.Pop,p=null;function g(){m=c.Pop,p&&p({action:m,location:v.location})}let v={get action(){return m},get location(){return e(s,l)},listen(e){if(p)throw new Error("A history only accepts one active listener");return s.addEventListener(r,g),p=e,()=>{s.removeEventListener(r,g),p=null}},createHref:e=>t(s,e),encodeLocation(e){let t=h("string"==typeof e?e:d(e));return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,t){m=c.Push;let n=u(v.location,e,t);a&&a(n,e);let r=o(n),d=v.createHref(n);try{l.pushState(r,"",d)}catch(e){s.location.assign(d)}i&&p&&p({action:m,location:v.location})},replace:function(e,t){m=c.Replace;let n=u(v.location,e,t);a&&a(n,e);let r=o(n),s=v.createHref(n);l.replaceState(r,"",s),i&&p&&p({action:m,location:v.location})},go:e=>l.go(e)};return v}var g;function v(e,t,a){void 0===a&&(a="/");let n=R(("string"==typeof t?m(t):t).pathname||"/",a);if(null==n)return null;let c=f(e);!function(e){e.sort(((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){let a=e.length===t.length&&e.slice(0,-1).every(((e,a)=>e===t[a]));return a?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map((e=>e.childrenIndex)),t.routesMeta.map((e=>e.childrenIndex)))))}(c);let r=null;for(let e=0;null==r&&e{let s={relativePath:void 0===r?e.path||"":r,caseSensitive:!0===e.caseSensitive,childrenIndex:c,route:e};s.relativePath.startsWith("/")&&(i(s.relativePath.startsWith(n),'Absolute route path "'+s.relativePath+'" nested under path "'+n+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),s.relativePath=s.relativePath.slice(n.length));let l=V([n,s.relativePath]),o=a.concat(s);e.children&&e.children.length>0&&(i(!0!==e.index,'Index routes must not have child routes. Please remove all child routes from route path "'+l+'".'),f(e.children,t,o,l)),(null!=e.path||e.index)&&t.push({path:l,score:z(l,e.index),routesMeta:o})};return e.forEach(((e,t)=>{var a;if(""!==e.path&&null!=(a=e.path)&&a.includes("?"))for(let a of w(e.path))c(e,t,a);else c(e,t)})),t}function w(e){let t=e.split("/");if(0===t.length)return[];let[a,...n]=t,c=a.endsWith("?"),r=a.replace(/\?$/,"");if(0===n.length)return c?[r,""]:[r];let s=w(n.join("/")),i=[];return i.push(...s.map((e=>""===e?r:[r,e].join("/")))),c&&i.push(...s),i.map((t=>e.startsWith("/")&&""===t?"/":t))}!function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"}(g||(g={}));const k=/^:\w+$/,E=3,y=2,b=1,C=10,j=-2,_=e=>"*"===e;function z(e,t){let a=e.split("/"),n=a.length;return a.some(_)&&(n+=j),t&&(n+=y),a.filter((e=>!_(e))).reduce(((e,t)=>e+(k.test(t)?E:""===t?b:C)),n)}function N(e,t){let{routesMeta:a}=e,n={},c="/",r=[];for(let e=0;e(n.push(t),"/([^\\/]+)")));e.endsWith("*")?(n.push("*"),c+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):a?c+="\\/*$":""!==e&&"/"!==e&&(c+="(?:(?=\\/|$))");let r=new RegExp(c,t?void 0:"i");return[r,n]}(e.path,e.caseSensitive,e.end),c=t.match(a);if(!c)return null;let r=c[0],s=r.replace(/(.)\/+$/,"$1"),i=c.slice(1);return{params:n.reduce(((e,t,a)=>{if("*"===t){let e=i[a]||"";s=r.slice(0,r.length-e.length).replace(/(.)\/+$/,"$1")}return e[t]=function(e,t){try{return decodeURIComponent(e)}catch(a){return M(!1,'The value for the URL param "'+t+'" will not be decoded because the string "'+e+'" is a malformed URL segment. This is probably due to a bad percent encoding ('+a+")."),e}}(i[a]||"",t),e}),{}),pathname:r,pathnameBase:s,pattern:e}}function Z(e){try{return decodeURI(e)}catch(t){return M(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding ('+t+")."),e}}function R(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let a=t.endsWith("/")?t.length-1:t.length,n=e.charAt(a);return n&&"/"!==n?null:e.slice(a)||"/"}function M(e,t){if(!e){"undefined"!=typeof console&&console.warn(t);try{throw new Error(t)}catch(e){}}}function S(e,t,a,n){return"Cannot include a '"+e+"' character in a manually specified `to."+t+"` field ["+JSON.stringify(n)+"]. Please separate it out to the `to."+a+'` field. Alternatively you may provide the full path as a string in and the router will parse it for you.'}function L(e){return e.filter(((e,t)=>0===t||e.route.path&&e.route.path.length>0))}function P(e,t,a,c){let r;void 0===c&&(c=!1),"string"==typeof e?r=m(e):(r=n({},e),i(!r.pathname||!r.pathname.includes("?"),S("?","pathname","search",r)),i(!r.pathname||!r.pathname.includes("#"),S("#","pathname","hash",r)),i(!r.search||!r.search.includes("#"),S("#","search","hash",r)));let s,l=""===e||""===r.pathname,o=l?"/":r.pathname;if(c||null==o)s=a;else{let e=t.length-1;if(o.startsWith("..")){let t=o.split("/");for(;".."===t[0];)t.shift(),e-=1;r.pathname=t.join("/")}s=e>=0?t[e]:"/"}let u=function(e,t){void 0===t&&(t="/");let{pathname:a,search:n="",hash:c=""}="string"==typeof e?m(e):e,r=a?a.startsWith("/")?a:function(e,t){let a=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((e=>{".."===e?a.length>1&&a.pop():"."!==e&&a.push(e)})),a.length>1?a.join("/"):"/"}(a,t):t;return{pathname:r,search:A(n),hash:B(c)}}(r,s),d=o&&"/"!==o&&o.endsWith("/"),h=(l||"."===o)&&a.endsWith("/");return u.pathname.endsWith("/")||!d&&!h||(u.pathname+="/"),u}const V=e=>e.join("/").replace(/\/\/+/g,"/"),H=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),A=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",B=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";Error;class O{constructor(e,t,a,n){void 0===n&&(n=!1),this.status=e,this.statusText=t||"",this.internal=n,a instanceof Error?(this.data=a.toString(),this.error=a):this.data=a}}function I(e){return e instanceof O}const T=["post","put","patch","delete"],U=(new Set(T),["get",...T]);new Set(U),new Set([301,302,303,307,308]),new Set([307,308]),"undefined"!=typeof window&&void 0!==window.document&&window.document.createElement},1074:(e,t,a)=>{"use strict";a.d(t,{Z:()=>c});var n=a(9307);const c=(0,n.forwardRef)((function({icon:e,size:t=24,...a},c){return(0,n.cloneElement)(e,{width:t,height:t,...a,ref:c})}))},9404:(e,t,a)=>{"use strict";a.d(t,{Z:()=>r});var n=a(9196),c=a(444);const r=(0,n.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,n.createElement)(c.Path,{d:"m16.5 13.5-3.7 3.7V4h-1.5v13.2l-3.8-3.7-1 1 5.5 5.6 5.5-5.6z"}))},3259:(e,t,a)=>{"use strict";a.d(t,{Z:()=>r});var n=a(9196),c=a(444);const r=(0,n.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,n.createElement)(c.Path,{d:"M20 11.2H6.8l3.7-3.7-1-1L3.9 12l5.6 5.5 1-1-3.7-3.7H20z"}))},986:(e,t,a)=>{"use strict";a.d(t,{Z:()=>r});var n=a(9196),c=a(444);const r=(0,n.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,n.createElement)(c.Path,{d:"M12 3.9 6.5 9.5l1 1 3.8-3.7V20h1.5V6.8l3.7 3.7 1-1z"}))},9201:(e,t,a)=>{"use strict";a.d(t,{Z:()=>r});var n=a(9196),c=a(444);const r=(0,n.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,n.createElement)(c.Path,{d:"M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"}))},2229:(e,t,a)=>{"use strict";a.d(t,{Z:()=>r});var n=a(9196),c=a(444);const r=(0,n.createElement)(c.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,n.createElement)(c.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"}))},6936:(e,t,a)=>{"use strict";a.d(t,{Z:()=>r});var n=a(9196),c=a(444);const r=(0,n.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,n.createElement)(c.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"}))},6163:(e,t,a)=>{"use strict";a.d(t,{Z:()=>r});var n=a(9196),c=a(444);const r=(0,n.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,n.createElement)(c.Path,{d:"M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z"}))},9517:(e,t,a)=>{"use strict";a.d(t,{Z:()=>r});var n=a(9196),c=a(444);const r=(0,n.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,n.createElement)(c.Path,{d:"M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"}))},5316:(e,t,a)=>{"use strict";a.d(t,{Z:()=>r});var n=a(9196),c=a(444);const r=(0,n.createElement)(c.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,n.createElement)(c.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M6.68822 16.625L5.5 17.8145L5.5 5.5L18.5 5.5L18.5 16.625L6.68822 16.625ZM7.31 18.125L19 18.125C19.5523 18.125 20 17.6773 20 17.125L20 5C20 4.44772 19.5523 4 19 4H5C4.44772 4 4 4.44772 4 5V19.5247C4 19.8173 4.16123 20.086 4.41935 20.2237C4.72711 20.3878 5.10601 20.3313 5.35252 20.0845L7.31 18.125ZM16 9.99997H8V8.49997H16V9.99997ZM8 14H13V12.5H8V14Z"}))},5381:(e,t,a)=>{"use strict";a.d(t,{Z:()=>r});var n=a(9196),c=a(444);const r=(0,n.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,n.createElement)(c.Path,{d:"M19.5 4.5h-7V6h4.44l-5.97 5.97 1.06 1.06L18 7.06v4.44h1.5v-7Zm-13 1a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-3H17v3a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-10a.5.5 0 0 1 .5-.5h3V5.5h-3Z"}))},496:(e,t,a)=>{"use strict";a.d(t,{Z:()=>r});var n=a(9196),c=a(444);const r=(0,n.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,n.createElement)(c.Path,{d:"M12 3.2c-4.8 0-8.8 3.9-8.8 8.8 0 4.8 3.9 8.8 8.8 8.8 4.8 0 8.8-3.9 8.8-8.8 0-4.8-4-8.8-8.8-8.8zm0 16c-4 0-7.2-3.3-7.2-7.2C4.8 8 8 4.8 12 4.8s7.2 3.3 7.2 7.2c0 4-3.2 7.2-7.2 7.2zM11 17h2v-6h-2v6zm0-8h2V7h-2v2z"}))},4955:(e,t,a)=>{"use strict";a.d(t,{Z:()=>r});var n=a(9196),c=a(444);const r=(0,n.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,n.createElement)(c.Path,{d:"M15.5 9.5a1 1 0 100-2 1 1 0 000 2zm0 1.5a2.5 2.5 0 100-5 2.5 2.5 0 000 5zm-2.25 6v-2a2.75 2.75 0 00-2.75-2.75h-4A2.75 2.75 0 003.75 15v2h1.5v-2c0-.69.56-1.25 1.25-1.25h4c.69 0 1.25.56 1.25 1.25v2h1.5zm7-2v2h-1.5v-2c0-.69-.56-1.25-1.25-1.25H15v-1.5h2.5A2.75 2.75 0 0120.25 15zM9.5 8.5a1 1 0 11-2 0 1 1 0 012 0zm1.5 0a2.5 2.5 0 11-5 0 2.5 2.5 0 015 0z",fillRule:"evenodd"}))},1908:(e,t,a)=>{"use strict";a.d(t,{Z:()=>r});var n=a(9196),c=a(444);const r=(0,n.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,n.createElement)(c.Path,{d:"M11 12.5V17.5H12.5V12.5H17.5V11H12.5V6H11V11H6V12.5H11Z"}))},6514:(e,t,a)=>{"use strict";a.d(t,{Z:()=>r});var n=a(9196),c=a(444);const r=(0,n.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,n.createElement)(c.Path,{fillRule:"evenodd",d:"M9.706 8.646a.25.25 0 01-.188.137l-4.626.672a.25.25 0 00-.139.427l3.348 3.262a.25.25 0 01.072.222l-.79 4.607a.25.25 0 00.362.264l4.138-2.176a.25.25 0 01.233 0l4.137 2.175a.25.25 0 00.363-.263l-.79-4.607a.25.25 0 01.072-.222l3.347-3.262a.25.25 0 00-.139-.427l-4.626-.672a.25.25 0 01-.188-.137l-2.069-4.192a.25.25 0 00-.448 0L9.706 8.646zM12 7.39l-.948 1.921a1.75 1.75 0 01-1.317.957l-2.12.308 1.534 1.495c.412.402.6.982.503 1.55l-.362 2.11 1.896-.997a1.75 1.75 0 011.629 0l1.895.997-.362-2.11a1.75 1.75 0 01.504-1.55l1.533-1.495-2.12-.308a1.75 1.75 0 01-1.317-.957L12 7.39z",clipRule:"evenodd"}))},797:(e,t,a)=>{"use strict";a.d(t,{Z:()=>r});var n=a(9196),c=a(444);const r=(0,n.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},(0,n.createElement)(c.Path,{d:"M10 2c4.42 0 8 3.58 8 8s-3.58 8-8 8-8-3.58-8-8 3.58-8 8-8zm1.13 9.38l.35-6.46H8.52l.35 6.46h2.26zm-.09 3.36c.24-.23.37-.55.37-.96 0-.42-.12-.74-.36-.97s-.59-.35-1.06-.35-.82.12-1.07.35-.37.55-.37.97c0 .41.13.73.38.96.26.23.61.34 1.06.34s.8-.11 1.05-.34z"}))},5235:(e,t)=>{var a;!function(){"use strict";var n={}.hasOwnProperty;function c(){for(var e=[],t=0;t{t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const a="color: "+this.color;t.splice(1,0,a,"color: inherit");let n=0,c=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(n++,"%c"===e&&(c=n))})),t.splice(c,0,a)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG);return e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=a(1741)(t);const{formatters:n}=e.exports;n.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},1741:(e,t,a)=>{e.exports=function(e){function t(e){let a,c,r,s=null;function i(...e){if(!i.enabled)return;const n=i,c=Number(new Date),r=c-(a||c);n.diff=r,n.prev=a,n.curr=c,a=c,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let s=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((a,c)=>{if("%%"===a)return"%";s++;const r=t.formatters[c];if("function"==typeof r){const t=e[s];a=r.call(n,t),e.splice(s,1),s--}return a})),t.formatArgs.call(n,e);(n.log||t.log).apply(n,e)}return i.namespace=e,i.useColors=t.useColors(),i.color=t.selectColor(e),i.extend=n,i.destroy=t.destroy,Object.defineProperty(i,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==s?s:(c!==t.namespaces&&(c=t.namespaces,r=t.enabled(e)),r),set:e=>{s=e}}),"function"==typeof t.init&&t.init(i),i}function n(e,a){const n=t(this.namespace+(void 0===a?":":a)+e);return n.log=this.log,n}function c(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},t.disable=function(){const e=[...t.names.map(c),...t.skips.map(c).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let a;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const n=("string"==typeof e?e:"").split(/[\s,]+/),c=n.length;for(a=0;a{t[a]=e[a]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let a=0;for(let t=0;t{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}t.Z=void 0;var c,r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==n(e)&&"function"!=typeof e)return{default:e};var a=l(t);if(a&&a.has(e))return a.get(e);var c={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if("default"!=s&&Object.prototype.hasOwnProperty.call(e,s)){var i=r?Object.getOwnPropertyDescriptor(e,s):null;i&&(i.get||i.set)?Object.defineProperty(c,s,i):c[s]=e[s]}return c.default=e,a&&a.set(e,c),c}(a(9196)),s=(c=a(5844))&&c.__esModule?c:{default:c},i=["size","onClick","icon","className"];function l(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,a=new WeakMap;return(l=function(e){return e?a:t})(e)}function o(){return o=Object.assign||function(e){for(var t,a=1;a{"use strict";a.d(t,{Z:()=>n});const n={error:"TcCZnGE6mad8Dvz9pCZi",button:"_mn6o2Dtm5pfFWc8_A1K"}},1494:(e,t,a)=>{"use strict";a.d(t,{Z:()=>n});const n={"admin-page":"sexr0jUxC1jVixdKiDnC",background:"vKQ11sLeAM45M04P1ccj"}},511:(e,t,a)=>{"use strict";a.d(t,{Z:()=>n});const n={section:"cAbGtJDGgLubucBnz7vM"}},281:(e,t,a)=>{"use strict";a.d(t,{Z:()=>n});const n={"section-hero":"vMa4i_Dza2t5Zi_Bw9Nf"}},9171:(e,t,a)=>{"use strict";a.d(t,{Z:()=>n});const n={container:"demNsMJjhi7BLY7xhjU5","icon-wrapper":"QiUjdjJSkqh6nH7YMG5A","is-error":"Q080AHcq29J2fc68Hhk5",icon:"hYWbIwhppukXmGnsiT9H","is-warning":"JjHuxWly0HI9C60gorbq","is-info":"Cm8ZFHi3mngl4cj9Gatx","is-success":"ytGBsU015p3LGwOPwFDx"}},6923:()=>{},3466:(e,t,a)=>{"use strict";a.d(t,{Z:()=>n});const n={button:"zI5tJ_qhWE6Oe6Lk75GY","is-icon-button":"tuBt2DLqimiImoqVzPqo",small:"Na39I683LAaSA99REg14",normal:"ipS7tKy9GntCS4R3vekF",icon:"paGLQwtPEaJmtArCcmyK",regular:"lZAo6_oGfclXOO9CC6Rd","full-width":"xJDOiJxTt0R_wSl8Ipz_",loading:"q_tVWqMjl39RcY6WtQA6","external-icon":"CDuBjJp_8jxzx5j6Nept"}},2404:()=>{},5785:()=>{},1275:()=>{},5612:(e,t,a)=>{"use strict";a.d(t,{Z:()=>n});const n={"star-icon":"cuoSlhSNrqf1dozY22Xb",jetpack:"lAIiifeLMmZAPlQ9n9ZR","checkmark-icon":"JLquNpQVlysAamuh5lJO",socialIcon:"cbOwD8Y4tFjwimmtchQI",bluesky:"aLWBKY0yRghEk7tNCgK3",facebook:"aHOlEBGD5EA8NKRw3xTw",instagram:"cL3m0xBYTYhIKI7lCqDB",twitter:"af4Y_zItXvLAOEoSDPSv",linkedin:"f68aqF3XSD1OBvXR1get",tumblr:"xFI0dt3UiXRlRQdqPWkx",google:"q7JEoyymveP6kF747M43",mastodon:"DKOBOTVmTLbh26gUH_73",nextdoor:"n5XodNsuMfMAAvqHFmbw",whatsapp:"fftumuc_lJ6v0tq4UMVR"}},9054:()=>{},3247:(e,t,a)=>{"use strict";a.d(t,{Z:()=>n});const n={sm:"(max-width: 599px)",md:"(min-width: 600px) and (max-width: 959px)",lg:"(min-width: 960px)"}},3080:(e,t,a)=>{"use strict";a.d(t,{Z:()=>n});const n={sm:"(max-width: 599px)",md:"(min-width: 600px) and (max-width: 959px)",lg:"(min-width: 960px)",smCols:"4",mdCols:"8",lgCols:"12","col-sm-1":"RuVLl3q4lxTQa3wbhBJB","col-sm-1-start":"f9LZTRG4MMK42rS89afW","col-sm-1-end":"bHe_zKxjjpUwHw_MdYE1","col-sm-2":"QZbNrOqE2aNSn50xVhpU","col-sm-2-start":"ev7W3z7zVYPeHAlYqZjf","col-sm-2-end":"NJWd1m_e7lOiPYru2ZMP","col-sm-3":"Xc6nt1Qc1DI0Z2A3gt1r","col-sm-3-start":"UIcN_GXiPRoIsin8Kohg","col-sm-3-end":"GRKCyqb5LufCSCgykKFc","col-sm-4":"i_qTq8gqhhC3vIUepVRB","col-sm-4-start":"G3qaZ3Jpbvam_1XvGxgc","col-sm-4-end":"VRCNYKZtO9zukEwmgP1y","col-md-1":"tRm008K_WJL79WoNZTNL","col-md-1-start":"l5T2P_bgKts4tdaRkS1d","col-md-1-end":"zOCxfLZpF6BlgC7a_Yq1","col-md-2":"F80DdgVn0m5OpvtSQWka","col-md-2-start":"oI1c7JYfiJtMQHbhngtU","col-md-2-end":"pMQtA_4jh1_1lVknqEP5","col-md-3":"VenqMpdgyKQVUNNQcfqd","col-md-3-start":"seNYL99uoczf9V4MxBxT","col-md-3-end":"YKfF1HFhI9KygA5l3b2J","col-md-4":"yAi0Cv1xDWkoqsaUhvhR","col-md-4-start":"ubhnyZOnkgxNhh6XtVWv","col-md-4-end":"RGOPGQbWMJ9Ei5oFxS7X","col-md-5":"Sz1E2aWbX483ijdi6yge","col-md-5-start":"tku6_bRYrX9tMbgYGmIl","col-md-5-end":"b5JHttOhSEcI1WBlqAjk","col-md-6":"FboSx5MoKTAWbxXyYlCw","col-md-6-start":"Jhs8yEEmodG30edbJvag","col-md-6-end":"IpzbbKVqEqPcfIGkXkwt","col-md-7":"mhCPwfAZ4Kmm_empzJAq","col-md-7-start":"x034ilrJF7rO9UJB2rI1","col-md-7-end":"Wt8t2e16viRrOJ1lLA5v","col-md-8":"S6pIrEy9AMLKx9bgh_Ae","col-md-8-start":"kEfI4tGyuWfHTlRnvIab","col-md-8-end":"PUzX4RRsKq1dnsz3gebS","col-lg-1":"X_pdcLJikd8LS_YAdJlB","col-lg-1-start":"tl936d14Huby4khYp05X","col-lg-1-end":"hnge0LnR69d3NXEtEE1t","col-lg-2":"fj0NUMuyZQcPNgKcjp5Z","col-lg-2-start":"R2ncBX7a2NigdYCcV1OX","col-lg-2-end":"t8vMSDVYno9k9itRwnXb","col-lg-3":"wsDuEN2GqHx6qzo8dUdk","col-lg-3-start":"cIEVPUweWtLBy3xaXnMx","col-lg-3-end":"fajUWBwu1m2B479j3jmz","col-lg-4":"YR0c7fQTgMkDdWzwSyLp","col-lg-4-start":"xlwp8BmplxkKNMI7gamo","col-lg-4-end":"_C4O1w9DUqx1m3gPf8aA","col-lg-5":"Z54F1hAErckAIrKlxnXW","col-lg-5-start":"ezSDWkRHmKSxDJXxuiOH","col-lg-5-end":"T0ChoeAjGJjkkNrYhD4g","col-lg-6":"qtMoMPF6yHvGJnWHSsde","col-lg-6-start":"gdoywN5VPiWERfIBqkph","col-lg-6-end":"wUev_VH5uf_pwFFlbnAU","col-lg-7":"egIPDFJsOpownTClq9XP","col-lg-7-start":"yGhp9yoAW7k0kQik9AB7","col-lg-7-end":"SJ43U9mR5wUg5V2qBeQA","col-lg-8":"cTuyHfMwSUJxN_HdIEgd","col-lg-8-start":"smCr8DaIagcumdvdldiK","col-lg-8-end":"T03NHzQJvzwL6wAfIiTL","col-lg-9":"pMvxM3RJGjqyNdf9qg1Y","col-lg-9-start":"iIVpNRwEnQ_JI5gpp9EN","col-lg-9-end":"ZbQ4u4vGSX5rJOje4uGL","col-lg-10":"gKb5wuIDAlKGbrjK2vxy","col-lg-10-start":"Z7pINdImE2WJiYnZBTqm","col-lg-10-end":"ZTxp6qpvwurMdOnLLSz1","col-lg-11":"NnQTlbfnxPDR6cQ7rygg","col-lg-11-start":"O137wZd6Yl0olSA9PsXR","col-lg-11-end":"zf2OJtQ2MPz6SDoh6CB0","col-lg-12":"U3H6UHW6HqRt9hdzVg3O","col-lg-12-start":"zynnNeS_ZBTxABcVpUQH","col-lg-12-end":"vI8tltFZtFUNAy9Iag9s"}},8730:(e,t,a)=>{"use strict";a.d(t,{Z:()=>n});const n={sm:"(max-width: 599px)",md:"(min-width: 600px) and (max-width: 959px)",lg:"(min-width: 960px)",container:"SqdhUZkXCRuIpErj1B3z",fluid:"OZC_9a1LhpWF9dv15Gdh"}},7946:(e,t,a)=>{"use strict";a.d(t,{Z:()=>n});const n={placeholder:"NisihrgiIKl_knpYJtfg",pulse:"R2i0K45dEF157drbVRPI"}},7703:(e,t,a)=>{"use strict";a.d(t,{Z:()=>n});const n={container:"VHYulMcpzbr10HWR0iSE","icon-wrapper":"FGpSkMCiIHQjszcV0dbn","close-button":"KoWZcCwhW13xvkEb0QON","main-content":"smrfczkC53EaFM8OJUXs",title:"IKYRWoPwt9xOVEx1wzNS","action-bar":"qM0qY6mPYp1MPN54A3Kg","is-error":"A5YkDkkXuiYgavrY6Nux",icon:"y_IPyP1wIAOhyNaqvXJq","is-warning":"cT5rwuPMZzWvi5o6shMl","is-info":"yo0O3uvNomPsYUXFCpAS","is-success":"oZdDFf1jBLkzn5ICCC6x"}},9929:(e,t,a)=>{"use strict";a.d(t,{Z:()=>n});const n={container:"p4qz2tkq0p9hxucJ6Qk2",table:"lbNDyXioOwvyvbALtCBm","is-viewport-large":"s2Lsn4kbm6BrS3DSndRB",card:"cLaNK_XcbTGlRQ4Tp43Q","is-primary":"CYt1X0eH1icRjhtJ28jx",header:"DAkZc1P9A3K12fjEliMg",item:"WUBuYABl8nymjs9NnCEL","last-feature":"ANtCFeb41NhA8PA3H7ZN",value:"Ql2gy_148yW8Vw5vhaKD",icon:"EAQrAnQEW1z1BfdY5gbC","icon-check":"JDSTlLoOC_4aUoH2oNM2","icon-cross":"zNdQRJ1w7BvaQOYyqzHK",popover:"lr7vbX95SKtoe7DarJcZ","popover-icon":"KRrGp2xdkeBOxLZeuQ6X",tos:"H_ZJiRVJg0LiMXPGOcmt","tos-container":"x21z_DixObRDsDaWotP1"}},9184:(e,t,a)=>{"use strict";a.d(t,{Z:()=>n});const n={container:"dovianZYLKhnbnh9I06o","price-container":"lljtQMhW7lq5tE5SDJEf","promo-label":"NubApIV1vQCRUNprfm6b",price:"dhFQXpZfMwVI8vuYHnwC","is-not-off-price":"eD7hzxFmdtG_MgmBtl_k",footer:"C64ZjjUAqJC1T2Sa7apS",legend:"UpZDGew6Ay1hPoP6eI7b",symbol:"TDiiPbuW1Z0_05u_pvcK"}},1683:()=>{},7920:()=>{},3280:(e,t,a)=>{"use strict";a.d(t,{Z:()=>n});const n={reset:"WQVtrU6q0L1Igcj7wCrQ","headline-medium":"UujoBFTnQNY2cWU2SIsH","headline-small":"TeGO5V_thHw5lDAm1_2M","headline-small-regular":"WolQzb2MsSgiNmLtc7_j","title-medium":"hUB0JT8p1T2Hw28N6qC8","title-medium-semi-bold":"gKZWDv5chz3_O3Syp74H","title-small":"zY2No8Ga4b8shbOQGhnv",body:"tIj0D1t8Cc892ikmgFPZ","body-small":"KdcN0BnOaVeVhyLRKqhS","body-extra-small":"dso3Rh3tl3Xv1GumBktz","body-extra-small-bold":"mQ1UlbN9u4Mg9byO8m7v",label:"PItlW5vRExLnTj4a8eLE","m-0":"TwRpPlktzxhmFVeua7P5","mx-0":"zVfqx7gyb3o9mxfGynn1","my-0":"iSHVzNiB9iVleGljaQxy","mt-0":"xqDIp6cNVr_E6RXaiPyD","mr-0":"S8EwaXk1kyPizt6x4WH2","mb-0":"ODX5Vr1TARoLFkDDFooD","ml-0":"cphJ8dCpfimnky7P2FHg","m-1":"PFgIhNxIyiSuNvQjAIYj","mx-1":"M2jKmUzDxvJjjVEPU3zn","my-1":"io15gAh8tMTNbSEfwJKk","mt-1":"rcTN5uw9xIEeMEGL3Xi_","mr-1":"CQSkybjq2TcRM1Xo9COV","mb-1":"hfqOWgq6_MEGdFE82eOY","ml-1":"I8MxZQYTbuu595yfesWA","m-2":"kQkc6rmdpvLKPkyoJtVQ","mx-2":"j6vFPxWuu4Jan2ldoxpp","my-2":"hqr39dC4H_AbactPAkCG","mt-2":"c3dQnMi16C6J6Ecy4283","mr-2":"YNZmHOuRo6hU7zzKfPdP","mb-2":"Db8lbak1_wunpPk8NwKU","ml-2":"ftsYE5J9hLzquQ0tA5dY","m-3":"Det4MHzLUW7EeDnafPzq","mx-3":"h_8EEAztC29Vve1datb5","my-3":"YXIXJ0h1k47u6hzK8KcM","mt-3":"soADBBkcIKCBXzCTuV9_","mr-3":"zSX59ziEaEWGjnpZa4uV","mb-3":"yrVTnq_WBMbejg89c2ZQ","ml-3":"UKtHPJnI2cXBWtPDm5hM","m-4":"guexok_Tqd5Tf52hRlbT","mx-4":"oS1E2KfTBZkJ3F0tN7T6","my-4":"DN1OhhXi6AoBgEdDSbGd","mt-4":"ot2kkMcYHv53hLZ4LSn0","mr-4":"A1krOZZhlQ6Sp8Cy4bly","mb-4":"pkDbXXXL32237M0hokEh","ml-4":"XXv4kDTGvEnQeuGKOPU3","m-5":"yGqHk1a57gaISwkXwXe6","mx-5":"X8cghM358X3DkXLc9aNK","my-5":"GdfSmGwHlFnN2S6xBn1f","mt-5":"yqeuzwyGQ7zG0avrGqi_","mr-5":"g9emeCkuHvYhveiJbfXO","mb-5":"Lvk3dqcyHbZ07QCRlrUQ","ml-5":"r3yQECDQ9qX0XZzXlVAg","m-6":"aQhlPwht2Cz1X_63Miw0","mx-6":"JyHb0vK3wJgpblL9s5j8","my-6":"cY2gULL1lAv6WPNIRuf3","mt-6":"NBWQ9Lwhh_fnry3lg_p7","mr-6":"yIOniNe5E40C8fWvBm5V","mb-6":"t30usboNSyqfQWIwHvT3","ml-6":"Nm_TyFkYCMhOoghoToKJ","m-7":"C4qJKoBXpgKtpmrqtEKB","mx-7":"S93Srbu6NQ_PBr7DmTiD","my-7":"fJj8k6gGJDks3crUZxOS","mt-7":"cW6D6djs7Ppm7fD7TeoV","mr-7":"DuCnqNfcxcP3Z__Yo5Ro","mb-7":"im8407m2fw5vOg7O2zsw","ml-7":"G0fbeBgvz2sh3uTP9gNl","m-8":"kvW3sBCxRxUqz1jrVMJl","mx-8":"tOjEqjLONQdkiYx_XRnw","my-8":"op5hFSx318zgxsoZZNLN","mt-8":"c9WfNHP6TFKWIfLxv52J","mr-8":"sBA75QqcqRwwYSHJh2wc","mb-8":"GpL6idrXmSOM6jB8Ohsf","ml-8":"HbtWJoQwpgGycz8dGzeT","p-0":"uxX3khU88VQ_Ah49Ejsa","px-0":"KX0FhpBKwKzs9fOUdbNz","py-0":"PfK8vKDyN32dnimlzYjz","pt-0":"emxLHRjQuJsImnPbQIzE","pr-0":"kJ8WzlpTVgdViXt8ukP9","pb-0":"tg_UIUI11VBzrTAn2AzJ","pl-0":"uczvl8kaz84oPQJ2DB2R","p-1":"o7UHPcdVK3lt7q3lqV4o","px-1":"IDqEOxvDoYrFYxELPmtX","py-1":"DdywPW2qSYlu2pt8tpO2","pt-1":"npy3hw4A5QSkDicb2CJJ","pr-1":"LgbptTApNY5NwLQvEFAt","pb-1":"WZQy2SZuZso59bUsXXyl","pl-1":"o331apInxNunbYB3SfPE","p-2":"fMPIyD9Vqki1Lrc_yJnG","px-2":"i2pMcTcdrr10IQoiSm_L","py-2":"eA702gn32kwptiI1obXH","pt-2":"o9bGieUKcYc8o0Ij9oZX","pr-2":"SwZcFez1RDqWsOFjB5iG","pb-2":"eHpLc_idmuEqeqCTvqkN","pl-2":"vU39i2B4P1fUTMB2l6Vo","p-3":"JHWNzBnE29awhdu5BEh1","px-3":"X72lGbb56L3KFzC2xQ9N","py-3":"BzfNhRG8wXdCEB5ocQ6e","pt-3":"srV0KSDC83a2fiimSMMQ","pr-3":"lUWfkmbQjCskhcNwkyCm","pb-3":"Ts0dIlc3aTSL7V4cIHis","pl-3":"CzlqQXXhX6MvorArFZ8B","p-4":"TqMPkQtR_DdZuKb5vBoV","px-4":"a7UrjhI69Vetlcj9ZVzz","py-4":"StEhBzGs2Gi5dDEkjhAv","pt-4":"FGneZfZyvYrt1dG0zcnm","pr-4":"APEH216rpdlJWgD2fHc8","pb-4":"oGwXC3ohCic9XnAj6x69","pl-4":"U6gnT9y42ViPNOcNzBwb","p-5":"IpdRLBwnHqbqFrixgbYC","px-5":"HgNeXvkBa9o3bQ5fvFZm","py-5":"tJtFZM3XfPG9v9TSDfN1","pt-5":"PdifHW45QeXYfK568uD8","pr-5":"mbLkWTTZ0Za_BBbFZ5b2","pb-5":"vVWpZpLlWrkTt0hMk8XU","pl-5":"RxfaJj5a1Nt6IavEo5Zl","p-6":"SppJULDGdnOGcjZNCYBy","px-6":"palY2nLwdoyooPUm9Hhk","py-6":"WYw1JvZC0ppLdvSAPhr_","pt-6":"YEEJ9b90ueQaPfiU8aeN","pr-6":"QE0ssnsKvWJMqlhPbY5u","pb-6":"n8yA3jHlMRyLd5UIfoND","pl-6":"tXHmxYnHzbwtfxEaG51n","p-7":"kBTsPKkO_3g_tLkj77Um","px-7":"RyhrFx6Y1FGDrGAAyaxm","py-7":"CBwRpB0bDN3iEdQPPMJO","pt-7":"vQVSq6SvWKbOMu6r4H6b","pr-7":"oBy5__aEADMsH46mrgFX","pb-7":"KVEXoJqf1s92j0JMdNmN","pl-7":"ZMXGNrNaKW3k_3TLz0Fq","p-8":"tuiR9PhkHXhGyEgzRZRI","px-8":"U7454qyWkQNa2iaSJziu","py-8":"VLYIv2GVocjuN93e8HC8","pt-8":"X1rm9DQ1zLGLfogja5Gn","pr-8":"JS7G6kAuqJo5GIuF8S5t","pb-8":"Y8F9ga1TDCMbM1lj4gUz","pl-8":"AJuyNGrI63BOWql719H8"}},3591:(e,t,a)=>{"use strict";a.d(t,{Z:()=>n});const n={global:"_fUXxnSp5pagKBp9gSN7"}},2541:()=>{},1510:()=>{},9610:()=>{},9836:(e,t,a)=>{"use strict";a.d(t,{Z:()=>n});const n={heading:"urouayitSUT8zW0V3p_0",notice:"iXXJlk08gFDeCvsTTlNQ",button:"MWqRqr7q6fgvLxitcWYk","bigger-than-medium":"YLcXAoc82nypTPaKSAcd",error:"e6hHy8BZ7ZKPSXbIC0UG",message:"jXz8LnXNzMDdtHqkG0sZ"}},4220:()=>{},287:()=>{},9823:()=>{},7664:()=>{},1008:(e,t,a)=>{"use strict";a.d(t,{Z:()=>n});const n={"jp-wrap":"EiaNctK1_P9pPqOeiaSI","jp-row":"ogHZg_sJCljylz3VJfsf","sm-col-span-1":"zv7eGvijKRkbPVakubHw","sm-col-span-2":"VoJNoiya_1ck3_kXS6_C","sm-col-span-3":"ecv0NO526NoTNbpALA1A","sm-col-span-4":"OfBdkceMzeHvRbzhqDlP","md-col-span-1":"JLb3NpEKN8pOaWd7K1bu","md-col-span-2":"fsMPGqPKE4mjMIPFwl77","md-col-span-3":"DIK_zdaGAQ09eKspBJ4E","md-col-span-4":"shXYpxPu3WCJsR8aOHtz","md-col-span-5":"s7ElrOqG_yGd5SIfwqOR","md-col-span-6":"Cxml9uzGvArAL8_RDs_p","md-col-span-7":"aANxBKDGx72eDqU0iUPj","md-col-span-8":"XxyzuTY3mnQcl9EGZadm","lg-col-span-1":"Sfo4WaSNIWInJ93Abd3w","lg-col-span-2":"tQS7SKUGrU4THhWMysbo","lg-col-span-3":"I94U7mpY4h16pcOksZNF","lg-col-span-4":"uWMb9k77kQxBdS5MTt0s","lg-col-span-5":"rKwEEZQxK9s_POMg5Jss","lg-col-span-6":"UcPXX_s06IPCkF7ZjH3D","lg-col-span-7":"CrQdtiCFkRbzY6K2dFvt","lg-col-span-8":"rEUALOmOdUBXO0Us871z","lg-col-span-9":"NqXa9TlcTEviVsB53hBV","lg-col-span-10":"OnWVeiQiwgQ9lzdGPW66","lg-col-span-11":"D2PkTcy7b8u2K9QXY6VQ","lg-col-span-12":"EcqBhzAyxo5RDc2Y6m7K","md-col-span-0":"gB1mWzHOM38d80lrhBRX","sm-col-span-0":"KNQXLP78ejczOkour3zg","jp-cut":"rBVbaVWBnBRtTMrUKZxm",modal:"gfM_DIJrVbRhmKdAphIm","jetpack-logo":"zfJfONxRAw0fHjXUS7LN",animating:"pnwbCuWbV0PNQr1LFpRh",button:"_j4GWTmW5psCHFYh6R0x",headline:"saSAjv8yulVXQDoqDJEI",paragraph:"O_hcdbeMivIhBn7ApDnS","jetpack-logo-triangles":"FCnyb_xCK7DhJ63p6TEd","video-wrap":"Qn5xayjI_jH2m1d6BEoq",videoMove:"OmAVpCQ270MqI4IsT9Ky",slidein:"Axe8f2LgqEBZHVcsRgY5","content-wrap":"iBMDoShSmqpt72YfJb36","hi-user":"eQG1KKK8jjKtQyzfv573","content-wrap-text":"l35bIyiqYJiZ6tVYvJtC","powers-wrap":"HQVDZ6J3x6SJNYFX5khS","jetpack-products":"KdvmPIjelQIFiPQGuIYf"}},5893:(e,t,a)=>{"use strict";a.d(t,{Z:()=>n});const n={container:"OpMBda4vebhRbW8Fm6YC","is-link":"BghJAx9hSagUdHWOUaYE","has-error":"IWsEW5nnNWUqqcT3K5L1",title:"r3UCwgwCthua6lDCvIBI",name:"vpluqUMgmwx9_f8wCVIn"}},6234:(e,t,a)=>{"use strict";a.d(t,{Z:()=>n});const n={icon:"rV_5QyvhDnsVjCX4pb0h",link:"MO1jDNY8VPqeNS9xL8jE"}},8578:(e,t,a)=>{"use strict";a.d(t,{Z:()=>n});const n={"relative-col":"zvd4dCB_bBDiXJKKDqXm","close-link":"ly4o9lSswAGHFXqGUEIO","account-description":"u64Go3kwEZ7MD9eji0H1","account-images":"_RT41NE3LU4R0ubcij2y",wordpress:"cFGWJeRiGHjAr8D7CWJW",google:"Iz3l7a05TP6HK9S92TIL",apple:"lmQ0wFmnk4kKkGVjokPA","all-features":"AoIs8wD92wKR8RpQj6Uc"}},6322:(e,t,a)=>{"use strict";a.d(t,{Z:()=>n});const n={"connection-status-card":"kezuOHNvu9vdvlJ86Fwg",status:"qJizORs2q_CVCj9L6XLe","avatar-wrapper":"VmtuLc2xRqmsO6cK8qjF",cloud:"MdTRfQ3eo5qZKChZlzNj",jetpack:"PbEpL02SEH9VNAlbKCfV",avatar:"TD4AUM9gcTVAB6JHB5ZR",line:"yjl73qv0VWoPP8IhGreh",disconnected:"rq8YRaj9OyUUXJUHiUgI",info:"YZ7FNKEm9qpvQ4ZkbAz5","list-item":"oH9tzGE80LnB6Og69RFz","list-item-text":"xXVEWvQllVsFGmJY8WEp",error:"J0GIu2rNR7rXocQTyd8p"}},197:(e,t,a)=>{"use strict";a.d(t,{Z:()=>n});const n={icon:"hdasSNj9k3Sc5PwXK4uE",link:"eWN8Hj0SBRDq1F48n_Fg"}},1854:()=>{},4416:(e,t,a)=>{"use strict";a.d(t,{Z:()=>n});const n={"jp-wrap":"yWUvvF4WJLNDSpMgBMfm","jp-row":"ka1fVHj2HOkHjhdoEFOZ","sm-col-span-1":"JMOO4Y_9yhTO9lwLnRUx","sm-col-span-2":"PFDPAqk51qox_ChLqJwm","sm-col-span-3":"ault0jHVfWpShqOGooIP","sm-col-span-4":"GqpvdRzmzPJELtSm4FEN","md-col-span-1":"Ym4_YneEGD_iZD6W1C2o","md-col-span-2":"NbvHnnDtWw8n9BEUQ0Oy","md-col-span-3":"ElMT7rhxe5ZJKO41MnhW","md-col-span-4":"yKjnqjibn_wW_1tWWt5Q","md-col-span-5":"Pb30lOcQFpzUX57GwflS","md-col-span-6":"pC1wxc_R8y4pNILHsiiY","md-col-span-7":"pChscSCnudQoWGjMFKI_","md-col-span-8":"qw1H2gAgF3lDCI2Tbkmb","lg-col-span-1":"VzcA_rrxBK3g4ozA0oD9","lg-col-span-2":"pNAa7O2adRZD8Slgk9iR","lg-col-span-3":"tlIMLlipexblj8CeOx4B","lg-col-span-4":"Dvt0u5l2Rr1BhBmvYAzl","lg-col-span-5":"BiUsgNTc0tyc7tC5jnzE","lg-col-span-6":"ulJXAsj7G2ROJ1g3_s28","lg-col-span-7":"HsoVlyVLsXYClx9Atox0","lg-col-span-8":"oXxjRQNNj2cfIpFBqC1W","lg-col-span-9":"qXgUn4Adg9xE_JnbuDio","lg-col-span-10":"xMpqTLiLfYFEJiRPQQQq","lg-col-span-11":"IiGo3Sz2FDZN7_eGElwA","lg-col-span-12":"Om8BNCjfgqQ_wmPQjfOY","md-col-span-0":"t10ZWzP7ADjJnR4tqxRS","sm-col-span-0":"eOUlZG8Pelh_Xj0aSoHG","jp-cut":"l546LrwBEePz434NFK5Q",logo:"Q7w4fcEcemZ2nlwaYNog",wrapper:"AoNQsOaTt6gSf0H6Yasz",helper:"v13ZwGzUnecPA7Y3URAl",container:"EeDbu9pXFWTsCzfTpv2v",title:"BmSvoIi3rErkcrRiOi2W",content:"mojRoVuWdDJo0E6LEjJw"}},73:(e,t,a)=>{"use strict";a.d(t,{Z:()=>n});const n={modal:"HeJe1crc9XaWWpLvIPit",container:"or0JUScxkJPmNsfrxkEK"}},1017:(e,t,a)=>{"use strict";a.d(t,{Z:()=>n});const n={heading:"jErCC9oKHSM15BxzFyQK",notice:"oVoYbwbFB6U2o90Njusk","bigger-than-medium":"Snc8NEmDelsbhlH4285s",message:"wBVXH4OTNwLHPRpN4nsq",nofill:"F1qvEnFfHs5nz3zFZUOV"}},6891:(e,t,a)=>{"use strict";a.d(t,{Z:()=>n});const n={container:"wiobThfXJCuhGNrbFIT6","expire-date":"VgAxgahF9bC2M__FiIgV","expire-date--with-icon":"dbRwkMLqcMF67njPoAF7","actions-list-item":"Doju0RxvvN9JS12mf489"}},9720:(e,t,a)=>{"use strict";a.d(t,{Z:()=>n});const n={container:"pIsYsXFAJ9KX2VrS5rmY",description:"gmPKCDKZcfQt9WieTyKS",actions:"fDBaV7I4yUO6w5AWVEtr",buttons:"SelsBZT7eIWRQyl1dasZ",title:"LHYJUrOej3toDvOAiz4k","action-button":"JFjbc0JgC4qC92ehOiUr","dropdown-chevron":"NBZgqk_CGGfY3Q16OHjT",primary:"Jh6TlOGQNgBwU_fFxPrm",secondary:"VBxTkBZVxHaVoyhMRJcz","action-button-dropdown":"UZ3NDyOSbGY9NZWb3bUD","dropdown-item":"IpJGe_nvXXUiBOsAOkaV","dropdown-item-label":"SjzpxiAAVsU_xRrw55ub","active-action-checkmark":"GQy61X1G7Wv3L3erNwxR","has-additional-actions":"QSePbRSFylCvM2cX8nN_",status:"f5VJYwuJmjxH8PVxEbbv",active:"ry3pxoGtmQ0ZeSwp7F_3",inactive:"LZzE3EG7m3CDR46wwwEr",warning:"TZUP7W6QYGajITiMNYas",error:"Vx_jpT02r8W6NfsRSB02","is-fetching":"PdsJCfyyjSgrNDheF2qi","blink-animation":"dWP7ypkVXudMbAa38W5Z"}},8840:(e,t,a)=>{"use strict";a.d(t,{Z:()=>n});const n={"no-backup-stats":"wI7QgVzPXvVVu6kfnTT8","main-stats":"eqyxcUmdF0s3gmmlZGyD","main-stat":"gxY6D0PeVtGk9iSB5E_u","visual-stat":"D_uE0LD5CvpfM2FNp55k","more-stats":"VTBUdi1D4DW34F0yixMk",activity:"BXQQYCO_pEmYmzBBwYxR",summary:"qdvOzzbrd3KQK7DNg8eg",description:"PFbMp_gtGLBMWbbYtO0q",time:"ZFCNMiywyFvaifoIQI5w"}},1200:()=>{},523:(e,t,a)=>{"use strict";a.d(t,{Z:()=>n});const n={"single-contextual-info":"g4lyov8aMDggdD4yOi1p","main-value":"Ys5ScZ_dYn2O2AzDE5Yi","single-contextual-info-placeholder":"sUNg_b7XteVXOrpHAkJg","contextual-percentage-change":"cF6QAJf1vXXAMuutXPcq",neutral:"coY634LconQ7gzDDNJeu",positive:"kyqpwKaL2FyQ8CtxJQ0f",negative:"aXf37lEOcjpNV8ImLaYK","change-icon":"OyGdoGzsQ48VaVVR99_H","change-values":"cKLicfMCaDSGPlX222jF","loading-placeholder":"wm7Alh6CwbsWkVSODgI2",cardlist:"qpN923qyxjI06NCgFC8j"}},8429:(e,t,a)=>{"use strict";a.d(t,{Z:()=>n});const n={card:"q0T8YyQxRawhpDtvJjxI",container:"B7JDqI_vtKxSy5GjvqA1","card-header":"zj7xadmhIWeuf7ZwvVTS","product-bundle-icon":"GsioW6IsC8EMYE3U6788","product-bundle-icons":"dbz07JqxOlivjKO4vBEF","product-icon":"cfEO8udWbRGPFJzW8Jg5","plus-icon":"zlh3zbjUe4Z8cBs7uVVe","product-has-required-plan":"qoZuzG5EcDa231hC6t0P","checkout-button":"Q6uUUQCPWS6_6nLxIn68","components-spinner":"YU4iBCRze09ZP3iCsdcb","free-product-checkout-button":"OrQG7DjDd9Ha2Xj1Mx3L",features:"Q1jaYDpa2AVfJpA29wT0","highlight-last-feature":"HL4gSxsF0skYGhGuqH90",disclaimers:"sEcLfpWjo0GF7QrxD3Lt","price-container":"xgv3jRkeF39aEQELCwru",price:"twlleZ5Ehq4bB7CvKVSW","is-old":"Qg4rPEvXsqmod1s_31d8","price-description":"ApsgxIornVy_3KnciVeJ","supporting-info":"NMxcZL17aEP7v81uG3zD","tos-container":"gCTKfAPzJqZas7CaRbKN"}},1514:(e,t,a)=>{"use strict";a.d(t,{Z:()=>n});const n={container:"svE2cJL5t2FarzcDQYNe",imageContainer:"dvEJEDNTnmVfVxtLa4uU",aiImageContainer:"K1VY4DNP8PHMWAEVBC_h","product-interstitial__header":"nk_COGPrkBNLp7lVt4sQ","product-interstitial__license-activation-link":"ukgQ5TmLablG3svUKjdw",card:"EUcF2LKeC2GyhWD2FKCP","buttons-row":"Bm21LIBQtpRo3ZhOxXBG"}},1287:(e,t,a)=>{"use strict";a.d(t,{Z:()=>n});const n={container:"SWwV4Pw6OZ5vU3PqPXmr",imageContainer:"r7tUofa9Z3A5ziKVR1H7",aiImageContainer:"i_AnOR3MaQLraGvb2QU5","product-interstitial__header":"YcYvLvdvWrb1EUZoVsE8","product-interstitial__license-activation-link":"uGTTsKoIOoZdYhk6uPnl"}},2091:(e,t,a)=>{"use strict";a.d(t,{Z:()=>n});const n={"section-stats-highlights":"Jvb1njqMy7ML1zikhbWn","section-title":"mpr8_ygU8woV4bVR1xvw","section-description":"gwO_Q0L0jbwMARVlBezu","cards-list":"qwy7CsLeEbXvaPwgC9WV","stats-card":"Hrbg7DeSJs6gas9zdPDR","stats-card-icon":"NFpbo5AINn6I6avKFGby","stats-card-heading":"aoQZCG0JeyWmy2J6vVxF","stats-card-count":"M6ApyXg79vuXo6GwDkbO","is-pointer":"DYHb5e6QhgXejWyo9s78","stats-card-count-value":"OlInbY5YnDO06MEQHv98","stats-card-difference":"EtbKbd5m85w7oYT4stIs","stats-card-difference--positive":"Awr7zl75sfAsFPHK9kDG","stats-card-difference--negative":"QFSZbIKFdWO3HEPBZyhc","stats-card-difference-icon":"GgJAnS4gaEEGmRCP5n8y","stats-card-difference-absolute-value":"mjiNtwdbKpfo9edGVes4",actions:"pAt4v_KG9Ir19wNcEtEj"}},9473:(e,t,a)=>{"use strict";a.d(t,{Z:()=>n});const n={banner:"biqv3OiSCRunE35s4DC6","banner-card":"T0VRsfCJrRslmORTYa8X",dismiss:"v77JdlkwyPAXfzeRW4DQ","banner-container":"UQccyTHMg7XnAWr5VSGt","banner-content":"SpY2tzcf1aTWPaBpAaQU","banner-description":"_G5mdH1mZpQzrtTJKHAO","banner-image":"g2nzjIQcPzgwZqW4523t"}},5878:()=>{},3171:e=>{var t=1e3,a=60*t,n=60*a,c=24*n,r=7*c,s=365.25*c;function i(e,t,a,n){var c=t>=1.5*a;return Math.round(e/a)+" "+n+(c?"s":"")}e.exports=function(e,l){l=l||{};var o=typeof e;if("string"===o&&e.length>0)return function(e){if((e=String(e)).length>100)return;var i=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!i)return;var l=parseFloat(i[1]);switch((i[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return l*s;case"weeks":case"week":case"w":return l*r;case"days":case"day":case"d":return l*c;case"hours":case"hour":case"hrs":case"hr":case"h":return l*n;case"minutes":case"minute":case"mins":case"min":case"m":return l*a;case"seconds":case"second":case"secs":case"sec":case"s":return l*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return l;default:return}}(e);if("number"===o&&isFinite(e))return l.long?function(e){var r=Math.abs(e);if(r>=c)return i(e,r,c,"day");if(r>=n)return i(e,r,n,"hour");if(r>=a)return i(e,r,a,"minute");if(r>=t)return i(e,r,t,"second");return e+" ms"}(e):function(e){var r=Math.abs(e);if(r>=c)return Math.round(e/c)+"d";if(r>=n)return Math.round(e/n)+"h";if(r>=a)return Math.round(e/a)+"m";if(r>=t)return Math.round(e/t)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},7556:(e,t,a)=>{"use strict";var n=a(3713);function c(){}function r(){}r.resetWarningCache=c,e.exports=function(){function e(e,t,a,c,r,s){if(s!==n){var i=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw i.name="Invariant Violation",i}}function t(){return e}e.isRequired=e;var a={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:r,resetWarningCache:c};return a.PropTypes=a,a}},3059:(e,t,a)=>{e.exports=a(7556)()},3713:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},469:(e,t,a)=>{"use strict";var n=a(758);function c(){}function r(){}r.resetWarningCache=c,e.exports=function(){function e(e,t,a,c,r,s){if(s!==n){var i=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw i.name="Invariant Violation",i}}function t(){return e}e.isRequired=e;var a={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:r,resetWarningCache:c};return a.PropTypes=a,a}},5844:(e,t,a)=>{e.exports=a(469)()},758:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},9997:(e,t,a)=>{"use strict";a.d(t,{UT:()=>u,lr:()=>p,rU:()=>d});var n=a(9196),c=a(6417),r=a(3170);function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(c[a]=e[a]);return c}function l(e){return void 0===e&&(e=""),new URLSearchParams("string"==typeof e||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce(((t,a)=>{let n=e[a];return t.concat(Array.isArray(n)?n.map((e=>[a,e])):[[a,n]])}),[]))}const o=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset"];function u(e){let{basename:t,children:a,window:s}=e,i=n.useRef();null==i.current&&(i.current=(0,r.q_)({window:s,v5Compat:!0}));let l=i.current,[o,u]=n.useState({action:l.action,location:l.location});return n.useLayoutEffect((()=>l.listen(u)),[l]),n.createElement(c.F0,{basename:t,children:a,location:o.location,navigationType:o.action,navigator:l})}const d=n.forwardRef((function(e,t){let{onClick:a,relative:l,reloadDocument:u,replace:d,state:m,target:h,to:p,preventScrollReset:g}=e,v=i(e,o),f=(0,c.oQ)(p,{relative:l}),w=function(e,t){let{target:a,replace:s,state:i,preventScrollReset:l,relative:o}=void 0===t?{}:t,u=(0,c.s0)(),d=(0,c.TH)(),m=(0,c.WU)(e,{relative:o});return n.useCallback((t=>{if(function(e,t){return!(0!==e.button||t&&"_self"!==t||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e))}(t,a)){t.preventDefault();let a=void 0!==s?s:(0,r.Ep)(d)===(0,r.Ep)(m);u(e,{replace:a,state:i,preventScrollReset:l,relative:o})}}),[d,u,m,s,i,a,e,l,o])}(p,{replace:d,state:m,target:h,preventScrollReset:g,relative:l});return n.createElement("a",s({},v,{href:f,onClick:u?a:function(e){a&&a(e),e.defaultPrevented||w(e)},ref:t,target:h}))}));var m,h;function p(e){let t=n.useRef(l(e)),a=(0,c.TH)(),r=n.useMemo((()=>function(e,t){let a=l(e);for(let e of t.keys())a.has(e)||t.getAll(e).forEach((t=>{a.append(e,t)}));return a}(a.search,t.current)),[a.search]),s=(0,c.s0)(),i=n.useCallback(((e,t)=>{const a=l("function"==typeof e?e(r):e);s("?"+a,t)}),[s,r]);return[r,i]}(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmitImpl="useSubmitImpl",e.UseFetcher="useFetcher"})(m||(m={})),function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"}(h||(h={}))},6417:(e,t,a)=>{"use strict";a.d(t,{AW:()=>L,F0:()=>P,Fg:()=>S,TH:()=>y,WU:()=>C,Z5:()=>V,oQ:()=>k,s0:()=>b});var n=a(3170),c=a(9196);function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;t{c.value=n,c.getSnapshot=t,d(c)&&r({inst:c})}),[e,n,t]),l((()=>{d(c)&&r({inst:c});return e((()=>{d(c)&&r({inst:c})}))}),[e]),u(n),n};"useSyncExternalStore"in c&&c.useSyncExternalStore;const h=c.createContext(null);const p=c.createContext(null);const g=c.createContext(null);const v=c.createContext(null);const f=c.createContext({outlet:null,matches:[]});const w=c.createContext(null);function k(e,t){let{relative:a}=void 0===t?{}:t;E()||(0,n.kG)(!1);let{basename:r,navigator:s}=c.useContext(g),{hash:i,pathname:l,search:o}=C(e,{relative:a}),u=l;return"/"!==r&&(u="/"===l?r:(0,n.RQ)([r,l])),s.createHref({pathname:u,search:o,hash:i})}function E(){return null!=c.useContext(v)}function y(){return E()||(0,n.kG)(!1),c.useContext(v).location}function b(){E()||(0,n.kG)(!1);let{basename:e,navigator:t}=c.useContext(g),{matches:a}=c.useContext(f),{pathname:r}=y(),s=JSON.stringify((0,n.Zq)(a).map((e=>e.pathnameBase))),i=c.useRef(!1);return c.useEffect((()=>{i.current=!0})),c.useCallback((function(a,c){if(void 0===c&&(c={}),!i.current)return;if("number"==typeof a)return void t.go(a);let l=(0,n.pC)(a,JSON.parse(s),r,"path"===c.relative);"/"!==e&&(l.pathname="/"===l.pathname?e:(0,n.RQ)([e,l.pathname])),(c.replace?t.replace:t.push)(l,c.state,c)}),[e,t,s,r])}function C(e,t){let{relative:a}=void 0===t?{}:t,{matches:r}=c.useContext(f),{pathname:s}=y(),i=JSON.stringify((0,n.Zq)(r).map((e=>e.pathnameBase)));return c.useMemo((()=>(0,n.pC)(e,JSON.parse(i),s,"path"===a)),[e,i,s,a])}function j(){let e=function(){var e;let t=c.useContext(w),a=R(Z.UseRouteError),n=M(Z.UseRouteError);if(t)return t;return null==(e=a.errors)?void 0:e[n]}(),t=(0,n.WK)(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),a=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",s={padding:"0.5rem",backgroundColor:r},i={padding:"2px 4px",backgroundColor:r};return c.createElement(c.Fragment,null,c.createElement("h2",null,"Unhandled Thrown Error!"),c.createElement("h3",{style:{fontStyle:"italic"}},t),a?c.createElement("pre",{style:s},a):null,c.createElement("p",null,"💿 Hey developer 👋"),c.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",c.createElement("code",{style:i},"errorElement")," props on ",c.createElement("code",{style:i},"")))}class _ extends c.Component{constructor(e){super(e),this.state={location:e.location,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location?{error:e.error,location:e.location}:{error:e.error||t.error,location:t.location}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return this.state.error?c.createElement(f.Provider,{value:this.props.routeContext},c.createElement(w.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function z(e){let{routeContext:t,match:a,children:n}=e,r=c.useContext(h);return r&&r.static&&r.staticContext&&a.route.errorElement&&(r.staticContext._deepestRenderedBoundaryId=a.route.id),c.createElement(f.Provider,{value:t},n)}function N(e,t,a){if(void 0===t&&(t=[]),null==e){if(null==a||!a.errors)return null;e=a.matches}let r=e,s=null==a?void 0:a.errors;if(null!=s){let e=r.findIndex((e=>e.route.id&&(null==s?void 0:s[e.route.id])));e>=0||(0,n.kG)(!1),r=r.slice(0,Math.min(r.length,e+1))}return r.reduceRight(((e,n,i)=>{let l=n.route.id?null==s?void 0:s[n.route.id]:null,o=a?n.route.errorElement||c.createElement(j,null):null,u=t.concat(r.slice(0,i+1)),d=()=>c.createElement(z,{match:n,routeContext:{outlet:e,matches:u}},l?o:void 0!==n.route.element?n.route.element:e);return a&&(n.route.errorElement||0===i)?c.createElement(_,{location:a.location,component:o,error:l,children:d(),routeContext:{outlet:null,matches:u}}):d()}),null)}var x,Z;function R(e){let t=c.useContext(p);return t||(0,n.kG)(!1),t}function M(e){let t=function(e){let t=c.useContext(f);return t||(0,n.kG)(!1),t}(),a=t.matches[t.matches.length-1];return a.route.id||(0,n.kG)(!1),a.route.id}!function(e){e.UseRevalidator="useRevalidator"}(x||(x={})),function(e){e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator"}(Z||(Z={}));function S(e){let{to:t,replace:a,state:r,relative:s}=e;E()||(0,n.kG)(!1);let i=c.useContext(p),l=b();return c.useEffect((()=>{i&&"idle"!==i.navigation.state||l(t,{replace:a,state:r,relative:s})})),null}function L(e){(0,n.kG)(!1)}function P(e){let{basename:t="/",children:a=null,location:r,navigationType:s=n.aU.Pop,navigator:i,static:l=!1}=e;E()&&(0,n.kG)(!1);let o=t.replace(/^\/*/,"/"),u=c.useMemo((()=>({basename:o,navigator:i,static:l})),[o,i,l]);"string"==typeof r&&(r=(0,n.cP)(r));let{pathname:d="/",search:m="",hash:h="",state:p=null,key:f="default"}=r,w=c.useMemo((()=>{let e=(0,n.Zn)(d,o);return null==e?null:{pathname:e,search:m,hash:h,state:p,key:f}}),[o,d,m,h,p,f]);return null==w?null:c.createElement(g.Provider,{value:u},c.createElement(v.Provider,{children:a,value:{location:w,navigationType:s}}))}function V(e){let{children:t,location:a}=e,s=c.useContext(h);return function(e,t){E()||(0,n.kG)(!1);let{navigator:a}=c.useContext(g),s=c.useContext(p),{matches:i}=c.useContext(f),l=i[i.length-1],o=l?l.params:{},u=(l&&l.pathname,l?l.pathnameBase:"/");l&&l.route;let d,m=y();if(t){var h;let e="string"==typeof t?(0,n.cP)(t):t;"/"===u||(null==(h=e.pathname)?void 0:h.startsWith(u))||(0,n.kG)(!1),d=e}else d=m;let w=d.pathname||"/",k="/"===u?w:w.slice(u.length)||"/",b=(0,n.fp)(e,{pathname:k}),C=N(b&&b.map((e=>Object.assign({},e,{params:Object.assign({},o,e.params),pathname:(0,n.RQ)([u,a.encodeLocation?a.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?u:(0,n.RQ)([u,a.encodeLocation?a.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])}))),i,s||void 0);return t&&C?c.createElement(v.Provider,{value:{location:r({pathname:"/",search:"",hash:"",state:null,key:"default"},d),navigationType:n.aU.Pop}},C):C}(s&&!t?s.router.routes:A(t),a)}var H;!function(e){e[e.pending=0]="pending",e[e.success=1]="success",e[e.error=2]="error"}(H||(H={}));new Promise((()=>{}));c.Component;function A(e,t){void 0===t&&(t=[]);let a=[];return c.Children.forEach(e,((e,r)=>{if(!c.isValidElement(e))return;if(e.type===c.Fragment)return void a.push.apply(a,A(e.props.children,t));e.type!==L&&(0,n.kG)(!1),e.props.index&&e.props.children&&(0,n.kG)(!1);let s=[...t,r],i={id:e.props.id||s.join("-"),caseSensitive:e.props.caseSensitive,element:e.props.element,index:e.props.index,path:e.props.path,loader:e.props.loader,action:e.props.action,errorElement:e.props.errorElement,hasErrorBoundary:null!=e.props.errorElement,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle};e.props.children&&(i.children=A(e.props.children,s)),a.push(i)})),a}},4561:(e,t,a)=>{"use strict";var n=a(9196),c=Symbol.for("react.element"),r=Symbol.for("react.fragment"),s=Object.prototype.hasOwnProperty,i=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function o(e,t,a){var n,r={},o=null,u=null;for(n in void 0!==a&&(o=""+a),void 0!==t.key&&(o=""+t.key),void 0!==t.ref&&(u=t.ref),t)s.call(t,n)&&!l.hasOwnProperty(n)&&(r[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps)void 0===r[n]&&(r[n]=t[n]);return{$$typeof:c,type:e,key:o,ref:u,props:r,_owner:i.current}}t.jsx=o},275:(e,t,a)=>{"use strict";e.exports=a(4561)},2659:(e,t,a)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}var c,r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==n(e)&&"function"!=typeof e)return{default:e};var a=l(t);if(a&&a.has(e))return a.get(e);var c={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if("default"!=s&&Object.prototype.hasOwnProperty.call(e,s)){var i=r?Object.getOwnPropertyDescriptor(e,s):null;i&&(i.get||i.set)?Object.defineProperty(c,s,i):c[s]=e[s]}return c.default=e,a&&a.set(e,c),c}(a(9196)),s=(c=a(5844))&&c.__esModule?c:{default:c},i=["size","onClick","icon","className"];function l(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,a=new WeakMap;return(l=function(e){return e?a:t})(e)}function o(){return o=Object.assign||function(e){for(var t,a=1;a{"use strict";a.d(t,{Z:()=>l});var n=a(951);const c=a.n(n)()("dops:analytics");let r,s;window._tkq=window._tkq||[],window.ga=window.ga||function(){(window.ga.q=window.ga.q||[]).push(arguments)},window.ga.l=+new Date;const i={initialize:function(e,t,a){i.setUser(e,t),i.setSuperProps(a),i.identifyUser()},setGoogleAnalyticsEnabled:function(e,t=null){this.googleAnalyticsEnabled=e,this.googleAnalyticsKey=t},setMcAnalyticsEnabled:function(e){this.mcAnalyticsEnabled=e},setUser:function(e,t){s={ID:e,username:t}},setSuperProps:function(e){r=e},assignSuperProps:function(e){r=Object.assign(r||{},e)},mc:{bumpStat:function(e,t){const a=function(e,t){let a="";if("object"==typeof e){for(const t in e)a+="&x_"+encodeURIComponent(t)+"="+encodeURIComponent(e[t]);c("Bumping stats %o",e)}else a="&x_"+encodeURIComponent(e)+"="+encodeURIComponent(t),c('Bumping stat "%s" in group "%s"',t,e);return a}(e,t);i.mcAnalyticsEnabled&&((new Image).src=document.location.protocol+"//pixel.wp.com/g.gif?v=wpcom-no-pv"+a+"&t="+Math.random())},bumpStatWithPageView:function(e,t){const a=function(e,t){let a="";if("object"==typeof e){for(const t in e)a+="&"+encodeURIComponent(t)+"="+encodeURIComponent(e[t]);c("Built stats %o",e)}else a="&"+encodeURIComponent(e)+"="+encodeURIComponent(t),c('Built stat "%s" in group "%s"',t,e);return a}(e,t);i.mcAnalyticsEnabled&&((new Image).src=document.location.protocol+"//pixel.wp.com/g.gif?v=wpcom"+a+"&t="+Math.random())}},pageView:{record:function(e,t){i.tracks.recordPageView(e),i.ga.recordPageView(e,t)}},purchase:{record:function(e,t,a,n,c,r,s){i.ga.recordPurchase(e,t,a,n,c,r,s)}},tracks:{recordEvent:function(e,t){t=t||{},0===e.indexOf("akismet_")||0===e.indexOf("jetpack_")?(r&&(c("- Super Props: %o",r),t=Object.assign(t,r)),c('Record event "%s" called with props %s',e,JSON.stringify(t)),window._tkq.push(["recordEvent",e,t])):c('- Event name must be prefixed by "akismet_" or "jetpack_"')},recordJetpackClick:function(e){const t="object"==typeof e?e:{target:e};i.tracks.recordEvent("jetpack_wpa_click",t)},recordPageView:function(e){i.tracks.recordEvent("akismet_page_view",{path:e})},setOptOut:function(e){c("Pushing setOptOut: %o",e),window._tkq.push(["setOptOut",e])}},ga:{initialized:!1,initialize:function(){let e={};i.ga.initialized||(s&&(e={userId:"u-"+s.ID}),window.ga("create",this.googleAnalyticsKey,"auto",e),i.ga.initialized=!0)},recordPageView:function(e,t){i.ga.initialize(),c("Recording Page View ~ [URL: "+e+"] [Title: "+t+"]"),this.googleAnalyticsEnabled&&(window.ga("set","page",e),window.ga("send",{hitType:"pageview",page:e,title:t}))},recordEvent:function(e,t,a,n){i.ga.initialize();let r="Recording Event ~ [Category: "+e+"] [Action: "+t+"]";void 0!==a&&(r+=" [Option Label: "+a+"]"),void 0!==n&&(r+=" [Option Value: "+n+"]"),c(r),this.googleAnalyticsEnabled&&window.ga("send","event",e,t,a,n)},recordPurchase:function(e,t,a,n,c,r,s){window.ga("require","ecommerce"),window.ga("ecommerce:addTransaction",{id:e,revenue:n,currency:s}),window.ga("ecommerce:addItem",{id:e,name:t,sku:a,price:c,quantity:r}),window.ga("ecommerce:send")}},identifyUser:function(){s&&window._tkq.push(["identifyUser",s.ID,s.username])},setProperties:function(e){window._tkq.push(["setProperties",e])},clearedIdentity:function(){window._tkq.push(["clearIdentity"])}},l=i},4743:(e,t,a)=>{"use strict";a.d(t,{ZP:()=>d});var n=a(1132),c=a(6483);function r(e){class t extends Error{constructor(...t){super(...t),this.name=e}}return t}const s=r("JsonParseError"),i=r("JsonParseAfterRedirectError"),l=r("Api404Error"),o=r("Api404AfterRedirectError"),u=r("FetchNetworkError");const d=new function(e,t){let a=e,r=e,s={"X-WP-Nonce":t},i={credentials:"same-origin",headers:s},l={method:"post",credentials:"same-origin",headers:Object.assign({},s,{"Content-type":"application/json"})},o=function(e){const t=e.split("?"),a=t.length>1?t[1]:"",n=a.length?a.split("&"):[];return n.push("_cacheBuster="+(new Date).getTime()),t[0]+"?"+n.join("&")};const u={setApiRoot(e){a=e},setWpcomOriginApiUrl(e){r=e},setApiNonce(e){s={"X-WP-Nonce":e},i={credentials:"same-origin",headers:s},l={method:"post",credentials:"same-origin",headers:Object.assign({},s,{"Content-type":"application/json"})}},setCacheBusterCallback:e=>{o=e},registerSite:(e,t)=>{const c={registration_nonce:e,no_iframe:!0};return(0,n.jetpackConfigHas)("consumer_slug")&&(c.plugin_slug=(0,n.jetpackConfigGet)("consumer_slug")),null!==t&&(c.redirect_uri=t),p(`${a}jetpack/v4/connection/register`,l,{body:JSON.stringify(c)}).then(m).then(h)},fetchAuthorizationUrl:e=>d((0,c.addQueryArgs)(`${a}jetpack/v4/connection/authorize_url`,{no_iframe:"1",redirect_uri:e}),i).then(m).then(h),fetchSiteConnectionData:()=>d(`${a}jetpack/v4/connection/data`,i).then(h),fetchSiteConnectionStatus:()=>d(`${a}jetpack/v4/connection`,i).then(h),fetchSiteConnectionTest:()=>d(`${a}jetpack/v4/connection/test`,i).then(m).then(h),fetchUserConnectionData:()=>d(`${a}jetpack/v4/connection/data`,i).then(h),fetchUserTrackingSettings:()=>d(`${a}jetpack/v4/tracking/settings`,i).then(m).then(h),updateUserTrackingSettings:e=>p(`${a}jetpack/v4/tracking/settings`,l,{body:JSON.stringify(e)}).then(m).then(h),disconnectSite:()=>p(`${a}jetpack/v4/connection`,l,{body:JSON.stringify({isActive:!1})}).then(m).then(h),fetchConnectUrl:()=>d(`${a}jetpack/v4/connection/url`,i).then(m).then(h),unlinkUser:()=>p(`${a}jetpack/v4/connection/user`,l,{body:JSON.stringify({linked:!1})}).then(m).then(h),reconnect:()=>p(`${a}jetpack/v4/connection/reconnect`,l).then(m).then(h),fetchConnectedPlugins:()=>d(`${a}jetpack/v4/connection/plugins`,i).then(m).then(h),setHasSeenWCConnectionModal:()=>p(`${a}jetpack/v4/seen-wc-connection-modal`,l).then(m).then(h),fetchModules:()=>d(`${a}jetpack/v4/module/all`,i).then(m).then(h),fetchModule:e=>d(`${a}jetpack/v4/module/${e}`,i).then(m).then(h),activateModule:e=>p(`${a}jetpack/v4/module/${e}/active`,l,{body:JSON.stringify({active:!0})}).then(m).then(h),deactivateModule:e=>p(`${a}jetpack/v4/module/${e}/active`,l,{body:JSON.stringify({active:!1})}),updateModuleOptions:(e,t)=>p(`${a}jetpack/v4/module/${e}`,l,{body:JSON.stringify(t)}).then(m).then(h),updateSettings:e=>p(`${a}jetpack/v4/settings`,l,{body:JSON.stringify(e)}).then(m).then(h),getProtectCount:()=>d(`${a}jetpack/v4/module/protect/data`,i).then(m).then(h),resetOptions:e=>p(`${a}jetpack/v4/options/${e}`,l,{body:JSON.stringify({reset:!0})}).then(m).then(h),activateVaultPress:()=>p(`${a}jetpack/v4/plugins`,l,{body:JSON.stringify({slug:"vaultpress",status:"active"})}).then(m).then(h),getVaultPressData:()=>d(`${a}jetpack/v4/module/vaultpress/data`,i).then(m).then(h),installPlugin:(e,t)=>{const n={slug:e,status:"active"};return t&&(n.source=t),p(`${a}jetpack/v4/plugins`,l,{body:JSON.stringify(n)}).then(m).then(h)},activateAkismet:()=>p(`${a}jetpack/v4/plugins`,l,{body:JSON.stringify({slug:"akismet",status:"active"})}).then(m).then(h),getAkismetData:()=>d(`${a}jetpack/v4/module/akismet/data`,i).then(m).then(h),checkAkismetKey:()=>d(`${a}jetpack/v4/module/akismet/key/check`,i).then(m).then(h),checkAkismetKeyTyped:e=>p(`${a}jetpack/v4/module/akismet/key/check`,l,{body:JSON.stringify({api_key:e})}).then(m).then(h),fetchStatsData:e=>d(function(e){let t=`${a}jetpack/v4/module/stats/data`;-1!==t.indexOf("?")?t+=`&range=${encodeURIComponent(e)}`:t+=`?range=${encodeURIComponent(e)}`;return t}(e),i).then(m).then(h).then(v),getPluginUpdates:()=>d(`${a}jetpack/v4/updates/plugins`,i).then(m).then(h),getPlans:()=>d(`${a}jetpack/v4/plans`,i).then(m).then(h),fetchSettings:()=>d(`${a}jetpack/v4/settings`,i).then(m).then(h),updateSetting:e=>p(`${a}jetpack/v4/settings`,l,{body:JSON.stringify(e)}).then(m).then(h),fetchSiteData:()=>d(`${a}jetpack/v4/site`,i).then(m).then(h).then((e=>JSON.parse(e.data))),fetchSiteFeatures:()=>d(`${a}jetpack/v4/site/features`,i).then(m).then(h).then((e=>JSON.parse(e.data))),fetchSiteProducts:()=>d(`${a}jetpack/v4/site/products`,i).then(m).then(h),fetchSitePurchases:()=>d(`${a}jetpack/v4/site/purchases`,i).then(m).then(h).then((e=>JSON.parse(e.data))),fetchSiteBenefits:()=>d(`${a}jetpack/v4/site/benefits`,i).then(m).then(h).then((e=>JSON.parse(e.data))),fetchSiteDiscount:()=>d(`${a}jetpack/v4/site/discount`,i).then(m).then(h).then((e=>e.data)),fetchSetupQuestionnaire:()=>d(`${a}jetpack/v4/setup/questionnaire`,i).then(m).then(h),fetchRecommendationsData:()=>d(`${a}jetpack/v4/recommendations/data`,i).then(m).then(h),fetchRecommendationsProductSuggestions:()=>d(`${a}jetpack/v4/recommendations/product-suggestions`,i).then(m).then(h),fetchRecommendationsUpsell:()=>d(`${a}jetpack/v4/recommendations/upsell`,i).then(m).then(h),fetchRecommendationsConditional:()=>d(`${a}jetpack/v4/recommendations/conditional`,i).then(m).then(h),saveRecommendationsData:e=>p(`${a}jetpack/v4/recommendations/data`,l,{body:JSON.stringify({data:e})}).then(m),fetchProducts:()=>d(`${a}jetpack/v4/products`,i).then(m).then(h),fetchRewindStatus:()=>d(`${a}jetpack/v4/rewind`,i).then(m).then(h).then((e=>JSON.parse(e.data))),fetchScanStatus:()=>d(`${a}jetpack/v4/scan`,i).then(m).then(h).then((e=>JSON.parse(e.data))),dismissJetpackNotice:e=>p(`${a}jetpack/v4/notice/${e}`,l,{body:JSON.stringify({dismissed:!0})}).then(m).then(h),fetchPluginsData:()=>d(`${a}jetpack/v4/plugins`,i).then(m).then(h),fetchIntroOffers:()=>d(`${a}jetpack/v4/intro-offers`,i).then(m).then(h),fetchVerifySiteGoogleStatus:e=>d(null!==e?`${a}jetpack/v4/verify-site/google/${e}`:`${a}jetpack/v4/verify-site/google`,i).then(m).then(h),verifySiteGoogle:e=>p(`${a}jetpack/v4/verify-site/google`,l,{body:JSON.stringify({keyring_id:e})}).then(m).then(h),submitSurvey:e=>p(`${a}jetpack/v4/marketing/survey`,l,{body:JSON.stringify(e)}).then(m).then(h),saveSetupQuestionnaire:e=>p(`${a}jetpack/v4/setup/questionnaire`,l,{body:JSON.stringify(e)}).then(m).then(h),updateLicensingError:e=>p(`${a}jetpack/v4/licensing/error`,l,{body:JSON.stringify(e)}).then(m).then(h),updateLicenseKey:e=>p(`${a}jetpack/v4/licensing/set-license`,l,{body:JSON.stringify({license:e})}).then(m).then(h),getUserLicensesCounts:()=>d(`${a}jetpack/v4/licensing/user/counts`,i).then(m).then(h),getUserLicenses:()=>d(`${a}jetpack/v4/licensing/user/licenses`,i).then(m).then(h),updateLicensingActivationNoticeDismiss:e=>p(`${a}jetpack/v4/licensing/user/activation-notice-dismiss`,l,{body:JSON.stringify({last_detached_count:e})}).then(m).then(h),updateRecommendationsStep:e=>p(`${a}jetpack/v4/recommendations/step`,l,{body:JSON.stringify({step:e})}).then(m),confirmIDCSafeMode:()=>p(`${a}jetpack/v4/identity-crisis/confirm-safe-mode`,l).then(m),startIDCFresh:e=>p(`${a}jetpack/v4/identity-crisis/start-fresh`,l,{body:JSON.stringify({redirect_uri:e})}).then(m).then(h),migrateIDC:()=>p(`${a}jetpack/v4/identity-crisis/migrate`,l).then(m),attachLicenses:e=>p(`${a}jetpack/v4/licensing/attach-licenses`,l,{body:JSON.stringify({licenses:e})}).then(m).then(h),fetchSearchPlanInfo:()=>d(`${r}jetpack/v4/search/plan`,i).then(m).then(h),fetchSearchSettings:()=>d(`${r}jetpack/v4/search/settings`,i).then(m).then(h),updateSearchSettings:e=>p(`${r}jetpack/v4/search/settings`,l,{body:JSON.stringify(e)}).then(m).then(h),fetchSearchStats:()=>d(`${r}jetpack/v4/search/stats`,i).then(m).then(h),fetchWafSettings:()=>d(`${a}jetpack/v4/waf`,i).then(m).then(h),updateWafSettings:e=>p(`${a}jetpack/v4/waf`,l,{body:JSON.stringify(e)}).then(m).then(h),fetchWordAdsSettings:()=>d(`${a}jetpack/v4/wordads/settings`,i).then(m).then(h),updateWordAdsSettings:e=>p(`${a}jetpack/v4/wordads/settings`,l,{body:JSON.stringify(e)}),fetchSearchPricing:()=>d(`${r}jetpack/v4/search/pricing`,i).then(m).then(h),fetchMigrationStatus:()=>d(`${a}jetpack/v4/migration/status`,i).then(m).then(h),fetchBackupUndoEvent:()=>d(`${a}jetpack/v4/site/backup/undo-event`,i).then(m).then(h),fetchBackupPreflightStatus:()=>d(`${a}jetpack/v4/site/backup/preflight`,i).then(m).then(h)};function d(e,t){return fetch(o(e),t)}function p(e,t,a){return fetch(e,Object.assign({},t,a)).catch(g)}function v(e){return e.general&&void 0===e.general.response||e.week&&void 0===e.week.response||e.month&&void 0===e.month.response?e:{}}Object.assign(this,u)};function m(e){return e.status>=200&&e.status<300?e:404===e.status?new Promise((()=>{throw e.redirected?new o(e.redirected):new l})):e.json().catch((e=>p(e))).then((t=>{const a=new Error(`${t.message} (Status ${e.status})`);throw a.response=t,a.name="ApiError",a}))}function h(e){return e.json().catch((t=>p(t,e.redirected,e.url)))}function p(e,t,a){throw t?new i(a):new s}function g(){throw new u}},2264:(e,t,a)=>{"use strict";a.d(t,{M:()=>s});var n=a(5736),c=a(5146),r=a(6873);const __=n.__;class s extends Error{constructor(e,t,a){super(),this.httpCode=e,this.body=t,this.parseError=a}get message(){switch(this.httpCode){case 403:return this.getRestApiErrorMessage();case 200:if(this.parseError)return(0,n.sprintf)(/* Translators: %s refers to a browser-supplied error message (hopefully already in the right language) */ -__("Received invalid response while communicating with your WordPress site: %s","jetpack-my-jetpack"),this.parseError.message)}return(0,n.sprintf)(/* Translators: %d refers to numeric HTTP error code */ -__("HTTP %d error received while communicating with the server.","jetpack-my-jetpack"),this.httpCode)}getDisplayBody(){return(0,r.b)(this.body)?JSON.stringify(this.body,null," "):(0,c.x)(this.body,"").substring(0,1e3)}getRestApiErrorMessage(){return __("Your site's REST API does not seem to be accessible. Jetpack Boost requires access to your REST API in order to receive site performance scores. Please make sure that your site's REST API is active and accessible, and try again.","jetpack-my-jetpack")}}},8426:(e,t,a)=>{"use strict";a.d(t,{Z:()=>l});var n=a(5736),c=a(2264),r=a(259);const __=n.__;async function s(e,t,a,c=null,s){const i={method:e,mode:"cors",headers:{"X-WP-Nonce":s}};"post"!==e&&"delete"!==e||!c||(i.body=JSON.stringify(c),i.headers["Content-Type"]="application/json");const l=function(e,t){return t+r.N+r.L+e}(a,t);let o;try{o=await fetch(l,i)}catch(e){const t=i;delete t.body,delete t.headers["X-WP-Nonce"];const a={requestInitiator:window.location.href,requestUrl:l,requestArgs:t,originalErrorMessage:e.toString()};throw new Error((0,n.sprintf)(/* Translators: %s refers to a string representation of an error object containing useful debug information */ -__("An error occurred while trying to communicate with the site REST API. Extra debug info: %s","jetpack-my-jetpack"),JSON.stringify(a)))}return o}async function i(e,t,a,n=null,r){const i=await s(e,t,a,n,r);let l,o;try{l=await i.text()}catch(e){throw new c.M(i.status,null,e)}try{o=JSON.parse(l)}catch(e){throw new c.M(i.status,l,e)}if(!i.ok)throw new c.M(i.status,o,null);return o}const l={get:function(e,t,a){return i("get",e,t,null,a)},post:function(e,t,a=null,n){return i("post",e,t,a,n)}}},259:(e,t,a)=>{"use strict";a.d(t,{L:()=>c,N:()=>n});const n="jetpack-boost/v1",c=""},128:(e,t,a)=>{"use strict";a.d(t,{Fr:()=>g,tZ:()=>m,yn:()=>p});var n=a(5736),c=a(8426),r=a(1061),s=a(5146),i=a(6873),l=a(2653),o=a(2893);const __=n.__,u=12e4,d=5e3;async function m(e=!1,t,a,n){const r=h(await c.Z.post(t,e?"/speed-scores/refresh":"/speed-scores",{url:a},n));return r.scores?r.scores:await async function(e,t,a){return(0,l.Z)({timeout:u,interval:d,timeoutError:__("Timed out while waiting for speed-score.","jetpack-my-jetpack"),callback:async n=>{const r=h(await c.Z.post(e,"/speed-scores",{url:t},a));r.scores&&n(r.scores)}})}(t,a,n)}function h(e){if(e.error){const t=__("An unknown error occurred while requesting metrics","jetpack-my-jetpack");throw(0,o.V)(e.error,t)}if((0,i.b)(e.scores))return{status:"success",scores:{current:(0,i.b)(e.scores.current)?{mobile:(0,r.W)(e.scores.current.mobile,0),desktop:(0,r.W)(e.scores.current.desktop,0)}:{mobile:0,desktop:0},noBoost:(0,i.b)(e.scores.noBoost)?{mobile:(0,r.W)(e.scores.noBoost.mobile,0),desktop:(0,r.W)(e.scores.noBoost.desktop,0)}:null,isStale:!!e.scores.isStale}};const t=(0,s.x)(e.status);if(!t)throw new Error(__("Invalid response while requesting metrics","jetpack-my-jetpack"));return{status:t}}function p(e,t){const a=(e+t)/2;return a>90?"A":a>75?"B":a>50?"C":a>35?"D":a>25?"E":"F"}function g(e){const t=new Date(e),a=(new Date).valueOf()-t.valueOf();return Math.floor(a/864e5)}},1061:(e,t,a)=>{"use strict";function n(e,t=void 0){if("number"==typeof e)return e;if("string"==typeof e){const t=parseFloat(e);if(!isNaN(t))return t}return t}a.d(t,{W:()=>n})},5146:(e,t,a)=>{"use strict";function n(e,t=void 0){return"string"==typeof e?e:e&&e.toString instanceof Function?e.toString():t}a.d(t,{x:()=>n})},6873:(e,t,a)=>{"use strict";function n(e){return!!e&&e instanceof Object&&!(e instanceof Array)}a.d(t,{b:()=>n})},2653:(e,t,a)=>{"use strict";a.d(t,{Z:()=>c});var n=a(5736);const __=n.__;async function c({interval:e,callback:t,timeout:a,timeoutError:n}){let c,r;return new Promise(((s,i)=>{c=setTimeout((()=>{i(new Error(n||__("Timed out","jetpack-my-jetpack")))}),a||12e4),r=setInterval((async()=>{try{await Promise.resolve(t(s))}catch(e){i(e)}}),e)})).finally((()=>{clearTimeout(c),clearInterval(r)}))}},2893:(e,t,a)=>{"use strict";function n(e,t){return e instanceof Error?e:"string"==typeof e||e instanceof String?new Error(e.toString()):e.message?new Error(e.message):t?new Error(t):new Error(JSON.stringify(e))}a.d(t,{V:()=>n})},7121:(e,t,a)=>{"use strict";a.d(t,{Z:()=>p});var n=a(5609),c=a(5736),r=a(5235),s=a.n(r),i=a(5844),l=a.n(i),o=a(9196),u=a.n(o),d=a(526),m=a(2289);const __=c.__,h=e=>{const{label:t,onClick:a,isLoading:c,isDisabled:r,displayError:i,errorMessage:l}=e;return u().createElement(u().Fragment,null,u().createElement(d.Z,{className:s()(m.Z.button,"jp-action-button--button"),label:t,onClick:a,variant:"primary",disabled:c||r},c?u().createElement(n.Spinner,null):t),i&&u().createElement("p",{className:s()(m.Z.error,"jp-action-button__error")},l))};h.propTypes={label:l().string.isRequired,onClick:l().func,isLoading:l().bool,isDisabled:l().bool,displayError:l().bool,errorMessage:l().oneOfType([l().string,l().element])},h.defaultProps={isLoading:!1,displayError:!1,errorMessage:__("An error occurred. Please try again.","jetpack-my-jetpack")};const p=h},9105:(e,t,a)=>{"use strict";a.d(t,{Z:()=>d});var n=a(5736),c=a(5235),r=a.n(c),s=a(8237),i=a(8868),l=a(3846),o=a(3363),u=a(1494);const __=n.__,d=({children:e,moduleName:t=__("Jetpack","jetpack-my-jetpack"),moduleNameHref:a,showHeader:n=!0,showFooter:c=!0,showBackground:d=!0,header:m})=>{const h=r()(u.Z["admin-page"],{[u.Z.background]:d});return React.createElement("div",{className:h},n&&React.createElement(o.Z,{horizontalSpacing:5},React.createElement(l.Z,null,m||React.createElement(i.Z,null))),React.createElement(o.Z,{fluid:!0,horizontalSpacing:0},React.createElement(l.Z,null,e)),c&&React.createElement(o.Z,{horizontalSpacing:5},React.createElement(l.Z,null,React.createElement(s.Z,{moduleName:t,moduleNameHref:a}))))}},6579:(e,t,a)=>{"use strict";a.d(t,{Z:()=>s});var n=a(9196),c=a.n(n),r=a(511);const s=({children:e})=>c().createElement("div",{className:r.Z.section},e)},216:(e,t,a)=>{"use strict";a.d(t,{Z:()=>s});var n=a(9196),c=a.n(n),r=a(281);const s=({children:e})=>c().createElement("div",{className:r.Z["section-hero"]},e)},4972:(e,t,a)=>{"use strict";a.d(t,{Z:()=>p});var n=a(797),c=a(496),r=a(9201),s=a(1074),i=a(5235),l=a.n(i),o=a(9196),u=a.n(o),d=a(9171);const m=e=>{switch(e){case"error":case"warning":default:return n.Z;case"info":return c.Z;case"success":return r.Z}},h=({level:e,children:t,showIcon:a})=>{const n=l()(d.Z.container,d.Z[`is-${e}`]);return u().createElement("div",{className:n},a&&u().createElement("div",{className:d.Z["icon-wrapper"]},u().createElement(s.Z,{icon:m(e),className:d.Z.icon})),u().createElement("div",null,t))};h.defaultProps={level:"warning",showIcon:!0};const p=h},7525:(e,t,a)=>{"use strict";a.d(t,{Z:()=>u});var n=a(2674),c=a.n(n),r=a(5736),s=a(5235),i=a.n(s),l=a(9196),o=a.n(l);const __=r.__,u=({title:e=__("An Automattic Airline","jetpack-my-jetpack"),height:t=7,className:a,...n})=>o().createElement("svg",c()({role:"img",x:"0",y:"0",viewBox:"0 0 935 38.2",enableBackground:"new 0 0 935 38.2","aria-labelledby":"jp-automattic-byline-logo-title",height:t,className:i()("jp-automattic-byline-logo",a)},n),o().createElement("desc",{id:"jp-automattic-byline-logo-title"},e),o().createElement("path",{d:"M317.1 38.2c-12.6 0-20.7-9.1-20.7-18.5v-1.2c0-9.6 8.2-18.5 20.7-18.5 12.6 0 20.8 8.9 20.8 18.5v1.2C337.9 29.1 329.7 38.2 317.1 38.2zM331.2 18.6c0-6.9-5-13-14.1-13s-14 6.1-14 13v0.9c0 6.9 5 13.1 14 13.1s14.1-6.2 14.1-13.1V18.6zM175 36.8l-4.7-8.8h-20.9l-4.5 8.8h-7L157 1.3h5.5L182 36.8H175zM159.7 8.2L152 23.1h15.7L159.7 8.2zM212.4 38.2c-12.7 0-18.7-6.9-18.7-16.2V1.3h6.6v20.9c0 6.6 4.3 10.5 12.5 10.5 8.4 0 11.9-3.9 11.9-10.5V1.3h6.7V22C231.4 30.8 225.8 38.2 212.4 38.2zM268.6 6.8v30h-6.7v-30h-15.5V1.3h37.7v5.5H268.6zM397.3 36.8V8.7l-1.8 3.1 -14.9 25h-3.3l-14.7-25 -1.8-3.1v28.1h-6.5V1.3h9.2l14 24.4 1.7 3 1.7-3 13.9-24.4h9.1v35.5H397.3zM454.4 36.8l-4.7-8.8h-20.9l-4.5 8.8h-7l19.2-35.5h5.5l19.5 35.5H454.4zM439.1 8.2l-7.7 14.9h15.7L439.1 8.2zM488.4 6.8v30h-6.7v-30h-15.5V1.3h37.7v5.5H488.4zM537.3 6.8v30h-6.7v-30h-15.5V1.3h37.7v5.5H537.3zM569.3 36.8V4.6c2.7 0 3.7-1.4 3.7-3.4h2.8v35.5L569.3 36.8 569.3 36.8zM628 11.3c-3.2-2.9-7.9-5.7-14.2-5.7 -9.5 0-14.8 6.5-14.8 13.3v0.7c0 6.7 5.4 13 15.3 13 5.9 0 10.8-2.8 13.9-5.7l4 4.2c-3.9 3.8-10.5 7.1-18.3 7.1 -13.4 0-21.6-8.7-21.6-18.3v-1.2c0-9.6 8.9-18.7 21.9-18.7 7.5 0 14.3 3.1 18 7.1L628 11.3zM321.5 12.4c1.2 0.8 1.5 2.4 0.8 3.6l-6.1 9.4c-0.8 1.2-2.4 1.6-3.6 0.8l0 0c-1.2-0.8-1.5-2.4-0.8-3.6l6.1-9.4C318.7 11.9 320.3 11.6 321.5 12.4L321.5 12.4z"}),o().createElement("path",{d:"M37.5 36.7l-4.7-8.9H11.7l-4.6 8.9H0L19.4 0.8H25l19.7 35.9H37.5zM22 7.8l-7.8 15.1h15.9L22 7.8zM82.8 36.7l-23.3-24 -2.3-2.5v26.6h-6.7v-36H57l22.6 24 2.3 2.6V0.8h6.7v35.9H82.8z"}),o().createElement("path",{d:"M719.9 37l-4.8-8.9H694l-4.6 8.9h-7.1l19.5-36h5.6l19.8 36H719.9zM704.4 8l-7.8 15.1h15.9L704.4 8zM733 37V1h6.8v36H733zM781 37c-1.8 0-2.6-2.5-2.9-5.8l-0.2-3.7c-0.2-3.6-1.7-5.1-8.4-5.1h-12.8V37H750V1h19.6c10.8 0 15.7 4.3 15.7 9.9 0 3.9-2 7.7-9 9 7 0.5 8.5 3.7 8.6 7.9l0.1 3c0.1 2.5 0.5 4.3 2.2 6.1V37H781zM778.5 11.8c0-2.6-2.1-5.1-7.9-5.1h-13.8v10.8h14.4c5 0 7.3-2.4 7.3-5.2V11.8zM794.8 37V1h6.8v30.4h28.2V37H794.8zM836.7 37V1h6.8v36H836.7zM886.2 37l-23.4-24.1 -2.3-2.5V37h-6.8V1h6.5l22.7 24.1 2.3 2.6V1h6.8v36H886.2zM902.3 37V1H935v5.6h-26v9.2h20v5.5h-20v10.1h26V37H902.3z"}))},4186:(e,t,a)=>{"use strict";a.d(t,{Z:()=>i});var n=a(5736),c=a(5235),r=a.n(c),s=a(7172);a(6923);const __=n.__,i=({score:e,isLoading:t,showPrevScores:a,active:n,prevScore:c=0,scoreBarType:i,noBoostScoreTooltip:l})=>{if(!n)return null;const o=c/e*100,u=__("Desktop score","jetpack-my-jetpack"),d=__("Mobile score","jetpack-my-jetpack");return React.createElement("div",{className:r()("jb-score-bar",`jb-score-bar--${i}`)},React.createElement("div",{className:"jb-score-bar__label"},"desktop"===i?React.createElement(s.Z,{icon:"computer",size:24}):React.createElement(s.Z,{icon:"phone",size:24}),React.createElement("div",null,"desktop"===i?u:d)),React.createElement("div",{className:"jb-score-bar__bounds"},React.createElement("div",{className:r()("jb-score-bar__filler",t&&!e?"fill-loading":e>70?"fill-good":e>50?"fill-mediocre":"fill-bad"),style:{width:`${e}%`}},t?React.createElement("div",{className:"jb-score-bar__loading"},React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 128 128"},React.createElement("g",null,React.createElement("path",{d:"M64 0a7 7 0 11-7 7 7 7 0 017-7zm29.86 12.2a2.8 2.8 0 11-3.83 1.02 2.8 2.8 0 013.83-1.02zm22.16 21.68a3.15 3.15 0 11-4.3-1.15 3.15 3.15 0 014.3 1.15zm.87 60.53a4.2 4.2 0 11-1.57-5.7 4.2 4.2 0 011.54 5.73zm7.8-30.5a3.85 3.85 0 11-3.85-3.85 3.85 3.85 0 013.85 3.84zm-30 53.2a4.55 4.55 0 111.66-6.23 4.55 4.55 0 01-1.67 6.22zM64 125.9a4.9 4.9 0 114.9-4.9 4.9 4.9 0 01-4.9 4.9zm-31.06-8.22a5.25 5.25 0 117.17-1.93 5.25 5.25 0 01-7.14 1.93zM9.9 95.1a5.6 5.6 0 117.65 2.06A5.6 5.6 0 019.9 95.1zM1.18 63.9a5.95 5.95 0 115.95 5.94 5.95 5.95 0 01-5.96-5.94zm8.1-31.6a6.3 6.3 0 112.32 8.6 6.3 6.3 0 01-2.3-8.6zM32.25 8.87a6.65 6.65 0 11-2.44 9.1 6.65 6.65 0 012.46-9.1z"}),React.createElement("animateTransform",{attributeName:"transform",type:"rotate",values:"0 64 64;30 64 64;60 64 64;90 64 64;120 64 64;150 64 64;180 64 64;210 64 64;240 64 64;270 64 64;300 64 64;330 64 64",calcMode:"discrete",dur:"1080ms",repeatCount:"indefinite"})))):React.createElement("div",{className:"jb-score-bar__score"},e),a&&!!c&&c{"use strict";a.d(t,{Z:()=>g});var n=a(2674),c=a.n(n),r=a(5609),s=a(5736),i=a(1074),l=a(5381),o=a(5235),u=a.n(o),d=a(9196),m=a.n(d),h=a(3466);const __=s.__,p=(0,d.forwardRef)(((e,t)=>{const{children:a,variant:n="primary",size:s="normal",weight:o="bold",icon:d,iconSize:p,disabled:g,isDestructive:v,isLoading:f,isExternalLink:w,className:k,text:E,fullWidth:y,...b}=e,C=u()(h.Z.button,k,{[h.Z.normal]:"normal"===s,[h.Z.small]:"small"===s,[h.Z.icon]:Boolean(d),[h.Z.loading]:f,[h.Z.regular]:"regular"===o,[h.Z["full-width"]]:y,[h.Z["is-icon-button"]]:Boolean(d)&&!a});b.ref=t;const j="normal"===s?20:16,_=w&&m().createElement(m().Fragment,null,m().createElement(i.Z,{size:j,icon:l.Z,className:h.Z["external-icon"]}),m().createElement(r.VisuallyHidden,{as:"span"},/* translators: accessibility text */ -__("(opens in a new tab)","jetpack-my-jetpack"))),z=w?"_blank":void 0,N=a?.[0]&&null!==a[0]&&"components-tooltip"!==a?.[0]?.props?.className;return m().createElement(r.Button,c()({target:z,variant:n,className:u()(C,{"has-text":!!d&&N}),icon:w?void 0:d,iconSize:p,disabled:g,"aria-disabled":g,isDestructive:v,text:E},b),f&&m().createElement(r.Spinner,null),m().createElement("span",null,a),_)}));p.displayName="Button";const g=p},9026:(e,t,a)=>{"use strict";a.d(t,{Z:()=>n});a(2404);const n=({format:e="horizontal",icon:t,imageUrl:a})=>React.createElement("div",{className:"jp-components__decorative-card "+(e?"jp-components__decorative-card--"+e:"")},React.createElement("div",{className:"jp-components__decorative-card__image",style:{backgroundImage:a?`url( ${a} )`:""}}),React.createElement("div",{className:"jp-components__decorative-card__content"},React.createElement("div",{className:"jp-components__decorative-card__lines"})),t?React.createElement("div",{className:"jp-components__decorative-card__icon-container"},React.createElement("span",{className:"jp-components__decorative-card__icon jp-components__decorative-card__icon--"+t})):null)},7172:(e,t,a)=>{"use strict";a.d(t,{Z:()=>l});var n=a(5736),c=a(5235),r=a.n(c),s=a(9196);a(5785);const __=n.__;class i extends s.Component{static defaultProps={"aria-hidden":"false",focusable:"true"};needsOffset(e,t){return["gridicons-arrow-left","gridicons-arrow-right","gridicons-calendar","gridicons-cart","gridicons-folder","gridicons-info","gridicons-info-outline","gridicons-posts","gridicons-star-outline","gridicons-star"].indexOf(e)>=0&&t%18==0}getSVGDescription(e){if("description"in this.props)return this.props.description;switch(e){default:return"";case"gridicons-audio":return __("Has audio.","jetpack-my-jetpack");case"gridicons-arrow-left":return __("Arrow left","jetpack-my-jetpack");case"gridicons-arrow-right":return __("Arrow right","jetpack-my-jetpack");case"gridicons-calendar":return __("Is an event.","jetpack-my-jetpack");case"gridicons-cart":return __("Is a product.","jetpack-my-jetpack");case"chevron-down":return __("Show filters","jetpack-my-jetpack");case"gridicons-comment":return __("Matching comment.","jetpack-my-jetpack");case"gridicons-cross":return __("Close.","jetpack-my-jetpack");case"gridicons-filter":return __("Toggle search filters.","jetpack-my-jetpack");case"gridicons-folder":return __("Category","jetpack-my-jetpack");case"gridicons-info":case"gridicons-info-outline":return __("Information.","jetpack-my-jetpack");case"gridicons-image-multiple":return __("Has multiple images.","jetpack-my-jetpack");case"gridicons-image":return __("Has an image.","jetpack-my-jetpack");case"gridicons-page":return __("Page","jetpack-my-jetpack");case"gridicons-post":return __("Post","jetpack-my-jetpack");case"gridicons-jetpack-search":case"gridicons-search":return __("Magnifying Glass","jetpack-my-jetpack");case"gridicons-tag":return __("Tag","jetpack-my-jetpack");case"gridicons-video":return __("Has a video.","jetpack-my-jetpack")}}renderIcon(e){switch(e){default:return null;case"gridicons-audio":return React.createElement("g",null,React.createElement("path",{d:"M8 4v10.184C7.686 14.072 7.353 14 7 14c-1.657 0-3 1.343-3 3s1.343 3 3 3 3-1.343 3-3V7h7v4.184c-.314-.112-.647-.184-1-.184-1.657 0-3 1.343-3 3s1.343 3 3 3 3-1.343 3-3V4H8z"}));case"gridicons-arrow-left":return React.createElement("g",null,React.createElement("path",{d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"}));case"gridicons-arrow-right":return React.createElement("g",null,React.createElement("path",{d:"M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8-8-8z"}));case"gridicons-block":return React.createElement("g",null,React.createElement("path",{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zM4 12c0-4.418 3.582-8 8-8 1.848 0 3.545.633 4.9 1.686L5.686 16.9C4.633 15.545 4 13.848 4 12zm8 8c-1.848 0-3.546-.633-4.9-1.686L18.314 7.1C19.367 8.455 20 10.152 20 12c0 4.418-3.582 8-8 8z"}));case"gridicons-calendar":return React.createElement("g",null,React.createElement("path",{d:"M19 4h-1V2h-2v2H8V2H6v2H5c-1.105 0-2 .896-2 2v13c0 1.104.895 2 2 2h14c1.104 0 2-.896 2-2V6c0-1.104-.896-2-2-2zm0 15H5V8h14v11z"}));case"gridicons-cart":return React.createElement("g",null,React.createElement("path",{d:"M9 20c0 1.1-.9 2-2 2s-1.99-.9-1.99-2S5.9 18 7 18s2 .9 2 2zm8-2c-1.1 0-1.99.9-1.99 2s.89 2 1.99 2 2-.9 2-2-.9-2-2-2zm.396-5c.937 0 1.75-.65 1.952-1.566L21 5H7V4c0-1.105-.895-2-2-2H3v2h2v11c0 1.105.895 2 2 2h12c0-1.105-.895-2-2-2H7v-2h10.396z"}));case"gridicons-checkmark":return React.createElement("g",null,React.createElement("path",{d:"M11 17.768l-4.884-4.884 1.768-1.768L11 14.232l8.658-8.658C17.823 3.39 15.075 2 12 2 6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10c0-1.528-.353-2.97-.966-4.266L11 17.768z"}));case"gridicons-chevron-left":return React.createElement("g",null,React.createElement("path",{d:"M16.443 7.41L15.0399 6L9.06934 12L15.0399 18L16.443 16.59L11.8855 12L16.443 7.41Z"}));case"gridicons-chevron-right":return React.createElement("g",null,React.createElement("path",{d:"M10.2366 6L8.8335 7.41L13.391 12L8.8335 16.59L10.2366 18L16.2072 12L10.2366 6Z"}));case"gridicons-chevron-down":return React.createElement("g",null,React.createElement("path",{d:"M20 9l-8 8-8-8 1.414-1.414L12 14.172l6.586-6.586"}));case"gridicons-comment":return React.createElement("g",null,React.createElement("path",{d:"M3 6v9c0 1.105.895 2 2 2h9v5l5.325-3.804c1.05-.75 1.675-1.963 1.675-3.254V6c0-1.105-.895-2-2-2H5c-1.105 0-2 .895-2 2z"}));case"gridicons-computer":return React.createElement("g",null,React.createElement("path",{d:"M20 2H4c-1.104 0-2 .896-2 2v12c0 1.104.896 2 2 2h6v2H7v2h10v-2h-3v-2h6c1.104 0 2-.896 2-2V4c0-1.104-.896-2-2-2zm0 14H4V4h16v12z"}));case"gridicons-cross":return React.createElement("g",null,React.createElement("path",{d:"M18.36 19.78L12 13.41l-6.36 6.37-1.42-1.42L10.59 12 4.22 5.64l1.42-1.42L12 10.59l6.36-6.36 1.41 1.41L13.41 12l6.36 6.36z"}));case"gridicons-filter":return React.createElement("g",null,React.createElement("path",{d:"M10 19h4v-2h-4v2zm-4-6h12v-2H6v2zM3 5v2h18V5H3z"}));case"gridicons-folder":return React.createElement("g",null,React.createElement("path",{d:"M18 19H6c-1.1 0-2-.9-2-2V7c0-1.1.9-2 2-2h3c1.1 0 2 .9 2 2h7c1.1 0 2 .9 2 2v8c0 1.1-.9 2-2 2z"}));case"gridicons-image":return React.createElement("g",null,React.createElement("path",{d:"M13 9.5c0-.828.672-1.5 1.5-1.5s1.5.672 1.5 1.5-.672 1.5-1.5 1.5-1.5-.672-1.5-1.5zM22 6v12c0 1.105-.895 2-2 2H4c-1.105 0-2-.895-2-2V6c0-1.105.895-2 2-2h16c1.105 0 2 .895 2 2zm-2 0H4v7.444L8 9l5.895 6.55 1.587-1.85c.798-.932 2.24-.932 3.037 0L20 15.426V6z"}));case"gridicons-image-multiple":return React.createElement("g",null,React.createElement("path",{d:"M15 7.5c0-.828.672-1.5 1.5-1.5s1.5.672 1.5 1.5S17.328 9 16.5 9 15 8.328 15 7.5zM4 20h14c0 1.105-.895 2-2 2H4c-1.1 0-2-.9-2-2V8c0-1.105.895-2 2-2v14zM22 4v12c0 1.105-.895 2-2 2H8c-1.105 0-2-.895-2-2V4c0-1.105.895-2 2-2h12c1.105 0 2 .895 2 2zM8 4v6.333L11 7l4.855 5.395.656-.73c.796-.886 2.183-.886 2.977 0l.513.57V4H8z"}));case"gridicons-info":return React.createElement("g",null,React.createElement("path",{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"}));case"gridicons-info-outline":return React.createElement("g",null,React.createElement("path",{d:"M13 9h-2V7h2v2zm0 2h-2v6h2v-6zm-1-7c-4.411 0-8 3.589-8 8s3.589 8 8 8 8-3.589 8-8-3.589-8-8-8m0-2c5.523 0 10 4.477 10 10s-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2z"}));case"gridicons-jetpack-search":return React.createElement("g",null,React.createElement("path",{d:"M0 9.257C0 4.15 4.151 0 9.257 0c5.105 0 9.256 4.151 9.256 9.257a9.218 9.218 0 01-2.251 6.045l.034.033h1.053L24 22.01l-1.986 1.989-6.664-6.662v-1.055l-.033-.033a9.218 9.218 0 01-6.06 2.264C4.15 18.513 0 14.362 0 9.257zm4.169 1.537h4.61V1.82l-4.61 8.973zm5.547-3.092v8.974l4.61-8.974h-4.61z"}));case"gridicons-phone":return React.createElement("g",null,React.createElement("path",{d:"M16 2H8c-1.104 0-2 .896-2 2v16c0 1.104.896 2 2 2h8c1.104 0 2-.896 2-2V4c0-1.104-.896-2-2-2zm-3 19h-2v-1h2v1zm3-2H8V5h8v14z"}));case"gridicons-pages":return React.createElement("g",null,React.createElement("path",{d:"M16 8H8V6h8v2zm0 2H8v2h8v-2zm4-6v12l-6 6H6c-1.105 0-2-.895-2-2V4c0-1.105.895-2 2-2h12c1.105 0 2 .895 2 2zm-2 10V4H6v16h6v-4c0-1.105.895-2 2-2h4z"}));case"gridicons-posts":return React.createElement("g",null,React.createElement("path",{d:"M16 19H3v-2h13v2zm5-10H3v2h18V9zM3 5v2h11V5H3zm14 0v2h4V5h-4zm-6 8v2h10v-2H11zm-8 0v2h5v-2H3z"}));case"gridicons-search":return React.createElement("g",null,React.createElement("path",{d:"M21 19l-5.154-5.154C16.574 12.742 17 11.42 17 10c0-3.866-3.134-7-7-7s-7 3.134-7 7 3.134 7 7 7c1.42 0 2.742-.426 3.846-1.154L19 21l2-2zM5 10c0-2.757 2.243-5 5-5s5 2.243 5 5-2.243 5-5 5-5-2.243-5-5z"}));case"gridicons-star-outline":return React.createElement("g",null,React.createElement("path",{d:"M12 6.308l1.176 3.167.347.936.997.042 3.374.14-2.647 2.09-.784.62.27.963.91 3.25-2.813-1.872-.83-.553-.83.552-2.814 1.87.91-3.248.27-.962-.783-.62-2.648-2.092 3.374-.14.996-.04.347-.936L12 6.308M12 2L9.418 8.953 2 9.257l5.822 4.602L5.82 21 12 16.89 18.18 21l-2.002-7.14L22 9.256l-7.418-.305L12 2z"}));case"gridicons-star":return React.createElement("g",null,React.createElement("path",{d:"M12 2l2.582 6.953L22 9.257l-5.822 4.602L18.18 21 12 16.89 5.82 21l2.002-7.14L2 9.256l7.418-.304"}));case"gridicons-tag":return React.createElement("g",null,React.createElement("path",{d:"M20 2.007h-7.087c-.53 0-1.04.21-1.414.586L2.592 11.5c-.78.78-.78 2.046 0 2.827l7.086 7.086c.78.78 2.046.78 2.827 0l8.906-8.906c.376-.374.587-.883.587-1.413V4.007c0-1.105-.895-2-2-2zM17.007 9c-1.105 0-2-.895-2-2s.895-2 2-2 2 .895 2 2-.895 2-2 2z"}));case"gridicons-video":return React.createElement("g",null,React.createElement("path",{d:"M20 4v2h-2V4H6v2H4V4c-1.105 0-2 .895-2 2v12c0 1.105.895 2 2 2v-2h2v2h12v-2h2v2c1.105 0 2-.895 2-2V6c0-1.105-.895-2-2-2zM6 16H4v-3h2v3zm0-5H4V8h2v3zm4 4V9l4.5 3-4.5 3zm10 1h-2v-3h2v3zm0-5h-2V8h2v3z"}));case"gridicons-lock":return React.createElement(React.Fragment,null,React.createElement("g",{id:"lock"},React.createElement("path",{d:"M18,8h-1V7c0-2.757-2.243-5-5-5S7,4.243,7,7v1H6c-1.105,0-2,0.895-2,2v10c0,1.105,0.895,2,2,2h12c1.105,0,2-0.895,2-2V10 C20,8.895,19.105,8,18,8z M9,7c0-1.654,1.346-3,3-3s3,1.346,3,3v1H9V7z M13,15.723V18h-2v-2.277c-0.595-0.346-1-0.984-1-1.723 c0-1.105,0.895-2,2-2s2,0.895,2,2C14,14.738,13.595,15.376,13,15.723z"})),React.createElement("g",{id:"Layer_1"}));case"gridicons-external":return React.createElement("g",null,React.createElement("path",{d:"M19 13v6c0 1.105-.895 2-2 2H5c-1.105 0-2-.895-2-2V7c0-1.105.895-2 2-2h6v2H5v12h12v-6h2zM13 3v2h4.586l-7.793 7.793 1.414 1.414L19 6.414V11h2V3h-8z"}))}}render(){const{size:e=24,className:t=""}=this.props,a=this.props.height||e,n=this.props.width||e,c=this.props.style||{height:a,width:n},s="gridicons-"+this.props.icon,i=r()("gridicon",s,t,{"needs-offset":this.needsOffset(s,e)}),l=this.getSVGDescription(s);return React.createElement("svg",{className:i,focusable:this.props.focusable,height:a,onClick:this.props.onClick,style:c,viewBox:"0 0 24 24",width:n,xmlns:"http://www.w3.org/2000/svg","aria-hidden":this.props["aria-hidden"]},l?React.createElement("desc",null,l):null,this.renderIcon(s))}}const l=i},9665:(e,t,a)=>{"use strict";a.d(t,{Z:()=>d});var n=a(5609),c=a(5235),r=a.n(c),s=a(9196),i=a.n(s),l=a(526),o=a(7172);a(1275);const u=e=>({"top-end":"top left",top:"top center","top-start":"top right","bottom-end":"bottom left",bottom:"bottom center","bottom-start":"bottom right"}[e]),d=({className:e="",iconClassName:t="",placement:a="bottom-end",animate:c=!0,iconCode:d="info-outline",iconSize:m=18,offset:h=10,title:p,children:g,popoverAnchorStyle:v="icon",forceShow:f=!1,wide:w=!1,inline:k=!0,shift:E=!1})=>{const[y,b]=(0,s.useState)(!1),C=(0,s.useCallback)((()=>b(!1)),[b]),j=(0,s.useCallback)((e=>{e.preventDefault(),b(!y)}),[y,b]),_={position:u(a),placement:a,animate:c,noArrow:!1,resize:!1,flip:!1,offset:h,focusOnMount:"container",onClose:C,className:"icon-tooltip-container",inline:k,shift:E},z="wrapper"===v,N=r()("icon-tooltip-wrapper",e),x={left:z?0:-(62-m/2)+"px"},Z=z&&f;return i().createElement("div",{className:N,"data-testid":"icon-tooltip_wrapper"},!z&&i().createElement(l.Z,{variant:"link",onMouseDown:j},i().createElement(o.Z,{className:t,icon:d,size:m})),i().createElement("div",{className:r()("icon-tooltip-helper",{"is-wide":w}),style:x},(Z||y)&&i().createElement(n.Popover,_,i().createElement("div",null,p&&i().createElement("div",{className:"icon-tooltip-title"},p),i().createElement("div",{className:"icon-tooltip-content"},g)))))}},3396:(e,t,a)=>{"use strict";a.d(t,{KM:()=>d,VS:()=>p,_1:()=>m,r7:()=>u});var n=a(2674),c=a.n(n),r=a(5609),s=a(5235),i=a.n(s),l=(a(2659),a(5612));const o=({className:e,size:t=24,viewBox:a="0 0 24 24",opacity:n=1,color:s="#2C3338",children:o})=>{const u={className:i()(l.Z.iconWrapper,e),width:t,height:t,viewBox:a,opacity:n,fill:void 0};return s&&(u.fill=s),React.createElement(r.SVG,c()({},u,{fillRule:"evenodd",clipRule:"evenodd",xmlns:"http://www.w3.org/2000/svg"}),React.createElement(r.G,{opacity:n},o))},u=({size:e,className:t=l.Z["star-icon"],color:a})=>React.createElement(o,{className:t,size:e,color:a},React.createElement(r.Path,{d:"M12 2l2.582 6.953L22 9.257l-5.822 4.602L18.18 21 12 16.89 5.82 21l2.002-7.14L2 9.256l7.418-.304"})),d=({size:e,className:t=l.Z["checkmark-icon"],color:a})=>React.createElement(o,{className:t,size:e,color:a},React.createElement(r.Path,{d:"M11 17.768l-4.884-4.884 1.768-1.768L11 14.232l8.658-8.658C17.823 3.39 15.075 2 12 2 6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10c0-1.528-.353-2.97-.966-4.266L11 17.768z"})),m=({size:e,className:t=l.Z.jetpack,color:a})=>React.createElement(o,{className:t,size:e,color:a,viewBox:"0 0 32 32"},React.createElement(r.Path,{className:"jetpack-logo__icon-circle",d:"M16,0C7.2,0,0,7.2,0,16s7.2,16,16,16s16-7.2,16-16S24.8,0,16,0z"}),React.createElement(r.Polygon,{fill:"#fff",points:"15,19 7,19 15,3"}),React.createElement(r.Polygon,{fill:"#fff",points:"17,29 17,13 25,13"})),h={...{"anti-spam":({opacity:e=1,size:t,color:a})=>React.createElement(o,{size:t,opacity:e,color:a},React.createElement(r.Path,{d:"M13.2,4.7l4.7,12.8c0.4,1.1,1,1.5,2.1,1.6c0.1,0,0.1,0,0.1,0l0.1,0.1l0.1,0.1c0,0.1,0,0.1,0,0.2c0,0.1,0,0.1,0,0.1 s0,0.1-0.1,0.1c-0.1,0-0.1,0.1-0.1,0.1s-0.1,0-0.2,0h-5.1c-0.1,0-0.1,0-0.2,0c-0.1,0-0.1-0.1-0.1-0.1l-0.1-0.1c0-0.1,0-0.1,0-0.1 c0-0.1,0-0.1,0-0.2s0-0.1,0.1-0.1l0.1-0.1c0,0,0.1,0,0.2,0c0.5,0,1.1-0.2,1.1-0.8c0-0.3-0.1-0.5-0.2-0.8l-1.1-3.1 c-0.1-0.2-0.1-0.2-0.2-0.2h-4.3c-0.7,0-1.5,0-1.9,0.9l-1.1,2.4C7.1,17.6,7,17.8,7,18.1c0,0.8,1,0.9,1.6,0.9c0.1,0,0.1,0,0.2,0 L8.8,19l0.1,0.1c0,0.1,0,0.1,0,0.2c0,0.1,0,0.1,0,0.1s-0.1,0.1-0.1,0.1l-0.1,0.1c-0.1,0-0.1,0-0.2,0H4.1c-0.1,0-0.1,0-0.1,0 c-0.1,0-0.1-0.1-0.1-0.1l-0.1-0.1c0-0.1,0-0.1,0-0.1c0-0.1,0-0.1,0-0.2s0-0.1,0.1-0.1L4,19c0,0,0.1,0,0.1,0C5.2,19,5.5,18.5,6,17.5 l5.4-12.4c0.2-0.5,0.8-1,1.3-1C13,4.2,13.1,4.4,13.2,4.7z M9.1,13.1c0,0.1-0.1,0.1-0.1,0.2c0,0.1,0.1,0.1,0.1,0.1h4.4 c0.3,0,0.4-0.1,0.4-0.3c0-0.1,0-0.2-0.1-0.3l-1.2-3.5c-0.3-0.8-0.8-1.9-0.8-2.7c0-0.1,0-0.1-0.1-0.1c0,0-0.1,0-0.1,0.1 c-0.1,0.6-0.4,1.2-0.7,1.7L9.1,13.1z"}),React.createElement(r.Path,{d:"M13.2,4.7l4.7,12.8c0.4,1.1,1,1.5,2.1,1.6c0.1,0,0.1,0,0.1,0l0.1,0.1l0.1,0.1c0,0.1,0,0.1,0,0.2c0,0.1,0,0.1,0,0.1 s0,0.1-0.1,0.1c-0.1,0-0.1,0.1-0.1,0.1s-0.1,0-0.2,0h-5.1c-0.1,0-0.1,0-0.2,0c-0.1,0-0.1-0.1-0.1-0.1l-0.1-0.1c0-0.1,0-0.1,0-0.1 c0-0.1,0-0.1,0-0.2s0-0.1,0.1-0.1l0.1-0.1c0,0,0.1,0,0.2,0c0.5,0,1.1-0.2,1.1-0.8c0-0.3-0.1-0.5-0.2-0.8l-1.1-3.1 c-0.1-0.2-0.1-0.2-0.2-0.2h-4.3c-0.7,0-1.5,0-1.9,0.9l-1.1,2.4C7.1,17.6,7,17.8,7,18.1c0,0.8,1,0.9,1.6,0.9c0.1,0,0.1,0,0.2,0 L8.8,19l0.1,0.1c0,0.1,0,0.1,0,0.2c0,0.1,0,0.1,0,0.1s-0.1,0.1-0.1,0.1l-0.1,0.1c-0.1,0-0.1,0-0.2,0H4.1c-0.1,0-0.1,0-0.1,0 c-0.1,0-0.1-0.1-0.1-0.1l-0.1-0.1c0-0.1,0-0.1,0-0.1c0-0.1,0-0.1,0-0.2s0-0.1,0.1-0.1L4,19c0,0,0.1,0,0.1,0C5.2,19,5.5,18.5,6,17.5 l5.4-12.4c0.2-0.5,0.8-1,1.3-1C13,4.2,13.1,4.4,13.2,4.7z M9.1,13.1c0,0.1-0.1,0.1-0.1,0.2c0,0.1,0.1,0.1,0.1,0.1h4.4 c0.3,0,0.4-0.1,0.4-0.3c0-0.1,0-0.2-0.1-0.3l-1.2-3.5c-0.3-0.8-0.8-1.9-0.8-2.7c0-0.1,0-0.1-0.1-0.1c0,0-0.1,0-0.1,0.1 c-0.1,0.6-0.4,1.2-0.7,1.7L9.1,13.1z"}),React.createElement(r.Path,{d:"M21.6,12.5c0,0.6-0.3,1-0.9,1c-0.6,0-0.8-0.3-0.8-0.8c0-0.6,0.4-1,0.9-1C21.3,11.7,21.6,12.1,21.6,12.5z"}),React.createElement(r.Path,{d:"M4.1,12.5c0,0.6-0.3,1-0.9,1s-0.8-0.3-0.8-0.8c0-0.6,0.4-1,0.9-1S4.1,12.1,4.1,12.5z"})),backup:({opacity:e=1,size:t,color:a})=>React.createElement(o,{size:t,opacity:e,color:a},React.createElement(r.Path,{d:"M2.1,5.8c0-0.1,0-0.1,0-0.2c0-0.2,0.1-0.5,0.1-0.7c0.1-0.4,0.4-0.6,0.7-0.8l8.3-2.9c0.1-0.1,0.3-0.1,0.4-0.1l0.5,0.1 l8.3,2.9c0.3,0.2,0.5,0.4,0.7,0.7c0.2,0.2,0.2,0.4,0.2,0.7c0,0.1,0,0.1,0,0.2v0.1c-0.1,0.5-0.2,0.9-0.3,1.4 c-0.2,0.4-0.3,1.2-0.7,2.2c-0.3,1-0.7,2.1-1.1,3.1c-0.5,1-1,2.1-1.6,3.3s-1.4,2.3-2.2,3.5c-0.9,1.1-1.8,2.2-2.8,3.1 c-0.2,0.2-0.5,0.4-0.9,0.4c-0.3,0-0.6-0.1-0.9-0.4c-1.2-1.1-2.4-2.4-3.5-4c-1-1.6-1.9-3-2.5-4.3c-0.6-1.3-1.1-2.7-1.6-4 C2.8,8.7,2.5,7.6,2.3,7C2.3,6.5,2.1,6.1,2.1,5.8z M2.9,5.9c0,0.2,0.1,0.4,0.1,0.8C3.1,7,3.2,7.5,3.5,8.2C3.7,9,3.9,9.7,4.2,10.6 c0.3,0.7,0.7,1.7,1.1,2.7c0.4,1,1,2,1.5,2.9c0.5,1,1.2,1.9,1.9,2.9c0.8,1,1.6,1.9,2.4,2.6c0.2,0.2,0.4,0.2,0.5,0.2 c0.2,0,0.4-0.1,0.5-0.2c1.2-1,2.2-2.3,3.2-3.8c1-1.5,1.8-2.8,2.3-4c0.6-1.3,1.1-2.5,1.5-3.9c0.4-1.3,0.7-2.2,0.9-2.8 c0.1-0.5,0.2-1,0.3-1.3c0-0.1,0-0.1,0-0.1c0-0.2,0-0.3-0.1-0.4C20.3,5.2,20.2,5.1,20,5L12,2.1c0,0-0.1,0-0.2,0s-0.1,0-0.1,0h-0.2 l-8,2.8C3.2,5,3.1,5.2,3,5.3C2.9,5.5,2.9,5.6,2.9,5.8C2.9,5.8,2.9,5.8,2.9,5.9z M5.9,6.7h3l2.8,7l2.8-7h3c-0.1,0.1-0.2,0.5-0.3,0.8 C17,7.8,17,8.2,16.8,8.4c-0.1,0.3-0.2,0.5-0.4,0.8c0,0.1-0.1,0.1-0.1,0.1s-0.1,0.1-0.2,0.1c-0.1,0-0.1,0-0.1,0 c-0.1,0-0.2,0.1-0.2,0.2c0,0-0.1,0.1-0.1,0.1s-0.1,0.1-0.1,0.1c0,0,0,0.1-0.1,0.2c0,0.1-0.1,0.1-0.1,0.1l-0.4,1.1 c-1.3,3.3-2.1,5.2-2.3,5.8h-2.2l-1-2.4c-0.1-0.3-0.3-0.8-0.5-1.3c-0.1-0.3-0.3-0.8-0.5-1.3L8,10.8c-0.1-0.1-0.1-0.2-0.1-0.4 C7.8,10.2,7.7,10,7.7,9.8C7.6,9.7,7.5,9.5,7.4,9.4C7.3,9.3,7.3,9.3,7.3,9.3c-0.1,0-0.2,0-0.2,0s-0.1,0-0.1,0 C6.6,8.5,6.3,7.6,5.9,6.7z"})),boost:({opacity:e=1,size:t,color:a})=>React.createElement(o,{size:t,opacity:e,color:a},React.createElement(r.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M4.19505 16.2545C4.47368 16.561 4.94802 16.5836 5.25451 16.3049L10.2595 11.7549L14.2842 15.2765L19 10.5607V13.75H20.5V9.5V8.75239V8.7476V8H19.7529H19.7471H19H14.75V9.5H17.9393L14.2158 13.2235L10.2405 9.74507L4.2455 15.195C3.93901 15.4737 3.91642 15.948 4.19505 16.2545Z"})),crm:({opacity:e=1,size:t,color:a})=>React.createElement(o,{size:t,opacity:e,color:a},React.createElement(r.Path,{d:"M15.5 9.5a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm0 1.5a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5Zm-2.25 6v-2a2.75 2.75 0 0 0-2.75-2.75h-4A2.75 2.75 0 0 0 3.75 15v2h1.5v-2c0-.69.56-1.25 1.25-1.25h4c.69 0 1.25.56 1.25 1.25v2h1.5Zm7-2v2h-1.5v-2c0-.69-.56-1.25-1.25-1.25H15v-1.5h2.5A2.75 2.75 0 0 1 20.25 15ZM9.5 8.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0Zm1.5 0a2.5 2.5 0 1 1-5 0 2.5 2.5 0 0 1 5 0Z"})),extras:({opacity:e=1,size:t,color:a})=>React.createElement(o,{size:t,opacity:e,color:a},React.createElement(r.Path,{d:"M18.5 5.5V8H20V5.5h2.5V4H20V1.5h-1.5V4H16v1.5h2.5ZM12 4H6a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-6h-1.5v6a.5.5 0 0 1-.5.5H6a.5.5 0 0 1-.5-.5V6a.5.5 0 0 1 .5-.5h6V4Z"})),protect:({opacity:e=1,size:t,className:a,color:n})=>React.createElement(o,{className:a,size:t,opacity:e,color:n},React.createElement(r.Path,{d:"M12 3.17627L18.75 6.24445V10.8183C18.75 14.7173 16.2458 18.4089 12.7147 19.5735C12.2507 19.7265 11.7493 19.7265 11.2853 19.5735C7.75416 18.4089 5.25 14.7173 5.25 10.8183V6.24445L12 3.17627ZM6.75 7.21032V10.8183C6.75 14.1312 8.89514 17.2057 11.7551 18.149C11.914 18.2014 12.086 18.2014 12.2449 18.149C15.1049 17.2057 17.25 14.1312 17.25 10.8183V7.21032L12 4.82396L6.75 7.21032Z"}),React.createElement(r.Path,{d:"M15.5291 10.0315L11.1818 14.358L8.47095 11.66L9.52907 10.5968L11.1818 12.2417L14.4709 8.96826L15.5291 10.0315Z"})),scan:({opacity:e=1,size:t,color:a})=>React.createElement(o,{size:t,opacity:e,color:a},React.createElement(r.Path,{d:"m12 3.176 6.75 3.068v4.574c0 3.9-2.504 7.59-6.035 8.755a2.283 2.283 0 0 1-1.43 0c-3.53-1.164-6.035-4.856-6.035-8.755V6.244L12 3.176ZM6.75 7.21v3.608c0 3.313 2.145 6.388 5.005 7.33.159.053.331.053.49 0 2.86-.942 5.005-4.017 5.005-7.33V7.21L12 4.824 6.75 7.21Z"})),search:({opacity:e=1,size:t,color:a})=>React.createElement(o,{size:t,opacity:e,color:a},React.createElement(r.Path,{d:"M17.5 11.5a4 4 0 1 1-8 0 4 4 0 0 1 8 0Zm1.5 0a5.5 5.5 0 0 1-9.142 4.121l-3.364 2.943-.988-1.128 3.373-2.952A5.5 5.5 0 1 1 19 11.5Z"})),social:({opacity:e=1,size:t,color:a})=>React.createElement(o,{size:t,opacity:e,color:a},React.createElement(r.Path,{d:"M15.5 3.97809V18.0219L7.5 15.5977V20H6V15.1431L3.27498 14.3173C2.22086 13.9979 1.5 13.0262 1.5 11.9248V10.0752C1.5 8.97375 2.22087 8.00207 3.27498 7.68264L15.5 3.97809ZM14 16L7.5 14.0303L7.5 7.96969L14 5.99999V16ZM6 8.42423L6 13.5757L3.70999 12.8818C3.28835 12.754 3 12.3654 3 11.9248V10.0752C3 9.63462 3.28835 9.24595 3.70999 9.11818L6 8.42423ZM17.5 11.75H21.5V10.25H17.5V11.75ZM21.5 16L17.5 15V13.5L21.5 14.5V16ZM17.5 8.5L21.5 7.5V6L17.5 7V8.5Z"})),star:u,videopress:({opacity:e=1,size:t,color:a})=>React.createElement(o,{size:t,opacity:e,color:a},React.createElement(r.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M4.3,6.2c0.8,0,1.6,0.6,1.8,1.4l2.3,7.9c0,0,0,0,0,0l2.7-9.3h1.5h4.2c2.9,0,4.9,1.9,4.9,4.7c0,2.9-2,4.7-5,4.7 h-2h-2.5l-0.5,1.5c-0.4,1.4-1.7,2.3-3.2,2.3c-1.4,0-2.7-0.9-3.2-2.3L2.5,8.7C2.1,7.4,3,6.2,4.3,6.2z M13,12.8h2.9c1.3,0,2-0.7,2-1.9 c0-1.2-0.8-1.8-2-1.8h-1.7L13,12.8z"})),jetpack:m,share:({size:e=16,className:t,color:a})=>React.createElement(o,{className:t,size:e,color:a,viewBox:"0 0 16 16"},React.createElement(r.Path,{fill:"#161722",fillRule:"evenodd",d:"M8.3 4.66C3.85 5.308.727 9.75.034 13.69l-.02.117c-.137.842.809 1.232 1.446.68 2.013-1.745 3.648-2.475 5.318-2.719a10.482 10.482 0 011.524-.103v2.792c0 .694.82 1.041 1.3.55l6.176-6.307a.79.79 0 00.012-1.088L9.614 1.004C9.14.496 8.301.84 8.301 1.542v3.117zm1.525-1.175v1.85a.773.773 0 01-.654.77l-.655.096c-2.133.311-3.987 1.732-5.295 3.672-.472.7-.854 1.44-1.143 2.18a12.32 12.32 0 011.675-.972c1.58-.75 3.048-.972 4.548-.972h.762a.77.77 0 01.762.779v1.69l4.347-4.44-4.347-4.653z",clipRule:"evenodd"})),ai:({size:e=24,color:t="#069e08"})=>React.createElement(o,{color:t,size:e,viewBox:"0 0 32 32"},React.createElement(r.Path,{className:"spark-first",d:"M9.33301 5.33325L10.4644 8.20188L13.333 9.33325L10.4644 10.4646L9.33301 13.3333L8.20164 10.4646L5.33301 9.33325L8.20164 8.20188L9.33301 5.33325Z"}),React.createElement(r.Path,{className:"spark-second",d:"M21.3333 5.33333L22.8418 9.15817L26.6667 10.6667L22.8418 12.1752L21.3333 16L19.8248 12.1752L16 10.6667L19.8248 9.15817L21.3333 5.33333Z"}),React.createElement(r.Path,{className:"spark-third",d:"M14.6667 13.3333L16.5523 18.1144L21.3333 20L16.5523 21.8856L14.6667 26.6667L12.781 21.8856L8 20L12.781 18.1144L14.6667 13.3333Z"}))}};function p(e){return h[e]?h[e]:null}},8237:(e,t,a)=>{"use strict";a.d(t,{Z:()=>y});var n=a(2674),c=a.n(n),r=a(9818),s=a(5736),i=a(1074),l=a(5381),o=a(5235),u=a.n(o),d=a(9196),m=a.n(d),h=a(6895),p=a(428),g=a(2497),v=a(7525),f=(a(9054),a(8868)),w=a(2054);const __=s.__,_x=s._x,k=()=>m().createElement(f.Z,{logoColor:"#000",showText:!1,height:16,"aria-hidden":"true"}),E=()=>m().createElement(m().Fragment,null,m().createElement(i.Z,{icon:l.Z,size:16}),m().createElement("span",{className:"jp-dashboard-footer__accessible-external-link"},/* translators: accessibility text */ -__("(opens in a new tab)","jetpack-my-jetpack"))),y=({moduleName:e=__("Jetpack","jetpack-my-jetpack"),className:t,moduleNameHref:a="https://jetpack.com",menu:n,onAboutClick:s,onPrivacyClick:i,onTermsClick:l,...o})=>{const[d]=(0,w.Z)("sm","<="),[f]=(0,w.Z)("md","<="),[y]=(0,w.Z)("lg",">"),{isActive:b,connectedPlugins:C}=(0,r.useSelect)((e=>{const t=e(p.t);return{connectedPlugins:t?.getConnectedPlugins(),...t.getConnectionStatus()}}),[p.t]),j=(0,g.Z)(),_=j&&b&&C?.some((({slug:e})=>"jetpack"===e));let z=[{label:_x("About","Link to learn more about Jetpack.","jetpack-my-jetpack"),title:__("About Jetpack","jetpack-my-jetpack"),href:_?new URL("admin.php?page=jetpack_about",j).href:(0,h.Z)("jetpack-about"),target:_?"_self":"_blank",onClick:s},{label:_x("Privacy","Shorthand for Privacy Policy.","jetpack-my-jetpack"),title:__("Automattic's Privacy Policy","jetpack-my-jetpack"),href:_?new URL("admin.php?page=jetpack#/privacy",j).href:(0,h.Z)("a8c-privacy"),target:_?"_self":"_blank",onClick:i},{label:_x("Terms","Shorthand for Terms of Service.","jetpack-my-jetpack"),title:__("WordPress.com Terms of Service","jetpack-my-jetpack"),href:(0,h.Z)("wpcom-tos"),target:"_blank",onClick:l}];n&&(z=[...z,...n]);const N=m().createElement(m().Fragment,null,m().createElement(k,null),e);return m().createElement("footer",c()({className:u()("jp-dashboard-footer",{"is-sm":d,"is-md":f,"is-lg":y},t),"aria-label":__("Jetpack","jetpack-my-jetpack")},o),m().createElement("ul",null,m().createElement("li",{className:"jp-dashboard-footer__jp-item"},a?m().createElement("a",{href:a},N):N),z.map((e=>{const t="button"===e.role,a=!t&&"_blank"===e.target;return m().createElement("li",{key:e.label},m().createElement("a",{href:e.href,title:e.title,target:e.target,onClick:e.onClick,onKeyDown:e.onKeyDown,className:u()("jp-dashboard-footer__menu-item",{"is-external":a}),role:e.role,rel:a?"noopener noreferrer":void 0,tabIndex:t?0:void 0},e.label,a&&m().createElement(E,null)))})),m().createElement("li",{className:"jp-dashboard-footer__a8c-item"},m().createElement("a",{href:_?new URL("admin.php?page=jetpack_about",j).href:(0,h.Z)("a8c-about"),"aria-label":__("An Automattic Airline","jetpack-my-jetpack")},m().createElement(v.Z,{"aria-hidden":"true"})))))}},8868:(e,t,a)=>{"use strict";a.d(t,{Z:()=>u});var n=a(2674),c=a.n(n),r=a(5736),s=a(5235),i=a.n(s),l=a(9196),o=a.n(l);const __=r.__,u=({logoColor:e="#069e08",showText:t=!0,className:a,height:n=32,...r})=>{const s=t?"0 0 118 32":"0 0 32 32";return o().createElement("svg",c()({xmlns:"http://www.w3.org/2000/svg",x:"0px",y:"0px",viewBox:s,className:i()("jetpack-logo",a),"aria-labelledby":"jetpack-logo-title",height:n},r,{role:"img"}),o().createElement("title",{id:"jetpack-logo-title"},__("Jetpack Logo","jetpack-my-jetpack")),o().createElement("path",{fill:e,d:"M16,0C7.2,0,0,7.2,0,16s7.2,16,16,16s16-7.2,16-16S24.8,0,16,0z M15,19H7l8-16V19z M17,29V13h8L17,29z"}),t&&o().createElement(o().Fragment,null,o().createElement("path",{d:"M41.3,26.6c-0.5-0.7-0.9-1.4-1.3-2.1c2.3-1.4,3-2.5,3-4.6V8h-3V6h6v13.4C46,22.8,45,24.8,41.3,26.6z"}),o().createElement("path",{d:"M65,18.4c0,1.1,0.8,1.3,1.4,1.3c0.5,0,2-0.2,2.6-0.4v2.1c-0.9,0.3-2.5,0.5-3.7,0.5c-1.5,0-3.2-0.5-3.2-3.1V12H60v-2h2.1V7.1 H65V10h4v2h-4V18.4z"}),o().createElement("path",{d:"M71,10h3v1.3c1.1-0.8,1.9-1.3,3.3-1.3c2.5,0,4.5,1.8,4.5,5.6s-2.2,6.3-5.8,6.3c-0.9,0-1.3-0.1-2-0.3V28h-3V10z M76.5,12.3 c-0.8,0-1.6,0.4-2.5,1.2v5.9c0.6,0.1,0.9,0.2,1.8,0.2c2,0,3.2-1.3,3.2-3.9C79,13.4,78.1,12.3,76.5,12.3z"}),o().createElement("path",{d:"M93,22h-3v-1.5c-0.9,0.7-1.9,1.5-3.5,1.5c-1.5,0-3.1-1.1-3.1-3.2c0-2.9,2.5-3.4,4.2-3.7l2.4-0.3v-0.3c0-1.5-0.5-2.3-2-2.3 c-0.7,0-2.3,0.5-3.7,1.1L84,11c1.2-0.4,3-1,4.4-1c2.7,0,4.6,1.4,4.6,4.7L93,22z M90,16.4l-2.2,0.4c-0.7,0.1-1.4,0.5-1.4,1.6 c0,0.9,0.5,1.4,1.3,1.4s1.5-0.5,2.3-1V16.4z"}),o().createElement("path",{d:"M104.5,21.3c-1.1,0.4-2.2,0.6-3.5,0.6c-4.2,0-5.9-2.4-5.9-5.9c0-3.7,2.3-6,6.1-6c1.4,0,2.3,0.2,3.2,0.5V13 c-0.8-0.3-2-0.6-3.2-0.6c-1.7,0-3.2,0.9-3.2,3.6c0,2.9,1.5,3.8,3.3,3.8c0.9,0,1.9-0.2,3.2-0.7V21.3z"}),o().createElement("path",{d:"M110,15.2c0.2-0.3,0.2-0.8,3.8-5.2h3.7l-4.6,5.7l5,6.3h-3.7l-4.2-5.8V22h-3V6h3V15.2z"}),o().createElement("path",{d:"M58.5,21.3c-1.5,0.5-2.7,0.6-4.2,0.6c-3.6,0-5.8-1.8-5.8-6c0-3.1,1.9-5.9,5.5-5.9s4.9,2.5,4.9,4.9c0,0.8,0,1.5-0.1,2h-7.3 c0.1,2.5,1.5,2.8,3.6,2.8c1.1,0,2.2-0.3,3.4-0.7C58.5,19,58.5,21.3,58.5,21.3z M56,15c0-1.4-0.5-2.9-2-2.9c-1.4,0-2.3,1.3-2.4,2.9 C51.6,15,56,15,56,15z"})))}},3846:(e,t,a)=>{"use strict";a.d(t,{Z:()=>u});var n=a(5235),c=a.n(n),r=a(9196),s=a(3080);const i=Number(s.Z.smCols),l=Number(s.Z.mdCols),o=Number(s.Z.lgCols),u=e=>{const{children:t,tagName:a="div",className:n}=e,u=Math.min(i,"number"==typeof e.sm?e.sm:i),d=Math.min(i,"object"==typeof e.sm?e.sm.start:0),m=Math.min(i,"object"==typeof e.sm?e.sm.end:0),h=Math.min(l,"number"==typeof e.md?e.md:l),p=Math.min(l,"object"==typeof e.md?e.md.start:0),g=Math.min(l,"object"==typeof e.md?e.md.end:0),v=Math.min(o,"number"==typeof e.lg?e.lg:o),f=Math.min(o,"object"==typeof e.lg?e.lg.start:0),w=Math.min(o,"object"==typeof e.lg?e.lg.end:0),k=c()(n,{[s.Z[`col-sm-${u}`]]:!(d&&m),[s.Z[`col-sm-${d}-start`]]:d>0,[s.Z[`col-sm-${m}-end`]]:m>0,[s.Z[`col-md-${h}`]]:!(p&&g),[s.Z[`col-md-${p}-start`]]:p>0,[s.Z[`col-md-${g}-end`]]:g>0,[s.Z[`col-lg-${v}`]]:!(f&&w),[s.Z[`col-lg-${f}-start`]]:f>0,[s.Z[`col-lg-${w}-end`]]:w>0});return(0,r.createElement)(a,{className:k},t)}},3363:(e,t,a)=>{"use strict";a.d(t,{Z:()=>i});var n=a(5235),c=a.n(n),r=a(9196),s=a(8730);const i=({children:e,fluid:t=!1,tagName:a="div",className:n,horizontalGap:i=1,horizontalSpacing:l=1})=>{const o=(0,r.useMemo)((()=>{const e=`calc( var(--horizontal-spacing) * ${l} )`;return{paddingTop:e,paddingBottom:e,rowGap:`calc( var(--horizontal-spacing) * ${i} )`}}),[i,l]),u=c()(n,s.Z.container,{[s.Z.fluid]:t});return(0,r.createElement)(a,{className:u,style:o},e)}},2054:(e,t,a)=>{"use strict";a.d(t,{Z:()=>s});var n=a(4333),c=a(3247);const r=["sm","md","lg"],s=(e,t)=>{const a=Array.isArray(e)?e:[e],s=Array.isArray(t)?t:[t],[i,l,o]=r,u={sm:(0,n.useMediaQuery)(c.Z[i]),md:(0,n.useMediaQuery)(c.Z[l]),lg:(0,n.useMediaQuery)(c.Z[o])};return a.map(((e,t)=>{const a=s[t];return a?((e,t,a)=>{const n=r.indexOf(e),c=n+1,s=t.includes("=");let i=[];return t.startsWith("<")&&(i=r.slice(0,s?c:n)),t.startsWith(">")&&(i=r.slice(s?n:c)),i?.length?i.some((e=>a[e])):a[e]})(e,a,u):u[e]}))}},2636:(e,t,a)=>{"use strict";a.d(t,{Z:()=>l});var n=a(5235),c=a.n(n),r=a(9196),s=a.n(r),i=a(7946);const l=({children:e=null,width:t=null,height:a=null,className:n=""})=>s().createElement("div",{className:c()(i.Z.placeholder,n),style:{width:t,height:a}},e)},1342:(e,t,a)=>{"use strict";a.d(t,{Z:()=>g});var n=a(797),c=a(496),r=a(9201),s=a(1074),i=a(9517),l=a(5235),o=a.n(l),u=a(9196),d=a.n(u),m=a(7703);const h=e=>{switch(e){case"error":case"warning":default:return n.Z;case"info":return c.Z;case"success":return r.Z}},p=({level:e,title:t,children:a,actions:n,hideCloseButton:c,onClose:r})=>{const l=o()(m.Z.container,m.Z[`is-${e}`]);return d().createElement("div",{className:l},d().createElement("div",{className:m.Z["icon-wrapper"]},d().createElement(s.Z,{icon:h(e),className:m.Z.icon})),d().createElement("div",{className:m.Z["main-content"]},d().createElement("div",{className:m.Z.title},t),a,n&&n.length>0&&d().createElement("div",{className:m.Z["action-bar"]},n.map(((e,t)=>d().createElement("div",{key:t,className:m.Z.action},e))))),!c&&d().createElement("button",{"aria-label":"close",className:m.Z["close-button"],onClick:r},d().createElement(s.Z,{icon:i.Z})))};p.defaultProps={level:"info",hideCloseButton:!1};const g=p},2947:(e,t,a)=>{"use strict";a.d(t,{Z:()=>c});var n=a(8709);const c=(e,t={})=>{const a=(0,n.X)();return new Intl.NumberFormat(a,t).format(e)}},9608:(e,t,a)=>{"use strict";a.d(t,{NE:()=>y,ZP:()=>C,kF:()=>E,oK:()=>b});var n=a(5736),c=a(1074),r=a(9201),s=a(6163),i=a(5235),l=a.n(i),o=a(9196),u=a.n(o),d=a(9665),m=a(2054),h=a(7325),p=a(5106),g=a(9929);const __=n.__,v=__("Included","jetpack-my-jetpack"),f=__("Not included","jetpack-my-jetpack"),w=__("Coming soon","jetpack-my-jetpack"),k=(0,o.createContext)(void 0),E=({isIncluded:e=!1,isComingSoon:t=!1,index:a=0,label:i=null,tooltipInfo:h,tooltipTitle:E,tooltipClassName:y=""})=>{const[b]=(0,m.Z)("lg"),C=(0,o.useContext)(k)[a],j=t||e,_=C.name,z=C.tooltipInfo,N=C.tooltipTitle,x=h||!b&&z,Z=((e,t,a)=>e?{lg:w, -// translators: Name of the current feature -default:(0,n.sprintf)(__("%s coming soon","jetpack-my-jetpack"),a)}:{lg:t?v:f,default:t?a:(0,n.sprintf)(/* translators: Name of the current feature */ -__("%s not included","jetpack-my-jetpack"),a)})(t,e,_),R=b?Z.lg:Z.default;return u().createElement("div",{className:l()(g.Z.item,g.Z.value)},u().createElement(c.Z,{className:l()(g.Z.icon,j?g.Z["icon-check"]:g.Z["icon-cross"]),size:32,icon:j?r.Z:s.Z}),u().createElement(p.ZP,{variant:"body-small"},i||R),x&&u().createElement(d.Z,{title:E||N,iconClassName:g.Z["popover-icon"],className:l()(g.Z.popover,y),placement:"bottom-end",iconSize:14,offset:4,wide:Boolean(E&&h)},u().createElement(p.ZP,{variant:"body-small",component:"div"},h||z)))},y=({children:e})=>u().createElement("div",{className:g.Z.header},e),b=({primary:e=!1,children:t})=>{let a=0;return u().createElement("div",{className:l()(g.Z.card,{[g.Z["is-primary"]]:e})},o.Children.map(t,(e=>{const t=e;return t.type===E?(a++,(0,o.cloneElement)(t,{index:a-1})):t})))},C=({title:e,items:t,children:a,showIntroOfferDisclaimer:n=!1})=>{const[c]=(0,m.Z)("lg");return u().createElement(k.Provider,{value:t},u().createElement("div",{className:l()(g.Z.container,{[g.Z["is-viewport-large"]]:c}),style:{"--rows":t.length+1,"--columns":o.Children.toArray(a).length+1}},u().createElement("div",{className:g.Z.table},u().createElement(p.ZP,{variant:"headline-small"},e),c&&t.map(((e,a)=>u().createElement("div",{className:l()(g.Z.item,{[g.Z["last-feature"]]:a===t.length-1}),key:a},u().createElement(p.ZP,{variant:"body-small"},u().createElement("strong",null,e.name)),e.tooltipInfo&&u().createElement(d.Z,{title:e.tooltipTitle,iconClassName:g.Z["popover-icon"],className:g.Z.popover,placement:e.tooltipPlacement?e.tooltipPlacement:"bottom-end",iconSize:14,offset:4,wide:Boolean(e.tooltipTitle&&e.tooltipInfo)},u().createElement(p.ZP,{variant:"body-small"},e.tooltipInfo))))),a)),u().createElement("div",{className:g.Z["tos-container"]},u().createElement("div",{className:g.Z.tos},n&&u().createElement(p.ZP,{variant:"body-small"},__("Reduced pricing is a limited offer for the first year and renews at regular price.","jetpack-my-jetpack")),u().createElement(h.Z,{multipleButtons:!0}))))}},5347:(e,t,a)=>{"use strict";a.d(t,{Z:()=>o});var n=a(5736),c=a(5235),r=a.n(c),s=a(5106),i=a(3789),l=a(9184);const __=n.__,o=({price:e,offPrice:t,currency:a="",showNotOffPrice:n=!0,hideDiscountLabel:c=!0,promoLabel:o="",legend:u=__("/month, paid yearly","jetpack-my-jetpack"),isNotConvenientPrice:d=!1,hidePriceFraction:m=!1,children:h})=>{if(null==e&&null==t||!a)return null;n=n&&null!=t;const p="number"==typeof e&&"number"==typeof t?Math.floor((e-t)/e*100):0,g=!c&&p&&p>0?p+__("% off","jetpack-my-jetpack"):null;return React.createElement(React.Fragment,null,React.createElement("div",{className:l.Z.container},React.createElement("div",{className:r()(l.Z["price-container"],"product-price_container")},React.createElement(i.t,{value:t??e,currency:a,isOff:!d,hidePriceFraction:m}),n&&React.createElement(i.t,{value:e,currency:a,isOff:!1,hidePriceFraction:m}),g&&React.createElement(s.ZP,{className:r()(l.Z["promo-label"],"product-price_promo_label")},g))),React.createElement("div",{className:l.Z.footer},h||React.createElement(s.ZP,{className:r()(l.Z.legend,"product-price_legend")},u),o&&React.createElement(s.ZP,{className:r()(l.Z["promo-label"],"product-price_promo_label")},o)))}},3789:(e,t,a)=>{"use strict";a.d(t,{t:()=>l});var n=a(8899),c=a(5235),r=a.n(c),s=a(5106),i=a(9184);const l=({value:e,currency:t,isOff:a,hidePriceFraction:c})=>{const l=r()(i.Z.price,"product-price_price",{[i.Z["is-not-off-price"]]:!a}),{symbol:o,integer:u,fraction:d}=(0,n.LR)(e,t),m=!c||!d.endsWith("00");return React.createElement(s.ZP,{className:l,variant:"headline-medium",component:"p"},React.createElement(s.ZP,{className:i.Z.symbol,component:"sup",variant:"title-medium"},o),u,m&&React.createElement(s.ZP,{component:"sup",variant:"body-small","data-testid":"PriceFraction"},React.createElement("strong",null,d)))}},5033:(e,t,a)=>{"use strict";a.d(t,{Z:()=>l});var n=a(5844),c=a.n(n),r=a(9196),s=a.n(r);a(1683);const i=e=>{const t=e.className+" jp-components-spinner",a={width:e.size,height:e.size,fontSize:e.size,borderTopColor:e.color},n={borderTopColor:e.color,borderRightColor:e.color};return s().createElement("div",{className:t},s().createElement("div",{className:"jp-components-spinner__outer",style:a},s().createElement("div",{className:"jp-components-spinner__inner",style:n})))};i.propTypes={color:c().string,className:c().string,size:c().number},i.defaultProps={color:"#FFFFFF",className:"",size:20};const l=i},7325:(e,t,a)=>{"use strict";a.d(t,{Z:()=>m});var n=a(9307),c=a(5736),r=a(5235),s=a.n(r),i=a(6895),l=a(5106);a(7920);const __=c.__,o=()=>(0,n.createInterpolateElement)(__("By clicking the buttons above, you agree to our Terms of Service and to share details with WordPress.com.","jetpack-my-jetpack"),{tosLink:React.createElement(d,{slug:"wpcom-tos"}),shareDetailsLink:React.createElement(d,{slug:"jetpack-support-what-data-does-jetpack-sync"})}),u=({agreeButtonLabel:e})=>(0,n.createInterpolateElement)((0,c.sprintf)(/* translators: %s is a button label */ -__("By clicking the %s button, you agree to our Terms of Service and to share details with WordPress.com.","jetpack-my-jetpack"),e),{strong:React.createElement("strong",null),tosLink:React.createElement(d,{slug:"wpcom-tos"}),shareDetailsLink:React.createElement(d,{slug:"jetpack-support-what-data-does-jetpack-sync"})}),d=({slug:e,children:t})=>React.createElement("a",{className:"terms-of-service__link",href:(0,i.Z)(e),rel:"noopener noreferrer",target:"_blank"},t),m=({className:e,multipleButtons:t,agreeButtonLabel:a})=>React.createElement(l.ZP,{className:s()(e,"terms-of-service")},t?React.createElement(o,null):React.createElement(u,{agreeButtonLabel:a}))},6017:(e,t,a)=>{"use strict";a.d(t,{h:()=>n,s:()=>c});const n={"headline-medium":"h1","headline-small":"h2","headline-small-regular":"h2","title-medium":"h3","title-medium-semi-bold":"h3","title-small":"h4",body:"p","body-small":"p","body-extra-small":"p","body-extra-small-bold":"p",label:"p"},c=["mt","mr","mb","ml","mx","my","m","pt","pr","pb","pl","px","py","p"]},5106:(e,t,a)=>{"use strict";a.d(t,{Dx:()=>p,H3:()=>h,ZP:()=>m});var n=a(2674),c=a.n(n),r=a(5235),s=a.n(r),i=a(9196),l=a.n(i),o=a(6017),u=a(3280);const d=(0,i.forwardRef)((({variant:e="body",children:t,component:a,className:n,...r},d)=>{const m=a||o.h[e]||"span",h=(0,i.useMemo)((()=>o.s.reduce(((e,t)=>(void 0!==r[t]&&(e+=u.Z[`${t}-${r[t]}`]+" ",delete r[t]),e)),"")),[r]);return r.ref=d,l().createElement(m,c()({className:s()(u.Z.reset,u.Z[e],n,h)},r),t)}));d.displayName="Text";const m=d,h=({children:e,weight:t="bold",...a})=>{const n="headline-small"+("bold"===t?"":`-${t}`);return l().createElement(d,c()({variant:n,mb:3},a),e)},p=({children:e,size:t="medium",...a})=>l().createElement(d,c()({variant:`title-${t}`,mb:1},a),e)},8275:(e,t,a)=>{"use strict";a.d(t,{ZP:()=>m});var n=a(9196),c=a.n(n),r=a(3591);const s={"--font-headline-medium":"48px","--font-headline-small":"36px","--font-title-medium":"24px","--font-title-small":"20px","--font-body":"16px","--font-body-small":"14px","--font-body-extra-small":"12px","--font-title-large":"var(--font-headline-small)","--font-label":"var(--font-body-extra-small)"},i={"--jp-black":"#000000","--jp-black-80":"#2c3338","--jp-white":"#ffffff","--jp-white-off":"#f9f9f6","--jp-gray":"#dcdcde","--jp-gray-0":"#F6F7F7","--jp-gray-10":"#C3C4C7","--jp-gray-20":"#A7AAAD","--jp-gray-40":"#787C82","--jp-gray-50":"#646970","--jp-gray-60":"#50575E","--jp-gray-70":"#3C434A","--jp-gray-80":"#2C3338","--jp-gray-90":"#1d2327","--jp-gray-off":"#e2e2df","--jp-red-0":"#F7EBEC","--jp-red-5":"#FACFD2","--jp-red-40":"#E65054","--jp-red-50":"#D63638","--jp-red-60":"#B32D2E","--jp-red-70":"#8A2424","--jp-red-80":"#691C1C","--jp-red":"#d63639","--jp-yellow-5":"#F5E6B3","--jp-yellow-10":"#F2CF75","--jp-yellow-20":"#F0C930","--jp-yellow-30":"#DEB100","--jp-yellow-40":"#C08C00","--jp-yellow-50":"#9D6E00","--jp-yellow-60":"#7D5600","--jp-blue-20":"#68B3E8","--jp-blue-40":"#1689DB","--jp-pink":"#C9356E","--jp-green-0":"#f0f2eb","--jp-green-5":"#d0e6b8","--jp-green-10":"#9dd977","--jp-green-20":"#64ca43","--jp-green-30":"#2fb41f","--jp-green-40":"#069e08","--jp-green-50":"#008710","--jp-green-60":"#007117","--jp-green-70":"#005b18","--jp-green-80":"#004515","--jp-green-90":"#003010","--jp-green-100":"#001c09","--jp-green":"#069e08","--jp-green-primary":"var( --jp-green-40 )","--jp-green-secondary":"var( --jp-green-30 )"},l={"--jp-border-radius":"4px","--jp-menu-border-height":"1px","--jp-underline-thickness":"2px"},o={"--spacing-base":"8px"},u={},d=(e,t,a)=>{const n={...s,...i,...l,...o};for(const t in n)e.style.setProperty(t,n[t]);a&&e.classList.add(r.Z.global),t&&(u[t]={provided:!0,root:e})},m=({children:e=null,targetDom:t,id:a,withGlobalStyles:r=!0})=>{const s=(0,n.useRef)(),i=u?.[a]?.provided;return(0,n.useLayoutEffect)((()=>{if(!i)return t?d(t,a,r):void(s?.current&&d(s.current,a,r))}),[t,s,i,a,r]),t?c().createElement(c().Fragment,null,e):c().createElement("div",{ref:s},e)}},4706:(e,t,a)=>{"use strict";a.d(t,{Z:()=>l});var n=a(526),c=a(5609),r=a(9307),s=a(9196),i=a.n(s);a(2541);const l=e=>{const{icon:t,title:a,description:s,primaryCtaLabel:l,primaryCtaURL:o,primaryCtaIsExternalLink:u,primaryCtaOnClick:d,secondaryCtaLabel:m,secondaryCtaURL:h,secondaryCtaIsExternalLink:p,secondaryCtaOnClick:g}=e;return i().createElement(c.Card,{isRounded:!0,size:"large"},i().createElement(c.CardBody,{className:"upsell-banner",size:"large"},t&&i().createElement("div",{className:"upsell-banner--icon"},i().createElement("img",{src:t,alt:""})),i().createElement("div",{className:"upsell-banner--content"},i().createElement("div",{className:"upsell-banner--content-info"},i().createElement("h3",null,a),i().createElement("p",null,(0,r.createInterpolateElement)(s,{br:i().createElement("br",null)}))),i().createElement("div",{className:"upsell-banner--content-cta"},m&&h&&i().createElement(n.Z,{className:"upsell-banner--content-cta-button secondary",href:h,onClick:g??void 0,isExternalLink:p},m),l&&o&&i().createElement(n.Z,{className:"upsell-banner--content-cta-button primary",href:o,onClick:d??void 0,isExternalLink:u},l)))))}},5905:(e,t,a)=>{"use strict";a.d(t,{O:()=>n});const n="d729d42c-b547-4750-a6f6-8b30534a5f12"},4164:(e,t,a)=>{"use strict";a.d(t,{Z:()=>r});var n=a(9196),c=a(5905);const r=({jwt_token:e})=>{const t=(0,n.useCallback)((()=>{"undefined"!=typeof window&&"function"==typeof window.zE&&window.zE("messenger","loginUser",(function(t){t(e)}))}),[e]);return(0,n.useEffect)((()=>{const e=document.createElement("script"),a=document.getElementById("zendesk-chat-container");e.src="https://static.zdassets.com/ekr/snippet.js?key="+encodeURIComponent(c.O),e.type="text/javascript",e.id="ze-snippet",e.onload=()=>{t()},a&&a.appendChild(e)}),[t]),React.createElement("div",{"data-testid":"zendesk-chat-container",id:"zendesk-chat-container"})}},8709:(e,t,a)=>{"use strict";a.d(t,{X:()=>c});var n=a(9771);const c=()=>{const{l10n:{locale:e}}=(0,n.getSettings)();if(e)return(e=>{const t=e.match(/^([a-z]{2,3})(_[a-z]{2}|_[a-z][a-z0-9]{4,7})?(?:_.*)?$/i);return t?`${t[1]}${t[2]?t[2]:""}`.replace("_","-"):"en-US"})(e);return window?.window?.navigator?.language??"en-US"}},2497:(e,t,a)=>{"use strict";function n(){return window.Initial_State?.adminUrl||window.Jetpack_Editor_Initial_State?.adminUrl||window?.myJetpackInitialState?.adminUrl||null}a.d(t,{Z:()=>n})},6895:(e,t,a)=>{"use strict";function n(e,t={}){const a={};let n;if("undefined"!=typeof window&&(n=window?.JP_CONNECTION_INITIAL_STATE?.calypsoEnv),0===e.search("https://")){const t=new URL(e);e=`https://${t.host}${t.pathname}`,a.url=encodeURIComponent(e)}else a.source=encodeURIComponent(e);for(const e in t)a[e]=encodeURIComponent(t[e]);!Object.keys(a).includes("site")&&"undefined"!=typeof jetpack_redirects&&jetpack_redirects.hasOwnProperty("currentSiteRawUrl")&&(a.site=jetpack_redirects.currentBlogID??jetpack_redirects.currentSiteRawUrl),n&&(a.calypso_env=n);return"https://jetpack.com/redirect/?"+Object.keys(a).map((e=>e+"="+a[e])).join("&")}a.d(t,{Z:()=>n})},1132:(e,t,a)=>{let n={};try{n=a(4462)}catch{console.error("jetpackConfig is missing in your webpack config file. See @automattic/jetpack-config"),n={missingConfig:!0}}const c=e=>n.hasOwnProperty(e);e.exports={jetpackConfigHas:c,jetpackConfigGet:e=>{if(!c(e))throw'This app requires the "'+e+'" Jetpack Config to be defined in your webpack configuration file. See details in @automattic/jetpack-config package docs.';return n[e]}}},9312:(e,t,a)=>{"use strict";a.d(t,{Z:()=>d});var n=a(5736),c=a(5844),r=a.n(c),s=a(9196),i=a.n(s),l=a(1294),o=a(1624);const __=n.__,u=({title:e,buttonLabel:t,loadingLabel:a,apiRoot:n,apiNonce:c,registrationNonce:r,from:s,redirectUri:u,images:d,children:m,assetBaseUrl:h,autoTrigger:p,footer:g,skipUserConnection:v,logo:f})=>{const{handleRegisterSite:w,siteIsRegistering:k,userIsConnecting:E,registrationError:y,isOfflineMode:b}=(0,l.Z)({registrationNonce:r,redirectUri:u,apiRoot:n,apiNonce:c,autoTrigger:p,from:s,skipUserConnection:v}),C=Boolean(y),j=k||E,_=y?.response?.code;return i().createElement(o.Z,{title:e,images:d,assetBaseUrl:h,buttonLabel:t,loadingLabel:a,handleButtonClick:w,displayButtonError:C,errorCode:_,buttonIsLoading:j,footer:g,isOfflineMode:b,logo:f},m)};u.propTypes={title:r().string,buttonLabel:r().string,loadingLabel:r().string,apiRoot:r().string.isRequired,apiNonce:r().string.isRequired,registrationNonce:r().string.isRequired,from:r().string,redirectUri:r().string.isRequired,autoTrigger:r().bool,images:r().arrayOf(r().string),assetBaseUrl:r().string,skipUserConnection:r().bool,logo:r().element},u.defaultProps={title:__("Over 5 million WordPress sites are faster and more secure","jetpack-my-jetpack"),buttonLabel:__("Set up Jetpack","jetpack-my-jetpack"),images:[],redirectUri:null,autoTrigger:!1,skipUserConnection:!1};const d=u},1624:(e,t,a)=>{"use strict";a.d(t,{Z:()=>p});var n=a(6895),c=a(7325),r=a(7121),s=a(9307),i=a(5736),l=a(5844),o=a.n(l),u=a(9196),d=a.n(u),m=a(8524);a(1510);const __=i.__,h=e=>{const{title:t,images:a,children:i,assetBaseUrl:l,isLoading:o,buttonLabel:u,handleButtonClick:h,displayButtonError:p,errorCode:g,buttonIsLoading:v,loadingLabel:f,footer:w,isOfflineMode:k,logo:E}=e,y=(()=>{switch(g){case"fail_domain_forbidden":case"fail_ip_forbidden":case"fail_domain_tld":case"fail_subdomain_wpcom":case"siteurl_private_ip":return __("Your site host is on a private network. Jetpack can only connect to public sites.","jetpack-my-jetpack")}if(k)return(0,s.createInterpolateElement)(__("Unavailable in Offline Mode","jetpack-my-jetpack"),{a:d().createElement("a",{href:(0,n.Z)("jetpack-support-development-mode"),target:"_blank",rel:"noopener noreferrer"})})})();return d().createElement(m.Z,{title:t,assetBaseUrl:l,images:a,className:"jp-connection__connect-screen"+(o?" jp-connection__connect-screen__loading":""),logo:E},d().createElement("div",{className:"jp-connection__connect-screen__content"},i,d().createElement("div",{className:"jp-connection__connect-screen__tos"},d().createElement(c.Z,{agreeButtonLabel:u})),d().createElement(r.Z,{label:u,onClick:h,displayError:p||k,errorMessage:y,isLoading:v,isDisabled:k}),d().createElement("span",{className:"jp-connection__connect-screen__loading-message",role:"status"},v?f:""),w&&d().createElement("div",{className:"jp-connection__connect-screen__footer"},w)))};h.propTypes={title:o().string,images:o().arrayOf(o().string),assetBaseUrl:o().string,isLoading:o().bool,buttonLabel:o().string.isRequired,handleButtonClick:o().func,displayButtonError:o().bool,errorCode:o().string,buttonIsLoading:o().bool,loadingLabel:o().string,footer:o().node,isOfflineMode:o().bool,logo:o().element},h.defaultProps={isLoading:!1,buttonIsLoading:!1,loadingLabel:__("Loading","jetpack-my-jetpack"),displayButtonError:!1,errorCode:null,handleButtonClick:()=>{},footer:null,isOfflineMode:!1};const p=h},2458:(e,t,a)=>{"use strict";a.d(t,{Z:()=>l});var n=a(5844),c=a.n(n),r=a(9196),s=a.n(r);const i=e=>{const{images:t,assetBaseUrl:a}=e;if(!t.length)return null;const n=t.map(((e,t)=>s().createElement(s().Fragment,{key:t},s().createElement("img",{src:a+e,alt:""}))));return s().createElement("div",{className:"jp-connection__connect-screen__image-slider"},n)};i.propTypes={images:c().arrayOf(c().string).isRequired,assetBaseUrl:c().string},i.defaultProps={assetBaseUrl:""};const l=i},8524:(e,t,a)=>{"use strict";a.d(t,{Z:()=>m});var n=a(8868),c=a(5235),r=a.n(c),s=a(5844),i=a.n(s),l=a(9196),o=a.n(l),u=a(2458);a(9610);const d=e=>{const{title:t,children:a,className:c,assetBaseUrl:s,images:i,logo:l,rna:d=!1}=e,m=i?.length;return o().createElement("div",{className:r()("jp-connection__connect-screen-layout",m?"jp-connection__connect-screen-layout__two-columns":"",c?" "+c:"")},d&&o().createElement("div",{className:"jp-connection__connect-screen-layout__color-blobs"},o().createElement("div",{className:"jp-connection__connect-screen-layout__color-blobs__green"}),o().createElement("div",{className:"jp-connection__connect-screen-layout__color-blobs__yellow"}),o().createElement("div",{className:"jp-connection__connect-screen-layout__color-blobs__blue"})),o().createElement("div",{className:"jp-connection__connect-screen-layout__left"},l||o().createElement(n.Z,null),o().createElement("h2",null,t),a),m?o().createElement("div",{className:"jp-connection__connect-screen-layout__right"},o().createElement(u.Z,{images:i,assetBaseUrl:s})):null)};d.propTypes={title:i().string,className:i().string,images:i().arrayOf(i().string),assetBaseUrl:i().string,logo:i().element};const m=d},7879:(e,t,a)=>{"use strict";a.d(t,{Z:()=>u});var n=a(5736),c=a(5844),r=a.n(c),s=a(9196),i=a.n(s),l=a(4322);const __=n.__,o=e=>{const{connectedPlugins:t,disconnectingPlugin:a}=e,n=(0,s.useMemo)((()=>{if(t){return Object.keys(t).map((e=>Object.assign({slug:e},t[e]))).filter((e=>a!==e.slug))}return[]}),[t,a]);return t&&n.length>0?i().createElement(i().Fragment,null,i().createElement("div",{className:"jp-connection__disconnect-dialog__step-copy"},i().createElement("p",{className:"jp-connection__disconnect-dialog__large-text"},__("Jetpack is powering other plugins on your site. If you disconnect, these plugins will no longer work.","jetpack-my-jetpack"))),i().createElement("div",{className:"jp-connection__disconnect-card__group"},n.map((e=>i().createElement(l.Z,{title:e.name,key:e.slug}))))):null};o.propTypes={connectedPlugins:r().array,disconnectingPlugin:r().string};const u=o},6186:(e,t,a)=>{"use strict";a.d(t,{Z:()=>h});var n=a(2054),c=a(5033),r=a(5609),s=a(5736),i=a(5844),l=a.n(i),o=a(9196),u=a.n(o),d=a(9836);const __=s.__,m=e=>{const{message:t,isRestoringConnection:a,restoreConnectionCallback:i,restoreConnectionError:l}=e,[o]=(0,n.Z)(["md"],[">"]),m=d.Z.notice+(o?" "+d.Z["bigger-than-medium"]:""),h=u().createElement(r.Icon,{icon:u().createElement(r.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},u().createElement(r.Path,{d:"M11.7815 4.93772C11.8767 4.76626 12.1233 4.76626 12.2185 4.93772L20.519 19.8786C20.6116 20.0452 20.4911 20.25 20.3005 20.25H3.69951C3.50889 20.25 3.3884 20.0452 3.48098 19.8786L11.7815 4.93772Z",stroke:"#D63638",strokeWidth:"1.5"}),u().createElement(r.Path,{d:"M13 10H11V15H13V10Z",fill:"#D63638"}),u().createElement(r.Path,{d:"M13 16H11V18H13V16Z",fill:"#D63638"}))});if(!t)return null;if(a)return u().createElement(r.Notice,{status:"error",isDismissible:!1,className:m},u().createElement("div",{className:d.Z.message},u().createElement(c.Z,{color:"#B32D2E",size:24}),__("Reconnecting Jetpack","jetpack-my-jetpack")));const p=l?u().createElement(r.Notice,{status:"error",isDismissible:!1,className:m+" "+d.Z.error},u().createElement("div",{className:d.Z.message},h,(0,s.sprintf)(/* translators: placeholder is the error. */ -__("There was an error reconnecting Jetpack. Error: %s","jetpack-my-jetpack"),l))):null;return u().createElement(u().Fragment,null,p,u().createElement(r.Notice,{status:"error",isDismissible:!1,className:m},u().createElement("div",{className:d.Z.message},h,t),i&&u().createElement("a",{onClick:i,onKeyDown:i,className:d.Z.button,href:"#"},__("Restore Connection","jetpack-my-jetpack"))))};m.propTypes={message:l().string.isRequired,restoreConnectionCallback:l().func,isRestoringConnection:l().bool,restoreConnectionError:l().string};const h=m},4322:(e,t,a)=>{"use strict";a.d(t,{Z:()=>l});var n=a(5844),c=a.n(n),r=a(9196),s=a.n(r);a(4220);const i=e=>{const{title:t,value:a,description:n}=e;return s().createElement("div",{className:"jp-connection__disconnect-card card"},s().createElement("div",{className:"jp-connection__disconnect-card__card-content"},s().createElement("p",{className:"jp-connection__disconnect-card__card-headline"},t),(a||n)&&s().createElement("div",{className:"jp-connection__disconnect-card__card-stat-block"},s().createElement("span",{className:"jp-connection__disconnect-card__card-stat"},a),s().createElement("div",{className:"jp-connection__disconnect-card__card-description"},n))))};i.propTypes={title:c().string,value:c().oneOfType([c().string,c().number]),description:c().string};const l=i},6168:(e,t,a)=>{"use strict";a.d(t,{Z:()=>f});var n=a(6975),c=a(4743),r=a(1132),s=a(5609),i=a(5736),l=a(5844),o=a.n(l),u=a(9196),d=a.n(u),m=(a(287),a(9015)),h=a(5995),p=a(1702),g=a(1166);const __=i.__,v=e=>{const[t,a]=(0,u.useState)(!1),[i,l]=(0,u.useState)(!1),[o,v]=(0,u.useState)(!1),[f,w]=(0,u.useState)(!1),[k,E]=(0,u.useState)(!1),[y,b]=(0,u.useState)(!1),{apiRoot:C,apiNonce:j,connectedPlugins:_,title:z,pluginScreenDisconnectCallback:N,onDisconnected:x,onError:Z,disconnectStepComponent:R,context:M,connectedUser:S,connectedSiteId:L,isOpen:P,onClose:V}=e;let H="";(0,r.jetpackConfigHas)("consumer_slug")&&(H=(0,r.jetpackConfigGet)("consumer_slug"));const A=(0,u.useMemo)((()=>({context:M,plugin:H})),[M,H]);(0,u.useEffect)((()=>{c.ZP.setApiRoot(C),c.ZP.setApiNonce(j)}),[C,j]),(0,u.useEffect)((()=>{S&&S.ID&&S.login&&n.Z.initialize(S.ID,S.login)}),[S,S.ID,S.login]),(0,u.useEffect)((()=>{P&&n.Z.tracks.recordEvent("jetpack_disconnect_dialog_open",A)}),[P,A]),(0,u.useEffect)((()=>{P&&(i?!i||f||k?f&&!k?n.Z.tracks.recordEvent("jetpack_disconnect_dialog_step",Object.assign({},{step:"survey"},A)):k&&n.Z.tracks.recordEvent("jetpack_disconnect_dialog_step",Object.assign({},{step:"thank_you"},A)):n.Z.tracks.recordEvent("jetpack_disconnect_dialog_step",Object.assign({},{step:"disconnect_confirm"},A)):n.Z.tracks.recordEvent("jetpack_disconnect_dialog_step",Object.assign({},{step:"disconnect"},A)))}),[P,i,f,k,A]);const B=(0,u.useCallback)((()=>{c.ZP.disconnectSite().then((()=>{a(!1),l(!0)})).catch((e=>{a(!1),v(e),Z&&Z(e)}))}),[a,l,v,Z]),O=(0,u.useCallback)(((e,t)=>{b(!0),fetch("https://public-api.wordpress.com/wpcom/v2/marketing/feedback-survey",{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(e)}).then((e=>e.json())).then((e=>{if(!0!==e.success)throw new Error("Survey endpoint returned error code "+e.code);n.Z.tracks.recordEvent("jetpack_disconnect_survey_submit",t),E(!0),b(!1)})).catch((e=>{n.Z.tracks.recordEvent("jetpack_disconnect_survey_error",Object.assign({},{error:e.message},t)),E(!0),b(!1)}))}),[b,E]),I=(0,u.useCallback)((e=>{e&&e.preventDefault(),v(!1),a(!0),"plugins"!==M?B():N&&N(e)}),[v,a,N,M,B]),T=(0,u.useCallback)((e=>n.Z.tracks.recordEvent(e,A)),[A]),U=(0,u.useCallback)((()=>!(!S.ID||!L)),[S,L]),D=(0,u.useCallback)(((e,t,a)=>{if(a&&a.preventDefault(),!U())return void E(!0);const n={site_id:L,user_id:S.ID,survey_id:"jetpack-plugin-disconnect",survey_responses:{"why-cancel":{response:e,text:t||null}}},c=Object.assign({},A,{disconnect_reason:e});O(n,c)}),[O,E,U,L,S,A]),F=(0,u.useCallback)((e=>{e&&e.preventDefault(),x&&x(),V()}),[x,V]),q=(0,u.useCallback)((e=>{e&&e.preventDefault(),w(!0)}),[w]);return d().createElement(d().Fragment,null,P&&d().createElement(s.Modal,{title:"",contentLabel:z,aria:{labelledby:"jp-connection__disconnect-dialog__heading"},onRequestClose:V,shouldCloseOnClickOutside:!1,shouldCloseOnEsc:!1,isDismissible:!1,className:"jp-connection__disconnect-dialog"+(i?" jp-connection__disconnect-dialog__success":"")},i?!i||f||k?f&&!k?d().createElement(p.Z,{isSubmittingFeedback:y,onFeedBackProvided:D,onExit:F}):k?d().createElement(g.Z,{onExit:F}):void 0:d().createElement(h.Z,{canProvideFeedback:U(),onProvideFeedback:q,onExit:F}):d().createElement(m.Z,{title:z,connectedPlugins:_,disconnectStepComponent:R,isDisconnecting:t,closeModal:V,onDisconnect:I,disconnectError:o,context:M,disconnectingPlugin:H,trackModalClick:T})))};v.propTypes={apiRoot:o().string.isRequired,apiNonce:o().string.isRequired,title:o().string,onDisconnected:o().func,onError:o().func,context:o().string,connectedPlugins:o().oneOfType([o().array,o().object]),pluginScreenDisconnectCallback:o().func,disconnectStepComponent:o().element,connectedUser:o().object,connectedSiteId:o().number,isOpen:o().bool,onClose:o().func},v.defaultProps={title:__("Are you sure you want to disconnect?","jetpack-my-jetpack"),context:"jetpack-dashboard",connectedUser:{}};const f=v},5995:(e,t,a)=>{"use strict";a.d(t,{Z:()=>h});var n=a(9026),c=a(5609),r=a(9307),s=a(5736),i=a(5844),l=a.n(i),o=a(9196),u=a.n(o),d=a(2042);const __=s.__,m=e=>{const{onExit:t,canProvideFeedback:a,onProvideFeedback:s}=e;return u().createElement("div",{className:"jp-connection__disconnect-dialog__content"},u().createElement(n.Z,{icon:"unlink",imageUrl:d}),u().createElement("div",{className:"jp-connection__disconnect-dialog__step-copy jp-connection__disconnect-dialog__step-copy--narrow"},u().createElement("h1",null,(0,r.createInterpolateElement)(__("Jetpack has been
          successfully disconnected.","jetpack-my-jetpack"),{br:u().createElement("br",null)})),a&&u().createElement(u().Fragment,null,u().createElement("p",null,__("We’re sorry to see you go. Here at Jetpack, we’re always striving to provide the best experience for our customers. Please take our short survey (2 minutes, promise).","jetpack-my-jetpack")),u().createElement("p",null,u().createElement(c.Button,{variant:"primary",onClick:s,className:"jp-connection__disconnect-dialog__btn-back-to-wp"},__("Help us improve","jetpack-my-jetpack"))),u().createElement("a",{className:"jp-connection__disconnect-dialog__link jp-connection__disconnect-dialog__link--bold",href:"#",onClick:t},__("No thank you","jetpack-my-jetpack"))),!a&&u().createElement(u().Fragment,null,u().createElement("p",null,u().createElement(c.Button,{variant:"primary",onClick:t,className:"jp-connection__disconnect-dialog__btn-back-to-wp"},__("Back to my website","jetpack-my-jetpack"))))))};m.propTypes={onExit:l().func,onProvideFeedback:l().func,canProvideFeedback:l().bool};const h=m},9015:(e,t,a)=>{"use strict";a.d(t,{Z:()=>h});var n=a(6895),c=a(5609),r=a(9307),s=a(5736),i=a(5844),l=a.n(i),o=a(9196),u=a.n(o),d=a(7879);const __=s.__,m=e=>{const{title:t,isDisconnecting:a,onDisconnect:s,disconnectError:i,disconnectStepComponent:l,connectedPlugins:m,disconnectingPlugin:h,closeModal:p,context:g,trackModalClick:v}=e,f=(0,o.useCallback)((()=>v("jetpack_disconnect_dialog_click_learn_about")),[v]),w=(0,o.useCallback)((()=>v("jetpack_disconnect_dialog_click_support")),[v]),k=(0,o.useCallback)((()=>{v("jetpack_disconnect_dialog_click_stay_connected"),p()}),[v,p]),E=(0,o.useCallback)((e=>{v("jetpack_disconnect_dialog_click_disconnect"),s(e)}),[v,s]),y=(0,o.useCallback)((e=>{"Escape"!==e.key||a||k()}),[k,a]);(0,o.useEffect)((()=>(document.addEventListener("keydown",y,!1),()=>{document.removeEventListener("keydown",y,!1)})),[]);return u().createElement(u().Fragment,null,u().createElement("div",{className:"jp-connection__disconnect-dialog__content"},u().createElement("h1",{id:"jp-connection__disconnect-dialog__heading"},t),u().createElement(d.Z,{connectedPlugins:m,disconnectingPlugin:h}),l,(()=>{if(!(m&&Object.keys(m).filter((e=>e!==h)).length)&&!l)return u().createElement("div",{className:"jp-connection__disconnect-dialog__step-copy"},u().createElement("p",{className:"jp-connection__disconnect-dialog__large-text"},__("Jetpack is currently powering multiple products on your site.","jetpack-my-jetpack"),u().createElement("br",null),__("Once you disconnect Jetpack, these will no longer work.","jetpack-my-jetpack")))})()),u().createElement("div",{className:"jp-connection__disconnect-dialog__actions"},u().createElement("div",{className:"jp-row"},u().createElement("div",{className:"lg-col-span-8 md-col-span-9 sm-col-span-4"},u().createElement("p",null,(0,r.createInterpolateElement)(__("Need help? Learn more about the Jetpack connection or contact Jetpack support.","jetpack-my-jetpack"),{strong:u().createElement("strong",null),jpConnectionInfoLink:u().createElement(c.ExternalLink,{href:(0,n.Z)("why-the-wordpress-com-connection-is-important-for-jetpack"),className:"jp-connection__disconnect-dialog__link",onClick:f}),jpSupportLink:u().createElement(c.ExternalLink,{href:(0,n.Z)("jetpack-support"),className:"jp-connection__disconnect-dialog__link",onClick:w})}))),u().createElement("div",{className:"jp-connection__disconnect-dialog__button-wrap lg-col-span-4 md-col-span-7 sm-col-span-4"},u().createElement(c.Button,{variant:"primary",disabled:a,onClick:k,className:"jp-connection__disconnect-dialog__btn-dismiss"},"plugins"===g?__("Cancel","jetpack-my-jetpack"):__("Stay connected","jetpack-my-jetpack",0)),(()=>{let e=__("Disconnect","jetpack-my-jetpack");return a?e=__("Disconnecting…","jetpack-my-jetpack"):"plugins"===g&&(e=__("Deactivate","jetpack-my-jetpack")),u().createElement(c.Button,{variant:"primary",disabled:a,onClick:E,className:"jp-connection__disconnect-dialog__btn-disconnect"},e)})())),i&&u().createElement("p",{className:"jp-connection__disconnect-dialog__error"},i)))};m.propTypes={title:l().string,isDisconnecting:l().bool,onDisconnect:l().func,disconnectError:l().bool,disconnectStepComponent:l().element,connectedPlugins:l().array,disconnectingPlugin:l().string,closeModal:l().func,context:l().string,trackModalClick:l().func};const h=m},1702:(e,t,a)=>{"use strict";a.d(t,{Z:()=>u});var n=a(5736),c=a(5844),r=a.n(c),s=a(9196),i=a.n(s),l=(a(9823),a(6336));const __=n.__,o=e=>{const{onExit:t,onFeedBackProvided:a,isSubmittingFeedback:n}=e;return i().createElement("div",{className:"jp-connection__disconnect-dialog__content"},i().createElement("h1",null,__("Before you go, help us improve Jetpack","jetpack-my-jetpack")),i().createElement("p",{className:"jp-connection__disconnect-dialog__large-text"},__("Let us know what didn‘t work for you","jetpack-my-jetpack")),i().createElement(l.Z,{onSubmit:a,isSubmittingFeedback:n}),i().createElement("a",{className:"jp-connection__disconnect-dialog__link jp-connection__disconnect-dialog__link--bold",href:"#",onClick:t},__("Skip for now","jetpack-my-jetpack")))};o.PropTypes={onExit:r().func,onFeedBackProvided:r().func,isSubmittingFeedback:r().bool};const u=o},1166:(e,t,a)=>{"use strict";a.d(t,{Z:()=>h});var n=a(9026),c=a(5609),r=a(9307),s=a(5736),i=a(5844),l=a.n(i),o=a(9196),u=a.n(o),d=a(724);const __=s.__,m=e=>{const{onExit:t}=e;return u().createElement("div",{className:"jp-connection__disconnect-dialog__content"},u().createElement(n.Z,{format:"vertical",imageUrl:d}),u().createElement("div",{className:"jp-connection__disconnect-dialog__copy"},u().createElement("h1",null,__("Thank you!","jetpack-my-jetpack")),u().createElement("p",{className:"jp-connection__disconnect-dialog__large-text"},(0,r.createInterpolateElement)(__("Your answer has been submitted.
          Thanks for your input on how we can improve Jetpack.","jetpack-my-jetpack"),{br:u().createElement("br",null)})),u().createElement(c.Button,{variant:"primary",onClick:t,className:"jp-connection__disconnect-dialog__btn-back-to-wp"},__("Back to my website","jetpack-my-jetpack"))))};m.PropTypes={onExit:l().func,assetBaseUrl:l().string};const h=m},6336:(e,t,a)=>{"use strict";a.d(t,{Z:()=>d});var n=a(5609),c=a(5736),r=a(5844),s=a.n(r),i=a(9196),l=a.n(i),o=a(4372);const __=c.__,u=e=>{const{onSubmit:t,isSubmittingFeedback:a}=e,[c,r]=(0,i.useState)(),[s,u]=(0,i.useState)(),d=[{id:"troubleshooting",answerText:__("Troubleshooting - I'll be reconnecting afterwards.","jetpack-my-jetpack")},{id:"not-working",answerText:__("I can't get it to work.","jetpack-my-jetpack")},{id:"slowed-down-site",answerText:__("It slowed down my site.","jetpack-my-jetpack")},{id:"buggy",answerText:__("It's buggy.","jetpack-my-jetpack")},{id:"what-does-it-do",answerText:__("I don't know what it does.","jetpack-my-jetpack")}],m="another-reason",h=(0,i.useCallback)((()=>{t(c,c===m?s:"")}),[t,m,s,c]),p=(0,i.useCallback)((e=>{const t=e.target.value;e.stopPropagation(),u(t)}),[u]),g=e=>e===c?"jp-connect__disconnect-survey-card--selected":"",v=(0,i.useCallback)(((e,t)=>{switch(t.key){case"Enter":case"Space":case"Spacebar":case" ":r(e)}}),[r]);return l().createElement(l().Fragment,null,l().createElement("div",{className:"jp-connection__disconnect-dialog__survey"},d.map((e=>l().createElement(o.Z,{id:e.id,onClick:r,onKeyDown:v,className:"card jp-connect__disconnect-survey-card "+g(e.id)},l().createElement("p",{className:"jp-connect__disconnect-survey-card__answer"},e.answerText)))),l().createElement(o.Z,{id:m,key:m,onClick:r,onKeyDown:v,className:"card jp-connect__disconnect-survey-card "+g(m)},l().createElement("p",{className:"jp-connect__disconnect-survey-card__answer"},__("Other:","jetpack-my-jetpack")," ",l().createElement("input",{placeholder:__("share your experience","jetpack-my-jetpack"),className:"jp-connect__disconnect-survey-card__input",type:"text",value:s,onChange:p,maxLength:1e3})))),l().createElement("p",null,l().createElement(n.Button,{disabled:!c||a,variant:"primary",onClick:h,className:"jp-connection__disconnect-dialog__btn-back-to-wp"},a?__("Submitting…","jetpack-my-jetpack"):__("Submit Feedback","jetpack-my-jetpack",0))))};u.PropTypes={onSubmit:s().func,isSubmittingFeedback:s().bool};const d=u},4372:(e,t,a)=>{"use strict";a.d(t,{Z:()=>r});var n=a(9196),c=a.n(n);a(9823);const r=e=>{const{id:t,onClick:a,onKeyDown:r,children:s,className:i}=e,l=(0,n.useCallback)((()=>{a(t)}),[t,a]),o=(0,n.useCallback)((e=>{r(t,e)}),[t,r]);return c().createElement("div",{tabIndex:"0",role:"button",onClick:l,onKeyDown:o,className:"card jp-connect__disconnect-survey-card "+i},s)}},8137:(e,t,a)=>{"use strict";a.d(t,{Z:()=>b});var n=a(5106),c=a(6895),r=a(526),s=a(5609),i=a(9307),l=a(5736),o=a(1074),u=a(6936),d=a(5381),m=a(5235),h=a.n(m),p=a(5844),g=a.n(p),v=a(9196),f=a.n(v),w=a(6168);a(7664);const __=l.__,k=e=>{const{title:t,apiRoot:a,apiNonce:r,connectedPlugins:i,onDisconnected:l,context:o,connectedUser:u,connectedSiteId:d,isOpen:m,onClose:h}=e,[p,g]=(0,v.useState)(!1),k=(0,v.useCallback)((e=>{e&&e.preventDefault(),g(!0)}),[g]),b=(0,v.useCallback)((e=>{e&&e.preventDefault(),g(!1)}),[g]);return f().createElement(f().Fragment,null,m&&f().createElement(f().Fragment,null,f().createElement(s.Modal,{title:"",contentLabel:t,aria:{labelledby:"jp-connection__manage-dialog__heading"},shouldCloseOnClickOutside:!1,shouldCloseOnEsc:!1,isDismissible:!1,className:"jp-connection__manage-dialog"},f().createElement("div",{className:"jp-connection__manage-dialog__content"},f().createElement("h1",{id:"jp-connection__manage-dialog__heading"},t),f().createElement(n.ZP,{className:"jp-connection__manage-dialog__large-text"},__("At least one user must be connected for your Jetpack products to work properly.","jetpack-my-jetpack")),f().createElement(E,{title:__("Transfer ownership to another admin","jetpack-my-jetpack"),link:(0,c.Z)("calypso-settings-manage-connection",{site:window?.myJetpackInitialState?.siteSuffix}),key:"transfer",action:"transfer"}),f().createElement(E,{title:__("Disconnect Jetpack","jetpack-my-jetpack"),onClick:k,key:"disconnect",action:"disconnect"})),f().createElement(y,{onClose:h})),f().createElement(w.Z,{apiRoot:a,apiNonce:r,onDisconnected:l,connectedPlugins:i,connectedSiteId:d,connectedUser:u,isOpen:p,onClose:b,context:o})))},E=({title:e,onClick:t=(()=>null),link:a="#",action:n})=>f().createElement("div",{className:"jp-connection__manage-dialog__action-card card"},f().createElement("div",{className:"jp-connection__manage-dialog__action-card__card-content"},f().createElement("a",{href:a,className:h()("jp-connection__manage-dialog__action-card__card-headline",n),onClick:t},e,f().createElement(o.Z,{icon:"disconnect"===n?u.Z:d.Z,className:"jp-connection__manage-dialog__action-card__icon"})))),y=({onClose:e})=>f().createElement("div",{className:"jp-row jp-connection__manage-dialog__actions"},f().createElement("div",{className:"jp-connection__manage-dialog__text-wrap lg-col-span-9 md-col-span-7 sm-col-span-3"},f().createElement(n.ZP,null,(0,i.createInterpolateElement)(__("Need help? Learn more about the Jetpack connection or contact Jetpack support","jetpack-my-jetpack"),{strong:f().createElement("strong",null),connectionInfoLink:f().createElement(s.ExternalLink,{href:(0,c.Z)("why-the-wordpress-com-connection-is-important-for-jetpack"),className:"jp-connection__manage-dialog__link"}),supportLink:f().createElement(s.ExternalLink,{href:(0,c.Z)("jetpack-support"),className:"jp-connection__manage-dialog__link"})}))),f().createElement("div",{className:"jp-connection__manage-dialog__button-wrap lg-col-span-3 md-col-span-1 sm-col-span-1"},f().createElement(r.Z,{weight:"regular",variant:"secondary",onClick:e,className:"jp-connection__manage-dialog__btn-dismiss"},__("Cancel","jetpack-my-jetpack"))));k.propTypes={title:g().string,apiRoot:g().string.isRequired,apiNonce:g().string.isRequired,connectedPlugins:g().oneOfType([g().array,g().object]),onDisconnected:g().func,context:g().string,connectedUser:g().object,connectedSiteId:g().number,isOpen:g().bool,onClose:g().func},k.defaultProps={title:__("Manage your Jetpack connection","jetpack-my-jetpack"),isOpen:!1,context:"jetpack-dashboard",connectedUser:{}};const b=k},1294:(e,t,a)=>{"use strict";a.d(t,{Z:()=>l});var n=a(4743),c=a(9818),r=a(9196),s=a(428);const i=window?.JP_CONNECTION_INITIAL_STATE?window.JP_CONNECTION_INITIAL_STATE:{},l=({registrationNonce:e=i.registrationNonce,apiRoot:t=i.apiRoot,apiNonce:a=i.apiNonce,redirectUri:l,autoTrigger:o,from:u,skipUserConnection:d}={})=>{const{registerSite:m,connectUser:h,refreshConnectedPlugins:p}=(0,c.useDispatch)(s.t),g=(0,c.useSelect)((e=>e(s.t).getRegistrationError())),{siteIsRegistering:v,userIsConnecting:f,userConnectionData:w,connectedPlugins:k,connectionErrors:E,isRegistered:y,isUserConnected:b,hasConnectedOwner:C,isOfflineMode:j}=(0,c.useSelect)((e=>({siteIsRegistering:e(s.t).getSiteIsRegistering(),userIsConnecting:e(s.t).getUserIsConnecting(),userConnectionData:e(s.t).getUserConnectionData(),connectedPlugins:e(s.t).getConnectedPlugins(),connectionErrors:e(s.t).getConnectionErrors(),isOfflineMode:e(s.t).getIsOfflineMode(),...e(s.t).getConnectionStatus()}))),_=()=>d?l?(window.location=l,Promise.resolve(l)):Promise.resolve():h({from:u,redirectUri:l}),z=t=>(t&&t.preventDefault(),y?_():m({registrationNonce:e,redirectUri:l}).then((()=>_())));return(0,r.useEffect)((()=>{n.ZP.setApiRoot(t),n.ZP.setApiNonce(a)}),[t,a]),(0,r.useEffect)((()=>{!o||v||f||z()}),[]),{handleRegisterSite:z,handleConnectUser:_,refreshConnectedPlugins:p,isRegistered:y,isUserConnected:b,siteIsRegistering:v,userIsConnecting:f,registrationError:g,userConnectionData:w,hasConnectedOwner:C,connectedPlugins:k,connectionErrors:E,isOfflineMode:j}}},7711:(e,t,a)=>{"use strict";function n(){switch("undefined"!=typeof window&&window?.JP_CONNECTION_INITIAL_STATE?.calypsoEnv){case"development":return"http://calypso.localhost:3000/";case"wpcalypso":return"https://wpcalypso.wordpress.com/";case"horizon":return"https://horizon.wordpress.com/";default:return"https://wordpress.com/"}}a.d(t,{Z:()=>n})},3329:(e,t,a)=>{"use strict";a.d(t,{Z:()=>s,h:()=>i});var n=a(6186),c=a(1294),r=a(1045);function s(){const{connectionErrors:e}=(0,c.Z)({}),t=Object.values(e).shift(),a=t&&Object.values(t).length&&Object.values(t).shift().error_message;return{hasConnectionError:Boolean(a),connectionErrorMessage:a}}const i=()=>{const{hasConnectionError:e,connectionErrorMessage:t}=s(),{restoreConnection:a,isRestoringConnection:c,restoreConnectionError:i}=(0,r.Z)();return e?React.createElement(n.Z,{isRestoringConnection:c,restoreConnectionError:i,restoreConnectionCallback:a,message:t}):null}},8258:(e,t,a)=>{"use strict";a.d(t,{Z:()=>f});var n=a(4743),c=a(7711),r=a(9818),s=a(951),i=a.n(s),l=a(9196),o=a(1294),u=a(428);const d=i()("jetpack:connection:useProductCheckoutWorkflow"),{registrationNonce:m,apiRoot:h,apiNonce:p,siteSuffix:g}=window?.JP_CONNECTION_INITIAL_STATE?window.JP_CONNECTION_INITIAL_STATE:{},v="undefined"!=typeof window?window?.myJetpackInitialState?.adminUrl:null;function f({productSlug:e,redirectUrl:t,siteSuffix:a=g,adminUrl:s=v,connectAfterCheckout:i=!1,siteProductAvailabilityHandler:f=null,quantity:w=null,from:k,useBlogIdSuffix:E=!1}={}){d("productSlug is %s",e),d("redirectUrl is %s",t),d("siteSuffix is %s",a),d("from is %s",k);const[y,b]=(0,l.useState)(!1),{registerSite:C}=(0,r.useDispatch)(u.t),j=(0,r.useSelect)((e=>e(u.t).getBlogId()),[u.t]);d("blogID is %s",j??"undefined"),E=E&&!!j;const{isUserConnected:_,isRegistered:z,handleConnectUser:N}=(0,o.Z)({redirectUri:t,from:k}),x=(0,l.useMemo)((()=>{const n=(0,c.Z)(),r=(!z||!_)&&i,l=r?"checkout/jetpack/":`checkout/${E?j.toString():a}/`,o=new URL(`${n}${l}${e}${null!=w?`:-q-${w}`:""}`);return r?(o.searchParams.set("connect_after_checkout",!0),o.searchParams.set("admin_url",s),o.searchParams.set("from_site_slug",a)):o.searchParams.set("site",a),o.searchParams.set("source",k),o.searchParams.set("redirect_to",t),_||o.searchParams.set("unlinked","1"),o}),[z,_,i,a,w,e,k,t,s,E,j]);d("isRegistered is %s",z),d("isUserConnected is %s",_),d("connectAfterCheckout is %s",i),d("checkoutUrl is %s",x);const Z=(e=null)=>Promise.resolve(f&&f()).then((t=>{if(e&&x.searchParams.set("redirect_to",e),t)return d("handleAfterRegistration: Site has a product associated"),N();d("handleAfterRegistration: Site does not have a product associated. Redirecting to checkout %s",x),window.location.href=x}));return(0,l.useEffect)((()=>{n.ZP.setApiRoot(h),n.ZP.setApiNonce(p)}),[]),{run:(e,a=null)=>(e&&e.preventDefault(),b(!0),i?((e=null)=>{e&&x.searchParams.set("redirect_to",e),d("Redirecting to connectAfterCheckout flow: %s",x),window.location.href=x})(a):z?Z(a):void C({registrationNonce:m,redirectUri:t}).then(Z)),isRegistered:z,hasCheckoutStarted:y}}},1045:(e,t,a)=>{"use strict";a.d(t,{Z:()=>o});var n=a(4743),c=a(9818),r=a(9196),s=a(428);const{apiRoot:i,apiNonce:l}=window?.JP_CONNECTION_INITIAL_STATE?window.JP_CONNECTION_INITIAL_STATE:{};function o(){const[e,t]=(0,r.useState)(!1),[a,o]=(0,r.useState)(null),{disconnectUserSuccess:u,setConnectionErrors:d}=(0,c.useDispatch)(s.t);return(0,r.useEffect)((()=>{n.ZP.setApiRoot(i),n.ZP.setApiNonce(l)}),[]),{restoreConnection:(e=!0)=>(t(!0),o(null),n.ZP.reconnect().then((t=>("in_progress"===t.status?(u(),d({}),e&&(window.location.href="/wp-admin/admin.php?page=my-jetpack#/connection")):window.location.reload(),t))).catch((e=>{throw o(e),t(!1),e}))),isRestoringConnection:e,restoreConnectionError:a}}},7523:(e,t,a)=>{"use strict";a.d(t,{LI:()=>r,N4:()=>i,Qo:()=>d,T1:()=>o,TS:()=>u,ZP:()=>b,b5:()=>h,i6:()=>c,qJ:()=>p,qV:()=>l,r7:()=>s,wQ:()=>m});var n=a(4743);const c="SET_CONNECTION_STATUS",r="SET_CONNECTION_STATUS_IS_FETCHING",s="SET_SITE_IS_REGISTERING",i="SET_USER_IS_CONNECTING",l="SET_REGISTRATION_ERROR",o="CLEAR_REGISTRATION_ERROR",u="SET_AUTHORIZATION_URL",d="DISCONNECT_USER_SUCCESS",m="SET_CONNECTED_PLUGINS",h="SET_CONNECTION_ERRORS",p="SET_IS_OFFLINE_MODE",g=e=>({type:c,connectionStatus:e}),v=e=>({type:s,isRegistering:e}),f=e=>({type:i,isConnecting:e}),w=e=>({type:l,registrationError:e}),k=()=>({type:o}),E=e=>({type:u,authorizationUrl:e}),y=e=>({type:m,connectedPlugins:e});const b={setConnectionStatus:g,setConnectionStatusIsFetching:e=>({type:r,isFetching:e}),fetchConnectionStatus:()=>({type:"FETCH_CONNECTION_STATUS"}),fetchAuthorizationUrl:e=>({type:"FETCH_AUTHORIZATION_URL",redirectUri:e}),setSiteIsRegistering:v,setUserIsConnecting:f,setRegistrationError:w,clearRegistrationError:k,setAuthorizationUrl:E,registerSite:function*({registrationNonce:e,redirectUri:t}){yield k(),yield v(!0);try{const a=yield{type:"REGISTER_SITE",registrationNonce:e,redirectUri:t};return yield g({isRegistered:!0}),yield E(a.authorizeUrl),yield v(!1),Promise.resolve(a)}catch(e){return yield w(e),yield v(!1),Promise.reject(e)}},connectUser:function*({from:e,redirectFunc:t,redirectUri:a}={}){yield f(!0),yield{type:"CONNECT_USER",from:e,redirectFunc:t,redirectUri:a}},disconnectUserSuccess:()=>({type:d}),setConnectedPlugins:y,refreshConnectedPlugins:()=>async({dispatch:e})=>await new Promise((t=>n.ZP.fetchConnectedPlugins().then((a=>{e(y(a)),t(a)})))),setConnectionErrors:e=>({type:h,connectionErrors:e}),setIsOfflineMode:e=>({type:p,isOfflineMode:e})}},1432:(e,t,a)=>{"use strict";a.d(t,{Z:()=>s});var n=a(4743),c=a(9818),r=a(7057);const s={FETCH_AUTHORIZATION_URL:({redirectUri:e})=>n.ZP.fetchAuthorizationUrl(e),REGISTER_SITE:({registrationNonce:e,redirectUri:t})=>n.ZP.registerSite(e,t),CONNECT_USER:(0,c.createRegistryControl)((({resolveSelect:e})=>({from:t,redirectFunc:a,redirectUri:n}={})=>new Promise(((c,s)=>{e(r.Z).getAuthorizationUrl(n).then((e=>{const n=a||(e=>window.location.assign(e)),r=new URL(e);t&&r.searchParams.set("from",encodeURIComponent(t));const s=r.toString();n(s),c(s)})).catch((e=>{s(e)}))}))))}},1479:(e,t,a)=>{"use strict";a.d(t,{Z:()=>r});var n=a(9818),c=a(7523);const r=(0,n.combineReducers)({connectionStatus:(e={},t)=>{switch(t.type){case c.i6:return{...e,...t.connectionStatus};case c.Qo:return{...e,isUserConnected:!1}}return e},connectionStatusIsFetching:(e=!1,t)=>t.type===c.LI?t.isFetching:e,siteIsRegistering:(e=!1,t)=>t.type===c.r7?t.isRegistering:e,userIsConnecting:(e=!1,t)=>t.type===c.N4?t.isConnecting:e,registrationError:(e,t)=>{switch(t.type){case c.T1:return!1;case c.qV:return t.registrationError;default:return e}},authorizationUrl:(e,t)=>t.type===c.TS?t.authorizationUrl:e,userConnectionData:(e,t)=>(t.type,e),connectedPlugins:(e={},t)=>t.type===c.wQ?t.connectedPlugins:e,connectionErrors:(e={},t)=>t.type===c.b5?t.connectionErrors:e,isOfflineMode:(e=!1,t)=>t.type===c.qJ?t.isConnecting:e})},7728:(e,t,a)=>{"use strict";a.d(t,{Z:()=>s});var n=a(9818),c=a(7523),r=a(7057);const s={...{getAuthorizationUrl:{isFulfilled:(e,...t)=>{const a=Boolean(e.authorizationUrl),c=(0,n.select)(r.Z).hasFinishedResolution("getAuthorizationUrl",t);return a&&!c&&(0,n.dispatch)(r.Z).finishResolution("getAuthorizationUrl",t),a},*fulfill(e){const t=yield c.ZP.fetchAuthorizationUrl(e);yield c.ZP.setAuthorizationUrl(t.authorizeUrl)}}}}},2725:(e,t,a)=>{"use strict";a.d(t,{Z:()=>n});const n={...{getConnectionStatus:e=>e.connectionStatus||{},getConnectionStatusIsFetching:()=>!1,getSiteIsRegistering:e=>e.siteIsRegistering||!1,getUserIsConnecting:e=>e.userIsConnecting||!1,getRegistrationError:e=>e.registrationError||!1,getAuthorizationUrl:e=>e.authorizationUrl||!1,getUserConnectionData:e=>e.userConnectionData||!1,getConnectedPlugins:e=>e.connectedPlugins||[],getConnectionErrors:e=>e.connectionErrors||[],getIsOfflineMode:e=>e.isOfflineMode||!1,getWpcomUser:e=>e?.userConnectionData?.currentUser?.wpcomUser,getBlogId:e=>e?.userConnectionData?.currentUser?.blogId}}},3535:(e,t,a)=>{"use strict";a.d(t,{Z:()=>r});var n=a(9818);class c{static store=null;static mayBeInit(e,t){null===c.store&&(c.store=(0,n.createReduxStore)(e,t),(0,n.register)(c.store))}}const r=c},7057:(e,t,a)=>{"use strict";a.d(t,{Z:()=>n});const n="jetpack-connection"},428:(e,t,a)=>{"use strict";a.d(t,{t:()=>o.Z});var n=a(7523),c=a(1432),r=a(1479),s=a(7728),i=a(2725),l=a(3535),o=a(7057);const u=window.JP_CONNECTION_INITIAL_STATE;u||console.error("Jetpack Connection package: Initial state is missing. Check documentation to see how to use the Connection composer package to set up the initial state."),l.Z.mayBeInit(o.Z,{__experimentalUseThunks:!0,reducer:r.Z,actions:n.ZP,selectors:i.Z,resolvers:s.Z,controls:c.Z,initialState:u||{}})},8728:(e,t,a)=>{"use strict";a.d(t,{Z:()=>w});var n=a(6975),c=a(8868),r=a(5033),s=a(5609),i=a(9307),l=a(5736),o=a(1074),u=a(797),d=a(3059),m=a.n(d),h=a(9196),p=a.n(h);const __=l.__,g=e=>{const{className:t,disabled:a,onChange:n,value:c}=e;return p().createElement(s.TextControl,{className:t,label:__("License key","jetpack-my-jetpack"),value:c,onChange:n,disabled:a})},v=e=>{const{className:t,availableLicenses:a,disabled:n,onChange:c,value:r}=e,[i,o]=(0,h.useState)(""),u=null===a,d=(0,h.useMemo)((()=>u?[{label:__("Fetching available licenses…","jetpack-my-jetpack"),value:""}]:[...a.map((({product:e,license_key:t})=>({label:(0,l.sprintf)(/* translators: placeholder is the product name and license key */ -__("%1$s - %2$s","jetpack-my-jetpack"),e,t),value:t}))),{label:__("I want to add a license key manually","jetpack-my-jetpack"),value:""}]),[a,u]);(0,h.useEffect)((()=>{o(d?.length?d[0].value:"")}),[d]);const m=(0,h.useCallback)((e=>{o(e),c(e)}),[c]);return p().createElement(p().Fragment,null,p().createElement(s.SelectControl,{className:t,disabled:n,label:__("Select a license key","jetpack-my-jetpack"),value:i,options:d,onChange:m}),!u&&!i&&p().createElement(s.TextControl,{className:t,label:__("Input a license key","jetpack-my-jetpack"),value:r,onChange:c,disabled:n}))},f=e=>{const{activateLicense:t,availableLicenses:a,fetchingAvailableLicenses:l,isActivating:d,license:m,licenseError:f,onLicenseChange:w}=e,k=null!=f;(0,h.useEffect)((()=>{n.Z.tracks.recordEvent("jetpack_wpa_license_key_activation_view")}),[]);const E=k?"jp-license-activation-screen-controls--license-field-with-error":"jp-license-activation-screen-controls--license-field",y=a&&a.length;return p().createElement("div",{className:"jp-license-activation-screen-controls"},p().createElement("div",{className:"jp-license-activation-screen-controls--content"},p().createElement(c.Z,{showText:!1,height:48}),p().createElement("h1",null,__("Add a license key","jetpack-my-jetpack")),p().createElement("p",null,(0,i.createInterpolateElement)(__("Check your email for your license key. You should have received it after making your purchase.","jetpack-my-jetpack"),{strong:p().createElement("strong",null)})),l||y?p().createElement(v,{className:E,disabled:l||d,onChange:w,availableLicenses:l?null:a,value:m}):p().createElement(g,{className:E,disabled:d,onChange:w,value:m}),k&&p().createElement("div",{className:"jp-license-activation-screen-controls--license-field-error"},p().createElement(o.Z,{icon:u.Z}),p().createElement("span",null,f))),p().createElement("div",null,p().createElement(s.Button,{className:"jp-license-activation-screen-controls--button",onClick:t,disabled:!m},d?p().createElement(r.Z,null):__("Activate","jetpack-my-jetpack"))))};f.propTypes={activateLicense:m().func.isRequired,availableLicenses:m().array,fetchingAvailableLicenses:m().bool,isActivating:m().bool.isRequired,license:m().string.isRequired,licenseError:m().string,onLicenseChange:m().func.isRequired,siteUrl:m().string.isRequired};const w=f},8781:(e,t,a)=>{"use strict";a.d(t,{Z:()=>d});var n=a(6895),c=a(9307),r=a(5736),s=a(3059),i=a.n(s),l=a(9196),o=a.n(l);const __=r.__,u=e=>{const{imageUrl:t,showSupportLink:a=!1}=e;return o().createElement("div",{className:"jp-license-activation-screen-illustration"},o().createElement("div",{className:"jp-license-activation-screen-illustration--wrapper"},o().createElement("img",{className:"jp-license-activation-screen-illustration--img",src:t,alt:""})),a&&o().createElement("p",{className:"jp-license-activation-screen-illustration--support-link"},(0,c.createInterpolateElement)(__("Do you need help? Contact us.","jetpack-my-jetpack"),{a:o().createElement("a",{href:(0,n.Z)("jetpack-support-license-activation")})})))};u.propTypes={imageUrl:i().string.isRequired,showSupportLink:i().bool};const d=u},7554:(e,t,a)=>{"use strict";a.d(t,{Z:()=>m});var n=a(8868),c=a(3059),r=a.n(c),s=a(9196),i=a.n(s),l=a(3157),o=a(8288),u=a(4172);const d=e=>{const{productId:t,siteRawUrl:a,siteAdminUrl:c,currentRecommendationsStep:r}=e;return i().createElement("div",{className:"jp-license-activation-screen-success-info"},i().createElement("div",{className:"jp-license-activation-screen-success-info--content"},i().createElement(n.Z,{showText:!1,height:48})),i().createElement(o.Z,{siteRawUrl:a,productId:t}),i().createElement("div",{className:"jp-license-activation-screen-success-info--buttons"},i().createElement(l.c,{currentRecommendationsStep:r,siteAdminUrl:c,siteRawUrl:a,productId:t}),i().createElement(u.o,{siteRawUrl:a,productId:t})))};d.propTypes={siteRawUrl:r().string,productId:r().number,siteAdminUrl:r().string,currentRecommendationsStep:r().string};const m=d},3157:(e,t,a)=>{"use strict";a.d(t,{c:()=>d});var n=a(6895),c=a(5609),r=a(5736),s=a(3059),i=a.n(s),l=a(9196),o=a.n(l),u=a(9430);const __=r.__,d=e=>{const{currentRecommendationsStep:t,siteAdminUrl:a,siteRawUrl:r,productId:s}=e,i=(0,u.F)(s);return"jetpack_social_advanced"===i&&((0,u.T)("jetpack/jetpack.php")||(0,u.T)("jetpack/jetpack-social.php"))?o().createElement(c.Button,{className:"jp-license-activation-screen-success-info--button",href:a+((0,u.T)("jetpack/jetpack.php")?"admin.php?page=jetpack#/recommendations/welcome-social-advanced":"admin.php?page=jetpack-social")},__("Configure my site","jetpack-my-jetpack")):"jetpack_social_basic"===i&&((0,u.T)("jetpack/jetpack.php")||(0,u.T)("jetpack/jetpack-social.php"))?o().createElement(c.Button,{className:"jp-license-activation-screen-success-info--button",href:a+((0,u.T)("jetpack/jetpack.php")?"admin.php?page=jetpack#/recommendations/welcome-social-basic":"admin.php?page=jetpack-social")},__("Configure my site","jetpack-my-jetpack")):"not-started"===t?o().createElement(c.Button,{className:"jp-license-activation-screen-success-info--button",href:a+"admin.php?page=jetpack#/recommendations"},__("Configure my site","jetpack-my-jetpack")):o().createElement(c.Button,{className:"jp-license-activation-screen-success-info--button",href:(0,n.Z)("license-activation-view-my-plans",{site:r})},__("View my plans","jetpack-my-jetpack"))};d.propTypes={siteAdminUrl:i().string.isRequired,currentRecommendationsStep:i().string,siteRawUrl:i().string.isRequired}},4172:(e,t,a)=>{"use strict";a.d(t,{o:()=>d});var n=a(6895),c=a(5609),r=a(5736),s=a(3059),i=a.n(s),l=a(9196),o=a.n(l),u=a(9430);const __=r.__,d=e=>{const{productId:t,siteRawUrl:a}=e,r={jetpack_backup:{text:__("View latest backup","jetpack-my-jetpack"),redirectSource:"jetpack-license-activation-success-backup"},jetpack_complete:{text:__("View latest backup","jetpack-my-jetpack"),redirectSource:"jetpack-license-activation-success-backup"},jetpack_scan:{text:__("View scan results","jetpack-my-jetpack"),redirectSource:"jetpack-license-activation-success-scan"},jetpack_search:{text:__("Configure search","jetpack-my-jetpack"),redirectSource:"jetpack-license-activation-success-search"},jetpack_security:{text:__("View latest backup","jetpack-my-jetpack"),redirectSource:"jetpack-license-activation-success-backup"},default:null}[(0,u.F)(t)];return o().createElement(o().Fragment,null,r&&o().createElement(c.ExternalLink,{className:"jp-license-activation-screen-success-info--external-link",href:(0,n.Z)(r.redirectSource,{site:a})},r.text))};d.propTypes={siteRawUrl:i().string,productId:i().number}},468:(e,t,a)=>{"use strict";a.d(t,{Z:()=>w});var n=a(6975),c=a(4743),r=a(9307),s=a(5736),i=a(3059),l=a.n(i),o=a(9196),u=a.n(o),d=a(8728),m=a(8781),h=a(7554),p=a(9644),g=a(8702),v=a(1160);const __=s.__,f=e=>{const{availableLicenses:t=[],currentRecommendationsStep:a,fetchingAvailableLicenses:s=!1,onActivationSuccess:i=(()=>null),siteAdminUrl:l,siteRawUrl:f,startingLicense:w,displayName:k=""}=e,[E,y]=(0,o.useState)(w??""),[b,C]=(0,o.useState)(null),[j,_]=(0,o.useState)(!1),[z,N]=(0,o.useState)(null);(0,o.useEffect)((()=>{t&&t[0]&&y(t[0].license_key)}),[t]);const x=(0,o.useCallback)((()=>j?Promise.resolve():E.length<1?(C(__("This is not a valid license key. Please try again.","jetpack-my-jetpack")),Promise.resolve()):(C(null),_(!0),n.Z.tracks.recordJetpackClick({target:"license_activation_button"}),c.ZP.attachLicenses([E]).then((e=>{const t=(e=>{let t=e;for(;Array.isArray(t)&&t.length>0;)t=t[0];if(t?.activatedProductId)return t.activatedProductId;if(t?.errors)for(const e in t.errors)if(t.errors[e].length>0)throw new Error(t.errors[e][0]);throw new Error(__("An unknown error occurred during license activation. Please try again.","jetpack-my-jetpack"))})(e);N(t),i(t),n.Z.tracks.recordEvent("jetpack_wpa_license_activation_success")})).catch((e=>{n.Z.tracks.recordEvent("jetpack_wpa_license_activation_error");"invalid_permission_manage_user_licenses"===e.response?.code?C((0,r.createInterpolateElement)(__("You either do not have permissions to perform this action or a user account needs to be connected. Click here to connect your user account or contact your administrator.","jetpack-my-jetpack"),{connectLink:u().createElement("a",{href:"admin.php?page=my-jetpack#/connection?returnTo=add-license"})})):C(e.message)})).finally((()=>{_(!1)})))),[j,E,i]);return null!==z&&E.startsWith("jetpack-golden-token")?u().createElement(p.Z,{tokenRedeemed:!0,displayName:k}):null!==z?u().createElement("div",{className:"jp-license-activation-screen"},u().createElement(h.Z,{siteRawUrl:f,productId:z,siteAdminUrl:l,currentRecommendationsStep:a}),u().createElement(m.Z,{imageUrl:v,showSupportLink:!1})):u().createElement("div",{className:"jp-license-activation-screen"},u().createElement(d.Z,{availableLicenses:t,activateLicense:x,fetchingAvailableLicenses:s,isActivating:j,license:E,licenseError:b,onLicenseChange:y,siteUrl:f}),u().createElement(m.Z,{imageUrl:g,showSupportLink:!0}))};f.propTypes={availableLicenses:l().array,currentRecommendationsStep:l().string,fetchingAvailableLicenses:l().bool,onActivationSuccess:l().func,siteAdminUrl:l().string.isRequired,siteRawUrl:l().string.isRequired,startingLicense:l().string,displayName:l().string};const w=f},9644:(e,t,a)=>{"use strict";a.d(t,{Z:()=>w});var n=a(3396),c=a(3363),r=a(3846),s=a(8868),i=a(526),l=a(5609),o=a(5736),u=a(5235),d=a.n(u),m=a(3059),h=a.n(m),p=a(9196),g=a.n(p),v=a(1008);const __=o.__,_x=o._x;function f({redeemClick:e,displayName:t,onModalClose:a,tokenRedeemed:u}){const[m,h]=(0,p.useState)(!1),f=(0,p.useRef)(null);(0,p.useEffect)((()=>{setTimeout((()=>{f?.current?.play()}),500)}),[f]);const w=(0,n.VS)("scan"),k=(0,n.VS)("backup"),E=(0,p.useCallback)((t=>{e?.(t),h(!0),f.current.play()}),[f,e]),y=(0,p.useCallback)((()=>{m&&f.current.play()}),[m]),b=d()(v.Z.modal,{[v.Z.animating]:m});return g().createElement("div",null,g().createElement(l.Modal,{className:b,onRequestClose:a,isDismissible:!1,__experimentalHideHeader:!0},g().createElement(c.Z,{horizontalSpacing:3,horizontalGap:3},g().createElement(r.Z,null,g().createElement(s.Z,{className:v.Z["jetpack-logo"]}),g().createElement("div",{className:v.Z["video-wrap"],onClick:y,role:"presentation"},g().createElement("video",{ref:f,src:"https://videos.files.wordpress.com/oSlNIBQO/jetpack-golden-token.mp4",muted:"muted"})),g().createElement("div",{className:v.Z["content-wrap"]},g().createElement("div",{className:v.Z["content-wrap-text"]},t.length>0&&g().createElement("p",{className:v.Z["hi-user"]},(0,o.sprintf)(/* Translators: %s is the user's display name. */ -__("Hey, %s","jetpack-my-jetpack"),t)),g().createElement("h2",{className:v.Z.headline},__("You have been gifted a Jetpack Golden Token.","jetpack-my-jetpack")),g().createElement("p",null,u&&__("This unlocked a lifetime of Jetpack powers for your website. Your exclusive Jetpack Experience is already active.","jetpack-my-jetpack"),!u&&__("This unlocks a lifetime of Jetpack powers for your website. Your exclusive Jetpack Experience awaits.","jetpack-my-jetpack"))),g().createElement(i.Z,{variant:"primary",weight:"regular",onClick:E,className:v.Z.button},u&&__("Awesome!","jetpack-my-jetpack"),!u&&__("Redeem your token","jetpack-my-jetpack"))),g().createElement("div",{className:`${v.Z["powers-wrap"]} ${v.Z["content-wrap"]}`},g().createElement("div",{className:v.Z["content-wrap-text"]},g().createElement("h2",{className:v.Z.headline},__("Super powers are ready!","jetpack-my-jetpack")),g().createElement("p",{className:v.Z.paragraph},__("Your Jetpack Golden Token provides a lifetime license for this website and includes the following products:","jetpack-my-jetpack"))),g().createElement("div",{className:v.Z["jetpack-products"]},g().createElement("div",null,g().createElement(k,null),g().createElement("h3",null,__("VaultPress Backup","jetpack-my-jetpack")),g().createElement("p",null,__("Save every change and get back online quickly with one‑click restores.","jetpack-my-jetpack"))),g().createElement("div",null,g().createElement(w,null),g().createElement("h3",null,_x("Scan","Plugin name (noun).","jetpack-my-jetpack")),g().createElement("p",null,__("Automated scanning and one‑click fixes to keep your site ahead of security threats.","jetpack-my-jetpack")))),g().createElement(i.Z,{variant:"primary",weight:"regular",onClick:E,href:window?.myJetpackInitialState?.myJetpackUrl,className:v.Z.button},__("Explore your new powers","jetpack-my-jetpack")))))))}f.defaultProps={tokenRedeemed:!1,onModalClose:e=>{document.referrer.includes(window.location.host)?(e.preventDefault(),history.back()):(e.preventDefault(),window.location.href=window?.myJetpackInitialState?.myJetpackUrl)}},f.propTypes={redeemClick:h().func,tokenRedeemed:h().bool,displayName:h().string,onModalClose:h().func};const w=f},3281:(e,t,a)=>{"use strict";a.d(t,{H:()=>c.Z,I:()=>n.Z});var n=a(468),c=a(9644)},1899:(e,t,a)=>{"use strict";a.d(t,{Z:()=>g});var n=a(9105),c=a(3363),r=a(3846),s=a(1294),i=a(3281),l=a(9196),o=a.n(l),u=a(5544),d=a(6178),m=a(1838),h=a(4848),p=a(5626);function g(){const{recordEvent:e}=(0,h.Z)(),{data:t=[],isLoading:a}=(0,d.Z)({name:u.nF,queryFn:async e=>(await e.getUserLicenses())?.items}),{userConnectionData:g}=(0,s.Z)(),[v,f]=(0,l.useState)(!1),w=g?.currentUser?.wpcomUser?.display_name||g?.currentUser?.wpcomUser?.login||g?.currentUser?.username,k=(0,l.useCallback)((()=>{e("jetpack_myjetpack_license_activation_back_link_click")}),[e]),E=(0,l.useCallback)((()=>{f(!0)}),[]),y=(0,l.useMemo)((()=>t.filter((({attached_at:e,revoked_at:t})=>null===e&&null===t))),[t]),{siteSuffix:b="",adminUrl:C=""}=(0,m.$9)();return o().createElement(n.Z,{showHeader:!1,showBackground:!1},o().createElement(c.Z,{horizontalSpacing:3,horizontalGap:3},o().createElement(r.Z,null,o().createElement(p.Z,{onClick:k,reload:v})),o().createElement(r.Z,null,o().createElement(i.I,{currentRecommendationsStep:null,availableLicenses:y,fetchingAvailableLicenses:a,onActivationSuccess:E,siteAdminUrl:C,siteRawUrl:b,displayName:w}))))}},1062:(e,t,a)=>{"use strict";a.d(t,{U:()=>d,Z:()=>h});var n=a(5106),c=a(5235),r=a.n(c),s=a(5844),i=a.n(s),l=a(9196),o=a.n(l),u=a(5893);const d=e=>{const{children:t,className:a}=e,n=r()(u.Z.container,a);return o().createElement("div",{className:n},t)},m=e=>{const{title:t,headerRightContent:a,className:c,children:r}=e;return o().createElement(d,{className:c},o().createElement("div",{className:u.Z.title},o().createElement("div",{className:u.Z.name},o().createElement(n.ZP,{variant:"title-medium"},t)),a),r)};m.propTypes={children:i().node,title:i().string.isRequired,className:i().string,headerRightContent:i().node};const h=m},3890:(e,t,a)=>{"use strict";a.d(t,{Z:()=>d});var n=a(1074),c=a(9517),r=a(5235),s=a.n(r),i=a(9196),l=a.n(i),o=a(9997),u=a(6234);const d=({className:e,accessibleName:t})=>l().createElement(o.rU,{to:"/",className:s()(u.Z.link,e),"aria-label":t||null},l().createElement(n.Z,{icon:c.Z,className:u.Z.icon}))},5745:(e,t,a)=>{"use strict";a.d(t,{Z:()=>g});var n=a(5106),c=a(1294),r=a(5844),s=a.n(r),i=a(9196),l=a(8209),o=a(7363),u=a(5595),d=a(4598),m=a(7555),h=a(2728);const p=({admin:e,slug:t,children:a,isDataLoading:r,Description:s=null,additionalActions:p=null,secondaryAction:g=null,upgradeInInterstitial:v=!1,primaryActionOverride:f})=>{const{isRegistered:w,isUserConnected:k}=(0,c.Z)(),{install:E,isPending:y}=(0,u.Z)(t),{activate:b,isPending:C}=(0,o.Z)(t),{detail:j}=(0,d.Z)(t),{name:_,description:z,requiresUserConnection:N,status:x}=j,Z=(0,m.Z)(l.xB.Connection),R=(0,i.useCallback)((()=>{w&&k||!N?b():Z()}),[b,w,k,N,Z]);return React.createElement(h.ZP,{name:_,Description:s||(()=>{const e=z.replace(/\s(?=[^\s]*$)/," ");return React.createElement(n.ZP,{variant:"body-small",style:{flexGrow:1}},e)}),status:x,admin:e,isFetching:C||y,isDataLoading:r,isInstallingStandalone:y,additionalActions:p,primaryActionOverride:f,secondaryAction:g,slug:t,onActivate:R,onInstallStandalone:E,onActivateStandalone:E,upgradeInInterstitial:v},a)};p.propTypes={children:s().node,admin:s().bool.isRequired,slug:s().string.isRequired,isDataLoading:s().bool,additionalActions:s().array,primaryActionOverride:s().object,secondaryAction:s().object};const g=p},17:(e,t,a)=>{"use strict";a.d(t,{Z:()=>j});var n=a(9105),c=a(3363),r=a(3846),s=a(6895),i=a(9312),l=a(5609),o=a(5736),u=a(1074),d=a(5381),m=a(9196),h=a.n(m),p=a(9997),g=a(5162),v=a(3890),f=a(5242),w=a(6790),k=a(184),E=a(8578),y=a(4403);const __=o.__,b=()=>h().createElement(h().Fragment,null,h().createElement("div",{className:E.Z["account-description"]},__("You can use your existing account on any of these services:","jetpack-my-jetpack")),h().createElement("ul",{className:E.Z["account-images"],role:"list"},h().createElement("li",null,h().createElement("img",{src:y,className:E.Z.wordpress,alt:"WordPress.com"})),h().createElement("li",null,h().createElement("img",{src:k,className:E.Z.google,alt:"Google"})),h().createElement("li",null,h().createElement("img",{src:f,className:E.Z.apple,alt:"Apple"})))),C=()=>{const[e]=(0,p.lr)(),t=e.get("returnTo");return t?`admin.php?page=my-jetpack#/${t}`:"admin.php?page=my-jetpack"},j=()=>{const{apiRoot:e,apiNonce:t,registrationNonce:a}=(0,g.Z)(),o=C();return h().createElement(n.Z,{showHeader:!1,showBackground:!1},h().createElement(c.Z,{horizontalSpacing:8,horizontalGap:0},h().createElement(r.Z,{className:E.Z["relative-col"]},h().createElement(v.Z,{className:E.Z["close-link"],accessibleName:__("Go back to previous screen","jetpack-my-jetpack")})),h().createElement(r.Z,null,h().createElement(i.Z,{title:__("Unlock all the amazing features of Jetpack by connecting now","jetpack-my-jetpack"),buttonLabel:__("Connect your user account","jetpack-my-jetpack"),loadingLabel:__("Connecting your account…","jetpack-my-jetpack"),apiRoot:e,apiNonce:t,registrationNonce:a,images:[w],footer:h().createElement(b,null),from:"my-jetpack",redirectUri:o},h().createElement("ul",{role:"list"},h().createElement("li",null,__("Receive instant downtime alerts","jetpack-my-jetpack")),h().createElement("li",null,__("Automatically share your content on social media","jetpack-my-jetpack")),h().createElement("li",null,__("Let your subscribers know when you post","jetpack-my-jetpack")),h().createElement("li",null,__("Receive notifications about new likes and comments","jetpack-my-jetpack")),h().createElement("li",null,__("Let visitors share your content on social media","jetpack-my-jetpack")),h().createElement("li",null,__("And more!","jetpack-my-jetpack")," ",h().createElement("a",{href:(0,s.Z)("jetpack-features"),target:"_blank",className:E.Z["all-features"],rel:"noreferrer"},__("See all Jetpack features","jetpack-my-jetpack"),h().createElement(u.Z,{icon:d.Z}),h().createElement(l.VisuallyHidden,{as:"span"},/* translators: accessibility text */ -__("(opens in a new tab)","jetpack-my-jetpack")))))))))}},247:(e,t,a)=>{"use strict";a.d(t,{Z:()=>N});var n=a(5106),c=a(526),r=a(6895),s=a(1294),i=a(428),l=a(8137),o=a(9818),u=a(5736),d=a(1074),m=a(496),h=a(9201),p=a(5235),g=a.n(p),v=a(5844),f=a.n(v),w=a(9196),k=a.n(w),E=a(4848),y=a(5050),b=a(3815),C=a(9182),j=a(6322);const __=u.__,_=({text:e,actionText:t,onClick:a,status:r})=>k().createElement("div",{className:j.Z["list-item"]},k().createElement(n.ZP,{className:g()(j.Z["list-item-text"],{[j.Z.error]:"error"===r})},k().createElement(d.Z,{icon:"error"===r?m.Z:h.Z,className:g()({[j.Z.info]:"error"===r})}),e),t&&k().createElement(c.Z,{variant:"link",weight:"regular",onClick:a},t)),z=e=>{const{apiRoot:t,apiNonce:a,redirectUri:d,title:m,connectionInfoText:h,onDisconnected:p,connectedPlugins:v,connectedSiteId:f,context:z,onConnectUser:N}=e,{isRegistered:x,isUserConnected:Z,userConnectionData:R}=(0,s.Z)({apiRoot:t,apiNonce:a,redirectUri:d}),{recordEvent:M}=(0,E.Z)(),[S,L]=(0,w.useState)(!1),{setConnectionStatus:P,setUserIsConnecting:V}=(0,o.useDispatch)(i.t),H=N||V,A=R.currentUser?.wpcomUser?.avatar,B=(0,w.useMemo)((()=>({isUserConnected:Z,isRegistered:x})),[Z,x]),O=(0,w.useCallback)((e=>t=>{t&&t.preventDefault(),M("jetpack_myjetpack_connection_manage_dialog_click",{...B,connectionType:e}),L(!0)}),[M,L,B]),I=O("user"),T=O("site"),U=(0,w.useCallback)((e=>{e&&e.preventDefault(),L(!1)}),[L]),D=(0,w.useCallback)((e=>{e&&e.preventDefault(),P({isActive:!1,isRegistered:!1,isUserConnected:!1}),p?.()}),[p,P]),F=(0,w.useCallback)((()=>{M("jetpack_myjetpack_connection_learnmore_link_click",B)}),[M,B]),q=(0,w.useCallback)((e=>{e&&e.preventDefault(),M("jetpack_myjetpack_connection_connect_user_click",B),H()}),[H,M,B]);return k().createElement("div",{className:j.Z["connection-status-card"]},k().createElement(n.H3,null,m),k().createElement(n.ZP,{variant:"body",mb:3},`${h} `,k().createElement(c.Z,{href:(0,r.Z)("why-the-wordpress-com-connection-is-important-for-jetpack"),variant:"link",weight:"regular",isExternalLink:!0,onClick:F},__("Learn more about connections","jetpack-my-jetpack"))),k().createElement("div",{className:j.Z.status},k().createElement("img",{src:y,alt:"",className:j.Z.cloud}),k().createElement("div",{className:g()(j.Z.line,{[j.Z.disconnected]:!x||!Z})}),k().createElement("div",{className:j.Z["avatar-wrapper"]},k().createElement("img",{src:C,alt:"",className:j.Z.jetpack}),k().createElement("img",{src:Z&&A?A:b,alt:"",className:j.Z.avatar}))),k().createElement("div",null,x?k().createElement(k().Fragment,null,k().createElement(_,{onClick:T,text:__("Site connected.","jetpack-my-jetpack"),actionText:Z&&R.currentUser?.isMaster?__("Manage","jetpack-my-jetpack"):null}),Z&&k().createElement(_,{onClick:I,actionText:__("Manage","jetpack-my-jetpack"),text:(0,u.sprintf)(/* translators: first placeholder is user name, second is either the (Owner) string or an empty string */ -__("Connected as %1$s%2$s.","jetpack-my-jetpack"),R.currentUser?.wpcomUser?.display_name,R.currentUser?.isMaster?__(" (Owner)","jetpack-my-jetpack"):"")}),Z&&R?.connectionOwner&&!R.currentUser?.isMaster&&k().createElement(_,{text:(0,u.sprintf)(/* translators: placeholder is the username of the Jetpack connection owner */ -__("Also connected: %s (Owner).","jetpack-my-jetpack"),R.connectionOwner)}),!Z&&k().createElement(_,{onClick:q,text:__("User account not connected.","jetpack-my-jetpack"),actionText:__("Connect","jetpack-my-jetpack"),status:"error"})):k().createElement(_,{onClick:q,text:__("Jetpack is not connected.","jetpack-my-jetpack"),actionText:__("Connect","jetpack-my-jetpack"),status:"error"})),k().createElement(l.Z,{apiRoot:t,apiNonce:a,onDisconnected:D,connectedPlugins:v,connectedSiteId:f,connectedUser:R,isOpen:S,onClose:U,context:z}))};z.propTypes={apiRoot:f().string.isRequired,apiNonce:f().string.isRequired,redirectUri:f().string,connectedPlugins:f().array,connectedSiteId:f().number,title:f().string,connectionInfoText:f().string,onDisconnected:f().func,context:f().string,onConnectUser:f().func,requiresUserConnection:f().bool},z.defaultProps={title:__("Connection","jetpack-my-jetpack"),connectionInfoText:__("Jetpack connects your site and user account to the WordPress.com cloud to provide more powerful features.","jetpack-my-jetpack"),redirectUri:null,onConnectUser:null,requiresUserConnection:!0};const N=z},5784:(e,t,a)=>{"use strict";a.d(t,{Z:()=>o});var n=a(8209),c=a(4598),r=a(1950),s=a(5162),i=a(7555),l=a(247);function o(){const{apiRoot:e,apiNonce:t,topJetpackMenuItemUrl:a,connectedPlugins:o}=(0,s.Z)(),u=(0,i.Z)(n.xB.Connection),d=(0,c.B)(),m=(0,r.Z)(d);return React.createElement(l.Z,{apiRoot:e,apiNonce:t,redirectUri:a,onConnectUser:u,connectedPlugins:o,requiresUserConnection:m.length>0,onDisconnected:()=>document?.location?.reload(!0)})}},5626:(e,t,a)=>{"use strict";a.d(t,{Z:()=>d});var n=a(5736),c=a(1074),r=a(3259),s=a(9196),i=a.n(s),l=a(9997),o=a(197);const __=n.__;function u({onClick:e,reload:t}){const a=t?"/?reload=true":"/";return i().createElement(l.rU,{to:a,className:o.Z.link,onClick:e},i().createElement(c.Z,{icon:r.Z,className:o.Z.icon}),__("Go back","jetpack-my-jetpack"))}u.defaultProps={onClick:()=>{}};const d=u},8607:(e,t,a)=>{"use strict";a.d(t,{r:()=>m});var n=a(526),c=a(3396),r=a(5609),s=a(9771),i=a(5736),l=a(5235),o=a.n(l),u=a(9196),d=a(4416);a(1854);const __=i.__;function m({productName:e,giftedDate:t}){const[a,l]=(0,u.useState)(!1),m=(0,u.useCallback)((()=>l(!0)),[l]),h={position:"top center",placement:"top",animate:!0,noArrow:!1,resize:!1,flip:!1,offset:6,focusOnMount:"container",onClose:(0,u.useCallback)((()=>l(!1)),[l]),className:d.Z.container},p=o()(d.Z.wrapper,"golden-token-icon-tooltip");return React.createElement("div",{className:p},React.createElement(n.Z,{variant:"link",onClick:m},React.createElement(c._1,{className:d.Z.logo})),React.createElement("div",{className:d.Z.helper},a&&React.createElement(r.Popover,h,React.createElement("div",null,React.createElement("div",{className:d.Z.title},e),React.createElement("div",{className:d.Z.content},(0,i.sprintf)( -// translators: %1$s is a product name, %2$s is the date the product was gifted. -__("%1$s was gifted on %2$s. It gives you access to a lifetime subscription of Jetpack VaultPress Backup and Jetpack Scan.","jetpack-my-jetpack"),e,(0,s.dateI18n)("F j, Y",t)))))))}},4159:(e,t,a)=>{"use strict";a.d(t,{Z:()=>i});var n=a(5609),c=a(9196),r=a.n(c),s=a(73);const i=function(){const[e,t]=(0,c.useState)(!0),a=(0,c.useCallback)((()=>t(!1)),[]);if(!e)return null;if(!window.hasOwnProperty("JP_IDENTITY_CRISIS__INITIAL_STATE"))return null;const{containerID:i,isSafeModeConfirmed:l}=window.JP_IDENTITY_CRISIS__INITIAL_STATE;return!i||l?null:r().createElement(n.Modal,{onRequestClose:a,overlayClassName:s.Z.modal},r().createElement("div",{id:i,className:s.Z.container}))}},642:(e,t,a)=>{"use strict";a.d(t,{Z:()=>u});var n=a(6895),c=a(4706),r=a(5736),s=a(9196),i=a.n(s),l=a(4848),o=a(4730);const __=r.__,u=e=>{const{isAgencyAccount:t}=e,{recordEvent:a}=(0,l.Z)();(0,s.useEffect)((()=>{a("jetpack_myjetpack_manage_banner_view",{})}),[a]);const r=(0,s.useCallback)((e=>{a("jetpack_myjetpack_manage_banner_click",{target:e,feature:"manage"})}),[a]),u=(0,s.useCallback)((()=>{r("jp-manage-learn-more")}),[r]),d=(0,s.useCallback)((()=>{r("jp-manage-dashboard-sites")}),[r]),m=(0,s.useCallback)((()=>{r("jp-manage-sign-up")}),[r]);let h,p,g;return t?(h=__("Manage sites","jetpack-my-jetpack"),p=(0,n.Z)("my-jetpack-jetpack-manage-dashboard"),g=d):(h=__("Sign up for free","jetpack-my-jetpack"),p=(0,n.Z)("my-jetpack-jetpack-manage-sign-up"),g=m),i().createElement(c.Z,{icon:o,title:__("Jetpack Manage","jetpack-my-jetpack"),description:__("Jetpack Manage has the tools you need to manage multiple WordPress sites. Monitor site security, performance, and traffic, and get alerted if a site needs attention. Plus, get bulk discounts.","jetpack-my-jetpack"),secondaryCtaLabel:__("Learn more","jetpack-my-jetpack"),secondaryCtaURL:(0,n.Z)("my-jetpack-jetpack-manage-learn-more"),secondaryCtaIsExternalLink:!0,secondaryCtaOnClick:u,primaryCtaLabel:h,primaryCtaURL:p,primaryCtaIsExternalLink:!0,primaryCtaOnClick:g})}},8966:(e,t,a)=>{"use strict";a.d(t,{Z:()=>A});var n=a(2674),c=a.n(n),r=a(2054),s=a(9105),i=a(216),l=a(3363),o=a(3846),u=a(5106),d=a(6579),m=a(4164),h=a(3329),p=a(5609),g=a(5736),v=a(496),f=a(5235),w=a.n(f),k=a(9196),E=a(8437),y=a(5544),b=a(4598),C=a(7108),j=a(1838),_=a(4848),z=a(3290),N=a(5784),x=a(4159),Z=a(642),R=a(6800),M=a(2307),S=a(5943),L=a(9593),P=a(3851),V=a(1017);const __=g.__,H=({message:e,options:t})=>{const[a]=(0,r.Z)(["md"],[">"]),n={error:React.createElement(p.SVG,{className:V.Z.nofill,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},React.createElement(p.Path,{d:"M11.7815 4.93772C11.8767 4.76626 12.1233 4.76626 12.2185 4.93772L20.519 19.8786C20.6116 20.0452 20.4911 20.25 20.3005 20.25H3.69951C3.50889 20.25 3.3884 20.0452 3.48098 19.8786L11.7815 4.93772Z",stroke:"#D63638",strokeWidth:"1.5"}),React.createElement(p.Path,{d:"M13 10H11V15H13V10Z",fill:"#D63638"}),React.createElement(p.Path,{d:"M13 16H11V18H13V16Z",fill:"#D63638"})),info:v.Z};return React.createElement(p.Notice,c()({isDismissible:!1},t,{className:V.Z.notice+(a?" "+V.Z["bigger-than-medium"]:"")}),React.createElement("div",{className:V.Z.message},n?.[t.status]&&React.createElement(p.Icon,{icon:n[t.status]}),e))};function A(){(0,z.Z)();const{hasBeenDismissed:e=!1}=(0,j.$9)("welcomeBanner"),{showFullJetpackStatsCard:t=!1}=(0,j.$9)("myJetpackFlags"),{jetpackManage:a={},adminUrl:n}=(0,j.$9)(),{currentNotice:c}=(0,k.useContext)(E.T),{message:r,options:p}=c||{},{hasConnectionError:g}=(0,h.Z)(),{data:v,isLoading:f}=(0,C.Z)({name:y.gb,query:{path:y.Hq}}),{detail:A}=(0,b.Z)("stats"),{data:B,isLoading:O}=(0,C.Z)({name:y.kl,query:{path:y.xD}}),I=v?.is_available,T=B?.user?.jwt,U=!O&&!f&&I&&T,D="1"===(0,j.$9)("userIsNewToJetpack"),{recordEvent:F}=(0,_.Z)(),[q,J]=(0,k.useState)(!1);return(0,k.useEffect)((()=>{F("jetpack_myjetpack_page_view")}),[F]),window.location.hash.includes("?reload=true")&&(window.history.replaceState(null,"",window.location.href.replace("?reload=true","")),window.location.reload(),J(!0)),q?null:React.createElement(s.Z,{siteAdminUrl:n},React.createElement(x.Z,null),React.createElement(i.Z,null,!D&&React.createElement(l.Z,{horizontalSpacing:0},React.createElement(o.Z,null,React.createElement("div",{id:"jp-admin-notices",className:"my-jetpack-jitm-card"}))),React.createElement(P.Z,null),React.createElement(l.Z,{horizontalSpacing:5,horizontalGap:r?3:6},React.createElement(o.Z,{sm:4,md:8,lg:12},React.createElement(u.ZP,{variant:"headline-small"},__("Discover all Jetpack Products","jetpack-my-jetpack"))),g&&(e||!D)&&React.createElement(o.Z,null,React.createElement(h.h,null)),r&&(e||!D)&&React.createElement(o.Z,null,React.createElement(H,{message:r,options:p})),t&&React.createElement(o.Z,{className:w()({[V.Z.stats]:A?.status!==M.N.ERROR})},React.createElement(L.Z,null)),React.createElement(o.Z,null,React.createElement(S.Z,null)),a.isEnabled&&React.createElement(o.Z,null,React.createElement(Z.Z,{isAgencyAccount:a.isAgencyAccount})))),React.createElement(d.Z,null,React.createElement(l.Z,{horizontalSpacing:8},React.createElement(o.Z,{sm:4,md:4,lg:6},React.createElement(R.Z,null)),React.createElement(o.Z,{sm:4,md:4,lg:6},React.createElement(N.Z,null)))),U&&React.createElement(m.Z,{jwt_token:T}))}},6800:(e,t,a)=>{"use strict";a.d(t,{Z:()=>C});var n=a(5106),c=a(526),r=a(5736),s=a(9196),i=a(8209),l=a(5544),o=a(7108),u=a(1838),d=a(4848),m=a(5162),h=a(7555),p=a(6864),g=a(7356),v=a(7111),f=a(8607),w=a(6891);const __=r.__,_n=r._n;function k({purchase:e={}}){const{product_name:t}=e;return React.createElement(React.Fragment,null,React.createElement(n.Dx,null,t),React.createElement(E,e))}function E(e){const{expiry_message:t,product_name:a,subscribed_date:c}=e;return(0,v.h)(e)?React.createElement(n.ZP,{variant:"body",className:w.Z["expire-date"]},React.createElement("span",{className:w.Z["expire-date--with-icon"]},__("Never Expires","jetpack-my-jetpack")),React.createElement(f.r,{productName:a,giftedDate:c})):React.createElement(n.ZP,{variant:"body",className:w.Z["expire-date"]},t)}function y({numberOfPurchases:e=0}){return React.createElement(React.Fragment,null,React.createElement(n.H3,null,_n("Your plan","Your plans",e,"jetpack-my-jetpack")),0===e&&React.createElement(n.ZP,{variant:"body"},__("Want to power up your Jetpack?","jetpack-my-jetpack")))}function b({numberOfPurchases:e}){const{recordEvent:t}=(0,d.Z)(),{isUserConnected:a}=(0,m.Z)();let n=__("Purchase a plan","jetpack-my-jetpack");e>=1&&(n=_n("Manage your plan","Manage your plans",e,"jetpack-my-jetpack"));const r=(0,s.useCallback)((()=>{t(e?"jetpack_myjetpack_plans_manage_click":"jetpack_myjetpack_plans_purchase_click")}),[e,t]),l=(0,h.Z)(i.xB.Connection),o=(0,s.useCallback)((()=>{t("jetpack_myjetpack_activate_license_click"),a||l()}),[l,a,t]);let v=__("Activate a license","jetpack-my-jetpack");a||(v=__("Activate a license (requires a user connection)","jetpack-my-jetpack"));const{loadAddLicenseScreen:f="",adminUrl:k=""}=(0,u.$9)();return React.createElement("ul",null,React.createElement("li",{className:w.Z["actions-list-item"]},React.createElement(c.Z,{onClick:r,href:e?(0,p.Z)():(0,g.Z)(),weight:"regular",variant:"link",isExternalLink:!0},n)),f&&React.createElement("li",{className:w.Z["actions-list-item"]},React.createElement(c.Z,{onClick:o,href:a?`${k}admin.php?page=my-jetpack#/add-license`:void 0,variant:"link",weight:"regular"},v)))}function C(){const e=!!(0,u.$9)("userIsAdmin"),{data:t,isLoading:a,isError:n}=(0,o.Z)({name:l.h3,query:{path:l.LQ}}),c=t&&!a&&!n,r=c?t.length:0;return React.createElement("div",{className:w.Z.container},React.createElement(y,{numberOfPurchases:r}),React.createElement("div",{className:w.Z.purchasesSection},c&&t.map((e=>React.createElement(k,{key:`purchase-${e.product_name}`,purchase:e})))),e&&React.createElement(b,{numberOfPurchases:r}))}},2307:(e,t,a)=>{"use strict";a.d(t,{N:()=>v,Z:()=>f});var n=a(2674),c=a.n(n),r=a(526),s=a(5736),i=a(1074),l=a(5381),o=a(9201),u=a(2229),d=a(5235),m=a.n(d),h=a(9196),p=a(4598),g=a(9720);const __=s.__,v={ACTIVE:"active",INACTIVE:"inactive",MODULE_DISABLED:"module_disabled",ERROR:"error",ABSENT:"plugin_absent",ABSENT_WITH_PLAN:"plugin_absent_with_plan",NEEDS_PURCHASE:"needs_purchase",NEEDS_PURCHASE_OR_FREE:"needs_purchase_or_free",CAN_UPGRADE:"can_upgrade"},f=({status:e,admin:t,name:a,slug:n,onActivate:d,additionalActions:f,primaryActionOverride:w,onManage:k,onFixConnection:E,isFetching:y,isInstallingStandalone:b,className:C,onAdd:j,onInstall:_,onLearnMore:z,upgradeInInterstitial:N})=>{const[x,Z]=(0,h.useState)(!1),[R,M]=(0,h.useState)({}),{detail:S}=(0,p.Z)(n),{manageUrl:L,purchaseUrl:P}=S,V=!L,H=y||b,A=f?.length>0,B=(0,h.useMemo)((()=>({variant:H?void 0:"primary",disabled:H,className:C})),[H,C]),O=(0,h.useCallback)((()=>{switch(e){case v.ABSENT:{const e=__("Learn more","jetpack-my-jetpack");return{...B,href:`#/add-${n}`,size:"small",variant:"primary",weight:"regular",label:e,onClick:z,...w&&v.ABSENT in w&&w[v.ABSENT]}}case v.ABSENT_WITH_PLAN:{const e=__("Install Plugin","jetpack-my-jetpack");return{...B,href:"",size:"small",variant:"primary",weight:"regular",label:e,onClick:_,...w&&v.ABSENT_WITH_PLAN in w&&w[v.ABSENT_WITH_PLAN]}}case v.NEEDS_PURCHASE:return{...B,href:P||`#/add-${n}`,size:"small",variant:"primary",weight:"regular",label:__("Learn more","jetpack-my-jetpack"),onClick:j,...w&&v.NEEDS_PURCHASE in w&&w[v.NEEDS_PURCHASE]};case v.CAN_UPGRADE:{const e=__("Upgrade","jetpack-my-jetpack"),t=__("Learn more","jetpack-my-jetpack"),a=P||N?e:t;return{...B,href:P||`#/add-${n}`,size:"small",variant:"primary",weight:"regular",label:a,onClick:j,...w&&v.CAN_UPGRADE in w&&w[v.CAN_UPGRADE]}}case v.NEEDS_PURCHASE_OR_FREE:return{...B,href:`#/add-${n}`,size:"small",variant:"primary",weight:"regular",label:__("Learn more","jetpack-my-jetpack"),onClick:j,...w&&v.NEEDS_PURCHASE_OR_FREE in w&&w[v.NEEDS_PURCHASE_OR_FREE]};case v.ACTIVE:{const e=__("View","jetpack-my-jetpack");return{...B,disabled:V||B?.disabled,href:L,size:"small",variant:"secondary",weight:"regular",label:e,onClick:k,...w&&v.ACTIVE in w&&w[v.ACTIVE]}}case v.ERROR:return{...B,href:"#/connection",size:"small",variant:"primary",weight:"regular",label:__("Fix connection","jetpack-my-jetpack"),onClick:E,...w&&v.ERROR in w&&w[v.ERROR]};case v.INACTIVE:case v.MODULE_DISABLED:return{...B,href:"",size:"small",variant:"secondary",weight:"regular",label:__("Activate","jetpack-my-jetpack"),onClick:d,...w&&v.INACTIVE in w&&w[v.INACTIVE]};default:return null}}),[e,B,n,j,E,d,_,z,P,N,V,L,k,w]),I=(0,h.useMemo)((()=>A?[...f,O()]:[O()]),[f,O,A]),T=(0,h.useCallback)((()=>{Z(!x)}),[x]);if((0,h.useEffect)((()=>{M(I[0])}),[I]),!t)return React.createElement(r.Z,c()({},B,{size:"small",variant:"link",weight:"regular"}),/* translators: placeholder is product name. */ /* translators: placeholder is product name. */ -(0,s.sprintf)(__("Learn about %s","jetpack-my-jetpack"),a));const U=A&&React.createElement("div",{className:g.Z["action-button-dropdown"]},React.createElement("ul",{className:g.Z["dropdown-menu"]},[...f,O()].map((({label:e,isExternalLink:t},a)=>React.createElement("li",{key:a},React.createElement("button",{onClick:()=>{M(I[a]),Z(!1)},className:g.Z["dropdown-item"]},React.createElement("div",{className:g.Z["dropdown-item-label"]},e,t&&React.createElement(i.Z,{icon:l.Z,size:16})),e===R.label&&React.createElement("div",{className:g.Z["active-action-checkmark"]},React.createElement(i.Z,{icon:o.Z,size:24,fill:"white"}))))))));return React.createElement(React.Fragment,null,React.createElement("div",{className:m()(g.Z["action-button"],A?g.Z["has-additional-actions"]:null)},React.createElement(r.Z,c()({},B,R),R.label),A&&React.createElement("button",{className:m()(g.Z["dropdown-chevron"],"primary"===R.variant?g.Z.primary:g.Z.secondary),onClick:T},React.createElement(i.Z,{icon:u.Z,size:24,fill:"primary"===R.variant?"white":"black"})),x&&U))}},2728:(e,t,a)=>{"use strict";a.d(t,{ZP:()=>y,bY:()=>w});var n=a(2674),c=a.n(n),r=a(526),s=a(5736),i=a(5235),l=a.n(i),o=a(5844),u=a.n(o),d=a(9196),m=a.n(d),h=a(4848),p=a(1062),g=a(2307),v=a(6086),f=a(9720);const __=s.__,w={[g.N.ACTIVE]:__("Active","jetpack-my-jetpack"),[g.N.INACTIVE]:__("Inactive","jetpack-my-jetpack"),[g.N.MODULE_DISABLED]:__("Module disabled","jetpack-my-jetpack"),[g.N.NEEDS_PURCHASE]:__("Inactive","jetpack-my-jetpack"),[g.N.NEEDS_PURCHASE_OR_FREE]:__("Inactive","jetpack-my-jetpack"),[g.N.ABSENT]:__("Inactive","jetpack-my-jetpack"),[g.N.ABSENT_WITH_PLAN]:__("Needs Plugin","jetpack-my-jetpack"),[g.N.ERROR]:__("Needs connection","jetpack-my-jetpack"),[g.N.CAN_UPGRADE]:__("Active","jetpack-my-jetpack")},k=e=>{const{shouldShowButton:t,positionFirst:a,...n}=e;return!!t()&&m().createElement(r.Z,n,n.label)};k.propTypes={href:u().string,size:u().oneOf(["normal","small"]),variant:u().oneOf(["primary","secondary","link","tertiary"]),weight:u().oneOf(["bold","regular"]),label:u().string,shouldShowButton:u().func,onClick:u().func,positionFirst:u().bool,isExternalLink:u().bool,icon:u().node,iconSize:u().number,disabled:u().bool,isLoading:u().bool,className:u().string},k.defaultProps={size:"small",variant:"secondary",weight:"regular",label:__("Learn more","jetpack-my-jetpack"),shouldShowButton:()=>!0,positionFirst:!1};const E=e=>{const{name:t,Description:a,status:n,onActivate:r,isFetching:s,isDataLoading:i,isInstallingStandalone:o,slug:u,additionalActions:w,primaryActionOverride:E,secondaryAction:y,children:b,onInstallStandalone:C,onActivateStandalone:j}=e,_=n===g.N.ERROR,z=n===g.N.ABSENT||n===g.N.ABSENT_WITH_PLAN,N=n===g.N.NEEDS_PURCHASE||n===g.N.NEEDS_PURCHASE_OR_FREE,x=l()({[f.Z.plugin_absent]:z,[f.Z["is-purchase-required"]]:N,[f.Z["is-link"]]:z,[f.Z["has-error"]]:_}),{recordEvent:Z}=(0,h.Z)(),R=(0,d.useCallback)((e=>{e.preventDefault(),Z("jetpack_myjetpack_product_card_activate_click",{product:u}),r()}),[u,r,Z]),M=(0,d.useCallback)((()=>{Z("jetpack_myjetpack_product_card_add_click",{product:u})}),[u,Z]),S=(0,d.useCallback)((()=>{Z("jetpack_myjetpack_product_card_manage_click",{product:u})}),[u,Z]),L=(0,d.useCallback)((()=>{Z("jetpack_myjetpack_product_card_fixconnection_click",{product:u})}),[u,Z]),P=(0,d.useCallback)((()=>{Z("jetpack_myjetpack_product_card_learnmore_click",{product:u})}),[u,Z]),V=(0,d.useCallback)((e=>{e.preventDefault(),Z("jetpack_myjetpack_product_card_install_standalone_plugin_click",{product:u}),C()}),[u,C,Z]);(0,d.useCallback)((e=>{e.preventDefault(),Z("jetpack_myjetpack_product_card_activate_standalone_plugin_click",{product:u}),j()}),[u,j,Z]);return m().createElement(p.Z,{title:t,className:l()(f.Z.container,x),headerRightContent:null},m().createElement(a,null),i?m().createElement("span",{className:f.Z.loading},__("Loading…","jetpack-my-jetpack")):b,m().createElement("div",{className:f.Z.actions},m().createElement("div",{className:f.Z.buttons},y&&y?.positionFirst&&m().createElement(k,y),m().createElement(g.Z,c()({},e,{onActivate:R,onFixConnection:L,onManage:S,onAdd:M,onInstall:V,onLearnMore:P,className:f.Z.button,additionalActions:w,primaryActionOverride:E})),y&&!y?.positionFirst&&m().createElement(k,y)),m().createElement(v.Z,{status:n,isFetching:s,isInstallingStandalone:o})))};E.propTypes={children:u().node,name:u().string.isRequired,Description:u().func.isRequired,admin:u().bool.isRequired,isFetching:u().bool,isInstallingStandalone:u().bool,isManageDisabled:u().bool,onActivate:u().func,slug:u().string.isRequired,additionalActions:u().array,primaryActionOverride:u().object,secondaryAction:u().object,onInstallStandalone:u().func,onActivateStandalone:u().func,status:u().oneOf([g.N.ACTIVE,g.N.INACTIVE,g.N.ERROR,g.N.ABSENT,g.N.ABSENT_WITH_PLAN,g.N.NEEDS_PURCHASE,g.N.NEEDS_PURCHASE_OR_FREE,g.N.CAN_UPGRADE]).isRequired},E.defaultProps={isFetching:!1,isInstallingStandalone:!1,onActivate:()=>{}};const y=E},6086:(e,t,a)=>{"use strict";a.d(t,{Z:()=>o});var n=a(5106),c=a(5235),r=a.n(c),s=a(2307),i=a(9720),l=a(2728);const o=({status:e,isFetching:t,isInstallingStandalone:a})=>{const c=l.bY[e],o=r()(i.Z.status,(e=>{switch(e){case s.N.ACTIVE:case s.N.CAN_UPGRADE:return i.Z.active;case s.N.ABSENT_WITH_PLAN:return i.Z.warning;case s.N.INACTIVE:case s.N.NEEDS_PURCHASE:case s.N.NEEDS_PURCHASE_OR_FREE:case s.N.ERROR:default:return i.Z.inactive}})(e),{[i.Z["is-fetching"]]:t||a});return React.createElement(n.ZP,{variant:"label",className:o},c)}},8777:(e,t,a)=>{"use strict";a.d(t,{Z:()=>o});var n=a(5844),c=a.n(n),r=a(9196),s=a.n(r),i=a(5745);const l=({admin:e})=>s().createElement(i.Z,{admin:e,slug:"jetpack-ai",upgradeInInterstitial:!0});l.propTypes={admin:c().bool.isRequired};const o=l},1640:(e,t,a)=>{"use strict";a.d(t,{Z:()=>o});var n=a(5844),c=a.n(n),r=a(9196),s=a.n(r),i=a(5745);const l=({admin:e})=>s().createElement(i.Z,{admin:e,slug:"anti-spam"});l.propTypes={admin:c().bool.isRequired};const o=l},7427:(e,t,a)=>{"use strict";a.d(t,{Z:()=>_});var n=a(6895),c=a(5106),r=a(2947),s=a(5609),i=a(5736),l=a(5235),o=a.n(l),u=a(3079),d=a(5844),m=a.n(d),h=a(9196),p=a(5544),g=a(4598),v=a(7108),f=a(1838),w=a(4848),k=a(5745),E=a(2307),y=a(8840);const __=i.__,_n=i._n,b=({admin:e})=>{const t="backup",{detail:a}=(0,g.Z)(t),{status:n}=a;return n===E.N.ACTIVE||n===E.N.CAN_UPGRADE?React.createElement(C,{admin:e,slug:t}):React.createElement(j,{admin:e,slug:t})},C=({admin:e,slug:t})=>{const{data:a,isLoading:r}=(0,v.Z)({name:p.Kf,query:{path:p._H}}),s=a?.last_rewindable_event,l=s?.published,o=a?.undo_backup_id,{recordEvent:d}=(0,w.Z)(),{siteSuffix:m=""}=(0,f.$9)(),h={href:(0,n.Z)("jetpack-backup-undo-cta",{path:o,site:m}),size:"small",variant:"primary",weight:"regular",label:__("Undo","jetpack-my-jetpack"),onClick:()=>{d("jetpack_myjetpack_backup_card_undo_click",{product:t,undo_backup_id:o})},isExternalLink:!0};return React.createElement(k.Z,{admin:e,slug:t,showMenu:!0,isDataLoading:r,Description:s?()=>React.createElement(c.ZP,{variant:"body-small",className:y.Z.description},React.createElement("span",null,__("Activity Detected","jetpack-my-jetpack")),React.createElement("span",{className:y.Z.time},(e=>{if(!e)return"";const t=new Date-new Date(e);if(t>0){const e=Math.floor(t/864e5),a=Math.floor(t%864e5/36e5),n=Math.floor(t%36e5/6e4),c=Math.floor(t%6e4/1e3);return e>0?(0,i.sprintf)( -// translators: %s is the number of days since the last backup -_n("%s day ago","%s days ago",e,"jetpack-my-jetpack"),e):a>0?(0,i.sprintf)( -// translators: %s is the number of hours since the last backup -_n("%s hour ago","%s hours ago",a,"jetpack-my-jetpack"),a):n>0?(0,i.sprintf)( -// translators: %s is the number of minutes since the last backup -_n("%s minute ago","%s minutes ago",n,"jetpack-my-jetpack"),n):(0,i.sprintf)( -// translators: %s is the number of seconds since the last backup -_n("%s second ago","%s seconds ago",c,"jetpack-my-jetpack"),c)}})(l))):null,additionalActions:s?[h]:[]},s?React.createElement("div",{className:y.Z.activity},React.createElement(u.Z,{icon:s.gridicon,size:24}),React.createElement("p",{className:y.Z.summary},s.summary)):null)},j=({admin:e,slug:t})=>{const[a,n]=(0,h.useState)(3),{data:c,isLoading:l}=(0,v.Z)({name:p.RQ,query:{path:p.hd}}),d=(0,h.useMemo)((()=>{const e=[];return c?(Object.keys(c).forEach((t=>{0!==c[t]&&e.push([t,c[t]])})),e.sort(((e,t)=>e[1](window.onresize=()=>{window.innerWidth>=961&&window.innerWidth<=1070||window.innerWidth<290?n(2):n(3)},()=>{window.onresize=null})),[]);const m=d.length>a?d.length-a:0,g={maximumFractionDigits:1,notation:"compact"};return React.createElement(k.Z,{admin:e,slug:t,showMenu:!0,isDataLoading:l},React.createElement("div",{className:y.Z["no-backup-stats"]},React.createElement("ul",{className:y.Z["main-stats"],role:"list"},d.map(((e,t)=>{const n=e[0].split("_")[1],c=e[1];return React.createElement("li",{className:o()(y.Z["main-stat"],`main-stat-${t}`),key:t+n},React.createElement(React.Fragment,null,t{switch(e){case"post":return React.createElement(u.Z,{icon:"posts",size:24});case"page":return React.createElement(u.Z,{icon:"pages",size:24});default:return React.createElement(u.Z,{icon:e,size:24})}})(n),React.createElement("span",null,(0,r.Z)(c,g))),React.createElement(s.VisuallyHidden,null,({comment:e=>(0,i.sprintf)( -// translators: %d is the number of comments -_n("%d comment","%d comments",e,"jetpack-my-jetpack"),e),post:e=>(0,i.sprintf)( -// translators: %d is the number of posts -_n("%d post","%d posts",e,"jetpack-my-jetpack"),e),page:e=>(0,i.sprintf)( -// translators: %d is the number of pages -_n("%d page","%d pages",e,"jetpack-my-jetpack"),e),image:e=>(0,i.sprintf)( -// translators: %d is the number of images -_n("%d image","%d images",e,"jetpack-my-jetpack"),e),video:e=>(0,i.sprintf)( -// translators: %d is the number of videos -_n("%d video","%d videos",e,"jetpack-my-jetpack"),e),audio:e=>(0,i.sprintf)( -// translators: %d is the number of files -_n("%d audio file","%d audio files",e,"jetpack-my-jetpack"),e)}[l=n]||(e=>`${e} ${l}`))(c))));var l}))),m>0&&React.createElement("span",{className:y.Z["more-stats"],"aria-hidden":"true"}, -// translators: %s is the number of items that are not shown -// translators: %s is the number of items that are not shown -(0,i.sprintf)(__("+%s more","jetpack-my-jetpack"),m))))};b.propTypes={admin:m().bool.isRequired},j.propTypes={productData:m().object};const _=b},8489:(e,t,a)=>{"use strict";a.d(t,{Z:()=>g});var n=a(128),c=a(5033),r=a(4186),s=a(5609),i=a(4333),l=a(5736),o=a(9196),u=a.n(o),d=a(1838),m=a(4848),h=a(5162),p=a(9578);a(1200);const __=l.__,g=()=>{const{recordEvent:e}=(0,m.Z)(),[t,a]=(0,o.useState)(!1),[l,g]=(0,o.useState)(""),[v,f]=(0,o.useState)(0),[w,k]=(0,o.useState)(!1),[E,y]=(0,o.useState)(!1),b=(0,i.useViewportMatch)("medium","<"),{siteSuffix:C="",latestBoostSpeedScores:j}=(0,d.$9)(),{apiRoot:_,apiNonce:z,isSiteConnected:N}=(0,h.Z)(),x=(e,t)=>Math.round((e+t)/2),Z=e=>{f(x(e.scores.mobile,e.scores.desktop)),g((0,n.yn)(e.scores.mobile,e.scores.desktop))},R=(0,p.c)({speedLetterGrade:l}),M=(0,o.useCallback)((()=>{y(!0)}),[y]),S=(0,o.useCallback)((()=>{y(!1)}),[y]);return(0,o.useEffect)((()=>{j&&(0,n.Fr)(1e3*j.timestamp)<21?Z(j):(async()=>{if(N){a(!0);try{const e=await(0,n.tZ)(!0,_,C,z),t=(0,n.yn)(e.current.mobile,e.current.desktop);g(t),f(x(e.current.mobile,e.current.desktop)),a(!1)}catch(t){e("jetpack_boost_speed_score_error",{feature:"jetpack-boost",position:"my-jetpack",error:t}),j&&j.scores?Z(j):k(!0),a(!1)}}else k(!0)})()}),[]),!w&&u().createElement("div",{className:"mj-boost-speed-score"},t?u().createElement(c.Z,{color:"#23282d",size:16}):u().createElement(u().Fragment,null,u().createElement("div",{className:"mj-boost-speed-score__grade"},u().createElement("span",null,__("Your website’s overall speed score:","jetpack-my-jetpack")),u().createElement("span",{className:"mj-boost-speed-score__grade--letter"},u().createElement("button",{onMouseEnter:M,onFocus:M,onMouseLeave:S,onBlur:S},l,E&&u().createElement(s.Popover,{placement:b?"top-end":"right",noArrow:!1,offset:10},u().createElement("p",{className:"boost-score-tooltip__heading"},__("Site speed performance:","jetpack-my-jetpack")," ",l),u().createElement("p",{className:"boost-score-tooltip__content"},R))))),u().createElement("div",{className:"mj-boost-speed-score__bar"},u().createElement(r.Z,{score:v,active:v>0,isLoading:t,showPrevScores:!1,scoreBarType:"desktop",noBoostScoreTooltip:null}))))}},6631:(e,t,a)=>{"use strict";a.d(t,{Z:()=>o});var n=a(5736),c=a(9196),r=a.n(c),s=a(5745),i=a(2307),l=a(8489);const __=n.__,o=({admin:e})=>{const t={[i.N.ABSENT]:{label:__("Boost your site","jetpack-my-jetpack")}};return r().createElement(s.Z,{admin:e,slug:"boost",primaryActionOverride:t},r().createElement(l.Z,null))}},9578:(e,t,a)=>{"use strict";a.d(t,{c:()=>r});var n=a(5736),c=a(4598);const __=n.__,r=({speedLetterGrade:e})=>{const{detail:t}=(0,c.Z)("boost"),{isPluginActive:a,hasPaidPlanForProduct:n}=t;if(a){if(n)switch(e){case"A":return __("Your site is fast! Boost is working to enhance your performance with automated tools.","jetpack-my-jetpack");case"B":case"C":case"D":case"E":case"F":return __("Visit the Boost dashboard to view your historical speed scores and manage your product settings.","jetpack-my-jetpack");default:return __("Visit the Boost dashboard to view your site’s speed scores and manage your product settings.","jetpack-my-jetpack")}switch(e){case"A":return __("Your site is fast! But maintaining a high speed isn’t easy. Upgrade Boost to use automated CCS and image optimization tools to improve your performance on the go.","jetpack-my-jetpack");case"B":return __("You are one step away from making your site blazing fast. Upgrade Boost to use automated CCS and image optimization tools to improve your performance.","jetpack-my-jetpack");default:return __("Improve your performance with automated CSS and image optimization tools by upgrading Boost.","jetpack-my-jetpack")}}switch(e){case"A":return __("Your site is fast! But maintaining a high speed isn’t easy. Use Boost’s automated acceleration tools to optimize your performance on the go.","jetpack-my-jetpack");case"B":return __("You are one step away from making your site blazing fast. Install Boost to enhance your site’s performance like top websites, no developer needed.","jetpack-my-jetpack");default:return __("Your site needs performance improvements. Make your site blazing fast with Boost’s simple dashboard and acceleration tools.","jetpack-my-jetpack")}}},8112:(e,t,a)=>{"use strict";a.d(t,{G:()=>w,X:()=>f});var n=a(2947),c=a(5106),r=a(2636),s=a(5736),i=a(986),l=a(9404),o=a(1074),u=a(5235),d=a.n(u),m=a(5844),h=a.n(m),p=a(9196),g=a.n(p),v=a(523);const __=s.__,f=({change:e,changePercentage:t})=>{if(!Number.isFinite(e))return null;const a=e>0?i.Z:l.Z,r=(0,n.Z)(Math.abs(e),{notation:"compact",compactDisplay:"short"});return g().createElement("div",{className:d()(v.Z["contextual-percentage-change"],{[v.Z.neutral]:0===e,[v.Z.positive]:e>0,[v.Z.negative]:e<0})},!!e&&g().createElement(o.Z,{icon:a,size:14,className:v.Z["change-icon"]}),g().createElement(c.ZP,{className:v.Z["change-values"]},(0,s.sprintf)(/* translators: both placeholders are numbers */ -__("%1$s (%2$s%%)","jetpack-my-jetpack"),r,t)))};f.propTypes={change:h().number,changePercentage:h().number};const w=({description:e,value:t,context:a,loading:n})=>n?g().createElement("div",{className:v.Z["single-contextual-info-placeholder"]},g().createElement(r.Z,{height:24}),g().createElement(r.Z,{height:36})):g().createElement(g().Fragment,null,g().createElement(c.ZP,null,e),g().createElement("div",{className:v.Z["single-contextual-info"]},g().createElement(c.ZP,{className:v.Z["main-value"]},t),a));w.propTypes={description:h().string.isRequired,value:h().string,context:h().node,loading:h().bool}},9963:(e,t,a)=>{"use strict";a.d(t,{Z:()=>o});var n=a(5844),c=a.n(n),r=a(9196),s=a.n(r),i=a(5745);const l=({admin:e})=>s().createElement(i.Z,{admin:e,slug:"creator",upgradeInInterstitial:!0});l.propTypes={admin:c().bool.isRequired};const o=l},5996:(e,t,a)=>{"use strict";a.d(t,{Z:()=>o});var n=a(5844),c=a.n(n),r=a(9196),s=a.n(r),i=a(5745);const l=({admin:e})=>s().createElement(i.Z,{admin:e,slug:"crm"});l.propTypes={admin:c().bool.isRequired};const o=l},5943:(e,t,a)=>{"use strict";a.d(t,{Z:()=>E});var n=a(3363),c=a(3846),r=a(9196),s=a.n(r),i=a(1838),l=a(8777),o=a(1640),u=a(7427),d=a(6631),m=a(9963),h=a(5996),p=a(3232),g=a(687),v=a(419),f=a(6217),w=a(523),k=a(9894);const E=()=>{const{isAtomic:e=!1,userIsAdmin:t=!1}=(0,i.$9)(),{showFullJetpackStatsCard:a=!1}=(0,i.$9)("myJetpackFlags"),r={backups:u.Z,protect:p.Z,antispam:o.Z,boost:d.Z,search:g.Z,videopress:k.Z,stats:a?null:f.Z,crm:h.Z,creator:e?null:m.Z,social:v.Z,ai:l.Z};return s().createElement(n.Z,{className:w.Z.cardlist,tagName:"ul",fluid:!0,horizontalSpacing:0,horizontalGap:3},Object.entries(r).map((([e,a])=>a?s().createElement(c.Z,{tagName:"li",sm:4,md:4,lg:4,key:e},s().createElement(a,{admin:!!t})):null)))}},3232:(e,t,a)=>{"use strict";a.d(t,{Z:()=>o});var n=a(5844),c=a.n(n),r=a(9196),s=a.n(r),i=a(5745);const l=({admin:e})=>s().createElement(i.Z,{admin:e,slug:"protect"});l.propTypes={admin:c().bool.isRequired};const o=l},687:(e,t,a)=>{"use strict";a.d(t,{Z:()=>o});var n=a(5844),c=a.n(n),r=a(9196),s=a.n(r),i=a(5745);const l=({admin:e})=>s().createElement(i.Z,{admin:e,slug:"search",showMenu:!0});l.propTypes={admin:c().bool.isRequired};const o=l},419:(e,t,a)=>{"use strict";a.d(t,{Z:()=>o});var n=a(5844),c=a.n(n),r=a(9196),s=a.n(r),i=a(5745);const l=({admin:e})=>s().createElement(i.Z,{admin:e,slug:"social",showMenu:!0});l.propTypes={admin:c().bool.isRequired};const o=l},6217:(e,t,a)=>{"use strict";a.d(t,{Z:()=>o});var n=a(5844),c=a.n(n),r=a(9196),s=a.n(r),i=a(5745);const l=({admin:e})=>s().createElement(i.Z,{admin:e,slug:"stats",showMenu:!0});l.propTypes={admin:c().bool.isRequired};const o=l},9894:(e,t,a)=>{"use strict";a.d(t,{Z:()=>h});var n=a(2947),c=a(5736),r=a(5844),s=a.n(r),i=a(5544),l=a(7108),o=a(1838),u=a(5745),d=a(8112);const __=c.__,m=({admin:e})=>{const{videoPressStats:t=!1}=(0,o.$9)("myJetpackFlags"),{loading:a,hasError:c,change:r,currentFormatted:s,changePercentage:m}=(()=>{const{data:e,isLoading:t,isError:a}=(0,l.Z)({name:i.db,query:{path:i.n2}}),c=e?.data?.views??{},{previous:r=null,current:s=null}=c,o=null!==s?(0,n.Z)(s,{notation:"compact",compactDisplay:"short"}):null,u=null!==s&&null!==r?s-r:null;let d=null;return null!==u&&(d=0===u?0:0===r?100:Math.round(u/r*100)),{isLoading:t,isError:a,currentFormatted:o,change:u,changePercentage:d}})();if(!t||c)return React.createElement(u.Z,{admin:e,slug:"videopress",showMenu:!0});const h=__("Views, last 7 days","jetpack-my-jetpack");return React.createElement(u.Z,{admin:e,slug:"videopress",showMenu:!0},React.createElement(d.G,{loading:a,description:h,value:s,context:React.createElement(d.X,{change:r,changePercentage:m})}))};m.propTypes={admin:s().bool.isRequired};const h=m},2667:(e,t,a)=>{"use strict";a.d(t,{Z:()=>o});var n=a(5609),c=a(5844),r=a.n(c),s=a(9196),i=a.n(s);const l=({children:e,className:t,href:a,isLoading:c,onClick:r,isPrimary:s,disabled:l})=>i().createElement(n.Button,{onClick:r,className:t,href:a,variant:s?"primary":"secondary",disabled:c||l},c?i().createElement(n.Spinner,null):e);l.propTypes={className:r().string,isLoading:r().bool,isPrimary:r().bool,disabled:r().bool},l.defaultProps={isLoading:!1,isPrimary:!0,disabled:!1};const o=l},968:(e,t,a)=>{"use strict";a.d(t,{Z:()=>z});var n=a(8899),c=a(5106),r=a(3396),s=a(4972),i=a(7325),l=a(8258),o=a(5609),u=a(5736),d=a(1074),m=a(1908),h=a(9201),p=a(5235),g=a.n(p),v=a(9196),f=a.n(v),w=a(4598),k=a(1838),E=a(4848),y=a(199),b=a(2667),C=a(8429);const __=u.__;function j({value:e,currency:t,isOld:a}){if(!e||!t)return null;const r=(0,n.LR)(e,t),s=g()(C.Z.price,{[C.Z["is-old"]]:a});return f().createElement(c.ZP,{className:s,variant:"headline-medium",component:"p"},f().createElement(c.ZP,{component:"sup",variant:"title-medium"},r.symbol),r.integer,f().createElement(c.ZP,{component:"sup",variant:"title-medium"},r.fraction))}const _=({slug:e,onClick:t,trackButtonClick:a,className:n,preferProductName:p,supportingInfo:_,ctaButtonLabel:z=null,hideTOS:N=!1,quantity:x=null,highlightLastFeature:Z=!1,isFetching:R=!1})=>{const{fileSystemWriteAccess:M="no",siteSuffix:S="",adminUrl:L="",myJetpackCheckoutUri:P=""}=(0,k.$9)(),{detail:V}=(0,w.Z)(e),{name:H,title:A,longDescription:B,features:O,disclaimers:I,pricingForUi:T,isBundle:U,supportedProducts:D,hasRequiredPlan:F,status:q,pluginSlug:J,postCheckoutUrl:G}=V,W="plugin_absent"===q&&"no"===M,{isFree:Q,trialAvailable:K,fullPricePerMonth:$,currencyCode:Y,discountPricePerMonth:X,wpcomProductSlug:ee,wpcomFreeProductSlug:te,introductoryOffer:ae,productTerm:ne}=T,{recordEvent:ce}=(0,E.Z)(),re=!Q&&!F||null!=x,se=(0,y.a)(),ie=(0,v.useCallback)((()=>G||(se||P)),[G,se,P])(),{run:le,hasCheckoutStarted:oe}=(0,l.Z)({productSlug:ee,redirectUrl:ie,siteSuffix:S,adminUrl:L,connectAfterCheckout:!0,from:"my-jetpack",quantity:x,useBlogIdSuffix:!0}),{run:ue,hasCheckoutStarted:de}=(0,l.Z)({productSlug:te,redirectUrl:ie,siteSuffix:S,adminUrl:L,connectAfterCheckout:!0,from:"my-jetpack",quantity:x,useBlogIdSuffix:!0}),me=U?D.join("_plus_").split("_").map(((e,t)=>{if("plus"===e)return f().createElement(d.Z,{className:C.Z["plus-icon"],key:`icon-plugs${t}`,icon:m.Z,size:14});const a=(0,r.VS)(e);return f().createElement(a,{key:e,size:24})})):null;let he;he="month"===ae?.intervalUnit&&1===ae?.intervalCount?(0,u.sprintf)( -// translators: %s is the monthly price for a product -__("trial for the first month, then $%s /month, billed yearly","jetpack-my-jetpack"),$):"year"===ne?__("/month, paid yearly","jetpack-my-jetpack"):__("/month","jetpack-my-jetpack",0);const pe=(0,v.useCallback)((()=>{a(),t?.(le,V)}),[t,a,le,V]),ge=(0,v.useCallback)((()=>{a(!0,te,V),t?.(ue,V)}),[t,a,ue,te,V]),ve=(0,v.useCallback)((t=>{ce("jetpack_myjetpack_product_card_disclaimer_click",{id:t,product:e})}),[e,ce]);function fe({slug:e}){const t=(0,r.VS)(e);return t?f().createElement("div",{className:C.Z["product-icon"]},f().createElement(t,null)):null}const we=(!U||U&&!F)&&K,ke=H&&p?H:A,Ee=!U&&F?(0,u.sprintf)(/* translators: placeholder is product name. */ -__("Install %s","jetpack-my-jetpack"),ke):(0,u.sprintf)(/* translators: placeholder is product name. */ -__("Get %s","jetpack-my-jetpack"),ke),ye=z||Ee;return f().createElement("div",{className:g()(C.Z.card,n,{[C.Z["is-bundle-card"]]:U})},U&&f().createElement("div",{className:C.Z["card-header"]},f().createElement(r.r7,{className:C.Z["product-bundle-icon"],size:16}),f().createElement(c.ZP,{variant:"label"},__("Popular upgrade","jetpack-my-jetpack"))),f().createElement("div",{className:C.Z.container},U&&f().createElement("div",{className:C.Z["product-bundle-icons"]},me),f().createElement(fe,{slug:e}),f().createElement(c.H3,null,ke),f().createElement(c.ZP,{mb:3},B),f().createElement("ul",{className:g()(C.Z.features,{[C.Z["highlight-last-feature"]]:Z})},O.map(((e,t)=>f().createElement(c.ZP,{component:"li",key:`feature-${t}`,variant:"body"},f().createElement(d.Z,{icon:h.Z,size:24}),e)))),re&&X&&f().createElement(f().Fragment,null,f().createElement("div",{className:C.Z["price-container"]},f().createElement(j,{value:X,currency:Y,isOld:!1}),X<$&&f().createElement(j,{value:$,currency:Y,isOld:!0})),f().createElement(c.ZP,{className:C.Z["price-description"]},he)),Q&&f().createElement(c.H3,null,__("Free","jetpack-my-jetpack")),W&&f().createElement(s.Z,null,f().createElement(c.ZP,null,(0,u.sprintf)( -// translators: %s is the plugin name. -__("Due to your server settings, we can't automatically install the plugin for you. Please manually install the %s plugin.","jetpack-my-jetpack"),ke)," ",f().createElement(o.ExternalLink,{href:`https://wordpress.org/plugins/${J}`},__("Get plugin","jetpack-my-jetpack")))),!N&&f().createElement("div",{className:C.Z["tos-container"]},f().createElement(i.Z,{agreeButtonLabel:we?(0,u.sprintf)(/* translators: placeholder is cta label. */ -__("%s or Start for free","jetpack-my-jetpack"),ye):ye})),(!U||U&&!F)&&f().createElement(c.ZP,{component:b.Z,onClick:pe,isLoading:R||oe,disabled:W,isPrimary:!U,className:C.Z["checkout-button"],variant:"body"},ye),!U&&K&&!F&&f().createElement(c.ZP,{component:b.Z,onClick:ge,isLoading:R||de,disabled:W,isPrimary:!1,className:[C.Z["checkout-button"],C.Z["free-product-checkout-button"]],variant:"body"},__("Start for free","jetpack-my-jetpack")),I.length>0&&f().createElement("div",{className:C.Z.disclaimers},I.map(((e,t)=>{const{text:a,link_text:n=null,url:r=null}=e;return f().createElement(c.ZP,{key:`disclaimer-${t}`,component:"p",variant:"body-small"},`${a} `,r&&n&&f().createElement(o.ExternalLink,{onClick:()=>ve(t),href:r,target:"_blank",rel:"noopener noreferrer"},n))}))),U&&F&&f().createElement("div",{className:C.Z["product-has-required-plan"]},f().createElement(r.KM,{size:36}),f().createElement(c.ZP,null,__("Active on your site","jetpack-my-jetpack"))),_&&f().createElement(c.ZP,{className:C.Z["supporting-info"],variant:"body-extra-small"},_)))};_.defaultProps={trackButtonClick:()=>{}};const z=_},9144:(e,t,a)=>{"use strict";a.d(t,{Z:()=>w});var n=a(9608),c=a(5347),r=a(526),s=a(1342),i=a(5106),l=a(8258),o=a(5736),u=a(5844),d=a.n(u),m=a(9196),h=a(4598),p=a(1838),g=a(199);const __=o.__,v=({cantInstallPlugin:e,onProductButtonClick:t,detail:a,isFetching:s,tier:i,trackProductButtonClick:u})=>{const{siteSuffix:d="",myJetpackCheckoutUri:h=""}=(0,p.$9)(),{featuresByTier:v=[],pricingForUi:{tiers:f},title:w,postCheckoutUrl:k}=a,{callToAction:E,currencyCode:y,fullPrice:b,introductoryOffer:C,isFree:j,wpcomProductSlug:_,quantity:z=null}=f[i],N=(0,g.a)(),x=(0,m.useCallback)((()=>k||(N||h)),[k,N,h])(),{run:Z,hasCheckoutStarted:R}=(0,l.Z)({from:"my-jetpack",productSlug:_,redirectUrl:x,connectAfterCheckout:!0,siteSuffix:d,useBlogIdSuffix:!0,quantity:z}),M=(0,m.useCallback)((()=>{u(j),t?.(Z,a,i)}),[u,t,Z,a,i,j]),S=b?Math.round(b/12*100)/100:null,L=C?.costPerInterval?Math.round(C.costPerInterval/12*100)/100:null,P="month"===C?.intervalUnit&&1===C?.intervalCount,V=P?(0,o.sprintf)( -// translators: %s is the monthly price for a product -__("trial for the first month, then $%s /month, billed yearly","jetpack-my-jetpack"),S):__("/month, paid yearly","jetpack-my-jetpack",0),H=E||(j?__("Start for Free","jetpack-my-jetpack"):(0,o.sprintf)(/* translators: placeholder is product name. */ -__("Get %s","jetpack-my-jetpack"),w,0));return React.createElement(n.oK,{primary:!j},React.createElement(n.NE,null,j?React.createElement(c.Z,{price:0,legend:"",currency:"USD",hidePriceFraction:!0}):React.createElement(c.Z,{price:S,offPrice:L,legend:V,currency:y,hideDiscountLabel:P,hidePriceFraction:!0}),React.createElement(r.Z,{fullWidth:!0,variant:j?"secondary":"primary",onClick:M,isLoading:R||s,disabled:R||e||s},H)),v.map(((e,t)=>{const{included:a,description:c,struck_description:r,info:s}=e.tiers[i],l=r||c?React.createElement(React.Fragment,null,r?React.createElement(React.Fragment,null,React.createElement("del",null,r)," "):null,c?React.createElement("strong",null,c):null):null;return React.createElement(n.kF,{key:t,isIncluded:a,label:l,tooltipTitle:s?.title,tooltipInfo:s?.content?React.createElement("div",{dangerouslySetInnerHTML:{__html:s?.content}}):null,tooltipClassName:s?.class})})))};v.propTypes={cantInstallPlugin:d().bool.isRequired,onProductButtonClick:d().func.isRequired,detail:d().object.isRequired,tier:d().string.isRequired,trackProductButtonClick:d().func.isRequired};const f=({slug:e,onProductButtonClick:t,trackProductButtonClick:a,isFetching:c})=>{const{fileSystemWriteAccess:l="no"}=(0,p.$9)(),{detail:u}=(0,h.Z)(e),{description:d,featuresByTier:g=[],pluginSlug:f,status:w,tiers:k=[],title:E}=u,y="plugin_absent"===w&&"no"===l,b=y&&React.createElement(s.Z,{level:"error",hideCloseButton:!0,title:React.createElement(i.ZP,null,(0,o.sprintf)( -// translators: %s is the plugin name. -__("Due to your server settings, we can't automatically install the plugin for you. Please manually install the %s plugin.","jetpack-my-jetpack"),E)),actions:[React.createElement(r.Z,{variant:"secondary",href:`https://wordpress.org/plugins/${f}`,isExternalLink:!0},__("Get plugin","jetpack-my-jetpack"))]}),C=(0,m.useMemo)((()=>g.map((e=>({name:e?.name,tooltipTitle:e?.info?.title,tooltipInfo:e?.info?.content?React.createElement("div",{dangerouslySetInnerHTML:{__html:e?.info?.content}}):null})))),[g]);return React.createElement(React.Fragment,null,b,React.createElement(n.ZP,{title:d,items:C},k.map(((e,n)=>React.createElement(v,{key:n,tier:e,detail:u,isFetching:c,onProductButtonClick:t,trackProductButtonClick:a,primary:0===n,cantInstallPlugin:y})))))};f.propTypes={slug:d().string.isRequired,onProductButtonClick:d().func.isRequired,trackProductButtonClick:d().func.isRequired,isFetching:d().bool.isRequired};const w=f},8093:(e,t,a)=>{"use strict";a.d(t,{B$:()=>A,Jw:()=>F,Q5:()=>I,WJ:()=>V,Wf:()=>H,Yi:()=>B,ZP:()=>S,jO:()=>O,q:()=>L,qA:()=>P,r:()=>D,uw:()=>U,y$:()=>T});var n=a(9105),c=a(3363),r=a(3846),s=a(5106),i=a(526),l=a(9307),o=a(5736),u=a(5235),d=a.n(u),m=a(9196),h=a.n(m),p=a(8209),g=a(7363),v=a(4598),f=a(1838),w=a(4848),k=a(3629),E=a(7555),y=a(5626),b=a(968),C=a(9144),j=a(5610),_=a(4763),z=a(2605),N=a(720),x=a(1657),Z=a(7690),R=a(1287),M=a(1439);const __=o.__;function S({bundle:e,existingLicenseKeyUrl:t="admin.php?page=my-jetpack#/add-license",installsPlugin:a=!1,slug:o,supportingInfo:u,preferProductName:j=!1,children:_=null,imageContainerClassName:z="",ctaButtonLabel:N=null,hideTOS:x=!1,quantity:Z=null,directCheckout:M=!1,highlightLastFeature:S=!1}){const{detail:L}=(0,v.Z)(o),{activate:P,isPending:V}=(0,g.Z)(o),{isUpgradableByBundle:H,tiers:A,pricingForUi:B}=L,{recordEvent:O}=(0,w.Z)(),{onClickGoBack:I}=(0,k.U)({slug:o}),{myJetpackCheckoutUri:T=""}=(0,f.$9)();(0,m.useEffect)((()=>{O("jetpack_myjetpack_product_interstitial_view",{product:o})}),[O,o]);const U=(0,m.useCallback)(((e=!1)=>e?"":"crm"===o?"jetpack-crm":B?.tiers?.upgraded?.wpcomProductSlug?B.tiers.upgraded.wpcomProductSlug:B.wpcomProductSlug),[o,B]),D=(0,m.useCallback)(((e=!1,t=null)=>{O("jetpack_myjetpack_product_interstitial_add_link_click",{product:t??o,productSlug:U(e)})}),[O,o,U]),F=(0,m.useCallback)(((t=!1)=>{O("jetpack_myjetpack_product_interstitial_add_link_click",{product:e,productSlug:U(t)})}),[O,e,U]),q=(0,E.Z)(p.xB.Home),J=(0,m.useCallback)(((e,t,a)=>{let n=t?.postCheckoutUrl?t?.postCheckoutUrl:T;t?.isBundle||M?e?.():P({productId:o},{onSettled:({productId:c})=>{n=c?.post_checkout_url?c.post_checkout_url:T;const r=t?.postActivationUrl,s=a?t?.hasRequiredTier?.[a]:t?.hasRequiredPlan,i=!(a?t?.pricingForUi?.tiers?.[a]?.isFree:t?.pricingForUi?.isFree)&&!s;if("zero-bs-crm"!==t.pluginSlug||s)return i?void e?.(null,n):r?void(window.location.href=r):q();window.location.href="https://jetpackcrm.com/pricing/"}})}),[M,P,q,o,T]);return h().createElement(n.Z,{showHeader:!1,showBackground:!1},h().createElement(c.Z,{horizontalSpacing:3,horizontalGap:3},h().createElement(r.Z,{className:R.Z["product-interstitial__header"]},h().createElement(y.Z,{onClick:I}),t&&h().createElement(s.ZP,{variant:"body-small"},(0,l.createInterpolateElement)(__("Already have an existing plan or license key? Get started.","jetpack-my-jetpack"),{a:h().createElement(i.Z,{className:R.Z["product-interstitial__license-activation-link"],href:t,variant:"link"})}))),h().createElement(r.Z,null,A&&A.length?h().createElement(C.Z,{slug:o,clickHandler:J,onProductButtonClick:J,trackProductButtonClick:D,isFetching:V}):h().createElement(c.Z,{className:H?null:R.Z.container,horizontalSpacing:0,horizontalGap:0,fluid:!0},h().createElement(r.Z,{sm:4,md:4,lg:7},h().createElement(b.Z,{slug:o,trackButtonClick:D,onClick:a?J:void 0,className:H?R.Z.container:null,supportingInfo:u,preferProductName:j,ctaButtonLabel:N,hideTOS:x,quantity:Z,highlightLastFeature:S,isFetching:V})),h().createElement(r.Z,{sm:4,md:4,lg:5,className:d()(R.Z.imageContainer,z)},e?h().createElement(b.Z,{slug:e,trackButtonClick:F,onClick:J,className:H?R.Z.container:null,quantity:Z,highlightLastFeature:S,isFetching:V}):_)))))}function L(){const e="anti-spam",{detail:t}=(0,v.Z)(e),{isPluginActive:a}=t;return h().createElement(S,{slug:e,installsPlugin:!0,bundle:"security",existingLicenseKeyUrl:a?"admin.php?page=akismet-key-config":null,preferProductName:!0})}function P(){return h().createElement(S,{slug:"backup",installsPlugin:!0,bundle:"security"})}function V(){return h().createElement(S,{slug:"boost",installsPlugin:!0},h().createElement("img",{src:j,alt:"Boost"}))}function H(){return h().createElement(S,{slug:"creator",installsPlugin:!0})}function A(){return h().createElement(S,{slug:"crm",installsPlugin:!0},h().createElement("img",{src:_,alt:"CRM"}))}function B(){return h().createElement(S,{slug:"extras",installsPlugin:!0},h().createElement("img",{src:z,alt:"Extras"}))}function O(){return h().createElement(S,{slug:"protect",installsPlugin:!0})}function I(){return h().createElement(S,{slug:"scan",installsPlugin:!0,bundle:"security"})}function T(){return h().createElement(S,{slug:"social",installsPlugin:!0},h().createElement("img",{src:x,alt:__("Image displaying logos of social media platforms supported by Jetpack Social.","jetpack-my-jetpack")}))}function U(){const{detail:e}=(0,v.Z)("search");return h().createElement(S,{slug:"search",installsPlugin:!0,supportingInfo:(e?.pricingForUi?.trialAvailable?__("Jetpack Search Free supports up to 5,000 records and 500 search requests per month for free. You will be asked to upgrade to a paid plan if you exceed these limits for three continuous months.","jetpack-my-jetpack"):"")+__("For the paid plan, pricing will automatically adjust based on the number of records in your search index. If you grow into a new pricing tier, we'll let you know before your next billing cycle.","jetpack-my-jetpack")},h().createElement("img",{src:N,alt:"Search"}))}function D(){return h().createElement(S,{slug:"stats",directCheckout:!0,installsPlugin:!0,ctaButtonLabel:__("Get Stats","jetpack-my-jetpack")},h().createElement("img",{src:Z,alt:__("Illustration showing the Stats feature, highlighting important statistics for your site.","jetpack-my-jetpack")}))}function F(){return h().createElement(S,{slug:"videopress",installsPlugin:!0},h().createElement("img",{src:M,alt:"VideoPress"}))}},4257:(e,t,a)=>{"use strict";a.d(t,{Z:()=>h});var n=a(1294),c=a(951),r=a.n(c),s=a(8093),i=a(4598),l=a(3629),o=a(1488),u=a(7760),d=a(1514);const m=r()("my-jetpack:jetpack-ai-interstitial");function h(){const e="jetpack-ai",{detail:t}=(0,i.Z)(e),{onClickGoBack:a}=(0,l.U)({slug:e}),{isRegistered:c}=(0,n.Z)();m(t);const r=t?.aiAssistantFeature?.nextTier||null,{hasRequiredPlan:h}=t;if(c&&h&&!r)return m("user is on top tier"),React.createElement(u.f,{onClickGoBack:a});const p=c?r?.value:100,g=1!==p?p:null,v=1!==r?.value;return React.createElement(s.ZP,{slug:"jetpack-ai",installsPlugin:!0,imageContainerClassName:d.Z.aiImageContainer,hideTOS:!0,quantity:g,directCheckout:h,highlightLastFeature:v},React.createElement("img",{src:o,alt:"Search"}))}},7760:(e,t,a)=>{"use strict";a.d(t,{f:()=>k});var n=a(6895),c=a(9105),r=a(3363),s=a(3846),i=a(5106),l=a(526),o=a(5736),u=a(5235),d=a.n(u),m=a(9196),h=a.n(m),p=a(9997),g=a(4848),v=a(5626),f=a(1488),w=a(1514);const __=o.__;function k({onClickGoBack:e=(()=>{})}){const t=__("Do you need more requests for Jetpack AI Assistant?","jetpack-my-jetpack"),a=__("Allow us to assist you in discovering the optimal plan tailored to your requirements, ensuring you can continue using the most advanced AI technology Jetpack has to offer.","jetpack-my-jetpack"),o=(0,n.Z)("jetpack-ai-tiers-more-requests-contact"),{recordEvent:u}=(0,g.Z)(),k=(0,m.useCallback)((()=>{u("jetpack_ai_upgrade_contact_us",{placement:"insterstitial"})}),[u]);return h().createElement(c.Z,{showHeader:!1,showBackground:!1},h().createElement(r.Z,{horizontalSpacing:3,horizontalGap:3},h().createElement(s.Z,{className:w.Z["product-interstitial__header"]},h().createElement(v.Z,{onClick:e,reload:!1})),h().createElement(s.Z,null,h().createElement(r.Z,{className:w.Z.container,horizontalSpacing:0,horizontalGap:0,fluid:!0},h().createElement(s.Z,{sm:4,md:4,lg:7},h().createElement("div",{className:d()(w.Z.card)},h().createElement("div",null,h().createElement(i.H3,null,t),h().createElement(i.ZP,{mb:3},a),h().createElement("div",{className:w.Z["buttons-row"]},h().createElement(l.Z,{href:o,onClick:k},__("Contact Us","jetpack-my-jetpack")),h().createElement(p.rU,{to:"/",onClick:e},h().createElement(l.Z,{variant:"secondary"},__("Back","jetpack-my-jetpack"))))))),h().createElement(s.Z,{sm:4,md:4,lg:5,className:d()(w.Z.imageContainer,w.Z.aiImageContainer)},h().createElement("img",{src:f,alt:"Jetpack AI"}))))))}},673:(e,t,a)=>{"use strict";a.d(t,{Z:()=>d});var n=a(1294),c=a(3281),r=a(5736),s=a(9196),i=a.n(s),l=a(5544),o=a(7108),u=a(7111);const __=r.__;function d(){const{userConnectionData:e}=(0,n.Z)(),t=e?.currentUser?.wpcomUser?.display_name||e?.currentUser?.wpcomUser?.login||e?.currentUser?.username,{isLoading:a,data:r}=(0,o.Z)({name:l.h3,query:{path:l.LQ}}),s=(0,u.o)(r);return a?i().createElement(i().Fragment,null,__("Checking gold status…","jetpack-my-jetpack")):i().createElement(i().Fragment,null,i().createElement(c.H,{tokenRedeemed:s,displayName:t}))}},2889:(e,t,a)=>{"use strict";a.d(t,{Z:()=>h});var n=a(5736),c=a(1074),r=a(4955),s=a(6514),i=a(5316),l=a(9196),o=a.n(l),u=a(5090),d=a(5026),m=a(2091);const __=n.__,h=({counts:e,previousCounts:t})=>o().createElement("div",{className:m.Z["section-stats-highlights"]},o().createElement("h3",{className:m.Z["section-title"]},o().createElement("span",null,__("7-day highlights","jetpack-my-jetpack")),o().createElement("small",{className:m.Z["section-description"]},__("Compared to previous period","jetpack-my-jetpack"))),o().createElement("div",{className:m.Z["cards-list"]},o().createElement(u.Z,{heading:__("Views","jetpack-my-jetpack"),icon:o().createElement(c.Z,{icon:d.Z}),count:e?.views,previousCount:t?.views}),o().createElement(u.Z,{heading:__("Visitors","jetpack-my-jetpack"),icon:o().createElement(c.Z,{icon:r.Z}),count:e?.visitors,previousCount:t?.visitors}),o().createElement(u.Z,{heading:__("Likes","jetpack-my-jetpack"),icon:o().createElement(c.Z,{icon:s.Z}),count:e?.likes,previousCount:t?.likes}),o().createElement(u.Z,{heading:__("Comments","jetpack-my-jetpack"),icon:o().createElement(c.Z,{icon:i.Z}),count:e?.comments,previousCount:t?.comments})))},5090:(e,t,a)=>{"use strict";a.d(t,{Z:()=>f});var n=a(2947),c=a(5609),r=a(1074),s=a(9404),i=a(986),l=a(5235),o=a.n(l),u=a(5844),d=a.n(u),m=a(9196),h=a.n(m),p=a(2091);const g=(e,t={})=>null!==e&&Number.isFinite(e)?(0,n.Z)(e,t):"-",v=({count:e=0,previousCount:t=0,icon:a,heading:n})=>{const l=(d=t,"number"!=typeof(u=e)||"number"!=typeof d?null:u-d);var u,d;const m=Math.abs(l),v=Number.isFinite(l)?((e,t)=>{if("number"!=typeof e||"number"!=typeof t)return null;if(0===e&&0===t)return 0;const a=e/t*100;return Math.abs(a)===1/0?100:Math.round(a)})(m,t):null,f={maximumFractionDigits:1,notation:"compact"};return h().createElement(c.Card,{className:p.Z["stats-card"]},a&&h().createElement("div",{className:p.Z["stats-card-icon"]},a),n&&h().createElement("div",{className:p.Z["stats-card-heading"]},n),h().createElement("div",{className:p.Z["stats-card-count"]},h().createElement("span",{className:p.Z["stats-card-count-value"],title:Number.isFinite(e)?String(e):void 0},g(e,f)),null!==l?h().createElement("span",{className:o()(p.Z["stats-card-difference"],{[p.Z["stats-card-difference--positive"]]:l<0,[p.Z["stats-card-difference--negative"]]:l>0})},h().createElement("span",{className:p.Z["stats-card-difference-icon"],title:String(l)},l<0&&h().createElement(r.Z,{size:18,icon:s.Z}),l>0&&h().createElement(r.Z,{size:18,icon:i.Z})),h().createElement("span",{className:p.Z["stats-card-difference-absolute-value"]},g(m,m>9999?f:{})),null!==v&&h().createElement("span",{className:p.Z["stats-card-difference-absolute-percentage"]},"(",v,"%)")):null))};v.propTypes={count:d().number,heading:d().node,icon:d().node,previousCount:d().number};const f=v},5026:(e,t,a)=>{"use strict";a.d(t,{Z:()=>c});var n=a(5609);const c=React.createElement(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement(n.Path,{d:"m4 13 .67.336.003-.005a2.42 2.42 0 0 1 .094-.17c.071-.122.18-.302.329-.52.298-.435.749-1.017 1.359-1.598C7.673 9.883 9.498 8.75 12 8.75s4.326 1.132 5.545 2.293c.61.581 1.061 1.163 1.36 1.599a8.29 8.29 0 0 1 .422.689l.002.005L20 13l.67-.336v-.003l-.003-.005-.008-.015-.028-.052a9.752 9.752 0 0 0-.489-.794 11.6 11.6 0 0 0-1.562-1.838C17.174 8.617 14.998 7.25 12 7.25S6.827 8.618 5.42 9.957c-.702.669-1.22 1.337-1.563 1.839a9.77 9.77 0 0 0-.516.845l-.008.015-.002.005-.001.002v.001L4 13Zm8 3a3.5 3.5 0 1 0 0-7 3.5 3.5 0 0 0 0 7Z"}))},9593:(e,t,a)=>{"use strict";a.d(t,{Z:()=>p});var n=a(5736),c=a(9196),r=a(5544),s=a(4598),i=a(7108),l=a(1838),o=a(4848),u=a(5162),d=a(5745),m=a(2307),h=a(2889);const __=n.__,p=()=>{const e="stats",{blogID:t}=(0,u.Z)(),{detail:a}=(0,s.Z)(e),{status:n}=a,p=!!(0,l.$9)("userIsAdmin"),{data:g}=(0,i.Z)({name:r.m2,query:{path:(0,r.Vx)(t)}}),v=g?.past_seven_days||{},f=g?.between_past_eight_and_fifteen_days||{},{recordEvent:w}=(0,o.Z)(),k=(0,c.useCallback)((()=>{w("jetpack_myjetpack_stats_card_seedetailedstats_click",{product:e})}),[w]),E=(0,c.useCallback)((()=>!(n!==m.N.CAN_UPGRADE)),[n]),y={href:"admin.php?page=stats",label:__("View detailed stats","jetpack-my-jetpack"),onClick:k,shouldShowButton:E},b={[m.N.ACTIVE]:{label:__("View detailed stats","jetpack-my-jetpack")},[m.N.ERROR]:{label:__("Connect Jetpack to use Stats","jetpack-my-jetpack")}};return React.createElement(d.Z,{admin:p,slug:e,primaryActionOverride:b,secondaryAction:y,showMenu:!0},React.createElement(h.Z,{counts:v,previousCounts:f}))}},3851:(e,t,a)=>{"use strict";a.d(t,{Z:()=>w});var n=a(3363),c=a(3846),r=a(5106),s=a(526),i=a(1294),l=a(5736),o=a(9517),u=a(9196),d=a(8209),m=a(1838),h=a(8059),p=a(4848),g=a(7555),v=a(1062),f=a(9473);const __=l.__,w=()=>{const e="1"===(0,m.$9)("userIsNewToJetpack"),{recordEvent:t}=(0,p.Z)(),{isDismissed:a,dismissWelcomeBanner:l}=(0,h.Z)(),{isRegistered:w,isUserConnected:k}=(0,i.Z)(),E=(0,g.Z)(d.xB.Connection),[y,b]=(0,u.useState)(!a&&e),C=!w||!k;(0,u.useEffect)((()=>{y&&t("jetpack_myjetpack_welcome_banner_view")}),[y,t]);const j=(0,u.useCallback)((()=>{t("jetpack_myjetpack_welcome_banner_dismiss_click"),b(!1),l()}),[t,l]),_=(0,u.useCallback)((()=>{t("jetpack_myjetpack_welcome_banner_finish_connection_click"),E()}),[t,E]);return y?React.createElement(n.Z,{horizontalSpacing:3,className:f.Z["banner-container"]},React.createElement(c.Z,{lg:12,className:f.Z.banner},React.createElement(v.U,{className:f.Z["banner-card"]},React.createElement(n.Z,{horizontalSpacing:0,horizontalGap:0,className:f.Z["banner-content"]},React.createElement(c.Z,{sm:6,md:8,lg:6,className:f.Z["banner-description"]},React.createElement(r.ZP,{variant:"headline-small",mb:3},__("Welcome to Jetpack!","jetpack-my-jetpack")),React.createElement(r.ZP,{variant:"body",mb:2},__("Jetpack is a suite of security, performance, and growth tools made for WordPress sites by the WordPress experts.","jetpack-my-jetpack")),React.createElement(r.ZP,{variant:"body",mb:C?4:0},__("It’s the ultimate toolkit for best-in-class websites, with everything you need to grow your business. Choose a plan below to get started.","jetpack-my-jetpack")),C&&React.createElement(s.Z,{variant:"primary",onClick:_},__("Finish setting up Jetpack","jetpack-my-jetpack"))),React.createElement(c.Z,{sm:6,md:8,lg:6,className:f.Z["banner-image"]}))),React.createElement(s.Z,{className:f.Z.dismiss,variant:"secondary","aria-label":__("Don’t show the welcome message again","jetpack-my-jetpack"),size:"small",icon:o.Z,onClick:j}))):null}},8209:(e,t,a)=>{"use strict";a.d(t,{f6:()=>c,w6:()=>n,xB:()=>r});const n="my-jetpack-my-plans-manage",c="my-jetpack-my-plans-purchase",r={Home:"/",Connection:"/connection",AddAkismet:"/add-akismet",AddAntiSpam:"/add-anti-spam",AddBackup:"/add-backup",AddBoost:"/add-boost",AddCRM:"/add-crm",AddCreator:"/add-creator",AddJetpackAI:"/add-jetpack-ai",AddExtras:"/add-extras",AddProtect:"/add-protect",AddScan:"/add-scan",AddSocial:"/add-social",AddSearch:"/add-search",AddVideoPress:"/add-videopress",AddStats:"/add-stats",AddLicense:"/add-license",RedeemToken:"/redeem-token"}},8437:(e,t,a)=>{"use strict";a.d(t,{T:()=>r,Z:()=>s});var n=a(9196);const c={message:"",options:{status:""}},r=(0,n.createContext)({currentNotice:c,setNotice:null}),s=({children:e})=>{const[t,a]=(0,n.useState)(c);return React.createElement(r.Provider,{value:{currentNotice:t,setNotice:e=>{t.message||a(e)}}},e)}},5544:(e,t,a)=>{"use strict";a.d(t,{Hq:()=>i,Jk:()=>o,Kf:()=>E,LQ:()=>c,RQ:()=>y,Vu:()=>C,Vx:()=>m,YF:()=>d,_H:()=>r,db:()=>v,gb:()=>w,h3:()=>j,hd:()=>s,iG:()=>p,kl:()=>k,m2:()=>b,n2:()=>u,nF:()=>f,q9:()=>h,xD:()=>l,yv:()=>g});const n="my-jetpack/v1",c=`${n}/site/purchases`,r=`${n}/site/backup/undo-event`,s=`${n}/site/backup/count-items`,i=`${n}/chat/availability`,l=`${n}/chat/authentication`,o=`${n}/site/products`,u="videopress/v1/stats/featured",d=`${n}/site/dismiss-welcome-banner`,m=e=>`jetpack/v4/stats-app/sites/${e}/stats/highlights`,h="product",p="activate product",g="install product",v="videopress stats",f="available licenses",w="chat availability",k="chat authentication",E="backup history",y="backup stats",b="stats counts",C="dismiss welcome banner",j="purchases"},6916:(e,t,a)=>{"use strict";a.d(t,{o:()=>l});var n=a(5736),c=a(9196),r=a(8437),s=a(5544);const __=n.__,i=[s.h3,s.iG,s.yv],l=({infoName:e,isError:t,overrideMessage:a})=>{const{setNotice:s}=(0,c.useContext)(r.T),l=a??(0,n.sprintf)( -// translators: %s is the name of the information being fetched, e.g. "site purchases". -__("There was an error fetching your %s information. Check your site connectivity and try again.","jetpack-my-jetpack"),e);(0,c.useEffect)((()=>{t&&i.includes(e)&&s({message:l,options:{status:"error"}})}),[l,s,t,e])}},7363:(e,t,a)=>{"use strict";a.d(t,{Z:()=>i});var n=a(5736),c=a(5544),r=a(7296),s=a(4598);const __=n.__,i=e=>{const{detail:t,refetch:a}=(0,s.Z)(e),{mutate:i,isPending:l}=(0,r.Z)({name:c.iG,query:{path:`${c.Jk}/${e}`,method:"POST"},options:{onSuccess:a},errorMessage:(0,n.sprintf)( -// translators: %$1s: Jetpack Product name -__("Failed to activate %1$s. Please try again","jetpack-my-jetpack"),t.name)});return{activate:i,isPending:l}}},5595:(e,t,a)=>{"use strict";a.d(t,{Z:()=>i});var n=a(5736),c=a(5544),r=a(7296),s=a(4598);const __=n.__,i=e=>{const{detail:t,refetch:a}=(0,s.Z)(e),{mutate:i,isPending:l}=(0,r.Z)({name:c.yv,query:{path:`${c.Jk}/${e}/install-standalone`,method:"POST"},options:{onSuccess:a},errorMessage:(0,n.sprintf)( -// translators: %$1s: Jetpack Product name -__("Failed to install standalone plugin for %1$s. Please try again","jetpack-my-jetpack"),t.name)});return{install:i,isPending:l}}},4598:(e,t,a)=>{"use strict";a.d(t,{B:()=>l,Z:()=>u});var n=a(9196),c=a(5544),r=a(7108),s=a(1838),i=a(466);const l=()=>{const{items:e}=(0,s.$9)("products");return Object.entries(e).reduce(((e,[t,a])=>({...e,[t]:o(a)})),{})},o=e=>{const t=(0,i.Z)(e);return t.features=t.features||[],t.supportedProducts=t.supportedProducts||[],t.pricingForUi.fullPricePerMonth=(e=>"year"===e.pricingForUi.productTerm?Math.round(e.pricingForUi.fullPrice/12*100)/100:e.pricingForUi.fullPrice)(t),t.pricingForUi.discountPricePerMonth=(e=>"year"===e.pricingForUi.productTerm?Math.round(e.pricingForUi.discountPrice/12*100)/100:e.pricingForUi.discountPrice)(t),t},u=e=>{const t=l(),a=t?.[e],{refetch:s,isLoading:i}=(e=>(0,r.Z)({name:c.q9,query:{path:`${c.Jk}/${e}`},options:{enabled:!1}}))(e);return{detail:a,refetch:(0,n.useCallback)((()=>(async(e,t)=>{const{data:a}=await t();window.myJetpackInitialState.products.items[e]=a})(e,s)),[e,s]),isLoading:i}}},6178:(e,t,a)=>{"use strict";a.d(t,{Z:()=>i});var n=a(4743),c=a(5885),r=a(6916),s=a(1838);const i=({name:e,queryFn:t,errorMessage:a})=>{const i=(0,c.a)({queryKey:[e],queryFn:()=>{const{apiRoot:e,apiNonce:a}=(0,s.M_)();return n.ZP.setApiRoot(e),n.ZP.setApiNonce(a),t(n.ZP)},refetchOnWindowFocus:!1,refetchIntervalInBackground:!1}),{isError:l,isLoading:o}=i;return(0,r.o)({infoName:e,isError:!o&&l,overrideMessage:a}),i}},7296:(e,t,a)=>{"use strict";a.d(t,{Z:()=>i});var n=a(2016),c=a(6989),r=a.n(c),s=a(6916);const i=({name:e,query:t,options:a,errorMessage:c})=>{const i=(0,n.D)({mutationKey:[e],mutationFn:()=>r()(t),...a}),{isError:l,isPending:o}=i;return(0,s.o)({infoName:e,isError:!o&&l,overrideMessage:c}),i}},7108:(e,t,a)=>{"use strict";a.d(t,{Z:()=>i});var n=a(5885),c=a(6989),r=a.n(c),s=a(6916);const i=({name:e,query:t,options:a,errorMessage:c})=>{const i=(0,n.a)({queryKey:[e],queryFn:()=>r()(t),refetchOnWindowFocus:!1,refetchIntervalInBackground:!1,...a}),{error:l,isError:o,isLoading:u}=i;return(0,s.o)({infoName:e,isError:!u&&o&&"not_connected"!==l.code,overrideMessage:c}),i}},1838:(e,t,a)=>{"use strict";a.d(t,{$9:()=>n,M_:()=>c,vH:()=>r});const n=e=>e?window?.myJetpackInitialState?.[e]??{}:window?.myJetpackInitialState,c=()=>window?.myJetpackRest??{},r=e=>e?window?.JP_CONNECTION_INITIAL_STATE?.[e]??{}:window?.JP_CONNECTION_INITIAL_STATE},1950:(e,t,a)=>{"use strict";a.d(t,{Z:()=>c});var n=a(2307);const c=e=>Object.values(e).filter((({requiresUserConnection:e,status:t})=>e&&(t===n.N.ACTIVE||t===n.N.ERROR))).map((({name:e})=>e))},466:(e,t,a)=>{"use strict";a.d(t,{Z:()=>c});const n=e=>Array.isArray(e)?e.map((e=>n(e))):"object"==typeof e&&null!==e?Object.fromEntries(Object.entries(e).map((([e,t])=>[e.replace(/([-_][a-z])/gi,(e=>e.toUpperCase().replace(/[-_]/g,""))),n(t)]))):e,c=n},8059:(e,t,a)=>{"use strict";a.d(t,{Z:()=>l});var n=a(5736),c=a(9196),r=a(5544),s=a(7296),i=a(1838);const __=n.__,l=()=>{const{hasBeenDismissed:e}=(0,i.$9)("welcomeBanner"),[t,a]=(0,c.useState)(e),{mutate:n}=(0,s.Z)({name:r.Vu,query:{path:r.YF,method:"POST"},options:{onSuccess:()=>a(!0)},errorMessage:__("Failed to dismiss the welcome banner. Please try again","jetpack-my-jetpack")});return{dismissWelcomeBanner:n,isDismissed:t}}},4848:(e,t,a)=>{"use strict";a.d(t,{Z:()=>i});var n=a(6975),c=a(9196),r=a(1838),s=a(5162);const i=()=>{const{isUserConnected:e,connectedPlugins:t,userConnectionData:a={}}=(0,s.Z)(),{login:i,ID:l}=a.currentUser?.wpcomUser||{},{myJetpackVersion:o=""}=(0,r.$9)();(0,c.useEffect)((()=>{e&&l&&i&&n.Z.initialize(l,i)}),[l,e,i]);const u=Object.keys(t||{}).sort().join(",").replaceAll("jetpack-","");return{recordEvent:(0,c.useCallback)(((e,t)=>{n.Z.tracks.recordEvent(e,{...t,version:o,referring_plugins:u})}),[])}}},3290:(e,t,a)=>{"use strict";a.d(t,{Z:()=>d});var n=a(5736),c=a(9196),r=a(8209),s=a(8437),i=a(4598),l=a(1950),o=a(5162),u=a(7555);const __=n.__;function d(){const{setNotice:e}=(0,c.useContext)(s.T),t=(0,u.Z)(r.xB.Connection),a=(0,i.B)(),d=(0,l.Z)(a),{isSiteConnected:m,hasConnectedOwner:h,isUserConnected:p}=(0,o.Z)(),g=!h&&!p&&d.length>0,v=(0,n.sprintf)(/* translators: placeholder is product name. */ -__("Jetpack %s needs a user connection to WordPress.com to be able to work.","jetpack-my-jetpack"),d[0]),f=1===d.length?v:__("Some products need a user connection to WordPress.com to be able to work.","jetpack-my-jetpack");(0,c.useEffect)((()=>{m&&!g||e({message:f,options:{status:"warning",actions:[{label:__("Connect your user account to fix this","jetpack-my-jetpack"),onClick:t,noDefaultClasses:!0}]}})}),[m,f,g,t,e])}},3629:(e,t,a)=>{"use strict";a.d(t,{U:()=>r});var n=a(9196),c=a(4848);function r({slug:e}){const{recordEvent:t}=(0,c.Z)();return{onClickGoBack:(0,n.useCallback)((a=>{e&&t("jetpack_myjetpack_product_interstitial_back_link_click",{product:e}),document.referrer.includes(window.location.host)&&(a.preventDefault(),history.back())}),[t,e])}}},5162:(e,t,a)=>{"use strict";a.d(t,{Z:()=>r});var n=a(1294),c=a(1838);const r=()=>{const{apiRoot:e,apiNonce:t}=(0,c.M_)(),{topJetpackMenuItemUrl:a,blogID:r}=(0,c.$9)(),s=(0,n.Z)({apiRoot:e,apiNonce:t}),{registrationNonce:i}=(0,c.vH)(),l=s.isRegistered;return{apiNonce:t,apiRoot:e,blogID:r,registrationNonce:i,...s,isSiteConnected:l,topJetpackMenuItemUrl:a}}},7555:(e,t,a)=>{"use strict";a.d(t,{Z:()=>r});var n=a(9196),c=a(6417);function r(e){const t=(0,c.s0)();return(0,n.useCallback)((a=>t(e,a)),[t,e])}},199:(e,t,a)=>{"use strict";function n(){const e=window.location.search;return new URLSearchParams(e).has("redirect_to_referrer","1")&&""!==document.referrer?document.referrer:null}a.d(t,{a:()=>n})},6864:(e,t,a)=>{"use strict";a.d(t,{Z:()=>s});var n=a(6895),c=a(8209),r=a(1838);const s=()=>{const{siteSuffix:e="",blogID:t}=(0,r.$9)();return(0,n.Z)(c.w6,{site:t??e})}},7356:(e,t,a)=>{"use strict";a.d(t,{Z:()=>s});var n=a(6895),c=a(8209),r=a(1838);const s=()=>{const{siteSuffix:e="",blogID:t,myJetpackCheckoutUri:a}=(0,r.$9)(),s=a?`redirect_to=${a}`:null;return(0,n.Z)(c.f6,{site:t??e,query:s})}},7111:(e,t,a)=>{"use strict";a.d(t,{h:()=>n,o:()=>c});const n=({partner_slug:e})=>!!e&&"goldenticket"===e;function c(e){return!!Array.isArray(e)&&e.filter((e=>n(e))).length>0}},2042:(e,t,a)=>{"use strict";e.exports=a.p+"images/disconnect-confirm-dc9fe8f5c68cfd1320e0.jpg"},724:(e,t,a)=>{"use strict";e.exports=a.p+"images/disconnect-thanks-5873bfac56a9bd7322cd.jpg"},8702:(e,t,a)=>{"use strict";e.exports=a.p+"images/jetpack-license-activation-with-lock-7b01c1a4cf56de799cd7.png"},1160:(e,t,a)=>{"use strict";e.exports=a.p+"images/jetpack-license-activation-with-success-cad524ede4e793cc0ece.png"},5242:(e,t,a)=>{"use strict";e.exports=a.p+"images/apple-92dacafad84e79708a74.svg"},6790:(e,t,a)=>{"use strict";e.exports=a.p+"images/connect-f27775ac15cf885713c2.png"},184:(e,t,a)=>{"use strict";e.exports=a.p+"images/google-dec2a429bf1d8e83f9ad.svg"},4403:(e,t,a)=>{"use strict";e.exports=a.p+"images/wordpress-1fc3e0ba6c52e9707900.svg"},5050:(e,t,a)=>{"use strict";e.exports=a.p+"images/cloud-81ac85ba680343200f54.svg"},3815:(e,t,a)=>{"use strict";e.exports=a.p+"images/empty-avatar-fea23feddfa99b07c2e8.svg"},9182:(e,t,a)=>{"use strict";e.exports=a.p+"images/jetpack-9de1caef5eb5c22da5d6.svg"},4730:(e,t,a)=>{"use strict";e.exports=a.p+"images/jetpack-manage-3a7ecaa604823c98c3cf.svg"},5610:(e,t,a)=>{"use strict";e.exports=a.p+"images/boost-a54137485af36fdffe9c.png"},4763:(e,t,a)=>{"use strict";e.exports=a.p+"images/crm-7e7684ae2c40327d8fed.png"},2605:(e,t,a)=>{"use strict";e.exports=a.p+"images/extras-26daf36507504c96d066.png"},1488:(e,t,a)=>{"use strict";e.exports=a.p+"images/jetpack-ai-1a265a198f75543e342e.png"},720:(e,t,a)=>{"use strict";e.exports=a.p+"images/search-f9756bd9c926d905fe70.png"},1657:(e,t,a)=>{"use strict";e.exports=a.p+"images/social-e3fb80b2f32534fefe63.png"},7690:(e,t,a)=>{"use strict";e.exports=a.p+"images/stats-9802380852610a4d5908.png"},1439:(e,t,a)=>{"use strict";e.exports=a.p+"images/videopress-9591093a9a238cc48a35.png"},4462:e=>{"use strict";if(void 0==={consumer_slug:"my_jetpack"}){var t=new Error('Cannot find module \'{"consumer_slug":"my_jetpack"}\'');throw t.code="MODULE_NOT_FOUND",t}e.exports={consumer_slug:"my_jetpack"}},9196:e=>{"use strict";e.exports=window.React},6989:e=>{"use strict";e.exports=window.wp.apiFetch},5609:e=>{"use strict";e.exports=window.wp.components},4333:e=>{"use strict";e.exports=window.wp.compose},9818:e=>{"use strict";e.exports=window.wp.data},9771:e=>{"use strict";e.exports=window.wp.date},9307:e=>{"use strict";e.exports=window.wp.element},5736:e=>{"use strict";e.exports=window.wp.i18n},444:e=>{"use strict";e.exports=window.wp.primitives},6483:e=>{"use strict";e.exports=window.wp.url},2674:e=>{function t(){return e.exports=t=Object.assign?Object.assign.bind():function(e){for(var t=1;t{"use strict";a.d(t,{j:()=>r});var n=a(2486),c=a(1356),r=new class extends n.l{#e;#t;#a;constructor(){super(),this.#a=e=>{if(!c.sk&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#a)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#a=e,this.#t?.(),this.#t=e((e=>{"boolean"==typeof e?this.setFocused(e):this.onFocus()}))}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){this.listeners.forEach((e=>{e()}))}isFocused(){return"boolean"==typeof this.#e?this.#e:"hidden"!==globalThis.document?.visibilityState}}},2344:(e,t,a)=>{"use strict";a.d(t,{Gm:()=>c});var n=a(1356);function c(e){return{onFetch:(t,a)=>{const c=async()=>{const a=t.options,c=t.fetchOptions?.meta?.fetchMore?.direction,i=t.state.data?.pages||[],l=t.state.data?.pageParams||[],o={pages:[],pageParams:[]};let u=!1;const d=t.options.queryFn||(()=>Promise.reject(new Error(`Missing queryFn: '${t.options.queryHash}'`))),m=async(e,a,c)=>{if(u)return Promise.reject();if(null==a&&e.pages.length)return Promise.resolve(e);const r={queryKey:t.queryKey,pageParam:a,direction:c?"backward":"forward",meta:t.options.meta};var s;s=r,Object.defineProperty(s,"signal",{enumerable:!0,get:()=>(t.signal.aborted?u=!0:t.signal.addEventListener("abort",(()=>{u=!0})),t.signal)});const i=await d(r),{maxPages:l}=t.options,o=c?n.Ht:n.VX;return{pages:o(e.pages,i,l),pageParams:o(e.pageParams,a,l)}};let h;if(c&&i.length){const e="backward"===c,t={pages:i,pageParams:l},n=(e?s:r)(a,t);h=await m(t,n,e)}else{h=await m(o,l[0]??a.initialPageParam);const t=e??i.length;for(let e=1;et.options.persister?.(c,{queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},a):t.fetchFn=c}}}function r(e,{pages:t,pageParams:a}){const n=t.length-1;return e.getNextPageParam(t[n],t,a[n],a)}function s(e,{pages:t,pageParams:a}){return e.getPreviousPageParam?.(t[0],t,a[0],a)}},4133:(e,t,a)=>{"use strict";a.d(t,{R:()=>i,m:()=>s});var n=a(6673),c=a(9992),r=a(3963),s=class extends c.F{#n;#c;#r;#s;constructor(e){super(),this.mutationId=e.mutationId,this.#c=e.defaultOptions,this.#r=e.mutationCache,this.#n=[],this.state=e.state||{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0},this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options={...this.#c,...e},this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#n.includes(e)||(this.#n.push(e),this.clearGcTimeout(),this.#r.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#n=this.#n.filter((t=>t!==e)),this.scheduleGc(),this.#r.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#n.length||("pending"===this.state.status?this.scheduleGc():this.#r.remove(this))}continue(){return this.#s?.continue()??this.execute(this.state.variables)}async execute(e){const t=()=>(this.#s=(0,r.Mz)({fn:()=>this.options.mutationFn?this.options.mutationFn(e):Promise.reject(new Error("No mutationFn found")),onFail:(e,t)=>{this.#i({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#i({type:"pause"})},onContinue:()=>{this.#i({type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode}),this.#s.promise),a="pending"===this.state.status;try{if(!a){this.#i({type:"pending",variables:e}),await(this.#r.config.onMutate?.(e,this));const t=await(this.options.onMutate?.(e));t!==this.state.context&&this.#i({type:"pending",context:t,variables:e})}const n=await t();return await(this.#r.config.onSuccess?.(n,e,this.state.context,this)),await(this.options.onSuccess?.(n,e,this.state.context)),await(this.#r.config.onSettled?.(n,null,this.state.variables,this.state.context,this)),await(this.options.onSettled?.(n,null,e,this.state.context)),this.#i({type:"success",data:n}),n}catch(t){try{throw await(this.#r.config.onError?.(t,e,this.state.context,this)),await(this.options.onError?.(t,e,this.state.context)),await(this.#r.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this)),await(this.options.onSettled?.(void 0,t,e,this.state.context)),t}finally{this.#i({type:"error",error:t})}}}#i(e){this.state=(t=>{switch(e.type){case"failed":return{...t,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...t,isPaused:!0};case"continue":return{...t,isPaused:!1};case"pending":return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:!(0,r.Kw)(this.options.networkMode),status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}})(this.state),n.V.batch((()=>{this.#n.forEach((t=>{t.onMutationUpdate(e)})),this.#r.notify({mutation:this,type:"updated",action:e})}))}};function i(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}},9344:(e,t,a)=>{"use strict";a.d(t,{L:()=>i});var n=a(6673),c=a(4133),r=a(1356),s=a(2486),i=class extends s.l{constructor(e={}){super(),this.config=e,this.#l=[],this.#o=0}#l;#o;#u;build(e,t,a){const n=new c.m({mutationCache:this,mutationId:++this.#o,options:e.defaultMutationOptions(t),state:a});return this.add(n),n}add(e){this.#l.push(e),this.notify({type:"added",mutation:e})}remove(e){this.#l=this.#l.filter((t=>t!==e)),this.notify({type:"removed",mutation:e})}clear(){n.V.batch((()=>{this.#l.forEach((e=>{this.remove(e)}))}))}getAll(){return this.#l}find(e){const t={exact:!0,...e};return this.#l.find((e=>(0,r.X7)(t,e)))}findAll(e={}){return this.#l.filter((t=>(0,r.X7)(e,t)))}notify(e){n.V.batch((()=>{this.listeners.forEach((t=>{t(e)}))}))}resumePausedMutations(){return this.#u=(this.#u??Promise.resolve()).then((()=>{const e=this.#l.filter((e=>e.state.isPaused));return n.V.batch((()=>e.reduce(((e,t)=>e.then((()=>t.continue().catch(r.ZT)))),Promise.resolve())))})).then((()=>{this.#u=void 0})),this.#u}}},8507:(e,t,a)=>{"use strict";a.d(t,{X:()=>i});var n=a(4133),c=a(6673),r=a(2486),s=a(1356),i=class extends r.l{#d;#m=void 0;#h;#p;constructor(e,t){super(),this.#d=e,this.setOptions(t),this.bindMethods(),this.#g()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){const t=this.options;this.options=this.#d.defaultMutationOptions(e),(0,s.VS)(t,this.options)||this.#d.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#h,observer:this}),t?.mutationKey&&this.options.mutationKey&&(0,s.Ym)(t.mutationKey)!==(0,s.Ym)(this.options.mutationKey)?this.reset():this.#h?.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#h?.removeObserver(this)}onMutationUpdate(e){this.#g(),this.#v(e)}getCurrentResult(){return this.#m}reset(){this.#h?.removeObserver(this),this.#h=void 0,this.#g(),this.#v()}mutate(e,t){return this.#p=t,this.#h?.removeObserver(this),this.#h=this.#d.getMutationCache().build(this.#d,this.options),this.#h.addObserver(this),this.#h.execute(e)}#g(){const e=this.#h?.state??(0,n.R)();this.#m={...e,isPending:"pending"===e.status,isSuccess:"success"===e.status,isError:"error"===e.status,isIdle:"idle"===e.status,mutate:this.mutate,reset:this.reset}}#v(e){c.V.batch((()=>{if(this.#p&&this.hasListeners()){const t=this.#m.variables,a=this.#m.context;"success"===e?.type?(this.#p.onSuccess?.(e.data,t,a),this.#p.onSettled?.(e.data,null,t,a)):"error"===e?.type&&(this.#p.onError?.(e.error,t,a),this.#p.onSettled?.(void 0,e.error,t,a))}this.listeners.forEach((e=>{e(this.#m)}))}))}}},6673:(e,t,a)=>{"use strict";a.d(t,{V:()=>n});var n=function(){let e=[],t=0,a=e=>{e()},n=e=>{e()},c=e=>setTimeout(e,0);const r=n=>{t?e.push(n):c((()=>{a(n)}))},s=()=>{const t=e;e=[],t.length&&c((()=>{n((()=>{t.forEach((e=>{a(e)}))}))}))};return{batch:e=>{let a;t++;try{a=e()}finally{t--,t||s()}return a},batchCalls:e=>(...t)=>{r((()=>{e(...t)}))},schedule:r,setNotifyFunction:e=>{a=e},setBatchNotifyFunction:e=>{n=e},setScheduler:e=>{c=e}}}()},5433:(e,t,a)=>{"use strict";a.d(t,{N:()=>r});var n=a(2486),c=a(1356),r=new class extends n.l{#f=!0;#t;#a;constructor(){super(),this.#a=e=>{if(!c.sk&&window.addEventListener){const t=()=>e(!0),a=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",a,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",a)}}}}onSubscribe(){this.#t||this.setEventListener(this.#a)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#a=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#f!==e&&(this.#f=e,this.listeners.forEach((t=>{t(e)})))}isOnline(){return this.#f}}},3749:(e,t,a)=>{"use strict";a.d(t,{A:()=>i});var n=a(1356),c=a(6673),r=a(3963),s=a(9992),i=class extends s.F{#w;#k;#E;#y;#s;#n;#c;#b;constructor(e){super(),this.#b=!1,this.#c=e.defaultOptions,this.#C(e.options),this.#n=[],this.#E=e.cache,this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#w=e.state||function(e){const t="function"==typeof e.initialData?e.initialData():e.initialData,a=void 0!==t,n=a?"function"==typeof e.initialDataUpdatedAt?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:a?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:a?"success":"pending",fetchStatus:"idle"}}(this.options),this.state=this.#w,this.scheduleGc()}get meta(){return this.options.meta}#C(e){this.options={...this.#c,...e},this.updateGcTime(this.options.gcTime)}optionalRemove(){this.#n.length||"idle"!==this.state.fetchStatus||this.#E.remove(this)}setData(e,t){const a=(0,n.oE)(this.state.data,e,this.options);return this.#i({data:a,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),a}setState(e,t){this.#i({type:"setState",state:e,setStateOptions:t})}cancel(e){const t=this.#y;return this.#s?.cancel(e),t?t.then(n.ZT).catch(n.ZT):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#w)}isActive(){return this.#n.some((e=>!1!==e.options.enabled))}isDisabled(){return this.getObserversCount()>0&&!this.isActive()}isStale(){return this.state.isInvalidated||!this.state.dataUpdatedAt||this.#n.some((e=>e.getCurrentResult().isStale))}isStaleByTime(e=0){return this.state.isInvalidated||!this.state.dataUpdatedAt||!(0,n.Kp)(this.state.dataUpdatedAt,e)}onFocus(){const e=this.#n.find((e=>e.shouldFetchOnWindowFocus()));e?.refetch({cancelRefetch:!1}),this.#s?.continue()}onOnline(){const e=this.#n.find((e=>e.shouldFetchOnReconnect()));e?.refetch({cancelRefetch:!1}),this.#s?.continue()}addObserver(e){this.#n.includes(e)||(this.#n.push(e),this.clearGcTimeout(),this.#E.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.#n.includes(e)&&(this.#n=this.#n.filter((t=>t!==e)),this.#n.length||(this.#s&&(this.#b?this.#s.cancel({revert:!0}):this.#s.cancelRetry()),this.scheduleGc()),this.#E.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.#n.length}invalidate(){this.state.isInvalidated||this.#i({type:"invalidate"})}fetch(e,t){if("idle"!==this.state.fetchStatus)if(this.state.dataUpdatedAt&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#y)return this.#s?.continueRetry(),this.#y;if(e&&this.#C(e),!this.options.queryFn){const e=this.#n.find((e=>e.options.queryFn));e&&this.#C(e.options)}const a=new AbortController,n={queryKey:this.queryKey,meta:this.meta},c=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(this.#b=!0,a.signal)})};c(n);const s={fetchOptions:t,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:()=>this.options.queryFn?(this.#b=!1,this.options.persister?this.options.persister(this.options.queryFn,n,this):this.options.queryFn(n)):Promise.reject(new Error(`Missing queryFn: '${this.options.queryHash}'`))};c(s),this.options.behavior?.onFetch(s,this),this.#k=this.state,"idle"!==this.state.fetchStatus&&this.state.fetchMeta===s.fetchOptions?.meta||this.#i({type:"fetch",meta:s.fetchOptions?.meta});const i=e=>{(0,r.DV)(e)&&e.silent||this.#i({type:"error",error:e}),(0,r.DV)(e)||(this.#E.config.onError?.(e,this),this.#E.config.onSettled?.(this.state.data,e,this)),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return this.#s=(0,r.Mz)({fn:s.fetchFn,abort:a.abort.bind(a),onSuccess:e=>{void 0!==e?(this.setData(e),this.#E.config.onSuccess?.(e,this),this.#E.config.onSettled?.(e,this.state.error,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1):i(new Error(`${this.queryHash} data is undefined`))},onError:i,onFail:(e,t)=>{this.#i({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#i({type:"pause"})},onContinue:()=>{this.#i({type:"continue"})},retry:s.options.retry,retryDelay:s.options.retryDelay,networkMode:s.options.networkMode}),this.#y=this.#s.promise,this.#y}#i(e){this.state=(t=>{switch(e.type){case"failed":return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...t,fetchStatus:"paused"};case"continue":return{...t,fetchStatus:"fetching"};case"fetch":return{...t,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:e.meta??null,fetchStatus:(0,r.Kw)(this.options.networkMode)?"fetching":"paused",...!t.dataUpdatedAt&&{error:null,status:"pending"}};case"success":return{...t,data:e.data,dataUpdateCount:t.dataUpdateCount+1,dataUpdatedAt:e.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const a=e.error;return(0,r.DV)(a)&&a.revert&&this.#k?{...this.#k,fetchStatus:"idle"}:{...t,error:a,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:a,fetchStatus:"idle",status:"error"};case"invalidate":return{...t,isInvalidated:!0};case"setState":return{...t,...e.state}}})(this.state),c.V.batch((()=>{this.#n.forEach((e=>{e.onQueryUpdate()})),this.#E.notify({query:this,type:"updated",action:e})}))}}},77:(e,t,a)=>{"use strict";a.d(t,{t:()=>i});var n=a(1356),c=a(3749),r=a(6673),s=a(2486),i=class extends s.l{constructor(e={}){super(),this.config=e,this.#j=new Map}#j;build(e,t,a){const r=t.queryKey,s=t.queryHash??(0,n.Rm)(r,t);let i=this.get(s);return i||(i=new c.A({cache:this,queryKey:r,queryHash:s,options:e.defaultQueryOptions(t),state:a,defaultOptions:e.getQueryDefaults(r)}),this.add(i)),i}add(e){this.#j.has(e.queryHash)||(this.#j.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=this.#j.get(e.queryHash);t&&(e.destroy(),t===e&&this.#j.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){r.V.batch((()=>{this.getAll().forEach((e=>{this.remove(e)}))}))}get(e){return this.#j.get(e)}getAll(){return[...this.#j.values()]}find(e){const t={exact:!0,...e};return this.getAll().find((e=>(0,n.MD)(t,e)))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter((t=>(0,n.MD)(e,t))):t}notify(e){r.V.batch((()=>{this.listeners.forEach((t=>{t(e)}))}))}onFocus(){r.V.batch((()=>{this.getAll().forEach((e=>{e.onFocus()}))}))}onOnline(){r.V.batch((()=>{this.getAll().forEach((e=>{e.onOnline()}))}))}}},5229:(e,t,a)=>{"use strict";a.d(t,{S:()=>u});var n=a(1356),c=a(77),r=a(9344),s=a(3355),i=a(5433),l=a(6673),o=a(2344),u=class{#_;#r;#c;#z;#N;#x;#Z;#R;constructor(e={}){this.#_=e.queryCache||new c.t,this.#r=e.mutationCache||new r.L,this.#c=e.defaultOptions||{},this.#z=new Map,this.#N=new Map,this.#x=0}mount(){this.#x++,1===this.#x&&(this.#Z=s.j.subscribe((()=>{s.j.isFocused()&&(this.resumePausedMutations(),this.#_.onFocus())})),this.#R=i.N.subscribe((()=>{i.N.isOnline()&&(this.resumePausedMutations(),this.#_.onOnline())})))}unmount(){this.#x--,0===this.#x&&(this.#Z?.(),this.#Z=void 0,this.#R?.(),this.#R=void 0)}isFetching(e){return this.#_.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#r.findAll({...e,status:"pending"}).length}getQueryData(e){return this.#_.find({queryKey:e})?.state.data}ensureQueryData(e){const t=this.getQueryData(e.queryKey);return void 0!==t?Promise.resolve(t):this.fetchQuery(e)}getQueriesData(e){return this.getQueryCache().findAll(e).map((({queryKey:e,state:t})=>[e,t.data]))}setQueryData(e,t,a){const c=this.#_.find({queryKey:e}),r=c?.state.data,s=(0,n.SE)(t,r);if(void 0===s)return;const i=this.defaultQueryOptions({queryKey:e});return this.#_.build(this,i).setData(s,{...a,manual:!0})}setQueriesData(e,t,a){return l.V.batch((()=>this.getQueryCache().findAll(e).map((({queryKey:e})=>[e,this.setQueryData(e,t,a)]))))}getQueryState(e){return this.#_.find({queryKey:e})?.state}removeQueries(e){const t=this.#_;l.V.batch((()=>{t.findAll(e).forEach((e=>{t.remove(e)}))}))}resetQueries(e,t){const a=this.#_,n={type:"active",...e};return l.V.batch((()=>(a.findAll(e).forEach((e=>{e.reset()})),this.refetchQueries(n,t))))}cancelQueries(e={},t={}){const a={revert:!0,...t},c=l.V.batch((()=>this.#_.findAll(e).map((e=>e.cancel(a)))));return Promise.all(c).then(n.ZT).catch(n.ZT)}invalidateQueries(e={},t={}){return l.V.batch((()=>{if(this.#_.findAll(e).forEach((e=>{e.invalidate()})),"none"===e.refetchType)return Promise.resolve();const a={...e,type:e.refetchType??e.type??"active"};return this.refetchQueries(a,t)}))}refetchQueries(e={},t){const a={...t,cancelRefetch:t?.cancelRefetch??!0},c=l.V.batch((()=>this.#_.findAll(e).filter((e=>!e.isDisabled())).map((e=>{let t=e.fetch(void 0,a);return a.throwOnError||(t=t.catch(n.ZT)),"paused"===e.state.fetchStatus?Promise.resolve():t}))));return Promise.all(c).then(n.ZT)}fetchQuery(e){const t=this.defaultQueryOptions(e);void 0===t.retry&&(t.retry=!1);const a=this.#_.build(this,t);return a.isStaleByTime(t.staleTime)?a.fetch(t):Promise.resolve(a.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(n.ZT).catch(n.ZT)}fetchInfiniteQuery(e){return e.behavior=(0,o.Gm)(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(n.ZT).catch(n.ZT)}resumePausedMutations(){return this.#r.resumePausedMutations()}getQueryCache(){return this.#_}getMutationCache(){return this.#r}getDefaultOptions(){return this.#c}setDefaultOptions(e){this.#c=e}setQueryDefaults(e,t){this.#z.set((0,n.Ym)(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#z.values()];let a={};return t.forEach((t=>{(0,n.to)(e,t.queryKey)&&(a={...a,...t.defaultOptions})})),a}setMutationDefaults(e,t){this.#N.set((0,n.Ym)(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#N.values()];let a={};return t.forEach((t=>{(0,n.to)(e,t.mutationKey)&&(a={...a,...t.defaultOptions})})),a}defaultQueryOptions(e){if(e?._defaulted)return e;const t={...this.#c.queries,...e?.queryKey&&this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=(0,n.Rm)(t.queryKey,t)),void 0===t.refetchOnReconnect&&(t.refetchOnReconnect="always"!==t.networkMode),void 0===t.throwOnError&&(t.throwOnError=!!t.suspense),void 0===t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#c.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#_.clear(),this.#r.clear()}}},4e3:(e,t,a)=>{"use strict";a.d(t,{z:()=>l});var n=a(1356),c=a(6673),r=a(3355),s=a(2486),i=a(3963),l=class extends s.l{constructor(e,t){super(),this.options=t,this.#d=e,this.#M=null,this.bindMethods(),this.setOptions(t)}#d;#S=void 0;#L=void 0;#m=void 0;#P;#V;#M;#H;#A;#B;#O;#I;#T;#U=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){1===this.listeners.size&&(this.#S.addObserver(this),o(this.#S,this.options)?this.#D():this.updateResult(),this.#F())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return u(this.#S,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return u(this.#S,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#q(),this.#J(),this.#S.removeObserver(this)}setOptions(e,t){const a=this.options,c=this.#S;if(this.options=this.#d.defaultQueryOptions(e),(0,n.VS)(a,this.options)||this.#d.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#S,observer:this}),void 0!==this.options.enabled&&"boolean"!=typeof this.options.enabled)throw new Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=a.queryKey),this.#G();const r=this.hasListeners();r&&d(this.#S,c,this.options,a)&&this.#D(),this.updateResult(t),!r||this.#S===c&&this.options.enabled===a.enabled&&this.options.staleTime===a.staleTime||this.#W();const s=this.#Q();!r||this.#S===c&&this.options.enabled===a.enabled&&s===this.#T||this.#K(s)}getOptimisticResult(e){const t=this.#d.getQueryCache().build(this.#d,e),a=this.createResult(t,e);return function(e,t){if(!(0,n.VS)(e.getCurrentResult(),t))return!0;return!1}(this,a)&&(this.#m=a,this.#V=this.options,this.#P=this.#S.state),a}getCurrentResult(){return this.#m}trackResult(e){const t={};return Object.keys(e).forEach((a=>{Object.defineProperty(t,a,{configurable:!1,enumerable:!0,get:()=>(this.#U.add(a),e[a])})})),t}getCurrentQuery(){return this.#S}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=this.#d.defaultQueryOptions(e),a=this.#d.getQueryCache().build(this.#d,t);return a.isFetchingOptimistic=!0,a.fetch().then((()=>this.createResult(a,t)))}fetch(e){return this.#D({...e,cancelRefetch:e.cancelRefetch??!0}).then((()=>(this.updateResult(),this.#m)))}#D(e){this.#G();let t=this.#S.fetch(this.options,e);return e?.throwOnError||(t=t.catch(n.ZT)),t}#W(){if(this.#q(),n.sk||this.#m.isStale||!(0,n.PN)(this.options.staleTime))return;const e=(0,n.Kp)(this.#m.dataUpdatedAt,this.options.staleTime)+1;this.#O=setTimeout((()=>{this.#m.isStale||this.updateResult()}),e)}#Q(){return("function"==typeof this.options.refetchInterval?this.options.refetchInterval(this.#S):this.options.refetchInterval)??!1}#K(e){this.#J(),this.#T=e,!n.sk&&!1!==this.options.enabled&&(0,n.PN)(this.#T)&&0!==this.#T&&(this.#I=setInterval((()=>{(this.options.refetchIntervalInBackground||r.j.isFocused())&&this.#D()}),this.#T))}#F(){this.#W(),this.#K(this.#Q())}#q(){this.#O&&(clearTimeout(this.#O),this.#O=void 0)}#J(){this.#I&&(clearInterval(this.#I),this.#I=void 0)}createResult(e,t){const a=this.#S,c=this.options,r=this.#m,s=this.#P,l=this.#V,u=e!==a?e.state:this.#L,{state:h}=e;let p,{error:g,errorUpdatedAt:v,fetchStatus:f,status:w}=h,k=!1;if(t._optimisticResults){const n=this.hasListeners(),r=!n&&o(e,t),s=n&&d(e,a,t,c);(r||s)&&(f=(0,i.Kw)(e.options.networkMode)?"fetching":"paused",h.dataUpdatedAt||(w="pending")),"isRestoring"===t._optimisticResults&&(f="idle")}if(t.select&&void 0!==h.data)if(r&&h.data===s?.data&&t.select===this.#H)p=this.#A;else try{this.#H=t.select,p=t.select(h.data),p=(0,n.oE)(r?.data,p,t),this.#A=p,this.#M=null}catch(e){this.#M=e}else p=h.data;if(void 0!==t.placeholderData&&void 0===p&&"pending"===w){let e;if(r?.isPlaceholderData&&t.placeholderData===l?.placeholderData)e=r.data;else if(e="function"==typeof t.placeholderData?t.placeholderData(this.#B?.state.data,this.#B):t.placeholderData,t.select&&void 0!==e)try{e=t.select(e),this.#M=null}catch(e){this.#M=e}void 0!==e&&(w="success",p=(0,n.oE)(r?.data,e,t),k=!0)}this.#M&&(g=this.#M,p=this.#A,v=Date.now(),w="error");const E="fetching"===f,y="pending"===w,b="error"===w,C=y&&E;return{status:w,fetchStatus:f,isPending:y,isSuccess:"success"===w,isError:b,isInitialLoading:C,isLoading:C,data:p,dataUpdatedAt:h.dataUpdatedAt,error:g,errorUpdatedAt:v,failureCount:h.fetchFailureCount,failureReason:h.fetchFailureReason,errorUpdateCount:h.errorUpdateCount,isFetched:h.dataUpdateCount>0||h.errorUpdateCount>0,isFetchedAfterMount:h.dataUpdateCount>u.dataUpdateCount||h.errorUpdateCount>u.errorUpdateCount,isFetching:E,isRefetching:E&&!y,isLoadingError:b&&0===h.dataUpdatedAt,isPaused:"paused"===f,isPlaceholderData:k,isRefetchError:b&&0!==h.dataUpdatedAt,isStale:m(e,t),refetch:this.refetch}}updateResult(e){const t=this.#m,a=this.createResult(this.#S,this.options);if(this.#P=this.#S.state,this.#V=this.options,void 0!==this.#P.data&&(this.#B=this.#S),(0,n.VS)(a,t))return;this.#m=a;const c={};!1!==e?.listeners&&(()=>{if(!t)return!0;const{notifyOnChangeProps:e}=this.options,a="function"==typeof e?e():e;if("all"===a||!a&&!this.#U.size)return!0;const n=new Set(a??this.#U);return this.options.throwOnError&&n.add("error"),Object.keys(this.#m).some((e=>{const a=e;return this.#m[a]!==t[a]&&n.has(a)}))})()&&(c.listeners=!0),this.#v({...c,...e})}#G(){const e=this.#d.getQueryCache().build(this.#d,this.options);if(e===this.#S)return;const t=this.#S;this.#S=e,this.#L=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#F()}#v(e){c.V.batch((()=>{e.listeners&&this.listeners.forEach((e=>{e(this.#m)})),this.#d.getQueryCache().notify({query:this.#S,type:"observerResultsUpdated"})}))}};function o(e,t){return function(e,t){return!(!1===t.enabled||e.state.dataUpdatedAt||"error"===e.state.status&&!1===t.retryOnMount)}(e,t)||e.state.dataUpdatedAt>0&&u(e,t,t.refetchOnMount)}function u(e,t,a){if(!1!==t.enabled){const n="function"==typeof a?a(e):a;return"always"===n||!1!==n&&m(e,t)}return!1}function d(e,t,a,n){return!1!==a.enabled&&(e!==t||!1===n.enabled)&&(!a.suspense||"error"!==e.state.status)&&m(e,a)}function m(e,t){return e.isStaleByTime(t.staleTime)}},9992:(e,t,a)=>{"use strict";a.d(t,{F:()=>c});var n=a(1356),c=class{#$;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),(0,n.PN)(this.gcTime)&&(this.#$=setTimeout((()=>{this.optionalRemove()}),this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(n.sk?1/0:3e5))}clearGcTimeout(){this.#$&&(clearTimeout(this.#$),this.#$=void 0)}}},3963:(e,t,a)=>{"use strict";a.d(t,{DV:()=>o,Kw:()=>i,Mz:()=>u});var n=a(3355),c=a(5433),r=a(1356);function s(e){return Math.min(1e3*2**e,3e4)}function i(e){return"online"!==(e??"online")||c.N.isOnline()}var l=class{constructor(e){this.revert=e?.revert,this.silent=e?.silent}};function o(e){return e instanceof l}function u(e){let t,a,o,u=!1,d=0,m=!1;const h=new Promise(((e,t)=>{a=e,o=t})),p=()=>!n.j.isFocused()||"always"!==e.networkMode&&!c.N.isOnline(),g=n=>{m||(m=!0,e.onSuccess?.(n),t?.(),a(n))},v=a=>{m||(m=!0,e.onError?.(a),t?.(),o(a))},f=()=>new Promise((a=>{t=e=>{const t=m||!p();return t&&a(e),t},e.onPause?.()})).then((()=>{t=void 0,m||e.onContinue?.()})),w=()=>{if(m)return;let t;try{t=e.fn()}catch(e){t=Promise.reject(e)}Promise.resolve(t).then(g).catch((t=>{if(m)return;const a=e.retry??(r.sk?0:3),n=e.retryDelay??s,c="function"==typeof n?n(d,t):n,i=!0===a||"number"==typeof a&&d{if(p())return f()})).then((()=>{u?v(t):w()}))):v(t)}))};return i(e.networkMode)?w():f().then(w),{promise:h,cancel:t=>{m||(v(new l(t)),e.abort?.())},continue:()=>{const e=t?.();return e?h:Promise.resolve()},cancelRetry:()=>{u=!0},continueRetry:()=>{u=!1}}}},2486:(e,t,a)=>{"use strict";a.d(t,{l:()=>n});var n=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}}},1356:(e,t,a)=>{"use strict";a.d(t,{Ht:()=>y,Kp:()=>i,MD:()=>l,PN:()=>s,Rm:()=>u,SE:()=>r,VS:()=>p,VX:()=>E,X7:()=>o,Ym:()=>d,ZT:()=>c,_v:()=>w,oE:()=>k,sk:()=>n,to:()=>m});var n="undefined"==typeof window||"Deno"in window;function c(){}function r(e,t){return"function"==typeof e?e(t):e}function s(e){return"number"==typeof e&&e>=0&&e!==1/0}function i(e,t){return Math.max(e+(t||0)-Date.now(),0)}function l(e,t){const{type:a="all",exact:n,fetchStatus:c,predicate:r,queryKey:s,stale:i}=e;if(s)if(n){if(t.queryHash!==u(s,t.options))return!1}else if(!m(t.queryKey,s))return!1;if("all"!==a){const e=t.isActive();if("active"===a&&!e)return!1;if("inactive"===a&&e)return!1}return("boolean"!=typeof i||t.isStale()===i)&&((void 0===c||c===t.state.fetchStatus)&&!(r&&!r(t)))}function o(e,t){const{exact:a,status:n,predicate:c,mutationKey:r}=e;if(r){if(!t.options.mutationKey)return!1;if(a){if(d(t.options.mutationKey)!==d(r))return!1}else if(!m(t.options.mutationKey,r))return!1}return(!n||t.state.status===n)&&!(c&&!c(t))}function u(e,t){return(t?.queryKeyHashFn||d)(e)}function d(e){return JSON.stringify(e,((e,t)=>v(t)?Object.keys(t).sort().reduce(((e,a)=>(e[a]=t[a],e)),{}):t))}function m(e,t){return e===t||typeof e==typeof t&&(!(!e||!t||"object"!=typeof e||"object"!=typeof t)&&!Object.keys(t).some((a=>!m(e[a],t[a]))))}function h(e,t){if(e===t)return e;const a=g(e)&&g(t);if(a||v(e)&&v(t)){const n=a?e:Object.keys(e),c=n.length,r=a?t:Object.keys(t),s=r.length,i=a?[]:{};let l=0;for(let c=0;c{setTimeout(t,e)}))}function k(e,t,a){return"function"==typeof a.structuralSharing?a.structuralSharing(e,t):!1!==a.structuralSharing?h(e,t):t}function E(e,t,a=0){const n=[...e,t];return a&&n.length>a?n.slice(1):n}function y(e,t,a=0){const n=[t,...e];return a&&n.length>a?n.slice(0,-1):n}},1696:(e,t,a)=>{"use strict";a.d(t,{NL:()=>s,aH:()=>i});var n=a(9196),c=a(275),r=n.createContext(void 0),s=e=>{const t=n.useContext(r);if(e)return e;if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},i=({client:e,children:t})=>(n.useEffect((()=>(e.mount(),()=>{e.unmount()})),[e]),(0,c.jsx)(r.Provider,{value:e,children:t}))},7503:(e,t,a)=>{"use strict";a.d(t,{_:()=>s});var n=a(9196);a(275);function c(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var r=n.createContext(c()),s=()=>n.useContext(r)},4974:(e,t,a)=>{"use strict";a.d(t,{JN:()=>s,KJ:()=>i,pf:()=>r});var n=a(9196),c=a(4966),r=(e,t)=>{(e.suspense||e.throwOnError)&&(t.isReset()||(e.retryOnMount=!1))},s=e=>{n.useEffect((()=>{e.clearReset()}),[e])},i=({result:e,errorResetBoundary:t,throwOnError:a,query:n})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&(0,c.L)(a,[e.error,n])},5826:(e,t,a)=>{"use strict";a.d(t,{S:()=>r});var n=a(9196),c=n.createContext(!1),r=()=>n.useContext(c);c.Provider},4243:(e,t,a)=>{"use strict";a.d(t,{Fb:()=>n,SB:()=>c,j8:()=>r});var n=e=>{e.suspense&&"number"!=typeof e.staleTime&&(e.staleTime=1e3)},c=(e,t)=>e?.suspense&&t.isPending,r=(e,t,a)=>t.fetchOptimistic(e).catch((()=>{a.clearReset()}))},1841:(e,t,a)=>{"use strict";a.d(t,{r:()=>u});var n=a(9196),c=a(6673),r=a(7503),s=a(1696),i=a(5826),l=a(4974),o=a(4243);function u(e,t,a){const u=(0,s.NL)(a),d=(0,i.S)(),m=(0,r._)(),h=u.defaultQueryOptions(e);h._optimisticResults=d?"isRestoring":"optimistic",(0,o.Fb)(h),(0,l.pf)(h,m),(0,l.JN)(m);const[p]=n.useState((()=>new t(u,h))),g=p.getOptimisticResult(h);if(n.useSyncExternalStore(n.useCallback((e=>{const t=d?()=>{}:p.subscribe(c.V.batchCalls(e));return p.updateResult(),t}),[p,d]),(()=>p.getCurrentResult()),(()=>p.getCurrentResult())),n.useEffect((()=>{p.setOptions(h,{listeners:!1})}),[h,p]),(0,o.SB)(h,g))throw(0,o.j8)(h,p,m);if((0,l.KJ)({result:g,errorResetBoundary:m,throwOnError:h.throwOnError,query:u.getQueryCache().get(h.queryHash)}))throw g.error;return h.notifyOnChangeProps?g:p.trackResult(g)}},2016:(e,t,a)=>{"use strict";a.d(t,{D:()=>l});var n=a(9196),c=a(8507),r=a(6673),s=a(1696),i=a(4966);function l(e,t){const a=(0,s.NL)(t),[l]=n.useState((()=>new c.X(a,e)));n.useEffect((()=>{l.setOptions(e)}),[l,e]);const u=n.useSyncExternalStore(n.useCallback((e=>l.subscribe(r.V.batchCalls(e))),[l]),(()=>l.getCurrentResult()),(()=>l.getCurrentResult())),d=n.useCallback(((e,t)=>{l.mutate(e,t).catch(o)}),[l]);if(u.error&&(0,i.L)(l.options.throwOnError,[u.error]))throw u.error;return{...u,mutate:d,mutateAsync:u.mutate}}function o(){}},5885:(e,t,a)=>{"use strict";a.d(t,{a:()=>r});var n=a(4e3),c=a(1841);function r(e,t){return(0,c.r)(e,n.z,t)}},4966:(e,t,a)=>{"use strict";function n(e,t){return"function"==typeof e?e(...t):!!e}a.d(t,{L:()=>n})},8288:(e,t,a)=>{"use strict";a.d(t,{Z:()=>u});var n=a(6895),c=a(9307),r=a(5736),s=a(3059),i=a(9196),l=a(9430);const __=r.__,o=e=>{const{productId:t,siteRawUrl:a}=e,r=`https://cloud.jetpack.com/landing/${a}`,s=(0,l.F)(t),o={jetpack_anti_spam:{title:__("Jetpack Anti-spam is active!","jetpack-my-jetpack"),text:__("We'll take care of everything from here. Now you can enjoy a spam-free site!","jetpack-my-jetpack")},jetpack_backup:{title:__("Jetpack Backup is active!","jetpack-my-jetpack"),text:(0,c.createInterpolateElement)(__("You can see your backups and restore your site on cloud.jetpack.com. If you ever lose access to your site, you can restore it there.","jetpack-my-jetpack"),{a:i.createElement("a",{href:r})})},jetpack_complete:{title:__("Jetpack Complete is active!","jetpack-my-jetpack"),text:(0,c.createInterpolateElement)(__("You can see your backups, security scans, and restore your site on cloud.jetpack.com. If you ever lose access to your site, you can restore it there.","jetpack-my-jetpack"),{a:i.createElement("a",{href:r})})},jetpack_scan:{title:__("Jetpack Scan is active!","jetpack-my-jetpack"),text:(0,c.createInterpolateElement)(__("You can see your security scans on cloud.jetpack.com.","jetpack-my-jetpack"),{a:i.createElement("a",{href:r})})},jetpack_search:{title:__("Jetpack Search is active!","jetpack-my-jetpack"),text:__("Next, we'll help you customize the Search experience for your visitors.","jetpack-my-jetpack")},jetpack_security:{title:__("Jetpack Security is active!","jetpack-my-jetpack"),text:(0,c.createInterpolateElement)(__("You can see your backups, security scans, and restore your site on cloud.jetpack.com. If you ever lose access to your site, you can restore it there.","jetpack-my-jetpack"),{a:i.createElement("a",{href:r})})},jetpack_videopress:{title:__("Jetpack VideoPress is active!","jetpack-my-jetpack"),text:__("Experience high-quality, ad-free video built specifically for WordPress.","jetpack-my-jetpack")},jetpack_social_advanced:{title:__("Jetpack Social Advanced is active!","jetpack-my-jetpack"),text:(0,c.createInterpolateElement)(__("Create amazing link previews for your posts using Social Image Generator. Learn more here.

          Learn how to make the most out of Jetpack Social here.

          ","jetpack-my-jetpack"),{a:i.createElement("a",{href:(0,n.Z)("jetpack-social-sig-support-page")}),br:i.createElement("br",null),link:i.createElement("a",{href:(0,n.Z)("social-plugin-publicize-support-admin-page")})})},jetpack_social_basic:{title:__("Jetpack Social Basic is active!","jetpack-my-jetpack"),text:(0,c.createInterpolateElement)(__("Enjoy unlimited shares with Jetpack Social Basic. Learn how to make the most out of Jetpack Social here.","jetpack-my-jetpack"),{a:i.createElement("a",{href:(0,n.Z)("social-plugin-publicize-support-admin-page")})})},default:{title:__("Your product is active!","jetpack-my-jetpack"),text:__("You're all set!","jetpack-my-jetpack")}};return i.createElement("div",{className:"jp-license-activation-screen-success-info--product-details"},i.createElement("h1",null,o[s].title," ",String.fromCodePoint(127881)),i.createElement("p",null,o[s].text))};o.propTypes={dashboardUrl:s.string,productId:s.number};const u=o},9430:(e,t,a)=>{"use strict";a.d(t,{F:()=>c,T:()=>r});const n={jetpack_anti_spam:[2110,2111],jetpack_backup:[2100,2101,2102,2103,2112,2113,2114,2115],jetpack_complete:[2014,2015],jetpack_scan:[2106,2107,2108,2109],jetpack_search:[2104,2105],jetpack_security:[2010,2011,2012,2013,2016,2017,2019,2020],jetpack_videopress:[2116,2117],jetpack_social_advanced:[2602,2603,2604],jetpack_social_basic:[2503,2504,2037]};function c(e){return Object.keys(n).find((t=>n[t].includes(e)))||"default"}function r(e){return window.myJetpackInitialState?.plugins?.[e]?.active}}},t={};function a(n){var c=t[n];if(void 0!==c)return c.exports;var r=t[n]={exports:{}};return e[n](r,r.exports,a),r.exports}a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},a.d=(e,t)=>{for(var n in t)a.o(t,n)&&!a.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},a.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e;a.g.importScripts&&(e=a.g.location+"");var t=a.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");n.length&&(e=n[n.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),a.p=e})(),(()=>{"use strict";var e=a(8275),t=a(5229),n=a(1696),c=a(9307),r=a(9196),s=a.n(r),i=a(6417),l=a(9997),o=a(1899),u=a(17),d=a(8966),m=a(8093),h=a(4257),p=a(673),g=a(8209),v=a(8437),f=a(1838);a(5878);function w(){const e=(0,i.TH)();return(0,r.useEffect)((()=>window.scrollTo(0,0)),[e]),null}const k=()=>{const a=new t.S,{loadAddLicenseScreen:c}=(0,f.$9)();return s().createElement(e.ZP,null,s().createElement(v.Z,null,s().createElement(n.aH,{client:a},s().createElement(l.UT,null,s().createElement(w,null),s().createElement(i.Z5,null,s().createElement(i.AW,{path:g.xB.Home,element:s().createElement(d.Z,null)}),s().createElement(i.AW,{path:g.xB.Connection,element:s().createElement(u.Z,null)}),s().createElement(i.AW,{path:g.xB.AddAkismet,element:s().createElement(m.q,null)}),s().createElement(i.AW,{path:g.xB.AddAntiSpam,element:s().createElement(i.Fg,{replace:!0,to:g.xB.AddAkismet})}),s().createElement(i.AW,{path:g.xB.AddBackup,element:s().createElement(m.qA,null)}),s().createElement(i.AW,{path:g.xB.AddBoost,element:s().createElement(m.WJ,null)}),s().createElement(i.AW,{path:g.xB.AddCRM,element:s().createElement(m.B$,null)}),s().createElement(i.AW,{path:g.xB.AddCreator,element:s().createElement(m.Wf,null)}),s().createElement(i.AW,{path:g.xB.AddJetpackAI,element:s().createElement(h.Z,null)}),s().createElement(i.AW,{path:g.xB.AddExtras,element:s().createElement(m.Yi,null)}),s().createElement(i.AW,{path:g.xB.AddProtect,element:s().createElement(m.jO,null)}),s().createElement(i.AW,{path:g.xB.AddScan,element:s().createElement(m.Q5,null)}),s().createElement(i.AW,{path:g.xB.AddSocial,element:s().createElement(m.y$,null)}),s().createElement(i.AW,{path:g.xB.AddSearch,element:s().createElement(m.uw,null)}),s().createElement(i.AW,{path:g.xB.AddVideoPress,element:s().createElement(m.Jw,null)}),s().createElement(i.AW,{path:g.xB.AddStats,element:s().createElement(m.r,null)}),c&&s().createElement(i.AW,{path:g.xB.AddLicense,element:s().createElement(o.Z,null)}),s().createElement(i.AW,{path:g.xB.RedeemToken,element:s().createElement(p.Z,null)}))))))};!function(){const e=document.getElementById("my-jetpack-container");null!==e&&(0,c.createRoot)(e).render(s().createElement(k,null))}()})()})(); \ No newline at end of file diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/index.js.LICENSE.txt b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/index.js.LICENSE.txt deleted file mode 100644 index f10fd1af..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/index.js.LICENSE.txt +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Exposes number format capability - * - * @copyright Copyright (c) 2013 Kevin van Zonneveld (http://kvz.io) and Contributors (http://phpjs.org/authors). - * @license See CREDITS.md - * @see https://github.com/kvz/phpjs/blob/ffe1356af23a6f2512c84c954dd4e828e92579fa/functions/strings/number_format.js - */ - -/*! - Copyright (c) 2018 Jed Watson. - Licensed under the MIT License (MIT), see - http://jedwatson.github.io/classnames -*/ - -/** - * @license React - * react-jsx-runtime.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -/** - * @remix-run/router v1.2.1 - * - * Copyright (c) Remix Software Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE.md file in the root directory of this source tree. - * - * @license MIT - */ - -/** - * React Router DOM v6.6.2 - * - * Copyright (c) Remix Software Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE.md file in the root directory of this source tree. - * - * @license MIT - */ - -/** - * React Router v6.6.2 - * - * Copyright (c) Remix Software Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE.md file in the root directory of this source tree. - * - * @license MIT - */ diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/index.rtl.css b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/index.rtl.css deleted file mode 100644 index 2bdfa9c7..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/build/index.rtl.css +++ /dev/null @@ -1 +0,0 @@ -#my-jetpack-container{--wp-admin-theme-color:var(--jp-black);--wp-admin-theme-color-darker-10:var(--jp-black-80);--wp-admin-theme-color-darker-20:var(--jp-black-80);height:100%}#my-jetpack-container .jp-dashboard-footer__jetpack-symbol{height:16px}#wpbody-content>.notice{display:none!important}#wpwrap{background-color:var(--jp-white-off)}._fUXxnSp5pagKBp9gSN7 *{box-sizing:border-box}.jErCC9oKHSM15BxzFyQK{margin-bottom:0}.oVoYbwbFB6U2o90Njusk{border:1px solid var(--jp-gray);border-radius:var(--jp-border-radius);border-right:6px solid var(--jp-red-50);box-shadow:0 4px 8px rgba(0,0,0,.03),0 1px 2px rgba(0,0,0,.06);color:var(--jp-gray-80);font-size:16px;line-height:22px;margin:0;padding:calc(var(--spacing-base)*2) calc(var(--spacing-base)*3) calc(var(--spacing-base)*2) calc(var(--spacing-base)*3)}.oVoYbwbFB6U2o90Njusk.is-error{background-color:var(--jp-white)}.oVoYbwbFB6U2o90Njusk .components-notice__content{align-items:flex-start;display:flex;flex-direction:column;margin:0;padding:12px 4px}.oVoYbwbFB6U2o90Njusk .is-link{color:var(--jp-black);font-size:16px;font-weight:600}.oVoYbwbFB6U2o90Njusk .components-notice__dismiss{align-self:center}.oVoYbwbFB6U2o90Njusk .components-notice__action{align-items:center;background:#000;border-radius:var(--jp-border-radius);color:var(--jp-white);cursor:pointer;font-size:16px;font-weight:600;height:auto;justify-content:center;letter-spacing:-.01em;line-height:24px;margin-right:calc(var(--spacing-base)*2 + 24px);margin-top:24px;padding:8px 24px;text-decoration:none}.oVoYbwbFB6U2o90Njusk.Snc8NEmDelsbhlH4285s .components-notice__action{margin-right:0;margin-top:0;white-space:nowrap}.oVoYbwbFB6U2o90Njusk.Snc8NEmDelsbhlH4285s .components-notice__content{align-items:center;flex-direction:row}.wBVXH4OTNwLHPRpN4nsq{display:flex;flex-grow:1;margin-left:var(--spacing-base)}.wBVXH4OTNwLHPRpN4nsq>svg{fill:var(--jp-red-60);align-self:flex-start;flex-shrink:0;margin-left:calc(var(--spacing-base)*2)}.wBVXH4OTNwLHPRpN4nsq>svg.F1qvEnFfHs5nz3zFZUOV{fill:none}.pIsYsXFAJ9KX2VrS5rmY{min-height:200px}.gmPKCDKZcfQt9WieTyKS{flex-grow:1}.fDBaV7I4yUO6w5AWVEtr{align-items:center;display:flex;flex-wrap:wrap;justify-content:space-between;margin-top:calc(var(--spacing-base)*3);min-height:28px;width:100%}.SelsBZT7eIWRQyl1dasZ{display:flex;gap:var(--spacing-base);justify-content:flex-start}.LHYJUrOej3toDvOAiz4k{align-items:center;display:flex;gap:var(--spacing-base);justify-content:space-between;margin-bottom:calc(var(--spacing-base)*.5);width:100%}.LHYJUrOej3toDvOAiz4k h3{font-weight:700;line-height:28px}.JFjbc0JgC4qC92ehOiUr{display:flex;position:relative}.JFjbc0JgC4qC92ehOiUr .NBZgqk_CGGfY3Q16OHjT{align-items:center;border:.5px solid var(--jp-black);border-bottom-left-radius:var(--jp-border-radius);border-top-left-radius:var(--jp-border-radius);box-shadow:inset 0 0 0 1px var(--jp-black);cursor:pointer;display:flex;justify-content:center;padding:0}.JFjbc0JgC4qC92ehOiUr .Jh6TlOGQNgBwU_fFxPrm{background-color:var(--jp-black);margin-right:.5px}.JFjbc0JgC4qC92ehOiUr .VBxTkBZVxHaVoyhMRJcz{background-color:var(--jp-white);border-right-width:0;margin-right:-.5px}.UZ3NDyOSbGY9NZWb3bUD{background:var(--jp-white);border-radius:calc(var(--jp-border-radius)/2);box-shadow:0 1px 1px 0 rgba(0,0,0,.1),0 1px 1.5px 0 rgba(0,0,0,.1),0 2px 3px -.5px rgba(0,0,0,.1);padding:var(--spacing-base);position:absolute;right:0;top:calc(100% + var(--spacing-base))}.UZ3NDyOSbGY9NZWb3bUD .IpJGe_nvXXUiBOsAOkaV{align-items:center;background-color:var(--jp-white);border:none;cursor:pointer;display:flex;gap:calc(var(--spacing-base)*7);padding:var(--spacing-base);width:100%}.UZ3NDyOSbGY9NZWb3bUD .IpJGe_nvXXUiBOsAOkaV:hover{background-color:var(--jp-gray-0)}.UZ3NDyOSbGY9NZWb3bUD .SjzpxiAAVsU_xRrw55ub{align-items:center;display:flex;font-size:var(--font-label);gap:calc(var(--spacing-base)*.5)}.UZ3NDyOSbGY9NZWb3bUD .GQy61X1G7Wv3L3erNwxR{background-color:var(--jp-green-50);height:25px;width:25px}.QSePbRSFylCvM2cX8nN_ a,.QSePbRSFylCvM2cX8nN_ button{border-bottom-left-radius:0;border-top-left-radius:0}.f5VJYwuJmjxH8PVxEbbv{align-items:center;display:flex;height:28px;white-space:nowrap}.f5VJYwuJmjxH8PVxEbbv:before{border-radius:50%;content:"";display:inline-block;height:8px;margin-left:var(--spacing-base);width:8px}.f5VJYwuJmjxH8PVxEbbv.ry3pxoGtmQ0ZeSwp7F_3{color:var(--jp-green-50)}.f5VJYwuJmjxH8PVxEbbv.ry3pxoGtmQ0ZeSwp7F_3:before{background:var(--jp-green-50)}.f5VJYwuJmjxH8PVxEbbv.LZzE3EG7m3CDR46wwwEr{color:var(--jp-gray-50)}.f5VJYwuJmjxH8PVxEbbv.LZzE3EG7m3CDR46wwwEr:before{background:var(--jp-gray-50)}.f5VJYwuJmjxH8PVxEbbv.TZUP7W6QYGajITiMNYas{color:var(--jp-yellow-40)}.f5VJYwuJmjxH8PVxEbbv.TZUP7W6QYGajITiMNYas:before{background:var(--jp-yellow-40)}.f5VJYwuJmjxH8PVxEbbv.Vx_jpT02r8W6NfsRSB02{color:var(--jp-red-60)}.f5VJYwuJmjxH8PVxEbbv.Vx_jpT02r8W6NfsRSB02:before{background:var(--jp-red-60)}.f5VJYwuJmjxH8PVxEbbv.PdsJCfyyjSgrNDheF2qi:before{animation:dWP7ypkVXudMbAa38W5Z .5s linear infinite}@keyframes dWP7ypkVXudMbAa38W5Z{0%{opacity:0}50%{opacity:.5}to{opacity:0}}.zI5tJ_qhWE6Oe6Lk75GY{--wp-admin-theme-color:var(--jp-black);--wp-admin-theme-color-darker-10:var(--jp-black-80);--wp-admin-theme-color-darker-20:var(--jp-black-80);--wp-admin-border-width-focus:1.51px;border-radius:var(--jp-border-radius);font-weight:600;justify-content:center}.zI5tJ_qhWE6Oe6Lk75GY.tuBt2DLqimiImoqVzPqo{height:calc(var(--spacing-base)*5);padding:var(--spacing-base);width:calc(var(--spacing-base)*5)}.zI5tJ_qhWE6Oe6Lk75GY.tuBt2DLqimiImoqVzPqo>svg:first-child{margin:0;padding:0}.zI5tJ_qhWE6Oe6Lk75GY.tuBt2DLqimiImoqVzPqo.Na39I683LAaSA99REg14{height:calc(var(--spacing-base)*4);min-width:calc(var(--spacing-base)*4);padding:calc(var(--spacing-base)/2);width:calc(var(--spacing-base)*4)}.zI5tJ_qhWE6Oe6Lk75GY.ipS7tKy9GntCS4R3vekF:not(.tuBt2DLqimiImoqVzPqo){font-size:var(--font-body);height:auto;line-height:24px;padding:var(--spacing-base) calc(var(--spacing-base)*3)}.zI5tJ_qhWE6Oe6Lk75GY.ipS7tKy9GntCS4R3vekF:not(.tuBt2DLqimiImoqVzPqo).paGLQwtPEaJmtArCcmyK{padding:var(--spacing-base) calc(var(--spacing-base)*2)}.zI5tJ_qhWE6Oe6Lk75GY.Na39I683LAaSA99REg14:not(.tuBt2DLqimiImoqVzPqo){font-size:var(--font-body-extra-small);height:auto;line-height:20px;padding:calc(var(--spacing-base)/2) var(--spacing-base)}.zI5tJ_qhWE6Oe6Lk75GY.Na39I683LAaSA99REg14:not(.tuBt2DLqimiImoqVzPqo).paGLQwtPEaJmtArCcmyK>svg:first-child{margin-left:calc(var(--spacing-base)/2)}.zI5tJ_qhWE6Oe6Lk75GY.Na39I683LAaSA99REg14:not(.tuBt2DLqimiImoqVzPqo)>.components-spinner{height:20px}.zI5tJ_qhWE6Oe6Lk75GY.lZAo6_oGfclXOO9CC6Rd{font-weight:400}.zI5tJ_qhWE6Oe6Lk75GY.xJDOiJxTt0R_wSl8Ipz_{min-width:100%}.zI5tJ_qhWE6Oe6Lk75GY.is-primary:disabled,.zI5tJ_qhWE6Oe6Lk75GY.is-secondary:disabled{background:var(--jp-gray);color:var(--jp-gray-20)}.zI5tJ_qhWE6Oe6Lk75GY.is-secondary{background:var(--jp-white);box-shadow:inset 0 0 0 1.51px var(--jp-black)}.zI5tJ_qhWE6Oe6Lk75GY.is-secondary:active:not(:disabled),.zI5tJ_qhWE6Oe6Lk75GY.is-secondary:hover:not(:disabled){background:var(--jp-gray-0)}.zI5tJ_qhWE6Oe6Lk75GY.is-link.Na39I683LAaSA99REg14,.zI5tJ_qhWE6Oe6Lk75GY.is-link.ipS7tKy9GntCS4R3vekF{padding:0}.zI5tJ_qhWE6Oe6Lk75GY.is-link:hover:not(:disabled){text-decoration-thickness:3px}.zI5tJ_qhWE6Oe6Lk75GY.is-link:focus:not(:disabled){text-decoration-line:none}.zI5tJ_qhWE6Oe6Lk75GY.is-destructive.is-primary{box-shadow:none}.zI5tJ_qhWE6Oe6Lk75GY.is-destructive.is-primary:not(:disabled){background:var(--jp-red-50);box-shadow:inset 0 0 0 1px var(--jp-red-50);color:var(--jp-white)}.zI5tJ_qhWE6Oe6Lk75GY.is-destructive.is-primary:hover:not(:disabled){background:var(--jp-red-60);box-shadow:inset 0 0 0 1px var(--jp-red-60)}.zI5tJ_qhWE6Oe6Lk75GY.is-destructive.is-primary:focus:not(:disabled){background:var(--jp-red-70);box-shadow:inset 0 0 0 1px var(--jp-white),0 0 0 var(--wp-admin-border-width-focus) var(--jp-red-70);color:var(--jp-white)}.zI5tJ_qhWE6Oe6Lk75GY.is-destructive.is-primary:active:not(:disabled){background:var(--jp-red-50)}.zI5tJ_qhWE6Oe6Lk75GY.is-destructive.is-secondary{box-shadow:none}.zI5tJ_qhWE6Oe6Lk75GY.is-destructive.is-secondary:not(:disabled){background:var(--jp-white);box-shadow:inset 0 0 0 1.5px var(--jp-red-50);color:var(--jp-red-50)}.zI5tJ_qhWE6Oe6Lk75GY.is-destructive.is-secondary:hover:not(:disabled){background:var(--jp-red-0);box-shadow:inset 0 0 0 1.5px var(--jp-red-60);color:var(--jp-red-60)}.zI5tJ_qhWE6Oe6Lk75GY.is-destructive.is-secondary:focus:not(:disabled){box-shadow:inset 0 0 0 1px var(--jp-white),0 0 0 var(--wp-admin-border-width-focus) var(--jp-red-70);color:var(--jp-red-70)}.zI5tJ_qhWE6Oe6Lk75GY.is-destructive.is-secondary:active:not(:disabled){background:var(--jp-gray-0)}.zI5tJ_qhWE6Oe6Lk75GY.is-destructive.is-link:not(:disabled){color:var(--jp-red-50)}.zI5tJ_qhWE6Oe6Lk75GY.is-destructive.is-link:hover:not(:disabled){box-shadow:none;color:var(--jp-red-60)}.zI5tJ_qhWE6Oe6Lk75GY.is-destructive.is-link:focus:not(:disabled){box-shadow:inset 0 0 0 1px var(--jp-white),0 0 0 var(--wp-admin-border-width-focus) var(--jp-red-70);color:var(--jp-red-70)}.zI5tJ_qhWE6Oe6Lk75GY.q_tVWqMjl39RcY6WtQA6{position:relative}.zI5tJ_qhWE6Oe6Lk75GY.q_tVWqMjl39RcY6WtQA6.has-icon{justify-content:center}.zI5tJ_qhWE6Oe6Lk75GY.q_tVWqMjl39RcY6WtQA6>:not(.components-spinner){visibility:hidden}.zI5tJ_qhWE6Oe6Lk75GY.q_tVWqMjl39RcY6WtQA6>.components-spinner{margin:0;position:absolute}.CDuBjJp_8jxzx5j6Nept{margin-right:calc(var(--spacing-base)/2)}.urouayitSUT8zW0V3p_0{margin-bottom:0}.iXXJlk08gFDeCvsTTlNQ{border:1px solid var(--jp-gray);border-radius:var(--jp-border-radius);border-right:6px solid var(--jp-red-50);box-shadow:0 4px 8px rgba(0,0,0,.03),0 1px 2px rgba(0,0,0,.06);box-sizing:border-box;color:var(--jp-gray-80);font-size:16px;line-height:22px;margin:0;padding:calc(var(--spacing-base)*2) calc(var(--spacing-base)*3) calc(var(--spacing-base)*2) calc(var(--spacing-base)*3)}.iXXJlk08gFDeCvsTTlNQ.is-error{background-color:var(--jp-white)}.iXXJlk08gFDeCvsTTlNQ .components-notice__content{align-items:flex-start;display:flex;flex-direction:column;margin:0;padding:12px 4px}.iXXJlk08gFDeCvsTTlNQ .is-link{color:var(--jp-black);font-size:16px;font-weight:600}.iXXJlk08gFDeCvsTTlNQ .components-notice__dismiss{align-self:center}.iXXJlk08gFDeCvsTTlNQ .MWqRqr7q6fgvLxitcWYk,.iXXJlk08gFDeCvsTTlNQ .MWqRqr7q6fgvLxitcWYk:active,.iXXJlk08gFDeCvsTTlNQ .MWqRqr7q6fgvLxitcWYk:hover,.iXXJlk08gFDeCvsTTlNQ .MWqRqr7q6fgvLxitcWYk:visited{align-items:center;background:#000;border-radius:var(--jp-border-radius);color:var(--jp-white);cursor:pointer;font-size:16px;font-weight:600;justify-content:center;letter-spacing:-.01em;line-height:24px;margin-right:calc(var(--spacing-base)*2 + 24px);margin-top:24px;padding:8px 24px;text-decoration:none}.iXXJlk08gFDeCvsTTlNQ.YLcXAoc82nypTPaKSAcd .MWqRqr7q6fgvLxitcWYk,.iXXJlk08gFDeCvsTTlNQ.YLcXAoc82nypTPaKSAcd .MWqRqr7q6fgvLxitcWYk:active,.iXXJlk08gFDeCvsTTlNQ.YLcXAoc82nypTPaKSAcd .MWqRqr7q6fgvLxitcWYk:hover,.iXXJlk08gFDeCvsTTlNQ.YLcXAoc82nypTPaKSAcd .MWqRqr7q6fgvLxitcWYk:visited{margin-right:0;margin-top:0;white-space:nowrap}.iXXJlk08gFDeCvsTTlNQ.YLcXAoc82nypTPaKSAcd .components-notice__content{align-items:center;flex-direction:row}.e6hHy8BZ7ZKPSXbIC0UG{margin-bottom:25px}.jXz8LnXNzMDdtHqkG0sZ{display:flex;flex-grow:1;margin-left:var(--spacing-base)}.jXz8LnXNzMDdtHqkG0sZ>svg{align-self:flex-start;flex-shrink:0}.jXz8LnXNzMDdtHqkG0sZ .jp-components-spinner,.jXz8LnXNzMDdtHqkG0sZ>svg{margin-left:calc(var(--spacing-base)*2)}@keyframes rotate-spinner{to{transform:rotate(-1turn)}}.jp-components-spinner{align-items:center;display:flex}.jp-components-spinner__inner,.jp-components-spinner__outer{animation:3s linear infinite;animation-name:rotate-spinner;border:.1em solid transparent;border-radius:50%;box-sizing:border-box;margin:auto}.jp-components-spinner__outer{border-top-color:#fff}.jp-components-spinner__inner{border-left-color:#fff;border-top-color:#fff;height:100%;opacity:.4;width:100%}.sexr0jUxC1jVixdKiDnC{margin-right:-20px}@media(max-width:782px){.sexr0jUxC1jVixdKiDnC{margin-right:-10px}}.sexr0jUxC1jVixdKiDnC.vKQ11sLeAM45M04P1ccj{background-color:var(--jp-white)}.SqdhUZkXCRuIpErj1B3z{--max-container-width:1128px;--vertical-gutter:24px;--horizontal-spacing:8px;column-gap:var(--vertical-gutter);display:grid;margin:0 auto;max-width:var(--max-container-width);width:100%}@media(max-width:599px){.SqdhUZkXCRuIpErj1B3z{grid-template-columns:repeat(4,minmax(0,1fr));padding:0 16px}}@media(min-width:600px)and (max-width:959px){.SqdhUZkXCRuIpErj1B3z{grid-template-columns:repeat(8,minmax(0,1fr));padding:0 18px}}@media(min-width:960px){.SqdhUZkXCRuIpErj1B3z{grid-template-columns:repeat(12,minmax(0,1fr));padding:0 24px}}.SqdhUZkXCRuIpErj1B3z.OZC_9a1LhpWF9dv15Gdh{max-width:none;padding:unset}@media(max-width:599px){.RuVLl3q4lxTQa3wbhBJB{grid-column-end:span 1}.f9LZTRG4MMK42rS89afW{grid-column-start:1}.bHe_zKxjjpUwHw_MdYE1{grid-column-end:2}.QZbNrOqE2aNSn50xVhpU{grid-column-end:span 2}.ev7W3z7zVYPeHAlYqZjf{grid-column-start:2}.NJWd1m_e7lOiPYru2ZMP{grid-column-end:3}.Xc6nt1Qc1DI0Z2A3gt1r{grid-column-end:span 3}.UIcN_GXiPRoIsin8Kohg{grid-column-start:3}.GRKCyqb5LufCSCgykKFc{grid-column-end:4}.i_qTq8gqhhC3vIUepVRB{grid-column-end:span 4}.G3qaZ3Jpbvam_1XvGxgc{grid-column-start:4}.VRCNYKZtO9zukEwmgP1y{grid-column-end:5}}@media(min-width:600px)and (max-width:959px){.tRm008K_WJL79WoNZTNL{grid-column-end:span 1}.l5T2P_bgKts4tdaRkS1d{grid-column-start:1}.zOCxfLZpF6BlgC7a_Yq1{grid-column-end:2}.F80DdgVn0m5OpvtSQWka{grid-column-end:span 2}.oI1c7JYfiJtMQHbhngtU{grid-column-start:2}.pMQtA_4jh1_1lVknqEP5{grid-column-end:3}.VenqMpdgyKQVUNNQcfqd{grid-column-end:span 3}.seNYL99uoczf9V4MxBxT{grid-column-start:3}.YKfF1HFhI9KygA5l3b2J{grid-column-end:4}.yAi0Cv1xDWkoqsaUhvhR{grid-column-end:span 4}.ubhnyZOnkgxNhh6XtVWv{grid-column-start:4}.RGOPGQbWMJ9Ei5oFxS7X{grid-column-end:5}.Sz1E2aWbX483ijdi6yge{grid-column-end:span 5}.tku6_bRYrX9tMbgYGmIl{grid-column-start:5}.b5JHttOhSEcI1WBlqAjk{grid-column-end:6}.FboSx5MoKTAWbxXyYlCw{grid-column-end:span 6}.Jhs8yEEmodG30edbJvag{grid-column-start:6}.IpzbbKVqEqPcfIGkXkwt{grid-column-end:7}.mhCPwfAZ4Kmm_empzJAq{grid-column-end:span 7}.x034ilrJF7rO9UJB2rI1{grid-column-start:7}.Wt8t2e16viRrOJ1lLA5v{grid-column-end:8}.S6pIrEy9AMLKx9bgh_Ae{grid-column-end:span 8}.kEfI4tGyuWfHTlRnvIab{grid-column-start:8}.PUzX4RRsKq1dnsz3gebS{grid-column-end:9}}@media(min-width:960px){.X_pdcLJikd8LS_YAdJlB{grid-column-end:span 1}.tl936d14Huby4khYp05X{grid-column-start:1}.hnge0LnR69d3NXEtEE1t{grid-column-end:2}.fj0NUMuyZQcPNgKcjp5Z{grid-column-end:span 2}.R2ncBX7a2NigdYCcV1OX{grid-column-start:2}.t8vMSDVYno9k9itRwnXb{grid-column-end:3}.wsDuEN2GqHx6qzo8dUdk{grid-column-end:span 3}.cIEVPUweWtLBy3xaXnMx{grid-column-start:3}.fajUWBwu1m2B479j3jmz{grid-column-end:4}.YR0c7fQTgMkDdWzwSyLp{grid-column-end:span 4}.xlwp8BmplxkKNMI7gamo{grid-column-start:4}._C4O1w9DUqx1m3gPf8aA{grid-column-end:5}.Z54F1hAErckAIrKlxnXW{grid-column-end:span 5}.ezSDWkRHmKSxDJXxuiOH{grid-column-start:5}.T0ChoeAjGJjkkNrYhD4g{grid-column-end:6}.qtMoMPF6yHvGJnWHSsde{grid-column-end:span 6}.gdoywN5VPiWERfIBqkph{grid-column-start:6}.wUev_VH5uf_pwFFlbnAU{grid-column-end:7}.egIPDFJsOpownTClq9XP{grid-column-end:span 7}.yGhp9yoAW7k0kQik9AB7{grid-column-start:7}.SJ43U9mR5wUg5V2qBeQA{grid-column-end:8}.cTuyHfMwSUJxN_HdIEgd{grid-column-end:span 8}.smCr8DaIagcumdvdldiK{grid-column-start:8}.T03NHzQJvzwL6wAfIiTL{grid-column-end:9}.pMvxM3RJGjqyNdf9qg1Y{grid-column-end:span 9}.iIVpNRwEnQ_JI5gpp9EN{grid-column-start:9}.ZbQ4u4vGSX5rJOje4uGL{grid-column-end:10}.gKb5wuIDAlKGbrjK2vxy{grid-column-end:span 10}.Z7pINdImE2WJiYnZBTqm{grid-column-start:10}.ZTxp6qpvwurMdOnLLSz1{grid-column-end:11}.NnQTlbfnxPDR6cQ7rygg{grid-column-end:span 11}.O137wZd6Yl0olSA9PsXR{grid-column-start:11}.zf2OJtQ2MPz6SDoh6CB0{grid-column-end:12}.U3H6UHW6HqRt9hdzVg3O{grid-column-end:span 12}.zynnNeS_ZBTxABcVpUQH{grid-column-start:12}.vI8tltFZtFUNAy9Iag9s{grid-column-end:13}}.jp-dashboard-footer{align-items:center;color:var(--jp-black);display:flex;flex-wrap:wrap;font-size:var(--font-body-extra-small);line-height:1.333;max-width:1128px;width:100%}.jp-dashboard-footer a{text-decoration:none}.jp-dashboard-footer a:any-link,.jp-dashboard-footer a[role=button]{color:inherit}.jp-dashboard-footer a:hover{text-decoration:underline;text-decoration-thickness:1.5px}.jp-dashboard-footer a:focus{border-radius:2px;box-shadow:none;outline:1.5px solid currentColor;outline-offset:3px}.jp-dashboard-footer.is-sm>ul{gap:.125rem}.jp-dashboard-footer.is-md,.jp-dashboard-footer.is-sm>ul{align-items:flex-start;flex-direction:column}.jp-dashboard-footer>ul{align-items:center;display:flex;flex-wrap:wrap;gap:1rem;list-style:none;margin:0;padding:0;width:100%}.jp-dashboard-footer>ul>li{margin-bottom:0}.jp-dashboard-footer>ul>li>a{align-items:center;display:flex;gap:.25rem;min-height:44px}.jp-dashboard-footer__accessible-external-link{border:0;clip:rect(1px,1px,1px,1px);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;overflow-wrap:normal;padding:0;position:absolute;width:1px}.jp-dashboard-footer__jp-item{font-weight:600;padding-inline-end:1rem}.jp-dashboard-footer.is-sm .jp-dashboard-footer__jp-item{padding-bottom:1rem}.jp-dashboard-footer.is-lg .jp-dashboard-footer__a8c-item{margin-inline-start:auto}.jp-dashboard-footer.is-sm .jp-dashboard-footer__a8c-item{padding-top:1rem}.jp-dashboard-footer__a8c-item>a,.jp-dashboard-footer__jp-item>a{text-decoration:none}.HeJe1crc9XaWWpLvIPit .components-modal__frame{border-bottom-right-radius:4px;border-right:4px solid #e68b28;border-top-right-radius:4px;max-height:100%}.HeJe1crc9XaWWpLvIPit .components-modal__content{margin-top:0;padding:0}.HeJe1crc9XaWWpLvIPit .components-modal__header{display:none}.HeJe1crc9XaWWpLvIPit .or0JUScxkJPmNsfrxkEK .jp-idc__idc-screen{border:0}.vMa4i_Dza2t5Zi_Bw9Nf{background:var(--jp-white-off)}.biqv3OiSCRunE35s4DC6{position:relative}.biqv3OiSCRunE35s4DC6>.T0VRsfCJrRslmORTYa8X{overflow:hidden;padding:0}.biqv3OiSCRunE35s4DC6>.v77JdlkwyPAXfzeRW4DQ{background-color:var(--jp-white);border-radius:50%;box-shadow:0 0 5px 1px rgba(0,0,0,.1);left:16px;padding:8px;position:absolute;top:16px;transform:scale(.75)}.biqv3OiSCRunE35s4DC6>.v77JdlkwyPAXfzeRW4DQ:focus,.biqv3OiSCRunE35s4DC6>.v77JdlkwyPAXfzeRW4DQ:hover{background-color:var(--jp-white)}.UQccyTHMg7XnAWr5VSGt{margin-top:24px}.SpY2tzcf1aTWPaBpAaQU{padding:0}._G5mdH1mZpQzrtTJKHAO{padding:24px 16px}@media screen and (min-width:600){._G5mdH1mZpQzrtTJKHAO{padding:32px 24px}}@media screen and (min-width:960px){._G5mdH1mZpQzrtTJKHAO{padding:48px 48px 48px 12px}}.g2nzjIQcPzgwZqW4523t{background-image:url(images/site-cards-143fca7aec7a8c370e82.png),radial-gradient(circle at 90% 30%,rgba(6,158,8,.15) 0,hsla(0,0%,100%,0) 35%),radial-gradient(circle at 75% 65%,rgba(206,217,242,.5) 5%,hsla(0,0%,100%,0) 15%),radial-gradient(circle at 90% 90%,hsla(46,77%,83%,.5) 0,hsla(0,0%,100%,0) 25%);background-repeat:no-repeat;background-size:cover}@media screen and (max-width:960px){.g2nzjIQcPzgwZqW4523t{background-image:url(images/site-cards-143fca7aec7a8c370e82.png),radial-gradient(circle at 55% 30%,rgba(6,158,8,.15) 0,hsla(0,0%,100%,0) 100%),radial-gradient(circle at 25% 40%,rgba(206,217,242,.5) 5%,hsla(0,0%,100%,0) 50%),radial-gradient(circle at 50% 85%,hsla(46,77%,83%,.3) 0,hsla(0,0%,100%,0) 35%);min-height:160px;order:-1}}.OpMBda4vebhRbW8Fm6YC{background:var(--jp-white);border:1px solid var(--jp-gray-5);border-radius:var(--jp-border-radius-rna);box-shadow:0 4px 12px 0 rgba(0,0,0,.06);display:flex;flex-direction:column;height:100%;padding:calc(var(--spacing-base)*3)}.OpMBda4vebhRbW8Fm6YC.BghJAx9hSagUdHWOUaYE{background:none;background-color:var(--jp-white-off);color:var(--jp-black-80);text-decoration:none}.OpMBda4vebhRbW8Fm6YC.BghJAx9hSagUdHWOUaYE:focus{background-color:var(--jp-white);box-shadow:0 0 0 1.5px var(--jp-black);outline:3px solid transparent}.OpMBda4vebhRbW8Fm6YC.IWsEW5nnNWUqqcT3K5L1{box-shadow:0 0 0 1.5px var(--jp-red-60)}.r3UCwgwCthua6lDCvIBI{align-items:center;display:flex;gap:var(--spacing-base);justify-content:space-between;margin-bottom:var(--spacing-base);width:100%}.r3UCwgwCthua6lDCvIBI h3{font-weight:700}.vpluqUMgmwx9_f8wCVIn{align-items:center;display:flex;flex-wrap:wrap-reverse;gap:var(--spacing-base);height:100%}.WQVtrU6q0L1Igcj7wCrQ{margin:0;padding:0}.UujoBFTnQNY2cWU2SIsH{font-size:var(--font-headline-medium);font-weight:700;line-height:52px}.TeGO5V_thHw5lDAm1_2M{font-weight:700}.TeGO5V_thHw5lDAm1_2M,.WolQzb2MsSgiNmLtc7_j{font-size:var(--font-headline-small);line-height:40px}.WolQzb2MsSgiNmLtc7_j{font-weight:400}.hUB0JT8p1T2Hw28N6qC8{font-weight:500}.gKZWDv5chz3_O3Syp74H,.hUB0JT8p1T2Hw28N6qC8{font-size:var(--font-title-medium);line-height:32px}.gKZWDv5chz3_O3Syp74H{font-weight:600}.zY2No8Ga4b8shbOQGhnv{font-size:var(--font-title-small);font-weight:500;line-height:30px}.tIj0D1t8Cc892ikmgFPZ{font-size:var(--font-body);font-weight:400;line-height:24px}.KdcN0BnOaVeVhyLRKqhS{font-size:var(--font-body-small);font-weight:400;line-height:24px}.dso3Rh3tl3Xv1GumBktz{font-weight:400}.dso3Rh3tl3Xv1GumBktz,.mQ1UlbN9u4Mg9byO8m7v{font-size:var(--font-body-extra-small);line-height:20px}.mQ1UlbN9u4Mg9byO8m7v{font-weight:700}.PItlW5vRExLnTj4a8eLE{font-size:var(--font-body-extra-small);font-weight:600;line-height:16px}.TwRpPlktzxhmFVeua7P5{margin:calc(var( --spacing-base )*0)}.zVfqx7gyb3o9mxfGynn1{margin-left:calc(var( --spacing-base )*0);margin-right:calc(var( --spacing-base )*0)}.iSHVzNiB9iVleGljaQxy{margin-bottom:calc(var( --spacing-base )*0)}.iSHVzNiB9iVleGljaQxy,.xqDIp6cNVr_E6RXaiPyD{margin-top:calc(var( --spacing-base )*0)}.S8EwaXk1kyPizt6x4WH2{margin-left:calc(var( --spacing-base )*0)}.ODX5Vr1TARoLFkDDFooD{margin-bottom:calc(var( --spacing-base )*0)}.cphJ8dCpfimnky7P2FHg{margin-right:calc(var( --spacing-base )*0)}.PFgIhNxIyiSuNvQjAIYj{margin:calc(var( --spacing-base )*1)}.M2jKmUzDxvJjjVEPU3zn{margin-left:calc(var( --spacing-base )*1);margin-right:calc(var( --spacing-base )*1)}.io15gAh8tMTNbSEfwJKk{margin-bottom:calc(var( --spacing-base )*1)}.io15gAh8tMTNbSEfwJKk,.rcTN5uw9xIEeMEGL3Xi_{margin-top:calc(var( --spacing-base )*1)}.CQSkybjq2TcRM1Xo9COV{margin-left:calc(var( --spacing-base )*1)}.hfqOWgq6_MEGdFE82eOY{margin-bottom:calc(var( --spacing-base )*1)}.I8MxZQYTbuu595yfesWA{margin-right:calc(var( --spacing-base )*1)}.kQkc6rmdpvLKPkyoJtVQ{margin:calc(var( --spacing-base )*2)}.j6vFPxWuu4Jan2ldoxpp{margin-left:calc(var( --spacing-base )*2);margin-right:calc(var( --spacing-base )*2)}.hqr39dC4H_AbactPAkCG{margin-bottom:calc(var( --spacing-base )*2)}.c3dQnMi16C6J6Ecy4283,.hqr39dC4H_AbactPAkCG{margin-top:calc(var( --spacing-base )*2)}.YNZmHOuRo6hU7zzKfPdP{margin-left:calc(var( --spacing-base )*2)}.Db8lbak1_wunpPk8NwKU{margin-bottom:calc(var( --spacing-base )*2)}.ftsYE5J9hLzquQ0tA5dY{margin-right:calc(var( --spacing-base )*2)}.Det4MHzLUW7EeDnafPzq{margin:calc(var( --spacing-base )*3)}.h_8EEAztC29Vve1datb5{margin-left:calc(var( --spacing-base )*3);margin-right:calc(var( --spacing-base )*3)}.YXIXJ0h1k47u6hzK8KcM{margin-bottom:calc(var( --spacing-base )*3)}.YXIXJ0h1k47u6hzK8KcM,.soADBBkcIKCBXzCTuV9_{margin-top:calc(var( --spacing-base )*3)}.zSX59ziEaEWGjnpZa4uV{margin-left:calc(var( --spacing-base )*3)}.yrVTnq_WBMbejg89c2ZQ{margin-bottom:calc(var( --spacing-base )*3)}.UKtHPJnI2cXBWtPDm5hM{margin-right:calc(var( --spacing-base )*3)}.guexok_Tqd5Tf52hRlbT{margin:calc(var( --spacing-base )*4)}.oS1E2KfTBZkJ3F0tN7T6{margin-left:calc(var( --spacing-base )*4);margin-right:calc(var( --spacing-base )*4)}.DN1OhhXi6AoBgEdDSbGd{margin-bottom:calc(var( --spacing-base )*4)}.DN1OhhXi6AoBgEdDSbGd,.ot2kkMcYHv53hLZ4LSn0{margin-top:calc(var( --spacing-base )*4)}.A1krOZZhlQ6Sp8Cy4bly{margin-left:calc(var( --spacing-base )*4)}.pkDbXXXL32237M0hokEh{margin-bottom:calc(var( --spacing-base )*4)}.XXv4kDTGvEnQeuGKOPU3{margin-right:calc(var( --spacing-base )*4)}.yGqHk1a57gaISwkXwXe6{margin:calc(var( --spacing-base )*5)}.X8cghM358X3DkXLc9aNK{margin-left:calc(var( --spacing-base )*5);margin-right:calc(var( --spacing-base )*5)}.GdfSmGwHlFnN2S6xBn1f{margin-bottom:calc(var( --spacing-base )*5)}.GdfSmGwHlFnN2S6xBn1f,.yqeuzwyGQ7zG0avrGqi_{margin-top:calc(var( --spacing-base )*5)}.g9emeCkuHvYhveiJbfXO{margin-left:calc(var( --spacing-base )*5)}.Lvk3dqcyHbZ07QCRlrUQ{margin-bottom:calc(var( --spacing-base )*5)}.r3yQECDQ9qX0XZzXlVAg{margin-right:calc(var( --spacing-base )*5)}.aQhlPwht2Cz1X_63Miw0{margin:calc(var( --spacing-base )*6)}.JyHb0vK3wJgpblL9s5j8{margin-left:calc(var( --spacing-base )*6);margin-right:calc(var( --spacing-base )*6)}.cY2gULL1lAv6WPNIRuf3{margin-bottom:calc(var( --spacing-base )*6)}.NBWQ9Lwhh_fnry3lg_p7,.cY2gULL1lAv6WPNIRuf3{margin-top:calc(var( --spacing-base )*6)}.yIOniNe5E40C8fWvBm5V{margin-left:calc(var( --spacing-base )*6)}.t30usboNSyqfQWIwHvT3{margin-bottom:calc(var( --spacing-base )*6)}.Nm_TyFkYCMhOoghoToKJ{margin-right:calc(var( --spacing-base )*6)}.C4qJKoBXpgKtpmrqtEKB{margin:calc(var( --spacing-base )*7)}.S93Srbu6NQ_PBr7DmTiD{margin-left:calc(var( --spacing-base )*7);margin-right:calc(var( --spacing-base )*7)}.fJj8k6gGJDks3crUZxOS{margin-bottom:calc(var( --spacing-base )*7)}.cW6D6djs7Ppm7fD7TeoV,.fJj8k6gGJDks3crUZxOS{margin-top:calc(var( --spacing-base )*7)}.DuCnqNfcxcP3Z__Yo5Ro{margin-left:calc(var( --spacing-base )*7)}.im8407m2fw5vOg7O2zsw{margin-bottom:calc(var( --spacing-base )*7)}.G0fbeBgvz2sh3uTP9gNl{margin-right:calc(var( --spacing-base )*7)}.kvW3sBCxRxUqz1jrVMJl{margin:calc(var( --spacing-base )*8)}.tOjEqjLONQdkiYx_XRnw{margin-left:calc(var( --spacing-base )*8);margin-right:calc(var( --spacing-base )*8)}.op5hFSx318zgxsoZZNLN{margin-bottom:calc(var( --spacing-base )*8)}.c9WfNHP6TFKWIfLxv52J,.op5hFSx318zgxsoZZNLN{margin-top:calc(var( --spacing-base )*8)}.sBA75QqcqRwwYSHJh2wc{margin-left:calc(var( --spacing-base )*8)}.GpL6idrXmSOM6jB8Ohsf{margin-bottom:calc(var( --spacing-base )*8)}.HbtWJoQwpgGycz8dGzeT{margin-right:calc(var( --spacing-base )*8)}.uxX3khU88VQ_Ah49Ejsa{padding:calc(var( --spacing-base )*0)}.KX0FhpBKwKzs9fOUdbNz{padding-left:calc(var( --spacing-base )*0);padding-right:calc(var( --spacing-base )*0)}.PfK8vKDyN32dnimlzYjz{padding-bottom:calc(var( --spacing-base )*0)}.PfK8vKDyN32dnimlzYjz,.emxLHRjQuJsImnPbQIzE{padding-top:calc(var( --spacing-base )*0)}.kJ8WzlpTVgdViXt8ukP9{padding-left:calc(var( --spacing-base )*0)}.tg_UIUI11VBzrTAn2AzJ{padding-bottom:calc(var( --spacing-base )*0)}.uczvl8kaz84oPQJ2DB2R{padding-right:calc(var( --spacing-base )*0)}.o7UHPcdVK3lt7q3lqV4o{padding:calc(var( --spacing-base )*1)}.IDqEOxvDoYrFYxELPmtX{padding-left:calc(var( --spacing-base )*1);padding-right:calc(var( --spacing-base )*1)}.DdywPW2qSYlu2pt8tpO2{padding-bottom:calc(var( --spacing-base )*1)}.DdywPW2qSYlu2pt8tpO2,.npy3hw4A5QSkDicb2CJJ{padding-top:calc(var( --spacing-base )*1)}.LgbptTApNY5NwLQvEFAt{padding-left:calc(var( --spacing-base )*1)}.WZQy2SZuZso59bUsXXyl{padding-bottom:calc(var( --spacing-base )*1)}.o331apInxNunbYB3SfPE{padding-right:calc(var( --spacing-base )*1)}.fMPIyD9Vqki1Lrc_yJnG{padding:calc(var( --spacing-base )*2)}.i2pMcTcdrr10IQoiSm_L{padding-left:calc(var( --spacing-base )*2);padding-right:calc(var( --spacing-base )*2)}.eA702gn32kwptiI1obXH{padding-bottom:calc(var( --spacing-base )*2)}.eA702gn32kwptiI1obXH,.o9bGieUKcYc8o0Ij9oZX{padding-top:calc(var( --spacing-base )*2)}.SwZcFez1RDqWsOFjB5iG{padding-left:calc(var( --spacing-base )*2)}.eHpLc_idmuEqeqCTvqkN{padding-bottom:calc(var( --spacing-base )*2)}.vU39i2B4P1fUTMB2l6Vo{padding-right:calc(var( --spacing-base )*2)}.JHWNzBnE29awhdu5BEh1{padding:calc(var( --spacing-base )*3)}.X72lGbb56L3KFzC2xQ9N{padding-left:calc(var( --spacing-base )*3);padding-right:calc(var( --spacing-base )*3)}.BzfNhRG8wXdCEB5ocQ6e{padding-bottom:calc(var( --spacing-base )*3)}.BzfNhRG8wXdCEB5ocQ6e,.srV0KSDC83a2fiimSMMQ{padding-top:calc(var( --spacing-base )*3)}.lUWfkmbQjCskhcNwkyCm{padding-left:calc(var( --spacing-base )*3)}.Ts0dIlc3aTSL7V4cIHis{padding-bottom:calc(var( --spacing-base )*3)}.CzlqQXXhX6MvorArFZ8B{padding-right:calc(var( --spacing-base )*3)}.TqMPkQtR_DdZuKb5vBoV{padding:calc(var( --spacing-base )*4)}.a7UrjhI69Vetlcj9ZVzz{padding-left:calc(var( --spacing-base )*4);padding-right:calc(var( --spacing-base )*4)}.StEhBzGs2Gi5dDEkjhAv{padding-bottom:calc(var( --spacing-base )*4)}.FGneZfZyvYrt1dG0zcnm,.StEhBzGs2Gi5dDEkjhAv{padding-top:calc(var( --spacing-base )*4)}.APEH216rpdlJWgD2fHc8{padding-left:calc(var( --spacing-base )*4)}.oGwXC3ohCic9XnAj6x69{padding-bottom:calc(var( --spacing-base )*4)}.U6gnT9y42ViPNOcNzBwb{padding-right:calc(var( --spacing-base )*4)}.IpdRLBwnHqbqFrixgbYC{padding:calc(var( --spacing-base )*5)}.HgNeXvkBa9o3bQ5fvFZm{padding-left:calc(var( --spacing-base )*5);padding-right:calc(var( --spacing-base )*5)}.tJtFZM3XfPG9v9TSDfN1{padding-bottom:calc(var( --spacing-base )*5)}.PdifHW45QeXYfK568uD8,.tJtFZM3XfPG9v9TSDfN1{padding-top:calc(var( --spacing-base )*5)}.mbLkWTTZ0Za_BBbFZ5b2{padding-left:calc(var( --spacing-base )*5)}.vVWpZpLlWrkTt0hMk8XU{padding-bottom:calc(var( --spacing-base )*5)}.RxfaJj5a1Nt6IavEo5Zl{padding-right:calc(var( --spacing-base )*5)}.SppJULDGdnOGcjZNCYBy{padding:calc(var( --spacing-base )*6)}.palY2nLwdoyooPUm9Hhk{padding-left:calc(var( --spacing-base )*6);padding-right:calc(var( --spacing-base )*6)}.WYw1JvZC0ppLdvSAPhr_{padding-bottom:calc(var( --spacing-base )*6)}.WYw1JvZC0ppLdvSAPhr_,.YEEJ9b90ueQaPfiU8aeN{padding-top:calc(var( --spacing-base )*6)}.QE0ssnsKvWJMqlhPbY5u{padding-left:calc(var( --spacing-base )*6)}.n8yA3jHlMRyLd5UIfoND{padding-bottom:calc(var( --spacing-base )*6)}.tXHmxYnHzbwtfxEaG51n{padding-right:calc(var( --spacing-base )*6)}.kBTsPKkO_3g_tLkj77Um{padding:calc(var( --spacing-base )*7)}.RyhrFx6Y1FGDrGAAyaxm{padding-left:calc(var( --spacing-base )*7);padding-right:calc(var( --spacing-base )*7)}.CBwRpB0bDN3iEdQPPMJO{padding-bottom:calc(var( --spacing-base )*7)}.CBwRpB0bDN3iEdQPPMJO,.vQVSq6SvWKbOMu6r4H6b{padding-top:calc(var( --spacing-base )*7)}.oBy5__aEADMsH46mrgFX{padding-left:calc(var( --spacing-base )*7)}.KVEXoJqf1s92j0JMdNmN{padding-bottom:calc(var( --spacing-base )*7)}.ZMXGNrNaKW3k_3TLz0Fq{padding-right:calc(var( --spacing-base )*7)}.tuiR9PhkHXhGyEgzRZRI{padding:calc(var( --spacing-base )*8)}.U7454qyWkQNa2iaSJziu{padding-left:calc(var( --spacing-base )*8);padding-right:calc(var( --spacing-base )*8)}.VLYIv2GVocjuN93e8HC8{padding-bottom:calc(var( --spacing-base )*8)}.VLYIv2GVocjuN93e8HC8,.X1rm9DQ1zLGLfogja5Gn{padding-top:calc(var( --spacing-base )*8)}.JS7G6kAuqJo5GIuF8S5t{padding-left:calc(var( --spacing-base )*8)}.Y8F9ga1TDCMbM1lj4gUz{padding-bottom:calc(var( --spacing-base )*8)}.AJuyNGrI63BOWql719H8{padding-right:calc(var( --spacing-base )*8)}.Jvb1njqMy7ML1zikhbWn{margin-top:1rem}.mpr8_ygU8woV4bVR1xvw{align-items:center;display:flex;font-size:var(--font-title-small);font-weight:500;line-height:1.5;margin-bottom:.5rem;margin-top:0}.gwO_Q0L0jbwMARVlBezu{color:var(--jp-gray-60);font-family:SF Pro Text,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:var(--font-body-small);font-weight:400;letter-spacing:-.15px;line-height:20px;margin-right:.75rem}.qwy7CsLeEbXvaPwgC9WV{display:flex;flex-flow:row nowrap;max-width:100%;overflow-x:scroll;padding:1px;scrollbar-width:none}.qwy7CsLeEbXvaPwgC9WV::-webkit-scrollbar{display:none}.qwy7CsLeEbXvaPwgC9WV .Hrbg7DeSJs6gas9zdPDR{border-color:var(--jp-gray-5);border-radius:5px;margin-bottom:0;margin-left:1.5rem;min-width:180px;padding:1rem 1.5rem;width:100%}@media only screen and (min-width:960px){.qwy7CsLeEbXvaPwgC9WV .Hrbg7DeSJs6gas9zdPDR{min-width:220px}}.qwy7CsLeEbXvaPwgC9WV .Hrbg7DeSJs6gas9zdPDR:last-child{margin-left:0}.NFpbo5AINn6I6avKFGby{margin-bottom:1.5rem}.aoQZCG0JeyWmy2J6vVxF{font-weight:500;line-height:20px;margin-bottom:.25rem}.M6ApyXg79vuXo6GwDkbO{align-items:flex-end;display:flex;flex-wrap:wrap;font-size:36px;font-weight:400;line-height:40px}.M6ApyXg79vuXo6GwDkbO.DYHb5e6QhgXejWyo9s78{cursor:pointer}.OlInbY5YnDO06MEQHv98{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;line-height:1;margin-left:.5rem}.EtbKbd5m85w7oYT4stIs{color:var(--jp-gray-20);display:none;font-size:var(--font-body-small);font-weight:600;line-height:24px;fill:var(--jp-gray-20)}@media screen and (min-width:960px){.EtbKbd5m85w7oYT4stIs{align-items:center;display:flex}}.EtbKbd5m85w7oYT4stIs.Awr7zl75sfAsFPHK9kDG{color:var(--jp-red-50);fill:var(--jp-red-50)}.EtbKbd5m85w7oYT4stIs.QFSZbIKFdWO3HEPBZyhc{color:var(--jp-green-50);fill:var(--jp-green-50)}.GgJAnS4gaEEGmRCP5n8y{align-content:flex-end;display:flex}.mjiNtwdbKpfo9edGVes4{margin-left:2px}.pAt4v_KG9Ir19wNcEtEj{align-items:center;display:flex;flex-wrap:wrap;justify-content:space-between;margin-top:calc(var(--spacing-base)*2.5);min-height:28px;width:100%}.g4lyov8aMDggdD4yOi1p{align-items:baseline;display:flex;margin-top:calc(var(--spacing-base)/2)}.g4lyov8aMDggdD4yOi1p .Ys5ScZ_dYn2O2AzDE5Yi{font-size:32px;font-weight:400;line-height:36px;margin-left:var(--spacing-base)}.sUNg_b7XteVXOrpHAkJg :last-child{margin-top:4px}.cF6QAJf1vXXAMuutXPcq{align-items:baseline;display:flex}.cF6QAJf1vXXAMuutXPcq.coY634LconQ7gzDDNJeu{color:var(--jp-gray-10);fill:var(--jp-gray-10)}.cF6QAJf1vXXAMuutXPcq.kyqpwKaL2FyQ8CtxJQ0f{color:var(--jp-green-50);fill:var(--jp-green-50)}.cF6QAJf1vXXAMuutXPcq.aXf37lEOcjpNV8ImLaYK{color:var(--jp-red-40);fill:var(--jp-red-40)}.cF6QAJf1vXXAMuutXPcq .OyGdoGzsQ48VaVVR99_H{position:relative;right:2px;top:2px}.cF6QAJf1vXXAMuutXPcq .cKLicfMCaDSGPlX222jF{font-size:14px;font-weight:600;line-height:24px}.wm7Alh6CwbsWkVSODgI2{margin-top:calc(var(--spacing-base)/2)}.qpN923qyxjI06NCgFC8j>li{margin-bottom:0}.wI7QgVzPXvVVu6kfnTT8{align-items:center;color:var(--jp-black);display:flex;justify-content:space-between;margin-top:1rem}.wI7QgVzPXvVVu6kfnTT8 .eqyxcUmdF0s3gmmlZGyD{display:flex;gap:1.5rem}.wI7QgVzPXvVVu6kfnTT8 .gxY6D0PeVtGk9iSB5E_u{align-items:center;display:flex;font-size:var(--font-body-small);gap:2px;margin:0}.wI7QgVzPXvVVu6kfnTT8 .D_uE0LD5CvpfM2FNp55k{align-items:center;display:flex;gap:2px}.wI7QgVzPXvVVu6kfnTT8 .VTBUdi1D4DW34F0yixMk{font-size:var(--font-body-small);margin:0}.BXQQYCO_pEmYmzBBwYxR{align-items:center;color:var(--jp-black);display:flex;gap:.25rem;margin-top:1rem}.BXQQYCO_pEmYmzBBwYxR .qdvOzzbrd3KQK7DNg8eg{font-size:var(--font-body-small);margin:0}.PFbMp_gtGLBMWbbYtO0q{display:flex;flex-grow:1;flex-wrap:wrap;gap:.25rem;justify-content:space-between}.ZFCNMiywyFvaifoIQI5w{color:var(--jp-gray-40)}.mj-boost-speed-score__grade{align-items:center;column-gap:1em;display:flex;font-size:var(--font-body-small);justify-content:space-between;line-height:24px;margin:8px 0}.mj-boost-speed-score__grade--letter{position:relative}.mj-boost-speed-score__grade--letter>button{all:unset;border-radius:var(--jp-border-radius);color:var(--jp-green);cursor:pointer;font-size:var(--font-title-small);font-weight:700;line-height:24px;padding:0 5px}.mj-boost-speed-score__grade--letter>button:focus{outline:1px dotted var(--jp-black)}.boost-score-tooltip__heading{color:#000;font-size:var(--font-title-small);line-height:30px;margin:0}.boost-score-tooltip__content{font-size:var(--font-body);line-height:24px}.components-popover{max-width:340px;min-height:150px;width:calc(100% - 63px)}@media(min-width:783px){.components-popover{width:100%}}.components-popover__content{padding:24px;width:100%}.components-popover__content p:last-child{margin-bottom:0}.mj-boost-speed-score__bar .jb-score-bar__label{display:none}.mj-boost-speed-score__bar .jb-score-bar__filler{border-radius:12px;min-width:49px}.mj-boost-speed-score__bar .jb-score-bar__bounds{border-radius:12px;height:24px;margin-right:0}.mj-boost-speed-score__bar .jb-score-bar__score{border-radius:12px;height:24px;width:30px}.jb-score-bar__label,.jb-score-bar__loading,.jb-score-bar__score{align-items:center;background-color:#fff;border:2px solid transparent;border-radius:42px;display:flex;height:42px}.jb-score-bar{color:var(--jp-gray-70);display:flex;width:100%}.jb-score-bar--mobile{margin-bottom:1.5rem}@media(max-width:767px){.jb-score-bar{flex-direction:column}.jb-score-bar__label{background-color:transparent}}.jb-score-bar__loading{align-items:center;display:flex;justify-content:center;width:42px}.jb-score-bar__label{display:grid;grid-template-columns:24px 1fr;grid-column-gap:10px;font-size:14px;justify-content:center;position:relative}@media(min-width:768px){.jb-score-bar__label{padding-left:15px;padding-right:15px;width:200px;z-index:50}}.jb-score-bar__score{border-radius:100%;font-weight:700;height:42px;justify-content:center;left:-1px;position:absolute;width:42px}.jb-score-bar__bounds{background-color:#f1f1f1;border-radius:21px;display:flex;height:42px;max-width:100%;position:relative;width:100%;z-index:40}@media(min-width:768px){.jb-score-bar__bounds{margin-right:-21px;width:calc(100% + 21px)}}.jb-score-bar__filler{border-radius:42px 0 0 42px;display:flex;justify-content:flex-end;min-width:85px;position:relative;transition:width .3s ease-in-out;width:0;will-change:width}@media(max-width:767px){.jb-score-bar__filler{border-radius:inherit;min-width:43px}}.jb-score-bar__no_boost_score{--clearance-space:74px;background:#fff;background-clip:padding-box;border:2px solid transparent;border-radius:50%;cursor:pointer;font-size:.7em;height:28px;line-height:1.625;padding:3px;position:absolute;text-align:center;top:6px;width:28px;z-index:2}.jb-score-bar__no_boost_score:hover{border:2px solid hsla(0,0%,100%,.5)}.jb-score-bar__no_boost_score:after{border-bottom:6px solid #fff;border-left:6px solid transparent;border-right:6px solid transparent;content:" ";height:0;position:absolute;right:6px;top:28px;width:0}.jb-score-bar__no_boost_score_tooltip{background:#fff;border-radius:4px;box-shadow:0 0 20px 0 hsla(0,0%,67%,.28);display:none;margin:0 16px;padding:16px;position:absolute;right:-10em;top:-62px;width:20em}.jb-score-bar__no_boost_score_tooltip:after{border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid #fff;bottom:-6px;content:" ";height:0;margin:0 -10px;position:absolute;right:10em;width:0}.jb-score-bar__no_boost_score:hover .jb-score-bar__no_boost_score_tooltip{display:block}.jb-score-bar .fill-loading{background-color:var(--jp-white)}.jb-score-bar .fill-good{background-color:var(--jp-green)}.jb-score-bar .fill-mediocre{background-color:var(--jp-orange-20)}.jb-score-bar .fill-bad{background-color:var(--jp-red-50)}.gridicon{fill:currentColor;display:inline-block}.gridicon.needs-offset g{transform:translate(-1px,1px)}.gridicon.needs-offset-x g{transform:translate(-1px)}.gridicon.needs-offset-y g{transform:translateY(1px)}@keyframes R2i0K45dEF157drbVRPI{0%{opacity:.6}50%{opacity:1}to{opacity:.6}}.NisihrgiIKl_knpYJtfg{animation:R2i0K45dEF157drbVRPI 1.5s infinite;background-color:var(--jp-gray);height:100%;width:100%}.components-surface.components-card{border-radius:var(--jp-border-radius-rna)}.upsell-banner{background:#f9f9f6;background:linear-gradient(-133deg,#ced9f2,#f9f9f6 10%,#f9f9f6 80%,#f5e6b3);display:flex;flex-direction:column}@media screen and (min-width:660px){.upsell-banner{flex-direction:row}}.upsell-banner.components-card__body.components-card-body{border-radius:var(--jp-border-radius-rna);padding:36px}.upsell-banner .upsell-banner--icon{align-items:flex-start;display:flex;margin-bottom:16px;margin-left:0;margin-top:16px}@media screen and (min-width:660px){.upsell-banner .upsell-banner--icon{align-items:center;margin-bottom:0;margin-left:28px;margin-top:0}}.upsell-banner .upsell-banner--content{display:flex;flex:1;flex-direction:column;justify-content:space-between}@media screen and (min-width:660px){.upsell-banner .upsell-banner--content{flex-direction:row}}.upsell-banner .upsell-banner--content .upsell-banner--content-info{display:flex;flex-direction:column}.upsell-banner .upsell-banner--content .upsell-banner--content-info h3{font-size:1.5rem;font-weight:500;line-height:32px;margin:0}.upsell-banner .upsell-banner--content .upsell-banner--content-info p{font-size:1rem;margin:8px 0 0}.upsell-banner .upsell-banner--content .upsell-banner--content-cta{align-items:center;display:flex;flex-direction:row;margin-right:0;margin-top:16px}@media screen and (min-width:660px){.upsell-banner .upsell-banner--content .upsell-banner--content-cta{margin-right:16px;margin-top:0}}.upsell-banner .upsell-banner--content .upsell-banner--content-cta .upsell-banner--content-cta-button{box-shadow:inset 0 0 0 1.5px #000;font-weight:400;padding:8px 16px;white-space:nowrap}.upsell-banner .upsell-banner--content .upsell-banner--content-cta .upsell-banner--content-cta-button.secondary{background-color:var(--jp-white);color:var(--jp-black)}.upsell-banner .upsell-banner--content .upsell-banner--content-cta .upsell-banner--content-cta-button.primary{margin-right:8px}.cAbGtJDGgLubucBnz7vM{background-color:var(--jp-white)}.wiobThfXJCuhGNrbFIT6 a,.wiobThfXJCuhGNrbFIT6 a:active,.wiobThfXJCuhGNrbFIT6 a:hover{color:var(--jp-black)}.VgAxgahF9bC2M__FiIgV{display:flex;margin-bottom:calc(var(--spacing-base)*3)}.dbRwkMLqcMF67njPoAF7{margin-left:8px}.Doju0RxvvN9JS12mf489{line-height:calc(var(--spacing-base)*3);margin:0 0 var(--spacing-base) 0}.yWUvvF4WJLNDSpMgBMfm{align-items:center;display:flex;flex-wrap:wrap;margin:0 auto;max-width:1128px}.ka1fVHj2HOkHjhdoEFOZ{display:grid;grid-gap:24px;grid-template-columns:repeat(4,1fr);margin:0 16px;width:100%}@media(min-width:600px){.ka1fVHj2HOkHjhdoEFOZ{grid-template-columns:repeat(8,1fr);margin:0 18px}}@media(min-width:960px){.ka1fVHj2HOkHjhdoEFOZ{grid-template-columns:repeat(12,1fr);margin:0 24px;max-width:1128px}}.JMOO4Y_9yhTO9lwLnRUx{grid-column-end:span 1}.PFDPAqk51qox_ChLqJwm{grid-column-end:span 2}.ault0jHVfWpShqOGooIP{grid-column-end:span 3}.GqpvdRzmzPJELtSm4FEN{grid-column-end:span 4}@media(min-width:600px){.Ym4_YneEGD_iZD6W1C2o{grid-column-end:span 1}.NbvHnnDtWw8n9BEUQ0Oy{grid-column-end:span 2}.ElMT7rhxe5ZJKO41MnhW{grid-column-end:span 3}.yKjnqjibn_wW_1tWWt5Q{grid-column-end:span 4}.Pb30lOcQFpzUX57GwflS{grid-column-end:span 5}.pC1wxc_R8y4pNILHsiiY{grid-column-end:span 6}.pChscSCnudQoWGjMFKI_{grid-column-end:span 7}.qw1H2gAgF3lDCI2Tbkmb{grid-column-end:span 8}}@media(min-width:960px){.VzcA_rrxBK3g4ozA0oD9{grid-column-end:span 1}.pNAa7O2adRZD8Slgk9iR{grid-column-end:span 2}.tlIMLlipexblj8CeOx4B{grid-column-end:span 3}.Dvt0u5l2Rr1BhBmvYAzl{grid-column-end:span 4}.BiUsgNTc0tyc7tC5jnzE{grid-column-end:span 5}.ulJXAsj7G2ROJ1g3_s28{grid-column-end:span 6}.HsoVlyVLsXYClx9Atox0{grid-column-end:span 7}.oXxjRQNNj2cfIpFBqC1W{grid-column-end:span 8}.qXgUn4Adg9xE_JnbuDio{grid-column-end:span 9}.xMpqTLiLfYFEJiRPQQQq{grid-column-end:span 10}.IiGo3Sz2FDZN7_eGElwA{grid-column-end:span 11}.Om8BNCjfgqQ_wmPQjfOY{grid-column-end:span 12}}@media(max-width:960px){.t10ZWzP7ADjJnR4tqxRS{display:none}}@media(max-width:600px){.eOUlZG8Pelh_Xj0aSoHG{display:none}}.l546LrwBEePz434NFK5Q{border:2px solid var(--jp-green-primary);border-radius:var(--jp-border-radius);display:block;margin:32px 0;padding:16px 24px 16px 64px;position:relative;text-decoration:none}.l546LrwBEePz434NFK5Q span{display:block}.l546LrwBEePz434NFK5Q span:last-of-type{font-weight:600}.l546LrwBEePz434NFK5Q:focus span:last-of-type,.l546LrwBEePz434NFK5Q:hover span:last-of-type{text-decoration:underline;text-decoration-thickness:var(--jp-underline-thickness)}.l546LrwBEePz434NFK5Q:focus:after,.l546LrwBEePz434NFK5Q:hover:after{transform:translateY(-50%) translateX(-8px)}.l546LrwBEePz434NFK5Q:after{color:var(--jp-green-primary);content:"→";font-size:24px;font-weight:600;left:24px;position:absolute;top:50%;transform:translateY(-50%);transition:transform .15s ease-out}.Q7w4fcEcemZ2nlwaYNog{fill:var(--jp-yellow-30)!important;display:inline-block!important;width:1.1em!important}.AoNQsOaTt6gSf0H6Yasz{display:inline-block;position:relative}.v13ZwGzUnecPA7Y3URAl{height:18px;pointer-events:none;position:absolute;right:-53px;top:0;width:124px}.EeDbu9pXFWTsCzfTpv2v{pointer-events:all}.BmSvoIi3rErkcrRiOi2W{color:var(--jp-black);font-size:16px;font-weight:600;line-height:19px}.BmSvoIi3rErkcrRiOi2W:not(:last-child){margin-bottom:8px}.mojRoVuWdDJo0E6LEjJw{font-size:14px;font-weight:400;line-height:24px}.golden-token-icon-tooltip .components-popover:not([data-y-axis=middle])[data-x-axis=left] .components-popover__content{margin-left:-62px}.golden-token-icon-tooltip .components-popover:not([data-y-axis=middle])[data-x-axis=right] .components-popover__content{margin-right:-62px}.golden-token-icon-tooltip .components-popover[data-y-axis=bottom] .components-popover__content{top:2px!important}.golden-token-icon-tooltip .components-popover:not(.is-without-arrow)[data-y-axis=bottom]:before{top:-6px!important}.golden-token-icon-tooltip .components-popover:not(.is-without-arrow)[data-y-axis=bottom]:after{top:-4px!important}.golden-token-icon-tooltip .components-popover[data-y-axis=top] .components-popover__content{bottom:10px!important}.golden-token-icon-tooltip .components-popover:not(.is-without-arrow)[data-y-axis=top]:before{bottom:3px}.golden-token-icon-tooltip .components-popover:not(.is-without-arrow)[data-y-axis=top]:after{bottom:4px}.golden-token-icon-tooltip .components-popover__content{border:1px solid var(--jp-gray);border-radius:4px;outline:none;padding:24px;white-space:normal;width:304px}.golden-token-icon-tooltip .components-button.is-link:focus:not(:disabled){box-shadow:none}.cuoSlhSNrqf1dozY22Xb{fill:#000}.JLquNpQVlysAamuh5lJO,.lAIiifeLMmZAPlQ9n9ZR{fill:var(--jp-green-primary)}.cbOwD8Y4tFjwimmtchQI{fill:#757575}.cbOwD8Y4tFjwimmtchQI.aLWBKY0yRghEk7tNCgK3{fill:var(--color-bluesky)}.cbOwD8Y4tFjwimmtchQI.aHOlEBGD5EA8NKRw3xTw{fill:var(--color-facebook);border-radius:50%!important}.cbOwD8Y4tFjwimmtchQI.af4Y_zItXvLAOEoSDPSv{fill:var(--color-twitter)}.cbOwD8Y4tFjwimmtchQI.f68aqF3XSD1OBvXR1get{fill:var(--color-linkedin)}.cbOwD8Y4tFjwimmtchQI.xFI0dt3UiXRlRQdqPWkx{fill:var(--color-tumblr)}.cbOwD8Y4tFjwimmtchQI.q7JEoyymveP6kF747M43{fill:var(--color-gplus)}.cbOwD8Y4tFjwimmtchQI.DKOBOTVmTLbh26gUH_73{fill:var(--color-mastodon)}.cbOwD8Y4tFjwimmtchQI.n5XodNsuMfMAAvqHFmbw{fill:var(--color-nextdoor);border-radius:50%}.cbOwD8Y4tFjwimmtchQI.cL3m0xBYTYhIKI7lCqDB{fill:var(--color-instagram)}.cbOwD8Y4tFjwimmtchQI.fftumuc_lJ6v0tq4UMVR{fill:var(--color-whatsapp)}.kezuOHNvu9vdvlJ86Fwg .qJizORs2q_CVCj9L6XLe{align-items:center;display:flex;gap:var(--spacing-base);margin-bottom:calc(var(--spacing-base)*3)}.kezuOHNvu9vdvlJ86Fwg .qJizORs2q_CVCj9L6XLe .VmtuLc2xRqmsO6cK8qjF{position:relative}.kezuOHNvu9vdvlJ86Fwg .qJizORs2q_CVCj9L6XLe .MdTRfQ3eo5qZKChZlzNj{width:32px}.kezuOHNvu9vdvlJ86Fwg .qJizORs2q_CVCj9L6XLe .PbEpL02SEH9VNAlbKCfV{width:30px}.kezuOHNvu9vdvlJ86Fwg .qJizORs2q_CVCj9L6XLe .TD4AUM9gcTVAB6JHB5ZR{border-radius:50%;margin-right:-10px;position:absolute;width:32px}.kezuOHNvu9vdvlJ86Fwg .qJizORs2q_CVCj9L6XLe .yjl73qv0VWoPP8IhGreh{border-top-style:solid;border-top:2px dashed var(--jp-black);height:0;width:67px}.kezuOHNvu9vdvlJ86Fwg .qJizORs2q_CVCj9L6XLe .rq8YRaj9OyUUXJUHiUgI{border-color:var(--jp-red)}.kezuOHNvu9vdvlJ86Fwg .YZ7FNKEm9qpvQ4ZkbAz5{transform:rotate(-180deg)}.kezuOHNvu9vdvlJ86Fwg .oH9tzGE80LnB6Og69RFz{margin-bottom:var(--spacing-base)}.kezuOHNvu9vdvlJ86Fwg .oH9tzGE80LnB6Og69RFz,.kezuOHNvu9vdvlJ86Fwg .xXVEWvQllVsFGmJY8WEp{align-items:center;display:flex;gap:var(--spacing-base)}.kezuOHNvu9vdvlJ86Fwg .xXVEWvQllVsFGmJY8WEp.J0GIu2rNR7rXocQTyd8p{color:var(--jp-red);fill:var(--jp-red)}.jp-connection__manage-dialog{--spacing-base:8px;border-radius:3px;margin:auto;width:1200px}.jp-connection__manage-dialog__content{align-items:center;background:var(--jp-white-off);display:flex;flex-direction:column;justify-content:center;padding:80px;text-align:center}.jp-connection__manage-dialog__content h1{font-size:var(--font-title-large);font-weight:700;line-height:1.2;margin:0}.jp-connection__manage-dialog__large-text{font-size:1.25rem;font-weight:600;margin-bottom:calc(var(--spacing-base)*4);margin-top:calc(var(--spacing-base)*3);max-width:60%}.jp-connection__manage-dialog__actions{align-items:center;background:var(--jp-white);border-top:1px solid var(--jp-gray);bottom:0;box-sizing:border-box;margin:0!important;max-width:1200px!important;padding:calc(var(--spacing-base)*4) calc(var(--spacing-base)*5);position:sticky}.jp-connection__manage-dialog__link{color:var(--jp-black)}.jp-connection__manage-dialog__link:hover{color:var(--jp-black);text-decoration-thickness:var(--jp-underline-thickness)}.jp-connection__manage-dialog__link:focus{color:var(--jp-black)}.jp-connection__manage-dialog__button-wrap button{float:left}.jp-connection__manage-dialog__action-card{background-color:var(--jp-white);border:none;border-radius:3px;box-shadow:0 0 15px var(--jp-gray-off);margin:var(--spacing-base) auto;max-width:100%;padding:1rem 2rem;text-align:right;width:750px}.jp-connection__manage-dialog__action-card__card-headline{font-size:var(--font-body);font-weight:600;line-height:calc(var(--spacing-base)*3);text-decoration:none}.jp-connection__manage-dialog__action-card__icon{float:left}.jp-connection__manage-dialog__action-card .transfer{color:var(--jp-black);fill:var(--jp-black)}.jp-connection__manage-dialog__action-card .disconnect{color:var(--jp-red);fill:var(--jp-red)}.jp-connection__manage-dialog .components-modal__header{display:none}.jp-connection__manage-dialog .components-modal__content{margin:0;padding:0}.jp-connection__disconnect-dialog h1{font-size:var(--font-title-small);font-weight:600;line-height:1.2;margin-top:0}.jp-connection__disconnect-dialog h2{font-size:var(--font-title-small);font-weight:400;line-height:1.2;margin:0}.jp-connection__disconnect-dialog p{font-size:var(--font-body);margin-top:0}.jp-connection__disconnect-dialog p.jp-connection__disconnect-dialog__large-text,.jp-connection__disconnect-dialog__large-text{font-size:1.25rem}.jp-connection__disconnect-dialog .jp-connection__disconnect-dialog__link,.jp-connection__disconnect-dialog__link{color:var(--jp-black);font-size:var(--font-body);font:inherit;height:auto;padding:0;text-decoration:underline}.jp-connection__disconnect-dialog .jp-connection__disconnect-dialog__link:hover,.jp-connection__disconnect-dialog__link:hover{color:var(--jp-black);text-decoration-thickness:var(--jp-underline-thickness)}.jp-connection__disconnect-dialog .jp-connection__disconnect-dialog__link:focus,.jp-connection__disconnect-dialog__link:focus{box-shadow:none!important;color:var(--jp-black)}.jp-connection__disconnect-dialog .jp-connection__disconnect-dialog__link--bold,.jp-connection__disconnect-dialog__link--bold{font-weight:700}.jp-connection__disconnect-dialog .components-button{border-radius:4px;font-size:var(--font-body-small);height:40px}.jp-connection__disconnect-dialog .components-modal__content{display:flex;flex-direction:column;flex-grow:1;margin:0;padding:0}.jp-connection__disconnect-dialog .components-modal__content:before,.jp-connection__disconnect-dialog .components-modal__header{display:none}.jp-connection__disconnect-dialog .jp-row{align-items:center;width:calc(100% - 48px)}.jp-connection__disconnect-dialog__content{align-items:center;background:var(--jp-white-off);border-radius:4px;display:flex;flex-direction:column;flex-grow:1;justify-content:center;margin:0;padding:2rem 1rem;text-align:center}.jp-connection__disconnect-dialog__actions{background:var(--jp-white);border-top:1px solid var(--jp-gray);bottom:0;padding:2rem 0;position:sticky}.jp-connection__disconnect-dialog__actions p{margin-bottom:0}.jp-connection__disconnect-dialog__actions:before{background:linear-gradient(to bottom,transparent,var(--jp-white-off));bottom:calc(100% + 1px);content:"";display:block;height:80px;position:absolute;right:0;width:100%}.jp-connection__disconnect-dialog__btn-dismiss,.jp-connection__disconnect-dialog__btn-dismiss.components-button{background:var(--jp-black)!important;margin-left:10px}.jp-connection__disconnect-dialog__btn-disconnect{background:var(--jp-red)!important}.jp-connection__disconnect-dialog__btn-back-to-wp{background:var(--jp-black)!important}.jp-connection__disconnect-dialog__button-wrap{text-align:right}@media(min-width:960px){.jp-connection__disconnect-dialog__button-wrap{text-align:center}}.jp-connection__disconnect-dialog__error{color:var(--jp-red)}.jp-connection__disconnect-dialog__survey{margin-bottom:1.5rem;max-width:100%}.jp-connection__disconnect-dialog__step-copy{margin:0 auto;max-width:800px}.jp-connection__disconnect-dialog__step-copy--narrow{max-width:600px}@media(max-height:900px){.jp-connection__disconnect-dialog__content .jp-components__decorative-card{display:none}}@media(min-width:600px){.jp-connection__disconnect-dialog,.jp-connection__disconnect-dialog.components-modal__frame{max-width:calc(100% - 32px);width:100%}.jp-connection__disconnect-dialog__actions,.jp-connection__disconnect-dialog__content{padding:2rem}}@media(min-width:960px){.jp-connection__disconnect-dialog,.jp-connection__disconnect-dialog.components-modal__frame{display:flex;flex-direction:column;height:900px;width:1200px}.jp-connection__disconnect-dialog h1{font-size:var(--font-title-large)}.jp-connection__disconnect-dialog p.jp-connection__disconnect-dialog__large-text,.jp-connection__disconnect-dialog__large-text{font-size:1.5rem}.jp-connection__disconnect-dialog__content{padding:80px}.jp-connection__disconnect-dialog__actions{padding:2rem 3rem}.jp-row{margin-right:0}}.jp-connection__disconnect-card{background-color:var(--jp-white);border:none;border-radius:3px;box-shadow:0 0 15px var(--jp-gray-off);margin:0 auto 1rem;max-width:100%;padding:1rem 2rem;text-align:right;width:800px}.jp-connection__disconnect-card__group{margin-bottom:1rem;max-width:100%}.jp-connection__disconnect-card__card-content{display:block;font-size:.875rem}@media only screen and (min-width:782px){.jp-connection__disconnect-card__card-content{align-items:center;display:flex;justify-content:space-between}}.jp-connection__disconnect-card .jp-connection__disconnect-card__card-headline,.jp-connection__disconnect-card__card-headline{flex-shrink:0;font-size:1.25rem;font-weight:600;margin-bottom:0;margin-top:0}@media only screen and (min-width:782px){.jp-connection__disconnect-card .jp-connection__disconnect-card__card-headline,.jp-connection__disconnect-card__card-headline{font-size:1.5rem;margin-left:1.5rem}}@media only screen and (max-width:782px){.jp-connection__disconnect-card .jp-connection__disconnect-card__card-headline+.jp-disconnect-card__card-stat-block,.jp-connection__disconnect-card__card-headline+.jp-disconnect-card__card-stat-block{margin-top:.5rem}}.jp-connection__disconnect-card__card-stat-block{align-items:baseline;display:flex;flex-grow:1}@media only screen and (min-width:782px){.jp-connection__disconnect-card__card-stat-block{flex-direction:row-reverse}}.jp-connection__disconnect-card__card-description{flex-grow:1}@media only screen and (min-width:782px){.jp-connection__disconnect-card__card-description{text-align:left}}.jp-connection__disconnect-card__card-stat{font-size:1rem;font-weight:600;margin-left:.5rem}@media only screen and (min-width:782px){.jp-connection__disconnect-card__card-stat{font-size:1.5rem;margin-left:0;margin-right:1rem}}.jp-components__decorative-card{border-radius:8px;box-shadow:0 0 15px var(--jp-gray);display:flex;height:280px;margin:0 auto 3rem;max-width:100%;overflow:hidden;position:relative;width:360px}.jp-components__decorative-card__content,.jp-components__decorative-card__image{width:50%}.jp-components__decorative-card__image{background:var(--jp-gray);background-size:cover;position:relative}.jp-components__decorative-card__image:before{background-image:url('data:image/svg+xml;uf8,');content:"";display:block;height:8px;position:absolute;right:24px;top:24px;width:38px}.jp-components__decorative-card__content{background:#fff;padding:2rem}.jp-components__decorative-card__icon-container{background:var(--jp-red);border-radius:50px;height:80px;position:absolute;right:50%;top:50%;transform:translate(50%,-50%);width:80px}.jp-components__decorative-card__icon{background-position:50%,50%;background-repeat:no-repeat;height:40px;position:absolute;right:50%;top:50%;transform:translate(50%,-50%);width:40px}.jp-components__decorative-card__icon--unlink{background-image:url('data:image/svg+xml;uf8, ')}.jp-components__decorative-card__lines,.jp-components__decorative-card__lines:after,.jp-components__decorative-card__lines:before{background:#e9eff5;border-radius:6px;display:block;height:12px;position:relative;width:100%}.jp-components__decorative-card__lines:after,.jp-components__decorative-card__lines:before{content:"";top:calc(100% + 16px)}.jp-components__decorative-card__lines:after{top:calc(100% + 32px);width:75%}.jp-components__decorative-card--vertical{flex-direction:column}.jp-components__decorative-card--vertical .jp-components__decorative-card__content,.jp-components__decorative-card--vertical .jp-components__decorative-card__image{height:50%;width:100%}.jp-components__decorative-card--vertical .jp-components__decorative-card__lines{margin-left:auto;margin-right:auto;max-width:135px}.jp-components__decorative-card--vertical .jp-components__decorative-card__lines:after,.jp-components__decorative-card--vertical .jp-components__decorative-card__lines:before{margin-left:auto;margin-right:auto}.jp-connect__disconnect-survey-card{border:2px solid transparent;border-radius:4px;box-shadow:0 0 15px var(--jp-gray-off);margin-left:auto;margin-right:auto;max-width:100%;padding:1rem;position:relative;text-align:right;width:800px}.jp-connect__disconnect-survey-card--selected{background:var(--jp-gray-off);border-color:var(--jp-black)}.jp-connect__disconnect-survey-card:after{border-left:2px solid var(--jp-black);border-top:2px solid var(--jp-black);content:"";display:block;height:5px;left:1.5rem;position:absolute;top:50%;transform:translateY(-50%) rotate(-45deg);width:5px}.jp-connect__disconnect-survey-card:hover{cursor:pointer}.jp-connect__disconnect-survey-card:focus:not(.jp-disconnect-survey-card--selected),.jp-connect__disconnect-survey-card:hover:not(.jp-disconnect-survey-card--selected){border-color:var(--jp-black-80)}.jp-connect__disconnect-survey-card__answer{align-items:center;display:flex;font-weight:700;margin:0}input.jp-connect__disconnect-survey-card__input{-webkit-appearance:none;background-color:transparent;border:none;color:var(--jp-black-80);flex-grow:1;max-width:calc(100% - 40px);padding-left:40px}.zvd4dCB_bBDiXJKKDqXm{position:relative}.ly4o9lSswAGHFXqGUEIO{left:32px;position:absolute;top:32px;z-index:1}.u64Go3kwEZ7MD9eji0H1{color:var(--jp-gray-50);font-size:13px;margin-bottom:16px;width:60%}._RT41NE3LU4R0ubcij2y{align-items:center;display:flex}._RT41NE3LU4R0ubcij2y li{background:none!important;margin:0!important;padding:0!important}.cFGWJeRiGHjAr8D7CWJW{margin-left:8px;max-width:110px}.Iz3l7a05TP6HK9S92TIL{width:16px}.lmQ0wFmnk4kKkGVjokPA{height:18px;margin-right:8px}.AoIs8wD92wKR8RpQj6Uc{align-items:center;display:inline-flex}.rV_5QyvhDnsVjCX4pb0h{--gray-90:#1e1e1e;fill:var(--gray-90);width:24px}.MO1jDNY8VPqeNS9xL8jE{align-items:center;display:flex;text-decoration:none}.jp-connection__connect-screen{--spacing-base:8px}.jp-connection__connect-screen__loading{display:none}.jp-connection__connect-screen .terms-of-service{margin-bottom:calc(var(--spacing-base)*3);margin-top:calc(var(--spacing-base)*4);max-width:360px}.jp-connection__connect-screen .terms-of-service a{text-decoration:underline}.jp-connection__connect-screen .jp-action-button{margin-top:40px}.jp-connection__connect-screen .jp-action-button--button{border-radius:4px;font-weight:600}.jp-connection__connect-screen .jp-action-button button{max-width:100%}.jp-connection__connect-screen .jp-action-button button:disabled{color:hsla(0,0%,100%,.4)}@media(max-width:782px){.jp-connection__connect-screen .jp-action-button button{max-width:none;width:100%}}.jp-connection__connect-screen__loading-message{position:absolute;clip:rect(1px,1px,1px,1px);border:0;height:1px;overflow:hidden;padding:0;white-space:nowrap;width:1px}.jp-connection__connect-screen__loading-message:empty{display:none}.jp-connection__connect-screen__footer{margin-top:32px}.jp-connection__connect-screen-layout{background:var(--jp-white);border-radius:4px;box-shadow:0 0 40px rgba(0,0,0,.08)}.jp-connection__connect-screen-layout__loading{display:none}.jp-connection__connect-screen-layout__left,.jp-connection__connect-screen-layout__right{box-sizing:border-box}.jp-connection__connect-screen-layout__left{padding:calc(var(--spacing-base)*3)}@media(min-width:600px){.jp-connection__connect-screen-layout__left{padding:64px 96px}}.jp-connection__connect-screen-layout__left .jetpack-logo{margin-bottom:24px}.jp-connection__connect-screen-layout__left h2{color:var(--jp-black);font-size:36px;font-style:normal;font-weight:700;line-height:40px;margin-bottom:0;margin-top:32px}.jp-connection__connect-screen-layout__left h3{color:var(--jp-black);font-size:24px;font-style:normal;font-weight:500;line-height:32px;margin-bottom:0;margin-top:32px}.jp-connection__connect-screen-layout__left li,.jp-connection__connect-screen-layout__left p{font-size:16px;font-style:normal;font-weight:400;line-height:24px}.jp-connection__connect-screen-layout__left p{color:#101517;margin:16px 0}.jp-connection__connect-screen-layout__left a{color:var(--jp-black);font-size:var(--font-body);font:inherit;height:auto;padding:0;text-decoration:underline}.jp-connection__connect-screen-layout__left a:hover{color:var(--jp-black);text-decoration-thickness:var(--jp-underline-thickness)}.jp-connection__connect-screen-layout__left a:focus{box-shadow:none!important;color:var(--jp-black)}.jp-connection__connect-screen-layout__left ul{list-style-type:none;padding:0}.jp-connection__connect-screen-layout__left ul li{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAANlBMVEVHcEwFnwUInggGnggGnggHnAcAnwUFnQcAnwcGnwkFnQgGnQgFnwcGnQYFnQcFnAcGnQkDnwdhiL0pAAAAEnRSTlMAMF//f2Aw7yBQ3+9gcIBgcED+HDbkAAAAZklEQVR4Ae3LNwICARDDQC0+cv7/Y8mwV9odSfWIcf/+VegnGkIvDaGXKvTTn/Gz+Uf5xTL0K1XotS7fs5H6GHvvaO8d7c3j7rdgHne/A/PYt/cO+R42oYdN6OEQetiFHo4A//6dAXqtBEkmtWutAAAAAElFTkSuQmCC) no-repeat;background-size:24px;color:var(--jp-black);margin-bottom:9px;padding-right:30px}.jp-connection__connect-screen-layout__right{padding:64px 0}.jp-connection__connect-screen-layout__right img{max-width:100%}.jp-connection__connect-screen-layout__two-columns{display:flex;flex-wrap:wrap}.jp-connection__connect-screen-layout__two-columns .jp-connection__connect-screen-layout__left{flex-basis:100%;flex-grow:1}@media(min-width:1080px){.jp-connection__connect-screen-layout__two-columns .jp-connection__connect-screen-layout__left{flex-basis:52%}}.jp-connection__connect-screen-layout__two-columns .jp-connection__connect-screen-layout__right{background:#f9f9f6;display:none;flex-basis:47%;flex-grow:1}@media(min-width:1080px){.jp-connection__connect-screen-layout__two-columns .jp-connection__connect-screen-layout__right{display:block}}.rna{overflow:hidden}.rna .jp-connection__connect-screen-layout__left{position:relative;z-index:2}.rna .jp-connection__connect-screen-layout__left h2{font-weight:700;margin-top:0}.rna .jp-connection__connect-screen-layout__left h3{margin-top:24px}@media(min-width:600px){.rna .jp-connection__connect-screen-layout__left{padding:4rem 4rem 4rem 6rem}}@media(min-width:1080px){.rna .jp-connection__connect-screen-required-plan__pricing-card{left:calc(var(--spacing-base)*-45);position:absolute;top:calc(var(--spacing-base)*9.25)}}.rna .jp-connection__connect-screen-required-plan__pricing-card .jp-components__pricing-card{border-radius:var(--jp-border-radius-rna);max-width:100%;width:425px}.rna .jp-connection__connect-screen-required-plan__pricing-card .jp-components__pricing-card__title{margin-top:.625rem}@media(min-width:960px){.rna .jp-connection__connect-screen-required-plan__pricing-card .jp-components__pricing-card{padding:3rem}}.rna .jp-connection__connect-screen-required-plan__pricing-card .components-button{margin-bottom:0}.rna .jp-backup-dashboard-promotion ul.jp-product-promote li{margin-bottom:.75rem}.rna .jp-connection__connect-screen-layout__color-blobs{clip-path:polygon(100% 0,100% 100%,0 0,0 0);display:none;height:677px;left:0;position:absolute;top:0;width:363px;z-index:1}.rna .jp-connection__connect-screen-layout__color-blobs__blue,.rna .jp-connection__connect-screen-layout__color-blobs__green,.rna .jp-connection__connect-screen-layout__color-blobs__yellow{border-radius:50%;filter:blur(50px);position:absolute}.rna .jp-connection__connect-screen-layout__color-blobs__blue{background-color:var(--jp-blue-5);height:400px;left:-100px;top:-275px;width:400px;z-index:3}.rna .jp-connection__connect-screen-layout__color-blobs__yellow{background-color:var(--jp-yellow-5);height:250px;left:-25px;top:10px;width:250px;z-index:2}.rna .jp-connection__connect-screen-layout__color-blobs__green{background-color:var(--jp-green-5);height:300px;left:0;top:175px;width:300px;z-index:1}@media(min-width:1080px){.rna .jp-connection__connect-screen-layout__color-blobs{display:initial}}.terms-of-service{color:var(--jp-black);font-size:var(--font-body)}.terms-of-service .terms-of-service__link{color:var(--jp-green-50);text-decoration:underline;white-space:nowrap}.TcCZnGE6mad8Dvz9pCZi{background:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgZmlsbD0ibm9uZSI+PHBhdGggc3Ryb2tlPSIjRDYzNjM5IiBzdHJva2Utd2lkdGg9IjEuNSIgZD0iTTEyIDIwYTggOCAwIDEgMCAwLTE2IDggOCAwIDAgMCAwIDE2WiIvPjxwYXRoIGZpbGw9IiNENjM2MzkiIGQ9Ik0xMyA3aC0ydjZoMnpNMTMgMTVoLTJ2MmgyeiIvPjwvc3ZnPg==) no-repeat 100% 0;color:var(--jp-red);line-height:25px;padding-right:25px}._mn6o2Dtm5pfFWc8_A1K{--spacing-base:8px;min-width:264px}.SWwV4Pw6OZ5vU3PqPXmr{--product-card-shadow:rgb(0 0 0/3%);background-color:var(--jp-white);border:1px solid var(--jp-gray);border-radius:var(--jp-border-radius);box-shadow:0 2px 6px var(--product-card-shadow),0 1px 2px var(--product-card-shadow)}.r7tUofa9Z3A5ziKVR1H7{align-items:center;display:flex}.r7tUofa9Z3A5ziKVR1H7 img{object-fit:cover;width:100%}.i_AnOR3MaQLraGvb2QU5{background-color:#f9f9f6}.YcYvLvdvWrb1EUZoVsE8{display:flex;flex-wrap:wrap;gap:calc(var(--horizontal-spacing)*2);justify-content:space-between}.uGTTsKoIOoZdYhk6uPnl{white-space:nowrap}.uGTTsKoIOoZdYhk6uPnl>span{font-size:var(--font-body-small)}.hdasSNj9k3Sc5PwXK4uE{margin-left:4px;width:16px}.eWN8Hj0SBRDq1F48n_Fg{--gray-70:#3c434a;align-items:center;color:var(--gray-70);display:flex;font-size:14px;text-decoration:none}.p4qz2tkq0p9hxucJ6Qk2{--padding:calc(var(--spacing-base)*4);color:var(--jp-black)}.lbNDyXioOwvyvbALtCBm{--gap:calc(var(--spacing-base)*3);padding:var(--padding) 0;position:relative}.s2Lsn4kbm6BrS3DSndRB .lbNDyXioOwvyvbALtCBm{column-gap:var(--gap);display:grid;grid-auto-flow:column;grid-template-columns:repeat(var(--columns),1fr);grid-template-rows:repeat(var(--rows),minmax(min-content,max-content))}.cLaNK_XcbTGlRQ4Tp43Q{margin-top:var(--padding)}.s2Lsn4kbm6BrS3DSndRB .cLaNK_XcbTGlRQ4Tp43Q{display:contents}.cLaNK_XcbTGlRQ4Tp43Q.CYt1X0eH1icRjhtJ28jx>*{background:var(--jp-white);position:relative}.cLaNK_XcbTGlRQ4Tp43Q.CYt1X0eH1icRjhtJ28jx>:after{bottom:0;box-shadow:0 4px 24px rgba(0,0,0,.05);content:"";left:0;position:absolute;right:0;top:0;z-index:-1}.cLaNK_XcbTGlRQ4Tp43Q>:first-child{border-top-left-radius:var(--jp-border-radius);border-top-right-radius:var(--jp-border-radius);border-width:1px 1px 0}.cLaNK_XcbTGlRQ4Tp43Q>:last-child{border-bottom-left-radius:var(--jp-border-radius);border-bottom-right-radius:var(--jp-border-radius);border-width:0 1px 1px}.DAkZc1P9A3K12fjEliMg{display:flex;flex-direction:column;justify-content:space-between;padding:var(--padding)}.WUBuYABl8nymjs9NnCEL{align-items:center;display:flex;padding-bottom:calc(var(--spacing-base)*2);position:relative}.WUBuYABl8nymjs9NnCEL:not(:nth-child(2)){padding-top:calc(var(--spacing-base)*2)}.WUBuYABl8nymjs9NnCEL:not(:nth-child(2)):before{background-color:var(--jp-gray);content:"";height:1px;left:var(--padding);position:absolute;right:var(--padding);top:0;z-index:5}.s2Lsn4kbm6BrS3DSndRB .WUBuYABl8nymjs9NnCEL:not(:nth-child(2)):before{left:unset;right:0;width:calc(100% + var(--gap))}.s2Lsn4kbm6BrS3DSndRB .lbNDyXioOwvyvbALtCBm>:last-child .WUBuYABl8nymjs9NnCEL:not(:nth-child(2)):before{width:100%}.ANtCFeb41NhA8PA3H7ZN,.WUBuYABl8nymjs9NnCEL:last-of-type{padding-bottom:var(--padding)}.Ql2gy_148yW8Vw5vhaKD{padding-left:var(--padding);padding-right:var(--padding)}.EAQrAnQEW1z1BfdY5gbC{margin:0 var(--spacing-base);fill:var(--jp-gray);flex-shrink:0}.EAQrAnQEW1z1BfdY5gbC.JDSTlLoOC_4aUoH2oNM2{fill:var(--jp-green-40)}.EAQrAnQEW1z1BfdY5gbC.zNdQRJ1w7BvaQOYyqzHK{fill:var(--jp-red-50)}.lr7vbX95SKtoe7DarJcZ{margin-right:auto}.s2Lsn4kbm6BrS3DSndRB .lr7vbX95SKtoe7DarJcZ{margin:0 var(--spacing-base);top:1px}.WUBuYABl8nymjs9NnCEL .KRrGp2xdkeBOxLZeuQ6X{fill:var(--jp-gray-20);flex-shrink:0}.H_ZJiRVJg0LiMXPGOcmt{text-align:center;width:fit-content}.H_ZJiRVJg0LiMXPGOcmt>a{color:#000}.s2Lsn4kbm6BrS3DSndRB .H_ZJiRVJg0LiMXPGOcmt{grid-column:2;overflow:hidden;padding-left:var(--padding);padding-right:var(--padding);white-space:nowrap}.x21z_DixObRDsDaWotP1{align-items:right;display:flex;justify-content:right;margin:0 calc(var(--spacing-base)*4)}.components-popover:not(.is-without-arrow):before{border-color:var(--jp-gray)}.icon-tooltip-helper .components-popover:not([data-y-axis=middle])[data-x-axis=left] .components-popover__content{margin-left:-62px}.icon-tooltip-helper .components-popover:not([data-y-axis=middle])[data-x-axis=right] .components-popover__content{margin-right:-62px}.icon-tooltip-helper .components-popover[data-y-axis=bottom] .components-popover__content{top:2px!important}.icon-tooltip-helper .components-popover:not(.is-without-arrow)[data-y-axis=bottom]:before{top:-6px!important}.icon-tooltip-helper .components-popover:not(.is-without-arrow)[data-y-axis=bottom]:after{top:-4px!important}.icon-tooltip-helper .components-popover[data-y-axis=top] .components-popover__content{bottom:10px!important}.icon-tooltip-helper .components-popover:not(.is-without-arrow)[data-y-axis=top]:before{bottom:3px}.icon-tooltip-helper .components-popover:not(.is-without-arrow)[data-y-axis=top]:after{bottom:4px}.icon-tooltip-helper.is-wide .components-popover__content{width:440px}.icon-tooltip-wrapper{color:var(--jp-black);display:inline-block;position:relative}.icon-tooltip-wrapper .components-button.is-link:focus:not(:disabled){box-shadow:none}.icon-tooltip-helper{height:18px;pointer-events:none;position:absolute;right:-53px;top:0;width:124px}.icon-tooltip-container{pointer-events:all}.icon-tooltip-container .components-popover__content{border:1px solid var(--jp-gray);border-radius:4px;margin:0 10px;max-width:90vw;outline:none;padding:24px;white-space:normal;width:304px}.icon-tooltip-title{font-size:16px;font-weight:600;line-height:19px}.icon-tooltip-title:not(:last-child){margin-bottom:8px}.icon-tooltip-content{font-size:14px;font-weight:400;line-height:24px}.icon-tooltip-content ul{list-style-type:disc;margin:0 1rem 0 0}.icon-tooltip-content ul li:last-child{margin-bottom:0}.dovianZYLKhnbnh9I06o{align-items:flex-start;display:flex;flex-wrap:wrap;justify-content:flex-end}.lljtQMhW7lq5tE5SDJEf{align-items:flex-start;display:flex;flex-basis:0;flex-grow:2}.lljtQMhW7lq5tE5SDJEf .NubApIV1vQCRUNprfm6b{margin-right:auto}.dhFQXpZfMwVI8vuYHnwC{align-items:flex-start;display:inline-flex;flex:0 0 auto;position:relative}.dhFQXpZfMwVI8vuYHnwC:first-child{margin-left:calc(var(--spacing-base)*2)}.dhFQXpZfMwVI8vuYHnwC.eD7hzxFmdtG_MgmBtl_k{color:var(--jp-gray-20)}.dhFQXpZfMwVI8vuYHnwC.eD7hzxFmdtG_MgmBtl_k:after{background:var(--jp-red);border-radius:var(--jp-border-radius);content:" ";display:block;height:3px;margin-top:-2px;pointer-events:none;position:absolute;top:50%;width:100%}.C64ZjjUAqJC1T2Sa7apS{align-items:flex-start;display:flex;flex-wrap:wrap;justify-content:flex-start;margin-bottom:calc(var(--spacing-base)*3)}.UpZDGew6Ay1hPoP6eI7b{color:var(--jp-gray-40);font-size:var(--font-body-small);line-height:20px}.UpZDGew6Ay1hPoP6eI7b:after{content:"​"}.NubApIV1vQCRUNprfm6b{background-color:var(--jp-yellow-10);border-radius:4px;font-size:13px;font-weight:600;margin-right:var(--spacing-base);padding-left:var(--spacing-base);padding-right:var(--spacing-base)}.TDiiPbuW1Z0_05u_pvcK{font-weight:400}.VHYulMcpzbr10HWR0iSE{align-items:flex-start;border:1px solid var(--jp-black);border-color:var(--jp-gray-5);border-radius:4px;border-right-width:6px;display:flex;font-size:var(--font-body);padding:24px 18px 27px 31px}.FGpSkMCiIHQjszcV0dbn{margin-left:20px}.FGpSkMCiIHQjszcV0dbn,.KoWZcCwhW13xvkEb0QON{height:calc(var(--spacing-base)*3);width:calc(var(--spacing-base)*3)}.KoWZcCwhW13xvkEb0QON{background-color:transparent;border:none;cursor:pointer;outline:none}@media screen and (max-width:600px){.VHYulMcpzbr10HWR0iSE{box-shadow:0 4px 8px rgba(0,0,0,.03),0 1px 2px rgba(0,0,0,.06);padding-top:68px;position:relative}.FGpSkMCiIHQjszcV0dbn{position:absolute;right:24px;top:24px}.KoWZcCwhW13xvkEb0QON{left:24px;position:absolute;top:24px}}.smrfczkC53EaFM8OJUXs{flex-grow:1}.IKYRWoPwt9xOVEx1wzNS{font-weight:600;margin-bottom:8px}.qM0qY6mPYp1MPN54A3Kg{align-items:center;display:flex;margin-top:20px}.qM0qY6mPYp1MPN54A3Kg a,.qM0qY6mPYp1MPN54A3Kg a:active,.qM0qY6mPYp1MPN54A3Kg a:focus,.qM0qY6mPYp1MPN54A3Kg a:hover{color:var(--jp-black)}.qM0qY6mPYp1MPN54A3Kg>*{margin-left:24px}.A5YkDkkXuiYgavrY6Nux{border-right-color:var(--jp-red)}.A5YkDkkXuiYgavrY6Nux .y_IPyP1wIAOhyNaqvXJq{fill:var(--jp-red)}.cT5rwuPMZzWvi5o6shMl{border-right-color:var(--jp-yellow-20)}.cT5rwuPMZzWvi5o6shMl .y_IPyP1wIAOhyNaqvXJq{fill:var(--jp-yellow-20)}.yo0O3uvNomPsYUXFCpAS{border-right-color:var(--black)}.yo0O3uvNomPsYUXFCpAS .y_IPyP1wIAOhyNaqvXJq{fill:var(--black)}.oZdDFf1jBLkzn5ICCC6x{border-right-color:var(--jp-green)}.oZdDFf1jBLkzn5ICCC6x .y_IPyP1wIAOhyNaqvXJq{fill:var(--jp-green)}.q0T8YyQxRawhpDtvJjxI{background-color:var(--jp-white);height:100%;padding:calc(var(--spacing-base)*8);position:relative}.B7JDqI_vtKxSy5GjvqA1{display:flex;flex-direction:column;height:100%}.zj7xadmhIWeuf7ZwvVTS{align-items:center;background:var(--jp-black);border-radius:var(--jp-border-radius) var(--jp-border-radius) 0 0;color:var(--jp-white);display:flex;height:calc(var(--spacing-base)*4);padding:0 var(--spacing-base);position:absolute;right:0;top:0;width:100%}.GsioW6IsC8EMYE3U6788{fill:var(--jp-white);margin-left:var(--spacing-base)}.cfEO8udWbRGPFJzW8Jg5,.dbz07JqxOlivjKO4vBEF{align-items:center;display:flex;height:calc(var(--spacing-base)*4);margin-bottom:calc(var(--spacing-base)*4)}.zlh3zbjUe4Z8cBs7uVVe{fill:#8c8f94;height:24px;line-height:24px}.qoZuzG5EcDa231hC6t0P{align-items:center;display:flex;justify-content:center}.qoZuzG5EcDa231hC6t0P svg{margin-left:var(--spacing-base)}.Q6uUUQCPWS6_6nLxIn68{display:inline-block;min-height:42px;padding:.5em 2em;text-align:center;width:100%}.Q6uUUQCPWS6_6nLxIn68 .YU4iBCRze09ZP3iCsdcb{margin:0}.Q6uUUQCPWS6_6nLxIn68.components-button.is-primary{height:auto;white-space:normal}.Q6uUUQCPWS6_6nLxIn68.is-secondary:hover:not(:disabled){background-color:var(--jp-black);color:var(--jp-white)}.OrQG7DjDd9Ha2Xj1Mx3L{margin-top:calc(var(--spacing-base)*2)}.Q1jaYDpa2AVfJpA29wT0{flex-grow:1;margin:0;margin-bottom:calc(var(--spacing-base)*2);padding:0}.Q1jaYDpa2AVfJpA29wT0 li{align-items:flex-start;display:flex;list-style:none;margin-bottom:var(--spacing-base)}.Q1jaYDpa2AVfJpA29wT0 svg{fill:var(--jp-green-primary);flex-shrink:0;margin-left:var(--spacing-base)}.HL4gSxsF0skYGhGuqH90 li:last-of-type{font-weight:700}.sEcLfpWjo0GF7QrxD3Lt{margin-top:calc(var(--spacing-base)*2)}.xgv3jRkeF39aEQELCwru{align-items:flex-end;color:var(--jp-black);display:flex;flex-wrap:wrap}.twlleZ5Ehq4bB7CvKVSW{position:relative}.twlleZ5Ehq4bB7CvKVSW:first-child{margin-left:calc(var(--spacing-base)*2)}.twlleZ5Ehq4bB7CvKVSW.Qg4rPEvXsqmod1s_31d8{color:var(--jp-gray-20)}.twlleZ5Ehq4bB7CvKVSW.Qg4rPEvXsqmod1s_31d8:after{background:var(--jp-red);border-radius:var(--jp-border-radius);content:" ";display:block;height:3px;margin-top:-2px;pointer-events:none;position:absolute;top:50%;width:100%}.ApsgxIornVy_3KnciVeJ{color:var(--jp-gray-40);margin-bottom:calc(var(--spacing-base)*3)}.NMxcZL17aEP7v81uG3zD{margin-top:calc(var(--spacing-base)*5)}.gCTKfAPzJqZas7CaRbKN{margin-bottom:calc(var(--spacing-base)*4)}.demNsMJjhi7BLY7xhjU5{align-items:center;display:flex;font-size:var(--font-body);line-height:calc(var(--spacing-base)*3);margin:calc(var(--spacing-base)*2) 0;min-height:calc(var(--spacing-base)*3)}.QiUjdjJSkqh6nH7YMG5A{align-self:flex-start;height:calc(var(--spacing-base)*3);margin-left:calc(var(--spacing-base)/2);width:calc(var(--spacing-base)*3)}.Q080AHcq29J2fc68Hhk5{color:var(--jp-red)}.Q080AHcq29J2fc68Hhk5 .hYWbIwhppukXmGnsiT9H{fill:var(--jp-red)}.JjHuxWly0HI9C60gorbq{color:var(--jp-yellow-40)}.JjHuxWly0HI9C60gorbq .hYWbIwhppukXmGnsiT9H{fill:var(--jp-yellow-40)}.Cm8ZFHi3mngl4cj9Gatx{color:var(--jp-blue-40)}.Cm8ZFHi3mngl4cj9Gatx .hYWbIwhppukXmGnsiT9H{fill:var(--jp-blue-40)}.ytGBsU015p3LGwOPwFDx{color:var(--jp-green)}.ytGBsU015p3LGwOPwFDx .hYWbIwhppukXmGnsiT9H{fill:var(--jp-green)}.svE2cJL5t2FarzcDQYNe{--product-card-shadow:rgb(0 0 0/3%);background-color:var(--jp-white);border:1px solid var(--jp-gray);border-radius:var(--jp-border-radius);box-shadow:0 2px 6px var(--product-card-shadow),0 1px 2px var(--product-card-shadow)}.dvEJEDNTnmVfVxtLa4uU{align-items:center;display:flex}.dvEJEDNTnmVfVxtLa4uU img{object-fit:cover;width:100%}.K1VY4DNP8PHMWAEVBC_h{background-color:#f9f9f6}.nk_COGPrkBNLp7lVt4sQ{display:flex;flex-wrap:wrap;gap:calc(var(--horizontal-spacing)*2);justify-content:space-between}.ukgQ5TmLablG3svUKjdw{white-space:nowrap}.ukgQ5TmLablG3svUKjdw>span{font-size:var(--font-body-small)}.EUcF2LKeC2GyhWD2FKCP{background-color:var(--jp-white);height:100%;padding:calc(var(--spacing-base)*8);position:relative}.Bm21LIBQtpRo3ZhOxXBG{display:flex;gap:calc(var(--spacing-base)*2)}.jp-license-activation-screen-controls{background:var(--jp-white);display:flex;flex-direction:column;justify-content:space-between;padding:32px}.jp-license-activation-screen-controls h1{font-size:44px;font-weight:700;line-height:1.4;margin:.67em 0}.jp-license-activation-screen-controls p{font-size:var(--font-body);margin:1em 0}.jp-license-activation-screen-controls label{font-size:var(--font-body);font-weight:600}@media screen and (min-width:780px){.jp-license-activation-screen-controls{padding:64px}}.jp-license-activation-screen-controls .jp-license-activation-screen-controls--license-field,.jp-license-activation-screen-controls .jp-license-activation-screen-controls--license-field-with-error{max-width:500px}.jp-license-activation-screen-controls .jp-license-activation-screen-controls--license-field .components-input-control__label.components-input-control__label.components-input-control__label,.jp-license-activation-screen-controls .jp-license-activation-screen-controls--license-field-with-error .components-input-control__label.components-input-control__label.components-input-control__label{font-size:var(--font-body);font-weight:600}.jp-license-activation-screen-controls .jp-license-activation-screen-controls--license-field input.components-text-control__input,.jp-license-activation-screen-controls .jp-license-activation-screen-controls--license-field select.components-select-control__input,.jp-license-activation-screen-controls .jp-license-activation-screen-controls--license-field-with-error input.components-text-control__input,.jp-license-activation-screen-controls .jp-license-activation-screen-controls--license-field-with-error select.components-select-control__input{border-radius:var(--jp-border-radius);font-size:18px;line-height:24px;margin:0;min-height:48px}.jp-license-activation-screen-controls .jp-license-activation-screen-controls--license-field input.components-text-control__input{border:1px solid var(--jp-gray-40)}.jp-license-activation-screen-controls .jp-license-activation-screen-controls--license-field-with-error input.components-text-control__input,.jp-license-activation-screen-controls .jp-license-activation-screen-controls--license-field-with-error select.components-select-control__input{border:1px solid var(--jp-red)}.jp-license-activation-screen-controls .jp-license-activation-screen-controls--license-field-error{align-items:flex-start;color:var(--jp-red);display:flex;flex-direction:row;max-width:500px}.jp-license-activation-screen-controls .jp-license-activation-screen-controls--license-field-error svg{margin-left:4px;fill:var(--jp-red);min-width:24px}.jp-license-activation-screen-controls .jp-license-activation-screen-controls--license-field-error span{font-size:var(--font-body)}.jp-license-activation-screen-controls .jp-license-activation-screen-controls--button,.jp-license-activation-screen-controls .jp-license-activation-screen-controls--button:active{background-color:var(--jp-black);border-radius:4px;color:var(--jp-white);display:flex;font-size:16px;font-size:var(--font-body);font-style:normal;font-weight:600;justify-content:center;line-height:24px;margin-top:24px;min-height:48px;min-width:158px;padding:13.5px 45px;width:100%}@media screen and (min-width:480px){.jp-license-activation-screen-controls .jp-license-activation-screen-controls--button,.jp-license-activation-screen-controls .jp-license-activation-screen-controls--button:active{width:auto}}.jp-license-activation-screen-controls .jp-license-activation-screen-controls--button:active:hover,.jp-license-activation-screen-controls .jp-license-activation-screen-controls--button:hover{background-color:var(--jp-black-80);color:var(--jp-white)}.jp-license-activation-screen-controls .jp-license-activation-screen-controls--button:active:focus,.jp-license-activation-screen-controls .jp-license-activation-screen-controls--button:focus{background-color:var(--jp-black-80);border:1px solid var(--jp-white);color:var(--jp-white)}.jp-license-activation-screen-controls .jp-license-activation-screen-controls--button:active:disabled,.jp-license-activation-screen-controls .jp-license-activation-screen-controls--button:active[disabled],.jp-license-activation-screen-controls .jp-license-activation-screen-controls--button:disabled,.jp-license-activation-screen-controls .jp-license-activation-screen-controls--button[disabled]{background-color:var(--jp-gray);color:var(--jp-gray-20)}.jp-license-activation-screen-controls .jp-license-activation-screen-controls--button .jp-components-spinner,.jp-license-activation-screen-controls .jp-license-activation-screen-controls--button:active .jp-components-spinner{width:100%}.jp-license-activation-screen-illustration{align-items:center;background:var(--jp-white-off);display:flex;flex-direction:column;justify-content:space-between;padding:32px}.jp-license-activation-screen-illustration--wrapper{display:flex;flex:1}.jp-license-activation-screen-illustration--wrapper img{align-self:center;height:auto;max-width:100%}.jp-license-activation-screen-illustration--support-link{flex:0}.components-button.jp-license-activation-screen-success-info--button,.components-button.jp-license-activation-screen-success-info--button:active,.components-button.jp-license-activation-screen-success-info--button:visited{background-color:var(--jp-black);border-radius:4px;color:var(--jp-white);font-size:16px;font-size:var(--font-body);font-style:normal;font-weight:600;justify-content:center;line-height:24px;margin:0 0 20px 40px;min-height:48px;min-width:158px;padding:13.5px 45px;width:100%}@media screen and (min-width:480px){.components-button.jp-license-activation-screen-success-info--button,.components-button.jp-license-activation-screen-success-info--button:active,.components-button.jp-license-activation-screen-success-info--button:visited{width:auto}}.components-button.jp-license-activation-screen-success-info--button:active:hover,.components-button.jp-license-activation-screen-success-info--button:hover,.components-button.jp-license-activation-screen-success-info--button:visited:hover{background-color:var(--jp-black-80);color:var(--jp-white)}.components-button.jp-license-activation-screen-success-info--button:active:focus,.components-button.jp-license-activation-screen-success-info--button:focus,.components-button.jp-license-activation-screen-success-info--button:visited:focus{background-color:var(--jp-black-80);border:1px solid var(--jp-white);color:var(--jp-white)}.components-button.jp-license-activation-screen-success-info--button:active:disabled,.components-button.jp-license-activation-screen-success-info--button:active[disabled],.components-button.jp-license-activation-screen-success-info--button:disabled,.components-button.jp-license-activation-screen-success-info--button:visited:disabled,.components-button.jp-license-activation-screen-success-info--button:visited[disabled],.components-button.jp-license-activation-screen-success-info--button[disabled]{background-color:var(--jp-gray);color:var(--jp-gray-20)}.components-button.jp-license-activation-screen-success-info--button .jp-components-spinner,.components-button.jp-license-activation-screen-success-info--button:active .jp-components-spinner,.components-button.jp-license-activation-screen-success-info--button:visited .jp-components-spinner{width:100%}.jp-license-activation-screen-success-info--product-details h1{line-height:52px}.jp-license-activation-screen-success-info--product-details a{color:var(--jp-black);text-decoration:underline!important}.jp-license-activation-screen-success-info--external-link{color:var(--jp-black);font-size:16px;font-style:normal;font-weight:600;text-decoration:underline!important;white-space:nowrap}.jp-wrap{align-items:center;display:flex;flex-wrap:wrap;margin:0 auto;max-width:1128px}.jp-row{display:grid;grid-gap:24px;grid-template-columns:repeat(4,1fr);margin:0 16px;width:100%}@media(min-width:600px){.jp-row{grid-template-columns:repeat(8,1fr);margin:0 18px}}@media(min-width:960px){.jp-row{grid-template-columns:repeat(12,1fr);margin:0 24px;max-width:1128px}}.sm-col-span-1{grid-column-end:span 1}.sm-col-span-2{grid-column-end:span 2}.sm-col-span-3{grid-column-end:span 3}.sm-col-span-4{grid-column-end:span 4}@media(min-width:600px){.md-col-span-1{grid-column-end:span 1}.md-col-span-2{grid-column-end:span 2}.md-col-span-3{grid-column-end:span 3}.md-col-span-4{grid-column-end:span 4}.md-col-span-5{grid-column-end:span 5}.md-col-span-6{grid-column-end:span 6}.md-col-span-7{grid-column-end:span 7}.md-col-span-8{grid-column-end:span 8}}@media(min-width:960px){.lg-col-span-1{grid-column-end:span 1}.lg-col-span-2{grid-column-end:span 2}.lg-col-span-3{grid-column-end:span 3}.lg-col-span-4{grid-column-end:span 4}.lg-col-span-5{grid-column-end:span 5}.lg-col-span-6{grid-column-end:span 6}.lg-col-span-7{grid-column-end:span 7}.lg-col-span-8{grid-column-end:span 8}.lg-col-span-9{grid-column-end:span 9}.lg-col-span-10{grid-column-end:span 10}.lg-col-span-11{grid-column-end:span 11}.lg-col-span-12{grid-column-end:span 12}}@media(max-width:960px){.md-col-span-0{display:none}}@media(max-width:600px){.sm-col-span-0{display:none}}.jp-cut{border:2px solid var(--jp-green-primary);border-radius:var(--jp-border-radius);margin:32px 0;padding:16px 24px 16px 64px;position:relative;text-decoration:none}.jp-cut,.jp-cut span{display:block}.jp-cut span:last-of-type{font-weight:600}.jp-cut:focus span:last-of-type,.jp-cut:hover span:last-of-type{text-decoration:underline;text-decoration-thickness:var(--jp-underline-thickness)}.jp-cut:focus:after,.jp-cut:hover:after{transform:translateY(-50%) translateX(-8px)}.jp-cut:after{color:var(--jp-green-primary);content:"→";font-size:24px;font-weight:600;left:24px;position:absolute;top:50%;transform:translateY(-50%);transition:transform .15s ease-out}.jp-license-activation-screen-success-info{background:var(--jp-white);display:flex;flex-direction:column;justify-content:space-between;padding:32px}.jp-license-activation-screen-success-info h1{font-size:44px;font-weight:700;line-height:1.4;margin:.67em 0}.jp-license-activation-screen-success-info p{font-size:var(--font-body);margin:1em 0}.jp-license-activation-screen-success-info label{font-size:var(--font-body);font-weight:600}@media screen and (min-width:780px){.jp-license-activation-screen-success-info{padding:64px}}@media screen and (max-width:480px){.jp-license-activation-screen-success-info .jp-license-activation-screen-success-info--buttons{text-align:center}}:root{--font-title-large:36px;--font-title-small:24px;--font-body:16px;--font-label:12px;--jp-black:#000;--jp-black-80:#2c3338;--jp-white:#fff;--jp-white-off:#f9f9f6;--jp-gray:#dcdcde;--jp-gray-0:#f6f7f7;--jp-gray-5:#dcdcde;--jp-gray-10:#c3c4c7;--jp-gray-20:#a7aaad;--jp-gray-30:#8c8f94;--jp-gray-40:#787c82;--jp-gray-50:#646970;--jp-gray-60:#50575e;--jp-gray-70:#3c434a;--jp-gray-80:#2c3338;--jp-gray-90:#1d2327;--jp-gray-100:#101517;--jp-gray-off:#e2e2df;--jp-yellow-5:#f5e6b3;--jp-yellow-10:#f2cf75;--jp-orange-20:#faa754;--jp-blue-5:#ced9f2;--jp-red-0:#f7ebec;--jp-red-50:#d63638;--jp-red-60:#b32d2e;--jp-red-80:#8a2424;--jp-red:#d63639;--jp-pink:#c9356e;--jp-green-0:#f0f2eb;--jp-green-5:#d0e6b8;--jp-green-10:#9dd977;--jp-green-20:#64ca43;--jp-green-30:#2fb41f;--jp-green-40:#069e08;--jp-green-50:#008710;--jp-green-60:#007117;--jp-green-70:#005b18;--jp-green-80:#004515;--jp-green-90:#003010;--jp-green-100:#001c09;--jp-green:#069e08;--jp-green-primary:var(--jp-green-40);--jp-green-secondary:var(--jp-green-30);--jp-border-radius:4px;--jp-border-radius-rna:8px;--jp-menu-border-height:1px;--jp-underline-thickness:2px;--jp-modal-padding-large:32px;--jp-modal-padding:24px;--jp-modal-padding-small:16px;--jp-modal-radius:8px;--jp-button-padding:8px;--jp-button-radius:4px;--jp-gap:16px;--jp-highlight:#3858e9}body{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;margin:0;min-height:100%;padding:0}.EiaNctK1_P9pPqOeiaSI{align-items:center;display:flex;flex-wrap:wrap;margin:0 auto;max-width:1128px}.ogHZg_sJCljylz3VJfsf{display:grid;grid-gap:24px;grid-template-columns:repeat(4,1fr);margin:0 16px;width:100%}@media(min-width:600px){.ogHZg_sJCljylz3VJfsf{grid-template-columns:repeat(8,1fr);margin:0 18px}}@media(min-width:960px){.ogHZg_sJCljylz3VJfsf{grid-template-columns:repeat(12,1fr);margin:0 24px;max-width:1128px}}.zv7eGvijKRkbPVakubHw{grid-column-end:span 1}.VoJNoiya_1ck3_kXS6_C{grid-column-end:span 2}.ecv0NO526NoTNbpALA1A{grid-column-end:span 3}.OfBdkceMzeHvRbzhqDlP{grid-column-end:span 4}@media(min-width:600px){.JLb3NpEKN8pOaWd7K1bu{grid-column-end:span 1}.fsMPGqPKE4mjMIPFwl77{grid-column-end:span 2}.DIK_zdaGAQ09eKspBJ4E{grid-column-end:span 3}.shXYpxPu3WCJsR8aOHtz{grid-column-end:span 4}.s7ElrOqG_yGd5SIfwqOR{grid-column-end:span 5}.Cxml9uzGvArAL8_RDs_p{grid-column-end:span 6}.aANxBKDGx72eDqU0iUPj{grid-column-end:span 7}.XxyzuTY3mnQcl9EGZadm{grid-column-end:span 8}}@media(min-width:960px){.Sfo4WaSNIWInJ93Abd3w{grid-column-end:span 1}.tQS7SKUGrU4THhWMysbo{grid-column-end:span 2}.I94U7mpY4h16pcOksZNF{grid-column-end:span 3}.uWMb9k77kQxBdS5MTt0s{grid-column-end:span 4}.rKwEEZQxK9s_POMg5Jss{grid-column-end:span 5}.UcPXX_s06IPCkF7ZjH3D{grid-column-end:span 6}.CrQdtiCFkRbzY6K2dFvt{grid-column-end:span 7}.rEUALOmOdUBXO0Us871z{grid-column-end:span 8}.NqXa9TlcTEviVsB53hBV{grid-column-end:span 9}.OnWVeiQiwgQ9lzdGPW66{grid-column-end:span 10}.D2PkTcy7b8u2K9QXY6VQ{grid-column-end:span 11}.EcqBhzAyxo5RDc2Y6m7K{grid-column-end:span 12}}@media(max-width:960px){.gB1mWzHOM38d80lrhBRX{display:none}}@media(max-width:600px){.KNQXLP78ejczOkour3zg{display:none}}.rBVbaVWBnBRtTMrUKZxm{border:2px solid var(--jp-green-primary);border-radius:var(--jp-border-radius);display:block;margin:32px 0;padding:16px 24px 16px 64px;position:relative;text-decoration:none}.rBVbaVWBnBRtTMrUKZxm span{display:block}.rBVbaVWBnBRtTMrUKZxm span:last-of-type{font-weight:600}.rBVbaVWBnBRtTMrUKZxm:focus span:last-of-type,.rBVbaVWBnBRtTMrUKZxm:hover span:last-of-type{text-decoration:underline;text-decoration-thickness:var(--jp-underline-thickness)}.rBVbaVWBnBRtTMrUKZxm:focus:after,.rBVbaVWBnBRtTMrUKZxm:hover:after{transform:translateY(-50%) translateX(-8px)}.rBVbaVWBnBRtTMrUKZxm:after{color:var(--jp-green-primary);content:"→";font-size:24px;font-weight:600;left:24px;position:absolute;top:50%;transform:translateY(-50%);transition:transform .15s ease-out}.gfM_DIJrVbRhmKdAphIm{background:var(--jp-white);border-radius:var(--jp-modal-radius);box-shadow:0 12px 16px -.5px rgba(0,0,0,.15);height:max-content;margin:3rem auto;max-width:414px;overflow:hidden;position:relative;transition:height .25s cubic-bezier(.59,.37,.18,1.19) 0;width:90%;will-change:height}.gfM_DIJrVbRhmKdAphIm>div:first-child{padding:0}.gfM_DIJrVbRhmKdAphIm *{box-sizing:border-box;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif}.gfM_DIJrVbRhmKdAphIm p{color:var(--jp-black)}.gfM_DIJrVbRhmKdAphIm .zfJfONxRAw0fHjXUS7LN{display:none}.gfM_DIJrVbRhmKdAphIm.pnwbCuWbV0PNQr1LFpRh{height:614px;transition-delay:2.15s}.gfM_DIJrVbRhmKdAphIm.pnwbCuWbV0PNQr1LFpRh h2{margin-top:0}._j4GWTmW5psCHFYh6R0x{align-self:flex-start;margin-top:var(--jp-gap)!important;padding:8px var(--jp-modal-padding-small)!important;width:100%}.saSAjv8yulVXQDoqDJEI{font-weight:500;line-height:110%;margin-bottom:8px}.O_hcdbeMivIhBn7ApDnS{line-height:140%}@media(min-width:760px){.gfM_DIJrVbRhmKdAphIm{height:740px;max-width:1360px;position:relative;width:95%}.gfM_DIJrVbRhmKdAphIm .zfJfONxRAw0fHjXUS7LN{display:block;position:absolute;right:64px;top:64px;z-index:99}.gfM_DIJrVbRhmKdAphIm .zfJfONxRAw0fHjXUS7LN clipPath,.gfM_DIJrVbRhmKdAphIm .zfJfONxRAw0fHjXUS7LN path{fill:#000}.gfM_DIJrVbRhmKdAphIm .zfJfONxRAw0fHjXUS7LN path.FCnyb_xCK7DhJ63p6TEd{fill:#fff}.gfM_DIJrVbRhmKdAphIm.pnwbCuWbV0PNQr1LFpRh{height:740px;transition-delay:0}.gfM_DIJrVbRhmKdAphIm.pnwbCuWbV0PNQr1LFpRh .zfJfONxRAw0fHjXUS7LN clipPath,.gfM_DIJrVbRhmKdAphIm.pnwbCuWbV0PNQr1LFpRh .zfJfONxRAw0fHjXUS7LN path{transition:fill 2s ease .5s;fill:#fff}.gfM_DIJrVbRhmKdAphIm.pnwbCuWbV0PNQr1LFpRh .zfJfONxRAw0fHjXUS7LN path.FCnyb_xCK7DhJ63p6TEd{transition:fill 2s ease .5s;fill:#000}}@keyframes OmAVpCQ270MqI4IsT9Ky{20%{transform:translateY(0) scale(1)}65%{transform:translateY(16%) scale(1.4)}to{transform:translateY(0) scale(1)}}.Qn5xayjI_jH2m1d6BEoq{border-radius:var(--jp-button-radius);display:flex;height:50%;justify-content:center;min-height:400px;overflow:hidden;position:relative;transition:height .55s cubic-bezier(.59,.37,.18,1) 0s;will-change:height}.pnwbCuWbV0PNQr1LFpRh .Qn5xayjI_jH2m1d6BEoq{height:100%;transition-delay:.65s}.pnwbCuWbV0PNQr1LFpRh .Qn5xayjI_jH2m1d6BEoq video{animation:OmAVpCQ270MqI4IsT9Ky 1.5s ease-in-out forwards}.Qn5xayjI_jH2m1d6BEoq video{height:100%;object-fit:cover;position:absolute;right:0;top:0;transform:scale(1);transition:all .85s cubic-bezier(1,0,.39,1) 0s;width:100%;will-change:transform}@media(min-width:760px){@keyframes Axe8f2LgqEBZHVcsRgY5{0%{animation-timing-function:cubic-bezier(.86,0,.07,1);right:60%;top:32px}50%{animation-timing-function:cubic-bezier(.17,.84,.44,1);bottom:32px;right:32px;top:32px;width:100%}to{right:32px;width:40%}}.Qn5xayjI_jH2m1d6BEoq{border-radius:12px;bottom:32px;display:block;height:auto;left:32px;overflow:hidden;position:absolute;right:60%;top:32px;transition-delay:0;transition:width .55s ease 0s;z-index:3}.Qn5xayjI_jH2m1d6BEoq video{height:100%;object-fit:cover;position:absolute;right:0;top:0;width:100%}.pnwbCuWbV0PNQr1LFpRh .Qn5xayjI_jH2m1d6BEoq{animation-delay:.25s;animation-duration:2s;animation-fill-mode:forwards;animation-name:Axe8f2LgqEBZHVcsRgY5;height:auto}}.iBMDoShSmqpt72YfJb36{padding:var(--jp-modal-padding)}.iBMDoShSmqpt72YfJb36 h2{font-size:clamp(1.5rem,-.7353rem + 4.7059vw,3.5rem)}.iBMDoShSmqpt72YfJb36 p{font-size:clamp(1rem,.6974rem + 1.1696vw,1.75rem)}.iBMDoShSmqpt72YfJb36 p.eQG1KKK8jjKtQyzfv573{display:none;font-size:clamp(1.25rem,1.1491rem + .3899vw,1.5rem)}@media(min-width:760px){.iBMDoShSmqpt72YfJb36{bottom:15%;display:flex;flex-direction:column;gap:64px;padding:0 0 0 var(--jp-modal-padding);position:absolute;right:64px;width:55%}.iBMDoShSmqpt72YfJb36 .l35bIyiqYJiZ6tVYvJtC{align-items:flex-start;display:flex;flex-direction:column;gap:16px;padding:0 0 0 32px}.iBMDoShSmqpt72YfJb36 .l35bIyiqYJiZ6tVYvJtC h2,.iBMDoShSmqpt72YfJb36 .l35bIyiqYJiZ6tVYvJtC p{margin:0}.iBMDoShSmqpt72YfJb36 p.eQG1KKK8jjKtQyzfv573{display:block}.iBMDoShSmqpt72YfJb36 ._j4GWTmW5psCHFYh6R0x{align-self:flex-start;padding:16px var(--jp-modal-padding-large)!important;width:auto}.pnwbCuWbV0PNQr1LFpRh .iBMDoShSmqpt72YfJb36{opacity:0;right:-20px;transition:all .55s cubic-bezier(.59,.37,.18,1) .3s}}.HQVDZ6J3x6SJNYFX5khS{background:var(--jp-white);opacity:0;position:absolute;right:0;top:100%;transition:transform .45s cubic-bezier(.59,.37,.18,1) 2s,opacity .45s linear;width:100%;will-change:transform,opacity;z-index:2}.pnwbCuWbV0PNQr1LFpRh .HQVDZ6J3x6SJNYFX5khS{opacity:1;transform:translateY(-100%);transition-delay:2s}@media(min-width:760px){.HQVDZ6J3x6SJNYFX5khS{align-items:flex-end;bottom:5%;container-type:inline-size;display:flex;flex-direction:column;gap:40px;left:32px;padding:0;right:45%;transform:translateY(0);transition-delay:0;transition:none;width:auto}.HQVDZ6J3x6SJNYFX5khS h2{width:100%}.HQVDZ6J3x6SJNYFX5khS ._j4GWTmW5psCHFYh6R0x{margin-left:var(--jp-modal-padding-large)}.pnwbCuWbV0PNQr1LFpRh .HQVDZ6J3x6SJNYFX5khS{bottom:12%;left:32px;opacity:1;right:45%;top:unset;transform:translateY(0);transition:all .45s cubic-bezier(.59,.37,.18,1) 2s,opacity .45s linear;transition-delay:2s;width:auto}.pnwbCuWbV0PNQr1LFpRh .HQVDZ6J3x6SJNYFX5khS .l35bIyiqYJiZ6tVYvJtC{padding-right:32px}.pnwbCuWbV0PNQr1LFpRh .HQVDZ6J3x6SJNYFX5khS ._j4GWTmW5psCHFYh6R0x{align-self:flex-end}}.KdvmPIjelQIFiPQGuIYf{background:var(--jp-gray-0);display:flex;flex-direction:column;gap:var(--jp-gap)}.KdvmPIjelQIFiPQGuIYf div{background-color:var(--jp-white);border:1px solid var(--jp-gray-10);border-radius:var(--jp-button-radius);box-shadow:0 0 40px 0 rgba(0,0,0,.08);flex:1;padding:var(--jp-modal-padding)}.KdvmPIjelQIFiPQGuIYf h3{font-size:24px;line-height:normal;margin:0}.KdvmPIjelQIFiPQGuIYf p{font-size:14px}@media(min-width:760px){.KdvmPIjelQIFiPQGuIYf{flex-direction:row;padding:var(--jp-modal-padding-large)}.KdvmPIjelQIFiPQGuIYf div{border:none;box-shadow:0 2px 16px rgba(0,0,0,.08),0 2px 2px rgba(0,0,0,.1)}.KdvmPIjelQIFiPQGuIYf div p{margin:8px 0}.KdvmPIjelQIFiPQGuIYf svg{margin-bottom:var(--jp-modal-padding-small)}}@container (max-width: 600px){.KdvmPIjelQIFiPQGuIYf div{padding:var(--jp-modal-padding-small)}}.jp-license-activation-screen{border-radius:4px;box-shadow:0 4px 24px 0 rgba(0,0,0,.149);display:flex;flex-direction:column;min-height:540px;overflow:hidden}@media screen and (min-width:780px){.jp-license-activation-screen{flex-direction:row}} \ No newline at end of file diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/composer.json b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/composer.json deleted file mode 100644 index b87b0669..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/composer.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "name": "automattic/jetpack-my-jetpack", - "description": "WP Admin page with information and configuration shared among all Jetpack stand-alone plugins", - "type": "jetpack-library", - "license": "GPL-2.0-or-later", - "require": { - "php": ">=7.0", - "automattic/jetpack-admin-ui": "^0.4.1", - "automattic/jetpack-assets": "^2.1.4", - "automattic/jetpack-boost-speed-score": "^0.3.6", - "automattic/jetpack-connection": "^2.4.1", - "automattic/jetpack-jitm": "^3.1.1", - "automattic/jetpack-licensing": "^2.0.2", - "automattic/jetpack-plugins-installer": "^0.3.2", - "automattic/jetpack-redirect": "^2.0.1", - "automattic/jetpack-constants": "^2.0.1", - "automattic/jetpack-plans": "^0.4.3", - "automattic/jetpack-status": "^2.1.2" - }, - "require-dev": { - "yoast/phpunit-polyfills": "1.1.0", - "automattic/jetpack-changelogger": "^4.1.1", - "automattic/wordbless": "@dev", - "automattic/jetpack-videopress": "^0.23.10" - }, - "suggest": { - "automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package." - }, - "autoload": { - "classmap": [ - "src/", - "src/products" - ] - }, - "scripts": { - "phpunit": [ - "./vendor/phpunit/phpunit/phpunit --colors=always" - ], - "test-php": [ - "@composer phpunit" - ], - "test-js": [ - "pnpm run test" - ], - "test-js-watch": [ - "Composer\\Config::disableProcessTimeout", - "pnpm run test --watch" - ], - "build-development": [ - "pnpm run build" - ], - "build-production": [ - "NODE_ENV=production pnpm run build" - ], - "watch": [ - "Composer\\Config::disableProcessTimeout", - "pnpm run watch" - ], - "post-install-cmd": "WorDBless\\Composer\\InstallDropin::copy", - "post-update-cmd": "WorDBless\\Composer\\InstallDropin::copy" - }, - "minimum-stability": "dev", - "prefer-stable": true, - "extra": { - "autotagger": true, - "mirror-repo": "Automattic/jetpack-my-jetpack", - "textdomain": "jetpack-my-jetpack", - "changelogger": { - "link-template": "https://github.com/Automattic/jetpack-my-jetpack/compare/${old}...${new}" - }, - "branch-alias": { - "dev-trunk": "4.17.x-dev" - }, - "version-constants": { - "::PACKAGE_VERSION": "src/class-initializer.php" - } - }, - "config": { - "allow-plugins": { - "roots/wordpress-core-installer": true - } - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/global.d.ts b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/global.d.ts deleted file mode 100644 index 8f188f1f..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/global.d.ts +++ /dev/null @@ -1,245 +0,0 @@ -interface Window { - myJetpackInitialState?: { - siteSuffix: string; - latestBoostSpeedScores: { - scores: { - desktop: number; - mobile: number; - }; - theme: string; - timestamp: number; - }; - IDCContainerID: string; - adminUrl: string; - blogID: string; - fileSystemWriteAccess: 'yes' | 'no'; - isStatsModuleActive: string; - isUserFromKnownHost: string; - jetpackManage: { - isAgencyAccount: boolean; - isEnabled: boolean; - }; - loadAddLicenseScreen: string; - myJetpackCheckoutUri: string; - myJetpackFlags: { - showFullJetpackStatsCard: boolean; - videoPressStats: boolean; - }; - lifecycleStats: { - isSiteConnected: boolean; - isUserConnected: boolean; - jetpackPlugins: Array< string >; - modules: Array< string >; - purchases: Array< string >; - }; - myJetpackUrl: string; - myJetpackVersion: string; - plugins: { - [ key: string ]: { - Name: string; - PluginURI: string; - Version: string; - Title: string; - Description: string; - Author: string; - AuthorName: string; - AuthorURI: string; - DomainPath: string; - textDomain: string; - RequiresPHP: string; - RequiresWP: string; - UpdateURI: string; - Network: boolean; - active: boolean; - }; - }; - products: { - items: { - [ key: string ]: { - class: string; - description: string; - disclaimers: Array< string[] >; - features: string[]; - has_paid_plan_for_product: boolean; - features_by_tier: Array< string >; - has_required_plan: boolean; - has_required_tier: Array< string >; - is_bundle: boolean; - is_plugin_active: boolean; - is_upgradable_by_bundle: string[]; - long_description: string; - manage_url: string; - name: string; - plugin_slug: string; - post_activation_url: string; - post_checkout_url?: string; - pricing_for_ui?: { - available: boolean; - wpcom_product_slug: string; - product_term: string; - currency_code: string; - full_price: number; - discount_price: number; - coupon_discount: number; - is_introductory_offer: boolean; - introductory_offer?: { - cost_per_interval: number; - interval_count: number; - interval_unit: string; - should_prorate_when_offer_ends: boolean; - transition_after_renewal_count: number; - usage_limit?: number; - }; - }; - purchase_url?: string; - requires_user_connection: boolean; - slug: string; - standalone_plugin_info: { - has_standalone_plugin: boolean; - is_standalone_installed: boolean; - is_standalone_active: boolean; - }; - status: string; - supported_products: string[]; - tiers: string[]; - title: string; - wpcom_product_slug: string; - }; - }; - }; - purchases: { - items: Array< { - ID: string; - user_id: string; - blog_id: string; - product_id: string; - subscribed_date: string; - renew: string; - auto_renew: string; - renew_date: string; - inactive_date: string | null; - active: string; - meta: string | object; - ownership_id: string; - most_recent_renew_date: string; - amount: number; - expiry_date: string; - expiry_message: string; - expiry_sub_message: string; - expiry_status: string; - partner_name: string | null; - partner_slug: string | null; - partner_key_id: string | null; - subscription_status: string; - product_name: string; - product_slug: string; - product_type: string; - blog_created_date: string; - blogname: string; - domain: string; - description: string; - attached_to_purchase_id: string | null; - included_domain: string; - included_domain_purchase_amount: number; - currency_code: string; - currency_symbol: string; - renewal_price_tier_slug: string | null; - renewal_price_tier_usage_quantity: number | null; - current_price_tier_slug: string | null; - current_price_tier_usage_quantity: number | null; - price_tier_list: Array< object >; - price_text: string; - bill_period_label: string; - bill_period_days: number; - regular_price_text: string; - regular_price_integer: number; - product_display_price: string; - price_integer: number; - is_cancelable: boolean; - can_explicit_renew: boolean; - can_disable_auto_renew: boolean; - can_reenable_auto_renewal: boolean; - iap_purchase_management_link: string | null; - is_iap_purchase: boolean; - is_locked: boolean; - is_refundable: boolean; - refund_period_in_days: number; - is_renewable: boolean; - is_renewal: boolean; - has_private_registration: boolean; - refund_amount: number; - refund_integer: number; - refund_currency_symbol: string; - refund_text: string; - refund_options: object | null; - total_refund_amount: number; - total_refund_integer: number; - total_refund_currency: string; - total_refund_text: string; - check_dns: boolean; - } >; - }; - topJetpackMenuItemUrl: string; - userIsAdmin: string; - userIsNewToJetpack: string; - welcomeBanner: { - hasBeenDismissed: boolean; - }; - }; - JP_CONNECTION_INITIAL_STATE: { - apiRoot: string; - apiNonce: string; - registrationNonce: string; - connectionStatus: { - isActive: boolean; - isStaging: boolean; - isRegistered: boolean; - isUserConnected: boolean; - hasConnectedOwner: boolean; - offlineMode: { - isActive: boolean; - constant: boolean; - url: boolean; - filter: boolean; - wpLocalConstant: boolean; - }; - isPublic: boolean; - }; - userConnectionData: { - currentUser: { - isConnected: boolean; - isMaster: boolean; - username: string; - id: number; - blogId: number; - wpcomUser: { - avatar: boolean; - }; - gravatar: string; - permissions: { - admin_page?: boolean; - connect: boolean; - connect_user: boolean; - disconnect: boolean; - edit_posts?: boolean; - manage_modules?: boolean; - manage_options?: boolean; - manage_plugins?: boolean; - network_admin?: boolean; - network_sites_page?: boolean; - publish_posts?: boolean; - view_stats?: boolean; - }; - }; - connectionOwner: null; - }; - connectedPlugins: object; - wpVersion: string; - siteSuffix: string; - connectionErrors: Array< string | object >; - }; - myJetpackRest?: { - apiRoot: string; - apiNonce: string; - }; -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-activitylog.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-activitylog.php deleted file mode 100644 index 0e59226d..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-activitylog.php +++ /dev/null @@ -1,57 +0,0 @@ -is_user_connected() ) { - return; - } - - // Do not display the menu on Multisite. - if ( is_multisite() ) { - return; - } - - $args = array(); - - $blog_id = Connection_Manager::get_site_id( true ); - if ( $blog_id ) { - $args = array( 'site' => $blog_id ); - } - - return Admin_Menu::add_menu( - __( 'Activity Log', 'jetpack-my-jetpack' ), - _x( 'Activity Log', 'product name shown in menu', 'jetpack-my-jetpack' ) . ' ', - 'manage_options', - esc_url( Redirect::get_url( 'cloud-activity-log-wp-menu', $args ) ), - null, - 1 - ); - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-initializer.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-initializer.php deleted file mode 100644 index 3efbd401..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-initializer.php +++ /dev/null @@ -1,669 +0,0 @@ -initialize(); - } - - // Initialize Boost Speed Score - $boost_modules = Jetpack_Boost_Modules::init(); - new Speed_Score( $boost_modules, 'jetpack-my-jetpack' ); - - // Add custom WP REST API endoints. - add_action( 'rest_api_init', array( __CLASS__, 'register_rest_endpoints' ) ); - - $page_suffix = Admin_Menu::add_menu( - __( 'My Jetpack', 'jetpack-my-jetpack' ), - __( 'My Jetpack', 'jetpack-my-jetpack' ), - 'edit_posts', - 'my-jetpack', - array( __CLASS__, 'admin_page' ), - -1 - ); - - add_action( 'load-' . $page_suffix, array( __CLASS__, 'admin_init' ) ); - // This is later than the admin-ui package, which runs on 1000 - add_action( 'admin_init', array( __CLASS__, 'maybe_show_red_bubble' ), 1001 ); - - // Sets up JITMS. - JITM::configure(); - - // Add "Activity Log" menu item. - Activitylog::init(); - - // Add "Jetpack Manage" menu item. - Jetpack_Manage::init(); - - /** - * Fires after the My Jetpack package is initialized - * - * @since 0.1.0 - */ - do_action( 'my_jetpack_init' ); - } - - /** - * Acts as a feature flag, returning a boolean for whether we should show the licensing UI. - * - * @since 1.2.0 - * - * @return boolean - */ - public static function is_licensing_ui_enabled() { - // Default changed to true in 1.5.0. - $is_enabled = true; - - /* - * Bail if My Jetpack is not enabled, - * and thus the licensing UI shouldn't be enabled either. - */ - if ( ! self::should_initialize() ) { - $is_enabled = false; - } - - /** - * Acts as a feature flag, returning a boolean for whether we should show the licensing UI. - * - * @param bool $is_enabled Defaults to true. - * - * @since 1.2.0 - * @since 1.5.0 Update default value to true. - */ - return apply_filters( - 'jetpack_my_jetpack_should_enable_add_license_screen', - $is_enabled - ); - } - - /** - * Callback for the load my jetpack page hook. - * - * @return void - */ - public static function admin_init() { - self::$site_info = self::get_site_info(); - add_filter( 'identity_crisis_container_id', array( static::class, 'get_idc_container_id' ) ); - add_action( 'admin_enqueue_scripts', array( __CLASS__, 'enqueue_scripts' ) ); - // Product statuses are constantly changing, so we never want to cache the page. - header( 'Cache-Control: no-cache, no-store, must-revalidate' ); - header( 'Pragma: no-cache' ); - header( 'Expires: 0' ); - } - - /** - * Returns whether we are in condition to track to use - * Analytics functionality like Tracks, MC, or GA. - */ - public static function can_use_analytics() { - $status = new Status(); - $connection = new Connection_Manager(); - $tracking = new Tracking( 'jetpack', $connection ); - - return $tracking->should_enable_tracking( new Terms_Of_Service(), $status ); - } - /** - * Enqueue admin page assets. - * - * @return void - */ - public static function enqueue_scripts() { - Assets::register_script( - 'my_jetpack_main_app', - '../build/index.js', - __FILE__, - array( - 'enqueue' => true, - 'in_footer' => true, - 'textdomain' => 'jetpack-my-jetpack', - ) - ); - $modules = new Modules(); - $connection = new Connection_Manager(); - $speed_score_history = new Speed_Score_History( wp_parse_url( get_site_url(), PHP_URL_HOST ) ); - wp_localize_script( - 'my_jetpack_main_app', - 'myJetpackInitialState', - array( - 'products' => array( - 'items' => Products::get_products(), - ), - 'purchases' => array( - 'items' => array(), - ), - 'plugins' => Plugins_Installer::get_plugins(), - 'myJetpackUrl' => admin_url( 'admin.php?page=my-jetpack' ), - 'myJetpackCheckoutUri' => admin_url( 'admin.php?page=my-jetpack' ), - 'topJetpackMenuItemUrl' => Admin_Menu::get_top_level_menu_item_url(), - 'siteSuffix' => ( new Status() )->get_site_suffix(), - 'blogID' => Connection_Manager::get_site_id( true ), - 'myJetpackVersion' => self::PACKAGE_VERSION, - 'myJetpackFlags' => self::get_my_jetpack_flags(), - 'fileSystemWriteAccess' => self::has_file_system_write_access(), - 'loadAddLicenseScreen' => self::is_licensing_ui_enabled(), - 'adminUrl' => esc_url( admin_url() ), - 'IDCContainerID' => static::get_idc_container_id(), - 'userIsAdmin' => current_user_can( 'manage_options' ), - 'userIsNewToJetpack' => self::is_jetpack_user_new(), - 'lifecycleStats' => array( - 'jetpackPlugins' => self::get_installed_jetpack_plugins(), - 'isSiteConnected' => $connection->is_connected(), - 'isUserConnected' => $connection->is_user_connected(), - 'purchases' => self::get_purchases(), - 'modules' => self::get_active_modules(), - ), - 'redBubbleAlerts' => self::get_red_bubble_alerts(), - 'isStatsModuleActive' => $modules->is_active( 'stats' ), - 'isUserFromKnownHost' => self::is_user_from_known_host(), - 'isCommercial' => self::is_commercial_site(), - 'isAtomic' => ( new Status_Host() )->is_woa_site(), - 'welcomeBanner' => array( - 'hasBeenDismissed' => \Jetpack_Options::get_option( 'dismissed_welcome_banner', false ), - ), - 'jetpackManage' => array( - 'isEnabled' => Jetpack_Manage::could_use_jp_manage(), - 'isAgencyAccount' => Jetpack_Manage::is_agency_account(), - ), - 'latestBoostSpeedScores' => $speed_score_history->latest(), - ) - ); - - wp_localize_script( - 'my_jetpack_main_app', - 'myJetpackRest', - array( - 'apiRoot' => esc_url_raw( rest_url() ), - 'apiNonce' => wp_create_nonce( 'wp_rest' ), - ) - ); - - // Connection Initial State. - Connection_Initial_State::render_script( 'my_jetpack_main_app' ); - - // Required for Analytics. - if ( self::can_use_analytics() ) { - Tracking::register_tracks_functions_scripts( true ); - } - } - - /** - * Get product slugs of the active purchases - * - * @return array - */ - public static function get_purchases() { - $purchases = Wpcom_Products::get_site_current_purchases(); - if ( is_wp_error( $purchases ) ) { - return array(); - } - - return array_map( - function ( $purchase ) { - return $purchase->product_slug; - }, - $purchases - ); - } - - /** - * Get installed Jetpack plugins - * - * @return array - */ - public static function get_installed_jetpack_plugins() { - $plugin_slugs = array_keys( Plugins_Installer::get_plugins() ); - $plugin_slugs = array_map( - static function ( $slug ) { - $parts = explode( '/', $slug ); - if ( empty( $parts ) ) { - return ''; - } - // Return the last segment of the filepath without the PHP extension - return str_replace( '.php', '', $parts[ count( $parts ) - 1 ] ); - }, - $plugin_slugs - ); - - return array_values( array_intersect( self::JETPACK_PLUGIN_SLUGS, $plugin_slugs ) ); - } - - /** - * Get active modules (except ones enabled by default) - * - * @return array - */ - public static function get_active_modules() { - $modules = new Modules(); - $active_modules = $modules->get_active(); - - // if the Jetpack plugin is active, filter out the modules that are active by default - if ( class_exists( 'Jetpack' ) && ! empty( $active_modules ) ) { - $active_modules = array_diff( $active_modules, Jetpack::get_default_modules() ); - } - return $active_modules; - } - - /** - * Determine if the current user is "new" to Jetpack - * This is used to vary some messaging in My Jetpack - * - * On the front-end, purchases are also taken into account - * - * @return bool - */ - public static function is_jetpack_user_new() { - // is the user connected? - $connection = new Connection_Manager(); - if ( $connection->is_user_connected() ) { - return false; - } - - // TODO: add a data point for the last known connection/ disconnection time - - // are any modules active? - $modules = new Modules(); - $active_modules = $modules->get_active(); - // if the Jetpack plugin is active, filter out the modules that are active by default - if ( class_exists( 'Jetpack' ) && ! empty( $active_modules ) ) { - $active_modules = array_diff( $active_modules, Jetpack::get_default_modules() ); - } - if ( ! empty( $active_modules ) ) { - return false; - } - - // check for other Jetpack plugins that are installed on the site (active or not) - // If there's more than one Jetpack plugin active, this user is not "new" - $plugin_slugs = array_keys( Plugins_Installer::get_plugins() ); - $plugin_slugs = array_map( - static function ( $slug ) { - $parts = explode( '/', $slug ); - if ( empty( $parts ) ) { - return ''; - } - // Return the last segment of the filepath without the PHP extension - return str_replace( '.php', '', $parts[ count( $parts ) - 1 ] ); - }, - $plugin_slugs - ); - $installed_jetpack_plugins = array_intersect( self::JETPACK_PLUGIN_SLUGS, $plugin_slugs ); - if ( is_countable( $installed_jetpack_plugins ) && count( $installed_jetpack_plugins ) >= 2 ) { - return false; - } - - // Does the site have any purchases? - $purchases = Wpcom_Products::get_site_current_purchases(); - if ( ! empty( $purchases ) && ! is_wp_error( $purchases ) ) { - return false; - } - - return true; - } - - /** - * Determines whether the user has come from a host we can recognize. - * - * @return string - */ - public static function is_user_from_known_host() { - // Known (external) host is the one that has been determined and is not dotcom. - return ! in_array( ( new Status_Host() )->get_known_host_guess(), array( 'unknown', 'wpcom' ), true ); - } - - /** - * Build flags for My Jetpack UI - * - * @return array - */ - public static function get_my_jetpack_flags() { - $flags = array( - 'videoPressStats' => Jetpack_Constants::is_true( 'JETPACK_MY_JETPACK_VIDEOPRESS_STATS_ENABLED' ), - 'showFullJetpackStatsCard' => class_exists( 'Jetpack' ), - ); - - return $flags; - } - - /** - * Echoes the admin page content. - * - * @return void - */ - public static function admin_page() { - echo '
          '; - } - - /** - * Register the REST API routes. - * - * @return void - */ - public static function register_rest_endpoints() { - new REST_Products(); - new REST_Purchases(); - new REST_Zendesk_Chat(); - new REST_Product_Data(); - new REST_AI(); - - register_rest_route( - 'my-jetpack/v1', - 'site', - array( - 'methods' => \WP_REST_Server::READABLE, - 'callback' => __CLASS__ . '::get_site', - 'permission_callback' => __CLASS__ . '::permissions_callback', - ) - ); - - register_rest_route( - 'my-jetpack/v1', - 'site/dismiss-welcome-banner', - array( - 'methods' => \WP_REST_Server::EDITABLE, - 'callback' => __CLASS__ . '::dismiss_welcome_banner', - 'permission_callback' => __CLASS__ . '::permissions_callback', - ) - ); - } - - /** - * Check user capability to access the endpoint. - * - * @access public - * @static - * - * @return true|WP_Error - */ - public static function permissions_callback() { - return current_user_can( 'manage_options' ); - } - - /** - * Return true if we should initialize the My Jetpack admin page. - */ - public static function should_initialize() { - $should = true; - - if ( is_multisite() ) { - $should = false; - } - - // All options presented in My Jetpack require a connection to WordPress.com. - if ( ( new Status() )->is_offline_mode() ) { - $should = false; - } - - /** - * Allows filtering whether My Jetpack should be initialized. - * - * @since 0.5.0-alpha - * - * @param bool $shoud_initialize Should we initialize My Jetpack? - */ - return apply_filters( 'jetpack_my_jetpack_should_initialize', $should ); - } - - /** - * Site full-data endpoint. - * - * @return object Site data. - */ - public static function get_site() { - $site_id = \Jetpack_Options::get_option( 'id' ); - $wpcom_endpoint = sprintf( '/sites/%d?force=wpcom', $site_id ); - $wpcom_api_version = '1.1'; - $response = Client::wpcom_json_api_request_as_blog( $wpcom_endpoint, $wpcom_api_version ); - $response_code = wp_remote_retrieve_response_code( $response ); - $body = json_decode( wp_remote_retrieve_body( $response ) ); - - if ( is_wp_error( $response ) || empty( $response['body'] ) ) { - return new \WP_Error( 'site_data_fetch_failed', 'Site data fetch failed', array( 'status' => $response_code ) ); - } - - return rest_ensure_response( $body, 200 ); - } - - /** - * Populates the self::$site_info var with site data from the /sites/%d endpoint - * - * @return Object|WP_Error - */ - public static function get_site_info() { - static $site_info = null; - - if ( $site_info !== null ) { - return $site_info; - } - - // Check for a cached value before doing lookup - $stored_site_info = get_transient( self::MY_JETPACK_SITE_INFO_TRANSIENT_KEY ); - if ( $stored_site_info !== false ) { - return $stored_site_info; - } - - $response = self::get_site(); - if ( is_wp_error( $response ) ) { - return $response; - } - $site_info = $response->data; - set_transient( self::MY_JETPACK_SITE_INFO_TRANSIENT_KEY, $site_info, DAY_IN_SECONDS ); - - return $site_info; - } - - /** - * Returns whether a site has been determined "commercial" or not. - * - * @return bool - */ - public static function is_commercial_site() { - if ( is_wp_error( self::$site_info ) ) { - return null; - } - - return empty( self::$site_info->options->is_commercial ) ? false : self::$site_info->options->is_commercial; - } - - /** - * Check if site is registered (has been connected before). - * - * @return bool - */ - public static function is_registered() { - return (bool) \Jetpack_Options::get_option( 'id' ); - } - - /** - * Dismiss the welcome banner. - * - * @return \WP_REST_Response - */ - public static function dismiss_welcome_banner() { - \Jetpack_Options::update_option( 'dismissed_welcome_banner', true ); - return rest_ensure_response( array( 'success' => true ), 200 ); - } - - /** - * Returns true if the site has file write access to the plugins folder, false otherwise. - * - * @return bool - **/ - public static function has_file_system_write_access() { - - $cache = get_transient( 'my_jetpack_write_access' ); - - if ( false !== $cache ) { - return $cache; - } - - if ( ! function_exists( 'get_filesystem_method' ) ) { - require_once ABSPATH . 'wp-admin/includes/file.php'; - } - - require_once ABSPATH . 'wp-admin/includes/template.php'; - - $write_access = 'no'; - - $filesystem_method = get_filesystem_method( array(), WP_PLUGIN_DIR ); - if ( 'direct' === $filesystem_method ) { - $write_access = 'yes'; - } - - if ( ! $write_access ) { - ob_start(); - $filesystem_credentials_are_stored = request_filesystem_credentials( self_admin_url() ); - ob_end_clean(); - - if ( $filesystem_credentials_are_stored ) { - $write_access = 'yes'; - } - } - - set_transient( 'my_jetpack_write_access', $write_access, 30 * MINUTE_IN_SECONDS ); - - return $write_access; - } - - /** - * Get container IDC for the IDC screen. - * - * @return string - */ - public static function get_idc_container_id() { - return static::IDC_CONTAINER_ID; - } - - /** - * Conditionally append the red bubble notification to the "Jetpack" menu item if there are alerts to show - * - * @return void - */ - public static function maybe_show_red_bubble() { - global $menu; - // filters for the items in this file - add_filter( 'my_jetpack_red_bubble_notification_slugs', array( __CLASS__, 'alert_if_missing_site_connection' ) ); - $red_bubble_alerts = self::get_red_bubble_alerts(); - - // The Jetpack menu item should be on index 3 - if ( - ! empty( $red_bubble_alerts ) && - is_countable( $red_bubble_alerts ) && - isset( $menu[3] ) && - $menu[3][0] === 'Jetpack' - ) { - // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited - $menu[3][0] .= sprintf( ' %d', count( $red_bubble_alerts ) ); - } - } - - /** - * Collect all possible alerts that we might use a red bubble notification for - * - * @return array - */ - public static function get_red_bubble_alerts() { - static $red_bubble_alerts = array(); - - // using a static cache since we call this function more than once in the class - if ( ! empty( $red_bubble_alerts ) ) { - return $red_bubble_alerts; - } - // go find the alerts - $red_bubble_alerts = apply_filters( 'my_jetpack_red_bubble_notification_slugs', $red_bubble_alerts ); - - return $red_bubble_alerts; - } - - /** - * Add an alert slug if the site is missing a site connection - * - * @param array $red_bubble_slugs - slugs that describe the reasons the red bubble is showing. - * @return array - */ - public static function alert_if_missing_site_connection( array $red_bubble_slugs ) { - if ( ! ( new Connection_Manager() )->is_connected() ) { - $red_bubble_slugs[] = self::MISSING_SITE_CONNECTION_NOTIFICATION_KEY; - } - - return $red_bubble_slugs; - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-jetpack-manage.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-jetpack-manage.php deleted file mode 100644 index be328394..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-jetpack-manage.php +++ /dev/null @@ -1,124 +0,0 @@ - $blog_id ); - } - - return Admin_Menu::add_menu( - __( 'Jetpack Manage', 'jetpack-my-jetpack' ), - _x( 'Jetpack Manage', 'product name shown in menu', 'jetpack-my-jetpack' ) . ' ', - 'manage_options', - esc_url( Redirect::get_url( 'cloud-manage-dashboard-wp-menu', $args ) ), - null, - 100 - ); - } - - /** - * Check if the user has enough sites to be able to use Jetpack Manage. - * - * @param int $min_sites Minimum number of sites to be able to use Jetpack Manage. - * - * @return bool Return true if the user has enough sites to be able to use Jetpack Manage. - */ - public static function could_use_jp_manage( $min_sites = 2 ) { - // Only proceed if the user is connected to WordPress.com. - if ( ! ( new Connection_Manager() )->is_user_connected() ) { - return false; - } - - // Do not display the menu if Jetpack plugin is not installed. - if ( ! class_exists( 'Jetpack' ) ) { - return false; - } - - // Do not display the menu on Multisite. - if ( is_multisite() ) { - return false; - } - - // Check if the user has the minimum number of sites. - $user_data = ( new Connection_Manager() )->get_connected_user_data( get_current_user_id() ); - if ( ! isset( $user_data['site_count'] ) || $user_data['site_count'] < $min_sites ) { - return false; - } - - return true; - } - - /** - * Check if the user is a partner/agency. - * - * @return bool Return true if the user is a partner/agency, otherwise false. - */ - public static function is_agency_account() { - // Only proceed if the user is connected to WordPress.com. - if ( ! ( new Connection_Manager() )->is_user_connected() ) { - return false; - } - - // Get the cached partner data. - $partner = get_transient( 'jetpack_partner_data' ); - - if ( $partner === false ) { - $wpcom_response = Client::wpcom_json_api_request_as_user( '/jetpack-partners' ); - - if ( 200 !== wp_remote_retrieve_response_code( $wpcom_response ) || is_wp_error( $wpcom_response ) ) { - return false; - } - - $partner_data = json_decode( wp_remote_retrieve_body( $wpcom_response ) ); - - // The jetpack-partners endpoint will return only one partner data into an array, it uses Jetpack_Partner::find_by_owner. - if ( ! is_array( $partner_data ) || count( $partner_data ) !== 1 || ! is_object( $partner_data[0] ) ) { - return false; - } - - $partner = $partner_data[0]; - - // Cache the partner data for 1 hour. - set_transient( 'jetpack_partner_data', $partner, HOUR_IN_SECONDS ); - } - - return $partner->partner_type === 'agency'; - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-products.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-products.php deleted file mode 100644 index 4a049baf..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-products.php +++ /dev/null @@ -1,193 +0,0 @@ - Products\Anti_Spam::class, - 'backup' => Products\Backup::class, - 'boost' => Products\Boost::class, - 'crm' => Products\Crm::class, - 'creator' => Products\Creator::class, - 'extras' => Products\Extras::class, - 'jetpack-ai' => Products\Jetpack_Ai::class, - 'scan' => Products\Scan::class, - 'search' => Products\Search::class, - 'social' => Products\Social::class, - 'security' => Products\Security::class, - 'protect' => Products\Protect::class, - 'videopress' => Products\Videopress::class, - 'stats' => Products\Stats::class, - ); - - /** - * This filter allows plugin to override the Product class of a given product. The new class must be a child class of the default one declared in My Jetpack - * - * For example, a stand-alone plugin could overwrite its product class to control specific behavior of the product in the My Jetpack page after it is active without having to commit changes to the My Jetpack package: - * - * add_filter( 'my_jetpack_products_classes', function( $classes ) { - * $classes['my_plugin'] = 'My_Plugin'; // a class that extends the original one declared in the My Jetpack package. - * return $classes - * } ); - * - * @param array $classes An array where the keys are the product slugs and the values are the class names. - */ - $final_classes = apply_filters( 'my_jetpack_products_classes', $classes ); - - // Check that the classes are still child of the same original classes. - foreach ( (array) $final_classes as $slug => $final_class ) { - if ( $final_class === $classes[ $slug ] ) { - continue; - } - if ( ! class_exists( $final_class ) || ! is_subclass_of( $final_class, $classes[ $slug ] ) ) { - throw new \Exception( 'You can only overwrite a Product class with a child of the original class.' ); - } - } - - return $final_classes; - } - - /** - * Product data - * - * @return array Jetpack products on the site and their availability. - */ - public static function get_products() { - $products = array(); - foreach ( self::get_products_classes() as $class ) { - $product_slug = $class::$slug; - $products[ $product_slug ] = $class::get_info(); - } - return $products; - } - - /** - * Get one product data by its slug - * - * @param string $product_slug The product slug. - * - * @return ?array - */ - public static function get_product( $product_slug ) { - $classes = self::get_products_classes(); - if ( isset( $classes[ $product_slug ] ) ) { - return $classes[ $product_slug ]::get_info(); - } - } - - /** - * Get one product Class name - * - * @param string $product_slug The product slug. - * - * @return ?string - */ - public static function get_product_class( $product_slug ) { - $classes = self::get_products_classes(); - if ( isset( $classes[ $product_slug ] ) ) { - return $classes[ $product_slug ]; - } - } - - /** - * Return product slugs list. - * - * @return array Product slugs array. - */ - public static function get_products_slugs() { - return array_keys( self::get_products_classes() ); - } - - /** - * Gets the json schema for the product data - * - * @return array - */ - public static function get_product_data_schema() { - return array( - 'title' => 'The requested product data', - 'type' => 'object', - 'properties' => array( - 'product' => array( - 'description' => __( 'Product slug', 'jetpack-my-jetpack' ), - 'type' => 'string', - 'enum' => __CLASS__ . '::get_product_slugs', - 'required' => false, - 'validate_callback' => __CLASS__ . '::check_product_argument', - ), - 'action' => array( - 'description' => __( 'Production action to execute', 'jetpack-my-jetpack' ), - 'type' => 'string', - 'enum' => array( 'activate', 'deactivate' ), - 'required' => false, - 'validate_callback' => __CLASS__ . '::check_product_argument', - ), - 'slug' => array( - 'title' => 'The product slug', - 'type' => 'string', - ), - 'name' => array( - 'title' => 'The product name', - 'type' => 'string', - ), - 'description' => array( - 'title' => 'The product description', - 'type' => 'string', - ), - 'status' => array( - 'title' => 'The product status', - 'type' => 'string', - 'enum' => array( 'active', 'inactive', 'plugin_absent', 'needs_purchase', 'needs_purchase_or_free', 'error' ), - ), - 'class' => array( - 'title' => 'The product class handler', - 'type' => 'string', - ), - ), - ); - } - - /** - * Extend actions links for plugins - * tied to the Products. - */ - public static function extend_plugins_action_links() { - $products = array( - 'backup', - 'boost', - 'crm', - 'videopress', - 'social', - 'protect', - 'crm', - 'search', - ); - - // Add plugin action links for the core Jetpack plugin. - Product::extend_core_plugin_action_links(); - - // Add plugin action links to standalone products. - foreach ( $products as $product ) { - $class_name = self::get_product_class( $product ); - $class_name::extend_plugin_action_links(); - } - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-rest-ai.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-rest-ai.php deleted file mode 100644 index 39698107..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-rest-ai.php +++ /dev/null @@ -1,90 +0,0 @@ - \WP_REST_Server::EDITABLE, - 'callback' => __CLASS__ . '::get_openai_jwt', - 'permission_callback' => function () { - return ( new Connection_Manager( 'jetpack' ) )->is_user_connected() && current_user_can( 'edit_posts' ); - }, - ) - ); - } - } - - /** - * Check if a specific REST endpoint is registered. - * - * @param string $namespace - The namespace of the endpoint. - * @param string $route - The route of the endpoint. - * @return bool True if the endpoint is registered, false otherwise. - */ - public static function is_rest_endpoint_registered( $namespace, $route ) { - $server = rest_get_server(); - $routes = $server->get_routes(); - $full_endpoint = '/' . trim( $namespace, '/' ) . $route; - return isset( $routes[ $full_endpoint ] ); - } - - /** - * Ask WPCOM for a JWT token to use for OpenAI completion. - */ - public static function get_openai_jwt() { - $blog_id = Jetpack_Options::get_option( 'id' ); - - $response = Client::wpcom_json_api_request_as_user( - "/sites/$blog_id/jetpack-openai-query/jwt", - '2', - array( - 'method' => 'POST', - 'headers' => array( 'Content-Type' => 'application/json; charset=utf-8' ), - ), - wp_json_encode( array() ), - 'wpcom' - ); - - if ( is_wp_error( $response ) ) { - return $response; - } - - $json = json_decode( wp_remote_retrieve_body( $response ) ); - - if ( ! isset( $json->token ) ) { - return new WP_Error( 'no-token', 'No token returned from WPCOM' ); - } - - return array( - 'token' => $json->token, - 'blog_id' => $blog_id, - ); - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-rest-product-data.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-rest-product-data.php deleted file mode 100644 index d49585ca..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-rest-product-data.php +++ /dev/null @@ -1,147 +0,0 @@ - \WP_REST_Server::READABLE, - 'callback' => __CLASS__ . '::get_site_backup_undo_event', - 'permission_callback' => __CLASS__ . '::permissions_callback', - ) - ); - - register_rest_route( - 'my-jetpack/v1', - '/site/backup/count-items', - array( - 'methods' => \WP_REST_Server::READABLE, - 'callback' => __CLASS__ . '::count_things_that_can_be_backed_up', - 'permission_callback' => __CLASS__ . '::permissions_callback', - ) - ); - } - - /** - * Checks if the user has the correct permissions - */ - public static function permissions_callback() { - return current_user_can( 'manage_options' ); - } - - /** - * This will fetch the last rewindable event from the Activity Log and - * the last rewind_id prior to that. - * - * @return array|WP_Error|null - */ - public static function get_site_backup_undo_event() { - $blog_id = \Jetpack_Options::get_option( 'id' ); - - $response = Client::wpcom_json_api_request_as_user( - '/sites/' . $blog_id . '/activity/rewindable?force=wpcom', - 'v2', - array(), - null, - 'wpcom' - ); - - if ( 200 !== wp_remote_retrieve_response_code( $response ) ) { - return null; - } - - $body = json_decode( $response['body'], true ); - - if ( ! isset( $body['current'] ) ) { - return null; - } - - // Preparing the response structure - $undo_event = array( - 'last_rewindable_event' => null, - 'undo_backup_id' => null, - ); - - // List of events that will not be considered to be undo. - // Basically we should not `undo` a full backup event, but we could - // use them to undo any other action like plugin updates. - $last_event_exceptions = array( - 'rewind__backup_only_complete_full', - 'rewind__backup_only_complete_initial', - 'rewind__backup_only_complete', - 'rewind__backup_complete_full', - 'rewind__backup_complete_initial', - 'rewind__backup_complete', - ); - - // Looping through the events to find the last rewindable event and the last backup_id. - // The idea is to find the last rewindable event and then the last rewind_id before that. - $found_last_event = false; - foreach ( $body['current']['orderedItems'] as $event ) { - if ( $event['is_rewindable'] ) { - if ( ! $found_last_event && ! in_array( $event['name'], $last_event_exceptions, true ) ) { - $undo_event['last_rewindable_event'] = $event; - $found_last_event = true; - } elseif ( $found_last_event ) { - $undo_event['undo_backup_id'] = $event['rewind_id']; - break; - } - } - } - - return rest_ensure_response( $undo_event, 200 ); - } - - /** - * This will collect a count of all the items that could be backed up - * This is used to show what backup could be doing if it is not enabled - * - * @return array - */ - public static function count_things_that_can_be_backed_up() { - $image_mime_type = 'image'; - $video_mime_type = 'video'; - $audio_mime_type = 'audio'; - - $data = array(); - - // Add all post types together to get the total post count - $data['total_post_count'] = array_sum( (array) wp_count_posts( 'post' ) ); - - // Add all page types together to get the total page count - $data['total_page_count'] = array_sum( (array) wp_count_posts( 'page' ) ); - - // Add all comments together to get the total comment count - $comments = (array) wp_count_comments(); - $data['total_comment_count'] = $comments ? $comments['total_comments'] : 0; - - // Add all image attachments together to get the total image count - $data['total_image_count'] = array_sum( (array) wp_count_attachments( $image_mime_type ) ); - - // Add all video attachments together to get the total video count - $data['total_video_count'] = array_sum( (array) wp_count_attachments( $video_mime_type ) ); - - // Add all audio attachments together to get the total audio count - $data['total_audio_count'] = array_sum( (array) wp_count_attachments( $audio_mime_type ) ); - - return rest_ensure_response( $data, 200 ); - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-rest-products.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-rest-products.php deleted file mode 100644 index e4b6efd0..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-rest-products.php +++ /dev/null @@ -1,248 +0,0 @@ - \WP_REST_Server::READABLE, - 'callback' => __CLASS__ . '::get_products', - 'permission_callback' => __CLASS__ . '::permissions_callback', - ), - 'schema' => array( $this, 'get_products_schema' ), - ) - ); - - $product_arg = array( - 'description' => __( 'Product slug', 'jetpack-my-jetpack' ), - 'type' => 'string', - 'enum' => Products::get_products_slugs(), - 'required' => true, - 'validate_callback' => __CLASS__ . '::check_product_argument', - ); - - register_rest_route( - 'my-jetpack/v1', - 'site/products/(?P[a-z\-]+)', - array( - array( - 'methods' => \WP_REST_Server::READABLE, - 'callback' => __CLASS__ . '::get_product', - 'permission_callback' => __CLASS__ . '::permissions_callback', - 'args' => array( - 'product' => $product_arg, - ), - ), - array( - 'methods' => \WP_REST_Server::EDITABLE, - 'callback' => __CLASS__ . '::activate_product', - 'permission_callback' => __CLASS__ . '::edit_permissions_callback', - 'args' => array( - 'product' => $product_arg, - ), - ), - array( - 'methods' => \WP_REST_Server::DELETABLE, - 'callback' => __CLASS__ . '::deactivate_product', - 'permission_callback' => __CLASS__ . '::edit_permissions_callback', - 'args' => array( - 'product' => $product_arg, - ), - ), - ) - ); - - register_rest_route( - 'my-jetpack/v1', - 'site/products/(?P[a-z\-]+)/install-standalone', - array( - array( - 'methods' => \WP_REST_Server::EDITABLE, - 'callback' => __CLASS__ . '::install_standalone', - 'permission_callback' => __CLASS__ . '::edit_permissions_callback', - 'args' => array( - 'product' => $product_arg, - ), - ), - ) - ); - } - - /** - * Get the schema for the products endpoint - * - * @return array - */ - public function get_products_schema() { - return array( - '$schema' => 'http://json-schema.org/draft-04/schema#', - 'title' => 'products', - 'type' => 'object', - 'properties' => Products::get_product_data_schema(), - ); - } - - /** - * Check user capability to access the endpoint. - * - * @access public - * @static - * - * @return true|WP_Error - */ - public static function permissions_callback() { - return current_user_can( 'manage_options' ); - } - - /** - * Check Product arguments. - * - * @access public - * @static - * - * @param mixed $value - Value of the 'product' argument. - * @return true|WP_Error True if the value is valid, WP_Error otherwise. - */ - public static function check_product_argument( $value ) { - if ( ! is_string( $value ) ) { - return new WP_Error( - 'rest_invalid_param', - esc_html__( 'The product argument must be a string.', 'jetpack-my-jetpack' ), - array( 'status' => 400 ) - ); - } - - return true; - } - - /** - * Site products endpoint. - * - * @return array of site products list. - */ - public static function get_products() { - $response = Products::get_products(); - return rest_ensure_response( $response, 200 ); - } - - /** - * Site single product endpoint. - * - * @param \WP_REST_Request $request The request object. - * @return array of site products list. - */ - public static function get_product( $request ) { - $product_slug = $request->get_param( 'product' ); - return rest_ensure_response( Products::get_product( $product_slug ), 200 ); - } - - /** - * Check permission to edit product - * - * @return bool - */ - public static function edit_permissions_callback() { - if ( ! current_user_can( 'activate_plugins' ) ) { - return false; - } - if ( is_multisite() && ! current_user_can( 'manage_network' ) ) { - return false; - } - return true; - } - - /** - * Callback for activating a product - * - * @param \WP_REST_Request $request The request object. - * @return \WP_REST_Response - */ - public static function activate_product( $request ) { - $product_slug = $request->get_param( 'product' ); - $product = Products::get_product( $product_slug ); - if ( ! isset( $product['class'] ) ) { - return new \WP_Error( - 'not_implemented', - esc_html__( 'The product class handler is not implemented', 'jetpack-my-jetpack' ), - array( 'status' => 501 ) - ); - } - - $activate_product_result = call_user_func( array( $product['class'], 'activate' ) ); - if ( is_wp_error( $activate_product_result ) ) { - $activate_product_result->add_data( array( 'status' => 400 ) ); - return $activate_product_result; - } - - return rest_ensure_response( Products::get_product( $product_slug ), 200 ); - } - - /** - * Callback for deactivating a product - * - * @param \WP_REST_Request $request The request object. - * @return \WP_REST_Response - */ - public static function deactivate_product( $request ) { - $product_slug = $request->get_param( 'product' ); - $product = Products::get_product( $product_slug ); - if ( ! isset( $product['class'] ) ) { - return new \WP_Error( - 'not_implemented', - esc_html__( 'The product class handler is not implemented', 'jetpack-my-jetpack' ), - array( 'status' => 501 ) - ); - } - - $deactivate_product_result = call_user_func( array( $product['class'], 'deactivate' ) ); - if ( is_wp_error( $deactivate_product_result ) ) { - $deactivate_product_result->add_data( array( 'status' => 400 ) ); - return $deactivate_product_result; - } - - return rest_ensure_response( Products::get_product( $product_slug ), 200 ); - } - - /** - * Callback for installing the standalone plugin on a Hybrid Product. - * - * @param \WP_REST_Request $request The request object. - * @return \WP_REST_Response - */ - public static function install_standalone( $request ) { - $product_slug = $request->get_param( 'product' ); - $product = Products::get_product( $product_slug ); - if ( ! isset( $product['class'] ) ) { - return new \WP_Error( - 'not_implemented', - __( 'The product class handler is not implemented', 'jetpack-my-jetpack' ), - array( 'status' => 501 ) - ); - } - - $install_product_result = call_user_func( array( $product['class'], 'install_and_activate_standalone' ) ); - if ( is_wp_error( $install_product_result ) ) { - $install_product_result->add_data( array( 'status' => 400 ) ); - return $install_product_result; - } - - return rest_ensure_response( Products::get_product( $product_slug ), 200 ); - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-rest-purchases.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-rest-purchases.php deleted file mode 100644 index 6668a879..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-rest-purchases.php +++ /dev/null @@ -1,76 +0,0 @@ - \WP_REST_Server::READABLE, - 'callback' => __CLASS__ . '::get_site_current_purchases', - 'permission_callback' => __CLASS__ . '::permissions_callback', - ) - ); - } - - /** - * Check user capability to access the endpoint. - * - * @access public - * @static - * - * @return true|WP_Error - */ - public static function permissions_callback() { - $connection = new Connection_Manager(); - $is_site_connected = $connection->is_connected(); - - if ( ! $is_site_connected ) { - return new \WP_Error( - 'not_connected', - __( 'Your site is not connected to Jetpack.', 'jetpack-my-jetpack' ), - array( - 'status' => 400, - ) - ); - } - - return current_user_can( 'edit_posts' ); - } - - /** - * Site purchases endpoint. - * - * @return array of site purchases. - */ - public static function get_site_current_purchases() { - $site_id = \Jetpack_Options::get_option( 'id' ); - $wpcom_endpoint = sprintf( '/sites/%1$d/purchases?locale=%2$s', $site_id, get_user_locale() ); - $wpcom_api_version = '1.1'; - $response = Client::wpcom_json_api_request_as_blog( $wpcom_endpoint, $wpcom_api_version ); - $response_code = wp_remote_retrieve_response_code( $response ); - $body = json_decode( wp_remote_retrieve_body( $response ) ); - - if ( is_wp_error( $response ) || empty( $response['body'] ) || 200 !== $response_code ) { - return new \WP_Error( 'site_data_fetch_failed', 'Site data fetch failed', array( 'status' => $response_code ? $response_code : 400 ) ); - } - - return rest_ensure_response( $body, 200 ); - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-rest-zendesk-chat.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-rest-zendesk-chat.php deleted file mode 100644 index e64a7e55..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-rest-zendesk-chat.php +++ /dev/null @@ -1,120 +0,0 @@ - \WP_REST_Server::READABLE, - 'callback' => __CLASS__ . '::get_chat_availability', - 'permission_callback' => __CLASS__ . '::chat_authentication_permissions_callback', - ) - ); - - register_rest_route( - 'my-jetpack/v1', - 'chat/authentication', - array( - 'methods' => \WP_REST_Server::READABLE, - 'callback' => __CLASS__ . '::get_chat_authentication', - 'args' => array( - 'type' => array( - 'required' => false, - 'type' => 'string', - ), - 'test_mode' => array( - 'required' => false, - 'type' => 'boolean', - ), - ), - 'permission_callback' => __CLASS__ . '::chat_authentication_permissions_callback', - ) - ); - } - - /** - * Ensure user is logged in if making an authentication request - * - * @access public - * @static - * - * @return \WP_Error|true - */ - public static function chat_authentication_permissions_callback() { - if ( ! get_current_user_id() ) { - return new \WP_Error( 'unauthorized', 'You must be logged in to access this resource.', array( 'status' => 401 ) ); - } - - return true; - } - - /** - * Gets the chat authentication token. - * - * @return \WP_Error|object Object: { token: string } - */ - public static function get_chat_authentication() { - $authentication = get_transient( self::ZENDESK_AUTH_TOKEN ); - if ( $authentication ) { - return rest_ensure_response( $authentication, 200 ); - } - - $proxied = function_exists( 'wpcom_is_proxied_request' ) ? wpcom_is_proxied_request() : false; - $wpcom_endpoint = 'help/authenticate/chat'; - $wpcom_api_version = '2'; - - $body = array( - 'type' => 'zendesk', - 'test_mode' => $proxied ? true : false, - ); - - $response = Client::wpcom_json_api_request_as_user( $wpcom_endpoint, $wpcom_api_version, array( 'method' => 'POST' ), $body ); - $response_code = wp_remote_retrieve_response_code( $response ); - $body = json_decode( wp_remote_retrieve_body( $response ) ); - - if ( is_wp_error( $response ) || empty( $response['body'] ) ) { - return new \WP_Error( 'chat_authentication_failed', 'Chat authentication failed', array( 'status' => $response_code ) ); - } - - set_transient( self::ZENDESK_AUTH_TOKEN, $body, self::TRANSIENT_EXPIRY ); - return rest_ensure_response( $body, 200 ); - } - - /** - * Calls `wpcom/v2/presales/chat?group=jp_presales` endpoint. - * This endpoint returns whether or not the Jetpack presales chat group is available - * - * @return \WP_Error/object Object: { is_available: bool } - */ - public static function get_chat_availability() { - $wpcom_endpoint = '/presales/chat?group=jp_presales'; - $wpcom_api_version = '2'; - $response = Client::wpcom_json_api_request_as_user( $wpcom_endpoint, $wpcom_api_version ); - $response_code = wp_remote_retrieve_response_code( $response ); - $body = json_decode( wp_remote_retrieve_body( $response ) ); - - if ( is_wp_error( $response ) || empty( $response['body'] ) ) { - return new \WP_Error( 'chat_config_data_fetch_failed', 'Chat config data fetch failed', array( 'status' => $response_code ) ); - } - - return rest_ensure_response( $body, 200 ); - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-wpcom-products.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-wpcom-products.php deleted file mode 100644 index f7f1f4b0..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-wpcom-products.php +++ /dev/null @@ -1,273 +0,0 @@ -get_ip( true ); - $headers = array( - 'X-Forwarded-For' => $ip, - ); - - // If has a blog id, use connected endpoint. - - if ( $blog_id ) { - $endpoint = sprintf( '/sites/%d/products/?_locale=%s&type=jetpack', $blog_id, get_user_locale() ); - - $wpcom_request = Client::wpcom_json_api_request_as_blog( - $endpoint, - '1.1', - array( - 'method' => 'GET', - 'headers' => $headers, - ) - ); - } else { - $endpoint = 'https://public-api.wordpress.com/rest/v1.1/products?locale=' . get_user_locale() . '&type=jetpack'; - - $wpcom_request = wp_remote_get( - esc_url_raw( $endpoint ), - array( - 'headers' => $headers, - ) - ); - } - - $response_code = wp_remote_retrieve_response_code( $wpcom_request ); - - if ( 200 === $response_code ) { - return json_decode( wp_remote_retrieve_body( $wpcom_request ) ); - } else { - return new WP_Error( - 'failed_to_fetch_wpcom_products', - esc_html__( 'Unable to fetch the products list from WordPress.com', 'jetpack-my-jetpack' ), - array( 'status' => $response_code ) - ); - } - } - - /** - * Update the cache with new information retrieved from WPCOM - * - * We store one cache for each user, as the information is internationalized based on user preferences - * Also, the currency is based on the user IP address - * - * @param Object $products_list The products list as received from WPCOM. - * @return bool - */ - private static function update_cache( $products_list ) { - update_user_meta( get_current_user_id(), self::CACHE_DATE_META_NAME, time() ); - return update_user_meta( get_current_user_id(), self::CACHE_META_NAME, $products_list ); - } - - /** - * Checks if the cache is old, meaning we need to fetch new data from WPCOM - */ - private static function is_cache_old() { - if ( empty( self::get_products_from_cache() ) ) { - return true; - } - $cache_date = get_user_meta( get_current_user_id(), self::CACHE_DATE_META_NAME, true ); - return time() - (int) $cache_date > ( 7 * DAY_IN_SECONDS ); - } - - /** - * Gets the product list from the user cache - */ - private static function get_products_from_cache() { - return get_user_meta( get_current_user_id(), self::CACHE_META_NAME, true ); - } - - /** - * Gets the product list - * - * Attempts to retrieve the products list from the user cache if cache is not too old. - * If cache is old, it will attempt to fetch information from WPCOM. If it fails, we return what we have in cache, if anything, otherwise we return an error. - * - * @param bool $skip_cache If true it will ignore the cache and attempt to fetch fresh information from WPCOM. - * - * @return Object|WP_Error - */ - public static function get_products( $skip_cache = false ) { - // This is only available for logged in users. - if ( ! get_current_user_id() ) { - return null; - } - if ( ! self::is_cache_old() && ! $skip_cache ) { - return self::get_products_from_cache(); - } - - $products = self::get_products_from_wpcom(); - if ( is_wp_error( $products ) ) { - // Let's see if we have it cached. - $cached = self::get_products_from_cache(); - if ( ! empty( $cached ) ) { - return $cached; - } else { - return $products; - } - } - - self::update_cache( $products ); - return $products; - } - - /** - * Get one product - * - * @param string $product_slug The product slug. - * @param bool $renew_cache A flag to force the cache to be renewed. - * - * @return ?Object The product details if found - */ - public static function get_product( $product_slug, $renew_cache = false ) { - $products = self::get_products( $renew_cache ); - if ( ! empty( $products->$product_slug ) ) { - return $products->$product_slug; - } - } - - /** - * Get only the product currency code and price in an array - * - * @param string $product_slug The product slug. - * - * @return array An array with currency_code and full_price. Empty array if product not found. - */ - public static function get_product_pricing( $product_slug ) { - $product = self::get_product( $product_slug ); - if ( empty( $product ) ) { - return array(); - } - - $cost = $product->cost; - $discount_price = $cost; - $is_introductory_offer = false; - $introductory_offer = null; - - // Get/compute the discounted price. - if ( isset( $product->introductory_offer->cost_per_interval ) ) { - $discount_price = $product->introductory_offer->cost_per_interval; - $is_introductory_offer = true; - $introductory_offer = $product->introductory_offer; - } - - $pricing = array( - 'currency_code' => $product->currency_code, - 'full_price' => $cost, - 'discount_price' => $discount_price, - 'is_introductory_offer' => $is_introductory_offer, - 'introductory_offer' => $introductory_offer, - 'product_term' => $product->product_term, - ); - - return self::populate_with_discount( $product, $pricing, $discount_price ); - } - - /** - * Populate the pricing array with the discount information. - * - * @param {object} $product - The product object. - * @param {object} $pricing - The pricing array. - * @param {float} $price - The price to be discounted. - * @return {object} The pricing array with the discount information. - */ - public static function populate_with_discount( $product, $pricing, $price ) { - // Check whether the product has a coupon. - if ( ! isset( $product->sale_coupon ) ) { - return $pricing; - } - - // Check whether it is still valid. - $coupon = $product->sale_coupon; - $coupon_start_date = strtotime( $coupon->start_date ); - $coupon_expires = strtotime( $coupon->expires ); - if ( $coupon_start_date > time() || $coupon_expires < time() ) { - return $pricing; - } - - $coupon_discount = intval( $coupon->discount ); - - // Populate response with coupon discount. - $pricing['coupon_discount'] = $coupon_discount; - - // Apply coupon discount to the price. - $pricing['discount_price'] = $price * ( 100 - $coupon_discount ) / 100; - - return $pricing; - } - - /** - * Gets the site purchases from WPCOM. - * - * @return Object|WP_Error - */ - public static function get_site_current_purchases() { - static $purchases = null; - - if ( $purchases !== null ) { - return $purchases; - } - - // Check for a cached value before doing lookup - $stored_purchases = get_transient( self::MY_JETPACK_PURCHASES_TRANSIENT_KEY ); - if ( $stored_purchases !== false ) { - return $stored_purchases; - } - - $site_id = Jetpack_Options::get_option( 'id' ); - - $response = Client::wpcom_json_api_request_as_blog( - sprintf( '/sites/%d/purchases', $site_id ), - '1.1', - array( - 'method' => 'GET', - ) - ); - if ( 200 !== wp_remote_retrieve_response_code( $response ) ) { - return new WP_Error( 'purchases_state_fetch_failed' ); - } - - $body = wp_remote_retrieve_body( $response ); - $purchases = json_decode( $body ); - // Set short transient to help with repeated lookups on the same page load - set_transient( self::MY_JETPACK_PURCHASES_TRANSIENT_KEY, $purchases, 5 ); - - return $purchases; - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-anti-spam.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-anti-spam.php deleted file mode 100644 index 0ec88ff3..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-anti-spam.php +++ /dev/null @@ -1,169 +0,0 @@ -product_slug, 'jetpack_anti_spam' ) !== false || - str_starts_with( $purchase->product_slug, 'jetpack_complete' ) || - str_starts_with( $purchase->product_slug, 'jetpack_security' ) - ) { - return true; - } - } - } - - return $fallback; - } - - /** - * Get the product princing details - * - * @return array Pricing details - */ - public static function get_pricing_for_ui() { - return array_merge( - array( - 'available' => true, - 'wpcom_product_slug' => static::get_wpcom_product_slug(), - ), - Wpcom_Products::get_product_pricing( static::get_wpcom_product_slug() ) - ); - } - - /** - * Get the WPCOM product slug used to make the purchase - * - * @return ?string - */ - public static function get_wpcom_product_slug() { - return 'jetpack_anti_spam'; - } - - /** - * Return product bundles list - * that supports the product. - * - * @return boolean|array Products bundle list. - */ - public static function is_upgradable_by_bundle() { - return array( 'security' ); - } - - /** - * Get the URL where the user manages the product - * - * @return ?string - */ - public static function get_manage_url() { - return admin_url( 'admin.php?page=akismet-key-config' ); - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-backup.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-backup.php deleted file mode 100644 index 6eb82aad..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-backup.php +++ /dev/null @@ -1,236 +0,0 @@ - _x( '* Subject to your usage and storage limit.', 'Backup Product Disclaimer', 'jetpack-my-jetpack' ), - 'link_text' => _x( 'Learn more', 'Backup Product Disclaimer', 'jetpack-my-jetpack' ), - 'url' => Redirect::get_url( 'jetpack-faq-backup-disclaimer' ), - ), - ); - } - - /** - * Get the WPCOM product slug used to make the purchase - * - * @return ?string - */ - public static function get_wpcom_product_slug() { - return 'jetpack_backup_t1_yearly'; - } - - /** - * Get the URL where the user should be redirected after checkout - */ - public static function get_post_checkout_url() { - return self::get_manage_url(); - } - - /** - * Get the product princing details - * - * @return array Pricing details - */ - public static function get_pricing_for_ui() { - return array_merge( - array( - 'available' => true, - 'wpcom_product_slug' => static::get_wpcom_product_slug(), - ), - Wpcom_Products::get_product_pricing( static::get_wpcom_product_slug() ) - ); - } - - /** - * Hits the wpcom api to check rewind status. - * - * @todo Maybe add caching. - * - * @return Object|WP_Error - */ - private static function get_state_from_wpcom() { - static $status = null; - - if ( $status !== null ) { - return $status; - } - - $site_id = Jetpack_Options::get_option( 'id' ); - - $response = Client::wpcom_json_api_request_as_blog( sprintf( '/sites/%d/rewind', $site_id ) . '?force=wpcom', '2', array( 'timeout' => 2 ), null, 'wpcom' ); - - if ( 200 !== wp_remote_retrieve_response_code( $response ) ) { - return new WP_Error( 'rewind_state_fetch_failed' ); - } - - $body = wp_remote_retrieve_body( $response ); - $status = json_decode( $body ); - return $status; - } - - /** - * Checks whether the current plan (or purchases) of the site already supports the product - * - * @return boolean - */ - public static function has_required_plan() { - $rewind_data = static::get_state_from_wpcom(); - if ( is_wp_error( $rewind_data ) ) { - return false; - } - return is_object( $rewind_data ) && isset( $rewind_data->state ) && 'unavailable' !== $rewind_data->state; - } - - /** - * Return product bundles list - * that supports the product. - * - * @return boolean|array Products bundle list. - */ - public static function is_upgradable_by_bundle() { - return array( 'security' ); - } - - /** - * Get the URL the user is taken after activating the product - * - * @return ?string - */ - public static function get_post_activation_url() { - return ''; // stay in My Jetpack page or continue the purchase flow if needed. - } - - /** - * Get the URL where the user manages the product - * - * @return ?string - */ - public static function get_manage_url() { - // check standalone first - if ( static::is_standalone_plugin_active() ) { - return admin_url( 'admin.php?page=jetpack-backup' ); - // otherwise, check for the main Jetpack plugin - } elseif ( static::is_jetpack_plugin_active() ) { - return Redirect::get_url( 'my-jetpack-manage-backup' ); - } - } - - /** - * Checks whether the Product is active - * - * @return boolean - */ - public static function is_active() { - return parent::is_active() && static::has_required_plan(); - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-boost.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-boost.php deleted file mode 100644 index 03f4a554..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-boost.php +++ /dev/null @@ -1,322 +0,0 @@ - __( 'Optimize CSS Loading', 'jetpack-my-jetpack' ), - 'info' => array( - 'content' => __( - 'Move important styling information to the start of the page, which helps pages display your content sooner, so your users don’t have to wait for the entire page to load. Commonly referred to as Critical CSS.', - 'jetpack-my-jetpack' - ), - ), - 'tiers' => array( - self::FREE_TIER_SLUG => array( - 'included' => true, - 'description' => __( 'Must be done manually', 'jetpack-my-jetpack' ), - 'info' => array( - 'title' => __( 'Manual Critical CSS regeneration', 'jetpack-my-jetpack' ), - 'content' => __( - '

          To enhance the speed of your site, with this plan you will need to optimize CSS by using the Manual Critical CSS generation feature whenever you:

          -
            -
          • Make theme changes.
          • -
          • Write a new post/page.
          • -
          • Edit a post/page.
          • -
          • Activate, deactivate, or update plugins that impact your site layout or HTML structure.
          • -
          • Change settings of plugins that impact your site layout or HTML structure.
          • -
          • Upgrade your WordPress version if the new release includes core CSS changes.
          • -
          ', - 'jetpack-my-jetpack' - ), - ), - ), - self::UPGRADED_TIER_SLUG => array( - 'included' => true, - 'description' => __( 'Automatically updated', 'jetpack-my-jetpack' ), - 'info' => array( - 'title' => __( 'Automatic Critical CSS regeneration', 'jetpack-my-jetpack' ), - 'content' => __( - '

          It’s essential to regenerate Critical CSS to optimize your site speed whenever your HTML or CSS structure changes. Being on top of this can be tedious and time-consuming.

          -

          Boost’s cloud service can automatically detect when your site needs the Critical CSS regenerated, and perform this function behind the scenes without requiring you to monitor it manually.

          ', - 'jetpack-my-jetpack' - ), - ), - ), - ), - ), - array( - 'name' => __( 'Defer non-essential JavaScript', 'jetpack-my-jetpack' ), - 'info' => array( - 'content' => __( - 'Run non-essential JavaScript after the page has loaded so that styles and images can load more quickly.', - 'jetpack-my-jetpack' - ), - 'link' => array( - 'id' => 'jetpack-boost-defer-js', - 'title' => 'web.dev', - ), - ), - 'tiers' => array( - self::FREE_TIER_SLUG => array( 'included' => true ), - self::UPGRADED_TIER_SLUG => array( 'included' => true ), - ), - ), - array( - 'name' => __( 'Lazy image loading', 'jetpack-my-jetpack' ), - 'info' => array( - 'content' => __( - 'Improve page loading speed by only loading images when they are required.', - 'jetpack-my-jetpack' - ), - 'link' => array( - 'id' => 'jetpack-boost-lazy-load', - 'title' => 'web.dev', - ), - ), - 'tiers' => array( - self::FREE_TIER_SLUG => array( 'included' => true ), - self::UPGRADED_TIER_SLUG => array( 'included' => true ), - ), - ), - array( - 'name' => __( 'Image guide', 'jetpack-my-jetpack' ), - 'info' => array( - 'content' => __( - 'Discover and fix images with a suboptimal resolution, aspect ratio, or file size, improving user experience and page speed.', - 'jetpack-my-jetpack' - ), - ), - 'tiers' => array( - self::FREE_TIER_SLUG => array( 'included' => true ), - self::UPGRADED_TIER_SLUG => array( 'included' => true ), - ), - ), - array( - 'name' => __( 'Image CDN', 'jetpack-my-jetpack' ), - 'info' => array( - 'content' => __( - 'Deliver images from Jetpack\'s Content Delivery Network. Automatically resizes your images to an appropriate size, converts them to modern efficient formats like WebP, and serves them from a worldwide network of servers.', - 'jetpack-my-jetpack' - ), - ), - 'tiers' => array( - self::FREE_TIER_SLUG => array( 'included' => true ), - self::UPGRADED_TIER_SLUG => array( 'included' => true ), - ), - ), - array( - 'name' => __( 'Dedicated email support', 'jetpack-my-jetpack' ), - 'info' => array( - 'content' => __( - '

          Paid customers get dedicated email support from our world-class Happiness Engineers to help with any issue.

          -

          All other questions are handled by our team as quickly as we are able to go through the WordPress support forum.

          ', - 'jetpack-my-jetpack' - ), - ), - 'tiers' => array( - self::FREE_TIER_SLUG => array( 'included' => false ), - self::UPGRADED_TIER_SLUG => array( 'included' => true ), - ), - ), - ); - } - - /** - * Get the URL the user is taken after purchasing the product through the checkout - * - * @return ?string - */ - public static function get_post_checkout_url() { - return self::get_manage_url(); - } - - /** - * Get the product princing details - * - * @return array Pricing details - */ - public static function get_pricing_for_ui() { - return array( - 'tiers' => array( - self::FREE_TIER_SLUG => array( - 'available' => true, - 'is_free' => true, - ), - self::UPGRADED_TIER_SLUG => array_merge( - array( - 'available' => true, - 'wpcom_product_slug' => self::UPGRADED_TIER_PRODUCT_SLUG, - ), - Wpcom_Products::get_product_pricing( self::UPGRADED_TIER_PRODUCT_SLUG ) - ), - ), - ); - } - - /** - * Checks whether the current plan (or purchases) of the site already supports the product - * - * @return boolean - */ - public static function has_paid_plan_for_product() { - $purchases_data = Wpcom_Products::get_site_current_purchases(); - if ( is_wp_error( $purchases_data ) ) { - return false; - } - if ( is_array( $purchases_data ) && ! empty( $purchases_data ) ) { - foreach ( $purchases_data as $purchase ) { - // Boost is available as standalone bundle and as part of the Complete plan. - if ( strpos( $purchase->product_slug, 'jetpack_boost' ) !== false || str_starts_with( $purchase->product_slug, 'jetpack_complete' ) ) { - return true; - } - } - } - return false; - } - - /** - * Get the URL where the user manages the product - * - * @return ?string - */ - public static function get_manage_url() { - return admin_url( 'admin.php?page=jetpack-boost' ); - } - - /** - * Activates the product by installing and activating its plugin - * - * @param bool|WP_Error $current_result Is the result of the top level activation actions. You probably won't do anything if it is an WP_Error. - * @return boolean|\WP_Error - */ - public static function do_product_specific_activation( $current_result ) { - - $product_activation = parent::do_product_specific_activation( $current_result ); - - if ( is_wp_error( $product_activation ) && 'module_activation_failed' === $product_activation->get_error_code() ) { - // A bundle is not a module. There's nothing in the plugin to be activated, so it's ok to fail to activate the module. - $product_activation = true; - } - - // We just "got started" in My Jetpack, so skip the in-plugin experience. - update_option( 'jb_get_started', false ); - - return $product_activation; - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-creator.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-creator.php deleted file mode 100644 index 44259932..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-creator.php +++ /dev/null @@ -1,358 +0,0 @@ - __( 'Import subscribers', 'jetpack-my-jetpack' ), - 'info' => array( - 'content' => __( - 'Import a CSV file of your existing subscribers to be sent your Newsletter.', - 'jetpack-my-jetpack' - ), - ), - 'tiers' => array( - self::FREE_TIER_SLUG => array( - 'included' => true, - 'description' => __( '100 subscribers', 'jetpack-my-jetpack' ), - ), - self::UPGRADED_TIER_SLUG => array( - 'included' => true, - 'description' => __( 'Unlimited subscribers', 'jetpack-my-jetpack' ), - ), - ), - ), - array( - 'name' => __( 'Transaction fees', 'jetpack-my-jetpack' ), - 'info' => array( - 'content' => __( - '

          Fees are only collected when you accept payments.

          -

          Fees are based on the Jetpack plan you have and are calculated as a percentage of your revenue from 10% on the Free plan to 2% on the Creator plan (plus Stripe fees).

          ', - 'jetpack-my-jetpack' - ), - ), - 'tiers' => array( - self::FREE_TIER_SLUG => array( - 'included' => true, - 'description' => __( '10%', 'jetpack-my-jetpack' ), - ), - self::UPGRADED_TIER_SLUG => array( - 'included' => true, - 'description' => __( '2%', 'jetpack-my-jetpack' ), - ), - ), - ), - array( - 'name' => __( 'Creator network', 'jetpack-my-jetpack' ), - 'info' => array( - 'content' => __( - '

          The creator network is the network of websites either hosted with WordPress.com or self-hosted and connected with Jetpack.

          -

          Sites that are part of the creator network can gain exposure to new readers. Sites on the Creator plan have enhanced distribution to more areas of the Reader.

          ', - 'jetpack-my-jetpack' - ), - ), - 'tiers' => array( - self::FREE_TIER_SLUG => array( 'included' => true ), - self::UPGRADED_TIER_SLUG => array( 'included' => true ), - ), - ), - array( - 'name' => __( 'Jetpack Blocks', 'jetpack-my-jetpack' ), - 'info' => array( - 'content' => __( - 'Jetpack has over 40 Gutenberg blocks to help you with your content creation, such as displaying your podcasts, showing different content to repeat visitors, creating contact forms and many more.', - 'jetpack-my-jetpack' - ), - ), - 'tiers' => array( - self::FREE_TIER_SLUG => array( 'included' => true ), - self::UPGRADED_TIER_SLUG => array( 'included' => true ), - ), - ), - array( - 'name' => __( 'Paid content gating', 'jetpack-my-jetpack' ), - 'info' => array( - 'content' => __( - 'Lock your content behind a paid content block. To access the content, readers will need to pay a one-time fee or a recurring subscription.', - 'jetpack-my-jetpack' - ), - ), - 'tiers' => array( - self::FREE_TIER_SLUG => array( 'included' => true ), - self::UPGRADED_TIER_SLUG => array( 'included' => true ), - ), - ), - array( - 'name' => __( 'Paywall access', 'jetpack-my-jetpack' ), - 'info' => array( - 'content' => __( - 'Add a Paywall to your content which lets your visitors read a section of your content before being asked to subscribe to continue reading.', - 'jetpack-my-jetpack' - ), - ), - 'tiers' => array( - self::FREE_TIER_SLUG => array( 'included' => true ), - self::UPGRADED_TIER_SLUG => array( 'included' => true ), - ), - ), - array( - 'name' => __( 'Newsletter', 'jetpack-my-jetpack' ), - 'info' => array( - 'content' => __( - 'Start a Newsletter by sending your content as an email newsletter direct to your fans email inboxes.', - 'jetpack-my-jetpack' - ), - ), - 'tiers' => array( - self::FREE_TIER_SLUG => array( 'included' => true ), - self::UPGRADED_TIER_SLUG => array( 'included' => true ), - ), - ), - array( - 'name' => __( 'Pay with PayPal', 'jetpack-my-jetpack' ), - 'info' => array( - 'content' => __( - 'Accept payment with PayPal for simple payments like eBooks, courses and more.', - 'jetpack-my-jetpack' - ), - ), - 'tiers' => array( - self::FREE_TIER_SLUG => array( 'included' => false ), - self::UPGRADED_TIER_SLUG => array( 'included' => true ), - ), - ), - array( - 'name' => __( 'WordAds', 'jetpack-my-jetpack' ), - 'info' => array( - 'content' => __( - '

          WordAds adds advertisements to your website. Start earning from your website traffic.

          -

          Over 50 internet advertisers — including Google AdSense & Adx, AppNexus, Amazon A9, AOL Marketplace, Yahoo, Criteo, and more — bid to display ads in WordAds spots.

          ', - 'jetpack-my-jetpack' - ), - ), - 'tiers' => array( - self::FREE_TIER_SLUG => array( 'included' => false ), - self::UPGRADED_TIER_SLUG => array( 'included' => true ), - ), - ), - array( - 'name' => __( 'Dedicated email support', 'jetpack-my-jetpack' ), - 'info' => array( - 'content' => __( - '

          Paid customers get dedicated email support from our world-class Happiness Engineers to help with any issue.

          -

          All other questions are handled by our team as quickly as we are able to go through the WordPress support forum.

          ', - 'jetpack-my-jetpack' - ), - ), - 'tiers' => array( - self::FREE_TIER_SLUG => array( 'included' => false ), - self::UPGRADED_TIER_SLUG => array( 'included' => true ), - ), - ), - ); - } - - /** - * Get the product princing details - * - * @return array Pricing details - */ - public static function get_pricing_for_ui() { - return array( - 'tiers' => array( - self::FREE_TIER_SLUG => array( - 'available' => true, - 'is_free' => true, - ), - self::UPGRADED_TIER_SLUG => array_merge( - array( - 'available' => true, - 'wpcom_product_slug' => self::UPGRADED_TIER_PRODUCT_SLUG, - ), - Wpcom_Products::get_product_pricing( self::UPGRADED_TIER_PRODUCT_SLUG ) - ), - ), - ); - } - - /** - * Get the URL where the user manages the product - * - * @return ?string - */ - public static function get_manage_url() { - return admin_url( 'admin.php?page=jetpack#/settings?term=creator' ); - } - - /** - * Get the WPCOM product slug used to make the purchase - * - * @return ?string - */ - public static function get_wpcom_product_slug() { - return 'jetpack_creator_yearly'; - } - - /** - * Get the WPCOM product slug used to make the purchase - * - * @return ?string - */ - public static function get_wpcom_biyearly_product_slug() { - return 'jetpack_creator_bi_yearly'; - } - - /** - * Get the WPCOM monthly product slug used to make the purchase - * - * @return ?string - */ - public static function get_wpcom_monthly_product_slug() { - return 'jetpack_creator_monthly'; - } - - /** - * Checks whether the current plan (or purchases) of the site already supports the product - * - * @return boolean - */ - public static function has_required_plan() { - $purchases_data = Wpcom_Products::get_site_current_purchases(); - if ( is_wp_error( $purchases_data ) ) { - return false; - } - if ( is_array( $purchases_data ) && ! empty( $purchases_data ) ) { - foreach ( $purchases_data as $purchase ) { - // Creator is available as standalone bundle and as part of the Complete plan. - if ( strpos( $purchase->product_slug, 'jetpack_creator' ) !== false || str_starts_with( $purchase->product_slug, 'jetpack_complete' ) ) { - return true; - } - } - } - return false; - } - - /** - * Checks whether the product can be upgraded - i.e. this shows the /#add-creator interstitial - * - * @return boolean - */ - public static function is_upgradable() { - $has_required_plan = self::has_required_plan(); - return ! $has_required_plan; - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-crm.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-crm.php deleted file mode 100644 index 29a8e1a1..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-crm.php +++ /dev/null @@ -1,159 +0,0 @@ - true, - 'is_free' => false, - 'full_price' => 132, - 'discount_price' => 132, - 'is_introductory_offer' => false, - 'product_term' => 'year', - 'introductory_offer' => null, - // CRM is only sold in USD - 'currency_code' => 'USD', - ); - } - - /** - * Get the URL the user is taken after activating the product - * - * @return ?string - */ - public static function get_post_activation_url() { - return admin_url( 'admin.php?page=zerobscrm-plugin' ); // Welcome page. - } - - /** - * Get the URL where the user manages the product - * - * @return ?string - */ - public static function get_manage_url() { - return admin_url( 'admin.php?page=zerobscrm-dash' ); - } - - /** - * Checks whether the current plan (or purchases) of the site already supports the product - * CRM is available as part of Jetpack Complete - * - * @return boolean - */ - public static function has_required_plan() { - $purchases_data = Wpcom_Products::get_site_current_purchases(); - if ( is_wp_error( $purchases_data ) ) { - return false; - } - - if ( is_array( $purchases_data ) && ! empty( $purchases_data ) ) { - foreach ( $purchases_data as $purchase ) { - if ( str_starts_with( $purchase->product_slug, 'jetpack_complete' ) ) { - return true; - } - } - } - - return false; - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-extras.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-extras.php deleted file mode 100644 index 7d1d8e6f..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-extras.php +++ /dev/null @@ -1,140 +0,0 @@ - true, - 'is_free' => true, - ); - } - - /** - * Checks whether the Product is active. - * If Jetpack plugin is active, then Extras will be inactive. - * - * @return boolean - */ - public static function is_active() { - return static::is_jetpack_plugin_active(); - } - - /** - * Checks whether the plugin is installed - * If Jetpack plugin is installed, then Extras will be inactive. - * - * @return boolean - */ - public static function is_plugin_installed() { - return static::is_jetpack_plugin_installed(); - } - - /** - * Get the URL where the user manages the product - * - * @return ?string - */ - public static function get_manage_url() { - return admin_url( 'admin.php?page=jetpack' ); - } - - /** - * Activates the Jetpack plugin - * - * @return null|WP_Error Null on success, WP_Error on invalid file. - */ - public static function activate_plugin() { - return activate_plugin( static::get_installed_plugin_filename( 'jetpack' ) ); - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-hybrid-product.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-hybrid-product.php deleted file mode 100644 index 04d22c62..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-hybrid-product.php +++ /dev/null @@ -1,162 +0,0 @@ -is_active( static::$module_name ); - } - return true; - } - - /** - * Checks whether the Product is active - * - * @return boolean - */ - public static function is_active() { - return parent::is_active() && static::is_module_active(); - } - - /** - * Activates the plugin - * - * @return null|WP_Error Null on success, WP_Error on invalid file. - */ - public static function activate_plugin() { - /* - * Activate self-installed plugin if it's installed. - */ - if ( parent::is_plugin_installed() ) { - return activate_plugin( static::get_installed_plugin_filename() ); - } - - /* - * Otherwise, activate Jetpack plugin. - */ - if ( static::is_jetpack_plugin_installed() ) { - return activate_plugin( static::get_installed_plugin_filename( 'jetpack' ) ); - } - - return new WP_Error( 'plugin_not_found', __( 'Activation failed. Plugin is not installed', 'jetpack-my-jetpack' ) ); - } - - /** - * Activates the product. If the Hybrid product has declared a jetpack module name, let's try to activate it if Jetpack plugin is active - * - * @param bool|WP_Error $product_activation Is the result of the top level activation actions. You probably won't do anything if it is an WP_Error. - * @return bool|WP_Error - */ - public static function do_product_specific_activation( $product_activation ) { - - if ( is_wp_error( $product_activation ) ) { - // If we failed to install the stand-alone plugin because the package was not found, let's try and install Jetpack plugin instead. - // This might happen, for example, while the stand-alone plugin was not released to the WP.org repository yet. - if ( 'no_package' === $product_activation->get_error_code() ) { - $product_activation = Plugins_Installer::install_plugin( self::JETPACK_PLUGIN_SLUG ); - if ( ! is_wp_error( $product_activation ) ) { - $product_activation = static::activate_plugin(); - } - } - if ( is_wp_error( $product_activation ) ) { - return $product_activation; - } - } - - // Only activate the module if the plan supports it - // We don't want to throw an error for a missing plan here since we try activation before purchase - if ( static::has_required_plan() && ! empty( static::$module_name ) ) { - $module_activation = ( new Modules() )->activate( static::$module_name, false, false ); - - if ( ! $module_activation ) { - return new WP_Error( 'module_activation_failed', __( 'Error activating Jetpack module', 'jetpack-my-jetpack' ) ); - } - - return $module_activation; - } - - return true; - } - - /** - * Install and activate the standalone plugin in the case it's missing. - * - * @return boolean|WP_Error - */ - public static function install_and_activate_standalone() { - $result = parent::install_and_activate_standalone(); - - if ( is_wp_error( $result ) ) { - return $result; - } - - /** - * Activate the module as well, if the user has a plan - * or the product does not require a plan to work - */ - if ( static::has_required_plan() && isset( static::$module_name ) ) { - $module_activation = ( new Modules() )->activate( static::$module_name, false, false ); - - if ( ! $module_activation ) { - return new WP_Error( 'module_activation_failed', __( 'Error activating Jetpack module', 'jetpack-my-jetpack' ) ); - } - } - - return true; - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-jetpack-ai.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-jetpack-ai.php deleted file mode 100644 index a6a844e8..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-jetpack-ai.php +++ /dev/null @@ -1,386 +0,0 @@ - __( 'Jetpack AI Assistant brings the power of AI right into your WordPress editor, letting your content creation soar to new heights.', 'jetpack-my-jetpack' ), - 100 => __( 'The most advanced AI technology Jetpack has to offer.', 'jetpack-my-jetpack' ), - ); - $tiered_description = __( 'Upgrade and increase the amount of your available monthly requests to continue using the most advanced AI technology Jetpack has to offer.', 'jetpack-my-jetpack' ); - - return isset( $long_descriptions[ $tier ] ) ? $long_descriptions[ $tier ] : $tiered_description; - } - - /** - * Get the internationalized product long description - * - * @return string - */ - public static function get_long_description() { - $next_tier = self::get_next_usage_tier(); - - return self::get_long_description_by_usage_tier( $next_tier ); - } - - /** - * Get the internationalized usage tier features by tier - * - * @param int $tier The usage tier. - * @return string - */ - public static function get_features_by_usage_tier( $tier ) { - $features = array( - 1 => array( - __( 'Artificial intelligence chatbot', 'jetpack-my-jetpack' ), - __( 'Generate text, tables, lists, and forms', 'jetpack-my-jetpack' ), - __( 'Refine the tone and content to your liking', 'jetpack-my-jetpack' ), - __( 'Get feedback about your post', 'jetpack-my-jetpack' ), - __( 'Seamless WordPress editor integration', 'jetpack-my-jetpack' ), - ), - ); - - $tiered_features = array( - __( 'Prompt based content generation', 'jetpack-my-jetpack' ), - __( 'Generate text, tables, and lists', 'jetpack-my-jetpack' ), - __( 'Adaptive tone adjustment', 'jetpack-my-jetpack' ), - __( 'Superior spelling and grammar correction', 'jetpack-my-jetpack' ), - __( 'Title & summary generation', 'jetpack-my-jetpack' ), - __( 'Priority support', 'jetpack-my-jetpack' ), - /* translators: %d is the number of requests. */ - sprintf( __( 'Up to %d requests per month', 'jetpack-my-jetpack' ), $tier ), - ); - - return isset( $features[ $tier ] ) ? $features[ $tier ] : $tiered_features; - } - - /** - * Get the internationalized features list - * - * @return array Jetpack AI features list - */ - public static function get_features() { - $next_tier = self::get_next_usage_tier(); - - return self::get_features_by_usage_tier( $next_tier ); - } - - /** - * Get the product pricing details by tier - * - * @param int $tier The usage tier. - * @return array Pricing details - */ - public static function get_pricing_for_ui_by_usage_tier( $tier ) { - $product = Wpcom_Products::get_product( static::get_wpcom_product_slug() ); - - if ( empty( $product ) ) { - return array(); - } - - // get info about the feature. - $info = self::get_ai_assistant_feature(); - - // flag to indicate if the tiers are enabled, case the info is available. - $tier_plans_enabled = ( ! is_wp_error( $info ) && isset( $info['tier-plans-enabled'] ) ) ? boolval( $info['tier-plans-enabled'] ) : false; - - /* - * when tiers are enabled and the price tier list is empty, - * we may need to renew the cache for the product data so - * we get the new price tier list. - * - * if the list is still empty after the fresh data, we will - * default to empty pricing (by returning an empty array). - */ - if ( empty( $product->price_tier_list ) && $tier_plans_enabled ) { - $product = Wpcom_Products::get_product( static::get_wpcom_product_slug(), true ); - } - - // get the base pricing for the unlimited plan, for compatibility - $base_pricing = Wpcom_Products::get_product_pricing( static::get_wpcom_product_slug() ); - - $price_tier_list = $product->price_tier_list; - $yearly_prices = array(); - - foreach ( $price_tier_list as $price_tier ) { - if ( isset( $price_tier->maximum_units ) && isset( $price_tier->maximum_price ) ) { - // The prices are in cents - $yearly_prices[ $price_tier->maximum_units ] = $price_tier->maximum_price / 100; - } - } - - // add the base pricing to the list - $prices = array( 1 => $base_pricing ); - - foreach ( $yearly_prices as $units => $price ) { - $prices[ $units ] = array_merge( - $base_pricing, - array( - 'full_price' => $price, - 'discount_price' => $price, - 'is_introductory_offer' => false, - 'introductory_offer' => null, - ) - ); - } - - return isset( $prices[ $tier ] ) ? $prices[ $tier ] : array(); - } - - /** - * Get the product pricing details - * - * @return array Pricing details - */ - public static function get_pricing_for_ui() { - $next_tier = self::get_next_usage_tier(); - - return array_merge( - array( - 'available' => true, - 'wpcom_product_slug' => static::get_wpcom_product_slug(), - ), - self::get_pricing_for_ui_by_usage_tier( $next_tier ) - ); - } - - /** - * Get the WPCOM product slug used to make the purchase - * - * @return string - */ - public static function get_wpcom_product_slug() { - return 'jetpack_ai_yearly'; - } - - /** - * Get the WPCOM monthly product slug used to make the purchase - * - * @return string - */ - public static function get_wpcom_monthly_product_slug() { - return 'jetpack_ai_monthly'; - } - - /** - * Get the WPCOM bi-yearly product slug used to make the purchase - * - * @return string - */ - public static function get_wpcom_bi_yearly_product_slug() { - return 'jetpack_ai_bi_yearly'; - } - - /** - * Checks whether the current plan (or purchases) of the site already supports the product - * - * @return boolean - */ - public static function has_required_plan() { - return static::does_site_have_feature( 'ai-assistant' ); - } - - /** - * Checks whether the product can be upgraded to a different product. - * - * @return boolean - */ - public static function is_upgradable() { - $has_required_plan = self::has_required_plan(); - $current_tier = self::get_current_usage_tier(); - - // Mark as not upgradable if user is on unlimited tier or does not have any plan. - if ( ! $has_required_plan || null === $current_tier || 1 === $current_tier ) { - return false; - } - - return true; - } - - /** - * Get the URL where the user manages the product - * - * @return ?string - */ - public static function get_manage_url() { - return ''; - } - - /** - * Get data about the AI Assistant feature - * - * @return array - */ - public static function get_ai_assistant_feature() { - // Bail early if the plugin is not active. - if ( ! self::is_jetpack_plugin_installed() ) { - return array(); - } - - // Check if the global constant is defined. - if ( ! defined( 'JETPACK__PLUGIN_DIR' ) ) { - return array(); - } - - // Bail early if the site is not connected. - if ( ! self::is_site_connected() ) { - return array(); - } - - // Check if class exists. If not, try to require it once. - if ( ! class_exists( 'Jetpack_AI_Helper' ) ) { - $class_file_path = JETPACK__PLUGIN_DIR . '_inc/lib/class-jetpack-ai-helper.php'; - - // Check whether the file exists - if ( ! file_exists( $class_file_path ) ) { - return array(); - } - - require_once $class_file_path; - } - - return \Jetpack_AI_Helper::get_ai_assistance_feature(); - } - - /** - * Checks whether the site is connected to WordPress.com. - * - * @return boolean - */ - private static function is_site_connected() { - return ( new Connection_Manager() )->is_connected(); - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-module-product.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-module-product.php deleted file mode 100644 index 37f98601..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-module-product.php +++ /dev/null @@ -1,133 +0,0 @@ - static::$slug, - 'plugin_slug' => static::$plugin_slug, - 'name' => static::get_name(), - 'title' => static::get_title(), - 'description' => static::get_description(), - 'long_description' => static::get_long_description(), - 'tiers' => static::get_tiers(), - 'features' => static::get_features(), - 'features_by_tier' => static::get_features_by_tier(), - 'disclaimers' => static::get_disclaimers(), - 'status' => static::get_status(), - 'pricing_for_ui' => static::get_pricing_for_ui(), - 'is_bundle' => static::is_bundle_product(), - 'is_plugin_active' => static::is_plugin_active(), - 'is_upgradable_by_bundle' => static::is_upgradable_by_bundle(), - 'supported_products' => static::get_supported_products(), - 'wpcom_product_slug' => static::get_wpcom_product_slug(), - 'requires_user_connection' => static::$requires_user_connection, - 'has_required_plan' => static::has_required_plan(), - 'has_paid_plan_for_product' => static::has_paid_plan_for_product(), - 'has_required_tier' => static::has_required_tier(), - 'manage_url' => static::get_manage_url(), - 'purchase_url' => static::get_purchase_url(), - 'post_activation_url' => static::get_post_activation_url(), - 'standalone_plugin_info' => static::get_standalone_info(), - 'class' => static::class, - 'post_checkout_url' => static::get_post_checkout_url(), - ); - } - - /** - * Collect the site's active features - * - * @return WP_Error|array - */ - private static function get_site_features_from_wpcom() { - static $features = null; - - if ( $features !== null ) { - return $features; - } - - $site_id = Jetpack_Options::get_option( 'id' ); - $response = Client::wpcom_json_api_request_as_blog( sprintf( '/sites/%d/features', $site_id ), '1.1' ); - - if ( 200 !== wp_remote_retrieve_response_code( $response ) ) { - return new WP_Error( 'site_features_fetch_failed' ); - } - - $body = wp_remote_retrieve_body( $response ); - $feature_return = json_decode( $body ); - $features = $feature_return->active; - - return $features; - } - - /** - * Check to see if the site has a feature - * This will check the features provided by the site plans and products (including free ones) - * - * @param string $feature - the feature to check for. - * @return bool - */ - public static function does_site_have_feature( $feature ) { - if ( ! $feature ) { - return false; - } - - $features = self::get_site_features_from_wpcom(); - if ( is_wp_error( $features ) ) { - return false; - } - - return in_array( $feature, $features, true ); - } - - /** - * Get the product name - * - * @return string - */ - abstract public static function get_name(); - - /** - * Get the product title - * - * @return string - */ - abstract public static function get_title(); - - /** - * Get the internationalized product description - * - * @return string - */ - abstract public static function get_description(); - - /** - * Get the internationalized product long description - * - * @return string - */ - abstract public static function get_long_description(); - - /** - * Get the tiers for the product - * - * @return boolean|string[] The slugs of the tiers (i.e. [ "free", "basic", "advanced" ]), or False if the product has no tiers. - */ - public static function get_tiers() { - return array(); - } - - /** - * Get the internationalized features list - * - * @return array - */ - abstract public static function get_features(); - - /** - * Get the internationalized comparison of features grouped by each tier - * - * @return array - */ - public static function get_features_by_tier() { - return array(); - } - - /** - * Get the product pricing - * - * @return array - */ - abstract public static function get_pricing_for_ui(); - - /** - * Get the URL where the user can purchase the product iff it doesn't have an interstitial page in My Jetpack. - * - * @return ?string - */ - public static function get_purchase_url() { - // Declare as concrete method as most Jetpack products use an interstitial page within My Jetpack. - return null; - } - - /** - * Get the URL where the user manages the product - * - * @return ?string - */ - abstract public static function get_manage_url(); - - /** - * Get the URL the user is taken after activating the product - * - * @return ?string - */ - public static function get_post_activation_url() { - return static::get_manage_url(); - } - - /** - * Get the URL the user is taken after purchasing the product through the checkout - * - * @return ?string - */ - public static function get_post_checkout_url() { - return null; - } - - /** - * Get the WPCOM product slug used to make the purchase - * - * @return ?string - */ - public static function get_wpcom_product_slug() { - return null; - } - - /** - * Get the disclaimers corresponding to a feature - * - * @return ?array - */ - public static function get_disclaimers() { - return array(); - } - - /** - * Get the standalone plugin related info - * - * @return array - */ - public static function get_standalone_info() { - $is_standalone_installed = static::$has_standalone_plugin && self::is_plugin_installed(); - $is_standalone_active = static::$has_standalone_plugin && self::is_plugin_active(); - - return array( - 'has_standalone_plugin' => static::$has_standalone_plugin, - 'is_standalone_installed' => $is_standalone_installed, - 'is_standalone_active' => $is_standalone_active, - ); - } - - /** - * Checks whether the current plan (or purchases) of the site already supports the product - * - * Returns true if it supports. Return false if a purchase is still required. - * - * Free products will always return true. - * - * @return boolean - */ - public static function has_required_plan() { - return true; - } - - /** - * Checks whether the site has a paid plan for the product - * This ignores free products, it only checks if there is a purchase that supports the product - * - * @return boolean - */ - public static function has_paid_plan_for_product() { - // TODO: this is not always the same. - // There should be checks on each individual product class for paid plans if the product has a free offering - // For products with no free offering, checking has_required_plan works fine - return static::has_required_plan(); - } - - /** - * Checks whether the current plan (or purchases) of the site already supports the tiers - * - * @return array Key/value pairs of tier slugs and whether they are supported or not. - */ - public static function has_required_tier() { - return array(); - } - - /** - * Checks whether the product supports trial or not - * - * Returns true if it supports. Return false otherwise. - * - * Free products will always return false. - * - * @return boolean - */ - public static function has_trial_support() { - return false; - } - - /** - * Checks whether the product can be upgraded to a different product. - * - * @return boolean - */ - public static function is_upgradable() { - return false; - } - - /** - * Checks whether product is a bundle. - * - * @return boolean True if product is a bundle. Otherwise, False. - */ - public static function is_bundle_product() { - return false; - } - - /** - * Check whether the product is upgradable - * by a product bundle. - * - * @return boolean|array Bundles list or False if not upgradable by a bundle. - */ - public static function is_upgradable_by_bundle() { - return false; - } - - /** - * In case it's a bundle product, - * return all the products it contains. - * Empty array by default. - * - * @return Array Product slugs - */ - public static function get_supported_products() { - return array(); - } - - /** - * Undocumented function - * - * @return string - */ - public static function get_status() { - if ( ! static::is_plugin_installed() ) { - $status = 'plugin_absent'; - if ( static::has_paid_plan_for_product() ) { - $status = 'plugin_absent_with_plan'; - } - } elseif ( static::is_active() ) { - $status = 'active'; - // We only consider missing site & user connection an error when the Product is active. - if ( static::$requires_site_connection && ! ( new Connection_Manager() )->is_connected() ) { - $status = 'error'; - } elseif ( static::$requires_user_connection && ! ( new Connection_Manager() )->has_connected_owner() ) { - $status = 'error'; - } elseif ( static::is_upgradable() ) { - // Upgradable plans should ignore whether or not they have the required plan. - $status = 'can_upgrade'; - } elseif ( ! static::has_required_plan() ) { // We need needs_purchase here as well because some products we consider active without the required plan. - if ( static::has_trial_support() ) { - $status = 'needs_purchase_or_free'; - } else { - $status = 'needs_purchase'; - } - } - } elseif ( ! static::has_required_plan() ) { - if ( static::has_trial_support() ) { - $status = 'needs_purchase_or_free'; - } else { - $status = 'needs_purchase'; - } - } else { - $status = 'inactive'; - } - return $status; - } - - /** - * Checks whether the Product is active - * - * @return boolean - */ - public static function is_active() { - return static::is_plugin_active() && static::has_required_plan(); - } - - /** - * Checks whether the plugin is installed - * - * @return boolean - */ - public static function is_plugin_installed() { - return (bool) static::get_installed_plugin_filename(); - } - - /** - * Checks whether the plugin is active - * - * @return boolean - */ - public static function is_plugin_active() { - return Plugins_Installer::is_plugin_active( static::get_installed_plugin_filename() ); - } - - /** - * Checks whether the Jetpack plugin is installed - * - * @return boolean - */ - public static function is_jetpack_plugin_installed() { - return (bool) static::get_installed_plugin_filename( 'jetpack' ); - } - - /** - * Checks whether the Jetpack plugin is active - * - * @return boolean - */ - public static function is_jetpack_plugin_active() { - return Plugins_Installer::is_plugin_active( static::get_installed_plugin_filename( 'jetpack' ) ); - } - - /** - * Activates the plugin - * - * @return null|WP_Error Null on success, WP_Error on invalid file. - */ - public static function activate_plugin() { - return activate_plugin( static::get_installed_plugin_filename() ); - } - - /** - * Perform the top level activation routines, which is installing and activating the required plugin - * - * @return bool|WP_Error - */ - private static function do_activation() { - if ( static::is_active() ) { - return true; - } - - // Default to installing the standalone plugin for the product - if ( ! self::is_plugin_installed() ) { - $installed = Plugins_Installer::install_plugin( static::get_plugin_slug() ); - if ( is_wp_error( $installed ) ) { - return $installed; - } - } - - if ( ! current_user_can( 'activate_plugins' ) ) { - return new WP_Error( 'not_allowed', __( 'You are not allowed to activate plugins on this site.', 'jetpack-my-jetpack' ) ); - } - - $result = static::activate_plugin(); - if ( is_wp_error( $result ) ) { - return $result; - } - - return true; - } - - /** - * Activates the product by installing and activating its plugin - * - * @return boolean|WP_Error - */ - final public static function activate() { - - $result = self::do_activation(); - - $result = static::do_product_specific_activation( $result ); - - $product_slug = static::$slug; - - /** - * Fires after My Jetpack activates a product and filters the result - * Use this filter to run additional routines for a product activation on stand-alone plugins - * - * @param bool|WP_Error $result The result of the previous steps of activation. - */ - $result = apply_filters( "my_jetpack_{$product_slug}_activation", $result ); - - return $result; - } - - /** - * Override this method to perform product specific activation routines. - * - * @param bool|WP_Error $current_result Is the result of the top level activation actions. You probably won't do anything if it is an WP_Error. - * @return bool|WP_Error - */ - public static function do_product_specific_activation( $current_result ) { - return $current_result; - } - - /** - * Deactivate the product - * - * @return boolean - */ - public static function deactivate() { - deactivate_plugins( static::get_installed_plugin_filename() ); - return true; - } - - /** - * Returns filtered Jetpack plugin actions links. - * - * @param array $actions - Jetpack plugin action links. - * @return array Filtered Jetpack plugin actions links. - */ - public static function get_plugin_actions_links( $actions ) { - // My Jetpack action link. - $my_jetpack_home_link = array( - 'jetpack-home' => sprintf( - '%2$s', - admin_url( 'admin.php?page=my-jetpack' ), - __( 'My Jetpack', 'jetpack-my-jetpack' ), - __( 'My Jetpack dashboard', 'jetpack-my-jetpack' ) - ), - ); - - // Otherwise, add it to the beginning of the array. - return array_merge( $my_jetpack_home_link, $actions ); - } - - /** - * Filter the action links for the plugins specified. - * - * @param string|string[] $filenames The plugin filename(s) to filter the action links for. - */ - private static function filter_action_links( $filenames ) { - foreach ( $filenames as $filename ) { - $hook = 'plugin_action_links_' . $filename; - $callback = array( static::class, 'get_plugin_actions_links' ); - if ( ! has_filter( $hook, $callback ) ) { - add_filter( $hook, $callback, 20, 2 ); - } - } - } - - /** - * Extend the plugin action links. - */ - public static function extend_plugin_action_links() { - $filenames = static::get_plugin_filename(); - if ( ! is_array( $filenames ) ) { - $filenames = array( $filenames ); - } - - self::filter_action_links( $filenames ); - } - - /** - * Extend the Jetpack plugin action links. - */ - public static function extend_core_plugin_action_links() { - $filenames = self::JETPACK_PLUGIN_FILENAME; - - self::filter_action_links( $filenames ); - } - - /** - * Install and activate the standalone plugin in the case it's missing. - * - * @return boolean|WP_Error - */ - public static function install_and_activate_standalone() { - /** - * Check for the presence of the standalone plugin, ignoring Jetpack presence. - * - * If the standalone plugin is not installed and the user can install plugins, proceed with the installation. - */ - if ( ! static::is_plugin_installed() ) { - /** - * Check for permissions - */ - if ( ! current_user_can( 'install_plugins' ) ) { - return new WP_Error( 'not_allowed', __( 'You are not allowed to install plugins on this site.', 'jetpack-my-jetpack' ) ); - } - - /** - * Install the plugin - */ - $installed = Plugins_Installer::install_plugin( static::get_plugin_slug() ); - if ( is_wp_error( $installed ) ) { - return $installed; - } - } - - /** - * Activate the installed plugin - */ - $result = static::activate_plugin(); - - if ( is_wp_error( $result ) ) { - return $result; - } - - return true; - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-protect.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-protect.php deleted file mode 100644 index ecd0d892..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-protect.php +++ /dev/null @@ -1,290 +0,0 @@ - 2 ), null, 'wpcom' ); - - if ( 200 !== wp_remote_retrieve_response_code( $response ) ) { - return new WP_Error( 'scan_state_fetch_failed' ); - } - - $body = wp_remote_retrieve_body( $response ); - $status = json_decode( $body ); - return $status; - } - - /** - * Get the product's available tiers - * - * @return string[] Slugs of the available tiers - */ - public static function get_tiers() { - return array( - self::UPGRADED_TIER_SLUG, - self::FREE_TIER_SLUG, - ); - } - - /** - * Get the internationalized comparison of free vs upgraded features - * - * @return array[] Protect features comparison - */ - public static function get_features_by_tier() { - return array( - array( - 'name' => __( 'Scan for threats and vulnerabilities', 'jetpack-my-jetpack' ), - 'tiers' => array( - self::FREE_TIER_SLUG => array( - 'included' => true, - 'description' => __( 'Check items against database', 'jetpack-my-jetpack' ), - ), - self::UPGRADED_TIER_SLUG => array( - 'included' => true, - 'description' => __( 'Line by line malware scanning', 'jetpack-my-jetpack' ), - ), - ), - ), - array( - 'name' => __( 'Daily automated scans', 'jetpack-my-jetpack' ), - 'tiers' => array( - self::FREE_TIER_SLUG => array( 'included' => true ), - self::UPGRADED_TIER_SLUG => array( - 'included' => true, - 'description' => __( 'Plus on-demand manual scans', 'jetpack-my-jetpack' ), - ), - ), - ), - array( - 'name' => __( 'Web Application Firewall', 'jetpack-my-jetpack' ), - 'tiers' => array( - self::FREE_TIER_SLUG => array( - 'included' => false, - 'description' => __( 'Manual rules only', 'jetpack-my-jetpack' ), - ), - self::UPGRADED_TIER_SLUG => array( - 'included' => true, - 'description' => __( 'Automatic protection and rule updates', 'jetpack-my-jetpack' ), - ), - ), - ), - array( - 'name' => __( 'Brute force protection', 'jetpack-my-jetpack' ), - 'tiers' => array( - self::FREE_TIER_SLUG => array( 'included' => true ), - self::UPGRADED_TIER_SLUG => array( 'included' => true ), - ), - ), - array( - 'name' => __( 'Access to scan on Cloud', 'jetpack-my-jetpack' ), - 'tiers' => array( - self::FREE_TIER_SLUG => array( 'included' => false ), - self::UPGRADED_TIER_SLUG => array( 'included' => true ), - ), - ), - array( - 'name' => __( 'One-click auto fixes', 'jetpack-my-jetpack' ), - 'tiers' => array( - self::FREE_TIER_SLUG => array( 'included' => false ), - self::UPGRADED_TIER_SLUG => array( 'included' => true ), - ), - ), - array( - 'name' => __( 'Notifications', 'jetpack-my-jetpack' ), - 'tiers' => array( - self::FREE_TIER_SLUG => array( 'included' => false ), - self::UPGRADED_TIER_SLUG => array( 'included' => true ), - ), - ), - array( - 'name' => __( 'Severity labels', 'jetpack-my-jetpack' ), - 'tiers' => array( - self::FREE_TIER_SLUG => array( 'included' => false ), - self::UPGRADED_TIER_SLUG => array( 'included' => true ), - ), - ), - ); - } - - /** - * Get the product pricing details - * - * @return array Pricing details - */ - public static function get_pricing_for_ui() { - return array( - 'tiers' => array( - self::FREE_TIER_SLUG => array( - 'available' => true, - 'is_free' => true, - ), - self::UPGRADED_TIER_SLUG => array_merge( - array( - 'available' => true, - 'wpcom_product_slug' => self::UPGRADED_TIER_PRODUCT_SLUG, - ), - Wpcom_Products::get_product_pricing( self::UPGRADED_TIER_PRODUCT_SLUG ) - ), - ), - ); - } - - /** - * Checks if the site has a paid plan for the product - * - * @return bool - */ - public static function has_paid_plan_for_product() { - $scan_data = static::get_state_from_wpcom(); - if ( is_wp_error( $scan_data ) ) { - return false; - } - return is_object( $scan_data ) && isset( $scan_data->state ) && 'unavailable' !== $scan_data->state; - } - - /** - * Get the URL the user is taken after purchasing the product through the checkout - * - * @return ?string - */ - public static function get_post_checkout_url() { - return self::get_manage_url(); - } - - /** - * Get the URL where the user manages the product - * - * @return ?string - */ - public static function get_manage_url() { - return admin_url( 'admin.php?page=jetpack-protect' ); - } - - /** - * Return product bundles list - * that supports the product. - * - * @return array Products bundle list. - */ - public static function is_upgradable_by_bundle() { - return array( 'security' ); - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-scan.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-scan.php deleted file mode 100644 index 52058f17..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-scan.php +++ /dev/null @@ -1,231 +0,0 @@ - true, - 'wpcom_product_slug' => static::get_wpcom_product_slug(), - ), - Wpcom_Products::get_product_pricing( static::get_wpcom_product_slug() ) - ); - } - - /** - * Get the WPCOM product slug used to make the purchase - * - * @return ?string - */ - public static function get_wpcom_product_slug() { - return 'jetpack_scan'; - } - - /** - * Hits the wpcom api to check scan status. - * - * @todo Maybe add caching. - * - * @return Object|WP_Error - */ - private static function get_state_from_wpcom() { - static $status = null; - - if ( $status !== null ) { - return $status; - } - - $site_id = Jetpack_Options::get_option( 'id' ); - - $response = Client::wpcom_json_api_request_as_blog( sprintf( '/sites/%d/scan', $site_id ) . '?force=wpcom', '2', array( 'timeout' => 2 ), null, 'wpcom' ); - - if ( 200 !== wp_remote_retrieve_response_code( $response ) ) { - return new WP_Error( 'scan_state_fetch_failed' ); - } - - $body = wp_remote_retrieve_body( $response ); - $status = json_decode( $body ); - return $status; - } - - /** - * Checks whether the current plan (or purchases) of the site already supports the product - * - * @return boolean - */ - public static function has_required_plan() { - $scan_data = static::get_state_from_wpcom(); - if ( is_wp_error( $scan_data ) ) { - return false; - } - return is_object( $scan_data ) && isset( $scan_data->state ) && 'unavailable' !== $scan_data->state; - } - - /** - * Checks whether the Product is active - * - * Scan is not actually a module. Activation takes place on WPCOM. So lets consider it active if jetpack is active and has the plan. - * - * @return boolean - */ - public static function is_active() { - return static::is_jetpack_plugin_active() && static::has_required_plan(); - } - - /** - * Activates the product by installing and activating its plugin - * - * @param bool|WP_Error $current_result Is the result of the top level activation actions. You probably won't do anything if it is an WP_Error. - * @return boolean|\WP_Error - */ - public static function do_product_specific_activation( $current_result ) { - - $product_activation = parent::do_product_specific_activation( $current_result ); - - if ( is_wp_error( $product_activation ) && 'module_activation_failed' === $product_activation->get_error_code() ) { - // Scan is not a module. There's nothing in the plugin to be activated, so it's ok to fail to activate the module. - $product_activation = true; - } - - return $product_activation; - } - - /** - * Checks whether the Jetpack module is active - * - * Scan is not a module. Nothing needs to be active. Let's always consider it active. - * - * @return bool - */ - public static function is_module_active() { - return true; - } - - /** - * Return product bundles list - * that supports the product. - * - * @return boolean|array Products bundle list. - */ - public static function is_upgradable_by_bundle() { - return array( 'security' ); - } - - /** - * Get the URL the user is taken after activating the product - * - * @return ?string - */ - public static function get_post_activation_url() { - return ''; // stay in My Jetpack page. - } - - /** - * Get the URL where the user manages the product - * - * @return ?string - */ - public static function get_manage_url() { - return Redirect::get_url( 'my-jetpack-manage-scan' ); - } - - /** - * Get the URL where the user should be redirected after checkout - */ - public static function get_post_checkout_url() { - if ( static::is_jetpack_plugin_active() ) { - return 'admin.php?page=jetpack#/recommendations'; - } - - // If Jetpack is not active, it means that the user has another standalone plugin active - // and it follows the `Protect` plugin flow instead of `Scan` so for now it would be safe - // to return null and let the user go back to the My Jetpack page. - return null; - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-search-stats.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-search-stats.php deleted file mode 100644 index 8d363a3b..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-search-stats.php +++ /dev/null @@ -1,150 +0,0 @@ - true, - 'exclude_from_search' => false, - ) - ); - $indexable_status_array = get_post_stati( - array( - 'public' => true, - 'exclude_from_search' => false, - ) - ); - $raw_posts_counts = static::get_raw_post_type_breakdown(); - if ( ! $raw_posts_counts || is_wp_error( $raw_posts_counts ) ) { - return array(); - } - $posts_counts = static::get_post_type_breakdown_with( $raw_posts_counts, $indexable_post_types, $indexable_status_array ); - - return $posts_counts; - } - - /** - * Calculate breakdown of post types with passed in indexable post types and statuses. - * The function is going to be used from WPCOM as well for consistency. - * - * @param array $raw_posts_counts Array of post types with counts as value. - * @param array $indexable_post_types Array of indexable post types. - * @param array $indexable_status_array Array of indexable post statuses. - */ - public static function get_post_type_breakdown_with( $raw_posts_counts, $indexable_post_types, $indexable_status_array ) { - $posts_counts = array(); - foreach ( $raw_posts_counts as $row ) { - // ignore if status is not public. - if ( ! in_array( $row['post_status'], $indexable_status_array, true ) ) { - continue; - } - // ignore if post type is in excluded post types. - if ( in_array( $row['post_type'], self::EXCLUDED_POST_TYPES, true ) ) { - continue; - } - // ignore if post type is not public and is not explicitly included. - if ( ! in_array( $row['post_type'], $indexable_post_types, true ) && - ! in_array( $row['post_type'], self::DO_NOT_EXCLUDE_POST_TYPES, true ) - ) { - continue; - } - // add up post type counts of potentially multiple post_status. - if ( ! isset( $posts_counts[ $row['post_type'] ] ) ) { - $posts_counts[ $row['post_type'] ] = 0; - } - $posts_counts[ $row['post_type'] ] += intval( $row['num_posts'] ); - } - - arsort( $posts_counts, SORT_NUMERIC ); - return $posts_counts; - } - - /** - * Get raw post type breakdown from the database. - */ - protected static function get_raw_post_type_breakdown() { - global $wpdb; - - $results = wp_cache_get( self::POST_TYPE_BREAKDOWN_CACHE_KEY, self::CACHE_GROUP ); - if ( false !== $results ) { - return $results; - } - - $query = "SELECT post_type, post_status, COUNT( * ) AS num_posts - FROM {$wpdb->posts} - WHERE post_password = '' - GROUP BY post_type, post_status"; - - // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared, WordPress.DB.DirectDatabaseQuery.DirectQuery - $results = $wpdb->get_results( $query, ARRAY_A ); - wp_cache_set( self::POST_TYPE_BREAKDOWN_CACHE_KEY, $results, self::CACHE_GROUP, self::CACHE_EXPIRY ); - return $results; - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-search.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-search.php deleted file mode 100644 index a0b8041b..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-search.php +++ /dev/null @@ -1,339 +0,0 @@ - true, - 'trial_available' => static::has_trial_support(), - 'wpcom_product_slug' => static::get_wpcom_product_slug(), - 'wpcom_free_product_slug' => static::get_wpcom_free_product_slug(), - ), - Wpcom_Products::get_product_pricing( static::get_wpcom_product_slug() ) - ); - - $record_count = intval( Search_Stats::estimate_count() ); - $search_pricing = static::get_pricing_from_wpcom( $record_count ); - - if ( is_wp_error( $search_pricing ) ) { - return $pricing; - } - - $pricing['estimated_record_count'] = $record_count; - - return array_merge( $pricing, $search_pricing ); - } - - /** - * Get the URL the user is taken after purchasing the product through the checkout - * - * @return ?string - */ - public static function get_post_checkout_url() { - return self::get_manage_url(); - } - - /** - * Get the WPCOM product slug used to make the purchase - * - * @return ?string - */ - public static function get_wpcom_product_slug() { - return 'jetpack_search'; - } - - /** - * Get the WPCOM free product slug - * - * @return ?string - */ - public static function get_wpcom_free_product_slug() { - return 'jetpack_search_free'; - } - - /** - * Returns true if the new_pricing_202208 is set to not empty in URL for testing purpose, or it's active. - */ - public static function is_new_pricing_202208() { - // phpcs:ignore WordPress.Security.NonceVerification.Recommended, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized, WordPress.Security.ValidatedSanitizedInput.MissingUnslash - if ( isset( $_GET['new_pricing_202208'] ) && $_GET['new_pricing_202208'] ) { - return true; - } - - $record_count = intval( Search_Stats::estimate_count() ); - $search_pricing = static::get_pricing_from_wpcom( $record_count ); - if ( is_wp_error( $search_pricing ) ) { - return false; - } - - return '202208' === $search_pricing['pricing_version']; - } - - /** - * Override status to `needs_purchase_or_free` when status is `needs_purchase`. - */ - public static function get_status() { - $status = parent::get_status(); - return $status; - } - - /** - * Use centralized Search pricing API. - * - * The function is also used by the search package, as a result it could be called before site connection - i.e. blog token might not be available. - * - * @param int $record_count Record count to estimate pricing. - * - * @return array|WP_Error - */ - public static function get_pricing_from_wpcom( $record_count ) { - static $pricings = array(); - - if ( isset( $pricings[ $record_count ] ) ) { - return $pricings[ $record_count ]; - } - - if ( defined( 'IS_WPCOM' ) && IS_WPCOM ) { - // For simple sites fetch the response directly. - $response = Client::wpcom_json_api_request_as_blog( - sprintf( '/jetpack-search/pricing?record_count=%1$d&locale=%2$s', $record_count, get_user_locale() ), - '2', - array( 'timeout' => 5 ), - null, - 'wpcom' - ); - } else { - // For non-simple sites we have to use the wp_remote_get, as connection might not be available. - $response = wp_remote_get( - sprintf( Constants::get_constant( 'JETPACK__WPCOM_JSON_API_BASE' ) . '/wpcom/v2/jetpack-search/pricing?record_count=%1$d&locale=%2$s', $record_count, get_user_locale() ), - array( 'timeout' => 5 ) - ); - } - - if ( is_wp_error( $response ) || 200 !== wp_remote_retrieve_response_code( $response ) ) { - return new WP_Error( 'search_pricing_fetch_failed' ); - } - - $body = wp_remote_retrieve_body( $response ); - $pricings[ $record_count ] = json_decode( $body, true ); - return $pricings[ $record_count ]; - } - - /** - * Hits the wpcom api to check Search status. - * - * @todo Maybe add caching. - * - * @return Object|WP_Error - */ - private static function get_state_from_wpcom() { - static $status = null; - - if ( $status !== null ) { - return $status; - } - - $blog_id = Jetpack_Options::get_option( 'id' ); - - $response = Client::wpcom_json_api_request_as_blog( - '/sites/' . $blog_id . '/jetpack-search/plan', - '2', - array( 'timeout' => 5 ), - null, - 'wpcom' - ); - - if ( is_wp_error( $response ) || 200 !== wp_remote_retrieve_response_code( $response ) ) { - return new WP_Error( 'search_state_fetch_failed' ); - } - - $body = wp_remote_retrieve_body( $response ); - $status = json_decode( $body ); - return $status; - } - - /** - * Checks whether the product supports trial or not - * - * Returns true if it supports. Return false otherwise. - * - * Free products will always return false. - * - * @return boolean - */ - public static function has_trial_support() { - return static::is_new_pricing_202208(); - } - - /** - * Checks whether the current plan of the site already supports the product - * - * Returns true if it supports. Return false if a purchase is still required. - * - * Free products will always return true. - * - * @return boolean - */ - public static function has_required_plan() { - $search_state = static::get_state_from_wpcom(); - return ! empty( $search_state->supports_search ) || ! empty( $search_state->supports_instant_search ); - } - - /** - * Activates the product. Try to enable instant search after the Search module was enabled. - * - * @param bool|WP_Error $product_activation Is the result of the top level activation actions. You probably won't do anything if it is an WP_Error. - * @return bool|WP_Error - */ - public static function do_product_specific_activation( $product_activation ) { - $product_activation = parent::do_product_specific_activation( $product_activation ); - if ( is_wp_error( $product_activation ) ) { - return $product_activation; - } - - if ( class_exists( 'Automattic\Jetpack\Search\Module_Control' ) ) { - ( new Search_Module_Control() )->enable_instant_search(); - } - - // we don't want to change the success of the activation if we fail to activate instant search. That's not mandatory. - return $product_activation; - } - - /** - * Get the URL the user is taken after activating the product - * - * @return ?string - */ - public static function get_post_activation_url() { - return ''; // stay in My Jetpack page or continue the purchase flow if needed. - } - - /** - * Get the URL where the user manages the product - * - * @return ?string - */ - public static function get_manage_url() { - return admin_url( 'admin.php?page=jetpack-search' ); - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-security.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-security.php deleted file mode 100644 index 866899cb..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-security.php +++ /dev/null @@ -1,212 +0,0 @@ - true, - 'wpcom_product_slug' => static::get_wpcom_product_slug(), - ), - Wpcom_Products::get_product_pricing( static::get_wpcom_product_slug() ) - ); - } - - /** - * Get the WPCOM product slug used to make the purchase - * - * @return ?string - */ - public static function get_wpcom_product_slug() { - return 'jetpack_security_t1_yearly'; - } - - /** - * Checks whether the Jetpack module is active - * - * This is a bundle and not a product. We should not use this information for anything - * - * @return bool - */ - public static function is_module_active() { - return false; - } - - /** - * Activates the product by installing and activating its plugin - * - * @param bool|WP_Error $current_result Is the result of the top level activation actions. You probably won't do anything if it is an WP_Error. - * @return boolean|\WP_Error - */ - public static function do_product_specific_activation( $current_result ) { - - $product_activation = parent::do_product_specific_activation( $current_result ); - - if ( is_wp_error( $product_activation ) && 'module_activation_failed' === $product_activation->get_error_code() ) { - // A bundle is not a module. There's nothing in the plugin to be activated, so it's ok to fail to activate the module. - $product_activation = true; - } - - // At this point, Jetpack plugin is installed. Let's activate each individual product. - $activation = Anti_Spam::activate(); - if ( is_wp_error( $activation ) ) { - return $activation; - } - - $activation = Backup::activate(); - if ( is_wp_error( $activation ) ) { - return $activation; - } - - $activation = Scan::activate(); - if ( is_wp_error( $activation ) ) { - return $activation; - } - - return $activation; - } - - /** - * Checks whether the Product is active - * - * Security is a bundle and not a module. Activation takes place on WPCOM. So lets consider it active if jetpack is active and has the plan. - * - * @return boolean - */ - public static function is_active() { - return static::is_jetpack_plugin_active() && static::has_required_plan(); - } - - /** - * Checks whether the current plan (or purchases) of the site already supports the product - * - * @return boolean - */ - public static function has_required_plan() { - $purchases_data = Wpcom_Products::get_site_current_purchases(); - if ( is_wp_error( $purchases_data ) ) { - return false; - } - if ( is_array( $purchases_data ) && ! empty( $purchases_data ) ) { - foreach ( $purchases_data as $purchase ) { - if ( - str_starts_with( $purchase->product_slug, 'jetpack_security' ) || - str_starts_with( $purchase->product_slug, 'jetpack_complete' ) - ) { - return true; - } - } - } - return false; - } - - /** - * Checks whether product is a bundle. - * - * @return boolean True - */ - public static function is_bundle_product() { - return true; - } - - /** - * Return all the products it contains. - * - * @return Array Product slugs - */ - public static function get_supported_products() { - return array( 'backup', 'scan', 'anti-spam' ); - } - - /** - * Get the URL where the user manages the product - * - * @return ?string - */ - public static function get_manage_url() { - return ''; - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-social.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-social.php deleted file mode 100644 index 349a3637..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-social.php +++ /dev/null @@ -1,183 +0,0 @@ - true, - 'wpcom_product_slug' => static::get_wpcom_product_slug(), - ), - Wpcom_Products::get_product_pricing( static::get_wpcom_product_slug() ) - ); - } - - /** - * Get the URL the user is taken after purchasing the product through the checkout - * - * @return ?string - */ - public static function get_post_checkout_url() { - return self::get_manage_url(); - } - - /** - * Get the WPCOM product slug used to make the purchase - * - * @return string - */ - public static function get_wpcom_product_slug() { - return 'jetpack_social_basic_yearly'; - } - - /** - * Checks whether the current plan (or purchases) of the site already supports the product - * - * @return boolean - */ - public static function has_required_plan() { - // For atomic sites, do a feature check to see if the republicize feature is available - // This feature is available by default on all Jetpack sites - if ( ( new Host() )->is_woa_site() ) { - return static::does_site_have_feature( 'republicize' ); - } - - $purchases_data = Wpcom_Products::get_site_current_purchases(); - if ( is_wp_error( $purchases_data ) ) { - return false; - } - if ( is_array( $purchases_data ) && ! empty( $purchases_data ) ) { - foreach ( $purchases_data as $purchase ) { - // Social is available as standalone bundle and as part of the Complete plan. - if ( strpos( $purchase->product_slug, 'jetpack_social' ) !== false || str_starts_with( $purchase->product_slug, 'jetpack_complete' ) ) { - return true; - } - } - } - return false; - } - - /** - * Get the URL where the user manages the product. - * - * If the standalone plugin is active, - * it will redirect to the standalone plugin settings page. - * Otherwise, it will redirect to the Jetpack settings page. - * - * @return string - */ - public static function get_manage_url() { - if ( static::is_standalone_plugin_active() ) { - return admin_url( 'admin.php?page=jetpack-social' ); - } - - return admin_url( 'admin.php?page=jetpack#/settings?term=publicize' ); - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-starter.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-starter.php deleted file mode 100644 index 700a07c2..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-starter.php +++ /dev/null @@ -1,203 +0,0 @@ - true, - 'wpcom_product_slug' => static::get_wpcom_product_slug(), - ), - Wpcom_Products::get_product_pricing( static::get_wpcom_product_slug() ) - ); - } - - /** - * Get the WPCOM product slug used to make the purchase - * - * @return ?string - */ - public static function get_wpcom_product_slug() { - return 'jetpack_starter_yearly'; - } - - /** - * Checks whether the Jetpack module is active - * - * This is a bundle and not a product. We should not use this information for anything - * - * @return bool - */ - public static function is_module_active() { - return false; - } - - /** - * Activates the product by installing and activating its plugin - * - * @param bool|WP_Error $current_result Is the result of the top level activation actions. You probably won't do anything if it is an WP_Error. - * @return boolean|\WP_Error - */ - public static function do_product_specific_activation( $current_result ) { - - $product_activation = parent::do_product_specific_activation( $current_result ); - - if ( is_wp_error( $product_activation ) && 'module_activation_failed' === $product_activation->get_error_code() ) { - // A bundle is not a module. There's nothing in the plugin to be activated, so it's ok to fail to activate the module. - $product_activation = true; - } - - // At this point, Jetpack plugin is installed. Let's activate each individual product. - $activation = Anti_Spam::activate(); - if ( is_wp_error( $activation ) ) { - return $activation; - } - - $activation = Backup::activate(); - if ( is_wp_error( $activation ) ) { - return $activation; - } - - return $activation; - } - - /** - * Checks whether the Product is active - * - * Jetpack Starter is a bundle and not a module. Activation takes place on WPCOM. So lets consider it active if jetpack is active and has the plan. - * - * @return boolean - */ - public static function is_active() { - return static::is_jetpack_plugin_active() && static::has_required_plan(); - } - - /** - * Checks whether the current plan (or purchases) of the site already supports the product - * - * @return boolean - */ - public static function has_required_plan() { - $purchases_data = Wpcom_Products::get_site_current_purchases(); - if ( is_wp_error( $purchases_data ) ) { - return false; - } - if ( is_array( $purchases_data ) && ! empty( $purchases_data ) ) { - foreach ( $purchases_data as $purchase ) { - if ( str_starts_with( $purchase->product_slug, 'jetpack_starter' ) ) { - return true; - } - } - } - return false; - } - - /** - * Checks whether product is a bundle. - * - * @return boolean True - */ - public static function is_bundle_product() { - return true; - } - - /** - * Return all the products it contains. - * - * @return Array Product slugs - */ - public static function get_supported_products() { - return array( 'backup', 'anti-spam' ); - } - - /** - * Get the URL where the user manages the product - * - * @return ?string - */ - public static function get_manage_url() { - return ''; - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-stats.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-stats.php deleted file mode 100644 index 63a818db..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-stats.php +++ /dev/null @@ -1,302 +0,0 @@ - true, - 'wpcom_product_slug' => static::get_wpcom_product_slug(), - ), - Wpcom_Products::get_product_pricing( static::get_wpcom_product_slug() ) - ); - } - - /** - * Get the WPCOM product slug used to make the purchase - * - * @return ?string - */ - public static function get_wpcom_product_slug() { - return 'jetpack_stats_yearly'; - } - - /** - * Get the WPCOM Pay Whatever You Want product slug used to make the purchase - * - * @return ?string - */ - public static function get_wpcom_pwyw_product_slug() { - return 'jetpack_stats_pwyw_yearly'; - } - - /** - * Get the WPCOM free product slug - * - * @return ?string - */ - public static function get_wpcom_free_product_slug() { - return 'jetpack_stats_free_yearly'; - } - - /** - * Gets the 'status' of the Stats product - * - * @return string - */ - public static function get_status() { - $status = parent::get_status(); - if ( 'module_disabled' === $status && ! Initializer::is_registered() ) { - // If the site has never been connected before, show the "Learn more" CTA, - // that points to the add Stats product interstitial. - $status = 'needs_purchase_or_free'; - } - return $status; - } - /** - * Checks whether the product can be upgraded to a different product. - * Stats Commercial plan (highest tier) & Jetpack Complete are not upgradable. - * Also we don't push PWYW users to upgrade. - * - * @return boolean - */ - public static function is_upgradable() { - // For now, atomic sites with stats are not in a position to upgrade - if ( ( new Host() )->is_woa_site() ) { - return false; - } - - $purchases_data = Wpcom_Products::get_site_current_purchases(); - if ( ! is_wp_error( $purchases_data ) && is_array( $purchases_data ) && ! empty( $purchases_data ) ) { - foreach ( $purchases_data as $purchase ) { - // Jetpack complete includes Stats commercial & cannot be upgraded - if ( str_starts_with( $purchase->product_slug, 'jetpack_complete' ) ) { - return false; - } elseif ( - // Stats commercial purchased with highest tier cannot be upgraded. - in_array( - $purchase->product_slug, - array( 'jetpack_stats_yearly', 'jetpack_stats_monthly', 'jetpack_stats_bi_yearly' ), - true - ) && $purchase->current_price_tier_slug === 'more_than_1m_views' - ) { - return false; - } elseif ( - // If user already has Stats PWYW, we won't push them to upgrade. - $purchase->product_slug === 'jetpack_stats_pwyw_yearly' - ) { - return false; - } - } - } - return true; - } - - /** - * Checks if the site has a paid plan that supports this product - * - * @return boolean - */ - public static function has_paid_plan_for_product() { - $purchases_data = Wpcom_Products::get_site_current_purchases(); - if ( is_wp_error( $purchases_data ) ) { - return false; - } - if ( is_array( $purchases_data ) && ! empty( $purchases_data ) ) { - foreach ( $purchases_data as $purchase ) { - // Stats is available as standalone product and as part of the Complete plan. - if ( strpos( $purchase->product_slug, 'jetpack_stats' ) !== false || str_starts_with( $purchase->product_slug, 'jetpack_complete' ) ) { - return true; - } - } - } - return false; - } - - /** - * Returns a productType parameter for an upgrade URL, determining whether - * to show the PWYW upgrade interstitial or commercial upgrade interstitial. - * - * @return string - */ - public static function get_url_product_type() { - $purchases_data = Wpcom_Products::get_site_current_purchases(); - $is_commercial_site = Initializer::is_commercial_site(); - if ( is_wp_error( $purchases_data ) ) { - return $is_commercial_site ? '&productType=commercial' : ''; - } - if ( $is_commercial_site ) { - return '&productType=commercial'; - } - if ( is_array( $purchases_data ) && ! empty( $purchases_data ) ) { - foreach ( $purchases_data as $purchase ) { - if ( - str_starts_with( $purchase->product_slug, static::get_wpcom_free_product_slug() ) - ) { - return '&productType=personal'; - } elseif ( - in_array( - $purchase->product_slug, - array( 'jetpack_stats_yearly', 'jetpack_stats_monthly', 'jetpack_stats_bi_yearly' ), - true - ) && - ! empty( $purchase->current_price_tier_slug ) - ) { - return '&productType=commercial'; - } - } - } - return ''; - } - - /** - * Checks whether the product supports trial or not. - * Since Jetpack Stats has been widely available as a free product in the past, it "supports" a trial. - * - * @return boolean - */ - public static function has_trial_support() { - return true; - } - - /** - * Get the WordPress.com URL for purchasing Jetpack Stats for the current site. - * - * @return ?string - */ - public static function get_purchase_url() { - // The returning URL could be customized by changing the `redirect_uri` param with relative path. - return sprintf( - '%s#!/stats/purchase/%d?from=jetpack-my-jetpack%s&redirect_uri=%s', - admin_url( 'admin.php?page=stats' ), - Jetpack_Options::get_option( 'id' ), - static::get_url_product_type(), - rawurlencode( 'admin.php?page=stats' ) - ); - } - - /** - * Get the URL where the user manages the product - * - * @return ?string - */ - public static function get_manage_url() { - return admin_url( 'admin.php?page=stats' ); - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-videopress.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-videopress.php deleted file mode 100644 index 8962d0c9..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-videopress.php +++ /dev/null @@ -1,177 +0,0 @@ - true, - 'wpcom_product_slug' => static::get_wpcom_product_slug(), - ), - Wpcom_Products::get_product_pricing( static::get_wpcom_product_slug() ) - ); - } - - /** - * Get the URL the user is taken after purchasing the product through the checkout - * - * @return ?string - */ - public static function get_post_checkout_url() { - return self::get_manage_url(); - } - - /** - * Get the WPCOM product slug used to make the purchase - * - * @return ?string - */ - public static function get_wpcom_product_slug() { - return 'jetpack_videopress'; - } - - /** - * Get the URL the user is taken after activating the product - * - * @return ?string - */ - public static function get_post_activation_url() { - return ''; // stay in My Jetpack page. - } - - /** - * Get the URL where the user manages the product - * - * @return ?string - */ - public static function get_manage_url() { - if ( method_exists( 'Automattic\Jetpack\VideoPress\Initializer', 'should_initialize_admin_ui' ) && \Automattic\Jetpack\VideoPress\Initializer::should_initialize_admin_ui() ) { - return \Automattic\Jetpack\VideoPress\Admin_UI::get_admin_page_url(); - } else { - return admin_url( 'admin.php?page=jetpack#/settings?term=videopress' ); - } - } - - /** - * Checks whether the current plan (or purchases) of the site already supports the product - * - * @return boolean - */ - public static function has_required_plan() { - return static::does_site_have_feature( 'videopress' ); - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-password-checker/CHANGELOG.md b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-password-checker/CHANGELOG.md deleted file mode 100644 index 9867f0d7..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-password-checker/CHANGELOG.md +++ /dev/null @@ -1,143 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file. - -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) -and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - -## [0.3.1] - 2024-03-14 -### Changed -- Internal updates. - -## [0.3.0] - 2023-11-20 -### Changed -- Updated required PHP version to >= 7.0. [#34192] - -## [0.2.14] - 2023-08-23 -### Changed -- Updated package dependencies. [#32605] - -## [0.2.13] - 2023-04-10 -### Added -- Add Jetpack Autoloader package suggestion. [#29988] - -## [0.2.12] - 2023-03-20 -### Changed -- Updated package dependencies. [#29480] - -## [0.2.11] - 2023-02-20 -### Changed -- Minor internal updates. - -## [0.2.10] - 2023-01-11 -### Changed -- Updated package dependencies. - -## [0.2.9] - 2022-12-02 -### Changed -- Updated package dependencies. [#27688] - -## [0.2.8] - 2022-11-22 -### Changed -- Updated package dependencies. [#27043] - -## [0.2.7] - 2022-09-20 -### Changed -- Updated package dependencies. - -## [0.2.6] - 2022-07-26 -### Changed -- Updated package dependencies. [#25158] - -## [0.2.5] - 2022-06-21 -### Changed -- Renaming master to trunk. [#24661] - -## [0.2.4] - 2022-04-26 -### Changed -- Updated package dependencies. - -## [0.2.3] - 2022-03-29 -### Changed -- Microperformance: Use === null instead of is_null - -## [0.2.2] - 2022-01-25 -### Changed -- Updated package dependencies. - -## [0.2.1] - 2022-01-18 -### Changed -- Updated package dependencies. - -## [0.2.0] - 2022-01-04 -### Changed -- Switch to pcov for code coverage. -- Updated package dependencies -- Updated package textdomain from `jetpack` to `jetpack-password-checker`. - -## [0.1.8] - 2021-12-14 -### Changed -- Updated package dependencies. - -## [0.1.7] - 2021-11-02 -### Changed -- Set `convertDeprecationsToExceptions` true in PHPUnit config. -- Update PHPUnit configs to include just what needs coverage rather than include everything then try to exclude stuff that doesn't. - -## [0.1.6] - 2021-10-13 -### Changed -- Updated package dependencies. - -## [0.1.5] - 2021-10-12 -### Changed -- Updated package dependencies - -## [0.1.4] - 2021-09-28 -### Changed -- Updated package dependencies. - -## [0.1.3] - 2021-08-30 -### Changed -- Run composer update on test-php command instead of phpunit -- Tests: update PHPUnit polyfills dependency (yoast/phpunit-polyfills). - -## [0.1.2] - 2021-05-25 -### Fixed -- Avoid checking in vendor directory. - -## [0.1.1] - 2021-04-27 -### Changed -- Updated package dependencies. - -## 0.1.0 - 2021-03-30 -### Added -- Initial release. - -### Fixed -- Use `composer update` rather than `install` in scripts, as composer.lock isn't checked in. - -[0.3.1]: https://github.com/Automattic/jetpack-password-checker/compare/v0.3.0...v0.3.1 -[0.3.0]: https://github.com/Automattic/jetpack-password-checker/compare/v0.2.14...v0.3.0 -[0.2.14]: https://github.com/Automattic/jetpack-password-checker/compare/v0.2.13...v0.2.14 -[0.2.13]: https://github.com/Automattic/jetpack-password-checker/compare/v0.2.12...v0.2.13 -[0.2.12]: https://github.com/Automattic/jetpack-password-checker/compare/v0.2.11...v0.2.12 -[0.2.11]: https://github.com/Automattic/jetpack-password-checker/compare/v0.2.10...v0.2.11 -[0.2.10]: https://github.com/Automattic/jetpack-password-checker/compare/v0.2.9...v0.2.10 -[0.2.9]: https://github.com/Automattic/jetpack-password-checker/compare/v0.2.8...v0.2.9 -[0.2.8]: https://github.com/Automattic/jetpack-password-checker/compare/v0.2.7...v0.2.8 -[0.2.7]: https://github.com/Automattic/jetpack-password-checker/compare/v0.2.6...v0.2.7 -[0.2.6]: https://github.com/Automattic/jetpack-password-checker/compare/v0.2.5...v0.2.6 -[0.2.5]: https://github.com/Automattic/jetpack-password-checker/compare/v0.2.4...v0.2.5 -[0.2.4]: https://github.com/Automattic/jetpack-password-checker/compare/v0.2.3...v0.2.4 -[0.2.3]: https://github.com/Automattic/jetpack-password-checker/compare/v0.2.2...v0.2.3 -[0.2.2]: https://github.com/Automattic/jetpack-password-checker/compare/v0.2.1...v0.2.2 -[0.2.1]: https://github.com/Automattic/jetpack-password-checker/compare/v0.2.0...v0.2.1 -[0.2.0]: https://github.com/Automattic/jetpack-password-checker/compare/v0.1.8...v0.2.0 -[0.1.8]: https://github.com/Automattic/jetpack-password-checker/compare/v0.1.7...v0.1.8 -[0.1.7]: https://github.com/Automattic/jetpack-password-checker/compare/v0.1.6...v0.1.7 -[0.1.6]: https://github.com/Automattic/jetpack-password-checker/compare/v0.1.5...v0.1.6 -[0.1.5]: https://github.com/Automattic/jetpack-password-checker/compare/v0.1.4...v0.1.5 -[0.1.4]: https://github.com/Automattic/jetpack-password-checker/compare/v0.1.3...v0.1.4 -[0.1.3]: https://github.com/Automattic/jetpack-password-checker/compare/v0.1.2...v0.1.3 -[0.1.2]: https://github.com/Automattic/jetpack-password-checker/compare/v0.1.1...v0.1.2 -[0.1.1]: https://github.com/Automattic/jetpack-password-checker/compare/v0.1.0...v0.1.1 diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-password-checker/LICENSE.txt b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-password-checker/LICENSE.txt deleted file mode 100644 index e82774c1..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-password-checker/LICENSE.txt +++ /dev/null @@ -1,357 +0,0 @@ -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - - -=================================== - - -GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - -Copyright (C) 1989, 1991 Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -Everyone is permitted to copy and distribute verbatim copies -of this license document, but changing it is not allowed. - - Preamble - -The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Lesser General Public License instead.) You can apply it to -your programs, too. - -When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - -To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - -For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - -We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - -Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - -Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - -The precise terms and conditions for copying, distribution and -modification follow. - -GNU GENERAL PUBLIC LICENSE -TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - -0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - -1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - -2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - -a) You must cause the modified files to carry prominent notices -stating that you changed the files and the date of any change. - -b) You must cause any work that you distribute or publish, that in -whole or in part contains or is derived from the Program or any -part thereof, to be licensed as a whole at no charge to all third -parties under the terms of this License. - -c) If the modified program normally reads commands interactively -when run, you must cause it, when started running for such -interactive use in the most ordinary way, to print or display an -announcement including an appropriate copyright notice and a -notice that there is no warranty (or else, saying that you provide -a warranty) and that users may redistribute the program under -these conditions, and telling the user how to view a copy of this -License. (Exception: if the Program itself is interactive but -does not normally print such an announcement, your work based on -the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - -3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - -a) Accompany it with the complete corresponding machine-readable -source code, which must be distributed under the terms of Sections -1 and 2 above on a medium customarily used for software interchange; or, - -b) Accompany it with a written offer, valid for at least three -years, to give any third party, for a charge no more than your -cost of physically performing source distribution, a complete -machine-readable copy of the corresponding source code, to be -distributed under the terms of Sections 1 and 2 above on a medium -customarily used for software interchange; or, - -c) Accompany it with the information you received as to the offer -to distribute corresponding source code. (This alternative is -allowed only for noncommercial distribution and only if you -received the program in object code or executable form with such -an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - -4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - -5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - -6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - -7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - -8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - -9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - -10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - -11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - -12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - -How to Apply These Terms to Your New Programs - -If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - -To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - -Copyright (C) - -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along -with this program; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - -Gnomovision version 69, Copyright (C) year name of author -Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. -This is free software, and you are welcome to redistribute it -under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - -Yoyodyne, Inc., hereby disclaims all copyright interest in the program -`Gnomovision' (which makes passes at compilers) written by James Hacker. - -, 1 April 1989 -Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-password-checker/SECURITY.md b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-password-checker/SECURITY.md deleted file mode 100644 index 98f48dd1..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-password-checker/SECURITY.md +++ /dev/null @@ -1,47 +0,0 @@ -# Security Policy - -Full details of the Automattic Security Policy can be found on [automattic.com](https://automattic.com/security/). - -## Supported Versions - -Generally, only the latest version of Jetpack and its associated plugins have continued support. If a critical vulnerability is found in the current version of a plugin, we may opt to backport any patches to previous versions. - -## Reporting a Vulnerability - -Our HackerOne program covers the below plugin software, as well as a variety of related projects and infrastructure: - -* [Jetpack](https://jetpack.com/) -* Jetpack Backup -* Jetpack Boost -* Jetpack CRM -* Jetpack Protect -* Jetpack Search -* Jetpack Social -* Jetpack VideoPress - -**For responsible disclosure of security issues and to be eligible for our bug bounty program, please submit your report via the [HackerOne](https://hackerone.com/automattic) portal.** - -Our most critical targets are: - -* Jetpack and the Jetpack composer packages (all within this repo) -* Jetpack.com -- the primary marketing site. -* cloud.jetpack.com -- a management site. -* wordpress.com -- the shared management site for both Jetpack and WordPress.com sites. - -For more targets, see the `In Scope` section on [HackerOne](https://hackerone.com/automattic). - -_Please note that the **WordPress software is a separate entity** from Automattic. Please report vulnerabilities for WordPress through [the WordPress Foundation's HackerOne page](https://hackerone.com/wordpress)._ - -## Guidelines - -We're committed to working with security researchers to resolve the vulnerabilities they discover. You can help us by following these guidelines: - -* Follow [HackerOne's disclosure guidelines](https://www.hackerone.com/disclosure-guidelines). -* Pen-testing Production: - * Please **setup a local environment** instead whenever possible. Most of our code is open source (see above). - * If that's not possible, **limit any data access/modification** to the bare minimum necessary to reproduce a PoC. - * **_Don't_ automate form submissions!** That's very annoying for us, because it adds extra work for the volunteers who manage those systems, and reduces the signal/noise ratio in our communication channels. - * To be eligible for a bounty, all of these guidelines must be followed. -* Be Patient - Give us a reasonable time to correct the issue before you disclose the vulnerability. - -We also expect you to comply with all applicable laws. You're responsible to pay any taxes associated with your bounties. diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-password-checker/composer.json b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-password-checker/composer.json deleted file mode 100644 index 6bcf598d..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-password-checker/composer.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "name": "automattic/jetpack-password-checker", - "description": "Password Checker.", - "type": "jetpack-library", - "license": "GPL-2.0-or-later", - "require": { - "php": ">=7.0" - }, - "require-dev": { - "automattic/jetpack-changelogger": "^4.1.1", - "automattic/wordbless": "@dev", - "yoast/phpunit-polyfills": "1.1.0" - }, - "suggest": { - "automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package." - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "scripts": { - "phpunit": [ - "./vendor/phpunit/phpunit/phpunit --colors=always" - ], - "test-php": [ - "@composer phpunit" - ], - "post-install-cmd": "WorDBless\\Composer\\InstallDropin::copy", - "post-update-cmd": "WorDBless\\Composer\\InstallDropin::copy" - }, - "minimum-stability": "dev", - "prefer-stable": true, - "extra": { - "autotagger": true, - "mirror-repo": "Automattic/jetpack-password-checker", - "textdomain": "jetpack-password-checker", - "changelogger": { - "link-template": "https://github.com/Automattic/jetpack-password-checker/compare/v${old}...v${new}" - }, - "branch-alias": { - "dev-trunk": "0.3.x-dev" - } - }, - "config": { - "allow-plugins": { - "roots/wordpress-core-installer": true - } - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-password-checker/src/class-password-checker.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-password-checker/src/class-password-checker.php deleted file mode 100644 index 79c369c2..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-password-checker/src/class-password-checker.php +++ /dev/null @@ -1,1313 +0,0 @@ -user_id = get_current_user_id(); - } elseif ( is_object( $user ) && isset( $user->ID ) ) { - // Existing user, using their ID. - $this->user_id = $user->ID; - } elseif ( is_object( $user ) ) { - // Newly created user, using existing data. - $this->user = $user; - $this->user_id = 'new_user'; - } else { - $this->user_id = $user; - } - - /** - * Filters the password strength enforcement settings. - * - * You can supply your own passwords that should not be used for authenticating in addition to weak and easy - * to guess strings for each user. For example, you can add passwords from known password databases to avoid - * compromised password usage. - * - * @param array $common_passwords strings that are forbidden for use as passwords. - */ - $this->common_passwords = apply_filters( 'password_checker_common_passwords', $this->common_passwords ); - - /** - * Filters the password strength enforcement settings. - * - * You can modify the minimum password length using this filter. - * - * @param int $minimum_password_length minimum password length. - */ - $this->minimum_password_length = apply_filters( 'password_checker_minimum_password_length', $this->minimum_password_length ); - - /** - * Filters the password strength enforcement settings. - * - * You can modify the minimum entropy bits requirement using this filter. - * - * @param int $minimum_entropy_bits minimum entropy bits requirement. - */ - $this->minimum_entropy_bits = apply_filters( 'password_checker_minimum_entropy_bits', $this->minimum_entropy_bits ); - } - - /** - * Run tests against a password. - * - * @param string $password the password. - * @param bool $required_only only test against required conditions, defaults to false. - * - * @return array an array containing failed and passed test results. - */ - public function test( $password, $required_only = false ) { - // Run the tests. - $results = $this->run_tests( $password, $this->get_tests(), $required_only ); - - // If we've failed on the required tests, return now. - if ( ! empty( $results['failed'] ) ) { - return array( - 'passed' => false, - 'test_results' => $results, - ); - } - - $entropy_bits = $this->calculate_entropy_bits( $password ); - - // If we have failed the entropy bits test, run the regex tests so we can suggest improvements. - if ( $entropy_bits < $this->minimum_entropy_bits ) { - $results['failed']['entropy_bits'] = $entropy_bits; - // Run the tests. - $results = array_merge( $results, $this->run_tests( $password, $this->get_tests( 'preg_match' ) ) ); - } - - return ( array( - 'passed' => empty( $results['failed'] ), - 'test_results' => $results, - ) ); - } - - /** - * Run the tests using the currently set up object values. - * - * @param string $password the password. - * @param array $tests tests to run. - * @param bool $required_only whether to run only required tests. - * - * @return array test results. - */ - public function run_tests( $password, $tests, $required_only = false ) { - $results = array( - 'passed' => array(), - 'failed' => array(), - ); - - foreach ( $tests as $test_type => $section_tests ) { - foreach ( $section_tests as $test_name => $test_data ) { - // Skip non-required tests if required_only param is set. - if ( $required_only && ! $test_data['required'] ) { - continue; - } - - $result = call_user_func_array( array( $this, 'test_' . $test_type ), array( $password, $test_data ) ); - if ( $result ) { - $results['passed'][] = array( 'test_name' => $test_name ); - } else { - $results['failed'][] = array( - 'test_name' => $test_name, - 'explanation' => $test_data['error'], - ); - - if ( isset( $test_data['fail_immediately'] ) ) { - return $results; - } - } - } - } - - return $results; - } - - /** - * Returns an array of tests that need to be run on password strings. - * - * @param array $sections only return specific sections with the passed keys, defaults to all. - * - * @return array test descriptions. - */ - public function get_tests( $sections = false ) { - // Note: these should be in order of priority. - $tests = array( - 'preg_match' => array( - 'no_backslashes' => array( - 'pattern' => '/^[^\\\\]*$/u', - 'error' => __( 'Passwords may not contain the character "\".', 'jetpack-password-checker' ), - 'required' => true, - 'fail_immediately' => true, - ), - 'minimum_length' => array( - 'pattern' => '/^.{' . $this->minimum_password_length . ',}/u', - /* translators: %d is a number of characters in the password. */ - 'error' => sprintf( __( 'Password must be at least %d characters.', 'jetpack-password-checker' ), $this->minimum_password_length ), - 'required' => true, - 'fail_immediately' => true, - ), - 'has_mixed_case' => array( - 'pattern' => '/([a-z].*?[A-Z]|[A-Z].*?[a-z])/u', - 'error' => __( 'This password is too easy to guess: you can improve it by adding additional uppercase letters, lowercase letters, or numbers.', 'jetpack-password-checker' ), - 'required' => false, - ), - 'has_digit' => array( - 'pattern' => '/\d/u', - 'error' => __( 'This password is too easy to guess: you can improve it by mixing both letters and numbers.', 'jetpack-password-checker' ), - 'required' => false, - ), - 'has_special_char' => array( - 'pattern' => '/[^a-zA-Z\d]/u', - 'error' => __( 'This password is too easy to guess: you can improve it by including special characters such as !#=?*&.', 'jetpack-password-checker' ), - 'required' => false, - ), - ), - 'compare_to_list' => array( - 'not_a_common_password' => array( - 'list_callback' => 'get_common_passwords', - 'compare_callback' => 'negative_in_array', - 'error' => __( 'This is a very common password. Choose something that will be harder for others to guess.', 'jetpack-password-checker' ), - 'required' => true, - ), - 'not_same_as_other_user_data' => array( - 'list_callback' => 'get_other_user_data', - 'compare_callback' => 'test_not_same_as_other_user_data', - 'error' => __( 'Your password is too weak: Looks like you are including easy to guess information about yourself. Try something a little more unique.', 'jetpack-password-checker' ), - 'required' => true, - ), - ), - ); - - /** - * Filters the password strength enforcement settings. - * - * You can determine the tests run and their order based on whatever criteria you wish to specify. - * - * @param array $tests tests to run. - */ - $tests = apply_filters( 'password_checker_tests', $tests ); - - if ( ! $sections ) { - return $tests; - } - - $sections = (array) $sections; - - return array_intersect_key( $tests, array_flip( $sections ) ); - } - - /** - * Provides the regular expression tester functionality. - * - * @param string $password the password. - * @param array $test_data the current test data. - * - * @return bool does the test pass? - */ - protected function test_preg_match( $password, $test_data ) { - return preg_match( $test_data['pattern'], $password ); - } - - /** - * Provides the comparison tester functionality. - * - * @param string $password the password. - * @param array $test_data the current test data. - * - * @return bool does the test pass? - */ - protected function test_compare_to_list( $password, $test_data ) { - if ( - ! is_callable( array( $this, $test_data['list_callback'] ) ) - || ! is_callable( array( $this, $test_data['compare_callback'] ) ) - ) { - return false; - } - - return call_user_func( - array( - $this, - $test_data['compare_callback'], - ), - $password, - call_user_func( array( $this, $test_data['list_callback'] ) ) - ); - } - - /** - * Getter for the common password list. - * - * @return array common passwords. - */ - protected function get_common_passwords() { - return $this->common_passwords; - } - - /** - * Returns the widely known user data that can not be used in the password to avoid - * predictable strings. - * - * @return array user data. - */ - protected function get_other_user_data() { - if ( empty( $this->user_id ) ) { - return array(); - } - - $user_data = get_userdata( $this->user_id ); - if ( ! $user_data ) { - return array(); - } - - if ( isset( $user_data->ID ) ) { - $this->add_user_strings_to_test( get_user_meta( $user_data->ID, 'first_name', true ) ); - $this->add_user_strings_to_test( get_user_meta( $user_data->ID, 'last_name', true ) ); - $this->add_user_strings_to_test( get_user_meta( $user_data->ID, 'nickname', true ) ); - } - - if ( isset( $user_data->user_nicename ) ) { - $this->add_user_strings_to_test( $user_data->user_nicename ); - } - - if ( isset( $user_data->display_name ) ) { - $this->add_user_strings_to_test( $user_data->display_name ); - } - - if ( isset( $user_data->first_name ) ) { - $this->add_user_strings_to_test( $user_data->first_name ); - } - - if ( isset( $user_data->last_name ) ) { - $this->add_user_strings_to_test( $user_data->last_name ); - } - - if ( isset( $user_data->user_email ) ) { - $email_username = substr( $user_data->user_email, 0, strpos( $user_data->user_email, '@' ) ); - $this->add_user_strings_to_test( $email_username, '.' ); - $this->add_user_strings_to_test( $user_data->user_email ); - } - - return $this->get_user_strings_to_test(); - } - - /** - * Compare the password for matches with known user data. - * - * @param string $password the password. - * @param array $strings_to_test known user data. - * - * @return bool does the test pass? - */ - protected function test_not_same_as_other_user_data( $password, $strings_to_test ) { - if ( empty( $strings_to_test ) ) { - return false; - } - - $password_lowercase = strtolower( $password ); - - foreach ( $strings_to_test as $string ) { - $string = strtolower( $string ); - $string_reversed = strrev( $string ); - - if ( $password_lowercase === $string || $password_lowercase === $string_reversed ) { - return false; - } - - // Also check for the string or reversed string with any numbers just stuck to the end to catch things like bob123 as passwords. - if ( - preg_match( '/^' . preg_quote( $string, '/' ) . '\d+$/', $password_lowercase ) - || preg_match( '/^' . preg_quote( $string_reversed, '/' ) . '\d+$/', $password_lowercase ) - ) { - return false; - } - } - - return true; - } - - /** - * A shorthand for the not in array construct. - * - * @param mixed $needle the needle. - * @param array $haystack the haystack. - * - * @return bool is the needle not in the haystack? - */ - protected function negative_in_array( $needle, $haystack ) { - return ! in_array( $needle, $haystack, true ); - } - - /** - * A helper function used to break a single string into its constituents so - * that both the full string and its constituents and any variants thereof - * can be tested against the password. - * - * @param string $string the string to be broken down. - * @param string $explode_delimiter delimiter. - * - * @return bool - */ - protected function add_user_strings_to_test( $string, $explode_delimiter = ' ' ) { - // Don't check against empty strings. - if ( empty( $string ) ) { - return false; - } - - $strings = explode( $explode_delimiter, $string ); - - // Remove any non alpha numeric characters from the strings to check against. - foreach ( $strings as $key => $_string ) { - $_string = trim( preg_replace( '/[^a-zA-Z0-9]/', '', $_string ) ); - if ( empty( $_string ) ) { - continue; - } - - $strings[ $key ] = $_string; - } - - // Check the original too. - $strings[] = trim( $string ); - - // Check the original minus non alpha numeric characters. - $strings[] = trim( preg_replace( '/[^a-zA-Z0-9]/', '', $string ) ); - - // Remove any empty strings. - // Note: This will also filter out '0'. - $strings = array_filter( $strings ); - if ( empty( $strings ) ) { - return false; - } - - $this->user_strings_to_test = array_unique( array_merge( $this->user_strings_to_test, $strings ) ); - - return true; - } - - /** - * Getter for the user strings array. - * - * @return array user strings. - */ - protected function get_user_strings_to_test() { - return $this->user_strings_to_test; - } - - /** - * Return a character set size that is used in the string. - * - * @param string $password the password. - * - * @return int number of different character sets in use. - */ - protected function get_charset_size( $password ) { - $size = 0; - - // Lowercase a-z. - if ( preg_match( '/[a-z]/', $password ) ) { - $size += 26; - } - - // Uppercase A-Z. - if ( preg_match( '/[A-Z]/', substr( $password, 1, - 1 ) ) ) { - $size += 26; - } - - // Digits. - if ( preg_match( '/\d/', substr( $password, 1, - 1 ) ) ) { - $size += 10; - } - - // Over digits symbols. - if ( preg_match( '/[!|@|#|$|%|^|&|*|(|)]/', $password ) ) { - $size += 10; - } - - // Other symbols. - if ( preg_match( '#[`|~|-|_|=|+|\[|{|\]|}|\\|\|;:\'",<\.>/\?]#', $password ) ) { - $size += 20; - } - - // Spaces. - if ( strpos( $password, ' ' ) ) { - ++$size; - } - - return $size; - } - - /** - * Shorthand for getting a character index. - * - * @param string $char character. - * - * @return int the character code. - */ - protected function get_char_index( $char ) { - $char = strtolower( $char[0] ); - if ( $char < 'a' || $char > 'z' ) { - return 0; - } else { - return ord( $char[0] ) - ord( 'a' ) + 1; - } - } - - /** - * This is the password strength calculation algorithm, based on the formula H = L(logN/log2). - * - * H = Entropy - * L = String length (the for iterator) - * N = Our charset size, via get_charset_size() - * - * @see https://en.wikipedia.org/wiki/Password_strength#Random_passwords - * - * On top of the base formula, we're also multiplying the bits of entropy for every char - * by 1 - (the probabily of it following the previous char) - * i.e.: the probablity of U following Q is ~0.84. If our password contains this pair of characters, - * the u char will only add ( 0.16^2 * charset_score ) to our total of entropy bits. - * - * @param string $password the password. - * - * @return float|int - */ - protected function calculate_entropy_bits( $password ) { - $bits = 0; - // Calculate the score. - $charset_score = log( $this->get_charset_size( $password ) ) / log( 2 ); - - $aidx = $this->get_char_index( $password[0] ); - $length = strlen( $password ); - - for ( $b = 1; $b < $length; $b++ ) { - $bidx = $this->get_char_index( $password[ $b ] ); - - // 27 = number of chars in the index (a-z,' '). - $c = 1.0 - $this->frequency_table[ $aidx * 27 + $bidx ]; - - // Increment the bits. - $bits += $charset_score * $c * $c; - - // Move on to next pair. - $aidx = $bidx; - } - - return $bits; - } - - /** - * A frequency table of character pairs, starting with ' ' then ' a', ' b' [...] , 'a ', 'aa' etc. - * - * @see http://rumkin.com/tools/password/passchk.php - * - * @var array - */ - public $frequency_table = array( - 0.23653710453418866, - 0.04577693541332556, - 0.03449832337075375, - 0.042918209651552706, - 0.037390873305146524, - 0.028509112115468728, - 0.02350896632162123, - 0.022188657238664526, - 0.028429800262428927, - 0.04357019973757107, - 0.00913602565971716, - 0.03223093745443942, - 0.02235311269864412, - 0.04438081352966905, - 0.04512377897652719, - 0.020055401662049863, - 0.055903192885260244, - 0.0024388394809739026, - 0.035207464644991984, - 0.07355941099285611, - 0.036905671380667734, - 0.026134421927394666, - 0.023787724158040528, - 0.011352092141711621, - 0.0032354570637119114, - 0.005986878553725033, - 0.008861933226417843, - 0.11511532293337222, - 0.027556203528211108, - 0.024331243621519172, - 0.039266365359381834, - 0.031599941682461, - 0.014403265782183991, - 0.015480973902901297, - 0.027770812071730572, - 0.00942761335471643, - 0.039872867764980315, - 0.0078122175244204695, - 0.02808456043154979, - 0.08429100451960927, - 0.04688963405744277, - 0.13831170724595424, - 0.002540311998833649, - 0.025211838460416972, - 0.001543082081936142, - 0.09519638431258201, - 0.061845750109345385, - 0.08907071001603732, - 0.02137571074500656, - 0.027093162268552268, - 0.005521504592506197, - 0.003023181221752442, - 0.007086747339262283, - 0.010262720513194342, - 0.08785070710016038, - 0.14617757690625455, - 0.03417291150313457, - 0.0059635515381250915, - 0.006146668610584633, - 0.195202799241872, - 0.002774748505613063, - 0.004715556203528212, - 0.0044776206444088066, - 0.11205481848665985, - 0.005654468581425864, - 0.0028820527773727946, - 0.07383000437381543, - 0.005516839189386207, - 0.006496573844583759, - 0.09843067502551392, - 0.0027140982650532145, - 0.0006893133109782768, - 0.08425368129464937, - 0.021325557661466685, - 0.006493074792243767, - 0.07023414491908442, - 0.002077270739174807, - 0.0024633328473538415, - 0.0007744569179180639, - 0.015413325557661468, - 0.0011990086018370024, - 0.13162851727657093, - 0.10115993585070711, - 0.0026989357049132527, - 0.03319317684793702, - 0.002946202070272634, - 0.0783216212275842, - 0.0018358361277154103, - 0.00258813238081353, - 0.2141688292754046, - 0.09853681294649366, - 0.0032482869222918796, - 0.04359352675317102, - 0.01993526753171016, - 0.0036880011663507797, - 0.008011663507799971, - 0.12014696019827964, - 0.0029846916460125384, - 0.0017553579238956116, - 0.029470185158186325, - 0.010413179763813967, - 0.030699518880303252, - 0.03508499781309229, - 0.002021285901734947, - 0.0010613792097973467, - 0.0005295232541186761, - 0.009677212421635807, - 0.010585799679253535, - 0.17101734946785244, - 0.07968625164018078, - 0.007839043592360402, - 0.005438693687126403, - 0.0183606939787141, - 0.2732701559994168, - 0.004953491762647616, - 0.007259367254701851, - 0.008104971570199739, - 0.13274588132380813, - 0.004210526315789474, - 0.004997813092287506, - 0.017006560723137484, - 0.007442484327161393, - 0.016789619478058026, - 0.08477737279486806, - 0.005106283714827234, - 0.0005026971861787433, - 0.04040355736987899, - 0.037535500801866156, - 0.00885960052485785, - 0.0336410555474559, - 0.007066919376002332, - 0.005344219273946639, - 0.0006333284735384167, - 0.010684939495553289, - 0.0063064586674442345, - 0.15386849394955532, - 0.015049424114302375, - 0.012162705933809595, - 0.020425134859308938, - 0.037366379938766583, - 0.02157165767604607, - 0.009373961218836564, - 0.0173214754337367, - 0.009616562181075958, - 0.029522670943286193, - 0.010154249890654615, - 0.018600962239393497, - 0.06362210234728094, - 0.03157078291296107, - 0.151603440734801, - 0.0062329785683044175, - 0.014775331681003062, - 0.0020854351946347867, - 0.1826342032366234, - 0.0878017203674005, - 0.054190989940224525, - 0.010329202507654177, - 0.012763376585508092, - 0.0064872430383437815, - 0.006381105117364048, - 0.005388540603586529, - 0.0090800408222773, - 0.09611196967487973, - 0.09940691062837148, - 0.01033969966467415, - 0.004034407348009914, - 0.008826942703017933, - 0.11474675608689314, - 0.07132584924916169, - 0.012388977985129028, - 0.005435194634786413, - 0.1417174515235457, - 0.0037066627788307337, - 0.0045802595130485495, - 0.060800699810468, - 0.005341886572386646, - 0.005683627350925791, - 0.12434932205860913, - 0.004596588423968508, - 0.0007534626038781163, - 0.07107041842834232, - 0.022361277154104096, - 0.04784720804782038, - 0.06277533168100306, - 0.003441901151771395, - 0.005828254847645429, - 0.0009669047966175828, - 0.009470768333576322, - 0.002077270739174807, - 0.12797667298440007, - 0.08797783933518005, - 0.005388540603586529, - 0.0024913252660737715, - 0.007550954949701123, - 0.2786866890217233, - 0.002509986878553725, - 0.029002478495407494, - 0.0303204548768042, - 0.07576614666861058, - 0.00246799825047383, - 0.00592389561160519, - 0.039574281965301064, - 0.00706808572678233, - 0.03304505029887739, - 0.05474150750838315, - 0.0028633911648928414, - 0.0005073625892987316, - 0.07293541332555767, - 0.053528502697186175, - 0.022566554891383584, - 0.038151334013704616, - 0.002716430966613209, - 0.005049132526607377, - 0.0009902318122175246, - 0.008997229916897508, - 0.0011861787432570347, - 0.1666377022889634, - 0.14414462749671964, - 0.003374252806531564, - 0.005169266656947077, - 0.008468873013558828, - 0.16337541915731155, - 0.002873888321912815, - 0.004305000728969237, - 0.0031141565825922144, - 0.1241172182533897, - 0.0052800699810468, - 0.008969237498177577, - 0.024094474413179766, - 0.017029887738737422, - 0.01722700102055693, - 0.10618457501093455, - 0.006147834961364631, - 0.0008269427030179326, - 0.03303571949263741, - 0.024188948826359528, - 0.05213937891820965, - 0.04505846333284735, - 0.0035270447587111824, - 0.006799825047383001, - 0.0008199445983379502, - 0.02206735675754483, - 0.001010059775477475, - 0.11971191135734072, - 0.04656538854060359, - 0.011243621519171892, - 0.06513019390581717, - 0.032375564951159064, - 0.06347047674588133, - 0.013678961947805804, - 0.03309870243475726, - 0.006982942119842543, - 0.009726199154395685, - 0.010121592068814697, - 0.032514360693978714, - 0.04986032949409535, - 0.039734072022160664, - 0.15690683773144773, - 0.03949963551538125, - 0.014790494241143023, - 0.002722262720513194, - 0.02614375273363464, - 0.10753637556495116, - 0.06764834523983088, - 0.006221315060504448, - 0.021317393206006705, - 0.0030826651115322934, - 0.002399183554454002, - 0.0019069835252952323, - 0.015595276279341012, - 0.0925126111678087, - 0.18437906400349907, - 0.006538562472663654, - 0.008719638431258201, - 0.02116693395538708, - 0.18241376293920394, - 0.007290858725761773, - 0.005976381396705059, - 0.005629975215045925, - 0.09721300481119698, - 0.004810030616707975, - 0.024303251202799244, - 0.012954658113427612, - 0.011057005394372358, - 0.02733459688001166, - 0.10135121737862662, - 0.012016912086309959, - 0.001055547455897361, - 0.009027555037177431, - 0.07162326869806095, - 0.01007143898527482, - 0.07297623560285756, - 0.006741507508383147, - 0.0036891675171307776, - 0.0008409389123778977, - 0.011272780288671819, - 0.007020265344802449, - 0.1030389269572824, - 0.15350809155853623, - 0.004232686980609419, - 0.004353987461729115, - 0.0023385333138941536, - 0.14450386353695874, - 0.002546143752733635, - 0.0024470039364338824, - 0.01200758128006998, - 0.0981227584195947, - 0.003161976964572095, - 0.040695145064878264, - 0.03460446129173349, - 0.003908441463770229, - 0.01598483743986004, - 0.13107216795451232, - 0.003129319142732177, - 0.00032307916605919226, - 0.04050386353695874, - 0.05452689896486368, - 0.03589677795597026, - 0.07087097244496282, - 0.006143169558244642, - 0.008684647907858289, - 0.0004607085580988482, - 0.022010205569324977, - 0.0009097536083977258, - 0.07328765126111678, - 0.14751421490013122, - 0.008015162560139961, - 0.006601545414783497, - 0.025279486805656802, - 0.1682449336637994, - 0.008313748359819215, - 0.007010934538562473, - 0.005886572386645284, - 0.16889575739903775, - 0.004123050007289692, - 0.011925936725470185, - 0.10007289692374982, - 0.013380376148126549, - 0.009021723283277445, - 0.08650823735238372, - 0.007756232686980609, - 0.0007243038343781893, - 0.0026791077416533026, - 0.02797492345823006, - 0.032384895757399036, - 0.04187432570345531, - 0.00882461000145794, - 0.0032401224668318998, - 0.00033357632307916605, - 0.027878116343490307, - 0.0022277299897944304, - 0.14333518005540166, - 0.1725534334451086, - 0.02781629975215046, - 0.006909462020702727, - 0.005264907420906838, - 0.16661437527336345, - 0.004325995043009185, - 0.003334596880011664, - 0.005312727802886718, - 0.14024668318996938, - 0.0013261408368566844, - 0.003504884093891238, - 0.006375273363464061, - 0.04964922000291588, - 0.008290421344219274, - 0.09536783787724158, - 0.05394372357486515, - 0.005505175681586237, - 0.005339553870826651, - 0.01782067356757545, - 0.006710016037323225, - 0.05105933809593235, - 0.002983525295232541, - 0.002940370316372649, - 0.0004548768041988629, - 0.01208456043154979, - 0.000915585362297711, - 0.20146260387811635, - 0.067196967487972, - 0.006158332118384605, - 0.025438110511736407, - 0.07753783350342616, - 0.1273876658405015, - 0.009337804344656656, - 0.07683452398308792, - 0.0070412596588423975, - 0.08747164309666132, - 0.0038827817466102928, - 0.018116926665694706, - 0.005017641055547455, - 0.004567429654468581, - 0.028277008310249308, - 0.05271555620352821, - 0.004394809739029013, - 0.0013343052923166642, - 0.00411605190260971, - 0.059621519171890944, - 0.09073859163143316, - 0.01446858142586383, - 0.006770666277883074, - 0.003425572240851436, - 0.0004455459979588861, - 0.010401516256013998, - 0.005825922146085436, - 0.10833882490158916, - 0.007584779122321038, - 0.016903921854497742, - 0.02719580113719201, - 0.0304814112844438, - 0.02206385770520484, - 0.013064295086747339, - 0.02696369733197259, - 0.009581571657676046, - 0.026761918647033093, - 0.006510570053943724, - 0.021941390873305145, - 0.07042659279778393, - 0.05437410701268406, - 0.1425175681586237, - 0.027802303542790494, - 0.037690625455605774, - 0.0019606356611750987, - 0.1095623268698061, - 0.06157748942994606, - 0.044618749088788455, - 0.04955124653739612, - 0.03608689313310978, - 0.018381688292754043, - 0.003404577926811489, - 0.015036594255722409, - 0.009600233270156, - 0.10794693103951014, - 0.12447528794284882, - 0.0031981338387520046, - 0.0074716430966613205, - 0.003202799241871993, - 0.13437643971424407, - 0.006655197550663361, - 0.0036693395538708266, - 0.049338970695436656, - 0.09486863974340283, - 0.0015990669193760023, - 0.0026604461291733486, - 0.051775477474850555, - 0.0041347135150896636, - 0.005450357194926374, - 0.12030325120279925, - 0.04581309228750547, - 0.0004537104534188657, - 0.12425601399620935, - 0.025981629975215047, - 0.023926519900860182, - 0.04423385333138941, - 0.0017950138504155123, - 0.002661612479953346, - 0.0006333284735384167, - 0.008449045050298877, - 0.000653156436798367, - 0.04816678816153958, - 0.008625164018078437, - 0.0039037760606502403, - 0.005228750546726928, - 0.004531272780288672, - 0.0056672984400058316, - 0.00359585945473101, - 0.0032179618020119548, - 0.0038093016474704767, - 0.011452398308791368, - 0.002519317684793702, - 0.00280390727511299, - 0.005572824026826068, - 0.004554599795888614, - 0.004531272780288672, - 0.0035841959469310393, - 0.004400641492928998, - 0.0036670068523108326, - 0.004839189386207902, - 0.006258638285464354, - 0.004897506925207757, - 0.840776789619478, - 0.004968654322787578, - 0.002886718180492783, - 0.0019757982213150604, - 0.0018568304417553576, - 0.001691208630995772, - 0.09009243329931477, - 0.14030150167662925, - 0.013242746756086894, - 0.013746610293045632, - 0.027342761335471644, - 0.16938912377897652, - 0.006607377168683481, - 0.01661933226417845, - 0.008173786266219566, - 0.13297448607668758, - 0.0034675608689313307, - 0.016641492928998396, - 0.011722991689750693, - 0.021493512173786266, - 0.03430820819361423, - 0.10099548039072752, - 0.00873596734217816, - 0.0018323370753754193, - 0.020103222044029742, - 0.047197550663362, - 0.040833940807697915, - 0.03361189677795597, - 0.010844729552412887, - 0.005544831608106138, - 0.0007522962530981193, - 0.01525120279924187, - 0.00815512465373961, - 0.2109648636827526, - 0.058258055110074355, - 0.007181221752442048, - 0.043560868931331105, - 0.004058900714389853, - 0.10618107595859454, - 0.0062399766729844, - 0.004835690333867911, - 0.02679224376731302, - 0.08414637702288964, - 0.0030698352529523252, - 0.03637498177576906, - 0.01592885260242018, - 0.017413617145356466, - 0.008430383437818923, - 0.037231083248286924, - 0.03290275550371775, - 0.007538125091121154, - 0.004500947660008748, - 0.05932409972299169, - 0.16006764834523984, - 0.03309636973319726, - 0.007766729844000583, - 0.005225251494386936, - 0.0006321621227584196, - 0.012989648636827526, - 0.005274238227146815, - 0.1254503571949264, - 0.12852719055255868, - 0.0035433736696311416, - 0.005203090829566993, - 0.0019314768916751715, - 0.20520775623268697, - 0.002509986878553725, - 0.00343606939787141, - 0.027138649948972155, - 0.13926578218399185, - 0.004565096952908587, - 0.005614812654905963, - 0.00874413179763814, - 0.004109053797929727, - 0.008300918501239247, - 0.08270943286193323, - 0.002912377897652719, - 0.0037066627788307337, - 0.06909578655780726, - 0.03242805073625893, - 0.05237614812654906, - 0.04723487388832191, - 0.0038991106575302524, - 0.006299460562764251, - 0.00043388249015891526, - 0.020029741944889927, - 0.005311561452106721, - 0.09334072022160665, - 0.022940953491762648, - 0.024658988190698353, - 0.02901297565242747, - 0.03531593526753171, - 0.0758023035427905, - 0.013711619769645722, - 0.021597317393206007, - 0.009670214316955824, - 0.044728386062108175, - 0.010596296836273509, - 0.03264382563055839, - 0.0604822860475288, - 0.05489546581134276, - 0.11501851581863246, - 0.01837585653885406, - 0.026237060796034405, - 0.0011255285026971862, - 0.08704125965884241, - 0.10156349322058608, - 0.06660562764251349, - 0.023434319871701415, - 0.010777081207173057, - 0.005409534917626476, - 0.003123487388832191, - 0.0028762210234728096, - 0.0089995626184575, - 0.07518297127861205, - 0.2314868056568013, - 0.002226563639014434, - 0.003285610147251786, - 0.0027455897361131363, - 0.2724537104534189, - 0.0016655489138358362, - 0.0019209797346551977, - 0.0022137337804344656, - 0.17690392185449774, - 0.0014532730718763668, - 0.0024994897215337513, - 0.015302522233561744, - 0.003441901151771395, - 0.015303688584341741, - 0.09314593964134713, - 0.0017833503426155418, - 0.0005108616416387229, - 0.017828838023035427, - 0.010385187345094037, - 0.003168975069252078, - 0.01902901297565243, - 0.005525003644846187, - 0.0010088934246974776, - 0.0009272488700976819, - 0.036282840064149294, - 0.0022977110365942554, - 0.0766805656801283, - 0.22270418428342326, - 0.005283569033386791, - 0.007155562035282111, - 0.01173582154833066, - 0.1715620352821111, - 0.003925936725470185, - 0.004425134859308937, - 0.020040239101909902, - 0.14243242455168392, - 0.0016737133692958156, - 0.0066808572678232975, - 0.011980755212130047, - 0.012638577052048404, - 0.07206065024055984, - 0.08115701997375711, - 0.00710424260096224, - 0.0007278028867181805, - 0.02347630849978131, - 0.04595538708266512, - 0.01481965301064295, - 0.013925061962385188, - 0.0018125091121154687, - 0.00529173348884677, - 0.0016340574427759146, - 0.03072401224668319, - 0.0023746901880740633, - 0.25174165330223064, - 0.06673392622831317, - 0.00878378772415804, - 0.03956261845750109, - 0.010077270739174807, - 0.0844787869951888, - 0.00985216503863537, - 0.004973319725907567, - 0.01893220586091267, - 0.11200583175389998, - 0.0028715556203528212, - 0.004095057588569762, - 0.01202391019098994, - 0.01756757544831608, - 0.014825484764542934, - 0.05312961073042717, - 0.06746872721971132, - 0.003845458521650386, - 0.0210806239976673, - 0.019443067502551394, - 0.08017028721387957, - 0.01825572240851436, - 0.005365213587986587, - 0.01959702580551101, - 0.026184575010934536, - 0.02474879720075813, - 0.002171745152354571, - 0.25827321767021433, - 0.048050153083539875, - 0.01043184137629392, - 0.03930485493512174, - 0.027640180784370902, - 0.03294007872867765, - 0.006474413179763814, - 0.018314039947514214, - 0.015119405161102202, - 0.014706516984983233, - 0.005494678524566263, - 0.03309870243475726, - 0.043864120134130345, - 0.058996355153812505, - 0.06265986295378335, - 0.04633328473538417, - 0.03790756670068523, - 0.0004642076104388394, - 0.037849249161685375, - 0.08369966467415076, - 0.04999679253535501, - 0.02392768625164018, - 0.010998687855372504, - 0.009881323808135296, - 0.003867619186470331, - 0.012434465665548913, - 0.007253535500801866, - 0.11106225397288234, - 0.17624726636535937, - 0.008209943140399476, - 0.008390727511299025, - 0.012682898381688294, - 0.1825653885406036, - 0.001538416678816154, - 0.004590756670068524, - 0.008710307625018223, - 0.1299513048549351, - 0.002677941390873305, - 0.012309666132089225, - 0.014087184720804781, - 0.01199941682461, - 0.031246537396121883, - 0.07206648199445984, - 0.008254264470039366, - 0.0007033095203382417, - 0.007034261554162415, - 0.006599212713223502, - 0.013906400349905234, - 0.050098265053214755, - 0.007133401370462167, - 0.017750692520775622, - 0.0008257763522379356, - 0.03918821985712203, - 0.06015454147834961, - ); -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-plugins-installer/CHANGELOG.md b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-plugins-installer/CHANGELOG.md deleted file mode 100644 index 7c17cbed..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-plugins-installer/CHANGELOG.md +++ /dev/null @@ -1,86 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file. - -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) -and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - -## [0.3.2] - 2024-03-14 -### Changed -- Internal updates. - -## [0.3.1] - 2024-01-02 -### Fixed -- Ensured that language packs are installed after installing a new plugin. [#34763] - -## [0.3.0] - 2023-11-20 -### Changed -- Updated required PHP version to >= 7.0. [#34192] - -## [0.2.6] - 2023-11-14 - -## [0.2.5] - 2023-08-23 -### Changed -- Updated package dependencies. [#32605] - -## [0.2.4] - 2023-04-10 -### Added -- Add Jetpack Autoloader package suggestion. [#29988] - -## [0.2.3] - 2023-02-20 -### Changed -- Minor internal updates. - -## [0.2.2] - 2022-12-02 -### Changed -- Updated package dependencies. [#27688] - -## [0.2.1] - 2022-11-22 -### Changed -- Updated package dependencies. [#27043] - -## [0.2.0] - 2022-08-23 -### Added -- Add method to check plugin activation context. [#25422] - -## [0.1.4] - 2022-07-26 -### Changed -- Updated package dependencies. [#25158] - -## [0.1.3] - 2022-06-21 -### Changed -- Renaming master to trunk. - -## [0.1.2] - 2022-04-26 -### Changed -- Updated package dependencies. - -## [0.1.1] - 2022-03-29 -### Added -- Set composer package type to "jetpack-library" so i18n will work. - -## 0.1.0 - 2022-02-02 -### Added -- First version -- New functions to safely check plugin statuses - -### Changed -- Build: add missing mirror repo details, so package can be deployed. - -### Fixed -- Fix method logic - -[0.3.2]: https://github.com/Automattic/jetpack-plugins-installer/compare/v0.3.1...v0.3.2 -[0.3.1]: https://github.com/Automattic/jetpack-plugins-installer/compare/v0.3.0...v0.3.1 -[0.3.0]: https://github.com/Automattic/jetpack-plugins-installer/compare/v0.2.6...v0.3.0 -[0.2.6]: https://github.com/Automattic/jetpack-plugins-installer/compare/v0.2.5...v0.2.6 -[0.2.5]: https://github.com/Automattic/jetpack-plugins-installer/compare/v0.2.4...v0.2.5 -[0.2.4]: https://github.com/Automattic/jetpack-plugins-installer/compare/v0.2.3...v0.2.4 -[0.2.3]: https://github.com/Automattic/jetpack-plugins-installer/compare/v0.2.2...v0.2.3 -[0.2.2]: https://github.com/Automattic/jetpack-plugins-installer/compare/v0.2.1...v0.2.2 -[0.2.1]: https://github.com/Automattic/jetpack-plugins-installer/compare/v0.2.0...v0.2.1 -[0.2.0]: https://github.com/Automattic/jetpack-plugins-installer/compare/v0.1.4...v0.2.0 -[0.1.4]: https://github.com/Automattic/jetpack-plugins-installer/compare/v0.1.3...v0.1.4 -[0.1.3]: https://github.com/Automattic/jetpack-plugins-installer/compare/v0.1.2...v0.1.3 -[0.1.2]: https://github.com/Automattic/jetpack-plugins-installer/compare/v0.1.1...v0.1.2 -[0.1.1]: https://github.com/Automattic/jetpack-plugins-installer/compare/v0.1.0...v0.1.1 diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-plugins-installer/LICENSE.txt b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-plugins-installer/LICENSE.txt deleted file mode 100644 index e82774c1..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-plugins-installer/LICENSE.txt +++ /dev/null @@ -1,357 +0,0 @@ -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - - -=================================== - - -GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - -Copyright (C) 1989, 1991 Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -Everyone is permitted to copy and distribute verbatim copies -of this license document, but changing it is not allowed. - - Preamble - -The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Lesser General Public License instead.) You can apply it to -your programs, too. - -When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - -To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - -For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - -We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - -Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - -Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - -The precise terms and conditions for copying, distribution and -modification follow. - -GNU GENERAL PUBLIC LICENSE -TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - -0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - -1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - -2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - -a) You must cause the modified files to carry prominent notices -stating that you changed the files and the date of any change. - -b) You must cause any work that you distribute or publish, that in -whole or in part contains or is derived from the Program or any -part thereof, to be licensed as a whole at no charge to all third -parties under the terms of this License. - -c) If the modified program normally reads commands interactively -when run, you must cause it, when started running for such -interactive use in the most ordinary way, to print or display an -announcement including an appropriate copyright notice and a -notice that there is no warranty (or else, saying that you provide -a warranty) and that users may redistribute the program under -these conditions, and telling the user how to view a copy of this -License. (Exception: if the Program itself is interactive but -does not normally print such an announcement, your work based on -the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - -3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - -a) Accompany it with the complete corresponding machine-readable -source code, which must be distributed under the terms of Sections -1 and 2 above on a medium customarily used for software interchange; or, - -b) Accompany it with a written offer, valid for at least three -years, to give any third party, for a charge no more than your -cost of physically performing source distribution, a complete -machine-readable copy of the corresponding source code, to be -distributed under the terms of Sections 1 and 2 above on a medium -customarily used for software interchange; or, - -c) Accompany it with the information you received as to the offer -to distribute corresponding source code. (This alternative is -allowed only for noncommercial distribution and only if you -received the program in object code or executable form with such -an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - -4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - -5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - -6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - -7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - -8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - -9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - -10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - -11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - -12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - -How to Apply These Terms to Your New Programs - -If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - -To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - -Copyright (C) - -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along -with this program; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - -Gnomovision version 69, Copyright (C) year name of author -Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. -This is free software, and you are welcome to redistribute it -under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - -Yoyodyne, Inc., hereby disclaims all copyright interest in the program -`Gnomovision' (which makes passes at compilers) written by James Hacker. - -, 1 April 1989 -Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-plugins-installer/SECURITY.md b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-plugins-installer/SECURITY.md deleted file mode 100644 index 98f48dd1..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-plugins-installer/SECURITY.md +++ /dev/null @@ -1,47 +0,0 @@ -# Security Policy - -Full details of the Automattic Security Policy can be found on [automattic.com](https://automattic.com/security/). - -## Supported Versions - -Generally, only the latest version of Jetpack and its associated plugins have continued support. If a critical vulnerability is found in the current version of a plugin, we may opt to backport any patches to previous versions. - -## Reporting a Vulnerability - -Our HackerOne program covers the below plugin software, as well as a variety of related projects and infrastructure: - -* [Jetpack](https://jetpack.com/) -* Jetpack Backup -* Jetpack Boost -* Jetpack CRM -* Jetpack Protect -* Jetpack Search -* Jetpack Social -* Jetpack VideoPress - -**For responsible disclosure of security issues and to be eligible for our bug bounty program, please submit your report via the [HackerOne](https://hackerone.com/automattic) portal.** - -Our most critical targets are: - -* Jetpack and the Jetpack composer packages (all within this repo) -* Jetpack.com -- the primary marketing site. -* cloud.jetpack.com -- a management site. -* wordpress.com -- the shared management site for both Jetpack and WordPress.com sites. - -For more targets, see the `In Scope` section on [HackerOne](https://hackerone.com/automattic). - -_Please note that the **WordPress software is a separate entity** from Automattic. Please report vulnerabilities for WordPress through [the WordPress Foundation's HackerOne page](https://hackerone.com/wordpress)._ - -## Guidelines - -We're committed to working with security researchers to resolve the vulnerabilities they discover. You can help us by following these guidelines: - -* Follow [HackerOne's disclosure guidelines](https://www.hackerone.com/disclosure-guidelines). -* Pen-testing Production: - * Please **setup a local environment** instead whenever possible. Most of our code is open source (see above). - * If that's not possible, **limit any data access/modification** to the bare minimum necessary to reproduce a PoC. - * **_Don't_ automate form submissions!** That's very annoying for us, because it adds extra work for the volunteers who manage those systems, and reduces the signal/noise ratio in our communication channels. - * To be eligible for a bounty, all of these guidelines must be followed. -* Be Patient - Give us a reasonable time to correct the issue before you disclose the vulnerability. - -We also expect you to comply with all applicable laws. You're responsible to pay any taxes associated with your bounties. diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-plugins-installer/composer.json b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-plugins-installer/composer.json deleted file mode 100644 index 2282133e..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-plugins-installer/composer.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "name": "automattic/jetpack-plugins-installer", - "description": "Handle installation of plugins from WP.org", - "type": "jetpack-library", - "license": "GPL-2.0-or-later", - "require": { - "php": ">=7.0", - "automattic/jetpack-a8c-mc-stats": "^2.0.1" - }, - "require-dev": { - "yoast/phpunit-polyfills": "1.1.0", - "automattic/jetpack-changelogger": "^4.1.1" - }, - "suggest": { - "automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package." - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "scripts": { - "phpunit": [ - "./vendor/phpunit/phpunit/phpunit --colors=always" - ], - "test-php": [ - "@composer phpunit" - ] - }, - "minimum-stability": "dev", - "prefer-stable": true, - "extra": { - "branch-alias": { - "dev-trunk": "0.3.x-dev" - }, - "mirror-repo": "Automattic/jetpack-plugins-installer", - "changelogger": { - "link-template": "https://github.com/Automattic/jetpack-plugins-installer/compare/v${old}...v${new}" - }, - "autotagger": true, - "textdomain": "jetpack-plugins-installer" - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-plugins-installer/src/class-automatic-install-skin.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-plugins-installer/src/class-automatic-install-skin.php deleted file mode 100644 index ae129c59..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-plugins-installer/src/class-automatic-install-skin.php +++ /dev/null @@ -1,155 +0,0 @@ -fs_connect( array( WP_CONTENT_DIR, WP_PLUGIN_DIR ) ); - if ( ! $result ) { - // set the string here since they are not available just yet. - $upgrader->generic_strings(); - $this->feedback( 'fs_unavailable' ); - } - } - - /** - * Overwrites the error function - * - * @param \WP_Error|mixed $error The error object. - */ - public function error( $error ) { - if ( is_wp_error( $error ) ) { - $this->feedback( $error ); - } - } - - /** - * Set the main error code. - * - * Don't set the process_failed as code since it is not that helpful unless we don't have one already set - * - * @param string $code The error code. - * @return void - */ - private function set_main_error_code( $code ) { - $this->main_error_code = ( 'process_failed' === $code && $this->main_error_code ? $this->main_error_code : $code ); - } - - /** - * Set the main error message. - * - * Don't set the process_failed as message since it is not that helpful unless we don't have one already set - * - * @param string $message The error message. - * @param string $code The error code. - * @return void - */ - private function set_main_error_message( $message, $code ) { - $this->main_error_message = ( 'process_failed' === $code && $this->main_error_message ? $this->main_error_message : $message ); - } - - /** - * Get the main error code - * - * @return string - */ - public function get_main_error_code() { - return $this->main_error_code; - } - - /** - * Get the main error message - * - * @return string - */ - public function get_main_error_message() { - return $this->main_error_message; - } - - /** - * Overwrites the feedback function - * - * @param string|array|WP_Error $data Data. - * @param mixed ...$args Optional text replacements. - */ - public function feedback( $data, ...$args ) { - - $current_error = null; - if ( is_wp_error( $data ) ) { - $this->set_main_error_code( $data->get_error_code() ); - $string = $data->get_error_message(); - } elseif ( is_array( $data ) ) { - return; - } else { - $string = $data; - } - - if ( ! empty( $this->upgrader->strings[ $string ] ) ) { - $this->set_main_error_code( $string ); - - $current_error = $string; - $string = $this->upgrader->strings[ $string ]; - } - - if ( strpos( $string, '%' ) !== false ) { - if ( ! empty( $args ) ) { - $string = vsprintf( $string, $args ); - } - } - - $string = trim( $string ); - $string = wp_kses( - $string, - array( - 'a' => array( - 'href' => true, - ), - 'br' => true, - 'em' => true, - 'strong' => true, - ) - ); - - $this->set_main_error_message( $string, $current_error ); - $this->messages[] = $string; - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-plugins-installer/src/class-plugins-installer.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-plugins-installer/src/class-plugins-installer.php deleted file mode 100644 index 3fbfd80c..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-plugins-installer/src/class-plugins-installer.php +++ /dev/null @@ -1,294 +0,0 @@ -install( $zip_url ); - - if ( is_wp_error( $result ) ) { - $mc_stats->add( 'install-plugin', "fail-$slug" ); - return $result; - } - - $plugin = self::get_plugin_id_by_slug( $slug ); - $error_code = 'install_error'; - if ( ! $plugin ) { - $error = __( 'There was an error installing your plugin', 'jetpack-plugins-installer' ); - } - - if ( ! $result ) { - $error_code = $upgrader->skin->get_main_error_code(); - $message = $upgrader->skin->get_main_error_message(); - $error = $message ? $message : __( 'An unknown error occurred during installation', 'jetpack-plugins-installer' ); - } - - if ( ! empty( $error ) ) { - if ( 'download_failed' === $error_code ) { - // For backwards compatibility: versions prior to 3.9 would return no_package instead of download_failed. - $error_code = 'no_package'; - } - - $mc_stats->add( 'install-plugin', "fail-$slug" ); - return new WP_Error( $error_code, $error, 400 ); - } - - $mc_stats->add( 'install-plugin', "success-$slug" ); - return (array) $upgrader->skin->get_upgrade_messages(); - } - - /** - * Get WordPress.org zip download link from a plugin slug - * - * @param string $plugin_slug Plugin slug. - */ - protected static function generate_wordpress_org_plugin_download_link( $plugin_slug ) { - return "https://downloads.wordpress.org/plugin/$plugin_slug.latest-stable.zip"; - } - - /** - * Get the plugin ID (composed of the plugin slug and the name of the main plugin file) from a plugin slug. - * - * @param string $slug Plugin slug. - */ - public static function get_plugin_id_by_slug( $slug ) { - // Check if get_plugins() function exists. This is required on the front end of the - // site, since it is in a file that is normally only loaded in the admin. - if ( ! function_exists( 'get_plugins' ) ) { - require_once ABSPATH . 'wp-admin/includes/plugin.php'; - } - - /** This filter is documented in wp-admin/includes/class-wp-plugins-list-table.php */ - $plugins = apply_filters( 'all_plugins', get_plugins() ); - if ( ! is_array( $plugins ) ) { - return false; - } - - foreach ( $plugins as $plugin_file => $plugin_data ) { - if ( self::get_slug_from_file_path( $plugin_file ) === $slug ) { - return $plugin_file; - } - } - - return false; - } - - /** - * Get the plugin slug from the plugin ID (composed of the plugin slug and the name of the main plugin file) - * - * @param string $plugin_file Plugin file (ID -- e.g. hello-dolly/hello.php). - */ - protected static function get_slug_from_file_path( $plugin_file ) { - // Similar to get_plugin_slug() method. - $slug = dirname( $plugin_file ); - if ( '.' === $slug ) { - $slug = preg_replace( '/(.+)\.php$/', '$1', $plugin_file ); - } - - return $slug; - } - - /** - * Get the activation status for a plugin. - * - * @since-jetpack 8.9.0 - * - * @param string $plugin_file The plugin file to check. - * @return string Either 'network-active', 'active' or 'inactive'. - */ - public static function get_plugin_status( $plugin_file ) { - if ( self::is_plugin_active_for_network( $plugin_file ) ) { - return 'network-active'; - } - - if ( self::is_plugin_active( $plugin_file ) ) { - return 'active'; - } - - return 'inactive'; - } - - /** - * Safely checks if the plugin is active - * - * @since $next-version$ - * - * @param string $plugin_file The plugin file to check. - * @return bool - */ - public static function is_plugin_active( $plugin_file ) { - self::ensure_plugin_functions_are_loaded(); - return is_plugin_active( $plugin_file ); - } - - /** - * Safely checks if the plugin is active for network - * - * @since $next-version$ - * - * @param string $plugin_file The plugin file to check. - * @return bool - */ - public static function is_plugin_active_for_network( $plugin_file ) { - self::ensure_plugin_functions_are_loaded(); - return is_plugin_active_for_network( $plugin_file ); - } - - /** - * Returns a list of all plugins in the site. - * - * @since-jetpack 8.9.0 - * @uses get_plugins() - * - * @return array - */ - public static function get_plugins() { - self::ensure_plugin_functions_are_loaded(); - /** This filter is documented in wp-admin/includes/class-wp-plugins-list-table.php */ - $plugins = apply_filters( 'all_plugins', get_plugins() ); - - if ( is_array( $plugins ) && ! empty( $plugins ) ) { - foreach ( $plugins as $plugin_slug => $plugin_data ) { - $plugins[ $plugin_slug ]['active'] = in_array( - self::get_plugin_status( $plugin_slug ), - array( 'active', 'network-active' ), - true - ); - } - return $plugins; - } - - return array(); - } - - /** - * Determine if the current request is activating a plugin from the plugins page. - * - * @param string $plugin Plugin file path to check. - * @return bool - */ - public static function is_current_request_activating_plugin_from_plugins_screen( $plugin ) { - // Filter out common async request contexts - if ( - wp_doing_ajax() || - ( defined( 'REST_REQUEST' ) && REST_REQUEST ) || - ( defined( 'REST_API_REQUEST' ) && REST_API_REQUEST ) || - ( defined( 'WP_CLI' ) && WP_CLI ) - ) { - return false; - } - - if ( isset( $_SERVER['SCRIPT_NAME'] ) ) { - $request_file = esc_url_raw( wp_unslash( $_SERVER['SCRIPT_NAME'] ) ); - } elseif ( isset( $_SERVER['REQUEST_URI'] ) ) { - list( $request_file ) = explode( '?', esc_url_raw( wp_unslash( $_SERVER['REQUEST_URI'] ) ) ); - } else { - return false; - } - - // Not the plugins page - if ( strpos( $request_file, 'wp-admin/plugins.php' ) === false ) { - return false; - } - - // Same method to get the action as used by plugins.php - $wp_list_table = _get_list_table( 'WP_Plugins_List_Table' ); - $action = $wp_list_table->current_action(); - - // Not a singular activation - // This also means that if the plugin is activated as part of a group ( bulk activation ), this function will return false here. - if ( 'activate' !== $action ) { - return false; - } - - // Check the nonce associated with the plugin activation - // We are not changing any data here, so this is not super necessary, it's just a best practice before using the form data from $_REQUEST. - check_admin_referer( 'activate-plugin_' . $plugin ); - - // Not the right plugin - $requested_plugin = isset( $_REQUEST['plugin'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['plugin'] ) ) : null; - if ( $requested_plugin !== $plugin ) { - return false; - } - - return true; - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-redirect/CHANGELOG.md b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-redirect/CHANGELOG.md deleted file mode 100644 index ecfe4969..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-redirect/CHANGELOG.md +++ /dev/null @@ -1,242 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file. - -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) -and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - -## [2.0.1] - 2024-03-12 -### Changed -- Internal updates. - -## [2.0.0] - 2023-11-20 -### Changed -- Replaced usage of strpos() with str_starts_with(). [#34135] -- Updated required PHP version to >= 7.0. [#34192] - -## [1.7.27] - 2023-09-19 - -- Minor internal updates. - -## [1.7.26] - 2023-08-23 -### Changed -- Updated package dependencies. [#32605] - -## [1.7.25] - 2023-04-10 -### Added -- Add Jetpack Autoloader package suggestion. [#29988] - -## [1.7.24] - 2023-02-20 -### Changed -- Minor internal updates. - -## [1.7.23] - 2023-01-11 -### Changed -- Updated package dependencies. - -## [1.7.22] - 2022-12-19 -### Changed -- Updated package dependencies. - -## [1.7.21] - 2022-12-02 -### Changed -- Updated package dependencies. [#27688] - -## [1.7.20] - 2022-11-22 -### Changed -- Updated package dependencies. [#27043] - -## [1.7.19] - 2022-11-07 -### Changed -- Updated package dependencies. [#27278] - -## [1.7.18] - 2022-07-26 -### Changed -- Updated package dependencies. [#25158] - -## [1.7.17] - 2022-06-21 -### Changed -- Renaming master to trunk. - -## [1.7.16] - 2022-06-14 -### Changed -- Updated package dependencies. [#24529] - -## [1.7.15] - 2022-05-10 - -## [1.7.14] - 2022-04-26 -### Changed -- Updated package dependencies. - -## [1.7.13] - 2022-04-05 -### Changed -- Updated package dependencies. - -## [1.7.12] - 2022-03-02 -### Changed -- Updated package dependencies. - -## [1.7.11] - 2022-02-22 -### Changed -- Updated package dependencies. - -## [1.7.10] - 2022-01-25 -### Changed -- Updated package dependencies. - -## [1.7.9] - 2022-01-04 -### Changed -- Switch to pcov for code coverage. -- Updated package dependencies - -## [1.7.8] - 2021-12-14 -### Changed -- Updated package dependencies. - -## [1.7.7] - 2021-11-22 -### Changed -- Updated package dependencies - -## [1.7.6] - 2021-11-02 -### Changed -- Set `convertDeprecationsToExceptions` true in PHPUnit config. -- Update PHPUnit configs to include just what needs coverage rather than include everything then try to exclude stuff that doesn't. - -## [1.7.5] - 2021-10-26 -### Changed -- Updated package dependencies. - -## [1.7.4] - 2021-10-13 -### Changed -- Updated package dependencies. - -## [1.7.3] - 2021-10-12 -### Changed -- Updated package dependencies - -## [1.7.2] - 2021-09-28 -### Changed -- Updated package dependencies. - -## [1.7.1] - 2021-08-30 -### Changed -- Run composer update on test-php command instead of phpunit -- Tests: update PHPUnit polyfills dependency (yoast/phpunit-polyfills). - -## [1.7.0] - 2021-06-29 -### Changed -- Allow any argument to be passed. -- Improve documentation. - -## [1.6.1] - 2021-06-15 -### Changed -- Updated package dependencies. - -## [1.6.0] - 2021-05-25 -### Removed -- Removed filter from the final Redirect URL - -## [1.5.5] - 2021-04-27 -### Changed -- Updated package dependencies. - -## [1.5.4] - 2021-03-30 -### Added -- Composer alias for dev-master, to improve dependencies - -### Changed -- Update package dependencies. -- Userless Connection: Redirect "userless" users to the "Plans" page - -### Fixed -- Use `composer update` rather than `install` in scripts, as composer.lock isn't checked in. - -## [1.5.3] - 2021-02-23 - -- CI: Make tests more generic - -## [1.5.2] - 2021-01-26 - -- Update dependencies to latest stable - -## [1.5.1] - 2021-01-26 - -- Add mirror-repo information to all current composer packages -- Monorepo: Reorganize all projects - -## [1.5.0] - 2021-01-05 - -- Update dependency brain/monkey to v2.6.0 -- Pin dependencies -- Packages: Update for PHP 8 testing -- Pin dependency brain/monkey to 2.5.0 - -## [1.4.1] - 2020-11-24 - -- Status: Introduce get_site_suffix method - -## [1.4.0] - 2020-10-27 - -- Masterbar: Add Admin Menu endpoint - -## [1.3.0] - 2020-08-14 - -- Packages: Update filenames after #16810 -- CI: Try collect js coverage -- Docker: Add package testing shortcut - -## [1.2.0] - 2020-06-16 - -- Add a trailing / to jetpack.com/redirect URLs. - -## [1.1.0] - 2020-05-22 - -- add filter to Redirect::get_url - -## 1.0.0 - 2020-04-24 - -- Create Jetpack Redirect package - -[2.0.1]: https://github.com/Automattic/jetpack-redirect/compare/v2.0.0...v2.0.1 -[2.0.0]: https://github.com/Automattic/jetpack-redirect/compare/v1.7.27...v2.0.0 -[1.7.27]: https://github.com/Automattic/jetpack-redirect/compare/v1.7.26...v1.7.27 -[1.7.26]: https://github.com/Automattic/jetpack-redirect/compare/v1.7.25...v1.7.26 -[1.7.25]: https://github.com/Automattic/jetpack-redirect/compare/v1.7.24...v1.7.25 -[1.7.24]: https://github.com/Automattic/jetpack-redirect/compare/v1.7.23...v1.7.24 -[1.7.23]: https://github.com/Automattic/jetpack-redirect/compare/v1.7.22...v1.7.23 -[1.7.22]: https://github.com/Automattic/jetpack-redirect/compare/v1.7.21...v1.7.22 -[1.7.21]: https://github.com/Automattic/jetpack-redirect/compare/v1.7.20...v1.7.21 -[1.7.20]: https://github.com/Automattic/jetpack-redirect/compare/v1.7.19...v1.7.20 -[1.7.19]: https://github.com/Automattic/jetpack-redirect/compare/v1.7.18...v1.7.19 -[1.7.18]: https://github.com/Automattic/jetpack-redirect/compare/v1.7.17...v1.7.18 -[1.7.17]: https://github.com/Automattic/jetpack-redirect/compare/v1.7.16...v1.7.17 -[1.7.16]: https://github.com/Automattic/jetpack-redirect/compare/v1.7.15...v1.7.16 -[1.7.15]: https://github.com/Automattic/jetpack-redirect/compare/v1.7.14...v1.7.15 -[1.7.14]: https://github.com/Automattic/jetpack-redirect/compare/v1.7.13...v1.7.14 -[1.7.13]: https://github.com/Automattic/jetpack-redirect/compare/v1.7.12...v1.7.13 -[1.7.12]: https://github.com/Automattic/jetpack-redirect/compare/v1.7.11...v1.7.12 -[1.7.11]: https://github.com/Automattic/jetpack-redirect/compare/v1.7.10...v1.7.11 -[1.7.10]: https://github.com/Automattic/jetpack-redirect/compare/v1.7.9...v1.7.10 -[1.7.9]: https://github.com/Automattic/jetpack-redirect/compare/v1.7.8...v1.7.9 -[1.7.8]: https://github.com/Automattic/jetpack-redirect/compare/v1.7.7...v1.7.8 -[1.7.7]: https://github.com/Automattic/jetpack-redirect/compare/v1.7.6...v1.7.7 -[1.7.6]: https://github.com/Automattic/jetpack-redirect/compare/v1.7.5...v1.7.6 -[1.7.5]: https://github.com/Automattic/jetpack-redirect/compare/v1.7.4...v1.7.5 -[1.7.4]: https://github.com/Automattic/jetpack-redirect/compare/v1.7.3...v1.7.4 -[1.7.3]: https://github.com/Automattic/jetpack-redirect/compare/v1.7.2...v1.7.3 -[1.7.2]: https://github.com/Automattic/jetpack-redirect/compare/v1.7.1...v1.7.2 -[1.7.1]: https://github.com/Automattic/jetpack-redirect/compare/v1.7.0...v1.7.1 -[1.7.0]: https://github.com/Automattic/jetpack-redirect/compare/v1.6.1...v1.7.0 -[1.6.1]: https://github.com/Automattic/jetpack-redirect/compare/v1.6.0...v1.6.1 -[1.6.0]: https://github.com/Automattic/jetpack-redirect/compare/v1.5.5...v1.6.0 -[1.5.5]: https://github.com/Automattic/jetpack-redirect/compare/v1.5.4...v1.5.5 -[1.5.4]: https://github.com/Automattic/jetpack-redirect/compare/v1.5.3...v1.5.4 -[1.5.3]: https://github.com/Automattic/jetpack-redirect/compare/v1.5.2...v1.5.3 -[1.5.2]: https://github.com/Automattic/jetpack-redirect/compare/v1.5.1...v1.5.2 -[1.5.1]: https://github.com/Automattic/jetpack-redirect/compare/v1.5.0...v1.5.1 -[1.5.0]: https://github.com/Automattic/jetpack-redirect/compare/v1.4.1...v1.5.0 -[1.4.1]: https://github.com/Automattic/jetpack-redirect/compare/v1.4.0...v1.4.1 -[1.4.0]: https://github.com/Automattic/jetpack-redirect/compare/v1.3.0...v1.4.0 -[1.3.0]: https://github.com/Automattic/jetpack-redirect/compare/v1.2.0...v1.3.0 -[1.2.0]: https://github.com/Automattic/jetpack-redirect/compare/v1.1.0...v1.2.0 -[1.1.0]: https://github.com/Automattic/jetpack-redirect/compare/v1.0.0...v1.1.0 diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-redirect/LICENSE.txt b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-redirect/LICENSE.txt deleted file mode 100644 index e82774c1..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-redirect/LICENSE.txt +++ /dev/null @@ -1,357 +0,0 @@ -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - - -=================================== - - -GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - -Copyright (C) 1989, 1991 Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -Everyone is permitted to copy and distribute verbatim copies -of this license document, but changing it is not allowed. - - Preamble - -The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Lesser General Public License instead.) You can apply it to -your programs, too. - -When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - -To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - -For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - -We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - -Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - -Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - -The precise terms and conditions for copying, distribution and -modification follow. - -GNU GENERAL PUBLIC LICENSE -TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - -0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - -1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - -2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - -a) You must cause the modified files to carry prominent notices -stating that you changed the files and the date of any change. - -b) You must cause any work that you distribute or publish, that in -whole or in part contains or is derived from the Program or any -part thereof, to be licensed as a whole at no charge to all third -parties under the terms of this License. - -c) If the modified program normally reads commands interactively -when run, you must cause it, when started running for such -interactive use in the most ordinary way, to print or display an -announcement including an appropriate copyright notice and a -notice that there is no warranty (or else, saying that you provide -a warranty) and that users may redistribute the program under -these conditions, and telling the user how to view a copy of this -License. (Exception: if the Program itself is interactive but -does not normally print such an announcement, your work based on -the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - -3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - -a) Accompany it with the complete corresponding machine-readable -source code, which must be distributed under the terms of Sections -1 and 2 above on a medium customarily used for software interchange; or, - -b) Accompany it with a written offer, valid for at least three -years, to give any third party, for a charge no more than your -cost of physically performing source distribution, a complete -machine-readable copy of the corresponding source code, to be -distributed under the terms of Sections 1 and 2 above on a medium -customarily used for software interchange; or, - -c) Accompany it with the information you received as to the offer -to distribute corresponding source code. (This alternative is -allowed only for noncommercial distribution and only if you -received the program in object code or executable form with such -an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - -4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - -5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - -6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - -7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - -8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - -9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - -10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - -11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - -12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - -How to Apply These Terms to Your New Programs - -If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - -To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - -Copyright (C) - -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along -with this program; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - -Gnomovision version 69, Copyright (C) year name of author -Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. -This is free software, and you are welcome to redistribute it -under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - -Yoyodyne, Inc., hereby disclaims all copyright interest in the program -`Gnomovision' (which makes passes at compilers) written by James Hacker. - -, 1 April 1989 -Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-redirect/SECURITY.md b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-redirect/SECURITY.md deleted file mode 100644 index 98f48dd1..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-redirect/SECURITY.md +++ /dev/null @@ -1,47 +0,0 @@ -# Security Policy - -Full details of the Automattic Security Policy can be found on [automattic.com](https://automattic.com/security/). - -## Supported Versions - -Generally, only the latest version of Jetpack and its associated plugins have continued support. If a critical vulnerability is found in the current version of a plugin, we may opt to backport any patches to previous versions. - -## Reporting a Vulnerability - -Our HackerOne program covers the below plugin software, as well as a variety of related projects and infrastructure: - -* [Jetpack](https://jetpack.com/) -* Jetpack Backup -* Jetpack Boost -* Jetpack CRM -* Jetpack Protect -* Jetpack Search -* Jetpack Social -* Jetpack VideoPress - -**For responsible disclosure of security issues and to be eligible for our bug bounty program, please submit your report via the [HackerOne](https://hackerone.com/automattic) portal.** - -Our most critical targets are: - -* Jetpack and the Jetpack composer packages (all within this repo) -* Jetpack.com -- the primary marketing site. -* cloud.jetpack.com -- a management site. -* wordpress.com -- the shared management site for both Jetpack and WordPress.com sites. - -For more targets, see the `In Scope` section on [HackerOne](https://hackerone.com/automattic). - -_Please note that the **WordPress software is a separate entity** from Automattic. Please report vulnerabilities for WordPress through [the WordPress Foundation's HackerOne page](https://hackerone.com/wordpress)._ - -## Guidelines - -We're committed to working with security researchers to resolve the vulnerabilities they discover. You can help us by following these guidelines: - -* Follow [HackerOne's disclosure guidelines](https://www.hackerone.com/disclosure-guidelines). -* Pen-testing Production: - * Please **setup a local environment** instead whenever possible. Most of our code is open source (see above). - * If that's not possible, **limit any data access/modification** to the bare minimum necessary to reproduce a PoC. - * **_Don't_ automate form submissions!** That's very annoying for us, because it adds extra work for the volunteers who manage those systems, and reduces the signal/noise ratio in our communication channels. - * To be eligible for a bounty, all of these guidelines must be followed. -* Be Patient - Give us a reasonable time to correct the issue before you disclose the vulnerability. - -We also expect you to comply with all applicable laws. You're responsible to pay any taxes associated with your bounties. diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-redirect/composer.json b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-redirect/composer.json deleted file mode 100644 index 23cdc32d..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-redirect/composer.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "name": "automattic/jetpack-redirect", - "description": "Utilities to build URLs to the jetpack.com/redirect/ service", - "type": "jetpack-library", - "license": "GPL-2.0-or-later", - "require": { - "php": ">=7.0", - "automattic/jetpack-status": "^2.1.2" - }, - "require-dev": { - "brain/monkey": "2.6.1", - "yoast/phpunit-polyfills": "1.1.0", - "automattic/jetpack-changelogger": "^4.1.1" - }, - "suggest": { - "automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package." - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "scripts": { - "phpunit": [ - "./vendor/phpunit/phpunit/phpunit --colors=always" - ], - "test-php": [ - "@composer phpunit" - ] - }, - "minimum-stability": "dev", - "prefer-stable": true, - "extra": { - "autotagger": true, - "mirror-repo": "Automattic/jetpack-redirect", - "changelogger": { - "link-template": "https://github.com/Automattic/jetpack-redirect/compare/v${old}...v${new}" - }, - "branch-alias": { - "dev-trunk": "2.0.x-dev" - } - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-redirect/src/class-redirect.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-redirect/src/class-redirect.php deleted file mode 100644 index 7e1ee79e..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-redirect/src/class-redirect.php +++ /dev/null @@ -1,79 +0,0 @@ -get_site_suffix(); - $args = wp_parse_args( $args, array( 'site' => $site_suffix ) ); - - $source_key = 'source'; - - if ( \str_starts_with( $source, 'https://' ) ) { - $source_key = 'url'; - $source_url = \wp_parse_url( $source ); - - // discard any query and fragments. - $source = 'https://' . $source_url['host'] . ( isset( $source_url['path'] ) ? $source_url['path'] : '' ); - } - - $to_be_added = array( - $source_key => rawurlencode( $source ), - ); - - foreach ( $args as $arg_name => $arg_value ) { - - if ( empty( $arg_value ) ) { - continue; - } - - $to_be_added[ $arg_name ] = rawurlencode( $arg_value ); - - } - - if ( ! empty( $to_be_added ) ) { - $url = add_query_arg( $to_be_added, $url ); - } - - return $url; - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-roles/CHANGELOG.md b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-roles/CHANGELOG.md deleted file mode 100644 index 704bb219..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-roles/CHANGELOG.md +++ /dev/null @@ -1,200 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file. - -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) -and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - -## [2.0.1] - 2024-03-12 -### Changed -- Internal updates. - -## [2.0.0] - 2023-11-20 -### Changed -- Updated required PHP version to >= 7.0. [#34192] - -## [1.4.25] - 2023-09-19 - -- Minor internal updates. - -## [1.4.24] - 2023-08-23 -### Changed -- Updated package dependencies. [#32605] - -## [1.4.23] - 2023-04-10 -### Added -- Add Jetpack Autoloader package suggestion. [#29988] - -## [1.4.22] - 2023-02-20 -### Changed -- Minor internal updates. - -## [1.4.21] - 2023-01-11 -### Changed -- Updated package dependencies. - -## [1.4.20] - 2022-12-19 -### Changed -- Updated package dependencies. - -## [1.4.19] - 2022-12-02 -### Changed -- Updated package dependencies. [#27688] - -## [1.4.18] - 2022-11-22 -### Changed -- Updated package dependencies. [#27043] - -## [1.4.17] - 2022-07-26 -### Changed -- Updated package dependencies. [#25158] - -## [1.4.16] - 2022-06-21 -### Changed -- Renaming master to trunk. - -## [1.4.15] - 2022-04-26 -### Changed -- Updated package dependencies. - -## [1.4.14] - 2022-01-25 -### Changed -- Updated package dependencies. - -## [1.4.13] - 2022-01-04 -### Changed -- Switch to pcov for code coverage. -- Updated package dependencies - -## [1.4.12] - 2021-12-14 -### Changed -- Updated package dependencies. - -## [1.4.11] - 2021-11-22 -### Changed -- Updated package dependencies - -## [1.4.10] - 2021-11-02 -### Changed -- Set `convertDeprecationsToExceptions` true in PHPUnit config. -- Update PHPUnit configs to include just what needs coverage rather than include everything then try to exclude stuff that doesn't. - -## [1.4.9] - 2021-10-13 -### Changed -- Updated package dependencies. - -## [1.4.8] - 2021-10-12 -### Changed -- Updated package dependencies - -## [1.4.7] - 2021-09-28 -### Changed -- Updated package dependencies. - -## [1.4.6] - 2021-08-30 -### Changed -- Run composer update on test-php command instead of phpunit -- Tests: update PHPUnit polyfills dependency (yoast/phpunit-polyfills). - -## [1.4.5] - 2021-05-25 -### Changed -- Updated package dependencies. - -## [1.4.4] - 2021-04-08 -### Changed -- Packaging and build changes, no change to the package itself. - -## [1.4.3] - 2021-03-30 -### Added -- Composer alias for dev-master, to improve dependencies - -### Changed -- Update package dependencies. - -### Fixed -- Use `composer update` rather than `install` in scripts, as composer.lock isn't checked in. - -## [1.4.2] - 2021-02-05 - -- CI: Make tests more generic - -## [1.4.1] - 2021-01-20 - -- Add mirror-repo information to all current composer packages -- Monorepo: Reorganize all projects - -## [1.4.0] - 2020-12-14 - -- Update dependency brain/monkey to v2.6.0 -- Pin dependencies -- Packages: Update for PHP 8 testing - -## [1.3.1] - 2020-10-28 - -- Updated PHPCS: Packages and Debugger - -## [1.3.0] - 2020-08-13 - -- CI: Try collect js coverage -- Docker: Add package testing shortcut - -## [1.2.0] - 2020-07-01 - -- Package Unit tests: update test file names to make sure they runs in Travis - -## [1.1.0] - 2020-06-22 - -- PHPCS: Clean up the packages -- PHPCS Updates after WPCS 2.3 - -## [1.0.4] - 2019-11-08 - -- Packages: Use classmap instead of PSR-4 - -## [1.0.2] - 2019-10-28 - -- Packages: Add gitattributes files to all packages that need th… - -## [1.0.1] - 2019-09-20 - -- Docs: Unify usage of @package phpdoc tags - -## 1.0.0 - 2019-09-14 - -- Jetpack DNA: Introduce a Roles package - -[2.0.1]: https://github.com/Automattic/jetpack-roles/compare/v2.0.0...v2.0.1 -[2.0.0]: https://github.com/Automattic/jetpack-roles/compare/v1.4.25...v2.0.0 -[1.4.25]: https://github.com/Automattic/jetpack-roles/compare/v1.4.24...v1.4.25 -[1.4.24]: https://github.com/Automattic/jetpack-roles/compare/v1.4.23...v1.4.24 -[1.4.23]: https://github.com/Automattic/jetpack-roles/compare/v1.4.22...v1.4.23 -[1.4.22]: https://github.com/Automattic/jetpack-roles/compare/v1.4.21...v1.4.22 -[1.4.21]: https://github.com/Automattic/jetpack-roles/compare/v1.4.20...v1.4.21 -[1.4.20]: https://github.com/Automattic/jetpack-roles/compare/v1.4.19...v1.4.20 -[1.4.19]: https://github.com/Automattic/jetpack-roles/compare/v1.4.18...v1.4.19 -[1.4.18]: https://github.com/Automattic/jetpack-roles/compare/v1.4.17...v1.4.18 -[1.4.17]: https://github.com/Automattic/jetpack-roles/compare/v1.4.16...v1.4.17 -[1.4.16]: https://github.com/Automattic/jetpack-roles/compare/v1.4.15...v1.4.16 -[1.4.15]: https://github.com/Automattic/jetpack-roles/compare/v1.4.14...v1.4.15 -[1.4.14]: https://github.com/Automattic/jetpack-roles/compare/v1.4.13...v1.4.14 -[1.4.13]: https://github.com/Automattic/jetpack-roles/compare/v1.4.12...v1.4.13 -[1.4.12]: https://github.com/Automattic/jetpack-roles/compare/v1.4.11...v1.4.12 -[1.4.11]: https://github.com/Automattic/jetpack-roles/compare/v1.4.10...v1.4.11 -[1.4.10]: https://github.com/Automattic/jetpack-roles/compare/v1.4.9...v1.4.10 -[1.4.9]: https://github.com/Automattic/jetpack-roles/compare/v1.4.8...v1.4.9 -[1.4.8]: https://github.com/Automattic/jetpack-roles/compare/v1.4.7...v1.4.8 -[1.4.7]: https://github.com/Automattic/jetpack-roles/compare/v1.4.6...v1.4.7 -[1.4.6]: https://github.com/Automattic/jetpack-roles/compare/v1.4.5...v1.4.6 -[1.4.5]: https://github.com/Automattic/jetpack-roles/compare/v1.4.4...v1.4.5 -[1.4.4]: https://github.com/Automattic/jetpack-roles/compare/v1.4.3...v1.4.4 -[1.4.3]: https://github.com/Automattic/jetpack-roles/compare/v1.4.2...v1.4.3 -[1.4.2]: https://github.com/Automattic/jetpack-roles/compare/v1.4.1...v1.4.2 -[1.4.1]: https://github.com/Automattic/jetpack-roles/compare/v1.4.0...v1.4.1 -[1.4.0]: https://github.com/Automattic/jetpack-roles/compare/v1.3.1...v1.4.0 -[1.3.1]: https://github.com/Automattic/jetpack-roles/compare/v1.3.0...v1.3.1 -[1.3.0]: https://github.com/Automattic/jetpack-roles/compare/v1.2.0...v1.3.0 -[1.2.0]: https://github.com/Automattic/jetpack-roles/compare/v1.1.0...v1.2.0 -[1.1.0]: https://github.com/Automattic/jetpack-roles/compare/v1.0.4...v1.1.0 -[1.0.4]: https://github.com/Automattic/jetpack-roles/compare/v1.0.2...v1.0.4 -[1.0.2]: https://github.com/Automattic/jetpack-roles/compare/v1.0.1...v1.0.2 -[1.0.1]: https://github.com/Automattic/jetpack-roles/compare/v1.0.0...v1.0.1 diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-roles/LICENSE.txt b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-roles/LICENSE.txt deleted file mode 100644 index e82774c1..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-roles/LICENSE.txt +++ /dev/null @@ -1,357 +0,0 @@ -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - - -=================================== - - -GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - -Copyright (C) 1989, 1991 Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -Everyone is permitted to copy and distribute verbatim copies -of this license document, but changing it is not allowed. - - Preamble - -The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Lesser General Public License instead.) You can apply it to -your programs, too. - -When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - -To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - -For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - -We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - -Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - -Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - -The precise terms and conditions for copying, distribution and -modification follow. - -GNU GENERAL PUBLIC LICENSE -TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - -0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - -1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - -2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - -a) You must cause the modified files to carry prominent notices -stating that you changed the files and the date of any change. - -b) You must cause any work that you distribute or publish, that in -whole or in part contains or is derived from the Program or any -part thereof, to be licensed as a whole at no charge to all third -parties under the terms of this License. - -c) If the modified program normally reads commands interactively -when run, you must cause it, when started running for such -interactive use in the most ordinary way, to print or display an -announcement including an appropriate copyright notice and a -notice that there is no warranty (or else, saying that you provide -a warranty) and that users may redistribute the program under -these conditions, and telling the user how to view a copy of this -License. (Exception: if the Program itself is interactive but -does not normally print such an announcement, your work based on -the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - -3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - -a) Accompany it with the complete corresponding machine-readable -source code, which must be distributed under the terms of Sections -1 and 2 above on a medium customarily used for software interchange; or, - -b) Accompany it with a written offer, valid for at least three -years, to give any third party, for a charge no more than your -cost of physically performing source distribution, a complete -machine-readable copy of the corresponding source code, to be -distributed under the terms of Sections 1 and 2 above on a medium -customarily used for software interchange; or, - -c) Accompany it with the information you received as to the offer -to distribute corresponding source code. (This alternative is -allowed only for noncommercial distribution and only if you -received the program in object code or executable form with such -an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - -4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - -5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - -6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - -7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - -8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - -9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - -10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - -11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - -12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - -How to Apply These Terms to Your New Programs - -If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - -To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - -Copyright (C) - -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along -with this program; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - -Gnomovision version 69, Copyright (C) year name of author -Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. -This is free software, and you are welcome to redistribute it -under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - -Yoyodyne, Inc., hereby disclaims all copyright interest in the program -`Gnomovision' (which makes passes at compilers) written by James Hacker. - -, 1 April 1989 -Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-roles/SECURITY.md b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-roles/SECURITY.md deleted file mode 100644 index 98f48dd1..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-roles/SECURITY.md +++ /dev/null @@ -1,47 +0,0 @@ -# Security Policy - -Full details of the Automattic Security Policy can be found on [automattic.com](https://automattic.com/security/). - -## Supported Versions - -Generally, only the latest version of Jetpack and its associated plugins have continued support. If a critical vulnerability is found in the current version of a plugin, we may opt to backport any patches to previous versions. - -## Reporting a Vulnerability - -Our HackerOne program covers the below plugin software, as well as a variety of related projects and infrastructure: - -* [Jetpack](https://jetpack.com/) -* Jetpack Backup -* Jetpack Boost -* Jetpack CRM -* Jetpack Protect -* Jetpack Search -* Jetpack Social -* Jetpack VideoPress - -**For responsible disclosure of security issues and to be eligible for our bug bounty program, please submit your report via the [HackerOne](https://hackerone.com/automattic) portal.** - -Our most critical targets are: - -* Jetpack and the Jetpack composer packages (all within this repo) -* Jetpack.com -- the primary marketing site. -* cloud.jetpack.com -- a management site. -* wordpress.com -- the shared management site for both Jetpack and WordPress.com sites. - -For more targets, see the `In Scope` section on [HackerOne](https://hackerone.com/automattic). - -_Please note that the **WordPress software is a separate entity** from Automattic. Please report vulnerabilities for WordPress through [the WordPress Foundation's HackerOne page](https://hackerone.com/wordpress)._ - -## Guidelines - -We're committed to working with security researchers to resolve the vulnerabilities they discover. You can help us by following these guidelines: - -* Follow [HackerOne's disclosure guidelines](https://www.hackerone.com/disclosure-guidelines). -* Pen-testing Production: - * Please **setup a local environment** instead whenever possible. Most of our code is open source (see above). - * If that's not possible, **limit any data access/modification** to the bare minimum necessary to reproduce a PoC. - * **_Don't_ automate form submissions!** That's very annoying for us, because it adds extra work for the volunteers who manage those systems, and reduces the signal/noise ratio in our communication channels. - * To be eligible for a bounty, all of these guidelines must be followed. -* Be Patient - Give us a reasonable time to correct the issue before you disclose the vulnerability. - -We also expect you to comply with all applicable laws. You're responsible to pay any taxes associated with your bounties. diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-roles/composer.json b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-roles/composer.json deleted file mode 100644 index 74d52b8a..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-roles/composer.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "name": "automattic/jetpack-roles", - "description": "Utilities, related with user roles and capabilities.", - "type": "jetpack-library", - "license": "GPL-2.0-or-later", - "require": { - "php": ">=7.0" - }, - "require-dev": { - "brain/monkey": "2.6.1", - "yoast/phpunit-polyfills": "1.1.0", - "automattic/jetpack-changelogger": "^4.1.1" - }, - "suggest": { - "automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package." - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "scripts": { - "phpunit": [ - "./vendor/phpunit/phpunit/phpunit --colors=always" - ], - "test-php": [ - "@composer phpunit" - ] - }, - "minimum-stability": "dev", - "prefer-stable": true, - "extra": { - "autotagger": true, - "mirror-repo": "Automattic/jetpack-roles", - "changelogger": { - "link-template": "https://github.com/Automattic/jetpack-roles/compare/v${old}...v${new}" - }, - "branch-alias": { - "dev-trunk": "2.0.x-dev" - } - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-roles/src/class-roles.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-roles/src/class-roles.php deleted file mode 100644 index 7bce3462..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-roles/src/class-roles.php +++ /dev/null @@ -1,81 +0,0 @@ - 'manage_options', - 'editor' => 'edit_others_posts', - 'author' => 'publish_posts', - 'contributor' => 'edit_posts', - 'subscriber' => 'read', - ); - - /** - * Get the role of the current user. - * - * @access public - * - * @return string|boolean Current user's role, false if not enough capabilities for any of the roles. - */ - public function translate_current_user_to_role() { - foreach ( $this->capability_translations as $role => $cap ) { - if ( current_user_can( $role ) || current_user_can( $cap ) ) { - return $role; - } - } - - return false; - } - - /** - * Get the role of a particular user. - * - * @access public - * - * @param \WP_User $user User object. - * @return string|boolean User's role, false if not enough capabilities for any of the roles. - */ - public function translate_user_to_role( $user ) { - foreach ( $this->capability_translations as $role => $cap ) { - if ( user_can( $user, $role ) || user_can( $user, $cap ) ) { - return $role; - } - } - - return false; - } - - /** - * Get the minimum capability for a role. - * - * @access public - * - * @param string $role Role name. - * @return string|boolean Capability, false if role isn't mapped to any capabilities. - */ - public function translate_role_to_cap( $role ) { - if ( ! isset( $this->capability_translations[ $role ] ) ) { - return false; - } - - return $this->capability_translations[ $role ]; - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-status/CHANGELOG.md b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-status/CHANGELOG.md deleted file mode 100644 index 0cf668ae..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-status/CHANGELOG.md +++ /dev/null @@ -1,387 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file. - -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) -and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - -## [2.1.2] - 2024-03-12 -### Changed -- Internal updates. - -## [2.1.1] - 2024-03-01 -### Fixed -- Avoid issues when the dns_get_record function is not defined [#36019] - -## [2.1.0] - 2024-01-18 -### Added -- Add hosting provider check. [#34864] - -## [2.0.2] - 2023-12-03 -### Fixed -- Module active checks should always be true on WordPress.com simple sites. [#34248] - -## [2.0.1] - 2023-11-21 -### Changed -- Added a note of non-usage of PHP8+ functions yet. [#34137] -- Replaced usage of substr() with str_starts_with() and str_ends_with(). [#34207] - -## [2.0.0] - 2023-11-20 -### Changed -- Updated required PHP version to >= 7.0. [#34192] - -## [1.19.0] - 2023-11-13 -### Added -- Added Host::get_source_query() to return the 'source' query param from the current URL. [#33984] - -## [1.18.5] - 2023-09-25 -### Changed -- Add 127.0.0.1 into the list of known local domains. [#32898] -- WP.com Compatibility: Abort out early checking if Protect is active. WP.com's protection is not site option based. [#33196] - -## [1.18.4] - 2023-09-19 - -- Minor internal updates. - -## [1.18.3] - 2023-09-11 -### Changed -- General: remove backwards-compatibility function checks now that the package supports WP 6.2. [#32772] - -## [1.18.2] - 2023-09-04 -### Fixed -- Exclude domains starting with live from known Pantheon staging domains [#32789] - -## [1.18.1] - 2023-08-23 -### Changed -- Updated package dependencies. [#32605] - -## [1.18.0] - 2023-07-18 -### Added -- Transferred 'get_calypso_env()' method from Jetpack plugin. [#31906] - -## [1.17.2] - 2023-06-19 -### Changed -- Use Plans package to detect feature support. [#31213] - -## [1.17.1] - 2023-05-11 -### Changed -- PHP 8.1 compatibility updates [#30517] - -## [1.17.0] - 2023-04-17 -### Changed -- When Jetpack is available, `Modules::get()` no longer translates `module_tags`. Use Jetpack's `jetpack_get_module_i18n_tag()` function if you need translations. [#30067] - -## [1.16.4] - 2023-04-10 -### Added -- Add Jetpack Autoloader package suggestion. [#29988] - -## [1.16.3] - 2023-03-28 -### Changed -- Move brute force protection into WAF package. [#28401] - -## [1.16.2] - 2023-02-20 -### Changed -- Minor internal updates. - -## [1.16.1] - 2023-01-23 -### Added -- Add new filters for the latest status methods [#28328] - -## [1.16.0] - 2023-01-16 -### Added -- Add 2 new methods to detect whether a site is private or not. [#28322] - -## [1.15.4] - 2023-01-11 -### Changed -- Modules: Allow for deactivating multiple plugins when activating a module. [#28181] - -## [1.15.3] - 2022-12-19 -### Changed -- Updated package dependencies. - -## [1.15.2] - 2022-12-02 -### Changed -- Updated package dependencies. [#27688] - -## [1.15.1] - 2022-11-22 -### Changed -- Updated package dependencies. [#27043] - -## [1.15.0] - 2022-11-07 -### Added -- WordPress.com: add checks for Simple or either Simple/WoA. [#27278] - -## [1.14.3] - 2022-07-26 -### Changed -- Updated package dependencies. [#25158] - -## [1.14.2] - 2022-07-19 -### Changed -- Update logic in `is_woa_site` function for host changes [#25067] - -## [1.14.1] - 2022-06-21 -### Changed -- Renaming master to trunk. - -## [1.14.0] - 2022-06-14 -### Fixed -- Moved the connection_url_redirect action handling to the connection package. [#24529] - -## [1.13.6] - 2022-05-24 -### Added -- Allow plugins to filter the list of available modules. Only activate and consider active modules that are available [#24454] - -## [1.13.5] - 2022-05-20 -### Changed -- Modules: Make activate() method Jetpack plugin agnostic. Allowing standalone plugins to use it without Jetpack. - -## [1.13.4] - 2022-05-19 -### Added -- PHPCS updates. [#24418] - -## [1.13.3] - 2022-05-10 - -## [1.13.2] - 2022-04-26 -### Changed -- Updated package dependencies. - -## [1.13.1] - 2022-04-19 -### Changed -- PHPCS: Fix `WordPress.Security.ValidatedSanitizedInput` - -## [1.13.0] - 2022-04-05 -### Added -- Created Modules and File modules for managing those resources - -## [1.12.0] - 2022-03-02 -### Added -- Cache return values (per blog) from various status methods. - -## [1.11.2] - 2022-02-28 -### Fixed -- Re-doing 1.11.1 to fixup a bad release. - -## [1.11.1] - 2022-02-28 -### Fixed -- Remove trailing semicolor form site suffix. - -## [1.11.0] - 2022-02-22 -### Added -- Add methods to distinguish Newspack and VIP sites. - -## [1.10.0] - 2022-01-25 -### Added -- Added Visitor class for status regarding the site visitor. - -## [1.9.5] - 2022-01-04 -### Changed -- Switch to pcov for code coverage. -- Updated package dependencies - -## [1.9.4] - 2021-12-14 -### Changed -- Updated package dependencies. - -## [1.9.3] - 2021-11-22 -### Changed -- Updated package dependencies - -## [1.9.2] - 2021-11-16 -### Changed -- Add a function_exists check before calling wp_get_environment_type - -## [1.9.1] - 2021-11-02 -### Changed -- Set `convertDeprecationsToExceptions` true in PHPUnit config. -- Update PHPUnit configs to include just what needs coverage rather than include everything then try to exclude stuff that doesn't. - -## [1.9.0] - 2021-10-26 -### Added -- Added Host class for reporting known hosting environment information. - -## [1.8.4] - 2021-10-13 -### Changed -- Updated package dependencies. - -## [1.8.3] - 2021-10-12 -### Changed -- Updated package dependencies - -## [1.8.2] - 2021-09-28 -### Changed -- Updated package dependencies. - -## [1.8.1] - 2021-08-30 -### Changed -- Run composer update on test-php command instead of phpunit -- Tests: update PHPUnit polyfills dependency (yoast/phpunit-polyfills). -- update annotations versions - -## [1.8.0] - 2021-06-15 -### Changed -- Update callback to Jetpack to new Identity_Crisis class. - -## [1.7.6] - 2021-05-25 -### Changed -- Updated package dependencies. - -## [1.7.5] - 2021-04-27 -### Deprecated -- Deprecates is_no_user_testing_mode - -## [1.7.4] - 2021-04-08 -### Changed -- Packaging and build changes, no change to the package itself. - -## [1.7.3] - 2021-03-30 -### Added -- Composer alias for dev-master, to improve dependencies - -### Changed -- Update package dependencies. - -### Fixed -- Use `composer update` rather than `install` in scripts, as composer.lock isn't checked in. - -## [1.7.2] - 2021-02-05 - -- CI: Make tests more generic - -## [1.7.1] - 2021-01-20 - -- Add mirror-repo information to all current composer packages -- Monorepo: Reorganize all projects - -## [1.7.0] - 2020-12-14 - -- Update dependency brain/monkey to v2.6.0 -- Pin dependencies -- Packages: Update for PHP 8 testing - -## [1.6.0] - 2020-11-23 - -- Status: Introduce get_site_suffix method -- Status: Fix test failure -- Status: Improve the staging site detection -- General: update minimum required version to WordPress 5.5 -- Add the no_user_testing mode -- Status: Add a couple of test cases for staging site detection -- Update dependency brain/monkey to v2.5.0 -- Updated PHPCS: Packages and Debugger - -## [1.5.0] - 2020-10-13 - -- Also use Core `wp_get_environment_type` for local - -## [1.4.0] - 2020-08-13 - -- CI: Try collect js coverage - -## [1.3.0] - 2020-07-28 - -- Core Compat: Site Environment - -## [1.2.0] - 2020-06-22 - -- PHPCS: Clean up the packages -- Staging Sites: add newspack staging to the list of known providers - -## [1.1.1] - 2020-01-27 - -- Pin dependency brain/monkey to 2.4.0 - -## [1.1.0] - 2020-01-14 - -- Packages: Various improvements for wp.com or self-contained consumers - -## [1.0.4] - 2019-11-08 - -- Packages: Use classmap instead of PSR-4 - -## [1.0.3] - 2019-10-28 - -- Packages: Add gitattributes files to all packages that need th… - -## [1.0.2] - 2019-10-23 - -- Use spread operator instead of func_get_args - -## [1.0.1] - 2019-09-20 - -- Docs: Unify usage of @package phpdoc tags - -## 1.0.0 - 2019-09-14 - -- Packages: Introduce a status package - -[2.1.2]: https://github.com/Automattic/jetpack-status/compare/v2.1.1...v2.1.2 -[2.1.1]: https://github.com/Automattic/jetpack-status/compare/v2.1.0...v2.1.1 -[2.1.0]: https://github.com/Automattic/jetpack-status/compare/v2.0.2...v2.1.0 -[2.0.2]: https://github.com/Automattic/jetpack-status/compare/v2.0.1...v2.0.2 -[2.0.1]: https://github.com/Automattic/jetpack-status/compare/v2.0.0...v2.0.1 -[2.0.0]: https://github.com/Automattic/jetpack-status/compare/v1.19.0...v2.0.0 -[1.19.0]: https://github.com/Automattic/jetpack-status/compare/v1.18.5...v1.19.0 -[1.18.5]: https://github.com/Automattic/jetpack-status/compare/v1.18.4...v1.18.5 -[1.18.4]: https://github.com/Automattic/jetpack-status/compare/v1.18.3...v1.18.4 -[1.18.3]: https://github.com/Automattic/jetpack-status/compare/v1.18.2...v1.18.3 -[1.18.2]: https://github.com/Automattic/jetpack-status/compare/v1.18.1...v1.18.2 -[1.18.1]: https://github.com/Automattic/jetpack-status/compare/v1.18.0...v1.18.1 -[1.18.0]: https://github.com/Automattic/jetpack-status/compare/v1.17.2...v1.18.0 -[1.17.2]: https://github.com/Automattic/jetpack-status/compare/v1.17.1...v1.17.2 -[1.17.1]: https://github.com/Automattic/jetpack-status/compare/v1.17.0...v1.17.1 -[1.17.0]: https://github.com/Automattic/jetpack-status/compare/v1.16.4...v1.17.0 -[1.16.4]: https://github.com/Automattic/jetpack-status/compare/v1.16.3...v1.16.4 -[1.16.3]: https://github.com/Automattic/jetpack-status/compare/v1.16.2...v1.16.3 -[1.16.2]: https://github.com/Automattic/jetpack-status/compare/v1.16.1...v1.16.2 -[1.16.1]: https://github.com/Automattic/jetpack-status/compare/v1.16.0...v1.16.1 -[1.16.0]: https://github.com/Automattic/jetpack-status/compare/v1.15.4...v1.16.0 -[1.15.4]: https://github.com/Automattic/jetpack-status/compare/v1.15.3...v1.15.4 -[1.15.3]: https://github.com/Automattic/jetpack-status/compare/v1.15.2...v1.15.3 -[1.15.2]: https://github.com/Automattic/jetpack-status/compare/v1.15.1...v1.15.2 -[1.15.1]: https://github.com/Automattic/jetpack-status/compare/v1.15.0...v1.15.1 -[1.15.0]: https://github.com/Automattic/jetpack-status/compare/v1.14.3...v1.15.0 -[1.14.3]: https://github.com/Automattic/jetpack-status/compare/v1.14.2...v1.14.3 -[1.14.2]: https://github.com/Automattic/jetpack-status/compare/v1.14.1...v1.14.2 -[1.14.1]: https://github.com/Automattic/jetpack-status/compare/v1.14.0...v1.14.1 -[1.14.0]: https://github.com/Automattic/jetpack-status/compare/v1.13.6...v1.14.0 -[1.13.6]: https://github.com/Automattic/jetpack-status/compare/v1.13.5...v1.13.6 -[1.13.5]: https://github.com/Automattic/jetpack-status/compare/v1.13.4...v1.13.5 -[1.13.4]: https://github.com/Automattic/jetpack-status/compare/v1.13.3...v1.13.4 -[1.13.3]: https://github.com/Automattic/jetpack-status/compare/v1.13.2...v1.13.3 -[1.13.2]: https://github.com/Automattic/jetpack-status/compare/v1.13.1...v1.13.2 -[1.13.1]: https://github.com/Automattic/jetpack-status/compare/v1.13.0...v1.13.1 -[1.13.0]: https://github.com/Automattic/jetpack-status/compare/v1.12.0...v1.13.0 -[1.12.0]: https://github.com/Automattic/jetpack-status/compare/v1.11.2...v1.12.0 -[1.11.2]: https://github.com/Automattic/jetpack-status/compare/v1.11.1...v1.11.2 -[1.11.1]: https://github.com/Automattic/jetpack-status/compare/v1.11.0...v1.11.1 -[1.11.0]: https://github.com/Automattic/jetpack-status/compare/v1.10.0...v1.11.0 -[1.10.0]: https://github.com/Automattic/jetpack-status/compare/v1.9.5...v1.10.0 -[1.9.5]: https://github.com/Automattic/jetpack-status/compare/v1.9.4...v1.9.5 -[1.9.4]: https://github.com/Automattic/jetpack-status/compare/v1.9.3...v1.9.4 -[1.9.3]: https://github.com/Automattic/jetpack-status/compare/v1.9.2...v1.9.3 -[1.9.2]: https://github.com/Automattic/jetpack-status/compare/v1.9.1...v1.9.2 -[1.9.1]: https://github.com/Automattic/jetpack-status/compare/v1.9.0...v1.9.1 -[1.9.0]: https://github.com/Automattic/jetpack-status/compare/v1.8.4...v1.9.0 -[1.8.4]: https://github.com/Automattic/jetpack-status/compare/v1.8.3...v1.8.4 -[1.8.3]: https://github.com/Automattic/jetpack-status/compare/v1.8.2...v1.8.3 -[1.8.2]: https://github.com/Automattic/jetpack-status/compare/v1.8.1...v1.8.2 -[1.8.1]: https://github.com/Automattic/jetpack-status/compare/v1.8.0...v1.8.1 -[1.8.0]: https://github.com/Automattic/jetpack-status/compare/v1.7.6...v1.8.0 -[1.7.6]: https://github.com/Automattic/jetpack-status/compare/v1.7.5...v1.7.6 -[1.7.5]: https://github.com/Automattic/jetpack-status/compare/v1.7.4...v1.7.5 -[1.7.4]: https://github.com/Automattic/jetpack-status/compare/v1.7.3...v1.7.4 -[1.7.3]: https://github.com/Automattic/jetpack-status/compare/v1.7.2...v1.7.3 -[1.7.2]: https://github.com/Automattic/jetpack-status/compare/v1.7.1...v1.7.2 -[1.7.1]: https://github.com/Automattic/jetpack-status/compare/v1.7.0...v1.7.1 -[1.7.0]: https://github.com/Automattic/jetpack-status/compare/v1.6.0...v1.7.0 -[1.6.0]: https://github.com/Automattic/jetpack-status/compare/v1.5.0...v1.6.0 -[1.5.0]: https://github.com/Automattic/jetpack-status/compare/v1.4.0...v1.5.0 -[1.4.0]: https://github.com/Automattic/jetpack-status/compare/v1.3.0...v1.4.0 -[1.3.0]: https://github.com/Automattic/jetpack-status/compare/v1.2.0...v1.3.0 -[1.2.0]: https://github.com/Automattic/jetpack-status/compare/v1.1.1...v1.2.0 -[1.1.1]: https://github.com/Automattic/jetpack-status/compare/v1.1.0...v1.1.1 -[1.1.0]: https://github.com/Automattic/jetpack-status/compare/v1.0.4...v1.1.0 -[1.0.4]: https://github.com/Automattic/jetpack-status/compare/v1.0.3...v1.0.4 -[1.0.3]: https://github.com/Automattic/jetpack-status/compare/v1.0.2...v1.0.3 -[1.0.2]: https://github.com/Automattic/jetpack-status/compare/v1.0.1...v1.0.2 -[1.0.1]: https://github.com/Automattic/jetpack-status/compare/v1.0.0...v1.0.1 diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-status/LICENSE.txt b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-status/LICENSE.txt deleted file mode 100644 index e82774c1..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-status/LICENSE.txt +++ /dev/null @@ -1,357 +0,0 @@ -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - - -=================================== - - -GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - -Copyright (C) 1989, 1991 Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -Everyone is permitted to copy and distribute verbatim copies -of this license document, but changing it is not allowed. - - Preamble - -The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Lesser General Public License instead.) You can apply it to -your programs, too. - -When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - -To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - -For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - -We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - -Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - -Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - -The precise terms and conditions for copying, distribution and -modification follow. - -GNU GENERAL PUBLIC LICENSE -TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - -0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - -1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - -2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - -a) You must cause the modified files to carry prominent notices -stating that you changed the files and the date of any change. - -b) You must cause any work that you distribute or publish, that in -whole or in part contains or is derived from the Program or any -part thereof, to be licensed as a whole at no charge to all third -parties under the terms of this License. - -c) If the modified program normally reads commands interactively -when run, you must cause it, when started running for such -interactive use in the most ordinary way, to print or display an -announcement including an appropriate copyright notice and a -notice that there is no warranty (or else, saying that you provide -a warranty) and that users may redistribute the program under -these conditions, and telling the user how to view a copy of this -License. (Exception: if the Program itself is interactive but -does not normally print such an announcement, your work based on -the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - -3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - -a) Accompany it with the complete corresponding machine-readable -source code, which must be distributed under the terms of Sections -1 and 2 above on a medium customarily used for software interchange; or, - -b) Accompany it with a written offer, valid for at least three -years, to give any third party, for a charge no more than your -cost of physically performing source distribution, a complete -machine-readable copy of the corresponding source code, to be -distributed under the terms of Sections 1 and 2 above on a medium -customarily used for software interchange; or, - -c) Accompany it with the information you received as to the offer -to distribute corresponding source code. (This alternative is -allowed only for noncommercial distribution and only if you -received the program in object code or executable form with such -an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - -4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - -5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - -6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - -7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - -8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - -9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - -10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - -11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - -12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - -How to Apply These Terms to Your New Programs - -If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - -To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - -Copyright (C) - -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along -with this program; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - -Gnomovision version 69, Copyright (C) year name of author -Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. -This is free software, and you are welcome to redistribute it -under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - -Yoyodyne, Inc., hereby disclaims all copyright interest in the program -`Gnomovision' (which makes passes at compilers) written by James Hacker. - -, 1 April 1989 -Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-status/SECURITY.md b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-status/SECURITY.md deleted file mode 100644 index 98f48dd1..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-status/SECURITY.md +++ /dev/null @@ -1,47 +0,0 @@ -# Security Policy - -Full details of the Automattic Security Policy can be found on [automattic.com](https://automattic.com/security/). - -## Supported Versions - -Generally, only the latest version of Jetpack and its associated plugins have continued support. If a critical vulnerability is found in the current version of a plugin, we may opt to backport any patches to previous versions. - -## Reporting a Vulnerability - -Our HackerOne program covers the below plugin software, as well as a variety of related projects and infrastructure: - -* [Jetpack](https://jetpack.com/) -* Jetpack Backup -* Jetpack Boost -* Jetpack CRM -* Jetpack Protect -* Jetpack Search -* Jetpack Social -* Jetpack VideoPress - -**For responsible disclosure of security issues and to be eligible for our bug bounty program, please submit your report via the [HackerOne](https://hackerone.com/automattic) portal.** - -Our most critical targets are: - -* Jetpack and the Jetpack composer packages (all within this repo) -* Jetpack.com -- the primary marketing site. -* cloud.jetpack.com -- a management site. -* wordpress.com -- the shared management site for both Jetpack and WordPress.com sites. - -For more targets, see the `In Scope` section on [HackerOne](https://hackerone.com/automattic). - -_Please note that the **WordPress software is a separate entity** from Automattic. Please report vulnerabilities for WordPress through [the WordPress Foundation's HackerOne page](https://hackerone.com/wordpress)._ - -## Guidelines - -We're committed to working with security researchers to resolve the vulnerabilities they discover. You can help us by following these guidelines: - -* Follow [HackerOne's disclosure guidelines](https://www.hackerone.com/disclosure-guidelines). -* Pen-testing Production: - * Please **setup a local environment** instead whenever possible. Most of our code is open source (see above). - * If that's not possible, **limit any data access/modification** to the bare minimum necessary to reproduce a PoC. - * **_Don't_ automate form submissions!** That's very annoying for us, because it adds extra work for the volunteers who manage those systems, and reduces the signal/noise ratio in our communication channels. - * To be eligible for a bounty, all of these guidelines must be followed. -* Be Patient - Give us a reasonable time to correct the issue before you disclose the vulnerability. - -We also expect you to comply with all applicable laws. You're responsible to pay any taxes associated with your bounties. diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-status/composer.json b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-status/composer.json deleted file mode 100644 index dc06231a..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-status/composer.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "name": "automattic/jetpack-status", - "description": "Used to retrieve information about the current status of Jetpack and the site overall.", - "type": "jetpack-library", - "license": "GPL-2.0-or-later", - "require": { - "php": ">=7.0", - "automattic/jetpack-constants": "^2.0.1" - }, - "require-dev": { - "brain/monkey": "2.6.1", - "yoast/phpunit-polyfills": "1.1.0", - "automattic/jetpack-changelogger": "^4.1.1", - "automattic/jetpack-ip": "^0.2.2" - }, - "suggest": { - "automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package." - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "scripts": { - "phpunit": [ - "./vendor/phpunit/phpunit/phpunit --colors=always" - ], - "test-php": [ - "@composer phpunit" - ] - }, - "minimum-stability": "dev", - "prefer-stable": true, - "extra": { - "autotagger": true, - "mirror-repo": "Automattic/jetpack-status", - "changelogger": { - "link-template": "https://github.com/Automattic/jetpack-status/compare/v${old}...v${new}" - }, - "branch-alias": { - "dev-trunk": "2.1.x-dev" - } - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-status/src/class-cache.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-status/src/class-cache.php deleted file mode 100644 index 54fa80d8..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-status/src/class-cache.php +++ /dev/null @@ -1,54 +0,0 @@ -admin_url(); - $bits = wp_parse_url( $admin_url ); - - if ( is_array( $bits ) ) { - $path = ( isset( $bits['path'] ) ) ? dirname( $bits['path'] ) : null; - $domain = ( isset( $bits['host'] ) ) ? $bits['host'] : null; - } else { - $path = null; - $domain = null; - } - } - - // Extract state from cookies and delete cookies. - if ( isset( $_COOKIE['jetpackState'] ) && is_array( $_COOKIE['jetpackState'] ) ) { - // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- User should sanitize if necessary. - $yum = wp_unslash( $_COOKIE['jetpackState'] ); - unset( $_COOKIE['jetpackState'] ); - foreach ( $yum as $k => $v ) { - if ( strlen( $v ) ) { - $state[ $k ] = $v; - } - setcookie( "jetpackState[$k]", false, 0, $path, $domain, is_ssl(), true ); - } - } - - if ( $restate ) { - foreach ( $state as $k => $v ) { - setcookie( "jetpackState[$k]", $v, 0, $path, $domain, is_ssl(), true ); - } - return; - } - - // Get a state variable. - if ( isset( $key ) && ! isset( $value ) ) { - if ( array_key_exists( $key, $state ) ) { - return $state[ $key ]; - } - return null; - } - - // Set a state variable. - if ( isset( $key ) && isset( $value ) ) { - if ( is_array( $value ) && isset( $value[0] ) ) { - $value = $value[0]; - } - $state[ $key ] = $value; - if ( ! headers_sent() ) { - if ( $this->should_set_cookie( $key ) ) { - setcookie( "jetpackState[$key]", $value, 0, $path, $domain, is_ssl(), true ); - } - } - } - } - - /** - * Determines whether the jetpackState[$key] value should be added to the - * cookie. - * - * @param string $key The state key. - * - * @return boolean Whether the value should be added to the cookie. - */ - public function should_set_cookie( $key ) { - global $current_screen; - $page = isset( $current_screen->base ) ? $current_screen->base : null; - - if ( 'toplevel_page_jetpack' === $page && 'display_update_modal' === $key ) { - return false; - } - - return true; - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-status/src/class-errors.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-status/src/class-errors.php deleted file mode 100644 index 342f1759..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-status/src/class-errors.php +++ /dev/null @@ -1,43 +0,0 @@ -is_atomic_platform() && Constants::is_true( 'WPCOMSH__PLUGIN_FILE' ); - Cache::set( 'is_woa_site', $ret ); - } - return $ret; - } - - /** - * Determine if the site is hosted on the Atomic hosting platform. - * - * @since 1.9.0 - * - * @return bool; - */ - public function is_atomic_platform() { - return Constants::is_true( 'ATOMIC_SITE_ID' ) && Constants::is_true( 'ATOMIC_CLIENT_ID' ); - } - - /** - * Determine if this is a Newspack site. - * - * @return bool - */ - public function is_newspack_site() { - return Constants::is_defined( 'NEWSPACK_PLUGIN_FILE' ); - } - - /** - * Determine if this is a VIP-hosted site. - * - * @return bool - */ - public function is_vip_site() { - return Constants::is_defined( 'WPCOM_IS_VIP_ENV' ) && true === Constants::get_constant( 'WPCOM_IS_VIP_ENV' ); - } - - /** - * Determine if this is a Simple platform site. - * - * @return bool - */ - public function is_wpcom_simple() { - return Constants::is_defined( 'IS_WPCOM' ) && true === Constants::get_constant( 'IS_WPCOM' ); - } - - /** - * Determine if this is a WordPress.com site. - * - * Includes both Simple and WoA platforms. - * - * @return bool - */ - public function is_wpcom_platform() { - return $this->is_wpcom_simple() || $this->is_woa_site(); - } - - /** - * Add all wordpress.com environments to the safe redirect allowed list. - * - * To be used with a filter of allowed domains for a redirect. - * - * @param array $domains Allowed WP.com Environments. - */ - public static function allow_wpcom_environments( $domains ) { - $domains[] = 'wordpress.com'; - $domains[] = 'jetpack.wordpress.com'; - $domains[] = 'wpcalypso.wordpress.com'; - $domains[] = 'horizon.wordpress.com'; - $domains[] = 'calypso.localhost'; - return $domains; - } - - /** - * Return Calypso environment value; used for developing Jetpack and pairing - * it with different Calypso environments, such as localhost. - * - * @since 1.18.0 - * - * @return string Calypso environment - */ - public function get_calypso_env() { - // phpcs:disable WordPress.Security.NonceVerification.Recommended -- Nonce is not required; only used for changing environments. - if ( isset( $_GET['calypso_env'] ) ) { - return sanitize_key( $_GET['calypso_env'] ); - } - // phpcs:enable WordPress.Security.NonceVerification.Recommended - - if ( getenv( 'CALYPSO_ENV' ) ) { - return sanitize_key( getenv( 'CALYPSO_ENV' ) ); - } - - if ( defined( 'CALYPSO_ENV' ) && CALYPSO_ENV ) { - return sanitize_key( CALYPSO_ENV ); - } - - return ''; - } - - /** - * Return source query param value from the URL if exists in the allowed sources list. - * - * @return string "source" query param value - */ - public function get_source_query() { - // phpcs:disable WordPress.Security.NonceVerification.Recommended - $allowed_sources = array( 'jetpack-manage' ); - if ( isset( $_GET['source'] ) && in_array( $_GET['source'], $allowed_sources, true ) ) { - return sanitize_key( $_GET['source'] ); - } - - return ''; - } - - /** - * Returns an array of nameservers for the current site. - * - * @param string $domain The domain of the site to check. - * @return array - */ - public function get_nameserver_dns_records( $domain ) { - if ( ! function_exists( 'dns_get_record' ) ) { - return array(); - } - - $dns_records = dns_get_record( $domain, DNS_NS ); // Fetches the DNS records of type NS (Name Server) - $nameservers = array(); - foreach ( $dns_records as $record ) { - if ( isset( $record['target'] ) ) { - $nameservers[] = $record['target']; // Adds the nameserver to the array - } - } - - return $nameservers; // Returns an array of nameserver names - } - - /** - * Given a DNS entry, will return a hosting provider if one can be determined. Otherwise, will return 'unknown'. - * Sourced from: fbhepr%2Skers%2Sjcpbz%2Sjc%2Qpbagrag%2Syvo%2Subfgvat%2Qcebivqre%2Sanzrfreiref.cuc-og - * - * @param string $domain The domain of the site to check. - * @return string The hosting provider of 'unknown'. - */ - public function get_hosting_provider_by_nameserver( $domain ) { - $known_nameservers = array( - 'bluehost' => array( - '.bluehost.com', - ), - 'dreamhost' => array( - '.dreamhost.com', - ), - 'mediatemple' => array( - '.mediatemple.net', - ), - 'xserver' => array( - '.xserver.jp', - ), - 'namecheap' => array( - '.namecheaphosting.com', - ), - 'hostmonster' => array( - '.hostmonster.com', - ), - 'justhost' => array( - '.justhost.com', - ), - 'digitalocean' => array( - '.digitalocean.com', - ), - 'one' => array( - '.one.com', - ), - 'hostpapa' => array( - '.hostpapa.com', - ), - 'siteground' => array( - '.sgcloud.net', - '.sgedu.site', - '.sgsrv1.com', - '.sgvps.net', - '.siteground.biz', - '.siteground.net', - '.siteground.eu', - ), - 'inmotion' => array( - '.inmotionhosting.com', - ), - 'ionos' => array( - '.ui-dns.org', - '.ui-dns.de', - '.ui-dns.biz', - '.ui-dns.com', - ), - ); - - $dns_records = $this->get_nameserver_dns_records( $domain ); - $dns_records = array_map( 'strtolower', $dns_records ); - - foreach ( $known_nameservers as $host => $ns_patterns ) { - foreach ( $ns_patterns as $ns_pattern ) { - foreach ( $dns_records as $record ) { - if ( false !== strpos( $record, $ns_pattern ) ) { - return $host; - } - } - } - } - - return 'unknown'; - } - - /** - * Returns a guess of the hosting provider for the current site based on various checks. - * - * @return string - */ - public function get_known_host_guess() { - $host = Cache::get( 'host_guess' ); - - if ( null !== $host ) { - return $host; - } - - // First, let's check if we can recognize provider manually: - switch ( true ) { - case $this->is_woa_site(): - $provider = 'woa'; - break; - case $this->is_atomic_platform(): - $provider = 'atomic'; - break; - case $this->is_newspack_site(): - $provider = 'newspack'; - break; - case $this->is_vip_site(): - $provider = 'vip'; - break; - case $this->is_wpcom_simple(): - case $this->is_wpcom_platform(): - $provider = 'wpcom'; - break; - default: - $provider = 'unknown'; - break; - } - - // Second, let's check if we can recognize provider by nameservers: - $domain = isset( $_SERVER['SERVER_NAME'] ) ? sanitize_text_field( wp_unslash( $_SERVER['SERVER_NAME'] ) ) : ''; - if ( $provider === 'unknown' && ! empty( $domain ) ) { - $provider = $this->get_hosting_provider_by_nameserver( $domain ); - } - - Cache::set( 'host_guess', $provider ); - return $provider; - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-status/src/class-modules.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-status/src/class-modules.php deleted file mode 100644 index 1ab9c8f8..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-status/src/class-modules.php +++ /dev/null @@ -1,604 +0,0 @@ -get_path( $this->get_slug( $module ) ); - - if ( isset( $modules_details[ $module ] ) ) { - $mod = $modules_details[ $module ]; - } else { - $mod = jetpack_get_module_info( $module ); - - if ( null === $mod ) { - // Try to get the module info from the file as a fallback. - $mod = $this->get_file_data( $file, jetpack_get_all_module_header_names() ); - - if ( empty( $mod['name'] ) ) { - // No info for this module. - return false; - } - } - - $mod['sort'] = empty( $mod['sort'] ) ? 10 : (int) $mod['sort']; - $mod['recommendation_order'] = empty( $mod['recommendation_order'] ) ? 20 : (int) $mod['recommendation_order']; - $mod['deactivate'] = empty( $mod['deactivate'] ); - $mod['free'] = empty( $mod['free'] ); - $mod['requires_connection'] = ( ! empty( $mod['requires_connection'] ) && 'No' === $mod['requires_connection'] ) ? false : true; - $mod['requires_user_connection'] = ( empty( $mod['requires_user_connection'] ) || 'No' === $mod['requires_user_connection'] ) ? false : true; - - if ( empty( $mod['auto_activate'] ) || ! in_array( strtolower( $mod['auto_activate'] ), array( 'yes', 'no', 'public' ), true ) ) { - $mod['auto_activate'] = 'No'; - } else { - $mod['auto_activate'] = (string) $mod['auto_activate']; - } - - if ( $mod['module_tags'] ) { - $mod['module_tags'] = explode( ',', $mod['module_tags'] ); - $mod['module_tags'] = array_map( 'trim', $mod['module_tags'] ); - } else { - $mod['module_tags'] = array( 'Other' ); - } - - if ( $mod['plan_classes'] ) { - $mod['plan_classes'] = explode( ',', $mod['plan_classes'] ); - $mod['plan_classes'] = array_map( 'strtolower', array_map( 'trim', $mod['plan_classes'] ) ); - } else { - $mod['plan_classes'] = array( 'free' ); - } - - if ( $mod['feature'] ) { - $mod['feature'] = explode( ',', $mod['feature'] ); - $mod['feature'] = array_map( 'trim', $mod['feature'] ); - } else { - $mod['feature'] = array( 'Other' ); - } - - $modules_details[ $module ] = $mod; - - } - - /** - * Filters the feature array on a module. - * - * This filter allows you to control where each module is filtered: Recommended, - * and the default "Other" listing. - * - * @since-jetpack 3.5.0 - * - * @param array $mod['feature'] The areas to feature this module: - * 'Recommended' shows on the main Jetpack admin screen. - * 'Other' should be the default if no other value is in the array. - * @param string $module The slug of the module, e.g. sharedaddy. - * @param array $mod All the currently assembled module data. - */ - $mod['feature'] = apply_filters( 'jetpack_module_feature', $mod['feature'], $module, $mod ); - - /** - * Filter the returned data about a module. - * - * This filter allows overriding any info about Jetpack modules. It is dangerous, - * so please be careful. - * - * @since-jetpack 3.6.0 - * - * @param array $mod The details of the requested module. - * @param string $module The slug of the module, e.g. sharedaddy - * @param string $file The path to the module source file. - */ - return apply_filters( 'jetpack_get_module', $mod, $module, $file ); - } - - /** - * Like core's get_file_data implementation, but caches the result. - * - * @param string $file Absolute path to the file. - * @param array $headers List of headers, in the format array( 'HeaderKey' => 'Header Name' ). - */ - public function get_file_data( $file, $headers ) { - // Get just the filename from $file (i.e. exclude full path) so that a consistent hash is generated. - $file_name = basename( $file ); - - if ( ! Constants::is_defined( 'JETPACK__VERSION' ) ) { - return get_file_data( $file, $headers ); - } - - $cache_key = 'jetpack_file_data_' . JETPACK__VERSION; - - $file_data_option = get_transient( $cache_key ); - - if ( ! is_array( $file_data_option ) ) { - delete_transient( $cache_key ); - $file_data_option = false; - } - - if ( false === $file_data_option ) { - $file_data_option = array(); - } - - $key = md5( $file_name . maybe_serialize( $headers ) ); - $refresh_cache = is_admin() && isset( $_GET['page'] ) && str_starts_with( $_GET['page'], 'jetpack' ); // phpcs:ignore WordPress.Security.NonceVerification.Recommended, WordPress.Security.ValidatedSanitizedInput - - // If we don't need to refresh the cache, and already have the value, short-circuit! - if ( ! $refresh_cache && isset( $file_data_option[ $key ] ) ) { - return $file_data_option[ $key ]; - } - - $data = get_file_data( $file, $headers ); - - $file_data_option[ $key ] = $data; - - set_transient( $cache_key, $file_data_option, 29 * DAY_IN_SECONDS ); - - return $data; - } - - /** - * Get a list of activated modules as an array of module slugs. - */ - public function get_active() { - $active = \Jetpack_Options::get_option( 'active_modules' ); - - if ( ! is_array( $active ) ) { - $active = array(); - } - - if ( class_exists( 'VaultPress' ) || function_exists( 'vaultpress_contact_service' ) ) { - $active[] = 'vaultpress'; - } else { - $active = array_diff( $active, array( 'vaultpress' ) ); - } - - // If protect is active on the main site of a multisite, it should be active on all sites. Doesn't apply to WP.com. - if ( ! in_array( 'protect', $active, true ) - && ! ( new Host() )->is_wpcom_simple() - && is_multisite() - && get_site_option( 'jetpack_protect_active' ) ) { - $active[] = 'protect'; - } - - // If it's not available, it shouldn't be active. - // We don't delete it from the options though, as it will be active again when a plugin gets reactivated. - $active = array_intersect( $active, $this->get_available() ); - - /** - * Allow filtering of the active modules. - * - * Gives theme and plugin developers the power to alter the modules that - * are activated on the fly. - * - * @since-jetpack 5.8.0 - * - * @param array $active Array of active module slugs. - */ - $active = apply_filters( 'jetpack_active_modules', $active ); - - return array_unique( $active ); - } - - /** - * Extract a module's slug from its full path. - * - * @param string $file Full path to a file. - * - * @return string Module slug. - */ - public function get_slug( $file ) { - return str_replace( '.php', '', basename( $file ) ); - } - - /** - * List available Jetpack modules. Simply lists .php files in /modules/. - * Make sure to tuck away module "library" files in a sub-directory. - * - * @param bool|string $min_version Only return modules introduced in this version or later. Default is false, do not filter. - * @param bool|string $max_version Only return modules introduced before this version. Default is false, do not filter. - * @param bool|null $requires_connection Pass a boolean value to only return modules that require (or do not require) a connection. - * @param bool|null $requires_user_connection Pass a boolean value to only return modules that require (or do not require) a user connection. - * - * @return array $modules Array of module slugs - */ - public function get_available( $min_version = false, $max_version = false, $requires_connection = null, $requires_user_connection = null ) { - static $modules = null; - - if ( ! class_exists( 'Jetpack' ) || ! Constants::is_defined( 'JETPACK__VERSION' ) || ! Constants::is_defined( 'JETPACK__PLUGIN_DIR' ) ) { - return array_unique( - /** - * Stand alone plugins need to use this filter to register the modules they interact with. - * This will allow them to activate and deactivate these modules even when Jetpack is not present. - * Note: Standalone plugins can only interact with modules that also exist in the Jetpack plugin, otherwise they'll lose the ability to control it if Jetpack is activated. - * - * @since 1.13.6 - * - * @param array $modules The list of available modules as an array of slugs. - * @param bool $requires_connection Whether to list only modules that require a connection to work. - * @param bool $requires_user_connection Whether to list only modules that require a user connection to work. - */ - apply_filters( 'jetpack_get_available_standalone_modules', array(), $requires_connection, $requires_user_connection ) - ); - } - - if ( ! isset( $modules ) ) { - $available_modules_option = \Jetpack_Options::get_option( 'available_modules', array() ); - // Use the cache if we're on the front-end and it's available... - if ( ! is_admin() && ! empty( $available_modules_option[ JETPACK__VERSION ] ) ) { - $modules = $available_modules_option[ JETPACK__VERSION ]; - } else { - $files = ( new Files() )->glob_php( JETPACK__PLUGIN_DIR . 'modules' ); - - $modules = array(); - - foreach ( $files as $file ) { - $slug = $this->get_slug( $file ); - $headers = $this->get( $slug ); - - if ( ! $headers ) { - continue; - } - - $modules[ $slug ] = $headers['introduced']; - } - - \Jetpack_Options::update_option( - 'available_modules', - array( - JETPACK__VERSION => $modules, - ) - ); - } - } - - /** - * Filters the array of modules available to be activated. - * - * @since 2.4.0 - * - * @param array $modules Array of available modules. - * @param string $min_version Minimum version number required to use modules. - * @param string $max_version Maximum version number required to use modules. - * @param bool|null $requires_connection Value of the Requires Connection filter. - * @param bool|null $requires_user_connection Value of the Requires User Connection filter. - */ - $mods = apply_filters( 'jetpack_get_available_modules', $modules, $min_version, $max_version, $requires_connection, $requires_user_connection ); - - if ( ! $min_version && ! $max_version && $requires_connection === null && $requires_user_connection === null ) { - return array_keys( $mods ); - } - - $r = array(); - foreach ( $mods as $slug => $introduced ) { - if ( $min_version && version_compare( $min_version, $introduced, '>=' ) ) { - continue; - } - - if ( $max_version && version_compare( $max_version, $introduced, '<' ) ) { - continue; - } - - $mod_details = $this->get( $slug ); - - if ( null !== $requires_connection && (bool) $requires_connection !== $mod_details['requires_connection'] ) { - continue; - } - - if ( null !== $requires_user_connection && (bool) $requires_user_connection !== $mod_details['requires_user_connection'] ) { - continue; - } - - $r[] = $slug; - } - - return $r; - } - - /** - * Is slug a valid module. - * - * @param string $module Module slug. - * - * @return bool - */ - public function is_module( $module ) { - return ! empty( $module ) && ! validate_file( $module, $this->get_available() ); - } - - /** - * Update module status. - * - * @param string $module - module slug. - * @param boolean $active - true to activate, false to deactivate. - * @param bool $exit Should exit be called after deactivation. - * @param bool $redirect Should there be a redirection after activation. - */ - public function update_status( $module, $active, $exit = true, $redirect = true ) { - return $active ? $this->activate( $module, $exit, $redirect ) : $this->deactivate( $module ); - } - - /** - * Activate a module. - * - * @param string $module Module slug. - * @param bool $exit Should exit be called after deactivation. - * @param bool $redirect Should there be a redirection after activation. - * - * @return bool|void - */ - public function activate( $module, $exit = true, $redirect = true ) { - /** - * Fires before a module is activated. - * - * @since 2.6.0 - * - * @param string $module Module slug. - * @param bool $exit Should we exit after the module has been activated. Default to true. - * @param bool $redirect Should the user be redirected after module activation? Default to true. - */ - do_action( 'jetpack_pre_activate_module', $module, $exit, $redirect ); - - if ( ! strlen( $module ) ) { - return false; - } - - // If it's already active, then don't do it again. - $active = $this->get_active(); - foreach ( $active as $act ) { - if ( $act === $module ) { - return true; - } - } - - if ( ! $this->is_module( $module ) ) { - return false; - } - - // Jetpack plugin only - if ( class_exists( 'Jetpack' ) ) { - - $module_data = $this->get( $module ); - - $status = new Status(); - $state = new CookieState(); - - if ( ! \Jetpack::is_connection_ready() ) { - if ( ! $status->is_offline_mode() && ! $status->is_onboarding() ) { - return false; - } - - // If we're not connected but in offline mode, make sure the module doesn't require a connection. - if ( $status->is_offline_mode() && $module_data['requires_connection'] ) { - return false; - } - } - - if ( class_exists( 'Jetpack_Client_Server' ) ) { - $jetpack = \Jetpack::init(); - - // Check and see if the old plugin is active. - if ( isset( $jetpack->plugins_to_deactivate[ $module ] ) ) { - // Deactivate the old plugins. - $deactivated = array(); - foreach ( $jetpack->plugins_to_deactivate[ $module ] as $idx => $deactivate_me ) { - if ( \Jetpack_Client_Server::deactivate_plugin( $deactivate_me[0], $deactivate_me[1] ) ) { - // If we deactivated the old plugin, remembere that with ::state() and redirect back to this page to activate the module - // We can't activate the module on this page load since the newly deactivated old plugin is still loaded on this page load. - $deactivated[] = "$module:$idx"; - } - } - if ( $deactivated ) { - $state->state( 'deactivated_plugins', implode( ',', $deactivated ) ); - wp_safe_redirect( add_query_arg( 'jetpack_restate', 1 ) ); - exit; - } - } - } - - // Protect won't work with mis-configured IPs. - if ( 'protect' === $module ) { - if ( ! IP_Utils::get_ip() ) { - $state->state( 'message', 'protect_misconfigured_ip' ); - return false; - } - } - - if ( ! Jetpack_Plan::supports( $module ) ) { - return false; - } - - // Check the file for fatal errors, a la wp-admin/plugins.php::activate. - $errors = new Errors(); - $state->state( 'module', $module ); - $state->state( 'error', 'module_activation_failed' ); // we'll override this later if the plugin can be included without fatal error. - $errors->catch_errors( true ); - - ob_start(); - $module_path = $this->get_path( $module ); - if ( file_exists( $module_path ) ) { - require $this->get_path( $module ); // phpcs:ignore WordPressVIPMinimum.Files.IncludingFile.NotAbsolutePath - } - - $active[] = $module; - $this->update_active( $active ); - - $state->state( 'error', false ); // the override. - ob_end_clean(); - $errors->catch_errors( false ); - } else { // Not a Jetpack plugin. - $active[] = $module; - $this->update_active( $active ); - } - - if ( $redirect ) { - wp_safe_redirect( ( new Paths() )->admin_url( 'page=jetpack' ) ); - } - if ( $exit ) { - exit; - } - return true; - } - - /** - * Deactivate module. - * - * @param string $module Module slug. - * - * @return bool - */ - public function deactivate( $module ) { - /** - * Fires when a module is deactivated. - * - * @since 1.9.0 - * - * @param string $module Module slug. - */ - do_action( 'jetpack_pre_deactivate_module', $module ); - - $active = $this->get_active(); - $new = array_filter( array_diff( $active, (array) $module ) ); - - return $this->update_active( $new ); - } - - /** - * Generate a module's path from its slug. - * - * @param string $slug Module slug. - */ - public function get_path( $slug ) { - if ( ! Constants::is_defined( 'JETPACK__PLUGIN_DIR' ) ) { - return ''; - } - /** - * Filters the path of a modules. - * - * @since 7.4.0 - * - * @param array $return The absolute path to a module's root php file - * @param string $slug The module slug - */ - return apply_filters( 'jetpack_get_module_path', JETPACK__PLUGIN_DIR . "modules/$slug.php", $slug ); - } - - /** - * Saves all the currently active modules to options. - * Also fires Action hooks for each newly activated and deactivated module. - * - * @param array $modules Array of active modules to be saved in options. - * - * @return $success bool true for success, false for failure. - */ - public function update_active( $modules ) { - $current_modules = \Jetpack_Options::get_option( 'active_modules', array() ); - $active_modules = $this->get_active(); - $new_active_modules = array_diff( $modules, $current_modules ); - $new_inactive_modules = array_diff( $active_modules, $modules ); - $new_current_modules = array_diff( array_merge( $current_modules, $new_active_modules ), $new_inactive_modules ); - $reindexed_modules = array_values( $new_current_modules ); - $success = \Jetpack_Options::update_option( 'active_modules', array_unique( $reindexed_modules ) ); - // Let's take `pre_update_option_jetpack_active_modules` filter into account - // and actually decide for which modules we need to fire hooks by comparing - // the 'active_modules' option before and after the update. - $current_modules_post_update = \Jetpack_Options::get_option( 'active_modules', array() ); - - $new_inactive_modules = array_diff( $current_modules, $current_modules_post_update ); - $new_inactive_modules = array_unique( $new_inactive_modules ); - $new_inactive_modules = array_values( $new_inactive_modules ); - - $new_active_modules = array_diff( $current_modules_post_update, $current_modules ); - $new_active_modules = array_unique( $new_active_modules ); - $new_active_modules = array_values( $new_active_modules ); - - foreach ( $new_active_modules as $module ) { - /** - * Fires when a specific module is activated. - * - * @since 1.9.0 - * - * @param string $module Module slug. - * @param boolean $success whether the module was activated. @since 4.2 - */ - do_action( 'jetpack_activate_module', $module, $success ); - /** - * Fires when a module is activated. - * The dynamic part of the filter, $module, is the module slug. - * - * @since 1.9.0 - * - * @param string $module Module slug. - */ - do_action( "jetpack_activate_module_$module", $module ); - } - - foreach ( $new_inactive_modules as $module ) { - /** - * Fired after a module has been deactivated. - * - * @since 4.2.0 - * - * @param string $module Module slug. - * @param boolean $success whether the module was deactivated. - */ - do_action( 'jetpack_deactivate_module', $module, $success ); - /** - * Fires when a module is deactivated. - * The dynamic part of the filter, $module, is the module slug. - * - * @since 1.9.0 - * - * @param string $module Module slug. - */ - do_action( "jetpack_deactivate_module_$module", $module ); - } - - return $success; - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-status/src/class-paths.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-status/src/class-paths.php deleted file mode 100644 index a3313c66..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-status/src/class-paths.php +++ /dev/null @@ -1,28 +0,0 @@ - 'jetpack' ) ); - $url = add_query_arg( $args, admin_url( 'admin.php' ) ); - return $url; - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-status/src/class-status.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-status/src/class-status.php deleted file mode 100644 index dfa7cab7..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-status/src/class-status.php +++ /dev/null @@ -1,415 +0,0 @@ -is_offline_mode(). - * - * @return bool Whether Jetpack's offline mode is active. - */ - public function is_development_mode() { - _deprecated_function( __FUNCTION__, '1.3.0', 'Automattic\Jetpack\Status->is_offline_mode' ); - return $this->is_offline_mode(); - } - - /** - * Is Jetpack in offline mode? - * - * This was formerly called "Development Mode", but sites "in development" aren't always offline/localhost. - * - * @since 1.3.0 - * - * @return bool Whether Jetpack's offline mode is active. - */ - public function is_offline_mode() { - $cached = Cache::get( 'is_offline_mode' ); - if ( null !== $cached ) { - return $cached; - } - - $offline_mode = false; - - if ( defined( '\\JETPACK_DEV_DEBUG' ) ) { - $offline_mode = constant( '\\JETPACK_DEV_DEBUG' ); - } elseif ( defined( '\\WP_LOCAL_DEV' ) ) { - $offline_mode = constant( '\\WP_LOCAL_DEV' ); - } elseif ( $this->is_local_site() ) { - $offline_mode = true; - } - - /** - * Filters Jetpack's offline mode. - * - * @see https://jetpack.com/support/development-mode/ - * @todo Update documentation ^^. - * - * @since 1.1.1 - * @since-jetpack 2.2.1 - * @deprecated 1.3.0 - * - * @param bool $offline_mode Is Jetpack's offline mode active. - */ - $offline_mode = (bool) apply_filters_deprecated( 'jetpack_development_mode', array( $offline_mode ), '1.3.0', 'jetpack_offline_mode' ); - - /** - * Filters Jetpack's offline mode. - * - * @see https://jetpack.com/support/development-mode/ - * @todo Update documentation ^^. - * - * @since 1.3.0 - * - * @param bool $offline_mode Is Jetpack's offline mode active. - */ - $offline_mode = (bool) apply_filters( 'jetpack_offline_mode', $offline_mode ); - - Cache::set( 'is_offline_mode', $offline_mode ); - return $offline_mode; - } - - /** - * Is Jetpack in "No User test mode"? - * - * This will make Jetpack act as if there were no connected users, but only a site connection (aka blog token) - * - * @since 1.6.0 - * @deprecated 1.7.5 Since this version, Jetpack connection is considered active after registration, making no_user_testing_mode obsolete. - * - * @return bool Whether Jetpack's No User Testing Mode is active. - */ - public function is_no_user_testing_mode() { - _deprecated_function( __METHOD__, '1.7.5' ); - return true; - } - - /** - * Whether this is a system with a multiple networks. - * Implemented since there is no core is_multi_network function. - * Right now there is no way to tell which network is the dominant network on the system. - * - * @return boolean - */ - public function is_multi_network() { - global $wpdb; - - $cached = Cache::get( 'is_multi_network' ); - if ( null !== $cached ) { - return $cached; - } - - // If we don't have a multi site setup no need to do any more. - if ( ! is_multisite() ) { - Cache::set( 'is_multi_network', false ); - return false; - } - - $num_sites = $wpdb->get_var( "SELECT COUNT(*) FROM {$wpdb->site}" ); - if ( $num_sites > 1 ) { - Cache::set( 'is_multi_network', true ); - return true; - } - - Cache::set( 'is_multi_network', false ); - return false; - } - - /** - * Whether the current site is single user site. - * - * @return bool - */ - public function is_single_user_site() { - global $wpdb; - - $ret = Cache::get( 'is_single_user_site' ); - if ( null === $ret ) { - $some_users = get_transient( 'jetpack_is_single_user' ); - if ( false === $some_users ) { - $some_users = $wpdb->get_var( "SELECT COUNT(*) FROM (SELECT user_id FROM $wpdb->usermeta WHERE meta_key = '{$wpdb->prefix}capabilities' LIMIT 2) AS someusers" ); - set_transient( 'jetpack_is_single_user', (int) $some_users, 12 * HOUR_IN_SECONDS ); - } - $ret = 1 === (int) $some_users; - Cache::set( 'is_single_user_site', $ret ); - } - return $ret; - } - - /** - * If the site is a local site. - * - * @since 1.3.0 - * - * @return bool - */ - public function is_local_site() { - $cached = Cache::get( 'is_local_site' ); - if ( null !== $cached ) { - return $cached; - } - - $site_url = site_url(); - - // Check for localhost and sites using an IP only first. - // Note: str_contains() is not used here, as wp-includes/compat.php is not loaded in this file. - $is_local = $site_url && false === strpos( $site_url, '.' ); - - // Use Core's environment check, if available. - if ( 'local' === wp_get_environment_type() ) { - $is_local = true; - } - - // Then check for usual usual domains used by local dev tools. - $known_local = array( - '#\.local$#i', - '#\.localhost$#i', - '#\.test$#i', - '#\.docksal$#i', // Docksal. - '#\.docksal\.site$#i', // Docksal. - '#\.dev\.cc$#i', // ServerPress. - '#\.lndo\.site$#i', // Lando. - '#^https?://127\.0\.0\.1$#', - ); - - if ( ! $is_local ) { - foreach ( $known_local as $url ) { - if ( preg_match( $url, $site_url ) ) { - $is_local = true; - break; - } - } - } - - /** - * Filters is_local_site check. - * - * @since 1.3.0 - * - * @param bool $is_local If the current site is a local site. - */ - $is_local = apply_filters( 'jetpack_is_local_site', $is_local ); - - Cache::set( 'is_local_site', $is_local ); - return $is_local; - } - - /** - * If is a staging site. - * - * @todo Add IDC detection to a package. - * - * @return bool - */ - public function is_staging_site() { - $cached = Cache::get( 'is_staging_site' ); - if ( null !== $cached ) { - return $cached; - } - - /* - * Core's wp_get_environment_type allows for a few specific options. - * We should default to bowing out gracefully for anything other than production or local. - */ - $is_staging = ! in_array( wp_get_environment_type(), array( 'production', 'local' ), true ); - - $known_staging = array( - 'urls' => array( - '#\.staging\.wpengine\.com$#i', // WP Engine. This is their legacy staging URL structure. Their new platform does not have a common URL. https://github.com/Automattic/jetpack/issues/21504 - '#\.staging\.kinsta\.com$#i', // Kinsta.com. - '#\.kinsta\.cloud$#i', // Kinsta.com. - '#\.stage\.site$#i', // DreamPress. - '#\.newspackstaging\.com$#i', // Newspack. - '#^(?!live-)([a-zA-Z0-9-]+)\.pantheonsite\.io$#i', // Pantheon. - '#\.flywheelsites\.com$#i', // Flywheel. - '#\.flywheelstaging\.com$#i', // Flywheel. - '#\.cloudwaysapps\.com$#i', // Cloudways. - '#\.azurewebsites\.net$#i', // Azure. - '#\.wpserveur\.net$#i', // WPServeur. - '#\-liquidwebsites\.com$#i', // Liquidweb. - ), - 'constants' => array( - 'IS_WPE_SNAPSHOT', // WP Engine. This is used on their legacy staging environment. Their new platform does not have a constant. https://github.com/Automattic/jetpack/issues/21504 - 'KINSTA_DEV_ENV', // Kinsta.com. - 'WPSTAGECOACH_STAGING', // WP Stagecoach. - 'JETPACK_STAGING_MODE', // Generic. - 'WP_LOCAL_DEV', // Generic. - ), - ); - /** - * Filters the flags of known staging sites. - * - * @since 1.1.1 - * @since-jetpack 3.9.0 - * - * @param array $known_staging { - * An array of arrays that each are used to check if the current site is staging. - * @type array $urls URLs of staging sites in regex to check against site_url. - * @type array $constants PHP constants of known staging/developement environments. - * } - */ - $known_staging = apply_filters( 'jetpack_known_staging', $known_staging ); - - if ( isset( $known_staging['urls'] ) ) { - $site_url = site_url(); - foreach ( $known_staging['urls'] as $url ) { - if ( preg_match( $url, wp_parse_url( $site_url, PHP_URL_HOST ) ) ) { - $is_staging = true; - break; - } - } - } - - if ( isset( $known_staging['constants'] ) ) { - foreach ( $known_staging['constants'] as $constant ) { - if ( defined( $constant ) && constant( $constant ) ) { - $is_staging = true; - } - } - } - - // Last, let's check if sync is erroring due to an IDC. If so, set the site to staging mode. - if ( ! $is_staging && method_exists( 'Automattic\\Jetpack\\Identity_Crisis', 'validate_sync_error_idc_option' ) && \Automattic\Jetpack\Identity_Crisis::validate_sync_error_idc_option() ) { - $is_staging = true; - } - - /** - * Filters is_staging_site check. - * - * @since 1.1.1 - * @since-jetpack 3.9.0 - * - * @param bool $is_staging If the current site is a staging site. - */ - $is_staging = apply_filters( 'jetpack_is_staging_site', $is_staging ); - - Cache::set( 'is_staging_site', $is_staging ); - return $is_staging; - } - - /** - * Whether the site is currently onboarding or not. - * A site is considered as being onboarded if it currently has an onboarding token. - * - * @since-jetpack 5.8 - * - * @access public - * @static - * - * @return bool True if the site is currently onboarding, false otherwise - */ - public function is_onboarding() { - return \Jetpack_Options::get_option( 'onboarding' ) !== false; - } - - /** - * Whether the site is currently private or not. - * On WordPress.com and WoA, sites can be marked as private - * - * @since 1.16.0 - * - * @return bool True if the site is private. - */ - public function is_private_site() { - $ret = Cache::get( 'is_private_site' ); - if ( null === $ret ) { - $is_private_site = '-1' === get_option( 'blog_public' ); - - /** - * Filters the is_private_site check. - * - * @since 1.16.1 - * - * @param bool $is_private_site True if the site is private. - */ - $is_private_site = apply_filters( 'jetpack_is_private_site', $is_private_site ); - - Cache::set( 'is_private_site', $is_private_site ); - return $is_private_site; - } - return $ret; - } - - /** - * Whether the site is currently unlaunched or not. - * On WordPress.com and WoA, sites can be marked as "coming soon", aka unlaunched - * - * @since 1.16.0 - * - * @return bool True if the site is not launched. - */ - public function is_coming_soon() { - $ret = Cache::get( 'is_coming_soon' ); - if ( null === $ret ) { - $is_coming_soon = (bool) ( function_exists( 'site_is_coming_soon' ) && \site_is_coming_soon() ) - || get_option( 'wpcom_public_coming_soon' ); - - /** - * Filters the is_coming_soon check. - * - * @since 1.16.1 - * - * @param bool $is_coming_soon True if the site is coming soon (i.e. unlaunched). - */ - $is_coming_soon = apply_filters( 'jetpack_is_coming_soon', $is_coming_soon ); - - Cache::set( 'is_coming_soon', $is_coming_soon ); - return $is_coming_soon; - } - return $ret; - } - - /** - * Returns the site slug suffix to be used as part of Calypso URLs. - * - * Strips http:// or https:// from a url, replaces forward slash with ::. - * - * @since 1.6.0 - * - * @param string $url Optional. URL to build the site suffix from. Default: Home URL. - * - * @return string - */ - public function get_site_suffix( $url = '' ) { - // On WordPress.com, site suffixes are a bit different. - if ( method_exists( 'WPCOM_Masterbar', 'get_calypso_site_slug' ) ) { - return WPCOM_Masterbar::get_calypso_site_slug( get_current_blog_id() ); - } - - // Grab the 'site_url' option for WoA sites to avoid plugins to interfere with the site - // identifier (e.g. i18n plugins may change the main url to '/', but we - // want to exclude the locale since it's not part of the site suffix). - if ( ( new Host() )->is_woa_site() ) { - $url = \site_url(); - } - - if ( empty( $url ) ) { - // WordPress can be installed in subdirectories (e.g. make.wordpress.org/plugins) - // where the 'site_url' option points to the root domain (e.g. make.wordpress.org) - // which could collide with another site in the same domain but with WordPress - // installed in a different subdirectory (e.g. make.wordpress.org/core). To avoid - // such collision, we identify the site with the 'home_url' option. - $url = \home_url(); - } - - $url = preg_replace( '#^.*?://#', '', $url ); - $url = str_replace( '/', '::', $url ); - - return rtrim( $url, ':' ); - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-status/src/class-visitor.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-status/src/class-visitor.php deleted file mode 100644 index 518e5029..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-status/src/class-visitor.php +++ /dev/null @@ -1,43 +0,0 @@ -= 7.0. [#34192] - -## [1.60.1] - 2023-10-31 - -## [1.60.0] - 2023-10-26 -### Removed -- Remove Jetpack option jetpack-memberships-connected-account-id. [#32354] - -## [1.59.2] - 2023-10-24 -### Changed -- Update sync version. - -## [1.59.1] - 2023-10-24 -### Added -- Sync: Add missing support for supplying additional columns to do checksum on. [#33440] - -## [1.59.0] - 2023-10-23 -### Changed -- Dedicated Sync: Update 'init' hook priority on Dedicated Sync requests to 0, in order to start sending Sync actions to WPCOM and exit as early as possible. [#33594] - -## [1.58.1] - 2023-10-18 -### Fixed -- Update dependencies. - -## [1.58.0] - 2023-10-16 -### Changed -- Migrated 'jetpack_sync_before_send*' actions for Sync queue to 'jetpack_sync_before_enqueue' instead. [#33384] - -## [1.57.4] - 2023-10-10 - -- Minor internal updates. - -## [1.57.3] - 2023-09-28 -### Removed -- Remove compatibility code for PHP <5.5. [#33288] - -## [1.57.2] - 2023-09-25 -### Added -- Site Settings Endpoint: Allow for updating and retrieving of the wpcom_newsletter_categories site option. [#33234] - -## [1.57.1] - 2023-09-20 -### Added -- Adds legacy contact and locked mode options for 100-year plan [#33081] - -## [1.57.0] - 2023-09-19 -### Added -- Added a definition of a WooCommerce HPOS table to Jetpack Sync. [#32774] -- Jetpack Sync: Drop Sync custom queue table when Jetpack is disconnected [#32940] -- Woo: add HPOS (custom order tables) events to sync module. [#32530] - -## [1.56.0] - 2023-09-04 -### Added -- Add wpcom_newsletter_categories_enabled site option [#32569] -- Whitelist the blog option for auto conversion settings. [#32693] - -## [1.55.2] - 2023-08-28 -### Fixed -- Re-adds the jetpack-memberships-connected-account-id option to whitelist. [#32632] - -## [1.55.1] - 2023-08-23 -### Changed -- Updated package dependencies. [#32605] - -## [1.55.0] - 2023-08-21 -### Removed -- Remove Jetpack option jetpack-memberships-connected-account-id [#32125] - -## [1.54.0] - 2023-08-15 -### Added -- Extract Sync Queue storage handling to an external class to prepare for Custom Table migration [#32275] - -## [1.53.0] - 2023-08-09 -### Added -- Jetpack Sync: Custom table initialization and migration functionality [#32135] -- Jetpack Sync: Drop custom table on sender uninstall [#32335] - -## [1.52.0] - 2023-08-01 -### Added -- Add support for a custom database table for Sync Queue. [#32111] -- Extract Sync Queue storage handling to an external class to prepare for Custom Table migration. [#32089] -- Sync: Add feature flag for enabling custom queue table. [#31681] - -## [1.51.0] - 2023-07-17 -### Added -- Jetpack & Jetpack Sync: Added cache check when trying to spawn dedicated sync or update JETPACK__VERSION to avoid additional requests to the DB if external cache is available. [#31645] -- Newsletters: Add option to enable subscribe modal. [#31393] -- Sync: Add support for additional guest and note meta fields [#31810] - -## [1.50.2] - 2023-07-05 -### Added -- Sync wpcom_site_setup site option [#31662] - -## [1.50.1] - 2023-07-04 -### Changed -- Revert dedicated hook endpoint to later in the 'init' hook, as it broke existing code that registers post statuses and such during 'init'. [#31685] - -## [1.50.0] - 2023-06-26 -### Added -- Added a new callable to the whitelist for get_loaded_extensions(). [#31333] -- CPT Exclusion: do not sync Jetpack Inspect Log entries. [#31535] - -### Fixed -- Initialize dedicated hook endpoint earlier in the 'init' hook to avoid cookie conflicts. [#31423] - -## [1.49.0] - 2023-05-29 -### Added -- Added `wpcom_reader_views_enabled` option to default sync list [#30800] - -### Changed -- FSE: remove usage of `gutenberg_is_fse_theme` for modern `wp_is_block_theme` [#30806] - -## [1.48.1] - 2023-05-15 -### Changed -- PHP 8 compatibility updates. [#30599] -- PHP 8.1 compatibility updates [#30523] - -## [1.48.0] - 2023-05-08 -### Changed -- Use Jetpack Constants to check the value of REST_API_REQUEST in Settings:is_syncing function so we're able to overwrite the value and render some jetpack blocks via the rest api endpoint [#30400] - -## [1.47.9] - 2023-05-02 -### Changed -- Internal updates. - -## [1.47.8] - 2023-05-01 -### Changed -- Internal updates. - -## [1.47.7] - 2023-04-10 -### Added -- Add Jetpack Autoloader package suggestion. [#29988] - -## [1.47.6] - 2023-04-04 -### Changed -- Sync: Lowered priority to sync so that the hook is run at the end. [#29804] - -## [1.47.5] - 2023-04-03 -### Changed -- Minor internal updates. - -## [1.47.4] - 2023-03-28 -### Changed -- Move brute force protection into WAF package. [#28401] - -## [1.47.3] - 2023-03-20 -### Changed -- Updated package dependencies. [#29480] - -## [1.47.2] - 2023-02-20 -### Changed -- Minor internal updates. - -## [1.47.1] - 2023-01-23 -### Added -- Close PHP Session if it's active when running a Dedicated Sync request. [#28515] - -### Fixed -- Jetpack Sync: prevent syncing user update when corresponding flags are not set. [#28385] - -## [1.47.0] - 2023-01-18 -### Removed -- Removed the deprecated option jetpack_blogging_prompts_enabled from defaults [#28387] - -## [1.46.1] - 2023-01-11 -### Changed -- Updated package dependencies. - -## [1.46.0] - 2022-12-27 -### Added -- Added woocommerce_cod_settings to the options whitelist. [#27988] - -## [1.45.0] - 2022-12-19 -### Added -- Adding new boolean site option of 'wpcom-subscription-emails-use-excerpt'. [#27908] -- Sync Launchpad-related options: `launchpad_screen` and `launchpad_checklist_tasks_statuses`. [#27843] - -### Changed -- Option: Update featured_image_email_enabled option name to wpcom_featured_image_in_email. [#27955] - -### Fixed -- Improve PHP 8.2 compatibility. [#27968] - -## [1.44.2] - 2022-12-06 -### Changed -- Updated package dependencies. - -## [1.44.1] - 2022-12-02 -### Changed -- Updated package dependencies. [#27688] - -## [1.44.0] - 2022-11-30 -### Added -- Added full response logging for failed Sync data requests. [#27644] - -### Fixed -- Make sure Dedicated Sync can revert back to Default Sync if it stops sending events for one reason or another. [#27632] - -## [1.43.2] - 2022-11-28 -### Changed -- Sync: Limit next_sync_time lock to be at most 1 hour in the future [#27606] - -## [1.43.1] - 2022-11-22 -### Changed -- Updated package dependencies. [#27043] - -## [1.43.0] - 2022-11-17 -### Added -- Added new sync option for launch-status [#27434] -- Jetpack Sync: Add new endpoint for resetting Sync locks. [#27446] - -## [1.42.0] - 2022-11-14 -### Changed -- Save attached media to post meta [#26930] - -## [1.41.0] - 2022-11-07 -### Changed -- Jetpack Sync: add Updates module in required Sync modules. [#27182] -- Updated package dependencies. [#27278] - -## [1.40.3] - 2022-11-01 -### Added -- Adds wpcom_gifting_subscription option for syncing [#27116] - -## [1.40.2] - 2022-10-27 -### Fixed -- Check $action_links is still array after plugin_action_links filter has been applied. [#27076] - -## [1.40.1] - 2022-10-25 -### Added -- Added featured_image_email_enabled option for syncing [#27009] - -### Changed -- Search Sync Settings :: Add Marketplace product extra fields meta to allow list [#26927] -- Updated package dependencies. [#26705] - -## [1.40.0] - 2022-10-17 -### Added -- Adding the `sl-insta-media` post type to the Sync blacklist as the post type data isn't relevant to Sync and takes up non-trivial resources. [#26826] - -## [1.39.0] - 2022-10-11 -### Added -- Added some taxonomies to be indexed by Search. [#26683] - -## [1.38.4] - 2022-09-20 -### Added -- Gutenberg Support: add additional theme_supports items to our synced allowlist. [#26239] - -### Changed -- Default Theme Support: Add support for new feature added in WP 6.1 [#26236] -- Theme Supports: updated allowed values list to align with a Core change r54159-core [#26220] - -## [1.38.3] - 2022-09-08 -### Changed -- Updated package dependencies. - -## [1.38.2] - 2022-08-29 -### Changed -- Updated package dependencies. - -## [1.38.1] - 2022-08-25 -### Changed -- Search Sync Settings :: Add Marketplace related meta fields and taxonomies to allow list [#25376] - -## [1.38.0] - 2022-08-23 -### Added -- Search: add product-brand to taxonomy sync list to support WooCommerce Brands plugin. [#25665] - -### Changed -- Updated package dependencies. [#25628] - -## [1.37.1] - 2022-08-03 -### Changed -- Updated package dependencies. [#25300, #25315] - -## [1.37.0] - 2022-07-26 -### Changed -- Jetpack Sync: Add Sync lock related info in Sync debug details. [#25140] -- Updated package dependencies. [#25158] - -### Fixed -- Dedicated Sync: Enable sending of callables outside of admin context, since Dedicated Sync requests always work outside of admin scope. [#25143] - -## [1.36.1] - 2022-07-06 -### Added -- Add new WordPress core `block-templates` theme feature to `Defaults::$default_theme_support_whitelist` [#24960] - -## [1.36.0] - 2022-06-28 -### Added -- Posts: added a Sync call to make sure post content is up to date before publishing. [#24827] - -### Changed -- Minimum Sync Config: Update required modules and options [#24831] - -### Fixed -- Sync Table Checksums: Table checksum should be enabled depending on corresponding Sync modulee [#24772] - -## [1.35.2] - 2022-06-21 -### Changed -- Renaming master to trunk. [#24661] - -## [1.35.1] - 2022-06-14 -### Added -- Add a request lock to prevent multiple requests being spawned at once [#24734] - -### Changed -- Updated package dependencies. [#24529] - -## [1.35.0] - 2022-05-30 -### Changed -- Sync: Add '_jetpack_blogging_prompt_key' to default post meta whitelist - -## [1.34.0] - 2022-05-24 -### Changed -- Dedicated Sync - Introduce custom endpoint for spawning Sync requests [#24468] -- Sync: Add 'active_modules' to default whitelisted callables. [#24453] - -## [1.33.1] - 2022-05-19 -### Removed -- Removed dedicated sync custom endpoints pending error investigation [#24419] - -## [1.33.0] - 2022-05-18 -### Changed -- Dedicated Sync: Introduce custom endpoint for spawning Sync requests [#24344] - -## [1.32.0] - 2022-05-10 -### Added -- Search: add search options to option whitelist [#24167] - -## [1.31.1] - 2022-05-04 -### Changed -- Updated package dependencies. [#24095] -- WordPress 6.1 Compatibilty [#24083] - -### Deprecated -- Moved the options class into Connection. [#24095] - -## [1.31.0] - 2022-04-26 -### Added -- Adds filter to get_themes callable - -### Deprecated -- Removed Heartbeat by hoisting it into Connection. - -## [1.30.8] - 2022-04-19 -### Added -- Added get_themes Callable to sync the list of installed themes on a site -- Added get_themes to Sync defaults - -### Changed -- PHPCS: Fix `WordPress.Security.ValidatedSanitizedInput` -- Updated package dependencies. - -## [1.30.7] - 2022-04-12 -### Added -- Adding new site option to be synced. - -## [1.30.6] - 2022-04-06 -### Changed -- Updated package dependencies. - -### Fixed -- Dedicated Sync: Only try to run the sender once if Dedicated Sync is enabled as it has its own requeueing mechanism. - -## [1.30.5] - 2022-03-29 -### Changed -- Microperformance: Use === null instead of is_null - -## [1.30.4] - 2022-03-23 -### Changed -- Enable syncing of dedicated_sync_enabled Sync setting - -### Fixed -- Dedicated Sync: Allow spawning request with expired Retry-After - -## [1.30.3] - 2022-03-15 -### Changed -- Search Sync Settings :: Add ETB taxonomy to allow list. - -## [1.30.2] - 2022-03-08 -### Changed -- Disallow syncing of _term_meta post_type - -## [1.30.1] - 2022-03-02 -### Added -- Dedicated Sync flow: Allow enabling or disabling via WPCOM response header - -## [1.30.0] - 2022-02-22 -### Added -- Add Sync dedicated request flow. - -### Changed -- Updated package dependencies. - -## [1.29.2] - 2022-02-09 -### Added -- Allow sync package consumers to provide custom data settings. - -### Fixed -- Fixed some new PHPCS warnings. - -## [1.29.1] - 2022-02-02 -### Changed -- Updated package dependencies. - -## [1.29.0] - 2022-01-25 -### Added -- Jetpack Search: update the allowed post meta when search is active to include all indexable meta. - -## [1.28.2] - 2022-01-18 -### Changed -- Updated package dependencies. - -## [1.28.1] - 2022-01-13 -### Changed -- Updated package dependencies. - -## [1.28.0] - 2022-01-04 -### Changed -- Listener: Do not enqueue actions when the site is disconnected -- Switch to pcov for code coverage. -- Theme deletions: rely on Core WP hook now that the package requires WP 5.8. -- Updated package dependencies -- Updated package textdomain from `jetpack` to `jetpack-sync`. - -## [1.27.6] - 2021-12-14 -### Changed -- Updated package dependencies. - -## [1.27.5] - 2021-11-30 -### Changed -- Updated package dependencies. - -## [1.27.4] - 2021-11-23 -### Changed -- Updated package dependencies. - -## [1.27.3] - 2021-11-16 -### Changed -- Actions: add the do_only_first_initial_sync method which starts an initial sync only when one hasn't already been done - -## [1.27.2] - 2021-11-09 -### Added -- Constants: Now syncing Atomic platform constant - -### Changed -- Full Sync : limit included users to contributors and above (based on wp_user_limit) -- Updated package dependencies. -- User Checksums - limit scope to users with wp_user_level > 0 - -### Fixed -- Fix PHP 8.1 deprecation warnings. - -## [1.27.1] - 2021-11-02 -### Changed -- Set `convertDeprecationsToExceptions` true in PHPUnit config. -- Update PHPUnit configs to include just what needs coverage rather than include everything then try to exclude stuff that doesn't. - -## [1.27.0] - 2021-10-26 -### Added -- Added the _wpas_feature_enabled meta key to the sync list -- Sync Error Log to capture failed sync requests. - -### Fixed -- Check the return value of get_comment() before to use it. -- Increase send timeout to 20 seconds allowing capture of WP.com 408 responses. - -## [1.26.4] - 2021-10-13 -### Changed -- Sync Checksums: Convert text fields to latin1 before generating checksum. -- Updated package dependencies. - -### Fixed -- Sync Checksums - Update distinct clause to use $wpdb-> table names to accouunt for differences in prefixes. - -## [1.26.3] - 2021-10-12 -### Changed -- Updated package dependencies - -### Removed -- Remove initialization of the identity-crisis package. That will be handled by the Config package. - -### Fixed -- Reduce transient expiration for how often we check the state of the queue. -- Sync Checksums - exclude locale from checksum if same as site setting -- Sync Checksums - use distinct query when calculating count of Term Relationships - -## [1.26.2] - 2021-09-28 -### Added -- Add support for checksumming user-related tabled: wp_users and wp_usermeta - -### Changed -- Update annotations versions. -- Updated package dependencies. - -### Fixed -- Resolve indirect modification notice. -- Sync Checksums: utilize distinct clause in term counts. -- Sync Queue: better handling of serialization issues and empty actions. - -## [1.26.1] - 2021-09-03 -### Fixed -- Add better checks if the WooCommerce tables should be enabled for checksum/fix. -- Prevent PHP notices on queue_pull if all args are not set. - -## [1.26.0] - 2021-08-30 -### Added -- Add support for WooCommerce table to the checksum/fix process. -- Enable support for utf8 conversion during checksum calculation. - -### Changed -- Don't run composer install on regular phpunit script -- Tests: update PHPUnit polyfills dependency (yoast/phpunit-polyfills). - -### Fixed -- Sync Checksums - ensure last object is included in histogram - -## [1.25.0] - 2021-08-12 -### Added -- Add package version tracking. -- Add `wpcom_is_fse_activated` to sync list -- Made /sync/object endpoint accessible over POST, not only GET, to allow fetching more items in a single request. - -## [1.24.2] - 2021-08-02 - -- Reverted: Sync option for the Carousel to display colorized slide background. - -## [1.24.1] - 2021-07-29 -### Changed -- Utilize an import for WP_Error in all instances. - -### Fixed -- Fixed unqualified WP_Error use in the Rest_Sender class. - -## [1.24.0] - 2021-07-27 -### Added -- Add a package version constant. -- Add Full Site Editing support to callback options. -- Sync option for the Carousel to display colorized slide background. - -### Fixed -- Update Sender so it adheres to max upload bytes when not encoding items. - -## [1.23.3] - 2021-07-16 -### Fixed -- Update Options module to return jetpack_sync_settings_* values from the Settings class vs direct option lookup. - -## [1.23.2] - 2021-07-13 -### Changed -- Updated package dependencies. - -### Fixed -- Performance of Sync checksums degraded with the update to correlated subquery. This restricts its usage to term_taxonomy joins only." - -## [1.23.1] - 2021-07-01 -### Changed -- Checksum parent_table joins need distinct selection to account for possibility of multiple rows. - -### Fixed -- Update term_taxonomy checksum query to an allowed list vs disallowed - -## [1.23.0] - 2021-06-29 -### Added -- Add jetpack_idc_disonnect action to clear Sync options on disconnect. -- Add support to callables to sync/object endpoint. -- Enable sync/object endpoint support for theme-info. -- Enhance updates module to support get_objects_by_id. -- Expand sync/object to support constants. -- Extend sync/object to support callables. -- Implement v4 REST endpoints. -- Initialize the IDC package in the Sync package. - -### Removed -- Remove product_cat from blocked taxonomies - -## [1.22.0] - 2021-06-15 -### Changed -- Sync: Adding the Identity_Crisis package. -- Updated package dependencies. - -### Deprecated -- Deprecated URL methods in `Automattic\Jetpack\Sync\Functions` in favor of `Automattic\Jetpack\Connection\Urls`. - -## [1.21.3] - 2021-05-25 -### Changed -- Performance: If no Full Sync is in process early return before we update options. - -### Fixed -- Janitorial: avoid PHP notices in some edge-cases -- Update Meta Module so get_object_by_id returns all meta values. - -## [1.21.2] - 2021-04-27 -### Added -- Added the password-checker package the the Sync package composer.json file. - -### Changed -- Updated package dependencies. - -### Fixed -- Sync: removed references to the JETPACK__PLUGIN_DIR constant. -- Sync Checksums : updated postmeta range query performance #19337. - -## [1.21.1] - 2021-03-30 -### Added -- Composer alias for dev-master, to improve dependencies -- Implement a 60 second back-off for non-200 respones, if no retry-after header is present in the response. -- Impose a max limit of 2MB on post meta values that are synced. -- Impose a max limit of 5MB on post_content that can be synced. - -### Changed -- Sync: Use the new Password_Checker package instead of Jetpack_Password_Checker. -- Update package dependencies. -- Use the Heartbeat package to generate the stats array - -### Fixed -- Migrate locks to update_option to avaoid memcache inconsistencies that can be introduced by delete_option usage. -- Update Sync Queue so that serialize is wrapped to catch errors - -## [1.21.0] - 2021-02-23 - -- General: update WordPress version requirements to WP 5.6 -- Update Checksums to support blacklisted taxonomies. -- Refactor Jetpack callables into the plugin using existing filter jetpack_sync_callable_whitelist -- Wrap call_user_func in is_callable so that we don't trigger warnings for callables that don't exist. -- Sync: Trigger initial sync on jetpack_site_registered -- Update Comments checksum field to comment_date_gmt. We cannot use comment_content directly due to charset/filters. -- Deprecate jetpack_json_wrap -- Remove Sync's usage of wp_startswith - -## [1.20.2] - 2021-02-08 - -- Update dependencies to latest stable - -## [1.20.1] - 2021-01-28 - -- Update dependencies to latest stable - -## [1.20.0] - 2021-01-26 - -- Sync Concurrency / Race Conditions -- Sync: Prevent an PHP warning -- Jetpack Sync: Checksums: Use a better way to fetch and validate fields against table -- Add mirror-repo information to all current composer packages -- Full Sync :: Reduce Concurrency. -- Monorepo: Reorganize all projects -- Various PHPCS and Cleanup - -## [1.19.4] - 2021-01-18 - -- Update dependencies to latest stable - -## [1.19.3] - 2021-01-18 - -- Full Sync :: Reduce Concurrency. - -## [1.19.2] - 2020-12-21 - -- Update the do_full_sync function to early return if we are in SYNC READ ONLY mode. -- Return an empty array if the specified range is empty. (It was returning the checksum for the WHOLE dataset). - -## [1.19.1] - 2020-12-17 - -## [1.19.0] - 2020-12-17 - -- sync: Improve sync checksum algorithm and endpoints -- wp_get_environment_type as callable. -- Disallow amp_validated_url as it is not site content but instead validation errors for amp mark-up. -- Whitelist (allow) jetpack_sync_settings_* options to be synced -- Re-order Sync default option whitelist (allowlist) - -## [1.18.1] - 2020-11-24 - -- Version packages for release - -## [1.18.0] - 2020-11-24 - -- Migrate jetpack_published_post to wp_after_insert_post hook -- Check value to determine if we should enable sync after an action enqueuement. -- General: update minimum required version to WordPress 5.5 -- Fix remaining phpcs warnings in most of requirelist -- Update access of comment_status_to_approval_value to allow extension. -- Update get_term Replicastore function to handle term_taxonomy_id option -- Update get_terms to utilize ensure_taxonomy so that the Taxonomy is registered. -- Addtion of note on explict return of null instead of false if option not found. -- Alignment of comment_status_to_approval_value function. Addition of post-trashed status and cleanup of cases. -- Alignment with implemenations. Call ensure_taxonomy to ensure Taxonomies have been initialized. -- Call ensure_taxonomy within get_object_terms so that the taxonomy is registered before action is performed. -- Updated PHPCS: Packages and Debugger - -## [1.17.2] - 2020-11-05 - -- Update dependencies to latest stable - -## [1.17.1] - 2020-10-29 - -- Update dependencies to latest stable - -## [1.17.0] - 2020-10-27 - -- WPCOM Block Editor: Update meta key name -- Resolve PHP Warning with array_filter usage in sync of action_links. -- Sync: Seperate theme data ( name, version, slug and uri) from theme support data -- Replaced intval() with (int) as part of issue #17432. -- Replaced strval() with type casting (string) as part of issue #17432. -- Replaced floatval() with type cast (float) as part of issue #17432. -- Make XMLRPC methods available for blog token - -## [1.16.4] - 2020-10-14 - -- Update dependencies to latest stable - -## [1.16.3] - 2020-10-09 - -- Update dependencies to latest stable - -## [1.16.2] - 2020-10-06 - -- Update dependencies to latest stable - -## [1.16.1] - 2020-10-01 - -- Update dependencies to latest stable - -## [1.16.0] - 2020-09-29 - -- Publicize: Allow publishing a post as a Twitter thread. -- props @jmdodd - filter out set_object_terms actions that don't perform any update. Includes unit tests. -- Sort Arrays by keys before generating callable checksums -- Packages: avoid PHPCS warnings -- Adding 'review' to whitelisted comment types -- Disable Sync sending on Backup API Requests -- Sync: stop trying to check for edit_comment capability -- Added options to sync wc whitelist -- Sync: Improve theme support syncing - -## [1.15.1] - 2020-09-09 - -- Update dependencies to latest stable - -## [1.15.0] - 2020-08-26 - -- Sync: add Creative Mail configuration option to synced options -- Extend sync_status endpoint with optional debug_details field -- REST API endpoints: expand management endpoints -- Sync: Fix nonce action string in theme edit sync -- WP 5.5 Compat: Align Jetpack and Core's plugin autoupdates -- use current user token to updateRole request -- Resolve Sync Errors from empty edge case and WP.com returning concurrent_request_error -- Rework Sender to properly return state during do_full_sync - -## [1.14.4] - 2020-08-10 - -- WP 5.5 Compat: Align Jetpack and Core's plugin autoupdates - -## [1.14.3] - 2020-08-10 - -- Update dependencies to latest stable - -## [1.14.2] - 2020-08-10 - -- Update dependencies to latest stable - -## [1.14.1] - 2020-08-10 - -- Resolve Sync Errors from empty edge case and WP.com returning concurrent_request_error - -## [1.14.0] - 2020-07-28 - -- Core Compat: Site Environment -- Unit Tests: fix tests according to changes in Core -- Utilize the blog token vs master user token to send sync actions. - -## [1.13.2] - 2020-07-06 - -- Update dependencies to latest stable - -## [1.13.1] - 2020-07-01 - -- Update dependencies to latest stable - -## [1.13.0] - 2020-06-30 - -- Block Flamingo Plugin post types in Jetpack Sync -- Explicit single execution of do_full_sync from cron -- Update to reference the property defined in the Jetpack Connection Manager class -- PHPCS: Clean up the packages -- WordAds: Add consent support for California Consumer Privacy Act (CCPA) -- Sync: Add additional support for theme_support_whitelist - -## [1.12.4] - 2020-06-02 - -- Revert "Fix `jetpack sync start` CLI command (#16010)" - -## [1.12.3] - 2020-06-01 - -- Update dependencies to latest stable - -## [1.12.2] - 2020-06-01 - -- Fix `jetpack sync start` CLI command - -## [1.12.1] - 2020-05-29 - -- Sync: Add additional support for theme_support_whitelist - -## [1.12.0] - 2020-05-26 - -- Update ReplicaStore to call clean_comment_cache when comments are upserted or a reset is perofrmed. -- Store the list of active plugins that uses connection in an option -- Jetpack Sync :: Alternate non-blocking flow -- Settings - Writing: add a toggle to Carousel so users can hide comment area -- Sender needs to load consistently utilizing logic -- Always delete items from the queue even if the buffer is no longer checked out. -- Update the hook of Sync's Comment module to not send meta actions when the comment_type is not whitelisted. -- Sync Comments apply whitelist to all actions - -## [1.11.0] - 2020-04-28 - -- Correct inline documentation "Array" type -- Filter out blacklisted post_types for deleted_post actions. -- Publicize: Add jetpack_publicize_options -- Blacklisting Post Types from Sync -- Comments: update default comment type -- Jetpack Sync: Split `jetpack_post_meta_batch_delete` in action to be called in chunks of 100 items, compared to all at once. -- Update Sync limits based on analysis of data loss events. - -## [1.10.0] - 2020-03-31 - -- Update dependencies to latest stable - -## [1.9.0] - 2020-03-31 - -- Debugger: Add sync health progress bar -- Add main network WPCOM blog ID to sync functions -- Masterbar: send wpcom user ID to wpcom when attempting to log… -- Sync: a better readme - -## [1.8.0] - 2020-02-25 - -- Minileven: add options back as they still exist on sites -- Sync: add queue size to actions -- Mobile Theme: remove feature - -## [1.7.6] - 2020-02-14 - -- get_sync_status does not properly account for unexpected states. - -## [1.7.5] - 2020-02-14 - -- Empty Helper function for checkin handler -- Sync Health: fix excessive data loss reports -- Initial Sync Health Status Class and Data Loss Handler -- Stop REST API Log entries from being synced - -## [1.7.4+vip] - 2020-02-14 - -- Empty Helper function for checkin handler - -## [1.7.4] - 2020-01-23 - -- Sync Chunk Keys need to be unique - -## [1.7.3] - 2020-01-20 - -- Sync: ensure we run the initial sync on new connections - -## [1.7.2] - 2020-01-17 - -- Sync Package: use Full_Sync_Immediately by default -- Adding new managed WordPress hosts to be identified in class-functions.php. - -## [1.7.1] - 2020-01-14 - -- Packages: Various improvements for wp.com or self-contained consumers - -## [1.7.0] - 2020-01-14 - -- Trying to add deterministic initialization. - -## [1.6.3] - 2020-01-07 - -- Fix git history. - -## [1.6.2] - 2019-12-31 - -- Sync: Remove DEFAULT_SYNC_MODULES legacy map -- Connection: Loose Comparison for Port Number in Signatures - -## [1.6.1] - 2019-12-13 - -- tweak default sync settings - -## [1.6.0] - 2019-12-02 - -- Sync: Full Sync: Send immediately. - -## [1.5.1] - 2019-11-26 - -- Marked the xmlrpc_api_url method as deprecated. - -## [1.5.0] - 2019-11-25 - -- Remove sync settings cache - -## [1.4.0] - 2019-11-19 - -- Full Sync: Don't allow more than one request to enqueue -- Sync: Update Max Int - -## [1.3.4] - 2019-11-08 - -- Packages: Use classmap instead of PSR-4 - -## [1.3.3] - 2019-11-08 - -- Deprecate Jetpack::is_development_mode() in favor of the packaged Status()->is_development_mode() - -## [1.3.2] - 2019-11-01 - -- Full Sync updates to allow full enqueuing of chunks. - -## [1.3.1] - 2019-10-29 - -- PHPCS: Rest of the packages - -## [1.3.0] - 2019-10-29 - -- Sync: Checkout Endpoint: Add `pop` argument 😱 - -## [1.2.1] - 2019-10-28 - -- Sync: Add Settings to enable/disable the sender for a particular queue - -## [1.2.0] - 2019-10-24 - -- Sync: Fix how we enqueue term_relationships on full sync 🏝 -- WP 5.3: Use modern wp_timezone -- Check for last_error when enqueuing IDs - -## [1.1.1] - 2019-10-23 - -- Use spread operator instead of func_get_args - -## [1.1.0] - 2019-10-07 - -- Sync: Ensure a post object is returned -- PHPCS: Sync Functions -- Sync: Bail initial sync if there is an ongoing full sync - -## [1.0.2] - 2019-09-25 - -- Sync: Only allow white listed comment types to be inserted. -- Sync: Move sync_object XML-RPC method from connection to sync -- Sync: do not sync comments made via Action Scheduler -- Docs: Unify usage of @package phpdoc tags - -## [1.0.1] - 2019-09-14 - -## 1.0.0 - 2019-09-14 - -- Packages: Move sync to a classmapped package - -[2.10.1]: https://github.com/Automattic/jetpack-sync/compare/v2.10.0...v2.10.1 -[2.10.0]: https://github.com/Automattic/jetpack-sync/compare/v2.9.0...v2.10.0 -[2.9.0]: https://github.com/Automattic/jetpack-sync/compare/v2.8.1...v2.9.0 -[2.8.1]: https://github.com/Automattic/jetpack-sync/compare/v2.8.0...v2.8.1 -[2.8.0]: https://github.com/Automattic/jetpack-sync/compare/v2.7.0...v2.8.0 -[2.7.0]: https://github.com/Automattic/jetpack-sync/compare/v2.6.1...v2.7.0 -[2.6.1]: https://github.com/Automattic/jetpack-sync/compare/v2.6.0...v2.6.1 -[2.6.0]: https://github.com/Automattic/jetpack-sync/compare/v2.5.1...v2.6.0 -[2.5.1]: https://github.com/Automattic/jetpack-sync/compare/v2.5.0...v2.5.1 -[2.5.0]: https://github.com/Automattic/jetpack-sync/compare/v2.4.2...v2.5.0 -[2.4.2]: https://github.com/Automattic/jetpack-sync/compare/v2.4.1...v2.4.2 -[2.4.1]: https://github.com/Automattic/jetpack-sync/compare/v2.4.0...v2.4.1 -[2.4.0]: https://github.com/Automattic/jetpack-sync/compare/v2.3.0...v2.4.0 -[2.3.0]: https://github.com/Automattic/jetpack-sync/compare/v2.2.1...v2.3.0 -[2.2.1]: https://github.com/Automattic/jetpack-sync/compare/v2.2.0...v2.2.1 -[2.2.0]: https://github.com/Automattic/jetpack-sync/compare/v2.1.2...v2.2.0 -[2.1.2]: https://github.com/Automattic/jetpack-sync/compare/v2.1.1...v2.1.2 -[2.1.1]: https://github.com/Automattic/jetpack-sync/compare/v2.1.0...v2.1.1 -[2.1.0]: https://github.com/Automattic/jetpack-sync/compare/v2.0.2...v2.1.0 -[2.0.2]: https://github.com/Automattic/jetpack-sync/compare/v2.0.1...v2.0.2 -[2.0.1]: https://github.com/Automattic/jetpack-sync/compare/v2.0.0...v2.0.1 -[2.0.0]: https://github.com/Automattic/jetpack-sync/compare/v1.60.1...v2.0.0 -[1.60.1]: https://github.com/Automattic/jetpack-sync/compare/v1.60.0...v1.60.1 -[1.60.0]: https://github.com/Automattic/jetpack-sync/compare/v1.59.2...v1.60.0 -[1.59.2]: https://github.com/Automattic/jetpack-sync/compare/v1.59.1...v1.59.2 -[1.59.1]: https://github.com/Automattic/jetpack-sync/compare/v1.59.0...v1.59.1 -[1.59.0]: https://github.com/Automattic/jetpack-sync/compare/v1.58.1...v1.59.0 -[1.58.1]: https://github.com/Automattic/jetpack-sync/compare/v1.58.0...v1.58.1 -[1.58.0]: https://github.com/Automattic/jetpack-sync/compare/v1.57.4...v1.58.0 -[1.57.4]: https://github.com/Automattic/jetpack-sync/compare/v1.57.3...v1.57.4 -[1.57.3]: https://github.com/Automattic/jetpack-sync/compare/v1.57.2...v1.57.3 -[1.57.2]: https://github.com/Automattic/jetpack-sync/compare/v1.57.1...v1.57.2 -[1.57.1]: https://github.com/Automattic/jetpack-sync/compare/v1.57.0...v1.57.1 -[1.57.0]: https://github.com/Automattic/jetpack-sync/compare/v1.56.0...v1.57.0 -[1.56.0]: https://github.com/Automattic/jetpack-sync/compare/v1.55.2...v1.56.0 -[1.55.2]: https://github.com/Automattic/jetpack-sync/compare/v1.55.1...v1.55.2 -[1.55.1]: https://github.com/Automattic/jetpack-sync/compare/v1.55.0...v1.55.1 -[1.55.0]: https://github.com/Automattic/jetpack-sync/compare/v1.54.0...v1.55.0 -[1.54.0]: https://github.com/Automattic/jetpack-sync/compare/v1.53.0...v1.54.0 -[1.53.0]: https://github.com/Automattic/jetpack-sync/compare/v1.52.0...v1.53.0 -[1.52.0]: https://github.com/Automattic/jetpack-sync/compare/v1.51.0...v1.52.0 -[1.51.0]: https://github.com/Automattic/jetpack-sync/compare/v1.50.2...v1.51.0 -[1.50.2]: https://github.com/Automattic/jetpack-sync/compare/v1.50.1...v1.50.2 -[1.50.1]: https://github.com/Automattic/jetpack-sync/compare/v1.50.0...v1.50.1 -[1.50.0]: https://github.com/Automattic/jetpack-sync/compare/v1.49.0...v1.50.0 -[1.49.0]: https://github.com/Automattic/jetpack-sync/compare/v1.48.1...v1.49.0 -[1.48.1]: https://github.com/Automattic/jetpack-sync/compare/v1.48.0...v1.48.1 -[1.48.0]: https://github.com/Automattic/jetpack-sync/compare/v1.47.9...v1.48.0 -[1.47.9]: https://github.com/Automattic/jetpack-sync/compare/v1.47.8...v1.47.9 -[1.47.8]: https://github.com/Automattic/jetpack-sync/compare/v1.47.7...v1.47.8 -[1.47.7]: https://github.com/Automattic/jetpack-sync/compare/v1.47.6...v1.47.7 -[1.47.6]: https://github.com/Automattic/jetpack-sync/compare/v1.47.5...v1.47.6 -[1.47.5]: https://github.com/Automattic/jetpack-sync/compare/v1.47.4...v1.47.5 -[1.47.4]: https://github.com/Automattic/jetpack-sync/compare/v1.47.3...v1.47.4 -[1.47.3]: https://github.com/Automattic/jetpack-sync/compare/v1.47.2...v1.47.3 -[1.47.2]: https://github.com/Automattic/jetpack-sync/compare/v1.47.1...v1.47.2 -[1.47.1]: https://github.com/Automattic/jetpack-sync/compare/v1.47.0...v1.47.1 -[1.47.0]: https://github.com/Automattic/jetpack-sync/compare/v1.46.1...v1.47.0 -[1.46.1]: https://github.com/Automattic/jetpack-sync/compare/v1.46.0...v1.46.1 -[1.46.0]: https://github.com/Automattic/jetpack-sync/compare/v1.45.0...v1.46.0 -[1.45.0]: https://github.com/Automattic/jetpack-sync/compare/v1.44.2...v1.45.0 -[1.44.2]: https://github.com/Automattic/jetpack-sync/compare/v1.44.1...v1.44.2 -[1.44.1]: https://github.com/Automattic/jetpack-sync/compare/v1.44.0...v1.44.1 -[1.44.0]: https://github.com/Automattic/jetpack-sync/compare/v1.43.2...v1.44.0 -[1.43.2]: https://github.com/Automattic/jetpack-sync/compare/v1.43.1...v1.43.2 -[1.43.1]: https://github.com/Automattic/jetpack-sync/compare/v1.43.0...v1.43.1 -[1.43.0]: https://github.com/Automattic/jetpack-sync/compare/v1.42.0...v1.43.0 -[1.42.0]: https://github.com/Automattic/jetpack-sync/compare/v1.41.0...v1.42.0 -[1.41.0]: https://github.com/Automattic/jetpack-sync/compare/v1.40.3...v1.41.0 -[1.40.3]: https://github.com/Automattic/jetpack-sync/compare/v1.40.2...v1.40.3 -[1.40.2]: https://github.com/Automattic/jetpack-sync/compare/v1.40.1...v1.40.2 -[1.40.1]: https://github.com/Automattic/jetpack-sync/compare/v1.40.0...v1.40.1 -[1.40.0]: https://github.com/Automattic/jetpack-sync/compare/v1.39.0...v1.40.0 -[1.39.0]: https://github.com/Automattic/jetpack-sync/compare/v1.38.4...v1.39.0 -[1.38.4]: https://github.com/Automattic/jetpack-sync/compare/v1.38.3...v1.38.4 -[1.38.3]: https://github.com/Automattic/jetpack-sync/compare/v1.38.2...v1.38.3 -[1.38.2]: https://github.com/Automattic/jetpack-sync/compare/v1.38.1...v1.38.2 -[1.38.1]: https://github.com/Automattic/jetpack-sync/compare/v1.38.0...v1.38.1 -[1.38.0]: https://github.com/Automattic/jetpack-sync/compare/v1.37.1...v1.38.0 -[1.37.1]: https://github.com/Automattic/jetpack-sync/compare/v1.37.0...v1.37.1 -[1.37.0]: https://github.com/Automattic/jetpack-sync/compare/v1.36.1...v1.37.0 -[1.36.1]: https://github.com/Automattic/jetpack-sync/compare/v1.36.0...v1.36.1 -[1.36.0]: https://github.com/Automattic/jetpack-sync/compare/v1.35.2...v1.36.0 -[1.35.2]: https://github.com/Automattic/jetpack-sync/compare/v1.35.1...v1.35.2 -[1.35.1]: https://github.com/Automattic/jetpack-sync/compare/v1.35.0...v1.35.1 -[1.35.0]: https://github.com/Automattic/jetpack-sync/compare/v1.34.0...v1.35.0 -[1.34.0]: https://github.com/Automattic/jetpack-sync/compare/v1.33.1...v1.34.0 -[1.33.1]: https://github.com/Automattic/jetpack-sync/compare/v1.33.0...v1.33.1 -[1.33.0]: https://github.com/Automattic/jetpack-sync/compare/v1.32.0...v1.33.0 -[1.32.0]: https://github.com/Automattic/jetpack-sync/compare/v1.31.1...v1.32.0 -[1.31.1]: https://github.com/Automattic/jetpack-sync/compare/v1.31.0...v1.31.1 -[1.31.0]: https://github.com/Automattic/jetpack-sync/compare/v1.30.8...v1.31.0 -[1.30.8]: https://github.com/Automattic/jetpack-sync/compare/v1.30.7...v1.30.8 -[1.30.7]: https://github.com/Automattic/jetpack-sync/compare/v1.30.6...v1.30.7 -[1.30.6]: https://github.com/Automattic/jetpack-sync/compare/v1.30.5...v1.30.6 -[1.30.5]: https://github.com/Automattic/jetpack-sync/compare/v1.30.4...v1.30.5 -[1.30.4]: https://github.com/Automattic/jetpack-sync/compare/v1.30.3...v1.30.4 -[1.30.3]: https://github.com/Automattic/jetpack-sync/compare/v1.30.2...v1.30.3 -[1.30.2]: https://github.com/Automattic/jetpack-sync/compare/v1.30.1...v1.30.2 -[1.30.1]: https://github.com/Automattic/jetpack-sync/compare/v1.30.0...v1.30.1 -[1.30.0]: https://github.com/Automattic/jetpack-sync/compare/v1.29.2...v1.30.0 -[1.29.2]: https://github.com/Automattic/jetpack-sync/compare/v1.29.1...v1.29.2 -[1.29.1]: https://github.com/Automattic/jetpack-sync/compare/v1.29.0...v1.29.1 -[1.29.0]: https://github.com/Automattic/jetpack-sync/compare/v1.28.2...v1.29.0 -[1.28.2]: https://github.com/Automattic/jetpack-sync/compare/v1.28.1...v1.28.2 -[1.28.1]: https://github.com/Automattic/jetpack-sync/compare/v1.28.0...v1.28.1 -[1.28.0]: https://github.com/Automattic/jetpack-sync/compare/v1.27.6...v1.28.0 -[1.27.6]: https://github.com/Automattic/jetpack-sync/compare/v1.27.5...v1.27.6 -[1.27.5]: https://github.com/Automattic/jetpack-sync/compare/v1.27.4...v1.27.5 -[1.27.4]: https://github.com/Automattic/jetpack-sync/compare/v1.27.3...v1.27.4 -[1.27.3]: https://github.com/Automattic/jetpack-sync/compare/v1.27.2...v1.27.3 -[1.27.2]: https://github.com/Automattic/jetpack-sync/compare/v1.27.1...v1.27.2 -[1.27.1]: https://github.com/Automattic/jetpack-sync/compare/v1.27.0...v1.27.1 -[1.27.0]: https://github.com/Automattic/jetpack-sync/compare/v1.26.4...v1.27.0 -[1.26.4]: https://github.com/Automattic/jetpack-sync/compare/v1.26.3...v1.26.4 -[1.26.3]: https://github.com/Automattic/jetpack-sync/compare/v1.26.2...v1.26.3 -[1.26.2]: https://github.com/Automattic/jetpack-sync/compare/v1.26.1...v1.26.2 -[1.26.1]: https://github.com/Automattic/jetpack-sync/compare/v1.26.0...v1.26.1 -[1.26.0]: https://github.com/Automattic/jetpack-sync/compare/v1.25.0...v1.26.0 -[1.25.0]: https://github.com/Automattic/jetpack-sync/compare/v1.24.2...v1.25.0 -[1.24.2]: https://github.com/Automattic/jetpack-sync/compare/v1.24.1...v1.24.2 -[1.24.1]: https://github.com/Automattic/jetpack-sync/compare/v1.24.0...v1.24.1 -[1.24.0]: https://github.com/Automattic/jetpack-sync/compare/v1.23.3...v1.24.0 -[1.23.3]: https://github.com/Automattic/jetpack-sync/compare/v1.23.2...v1.23.3 -[1.23.2]: https://github.com/Automattic/jetpack-sync/compare/v1.23.1...v1.23.2 -[1.23.1]: https://github.com/Automattic/jetpack-sync/compare/v1.23.0...v1.23.1 -[1.23.0]: https://github.com/Automattic/jetpack-sync/compare/v1.22.0...v1.23.0 -[1.22.0]: https://github.com/Automattic/jetpack-sync/compare/v1.21.3...v1.22.0 -[1.21.3]: https://github.com/Automattic/jetpack-sync/compare/v1.21.2...v1.21.3 -[1.21.2]: https://github.com/Automattic/jetpack-sync/compare/v1.21.1...v1.21.2 -[1.21.1]: https://github.com/Automattic/jetpack-sync/compare/v1.21.0...v1.21.1 -[1.21.0]: https://github.com/Automattic/jetpack-sync/compare/v1.20.2...v1.21.0 -[1.20.2]: https://github.com/Automattic/jetpack-sync/compare/v1.20.1...v1.20.2 -[1.20.1]: https://github.com/Automattic/jetpack-sync/compare/v1.20.0...v1.20.1 -[1.20.0]: https://github.com/Automattic/jetpack-sync/compare/v1.19.4...v1.20.0 -[1.19.4]: https://github.com/Automattic/jetpack-sync/compare/v1.19.3...v1.19.4 -[1.19.3]: https://github.com/Automattic/jetpack-sync/compare/v1.19.2...v1.19.3 -[1.19.2]: https://github.com/Automattic/jetpack-sync/compare/v1.19.1...v1.19.2 -[1.19.1]: https://github.com/Automattic/jetpack-sync/compare/v1.19.0...v1.19.1 -[1.19.0]: https://github.com/Automattic/jetpack-sync/compare/v1.18.1...v1.19.0 -[1.18.1]: https://github.com/Automattic/jetpack-sync/compare/v1.18.0...v1.18.1 -[1.18.0]: https://github.com/Automattic/jetpack-sync/compare/v1.17.2...v1.18.0 -[1.17.2]: https://github.com/Automattic/jetpack-sync/compare/v1.17.1...v1.17.2 -[1.17.1]: https://github.com/Automattic/jetpack-sync/compare/v1.17.0...v1.17.1 -[1.17.0]: https://github.com/Automattic/jetpack-sync/compare/v1.16.4...v1.17.0 -[1.16.4]: https://github.com/Automattic/jetpack-sync/compare/v1.16.3...v1.16.4 -[1.16.3]: https://github.com/Automattic/jetpack-sync/compare/v1.16.2...v1.16.3 -[1.16.2]: https://github.com/Automattic/jetpack-sync/compare/v1.16.1...v1.16.2 -[1.16.1]: https://github.com/Automattic/jetpack-sync/compare/v1.16.0...v1.16.1 -[1.16.0]: https://github.com/Automattic/jetpack-sync/compare/v1.15.1...v1.16.0 -[1.15.1]: https://github.com/Automattic/jetpack-sync/compare/v1.15.0...v1.15.1 -[1.15.0]: https://github.com/Automattic/jetpack-sync/compare/v1.14.4...v1.15.0 -[1.14.4]: https://github.com/Automattic/jetpack-sync/compare/v1.14.3...v1.14.4 -[1.14.3]: https://github.com/Automattic/jetpack-sync/compare/v1.14.2...v1.14.3 -[1.14.2]: https://github.com/Automattic/jetpack-sync/compare/v1.14.1...v1.14.2 -[1.14.1]: https://github.com/Automattic/jetpack-sync/compare/v1.14.0...v1.14.1 -[1.14.0]: https://github.com/Automattic/jetpack-sync/compare/v1.13.2...v1.14.0 -[1.13.2]: https://github.com/Automattic/jetpack-sync/compare/v1.13.1...v1.13.2 -[1.13.1]: https://github.com/Automattic/jetpack-sync/compare/v1.13.0...v1.13.1 -[1.13.0]: https://github.com/Automattic/jetpack-sync/compare/v1.12.4...v1.13.0 -[1.12.4]: https://github.com/Automattic/jetpack-sync/compare/v1.12.3...v1.12.4 -[1.12.3]: https://github.com/Automattic/jetpack-sync/compare/v1.12.2...v1.12.3 -[1.12.2]: https://github.com/Automattic/jetpack-sync/compare/v1.12.1...v1.12.2 -[1.12.1]: https://github.com/Automattic/jetpack-sync/compare/v1.12.0...v1.12.1 -[1.12.0]: https://github.com/Automattic/jetpack-sync/compare/v1.11.0...v1.12.0 -[1.11.0]: https://github.com/Automattic/jetpack-sync/compare/v1.10.0...v1.11.0 -[1.10.0]: https://github.com/Automattic/jetpack-sync/compare/v1.9.0...v1.10.0 -[1.9.0]: https://github.com/Automattic/jetpack-sync/compare/v1.8.0...v1.9.0 -[1.8.0]: https://github.com/Automattic/jetpack-sync/compare/v1.7.6...v1.8.0 -[1.7.6]: https://github.com/Automattic/jetpack-sync/compare/v1.7.5...v1.7.6 -[1.7.5]: https://github.com/Automattic/jetpack-sync/compare/v1.7.4+vip...v1.7.5 -[1.7.4+vip]: https://github.com/Automattic/jetpack-sync/compare/v1.7.4...v1.7.4+vip -[1.7.4]: https://github.com/Automattic/jetpack-sync/compare/v1.7.3...v1.7.4 -[1.7.3]: https://github.com/Automattic/jetpack-sync/compare/v1.7.2...v1.7.3 -[1.7.2]: https://github.com/Automattic/jetpack-sync/compare/v1.7.1...v1.7.2 -[1.7.1]: https://github.com/Automattic/jetpack-sync/compare/v1.7.0...v1.7.1 -[1.7.0]: https://github.com/Automattic/jetpack-sync/compare/v1.6.3...v1.7.0 -[1.6.3]: https://github.com/Automattic/jetpack-sync/compare/v1.6.2...v1.6.3 -[1.6.2]: https://github.com/Automattic/jetpack-sync/compare/v1.6.1...v1.6.2 -[1.6.1]: https://github.com/Automattic/jetpack-sync/compare/v1.6.0...v1.6.1 -[1.6.0]: https://github.com/Automattic/jetpack-sync/compare/v1.5.1...v1.6.0 -[1.5.1]: https://github.com/Automattic/jetpack-sync/compare/v1.5.0...v1.5.1 -[1.5.0]: https://github.com/Automattic/jetpack-sync/compare/v1.4.0...v1.5.0 -[1.4.0]: https://github.com/Automattic/jetpack-sync/compare/v1.3.4...v1.4.0 -[1.3.4]: https://github.com/Automattic/jetpack-sync/compare/v1.3.3...v1.3.4 -[1.3.3]: https://github.com/Automattic/jetpack-sync/compare/v1.3.2...v1.3.3 -[1.3.2]: https://github.com/Automattic/jetpack-sync/compare/v1.3.1...v1.3.2 -[1.3.1]: https://github.com/Automattic/jetpack-sync/compare/v1.3.0...v1.3.1 -[1.3.0]: https://github.com/Automattic/jetpack-sync/compare/v1.2.1...v1.3.0 -[1.2.1]: https://github.com/Automattic/jetpack-sync/compare/v1.2.0...v1.2.1 -[1.2.0]: https://github.com/Automattic/jetpack-sync/compare/v1.1.1...v1.2.0 -[1.1.1]: https://github.com/Automattic/jetpack-sync/compare/v1.1.0...v1.1.1 -[1.1.0]: https://github.com/Automattic/jetpack-sync/compare/v1.0.2...v1.1.0 -[1.0.2]: https://github.com/Automattic/jetpack-sync/compare/v1.0.1...v1.0.2 -[1.0.1]: https://github.com/Automattic/jetpack-sync/compare/v1.0.0...v1.0.1 diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/LICENSE.txt b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/LICENSE.txt deleted file mode 100644 index e82774c1..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/LICENSE.txt +++ /dev/null @@ -1,357 +0,0 @@ -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - - -=================================== - - -GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - -Copyright (C) 1989, 1991 Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -Everyone is permitted to copy and distribute verbatim copies -of this license document, but changing it is not allowed. - - Preamble - -The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Lesser General Public License instead.) You can apply it to -your programs, too. - -When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - -To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - -For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - -We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - -Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - -Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - -The precise terms and conditions for copying, distribution and -modification follow. - -GNU GENERAL PUBLIC LICENSE -TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - -0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - -1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - -2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - -a) You must cause the modified files to carry prominent notices -stating that you changed the files and the date of any change. - -b) You must cause any work that you distribute or publish, that in -whole or in part contains or is derived from the Program or any -part thereof, to be licensed as a whole at no charge to all third -parties under the terms of this License. - -c) If the modified program normally reads commands interactively -when run, you must cause it, when started running for such -interactive use in the most ordinary way, to print or display an -announcement including an appropriate copyright notice and a -notice that there is no warranty (or else, saying that you provide -a warranty) and that users may redistribute the program under -these conditions, and telling the user how to view a copy of this -License. (Exception: if the Program itself is interactive but -does not normally print such an announcement, your work based on -the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - -3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - -a) Accompany it with the complete corresponding machine-readable -source code, which must be distributed under the terms of Sections -1 and 2 above on a medium customarily used for software interchange; or, - -b) Accompany it with a written offer, valid for at least three -years, to give any third party, for a charge no more than your -cost of physically performing source distribution, a complete -machine-readable copy of the corresponding source code, to be -distributed under the terms of Sections 1 and 2 above on a medium -customarily used for software interchange; or, - -c) Accompany it with the information you received as to the offer -to distribute corresponding source code. (This alternative is -allowed only for noncommercial distribution and only if you -received the program in object code or executable form with such -an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - -4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - -5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - -6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - -7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - -8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - -9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - -10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - -11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - -12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - -How to Apply These Terms to Your New Programs - -If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - -To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - -Copyright (C) - -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along -with this program; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - -Gnomovision version 69, Copyright (C) year name of author -Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. -This is free software, and you are welcome to redistribute it -under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - -Yoyodyne, Inc., hereby disclaims all copyright interest in the program -`Gnomovision' (which makes passes at compilers) written by James Hacker. - -, 1 April 1989 -Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/SECURITY.md b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/SECURITY.md deleted file mode 100644 index 98f48dd1..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/SECURITY.md +++ /dev/null @@ -1,47 +0,0 @@ -# Security Policy - -Full details of the Automattic Security Policy can be found on [automattic.com](https://automattic.com/security/). - -## Supported Versions - -Generally, only the latest version of Jetpack and its associated plugins have continued support. If a critical vulnerability is found in the current version of a plugin, we may opt to backport any patches to previous versions. - -## Reporting a Vulnerability - -Our HackerOne program covers the below plugin software, as well as a variety of related projects and infrastructure: - -* [Jetpack](https://jetpack.com/) -* Jetpack Backup -* Jetpack Boost -* Jetpack CRM -* Jetpack Protect -* Jetpack Search -* Jetpack Social -* Jetpack VideoPress - -**For responsible disclosure of security issues and to be eligible for our bug bounty program, please submit your report via the [HackerOne](https://hackerone.com/automattic) portal.** - -Our most critical targets are: - -* Jetpack and the Jetpack composer packages (all within this repo) -* Jetpack.com -- the primary marketing site. -* cloud.jetpack.com -- a management site. -* wordpress.com -- the shared management site for both Jetpack and WordPress.com sites. - -For more targets, see the `In Scope` section on [HackerOne](https://hackerone.com/automattic). - -_Please note that the **WordPress software is a separate entity** from Automattic. Please report vulnerabilities for WordPress through [the WordPress Foundation's HackerOne page](https://hackerone.com/wordpress)._ - -## Guidelines - -We're committed to working with security researchers to resolve the vulnerabilities they discover. You can help us by following these guidelines: - -* Follow [HackerOne's disclosure guidelines](https://www.hackerone.com/disclosure-guidelines). -* Pen-testing Production: - * Please **setup a local environment** instead whenever possible. Most of our code is open source (see above). - * If that's not possible, **limit any data access/modification** to the bare minimum necessary to reproduce a PoC. - * **_Don't_ automate form submissions!** That's very annoying for us, because it adds extra work for the volunteers who manage those systems, and reduces the signal/noise ratio in our communication channels. - * To be eligible for a bounty, all of these guidelines must be followed. -* Be Patient - Give us a reasonable time to correct the issue before you disclose the vulnerability. - -We also expect you to comply with all applicable laws. You're responsible to pay any taxes associated with your bounties. diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/composer.json b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/composer.json deleted file mode 100644 index 9840fdff..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/composer.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "name": "automattic/jetpack-sync", - "description": "Everything needed to allow syncing to the WP.com infrastructure.", - "type": "jetpack-library", - "license": "GPL-2.0-or-later", - "require": { - "php": ">=7.0", - "automattic/jetpack-connection": "^2.4.1", - "automattic/jetpack-constants": "^2.0.1", - "automattic/jetpack-identity-crisis": "^0.17.3", - "automattic/jetpack-password-checker": "^0.3.1", - "automattic/jetpack-ip": "^0.2.2", - "automattic/jetpack-roles": "^2.0.1", - "automattic/jetpack-status": "^2.1.2" - }, - "require-dev": { - "automattic/jetpack-changelogger": "^4.1.1", - "yoast/phpunit-polyfills": "1.1.0", - "automattic/wordbless": "@dev" - }, - "suggest": { - "automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package." - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "scripts": { - "phpunit": [ - "./vendor/phpunit/phpunit/phpunit --colors=always" - ], - "test-php": [ - "@composer phpunit" - ], - "post-install-cmd": "WorDBless\\Composer\\InstallDropin::copy", - "post-update-cmd": "WorDBless\\Composer\\InstallDropin::copy" - }, - "minimum-stability": "dev", - "prefer-stable": true, - "extra": { - "autotagger": true, - "mirror-repo": "Automattic/jetpack-sync", - "textdomain": "jetpack-sync", - "version-constants": { - "::PACKAGE_VERSION": "src/class-package-version.php" - }, - "changelogger": { - "link-template": "https://github.com/Automattic/jetpack-sync/compare/v${old}...v${new}" - }, - "branch-alias": { - "dev-trunk": "2.10.x-dev" - } - }, - "config": { - "allow-plugins": { - "roots/wordpress-core-installer": true - } - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-actions.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-actions.php deleted file mode 100644 index f6f51705..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-actions.php +++ /dev/null @@ -1,1188 +0,0 @@ -do_dedicated_sync_and_exit(); - } - } - - /** - * Define JETPACK_SYNC_READ_ONLY constant if not defined. - * This notifies sync to not run in shutdown if it was initialized during init. - * - * @access public - * @static - */ - public static function mark_sync_read_only() { - Constants::set_constant( 'JETPACK_SYNC_READ_ONLY', true ); - } - - /** - * Decides if the sender should run on shutdown for this request. - * - * @access public - * @static - * - * @return bool - */ - public static function should_initialize_sender() { - - // Allow for explicit disable of Sync from request param jetpack_sync_read_only. - if ( isset( $_REQUEST['jetpack_sync_read_only'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification - self::mark_sync_read_only(); - return false; - } - - if ( Constants::is_true( 'DOING_CRON' ) ) { - return self::sync_via_cron_allowed(); - } - - /** - * For now, if dedicated Sync is enabled we will always initialize send, even for GET and unauthenticated requests. - */ - if ( Settings::is_dedicated_sync_enabled() ) { - return true; - } - - if ( isset( $_SERVER['REQUEST_METHOD'] ) && 'POST' === $_SERVER['REQUEST_METHOD'] ) { - return true; - } - - if ( current_user_can( 'manage_options' ) ) { - return true; - } - - if ( is_admin() ) { - return true; - } - - if ( defined( 'PHPUNIT_JETPACK_TESTSUITE' ) ) { - return true; - } - - if ( Constants::get_constant( 'WP_CLI' ) ) { - return true; - } - - return false; - } - - /** - * Decides if the sender should run on shutdown when actions are queued. - * - * @access public - * @static - * - * @param bool $enable Should we initilize sender. - * @return bool - */ - public static function should_initialize_sender_enqueue( $enable ) { - - // If $enabled is false don't modify it, only check cron if enabled. - if ( false === $enable ) { - return $enable; - } - - if ( Constants::is_true( 'DOING_CRON' ) ) { - return self::sync_via_cron_allowed(); - } - - return true; - } - - /** - * Decides if sync should run at all during this request. - * - * @access public - * @static - * - * @return bool - */ - public static function sync_allowed() { - if ( defined( 'IS_WPCOM' ) && IS_WPCOM ) { - return false; - } - - if ( defined( 'PHPUNIT_JETPACK_TESTSUITE' ) ) { - return true; - } - - if ( ! Settings::is_sync_enabled() ) { - return false; - } - - if ( ( new Status() )->is_offline_mode() ) { - return false; - } - - if ( ( new Status() )->is_staging_site() ) { - return false; - } - - $connection = new Jetpack_Connection(); - if ( ! $connection->is_connected() ) { - if ( ! doing_action( 'jetpack_site_registered' ) ) { - return false; - } - } - - return true; - } - - /** - * Helper function to get details as to why sync is not allowed, if it is not allowed. - * - * @return array - */ - public static function get_debug_details() { - $debug = array(); - $debug['debug_details']['sync_allowed'] = self::sync_allowed(); - $debug['debug_details']['sync_health'] = Health::get_status(); - if ( false === $debug['debug_details']['sync_allowed'] ) { - if ( defined( 'IS_WPCOM' ) && IS_WPCOM ) { - $debug['debug_details']['is_wpcom'] = true; - } - if ( defined( 'PHPUNIT_JETPACK_TESTSUITE' ) ) { - $debug['debug_details']['PHPUNIT_JETPACK_TESTSUITE'] = true; - } - if ( ! Settings::is_sync_enabled() ) { - $debug['debug_details']['is_sync_enabled'] = false; - $debug['debug_details']['jetpack_sync_disable'] = Settings::get_setting( 'disable' ); - $debug['debug_details']['jetpack_sync_network_disable'] = Settings::get_setting( 'network_disable' ); - } - if ( ( new Status() )->is_offline_mode() ) { - $debug['debug_details']['is_offline_mode'] = true; - } - if ( ( new Status() )->is_staging_site() ) { - $debug['debug_details']['is_staging_site'] = true; - } - $connection = new Jetpack_Connection(); - if ( ! $connection->is_connected() ) { - $debug['debug_details']['active_connection'] = false; - } - } - - // Sync locks. - $debug['debug_details']['dedicated_sync_enabled'] = Settings::is_dedicated_sync_enabled(); - - $queue = self::$sender->get_sync_queue(); - $full_queue = self::$sender->get_full_sync_queue(); - - $debug['debug_details']['sync_locks'] = array( - 'retry_time_sync' => get_option( self::RETRY_AFTER_PREFIX . 'sync' ), - 'retry_time_full_sync' => get_option( self::RETRY_AFTER_PREFIX . 'full_sync' ), - 'next_sync_time_sync' => self::$sender->get_next_sync_time( 'sync' ), - 'next_sync_time_full_sync' => self::$sender->get_next_sync_time( 'full_sync' ), - 'queue_locked_sync' => $queue->is_locked(), - 'queue_locked_full_sync' => $full_queue->is_locked(), - 'dedicated_sync_request_lock' => \Jetpack_Options::get_raw_option( Dedicated_Sender::DEDICATED_SYNC_REQUEST_LOCK_OPTION_NAME, null ), - 'dedicated_sync_temporary_disable_flag' => get_transient( Dedicated_Sender::DEDICATED_SYNC_TEMPORARY_DISABLE_FLAG ), - ); - - // Sync Logs. - $debug['debug_details']['last_succesful_sync'] = get_option( self::LAST_SUCCESS_PREFIX . 'sync', '' ); - $debug['debug_details']['sync_error_log'] = get_option( self::ERROR_LOG_PREFIX . 'sync', '' ); - - return $debug; - } - - /** - * Determines if syncing during a cron job is allowed. - * - * @access public - * @static - * - * @return bool|int - */ - public static function sync_via_cron_allowed() { - return ( Settings::get_setting( 'sync_via_cron' ) ); - } - - /** - * Decides if the given post should be Publicized based on its type. - * - * @access public - * @static - * - * @param bool $should_publicize Publicize status prior to this filter running. - * @param \WP_Post $post The post to test for Publicizability. - * @return bool - */ - public static function prevent_publicize_blacklisted_posts( $should_publicize, $post ) { - if ( in_array( $post->post_type, Settings::get_setting( 'post_types_blacklist' ), true ) ) { - return false; - } - - return $should_publicize; - } - - /** - * Set an importing flag to `true` in sync settings. - * - * @access public - * @static - */ - public static function set_is_importing_true() { - Settings::set_importing( true ); - } - - /** - * Sends data to WordPress.com via an XMLRPC or a REST API request based on the settings. - * - * @access public - * @static - * - * @param object $data Data relating to a sync action. - * @param string $codec_name The name of the codec that encodes the data. - * @param float $sent_timestamp Current server time so we can compensate for clock differences. - * @param string $queue_id The queue the action belongs to, sync or full_sync. - * @param float $checkout_duration Time spent retrieving queue items from the DB. - * @param float $preprocess_duration Time spent converting queue items into data to send. - * @param int $queue_size The size of the sync queue at the time of processing. - * @param string $buffer_id The ID of the Queue buffer checked out for processing. - * @return mixed|WP_Error The result of the sending request. - */ - public static function send_data( $data, $codec_name, $sent_timestamp, $queue_id, $checkout_duration, $preprocess_duration, $queue_size = null, $buffer_id = null ) { - - $query_args = array( - - 'sync' => '1', // Add an extra parameter to the URL so we can tell it's a sync action. - 'codec' => $codec_name, - 'timestamp' => $sent_timestamp, - 'queue' => $queue_id, - 'cd' => sprintf( '%.4f', $checkout_duration ), - 'pd' => sprintf( '%.4f', $preprocess_duration ), - 'queue_size' => $queue_size, - 'buffer_id' => $buffer_id, - // TODO this will be extended in the future. Might be good to extract in a separate method to support future entries too. - 'sync_flow_type' => Settings::is_dedicated_sync_enabled() ? 'dedicated' : 'default', - 'storage_type' => Settings::is_custom_queue_table_enabled() ? 'custom' : 'options', - ); - - $query_args['timeout'] = Settings::is_doing_cron() ? 30 : 20; - - if ( 'immediate-send' === $queue_id ) { - $query_args['timeout'] = 30; - } - - /** - * Filters query parameters appended to the Sync request URL sent to WordPress.com. - * - * @since 1.6.3 - * @since-jetpack 4.7.0 - * - * @param array $query_args associative array of query parameters. - */ - $query_args = apply_filters( 'jetpack_sync_send_data_query_args', $query_args ); - - $retry_after_header = false; - $dedicated_sync_header = false; - - // If REST API is enabled, use it. - if ( Settings::is_wpcom_rest_api_enabled() ) { - $jsonl_data = self::prepare_jsonl_data( $data ); - $url = '/sites/' . \Jetpack_Options::get_option( 'id' ) . '/jetpack-sync-actions'; - $url = add_query_arg( $query_args, $url ); - $args = array( - 'method' => 'POST', - 'format' => 'jsonl', - 'timeout' => $query_args['timeout'], - ); - - $response = Client::wpcom_json_api_request_as_blog( $url, '2', $args, $jsonl_data, 'wpcom' ); - $retry_after_header = wp_remote_retrieve_header( $response, 'Retry-After' ) ? wp_remote_retrieve_header( $response, 'Retry-After' ) : false; - $dedicated_sync_header = wp_remote_retrieve_header( $response, 'Jetpack-Dedicated-Sync' ) ? wp_remote_retrieve_header( $response, 'Jetpack-Dedicated-Sync' ) : false; - $response = self::process_rest_api_response( $response ); - } else { // Use XML-RPC. - $connection = new Jetpack_Connection(); - $url = add_query_arg( $query_args, $connection->xmlrpc_api_url() ); - - // If we're currently updating to Jetpack 7.7, the IXR client may be missing briefly - // because since 7.7 it's being autoloaded with Composer. - if ( ! class_exists( '\\Jetpack_IXR_Client' ) ) { - return new WP_Error( - 'ixr_client_missing', - esc_html__( 'Sync has been aborted because the IXR client is missing.', 'jetpack-sync' ) - ); - } - - $rpc = new \Jetpack_IXR_Client( - array( - 'url' => $url, - 'timeout' => $query_args['timeout'], - ) - ); - $result = $rpc->query( 'jetpack.syncActions', $data ); - $retry_after_header = $rpc->get_response_header( 'Retry-After' ); - $dedicated_sync_header = $rpc->get_response_header( 'Jetpack-Dedicated-Sync' ); - if ( $result ) { - $response = $rpc->getResponse(); - } else { - $response = $rpc->get_jetpack_error(); - } - } - - // Adhere to Retry-After headers. - if ( false !== $retry_after_header ) { - if ( (int) $retry_after_header > 0 ) { - update_option( self::RETRY_AFTER_PREFIX . $queue_id, microtime( true ) + (int) $retry_after_header, false ); - } else { - // if unexpected value default to 3 minutes. - update_option( self::RETRY_AFTER_PREFIX . $queue_id, microtime( true ) + 180, false ); - } - } - - // Enable/Disable Dedicated Sync flow via response headers. - if ( false !== $dedicated_sync_header ) { - Dedicated_Sender::maybe_change_dedicated_sync_status_from_wpcom_header( $dedicated_sync_header ); - } - - if ( is_wp_error( $response ) ) { - $error = $response; - if ( false === $retry_after_header ) { - // We received a non standard response from WP.com, lets backoff from sending requests for 1 minute. - update_option( self::RETRY_AFTER_PREFIX . $queue_id, microtime( true ) + 60, false ); - } - // Record Sync Errors. - $error_log = get_option( self::ERROR_LOG_PREFIX . $queue_id, array() ); - if ( ! is_array( $error_log ) ) { - $error_log = array(); - } - // Trim existing array to last 4 entries. - if ( 5 <= count( $error_log ) ) { - $error_log = array_slice( $error_log, -4, null, true ); - } - // Add new error indexed to time. - if ( Settings::is_wpcom_rest_api_enabled() ) { - $error_log[ (string) microtime( true ) ] = $error; - } else { - $error_with_last_response = clone $error; - $error_with_last_response->add_data( $rpc->get_last_response() ); - $error_log[ (string) microtime( true ) ] = $error_with_last_response; - } - // Update the error log. - update_option( self::ERROR_LOG_PREFIX . $queue_id, $error_log ); - return $error; - } - - // Check if WordPress.com IDC mitigation blocked the sync request. - if ( Identity_Crisis::init()->check_response_for_idc( $response ) ) { - return new WP_Error( - 'sync_error_idc', - esc_html__( 'Sync has been blocked from WordPress.com because it would cause an identity crisis', 'jetpack-sync' ) - ); - } - - if ( Settings::is_wpcom_rest_api_enabled() ) { // Return only processed items. - $response = $response['processed_items']; - } - - // Record last successful sync. - update_option( self::LAST_SUCCESS_PREFIX . $queue_id, microtime( true ), false ); - - return $response; - } - - /** - * Kicks off the initial sync. - * - * @access public - * @static - * - * @return bool|null False if sync is not allowed. - */ - public static function do_initial_sync() { - // Let's not sync if we are not supposed to. - if ( ! self::sync_allowed() ) { - return false; - } - - // Don't start new sync if a full sync is in process. - $full_sync_module = Modules::get_module( 'full-sync' ); - if ( $full_sync_module && $full_sync_module->is_started() && ! $full_sync_module->is_finished() ) { - return false; - } - - $initial_sync_config = array( - 'options' => true, - 'functions' => true, - 'constants' => true, - 'users' => array( get_current_user_id() ), - 'network_options' => true, - ); - - self::do_full_sync( $initial_sync_config ); - } - - /** - * Do an initial full sync only if one has not already been started. - * - * @return bool|null False if the initial full sync was already started, otherwise null. - */ - public static function do_only_first_initial_sync() { - $full_sync_module = Modules::get_module( 'full-sync' ); - if ( $full_sync_module && $full_sync_module->is_started() ) { - return false; - } - - static::do_initial_sync(); - } - - /** - * Kicks off a full sync. - * - * @access public - * @static - * - * @param array $modules The sync modules should be included in this full sync. All will be included if null. - * @return bool True if full sync was successfully started. - */ - public static function do_full_sync( $modules = null ) { - if ( ! self::sync_allowed() ) { - return false; - } - - $full_sync_module = Modules::get_module( 'full-sync' ); - - if ( ! $full_sync_module ) { - return false; - } - - self::initialize_listener(); - - $full_sync_module->start( $modules ); - - return true; - } - - /** - * Adds a cron schedule for regular syncing via cron, unless the schedule already exists. - * - * @access public - * @static - * - * @param array $schedules The list of WordPress cron schedules prior to this filter. - * @return array A list of WordPress cron schedules with the Jetpack sync interval added. - */ - public static function jetpack_cron_schedule( $schedules ) { - if ( ! isset( $schedules[ self::DEFAULT_SYNC_CRON_INTERVAL_NAME ] ) ) { - $minutes = (int) ( self::DEFAULT_SYNC_CRON_INTERVAL_VALUE / 60 ); - $display = ( 1 === $minutes ) ? - __( 'Every minute', 'jetpack-sync' ) : - /* translators: %d is an integer indicating the number of minutes. */ - sprintf( __( 'Every %d minutes', 'jetpack-sync' ), $minutes ); - $schedules[ self::DEFAULT_SYNC_CRON_INTERVAL_NAME ] = array( - 'interval' => self::DEFAULT_SYNC_CRON_INTERVAL_VALUE, - 'display' => $display, - ); - } - return $schedules; - } - - /** - * Starts an incremental sync via cron. - * - * @access public - * @static - */ - public static function do_cron_sync() { - self::do_cron_sync_by_type( 'sync' ); - } - - /** - * Starts a full sync via cron. - * - * @access public - * @static - */ - public static function do_cron_full_sync() { - self::do_cron_sync_by_type( 'full_sync' ); - } - - /** - * Try to send actions until we run out of things to send, - * or have to wait more than 15s before sending again, - * or we hit a lock or some other sending issue - * - * @access public - * @static - * - * @param string $type Sync type. Can be `sync` or `full_sync`. - */ - public static function do_cron_sync_by_type( $type ) { - if ( ! self::sync_allowed() || ( 'sync' !== $type && 'full_sync' !== $type ) ) { - return; - } - - self::initialize_sender(); - - $time_limit = Settings::get_setting( 'cron_sync_time_limit' ); - $start_time = time(); - $executions = 0; - - do { - $next_sync_time = self::$sender->get_next_sync_time( $type ); - - if ( $next_sync_time ) { - $delay = $next_sync_time - time() + 1; - if ( $delay > 15 ) { - break; - } elseif ( $delay > 0 ) { - sleep( $delay ); - } - } - - // Explicitly only allow 1 do_full_sync call until issue with Immediate Full Sync is resolved. - // For more context see p1HpG7-9pe-p2. - if ( 'full_sync' === $type && $executions >= 1 ) { - break; - } - - /** - * Only try to sync once if Dedicated Sync is enabled. Dedicated Sync has its own requeueing mechanism - * that will re-run it if there are items in the queue at the end. - */ - if ( 'sync' === $type && $executions >= 1 && Settings::is_dedicated_sync_enabled() ) { - break; - } - - $result = 'full_sync' === $type ? self::$sender->do_full_sync() : self::$sender->do_sync(); - - // # of send actions performed. - ++$executions; - - } while ( $result && ! is_wp_error( $result ) && ( $start_time + $time_limit ) > time() ); - - return $executions; - } - - /** - * Initialize the sync listener. - * - * @access public - * @static - */ - public static function initialize_listener() { - self::$listener = Listener::get_instance(); - } - - /** - * Initializes the sync sender. - * - * @access public - * @static - */ - public static function initialize_sender() { - self::$sender = Sender::get_instance(); - add_filter( 'jetpack_sync_send_data', array( __CLASS__, 'send_data' ), 10, 8 ); - } - - /** - * Initializes sync for WooCommerce. - * - * @access public - * @static - */ - public static function initialize_woocommerce() { - if ( false === class_exists( 'WooCommerce' ) ) { - return; - } - add_filter( 'jetpack_sync_modules', array( __CLASS__, 'add_woocommerce_sync_module' ) ); - - if ( ! class_exists( CustomOrdersTableController::class ) ) { - return; - } - $cot_controller = wc_get_container()->get( CustomOrdersTableController::class ); - if ( $cot_controller->custom_orders_table_usage_is_enabled() ) { - add_filter( 'jetpack_sync_modules', array( __CLASS__, 'add_woocommerce_hpos_order_sync_module' ) ); - } - } - - /** - * Initializes sync for Instant Search. - * - * @access public - * @static - */ - public static function initialize_search() { - if ( false === class_exists( 'Automattic\\Jetpack\\Search\\Module_Control' ) ) { - return; - } - $search_module = new \Automattic\Jetpack\Search\Module_Control(); - if ( $search_module->is_instant_search_enabled() ) { - add_filter( 'jetpack_sync_modules', array( __CLASS__, 'add_search_sync_module' ) ); - } - } - - /** - * Add Search updates to Sync Filters. - * - * @access public - * @static - * - * @param array $sync_modules The list of sync modules declared prior to this filter. - * @return array A list of sync modules that now includes Search's modules. - */ - public static function add_search_sync_module( $sync_modules ) { - $sync_modules[] = 'Automattic\\Jetpack\\Sync\\Modules\\Search'; - return $sync_modules; - } - - /** - * Adds Woo's sync modules to existing modules for sending. - * - * @access public - * @static - * - * @param array $sync_modules The list of sync modules declared prior to this filter. - * @return array A list of sync modules that now includes Woo's modules. - */ - public static function add_woocommerce_sync_module( $sync_modules ) { - $sync_modules[] = 'Automattic\\Jetpack\\Sync\\Modules\\WooCommerce'; - return $sync_modules; - } - - /** - * Adds Woo's HPOS sync modules to existing modules for sending. - * - * @param array $sync_modules The list of sync modules declared prior to this filter. - * - * @access public - * @static - * - * @return array A list of sync modules that now includes Woo's HPOS modules. - */ - public static function add_woocommerce_hpos_order_sync_module( $sync_modules ) { - $sync_modules[] = WooCommerce_HPOS_Orders::class; - return $sync_modules; - } - - /** - * Initializes sync for WP Super Cache. - * - * @access public - * @static - */ - public static function initialize_wp_super_cache() { - if ( false === function_exists( 'wp_cache_is_enabled' ) ) { - return; - } - add_filter( 'jetpack_sync_modules', array( __CLASS__, 'add_wp_super_cache_sync_module' ) ); - } - - /** - * Adds WP Super Cache's sync modules to existing modules for sending. - * - * @access public - * @static - * - * @param array $sync_modules The list of sync modules declared prior to this filer. - * @return array A list of sync modules that now includes WP Super Cache's modules. - */ - public static function add_wp_super_cache_sync_module( $sync_modules ) { - $sync_modules[] = 'Automattic\\Jetpack\\Sync\\Modules\\WP_Super_Cache'; - return $sync_modules; - } - - /** - * Sanitizes the name of sync's cron schedule. - * - * @access public - * @static - * - * @param string $schedule The name of a WordPress cron schedule. - * @return string The sanitized name of sync's cron schedule. - */ - public static function sanitize_filtered_sync_cron_schedule( $schedule ) { - $schedule = sanitize_key( $schedule ); - $schedules = wp_get_schedules(); - - // Make sure that the schedule has actually been registered using the `cron_intervals` filter. - if ( isset( $schedules[ $schedule ] ) ) { - return $schedule; - } - - return self::DEFAULT_SYNC_CRON_INTERVAL_NAME; - } - - /** - * Allows offsetting of start times for sync cron jobs. - * - * @access public - * @static - * - * @param string $schedule The name of a cron schedule. - * @param string $hook The hook that this method is responding to. - * @return int The offset for the sync cron schedule. - */ - public static function get_start_time_offset( $schedule = '', $hook = '' ) { - $start_time_offset = is_multisite() - ? wp_rand( 0, ( 2 * self::DEFAULT_SYNC_CRON_INTERVAL_VALUE ) ) - : 0; - - /** - * Allows overriding the offset that the sync cron jobs will first run. This can be useful when scheduling - * cron jobs across multiple sites in a network. - * - * @since 1.6.3 - * @since-jetpack 4.5.0 - * - * @param int $start_time_offset - * @param string $hook - * @param string $schedule - */ - return (int) apply_filters( - 'jetpack_sync_cron_start_time_offset', - $start_time_offset, - $hook, - $schedule - ); - } - - /** - * Decides if a sync cron should be scheduled. - * - * @access public - * @static - * - * @param string $schedule The name of a cron schedule. - * @param string $hook The hook that this method is responding to. - */ - public static function maybe_schedule_sync_cron( $schedule, $hook ) { - if ( ! $hook ) { - return; - } - $schedule = self::sanitize_filtered_sync_cron_schedule( $schedule ); - - $start_time = time() + self::get_start_time_offset( $schedule, $hook ); - if ( ! wp_next_scheduled( $hook ) ) { - // Schedule a job to send pending queue items once a minute. - wp_schedule_event( $start_time, $schedule, $hook ); - } elseif ( wp_get_schedule( $hook ) !== $schedule ) { - // If the schedule has changed, update the schedule. - wp_clear_scheduled_hook( $hook ); - wp_schedule_event( $start_time, $schedule, $hook ); - } - } - - /** - * Clears Jetpack sync cron jobs. - * - * @access public - * @static - */ - public static function clear_sync_cron_jobs() { - wp_clear_scheduled_hook( 'jetpack_sync_cron' ); - wp_clear_scheduled_hook( 'jetpack_sync_full_cron' ); - } - - /** - * Initializes Jetpack sync cron jobs. - * - * @access public - * @static - */ - public static function init_sync_cron_jobs() { - add_filter( 'cron_schedules', array( __CLASS__, 'jetpack_cron_schedule' ) ); // phpcs:ignore WordPress.WP.CronInterval.ChangeDetected - - add_action( 'jetpack_sync_cron', array( __CLASS__, 'do_cron_sync' ) ); - add_action( 'jetpack_sync_full_cron', array( __CLASS__, 'do_cron_full_sync' ) ); - - /** - * Allows overriding of the default incremental sync cron schedule which defaults to once every 5 minutes. - * - * @since 1.6.3 - * @since-jetpack 4.3.2 - * - * @param string self::DEFAULT_SYNC_CRON_INTERVAL_NAME - */ - $incremental_sync_cron_schedule = apply_filters( 'jetpack_sync_incremental_sync_interval', self::DEFAULT_SYNC_CRON_INTERVAL_NAME ); - self::maybe_schedule_sync_cron( $incremental_sync_cron_schedule, 'jetpack_sync_cron' ); - - /** - * Allows overriding of the full sync cron schedule which defaults to once every 5 minutes. - * - * @since 1.6.3 - * @since-jetpack 4.3.2 - * - * @param string self::DEFAULT_SYNC_CRON_INTERVAL_NAME - */ - $full_sync_cron_schedule = apply_filters( 'jetpack_sync_full_sync_interval', self::DEFAULT_SYNC_CRON_INTERVAL_NAME ); - self::maybe_schedule_sync_cron( $full_sync_cron_schedule, 'jetpack_sync_full_cron' ); - } - - /** - * Perform maintenance when a plugin upgrade occurs. - * - * @access public - * @static - * - * @param string $new_version New version of the plugin. - * @param string $old_version Old version of the plugin. - */ - public static function cleanup_on_upgrade( $new_version = '', $old_version = '' ) { - if ( wp_next_scheduled( 'jetpack_sync_send_db_checksum' ) ) { - wp_clear_scheduled_hook( 'jetpack_sync_send_db_checksum' ); - } - - $is_new_sync_upgrade = version_compare( $old_version, '4.2', '>=' ); - if ( ! empty( $old_version ) && $is_new_sync_upgrade && version_compare( $old_version, '4.5', '<' ) ) { - self::clear_sync_cron_jobs(); - Settings::update_settings( - array( - 'render_filtered_content' => Defaults::$default_render_filtered_content, - ) - ); - } - - Health::on_jetpack_upgraded(); - } - - /** - * Get syncing status for the given fields. - * - * @access public - * @static - * - * @param string|null $fields A comma-separated string of the fields to include in the array from the JSON response. - * @return array An associative array with the status report. - */ - public static function get_sync_status( $fields = null ) { - self::initialize_sender(); - - $sync_module = Modules::get_module( 'full-sync' ); - $queue = self::$sender->get_sync_queue(); - - // _get_cron_array can be false - $cron_timestamps = ( _get_cron_array() ) ? array_keys( _get_cron_array() ) : array(); - $next_cron = ( ! empty( $cron_timestamps ) ) ? $cron_timestamps[0] - time() : ''; - - $checksums = array(); - $debug = array(); - - if ( ! empty( $fields ) ) { - $store = new Replicastore(); - $fields_params = array_map( 'trim', explode( ',', $fields ) ); - - if ( in_array( 'posts_checksum', $fields_params, true ) ) { - $checksums['posts_checksum'] = $store->posts_checksum(); - } - if ( in_array( 'comments_checksum', $fields_params, true ) ) { - $checksums['comments_checksum'] = $store->comments_checksum(); - } - if ( in_array( 'post_meta_checksum', $fields_params, true ) ) { - $checksums['post_meta_checksum'] = $store->post_meta_checksum(); - } - if ( in_array( 'comment_meta_checksum', $fields_params, true ) ) { - $checksums['comment_meta_checksum'] = $store->comment_meta_checksum(); - } - - if ( in_array( 'debug_details', $fields_params, true ) ) { - $debug = self::get_debug_details(); - } - } - - $full_sync_status = ( $sync_module ) ? $sync_module->get_status() : array(); - - $full_queue = self::$sender->get_full_sync_queue(); - - $result = array_merge( - $full_sync_status, - $checksums, - $debug, - array( - 'cron_size' => count( $cron_timestamps ), - 'next_cron' => $next_cron, - 'queue_size' => $queue->size(), - 'queue_lag' => $queue->lag(), - 'queue_next_sync' => ( self::$sender->get_next_sync_time( 'sync' ) - microtime( true ) ), - 'full_queue_next_sync' => ( self::$sender->get_next_sync_time( 'full_sync' ) - microtime( true ) ), - ) - ); - - // Verify $sync_module is not false. - if ( ( $sync_module ) && ! str_contains( get_class( $sync_module ), 'Full_Sync_Immediately' ) ) { - $result['full_queue_size'] = $full_queue->size(); - $result['full_queue_lag'] = $full_queue->lag(); - } - return $result; - } - - /** - * Reset Sync locks. - * - * @access public - * @static - * @since 1.43.0 - * - * @param bool $unlock_queues Whether to unlock Sync queues. Defaults to true. - */ - public static function reset_sync_locks( $unlock_queues = true ) { - // Next sync locks. - delete_option( Sender::NEXT_SYNC_TIME_OPTION_NAME . '_sync' ); - delete_option( Sender::NEXT_SYNC_TIME_OPTION_NAME . '_full_sync' ); - delete_option( Sender::NEXT_SYNC_TIME_OPTION_NAME . '_full-sync-enqueue' ); - // Retry after locks. - delete_option( self::RETRY_AFTER_PREFIX . 'sync' ); - delete_option( self::RETRY_AFTER_PREFIX . 'full_sync' ); - // Dedicated sync locks. - \Jetpack_Options::delete_raw_option( Dedicated_Sender::DEDICATED_SYNC_REQUEST_LOCK_OPTION_NAME ); - delete_transient( Dedicated_Sender::DEDICATED_SYNC_TEMPORARY_DISABLE_FLAG ); - // Lock for disabling Sync sending temporarily. - delete_transient( Sender::TEMP_SYNC_DISABLE_TRANSIENT_NAME ); - - // Queue locks. - // Note that we are just unlocking the queues here, not reseting them. - if ( $unlock_queues ) { - $sync_queue = new Queue( 'sync' ); - $sync_queue->unlock(); - - $full_sync_queue = new Queue( 'full_sync' ); - $full_sync_queue->unlock(); - } - } - - /** - * Prepare JSONL data. - * - * @param mixed $data The data to be prepared. - * - * @return string The prepared JSONL data. - */ - private static function prepare_jsonl_data( $data ) { - $jsonl_data = implode( - "\n", - array_map( - function ( $key, $value ) { - return wp_json_encode( array( $key => $value ) ); - }, - array_keys( (array) $data ), - array_values( (array) $data ) - ) - ); - return $jsonl_data; - } - - /** - * Helper method to process the API response. - * - * @param mixed $response The response from the API. - * @return array|Wp_Error Array for successful response or a WP_Error object. - */ - private static function process_rest_api_response( $response ) { - - $response_code = wp_remote_retrieve_response_code( $response ); - $response_body = wp_remote_retrieve_body( $response ); - if ( is_wp_error( $response ) ) { - return $response; - } - $decoded_response = json_decode( $response_body, true ); - - if ( false === is_array( $decoded_response ) ) { - return new WP_Error( 'sync_rest_api_response_decoding_failed', 'Sync REST API response decoding failed', $response_body ); - } - - if ( $response_code !== 200 || false === isset( $decoded_response['processed_items'] ) ) { - if ( is_array( $decoded_response ) && isset( $decoded_response['code'] ) && isset( $decoded_response['message'] ) ) { - return new WP_Error( - 'jetpack_sync_send_error_' . $decoded_response['code'], - $decoded_response['message'], - $decoded_response['data'] ?? null - ); - } else { - return new WP_Error( $response_code, 'Sync REST API request failed', $response_body ); - } - } else { - return $decoded_response; - } - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-data-settings.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-data-settings.php deleted file mode 100644 index 2ce2cb6e..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-data-settings.php +++ /dev/null @@ -1,419 +0,0 @@ - array( - 'Automattic\\Jetpack\\Sync\\Modules\\Callables', - 'Automattic\\Jetpack\\Sync\\Modules\\Constants', - 'Automattic\\Jetpack\\Sync\\Modules\\Full_Sync_Immediately', // enable Initial Sync on Site Connection. - 'Automattic\\Jetpack\\Sync\\Modules\\Options', - 'Automattic\\Jetpack\\Sync\\Modules\\Updates', - ), - 'jetpack_sync_callable_whitelist' => array( - 'site_url' => array( 'Automattic\\Jetpack\\Connection\\Urls', 'site_url' ), - 'home_url' => array( 'Automattic\\Jetpack\\Connection\\Urls', 'home_url' ), - 'get_plugins' => array( 'Automattic\\Jetpack\\Sync\\Functions', 'get_plugins' ), - 'get_themes' => array( 'Automattic\\Jetpack\\Sync\\Functions', 'get_themes' ), - 'paused_plugins' => array( 'Automattic\\Jetpack\\Sync\\Functions', 'get_paused_plugins' ), - 'paused_themes' => array( 'Automattic\\Jetpack\\Sync\\Functions', 'get_paused_themes' ), - 'timezone' => array( 'Automattic\\Jetpack\\Sync\\Functions', 'get_timezone' ), - 'wp_get_environment_type' => 'wp_get_environment_type', - 'wp_max_upload_size' => 'wp_max_upload_size', - 'wp_version' => array( 'Automattic\\Jetpack\\Sync\\Functions', 'wp_version' ), - ), - 'jetpack_sync_constants_whitelist' => array( - 'ABSPATH', - 'ALTERNATE_WP_CRON', - 'ATOMIC_CLIENT_ID', - 'AUTOMATIC_UPDATER_DISABLED', - 'DISABLE_WP_CRON', - 'DISALLOW_FILE_EDIT', - 'DISALLOW_FILE_MODS', - 'EMPTY_TRASH_DAYS', - 'FS_METHOD', - 'IS_PRESSABLE', - 'PHP_VERSION', - 'WP_ACCESSIBLE_HOSTS', - 'WP_AUTO_UPDATE_CORE', - 'WP_CONTENT_DIR', - 'WP_CRON_LOCK_TIMEOUT', - 'WP_DEBUG', - 'WP_HTTP_BLOCK_EXTERNAL', - 'WP_MAX_MEMORY_LIMIT', - 'WP_MEMORY_LIMIT', - 'WP_POST_REVISIONS', - ), - 'jetpack_sync_options_whitelist' => array( - /** - * Sync related options - */ - 'jetpack_sync_non_blocking', - 'jetpack_sync_non_public_post_stati', - 'jetpack_sync_settings_comment_meta_whitelist', - 'jetpack_sync_settings_post_meta_whitelist', - 'jetpack_sync_settings_post_types_blacklist', - 'jetpack_sync_settings_taxonomies_blacklist', - 'jetpack_sync_settings_dedicated_sync_enabled', - 'jetpack_sync_settings_custom_queue_table_enabled', - 'jetpack_sync_settings_wpcom_rest_api_enabled', - /** - * Connection related options - */ - 'jetpack_connection_active_plugins', - 'jetpack_package_versions', - /** - * Generic site options - */ - 'blog_charset', - 'blog_public', - 'blogdescription', - 'blogname', - 'permalink_structure', - 'stylesheet', - 'time_format', - 'timezone_string', - ), - ); - - const MODULE_FILTER_MAPPING = array( - 'Automattic\\Jetpack\\Sync\\Modules\\Options' => array( - 'jetpack_sync_options_whitelist', - 'jetpack_sync_options_contentless', - ), - 'Automattic\\Jetpack\\Sync\\Modules\\Constants' => array( - 'jetpack_sync_constants_whitelist', - ), - 'Automattic\\Jetpack\\Sync\\Modules\\Callables' => array( - 'jetpack_sync_callable_whitelist', - 'jetpack_sync_multisite_callable_whitelist', - ), - 'Automattic\\Jetpack\\Sync\\Modules\\Posts' => array( - 'jetpack_sync_post_meta_whitelist', - ), - 'Automattic\\Jetpack\\Sync\\Modules\\Comments' => array( - 'jetpack_sync_comment_meta_whitelist', - ), - 'Automattic\\Jetpack\\Sync\\Modules\\Users' => array( - 'jetpack_sync_capabilities_whitelist', - ), - 'Automattic\\Jetpack\\Sync\\Modules\\Import' => array( - 'jetpack_sync_known_importers', - ), - ); - - const MODULES_FILTER_NAME = 'jetpack_sync_modules'; - - /** - * The static data settings array which contains the aggregated data settings for - * each sync filter. - * - * @var array - */ - private static $data_settings = array(); - - /** - * The static array which contains the list of filter hooks that have already been set up. - * - * @var array - */ - private static $set_filter_hooks = array(); - - /** - * Adds the data settings provided by a plugin to the Sync data settings. - * - * @param array $plugin_settings The array provided by the plugin. The array must use filters - * from the DATA_FILTER_DEFAULTS list as keys. - */ - public function add_settings_list( $plugin_settings = array() ) { - if ( empty( $plugin_settings ) || ! is_array( $plugin_settings ) ) { - /* - * No custom plugin settings, so use defaults for everything and bail early. - */ - $this->set_all_defaults(); - return; - } - - $this->add_filters_custom_settings_and_hooks( $plugin_settings ); - - if ( ! did_action( 'jetpack_sync_add_required_data_settings' ) ) { - $this->add_required_settings(); - /** - * Fires when the required settings have been adding to the static - * data_settings array. - * - * @since 1.29.2 - * - * @module sync - */ - do_action( 'jetpack_sync_add_required_data_settings' ); - } - } - - /** - * Sets the default values for sync modules and all sync data filters. - */ - private function set_all_defaults() { - $this->add_sync_filter_setting( self::MODULES_FILTER_NAME, Modules::DEFAULT_SYNC_MODULES ); - - foreach ( array_keys( Default_Filter_Settings::DATA_FILTER_DEFAULTS ) as $filter ) { - $this->add_sync_filter_setting( $filter, $this->get_default_setting_for_filter( $filter ) ); - } - } - - /** - * Returns the default settings for the given filter. - * - * @param string $filter The filter name. - * - * @return array The filter's default settings array. - */ - private function get_default_setting_for_filter( $filter ) { - if ( self::MODULES_FILTER_NAME === $filter ) { - return Modules::DEFAULT_SYNC_MODULES; - } - - return ( new Default_Filter_Settings() )->get_default_settings( $filter ); - } - - /** - * Adds the custom settings and sets up the necessary filter hooks. - * - * @param array $filters_settings The custom settings. - */ - private function add_filters_custom_settings_and_hooks( $filters_settings ) { - if ( isset( $filters_settings[ self::MODULES_FILTER_NAME ] ) && is_array( $filters_settings[ self::MODULES_FILTER_NAME ] ) ) { - $this->add_custom_filter_setting( self::MODULES_FILTER_NAME, $filters_settings[ self::MODULES_FILTER_NAME ] ); - $enabled_modules = $filters_settings[ self::MODULES_FILTER_NAME ]; - } else { - $this->add_sync_filter_setting( self::MODULES_FILTER_NAME, Modules::DEFAULT_SYNC_MODULES ); - $enabled_modules = Modules::DEFAULT_SYNC_MODULES; - } - - $all_modules = Modules::DEFAULT_SYNC_MODULES; - - foreach ( $all_modules as $module ) { - if ( in_array( $module, $enabled_modules, true ) || in_array( $module, self::MUST_SYNC_DATA_SETTINGS['jetpack_sync_modules'], true ) ) { - $this->add_filters_for_enabled_module( $module, $filters_settings ); - } else { - $this->add_filters_for_disabled_module( $module ); - } - } - } - - /** - * Adds the filters for the provided enabled module. If the settings provided custom filter settings - * for the module's filters, those are used. Otherwise, the filter's default settings are used. - * - * @param string $module The module name. - * @param array $filters_settings The settings for the filters. - */ - private function add_filters_for_enabled_module( $module, $filters_settings ) { - $module_mapping = self::MODULE_FILTER_MAPPING; - $filters_for_module = isset( $module_mapping[ $module ] ) ? $module_mapping[ $module ] : array(); - - foreach ( $filters_for_module as $filter ) { - if ( isset( $filters_settings[ $filter ] ) ) { - $this->add_custom_filter_setting( $filter, $filters_settings[ $filter ] ); - } else { - $this->add_sync_filter_setting( $filter, $this->get_default_setting_for_filter( $filter ) ); - } - } - } - - /** - * Adds the filters for the provided disabled module. The disabled module's associated filter settings are - * set to an empty array. - * - * @param string $module The module name. - */ - private function add_filters_for_disabled_module( $module ) { - $module_mapping = self::MODULE_FILTER_MAPPING; - $filters_for_module = isset( $module_mapping[ $module ] ) ? $module_mapping[ $module ] : array(); - - foreach ( $filters_for_module as $filter ) { - $this->add_custom_filter_setting( $filter, array() ); - } - } - - /** - * Adds the provided custom setting for a filter. If the filter setting isn't valid, the default - * value is used. - * - * If the filter's hook hasn't already been set up, it gets set up. - * - * @param string $filter The filter. - * @param array $setting The filter setting. - */ - private function add_custom_filter_setting( $filter, $setting ) { - if ( ! $this->is_valid_filter_setting( $filter, $setting ) ) { - /* - * The provided setting isn't valid, so use the default for this filter. - * We're using the default values so there's no need to set the filter hook. - */ - $this->add_sync_filter_setting( $filter, $this->get_default_setting_for_filter( $filter ) ); - return; - } - - if ( ! isset( static::$set_filter_hooks[ $filter ] ) ) { - // First time a custom modules setting is provided, so set the filter hook. - add_filter( $filter, array( $this, 'sync_data_filter_hook' ) ); - static::$set_filter_hooks[ $filter ] = 1; - } - - $this->add_sync_filter_setting( $filter, $setting ); - } - - /** - * Determines whether the filter setting is valid. The setting array is in the correct format (associative or indexed). - * - * @param string $filter The filter to check. - * @param array $filter_settings The filter settings. - * - * @return bool Whether the filter settings can be used. - */ - private function is_valid_filter_setting( $filter, $filter_settings ) { - if ( ! is_array( $filter_settings ) ) { - // The settings for each filter must be an array. - return false; - } - - if ( empty( $filter_settings ) ) { - // Empty settings are allowed. - return true; - } - - $indexed_array = isset( $filter_settings[0] ); - if ( in_array( $filter, Default_Filter_Settings::ASSOCIATIVE_FILTERS, true ) && ! $indexed_array ) { - return true; - } elseif ( ! in_array( $filter, Default_Filter_Settings::ASSOCIATIVE_FILTERS, true ) && $indexed_array ) { - return true; - } - - return false; - } - - /** - * Adds the data settings that are always required for every plugin that uses Sync. - */ - private function add_required_settings() { - foreach ( self::MUST_SYNC_DATA_SETTINGS as $filter => $setting ) { - // If the corresponding setting is already set and matches the default one, no need to proceed. - if ( isset( static::$data_settings[ $filter ] ) && static::$data_settings[ $filter ] === $this->get_default_setting_for_filter( $filter ) ) { - continue; - } - $this->add_custom_filter_setting( $filter, $setting ); - } - } - - /** - * Adds the provided data setting for the provided filter. - * - * @param string $filter The filter name. - * @param array $value The data setting. - */ - private function add_sync_filter_setting( $filter, $value ) { - if ( ! isset( static::$data_settings[ $filter ] ) ) { - static::$data_settings[ $filter ] = $value; - return; - } - - if ( in_array( $filter, Default_Filter_Settings::ASSOCIATIVE_FILTERS, true ) ) { - $this->add_associative_filter_setting( $filter, $value ); - } else { - $this->add_indexed_filter_setting( $filter, $value ); - } - } - - /** - * Adds the provided data setting for the provided filter. This method handles - * adding settings to data that is stored as an associative array. - * - * @param string $filter The filter name. - * @param array $settings The data settings. - */ - private function add_associative_filter_setting( $filter, $settings ) { - foreach ( $settings as $key => $item ) { - if ( ! array_key_exists( $key, static::$data_settings[ $filter ] ) ) { - static::$data_settings[ $filter ][ $key ] = $item; - } - } - } - - /** - * Adds the provided data setting for the provided filter. This method handles - * adding settings to data that is stored as an indexed array. - * - * @param string $filter The filter name. - * @param array $settings The data settings. - */ - private function add_indexed_filter_setting( $filter, $settings ) { - static::$data_settings[ $filter ] = array_unique( - array_merge( - static::$data_settings[ $filter ], - $settings - ) - ); - } - - /** - * The callback function added to the sync data filters. Combines the list in the $data_settings property - * with any non-default values from the received array. - * - * @param array $filtered_values The data revieved from the filter. - * - * @return array The data settings for the filter. - */ - public function sync_data_filter_hook( $filtered_values ) { - if ( ! is_array( $filtered_values ) ) { - // Something is wrong with the input, so set it to an empty array. - $filtered_values = array(); - } - - $current_filter = current_filter(); - - if ( ! isset( static::$data_settings[ $current_filter ] ) ) { - return $filtered_values; - } - - if ( in_array( $current_filter, Default_Filter_Settings::ASSOCIATIVE_FILTERS, true ) ) { - $extra_filters = array_diff_key( $filtered_values, $this->get_default_setting_for_filter( $current_filter ) ); - $this->add_associative_filter_setting( $current_filter, $extra_filters ); - return static::$data_settings[ $current_filter ]; - } - - $extra_filters = array_diff( $filtered_values, $this->get_default_setting_for_filter( $current_filter ) ); - $this->add_indexed_filter_setting( $current_filter, $extra_filters ); - return static::$data_settings[ $current_filter ]; - } - - /** - * Sets the $data_settings property to an empty array. This is useful for testing. - */ - public function empty_data_settings_and_hooks() { - static::$data_settings = array(); - static::$set_filter_hooks = array(); - } - - /** - * Returns the $data_settings property. - * - * @return array The data_settings property. - */ - public function get_data_settings() { - return static::$data_settings; - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-dedicated-sender.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-dedicated-sender.php deleted file mode 100644 index 8c15dd37..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-dedicated-sender.php +++ /dev/null @@ -1,408 +0,0 @@ -is_locked() ) { - return new WP_Error( 'locked_queue_' . $queue->id ); - } - - if ( $queue->size() === 0 ) { - return new WP_Error( 'empty_queue_' . $queue->id ); - } - - // Return early if we've gotten a retry-after header response that is not expired. - $retry_time = get_option( Actions::RETRY_AFTER_PREFIX . $queue->id ); - if ( $retry_time && $retry_time >= microtime( true ) ) { - return new WP_Error( 'retry_after_' . $queue->id ); - } - - // Don't sync if we are throttled. - $sync_next_time = Sender::get_instance()->get_next_sync_time( $queue->id ); - if ( $sync_next_time > microtime( true ) ) { - return new WP_Error( 'sync_throttled_' . $queue->id ); - } - /** - * How much time to wait before we start suspecting Dedicated Sync is in trouble. - */ - $queue_send_time_threshold = 30 * MINUTE_IN_SECONDS; - - $queue_lag = $queue->lag(); - - /** - * Try to acquire a request lock, so we don't spawn multiple requests at the same time. - * This should prevent cases where sites might have limits on the amount of simultaneous requests. - */ - $request_lock = self::try_lock_spawn_request(); - if ( ! $request_lock ) { - return new WP_Error( 'dedicated_request_lock', 'Unable to acquire request lock' ); - } - - /** - * If the queue lag is bigger than the threshold, we want to check if Dedicated Sync is working correctly. - * We will do by sending a test request and disabling Dedicated Sync if it's not working. We will also exit early - * in case we send the test request since it is a blocking request. - */ - if ( $queue_lag > $queue_send_time_threshold ) { - if ( false === get_transient( self::DEDICATED_SYNC_CHECK_TRANSIENT ) ) { - if ( ! self::can_spawn_dedicated_sync_request() ) { - self::on_dedicated_sync_lag_not_sending_threshold_reached(); - return new WP_Error( 'dedicated_sync_not_sending', 'Dedicated Sync is not successfully sending events' ); - } - return true; - } - } - - $url = rest_url( 'jetpack/v4/sync/spawn-sync' ); - $url = add_query_arg( 'time', time(), $url ); // Enforce Cache busting. - $url = add_query_arg( self::DEDICATED_SYNC_REQUEST_LOCK_QUERY_PARAM_NAME, $request_lock, $url ); - - $args = array( - 'cookies' => $_COOKIE, - 'blocking' => false, - 'timeout' => 0.01, - /** This filter is documented in wp-includes/class-wp-http-streams.php */ - 'sslverify' => apply_filters( 'https_local_ssl_verify', false ), - ); - - $result = wp_remote_get( $url, $args ); - if ( is_wp_error( $result ) ) { - return $result; - } - - return true; - } - - /** - * Attempt to acquire a request lock. - * - * To avoid spawning multiple requests at the same time, we need to have a quick lock that will - * allow only a single request to continue if we try to spawn multiple at the same time. - * - * @return false|mixed|string - */ - public static function try_lock_spawn_request() { - $current_microtime = (string) microtime( true ); - - if ( wp_using_ext_object_cache() ) { - if ( true !== wp_cache_add( self::DEDICATED_SYNC_REQUEST_LOCK_OPTION_NAME, $current_microtime, 'jetpack', self::DEDICATED_SYNC_REQUEST_LOCK_TIMEOUT ) ) { - // Cache lock has been claimed already. - return false; - } - } - - $current_lock_value = \Jetpack_Options::get_raw_option( self::DEDICATED_SYNC_REQUEST_LOCK_OPTION_NAME, null ); - - if ( ! empty( $current_lock_value ) ) { - // Check if time has passed to overwrite the lock - min 5s? - if ( is_numeric( $current_lock_value ) && ( ( $current_microtime - $current_lock_value ) < self::DEDICATED_SYNC_REQUEST_LOCK_TIMEOUT ) ) { - // Still in previous lock, quit - return false; - } - - // If the value is not numeric (float/current time), we want to just overwrite it and continue. - } - - // Update. We don't want it to autoload, as we want to fetch it right before the checks. - \Jetpack_Options::update_raw_option( self::DEDICATED_SYNC_REQUEST_LOCK_OPTION_NAME, $current_microtime, false ); - // Give some time for the update to happen - usleep( wp_rand( 1000, 3000 ) ); - - $updated_value = \Jetpack_Options::get_raw_option( self::DEDICATED_SYNC_REQUEST_LOCK_OPTION_NAME, null ); - - if ( $updated_value === $current_microtime ) { - return $current_microtime; - } - - return false; - } - - /** - * Attempt to release the request lock. - * - * @param string $lock_id The request lock that's currently being held. - * - * @return bool|WP_Error - */ - public static function try_release_lock_spawn_request( $lock_id = '' ) { - // Try to get the lock_id from the current request if it's not supplied. - if ( empty( $lock_id ) ) { - $lock_id = self::get_request_lock_id_from_request(); - } - - // If it's still not a valid lock_id, throw an error and let the lock process figure it out. - if ( empty( $lock_id ) || ! is_numeric( $lock_id ) ) { - return new WP_Error( 'dedicated_request_lock_invalid', 'Invalid lock_id supplied for unlock' ); - } - - if ( wp_using_ext_object_cache() ) { - if ( (string) $lock_id === wp_cache_get( self::DEDICATED_SYNC_REQUEST_LOCK_OPTION_NAME, 'jetpack', true ) ) { - wp_cache_delete( self::DEDICATED_SYNC_REQUEST_LOCK_OPTION_NAME, 'jetpack' ); - } - } - - // If this is the flow that has the lock, let's release it so we can spawn other requests afterwards - $current_lock_value = \Jetpack_Options::get_raw_option( self::DEDICATED_SYNC_REQUEST_LOCK_OPTION_NAME, null ); - if ( (string) $lock_id === $current_lock_value ) { - \Jetpack_Options::delete_raw_option( self::DEDICATED_SYNC_REQUEST_LOCK_OPTION_NAME ); - return true; - } - - return false; - } - - /** - * Try to get the request lock id from the current request. - * - * @return array|string|string[]|null - */ - public static function get_request_lock_id_from_request() { - // phpcs:ignore WordPress.Security.NonceVerification.Recommended - if ( ! isset( $_GET[ self::DEDICATED_SYNC_REQUEST_LOCK_QUERY_PARAM_NAME ] ) || ! is_numeric( $_GET[ self::DEDICATED_SYNC_REQUEST_LOCK_QUERY_PARAM_NAME ] ) ) { - return null; - } - - // phpcs:ignore WordPress.Security.NonceVerification.Recommended,WordPress.Security.ValidatedSanitizedInput.InputNotSanitized - return wp_unslash( $_GET[ self::DEDICATED_SYNC_REQUEST_LOCK_QUERY_PARAM_NAME ] ); - } - - /** - * Test Sync spawning functionality by making a request to the - * Sync spawning endpoint and storing the result (status code) in a transient. - * - * @since $$next_version$$ - * - * @return bool True if we got a successful response, false otherwise. - */ - public static function can_spawn_dedicated_sync_request() { - $dedicated_sync_check_transient = self::DEDICATED_SYNC_CHECK_TRANSIENT; - - $dedicated_sync_response_body = get_transient( $dedicated_sync_check_transient ); - - if ( false === $dedicated_sync_response_body ) { - $url = rest_url( 'jetpack/v4/sync/spawn-sync' ); - $url = add_query_arg( 'time', time(), $url ); // Enforce Cache busting. - $args = array( - 'cookies' => $_COOKIE, - 'timeout' => 30, - /** This filter is documented in wp-includes/class-wp-http-streams.php */ - 'sslverify' => apply_filters( 'https_local_ssl_verify', false ), - ); - - $response = wp_remote_get( $url, $args ); - $dedicated_sync_response_code = wp_remote_retrieve_response_code( $response ); - $dedicated_sync_response_body = trim( wp_remote_retrieve_body( $response ) ); - - /** - * Limit the size of the body that we save in the transient to avoid cases where an error - * occurs and a whole generated HTML page is returned. We don't need to store the whole thing. - * - * The regexp check is done to make sure we can detect the string even if the body returns some additional - * output, like some caching plugins do when they try to pad the request. - */ - $regexp = '!' . preg_quote( self::DEDICATED_SYNC_VALIDATION_STRING, '!' ) . '!uis'; - if ( preg_match( $regexp, $dedicated_sync_response_body ) ) { - $saved_response_body = self::DEDICATED_SYNC_VALIDATION_STRING; - } else { - $saved_response_body = time(); - } - - set_transient( $dedicated_sync_check_transient, $saved_response_body, HOUR_IN_SECONDS ); - - // Send a bit more information to WordPress.com to help debugging issues. - if ( $saved_response_body !== self::DEDICATED_SYNC_VALIDATION_STRING ) { - $data = array( - 'timestamp' => microtime( true ), - 'response_code' => $dedicated_sync_response_code, - 'response_body' => $dedicated_sync_response_body, - - // Send the flow type that was attempted. - 'sync_flow_type' => 'dedicated', - ); - - $sender = Sender::get_instance(); - - $sender->send_action( 'jetpack_sync_flow_error_enable', $data ); - } - } - return self::DEDICATED_SYNC_VALIDATION_STRING === $dedicated_sync_response_body; - } - - /** - * Disable dedicated sync and set a transient to prevent re-enabling it for some time. - * - * @return void - */ - public static function on_dedicated_sync_lag_not_sending_threshold_reached() { - set_transient( self::DEDICATED_SYNC_TEMPORARY_DISABLE_FLAG, true, 6 * HOUR_IN_SECONDS ); - - Settings::update_settings( - array( - 'dedicated_sync_enabled' => 0, - ) - ); - - // Inform that we had to temporarily disable Dedicated Sync - $data = array( - 'timestamp' => microtime( true ), - - // Send the flow type that was attempted. - 'sync_flow_type' => 'dedicated', - ); - - $sender = Sender::get_instance(); - - $sender->send_action( 'jetpack_sync_flow_error_temp_disable', $data ); - } - - /** - * Disable or enable Dedicated Sync sender based on the header value returned from WordPress.com - * - * @param string $dedicated_sync_header The Dedicated Sync header value - `on` or `off`. - * - * @return bool Whether Dedicated Sync is going to be enabled or not. - */ - public static function maybe_change_dedicated_sync_status_from_wpcom_header( $dedicated_sync_header ) { - $dedicated_sync_enabled = 'on' === $dedicated_sync_header ? 1 : 0; - - // Prevent enabling of Dedicated sync via header flag if we're in an autoheal timeout. - if ( $dedicated_sync_enabled ) { - $check_transient = get_transient( self::DEDICATED_SYNC_TEMPORARY_DISABLE_FLAG ); - - if ( $check_transient ) { - // Something happened and Dedicated Sync should not be automatically re-enabled. - return false; - } - } - - Settings::update_settings( - array( - 'dedicated_sync_enabled' => $dedicated_sync_enabled, - ) - ); - - return Settings::is_dedicated_sync_enabled(); - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-default-filter-settings.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-default-filter-settings.php deleted file mode 100644 index 81946fe8..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-default-filter-settings.php +++ /dev/null @@ -1,80 +0,0 @@ - 'default_options_whitelist', - 'jetpack_sync_options_contentless' => 'default_options_contentless', - 'jetpack_sync_constants_whitelist' => 'default_constants_whitelist', - 'jetpack_sync_callable_whitelist' => 'default_callable_whitelist', - 'jetpack_sync_multisite_callable_whitelist' => 'default_multisite_callable_whitelist', - 'jetpack_sync_post_meta_whitelist' => 'post_meta_whitelist', - 'jetpack_sync_comment_meta_whitelist' => 'comment_meta_whitelist', - 'jetpack_sync_capabilities_whitelist' => 'default_capabilities_whitelist', - 'jetpack_sync_known_importers' => 'default_known_importers', - ); - - /** - * The data associated with these filters are stored as associative arrays. - * (All other filters store data as indexed arrays.) - */ - const ASSOCIATIVE_FILTERS = array( - 'jetpack_sync_callable_whitelist', - 'jetpack_sync_multisite_callable_whitelist', - 'jetpack_sync_known_importers', - ); - - /** - * Returns the default data settings list for the provided filter. - * - * @param string $filter The filter name. - * - * @return array|false The default list of data settings. Returns false if the provided - * filter doesn't not have an array of default settings. - */ - public function get_default_settings( $filter ) { - if ( ! is_string( $filter ) || ! array_key_exists( $filter, self::DATA_FILTER_DEFAULTS ) ) { - return false; - } - - $property = self::DATA_FILTER_DEFAULTS[ $filter ]; - $class = self::DEFAULT_FILTER_CLASS; - return $class::$$property; - } - - /** - * Returns an array containing the default values for all of the filters shown - * in DATA_FILTER_DEFAULTS. - * - * @return array The array containing all sync data filters and their default values. - */ - public function get_all_filters_default_settings() { - $defaults = array(); - - foreach ( self::DATA_FILTER_DEFAULTS as $filter => $default_location ) { - $defaults[ $filter ] = $this->get_default_settings( $filter ); - } - return $defaults; - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-defaults.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-defaults.php deleted file mode 100644 index 2654dbd7..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-defaults.php +++ /dev/null @@ -1,1335 +0,0 @@ - array( 'Automattic\\Jetpack\\Sync\\Functions', 'get_loaded_extensions' ), - 'get_plugins' => array( 'Automattic\\Jetpack\\Sync\\Functions', 'get_plugins' ), - 'get_themes' => array( 'Automattic\\Jetpack\\Sync\\Functions', 'get_themes' ), - 'get_plugins_action_links' => array( 'Automattic\\Jetpack\\Sync\\Functions', 'get_plugins_action_links' ), - 'has_file_system_write_access' => array( 'Automattic\\Jetpack\\Sync\\Functions', 'file_system_write_access' ), - 'home_url' => array( 'Automattic\\Jetpack\\Connection\\Urls', 'home_url' ), - 'hosting_provider' => array( 'Automattic\\Jetpack\\Sync\\Functions', 'get_hosting_provider' ), - 'is_fse_theme' => array( 'Automattic\\Jetpack\\Sync\\Functions', 'get_is_fse_theme' ), - 'is_main_network' => array( __CLASS__, 'is_multi_network' ), - 'is_multi_site' => 'is_multisite', - 'is_version_controlled' => array( 'Automattic\\Jetpack\\Sync\\Functions', 'is_version_controlled' ), - 'locale' => 'get_locale', - 'main_network_site' => array( 'Automattic\\Jetpack\\Connection\\Urls', 'main_network_site_url' ), - 'main_network_site_wpcom_id' => array( 'Automattic\\Jetpack\\Sync\\Functions', 'main_network_site_wpcom_id' ), - 'paused_plugins' => array( 'Automattic\\Jetpack\\Sync\\Functions', 'get_paused_plugins' ), - 'paused_themes' => array( 'Automattic\\Jetpack\\Sync\\Functions', 'get_paused_themes' ), - 'post_type_features' => array( 'Automattic\\Jetpack\\Sync\\Functions', 'get_post_type_features' ), - 'post_types' => array( 'Automattic\\Jetpack\\Sync\\Functions', 'get_post_types' ), - 'rest_api_allowed_post_types' => array( 'Automattic\\Jetpack\\Sync\\Functions', 'rest_api_allowed_post_types' ), - 'rest_api_allowed_public_metadata' => array( 'Automattic\\Jetpack\\Sync\\Functions', 'rest_api_allowed_public_metadata' ), - 'roles' => array( 'Automattic\\Jetpack\\Sync\\Functions', 'roles' ), - 'shortcodes' => array( 'Automattic\\Jetpack\\Sync\\Functions', 'get_shortcodes' ), - 'site_icon_url' => array( 'Automattic\\Jetpack\\Sync\\Functions', 'site_icon_url' ), - 'site_url' => array( 'Automattic\\Jetpack\\Connection\\Urls', 'site_url' ), - 'taxonomies' => array( 'Automattic\\Jetpack\\Sync\\Functions', 'get_taxonomies' ), - 'theme_support' => array( 'Automattic\\Jetpack\\Sync\\Functions', 'get_theme_support' ), - 'timezone' => array( 'Automattic\\Jetpack\\Sync\\Functions', 'get_timezone' ), - 'wp_get_environment_type' => 'wp_get_environment_type', - 'wp_max_upload_size' => 'wp_max_upload_size', - 'wp_version' => array( 'Automattic\\Jetpack\\Sync\\Functions', 'wp_version' ), - 'active_modules' => array( 'Automattic\\Jetpack\\Sync\\Functions', 'get_active_modules' ), - ); - - /** - * Array of post type attributes synced. - * - * @var array Default post type attributes. - */ - public static $default_post_type_attributes = array( - '_builtin' => false, - '_edit_link' => 'post.php?post=%d', - 'can_export' => true, - 'cap' => array(), - 'capabilities' => array(), - 'capability_type' => 'post', - 'delete_with_user' => null, - 'description' => '', - 'exclude_from_search' => true, - 'has_archive' => false, - 'hierarchical' => false, - 'label' => '', - 'labels' => array(), - 'map_meta_cap' => true, - 'menu_icon' => null, - 'menu_position' => null, - 'name' => '', - 'public' => false, - 'publicly_queryable' => null, - 'query_var' => true, - 'rest_base' => false, - 'rewrite' => true, - 'show_in_admin_bar' => false, - 'show_in_menu' => null, - 'show_in_nav_menus' => null, - 'show_in_rest' => false, - 'show_ui' => false, - 'supports' => array(), - 'taxonomies' => array(), - ); - - /** - * Get the whitelist of callables allowed to be managed via the JSON API. - * - * @return array Whitelist of callables allowed to be managed via the JSON API. - */ - public static function get_callable_whitelist() { - /** - * Filter the list of callables that are manageable via the JSON API. - * - * @module sync - * - * @since 1.6.3 - * @since-jetpack 4.8.0 - * - * @param array The default list of callables. - */ - return apply_filters( 'jetpack_sync_callable_whitelist', self::$default_callable_whitelist ); - } - - /** - * Post types that will not be synced. - * - * These are usually automated post types (sitemaps, logs, etc). - * - * @var array Blacklisted post types. - */ - public static $blacklisted_post_types = array( - '_term_meta', - 'ai1ec_event', - 'ai_log', // Logger - https://github.com/alleyinteractive/logger. - 'amp_validated_url', // AMP Validation Errors. - 'bwg_album', - 'bwg_gallery', - 'customize_changeset', // WP built-in post type for Customizer changesets. - 'dn_wp_yt_log', - 'flamingo_contact', // https://wordpress.org/plugins/flamingo/. - 'flamingo_inbound', - 'flamingo_outbound', - 'http', - 'idx_page', - 'jetpack_inspect_log', // Jetpack Inspect dev tool. p1HpG7-nkd-p2 - 'jetpack_migration', - 'jp_img_sitemap', - 'jp_img_sitemap_index', - 'jp_sitemap', - 'jp_sitemap_index', - 'jp_sitemap_master', - 'jp_vid_sitemap', - 'jp_vid_sitemap_index', - 'msm_sitemap', // Metro Sitemap Plugin. - 'postman_sent_mail', - 'rssap-feed', - 'rssmi_feed_item', - 'scheduled-action', // Action Scheduler - Job Queue for WordPress https://github.com/woocommerce/woocommerce/tree/e7762627c37ec1f7590e6cac4218ba0c6a20024d/includes/libraries/action-scheduler . - 'secupress_log_action', - 'sg_optimizer_jobs', - 'sl-insta-media', - 'snitch', - 'vip-legacy-redirect', - 'wp-rest-api-log', // https://wordpress.org/plugins/wp-rest-api-log/. - 'wp_automatic', - 'wp_log', // WP Logging Plugin. - 'wpephpcompat_jobs', - 'wprss_feed_item', - 'memberships_coupon', - 'memberships_gift', - ); - - /** - * Taxonomies that we're not syncing by default. - * - * The list is compiled by auditing the dynamic filters and actions that contain taxonomy slugs - * and could conflict with other existing filters/actions in WP core, Jetpack and WooCommerce. - * - * @var array - */ - public static $blacklisted_taxonomies = array( - 'ancestors', - 'archives_link', - 'attached_file', - 'attached_media', - 'attached_media_args', - 'attachment', - 'available_languages', - 'avatar', - 'avatar_comment_types', - 'avatar_data', - 'avatar_url', - 'bloginfo_rss', - 'blogs_of_user', - 'bookmark_link', - 'bookmarks', - 'calendar', - 'canonical_url', - 'categories_per_page', - 'categories_taxonomy', - 'category_form', - 'category_form_fields', - 'category_form_pre', - 'comment', - 'comment_ID', - 'comment_author', - 'comment_author_IP', - 'comment_author_email', - 'comment_author_link', - 'comment_author_url', - 'comment_author_url_link', - 'comment_date', - 'comment_excerpt', - 'comment_link', - 'comment_misc_actions', - 'comment_text', - 'comment_time', - 'comment_type', - 'comments_link', - 'comments_number', - 'comments_pagenum_link', - 'custom_logo', - 'date_sql', - 'default_comment_status', - 'delete_post_link', - 'edit_bookmark_link', - 'edit_comment_link', - 'edit_post_link', - 'edit_tag_link', - 'edit_term_link', - 'edit_user_link', - 'enclosed', - 'feed_build_date', - 'form_advanced', - 'form_after_editor', - 'form_after_title', - 'form_before_permalink', - 'form_top', - 'handle_product_cat', - 'header_image_tag', - 'header_video_url', - 'image_tag', - 'image_tag_class', - 'lastpostdate', - 'lastpostmodified', - 'link', - 'link_category_form', - 'link_category_form_fields', - 'link_category_form_pre', - 'main_network_id', - 'media', - 'media_item_args', - 'ms_user', - 'network', - 'object_terms', - 'option', - 'page', - 'page_form', - 'page_of_comment', - 'page_uri', - 'pagenum_link', - 'pages', - 'plugin', - 'post', - 'post_galleries', - 'post_gallery', - 'post_link', - 'post_modified_time', - 'post_status', - 'post_time', - 'postmeta', - 'posts_per_page', - 'product_search_form', - 'profile_url', - 'pung', - 'role_list', - 'sample_permalink', - 'sample_permalink_html', - 'schedule', - 'search_form', - 'search_query', - 'shortlink', - 'site', - 'site_email_content', - 'site_icon_url', - 'site_option', - 'space_allowed', - 'tag', - 'tag_form', - 'tag_form_fields', - 'tag_form_pre', - 'tag_link', - 'tags', - 'tags_per_page', - 'term', - 'term_link', - 'term_relationships', - 'term_taxonomies', - 'term_taxonomy', - 'terms', - 'terms_args', - 'terms_defaults', - 'terms_fields', - 'terms_orderby', - 'the_archive_description', - 'the_archive_title', - 'the_categories', - 'the_date', - 'the_excerpt', - 'the_guid', - 'the_modified_date', - 'the_modified_time', - 'the_post_type_description', - 'the_tags', - 'the_terms', - 'the_time', - 'theme_starter_content', - 'to_ping', - 'user', - 'user_created_user', - 'user_form', - 'user_profile', - 'user_profile_update', - 'usermeta', - 'usernumposts', - 'users_drafts', - 'webhook', - 'widget', - 'woocommerce_archive', - 'wp_title_rss', - ); - - /** - * Default array of post table columns. - * - * @var array Post table columns. - */ - public static $default_post_checksum_columns = array( - 'ID', - 'post_modified', - ); - - /** - * Default array of post meta table columns. - * - * @var array Post meta table columns. - */ - public static $default_post_meta_checksum_columns = array( - 'meta_id', - 'meta_value', - ); - - /** - * Default array of comment table columns. - * - * @var array Default comment table columns. - */ - public static $default_comment_checksum_columns = array( - 'comment_ID', - 'comment_content', - ); - - /** - * Default array of comment meta columns. - * - * @var array Comment meta table columns. - */ - public static $default_comment_meta_checksum_columns = array( - 'meta_id', - 'meta_value', - ); - - /** - * Default array of option table columns. - * - * @var array Default array of option columns. - */ - public static $default_option_checksum_columns = array( - 'option_name', - 'option_value', - ); - - /** - * Default array of term columns. - * - * @var array array of term columns. - */ - public static $default_term_checksum_columns = array( - 'name', - 'slug', - 'term_id', - ); - - /** - * Default array of term taxonomy columns. - * - * @var array Array of term taxonomy columns. - */ - public static $default_term_taxonomy_checksum_columns = array( - 'count', - 'parent', - 'taxonomy', - 'term_id', - 'term_taxonomy_id', - ); - - /** - * Default term relationship columns. - * - * @var array Array of term relationship columns. - */ - public static $default_term_relationships_checksum_columns = array( - 'object_id', - 'term_order', - 'term_taxonomy_id', - ); - - /** - * Default multisite callables able to be managed via JSON API. - * - * @var array multsite callables whitelisted - */ - public static $default_multisite_callable_whitelist = array(); - - /** - * Get array of multisite callables whitelisted. - * - * @return array Multisite callables managable via JSON API. - */ - public static function get_multisite_callable_whitelist() { - /** - * Filter the list of multisite callables that are manageable via the JSON API. - * - * @module sync - * - * @since 1.6.3 - * @since-jetpack 4.8.0 - * - * @param array The default list of multisite callables. - */ - return apply_filters( 'jetpack_sync_multisite_callable_whitelist', self::$default_multisite_callable_whitelist ); - } - - /** - * Array of post meta keys whitelisted. - * - * @var array Post meta whitelist. - */ - public static $post_meta_whitelist = array( - '_feedback_akismet_values', - '_feedback_email', - '_feedback_extra_fields', - '_g_feedback_shortcode', - '_jetpack_post_thumbnail', - '_last_editor_used_jetpack', - '_menu_item_classes', - '_menu_item_menu_item_parent', - '_menu_item_object', - '_menu_item_object_id', - '_menu_item_orphaned', - '_menu_item_type', - '_menu_item_xfn', - '_publicize_facebook_user', - '_publicize_twitter_user', - '_thumbnail_id', - '_wp_attached_file', - '_wp_attachment_backup_sizes', - '_wp_attachment_context', - '_wp_attachment_image_alt', - '_wp_attachment_is_custom_background', - '_wp_attachment_is_custom_header', - '_wp_attachment_metadata', - '_wp_page_template', - '_wp_trash_meta_comments_status', - '_wpas_feature_enabled', - '_wpas_mess', - '_wpas_options', - 'advanced_seo_description', // Jetpack_SEO_Posts::DESCRIPTION_META_KEY. - 'content_width', - 'custom_css_add', - 'custom_css_preprocessor', - 'enclosure', - 'imagedata', - 'nova_price', - 'publicize_results', - 'sharing_disabled', - 'switch_like_status', - 'videopress_guid', - 'vimeo_poster_image', - '_jetpack_blogging_prompt_key', - ); - - /** - * Get the post meta key whitelist. - * - * @return array Post meta whitelist. - */ - public static function get_post_meta_whitelist() { - /** - * Filter the list of post meta data that are manageable via the JSON API. - * - * @module sync - * - * @since 1.6.3 - * @since-jetpack 4.8.0 - * - * @param array The default list of meta data keys. - */ - return apply_filters( 'jetpack_sync_post_meta_whitelist', self::$post_meta_whitelist ); - } - - /** - * Comment meta whitelist. - * - * @var array Comment meta whitelist. - */ - public static $comment_meta_whitelist = array( - 'hc_avatar', - 'hc_foreign_user_id', - 'hc_post_as', - 'hc_wpcom_id_sig', - ); - - /** - * Get the comment meta whitelist. - * - * @return array - */ - public static function get_comment_meta_whitelist() { - /** - * Filter the list of comment meta data that are manageable via the JSON API. - * - * @module sync - * - * @since 1.6.3 - * @since-jetpack 5.7.0 - * - * @param array The default list of comment meta data keys. - */ - return apply_filters( 'jetpack_sync_comment_meta_whitelist', self::$comment_meta_whitelist ); - } - - /** - * Default theme support whitelist. - * - * @todo move this to server? - these are theme support values - * that should be synced as jetpack_current_theme_supports_foo option values - * - * @var array Default theme support whitelist. - */ - public static $default_theme_support_whitelist = array( - 'align-wide', - 'appearance-tools', // In Gutenberg. - 'automatic-feed-links', - 'block-templates', - 'block-template-parts', // WP 6.1. Added via https://core.trac.wordpress.org/changeset/54176 - 'custom-background', - 'custom-header', - 'custom-logo', - 'customize-selective-refresh-widgets', - 'dark-editor-style', - 'default-color-palette', // In Gutenberg. - 'default-gradient-presets', // In Gutenberg. - 'disable-custom-colors', - 'disable-custom-font-sizes', - 'disable-custom-gradients', - 'disable-layout-styles', // WP 6.1. Added via https://core.trac.wordpress.org/changeset/54159 - 'editor-color-palette', - 'editor-font-sizes', - 'editor-gradient-presets', - 'editor-style', // deprecated. - 'editor-styles', - 'html5', - 'infinite-scroll', - 'jetpack-responsive-videos', - 'jetpack-social-menu', - 'menus', - 'post-formats', - 'post-thumbnails', - 'responsive-embeds', - 'site-logo', - 'title-tag', - 'widgets', - 'wp-block-styles', - ); - - /** - * Is an option whitelisted? - * - * @param string $option Option name. - * @return bool If option is on the whitelist. - */ - public static function is_whitelisted_option( $option ) { - $whitelisted_options = self::get_options_whitelist(); - foreach ( $whitelisted_options as $whitelisted_option ) { - if ( '/' === $whitelisted_option[0] && preg_match( $whitelisted_option, $option ) ) { - return true; - } elseif ( $whitelisted_option === $option ) { - return true; - } - } - - return false; - } - - /** - * Default whitelist of capabilities to sync. - * - * @var array Array of WordPress capabilities. - */ - public static $default_capabilities_whitelist = array( - 'activate_plugins', - 'add_users', - 'create_users', - 'customize', - 'delete_others_pages', - 'delete_others_posts', - 'delete_pages', - 'delete_plugins', - 'delete_posts', - 'delete_private_pages', - 'delete_private_posts', - 'delete_published_pages', - 'delete_published_posts', - 'delete_site', - 'delete_themes', - 'delete_users', - 'edit_dashboard', - 'edit_files', - 'edit_others_pages', - 'edit_others_posts', - 'edit_pages', - 'edit_plugins', - 'edit_posts', - 'edit_private_pages', - 'edit_private_posts', - 'edit_published_pages', - 'edit_published_posts', - 'edit_theme_options', - 'edit_themes', - 'edit_users', - 'export', - 'import', - 'install_plugins', - 'install_themes', - 'list_users', - 'manage_categories', - 'manage_links', - 'manage_options', - 'moderate_comments', - 'promote_users', - 'publish_pages', - 'publish_posts', - 'read', - 'read_private_pages', - 'read_private_posts', - 'remove_users', - 'switch_themes', - 'unfiltered_html', - 'unfiltered_upload', - 'update_core', - 'update_plugins', - 'update_themes', - 'upload_files', - 'upload_plugins', - 'upload_themes', - ); - - /** - * Get default capabilities whitelist. - * - * @return array - */ - public static function get_capabilities_whitelist() { - /** - * Filter the list of capabilities that we care about - * - * @module sync - * - * @since 1.6.3 - * @since-jetpack 5.5.0 - * - * @param array The default list of capabilities. - */ - return apply_filters( 'jetpack_sync_capabilities_whitelist', self::$default_capabilities_whitelist ); - } - - /** - * Get max execution sync time. - * - * @return float Number of seconds. - */ - public static function get_max_sync_execution_time() { - $max_exec_time = (int) ini_get( 'max_execution_time' ); - if ( 0 === $max_exec_time ) { - // 0 actually means "unlimited", but let's not treat it that way. - $max_exec_time = 60; - } - return floor( $max_exec_time / 3 ); - } - - /** - * Get default for a given setting. - * - * @param string $setting Setting to get. - * @return mixed Value will be a string, int, array, based on the particular setting requested. - */ - public static function get_default_setting( $setting ) { - $default_name = "default_$setting"; // e.g. default_dequeue_max_bytes. - return self::$$default_name; - } - - /** - * Default list of network options. - * - * @var array network options - */ - public static $default_network_options_whitelist = array( - 'active_sitewide_plugins', - 'auto_update_plugins', // WordPress 5.5+ auto-updates. - 'jetpack_protect_global_whitelist', - 'jetpack_protect_key', - 'site_name', - ); - - /** - * A mapping of known importers to friendly names. - * - * Keys are the class name of the known importer. - * Values are the friendly name. - * - * @since 1.6.3 - * @since-jetpack 7.3.0 - * - * @var array - */ - public static $default_known_importers = array( - 'Blogger_Importer' => 'blogger', - 'LJ_API_Import' => 'livejournal', - 'MT_Import' => 'mt', - 'RSS_Import' => 'rss', - 'WC_Tax_Rate_Importer' => 'woo-tax-rate', - 'WP_Import' => 'wordpress', - ); - - /** - * Returns a list of known importers. - * - * @since 1.6.3 - * @since-jetpack 7.3.0 - * - * @return array Known importers with importer class names as keys and friendly names as values. - */ - public static function get_known_importers() { - /** - * Filter the list of known importers. - * - * @module sync - * - * @since 1.6.3 - * @since-jetpack 7.3.0 - * - * @param array The default list of known importers. - */ - return apply_filters( 'jetpack_sync_known_importers', self::$default_known_importers ); - } - - /** - * Whether this is a system with a multiple networks. - * We currently need this static wrapper because we statically define our default list of callables. - * - * @since 1.6.3 - * @since-jetpack 7.6.0 - * - * @uses Automattic\Jetpack\Status::is_multi_network - * - * @return boolean - */ - public static function is_multi_network() { - $status = new Status(); - return $status->is_multi_network(); - } - - /** - * Default bytes to dequeue. - * - * @var int Bytes. - */ - public static $default_dequeue_max_bytes = 500000; // very conservative value, 1/2 MB. - - /** - * Default upload bytes. - * - * This value is a little bigger than the upload limit to account for serialization. - * - * @var int Bytes. - */ - public static $default_upload_max_bytes = 600000; - - /** - * Default number of rows uploaded. - * - * @var int Number of rows. - */ - public static $default_upload_max_rows = 500; - - /** - * Default sync wait time. - * - * @var int Number of seconds. - */ - public static $default_sync_wait_time = 10; // seconds, between syncs. - - /** - * Only wait before next send if the current send took more than this number of seconds. - * - * @var int Number of seconds. - */ - public static $default_sync_wait_threshold = 10; - - /** - * Default wait between attempting to continue a full sync via requests. - * - * @var int Number of seconds. - */ - public static $default_enqueue_wait_time = 1; - - /** - * Maximum queue size. - * - * Each item is represented with a new row in the wp_options table. - * - * @var int Number of queue items. - */ - public static $default_max_queue_size = 5000; - - /** - * Default maximum lag allowed in the queue. - * - * @var int Number of seconds - */ - public static $default_max_queue_lag = 7200; // 2 hours. - - /** - * Default for default writes per sec. - * - * @var int Rows per second. - */ - public static $default_queue_max_writes_sec = 100; // 100 rows a second. - - /** - * Default for post types blacklist. - * - * @var array Empty array. - */ - public static $default_post_types_blacklist = array(); - - /** - * Default for taxonomies blacklist. - * - * @var array Empty array. - */ - public static $default_taxonomies_blacklist = array(); - - /** - * Default for taxonomies whitelist. - * - * @var array Empty array. - */ - public static $default_taxonomy_whitelist = array(); - - /** - * Default for post meta whitelist. - * - * @var array Empty array. - */ - public static $default_post_meta_whitelist = array(); - - /** - * Default for comment meta whitelist. - * - * @var array Empty array. - */ - public static $default_comment_meta_whitelist = array(); - - /** - * Default for disabling sync across the site. - * - * @var int Bool-ish. Default to 0. - */ - public static $default_disable = 0; // completely disable sending data to wpcom. - - /** - * Default for disabling sync across the entire network on multisite. - * - * @var int Bool-ish. Default 0. - */ - public static $default_network_disable = 0; - - /** - * Default for disabling checksums. - * - * @var int Bool-ish. Default 0. - */ - public static $default_checksum_disable = 0; - - /** - * Should Sync use cron? - * - * @var int Bool-ish value. Default 1. - */ - public static $default_sync_via_cron = 1; - - /** - * Default if Sync should render content. - * - * @var int Bool-ish value. Default is 0. - */ - public static $default_render_filtered_content = 0; - - /** - * Default number of items to enqueue at a time when running full sync. - * - * @var int Number of items. - */ - public static $default_max_enqueue_full_sync = 100; - - /** - * Default for maximum queue size during a full sync. - * - * Each item will represent a value in the wp_options table. - * - * @var int Number of items. - */ - public static $default_max_queue_size_full_sync = 1000; // max number of total items in the full sync queue. - - /** - * Default max time for sending in immediate mode. - * - * @var float Number of Seconds - */ - public static $default_full_sync_send_duration = 9; - - /** - * Defaul for time between syncing callables. - * - * @var int Number of seconds. - */ - public static $default_sync_callables_wait_time = MINUTE_IN_SECONDS; // seconds before sending callables again. - - /** - * Default for time between syncing constants. - * - * @var int Number of seconds. - */ - public static $default_sync_constants_wait_time = HOUR_IN_SECONDS; // seconds before sending constants again. - /** - * Default for sync queue lock timeout time. - * - * @var int Number of seconds. - */ - public static $default_sync_queue_lock_timeout = 120; // 2 minutes. - - /** - * Default for cron sync time limit. - * - * @var int Number of seconds. - */ - public static $default_cron_sync_time_limit = 4 * MINUTE_IN_SECONDS; - - /** - * Default for number of term relationship items sent in an full sync item. - * - * @var int Number of items. - */ - public static $default_term_relationships_full_sync_item_size = 100; - - /** - * Default for enabling incremental sync. - * - * @var int 1 for true. - */ - public static $default_sync_sender_enabled = 1; // Should send incremental sync items. - - /** - * Default for enabling Full Sync. - * - * @var int 1 for true. - */ - public static $default_full_sync_sender_enabled = 1; // Should send full sync items. - - /** - * Default Full Sync config - * - * @var array list of module names. - */ - public static $default_full_sync_config = array( - 'comments' => 1, - 'constants' => 1, - 'functions' => 1, - 'options' => 1, - 'posts' => 1, - 'term_relationships' => 1, - 'terms' => 1, - 'themes' => 1, - 'updates' => 1, - 'users' => 1, - ); - - /** - * Default Full Sync max objects to send on a single request. - * - * @var array list of module => max. - */ - public static $default_full_sync_limits = array( - 'comments' => array( - 'chunk_size' => 100, - 'max_chunks' => 10, - ), - 'posts' => array( - 'chunk_size' => 100, - 'max_chunks' => 1, - ), - 'term_relationships' => array( - 'chunk_size' => 1000, - 'max_chunks' => 10, - ), - 'terms' => array( - 'chunk_size' => 1000, - 'max_chunks' => 10, - ), - 'users' => array( - 'chunk_size' => 100, - 'max_chunks' => 10, - ), - ); - - /** - * Default for enabling dedicated Sync flow. - * - * @var int Bool-ish. Default 0. - */ - public static $default_dedicated_sync_enabled = 0; - - /** - * Default for enabling custom queue table for Sync. - * - * @var int Bool-ish. Default 0. - */ - public static $default_custom_queue_table_enabled = 0; - - /** - * Default for enabling wpcom rest api for Sync. - * - * @var int Bool-ish. Default 0. - */ - public static $default_wpcom_rest_api_enabled = 0; -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-functions.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-functions.php deleted file mode 100644 index 3da795c6..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-functions.php +++ /dev/null @@ -1,712 +0,0 @@ -get_modules(); - } - - return array(); - } - - /** - * Return array of taxonomies registered on the site. - * - * @return array - */ - public static function get_taxonomies() { - global $wp_taxonomies; - $wp_taxonomies_without_callbacks = array(); - foreach ( $wp_taxonomies as $taxonomy_name => $taxonomy ) { - $sanitized_taxonomy = self::sanitize_taxonomy( $taxonomy ); - if ( ! empty( $sanitized_taxonomy ) ) { - $wp_taxonomies_without_callbacks[ $taxonomy_name ] = $sanitized_taxonomy; - } - } - return $wp_taxonomies_without_callbacks; - } - - /** - * Return array of registered shortcodes. - * - * @return array - */ - public static function get_shortcodes() { - global $shortcode_tags; - return array_keys( $shortcode_tags ); - } - - /** - * Removes any callback data since we will not be able to process it on our side anyways. - * - * @param \WP_Taxonomy $taxonomy \WP_Taxonomy item. - * - * @return mixed|null - */ - public static function sanitize_taxonomy( $taxonomy ) { - - // Lets clone the taxonomy object instead of modifing the global one. - $cloned_taxonomy = json_decode( wp_json_encode( $taxonomy ) ); - - // recursive taxonomies are no fun. - if ( $cloned_taxonomy === null ) { - return null; - } - // Remove any meta_box_cb if they are not the default wp ones. - if ( isset( $cloned_taxonomy->meta_box_cb ) && - ! in_array( $cloned_taxonomy->meta_box_cb, array( 'post_tags_meta_box', 'post_categories_meta_box' ), true ) ) { - $cloned_taxonomy->meta_box_cb = null; - } - // Remove update call back. - if ( isset( $cloned_taxonomy->update_count_callback ) && - $cloned_taxonomy->update_count_callback !== null ) { - $cloned_taxonomy->update_count_callback = null; - } - // Remove rest_controller_class if it something other then the default. - if ( isset( $cloned_taxonomy->rest_controller_class ) && - 'WP_REST_Terms_Controller' !== $cloned_taxonomy->rest_controller_class ) { - $cloned_taxonomy->rest_controller_class = null; - } - return $cloned_taxonomy; - } - - /** - * Return array of registered post types. - * - * @return array - */ - public static function get_post_types() { - global $wp_post_types; - - $post_types_without_callbacks = array(); - foreach ( $wp_post_types as $post_type_name => $post_type ) { - $sanitized_post_type = self::sanitize_post_type( $post_type ); - if ( ! empty( $sanitized_post_type ) ) { - $post_types_without_callbacks[ $post_type_name ] = $sanitized_post_type; - } - } - return $post_types_without_callbacks; - } - - /** - * Sanitizes by cloning post type object. - * - * @param object $post_type \WP_Post_Type. - * - * @return object - */ - public static function sanitize_post_type( $post_type ) { - // Lets clone the post type object instead of modifing the global one. - $sanitized_post_type = array(); - foreach ( Defaults::$default_post_type_attributes as $attribute_key => $default_value ) { - if ( isset( $post_type->{ $attribute_key } ) ) { - $sanitized_post_type[ $attribute_key ] = $post_type->{ $attribute_key }; - } - } - return (object) $sanitized_post_type; - } - - /** - * Return information about a synced post type. - * - * @param array $sanitized_post_type Array of args used in constructing \WP_Post_Type. - * @param string $post_type Post type name. - * - * @return object \WP_Post_Type - */ - public static function expand_synced_post_type( $sanitized_post_type, $post_type ) { - $post_type = sanitize_key( $post_type ); - $post_type_object = new \WP_Post_Type( $post_type, $sanitized_post_type ); - $post_type_object->add_supports(); - $post_type_object->add_rewrite_rules(); - $post_type_object->add_hooks(); - $post_type_object->register_taxonomies(); - return (object) $post_type_object; - } - - /** - * Returns site's post_type_features. - * - * @return array - */ - public static function get_post_type_features() { - global $_wp_post_type_features; - - return $_wp_post_type_features; - } - - /** - * Return hosting provider. - * - * Uses a set of known constants, classes, or functions to help determine the hosting platform. - * - * @return string Hosting provider. - */ - public static function get_hosting_provider() { - $hosting_provider_detection_methods = array( - 'get_hosting_provider_by_known_constant', - 'get_hosting_provider_by_known_class', - 'get_hosting_provider_by_known_function', - ); - - $functions = new Functions(); - foreach ( $hosting_provider_detection_methods as $method ) { - $hosting_provider = call_user_func( array( $functions, $method ) ); - if ( false !== $hosting_provider ) { - return $hosting_provider; - } - } - - return 'unknown'; - } - - /** - * Return a hosting provider using a set of known constants. - * - * @return mixed A host identifier string or false. - */ - public function get_hosting_provider_by_known_constant() { - $hosting_provider_constants = array( - 'GD_SYSTEM_PLUGIN_DIR' => 'gd-managed-wp', - 'MM_BASE_DIR' => 'bh', - 'PAGELYBIN' => 'pagely', - 'KINSTAMU_VERSION' => 'kinsta', - 'FLYWHEEL_CONFIG_DIR' => 'flywheel', - 'IS_PRESSABLE' => 'pressable', - 'VIP_GO_ENV' => 'vip-go', - ); - - foreach ( $hosting_provider_constants as $constant => $constant_value ) { - if ( Constants::is_defined( $constant ) ) { - if ( 'VIP_GO_ENV' === $constant && false === Constants::get_constant( 'VIP_GO_ENV' ) ) { - continue; - } - return $constant_value; - } - } - - return false; - } - - /** - * Return a hosting provider using a set of known classes. - * - * @return mixed A host identifier string or false. - */ - public function get_hosting_provider_by_known_class() { - $hosting_provider = false; - - switch ( true ) { - case ( class_exists( '\\WPaaS\\Plugin' ) ): - $hosting_provider = 'gd-managed-wp'; - break; - } - - return $hosting_provider; - } - - /** - * Return a hosting provider using a set of known functions. - * - * @return mixed A host identifier string or false. - */ - public function get_hosting_provider_by_known_function() { - $hosting_provider = false; - - switch ( true ) { - case ( function_exists( 'is_wpe' ) || function_exists( 'is_wpe_snapshot' ) ): - $hosting_provider = 'wpe'; - break; - } - - return $hosting_provider; - } - - /** - * Return array of allowed REST API post types. - * - * @return array Array of allowed post types. - */ - public static function rest_api_allowed_post_types() { - /** This filter is already documented in class.json-api-endpoints.php */ - return apply_filters( 'rest_api_allowed_post_types', array( 'post', 'page', 'revision' ) ); - } - - /** - * Return array of allowed REST API public metadata. - * - * @return array Array of allowed metadata. - */ - public static function rest_api_allowed_public_metadata() { - /** - * Filters the meta keys accessible by the REST API. - * - * @see https://developer.wordpress.com/2013/04/26/custom-post-type-and-metadata-support-in-the-rest-api/ - * - * @module json-api - * - * @since 1.6.3 - * @since-jetpack 2.2.3 - * - * @param array $whitelisted_meta Array of metadata that is accessible by the REST API. - */ - return apply_filters( 'rest_api_allowed_public_metadata', array() ); - } - - /** - * Finds out if a site is using a version control system. - * - * @return bool - **/ - public static function is_version_controlled() { - - if ( ! class_exists( 'WP_Automatic_Updater' ) ) { - require_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php'; - } - $updater = new \WP_Automatic_Updater(); - - return (bool) (string) $updater->is_vcs_checkout( ABSPATH ); - } - - /** - * Returns true if the site has file write access false otherwise. - * - * @return bool - **/ - public static function file_system_write_access() { - if ( ! function_exists( 'get_filesystem_method' ) ) { - require_once ABSPATH . 'wp-admin/includes/file.php'; - } - - require_once ABSPATH . 'wp-admin/includes/template.php'; - - $filesystem_method = get_filesystem_method(); - if ( 'direct' === $filesystem_method ) { - return true; - } - - ob_start(); - - if ( ! function_exists( 'request_filesystem_credentials' ) ) { - require_once ABSPATH . 'wp-admin/includes/file.php'; - } - - $filesystem_credentials_are_stored = request_filesystem_credentials( self_admin_url() ); - ob_end_clean(); - if ( $filesystem_credentials_are_stored ) { - return true; - } - - return false; - } - - /** - * Helper function that is used when getting home or siteurl values. Decides - * whether to get the raw or filtered value. - * - * @deprecated 1.23.1 - * - * @param string $url_type URL to get, home or siteurl. - * @return string - */ - public static function get_raw_or_filtered_url( $url_type ) { - _deprecated_function( __METHOD__, '1.23.1', '\\Automattic\\Jetpack\\Connection\\Urls::get_raw_or_filtered_url' ); - return Urls::get_raw_or_filtered_url( $url_type ); - } - - /** - * Return the escaped home_url. - * - * @deprecated 1.23.1 - * - * @return string - */ - public static function home_url() { - _deprecated_function( __METHOD__, '1.23.1', '\\Automattic\\Jetpack\\Connection\\Urls::home_url' ); - return Urls::home_url(); - } - - /** - * Return the escaped siteurl. - * - * @deprecated 1.23.1 - * - * @return string - */ - public static function site_url() { - _deprecated_function( __METHOD__, '1.23.1', '\\Automattic\\Jetpack\\Connection\\Urls::site_url' ); - return Urls::site_url(); - } - - /** - * Return main site URL with a normalized protocol. - * - * @deprecated 1.23.1 - * - * @return string - */ - public static function main_network_site_url() { - _deprecated_function( __METHOD__, '1.23.1', '\\Automattic\\Jetpack\\Connection\\Urls::main_network_site_url' ); - return Urls::main_network_site_url(); - } - - /** - * Return main site WordPress.com site ID. - * - * @return string - */ - public static function main_network_site_wpcom_id() { - /** - * Return the current site WPCOM ID for single site installs - */ - if ( ! is_multisite() ) { - return \Jetpack_Options::get_option( 'id' ); - } - - /** - * Return the main network site WPCOM ID for multi-site installs - */ - $current_network = get_network(); - switch_to_blog( $current_network->blog_id ); - $wpcom_blog_id = \Jetpack_Options::get_option( 'id' ); - restore_current_blog(); - return $wpcom_blog_id; - } - - /** - * Return URL with a normalized protocol. - * - * @deprecated 1.23.1 - * - * @param callable $callable Function to retrieve URL option. - * @param string $new_value URL Protocol to set URLs to. - * @return string Normalized URL. - */ - public static function get_protocol_normalized_url( $callable, $new_value ) { - _deprecated_function( __METHOD__, '1.23.1', '\\Automattic\\Jetpack\\Connection\\Urls::get_protocol_normalized_url' ); - return Urls::get_protocol_normalized_url( $callable, $new_value ); - } - - /** - * Return URL from option or PHP constant. - * - * @deprecated 1.23.1 - * - * @param string $option_name (e.g. 'home'). - * - * @return mixed|null URL. - */ - public static function get_raw_url( $option_name ) { - _deprecated_function( __METHOD__, '1.23.1', '\\Automattic\\Jetpack\\Connection\\Urls::get_raw_url' ); - return Urls::get_raw_url( $option_name ); - } - - /** - * Normalize domains by removing www unless declared in the site's option. - * - * @deprecated 1.23.1 - * - * @param string $option Option value from the site. - * @param callable $url_function Function retrieving the URL to normalize. - * @return mixed|string URL. - */ - public static function normalize_www_in_url( $option, $url_function ) { - _deprecated_function( __METHOD__, '1.23.1', '\\Automattic\\Jetpack\\Connection\\Urls::normalize_www_in_url' ); - return Urls::normalize_www_in_url( $option, $url_function ); - } - - /** - * Return filtered value of get_plugins. - * - * @return mixed|void - */ - public static function get_plugins() { - if ( ! function_exists( 'get_plugins' ) ) { - require_once ABSPATH . 'wp-admin/includes/plugin.php'; - } - - /** This filter is documented in wp-admin/includes/class-wp-plugins-list-table.php */ - return apply_filters( 'all_plugins', get_plugins() ); - } - - /** - * Get custom action link tags that the plugin is using - * Ref: https://codex.wordpress.org/Plugin_API/Filter_Reference/plugin_action_links_(plugin_file_name) - * - * @param string $plugin_file_singular Particular plugin. - * @return array of plugin action links (key: link name value: url) - */ - public static function get_plugins_action_links( $plugin_file_singular = null ) { - // Some sites may have DOM disabled in PHP fail early. - if ( ! class_exists( 'DOMDocument' ) ) { - return array(); - } - $plugins_action_links = get_option( 'jetpack_plugin_api_action_links', array() ); - if ( ! empty( $plugins_action_links ) ) { - if ( $plugin_file_singular === null ) { - return $plugins_action_links; - } - return ( isset( $plugins_action_links[ $plugin_file_singular ] ) ? $plugins_action_links[ $plugin_file_singular ] : null ); - } - return array(); - } - - /** - * Return the WP version as defined in the $wp_version global. - * - * @return string - */ - public static function wp_version() { - global $wp_version; - return $wp_version; - } - - /** - * Return site icon url used on the site. - * - * @param int $size Size of requested icon in pixels. - * @return mixed|string|void - */ - public static function site_icon_url( $size = 512 ) { - $site_icon = get_site_icon_url( $size ); - return $site_icon ? $site_icon : get_option( 'jetpack_site_icon_url' ); - } - - /** - * Return roles registered on the site. - * - * @return array - */ - public static function roles() { - $wp_roles = wp_roles(); - return $wp_roles->roles; - } - - /** - * Determine time zone from WordPress' options "timezone_string" - * and "gmt_offset". - * - * 1. Check if `timezone_string` is set and return it. - * 2. Check if `gmt_offset` is set, formats UTC-offset from it and return it. - * 3. Default to "UTC+0" if nothing is set. - * - * Note: This function is specifically not using wp_timezone() to keep consistency with - * the existing formatting of the timezone string. - * - * @return string - */ - public static function get_timezone() { - $timezone_string = get_option( 'timezone_string' ); - - if ( ! empty( $timezone_string ) ) { - return str_replace( '_', ' ', $timezone_string ); - } - - $gmt_offset = get_option( 'gmt_offset', 0 ); - - $formatted_gmt_offset = sprintf( '%+g', (float) $gmt_offset ); - - $formatted_gmt_offset = str_replace( - array( '.25', '.5', '.75' ), - array( ':15', ':30', ':45' ), - (string) $formatted_gmt_offset - ); - - /* translators: %s is UTC offset, e.g. "+1" */ - return sprintf( __( 'UTC%s', 'jetpack-sync' ), $formatted_gmt_offset ); - } - - /** - * Return list of paused themes. - * - * @return array|bool Array of paused themes or false if unsupported. - */ - public static function get_paused_themes() { - $paused_themes = wp_paused_themes(); - return $paused_themes->get_all(); - } - - /** - * Return list of paused plugins. - * - * @return array|bool Array of paused plugins or false if unsupported. - */ - public static function get_paused_plugins() { - $paused_plugins = wp_paused_plugins(); - return $paused_plugins->get_all(); - } - - /** - * Return the theme's supported features. - * Used for syncing the supported feature that we care about. - * - * @return array List of features that the theme supports. - */ - public static function get_theme_support() { - global $_wp_theme_features; - - $theme_support = array(); - foreach ( Defaults::$default_theme_support_whitelist as $theme_feature ) { - $has_support = current_theme_supports( $theme_feature ); - if ( $has_support ) { - $theme_support[ $theme_feature ] = $_wp_theme_features[ $theme_feature ]; - } - } - - return $theme_support; - } - - /** - * Returns if the current theme is a Full Site Editing theme. - * - * @since 1.49.0 Uses wp_is_block_theme() instead of deprecated gutenberg_is_fse_theme(). - * - * @return bool Theme is a Full Site Editing theme. - */ - public static function get_is_fse_theme() { - return wp_is_block_theme(); - } - - /** - * Wraps data in a way so that we can distinguish between objects and array and also prevent object recursion. - * - * @since 1.21.0 - * - * @param array|obj $any Source data to be cleaned up. - * @param array $seen_nodes Built array of nodes. - * - * @return array - */ - public static function json_wrap( &$any, $seen_nodes = array() ) { - if ( is_object( $any ) ) { - $input = get_object_vars( $any ); - $input['__o'] = 1; - } else { - $input = &$any; - } - - if ( is_array( $input ) ) { - $seen_nodes[] = &$any; - - $return = array(); - - foreach ( $input as $k => &$v ) { - if ( ( is_array( $v ) || is_object( $v ) ) ) { - if ( in_array( $v, $seen_nodes, true ) ) { - continue; - } - $return[ $k ] = self::json_wrap( $v, $seen_nodes ); - } else { - $return[ $k ] = $v; - } - } - - return $return; - } - - return $any; - } - - /** - * Return the list of installed themes - * - * @since 1.31.0 - * - * @return array - */ - public static function get_themes() { - $current_stylesheet = get_stylesheet(); - $installed_themes = wp_get_themes(); - $synced_headers = array( 'Name', 'ThemeURI', 'Author', 'Version', 'Template', 'Status', 'TextDomain', 'RequiresWP', 'RequiresPHP' ); - $themes = array(); - foreach ( $installed_themes as $stylesheet => $theme ) { - $themes[ $stylesheet ] = array(); - foreach ( $synced_headers as $header ) { - $themes[ $stylesheet ][ $header ] = $theme->get( $header ); - } - $themes[ $stylesheet ]['active'] = $stylesheet === $current_stylesheet; - if ( method_exists( $theme, 'is_block_theme' ) ) { - $themes[ $stylesheet ]['is_block_theme'] = $theme->is_block_theme(); - } - } - /** - * Filters the output of Sync's get_theme callable - * - * @since 1.31.0 - * - * @param array $themes The list of installed themes formatted in an array with a collection of information extracted from the Theme's headers - */ - return apply_filters( 'jetpack_sync_get_themes_callable', $themes ); - } - - /** - * Return the list of active Jetpack modules. - * - * @since $$next_version$$ - * - * @return array - */ - public static function get_active_modules() { - return ( new Jetpack_Modules() )->get_active(); - } - - /** - * Return a list of PHP modules that we want to track. - * - * @since $$next_version$$ - * - * @return array - */ - public static function get_loaded_extensions() { - if ( function_exists( 'get_loaded_extensions' ) ) { - return get_loaded_extensions(); - } - - // If a hosting provider has blocked get_loaded_extensions for any reason, - // we check extensions manually. - - $extensions_to_check = array( - 'libxml' => array( 'class' => 'libXMLError' ), - 'xml' => array( 'function' => 'xml_parse' ), - 'dom' => array( 'class' => 'DOMDocument' ), - 'xdebug' => array( 'function' => 'xdebug_break' ), - ); - - $enabled_extensions = array(); - foreach ( $extensions_to_check as $extension_name => $extension ) { - if ( - ( isset( $extension['function'] ) - && function_exists( $extension['function'] ) ) - || class_exists( $extension['class'] ) - ) { - $enabled_extensions[] = $extension_name; - } - } - - return $enabled_extensions; - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-health.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-health.php deleted file mode 100644 index 41d7f788..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-health.php +++ /dev/null @@ -1,188 +0,0 @@ - self::STATUS_UNKNOWN, - self::OPTION_TIMESTAMP_KEY => microtime( true ), - ); - - switch ( $status ) { - case self::STATUS_DISABLED: - case self::STATUS_OUT_OF_SYNC: - case self::STATUS_IN_SYNC: - $new_status[ self::OPTION_STATUS_KEY ] = $status; - break; - } - - \Jetpack_Options::update_option( self::STATUS_OPTION, $new_status ); - return true; - } - - /** - * Check if Status has been previously set. - * - * @return bool is a Status defined - */ - public static function is_status_defined() { - $status = \Jetpack_Options::get_option( self::STATUS_OPTION ); - - if ( false === $status || ! is_array( $status ) || empty( $status[ self::OPTION_STATUS_KEY ] ) ) { - return false; - } else { - return true; - } - } - - /** - * Update Sync Status if Full Sync ended of Posts - * - * @param string $checksum The checksum that's currently being processed. - * @param array $range The ranges of object types being processed. - */ - public static function full_sync_end_update_status( $checksum, $range ) { - if ( isset( $range['posts'] ) ) { - self::update_status( self::STATUS_IN_SYNC ); - } - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-json-deflate-array-codec.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-json-deflate-array-codec.php deleted file mode 100644 index 6711ced8..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-json-deflate-array-codec.php +++ /dev/null @@ -1,96 +0,0 @@ -json_serialize( $object ) ) ); // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.obfuscation_base64_encode - } - - /** - * Decode compressed serialized value. - * - * @param string $input Item to decode. - * @return array|mixed|object - */ - public function decode( $input ) { - $decoded = base64_decode( $input ); // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.obfuscation_base64_decode - $inflated = @gzinflate( $decoded ); // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged - - return is_string( $inflated ) ? $this->json_unserialize( $inflated ) : null; - } - - /** - * Serialize JSON - * - * @see https://gist.github.com/muhqu/820694 - * - * @param string $any Value to serialize and wrap. - * - * @return false|string - */ - protected function json_serialize( $any ) { - return wp_json_encode( Functions::json_wrap( $any ) ); - } - - /** - * Unserialize JSON - * - * @param string $str JSON string. - * @return array|object Unwrapped JSON. - */ - protected function json_unserialize( $str ) { - return $this->json_unwrap( json_decode( $str, true ) ); - } - - /** - * Unwraps a json_decode return. - * - * @param array|object $any json_decode object. - * @return array|object - */ - private function json_unwrap( $any ) { - if ( is_array( $any ) ) { - foreach ( $any as $k => $v ) { - if ( '__o' === $k ) { - continue; - } - $any[ $k ] = $this->json_unwrap( $v ); - } - - if ( isset( $any['__o'] ) ) { - unset( $any['__o'] ); - $any = (object) $any; - } - } - - return $any; - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-listener.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-listener.php deleted file mode 100644 index c2789c17..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-listener.php +++ /dev/null @@ -1,485 +0,0 @@ -:( - */ - protected function __construct() { - $this->set_defaults(); - $this->init(); - } - - /** - * Sync Listener init. - */ - private function init() { - $handler = array( $this, 'action_handler' ); - $full_sync_handler = array( $this, 'full_sync_action_handler' ); - - foreach ( Modules::get_modules() as $module ) { - $module->init_listeners( $handler ); - $module->init_full_sync_listeners( $full_sync_handler ); - } - - // Module Activation. - add_action( 'jetpack_activate_module', $handler ); - add_action( 'jetpack_deactivate_module', $handler ); - - // Jetpack Upgrade. - add_action( 'updating_jetpack_version', $handler, 10, 2 ); - - // Send periodic checksum. - add_action( 'jetpack_sync_checksum', $handler ); - } - - /** - * Get incremental sync queue. - */ - public function get_sync_queue() { - return $this->sync_queue; - } - - /** - * Gets the full sync queue. - */ - public function get_full_sync_queue() { - return $this->full_sync_queue; - } - - /** - * Sets queue size limit. - * - * @param int $limit Queue size limit. - */ - public function set_queue_size_limit( $limit ) { - $this->sync_queue_size_limit = $limit; - } - - /** - * Get queue size limit. - */ - public function get_queue_size_limit() { - return $this->sync_queue_size_limit; - } - - /** - * Sets the queue lag limit. - * - * @param int $age Queue lag limit. - */ - public function set_queue_lag_limit( $age ) { - $this->sync_queue_lag_limit = $age; - } - - /** - * Return value of queue lag limit. - */ - public function get_queue_lag_limit() { - return $this->sync_queue_lag_limit; - } - - /** - * Force a recheck of the queue limit. - */ - public function force_recheck_queue_limit() { - delete_transient( self::QUEUE_STATE_CHECK_TRANSIENT . '_' . $this->sync_queue->id ); - delete_transient( self::QUEUE_STATE_CHECK_TRANSIENT . '_' . $this->full_sync_queue->id ); - } - - /** - * Determine if an item can be added to the queue. - * - * Prevent adding items to the queue if it hasn't sent an item for 15 mins - * AND the queue is over 1000 items long (by default). - * - * @param object $queue Sync queue. - * @return bool - */ - public function can_add_to_queue( $queue ) { - if ( ! Settings::is_sync_enabled() ) { - return false; - } - - $state_transient_name = self::QUEUE_STATE_CHECK_TRANSIENT . '_' . $queue->id; - - $queue_state = get_transient( $state_transient_name ); - - if ( false === $queue_state ) { - $queue_state = array( $queue->size(), $queue->lag() ); - set_transient( $state_transient_name, $queue_state, self::QUEUE_STATE_CHECK_TIMEOUT ); - } - - list( $queue_size, $queue_age ) = $queue_state; - - return ( $queue_age < $this->sync_queue_lag_limit ) - || - ( ( $queue_size + 1 ) < $this->sync_queue_size_limit ); - } - - /** - * Full sync action handler. - * - * @param mixed ...$args Args passed to the action. - */ - public function full_sync_action_handler( ...$args ) { - $this->enqueue_action( current_filter(), $args, $this->full_sync_queue ); - } - - /** - * Action handler. - * - * @param mixed ...$args Args passed to the action. - */ - public function action_handler( ...$args ) { - $this->enqueue_action( current_filter(), $args, $this->sync_queue ); - } - - // add many actions to the queue directly, without invoking them. - - /** - * Bulk add action to the queue. - * - * @param string $action_name The name the full sync action. - * @param array $args_array Array of chunked arguments. - */ - public function bulk_enqueue_full_sync_actions( $action_name, $args_array ) { - $queue = $this->get_full_sync_queue(); - - /* - * If we add any items to the queue, we should try to ensure that our script - * can't be killed before they are sent. - */ - // https://plugins.trac.wordpress.org/ticket/2041 - if ( function_exists( 'ignore_user_abort' ) ) { - ignore_user_abort( true ); - } - - $data_to_enqueue = array(); - $user_id = get_current_user_id(); - $currtime = microtime( true ); - $is_importing = Settings::is_importing(); - - foreach ( $args_array as $args ) { - $previous_end = isset( $args['previous_end'] ) ? $args['previous_end'] : null; - $args = isset( $args['ids'] ) ? $args['ids'] : $args; - - /** - * Modify or reject the data within an action before it is enqueued locally. - * - * @since 1.6.3 - * @since-jetpack 4.2.0 - * - * @module sync - * - * @param array The action parameters - */ - $args = apply_filters( "jetpack_sync_before_enqueue_$action_name", $args ); - $action_data = array( $args ); - if ( $previous_end !== null ) { - $action_data[] = $previous_end; - } - // allow listeners to abort. - if ( false === $args ) { - continue; - } - - $data_to_enqueue[] = array( - $action_name, - $action_data, - $user_id, - $currtime, - $is_importing, - ); - } - - $queue->add_all( $data_to_enqueue ); - } - - /** - * Enqueue the action. - * - * @param string $current_filter Current WordPress filter. - * @param object $args Sync args. - * @param string $queue Sync queue. - */ - public function enqueue_action( $current_filter, $args, $queue ) { - // don't enqueue an action during the outbound http request - this prevents recursion. - if ( Settings::is_sending() ) { - return; - } - - if ( ! ( new Connection_Manager() )->is_connected() ) { - // Don't enqueue an action if the site is disconnected. - return; - } - - /** - * Add an action hook to execute when anything on the whitelist gets sent to the queue to sync. - * - * @module sync - * - * @since 1.6.3 - * @since-jetpack 5.9.0 - */ - do_action( 'jetpack_sync_action_before_enqueue' ); - - /** - * Modify or reject the data within an action before it is enqueued locally. - * - * @since 1.6.3 - * @since-jetpack 4.2.0 - * - * @param array The action parameters - */ - $args = apply_filters( "jetpack_sync_before_enqueue_$current_filter", $args ); - - // allow listeners to abort. - if ( false === $args ) { - return; - } - - /* - * Periodically check the size of the queue, and disable adding to it if - * it exceeds some limit AND the oldest item exceeds the age limit (i.e. sending has stopped). - */ - if ( ! $this->can_add_to_queue( $queue ) ) { - if ( 'sync' === $queue->id ) { - $this->sync_data_loss( $queue ); - } - return; - } - - /* - * If we add any items to the queue, we should try to ensure that our script - * can't be killed before they are sent. - */ - // https://plugins.trac.wordpress.org/ticket/2041 - if ( function_exists( 'ignore_user_abort' ) ) { - ignore_user_abort( true ); - } - - if ( - 'sync' === $queue->id || - in_array( - $current_filter, - array( - 'jetpack_full_sync_start', - 'jetpack_full_sync_end', - 'jetpack_full_sync_cancel', - ), - true - ) - ) { - $queue->add( - array( - $current_filter, - $args, - get_current_user_id(), - microtime( true ), - Settings::is_importing(), - $this->get_actor( $current_filter, $args ), - ) - ); - } else { - $queue->add( - array( - $current_filter, - $args, - get_current_user_id(), - microtime( true ), - Settings::is_importing(), - ) - ); - } - - // since we've added some items, let's try to load the sender so we can send them as quickly as possible. - if ( ! Actions::$sender ) { - add_filter( 'jetpack_sync_sender_should_load', __NAMESPACE__ . '\Actions::should_initialize_sender_enqueue', 10, 1 ); - if ( did_action( 'init' ) ) { - Actions::add_sender_shutdown(); - } - } - } - - /** - * Sync Data Loss Handler - * - * @param Queue $queue Sync queue. - * @return boolean was send successful - */ - public function sync_data_loss( $queue ) { - if ( ! Settings::is_sync_enabled() ) { - return; - } - $updated = Health::update_status( Health::STATUS_OUT_OF_SYNC ); - - if ( ! $updated ) { - return; - } - - $data = array( - 'timestamp' => microtime( true ), - 'queue_size' => $queue->size(), - 'queue_lag' => $queue->lag(), - ); - - $sender = Sender::get_instance(); - return $sender->send_action( 'jetpack_sync_data_loss', $data ); - } - - /** - * Get the event's actor. - * - * @param string $current_filter Current wp-admin page. - * @param object $args Sync event. - * @return array Actor information. - */ - public function get_actor( $current_filter, $args ) { - if ( 'wp_login' === $current_filter ) { - $user = get_user_by( 'ID', $args[1]->data->ID ); - } else { - $user = wp_get_current_user(); - } - - $roles = new Roles(); - $translated_role = $roles->translate_user_to_role( $user ); - - $actor = array( - 'wpcom_user_id' => null, - 'external_user_id' => isset( $user->ID ) ? $user->ID : null, - 'display_name' => isset( $user->display_name ) ? $user->display_name : null, - 'user_email' => isset( $user->user_email ) ? $user->user_email : null, - 'user_roles' => isset( $user->roles ) ? $user->roles : null, - 'translated_role' => $translated_role ? $translated_role : null, - 'is_cron' => defined( 'DOING_CRON' ) ? DOING_CRON : false, - 'is_rest' => defined( 'REST_API_REQUEST' ) ? REST_API_REQUEST : false, - 'is_xmlrpc' => defined( 'XMLRPC_REQUEST' ) ? XMLRPC_REQUEST : false, - 'is_wp_rest' => defined( 'REST_REQUEST' ) ? REST_REQUEST : false, - 'is_ajax' => defined( 'DOING_AJAX' ) ? DOING_AJAX : false, - 'is_wp_admin' => is_admin(), - 'is_cli' => defined( 'WP_CLI' ) ? WP_CLI : false, - 'from_url' => $this->get_request_url(), - ); - - if ( $this->should_send_user_data_with_actor( $current_filter ) ) { - $ip = IP_Utils::get_ip(); - - $actor['ip'] = $ip ? $ip : ''; - $actor['user_agent'] = isset( $_SERVER['HTTP_USER_AGENT'] ) ? filter_var( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) ) : 'unknown'; - } - - return $actor; - } - - /** - * Should user data be sent as the actor? - * - * @param string $current_filter The current WordPress filter being executed. - * @return bool - */ - public function should_send_user_data_with_actor( $current_filter ) { - $should_send = in_array( $current_filter, array( 'jetpack_wp_login', 'wp_logout', 'jetpack_valid_failed_login_attempt' ), true ); - /** - * Allow or deny sending actor's user data ( IP and UA ) during a sync event - * - * @since 1.6.3 - * @since-jetpack 5.8.0 - * - * @module sync - * - * @param bool True if we should send user data - * @param string The current filter that is performing the sync action - */ - return apply_filters( 'jetpack_sync_actor_user_data', $should_send, $current_filter ); - } - - /** - * Sets Listener defaults. - */ - public function set_defaults() { - $this->sync_queue = new Queue( 'sync' ); - $this->full_sync_queue = new Queue( 'full_sync' ); - $this->set_queue_size_limit( Settings::get_setting( 'max_queue_size' ) ); - $this->set_queue_lag_limit( Settings::get_setting( 'max_queue_lag' ) ); - } - - /** - * Get the request URL. - * - * @return string Request URL, if known. Otherwise, wp-admin or home_url. - */ - public function get_request_url() { - if ( isset( $_SERVER['HTTP_HOST'] ) && isset( $_SERVER['REQUEST_URI'] ) ) { - // phpcs:ignore WordPress.Security.ValidatedSanitizedInput -- False positive, sniff misses the call to esc_url_raw. - return esc_url_raw( 'http' . ( isset( $_SERVER['HTTPS'] ) ? 's' : '' ) . '://' . wp_unslash( "{$_SERVER['HTTP_HOST']}{$_SERVER['REQUEST_URI']}" ) ); - } - return is_admin() ? get_admin_url( get_current_blog_id() ) : home_url(); - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-lock.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-lock.php deleted file mode 100644 index 61b89a1c..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-lock.php +++ /dev/null @@ -1,77 +0,0 @@ - $locked_time ) { - update_option( $lock_name, false, false ); - } - return false; - } - - $locked_time = microtime( true ) + $expiry; - update_option( $lock_name, $locked_time, false ); - return $locked_time; - } - - /** - * Remove the lock. - * - * @access public - * - * @param string $name lock name. - * @param bool|float $lock_expiration lock expiration. - */ - public function remove( $name, $lock_expiration = false ) { - $lock_name = self::LOCK_PREFIX . $name; - - // Only remove lock if current value matches our lock. - if ( true === $lock_expiration || (string) get_option( $lock_name ) === (string) $lock_expiration ) { - update_option( $lock_name, false, false ); - } - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-main.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-main.php deleted file mode 100644 index f48e2c66..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-main.php +++ /dev/null @@ -1,135 +0,0 @@ -uninstall(); - } - - /** - * Sync cleanup on shutdown. - */ - public static function on_jetpack_site_disconnected() { - add_action( 'shutdown', array( __CLASS__, 'sync_cleanup' ), 10000 ); - } - - /** - * Delete all sync related data on Site disconnect / clean up custom table. - * Needs to happen on shutdown to prevent fatals. - */ - public static function sync_cleanup() { - Sender::get_instance()->uninstall(); - - $table_storage = new Queue_Storage_Table( 'test_queue' ); - $table_storage->drop_table(); - } - - /** - * Sets the Sync data settings. - * - * @param array $data_settings An array containing the Sync data options. An empty array indicates that the default - * values will be used for all Sync data. - */ - public static function set_sync_data_options( $data_settings = array() ) { - ( new Data_Settings() )->add_settings_list( $data_settings ); - } - - /** - * Initialize the main sync actions. - * - * @action plugins_loaded - */ - public static function on_plugins_loaded_early() { - /** - * Additional Sync modules can be carried out into their own packages and they - * will get their own config settings. - * - * For now additional modules are enabled based on whether the third party plugin - * class exists or not. - */ - Sync_Actions::initialize_search(); - Sync_Actions::initialize_woocommerce(); - Sync_Actions::initialize_wp_super_cache(); - - // We need to define this here so that it's hooked before `updating_jetpack_version` is called. - add_action( 'updating_jetpack_version', array( 'Automattic\\Jetpack\\Sync\\Actions', 'cleanup_on_upgrade' ), 10, 2 ); - } - - /** - * Runs after most of plugins_loaded hook functions have been run. - * - * @action plugins_loaded - */ - public static function on_plugins_loaded_late() { - /* - * Init after plugins loaded and before the `init` action. This helps with issues where plugins init - * with a high priority or sites that use alternate cron. - */ - Sync_Actions::init(); - - // Enable non-blocking Jetpack Sync flow. - $non_block_enabled = (bool) get_option( 'jetpack_sync_non_blocking', false ); - - /** - * Filters the option to enable non-blocking sync. - * - * Default value is false, filter to true to enable non-blocking mode which will have - * WP.com return early and use the sync/close endpoint to check-in processed items. - * - * @since 1.12.3 - * - * @param bool $enabled Should non-blocking flow be enabled. - */ - $filtered = (bool) apply_filters( 'jetpack_sync_non_blocking', $non_block_enabled ); - - if ( $non_block_enabled !== $filtered ) { - update_option( 'jetpack_sync_non_blocking', $filtered, false ); - } - - // Initialize health-related hooks after plugins have loaded. - Health::init(); - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-modules.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-modules.php deleted file mode 100644 index 993ebef5..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-modules.php +++ /dev/null @@ -1,160 +0,0 @@ -set_defaults(); - } - } - - /** - * Gets the name of an initialized module. Returns false if given module has not been initialized. - * - * @access public - * @static - * - * @param string $module_name A module name. - * - * @return bool|Automattic\Jetpack\Sync\Modules\Module - */ - public static function get_module( $module_name ) { - foreach ( self::get_modules() as $module ) { - if ( $module->name() === $module_name ) { - return $module; - } - } - - return false; - } - - /** - * Loads and sets defaults for all declared modules. - * - * @access public - * @static - * - * @return array - */ - public static function initialize_modules() { - /** - * Filters the list of class names of sync modules. - * If you add to this list, make sure any classes implement the - * Jetpack_Sync_Module interface. - * - * @since 1.6.3 - * @since-jetpack 4.2.0 - */ - $modules = apply_filters( 'jetpack_sync_modules', self::DEFAULT_SYNC_MODULES ); - - $modules = array_map( array( __CLASS__, 'load_module' ), $modules ); - - return array_map( array( __CLASS__, 'set_module_defaults' ), $modules ); - } - - /** - * Returns an instance of the given module class. - * - * @access public - * @static - * - * @param string $module_class The classname of a Jetpack sync module. - * - * @return Automattic\Jetpack\Sync\Modules\Module - */ - public static function load_module( $module_class ) { - return new $module_class(); - } - - /** - * Sets defaults for the given instance of a Jetpack sync module. - * - * @access public - * @static - * - * @param Automattic\Jetpack\Sync\Modules\Module $module Instance of a Jetpack sync module. - * - * @return Automattic\Jetpack\Sync\Modules\Module - */ - public static function set_module_defaults( $module ) { - $module->set_defaults(); - if ( method_exists( $module, 'set_late_default' ) ) { - add_action( 'init', array( $module, 'set_late_default' ), 90 ); - } - return $module; - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-package-version.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-package-version.php deleted file mode 100644 index 779d4226..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-package-version.php +++ /dev/null @@ -1,30 +0,0 @@ -id = $id; - $this->items_with_ids = $items_with_ids; - } - - /** - * Retrieve the sync items in the buffer, in an ID => value form. - * - * @access public - * - * @return bool|array Sync items in the buffer. - */ - public function get_items() { - return array_combine( $this->get_item_ids(), $this->get_item_values() ); - } - - /** - * Retrieve the values of the sync items in the buffer. - * - * @access public - * - * @return array Sync items values. - */ - public function get_item_values() { - return Utils::get_item_values( $this->items_with_ids ); - } - - /** - * Retrieve the IDs of the sync items in the buffer. - * - * @access public - * - * @return array Sync items IDs. - */ - public function get_item_ids() { - return Utils::get_item_ids( $this->items_with_ids ); - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-queue.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-queue.php deleted file mode 100644 index fa9da083..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-queue.php +++ /dev/null @@ -1,678 +0,0 @@ -id = str_replace( '-', '_', $id ); // Necessary to ensure we don't have ID collisions in the SQL. - $this->row_iterator = 0; - $this->random_int = wp_rand( 1, 1000000 ); - - /** - * If the Custom queue table is enabled - let's use it as a backend. Otherwise, fall back to the Options table. - */ - if ( Settings::is_custom_queue_table_enabled() ) { - $this->queue_storage = new Queue_Storage_Table( $this->id ); - } else { - // Initialize the storage with the Options table backend. To be changed in subsequent updates to include the logic to switch to Custom Table. - $this->queue_storage = new Queue_Storage_Options( $this->id ); - } - } - - /** - * Add a single item to the queue. - * - * @param object $item Event object to add to queue. - * - * @return bool|WP_Error - */ - public function add( $item ) { - $added = false; - - // If empty, don't add. - if ( empty( $item ) ) { - return false; - } - - // Attempt to serialize data, if an exception (closures) return early. - try { - $item = serialize( $item ); // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.serialize_serialize - } catch ( \Exception $ex ) { - return new WP_Error( 'queue_unable_to_serialize', 'Unable to serialize item' ); - } - - // This basically tries to add the option until enough time has elapsed that - // it has a unique (microtime-based) option key. - while ( ! $added ) { - $added = $this->queue_storage->insert_item( $this->get_next_data_row_option_name(), $item ); - } - - return $added; - } - - /** - * Insert all the items in a single SQL query. May be subject to query size limits! - * - * @param array $items Array of events to add to the queue. - * - * @return bool|\WP_Error - */ - public function add_all( $items ) { - // TODO check and figure out if it's used at all and if we can optimize it. - $base_option_name = $this->get_next_data_row_option_name(); - - $rows_added = $this->queue_storage->add_all( $items, $base_option_name ); - - if ( count( $items ) !== $rows_added ) { - return new WP_Error( 'row_count_mismatch', "The number of rows inserted didn't match the size of the input array" ); - } - - return true; - } - - /** - * Get the front-most item on the queue without checking it out. - * - * @param int $count Number of items to return when looking at the items. - * - * @return array - */ - public function peek( $count = 1 ) { - $items = $this->fetch_items( $count ); - if ( $items ) { - return Utils::get_item_values( $items ); - } - - return array(); - } - - /** - * Gets items with particular IDs. - * - * @param array $item_ids Array of item IDs to retrieve. - * - * @return array - */ - public function peek_by_id( $item_ids ) { - $items = $this->fetch_items_by_id( $item_ids ); - if ( $items ) { - return Utils::get_item_values( $items ); - } - - return array(); - } - - /** - * Gets the queue lag. - * Lag is the difference in time between the age of the oldest item - * (aka first or frontmost item) and the current time. - * - * @param float $now The current time in microtime. - * - * @return float - */ - public function lag( $now = null ) { - return (float) $this->queue_storage->get_lag( $now ); - } - - /** - * Resets the queue. - */ - public function reset() { - $this->delete_checkout_id(); - - $this->queue_storage->clear_queue(); - } - - /** - * Return the size of the queue. - * - * @return int - */ - public function size() { - return $this->queue_storage->get_item_count(); - } - - /** - * Lets you know if there is any items in the queue. - * - * We use this peculiar implementation because it's much faster than count(*). - * - * @return bool - */ - public function has_any_items() { - return $this->size() > 0; - } - - /** - * Used to checkout the queue. - * - * @param int $buffer_size Size of the buffer to checkout. - * - * @return Automattic\Jetpack\Sync\Queue_Buffer|bool|int|\WP_Error - */ - public function checkout( $buffer_size ) { - if ( $this->get_checkout_id() ) { - return new WP_Error( 'unclosed_buffer', 'There is an unclosed buffer' ); - } - - // TODO check if adding a prefix is going to be a problem - $buffer_id = uniqid( '', true ); - - $result = $this->set_checkout_id( $buffer_id ); - - if ( ! $result || is_wp_error( $result ) ) { - return $result; - } - - $items = $this->fetch_items( $buffer_size ); - - if ( ! is_countable( $items ) ) { - return false; - } - - if ( count( $items ) === 0 ) { - return false; - } - - return new Queue_Buffer( $buffer_id, array_slice( $items, 0, $buffer_size ) ); - } - - /** - * Given a list of items return the items ids. - * - * @param array $items List of item objects. - * - * @return array Ids of the items. - */ - public function get_ids( $items ) { - return array_map( - function ( $item ) { - return $item->id; - }, - $items - ); - } - - /** - * Pop elements from the queue. - * - * @param int $limit Number of items to pop from the queue. - * - * @return array|object|null - */ - public function pop( $limit ) { - $items = $this->fetch_items( $limit ); - - $ids = $this->get_ids( $items ); - - $this->delete( $ids ); - - return $items; - } - - /** - * Get the items from the queue with a memory limit. - * - * This checks out rows until it either empties the queue or hits a certain memory limit - * it loads the sizes from the DB first so that it doesn't accidentally - * load more data into memory than it needs to. - * The only way it will load more items than $max_size is if a single queue item - * exceeds the memory limit, but in that case it will send that item by itself. - * - * @param int $max_memory (bytes) Maximum memory threshold. - * @param int $max_buffer_size Maximum buffer size (number of items). - * - * @return \Automattic\Jetpack\Sync\Queue_Buffer|bool|int|\WP_Error - */ - public function checkout_with_memory_limit( $max_memory, $max_buffer_size = 500 ) { - if ( $this->get_checkout_id() ) { - return new WP_Error( 'unclosed_buffer', 'There is an unclosed buffer' ); - } - - $buffer_id = uniqid( '', true ); - - $result = $this->set_checkout_id( $buffer_id ); - - if ( ! $result || is_wp_error( $result ) ) { - return $result; - } - - // How much memory is currently being used by the items. - $total_memory = 0; - - // Store the items to return - $items = array(); - - $current_items_ids = $this->queue_storage->get_items_ids_with_size( $max_buffer_size - count( $items ) ); - - // If no valid items are returned or no items are returned, continue. - if ( ! is_countable( $current_items_ids ) || count( $current_items_ids ) === 0 ) { - return false; - } - - $item_ids_to_fetch = array(); - - foreach ( $current_items_ids as $id => $item_with_size ) { - $total_memory += $item_with_size->value_size; - - // If this is the first item and it exceeds memory, allow loop to continue - // we will exit on the next iteration instead. - if ( $total_memory > $max_memory && $id > 0 ) { - break; - } - - $item_ids_to_fetch[] = $item_with_size->id; - } - - $current_items = $this->queue_storage->fetch_items_by_ids( $item_ids_to_fetch ); - - $items_count = is_countable( $current_items ) ? count( $current_items ) : 0; - - if ( $items_count > 0 ) { - /** - * Save some memory by moving things one by one to the array of items being returned, instead of - * unserializing all and then merging them with other items. - * - * PHPCS ignore is because this is the expected behavior - we're assigning a variable in the condition part of the loop. - */ - // phpcs:ignore Generic.CodeAnalysis.AssignmentInCondition.FoundInWhileCondition - while ( ( $current_item = array_shift( $current_items ) ) !== null ) { - // @codingStandardsIgnoreStart - $current_item->value = unserialize( $current_item->value ); - // @codingStandardsIgnoreEnd - - $items[] = $current_item; - } - } - - if ( count( $items ) === 0 ) { - $this->delete_checkout_id(); - - return false; - } - - return new Queue_Buffer( $buffer_id, $items ); - } - - /** - * Check in the queue. - * - * @param Automattic\Jetpack\Sync\Queue_Buffer $buffer Queue_Buffer object. - * - * @return bool|\WP_Error - */ - public function checkin( $buffer ) { - $is_valid = $this->validate_checkout( $buffer ); - - if ( is_wp_error( $is_valid ) ) { - return $is_valid; - } - - $this->delete_checkout_id(); - - return true; - } - - /** - * Close the buffer. - * - * @param Automattic\Jetpack\Sync\Queue_Buffer $buffer Queue_Buffer object. - * @param null|array $ids_to_remove Ids to remove from the queue. - * - * @return bool|\WP_Error - */ - public function close( $buffer, $ids_to_remove = null ) { - $is_valid = $this->validate_checkout( $buffer ); - - if ( is_wp_error( $is_valid ) ) { - // Always delete ids_to_remove even when buffer is no longer checked-out. - // They were processed by WP.com so safe to remove from queue. - if ( $ids_to_remove !== null ) { - $this->delete( $ids_to_remove ); - } - return $is_valid; - } - - $this->delete_checkout_id(); - - // By default clear all items in the buffer. - if ( $ids_to_remove === null ) { - $ids_to_remove = $buffer->get_item_ids(); - } - - $this->delete( $ids_to_remove ); - - return true; - } - - /** - * Delete elements from the queue. - * - * @param array $ids Ids to delete. - * - * @return bool|int - */ - private function delete( $ids ) { - if ( array() === $ids ) { - return 0; - } - - $this->queue_storage->delete_items_by_ids( $ids ); - - return true; - } - - /** - * Flushes all items from the queue. - * - * @return array - */ - public function flush_all() { - $items = Utils::get_item_values( $this->fetch_items() ); - $this->reset(); - - return $items; - } - - /** - * Get all the items from the queue. - * - * @return array|object|null - */ - public function get_all() { - return $this->fetch_items(); - } - - /** - * Forces Checkin of the queue. - * Use with caution, this could allow multiple processes to delete - * and send from the queue at the same time - */ - public function force_checkin() { - $this->delete_checkout_id(); - } - - /** - * Checks if the queue is locked. - * - * @return bool - */ - public function is_locked() { - return (bool) $this->get_checkout_id(); - } - - /** - * Locks checkouts from the queue - * tries to wait up to $timeout seconds for the queue to be empty. - * - * @param int $timeout The wait time in seconds for the queue to be empty. - * - * @return bool|int|\WP_Error - */ - public function lock( $timeout = 30 ) { - $tries = 0; - - while ( $this->has_any_items() && $tries < $timeout ) { - sleep( 1 ); - ++$tries; - } - - if ( 30 === $tries ) { - return new WP_Error( 'lock_timeout', 'Timeout waiting for sync queue to empty' ); - } - - if ( $this->get_checkout_id() ) { - return new WP_Error( 'unclosed_buffer', 'There is an unclosed buffer' ); - } - - // Hopefully this means we can acquire a checkout? - $result = $this->set_checkout_id( 'lock' ); - - if ( ! $result || is_wp_error( $result ) ) { - return $result; - } - - return true; - } - - /** - * Unlocks the queue. - * - * @return bool|int - */ - public function unlock() { - return $this->delete_checkout_id(); - } - - /** - * This option is specifically chosen to, as much as possible, preserve time order - * and minimise the possibility of collisions between multiple processes working - * at the same time. - * - * @return string - */ - protected function generate_option_name_timestamp() { - return sprintf( '%.6f', microtime( true ) ); - } - - /** - * Gets the checkout ID. - * - * @return bool|string - */ - private function get_checkout_id() { - global $wpdb; - $checkout_value = $wpdb->get_var( - $wpdb->prepare( - "SELECT option_value FROM $wpdb->options WHERE option_name = %s", - $this->get_lock_option_name() - ) - ); - - if ( $checkout_value ) { - list( $checkout_id, $timestamp ) = explode( ':', $checkout_value ); - if ( (int) $timestamp > time() ) { - return $checkout_id; - } - } - - return false; - } - - /** - * Sets the checkout id. - * - * @param string $checkout_id The ID of the checkout. - * - * @return bool|int - */ - private function set_checkout_id( $checkout_id ) { - global $wpdb; - - $expires = time() + Defaults::$default_sync_queue_lock_timeout; - $updated_num = $wpdb->query( - $wpdb->prepare( - "UPDATE $wpdb->options SET option_value = %s WHERE option_name = %s", - "$checkout_id:$expires", - $this->get_lock_option_name() - ) - ); - - if ( ! $updated_num ) { - $updated_num = $wpdb->query( - $wpdb->prepare( - "INSERT INTO $wpdb->options ( option_name, option_value, autoload ) VALUES ( %s, %s, 'no' )", - $this->get_lock_option_name(), - "$checkout_id:$expires" - ) - ); - } - - return $updated_num; - } - - /** - * Deletes the checkout ID. - * - * @return bool|int - */ - private function delete_checkout_id() { - global $wpdb; - // Rather than delete, which causes fragmentation, we update in place. - return $wpdb->query( - $wpdb->prepare( - "UPDATE $wpdb->options SET option_value = %s WHERE option_name = %s", - '0:0', - $this->get_lock_option_name() - ) - ); - } - - /** - * Return the lock option name. - * - * @return string - */ - private function get_lock_option_name() { - return "jpsq_{$this->id}_checkout"; - } - - /** - * Return the next data row option name. - * - * @return string - */ - private function get_next_data_row_option_name() { - $timestamp = $this->generate_option_name_timestamp(); - - // Row iterator is used to avoid collisions where we're writing data waaay fast in a single process. - if ( PHP_INT_MAX === $this->row_iterator ) { - $this->row_iterator = 0; - } else { - $this->row_iterator += 1; - } - - return 'jpsq_' . $this->id . '-' . $timestamp . '-' . $this->random_int . '-' . $this->row_iterator; - } - - /** - * Return the items in the queue. - * - * @param null|int $limit Limit to the number of items we fetch at once. - * - * @return array|object|null - */ - private function fetch_items( $limit = null ) { - $items = $this->queue_storage->fetch_items( $limit ); - - return $this->unserialize_values( $items ); - } - - /** - * Return items with specific ids. - * - * @param array $items_ids Array of event ids. - * - * @return array|object|null - */ - private function fetch_items_by_id( $items_ids ) { - return $this->unserialize_values( $this->queue_storage->fetch_items_by_ids( $items_ids ) ); - } - - /** - * Unserialize item values. - * - * @param array $items Events from the Queue to be unserialized. - * - * @return mixed - */ - private function unserialize_values( $items ) { - array_walk( - $items, - function ( $item ) { - // @codingStandardsIgnoreStart - $item->value = @unserialize( $item->value ); - // @codingStandardsIgnoreEnd - } - ); - - return $items; - } - - /** - * Return true if the buffer is still valid or an Error other wise. - * - * @param Automattic\Jetpack\Sync\Queue_Buffer $buffer The Queue_Buffer. - * - * @return bool|WP_Error - */ - private function validate_checkout( $buffer ) { - if ( ! $buffer instanceof Queue_Buffer ) { - return new WP_Error( 'not_a_buffer', 'You must checkin an instance of Automattic\\Jetpack\\Sync\\Queue_Buffer' ); - } - - $checkout_id = $this->get_checkout_id(); - - if ( ! $checkout_id ) { - return new WP_Error( 'buffer_not_checked_out', 'There are no checked out buffers' ); - } - - // TODO: change to strict comparison. - if ( $checkout_id != $buffer->id ) { // phpcs:ignore Universal.Operators.StrictComparisons.LooseNotEqual - return new WP_Error( 'buffer_mismatch', 'The buffer you checked in was not checked out' ); - } - - return true; - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-replicastore.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-replicastore.php deleted file mode 100644 index f10c5ff7..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-replicastore.php +++ /dev/null @@ -1,1452 +0,0 @@ -query( "DELETE FROM $wpdb->posts" ); - - // Delete comments from cache. - $comment_ids = $wpdb->get_col( "SELECT comment_ID FROM $wpdb->comments" ); - if ( ! empty( $comment_ids ) ) { - clean_comment_cache( $comment_ids ); - } - $wpdb->query( "DELETE FROM $wpdb->comments" ); - - // Also need to delete terms from cache. - $term_ids = $wpdb->get_col( "SELECT term_id FROM $wpdb->terms" ); - foreach ( $term_ids as $term_id ) { - wp_cache_delete( $term_id, 'terms' ); - } - - $wpdb->query( "DELETE FROM $wpdb->terms" ); - - $wpdb->query( "DELETE FROM $wpdb->term_taxonomy" ); - $wpdb->query( "DELETE FROM $wpdb->term_relationships" ); - - // Callables and constants. - $wpdb->query( "DELETE FROM $wpdb->options WHERE option_name LIKE 'jetpack_%'" ); - $wpdb->query( "DELETE FROM $wpdb->postmeta WHERE meta_key NOT LIKE '\_%'" ); - } - - /** - * Ran when full sync has just started. - * - * @access public - * - * @param array $config Full sync configuration for this sync module. - */ - public function full_sync_start( $config ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable - $this->reset(); - } - - /** - * Ran when full sync has just finished. - * - * @access public - * - * @param string $checksum Deprecated since 7.3.0. - */ - public function full_sync_end( $checksum ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable - // Noop right now. - } - - /** - * Retrieve the number of terms. - * - * @access public - * - * @return int Number of terms. - */ - public function term_count() { - global $wpdb; - return $wpdb->get_var( "SELECT COUNT(*) FROM $wpdb->terms" ); - } - - /** - * Retrieve the number of rows in the `term_taxonomy` table. - * - * @access public - * - * @return int Number of terms. - */ - public function term_taxonomy_count() { - global $wpdb; - return $wpdb->get_var( "SELECT COUNT(*) FROM $wpdb->term_taxonomy" ); - } - - /** - * Retrieve the number of term relationships. - * - * @access public - * - * @return int Number of rows in the term relationships table. - */ - public function term_relationship_count() { - global $wpdb; - return $wpdb->get_var( "SELECT COUNT(*) FROM $wpdb->term_relationships" ); - } - - /** - * Retrieve the number of posts with a particular post status within a certain range. - * - * @access public - * - * @todo Prepare the SQL query before executing it. - * - * @param string $status Post status. - * @param int $min_id Minimum post ID. - * @param int $max_id Maximum post ID. - * @return int Number of posts. - */ - public function post_count( $status = null, $min_id = null, $max_id = null ) { - global $wpdb; - - $where = ''; - - if ( $status ) { - $where = "post_status = '" . esc_sql( $status ) . "'"; - } else { - $where = '1=1'; - } - - if ( ! empty( $min_id ) ) { - $where .= ' AND ID >= ' . (int) $min_id; - } - - if ( ! empty( $max_id ) ) { - $where .= ' AND ID <= ' . (int) $max_id; - } - - // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared - return $wpdb->get_var( "SELECT COUNT(*) FROM $wpdb->posts WHERE $where" ); - } - - /** - * Retrieve the posts with a particular post status. - * - * @access public - * - * @todo Implement range and actually use max_id/min_id arguments. - * - * @param string $status Post status. - * @param int $min_id Minimum post ID. - * @param int $max_id Maximum post ID. - * @return array Array of posts. - */ - public function get_posts( $status = null, $min_id = null, $max_id = null ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable - $args = array( - 'orderby' => 'ID', - 'posts_per_page' => -1, - ); - - if ( $status ) { - $args['post_status'] = $status; - } else { - $args['post_status'] = 'any'; - } - - return get_posts( $args ); - } - - /** - * Retrieve a post object by the post ID. - * - * @access public - * - * @param int $id Post ID. - * @return \WP_Post Post object. - */ - public function get_post( $id ) { - return get_post( $id ); - } - - /** - * Update or insert a post. - * - * @access public - * - * @param \WP_Post $post Post object. - * @param bool $silent Whether to perform a silent action. Not used in this implementation. - */ - public function upsert_post( $post, $silent = false ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable - global $wpdb; - - // Reject the post if it's not a \WP_Post. - if ( ! $post instanceof \WP_Post ) { - return; - } - - $post = $post->to_array(); - - // Reject posts without an ID. - if ( ! isset( $post['ID'] ) ) { - return; - } - - $now = current_time( 'mysql' ); - $now_gmt = get_gmt_from_date( $now ); - - $defaults = array( - 'ID' => 0, - 'post_author' => '0', - 'post_content' => '', - 'post_content_filtered' => '', - 'post_title' => '', - 'post_name' => '', - 'post_excerpt' => '', - 'post_status' => 'draft', - 'post_type' => 'post', - 'comment_status' => 'closed', - 'comment_count' => '0', - 'ping_status' => '', - 'post_password' => '', - 'to_ping' => '', - 'pinged' => '', - 'post_parent' => 0, - 'menu_order' => 0, - 'guid' => '', - 'post_date' => $now, - 'post_date_gmt' => $now_gmt, - 'post_modified' => $now, - 'post_modified_gmt' => $now_gmt, - ); - - $post = array_intersect_key( $post, $defaults ); - - $post = sanitize_post( $post, 'db' ); - - unset( $post['filter'] ); - - $exists = $wpdb->get_var( $wpdb->prepare( "SELECT EXISTS( SELECT 1 FROM $wpdb->posts WHERE ID = %d )", $post['ID'] ) ); - - if ( $exists ) { - $wpdb->update( $wpdb->posts, $post, array( 'ID' => $post['ID'] ) ); - } else { - $wpdb->insert( $wpdb->posts, $post ); - } - - clean_post_cache( $post['ID'] ); - } - - /** - * Delete a post by the post ID. - * - * @access public - * - * @param int $post_id Post ID. - */ - public function delete_post( $post_id ) { - wp_delete_post( $post_id, true ); - } - - /** - * Retrieve the checksum for posts within a range. - * - * @access public - * - * @param int $min_id Minimum post ID. - * @param int $max_id Maximum post ID. - * @return int The checksum. - */ - public function posts_checksum( $min_id = null, $max_id = null ) { - return $this->summarize_checksum_histogram( $this->checksum_histogram( 'posts', null, $min_id, $max_id ) ); - } - - /** - * Retrieve the checksum for post meta within a range. - * - * @access public - * - * @param int $min_id Minimum post meta ID. - * @param int $max_id Maximum post meta ID. - * @return int The checksum. - */ - public function post_meta_checksum( $min_id = null, $max_id = null ) { - return $this->summarize_checksum_histogram( $this->checksum_histogram( 'postmeta', null, $min_id, $max_id ) ); - } - - /** - * Retrieve the number of comments with a particular comment status within a certain range. - * - * @access public - * - * @todo Prepare the SQL query before executing it. - * - * @param string $status Comment status. - * @param int $min_id Minimum comment ID. - * @param int $max_id Maximum comment ID. - * @return int Number of comments. - */ - public function comment_count( $status = null, $min_id = null, $max_id = null ) { - global $wpdb; - - $comment_approved = $this->comment_status_to_approval_value( $status ); - - if ( false !== $comment_approved ) { - $where = "comment_approved = '" . esc_sql( $comment_approved ) . "'"; - } else { - $where = '1=1'; - } - - if ( ! empty( $min_id ) ) { - $where .= ' AND comment_ID >= ' . (int) $min_id; - } - - if ( ! empty( $max_id ) ) { - $where .= ' AND comment_ID <= ' . (int) $max_id; - } - - // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared - return $wpdb->get_var( "SELECT COUNT(*) FROM $wpdb->comments WHERE $where" ); - } - - /** - * Translate a comment status to a value of the comment_approved field. - * - * @access protected - * - * @param string $status Comment status. - * @return string|bool New comment_approved value, false if the status doesn't affect it. - */ - protected function comment_status_to_approval_value( $status ) { - switch ( (string) $status ) { - case 'approve': - case '1': - return '1'; - case 'hold': - case '0': - return '0'; - case 'spam': - return 'spam'; - case 'trash': - return 'trash'; - case 'post-trashed': - return 'post-trashed'; - case 'any': - case 'all': - default: - return false; - } - } - - /** - * Retrieve the comments with a particular comment status. - * - * @access public - * - * @todo Implement range and actually use max_id/min_id arguments. - * - * @param string $status Comment status. - * @param int $min_id Minimum comment ID. - * @param int $max_id Maximum comment ID. - * @return array Array of comments. - */ - public function get_comments( $status = null, $min_id = null, $max_id = null ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable - $args = array( - 'orderby' => 'ID', - 'status' => 'all', - ); - - if ( $status ) { - $args['status'] = $status; - } - - return get_comments( $args ); - } - - /** - * Retrieve a comment object by the comment ID. - * - * @access public - * - * @param int $id Comment ID. - * @return \WP_Comment Comment object. - */ - public function get_comment( $id ) { - return \WP_Comment::get_instance( $id ); - } - - /** - * Update or insert a comment. - * - * @access public - * - * @param \WP_Comment $comment Comment object. - */ - public function upsert_comment( $comment ) { - global $wpdb; - - $comment = $comment->to_array(); - - // Filter by fields on comment table. - $comment_fields_whitelist = array( - 'comment_ID', - 'comment_post_ID', - 'comment_author', - 'comment_author_email', - 'comment_author_url', - 'comment_author_IP', - 'comment_date', - 'comment_date_gmt', - 'comment_content', - 'comment_karma', - 'comment_approved', - 'comment_agent', - 'comment_type', - 'comment_parent', - 'user_id', - ); - - foreach ( $comment as $key => $value ) { - if ( ! in_array( $key, $comment_fields_whitelist, true ) ) { - unset( $comment[ $key ] ); - } - } - - $exists = $wpdb->get_var( - $wpdb->prepare( - "SELECT EXISTS( SELECT 1 FROM $wpdb->comments WHERE comment_ID = %d )", - $comment['comment_ID'] - ) - ); - - if ( $exists ) { - $wpdb->update( $wpdb->comments, $comment, array( 'comment_ID' => $comment['comment_ID'] ) ); - } else { - $wpdb->insert( $wpdb->comments, $comment ); - } - // Remove comment from cache. - clean_comment_cache( $comment['comment_ID'] ); - - wp_update_comment_count( $comment['comment_post_ID'] ); - } - - /** - * Trash a comment by the comment ID. - * - * @access public - * - * @param int $comment_id Comment ID. - */ - public function trash_comment( $comment_id ) { - wp_delete_comment( $comment_id ); - } - - /** - * Delete a comment by the comment ID. - * - * @access public - * - * @param int $comment_id Comment ID. - */ - public function delete_comment( $comment_id ) { - wp_delete_comment( $comment_id, true ); - } - - /** - * Mark a comment by the comment ID as spam. - * - * @access public - * - * @param int $comment_id Comment ID. - */ - public function spam_comment( $comment_id ) { - wp_spam_comment( $comment_id ); - } - - /** - * Trash the comments of a post. - * - * @access public - * - * @param int $post_id Post ID. - * @param array $statuses Post statuses. Not used in this implementation. - */ - public function trashed_post_comments( $post_id, $statuses ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable - wp_trash_post_comments( $post_id ); - } - - /** - * Untrash the comments of a post. - * - * @access public - * - * @param int $post_id Post ID. - */ - public function untrashed_post_comments( $post_id ) { - wp_untrash_post_comments( $post_id ); - } - - /** - * Retrieve the checksum for comments within a range. - * - * @access public - * - * @param int $min_id Minimum comment ID. - * @param int $max_id Maximum comment ID. - * @return int The checksum. - */ - public function comments_checksum( $min_id = null, $max_id = null ) { - return $this->summarize_checksum_histogram( $this->checksum_histogram( 'comments', null, $min_id, $max_id ) ); - } - - /** - * Retrieve the checksum for comment meta within a range. - * - * @access public - * - * @param int $min_id Minimum comment meta ID. - * @param int $max_id Maximum comment meta ID. - * @return int The checksum. - */ - public function comment_meta_checksum( $min_id = null, $max_id = null ) { - return $this->summarize_checksum_histogram( $this->checksum_histogram( 'commentmeta', null, $min_id, $max_id ) ); - } - - /** - * Update the value of an option. - * - * @access public - * - * @param string $option Option name. - * @param mixed $value Option value. - * @return bool False if value was not updated and true if value was updated. - */ - public function update_option( $option, $value ) { - return update_option( $option, $value ); - } - - /** - * Retrieve an option value based on an option name. - * - * @access public - * - * @param string $option Name of option to retrieve. - * @param mixed $default Optional. Default value to return if the option does not exist. - * @return mixed Value set for the option. - */ - public function get_option( $option, $default = false ) { - return get_option( $option, $default ); - } - - /** - * Remove an option by name. - * - * @access public - * - * @param string $option Name of option to remove. - * @return bool True, if option is successfully deleted. False on failure. - */ - public function delete_option( $option ) { - return delete_option( $option ); - } - - /** - * Change the info of the current theme. - * - * @access public - * - * @param array $theme_info Theme info array. - */ - public function set_theme_info( $theme_info ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable - // Noop. - } - - /** - * Whether the current theme supports a certain feature. - * - * @access public - * - * @param string $feature Name of the feature. - */ - public function current_theme_supports( $feature ) { - return current_theme_supports( $feature ); - } - - /** - * Retrieve metadata for the specified object. - * - * @access public - * - * @param string $type Meta type. - * @param int $object_id ID of the object. - * @param string $meta_key Meta key. - * @param bool $single If true, return only the first value of the specified meta_key. - * - * @return mixed Single metadata value, or array of values. - */ - public function get_metadata( $type, $object_id, $meta_key = '', $single = false ) { - return get_metadata( $type, $object_id, $meta_key, $single ); - } - - /** - * Stores remote meta key/values alongside an ID mapping key. - * - * @access public - * - * @todo Refactor to not use interpolated values when preparing the SQL query. - * - * @param string $type Meta type. - * @param int $object_id ID of the object. - * @param string $meta_key Meta key. - * @param mixed $meta_value Meta value. - * @param int $meta_id ID of the meta. - * - * @return bool False if meta table does not exist, true otherwise. - */ - public function upsert_metadata( $type, $object_id, $meta_key, $meta_value, $meta_id ) { - $table = _get_meta_table( $type ); - if ( ! $table ) { - return false; - } - - global $wpdb; - - $exists = $wpdb->get_var( - $wpdb->prepare( - // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared - "SELECT EXISTS( SELECT 1 FROM $table WHERE meta_id = %d )", - $meta_id - ) - ); - - if ( $exists ) { - $wpdb->update( - $table, - array( - 'meta_key' => $meta_key, - 'meta_value' => maybe_serialize( $meta_value ), - ), - array( 'meta_id' => $meta_id ) - ); - } else { - $object_id_field = $type . '_id'; - $wpdb->insert( - $table, - array( - 'meta_id' => $meta_id, - $object_id_field => $object_id, - 'meta_key' => $meta_key, - 'meta_value' => maybe_serialize( $meta_value ), - ) - ); - } - - wp_cache_delete( $object_id, $type . '_meta' ); - - return true; - } - - /** - * Delete metadata for the specified object. - * - * @access public - * - * @todo Refactor to not use interpolated values when preparing the SQL query. - * - * @param string $type Meta type. - * @param int $object_id ID of the object. - * @param array $meta_ids IDs of the meta objects to delete. - */ - public function delete_metadata( $type, $object_id, $meta_ids ) { - global $wpdb; - - $table = _get_meta_table( $type ); - if ( ! $table ) { - return false; - } - - foreach ( $meta_ids as $meta_id ) { - // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared - $wpdb->query( $wpdb->prepare( "DELETE FROM $table WHERE meta_id = %d", $meta_id ) ); - } - - // If we don't have an object ID what do we do - invalidate ALL meta? - if ( $object_id ) { - wp_cache_delete( $object_id, $type . '_meta' ); - } - } - - /** - * Delete metadata with a certain key for the specified objects. - * - * @access public - * - * @todo Test this out to make sure it works as expected. - * @todo Refactor to not use interpolated values when preparing the SQL query. - * - * @param string $type Meta type. - * @param array $object_ids IDs of the objects. - * @param string $meta_key Meta key. - */ - public function delete_batch_metadata( $type, $object_ids, $meta_key ) { - global $wpdb; - - $table = _get_meta_table( $type ); - if ( ! $table ) { - return false; - } - $column = sanitize_key( $type . '_id' ); - // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared - $wpdb->query( $wpdb->prepare( "DELETE FROM $table WHERE $column IN (%s) && meta_key = %s", implode( ',', $object_ids ), $meta_key ) ); - - // If we don't have an object ID what do we do - invalidate ALL meta? - foreach ( $object_ids as $object_id ) { - wp_cache_delete( $object_id, $type . '_meta' ); - } - } - - /** - * Retrieve value of a constant based on the constant name. - * - * We explicitly return null instead of false if the constant doesn't exist. - * - * @access public - * - * @param string $constant Name of constant to retrieve. - * @return mixed Value set for the constant. - */ - public function get_constant( $constant ) { - $value = get_option( 'jetpack_constant_' . $constant ); - - if ( $value ) { - return $value; - } - - return null; - } - - /** - * Set the value of a constant. - * - * @access public - * - * @param string $constant Name of constant to retrieve. - * @param mixed $value Value set for the constant. - */ - public function set_constant( $constant, $value ) { - update_option( 'jetpack_constant_' . $constant, $value ); - } - - /** - * Retrieve the number of the available updates of a certain type. - * Type is one of: `plugins`, `themes`, `wordpress`, `translations`, `total`, `wp_update_version`. - * - * @access public - * - * @param string $type Type of updates to retrieve. - * @return int|null Number of updates available, `null` if type is invalid or missing. - */ - public function get_updates( $type ) { - $all_updates = get_option( 'jetpack_updates', array() ); - - if ( isset( $all_updates[ $type ] ) ) { - return $all_updates[ $type ]; - } else { - return null; - } - } - - /** - * Set the available updates of a certain type. - * Type is one of: `plugins`, `themes`, `wordpress`, `translations`, `total`, `wp_update_version`. - * - * @access public - * - * @param string $type Type of updates to set. - * @param int $updates Total number of updates. - */ - public function set_updates( $type, $updates ) { - $all_updates = get_option( 'jetpack_updates', array() ); - $all_updates[ $type ] = $updates; - update_option( 'jetpack_updates', $all_updates ); - } - - /** - * Retrieve a callable value based on its name. - * - * @access public - * - * @param string $name Name of the callable to retrieve. - * @return mixed Value of the callable. - */ - public function get_callable( $name ) { - $value = get_option( 'jetpack_' . $name ); - - if ( $value ) { - return $value; - } - - return null; - } - - /** - * Update the value of a callable. - * - * @access public - * - * @param string $name Callable name. - * @param mixed $value Callable value. - */ - public function set_callable( $name, $value ) { - update_option( 'jetpack_' . $name, $value ); - } - - /** - * Retrieve a network option value based on a network option name. - * - * @access public - * - * @param string $option Name of network option to retrieve. - * @return mixed Value set for the network option. - */ - public function get_site_option( $option ) { - return get_option( 'jetpack_network_' . $option ); - } - - /** - * Update the value of a network option. - * - * @access public - * - * @param string $option Network option name. - * @param mixed $value Network option value. - * @return bool False if value was not updated and true if value was updated. - */ - public function update_site_option( $option, $value ) { - return update_option( 'jetpack_network_' . $option, $value ); - } - - /** - * Remove a network option by name. - * - * @access public - * - * @param string $option Name of option to remove. - * @return bool True, if option is successfully deleted. False on failure. - */ - public function delete_site_option( $option ) { - return delete_option( 'jetpack_network_' . $option ); - } - - /** - * Retrieve the terms from a particular taxonomy. - * - * @access public - * - * @param string $taxonomy Taxonomy slug. - * - * @return array|WP_Error Array of terms or WP_Error object on failure. - */ - public function get_terms( $taxonomy ) { - $t = $this->ensure_taxonomy( $taxonomy ); - if ( ! $t || is_wp_error( $t ) ) { - return $t; - } - return get_terms( $taxonomy ); - } - - /** - * Retrieve a particular term. - * - * @access public - * - * @param string $taxonomy Taxonomy slug. - * @param int $term_id ID of the term. - * @param string $term_key ID Field `term_id` or `term_taxonomy_id`. - * - * @return \WP_Term|WP_Error Term object on success, \WP_Error object on failure. - */ - public function get_term( $taxonomy, $term_id, $term_key = 'term_id' ) { - - // Full Sync will pass false for the $taxonomy so a check for term_taxonomy_id is needed before ensure_taxonomy. - if ( 'term_taxonomy_id' === $term_key ) { - return get_term_by( 'term_taxonomy_id', $term_id ); - } - - $t = $this->ensure_taxonomy( $taxonomy ); - if ( ! $t || is_wp_error( $t ) ) { - return $t; - } - - return get_term( $term_id, $taxonomy ); - } - - /** - * Verify a taxonomy is legitimate and register it if necessary. - * - * @access private - * - * @param string $taxonomy Taxonomy slug. - * - * @return bool|void|WP_Error True if already exists; void if it was registered; \WP_Error on error. - */ - private function ensure_taxonomy( $taxonomy ) { - if ( ! taxonomy_exists( $taxonomy ) ) { - // Try re-registering synced taxonomies. - $taxonomies = $this->get_callable( 'taxonomies' ); - if ( ! isset( $taxonomies[ $taxonomy ] ) ) { - // Doesn't exist, or somehow hasn't been synced. - return new WP_Error( 'invalid_taxonomy', "The taxonomy '$taxonomy' doesn't exist" ); - } - $t = $taxonomies[ $taxonomy ]; - - return register_taxonomy( - $taxonomy, - $t->object_type, - (array) $t - ); - } - - return true; - } - - /** - * Retrieve all terms from a taxonomy that are related to an object with a particular ID. - * - * @access public - * - * @param int $object_id Object ID. - * @param string $taxonomy Taxonomy slug. - * - * @return array|bool|WP_Error Array of terms on success, `false` if no terms or post doesn't exist, \WP_Error on failure. - */ - public function get_the_terms( $object_id, $taxonomy ) { - return get_the_terms( $object_id, $taxonomy ); - } - - /** - * Insert or update a term. - * - * @access public - * - * @param \WP_Term $term_object Term object. - * - * @return array|bool|WP_Error Array of term_id and term_taxonomy_id if updated, true if inserted, \WP_Error on failure. - */ - public function update_term( $term_object ) { - $taxonomy = $term_object->taxonomy; - global $wpdb; - $exists = $wpdb->get_var( - $wpdb->prepare( - "SELECT EXISTS( SELECT 1 FROM $wpdb->terms WHERE term_id = %d )", - $term_object->term_id - ) - ); - if ( ! $exists ) { - $term_object = sanitize_term( clone $term_object, $taxonomy, 'db' ); - $term = array( - 'term_id' => $term_object->term_id, - 'name' => $term_object->name, - 'slug' => $term_object->slug, - 'term_group' => $term_object->term_group, - ); - $term_taxonomy = array( - 'term_taxonomy_id' => $term_object->term_taxonomy_id, - 'term_id' => $term_object->term_id, - 'taxonomy' => $term_object->taxonomy, - 'description' => $term_object->description, - 'parent' => (int) $term_object->parent, - 'count' => (int) $term_object->count, - ); - $wpdb->insert( $wpdb->terms, $term ); - $wpdb->insert( $wpdb->term_taxonomy, $term_taxonomy ); - - return true; - } - - return wp_update_term( $term_object->term_id, $taxonomy, (array) $term_object ); - } - - /** - * Delete a term by the term ID and its corresponding taxonomy. - * - * @access public - * - * @param int $term_id Term ID. - * @param string $taxonomy Taxonomy slug. - * - * @return bool|int|WP_Error True on success, false if term doesn't exist. Zero if trying with default category. \WP_Error on invalid taxonomy. - */ - public function delete_term( $term_id, $taxonomy ) { - $this->ensure_taxonomy( $taxonomy ); - return wp_delete_term( $term_id, $taxonomy ); - } - - /** - * Add/update terms of a particular taxonomy of an object with the specified ID. - * - * @access public - * - * @param int $object_id The object to relate to. - * @param string $taxonomy The context in which to relate the term to the object. - * @param string|int|array $terms A single term slug, single term id, or array of either term slugs or ids. - * @param bool $append Optional. If false will delete difference of terms. Default false. - */ - public function update_object_terms( $object_id, $taxonomy, $terms, $append ) { - $this->ensure_taxonomy( $taxonomy ); - wp_set_object_terms( $object_id, $terms, $taxonomy, $append ); - } - - /** - * Remove certain term relationships from the specified object. - * - * @access public - * - * @todo Refactor to not use interpolated values when preparing the SQL query. - * - * @param int $object_id ID of the object. - * @param array $tt_ids Term taxonomy IDs. - * @return bool True on success, false on failure. - */ - public function delete_object_terms( $object_id, $tt_ids ) { - global $wpdb; - - if ( is_array( $tt_ids ) && ! empty( $tt_ids ) ) { - // Escape. - $tt_ids_sanitized = array_map( 'intval', $tt_ids ); - - $taxonomies = array(); - foreach ( $tt_ids_sanitized as $tt_id ) { - $term = get_term_by( 'term_taxonomy_id', $tt_id ); - $taxonomies[ $term->taxonomy ][] = $tt_id; - } - $in_tt_ids = implode( ', ', $tt_ids_sanitized ); - - /** - * Fires immediately before an object-term relationship is deleted. - * - * @since 1.6.3 - * @since-jetpack 2.9.0 - * - * @param int $object_id Object ID. - * @param array $tt_ids An array of term taxonomy IDs. - */ - do_action( 'delete_term_relationships', $object_id, $tt_ids_sanitized ); - // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared - $deleted = $wpdb->query( $wpdb->prepare( "DELETE FROM $wpdb->term_relationships WHERE object_id = %d AND term_taxonomy_id IN ($in_tt_ids)", $object_id ) ); - foreach ( $taxonomies as $taxonomy => $taxonomy_tt_ids ) { - $this->ensure_taxonomy( $taxonomy ); - wp_cache_delete( $object_id, $taxonomy . '_relationships' ); - /** - * Fires immediately after an object-term relationship is deleted. - * - * @since 1.6.3 - * @since-jetpack 2.9.0 - * - * @param int $object_id Object ID. - * @param array $tt_ids An array of term taxonomy IDs. - */ - do_action( 'deleted_term_relationships', $object_id, $taxonomy_tt_ids ); - wp_update_term_count( $taxonomy_tt_ids, $taxonomy ); - } - - return (bool) $deleted; - } - - return false; - } - - /** - * Retrieve the number of users. - * Not supported in this replicastore. - * - * @access public - */ - public function user_count() { - // Noop. - } - - /** - * Retrieve a user object by the user ID. - * - * @access public - * - * @param int $user_id User ID. - * @return \WP_User User object. - */ - public function get_user( $user_id ) { - return \WP_User::get_instance( $user_id ); - } - - /** - * Insert or update a user. - * Not supported in this replicastore. - * - * @access public - * @throws Exception If this method is invoked. - * - * @param \WP_User $user User object. - */ - public function upsert_user( $user ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable - $this->invalid_call(); - } - - /** - * Delete a user. - * Not supported in this replicastore. - * - * @access public - * @throws Exception If this method is invoked. - * - * @param int $user_id User ID. - */ - public function delete_user( $user_id ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable - $this->invalid_call(); - } - - /** - * Update/insert user locale. - * Not supported in this replicastore. - * - * @access public - * @throws Exception If this method is invoked. - * - * @param int $user_id User ID. - * @param string $local The user locale. - */ - public function upsert_user_locale( $user_id, $local ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable - $this->invalid_call(); - } - - /** - * Delete user locale. - * Not supported in this replicastore. - * - * @access public - * @throws Exception If this method is invoked. - * - * @param int $user_id User ID. - */ - public function delete_user_locale( $user_id ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable - $this->invalid_call(); - } - - /** - * Retrieve the user locale. - * - * @access public - * - * @param int $user_id User ID. - * @return string The user locale. - */ - public function get_user_locale( $user_id ) { - return get_user_locale( $user_id ); - } - - /** - * Retrieve the allowed mime types for the user. - * Not supported in this replicastore. - * - * @access public - * - * @param int $user_id User ID. - */ - public function get_allowed_mime_types( $user_id ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable - // Noop. - } - - /** - * Retrieve all the checksums we are interested in. - * Currently that is posts, comments, post meta and comment meta. - * - * @access public - * - * @param boolean $perform_text_conversion If text fields should be latin1 converted. - * - * @return array Checksums. - */ - public function checksum_all( $perform_text_conversion = false ) { - $post_checksum = $this->checksum_histogram( 'posts', null, null, null, null, true, '', false, false, $perform_text_conversion ); - $comments_checksum = $this->checksum_histogram( 'comments', null, null, null, null, true, '', false, false, $perform_text_conversion ); - $post_meta_checksum = $this->checksum_histogram( 'postmeta', null, null, null, null, true, '', false, false, $perform_text_conversion ); - $comment_meta_checksum = $this->checksum_histogram( 'commentmeta', null, null, null, null, true, '', false, false, $perform_text_conversion ); - $terms_checksum = $this->checksum_histogram( 'terms', null, null, null, null, true, '', false, false, $perform_text_conversion ); - $term_relationships_checksum = $this->checksum_histogram( 'term_relationships', null, null, null, null, true, '', false, false, $perform_text_conversion ); - $term_taxonomy_checksum = $this->checksum_histogram( 'term_taxonomy', null, null, null, null, true, '', false, false, $perform_text_conversion ); - - $result = array( - 'posts' => $this->summarize_checksum_histogram( $post_checksum ), - 'comments' => $this->summarize_checksum_histogram( $comments_checksum ), - 'post_meta' => $this->summarize_checksum_histogram( $post_meta_checksum ), - 'comment_meta' => $this->summarize_checksum_histogram( $comment_meta_checksum ), - 'terms' => $this->summarize_checksum_histogram( $terms_checksum ), - 'term_relationships' => $this->summarize_checksum_histogram( $term_relationships_checksum ), - 'term_taxonomy' => $this->summarize_checksum_histogram( $term_taxonomy_checksum ), - ); - - /** - * WooCommerce tables - */ - - /** - * On WordPress.com, we can't directly check if the site has support for WooCommerce. - * Having the option to override the functionality here helps with syncing WooCommerce tables. - * - * @since 10.1 - * - * @param bool If we should we force-enable WooCommerce tables support. - */ - $force_woocommerce_support = apply_filters( 'jetpack_table_checksum_force_enable_woocommerce', false ); - - if ( $force_woocommerce_support || class_exists( 'WooCommerce' ) ) { - /** - * Guard in Try/Catch as it's possible for the WooCommerce class to exist, but - * the tables to not. If we don't do this, the response will be just the exception, without - * returning any valid data. This will prevent us from ever performing a checksum/fix - * for sites like this. - * It's better to just skip the tables in the response, instead of completely failing. - */ - - try { - $woocommerce_order_items_checksum = $this->checksum_histogram( 'woocommerce_order_items' ); - $result['woocommerce_order_items'] = $this->summarize_checksum_histogram( $woocommerce_order_items_checksum ); - } catch ( Exception $ex ) { - $result['woocommerce_order_items'] = null; - } - - try { - $woocommerce_order_itemmeta_checksum = $this->checksum_histogram( 'woocommerce_order_itemmeta' ); - $result['woocommerce_order_itemmeta'] = $this->summarize_checksum_histogram( $woocommerce_order_itemmeta_checksum ); - } catch ( Exception $ex ) { - $result['woocommerce_order_itemmeta'] = null; - } - } - - return $result; - } - - /** - * Return the summarized checksum from buckets or the WP_Error. - * - * @param array $histogram checksum_histogram result. - * - * @return int|WP_Error checksum or Error. - */ - protected function summarize_checksum_histogram( $histogram ) { - if ( is_wp_error( $histogram ) ) { - return $histogram; - } else { - return array_sum( $histogram ); - } - } - - /** - * Grabs the minimum and maximum object ids for the given parameters. - * - * @access public - * - * @param string $id_field The id column in the table to query. - * @param string $object_table The table to query. - * @param string $where A sql where clause without 'WHERE'. - * @param int $bucket_size The maximum amount of objects to include in the query. - * For `term_relationships` table, the bucket size will refer to the amount - * of distinct object ids. This will likely include more database rows than - * the bucket size implies. - * - * @return object An object with min_id and max_id properties. - */ - public function get_min_max_object_id( $id_field, $object_table, $where, $bucket_size ) { - global $wpdb; - - // The term relationship table's unique key is a combination of 2 columns. `DISTINCT` helps us get a more acurate query. - $distinct_sql = ( $wpdb->term_relationships === $object_table ) ? 'DISTINCT' : ''; - $where_sql = $where ? "WHERE $where" : ''; - - // Since MIN() and MAX() do not work with LIMIT, we'll need to adjust the dataset we query if a limit is present. - // With a limit present, we'll look at a dataset consisting of object_ids that meet the constructs of the $where clause. - // Without a limit, we can use the actual table as a dataset. - $from = $bucket_size ? - "( SELECT $distinct_sql $id_field FROM $object_table $where_sql ORDER BY $id_field ASC LIMIT " . ( (int) $bucket_size ) . ' ) as ids' : - "$object_table $where_sql ORDER BY $id_field ASC"; - - return $wpdb->get_row( - // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared - "SELECT MIN($id_field) as min, MAX($id_field) as max FROM $from" - ); - } - - /** - * Retrieve the checksum histogram for a specific object type. - * - * @access public - * - * @param string $table Object type. - * @param null $buckets Number of buckets to split the objects to. - * @param null $start_id Minimum object ID. - * @param null $end_id Maximum object ID. - * @param null $columns Table columns to calculate the checksum from. - * @param bool $strip_non_ascii Whether to strip non-ASCII characters. - * @param string $salt Salt, used for $wpdb->prepare()'s args. - * @param bool $only_range_edges Only return the range edges and not the actual checksums. - * @param bool $detailed_drilldown If the call should return a detailed drilldown for the checksum or only the checksum. - * @param bool $perform_text_conversion If text fields should be converted to latin1 during the checksum calculation. - * - * @return array|WP_Error The checksum histogram. - */ - public function checksum_histogram( $table, $buckets = null, $start_id = null, $end_id = null, $columns = null, $strip_non_ascii = true, $salt = '', $only_range_edges = false, $detailed_drilldown = false, $perform_text_conversion = false ) { - global $wpdb; - - $wpdb->queries = array(); - try { - $checksum_table = $this->get_table_checksum_instance( $table, $salt, $perform_text_conversion, $columns ); - } catch ( Exception $ex ) { - return new WP_Error( 'checksum_disabled', $ex->getMessage() ); - } - - try { - $range_edges = $checksum_table->get_range_edges( $start_id, $end_id ); - } catch ( Exception $ex ) { - return new WP_Error( 'invalid_range_edges', '[' . $start_id . '-' . $end_id . ']: ' . $ex->getMessage() ); - } - - if ( $only_range_edges ) { - return $range_edges; - } - - $object_count = (int) $range_edges['item_count']; - - if ( 0 === $object_count ) { - return array(); - } - - // Validate / Determine Buckets. - if ( $buckets === null || $buckets < 1 ) { - $buckets = $this->calculate_buckets( $table, $object_count ); - } - - $bucket_size = (int) ceil( $object_count / $buckets ); - $previous_max_id = max( 0, $range_edges['min_range'] ); - $histogram = array(); - - do { - try { - $ids_range = $checksum_table->get_range_edges( $previous_max_id, null, $bucket_size ); - } catch ( Exception $ex ) { - return new WP_Error( 'invalid_range_edges', '[' . $previous_max_id . '- ]: ' . $ex->getMessage() ); - } - - if ( empty( $ids_range['min_range'] ) || empty( $ids_range['max_range'] ) ) { - // Nothing to checksum here... - break; - } - - // Get the checksum value. - $batch_checksum = $checksum_table->calculate_checksum( $ids_range['min_range'], $ids_range['max_range'], null, $detailed_drilldown ); - - if ( is_wp_error( $batch_checksum ) ) { - return $batch_checksum; - } - - if ( $ids_range['min_range'] === $ids_range['max_range'] ) { - $histogram[ $ids_range['min_range'] ] = $batch_checksum; - } else { - $histogram[ "{$ids_range[ 'min_range' ]}-{$ids_range[ 'max_range' ]}" ] = $batch_checksum; - } - - $previous_max_id = $ids_range['max_range'] + 1; - // If we've reached the max_range lets bail out. - if ( $previous_max_id > $range_edges['max_range'] ) { - break; - } - } while ( true ); - - return $histogram; - } - - /** - * Retrieve the type of the checksum. - * - * @access public - * - * @return string Type of the checksum. - */ - public function get_checksum_type() { - return 'sum'; - } - - /** - * Used in methods that are not implemented and shouldn't be invoked. - * - * @access private - * @throws Exception If this method is invoked. - */ - private function invalid_call() { - // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_debug_backtrace - $backtrace = debug_backtrace(); - $caller = $backtrace[1]['function']; - throw new Exception( "This function $caller is not supported on the WP Replicastore" ); - } - - /** - * Determine number of buckets to use in full table checksum. - * - * @param string $table Object Type. - * @param int $object_count Object count. - * @return int Number of Buckets to use. - */ - private function calculate_buckets( $table, $object_count ) { - // Ensure no division by 0. - if ( 0 === (int) $object_count ) { - return 1; - } - - // Default Bucket sizes. - $bucket_size = 10000; // Default bucket size is 10,000 items. - switch ( $table ) { - case 'postmeta': - case 'commentmeta': - case 'order_itemmeta': - $bucket_size = 1000; // Meta bucket size is restricted to 1000 items. - } - - return (int) ceil( $object_count / $bucket_size ); - } - - /** - * Return an instance for `Table_Checksum`, depending on the table. - * - * Some tables require custom instances, due to different checksum logic. - * - * @param string $table The table that we want to get the instance for. - * @param string $salt Salt to be used when generating the checksums. - * @param bool $perform_text_conversion Should we perform text encoding conversion when calculating the checksum. - * @param array $additional_columns Additional columns to add to the checksum calculation. - * - * @return Table_Checksum|Table_Checksum_Usermeta - * @throws Exception Might throw an exception if any of the input parameters were invalid. - */ - public function get_table_checksum_instance( $table, $salt = null, $perform_text_conversion = false, $additional_columns = null ) { - if ( 'users' === $table ) { - return new Table_Checksum_Users( $table, $salt, $perform_text_conversion, $additional_columns ); - } - if ( 'usermeta' === $table ) { - return new Table_Checksum_Usermeta( $table, $salt, $perform_text_conversion, $additional_columns ); - } - - return new Table_Checksum( $table, $salt, $perform_text_conversion, $additional_columns ); - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-rest-endpoints.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-rest-endpoints.php deleted file mode 100644 index ec389569..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-rest-endpoints.php +++ /dev/null @@ -1,880 +0,0 @@ - WP_REST_Server::EDITABLE, - 'callback' => __CLASS__ . '::full_sync_start', - 'permission_callback' => __CLASS__ . '::verify_default_permissions', - 'args' => array( - 'modules' => array( - 'description' => __( 'Data Modules that should be included in Full Sync', 'jetpack-sync' ), - 'type' => 'array', - 'required' => false, - ), - 'users' => array( - 'description' => __( 'User IDs to include in Full Sync or "initial"', 'jetpack-sync' ), - 'required' => false, - ), - 'posts' => array( - 'description' => __( 'Post IDs to include in Full Sync', 'jetpack-sync' ), - 'type' => 'array', - 'required' => false, - ), - 'comments' => array( - 'description' => __( 'Comment IDs to include in Full Sync', 'jetpack-sync' ), - 'type' => 'array', - 'required' => false, - ), - ), - ) - ); - - // Obtain Sync status. - register_rest_route( - 'jetpack/v4', - '/sync/status', - array( - 'methods' => WP_REST_Server::READABLE, - 'callback' => __CLASS__ . '::sync_status', - 'permission_callback' => __CLASS__ . '::verify_default_permissions', - 'args' => array( - 'fields' => array( - 'description' => __( 'Comma seperated list of additional fields that should be included in status.', 'jetpack-sync' ), - 'type' => 'string', - 'required' => false, - ), - ), - ) - ); - - // Update Sync health status. - register_rest_route( - 'jetpack/v4', - '/sync/health', - array( - 'methods' => WP_REST_Server::EDITABLE, - 'callback' => __CLASS__ . '::sync_health', - 'permission_callback' => __CLASS__ . '::verify_default_permissions', - 'args' => array( - 'status' => array( - 'description' => __( 'New Sync health status', 'jetpack-sync' ), - 'type' => 'string', - 'required' => true, - ), - ), - ) - ); - - // Obtain Sync settings. - register_rest_route( - 'jetpack/v4', - '/sync/settings', - array( - array( - 'methods' => WP_REST_Server::READABLE, - 'callback' => __CLASS__ . '::get_sync_settings', - 'permission_callback' => __CLASS__ . '::verify_default_permissions', - ), - array( - 'methods' => WP_REST_Server::EDITABLE, - 'callback' => __CLASS__ . '::update_sync_settings', - 'permission_callback' => __CLASS__ . '::verify_default_permissions', - ), - ) - ); - - // Retrieve Sync Object(s). - register_rest_route( - 'jetpack/v4', - '/sync/object', - array( - 'methods' => WP_REST_Server::ALLMETHODS, - 'callback' => __CLASS__ . '::get_sync_objects', - 'permission_callback' => __CLASS__ . '::verify_default_permissions', - 'args' => array( - 'module_name' => array( - 'description' => __( 'Name of Sync module', 'jetpack-sync' ), - 'type' => 'string', - 'required' => false, - ), - 'object_type' => array( - 'description' => __( 'Object Type', 'jetpack-sync' ), - 'type' => 'string', - 'required' => false, - ), - 'object_ids' => array( - 'description' => __( 'Objects Identifiers', 'jetpack-sync' ), - 'type' => 'array', - 'required' => false, - ), - ), - ) - ); - - // Retrieve Sync Object(s). - register_rest_route( - 'jetpack/v4', - '/sync/now', - array( - 'methods' => WP_REST_Server::EDITABLE, - 'callback' => __CLASS__ . '::do_sync', - 'permission_callback' => __CLASS__ . '::verify_default_permissions', - 'args' => array( - 'queue' => array( - 'description' => __( 'Name of Sync queue.', 'jetpack-sync' ), - 'type' => 'string', - 'required' => true, - ), - ), - ) - ); - - // Checkout Sync Objects. - register_rest_route( - 'jetpack/v4', - '/sync/checkout', - array( - 'methods' => WP_REST_Server::EDITABLE, - 'callback' => __CLASS__ . '::checkout', - 'permission_callback' => __CLASS__ . '::verify_default_permissions', - ) - ); - - // Checkin Sync Objects. - register_rest_route( - 'jetpack/v4', - '/sync/close', - array( - 'methods' => WP_REST_Server::EDITABLE, - 'callback' => __CLASS__ . '::close', - 'permission_callback' => __CLASS__ . '::verify_default_permissions', - ) - ); - - // Unlock Sync Queue. - register_rest_route( - 'jetpack/v4', - '/sync/unlock', - array( - 'methods' => WP_REST_Server::EDITABLE, - 'callback' => __CLASS__ . '::unlock_queue', - 'permission_callback' => __CLASS__ . '::verify_default_permissions', - 'args' => array( - 'queue' => array( - 'description' => __( 'Name of Sync queue.', 'jetpack-sync' ), - 'type' => 'string', - 'required' => true, - ), - ), - ) - ); - - // Retrieve range of Object Ids. - register_rest_route( - 'jetpack/v4', - '/sync/object-id-range', - array( - 'methods' => WP_REST_Server::READABLE, - 'callback' => __CLASS__ . '::get_object_id_range', - 'permission_callback' => __CLASS__ . '::verify_default_permissions', - 'args' => array( - 'sync_module' => array( - 'description' => __( 'Name of Sync module.', 'jetpack-sync' ), - 'type' => 'string', - 'required' => true, - ), - 'batch_size' => array( - 'description' => __( 'Size of batches', 'jetpack-sync' ), - 'type' => 'int', - 'required' => true, - ), - ), - ) - ); - - // Obtain table checksums. - register_rest_route( - 'jetpack/v4', - '/sync/data-check', - array( - 'methods' => WP_REST_Server::READABLE, - 'callback' => __CLASS__ . '::data_check', - 'permission_callback' => __CLASS__ . '::verify_default_permissions', - 'args' => array( - 'perform_text_conversion' => array( - 'description' => __( 'If text fields should be converted to latin1 in checksum calculation.', 'jetpack-sync' ), - 'type' => 'boolean', - 'required' => false, - ), - ), - ) - ); - - // Obtain histogram. - register_rest_route( - 'jetpack/v4', - '/sync/data-histogram', - array( - 'methods' => WP_REST_Server::EDITABLE, - 'callback' => __CLASS__ . '::data_histogram', - 'permission_callback' => __CLASS__ . '::verify_default_permissions', - 'args' => array( - 'columns' => array( - 'description' => __( 'Column mappings', 'jetpack-sync' ), - 'type' => 'array', - 'required' => false, - ), - 'object_type' => array( - 'description' => __( 'Object Type', 'jetpack-sync' ), - 'type' => 'string', - 'required' => false, - ), - 'buckets' => array( - 'description' => __( 'Number of histogram buckets.', 'jetpack-sync' ), - 'type' => 'int', - 'required' => false, - ), - 'start_id' => array( - 'description' => __( 'Start ID for the histogram', 'jetpack-sync' ), - 'type' => 'int', - 'required' => false, - ), - 'end_id' => array( - 'description' => __( 'End ID for the histogram', 'jetpack-sync' ), - 'type' => 'int', - 'required' => false, - ), - 'strip_non_ascii' => array( - 'description' => __( 'Strip non-ascii characters?', 'jetpack-sync' ), - 'type' => 'boolean', - 'required' => false, - ), - 'shared_salt' => array( - 'description' => __( 'Shared Salt to use when generating checksum', 'jetpack-sync' ), - 'type' => 'string', - 'required' => false, - ), - 'only_range_edges' => array( - 'description' => __( 'Should only range endges be returned', 'jetpack-sync' ), - 'type' => 'boolean', - 'required' => false, - ), - 'detailed_drilldown' => array( - 'description' => __( 'Do we want the checksum or object ids.', 'jetpack-sync' ), - 'type' => 'boolean', - 'required' => false, - ), - 'perform_text_conversion' => array( - 'description' => __( 'If text fields should be converted to latin1 in checksum calculation.', 'jetpack-sync' ), - 'type' => 'boolean', - 'required' => false, - ), - ), - ) - ); - - // Trigger Dedicated Sync request. - register_rest_route( - 'jetpack/v4', - '/sync/spawn-sync', - array( - 'methods' => WP_REST_Server::READABLE, - 'callback' => __CLASS__ . '::spawn_sync', - 'permission_callback' => '__return_true', - ) - ); - - // Reset Sync locks. - register_rest_route( - 'jetpack/v4', - '/sync/locks', - array( - 'methods' => WP_REST_Server::DELETABLE, - 'callback' => __CLASS__ . '::reset_locks', - 'permission_callback' => __CLASS__ . '::verify_default_permissions', - ) - ); - } - - /** - * Trigger a Full Sync of specified modules. - * - * @since 1.23.1 - * - * @param \WP_REST_Request $request The request sent to the WP REST API. - * - * @return \WP_REST_Response|WP_Error - */ - public static function full_sync_start( $request ) { - - $modules = $request->get_param( 'modules' ); - - // convert list of modules into array format of "$modulename => true". - if ( ! empty( $modules ) ) { - $modules = array_map( '__return_true', array_flip( $modules ) ); - } - - // Process additional options. - foreach ( array( 'posts', 'comments', 'users' ) as $module_name ) { - if ( 'users' === $module_name && 'initial' === $request->get_param( 'users' ) ) { - $modules['users'] = 'initial'; - } elseif ( is_array( $request->get_param( $module_name ) ) ) { - $ids = $request->get_param( $module_name ); - if ( array() !== $ids ) { - $modules[ $module_name ] = $ids; - } - } - } - - if ( empty( $modules ) ) { - $modules = null; - } - - return rest_ensure_response( - array( - 'scheduled' => Actions::do_full_sync( $modules ), - ) - ); - } - - /** - * Return Sync's status. - * - * @since 1.23.1 - * - * @param \WP_REST_Request $request The request sent to the WP REST API. - * - * @return \WP_REST_Response - */ - public static function sync_status( $request ) { - $fields = $request->get_param( 'fields' ); - return rest_ensure_response( Actions::get_sync_status( $fields ) ); - } - - /** - * Return table checksums. - * - * @since 1.23.1 - * - * @param \WP_REST_Request $request The request sent to the WP REST API. - * - * @return \WP_REST_Response - */ - public static function data_check( $request ) { - // Disable Sync during this call, so we can resolve faster. - Actions::mark_sync_read_only(); - $store = new Replicastore(); - - $perform_text_conversion = false; - if ( true === $request->get_param( 'perform_text_conversion' ) ) { - $perform_text_conversion = true; - } - - return rest_ensure_response( $store->checksum_all( $perform_text_conversion ) ); - } - - /** - * Return Histogram. - * - * @since 1.23.1 - * - * @param \WP_REST_Request $request The request sent to the WP REST API. - * - * @return \WP_REST_Response - */ - public static function data_histogram( $request ) { - - // Disable Sync during this call, so we can resolve faster. - Actions::mark_sync_read_only(); - - $args = $request->get_params(); - - if ( empty( $args['columns'] ) ) { - $args['columns'] = null; // go with defaults. - } - - if ( false !== $args['strip_non_ascii'] ) { - $args['strip_non_ascii'] = true; - } - - if ( true !== $args['perform_text_conversion'] ) { - $args['perform_text_conversion'] = false; - } - - /** - * Hack: nullify the values of `start_id` and `end_id` if we're only requesting ranges. - * - * The endpoint doesn't support nullable values :( - */ - if ( true === $args['only_range_edges'] ) { - if ( 0 === $args['start_id'] ) { - $args['start_id'] = null; - } - - if ( 0 === $args['end_id'] ) { - $args['end_id'] = null; - } - } - - $store = new Replicastore(); - $histogram = $store->checksum_histogram( $args['object_type'], $args['buckets'], $args['start_id'], $args['end_id'], $args['columns'], $args['strip_non_ascii'], $args['shared_salt'], $args['only_range_edges'], $args['detailed_drilldown'], $args['perform_text_conversion'] ); - - return rest_ensure_response( - array( - 'histogram' => $histogram, - 'type' => $store->get_checksum_type(), - ) - ); - } - - /** - * Update Sync health. - * - * @since 1.23.1 - * - * @param \WP_REST_Request $request The request sent to the WP REST API. - * - * @return \WP_REST_Response - */ - public static function sync_health( $request ) { - - switch ( $request->get_param( 'status' ) ) { - case Health::STATUS_IN_SYNC: - case Health::STATUS_OUT_OF_SYNC: - Health::update_status( $request->get_param( 'status' ) ); - break; - default: - return new WP_Error( 'invalid_status', 'Invalid Sync Status Provided.' ); - } - - // re-fetch so we see what's really being stored. - return rest_ensure_response( - array( - 'success' => Health::get_status(), - ) - ); - } - - /** - * Obtain Sync settings. - * - * @since 1.23.1 - * - * @return \WP_REST_Response - */ - public static function get_sync_settings() { - return rest_ensure_response( Settings::get_settings() ); - } - - /** - * Update Sync settings. - * - * @since 1.23.1 - * - * @param \WP_REST_Request $request The request sent to the WP REST API. - * - * @return \WP_REST_Response - */ - public static function update_sync_settings( $request ) { - $args = $request->get_params(); - $sync_settings = Settings::get_settings(); - - foreach ( $args as $key => $value ) { - if ( false !== $value ) { - if ( is_numeric( $value ) ) { - $value = (int) $value; - } - - // special case for sending empty arrays - a string with value 'empty'. - if ( 'empty' === $value ) { - $value = array(); - } - - $sync_settings[ $key ] = $value; - } - } - - Settings::update_settings( $sync_settings ); - - // re-fetch so we see what's really being stored. - return rest_ensure_response( Settings::get_settings() ); - } - - /** - * Retrieve Sync Objects. - * - * @since 1.23.1 - * - * @param \WP_REST_Request $request The request sent to the WP REST API. - * - * @return \WP_REST_Response - */ - public static function get_sync_objects( $request ) { - $args = $request->get_params(); - - $module_name = $args['module_name']; - // Verify valid Sync Module. - $sync_module = Modules::get_module( $module_name ); - if ( ! $sync_module ) { - return new WP_Error( 'invalid_module', 'You specified an invalid sync module' ); - } - - Actions::mark_sync_read_only(); - - $codec = Sender::get_instance()->get_codec(); - Settings::set_is_syncing( true ); - $objects = $codec->encode( $sync_module->get_objects_by_id( $args['object_type'], $args['object_ids'] ) ); - Settings::set_is_syncing( false ); - - return rest_ensure_response( - array( - 'objects' => $objects, - 'codec' => $codec->name(), - ) - ); - } - - /** - * Request Sync processing. - * - * @since 1.23.1 - * - * @param \WP_REST_Request $request The request sent to the WP REST API. - * - * @return \WP_REST_Response - */ - public static function do_sync( $request ) { - - $queue_name = self::validate_queue( $request->get_param( 'queue' ) ); - if ( is_wp_error( $queue_name ) ) { - return $queue_name; - } - - $sender = Sender::get_instance(); - $response = $sender->do_sync_for_queue( new Queue( $queue_name ) ); - - return rest_ensure_response( - array( - 'response' => $response, - ) - ); - } - - /** - * Request sync data from specified queue. - * - * @since 1.23.1 - * - * @param \WP_REST_Request $request The request sent to the WP REST API. - * - * @return \WP_REST_Response - */ - public static function checkout( $request ) { - $args = $request->get_params(); - $queue_name = self::validate_queue( $args['queue'] ); - - if ( is_wp_error( $queue_name ) ) { - return $queue_name; - } - - $number_of_items = $args['number_of_items']; - if ( $number_of_items < 1 || $number_of_items > 100 ) { - return new WP_Error( 'invalid_number_of_items', 'Number of items needs to be an integer that is larger than 0 and less then 100', 400 ); - } - - // REST Sender. - $sender = new REST_Sender(); - - if ( 'immediate' === $queue_name ) { - return rest_ensure_response( $sender->immediate_full_sync_pull( $number_of_items ) ); - } - - $response = $sender->queue_pull( $queue_name, $number_of_items, $args ); - // Disable sending while pulling. - if ( ! is_wp_error( $response ) ) { - set_transient( Sender::TEMP_SYNC_DISABLE_TRANSIENT_NAME, time(), Sender::TEMP_SYNC_DISABLE_TRANSIENT_EXPIRY ); - } elseif ( 'queue_size' === $response->get_error_code() ) { - // Re-enable sending if the queue is empty. - delete_transient( Sender::TEMP_SYNC_DISABLE_TRANSIENT_NAME ); - } - - return rest_ensure_response( $response ); - } - - /** - * Unlock a Sync queue. - * - * @since 1.23.1 - * - * @param \WP_REST_Request $request The request sent to the WP REST API. - * - * @return \WP_REST_Response - */ - public static function unlock_queue( $request ) { - - $queue_name = $request->get_param( 'queue' ); - - if ( ! in_array( $queue_name, array( 'sync', 'full_sync' ), true ) ) { - return new WP_Error( 'invalid_queue', 'Queue name should be sync or full_sync', 400 ); - } - $queue = new Queue( $queue_name ); - - // False means that there was no lock to delete. - $response = $queue->unlock(); - return rest_ensure_response( - array( - 'success' => $response, - ) - ); - } - - /** - * Checkin Sync actions. - * - * @since 1.23.1 - * - * @param \WP_REST_Request $request The request sent to the WP REST API. - * - * @return \WP_REST_Response - */ - public static function close( $request ) { - - $request_body = $request->get_params(); - $queue_name = self::validate_queue( $request_body['queue'] ); - - if ( is_wp_error( $queue_name ) ) { - return $queue_name; - } - - if ( empty( $request_body['buffer_id'] ) ) { - return new WP_Error( 'missing_buffer_id', 'Please provide a buffer id', 400 ); - } - - if ( ! is_array( $request_body['item_ids'] ) ) { - return new WP_Error( 'missing_item_ids', 'Please provide a list of item ids in the item_ids argument', 400 ); - } - - // Limit to A-Z,a-z,0-9,_,- . - $request_body['buffer_id'] = preg_replace( '/[^A-Za-z0-9\-_\.]/', '', $request_body['buffer_id'] ); - $request_body['item_ids'] = array_filter( array_map( array( 'Automattic\Jetpack\Sync\REST_Endpoints', 'sanitize_item_ids' ), $request_body['item_ids'] ) ); - - $queue = new Queue( $queue_name ); - - $items = $queue->peek_by_id( $request_body['item_ids'] ); - - // Update Full Sync Status if queue is "full_sync". - if ( 'full_sync' === $queue_name ) { - $full_sync_module = Modules::get_module( 'full-sync' ); - $full_sync_module->update_sent_progress_action( $items ); - } - - $buffer = new Queue_Buffer( $request_body['buffer_id'], $request_body['item_ids'] ); - $response = $queue->close( $buffer, $request_body['item_ids'] ); - - // Perform another checkout? - if ( isset( $request_body['continue'] ) && $request_body['continue'] ) { - if ( in_array( $queue_name, array( 'full_sync', 'immediate' ), true ) ) { - // Send Full Sync Actions. - Sender::get_instance()->do_full_sync(); - } elseif ( $queue->has_any_items() ) { - // Send Incremental Sync Actions. - Sender::get_instance()->do_sync(); - } - } - - if ( is_wp_error( $response ) ) { - return $response; - } - - return rest_ensure_response( - array( - 'success' => $response, - 'status' => Actions::get_sync_status(), - ) - ); - } - - /** - * Retrieve range of Object Ids for a specified Sync module. - * - * @since 1.23.1 - * - * @param \WP_REST_Request $request The request sent to the WP REST API. - * - * @return \WP_REST_Response - */ - public static function get_object_id_range( $request ) { - - $module_name = $request->get_param( 'sync_module' ); - $batch_size = $request->get_param( 'batch_size' ); - - if ( ! self::is_valid_sync_module( $module_name ) ) { - return new WP_Error( 'invalid_module', 'This sync module cannot be used to calculate a range.', 400 ); - } - $module = Modules::get_module( $module_name ); - - return rest_ensure_response( - array( - 'ranges' => $module->get_min_max_object_ids_for_batches( $batch_size ), - ) - ); - } - - /** - * This endpoint is used by Sync to spawn a - * dedicated Sync request which will trigger Sync to run. - * - * If Dedicated Sync is enabled, this callback should never run as - * processing of Sync actions will occur earlier and exit. - * - * @see Actions::init - * @see Sender::do_dedicated_sync_and_exit - * - * @since $$next_version$$ - * - * @return \WP_REST_Response - */ - public static function spawn_sync() { - nocache_headers(); - - if ( ! Settings::is_dedicated_sync_enabled() ) { - return new WP_Error( - 'dedicated_sync_disabled', - 'Dedicated Sync flow is disabled.', - array( 'status' => 422 ) - ); - } - - return new WP_Error( - 'dedicated_sync_failed', - 'Failed to process Dedicated Sync request', - array( 'status' => 500 ) - ); - } - - /** - * Reset Sync locks. - * - * @since 1.43.0 - * - * @return \WP_REST_Response - */ - public static function reset_locks() { - Actions::reset_sync_locks(); - - return rest_ensure_response( - array( - 'success' => true, - ) - ); - } - - /** - * Verify that request has default permissions to perform sync actions. - * - * @since 1.23.1 - * - * @return bool Whether user has capability 'manage_options' or a blog token is used. - */ - public static function verify_default_permissions() { - if ( current_user_can( 'manage_options' ) || Rest_Authentication::is_signed_with_blog_token() ) { - return true; - } - - $error_msg = esc_html__( - 'You do not have the correct user permissions to perform this action. - Please contact your site admin if you think this is a mistake.', - 'jetpack-sync' - ); - - return new WP_Error( 'invalid_user_permission_sync', $error_msg, array( 'status' => rest_authorization_required_code() ) ); - } - - /** - * Validate Queue name. - * - * @param string $value Queue Name. - * - * @return WP_Error - */ - protected static function validate_queue( $value ) { - if ( ! isset( $value ) ) { - return new WP_Error( 'invalid_queue', 'Queue name is required', 400 ); - } - - if ( ! in_array( $value, array( 'sync', 'full_sync', 'immediate' ), true ) ) { - return new WP_Error( 'invalid_queue', 'Queue name should be sync, full_sync or immediate', 400 ); - } - return $value; - } - - /** - * Validate name is a valid Sync module. - * - * @param string $module_name Name of Sync Module. - * - * @return bool - */ - protected static function is_valid_sync_module( $module_name ) { - return in_array( - $module_name, - array( - 'comments', - 'posts', - 'terms', - 'term_relationships', - 'users', - ), - true - ); - } - - /** - * Sanitize Item Ids. - * - * @param string $item Sync item identifier. - * - * @return string|string[]|null - */ - protected static function sanitize_item_ids( $item ) { - // lets not delete any options that don't start with jpsq_sync- . - if ( ! is_string( $item ) || ! str_starts_with( $item, 'jpsq_' ) ) { - return null; - } - // Limit to A-Z,a-z,0-9,_,-,. . - return preg_replace( '/[^A-Za-z0-9-_.]/', '', $item ); - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-rest-sender.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-rest-sender.php deleted file mode 100644 index 5ceb0b85..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-rest-sender.php +++ /dev/null @@ -1,143 +0,0 @@ -size() ) { - return new WP_Error( 'queue_size', 'The queue is empty and there is nothing to send', 400 ); - } - - $sender = Sender::get_instance(); - - // try to give ourselves as much time as possible. - set_time_limit( 0 ); - - if ( ! empty( $args['pop'] ) ) { - $buffer = new Queue_Buffer( 'pop', $queue->pop( $number_of_items ) ); - } else { - // let's delete the checkin state. - if ( $args['force'] ) { - $queue->unlock(); - } - $buffer = $this->get_buffer( $queue, $number_of_items ); - } - // Check that the $buffer is not checkout out already. - if ( is_wp_error( $buffer ) ) { - return new WP_Error( 'buffer_open', "We couldn't get the buffer it is currently checked out", 400 ); - } - - if ( ! is_object( $buffer ) ) { - return new WP_Error( 'buffer_non-object', 'Buffer is not an object', 400 ); - } - - $encode = isset( $args['encode'] ) ? $args['encode'] : true; - - Settings::set_is_syncing( true ); - list( $items_to_send, $skipped_items_ids ) = $sender->get_items_to_send( $buffer, $encode ); - Settings::set_is_syncing( false ); - - return array( - 'buffer_id' => $buffer->id, - 'items' => $items_to_send, - 'skipped_items' => $skipped_items_ids, - 'codec' => $encode ? $sender->get_codec()->name() : null, - 'sent_timestamp' => time(), - ); - } - - /** - * Adds Sync items to local property. - */ - public function jetpack_sync_send_data_listener() { - foreach ( func_get_args()[0] as $key => $item ) { - $this->items[ $key ] = $item; - } - } - - /** - * Check out a buffer of full sync actions. - * - * @return array Sync Actions to be returned to requestor - */ - public function immediate_full_sync_pull() { - // try to give ourselves as much time as possible. - set_time_limit( 0 ); - - $original_send_data_cb = array( 'Automattic\Jetpack\Sync\Actions', 'send_data' ); - $temp_send_data_cb = array( $this, 'jetpack_sync_send_data_listener' ); - - Sender::get_instance()->set_enqueue_wait_time( 0 ); - remove_filter( 'jetpack_sync_send_data', $original_send_data_cb ); - add_filter( 'jetpack_sync_send_data', $temp_send_data_cb, 10, 6 ); - Sender::get_instance()->do_full_sync(); - remove_filter( 'jetpack_sync_send_data', $temp_send_data_cb ); - add_filter( 'jetpack_sync_send_data', $original_send_data_cb, 10, 6 ); - - return array( - 'items' => $this->items, - 'codec' => Sender::get_instance()->get_codec()->name(), - 'sent_timestamp' => time(), - 'status' => Actions::get_sync_status(), - ); - } - - /** - * Checkout items out of the sync queue. - * - * @param Queue $queue Sync Queue. - * @param int $number_of_items Number of items to checkout. - * - * @return WP_Error - */ - protected function get_buffer( $queue, $number_of_items ) { - $start = time(); - $max_duration = 5; // this will try to get the buffer. - - $buffer = $queue->checkout( $number_of_items ); - $duration = time() - $start; - - while ( is_wp_error( $buffer ) && $duration < $max_duration ) { - sleep( 2 ); - $duration = time() - $start; - $buffer = $queue->checkout( $number_of_items ); - } - - if ( false === $buffer ) { - return new WP_Error( 'queue_size', 'The queue is empty and there is nothing to send', 400 ); - } - - return $buffer; - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-sender.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-sender.php deleted file mode 100644 index d91a3da8..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-sender.php +++ /dev/null @@ -1,1029 +0,0 @@ -:( - * - * @access protected - * @static - */ - protected function __construct() { - $this->set_defaults(); - $this->init(); - } - - /** - * Initialize the sender. - * Prepares the current user and initializes all sync modules. - * - * @access private - */ - private function init() { - add_action( 'jetpack_sync_before_send_queue_sync', array( $this, 'maybe_set_user_from_token' ), 1 ); - add_action( 'jetpack_sync_before_send_queue_sync', array( $this, 'maybe_clear_user_from_token' ), 20 ); - add_filter( 'jetpack_xmlrpc_unauthenticated_methods', array( $this, 'register_jetpack_xmlrpc_methods' ) ); - foreach ( Modules::get_modules() as $module ) { - $module->init_before_send(); - } - } - - /** - * Detect if this is a XMLRPC request with a valid signature. - * If so, changes the user to the new one. - * - * @access public - */ - public function maybe_set_user_from_token() { - $connection = new Manager(); - $verified_user = $connection->verify_xml_rpc_signature(); - if ( Constants::is_true( 'XMLRPC_REQUEST' ) && - ! is_wp_error( $verified_user ) - && $verified_user - ) { - $old_user = wp_get_current_user(); - $this->old_user = isset( $old_user->ID ) ? $old_user->ID : 0; - wp_set_current_user( $verified_user['user_id'] ); - } - } - - /** - * If we used to have a previous current user, revert back to it. - * - * @access public - */ - public function maybe_clear_user_from_token() { - if ( isset( $this->old_user ) ) { - wp_set_current_user( $this->old_user ); - } - } - - /** - * Retrieve the next sync time. - * - * Update @since 1.43.2 - * Sometimes when we process Sync requests in Jetpack, the server clock can be a - * bit in the future and this can lock Sync to not send stuff for a while. - * We are introducing an extra check, to make sure to limit the next_sync_time - * to be at most one hour in the future from the current time. - * - * @access public - * - * @param string $queue_name Name of the queue. - * @return float Timestamp of the next sync. - */ - public function get_next_sync_time( $queue_name ) { - $option_name = self::NEXT_SYNC_TIME_OPTION_NAME . '_' . $queue_name; - $next_sync_time = (float) get_option( $option_name, 0 ); - - $is_more_than_one_hour = ( $next_sync_time - microtime( true ) ) >= HOUR_IN_SECONDS; - - if ( $is_more_than_one_hour ) { - delete_option( $option_name ); - $next_sync_time = 0; - } - - return $next_sync_time; - } - - /** - * Set the next sync time. - * - * @access public - * - * @param int $time Timestamp of the next sync. - * @param string $queue_name Name of the queue. - * @return boolean True if update was successful, false otherwise. - */ - public function set_next_sync_time( $time, $queue_name ) { - return update_option( self::NEXT_SYNC_TIME_OPTION_NAME . '_' . $queue_name, $time, true ); - } - - /** - * Trigger a full sync. - * - * @access public - * - * @return boolean|WP_Error True if this sync sending was successful, error object otherwise. - */ - public function do_full_sync() { - $sync_module = Modules::get_module( 'full-sync' ); - if ( ! $sync_module ) { - return; - } - // Full Sync Disabled. - if ( ! Settings::get_setting( 'full_sync_sender_enabled' ) ) { - return; - } - - // Don't sync if request is marked as read only. - if ( Constants::is_true( 'JETPACK_SYNC_READ_ONLY' ) ) { - return new WP_Error( 'jetpack_sync_read_only' ); - } - - // Sync not started or Sync finished. - $status = $sync_module->get_status(); - if ( false === $status['started'] || ( ! empty( $status['started'] ) && ! empty( $status['finished'] ) ) ) { - return false; - } - - $this->continue_full_sync_enqueue(); - // immediate full sync sends data in continue_full_sync_enqueue. - if ( ! str_contains( get_class( $sync_module ), 'Full_Sync_Immediately' ) ) { - return $this->do_sync_and_set_delays( $this->full_sync_queue ); - } else { - $status = $sync_module->get_status(); - // Sync not started or Sync finished. - if ( false === $status['started'] || ( ! empty( $status['started'] ) && ! empty( $status['finished'] ) ) ) { - return false; - } else { - return true; - } - } - } - - /** - * Enqueue the next sync items for sending. - * Will not be done if the current request is a WP import one. - * Will be delayed until the next sync time comes. - * - * @access private - */ - private function continue_full_sync_enqueue() { - if ( defined( 'WP_IMPORTING' ) && WP_IMPORTING ) { - return false; - } - - if ( $this->get_next_sync_time( 'full-sync-enqueue' ) > microtime( true ) ) { - return false; - } - - Modules::get_module( 'full-sync' )->continue_enqueuing(); - - $this->set_next_sync_time( time() + $this->get_enqueue_wait_time(), 'full-sync-enqueue' ); - } - - /** - * Trigger incremental sync. - * - * @access public - * - * @return boolean|WP_Error True if this sync sending was successful, error object otherwise. - */ - public function do_sync() { - if ( ! Settings::is_dedicated_sync_enabled() ) { - $result = $this->do_sync_and_set_delays( $this->sync_queue ); - } else { - $result = Dedicated_Sender::spawn_sync( $this->sync_queue ); - } - - return $result; - } - - /** - * Trigger incremental sync and early exit on Dedicated Sync request. - * - * @access public - * - * @param bool $do_real_exit If we should exit at the end of the request. We should by default. - * In the context of running this in the REST API, we actually want to return an error. - * - * @return void|WP_Error - */ - public function do_dedicated_sync_and_exit( $do_real_exit = true ) { - nocache_headers(); - - if ( ! Settings::is_dedicated_sync_enabled() ) { - return new WP_Error( 'dedicated_sync_disabled', 'Dedicated Sync flow is disabled.' ); - } - - if ( ! Dedicated_Sender::is_dedicated_sync_request() ) { - return new WP_Error( 'non_dedicated_sync_request', 'Not a Dedicated Sync request.' ); - } - - /** - * Output an `OK` to show that Dedicated Sync is enabled and we can process events. - * This is used to test the feature is working. - * - * @see \Automattic\Jetpack\Sync\Dedicated_Sender::can_spawn_dedicated_sync_request - */ - // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped - echo Dedicated_Sender::DEDICATED_SYNC_VALIDATION_STRING; - - // Try to disconnect the request as quickly as possible and process things in the background. - $this->fastcgi_finish_request(); - - /** - * Close the PHP session to free up the server threads to handle other requests while we - * send sync data with Dedicated Sync. - * - * When we spawn Dedicated Sync, we send `$_COOKIES` with the request to help out with any - * firewall and/or caching functionality that might prevent us to ping the site directly. - * - * This will cause Dedicated Sync to reuse the visitor's PHP session and lock it until the - * request finishes, which can take anywhere from 1 to 30+ seconds, depending on the server - * `max_execution_time` configuration. - * - * By closing the session we're freeing up the session, so other requests can acquire the - * lock and proceed with their own tasks. - */ - if ( session_status() === PHP_SESSION_ACTIVE ) { - session_write_close(); - } - - // Output not used right now. Try to release dedicated sync lock - Dedicated_Sender::try_release_lock_spawn_request(); - - // Actually try to send Sync events. - $result = $this->do_sync_and_set_delays( $this->sync_queue ); - - // If no errors occurred, re-spawn a dedicated Sync request. - if ( true === $result ) { - Dedicated_Sender::spawn_sync( $this->sync_queue ); - } - - if ( $do_real_exit ) { - exit; - } - } - - /** - * Trigger sync for a certain sync queue. - * Responsible for setting next sync time. - * Will not be delayed if the current request is a WP import one. - * Will be delayed until the next sync time comes. - * - * @access public - * - * @param Automattic\Jetpack\Sync\Queue $queue Queue object. - * - * @return boolean|WP_Error True if this sync sending was successful, error object otherwise. - */ - public function do_sync_and_set_delays( $queue ) { - // Don't sync if importing. - if ( defined( 'WP_IMPORTING' ) && WP_IMPORTING ) { - return new WP_Error( 'is_importing' ); - } - - // Don't sync if request is marked as read only. - if ( Constants::is_true( 'JETPACK_SYNC_READ_ONLY' ) ) { - return new WP_Error( 'jetpack_sync_read_only' ); - } - - if ( ! Settings::is_sender_enabled( $queue->id ) ) { - return new WP_Error( 'sender_disabled_for_queue_' . $queue->id ); - } - - if ( get_transient( self::TEMP_SYNC_DISABLE_TRANSIENT_NAME ) ) { - return new WP_Error( 'sender_temporarily_disabled_while_pulling' ); - } - - // Return early if we've gotten a retry-after header response. - $retry_time = get_option( Actions::RETRY_AFTER_PREFIX . $queue->id ); - if ( $retry_time ) { - // If expired update to false but don't send. Send will occurr in new request to avoid race conditions. - if ( microtime( true ) > $retry_time ) { - update_option( Actions::RETRY_AFTER_PREFIX . $queue->id, false, false ); - } - return new WP_Error( 'retry_after' ); - } - - // Don't sync if we are throttled. - if ( $this->get_next_sync_time( $queue->id ) > microtime( true ) ) { - return new WP_Error( 'sync_throttled' ); - } - - $start_time = microtime( true ); - - Settings::set_is_syncing( true ); - - $sync_result = $this->do_sync_for_queue( $queue ); - - Settings::set_is_syncing( false ); - - $exceeded_sync_wait_threshold = ( microtime( true ) - $start_time ) > (float) $this->get_sync_wait_threshold(); - - if ( is_wp_error( $sync_result ) ) { - if ( 'unclosed_buffer' === $sync_result->get_error_code() ) { - $this->set_next_sync_time( time() + self::QUEUE_LOCKED_SYNC_DELAY, $queue->id ); - } - if ( 'wpcom_error' === $sync_result->get_error_code() ) { - $this->set_next_sync_time( time() + self::WPCOM_ERROR_SYNC_DELAY, $queue->id ); - } - } elseif ( $exceeded_sync_wait_threshold ) { - // If we actually sent data and it took a while, wait before sending again. - $this->set_next_sync_time( time() + $this->get_sync_wait_time(), $queue->id ); - } - - return $sync_result; - } - - /** - * Retrieve the next sync items to send. - * - * @access public - * - * @param (array|Automattic\Jetpack\Sync\Queue_Buffer) $buffer_or_items Queue buffer or array of objects. - * @param boolean $encode Whether to encode the items. - * @return array Sync items to send. - */ - public function get_items_to_send( $buffer_or_items, $encode = true ) { - // Track how long we've been processing so we can avoid request timeouts. - $start_time = microtime( true ); - $upload_size = 0; - $items_to_send = array(); - $items = is_array( $buffer_or_items ) ? $buffer_or_items : $buffer_or_items->get_items(); - if ( ! is_array( $items ) ) { - $items = array(); - } - - // Set up current screen to avoid errors rendering content. - require_once ABSPATH . 'wp-admin/includes/class-wp-screen.php'; - require_once ABSPATH . 'wp-admin/includes/screen.php'; - set_current_screen( 'sync' ); - $skipped_items_ids = array(); - /** - * We estimate the total encoded size as we go by encoding each item individually. - * This is expensive, but the only way to really know :/ - */ - foreach ( $items as $key => $item ) { - if ( ! is_array( $item ) ) { - $skipped_items_ids[] = $key; - continue; - } - - // Suspending cache addition help prevent overloading in memory cache of large sites. - wp_suspend_cache_addition( true ); - /** - * Modify the data within an action before it is serialized and sent to the server - * For example, during full sync this expands Post ID's into full Post objects, - * so that we don't have to serialize the whole object into the queue. - * - * @since 1.6.3 - * @since-jetpack 4.2.0 - * - * @param array The action parameters - * @param int The ID of the user who triggered the action - */ - $item[1] = apply_filters( 'jetpack_sync_before_send_' . $item[0], $item[1], $item[2] ); - wp_suspend_cache_addition( false ); - // Serialization usage can lead to empty, null or false action_name. Lets skip as there is no information to send. - if ( empty( $item[0] ) || false === $item[1] ) { - $skipped_items_ids[] = $key; - continue; - } - $encoded_item = $this->codec->encode( $item ); - $upload_size += strlen( $encoded_item ); - if ( $upload_size > $this->upload_max_bytes && array() !== $items_to_send ) { - break; - } - $items_to_send[ $key ] = $encode ? $encoded_item : $item; - if ( microtime( true ) - $start_time > $this->max_dequeue_time ) { - break; - } - } - - return array( $items_to_send, $skipped_items_ids, $items, microtime( true ) - $start_time ); - } - - /** - * If supported, flush all response data to the client and finish the request. - * This allows for time consuming tasks to be performed without leaving the connection open. - * - * @access private - */ - private function fastcgi_finish_request() { - if ( function_exists( 'fastcgi_finish_request' ) && version_compare( phpversion(), '7.0.16', '>=' ) ) { - fastcgi_finish_request(); - } - } - - /** - * Perform sync for a certain sync queue. - * - * @access public - * - * @param Automattic\Jetpack\Sync\Queue $queue Queue object. - * - * @return boolean|WP_Error True if this sync sending was successful, error object otherwise. - */ - public function do_sync_for_queue( $queue ) { - do_action( 'jetpack_sync_before_send_queue_' . $queue->id ); - if ( $queue->size() === 0 ) { - return new WP_Error( 'empty_queue_' . $queue->id ); - } - - /** - * Now that we're sure we are about to sync, try to ignore user abort - * so we can avoid getting into a bad state. - */ - // https://plugins.trac.wordpress.org/ticket/2041 - if ( function_exists( 'ignore_user_abort' ) ) { - ignore_user_abort( true ); - } - - /* Don't make the request block till we finish, if possible. */ - if ( Constants::is_true( 'REST_REQUEST' ) || Constants::is_true( 'XMLRPC_REQUEST' ) ) { - $this->fastcgi_finish_request(); - } - - $checkout_start_time = microtime( true ); - - $buffer = $queue->checkout_with_memory_limit( $this->dequeue_max_bytes, $this->upload_max_rows ); - - if ( ! $buffer ) { - // Buffer has no items. - return new WP_Error( 'empty_buffer' ); - } - - if ( is_wp_error( $buffer ) ) { - return $buffer; - } - - $checkout_duration = microtime( true ) - $checkout_start_time; - - list( $items_to_send, $skipped_items_ids, $items, $preprocess_duration ) = $this->get_items_to_send( $buffer, true ); - if ( ! empty( $items_to_send ) ) { - /** - * Fires when data is ready to send to the server. - * Return false or WP_Error to abort the sync (e.g. if there's an error) - * The items will be automatically re-sent later - * - * @since 1.6.3 - * @since-jetpack 4.2.0 - * - * @param array $data The action buffer - * @param string $codec The codec name used to encode the data - * @param double $time The current time - * @param string $queue The queue used to send ('sync' or 'full_sync') - * @param float $checkout_duration The duration of the checkout operation. - * @param float $preprocess_duration The duration of the pre-process operation. - * @param int $queue_size The size of the sync queue at the time of processing. - */ - Settings::set_is_sending( true ); - $processed_item_ids = apply_filters( 'jetpack_sync_send_data', $items_to_send, $this->codec->name(), microtime( true ), $queue->id, $checkout_duration, $preprocess_duration, $queue->size(), $buffer->id ); - Settings::set_is_sending( false ); - } else { - $processed_item_ids = $skipped_items_ids; - $skipped_items_ids = array(); - } - - if ( 'non-blocking' !== $processed_item_ids ) { - if ( ! $processed_item_ids || is_wp_error( $processed_item_ids ) ) { - $checked_in_item_ids = $queue->checkin( $buffer ); - if ( is_wp_error( $checked_in_item_ids ) ) { - // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_error_log - error_log( 'Error checking in buffer: ' . $checked_in_item_ids->get_error_message() ); - $queue->force_checkin(); - } - if ( is_wp_error( $processed_item_ids ) ) { - return new WP_Error( 'wpcom_error', $processed_item_ids->get_error_code() ); - } - - // Returning a wpcom_error is a sign to the caller that we should wait a while before syncing again. - return new WP_Error( 'wpcom_error', 'jetpack_sync_send_data_false' ); - } else { - // Detect if the last item ID was an error. - $had_wp_error = is_wp_error( end( $processed_item_ids ) ); - $wp_error = $had_wp_error ? array_pop( $processed_item_ids ) : null; - // Also checkin any items that were skipped. - if ( array() !== $skipped_items_ids ) { - $processed_item_ids = array_merge( $processed_item_ids, $skipped_items_ids ); - } - $processed_items = array_intersect_key( $items, array_flip( $processed_item_ids ) ); - /** - * Allows us to keep track of all the actions that have been sent. - * Allows us to calculate the progress of specific actions. - * - * @since 1.6.3 - * @since-jetpack 4.2.0 - * - * @param array $processed_actions The actions that we send successfully. - */ - do_action( 'jetpack_sync_processed_actions', $processed_items ); - $queue->close( $buffer, $processed_item_ids ); - // Returning a WP_Error is a sign to the caller that we should wait a while before syncing again. - if ( $had_wp_error ) { - return new WP_Error( 'wpcom_error', $wp_error->get_error_code() ); - } - } - } - - return true; - } - - /** - * Immediately sends a single item without firing or enqueuing it - * - * @param string $action_name The action. - * @param array $data The data associated with the action. - * - * @return Items processed. TODO: this doesn't make much sense anymore, it should probably be just a bool. - */ - public function send_action( $action_name, $data = null ) { - if ( ! Settings::is_sender_enabled( 'full_sync' ) ) { - return array(); - } - - // Compose the data to be sent. - $action_to_send = $this->create_action_to_send( $action_name, $data ); - - list( $items_to_send, $skipped_items_ids, $items, $preprocess_duration ) = $this->get_items_to_send( $action_to_send, true ); // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable - Settings::set_is_sending( true ); - $processed_item_ids = apply_filters( 'jetpack_sync_send_data', $items_to_send, $this->get_codec()->name(), microtime( true ), 'immediate-send', 0, $preprocess_duration ); - Settings::set_is_sending( false ); - - /** - * Allows us to keep track of all the actions that have been sent. - * Allows us to calculate the progress of specific actions. - * - * @param array $processed_actions The actions that we send successfully. - * - * @since 1.6.3 - * @since-jetpack 4.2.0 - */ - do_action( 'jetpack_sync_processed_actions', $action_to_send ); - - return $processed_item_ids; - } - - /** - * Create an synthetic action for direct sending to WPCOM during full sync (for example) - * - * @access private - * - * @param string $action_name The action. - * @param array $data The data associated with the action. - * @return array An array of synthetic sync actions keyed by current microtime(true) - */ - private function create_action_to_send( $action_name, $data ) { - return array( - (string) microtime( true ) => array( - $action_name, - $data, - get_current_user_id(), - microtime( true ), - Settings::is_importing(), - ), - ); - } - - /** - * Returns any object that is able to be synced. - * - * @access public - * - * @param array $args the synchronized object parameters. - * @return string Encoded sync object. - */ - public function sync_object( $args ) { - // For example: posts, post, 5. - list( $module_name, $object_type, $id ) = $args; - - $sync_module = Modules::get_module( $module_name ); - $codec = $this->get_codec(); - - return $codec->encode( $sync_module->get_object_by_id( $object_type, $id ) ); - } - - /** - * Register additional sync XML-RPC methods available to Jetpack for authenticated users. - * - * @access public - * @since 1.6.3 - * @since-jetpack 7.8.0 - * - * @param array $jetpack_methods XML-RPC methods available to the Jetpack Server. - * @return array Filtered XML-RPC methods. - */ - public function register_jetpack_xmlrpc_methods( $jetpack_methods ) { - $jetpack_methods['jetpack.syncObject'] = array( $this, 'sync_object' ); - return $jetpack_methods; - } - - /** - * Get the incremental sync queue object. - * - * @access public - * - * @return Automattic\Jetpack\Sync\Queue Queue object. - */ - public function get_sync_queue() { - return $this->sync_queue; - } - - /** - * Get the full sync queue object. - * - * @access public - * - * @return Automattic\Jetpack\Sync\Queue Queue object. - */ - public function get_full_sync_queue() { - return $this->full_sync_queue; - } - - /** - * Get the codec object. - * - * @access public - * - * @return Automattic\Jetpack\Sync\Codec_Interface Codec object. - */ - public function get_codec() { - return $this->codec; - } - - /** - * Determine the codec object. - * Use gzip deflate if supported. - * - * @access public - */ - public function set_codec() { - if ( function_exists( 'gzinflate' ) ) { - $this->codec = new JSON_Deflate_Array_Codec(); - } else { - $this->codec = new Simple_Codec(); - } - } - - /** - * Compute and send all the checksums. - * - * @access public - */ - public function send_checksum() { - $store = new Replicastore(); - do_action( 'jetpack_sync_checksum', $store->checksum_all() ); - } - - /** - * Reset the incremental sync queue. - * - * @access public - */ - public function reset_sync_queue() { - $this->sync_queue->reset(); - } - - /** - * Reset the full sync queue. - * - * @access public - */ - public function reset_full_sync_queue() { - $this->full_sync_queue->reset(); - } - - /** - * Set the maximum bytes to checkout without exceeding the memory limit. - * - * @access public - * - * @param int $size Maximum bytes to checkout. - */ - public function set_dequeue_max_bytes( $size ) { - $this->dequeue_max_bytes = $size; - } - - /** - * Set the maximum bytes in a single encoded item. - * - * @access public - * - * @param int $max_bytes Maximum bytes in a single encoded item. - */ - public function set_upload_max_bytes( $max_bytes ) { - $this->upload_max_bytes = $max_bytes; - } - - /** - * Set the maximum number of sync items in a single action. - * - * @access public - * - * @param int $max_rows Maximum number of sync items. - */ - public function set_upload_max_rows( $max_rows ) { - $this->upload_max_rows = $max_rows; - } - - /** - * Set the sync wait time (in seconds). - * - * @access public - * - * @param int $seconds Sync wait time. - */ - public function set_sync_wait_time( $seconds ) { - $this->sync_wait_time = $seconds; - } - - /** - * Get current sync wait time (in seconds). - * - * @access public - * - * @return int Sync wait time. - */ - public function get_sync_wait_time() { - return $this->sync_wait_time; - } - - /** - * Set the enqueue wait time (in seconds). - * - * @access public - * - * @param int $seconds Enqueue wait time. - */ - public function set_enqueue_wait_time( $seconds ) { - $this->enqueue_wait_time = $seconds; - } - - /** - * Get current enqueue wait time (in seconds). - * - * @access public - * - * @return int Enqueue wait time. - */ - public function get_enqueue_wait_time() { - return $this->enqueue_wait_time; - } - - /** - * Set the sync wait threshold (in seconds). - * - * @access public - * - * @param int $seconds Sync wait threshold. - */ - public function set_sync_wait_threshold( $seconds ) { - $this->sync_wait_threshold = $seconds; - } - - /** - * Get current sync wait threshold (in seconds). - * - * @access public - * - * @return int Sync wait threshold. - */ - public function get_sync_wait_threshold() { - return $this->sync_wait_threshold; - } - - /** - * Set the maximum time for perfirming a checkout of items from the queue (in seconds). - * - * @access public - * - * @param int $seconds Maximum dequeue time. - */ - public function set_max_dequeue_time( $seconds ) { - $this->max_dequeue_time = $seconds; - } - - /** - * Initialize the sync queues, codec and set the default settings. - * - * @access public - */ - public function set_defaults() { - $this->sync_queue = new Queue( 'sync' ); - $this->full_sync_queue = new Queue( 'full_sync' ); - $this->set_codec(); - - // Saved settings. - Settings::set_importing( null ); - $settings = Settings::get_settings(); - $this->set_dequeue_max_bytes( $settings['dequeue_max_bytes'] ); - $this->set_upload_max_bytes( $settings['upload_max_bytes'] ); - $this->set_upload_max_rows( $settings['upload_max_rows'] ); - $this->set_sync_wait_time( $settings['sync_wait_time'] ); - $this->set_enqueue_wait_time( $settings['enqueue_wait_time'] ); - $this->set_sync_wait_threshold( $settings['sync_wait_threshold'] ); - $this->set_max_dequeue_time( Defaults::get_max_sync_execution_time() ); - } - - /** - * Reset sync queues, modules and settings. - * - * @access public - */ - public function reset_data() { - $this->reset_sync_queue(); - $this->reset_full_sync_queue(); - - foreach ( Modules::get_modules() as $module ) { - $module->reset_data(); - } - // Reset Sync locks without unlocking queues since we already reset those. - Actions::reset_sync_locks( false ); - - Settings::reset_data(); - } - - /** - * Perform cleanup at the event of plugin uninstallation. - * - * @access public - */ - public function uninstall() { - // Lets delete all the other fun stuff like transient and option and the sync queue. - $this->reset_data(); - - // Delete the full sync status. - delete_option( 'jetpack_full_sync_status' ); - - // Clear the sync cron. - wp_clear_scheduled_hook( 'jetpack_sync_cron' ); - wp_clear_scheduled_hook( 'jetpack_sync_full_cron' ); - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-server.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-server.php deleted file mode 100644 index 7b6d0545..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-server.php +++ /dev/null @@ -1,195 +0,0 @@ -:( - * - * @access public - */ - public function __construct() { - $this->codec = new JSON_Deflate_Array_Codec(); - } - - /** - * Set the codec instance. - * - * @access public - * - * @param Automattic\Jetpack\Sync\Codec_Interface $codec Codec instance. - */ - public function set_codec( Codec_Interface $codec ) { - $this->codec = $codec; - } - - /** - * Attempt to lock the request when the server receives concurrent requests from the same blog. - * - * @access public - * - * @param int $blog_id ID of the blog. - * @param int $expiry Blog lock transient lifetime. - * @return boolean True if succeeded, false otherwise. - */ - public function attempt_request_lock( $blog_id, $expiry = self::BLOG_LOCK_TRANSIENT_EXPIRY ) { - $transient_name = $this->get_concurrent_request_transient_name( $blog_id ); - $locked_time = get_site_transient( $transient_name ); - if ( $locked_time ) { - return false; - } - set_site_transient( $transient_name, microtime( true ), $expiry ); - - return true; - } - - /** - * Retrieve the blog lock transient name for a particular blog. - * - * @access public - * - * @param int $blog_id ID of the blog. - * @return string Name of the blog lock transient. - */ - private function get_concurrent_request_transient_name( $blog_id ) { - return self::BLOG_LOCK_TRANSIENT_PREFIX . $blog_id; - } - - /** - * Remove the request lock from a particular blog ID. - * - * @access public - * - * @param int $blog_id ID of the blog. - */ - public function remove_request_lock( $blog_id ) { - delete_site_transient( $this->get_concurrent_request_transient_name( $blog_id ) ); - } - - /** - * Receive and process sync events. - * - * @access public - * - * @param array $data Sync events. - * @param object $token The auth token used to invoke the API. - * @param int $sent_timestamp Timestamp (in seconds) when the actions were transmitted. - * @param string $queue_id ID of the queue from which the event was sent (`sync` or `full_sync`). - * @return array Processed sync events. - */ - public function receive( $data, $token = null, $sent_timestamp = null, $queue_id = null ) { - $start_time = microtime( true ); - if ( ! is_array( $data ) ) { - return new WP_Error( 'action_decoder_error', 'Events must be an array' ); - } - - if ( $token && ! $this->attempt_request_lock( $token->blog_id ) ) { - /** - * Fires when the server receives two concurrent requests from the same blog - * - * @since 1.6.3 - * @since-jetpack 4.2.0 - * - * @param token The token object of the misbehaving site - */ - do_action( 'jetpack_sync_multi_request_fail', $token ); - - return new WP_Error( 'concurrent_request_error', 'There is another request running for the same blog ID' ); - } - - $events = wp_unslash( array_map( array( $this->codec, 'decode' ), $data ) ); - $events_processed = array(); - - /** - * Fires when an array of actions are received from a remote Jetpack site - * - * @since 1.6.3 - * @since-jetpack 4.2.0 - * - * @param array Array of actions received from the remote site - */ - do_action( 'jetpack_sync_remote_actions', $events, $token ); - - foreach ( $events as $key => $event ) { - list( $action_name, $args, $user_id, $timestamp, $silent ) = $event; - - /** - * Fires when an action is received from a remote Jetpack site - * - * @since 1.6.3 - * @since-jetpack 4.2.0 - * - * @param string $action_name The name of the action executed on the remote site - * @param array $args The arguments passed to the action - * @param int $user_id The external_user_id who did the action - * @param bool $silent Whether the item was created via import - * @param double $timestamp Timestamp (in seconds) when the action occurred - * @param double $sent_timestamp Timestamp (in seconds) when the action was transmitted - * @param string $queue_id ID of the queue from which the event was sent (sync or full_sync) - * @param array $token The auth token used to invoke the API - */ - do_action( 'jetpack_sync_remote_action', $action_name, $args, $user_id, $silent, $timestamp, $sent_timestamp, $queue_id, $token ); - - $events_processed[] = $key; - - if ( microtime( true ) - $start_time > self::MAX_TIME_PER_REQUEST_IN_SECONDS ) { - break; - } - } - - if ( $token ) { - $this->remove_request_lock( $token->blog_id ); - } - - return $events_processed; - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-settings.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-settings.php deleted file mode 100644 index 19509549..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-settings.php +++ /dev/null @@ -1,714 +0,0 @@ - true, - 'upload_max_bytes' => true, - 'upload_max_rows' => true, - 'sync_wait_time' => true, - 'sync_wait_threshold' => true, - 'enqueue_wait_time' => true, - 'max_queue_size' => true, - 'max_queue_lag' => true, - 'queue_max_writes_sec' => true, - 'post_types_blacklist' => true, - 'taxonomies_blacklist' => true, - 'disable' => true, - 'network_disable' => true, - 'render_filtered_content' => true, - 'post_meta_whitelist' => true, - 'comment_meta_whitelist' => true, - 'max_enqueue_full_sync' => true, - 'max_queue_size_full_sync' => true, - 'sync_via_cron' => true, - 'cron_sync_time_limit' => true, - 'known_importers' => true, - 'term_relationships_full_sync_item_size' => true, - 'sync_sender_enabled' => true, - 'full_sync_sender_enabled' => true, - 'full_sync_send_duration' => true, - 'full_sync_limits' => true, - 'checksum_disable' => true, - 'dedicated_sync_enabled' => true, - 'custom_queue_table_enabled' => true, - 'wpcom_rest_api_enabled' => true, - ); - - /** - * Whether WordPress is currently running an import. - * - * @access public - * @static - * - * @var null|boolean - */ - public static $is_importing; - - /** - * Whether WordPress is currently running a WP cron request. - * - * @access public - * @static - * - * @var null|boolean - */ - public static $is_doing_cron; - - /** - * Whether we're currently syncing. - * - * @access public - * @static - * - * @var null|boolean - */ - public static $is_syncing; - - /** - * Whether we're currently sending sync items. - * - * @access public - * @static - * - * @var null|boolean - */ - public static $is_sending; - - /** - * Retrieve all settings with their current values. - * - * @access public - * @static - * - * @return array All current settings. - */ - public static function get_settings() { - $settings = array(); - foreach ( array_keys( self::$valid_settings ) as $setting ) { - $settings[ $setting ] = self::get_setting( $setting ); - } - - return $settings; - } - - /** - * Fetches the setting. It saves it if the setting doesn't exist, so that it gets - * autoloaded on page load rather than re-queried every time. - * - * @access public - * @static - * - * @param string $setting The setting name. - * @return mixed The setting value. - */ - public static function get_setting( $setting ) { - if ( ! isset( self::$valid_settings[ $setting ] ) ) { - return false; - } - - if ( self::is_network_setting( $setting ) ) { - if ( is_multisite() ) { - $value = get_site_option( self::SETTINGS_OPTION_PREFIX . $setting ); - } else { - // On single sites just return the default setting. - return Defaults::get_default_setting( $setting ); - } - } else { - $value = get_option( self::SETTINGS_OPTION_PREFIX . $setting ); - } - - if ( false === $value ) { // No default value is set. - $value = Defaults::get_default_setting( $setting ); - if ( self::is_network_setting( $setting ) ) { - update_site_option( self::SETTINGS_OPTION_PREFIX . $setting, $value ); - } else { - // We set one so that it gets autoloaded. - update_option( self::SETTINGS_OPTION_PREFIX . $setting, $value, true ); - } - } - - if ( is_numeric( $value ) ) { - $value = (int) $value; - } - $default_array_value = null; - switch ( $setting ) { - case 'post_types_blacklist': - $default_array_value = Defaults::$blacklisted_post_types; - break; - case 'taxonomies_blacklist': - $default_array_value = Defaults::$blacklisted_taxonomies; - break; - case 'post_meta_whitelist': - $default_array_value = Defaults::get_post_meta_whitelist(); - break; - case 'comment_meta_whitelist': - $default_array_value = Defaults::get_comment_meta_whitelist(); - break; - case 'known_importers': - $default_array_value = Defaults::get_known_importers(); - break; - } - - if ( $default_array_value ) { - if ( is_array( $value ) ) { - $value = array_unique( array_merge( $value, $default_array_value ) ); - } else { - $value = $default_array_value; - } - } - - return $value; - } - - /** - * Change multiple settings in the same time. - * - * @access public - * @static - * - * @param array $new_settings The new settings. - */ - public static function update_settings( $new_settings ) { - $validated_settings = array_intersect_key( $new_settings, self::$valid_settings ); - foreach ( $validated_settings as $setting => $value ) { - - /** - * Custom table migration logic. - * - * This needs to happen before the option is updated, to avoid race conditions where we update the option, - * but haven't yet created the table or can't create it. - * - * On high-traffic sites this can lead to Sync trying to write in a non-existent table. - * - * So to avoid this, we're going to first try to initialize everything and then update the option. - */ - if ( 'custom_queue_table_enabled' === $setting ) { - // Need to check the current value in the database to make sure we're not doing anything weird. - $old_value = get_option( self::SETTINGS_OPTION_PREFIX . $setting, null ); - - if ( ! $old_value && $value ) { - /** - * The custom table has been enabled. - * - * - Initialize the custom table - * - Migrate the data - * - * If something fails, migrate back to the options table and clean up everything about the custom table. - */ - $init_result = Queue_Storage_Table::initialize_custom_sync_table(); - - /** - * Check if there was a problem when initializing the table. - */ - if ( is_wp_error( $init_result ) ) { - /** - * Unable to initialize the table properly. Set the value to `false` as we can't enable it. - */ - $value = false; - - /** - * Send error to WPCOM, so we can track and take an appropriate action. - */ - $data = array( - 'timestamp' => microtime( true ), - 'error_code' => $init_result->get_error_code(), - 'response_body' => $init_result->get_error_message(), - ); - - $sender = Sender::get_instance(); - $sender->send_action( 'jetpack_sync_storage_error_custom_init', $data ); - - } elseif ( ! Queue_Storage_Table::migrate_from_options_table_to_custom_table() ) { - /** - * If the migration fails, do a reverse migration and set the value to `false` as we can't - * safely enable the table. - */ - Queue_Storage_Table::migrate_from_custom_table_to_options_table(); - - // Set $value to `false` as we couldn't do the migration, and we can't continue enabling the table. - $value = false; - - /** - * Send error to WPCOM, so we can track and take an appropriate action. - */ - $data = array( - 'timestamp' => microtime( true ), - // TODO: Maybe add more details here for the migration, i.e. how many items where in the queue? - ); - - $sender = Sender::get_instance(); - $sender->send_action( 'jetpack_sync_storage_error_custom_migrate', $data ); - } - } elseif ( $old_value && ! $value ) { - /** - * The custom table has been disabled, migrate what we can from the custom table to the options table. - */ - Queue_Storage_Table::migrate_from_custom_table_to_options_table(); - } - } - - /** - * Regular option update and handling - */ - if ( self::is_network_setting( $setting ) ) { - if ( is_multisite() && is_main_site() ) { - $updated = update_site_option( self::SETTINGS_OPTION_PREFIX . $setting, $value ); - } - } else { - $updated = update_option( self::SETTINGS_OPTION_PREFIX . $setting, $value, true ); - } - - // If we set the disabled option to true, clear the queues. - if ( ( 'disable' === $setting || 'network_disable' === $setting ) && (bool) $value ) { - $listener = Listener::get_instance(); - $listener->get_sync_queue()->reset(); - $listener->get_full_sync_queue()->reset(); - } - - // Do not enable Dedicated Sync if we cannot spawn a Dedicated Sync request. - if ( 'dedicated_sync_enabled' === $setting && $updated && (bool) $value ) { - if ( ! Dedicated_Sender::can_spawn_dedicated_sync_request() ) { - update_option( self::SETTINGS_OPTION_PREFIX . $setting, 0, true ); - } - } - - // Do not enable wpcom rest api if we cannot send a test request. - - if ( 'wpcom_rest_api_enabled' === $setting && $updated && (bool) $value ) { - $sender = Sender::get_instance(); - $data = array( - 'timestamp' => microtime( true ), - ); - $items = $sender->send_action( 'jetpack_sync_wpcom_rest_api_enable_test', $data ); - // If we can't send a test request, disable the setting and send action tolog the error. - if ( is_wp_error( $items ) ) { - update_option( self::SETTINGS_OPTION_PREFIX . $setting, 0, true ); - $data = array( - 'timestamp' => microtime( true ), - 'response_code' => $items->get_error_code(), - 'response_body' => $items->get_error_data() ? trim( $items->get_error_data() ) : '', - ); - $sender->send_action( 'jetpack_sync_wpcom_rest_api_enable_error', $data ); - } - } - } - } - - /** - * Whether the specified setting is a network setting. - * - * @access public - * @static - * - * @param string $setting Setting name. - * @return boolean Whether the setting is a network setting. - */ - public static function is_network_setting( $setting ) { - return str_starts_with( $setting, 'network_' ); - } - - /** - * Returns escaped SQL for blacklisted post types. - * Can be injected directly into a WHERE clause. - * - * @access public - * @static - * - * @return string SQL WHERE clause. - */ - public static function get_blacklisted_post_types_sql() { - return 'post_type NOT IN (\'' . implode( '\', \'', array_map( 'esc_sql', self::get_setting( 'post_types_blacklist' ) ) ) . '\')'; - } - - /** - * Returns escaped values for disallowed post types. - * - * @access public - * @static - * - * @return array Post type filter values - */ - public static function get_disallowed_post_types_structured() { - return array( - 'post_type' => array( - 'operator' => 'NOT IN', - 'values' => array_map( 'esc_sql', self::get_setting( 'post_types_blacklist' ) ), - ), - ); - } - - /** - * Returns escaped SQL for blacklisted taxonomies. - * Can be injected directly into a WHERE clause. - * - * @access public - * @static - * - * @return string SQL WHERE clause. - */ - public static function get_blacklisted_taxonomies_sql() { - return "taxonomy NOT IN ('" . implode( "', '", array_map( 'esc_sql', self::get_setting( 'taxonomies_blacklist' ) ) ) . "')"; - } - - /** - * Returns escaped SQL for blacklisted post meta. - * Can be injected directly into a WHERE clause. - * - * @access public - * @static - * - * @return string SQL WHERE clause. - */ - public static function get_whitelisted_post_meta_sql() { - return 'meta_key IN (\'' . implode( '\', \'', array_map( 'esc_sql', self::get_setting( 'post_meta_whitelist' ) ) ) . '\')'; - } - - /** - * Returns escaped SQL for allowed post meta keys. - * - * @access public - * @static - * - * @return array Meta keys filter values - */ - public static function get_allowed_post_meta_structured() { - return array( - 'meta_key' => array( - 'operator' => 'IN', - 'values' => array_map( 'esc_sql', self::get_setting( 'post_meta_whitelist' ) ), - ), - ); - } - - /** - * Returns structured SQL clause for blacklisted taxonomies. - * - * @access public - * @static - * - * @return array taxonomies filter values - */ - public static function get_blacklisted_taxonomies_structured() { - return array( - 'taxonomy' => array( - 'operator' => 'NOT IN', - 'values' => array_map( 'esc_sql', self::get_setting( 'taxonomies_blacklist' ) ), - ), - ); - } - - /** - * Returns structured SQL clause for allowed taxonomies. - * - * @access public - * @static - * - * @return array taxonomies filter values - */ - public static function get_allowed_taxonomies_structured() { - global $wp_taxonomies; - - $allowed_taxonomies = array_keys( $wp_taxonomies ); - $allowed_taxonomies = array_diff( $allowed_taxonomies, self::get_setting( 'taxonomies_blacklist' ) ); - return array( - 'taxonomy' => array( - 'operator' => 'IN', - 'values' => array_map( 'esc_sql', $allowed_taxonomies ), - ), - ); - } - - /** - * Returns escaped SQL for blacklisted comment meta. - * Can be injected directly into a WHERE clause. - * - * @access public - * @static - * - * @return string SQL WHERE clause. - */ - public static function get_whitelisted_comment_meta_sql() { - return 'meta_key IN (\'' . implode( '\', \'', array_map( 'esc_sql', self::get_setting( 'comment_meta_whitelist' ) ) ) . '\')'; - } - - /** - * Returns SQL-escaped values for allowed post meta keys. - * - * @access public - * @static - * - * @return array Meta keys filter values - */ - public static function get_allowed_comment_meta_structured() { - return array( - 'meta_key' => array( - 'operator' => 'IN', - 'values' => array_map( 'esc_sql', self::get_setting( 'comment_meta_whitelist' ) ), - ), - ); - } - - /** - * Returns SQL-escaped values for allowed order_item meta keys. - * - * @access public - * @static - * - * @return array Meta keys filter values - */ - public static function get_allowed_order_itemmeta_structured() { - // Make sure that we only try to add the properties when the class exists. - if ( ! class_exists( '\Automattic\Jetpack\Sync\Modules\WooCommerce' ) ) { - return array(); - } - - $values = \Automattic\Jetpack\Sync\Modules\WooCommerce::$order_item_meta_whitelist; - - return array( - 'meta_key' => array( - 'operator' => 'IN', - 'values' => array_map( 'esc_sql', $values ), - ), - ); - } - - /** - * Returns escaped SQL for comments, excluding any spam comments. - * Can be injected directly into a WHERE clause. - * - * @access public - * @static - * - * @return string SQL WHERE clause. - */ - public static function get_comments_filter_sql() { - return "comment_approved <> 'spam'"; - } - - /** - * Delete any settings options and clean up the current settings state. - * - * @access public - * @static - */ - public static function reset_data() { - $valid_settings = self::$valid_settings; - foreach ( $valid_settings as $option => $value ) { - delete_option( self::SETTINGS_OPTION_PREFIX . $option ); - } - self::set_importing( null ); - self::set_doing_cron( null ); - self::set_is_syncing( null ); - self::set_is_sending( null ); - } - - /** - * Set the importing state. - * - * @access public - * @static - * - * @param boolean $is_importing Whether WordPress is currently importing. - */ - public static function set_importing( $is_importing ) { - // Set to NULL to revert to WP_IMPORTING, the standard behavior. - self::$is_importing = $is_importing; - } - - /** - * Whether WordPress is currently importing. - * - * @access public - * @static - * - * @return boolean Whether WordPress is currently importing. - */ - public static function is_importing() { - if ( self::$is_importing !== null ) { - return self::$is_importing; - } - - return defined( 'WP_IMPORTING' ) && WP_IMPORTING; - } - - /** - * Whether sync is enabled. - * - * @access public - * @static - * - * @return boolean Whether sync is enabled. - */ - public static function is_sync_enabled() { - return ! ( self::get_setting( 'disable' ) || self::get_setting( 'network_disable' ) ); - } - - /** - * Set the WP cron state. - * - * @access public - * @static - * - * @param boolean $is_doing_cron Whether WordPress is currently doing WP cron. - */ - public static function set_doing_cron( $is_doing_cron ) { - // Set to NULL to revert to WP_IMPORTING, the standard behavior. - self::$is_doing_cron = $is_doing_cron; - } - - /** - * Whether WordPress is currently doing WP cron. - * - * @access public - * @static - * - * @return boolean Whether WordPress is currently doing WP cron. - */ - public static function is_doing_cron() { - if ( self::$is_doing_cron !== null ) { - return self::$is_doing_cron; - } - - return defined( 'DOING_CRON' ) && DOING_CRON; - } - - /** - * Whether we are currently syncing. - * - * @access public - * @static - * - * @return boolean Whether we are currently syncing. - */ - public static function is_syncing() { - return (bool) self::$is_syncing || Constants::is_true( 'REST_API_REQUEST' ); - } - - /** - * Set the syncing state. - * - * @access public - * @static - * - * @param boolean $is_syncing Whether we are currently syncing. - */ - public static function set_is_syncing( $is_syncing ) { - self::$is_syncing = $is_syncing; - } - - /** - * Whether we are currently sending sync items. - * - * @access public - * @static - * - * @return boolean Whether we are currently sending sync items. - */ - public static function is_sending() { - return (bool) self::$is_sending; - } - - /** - * Set the sending state. - * - * @access public - * @static - * - * @param boolean $is_sending Whether we are currently sending sync items. - */ - public static function set_is_sending( $is_sending ) { - self::$is_sending = $is_sending; - } - - /** - * Whether should send from the queue - * - * @access public - * @static - * - * @param string $queue_id The queue identifier. - * - * @return boolean Whether sync is enabled. - */ - public static function is_sender_enabled( $queue_id ) { - return (bool) self::get_setting( $queue_id . '_sender_enabled' ); - } - - /** - * Whether checksums are enabled. - * - * @access public - * @static - * - * @return boolean Whether sync is enabled. - */ - public static function is_checksum_enabled() { - return ! (bool) self::get_setting( 'checksum_disable' ); - } - - /** - * Whether dedicated Sync flow is enabled. - * - * @access public - * @static - * - * @return boolean Whether dedicated Sync flow is enabled. - */ - public static function is_dedicated_sync_enabled() { - return (bool) self::get_setting( 'dedicated_sync_enabled' ); - } - - /** - * Whether custom queue table is enabled. - * - * @access public - * @static - * - * @return boolean Whether custom queue table is enabled. - */ - public static function is_custom_queue_table_enabled() { - return (bool) self::get_setting( 'custom_queue_table_enabled' ); - } - - /** - * Whether wpcom rest api is enabled. - * - * @access public - * @static - * - * @return boolean Whether wpcom rest api is enabled. - */ - public static function is_wpcom_rest_api_enabled() { - return (bool) self::get_setting( 'wpcom_rest_api_enabled' ); - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-simple-codec.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-simple-codec.php deleted file mode 100644 index cd6f2c37..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-simple-codec.php +++ /dev/null @@ -1,62 +0,0 @@ -json_serialize( $object ) ); - } - - /** - * Encode a sync object. - * - * @access public - * - * @param string $input Encoded sync object to decode. - * @return mixed Decoded sync object. - */ - public function decode( $input ) { - // This is intentionally using base64_decode(). - // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.obfuscation_base64_decode - return $this->json_unserialize( base64_decode( $input ) ); - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-users.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-users.php deleted file mode 100644 index 316df9ce..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-users.php +++ /dev/null @@ -1,152 +0,0 @@ -has_connected_user() ) { - // Kick off synchronization of user role when it changes. - add_action( 'set_user_role', array( __CLASS__, 'user_role_change' ) ); - } - } - - /** - * Synchronize connected user role changes. - * - * @access public - * @static - * - * @param int $user_id ID of the user. - */ - public static function user_role_change( $user_id ) { - $connection = new Jetpack_Connection(); - if ( $connection->is_user_connected( $user_id ) ) { - self::update_role_on_com( $user_id ); - // Try to choose a new master if we're demoting the current one. - self::maybe_demote_master_user( $user_id ); - } - } - - /** - * Retrieve the role of a user by their ID. - * - * @access public - * @static - * - * @param int $user_id ID of the user. - * @return string Role of the user. - */ - public static function get_role( $user_id ) { - if ( isset( self::$user_roles[ $user_id ] ) ) { - return self::$user_roles[ $user_id ]; - } - - $current_user_id = get_current_user_id(); - wp_set_current_user( $user_id ); - $roles = new Roles(); - $role = $roles->translate_current_user_to_role(); - wp_set_current_user( $current_user_id ); - self::$user_roles[ $user_id ] = $role; - - return $role; - } - - /** - * Retrieve the signed role of a user by their ID. - * - * @access public - * @static - * - * @param int $user_id ID of the user. - * @return string Signed role of the user. - */ - public static function get_signed_role( $user_id ) { - $connection = new Jetpack_Connection(); - return $connection->sign_role( self::get_role( $user_id ), $user_id ); - } - - /** - * Retrieve the signed role and update it in WP.com for that user. - * - * @access public - * @static - * - * @param int $user_id ID of the user. - */ - public static function update_role_on_com( $user_id ) { - $signed_role = self::get_signed_role( $user_id ); - XMLRPC_Async_Call::add_call( 'jetpack.updateRole', get_current_user_id(), $user_id, $signed_role ); - } - - /** - * Choose a new master user if we're demoting the current one. - * - * @access public - * @static - * @todo Disconnect if there is no user with enough capabilities to be the master user. - * @uses \WP_User_Query - * - * @param int $user_id ID of the user. - */ - public static function maybe_demote_master_user( $user_id ) { - $master_user_id = (int) \Jetpack_Options::get_option( 'master_user' ); - $role = self::get_role( $user_id ); - if ( $user_id === $master_user_id && 'administrator' !== $role ) { - $query = new \WP_User_Query( - array( - 'fields' => array( 'ID' ), - 'role' => 'administrator', - 'orderby' => 'ID', - 'exclude' => array( $master_user_id ), - ) - ); - $new_master = false; - $connection = new Jetpack_Connection(); - foreach ( $query->results as $result ) { - $found_user_id = absint( $result->ID ); - if ( $found_user_id && $connection->is_user_connected( $found_user_id ) ) { - $new_master = $found_user_id; - break; - } - } - - if ( $new_master ) { - \Jetpack_Options::update_option( 'master_user', $new_master ); - } - // TODO: else disconnect..? - } - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-utils.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-utils.php deleted file mode 100644 index 23f24e95..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/class-utils.php +++ /dev/null @@ -1,65 +0,0 @@ -value; - } - - /** - * Get the ID of a sync item. - * - * @access private - * @static - * - * @param array $item Sync item. - * @return int Sync item ID. - */ - private static function get_item_id( $item ) { - return $item->id; - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/interface-codec.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/interface-codec.php deleted file mode 100644 index 7653f26d..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/interface-codec.php +++ /dev/null @@ -1,44 +0,0 @@ -post_parent && 0 !== $attachment_after->post_parent ) { - /** - * Fires when an existing attachment is added to a post for the first time - * - * @since 1.6.3 - * @since-jetpack 6.6.0 - * - * @param int $attachment_id Attachment ID. - * @param \WP_Post $attachment_after Attachment post object after the update. - */ - do_action( 'jetpack_sync_save_attach_attachment', $attachment_id, $attachment_after ); - } else { - /** - * Fires when the client needs to sync an updated attachment - * - * @since 1.6.3 - * @since-jetpack 4.9.0 - * - * @param int $attachment_id Attachment ID. - * @param \WP_Post $attachment_after Attachment post object after the update. - * - * Previously this action was synced using jetpack_sync_save_add_attachment action. - */ - do_action( 'jetpack_sync_save_update_attachment', $attachment_id, $attachment_after ); - } - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-callables.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-callables.php deleted file mode 100644 index 8716085c..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-callables.php +++ /dev/null @@ -1,644 +0,0 @@ - 'home_url', - 'siteurl' => 'site_url', - 'jetpack_active_modules' => 'active_modules', - ); - - /** - * Sync module name. - * - * @access public - * - * @return string - */ - public function name() { - return 'functions'; - } - - /** - * Set module defaults. - * Define the callable whitelist based on whether this is a single site or a multisite installation. - * - * @access public - */ - public function set_defaults() { - if ( is_multisite() ) { - $this->callable_whitelist = array_merge( Defaults::get_callable_whitelist(), Defaults::get_multisite_callable_whitelist() ); - } else { - $this->callable_whitelist = Defaults::get_callable_whitelist(); - } - $this->force_send_callables_on_next_tick = false; // Resets here as well mostly for tests. - } - - /** - * Initialize callables action listeners. - * - * @access public - * - * @param callable $callable Action handler callable. - */ - public function init_listeners( $callable ) { - add_action( 'jetpack_sync_callable', $callable, 10, 2 ); - add_action( 'current_screen', array( $this, 'set_plugin_action_links' ), 9999 ); // Should happen very late. - - foreach ( self::ALWAYS_SEND_UPDATES_TO_THESE_OPTIONS as $option ) { - add_action( "update_option_{$option}", array( $this, 'unlock_sync_callable' ) ); - add_action( "delete_option_{$option}", array( $this, 'unlock_sync_callable' ) ); - } - - foreach ( self::ALWAYS_SEND_UPDATES_TO_THESE_OPTIONS_NEXT_TICK as $option ) { - add_action( "update_option_{$option}", array( $this, 'unlock_sync_callable_next_tick' ) ); - add_action( "delete_option_{$option}", array( $this, 'unlock_sync_callable_next_tick' ) ); - } - - // Provide a hook so that hosts can send changes to certain callables right away. - // Especially useful when a host uses constants to change home and siteurl. - add_action( 'jetpack_sync_unlock_sync_callable', array( $this, 'unlock_sync_callable' ) ); - - // get_plugins and wp_version - // gets fired when new code gets installed, updates etc. - add_action( 'upgrader_process_complete', array( $this, 'unlock_plugin_action_link_and_callables' ) ); - add_action( 'update_option_active_plugins', array( $this, 'unlock_plugin_action_link_and_callables' ) ); - } - - /** - * Initialize callables action listeners for full sync. - * - * @access public - * - * @param callable $callable Action handler callable. - */ - public function init_full_sync_listeners( $callable ) { - add_action( 'jetpack_full_sync_callables', $callable ); - } - - /** - * Initialize the module in the sender. - * - * @access public - */ - public function init_before_send() { - add_action( 'jetpack_sync_before_send_queue_sync', array( $this, 'maybe_sync_callables' ) ); - - // Full sync. - add_filter( 'jetpack_sync_before_send_jetpack_full_sync_callables', array( $this, 'expand_callables' ) ); - } - - /** - * Perform module cleanup. - * Deletes any transients and options that this module uses. - * Usually triggered when uninstalling the plugin. - * - * @access public - */ - public function reset_data() { - delete_option( self::CALLABLES_CHECKSUM_OPTION_NAME ); - delete_transient( self::CALLABLES_AWAIT_TRANSIENT_NAME ); - - $url_callables = array( 'home_url', 'site_url', 'main_network_site_url' ); - foreach ( $url_callables as $callable ) { - delete_option( Functions::HTTPS_CHECK_OPTION_PREFIX . $callable ); - } - } - - /** - * Set the callable whitelist. - * - * @access public - * - * @param array $callables The new callables whitelist. - */ - public function set_callable_whitelist( $callables ) { - $this->callable_whitelist = $callables; - } - - /** - * Get the callable whitelist. - * - * @access public - * - * @return array The callables whitelist. - */ - public function get_callable_whitelist() { - return $this->callable_whitelist; - } - - /** - * Retrieve all callables as per the current callables whitelist. - * - * @access public - * - * @return array All callables. - */ - public function get_all_callables() { - // get_all_callables should run as the master user always. - $current_user_id = get_current_user_id(); - wp_set_current_user( \Jetpack_Options::get_option( 'master_user' ) ); - $callables = array_combine( - array_keys( $this->get_callable_whitelist() ), - array_map( array( $this, 'get_callable' ), array_values( $this->get_callable_whitelist() ) ) - ); - wp_set_current_user( $current_user_id ); - return $callables; - } - - /** - * Invoke a particular callable. - * Used as a wrapper to standartize invocation. - * - * @access private - * - * @param callable $callable Callable to invoke. - * @return mixed Return value of the callable, null if not callable. - */ - private function get_callable( $callable ) { - if ( is_callable( $callable ) ) { - return call_user_func( $callable ); - } else { - return null; - } - } - - /** - * Enqueue the callable actions for full sync. - * - * @access public - * - * @param array $config Full sync configuration for this sync module. - * @param int $max_items_to_enqueue Maximum number of items to enqueue. - * @param boolean $state True if full sync has finished enqueueing this module, false otherwise. - * @return array Number of actions enqueued, and next module state. - */ - public function enqueue_full_sync_actions( $config, $max_items_to_enqueue, $state ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable - /** - * Tells the client to sync all callables to the server - * - * @since 1.6.3 - * @since-jetpack 4.2.0 - * - * @param boolean Whether to expand callables (should always be true) - */ - do_action( 'jetpack_full_sync_callables', true ); - - // The number of actions enqueued, and next module state (true == done). - return array( 1, true ); - } - - /** - * Send the callable actions for full sync. - * - * @access public - * - * @param array $config Full sync configuration for this sync module. - * @param int $send_until The timestamp until the current request can send. - * @param array $status This Module Full Sync Status. - * - * @return array This Module Full Sync Status. - */ - public function send_full_sync_actions( $config, $send_until, $status ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable - // we call this instead of do_action when sending immediately. - $this->send_action( 'jetpack_full_sync_callables', array( true ) ); - - // The number of actions enqueued, and next module state (true == done). - return array( 'finished' => true ); - } - - /** - * Retrieve an estimated number of actions that will be enqueued. - * - * @access public - * - * @param array $config Full sync configuration for this sync module. - * @return array Number of items yet to be enqueued. - */ - public function estimate_full_sync_actions( $config ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable - return 1; - } - - /** - * Retrieve the actions that will be sent for this module during a full sync. - * - * @access public - * - * @return array Full sync actions of this module. - */ - public function get_full_sync_actions() { - return array( 'jetpack_full_sync_callables' ); - } - - /** - * Unlock callables so they would be available for syncing again. - * - * @access public - */ - public function unlock_sync_callable() { - delete_transient( self::CALLABLES_AWAIT_TRANSIENT_NAME ); - } - - /** - * Unlock callables on the next tick. - * Sometime the true callable values are only present on the next tick. - * When switching themes for example. - * - * @access public - */ - public function unlock_sync_callable_next_tick() { - $this->force_send_callables_on_next_tick = true; - } - - /** - * Unlock callables and plugin action links. - * - * @access public - */ - public function unlock_plugin_action_link_and_callables() { - delete_transient( self::CALLABLES_AWAIT_TRANSIENT_NAME ); - delete_transient( 'jetpack_plugin_api_action_links_refresh' ); - add_filter( 'jetpack_check_and_send_callables', '__return_true' ); - } - - /** - * Parse and store the plugin action links if on the plugins page. - * - * @uses \DOMDocument - * @uses libxml_use_internal_errors - * @uses mb_convert_encoding - * - * @access public - */ - public function set_plugin_action_links() { - if ( - ! class_exists( '\DOMDocument' ) || - ! function_exists( 'mb_convert_encoding' ) - ) { - return; - } - - $current_screeen = get_current_screen(); - - $plugins_action_links = array(); - // Is the transient lock in place? - $plugins_lock = get_transient( 'jetpack_plugin_api_action_links_refresh', false ); - if ( ! empty( $plugins_lock ) && ( isset( $current_screeen->id ) && 'plugins' !== $current_screeen->id ) ) { - return; - } - $plugins = array_keys( Functions::get_plugins() ); - foreach ( $plugins as $plugin_file ) { - /** - * Plugins often like to unset things but things break if they are not able to. - */ - $action_links = array( - 'deactivate' => '', - 'activate' => '', - 'details' => '', - 'delete' => '', - 'edit' => '', - ); - /** This filter is documented in src/wp-admin/includes/class-wp-plugins-list-table.php */ - $action_links = apply_filters( 'plugin_action_links', $action_links, $plugin_file, null, 'all' ); - // Verify $action_links is still an array. - if ( ! is_array( $action_links ) ) { - $action_links = array(); - } - /** This filter is documented in src/wp-admin/includes/class-wp-plugins-list-table.php */ - $action_links = apply_filters( "plugin_action_links_{$plugin_file}", $action_links, $plugin_file, null, 'all' ); - // Verify $action_links is still an array to resolve warnings from filters not returning an array. - if ( is_array( $action_links ) ) { - $action_links = array_filter( $action_links ); - } else { - $action_links = array(); - } - $formatted_action_links = null; - if ( $action_links ) { - $dom_doc = new \DOMDocument(); - foreach ( $action_links as $action_link ) { - // The @ is not enough to suppress errors when dealing with libxml, - // we have to tell it directly how we want to handle errors. - libxml_use_internal_errors( true ); - $dom_doc->loadHTML( '' . $action_link ); - libxml_use_internal_errors( false ); - - $link_elements = $dom_doc->getElementsByTagName( 'a' ); - if ( 0 === $link_elements->length ) { - continue; - } - - $link_element = $link_elements->item( 0 ); - // phpcs:ignore WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase - if ( $link_element->hasAttribute( 'href' ) && $link_element->nodeValue ) { - $link_url = trim( $link_element->getAttribute( 'href' ) ); - - // Add the full admin path to the url if the plugin did not provide it. - $link_url_scheme = wp_parse_url( $link_url, PHP_URL_SCHEME ); - if ( empty( $link_url_scheme ) ) { - $link_url = admin_url( $link_url ); - } - - // phpcs:ignore WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase - $formatted_action_links[ $link_element->nodeValue ] = $link_url; - } - } - } - if ( $formatted_action_links ) { - $plugins_action_links[ $plugin_file ] = $formatted_action_links; - } - } - // Cache things for a long time. - set_transient( 'jetpack_plugin_api_action_links_refresh', time(), DAY_IN_SECONDS ); - update_option( 'jetpack_plugin_api_action_links', $plugins_action_links ); - } - - /** - * Whether a certain callable should be sent. - * - * @access public - * - * @param array $callable_checksums Callable checksums. - * @param string $name Name of the callable. - * @param string $checksum A checksum of the callable. - * @return boolean Whether to send the callable. - */ - public function should_send_callable( $callable_checksums, $name, $checksum ) { - $idc_override_callables = array( - 'main_network_site', - 'home_url', - 'site_url', - ); - if ( in_array( $name, $idc_override_callables, true ) && \Jetpack_Options::get_option( 'migrate_for_idc' ) ) { - return true; - } - - return ! $this->still_valid_checksum( $callable_checksums, $name, $checksum ); - } - - /** - * Sync the callables if we're supposed to. - * - * @access public - */ - public function maybe_sync_callables() { - $callables = $this->get_all_callables(); - if ( ! apply_filters( 'jetpack_check_and_send_callables', false ) ) { - /** - * Treating Dedicated Sync requests a bit differently from normal. We want to send callables - * normally with all Sync actions, no matter if they were with admin action origin or not, - * since Dedicated Sync runs out of bound and the requests are never coming from an admin. - */ - if ( ! is_admin() && ! Dedicated_Sender::is_dedicated_sync_request() ) { - // If we're not an admin and we're not doing cron and this isn't WP_CLI, don't sync anything. - if ( ! Settings::is_doing_cron() && ! Jetpack_Constants::get_constant( 'WP_CLI' ) ) { - return; - } - // If we're not an admin and we are doing cron, sync the Callables that are always supposed to sync ( See https://github.com/Automattic/jetpack/issues/12924 ). - $callables = $this->get_always_sent_callables(); - } - if ( get_transient( self::CALLABLES_AWAIT_TRANSIENT_NAME ) ) { - if ( $this->force_send_callables_on_next_tick ) { - $this->unlock_sync_callable(); - } - return; - } - } - - if ( empty( $callables ) ) { - return; - } - // No need to set the transiant we are trying to remove it anyways. - if ( ! $this->force_send_callables_on_next_tick ) { - set_transient( self::CALLABLES_AWAIT_TRANSIENT_NAME, microtime( true ), Defaults::$default_sync_callables_wait_time ); - } - - $callable_checksums = (array) \Jetpack_Options::get_raw_option( self::CALLABLES_CHECKSUM_OPTION_NAME, array() ); - $has_changed = false; - // Only send the callables that have changed. - foreach ( $callables as $name => $value ) { - $checksum = $this->get_check_sum( $value ); - - // Explicitly not using Identical comparison as get_option returns a string. - if ( $value !== null && $this->should_send_callable( $callable_checksums, $name, $checksum ) ) { - - // Only send callable if the non sorted checksum also does not match. - if ( $this->should_send_callable( $callable_checksums, $name, $this->get_check_sum( $value, false ) ) ) { - - /** - * Tells the client to sync a callable (aka function) to the server - * - * @param string The name of the callable - * @param mixed The value of the callable - * - * @since 1.6.3 - * @since-jetpack 4.2.0 - */ - do_action( 'jetpack_sync_callable', $name, $value ); - } - - $callable_checksums[ $name ] = $checksum; - $has_changed = true; - } else { - $callable_checksums[ $name ] = $checksum; - } - } - if ( $has_changed ) { - \Jetpack_Options::update_raw_option( self::CALLABLES_CHECKSUM_OPTION_NAME, $callable_checksums ); - } - - if ( $this->force_send_callables_on_next_tick ) { - $this->unlock_sync_callable(); - } - } - - /** - * Get the callables that should always be sent, e.g. on cron. - * - * @return array Callables that should always be sent - */ - protected function get_always_sent_callables() { - $callables = $this->get_all_callables(); - $cron_callables = array(); - foreach ( self::ALWAYS_SEND_UPDATES_TO_THESE_OPTIONS as $option_name ) { - if ( array_key_exists( $option_name, $callables ) ) { - $cron_callables[ $option_name ] = $callables[ $option_name ]; - continue; - } - - // Check for the Callable name/key for the option, if different from option name. - if ( array_key_exists( $option_name, self::OPTION_NAMES_TO_CALLABLE_NAMES ) ) { - $callable_name = self::OPTION_NAMES_TO_CALLABLE_NAMES[ $option_name ]; - if ( array_key_exists( $callable_name, $callables ) ) { - $cron_callables[ $callable_name ] = $callables[ $callable_name ]; - } - } - } - return $cron_callables; - } - - /** - * Expand the callables within a hook before they are serialized and sent to the server. - * - * @access public - * - * @param array $args The hook parameters. - * @return array $args The hook parameters. - */ - public function expand_callables( $args ) { - if ( $args[0] ) { - $callables = $this->get_all_callables(); - $callables_checksums = array(); - foreach ( $callables as $name => $value ) { - $callables_checksums[ $name ] = $this->get_check_sum( $value ); - } - \Jetpack_Options::update_raw_option( self::CALLABLES_CHECKSUM_OPTION_NAME, $callables_checksums ); - return $callables; - } - - return $args; - } - - /** - * Return Total number of objects. - * - * @param array $config Full Sync config. - * - * @return int total - */ - public function total( $config ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable - return count( $this->get_callable_whitelist() ); - } - - /** - * Retrieve a set of callables by their IDs. - * - * @access public - * - * @param string $object_type Object type. - * @param array $ids Object IDs. - * @return array Array of objects. - */ - public function get_objects_by_id( $object_type, $ids ) { - if ( empty( $ids ) || empty( $object_type ) || 'callable' !== $object_type ) { - return array(); - } - - $objects = array(); - foreach ( (array) $ids as $id ) { - $object = $this->get_object_by_id( $object_type, $id ); - - if ( 'CALLABLE-DOES-NOT-EXIST' !== $object ) { - if ( 'all' === $id ) { - // If all was requested it contains all options and can simply be returned. - return $object; - } - $objects[ $id ] = $object; - } - } - - return $objects; - } - - /** - * Retrieve a callable by its name. - * - * @access public - * - * @param string $object_type Type of the sync object. - * @param string $id ID of the sync object. - * @return mixed Value of Callable. - */ - public function get_object_by_id( $object_type, $id ) { - if ( 'callable' === $object_type ) { - - // Only whitelisted options can be returned. - if ( array_key_exists( $id, $this->get_callable_whitelist() ) ) { - // requires master user to be in context. - $current_user_id = get_current_user_id(); - wp_set_current_user( \Jetpack_Options::get_option( 'master_user' ) ); - $callable = $this->get_callable( $this->callable_whitelist[ $id ] ); - wp_set_current_user( $current_user_id ); - return $callable; - } elseif ( 'all' === $id ) { - return $this->get_all_callables(); - } - } - - return 'CALLABLE-DOES-NOT-EXIST'; - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-comments.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-comments.php deleted file mode 100644 index 44fdcde4..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-comments.php +++ /dev/null @@ -1,503 +0,0 @@ -filter_comment( $comment ); - } - } - - return false; - } - - /** - * Initialize comments action listeners. - * Also responsible for initializing comment meta listeners. - * - * @access public - * - * @param callable $callable Action handler callable. - */ - public function init_listeners( $callable ) { - add_action( 'wp_insert_comment', $callable, 10, 2 ); - add_action( 'deleted_comment', $callable ); - add_action( 'trashed_comment', $callable ); - add_action( 'spammed_comment', $callable ); - add_action( 'trashed_post_comments', $callable, 10, 2 ); - add_action( 'untrash_post_comments', $callable ); - add_action( 'comment_approved_to_unapproved', $callable ); - add_action( 'comment_unapproved_to_approved', $callable ); - add_action( 'jetpack_modified_comment_contents', $callable, 10, 2 ); - add_action( 'untrashed_comment', $callable, 10, 2 ); - add_action( 'unspammed_comment', $callable, 10, 2 ); - add_filter( 'wp_update_comment_data', array( $this, 'handle_comment_contents_modification' ), 10, 3 ); - - // comment actions. - add_filter( 'jetpack_sync_before_enqueue_wp_insert_comment', array( $this, 'filter_jetpack_sync_before_enqueue_wp_insert_comment' ) ); - add_filter( 'jetpack_sync_before_enqueue_deleted_comment', array( $this, 'only_allow_white_listed_comment_types' ) ); - add_filter( 'jetpack_sync_before_enqueue_trashed_comment', array( $this, 'only_allow_white_listed_comment_types' ) ); - add_filter( 'jetpack_sync_before_enqueue_untrashed_comment', array( $this, 'only_allow_white_listed_comment_types' ) ); - add_filter( 'jetpack_sync_before_enqueue_spammed_comment', array( $this, 'only_allow_white_listed_comment_types' ) ); - add_filter( 'jetpack_sync_before_enqueue_unspammed_comment', array( $this, 'only_allow_white_listed_comment_types' ) ); - - // comment status transitions. - add_filter( 'jetpack_sync_before_enqueue_comment_approved_to_unapproved', array( $this, 'only_allow_white_listed_comment_type_transitions' ) ); - add_filter( 'jetpack_sync_before_enqueue_comment_unapproved_to_approved', array( $this, 'only_allow_white_listed_comment_type_transitions' ) ); - - // Post Actions. - add_filter( 'jetpack_sync_before_enqueue_trashed_post_comments', array( $this, 'filter_blacklisted_post_types' ) ); - add_filter( 'jetpack_sync_before_enqueue_untrash_post_comments', array( $this, 'filter_blacklisted_post_types' ) ); - - /** - * Even though it's messy, we implement these hooks because - * the edit_comment hook doesn't include the data - * so this saves us a DB read for every comment event. - */ - foreach ( $this->get_whitelisted_comment_types() as $comment_type ) { - foreach ( array( 'unapproved', 'approved' ) as $comment_status ) { - $comment_action_name = "comment_{$comment_status}_{$comment_type}"; - add_action( $comment_action_name, $callable, 10, 2 ); - add_filter( - 'jetpack_sync_before_enqueue_' . $comment_action_name, - array( - $this, - 'expand_wp_insert_comment', - ) - ); - } - } - - // Listen for meta changes. - $this->init_listeners_for_meta_type( 'comment', $callable ); - $this->init_meta_whitelist_handler( 'comment', array( $this, 'filter_meta' ) ); - } - - /** - * Handler for any comment content updates. - * - * @access public - * - * @param array $new_comment The new, processed comment data. - * @param array $old_comment The old, unslashed comment data. - * @param array $new_comment_with_slashes The new, raw comment data. - * @return array The new, processed comment data. - */ - public function handle_comment_contents_modification( $new_comment, $old_comment, $new_comment_with_slashes ) { - $changes = array(); - $content_fields = array( - 'comment_author', - 'comment_author_email', - 'comment_author_url', - 'comment_content', - ); - foreach ( $content_fields as $field ) { - if ( $new_comment_with_slashes[ $field ] !== $old_comment[ $field ] ) { - $changes[ $field ] = array( $new_comment[ $field ], $old_comment[ $field ] ); - } - } - - if ( ! empty( $changes ) ) { - /** - * Signals to the sync listener that this comment's contents were modified and a sync action - * reflecting the change(s) to the content should be sent - * - * @since 1.6.3 - * @since-jetpack 4.9.0 - * - * @param int $new_comment['comment_ID'] ID of comment whose content was modified - * @param mixed $changes Array of changed comment fields with before and after values - */ - do_action( 'jetpack_modified_comment_contents', $new_comment['comment_ID'], $changes ); - } - return $new_comment; - } - - /** - * Initialize comments action listeners for full sync. - * - * @access public - * - * @param callable $callable Action handler callable. - */ - public function init_full_sync_listeners( $callable ) { - add_action( 'jetpack_full_sync_comments', $callable ); // Also send comments meta. - } - - /** - * Gets a filtered list of comment types that sync can hook into. - * - * @access public - * - * @return array Defaults to [ '', 'trackback', 'pingback' ]. - */ - public function get_whitelisted_comment_types() { - /** - * Comment types present in this list will sync their status changes to WordPress.com. - * - * @since 1.6.3 - * @since-jetpack 7.6.0 - * - * @param array A list of comment types. - */ - return apply_filters( - 'jetpack_sync_whitelisted_comment_types', - array( '', 'comment', 'trackback', 'pingback', 'review' ) - ); - } - - /** - * Prevents any comment types that are not in the whitelist from being enqueued and sent to WordPress.com. - * - * @param array $args Arguments passed to wp_insert_comment, deleted_comment, spammed_comment, etc. - * - * @return bool or array $args Arguments passed to wp_insert_comment, deleted_comment, spammed_comment, etc. - */ - public function only_allow_white_listed_comment_types( $args ) { - $comment = false; - - if ( isset( $args[1] ) ) { - // comment object is available. - $comment = $args[1]; - } elseif ( is_numeric( $args[0] ) ) { - // comment_id is available. - $comment = get_comment( $args[0] ); - } - - if ( - isset( $comment->comment_type ) - && ! in_array( $comment->comment_type, $this->get_whitelisted_comment_types(), true ) - ) { - return false; - } - - return $args; - } - - /** - * Filter all blacklisted post types. - * - * @param array $args Hook arguments. - * @return array|false Hook arguments, or false if the post type is a blacklisted one. - */ - public function filter_blacklisted_post_types( $args ) { - $post_id = $args[0]; - $posts_module = Modules::get_module( 'posts' ); - - if ( false !== $posts_module && ! $posts_module->is_post_type_allowed( $post_id ) ) { - return false; - } - - return $args; - } - - /** - * Prevents any comment types that are not in the whitelist from being enqueued and sent to WordPress.com. - * - * @param array $args Arguments passed to wp_{old_status}_to_{new_status}. - * - * @return bool or array $args Arguments passed to wp_{old_status}_to_{new_status} - */ - public function only_allow_white_listed_comment_type_transitions( $args ) { - $comment = $args[0]; - - if ( ! in_array( $comment->comment_type, $this->get_whitelisted_comment_types(), true ) ) { - return false; - } - - return $args; - } - - /** - * Prevents any comment types that are not in the whitelist from being enqueued and sent to WordPress.com. - * Also expands comment data before being enqueued. - * - * @param array $args Arguments passed to wp_insert_comment. - * - * @return false or array $args Arguments passed to wp_insert_comment or false if the comment type is a blacklisted one. - */ - public function filter_jetpack_sync_before_enqueue_wp_insert_comment( $args ) { - if ( false === $this->only_allow_white_listed_comment_types( $args ) ) { - return false; - } - - return $this->expand_wp_insert_comment( $args ); - } - - /** - * Whether a comment type is allowed. - * A comment type is allowed if it's present in the comment type whitelist. - * - * @param int $comment_id ID of the comment. - * @return boolean Whether the comment type is allowed. - */ - public function is_comment_type_allowed( $comment_id ) { - $comment = get_comment( $comment_id ); - - if ( isset( $comment->comment_type ) ) { - return in_array( $comment->comment_type, $this->get_whitelisted_comment_types(), true ); - } - return false; - } - - /** - * Initialize the module in the sender. - * - * @access public - */ - public function init_before_send() { - // Full sync. - add_filter( 'jetpack_sync_before_send_jetpack_full_sync_comments', array( $this, 'expand_comment_ids' ) ); - } - - /** - * Enqueue the comments actions for full sync. - * - * @access public - * - * @param array $config Full sync configuration for this sync module. - * @param int $max_items_to_enqueue Maximum number of items to enqueue. - * @param boolean $state True if full sync has finished enqueueing this module, false otherwise. - * @return array Number of actions enqueued, and next module state. - */ - public function enqueue_full_sync_actions( $config, $max_items_to_enqueue, $state ) { - global $wpdb; - return $this->enqueue_all_ids_as_action( 'jetpack_full_sync_comments', $wpdb->comments, 'comment_ID', $this->get_where_sql( $config ), $max_items_to_enqueue, $state ); - } - - /** - * Retrieve an estimated number of actions that will be enqueued. - * - * @access public - * - * @param array $config Full sync configuration for this sync module. - * @return int Number of items yet to be enqueued. - */ - public function estimate_full_sync_actions( $config ) { - global $wpdb; - - $query = "SELECT count(*) FROM $wpdb->comments"; - - $where_sql = $this->get_where_sql( $config ); - if ( $where_sql ) { - $query .= ' WHERE ' . $where_sql; - } - - // TODO: Call $wpdb->prepare on the following query. - // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared - $count = $wpdb->get_var( $query ); - - return (int) ceil( $count / self::ARRAY_CHUNK_SIZE ); - } - - /** - * Retrieve the WHERE SQL clause based on the module config. - * - * @access public - * - * @param array $config Full sync configuration for this sync module. - * @return string WHERE SQL clause, or `null` if no comments are specified in the module config. - */ - public function get_where_sql( $config ) { - if ( is_array( $config ) ) { - return 'comment_ID IN (' . implode( ',', array_map( 'intval', $config ) ) . ')'; - } - - return '1=1'; - } - - /** - * Retrieve the actions that will be sent for this module during a full sync. - * - * @access public - * - * @return array Full sync actions of this module. - */ - public function get_full_sync_actions() { - return array( 'jetpack_full_sync_comments' ); - } - - /** - * Count all the actions that are going to be sent. - * - * @access public - * - * @param array $action_names Names of all the actions that will be sent. - * @return int Number of actions. - */ - public function count_full_sync_actions( $action_names ) { - return $this->count_actions( $action_names, array( 'jetpack_full_sync_comments' ) ); - } - - /** - * Expand the comment status change before the data is serialized and sent to the server. - * - * @access public - * @todo This is not used currently - let's implement it. - * - * @param array $args The hook parameters. - * @return array The expanded hook parameters. - */ - public function expand_wp_comment_status_change( $args ) { - return array( $args[0], $this->filter_comment( $args[1] ) ); - } - - /** - * Expand the comment creation before the data is added to the Sync queue. - * - * @access public - * - * @param array $args The hook parameters. - * @return array The expanded hook parameters. - */ - public function expand_wp_insert_comment( $args ) { - return array( $args[0], $this->filter_comment( $args[1] ) ); - } - - /** - * Filter a comment object to the fields we need. - * - * @access public - * - * @param \WP_Comment $comment The unfiltered comment object. - * @return \WP_Comment Filtered comment object. - */ - public function filter_comment( $comment ) { - /** - * Filters whether to prevent sending comment data to .com - * - * Passing true to the filter will prevent the comment data from being sent - * to the WordPress.com. - * Instead we pass data that will still enable us to do a checksum against the - * Jetpacks data but will prevent us from displaying the data on in the API as well as - * other services. - * - * @since 1.6.3 - * @since-jetpack 4.2.0 - * - * @param boolean false prevent post data from bing synced to WordPress.com - * @param mixed $comment WP_COMMENT object - */ - if ( apply_filters( 'jetpack_sync_prevent_sending_comment_data', false, $comment ) ) { - $blocked_comment = new \stdClass(); - $blocked_comment->comment_ID = $comment->comment_ID; - $blocked_comment->comment_date = $comment->comment_date; - $blocked_comment->comment_date_gmt = $comment->comment_date_gmt; - $blocked_comment->comment_approved = 'jetpack_sync_blocked'; - return $blocked_comment; - } - - return $comment; - } - - /** - * Whether a certain comment meta key is whitelisted for sync. - * - * @access public - * - * @param string $meta_key Comment meta key. - * @return boolean Whether the meta key is whitelisted. - */ - public function is_whitelisted_comment_meta( $meta_key ) { - return in_array( $meta_key, Settings::get_setting( 'comment_meta_whitelist' ), true ); - } - - /** - * Handler for filtering out non-whitelisted comment meta. - * - * @access public - * - * @param array $args Hook args. - * @return array|boolean False if not whitelisted, the original hook args otherwise. - */ - public function filter_meta( $args ) { - if ( $this->is_comment_type_allowed( $args[1] ) && $this->is_whitelisted_comment_meta( $args[2] ) ) { - return $args; - } - - return false; - } - - /** - * Expand the comment IDs to comment objects and meta before being serialized and sent to the server. - * - * @access public - * - * @param array $args The hook parameters. - * @return array The expanded hook parameters. - */ - public function expand_comment_ids( $args ) { - list( $comment_ids, $previous_interval_end ) = $args; - $comments = get_comments( - array( - 'include_unapproved' => true, - 'comment__in' => $comment_ids, - 'orderby' => 'comment_ID', - 'order' => 'DESC', - ) - ); - - return array( - $comments, - $this->get_metadata( $comment_ids, 'comment', Settings::get_setting( 'comment_meta_whitelist' ) ), - $previous_interval_end, - ); - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-constants.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-constants.php deleted file mode 100644 index ec913477..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-constants.php +++ /dev/null @@ -1,338 +0,0 @@ -constants_whitelist = $constants; - } - - /** - * Get the constants whitelist. - * - * @access public - * - * @return array The constants whitelist. - */ - public function get_constants_whitelist() { - return Defaults::get_constants_whitelist(); - } - - /** - * Enqueue the constants actions for full sync. - * - * @access public - * - * @param array $config Full sync configuration for this sync module. - * @param int $max_items_to_enqueue Maximum number of items to enqueue. - * @param boolean $state True if full sync has finished enqueueing this module, false otherwise. - * - * @return array Number of actions enqueued, and next module state. - */ - public function enqueue_full_sync_actions( $config, $max_items_to_enqueue, $state ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable - /** - * Tells the client to sync all constants to the server - * - * @param boolean Whether to expand constants (should always be true) - * - * @since 1.6.3 - * @since-jetpack 4.2.0 - */ - do_action( 'jetpack_full_sync_constants', true ); - - // The number of actions enqueued, and next module state (true == done). - return array( 1, true ); - } - - /** - * Send the constants actions for full sync. - * - * @access public - * - * @param array $config Full sync configuration for this sync module. - * @param int $send_until The timestamp until the current request can send. - * @param array $state This module Full Sync status. - * - * @return array This module Full Sync status. - */ - public function send_full_sync_actions( $config, $send_until, $state ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable - // we call this instead of do_action when sending immediately. - $this->send_action( 'jetpack_full_sync_constants', array( true ) ); - - // The number of actions enqueued, and next module state (true == done). - return array( 'finished' => true ); - } - - /** - * Retrieve an estimated number of actions that will be enqueued. - * - * @access public - * - * @param array $config Full sync configuration for this sync module. - * - * @return array Number of items yet to be enqueued. - */ - public function estimate_full_sync_actions( $config ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable - return 1; - } - - /** - * Retrieve the actions that will be sent for this module during a full sync. - * - * @access public - * - * @return array Full sync actions of this module. - */ - public function get_full_sync_actions() { - return array( 'jetpack_full_sync_constants' ); - } - - /** - * Sync the constants if we're supposed to. - * - * @access public - */ - public function maybe_sync_constants() { - if ( get_transient( self::CONSTANTS_AWAIT_TRANSIENT_NAME ) ) { - return; - } - - set_transient( self::CONSTANTS_AWAIT_TRANSIENT_NAME, microtime( true ), Defaults::$default_sync_constants_wait_time ); - - $constants = $this->get_all_constants(); - if ( empty( $constants ) ) { - return; - } - - $constants_checksums = (array) get_option( self::CONSTANTS_CHECKSUM_OPTION_NAME, array() ); - - foreach ( $constants as $name => $value ) { - $checksum = $this->get_check_sum( $value ); - // Explicitly not using Identical comparison as get_option returns a string. - if ( ! $this->still_valid_checksum( $constants_checksums, $name, $checksum ) && $value !== null ) { - /** - * Tells the client to sync a constant to the server - * - * @param string The name of the constant - * @param mixed The value of the constant - * - * @since 1.6.3 - * @since-jetpack 4.2.0 - */ - do_action( 'jetpack_sync_constant', $name, $value ); - $constants_checksums[ $name ] = $checksum; - } else { - $constants_checksums[ $name ] = $checksum; - } - } - update_option( self::CONSTANTS_CHECKSUM_OPTION_NAME, $constants_checksums ); - } - - /** - * Retrieve all constants as per the current constants whitelist. - * Public so that we don't have to store an option for each constant. - * - * @access public - * - * @return array All constants. - */ - public function get_all_constants() { - $constants_whitelist = $this->get_constants_whitelist(); - - return array_combine( - $constants_whitelist, - array_map( array( $this, 'get_constant' ), $constants_whitelist ) - ); - } - - /** - * Retrieve the value of a constant. - * Used as a wrapper to standartize access to constants. - * - * @access private - * - * @param string $constant Constant name. - * - * @return mixed Return value of the constant. - */ - private function get_constant( $constant ) { - return ( defined( $constant ) ) ? - constant( $constant ) - : null; - } - - /** - * Expand the constants within a hook before they are serialized and sent to the server. - * - * @access public - * - * @param array $args The hook parameters. - * - * @return array $args The hook parameters. - */ - public function expand_constants( $args ) { - if ( $args[0] ) { - $constants = $this->get_all_constants(); - $constants_checksums = array(); - foreach ( $constants as $name => $value ) { - $constants_checksums[ $name ] = $this->get_check_sum( $value ); - } - update_option( self::CONSTANTS_CHECKSUM_OPTION_NAME, $constants_checksums ); - - return $constants; - } - - return $args; - } - - /** - * Return Total number of objects. - * - * @param array $config Full Sync config. - * - * @return int total - */ - public function total( $config ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable - return count( $this->get_constants_whitelist() ); - } - - /** - * Retrieve a set of constants by their IDs. - * - * @access public - * - * @param string $object_type Object type. - * @param array $ids Object IDs. - * @return array Array of objects. - */ - public function get_objects_by_id( $object_type, $ids ) { - if ( empty( $ids ) || empty( $object_type ) || 'constant' !== $object_type ) { - return array(); - } - - $objects = array(); - foreach ( (array) $ids as $id ) { - $object = $this->get_object_by_id( $object_type, $id ); - - if ( 'all' === $id ) { - // If all was requested it contains all options and can simply be returned. - return $object; - } - $objects[ $id ] = $object; - } - - return $objects; - } - - /** - * Retrieve a constant by its name. - * - * @access public - * - * @param string $object_type Type of the sync object. - * @param string $id ID of the sync object. - * @return mixed Value of Constant. - */ - public function get_object_by_id( $object_type, $id ) { - if ( 'constant' === $object_type ) { - - // Only whitelisted constants can be returned. - if ( in_array( $id, $this->get_constants_whitelist(), true ) ) { - return $this->get_constant( $id ); - } elseif ( 'all' === $id ) { - return $this->get_all_constants(); - } - } - - return false; - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-full-sync-immediately.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-full-sync-immediately.php deleted file mode 100644 index 94b7e91b..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-full-sync-immediately.php +++ /dev/null @@ -1,469 +0,0 @@ -is_started() && ! $this->is_finished() ) { - /** - * Fires when a full sync is cancelled. - * - * @since 1.6.3 - * @since-jetpack 4.2.0 - */ - do_action( 'jetpack_full_sync_cancelled' ); - $this->send_action( 'jetpack_full_sync_cancelled' ); - } - - // Remove all evidence of previous full sync items and status. - $this->reset_data(); - - if ( ! is_array( $full_sync_config ) ) { - $full_sync_config = Defaults::$default_full_sync_config; - if ( is_multisite() ) { - $full_sync_config['network_options'] = 1; - } - } - - if ( isset( $full_sync_config['users'] ) && 'initial' === $full_sync_config['users'] ) { - $full_sync_config['users'] = Modules::get_module( 'users' )->get_initial_sync_user_config(); - } - - $this->update_status( - array( - 'started' => time(), - 'config' => $full_sync_config, - 'progress' => $this->get_initial_progress( $full_sync_config ), - ) - ); - - $range = $this->get_content_range(); - /** - * Fires when a full sync begins. This action is serialized - * and sent to the server so that it knows a full sync is coming. - * - * @param array $full_sync_config Sync configuration for all sync modules. - * @param array $range Range of the sync items, containing min and max IDs for some item types. - * @param array $empty The modules with no items to sync during a full sync. - * - * @since 1.6.3 - * @since-jetpack 4.2.0 - * @since-jetpack 7.3.0 Added $range arg. - * @since-jetpack 7.4.0 Added $empty arg. - */ - do_action( 'jetpack_full_sync_start', $full_sync_config, $range ); - $this->send_action( 'jetpack_full_sync_start', array( $full_sync_config, $range ) ); - - return true; - } - - /** - * Whether full sync has started. - * - * @access public - * - * @return boolean - */ - public function is_started() { - return (bool) $this->get_status()['started']; - } - - /** - * Retrieve the status of the current full sync. - * - * @access public - * - * @return array Full sync status. - */ - public function get_status() { - $default = array( - 'started' => false, - 'finished' => false, - 'progress' => array(), - 'config' => array(), - ); - - return wp_parse_args( \Jetpack_Options::get_raw_option( self::STATUS_OPTION ), $default ); - } - - /** - * Returns the progress percentage of a full sync. - * - * @access public - * - * @return int|null - */ - public function get_sync_progress_percentage() { - if ( ! $this->is_started() || $this->is_finished() ) { - return null; - } - $status = $this->get_status(); - if ( empty( $status['progress'] ) ) { - return null; - } - $total_items = array_reduce( - array_values( $status['progress'] ), - function ( $sum, $sync_item ) { - return isset( $sync_item['total'] ) ? ( $sum + (int) $sync_item['total'] ) : $sum; - }, - 0 - ); - $total_sent = array_reduce( - array_values( $status['progress'] ), - function ( $sum, $sync_item ) { - return isset( $sync_item['sent'] ) ? ( $sum + (int) $sync_item['sent'] ) : $sum; - }, - 0 - ); - return floor( ( $total_sent / $total_items ) * 100 ); - } - - /** - * Whether full sync has finished. - * - * @access public - * - * @return boolean - */ - public function is_finished() { - return (bool) $this->get_status()['finished']; - } - - /** - * Clear all the full sync data. - * - * @access public - */ - public function reset_data() { - $this->clear_status(); - ( new Lock() )->remove( self::LOCK_NAME, true ); - } - - /** - * Clear all the full sync status options. - * - * @access public - */ - public function clear_status() { - \Jetpack_Options::delete_raw_option( self::STATUS_OPTION ); - } - - /** - * Updates the status of the current full sync. - * - * @access public - * - * @param array $values New values to set. - * - * @return bool True if success. - */ - public function update_status( $values ) { - return $this->set_status( wp_parse_args( $values, $this->get_status() ) ); - } - - /** - * Retrieve the status of the current full sync. - * - * @param array $values New values to set. - * - * @access public - * - * @return boolean Full sync status. - */ - public function set_status( $values ) { - return \Jetpack_Options::update_raw_option( self::STATUS_OPTION, $values ); - } - - /** - * Given an initial Full Sync configuration get the initial status. - * - * @param array $full_sync_config Full sync configuration. - * - * @return array Initial Sent status. - */ - public function get_initial_progress( $full_sync_config ) { - // Set default configuration, calculate totals, and save configuration if totals > 0. - $status = array(); - foreach ( $full_sync_config as $name => $config ) { - $module = Modules::get_module( $name ); - if ( ! $module ) { - continue; - } - $status[ $name ] = array( - 'total' => $module->total( $config ), - 'sent' => 0, - 'finished' => false, - ); - } - - return $status; - } - - /** - * Get the range for content (posts and comments) to sync. - * - * @access private - * - * @return array Array of range (min ID, max ID, total items) for all content types. - */ - private function get_content_range() { - $range = array(); - $config = $this->get_status()['config']; - // Add range only when syncing all objects. - if ( true === isset( $config['posts'] ) && $config['posts'] ) { - $range['posts'] = $this->get_range( 'posts' ); - } - - if ( true === isset( $config['comments'] ) && $config['comments'] ) { - $range['comments'] = $this->get_range( 'comments' ); - } - - return $range; - } - - /** - * Get the range (min ID, max ID and total items) of items to sync. - * - * @access public - * - * @param string $type Type of sync item to get the range for. - * - * @return array Array of min ID, max ID and total items in the range. - */ - public function get_range( $type ) { - global $wpdb; - if ( ! in_array( $type, array( 'comments', 'posts' ), true ) ) { - return array(); - } - - switch ( $type ) { - case 'posts': - $table = $wpdb->posts; - $id = 'ID'; - $where_sql = Settings::get_blacklisted_post_types_sql(); - - break; - case 'comments': - $table = $wpdb->comments; - $id = 'comment_ID'; - $where_sql = Settings::get_comments_filter_sql(); - break; - } - - // TODO: Call $wpdb->prepare on the following query. - // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared - $results = $wpdb->get_results( "SELECT MAX({$id}) as max, MIN({$id}) as min, COUNT({$id}) as count FROM {$table} WHERE {$where_sql}" ); - if ( isset( $results[0] ) ) { - return $results[0]; - } - - return array(); - } - - /** - * Continue sending instead of enqueueing. - * - * @access public - */ - public function continue_enqueuing() { - $this->continue_sending(); - } - - /** - * Continue sending. - * - * @access public - */ - public function continue_sending() { - // Return early if Full Sync is not running. - if ( ! $this->is_started() || $this->get_status()['finished'] ) { - return; - } - - // Return early if we've gotten a retry-after header response. - $retry_time = get_option( Actions::RETRY_AFTER_PREFIX . 'immediate-send' ); - if ( $retry_time ) { - // If expired delete but don't send. Send will occurr in new request to avoid race conditions. - if ( microtime( true ) > $retry_time ) { - update_option( Actions::RETRY_AFTER_PREFIX . 'immediate-send', false, false ); - } - return false; - } - - // Obtain send Lock. - $lock = new Lock(); - $lock_expiration = $lock->attempt( self::LOCK_NAME ); - - // Return if unable to obtain lock. - if ( false === $lock_expiration ) { - return; - } - - // Send Full Sync actions. - $success = $this->send(); - - // Remove lock. - if ( $success ) { - $lock->remove( self::LOCK_NAME, $lock_expiration ); - } - } - - /** - * Immediately send the next items to full sync. - * - * @access public - */ - public function send() { - $config = $this->get_status()['config']; - - $max_duration = Settings::get_setting( 'full_sync_send_duration' ); - $send_until = microtime( true ) + $max_duration; - - $progress = $this->get_status()['progress']; - - foreach ( $this->get_remaining_modules_to_send() as $module ) { - $progress[ $module->name() ] = $module->send_full_sync_actions( $config[ $module->name() ], $progress[ $module->name() ], $send_until ); - if ( isset( $progress[ $module->name() ]['error'] ) ) { - unset( $progress[ $module->name() ]['error'] ); - $this->update_status( array( 'progress' => $progress ) ); - return false; - } elseif ( ! $progress[ $module->name() ]['finished'] ) { - $this->update_status( array( 'progress' => $progress ) ); - return true; - } - } - - $this->send_full_sync_end(); - $this->update_status( array( 'progress' => $progress ) ); - return true; - } - - /** - * Get Modules that are configured to Full Sync and haven't finished sending - * - * @return array - */ - public function get_remaining_modules_to_send() { - $status = $this->get_status(); - - return array_filter( - Modules::get_modules(), - /** - * Select configured and not finished modules. - * - * @return bool - * @var $module Module - */ - function ( $module ) use ( $status ) { - // Skip module if not configured for this sync or module is done. - if ( ! isset( $status['config'][ $module->name() ] ) ) { - return false; - } - if ( ! $status['config'][ $module->name() ] ) { - return false; - } - if ( isset( $status['progress'][ $module->name() ]['finished'] ) ) { - if ( true === $status['progress'][ $module->name() ]['finished'] ) { - return false; - } - } - - return true; - } - ); - } - - /** - * Send 'jetpack_full_sync_end' and update 'finished' status. - * - * @access public - */ - public function send_full_sync_end() { - $range = $this->get_content_range(); - - /** - * Fires when a full sync ends. This action is serialized - * and sent to the server. - * - * @param string $checksum Deprecated since 7.3.0 - @see https://github.com/Automattic/jetpack/pull/11945/ - * @param array $range Range of the sync items, containing min and max IDs for some item types. - * - * @since 1.6.3 - * @since-jetpack 4.2.0 - * @since-jetpack 7.3.0 Added $range arg. - */ - do_action( 'jetpack_full_sync_end', '', $range ); - $this->send_action( 'jetpack_full_sync_end', array( '', $range ) ); - - // Setting autoload to true means that it's faster to check whether we should continue enqueuing. - $this->update_status( array( 'finished' => time() ) ); - } - - /** - * Empty Function as we don't close buffers on Immediate Full Sync. - * - * @param array $actions an array of actions, ignored for queueless sync. - */ - public function update_sent_progress_action( $actions ) { } // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-full-sync.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-full-sync.php deleted file mode 100644 index a03506e5..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-full-sync.php +++ /dev/null @@ -1,729 +0,0 @@ -is_started() && ! $this->is_finished(); - - // Remove all evidence of previous full sync items and status. - $this->reset_data(); - - if ( $was_already_running ) { - /** - * Fires when a full sync is cancelled. - * - * @since 1.6.3 - * @since-jetpack 4.2.0 - */ - do_action( 'jetpack_full_sync_cancelled' ); - } - - $this->update_status_option( 'started', time() ); - $this->update_status_option( 'params', $module_configs ); - - $enqueue_status = array(); - $full_sync_config = array(); - $include_empty = false; - $empty = array(); - - // Default value is full sync. - if ( ! is_array( $module_configs ) ) { - $module_configs = array(); - $include_empty = true; - foreach ( Modules::get_modules() as $module ) { - $module_configs[ $module->name() ] = true; - } - } - - // Set default configuration, calculate totals, and save configuration if totals > 0. - foreach ( Modules::get_modules() as $module ) { - $module_name = $module->name(); - $module_config = isset( $module_configs[ $module_name ] ) ? $module_configs[ $module_name ] : false; - - if ( ! $module_config ) { - continue; - } - - if ( 'users' === $module_name && 'initial' === $module_config ) { - $module_config = $module->get_initial_sync_user_config(); - } - - $enqueue_status[ $module_name ] = false; - - $total_items = $module->estimate_full_sync_actions( $module_config ); - - // If there's information to process, configure this module. - if ( $total_items !== null && $total_items > 0 ) { - $full_sync_config[ $module_name ] = $module_config; - $enqueue_status[ $module_name ] = array( - $total_items, // Total. - 0, // Queued. - false, // Current state. - ); - } elseif ( $include_empty && 0 === $total_items ) { - $empty[ $module_name ] = true; - } - } - - $this->set_config( $full_sync_config ); - $this->set_enqueue_status( $enqueue_status ); - - $range = $this->get_content_range( $full_sync_config ); - /** - * Fires when a full sync begins. This action is serialized - * and sent to the server so that it knows a full sync is coming. - * - * @since 1.6.3 - * @since-jetpack 4.2.0 - * @since-jetpack 7.3.0 Added $range arg. - * @since-jetpack 7.4.0 Added $empty arg. - * - * @param array $full_sync_config Sync configuration for all sync modules. - * @param array $range Range of the sync items, containing min and max IDs for some item types. - * @param array $empty The modules with no items to sync during a full sync. - */ - do_action( 'jetpack_full_sync_start', $full_sync_config, $range, $empty ); - - $this->continue_enqueuing( $full_sync_config ); - - return true; - } - - /** - * Enqueue the next items to sync. - * - * @access public - * - * @param array $configs Full sync configuration for all sync modules. - */ - public function continue_enqueuing( $configs = null ) { - // Return early if not in progress. - if ( ! $this->get_status_option( 'started' ) || $this->get_status_option( 'queue_finished' ) ) { - return; - } - - // Attempt to obtain lock. - $lock = new Lock(); - $lock_expiration = $lock->attempt( self::ENQUEUE_LOCK_NAME ); - - // Return if unable to obtain lock. - if ( false === $lock_expiration ) { - return; - } - - // enqueue full sync actions. - $this->enqueue( $configs ); - - // Remove lock. - $lock->remove( self::ENQUEUE_LOCK_NAME, $lock_expiration ); - } - - /** - * Get Modules that are configured to Full Sync and haven't finished enqueuing - * - * @param array $configs Full sync configuration for all sync modules. - * - * @return array - */ - public function get_remaining_modules_to_enqueue( $configs ) { - $enqueue_status = $this->get_enqueue_status(); - return array_filter( - Modules::get_modules(), - /** - * Select configured and not finished modules. - * - * @var $module Module - * @return bool - */ - function ( $module ) use ( $configs, $enqueue_status ) { - // Skip module if not configured for this sync or module is done. - if ( ! isset( $configs[ $module->name() ] ) ) { - return false; - } - if ( ! $configs[ $module->name() ] ) { - return false; - } - if ( isset( $enqueue_status[ $module->name() ][2] ) ) { - if ( true === $enqueue_status[ $module->name() ][2] ) { - return false; - } - } - - return true; - } - ); - } - - /** - * Enqueue the next items to sync. - * - * @access public - * - * @param array $configs Full sync configuration for all sync modules. - */ - public function enqueue( $configs = null ) { - if ( ! $configs ) { - $configs = $this->get_config(); - } - - $enqueue_status = $this->get_enqueue_status(); - $full_sync_queue = new Queue( 'full_sync' ); - $available_queue_slots = Settings::get_setting( 'max_queue_size_full_sync' ) - $full_sync_queue->size(); - - if ( $available_queue_slots <= 0 ) { - return; - } - - $remaining_items_to_enqueue = min( Settings::get_setting( 'max_enqueue_full_sync' ), $available_queue_slots ); - - /** - * If a module exits early (e.g. because it ran out of full sync queue slots, or we ran out of request time) - * then it should exit early - */ - foreach ( $this->get_remaining_modules_to_enqueue( $configs ) as $module ) { - list( $items_enqueued, $next_enqueue_state ) = $module->enqueue_full_sync_actions( $configs[ $module->name() ], $remaining_items_to_enqueue, $enqueue_status[ $module->name() ][2] ); - - $enqueue_status[ $module->name() ][2] = $next_enqueue_state; - - // If items were processed, subtract them from the limit. - if ( $items_enqueued !== null && $items_enqueued > 0 ) { - $enqueue_status[ $module->name() ][1] += $items_enqueued; - $remaining_items_to_enqueue -= $items_enqueued; - } - - if ( 0 >= $remaining_items_to_enqueue || true !== $next_enqueue_state ) { - $this->set_enqueue_status( $enqueue_status ); - return; - } - } - - $this->queue_full_sync_end( $configs ); - $this->set_enqueue_status( $enqueue_status ); - } - - /** - * Enqueue 'jetpack_full_sync_end' and update 'queue_finished' status. - * - * @access public - * - * @param array $configs Full sync configuration for all sync modules. - */ - public function queue_full_sync_end( $configs ) { - $range = $this->get_content_range( $configs ); - - /** - * Fires when a full sync ends. This action is serialized - * and sent to the server. - * - * @since 1.6.3 - * @since-jetpack 4.2.0 - * @since-jetpack 7.3.0 Added $range arg. - * - * @param string $checksum Deprecated since 7.3.0 - @see https://github.com/Automattic/jetpack/pull/11945/ - * @param array $range Range of the sync items, containing min and max IDs for some item types. - */ - do_action( 'jetpack_full_sync_end', '', $range ); - - // Setting autoload to true means that it's faster to check whether we should continue enqueuing. - $this->update_status_option( 'queue_finished', time(), true ); - } - - /** - * Get the range (min ID, max ID and total items) of items to sync. - * - * @access public - * - * @param string $type Type of sync item to get the range for. - * @return array Array of min ID, max ID and total items in the range. - */ - public function get_range( $type ) { - global $wpdb; - if ( ! in_array( $type, array( 'comments', 'posts' ), true ) ) { - return array(); - } - - switch ( $type ) { - case 'posts': - $table = $wpdb->posts; - $id = 'ID'; - $where_sql = Settings::get_blacklisted_post_types_sql(); - - break; - case 'comments': - $table = $wpdb->comments; - $id = 'comment_ID'; - $where_sql = Settings::get_comments_filter_sql(); - break; - } - - // TODO: Call $wpdb->prepare on the following query. - // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared - $results = $wpdb->get_results( "SELECT MAX({$id}) as max, MIN({$id}) as min, COUNT({$id}) as count FROM {$table} WHERE {$where_sql}" ); - if ( isset( $results[0] ) ) { - return $results[0]; - } - - return array(); - } - - /** - * Get the range for content (posts and comments) to sync. - * - * @access private - * - * @param array $config Full sync configuration for this all sync modules. - * @return array Array of range (min ID, max ID, total items) for all content types. - */ - private function get_content_range( $config ) { - $range = array(); - // Only when we are sending the whole range do we want to send also the range. - if ( true === isset( $config['posts'] ) && $config['posts'] ) { - $range['posts'] = $this->get_range( 'posts' ); - } - - if ( true === isset( $config['comments'] ) && $config['comments'] ) { - $range['comments'] = $this->get_range( 'comments' ); - } - return $range; - } - - /** - * Update the progress after sync modules actions have been processed on the server. - * - * @access public - * - * @param array $actions Actions that have been processed on the server. - */ - public function update_sent_progress_action( $actions ) { - // Quick way to map to first items with an array of arrays. - $actions_with_counts = array_count_values( array_filter( array_map( array( $this, 'get_action_name' ), $actions ) ) ); - - // Total item counts for each action. - $actions_with_total_counts = $this->get_actions_totals( $actions ); - - if ( ! $this->is_started() || $this->is_finished() ) { - return; - } - - if ( isset( $actions_with_counts['jetpack_full_sync_start'] ) ) { - $this->update_status_option( 'send_started', time() ); - } - - foreach ( Modules::get_modules() as $module ) { - $module_actions = $module->get_full_sync_actions(); - $status_option_name = "{$module->name()}_sent"; - $total_option_name = "{$status_option_name}_total"; - $items_sent = $this->get_status_option( $status_option_name, 0 ); - $items_sent_total = $this->get_status_option( $total_option_name, 0 ); - - foreach ( $module_actions as $module_action ) { - if ( isset( $actions_with_counts[ $module_action ] ) ) { - $items_sent += $actions_with_counts[ $module_action ]; - } - - if ( ! empty( $actions_with_total_counts[ $module_action ] ) ) { - $items_sent_total += $actions_with_total_counts[ $module_action ]; - } - } - - if ( $items_sent > 0 ) { - $this->update_status_option( $status_option_name, $items_sent ); - } - - if ( 0 !== $items_sent_total ) { - $this->update_status_option( $total_option_name, $items_sent_total ); - } - } - - if ( isset( $actions_with_counts['jetpack_full_sync_end'] ) ) { - $this->update_status_option( 'finished', time() ); - } - } - - /** - * Returns the progress percentage of a full sync. - * - * @access public - * - * @return int|null - */ - public function get_sync_progress_percentage() { - if ( ! $this->is_started() || $this->is_finished() ) { - return null; - } - $status = $this->get_status(); - if ( ! $status['queue'] || ! $status['sent'] || ! $status['total'] ) { - return null; - } - $queued_multiplier = 0.1; - $sent_multiplier = 0.9; - $count_queued = array_reduce( - $status['queue'], - function ( $sum, $value ) { - return $sum + $value; - }, - 0 - ); - $count_sent = array_reduce( - $status['sent'], - function ( $sum, $value ) { - return $sum + $value; - }, - 0 - ); - $count_total = array_reduce( - $status['total'], - function ( $sum, $value ) { - return $sum + $value; - }, - 0 - ); - $percent_queued = ( $count_queued / $count_total ) * $queued_multiplier * 100; - $percent_sent = ( $count_sent / $count_total ) * $sent_multiplier * 100; - return ceil( $percent_queued + $percent_sent ); - } - - /** - * Get the name of the action for an item in the sync queue. - * - * @access public - * - * @param array $queue_item Item of the sync queue. - * @return string|boolean Name of the action, false if queue item is invalid. - */ - public function get_action_name( $queue_item ) { - if ( is_array( $queue_item ) && isset( $queue_item[0] ) ) { - return $queue_item[0]; - } - return false; - } - - /** - * Retrieve the total number of items we're syncing in a particular queue item (action). - * `$queue_item[1]` is expected to contain chunks of items, and `$queue_item[1][0]` - * represents the first (and only) chunk of items to sync in that action. - * - * @access public - * - * @param array $queue_item Item of the sync queue that corresponds to a particular action. - * @return int Total number of items in the action. - */ - public function get_action_totals( $queue_item ) { - if ( is_array( $queue_item ) && isset( $queue_item[1][0] ) ) { - if ( is_array( $queue_item[1][0] ) ) { - // Let's count the items we sync in this action. - return count( $queue_item[1][0] ); - } - // -1 indicates that this action syncs all items by design. - return -1; - } - return 0; - } - - /** - * Retrieve the total number of items for a set of actions, grouped by action name. - * - * @access public - * - * @param array $actions An array of actions. - * @return array An array, representing the total number of items, grouped per action. - */ - public function get_actions_totals( $actions ) { - $totals = array(); - - foreach ( $actions as $action ) { - $name = $this->get_action_name( $action ); - $action_totals = $this->get_action_totals( $action ); - if ( ! isset( $totals[ $name ] ) ) { - $totals[ $name ] = 0; - } - $totals[ $name ] += $action_totals; - } - - return $totals; - } - - /** - * Whether full sync has started. - * - * @access public - * - * @return boolean - */ - public function is_started() { - return (bool) $this->get_status_option( 'started' ); - } - - /** - * Whether full sync has finished. - * - * @access public - * - * @return boolean - */ - public function is_finished() { - return (bool) $this->get_status_option( 'finished' ); - } - - /** - * Retrieve the status of the current full sync. - * - * @access public - * - * @return array Full sync status. - */ - public function get_status() { - $status = array( - 'started' => $this->get_status_option( 'started' ), - 'queue_finished' => $this->get_status_option( 'queue_finished' ), - 'send_started' => $this->get_status_option( 'send_started' ), - 'finished' => $this->get_status_option( 'finished' ), - 'sent' => array(), - 'sent_total' => array(), - 'queue' => array(), - 'config' => $this->get_status_option( 'params' ), - 'total' => array(), - ); - - $enqueue_status = $this->get_enqueue_status(); - - foreach ( Modules::get_modules() as $module ) { - $name = $module->name(); - - if ( ! isset( $enqueue_status[ $name ] ) ) { - continue; - } - - list( $total, $queued ) = $enqueue_status[ $name ]; - - if ( $total ) { - $status['total'][ $name ] = $total; - } - - if ( $queued ) { - $status['queue'][ $name ] = $queued; - } - - $sent = $this->get_status_option( "{$name}_sent" ); - if ( $sent ) { - $status['sent'][ $name ] = $sent; - } - - $sent_total = $this->get_status_option( "{$name}_sent_total" ); - if ( $sent_total ) { - $status['sent_total'][ $name ] = $sent_total; - } - } - - return $status; - } - - /** - * Clear all the full sync status options. - * - * @access public - */ - public function clear_status() { - $prefix = self::STATUS_OPTION_PREFIX; - \Jetpack_Options::delete_raw_option( "{$prefix}_started" ); - \Jetpack_Options::delete_raw_option( "{$prefix}_params" ); - \Jetpack_Options::delete_raw_option( "{$prefix}_queue_finished" ); - \Jetpack_Options::delete_raw_option( "{$prefix}_send_started" ); - \Jetpack_Options::delete_raw_option( "{$prefix}_finished" ); - - $this->delete_enqueue_status(); - - foreach ( Modules::get_modules() as $module ) { - \Jetpack_Options::delete_raw_option( "{$prefix}_{$module->name()}_sent" ); - \Jetpack_Options::delete_raw_option( "{$prefix}_{$module->name()}_sent_total" ); - } - } - - /** - * Clear all the full sync data. - * - * @access public - */ - public function reset_data() { - $this->clear_status(); - $this->delete_config(); - ( new Lock() )->remove( self::ENQUEUE_LOCK_NAME, true ); - - $listener = Listener::get_instance(); - $listener->get_full_sync_queue()->reset(); - } - - /** - * Get the value of a full sync status option. - * - * @access private - * - * @param string $name Name of the option. - * @param mixed $default Default value of the option. - * @return mixed Option value. - */ - private function get_status_option( $name, $default = null ) { - $value = \Jetpack_Options::get_raw_option( self::STATUS_OPTION_PREFIX . "_$name", $default ); - - return is_numeric( $value ) ? (int) $value : $value; - } - - /** - * Update the value of a full sync status option. - * - * @access private - * - * @param string $name Name of the option. - * @param mixed $value Value of the option. - * @param boolean $autoload Whether the option should be autoloaded at the beginning of the request. - */ - private function update_status_option( $name, $value, $autoload = false ) { - \Jetpack_Options::update_raw_option( self::STATUS_OPTION_PREFIX . "_$name", $value, $autoload ); - } - - /** - * Set the full sync enqueue status. - * - * @access private - * - * @param array $new_status The new full sync enqueue status. - */ - private function set_enqueue_status( $new_status ) { - \Jetpack_Options::update_raw_option( 'jetpack_sync_full_enqueue_status', $new_status ); - } - - /** - * Delete full sync enqueue status. - * - * @access private - * - * @return boolean Whether the status was deleted. - */ - private function delete_enqueue_status() { - return \Jetpack_Options::delete_raw_option( 'jetpack_sync_full_enqueue_status' ); - } - - /** - * Retrieve the current full sync enqueue status. - * - * @access private - * - * @return array Full sync enqueue status. - */ - public function get_enqueue_status() { - return \Jetpack_Options::get_raw_option( 'jetpack_sync_full_enqueue_status' ); - } - - /** - * Set the full sync enqueue configuration. - * - * @access private - * - * @param array $config The new full sync enqueue configuration. - */ - private function set_config( $config ) { - \Jetpack_Options::update_raw_option( 'jetpack_sync_full_config', $config ); - } - - /** - * Delete full sync configuration. - * - * @access private - * - * @return boolean Whether the configuration was deleted. - */ - private function delete_config() { - return \Jetpack_Options::delete_raw_option( 'jetpack_sync_full_config' ); - } - - /** - * Retrieve the current full sync enqueue config. - * - * @access private - * - * @return array Full sync enqueue config. - */ - private function get_config() { - return \Jetpack_Options::get_raw_option( 'jetpack_sync_full_config' ); - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-import.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-import.php deleted file mode 100644 index f5f8543a..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-import.php +++ /dev/null @@ -1,220 +0,0 @@ - 'jetpack_sync_import_start', - 'import_done' => 'jetpack_sync_import_end', - 'import_end' => 'jetpack_sync_import_end', - ); - - /** - * Sync module name. - * - * @access public - * - * @return string - */ - public function name() { - return 'import'; - } - - /** - * Initialize imports action listeners. - * - * @access public - * - * @param callable $callable Action handler callable. - */ - public function init_listeners( $callable ) { - add_action( 'export_wp', $callable ); - add_action( 'jetpack_sync_import_start', $callable, 10, 2 ); - add_action( 'jetpack_sync_import_end', $callable, 10, 2 ); - - // WordPress. - add_action( 'import_start', array( $this, 'sync_import_action' ) ); - - // Movable type, RSS, Livejournal. - add_action( 'import_done', array( $this, 'sync_import_action' ) ); - - // WordPress, Blogger, Livejournal, woo tax rate. - add_action( 'import_end', array( $this, 'sync_import_action' ) ); - } - - /** - * Set module defaults. - * Define an empty list of synced actions for us to fill later. - * - * @access public - */ - public function set_defaults() { - $this->synced_actions = array(); - } - - /** - * Generic handler for import actions. - * - * @access public - * - * @param string $importer Either a string reported by the importer, the class name of the importer, or 'unknown'. - */ - public function sync_import_action( $importer ) { - $import_action = current_filter(); - // Map action to event name. - $sync_action = self::$import_sync_action_map[ $import_action ]; - - // Only sync each action once per import. - if ( array_key_exists( $sync_action, $this->synced_actions ) && $this->synced_actions[ $sync_action ] ) { - return; - } - - // Mark this action as synced. - $this->synced_actions[ $sync_action ] = true; - - // Prefer self-reported $importer value. - if ( ! $importer ) { - // Fall back to inferring by calling class name. - $importer = self::get_calling_importer_class(); - } - - // Get $importer from known_importers. - $known_importers = Settings::get_setting( 'known_importers' ); - if ( is_string( $importer ) && isset( $known_importers[ $importer ] ) ) { - $importer = $known_importers[ $importer ]; - } - - $importer_name = $this->get_importer_name( $importer ); - - switch ( $sync_action ) { - case 'jetpack_sync_import_start': - /** - * Used for syncing the start of an import - * - * @since 1.6.3 - * @since-jetpack 7.3.0 - * - * @module sync - * - * @param string $importer Either a string reported by the importer, the class name of the importer, or 'unknown'. - * @param string $importer_name The name reported by the importer, or 'Unknown Importer'. - */ - do_action( 'jetpack_sync_import_start', $importer, $importer_name ); - break; - - case 'jetpack_sync_import_end': - /** - * Used for syncing the end of an import - * - * @since 1.6.3 - * @since-jetpack 7.3.0 - * - * @module sync - * - * @param string $importer Either a string reported by the importer, the class name of the importer, or 'unknown'. - * @param string $importer_name The name reported by the importer, or 'Unknown Importer'. - */ - do_action( 'jetpack_sync_import_end', $importer, $importer_name ); - break; - } - } - - /** - * Retrieve the name of the importer. - * - * @access private - * - * @param string $importer Either a string reported by the importer, the class name of the importer, or 'unknown'. - * @return string Name of the importer, or "Unknown Importer" if importer is unknown. - */ - private function get_importer_name( $importer ) { - $importers = get_importers(); - return isset( $importers[ $importer ] ) ? $importers[ $importer ][0] : 'Unknown Importer'; - } - - /** - * Determine the class that extends `WP_Importer` which is responsible for - * the current action. Designed to be used within an action handler. - * - * @access private - * @static - * - * @return string The name of the calling class, or 'unknown'. - */ - private static function get_calling_importer_class() { - // If WP_Importer doesn't exist, neither will any importer that extends it. - if ( ! class_exists( 'WP_Importer', false ) ) { - return 'unknown'; - } - - $action = current_filter(); - $backtrace = debug_backtrace( false ); //phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_debug_backtrace - - $do_action_pos = -1; - $backtrace_len = count( $backtrace ); - for ( $i = 0; $i < $backtrace_len; $i++ ) { - // Find the location in the stack of the calling action. - if ( 'do_action' === $backtrace[ $i ]['function'] && $action === $backtrace[ $i ]['args'][0] ) { - $do_action_pos = $i; - break; - } - } - - // If the action wasn't called, the calling class is unknown. - if ( -1 === $do_action_pos ) { - return 'unknown'; - } - - // Continue iterating the stack looking for a caller that extends WP_Importer. - for ( $i = $do_action_pos + 1; $i < $backtrace_len; $i++ ) { - // If there is no class on the trace, continue. - if ( ! isset( $backtrace[ $i ]['class'] ) ) { - continue; - } - - $class_name = $backtrace[ $i ]['class']; - - // Check if the class extends WP_Importer. - if ( class_exists( $class_name, false ) ) { - $parents = class_parents( $class_name, false ); - if ( $parents && in_array( 'WP_Importer', $parents, true ) ) { - return $class_name; - } - } - } - - // If we've exhausted the stack without a match, the calling class is unknown. - return 'unknown'; - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-menus.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-menus.php deleted file mode 100644 index bf6c5620..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-menus.php +++ /dev/null @@ -1,146 +0,0 @@ -nav_items_just_added[] = $nav_item_id; - /** - * Helps sync log that a new menu item was added. - * - * @since 1.6.3 - * @since-jetpack 5.0.0 - * - * @param int $menu_id ID of the menu. - * @param array $menu_data An array of menu data. - * @param int $nav_item_id ID of the new menu item. - * @param array $nav_item_args Arguments used to add the menu item. - */ - do_action( 'jetpack_sync_updated_nav_menu_add_item', $menu_id, $menu_data, $nav_item_id, $nav_item_args ); - } - - /** - * Nav menu item update handler. - * - * @access public - * - * @param int $menu_id ID of the menu. - * @param int $nav_item_id ID of the new menu item. - * @param array $nav_item_args Arguments used to update the menu item. - */ - public function update_nav_menu_update_item( $menu_id, $nav_item_id, $nav_item_args ) { - if ( in_array( $nav_item_id, $this->nav_items_just_added, true ) ) { - return; - } - $menu_data = wp_get_nav_menu_object( $menu_id ); - /** - * Helps sync log that an update to the menu item happened. - * - * @since 1.6.3 - * @since-jetpack 5.0.0 - * - * @param int $menu_id ID of the menu. - * @param array $menu_data An array of menu data. - * @param int $nav_item_id ID of the new menu item. - * @param array $nav_item_args Arguments used to update the menu item. - */ - do_action( 'jetpack_sync_updated_nav_menu_update_item', $menu_id, $menu_data, $nav_item_id, $nav_item_args ); - } - - /** - * Remove menu items that have already been saved from the "just added" list. - * - * @access public - * - * @param int $nav_item_id ID of the new menu item. - * @param \WP_Post $post_after Nav menu item post object after the update. - */ - public function remove_just_added_menu_item( $nav_item_id, $post_after ) { - if ( 'nav_menu_item' !== $post_after->post_type ) { - return; - } - $this->nav_items_just_added = array_diff( $this->nav_items_just_added, array( $nav_item_id ) ); - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-meta.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-meta.php deleted file mode 100644 index de293a9b..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-meta.php +++ /dev/null @@ -1,112 +0,0 @@ -prepare call to use placeholders. - * - * @param string $object_type The type of object for which we retrieve meta. Either 'post' or 'comment'. - * @param array $config Must include 'meta_key' and 'ids' keys. - * - * @return array - */ - public function get_objects_by_id( $object_type, $config ) { - $table = _get_meta_table( $object_type ); - - if ( ! $table ) { - return array(); - } - - if ( ! is_array( $config ) ) { - return array(); - } - - $meta_objects = array(); - foreach ( $config as $item ) { - $meta = null; - if ( isset( $item['id'] ) && isset( $item['meta_key'] ) ) { - $meta = $this->get_object_by_id( $object_type, (int) $item['id'], (string) $item['meta_key'] ); - } - $meta_objects[ $item['id'] . '-' . $item['meta_key'] ] = $meta; - } - - return $meta_objects; - } - - /** - * Get a single Meta Result. - * - * @param string $object_type post, comment, term, user. - * @param null $id Object ID. - * @param null $meta_key Meta Key. - * - * @return mixed|null - */ - public function get_object_by_id( $object_type, $id = null, $meta_key = null ) { - global $wpdb; - - if ( ! is_int( $id ) || ! is_string( $meta_key ) ) { - return null; - } - - $table = _get_meta_table( $object_type ); - $object_id_column = $object_type . '_id'; - - // Sanitize so that the array only has integer values. - $meta = $wpdb->get_results( - $wpdb->prepare( - // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared - "SELECT * FROM {$table} WHERE {$object_id_column} = %d AND meta_key = %s", - $id, - $meta_key - ), - ARRAY_A - ); - - $meta_objects = null; - - if ( ! is_wp_error( $meta ) && ! empty( $meta ) ) { - foreach ( $meta as $meta_entry ) { - if ( 'post' === $object_type && strlen( $meta_entry['meta_value'] ) >= Posts::MAX_POST_META_LENGTH ) { - $meta_entry['meta_value'] = ''; - } - $meta_objects[] = array( - 'meta_type' => $object_type, - 'meta_id' => $meta_entry['meta_id'], - 'meta_key' => $meta_key, - 'meta_value' => $meta_entry['meta_value'], - 'object_id' => $meta_entry[ $object_id_column ], - ); - } - } - - return $meta_objects; - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-module.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-module.php deleted file mode 100644 index 524eaea6..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-module.php +++ /dev/null @@ -1,649 +0,0 @@ -recursive_ksort( $values ); - } - return crc32( wp_json_encode( Functions::json_wrap( $values ) ) ); - } - - /** - * Recursively call ksort on an Array - * - * @param array $values Array. - */ - private function recursive_ksort( &$values ) { - ksort( $values ); - foreach ( $values as &$value ) { - if ( is_array( $value ) ) { - $this->recursive_ksort( $value ); - } - } - } - - /** - * Whether a particular checksum in a set of checksums is valid. - * - * @access protected - * - * @param array $sums_to_check Array of checksums. - * @param string $name Name of the checksum. - * @param int $new_sum Checksum to compare against. - * @return boolean Whether the checksum is valid. - */ - protected function still_valid_checksum( $sums_to_check, $name, $new_sum ) { - if ( isset( $sums_to_check[ $name ] ) && $sums_to_check[ $name ] === $new_sum ) { - return true; - } - - return false; - } - - /** - * Enqueue all items of a sync type as an action. - * - * @access protected - * - * @param string $action_name Name of the action. - * @param string $table_name Name of the database table. - * @param string $id_field Name of the ID field in the database. - * @param string $where_sql The SQL WHERE clause to filter to the desired items. - * @param int $max_items_to_enqueue Maximum number of items to enqueue in the same time. - * @param boolean $state Whether enqueueing has finished. - * @return array Array, containing the number of chunks and TRUE, indicating enqueueing has finished. - */ - protected function enqueue_all_ids_as_action( $action_name, $table_name, $id_field, $where_sql, $max_items_to_enqueue, $state ) { - global $wpdb; - - if ( ! $where_sql ) { - $where_sql = '1 = 1'; - } - - $items_per_page = 1000; - $page = 1; - $chunk_count = 0; - $previous_interval_end = $state ? $state : '~0'; - $listener = Listener::get_instance(); - - // Count down from max_id to min_id so we get newest posts/comments/etc first. - // phpcs:ignore Generic.CodeAnalysis.AssignmentInCondition.FoundInWhileCondition, WordPress.DB.PreparedSQL.InterpolatedNotPrepared - while ( $ids = $wpdb->get_col( "SELECT {$id_field} FROM {$table_name} WHERE {$where_sql} AND {$id_field} < {$previous_interval_end} ORDER BY {$id_field} DESC LIMIT {$items_per_page}" ) ) { - // Request posts in groups of N for efficiency. - $chunked_ids = array_chunk( $ids, self::ARRAY_CHUNK_SIZE ); - - // If we hit our row limit, process and return. - if ( $chunk_count + count( $chunked_ids ) >= $max_items_to_enqueue ) { - $remaining_items_count = $max_items_to_enqueue - $chunk_count; - $remaining_items = array_slice( $chunked_ids, 0, $remaining_items_count ); - $remaining_items_with_previous_interval_end = $this->get_chunks_with_preceding_end( $remaining_items, $previous_interval_end ); - $listener->bulk_enqueue_full_sync_actions( $action_name, $remaining_items_with_previous_interval_end ); - - $last_chunk = end( $remaining_items ); - return array( $remaining_items_count + $chunk_count, end( $last_chunk ) ); - } - $chunked_ids_with_previous_end = $this->get_chunks_with_preceding_end( $chunked_ids, $previous_interval_end ); - - $listener->bulk_enqueue_full_sync_actions( $action_name, $chunked_ids_with_previous_end ); - - $chunk_count += count( $chunked_ids ); - ++$page; - // The $ids are ordered in descending order. - $previous_interval_end = end( $ids ); - } - - if ( $wpdb->last_error ) { - // return the values that were passed in so all these chunks get retried. - return array( $max_items_to_enqueue, $state ); - } - - return array( $chunk_count, true ); - } - - /** - * Given the Module Full Sync Configuration and Status return the next chunk of items to send. - * - * @param array $config This module Full Sync configuration. - * @param array $status This module Full Sync status. - * @param int $chunk_size Chunk size. - * - * @return array|object|null - */ - public function get_next_chunk( $config, $status, $chunk_size ) { - // phpcs:disable WordPress.DB.PreparedSQL.InterpolatedNotPrepared - global $wpdb; - return $wpdb->get_col( - <<id_field()} -FROM {$wpdb->{$this->table_name()}} -WHERE {$this->get_where_sql( $config )} -AND {$this->id_field()} < {$status['last_sent']} -ORDER BY {$this->id_field()} -DESC LIMIT {$chunk_size} -SQL - ); - // phpcs:enable WordPress.DB.PreparedSQL.InterpolatedNotPrepared - } - - /** - * Return last_item to send for Module Full Sync Configuration. - * - * @param array $config This module Full Sync configuration. - * - * @return array|object|null - */ - public function get_last_item( $config ) { - global $wpdb; - // phpcs:disable WordPress.DB.PreparedSQL.InterpolatedNotPrepared,WordPress.DB.DirectDatabaseQuery.NoCaching,WordPress.DB.DirectDatabaseQuery.DirectQuery - return $wpdb->get_var( - <<id_field()} -FROM {$wpdb->{$this->table_name()}} -WHERE {$this->get_where_sql( $config )} -ORDER BY {$this->id_field()} -LIMIT 1 -SQL - ); - // phpcs:enable WordPress.DB.PreparedSQL.InterpolatedNotPrepared,WordPress.DB.DirectDatabaseQuery.NoCaching,WordPress.DB.DirectDatabaseQuery.DirectQuery - } - - /** - * Return the initial last sent object. - * - * @return string|array initial status. - */ - public function get_initial_last_sent() { - return '~0'; - } - - /** - * Immediately send all items of a sync type as an action. - * - * @access protected - * - * @param string $config Full sync configuration for this module. - * @param array $status the current module full sync status. - * @param float $send_until timestamp until we want this request to send full sync events. - * - * @return array Status, the module full sync status updated. - */ - public function send_full_sync_actions( $config, $status, $send_until ) { - global $wpdb; - - if ( empty( $status['last_sent'] ) ) { - $status['last_sent'] = $this->get_initial_last_sent(); - } - - $limits = Settings::get_setting( 'full_sync_limits' )[ $this->name() ]; - - $chunks_sent = 0; - - $last_item = $this->get_last_item( $config ); - - while ( $chunks_sent < $limits['max_chunks'] && microtime( true ) < $send_until ) { - $objects = $this->get_next_chunk( $config, $status, $limits['chunk_size'] ); - - if ( $wpdb->last_error ) { - $status['error'] = true; - return $status; - } - - if ( empty( $objects ) ) { - $status['finished'] = true; - return $status; - } - $result = $this->send_action( 'jetpack_full_sync_' . $this->name(), array( $objects, $status['last_sent'] ) ); - if ( is_wp_error( $result ) || $wpdb->last_error ) { - $status['error'] = true; - return $status; - } - // Updated the sent and last_sent status. - $status = $this->set_send_full_sync_actions_status( $status, $objects ); - if ( $last_item === $status['last_sent'] ) { - $status['finished'] = true; - return $status; - } - ++$chunks_sent; - } - - return $status; - } - - /** - * Set the status of the full sync action based on the objects that were sent. - * - * @access protected - * - * @param array $status This module Full Sync status. - * @param array $objects This module Full Sync objects. - * - * @return array The updated status. - */ - protected function set_send_full_sync_actions_status( $status, $objects ) { - $status['last_sent'] = end( $objects ); - $status['sent'] += count( $objects ); - return $status; - } - - /** - * Immediately sends a single item without firing or enqueuing it - * - * @param string $action_name The action. - * @param array $data The data associated with the action. - */ - public function send_action( $action_name, $data = null ) { - $sender = Sender::get_instance(); - return $sender->send_action( $action_name, $data ); - } - - /** - * Retrieve chunk IDs with previous interval end. - * - * @access protected - * - * @param array $chunks All remaining items. - * @param int $previous_interval_end The last item from the previous interval. - * @return array Chunk IDs with the previous interval end. - */ - protected function get_chunks_with_preceding_end( $chunks, $previous_interval_end ) { - $chunks_with_ends = array(); - foreach ( $chunks as $chunk ) { - $chunks_with_ends[] = array( - 'ids' => $chunk, - 'previous_end' => $previous_interval_end, - ); - // Chunks are ordered in descending order. - $previous_interval_end = end( $chunk ); - } - return $chunks_with_ends; - } - - /** - * Get metadata of a particular object type within the designated meta key whitelist. - * - * @access protected - * - * @todo Refactor to use $wpdb->prepare() on the SQL query. - * - * @param array $ids Object IDs. - * @param string $meta_type Meta type. - * @param array $meta_key_whitelist Meta key whitelist. - * @return array Unserialized meta values. - */ - protected function get_metadata( $ids, $meta_type, $meta_key_whitelist ) { - global $wpdb; - $table = _get_meta_table( $meta_type ); - $id = $meta_type . '_id'; - if ( ! $table ) { - return array(); - } - - $private_meta_whitelist_sql = "'" . implode( "','", array_map( 'esc_sql', $meta_key_whitelist ) ) . "'"; - - return array_map( - array( $this, 'unserialize_meta' ), - $wpdb->get_results( - // phpcs:disable WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.PreparedSQL.NotPrepared - "SELECT $id, meta_key, meta_value, meta_id FROM $table WHERE $id IN ( " . implode( ',', wp_parse_id_list( $ids ) ) . ' )' . - " AND meta_key IN ( $private_meta_whitelist_sql ) ", - // phpcs:enable WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.PreparedSQL.NotPrepared - OBJECT - ) - ); - } - - /** - * Initialize listeners for the particular meta type. - * - * @access public - * - * @param string $meta_type Meta type. - * @param callable $callable Action handler callable. - */ - public function init_listeners_for_meta_type( $meta_type, $callable ) { - add_action( "added_{$meta_type}_meta", $callable, 10, 4 ); - add_action( "updated_{$meta_type}_meta", $callable, 10, 4 ); - add_action( "deleted_{$meta_type}_meta", $callable, 10, 4 ); - } - - /** - * Initialize meta whitelist handler for the particular meta type. - * - * @access public - * - * @param string $meta_type Meta type. - * @param callable $whitelist_handler Action handler callable. - */ - public function init_meta_whitelist_handler( $meta_type, $whitelist_handler ) { - add_filter( "jetpack_sync_before_enqueue_added_{$meta_type}_meta", $whitelist_handler ); - add_filter( "jetpack_sync_before_enqueue_updated_{$meta_type}_meta", $whitelist_handler ); - add_filter( "jetpack_sync_before_enqueue_deleted_{$meta_type}_meta", $whitelist_handler ); - } - - /** - * Retrieve the term relationships for the specified object IDs. - * - * @access protected - * - * @todo This feels too specific to be in the abstract sync Module class. Move it? - * - * @param array $ids Object IDs. - * @return array Term relationships - object ID and term taxonomy ID pairs. - */ - protected function get_term_relationships( $ids ) { - global $wpdb; - - // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared - return $wpdb->get_results( "SELECT object_id, term_taxonomy_id FROM $wpdb->term_relationships WHERE object_id IN ( " . implode( ',', wp_parse_id_list( $ids ) ) . ' )', OBJECT ); - } - - /** - * Unserialize the value of a meta object, if necessary. - * - * @access public - * - * @param object $meta Meta object. - * @return object Meta object with possibly unserialized value. - */ - public function unserialize_meta( $meta ) { - $meta->meta_value = maybe_unserialize( $meta->meta_value ); - return $meta; - } - - /** - * Retrieve a set of objects by their IDs. - * - * @access public - * - * @param string $object_type Object type. - * @param array $ids Object IDs. - * @return array Array of objects. - */ - public function get_objects_by_id( $object_type, $ids ) { - if ( empty( $ids ) || empty( $object_type ) ) { - return array(); - } - - $objects = array(); - foreach ( (array) $ids as $id ) { - $object = $this->get_object_by_id( $object_type, $id ); - - // Only add object if we have the object. - if ( $object ) { - $objects[ $id ] = $object; - } - } - - return $objects; - } - - /** - * Gets a list of minimum and maximum object ids for each batch based on the given batch size. - * - * @access public - * - * @param int $batch_size The batch size for objects. - * @param string|bool $where_sql The sql where clause minus 'WHERE', or false if no where clause is needed. - * - * @return array|bool An array of min and max ids for each batch. FALSE if no table can be found. - */ - public function get_min_max_object_ids_for_batches( $batch_size, $where_sql = false ) { - global $wpdb; - - if ( ! $this->table_name() ) { - return false; - } - - $results = array(); - $table = $wpdb->{$this->table_name()}; - $current_max = 0; - $current_min = 1; - $id_field = $this->id_field(); - $replicastore = new Replicastore(); - - $total = $replicastore->get_min_max_object_id( - $id_field, - $table, - $where_sql, - false - ); - - while ( $total->max > $current_max ) { - $where = $where_sql ? - $where_sql . " AND $id_field > $current_max" : - "$id_field > $current_max"; - $result = $replicastore->get_min_max_object_id( - $id_field, - $table, - $where, - $batch_size - ); - if ( empty( $result->min ) && empty( $result->max ) ) { - // Our query produced no min and max. We can assume the min from the previous query, - // and the total max we found in the initial query. - $current_max = (int) $total->max; - $result = (object) array( - 'min' => $current_min, - 'max' => $current_max, - ); - } else { - $current_min = (int) $result->min; - $current_max = (int) $result->max; - } - $results[] = $result; - } - - return $results; - } - - /** - * Return Total number of objects. - * - * @param array $config Full Sync config. - * - * @return int total - */ - public function total( $config ) { - global $wpdb; - $table = $wpdb->{$this->table_name()}; - $where = $this->get_where_sql( $config ); - - // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared - return $wpdb->get_var( "SELECT COUNT(*) FROM $table WHERE $where" ); - } - - /** - * Retrieve the WHERE SQL clause based on the module config. - * - * @access public - * - * @param array $config Full sync configuration for this sync module. - * @return string WHERE SQL clause, or `null` if no comments are specified in the module config. - */ - public function get_where_sql( $config ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable - return '1=1'; - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-network-options.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-network-options.php deleted file mode 100644 index 4fbfa3be..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-network-options.php +++ /dev/null @@ -1,251 +0,0 @@ -network_options_whitelist = Defaults::$default_network_options_whitelist; - } - - /** - * Enqueue the network options actions for full sync. - * - * @access public - * - * @param array $config Full sync configuration for this sync module. - * @param int $max_items_to_enqueue Maximum number of items to enqueue. - * @param boolean $state True if full sync has finished enqueueing this module, false otherwise. - * @return array Number of actions enqueued, and next module state. - */ - public function enqueue_full_sync_actions( $config, $max_items_to_enqueue, $state ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable - /** - * Tells the client to sync all options to the server - * - * @since 1.6.3 - * @since-jetpack 4.2.0 - * - * @param boolean Whether to expand options (should always be true) - */ - do_action( 'jetpack_full_sync_network_options', true ); - - // The number of actions enqueued, and next module state (true == done). - return array( 1, true ); - } - - /** - * Send the network options actions for full sync. - * - * @access public - * - * @param array $config Full sync configuration for this sync module. - * @param int $send_until The timestamp until the current request can send. - * @param array $state This module Full Sync status. - * - * @return array This module Full Sync status. - */ - public function send_full_sync_actions( $config, $send_until, $state ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable - // we call this instead of do_action when sending immediately. - $this->send_action( 'jetpack_full_sync_network_options', array( true ) ); - - // The number of actions enqueued, and next module state (true == done). - return array( 'finished' => true ); - } - - /** - * Retrieve an estimated number of actions that will be enqueued. - * - * @access public - * - * @param array $config Full sync configuration for this sync module. - * @return array Number of items yet to be enqueued. - */ - public function estimate_full_sync_actions( $config ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable - return 1; - } - - /** - * Retrieve the actions that will be sent for this module during a full sync. - * - * @access public - * - * @return array Full sync actions of this module. - */ - public function get_full_sync_actions() { - return array( 'jetpack_full_sync_network_options' ); - } - - /** - * Retrieve all network options as per the current network options whitelist. - * - * @access public - * - * @return array All network options. - */ - public function get_all_network_options() { - $options = array(); - foreach ( $this->network_options_whitelist as $option ) { - $options[ $option ] = get_site_option( $option ); - } - - return $options; - } - - /** - * Set the network options whitelist. - * - * @access public - * - * @param array $options The new network options whitelist. - */ - public function set_network_options_whitelist( $options ) { - $this->network_options_whitelist = $options; - } - - /** - * Get the network options whitelist. - * - * @access public - * - * @return array The network options whitelist. - */ - public function get_network_options_whitelist() { - return $this->network_options_whitelist; - } - - /** - * Reject non-whitelisted network options. - * - * @access public - * - * @param array $args The hook parameters. - * @return array|false $args The hook parameters, false if not a whitelisted network option. - */ - public function whitelist_network_options( $args ) { - if ( ! $this->is_whitelisted_network_option( $args[0] ) ) { - return false; - } - - return $args; - } - - /** - * Whether the option is a whitelisted network option. - * - * @access public - * - * @param string $option Option name. - * @return boolean True if this is a whitelisted network option. - */ - public function is_whitelisted_network_option( $option ) { - return in_array( $option, $this->network_options_whitelist, true ); - } - - /** - * Expand the network options within a hook before they are serialized and sent to the server. - * - * @access public - * - * @param array $args The hook parameters. - * @return array $args The hook parameters. - */ - public function expand_network_options( $args ) { - if ( $args[0] ) { - return $this->get_all_network_options(); - } - - return $args; - } - - /** - * Return Total number of objects. - * - * @param array $config Full Sync config. - * - * @return int total - */ - public function total( $config ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable - return count( (array) $this->network_options_whitelist ); - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-options.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-options.php deleted file mode 100644 index d21dee9b..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-options.php +++ /dev/null @@ -1,480 +0,0 @@ -update_options_whitelist(); - $this->update_options_contentless(); - } - - /** - * Set module defaults at a later time. - * - * @access public - */ - public function set_late_default() { - /** This filter is already documented in json-endpoints/jetpack/class.wpcom-json-api-get-option-endpoint.php */ - $late_options = apply_filters( 'jetpack_options_whitelist', array() ); - if ( ! empty( $late_options ) && is_array( $late_options ) ) { - $this->options_whitelist = array_merge( $this->options_whitelist, $late_options ); - } - } - - /** - * Add old deprecated options to the list of options to keep in sync. - * - * @since 1.14.0 - * - * @access public - * - * @param array $options The default list of site options. - */ - public function add_deprecated_options( $options ) { - global $wp_version; - - $deprecated_options = array( - 'blacklist_keys' => '5.5-alpha', // Replaced by disallowed_keys. - 'comment_whitelist' => '5.5-alpha', // Replaced by comment_previously_approved. - ); - - foreach ( $deprecated_options as $option => $version ) { - if ( version_compare( $wp_version, $version, '<=' ) ) { - $options[] = $option; - } - } - - return $options; - } - - /** - * Enqueue the options actions for full sync. - * - * @access public - * - * @param array $config Full sync configuration for this sync module. - * @param int $max_items_to_enqueue Maximum number of items to enqueue. - * @param boolean $state True if full sync has finished enqueueing this module, false otherwise. - * @return array Number of actions enqueued, and next module state. - */ - public function enqueue_full_sync_actions( $config, $max_items_to_enqueue, $state ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable - /** - * Tells the client to sync all options to the server - * - * @since 1.6.3 - * @since-jetpack 4.2.0 - * - * @param boolean Whether to expand options (should always be true) - */ - do_action( 'jetpack_full_sync_options', true ); - - // The number of actions enqueued, and next module state (true == done). - return array( 1, true ); - } - - /** - * Send the options actions for full sync. - * - * @access public - * - * @param array $config Full sync configuration for this sync module. - * @param int $send_until The timestamp until the current request can send. - * @param array $state This module Full Sync status. - * - * @return array This module Full Sync status. - */ - public function send_full_sync_actions( $config, $send_until, $state ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable - // we call this instead of do_action when sending immediately. - $this->send_action( 'jetpack_full_sync_options', array( true ) ); - - // The number of actions enqueued, and next module state (true == done). - return array( 'finished' => true ); - } - - /** - * Retrieve an estimated number of actions that will be enqueued. - * - * @access public - * - * @param array $config Full sync configuration for this sync module. - * @return int Number of items yet to be enqueued. - */ - public function estimate_full_sync_actions( $config ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable - return 1; - } - - /** - * Retrieve the actions that will be sent for this module during a full sync. - * - * @access public - * - * @return array Full sync actions of this module. - */ - public function get_full_sync_actions() { - return array( 'jetpack_full_sync_options' ); - } - - /** - * Retrieve all options as per the current options whitelist. - * Public so that we don't have to store so much data all the options twice. - * - * @access public - * - * @return array All options. - */ - public function get_all_options() { - $options = array(); - $random_string = wp_generate_password(); - foreach ( $this->options_whitelist as $option ) { - if ( str_starts_with( $option, Settings::SETTINGS_OPTION_PREFIX ) ) { - $option_value = Settings::get_setting( str_replace( Settings::SETTINGS_OPTION_PREFIX, '', $option ) ); - $options[ $option ] = $option_value; - } else { - $option_value = get_option( $option, $random_string ); - if ( $option_value !== $random_string ) { - $options[ $option ] = $option_value; - } - } - } - - // Add theme mods. - $theme_mods_option = 'theme_mods_' . get_option( 'stylesheet' ); - $theme_mods_value = get_option( $theme_mods_option, $random_string ); - if ( $theme_mods_value === $random_string ) { - return $options; - } - $this->filter_theme_mods( $theme_mods_value ); - $options[ $theme_mods_option ] = $theme_mods_value; - return $options; - } - - /** - * Update the options whitelist to the default one. - * - * @access public - */ - public function update_options_whitelist() { - $this->options_whitelist = Defaults::get_options_whitelist(); - } - - /** - * Set the options whitelist. - * - * @access public - * - * @param array $options The new options whitelist. - */ - public function set_options_whitelist( $options ) { - $this->options_whitelist = $options; - } - - /** - * Get the options whitelist. - * - * @access public - * - * @return array The options whitelist. - */ - public function get_options_whitelist() { - return $this->options_whitelist; - } - - /** - * Update the contentless options to the defaults. - * - * @access public - */ - public function update_options_contentless() { - $this->options_contentless = Defaults::get_options_contentless(); - } - - /** - * Get the contentless options. - * - * @access public - * - * @return array Array of the contentless options. - */ - public function get_options_contentless() { - return $this->options_contentless; - } - - /** - * Reject any options that aren't whitelisted or contentless. - * - * @access public - * - * @param array $args The hook parameters. - * @return array $args The hook parameters. - */ - public function whitelist_options( $args ) { - // Reject non-whitelisted options. - if ( ! $this->is_whitelisted_option( $args[0] ) ) { - return false; - } - - // Filter our weird array( false ) value for theme_mods_*. - if ( str_starts_with( $args[0], 'theme_mods_' ) ) { - $this->filter_theme_mods( $args[1] ); - if ( isset( $args[2] ) ) { - $this->filter_theme_mods( $args[2] ); - } - } - - // Set value(s) of contentless option to empty string(s). - if ( $this->is_contentless_option( $args[0] ) ) { - // Create a new array matching length of $args, containing empty strings. - $empty = array_fill( 0, count( $args ), '' ); - $empty[0] = $args[0]; - return $empty; - } - - return $args; - } - - /** - * Whether a certain option is whitelisted for sync. - * - * @access public - * - * @param string $option Option name. - * @return boolean Whether the option is whitelisted. - */ - public function is_whitelisted_option( $option ) { - return in_array( $option, $this->options_whitelist, true ) || str_starts_with( $option, 'theme_mods_' ); - } - - /** - * Whether a certain option is a contentless one. - * - * @access private - * - * @param string $option Option name. - * @return boolean Whether the option is contentless. - */ - private function is_contentless_option( $option ) { - return in_array( $option, $this->options_contentless, true ); - } - - /** - * Filters out falsy values from theme mod options. - * - * @access private - * - * @param array $value Option value. - */ - private function filter_theme_mods( &$value ) { - if ( is_array( $value ) && isset( $value[0] ) ) { - unset( $value[0] ); - } - } - - /** - * Handle changes in the core site icon and sync them. - * - * @access public - */ - public function jetpack_sync_core_icon() { - $url = get_site_icon_url(); - - $jetpack_url = \Jetpack_Options::get_option( 'site_icon_url' ); - if ( defined( 'JETPACK__PLUGIN_DIR' ) ) { - if ( ! function_exists( 'jetpack_site_icon_url' ) ) { - require_once JETPACK__PLUGIN_DIR . 'modules/site-icon/site-icon-functions.php'; - } - $jetpack_url = jetpack_site_icon_url(); - } - - // If there's a core icon, maybe update the option. If not, fall back to Jetpack's. - if ( ! empty( $url ) && $jetpack_url !== $url ) { - // This is the option that is synced with dotcom. - \Jetpack_Options::update_option( 'site_icon_url', $url ); - } elseif ( empty( $url ) ) { - \Jetpack_Options::delete_option( 'site_icon_url' ); - } - } - - /** - * Expand all options within a hook before they are serialized and sent to the server. - * - * @access public - * - * @param array $args The hook parameters. - * @return array $args The hook parameters. - */ - public function expand_options( $args ) { - if ( $args[0] ) { - return $this->get_all_options(); - } - - return $args; - } - - /** - * Return Total number of objects. - * - * @param array $config Full Sync config. - * - * @return int total - */ - public function total( $config ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable - return count( Defaults::get_options_whitelist() ); - } - - /** - * Retrieve a set of options by their IDs. - * - * @access public - * - * @param string $object_type Object type. - * @param array $ids Object IDs. - * @return array Array of objects. - */ - public function get_objects_by_id( $object_type, $ids ) { - if ( empty( $ids ) || empty( $object_type ) || 'option' !== $object_type ) { - return array(); - } - - $objects = array(); - foreach ( (array) $ids as $id ) { - $object = $this->get_object_by_id( $object_type, $id ); - - // Only add object if we have the object. - if ( 'OPTION-DOES-NOT-EXIST' !== $object ) { - if ( 'all' === $id ) { - // If all was requested it contains all options and can simply be returned. - return $object; - } - $objects[ $id ] = $object; - } - } - - return $objects; - } - - /** - * Retrieve an option by its name. - * - * @access public - * - * @param string $object_type Type of the sync object. - * @param string $id ID of the sync object. - * @return mixed Value of Option or 'OPTION-DOES-NOT-EXIST' if not found. - */ - public function get_object_by_id( $object_type, $id ) { - if ( 'option' === $object_type ) { - // Utilize Random string as default value to distinguish between false and not exist. - $random_string = wp_generate_password(); - // Only whitelisted options can be returned. - if ( in_array( $id, $this->options_whitelist, true ) ) { - if ( str_starts_with( $id, Settings::SETTINGS_OPTION_PREFIX ) ) { - $option_value = Settings::get_setting( str_replace( Settings::SETTINGS_OPTION_PREFIX, '', $id ) ); - return $option_value; - } else { - $option_value = get_option( $id, $random_string ); - if ( $option_value !== $random_string ) { - return $option_value; - } - } - } elseif ( 'all' === $id ) { - return $this->get_all_options(); - } - } - - return 'OPTION-DOES-NOT-EXIST'; - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-plugins.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-plugins.php deleted file mode 100644 index 2ebe52b3..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-plugins.php +++ /dev/null @@ -1,414 +0,0 @@ -action_handler = $callable; - - add_action( 'deleted_plugin', array( $this, 'deleted_plugin' ), 10, 2 ); - add_action( 'activated_plugin', $callable, 10, 2 ); - add_action( 'deactivated_plugin', $callable, 10, 2 ); - add_action( 'delete_plugin', array( $this, 'delete_plugin' ) ); - add_filter( 'upgrader_pre_install', array( $this, 'populate_plugins' ), 10, 1 ); - add_action( 'upgrader_process_complete', array( $this, 'on_upgrader_completion' ), 10, 2 ); - add_action( 'jetpack_plugin_installed', $callable, 10, 1 ); - add_action( 'jetpack_plugin_update_failed', $callable, 10, 4 ); - add_action( 'jetpack_plugins_updated', $callable, 10, 2 ); - add_action( 'admin_action_update', array( $this, 'check_plugin_edit' ) ); - add_action( 'jetpack_edited_plugin', $callable, 10, 2 ); - add_action( 'wp_ajax_edit-theme-plugin-file', array( $this, 'plugin_edit_ajax' ), 0 ); - - // Note that we don't simply 'expand_plugin_data' on the 'delete_plugin' action here because the plugin file is deleted when that action finishes. - add_filter( 'jetpack_sync_before_enqueue_activated_plugin', array( $this, 'expand_plugin_data' ) ); - add_filter( 'jetpack_sync_before_enqueue_deactivated_plugin', array( $this, 'expand_plugin_data' ) ); - } - - /** - * Fetch and populate all current plugins before upgrader installation. - * - * @access public - * - * @param bool|WP_Error $response Install response, true if successful, WP_Error if not. - */ - public function populate_plugins( $response ) { - if ( ! function_exists( 'get_plugins' ) ) { - require_once ABSPATH . 'wp-admin/includes/plugin.php'; - } - $this->plugins = get_plugins(); - return $response; - } - - /** - * Handler for the upgrader success finishes. - * - * @access public - * - * @param \WP_Upgrader $upgrader Upgrader instance. - * @param array $details Array of bulk item update data. - */ - public function on_upgrader_completion( $upgrader, $details ) { - if ( ! isset( $details['type'] ) ) { - return; - } - if ( 'plugin' !== $details['type'] ) { - return; - } - - if ( ! isset( $details['action'] ) ) { - return; - } - - $plugins = ( isset( $details['plugins'] ) ? $details['plugins'] : null ); - if ( empty( $plugins ) ) { - $plugins = ( isset( $details['plugin'] ) ? array( $details['plugin'] ) : null ); - } - - // For plugin installer. - if ( empty( $plugins ) && method_exists( $upgrader, 'plugin_info' ) ) { - $plugins = array( $upgrader->plugin_info() ); - } - - if ( empty( $plugins ) ) { - return; // We shouldn't be here. - } - - switch ( $details['action'] ) { - case 'update': - $state = array( - 'is_autoupdate' => Jetpack_Constants::is_true( 'JETPACK_PLUGIN_AUTOUPDATE' ), - ); - $errors = $this->get_errors( $upgrader->skin ); - if ( $errors ) { - foreach ( $plugins as $slug ) { - /** - * Sync that a plugin update failed - * - * @since 1.6.3 - * @since-jetpack 5.8.0 - * - * @module sync - * - * @param string $plugin , Plugin slug - * @param string Error code - * @param string Error message - */ - do_action( 'jetpack_plugin_update_failed', $this->get_plugin_info( $slug ), $errors['code'], $errors['message'], $state ); - } - - return; - } - /** - * Sync that a plugin update - * - * @since 1.6.3 - * @since-jetpack 5.8.0 - * - * @module sync - * - * @param array () $plugin, Plugin Data - */ - do_action( 'jetpack_plugins_updated', array_map( array( $this, 'get_plugin_info' ), $plugins ), $state ); - break; - case 'install': - } - - if ( 'install' === $details['action'] ) { - /** - * Signals to the sync listener that a plugin was installed and a sync action - * reflecting the installation and the plugin info should be sent - * - * @since 1.6.3 - * @since-jetpack 5.8.0 - * - * @module sync - * - * @param array () $plugin, Plugin Data - */ - do_action( 'jetpack_plugin_installed', array_map( array( $this, 'get_plugin_info' ), $plugins ) ); - - return; - } - } - - /** - * Retrieve the plugin information by a plugin slug. - * - * @access private - * - * @param string $slug Plugin slug. - * @return array Plugin information. - */ - private function get_plugin_info( $slug ) { - $plugins = get_plugins(); // Get the most up to date info. - if ( isset( $plugins[ $slug ] ) ) { - return array_merge( array( 'slug' => $slug ), $plugins[ $slug ] ); - } - // Try grabbing the info from before the update. - return isset( $this->plugins[ $slug ] ) ? array_merge( array( 'slug' => $slug ), $this->plugins[ $slug ] ) : array( 'slug' => $slug ); - } - - /** - * Retrieve upgrade errors. - * - * @access private - * - * @param \Automatic_Upgrader_Skin|\WP_Upgrader_Skin $skin The upgrader skin being used. - * @return array|boolean Error on error, false otherwise. - */ - private function get_errors( $skin ) { - $errors = method_exists( $skin, 'get_errors' ) ? $skin->get_errors() : null; - if ( is_wp_error( $errors ) ) { - $error_code = $errors->get_error_code(); - if ( ! empty( $error_code ) ) { - return array( - 'code' => $error_code, - 'message' => $errors->get_error_message(), - ); - } - } - - if ( isset( $skin->result ) ) { - $errors = $skin->result; - if ( is_wp_error( $errors ) ) { - return array( - 'code' => $errors->get_error_code(), - 'message' => $errors->get_error_message(), - ); - } - - if ( empty( $skin->result ) ) { - return array( - 'code' => 'unknown', - 'message' => __( 'Unknown Plugin Update Failure', 'jetpack-sync' ), - ); - } - } - return false; - } - - /** - * Handle plugin edit in the administration. - * - * @access public - * - * @todo The `admin_action_update` hook is called only for logged in users, but maybe implement nonce verification? - */ - public function check_plugin_edit() { - $screen = get_current_screen(); - // phpcs:ignore WordPress.Security.NonceVerification.Missing - if ( 'plugin-editor' !== $screen->base || ! isset( $_POST['newcontent'] ) || ! isset( $_POST['plugin'] ) ) { - return; - } - - // phpcs:ignore WordPress.Security.NonceVerification.Missing, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Validated manually just after. - $plugin = wp_unslash( $_POST['plugin'] ); - $plugins = get_plugins(); - if ( ! isset( $plugins[ $plugin ] ) ) { - return; - } - - /** - * Helps Sync log that a plugin was edited - * - * @since 1.6.3 - * @since-jetpack 4.9.0 - * - * @param string $plugin, Plugin slug - * @param mixed $plugins[ $plugin ], Array of plugin data - */ - do_action( 'jetpack_edited_plugin', $plugin, $plugins[ $plugin ] ); - } - - /** - * Handle plugin ajax edit in the administration. - * - * @access public - * - * @todo Update this method to use WP_Filesystem instead of fopen/fclose. - */ - public function plugin_edit_ajax() { - // This validation is based on wp_edit_theme_plugin_file(). - $args = wp_unslash( $_POST ); - if ( empty( $args['file'] ) ) { - return; - } - - $file = $args['file']; - if ( 0 !== validate_file( $file ) ) { - return; - } - - if ( ! isset( $args['newcontent'] ) ) { - return; - } - - if ( ! isset( $args['nonce'] ) ) { - return; - } - - if ( empty( $args['plugin'] ) ) { - return; - } - - $plugin = $args['plugin']; - if ( ! current_user_can( 'edit_plugins' ) ) { - return; - } - - if ( ! wp_verify_nonce( $args['nonce'], 'edit-plugin_' . $file ) ) { - return; - } - $plugins = get_plugins(); - if ( ! array_key_exists( $plugin, $plugins ) ) { - return; - } - - if ( 0 !== validate_file( $file, get_plugin_files( $plugin ) ) ) { - return; - } - - $real_file = WP_PLUGIN_DIR . '/' . $file; - - // phpcs:ignore WordPress.WP.AlternativeFunctions.file_system_operations_is_writable - if ( ! is_writable( $real_file ) ) { - return; - } - - // phpcs:ignore WordPress.WP.AlternativeFunctions.file_system_operations_fopen - $file_pointer = fopen( $real_file, 'w+' ); - if ( false === $file_pointer ) { - return; - } - // phpcs:ignore WordPress.WP.AlternativeFunctions.file_system_operations_fclose - fclose( $file_pointer ); - /** - * This action is documented already in this file - */ - do_action( 'jetpack_edited_plugin', $plugin, $plugins[ $plugin ] ); - } - - /** - * Handle plugin deletion. - * - * @access public - * - * @param string $plugin_path Path to the plugin main file. - */ - public function delete_plugin( $plugin_path ) { - $full_plugin_path = WP_PLUGIN_DIR . DIRECTORY_SEPARATOR . $plugin_path; - - // Checking for file existence because some sync plugin module tests simulate plugin installation and deletion without putting file on disk. - if ( file_exists( $full_plugin_path ) ) { - $all_plugin_data = get_plugin_data( $full_plugin_path ); - $data = array( - 'name' => $all_plugin_data['Name'], - 'version' => $all_plugin_data['Version'], - ); - } else { - $data = array( - 'name' => $plugin_path, - 'version' => 'unknown', - ); - } - - $this->plugin_info[ $plugin_path ] = $data; - } - - /** - * Invoked after plugin deletion. - * - * @access public - * - * @param string $plugin_path Path to the plugin main file. - * @param boolean $is_deleted Whether the plugin was deleted successfully. - */ - public function deleted_plugin( $plugin_path, $is_deleted ) { - call_user_func( $this->action_handler, $plugin_path, $is_deleted, $this->plugin_info[ $plugin_path ] ); - unset( $this->plugin_info[ $plugin_path ] ); - } - - /** - * Expand the plugins within a hook before they are serialized and sent to the server. - * - * @access public - * - * @param array $args The hook parameters. - * @return array $args The expanded hook parameters. - */ - public function expand_plugin_data( $args ) { - $plugin_path = $args[0]; - $plugin_data = array(); - - if ( ! function_exists( 'get_plugins' ) ) { - require_once ABSPATH . 'wp-admin/includes/plugin.php'; - } - $all_plugins = get_plugins(); - if ( isset( $all_plugins[ $plugin_path ] ) ) { - $all_plugin_data = $all_plugins[ $plugin_path ]; - $plugin_data['name'] = $all_plugin_data['Name']; - $plugin_data['version'] = $all_plugin_data['Version']; - } - - return array( - $args[0], - $args[1], - $plugin_data, - ); - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-posts.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-posts.php deleted file mode 100644 index 45598f92..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-posts.php +++ /dev/null @@ -1,949 +0,0 @@ - length. - * Current Setting : 5MB. - * - * @access public - * - * @var int - */ - const MAX_POST_CONTENT_LENGTH = 5000000; - - /** - * Max bytes allowed for post meta_value => length. - * Current Setting : 2MB. - * - * @access public - * - * @var int - */ - const MAX_POST_META_LENGTH = 2000000; - - /** - * Max bytes allowed for full sync upload. - * Current Setting : 7MB. - * - * @access public - * - * @var int - */ - const MAX_SIZE_FULL_SYNC = 7000000; - - /** - * Default previous post state. - * Used for default previous post status. - * - * @access public - * - * @var string - */ - const DEFAULT_PREVIOUS_STATE = 'new'; - - /** - * Sync module name. - * - * @access public - * - * @return string - */ - public function name() { - return 'posts'; - } - - /** - * The table in the database. - * - * @access public - * - * @return string - */ - public function table_name() { - return 'posts'; - } - - /** - * Retrieve a post by its ID. - * - * @access public - * - * @param string $object_type Type of the sync object. - * @param int $id ID of the sync object. - * @return \WP_Post|bool Filtered \WP_Post object, or false if the object is not a post. - */ - public function get_object_by_id( $object_type, $id ) { - if ( 'post' === $object_type ) { - $post = get_post( (int) $id ); - if ( $post ) { - return $this->filter_post_content_and_add_links( $post ); - } - } - - return false; - } - - /** - * Initialize posts action listeners. - * - * @access public - * - * @param callable $callable Action handler callable. - */ - public function init_listeners( $callable ) { - $this->action_handler = $callable; - - add_action( 'wp_insert_post', array( $this, 'wp_insert_post' ), 11, 3 ); - add_action( 'wp_after_insert_post', array( $this, 'wp_after_insert_post' ), 11, 2 ); - add_action( 'jetpack_sync_save_post', $callable, 10, 4 ); - - add_action( 'deleted_post', $callable, 10 ); - add_action( 'jetpack_published_post', $callable, 10, 2 ); - add_filter( 'jetpack_sync_before_enqueue_deleted_post', array( $this, 'filter_blacklisted_post_types_deleted' ) ); - - add_action( 'transition_post_status', array( $this, 'save_published' ), 10, 3 ); - - // Listen for meta changes. - $this->init_listeners_for_meta_type( 'post', $callable ); - $this->init_meta_whitelist_handler( 'post', array( $this, 'filter_meta' ) ); - - add_filter( 'jetpack_sync_before_enqueue_jetpack_sync_save_post', array( $this, 'filter_jetpack_sync_before_enqueue_jetpack_sync_save_post' ) ); - - add_action( 'jetpack_daily_akismet_meta_cleanup_before', array( $this, 'daily_akismet_meta_cleanup_before' ) ); - add_action( 'jetpack_daily_akismet_meta_cleanup_after', array( $this, 'daily_akismet_meta_cleanup_after' ) ); - add_action( 'jetpack_post_meta_batch_delete', $callable, 10, 2 ); - } - - /** - * Before Akismet's daily cleanup of spam detection metadata. - * - * @access public - * - * @param array $feedback_ids IDs of feedback posts. - */ - public function daily_akismet_meta_cleanup_before( $feedback_ids ) { - remove_action( 'deleted_post_meta', $this->action_handler ); - - if ( ! is_array( $feedback_ids ) || count( $feedback_ids ) < 1 ) { - return; - } - - $ids_chunks = array_chunk( $feedback_ids, 100, false ); - foreach ( $ids_chunks as $chunk ) { - /** - * Used for syncing deletion of batch post meta - * - * @since 1.6.3 - * @since-jetpack 6.1.0 - * - * @module sync - * - * @param array $feedback_ids feedback post IDs - * @param string $meta_key to be deleted - */ - do_action( 'jetpack_post_meta_batch_delete', $chunk, '_feedback_akismet_values' ); - } - } - - /** - * After Akismet's daily cleanup of spam detection metadata. - * - * @access public - * - * @param array $feedback_ids IDs of feedback posts. - */ - public function daily_akismet_meta_cleanup_after( $feedback_ids ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable - add_action( 'deleted_post_meta', $this->action_handler ); - } - - /** - * Initialize posts action listeners for full sync. - * - * @access public - * - * @param callable $callable Action handler callable. - */ - public function init_full_sync_listeners( $callable ) { - add_action( 'jetpack_full_sync_posts', $callable ); // Also sends post meta. - } - - /** - * Initialize the module in the sender. - * - * @access public - */ - public function init_before_send() { - // meta. - add_filter( 'jetpack_sync_before_send_added_post_meta', array( $this, 'trim_post_meta' ) ); - add_filter( 'jetpack_sync_before_send_updated_post_meta', array( $this, 'trim_post_meta' ) ); - add_filter( 'jetpack_sync_before_send_deleted_post_meta', array( $this, 'trim_post_meta' ) ); - // Full sync. - $sync_module = Modules::get_module( 'full-sync' ); - if ( $sync_module && str_contains( get_class( $sync_module ), 'Full_Sync_Immediately' ) ) { - add_filter( 'jetpack_sync_before_send_jetpack_full_sync_posts', array( $this, 'add_term_relationships' ) ); - } else { - add_filter( 'jetpack_sync_before_send_jetpack_full_sync_posts', array( $this, 'expand_posts_with_metadata_and_terms' ) ); - } - } - - /** - * Enqueue the posts actions for full sync. - * - * @access public - * - * @param array $config Full sync configuration for this sync module. - * @param int $max_items_to_enqueue Maximum number of items to enqueue. - * @param boolean $state True if full sync has finished enqueueing this module, false otherwise. - * @return array Number of actions enqueued, and next module state. - */ - public function enqueue_full_sync_actions( $config, $max_items_to_enqueue, $state ) { - global $wpdb; - - return $this->enqueue_all_ids_as_action( 'jetpack_full_sync_posts', $wpdb->posts, 'ID', $this->get_where_sql( $config ), $max_items_to_enqueue, $state ); - } - - /** - * Retrieve an estimated number of actions that will be enqueued. - * - * @access public - * - * @todo Use $wpdb->prepare for the SQL query. - * - * @param array $config Full sync configuration for this sync module. - * @return array Number of items yet to be enqueued. - */ - public function estimate_full_sync_actions( $config ) { - global $wpdb; - - $query = "SELECT count(*) FROM $wpdb->posts WHERE " . $this->get_where_sql( $config ); - // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared - $count = $wpdb->get_var( $query ); - - return (int) ceil( $count / self::ARRAY_CHUNK_SIZE ); - } - - /** - * Retrieve the WHERE SQL clause based on the module config. - * - * @access public - * - * @param array $config Full sync configuration for this sync module. - * @return string WHERE SQL clause, or `null` if no comments are specified in the module config. - */ - public function get_where_sql( $config ) { - $where_sql = Settings::get_blacklisted_post_types_sql(); - - // Config is a list of post IDs to sync. - if ( is_array( $config ) ) { - $where_sql .= ' AND ID IN (' . implode( ',', array_map( 'intval', $config ) ) . ')'; - } - - return $where_sql; - } - - /** - * Retrieve the actions that will be sent for this module during a full sync. - * - * @access public - * - * @return array Full sync actions of this module. - */ - public function get_full_sync_actions() { - return array( 'jetpack_full_sync_posts' ); - } - - /** - * Filter meta arguments so that we don't sync meta_values over MAX_POST_META_LENGTH. - * - * @param array $args action arguments. - * - * @return array filtered action arguments. - */ - public function trim_post_meta( $args ) { - list( $meta_id, $object_id, $meta_key, $meta_value ) = $args; - // Explicitly truncate meta_value when it exceeds limit. - // Large content will cause OOM issues and break Sync. - $serialized_value = maybe_serialize( $meta_value ); - if ( strlen( $serialized_value ) >= self::MAX_POST_META_LENGTH ) { - $meta_value = ''; - } - return array( $meta_id, $object_id, $meta_key, $meta_value ); - } - - /** - * Process content before send. - * - * @param array $args Arguments of the `wp_insert_post` hook. - * - * @return array - */ - public function expand_jetpack_sync_save_post( $args ) { - list( $post_id, $post, $update, $previous_state ) = $args; - return array( $post_id, $this->filter_post_content_and_add_links( $post ), $update, $previous_state ); - } - - /** - * Filter all blacklisted post types and add filtered post content. - * - * @param array $args Hook arguments. - * @return array|false Hook arguments, or false if the post type is a blacklisted one. - */ - public function filter_jetpack_sync_before_enqueue_jetpack_sync_save_post( $args ) { - list( $post_id, $post, $update, $previous_state ) = $args; - - if ( in_array( $post->post_type, Settings::get_setting( 'post_types_blacklist' ), true ) ) { - return false; - } - - return array( $post_id, $this->filter_post_content_and_add_links( $post ), $update, $previous_state ); - } - - /** - * Filter all blacklisted post types. - * - * @param array $args Hook arguments. - * @return array|false Hook arguments, or false if the post type is a blacklisted one. - */ - public function filter_blacklisted_post_types_deleted( $args ) { - - // deleted_post is called after the SQL delete but before cache cleanup. - // There is the potential we can't detect post_type at this point. - if ( ! $this->is_post_type_allowed( $args[0] ) ) { - return false; - } - - return $args; - } - - /** - * Filter all meta that is not blacklisted, or is stored for a disallowed post type. - * - * @param array $args Hook arguments. - * @return array|false Hook arguments, or false if meta was filtered. - */ - public function filter_meta( $args ) { - if ( $this->is_post_type_allowed( $args[1] ) && $this->is_whitelisted_post_meta( $args[2] ) ) { - return $args; - } - - return false; - } - - /** - * Whether a post meta key is whitelisted. - * - * @param string $meta_key Meta key. - * @return boolean Whether the post meta key is whitelisted. - */ - public function is_whitelisted_post_meta( $meta_key ) { - // The _wpas_skip_ meta key is used by Publicize. - return in_array( $meta_key, Settings::get_setting( 'post_meta_whitelist' ), true ) || str_starts_with( $meta_key, '_wpas_skip_' ); - } - - /** - * Whether a post type is allowed. - * A post type will be disallowed if it's present in the post type blacklist. - * - * @param int $post_id ID of the post. - * @return boolean Whether the post type is allowed. - */ - public function is_post_type_allowed( $post_id ) { - $post = get_post( (int) $post_id ); - - if ( isset( $post->post_type ) ) { - return ! in_array( $post->post_type, Settings::get_setting( 'post_types_blacklist' ), true ); - } - return false; - } - - /** - * Remove the embed shortcode. - * - * @global $wp_embed - */ - public function remove_embed() { - global $wp_embed; - remove_filter( 'the_content', array( $wp_embed, 'run_shortcode' ), 8 ); - // remove the embed shortcode since we would do the part later. - remove_shortcode( 'embed' ); - // Attempts to embed all URLs in a post. - remove_filter( 'the_content', array( $wp_embed, 'autoembed' ), 8 ); - } - - /** - * Add the embed shortcode. - * - * @global $wp_embed - */ - public function add_embed() { - global $wp_embed; - add_filter( 'the_content', array( $wp_embed, 'run_shortcode' ), 8 ); - // Shortcode placeholder for strip_shortcodes(). - add_shortcode( 'embed', '__return_false' ); - // Attempts to embed all URLs in a post. - add_filter( 'the_content', array( $wp_embed, 'autoembed' ), 8 ); - } - - /** - * Expands wp_insert_post to include filtered content - * - * @param \WP_Post $post_object Post object. - */ - public function filter_post_content_and_add_links( $post_object ) { - global $post; - - // Used to restore the post global. - $current_post = $post; - - // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited - $post = $post_object; - - // Return non existant post. - $post_type = get_post_type_object( $post->post_type ); - if ( empty( $post_type ) || ! is_object( $post_type ) ) { - $non_existant_post = new \stdClass(); - $non_existant_post->ID = $post->ID; - $non_existant_post->post_modified = $post->post_modified; - $non_existant_post->post_modified_gmt = $post->post_modified_gmt; - $non_existant_post->post_status = 'jetpack_sync_non_registered_post_type'; - $non_existant_post->post_type = $post->post_type; - // Restore global post. - // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited - $post = $current_post; - - return $non_existant_post; - } - /** - * Filters whether to prevent sending post data to .com - * - * Passing true to the filter will prevent the post data from being sent - * to the WordPress.com. - * Instead we pass data that will still enable us to do a checksum against the - * Jetpacks data but will prevent us from displaying the data on in the API as well as - * other services. - * - * @since 1.6.3 - * @since-jetpack 4.2.0 - * - * @param boolean false prevent post data from being synced to WordPress.com - * @param mixed $post \WP_Post object - */ - if ( apply_filters( 'jetpack_sync_prevent_sending_post_data', false, $post ) ) { - // We only send the bare necessary object to be able to create a checksum. - $blocked_post = new \stdClass(); - $blocked_post->ID = $post->ID; - $blocked_post->post_modified = $post->post_modified; - $blocked_post->post_modified_gmt = $post->post_modified_gmt; - $blocked_post->post_status = 'jetpack_sync_blocked'; - $blocked_post->post_type = $post->post_type; - - // Restore global post. - // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited - $post = $current_post; - - return $blocked_post; - } - - // lets not do oembed just yet. - $this->remove_embed(); - - if ( 0 < strlen( $post->post_password ) ) { - $post->post_password = 'auto-' . wp_generate_password( 10, false ); - } - - // Explicitly omit post_content when it exceeds limit. - // Large content will cause OOM issues and break Sync. - if ( strlen( $post->post_content ) >= self::MAX_POST_CONTENT_LENGTH ) { - $post->post_content = ''; - } - - /** This filter is already documented in core. wp-includes/post-template.php */ - if ( Settings::get_setting( 'render_filtered_content' ) && $post_type->public ) { - global $shortcode_tags; - /** - * Filter prevents some shortcodes from expanding. - * - * Since we can can expand some type of shortcode better on the .com side and make the - * expansion more relevant to contexts. For example [galleries] and subscription emails - * - * @since 1.6.3 - * @since-jetpack 4.5.0 - * - * @param array of shortcode tags to remove. - */ - $shortcodes_to_remove = apply_filters( - 'jetpack_sync_do_not_expand_shortcodes', - array( - 'gallery', - 'slideshow', - ) - ); - $removed_shortcode_callbacks = array(); - foreach ( $shortcodes_to_remove as $shortcode ) { - if ( isset( $shortcode_tags[ $shortcode ] ) ) { - $removed_shortcode_callbacks[ $shortcode ] = $shortcode_tags[ $shortcode ]; - } - } - - array_map( 'remove_shortcode', array_keys( $removed_shortcode_callbacks ) ); - /** - * Certain modules such as Likes, Related Posts and Sharedaddy are using `Settings::is_syncing` - * in order to NOT get rendered in filtered post content. - * Since the current method runs now before enqueueing instead of before sending, - * we are setting `is_syncing` flag to true in order to preserve the existing functionality. - */ - - $is_syncing_current = Settings::is_syncing(); - Settings::set_is_syncing( true ); - $post->post_content_filtered = apply_filters( 'the_content', $post->post_content ); - $post->post_excerpt_filtered = apply_filters( 'the_excerpt', $post->post_excerpt ); - Settings::set_is_syncing( $is_syncing_current ); - - foreach ( $removed_shortcode_callbacks as $shortcode => $callback ) { - add_shortcode( $shortcode, $callback ); - } - } - - $this->add_embed(); - - if ( has_post_thumbnail( $post->ID ) ) { - $image_attributes = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'full' ); - if ( is_array( $image_attributes ) && isset( $image_attributes[0] ) ) { - $post->featured_image = $image_attributes[0]; - } - } - - $post->permalink = get_permalink( $post->ID ); - $post->shortlink = wp_get_shortlink( $post->ID ); - - if ( function_exists( 'amp_get_permalink' ) ) { - $post->amp_permalink = amp_get_permalink( $post->ID ); - } - - $filtered_post = $post; - - // Restore global post. - // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited - $post = $current_post; - - return $filtered_post; - } - - /** - * Handle transition from another post status to a published one. - * - * @param string $new_status New post status. - * @param string $old_status Old post status. - * @param \WP_Post $post Post object. - */ - public function save_published( $new_status, $old_status, $post ) { - if ( 'publish' === $new_status && 'publish' !== $old_status ) { - $this->just_published[ $post->ID ] = true; - } - - $this->previous_status[ $post->ID ] = $old_status; - } - - /** - * When publishing or updating a post, the Gutenberg editor sends two requests: - * 1. sent to WP REST API endpoint `wp-json/wp/v2/posts/$id` - * 2. sent to wp-admin/post.php `?post=$id&action=edit&classic-editor=1&meta_box=1` - * - * The 2nd request is to update post meta, which is not supported on WP REST API. - * When syncing post data, we will include if this was a meta box update. - * - * @todo Implement nonce verification. - * - * @return boolean Whether this is a Gutenberg meta box update. - */ - public function is_gutenberg_meta_box_update() { - // phpcs:disable WordPress.Security.NonceVerification.Missing, WordPress.Security.NonceVerification.Recommended - return ( - isset( $_POST['action'], $_GET['classic-editor'], $_GET['meta_box'] ) && - 'editpost' === $_POST['action'] && - '1' === $_GET['classic-editor'] && - '1' === $_GET['meta_box'] - // phpcs:enable WordPress.Security.NonceVerification.Missing, WordPress.Security.NonceVerification.Recommended - ); - } - - /** - * Handler for the wp_insert_post hook. - * Called upon creation of a new post. - * - * @param int $post_ID Post ID. - * @param \WP_Post $post Post object. - * @param boolean $update Whether this is an existing post being updated or not. - */ - public function wp_insert_post( $post_ID, $post = null, $update = null ) { - if ( ! is_numeric( $post_ID ) || $post === null ) { - return; - } - - // Workaround for https://github.com/woocommerce/woocommerce/issues/18007. - if ( $post && 'shop_order' === $post->post_type ) { - $post = get_post( $post_ID ); - } - - $previous_status = isset( $this->previous_status[ $post_ID ] ) ? $this->previous_status[ $post_ID ] : self::DEFAULT_PREVIOUS_STATE; - - $just_published = isset( $this->just_published[ $post_ID ] ) ? $this->just_published[ $post_ID ] : false; - - $state = array( - 'is_auto_save' => (bool) Jetpack_Constants::get_constant( 'DOING_AUTOSAVE' ), - 'previous_status' => $previous_status, - 'just_published' => $just_published, - 'is_gutenberg_meta_box_update' => $this->is_gutenberg_meta_box_update(), - ); - /** - * Filter that is used to add to the post flags ( meta data ) when a post gets published - * - * @since 1.6.3 - * @since-jetpack 5.8.0 - * - * @param int $post_ID the post ID - * @param mixed $post \WP_Post object - * @param bool $update Whether this is an existing post being updated or not. - * @param mixed $state state - * - * @module sync - */ - do_action( 'jetpack_sync_save_post', $post_ID, $post, $update, $state ); - unset( $this->previous_status[ $post_ID ] ); - } - - /** - * Handler for the wp_after_insert_post hook. - * Called after creation/update of a new post. - * - * @param int $post_ID Post ID. - * @param \WP_Post $post Post object. - **/ - public function wp_after_insert_post( $post_ID, $post ) { - if ( ! is_numeric( $post_ID ) || $post === null ) { - return; - } - - // Workaround for https://github.com/woocommerce/woocommerce/issues/18007. - if ( $post && 'shop_order' === $post->post_type ) { - $post = get_post( $post_ID ); - } - - $this->send_published( $post_ID, $post ); - } - - /** - * Send a published post for sync. - * - * @param int $post_ID Post ID. - * @param \WP_Post $post Post object. - */ - public function send_published( $post_ID, $post ) { - if ( ! isset( $this->just_published[ $post_ID ] ) ) { - return; - } - - // Post revisions cause race conditions where this send_published add the action before the actual post gets synced. - if ( wp_is_post_autosave( $post ) || wp_is_post_revision( $post ) ) { - return; - } - - $post_flags = array( - 'post_type' => $post->post_type, - ); - - $author_user_object = get_user_by( 'id', $post->post_author ); - if ( $author_user_object ) { - $roles = new Roles(); - - $post_flags['author'] = array( - 'id' => $post->post_author, - 'wpcom_user_id' => get_user_meta( $post->post_author, 'wpcom_user_id', true ), - 'display_name' => $author_user_object->display_name, - 'email' => $author_user_object->user_email, - 'translated_role' => $roles->translate_user_to_role( $author_user_object ), - ); - } - - /** - * Filter that is used to add to the post flags ( meta data ) when a post gets published - * - * @since 1.6.3 - * @since-jetpack 4.4.0 - * - * @param mixed array post flags that are added to the post - * @param mixed $post \WP_Post object - */ - $flags = apply_filters( 'jetpack_published_post_flags', $post_flags, $post ); - - // Only Send Pulished Post event if post_type is not blacklisted. - if ( ! in_array( $post->post_type, Settings::get_setting( 'post_types_blacklist' ), true ) ) { - - // Refreshing the post in the cache site before triggering the publish event. - // The true parameter means that it's an update action, not create action. - $this->wp_insert_post( $post_ID, $post, true ); - - /** - * Action that gets synced when a post type gets published. - * - * @since 1.6.3 - * @since-jetpack 4.4.0 - * - * @param int $post_ID - * @param mixed array $flags post flags that are added to the post - */ - do_action( 'jetpack_published_post', $post_ID, $flags ); - } - unset( $this->just_published[ $post_ID ] ); - - /** - * Send additional sync action for Activity Log when post is a Customizer publish - */ - if ( 'customize_changeset' === $post->post_type ) { - $post_content = json_decode( $post->post_content, true ); - foreach ( $post_content as $key => $value ) { - // Skip if it isn't a widget. - if ( 'widget_' !== substr( $key, 0, strlen( 'widget_' ) ) ) { - continue; - } - // Change key from "widget_archives[2]" to "archives-2". - $key = str_replace( 'widget_', '', $key ); - $key = str_replace( '[', '-', $key ); - $key = str_replace( ']', '', $key ); - - global $wp_registered_widgets; - if ( isset( $wp_registered_widgets[ $key ] ) ) { - $widget_data = array( - 'name' => $wp_registered_widgets[ $key ]['name'], - 'id' => $key, - 'title' => $value['value']['title'], - ); - do_action( 'jetpack_widget_edited', $widget_data ); - } - } - } - } - - /** - * Add term relationships to post objects within a hook before they are serialized and sent to the server. - * This is used in Full Sync Immediately - * - * @access public - * - * @param array $args The hook parameters. - * @return array $args The expanded hook parameters. - */ - public function add_term_relationships( $args ) { - list( $filtered_posts, $previous_interval_end ) = $args; - list( $filtered_post_ids, $filtered_posts, $filtered_posts_metadata ) = $filtered_posts; - - return array( - $filtered_posts, - $filtered_posts_metadata, - $this->get_term_relationships( $filtered_post_ids ), - $previous_interval_end, - ); - } - - /** - * Expand post IDs to post objects within a hook before they are serialized and sent to the server. - * This is used in Legacy Full Sync - * - * @access public - * - * @param array $args The hook parameters. - * @return array $args The expanded hook parameters. - */ - public function expand_posts_with_metadata_and_terms( $args ) { - list( $post_ids, $previous_interval_end ) = $args; - - $posts = $this->expand_posts( $post_ids ); - $posts_metadata = $this->get_metadata( $post_ids, 'post', Settings::get_setting( 'post_meta_whitelist' ) ); - $term_relationships = $this->get_term_relationships( $post_ids ); - - return array( - $posts, - $posts_metadata, - $term_relationships, - $previous_interval_end, - ); - } - - /** - * Gets a list of minimum and maximum object ids for each batch based on the given batch size. - * - * @access public - * - * @param int $batch_size The batch size for objects. - * @param string|bool $where_sql The sql where clause minus 'WHERE', or false if no where clause is needed. - * - * @return array|bool An array of min and max ids for each batch. FALSE if no table can be found. - */ - public function get_min_max_object_ids_for_batches( $batch_size, $where_sql = false ) { - return parent::get_min_max_object_ids_for_batches( $batch_size, $this->get_where_sql( $where_sql ) ); - } - - /** - * Given the Module Configuration and Status return the next chunk of items to send. - * This function also expands the posts and metadata and filters them based on the maximum size constraints. - * - * @param array $config This module Full Sync configuration. - * @param array $status This module Full Sync status. - * @param int $chunk_size Chunk size. - * - * @return array - */ - public function get_next_chunk( $config, $status, $chunk_size ) { - - $post_ids = parent::get_next_chunk( $config, $status, $chunk_size ); - - if ( empty( $post_ids ) ) { - return array(); - } - - $posts = $this->expand_posts( $post_ids ); - $posts_metadata = $this->get_metadata( $post_ids, 'post', Settings::get_setting( 'post_meta_whitelist' ) ); - - // Filter posts and metadata based on maximum size constraints. - list( $filtered_post_ids, $filtered_posts, $filtered_posts_metadata ) = $this->filter_posts_and_metadata_max_size( $posts, $posts_metadata ); - return array( - $filtered_post_ids, - $filtered_posts, - $filtered_posts_metadata, - ); - } - - /** - * Expand posts. - * - * @param array $post_ids Post IDs. - * - * @return array Expanded posts. - */ - private function expand_posts( $post_ids ) { - $posts = array_filter( array_map( array( 'WP_Post', 'get_instance' ), $post_ids ) ); - $posts = array_map( array( $this, 'filter_post_content_and_add_links' ), $posts ); - $posts = array_values( $posts ); // Reindex in case posts were deleted. - return $posts; - } - - /** - * Filters posts and metadata based on maximum size constraints. - * It always allows the first post with its metadata even if they exceed the limit, otherwise they will never be synced. - * - * @access public - * - * @param array $posts The array of posts to filter. - * @param array $metadata The array of metadata to filter. - * @return array An array containing the filtered post IDs, filtered posts, and filtered metadata. - */ - public function filter_posts_and_metadata_max_size( $posts, $metadata ) { - $filtered_posts = array(); - $filtered_metadata = array(); - $filtered_post_ids = array(); - $current_size = 0; - foreach ( $posts as $post ) { - $post_content_size = isset( $post->post_content ) ? strlen( $post->post_content ) : 0; - $current_metadata = array(); - $metadata_size = 0; - foreach ( $metadata as $key => $metadata_item ) { - if ( (int) $metadata_item->post_id === $post->ID ) { - // Trimming metadata if it exceeds limit. Similar to trim_post_meta. - $metadata_item_size = strlen( maybe_serialize( $metadata_item->meta_value ) ); - if ( $metadata_item_size >= self::MAX_POST_META_LENGTH ) { - $metadata_item->meta_value = ''; - } - $current_metadata[] = $metadata_item; - $metadata_size += $metadata_item_size >= self::MAX_POST_META_LENGTH ? 0 : $metadata_item_size; - if ( ! empty( $filtered_post_ids ) && ( $current_size + $post_content_size + $metadata_size ) > ( self::MAX_SIZE_FULL_SYNC ) ) { - break 2; // Break both foreach loops. - } - unset( $metadata[ $key ] ); - } - } - // Always allow the first post with its metadata. - if ( empty( $filtered_post_ids ) || ( $current_size + $post_content_size + $metadata_size ) <= ( self::MAX_SIZE_FULL_SYNC ) ) { - $filtered_post_ids[] = strval( $post->ID ); - $filtered_posts[] = $post; - $filtered_metadata = array_merge( $filtered_metadata, $current_metadata ); - $current_size += $post_content_size + $metadata_size; - } else { - break; - } - } - return array( - $filtered_post_ids, - $filtered_posts, - $filtered_metadata, - ); - } - - /** - * Set the status of the full sync action based on the objects that were sent. - * - * @access public - * - * @param array $status This module Full Sync status. - * @param array $objects This module Full Sync objects. - * - * @return array The updated status. - */ - public function set_send_full_sync_actions_status( $status, $objects ) { - $status['last_sent'] = end( $objects[0] ); - $status['sent'] += count( $objects[0] ); - return $status; - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-protect.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-protect.php deleted file mode 100644 index fb1ae729..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-protect.php +++ /dev/null @@ -1,54 +0,0 @@ -has_login_ability() && ! Jetpack_Constants::is_true( 'XMLRPC_REQUEST' ) ) { - do_action( 'jetpack_valid_failed_login_attempt', $failed_attempt ); - } - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-search.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-search.php deleted file mode 100644 index 16db3d73..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-search.php +++ /dev/null @@ -1,1875 +0,0 @@ - [ 'searchable_in_all_content' => true ], - * Field will be included in the all_content fields - * - * 'metakey' => [ 'available' => false, 'alternatives' => [ 'metakey_processed' ] ], - * Field not in meta.* but has data in an alternative field(s) name that - * should work similarly. For instance, woocommerce total_sales does not go into - * the index, but the percentage of sales does. - * - * @static - * @access private - * @var array - */ - private static $postmeta_to_sync = array( - // jetpack. - 'jetpack-search-meta0' => array( 'searchable_in_all_content' => true ), - 'jetpack-search-meta1' => array( 'searchable_in_all_content' => true ), - 'jetpack-search-meta2' => array( 'searchable_in_all_content' => true ), - 'jetpack-search-meta3' => array( 'searchable_in_all_content' => true ), - 'jetpack-search-meta4' => array( 'searchable_in_all_content' => true ), - 'jetpack-search-meta5' => array( 'searchable_in_all_content' => true ), - 'jetpack-search-meta6' => array( 'searchable_in_all_content' => true ), - 'jetpack-search-meta7' => array( 'searchable_in_all_content' => true ), - 'jetpack-search-meta8' => array( 'searchable_in_all_content' => true ), - 'jetpack-search-meta9' => array( 'searchable_in_all_content' => true ), - - // woocommerce. - 'exclude_product_categories' => array(), - 'exclude_product_ids' => array(), - 'free_shipping' => array(), - 'id_field' => array(), - 'individual_use' => array(), - 'limit_usage_to_x_items' => array(), - 'maximum_amount' => array(), - 'minimum_amount' => array(), - 'post_id' => array(), - 'product_categories' => array( 'searchable_in_all_content' => true ), - 'product_ids' => array(), - 'total_sales' => array( - 'available' => false, - 'alternatives' => array( - 'wc.percent_of_sales', - ), - ), - 'usage_limit' => array(), - 'usage_limit_per_user' => array(), - '_crosssell_ids' => array(), - '_downloadable' => array(), - '_featured' => array(), - '_height' => array(), - '_length' => array(), - '_price' => array( - 'alternatives' => array( - 'wc.price', - 'wc.min_price', - 'wc.max_price', - ), - ), - '_prices_include_tax' => array(), - '_product_attributes' => array(), - '_product_version' => array(), - '_regular_price' => array( - 'alternatives' => array( - 'wc.regular_price', - ), - ), - '_sale_price' => array( - 'alternatives' => array( - 'wc.sale_price', - ), - ), - '_sale_price_dates_from' => array(), - '_sale_price_dates_to' => array(), - '_sku' => array( 'searchable_in_all_content' => true ), - '_stock_status' => array(), - '_wc_average_rating' => array( - 'alternatives' => array( - 'wc.ave_rating_score', - ), - ), - '_wc_rating_count' => array( - 'alternatives' => array( - 'wc.rating', // wc.rating.count_1, wc.rating.count_2, ... - ), - ), - '_wc_review_count' => array(), - '_weight' => array(), - '_width' => array(), - - // co-authors plus. - 'cap-description' => array( 'searchable_in_all_content' => true ), - 'cap-user_login' => array( 'searchable_in_all_content' => true ), - 'cap-user_email' => array(), - 'cap-last_name' => array( 'searchable_in_all_content' => true ), - 'cap-first_name' => array( 'searchable_in_all_content' => true ), - 'cap-display_name' => array( 'searchable_in_all_content' => true ), - 'cap-website' => array(), - 'cap-jabber' => array(), - 'cap-aim' => array(), - 'cap-twitter' => array(), - 'cap-facebook' => array(), - 'cap-google_plus' => array(), - 'cap-job_title' => array( 'searchable_in_all_content' => true ), - - // bbpress. - 'bbpl_like' => array(), - 'bbpress_discussion_comments_copied' => array(), - 'bbpress_discussion_tags_copied' => array(), - 'bbpress_discussion_topic_id' => array(), - 'bbpress_discussion_use_defaults' => array(), - 'bbpress_page_header_bg' => array(), - 'bbpress_title_bg' => array(), - 'use_bbpress_discussion_topic' => array(), - - // wpml. - 'tm_meta_wpml' => array(), - 'wpml_language' => array(), - 'wpml_media_lang' => array(), - 'wpml_media_processed' => array(), - - // blogger import. - 'blogger_author' => array( 'searchable_in_all_content' => true ), - 'blogger_blog' => array( 'searchable_in_all_content' => true ), - 'blogger_permalink' => array( 'searchable_in_all_content' => true ), - - // geo. - 'geo_address' => array( 'searchable_in_all_content' => true ), - 'geo_latitude' => array(), - 'geo_longitude' => array(), - 'geo_public' => array(), - 'geolocated' => array(), - 'geolocation_city' => array( 'searchable_in_all_content' => true ), - 'geolocation_country_long' => array( 'searchable_in_all_content' => true ), - 'geolocation_country_short' => array( 'searchable_in_all_content' => true ), - 'geolocation_formatted_address' => array( 'searchable_in_all_content' => true ), - 'geolocation_lat' => array(), - 'geolocation_long' => array(), - 'geolocation_postcode' => array( 'searchable_in_all_content' => true ), - 'geolocation_state_long' => array( 'searchable_in_all_content' => true ), - 'geolocation_state_short' => array( 'searchable_in_all_content' => true ), - - // wp-ultimate-recipe. - 'recipe_alternate_image' => array(), - 'recipe_cook_time' => array(), - 'recipe_cook_time_text' => array(), - 'recipe_description' => array( 'searchable_in_all_content' => true ), - 'recipe_ingredients' => array( 'searchable_in_all_content' => true ), - 'recipe_instructions' => array( 'searchable_in_all_content' => true ), - 'recipe_notes' => array( 'searchable_in_all_content' => true ), - 'recipe_nutritional' => array( 'searchable_in_all_content' => true ), - 'recipe_passive_time' => array(), - 'recipe_passive_time_text' => array(), - 'recipe_prep_time' => array(), - 'recipe_prep_time_text' => array(), - 'recipe_rating' => array(), - 'recipe_servings' => array(), - 'recipe_servings_normalized' => array(), - 'recipe_servings_type' => array(), - 'recipe_terms' => array( 'searchable_in_all_content' => true ), - 'recipe_terms_with_parents' => array(), - 'recipe_title' => array( 'searchable_in_all_content' => true ), - 'recipe_user_ratings' => array(), - 'recipe_user_ratings_rating' => array(), - - // generic fields. - // from advanced-custom-fields and metabox.io . - 'Link' => array(), - 'Location' => array(), - 'Title' => array( 'searchable_in_all_content' => true ), - 'ad_code' => array(), - 'address' => array(), - 'admin_mail' => array(), - 'admin_only' => array(), - 'advertisers' => array( 'searchable_in_all_content' => true ), - 'age' => array(), - 'aliases' => array(), - 'alternate_title' => array(), - 'ama_content' => array(), - 'amazon' => array(), - 'answer' => array( 'searchable_in_all_content' => true ), - 'area' => array(), - 'attention' => array(), - 'attr' => array(), - 'author' => array( 'searchable_in_all_content' => true ), - 'author_name' => array( 'searchable_in_all_content' => true ), - 'blog' => array(), - 'blog_id' => array(), - 'call_to_action' => array(), - 'campaign_preview' => array(), - 'canonical_url' => array(), - 'catch_text' => array(), - 'category' => array( 'searchable_in_all_content' => true ), - 'classificacao' => array(), - 'classification' => array(), - 'code' => array(), - 'codigo' => array(), - 'company' => array( 'searchable_in_all_content' => true ), - 'company_website' => array(), - 'config' => array(), - 'construction' => array(), - 'container_ids' => array(), - 'content' => array( 'searchable_in_all_content' => true ), - 'content_body-full_content' => array( 'searchable_in_all_content' => true ), - 'copyright' => array(), - 'custom_page_title' => array( 'searchable_in_all_content' => true ), - 'custom_permalink' => array(), - 'customize' => array(), - 'data' => array(), - 'date' => array(), - 'day' => array(), - 'descripcion' => array( 'searchable_in_all_content' => true ), - 'description' => array( 'searchable_in_all_content' => true ), - 'display_settings' => array(), - 'display_type' => array(), - 'duration' => array(), - 'embed' => array(), - 'entity_ids' => array(), - 'entity_types' => array(), - 'event_subtitle' => array( 'searchable_in_all_content' => true ), - 'excluded_container_ids' => array(), - 'exclusions' => array(), - 'experience' => array(), - 'external_url' => array(), - 'featured' => array(), - 'featured_image' => array(), - 'featured_post' => array(), - 'featured_story' => array(), - 'fee' => array(), - 'filter' => array(), - 'follow' => array(), - 'footer_text' => array(), - 'from_header' => array(), - 'fullscreen_view' => array(), - 'gallery' => array(), - 'genre' => array( 'searchable_in_all_content' => true ), - 'guest_bio' => array(), - 'guest_name' => array(), - 'guests' => array( 'searchable_in_all_content' => true ), - 'has_variations' => array(), - 'hashtag' => array(), - 'header_image' => array(), - 'hidden_from_ui' => array(), - 'hide_on_screen' => array(), - 'homepage_order' => array(), - 'hours' => array(), - 'i18n' => array(), - 'id' => array(), - 'image' => array(), - 'image_size' => array(), - 'image_source' => array(), - 'index' => array(), - 'intro_text' => array( 'searchable_in_all_content' => true ), - 'job_mention' => array( 'searchable_in_all_content' => true ), - 'keywords' => array( 'searchable_in_all_content' => true ), - 'latest_news' => array(), - 'layout' => array(), - 'link' => array(), - 'link_dump' => array( 'searchable_in_all_content' => true ), - 'link_url' => array(), - 'location' => array(), - 'logo' => array(), - 'main_title' => array( 'searchable_in_all_content' => true ), - 'maximum_entity_count' => array(), - 'media' => array(), - 'mentions' => array(), - 'messages' => array(), - 'meta_description' => array( 'searchable_in_all_content' => true ), - 'meta_id' => array(), - 'meta_index' => array(), - 'meta_key' => array(), - 'meta_value' => array(), - 'modal-dialog-id' => array(), - 'name' => array( 'searchable_in_all_content' => true ), - 'nombre' => array( 'searchable_in_all_content' => true ), - 'notes' => array( 'searchable_in_all_content' => true ), - 'options' => array(), - 'order_by' => array(), - 'order_direction' => array(), - 'original_cats' => array(), - 'original_headers' => array(), - 'original_link' => array(), - 'original_message' => array(), - 'original_subject' => array(), - 'original_title' => array(), - 'original_to' => array(), - 'other_setting' => array(), - 'page_canonical' => array(), - 'page_layout' => array(), - 'page_sidebar' => array(), - 'page_tags' => array(), - 'panels_data' => array(), - 'parking' => array(), - 'pdf_upload' => array(), - 'people_mentioned' => array(), - 'photo' => array(), - 'play_time' => array(), - 'position' => array(), - 'post-rating' => array(), - 'post_background' => array(), - 'post_color' => array(), - 'post_sidebar' => array(), - 'post_subtitle' => array( 'searchable_in_all_content' => true ), - 'price' => array(), - 'publication' => array(), - 'rating' => array(), - 'ratings_average' => array(), - 'ratings_score' => array(), - 'ratings_users' => array(), - 'relation' => array(), - 'reply_to_header' => array(), - 'required' => array(), - 'returns' => array(), - 'review_post' => array(), - 'rule' => array(), - 'section' => array( 'searchable_in_all_content' => true ), - 'selected_links' => array(), - 'session_transcript' => array(), - 'settings' => array(), - 'sex' => array(), - 'shares_count' => array(), - 'show_description' => array( 'searchable_in_all_content' => true ), - 'show_page_title' => array(), - 'show_notes' => array(), - 'show_notes_preview' => array(), - 'side' => array(), - 'sidebar' => array(), - 'site' => array(), - 'situation' => array(), - 'slide_template' => array(), - 'slug' => array(), - 'sortorder' => array(), - 'source' => array(), - 'start_date' => array(), - 'status' => array(), - 'styles' => array(), - 'subtitle' => array( 'searchable_in_all_content' => true ), - 'subtitulo' => array(), - 'success' => array(), - 'summary' => array( 'searchable_in_all_content' => true ), - 'synopsis' => array( 'searchable_in_all_content' => true ), - 'tel' => array(), - 'tema' => array(), - 'testimonial' => array(), - 'testimonial_author' => array(), - 'text_already_subscribed' => array(), - 'text_error' => array(), - 'text_invalid_email' => array(), - 'text_not_subscribed' => array(), - 'text_required_field_missing' => array(), - 'text_subscribed' => array(), - 'text_unsubscribed' => array(), - 'thumbnail' => array(), - 'time' => array(), - 'time_jump_list' => array( 'searchable_in_all_content' => true ), - 'title' => array( 'searchable_in_all_content' => true ), - 'title_view' => array(), - 'titre' => array( 'searchable_in_all_content' => true ), - 'titulo' => array( 'searchable_in_all_content' => true ), - 'to_header' => array(), - 'toc' => array(), - 'transcript' => array( 'searchable_in_all_content' => true ), - 'transport_uri' => array(), - 'type' => array(), - 'url' => array(), - 'validation' => array(), - 'value' => array(), - 'values' => array(), - 'variation' => array(), - 'video' => array(), - 'video_type' => array(), - 'video_url' => array(), - 'videopress_guid' => array(), - 'website' => array(), - 'weight' => array(), - 'year' => array(), - - // wp.com martketplace search - @see https://wp.me/pdh6GB-Ax#comment-2104 - '_app_icon' => array(), - '_featured_product_video' => array(), - 'wpcom_marketplace_org_slug' => array(), - '_wc_general_product_dependency_theme' => array(), - '_wc_general_product_dependency_plugin' => array(), - 'wpcom_marketplace_product_extra_fields' => array(), - - ); // end indexed post meta. - - /** - * Postmeta being considered for indexing - * but currently not in the index - * this list is really only for documentation. - * - * @static - * @access private - * @var array - */ - private static $unindexed_postmeta = array( - - // Core. - '_wp_attached_file' => array(), - '_wp_attachment_context' => array(), - '_wp_attachment_image_alt' => array(), - '_wp_attachment_is_custom_header' => array(), - '_wp_attachment_metadata' => array(), - '_wp_desired_post_slug' => array(), - '_wp_old_date' => array(), - '_wp_old_slug' => array(), - '_wp_page_template' => array(), - - // WooCommerce products. - // See https://github.com/woocommerce/woocommerce/blob/8ed6e7436ff87c2153ed30edd83c1ab8abbdd3e9/includes/data-stores/class-wc-product-data-store-cpt.php#L21 . - '_backorders' => array(), - '_default_attributes' => array(), - '_download_expiry' => array(), - '_download_limit' => array(), - '_download_permissions_granted' => array(), - '_downloadable_files' => array(), - '_file_paths' => array(), - '_manage_stock' => array(), - '_product_image_gallery' => array(), - '_purchase_note' => array(), - '_recorded_sales' => array(), - '_sold_individually' => array(), - '_stock' => array(), - '_tax_class' => array(), - '_tax_status' => array(), - '_thumbnail_id' => array(), - '_upsell_ids' => array(), - '_variation_description' => array(), - '_virtual' => array(), - '_visibility' => array(), - 'coupon_amount' => array(), - 'default_source' => array(), - 'discount_type' => array(), - 'exclude_sale_items' => array(), - 'expiry_date' => array(), - - // Woocommerce orders and refunds. - // See https://github.com/woocommerce/woocommerce/blob/8ed6e7436ff87c2153ed30edd83c1ab8abbdd3e9/includes/data-stores/class-wc-order-data-store-cpt.php#L27 . - // See https://github.com/woocommerce/woocommerce/blob/b8a2815ae546c836467008739e7ff5150cb08e93/includes/data-stores/class-wc-order-refund-data-store-cpt.php#L20 . - '_billing_address_1' => array(), - '_billing_address_2' => array(), - '_billing_address_index' => array(), - '_billing_city' => array(), - '_billing_company' => array(), - '_billing_country' => array(), - '_billing_email' => array(), - '_billing_first_name' => array(), - '_billing_last_name' => array(), - '_billing_phone' => array(), - '_billing_postcode' => array(), - '_billing_state' => array(), - '_cart_discount' => array(), - '_cart_discount_tax' => array(), - '_completed_date' => array(), - '_created_via' => array(), - '_customer_ip_address' => array(), - '_customer_user_agent' => array(), - '_date_completed' => array(), - '_date_paid' => array(), - '_order_currency' => array(), - '_order_key' => array(), - '_order_shipping' => array(), - '_order_shipping_tax' => array(), - '_order_stock_reduced' => array(), - '_order_tax' => array(), - '_order_total' => array(), - '_order_version' => array(), - '_paid_date' => array(), - '_payment_method' => array(), - '_payment_method_title' => array(), - '_payment_tokens' => array(), - '_recorded_coupon_usage_counts' => array(), - '_refund_amount' => array(), - '_refund_reason' => array(), - '_refunded_by' => array(), - '_shipping_address_1' => array(), - '_shipping_address_2' => array(), - '_shipping_address_index' => array(), - '_shipping_city' => array(), - '_shipping_company' => array(), - '_shipping_country' => array(), - '_shipping_first_name' => array(), - '_shipping_last_name' => array(), - '_shipping_postcode' => array(), - '_shipping_state' => array(), - '_transaction_id' => array(), - - // aioseop. - '_aioseop_description' => array(), - '_aioseop_keywords' => array(), - '_aioseop_title' => array(), - - // yoast. - '_yoast_wpseo_authorship' => array(), - '_yoast_wpseo_bctitle' => array(), - '_yoast_wpseo_canonical' => array(), - '_yoast_wpseo_content_score' => array(), - '_yoast_wpseo_focuskw' => array(), - '_yoast_wpseo_focuskw_text_input' => array(), - '_yoast_wpseo_google-plus-description' => array(), - '_yoast_wpseo_google-plus-image' => array(), - '_yoast_wpseo_linkdex' => array(), - '_yoast_wpseo_meta-robots-adv' => array(), - '_yoast_wpseo_meta-robots-nofollow' => array(), - '_yoast_wpseo_meta-robots-noindex' => array(), - '_yoast_wpseo_metadesc' => array(), - '_yoast_wpseo_metakeywords' => array(), - '_yoast_wpseo_opengraph-description' => array(), - '_yoast_wpseo_opengraph-image' => array(), - '_yoast_wpseo_opengraph-title' => array(), - '_yoast_wpseo_primary_byline' => array(), - '_yoast_wpseo_primary_category' => array(), - '_yoast_wpseo_primary_product_cat' => array(), - '_yoast_wpseo_primary_sponsor-type' => array(), - '_yoast_wpseo_primary_tema_category' => array(), - '_yoast_wpseo_primary_wpdmcategory' => array(), - '_yoast_wpseo_primary_wt_portfolio_category' => array(), - '_yoast_wpseo_redirect' => array(), - '_yoast_wpseo_sitemap-include' => array(), - '_yoast_wpseo_sitemap-prio' => array(), - '_yoast_wpseo_title' => array(), - '_yoast_wpseo_twitter-description' => array(), - '_yoast_wpseo_twitter-image' => array(), - - // bbpress. - 'bbppu_read_by' => array(), - '_bbp_activity_id' => array(), - '_bbp_attachment' => array(), - '_bbp_attachment_upload_error' => array(), - '_bbp_forum_id' => array(), - '_bbp_forum_parent_id' => array(), - '_bbp_forum_subforum_count' => array(), - '_bbp_forum_type' => array(), - '_bbp_group_ids' => array(), - '_bbp_last_active_id' => array(), - '_bbp_last_active_time' => array(), - '_bbp_last_reply_id' => array(), - '_bbp_last_topic_id' => array(), - '_bbp_old_forum_id' => array(), - '_bbp_old_sticky_status' => array(), - '_bbp_old_topic_id' => array(), - '_bbp_post_id' => array(), - '_bbp_reply_count' => array(), - '_bbp_reply_is_private' => array(), - '_bbp_reply_to' => array(), - '_bbp_revision_log' => array(), - '_bbp_status' => array(), - '_bbp_sticky_topics' => array(), - '_bbp_topic_count' => array(), - '_bbp_topic_id' => array(), - '_bbp_total_reply_count' => array(), - '_bbp_total_topic_count' => array(), - '_bbp_voice_count' => array(), - - // ??? - '_locale' => array(), - - // wp-job-manager. - '_job_title' => array(), - '_job_description' => array(), - - // wpml. - '_wpml_media_duplicate' => array(), - '_wpml_media_featured' => array(), - - // generic fields. - 'ad_clicks_count' => array(), - 'email' => array(), - 'usage_count' => array(), - 'user_mail' => array(), - 'views' => array(), - '_EventAllDay' => array(), - '_EventCost' => array(), - '_EventCurrencyPosition' => array(), - '_EventCurrencySymbol' => array(), - '_EventDuration' => array(), - '_EventEndDate' => array(), - '_EventEndDateUTC' => array(), - '_EventOrganizerID' => array(), - '_EventOrigin' => array(), - '_EventShowMap' => array(), - '_EventShowMapLink' => array(), - '_EventStartDate' => array(), - '_EventStartDateUTC' => array(), - '_EventTimezone' => array(), - '_EventTimezoneAbbr' => array(), - '_EventURL' => array(), - '_EventVenueID' => array(), - '_OrganizerEmail' => array(), - '_OrganizerOrganizer' => array(), - '_OrganizerOrigin' => array(), - '_OrganizerPhone' => array(), - '_OrganizerWebsite' => array(), - '_VenueAddress' => array(), - '_VenueCity' => array(), - '_VenueCountry' => array(), - '_VenueOrigin' => array(), - '_VenuePhone' => array(), - '_VenueProvince' => array(), - '_VenueShowMap' => array(), - '_VenueShowMapLink' => array(), - '_VenueState' => array(), - '_VenueStateProvince' => array(), - '_VenueURL' => array(), - '_VenueVenue' => array(), - '_VenueVenueID' => array(), - '_VenueZip' => array(), - '_description' => array(), - '_edit_last' => array(), - '_feedback_all_fields' => array(), - '_feedback_author' => array(), - '_feedback_author_email' => array(), - '_feedback_author_url' => array(), - '_feedback_contact_form_url' => array(), - '_feedback_ip' => array(), - '_feedback_subject' => array(), - '_layout' => array(), - '_links_to' => array(), - '_links_to_target' => array(), - '_mail' => array(), - '_mail_2' => array(), - '_messages' => array(), - '_numero' => array(), - '_post_restored_from' => array(), - '_video_url' => array(), - '_website' => array(), - - ); // end unindexed post meta. - - /** - * List of indexed taxonomy slugs - VARCHAR(32) - * - * @access private - * @static - * - * @var array - */ - private static $taxonomies_to_sync = array( - - // Core. - 'link_category', - 'nav_menu', - 'post_format', // Special, limited to certain values. - - // bbpress. - 'topic', - 'topic-tag', - 'topics', - - // buddypress. - 'bp-email-type', - 'bp-email-type', - 'bp_docs_access', - 'bp_docs_associated_item', - 'bp_docs_comment_access', - 'bp_docs_doc_in_folder', - 'bp_docs_folder_in_group', - 'bp_docs_tag', - 'bp_member_type', - - // co-authors plus. - 'author', - - // events calendar plus. - // the events calendar. - 'event-categories', - 'event-category', - 'event-tag', - 'event-tags', - 'event-type', - 'event-venue', - 'event_category', - 'event_location', - 'event_organizer', - 'event_tag', - 'event_type', - 'event_type_2', - 'event_users', - 'events_categories', - 'events_category', - 'events_feeds', - 'events_tags', - 'tribe_events_cat', - - // jetpack. - 'jetpack-portfolio-tag', - 'jetpack-portfolio-type', - 'jetpack-search-tag0', - 'jetpack-search-tag1', - 'jetpack-search-tag2', - 'jetpack-search-tag3', - 'jetpack-search-tag4', - 'jetpack-search-tag5', - 'jetpack-search-tag6', - 'jetpack-search-tag7', - 'jetpack-search-tag8', - 'jetpack-search-tag9', - - // nextgen gallery. - 'ngg_tag', - - // polylang. - // wpml. - 'language', - 'post_translations', - 'term_language', - 'term_translations', - 'translation_priority', - - // woocommerce. - 'pa_accessory-type', - 'pa_actor', - 'pa_age', - 'pa_ambulance', - 'pa_amount', - 'pa_arm-roll', - 'pa_aspectratio', - 'pa_audiencerating', - 'pa_author', - 'pa_axle', - 'pa_battery', - 'pa_belakang', - 'pa_binding', - 'pa_body-type', - 'pa_bore-x-stroke-mm', - 'pa_box-cargo', - 'pa_brakes', - 'pa_brand', - 'pa_brands', - 'pa_bus', - 'pa_c', - 'pa_cabin-to-end', - 'pa_capacity', - 'pa_catalognumberlist', - 'pa_ce-keurmerk', - 'pa_chassis-front', - 'pa_chassis-rear', - 'pa_chassis-weight-kg', - 'pa_chip-log', - 'pa_clothing-size', - 'pa_clutch', - 'pa_clutch-type', - 'pa_collection', - 'pa_color', - 'pa_colors', - 'pa_colour', - 'pa_compactor', - 'pa_condition', - 'pa_cor', - 'pa_couleur', - 'pa_country', - 'pa_countryregion-of-manufacture', - 'pa_crane', - 'pa_creator', - 'pa_culoare', - 'pa_customerpackagetype', - 'pa_depan', - 'pa_depan-belakang', - 'pa_department', - 'pa_design', - 'pa_diameter', - 'pa_diameter-cakram', - 'pa_dimension-mm', - 'pa_dimensions', - 'pa_director', - 'pa_disc-diameter', - 'pa_drive-system', - 'pa_dump', - 'pa_ean', - 'pa_eanlist', - 'pa_edition', - 'pa_electric-battery', - 'pa_engine-model', - 'pa_engine-size', - 'pa_ethnicity', - 'pa_exhaust-brake', - 'pa_fabric', - 'pa_farbe', - 'pa_farg', - 'pa_farge', - 'pa_features', - 'pa_final-gear-ratio', - 'pa_finish', - 'pa_fire-fighting', - 'pa_fits', - 'pa_flat-bed', - 'pa_flavour', - 'pa_format', - 'pa_fragrance', - 'pa_frame', - 'pa_front', - 'pa_front-overhang', - 'pa_front-rear', - 'pa_front-tread', - 'pa_fuel-tank', - 'pa_fuel-type', - 'pa_garantie', - 'pa_geadviseerd-accu-type', - 'pa_gear-ratio', - 'pa_gender', - 'pa_genre', - 'pa_gewicht-exclusief-accu', - 'pa_gift-card-amount', - 'pa_grade-ability-tan-o', - 'pa_groesse', - 'pa_gtin', - 'pa_gvwr-gcwr', - 'pa_hardwareplatform', - 'pa_hazardousmaterialtype', - 'pa_height', - 'pa_hekmotor-of-boegmotor', - 'pa_helmet-size', - 'pa_hersteller', - 'pa_high-blow-tank', - 'pa_hoehe', - 'pa_inhoud', - 'pa_isadultproduct', - 'pa_isbn', - 'pa_iseligiblefortradein', - 'pa_itemdimensions', - 'pa_itempartnumber', - 'pa_kemudi-tipe', - 'pa_kleur', - 'pa_kopling-tipe', - 'pa_label', - 'pa_languages', - 'pa_lbs', - 'pa_legaldisclaimer', - 'pa_lengte-aansluitkabel', - 'pa_length', - 'pa_liquid-tank', - 'pa_location', - 'pa_losse-motor-complete-set', - 'pa_maat', - 'pa_main-brake', - 'pa_make', - 'pa_manufacturer', - 'pa_manufacturer-part-number', - 'pa_manufacturermaximumage', - 'pa_manufacturerminimumage', - 'pa_manufacturerpartswarrantydesc', - 'pa_masseinheit', - 'pa_material', - 'pa_mau-sac', - 'pa_maximum-power-ps-rpm', - 'pa_maximum-speed', - 'pa_maximum-torque-kgm-rpm', - 'pa_mediatype', - 'pa_megethos', - 'pa_merk', - 'pa_metal-type', - 'pa_min-turning-circle', - 'pa_mixer', - 'pa_model', - 'pa_model-tipe', - 'pa_model-type', - 'pa_modelo', - 'pa_mount', - 'pa_mpn', - 'pa_nicotine-strength', - 'pa_nos-of-cylinder', - 'pa_nos-of-tire', - 'pa_numberofdiscs', - 'pa_numberofitems', - 'pa_numberofpages', - 'pa_offset', - 'pa_open-cargo', - 'pa_operatingsystem', - 'pa_options', - 'pa_other-part-number', - 'pa_overall-height', - 'pa_overall-length', - 'pa_overall-width', - 'pa_overview', - 'pa_packagedimensions', - 'pa_packagequantity', - 'pa_pages', - 'pa_parking-brake', - 'pa_part-number', - 'pa_partnumber', - 'pa_pattern', - 'pa_pattern2', - 'pa_performa', - 'pa_pictureformat', - 'pa_pin-size', - 'pa_piston-displacement-cc', - 'pa_ploshhad', - 'pa_plug-type', - 'pa_power', - 'pa_product', - 'pa_productgroup', - 'pa_producttypename', - 'pa_publicationdate', - 'pa_publisher', - 'pa_quantity', - 'pa_rear', - 'pa_rear-overhang', - 'pa_rear-tread', - 'pa_refrigerated-box', - 'pa_region', - 'pa_regioncode', - 'pa_releasedate', - 'pa_rem-parkir', - 'pa_rem-pelambat', - 'pa_rem-utama', - 'pa_reverse', - 'pa_runningtime', - 'pa_scent', - 'pa_schachtlengte', - 'pa_seeds', - 'pa_series', - 'pa_setting', - 'pa_sex', - 'pa_shape', - 'pa_shirt-size', - 'pa_size', - 'pa_sizes', - 'pa_sku', - 'pa_sky-lift', - 'pa_sleeve-length', - 'pa_snelheidsregeling', - 'pa_staart', - 'pa_steering', - 'pa_steering-type', - 'pa_storlek', - 'pa_studio', - 'pa_stuwkracht-lbs', - 'pa_style', - 'pa_suspensions', - 'pa_taille', - 'pa_talla', - 'pa_tamanho', - 'pa_tamano', - 'pa_taxi', - 'pa_ticket-type', - 'pa_tire-size', - 'pa_total-chassis-weight', - 'pa_towing-truck', - 'pa_tradeinvalue', - 'pa_trailer-t-head', - 'pa_transmisi-tipe', - 'pa_transmission', - 'pa_transmission-type', - 'pa_types', - 'pa_ukuran', - 'pa_upc', - 'pa_upclist', - 'pa_variation', - 'pa_vehicle-carrier', - 'pa_vergelijkbaar-stuwkracht', - 'pa_vermogen', - 'pa_voltage', - 'pa_volume', - 'pa_warranty', - 'pa_weight', - 'pa_wheel-base', - 'pa_wheel-configuration', - 'pa_wheel-disc-size', - 'pa_width', - 'pa_zout-water-geschikt', - 'product', - 'product-brand', - 'product_brand', - 'product-category', - 'product_cat', - 'product_delivery_time', - 'product_delivery_times', - 'product_price_label', - 'product_sale_labels', - 'product_shipping_class', - 'product_tag', - 'product_type', - 'product_unit', - 'product_visibility', - 'products', - - // wp-job-manager. - 'job-category', - 'job-location', - 'job-type', - 'job_cat', - 'job_category', - 'job_listing_category', - 'job_listing_label', - 'job_listing_region', - 'job_listing_tag', - 'job_listing_type', - 'job_salary', - 'job_tag', - 'job_type', - 'jobman_category', - 'jobpost_category', - 'jobpost_job_type', - 'jobpost_location', - 'resume_category', - 'resume_groups', - 'resume_job_type', - 'resume_job_type', - 'resume_languages', - 'resume_region', - 'resume_skill', - 'resume_specialities', - - // generic. - '_resource', - 'acadp_categories', - 'acadp_locations', - 'action-group', - 'activity', - 'actor', - 'actors', - 'ad-group', - 'adace-ad-group', - 'adace-sponsor', - 'additional_features', - 'adv_location', - 'advanced_ads_groups', - 'advert_category', - 'affcoups_coupon_category', - 'affcoups_coupon_type', - 'ai_log_context', - 'ai_log_level', - 'al_product-cat', - 'aol_ad_category', - 'aol_ad_location', - 'aol_ad_type', - 'aol_application_status', - 'area', - 'article-slug', - 'asgarosforum-category', - 'asgarosforum-usergroup', - 'attachment_category', - 'attachment_tag', - 'atum_location', - 'audience_type', - 'avhec_catgroup', - 'bartype', - 'baths', - 'beds', - 'bepro_listing_types', - 'blog_category', - 'booked_custom_calendars', - 'brand', - 'brands', - 'business', - 'business_cat', - 'business_category', - 'bwg_tag', - 'byline', - 'calendar_category', - 'calendar_feed', - 'calendar_type', - 'campaign_category', - 'campaign_tag', - 'carousel_cat', - 'carousels_category', - 'case27_job_listing_tags', - 'categories', - 'category_media', - 'category_portfolio', - 'celebrity_cat', - 'chapters', - 'chronosly_category', - 'city', - 'classified_listing_type', - 'client-types', - 'clients_groups', - 'cm-business-category', - 'cmdm_category', - 'cn_log_type', - 'coderevolution_post_source', - 'collection', - 'community', - 'companies', - 'company', - 'cont_category', - 'content_audit', - 'country', - 'course', - 'course-cat', - 'course-category', - 'course_cat', - 'course_category', - 'course_difficulty', - 'course_tag', - 'courses_type', - 'cp_campaign', - 'cp_recipe_category', - 'csco_post_featured', - 'ct_status', - 'ctl-stories', - 'cuisine', - 'dc_vendor_shop', - 'ddownload_category', - 'ddownload_tag', - 'dealstore', - 'department', - 'departments', - 'department-company', - 'developed-by', - 'dfads_group', - 'dgfw_gift_categories', - 'director', - 'district', - 'dlm_download_category', - 'dlm_download_tag', - 'doc_tag', - 'document-category', - 'document-type', - 'download_artist', - 'download_category', - 'download_tag', - 'downloads_filter', - 'dps_book', - 'dt_gallery_category', - 'dt_logos_category', - 'dt_portfolio_category', - 'dt_team_category', - 'dt_testimonials_category', - 'dtcast', - 'dtcreator', - 'dtdirector', - 'dtnetworks', - 'dtstudio', - 'dtyear', - 'dvteamtaxonomy', - 'dwqa-question_category', - 'dwqa-question_tag', - 'eafl_category', - 'easy-testimonial-category', - 'ecwd_event_category', - 'edd_log_type', - 'edition', - 'ef_editorial_meta', - 'ef_usergroup', - 'element_category', - 'elementor_library_type', - 'employees_category', - 'encyclopedia-tag', - 'envira-tag', - 'epkb_post_type_1_category', - 'espresso_event_categories', - 'espresso_event_type', - 'essential_grid_category', - 'et_post_format', - 'faq-group', - 'faq-tags', - 'faq-topic', - 'faq_cat', - 'faq_categories', - 'faq_category', - 'faqs-category', - 'fdm-menu-section', - 'feature', - 'featured_item_category', - 'featured_item_tag', - 'feedback_type', - 'feeds', - 'fl-builder-template-type', - 'flamingo_inbound_channel', - 'follow_up_email_campaign', - 'follow_up_email_type', - 'following_users', - 'football-team-taxo', - 'fpd_design_category', - 'gallery-category', - 'gallery_cat', - 'gallery_categories', - 'gallery_category', - 'gallery_entries', - 'gallerycat', - 'gd_event_tags', - 'gd_eventcategory', - 'gd_place_tags', - 'gd_placecategory', - 'genre', - 'genres', - 'gg_connect_hub', - 'give_log_type', - 'gn-genre', - 'gn-location-1', - 'gn-location-2', - 'gn-location-3', - 'gp_hubs', - 'gp_portfolios', - 'gp_videos', - 'group', - 'group-documents-category', - 'groups', - 'hashtags', - 'hotel_facility', - 'ia_invited_groups', - 'ia_invitees', - 'incsub_wiki_category', - 'industry', - 'ingredient', - 'insight-type', - 'issue', - 'issuem_issue', - 'issuem_issue_tags', - 'jbp_category', - 'karma-slider-category', - 'klaviyo_shop_cart_status', - 'kwlogos-carousel', - 'layout_category', - 'layout_type', - 'ld_course_category', - 'ld_course_tag', - 'ld_lesson_category', - 'ld_lesson_tag', - 'ld_topic_tag', - 'lesson-tag', - 'level', - 'lingotek_hash', - 'lingotek_profile', - 'link_library_category', - 'linkage', - 'list-tags', - 'listing-category', - 'listing_amenities', - 'listing_category', - 'liveblog', - 'llms_access_plan_visibility', - 'llms_product_visibility', - 'localisation', - 'location', - 'location-tag', - 'locations', - 'magazine', - 'map_location_categories', - 'masonry_gallery_category', - 'mc-event-category', - 'mec_category', - 'mec_location', - 'mec_organizer', - 'media-category', - 'media-tags', - 'media_category', - 'media_folder', - 'member_cat', - 'mentions', - 'mesh_template_types', - 'ml-slider', - 'module', - 'module-tag', - 'module_width', - 'movie_cat', - 'mpp-component', - 'mpp-status', - 'mpp-type', - 'muvicast', - 'muvicountry', - 'muvidirector', - 'muviindex', - 'muviquality', - 'muviyear', - 'news-category', - 'news-tag', - 'news-type', - 'news_type_cat', - 'news_category', - 'nova_menu', - 'nova_menu_item_label', - 'offer-types', - 'organization', - 'our_team_category', - 'page_category', - 'parisrestaurant', - 'parissauna', - 'partner_category', - 'partners', - 'paswdestinatari', - 'paypal_ipn_type', - 'pdf_lv_tag', - 'pec_events_category', - 'people', - 'people-department', - 'people-expertise', - 'people-location', - 'perfect_quotes_category', - 'performer', - 'person', - 'personnal-category', - 'pexcontentslider_category', - 'pexfullslider_category', - 'pexnivoslider_category', - 'pexpricing_category', - 'pexservice_category', - 'pextestimonial_category', - 'pf_feed_item_tag', - 'pg_sas_type', - 'photo_tag', - 'phototype', - 'pj-categs', - 'pj-tags', - 'pl-categs', - 'placement', - 'plan_status', - 'platform', - 'player', - 'plugins_categories', - 'podcast', - 'pojo_sidebars', - 'popup_category', - 'pornstars', - 'portada', - 'portcat', - 'portfolio-category', - 'portfolio-gallery', - 'portfolio-status', - 'portfolio-skills', - 'portfolio-tag', - 'portfolio-tags', - 'portfolio-type', - 'portfolio-types', - 'portfolio_cat', - 'portfolio_categories', - 'portfolio_category', - 'portfolio_cats', - 'portfolio_client', - 'portfolio_entries', - 'portfolio_filter', - 'portfolio_in', - 'portfolio_label', - 'portfolio_skills', - 'portfolio_tag', - 'portfolio_tags', - 'portfolio_type', - 'posicao', - 'post-type', - 'post_format', - 'post_series', - 'pp_editorial_meta', - 'pp_notify_role', - 'pp_usergroup', - 'pricingcats', - 'print_section', - 'print_status', - 'product_asset_class', - 'product_name', - 'programs', - 'project-attributes', - 'project-cat', - 'project-category', - 'project-type', - 'project_category', - 'project_tag', - 'projects_category', - 'projects_tag', - 'prominence', - 'promotion-categories', - 'property-city', - 'property-feature', - 'property-status', - 'property-type', - 'property-types', - 'property_action_category', - 'property_area', - 'property_category', - 'property_city', - 'property_feature', - 'property_status', - 'property_type', - 'province', - 'provinces', - 'publisher', - 'pwb-brand', - 'qmn_log_type', - 'qualification', - 'qualifications', - 'quality', - 'question-category', - 'question-tag', - 'question-type', - 'question_cat', - 'question_category', - 'question_tag', - 'quiz', - 'quiz-type', - 'quote_status', - 'rating', - 'reaction', - 'recipe-category', - 'recipe_category', - 'recipe_type', - 'region', - 'registrant-event', - 'related_keywords', - 'release-date', - 'resource-type', - 'resource_category', - 'resource_type', - 'resourcetype', - 'review-type', - 'review_category', - 'rodzaj', - 'role', - 'room_category', - 'room_tag', - 'roomtype', - 'rubriek_categorie', - 'savedreply', - 'schools', - 'scope', - 'scores_cat', - 'sdm_categories', - 'sdm_tags', - 'season', - 'secondary_html_features', - 'section', - 'sector', - 'series', - 'series_of_posts', - 'services_group', - 'serving', - 'shop_cart_status', - 'shop_cat', - 'shop_order_status', - 'shop_vendor', - 'shop_warranty_status', - 'shopp_category', - 'shopr_category', - 'show', - 'simple_link_category', - 'site-review-category', - 'sizes', - 'skill', - 'skill_level', - 'skills', - 'sld_cat', - 'slide-page', - 'slide-types', - 'slide_categories', - 'slide_type', - 'slider', - 'slider-locations', - 'slider_category', - 'slides_category', - 'slideshow', - 'sm-category', - 'snax_format', - 'sngg_media_tags', - 'solution_channel', - 'source_domain', - 'source_id', - 'sp_league', - 'sp_position', - 'sp_role', - 'sp_season', - 'sp_venue', - 'speaker', - 'speakers', - 'special-feature', - 'specialty', - 'spnl_log_type', - 'sponsor_categories', - 'sponsor_category', - 'sponsor_type', - 'spot_tag', - 'st_af_category', - 'st_af_tags', - 'staff', - 'staff-member-category', - 'staff-member-group', - 'staff_category', - 'staffgroups', - 'state', - 'status', - 'store', - 'stores', - 'studio', - 'study_level', - 'style', - 'style_category', - 'sub_transaction_action', - 'sub_transaction_result', - 'subcategory', - 'subject', - 'subscription_status', - 'swift-slider-category', - 'syn_sitegroup', - 'szbl-content-tag', - 'task-queue', - 'tax_feature', - 'tcb_symbols_tax', - 'tcp_product_category', - 'team', - 'team-category', - 'team_cat', - 'team_categories', - 'team_category', - 'team_cats', - 'team_department', - 'team_designation', - 'team_group', - 'team_member_position', - 'team_mfcategory', - 'teams', - 'tenant_categories', - 'tenant_location', - 'tender-category', - 'test-type', - 'testimonial-category', - 'testimonial-group', - 'testimonial-types', - 'testimonial_categories', - 'testimonial_category', - 'testimonials-category', - 'testimonials_category', - 'th_events_cat', - 'th_galleries_cat', - 'thegem_clients_sets', - 'thegem_news_sets', - 'thegem_portfolios', - 'thegem_quickfinders', - 'thegem_teams', - 'thegem_testimonials_sets', - 'theme', - 'themefusion_es_groups', - 'themes_categories', - 'themo_cpt_group', - 'themo_project_type', - 'themo_room_type', - 'thirstylink-category', - 'ticket_channel', - 'ticket_priority', - 'timeline_post_tag', - 'tipo', - 'tipologie', - 'tips', - 'tm-testimonials_category', - 'tm_testimonial_group', - 'tooltips_categories', - 'tour_category', - 'tour_destination', - 'tour_facility', - 'tour_phys', - 'tour_type', - 'tp_event_category', - 'transmission', - 'treatment-type', - 'tribe_events_cat', - 'truethemes-gallery-category', - 'tsas-category', - 'tshowcase-categories', - 'tsml_region', - 'ttshowcase_groups', - 'tvo_tags', - 'type', - 'types', - 'u_course_cat', - 'u_department', - 'u_event_cat', - 'ufaq-category', - 'ufaq-tag', - 'um_hashtag', - 'um_user_tag', - 'uncodeblock_category', - 'upg_cate', - 'urp-review-category', - 'us_portfolio_category', - 'us_testimonial_category', - 'user-group', - 'user_category', - 'user_status', - 'vendor', - 'venue', - 'video-category', - 'video-series', - 'video-tag', - 'video_category', - 'video_tag', - 'videos', - 'videos_categories', - 'voice_category', - 'vtmin_rule_category', - 'vtprd_rule_category', - 'w2dc-category', - 'w2dc-location', - 'w2dc-tag', - 'wcb_sponsor_level', - 'wcb_track', - 'wccf_checkout_field_field_type', - 'wccf_checkout_field_status', - 'wccf_order_field_field_type', - 'wccf_order_field_status', - 'wccf_product_field_field_type', - 'wccf_product_field_status', - 'wccf_product_prop_field_type', - 'wccf_product_prop_status', - 'wccf_user_field_field_type', - 'wccf_user_field_status', - 'wcfm_knowledgebase_category', - 'wcm_task_category', - 'wcpv_product_vendors', - 'wcs-instructor', - 'wcs-room', - 'wcs-type', - 'wdca_ad_categories', - 'webinar_type_cat', - 'where', - 'who', - 'wiki-category', - 'wiki_cats', - 'wl_entity_type', - 'workout_entries', - 'works-category', - 'wp-rest-api-log-method', - 'wp-rest-api-log-source', - 'wp-rest-api-log-status', - 'wp-type-activity-types', - 'wp-type-contacts-subtype', - 'wp-type-group', - 'wp_bannerize_tax', - 'wp_log_type', - 'wp_super_faq_category', - 'wpbdm-region', - 'wpbdp_category', - 'wpbdp_tag', - 'wpcm_make_model', - 'wpdmcategory', - 'wpfb_file_category', - 'wpfcas-category', - 'wpfd-category', - 'wplead_list_category', - 'wplss_logo_showcase_cat', - 'wpm-testimonial-category', - 'wpmf-category', - 'wpostahs-slider-category', - 'wprm_course', - 'wprm_cuisine', - 'wprm_ingredient', - 'wprm_keyword', - 'wprss_category', - 'wps_forum', - 'wpsc-variation', - 'wpsc_log_type', - 'wpsc_product_category', - 'wpseo_locations_category', - 'wpsisac_slider-category', - 'wpsl_store_category', - 'wpt_category', - 'wpt_result', - 'wpt_scale', - 'wpv_sermons_category', - 'wpvqgr_tag', - 'writer', - 'wyz_business_category', - 'wyz_business_rating_category', - 'wyz_business_tag', - 'wzkb_category', - 'year', - 'years', - 'yith_product_brand', - 'yith_shop_vendor', - 'yst_prominent_words', - 'zipcode', - 'zoninator_zones', - 'zrf_field_group', - - // End The Backlog @see https://wp.me/p9MPsk-X0. - 'bill-status', - 'etb-audience', - 'etb-state', - 'etb-target', - 'etb-topic', - 'etb-year', - 'foia-response-status', - 'target-type', - 'timeline-pillar', - 'timeline-type', - - // wp.com martketplace search - @see https://wp.me/pdh6GB-Ax#comment-2104 - 'wpcom_marketplace_categories', - - ); // end taxonomies. - - /** - * List of options to sync - * - * @access private - * @static - * - * @var array - */ - private static $options_to_sync = array( - 'jetpack_search_ai_prompt_override', - 'jetpack_search_color_theme', - 'jetpack_search_result_format', - 'jetpack_search_default_sort', - 'jetpack_search_overlay_trigger', - 'jetpack_search_excluded_post_types', - 'jetpack_search_highlight_color', - 'jetpack_search_enable_sort', - 'jetpack_search_inf_scroll', - 'jetpack_search_show_powered_by', - 'instant_search_enabled', - ); // end options. - - /* - * Taxonomies we know don't sync. - * See also sync/src/class-defaults.php - * - * 'network' - * 'post_status' - * 'product_cat' - * 'tags' - * - */ - - // - // Hooks into sync. - - /** - * Add Search post meta to the post meta whitelist. - * - * @param array $list Existing post meta whitelist. - * @return array Updated post meta whitelist. - */ - public function add_search_post_meta_whitelist( $list ) { - return array_merge( $list, static::get_all_postmeta_keys() ); - } - - /** - * Add Search options to the options whitelist. - * - * @param array $list Existing options whitelist. - * @return array Updated options whitelist. - */ - public function add_search_options_whitelist( $list ) { - return array_merge( $list, static::get_all_option_keys() ); - } - - // - // Indexing functions for wp.com. - - /** - * - * Check whether a postmeta or taxonomy 'key' is in the indexable - * list. This is called by the indexing code on wp.com to decide - * whether to include something in the index. - * - * @static - * @access public - * - * @param string $type Either 'postmeta' or 'taxonomy'. - * @param string $key The postmeta key or taxonomy name. - * @return boolean - */ - public static function is_indexable( $type, $key ) { - switch ( $type ) { - case 'postmeta': - return isset( self::$postmeta_to_sync[ $key ] ); - case 'taxonomy': - return in_array( $key, self::$taxonomies_to_sync, true ); - } - return false; - } - - /** - * - * Get the indexing spec for a postmeta key. - * - * @static - * @access public - * - * @param string $key The postmeta key. - * @return array The spec. - */ - public static function get_postmeta_spec( $key ) { - return self::$postmeta_to_sync[ $key ]; - } - - /** - * Get all post meta keys that get synced. - * - * @access public - * - * @return array List of post meta keys that get synced. - */ - public static function get_all_postmeta_keys() { - return array_keys( self::$postmeta_to_sync ); - } - - /** - * Get all option keys that get synced. - * - * @access public - * - * @return array List of option keys that get synced. - */ - public static function get_all_option_keys() { - return self::$options_to_sync; - } - - /** - * Get all unindexed postmeta. - * This is mostly for testing. - * - * @access public - * - * @return array List of postmeta that are not synced. - */ - public static function get_all_unindexed_postmeta_keys() { - return array_keys( self::$unindexed_postmeta ); - } - - /** - * Get all taxonomies that get synced. - * This is mostly for testing. - * - * @access public - * - * @return array List of taxonomies that get synced. - */ - public static function get_all_taxonomies() { - return self::$taxonomies_to_sync; - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-stats.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-stats.php deleted file mode 100644 index 83479d1d..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-stats.php +++ /dev/null @@ -1,68 +0,0 @@ - self::MAX_INT, - 'term_taxonomy_id' => self::MAX_INT, - ); - - while ( $limit > 0 ) { - /* - * SELECT object_id, term_taxonomy_id - * FROM $wpdb->term_relationships - * WHERE ( object_id = 11 AND term_taxonomy_id < 14 ) OR ( object_id < 11 ) - * ORDER BY object_id DESC, term_taxonomy_id DESC LIMIT 1000 - */ - $objects = $wpdb->get_results( $wpdb->prepare( "SELECT object_id, term_taxonomy_id FROM $wpdb->term_relationships WHERE ( object_id = %d AND term_taxonomy_id < %d ) OR ( object_id < %d ) ORDER BY object_id DESC, term_taxonomy_id DESC LIMIT %d", $last_object_enqueued['object_id'], $last_object_enqueued['term_taxonomy_id'], $last_object_enqueued['object_id'], $limit ), ARRAY_A ); - // Request term relationships in groups of N for efficiency. - $objects_count = is_countable( $objects ) ? count( $objects ) : 0; - if ( ! $objects_count ) { - return array( $items_enqueued_count, true ); - } - $items = array_chunk( $objects, $term_relationships_full_sync_item_size ); - $last_object_enqueued = $this->bulk_enqueue_full_sync_term_relationships( $items, $last_object_enqueued ); - $items_enqueued_count += count( $items ); - $limit = min( $limit - $objects_count, self::QUERY_LIMIT ); - } - - // We need to do this extra check in case $max_items_to_enqueue * $term_relationships_full_sync_item_size == relationships objects left. - $count = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM $wpdb->term_relationships WHERE ( object_id = %d AND term_taxonomy_id < %d ) OR ( object_id < %d ) ORDER BY object_id DESC, term_taxonomy_id DESC LIMIT %d", $last_object_enqueued['object_id'], $last_object_enqueued['term_taxonomy_id'], $last_object_enqueued['object_id'], 1 ) ); - if ( 0 === (int) $count ) { - return array( $items_enqueued_count, true ); - } - - return array( $items_enqueued_count, $last_object_enqueued ); - } - - /** - * Return the initial last sent object. - * - * @return string|array initial status. - */ - public function get_initial_last_sent() { - return array( - 'object_id' => self::MAX_INT, - 'term_taxonomy_id' => self::MAX_INT, - ); - } - - /** - * Given the Module Full Sync Configuration and Status return the next chunk of items to send. - * - * @param array $config This module Full Sync configuration. - * @param array $status This module Full Sync status. - * @param int $chunk_size Chunk size. - * - * @return array|object|null - */ - public function get_next_chunk( $config, $status, $chunk_size ) { - global $wpdb; - - return $wpdb->get_results( - $wpdb->prepare( - "SELECT object_id, term_taxonomy_id - FROM $wpdb->term_relationships - WHERE ( object_id = %d AND term_taxonomy_id < %d ) OR ( object_id < %d ) - ORDER BY object_id DESC, term_taxonomy_id - DESC LIMIT %d", - $status['last_sent']['object_id'], - $status['last_sent']['term_taxonomy_id'], - $status['last_sent']['object_id'], - $chunk_size - ), - ARRAY_A - ); - } - - /** - * Return last_item to send for Module Full Sync Configuration. - * - * @param array $config This module Full Sync configuration. - * - * @return array|object|null - */ - public function get_last_item( $config ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable - global $wpdb; - // phpcs:ignore WordPress.DB.DirectDatabaseQuery.NoCaching,WordPress.DB.DirectDatabaseQuery.DirectQuery - return $wpdb->get_results( - "SELECT object_id, term_taxonomy_id - FROM $wpdb->term_relationships - ORDER BY object_id , term_taxonomy_id - LIMIT 1", - ARRAY_A - ); - } - - /** - * - * Enqueue all $items within `jetpack_full_sync_term_relationships` actions. - * - * @param array $items Groups of objects to sync. - * @param array $previous_interval_end Last item enqueued. - * - * @return array Last enqueued object. - */ - public function bulk_enqueue_full_sync_term_relationships( $items, $previous_interval_end ) { - $listener = Listener::get_instance(); - $items_with_previous_interval_end = $this->get_chunks_with_preceding_end( $items, $previous_interval_end ); - $listener->bulk_enqueue_full_sync_actions( 'jetpack_full_sync_term_relationships', $items_with_previous_interval_end ); - $last_item = end( $items ); - return end( $last_item ); - } - - /** - * Retrieve an estimated number of actions that will be enqueued. - * - * @access public - * - * @param array $config Full sync configuration for this sync module. - * @return int Number of items yet to be enqueued. - */ - public function estimate_full_sync_actions( $config ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable - global $wpdb; - - $query = "SELECT COUNT(*) FROM $wpdb->term_relationships"; - - // phpcs:disable WordPress.DB.PreparedSQL.NotPrepared - $count = $wpdb->get_var( $query ); - - return (int) ceil( $count / Settings::get_setting( 'term_relationships_full_sync_item_size' ) ); - } - - /** - * Retrieve the actions that will be sent for this module during a full sync. - * - * @access public - * - * @return array Full sync actions of this module. - */ - public function get_full_sync_actions() { - return array( 'jetpack_full_sync_term_relationships' ); - } - - /** - * Expand the term relationships within a hook before they are serialized and sent to the server. - * - * @access public - * - * @param array $args The hook parameters. - * @return array $args The expanded hook parameters. - */ - public function expand_term_relationships( $args ) { - list( $term_relationships, $previous_end ) = $args; - - return array( - 'term_relationships' => $term_relationships, - 'previous_end' => $previous_end, - ); - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-terms.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-terms.php deleted file mode 100644 index 7b7f605b..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-terms.php +++ /dev/null @@ -1,313 +0,0 @@ -get_error_code() === 'invalid_taxonomy' ) { - // Fetch raw term. - $columns = implode( ', ', array_unique( array_merge( Defaults::$default_term_checksum_columns, array( 'term_group' ) ) ) ); - // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared - $object = $wpdb->get_row( $wpdb->prepare( "SELECT $columns FROM $wpdb->terms WHERE term_id = %d", $id ) ); - } - } - - if ( 'term_taxonomy' === $object_type ) { - $columns = implode( ', ', array_unique( array_merge( Defaults::$default_term_taxonomy_checksum_columns, array( 'description' ) ) ) ); - // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared - $object = $wpdb->get_row( $wpdb->prepare( "SELECT $columns FROM $wpdb->term_taxonomy WHERE term_taxonomy_id = %d", $id ) ); - } - - if ( 'term_relationships' === $object_type ) { - $columns = implode( ', ', Defaults::$default_term_relationships_checksum_columns ); - // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared - $objects = $wpdb->get_results( $wpdb->prepare( "SELECT $columns FROM $wpdb->term_relationships WHERE object_id = %d", $id ) ); - $object = (object) array( - 'object_id' => $id, - 'relationships' => array_map( array( $this, 'expand_terms_for_relationship' ), $objects ), - ); - } - - return $object ? $object : false; - } - - /** - * Initialize terms action listeners. - * - * @access public - * - * @param callable $callable Action handler callable. - */ - public function init_listeners( $callable ) { - add_action( 'created_term', array( $this, 'save_term_handler' ), 10, 3 ); - add_action( 'edited_term', array( $this, 'save_term_handler' ), 10, 3 ); - add_action( 'jetpack_sync_save_term', $callable ); - add_action( 'jetpack_sync_add_term', $callable ); - add_action( 'delete_term', $callable, 10, 4 ); - add_action( 'set_object_terms', $callable, 10, 6 ); - add_action( 'deleted_term_relationships', $callable, 10, 2 ); - add_filter( 'jetpack_sync_before_enqueue_set_object_terms', array( $this, 'filter_set_object_terms_no_update' ) ); - add_filter( 'jetpack_sync_before_enqueue_jetpack_sync_save_term', array( $this, 'filter_blacklisted_taxonomies' ) ); - add_filter( 'jetpack_sync_before_enqueue_jetpack_sync_add_term', array( $this, 'filter_blacklisted_taxonomies' ) ); - } - - /** - * Initialize terms action listeners for full sync. - * - * @access public - * - * @param callable $callable Action handler callable. - */ - public function init_full_sync_listeners( $callable ) { - add_action( 'jetpack_full_sync_terms', $callable, 10, 2 ); - } - - /** - * Initialize the module in the sender. - * - * @access public - */ - public function init_before_send() { - // Full sync. - add_filter( 'jetpack_sync_before_send_jetpack_full_sync_terms', array( $this, 'expand_term_taxonomy_id' ) ); - } - - /** - * Enqueue the terms actions for full sync. - * - * @access public - * - * @param array $config Full sync configuration for this sync module. - * @param int $max_items_to_enqueue Maximum number of items to enqueue. - * @param boolean $state True if full sync has finished enqueueing this module, false otherwise. - * @return array Number of actions enqueued, and next module state. - */ - public function enqueue_full_sync_actions( $config, $max_items_to_enqueue, $state ) { - global $wpdb; - return $this->enqueue_all_ids_as_action( 'jetpack_full_sync_terms', $wpdb->term_taxonomy, 'term_taxonomy_id', $this->get_where_sql( $config ), $max_items_to_enqueue, $state ); - } - - /** - * Retrieve the WHERE SQL clause based on the module config. - * - * @access public - * - * @param array $config Full sync configuration for this sync module. - * @return string WHERE SQL clause, or `null` if no comments are specified in the module config. - */ - public function get_where_sql( $config ) { - $where_sql = Settings::get_blacklisted_taxonomies_sql(); - - if ( is_array( $config ) ) { - $where_sql .= ' AND term_taxonomy_id IN (' . implode( ',', array_map( 'intval', $config ) ) . ')'; - } - - return $where_sql; - } - - /** - * Retrieve an estimated number of actions that will be enqueued. - * - * @access public - * - * @param array $config Full sync configuration for this sync module. - * @return int Number of items yet to be enqueued. - */ - public function estimate_full_sync_actions( $config ) { - global $wpdb; - - $query = "SELECT count(*) FROM $wpdb->term_taxonomy"; - - $where_sql = $this->get_where_sql( $config ); - if ( $where_sql ) { - $query .= ' WHERE ' . $where_sql; - } - - // phpcs:disable WordPress.DB.PreparedSQL.NotPrepared - $count = $wpdb->get_var( $query ); - - return (int) ceil( $count / self::ARRAY_CHUNK_SIZE ); - } - - /** - * Retrieve the actions that will be sent for this module during a full sync. - * - * @access public - * - * @return array Full sync actions of this module. - */ - public function get_full_sync_actions() { - return array( 'jetpack_full_sync_terms' ); - } - - /** - * Handler for creating and updating terms. - * - * @access public - * - * @param int $term_id Term ID. - * @param int $tt_id Term taxonomy ID. - * @param string $taxonomy Taxonomy slug. - */ - public function save_term_handler( $term_id, $tt_id, $taxonomy ) { - if ( class_exists( '\\WP_Term' ) ) { - $term_object = \WP_Term::get_instance( $term_id, $taxonomy ); - } else { - $term_object = get_term_by( 'id', $term_id, $taxonomy ); - } - - $current_filter = current_filter(); - - if ( 'created_term' === $current_filter ) { - /** - * Fires when the client needs to add a new term - * - * @since 1.6.3 - * @since-jetpack 5.0.0 - * - * @param object the Term object - */ - do_action( 'jetpack_sync_add_term', $term_object ); - return; - } - - /** - * Fires when the client needs to update a term - * - * @since 1.6.3 - * @since-jetpack 4.2.0 - * - * @param object the Term object - */ - do_action( 'jetpack_sync_save_term', $term_object ); - } - - /** - * Filter blacklisted taxonomies. - * - * @access public - * - * @param array $args Hook args. - * @return array|boolean False if not whitelisted, the original hook args otherwise. - */ - public function filter_blacklisted_taxonomies( $args ) { - $term = $args[0]; - - if ( in_array( $term->taxonomy, Settings::get_setting( 'taxonomies_blacklist' ), true ) ) { - return false; - } - - return $args; - } - - /** - * Filter out set_object_terms actions where the terms have not changed. - * - * @param array $args Hook args. - * @return array|boolean False if no change in terms, the original hook args otherwise. - */ - public function filter_set_object_terms_no_update( $args ) { - // There is potential for other plugins to modify args, therefore lets validate # of and types. - // $args[2] is $tt_ids, $args[5] is $old_tt_ids see wp-includes/taxonomy.php L2740. - if ( 6 === count( $args ) && is_array( $args[2] ) && is_array( $args[5] ) ) { - if ( empty( array_diff( $args[2], $args[5] ) ) && empty( array_diff( $args[5], $args[2] ) ) ) { - return false; - } - } - return $args; - } - - /** - * Expand the term taxonomy IDs to terms within a hook before they are serialized and sent to the server. - * - * @access public - * - * @param array $args The hook parameters. - * @return array $args The expanded hook parameters. - */ - public function expand_term_taxonomy_id( $args ) { - list( $term_taxonomy_ids, $previous_end ) = $args; - - return array( - 'terms' => get_terms( - array( - 'hide_empty' => false, - 'term_taxonomy_id' => $term_taxonomy_ids, - 'orderby' => 'term_taxonomy_id', - 'order' => 'DESC', - ) - ), - 'previous_end' => $previous_end, - ); - } - - /** - * Gets a term object based on a given row from the term_relationships database table. - * - * @access public - * - * @param object $relationship A row object from the term_relationships table. - * @return object|bool A term object, or false if term taxonomy doesn't exist. - */ - public function expand_terms_for_relationship( $relationship ) { - return get_term_by( 'term_taxonomy_id', $relationship->term_taxonomy_id ); - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-themes.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-themes.php deleted file mode 100644 index 5a5f02ec..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-themes.php +++ /dev/null @@ -1,876 +0,0 @@ - $widget_object->name, - 'id' => $widget_object->id, - 'title' => isset( $new_instance['title'] ) ? $new_instance['title'] : '', - ); - /** - * Trigger action to alert $callable sync listener that a widget was edited. - * - * @since 1.6.3 - * @since-jetpack 5.0.0 - * - * @param string $widget_name , Name of edited widget - */ - do_action( 'jetpack_widget_edited', $widget ); - - return $instance; - } - - /** - * Sync handler for network allowed themes change. - * - * @access public - * - * @param string $option Name of the network option. - * @param mixed $value Current value of the network option. - * @param mixed $old_value Old value of the network option. - * @param int $network_id ID of the network. - */ - public function sync_network_allowed_themes_change( $option, $value, $old_value, $network_id ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable - $all_enabled_theme_slugs = array_keys( $value ); - $old_value_count = is_countable( $old_value ) ? count( $old_value ) : 0; - $value_count = is_countable( $value ) ? count( $value ) : 0; - - if ( $old_value_count > $value_count ) { - // Suppress jetpack_network_disabled_themes sync action when theme is deleted. - $delete_theme_call = $this->get_delete_theme_call(); - if ( ! empty( $delete_theme_call ) ) { - return; - } - - $newly_disabled_theme_names = array_keys( array_diff_key( $old_value, $value ) ); - $newly_disabled_themes = $this->get_theme_details_for_slugs( $newly_disabled_theme_names ); - /** - * Trigger action to alert $callable sync listener that network themes were disabled. - * - * @since 1.6.3 - * @since-jetpack 5.0.0 - * - * @param mixed $newly_disabled_themes, Array of info about network disabled themes - * @param mixed $all_enabled_theme_slugs, Array of slugs of all enabled themes - */ - do_action( 'jetpack_network_disabled_themes', $newly_disabled_themes, $all_enabled_theme_slugs ); - return; - } - - $newly_enabled_theme_names = array_keys( array_diff_key( $value, $old_value ) ); - $newly_enabled_themes = $this->get_theme_details_for_slugs( $newly_enabled_theme_names ); - /** - * Trigger action to alert $callable sync listener that network themes were enabled - * - * @since 1.6.3 - * @since-jetpack 5.0.0 - * - * @param mixed $newly_enabled_themes , Array of info about network enabled themes - * @param mixed $all_enabled_theme_slugs, Array of slugs of all enabled themes - */ - do_action( 'jetpack_network_enabled_themes', $newly_enabled_themes, $all_enabled_theme_slugs ); - } - - /** - * Retrieve details for one or more themes by their slugs. - * - * @access private - * - * @param array $theme_slugs Theme slugs. - * @return array Details for the themes. - */ - private function get_theme_details_for_slugs( $theme_slugs ) { - $theme_data = array(); - foreach ( $theme_slugs as $slug ) { - $theme = wp_get_theme( $slug ); - $theme_data[ $slug ] = array( - 'name' => $theme->get( 'Name' ), - 'version' => $theme->get( 'Version' ), - 'uri' => $theme->get( 'ThemeURI' ), - 'slug' => $slug, - ); - } - return $theme_data; - } - - /** - * Detect a theme edit during a redirect. - * - * @access public - * - * @param string $redirect_url Redirect URL. - * @return string Redirect URL. - */ - public function detect_theme_edit( $redirect_url ) { - $url = wp_parse_url( admin_url( $redirect_url ) ); - $theme_editor_url = wp_parse_url( admin_url( 'theme-editor.php' ) ); - - if ( $theme_editor_url['path'] !== $url['path'] ) { - return $redirect_url; - } - - $query_params = array(); - wp_parse_str( $url['query'], $query_params ); - if ( - ! isset( $_POST['newcontent'] ) || - ! isset( $query_params['file'] ) || - ! isset( $query_params['theme'] ) || - ! isset( $query_params['updated'] ) - ) { - return $redirect_url; - } - $theme = wp_get_theme( $query_params['theme'] ); - $theme_data = array( - 'name' => $theme->get( 'Name' ), - 'version' => $theme->get( 'Version' ), - 'uri' => $theme->get( 'ThemeURI' ), - ); - - /** - * Trigger action to alert $callable sync listener that a theme was edited. - * - * @since 1.6.3 - * @since-jetpack 5.0.0 - * - * @param string $query_params['theme'], Slug of edited theme - * @param string $theme_data, Information about edited them - */ - do_action( 'jetpack_edited_theme', $query_params['theme'], $theme_data ); - - return $redirect_url; - } - - /** - * Handler for AJAX theme editing. - * - * @todo Refactor to use WP_Filesystem instead of fopen()/fclose(). - */ - public function theme_edit_ajax() { - $args = wp_unslash( $_POST ); - - if ( empty( $args['theme'] ) ) { - return; - } - - if ( empty( $args['file'] ) ) { - return; - } - $file = $args['file']; - if ( 0 !== validate_file( $file ) ) { - return; - } - - if ( ! isset( $args['newcontent'] ) ) { - return; - } - - if ( ! isset( $args['nonce'] ) ) { - return; - } - - $stylesheet = $args['theme']; - if ( 0 !== validate_file( $stylesheet ) ) { - return; - } - - if ( ! current_user_can( 'edit_themes' ) ) { - return; - } - - $theme = wp_get_theme( $stylesheet ); - if ( ! $theme->exists() ) { - return; - } - - if ( ! wp_verify_nonce( $args['nonce'], 'edit-theme_' . $stylesheet . '_' . $file ) ) { - return; - } - - if ( $theme->errors() && 'theme_no_stylesheet' === $theme->errors()->get_error_code() ) { - return; - } - - $editable_extensions = wp_get_theme_file_editable_extensions( $theme ); - - $allowed_files = array(); - foreach ( $editable_extensions as $type ) { - switch ( $type ) { - case 'php': - $allowed_files = array_merge( $allowed_files, $theme->get_files( 'php', -1 ) ); - break; - case 'css': - $style_files = $theme->get_files( 'css', -1 ); - $allowed_files['style.css'] = $style_files['style.css']; - $allowed_files = array_merge( $allowed_files, $style_files ); - break; - default: - $allowed_files = array_merge( $allowed_files, $theme->get_files( $type, -1 ) ); - break; - } - } - - $real_file = $theme->get_stylesheet_directory() . '/' . $file; - if ( 0 !== validate_file( $real_file, $allowed_files ) ) { - return; - } - - // Ensure file is real. - if ( ! is_file( $real_file ) ) { - return; - } - - // Ensure file extension is allowed. - $extension = null; - if ( preg_match( '/\.([^.]+)$/', $real_file, $matches ) ) { - $extension = strtolower( $matches[1] ); - if ( ! in_array( $extension, $editable_extensions, true ) ) { - return; - } - } - - // phpcs:ignore WordPress.WP.AlternativeFunctions.file_system_operations_is_writable - if ( ! is_writable( $real_file ) ) { - return; - } - - // phpcs:ignore WordPress.WP.AlternativeFunctions.file_system_operations_fopen - $file_pointer = fopen( $real_file, 'w+' ); - if ( false === $file_pointer ) { - return; - } - // phpcs:ignore WordPress.WP.AlternativeFunctions.file_system_operations_fclose - fclose( $file_pointer ); - - $theme_data = array( - 'name' => $theme->get( 'Name' ), - 'version' => $theme->get( 'Version' ), - 'uri' => $theme->get( 'ThemeURI' ), - ); - - /** - * This action is documented already in this file. - */ - do_action( 'jetpack_edited_theme', $stylesheet, $theme_data ); - } - - /** - * Detect a theme deletion. - * - * @access public - * - * @param string $stylesheet Stylesheet of the theme to delete. - * @param bool $deleted Whether the theme deletion was successful. - */ - public function detect_theme_deletion( $stylesheet, $deleted ) { - $theme = wp_get_theme( $stylesheet ); - $theme_data = array( - 'name' => $theme->get( 'Name' ), - 'version' => $theme->get( 'Version' ), - 'uri' => $theme->get( 'ThemeURI' ), - 'slug' => $stylesheet, - ); - - if ( $deleted ) { - /** - * Signals to the sync listener that a theme was deleted and a sync action - * reflecting the deletion and theme slug should be sent - * - * @since 1.6.3 - * @since-jetpack 5.0.0 - * - * @param string $stylesheet Theme slug - * @param array $theme_data Theme info Since 5.3 - */ - do_action( 'jetpack_deleted_theme', $stylesheet, $theme_data ); - } - } - - /** - * Handle an upgrader completion action. - * - * @access public - * - * @param \WP_Upgrader $upgrader The upgrader instance. - * @param array $details Array of bulk item update data. - */ - public function check_upgrader( $upgrader, $details ) { - if ( ! isset( $details['type'] ) || - 'theme' !== $details['type'] || - is_wp_error( $upgrader->skin->result ) || - ! method_exists( $upgrader, 'theme_info' ) - ) { - return; - } - - if ( 'install' === $details['action'] ) { - $theme = $upgrader->theme_info(); - if ( ! $theme instanceof \WP_Theme ) { - return; - } - $theme_info = array( - 'name' => $theme->get( 'Name' ), - 'version' => $theme->get( 'Version' ), - 'uri' => $theme->get( 'ThemeURI' ), - ); - - /** - * Signals to the sync listener that a theme was installed and a sync action - * reflecting the installation and the theme info should be sent - * - * @since 1.6.3 - * @since-jetpack 4.9.0 - * - * @param string $theme->theme_root Text domain of the theme - * @param mixed $theme_info Array of abbreviated theme info - */ - do_action( 'jetpack_installed_theme', $theme->stylesheet, $theme_info ); - } - - if ( 'update' === $details['action'] ) { - $themes = array(); - - if ( empty( $details['themes'] ) && isset( $details['theme'] ) ) { - $details['themes'] = array( $details['theme'] ); - } - - foreach ( $details['themes'] as $theme_slug ) { - $theme = wp_get_theme( $theme_slug ); - - if ( ! $theme instanceof \WP_Theme ) { - continue; - } - - $themes[ $theme_slug ] = array( - 'name' => $theme->get( 'Name' ), - 'version' => $theme->get( 'Version' ), - 'uri' => $theme->get( 'ThemeURI' ), - 'stylesheet' => $theme->stylesheet, - ); - } - - if ( empty( $themes ) ) { - return; - } - - /** - * Signals to the sync listener that one or more themes was updated and a sync action - * reflecting the update and the theme info should be sent - * - * @since 1.6.3 - * @since-jetpack 6.2.0 - * - * @param mixed $themes Array of abbreviated theme info - */ - do_action( 'jetpack_updated_themes', $themes ); - } - } - - /** - * Initialize themes action listeners for full sync. - * - * @access public - * - * @param callable $callable Action handler callable. - */ - public function init_full_sync_listeners( $callable ) { - add_action( 'jetpack_full_sync_theme_data', $callable ); - } - - /** - * Handle a theme switch. - * - * @access public - * - * @param string $new_name Name of the new theme. - * @param \WP_Theme $new_theme The new theme. - * @param \WP_Theme $old_theme The previous theme. - */ - public function sync_theme_support( $new_name, $new_theme = null, $old_theme = null ) { - $previous_theme = $this->get_theme_info( $old_theme ); - - /** - * Fires when the client needs to sync theme support info - * - * @since 1.6.3 - * @since-jetpack 4.2.0 - * - * @param array the theme support array - * @param array the previous theme since Jetpack 6.5.0 - */ - do_action( 'jetpack_sync_current_theme_support', $this->get_theme_info(), $previous_theme ); - } - - /** - * Enqueue the themes actions for full sync. - * - * @access public - * - * @param array $config Full sync configuration for this sync module. - * @param int $max_items_to_enqueue Maximum number of items to enqueue. - * @param boolean $state True if full sync has finished enqueueing this module, false otherwise. - * @return array Number of actions enqueued, and next module state. - */ - public function enqueue_full_sync_actions( $config, $max_items_to_enqueue, $state ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable - /** - * Tells the client to sync all theme data to the server - * - * @since 1.6.3 - * @since-jetpack 4.2.0 - * - * @param boolean Whether to expand theme data (should always be true) - */ - do_action( 'jetpack_full_sync_theme_data', true ); - - // The number of actions enqueued, and next module state (true == done). - return array( 1, true ); - } - - /** - * Send the themes actions for full sync. - * - * @access public - * - * @param array $config Full sync configuration for this sync module. - * @param int $send_until The timestamp until the current request can send. - * @param array $state This module Full Sync status. - * - * @return array This module Full Sync status. - */ - public function send_full_sync_actions( $config, $send_until, $state ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable - // we call this instead of do_action when sending immediately. - $this->send_action( 'jetpack_full_sync_theme_data', array( true ) ); - - // The number of actions enqueued, and next module state (true == done). - return array( 'finished' => true ); - } - - /** - * Retrieve an estimated number of actions that will be enqueued. - * - * @access public - * - * @param array $config Full sync configuration for this sync module. - * @return array Number of items yet to be enqueued. - */ - public function estimate_full_sync_actions( $config ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable - return 1; - } - - /** - * Initialize the module in the sender. - * - * @access public - */ - public function init_before_send() { - add_filter( 'jetpack_sync_before_send_jetpack_full_sync_theme_data', array( $this, 'expand_theme_data' ) ); - } - - /** - * Retrieve the actions that will be sent for this module during a full sync. - * - * @access public - * - * @return array Full sync actions of this module. - */ - public function get_full_sync_actions() { - return array( 'jetpack_full_sync_theme_data' ); - } - - /** - * Expand the theme within a hook before it is serialized and sent to the server. - * - * @access public - * - * @return array Theme data. - */ - public function expand_theme_data() { - return array( $this->get_theme_info() ); - } - - /** - * Retrieve the name of the widget by the widget ID. - * - * @access public - * @global $wp_registered_widgets - * - * @param string $widget_id Widget ID. - * @return string Name of the widget, or null if not found. - */ - public function get_widget_name( $widget_id ) { - global $wp_registered_widgets; - return ( isset( $wp_registered_widgets[ $widget_id ] ) ? $wp_registered_widgets[ $widget_id ]['name'] : null ); - } - - /** - * Retrieve the name of the sidebar by the sidebar ID. - * - * @access public - * @global $wp_registered_sidebars - * - * @param string $sidebar_id Sidebar ID. - * @return string Name of the sidebar, or null if not found. - */ - public function get_sidebar_name( $sidebar_id ) { - global $wp_registered_sidebars; - return ( isset( $wp_registered_sidebars[ $sidebar_id ] ) ? $wp_registered_sidebars[ $sidebar_id ]['name'] : null ); - } - - /** - * Sync addition of widgets to a sidebar. - * - * @access public - * - * @param array $new_widgets New widgets. - * @param array $old_widgets Old widgets. - * @param string $sidebar Sidebar ID. - * @return array All widgets that have been moved to the sidebar. - */ - public function sync_add_widgets_to_sidebar( $new_widgets, $old_widgets, $sidebar ) { - $added_widgets = array_diff( $new_widgets, $old_widgets ); - if ( empty( $added_widgets ) ) { - return array(); - } - $moved_to_sidebar = array(); - $sidebar_name = $this->get_sidebar_name( $sidebar ); - - // Don't sync jetpack_widget_added if theme was switched. - if ( $this->is_theme_switch() ) { - return array(); - } - - foreach ( $added_widgets as $added_widget ) { - $moved_to_sidebar[] = $added_widget; - $added_widget_name = $this->get_widget_name( $added_widget ); - /** - * Helps Sync log that a widget got added - * - * @since 1.6.3 - * @since-jetpack 4.9.0 - * - * @param string $sidebar, Sidebar id got changed - * @param string $added_widget, Widget id got added - * @param string $sidebar_name, Sidebar id got changed Since 5.0.0 - * @param string $added_widget_name, Widget id got added Since 5.0.0 - */ - do_action( 'jetpack_widget_added', $sidebar, $added_widget, $sidebar_name, $added_widget_name ); - } - return $moved_to_sidebar; - } - - /** - * Sync removal of widgets from a sidebar. - * - * @access public - * - * @param array $new_widgets New widgets. - * @param array $old_widgets Old widgets. - * @param string $sidebar Sidebar ID. - * @param array $inactive_widgets Current inactive widgets. - * @return array All widgets that have been moved to inactive. - */ - public function sync_remove_widgets_from_sidebar( $new_widgets, $old_widgets, $sidebar, $inactive_widgets ) { - $removed_widgets = array_diff( $old_widgets, $new_widgets ); - - if ( empty( $removed_widgets ) ) { - return array(); - } - - $moved_to_inactive = array(); - $sidebar_name = $this->get_sidebar_name( $sidebar ); - - foreach ( $removed_widgets as $removed_widget ) { - // Lets check if we didn't move the widget to in_active_widgets. - if ( isset( $inactive_widgets ) && ! in_array( $removed_widget, $inactive_widgets, true ) ) { - $removed_widget_name = $this->get_widget_name( $removed_widget ); - /** - * Helps Sync log that a widgte got removed - * - * @since 1.6.3 - * @since-jetpack 4.9.0 - * - * @param string $sidebar, Sidebar id got changed - * @param string $removed_widget, Widget id got removed - * @param string $sidebar_name, Name of the sidebar that changed Since 5.0.0 - * @param string $removed_widget_name, Name of the widget that got removed Since 5.0.0 - */ - do_action( 'jetpack_widget_removed', $sidebar, $removed_widget, $sidebar_name, $removed_widget_name ); - } else { - $moved_to_inactive[] = $removed_widget; - } - } - return $moved_to_inactive; - } - - /** - * Sync a reorder of widgets within a sidebar. - * - * @access public - * - * @todo Refactor serialize() to a json_encode(). - * - * @param array $new_widgets New widgets. - * @param array $old_widgets Old widgets. - * @param string $sidebar Sidebar ID. - */ - public function sync_widgets_reordered( $new_widgets, $old_widgets, $sidebar ) { - $added_widgets = array_diff( $new_widgets, $old_widgets ); - if ( ! empty( $added_widgets ) ) { - return; - } - $removed_widgets = array_diff( $old_widgets, $new_widgets ); - if ( ! empty( $removed_widgets ) ) { - return; - } - - // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.serialize_serialize - if ( serialize( $old_widgets ) !== serialize( $new_widgets ) ) { - $sidebar_name = $this->get_sidebar_name( $sidebar ); - /** - * Helps Sync log that a sidebar id got reordered - * - * @since 1.6.3 - * @since-jetpack 4.9.0 - * - * @param string $sidebar, Sidebar id got changed - * @param string $sidebar_name, Name of the sidebar that changed Since 5.0.0 - */ - do_action( 'jetpack_widget_reordered', $sidebar, $sidebar_name ); - } - } - - /** - * Handle the update of the sidebars and widgets mapping option. - * - * @access public - * - * @param mixed $old_value The old option value. - * @param mixed $new_value The new option value. - */ - public function sync_sidebar_widgets_actions( $old_value, $new_value ) { - // Don't really know how to deal with different array_values yet. - if ( - ( isset( $old_value['array_version'] ) && 3 !== $old_value['array_version'] ) || - ( isset( $new_value['array_version'] ) && 3 !== $new_value['array_version'] ) - ) { - return; - } - - $moved_to_inactive_ids = array(); - $moved_to_sidebar = array(); - - foreach ( $new_value as $sidebar => $new_widgets ) { - if ( in_array( $sidebar, array( 'array_version', 'wp_inactive_widgets' ), true ) ) { - continue; - } - $old_widgets = isset( $old_value[ $sidebar ] ) - ? $old_value[ $sidebar ] - : array(); - - if ( ! is_array( $new_widgets ) ) { - $new_widgets = array(); - } - - $moved_to_inactive_recently = $this->sync_remove_widgets_from_sidebar( $new_widgets, $old_widgets, $sidebar, $new_value['wp_inactive_widgets'] ); - $moved_to_inactive_ids = array_merge( $moved_to_inactive_ids, $moved_to_inactive_recently ); - - $moved_to_sidebar_recently = $this->sync_add_widgets_to_sidebar( $new_widgets, $old_widgets, $sidebar ); - $moved_to_sidebar = array_merge( $moved_to_sidebar, $moved_to_sidebar_recently ); - - $this->sync_widgets_reordered( $new_widgets, $old_widgets, $sidebar ); - - } - - // Don't sync either jetpack_widget_moved_to_inactive or jetpack_cleared_inactive_widgets if theme was switched. - if ( $this->is_theme_switch() ) { - return; - } - - // Treat inactive sidebar a bit differently. - if ( ! empty( $moved_to_inactive_ids ) ) { - $moved_to_inactive_name = array_map( array( $this, 'get_widget_name' ), $moved_to_inactive_ids ); - /** - * Helps Sync log that a widgets IDs got moved to in active - * - * @since 1.6.3 - * @since-jetpack 4.9.0 - * - * @param array $moved_to_inactive_ids, Array of widgets id that moved to inactive id got changed - * @param array $moved_to_inactive_names, Array of widgets names that moved to inactive id got changed Since 5.0.0 - */ - do_action( 'jetpack_widget_moved_to_inactive', $moved_to_inactive_ids, $moved_to_inactive_name ); - } elseif ( empty( $moved_to_sidebar ) && empty( $new_value['wp_inactive_widgets'] ) && ! empty( $old_value['wp_inactive_widgets'] ) ) { - /** - * Helps Sync log that a got cleared from inactive. - * - * @since 1.6.3 - * @since-jetpack 4.9.0 - */ - do_action( 'jetpack_cleared_inactive_widgets' ); - } - } - - /** - * Retrieve the theme data for the current or a specific theme. - * - * @access private - * - * @param \WP_Theme $theme Theme object. Optional, will default to the current theme. - * - * @return array Theme data. - */ - private function get_theme_info( $theme = null ) { - $theme_support = array(); - - // We are trying to get the current theme info. - if ( null === $theme ) { - $theme = wp_get_theme(); - } - - $theme_support['name'] = $theme->get( 'Name' ); - $theme_support['version'] = $theme->get( 'Version' ); - $theme_support['slug'] = $theme->get_stylesheet(); - $theme_support['uri'] = $theme->get( 'ThemeURI' ); - - return $theme_support; - } - - /** - * Whether we've deleted a theme in the current request. - * - * @access private - * - * @return boolean True if this is a theme deletion request, false otherwise. - */ - private function get_delete_theme_call() { - // Intentional usage of `debug_backtrace()` for production needs. - // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_debug_backtrace - $backtrace = debug_backtrace(); - $delete_theme_call = null; - foreach ( $backtrace as $call ) { - if ( isset( $call['function'] ) && 'delete_theme' === $call['function'] ) { - $delete_theme_call = $call; - break; - } - } - return $delete_theme_call; - } - - /** - * Whether we've switched to another theme in the current request. - * - * @access private - * - * @return boolean True if this is a theme switch request, false otherwise. - */ - private function is_theme_switch() { - return did_action( 'after_switch_theme' ); - } - - /** - * Return Total number of objects. - * - * @param array $config Full Sync config. - * - * @return int total - */ - public function total( $config ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable - return 1; - } - - /** - * Retrieve a set of constants by their IDs. - * - * @access public - * - * @param string $object_type Object type. - * @param array $ids Object IDs. - * @return array Array of objects. - */ - public function get_objects_by_id( $object_type, $ids ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable - if ( 'theme-info' !== $object_type ) { - return array(); - } - - return array( $this->get_theme_info() ); - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-updates.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-updates.php deleted file mode 100644 index 570e24a4..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-updates.php +++ /dev/null @@ -1,589 +0,0 @@ -updates = array(); - } - - /** - * Sync module name. - * - * @access public - * - * @return string - */ - public function name() { - return 'updates'; - } - - /** - * Initialize updates action listeners. - * - * @access public - * - * @param callable $callable Action handler callable. - */ - public function init_listeners( $callable ) { - global $wp_version; - $this->old_wp_version = $wp_version; - add_action( 'set_site_transient_update_plugins', array( $this, 'validate_update_change' ), 10, 3 ); - add_action( 'set_site_transient_update_themes', array( $this, 'validate_update_change' ), 10, 3 ); - add_action( 'set_site_transient_update_core', array( $this, 'validate_update_change' ), 10, 3 ); - - add_action( 'jetpack_update_plugins_change', $callable ); - add_action( 'jetpack_update_themes_change', $callable ); - add_action( 'jetpack_update_core_change', $callable ); - - add_filter( - 'jetpack_sync_before_enqueue_jetpack_update_themes_change', - array( - $this, - 'expand_themes', - ) - ); - - add_filter( - 'jetpack_sync_before_enqueue_jetpack_update_plugins_change', - array( - $this, - 'filter_update_keys', - ), - 10, - 2 - ); - add_filter( - 'jetpack_sync_before_enqueue_upgrader_process_complete', - array( - $this, - 'filter_upgrader_process_complete', - ), - 10, - 2 - ); - - add_action( 'automatic_updates_complete', $callable ); - - if ( is_multisite() ) { - add_filter( 'pre_update_site_option_wpmu_upgrade_site', array( $this, 'update_core_network_event' ), 10, 2 ); - add_action( 'jetpack_sync_core_update_network', $callable, 10, 3 ); - } - - // Send data when update completes. - add_action( '_core_updated_successfully', array( $this, 'update_core' ) ); - add_action( 'jetpack_sync_core_reinstalled_successfully', $callable ); - add_action( 'jetpack_sync_core_autoupdated_successfully', $callable, 10, 2 ); - add_action( 'jetpack_sync_core_updated_successfully', $callable, 10, 2 ); - } - - /** - * Initialize updates action listeners for full sync. - * - * @access public - * - * @param callable $callable Action handler callable. - */ - public function init_full_sync_listeners( $callable ) { - add_action( 'jetpack_full_sync_updates', $callable ); - } - - /** - * Initialize the module in the sender. - * - * @access public - */ - public function init_before_send() { - add_filter( 'jetpack_sync_before_send_jetpack_full_sync_updates', array( $this, 'expand_updates' ) ); - } - - /** - * Handle a core network update. - * - * @access public - * - * @param int $wp_db_version Current version of the WordPress database. - * @param int $old_wp_db_version Old version of the WordPress database. - * @return int Current version of the WordPress database. - */ - public function update_core_network_event( $wp_db_version, $old_wp_db_version ) { - global $wp_version; - /** - * Sync event for when core wp network updates to a new db version - * - * @since 1.6.3 - * @since-jetpack 5.0.0 - * - * @param int $wp_db_version the latest wp_db_version - * @param int $old_wp_db_version previous wp_db_version - * @param string $wp_version the latest wp_version - */ - do_action( 'jetpack_sync_core_update_network', $wp_db_version, $old_wp_db_version, $wp_version ); - return $wp_db_version; - } - - /** - * Handle a core update. - * - * @access public - * - * @todo Implement nonce or refactor to use `admin_post_{$action}` hooks instead. - * - * @param string $new_wp_version The new WP core version. - */ - public function update_core( $new_wp_version ) { - global $pagenow; - - // // phpcs:ignore WordPress.Security.NonceVerification.Recommended - if ( isset( $_GET['action'] ) && 'do-core-reinstall' === $_GET['action'] ) { - /** - * Sync event that fires when core reinstall was successful - * - * @since 1.6.3 - * @since-jetpack 5.0.0 - * - * @param string $new_wp_version the updated WordPress version - */ - do_action( 'jetpack_sync_core_reinstalled_successfully', $new_wp_version ); - return; - } - - // Core was autoupdated. - if ( - 'update-core.php' !== $pagenow && - ! Jetpack_Constants::is_true( 'REST_API_REQUEST' ) // WP.com rest api calls should never be marked as a core autoupdate. - ) { - /** - * Sync event that fires when core autoupdate was successful - * - * @since 1.6.3 - * @since-jetpack 5.0.0 - * - * @param string $new_wp_version the updated WordPress version - * @param string $old_wp_version the previous WordPress version - */ - do_action( 'jetpack_sync_core_autoupdated_successfully', $new_wp_version, $this->old_wp_version ); - return; - } - /** - * Sync event that fires when core update was successful - * - * @since 1.6.3 - * @since-jetpack 5.0.0 - * - * @param string $new_wp_version the updated WordPress version - * @param string $old_wp_version the previous WordPress version - */ - do_action( 'jetpack_sync_core_updated_successfully', $new_wp_version, $this->old_wp_version ); - } - - /** - * Retrieve the checksum for an update. - * - * @access public - * - * @param object $update The update object. - * @param string $transient The transient we're retrieving a checksum for. - * @return int The checksum. - */ - public function get_update_checksum( $update, $transient ) { - $updates = array(); - $no_updated = array(); - switch ( $transient ) { - case 'update_plugins': - if ( ! empty( $update->response ) && is_array( $update->response ) ) { - foreach ( $update->response as $plugin_slug => $response ) { - if ( ! empty( $plugin_slug ) && isset( $response->new_version ) ) { - $updates[] = array( $plugin_slug => $response->new_version ); - } - } - } - if ( ! empty( $update->no_update ) ) { - $no_updated = array_keys( $update->no_update ); - } - - if ( ! isset( $no_updated['jetpack/jetpack.php'] ) && isset( $updates['jetpack/jetpack.php'] ) ) { - return false; - } - - break; - case 'update_themes': - if ( ! empty( $update->response ) && is_array( $update->response ) ) { - foreach ( $update->response as $theme_slug => $response ) { - if ( ! empty( $theme_slug ) && isset( $response['new_version'] ) ) { - $updates[] = array( $theme_slug => $response['new_version'] ); - } - } - } - - if ( ! empty( $update->checked ) ) { - $no_updated = $update->checked; - } - - break; - case 'update_core': - if ( ! empty( $update->updates ) && is_array( $update->updates ) ) { - foreach ( $update->updates as $response ) { - if ( ! empty( $response->response ) && 'latest' === $response->response ) { - continue; - } - if ( ! empty( $response->response ) && isset( $response->packages->full ) ) { - $updates[] = array( $response->response => $response->packages->full ); - } - } - } - - if ( ! empty( $update->version_checked ) ) { - $no_updated = $update->version_checked; - } - - if ( empty( $updates ) ) { - return false; - } - break; - - } - if ( empty( $updates ) && empty( $no_updated ) ) { - return false; - } - return $this->get_check_sum( array( $no_updated, $updates ) ); - } - - /** - * Validate a change coming from an update before sending for sync. - * - * @access public - * - * @param mixed $value Site transient value. - * @param int $expiration Time until transient expiration in seconds. - * @param string $transient Transient name. - */ - public function validate_update_change( $value, $expiration, $transient ) { - $new_checksum = $this->get_update_checksum( $value, $transient ); - - if ( false === $new_checksum ) { - return; - } - - $checksums = get_option( self::UPDATES_CHECKSUM_OPTION_NAME, array() ); - - if ( isset( $checksums[ $transient ] ) && $checksums[ $transient ] === $new_checksum ) { - return; - } - - $checksums[ $transient ] = $new_checksum; - - update_option( self::UPDATES_CHECKSUM_OPTION_NAME, $checksums ); - if ( 'update_core' === $transient ) { - /** - * Trigger a change to core update that we want to sync. - * - * @since 1.6.3 - * @since-jetpack 5.1.0 - * - * @param array $value Contains info that tells us what needs updating. - */ - do_action( 'jetpack_update_core_change', $value ); - return; - } - if ( empty( $this->updates ) ) { - // Lets add the shutdown method once and only when the updates move from empty to filled with something. - add_action( 'shutdown', array( $this, 'sync_last_event' ), 9 ); - } - if ( ! isset( $this->updates[ $transient ] ) ) { - $this->updates[ $transient ] = array(); - } - $this->updates[ $transient ][] = $value; - } - - /** - * Sync the last update only. - * - * @access public - */ - public function sync_last_event() { - foreach ( $this->updates as $transient => $values ) { - $value = end( $values ); // Only send over the last value. - /** - * Trigger a change to a specific update that we want to sync. - * Triggers one of the following actions: - * - jetpack_{$transient}_change - * - jetpack_update_plugins_change - * - jetpack_update_themes_change - * - * @since 1.6.3 - * @since-jetpack 5.1.0 - * - * @param array $value Contains info that tells us what needs updating. - */ - do_action( "jetpack_{$transient}_change", $value ); - } - } - - /** - * Enqueue the updates actions for full sync. - * - * @access public - * - * @param array $config Full sync configuration for this sync module. - * @param int $max_items_to_enqueue Maximum number of items to enqueue. - * @param boolean $state True if full sync has finished enqueueing this module, false otherwise. - * @return array Number of actions enqueued, and next module state. - */ - public function enqueue_full_sync_actions( $config, $max_items_to_enqueue, $state ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable - /** - * Tells the client to sync all updates to the server - * - * @since 1.6.3 - * @since-jetpack 4.2.0 - * - * @param boolean Whether to expand updates (should always be true) - */ - do_action( 'jetpack_full_sync_updates', true ); - - // The number of actions enqueued, and next module state (true == done). - return array( 1, true ); - } - - /** - * Send the updates actions for full sync. - * - * @access public - * - * @param array $config Full sync configuration for this sync module. - * @param int $send_until The timestamp until the current request can send. - * @param array $state This module Full Sync status. - * - * @return array This module Full Sync status. - */ - public function send_full_sync_actions( $config, $send_until, $state ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable - // we call this instead of do_action when sending immediately. - $this->send_action( 'jetpack_full_sync_updates', array( true ) ); - - // The number of actions enqueued, and next module state (true == done). - return array( 'finished' => true ); - } - - /** - * Retrieve an estimated number of actions that will be enqueued. - * - * @access public - * - * @param array $config Full sync configuration for this sync module. - * @return array Number of items yet to be enqueued. - */ - public function estimate_full_sync_actions( $config ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable - return 1; - } - - /** - * Retrieve the actions that will be sent for this module during a full sync. - * - * @access public - * - * @return array Full sync actions of this module. - */ - public function get_full_sync_actions() { - return array( 'jetpack_full_sync_updates' ); - } - - /** - * Retrieve all updates that we're interested in. - * - * @access public - * - * @return array All updates. - */ - public function get_all_updates() { - return array( - 'core' => get_site_transient( 'update_core' ), - 'plugins' => get_site_transient( 'update_plugins' ), - 'themes' => get_site_transient( 'update_themes' ), - ); - } - - /** - * Remove unnecessary keys from synced updates data. - * - * @access public - * - * @param array $args Hook arguments. - * @return array $args Hook arguments. - */ - public function filter_update_keys( $args ) { - $updates = $args[0]; - - if ( isset( $updates->no_update ) ) { - unset( $updates->no_update ); - } - - return $args; - } - - /** - * Filter out upgrader object from the completed upgrader action args. - * - * @access public - * - * @param array $args Hook arguments. - * @return array $args Filtered hook arguments. - */ - public function filter_upgrader_process_complete( $args ) { - array_shift( $args ); - - return $args; - } - - /** - * Expand the updates within a hook before they are serialized and sent to the server. - * - * @access public - * - * @param array $args The hook parameters. - * @return array $args The hook parameters. - */ - public function expand_updates( $args ) { - if ( $args[0] ) { - return $this->get_all_updates(); - } - - return $args; - } - - /** - * Expand the themes within a hook before they are serialized and sent to the server. - * - * @access public - * - * @param array $args The hook parameters. - * @return array $args The hook parameters. - */ - public function expand_themes( $args ) { - if ( ! isset( $args[0]->response ) ) { - return $args; - } - if ( ! is_array( $args[0]->response ) ) { - // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_trigger_error - trigger_error( 'Warning: Not an Array as expected but -> ' . wp_json_encode( $args[0]->response ) . ' instead', E_USER_WARNING ); - return $args; - } - foreach ( $args[0]->response as $stylesheet => &$theme_data ) { - $theme = wp_get_theme( $stylesheet ); - $theme_data['name'] = $theme->name; - } - return $args; - } - - /** - * Perform module cleanup. - * Deletes any transients and options that this module uses. - * Usually triggered when uninstalling the plugin. - * - * @access public - */ - public function reset_data() { - delete_option( self::UPDATES_CHECKSUM_OPTION_NAME ); - } - - /** - * Return Total number of objects. - * - * @param array $config Full Sync config. - * - * @return int total - */ - public function total( $config ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable - return 3; - } - - /** - * Retrieve a set of updates by their IDs. - * - * @access public - * - * @param string $object_type Object type. - * @param array $ids Object IDs. - * @return array Array of objects. - */ - public function get_objects_by_id( $object_type, $ids ) { - if ( empty( $ids ) || empty( $object_type ) || 'update' !== $object_type ) { - return array(); - } - - $objects = array(); - foreach ( (array) $ids as $id ) { - $object = $this->get_object_by_id( $object_type, $id ); - - if ( 'all' === $id ) { - // If all was requested it contains all updates and can simply be returned. - return $object; - } - $objects[ $id ] = $object; - } - - return $objects; - } - - /** - * Retrieve a update by its id. - * - * @access public - * - * @param string $object_type Type of the sync object. - * @param string $id ID of the sync object. - * @return mixed Value of Update. - */ - public function get_object_by_id( $object_type, $id ) { - if ( 'update' === $object_type ) { - - // Only whitelisted constants can be returned. - if ( in_array( $id, array( 'core', 'plugins', 'themes' ), true ) ) { - return get_site_transient( 'update_' . $id ); - } elseif ( 'all' === $id ) { - return $this->get_all_updates(); - } - } - - return false; - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-users.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-users.php deleted file mode 100644 index e413845b..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-users.php +++ /dev/null @@ -1,934 +0,0 @@ - 'password_changed', - 'user_email' => 'email_changed', - 'user_nicename' => 'nicename_changed', - 'user_url' => 'url_changed', - 'user_registered' => 'registration_date_changed', - 'user_activation_key' => 'activation_key_changed', - 'display_name' => 'display_name_changed', - ); - - /** - * Sync module name. - * - * @access public - * - * @return string - */ - public function name() { - return 'users'; - } - - /** - * The table in the database. - * - * @access public - * - * @return string - */ - public function table_name() { - return 'usermeta'; - } - - /** - * The id field in the database. - * - * @access public - * - * @return string - */ - public function id_field() { - return 'user_id'; - } - - /** - * Retrieve a user by its ID. - * This is here to support the backfill API. - * - * @access public - * - * @param string $object_type Type of the sync object. - * @param int $id ID of the sync object. - * @return \WP_User|bool Filtered \WP_User object, or false if the object is not a user. - */ - public function get_object_by_id( $object_type, $id ) { - if ( 'user' === $object_type ) { - $user = get_user_by( 'id', (int) $id ); - if ( $user ) { - return $this->sanitize_user_and_expand( $user ); - } - } - - return false; - } - - /** - * Initialize users action listeners. - * - * @access public - * - * @param callable $callable Action handler callable. - */ - public function init_listeners( $callable ) { - // Users. - add_action( 'user_register', array( $this, 'user_register_handler' ) ); - add_action( 'profile_update', array( $this, 'save_user_handler' ), 10, 2 ); - - add_action( 'add_user_to_blog', array( $this, 'add_user_to_blog_handler' ) ); - add_action( 'jetpack_sync_add_user', $callable, 10, 2 ); - - add_action( 'jetpack_sync_register_user', $callable, 10, 2 ); - add_action( 'jetpack_sync_save_user', $callable, 10, 2 ); - - add_action( 'jetpack_sync_user_locale', $callable, 10, 2 ); - add_action( 'jetpack_sync_user_locale_delete', $callable, 10, 1 ); - - add_action( 'deleted_user', array( $this, 'deleted_user_handler' ), 10, 2 ); - add_action( 'jetpack_deleted_user', $callable, 10, 3 ); - add_action( 'remove_user_from_blog', array( $this, 'remove_user_from_blog_handler' ), 10, 2 ); - add_action( 'jetpack_removed_user_from_blog', $callable, 10, 2 ); - - // User roles. - add_action( 'add_user_role', array( $this, 'add_user_role_handler' ), 10, 2 ); - add_action( 'set_user_role', array( $this, 'save_user_role_handler' ), 10, 3 ); - add_action( 'remove_user_role', array( $this, 'remove_user_role_handler' ), 10, 2 ); - - // User capabilities. - add_action( 'added_user_meta', array( $this, 'maybe_save_user_meta' ), 10, 4 ); - add_action( 'updated_user_meta', array( $this, 'maybe_save_user_meta' ), 10, 4 ); - add_action( 'deleted_user_meta', array( $this, 'maybe_save_user_meta' ), 10, 4 ); - - // User authentication. - add_filter( 'authenticate', array( $this, 'authenticate_handler' ), 1000, 3 ); - add_action( 'wp_login', array( $this, 'wp_login_handler' ), 10, 2 ); - - add_action( 'jetpack_wp_login', $callable, 10, 3 ); - - add_action( 'wp_logout', $callable, 10, 1 ); - add_action( 'wp_masterbar_logout', $callable, 10, 1 ); - - // Add on init. - add_filter( 'jetpack_sync_before_enqueue_jetpack_sync_add_user', array( $this, 'expand_action' ) ); - add_filter( 'jetpack_sync_before_enqueue_jetpack_sync_register_user', array( $this, 'expand_action' ) ); - add_filter( 'jetpack_sync_before_enqueue_jetpack_sync_save_user', array( $this, 'expand_action' ) ); - add_filter( 'jetpack_sync_before_enqueue_jetpack_wp_login', array( $this, 'expand_login_username' ), 10, 1 ); - add_filter( 'jetpack_sync_before_enqueue_wp_logout', array( $this, 'expand_logout_username' ), 10, 1 ); - } - - /** - * Initialize users action listeners for full sync. - * - * @access public - * - * @param callable $callable Action handler callable. - */ - public function init_full_sync_listeners( $callable ) { - add_action( 'jetpack_full_sync_users', $callable ); - } - - /** - * Initialize the module in the sender. - * - * @access public - */ - public function init_before_send() { - // Full sync. - add_filter( 'jetpack_sync_before_send_jetpack_full_sync_users', array( $this, 'expand_users' ) ); - } - - /** - * Retrieve a user by a user ID or object. - * - * @access private - * - * @param mixed $user User object or ID. - * @return \WP_User User object, or `null` if user invalid/not found. - */ - private function get_user( $user ) { - if ( is_numeric( $user ) ) { - $user = get_user_by( 'id', $user ); - } - if ( $user instanceof \WP_User ) { - return $user; - } - return null; - } - - /** - * Sanitize a user object. - * Removes the password from the user object because we don't want to sync it. - * - * @access public - * - * @todo Refactor `serialize`/`unserialize` to `wp_json_encode`/`wp_json_decode`. - * - * @param \WP_User $user User object. - * @return \WP_User Sanitized user object. - */ - public function sanitize_user( $user ) { - $user = $this->get_user( $user ); - // This creates a new user object and stops the passing of the object by reference. - // // phpcs:disable WordPress.PHP.DiscouragedPHPFunctions.serialize_serialize, WordPress.PHP.DiscouragedPHPFunctions.serialize_unserialize - $user = unserialize( serialize( $user ) ); - - if ( is_object( $user ) && is_object( $user->data ) ) { - unset( $user->data->user_pass ); - } - return $user; - } - - /** - * Expand a particular user. - * - * @access public - * - * @param \WP_User $user User object. - * @return \WP_User Expanded user object. - */ - public function expand_user( $user ) { - if ( ! is_object( $user ) ) { - return null; - } - $user->allowed_mime_types = get_allowed_mime_types( $user ); - $user->allcaps = $this->get_real_user_capabilities( $user ); - - // Only set the user locale if it is different from the site locale. - if ( get_locale() !== get_user_locale( $user->ID ) ) { - $user->locale = get_user_locale( $user->ID ); - } - - return $user; - } - - /** - * Retrieve capabilities we care about for a particular user. - * - * @access public - * - * @param \WP_User $user User object. - * @return array User capabilities. - */ - public function get_real_user_capabilities( $user ) { - $user_capabilities = array(); - if ( is_wp_error( $user ) ) { - return $user_capabilities; - } - foreach ( Defaults::get_capabilities_whitelist() as $capability ) { - if ( user_can( $user, $capability ) ) { - $user_capabilities[ $capability ] = true; - } - } - return $user_capabilities; - } - - /** - * Retrieve, expand and sanitize a user. - * Can be directly used in the sync user action handlers. - * - * @access public - * - * @param mixed $user User ID or user object. - * @return \WP_User Expanded and sanitized user object. - */ - public function sanitize_user_and_expand( $user ) { - $user = $this->get_user( $user ); - $user = $this->expand_user( $user ); - return $this->sanitize_user( $user ); - } - - /** - * Expand the user within a hook before it is serialized and sent to the server. - * - * @access public - * - * @param array $args The hook arguments. - * @return array $args The hook arguments. - */ - public function expand_action( $args ) { - // The first argument is always the user. - list( $user ) = $args; - if ( $user ) { - $args[0] = $this->sanitize_user_and_expand( $user ); - return $args; - } - - return false; - } - - /** - * Expand the user username at login before enqueuing. - * - * @access public - * - * @param array $args The hook arguments. - * @return array $args Expanded hook arguments. - */ - public function expand_login_username( $args ) { - list( $login, $user, $flags ) = $args; - $user = $this->sanitize_user( $user ); - - return array( $login, $user, $flags ); - } - - /** - * Expand the user username at logout before enqueuing. - * - * @access public - * - * @param array $args The hook arguments. - * @return false|array $args Expanded hook arguments or false if we don't have a user. - */ - public function expand_logout_username( $args ) { - list( $user_id ) = $args; - - $user = get_userdata( $user_id ); - $user = $this->sanitize_user( $user ); - - $login = ''; - if ( is_object( $user ) && is_object( $user->data ) ) { - $login = $user->data->user_login; - } - - // If we don't have a user here lets not enqueue anything. - if ( empty( $login ) ) { - return false; - } - - return array( $login, $user ); - } - - /** - * Additional processing is needed for wp_login so we introduce this wrapper handler. - * - * @access public - * - * @param string $user_login The user login. - * @param \WP_User $user The user object. - */ - public function wp_login_handler( $user_login, $user ) { - /** - * Fires when a user is logged into a site. - * - * @since 1.6.3 - * @since-jetpack 7.2.0 - * - * @param int $user_id The user ID. - * @param \WP_User $user The User Object of the user that currently logged in. - * @param array $params Any Flags that have been added during login. - */ - do_action( 'jetpack_wp_login', $user->ID, $user, $this->get_flags( $user->ID ) ); - $this->clear_flags( $user->ID ); - } - - /** - * A hook for the authenticate event that checks the password strength. - * - * @access public - * - * @param \WP_Error|\WP_User $user The user object, or an error. - * @param string $username The username. - * @param string $password The password used to authenticate. - * @return \WP_Error|\WP_User the same object that was passed into the function. - */ - public function authenticate_handler( $user, $username, $password ) { - // In case of cookie authentication we don't do anything here. - if ( empty( $password ) ) { - return $user; - } - - // We are only interested in successful authentication events. - if ( is_wp_error( $user ) || ! ( $user instanceof \WP_User ) ) { - return $user; - } - - $password_checker = new Password_Checker( $user->ID ); - - $test_results = $password_checker->test( $password, true ); - - // If the password passes tests, we don't do anything. - if ( empty( $test_results['test_results']['failed'] ) ) { - return $user; - } - - $this->add_flags( - $user->ID, - array( - 'warning' => 'The password failed at least one strength test.', - 'failures' => $test_results['test_results']['failed'], - ) - ); - - return $user; - } - - /** - * Handler for after the user is deleted. - * - * @access public - * - * @param int $deleted_user_id ID of the deleted user. - * @param int $reassigned_user_id ID of the user the deleted user's posts are reassigned to (if any). - */ - public function deleted_user_handler( $deleted_user_id, $reassigned_user_id = '' ) { - $is_multisite = is_multisite(); - /** - * Fires when a user is deleted on a site - * - * @since 1.6.3 - * @since-jetpack 5.4.0 - * - * @param int $deleted_user_id - ID of the deleted user. - * @param int $reassigned_user_id - ID of the user the deleted user's posts are reassigned to (if any). - * @param bool $is_multisite - Whether this site is a multisite installation. - */ - do_action( 'jetpack_deleted_user', $deleted_user_id, $reassigned_user_id, $is_multisite ); - } - - /** - * Handler for user registration. - * - * @access public - * - * @param int $user_id ID of the deleted user. - */ - public function user_register_handler( $user_id ) { - // Ensure we only sync users who are members of the current blog. - if ( ! is_user_member_of_blog( $user_id, get_current_blog_id() ) ) { - return; - } - - if ( Jetpack_Constants::is_true( 'JETPACK_INVITE_ACCEPTED' ) ) { - $this->add_flags( $user_id, array( 'invitation_accepted' => true ) ); - } - /** - * Fires when a new user is registered on a site - * - * @since 1.6.3 - * @since-jetpack 4.9.0 - * - * @param object The WP_User object - */ - do_action( 'jetpack_sync_register_user', $user_id, $this->get_flags( $user_id ) ); - $this->clear_flags( $user_id ); - } - - /** - * Handler for user addition to the current blog. - * - * @access public - * - * @param int $user_id ID of the user. - */ - public function add_user_to_blog_handler( $user_id ) { - // Ensure we only sync users who are members of the current blog. - if ( ! is_user_member_of_blog( $user_id, get_current_blog_id() ) ) { - return; - } - - if ( Jetpack_Constants::is_true( 'JETPACK_INVITE_ACCEPTED' ) ) { - $this->add_flags( $user_id, array( 'invitation_accepted' => true ) ); - } - - /** - * Fires when a user is added on a site - * - * @since 1.6.3 - * @since-jetpack 4.9.0 - * - * @param object The WP_User object - */ - do_action( 'jetpack_sync_add_user', $user_id, $this->get_flags( $user_id ) ); - $this->clear_flags( $user_id ); - } - - /** - * Handler for user save. - * - * @access public - * - * @param int $user_id ID of the user. - * @param \WP_User $old_user_data User object before the changes. - */ - public function save_user_handler( $user_id, $old_user_data = null ) { - // Ensure we only sync users who are members of the current blog. - if ( ! is_user_member_of_blog( $user_id, get_current_blog_id() ) ) { - return; - } - - $user = get_user_by( 'id', $user_id ); - - // Older versions of WP don't pass the old_user_data in ->data. - if ( isset( $old_user_data->data ) ) { - $old_user = $old_user_data->data; - } else { - $old_user = $old_user_data; - } - - if ( ! is_object( $old_user ) ) { - return; - } - - $old_user_array = get_object_vars( $old_user ); - - foreach ( $old_user_array as $user_field => $field_value ) { - if ( false === $user->has_prop( $user_field ) ) { - continue; - } - if ( 'ID' === $user_field ) { - continue; - } - if ( $user->$user_field !== $field_value ) { - if ( 'user_email' === $user_field ) { - /** - * The '_new_email' user meta is deleted right after the call to wp_update_user - * that got us to this point so if it's still set then this was a user confirming - * their new email address. - */ - if ( 1 === (int) get_user_meta( $user->ID, '_new_email', true ) ) { - $this->flags[ $user_id ]['email_changed'] = true; - } - continue; - } - - $flag = isset( $this->user_fields_to_flags_mapping[ $user_field ] ) ? $this->user_fields_to_flags_mapping[ $user_field ] : 'unknown_field_changed'; - - $this->flags[ $user_id ][ $flag ] = true; - } - } - - if ( isset( $this->flags[ $user_id ] ) ) { - - /** - * Fires when the client needs to sync an updated user. - * - * @since 1.6.3 - * @since-jetpack 4.2.0 - * - * @param \WP_User The WP_User object - * @param array State - New since 5.8.0 - */ - do_action( 'jetpack_sync_save_user', $user_id, $this->get_flags( $user_id ) ); - $this->clear_flags( $user_id ); - } - } - - /** - * Handler for add user role change. - * - * @access public - * - * @param int $user_id ID of the user. - * @param string $role New user role. - */ - public function add_user_role_handler( $user_id, $role ) { - $this->add_flags( - $user_id, - array( - 'role_added' => $role, - ) - ); - - $this->save_user_role_handler( $user_id, $role ); - } - - /** - * Handler for remove user role change. - * - * @access public - * - * @param int $user_id ID of the user. - * @param string $role Removed user role. - */ - public function remove_user_role_handler( $user_id, $role ) { - $this->add_flags( - $user_id, - array( - 'role_removed' => $role, - ) - ); - - $this->save_user_role_handler( $user_id, $role ); - } - - /** - * Handler for user role change. - * - * @access public - * - * @param int $user_id ID of the user. - * @param string $role New user role. - * @param array $old_roles Previous user roles. - */ - public function save_user_role_handler( $user_id, $role, $old_roles = null ) { - $this->add_flags( - $user_id, - array( - 'role_changed' => true, - 'previous_role' => $old_roles, - ) - ); - - // The jetpack_sync_register_user payload is identical to jetpack_sync_save_user, don't send both. - if ( $this->is_create_user() || $this->is_add_user_to_blog() ) { - return; - } - /** - * This action is documented already in this file - */ - do_action( 'jetpack_sync_save_user', $user_id, $this->get_flags( $user_id ) ); - $this->clear_flags( $user_id ); - } - - /** - * Retrieve current flags for a particular user. - * - * @access public - * - * @param int $user_id ID of the user. - * @return array Current flags of the user. - */ - public function get_flags( $user_id ) { - if ( isset( $this->flags[ $user_id ] ) ) { - return $this->flags[ $user_id ]; - } - return array(); - } - - /** - * Clear the flags of a particular user. - * - * @access public - * - * @param int $user_id ID of the user. - */ - public function clear_flags( $user_id ) { - if ( isset( $this->flags[ $user_id ] ) ) { - unset( $this->flags[ $user_id ] ); - } - } - - /** - * Add flags to a particular user. - * - * @access public - * - * @param int $user_id ID of the user. - * @param array $flags New flags to add for the user. - */ - public function add_flags( $user_id, $flags ) { - $this->flags[ $user_id ] = wp_parse_args( $flags, $this->get_flags( $user_id ) ); - } - - /** - * Save the user meta, if we're interested in it. - * Also uses the time to add flags for the user. - * - * @access public - * - * @param int $meta_id ID of the meta object. - * @param int $user_id ID of the user. - * @param string $meta_key Meta key. - * @param mixed $value Meta value. - */ - public function maybe_save_user_meta( $meta_id, $user_id, $meta_key, $value ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable - if ( 'locale' === $meta_key ) { - $this->add_flags( $user_id, array( 'locale_changed' => true ) ); - } - - $user = get_user_by( 'id', $user_id ); - if ( isset( $user->cap_key ) && $meta_key === $user->cap_key ) { - $this->add_flags( $user_id, array( 'capabilities_changed' => true ) ); - } - - if ( $this->is_create_user() || $this->is_add_user_to_blog() || $this->is_delete_user() ) { - return; - } - - if ( isset( $this->flags[ $user_id ] ) ) { - /** - * This action is documented already in this file - */ - do_action( 'jetpack_sync_save_user', $user_id, $this->get_flags( $user_id ) ); - } - } - - /** - * Enqueue the users actions for full sync. - * - * @access public - * - * @param array $config Full sync configuration for this sync module. - * @param int $max_items_to_enqueue Maximum number of items to enqueue. - * @param boolean $state True if full sync has finished enqueueing this module, false otherwise. - * @return array Number of actions enqueued, and next module state. - */ - public function enqueue_full_sync_actions( $config, $max_items_to_enqueue, $state ) { - global $wpdb; - - return $this->enqueue_all_ids_as_action( 'jetpack_full_sync_users', $wpdb->usermeta, 'user_id', $this->get_where_sql( $config ), $max_items_to_enqueue, $state ); - } - - /** - * Retrieve an estimated number of actions that will be enqueued. - * - * @access public - * - * @todo Refactor to prepare the SQL query before executing it. - * - * @param array $config Full sync configuration for this sync module. - * @return array Number of items yet to be enqueued. - */ - public function estimate_full_sync_actions( $config ) { - global $wpdb; - - $query = "SELECT count(*) FROM $wpdb->usermeta"; - - $where_sql = $this->get_where_sql( $config ); - if ( $where_sql ) { - $query .= ' WHERE ' . $where_sql; - } - - // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared - $count = $wpdb->get_var( $query ); - - return (int) ceil( $count / self::ARRAY_CHUNK_SIZE ); - } - - /** - * Retrieve the WHERE SQL clause based on the module config. - * - * @access public - * - * @param array $config Full sync configuration for this sync module. - * @return string WHERE SQL clause, or `null` if no comments are specified in the module config. - */ - public function get_where_sql( $config ) { - global $wpdb; - - $query = "meta_key = '{$wpdb->prefix}user_level' AND meta_value > 0"; - - // The $config variable is a list of user IDs to sync. - if ( is_array( $config ) ) { - $query .= ' AND user_id IN (' . implode( ',', array_map( 'intval', $config ) ) . ')'; - } - - return $query; - } - - /** - * Retrieve the actions that will be sent for this module during a full sync. - * - * @access public - * - * @return array Full sync actions of this module. - */ - public function get_full_sync_actions() { - return array( 'jetpack_full_sync_users' ); - } - - /** - * Retrieve initial sync user config. - * - * @access public - * - * @todo Refactor the SQL query to call $wpdb->prepare() before execution. - * - * @return array|boolean IDs of users to initially sync, or false if tbe number of users exceed the maximum. - */ - public function get_initial_sync_user_config() { - global $wpdb; - - // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared - $user_ids = $wpdb->get_col( "SELECT user_id FROM $wpdb->usermeta WHERE meta_key = '{$wpdb->prefix}user_level' AND meta_value > 0 LIMIT " . ( self::MAX_INITIAL_SYNC_USERS + 1 ) ); - $user_ids_count = is_countable( $user_ids ) ? count( $user_ids ) : 0; - - if ( $user_ids_count <= self::MAX_INITIAL_SYNC_USERS ) { - return $user_ids; - } else { - return false; - } - } - - /** - * Expand the users within a hook before they are serialized and sent to the server. - * - * @access public - * - * @param array $args The hook arguments. - * @return array $args The hook arguments. - */ - public function expand_users( $args ) { - list( $user_ids, $previous_end ) = $args; - - return array( - 'users' => array_map( - array( $this, 'sanitize_user_and_expand' ), - get_users( - array( - 'include' => $user_ids, - 'orderby' => 'ID', - 'order' => 'DESC', - ) - ) - ), - 'previous_end' => $previous_end, - ); - } - - /** - * Handler for user removal from a particular blog. - * - * @access public - * - * @param int $user_id ID of the user. - * @param int $blog_id ID of the blog. - */ - public function remove_user_from_blog_handler( $user_id, $blog_id ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable - // User is removed on add, see https://github.com/WordPress/WordPress/blob/0401cee8b36df3def8e807dd766adc02b359dfaf/wp-includes/ms-functions.php#L2114. - if ( $this->is_add_new_user_to_blog() ) { - return; - } - - $reassigned_user_id = $this->get_reassigned_network_user_id(); - - // Note that we are in the context of the blog the user is removed from, see https://github.com/WordPress/WordPress/blob/473e1ba73bc5c18c72d7f288447503713d518790/wp-includes/ms-functions.php#L233. - /** - * Fires when a user is removed from a blog on a multisite installation - * - * @since 1.6.3 - * @since-jetpack 5.4.0 - * - * @param int $user_id - ID of the removed user - * @param int $reassigned_user_id - ID of the user the removed user's posts are reassigned to (if any). - */ - do_action( 'jetpack_removed_user_from_blog', $user_id, $reassigned_user_id ); - } - - /** - * Whether we're adding a new user to a blog in this request. - * - * @access protected - * - * @return boolean - */ - protected function is_add_new_user_to_blog() { - return $this->is_function_in_backtrace( 'add_new_user_to_blog' ); - } - - /** - * Whether we're adding an existing user to a blog in this request. - * - * @access protected - * - * @return boolean - */ - protected function is_add_user_to_blog() { - return $this->is_function_in_backtrace( 'add_user_to_blog' ); - } - - /** - * Whether we're removing a user from a blog in this request. - * - * @access protected - * - * @return boolean - */ - protected function is_delete_user() { - return $this->is_function_in_backtrace( array( 'wp_delete_user', 'remove_user_from_blog' ) ); - } - - /** - * Whether we're creating a user or adding a new user to a blog. - * - * @access protected - * - * @return boolean - */ - protected function is_create_user() { - $functions = array( - 'add_new_user_to_blog', // Used to suppress jetpack_sync_save_user in save_user_cap_handler when user registered on multi site. - 'wp_create_user', // Used to suppress jetpack_sync_save_user in save_user_role_handler when user registered on multi site. - 'wp_insert_user', // Used to suppress jetpack_sync_save_user in save_user_cap_handler and save_user_role_handler when user registered on single site. - ); - - return $this->is_function_in_backtrace( $functions ); - } - - /** - * Retrieve the ID of the user the removed user's posts are reassigned to (if any). - * - * @return int ID of the user that got reassigned as the author of the posts. - */ - protected function get_reassigned_network_user_id() { - $backtrace = debug_backtrace( false ); // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_debug_backtrace - foreach ( $backtrace as $call ) { - if ( - 'remove_user_from_blog' === $call['function'] && - 3 === count( $call['args'] ) - ) { - return $call['args'][2]; - } - } - - return false; - } - - /** - * Checks if one or more function names is in debug_backtrace. - * - * @access protected - * - * @param array|string $names Mixed string name of function or array of string names of functions. - * @return bool - */ - protected function is_function_in_backtrace( $names ) { - $backtrace = debug_backtrace( false ); // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_debug_backtrace - if ( ! is_array( $names ) ) { - $names = array( $names ); - } - $names_as_keys = array_flip( $names ); - - $backtrace_functions = array_column( $backtrace, 'function' ); - $backtrace_functions_as_keys = array_flip( $backtrace_functions ); - $intersection = array_intersect_key( $backtrace_functions_as_keys, $names_as_keys ); - return ! empty( $intersection ); - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-woocommerce-hpos-orders.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-woocommerce-hpos-orders.php deleted file mode 100644 index 01c20134..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-woocommerce-hpos-orders.php +++ /dev/null @@ -1,367 +0,0 @@ -order_table_name; - } - - /** - * Initialize order table data store, returns if the class don't exist (pre WC 6.x) - * - * @access public - */ - public function __construct() { - if ( ! class_exists( OrdersTableDataStore::class ) ) { - return; - } - $this->order_table_name = OrdersTableDataStore::get_orders_table_name(); - } - - /** - * Get order types that we want to sync. Adding a new type here is not enough, we would also need to add its prop in filter_order_data method. - * - * @access private - * - * @param bool $prefixed Whether to return prefixed types with shop_ or not. - * - * @return array Order types to sync. - */ - private function get_order_types_to_sync( $prefixed = false ) { - $types = array( 'order', 'order_refund' ); - if ( $prefixed ) { - $types = array_map( - function ( $type ) { - return "shop_{$type}"; - }, - $types - ); - } - return $types; - } - - /** - * Hooks sync listners on order modify events. - * - * @access public - * - * @param callable $callable Action handler callable. - */ - public function init_listeners( $callable ) { - foreach ( $this->get_order_types_to_sync() as $type ) { - add_action( "woocommerce_after_{$type}_object_save", $callable ); - add_filter( "jetpack_sync_before_enqueue_woocommerce_after_{$type}_object_save", array( $this, 'expand_order_object' ) ); - } - add_action( 'woocommerce_delete_order', $callable ); - add_filter( 'jetpack_sync_before_enqueue_woocommerce_delete_order', array( $this, 'expand_order_object' ) ); - add_action( 'woocommerce_trash_order', $callable ); - add_filter( 'jetpack_sync_before_enqueue_woocommerce_trash_order', array( $this, 'expand_order_object' ) ); - } - - /** - * Hooks the full sync listeners. - * - * @access public - * - * @param callable $callable Action handler callable. - */ - public function init_full_sync_listeners( $callable ) { - add_action( 'jetpack_full_sync_orders', $callable ); - add_filter( 'jetpack_sync_before_enqueue_full_sync_orders', array( $this, 'expand_order_objects' ) ); - } - - /** - * Returns the ID field from wc_orders table. - * - * @access public - * - * @return string - */ - public function id_field() { - return 'id'; - } - - /** - * Retrieve the actions that will be sent for this module during a full sync. - * - * @access public - * - * @return array Full sync actions of this module. - */ - public function get_full_sync_actions() { - return array( 'jetpack_full_sync_orders' ); - } - - /** - * Retrieve order data by its ID. - * - * @access public - * - * @param string $object_type Type of object to retrieve. Should be `order`. - * @param int $id Order ID. - * - * @return array - */ - public function get_object_by_id( $object_type, $id ) { - if ( 'order' !== $object_type ) { - return $id; - } - $order_objects = $this->get_objects_by_id( $object_type, array( $id ) ); - return isset( $order_objects[ $id ] ) ? $order_objects[ $id ] : false; - } - - /** - * Retrieves multiple orders data by their ID. - * - * @access public - * - * @param string $object_type Type of object to retrieve. Should be `order`. - * @param array $ids List of order IDs. - * - * @return array - */ - public function get_objects_by_id( $object_type, $ids ) { - if ( 'order' !== $object_type ) { - return $ids; - } - $orders = wc_get_orders( - array( - 'include' => $ids, - 'type' => $this->get_order_types_to_sync( true ), - ) - ); - $orders_data = array(); - foreach ( $orders as $order ) { - $orders_data[ $order->get_id() ] = $this->filter_order_data( $order ); - } - return $orders_data; - } - - /** - * Retrieves multiple orders data by their ID. - * - * @access public - * - * @param array $args List of order IDs. - * - * @return array - */ - public function expand_order_objects( $args ) { - $order_ids = $args; - - return $this->get_objects_by_id( 'order', $order_ids ); - } - - /** - * Retrieve order data by its ID. - * - * @access public - * - * @param array $args Order ID. - * - * @return array - */ - public function expand_order_object( $args ) { - $order_object = $args[0]; - - if ( is_int( $order_object ) ) { - $order_object = wc_get_order( $order_object ); - } - - if ( ! $order_object instanceof \WC_Abstract_Order ) { - return false; - } - - return $this->filter_order_data( $order_object ); - } - - /** - * Filters only allowed keys from order data. No PII etc information is allowed to be synced. - * - * @access private - * - * @param \WC_Abstract_Order $order_object Order object. - * - * @return array Filtered order data. - */ - private function filter_order_data( $order_object ) { - // Filter with allowlist. - $allowed_data_keys = WooCommerce::$wc_post_meta_whitelist; - $core_table_keys = array( - 'id', - 'status', - 'date_created', - 'date_modified', - 'parent_id', - ); - $allowed_data_keys = array_merge( $allowed_data_keys, $core_table_keys ); - $filtered_order_data = array( 'type' => $order_object->get_type() ); - $order_data = $order_object->get_data(); - foreach ( $allowed_data_keys as $key ) { - $key = trim( $key, '_' ); - $key_parts = explode( '_', $key ); - - if ( in_array( $key_parts[0], array( 'order', 'refund' ), true ) ) { - if ( isset( $order_data[ $key_parts[1] ] ) && ! is_array( $order_data[ $key_parts[1] ] ) ) { - $filtered_order_data[ $key ] = $order_data[ $key_parts[1] ]; - continue; - } - } - - if ( in_array( $key_parts[0], array( 'billing', 'shipping' ), true ) && 2 === count( $key_parts ) ) { - if ( isset( $order_data[ $key_parts[0] ][ $key_parts[1] ] ) ) { - $filtered_order_data[ $key ] = $order_data[ $key_parts[0] ][ $key_parts[1] ]; - continue; - } - } - - /** - * We need to convert the WC_DateTime objects to stdClass objects to ensure they are properly encoded. - * - * @see Automattic\Jetpack\Sync\Functions::json_wrap as the return value of get_object_vars can vary depending on PHP version. - */ - if ( in_array( $key, array( 'date_created', 'date_modified', 'date_paid', 'date_completed' ), true ) ) { - if ( is_a( $order_data[ $key ], 'WC_DateTime' ) ) { - $filtered_order_data[ $key ] = (object) (array) $order_data[ $key ]; - continue; - } - } - - if ( isset( $order_data[ $key ] ) ) { - $filtered_order_data[ $key ] = $order_data[ $key ]; - continue; - } - - switch ( $key ) { - case 'cart_discount': - $filtered_order_data[ $key ] = isset( $order_data['discount_total'] ) ? $order_data['discount_total'] : ''; - break; - case 'cart_discount_tax': - $filtered_order_data[ $key ] = isset( $order_data['discount_tax'] ) ? $order_data['discount_tax'] : ''; - break; - case 'order_shipping': - $filtered_order_data[ $key ] = isset( $order_data['shipping_total'] ) ? $order_data['shipping_total'] : ''; - break; - case 'order_shipping_tax': - $filtered_order_data[ $key ] = isset( $order_data['shipping_tax'] ) ? $order_data['shipping_tax'] : ''; - break; - case 'order_tax': - $filtered_order_data[ $key ] = isset( $order_data['cart_tax'] ) ? $order_data['cart_tax'] : ''; - break; - case 'order_total': - $filtered_order_data[ $key ] = isset( $order_data['total'] ) ? $order_data['total'] : ''; - break; - } - } - if ( '' === $filtered_order_data['status'] ) { - $filtered_order_data['status'] = 'pending'; - } - - return $filtered_order_data; - } - - /** - * Returns metadata for order object. - * - * @access protected - * - * @param array $ids List of order IDs. - * @param string $meta_type Meta type. - * @param array $meta_key_whitelist List of allowed meta keys. - * - * @return array Filtered order metadata. - */ - protected function get_metadata( $ids, $meta_type, $meta_key_whitelist ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable -- returning empty meta is intentional. - return array(); // don't sync metadata, all allow-listed core data is available in the order object. - } - - /** - * Retrieve an estimated number of actions that will be enqueued. - * - * @access public - * - * @param array $config Full sync configuration for this sync module. - * @return array Number of items yet to be enqueued. - */ - public function estimate_full_sync_actions( $config ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable -- We return all order count for full sync, so confit is not required. - global $wpdb; - - $query = "SELECT count(*) FROM {$this->table_name()} WHERE {$this->get_where_sql( $config ) }"; - // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching -- Hardcoded query, no user variable - $count = $wpdb->get_var( $query ); - - return (int) ceil( $count / self::ARRAY_CHUNK_SIZE ); - } - - /** - * Enqueue the WooCommerce HPOS orders actions for full sync. - * - * @access public - * - * @param array $config Full sync configuration for this sync module. - * @param int $max_items_to_enqueue Maximum number of items to enqueue. - * @param boolean $state True if full sync has finished enqueueing this module, false otherwise. - * @return array Number of actions enqueued, and next module state. - */ - public function enqueue_full_sync_actions( $config, $max_items_to_enqueue, $state ) { - return $this->enqueue_all_ids_as_action( 'full_sync_orders', $this->table_name(), 'id', $this->get_where_sql( $config ), $max_items_to_enqueue, $state ); - } - - /** - * Get where SQL for full sync. - * - * @access public - * - * @param array $config Full sync configuration for this sync module. - * - * @return string WHERE SQL clause, or `null` if no comments are specified in the module config. - */ - public function get_where_sql( $config ) { - global $wpdb; - $parent_where = parent::get_where_sql( $config ); - $order_types = $this->get_order_types_to_sync( true ); - $order_type_placeholder = implode( ', ', array_fill( 0, count( $order_types ), '%s' ) ); - // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.PreparedSQLPlaceholders.UnfinishedPrepare -- Query is prepared. - $where_sql = $wpdb->prepare( "type IN ( $order_type_placeholder )", $order_types ); - return "{$parent_where} AND {$where_sql}"; - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-woocommerce.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-woocommerce.php deleted file mode 100644 index f5cbd801..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-woocommerce.php +++ /dev/null @@ -1,614 +0,0 @@ -order_item_table_name; - } - - /** - * Constructor. - * - * @global $wpdb - * - * @todo Should we refactor this to use $this->set_defaults() instead? - */ - public function __construct() { - global $wpdb; - $this->order_item_table_name = $wpdb->prefix . 'woocommerce_order_items'; - - // Options, constants and post meta whitelists. - add_filter( 'jetpack_sync_options_whitelist', array( $this, 'add_woocommerce_options_whitelist' ), 10 ); - add_filter( 'jetpack_sync_constants_whitelist', array( $this, 'add_woocommerce_constants_whitelist' ), 10 ); - add_filter( 'jetpack_sync_post_meta_whitelist', array( $this, 'add_woocommerce_post_meta_whitelist' ), 10 ); - add_filter( 'jetpack_sync_comment_meta_whitelist', array( $this, 'add_woocommerce_comment_meta_whitelist' ), 10 ); - - add_filter( 'jetpack_sync_before_enqueue_woocommerce_new_order_item', array( $this, 'filter_order_item' ) ); - add_filter( 'jetpack_sync_before_enqueue_woocommerce_update_order_item', array( $this, 'filter_order_item' ) ); - add_filter( 'jetpack_sync_whitelisted_comment_types', array( $this, 'add_review_comment_types' ) ); - - // Blacklist Action Scheduler comment types. - add_filter( 'jetpack_sync_prevent_sending_comment_data', array( $this, 'filter_action_scheduler_comments' ), 10, 2 ); - } - - /** - * Sync module name. - * - * @access public - * - * @return string - */ - public function name() { - return 'woocommerce'; - } - - /** - * Initialize WooCommerce action listeners. - * - * @access public - * - * @param callable $callable Action handler callable. - */ - public function init_listeners( $callable ) { - // Attributes. - add_action( 'woocommerce_attribute_added', $callable, 10, 2 ); - add_action( 'woocommerce_attribute_updated', $callable, 10, 3 ); - add_action( 'woocommerce_attribute_deleted', $callable, 10, 3 ); - - // Orders. - add_action( 'woocommerce_new_order', $callable, 10, 1 ); - add_action( 'woocommerce_order_status_changed', $callable, 10, 3 ); - add_action( 'woocommerce_payment_complete', $callable, 10, 1 ); - - // Order items. - add_action( 'woocommerce_new_order_item', $callable, 10, 4 ); - add_action( 'woocommerce_update_order_item', $callable, 10, 4 ); - add_action( 'woocommerce_delete_order_item', $callable, 10, 1 ); - $this->init_listeners_for_meta_type( 'order_item', $callable ); - - // Payment tokens. - add_action( 'woocommerce_new_payment_token', $callable, 10, 1 ); - add_action( 'woocommerce_payment_token_deleted', $callable, 10, 2 ); - add_action( 'woocommerce_payment_token_updated', $callable, 10, 1 ); - $this->init_listeners_for_meta_type( 'payment_token', $callable ); - - // Product downloads. - add_action( 'woocommerce_downloadable_product_download_log_insert', $callable, 10, 1 ); - add_action( 'woocommerce_grant_product_download_access', $callable, 10, 1 ); - - // Tax rates. - add_action( 'woocommerce_tax_rate_added', $callable, 10, 2 ); - add_action( 'woocommerce_tax_rate_updated', $callable, 10, 2 ); - add_action( 'woocommerce_tax_rate_deleted', $callable, 10, 1 ); - - // Webhooks. - add_action( 'woocommerce_new_webhook', $callable, 10, 1 ); - add_action( 'woocommerce_webhook_deleted', $callable, 10, 2 ); - add_action( 'woocommerce_webhook_updated', $callable, 10, 1 ); - } - - /** - * Initialize WooCommerce action listeners for full sync. - * - * @access public - * - * @param callable $callable Action handler callable. - */ - public function init_full_sync_listeners( $callable ) { - add_action( 'jetpack_full_sync_woocommerce_order_items', $callable ); // Also sends post meta. - } - - /** - * Retrieve the actions that will be sent for this module during a full sync. - * - * @access public - * - * @return array Full sync actions of this module. - */ - public function get_full_sync_actions() { - return array( 'jetpack_full_sync_woocommerce_order_items' ); - } - - /** - * Initialize the module in the sender. - * - * @access public - */ - public function init_before_send() { - // Full sync. - add_filter( 'jetpack_sync_before_send_jetpack_full_sync_woocommerce_order_items', array( $this, 'expand_order_item_ids' ) ); - } - - /** - * Expand the order items properly. - * - * @access public - * - * @param array $args The hook arguments. - * @return array $args The hook arguments. - */ - public function filter_order_item( $args ) { - // Make sure we always have all the data - prior to WooCommerce 3.0 we only have the user supplied data in the second argument and not the full details. - $args[1] = $this->build_order_item( $args[0] ); - return $args; - } - - /** - * Expand order item IDs to order items and their meta. - * - * @access public - * - * @todo Refactor table name to use a $wpdb->prepare placeholder. - * - * @param array $args The hook arguments. - * @return array $args Expanded order items with meta. - */ - public function expand_order_item_ids( $args ) { - $order_item_ids = $args[0]; - - global $wpdb; - - $order_item_ids_sql = implode( ', ', array_map( 'intval', $order_item_ids ) ); - - $order_items = $wpdb->get_results( - // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared - "SELECT * FROM $this->order_item_table_name WHERE order_item_id IN ( $order_item_ids_sql )" - ); - - return array( - $order_items, - $this->get_metadata( $order_item_ids, 'order_item', static::$order_item_meta_whitelist ), - ); - } - - /** - * Extract the full order item from the database by its ID. - * - * @access public - * - * @todo Refactor table name to use a $wpdb->prepare placeholder. - * - * @param int $order_item_id Order item ID. - * @return object Order item. - */ - public function build_order_item( $order_item_id ) { - global $wpdb; - // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared - return $wpdb->get_row( $wpdb->prepare( "SELECT * FROM $this->order_item_table_name WHERE order_item_id = %d", $order_item_id ) ); - } - - /** - * Enqueue the WooCommerce actions for full sync. - * - * @access public - * - * @param array $config Full sync configuration for this sync module. - * @param int $max_items_to_enqueue Maximum number of items to enqueue. - * @param boolean $state True if full sync has finished enqueueing this module, false otherwise. - * @return array Number of actions enqueued, and next module state. - */ - public function enqueue_full_sync_actions( $config, $max_items_to_enqueue, $state ) { - return $this->enqueue_all_ids_as_action( 'jetpack_full_sync_woocommerce_order_items', $this->order_item_table_name, 'order_item_id', $this->get_where_sql( $config ), $max_items_to_enqueue, $state ); - } - - /** - * Retrieve an estimated number of actions that will be enqueued. - * - * @access public - * - * @todo Refactor the SQL query to use $wpdb->prepare(). - * - * @param array $config Full sync configuration for this sync module. - * @return array Number of items yet to be enqueued. - */ - public function estimate_full_sync_actions( $config ) { - global $wpdb; - - $query = "SELECT count(*) FROM $this->order_item_table_name WHERE " . $this->get_where_sql( $config ); - // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared - $count = $wpdb->get_var( $query ); - - return (int) ceil( $count / self::ARRAY_CHUNK_SIZE ); - } - - /** - * Retrieve the WHERE SQL clause based on the module config. - * - * @access private - * - * @param array $config Full sync configuration for this sync module. - * @return string WHERE SQL clause. - */ - public function get_where_sql( $config ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable - return '1=1'; - } - - /** - * Add WooCommerce options to the options whitelist. - * - * @param array $list Existing options whitelist. - * @return array Updated options whitelist. - */ - public function add_woocommerce_options_whitelist( $list ) { - return array_merge( $list, self::$wc_options_whitelist ); - } - - /** - * Add WooCommerce constants to the constants whitelist. - * - * @param array $list Existing constants whitelist. - * @return array Updated constants whitelist. - */ - public function add_woocommerce_constants_whitelist( $list ) { - return array_merge( $list, self::$wc_constants_whitelist ); - } - - /** - * Add WooCommerce post meta to the post meta whitelist. - * - * @param array $list Existing post meta whitelist. - * @return array Updated post meta whitelist. - */ - public function add_woocommerce_post_meta_whitelist( $list ) { - return array_merge( $list, self::$wc_post_meta_whitelist ); - } - - /** - * Add WooCommerce comment meta to the comment meta whitelist. - * - * @param array $list Existing comment meta whitelist. - * @return array Updated comment meta whitelist. - */ - public function add_woocommerce_comment_meta_whitelist( $list ) { - return array_merge( $list, self::$wc_comment_meta_whitelist ); - } - - /** - * Adds 'revew' to the list of comment types so Sync will listen for status changes on 'reviews'. - * - * @access public - * - * @param array $comment_types The list of comment types prior to this filter. - * return array The list of comment types with 'review' added. - */ - public function add_review_comment_types( $comment_types ) { - if ( is_array( $comment_types ) ) { - $comment_types[] = 'review'; - } - return $comment_types; - } - - /** - * Stop comments from the Action Scheduler from being synced. - * https://github.com/woocommerce/woocommerce/tree/e7762627c37ec1f7590e6cac4218ba0c6a20024d/includes/libraries/action-scheduler - * - * @since 1.6.3 - * @since-jetpack 7.7.0 - * - * @param boolean $can_sync Should we prevent comment data from bing synced to WordPress.com. - * @param mixed $comment WP_COMMENT object. - * - * @return bool - */ - public function filter_action_scheduler_comments( $can_sync, $comment ) { - if ( isset( $comment->comment_agent ) && 'ActionScheduler' === $comment->comment_agent ) { - return true; - } - return $can_sync; - } - - /** - * Whitelist for options we are interested to sync. - * - * @access private - * @static - * - * @var array - */ - private static $wc_options_whitelist = array( - 'woocommerce_currency', - 'woocommerce_db_version', - 'woocommerce_weight_unit', - 'woocommerce_version', - 'woocommerce_unforce_ssl_checkout', - 'woocommerce_tax_total_display', - 'woocommerce_tax_round_at_subtotal', - 'woocommerce_tax_display_shop', - 'woocommerce_tax_display_cart', - 'woocommerce_prices_include_tax', - 'woocommerce_price_thousand_sep', - 'woocommerce_price_num_decimals', - 'woocommerce_price_decimal_sep', - 'woocommerce_notify_low_stock', - 'woocommerce_notify_low_stock_amount', - 'woocommerce_notify_no_stock', - 'woocommerce_notify_no_stock_amount', - 'woocommerce_manage_stock', - 'woocommerce_force_ssl_checkout', - 'woocommerce_hide_out_of_stock_items', - 'woocommerce_file_download_method', - 'woocommerce_enable_signup_and_login_from_checkout', - 'woocommerce_enable_shipping_calc', - 'woocommerce_enable_review_rating', - 'woocommerce_enable_guest_checkout', - 'woocommerce_enable_coupons', - 'woocommerce_enable_checkout_login_reminder', - 'woocommerce_enable_ajax_add_to_cart', - 'woocommerce_dimension_unit', - 'woocommerce_default_country', - 'woocommerce_default_customer_address', - 'woocommerce_currency_pos', - 'woocommerce_api_enabled', - 'woocommerce_allow_tracking', - 'woocommerce_task_list_hidden', - 'woocommerce_onboarding_profile', - 'woocommerce_cod_settings', - ); - - /** - * Whitelist for constants we are interested to sync. - * - * @access private - * @static - * - * @var array - */ - private static $wc_constants_whitelist = array( - // WooCommerce constants. - 'WC_PLUGIN_FILE', - 'WC_ABSPATH', - 'WC_PLUGIN_BASENAME', - 'WC_VERSION', - 'WOOCOMMERCE_VERSION', - 'WC_ROUNDING_PRECISION', - 'WC_DISCOUNT_ROUNDING_MODE', - 'WC_TAX_ROUNDING_MODE', - 'WC_DELIMITER', - 'WC_LOG_DIR', - 'WC_SESSION_CACHE_GROUP', - 'WC_TEMPLATE_DEBUG_MODE', - ); - - /** - * Whitelist for post meta we are interested to sync. - * - * @access private - * @static - * - * @var array - */ - public static $wc_post_meta_whitelist = array( - // WooCommerce products. - // See https://github.com/woocommerce/woocommerce/blob/8ed6e7436ff87c2153ed30edd83c1ab8abbdd3e9/includes/data-stores/class-wc-product-data-store-cpt.php#L21 . - '_visibility', - '_sku', - '_price', - '_regular_price', - '_sale_price', - '_sale_price_dates_from', - '_sale_price_dates_to', - 'total_sales', - '_tax_status', - '_tax_class', - '_manage_stock', - '_backorders', - '_sold_individually', - '_weight', - '_length', - '_width', - '_height', - '_upsell_ids', - '_crosssell_ids', - '_purchase_note', - '_default_attributes', - '_product_attributes', - '_virtual', - '_downloadable', - '_download_limit', - '_download_expiry', - '_featured', - '_downloadable_files', - '_wc_rating_count', - '_wc_average_rating', - '_wc_review_count', - '_variation_description', - '_thumbnail_id', - '_file_paths', - '_product_image_gallery', - '_product_version', - '_wp_old_slug', - - // Woocommerce orders. - // See https://github.com/woocommerce/woocommerce/blob/8ed6e7436ff87c2153ed30edd83c1ab8abbdd3e9/includes/data-stores/class-wc-order-data-store-cpt.php#L27 . - '_order_key', - '_order_currency', - // '_billing_first_name', do not sync these as they contain personal data - // '_billing_last_name', - // '_billing_company', - // '_billing_address_1', - // '_billing_address_2', - '_billing_city', - '_billing_state', - '_billing_postcode', - '_billing_country', - // '_billing_email', do not sync these as they contain personal data. - // '_billing_phone', - // '_shipping_first_name', - // '_shipping_last_name', - // '_shipping_company', - // '_shipping_address_1', - // '_shipping_address_2', - '_shipping_city', - '_shipping_state', - '_shipping_postcode', - '_shipping_country', - '_completed_date', - '_paid_date', - '_cart_discount', - '_cart_discount_tax', - '_order_shipping', - '_order_shipping_tax', - '_order_tax', - '_order_total', - '_payment_method', - '_payment_method_title', - // '_transaction_id', do not sync these as they contain personal data. - // '_customer_ip_address', - // '_customer_user_agent', - '_created_via', - '_order_version', - '_prices_include_tax', - '_date_completed', - '_date_paid', - '_payment_tokens', - '_billing_address_index', - '_shipping_address_index', - '_recorded_sales', - '_recorded_coupon_usage_counts', - // See https://github.com/woocommerce/woocommerce/blob/8ed6e7436ff87c2153ed30edd83c1ab8abbdd3e9/includes/data-stores/class-wc-order-data-store-cpt.php#L539 . - '_download_permissions_granted', - // See https://github.com/woocommerce/woocommerce/blob/8ed6e7436ff87c2153ed30edd83c1ab8abbdd3e9/includes/data-stores/class-wc-order-data-store-cpt.php#L594 . - '_order_stock_reduced', - - // Woocommerce order refunds. - // See https://github.com/woocommerce/woocommerce/blob/b8a2815ae546c836467008739e7ff5150cb08e93/includes/data-stores/class-wc-order-refund-data-store-cpt.php#L20 . - '_order_currency', - '_refund_amount', - '_refunded_by', - '_refund_reason', - '_order_shipping', - '_order_shipping_tax', - '_order_tax', - '_order_total', - '_order_version', - '_prices_include_tax', - '_payment_tokens', - ); - - /** - * Whitelist for comment meta we are interested to sync. - * - * @access private - * @static - * - * @var array - */ - private static $wc_comment_meta_whitelist = array( - 'rating', - ); - - /** - * Return a list of objects by their type and IDs - * - * @param string $object_type Object type. - * @param array $ids IDs of objects to return. - * - * @access public - * - * @return array|object|WP_Error|null - */ - public function get_objects_by_id( $object_type, $ids ) { - switch ( $object_type ) { - case 'order_item': - return $this->get_order_item_by_ids( $ids ); - } - - return new WP_Error( 'unsupported_object_type', 'Unsupported object type' ); - } - - /** - * Returns a list of order_item objects by their IDs. - * - * @param array $ids List of order_item IDs to fetch. - * - * @access public - * - * @return array|object|null - */ - public function get_order_item_by_ids( $ids ) { - global $wpdb; - - if ( ! is_array( $ids ) ) { - return array(); - } - - // Make sure the IDs are numeric and are non-zero. - $ids = array_filter( array_map( 'intval', $ids ) ); - - if ( empty( $ids ) ) { - return array(); - } - - // Prepare the placeholders for the prepared query below. - $placeholders = implode( ',', array_fill( 0, count( $ids ), '%d' ) ); - - $query = "SELECT * FROM {$this->order_item_table_name} WHERE order_item_id IN ( $placeholders )"; - - // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared - return $wpdb->get_results( $wpdb->prepare( $query, $ids ), ARRAY_A ); - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-wp-super-cache.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-wp-super-cache.php deleted file mode 100644 index af4aec41..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-wp-super-cache.php +++ /dev/null @@ -1,156 +0,0 @@ -set_defaults() instead? - */ - public function __construct() { - add_filter( 'jetpack_sync_constants_whitelist', array( $this, 'add_wp_super_cache_constants_whitelist' ), 10 ); - add_filter( 'jetpack_sync_callable_whitelist', array( $this, 'add_wp_super_cache_callable_whitelist' ), 10 ); - } - - /** - * Whitelist for constants we are interested to sync. - * - * @access public - * @static - * - * @var array - */ - public static $wp_super_cache_constants = array( - 'WPLOCKDOWN', - 'WPSC_DISABLE_COMPRESSION', - 'WPSC_DISABLE_LOCKING', - 'WPSC_DISABLE_HTACCESS_UPDATE', - 'ADVANCEDCACHEPROBLEM', - ); - - /** - * Container for the whitelist for WP_Super_Cache callables we are interested to sync. - * - * @access public - * @static - * - * @var array - */ - public static $wp_super_cache_callables = array( - 'wp_super_cache_globals' => array( __CLASS__, 'get_wp_super_cache_globals' ), - ); - - /** - * Sync module name. - * - * @access public - * - * @return string - */ - public function name() { - return 'wp-super-cache'; - } - - /** - * Retrieve all WP_Super_Cache callables we are interested to sync. - * - * @access public - * - * @global $wp_cache_mod_rewrite; - * @global $cache_enabled; - * @global $super_cache_enabled; - * @global $ossdlcdn; - * @global $cache_rebuild_files; - * @global $wp_cache_mobile; - * @global $wp_super_cache_late_init; - * @global $wp_cache_anon_only; - * @global $wp_cache_not_logged_in; - * @global $wp_cache_clear_on_post_edit; - * @global $wp_cache_mobile_enabled; - * @global $wp_super_cache_debug; - * @global $cache_max_time; - * @global $wp_cache_refresh_single_only; - * @global $wp_cache_mfunc_enabled; - * @global $wp_supercache_304; - * @global $wp_cache_no_cache_for_get; - * @global $wp_cache_mutex_disabled; - * @global $cache_jetpack; - * @global $cache_domain_mapping; - * - * @return array All WP_Super_Cache callables. - */ - public static function get_wp_super_cache_globals() { - global $wp_cache_mod_rewrite; - global $cache_enabled; - global $super_cache_enabled; - global $ossdlcdn; - global $cache_rebuild_files; - global $wp_cache_mobile; - global $wp_super_cache_late_init; - global $wp_cache_anon_only; - global $wp_cache_not_logged_in; - global $wp_cache_clear_on_post_edit; - global $wp_cache_mobile_enabled; - global $wp_super_cache_debug; - global $cache_max_time; - global $wp_cache_refresh_single_only; - global $wp_cache_mfunc_enabled; - global $wp_supercache_304; - global $wp_cache_no_cache_for_get; - global $wp_cache_mutex_disabled; - global $cache_jetpack; - global $cache_domain_mapping; - - return array( - 'wp_cache_mod_rewrite' => $wp_cache_mod_rewrite, - 'cache_enabled' => $cache_enabled, - 'super_cache_enabled' => $super_cache_enabled, - 'ossdlcdn' => $ossdlcdn, - 'cache_rebuild_files' => $cache_rebuild_files, - 'wp_cache_mobile' => $wp_cache_mobile, - 'wp_super_cache_late_init' => $wp_super_cache_late_init, - 'wp_cache_anon_only' => $wp_cache_anon_only, - 'wp_cache_not_logged_in' => $wp_cache_not_logged_in, - 'wp_cache_clear_on_post_edit' => $wp_cache_clear_on_post_edit, - 'wp_cache_mobile_enabled' => $wp_cache_mobile_enabled, - 'wp_super_cache_debug' => $wp_super_cache_debug, - 'cache_max_time' => $cache_max_time, - 'wp_cache_refresh_single_only' => $wp_cache_refresh_single_only, - 'wp_cache_mfunc_enabled' => $wp_cache_mfunc_enabled, - 'wp_supercache_304' => $wp_supercache_304, - 'wp_cache_no_cache_for_get' => $wp_cache_no_cache_for_get, - 'wp_cache_mutex_disabled' => $wp_cache_mutex_disabled, - 'cache_jetpack' => $cache_jetpack, - 'cache_domain_mapping' => $cache_domain_mapping, - ); - } - - /** - * Add WP_Super_Cache constants to the constants whitelist. - * - * @param array $list Existing constants whitelist. - * @return array Updated constants whitelist. - */ - public function add_wp_super_cache_constants_whitelist( $list ) { - return array_merge( $list, self::$wp_super_cache_constants ); - } - - /** - * Add WP_Super_Cache callables to the callables whitelist. - * - * @param array $list Existing callables whitelist. - * @return array Updated callables whitelist. - */ - public function add_wp_super_cache_callable_whitelist( $list ) { - return array_merge( $list, self::$wp_super_cache_callables ); - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/replicastore/class-table-checksum-usermeta.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/replicastore/class-table-checksum-usermeta.php deleted file mode 100644 index 20f686a6..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/replicastore/class-table-checksum-usermeta.php +++ /dev/null @@ -1,208 +0,0 @@ -build_filter_statement( $range_from, $range_to ); - - $query = " - SELECT - DISTINCT {$this->table}.{$this->range_field} - FROM - {$this->table} - JOIN {$wpdb->usermeta} as um_table ON um_table.user_id = {$this->table}.ID - WHERE - {$range_filter_statement} - AND um_table.meta_key = '{$wpdb->prefix}user_level' - AND um_table.meta_value > 0 - "; - - // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared - $user_ids = $wpdb->get_col( $query ); - - // Chunk the array down to make sure we don't overload the database with queries that are too large. - $chunked_user_ids = array_chunk( $user_ids, 500 ); - - $checksum_entries = array(); - - foreach ( $chunked_user_ids as $user_ids_chunk ) { - $user_objects = $this->get_user_objects_by_ids( $user_ids_chunk ); - - foreach ( $user_objects as $user_object ) { - // expand and sanitize desired meta based on WP.com logic. - $user_object = $this->expand_and_sanitize_user_meta( $user_object ); - - // Generate checksum entry based on the serialized value if not empty. - $checksum_entry = 0; - if ( ! empty( $user_object->roles ) ) { - $checksum_entry = crc32( implode( '#', array( $this->salt, 'roles', maybe_serialize( $user_object->roles ) ) ) ); - } - - // Meta only persisted if user is connected to WP.com. - if ( ( new Manager( 'jetpack' ) )->is_user_connected( $user_object->ID ) ) { - if ( ! empty( $user_object->allcaps ) ) { - $checksum_entry += crc32( - implode( - '#', - array( - $this->salt, - 'capabilities', - maybe_serialize( $user_object->allcaps ), - ) - ) - ); - } - // Explicitly check that locale is not same as site locale. - if ( ! empty( $user_object->locale ) && get_locale() !== $user_object->locale ) { - $checksum_entry += crc32( - implode( - '#', - array( - $this->salt, - 'locale', - maybe_serialize( $user_object->locale ), - ) - ) - ); - } - if ( ! empty( $user_object->allowed_mime_types ) ) { - $checksum_entry += crc32( - implode( - '#', - array( - $this->salt, - 'allowed_mime_types', - maybe_serialize( $user_object->allowed_mime_types ), - ) - ) - ); - } - } - - $checksum_entries[ $user_object->ID ] = '' . $checksum_entry; - } - } - - // Non-granular results need only to sum the different entries. - if ( ! $granular_result ) { - $checksum_sum = 0; - foreach ( $checksum_entries as $entry ) { - $checksum_sum += intval( $entry ); - } - - if ( $simple_return_value ) { - return '' . $checksum_sum; - } - - return array( - 'range' => $range_from . '-' . $range_to, - 'checksum' => '' . $checksum_sum, - ); - - } - - // Granular results. - $response = $checksum_entries; - - // Sort the return value for easier comparisons and code flows further down the line. - ksort( $response ); - - return $response; - } - - /** - * Expand the User Object with additional meta santized by WP.com logic. - * - * @param mixed $user_object User Object from WP_User_Query. - * - * @return mixed $user_object expanded User Object. - */ - protected function expand_and_sanitize_user_meta( $user_object ) { - $user_module = Modules::get_module( 'users' ); - // Expand User Objects based on Sync logic. - $user_object = $user_module->expand_user( $user_object ); - - // Sanitize location. - if ( ! empty( $user_object->locale ) ) { - $user_object->locale = wp_strip_all_tags( $user_object->locale, true ); - } - - // Sanitize allcaps. - if ( ! empty( $user_object->allcaps ) ) { - $user_object->allcaps = array_map( - function ( $cap ) { - return (bool) $cap; - }, - $user_object->allcaps - ); - } - - // Sanitize allowed_mime_types. - $allowed_mime_types = $user_object->allowed_mime_types; - foreach ( $allowed_mime_types as $allowed_mime_type_short => $allowed_mime_type_long ) { - $allowed_mime_type_short = wp_strip_all_tags( (string) $allowed_mime_type_short, true ); - $allowed_mime_type_long = wp_strip_all_tags( (string) $allowed_mime_type_long, true ); - $allowed_mime_types[ $allowed_mime_type_short ] = $allowed_mime_type_long; - } - $user_object->allowed_mime_types = $allowed_mime_types; - - // Sanitize roles. - if ( is_array( $user_object->roles ) ) { - $user_object->roles = array_map( 'sanitize_text_field', $user_object->roles ); - } - return $user_object; - } - - /** - * Gets a list of `WP_User` objects by their IDs - * - * @param array $ids List of IDs to fetch. - * - * @return array - */ - protected function get_user_objects_by_ids( $ids ) { - $user_query = new WP_User_Query( array( 'include' => $ids ) ); - - return $user_query->get_results(); - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/replicastore/class-table-checksum-users.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/replicastore/class-table-checksum-users.php deleted file mode 100644 index c36b0e3d..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/replicastore/class-table-checksum-users.php +++ /dev/null @@ -1,185 +0,0 @@ -prepare( '%s', $this->salt ); - - // Prepare the compound key. - $key_fields = array(); - - // Prefix the fields with the table name, to avoid clashes in queries with sub-queries (e.g. meta tables). - foreach ( $this->key_fields as $field ) { - $key_fields[] = $this->table . '.' . $field; - } - - $key_fields = implode( ',', $key_fields ); - - // Prepare the checksum fields. - $checksum_fields = array(); - // Prefix the fields with the table name, to avoid clashes in queries with sub-queries (e.g. meta tables). - foreach ( $this->checksum_fields as $field ) { - $checksum_fields[] = $this->table . '.' . $field; - } - // Apply latin1 conversion if enabled. - if ( $this->perform_text_conversion ) { - // Convert text fields to allow for encoding discrepancies as WP.com is latin1. - foreach ( $this->checksum_text_fields as $field ) { - $checksum_fields[] = 'CONVERT(' . $this->table . '.' . $field . ' using latin1 )'; - } - } else { - // Conversion disabled, default to table prefixing. - foreach ( $this->checksum_text_fields as $field ) { - $checksum_fields[] = $this->table . '.' . $field; - } - } - - $checksum_fields_string = implode( ',', array_merge( $checksum_fields, array( $salt ) ) ); - - $additional_fields = ''; - if ( $granular_result ) { - // TODO uniq the fields as sometimes(most) range_index is the key and there's no need to select the same field twice. - $additional_fields = " - {$this->table}.{$this->range_field} as range_index, - {$key_fields}, - "; - } - - $filter_stamenet = $this->build_filter_statement( $range_from, $range_to, $filter_values ); - - // usermeta join to limit on user_level. - $join_statement = "JOIN {$wpdb->usermeta} as um_table ON um_table.user_id = {$this->table}.ID"; - - $query = " - SELECT - {$additional_fields} - SUM( - CRC32( - CONCAT_WS( '#', {$salt}, {$checksum_fields_string} ) - ) - ) AS checksum - FROM - {$this->table} - {$join_statement} - WHERE - {$filter_stamenet} - AND um_table.meta_key = '{$wpdb->prefix}user_level' - AND um_table.meta_value > 0 - "; - - /** - * We need the GROUP BY only for compound keys. - */ - if ( $granular_result ) { - $query .= " - GROUP BY {$key_fields} - LIMIT 9999999 - "; - } - - return $query; - } - - /** - * Obtain the min-max values (edges) of the range. - * - * @param int|null $range_from The start of the range. - * @param int|null $range_to The end of the range. - * @param int|null $limit How many values to return. - * - * @return array|object|void - * @throws Exception Throws an exception if validation fails on the internal function calls. - */ - public function get_range_edges( $range_from = null, $range_to = null, $limit = null ) { - global $wpdb; - - $this->validate_fields( array( $this->range_field ) ); - - // `trim()` to make sure we don't add the statement if it's empty. - $filters = trim( $this->build_filter_statement( $range_from, $range_to ) ); - - $filter_statement = ''; - if ( ! empty( $filters ) ) { - $filter_statement = " - JOIN {$wpdb->usermeta} as um_table ON um_table.user_id = {$this->table}.ID - WHERE - {$filters} - AND um_table.meta_key = '{$wpdb->prefix}user_level' - AND um_table.meta_value > 0 - "; - } - - $query = " - SELECT - MIN({$this->range_field}) as min_range, - MAX({$this->range_field}) as max_range, - COUNT( {$this->range_field} ) as item_count - FROM - "; - - /** - * If `$limit` is not specified, we can directly use the table. - */ - if ( ! $limit ) { - $query .= " - {$this->table} - {$filter_statement} - "; - } else { - /** - * If there is `$limit` specified, we can't directly use `MIN/MAX()` as they don't work with `LIMIT`. - * That's why we will alter the query for this case. - */ - $limit = intval( $limit ); - - $query .= " - ( - SELECT - {$this->range_field} - FROM - {$this->table} - {$filter_statement} - ORDER BY - {$this->range_field} ASC - LIMIT {$limit} - ) as ids_query - "; - } - - // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared - $result = $wpdb->get_row( $query, ARRAY_A ); - - if ( ! $result || ! is_array( $result ) ) { - throw new Exception( 'Unable to get range edges' ); - } - - return $result; - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/replicastore/class-table-checksum.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/replicastore/class-table-checksum.php deleted file mode 100644 index 12216587..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/replicastore/class-table-checksum.php +++ /dev/null @@ -1,927 +0,0 @@ -salt = $salt; - - $this->default_tables = $this->get_default_tables(); - - $this->perform_text_conversion = $perform_text_conversion; - - // TODO change filters to allow the array format. - // TODO add get_fields or similar method to get things out of the table. - // TODO extract this configuration in a better way, still make it work with `$wpdb` names. - // TODO take over the replicastore functions and move them over to this class. - // TODO make the API work. - - $this->allowed_tables = apply_filters( 'jetpack_sync_checksum_allowed_tables', $this->default_tables ); - - $this->table = $this->validate_table_name( $table ); - $this->table_configuration = $this->allowed_tables[ $table ]; - - $this->prepare_fields( $this->table_configuration ); - - $this->prepare_additional_columns( $additional_columns ); - - // Run any callbacks to check if a table is enabled or not. - if ( - is_callable( $this->is_table_enabled_callback ) - && ! call_user_func( $this->is_table_enabled_callback, $table ) - ) { - throw new Exception( "Unable to use table name: $table" ); - } - } - - /** - * Get Default Table configurations. - * - * @return array - */ - protected function get_default_tables() { - global $wpdb; - - return array( - 'posts' => array( - 'table' => $wpdb->posts, - 'range_field' => 'ID', - 'key_fields' => array( 'ID' ), - 'checksum_fields' => array( 'post_modified_gmt' ), - 'filter_values' => Sync\Settings::get_disallowed_post_types_structured(), - 'is_table_enabled_callback' => function () { - return false !== Sync\Modules::get_module( 'posts' ); - }, - ), - 'postmeta' => array( - 'table' => $wpdb->postmeta, - 'range_field' => 'post_id', - 'key_fields' => array( 'post_id', 'meta_key' ), - 'checksum_text_fields' => array( 'meta_key', 'meta_value' ), - 'filter_values' => Sync\Settings::get_allowed_post_meta_structured(), - 'parent_table' => 'posts', - 'parent_join_field' => 'ID', - 'table_join_field' => 'post_id', - 'is_table_enabled_callback' => function () { - return false !== Sync\Modules::get_module( 'posts' ); - }, - ), - 'comments' => array( - 'table' => $wpdb->comments, - 'range_field' => 'comment_ID', - 'key_fields' => array( 'comment_ID' ), - 'checksum_fields' => array( 'comment_date_gmt' ), - 'filter_values' => array( - 'comment_type' => array( - 'operator' => 'IN', - 'values' => apply_filters( - 'jetpack_sync_whitelisted_comment_types', - array( '', 'comment', 'trackback', 'pingback', 'review' ) - ), - ), - 'comment_approved' => array( - 'operator' => 'NOT IN', - 'values' => array( 'spam' ), - ), - ), - 'is_table_enabled_callback' => function () { - return false !== Sync\Modules::get_module( 'comments' ); - }, - ), - 'commentmeta' => array( - 'table' => $wpdb->commentmeta, - 'range_field' => 'comment_id', - 'key_fields' => array( 'comment_id', 'meta_key' ), - 'checksum_text_fields' => array( 'meta_key', 'meta_value' ), - 'filter_values' => Sync\Settings::get_allowed_comment_meta_structured(), - 'parent_table' => 'comments', - 'parent_join_field' => 'comment_ID', - 'table_join_field' => 'comment_id', - 'is_table_enabled_callback' => function () { - return false !== Sync\Modules::get_module( 'comments' ); - }, - ), - 'terms' => array( - 'table' => $wpdb->terms, - 'range_field' => 'term_id', - 'key_fields' => array( 'term_id' ), - 'checksum_fields' => array( 'term_id' ), - 'checksum_text_fields' => array( 'name', 'slug' ), - 'parent_table' => 'term_taxonomy', - 'is_table_enabled_callback' => function () { - return false !== Sync\Modules::get_module( 'terms' ); - }, - ), - 'termmeta' => array( - 'table' => $wpdb->termmeta, - 'range_field' => 'term_id', - 'key_fields' => array( 'term_id', 'meta_key' ), - 'checksum_text_fields' => array( 'meta_key', 'meta_value' ), - 'parent_table' => 'term_taxonomy', - 'is_table_enabled_callback' => function () { - return false !== Sync\Modules::get_module( 'terms' ); - }, - ), - 'term_relationships' => array( - 'table' => $wpdb->term_relationships, - 'range_field' => 'object_id', - 'key_fields' => array( 'object_id' ), - 'checksum_fields' => array( 'object_id', 'term_taxonomy_id' ), - 'parent_table' => 'term_taxonomy', - 'parent_join_field' => 'term_taxonomy_id', - 'table_join_field' => 'term_taxonomy_id', - 'is_table_enabled_callback' => function () { - return false !== Sync\Modules::get_module( 'terms' ); - }, - ), - 'term_taxonomy' => array( - 'table' => $wpdb->term_taxonomy, - 'range_field' => 'term_taxonomy_id', - 'key_fields' => array( 'term_taxonomy_id' ), - 'checksum_fields' => array( 'term_taxonomy_id', 'term_id', 'parent' ), - 'checksum_text_fields' => array( 'taxonomy', 'description' ), - 'filter_values' => Sync\Settings::get_allowed_taxonomies_structured(), - 'is_table_enabled_callback' => function () { - return false !== Sync\Modules::get_module( 'terms' ); - }, - ), - 'links' => $wpdb->links, // TODO describe in the array format or add exceptions. - 'options' => $wpdb->options, // TODO describe in the array format or add exceptions. - 'woocommerce_order_items' => array( - 'table' => "{$wpdb->prefix}woocommerce_order_items", - 'range_field' => 'order_item_id', - 'key_fields' => array( 'order_item_id' ), - 'checksum_fields' => array( 'order_id' ), - 'checksum_text_fields' => array( 'order_item_name', 'order_item_type' ), - 'is_table_enabled_callback' => array( $this, 'enable_woocommerce_tables' ), - ), - 'woocommerce_order_itemmeta' => array( - 'table' => "{$wpdb->prefix}woocommerce_order_itemmeta", - 'range_field' => 'order_item_id', - 'key_fields' => array( 'order_item_id', 'meta_key' ), - 'checksum_text_fields' => array( 'meta_key', 'meta_value' ), - 'filter_values' => Sync\Settings::get_allowed_order_itemmeta_structured(), - 'parent_table' => 'woocommerce_order_items', - 'parent_join_field' => 'order_item_id', - 'table_join_field' => 'order_item_id', - 'is_table_enabled_callback' => array( $this, 'enable_woocommerce_tables' ), - ), - 'wc_orders' => array( - 'table' => "{$wpdb->prefix}wc_orders", - 'range_field' => 'id', - 'key_fields' => array( 'id' ), - 'checksum_text_fields' => array( 'type', 'status', 'payment_method_title' ), - 'filter_values' => array(), - 'is_table_enabled_callback' => array( $this, 'enable_woocommerce_tables' ), - ), - 'wc_order_addresses' => array( - 'table' => "{$wpdb->prefix}wc_order_addresses", - 'range_field' => 'order_id', - 'key_fields' => array( 'order_id', 'address_type' ), - 'checksum_text_fields' => array( 'address_type' ), - 'filter_values' => array(), - 'is_table_enabled_callback' => array( $this, 'enable_woocommerce_tables' ), - ), - 'wc_order_operational_data' => array( - 'table' => "{$wpdb->prefix}wc_order_operational_data", - 'range_field' => 'order_id', - 'key_fields' => array( 'order_id' ), - 'checksum_text_fields' => array( 'order_key', 'cart_hash' ), - 'filter_values' => array(), - 'is_table_enabled_callback' => array( $this, 'enable_woocommerce_tables' ), - ), - 'users' => array( - 'table' => $wpdb->users, - 'range_field' => 'ID', - 'key_fields' => array( 'ID' ), - 'checksum_text_fields' => array( 'user_login', 'user_nicename', 'user_email', 'user_url', 'user_registered', 'user_status', 'display_name' ), - 'filter_values' => array(), - 'is_table_enabled_callback' => function () { - return false !== Sync\Modules::get_module( 'users' ); - }, - ), - - /** - * Usermeta is a special table, as it needs to use a custom override flow, - * as the user roles, capabilities, locale, mime types can be filtered by plugins. - * This prevents us from doing a direct comparison in the database. - */ - 'usermeta' => array( - 'table' => $wpdb->users, - /** - * Range field points to ID, which in this case is the `WP_User` ID, - * since we're querying the whole WP_User objects, instead of meta entries in the DB. - */ - 'range_field' => 'ID', - 'key_fields' => array(), - 'checksum_fields' => array(), - 'is_table_enabled_callback' => function () { - return false !== Sync\Modules::get_module( 'users' ); - }, - ), - ); - } - - /** - * Prepare field params based off provided configuration. - * - * @param array $table_configuration The table configuration array. - */ - protected function prepare_fields( $table_configuration ) { - $this->key_fields = $table_configuration['key_fields']; - $this->range_field = $table_configuration['range_field']; - $this->checksum_fields = isset( $table_configuration['checksum_fields'] ) ? $table_configuration['checksum_fields'] : array(); - $this->checksum_text_fields = isset( $table_configuration['checksum_text_fields'] ) ? $table_configuration['checksum_text_fields'] : array(); - $this->filter_values = isset( $table_configuration['filter_values'] ) ? $table_configuration['filter_values'] : null; - $this->additional_filter_sql = ! empty( $table_configuration['filter_sql'] ) ? $table_configuration['filter_sql'] : ''; - $this->parent_table = isset( $table_configuration['parent_table'] ) ? $table_configuration['parent_table'] : null; - $this->parent_join_field = isset( $table_configuration['parent_join_field'] ) ? $table_configuration['parent_join_field'] : $table_configuration['range_field']; - $this->table_join_field = isset( $table_configuration['table_join_field'] ) ? $table_configuration['table_join_field'] : $table_configuration['range_field']; - $this->is_table_enabled_callback = isset( $table_configuration['is_table_enabled_callback'] ) ? $table_configuration['is_table_enabled_callback'] : false; - } - - /** - * Verify provided table name is valid for checksum processing. - * - * @param string $table Table name to validate. - * - * @return mixed|string - * @throws Exception Throw an exception on validation failure. - */ - protected function validate_table_name( $table ) { - if ( empty( $table ) ) { - throw new Exception( 'Invalid table name: empty' ); - } - - if ( ! array_key_exists( $table, $this->allowed_tables ) ) { - throw new Exception( "Invalid table name: $table not allowed" ); - } - - return $this->allowed_tables[ $table ]['table']; - } - - /** - * Verify provided fields are proper names. - * - * @param array $fields Array of field names to validate. - * - * @throws Exception Throw an exception on failure to validate. - */ - protected function validate_fields( $fields ) { - foreach ( $fields as $field ) { - if ( ! preg_match( '/^[0-9,a-z,A-Z$_]+$/i', $field ) ) { - throw new Exception( "Invalid field name: $field is not allowed" ); - } - - // TODO other verifications of the field names. - } - } - - /** - * Verify the fields exist in the table. - * - * @param array $fields Array of fields to validate. - * - * @return bool - * @throws Exception Throw an exception on failure to validate. - */ - protected function validate_fields_against_table( $fields ) { - global $wpdb; - - $valid_fields = array(); - - // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared - $result = $wpdb->get_results( "SHOW COLUMNS FROM {$this->table}", ARRAY_A ); - - foreach ( $result as $result_row ) { - $valid_fields[] = $result_row['Field']; - } - - // Check if the fields are actually contained in the table. - foreach ( $fields as $field_to_check ) { - if ( ! in_array( $field_to_check, $valid_fields, true ) ) { - throw new Exception( "Invalid field name: field '{$field_to_check}' doesn't exist in table {$this->table}" ); - } - } - - return true; - } - - /** - * Verify the configured fields. - * - * @throws Exception Throw an exception on failure to validate in the internal functions. - */ - protected function validate_input() { - $fields = array_merge( array( $this->range_field ), $this->key_fields, $this->checksum_fields, $this->checksum_text_fields ); - - $this->validate_fields( $fields ); - $this->validate_fields_against_table( $fields ); - } - - /** - * Prepare filter values as SQL statements to be added to the other filters. - * - * @param array $filter_values The filter values array. - * @param string $table_prefix If the values are going to be used in a sub-query, add a prefix with the table alias. - * - * @return array|null - */ - protected function prepare_filter_values_as_sql( $filter_values = array(), $table_prefix = '' ) { - global $wpdb; - - if ( ! is_array( $filter_values ) ) { - return null; - } - - $result = array(); - - foreach ( $filter_values as $field => $filter ) { - $key = ( ! empty( $table_prefix ) ? $table_prefix : $this->table ) . '.' . $field; - - switch ( $filter['operator'] ) { - case 'IN': - case 'NOT IN': - $filter_values_count = is_countable( $filter['values'] ) ? count( $filter['values'] ) : 0; - $values_placeholders = implode( ',', array_fill( 0, $filter_values_count, '%s' ) ); - $statement = "{$key} {$filter['operator']} ( $values_placeholders )"; - - // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared - $prepared_statement = $wpdb->prepare( $statement, $filter['values'] ); - - $result[] = $prepared_statement; - break; - } - } - - return $result; - } - - /** - * Build the filter query baased off range fields and values and the additional sql. - * - * @param int|null $range_from Start of the range. - * @param int|null $range_to End of the range. - * @param array|null $filter_values Additional filter values. Not used at the moment. - * @param string $table_prefix Table name to be prefixed to the columns. Used in sub-queries where columns can clash. - * - * @return string - */ - public function build_filter_statement( $range_from = null, $range_to = null, $filter_values = null, $table_prefix = '' ) { - global $wpdb; - - // If there is a field prefix that we want to use with table aliases. - $parent_prefix = ( ! empty( $table_prefix ) ? $table_prefix : $this->table ) . '.'; - - /** - * Prepare the ranges. - */ - - $filter_array = array( '1 = 1' ); - if ( null !== $range_from ) { - // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared - $filter_array[] = $wpdb->prepare( "{$parent_prefix}{$this->range_field} >= %d", array( intval( $range_from ) ) ); - } - if ( null !== $range_to ) { - // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared - $filter_array[] = $wpdb->prepare( "{$parent_prefix}{$this->range_field} <= %d", array( intval( $range_to ) ) ); - } - - /** - * End prepare the ranges. - */ - - /** - * Prepare data filters. - */ - - // Default filters. - if ( $this->filter_values ) { - $prepared_values_statements = $this->prepare_filter_values_as_sql( $this->filter_values, $table_prefix ); - if ( $prepared_values_statements ) { - $filter_array = array_merge( $filter_array, $prepared_values_statements ); - } - } - - // Additional filters. - if ( ! empty( $filter_values ) ) { - // Prepare filtering. - $prepared_values_statements = $this->prepare_filter_values_as_sql( $filter_values, $table_prefix ); - if ( $prepared_values_statements ) { - $filter_array = array_merge( $filter_array, $prepared_values_statements ); - } - } - - // Add any additional filters via direct SQL statement. - // Currently used only because we haven't converted all filtering to happen via `filter_values`. - // This SQL is NOT prefixed and column clashes can occur when used in sub-queries. - if ( $this->additional_filter_sql ) { - $filter_array[] = $this->additional_filter_sql; - } - - /** - * End prepare data filters. - */ - return implode( ' AND ', $filter_array ); - } - - /** - * Returns the checksum query. All validation of fields and configurations are expected to occur prior to usage. - * - * @param int|null $range_from The start of the range. - * @param int|null $range_to The end of the range. - * @param array|null $filter_values Additional filter values. Not used at the moment. - * @param bool $granular_result If the function should return a granular result. - * - * @return string - * - * @throws Exception Throws an exception if validation fails in the internal function calls. - */ - protected function build_checksum_query( $range_from = null, $range_to = null, $filter_values = null, $granular_result = false ) { - global $wpdb; - - // Escape the salt. - $salt = $wpdb->prepare( '%s', $this->salt ); - - // Prepare the compound key. - $key_fields = array(); - - // Prefix the fields with the table name, to avoid clashes in queries with sub-queries (e.g. meta tables). - foreach ( $this->key_fields as $field ) { - $key_fields[] = $this->table . '.' . $field; - } - - $key_fields = implode( ',', $key_fields ); - - // Prepare the checksum fields. - $checksum_fields = array(); - // Prefix the fields with the table name, to avoid clashes in queries with sub-queries (e.g. meta tables). - foreach ( $this->checksum_fields as $field ) { - $checksum_fields[] = $this->table . '.' . $field; - } - // Apply latin1 conversion if enabled. - if ( $this->perform_text_conversion ) { - // Convert text fields to allow for encoding discrepancies as WP.com is latin1. - foreach ( $this->checksum_text_fields as $field ) { - $checksum_fields[] = 'CONVERT(' . $this->table . '.' . $field . ' using latin1 )'; - } - } else { - // Conversion disabled, default to table prefixing. - foreach ( $this->checksum_text_fields as $field ) { - $checksum_fields[] = $this->table . '.' . $field; - } - } - - $checksum_fields_string = implode( ',', array_merge( $checksum_fields, array( $salt ) ) ); - - $additional_fields = ''; - if ( $granular_result ) { - // TODO uniq the fields as sometimes(most) range_index is the key and there's no need to select the same field twice. - $additional_fields = " - {$this->table}.{$this->range_field} as range_index, - {$key_fields}, - "; - } - - $filter_stamenet = $this->build_filter_statement( $range_from, $range_to, $filter_values ); - - $join_statement = ''; - if ( $this->parent_table ) { - $parent_table_obj = new Table_Checksum( $this->parent_table ); - $parent_filter_query = $parent_table_obj->build_filter_statement( null, null, null, 'parent_table' ); - - // It is possible to have the GROUP By cause multiple rows to be returned for the same row for term_taxonomy. - // To get distinct entries we use a correlatd subquery back on the parent table using the primary key. - $additional_unique_clause = ''; - if ( 'term_taxonomy' === $this->parent_table ) { - $additional_unique_clause = " - AND parent_table.{$parent_table_obj->range_field} = ( - SELECT min( parent_table_cs.{$parent_table_obj->range_field} ) - FROM {$parent_table_obj->table} as parent_table_cs - WHERE parent_table_cs.{$this->parent_join_field} = {$this->table}.{$this->table_join_field} - ) - "; - } - - $join_statement = " - INNER JOIN {$parent_table_obj->table} as parent_table - ON ( - {$this->table}.{$this->table_join_field} = parent_table.{$this->parent_join_field} - AND {$parent_filter_query} - $additional_unique_clause - ) - "; - } - - $query = " - SELECT - {$additional_fields} - SUM( - CRC32( - CONCAT_WS( '#', {$salt}, {$checksum_fields_string} ) - ) - ) AS checksum - FROM - {$this->table} - {$join_statement} - WHERE - {$filter_stamenet} - "; - - /** - * We need the GROUP BY only for compound keys. - */ - if ( $granular_result ) { - $query .= " - GROUP BY {$key_fields} - LIMIT 9999999 - "; - } - - return $query; - } - - /** - * Obtain the min-max values (edges) of the range. - * - * @param int|null $range_from The start of the range. - * @param int|null $range_to The end of the range. - * @param int|null $limit How many values to return. - * - * @return array|object|void - * @throws Exception Throws an exception if validation fails on the internal function calls. - */ - public function get_range_edges( $range_from = null, $range_to = null, $limit = null ) { - global $wpdb; - - $this->validate_fields( array( $this->range_field ) ); - - // Performance :: When getting the postmeta range we do not want to filter by the whitelist. - // The reason for this is that it leads to a non-performant query that can timeout. - // Instead lets get the range based on posts regardless of meta. - $filter_values = $this->filter_values; - if ( 'postmeta' === $this->table ) { - $this->filter_values = null; - } - - // `trim()` to make sure we don't add the statement if it's empty. - $filters = trim( $this->build_filter_statement( $range_from, $range_to ) ); - - // Reset Post meta filter. - if ( 'postmeta' === $this->table ) { - $this->filter_values = $filter_values; - } - - $filter_statement = ''; - if ( ! empty( $filters ) ) { - $filter_statement = " - WHERE - {$filters} - "; - } - - // Only make the distinct count when we know there can be multiple entries for the range column. - $distinct_count = ''; - if ( count( $this->key_fields ) > 1 || $wpdb->terms === $this->table || $wpdb->term_relationships === $this->table ) { - $distinct_count = 'DISTINCT'; - } - - $query = " - SELECT - MIN({$this->range_field}) as min_range, - MAX({$this->range_field}) as max_range, - COUNT( {$distinct_count} {$this->range_field}) as item_count - FROM - "; - - /** - * If `$limit` is not specified, we can directly use the table. - */ - if ( ! $limit ) { - $query .= " - {$this->table} - {$filter_statement} - "; - } else { - /** - * If there is `$limit` specified, we can't directly use `MIN/MAX()` as they don't work with `LIMIT`. - * That's why we will alter the query for this case. - */ - $limit = intval( $limit ); - - $query .= " - ( - SELECT - {$distinct_count} {$this->range_field} - FROM - {$this->table} - {$filter_statement} - ORDER BY - {$this->range_field} ASC - LIMIT {$limit} - ) as ids_query - "; - } - - // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared - $result = $wpdb->get_row( $query, ARRAY_A ); - - if ( ! $result || ! is_array( $result ) ) { - throw new Exception( 'Unable to get range edges' ); - } - - return $result; - } - - /** - * Update the results to have key/checksum format. - * - * @param array $results Prepare the results for output of granular results. - */ - protected function prepare_results_for_output( &$results ) { - // get the compound key. - // only return range and compound key for granular results. - - $return_value = array(); - - foreach ( $results as &$result ) { - // Working on reference to save memory here. - - $key = array(); - foreach ( $this->key_fields as $field ) { - $key[] = $result[ $field ]; - } - - $return_value[ implode( '-', $key ) ] = $result['checksum']; - } - - return $return_value; - } - - /** - * Calculate the checksum based on provided range and filters. - * - * @param int|null $range_from The start of the range. - * @param int|null $range_to The end of the range. - * @param array|null $filter_values Additional filter values. Not used at the moment. - * @param bool $granular_result If the returned result should be granular or only the checksum. - * @param bool $simple_return_value If we want to use a simple return value for non-granular results (return only the checksum, without wrappers). - * - * @return array|mixed|object|WP_Error|null - */ - public function calculate_checksum( $range_from = null, $range_to = null, $filter_values = null, $granular_result = false, $simple_return_value = true ) { - - if ( ! Sync\Settings::is_checksum_enabled() ) { - return new WP_Error( 'checksum_disabled', 'Checksums are currently disabled.' ); - } - - try { - $this->validate_input(); - } catch ( Exception $ex ) { - return new WP_Error( 'invalid_input', $ex->getMessage() ); - } - - $query = $this->build_checksum_query( $range_from, $range_to, $filter_values, $granular_result ); - - global $wpdb; - - if ( ! $granular_result ) { - // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared - $result = $wpdb->get_row( $query, ARRAY_A ); - - if ( ! is_array( $result ) ) { - return new WP_Error( 'invalid_query', "Result wasn't an array" ); - } - - if ( $simple_return_value ) { - return $result['checksum']; - } - - return array( - 'range' => $range_from . '-' . $range_to, - 'checksum' => $result['checksum'], - ); - } else { - // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared - $result = $wpdb->get_results( $query, ARRAY_A ); - return $this->prepare_results_for_output( $result ); - } - } - - /** - * Make sure the WooCommerce tables should be enabled for Checksum/Fix. - * - * @return bool - */ - protected function enable_woocommerce_tables() { - /** - * On WordPress.com, we can't directly check if the site has support for WooCommerce. - * Having the option to override the functionality here helps with syncing WooCommerce tables. - * - * @since 10.1 - * - * @param bool If we should we force-enable WooCommerce tables support. - */ - $force_woocommerce_support = apply_filters( 'jetpack_table_checksum_force_enable_woocommerce', false ); - - // If we're forcing WooCommerce tables support, there's no need to check further. - // This is used on WordPress.com. - if ( $force_woocommerce_support ) { - return true; - } - - // No need to proceed if WooCommerce is not available. - if ( ! class_exists( 'WooCommerce' ) ) { - return false; - } - - // TODO more checks if needed. Probably query the DB to make sure the tables exist. - - return true; - } - - /** - * Prepare and append custom columns to the list of columns that we run the checksum on. - * - * @param string|array $additional_columns List of additional columns. - * - * @return void - * @throws Exception When field validation fails. - */ - protected function prepare_additional_columns( $additional_columns ) { - /** - * No need to do anything if the parameter is not provided or empty. - */ - if ( empty( $additional_columns ) ) { - return; - } - - if ( ! is_array( $additional_columns ) ) { - if ( ! is_string( $additional_columns ) ) { - throw new Exception( 'Invalid value for additional fields' ); - } - - $additional_columns = explode( ',', $additional_columns ); - } - - /** - * Validate the fields. If any don't conform to the required norms, we will throw an exception and - * halt code here. - */ - $this->validate_fields( $additional_columns ); - - /** - * Assign the fields to the checksum_fields to be used in the checksum later. - * - * We're adding the fields to the rest of the `checksum_fields`, so we don't need - * to implement extra logic just for the additional fields. - */ - $this->checksum_fields = array_unique( - array_merge( - $this->checksum_fields, - $additional_columns - ) - ); - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/sync-queue/class-queue-storage-options.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/sync-queue/class-queue-storage-options.php deleted file mode 100644 index 73421389..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/sync-queue/class-queue-storage-options.php +++ /dev/null @@ -1,291 +0,0 @@ -queue_id = $queue_id; - } - - /** - * Insert an item in the queue. - * - * @param string $item_id The item ID. - * @param string $item Serialized item data. - * - * @return bool If the item was added. - */ - public function insert_item( $item_id, $item ) { - global $wpdb; - - // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared,WordPress.DB.DirectDatabaseQuery.NoCaching,WordPress.DB.DirectDatabaseQuery.DirectQuery - $rows_added = $wpdb->query( - $wpdb->prepare( - "INSERT INTO $wpdb->options (option_name, option_value, autoload) VALUES (%s, %s,%s)", - $item_id, - $item, - 'no' - ) - ); - - return ( 0 !== $rows_added ); - } - - /** - * Fetch items from the queue. - * - * @param int|null $item_count How many items to fetch from the queue. - * The parameter is null-able, if no limit on the amount of items. - * - * @return array|object|\stdClass[]|null - */ - public function fetch_items( $item_count ) { - global $wpdb; - - // TODO make it more simple for the $item_count - if ( $item_count ) { - // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared,WordPress.DB.DirectDatabaseQuery.NoCaching,WordPress.DB.DirectDatabaseQuery.DirectQuery - $items = $wpdb->get_results( - $wpdb->prepare( - "SELECT option_name AS id, option_value AS value FROM $wpdb->options WHERE option_name LIKE %s ORDER BY option_name ASC LIMIT %d", - "jpsq_{$this->queue_id}-%", - $item_count - ), - OBJECT - ); - } else { - // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared,WordPress.DB.DirectDatabaseQuery.NoCaching,WordPress.DB.DirectDatabaseQuery.DirectQuery - $items = $wpdb->get_results( - $wpdb->prepare( - "SELECT option_name AS id, option_value AS value FROM $wpdb->options WHERE option_name LIKE %s ORDER BY option_name ASC", - "jpsq_{$this->queue_id}-%" - ), - OBJECT - ); - } - - return $items; - } - - /** - * Fetches items with specific IDs from the Queue. - * - * @param array $items_ids Items IDs to fetch from the queue. - * - * @return \stdClass[]|null - */ - public function fetch_items_by_ids( $items_ids ) { - global $wpdb; - - // return early if $items_ids is empty or not an array. - if ( empty( $items_ids ) || ! is_array( $items_ids ) ) { - return array(); - } - - $ids_placeholders = implode( ', ', array_fill( 0, count( $items_ids ), '%s' ) ); - - $query_with_placeholders = "SELECT option_name AS id, option_value AS value - FROM $wpdb->options - WHERE option_name IN ( $ids_placeholders )"; - - // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared,WordPress.DB.DirectDatabaseQuery.NoCaching,WordPress.DB.DirectDatabaseQuery.DirectQuery - $items = $wpdb->get_results( - $wpdb->prepare( - $query_with_placeholders, // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared - $items_ids - ), - OBJECT - ); - - return $items; - } - - /** - * Clear out the queue. - * - * @return bool|int|\mysqli_result|resource|null - */ - public function clear_queue() { - global $wpdb; - - // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared,WordPress.DB.DirectDatabaseQuery.NoCaching,WordPress.DB.DirectDatabaseQuery.DirectQuery - return $wpdb->query( - $wpdb->prepare( - "DELETE FROM $wpdb->options WHERE option_name LIKE %s", - "jpsq_{$this->queue_id}-%" - ) - ); - } - - /** - * Check how many items are in the queue. - * - * @return int - */ - public function get_item_count() { - global $wpdb; - - // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared,WordPress.DB.DirectDatabaseQuery.NoCaching,WordPress.DB.DirectDatabaseQuery.DirectQuery - return (int) $wpdb->get_var( - $wpdb->prepare( - "SELECT count(*) FROM $wpdb->options WHERE option_name LIKE %s", - "jpsq_{$this->queue_id}-%" - ) - ); - } - - /** - * Return the lag amount for the queue. - * - * @param float|int|null $now A timestamp to use as starting point when calculating the lag. - * - * @return float|int The lag amount. - */ - public function get_lag( $now = null ) { - global $wpdb; - - // TODO replace with peek and a flag to fetch only the name. - // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared,WordPress.DB.DirectDatabaseQuery.NoCaching,WordPress.DB.DirectDatabaseQuery.DirectQuery - $first_item_name = $wpdb->get_var( - $wpdb->prepare( - "SELECT option_name FROM $wpdb->options WHERE option_name LIKE %s ORDER BY option_name ASC LIMIT 1", - "jpsq_{$this->queue_id}-%" - ) - ); - - if ( ! $first_item_name ) { - return 0; - } - - if ( null === $now ) { - $now = microtime( true ); - } - - // Break apart the item name to get the timestamp. - $matches = null; - if ( preg_match( '/^jpsq_' . $this->queue_id . '-(\d+\.\d+)-/', $first_item_name, $matches ) ) { - return $now - (float) $matches[1]; - } else { - return 0; - } - } - - /** - * Add multiple items to the queue at once. - * - * @param array $items Array of items to add. - * @param string $id_prefix Prefix to use for all the items. - * - * @return bool|int|\mysqli_result|resource|null - */ - public function add_all( $items, $id_prefix ) { - global $wpdb; - - $query = "INSERT INTO $wpdb->options (option_name, option_value, autoload) VALUES "; - - $rows = array(); - $count_items = count( $items ); - for ( $i = 0; $i < $count_items; ++$i ) { - // skip empty items. - if ( empty( $items[ $i ] ) ) { - continue; - } - try { - $option_name = esc_sql( $id_prefix . '-' . $i ); - $option_value = esc_sql( serialize( $items[ $i ] ) ); // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.serialize_serialize - $rows[] = "('$option_name', '$option_value', 'no')"; - } catch ( \Exception $e ) { - // Item cannot be serialized so skip. - continue; - } - } - - $rows_added = $wpdb->query( $query . implode( ',', $rows ) ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching - - return $rows_added; - } - - /** - * Return $max_count items from the queue, including their value string length. - * - * @param int $max_count How many items to fetch from the queue. - * - * @return \stdClass[]|null - */ - public function get_items_ids_with_size( $max_count ) { - global $wpdb; - - // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared,WordPress.DB.DirectDatabaseQuery.NoCaching,WordPress.DB.DirectDatabaseQuery.DirectQuery - return $wpdb->get_results( - $wpdb->prepare( - "SELECT option_name AS id, LENGTH(option_value) AS value_size FROM $wpdb->options WHERE option_name LIKE %s ORDER BY option_name ASC LIMIT %d", - "jpsq_{$this->queue_id}-%", - $max_count - ), - OBJECT - ); - } - - /** - * Delete items with specific IDs from the queue. - * - * @param array $ids IDs of the items to remove from the queue. - * - * @return bool|int|\mysqli_result|resource|null - */ - public function delete_items_by_ids( $ids ) { - global $wpdb; - - if ( ! is_array( $ids ) || empty( $ids ) ) { - return false; - } - - // TODO check if it's working properly - no need to delete all options in the table if the params are not right - $ids_placeholders = implode( ', ', array_fill( 0, count( $ids ), '%s' ) ); - - // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared,WordPress.DB.DirectDatabaseQuery.NoCaching,WordPress.DB.DirectDatabaseQuery.DirectQuery - return $wpdb->query( - $wpdb->prepare( - /** - * Ignoring the linting warning, as there's still no placeholder replacement for DB field name, - * in this case this is `$ids_placeholders`, as we're preparing them above and are a dynamic count. - */ - // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared,WordPress.DB.DirectDatabaseQuery.NoCaching,WordPress.DB.DirectDatabaseQuery.DirectQuery,WordPress.DB.PreparedSQLPlaceholders.UnfinishedPrepare - "DELETE FROM {$wpdb->options} WHERE option_name IN ( $ids_placeholders )", - $ids - ) - ); - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/sync-queue/class-queue-storage-table.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/sync-queue/class-queue-storage-table.php deleted file mode 100644 index 09089f65..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/sync-queue/class-queue-storage-table.php +++ /dev/null @@ -1,663 +0,0 @@ -queue_id = $queue_id; - - // Initialize the `table_name` property with the correct prefix for easier usage in the class. - $this->table_name = $wpdb->prefix . $this->table_name_no_prefix; - } - - /** - * Creates the new table and updates the options to work with - * the new table if it was created successfully. - * - * @return void - */ - protected function create_table() { - global $wpdb; - - require_once ABSPATH . '/wp-admin/includes/upgrade.php'; - - $charset_collate = $wpdb->get_charset_collate(); - - $table_definition = "CREATE TABLE {$this->table_name} ( - `ID` bigint(20) NOT NULL AUTO_INCREMENT, - `queue_id` varchar(50) NOT NULL, - `event_id` varchar(100) NOT NULL, - `event_payload` longtext NOT NULL, - `timestamp` timestamp NOT NULL DEFAULT current_timestamp(), - PRIMARY KEY (`ID`), - KEY `event_id` (`event_id`), - KEY `queue_id` (`queue_id`), - KEY `queue_id_event_id` (queue_id, event_id), - KEY `timestamp` (`timestamp`) - ) $charset_collate;"; - - /** - * The function dbDelta will only return the differences. If the table exists, the result will be empty, - * so let's run a check afterward to see if the table exists and is healthy. - */ - \dbDelta( $table_definition ); - } - - /** - * Check if the Custom table actually exists. - * - * @return bool - */ - protected function custom_table_exists() { - global $wpdb; - - // Check if the table exists - // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery,WordPress.DB.DirectDatabaseQuery.NoCaching,WordPress.DB.PreparedSQL.InterpolatedNotPrepared - $result = $wpdb->get_row( - $wpdb->prepare( 'SHOW TABLES LIKE %s', $this->table_name ), - ARRAY_N - ); - - if ( empty( $result ) || count( $result ) !== 1 || $result[0] !== $this->table_name ) { - return false; - } - - return true; - } - /** - * Check if the table is healthy, and we can read and write from/to it. - * - * @return true|\WP_Error If the custom table is available, and we can read and write from/to it. - */ - protected function is_custom_table_healthy() { - global $wpdb; - - if ( ! $this->custom_table_exists() ) { - return new \WP_Error( 'custom_table_not_exist', 'Jetpack Sync Custom table: Table does not exist' ); - } - - // Try to read from the table - - // Ignore the interpolated table name - // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery,WordPress.DB.DirectDatabaseQuery.NoCaching,WordPress.DB.PreparedSQL.InterpolatedNotPrepared - $query = $wpdb->query( "SELECT count(`ID`) FROM {$this->table_name}" ); - - if ( $query === false ) { - // The query failed to select anything from the table, so there must be an issue reading from it. - return new \WP_Error( 'custom_table_unable_to_read', 'Jetpack Sync Custom table: Unable to read from table' ); - } - - if ( $wpdb->last_error ) { - // There was an error reading, that's not necessarily failing the query. - // TODO check if we need this error check. - // TODO add more information about the erorr in the return value. - return new \WP_Error( 'custom_table_unable_to_read_sql_error', 'Jetpack Sync Custom table: Unable to read from table - SQL error' ); - } - - // Check if we can write in the table - if ( ! $this->insert_item( 'test', 'test' ) ) { - return new \WP_Error( 'custom_table_unable_to_writeread', 'Jetpack Sync Custom table: Unable to write into table' ); - } - - // See if we can read the item back - $items = $this->fetch_items_by_ids( array( 'test' ) ); - if ( empty( $items ) || ! is_object( $items[0] ) || $items[0]->value !== 'test' ) { - return new \WP_Error( 'custom_table_unable_to_writeread', 'Jetpack Sync Custom table: Unable to read item after writing' ); - } - - // Try to insert an item, read it back and then delete it. - $this->delete_items_by_ids( array( 'test' ) ); - - // Try to fetch the item back. It should not exist. - $items = $this->fetch_items_by_ids( array( 'test' ) ); - if ( ! empty( $items ) ) { - return new \WP_Error( 'custom_table_unable_to_writeread', 'Jetpack Sync Custom table: Unable to delete from table' ); - } - - return true; - } - - /** - * Drop the custom table as part of cleanup. - * - * @return bool If the table is cleared. - */ - public function drop_table() { - global $wpdb; - - if ( $this->custom_table_exists() ) { - // Ignoring the linting warning, as there's still no placeholder replacement for DB field name. - // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery,WordPress.DB.DirectDatabaseQuery.NoCaching,WordPress.DB.PreparedSQL.InterpolatedNotPrepared,WordPress.DB.DirectDatabaseQuery.SchemaChange - return (bool) $wpdb->query( "DROP TABLE {$this->table_name}" ); - } - } - - /** - * Queue API implementation - */ - - /** - * Insert an item in the queue. - * - * @param string $item_id The item ID. - * @param string $item Serialized item data. - * - * @return bool If the item was added. - */ - public function insert_item( $item_id, $item ) { - global $wpdb; - - // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery,WordPress.DB.DirectDatabaseQuery.NoCaching,WordPress.DB.PreparedSQL.InterpolatedNotPrepared - $rows_added = $wpdb->query( - $wpdb->prepare( - /** - * Ignoring the linting warning, as there's still no placeholder replacement for DB field name, - * in this case this is `$this->table_name` - */ - // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared - "INSERT INTO {$this->table_name} (queue_id, event_id, event_payload) VALUES (%s, %s,%s)", - $this->queue_id, - $item_id, - $item - ) - ); - - return ( 0 !== $rows_added ); - } - - /** - * Fetch items from the queue. - * - * @param int|null $item_count How many items to fetch from the queue. - * The parameter is null-able, if no limit on the amount of items. - * - * @return array|object|stdClass[]|null - */ - public function fetch_items( $item_count ) { - global $wpdb; - - /** - * Ignoring the linting warning, as there's still no placeholder replacement for DB field name, - * in this case this is `$this->table_name` - */ - // phpcs:disable WordPress.DB.PreparedSQL.InterpolatedNotPrepared - - // TODO make it more simple for the $item_count - if ( $item_count ) { - // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery,WordPress.DB.DirectDatabaseQuery.NoCaching,WordPress.DB.PreparedSQL.InterpolatedNotPrepared - $items = $wpdb->get_results( - $wpdb->prepare( - " - SELECT - event_id AS id, - event_payload AS value - FROM {$this->table_name} - WHERE queue_id LIKE %s - ORDER BY event_id ASC - LIMIT %d - ", - $this->queue_id, - $item_count - ) - ); - } else { - // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery,WordPress.DB.DirectDatabaseQuery.NoCaching,WordPress.DB.PreparedSQL.InterpolatedNotPrepared - $items = $wpdb->get_results( - $wpdb->prepare( - " - SELECT - event_id AS id, - event_payload AS value - FROM {$this->table_name} - WHERE queue_id LIKE %s - ORDER BY event_id ASC - ", - $this->queue_id - ) - ); - } - - // phpcs:enable WordPress.DB.PreparedSQL.InterpolatedNotPrepared - - return $items; - } - - /** - * Fetches items with specific IDs from the Queue. - * - * @param array $items_ids Items IDs to fetch from the queue. - * - * @return array|object|stdClass[]|null - */ - public function fetch_items_by_ids( $items_ids ) { - global $wpdb; - - // return early if $items_ids is empty or not an array. - if ( empty( $items_ids ) || ! is_array( $items_ids ) ) { - return array(); - } - - $ids_placeholders = implode( ', ', array_fill( 0, count( $items_ids ), '%s' ) ); - $query_with_placeholders = "SELECT event_id AS id, event_payload AS value - FROM {$this->table_name} - WHERE queue_id = %s AND event_id IN ( $ids_placeholders )"; - - $replacement_values = array_merge( array( $this->queue_id ), $items_ids ); - - // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery,WordPress.DB.DirectDatabaseQuery.NoCaching,WordPress.DB.PreparedSQL.InterpolatedNotPrepared - $items = $wpdb->get_results( - $wpdb->prepare( - $query_with_placeholders, // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared - $replacement_values - ), - OBJECT - ); - - return $items; - } - - /** - * Check how many items are in the queue. - * - * @return int - */ - public function get_item_count() { - global $wpdb; - - // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery,WordPress.DB.DirectDatabaseQuery.NoCaching,WordPress.DB.PreparedSQL.InterpolatedNotPrepared - return (int) $wpdb->get_var( - $wpdb->prepare( - /** - * Ignoring the linting warning, as there's still no placeholder replacement for DB field name, - * in this case this is `$this->table_name` - */ - // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared - "SELECT count(*) FROM {$this->table_name} WHERE queue_id = %s", - $this->queue_id - ) - ); - } - - /** - * Clear out the queue. - * - * @return bool|int|\mysqli_result|resource|null - */ - public function clear_queue() { - global $wpdb; - - // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery,WordPress.DB.DirectDatabaseQuery.NoCaching,WordPress.DB.PreparedSQL.InterpolatedNotPrepared - return $wpdb->query( - $wpdb->prepare( - /** - * Ignoring the linting warning, as there's still no placeholder replacement for DB field name, - * in this case this is `$this->table_name` - */ - // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared - "DELETE FROM {$this->table_name} WHERE queue_id = %s", - $this->queue_id - ) - ); - } - - /** - * Return the lag amount for the queue. - * - * @param float|int|null $now A timestamp to use as starting point when calculating the lag. - * - * @return float|int The lag amount. - */ - public function get_lag( $now = null ) { - global $wpdb; - - // TODO replace with peek and a flag to fetch only the name. - // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery,WordPress.DB.DirectDatabaseQuery.NoCaching,WordPress.DB.PreparedSQL.InterpolatedNotPrepared - $first_item_name = $wpdb->get_var( - $wpdb->prepare( - /** - * Ignoring the linting warning, as there's still no placeholder replacement for DB field name, - * in this case this is `$this->table_name` - */ - // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared - "SELECT event_id FROM {$this->table_name} WHERE queue_id = %s ORDER BY event_id ASC LIMIT 1", - $this->queue_id - ) - ); - - if ( ! $first_item_name ) { - return 0; - } - - if ( null === $now ) { - $now = microtime( true ); - } - - // Break apart the item name to get the timestamp. - $matches = null; - if ( preg_match( '/^jpsq_' . $this->queue_id . '-(\d+\.\d+)-/', $first_item_name, $matches ) ) { - return $now - (float) $matches[1]; - } else { - return 0; - } - } - - /** - * Add multiple items to the queue at once. - * - * @param array $items Array of items to add. - * @param string $id_prefix Prefix to use for all the items. - * - * @return bool|int|\mysqli_result|resource|null - */ - public function add_all( $items, $id_prefix ) { - global $wpdb; - - $query = "INSERT INTO {$this->table_name} (queue_id, event_id, event_payload ) VALUES "; - - $rows = array(); - $count_items = count( $items ); - for ( $i = 0; $i < $count_items; ++$i ) { - // skip empty items. - if ( empty( $items[ $i ] ) ) { - continue; - } - try { - $event_id = esc_sql( $id_prefix . '-' . $i ); - $event_payload = esc_sql( serialize( $items[ $i ] ) ); // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.serialize_serialize - $rows[] = "('{$this->queue_id}', '$event_id','$event_payload')"; - } catch ( \Exception $e ) { - // Item cannot be serialized so skip. - continue; - } - } - - $rows_added = $wpdb->query( $query . implode( ',', $rows ) ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching - - return $rows_added; - } - - /** - * Return $max_count items from the queue, including their value string length. - * - * @param int $max_count How many items to fetch from the queue. - * - * @return array|object|stdClass[]|null - */ - public function get_items_ids_with_size( $max_count ) { - global $wpdb; - - // TODO optimize the fetch to happen by queue name not by the IDs as it can be issue cross-queues. - // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery,WordPress.DB.DirectDatabaseQuery.NoCaching,WordPress.DB.PreparedSQL.InterpolatedNotPrepared - return $wpdb->get_results( - $wpdb->prepare( - /** - * Ignoring the linting warning, as there's still no placeholder replacement for DB field name, - * in this case this is `$this->table_name` - */ - // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared - "SELECT event_id AS id, LENGTH( event_payload ) AS value_size FROM {$this->table_name} WHERE queue_id = %s ORDER BY event_id ASC LIMIT %d", - $this->queue_id, - $max_count - ), - OBJECT - ); - } - - /** - * Delete items with specific IDs from the queue. - * - * @param array $ids IDs of the items to remove from the queue. - * - * @return bool|int|\mysqli_result|resource|null - */ - public function delete_items_by_ids( $ids ) { - global $wpdb; - $ids_placeholders = implode( ', ', array_fill( 0, count( $ids ), '%s' ) ); - - // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery,WordPress.DB.DirectDatabaseQuery.NoCaching,WordPress.DB.PreparedSQL.InterpolatedNotPrepared - return $wpdb->query( - $wpdb->prepare( - /** - * Ignoring the linting warning, as there's still no placeholder replacement for DB field name, - * in this case this is `$this->table_name` - */ - // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared - "DELETE FROM {$this->table_name} WHERE queue_id = %s AND event_id IN ( $ids_placeholders )", - array_merge( array( $this->queue_id ), $ids ) - ) - ); - } - - /** - * Table initialization - */ - public static function initialize_custom_sync_table() { - /** - * Initialize an instance of the class with a test name, so we can use table prefix and then test if the table is healthy. - */ - $custom_table_instance = new Queue_Storage_Table( 'test_queue' ); - - // Check if the table exists - if ( ! $custom_table_instance->custom_table_exists() ) { - $custom_table_instance->create_table(); - } - - return $custom_table_instance->is_custom_table_healthy(); - } - - /** - * Migrates the existing Sync events from the options table to the Custom table - * - * @return bool - */ - public static function migrate_from_options_table_to_custom_table() { - global $wpdb; - - // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery,WordPress.DB.DirectDatabaseQuery.NoCaching - $count_result = $wpdb->get_row( - " - SELECT - COUNT(*) as item_count - FROM - {$wpdb->options} - WHERE - option_name LIKE 'jpsq_%' - " - ); - - $item_count = $count_result->item_count; - - $limit = 100; - $offset = 0; - - do { - // get all the records from the options table - $query = " - SELECT - option_name as event_id, - option_value as event_payload - FROM - {$wpdb->options} - WHERE - option_name LIKE 'jpsq_%' - ORDER BY - option_name ASC - LIMIT $offset, $limit - "; - - // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery,WordPress.DB.DirectDatabaseQuery.NoCaching,WordPress.DB.PreparedSQL.NotPrepared - $rows = $wpdb->get_results( $query ); - - $insert_rows = array(); - - foreach ( $rows as $event ) { - $event_id = $event->event_id; - - // Parse the event - if ( - preg_match( - '!jpsq_(?P[^-]+)-(?P[^-]+)-.+!', - $event_id, - $events_matches - ) - ) { - $queue_id = $events_matches['queue_id']; - $timestamp = $events_matches['timestamp']; - - $insert_rows[] = $wpdb->prepare( - '(%s, %s, %s, %s)', - array( - $queue_id, - $event_id, - $event->event_payload, - (int) $timestamp, - ) - ); - } - } - - // Instantiate table storage, so we can get the table name. Queue ID is just a placeholder here. - $queue_table_storage = new Queue_Storage_Table( 'test_queue' ); - - if ( ! empty( $insert_rows ) ) { - $insert_query = 'INSERT INTO ' . $queue_table_storage->table_name . ' (queue_id, event_id, event_payload, timestamp) VALUES '; - - $insert_query .= implode( ',', $insert_rows ); - - // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery,WordPress.DB.DirectDatabaseQuery.NoCaching,WordPress.DB.PreparedSQL.NotPrepared - $wpdb->query( $insert_query ); - } - - $offset += $limit; - } while ( $offset < $item_count ); - - // Clear out the options queue - // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery,WordPress.DB.DirectDatabaseQuery.NoCaching,WordPress.DB.PreparedSQL.NotPrepared - $wpdb->query( - $wpdb->prepare( - "DELETE FROM $wpdb->options WHERE option_name LIKE %s", - 'jpsq_%-%' - ) - ); - - return true; - } - - /** - * Migrates the existing Sync events from the Custom table to the Options table - * - * @return void - */ - public static function migrate_from_custom_table_to_options_table() { - global $wpdb; - - // Instantiate table storage, so we can get the table name. Queue ID is just a placeholder here. - $queue_table_storage = new Queue_Storage_Table( 'test_queue' ); - $custom_table_name = $queue_table_storage->table_name; - - // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery,WordPress.DB.DirectDatabaseQuery.NoCaching,WordPress.DB.PreparedSQL.InterpolatedNotPrepared - $count_result = $wpdb->get_row( "SELECT COUNT(*) as item_count FROM {$custom_table_name}" ); - - $item_count = $count_result->item_count; - - $limit = 100; - $offset = 0; - - do { - // get all the records from the options table - $query = " - SELECT - event_id, - event_payload - FROM - {$custom_table_name} - ORDER BY - event_id ASC - LIMIT $offset, $limit - "; - - // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery,WordPress.DB.DirectDatabaseQuery.NoCaching,WordPress.DB.PreparedSQL.NotPrepared - $rows = $wpdb->get_results( $query ); - - $insert_rows = array(); - - foreach ( $rows as $event ) { - $insert_rows[] = $wpdb->prepare( - '(%s, %s, "no")', - array( - $event->event_id, - $event->event_payload, - ) - ); - } - - if ( ! empty( $insert_rows ) ) { - $insert_query = "INSERT INTO {$wpdb->options} (option_name, option_value, autoload) VALUES "; - - $insert_query .= implode( ',', $insert_rows ); - - // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery,WordPress.DB.DirectDatabaseQuery.NoCaching,WordPress.DB.PreparedSQL.NotPrepared - $wpdb->query( $insert_query ); - } - - $offset += $limit; - } while ( $offset < $item_count ); - - // Clear the custom table - // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery,WordPress.DB.DirectDatabaseQuery.NoCaching,WordPress.DB.PreparedSQL.InterpolatedNotPrepared - $wpdb->query( "DELETE FROM {$custom_table_name}" ); - - // TODO should we drop the table here instead? - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-transport-helper/CHANGELOG.md b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-transport-helper/CHANGELOG.md deleted file mode 100644 index beaa2058..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-transport-helper/CHANGELOG.md +++ /dev/null @@ -1,70 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file. - -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) -and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - -## [0.2.2] - 2024-03-19 -### Fixed -- Handle upgrades from plugins embedding version 0.2.0 of the package. [#36440] - -## [0.2.1] - 2024-03-14 -### Added -- Increasing backup version for new endpoint [#35649] - -### Fixed -- Write helper script to ABSPATH by default, just like we did before [#35508] - -## [0.2.0] - 2024-01-18 -### Changed -- The package now requires PHP >= 7.0. [#34192] - -### Fixed -- Backup: Add namespace versioning to Helper_Script_Manager and other classes. [#34739] -- Backup: Bug fixes in helper script installation class. [#34297] - -## [0.1.6] - 2023-10-19 -### Changed -- Updated package dependencies. [#32605] - -### Fixed -- Fix helper script upload for sites without direct file system access. [#32102] - -## [0.1.5] - 2023-07-06 -### Added -- Add Jetpack Autoloader package suggestion. [#29988] - -## [0.1.4] - 2023-03-29 -### Changed -- Minor internal updates. - -## [0.1.3] - 2023-01-25 -### Changed -- Use `WP_Filesystem` more consistently in `Helper_Script_Manager`. [#28198] - -## [0.1.2] - 2022-12-05 -### Changed -- Updated package dependencies. [#27688] - -## [0.1.1] - 2022-11-30 -### Changed -- Updated package dependencies. [#27043] - -## 0.1.0 - 2022-11-01 -### Added -- Adding the initial empty package -- Duplicate helper script code to a dedicated package - -### Changed -- Updated package dependencies. - -[0.2.2]: https://github.com/Automattic/jetpack-transport-helper/compare/v0.2.1...v0.2.2 -[0.2.1]: https://github.com/Automattic/jetpack-transport-helper/compare/v0.2.0...v0.2.1 -[0.2.0]: https://github.com/Automattic/jetpack-transport-helper/compare/v0.1.6...v0.2.0 -[0.1.6]: https://github.com/Automattic/jetpack-transport-helper/compare/v0.1.5...v0.1.6 -[0.1.5]: https://github.com/Automattic/jetpack-transport-helper/compare/v0.1.4...v0.1.5 -[0.1.4]: https://github.com/Automattic/jetpack-transport-helper/compare/v0.1.3...v0.1.4 -[0.1.3]: https://github.com/Automattic/jetpack-transport-helper/compare/v0.1.2...v0.1.3 -[0.1.2]: https://github.com/Automattic/jetpack-transport-helper/compare/v0.1.1...v0.1.2 -[0.1.1]: https://github.com/Automattic/jetpack-transport-helper/compare/v0.1.0...v0.1.1 diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-transport-helper/LICENSE.txt b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-transport-helper/LICENSE.txt deleted file mode 100644 index e82774c1..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-transport-helper/LICENSE.txt +++ /dev/null @@ -1,357 +0,0 @@ -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - - -=================================== - - -GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - -Copyright (C) 1989, 1991 Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -Everyone is permitted to copy and distribute verbatim copies -of this license document, but changing it is not allowed. - - Preamble - -The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Lesser General Public License instead.) You can apply it to -your programs, too. - -When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - -To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - -For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - -We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - -Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - -Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - -The precise terms and conditions for copying, distribution and -modification follow. - -GNU GENERAL PUBLIC LICENSE -TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - -0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - -1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - -2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - -a) You must cause the modified files to carry prominent notices -stating that you changed the files and the date of any change. - -b) You must cause any work that you distribute or publish, that in -whole or in part contains or is derived from the Program or any -part thereof, to be licensed as a whole at no charge to all third -parties under the terms of this License. - -c) If the modified program normally reads commands interactively -when run, you must cause it, when started running for such -interactive use in the most ordinary way, to print or display an -announcement including an appropriate copyright notice and a -notice that there is no warranty (or else, saying that you provide -a warranty) and that users may redistribute the program under -these conditions, and telling the user how to view a copy of this -License. (Exception: if the Program itself is interactive but -does not normally print such an announcement, your work based on -the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - -3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - -a) Accompany it with the complete corresponding machine-readable -source code, which must be distributed under the terms of Sections -1 and 2 above on a medium customarily used for software interchange; or, - -b) Accompany it with a written offer, valid for at least three -years, to give any third party, for a charge no more than your -cost of physically performing source distribution, a complete -machine-readable copy of the corresponding source code, to be -distributed under the terms of Sections 1 and 2 above on a medium -customarily used for software interchange; or, - -c) Accompany it with the information you received as to the offer -to distribute corresponding source code. (This alternative is -allowed only for noncommercial distribution and only if you -received the program in object code or executable form with such -an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - -4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - -5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - -6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - -7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - -8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - -9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - -10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - -11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - -12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - -How to Apply These Terms to Your New Programs - -If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - -To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - -Copyright (C) - -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along -with this program; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - -Gnomovision version 69, Copyright (C) year name of author -Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. -This is free software, and you are welcome to redistribute it -under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - -Yoyodyne, Inc., hereby disclaims all copyright interest in the program -`Gnomovision' (which makes passes at compilers) written by James Hacker. - -, 1 April 1989 -Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-transport-helper/SECURITY.md b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-transport-helper/SECURITY.md deleted file mode 100644 index 98f48dd1..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-transport-helper/SECURITY.md +++ /dev/null @@ -1,47 +0,0 @@ -# Security Policy - -Full details of the Automattic Security Policy can be found on [automattic.com](https://automattic.com/security/). - -## Supported Versions - -Generally, only the latest version of Jetpack and its associated plugins have continued support. If a critical vulnerability is found in the current version of a plugin, we may opt to backport any patches to previous versions. - -## Reporting a Vulnerability - -Our HackerOne program covers the below plugin software, as well as a variety of related projects and infrastructure: - -* [Jetpack](https://jetpack.com/) -* Jetpack Backup -* Jetpack Boost -* Jetpack CRM -* Jetpack Protect -* Jetpack Search -* Jetpack Social -* Jetpack VideoPress - -**For responsible disclosure of security issues and to be eligible for our bug bounty program, please submit your report via the [HackerOne](https://hackerone.com/automattic) portal.** - -Our most critical targets are: - -* Jetpack and the Jetpack composer packages (all within this repo) -* Jetpack.com -- the primary marketing site. -* cloud.jetpack.com -- a management site. -* wordpress.com -- the shared management site for both Jetpack and WordPress.com sites. - -For more targets, see the `In Scope` section on [HackerOne](https://hackerone.com/automattic). - -_Please note that the **WordPress software is a separate entity** from Automattic. Please report vulnerabilities for WordPress through [the WordPress Foundation's HackerOne page](https://hackerone.com/wordpress)._ - -## Guidelines - -We're committed to working with security researchers to resolve the vulnerabilities they discover. You can help us by following these guidelines: - -* Follow [HackerOne's disclosure guidelines](https://www.hackerone.com/disclosure-guidelines). -* Pen-testing Production: - * Please **setup a local environment** instead whenever possible. Most of our code is open source (see above). - * If that's not possible, **limit any data access/modification** to the bare minimum necessary to reproduce a PoC. - * **_Don't_ automate form submissions!** That's very annoying for us, because it adds extra work for the volunteers who manage those systems, and reduces the signal/noise ratio in our communication channels. - * To be eligible for a bounty, all of these guidelines must be followed. -* Be Patient - Give us a reasonable time to correct the issue before you disclose the vulnerability. - -We also expect you to comply with all applicable laws. You're responsible to pay any taxes associated with your bounties. diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-transport-helper/actions.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-transport-helper/actions.php deleted file mode 100644 index e5d0c355..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-transport-helper/actions.php +++ /dev/null @@ -1,32 +0,0 @@ - $accepted_args, - 'function' => $cb, - ); - }; - $add_action = $add_filter; -} - -// Clean up expired Jetpack Helper Scripts from a scheduled event. -$add_action( 'jetpack_cleanup_helper_scripts', array( 'Automattic\\Jetpack\\Backup\\V0003\\Helper_Script_Manager', 'cleanup_expired_helper_scripts' ) ); - -// Register REST routes. -$add_action( 'rest_api_init', array( 'Automattic\\Jetpack\\Transport_Helper\\V0003\\REST_Controller', 'register_rest_routes' ) ); - -// Set up package version hook. -$add_filter( 'jetpack_package_versions', 'Automattic\\Jetpack\\Transport_Helper\\Package_Version::send_package_version_to_tracker' ); diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-transport-helper/composer.json b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-transport-helper/composer.json deleted file mode 100644 index d643df35..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-transport-helper/composer.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "name": "automattic/jetpack-transport-helper", - "description": "Package to help transport server communication", - "type": "jetpack-library", - "license": "GPL-2.0-or-later", - "require": { - "php": ">=7.0", - "automattic/jetpack-backup-helper-script-manager": "^0.2.3", - "automattic/jetpack-connection": "^2.4.1" - }, - "require-dev": { - "yoast/phpunit-polyfills": "1.1.0", - "automattic/jetpack-changelogger": "^4.1.1", - "automattic/wordbless": "dev-master" - }, - "suggest": { - "automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package." - }, - "autoload": { - "files": [ - "actions.php" - ], - "classmap": [ - "src/" - ] - }, - "scripts": { - "phpunit": [ - "./vendor/phpunit/phpunit/phpunit --colors=always" - ], - "test-php": [ - "@composer phpunit" - ], - "build-production": "echo 'Add your build step to composer.json, please!'", - "build-development": "echo 'Add your build step to composer.json, please!'", - "post-install-cmd": "WorDBless\\Composer\\InstallDropin::copy", - "post-update-cmd": "WorDBless\\Composer\\InstallDropin::copy" - }, - "minimum-stability": "dev", - "prefer-stable": true, - "extra": { - "mirror-repo": "Automattic/jetpack-transport-helper", - "version-constants": { - "::PACKAGE_VERSION": "src/class-package-version.php" - }, - "changelogger": { - "link-template": "https://github.com/Automattic/jetpack-transport-helper/compare/v${old}...v${new}" - }, - "autotagger": true, - "branch-alias": { - "dev-trunk": "0.2.x-dev" - }, - "textdomain": "jetpack-transport-helper" - }, - "config": { - "allow-plugins": { - "roots/wordpress-core-installer": true - } - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-transport-helper/src/class-package-version-compat.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-transport-helper/src/class-package-version-compat.php deleted file mode 100644 index c14ec470..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-transport-helper/src/class-package-version-compat.php +++ /dev/null @@ -1,25 +0,0 @@ - WP_REST_Server::CREATABLE, - 'callback' => __CLASS__ . '::install_helper_script', - 'permission_callback' => __CLASS__ . '::helper_script_permissions_callback', - 'args' => array( - 'helper' => array( - 'description' => __( 'base64 encoded Helper Script body.', 'jetpack-transport-helper' ), - 'type' => 'string', - 'required' => true, - ), - ), - ) - ); - - // Delete a Helper Script. - register_rest_route( - 'jetpack/v4', - // This route can be generalized once we no longer depend on the backup package - '/backup-helper-script', - array( - 'methods' => WP_REST_Server::DELETABLE, - 'callback' => __CLASS__ . '::delete_helper_script', - 'permission_callback' => __CLASS__ . '::helper_script_permissions_callback', - 'args' => array( - 'path' => array( - 'description' => __( 'Path to Helper Script', 'jetpack-transport-helper' ), - 'type' => 'string', - 'required' => true, - ), - ), - ) - ); - } - - /** - * The Jetpack endpoints should only be available via site-level authentication. - * This means that the corresponding endpoints can only be accessible from WPCOM. - * - * @access public - * @static - * - * @return bool|WP_Error True if a blog token was used to sign the request, WP_Error otherwise. - */ - public static function helper_script_permissions_callback() { - if ( Rest_Authentication::is_signed_with_blog_token() ) { - return true; - } - - $error_msg = esc_html__( - 'You are not allowed to perform this action.', - 'jetpack-transport-helper' - ); - - return new WP_Error( 'rest_forbidden', $error_msg, array( 'status' => rest_authorization_required_code() ) ); - } - - /** - * Install the Helper Script. - * - * @access public - * @static - * - * @param WP_REST_Request $request The request sent to the WP REST API. - * - * @return array|WP_Error An array with installation info on success: - * - * 'path' (string) Helper script installation path on the filesystem. - * 'url' (string) URL to the helper script. - * 'abspath' (string) WordPress root. - * - * or an instance of WP_Error on failure. - */ - public static function install_helper_script( $request ) { - $helper_script = $request->get_param( 'helper' ); - - // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.obfuscation_base64_decode - $helper_script = base64_decode( $helper_script ); - if ( ! $helper_script ) { - return new WP_Error( 'invalid_args', __( 'Helper Script body must be base64 encoded', 'jetpack-transport-helper' ), 400 ); - } - - $installation_info = Helper_Script_Manager::install_helper_script( $helper_script ); - Helper_Script_Manager::cleanup_expired_helper_scripts(); - - return rest_ensure_response( $installation_info ); - } - - /** - * Delete a Helper Script. - * - * @access public - * @static - * - * @param WP_REST_Request $request The request sent to the WP REST API. - * - * @return array|WP_Error An array with 'success' key indicating the result of the delete operation. - */ - public static function delete_helper_script( $request ) { - $path_to_helper_script = $request->get_param( 'path' ); - - $delete_result = Helper_Script_Manager::delete_helper_script( $path_to_helper_script ); - Helper_Script_Manager::cleanup_expired_helper_scripts(); - - if ( is_wp_error( $delete_result ) ) { - return $delete_result; - } - - return rest_ensure_response( array( 'success' => true ) ); - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-waf/CHANGELOG.md b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-waf/CHANGELOG.md deleted file mode 100644 index 01be70c8..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-waf/CHANGELOG.md +++ /dev/null @@ -1,351 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file. - -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) -and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - -## [0.16.0.1] - 2024-04-10 -### Security -- Improves handling of REQUEST_URI [#36833] - -## [0.16.0] - 2024-03-22 -### Added -- Add data to WAF logs and add toggle for users to opt-in to share more data with us if needed. [#36377] - -## [0.15.1] - 2024-03-14 -### Changed -- Internal updates. - -## [0.15.0] - 2024-03-12 -### Added -- Add JSON parameter support to the Web Application Firewall. [#36169] - -## [0.14.2] - 2024-03-04 -### Fixed -- Fixed base64 transforms to better conform with the modsecurity runtime [#35693] - -## [0.14.1] - 2024-02-27 -### Changed -- Internal updates. - -## [0.14.0] - 2024-02-12 -### Added -- Add standalone mode status to WAF config [#34840] - -## [0.13.0] - 2024-02-05 -### Added -- Run the WAF on JN environments [#35341] - -## [0.12.4] - 2024-01-18 -### Fixed -- Optimize how the web application firewall checks for updates on admin screens. [#34820] - -## [0.12.3] - 2024-01-02 -### Changed -- Internal updates. - -## [0.12.2] - 2023-12-25 -### Changed -- Improve top-level WP-CLI command description [#34745] - -## [0.12.1] - 2023-11-21 - -## [0.12.0] - 2023-11-20 -### Changed -- Updated required PHP version to >= 7.0. [#34192] - -## [0.11.15] - 2023-11-14 - -## [0.11.14] - 2023-10-30 - -## [0.11.13] - 2023-10-10 -### Fixed -- Escape email address when output in HTML. [#33536] - -## [0.11.12] - 2023-09-28 -### Changed -- Minor internal updates. - -## [0.11.11] - 2023-09-19 - -- Minor internal updates. - -## [0.11.10] - 2023-09-11 -### Changed -- General: remove backwards-compatible functions now that package relies on WordPress 6.2. [#32772] - -## [0.11.9] - 2023-08-28 -### Changed -- Updated package dependencies. [#32605] - -## [0.11.8] - 2023-07-18 -### Changed -- Add support for running brute force protection in environments that otherwise do not support the WAF. [#31761] -- Minor performance improvements. [#31684] - -## [0.11.7] - 2023-07-17 -### Changed -- Add support for non-empty server https values. [#31688] - -## [0.11.6] - 2023-05-22 -### Added -- Add integration tests for unsupported environments [#30544] - -### Fixed -- Fix Brute force protection activation when WAF unset [#30544] -- Fix unavailable endpoint when WAF module is disabled [#30487] -- Multisite: avoid errors when the package is used in the Protect plugin instead of the Jetpack plugin. [#30767] - -## [0.11.5] - 2023-05-15 -### Changed -- Internal updates. - -## [0.11.4] - 2023-04-27 -### Added -- Fix hardblock issue if user only has Protect installed [#30278] - -## [0.11.3] - 2023-04-17 -### Fixed -- Fix brute force protection not initializing on atomic. [#30113] - -## [0.11.2] - 2023-04-10 -### Added -- Add Jetpack Autoloader package suggestion. [#29988] - -## [0.11.1] - 2023-04-03 -### Fixed -- Return early if we detect the older BFP implementation from the main plugin [#29794] - -## [0.11.0] - 2023-03-28 -### Added -- Added brute force protection to the WAF configuration REST API endpoints [#28401] -- Move the brute force protection module into the package. [#28401] - -### Changed -- Change "whitelist" to "allow list". [#28401] -- Move the brute force protection transient cleanup and shared functions to dedicated namespaced classes. [#28401] -- Use WAF IP allow list option in brute force protection feature. [#28401] - -## [0.10.2] - 2023-03-20 -### Changed -- Updated package dependencies. [#29480] - -## [0.10.1] - 2023-03-08 -### Changed -- Minor internal updates. - -## [0.10.0] - 2023-02-28 -### Added -- Added support for IP ranges in allow and block lists. [#29131] - -## [0.9.3] - 2023-02-20 -### Changed -- Minor internal updates. - -## [0.9.2] - 2023-02-15 -### Changed -- Minor internal updates. - -## [0.9.1] - 2023-02-13 -### Fixed -- Fix an update error that impacted sites using the WAF in standalone mode. [#28844] - -## [0.9.0] - 2023-01-25 -### Changed -- Change the web application firewall to run automatic and manual rules independently. [#27726] - -## [0.8.3] - 2023-01-11 -### Fixed -- Fixed the WAF package's PHP tests and Composer requirements [#28185] - -## [0.8.2] - 2023-01-09 -### Fixed -- Fix firewall activation hooks on first option updates. [#28234] - -## [0.8.1] - 2023-01-07 -### Changed -- Change directory location that stores firewall rules. [#28049] - -## [0.8.0] - 2022-12-27 -### Added -- Add file existance checks before requiring rule files in the WAF. [#28050] -- Disable Jetpack Firewall on unsupported environments. [#27939] - -## [0.7.2] - 2022-12-19 -### Fixed -- Fix the initialization of the firewall. [#27846] - -## [0.7.1] - 2022-12-06 -### Changed -- html_entity_decode filter now decodes single-quotes too, and uses a Unicode Replacement Character instead of returning empty string on invalid characters. [#27753] - -## [0.7.0] - 2022-12-05 -### Added -- Prepare package for use in the Jetpack Protect standalone plugin. [#27528] - -### Changed -- Updated package dependencies. [#27688] - -### Removed -- Remove has_rules_access plan check in favor of external alternatives [#27600] - -## [0.6.10] - 2022-11-28 -### Changed -- Updated package dependencies. [#27043] - -## [0.6.9] - 2022-11-01 -### Fixed -- Fix bug for cron event not generating IP rules. [#27215] - -## [0.6.8] - 2022-10-27 -### Fixed -- Fixes several invalid action callbacks. [#27106] - -## [0.6.7] - 2022-09-20 -### Changed -- Changing how we load and run the package to avoid actions.php [#24730] - -## [0.6.6] - 2022-09-08 -### Fixed -- Fixed exception namespace. [#25663] - -## [0.6.5] - 2022-07-26 -### Changed -- Updated package dependencies. [#25158] - -## [0.6.4] - 2022-07-12 -### Fixed -- Correct namespacing error. [#24993] - -## [0.6.3] - 2022-06-21 -### Changed -- Renaming master to trunk. [#24661] - -## [0.6.2] - 2022-06-06 -### Fixed -- Fix the hook we're using for run.php. - -## [0.6.1] - 2022-06-02 -### Removed -- Disable the WAF module on Atomic - -## [0.6.0] - 2022-05-18 -### Added -- Add checks for a killswitch define [#24247] -- Added endpoint to update rules on demand [#24327] -- handle share data option to decide if we should write to log file [#24218] - -### Fixed -- Allow the rules API to return 401 responses without throwing an exception. [#24153] -- fix bootstrap generation in cases file.php is not required yet [#24153] - -## [0.5.1] - 2022-05-04 -### Added -- Added a check to only run the firewall when the Jetpack module is enabled, a method to provide the bootstrap.php path, and a REST API endpoint to provide the firewall settings. [#23769] -- Connected the WAF UI to actually updating the IP block and allow lists when saving the settings. [#24124] - -### Fixed -- Fixed database logging [#24070] -- Fixed issue where code for the waf package was executed if the module was disabled [#24217] -- Fixed writing rules php files if the API request for getting up-to-date rules failes so that the internal functionality is kept in tact. [#24181] -- We now sanitize the output generated by blocked requests, and only report the rule ID in the header response. [#24058] - -## [0.5.0] - 2022-04-26 -### Added -- added cron to update rules -- Added WAF IP allow list and block list functionality. - -### Changed -- Added comment to ignore failing phpcs check -- PHPCS: Fix `WordPress.Security.ValidatedSanitizedInput` -- Updated package dependencies. - -## [0.4.0] - 2022-04-19 -### Added -- added logs when a request is blocked -- Generating rules now fetches them from the API. Also adds a few CLI commands. - -## [0.3.0] - 2022-04-12 -### Added -- Added hooks for generating the rules.php file, and improved functionality and class names. - -## [0.2.0] - 2022-04-06 -### Added -- Added Jetpack WAF standalone mode. - -### Fixed -- Fix normalizing nested array targets, like with query strings. - -## [0.1.1] - 2022-03-29 -### Fixed -- Fixed instance of normalizeHeaderName that wasn't renamed; fixed header parsing; removed unused compiler file. - -## 0.1.0 - 2022-02-16 -### Added -- Added executing the WAF as part of the Jetpack plugin. -- Added Initial version - -### Changed -- Core: do not ship .phpcs.dir.xml in production builds. - -[0.16.0.1]: https://github.com/Automattic/jetpack-waf/compare/v0.16.0...v0.16.0.1 -[0.16.0]: https://github.com/Automattic/jetpack-waf/compare/v0.15.1...v0.16.0 -[0.15.1]: https://github.com/Automattic/jetpack-waf/compare/v0.15.0...v0.15.1 -[0.15.0]: https://github.com/Automattic/jetpack-waf/compare/v0.14.2...v0.15.0 -[0.14.2]: https://github.com/Automattic/jetpack-waf/compare/v0.14.1...v0.14.2 -[0.14.1]: https://github.com/Automattic/jetpack-waf/compare/v0.14.0...v0.14.1 -[0.14.0]: https://github.com/Automattic/jetpack-waf/compare/v0.13.0...v0.14.0 -[0.13.0]: https://github.com/Automattic/jetpack-waf/compare/v0.12.4...v0.13.0 -[0.12.4]: https://github.com/Automattic/jetpack-waf/compare/v0.12.3...v0.12.4 -[0.12.3]: https://github.com/Automattic/jetpack-waf/compare/v0.12.2...v0.12.3 -[0.12.2]: https://github.com/Automattic/jetpack-waf/compare/v0.12.1...v0.12.2 -[0.12.1]: https://github.com/Automattic/jetpack-waf/compare/v0.12.0...v0.12.1 -[0.12.0]: https://github.com/Automattic/jetpack-waf/compare/v0.11.15...v0.12.0 -[0.11.15]: https://github.com/Automattic/jetpack-waf/compare/v0.11.14...v0.11.15 -[0.11.14]: https://github.com/Automattic/jetpack-waf/compare/v0.11.13...v0.11.14 -[0.11.13]: https://github.com/Automattic/jetpack-waf/compare/v0.11.12...v0.11.13 -[0.11.12]: https://github.com/Automattic/jetpack-waf/compare/v0.11.11...v0.11.12 -[0.11.11]: https://github.com/Automattic/jetpack-waf/compare/v0.11.10...v0.11.11 -[0.11.10]: https://github.com/Automattic/jetpack-waf/compare/v0.11.9...v0.11.10 -[0.11.9]: https://github.com/Automattic/jetpack-waf/compare/v0.11.8...v0.11.9 -[0.11.8]: https://github.com/Automattic/jetpack-waf/compare/v0.11.7...v0.11.8 -[0.11.7]: https://github.com/Automattic/jetpack-waf/compare/v0.11.6...v0.11.7 -[0.11.6]: https://github.com/Automattic/jetpack-waf/compare/v0.11.5...v0.11.6 -[0.11.5]: https://github.com/Automattic/jetpack-waf/compare/v0.11.4...v0.11.5 -[0.11.4]: https://github.com/Automattic/jetpack-waf/compare/v0.11.3...v0.11.4 -[0.11.3]: https://github.com/Automattic/jetpack-waf/compare/v0.11.2...v0.11.3 -[0.11.2]: https://github.com/Automattic/jetpack-waf/compare/v0.11.1...v0.11.2 -[0.11.1]: https://github.com/Automattic/jetpack-waf/compare/v0.11.0...v0.11.1 -[0.11.0]: https://github.com/Automattic/jetpack-waf/compare/v0.10.2...v0.11.0 -[0.10.2]: https://github.com/Automattic/jetpack-waf/compare/v0.10.1...v0.10.2 -[0.10.1]: https://github.com/Automattic/jetpack-waf/compare/v0.10.0...v0.10.1 -[0.10.0]: https://github.com/Automattic/jetpack-waf/compare/v0.9.3...v0.10.0 -[0.9.3]: https://github.com/Automattic/jetpack-waf/compare/v0.9.2...v0.9.3 -[0.9.2]: https://github.com/Automattic/jetpack-waf/compare/v0.9.1...v0.9.2 -[0.9.1]: https://github.com/Automattic/jetpack-waf/compare/v0.9.0...v0.9.1 -[0.9.0]: https://github.com/Automattic/jetpack-waf/compare/v0.8.3...v0.9.0 -[0.8.3]: https://github.com/Automattic/jetpack-waf/compare/v0.8.2...v0.8.3 -[0.8.2]: https://github.com/Automattic/jetpack-waf/compare/v0.8.1...v0.8.2 -[0.8.1]: https://github.com/Automattic/jetpack-waf/compare/v0.8.0...v0.8.1 -[0.8.0]: https://github.com/Automattic/jetpack-waf/compare/v0.7.2...v0.8.0 -[0.7.2]: https://github.com/Automattic/jetpack-waf/compare/v0.7.1...v0.7.2 -[0.7.1]: https://github.com/Automattic/jetpack-waf/compare/v0.7.0...v0.7.1 -[0.7.0]: https://github.com/Automattic/jetpack-waf/compare/v0.6.10...v0.7.0 -[0.6.10]: https://github.com/Automattic/jetpack-waf/compare/v0.6.9...v0.6.10 -[0.6.9]: https://github.com/Automattic/jetpack-waf/compare/v0.6.8...v0.6.9 -[0.6.8]: https://github.com/Automattic/jetpack-waf/compare/v0.6.7...v0.6.8 -[0.6.7]: https://github.com/Automattic/jetpack-waf/compare/v0.6.6...v0.6.7 -[0.6.6]: https://github.com/Automattic/jetpack-waf/compare/v0.6.5...v0.6.6 -[0.6.5]: https://github.com/Automattic/jetpack-waf/compare/v0.6.4...v0.6.5 -[0.6.4]: https://github.com/Automattic/jetpack-waf/compare/v0.6.3...v0.6.4 -[0.6.3]: https://github.com/Automattic/jetpack-waf/compare/v0.6.2...v0.6.3 -[0.6.2]: https://github.com/Automattic/jetpack-waf/compare/v0.6.1...v0.6.2 -[0.6.1]: https://github.com/Automattic/jetpack-waf/compare/v0.6.0...v0.6.1 -[0.6.0]: https://github.com/Automattic/jetpack-waf/compare/v0.5.1...v0.6.0 -[0.5.1]: https://github.com/Automattic/jetpack-waf/compare/v0.5.0...v0.5.1 -[0.5.0]: https://github.com/Automattic/jetpack-waf/compare/v0.4.0...v0.5.0 -[0.4.0]: https://github.com/Automattic/jetpack-waf/compare/v0.3.0...v0.4.0 -[0.3.0]: https://github.com/Automattic/jetpack-waf/compare/v0.2.0...v0.3.0 -[0.2.0]: https://github.com/Automattic/jetpack-waf/compare/v0.1.1...v0.2.0 -[0.1.1]: https://github.com/Automattic/jetpack-waf/compare/v0.1.0...v0.1.1 diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-waf/LICENSE.txt b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-waf/LICENSE.txt deleted file mode 100644 index e82774c1..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-waf/LICENSE.txt +++ /dev/null @@ -1,357 +0,0 @@ -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - - -=================================== - - -GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - -Copyright (C) 1989, 1991 Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -Everyone is permitted to copy and distribute verbatim copies -of this license document, but changing it is not allowed. - - Preamble - -The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Lesser General Public License instead.) You can apply it to -your programs, too. - -When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - -To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - -For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - -We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - -Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - -Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - -The precise terms and conditions for copying, distribution and -modification follow. - -GNU GENERAL PUBLIC LICENSE -TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - -0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - -1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - -2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - -a) You must cause the modified files to carry prominent notices -stating that you changed the files and the date of any change. - -b) You must cause any work that you distribute or publish, that in -whole or in part contains or is derived from the Program or any -part thereof, to be licensed as a whole at no charge to all third -parties under the terms of this License. - -c) If the modified program normally reads commands interactively -when run, you must cause it, when started running for such -interactive use in the most ordinary way, to print or display an -announcement including an appropriate copyright notice and a -notice that there is no warranty (or else, saying that you provide -a warranty) and that users may redistribute the program under -these conditions, and telling the user how to view a copy of this -License. (Exception: if the Program itself is interactive but -does not normally print such an announcement, your work based on -the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - -3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - -a) Accompany it with the complete corresponding machine-readable -source code, which must be distributed under the terms of Sections -1 and 2 above on a medium customarily used for software interchange; or, - -b) Accompany it with a written offer, valid for at least three -years, to give any third party, for a charge no more than your -cost of physically performing source distribution, a complete -machine-readable copy of the corresponding source code, to be -distributed under the terms of Sections 1 and 2 above on a medium -customarily used for software interchange; or, - -c) Accompany it with the information you received as to the offer -to distribute corresponding source code. (This alternative is -allowed only for noncommercial distribution and only if you -received the program in object code or executable form with such -an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - -4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - -5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - -6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - -7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - -8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - -9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - -10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - -11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - -12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - -How to Apply These Terms to Your New Programs - -If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - -To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - -Copyright (C) - -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along -with this program; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - -Gnomovision version 69, Copyright (C) year name of author -Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. -This is free software, and you are welcome to redistribute it -under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - -Yoyodyne, Inc., hereby disclaims all copyright interest in the program -`Gnomovision' (which makes passes at compilers) written by James Hacker. - -, 1 April 1989 -Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-waf/SECURITY.md b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-waf/SECURITY.md deleted file mode 100644 index 98f48dd1..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-waf/SECURITY.md +++ /dev/null @@ -1,47 +0,0 @@ -# Security Policy - -Full details of the Automattic Security Policy can be found on [automattic.com](https://automattic.com/security/). - -## Supported Versions - -Generally, only the latest version of Jetpack and its associated plugins have continued support. If a critical vulnerability is found in the current version of a plugin, we may opt to backport any patches to previous versions. - -## Reporting a Vulnerability - -Our HackerOne program covers the below plugin software, as well as a variety of related projects and infrastructure: - -* [Jetpack](https://jetpack.com/) -* Jetpack Backup -* Jetpack Boost -* Jetpack CRM -* Jetpack Protect -* Jetpack Search -* Jetpack Social -* Jetpack VideoPress - -**For responsible disclosure of security issues and to be eligible for our bug bounty program, please submit your report via the [HackerOne](https://hackerone.com/automattic) portal.** - -Our most critical targets are: - -* Jetpack and the Jetpack composer packages (all within this repo) -* Jetpack.com -- the primary marketing site. -* cloud.jetpack.com -- a management site. -* wordpress.com -- the shared management site for both Jetpack and WordPress.com sites. - -For more targets, see the `In Scope` section on [HackerOne](https://hackerone.com/automattic). - -_Please note that the **WordPress software is a separate entity** from Automattic. Please report vulnerabilities for WordPress through [the WordPress Foundation's HackerOne page](https://hackerone.com/wordpress)._ - -## Guidelines - -We're committed to working with security researchers to resolve the vulnerabilities they discover. You can help us by following these guidelines: - -* Follow [HackerOne's disclosure guidelines](https://www.hackerone.com/disclosure-guidelines). -* Pen-testing Production: - * Please **setup a local environment** instead whenever possible. Most of our code is open source (see above). - * If that's not possible, **limit any data access/modification** to the bare minimum necessary to reproduce a PoC. - * **_Don't_ automate form submissions!** That's very annoying for us, because it adds extra work for the volunteers who manage those systems, and reduces the signal/noise ratio in our communication channels. - * To be eligible for a bounty, all of these guidelines must be followed. -* Be Patient - Give us a reasonable time to correct the issue before you disclose the vulnerability. - -We also expect you to comply with all applicable laws. You're responsible to pay any taxes associated with your bounties. diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-waf/cli.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-waf/cli.php deleted file mode 100644 index c62c43f9..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-waf/cli.php +++ /dev/null @@ -1,12 +0,0 @@ -=7.0", - "automattic/jetpack-connection": "^2.4.1", - "automattic/jetpack-constants": "^2.0.1", - "automattic/jetpack-ip": "^0.2.2", - "automattic/jetpack-status": "^2.1.2", - "wikimedia/aho-corasick": "^1.0" - }, - "require-dev": { - "yoast/phpunit-polyfills": "1.1.0", - "automattic/jetpack-changelogger": "^4.1.1", - "automattic/wordbless": "@dev" - }, - "suggest": { - "automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package." - }, - "autoload": { - "files": [ - "cli.php" - ], - "classmap": [ - "src/" - ] - }, - "scripts": { - "phpunit": [ - "./vendor/phpunit/phpunit/phpunit --configuration tests/php/integration/phpunit.xml.dist --colors=always", - "./vendor/phpunit/phpunit/phpunit --configuration tests/php/unit/phpunit.xml.dist --colors=always" - ], - "post-install-cmd": "WorDBless\\Composer\\InstallDropin::copy", - "post-update-cmd": "WorDBless\\Composer\\InstallDropin::copy", - "test-coverage-html": [ - "php -dpcov.directory=. ./vendor/bin/phpunit --coverage-html ./coverage --configuration tests/php/integration/phpunit.xml.dist", - "php -dpcov.directory=. ./vendor/bin/phpunit --coverage-html ./coverage --configuration tests/php/unit/phpunit.xml.dist" - ], - "test-php": [ - "@composer phpunit" - ] - }, - "minimum-stability": "dev", - "prefer-stable": true, - "extra": { - "autotagger": true, - "mirror-repo": "Automattic/jetpack-waf", - "textdomain": "jetpack-waf", - "changelogger": { - "link-template": "https://github.com/Automattic/jetpack-waf/compare/v${old}...v${new}" - }, - "branch-alias": { - "dev-trunk": "0.16.x-dev" - } - }, - "config": { - "allow-plugins": { - "roots/wordpress-core-installer": true - } - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-waf/src/brute-force-protection/class-blocked-login-page.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-waf/src/brute-force-protection/class-blocked-login-page.php deleted file mode 100644 index 8b104d4a..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-waf/src/brute-force-protection/class-blocked-login-page.php +++ /dev/null @@ -1,773 +0,0 @@ -can_send_recovery_emails = apply_filters( 'jetpack_protect_can_send_recovery_emails', true ); - $this->ip_address = $ip_address; - - add_filter( 'wp_authenticate_user', array( $this, 'check_valid_blocked_user' ), 10, 1 ); - add_filter( 'site_url', array( $this, 'add_args_to_login_post_url' ), 10, 3 ); - add_filter( 'network_site_url', array( $this, 'add_args_to_login_post_url' ), 10, 3 ); - add_filter( 'lostpassword_url', array( $this, 'add_args_to_lostpassword_url' ), 10, 2 ); - add_filter( 'login_url', array( $this, 'add_args_to_login_url' ), 10, 3 ); - add_filter( 'lostpassword_redirect', array( $this, 'add_args_to_lostpassword_redirect_url' ), 10, 1 ); - } - - /** - * Gets the URL that redirects to the support page on unblocking - * - * @since 8.5.0 - * - * @return string - */ - public static function get_help_url() { - return Redirect::get_url( 'jetpack-support-protect', array( 'anchor' => 'troubleshooting' ) ); - } - - /** - * Add arguments to lost password redirect url. - * - * @param string $url - the URL. - */ - public function add_args_to_lostpassword_redirect_url( $url ) { - if ( $this->valid_blocked_user_id ) { - $url = empty( $url ) ? wp_login_url() : $url; - $url = add_query_arg( - array( - 'validate_jetpack_protect_recovery' => isset( $_GET['validate_jetpack_protect_recovery'] ) ? filter_var( wp_unslash( $_GET['validate_jetpack_protect_recovery'] ) ) : null, // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Nothing on the site is changed in response to this request. - 'user_id' => isset( $_GET['user_id'] ) ? (int) $_GET['user_id'] : null, // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Nothing on the site is changed in response to this request. - 'checkemail' => 'confirm', - ), - $url - ); - } - - return $url; - } - - /** - * Add arguments to lost password redirect url. - * - * @param string $url - the URL. - * @param string $redirect - where to redirect to. - */ - public function add_args_to_lostpassword_url( $url, $redirect ) { - if ( $this->valid_blocked_user_id ) { - $args = array( - 'validate_jetpack_protect_recovery' => isset( $_GET['validate_jetpack_protect_recovery'] ) ? filter_var( wp_unslash( $_GET['validate_jetpack_protect_recovery'] ) ) : null, // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Nothing on the site is changed in response to this request. - 'user_id' => isset( $_GET['user_id'] ) ? (int) $_GET['user_id'] : null, // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Nothing on the site is changed in response to this request. - 'action' => 'lostpassword', - ); - if ( ! empty( $redirect ) ) { - $args['redirect_to'] = $redirect; - } - $url = add_query_arg( $args, $url ); - } - - return $url; - } - - /** - * Add arguments to login post url. - * - * @param string $url - the URL. - * @param string $path - the path. - * @param string $scheme -the scheme(?). - */ - public function add_args_to_login_post_url( $url, $path, $scheme ) { - if ( $this->valid_blocked_user_id && ( 'login_post' === $scheme || 'login' === $scheme ) ) { - $url = add_query_arg( - array( - 'validate_jetpack_protect_recovery' => isset( $_GET['validate_jetpack_protect_recovery'] ) ? filter_var( wp_unslash( $_GET['validate_jetpack_protect_recovery'] ) ) : null, // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Nothing on the site is changed in response to this request. - 'user_id' => isset( $_GET['user_id'] ) ? (int) $_GET['user_id'] : null, // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Nothing on the site is changed in response to this request. - ), - $url - ); - - } - - return $url; - } - - /** - * Add arguments to login post url. - * - * @param string $url - the URL. - * @param string $redirect - where we want to redirect to. - * @param string $force_reauth -if we're forcing reauthorization. - */ - public function add_args_to_login_url( $url, $redirect, $force_reauth ) { - if ( $this->valid_blocked_user_id ) { - $args = array( - 'validate_jetpack_protect_recovery' => isset( $_GET['validate_jetpack_protect_recovery'] ) ? filter_var( wp_unslash( $_GET['validate_jetpack_protect_recovery'] ) ) : null, // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Nothing on the site is changed in response to this request. - 'user_id' => isset( $_GET['user_id'] ) ? (int) $_GET['user_id'] : null, // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Nothing on the site is changed in response to this request. - ); - - if ( ! empty( $redirect ) ) { - $args['redirect_to'] = $redirect; - } - - if ( ! empty( $force_reauth ) ) { - $args['reauth'] = '1'; - } - $url = add_query_arg( $args, $url ); - } - - return $url; - } - - /** - * Check if user is blocked. - * - * @param string $user - the user. - */ - public function check_valid_blocked_user( $user ) { - if ( $this->valid_blocked_user_id && $this->valid_blocked_user_id != $user->ID ) { // phpcs:ignore Universal.Operators.StrictComparisons.LooseNotEqual - return new WP_Error( 'invalid_recovery_token', __( 'The recovery token is not valid for this user.', 'jetpack-waf' ) ); - } - - return $user; - } - - /** - * Check if user is valid. - */ - public function is_blocked_user_valid() { - if ( ! $this->can_send_recovery_emails ) { - return false; - } - - if ( $this->valid_blocked_user_id ) { - return true; - } - - if ( ! isset( $_GET['validate_jetpack_protect_recovery'] ) || ! isset( $_GET['user_id'] ) ) { // phpcs:ignore: WordPress.Security.NonceVerification.Recommended -- no changes made if this isn't set. - return false; - } - - if ( ! $this->is_valid_protect_recovery_key( filter_var( wp_unslash( $_GET['validate_jetpack_protect_recovery'] ) ), (int) $_GET['user_id'] ) ) { // phpcs:ignore: WordPress.Security.NonceVerification.Recommended -- no changes made if this isn't set. - return false; - } - - $this->valid_blocked_user_id = (int) $_GET['user_id']; // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Nothing on the site is changed in response to this request. - - return true; - } - - /** - * Checks if recovery key is valid. - * - * @param string $key - they recovery key. - * @param string $user_id - the User ID. - */ - public function is_valid_protect_recovery_key( $key, $user_id ) { - - $path = sprintf( '/sites/%d/protect/recovery/confirm', Jetpack_Options::get_option( 'id' ) ); - $response = Client::wpcom_json_api_request_as_blog( - $path, - '1.1', - array( - 'method' => 'post', - ), - array( - 'token' => $key, - 'user_id' => $user_id, - 'ip' => $this->ip_address, - ) - ); - - $result = json_decode( wp_remote_retrieve_body( $response ) ); - - if ( is_wp_error( $result ) || empty( $result ) || isset( $result->error ) ) { - return false; - } - - return true; - } - - /** - * Check if we should render the recovery form. - */ - public function render_and_die() { - if ( ! $this->can_send_recovery_emails ) { - $this->render_blocked_login_message(); - - return; - } - - if ( isset( $_GET['validate_jetpack_protect_recovery'] ) && ! empty( $_GET['user_id'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- no site changes, just throws invalid token error. - $error = new WP_Error( 'invalid_token', __( "Oops, we couldn't validate the recovery token.", 'jetpack-waf' ) ); - $this->protect_die( $error ); - - return; - } - - if ( - isset( $_GET['jetpack-protect-recovery'] ) && - isset( $_POST['_wpnonce'] ) && - wp_verify_nonce( $_POST['_wpnonce'], 'bypass-protect' ) // phpcs:ignore WordPress.Security.ValidatedSanitizedInput -- WP Core doesn't unstrip or sanitize nonces either. - ) { - $this->process_recovery_email(); - - return; - } - - if ( isset( $_GET['loggedout'] ) && 'true' === $_GET['loggedout'] ) { - $this->protect_die( __( 'You successfully logged out.', 'jetpack-waf' ) ); - } - - $this->render_recovery_form(); - } - - /** - * Render the blocked login message. - */ - public function render_blocked_login_message() { - $this->protect_die( $this->get_html_blocked_login_message() ); - } - - /** - * Process sending a recovery email. - */ - public function process_recovery_email() { - $sent = $this->send_recovery_email(); - $show_recovery_form = true; - if ( is_wp_error( $sent ) ) { - if ( 'email_already_sent' === $sent->get_error_code() ) { - $show_recovery_form = false; - } - $this->protect_die( $sent, null, true, $show_recovery_form ); - } else { - $this->render_recovery_success(); - } - } - - /** - * Send the recovery form. - */ - public function send_recovery_email() { - $email = isset( $_POST['email'] ) ? wp_unslash( $_POST['email'] ) : ''; // phpcs:ignore WordPress.Security.NonceVerification.Missing, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- only triggered after bypass-protect nonce check is done, and sanitization is checked on the next line. - if ( sanitize_email( $email ) !== $email || ! is_email( $email ) ) { - return new WP_Error( 'invalid_email', __( "Oops, looks like that's not the right email address. Please try again!", 'jetpack-waf' ) ); - } - $user = get_user_by( 'email', trim( $email ) ); - - if ( ! $user ) { - return new WP_Error( 'invalid_user', __( "Oops, we couldn't find a user with that email. Please try again!", 'jetpack-waf' ) ); - } - $this->email_address = $email; - $path = sprintf( '/sites/%d/protect/recovery/request', Jetpack_Options::get_option( 'id' ) ); - - $response = Client::wpcom_json_api_request_as_blog( - $path, - '1.1', - array( - 'method' => 'post', - ), - array( - 'user_id' => $user->ID, - 'ip' => $this->ip_address, - ) - ); - - $code = wp_remote_retrieve_response_code( $response ); - $result = json_decode( wp_remote_retrieve_body( $response ) ); - - if ( self::HTTP_STATUS_CODE_TOO_MANY_REQUESTS === $code ) { - // translators: email address the recovery instructions were sent to. - return new WP_Error( 'email_already_sent', sprintf( __( 'Recovery instructions were sent to %s. Check your inbox!', 'jetpack-waf' ), esc_html( $this->email_address ) ) ); - } elseif ( is_wp_error( $result ) || empty( $result ) || isset( $result->error ) ) { - return new WP_Error( 'email_send_error', __( 'Oops, we were unable to send a recovery email. Try again.', 'jetpack-waf' ) ); - } - - return true; - } - - /** - * Prevent login by locking the login page. - * - * @param string $content - the content of the page. - * @param string $title - the page title. - * @param string $back_link - the back link. - * @param string $recovery_form - the recovery form. - */ - public function protect_die( $content, $title = null, $back_link = false, $recovery_form = false ) { - if ( empty( $title ) ) { - $title = __( 'Jetpack has locked your site\'s login page.', 'jetpack-waf' ); - } - if ( is_wp_error( $content ) ) { - $svg = ''; - $content = ' ' . $svg . $content->get_error_message() . ''; - } - $content = '

          ' . $content . '

          '; - - // If for some reason the login pop up box show up in the wp-admin. - if ( isset( $_GET['interim-login'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- no changes to the site itself, just rendering an error message. - $content = '' . $content; - } - $this->display_page( $title, $content, $back_link, $recovery_form ); - } - - /** - * Render the recovery form. - */ - public function render_recovery_form() { - $content = $this->get_html_blocked_login_message(); - $this->protect_die( $content, null, null, true ); - } - - /** - * Render the recovery instructions. - */ - public function render_recovery_success() { - // translators: the email address the recovery email was sent to. - $this->protect_die( sprintf( __( 'Recovery instructions were sent to %s. Check your inbox!', 'jetpack-waf' ), $this->email_address ) ); - } - - /** - * Get the HTML for the blocked login message. - */ - public function get_html_blocked_login_message() { - $icon = ''; - $ip = str_replace( 'http://', '', esc_url( 'http://' . $this->ip_address ) ); - return sprintf( - // translators: the IP address that was flagged. - __( '

          Your IP address %2$s has been flagged for potential security violations. You can unlock your login by sending yourself a special link via email. Learn More

          ', 'jetpack-waf' ), // phpcs:ignore WordPress.WP.I18n.NoHtmlWrappedStrings - $icon, - $ip, - esc_url( self::get_help_url() ) - ); - } - - /** - * Get the HTML recovery form. - */ - public function get_html_recovery_form() { - ob_start(); ?> -
          -
          - -

          - - -

          -
          -
          - - - - - > - - - - \n"; - } else { - echo "\n"; - } - ?> - <?php echo esc_html( $title ); ?> - - - > -

          -
          - - - - - - - - - - - - - - - - - - - - - - - - - - - get_html_recovery_form(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- content is escaped in the function. - } - ?> -
          - - - - get_transient( 'jpp_math_pass_' . sanitize_key( $_COOKIE['jpp_math_pass'] ) ); - - if ( ! $transient || $transient < 1 ) { - self::generate_math_page(); - } - return true; - } - - $ans = isset( $_POST['jetpack_protect_num'] ) ? (int) $_POST['jetpack_protect_num'] : ''; // phpcs:ignore WordPress.Security.NonceVerification.Missing -- answers are salted. - $correct_ans = isset( $_POST['jetpack_protect_answer'] ) ? sanitize_key( $_POST['jetpack_protect_answer'] ) : ''; // phpcs:ignore WordPress.Security.NonceVerification.Missing - - $time_window = self::time_window(); - $salt = get_site_option( 'jetpack_protect_key' ) . '|' . get_site_option( 'admin_email' ) . '|'; - $salted_ans_1 = hash_hmac( 'sha1', $ans, $salt . $time_window ); - $salted_ans_2 = hash_hmac( 'sha1', $ans, $salt . ( $time_window - 1 ) ); - - if ( ! $correct_ans || ! $ans ) { - self::generate_math_page(); - } elseif ( ! hash_equals( $salted_ans_1, $correct_ans ) && ! hash_equals( $salted_ans_2, $correct_ans ) ) { - wp_die( - wp_kses( - __( - 'You failed to correctly answer the math problem. This is used to combat spam when Jetpack’s Brute Force Attack Protection API is unavailable. Please use your browser’s back button to return to the login form, press the "refresh" button to generate a new math problem, and try to log in again.', - 'jetpack-waf' - ), - array( 'strong' => array() ) - ), - '', - array( 'response' => 401 ) - ); - } else { - return true; - } - } - - /** - * Creates an interim page to collect answers to a math captcha - * - * @param string $error - the error message. - */ - public static function generate_math_page( $error = false ) { - ob_start(); - ?> -

          - -

          - - -
          - - -

          -
          - 401 ) - ); - } - - /** - * Generates the math page. - */ - public function process_generate_math_page() { - $ans = isset( $_POST['jetpack_protect_num'] ) ? (int) $_POST['jetpack_protect_num'] : ''; // phpcs:ignore WordPress.Security.NonceVerification.Missing -- answers are salted. - $correct_ans = isset( $_POST['jetpack_protect_answer'] ) ? sanitize_key( $_POST['jetpack_protect_answer'] ) : ''; // phpcs:ignore WordPress.Security.NonceVerification.Missing - - $time_window = self::time_window(); - $salt = get_site_option( 'jetpack_protect_key' ) . '|' . get_site_option( 'admin_email' ) . '|'; - $salted_ans_1 = hash_hmac( 'sha1', $ans, $salt . $time_window ); - $salted_ans_2 = hash_hmac( 'sha1', $ans, $salt . ( $time_window - 1 ) ); - - if ( ! hash_equals( $salted_ans_1, $correct_ans ) && ! hash_equals( $salted_ans_2, $correct_ans ) ) { - self::generate_math_page( true ); - } else { - $temp_pass = substr( hash_hmac( 'sha1', wp_rand( 1, 100000000 ), get_site_option( 'jetpack_protect_key' ) ), 5, 25 ); - - $brute_force_protection = Brute_Force_Protection::instance(); - $brute_force_protection->set_transient( 'jpp_math_pass_' . $temp_pass, 3, DAY_IN_SECONDS ); - setcookie( 'jpp_math_pass', $temp_pass, time() + DAY_IN_SECONDS, COOKIEPATH, COOKIE_DOMAIN, false, true ); - remove_action( 'login_form', array( $this, 'math_form' ) ); - return true; - } - } - - /** - * Requires a user to solve a simple equation. Added to any WordPress login form. - * - * @return VOID outputs html - */ - public static function math_form() { - // Check if jpp_math_pass cookie is set and it matches valid transient. - if ( isset( $_COOKIE['jpp_math_pass'] ) ) { - $brute_force_protection = Brute_Force_Protection::instance(); - $transient = $brute_force_protection->get_transient( 'jpp_math_pass_' . sanitize_key( $_COOKIE['jpp_math_pass'] ) ); - - if ( $transient && $transient > 0 ) { - return ''; - } - } - - $num1 = wp_rand( 0, 10 ); - $num2 = wp_rand( 1, 10 ); - $ans = $num1 + $num2; - - $time_window = self::time_window(); - $salt = get_site_option( 'jetpack_protect_key' ) . '|' . get_site_option( 'admin_email' ) . '|'; - $salted_ans = hash_hmac( 'sha1', $ans, $salt . $time_window ); - ?> -
          -

          - -

          -
          - - - -
          - array(), - ); - foreach ( $local_allow_list as $item ) { - if ( $item->range ) { - $formatted['local'][] = $item->range_low . ' - ' . $item->range_high; - } else { - $formatted['local'][] = $item->ip_address; - } - } - if ( is_multisite() && current_user_can( 'manage_network' ) ) { - $formatted['global'] = array(); - $global_allow_list = self::get_global_allow_list(); - if ( false === $global_allow_list ) { - // If the global allow list has never been set, check for a legacy option set prior to 3.6. - $global_allow_list = get_site_option( 'jetpack_protect_whitelist', array() ); - } - foreach ( $global_allow_list as $item ) { - if ( $item->range ) { - $formatted['global'][] = $item->range_low . ' - ' . $item->range_high; - } else { - $formatted['global'][] = $item->ip_address; - } - } - } - return $formatted; - } - - /** - * Gets the local Brute force protection allow list. - * - * @deprecated 0.11.0 Use get_local_allow_list() - */ - public static function get_local_whitelist() { - _deprecated_function( __METHOD__, 'waf-0.11.0', __CLASS__ . '::get_local_allow_list' ); - return self::get_local_allow_list(); - } - - /** - * Gets the local Brute force protection allow list. - * - * The 'local' part of the allow list only really applies to multisite installs, - * which can have a network wide allow list, as well as a local list that applies - * only to the current site. On single site installs, there will only be a local - * allow list. - * - * @return array A list of IP Address objects or an empty array - */ - public static function get_local_allow_list() { - $allow_list = get_option( Waf_Rules_Manager::IP_ALLOW_LIST_OPTION_NAME ); - if ( false === $allow_list ) { - // The local allow list has never been set. - if ( is_multisite() ) { - // On a multisite, we can check for a legacy site_option that existed prior to v 3.6, or default to an empty array. - $allow_list = get_site_option( 'jetpack_protect_whitelist', array() ); - } else { - // On a single site, we can just use an empty array. - $allow_list = array(); - } - } else { - $allow_list = IP_Utils::get_ip_addresses_from_string( $allow_list ); - $allow_list = array_map( - function ( $ip_address ) { - return self::create_ip_object( $ip_address ); - }, - $allow_list - ); - } - return $allow_list; - } - - /** - * Get the global, network-wide allow list. - * - * @deprecated 0.11.0 Use get_global_allow_list() - */ - public static function get_global_whitelist() { - _deprecated_function( __METHOD__, 'waf-0.11.0', __CLASS__ . '::get_global_allow_list' ); - return self::get_global_allow_list(); - } - - /** - * Get the global, network-wide allow list. - * - * It will revert to the legacy site_option if jetpack_protect_global_whitelist has never been set. - * - * @return array - */ - public static function get_global_allow_list() { - $allow_list = get_site_option( 'jetpack_protect_global_whitelist' ); - if ( false === $allow_list ) { - // The global allow list has never been set. Check for legacy site_option, or default to an empty array. - $allow_list = get_site_option( 'jetpack_protect_whitelist', array() ); - } - return $allow_list; - } - - /** - * Convert a string into an IP Address object. - * - * @param string $ip_address The IP Address to convert. - * @return object An IP Address object. - */ - private static function create_ip_object( $ip_address ) { - $range = false; - if ( strpos( $ip_address, '-' ) ) { - $ip_address = explode( '-', $ip_address ); - $range = true; - } - $new_item = new \stdClass(); - $new_item->range = $range; - if ( $range ) { - $new_item->range_low = trim( $ip_address[0] ); - $new_item->range_high = trim( $ip_address[1] ); - } else { - $new_item->ip_address = $ip_address; - } - return $new_item; - } - - /** - * Save IP allow list. - * - * @deprecated 0.11.0 Use save_allow_list() - * - * @param mixed $allow_list IP allow list. - * @param bool $global (default: false) Global. - */ - public static function save_whitelist( $allow_list, $global = false ) { - _deprecated_function( __METHOD__, 'waf-0.11.0', __CLASS__ . '::save_allow_list' ); - return self::save_allow_list( $allow_list, $global ); - } - - /** - * Save IP allow list. - * - * @access public - * @param mixed $allow_list IP allow list. - * @param bool $global (default: false) Global. - * @return Bool. - */ - public static function save_allow_list( $allow_list, $global = false ) { - $allow_list_error = false; - $new_items = array(); - if ( ! is_array( $allow_list ) ) { - return new WP_Error( 'invalid_parameters', __( 'Expecting an array', 'jetpack-waf' ) ); - } - if ( $global && ! is_multisite() ) { - return new WP_Error( 'invalid_parameters', __( 'Cannot use global flag on non-multisites', 'jetpack-waf' ) ); - } - if ( $global && ! current_user_can( 'manage_network' ) ) { - return new WP_Error( 'permission_denied', __( 'Only super admins can edit the global allow list', 'jetpack-waf' ) ); - } - // Validate each item. - foreach ( $allow_list as $item ) { - $item = trim( $item ); - if ( empty( $item ) ) { - continue; - } - $new_item = self::create_ip_object( $item ); - if ( $new_item->range ) { - if ( ! filter_var( $new_item->range_low, FILTER_VALIDATE_IP ) || ! filter_var( $new_item->range_high, FILTER_VALIDATE_IP ) ) { - $allow_list_error = true; - break; - } - if ( ! IP_Utils::convert_ip_address( $new_item->range_low ) || ! IP_Utils::convert_ip_address( $new_item->range_high ) ) { - $allow_list_error = true; - break; - } - } else { - if ( ! filter_var( $new_item->ip_address, FILTER_VALIDATE_IP ) ) { - $allow_list_error = true; - break; - } - if ( ! IP_Utils::convert_ip_address( $new_item->ip_address ) ) { - $allow_list_error = true; - break; - } - } - $new_items[] = $new_item; - } // End item loop. - if ( ! empty( $allow_list_error ) ) { - return new WP_Error( 'invalid_ip', __( 'One of your IP addresses was not valid.', 'jetpack-waf' ) ); - } - if ( $global ) { - update_site_option( 'jetpack_protect_global_whitelist', $new_items ); - // Once a user has saved their global allow list, we can permanently remove the legacy option. - delete_site_option( 'jetpack_protect_whitelist' ); - } else { - $new_items = array_map( - function ( $item ) { - if ( $item->range ) { - return $item->range_low . '-' . $item->range_high; - } - return $item->ip_address; - }, - $new_items - ); - update_option( Waf_Rules_Manager::IP_ALLOW_LIST_OPTION_NAME, implode( ' ', $new_items ) ); - } - return true; - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-waf/src/brute-force-protection/class-transient-cleanup.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-waf/src/brute-force-protection/class-transient-cleanup.php deleted file mode 100644 index ebd79e03..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-waf/src/brute-force-protection/class-transient-cleanup.php +++ /dev/null @@ -1,63 +0,0 @@ - time() || $older_than_time < 1 ) { - return false; - } - $sql = $wpdb->prepare( - // phpcs:ignore WordPress.DB.PreparedSQLPlaceholders.LikeWildcardsInQuery - "SELECT REPLACE(option_name, '_transient_timeout_jpp_', '') AS transient_name FROM {$wpdb->options} WHERE option_name LIKE '\_transient\_timeout\_jpp\__%%' AND option_value < %d", - $older_than_time - ); - $transients = $wpdb->get_col( $sql ); // phpcs:ignore WordPress.DB -- $sql is prepared above. - $options_names = array(); - foreach ( $transients as $transient ) { - $options_names[] = '_transient_jpp_' . $transient; - $options_names[] = '_transient_timeout_jpp_' . $transient; - } - if ( $options_names ) { - $option_names_string = implode( ', ', array_fill( 0, count( $options_names ), '%s' ) ); - $result = $wpdb->query( // phpcs:ignore WordPress.DB.DirectDatabaseQuery - $wpdb->prepare( - "DELETE FROM {$wpdb->options} WHERE option_name IN ($option_names_string)", // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared,WordPress.DB.PreparedSQLPlaceholders.UnfinishedPrepare -- the placeholders are set above. - $options_names - ) - ); - if ( ! $result ) { - return false; - } - } - } - - /** - * Jetpack Purge Transients Activation. - * - * @access public - * @return void - */ - public static function jp_purge_transients_activation() { - if ( ! wp_next_scheduled( 'jp_purge_transients_cron' ) ) { - wp_schedule_event( time(), 'daily', 'jp_purge_transients_cron' ); - } - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-waf/src/class-brute-force-protection.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-waf/src/class-brute-force-protection.php deleted file mode 100644 index 4c426d34..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-waf/src/class-brute-force-protection.php +++ /dev/null @@ -1,1159 +0,0 @@ -is_connected() ) { - global $pagenow; - $brute_force_protection = self::instance(); - - if ( isset( $pagenow ) && 'wp-login.php' === $pagenow ) { - $brute_force_protection->check_login_ability(); - } - } - } - - /** - * On module activation, try to get an api key - */ - public function on_activation() { - if ( is_multisite() && is_main_site() && get_site_option( 'jetpack_protect_active', 0 ) == 0 ) { // phpcs:ignore Universal.Operators.StrictComparisons.LooseEqual - update_site_option( 'jetpack_protect_active', 1 ); - } - - update_site_option( 'jetpack_protect_activating', 'activating' ); - - // Get BruteProtect's counter number. - $this->protect_call( 'check_key' ); - } - - /** - * On module deactivation, unset protect_active - */ - public function on_deactivation() { - if ( is_multisite() && is_main_site() ) { - update_site_option( 'jetpack_protect_active', 0 ); - } - } - - /** - * Determines if the brute force protection module is enabled on the site. - * - * @return bool - */ - public static function is_enabled() { - return ( new Modules() )->is_active( 'protect' ); - } - - /** - * Enables the brute force protection module. - * - * @return bool - */ - public static function enable() { - // Return true if already enabled. - if ( self::is_enabled() ) { - return true; - } - return ( new Modules() )->activate( 'protect', false, false ); - } - - /** - * Disables the brute force protection module. - * - * @return bool - */ - public static function disable() { - // Return true if already disabled. - if ( ! self::is_enabled() ) { - return true; - } - return ( new Modules() )->deactivate( 'protect' ); - } - - /** - * Get the protect key, - */ - public function maybe_get_protect_key() { - if ( get_site_option( 'jetpack_protect_activating', false ) && ! get_site_option( 'jetpack_protect_key', false ) ) { - $key = $this->get_protect_key(); - delete_site_option( 'jetpack_protect_activating' ); - return $key; - } - - return get_site_option( 'jetpack_protect_key' ); - } - - /** - * Sends a "check_key" API call once a day. This call allows us to track IP-related - * headers for this server via the Protect API, in order to better identify the source - * IP for login attempts - * - * @param bool $force - if we're forcing the request. - */ - public function maybe_update_headers( $force = false ) { - $updated_recently = $this->get_transient( 'jpp_headers_updated_recently' ); - - if ( ! $force ) { - if ( isset( $_GET['protect_update_headers'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- this doesn't change anything, just forces the once-a-day check to run via force if set. - $force = true; - } - } - - // check that current user is admin so we prevent a lower level user from adding - // a trusted header, allowing them to brute force an admin account. - if ( ( $updated_recently && ! $force ) || ! current_user_can( 'update_plugins' ) ) { - return; - } - - $response = self::protect_call( 'check_key' ); - $this->set_transient( 'jpp_headers_updated_recently', 1, DAY_IN_SECONDS ); - - if ( isset( $response['msg'] ) && $response['msg'] ) { - update_site_option( 'trusted_ip_header', json_decode( $response['msg'] ) ); - } - } - - /** - * Handle displaying a security warning. - */ - public function maybe_display_security_warning() { - if ( is_multisite() && current_user_can( 'manage_network' ) ) { - if ( ! function_exists( 'is_plugin_active_for_network' ) ) { - require_once ABSPATH . '/wp-admin/includes/plugin.php'; - } - - // This warning is only relevant if either Jetpack or Jetpack Protect is active. - if ( defined( 'JETPACK__PLUGIN_FILE' ) ) { - $plugin_root_file = JETPACK__PLUGIN_FILE; - } elseif ( defined( 'JETPACK_PROTECT_ROOT_FILE' ) ) { - $plugin_root_file = JETPACK_PROTECT_ROOT_FILE; - } else { - return; - } - - if ( ! is_plugin_active_for_network( plugin_basename( $plugin_root_file ) ) ) { - add_action( 'load-index.php', array( $this, 'prepare_jetpack_protect_multisite_notice' ) ); - add_action( 'wp_ajax_jetpack-protect-dismiss-multisite-banner', array( $this, 'ajax_dismiss_handler' ) ); - } - } - } - - /** - * Handles preparing the multisite notice. - */ - public function prepare_jetpack_protect_multisite_notice() { - $dismissed = get_site_option( 'jetpack_dismissed_protect_multisite_banner' ); - if ( $dismissed ) { - return; - } - - add_action( 'admin_notices', array( $this, 'admin_jetpack_manage_notice' ) ); - } - - /** - * Handle dismissing the multisite banner. - */ - public function ajax_dismiss_handler() { - check_ajax_referer( 'jetpack_protect_multisite_banner_opt_out' ); - - if ( ! current_user_can( 'manage_network' ) ) { - wp_send_json_error( new WP_Error( 'insufficient_permissions' ) ); - } - - update_site_option( 'jetpack_dismissed_protect_multisite_banner', true ); - - wp_send_json_success(); - } - - /** - * Displays a warning about Brute Force Protection's network activation requirement. - * Attaches some custom JS to Core's `is-dismissible` UI to save the dismissed state. - */ - public function admin_jetpack_manage_notice() { - ?> -
          -

          - -

          - -

          - -

          - - - - - - -

          -
          - - api_key_error = __( 'Your main blog is not connected to WordPress.com. Please connect to get an API key.', 'jetpack-waf' ); - - return false; - } - - $request = array( - 'jetpack_blog_id' => $protect_blog_id, - 'bruteprotect_api_key' => get_site_option( 'bruteprotect_api_key' ), - 'multisite' => '0', - ); - - // Send the number of blogs on the network if we are on multisite. - if ( is_multisite() ) { - $request['multisite'] = get_blog_count(); - if ( ! $request['multisite'] ) { - global $wpdb; - $request['multisite'] = $wpdb->get_var( "SELECT COUNT(blog_id) as c FROM $wpdb->blogs WHERE spam = '0' AND deleted = '0' and archived = '0'" ); // phpcs:ignore WordPress.DB.DirectDatabaseQuery - } - } - - // Request the key. - $xml = new Jetpack_IXR_Client(); - $xml->query( 'jetpack.protect.requestKey', $request ); - - // Hmm, can't talk to wordpress.com. - if ( $xml->isError() ) { - $code = $xml->getErrorCode(); - $message = $xml->getErrorMessage(); - // Translators: The xml error code, and the xml error message. - $this->api_key_error = sprintf( __( 'Error connecting to WordPress.com. Code: %1$s, %2$s', 'jetpack-waf' ), $code, $message ); - - return false; - } - - $response = $xml->getResponse(); - - // Hmm, can't talk to the protect servers ( api.bruteprotect.com ). - if ( ! isset( $response['data'] ) ) { - $this->api_key_error = __( 'No reply from Jetpack servers', 'jetpack-waf' ); - - return false; - } - - // There was an issue generating the key. - if ( empty( $response['success'] ) ) { - $this->api_key_error = $response['data']; - - return false; - } - - // Key generation successful! - $active_plugins = self::get_active_plugins(); - - // We only want to deactivate BruteProtect if we successfully get a key. - if ( in_array( 'bruteprotect/bruteprotect.php', $active_plugins, true ) ) { - self::deactivate_plugin( 'bruteprotect/bruteprotect.php', 'BruteProtect' ); - } - - $key = $response['data']; - update_site_option( 'jetpack_protect_key', $key ); - - return $key; - } - - /** - * Called via WP action wp_login_failed to log failed attempt with the api - * - * Fires custom, plugable action jpp_log_failed_attempt with the IP - * - * @param string $login_user - the user attempting to log in. - * @return void - */ - public function log_failed_attempt( $login_user = null ) { - - /** - * Fires before every failed login attempt. - * - * @module protect - * - * @since 3.4.0 - * - * @param array Information about failed login attempt - * [ - * 'login' => (string) Username or email used in failed login attempt - * ] - */ - do_action( 'jpp_log_failed_attempt', array( 'login' => $login_user ) ); - - if ( isset( $_COOKIE['jpp_math_pass'] ) ) { - - $transient = $this->get_transient( 'jpp_math_pass_' . sanitize_key( $_COOKIE['jpp_math_pass'] ) ); - --$transient; - - if ( ! $transient || $transient < 1 ) { - $this->delete_transient( 'jpp_math_pass_' . sanitize_key( $_COOKIE['jpp_math_pass'] ) ); - setcookie( 'jpp_math_pass', 0, time() - DAY_IN_SECONDS, COOKIEPATH, COOKIE_DOMAIN, false, true ); - } else { - $this->set_transient( 'jpp_math_pass_' . sanitize_key( $_COOKIE['jpp_math_pass'] ), $transient, DAY_IN_SECONDS ); - } - } - $this->protect_call( 'failed_attempt' ); - } - - /** - * Set up the Brute Force Protection configuration page - */ - public function modules_loaded() { - add_filter( 'jetpack_module_configurable_protect', '__return_true' ); - } - - /** - * Logs a successful login back to our servers, this allows us to make sure we're not blocking - * a busy IP that has a lot of good logins along with some forgotten passwords. Also saves current user's ip - * to the ip address allow list - * - * @param string $user_login - the user loggign in. - * @param string $user - the user. - */ - public function log_successful_login( $user_login, $user = null ) { - if ( ! $user ) { // For do_action( 'wp_login' ) calls that lacked passing the 2nd arg. - $user = get_user_by( 'login', $user_login ); - } - - $this->protect_call( 'successful_login', array( 'roles' => $user->roles ) ); - } - - /** - * Checks for loginability BEFORE authentication so that bots don't get to go around the log in form. - * - * If we are using our math fallback, authenticate via math-fallback.php - * - * @param string $user - the user. - * @param string $username - the username. - * @param string $password - the password. - * - * @return string $user - */ - public function check_preauth( $user = 'Not Used By Protect', $username = 'Not Used By Protect', $password = 'Not Used By Protect' ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable - $allow_login = $this->check_login_ability( true ); - $use_math = $this->get_transient( 'brute_use_math' ); - - if ( ! $allow_login ) { - $this->block_with_math(); - } - - if ( ( 1 == $use_math || 1 == $this->block_login_with_math ) && isset( $_POST['log'] ) ) { // phpcs:ignore Universal.Operators.StrictComparisons.LooseEqual, WordPress.Security.NonceVerification.Missing -- POST request just determines if we use math authentication. - - Brute_Force_Protection_Math_Authenticate::math_authenticate(); - } - - return $user; - } - - /** - * Get all IP headers so that we can process on our server... - * - * @return array - */ - public function get_headers() { - $output = array(); - $ip_related_headers = array( - 'GD_PHP_HANDLER', - 'HTTP_AKAMAI_ORIGIN_HOP', - 'HTTP_CF_CONNECTING_IP', - 'HTTP_CLIENT_IP', - 'HTTP_FASTLY_CLIENT_IP', - 'HTTP_FORWARDED', - 'HTTP_FORWARDED_FOR', - 'HTTP_INCAP_CLIENT_IP', - 'HTTP_TRUE_CLIENT_IP', - 'HTTP_X_CLIENTIP', - 'HTTP_X_CLUSTER_CLIENT_IP', - 'HTTP_X_FORWARDED', - 'HTTP_X_FORWARDED_FOR', - 'HTTP_X_IP_TRAIL', - 'HTTP_X_REAL_IP', - 'HTTP_X_VARNISH', - 'REMOTE_ADDR', - ); - - foreach ( $ip_related_headers as $header ) { - if ( ! empty( $_SERVER[ $header ] ) ) { - $output[ $header ] = wp_unslash( $_SERVER[ $header ] ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized - } - } - - return $output; - } - - /** - * Checks if the IP address is in the allow list. - * - * @deprecated 0.11.0 Use ip_is_allowed() - * - * @param string $ip - the IP address. - */ - public static function ip_is_whitelisted( $ip ) { - _deprecated_function( __METHOD__, 'waf-0.11.0', __CLASS__ . '::ip_is_allowed' ); - return self::ip_is_allowed( $ip ); - } - - /** - * Checks if the IP address is in the allow list. - * - * @param string $ip - the IP address. - * - * @return bool - */ - public function ip_is_allowed( $ip ) { - // If we found an exact match in wp-config. - if ( defined( 'JETPACK_IP_ADDRESS_OK' ) && JETPACK_IP_ADDRESS_OK === $ip ) { - return true; - } - - $allow_list = Brute_Force_Protection_Shared_Functions::get_local_allow_list(); - - if ( is_multisite() ) { - $allow_list = array_merge( $allow_list, get_site_option( 'jetpack_protect_global_whitelist', array() ) ); - } - - if ( ! empty( $allow_list ) ) : - foreach ( $allow_list as $item ) : - // If the IPs are an exact match. - if ( ! $item->range && isset( $item->ip_address ) && $item->ip_address === $ip ) { - return true; - } - - if ( $item->range && isset( $item->range_low ) && isset( $item->range_high ) ) { - if ( IP_Utils::ip_address_is_in_range( $ip, $item->range_low, $item->range_high ) ) { - return true; - } - } - endforeach; - endif; - - return false; - } - - /** - * Checks the status for a given IP. API results are cached as transients - * - * @param bool $preauth - Whether or not we are checking prior to authorization. - * - * @return bool Either returns true, fires $this->kill_login, or includes a math fallback and returns false - */ - public function check_login_ability( $preauth = false ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable - - /** - * JETPACK_ALWAYS_PROTECT_LOGIN will always disable the login page, and use a page provided by Jetpack. - */ - if ( Constants::is_true( 'JETPACK_ALWAYS_PROTECT_LOGIN' ) ) { - $this->kill_login(); - } - - if ( $this->is_current_ip_allowed() ) { - return true; - } - - $status = $this->get_cached_status(); - - if ( empty( $status ) ) { - // If we've reached this point, this means that the IP isn't cached. - // Now we check with the Protect API to see if we should allow login. - $response = $this->protect_call( $action = 'check_ip' ); // phpcs:ignore Squiz.PHP.DisallowMultipleAssignments.Found - - if ( isset( $response['math'] ) && ! function_exists( 'brute_math_authenticate' ) ) { - new Brute_Force_Protection_Math_Authenticate(); - - return false; - } - - $status = $response['status']; - } - - if ( 'blocked' === $status ) { - $this->block_with_math(); - } - - if ( 'blocked-hard' === $status ) { - $this->kill_login(); - } - - return true; - } - - /** - * Check if the user's IP is in the allow list. - * - * @deprecated 0.11.0 Use is_current_ip_allowed() - */ - public static function is_current_ip_whitelisted() { - _deprecated_function( __METHOD__, 'waf-0.11.0', __CLASS__ . '::is_current_ip_allowed' ); - return self::is_current_ip_allowed(); - } - - /** - * Check if the user's IP is in the allow list. - */ - public function is_current_ip_allowed() { - $ip = IP_Utils::get_ip(); - - // Server is misconfigured and we can't get an IP. - if ( ! $ip ) { - self::disable(); - ob_start(); - ( new CookieState() )->state( 'message', 'protect_misconfigured_ip' ); - ob_end_clean(); - return true; - } - - /** - * Short-circuit check_login_ability. - * - * If there is an alternate way to validate the current IP such as - * a hard-coded list of IP addresses, we can short-circuit the rest - * of the login ability checks and return true here. - * - * @module protect - * - * @since 4.4.0 - * - * @param bool false Should we allow all logins for the current ip? Default: false - */ - if ( apply_filters( 'jpp_allow_login', false, $ip ) ) { - return true; - } - - if ( IP_Utils::ip_is_private( $ip ) ) { - return true; - } - - if ( $this->ip_is_allowed( $ip ) ) { - return true; - } - } - - /** - * Check if someone is able to login based on IP. - */ - public function has_login_ability() { - if ( $this->is_current_ip_allowed() ) { - return true; - } - $status = $this->get_cached_status(); - if ( empty( $status ) || 'ok' === $status ) { - return true; - } - return false; - } - - /** - * Check the status of the cached transient. - */ - public function get_cached_status() { - $transient_name = $this->get_transient_name(); - $value = $this->get_transient( $transient_name ); - if ( isset( $value['status'] ) ) { - return $value['status']; - } - return ''; - } - - /** - * Check if we need to block with a math question to continue logging in. - */ - public function block_with_math() { - /** - * By default, Protect will allow a user who has been blocked for too - * many failed logins to start answering math questions to continue logging in - * - * For added security, you can disable this. - * - * @module protect - * - * @since 3.6.0 - * - * @param bool Whether to allow math for blocked users or not. - */ - - $this->block_login_with_math = 1; - /** - * Allow Math fallback for blocked IPs. - * - * @module protect - * - * @since 3.6.0 - * - * @param bool true Should we fallback to the Math questions when an IP is blocked. Default to true. - */ - $allow_math_fallback_on_fail = apply_filters( 'jpp_use_captcha_when_blocked', true ); - if ( ! $allow_math_fallback_on_fail ) { - $this->kill_login(); - } - - new Brute_Force_Protection_Math_Authenticate(); - - return false; - } - - /** - * Kill a login attempt - */ - public function kill_login() { - if ( - isset( $_GET['action'] ) && isset( $_GET['_wpnonce'] ) && - 'logout' === $_GET['action'] && - wp_verify_nonce( $_GET['_wpnonce'], 'log-out' ) && // phpcs:ignore WordPress.Security.ValidatedSanitizedInput - wp_get_current_user() - - ) { - // Allow users to logout. - return; - } - - $ip = IP_Utils::get_ip(); - /** - * Fires before every killed login. - * - * @module protect - * - * @since 3.4.0 - * - * @param string $ip IP flagged by Protect. - */ - do_action( 'jpp_kill_login', $ip ); - - if ( defined( 'XMLRPC_REQUEST' ) && XMLRPC_REQUEST ) { - // translators: variable is the IP address that was flagged. - $die_string = sprintf( __( 'Your IP (%1$s) has been flagged for potential security violations.', 'jetpack-waf' ), str_replace( 'http://', '', esc_url( 'http://' . $ip ) ) ); - wp_die( - $die_string, // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- esc_url used when forming string. - esc_html__( 'Login Blocked by Jetpack', 'jetpack-waf' ), - array( 'response' => 403 ) - ); - } - - $blocked_login_page = Brute_Force_Protection_Blocked_Login_Page::instance( $ip ); - - if ( $blocked_login_page->is_blocked_user_valid() ) { - return; - } - - $blocked_login_page->render_and_die(); - } - - /** - * Checks if the protect API call has failed, and if so initiates the math captcha fallback. - */ - public function check_use_math() { - $use_math = $this->get_transient( 'brute_use_math' ); - if ( $use_math ) { - new Brute_Force_Protection_Math_Authenticate(); - } - } - - /** - * If we're in a multisite network, return the blog ID of the primary blog - * - * @return int - */ - public function get_main_blog_id() { - if ( ! is_multisite() ) { - return false; - } - - global $current_site; - $primary_blog_id = $current_site->blog_id; - - return $primary_blog_id; - } - - /** - * Get jetpack blog id, or the jetpack blog id of the main blog in the main network - * - * @return int - */ - public function get_main_blog_jetpack_id() { - if ( ! is_main_site() ) { - switch_to_blog( $this->get_main_blog_id() ); - $id = Jetpack_Options::get_option( 'id', false ); - restore_current_blog(); - } else { - $id = Jetpack_Options::get_option( 'id' ); - } - - return $id; - } - - /** - * Checks the API key. - */ - public function check_api_key() { - $response = $this->protect_call( 'check_key' ); - - if ( isset( $response['ckval'] ) ) { - return true; - } - - if ( isset( $response['error'] ) ) { - - if ( 'Invalid API Key' === $response['error'] ) { - $this->api_key_error = __( 'Your API key is invalid', 'jetpack-waf' ); - } - - if ( 'API Key Required' === $response['error'] ) { - $this->api_key_error = __( 'No API key', 'jetpack-waf' ); - } - } - - $this->api_key_error = __( 'There was an error contacting Jetpack servers.', 'jetpack-waf' ); - - return false; - } - - /** - * Calls over to the api using wp_remote_post - * - * @param string $action - 'check_ip', 'check_key', or 'failed_attempt'. - * @param array $request - Any custom data to post to the api. - * - * @return array - */ - public function protect_call( $action = 'check_ip', $request = array() ) { - global $wp_version; - - $api_key = $this->maybe_get_protect_key(); - - $user_agent = "WordPress/{$wp_version}"; - - $request['action'] = $action; - $request['ip'] = IP_Utils::get_ip(); - $request['host'] = $this->get_local_host(); - $request['headers'] = wp_json_encode( $this->get_headers() ); - $request['jetpack_version'] = null; - $request['wordpress_version'] = (string) $wp_version; - $request['api_key'] = $api_key; - $request['multisite'] = '0'; - - if ( defined( 'JETPACK__VERSION' ) ) { - $request['jetpack_version'] = constant( 'JETPACK__VERSION' ); - $user_agent .= ' | Jetpack/' . constant( 'JETPACK__VERSION' ); - } - - if ( defined( 'JETPACK_PROTECT_VERSION' ) && ! defined( 'JETPACK__VERSION' ) ) { - $request['jetpack_version'] = '12.1'; - $user_agent .= ' | JetpackProtect/' . constant( 'JETPACK_PROTECT_VERSION' ); - } - - if ( is_multisite() ) { - $request['multisite'] = get_blog_count(); - } - - /** - * Filter controls maximum timeout in waiting for reponse from Protect servers. - * - * @module protect - * - * @since 4.0.4 - * - * @param int $timeout Max time (in seconds) to wait for a response. - */ - $timeout = apply_filters( 'jetpack_protect_connect_timeout', 30 ); - - $args = array( - 'body' => $request, - 'user-agent' => $user_agent, - 'httpversion' => '1.0', - 'timeout' => absint( $timeout ), - ); - - Waf_Constants::define_brute_force_api_host(); - - $response_json = wp_remote_post( JETPACK_PROTECT__API_HOST, $args ); - $this->last_response_raw = $response_json; - - $transient_name = $this->get_transient_name(); - $this->delete_transient( $transient_name ); - - if ( is_array( $response_json ) ) { - $response = json_decode( $response_json['body'], true ); - } - - if ( isset( $response['blocked_attempts'] ) && $response['blocked_attempts'] ) { - update_site_option( 'jetpack_protect_blocked_attempts', $response['blocked_attempts'] ); - } - - if ( isset( $response['status'] ) && ! isset( $response['error'] ) ) { - $response['expire'] = time() + $response['seconds_remaining']; - $this->set_transient( $transient_name, $response, $response['seconds_remaining'] ); - $this->delete_transient( 'brute_use_math' ); - } else { // Fallback to Math Captcha if no response from API host. - $this->set_transient( 'brute_use_math', 1, 600 ); - $response['status'] = 'ok'; - $response['math'] = true; - } - - if ( isset( $response['error'] ) ) { - update_site_option( 'jetpack_protect_error', $response['error'] ); - } else { - delete_site_option( 'jetpack_protect_error' ); - } - - return $response; - } - - /** - * Gets the transient name. - */ - public function get_transient_name() { - $headers = $this->get_headers(); - $header_hash = md5( wp_json_encode( $headers ) ); - - return 'jpp_li_' . $header_hash; - } - - /** - * Wrapper for WordPress set_transient function, our version sets - * the transient on the main site in the network if this is a multisite network - * - * We do it this way (instead of set_site_transient) because of an issue where - * sitewide transients are always autoloaded - * https://core.trac.wordpress.org/ticket/22846 - * - * @param string $transient Transient name. Expected to not be SQL-escaped. Must be - * 45 characters or fewer in length. - * @param mixed $value Transient value. Must be serializable if non-scalar. - * Expected to not be SQL-escaped. - * @param int $expiration Optional. Time until expiration in seconds. Default 0. - * - * @return bool False if value was not set and true if value was set. - */ - public function set_transient( $transient, $value, $expiration ) { - if ( is_multisite() && ! is_main_site() ) { - switch_to_blog( $this->get_main_blog_id() ); - $return = set_transient( $transient, $value, $expiration ); - restore_current_blog(); - - return $return; - } - - return set_transient( $transient, $value, $expiration ); - } - - /** - * Wrapper for WordPress delete_transient function, our version deletes - * the transient on the main site in the network if this is a multisite network - * - * @param string $transient Transient name. Expected to not be SQL-escaped. - * - * @return bool true if successful, false otherwise - */ - public function delete_transient( $transient ) { - if ( is_multisite() && ! is_main_site() ) { - switch_to_blog( $this->get_main_blog_id() ); - $return = delete_transient( $transient ); - restore_current_blog(); - - return $return; - } - - return delete_transient( $transient ); - } - - /** - * Wrapper for WordPress get_transient function, our version gets - * the transient on the main site in the network if this is a multisite network - * - * @param string $transient Transient name. Expected to not be SQL-escaped. - * - * @return mixed Value of transient. - */ - public function get_transient( $transient ) { - if ( is_multisite() && ! is_main_site() ) { - switch_to_blog( $this->get_main_blog_id() ); - $return = get_transient( $transient ); - restore_current_blog(); - - return $return; - } - - return get_transient( $transient ); - } - - /** - * Returns the local host. - */ - public function get_local_host() { - if ( isset( $this->local_host ) ) { - return $this->local_host; - } - - $uri = 'http://' . strtolower( isset( $_SERVER['HTTP_HOST'] ) ? filter_var( wp_unslash( $_SERVER['HTTP_HOST'] ) ) : '' ); - - if ( is_multisite() ) { - $uri = network_home_url(); - } - - $uridata = wp_parse_url( $uri ); - - $domain = $uridata['host']; - - // If we still don't have the site_url, get it. - if ( ! $domain ) { - $uri = get_site_url( 1 ); - $uridata = wp_parse_url( $uri ); - $domain = $uridata['host']; - } - - $this->local_host = $domain; - - return $this->local_host; - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-waf/src/class-compatibility.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-waf/src/class-compatibility.php deleted file mode 100644 index 1adc7e94..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-waf/src/class-compatibility.php +++ /dev/null @@ -1,232 +0,0 @@ -range ) ) { - return $ip_object->range_low . '-' . $ip_object->range_high; - } - - return $ip_object->ip_address; - }, - $brute_force_allow_list - ); - - $brute_force_allow_list_string = implode( "\n", $brute_force_allow_list ); - - if ( empty( $waf_allow_list ) ) { - return $brute_force_allow_list_string; - } - - // Return the lists merged into a single string. - return "$waf_allow_list\n$brute_force_allow_list_string"; - } - - /** - * Migrate the brute force protection IP allow list option to the WAF option. - * - * @since 0.11.0 - * - * @return void - */ - public static function migrate_brute_force_protection_ip_allow_list() { - // Get the allow list values directly from the database to avoid filters. - $brute_force_allow_list = Jetpack_Options::get_raw_option( 'jetpack_protect_whitelist' ); - $waf_allow_list = Jetpack_Options::get_raw_option( 'jetpack_waf_ip_allow_list' ); - - if ( ! empty( $brute_force_allow_list ) ) { - - if ( empty( $waf_allow_list ) ) { - $waf_allow_list = ''; - } - - // Merge the two allow lists. - $merged_allow_list = self::merge_ip_allow_lists( $waf_allow_list, $brute_force_allow_list ); - - // Update the WAF IP allow list with the merged list. - Jetpack_Options::update_raw_option( 'jetpack_waf_ip_allow_list', $merged_allow_list ); - - // Delete the old option if the update was successful. - // Check the values directly as `update_raw_option()` returns false if the value hasn't changed. - if ( Jetpack_Options::get_raw_option( 'jetpack_waf_ip_allow_list' ) === $merged_allow_list ) { - delete_option( 'jetpack_protect_whitelist' ); - } - } - } - - /** - * Filter for Waf_Rules_Manager::IP_ALLOW_LIST_OPTION_NAME's option value. - * Merges the deprecated IP allow list from the brute force protection module - * with the existing option value, and flags that the WAF needs to be updated. - * - * @since 0.11.0 - * - * @param array $waf_allow_list The current value of the option. - * - * @return array The merged IP allow list. - */ - public static function filter_option_waf_ip_allow_list( $waf_allow_list ) { - $brute_force_allow_list = Jetpack_Options::get_raw_option( 'jetpack_protect_whitelist', false ); - if ( false !== $brute_force_allow_list ) { - $waf_allow_list = self::merge_ip_allow_lists( $waf_allow_list, $brute_force_allow_list ); - update_option( Waf_Initializer::NEEDS_UPDATE_OPTION_NAME, true ); - } - - return $waf_allow_list; - } - - /** - * Default option for when the Waf_Rules_Manager::IP_ALLOW_LIST_OPTION_NAME option is not set. - * - * @param mixed $default The default value to return if the option does not exist in the database. - * @param string $option Option name. - * @param bool $passed_default Was get_option() passed a default value. - * - * @return mixed The default value to return if the option does not exist in the database. - */ - public static function default_option_waf_ip_allow_list( $default, $option, $passed_default ) { - // Allow get_option() to override this default value - if ( $passed_default ) { - return $default; - } - - $waf_allow_list = ''; - - // If the brute force option exists, use that and flag that the WAF needs to be updated. - $brute_force_allow_list = Jetpack_Options::get_raw_option( 'jetpack_protect_whitelist', false ); - if ( false !== $brute_force_allow_list ) { - $waf_allow_list = self::merge_ip_allow_lists( $waf_allow_list, $brute_force_allow_list ); - update_option( Waf_Initializer::NEEDS_UPDATE_OPTION_NAME, true ); - } - - return $waf_allow_list; - } - - /** - * Check if the brute force protection code is being run by an older version of Jetpack (< 12.0). - * - * @since 0.11.1 - * - * @return bool - */ - public static function is_brute_force_running_in_jetpack() { - return defined( 'JETPACK__VERSION' ) && version_compare( JETPACK__VERSION, '12', '<' ); - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-waf/src/class-rest-controller.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-waf/src/class-rest-controller.php deleted file mode 100644 index e91c3381..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-waf/src/class-rest-controller.php +++ /dev/null @@ -1,191 +0,0 @@ - WP_REST_Server::READABLE, - 'callback' => __CLASS__ . '::waf', - 'permission_callback' => __CLASS__ . '::waf_permissions_callback', - ) - ); - - register_rest_route( - 'jetpack/v4', - '/waf', - array( - 'methods' => WP_REST_Server::EDITABLE, - 'callback' => __CLASS__ . '::update_waf', - 'permission_callback' => __CLASS__ . '::waf_permissions_callback', - ) - ); - - register_rest_route( - 'jetpack/v4', - '/waf/update-rules', - array( - 'methods' => WP_REST_Server::EDITABLE, - 'callback' => __CLASS__ . '::update_rules', - 'permission_callback' => __CLASS__ . '::waf_permissions_callback', - ) - ); - - $routes_registered = true; - } - - /** - * Update rules endpoint - * - * @return WP_REST_Response|WP_Error - */ - public static function update_rules() { - try { - Waf_Rules_Manager::generate_automatic_rules(); - Waf_Rules_Manager::generate_rules(); - } catch ( Waf_Exception $e ) { - return $e->get_wp_error(); - } - - return rest_ensure_response( - array( - 'success' => true, - 'message' => __( 'Rules updated succesfully', 'jetpack-waf' ), - ) - ); - } - - /** - * WAF Endpoint - * - * @return WP_REST_Response - */ - public static function waf() { - return rest_ensure_response( Waf_Runner::get_config() ); - } - - /** - * Update WAF Endpoint - * - * @param WP_REST_Request $request The API request. - * - * @return WP_REST_Response|WP_Error - */ - public static function update_waf( $request ) { - // Automatic Rules Enabled - if ( isset( $request[ Waf_Rules_Manager::AUTOMATIC_RULES_ENABLED_OPTION_NAME ] ) ) { - update_option( Waf_Rules_Manager::AUTOMATIC_RULES_ENABLED_OPTION_NAME, (bool) $request->get_param( Waf_Rules_Manager::AUTOMATIC_RULES_ENABLED_OPTION_NAME ) ); - } - - // IP Lists Enabled - if ( isset( $request[ Waf_Rules_Manager::IP_LISTS_ENABLED_OPTION_NAME ] ) ) { - update_option( Waf_Rules_Manager::IP_LISTS_ENABLED_OPTION_NAME, (bool) $request->get_param( Waf_Rules_Manager::IP_LISTS_ENABLED_OPTION_NAME ) ); - } - - // IP Block List - if ( isset( $request[ Waf_Rules_Manager::IP_BLOCK_LIST_OPTION_NAME ] ) ) { - update_option( Waf_Rules_Manager::IP_BLOCK_LIST_OPTION_NAME, $request[ Waf_Rules_Manager::IP_BLOCK_LIST_OPTION_NAME ] ); - } - - // IP Allow List - if ( isset( $request[ Waf_Rules_Manager::IP_ALLOW_LIST_OPTION_NAME ] ) ) { - update_option( Waf_Rules_Manager::IP_ALLOW_LIST_OPTION_NAME, $request[ Waf_Rules_Manager::IP_ALLOW_LIST_OPTION_NAME ] ); - } - - // Share Data - if ( isset( $request[ Waf_Runner::SHARE_DATA_OPTION_NAME ] ) ) { - // If a user disabled the regular share we should disable the debug share data option. - if ( false === $request[ Waf_Runner::SHARE_DATA_OPTION_NAME ] ) { - update_option( Waf_Runner::SHARE_DEBUG_DATA_OPTION_NAME, false ); - } - - update_option( Waf_Runner::SHARE_DATA_OPTION_NAME, (bool) $request[ Waf_Runner::SHARE_DATA_OPTION_NAME ] ); - } - - // Share Debug Data - if ( isset( $request[ Waf_Runner::SHARE_DEBUG_DATA_OPTION_NAME ] ) ) { - // If a user toggles the debug share we should enable the regular share data option. - if ( true === $request[ Waf_Runner::SHARE_DEBUG_DATA_OPTION_NAME ] ) { - update_option( Waf_Runner::SHARE_DATA_OPTION_NAME, true ); - } - - update_option( Waf_Runner::SHARE_DEBUG_DATA_OPTION_NAME, (bool) $request[ Waf_Runner::SHARE_DEBUG_DATA_OPTION_NAME ] ); - } - - // Brute Force Protection - if ( isset( $request['brute_force_protection'] ) ) { - $enable_brute_force = (bool) $request['brute_force_protection']; - $brute_force_protection_toggled = - $enable_brute_force - ? Brute_Force_Protection::enable() - : Brute_Force_Protection::disable(); - - if ( ! $brute_force_protection_toggled ) { - return new WP_Error( - $enable_brute_force - ? 'brute_force_protection_activation_failed' - : 'brute_force_protection_deactivation_failed', - $enable_brute_force - ? __( 'Brute force protection could not be activated.', 'jetpack-waf' ) - : __( 'Brute force protection could not be deactivated.', 'jetpack-waf' ), - array( 'status' => 500 ) - ); - } - } - - // Only attempt to update the WAF if the module is supported - if ( Waf_Runner::is_supported_environment() ) { - try { - Waf_Runner::update_waf(); - } catch ( Waf_Exception $e ) { - return $e->get_wp_error(); - } - } - - return self::waf(); - } - - /** - * WAF Endpoint Permissions Callback - * - * @return bool|WP_Error True if user can view the Jetpack admin page. - */ - public static function waf_permissions_callback() { - if ( current_user_can( 'manage_options' ) ) { - return true; - } - - return new WP_Error( - 'invalid_user_permission_manage_options', - REST_Connector::get_user_permissions_error_msg(), - array( 'status' => rest_authorization_required_code() ) - ); - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-waf/src/class-waf-cli.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-waf/src/class-waf-cli.php deleted file mode 100644 index e7e2c01a..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-waf/src/class-waf-cli.php +++ /dev/null @@ -1,166 +0,0 @@ -] - * : The new mode to be set. - * --- - * options: - * - silent - * - normal - * --- - * - * @param array $args Arguments passed to CLI. - * @return void|null - * @throws WP_CLI\ExitException If there is an error switching the mode. - */ - public function mode( $args ) { - if ( count( $args ) > 1 ) { - - return WP_CLI::error( __( 'Only one mode may be specified.', 'jetpack-waf' ) ); - } - if ( count( $args ) === 1 ) { - if ( ! Waf_Runner::is_allowed_mode( $args[0] ) ) { - - return WP_CLI::error( - sprintf( - /* translators: %1$s is the mode that was actually found. Also note that the expected "silent" and "normal" are hard-coded strings and must therefore stay the same in any translation. */ - __( 'Invalid mode: %1$s. Expected "silent" or "normal".', 'jetpack-waf' ), - $args[0] - ) - ); - } - - update_option( Waf_Runner::MODE_OPTION_NAME, $args[0] ); - - try { - ( new Waf_Standalone_Bootstrap() )->generate(); - } catch ( \Exception $e ) { - WP_CLI::warning( - sprintf( - /* translators: %1$s is the unexpected error message. */ - __( 'Unable to generate waf bootstrap - standalone mode may not work properly: %1$s', 'jetpack-waf' ), - $e->getMessage() - ) - ); - } - - return WP_CLI::success( - sprintf( - /* translators: %1$s is the name of the mode that was just switched to. */ - __( 'Jetpack WAF mode switched to "%1$s".', 'jetpack-waf' ), - get_option( Waf_Runner::MODE_OPTION_NAME ) - ) - ); - } - WP_CLI::line( - sprintf( - /* translators: %1$s is the name of the mode that the waf is currently running in. */ - __( 'Jetpack WAF is running in "%1$s" mode.', 'jetpack-waf' ), - get_option( Waf_Runner::MODE_OPTION_NAME ) - ) - ); - } - - /** - * Setup the WAF to run. - * ## OPTIONS - * - * [] - * : The new mode to be set. - * --- - * options: - * - silent - * - normal - * --- - * - * @param array $args Arguments passed to CLI. - * @return void|null - * @throws WP_CLI\ExitException If there is an error switching the mode. - */ - public function setup( $args ) { - // Let is_allowed_mode know we are running from the CLI - define( 'WAF_CLI_MODE', $args[0] ); - - // Set the mode and generate the bootstrap - $this->mode( array( $args[0] ) ); - - try { - // Add relevant options and generate the rules.php file - Waf_Runner::activate(); - } catch ( \Exception $e ) { - - return WP_CLI::error( - sprintf( - /* translators: %1$s is the unexpected error message. */ - __( 'Jetpack WAF rules file failed to generate: %1$s', 'jetpack-waf' ), - $e->getMessage() - ) - ); - } - - return WP_CLI::success( __( 'Jetpack WAF has successfully been setup.', 'jetpack-waf' ) ); - } - - /** - * Delete the WAF options. - * - * @return void|null - * @throws WP_CLI\ExitException If deactivating has failures. - */ - public function teardown() { - try { - Waf_Runner::deactivate(); - } catch ( \Exception $e ) { - WP_CLI::error( __( 'Jetpack WAF failed to fully deactivate.', 'jetpack-waf' ) ); - } - - return WP_CLI::success( __( 'Jetpack WAF has been deactivated.', 'jetpack-waf' ) ); - } - - /** - * Generate the rules.php file with latest rules for the WAF. - * - * @return void|null - * @throws WP_CLI\ExitException If there is an error switching the mode. - */ - public function generate_rules() { - try { - Waf_Rules_Manager::generate_automatic_rules(); - Waf_Rules_Manager::generate_rules(); - } catch ( \Exception $e ) { - - return WP_CLI::error( - sprintf( - /* translators: %1$s is the unexpected error message. */ - __( 'Jetpack WAF rules file failed to generate: %1$s', 'jetpack-waf' ), - $e->getMessage() - ) - ); - } - - return WP_CLI::success( - sprintf( - /* translators: %1$s is the name of the mode that was just switched to. */ - __( 'Jetpack WAF rules successfully created to: "%1$s".', 'jetpack-waf' ), - Waf_Runner::get_waf_file_path( Waf_Rules_Manager::RULES_ENTRYPOINT_FILE ) - ) - ); - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-waf/src/class-waf-constants.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-waf/src/class-waf-constants.php deleted file mode 100644 index b4c368bb..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-waf/src/class-waf-constants.php +++ /dev/null @@ -1,117 +0,0 @@ -is_atomic_platform(); - $is_atomic_on_jn = defined( 'IS_ATOMIC_JN' ) ?? IS_ATOMIC_JN; - define( 'DISABLE_JETPACK_WAF', $is_wpcom || ( $is_atomic && ! $is_atomic_on_jn ) ); - } - } - - /** - * Set the mode definition if it has not been set. - * - * @return void - */ - public static function define_mode() { - if ( ! defined( 'JETPACK_WAF_MODE' ) ) { - $mode_option = get_option( Waf_Runner::MODE_OPTION_NAME ); - define( 'JETPACK_WAF_MODE', $mode_option ); - } - } - - /** - * Set the share data definition if it has not been set. - * - * @return void - */ - public static function define_share_data() { - if ( ! defined( 'JETPACK_WAF_SHARE_DATA' ) ) { - $share_data_option = false; - if ( function_exists( 'get_option' ) ) { - $share_data_option = get_option( Waf_Runner::SHARE_DATA_OPTION_NAME, false ); - } - - define( 'JETPACK_WAF_SHARE_DATA', $share_data_option ); - } - if ( ! defined( 'JETPACK_WAF_SHARE_DEBUG_DATA' ) ) { - $share_debug_data_option = false; - if ( function_exists( 'get_option' ) ) { - $share_debug_data_option = get_option( Waf_Runner::SHARE_DEBUG_DATA_OPTION_NAME, false ); - } - - define( 'JETPACK_WAF_SHARE_DEBUG_DATA', $share_debug_data_option ); - } - } - - /** - * Set the brute force protection's API host definition if it has not been set. - * - * @return void - */ - public static function define_brute_force_api_host() { - if ( ! defined( 'JETPACK_PROTECT__API_HOST' ) ) { - define( 'JETPACK_PROTECT__API_HOST', 'https://api.bruteprotect.com/' ); - } - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-waf/src/class-waf-initializer.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-waf/src/class-waf-initializer.php deleted file mode 100644 index ffe2d8b0..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-waf/src/class-waf-initializer.php +++ /dev/null @@ -1,244 +0,0 @@ -generate(); - } catch ( Waf_Exception $e ) { - return $e->get_wp_error(); - } - - return true; - } - - /** - * Activate the Brute force protection on module activation. - * - * @return bool True if the Brute force protection activation is successful - */ - public static function on_brute_force_protection_activation() { - $brute_force_protection = Brute_Force_Protection::instance(); - $brute_force_protection->on_activation(); - - return true; - } - - /** - * Deactivate the WAF on module deactivation. - * - * @return bool|WP_Error True if the WAF deactivation is successful, WP_Error otherwise. - */ - public static function on_waf_deactivation() { - try { - Waf_Runner::deactivate(); - } catch ( Waf_Exception $e ) { - return $e->get_wp_error(); - } - - return true; - } - - /** - * Deactivate the Brute force protection on module deactivation. - * - * @return bool True if the Brute force protection deactivation is successful. - */ - public static function on_brute_force_protection_deactivation() { - $brute_force_protection = Brute_Force_Protection::instance(); - $brute_force_protection->on_deactivation(); - - return true; - } - - /** - * Updates the WAF after upgrader process is complete. - * - * @param WP_Upgrader $upgrader WP_Upgrader instance. In other contexts this might be a Theme_Upgrader, Plugin_Upgrader, Core_Upgrade, or Language_Pack_Upgrader instance. - * @param array $hook_extra Array of bulk item update data. - * - * @return void - */ - public static function update_waf_after_plugin_upgrade( $upgrader, $hook_extra ) { - $jetpack_text_domains_with_waf = array( 'jetpack', 'jetpack-protect' ); - $jetpack_plugins_with_waf = array( 'jetpack/jetpack.php', 'jetpack-protect/jetpack-protect.php' ); - - // Only run on upgrades affecting plugins - if ( 'plugin' !== $hook_extra['type'] ) { - return; - } - - // Only run on updates and installations - if ( 'update' !== $hook_extra['action'] && 'install' !== $hook_extra['action'] ) { - return; - } - - // Only run when Jetpack plugins were affected - if ( 'update' === $hook_extra['action'] && - ! empty( $hook_extra['plugins'] ) && - empty( array_intersect( $jetpack_plugins_with_waf, $hook_extra['plugins'] ) ) - ) { - return; - } - if ( 'install' === $hook_extra['action'] && - ! empty( $upgrader->new_plugin_data['TextDomain'] ) && - empty( in_array( $upgrader->new_plugin_data['TextDomain'], $jetpack_text_domains_with_waf, true ) ) - ) { - return; - } - - update_option( self::NEEDS_UPDATE_OPTION_NAME, true ); - } - - /** - * Check for WAF update - * - * Updates the WAF when the "needs update" option is enabled. - * - * @return bool|WP_Error True if the WAF is up-to-date or was sucessfully updated, WP_Error if the update failed. - */ - public static function check_for_updates() { - if ( get_option( self::NEEDS_UPDATE_OPTION_NAME ) ) { - if ( Waf_Runner::is_supported_environment() ) { - // Compatiblity patch for cases where an outdated WAF_Constants class has been - // autoloaded by the standalone bootstrap execution at the beginning of the current request. - if ( ! method_exists( Waf_Constants::class, 'define_mode' ) ) { - try { - ( new Waf_Standalone_Bootstrap() )->generate(); - } catch ( Waf_Exception $e ) { - return $e->get_wp_error(); - } - } - - Waf_Compatibility::run_compatibility_migrations(); - - Waf_Constants::define_mode(); - if ( ! Waf_Runner::is_allowed_mode( JETPACK_WAF_MODE ) ) { - return new WP_Error( 'waf_mode_invalid', 'Invalid firewall mode.' ); - } - - try { - Waf_Rules_Manager::generate_ip_rules(); - Waf_Rules_Manager::generate_rules(); - ( new Waf_Standalone_Bootstrap() )->generate(); - } catch ( Waf_Exception $e ) { - return $e->get_wp_error(); - } - } else { - // If the site doesn't support the request firewall, - // just migrate the IP allow list used by brute force protection. - Waf_Compatibility::migrate_brute_force_protection_ip_allow_list(); - } - - update_option( self::NEEDS_UPDATE_OPTION_NAME, false ); - } - - return true; - } - - /** - * Disables the WAF module when on an unsupported platform in Jetpack. - * - * @param array $modules Filterable value for `jetpack_get_available_modules`. - * - * @return array Array of module slugs. - */ - public static function remove_module_on_unsupported_environments( $modules ) { - if ( ! Waf_Runner::is_supported_environment() ) { - // WAF should never be available on unsupported platforms. - unset( $modules['waf'] ); - } - - return $modules; - } - - /** - * Disables the WAF module when on an unsupported platform in a standalone plugin. - * - * @param array $modules Filterable value for `jetpack_get_available_standalone_modules`. - * - * @return array Array of module slugs. - */ - public static function remove_standalone_module_on_unsupported_environments( $modules ) { - if ( ! Waf_Runner::is_supported_environment() ) { - // WAF should never be available on unsupported platforms. - $modules = array_filter( - $modules, - function ( $module ) { - return $module !== 'waf'; - } - ); - - } - - return $modules; - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-waf/src/class-waf-operators.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-waf/src/class-waf-operators.php deleted file mode 100644 index 6e2bdceb..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-waf/src/class-waf-operators.php +++ /dev/null @@ -1,286 +0,0 @@ -= intval( $test ) - ? $input - : false; - } - - /** - * Returns true if the input value is greater than the test value. - * If either value cannot be converted to an int it will be treated as 0. - * - * @param mixed $input Input. - * @param mixed $test Test. - * @return int|false - */ - public function gt( $input, $test ) { - return intval( $input ) > intval( $test ) - ? $input - : false; - } - - /** - * Returns true if the input value is less than or equal to the test value. - * If either value cannot be converted to an int it will be treated as 0. - * - * @param mixed $input Input. - * @param mixed $test Test. - * @return int|false - */ - public function le( $input, $test ) { - return intval( $input ) <= intval( $test ) - ? $input - : false; - } - - /** - * Returns true if the input value is less than the test value. - * If either value cannot be converted to an int it will be treated as 0. - * - * @param mixed $input Input. - * @param mixed $test Test. - * @return int|false - */ - public function lt( $input, $test ) { - return intval( $input ) < intval( $test ) - ? $input - : false; - } - - /** - * Returns false. - * - * @return false - */ - public function no_match() { - return false; - } - - /** - * Uses a multi-string matching algorithm to search through $input for a number of given $words. - * - * @param string $input Input. - * @param string[] $words \AhoCorasick\MultiStringMatcher $matcher. - * @return string[]|false Returns the words that were found in $input, or FALSE if no words were found. - */ - public function pm( $input, $words ) { - $results = $this->get_multi_string_matcher( $words )->searchIn( $input ); - - return isset( $results[0] ) - ? array_map( - function ( $r ) { - return $r[1]; }, - $results - ) - : false; - } - - /** - * The last-used pattern-matching algorithm. - * - * @var array - */ - private $last_multi_string_matcher = array( null, null ); - - /** - * Creates a matcher that uses the Aho-Corasick algorithm to efficiently find a number of words in an input string. - * Caches the last-used matcher so that the same word list doesn't have to be compiled multiple times. - * - * @param string[] $words Words. - * @return \AhoCorasick\MultiStringMatcher - */ - private function get_multi_string_matcher( $words ) { - // only create a new matcher entity if we don't have one already for this word list. - if ( $this->last_multi_string_matcher[0] !== $words ) { - $this->last_multi_string_matcher = array( $words, new \AhoCorasick\MultiStringMatcher( $words ) ); - } - - return $this->last_multi_string_matcher[1]; - } - - /** - * Performs a regular expression match on the input subject using the given pattern. - * Returns false if the pattern does not match, or the substring(s) of the input - * that were matched by the pattern. - * - * @param string $subject Subject. - * @param string $pattern Pattern. - * @return string[]|false - */ - public function rx( $subject, $pattern ) { - $matched = preg_match( $pattern, $subject, $matches ); - return 1 === $matched - ? $matches - : false; - } - - /** - * Returns true if the given input string matches the test string. - * - * @param string $input Input. - * @param string $test Test. - * @return string|false - */ - public function streq( $input, $test ) { - return $input === $test - ? $test - : false; - } - - /** - * Returns true. - * - * @param string $input Input. - * @return bool - */ - public function unconditional_match( $input ) { - return $input; - } - - /** - * Checks to see if the input string only contains characters within the given byte range - * - * @param string $input Input. - * @param array $valid_range Valid range. - * @return string - */ - public function validate_byte_range( $input, $valid_range ) { - if ( '' === $input ) { - // an empty string is considered "valid". - return false; - } - $i = 0; - while ( isset( $input[ $i ] ) ) { - $n = ord( $input[ $i ] ); - if ( $n < $valid_range['min'] || $n > $valid_range['max'] ) { - return $input[ $i ]; - } - $valid = false; - foreach ( $valid_range['range'] as $b ) { - if ( $n === $b || is_array( $b ) && $n >= $b[0] && $n <= $b[1] ) { - $valid = true; - break; - } - } - if ( ! $valid ) { - return $input[ $i ]; - } - ++$i; - } - - // if there weren't any invalid bytes, return false. - return false; - } - - /** - * Returns true if the input value is found anywhere inside the test value - * (i.e. the inverse of @contains) - * - * @param mixed $input Input. - * @param mixed $test Test. - * @return string|false - */ - public function within( $input, $test ) { - if ( '' === $input || '' === $test ) { - return false; - } - - return strpos( $test, $input ) !== false - ? $input - : false; - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-waf/src/class-waf-request.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-waf/src/class-waf-request.php deleted file mode 100644 index 773766f4..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-waf/src/class-waf-request.php +++ /dev/null @@ -1,371 +0,0 @@ -url = [ 'https://wordpress.com', '/index.php', '?myvar=red' ] - * @var array{ 0: string, 1: string, 2: string }|null - */ - protected $url = null; - - /** - * Trusted proxies. - * - * @var array List of trusted proxy IP addresses. - */ - private $trusted_proxies = array(); - - /** - * Trusted headers. - * - * @var array List of headers to trust from the trusted proxies. - */ - private $trusted_headers = array(); - - /** - * Sets the list of IP addresses for the proxies to trust. Trusted headers will only be accepted as the - * user IP address from these IP adresses. - * - * Popular choices include: - * - 192.168.0.1 - * - 10.0.0.1 - * - * @param array $proxies List of proxy IP addresses. - * @return void - */ - public function set_trusted_proxies( $proxies ) { - $this->trusted_proxies = (array) $proxies; - } - - /** - * Sets the list of headers to be trusted from the proxies. These headers will only be taken into account - * if the request comes from a trusted proxy as configured with set_trusted_proxies(). - * - * Popular choices include: - * - HTTP_CLIENT_IP - * - HTTP_X_FORWARDED_FOR - * - HTTP_X_FORWARDED - * - HTTP_X_CLUSTER_CLIENT_IP - * - HTTP_FORWARDED_FOR - * - HTTP_FORWARDED - * - * @param array $headers List of HTTP header strings. - * @return void - */ - public function set_trusted_headers( $headers ) { - $this->trusted_headers = (array) $headers; - } - - /** - * Determines the users real IP address based on the settings passed to set_trusted_proxies() and - * set_trusted_headers() before. On CLI, this will be null. - * - * @return string|null - */ - public function get_real_user_ip_address() { - $remote_addr = ! empty( $_SERVER['REMOTE_ADDR'] ) ? wp_unslash( $_SERVER['REMOTE_ADDR'] ) : null; // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized - - if ( in_array( $remote_addr, $this->trusted_proxies, true ) ) { - $ip_by_header = $this->get_ip_by_header( array_merge( $this->trusted_headers, array( 'REMOTE_ADDR' ) ) ); - if ( ! empty( $ip_by_header ) ) { - return $ip_by_header; - } - } - - return $remote_addr; - } - - /** - * Iterates through a given list of HTTP headers and attempts to get the IP address from the header that - * a proxy sends along. Make sure you trust the IP address before calling this method. - * - * @param array $headers The list of headers to check. - * @return string|null - */ - private function get_ip_by_header( $headers ) { - foreach ( $headers as $key ) { - if ( isset( $_SERVER[ $key ] ) ) { - foreach ( explode( ',', wp_unslash( $_SERVER[ $key ] ) ) as $ip ) { // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- filter_var is applied below. - $ip = trim( $ip ); - - if ( filter_var( $ip, FILTER_VALIDATE_IP ) !== false ) { - return $ip; - } - } - } - } - - return null; - } - - /** - * Returns the headers that were sent with this request - * - * @return array{ 0: string, 1: scalar }[] - */ - public function get_headers() { - $value = array(); - $has_content_type = false; - $has_content_length = false; - foreach ( $_SERVER as $k => $v ) { - $k = strtolower( $k ); - if ( 'http_' === substr( $k, 0, 5 ) ) { - $value[] = array( $this->normalize_header_name( substr( $k, 5 ) ), $v ); - } elseif ( 'content_type' === $k && '' !== $v ) { - $has_content_type = true; - $value[] = array( 'content-type', $v ); - } elseif ( 'content_length' === $k && '' !== $v ) { - $has_content_length = true; - $value[] = array( 'content-length', $v ); - } - } - if ( ! $has_content_type ) { - // default Content-Type per RFC 7231 section 3.1.5.5. - $value[] = array( 'content-type', 'application/octet-stream' ); - } - if ( ! $has_content_length ) { - $value[] = array( 'content-length', '0' ); - } - - return $value; - } - - /** - * Returns the value of a specific header that was sent with this request - * - * @param string $name The name of the header to retrieve. - * @return string - */ - public function get_header( $name ) { - $name = $this->normalize_header_name( $name ); - foreach ( $this->get_headers() as list( $header_name, $header_value ) ) { - if ( $header_name === $name ) { - return $header_value; - } - } - return ''; - } - - /** - * Change a header name to all-lowercase and replace spaces and underscores with dashes. - * - * @param string $name The header name to normalize. - * @return string - */ - public function normalize_header_name( $name ) { - return str_replace( array( ' ', '_' ), '-', strtolower( $name ) ); - } - - /** - * Get the method for this request (GET, POST, etc). - * - * @return string - */ - public function get_method() { - return isset( $_SERVER['REQUEST_METHOD'] ) - ? filter_var( wp_unslash( $_SERVER['REQUEST_METHOD'] ), FILTER_DEFAULT ) - : ''; - } - - /** - * Get the protocol for this request (HTTP, HTTPS, etc) - * - * @return string - */ - public function get_protocol() { - return isset( $_SERVER['SERVER_PROTOCOL'] ) - ? filter_var( wp_unslash( $_SERVER['SERVER_PROTOCOL'] ), FILTER_DEFAULT ) - : ''; - } - - /** - * Returns the URL parts for this request. - * - * @see $this->url - * @return array{ 0: string, 1: string, 2: string } - */ - protected function get_url() { - if ( null !== $this->url ) { - return $this->url; - } - - $uri = isset( $_SERVER['REQUEST_URI'] ) ? filter_var( wp_unslash( $_SERVER['REQUEST_URI'] ), FILTER_DEFAULT ) : '/'; - if ( false !== strpos( $uri, '?' ) ) { - // remove the query string (we'll pull it from elsewhere later) - $uri = urldecode( substr( $uri, 0, strpos( $uri, '?' ) ) ); - } else { - $uri = urldecode( $uri ); - } - $query_string = isset( $_SERVER['QUERY_STRING'] ) ? '?' . filter_var( wp_unslash( $_SERVER['QUERY_STRING'] ), FILTER_DEFAULT ) : ''; - if ( 1 === preg_match( '/^https?:\/\//', $uri ) ) { - // sometimes $_SERVER[REQUEST_URI] already includes the full domain name - $uri_host = substr( $uri, 0, strpos( $uri, '/', 8 ) ); - $uri_path = substr( $uri, strlen( $uri_host ) ); - $this->url = array( $uri_host, $uri_path, $query_string ); - } else { - // otherwise build the URI manually - $uri_scheme = ( ! empty( $_SERVER['HTTPS'] ) && 'off' !== $_SERVER['HTTPS'] ) - ? 'https' - : 'http'; - $uri_host = isset( $_SERVER['HTTP_HOST'] ) - ? filter_var( wp_unslash( $_SERVER['HTTP_HOST'] ), FILTER_DEFAULT ) - : ( - isset( $_SERVER['SERVER_NAME'] ) - ? filter_var( wp_unslash( $_SERVER['SERVER_NAME'] ), FILTER_DEFAULT ) - : '' - ); - $uri_port = isset( $_SERVER['SERVER_PORT'] ) - ? filter_var( wp_unslash( $_SERVER['SERVER_PORT'] ), FILTER_SANITIZE_NUMBER_INT ) - : ''; - // we only need to include the port if it's non-standard - if ( $uri_port && ( 'http' === $uri_scheme && '80' !== $uri_port || 'https' === $uri_scheme && '443' !== $uri_port ) ) { - $uri_port = ':' . $uri_port; - } else { - $uri_port = ''; - } - $this->url = array( - $uri_scheme . '://' . $uri_host . $uri_port, - $uri, - $query_string, - ); - } - return $this->url; - } - - /** - * Get the requested URI - * - * @param boolean $include_host If true, the scheme and domain will be included in the returned string (i.e. 'https://wordpress.com/index.php). - * If false, only the requested URI path will be returned (i.e. '/index.php'). - * @return string - */ - public function get_uri( $include_host = false ) { - list( $host, $file, $query ) = $this->get_url(); - - return ( $include_host ? $host : '' ) . $file . $query; - } - - /** - * Return the filename part of the request - * - * @example for 'https://wordpress.com/some/page?id=5', return '/some/page' - * @return string - */ - public function get_filename() { - return $this->get_url()[1]; - } - - /** - * Return the basename part of the request - * - * @example for 'https://wordpress.com/some/page.php?id=5', return 'page.php' - * @return string - */ - public function get_basename() { - // Get the filename part of the request - $filename = $this->get_filename(); - // Normalize slashes - $filename = str_replace( '\\', '/', $filename ); - // Remove trailing slashes - $filename = rtrim( $filename, '/' ); - // Return the basename - $offset = strrpos( $filename, '/' ); - return $offset !== false ? substr( $filename, $offset + 1 ) : $filename; - } - - /** - * Return the query string. If present, it will be prefixed with '?'. Otherwise, it will be an empty string. - * - * @return string - */ - public function get_query_string() { - return $this->get_url()[2]; - } - - /** - * Returns the request body. - * - * @return string - */ - public function get_body() { - $body = file_get_contents( 'php://input' ); - return false === $body ? '' : $body; - } - - /** - * Returns the cookies - * - * @return array - */ - public function get_cookies() { - return flatten_array( $_COOKIE ); - } - - /** - * Returns the GET variables - * - * @return array - */ - public function get_get_vars() { - return flatten_array( $_GET ); - } - - /** - * Returns the POST variables - * - * @return array - */ - public function get_post_vars() { - // Attempt to decode JSON requests. - if ( strpos( $this->get_header( 'content-type' ), 'application/json' ) !== false ) { - $decoded_json = json_decode( $this->get_body(), true ) ?? array(); - return flatten_array( $decoded_json, 'json', true ); - } - - return flatten_array( $_POST ); - } - - /** - * Returns the files that were uploaded with this request (i.e. what's in the $_FILES superglobal) - * - * @return RequestFile[] - */ - public function get_files() { - $files = array(); - foreach ( $_FILES as $field_name => $arr ) { - // flatten the values in case we were given inputs with brackets - foreach ( flatten_array( $arr ) as list( $arr_key, $arr_value ) ) { - if ( $arr_key === 'name' ) { - // if this file was a simple (non-nested) name and unique, then just add it. - $files[] = array( - 'name' => $field_name, - 'filename' => $arr_value, - ); - } elseif ( 'name[' === substr( $arr_key, 0, 5 ) ) { - // otherwise this was a file with a nested name and/or multiple files with the same name - $files[] = array( - 'name' => $field_name . substr( $arr_key, 4 ), - 'filename' => $arr_value, - ); - } - } - } - return $files; - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-waf/src/class-waf-rules-manager.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-waf/src/class-waf-rules-manager.php deleted file mode 100644 index 2c9f8901..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-waf/src/class-waf-rules-manager.php +++ /dev/null @@ -1,323 +0,0 @@ -get_wp_error(); - } - - update_option( self::RULE_LAST_UPDATED_OPTION_NAME, time() ); - return true; - } - - /** - * Re-activate the WAF any time an option is added or updated. - * - * @return bool|WP_Error True if re-activation is successful, WP_Error on failure. - */ - public static function reactivate_on_rules_option_change() { - try { - Waf_Runner::activate(); - } catch ( Waf_Exception $e ) { - return $e->get_wp_error(); - } - - return true; - } - - /** - * Updates the rule set if rules version has changed - * - * @throws Waf_Exception If the firewall mode is invalid. - * @throws Waf_Exception If the rules update fails. - * - * @return void - */ - public static function update_rules_if_changed() { - Waf_Constants::define_mode(); - if ( ! Waf_Runner::is_allowed_mode( JETPACK_WAF_MODE ) ) { - throw new Waf_Exception( 'Invalid firewall mode.' ); - } - $version = get_option( self::VERSION_OPTION_NAME ); - if ( self::RULES_VERSION !== $version ) { - self::generate_automatic_rules(); - self::generate_ip_rules(); - self::generate_rules(); - - update_option( self::VERSION_OPTION_NAME, self::RULES_VERSION ); - } - } - - /** - * Retrieve rules from the API - * - * @throws Waf_Exception If site is not registered. - * @throws Rules_API_Exception If API did not respond 200. - * @throws Rules_API_Exception If data is missing from response. - * - * @return array - */ - public static function get_rules_from_api() { - $blog_id = Jetpack_Options::get_option( 'id' ); - if ( ! $blog_id ) { - throw new Waf_Exception( 'Site is not registered' ); - } - - $response = Client::wpcom_json_api_request_as_blog( - sprintf( '/sites/%s/waf-rules', $blog_id ), - '2', - array(), - null, - 'wpcom' - ); - - $response_code = wp_remote_retrieve_response_code( $response ); - - if ( 200 !== $response_code ) { - throw new Rules_API_Exception( 'API connection failed.', (int) $response_code ); - } - - $rules_json = wp_remote_retrieve_body( $response ); - $rules = json_decode( $rules_json, true ); - - if ( empty( $rules['data'] ) ) { - throw new Rules_API_Exception( 'Data missing from response.' ); - } - - return $rules['data']; - } - - /** - * Wraps a require statement in a file_exists check. - * - * @param string $required_file The file to check if exists and require. - * @param string $return_code The PHP code to execute if the file require returns true. Defaults to 'return;'. - * - * @return string The wrapped require statement. - */ - private static function wrap_require( $required_file, $return_code = 'return;' ) { - return "if ( file_exists( '$required_file' ) ) { if ( require( '$required_file' ) ) { $return_code } }"; - } - - /** - * Generates the rules.php script - * - * @global \WP_Filesystem_Base $wp_filesystem WordPress filesystem abstraction. - * - * @throws File_System_Exception If file writing fails initializing rule files. - * @throws File_System_Exception If file writing fails writing to the rules entrypoint file. - * - * @return void - */ - public static function generate_rules() { - global $wp_filesystem; - Waf_Runner::initialize_filesystem(); - - $rules = "is_dir( dirname( $entrypoint_file_path ) ) ) { - $wp_filesystem->mkdir( dirname( $entrypoint_file_path ) ); - } - - // Ensure all potentially required rule files exist - $rule_files = array( self::RULES_ENTRYPOINT_FILE, self::AUTOMATIC_RULES_FILE, self::IP_ALLOW_RULES_FILE, self::IP_BLOCK_RULES_FILE ); - foreach ( $rule_files as $rule_file ) { - $rule_file = Waf_Runner::get_waf_file_path( $rule_file ); - if ( ! $wp_filesystem->is_file( $rule_file ) ) { - if ( ! $wp_filesystem->put_contents( $rule_file, "block( 'block', -1, 'ip block list' );" ) . "\n"; - } - - // Add automatic rules - if ( get_option( self::AUTOMATIC_RULES_ENABLED_OPTION_NAME ) ) { - $rules .= self::wrap_require( Waf_Runner::get_waf_file_path( self::AUTOMATIC_RULES_FILE ) ) . "\n"; - } - - // Update the rules file - if ( ! $wp_filesystem->put_contents( $entrypoint_file_path, $rules ) ) { - throw new File_System_Exception( 'Failed writing rules file to: ' . $entrypoint_file_path ); - } - } - - /** - * Generates the automatic-rules.php script - * - * @global \WP_Filesystem_Base $wp_filesystem WordPress filesystem abstraction. - * - * @throws Waf_Exception If rules cannot be fetched from the API. - * @throws File_System_Exception If file writing fails. - * - * @return void - */ - public static function generate_automatic_rules() { - global $wp_filesystem; - Waf_Runner::initialize_filesystem(); - - $automatic_rules_file_path = Waf_Runner::get_waf_file_path( self::AUTOMATIC_RULES_FILE ); - - // Ensure that the folder exists. - if ( ! $wp_filesystem->is_dir( dirname( $automatic_rules_file_path ) ) ) { - $wp_filesystem->mkdir( dirname( $automatic_rules_file_path ) ); - } - - try { - $rules = self::get_rules_from_api(); - } catch ( Waf_Exception $e ) { - // Do not throw API exceptions for users who do not have access - if ( 401 !== $e->getCode() ) { - throw $e; - } - } - - // If there are no rules available, don't overwrite the existing file. - if ( empty( $rules ) ) { - return; - } - - if ( ! $wp_filesystem->put_contents( $automatic_rules_file_path, $rules ) ) { - throw new File_System_Exception( 'Failed writing automatic rules file to: ' . $automatic_rules_file_path ); - } - - update_option( self::AUTOMATIC_RULES_LAST_UPDATED_OPTION_NAME, time() ); - } - - /** - * Generates the rules.php script - * - * @global \WP_Filesystem_Base $wp_filesystem WordPress filesystem abstraction. - * - * @throws File_System_Exception If writing to IP allow list file fails. - * @throws File_System_Exception If writing to IP block list file fails. - * - * @return void - */ - public static function generate_ip_rules() { - global $wp_filesystem; - Waf_Runner::initialize_filesystem(); - - $allow_ip_file_path = Waf_Runner::get_waf_file_path( self::IP_ALLOW_RULES_FILE ); - $block_ip_file_path = Waf_Runner::get_waf_file_path( self::IP_BLOCK_RULES_FILE ); - - // Ensure that the folders exists. - if ( ! $wp_filesystem->is_dir( dirname( $allow_ip_file_path ) ) ) { - $wp_filesystem->mkdir( dirname( $allow_ip_file_path ) ); - } - if ( ! $wp_filesystem->is_dir( dirname( $block_ip_file_path ) ) ) { - $wp_filesystem->mkdir( dirname( $block_ip_file_path ) ); - } - - $allow_list = IP_Utils::get_ip_addresses_from_string( get_option( self::IP_ALLOW_LIST_OPTION_NAME ) ); - $block_list = IP_Utils::get_ip_addresses_from_string( get_option( self::IP_BLOCK_LIST_OPTION_NAME ) ); - - $allow_rules_content = ''; - // phpcs:disable WordPress.PHP.DevelopmentFunctions - $allow_rules_content .= '$waf_allow_list = ' . var_export( $allow_list, true ) . ";\n"; - // phpcs:enable - $allow_rules_content .= 'return $waf->is_ip_in_array( $waf_allow_list );' . "\n"; - - if ( ! $wp_filesystem->put_contents( $allow_ip_file_path, "is_ip_in_array( $waf_block_list );' . "\n"; - - if ( ! $wp_filesystem->put_contents( $block_ip_file_path, "is_wpcom_simple() ) { - return false; - } - - // Do not run on the Atomic platform - if ( ( new Host() )->is_atomic_platform() ) { - return false; - } - - // Do not run on the VIP platform - if ( ( new Host() )->is_vip_site() ) { - return false; - } - - return true; - } - - /** - * Determines if the WAF module is enabled on the site. - * - * @return bool - */ - public static function is_enabled() { - // if ABSPATH is defined, then WordPress has already been instantiated, - // so we can check to see if the waf module is activated. - if ( defined( 'ABSPATH' ) ) { - return ( new Modules() )->is_active( self::WAF_MODULE_NAME ); - } - - return true; - } - - /** - * Enables the WAF module on the site. - * - * @return bool - */ - public static function enable() { - return ( new Modules() )->activate( self::WAF_MODULE_NAME, false, false ); - } - - /** - * Disabled the WAF module on the site. - * - * @return bool - */ - public static function disable() { - return ( new Modules() )->deactivate( self::WAF_MODULE_NAME ); - } - - /** - * Get Config - * - * @return array The WAF settings and current configuration data. - */ - public static function get_config() { - return array( - Waf_Rules_Manager::AUTOMATIC_RULES_ENABLED_OPTION_NAME => get_option( Waf_Rules_Manager::AUTOMATIC_RULES_ENABLED_OPTION_NAME ), - Waf_Rules_Manager::IP_LISTS_ENABLED_OPTION_NAME => get_option( Waf_Rules_Manager::IP_LISTS_ENABLED_OPTION_NAME ), - Waf_Rules_Manager::IP_ALLOW_LIST_OPTION_NAME => get_option( Waf_Rules_Manager::IP_ALLOW_LIST_OPTION_NAME ), - Waf_Rules_Manager::IP_BLOCK_LIST_OPTION_NAME => get_option( Waf_Rules_Manager::IP_BLOCK_LIST_OPTION_NAME ), - self::SHARE_DATA_OPTION_NAME => get_option( self::SHARE_DATA_OPTION_NAME ), - self::SHARE_DEBUG_DATA_OPTION_NAME => get_option( self::SHARE_DEBUG_DATA_OPTION_NAME ), - 'bootstrap_path' => self::get_bootstrap_file_path(), - 'standalone_mode' => self::get_standalone_mode_status(), - 'automatic_rules_available' => (bool) self::automatic_rules_available(), - 'brute_force_protection' => (bool) Brute_Force_Protection::is_enabled(), - ); - } - - /** - * Get Bootstrap File Path - * - * @return string The path to the Jetpack Firewall's bootstrap.php file. - */ - private static function get_bootstrap_file_path() { - $bootstrap = new Waf_Standalone_Bootstrap(); - return $bootstrap->get_bootstrap_file_path(); - } - - /** - * Get WAF standalone mode status - * - * @return bool|array True if WAF standalone mode is enabled, false otherwise. - */ - public static function get_standalone_mode_status() { - return defined( 'JETPACK_WAF_RUN' ) && JETPACK_WAF_RUN === 'preload'; - } - - /** - * Get WAF File Path - * - * @param string $file The file path starting in the WAF directory. - * @return string The full file path to the provided file in the WAF directory. - */ - public static function get_waf_file_path( $file ) { - Waf_Constants::define_waf_directory(); - - // Ensure the file path starts with a slash. - if ( '/' !== substr( $file, 0, 1 ) ) { - $file = "/$file"; - } - - return JETPACK_WAF_DIR . $file; - } - - /** - * Runs the WAF and potentially stops the request if a problem is found. - * - * @return void - */ - public static function run() { - // Make double-sure we are only running once. - if ( self::did_run() ) { - return; - } - - Waf_Constants::initialize_constants(); - - // if ABSPATH is defined, then WordPress has already been instantiated, - // and we're running as a plugin (meh). Otherwise, we're running via something - // like PHP's prepend_file setting (yay!). - define( 'JETPACK_WAF_RUN', defined( 'ABSPATH' ) ? 'plugin' : 'preload' ); - - // if the WAF is being run before a command line script, don't try to execute rules (there's no request). - if ( PHP_SAPI === 'cli' ) { - return; - } - - // if something terrible happens during the WAF running, we don't want to interfere with the rest of the site, - // so we intercept errors ONLY while the WAF is running, then we remove our handler after the WAF finishes. - $display_errors = ini_get( 'display_errors' ); - // phpcs:ignore - ini_set( 'display_errors', 'Off' ); - // phpcs:ignore - set_error_handler( array( self::class, 'errorHandler' ) ); - - try { - - // phpcs:ignore - $waf = new Waf_Runtime( new Waf_Transforms(), new Waf_Operators() ); - - // execute waf rules. - $rules_file_path = self::get_waf_file_path( Waf_Rules_Manager::RULES_ENTRYPOINT_FILE ); - if ( file_exists( $rules_file_path ) ) { - // phpcs:ignore - include $rules_file_path; - } - } catch ( \Exception $err ) { // phpcs:ignore - // Intentionally doing nothing. - } - - // remove the custom error handler, so we don't interfere with the site. - restore_error_handler(); - // phpcs:ignore - ini_set( 'display_errors', $display_errors ); - } - - /** - * Error handler to be used while the WAF is being executed. - * - * @param int $code The error code. - * @param string $message The error message. - * @param string $file File with the error. - * @param string $line Line of the error. - * @return void - */ - public static function errorHandler( $code, $message, $file, $line ) { // phpcs:ignore - // Intentionally doing nothing for now. - } - - /** - * Initializes the WP filesystem and WAF directory structure. - * - * @throws File_System_Exception If filesystem is unavailable. - * - * @return void - */ - public static function initialize_filesystem() { - if ( ! function_exists( '\\WP_Filesystem' ) ) { - require_once ABSPATH . 'wp-admin/includes/file.php'; - } - - if ( ! \WP_Filesystem() ) { - throw new File_System_Exception( 'No filesystem available.' ); - } - - self::initialize_waf_directory(); - } - - /** - * Activates the WAF by generating the rules script and setting the version - * - * @throws Waf_Exception If the firewall mode is invalid. - * @throws Waf_Exception If the activation fails. - * - * @return void - */ - public static function activate() { - Waf_Constants::define_mode(); - if ( ! self::is_allowed_mode( JETPACK_WAF_MODE ) ) { - throw new Waf_Exception( 'Invalid firewall mode.' ); - } - - $version = get_option( Waf_Rules_Manager::VERSION_OPTION_NAME ); - if ( ! $version ) { - add_option( Waf_Rules_Manager::VERSION_OPTION_NAME, Waf_Rules_Manager::RULES_VERSION ); - } - - add_option( self::SHARE_DATA_OPTION_NAME, true ); - - self::initialize_filesystem(); - - Waf_Rules_Manager::generate_automatic_rules(); - Waf_Rules_Manager::generate_ip_rules(); - Waf_Rules_Manager::generate_rules(); - - self::create_blocklog_table(); - } - - /** - * Ensures that the waf directory is created. - * - * @throws File_System_Exception If filesystem is unavailable. - * @throws File_System_Exception If creating the directory fails. - * - * @return void - */ - public static function initialize_waf_directory() { - WP_Filesystem(); - Waf_Constants::define_waf_directory(); - - global $wp_filesystem; - if ( ! $wp_filesystem ) { - throw new File_System_Exception( 'Can not work without the file system being initialized.' ); - } - - if ( ! $wp_filesystem->is_dir( JETPACK_WAF_DIR ) ) { - if ( ! $wp_filesystem->mkdir( JETPACK_WAF_DIR ) ) { - throw new File_System_Exception( 'Failed creating WAF file directory: ' . JETPACK_WAF_DIR ); - } - } - } - - /** - * Create the log table when plugin is activated. - * - * @return void - */ - public static function create_blocklog_table() { - global $wpdb; - - require_once ABSPATH . 'wp-admin/includes/upgrade.php'; - - $sql = " - CREATE TABLE {$wpdb->prefix}jetpack_waf_blocklog ( - log_id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT, - timestamp datetime NOT NULL, - rule_id BIGINT NOT NULL, - reason longtext NOT NULL, - PRIMARY KEY (log_id), - KEY timestamp (timestamp) - ) - "; - - dbDelta( $sql ); - } - - /** - * Deactivates the WAF by deleting the relevant options and emptying rules file. - * - * @throws File_System_Exception If file writing fails. - * - * @return void - */ - public static function deactivate() { - delete_option( self::MODE_OPTION_NAME ); - delete_option( Waf_Rules_Manager::VERSION_OPTION_NAME ); - - global $wp_filesystem; - self::initialize_filesystem(); - - // If the rules file doesn't exist, there's nothing else to do. - if ( ! $wp_filesystem->exists( self::get_waf_file_path( Waf_Rules_Manager::RULES_ENTRYPOINT_FILE ) ) ) { - return; - } - - // Empty the rules entrypoint file. - if ( ! $wp_filesystem->put_contents( self::get_waf_file_path( Waf_Rules_Manager::RULES_ENTRYPOINT_FILE ), "generate(); - } - - /** - * Check if an automatic rules file is available - * - * @return bool False if an automatic rules file is not available, true otherwise - */ - public static function automatic_rules_available() { - $automatic_rules_last_updated = get_option( Waf_Rules_Manager::AUTOMATIC_RULES_LAST_UPDATED_OPTION_NAME ); - - // If we do not have a automatic rules last updated timestamp cached, return false. - if ( ! $automatic_rules_last_updated ) { - return false; - } - - // Validate that the automatic rules file exists and is not empty. - global $wp_filesystem; - - try { - self::initialize_filesystem(); - } catch ( Waf_Exception $e ) { - return false; - } - - $automatic_rules_file_contents = $wp_filesystem->get_contents( self::get_waf_file_path( Waf_Rules_Manager::AUTOMATIC_RULES_FILE ) ); - - // If the automatic rules file was removed or is now empty, return false. - if ( ! $automatic_rules_file_contents || " - */ -class Waf_Runtime { - /** - * If used, normalize_array_targets() will just return the number of matching values, instead of the values themselves. - */ - const NORMALIZE_ARRAY_COUNT = 1; - /** - * If used, normalize_array_targets() will apply "only" and "except" filters to the values of the source array, instead of the keys. - */ - const NORMALIZE_ARRAY_MATCH_VALUES = 2; - - /** - * Last rule. - * - * @var string - */ - public $last_rule = ''; - /** - * Matched vars. - * - * @var array - */ - public $matched_vars = array(); - /** - * Matched var. - * - * @var string - */ - public $matched_var = ''; - /** - * Matched var names. - * - * @var array - */ - public $matched_var_names = array(); - /** - * Matched var name. - * - * @var string - */ - public $matched_var_name = ''; - - /** - * State. - * - * @var array - */ - private $state = array(); - /** - * Metadata. - * - * @var array - */ - private $metadata = array(); - - /** - * Transforms. - * - * @var Waf_Transforms - */ - private $transforms; - /** - * Operators. - * - * @var Waf_Operators - */ - private $operators; - - /** - * The request - * - * @var Waf_Request - */ - private $request; - - /** - * Rules to remove. - * - * @var array[] - */ - private $rules_to_remove = array( - 'id' => array(), - 'tag' => array(), - ); - - /** - * Targets to remove. - * - * @var array[] - */ - private $targets_to_remove = array( - 'id' => array(), - 'tag' => array(), - ); - - /** - * Constructor method. - * - * @param Waf_Transforms $transforms Transforms. - * @param Waf_Operators $operators Operators. - * @param Waf_Request? $request Information about the request. - */ - public function __construct( $transforms, $operators, $request = null ) { - $this->transforms = $transforms; - $this->operators = $operators; - $this->request = null === $request - ? new Waf_Request() - : $request; - } - - /** - * Rule removed method. - * - * @param string $id Ids. - * @param string[] $tags Tags. - */ - public function rule_removed( $id, $tags ) { - if ( isset( $this->rules_to_remove['id'][ $id ] ) ) { - return true; - } - foreach ( $tags as $tag ) { - if ( isset( $this->rules_to_remove['tag'][ $tag ] ) ) { - return true; - } - } - return false; - } - - /** - * Update Targets. - * - * @param array $targets Targets. - * @param string $rule_id Rule id. - * @param string[] $rule_tags Rule tags. - */ - public function update_targets( $targets, $rule_id, $rule_tags ) { - $updates = array(); - // look for target updates based on the rule's ID. - if ( isset( $this->targets_to_remove['id'][ $rule_id ] ) ) { - foreach ( $this->targets_to_remove['id'][ $rule_id ] as $name => $props ) { - $updates[] = array( $name, $props ); - } - } - // look for target updates based on the rule's tags. - foreach ( $rule_tags as $tag ) { - if ( isset( $this->targets_to_remove['tag'][ $tag ] ) ) { - foreach ( $this->targets_to_remove['tag'][ $tag ] as $name => $props ) { - $updates[] = array( $name, $props ); - } - } - } - // apply any found target updates. - - foreach ( $updates as list( $name, $props ) ) { - if ( isset( $targets[ $name ] ) ) { - // we only need to remove targets that exist. - if ( true === $props ) { - // if the entire target is being removed, remove it. - unset( $targets[ $name ] ); - } else { - // otherwise just mark single props to ignore. - $targets[ $name ]['except'] = array_merge( - isset( $targets[ $name ]['except'] ) ? $targets[ $name ]['except'] : array(), - $props - ); - } - } - } - return $targets; - } - - /** - * Return TRUE if at least one of the targets matches the rule. - * - * @param string[] $transforms One of the transform methods defined in the Jetpack Waf_Transforms class. - * @param TargetBag $targets Targets. - * @param string $match_operator Match operator. - * @param mixed $match_value Match value. - * @param bool $match_not Match not. - * @param bool $capture Capture. - * @return bool - */ - public function match_targets( $transforms, $targets, $match_operator, $match_value, $match_not, $capture = false ) { - $this->matched_vars = array(); - $this->matched_var_names = array(); - $this->matched_var = ''; - $this->matched_var_name = ''; - $match_found = false; - - // get values. - $values = $this->normalize_targets( $targets ); - - // apply transforms. - foreach ( $transforms as $t ) { - foreach ( $values as &$v ) { - $v['value'] = $this->transforms->$t( $v['value'] ); - } - } - unset( $v ); - // pass each target value to the operator to find any that match. - $matched = array(); - $captures = array(); - foreach ( $values as $v ) { - $match = $this->operators->{$match_operator}( $v['value'], $match_value ); - $did_match = false !== $match; - if ( $match_not !== $did_match ) { - // If either: - // - rule is negated ("not" flag set) and the target was not matched - // - rule not negated and the target was matched - // then this is considered a match. - $match_found = true; - $this->matched_var_names[] = $v['source']; - $this->matched_vars[] = $v['value']; - $this->matched_var_name = end( $this->matched_var_names ); - $this->matched_var = end( $this->matched_vars ); - $matched[] = array( $v, $match ); - // Set any captured matches into state if the rule has the "capture" flag. - if ( $capture ) { - $captures = is_array( $match ) ? $match : array( $match ); - foreach ( array_slice( $captures, 0, 10 ) as $i => $c ) { - $this->set_var( "tx.$i", $c ); - } - } - } - } - - return $match_found; - } - - /** - * Block. - * - * @param string $action Action. - * @param string $rule_id Rule id. - * @param string $reason Block reason. - * @param int $status_code Http status code. - */ - public function block( $action, $rule_id, $reason, $status_code = 403 ) { - if ( ! $reason ) { - $reason = "rule $rule_id"; - } else { - $reason = $this->sanitize_output( $reason ); - } - - $this->write_blocklog( $rule_id, $reason ); - error_log( "Jetpack WAF Blocked Request\t$action\t$rule_id\t$status_code\t$reason" ); - header( "X-JetpackWAF-Blocked: $status_code - rule $rule_id" ); - if ( defined( 'JETPACK_WAF_MODE' ) && 'normal' === JETPACK_WAF_MODE ) { - $protocol = isset( $_SERVER['SERVER_PROTOCOL'] ) ? wp_unslash( $_SERVER['SERVER_PROTOCOL'] ) : 'HTTP'; - header( $protocol . ' 403 Forbidden', true, $status_code ); - die( "rule $rule_id - reason $reason" ); - } - } - - /** - * Get the headers for logging purposes. - */ - public function get_request_headers() { - $all_headers = getallheaders(); - $exclude_headers = array( 'Authorization', 'Cookie', 'Proxy-Authorization', 'Set-Cookie' ); - - foreach ( $exclude_headers as $header ) { - unset( $all_headers[ $header ] ); - } - - return $all_headers; - } - - /** - * Write block logs. We won't write to the file if it exceeds 100 mb. - * - * @param string $rule_id Rule id. - * @param string $reason Block reason. - */ - public function write_blocklog( $rule_id, $reason ) { - $log_data = array(); - $log_data['rule_id'] = $rule_id; - $log_data['reason'] = $reason; - $log_data['timestamp'] = gmdate( 'Y-m-d H:i:s' ); - $log_data['request_uri'] = isset( $_SERVER['REQUEST_URI'] ) ? \stripslashes( $_SERVER['REQUEST_URI'] ) : ''; // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.MissingUnslash - $log_data['user_agent'] = isset( $_SERVER['HTTP_USER_AGENT'] ) ? \stripslashes( $_SERVER['HTTP_USER_AGENT'] ) : ''; // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.MissingUnslash - $log_data['referer'] = isset( $_SERVER['HTTP_REFERER'] ) ? \stripslashes( $_SERVER['HTTP_REFERER'] ) : ''; // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.MissingUnslash - $log_data['content_type'] = isset( $_SERVER['CONTENT_TYPE'] ) ? \stripslashes( $_SERVER['CONTENT_TYPE'] ) : ''; // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.MissingUnslash - $log_data['get_params'] = json_encode( $_GET ); - - if ( defined( 'JETPACK_WAF_SHARE_DEBUG_DATA' ) && JETPACK_WAF_SHARE_DEBUG_DATA ) { - $log_data['post_params'] = json_encode( $_POST ); - $log_data['headers'] = $this->get_request_headers(); - } - - if ( defined( 'JETPACK_WAF_SHARE_DATA' ) && JETPACK_WAF_SHARE_DATA ) { - $file_path = JETPACK_WAF_DIR . '/waf-blocklog'; - $file_exists = file_exists( $file_path ); - - if ( ! $file_exists || filesize( $file_path ) < ( 100 * 1024 * 1024 ) ) { - $fp = fopen( $file_path, 'a+' ); - - if ( $fp ) { - try { - fwrite( $fp, json_encode( $log_data ) . "\n" ); - } finally { - fclose( $fp ); - } - } - } - } - - $this->write_blocklog_row( $log_data ); - } - - /** - * Write block logs to database. - * - * @param array $log_data Log data. - */ - private function write_blocklog_row( $log_data ) { - $conn = $this->connect_to_wordpress_db(); - - if ( ! $conn ) { - return; - } - - global $table_prefix; - - $statement = $conn->prepare( "INSERT INTO {$table_prefix}jetpack_waf_blocklog(reason,rule_id, timestamp) VALUES (?, ?, ?)" ); - if ( false !== $statement ) { - $statement->bind_param( 'sis', $log_data['reason'], $log_data['rule_id'], $log_data['timestamp'] ); - $statement->execute(); - - if ( $conn->insert_id > 100 ) { - $conn->query( "DELETE FROM {$table_prefix}jetpack_waf_blocklog ORDER BY log_id LIMIT 1" ); - } - } - } - - /** - * Connect to WordPress database. - */ - private function connect_to_wordpress_db() { - if ( ! file_exists( JETPACK_WAF_WPCONFIG ) ) { - return; - } - - require_once JETPACK_WAF_WPCONFIG; - $conn = new \mysqli( DB_HOST, DB_USER, DB_PASSWORD, DB_NAME ); // phpcs:ignore WordPress.DB.RestrictedClasses.mysql__mysqli - - if ( $conn->connect_error ) { - error_log( 'Could not connect to the database:' . $conn->connect_error ); - return null; - } - - return $conn; - } - - /** - * Redirect. - * - * @param string $rule_id Rule id. - * @param string $url Url. - */ - public function redirect( $rule_id, $url ) { - error_log( "Jetpack WAF Redirected Request.\tRule:$rule_id\t$url" ); - header( "Location: $url" ); - exit; - } - - /** - * Flag rule for removal. - * - * @param string $prop Prop. - * @param string $value Value. - */ - public function flag_rule_for_removal( $prop, $value ) { - if ( 'id' === $prop ) { - $this->rules_to_remove['id'][ $value ] = true; - } else { - $this->rules_to_remove['tag'][ $value ] = true; - } - } - - /** - * Flag target for removal. - * - * @param string $id_or_tag Id or tag. - * @param string $id_or_tag_value Id or tag value. - * @param string $name Name. - * @param string $prop Prop. - */ - public function flag_target_for_removal( $id_or_tag, $id_or_tag_value, $name, $prop = null ) { - if ( null === $prop ) { - $this->targets_to_remove[ $id_or_tag ][ $id_or_tag_value ][ $name ] = true; - } elseif ( - ! isset( $this->targets_to_remove[ $id_or_tag ][ $id_or_tag_value ][ $name ] ) - // if the entire target is already being removed then it would be redundant to remove a single property. - || true !== $this->targets_to_remove[ $id_or_tag ][ $id_or_tag_value ][ $name ] - ) { - $this->targets_to_remove[ $id_or_tag ][ $id_or_tag_value ][ $name ][] = $prop; - } - } - - /** - * Get variable value. - * - * @param string $key Key. - */ - public function get_var( $key ) { - return isset( $this->state[ $key ] ) - ? $this->state[ $key ] - : ''; - } - - /** - * Set variable value. - * - * @param string $key Key. - * @param string $value Value. - */ - public function set_var( $key, $value ) { - $this->state[ $key ] = $value; - } - - /** - * Increment variable. - * - * @param string $key Key. - * @param mixed $value Value. - */ - public function inc_var( $key, $value ) { - if ( ! isset( $this->state[ $key ] ) ) { - $this->state[ $key ] = 0; - } - $this->state[ $key ] += floatval( $value ); - } - - /** - * Decrement variable. - * - * @param string $key Key. - * @param mixed $value Value. - */ - public function dec_var( $key, $value ) { - if ( ! isset( $this->state[ $key ] ) ) { - $this->state[ $key ] = 0; - } - $this->state[ $key ] -= floatval( $value ); - } - - /** - * Unset variable. - * - * @param string $key Key. - */ - public function unset_var( $key ) { - unset( $this->state[ $key ] ); - } - - /** - * A cache of metadata about the incoming request. - * - * @param string $key The type of metadata to request ('headers', 'request_method', etc.). - */ - public function meta( $key ) { - if ( ! isset( $this->metadata[ $key ] ) ) { - $value = null; - switch ( $key ) { - case 'headers': - $value = $this->request->get_headers(); - break; - case 'headers_names': - $value = $this->args_names( $this->meta( 'headers' ) ); - break; - case 'request_method': - $value = $this->request->get_method(); - break; - case 'request_protocol': - $value = $this->request->get_protocol(); - break; - case 'request_uri': - $value = $this->request->get_uri( false ); - break; - case 'request_uri_raw': - $value = $this->request->get_uri( true ); - break; - case 'request_filename': - $value = $this->request->get_filename(); - break; - case 'request_line': - $value = sprintf( - '%s %s %s', - $this->request->get_method(), - $this->request->get_uri( false ), - $this->request->get_protocol() - ); - break; - case 'request_basename': - $value = $this->request->get_basename(); - break; - case 'request_body': - $value = $this->request->get_body(); - break; - case 'query_string': - $value = $this->request->get_query_string(); - break; - case 'args_get': - $value = $this->request->get_get_vars(); - break; - case 'args_get_names': - $value = $this->args_names( $this->meta( 'args_get' ) ); - break; - case 'args_post': - $value = $this->request->get_post_vars(); - break; - case 'args_post_names': - $value = $this->args_names( $this->meta( 'args_post' ) ); - break; - case 'args': - $value = array_merge( $this->meta( 'args_get' ), $this->meta( 'args_post' ) ); - break; - case 'args_names': - $value = $this->args_names( $this->meta( 'args' ) ); - break; - case 'request_cookies': - $value = $this->request->get_cookies(); - break; - case 'request_cookies_names': - $value = $this->args_names( $this->meta( 'request_cookies' ) ); - break; - case 'files': - $value = array(); - foreach ( $this->request->get_files() as $f ) { - $value[] = array( $f['name'], $f['filename'] ); - } - break; - case 'files_names': - $value = $this->args_names( $this->meta( 'files' ) ); - break; - } - $this->metadata[ $key ] = $value; - } - - return $this->metadata[ $key ]; - } - - /** - * State values. - * - * @param string $prefix Prefix. - */ - private function state_values( $prefix ) { - $output = array(); - $len = strlen( $prefix ); - foreach ( $this->state as $k => $v ) { - if ( 0 === stripos( $k, $prefix ) ) { - $output[ substr( $k, $len ) ] = $v; - } - } - - return $output; - } - - /** - * Change a string to all lowercase and replace spaces and underscores with dashes. - * - * @param string $name Name. - * @return string - */ - public function normalize_header_name( $name ) { - return str_replace( array( ' ', '_' ), '-', strtolower( $name ) ); - } - - /** - * Get match-able values from a collection of targets. - * - * This function expects an associative array of target items, and returns an array of possible values from those targets that can be used to match against. - * The key is the lowercase target name (i.e. `args`, `request_headers`, etc) - see https://github.com/SpiderLabs/ModSecurity/wiki/Reference-Manual-(v3.x)#Variables - * The value is an associative array of options that define how to narrow down the returned values for that target if it's an array (ARGS, for example). The possible options are: - * count: If `true`, then the returned value will a count of how many matched targets were found, rather then the actual values of those targets. - * For example, &ARGS_GET will return the number of keys the query string. - * only: If specified, then only values in that target that match the given key will be returned. - * For example, ARGS_GET:id|ARGS_GET:/^name/ will only return the values for `$_GET['id']` and any key in `$_GET` that starts with `name` - * except: If specified, then values in that target will be left out from the returned values (even if they were included in an `only` option) - * For example, ARGS_GET|!ARGS_GET:z will return every value from `$_GET` except for `$_GET['z']`. - * - * This function will return an array of associative arrays. Each with: - * name: The target name that this value came from (i.e. the key in the input `$targets` argument ) - * source: For targets that are associative arrays (like ARGS), this will be the target name AND the key in that target (i.e. "args:z" for ARGS:z) - * value: The value that was found in the associated target. - * - * @param TargetBag $targets An assoc. array with keys that are target name(s) and values are options for how to process that target (include/exclude rules, whether to return values or counts). - * @return array{ name: string, source: string, value: mixed } - */ - public function normalize_targets( $targets ) { - $return = array(); - foreach ( $targets as $k => $v ) { - $count_only = isset( $v['count'] ) ? self::NORMALIZE_ARRAY_COUNT : 0; - $only = isset( $v['only'] ) ? $v['only'] : array(); - $except = isset( $v['except'] ) ? $v['except'] : array(); - $_k = strtolower( $k ); - switch ( $_k ) { - case 'request_headers': - $this->normalize_array_target( - // get the headers that came in with this request - $this->meta( 'headers' ), - // ensure only and exclude filters are normalized - array_map( array( $this->request, 'normalize_header_name' ), $only ), - array_map( array( $this->request, 'normalize_header_name' ), $except ), - $k, - $return, - // flags - $count_only - ); - continue 2; - case 'request_headers_names': - $this->normalize_array_target( $this->meta( 'headers_names' ), $only, $except, $k, $return, $count_only | self::NORMALIZE_ARRAY_MATCH_VALUES ); - continue 2; - case 'request_method': - case 'request_protocol': - case 'request_uri': - case 'request_uri_raw': - case 'request_filename': - case 'request_basename': - case 'request_body': - case 'query_string': - case 'request_line': - $v = $this->meta( $_k ); - break; - case 'tx': - case 'ip': - $this->normalize_array_target( $this->state_values( "$k." ), $only, $except, $k, $return, $count_only ); - continue 2; - case 'request_cookies': - case 'args': - case 'args_get': - case 'args_post': - case 'files': - $this->normalize_array_target( $this->meta( $_k ), $only, $except, $k, $return, $count_only ); - continue 2; - case 'request_cookies_names': - case 'args_names': - case 'args_get_names': - case 'args_post_names': - case 'files_names': - // get the "full" data (for 'args_names' get data for 'args') and stripe it down to just the key names - $data = array_map( - function ( $item ) { - return $item[0]; }, - $this->meta( substr( $_k, 0, -6 ) ) - ); - $this->normalize_array_target( $data, $only, $except, $k, $return, $count_only | self::NORMALIZE_ARRAY_MATCH_VALUES ); - continue 2; - default: - var_dump( 'Unknown target', $k, $v ); - exit; - } - $return[] = array( - 'name' => $k, - 'value' => $v, - 'source' => $k, - ); - } - - return $return; - } - - /** - * Verifies if the IP from the current request is in an array. - * - * @param array $array Array of IP addresses to verify the request IP against. - * @return bool - */ - public function is_ip_in_array( $array ) { - $real_ip = $this->request->get_real_user_ip_address(); - $array_length = count( $array ); - - for ( $i = 0; $i < $array_length; $i++ ) { - // Check if the IP matches a provided range. - $range = explode( '-', $array[ $i ] ); - if ( count( $range ) === 2 ) { - if ( IP_Utils::ip_address_is_in_range( $real_ip, $range[0], $range[1] ) ) { - return true; - } - continue; - } - - // Check if the IP is an exact match. - if ( $real_ip === $array[ $i ] ) { - return true; - } - } - - return false; - } - - /** - * Extract values from an associative array, potentially applying filters and/or counting results. - * - * @param array{ 0: string, 1: scalar }|scalar[] $source The source assoc. array of values (i.e. $_GET, $_SERVER, etc.). - * @param string[] $only Only include the values for these keys in the output. - * @param string[] $excl Never include the values for these keys in the output. - * @param string $name The name of this target (see https://github.com/SpiderLabs/ModSecurity/wiki/Reference-Manual-(v3.x)#Variables). - * @param array $results Array to add output values to, will be modified by this method. - * @param int $flags Any of the NORMALIZE_ARRAY_* constants defined at the top of the class. - */ - private function normalize_array_target( $source, $only, $excl, $name, &$results, $flags = 0 ) { - $output = array(); - $has_only = isset( $only[0] ); - $has_excl = isset( $excl[0] ); - - foreach ( $source as $source_key => $source_val ) { - if ( is_array( $source_val ) ) { - // if $source_val looks like a tuple from flatten_array(), then use the tuple as the key and value - $source_key = $source_val[0]; - $source_val = $source_val[1]; - } - $filter_match = ( $flags & self::NORMALIZE_ARRAY_MATCH_VALUES ) > 0 ? $source_val : $source_key; - // if this key is on the "exclude" list, skip it - if ( $has_excl && $this->key_matches( $filter_match, $excl ) ) { - continue; - } - // if this key isn't in our "only" list, then skip it - if ( $has_only && ! $this->key_matches( $filter_match, $only ) ) { - continue; - } - // otherwise add this key/value to our output - $output[] = array( $source_key, $source_val ); - } - - if ( ( $flags & self::NORMALIZE_ARRAY_COUNT ) > 0 ) { - // If we've been told to just count the values, then just count them. - $results[] = array( - 'name' => (string) $name, - 'value' => count( $output ), - 'source' => '&' . $name, - ); - } else { - foreach ( $output as list( $item_name, $item_value ) ) { - $results[] = array( - 'name' => (string) $item_name, - 'value' => $item_value, - 'source' => "$name:$item_name", - ); - } - } - - return $results; - } - - /** - * Given an array of tuples - probably from flatten_array() - return a new array - * consisting of only the first value (the key name) from each tuple. - * - * @param array{0:string, 1:scalar}[] $flat_array An array of tuples. - * @return string[] - */ - private function args_names( $flat_array ) { - $names = array_map( - function ( $tuple ) { - return $tuple[0]; - }, - $flat_array - ); - return array_unique( $names ); - } - - /** - * Return whether or not a given $input key matches one of the given $patterns. - * - * @param string $input Key name to test against patterns. - * @param string[] $patterns Patterns to test key name with. - * @return bool - */ - private function key_matches( $input, $patterns ) { - foreach ( $patterns as $p ) { - if ( '/' === $p[0] ) { - if ( 1 === preg_match( $p, $input ) ) { - return true; - } - } elseif ( 0 === strcasecmp( $p, $input ) ) { - return true; - } - } - - return false; - } - - /** - * Sanitize output generated from the request that was blocked. - * - * @param string $output Output to sanitize. - */ - public function sanitize_output( $output ) { - $url_decoded_output = rawurldecode( $output ); - $html_entities_output = htmlentities( $url_decoded_output, ENT_QUOTES, 'UTF-8' ); - // @phpcs:disable Squiz.Strings.DoubleQuoteUsage.NotRequired - $escapers = array( "\\", "/", "\"", "\n", "\r", "\t", "\x08", "\x0c" ); - $replacements = array( "\\\\", "\\/", "\\\"", "\\n", "\\r", "\\t", "\\f", "\\b" ); - // @phpcs:enable Squiz.Strings.DoubleQuoteUsage.NotRequired - - return( str_replace( $escapers, $replacements, $html_entities_output ) ); - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-waf/src/class-waf-standalone-bootstrap.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-waf/src/class-waf-standalone-bootstrap.php deleted file mode 100644 index 355ac508..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-waf/src/class-waf-standalone-bootstrap.php +++ /dev/null @@ -1,173 +0,0 @@ -guard_against_missing_abspath(); - $this->initialize_constants(); - } - - /** - * Ensures that this class is not used unless we are in the right context. - * - * @throws Waf_Exception If we are outside of WordPress. - * - * @return void - */ - private function guard_against_missing_abspath() { - - if ( ! defined( 'ABSPATH' ) ) { - throw new Waf_Exception( 'Cannot generate the WAF bootstrap if we are not running in WordPress context.' ); - } - } - - /** - * Initializes the constants required for generating the bootstrap, if they have not been initialized yet. - * - * @return void - */ - private function initialize_constants() { - Waf_Constants::initialize_constants(); - } - - /** - * Initialized the WP filesystem and serves as a mocking hook for tests. - * - * Should only be implemented after the wp_loaded action hook: - * - * @link https://developer.wordpress.org/reference/functions/wp_filesystem/#more-information - * - * @return void - */ - protected function initialize_filesystem() { - if ( ! function_exists( '\\WP_Filesystem' ) ) { - require_once ABSPATH . 'wp-admin/includes/file.php'; - } - - WP_Filesystem(); - } - - /** - * Finds the path to the autoloader, which can then be used to require the autoloader in the generated boostrap file. - * - * @throws Waf_Exception In case the autoloader file can not be found. - * - * @return string|null - */ - private function locate_autoloader_file() { - global $jetpack_autoloader_loader; - - $autoload_file = null; - - // Try the Jetpack autoloader. - if ( isset( $jetpack_autoloader_loader ) ) { - $class_file = $jetpack_autoloader_loader->find_class_file( Waf_Runner::class ); - if ( $class_file ) { - $autoload_file = dirname( $class_file, 5 ) . '/vendor/autoload.php'; - } - } - - // Try Composer's autoloader. - if ( null === $autoload_file - && is_callable( array( InstalledVersions::class, 'getInstallPath' ) ) - && InstalledVersions::isInstalled( 'automattic/jetpack-waf' ) - ) { - $package_file = InstalledVersions::getInstallPath( 'automattic/jetpack-waf' ); - if ( substr( $package_file, -23 ) === '/automattic/jetpack-waf' ) { - $autoload_file = dirname( $package_file, 3 ) . '/vendor/autoload.php'; - } - } - - // Guess. First look for being in a `vendor/automattic/jetpack-waf/src/', then see if we're standalone with our own vendor dir. - if ( null === $autoload_file ) { - $autoload_file = dirname( __DIR__, 4 ) . '/vendor/autoload.php'; - if ( ! file_exists( $autoload_file ) ) { - $autoload_file = dirname( __DIR__ ) . '/vendor/autoload.php'; - } - } - - // Check that the determined file actually exists. - if ( ! file_exists( $autoload_file ) ) { - throw new Waf_Exception( 'Can not find autoloader, and the WAF standalone boostrap will not work without it.' ); - } - - return $autoload_file; - } - - /** - * Gets the path to the bootstrap.php file. - * - * @return string The bootstrap.php file path. - */ - public function get_bootstrap_file_path() { - return trailingslashit( JETPACK_WAF_DIR ) . 'bootstrap.php'; - } - - /** - * Generates the bootstrap file. - * - * @throws File_System_Exception If the filesystem is not available. - * @throws File_System_Exception If the WAF directory can not be created. - * @throws File_System_Exception If the bootstrap file can not be created. - * - * @return string Absolute path to the bootstrap file. - */ - public function generate() { - - $this->initialize_filesystem(); - - global $wp_filesystem; - if ( ! $wp_filesystem ) { - throw new File_System_Exception( 'Can not work without the file system being initialized.' ); - } - - $autoloader_file = $this->locate_autoloader_file(); - - $bootstrap_file = $this->get_bootstrap_file_path(); - $mode_option = get_option( Waf_Runner::MODE_OPTION_NAME, false ); - $share_data_option = get_option( Waf_Runner::SHARE_DATA_OPTION_NAME, false ); - $share_debug_data_option = get_option( Waf_Runner::SHARE_DEBUG_DATA_OPTION_NAME, false ); - - // phpcs:disable WordPress.PHP.DevelopmentFunctions - $code = "is_dir( JETPACK_WAF_DIR ) ) { - if ( ! $wp_filesystem->mkdir( JETPACK_WAF_DIR ) ) { - throw new File_System_Exception( 'Failed creating WAF standalone bootstrap file directory: ' . JETPACK_WAF_DIR ); - } - } - - if ( ! $wp_filesystem->put_contents( $bootstrap_file, $code ) ) { - throw new File_System_Exception( 'Failed writing WAF standalone bootstrap file to: ' . $bootstrap_file ); - } - - return $bootstrap_file; - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-waf/src/class-waf-stats.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-waf/src/class-waf-stats.php deleted file mode 100644 index f48dda52..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-waf/src/class-waf-stats.php +++ /dev/null @@ -1,72 +0,0 @@ -normalize_path( str_replace( '\\', '/', $value ) ); - } - - /** - * Removes all NUL bytes from input. - * - * @param string $value value to be filtered. - * @return string - */ - public function remove_nulls( $value ) { - return str_replace( "\x0", '', $value ); - } - - /** - * Remove all whitespace characters from input. - * - * @param string $value value to be filtered. - * @return string - */ - public function remove_whitespace( $value ) { - return preg_replace( '/\s/', '', $value ); - } - - /** - * Replaces each occurrence of a C-style comment (/ * ... * /) with a single space. - * Unterminated comments will also be replaced with a space. However, a standalone termination of a comment (* /) will not be acted upon. - * - * @param string $value value to be filtered. - * @return string - */ - public function replace_comments( $value ) { - $value = preg_replace( '~/\*.*?\*/|/\*.*?$~Ds', ' ', $value ); - return explode( '/*', $value, 2 )[0]; - } - - /** - * Removes common comments chars (/ *, * /, --, #). - * - * @param string $value value to be filtered. - * @return string - */ - public function remove_comments_char( $value ) { - return preg_replace( '~/*|*/|--|#|//~', '', $value ); - } - - /** - * Replaces each NUL byte in input with a space. - * - * @param string $value value to be filtered. - * @return string - */ - public function replace_nulls( $value ) { - return str_replace( "\x0", ' ', $value ); - } - - /** - * Decode a URL-encoded input string. - * - * @param string $value value to be decoded. - * @return string - */ - public function url_decode( $value ) { - return urldecode( $value ); - } - - /** - * Decode a URL-encoded input string. - * - * @param string $value value to be decoded. - * @return string - */ - public function url_decode_uni( $value ) { - error_log( 'JETPACKWAF TRANSFORM NOT IMPLEMENTED: urlDecodeUni' ); - return $value; - } - - /** - * Decode a json encoded input string. - * - * @param string $value value to be decoded. - * @return string - */ - public function js_decode( $value ) { - error_log( 'JETPACKWAF TRANSFORM NOT IMPLEMENTED: jsDecode' ); - return $value; - } - - /** - * Convert all characters to uppercase. - * - * @param string $value value to be encoded. - * @return string - */ - public function uppercase( $value ) { - return strtoupper( $value ); - } - - /** - * Calculate a SHA1 hash from the input string. - * - * @param mixed $value value to be hashed. - * @return string - */ - public function sha1( $value ) { - return sha1( $value, true ); - } - - /** - * Remove whitespace from the left side of the input string. - * - * @param string $value value to be trimmed. - * @return string - */ - public function trim_left( $value ) { - return ltrim( $value, self::TRIM_CHARS ); - } - - /** - * Remove whitespace from the right side of the input string. - * - * @param string $value value to be trimmed. - * @return string - */ - public function trim_right( $value ) { - return rtrim( $value, self::TRIM_CHARS ); - } - - /** - * Remove whitespace from both sides of the input string. - * - * @param string $value value to be trimmed. - * @return string - */ - public function trim( $value ) { - return trim( $value, self::TRIM_CHARS ); - } - - /** - * Convert UTF-8 characters to Unicode characters. - * - * This function iterates through each character of the input string, checks the ASCII value, - * and converts it to its corresponding Unicode representation. It handles characters that are - * represented with 1 to 4 bytes in UTF-8. - * - * @param string $str The string value to be encoded from UTF-8 to Unicode. - * @return string The converted string with Unicode representation. - */ - public function utf8_to_unicode( $str ) { - $unicodeStr = ''; - $strLen = strlen( $str ); - $i = 0; - - // Iterate through each character of the input string. - while ( $i < $strLen ) { - // Get the ASCII value of the current character. - $value = ord( $str[ $i ] ); - - if ( $value < 128 ) { - // If the character is in the ASCII range (0-127), directly add it to the Unicode string. - $unicodeStr .= chr( $value ); - ++$i; - } else { - // For characters outside the ASCII range, determine the number of bytes in the UTF-8 representation. - $unicodeValue = ''; - if ( $value >= 192 && $value <= 223 ) { - // For characters represented with 2 bytes in UTF-8. - $unicodeValue = ( ord( $str[ $i ] ) & 0x1F ) << 6 | ( ord( $str[ $i + 1 ] ) & 0x3F ); - $i += 2; - } elseif ( $value >= 224 && $value <= 239 ) { - // For characters represented with 3 bytes in UTF-8. - $unicodeValue = ( ord( $str[ $i ] ) & 0x0F ) << 12 | ( ord( $str[ $i + 1 ] ) & 0x3F ) << 6 | ( ord( $str[ $i + 2 ] ) & 0x3F ); - $i += 3; - } elseif ( $value >= 240 && $value <= 247 ) { - // For characters represented with 4 bytes in UTF-8. - $unicodeValue = ( ord( $str[ $i ] ) & 0x07 ) << 18 | ( ord( $str[ $i + 1 ] ) & 0x3F ) << 12 | ( ord( $str[ $i + 2 ] ) & 0x3F ) << 6 | ( ord( $str[ $i + 3 ] ) & 0x3F ); - $i += 4; - } else { - // If the sequence does not match any known UTF-8 pattern, skip to the next character. - ++$i; - continue; - } - // Convert the Unicode value to a formatted string and append it to the Unicode string. - $unicodeStr .= sprintf( '%%u%04X', $unicodeValue ); - } - } - - return strtolower( $unicodeStr ); - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-waf/src/exceptions/class-file-system-exception.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-waf/src/exceptions/class-file-system-exception.php deleted file mode 100644 index 59631e8c..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-waf/src/exceptions/class-file-system-exception.php +++ /dev/null @@ -1,23 +0,0 @@ -getMessage() ); - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-waf/src/functions.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-waf/src/functions.php deleted file mode 100644 index 0dbc05c3..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-waf/src/functions.php +++ /dev/null @@ -1,72 +0,0 @@ - [ "x" => [ "y" => "..." ] ] ] - * However, modsecurity (and thus our WAF rules) expect the original (non-nested) names. - * - * Therefore, this method takes an array of any depth and returns a single-depth array with nested - * keys translated back to a single string with brackets. - * - * Because there might be multiple items with the same name, this function will return an array of tuples, - * with the first item in the tuple the re-created original field name, and the second item the value. - * - * @example - * flatten_array( [ "field1" => "abc", "field2" => [ "d", "e", "f" ] ] ) - * => [ - * [ "field1", "abc" ], - * [ "field2[0]", "d" ], - * [ "field2[1]", "e" ], - * [ "field2[2]", "f" ], - * ] - * - * @param array $array An array that resembles one of the PHP superglobals like $_GET or $_POST. - * @param string $key_prefix String that should be prepended to the keys output by this function. - * Usually only used internally as part of recursion when flattening a nested array. - * @param bool|null $dot_notation Whether to use dot notation instead of bracket notation. - * - * @return array{ 0: string, 1: scalar }[] $key_prefix An array of key/value tuples, one for each distinct value in the input array. - */ -function flatten_array( $array, $key_prefix = '', $dot_notation = null ) { - $return = array(); - foreach ( $array as $source_key => $source_value ) { - $key = $source_key; - if ( ! empty( $key_prefix ) ) { - $key = $dot_notation ? "$key_prefix.$source_key" : $key_prefix . "[$source_key]"; - } - - if ( ! is_array( $source_value ) ) { - $return[] = array( $key, $source_value ); - } else { - $return = array_merge( $return, flatten_array( $source_value, $key, $dot_notation ) ); - } - } - return $return; -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/i18n-map.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/i18n-map.php deleted file mode 100644 index 0b11c812..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/i18n-map.php +++ /dev/null @@ -1,72 +0,0 @@ - 'jetpack-protect', - 'type' => 'plugins', - 'packages' => array( - 'jetpack-admin-ui' => array( - 'path' => 'jetpack_vendor/automattic/jetpack-admin-ui', - 'ver' => '0.4.1', - ), - 'jetpack-assets' => array( - 'path' => 'jetpack_vendor/automattic/jetpack-assets', - 'ver' => '2.1.4', - ), - 'jetpack-boost-core' => array( - 'path' => 'jetpack_vendor/automattic/jetpack-boost-core', - 'ver' => '0.2.5', - ), - 'jetpack-boost-speed-score' => array( - 'path' => 'jetpack_vendor/automattic/jetpack-boost-speed-score', - 'ver' => '0.3.7', - ), - 'jetpack-config' => array( - 'path' => 'jetpack_vendor/automattic/jetpack-config', - 'ver' => '2.0.1', - ), - 'jetpack-connection' => array( - 'path' => 'jetpack_vendor/automattic/jetpack-connection', - 'ver' => '2.5.0', - ), - 'jetpack-idc' => array( - 'path' => 'jetpack_vendor/automattic/jetpack-identity-crisis', - 'ver' => '0.17.3', - ), - 'jetpack-ip' => array( - 'path' => 'jetpack_vendor/automattic/jetpack-ip', - 'ver' => '0.2.2', - ), - 'jetpack-jitm' => array( - 'path' => 'jetpack_vendor/automattic/jetpack-jitm', - 'ver' => '3.1.1', - ), - 'jetpack-licensing' => array( - 'path' => 'jetpack_vendor/automattic/jetpack-licensing', - 'ver' => '2.0.2', - ), - 'jetpack-my-jetpack' => array( - 'path' => 'jetpack_vendor/automattic/jetpack-my-jetpack', - 'ver' => '4.17.0', - ), - 'jetpack-password-checker' => array( - 'path' => 'jetpack_vendor/automattic/jetpack-password-checker', - 'ver' => '0.3.1', - ), - 'jetpack-plugins-installer' => array( - 'path' => 'jetpack_vendor/automattic/jetpack-plugins-installer', - 'ver' => '0.3.2', - ), - 'jetpack-sync' => array( - 'path' => 'jetpack_vendor/automattic/jetpack-sync', - 'ver' => '2.10.1', - ), - 'jetpack-transport-helper' => array( - 'path' => 'jetpack_vendor/automattic/jetpack-transport-helper', - 'ver' => '0.2.2', - ), - 'jetpack-waf' => array( - 'path' => 'jetpack_vendor/automattic/jetpack-waf', - 'ver' => '0.16.0', - ), - ), -); diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/readme.txt b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/readme.txt deleted file mode 100644 index 337f5bc0..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/readme.txt +++ /dev/null @@ -1,176 +0,0 @@ -=== Jetpack Protect === -Contributors: automattic, retrofox, leogermani, renatoagds, bjorsch, ebinnion, fgiannar, zinigor, miguelxavierpenha, dsmart, jeherve, manzoorwanijk, njweller, oskosk, samiff, siddarthan, wpkaren, arsihasi, kraftbj, kev, sermitr, kangzj, pabline, dkmyta -Tags: jetpack, protect, security, malware, scan -Requires at least: 6.3 -Requires PHP: 7.0 -Tested up to: 6.5 -Stable tag: 2.1.0 -License: GPLv2 or later -License URI: http://www.gnu.org/licenses/gpl-2.0.html - -Free daily malware scanning and WordPress site security. Jetpack Protect leverages the extensive database of WPScan, an Automattic brand, that has over 25,000 registered malware and vulnerabilities. No configuration required! - -== Description == - -== TOTAL SITE SECURITY FROM WORDPRESS EXPERTS == - -Jetpack Protect is a free and essential WordPress security plugin that scans your site and warns you about vulnerabilities, keeping your site one step ahead of security threats. It’s easy to use; setup requires just a few clicks! - -By upgrading Protect, you also unlock malware scanning with one-click fixes for most issues and instant notifications when threats are detected. Our automated Web Application Firewall (WAF) also protects your site from bad actors around the clock. - -Jetpack Protect is created by WordPress experts; our parent company Automattic is behind Jetpack, WordPress.com, WooCommerce, WPScan, and much more. There is no better company to understand the security needs of WordPress sites. - -== WHAT DOES JETPACK PROTECT (FREE) CHECK FOR? == - -Jetpack Protect scans your site on a daily basis and warns you about: -- The version of WordPress installed, and any associated vulnerabilities -- What plugins are installed, and any related vulnerabilities -- What themes are installed, and any associated vulnerabilities - -= What are vulnerabilities? Why do I need to scan my site regularly? = -Site vulnerabilities are flaws in a website's code that weaken the site's overall security. These can be introduced to a site in various ways, in most cases unintentionally. - -Some of the ways vulnerabilities can be introduced to a site are: -- Poorly written site code -- Plugin and theme bugs -- WordPress version bugs -- System misconfigurations - -If a bad actor detects a vulnerability on your site, they can exploit it to access sensitive information, update your site, and more to damage your business or brand. - -That’s why it’s essential to use a reputable and reliable vulnerability & malware site scanner like Jetpack Protect to safeguard your site. - -= Can I use Jetpack Scan to fix a site that is already infected? = - -Jetpack Protect (Scan) detects and prevents attacks, but is not designed to fully clean up sites infected before it was active. If your site has malware, take immediate action to clean it up and remove the malicious code. - -To clean up your site, we suggest using a malware removal tool, or if possible restore from a backup taken before the infection. We recommend using Jetpack VaultPress Backup in conjunction with Jetpack Scan to secure your website. - -[Learn more about cleaning your site](https://jetpack.com/support/scan/how-to-clean-your-hacked-wordpress-site/) - -== UPGRADE PROTECT TO REMOVE MALWARE IN ONE CLICK AND BE PROTECTED BY OUR WAF == -By upgrading Protect, you unlock total site security from WordPress experts: -- Automated daily malware scanning in addition to vulnerability checks -- One-click fixes for most issues -- Web Application Firewall (WAF) with automatic rule updates -- Instant email notifications when threats are detected -- Priority support from WordPress experts - -= What is malware? Why do I need to protect against it? = -Malware is malicious code or software that has been created by bad actors to disrupt, damage, or gain access to your site. There are many ways that malware can get onto your WordPress site. The most common method is through attackers using vulnerable plugins or themes to install malware. - -Similar to the vulnerabilities listed above, bad actors can use malware to capture sensitive information, damage your site, and harm your business or brand. - -Jetpack Protect instantly notifies you of any threats detected, with one-click fixes for most issues. - -= What is a Web Application Firewall (WAF)? = -A web application firewall blocks traffic and malicious requests to your site from known bad actors. - -As threats are detected, new rules are added to Jetpack Protect’s firewall, which provides around-the-clock protection for your WordPress site. - -== OVER 38,393 REGISTERED VULNERABILITIES IN OUR DATABASE == - -WordPress security is something that evolves over time. Jetpack Protect leverages the extensive database of WPScan, an Automattic brand. All vulnerabilities are entered into our database by dedicated WordPress security professionals and updated constantly as new information becomes available. - -== JETPACK PROTECT IS EASY TO SETUP AND USE == - -There’s nothing to configure – the setup process is as easy as: -1. Install and activate the plugin -2. Set up it with one click. - -After you activate the plugin, Jetpack Protect will run daily automatic malware scans on your WordPress site and update you on vulnerabilities associated with your installed plugins, themes, and WordPress core. - -== WITH 💚 BY JETPACK == - -This is just the start! - -We are working hard to bring more features and improvements to Jetpack Protect. Let us know your thoughts and ideas! - -== FURTHER READING == - -- [Jetpack: Security, performance, and growth tools made for WordPress sites by the WordPress experts.](https://jetpack.com/) -- You can follow the [Jetpack Twitter](https://twitter.com/jetpack?lang=en) account to catch up on our latest WordPress security recommendations and updates. -- [WordPress Security: How to Protect Your Site From Hackers](https://jetpack.com/blog/category/security/page/3/) -- [Should You Use Jetpack for WordPress Security?](https://jetpack.com/blog/should-you-use-jetpack-for-wordpress-security/) -- [Jetpack Acquires WordPress Vulnerability Database WPScan](https://jetpack.com/blog/jetpack-acquires-wordpress-vulnerability-database-wpscan/#more-139339) - -== FAQ == - -= How does Jetpack Protect help your WordPress Site security? = - -Protect is a free WordPress security and malware scanner plugin that scans your site and lets you know possible malware and security threats on your installed plugins, themes, and core files. - -The free plan scans your site for WordPress version, plugin, and theme vulnerabilities from our extensive vulnerability database (38,393) that is powered by WPScan. - -By upgrading Protect, you gain access to WordPress malware scanning with one-click fixes, instant threat notifications, and our Web application Firewall (WAF) that protects your site around the clock. - -= Does this plugin require the Jetpack plugin to work? = - -Jetpack Protect does not require the Jetpack plugin to run and secure your site. - -= What are the differences between Jetpack Protect, Jetpack Scan, and WPScan plugins? = - -Jetpack Protect is a new WordPress security plugin from Jetpack containing our security features only. You can start with Jetpack Protect’s free vulnerability scanning features and upgrade Jetpack Protect to access automated malware scanning and our web application firewall. By upgrading Protect, you are enabling Jetpack Scan to the plugin. - -Jetpack Scan is a product that can be purchased for use in conjunction with the main Jetpack plugin or Jetpack Protect. Jetpack Scan includes automated malware scanning and our web application firewall but does not contain the vulnerability scanning feature from the Protect plugin. If you purchase Jetpack Security or Jetpack Complete, Jetpack Scan is also included in those bundles. - -If you are already a Jetpack Scan, Jetpack Security, or Jetpack Complete customer, you can also take advantage of Jetpack Protect’s vulnerability scanning feature by installing the Jetpack Protect plugin. - -WPScan is an enterprise vulnerability scanning solution. It is not recommended for small to medium-sized businesses. If you are an enterprise company looking for custom WordPress site protection solutions, please visit: https://wpscan.com/ - -For small to medium-sized businesses, you can access our vulnerability scanning solution in the Jetpack Protect plugin. - -= Will Jetpack Protect work on my local site? - -Jetpack Protect requires a publicly accessible site to perform the vulnerability scan. - -= How will I know if Jetpack Protect has found WordPress security vulnerabilities and malware? = - -You can visit Jetpack Protect dashboard in your WordPress admin panel to see the security threats and malware found by the integrated malware scanner. - -= What do I do if Jetpack Protect finds a security threat? = - -When the vulnerability scanner finds a security threat, you can view the recommended actions on the Jetpack Protect dashboard to secure your sites. - -If you have upgraded Protect, your site will also be automatically scanned for malware each day, and you will be notified instantly via email if any threats are detected. You will be able to fix most issues in one click. - -= Can I set the time of the daily security scan? = - -It is not possible to set a time for the automated daily scans run by the integrated malware scanner. - -= Why do I need WordPress security and malware scan? = - -A hacked WordPress site can cause serious damage to your business revenue and reputation. Jetpack Protect scans your site and lets you know possible malware and security threats on your installed plugins, themes, and core files. - -= Where can I learn more about WordPress security and malware threats? = - -To learn how to achieve better WordPress security, [see this guide](https://jetpack.com/blog/guide-to-wordpress-security/). On the [Jetpack Blog](https://jetpack.com/blog/category/security/), you can find many more articles written by the top WordPress security experts. - -= Is Jetpack Protect the same thing as the Protect feature in the Jetpack plugin? - -The new Jetpack Protect plugin is different from the Jetpack feature formerly known as [Protect](https://jetpack.com/support/protect/) (now renamed [Brute Force Attack Protection](https://jetpack.com/support/protect/)). - -== Screenshots == - -1. Focus on running your business while Jetpack Protect automatically scans your site. -2. Keep your site one step ahead of security threats and malware. -3. View all the found vulnerabilities in your site and learn how to fix them. -4. The Jetpack Firewall is a web application firewall (known as WAF) designed to protect your WordPress site from malicious requests. - -== Changelog == -### 2.1.0 - 2024-04-10 -#### Added -- Add data to WAF logs and add toggle for users to opt-in to share more data with us if needed. -- Added firewall standalone mode indicator. -- Added onboarding flows. - -#### Changed -- General: indicate compatibility with the upcoming version of WordPress, 6.5. -- Updated package dependencies. -- Updated package lockfile. -- Use blog ID instead of site slug in checkout links. - -#### Fixed -- Jetpack Protect footer: Ensured that links to the cloud and the promotion around it are not shown if you are on a platform where the firewall is not supported. -- Prevent text orphans in the site scanning header. - diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/src/class-credentials.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/src/class-credentials.php deleted file mode 100644 index 1e72b467..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/src/class-credentials.php +++ /dev/null @@ -1,55 +0,0 @@ -is_connected(); - - if ( ! $blog_id || ! $is_connected ) { - return false; - } - - $api_url = sprintf( '/sites/%d/scan', $blog_id ); - - $response = Client::wpcom_json_api_request_as_blog( - $api_url, - '2', - array( 'method' => 'GET' ), - null, - 'wpcom' - ); - - $response_code = wp_remote_retrieve_response_code( $response ); - - if ( is_wp_error( $response ) || 200 !== $response_code ) { - return false; - } - - $parsed_response = json_decode( $response['body'] ); - - if ( ! $parsed_response ) { - return false; - } - - return isset( $parsed_response->credentials ) ? $parsed_response->credentials : array(); - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/src/class-jetpack-protect.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/src/class-jetpack-protect.php deleted file mode 100644 index db069369..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/src/class-jetpack-protect.php +++ /dev/null @@ -1,458 +0,0 @@ -ensure( - 'connection', - array( - 'slug' => JETPACK_PROTECT_SLUG, - 'name' => JETPACK_PROTECT_NAME, - 'url_info' => JETPACK_PROTECT_URI, - ) - ); - // Sync package. - $config->ensure( - 'sync', - array( - 'jetpack_sync_modules' => array( - 'Automattic\\Jetpack\\Sync\\Modules\\Options', - 'Automattic\\Jetpack\\Sync\\Modules\\Callables', - 'Automattic\\Jetpack\\Sync\\Modules\\Users', - ), - 'jetpack_sync_callable_whitelist' => array( - 'main_network_site' => array( 'Automattic\\Jetpack\\Connection\\Urls', 'main_network_site_url' ), - 'get_plugins' => array( 'Automattic\\Jetpack\\Sync\\Functions', 'get_plugins' ), - 'get_themes' => array( 'Automattic\\Jetpack\\Sync\\Functions', 'get_themes' ), - 'wp_version' => array( 'Automattic\\Jetpack\\Sync\\Functions', 'wp_version' ), - ), - 'jetpack_sync_options_contentless' => array(), - 'jetpack_sync_options_whitelist' => array( - 'active_plugins', - 'stylesheet', - ), - ) - ); - - // Identity crisis package. - $config->ensure( 'identity_crisis' ); - - // Web application firewall package. - $config->ensure( 'waf' ); - }, - 1 - ); - - add_filter( 'jetpack_connection_user_has_license', array( $this, 'jetpack_check_user_licenses' ), 10, 3 ); - - add_filter( 'jetpack_get_available_standalone_modules', array( $this, 'protect_filter_available_modules' ), 10, 1 ); - } - - /** - * Initialize the plugin - * - * @return void - */ - public function init() { - add_action( 'admin_bar_menu', array( $this, 'admin_bar' ), 65 ); - add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_admin_styles' ) ); - - REST_Controller::init(); - My_Jetpack_Initializer::init(); - Site_Health::init(); - - // Sets up JITMS. - JITM::configure(); - } - - /** - * Initialize the admin page resources. - */ - public function admin_page_init() { - $total_threats = Status::get_total_threats(); - $menu_label = _x( 'Protect', 'The Jetpack Protect product name, without the Jetpack prefix', 'jetpack-protect' ); - if ( $total_threats ) { - $menu_label .= sprintf( ' %d', $total_threats ); - } - - $page_suffix = Admin_Menu::add_menu( - __( 'Jetpack Protect', 'jetpack-protect' ), - $menu_label, - 'manage_options', - 'jetpack-protect', - array( $this, 'plugin_settings_page' ) - ); - - add_action( 'load-' . $page_suffix, array( $this, 'enqueue_admin_scripts' ) ); - } - - /** - * Enqueues the wp-admin styles (used outside the React app) - */ - public function enqueue_admin_styles() { - wp_enqueue_style( 'jetpack-protect-wpadmin', JETPACK_PROTECT_BASE_PLUGIN_URL . '/assets/jetpack-protect.css', array(), JETPACK_PROTECT_VERSION ); - } - - /** - * Enqueue plugin admin scripts and styles. - */ - public function enqueue_admin_scripts() { - - Assets::register_script( - 'jetpack-protect', - 'build/index.js', - JETPACK_PROTECT_ROOT_FILE, - array( - 'in_footer' => true, - 'textdomain' => 'jetpack-protect', - ) - ); - Assets::enqueue_script( 'jetpack-protect' ); - // Required for Analytics. - wp_enqueue_script( 'jp-tracks', '//stats.wp.com/w.js', array(), gmdate( 'YW' ), true ); - // Initial JS state including JP Connection data. - Connection_Initial_State::render_script( 'jetpack-protect' ); - wp_add_inline_script( 'jetpack-protect', $this->render_initial_state(), 'before' ); - } - - /** - * Render the initial state into a JavaScript variable. - * - * @return string - */ - public function render_initial_state() { - return 'var jetpackProtectInitialState=JSON.parse(decodeURIComponent("' . rawurlencode( wp_json_encode( $this->initial_state() ) ) . '"));'; - } - - /** - * Get the initial state data for hydrating the React UI. - * - * @return array - */ - public function initial_state() { - global $wp_version; - // phpcs:disable WordPress.Security.NonceVerification.Recommended - $refresh_status_from_wpcom = isset( $_GET['checkPlan'] ); - $initial_state = array( - 'apiRoot' => esc_url_raw( rest_url() ), - 'apiNonce' => wp_create_nonce( 'wp_rest' ), - 'registrationNonce' => wp_create_nonce( 'jetpack-registration-nonce' ), - 'status' => Status::get_status( $refresh_status_from_wpcom ), - 'installedPlugins' => Plugins_Installer::get_plugins(), - 'installedThemes' => Sync_Functions::get_themes(), - 'wpVersion' => $wp_version, - 'adminUrl' => 'admin.php?page=jetpack-protect', - 'siteSuffix' => ( new Jetpack_Status() )->get_site_suffix(), - 'blogID' => Connection_Manager::get_site_id( true ), - 'jetpackScan' => My_Jetpack_Products::get_product( 'scan' ), - 'hasRequiredPlan' => Plan::has_required_plan(), - 'onboardingProgress' => Onboarding::get_current_user_progress(), - 'waf' => array( - 'wafSupported' => Waf_Runner::is_supported_environment(), - 'currentIp' => IP_Utils::get_ip(), - 'isSeen' => self::get_waf_seen_status(), - 'upgradeIsSeen' => self::get_waf_upgrade_seen_status(), - 'displayUpgradeBadge' => self::get_waf_upgrade_badge_display_status(), - 'isEnabled' => Waf_Runner::is_enabled(), - 'isToggling' => false, - 'isUpdating' => false, - 'config' => Waf_Runner::get_config(), - 'stats' => self::get_waf_stats(), - ), - ); - - $initial_state['jetpackScan']['pricingForUi'] = Plan::get_product( 'jetpack_scan' ); - - return $initial_state; - } - /** - * Main plugin settings page. - */ - public function plugin_settings_page() { - ?> -
          - is_connected() ) { - self::activate_modules(); - } - } - - /** - * Activates the waf and brute force protection modules and disables the activation option - */ - public static function activate_modules() { - delete_option( self::JETPACK_PROTECT_ACTIVATION_OPTION ); - ( new Modules() )->activate( self::JETPACK_WAF_MODULE_SLUG, false, false ); - ( new Modules() )->activate( self::JETPACK_BRUTE_FORCE_PROTECTION_MODULE_SLUG, false, false ); - } - - /** - * Removes plugin from the connection manager - * If it's the last plugin using the connection, the site will be disconnected. - * - * @access public - * @static - */ - public static function plugin_deactivation() { - - // Clear Sync data. - Sender::get_instance()->uninstall(); - - $manager = new Connection_Manager( 'jetpack-protect' ); - $manager->remove_connection(); - - Status::delete_option(); - } - - /** - * Create a shortcut on Admin Bar to show the total of threats found. - * - * @param object $wp_admin_bar The Admin Bar object. - * @return void - */ - public function admin_bar( $wp_admin_bar ) { - if ( ! current_user_can( 'manage_options' ) ) { - return; - } - - $total = Status::get_total_threats(); - - if ( $total > 0 ) { - $args = array( - 'id' => 'jetpack-protect', - 'title' => '' . $total . '', - 'href' => admin_url( 'admin.php?page=jetpack-protect' ), - 'meta' => array( - // translators: %d is the number of threats found. - 'title' => sprintf( _n( '%d threat found by Jetpack Protect', '%d threats found by Jetpack Protect', $total, 'jetpack-protect' ), $total ), - ), - ); - - $wp_admin_bar->add_node( $args ); - } - } - - /** - * Adds modules to the list of available modules - * - * @param array $modules The available modules. - * @return array - */ - public function protect_filter_available_modules( $modules ) { - return array_merge( array( self::JETPACK_WAF_MODULE_SLUG, self::JETPACK_BRUTE_FORCE_PROTECTION_MODULE_SLUG ), $modules ); - } - - /** - * Check if the user has an available license that includes Jetpack Scan. - * - * @param boolean $has_license Whether a license was already found. - * @param object[] $licenses Unattached licenses belonging to the user. - * @param string $plugin_slug Slug of the plugin that initiated the flow. - * - * @return boolean - */ - public static function jetpack_check_user_licenses( $has_license, $licenses, $plugin_slug ) { - if ( $plugin_slug !== JETPACK_PROTECT_SLUG || $has_license ) { - return $has_license; - } - - $license_found = false; - - foreach ( $licenses as $license ) { - if ( $license->attached_at || $license->revoked_at ) { - continue; - } - - if ( in_array( $license->product_id, self::JETPACK_SCAN_PRODUCT_IDS, true ) ) { - $license_found = true; - break; - } - } - - return $license_found; - } - - /** - * Get WAF "Seen" Status - * - * @return bool Whether the current user has viewed the WAF screen. - */ - public static function get_waf_seen_status() { - return (bool) get_user_meta( get_current_user_id(), 'jetpack_protect_waf_seen', true ); - } - - /** - * Set WAF "Seen" Status - * - * @return bool True if seen status updated to true, false on failure. - */ - public static function set_waf_seen_status() { - return (bool) update_user_meta( get_current_user_id(), 'jetpack_protect_waf_seen', true ); - } - - /** - * Get WAF Upgrade "Seen" Status - * - * @return bool Whether the current user has dismissed the upgrade popover or enabled the automatic rules feature. - */ - public static function get_waf_upgrade_seen_status() { - return (bool) get_user_meta( get_current_user_id(), 'jetpack_protect_waf_upgrade_seen', true ); - } - - /** - * Set WAF Upgrade "Seen" Status - * - * @return bool True if upgrade seen status updated to true, false on failure. - */ - public static function set_waf_upgrade_seen_status() { - self::set_waf_upgrade_badge_timestamp(); - return (bool) update_user_meta( get_current_user_id(), 'jetpack_protect_waf_upgrade_seen', true ); - } - - /** - * Get WAF Upgrade Badge Timestamp - * - * @return integer The timestamp for the when the upgrade seen status was first set to true. - */ - public static function get_waf_upgrade_badge_timestamp() { - return (int) get_user_meta( get_current_user_id(), 'jetpack_protect_waf_upgrade_badge_timestamp', true ); - } - - /** - * Set WAF Upgrade Badge Timestamp - * - * @return bool True if upgrade badge timestamp to set to the current time, false on failure. - */ - public static function set_waf_upgrade_badge_timestamp() { - return (bool) update_user_meta( get_current_user_id(), 'jetpack_protect_waf_upgrade_badge_timestamp', time() ); - } - - /** - * Get WAF Upgrade Badge Display Status - * - * @return bool True if upgrade badge timestamp is set and less than 7 days ago, otherwise false. - */ - public static function get_waf_upgrade_badge_display_status() { - $badge_timestamp_exists = metadata_exists( 'user', get_current_user_id(), 'jetpack_protect_waf_upgrade_badge_timestamp' ); - if ( ! $badge_timestamp_exists ) { - return true; - } - - $badge_timestamp = self::get_waf_upgrade_badge_timestamp(); - $seven_days = strtotime( '-7 days' ); - if ( $badge_timestamp > $seven_days ) { - return true; - } - - return false; - } - - /** - * Get WAF stats - * - * @return bool|array False if WAF is not enabled, otherwise an array of stats. - */ - public static function get_waf_stats() { - if ( ! Waf_Runner::is_enabled() ) { - return false; - } - - return array( - 'ipAllowListCount' => Waf_Stats::get_ip_allow_list_count(), - 'ipBlockListCount' => Waf_Stats::get_ip_block_list_count(), - 'automaticRulesLastUpdated' => Waf_Stats::get_automatic_rules_last_updated(), - ); - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/src/class-onboarding.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/src/class-onboarding.php deleted file mode 100644 index cacd4768..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/src/class-onboarding.php +++ /dev/null @@ -1,80 +0,0 @@ - - */ - private static $current_user_progress; - - /** - * Onboarding Init - * - * @return void - */ - private static function init() { - self::$user_id = get_current_user_id(); - - $current_user_progress = get_user_meta( self::$user_id, self::OPTION_NAME, true ); - self::$current_user_progress = $current_user_progress ? $current_user_progress : array(); - } - - /** - * Set Onboarding Items As Completed - * - * @param array $step_ids The IDs of the steps to complete. - * @return bool True if the update was successful, false otherwise. - */ - public static function complete_steps( $step_ids ) { - self::init(); - - if ( empty( self::$current_user_progress ) ) { - self::$current_user_progress = $step_ids; - } else { - // Find step IDs that are not already in the current user progress - $new_steps = array_diff( $step_ids, self::$current_user_progress ); - - // Merge new steps with current progress - self::$current_user_progress = array_merge( self::$current_user_progress, $new_steps ); - } - - // Update the user meta only once - return (bool) update_user_meta( - self::$user_id, - self::OPTION_NAME, - self::$current_user_progress - ); - } - - /** - * Get Current User's Onboarding Progress - * - * @return array - */ - public static function get_current_user_progress() { - self::init(); - - return self::$current_user_progress; - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/src/class-plan.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/src/class-plan.php deleted file mode 100644 index 936f2885..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/src/class-plan.php +++ /dev/null @@ -1,111 +0,0 @@ - ( self::CACHE_VALIDITY_PERIOD ); - } - - /** - * Gets the product list from the user cache - */ - private static function get_product_from_cache() { - return get_user_meta( get_current_user_id(), self::CACHE_META_NAME, true ); - } - - /** - * Gets the product data - * - * @param string $wpcom_product The product slug. - * @return array - */ - public static function get_product( $wpcom_product = 'jetpack_scan' ) { - if ( ! self::is_cache_old() ) { - return self::get_product_from_cache(); - } - - $request_url = 'https://public-api.wordpress.com/rest/v1.1/products?locale=' . get_user_locale() . '&type=jetpack'; - $wpcom_request = wp_remote_get( esc_url_raw( $request_url ) ); - $response_code = wp_remote_retrieve_response_code( $wpcom_request ); - - if ( 200 === $response_code ) { - $products = json_decode( wp_remote_retrieve_body( $wpcom_request ) ); - - // Pick the desired product... - $product = $products->{$wpcom_product}; - - // ... and store it into the cache. - update_user_meta( get_current_user_id(), self::CACHE_DATE_META_NAME, time() ); - update_user_meta( get_current_user_id(), self::CACHE_META_NAME, $product ); - - return $product; - } - - return new \WP_Error( - 'failed_to_fetch_data', - esc_html__( 'Unable to fetch the requested data.', 'jetpack-protect' ), - array( - 'status' => $response_code, - 'request' => $wpcom_request, - ) - ); - } - - /** - * Has Required Plan - * - * @param bool $force_refresh Refresh the local plan cache from wpcom. - * @return bool True when the site has a plan or product that supports the paid Protect tier. - */ - public static function has_required_plan( $force_refresh = false ) { - static $has_scan = null; - if ( null === $has_scan || $force_refresh ) { - $products = array_column( Current_Plan::get_products(), 'product_slug' ); - - // Check for a plan or product that enables scan. - $plan_supports_scan = Current_Plan::supports( 'scan', true ); - $has_scan_product = count( array_intersect( array( 'jetpack_scan', 'jetpack_scan_monthly' ), $products ) ) > 0; - $has_scan = $plan_supports_scan || $has_scan_product; - } - - return $has_scan; - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/src/class-protect-status.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/src/class-protect-status.php deleted file mode 100644 index 97d4b3a2..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/src/class-protect-status.php +++ /dev/null @@ -1,258 +0,0 @@ - true, - 'error_code' => $status->get_error_code(), - 'error_message' => $status->get_error_message(), - ) - ); - } else { - $status = self::normalize_protect_report_data( $status ); - } - - self::$status = $status; - return $status; - } - - /** - * Gets the WPCOM API endpoint - * - * @return WP_Error|string - */ - public static function get_api_url() { - $blog_id = Jetpack_Options::get_option( 'id' ); - $is_connected = ( new Connection_Manager() )->is_connected(); - - if ( ! $blog_id || ! $is_connected ) { - return new WP_Error( 'site_not_connected' ); - } - - $api_url = sprintf( self::REST_API_BASE, $blog_id ); - - return $api_url; - } - - /** - * Fetches the status from WPCOM servers - * - * @return WP_Error|array - */ - public static function fetch_from_server() { - $api_url = self::get_api_url(); - if ( is_wp_error( $api_url ) ) { - return $api_url; - } - - $response = Client::wpcom_json_api_request_as_blog( - self::get_api_url(), - '2', - array( 'method' => 'GET' ), - null, - 'wpcom' - ); - - $response_code = wp_remote_retrieve_response_code( $response ); - - if ( is_wp_error( $response ) || 200 !== $response_code || empty( $response['body'] ) ) { - return new WP_Error( 'failed_fetching_status', 'Failed to fetch Protect Status data from server', array( 'status' => $response_code ) ); - } - - $body = json_decode( wp_remote_retrieve_body( $response ) ); - self::update_status_option( $body ); - return $body; - } - - /** - * Normalize data from the Protect Report data source. - * - * @param object $report_data Data from the Protect Report. - * @return Status_Model - */ - protected static function normalize_protect_report_data( $report_data ) { - $status = new Status_Model(); - $status->data_source = 'protect_report'; - - // map report data properties directly into the Status_Model - $status->status = isset( $report_data->status ) ? $report_data->status : null; - $status->last_checked = isset( $report_data->last_checked ) ? $report_data->last_checked : null; - $status->num_threats = isset( $report_data->num_vulnerabilities ) ? $report_data->num_vulnerabilities : null; - $status->num_themes_threats = isset( $report_data->num_themes_vulnerabilities ) ? $report_data->num_themes_vulnerabilities : null; - $status->num_plugins_threats = isset( $report_data->num_plugins_vulnerabilities ) ? $report_data->num_plugins_vulnerabilities : null; - - // merge plugins from report with all installed plugins before mapping into the Status_Model - $installed_plugins = Plugins_Installer::get_plugins(); - $last_report_plugins = isset( $report_data->plugins ) ? $report_data->plugins : new \stdClass(); - $status->plugins = self::merge_installed_and_checked_lists( $installed_plugins, $last_report_plugins, array( 'type' => 'plugins' ) ); - - // merge themes from report with all installed plugins before mapping into the Status_Model - $installed_themes = Sync_Functions::get_themes(); - $last_report_themes = isset( $report_data->themes ) ? $report_data->themes : new \stdClass(); - $status->themes = self::merge_installed_and_checked_lists( $installed_themes, $last_report_themes, array( 'type' => 'themes' ) ); - - // normalize WordPress core report data and map into Status_Model - $status->core = self::normalize_core_information( isset( $report_data->core ) ? $report_data->core : new \stdClass() ); - - // check if any installed items (themes, plugins, or core) have not been checked in the report - $all_items = array_merge( $status->plugins, $status->themes, array( $status->core ) ); - $unchecked_items = array_filter( - $all_items, - function ( $item ) { - return ! isset( $item->checked ) || ! $item->checked; - } - ); - $status->has_unchecked_items = ! empty( $unchecked_items ); - - return $status; - } - - /** - * Merges the list of installed extensions with the list of extensions that were checked for known vulnerabilities and return a normalized list to be used in the UI - * - * @param array $installed The list of installed extensions, where each attribute key is the extension slug. - * @param object $checked The list of checked extensions. - * @param array $append Additional data to append to each result in the list. - * @return array Normalized list of extensions. - */ - protected static function merge_installed_and_checked_lists( $installed, $checked, $append ) { - $new_list = array(); - foreach ( array_keys( $installed ) as $slug ) { - - $checked = (object) $checked; - - $extension = new Extension_Model( - array_merge( - array( - 'name' => $installed[ $slug ]['Name'], - 'version' => $installed[ $slug ]['Version'], - 'slug' => $slug, - 'threats' => array(), - 'checked' => false, - ), - $append - ) - ); - - if ( isset( $checked->{ $slug } ) && $checked->{ $slug }->version === $installed[ $slug ]['Version'] ) { - $extension->version = $checked->{ $slug }->version; - $extension->checked = true; - - if ( is_array( $checked->{ $slug }->vulnerabilities ) ) { - foreach ( $checked->{ $slug }->vulnerabilities as $threat ) { - $extension->threats[] = new Threat_Model( - array( - 'id' => $threat->id, - 'title' => $threat->title, - 'fixed_in' => $threat->fixed_in, - 'description' => isset( $threat->description ) ? $threat->description : null, - 'source' => isset( $threat->id ) ? Redirect::get_url( 'jetpack-protect-vul-info', array( 'path' => $threat->id ) ) : null, - ) - ); - } - } - } - - $new_list[] = $extension; - - } - - $new_list = parent::sort_threats( $new_list ); - - return $new_list; - } - - /** - * Check if the WordPress version that was checked matches the current installed version. - * - * @param object $core_check The object returned by Protect wpcom endpoint. - * @return object The object representing the current status of core checks. - */ - protected static function normalize_core_information( $core_check ) { - global $wp_version; - - $core = new Extension_Model( - array( - 'type' => 'core', - 'name' => 'WordPress', - 'version' => $wp_version, - 'checked' => false, - ) - ); - - if ( isset( $core_check->version ) && $core_check->version === $wp_version ) { - if ( is_array( $core_check->vulnerabilities ) ) { - $core->checked = true; - $core->set_threats( - array_map( - function ( $vulnerability ) { - $vulnerability->source = isset( $vulnerability->id ) ? Redirect::get_url( 'jetpack-protect-vul-info', array( 'path' => $vulnerability->id ) ) : null; - return $vulnerability; - }, - $core_check->vulnerabilities - ) - ); - } - } - - return $core; - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/src/class-rest-controller.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/src/class-rest-controller.php deleted file mode 100644 index 15e966bb..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/src/class-rest-controller.php +++ /dev/null @@ -1,482 +0,0 @@ - \WP_REST_Server::READABLE, - 'callback' => __CLASS__ . '::api_check_plan', - 'permission_callback' => function () { - return current_user_can( 'manage_options' ); - }, - ) - ); - - register_rest_route( - 'jetpack-protect/v1', - 'status', - array( - 'methods' => \WP_REST_Server::READABLE, - 'callback' => __CLASS__ . '::api_get_status', - 'permission_callback' => function () { - return current_user_can( 'manage_options' ); - }, - ) - ); - - register_rest_route( - 'jetpack-protect/v1', - 'clear-scan-cache', - array( - 'methods' => \WP_REST_Server::EDITABLE, - 'callback' => __CLASS__ . '::api_clear_scan_cache', - 'permission_callback' => function () { - return current_user_can( 'manage_options' ); - }, - ) - ); - - register_rest_route( - 'jetpack-protect/v1', - 'ignore-threat', - array( - 'methods' => \WP_REST_Server::EDITABLE, - 'callback' => __CLASS__ . '::api_ignore_threat', - 'permission_callback' => function () { - return current_user_can( 'manage_options' ); - }, - ) - ); - - register_rest_route( - 'jetpack-protect/v1', - 'fix-threats', - array( - 'methods' => \WP_REST_Server::EDITABLE, - 'callback' => __CLASS__ . '::api_fix_threats', - 'permission_callback' => function () { - return current_user_can( 'manage_options' ); - }, - ) - ); - - register_rest_route( - 'jetpack-protect/v1', - 'fix-threats-status', - array( - 'methods' => \WP_REST_Server::READABLE, - 'callback' => __CLASS__ . '::api_fix_threats_status', - 'permission_callback' => function () { - return current_user_can( 'manage_options' ); - }, - ) - ); - - register_rest_route( - 'jetpack-protect/v1', - 'check-credentials', - array( - 'methods' => \WP_REST_Server::EDITABLE, - 'callback' => __CLASS__ . '::api_check_credentials', - 'permission_callback' => function () { - return current_user_can( 'manage_options' ); - }, - ) - ); - - register_rest_route( - 'jetpack-protect/v1', - 'scan', - array( - 'methods' => \WP_REST_Server::EDITABLE, - 'callback' => __CLASS__ . '::api_scan', - 'permission_callback' => function () { - return current_user_can( 'manage_options' ); - }, - ) - ); - - register_rest_route( - 'jetpack-protect/v1', - 'toggle-waf', - array( - 'methods' => \WP_REST_Server::EDITABLE, - 'callback' => __CLASS__ . '::api_toggle_waf', - 'permission_callback' => function () { - return current_user_can( 'manage_options' ); - }, - ) - ); - - register_rest_route( - 'jetpack-protect/v1', - 'waf', - array( - 'methods' => \WP_REST_Server::READABLE, - 'callback' => __CLASS__ . '::api_get_waf', - 'permission_callback' => function () { - return current_user_can( 'manage_options' ); - }, - ) - ); - - register_rest_route( - 'jetpack-protect/v1', - 'waf-seen', - array( - 'methods' => \WP_REST_Server::READABLE, - 'callback' => __CLASS__ . '::api_get_waf_seen_status', - 'permission_callback' => function () { - return current_user_can( 'manage_options' ); - }, - ) - ); - - register_rest_route( - 'jetpack-protect/v1', - 'waf-seen', - array( - 'methods' => \WP_REST_Server::EDITABLE, - 'callback' => __CLASS__ . '::api_set_waf_seen_status', - 'permission_callback' => function () { - return current_user_can( 'manage_options' ); - }, - ) - ); - - register_rest_route( - 'jetpack-protect/v1', - 'waf-upgrade-seen', - array( - 'methods' => \WP_REST_Server::READABLE, - 'callback' => __CLASS__ . '::api_get_waf_upgrade_seen_status', - 'permission_callback' => function () { - return current_user_can( 'manage_options' ); - }, - ) - ); - - register_rest_route( - 'jetpack-protect/v1', - 'waf-upgrade-seen', - array( - 'methods' => \WP_REST_Server::EDITABLE, - 'callback' => __CLASS__ . '::api_set_waf_upgrade_seen_status', - 'permission_callback' => function () { - return current_user_can( 'manage_options' ); - }, - ) - ); - - register_rest_route( - 'jetpack-protect/v1', - 'onboarding-progress', - array( - 'methods' => \WP_REST_Server::READABLE, - 'callback' => __CLASS__ . '::api_get_onboarding_progress', - 'permission_callback' => function () { - return current_user_can( 'manage_options' ); - }, - ) - ); - - register_rest_route( - 'jetpack-protect/v1', - 'onboarding-progress', - array( - 'methods' => \WP_REST_Server::EDITABLE, - 'callback' => __CLASS__ . '::api_complete_onboarding_steps', - 'permission_callback' => function () { - return current_user_can( 'manage_options' ); - }, - ) - ); - } - - /** - * Return site plan data for the API endpoint - * - * @return WP_REST_Response - */ - public static function api_check_plan() { - $has_required_plan = Plan::has_required_plan(); - - return rest_ensure_response( $has_required_plan, 200 ); - } - - /** - * Return Protect Status for the API endpoint - * - * @param WP_REST_Request $request The request object. - * - * @return WP_REST_Response - */ - public static function api_get_status( $request ) { - $status = Status::get_status( $request['hard_refresh'] ); - return rest_ensure_response( $status, 200 ); - } - - /** - * Clear the Scan_Status cache for the API endpoint - * - * @return WP_REST_Response - */ - public static function api_clear_scan_cache() { - $cache_cleared = Scan_Status::delete_option(); - - if ( ! $cache_cleared ) { - return new WP_REST_Response( 'An error occured while attempting to clear the Jetpack Scan cache.', 500 ); - } - - return new WP_REST_Response( 'Jetpack Scan cache cleared.' ); - } - - /** - * Ignores a threat for the API endpoint - * - * @param WP_REST_Request $request The request object. - * - * @return WP_REST_Response - */ - public static function api_ignore_threat( $request ) { - if ( ! $request['threat_id'] ) { - return new WP_REST_Response( 'Missing threat ID.', 400 ); - } - - $threat_ignored = Threats::ignore_threat( $request['threat_id'] ); - - if ( ! $threat_ignored ) { - return new WP_REST_Response( 'An error occured while attempting to ignore the threat.', 500 ); - } - - return new WP_REST_Response( 'Threat ignored.' ); - } - - /** - * Fixes threats for the API endpoint - * - * @param WP_REST_Request $request The request object. - * - * @return WP_REST_Response - */ - public static function api_fix_threats( $request ) { - if ( empty( $request['threat_ids'] ) ) { - return new WP_REST_Response( 'Missing threat IDs.', 400 ); - } - - $threats_fixed = Threats::fix_threats( $request['threat_ids'] ); - - if ( ! $threats_fixed ) { - return new WP_REST_Response( 'An error occured while attempting to fix the threat.', 500 ); - } - - return new WP_REST_Response( $threats_fixed ); - } - - /** - * Fixes threats for the API endpoint - * - * @param WP_REST_Request $request The request object. - * - * @return WP_REST_Response - */ - public static function api_fix_threats_status( $request ) { - if ( empty( $request['threat_ids'] ) ) { - return new WP_REST_Response( 'Missing threat IDs.', 400 ); - } - - $threats_fixed = Threats::fix_threats_status( $request['threat_ids'] ); - - if ( ! $threats_fixed ) { - return new WP_REST_Response( 'An error occured while attempting to get the fixer status of the threats.', 500 ); - } - - return new WP_REST_Response( $threats_fixed ); - } - - /** - * Checks if the site has credentials configured - * - * @return WP_REST_Response - */ - public static function api_check_credentials() { - $credential_array = Credentials::get_credential_array(); - - if ( ! isset( $credential_array ) ) { - return new WP_REST_Response( 'An error occured while attempting to fetch the credentials array', 500 ); - } - - return new WP_REST_Response( $credential_array ); - } - - /** - * Enqueues a scan for the API endpoint - * - * @return WP_REST_Response - */ - public static function api_scan() { - $scan_enqueued = Threats::scan(); - - if ( ! $scan_enqueued ) { - return new WP_REST_Response( 'An error occured while attempting to enqueue the scan.', 500 ); - } - - return new WP_REST_Response( 'Scan enqueued.' ); - } - - /** - * Toggles the WAF module on or off for the API endpoint - * - * @return WP_REST_Response|WP_Error - */ - public static function api_toggle_waf() { - if ( Waf_Runner::is_enabled() ) { - $disabled = Waf_Runner::disable(); - if ( ! $disabled ) { - return new WP_Error( - 'waf_disable_failed', - __( 'An error occured disabling the firewall.', 'jetpack-protect' ), - array( 'status' => 500 ) - ); - } - - return rest_ensure_response( true ); - } - - $enabled = Waf_Runner::enable(); - if ( ! $enabled ) { - return new WP_Error( - 'waf_enable_failed', - __( 'An error occured enabling the firewall.', 'jetpack-protect' ), - array( 'status' => 500 ) - ); - } - - return rest_ensure_response( true ); - } - - /** - * Get WAF data for the API endpoint - * - * @return WP_Rest_Response - */ - public static function api_get_waf() { - // Ensure plugin activation has been performed so WAF module is available. - Jetpack_Protect::do_plugin_activation_activities(); - - return new WP_REST_Response( - array( - 'is_seen' => Jetpack_Protect::get_waf_seen_status(), - 'is_enabled' => Waf_Runner::is_enabled(), - 'config' => Waf_Runner::get_config(), - 'stats' => Jetpack_Protect::get_waf_stats(), - ) - ); - } - - /** - * Get WAF "Seen" status for the API endpoint - * - * @return bool Whether the current user has viewed the WAF screen. - */ - public static function api_get_waf_seen_status() { - return Jetpack_Protect::get_waf_seen_status(); - } - - /** - * Set WAF "Seen" status for the API endpoint - * - * @return bool True if seen status updated to true, false on failure. - */ - public static function api_set_waf_seen_status() { - return Jetpack_Protect::set_waf_seen_status(); - } - - /** - * Get WAF Upgrade "Seen" Status for the API endpoint - * - * @return bool Whether the current user has dismissed the upgrade popover or enabled the automatic rules feature. - */ - public static function api_get_waf_upgrade_seen_status() { - return Jetpack_Protect::get_waf_upgrade_seen_status(); - } - - /** - * Set WAF Upgrade "Seen" Status for the API endpoint - * - * @return bool True if upgrade seen status updated to true, false on failure. - */ - public static function api_set_waf_upgrade_seen_status() { - return Jetpack_Protect::set_waf_upgrade_seen_status(); - } - - /** - * Gets the current user's onboarding progress for the API endpoint - * - * @return WP_REST_Response - */ - public static function api_get_onboarding_progress() { - $progress = Onboarding::get_current_user_progress(); - return rest_ensure_response( $progress, 200 ); - } - - /** - * Set an onboarding step as completed for the API endpoint - * - * @param WP_REST_Request $request The request object. - * - * @return WP_REST_Response - */ - public static function api_complete_onboarding_steps( $request ) { - if ( empty( $request['step_ids'] ) || ! is_array( $request['step_ids'] ) ) { - return new WP_REST_Response( 'Missing or invalid onboarding step IDs.', 400 ); - } - - $completed = Onboarding::complete_steps( $request['step_ids'] ); - - if ( ! $completed ) { - return new WP_REST_Response( 'An error occured completing the onboarding step(s).', 500 ); - } - - return new WP_REST_Response( 'Onboarding step(s) completed.' ); - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/src/class-scan-status.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/src/class-scan-status.php deleted file mode 100644 index 125bf550..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/src/class-scan-status.php +++ /dev/null @@ -1,359 +0,0 @@ - true, - 'error_code' => $status->get_error_code(), - 'error_message' => $status->get_error_message(), - ) - ); - } else { - $status = self::normalize_api_data( $status ); - } - - self::$status = $status; - return $status; - } - - /** - * Gets the Scan API endpoint - * - * @return WP_Error|string - */ - public static function get_api_url() { - $blog_id = Jetpack_Options::get_option( 'id' ); - $is_connected = ( new Connection_Manager() )->is_connected(); - - if ( ! $blog_id || ! $is_connected ) { - return new WP_Error( 'site_not_connected' ); - } - - $api_url = sprintf( self::SCAN_API_BASE, $blog_id ); - - return $api_url; - } - - /** - * Fetches the status data from the Scan API - * - * @return WP_Error|array - */ - public static function fetch_from_api() { - $api_url = self::get_api_url(); - if ( is_wp_error( $api_url ) ) { - return $api_url; - } - - $response = Client::wpcom_json_api_request_as_blog( - self::get_api_url(), - '2', - array( 'method' => 'GET' ), - null, - 'wpcom' - ); - - $response_code = wp_remote_retrieve_response_code( $response ); - - if ( is_wp_error( $response ) || 200 !== $response_code || empty( $response['body'] ) ) { - return new WP_Error( 'failed_fetching_status', 'Failed to fetch Scan data from the server', array( 'status' => $response_code ) ); - } - - $body = json_decode( wp_remote_retrieve_body( $response ) ); - self::update_status_option( $body ); - return $body; - } - - /** - * Normalize API Data - * Formats the payload from the Scan API into an instance of Status_Model. - * - * @param object $scan_data The data returned by the scan API. - * - * @return Status_Model - */ - private static function normalize_api_data( $scan_data ) { - global $wp_version; - - $status = new Status_Model(); - $status->data_source = 'scan_api'; - $status->status = isset( $scan_data->state ) ? $scan_data->state : null; - $status->num_threats = 0; - $status->num_themes_threats = 0; - $status->num_plugins_threats = 0; - $status->has_unchecked_items = false; - $status->current_progress = isset( $scan_data->current->progress ) ? $scan_data->current->progress : null; - - if ( ! empty( $scan_data->most_recent->timestamp ) ) { - $date = new \DateTime( $scan_data->most_recent->timestamp ); - if ( $date ) { - $status->last_checked = $date->format( 'Y-m-d H:i:s' ); - } - } - - $status->core = new Extension_Model( - array( - 'type' => 'core', - 'name' => 'WordPress', - 'version' => $wp_version, - 'checked' => true, // to do: default to false once Scan API has manifest - ) - ); - - if ( isset( $scan_data->threats ) && is_array( $scan_data->threats ) ) { - foreach ( $scan_data->threats as $threat ) { - if ( isset( $threat->extension->type ) ) { - if ( 'plugin' === $threat->extension->type ) { - // add the extension if it does not yet exist in the status - if ( ! isset( $status->plugins[ $threat->extension->slug ] ) ) { - $status->plugins[ $threat->extension->slug ] = new Extension_Model( - array( - 'name' => isset( $threat->extension->name ) ? $threat->extension->name : null, - 'slug' => isset( $threat->extension->slug ) ? $threat->extension->slug : null, - 'version' => isset( $threat->extension->version ) ? $threat->extension->version : null, - 'type' => 'plugin', - 'checked' => true, - 'threats' => array(), - ) - ); - } - - $status->plugins[ $threat->extension->slug ]->threats[] = new Threat_Model( - array( - 'id' => isset( $threat->id ) ? $threat->id : null, - 'signature' => isset( $threat->signature ) ? $threat->signature : null, - 'title' => isset( $threat->title ) ? $threat->title : null, - 'description' => isset( $threat->description ) ? $threat->description : null, - 'vulnerability_description' => isset( $threat->vulnerability_description ) ? $threat->vulnerability_description : null, - 'fix_description' => isset( $threat->fix_description ) ? $threat->fix_description : null, - 'payload_subtitle' => isset( $threat->payload_subtitle ) ? $threat->payload_subtitle : null, - 'payload_description' => isset( $threat->payload_description ) ? $threat->payload_description : null, - 'first_detected' => isset( $threat->first_detected ) ? $threat->first_detected : null, - 'fixed_in' => isset( $threat->fixer->fixer ) && 'update' === $threat->fixer->fixer ? $threat->fixer->target : null, - 'severity' => isset( $threat->severity ) ? $threat->severity : null, - 'fixable' => isset( $threat->fixer ) ? $threat->fixer : null, - 'status' => isset( $threat->status ) ? $threat->status : null, - 'filename' => isset( $threat->filename ) ? $threat->filename : null, - 'context' => isset( $threat->context ) ? $threat->context : null, - 'source' => isset( $threat->source ) ? $threat->source : null, - ) - ); - ++$status->num_threats; - ++$status->num_plugins_threats; - continue; - } - - if ( 'theme' === $threat->extension->type ) { - // add the extension if it does not yet exist in the status - if ( ! isset( $status->themes[ $threat->extension->slug ] ) ) { - $status->themes[ $threat->extension->slug ] = new Extension_Model( - array( - 'name' => isset( $threat->extension->name ) ? $threat->extension->name : null, - 'slug' => isset( $threat->extension->slug ) ? $threat->extension->slug : null, - 'version' => isset( $threat->extension->version ) ? $threat->extension->version : null, - 'type' => 'theme', - 'checked' => true, - 'threats' => array(), - ) - ); - } - - $status->themes[ $threat->extension->slug ]->threats[] = new Threat_Model( - array( - 'id' => isset( $threat->id ) ? $threat->id : null, - 'signature' => isset( $threat->signature ) ? $threat->signature : null, - 'title' => isset( $threat->title ) ? $threat->title : null, - 'description' => isset( $threat->description ) ? $threat->description : null, - 'vulnerability_description' => isset( $threat->vulnerability_description ) ? $threat->vulnerability_description : null, - 'fix_description' => isset( $threat->fix_description ) ? $threat->fix_description : null, - 'payload_subtitle' => isset( $threat->payload_subtitle ) ? $threat->payload_subtitle : null, - 'payload_description' => isset( $threat->payload_description ) ? $threat->payload_description : null, - 'first_detected' => isset( $threat->first_detected ) ? $threat->first_detected : null, - 'fixed_in' => isset( $threat->fixer->fixer ) && 'update' === $threat->fixer->fixer ? $threat->fixer->target : null, - 'severity' => isset( $threat->severity ) ? $threat->severity : null, - 'fixable' => isset( $threat->fixer ) ? $threat->fixer : null, - 'status' => isset( $threat->status ) ? $threat->status : null, - 'filename' => isset( $threat->filename ) ? $threat->filename : null, - 'context' => isset( $threat->context ) ? $threat->context : null, - 'source' => isset( $threat->source ) ? $threat->source : null, - ) - ); - ++$status->num_threats; - ++$status->num_themes_threats; - continue; - } - } - - if ( isset( $threat->signature ) && 'Vulnerable.WP.Core' === $threat->signature ) { - if ( $threat->version !== $wp_version ) { - continue; - } - - $status->core->threats[] = new Threat_Model( - array( - 'id' => $threat->id, - 'signature' => $threat->signature, - 'title' => $threat->title, - 'description' => $threat->description, - 'first_detected' => $threat->first_detected, - 'severity' => $threat->severity, - ) - ); - ++$status->num_threats; - - continue; - } - - if ( ! empty( $threat->filename ) ) { - $status->files[] = new Threat_Model( $threat ); - ++$status->num_threats; - continue; - } - - if ( ! empty( $threat->table ) ) { - $status->database[] = new Threat_Model( $threat ); - ++$status->num_threats; - continue; - } - } - } - - $installed_plugins = Plugins_Installer::get_plugins(); - $status->plugins = self::merge_installed_and_checked_lists( $installed_plugins, $status->plugins, array( 'type' => 'plugins' ), true ); - - $installed_themes = Sync_Functions::get_themes(); - $status->themes = self::merge_installed_and_checked_lists( $installed_themes, $status->themes, array( 'type' => 'themes' ), true ); - - foreach ( array_merge( $status->themes, $status->plugins ) as $extension ) { - if ( ! $extension->checked ) { - $status->has_unchecked_items = true; - break; - } - } - - return $status; - } - - /** - * Merges the list of installed extensions with the list of extensions that were checked for known vulnerabilities and return a normalized list to be used in the UI - * - * @param array $installed The list of installed extensions, where each attribute key is the extension slug. - * @param object $checked The list of checked extensions. - * @param array $append Additional data to append to each result in the list. - * @return array Normalized list of extensions. - */ - protected static function merge_installed_and_checked_lists( $installed, $checked, $append ) { - $new_list = array(); - $checked = (object) $checked; - - foreach ( array_keys( $installed ) as $slug ) { - /** - * Extension Type Map - * - * @var array $extension_type_map Key value pairs of extension types and their corresponding - * identifier used by the Scan API data source. - */ - $extension_type_map = array( - 'themes' => 'r1', - 'plugins' => 'r2', - ); - - $version = $installed[ $slug ]['Version']; - $short_slug = str_replace( '.php', '', explode( '/', $slug )[0] ); - $scanifest_slug = $extension_type_map[ $append['type'] ] . ":$short_slug@$version"; - - $extension = new Extension_Model( - array_merge( - array( - 'name' => $installed[ $slug ]['Name'], - 'version' => $version, - 'slug' => $slug, - 'threats' => array(), - 'checked' => false, - ), - $append - ) - ); - - if ( ! isset( $checked->extensions ) // no extension data available from Scan API - || is_array( $checked->extensions ) && in_array( $scanifest_slug, $checked->extensions, true ) // extension data matches Scan API - ) { - $extension->checked = true; - if ( isset( $checked->{ $short_slug }->threats ) ) { - $extension->threats = $checked->{ $short_slug }->threats; - } - } - - $new_list[] = $extension; - - } - - $new_list = parent::sort_threats( $new_list ); - - return $new_list; - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/src/class-site-health.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/src/class-site-health.php deleted file mode 100644 index 9c62ea01..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/src/class-site-health.php +++ /dev/null @@ -1,111 +0,0 @@ - __( 'Jetpack Protect checks', 'jetpack-protect' ), - 'test' => array( __CLASS__, 'do_checks' ), - ); - - return $checks; - } - - /** - * Do site-health page checks - * - * @access public - * @return array - */ - public static function do_checks() { - $total_threats = Status::get_total_threats(); - $threats = Status::get_all_threats(); - $threats = array_map( - function ( $v ) { - return $v->title; - }, - $threats - ); - - /** - * Default, no threats found - */ - $result = array( - 'label' => __( 'No known threats found', 'jetpack-protect' ), - 'status' => 'good', - 'badge' => array( - 'label' => __( 'Security', 'jetpack-protect' ), - 'color' => 'gray', - ), - 'description' => sprintf( - '

          %s

          ', - __( 'Jetpack Protect did not find any known threats in your site. Threats can be exploited by hackers and cause harm to your website.', 'jetpack-protect' ) - ), - 'actions' => '', - 'test' => 'jetpack_protect_checks', - ); - - /** - * If threats found. - */ - if ( $total_threats ) { - $result['status'] = 'critical'; - /* translators: $d is the number of threats found. */ - $result['label'] = sprintf( _n( 'Your site is affected by %d security threat', 'Your site is affected by %d security threats', $total_threats, 'jetpack-protect' ), $total_threats ); - $result['description'] = __( 'Jetpack Protect detected the following security threats in your site:', 'jetpack-protect' ); - - foreach ( $threats as $threat ) { - $result['description'] .= '

          '; - $result['description'] .= "  "; - $result['description'] .= wp_kses( $threat, array( 'a' => array( 'href' => array() ) ) ); // Only allow a href HTML tags. - $result['description'] .= '

          '; - } - $result['description'] .= '

          '; - $result['description'] .= sprintf( - wp_kses( - /* translators: Link to Jetpack Protect. */ - __( 'See Protect overview page for more information.', 'jetpack-protect' ), - array( - 'a' => array( 'href' => array() ), - ) - ), - esc_url( admin_url( 'admin.php?page=jetpack-protect' ) ) - ); - $result['description'] .= '

          '; - } - - return $result; - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/src/class-status.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/src/class-status.php deleted file mode 100644 index 41b574c5..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/src/class-status.php +++ /dev/null @@ -1,306 +0,0 @@ - (int) $option_timestamp; - } - - /** - * Checks if we should consider the stored cache or bypass it - * - * @return boolean - */ - public static function should_use_cache() { - return defined( 'JETPACK_PROTECT_DEV__BYPASS_CACHE' ) && JETPACK_PROTECT_DEV__BYPASS_CACHE ? false : true; - } - - /** - * Gets the current cached status - * - * @return bool|array False if value is not found. Array with values if cache is found. - */ - public static function get_from_options() { - return maybe_unserialize( get_option( static::OPTION_NAME ) ); - } - - /** - * Updated the cached status and its timestamp - * - * @param array $status The new status to be cached. - * @return void - */ - public static function update_status_option( $status ) { - // TODO: Sanitize $status. - update_option( static::OPTION_NAME, maybe_serialize( $status ) ); - $end_date = self::get_cache_end_date_by_status( $status ); - update_option( static::OPTION_TIMESTAMP_NAME, $end_date ); - } - - /** - * Returns the timestamp the cache should expire depending on the current status - * - * Initial empty status, which are returned before the first check was performed, should be cache for less time - * - * @param object $status The response from the server being cached. - * @return int The timestamp when the cache should expire. - */ - public static function get_cache_end_date_by_status( $status ) { - if ( ! is_object( $status ) || empty( $status->last_checked ) ) { - return time() + static::INITIAL_OPTION_EXPIRES_AFTER; - } - return time() + static::OPTION_EXPIRES_AFTER; - } - - /** - * Delete the cached status and its timestamp - * - * @return bool Whether all related status options were successfully deleted. - */ - public static function delete_option() { - $option_deleted = delete_option( static::OPTION_NAME ); - $option_timestamp_deleted = delete_option( static::OPTION_TIMESTAMP_NAME ); - - return $option_deleted && $option_timestamp_deleted; - } - - /** - * Checks the current status to see if there are any threats found - * - * @return boolean - */ - public static function has_threats() { - return 0 < self::get_total_threats(); - } - - /** - * Gets the total number of threats found - * - * @return integer - */ - public static function get_total_threats() { - $status = static::get_status(); - return isset( $status->num_threats ) && is_int( $status->num_threats ) ? $status->num_threats : 0; - } - - /** - * Get all threats combined - * - * @return array - */ - public static function get_all_threats() { - return array_merge( - self::get_wordpress_threats(), - self::get_themes_threats(), - self::get_plugins_threats(), - self::get_files_threats(), - self::get_database_threats() - ); - } - - /** - * Get threats found for WordPress core - * - * @return array - */ - public static function get_wordpress_threats() { - return self::get_threats( 'core' ); - } - - /** - * Get threats found for themes - * - * @return array - */ - public static function get_themes_threats() { - return self::get_threats( 'themes' ); - } - - /** - * Get threats found for plugins - * - * @return array - */ - public static function get_plugins_threats() { - return self::get_threats( 'plugins' ); - } - - /** - * Get threats found for files - * - * @return array - */ - public static function get_files_threats() { - return self::get_threats( 'files' ); - } - - /** - * Get threats found for plugins - * - * @return array - */ - public static function get_database_threats() { - return self::get_threats( 'database' ); - } - - /** - * Get the threats for one type of extension or core - * - * @param string $type What threats you want to get. Possible values are 'core', 'themes' and 'plugins'. - * - * @return array - */ - public static function get_threats( $type ) { - $status = static::get_status(); - - if ( 'core' === $type ) { - return isset( $status->$type ) && ! empty( $status->$type->threats ) ? $status->$type->threats : array(); - } - - if ( 'files' === $type || 'database' === $type ) { - return isset( $status->$type ) && ! empty( $status->$type ) ? $status->$type : array(); - } - - $threats = array(); - if ( isset( $status->$type ) ) { - foreach ( (array) $status->$type as $item ) { - if ( ! empty( $item->threats ) ) { - $threats = array_merge( $threats, $item->threats ); - } - } - } - return $threats; - } - - /** - * Check if the WordPress version that was checked matches the current installed version. - * - * @param object $core_check The object returned by Protect wpcom endpoint. - * @return object The object representing the current status of core checks. - */ - protected static function normalize_core_information( $core_check ) { - global $wp_version; - - $core = new Extension_Model( - array( - 'type' => 'core', - 'name' => 'WordPress', - 'version' => $wp_version, - 'checked' => false, - ) - ); - - if ( isset( $core_check->version ) && $core_check->version === $wp_version ) { - if ( is_array( $core_check->vulnerabilities ) ) { - $core->checked = true; - $core->set_threats( $core_check->vulnerabilities ); - } - } - - return $core; - } - - /** - * Sort By Threats - * - * @param array $threats Array of threats to sort. - * - * @return array The sorted $threats array. - */ - protected static function sort_threats( $threats ) { - usort( - $threats, - function ( $a, $b ) { - // sort primarily based on the presence of threats - $ret = empty( $a->threats ) <=> empty( $b->threats ); - - // sort secondarily on whether the item has been checked - if ( ! $ret ) { - $ret = $a->checked <=> $b->checked; - } - - return $ret; - } - ); - - return $threats; - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/src/class-threats.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/src/class-threats.php deleted file mode 100644 index bc56e62b..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/src/class-threats.php +++ /dev/null @@ -1,202 +0,0 @@ -is_connected(); - - if ( ! $blog_id || ! $is_connected ) { - return new WP_Error( 'site_not_connected' ); - } - - $api_url = sprintf( '/sites/%d/alerts', $blog_id ); - - return $api_url; - } - - /** - * Update Threat - * - * @param string $threat_id The threat ID. - * @param array $updates The keys/values to update. - * - * @return bool - */ - public static function update_threat( $threat_id, $updates ) { - $api_base = self::get_api_base( $threat_id ); - if ( is_wp_error( $api_base ) ) { - return false; - } - - $response = Client::wpcom_json_api_request_as_user( - "$api_base/$threat_id", - '2', - array( 'method' => 'POST' ), - wp_json_encode( $updates ), - 'wpcom' - ); - - $response_code = wp_remote_retrieve_response_code( $response ); - - if ( is_wp_error( $response ) || 200 !== $response_code ) { - return false; - } - - // clear the now out-of-date cache - Scan_Status::delete_option(); - - return true; - } - - /** - * Ignore Threat - * - * @param string $threat_id The threat ID. - * - * @return bool - */ - public static function ignore_threat( $threat_id ) { - return self::update_threat( $threat_id, array( 'ignore' => true ) ); - } - - /** - * Fix Threats - * - * @param array $threat_ids Threat IDs. - * - * @return bool|array - */ - public static function fix_threats( $threat_ids ) { - $api_base = self::get_api_base(); - if ( is_wp_error( $api_base ) ) { - return false; - } - - $response = Client::wpcom_json_api_request_as_user( - "$api_base/fix", - '2', - array( 'method' => 'POST' ), - wp_json_encode( - array( - 'threat_ids' => $threat_ids, - ) - ), - 'wpcom' - ); - - $response_code = wp_remote_retrieve_response_code( $response ); - - if ( is_wp_error( $response ) || 200 !== $response_code ) { - return false; - } - - // clear the now out-of-date cache - Scan_Status::delete_option(); - - $parsed_response = json_decode( $response['body'] ); - - if ( ! $parsed_response ) { - return false; - } - - return $parsed_response; - } - - /** - * Fix Threats Status - * - * @param array $threat_ids Threat IDs. - * - * @return bool|array - */ - public static function fix_threats_status( $threat_ids ) { - $api_base = self::get_api_base(); - if ( is_wp_error( $api_base ) ) { - return false; - } - - $response = Client::wpcom_json_api_request_as_user( - add_query_arg( 'threat_ids', $threat_ids, "$api_base/fix" ), - '2', - array( 'method' => 'GET' ), - null, - 'wpcom' - ); - - $response_code = wp_remote_retrieve_response_code( $response ); - - if ( is_wp_error( $response ) || 200 !== $response_code ) { - return false; - } - - $parsed_response = json_decode( $response['body'] ); - - if ( ! $parsed_response ) { - return false; - } - - // clear the potentially out-of-date cache - Scan_Status::delete_option(); - - return $parsed_response; - } - - /** - * Scan enqueue - * - * @return bool - */ - public static function scan() { - $blog_id = Jetpack_Options::get_option( 'id' ); - $is_connected = ( new Connection_Manager() )->is_connected(); - - if ( ! $blog_id || ! $is_connected ) { - return false; - } - - $api_base = sprintf( '/sites/%d/scan', $blog_id ); - - if ( is_wp_error( $api_base ) ) { - return false; - } - - $response = Client::wpcom_json_api_request_as_blog( - "$api_base/enqueue", - '2', - array( 'method' => 'POST' ), - null, - 'wpcom' - ); - - $response_code = wp_remote_retrieve_response_code( $response ); - - if ( is_wp_error( $response ) || 200 !== $response_code ) { - return false; - } - - // clear the now out-of-date cache - Scan_Status::delete_option(); - - return true; - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/src/models/class-extension-model.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/src/models/class-extension-model.php deleted file mode 100644 index c0b93ce9..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/src/models/class-extension-model.php +++ /dev/null @@ -1,110 +0,0 @@ - - */ - public $threats = array(); - - /** - * Whether the extension has been checked for threats. - * - * @var null|bool - */ - public $checked; - - /** - * The type of extension ("plugins", "themes", or "core"). - * - * @var null|string - */ - public $type; - - /** - * Extension Model Constructor - * - * @param array|object $extension Extension data to load into the model instance. - */ - public function __construct( $extension = array() ) { - if ( is_object( $extension ) ) { - $extension = (array) $extension; - } - - foreach ( $extension as $property => $value ) { - if ( property_exists( $this, $property ) ) { - // use the property's setter method when possible - if ( method_exists( $this, "set_$property" ) ) { - $this->{ "set_$property" }( $value ); - continue; - } - - // otherwise, map the value directly into the class property - $this->$property = $value; - } - } - } - - /** - * Set Threats - * - * @param array $threats An array of threat data to add to the extension. - */ - public function set_threats( $threats ) { - if ( ! is_array( $threats ) ) { - $this->threats = array(); - return; - } - - // convert each provided threat item into an instance of Threat_Model - $threats = array_map( - function ( $threat ) { - if ( is_a( $threat, 'Threat_Model' ) ) { - return $threat; - } - - if ( is_object( $threat ) ) { - $threat = (array) $threat; - } - - return new Threat_Model( $threat ); - }, - $threats - ); - - $this->threats = $threats; - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/src/models/class-status-model.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/src/models/class-status-model.php deleted file mode 100644 index 34a58e08..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/src/models/class-status-model.php +++ /dev/null @@ -1,141 +0,0 @@ - - */ - public $themes = array(); - - /** - * Status plugins. - * - * @var array - */ - public $plugins = array(); - - /** - * File threats. - * - * @var array - */ - public $files = array(); - - /** - * Database threats. - * - * @var array - */ - public $database = array(); - - /** - * Whether the site includes items that have not been checked. - * - * @var boolean - */ - public $has_unchecked_items; - - /** - * The estimated percentage of the current scan. - * - * @var int - */ - public $current_progress; - - /** - * Whether there was an error loading the status. - * - * @var bool - */ - public $error = false; - - /** - * The error code thrown when loading the status. - * - * @var string - */ - public $error_code; - - /** - * The error message thrown when loading the status. - * - * @var string - */ - public $error_message; - - /** - * Status constructor. - * - * @param array $status The status data to load into the class instance. - */ - public function __construct( $status = array() ) { - // set status defaults - $this->core = new \stdClass(); - - foreach ( $status as $property => $value ) { - if ( property_exists( $this, $property ) ) { - $this->$property = $value; - } - } - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/src/models/class-threat-model.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/src/models/class-threat-model.php deleted file mode 100644 index 4a5cb6c8..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/src/models/class-threat-model.php +++ /dev/null @@ -1,115 +0,0 @@ - $value ) { - if ( property_exists( $this, $property ) ) { - $this->$property = $value; - } - } - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/vendor/autoload.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/vendor/autoload.php deleted file mode 100644 index a014dfae..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/vendor/autoload.php +++ /dev/null @@ -1,25 +0,0 @@ -= 7.0. [#34192] - -## [0.3.5] - 2023-10-24 - -- Updated package dependencies. - -## [0.3.4] - 2023-08-23 -### Changed -- Updated package dependencies. [#32605] - -## [0.3.3] - 2023-06-19 -### Added -- Add the Advanced SEO feature to the list of free features. [#31213] - -## [0.3.2] - 2023-06-12 -### Changed -- Remove Jetpack-the-plugin dependencies from Current Plan class. [#31207] - -## [0.3.1] - 2023-06-05 -### Fixed -- Revert gating removal for simple payments [#31067] - -## [0.3.0] - 2023-05-11 -### Changed -- Make Earn products free for all Jetpack plans [#30432] - -## [0.2.12] - 2023-05-08 -### Changed -- Make Premium Content accessible on Free plans. [#30398] - -## [0.2.11] - 2023-04-10 -### Added -- Add Jetpack Autoloader package suggestion. [#29988] - -## [0.2.10] - 2023-02-20 -### Changed -- Minor internal updates. - -## [0.2.9] - 2023-01-25 -### Changed -- Minor internal updates. - -## [0.2.8] - 2022-12-02 -### Changed -- Updated package dependencies. [#27688] - -## [0.2.7] - 2022-11-22 -### Changed -- Updated package dependencies. [#27043] - -## [0.2.6] - 2022-11-07 -### Changed -- Updated package dependencies. [#27278] - -## [0.2.5] - 2022-10-25 -### Changed -- Updated package dependencies. [#26705] - -## [0.2.4] - 2022-09-20 -### Changed -- Updated package dependencies. - -## [0.2.3] - 2022-09-08 -### Changed -- Updated package dependencies. - -## [0.2.2] - 2022-08-30 -### Changed -- Updated package dependencies. [#25694] - -## [0.2.1] - 2022-08-23 -### Changed -- Updated package dependencies. [#25628] - -## [0.2.0] - 2022-08-16 -### Added -- Tweaked the supports method of the plans package to refresh the plan data. [#25347] - -## [0.1.3] - 2022-08-03 -### Changed -- Updated package dependencies. [#25300, #25315] - -## [0.1.2] - 2022-07-26 -### Changed -- Add mirror repository information to package info. [#25142] -- Updated package dependencies. [#25158] - -## 0.1.1 - 2022-07-19 -### Changed -- Updated package dependencies. - -## 0.1.0 - 2022-07-06 -### Added -- Add support for WordPress.com Starter plan. [#24496] -- Package created. [#23503] - -### Changed -- Renaming master to trunk. [#24661] -- Updated package dependencies. - -### Deprecated -- Moved the options class into Connection. [#24095] - -[0.4.3]: https://github.com/Automattic/jetpack-plans/compare/v0.4.2...v0.4.3 -[0.4.2]: https://github.com/Automattic/jetpack-plans/compare/v0.4.1...v0.4.2 -[0.4.1]: https://github.com/Automattic/jetpack-plans/compare/v0.4.0...v0.4.1 -[0.4.0]: https://github.com/Automattic/jetpack-plans/compare/v0.3.5...v0.4.0 -[0.3.5]: https://github.com/Automattic/jetpack-plans/compare/v0.3.4...v0.3.5 -[0.3.4]: https://github.com/Automattic/jetpack-plans/compare/v0.3.3...v0.3.4 -[0.3.3]: https://github.com/Automattic/jetpack-plans/compare/v0.3.2...v0.3.3 -[0.3.2]: https://github.com/Automattic/jetpack-plans/compare/v0.3.1...v0.3.2 -[0.3.1]: https://github.com/Automattic/jetpack-plans/compare/v0.3.0...v0.3.1 -[0.3.0]: https://github.com/Automattic/jetpack-plans/compare/v0.2.12...v0.3.0 -[0.2.12]: https://github.com/Automattic/jetpack-plans/compare/v0.2.11...v0.2.12 -[0.2.11]: https://github.com/Automattic/jetpack-plans/compare/v0.2.10...v0.2.11 -[0.2.10]: https://github.com/Automattic/jetpack-plans/compare/v0.2.9...v0.2.10 -[0.2.9]: https://github.com/Automattic/jetpack-plans/compare/v0.2.8...v0.2.9 -[0.2.8]: https://github.com/Automattic/jetpack-plans/compare/v0.2.7...v0.2.8 -[0.2.7]: https://github.com/Automattic/jetpack-plans/compare/v0.2.6...v0.2.7 -[0.2.6]: https://github.com/Automattic/jetpack-plans/compare/v0.2.5...v0.2.6 -[0.2.5]: https://github.com/Automattic/jetpack-plans/compare/v0.2.4...v0.2.5 -[0.2.4]: https://github.com/Automattic/jetpack-plans/compare/v0.2.3...v0.2.4 -[0.2.3]: https://github.com/Automattic/jetpack-plans/compare/v0.2.2...v0.2.3 -[0.2.2]: https://github.com/Automattic/jetpack-plans/compare/v0.2.1...v0.2.2 -[0.2.1]: https://github.com/Automattic/jetpack-plans/compare/v0.2.0...v0.2.1 -[0.2.0]: https://github.com/Automattic/jetpack-plans/compare/v0.1.3...v0.2.0 -[0.1.3]: https://github.com/Automattic/jetpack-plans/compare/v0.1.2...v0.1.3 -[0.1.2]: https://github.com/Automattic/jetpack-plans/compare/v0.1.1...v0.1.2 diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/vendor/automattic/jetpack-plans/LICENSE.txt b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/vendor/automattic/jetpack-plans/LICENSE.txt deleted file mode 100644 index e82774c1..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/vendor/automattic/jetpack-plans/LICENSE.txt +++ /dev/null @@ -1,357 +0,0 @@ -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - - -=================================== - - -GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - -Copyright (C) 1989, 1991 Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -Everyone is permitted to copy and distribute verbatim copies -of this license document, but changing it is not allowed. - - Preamble - -The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Lesser General Public License instead.) You can apply it to -your programs, too. - -When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - -To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - -For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - -We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - -Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - -Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - -The precise terms and conditions for copying, distribution and -modification follow. - -GNU GENERAL PUBLIC LICENSE -TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - -0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - -1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - -2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - -a) You must cause the modified files to carry prominent notices -stating that you changed the files and the date of any change. - -b) You must cause any work that you distribute or publish, that in -whole or in part contains or is derived from the Program or any -part thereof, to be licensed as a whole at no charge to all third -parties under the terms of this License. - -c) If the modified program normally reads commands interactively -when run, you must cause it, when started running for such -interactive use in the most ordinary way, to print or display an -announcement including an appropriate copyright notice and a -notice that there is no warranty (or else, saying that you provide -a warranty) and that users may redistribute the program under -these conditions, and telling the user how to view a copy of this -License. (Exception: if the Program itself is interactive but -does not normally print such an announcement, your work based on -the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - -3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - -a) Accompany it with the complete corresponding machine-readable -source code, which must be distributed under the terms of Sections -1 and 2 above on a medium customarily used for software interchange; or, - -b) Accompany it with a written offer, valid for at least three -years, to give any third party, for a charge no more than your -cost of physically performing source distribution, a complete -machine-readable copy of the corresponding source code, to be -distributed under the terms of Sections 1 and 2 above on a medium -customarily used for software interchange; or, - -c) Accompany it with the information you received as to the offer -to distribute corresponding source code. (This alternative is -allowed only for noncommercial distribution and only if you -received the program in object code or executable form with such -an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - -4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - -5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - -6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - -7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - -8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - -9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - -10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - -11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - -12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - -How to Apply These Terms to Your New Programs - -If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - -To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - -Copyright (C) - -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along -with this program; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - -Gnomovision version 69, Copyright (C) year name of author -Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. -This is free software, and you are welcome to redistribute it -under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - -Yoyodyne, Inc., hereby disclaims all copyright interest in the program -`Gnomovision' (which makes passes at compilers) written by James Hacker. - -, 1 April 1989 -Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/vendor/automattic/jetpack-plans/SECURITY.md b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/vendor/automattic/jetpack-plans/SECURITY.md deleted file mode 100644 index 98f48dd1..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/vendor/automattic/jetpack-plans/SECURITY.md +++ /dev/null @@ -1,47 +0,0 @@ -# Security Policy - -Full details of the Automattic Security Policy can be found on [automattic.com](https://automattic.com/security/). - -## Supported Versions - -Generally, only the latest version of Jetpack and its associated plugins have continued support. If a critical vulnerability is found in the current version of a plugin, we may opt to backport any patches to previous versions. - -## Reporting a Vulnerability - -Our HackerOne program covers the below plugin software, as well as a variety of related projects and infrastructure: - -* [Jetpack](https://jetpack.com/) -* Jetpack Backup -* Jetpack Boost -* Jetpack CRM -* Jetpack Protect -* Jetpack Search -* Jetpack Social -* Jetpack VideoPress - -**For responsible disclosure of security issues and to be eligible for our bug bounty program, please submit your report via the [HackerOne](https://hackerone.com/automattic) portal.** - -Our most critical targets are: - -* Jetpack and the Jetpack composer packages (all within this repo) -* Jetpack.com -- the primary marketing site. -* cloud.jetpack.com -- a management site. -* wordpress.com -- the shared management site for both Jetpack and WordPress.com sites. - -For more targets, see the `In Scope` section on [HackerOne](https://hackerone.com/automattic). - -_Please note that the **WordPress software is a separate entity** from Automattic. Please report vulnerabilities for WordPress through [the WordPress Foundation's HackerOne page](https://hackerone.com/wordpress)._ - -## Guidelines - -We're committed to working with security researchers to resolve the vulnerabilities they discover. You can help us by following these guidelines: - -* Follow [HackerOne's disclosure guidelines](https://www.hackerone.com/disclosure-guidelines). -* Pen-testing Production: - * Please **setup a local environment** instead whenever possible. Most of our code is open source (see above). - * If that's not possible, **limit any data access/modification** to the bare minimum necessary to reproduce a PoC. - * **_Don't_ automate form submissions!** That's very annoying for us, because it adds extra work for the volunteers who manage those systems, and reduces the signal/noise ratio in our communication channels. - * To be eligible for a bounty, all of these guidelines must be followed. -* Be Patient - Give us a reasonable time to correct the issue before you disclose the vulnerability. - -We also expect you to comply with all applicable laws. You're responsible to pay any taxes associated with your bounties. diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/vendor/automattic/jetpack-plans/composer.json b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/vendor/automattic/jetpack-plans/composer.json deleted file mode 100644 index a9974089..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/vendor/automattic/jetpack-plans/composer.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "name": "automattic/jetpack-plans", - "description": "Fetch information about Jetpack Plans from wpcom", - "type": "library", - "license": "GPL-2.0-or-later", - "require": { - "php": ">=7.0", - "automattic/jetpack-connection": "^2.4.1" - }, - "require-dev": { - "yoast/phpunit-polyfills": "1.1.0", - "automattic/jetpack-changelogger": "^4.1.1", - "automattic/jetpack-status": "^2.1.2", - "automattic/wordbless": "@dev" - }, - "suggest": { - "automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package." - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "scripts": { - "phpunit": [ - "./vendor/phpunit/phpunit/phpunit --colors=always" - ], - "test-php": [ - "@composer phpunit" - ], - "post-install-cmd": "WorDBless\\Composer\\InstallDropin::copy", - "post-update-cmd": "WorDBless\\Composer\\InstallDropin::copy", - "build-production": "echo 'Add your build step to composer.json, please!'", - "build-development": "echo 'Add your build step to composer.json, please!'" - }, - "minimum-stability": "dev", - "prefer-stable": true, - "extra": { - "autotagger": true, - "mirror-repo": "Automattic/jetpack-plans", - "changelogger": { - "link-template": "https://github.com/Automattic/jetpack-plans/compare/v${old}...v${new}" - }, - "branch-alias": { - "dev-trunk": "0.4.x-dev" - } - }, - "config": { - "allow-plugins": { - "roots/wordpress-core-installer": true - } - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/vendor/automattic/jetpack-plans/src/class-current-plan.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/vendor/automattic/jetpack-plans/src/class-current-plan.php deleted file mode 100644 index f6e7c6e3..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/vendor/automattic/jetpack-plans/src/class-current-plan.php +++ /dev/null @@ -1,393 +0,0 @@ - array( - 'plans' => array( - 'jetpack_free', - ), - 'supports' => array( - 'advanced-seo', - 'opentable', - 'calendly', - 'send-a-message', - 'sharing-block', - 'whatsapp-button', - 'social-previews', - 'videopress', - 'videopress/video', - 'v6-video-frame-poster', - - 'core/video', - 'core/cover', - 'core/audio', - ), - ), - 'personal' => array( - 'plans' => array( - 'jetpack_personal', - 'jetpack_personal_monthly', - 'personal-bundle', - 'personal-bundle-monthly', - 'personal-bundle-2y', - 'personal-bundle-3y', - 'starter-plan', - ), - 'supports' => array( - 'akismet', - 'payments', - 'videopress', - ), - ), - 'premium' => array( - 'plans' => array( - 'jetpack_premium', - 'jetpack_premium_monthly', - 'value_bundle', - 'value_bundle-monthly', - 'value_bundle-2y', - 'value_bundle-3y', - 'jetpack_creator_yearly', - 'jetpack_creator_bi_yearly', - 'jetpack_creator_monthly', - ), - 'supports' => array( - 'simple-payments', - 'vaultpress', - 'videopress', - 'republicize', - ), - ), - 'security' => array( - 'plans' => array( - 'jetpack_security_daily', - 'jetpack_security_daily_monthly', - 'jetpack_security_realtime', - 'jetpack_security_realtime_monthly', - 'jetpack_security_t1_yearly', - 'jetpack_security_t1_monthly', - 'jetpack_security_t2_yearly', - 'jetpack_security_t2_monthly', - ), - 'supports' => array(), - ), - 'business' => array( - 'plans' => array( - 'jetpack_business', - 'jetpack_business_monthly', - 'business-bundle', - 'business-bundle-monthly', - 'business-bundle-2y', - 'business-bundle-3y', - 'ecommerce-bundle', - 'ecommerce-bundle-monthly', - 'ecommerce-bundle-2y', - 'ecommerce-bundle-3y', - 'pro-plan', - 'wp_bundle_migration_trial_monthly', - 'wp_bundle_hosting_trial_monthly', - 'ecommerce-trial-bundle-monthly', - 'wooexpress-small-bundle-yearly', - 'wooexpress-small-bundle-monthly', - 'wooexpress-medium-bundle-yearly', - 'wooexpress-medium-bundle-monthly', - 'wp_com_hundred_year_bundle_centennially', - ), - 'supports' => array(), - ), - - 'complete' => array( - 'plans' => array( - 'jetpack_complete', - 'jetpack_complete_monthly', - 'vip', - ), - 'supports' => array(), - ), - ); - - /** - * Given a response to the `/sites/%d` endpoint, will parse the response and attempt to set the - * site's plan and products from the response. - * - * @param array $response The response from `/sites/%d`. - * @return bool Was the plan successfully updated? - */ - public static function update_from_sites_response( $response ) { - // Bail if there was an error or malformed response. - if ( is_wp_error( $response ) || ! is_array( $response ) || ! isset( $response['body'] ) ) { - return false; - } - - $body = wp_remote_retrieve_body( $response ); - if ( is_wp_error( $body ) ) { - return false; - } - - // Decode the results. - $results = json_decode( $body, true ); - - if ( ! is_array( $results ) ) { - return false; - } - - if ( isset( $results['products'] ) ) { - // Store the site's products in an option and return true if updated. - self::store_data_in_option( self::SITE_PRODUCTS_OPTION, $results['products'] ); - } - - if ( ! isset( $results['plan'] ) ) { - return false; - } - - $current_plan = get_option( self::PLAN_OPTION, array() ); - - if ( ! empty( $current_plan ) && $current_plan === $results['plan'] ) { - // Bail if the plans array hasn't changed. - return false; - } - - // Store the new plan in an option and return true if updated. - $result = self::store_data_in_option( self::PLAN_OPTION, $results['plan'] ); - - if ( $result ) { - // Reset the cache since we've just updated the plan. - self::$active_plan_cache = null; - } - - return $result; - } - - /** - * Store data in an option. - * - * @param string $option The name of the option that will store the data. - * @param array $data Data to be store in an option. - * @return bool Were the subscriptions successfully updated? - */ - private static function store_data_in_option( $option, $data ) { - $result = update_option( $option, $data, true ); - - // If something goes wrong with the update, so delete the current option and then update it. - if ( ! $result ) { - delete_option( $option ); - $result = update_option( $option, $data, true ); - } - - return $result; - } - - /** - * Make an API call to WordPress.com for plan status - * - * @uses Jetpack_Options::get_option() - * @uses Client::wpcom_json_api_request_as_blog() - * @uses update_option() - * - * @access public - * @static - * - * @return bool True if plan is updated, false if no update - */ - public static function refresh_from_wpcom() { - $site_id = Manager::get_site_id(); - if ( is_wp_error( $site_id ) ) { - return false; - } - - // Make the API request. - - $response = Client::wpcom_json_api_request_as_blog( - sprintf( '/sites/%d?force=wpcom', $site_id ), - '1.1' - ); - - return self::update_from_sites_response( $response ); - } - - /** - * Get the plan that this Jetpack site is currently using. - * - * @uses get_option() - * - * @access public - * @static - * - * @return array Active Jetpack plan details - */ - public static function get() { - // this can be expensive to compute so we cache for the duration of a request. - if ( is_array( self::$active_plan_cache ) && ! empty( self::$active_plan_cache ) ) { - return self::$active_plan_cache; - } - - $plan = get_option( self::PLAN_OPTION, array() ); - - // Set the default options. - $plan = wp_parse_args( - $plan, - array( - 'product_slug' => 'jetpack_free', - 'class' => 'free', - 'features' => array( - 'active' => array(), - ), - ) - ); - - list( $plan['class'], $supports ) = self::get_class_and_features( $plan['product_slug'] ); - - $modules = new Modules(); - foreach ( $modules->get_available() as $module_slug ) { - $module = $modules->get( $module_slug ); - if ( ! isset( $module ) || ! is_array( $module ) ) { - continue; - } - if ( in_array( 'free', $module['plan_classes'], true ) || in_array( $plan['class'], $module['plan_classes'], true ) ) { - $supports[] = $module_slug; - } - } - - $plan['supports'] = $supports; - - self::$active_plan_cache = $plan; - - return $plan; - } - - /** - * Get the site's products. - * - * @uses get_option() - * - * @access public - * @static - * - * @return array Active Jetpack products - */ - public static function get_products() { - return get_option( self::SITE_PRODUCTS_OPTION, array() ); - } - - /** - * Get the class of plan and a list of features it supports - * - * @param string $plan_slug The plan that we're interested in. - * @return array Two item array, the plan class and the an array of features. - */ - private static function get_class_and_features( $plan_slug ) { - $features = array(); - foreach ( self::PLAN_DATA as $class => $details ) { - $features = array_merge( $features, $details['supports'] ); - if ( in_array( $plan_slug, $details['plans'], true ) ) { - return array( $class, $features ); - } - } - return array( 'free', self::PLAN_DATA['free']['supports'] ); - } - - /** - * Gets the minimum plan slug that supports the given feature - * - * @param string $feature The name of the feature. - * @return string|bool The slug for the minimum plan that supports. - * the feature or false if not found - */ - public static function get_minimum_plan_for_feature( $feature ) { - foreach ( self::PLAN_DATA as $details ) { - if ( in_array( $feature, $details['supports'], true ) ) { - return $details['plans'][0]; - } - } - return false; - } - - /** - * Determine whether the active plan supports a particular feature - * - * @uses self::get() - * - * @access public - * @static - * - * @param string $feature The module or feature to check. - * @param bool $refresh_from_wpcom Refresh the local plan cache from wpcom. - * - * @return bool True if plan supports feature, false if not - */ - public static function supports( $feature, $refresh_from_wpcom = false ) { - if ( $refresh_from_wpcom ) { - self::refresh_from_wpcom(); - } - - // Hijack the feature eligibility check on WordPress.com sites since they are gated differently. - $should_wpcom_gate_feature = ( - function_exists( 'wpcom_site_has_feature' ) && - function_exists( 'wpcom_feature_exists' ) && - wpcom_feature_exists( $feature ) - ); - if ( $should_wpcom_gate_feature ) { - return wpcom_site_has_feature( $feature ); - } - - // Search product bypasses plan feature check. - if ( 'search' === $feature && (bool) get_option( 'has_jetpack_search_product' ) ) { - return true; - } - - // As of Q3 2021 - a videopress free tier is available to all plans. - if ( 'videopress' === $feature ) { - return true; - } - - // As of 05 2023 - all plans support Earn features (minus 'simple-payments') - if ( in_array( $feature, array( 'donations', 'recurring-payments', 'premium-content/container' ), true ) ) { - return true; - } - - $plan = self::get(); - - if ( - in_array( $feature, $plan['supports'], true ) - || in_array( $feature, $plan['features']['active'], true ) - ) { - return true; - } - - return false; - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/vendor/automattic/jetpack-plans/src/class-plans.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/vendor/automattic/jetpack-plans/src/class-plans.php deleted file mode 100644 index a62a95a1..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/vendor/automattic/jetpack-plans/src/class-plans.php +++ /dev/null @@ -1,80 +0,0 @@ - 'GET', - 'headers' => array( - 'X-Forwarded-For' => ( new Automattic\Jetpack\Status\Visitor() )->get_ip( true ), - ), - ), - null, - 'rest' - ); - - $body = wp_remote_retrieve_body( $request ); - if ( 200 === wp_remote_retrieve_response_code( $request ) ) { - return json_decode( $body ); - } else { - return $body; - } - } - - /** - * Get plan information for a plan given its slug - * - * @since-jetpack 7.7.0 - * - * @param string $plan_slug Plan slug. - * - * @return object The plan object - */ - public static function get_plan( $plan_slug ) { - $plans = self::get_plans(); - if ( ! is_array( $plans ) ) { - return; - } - - foreach ( $plans as $plan ) { - if ( $plan_slug === $plan->product_slug ) { - return $plan; - } - } - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/vendor/composer/ClassLoader.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/vendor/composer/ClassLoader.php deleted file mode 100644 index 7824d8f7..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/vendor/composer/ClassLoader.php +++ /dev/null @@ -1,579 +0,0 @@ - - * Jordi Boggiano - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Composer\Autoload; - -/** - * ClassLoader implements a PSR-0, PSR-4 and classmap class loader. - * - * $loader = new \Composer\Autoload\ClassLoader(); - * - * // register classes with namespaces - * $loader->add('Symfony\Component', __DIR__.'/component'); - * $loader->add('Symfony', __DIR__.'/framework'); - * - * // activate the autoloader - * $loader->register(); - * - * // to enable searching the include path (eg. for PEAR packages) - * $loader->setUseIncludePath(true); - * - * In this example, if you try to use a class in the Symfony\Component - * namespace or one of its children (Symfony\Component\Console for instance), - * the autoloader will first look for the class under the component/ - * directory, and it will then fallback to the framework/ directory if not - * found before giving up. - * - * This class is loosely based on the Symfony UniversalClassLoader. - * - * @author Fabien Potencier - * @author Jordi Boggiano - * @see https://www.php-fig.org/psr/psr-0/ - * @see https://www.php-fig.org/psr/psr-4/ - */ -class ClassLoader -{ - /** @var \Closure(string):void */ - private static $includeFile; - - /** @var string|null */ - private $vendorDir; - - // PSR-4 - /** - * @var array> - */ - private $prefixLengthsPsr4 = array(); - /** - * @var array> - */ - private $prefixDirsPsr4 = array(); - /** - * @var list - */ - private $fallbackDirsPsr4 = array(); - - // PSR-0 - /** - * List of PSR-0 prefixes - * - * Structured as array('F (first letter)' => array('Foo\Bar (full prefix)' => array('path', 'path2'))) - * - * @var array>> - */ - private $prefixesPsr0 = array(); - /** - * @var list - */ - private $fallbackDirsPsr0 = array(); - - /** @var bool */ - private $useIncludePath = false; - - /** - * @var array - */ - private $classMap = array(); - - /** @var bool */ - private $classMapAuthoritative = false; - - /** - * @var array - */ - private $missingClasses = array(); - - /** @var string|null */ - private $apcuPrefix; - - /** - * @var array - */ - private static $registeredLoaders = array(); - - /** - * @param string|null $vendorDir - */ - public function __construct($vendorDir = null) - { - $this->vendorDir = $vendorDir; - self::initializeIncludeClosure(); - } - - /** - * @return array> - */ - public function getPrefixes() - { - if (!empty($this->prefixesPsr0)) { - return call_user_func_array('array_merge', array_values($this->prefixesPsr0)); - } - - return array(); - } - - /** - * @return array> - */ - public function getPrefixesPsr4() - { - return $this->prefixDirsPsr4; - } - - /** - * @return list - */ - public function getFallbackDirs() - { - return $this->fallbackDirsPsr0; - } - - /** - * @return list - */ - public function getFallbackDirsPsr4() - { - return $this->fallbackDirsPsr4; - } - - /** - * @return array Array of classname => path - */ - public function getClassMap() - { - return $this->classMap; - } - - /** - * @param array $classMap Class to filename map - * - * @return void - */ - public function addClassMap(array $classMap) - { - if ($this->classMap) { - $this->classMap = array_merge($this->classMap, $classMap); - } else { - $this->classMap = $classMap; - } - } - - /** - * Registers a set of PSR-0 directories for a given prefix, either - * appending or prepending to the ones previously set for this prefix. - * - * @param string $prefix The prefix - * @param list|string $paths The PSR-0 root directories - * @param bool $prepend Whether to prepend the directories - * - * @return void - */ - public function add($prefix, $paths, $prepend = false) - { - $paths = (array) $paths; - if (!$prefix) { - if ($prepend) { - $this->fallbackDirsPsr0 = array_merge( - $paths, - $this->fallbackDirsPsr0 - ); - } else { - $this->fallbackDirsPsr0 = array_merge( - $this->fallbackDirsPsr0, - $paths - ); - } - - return; - } - - $first = $prefix[0]; - if (!isset($this->prefixesPsr0[$first][$prefix])) { - $this->prefixesPsr0[$first][$prefix] = $paths; - - return; - } - if ($prepend) { - $this->prefixesPsr0[$first][$prefix] = array_merge( - $paths, - $this->prefixesPsr0[$first][$prefix] - ); - } else { - $this->prefixesPsr0[$first][$prefix] = array_merge( - $this->prefixesPsr0[$first][$prefix], - $paths - ); - } - } - - /** - * Registers a set of PSR-4 directories for a given namespace, either - * appending or prepending to the ones previously set for this namespace. - * - * @param string $prefix The prefix/namespace, with trailing '\\' - * @param list|string $paths The PSR-4 base directories - * @param bool $prepend Whether to prepend the directories - * - * @throws \InvalidArgumentException - * - * @return void - */ - public function addPsr4($prefix, $paths, $prepend = false) - { - $paths = (array) $paths; - if (!$prefix) { - // Register directories for the root namespace. - if ($prepend) { - $this->fallbackDirsPsr4 = array_merge( - $paths, - $this->fallbackDirsPsr4 - ); - } else { - $this->fallbackDirsPsr4 = array_merge( - $this->fallbackDirsPsr4, - $paths - ); - } - } elseif (!isset($this->prefixDirsPsr4[$prefix])) { - // Register directories for a new namespace. - $length = strlen($prefix); - if ('\\' !== $prefix[$length - 1]) { - throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); - } - $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; - $this->prefixDirsPsr4[$prefix] = $paths; - } elseif ($prepend) { - // Prepend directories for an already registered namespace. - $this->prefixDirsPsr4[$prefix] = array_merge( - $paths, - $this->prefixDirsPsr4[$prefix] - ); - } else { - // Append directories for an already registered namespace. - $this->prefixDirsPsr4[$prefix] = array_merge( - $this->prefixDirsPsr4[$prefix], - $paths - ); - } - } - - /** - * Registers a set of PSR-0 directories for a given prefix, - * replacing any others previously set for this prefix. - * - * @param string $prefix The prefix - * @param list|string $paths The PSR-0 base directories - * - * @return void - */ - public function set($prefix, $paths) - { - if (!$prefix) { - $this->fallbackDirsPsr0 = (array) $paths; - } else { - $this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths; - } - } - - /** - * Registers a set of PSR-4 directories for a given namespace, - * replacing any others previously set for this namespace. - * - * @param string $prefix The prefix/namespace, with trailing '\\' - * @param list|string $paths The PSR-4 base directories - * - * @throws \InvalidArgumentException - * - * @return void - */ - public function setPsr4($prefix, $paths) - { - if (!$prefix) { - $this->fallbackDirsPsr4 = (array) $paths; - } else { - $length = strlen($prefix); - if ('\\' !== $prefix[$length - 1]) { - throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); - } - $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; - $this->prefixDirsPsr4[$prefix] = (array) $paths; - } - } - - /** - * Turns on searching the include path for class files. - * - * @param bool $useIncludePath - * - * @return void - */ - public function setUseIncludePath($useIncludePath) - { - $this->useIncludePath = $useIncludePath; - } - - /** - * Can be used to check if the autoloader uses the include path to check - * for classes. - * - * @return bool - */ - public function getUseIncludePath() - { - return $this->useIncludePath; - } - - /** - * Turns off searching the prefix and fallback directories for classes - * that have not been registered with the class map. - * - * @param bool $classMapAuthoritative - * - * @return void - */ - public function setClassMapAuthoritative($classMapAuthoritative) - { - $this->classMapAuthoritative = $classMapAuthoritative; - } - - /** - * Should class lookup fail if not found in the current class map? - * - * @return bool - */ - public function isClassMapAuthoritative() - { - return $this->classMapAuthoritative; - } - - /** - * APCu prefix to use to cache found/not-found classes, if the extension is enabled. - * - * @param string|null $apcuPrefix - * - * @return void - */ - public function setApcuPrefix($apcuPrefix) - { - $this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null; - } - - /** - * The APCu prefix in use, or null if APCu caching is not enabled. - * - * @return string|null - */ - public function getApcuPrefix() - { - return $this->apcuPrefix; - } - - /** - * Registers this instance as an autoloader. - * - * @param bool $prepend Whether to prepend the autoloader or not - * - * @return void - */ - public function register($prepend = false) - { - spl_autoload_register(array($this, 'loadClass'), true, $prepend); - - if (null === $this->vendorDir) { - return; - } - - if ($prepend) { - self::$registeredLoaders = array($this->vendorDir => $this) + self::$registeredLoaders; - } else { - unset(self::$registeredLoaders[$this->vendorDir]); - self::$registeredLoaders[$this->vendorDir] = $this; - } - } - - /** - * Unregisters this instance as an autoloader. - * - * @return void - */ - public function unregister() - { - spl_autoload_unregister(array($this, 'loadClass')); - - if (null !== $this->vendorDir) { - unset(self::$registeredLoaders[$this->vendorDir]); - } - } - - /** - * Loads the given class or interface. - * - * @param string $class The name of the class - * @return true|null True if loaded, null otherwise - */ - public function loadClass($class) - { - if ($file = $this->findFile($class)) { - $includeFile = self::$includeFile; - $includeFile($file); - - return true; - } - - return null; - } - - /** - * Finds the path to the file where the class is defined. - * - * @param string $class The name of the class - * - * @return string|false The path if found, false otherwise - */ - public function findFile($class) - { - // class map lookup - if (isset($this->classMap[$class])) { - return $this->classMap[$class]; - } - if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) { - return false; - } - if (null !== $this->apcuPrefix) { - $file = apcu_fetch($this->apcuPrefix.$class, $hit); - if ($hit) { - return $file; - } - } - - $file = $this->findFileWithExtension($class, '.php'); - - // Search for Hack files if we are running on HHVM - if (false === $file && defined('HHVM_VERSION')) { - $file = $this->findFileWithExtension($class, '.hh'); - } - - if (null !== $this->apcuPrefix) { - apcu_add($this->apcuPrefix.$class, $file); - } - - if (false === $file) { - // Remember that this class does not exist. - $this->missingClasses[$class] = true; - } - - return $file; - } - - /** - * Returns the currently registered loaders keyed by their corresponding vendor directories. - * - * @return array - */ - public static function getRegisteredLoaders() - { - return self::$registeredLoaders; - } - - /** - * @param string $class - * @param string $ext - * @return string|false - */ - private function findFileWithExtension($class, $ext) - { - // PSR-4 lookup - $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext; - - $first = $class[0]; - if (isset($this->prefixLengthsPsr4[$first])) { - $subPath = $class; - while (false !== $lastPos = strrpos($subPath, '\\')) { - $subPath = substr($subPath, 0, $lastPos); - $search = $subPath . '\\'; - if (isset($this->prefixDirsPsr4[$search])) { - $pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1); - foreach ($this->prefixDirsPsr4[$search] as $dir) { - if (file_exists($file = $dir . $pathEnd)) { - return $file; - } - } - } - } - } - - // PSR-4 fallback dirs - foreach ($this->fallbackDirsPsr4 as $dir) { - if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) { - return $file; - } - } - - // PSR-0 lookup - if (false !== $pos = strrpos($class, '\\')) { - // namespaced class name - $logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1) - . strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR); - } else { - // PEAR-like class name - $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext; - } - - if (isset($this->prefixesPsr0[$first])) { - foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) { - if (0 === strpos($class, $prefix)) { - foreach ($dirs as $dir) { - if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { - return $file; - } - } - } - } - } - - // PSR-0 fallback dirs - foreach ($this->fallbackDirsPsr0 as $dir) { - if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { - return $file; - } - } - - // PSR-0 include paths. - if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) { - return $file; - } - - return false; - } - - /** - * @return void - */ - private static function initializeIncludeClosure() - { - if (self::$includeFile !== null) { - return; - } - - /** - * Scope isolated include. - * - * Prevents access to $this/self from included files. - * - * @param string $file - * @return void - */ - self::$includeFile = \Closure::bind(static function($file) { - include $file; - }, null, null); - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/vendor/composer/InstalledVersions.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/vendor/composer/InstalledVersions.php deleted file mode 100644 index 51e734a7..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/vendor/composer/InstalledVersions.php +++ /dev/null @@ -1,359 +0,0 @@ - - * Jordi Boggiano - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Composer; - -use Composer\Autoload\ClassLoader; -use Composer\Semver\VersionParser; - -/** - * This class is copied in every Composer installed project and available to all - * - * See also https://getcomposer.org/doc/07-runtime.md#installed-versions - * - * To require its presence, you can require `composer-runtime-api ^2.0` - * - * @final - */ -class InstalledVersions -{ - /** - * @var mixed[]|null - * @psalm-var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array}|array{}|null - */ - private static $installed; - - /** - * @var bool|null - */ - private static $canGetVendors; - - /** - * @var array[] - * @psalm-var array}> - */ - private static $installedByVendor = array(); - - /** - * Returns a list of all package names which are present, either by being installed, replaced or provided - * - * @return string[] - * @psalm-return list - */ - public static function getInstalledPackages() - { - $packages = array(); - foreach (self::getInstalled() as $installed) { - $packages[] = array_keys($installed['versions']); - } - - if (1 === \count($packages)) { - return $packages[0]; - } - - return array_keys(array_flip(\call_user_func_array('array_merge', $packages))); - } - - /** - * Returns a list of all package names with a specific type e.g. 'library' - * - * @param string $type - * @return string[] - * @psalm-return list - */ - public static function getInstalledPackagesByType($type) - { - $packagesByType = array(); - - foreach (self::getInstalled() as $installed) { - foreach ($installed['versions'] as $name => $package) { - if (isset($package['type']) && $package['type'] === $type) { - $packagesByType[] = $name; - } - } - } - - return $packagesByType; - } - - /** - * Checks whether the given package is installed - * - * This also returns true if the package name is provided or replaced by another package - * - * @param string $packageName - * @param bool $includeDevRequirements - * @return bool - */ - public static function isInstalled($packageName, $includeDevRequirements = true) - { - foreach (self::getInstalled() as $installed) { - if (isset($installed['versions'][$packageName])) { - return $includeDevRequirements || !isset($installed['versions'][$packageName]['dev_requirement']) || $installed['versions'][$packageName]['dev_requirement'] === false; - } - } - - return false; - } - - /** - * Checks whether the given package satisfies a version constraint - * - * e.g. If you want to know whether version 2.3+ of package foo/bar is installed, you would call: - * - * Composer\InstalledVersions::satisfies(new VersionParser, 'foo/bar', '^2.3') - * - * @param VersionParser $parser Install composer/semver to have access to this class and functionality - * @param string $packageName - * @param string|null $constraint A version constraint to check for, if you pass one you have to make sure composer/semver is required by your package - * @return bool - */ - public static function satisfies(VersionParser $parser, $packageName, $constraint) - { - $constraint = $parser->parseConstraints((string) $constraint); - $provided = $parser->parseConstraints(self::getVersionRanges($packageName)); - - return $provided->matches($constraint); - } - - /** - * Returns a version constraint representing all the range(s) which are installed for a given package - * - * It is easier to use this via isInstalled() with the $constraint argument if you need to check - * whether a given version of a package is installed, and not just whether it exists - * - * @param string $packageName - * @return string Version constraint usable with composer/semver - */ - public static function getVersionRanges($packageName) - { - foreach (self::getInstalled() as $installed) { - if (!isset($installed['versions'][$packageName])) { - continue; - } - - $ranges = array(); - if (isset($installed['versions'][$packageName]['pretty_version'])) { - $ranges[] = $installed['versions'][$packageName]['pretty_version']; - } - if (array_key_exists('aliases', $installed['versions'][$packageName])) { - $ranges = array_merge($ranges, $installed['versions'][$packageName]['aliases']); - } - if (array_key_exists('replaced', $installed['versions'][$packageName])) { - $ranges = array_merge($ranges, $installed['versions'][$packageName]['replaced']); - } - if (array_key_exists('provided', $installed['versions'][$packageName])) { - $ranges = array_merge($ranges, $installed['versions'][$packageName]['provided']); - } - - return implode(' || ', $ranges); - } - - throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); - } - - /** - * @param string $packageName - * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present - */ - public static function getVersion($packageName) - { - foreach (self::getInstalled() as $installed) { - if (!isset($installed['versions'][$packageName])) { - continue; - } - - if (!isset($installed['versions'][$packageName]['version'])) { - return null; - } - - return $installed['versions'][$packageName]['version']; - } - - throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); - } - - /** - * @param string $packageName - * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present - */ - public static function getPrettyVersion($packageName) - { - foreach (self::getInstalled() as $installed) { - if (!isset($installed['versions'][$packageName])) { - continue; - } - - if (!isset($installed['versions'][$packageName]['pretty_version'])) { - return null; - } - - return $installed['versions'][$packageName]['pretty_version']; - } - - throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); - } - - /** - * @param string $packageName - * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as reference - */ - public static function getReference($packageName) - { - foreach (self::getInstalled() as $installed) { - if (!isset($installed['versions'][$packageName])) { - continue; - } - - if (!isset($installed['versions'][$packageName]['reference'])) { - return null; - } - - return $installed['versions'][$packageName]['reference']; - } - - throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); - } - - /** - * @param string $packageName - * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as install path. Packages of type metapackages also have a null install path. - */ - public static function getInstallPath($packageName) - { - foreach (self::getInstalled() as $installed) { - if (!isset($installed['versions'][$packageName])) { - continue; - } - - return isset($installed['versions'][$packageName]['install_path']) ? $installed['versions'][$packageName]['install_path'] : null; - } - - throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); - } - - /** - * @return array - * @psalm-return array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool} - */ - public static function getRootPackage() - { - $installed = self::getInstalled(); - - return $installed[0]['root']; - } - - /** - * Returns the raw installed.php data for custom implementations - * - * @deprecated Use getAllRawData() instead which returns all datasets for all autoloaders present in the process. getRawData only returns the first dataset loaded, which may not be what you expect. - * @return array[] - * @psalm-return array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array} - */ - public static function getRawData() - { - @trigger_error('getRawData only returns the first dataset loaded, which may not be what you expect. Use getAllRawData() instead which returns all datasets for all autoloaders present in the process.', E_USER_DEPRECATED); - - if (null === self::$installed) { - // only require the installed.php file if this file is loaded from its dumped location, - // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937 - if (substr(__DIR__, -8, 1) !== 'C') { - self::$installed = include __DIR__ . '/installed.php'; - } else { - self::$installed = array(); - } - } - - return self::$installed; - } - - /** - * Returns the raw data of all installed.php which are currently loaded for custom implementations - * - * @return array[] - * @psalm-return list}> - */ - public static function getAllRawData() - { - return self::getInstalled(); - } - - /** - * Lets you reload the static array from another file - * - * This is only useful for complex integrations in which a project needs to use - * this class but then also needs to execute another project's autoloader in process, - * and wants to ensure both projects have access to their version of installed.php. - * - * A typical case would be PHPUnit, where it would need to make sure it reads all - * the data it needs from this class, then call reload() with - * `require $CWD/vendor/composer/installed.php` (or similar) as input to make sure - * the project in which it runs can then also use this class safely, without - * interference between PHPUnit's dependencies and the project's dependencies. - * - * @param array[] $data A vendor/composer/installed.php data set - * @return void - * - * @psalm-param array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array} $data - */ - public static function reload($data) - { - self::$installed = $data; - self::$installedByVendor = array(); - } - - /** - * @return array[] - * @psalm-return list}> - */ - private static function getInstalled() - { - if (null === self::$canGetVendors) { - self::$canGetVendors = method_exists('Composer\Autoload\ClassLoader', 'getRegisteredLoaders'); - } - - $installed = array(); - - if (self::$canGetVendors) { - foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) { - if (isset(self::$installedByVendor[$vendorDir])) { - $installed[] = self::$installedByVendor[$vendorDir]; - } elseif (is_file($vendorDir.'/composer/installed.php')) { - /** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array} $required */ - $required = require $vendorDir.'/composer/installed.php'; - $installed[] = self::$installedByVendor[$vendorDir] = $required; - if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) { - self::$installed = $installed[count($installed) - 1]; - } - } - } - } - - if (null === self::$installed) { - // only require the installed.php file if this file is loaded from its dumped location, - // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937 - if (substr(__DIR__, -8, 1) !== 'C') { - /** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array} $required */ - $required = require __DIR__ . '/installed.php'; - self::$installed = $required; - } else { - self::$installed = array(); - } - } - - if (self::$installed !== array()) { - $installed[] = self::$installed; - } - - return $installed; - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/vendor/composer/LICENSE b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/vendor/composer/LICENSE deleted file mode 100644 index f27399a0..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/vendor/composer/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ - -Copyright (c) Nils Adermann, Jordi Boggiano - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/vendor/composer/autoload_classmap.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/vendor/composer/autoload_classmap.php deleted file mode 100644 index 36648fa6..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/vendor/composer/autoload_classmap.php +++ /dev/null @@ -1,228 +0,0 @@ - $vendorDir . '/wikimedia/aho-corasick/src/MultiStringMatcher.php', - 'AhoCorasick\\MultiStringReplacer' => $vendorDir . '/wikimedia/aho-corasick/src/MultiStringReplacer.php', - 'Automattic\\Jetpack\\A8c_Mc_Stats' => $baseDir . '/jetpack_vendor/automattic/jetpack-a8c-mc-stats/src/class-a8c-mc-stats.php', - 'Automattic\\Jetpack\\Admin_UI\\Admin_Menu' => $baseDir . '/jetpack_vendor/automattic/jetpack-admin-ui/src/class-admin-menu.php', - 'Automattic\\Jetpack\\Assets' => $baseDir . '/jetpack_vendor/automattic/jetpack-assets/src/class-assets.php', - 'Automattic\\Jetpack\\Assets\\Logo' => $baseDir . '/jetpack_vendor/automattic/jetpack-logo/src/class-logo.php', - 'Automattic\\Jetpack\\Assets\\Semver' => $baseDir . '/jetpack_vendor/automattic/jetpack-assets/src/class-semver.php', - 'Automattic\\Jetpack\\Autoloader\\AutoloadFileWriter' => $vendorDir . '/automattic/jetpack-autoloader/src/AutoloadFileWriter.php', - 'Automattic\\Jetpack\\Autoloader\\AutoloadGenerator' => $vendorDir . '/automattic/jetpack-autoloader/src/AutoloadGenerator.php', - 'Automattic\\Jetpack\\Autoloader\\AutoloadProcessor' => $vendorDir . '/automattic/jetpack-autoloader/src/AutoloadProcessor.php', - 'Automattic\\Jetpack\\Autoloader\\CustomAutoloaderPlugin' => $vendorDir . '/automattic/jetpack-autoloader/src/CustomAutoloaderPlugin.php', - 'Automattic\\Jetpack\\Autoloader\\ManifestGenerator' => $vendorDir . '/automattic/jetpack-autoloader/src/ManifestGenerator.php', - 'Automattic\\Jetpack\\Automatic_Install_Skin' => $baseDir . '/jetpack_vendor/automattic/jetpack-plugins-installer/src/class-automatic-install-skin.php', - 'Automattic\\Jetpack\\Backup\\V0003\\Helper_Script_Manager' => $baseDir . '/jetpack_vendor/automattic/jetpack-backup-helper-script-manager/src/class-helper-script-manager.php', - 'Automattic\\Jetpack\\Backup\\V0003\\Helper_Script_Manager_Impl' => $baseDir . '/jetpack_vendor/automattic/jetpack-backup-helper-script-manager/src/class-helper-script-manager-impl.php', - 'Automattic\\Jetpack\\Backup\\V0003\\Throw_On_Errors' => $baseDir . '/jetpack_vendor/automattic/jetpack-backup-helper-script-manager/src/class-throw-on-errors.php', - 'Automattic\\Jetpack\\Boost_Core\\Contracts\\Boost_API_Client' => $baseDir . '/jetpack_vendor/automattic/jetpack-boost-core/src/contracts/boost-api-client.php', - 'Automattic\\Jetpack\\Boost_Core\\Lib\\Boost_API' => $baseDir . '/jetpack_vendor/automattic/jetpack-boost-core/src/lib/class-boost-api.php', - 'Automattic\\Jetpack\\Boost_Core\\Lib\\Cacheable' => $baseDir . '/jetpack_vendor/automattic/jetpack-boost-core/src/lib/class-cacheable.php', - 'Automattic\\Jetpack\\Boost_Core\\Lib\\Transient' => $baseDir . '/jetpack_vendor/automattic/jetpack-boost-core/src/lib/class-transient.php', - 'Automattic\\Jetpack\\Boost_Core\\Lib\\Url' => $baseDir . '/jetpack_vendor/automattic/jetpack-boost-core/src/lib/class-url.php', - 'Automattic\\Jetpack\\Boost_Core\\Lib\\Utils' => $baseDir . '/jetpack_vendor/automattic/jetpack-boost-core/src/lib/class-utils.php', - 'Automattic\\Jetpack\\Boost_Core\\Lib\\WPCOM_Boost_API_Client' => $baseDir . '/jetpack_vendor/automattic/jetpack-boost-core/src/lib/class-wpcom-boost-api-client.php', - 'Automattic\\Jetpack\\Boost_Speed_Score\\Jetpack_Boost_Modules' => $baseDir . '/jetpack_vendor/automattic/jetpack-boost-speed-score/src/class-jetpack-boost-modules.php', - 'Automattic\\Jetpack\\Boost_Speed_Score\\Speed_Score' => $baseDir . '/jetpack_vendor/automattic/jetpack-boost-speed-score/src/class-speed-score.php', - 'Automattic\\Jetpack\\Boost_Speed_Score\\Speed_Score_Graph_History_Request' => $baseDir . '/jetpack_vendor/automattic/jetpack-boost-speed-score/src/class-speed-score-graph-history-request.php', - 'Automattic\\Jetpack\\Boost_Speed_Score\\Speed_Score_History' => $baseDir . '/jetpack_vendor/automattic/jetpack-boost-speed-score/src/class-speed-score-history.php', - 'Automattic\\Jetpack\\Boost_Speed_Score\\Speed_Score_Request' => $baseDir . '/jetpack_vendor/automattic/jetpack-boost-speed-score/src/class-speed-score-request.php', - 'Automattic\\Jetpack\\Composer\\Manager' => $vendorDir . '/automattic/jetpack-composer-plugin/src/class-manager.php', - 'Automattic\\Jetpack\\Composer\\Plugin' => $vendorDir . '/automattic/jetpack-composer-plugin/src/class-plugin.php', - 'Automattic\\Jetpack\\Config' => $baseDir . '/jetpack_vendor/automattic/jetpack-config/src/class-config.php', - 'Automattic\\Jetpack\\Connection\\Client' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/src/class-client.php', - 'Automattic\\Jetpack\\Connection\\Connection_Notice' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/src/class-connection-notice.php', - 'Automattic\\Jetpack\\Connection\\Error_Handler' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/src/class-error-handler.php', - 'Automattic\\Jetpack\\Connection\\Initial_State' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/src/class-initial-state.php', - 'Automattic\\Jetpack\\Connection\\Manager' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/src/class-manager.php', - 'Automattic\\Jetpack\\Connection\\Manager_Interface' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/src/interface-manager.php', - 'Automattic\\Jetpack\\Connection\\Nonce_Handler' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/src/class-nonce-handler.php', - 'Automattic\\Jetpack\\Connection\\Package_Version' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/src/class-package-version.php', - 'Automattic\\Jetpack\\Connection\\Package_Version_Tracker' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/src/class-package-version-tracker.php', - 'Automattic\\Jetpack\\Connection\\Plugin' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/src/class-plugin.php', - 'Automattic\\Jetpack\\Connection\\Plugin_Storage' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/src/class-plugin-storage.php', - 'Automattic\\Jetpack\\Connection\\REST_Connector' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/src/class-rest-connector.php', - 'Automattic\\Jetpack\\Connection\\Rest_Authentication' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/src/class-rest-authentication.php', - 'Automattic\\Jetpack\\Connection\\Secrets' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/src/class-secrets.php', - 'Automattic\\Jetpack\\Connection\\Server_Sandbox' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/src/class-server-sandbox.php', - 'Automattic\\Jetpack\\Connection\\Tokens' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/src/class-tokens.php', - 'Automattic\\Jetpack\\Connection\\Tokens_Locks' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/src/class-tokens-locks.php', - 'Automattic\\Jetpack\\Connection\\Urls' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/src/class-urls.php', - 'Automattic\\Jetpack\\Connection\\Utils' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/src/class-utils.php', - 'Automattic\\Jetpack\\Connection\\Webhooks' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/src/class-webhooks.php', - 'Automattic\\Jetpack\\Connection\\Webhooks\\Authorize_Redirect' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/src/webhooks/class-authorize-redirect.php', - 'Automattic\\Jetpack\\Connection\\XMLRPC_Async_Call' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/src/class-xmlrpc-async-call.php', - 'Automattic\\Jetpack\\Connection\\XMLRPC_Connector' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/src/class-xmlrpc-connector.php', - 'Automattic\\Jetpack\\Constants' => $baseDir . '/jetpack_vendor/automattic/jetpack-constants/src/class-constants.php', - 'Automattic\\Jetpack\\CookieState' => $baseDir . '/jetpack_vendor/automattic/jetpack-status/src/class-cookiestate.php', - 'Automattic\\Jetpack\\Current_Plan' => $vendorDir . '/automattic/jetpack-plans/src/class-current-plan.php', - 'Automattic\\Jetpack\\Device_Detection' => $baseDir . '/jetpack_vendor/automattic/jetpack-device-detection/src/class-device-detection.php', - 'Automattic\\Jetpack\\Device_Detection\\User_Agent_Info' => $baseDir . '/jetpack_vendor/automattic/jetpack-device-detection/src/class-user-agent-info.php', - 'Automattic\\Jetpack\\Errors' => $baseDir . '/jetpack_vendor/automattic/jetpack-status/src/class-errors.php', - 'Automattic\\Jetpack\\Files' => $baseDir . '/jetpack_vendor/automattic/jetpack-status/src/class-files.php', - 'Automattic\\Jetpack\\Heartbeat' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/src/class-heartbeat.php', - 'Automattic\\Jetpack\\IP\\Utils' => $baseDir . '/jetpack_vendor/automattic/jetpack-ip/src/class-utils.php', - 'Automattic\\Jetpack\\IdentityCrisis\\Exception' => $baseDir . '/jetpack_vendor/automattic/jetpack-identity-crisis/src/class-exception.php', - 'Automattic\\Jetpack\\IdentityCrisis\\REST_Endpoints' => $baseDir . '/jetpack_vendor/automattic/jetpack-identity-crisis/src/class-rest-endpoints.php', - 'Automattic\\Jetpack\\IdentityCrisis\\UI' => $baseDir . '/jetpack_vendor/automattic/jetpack-identity-crisis/src/class-ui.php', - 'Automattic\\Jetpack\\IdentityCrisis\\URL_Secret' => $baseDir . '/jetpack_vendor/automattic/jetpack-identity-crisis/src/class-url-secret.php', - 'Automattic\\Jetpack\\Identity_Crisis' => $baseDir . '/jetpack_vendor/automattic/jetpack-identity-crisis/src/class-identity-crisis.php', - 'Automattic\\Jetpack\\JITMS\\JITM' => $baseDir . '/jetpack_vendor/automattic/jetpack-jitm/src/class-jitm.php', - 'Automattic\\Jetpack\\JITMS\\Post_Connection_JITM' => $baseDir . '/jetpack_vendor/automattic/jetpack-jitm/src/class-post-connection-jitm.php', - 'Automattic\\Jetpack\\JITMS\\Pre_Connection_JITM' => $baseDir . '/jetpack_vendor/automattic/jetpack-jitm/src/class-pre-connection-jitm.php', - 'Automattic\\Jetpack\\JITMS\\Rest_Api_Endpoints' => $baseDir . '/jetpack_vendor/automattic/jetpack-jitm/src/class-rest-api-endpoints.php', - 'Automattic\\Jetpack\\Licensing' => $baseDir . '/jetpack_vendor/automattic/jetpack-licensing/src/class-licensing.php', - 'Automattic\\Jetpack\\Licensing\\Endpoints' => $baseDir . '/jetpack_vendor/automattic/jetpack-licensing/src/class-endpoints.php', - 'Automattic\\Jetpack\\Modules' => $baseDir . '/jetpack_vendor/automattic/jetpack-status/src/class-modules.php', - 'Automattic\\Jetpack\\My_Jetpack\\Activitylog' => $baseDir . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-activitylog.php', - 'Automattic\\Jetpack\\My_Jetpack\\Hybrid_Product' => $baseDir . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-hybrid-product.php', - 'Automattic\\Jetpack\\My_Jetpack\\Initializer' => $baseDir . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-initializer.php', - 'Automattic\\Jetpack\\My_Jetpack\\Jetpack_Manage' => $baseDir . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-jetpack-manage.php', - 'Automattic\\Jetpack\\My_Jetpack\\Module_Product' => $baseDir . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-module-product.php', - 'Automattic\\Jetpack\\My_Jetpack\\Product' => $baseDir . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-product.php', - 'Automattic\\Jetpack\\My_Jetpack\\Products' => $baseDir . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-products.php', - 'Automattic\\Jetpack\\My_Jetpack\\Products\\Anti_Spam' => $baseDir . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-anti-spam.php', - 'Automattic\\Jetpack\\My_Jetpack\\Products\\Backup' => $baseDir . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-backup.php', - 'Automattic\\Jetpack\\My_Jetpack\\Products\\Boost' => $baseDir . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-boost.php', - 'Automattic\\Jetpack\\My_Jetpack\\Products\\Creator' => $baseDir . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-creator.php', - 'Automattic\\Jetpack\\My_Jetpack\\Products\\Crm' => $baseDir . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-crm.php', - 'Automattic\\Jetpack\\My_Jetpack\\Products\\Extras' => $baseDir . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-extras.php', - 'Automattic\\Jetpack\\My_Jetpack\\Products\\Jetpack_Ai' => $baseDir . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-jetpack-ai.php', - 'Automattic\\Jetpack\\My_Jetpack\\Products\\Protect' => $baseDir . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-protect.php', - 'Automattic\\Jetpack\\My_Jetpack\\Products\\Scan' => $baseDir . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-scan.php', - 'Automattic\\Jetpack\\My_Jetpack\\Products\\Search' => $baseDir . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-search.php', - 'Automattic\\Jetpack\\My_Jetpack\\Products\\Search_Stats' => $baseDir . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-search-stats.php', - 'Automattic\\Jetpack\\My_Jetpack\\Products\\Security' => $baseDir . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-security.php', - 'Automattic\\Jetpack\\My_Jetpack\\Products\\Social' => $baseDir . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-social.php', - 'Automattic\\Jetpack\\My_Jetpack\\Products\\Starter' => $baseDir . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-starter.php', - 'Automattic\\Jetpack\\My_Jetpack\\Products\\Stats' => $baseDir . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-stats.php', - 'Automattic\\Jetpack\\My_Jetpack\\Products\\Videopress' => $baseDir . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-videopress.php', - 'Automattic\\Jetpack\\My_Jetpack\\REST_AI' => $baseDir . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-rest-ai.php', - 'Automattic\\Jetpack\\My_Jetpack\\REST_Product_Data' => $baseDir . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-rest-product-data.php', - 'Automattic\\Jetpack\\My_Jetpack\\REST_Products' => $baseDir . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-rest-products.php', - 'Automattic\\Jetpack\\My_Jetpack\\REST_Purchases' => $baseDir . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-rest-purchases.php', - 'Automattic\\Jetpack\\My_Jetpack\\REST_Zendesk_Chat' => $baseDir . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-rest-zendesk-chat.php', - 'Automattic\\Jetpack\\My_Jetpack\\Wpcom_Products' => $baseDir . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-wpcom-products.php', - 'Automattic\\Jetpack\\Partner' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/src/class-partner.php', - 'Automattic\\Jetpack\\Partner_Coupon' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/src/class-partner-coupon.php', - 'Automattic\\Jetpack\\Password_Checker' => $baseDir . '/jetpack_vendor/automattic/jetpack-password-checker/src/class-password-checker.php', - 'Automattic\\Jetpack\\Paths' => $baseDir . '/jetpack_vendor/automattic/jetpack-status/src/class-paths.php', - 'Automattic\\Jetpack\\Plans' => $vendorDir . '/automattic/jetpack-plans/src/class-plans.php', - 'Automattic\\Jetpack\\Plugins_Installer' => $baseDir . '/jetpack_vendor/automattic/jetpack-plugins-installer/src/class-plugins-installer.php', - 'Automattic\\Jetpack\\Protect\\Credentials' => $baseDir . '/src/class-credentials.php', - 'Automattic\\Jetpack\\Protect\\Extension_Model' => $baseDir . '/src/models/class-extension-model.php', - 'Automattic\\Jetpack\\Protect\\Onboarding' => $baseDir . '/src/class-onboarding.php', - 'Automattic\\Jetpack\\Protect\\Plan' => $baseDir . '/src/class-plan.php', - 'Automattic\\Jetpack\\Protect\\Protect_Status' => $baseDir . '/src/class-protect-status.php', - 'Automattic\\Jetpack\\Protect\\REST_Controller' => $baseDir . '/src/class-rest-controller.php', - 'Automattic\\Jetpack\\Protect\\Scan_Status' => $baseDir . '/src/class-scan-status.php', - 'Automattic\\Jetpack\\Protect\\Site_Health' => $baseDir . '/src/class-site-health.php', - 'Automattic\\Jetpack\\Protect\\Status' => $baseDir . '/src/class-status.php', - 'Automattic\\Jetpack\\Protect\\Status_Model' => $baseDir . '/src/models/class-status-model.php', - 'Automattic\\Jetpack\\Protect\\Threat_Model' => $baseDir . '/src/models/class-threat-model.php', - 'Automattic\\Jetpack\\Protect\\Threats' => $baseDir . '/src/class-threats.php', - 'Automattic\\Jetpack\\Redirect' => $baseDir . '/jetpack_vendor/automattic/jetpack-redirect/src/class-redirect.php', - 'Automattic\\Jetpack\\Roles' => $baseDir . '/jetpack_vendor/automattic/jetpack-roles/src/class-roles.php', - 'Automattic\\Jetpack\\Status' => $baseDir . '/jetpack_vendor/automattic/jetpack-status/src/class-status.php', - 'Automattic\\Jetpack\\Status\\Cache' => $baseDir . '/jetpack_vendor/automattic/jetpack-status/src/class-cache.php', - 'Automattic\\Jetpack\\Status\\Host' => $baseDir . '/jetpack_vendor/automattic/jetpack-status/src/class-host.php', - 'Automattic\\Jetpack\\Status\\Visitor' => $baseDir . '/jetpack_vendor/automattic/jetpack-status/src/class-visitor.php', - 'Automattic\\Jetpack\\Sync\\Actions' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/class-actions.php', - 'Automattic\\Jetpack\\Sync\\Codec_Interface' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/interface-codec.php', - 'Automattic\\Jetpack\\Sync\\Data_Settings' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/class-data-settings.php', - 'Automattic\\Jetpack\\Sync\\Dedicated_Sender' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/class-dedicated-sender.php', - 'Automattic\\Jetpack\\Sync\\Default_Filter_Settings' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/class-default-filter-settings.php', - 'Automattic\\Jetpack\\Sync\\Defaults' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/class-defaults.php', - 'Automattic\\Jetpack\\Sync\\Functions' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/class-functions.php', - 'Automattic\\Jetpack\\Sync\\Health' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/class-health.php', - 'Automattic\\Jetpack\\Sync\\JSON_Deflate_Array_Codec' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/class-json-deflate-array-codec.php', - 'Automattic\\Jetpack\\Sync\\Listener' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/class-listener.php', - 'Automattic\\Jetpack\\Sync\\Lock' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/class-lock.php', - 'Automattic\\Jetpack\\Sync\\Main' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/class-main.php', - 'Automattic\\Jetpack\\Sync\\Modules' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/class-modules.php', - 'Automattic\\Jetpack\\Sync\\Modules\\Attachments' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/modules/class-attachments.php', - 'Automattic\\Jetpack\\Sync\\Modules\\Callables' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/modules/class-callables.php', - 'Automattic\\Jetpack\\Sync\\Modules\\Comments' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/modules/class-comments.php', - 'Automattic\\Jetpack\\Sync\\Modules\\Constants' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/modules/class-constants.php', - 'Automattic\\Jetpack\\Sync\\Modules\\Full_Sync' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/modules/class-full-sync.php', - 'Automattic\\Jetpack\\Sync\\Modules\\Full_Sync_Immediately' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/modules/class-full-sync-immediately.php', - 'Automattic\\Jetpack\\Sync\\Modules\\Import' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/modules/class-import.php', - 'Automattic\\Jetpack\\Sync\\Modules\\Menus' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/modules/class-menus.php', - 'Automattic\\Jetpack\\Sync\\Modules\\Meta' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/modules/class-meta.php', - 'Automattic\\Jetpack\\Sync\\Modules\\Module' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/modules/class-module.php', - 'Automattic\\Jetpack\\Sync\\Modules\\Network_Options' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/modules/class-network-options.php', - 'Automattic\\Jetpack\\Sync\\Modules\\Options' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/modules/class-options.php', - 'Automattic\\Jetpack\\Sync\\Modules\\Plugins' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/modules/class-plugins.php', - 'Automattic\\Jetpack\\Sync\\Modules\\Posts' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/modules/class-posts.php', - 'Automattic\\Jetpack\\Sync\\Modules\\Protect' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/modules/class-protect.php', - 'Automattic\\Jetpack\\Sync\\Modules\\Search' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/modules/class-search.php', - 'Automattic\\Jetpack\\Sync\\Modules\\Stats' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/modules/class-stats.php', - 'Automattic\\Jetpack\\Sync\\Modules\\Term_Relationships' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/modules/class-term-relationships.php', - 'Automattic\\Jetpack\\Sync\\Modules\\Terms' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/modules/class-terms.php', - 'Automattic\\Jetpack\\Sync\\Modules\\Themes' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/modules/class-themes.php', - 'Automattic\\Jetpack\\Sync\\Modules\\Updates' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/modules/class-updates.php', - 'Automattic\\Jetpack\\Sync\\Modules\\Users' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/modules/class-users.php', - 'Automattic\\Jetpack\\Sync\\Modules\\WP_Super_Cache' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/modules/class-wp-super-cache.php', - 'Automattic\\Jetpack\\Sync\\Modules\\WooCommerce' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/modules/class-woocommerce.php', - 'Automattic\\Jetpack\\Sync\\Modules\\WooCommerce_HPOS_Orders' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/modules/class-woocommerce-hpos-orders.php', - 'Automattic\\Jetpack\\Sync\\Package_Version' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/class-package-version.php', - 'Automattic\\Jetpack\\Sync\\Queue' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/class-queue.php', - 'Automattic\\Jetpack\\Sync\\Queue\\Queue_Storage_Options' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/sync-queue/class-queue-storage-options.php', - 'Automattic\\Jetpack\\Sync\\Queue\\Queue_Storage_Table' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/sync-queue/class-queue-storage-table.php', - 'Automattic\\Jetpack\\Sync\\Queue_Buffer' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/class-queue-buffer.php', - 'Automattic\\Jetpack\\Sync\\REST_Endpoints' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/class-rest-endpoints.php', - 'Automattic\\Jetpack\\Sync\\REST_Sender' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/class-rest-sender.php', - 'Automattic\\Jetpack\\Sync\\Replicastore' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/class-replicastore.php', - 'Automattic\\Jetpack\\Sync\\Replicastore\\Table_Checksum' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/replicastore/class-table-checksum.php', - 'Automattic\\Jetpack\\Sync\\Replicastore\\Table_Checksum_Usermeta' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/replicastore/class-table-checksum-usermeta.php', - 'Automattic\\Jetpack\\Sync\\Replicastore\\Table_Checksum_Users' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/replicastore/class-table-checksum-users.php', - 'Automattic\\Jetpack\\Sync\\Replicastore_Interface' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/interface-replicastore.php', - 'Automattic\\Jetpack\\Sync\\Sender' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/class-sender.php', - 'Automattic\\Jetpack\\Sync\\Server' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/class-server.php', - 'Automattic\\Jetpack\\Sync\\Settings' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/class-settings.php', - 'Automattic\\Jetpack\\Sync\\Simple_Codec' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/class-simple-codec.php', - 'Automattic\\Jetpack\\Sync\\Users' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/class-users.php', - 'Automattic\\Jetpack\\Sync\\Utils' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/class-utils.php', - 'Automattic\\Jetpack\\Terms_Of_Service' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/src/class-terms-of-service.php', - 'Automattic\\Jetpack\\Tracking' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/src/class-tracking.php', - 'Automattic\\Jetpack\\Transport_Helper\\Package_Version' => $baseDir . '/jetpack_vendor/automattic/jetpack-transport-helper/src/class-package-version.php', - 'Automattic\\Jetpack\\Transport_Helper\\V0001\\Package_Version' => $baseDir . '/jetpack_vendor/automattic/jetpack-transport-helper/src/class-package-version-compat.php', - 'Automattic\\Jetpack\\Transport_Helper\\V0003\\REST_Controller' => $baseDir . '/jetpack_vendor/automattic/jetpack-transport-helper/src/class-rest-controller.php', - 'Automattic\\Jetpack\\Waf\\Brute_Force_Protection\\Brute_Force_Protection' => $baseDir . '/jetpack_vendor/automattic/jetpack-waf/src/class-brute-force-protection.php', - 'Automattic\\Jetpack\\Waf\\Brute_Force_Protection\\Brute_Force_Protection_Blocked_Login_Page' => $baseDir . '/jetpack_vendor/automattic/jetpack-waf/src/brute-force-protection/class-blocked-login-page.php', - 'Automattic\\Jetpack\\Waf\\Brute_Force_Protection\\Brute_Force_Protection_Math_Authenticate' => $baseDir . '/jetpack_vendor/automattic/jetpack-waf/src/brute-force-protection/class-math-fallback.php', - 'Automattic\\Jetpack\\Waf\\Brute_Force_Protection\\Brute_Force_Protection_Shared_Functions' => $baseDir . '/jetpack_vendor/automattic/jetpack-waf/src/brute-force-protection/class-shared-functions.php', - 'Automattic\\Jetpack\\Waf\\Brute_Force_Protection\\Brute_Force_Protection_Transient_Cleanup' => $baseDir . '/jetpack_vendor/automattic/jetpack-waf/src/brute-force-protection/class-transient-cleanup.php', - 'Automattic\\Jetpack\\Waf\\CLI' => $baseDir . '/jetpack_vendor/automattic/jetpack-waf/src/class-waf-cli.php', - 'Automattic\\Jetpack\\Waf\\File_System_Exception' => $baseDir . '/jetpack_vendor/automattic/jetpack-waf/src/exceptions/class-file-system-exception.php', - 'Automattic\\Jetpack\\Waf\\REST_Controller' => $baseDir . '/jetpack_vendor/automattic/jetpack-waf/src/class-rest-controller.php', - 'Automattic\\Jetpack\\Waf\\Rules_API_Exception' => $baseDir . '/jetpack_vendor/automattic/jetpack-waf/src/exceptions/class-rules-api-exception.php', - 'Automattic\\Jetpack\\Waf\\Waf_Compatibility' => $baseDir . '/jetpack_vendor/automattic/jetpack-waf/src/class-compatibility.php', - 'Automattic\\Jetpack\\Waf\\Waf_Constants' => $baseDir . '/jetpack_vendor/automattic/jetpack-waf/src/class-waf-constants.php', - 'Automattic\\Jetpack\\Waf\\Waf_Exception' => $baseDir . '/jetpack_vendor/automattic/jetpack-waf/src/exceptions/class-waf-exception.php', - 'Automattic\\Jetpack\\Waf\\Waf_Initializer' => $baseDir . '/jetpack_vendor/automattic/jetpack-waf/src/class-waf-initializer.php', - 'Automattic\\Jetpack\\Waf\\Waf_Operators' => $baseDir . '/jetpack_vendor/automattic/jetpack-waf/src/class-waf-operators.php', - 'Automattic\\Jetpack\\Waf\\Waf_Request' => $baseDir . '/jetpack_vendor/automattic/jetpack-waf/src/class-waf-request.php', - 'Automattic\\Jetpack\\Waf\\Waf_Rules_Manager' => $baseDir . '/jetpack_vendor/automattic/jetpack-waf/src/class-waf-rules-manager.php', - 'Automattic\\Jetpack\\Waf\\Waf_Runner' => $baseDir . '/jetpack_vendor/automattic/jetpack-waf/src/class-waf-runner.php', - 'Automattic\\Jetpack\\Waf\\Waf_Runtime' => $baseDir . '/jetpack_vendor/automattic/jetpack-waf/src/class-waf-runtime.php', - 'Automattic\\Jetpack\\Waf\\Waf_Standalone_Bootstrap' => $baseDir . '/jetpack_vendor/automattic/jetpack-waf/src/class-waf-standalone-bootstrap.php', - 'Automattic\\Jetpack\\Waf\\Waf_Stats' => $baseDir . '/jetpack_vendor/automattic/jetpack-waf/src/class-waf-stats.php', - 'Automattic\\Jetpack\\Waf\\Waf_Transforms' => $baseDir . '/jetpack_vendor/automattic/jetpack-waf/src/class-waf-transforms.php', - 'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php', - 'Jetpack_IXR_Client' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/legacy/class-jetpack-ixr-client.php', - 'Jetpack_IXR_ClientMulticall' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/legacy/class-jetpack-ixr-clientmulticall.php', - 'Jetpack_Options' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/legacy/class-jetpack-options.php', - 'Jetpack_Protect' => $baseDir . '/src/class-jetpack-protect.php', - 'Jetpack_Signature' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/legacy/class-jetpack-signature.php', - 'Jetpack_Tracks_Client' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/legacy/class-jetpack-tracks-client.php', - 'Jetpack_Tracks_Event' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/legacy/class-jetpack-tracks-event.php', - 'Jetpack_XMLRPC_Server' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/legacy/class-jetpack-xmlrpc-server.php', -); diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/vendor/composer/autoload_files.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/vendor/composer/autoload_files.php deleted file mode 100644 index 190ac33c..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/vendor/composer/autoload_files.php +++ /dev/null @@ -1,12 +0,0 @@ - $baseDir . '/jetpack_vendor/automattic/jetpack-assets/actions.php', - '590147edb63acb03b2852d5c4db13ce8' => $baseDir . '/jetpack_vendor/automattic/jetpack-transport-helper/actions.php', - '3d45c7e6a7f0e71849e33afe4b3b3ede' => $baseDir . '/jetpack_vendor/automattic/jetpack-waf/cli.php', -); diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/vendor/composer/autoload_namespaces.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/vendor/composer/autoload_namespaces.php deleted file mode 100644 index 15a2ff3a..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/vendor/composer/autoload_namespaces.php +++ /dev/null @@ -1,9 +0,0 @@ - array($vendorDir . '/automattic/jetpack-autoloader/src'), -); diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/vendor/composer/autoload_real.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/vendor/composer/autoload_real.php deleted file mode 100644 index 1184bf3f..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/vendor/composer/autoload_real.php +++ /dev/null @@ -1,51 +0,0 @@ -setClassMapAuthoritative(true); - $loader->register(true); - - $filesToLoad = \Composer\Autoload\ComposerStaticInitc4802e05bbcf59fd3b6350e8d3e5482c_protectⓥ2_1_0::$files; - $requireFile = \Closure::bind(static function ($fileIdentifier, $file) { - if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { - $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true; - - require $file; - } - }, null, null); - foreach ($filesToLoad as $fileIdentifier => $file) { - $requireFile($fileIdentifier, $file); - } - - return $loader; - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/vendor/composer/autoload_static.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/vendor/composer/autoload_static.php deleted file mode 100644 index 8a7e2a87..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/vendor/composer/autoload_static.php +++ /dev/null @@ -1,260 +0,0 @@ - __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-assets/actions.php', - '590147edb63acb03b2852d5c4db13ce8' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-transport-helper/actions.php', - '3d45c7e6a7f0e71849e33afe4b3b3ede' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-waf/cli.php', - ); - - public static $prefixLengthsPsr4 = array ( - 'A' => - array ( - 'Automattic\\Jetpack\\Autoloader\\' => 30, - ), - ); - - public static $prefixDirsPsr4 = array ( - 'Automattic\\Jetpack\\Autoloader\\' => - array ( - 0 => __DIR__ . '/..' . '/automattic/jetpack-autoloader/src', - ), - ); - - public static $classMap = array ( - 'AhoCorasick\\MultiStringMatcher' => __DIR__ . '/..' . '/wikimedia/aho-corasick/src/MultiStringMatcher.php', - 'AhoCorasick\\MultiStringReplacer' => __DIR__ . '/..' . '/wikimedia/aho-corasick/src/MultiStringReplacer.php', - 'Automattic\\Jetpack\\A8c_Mc_Stats' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-a8c-mc-stats/src/class-a8c-mc-stats.php', - 'Automattic\\Jetpack\\Admin_UI\\Admin_Menu' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-admin-ui/src/class-admin-menu.php', - 'Automattic\\Jetpack\\Assets' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-assets/src/class-assets.php', - 'Automattic\\Jetpack\\Assets\\Logo' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-logo/src/class-logo.php', - 'Automattic\\Jetpack\\Assets\\Semver' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-assets/src/class-semver.php', - 'Automattic\\Jetpack\\Autoloader\\AutoloadFileWriter' => __DIR__ . '/..' . '/automattic/jetpack-autoloader/src/AutoloadFileWriter.php', - 'Automattic\\Jetpack\\Autoloader\\AutoloadGenerator' => __DIR__ . '/..' . '/automattic/jetpack-autoloader/src/AutoloadGenerator.php', - 'Automattic\\Jetpack\\Autoloader\\AutoloadProcessor' => __DIR__ . '/..' . '/automattic/jetpack-autoloader/src/AutoloadProcessor.php', - 'Automattic\\Jetpack\\Autoloader\\CustomAutoloaderPlugin' => __DIR__ . '/..' . '/automattic/jetpack-autoloader/src/CustomAutoloaderPlugin.php', - 'Automattic\\Jetpack\\Autoloader\\ManifestGenerator' => __DIR__ . '/..' . '/automattic/jetpack-autoloader/src/ManifestGenerator.php', - 'Automattic\\Jetpack\\Automatic_Install_Skin' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-plugins-installer/src/class-automatic-install-skin.php', - 'Automattic\\Jetpack\\Backup\\V0003\\Helper_Script_Manager' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-backup-helper-script-manager/src/class-helper-script-manager.php', - 'Automattic\\Jetpack\\Backup\\V0003\\Helper_Script_Manager_Impl' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-backup-helper-script-manager/src/class-helper-script-manager-impl.php', - 'Automattic\\Jetpack\\Backup\\V0003\\Throw_On_Errors' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-backup-helper-script-manager/src/class-throw-on-errors.php', - 'Automattic\\Jetpack\\Boost_Core\\Contracts\\Boost_API_Client' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-boost-core/src/contracts/boost-api-client.php', - 'Automattic\\Jetpack\\Boost_Core\\Lib\\Boost_API' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-boost-core/src/lib/class-boost-api.php', - 'Automattic\\Jetpack\\Boost_Core\\Lib\\Cacheable' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-boost-core/src/lib/class-cacheable.php', - 'Automattic\\Jetpack\\Boost_Core\\Lib\\Transient' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-boost-core/src/lib/class-transient.php', - 'Automattic\\Jetpack\\Boost_Core\\Lib\\Url' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-boost-core/src/lib/class-url.php', - 'Automattic\\Jetpack\\Boost_Core\\Lib\\Utils' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-boost-core/src/lib/class-utils.php', - 'Automattic\\Jetpack\\Boost_Core\\Lib\\WPCOM_Boost_API_Client' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-boost-core/src/lib/class-wpcom-boost-api-client.php', - 'Automattic\\Jetpack\\Boost_Speed_Score\\Jetpack_Boost_Modules' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-boost-speed-score/src/class-jetpack-boost-modules.php', - 'Automattic\\Jetpack\\Boost_Speed_Score\\Speed_Score' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-boost-speed-score/src/class-speed-score.php', - 'Automattic\\Jetpack\\Boost_Speed_Score\\Speed_Score_Graph_History_Request' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-boost-speed-score/src/class-speed-score-graph-history-request.php', - 'Automattic\\Jetpack\\Boost_Speed_Score\\Speed_Score_History' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-boost-speed-score/src/class-speed-score-history.php', - 'Automattic\\Jetpack\\Boost_Speed_Score\\Speed_Score_Request' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-boost-speed-score/src/class-speed-score-request.php', - 'Automattic\\Jetpack\\Composer\\Manager' => __DIR__ . '/..' . '/automattic/jetpack-composer-plugin/src/class-manager.php', - 'Automattic\\Jetpack\\Composer\\Plugin' => __DIR__ . '/..' . '/automattic/jetpack-composer-plugin/src/class-plugin.php', - 'Automattic\\Jetpack\\Config' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-config/src/class-config.php', - 'Automattic\\Jetpack\\Connection\\Client' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-connection/src/class-client.php', - 'Automattic\\Jetpack\\Connection\\Connection_Notice' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-connection/src/class-connection-notice.php', - 'Automattic\\Jetpack\\Connection\\Error_Handler' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-connection/src/class-error-handler.php', - 'Automattic\\Jetpack\\Connection\\Initial_State' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-connection/src/class-initial-state.php', - 'Automattic\\Jetpack\\Connection\\Manager' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-connection/src/class-manager.php', - 'Automattic\\Jetpack\\Connection\\Manager_Interface' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-connection/src/interface-manager.php', - 'Automattic\\Jetpack\\Connection\\Nonce_Handler' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-connection/src/class-nonce-handler.php', - 'Automattic\\Jetpack\\Connection\\Package_Version' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-connection/src/class-package-version.php', - 'Automattic\\Jetpack\\Connection\\Package_Version_Tracker' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-connection/src/class-package-version-tracker.php', - 'Automattic\\Jetpack\\Connection\\Plugin' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-connection/src/class-plugin.php', - 'Automattic\\Jetpack\\Connection\\Plugin_Storage' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-connection/src/class-plugin-storage.php', - 'Automattic\\Jetpack\\Connection\\REST_Connector' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-connection/src/class-rest-connector.php', - 'Automattic\\Jetpack\\Connection\\Rest_Authentication' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-connection/src/class-rest-authentication.php', - 'Automattic\\Jetpack\\Connection\\Secrets' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-connection/src/class-secrets.php', - 'Automattic\\Jetpack\\Connection\\Server_Sandbox' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-connection/src/class-server-sandbox.php', - 'Automattic\\Jetpack\\Connection\\Tokens' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-connection/src/class-tokens.php', - 'Automattic\\Jetpack\\Connection\\Tokens_Locks' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-connection/src/class-tokens-locks.php', - 'Automattic\\Jetpack\\Connection\\Urls' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-connection/src/class-urls.php', - 'Automattic\\Jetpack\\Connection\\Utils' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-connection/src/class-utils.php', - 'Automattic\\Jetpack\\Connection\\Webhooks' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-connection/src/class-webhooks.php', - 'Automattic\\Jetpack\\Connection\\Webhooks\\Authorize_Redirect' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-connection/src/webhooks/class-authorize-redirect.php', - 'Automattic\\Jetpack\\Connection\\XMLRPC_Async_Call' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-connection/src/class-xmlrpc-async-call.php', - 'Automattic\\Jetpack\\Connection\\XMLRPC_Connector' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-connection/src/class-xmlrpc-connector.php', - 'Automattic\\Jetpack\\Constants' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-constants/src/class-constants.php', - 'Automattic\\Jetpack\\CookieState' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-status/src/class-cookiestate.php', - 'Automattic\\Jetpack\\Current_Plan' => __DIR__ . '/..' . '/automattic/jetpack-plans/src/class-current-plan.php', - 'Automattic\\Jetpack\\Device_Detection' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-device-detection/src/class-device-detection.php', - 'Automattic\\Jetpack\\Device_Detection\\User_Agent_Info' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-device-detection/src/class-user-agent-info.php', - 'Automattic\\Jetpack\\Errors' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-status/src/class-errors.php', - 'Automattic\\Jetpack\\Files' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-status/src/class-files.php', - 'Automattic\\Jetpack\\Heartbeat' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-connection/src/class-heartbeat.php', - 'Automattic\\Jetpack\\IP\\Utils' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-ip/src/class-utils.php', - 'Automattic\\Jetpack\\IdentityCrisis\\Exception' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-identity-crisis/src/class-exception.php', - 'Automattic\\Jetpack\\IdentityCrisis\\REST_Endpoints' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-identity-crisis/src/class-rest-endpoints.php', - 'Automattic\\Jetpack\\IdentityCrisis\\UI' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-identity-crisis/src/class-ui.php', - 'Automattic\\Jetpack\\IdentityCrisis\\URL_Secret' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-identity-crisis/src/class-url-secret.php', - 'Automattic\\Jetpack\\Identity_Crisis' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-identity-crisis/src/class-identity-crisis.php', - 'Automattic\\Jetpack\\JITMS\\JITM' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-jitm/src/class-jitm.php', - 'Automattic\\Jetpack\\JITMS\\Post_Connection_JITM' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-jitm/src/class-post-connection-jitm.php', - 'Automattic\\Jetpack\\JITMS\\Pre_Connection_JITM' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-jitm/src/class-pre-connection-jitm.php', - 'Automattic\\Jetpack\\JITMS\\Rest_Api_Endpoints' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-jitm/src/class-rest-api-endpoints.php', - 'Automattic\\Jetpack\\Licensing' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-licensing/src/class-licensing.php', - 'Automattic\\Jetpack\\Licensing\\Endpoints' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-licensing/src/class-endpoints.php', - 'Automattic\\Jetpack\\Modules' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-status/src/class-modules.php', - 'Automattic\\Jetpack\\My_Jetpack\\Activitylog' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-activitylog.php', - 'Automattic\\Jetpack\\My_Jetpack\\Hybrid_Product' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-hybrid-product.php', - 'Automattic\\Jetpack\\My_Jetpack\\Initializer' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-initializer.php', - 'Automattic\\Jetpack\\My_Jetpack\\Jetpack_Manage' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-jetpack-manage.php', - 'Automattic\\Jetpack\\My_Jetpack\\Module_Product' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-module-product.php', - 'Automattic\\Jetpack\\My_Jetpack\\Product' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-product.php', - 'Automattic\\Jetpack\\My_Jetpack\\Products' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-products.php', - 'Automattic\\Jetpack\\My_Jetpack\\Products\\Anti_Spam' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-anti-spam.php', - 'Automattic\\Jetpack\\My_Jetpack\\Products\\Backup' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-backup.php', - 'Automattic\\Jetpack\\My_Jetpack\\Products\\Boost' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-boost.php', - 'Automattic\\Jetpack\\My_Jetpack\\Products\\Creator' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-creator.php', - 'Automattic\\Jetpack\\My_Jetpack\\Products\\Crm' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-crm.php', - 'Automattic\\Jetpack\\My_Jetpack\\Products\\Extras' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-extras.php', - 'Automattic\\Jetpack\\My_Jetpack\\Products\\Jetpack_Ai' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-jetpack-ai.php', - 'Automattic\\Jetpack\\My_Jetpack\\Products\\Protect' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-protect.php', - 'Automattic\\Jetpack\\My_Jetpack\\Products\\Scan' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-scan.php', - 'Automattic\\Jetpack\\My_Jetpack\\Products\\Search' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-search.php', - 'Automattic\\Jetpack\\My_Jetpack\\Products\\Search_Stats' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-search-stats.php', - 'Automattic\\Jetpack\\My_Jetpack\\Products\\Security' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-security.php', - 'Automattic\\Jetpack\\My_Jetpack\\Products\\Social' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-social.php', - 'Automattic\\Jetpack\\My_Jetpack\\Products\\Starter' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-starter.php', - 'Automattic\\Jetpack\\My_Jetpack\\Products\\Stats' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-stats.php', - 'Automattic\\Jetpack\\My_Jetpack\\Products\\Videopress' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-videopress.php', - 'Automattic\\Jetpack\\My_Jetpack\\REST_AI' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-rest-ai.php', - 'Automattic\\Jetpack\\My_Jetpack\\REST_Product_Data' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-rest-product-data.php', - 'Automattic\\Jetpack\\My_Jetpack\\REST_Products' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-rest-products.php', - 'Automattic\\Jetpack\\My_Jetpack\\REST_Purchases' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-rest-purchases.php', - 'Automattic\\Jetpack\\My_Jetpack\\REST_Zendesk_Chat' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-rest-zendesk-chat.php', - 'Automattic\\Jetpack\\My_Jetpack\\Wpcom_Products' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-wpcom-products.php', - 'Automattic\\Jetpack\\Partner' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-connection/src/class-partner.php', - 'Automattic\\Jetpack\\Partner_Coupon' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-connection/src/class-partner-coupon.php', - 'Automattic\\Jetpack\\Password_Checker' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-password-checker/src/class-password-checker.php', - 'Automattic\\Jetpack\\Paths' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-status/src/class-paths.php', - 'Automattic\\Jetpack\\Plans' => __DIR__ . '/..' . '/automattic/jetpack-plans/src/class-plans.php', - 'Automattic\\Jetpack\\Plugins_Installer' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-plugins-installer/src/class-plugins-installer.php', - 'Automattic\\Jetpack\\Protect\\Credentials' => __DIR__ . '/../..' . '/src/class-credentials.php', - 'Automattic\\Jetpack\\Protect\\Extension_Model' => __DIR__ . '/../..' . '/src/models/class-extension-model.php', - 'Automattic\\Jetpack\\Protect\\Onboarding' => __DIR__ . '/../..' . '/src/class-onboarding.php', - 'Automattic\\Jetpack\\Protect\\Plan' => __DIR__ . '/../..' . '/src/class-plan.php', - 'Automattic\\Jetpack\\Protect\\Protect_Status' => __DIR__ . '/../..' . '/src/class-protect-status.php', - 'Automattic\\Jetpack\\Protect\\REST_Controller' => __DIR__ . '/../..' . '/src/class-rest-controller.php', - 'Automattic\\Jetpack\\Protect\\Scan_Status' => __DIR__ . '/../..' . '/src/class-scan-status.php', - 'Automattic\\Jetpack\\Protect\\Site_Health' => __DIR__ . '/../..' . '/src/class-site-health.php', - 'Automattic\\Jetpack\\Protect\\Status' => __DIR__ . '/../..' . '/src/class-status.php', - 'Automattic\\Jetpack\\Protect\\Status_Model' => __DIR__ . '/../..' . '/src/models/class-status-model.php', - 'Automattic\\Jetpack\\Protect\\Threat_Model' => __DIR__ . '/../..' . '/src/models/class-threat-model.php', - 'Automattic\\Jetpack\\Protect\\Threats' => __DIR__ . '/../..' . '/src/class-threats.php', - 'Automattic\\Jetpack\\Redirect' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-redirect/src/class-redirect.php', - 'Automattic\\Jetpack\\Roles' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-roles/src/class-roles.php', - 'Automattic\\Jetpack\\Status' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-status/src/class-status.php', - 'Automattic\\Jetpack\\Status\\Cache' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-status/src/class-cache.php', - 'Automattic\\Jetpack\\Status\\Host' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-status/src/class-host.php', - 'Automattic\\Jetpack\\Status\\Visitor' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-status/src/class-visitor.php', - 'Automattic\\Jetpack\\Sync\\Actions' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-sync/src/class-actions.php', - 'Automattic\\Jetpack\\Sync\\Codec_Interface' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-sync/src/interface-codec.php', - 'Automattic\\Jetpack\\Sync\\Data_Settings' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-sync/src/class-data-settings.php', - 'Automattic\\Jetpack\\Sync\\Dedicated_Sender' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-sync/src/class-dedicated-sender.php', - 'Automattic\\Jetpack\\Sync\\Default_Filter_Settings' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-sync/src/class-default-filter-settings.php', - 'Automattic\\Jetpack\\Sync\\Defaults' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-sync/src/class-defaults.php', - 'Automattic\\Jetpack\\Sync\\Functions' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-sync/src/class-functions.php', - 'Automattic\\Jetpack\\Sync\\Health' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-sync/src/class-health.php', - 'Automattic\\Jetpack\\Sync\\JSON_Deflate_Array_Codec' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-sync/src/class-json-deflate-array-codec.php', - 'Automattic\\Jetpack\\Sync\\Listener' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-sync/src/class-listener.php', - 'Automattic\\Jetpack\\Sync\\Lock' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-sync/src/class-lock.php', - 'Automattic\\Jetpack\\Sync\\Main' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-sync/src/class-main.php', - 'Automattic\\Jetpack\\Sync\\Modules' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-sync/src/class-modules.php', - 'Automattic\\Jetpack\\Sync\\Modules\\Attachments' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-sync/src/modules/class-attachments.php', - 'Automattic\\Jetpack\\Sync\\Modules\\Callables' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-sync/src/modules/class-callables.php', - 'Automattic\\Jetpack\\Sync\\Modules\\Comments' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-sync/src/modules/class-comments.php', - 'Automattic\\Jetpack\\Sync\\Modules\\Constants' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-sync/src/modules/class-constants.php', - 'Automattic\\Jetpack\\Sync\\Modules\\Full_Sync' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-sync/src/modules/class-full-sync.php', - 'Automattic\\Jetpack\\Sync\\Modules\\Full_Sync_Immediately' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-sync/src/modules/class-full-sync-immediately.php', - 'Automattic\\Jetpack\\Sync\\Modules\\Import' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-sync/src/modules/class-import.php', - 'Automattic\\Jetpack\\Sync\\Modules\\Menus' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-sync/src/modules/class-menus.php', - 'Automattic\\Jetpack\\Sync\\Modules\\Meta' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-sync/src/modules/class-meta.php', - 'Automattic\\Jetpack\\Sync\\Modules\\Module' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-sync/src/modules/class-module.php', - 'Automattic\\Jetpack\\Sync\\Modules\\Network_Options' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-sync/src/modules/class-network-options.php', - 'Automattic\\Jetpack\\Sync\\Modules\\Options' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-sync/src/modules/class-options.php', - 'Automattic\\Jetpack\\Sync\\Modules\\Plugins' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-sync/src/modules/class-plugins.php', - 'Automattic\\Jetpack\\Sync\\Modules\\Posts' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-sync/src/modules/class-posts.php', - 'Automattic\\Jetpack\\Sync\\Modules\\Protect' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-sync/src/modules/class-protect.php', - 'Automattic\\Jetpack\\Sync\\Modules\\Search' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-sync/src/modules/class-search.php', - 'Automattic\\Jetpack\\Sync\\Modules\\Stats' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-sync/src/modules/class-stats.php', - 'Automattic\\Jetpack\\Sync\\Modules\\Term_Relationships' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-sync/src/modules/class-term-relationships.php', - 'Automattic\\Jetpack\\Sync\\Modules\\Terms' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-sync/src/modules/class-terms.php', - 'Automattic\\Jetpack\\Sync\\Modules\\Themes' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-sync/src/modules/class-themes.php', - 'Automattic\\Jetpack\\Sync\\Modules\\Updates' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-sync/src/modules/class-updates.php', - 'Automattic\\Jetpack\\Sync\\Modules\\Users' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-sync/src/modules/class-users.php', - 'Automattic\\Jetpack\\Sync\\Modules\\WP_Super_Cache' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-sync/src/modules/class-wp-super-cache.php', - 'Automattic\\Jetpack\\Sync\\Modules\\WooCommerce' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-sync/src/modules/class-woocommerce.php', - 'Automattic\\Jetpack\\Sync\\Modules\\WooCommerce_HPOS_Orders' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-sync/src/modules/class-woocommerce-hpos-orders.php', - 'Automattic\\Jetpack\\Sync\\Package_Version' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-sync/src/class-package-version.php', - 'Automattic\\Jetpack\\Sync\\Queue' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-sync/src/class-queue.php', - 'Automattic\\Jetpack\\Sync\\Queue\\Queue_Storage_Options' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-sync/src/sync-queue/class-queue-storage-options.php', - 'Automattic\\Jetpack\\Sync\\Queue\\Queue_Storage_Table' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-sync/src/sync-queue/class-queue-storage-table.php', - 'Automattic\\Jetpack\\Sync\\Queue_Buffer' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-sync/src/class-queue-buffer.php', - 'Automattic\\Jetpack\\Sync\\REST_Endpoints' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-sync/src/class-rest-endpoints.php', - 'Automattic\\Jetpack\\Sync\\REST_Sender' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-sync/src/class-rest-sender.php', - 'Automattic\\Jetpack\\Sync\\Replicastore' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-sync/src/class-replicastore.php', - 'Automattic\\Jetpack\\Sync\\Replicastore\\Table_Checksum' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-sync/src/replicastore/class-table-checksum.php', - 'Automattic\\Jetpack\\Sync\\Replicastore\\Table_Checksum_Usermeta' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-sync/src/replicastore/class-table-checksum-usermeta.php', - 'Automattic\\Jetpack\\Sync\\Replicastore\\Table_Checksum_Users' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-sync/src/replicastore/class-table-checksum-users.php', - 'Automattic\\Jetpack\\Sync\\Replicastore_Interface' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-sync/src/interface-replicastore.php', - 'Automattic\\Jetpack\\Sync\\Sender' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-sync/src/class-sender.php', - 'Automattic\\Jetpack\\Sync\\Server' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-sync/src/class-server.php', - 'Automattic\\Jetpack\\Sync\\Settings' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-sync/src/class-settings.php', - 'Automattic\\Jetpack\\Sync\\Simple_Codec' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-sync/src/class-simple-codec.php', - 'Automattic\\Jetpack\\Sync\\Users' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-sync/src/class-users.php', - 'Automattic\\Jetpack\\Sync\\Utils' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-sync/src/class-utils.php', - 'Automattic\\Jetpack\\Terms_Of_Service' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-connection/src/class-terms-of-service.php', - 'Automattic\\Jetpack\\Tracking' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-connection/src/class-tracking.php', - 'Automattic\\Jetpack\\Transport_Helper\\Package_Version' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-transport-helper/src/class-package-version.php', - 'Automattic\\Jetpack\\Transport_Helper\\V0001\\Package_Version' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-transport-helper/src/class-package-version-compat.php', - 'Automattic\\Jetpack\\Transport_Helper\\V0003\\REST_Controller' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-transport-helper/src/class-rest-controller.php', - 'Automattic\\Jetpack\\Waf\\Brute_Force_Protection\\Brute_Force_Protection' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-waf/src/class-brute-force-protection.php', - 'Automattic\\Jetpack\\Waf\\Brute_Force_Protection\\Brute_Force_Protection_Blocked_Login_Page' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-waf/src/brute-force-protection/class-blocked-login-page.php', - 'Automattic\\Jetpack\\Waf\\Brute_Force_Protection\\Brute_Force_Protection_Math_Authenticate' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-waf/src/brute-force-protection/class-math-fallback.php', - 'Automattic\\Jetpack\\Waf\\Brute_Force_Protection\\Brute_Force_Protection_Shared_Functions' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-waf/src/brute-force-protection/class-shared-functions.php', - 'Automattic\\Jetpack\\Waf\\Brute_Force_Protection\\Brute_Force_Protection_Transient_Cleanup' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-waf/src/brute-force-protection/class-transient-cleanup.php', - 'Automattic\\Jetpack\\Waf\\CLI' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-waf/src/class-waf-cli.php', - 'Automattic\\Jetpack\\Waf\\File_System_Exception' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-waf/src/exceptions/class-file-system-exception.php', - 'Automattic\\Jetpack\\Waf\\REST_Controller' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-waf/src/class-rest-controller.php', - 'Automattic\\Jetpack\\Waf\\Rules_API_Exception' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-waf/src/exceptions/class-rules-api-exception.php', - 'Automattic\\Jetpack\\Waf\\Waf_Compatibility' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-waf/src/class-compatibility.php', - 'Automattic\\Jetpack\\Waf\\Waf_Constants' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-waf/src/class-waf-constants.php', - 'Automattic\\Jetpack\\Waf\\Waf_Exception' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-waf/src/exceptions/class-waf-exception.php', - 'Automattic\\Jetpack\\Waf\\Waf_Initializer' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-waf/src/class-waf-initializer.php', - 'Automattic\\Jetpack\\Waf\\Waf_Operators' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-waf/src/class-waf-operators.php', - 'Automattic\\Jetpack\\Waf\\Waf_Request' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-waf/src/class-waf-request.php', - 'Automattic\\Jetpack\\Waf\\Waf_Rules_Manager' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-waf/src/class-waf-rules-manager.php', - 'Automattic\\Jetpack\\Waf\\Waf_Runner' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-waf/src/class-waf-runner.php', - 'Automattic\\Jetpack\\Waf\\Waf_Runtime' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-waf/src/class-waf-runtime.php', - 'Automattic\\Jetpack\\Waf\\Waf_Standalone_Bootstrap' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-waf/src/class-waf-standalone-bootstrap.php', - 'Automattic\\Jetpack\\Waf\\Waf_Stats' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-waf/src/class-waf-stats.php', - 'Automattic\\Jetpack\\Waf\\Waf_Transforms' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-waf/src/class-waf-transforms.php', - 'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php', - 'Jetpack_IXR_Client' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-connection/legacy/class-jetpack-ixr-client.php', - 'Jetpack_IXR_ClientMulticall' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-connection/legacy/class-jetpack-ixr-clientmulticall.php', - 'Jetpack_Options' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-connection/legacy/class-jetpack-options.php', - 'Jetpack_Protect' => __DIR__ . '/../..' . '/src/class-jetpack-protect.php', - 'Jetpack_Signature' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-connection/legacy/class-jetpack-signature.php', - 'Jetpack_Tracks_Client' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-connection/legacy/class-jetpack-tracks-client.php', - 'Jetpack_Tracks_Event' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-connection/legacy/class-jetpack-tracks-event.php', - 'Jetpack_XMLRPC_Server' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-connection/legacy/class-jetpack-xmlrpc-server.php', - ); - - public static function getInitializer(ClassLoader $loader) - { - return \Closure::bind(function () use ($loader) { - $loader->prefixLengthsPsr4 = ComposerStaticInitc4802e05bbcf59fd3b6350e8d3e5482c_protectⓥ2_1_0::$prefixLengthsPsr4; - $loader->prefixDirsPsr4 = ComposerStaticInitc4802e05bbcf59fd3b6350e8d3e5482c_protectⓥ2_1_0::$prefixDirsPsr4; - $loader->classMap = ComposerStaticInitc4802e05bbcf59fd3b6350e8d3e5482c_protectⓥ2_1_0::$classMap; - - }, null, ClassLoader::class); - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/vendor/composer/installed.json b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/vendor/composer/installed.json deleted file mode 100644 index fc1cb33f..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/vendor/composer/installed.json +++ /dev/null @@ -1,1641 +0,0 @@ -{ - "packages": [ - { - "name": "automattic/jetpack-a8c-mc-stats", - "version": "v2.0.1", - "version_normalized": "2.0.1.0", - "source": { - "type": "git", - "url": "https://github.com/Automattic/jetpack-a8c-mc-stats.git", - "reference": "64748d02bf646e6b000f79dc8e4ea127bbd8df14" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Automattic/jetpack-a8c-mc-stats/zipball/64748d02bf646e6b000f79dc8e4ea127bbd8df14", - "reference": "64748d02bf646e6b000f79dc8e4ea127bbd8df14", - "shasum": "" - }, - "require": { - "php": ">=7.0" - }, - "require-dev": { - "automattic/jetpack-changelogger": "^4.1.1", - "yoast/phpunit-polyfills": "1.1.0" - }, - "suggest": { - "automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package." - }, - "time": "2024-03-12T22:00:11+00:00", - "type": "jetpack-library", - "extra": { - "autotagger": true, - "mirror-repo": "Automattic/jetpack-a8c-mc-stats", - "changelogger": { - "link-template": "https://github.com/Automattic/jetpack-a8c-mc-stats/compare/v${old}...v${new}" - }, - "branch-alias": { - "dev-trunk": "2.0.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "GPL-2.0-or-later" - ], - "description": "Used to record internal usage stats for Automattic. Not visible to site owners.", - "support": { - "source": "https://github.com/Automattic/jetpack-a8c-mc-stats/tree/v2.0.1" - }, - "install-path": "../../jetpack_vendor/automattic/jetpack-a8c-mc-stats" - }, - { - "name": "automattic/jetpack-admin-ui", - "version": "v0.4.1", - "version_normalized": "0.4.1.0", - "source": { - "type": "git", - "url": "https://github.com/Automattic/jetpack-admin-ui.git", - "reference": "253a2ef6b07e933953673ece4a283bbe821a3079" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Automattic/jetpack-admin-ui/zipball/253a2ef6b07e933953673ece4a283bbe821a3079", - "reference": "253a2ef6b07e933953673ece4a283bbe821a3079", - "shasum": "" - }, - "require": { - "php": ">=7.0" - }, - "require-dev": { - "automattic/jetpack-changelogger": "^4.1.1", - "automattic/jetpack-logo": "^2.0.1", - "automattic/wordbless": "dev-master", - "yoast/phpunit-polyfills": "1.1.0" - }, - "suggest": { - "automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package." - }, - "time": "2024-03-12T22:00:40+00:00", - "type": "jetpack-library", - "extra": { - "autotagger": true, - "mirror-repo": "Automattic/jetpack-admin-ui", - "textdomain": "jetpack-admin-ui", - "changelogger": { - "link-template": "https://github.com/Automattic/jetpack-admin-ui/compare/${old}...${new}" - }, - "branch-alias": { - "dev-trunk": "0.4.x-dev" - }, - "version-constants": { - "::PACKAGE_VERSION": "src/class-admin-menu.php" - } - }, - "installation-source": "dist", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "GPL-2.0-or-later" - ], - "description": "Generic Jetpack wp-admin UI elements", - "support": { - "source": "https://github.com/Automattic/jetpack-admin-ui/tree/v0.4.1" - }, - "install-path": "../../jetpack_vendor/automattic/jetpack-admin-ui" - }, - { - "name": "automattic/jetpack-assets", - "version": "v2.1.4", - "version_normalized": "2.1.4.0", - "source": { - "type": "git", - "url": "https://github.com/Automattic/jetpack-assets.git", - "reference": "06614b6daf1229002ca80dae982421c74c351a83" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Automattic/jetpack-assets/zipball/06614b6daf1229002ca80dae982421c74c351a83", - "reference": "06614b6daf1229002ca80dae982421c74c351a83", - "shasum": "" - }, - "require": { - "automattic/jetpack-constants": "^2.0.1", - "php": ">=7.0" - }, - "require-dev": { - "automattic/jetpack-changelogger": "^4.1.1", - "brain/monkey": "2.6.1", - "wikimedia/testing-access-wrapper": "^1.0 || ^2.0 || ^3.0", - "yoast/phpunit-polyfills": "1.1.0" - }, - "suggest": { - "automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package." - }, - "time": "2024-03-12T22:01:21+00:00", - "type": "jetpack-library", - "extra": { - "autotagger": true, - "mirror-repo": "Automattic/jetpack-assets", - "textdomain": "jetpack-assets", - "changelogger": { - "link-template": "https://github.com/Automattic/jetpack-assets/compare/v${old}...v${new}" - }, - "branch-alias": { - "dev-trunk": "2.1.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "files": [ - "actions.php" - ], - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "GPL-2.0-or-later" - ], - "description": "Asset management utilities for Jetpack ecosystem packages", - "support": { - "source": "https://github.com/Automattic/jetpack-assets/tree/v2.1.4" - }, - "install-path": "../../jetpack_vendor/automattic/jetpack-assets" - }, - { - "name": "automattic/jetpack-autoloader", - "version": "v3.0.3", - "version_normalized": "3.0.3.0", - "source": { - "type": "git", - "url": "https://github.com/Automattic/jetpack-autoloader.git", - "reference": "11466fe7fce66d30281d7402940969e673f545f2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Automattic/jetpack-autoloader/zipball/11466fe7fce66d30281d7402940969e673f545f2", - "reference": "11466fe7fce66d30281d7402940969e673f545f2", - "shasum": "" - }, - "require": { - "composer-plugin-api": "^1.1 || ^2.0", - "php": ">=7.0" - }, - "require-dev": { - "automattic/jetpack-changelogger": "^4.1.1", - "yoast/phpunit-polyfills": "1.1.0" - }, - "time": "2024-03-14T20:43:03+00:00", - "type": "composer-plugin", - "extra": { - "autotagger": true, - "class": "Automattic\\Jetpack\\Autoloader\\CustomAutoloaderPlugin", - "mirror-repo": "Automattic/jetpack-autoloader", - "changelogger": { - "link-template": "https://github.com/Automattic/jetpack-autoloader/compare/v${old}...v${new}" - }, - "version-constants": { - "::VERSION": "src/AutoloadGenerator.php" - }, - "branch-alias": { - "dev-trunk": "3.0.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Automattic\\Jetpack\\Autoloader\\": "src" - }, - "classmap": [ - "src/AutoloadGenerator.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "GPL-2.0-or-later" - ], - "description": "Creates a custom autoloader for a plugin or theme.", - "keywords": [ - "autoload", - "autoloader", - "composer", - "jetpack", - "plugin", - "wordpress" - ], - "support": { - "source": "https://github.com/Automattic/jetpack-autoloader/tree/v3.0.3" - }, - "install-path": "../automattic/jetpack-autoloader" - }, - { - "name": "automattic/jetpack-backup-helper-script-manager", - "version": "v0.2.4", - "version_normalized": "0.2.4.0", - "source": { - "type": "git", - "url": "https://github.com/Automattic/jetpack-backup-helper-script-manager.git", - "reference": "83b172de688f647753f64e03adf4629f42d926c8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Automattic/jetpack-backup-helper-script-manager/zipball/83b172de688f647753f64e03adf4629f42d926c8", - "reference": "83b172de688f647753f64e03adf4629f42d926c8", - "shasum": "" - }, - "require": { - "php": ">=7.0" - }, - "require-dev": { - "automattic/jetpack-changelogger": "^4.1.2", - "automattic/wordbless": "@dev", - "yoast/phpunit-polyfills": "1.1.0" - }, - "suggest": { - "automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package." - }, - "time": "2024-03-18T17:10:38+00:00", - "type": "jetpack-library", - "extra": { - "autotagger": true, - "mirror-repo": "Automattic/jetpack-backup-helper-script-manager", - "changelogger": { - "link-template": "https://github.com/Automattic/jetpack-backup-helper-script-manager/compare/v${old}...v${new}" - }, - "branch-alias": { - "dev-trunk": "0.2.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "GPL-2.0-or-later" - ], - "description": "Install / delete helper script for backup and transport server. Not visible to site owners.", - "support": { - "source": "https://github.com/Automattic/jetpack-backup-helper-script-manager/tree/v0.2.4" - }, - "install-path": "../../jetpack_vendor/automattic/jetpack-backup-helper-script-manager" - }, - { - "name": "automattic/jetpack-boost-core", - "version": "v0.2.5", - "version_normalized": "0.2.5.0", - "source": { - "type": "git", - "url": "https://github.com/Automattic/jetpack-boost-core.git", - "reference": "865ea45727b95e6604e563c7476fb4c26ea00fa5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Automattic/jetpack-boost-core/zipball/865ea45727b95e6604e563c7476fb4c26ea00fa5", - "reference": "865ea45727b95e6604e563c7476fb4c26ea00fa5", - "shasum": "" - }, - "require": { - "php": ">=7.0" - }, - "require-dev": { - "automattic/jetpack-changelogger": "^4.1.1", - "automattic/wordbless": "dev-master", - "yoast/phpunit-polyfills": "1.1.0" - }, - "suggest": { - "automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package." - }, - "time": "2024-03-14T20:42:49+00:00", - "type": "jetpack-library", - "extra": { - "mirror-repo": "Automattic/jetpack-boost-core", - "changelogger": { - "link-template": "https://github.com/Automattic/jetpack-boost-core/compare/v${old}...v${new}" - }, - "autotagger": true, - "branch-alias": { - "dev-trunk": "0.2.x-dev" - }, - "textdomain": "jetpack-boost-core" - }, - "installation-source": "dist", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "GPL-2.0-or-later" - ], - "description": "Core functionality for boost and relevant packages to depend on", - "support": { - "source": "https://github.com/Automattic/jetpack-boost-core/tree/v0.2.5" - }, - "install-path": "../../jetpack_vendor/automattic/jetpack-boost-core" - }, - { - "name": "automattic/jetpack-boost-speed-score", - "version": "v0.3.7", - "version_normalized": "0.3.7.0", - "source": { - "type": "git", - "url": "https://github.com/Automattic/jetpack-boost-speed-score.git", - "reference": "69e7246f2a43eb564553503a69f806bcf75acb11" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Automattic/jetpack-boost-speed-score/zipball/69e7246f2a43eb564553503a69f806bcf75acb11", - "reference": "69e7246f2a43eb564553503a69f806bcf75acb11", - "shasum": "" - }, - "require": { - "automattic/jetpack-boost-core": "^0.2.5", - "php": ">=7.0" - }, - "require-dev": { - "automattic/jetpack-changelogger": "^4.1.2", - "brain/monkey": "^2.6", - "yoast/phpunit-polyfills": "1.1.0" - }, - "suggest": { - "automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package." - }, - "time": "2024-03-18T17:10:51+00:00", - "type": "jetpack-library", - "extra": { - "mirror-repo": "Automattic/jetpack-boost-speed-score", - "changelogger": { - "link-template": "https://github.com/Automattic/jetpack-boost-speed-score/compare/v${old}...v${new}" - }, - "autotagger": true, - "branch-alias": { - "dev-trunk": "0.3.x-dev" - }, - "textdomain": "jetpack-boost-speed-score", - "version-constants": { - "::PACKAGE_VERSION": "src/class-speed-score.php" - } - }, - "installation-source": "dist", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "GPL-2.0-or-later" - ], - "description": "A package that handles the API to generate the speed score.", - "support": { - "source": "https://github.com/Automattic/jetpack-boost-speed-score/tree/v0.3.7" - }, - "install-path": "../../jetpack_vendor/automattic/jetpack-boost-speed-score" - }, - { - "name": "automattic/jetpack-composer-plugin", - "version": "v2.0.1", - "version_normalized": "2.0.1.0", - "source": { - "type": "git", - "url": "https://github.com/Automattic/jetpack-composer-plugin.git", - "reference": "4c14db8b90c82b02b6530dacfc02f14e3432515b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Automattic/jetpack-composer-plugin/zipball/4c14db8b90c82b02b6530dacfc02f14e3432515b", - "reference": "4c14db8b90c82b02b6530dacfc02f14e3432515b", - "shasum": "" - }, - "require": { - "composer-plugin-api": "^2.1.0", - "php": ">=7.0" - }, - "require-dev": { - "automattic/jetpack-changelogger": "^4.1.1", - "composer/composer": "^2.2 || ^2.4", - "yoast/phpunit-polyfills": "1.1.0" - }, - "time": "2024-03-14T20:42:33+00:00", - "type": "composer-plugin", - "extra": { - "plugin-modifies-install-path": true, - "class": "Automattic\\Jetpack\\Composer\\Plugin", - "mirror-repo": "Automattic/jetpack-composer-plugin", - "changelogger": { - "link-template": "https://github.com/Automattic/jetpack-composer-plugin/compare/v${old}...v${new}" - }, - "autotagger": true, - "branch-alias": { - "dev-trunk": "2.0.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "GPL-2.0-or-later" - ], - "description": "A custom installer plugin for Composer to move Jetpack packages out of `vendor/` so WordPress's translation infrastructure will find their strings.", - "keywords": [ - "composer", - "i18n", - "jetpack", - "plugin" - ], - "support": { - "source": "https://github.com/Automattic/jetpack-composer-plugin/tree/v2.0.1" - }, - "install-path": "../automattic/jetpack-composer-plugin" - }, - { - "name": "automattic/jetpack-config", - "version": "v2.0.1", - "version_normalized": "2.0.1.0", - "source": { - "type": "git", - "url": "https://github.com/Automattic/jetpack-config.git", - "reference": "a839ddad47511ecacf0ace0e8bc9fd06fded53ed" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Automattic/jetpack-config/zipball/a839ddad47511ecacf0ace0e8bc9fd06fded53ed", - "reference": "a839ddad47511ecacf0ace0e8bc9fd06fded53ed", - "shasum": "" - }, - "require": { - "php": ">=7.0" - }, - "require-dev": { - "automattic/jetpack-changelogger": "^4.1.1" - }, - "suggest": { - "automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package." - }, - "time": "2024-03-14T20:42:31+00:00", - "type": "jetpack-library", - "extra": { - "autotagger": true, - "mirror-repo": "Automattic/jetpack-config", - "textdomain": "jetpack-config", - "changelogger": { - "link-template": "https://github.com/Automattic/jetpack-config/compare/v${old}...v${new}" - }, - "branch-alias": { - "dev-trunk": "2.0.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "GPL-2.0-or-later" - ], - "description": "Jetpack configuration package that initializes other packages and configures Jetpack's functionality. Can be used as a base for all variants of Jetpack package usage.", - "support": { - "source": "https://github.com/Automattic/jetpack-config/tree/v2.0.1" - }, - "install-path": "../../jetpack_vendor/automattic/jetpack-config" - }, - { - "name": "automattic/jetpack-connection", - "version": "v2.5.0", - "version_normalized": "2.5.0.0", - "source": { - "type": "git", - "url": "https://github.com/Automattic/jetpack-connection.git", - "reference": "2de22a7d75baa73e40b8a6601e18c4a866f3e6cc" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Automattic/jetpack-connection/zipball/2de22a7d75baa73e40b8a6601e18c4a866f3e6cc", - "reference": "2de22a7d75baa73e40b8a6601e18c4a866f3e6cc", - "shasum": "" - }, - "require": { - "automattic/jetpack-a8c-mc-stats": "^2.0.1", - "automattic/jetpack-admin-ui": "^0.4.1", - "automattic/jetpack-constants": "^2.0.1", - "automattic/jetpack-redirect": "^2.0.1", - "automattic/jetpack-roles": "^2.0.1", - "automattic/jetpack-status": "^2.1.2", - "php": ">=7.0" - }, - "require-dev": { - "automattic/jetpack-changelogger": "^4.1.2", - "automattic/wordbless": "@dev", - "brain/monkey": "2.6.1", - "yoast/phpunit-polyfills": "1.1.0" - }, - "suggest": { - "automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package." - }, - "time": "2024-03-18T17:11:05+00:00", - "type": "jetpack-library", - "extra": { - "autotagger": true, - "mirror-repo": "Automattic/jetpack-connection", - "textdomain": "jetpack-connection", - "version-constants": { - "::PACKAGE_VERSION": "src/class-package-version.php" - }, - "changelogger": { - "link-template": "https://github.com/Automattic/jetpack-connection/compare/v${old}...v${new}" - }, - "branch-alias": { - "dev-trunk": "2.5.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "classmap": [ - "legacy", - "src/", - "src/webhooks" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "GPL-2.0-or-later" - ], - "description": "Everything needed to connect to the Jetpack infrastructure", - "support": { - "source": "https://github.com/Automattic/jetpack-connection/tree/v2.5.0" - }, - "install-path": "../../jetpack_vendor/automattic/jetpack-connection" - }, - { - "name": "automattic/jetpack-constants", - "version": "v2.0.1", - "version_normalized": "2.0.1.0", - "source": { - "type": "git", - "url": "https://github.com/Automattic/jetpack-constants.git", - "reference": "b159a8777450721a2e898a80930be1fdf59bae92" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Automattic/jetpack-constants/zipball/b159a8777450721a2e898a80930be1fdf59bae92", - "reference": "b159a8777450721a2e898a80930be1fdf59bae92", - "shasum": "" - }, - "require": { - "php": ">=7.0" - }, - "require-dev": { - "automattic/jetpack-changelogger": "^4.1.1", - "brain/monkey": "2.6.1", - "yoast/phpunit-polyfills": "1.1.0" - }, - "suggest": { - "automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package." - }, - "time": "2024-03-12T22:00:13+00:00", - "type": "jetpack-library", - "extra": { - "autotagger": true, - "mirror-repo": "Automattic/jetpack-constants", - "changelogger": { - "link-template": "https://github.com/Automattic/jetpack-constants/compare/v${old}...v${new}" - }, - "branch-alias": { - "dev-trunk": "2.0.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "GPL-2.0-or-later" - ], - "description": "A wrapper for defining constants in a more testable way.", - "support": { - "source": "https://github.com/Automattic/jetpack-constants/tree/v2.0.1" - }, - "install-path": "../../jetpack_vendor/automattic/jetpack-constants" - }, - { - "name": "automattic/jetpack-device-detection", - "version": "v2.1.2", - "version_normalized": "2.1.2.0", - "source": { - "type": "git", - "url": "https://github.com/Automattic/jetpack-device-detection.git", - "reference": "0a3f8c0f2c77dc2c73b212ac1563ca1feb0cf008" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Automattic/jetpack-device-detection/zipball/0a3f8c0f2c77dc2c73b212ac1563ca1feb0cf008", - "reference": "0a3f8c0f2c77dc2c73b212ac1563ca1feb0cf008", - "shasum": "" - }, - "require": { - "php": ">=7.0" - }, - "require-dev": { - "automattic/jetpack-changelogger": "^4.1.2", - "yoast/phpunit-polyfills": "1.1.0" - }, - "suggest": { - "automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package." - }, - "time": "2024-03-18T17:10:30+00:00", - "type": "jetpack-library", - "extra": { - "autotagger": true, - "mirror-repo": "Automattic/jetpack-device-detection", - "changelogger": { - "link-template": "https://github.com/Automattic/jetpack-device-detection/compare/v${old}...v${new}" - }, - "branch-alias": { - "dev-trunk": "2.1.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "GPL-2.0-or-later" - ], - "description": "A way to detect device types based on User-Agent header.", - "support": { - "source": "https://github.com/Automattic/jetpack-device-detection/tree/v2.1.2" - }, - "install-path": "../../jetpack_vendor/automattic/jetpack-device-detection" - }, - { - "name": "automattic/jetpack-identity-crisis", - "version": "v0.17.3", - "version_normalized": "0.17.3.0", - "source": { - "type": "git", - "url": "https://github.com/Automattic/jetpack-identity-crisis.git", - "reference": "fc4d46671d4476e0cf34ac4c9350456a692178d9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Automattic/jetpack-identity-crisis/zipball/fc4d46671d4476e0cf34ac4c9350456a692178d9", - "reference": "fc4d46671d4476e0cf34ac4c9350456a692178d9", - "shasum": "" - }, - "require": { - "automattic/jetpack-assets": "^2.1.4", - "automattic/jetpack-connection": "^2.4.1", - "automattic/jetpack-constants": "^2.0.1", - "automattic/jetpack-logo": "^2.0.1", - "automattic/jetpack-status": "^2.1.2", - "php": ">=7.0" - }, - "require-dev": { - "automattic/jetpack-changelogger": "^4.1.1", - "automattic/wordbless": "@dev", - "yoast/phpunit-polyfills": "1.1.0" - }, - "suggest": { - "automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package." - }, - "time": "2024-03-14T20:43:51+00:00", - "type": "jetpack-library", - "extra": { - "autotagger": true, - "mirror-repo": "Automattic/jetpack-identity-crisis", - "textdomain": "jetpack-idc", - "version-constants": { - "::PACKAGE_VERSION": "src/class-identity-crisis.php" - }, - "changelogger": { - "link-template": "https://github.com/Automattic/jetpack-identity-crisis/compare/v${old}...v${new}" - }, - "branch-alias": { - "dev-trunk": "0.17.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "GPL-2.0-or-later" - ], - "description": "Identity Crisis.", - "support": { - "source": "https://github.com/Automattic/jetpack-identity-crisis/tree/v0.17.3" - }, - "install-path": "../../jetpack_vendor/automattic/jetpack-identity-crisis" - }, - { - "name": "automattic/jetpack-ip", - "version": "v0.2.2", - "version_normalized": "0.2.2.0", - "source": { - "type": "git", - "url": "https://github.com/Automattic/jetpack-ip.git", - "reference": "b3efffb57901e236c3c1e7299b575563e1937013" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Automattic/jetpack-ip/zipball/b3efffb57901e236c3c1e7299b575563e1937013", - "reference": "b3efffb57901e236c3c1e7299b575563e1937013", - "shasum": "" - }, - "require": { - "php": ">=7.0" - }, - "require-dev": { - "automattic/jetpack-changelogger": "^4.1.1", - "brain/monkey": "2.6.1", - "yoast/phpunit-polyfills": "1.1.0" - }, - "suggest": { - "automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package." - }, - "time": "2024-03-12T22:00:05+00:00", - "type": "jetpack-library", - "extra": { - "autotagger": true, - "mirror-repo": "Automattic/jetpack-ip", - "changelogger": { - "link-template": "https://github.com/automattic/jetpack-ip/compare/v${old}...v${new}" - }, - "branch-alias": { - "dev-trunk": "0.2.x-dev" - }, - "textdomain": "jetpack-ip", - "version-constants": { - "::PACKAGE_VERSION": "src/class-utils.php" - } - }, - "installation-source": "dist", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "GPL-2.0-or-later" - ], - "description": "Utilities for working with IP addresses.", - "support": { - "source": "https://github.com/Automattic/jetpack-ip/tree/v0.2.2" - }, - "install-path": "../../jetpack_vendor/automattic/jetpack-ip" - }, - { - "name": "automattic/jetpack-jitm", - "version": "v3.1.1", - "version_normalized": "3.1.1.0", - "source": { - "type": "git", - "url": "https://github.com/Automattic/jetpack-jitm.git", - "reference": "b4823f23c1408bcd5625d37febb8efb8aeeaa310" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Automattic/jetpack-jitm/zipball/b4823f23c1408bcd5625d37febb8efb8aeeaa310", - "reference": "b4823f23c1408bcd5625d37febb8efb8aeeaa310", - "shasum": "" - }, - "require": { - "automattic/jetpack-a8c-mc-stats": "^2.0.1", - "automattic/jetpack-assets": "^2.1.4", - "automattic/jetpack-connection": "^2.4.1", - "automattic/jetpack-device-detection": "^2.1.1", - "automattic/jetpack-logo": "^2.0.1", - "automattic/jetpack-redirect": "^2.0.1", - "automattic/jetpack-status": "^2.1.2", - "php": ">=7.0" - }, - "require-dev": { - "automattic/jetpack-changelogger": "^4.1.1", - "brain/monkey": "2.6.1", - "yoast/phpunit-polyfills": "1.1.0" - }, - "suggest": { - "automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package." - }, - "time": "2024-03-14T20:43:44+00:00", - "type": "jetpack-library", - "extra": { - "autotagger": true, - "mirror-repo": "Automattic/jetpack-jitm", - "textdomain": "jetpack-jitm", - "version-constants": { - "::PACKAGE_VERSION": "src/class-jitm.php" - }, - "changelogger": { - "link-template": "https://github.com/Automattic/jetpack-jitm/compare/v${old}...v${new}" - }, - "branch-alias": { - "dev-trunk": "3.1.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "GPL-2.0-or-later" - ], - "description": "Just in time messages for Jetpack", - "support": { - "source": "https://github.com/Automattic/jetpack-jitm/tree/v3.1.1" - }, - "install-path": "../../jetpack_vendor/automattic/jetpack-jitm" - }, - { - "name": "automattic/jetpack-licensing", - "version": "v2.0.2", - "version_normalized": "2.0.2.0", - "source": { - "type": "git", - "url": "https://github.com/Automattic/jetpack-licensing.git", - "reference": "b7b036faecbe5f235594c49c1543deac55bbaa9c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Automattic/jetpack-licensing/zipball/b7b036faecbe5f235594c49c1543deac55bbaa9c", - "reference": "b7b036faecbe5f235594c49c1543deac55bbaa9c", - "shasum": "" - }, - "require": { - "automattic/jetpack-connection": "^2.4.1", - "php": ">=7.0" - }, - "require-dev": { - "automattic/jetpack-changelogger": "^4.1.1", - "automattic/wordbless": "@dev", - "yoast/phpunit-polyfills": "1.1.0" - }, - "suggest": { - "automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package." - }, - "time": "2024-03-14T20:43:20+00:00", - "type": "jetpack-library", - "extra": { - "autotagger": true, - "mirror-repo": "Automattic/jetpack-licensing", - "textdomain": "jetpack-licensing", - "changelogger": { - "link-template": "https://github.com/Automattic/jetpack-licensing/compare/v${old}...v${new}" - }, - "branch-alias": { - "dev-trunk": "2.0.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "GPL-2.0-or-later" - ], - "description": "Everything needed to manage Jetpack licenses client-side.", - "support": { - "source": "https://github.com/Automattic/jetpack-licensing/tree/v2.0.2" - }, - "install-path": "../../jetpack_vendor/automattic/jetpack-licensing" - }, - { - "name": "automattic/jetpack-logo", - "version": "v2.0.2", - "version_normalized": "2.0.2.0", - "source": { - "type": "git", - "url": "https://github.com/Automattic/jetpack-logo.git", - "reference": "25a1824973439f6cbb1e4d9bb88cb7fdd9c83305" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Automattic/jetpack-logo/zipball/25a1824973439f6cbb1e4d9bb88cb7fdd9c83305", - "reference": "25a1824973439f6cbb1e4d9bb88cb7fdd9c83305", - "shasum": "" - }, - "require": { - "php": ">=7.0" - }, - "require-dev": { - "automattic/jetpack-changelogger": "^4.1.2", - "yoast/phpunit-polyfills": "1.1.0" - }, - "suggest": { - "automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package." - }, - "time": "2024-03-18T17:10:26+00:00", - "type": "jetpack-library", - "extra": { - "autotagger": true, - "mirror-repo": "Automattic/jetpack-logo", - "changelogger": { - "link-template": "https://github.com/Automattic/jetpack-logo/compare/v${old}...v${new}" - }, - "branch-alias": { - "dev-trunk": "2.0.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "GPL-2.0-or-later" - ], - "description": "A logo for Jetpack", - "support": { - "source": "https://github.com/Automattic/jetpack-logo/tree/v2.0.2" - }, - "install-path": "../../jetpack_vendor/automattic/jetpack-logo" - }, - { - "name": "automattic/jetpack-my-jetpack", - "version": "v4.17.0", - "version_normalized": "4.17.0.0", - "source": { - "type": "git", - "url": "https://github.com/Automattic/jetpack-my-jetpack.git", - "reference": "67a2fefac358eb6e6a3550e055a24c32ae06cb3a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Automattic/jetpack-my-jetpack/zipball/67a2fefac358eb6e6a3550e055a24c32ae06cb3a", - "reference": "67a2fefac358eb6e6a3550e055a24c32ae06cb3a", - "shasum": "" - }, - "require": { - "automattic/jetpack-admin-ui": "^0.4.1", - "automattic/jetpack-assets": "^2.1.4", - "automattic/jetpack-boost-speed-score": "^0.3.6", - "automattic/jetpack-connection": "^2.4.1", - "automattic/jetpack-constants": "^2.0.1", - "automattic/jetpack-jitm": "^3.1.1", - "automattic/jetpack-licensing": "^2.0.2", - "automattic/jetpack-plans": "^0.4.3", - "automattic/jetpack-plugins-installer": "^0.3.2", - "automattic/jetpack-redirect": "^2.0.1", - "automattic/jetpack-status": "^2.1.2", - "php": ">=7.0" - }, - "require-dev": { - "automattic/jetpack-changelogger": "^4.1.1", - "automattic/jetpack-videopress": "^0.23.10", - "automattic/wordbless": "@dev", - "yoast/phpunit-polyfills": "1.1.0" - }, - "suggest": { - "automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package." - }, - "time": "2024-03-14T20:44:05+00:00", - "type": "jetpack-library", - "extra": { - "autotagger": true, - "mirror-repo": "Automattic/jetpack-my-jetpack", - "textdomain": "jetpack-my-jetpack", - "changelogger": { - "link-template": "https://github.com/Automattic/jetpack-my-jetpack/compare/${old}...${new}" - }, - "branch-alias": { - "dev-trunk": "4.17.x-dev" - }, - "version-constants": { - "::PACKAGE_VERSION": "src/class-initializer.php" - } - }, - "installation-source": "dist", - "autoload": { - "classmap": [ - "src/", - "src/products" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "GPL-2.0-or-later" - ], - "description": "WP Admin page with information and configuration shared among all Jetpack stand-alone plugins", - "support": { - "source": "https://github.com/Automattic/jetpack-my-jetpack/tree/v4.17.0" - }, - "install-path": "../../jetpack_vendor/automattic/jetpack-my-jetpack" - }, - { - "name": "automattic/jetpack-password-checker", - "version": "v0.3.1", - "version_normalized": "0.3.1.0", - "source": { - "type": "git", - "url": "https://github.com/Automattic/jetpack-password-checker.git", - "reference": "d9be23791e6f38debeacbf74174903f223ddfd89" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Automattic/jetpack-password-checker/zipball/d9be23791e6f38debeacbf74174903f223ddfd89", - "reference": "d9be23791e6f38debeacbf74174903f223ddfd89", - "shasum": "" - }, - "require": { - "php": ">=7.0" - }, - "require-dev": { - "automattic/jetpack-changelogger": "^4.1.1", - "automattic/wordbless": "@dev", - "yoast/phpunit-polyfills": "1.1.0" - }, - "suggest": { - "automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package." - }, - "time": "2024-03-14T20:42:38+00:00", - "type": "jetpack-library", - "extra": { - "autotagger": true, - "mirror-repo": "Automattic/jetpack-password-checker", - "textdomain": "jetpack-password-checker", - "changelogger": { - "link-template": "https://github.com/Automattic/jetpack-password-checker/compare/v${old}...v${new}" - }, - "branch-alias": { - "dev-trunk": "0.3.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "GPL-2.0-or-later" - ], - "description": "Password Checker.", - "support": { - "source": "https://github.com/Automattic/jetpack-password-checker/tree/v0.3.1" - }, - "install-path": "../../jetpack_vendor/automattic/jetpack-password-checker" - }, - { - "name": "automattic/jetpack-plans", - "version": "v0.4.3", - "version_normalized": "0.4.3.0", - "source": { - "type": "git", - "url": "https://github.com/Automattic/jetpack-plans.git", - "reference": "25fb43e22e9fe691f4c1c9e9af8056c31d898359" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Automattic/jetpack-plans/zipball/25fb43e22e9fe691f4c1c9e9af8056c31d898359", - "reference": "25fb43e22e9fe691f4c1c9e9af8056c31d898359", - "shasum": "" - }, - "require": { - "automattic/jetpack-connection": "^2.4.1", - "php": ">=7.0" - }, - "require-dev": { - "automattic/jetpack-changelogger": "^4.1.1", - "automattic/jetpack-status": "^2.1.2", - "automattic/wordbless": "@dev", - "yoast/phpunit-polyfills": "1.1.0" - }, - "suggest": { - "automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package." - }, - "time": "2024-03-12T22:01:05+00:00", - "type": "library", - "extra": { - "autotagger": true, - "mirror-repo": "Automattic/jetpack-plans", - "changelogger": { - "link-template": "https://github.com/Automattic/jetpack-plans/compare/v${old}...v${new}" - }, - "branch-alias": { - "dev-trunk": "0.4.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "GPL-2.0-or-later" - ], - "description": "Fetch information about Jetpack Plans from wpcom", - "support": { - "source": "https://github.com/Automattic/jetpack-plans/tree/v0.4.3" - }, - "install-path": "../automattic/jetpack-plans" - }, - { - "name": "automattic/jetpack-plugins-installer", - "version": "v0.3.2", - "version_normalized": "0.3.2.0", - "source": { - "type": "git", - "url": "https://github.com/Automattic/jetpack-plugins-installer.git", - "reference": "b08aa508da4cb29d89bcfe131cbc170293ff8a1a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Automattic/jetpack-plugins-installer/zipball/b08aa508da4cb29d89bcfe131cbc170293ff8a1a", - "reference": "b08aa508da4cb29d89bcfe131cbc170293ff8a1a", - "shasum": "" - }, - "require": { - "automattic/jetpack-a8c-mc-stats": "^2.0.1", - "php": ">=7.0" - }, - "require-dev": { - "automattic/jetpack-changelogger": "^4.1.1", - "yoast/phpunit-polyfills": "1.1.0" - }, - "suggest": { - "automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package." - }, - "time": "2024-03-14T20:42:56+00:00", - "type": "jetpack-library", - "extra": { - "branch-alias": { - "dev-trunk": "0.3.x-dev" - }, - "mirror-repo": "Automattic/jetpack-plugins-installer", - "changelogger": { - "link-template": "https://github.com/Automattic/jetpack-plugins-installer/compare/v${old}...v${new}" - }, - "autotagger": true, - "textdomain": "jetpack-plugins-installer" - }, - "installation-source": "dist", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "GPL-2.0-or-later" - ], - "description": "Handle installation of plugins from WP.org", - "support": { - "source": "https://github.com/Automattic/jetpack-plugins-installer/tree/v0.3.2" - }, - "install-path": "../../jetpack_vendor/automattic/jetpack-plugins-installer" - }, - { - "name": "automattic/jetpack-redirect", - "version": "v2.0.1", - "version_normalized": "2.0.1.0", - "source": { - "type": "git", - "url": "https://github.com/Automattic/jetpack-redirect.git", - "reference": "24742b555faf49ec811e263653da898184c72366" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Automattic/jetpack-redirect/zipball/24742b555faf49ec811e263653da898184c72366", - "reference": "24742b555faf49ec811e263653da898184c72366", - "shasum": "" - }, - "require": { - "automattic/jetpack-status": "^2.1.2", - "php": ">=7.0" - }, - "require-dev": { - "automattic/jetpack-changelogger": "^4.1.1", - "brain/monkey": "2.6.1", - "yoast/phpunit-polyfills": "1.1.0" - }, - "suggest": { - "automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package." - }, - "time": "2024-03-12T22:00:44+00:00", - "type": "jetpack-library", - "extra": { - "autotagger": true, - "mirror-repo": "Automattic/jetpack-redirect", - "changelogger": { - "link-template": "https://github.com/Automattic/jetpack-redirect/compare/v${old}...v${new}" - }, - "branch-alias": { - "dev-trunk": "2.0.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "GPL-2.0-or-later" - ], - "description": "Utilities to build URLs to the jetpack.com/redirect/ service", - "support": { - "source": "https://github.com/Automattic/jetpack-redirect/tree/v2.0.1" - }, - "install-path": "../../jetpack_vendor/automattic/jetpack-redirect" - }, - { - "name": "automattic/jetpack-roles", - "version": "v2.0.1", - "version_normalized": "2.0.1.0", - "source": { - "type": "git", - "url": "https://github.com/Automattic/jetpack-roles.git", - "reference": "a9b52f59a3c32b6413e6aa859a6a964ba969eec9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Automattic/jetpack-roles/zipball/a9b52f59a3c32b6413e6aa859a6a964ba969eec9", - "reference": "a9b52f59a3c32b6413e6aa859a6a964ba969eec9", - "shasum": "" - }, - "require": { - "php": ">=7.0" - }, - "require-dev": { - "automattic/jetpack-changelogger": "^4.1.1", - "brain/monkey": "2.6.1", - "yoast/phpunit-polyfills": "1.1.0" - }, - "suggest": { - "automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package." - }, - "time": "2024-03-12T22:00:06+00:00", - "type": "jetpack-library", - "extra": { - "autotagger": true, - "mirror-repo": "Automattic/jetpack-roles", - "changelogger": { - "link-template": "https://github.com/Automattic/jetpack-roles/compare/v${old}...v${new}" - }, - "branch-alias": { - "dev-trunk": "2.0.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "GPL-2.0-or-later" - ], - "description": "Utilities, related with user roles and capabilities.", - "support": { - "source": "https://github.com/Automattic/jetpack-roles/tree/v2.0.1" - }, - "install-path": "../../jetpack_vendor/automattic/jetpack-roles" - }, - { - "name": "automattic/jetpack-status", - "version": "v2.1.2", - "version_normalized": "2.1.2.0", - "source": { - "type": "git", - "url": "https://github.com/Automattic/jetpack-status.git", - "reference": "a17f33f601303615f0b5e4cb9a23c0817243c68f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Automattic/jetpack-status/zipball/a17f33f601303615f0b5e4cb9a23c0817243c68f", - "reference": "a17f33f601303615f0b5e4cb9a23c0817243c68f", - "shasum": "" - }, - "require": { - "automattic/jetpack-constants": "^2.0.1", - "php": ">=7.0" - }, - "require-dev": { - "automattic/jetpack-changelogger": "^4.1.1", - "automattic/jetpack-ip": "^0.2.2", - "brain/monkey": "2.6.1", - "yoast/phpunit-polyfills": "1.1.0" - }, - "suggest": { - "automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package." - }, - "time": "2024-03-12T22:00:42+00:00", - "type": "jetpack-library", - "extra": { - "autotagger": true, - "mirror-repo": "Automattic/jetpack-status", - "changelogger": { - "link-template": "https://github.com/Automattic/jetpack-status/compare/v${old}...v${new}" - }, - "branch-alias": { - "dev-trunk": "2.1.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "GPL-2.0-or-later" - ], - "description": "Used to retrieve information about the current status of Jetpack and the site overall.", - "support": { - "source": "https://github.com/Automattic/jetpack-status/tree/v2.1.2" - }, - "install-path": "../../jetpack_vendor/automattic/jetpack-status" - }, - { - "name": "automattic/jetpack-sync", - "version": "v2.10.1", - "version_normalized": "2.10.1.0", - "source": { - "type": "git", - "url": "https://github.com/Automattic/jetpack-sync.git", - "reference": "805810d462b1b7b60142a645032a08cf3885d12f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Automattic/jetpack-sync/zipball/805810d462b1b7b60142a645032a08cf3885d12f", - "reference": "805810d462b1b7b60142a645032a08cf3885d12f", - "shasum": "" - }, - "require": { - "automattic/jetpack-connection": "^2.4.1", - "automattic/jetpack-constants": "^2.0.1", - "automattic/jetpack-identity-crisis": "^0.17.3", - "automattic/jetpack-ip": "^0.2.2", - "automattic/jetpack-password-checker": "^0.3.1", - "automattic/jetpack-roles": "^2.0.1", - "automattic/jetpack-status": "^2.1.2", - "php": ">=7.0" - }, - "require-dev": { - "automattic/jetpack-changelogger": "^4.1.1", - "automattic/wordbless": "@dev", - "yoast/phpunit-polyfills": "1.1.0" - }, - "suggest": { - "automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package." - }, - "time": "2024-03-14T20:43:53+00:00", - "type": "jetpack-library", - "extra": { - "autotagger": true, - "mirror-repo": "Automattic/jetpack-sync", - "textdomain": "jetpack-sync", - "version-constants": { - "::PACKAGE_VERSION": "src/class-package-version.php" - }, - "changelogger": { - "link-template": "https://github.com/Automattic/jetpack-sync/compare/v${old}...v${new}" - }, - "branch-alias": { - "dev-trunk": "2.10.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "GPL-2.0-or-later" - ], - "description": "Everything needed to allow syncing to the WP.com infrastructure.", - "support": { - "source": "https://github.com/Automattic/jetpack-sync/tree/v2.10.1" - }, - "install-path": "../../jetpack_vendor/automattic/jetpack-sync" - }, - { - "name": "automattic/jetpack-transport-helper", - "version": "v0.2.2", - "version_normalized": "0.2.2.0", - "source": { - "type": "git", - "url": "https://github.com/Automattic/jetpack-transport-helper.git", - "reference": "dc5a7d641140246790d5f2d956b81706fc0eb4d0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Automattic/jetpack-transport-helper/zipball/dc5a7d641140246790d5f2d956b81706fc0eb4d0", - "reference": "dc5a7d641140246790d5f2d956b81706fc0eb4d0", - "shasum": "" - }, - "require": { - "automattic/jetpack-backup-helper-script-manager": "^0.2.3", - "automattic/jetpack-connection": "^2.4.1", - "php": ">=7.0" - }, - "require-dev": { - "automattic/jetpack-changelogger": "^4.1.1", - "automattic/wordbless": "dev-master", - "yoast/phpunit-polyfills": "1.1.0" - }, - "suggest": { - "automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package." - }, - "time": "2024-03-19T16:16:04+00:00", - "type": "jetpack-library", - "extra": { - "mirror-repo": "Automattic/jetpack-transport-helper", - "version-constants": { - "::PACKAGE_VERSION": "src/class-package-version.php" - }, - "changelogger": { - "link-template": "https://github.com/Automattic/jetpack-transport-helper/compare/v${old}...v${new}" - }, - "autotagger": true, - "branch-alias": { - "dev-trunk": "0.2.x-dev" - }, - "textdomain": "jetpack-transport-helper" - }, - "installation-source": "dist", - "autoload": { - "files": [ - "actions.php" - ], - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "GPL-2.0-or-later" - ], - "description": "Package to help transport server communication", - "support": { - "source": "https://github.com/Automattic/jetpack-transport-helper/tree/v0.2.2" - }, - "install-path": "../../jetpack_vendor/automattic/jetpack-transport-helper" - }, - { - "name": "automattic/jetpack-waf", - "version": "v0.16.0.1", - "version_normalized": "0.16.0.1", - "source": { - "type": "git", - "url": "https://github.com/Automattic/jetpack-waf.git", - "reference": "94e7c5db341b9d98d20e29fc3b1470b7d34ee6d9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Automattic/jetpack-waf/zipball/94e7c5db341b9d98d20e29fc3b1470b7d34ee6d9", - "reference": "94e7c5db341b9d98d20e29fc3b1470b7d34ee6d9", - "shasum": "" - }, - "require": { - "automattic/jetpack-connection": "^2.4.1", - "automattic/jetpack-constants": "^2.0.1", - "automattic/jetpack-ip": "^0.2.2", - "automattic/jetpack-status": "^2.1.2", - "php": ">=7.0", - "wikimedia/aho-corasick": "^1.0" - }, - "require-dev": { - "automattic/jetpack-changelogger": "^4.1.1", - "automattic/wordbless": "@dev", - "yoast/phpunit-polyfills": "1.1.0" - }, - "suggest": { - "automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package." - }, - "time": "2024-04-10T19:00:29+00:00", - "type": "jetpack-library", - "extra": { - "autotagger": true, - "mirror-repo": "Automattic/jetpack-waf", - "textdomain": "jetpack-waf", - "changelogger": { - "link-template": "https://github.com/Automattic/jetpack-waf/compare/v${old}...v${new}" - }, - "branch-alias": { - "dev-trunk": "0.16.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "files": [ - "cli.php" - ], - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "GPL-2.0-or-later" - ], - "description": "Tools to assist with the Jetpack Web Application Firewall", - "support": { - "source": "https://github.com/Automattic/jetpack-waf/tree/v0.16.0.1" - }, - "install-path": "../../jetpack_vendor/automattic/jetpack-waf" - }, - { - "name": "wikimedia/aho-corasick", - "version": "v1.0.1", - "version_normalized": "1.0.1.0", - "source": { - "type": "git", - "url": "https://github.com/wikimedia/AhoCorasick.git", - "reference": "2f3a1bd765913637a66eade658d11d82f0e551be" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/wikimedia/AhoCorasick/zipball/2f3a1bd765913637a66eade658d11d82f0e551be", - "reference": "2f3a1bd765913637a66eade658d11d82f0e551be", - "shasum": "" - }, - "require": { - "php": ">=5.5.9" - }, - "require-dev": { - "jakub-onderka/php-console-highlighter": "0.3.2", - "jakub-onderka/php-parallel-lint": "1.0.0", - "mediawiki/mediawiki-codesniffer": "18.0.0", - "mediawiki/minus-x": "0.3.1", - "phpunit/phpunit": "4.8.36 || ^6.5" - }, - "time": "2018-05-01T18:13:32+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "Apache-2.0" - ], - "authors": [ - { - "name": "Ori Livneh", - "email": "ori@wikimedia.org" - } - ], - "description": "An implementation of the Aho-Corasick string matching algorithm.", - "homepage": "https://gerrit.wikimedia.org/g/AhoCorasick", - "keywords": [ - "ahocorasick", - "matcher" - ], - "support": { - "source": "https://github.com/wikimedia/AhoCorasick/tree/v1.0.1" - }, - "install-path": "../wikimedia/aho-corasick" - } - ], - "dev": false, - "dev-package-names": [] -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/vendor/composer/installed.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/vendor/composer/installed.php deleted file mode 100644 index 6b0d66fc..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/vendor/composer/installed.php +++ /dev/null @@ -1,275 +0,0 @@ - array( - 'name' => 'automattic/jetpack-protect', - 'pretty_version' => 'dev-trunk', - 'version' => 'dev-trunk', - 'reference' => null, - 'type' => 'wordpress-plugin', - 'install_path' => __DIR__ . '/../../', - 'aliases' => array(), - 'dev' => false, - ), - 'versions' => array( - 'automattic/jetpack-a8c-mc-stats' => array( - 'pretty_version' => 'v2.0.1', - 'version' => '2.0.1.0', - 'reference' => '64748d02bf646e6b000f79dc8e4ea127bbd8df14', - 'type' => 'jetpack-library', - 'install_path' => __DIR__ . '/../../jetpack_vendor/automattic/jetpack-a8c-mc-stats', - 'aliases' => array(), - 'dev_requirement' => false, - ), - 'automattic/jetpack-admin-ui' => array( - 'pretty_version' => 'v0.4.1', - 'version' => '0.4.1.0', - 'reference' => '253a2ef6b07e933953673ece4a283bbe821a3079', - 'type' => 'jetpack-library', - 'install_path' => __DIR__ . '/../../jetpack_vendor/automattic/jetpack-admin-ui', - 'aliases' => array(), - 'dev_requirement' => false, - ), - 'automattic/jetpack-assets' => array( - 'pretty_version' => 'v2.1.4', - 'version' => '2.1.4.0', - 'reference' => '06614b6daf1229002ca80dae982421c74c351a83', - 'type' => 'jetpack-library', - 'install_path' => __DIR__ . '/../../jetpack_vendor/automattic/jetpack-assets', - 'aliases' => array(), - 'dev_requirement' => false, - ), - 'automattic/jetpack-autoloader' => array( - 'pretty_version' => 'v3.0.3', - 'version' => '3.0.3.0', - 'reference' => '11466fe7fce66d30281d7402940969e673f545f2', - 'type' => 'composer-plugin', - 'install_path' => __DIR__ . '/../automattic/jetpack-autoloader', - 'aliases' => array(), - 'dev_requirement' => false, - ), - 'automattic/jetpack-backup-helper-script-manager' => array( - 'pretty_version' => 'v0.2.4', - 'version' => '0.2.4.0', - 'reference' => '83b172de688f647753f64e03adf4629f42d926c8', - 'type' => 'jetpack-library', - 'install_path' => __DIR__ . '/../../jetpack_vendor/automattic/jetpack-backup-helper-script-manager', - 'aliases' => array(), - 'dev_requirement' => false, - ), - 'automattic/jetpack-boost-core' => array( - 'pretty_version' => 'v0.2.5', - 'version' => '0.2.5.0', - 'reference' => '865ea45727b95e6604e563c7476fb4c26ea00fa5', - 'type' => 'jetpack-library', - 'install_path' => __DIR__ . '/../../jetpack_vendor/automattic/jetpack-boost-core', - 'aliases' => array(), - 'dev_requirement' => false, - ), - 'automattic/jetpack-boost-speed-score' => array( - 'pretty_version' => 'v0.3.7', - 'version' => '0.3.7.0', - 'reference' => '69e7246f2a43eb564553503a69f806bcf75acb11', - 'type' => 'jetpack-library', - 'install_path' => __DIR__ . '/../../jetpack_vendor/automattic/jetpack-boost-speed-score', - 'aliases' => array(), - 'dev_requirement' => false, - ), - 'automattic/jetpack-composer-plugin' => array( - 'pretty_version' => 'v2.0.1', - 'version' => '2.0.1.0', - 'reference' => '4c14db8b90c82b02b6530dacfc02f14e3432515b', - 'type' => 'composer-plugin', - 'install_path' => __DIR__ . '/../automattic/jetpack-composer-plugin', - 'aliases' => array(), - 'dev_requirement' => false, - ), - 'automattic/jetpack-config' => array( - 'pretty_version' => 'v2.0.1', - 'version' => '2.0.1.0', - 'reference' => 'a839ddad47511ecacf0ace0e8bc9fd06fded53ed', - 'type' => 'jetpack-library', - 'install_path' => __DIR__ . '/../../jetpack_vendor/automattic/jetpack-config', - 'aliases' => array(), - 'dev_requirement' => false, - ), - 'automattic/jetpack-connection' => array( - 'pretty_version' => 'v2.5.0', - 'version' => '2.5.0.0', - 'reference' => '2de22a7d75baa73e40b8a6601e18c4a866f3e6cc', - 'type' => 'jetpack-library', - 'install_path' => __DIR__ . '/../../jetpack_vendor/automattic/jetpack-connection', - 'aliases' => array(), - 'dev_requirement' => false, - ), - 'automattic/jetpack-constants' => array( - 'pretty_version' => 'v2.0.1', - 'version' => '2.0.1.0', - 'reference' => 'b159a8777450721a2e898a80930be1fdf59bae92', - 'type' => 'jetpack-library', - 'install_path' => __DIR__ . '/../../jetpack_vendor/automattic/jetpack-constants', - 'aliases' => array(), - 'dev_requirement' => false, - ), - 'automattic/jetpack-device-detection' => array( - 'pretty_version' => 'v2.1.2', - 'version' => '2.1.2.0', - 'reference' => '0a3f8c0f2c77dc2c73b212ac1563ca1feb0cf008', - 'type' => 'jetpack-library', - 'install_path' => __DIR__ . '/../../jetpack_vendor/automattic/jetpack-device-detection', - 'aliases' => array(), - 'dev_requirement' => false, - ), - 'automattic/jetpack-identity-crisis' => array( - 'pretty_version' => 'v0.17.3', - 'version' => '0.17.3.0', - 'reference' => 'fc4d46671d4476e0cf34ac4c9350456a692178d9', - 'type' => 'jetpack-library', - 'install_path' => __DIR__ . '/../../jetpack_vendor/automattic/jetpack-identity-crisis', - 'aliases' => array(), - 'dev_requirement' => false, - ), - 'automattic/jetpack-ip' => array( - 'pretty_version' => 'v0.2.2', - 'version' => '0.2.2.0', - 'reference' => 'b3efffb57901e236c3c1e7299b575563e1937013', - 'type' => 'jetpack-library', - 'install_path' => __DIR__ . '/../../jetpack_vendor/automattic/jetpack-ip', - 'aliases' => array(), - 'dev_requirement' => false, - ), - 'automattic/jetpack-jitm' => array( - 'pretty_version' => 'v3.1.1', - 'version' => '3.1.1.0', - 'reference' => 'b4823f23c1408bcd5625d37febb8efb8aeeaa310', - 'type' => 'jetpack-library', - 'install_path' => __DIR__ . '/../../jetpack_vendor/automattic/jetpack-jitm', - 'aliases' => array(), - 'dev_requirement' => false, - ), - 'automattic/jetpack-licensing' => array( - 'pretty_version' => 'v2.0.2', - 'version' => '2.0.2.0', - 'reference' => 'b7b036faecbe5f235594c49c1543deac55bbaa9c', - 'type' => 'jetpack-library', - 'install_path' => __DIR__ . '/../../jetpack_vendor/automattic/jetpack-licensing', - 'aliases' => array(), - 'dev_requirement' => false, - ), - 'automattic/jetpack-logo' => array( - 'pretty_version' => 'v2.0.2', - 'version' => '2.0.2.0', - 'reference' => '25a1824973439f6cbb1e4d9bb88cb7fdd9c83305', - 'type' => 'jetpack-library', - 'install_path' => __DIR__ . '/../../jetpack_vendor/automattic/jetpack-logo', - 'aliases' => array(), - 'dev_requirement' => false, - ), - 'automattic/jetpack-my-jetpack' => array( - 'pretty_version' => 'v4.17.0', - 'version' => '4.17.0.0', - 'reference' => '67a2fefac358eb6e6a3550e055a24c32ae06cb3a', - 'type' => 'jetpack-library', - 'install_path' => __DIR__ . '/../../jetpack_vendor/automattic/jetpack-my-jetpack', - 'aliases' => array(), - 'dev_requirement' => false, - ), - 'automattic/jetpack-password-checker' => array( - 'pretty_version' => 'v0.3.1', - 'version' => '0.3.1.0', - 'reference' => 'd9be23791e6f38debeacbf74174903f223ddfd89', - 'type' => 'jetpack-library', - 'install_path' => __DIR__ . '/../../jetpack_vendor/automattic/jetpack-password-checker', - 'aliases' => array(), - 'dev_requirement' => false, - ), - 'automattic/jetpack-plans' => array( - 'pretty_version' => 'v0.4.3', - 'version' => '0.4.3.0', - 'reference' => '25fb43e22e9fe691f4c1c9e9af8056c31d898359', - 'type' => 'library', - 'install_path' => __DIR__ . '/../automattic/jetpack-plans', - 'aliases' => array(), - 'dev_requirement' => false, - ), - 'automattic/jetpack-plugins-installer' => array( - 'pretty_version' => 'v0.3.2', - 'version' => '0.3.2.0', - 'reference' => 'b08aa508da4cb29d89bcfe131cbc170293ff8a1a', - 'type' => 'jetpack-library', - 'install_path' => __DIR__ . '/../../jetpack_vendor/automattic/jetpack-plugins-installer', - 'aliases' => array(), - 'dev_requirement' => false, - ), - 'automattic/jetpack-protect' => array( - 'pretty_version' => 'dev-trunk', - 'version' => 'dev-trunk', - 'reference' => null, - 'type' => 'wordpress-plugin', - 'install_path' => __DIR__ . '/../../', - 'aliases' => array(), - 'dev_requirement' => false, - ), - 'automattic/jetpack-redirect' => array( - 'pretty_version' => 'v2.0.1', - 'version' => '2.0.1.0', - 'reference' => '24742b555faf49ec811e263653da898184c72366', - 'type' => 'jetpack-library', - 'install_path' => __DIR__ . '/../../jetpack_vendor/automattic/jetpack-redirect', - 'aliases' => array(), - 'dev_requirement' => false, - ), - 'automattic/jetpack-roles' => array( - 'pretty_version' => 'v2.0.1', - 'version' => '2.0.1.0', - 'reference' => 'a9b52f59a3c32b6413e6aa859a6a964ba969eec9', - 'type' => 'jetpack-library', - 'install_path' => __DIR__ . '/../../jetpack_vendor/automattic/jetpack-roles', - 'aliases' => array(), - 'dev_requirement' => false, - ), - 'automattic/jetpack-status' => array( - 'pretty_version' => 'v2.1.2', - 'version' => '2.1.2.0', - 'reference' => 'a17f33f601303615f0b5e4cb9a23c0817243c68f', - 'type' => 'jetpack-library', - 'install_path' => __DIR__ . '/../../jetpack_vendor/automattic/jetpack-status', - 'aliases' => array(), - 'dev_requirement' => false, - ), - 'automattic/jetpack-sync' => array( - 'pretty_version' => 'v2.10.1', - 'version' => '2.10.1.0', - 'reference' => '805810d462b1b7b60142a645032a08cf3885d12f', - 'type' => 'jetpack-library', - 'install_path' => __DIR__ . '/../../jetpack_vendor/automattic/jetpack-sync', - 'aliases' => array(), - 'dev_requirement' => false, - ), - 'automattic/jetpack-transport-helper' => array( - 'pretty_version' => 'v0.2.2', - 'version' => '0.2.2.0', - 'reference' => 'dc5a7d641140246790d5f2d956b81706fc0eb4d0', - 'type' => 'jetpack-library', - 'install_path' => __DIR__ . '/../../jetpack_vendor/automattic/jetpack-transport-helper', - 'aliases' => array(), - 'dev_requirement' => false, - ), - 'automattic/jetpack-waf' => array( - 'pretty_version' => 'v0.16.0.1', - 'version' => '0.16.0.1', - 'reference' => '94e7c5db341b9d98d20e29fc3b1470b7d34ee6d9', - 'type' => 'jetpack-library', - 'install_path' => __DIR__ . '/../../jetpack_vendor/automattic/jetpack-waf', - 'aliases' => array(), - 'dev_requirement' => false, - ), - 'wikimedia/aho-corasick' => array( - 'pretty_version' => 'v1.0.1', - 'version' => '1.0.1.0', - 'reference' => '2f3a1bd765913637a66eade658d11d82f0e551be', - 'type' => 'library', - 'install_path' => __DIR__ . '/../wikimedia/aho-corasick', - 'aliases' => array(), - 'dev_requirement' => false, - ), - ), -); diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/vendor/composer/jetpack_autoload_classmap.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/vendor/composer/jetpack_autoload_classmap.php deleted file mode 100644 index c43b69d1..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/vendor/composer/jetpack_autoload_classmap.php +++ /dev/null @@ -1,937 +0,0 @@ - array( - 'version' => '1.0.1.0', - 'path' => $vendorDir . '/wikimedia/aho-corasick/src/MultiStringMatcher.php' - ), - 'AhoCorasick\\MultiStringReplacer' => array( - 'version' => '1.0.1.0', - 'path' => $vendorDir . '/wikimedia/aho-corasick/src/MultiStringReplacer.php' - ), - 'Autoloader' => array( - 'version' => '3.0.3', - 'path' => $vendorDir . '/automattic/jetpack-autoloader/src/class-autoloader.php' - ), - 'Autoloader_Handler' => array( - 'version' => '3.0.3', - 'path' => $vendorDir . '/automattic/jetpack-autoloader/src/class-autoloader-handler.php' - ), - 'Autoloader_Locator' => array( - 'version' => '3.0.3', - 'path' => $vendorDir . '/automattic/jetpack-autoloader/src/class-autoloader-locator.php' - ), - 'Automattic\\Jetpack\\A8c_Mc_Stats' => array( - 'version' => '2.0.1.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-a8c-mc-stats/src/class-a8c-mc-stats.php' - ), - 'Automattic\\Jetpack\\Admin_UI\\Admin_Menu' => array( - 'version' => '0.4.1.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-admin-ui/src/class-admin-menu.php' - ), - 'Automattic\\Jetpack\\Assets' => array( - 'version' => '2.1.4.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-assets/src/class-assets.php' - ), - 'Automattic\\Jetpack\\Assets\\Logo' => array( - 'version' => '2.0.2.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-logo/src/class-logo.php' - ), - 'Automattic\\Jetpack\\Assets\\Semver' => array( - 'version' => '2.1.4.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-assets/src/class-semver.php' - ), - 'Automattic\\Jetpack\\Autoloader\\AutoloadFileWriter' => array( - 'version' => '3.0.3', - 'path' => $vendorDir . '/automattic/jetpack-autoloader/src/AutoloadFileWriter.php' - ), - 'Automattic\\Jetpack\\Autoloader\\AutoloadGenerator' => array( - 'version' => '3.0.3', - 'path' => $vendorDir . '/automattic/jetpack-autoloader/src/AutoloadGenerator.php' - ), - 'Automattic\\Jetpack\\Autoloader\\AutoloadProcessor' => array( - 'version' => '3.0.3', - 'path' => $vendorDir . '/automattic/jetpack-autoloader/src/AutoloadProcessor.php' - ), - 'Automattic\\Jetpack\\Autoloader\\CustomAutoloaderPlugin' => array( - 'version' => '3.0.3', - 'path' => $vendorDir . '/automattic/jetpack-autoloader/src/CustomAutoloaderPlugin.php' - ), - 'Automattic\\Jetpack\\Autoloader\\ManifestGenerator' => array( - 'version' => '3.0.3', - 'path' => $vendorDir . '/automattic/jetpack-autoloader/src/ManifestGenerator.php' - ), - 'Automattic\\Jetpack\\Automatic_Install_Skin' => array( - 'version' => '0.3.2.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-plugins-installer/src/class-automatic-install-skin.php' - ), - 'Automattic\\Jetpack\\Backup\\V0003\\Helper_Script_Manager' => array( - 'version' => '0.2.4.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-backup-helper-script-manager/src/class-helper-script-manager.php' - ), - 'Automattic\\Jetpack\\Backup\\V0003\\Helper_Script_Manager_Impl' => array( - 'version' => '0.2.4.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-backup-helper-script-manager/src/class-helper-script-manager-impl.php' - ), - 'Automattic\\Jetpack\\Backup\\V0003\\Throw_On_Errors' => array( - 'version' => '0.2.4.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-backup-helper-script-manager/src/class-throw-on-errors.php' - ), - 'Automattic\\Jetpack\\Boost_Core\\Contracts\\Boost_API_Client' => array( - 'version' => '0.2.5.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-boost-core/src/contracts/boost-api-client.php' - ), - 'Automattic\\Jetpack\\Boost_Core\\Lib\\Boost_API' => array( - 'version' => '0.2.5.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-boost-core/src/lib/class-boost-api.php' - ), - 'Automattic\\Jetpack\\Boost_Core\\Lib\\Cacheable' => array( - 'version' => '0.2.5.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-boost-core/src/lib/class-cacheable.php' - ), - 'Automattic\\Jetpack\\Boost_Core\\Lib\\Transient' => array( - 'version' => '0.2.5.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-boost-core/src/lib/class-transient.php' - ), - 'Automattic\\Jetpack\\Boost_Core\\Lib\\Url' => array( - 'version' => '0.2.5.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-boost-core/src/lib/class-url.php' - ), - 'Automattic\\Jetpack\\Boost_Core\\Lib\\Utils' => array( - 'version' => '0.2.5.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-boost-core/src/lib/class-utils.php' - ), - 'Automattic\\Jetpack\\Boost_Core\\Lib\\WPCOM_Boost_API_Client' => array( - 'version' => '0.2.5.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-boost-core/src/lib/class-wpcom-boost-api-client.php' - ), - 'Automattic\\Jetpack\\Boost_Speed_Score\\Jetpack_Boost_Modules' => array( - 'version' => '0.3.7.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-boost-speed-score/src/class-jetpack-boost-modules.php' - ), - 'Automattic\\Jetpack\\Boost_Speed_Score\\Speed_Score' => array( - 'version' => '0.3.7.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-boost-speed-score/src/class-speed-score.php' - ), - 'Automattic\\Jetpack\\Boost_Speed_Score\\Speed_Score_Graph_History_Request' => array( - 'version' => '0.3.7.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-boost-speed-score/src/class-speed-score-graph-history-request.php' - ), - 'Automattic\\Jetpack\\Boost_Speed_Score\\Speed_Score_History' => array( - 'version' => '0.3.7.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-boost-speed-score/src/class-speed-score-history.php' - ), - 'Automattic\\Jetpack\\Boost_Speed_Score\\Speed_Score_Request' => array( - 'version' => '0.3.7.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-boost-speed-score/src/class-speed-score-request.php' - ), - 'Automattic\\Jetpack\\Composer\\Manager' => array( - 'version' => '2.0.1.0', - 'path' => $vendorDir . '/automattic/jetpack-composer-plugin/src/class-manager.php' - ), - 'Automattic\\Jetpack\\Composer\\Plugin' => array( - 'version' => '2.0.1.0', - 'path' => $vendorDir . '/automattic/jetpack-composer-plugin/src/class-plugin.php' - ), - 'Automattic\\Jetpack\\Config' => array( - 'version' => '2.0.1.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-config/src/class-config.php' - ), - 'Automattic\\Jetpack\\Connection\\Client' => array( - 'version' => '2.5.0.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/src/class-client.php' - ), - 'Automattic\\Jetpack\\Connection\\Connection_Notice' => array( - 'version' => '2.5.0.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/src/class-connection-notice.php' - ), - 'Automattic\\Jetpack\\Connection\\Error_Handler' => array( - 'version' => '2.5.0.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/src/class-error-handler.php' - ), - 'Automattic\\Jetpack\\Connection\\Initial_State' => array( - 'version' => '2.5.0.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/src/class-initial-state.php' - ), - 'Automattic\\Jetpack\\Connection\\Manager' => array( - 'version' => '2.5.0.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/src/class-manager.php' - ), - 'Automattic\\Jetpack\\Connection\\Manager_Interface' => array( - 'version' => '2.5.0.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/src/interface-manager.php' - ), - 'Automattic\\Jetpack\\Connection\\Nonce_Handler' => array( - 'version' => '2.5.0.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/src/class-nonce-handler.php' - ), - 'Automattic\\Jetpack\\Connection\\Package_Version' => array( - 'version' => '2.5.0.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/src/class-package-version.php' - ), - 'Automattic\\Jetpack\\Connection\\Package_Version_Tracker' => array( - 'version' => '2.5.0.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/src/class-package-version-tracker.php' - ), - 'Automattic\\Jetpack\\Connection\\Plugin' => array( - 'version' => '2.5.0.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/src/class-plugin.php' - ), - 'Automattic\\Jetpack\\Connection\\Plugin_Storage' => array( - 'version' => '2.5.0.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/src/class-plugin-storage.php' - ), - 'Automattic\\Jetpack\\Connection\\REST_Connector' => array( - 'version' => '2.5.0.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/src/class-rest-connector.php' - ), - 'Automattic\\Jetpack\\Connection\\Rest_Authentication' => array( - 'version' => '2.5.0.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/src/class-rest-authentication.php' - ), - 'Automattic\\Jetpack\\Connection\\Secrets' => array( - 'version' => '2.5.0.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/src/class-secrets.php' - ), - 'Automattic\\Jetpack\\Connection\\Server_Sandbox' => array( - 'version' => '2.5.0.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/src/class-server-sandbox.php' - ), - 'Automattic\\Jetpack\\Connection\\Tokens' => array( - 'version' => '2.5.0.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/src/class-tokens.php' - ), - 'Automattic\\Jetpack\\Connection\\Tokens_Locks' => array( - 'version' => '2.5.0.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/src/class-tokens-locks.php' - ), - 'Automattic\\Jetpack\\Connection\\Urls' => array( - 'version' => '2.5.0.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/src/class-urls.php' - ), - 'Automattic\\Jetpack\\Connection\\Utils' => array( - 'version' => '2.5.0.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/src/class-utils.php' - ), - 'Automattic\\Jetpack\\Connection\\Webhooks' => array( - 'version' => '2.5.0.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/src/class-webhooks.php' - ), - 'Automattic\\Jetpack\\Connection\\Webhooks\\Authorize_Redirect' => array( - 'version' => '2.5.0.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/src/webhooks/class-authorize-redirect.php' - ), - 'Automattic\\Jetpack\\Connection\\XMLRPC_Async_Call' => array( - 'version' => '2.5.0.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/src/class-xmlrpc-async-call.php' - ), - 'Automattic\\Jetpack\\Connection\\XMLRPC_Connector' => array( - 'version' => '2.5.0.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/src/class-xmlrpc-connector.php' - ), - 'Automattic\\Jetpack\\Constants' => array( - 'version' => '2.0.1.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-constants/src/class-constants.php' - ), - 'Automattic\\Jetpack\\CookieState' => array( - 'version' => '2.1.2.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-status/src/class-cookiestate.php' - ), - 'Automattic\\Jetpack\\Current_Plan' => array( - 'version' => '0.4.3.0', - 'path' => $vendorDir . '/automattic/jetpack-plans/src/class-current-plan.php' - ), - 'Automattic\\Jetpack\\Device_Detection' => array( - 'version' => '2.1.2.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-device-detection/src/class-device-detection.php' - ), - 'Automattic\\Jetpack\\Device_Detection\\User_Agent_Info' => array( - 'version' => '2.1.2.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-device-detection/src/class-user-agent-info.php' - ), - 'Automattic\\Jetpack\\Errors' => array( - 'version' => '2.1.2.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-status/src/class-errors.php' - ), - 'Automattic\\Jetpack\\Files' => array( - 'version' => '2.1.2.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-status/src/class-files.php' - ), - 'Automattic\\Jetpack\\Heartbeat' => array( - 'version' => '2.5.0.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/src/class-heartbeat.php' - ), - 'Automattic\\Jetpack\\IP\\Utils' => array( - 'version' => '0.2.2.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-ip/src/class-utils.php' - ), - 'Automattic\\Jetpack\\IdentityCrisis\\Exception' => array( - 'version' => '0.17.3.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-identity-crisis/src/class-exception.php' - ), - 'Automattic\\Jetpack\\IdentityCrisis\\REST_Endpoints' => array( - 'version' => '0.17.3.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-identity-crisis/src/class-rest-endpoints.php' - ), - 'Automattic\\Jetpack\\IdentityCrisis\\UI' => array( - 'version' => '0.17.3.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-identity-crisis/src/class-ui.php' - ), - 'Automattic\\Jetpack\\IdentityCrisis\\URL_Secret' => array( - 'version' => '0.17.3.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-identity-crisis/src/class-url-secret.php' - ), - 'Automattic\\Jetpack\\Identity_Crisis' => array( - 'version' => '0.17.3.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-identity-crisis/src/class-identity-crisis.php' - ), - 'Automattic\\Jetpack\\JITMS\\JITM' => array( - 'version' => '3.1.1.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-jitm/src/class-jitm.php' - ), - 'Automattic\\Jetpack\\JITMS\\Post_Connection_JITM' => array( - 'version' => '3.1.1.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-jitm/src/class-post-connection-jitm.php' - ), - 'Automattic\\Jetpack\\JITMS\\Pre_Connection_JITM' => array( - 'version' => '3.1.1.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-jitm/src/class-pre-connection-jitm.php' - ), - 'Automattic\\Jetpack\\JITMS\\Rest_Api_Endpoints' => array( - 'version' => '3.1.1.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-jitm/src/class-rest-api-endpoints.php' - ), - 'Automattic\\Jetpack\\Licensing' => array( - 'version' => '2.0.2.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-licensing/src/class-licensing.php' - ), - 'Automattic\\Jetpack\\Licensing\\Endpoints' => array( - 'version' => '2.0.2.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-licensing/src/class-endpoints.php' - ), - 'Automattic\\Jetpack\\Modules' => array( - 'version' => '2.1.2.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-status/src/class-modules.php' - ), - 'Automattic\\Jetpack\\My_Jetpack\\Activitylog' => array( - 'version' => '4.17.0.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-activitylog.php' - ), - 'Automattic\\Jetpack\\My_Jetpack\\Hybrid_Product' => array( - 'version' => '4.17.0.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-hybrid-product.php' - ), - 'Automattic\\Jetpack\\My_Jetpack\\Initializer' => array( - 'version' => '4.17.0.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-initializer.php' - ), - 'Automattic\\Jetpack\\My_Jetpack\\Jetpack_Manage' => array( - 'version' => '4.17.0.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-jetpack-manage.php' - ), - 'Automattic\\Jetpack\\My_Jetpack\\Module_Product' => array( - 'version' => '4.17.0.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-module-product.php' - ), - 'Automattic\\Jetpack\\My_Jetpack\\Product' => array( - 'version' => '4.17.0.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-product.php' - ), - 'Automattic\\Jetpack\\My_Jetpack\\Products' => array( - 'version' => '4.17.0.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-products.php' - ), - 'Automattic\\Jetpack\\My_Jetpack\\Products\\Anti_Spam' => array( - 'version' => '4.17.0.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-anti-spam.php' - ), - 'Automattic\\Jetpack\\My_Jetpack\\Products\\Backup' => array( - 'version' => '4.17.0.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-backup.php' - ), - 'Automattic\\Jetpack\\My_Jetpack\\Products\\Boost' => array( - 'version' => '4.17.0.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-boost.php' - ), - 'Automattic\\Jetpack\\My_Jetpack\\Products\\Creator' => array( - 'version' => '4.17.0.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-creator.php' - ), - 'Automattic\\Jetpack\\My_Jetpack\\Products\\Crm' => array( - 'version' => '4.17.0.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-crm.php' - ), - 'Automattic\\Jetpack\\My_Jetpack\\Products\\Extras' => array( - 'version' => '4.17.0.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-extras.php' - ), - 'Automattic\\Jetpack\\My_Jetpack\\Products\\Jetpack_Ai' => array( - 'version' => '4.17.0.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-jetpack-ai.php' - ), - 'Automattic\\Jetpack\\My_Jetpack\\Products\\Protect' => array( - 'version' => '4.17.0.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-protect.php' - ), - 'Automattic\\Jetpack\\My_Jetpack\\Products\\Scan' => array( - 'version' => '4.17.0.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-scan.php' - ), - 'Automattic\\Jetpack\\My_Jetpack\\Products\\Search' => array( - 'version' => '4.17.0.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-search.php' - ), - 'Automattic\\Jetpack\\My_Jetpack\\Products\\Search_Stats' => array( - 'version' => '4.17.0.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-search-stats.php' - ), - 'Automattic\\Jetpack\\My_Jetpack\\Products\\Security' => array( - 'version' => '4.17.0.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-security.php' - ), - 'Automattic\\Jetpack\\My_Jetpack\\Products\\Social' => array( - 'version' => '4.17.0.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-social.php' - ), - 'Automattic\\Jetpack\\My_Jetpack\\Products\\Starter' => array( - 'version' => '4.17.0.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-starter.php' - ), - 'Automattic\\Jetpack\\My_Jetpack\\Products\\Stats' => array( - 'version' => '4.17.0.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-stats.php' - ), - 'Automattic\\Jetpack\\My_Jetpack\\Products\\Videopress' => array( - 'version' => '4.17.0.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-videopress.php' - ), - 'Automattic\\Jetpack\\My_Jetpack\\REST_AI' => array( - 'version' => '4.17.0.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-rest-ai.php' - ), - 'Automattic\\Jetpack\\My_Jetpack\\REST_Product_Data' => array( - 'version' => '4.17.0.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-rest-product-data.php' - ), - 'Automattic\\Jetpack\\My_Jetpack\\REST_Products' => array( - 'version' => '4.17.0.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-rest-products.php' - ), - 'Automattic\\Jetpack\\My_Jetpack\\REST_Purchases' => array( - 'version' => '4.17.0.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-rest-purchases.php' - ), - 'Automattic\\Jetpack\\My_Jetpack\\REST_Zendesk_Chat' => array( - 'version' => '4.17.0.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-rest-zendesk-chat.php' - ), - 'Automattic\\Jetpack\\My_Jetpack\\Wpcom_Products' => array( - 'version' => '4.17.0.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-wpcom-products.php' - ), - 'Automattic\\Jetpack\\Partner' => array( - 'version' => '2.5.0.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/src/class-partner.php' - ), - 'Automattic\\Jetpack\\Partner_Coupon' => array( - 'version' => '2.5.0.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/src/class-partner-coupon.php' - ), - 'Automattic\\Jetpack\\Password_Checker' => array( - 'version' => '0.3.1.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-password-checker/src/class-password-checker.php' - ), - 'Automattic\\Jetpack\\Paths' => array( - 'version' => '2.1.2.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-status/src/class-paths.php' - ), - 'Automattic\\Jetpack\\Plans' => array( - 'version' => '0.4.3.0', - 'path' => $vendorDir . '/automattic/jetpack-plans/src/class-plans.php' - ), - 'Automattic\\Jetpack\\Plugins_Installer' => array( - 'version' => '0.3.2.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-plugins-installer/src/class-plugins-installer.php' - ), - 'Automattic\\Jetpack\\Protect\\Credentials' => array( - 'version' => 'dev-trunk', - 'path' => $baseDir . '/src/class-credentials.php' - ), - 'Automattic\\Jetpack\\Protect\\Extension_Model' => array( - 'version' => 'dev-trunk', - 'path' => $baseDir . '/src/models/class-extension-model.php' - ), - 'Automattic\\Jetpack\\Protect\\Onboarding' => array( - 'version' => 'dev-trunk', - 'path' => $baseDir . '/src/class-onboarding.php' - ), - 'Automattic\\Jetpack\\Protect\\Plan' => array( - 'version' => 'dev-trunk', - 'path' => $baseDir . '/src/class-plan.php' - ), - 'Automattic\\Jetpack\\Protect\\Protect_Status' => array( - 'version' => 'dev-trunk', - 'path' => $baseDir . '/src/class-protect-status.php' - ), - 'Automattic\\Jetpack\\Protect\\REST_Controller' => array( - 'version' => 'dev-trunk', - 'path' => $baseDir . '/src/class-rest-controller.php' - ), - 'Automattic\\Jetpack\\Protect\\Scan_Status' => array( - 'version' => 'dev-trunk', - 'path' => $baseDir . '/src/class-scan-status.php' - ), - 'Automattic\\Jetpack\\Protect\\Site_Health' => array( - 'version' => 'dev-trunk', - 'path' => $baseDir . '/src/class-site-health.php' - ), - 'Automattic\\Jetpack\\Protect\\Status' => array( - 'version' => 'dev-trunk', - 'path' => $baseDir . '/src/class-status.php' - ), - 'Automattic\\Jetpack\\Protect\\Status_Model' => array( - 'version' => 'dev-trunk', - 'path' => $baseDir . '/src/models/class-status-model.php' - ), - 'Automattic\\Jetpack\\Protect\\Threat_Model' => array( - 'version' => 'dev-trunk', - 'path' => $baseDir . '/src/models/class-threat-model.php' - ), - 'Automattic\\Jetpack\\Protect\\Threats' => array( - 'version' => 'dev-trunk', - 'path' => $baseDir . '/src/class-threats.php' - ), - 'Automattic\\Jetpack\\Redirect' => array( - 'version' => '2.0.1.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-redirect/src/class-redirect.php' - ), - 'Automattic\\Jetpack\\Roles' => array( - 'version' => '2.0.1.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-roles/src/class-roles.php' - ), - 'Automattic\\Jetpack\\Status' => array( - 'version' => '2.1.2.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-status/src/class-status.php' - ), - 'Automattic\\Jetpack\\Status\\Cache' => array( - 'version' => '2.1.2.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-status/src/class-cache.php' - ), - 'Automattic\\Jetpack\\Status\\Host' => array( - 'version' => '2.1.2.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-status/src/class-host.php' - ), - 'Automattic\\Jetpack\\Status\\Visitor' => array( - 'version' => '2.1.2.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-status/src/class-visitor.php' - ), - 'Automattic\\Jetpack\\Sync\\Actions' => array( - 'version' => '2.10.1.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/class-actions.php' - ), - 'Automattic\\Jetpack\\Sync\\Codec_Interface' => array( - 'version' => '2.10.1.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/interface-codec.php' - ), - 'Automattic\\Jetpack\\Sync\\Data_Settings' => array( - 'version' => '2.10.1.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/class-data-settings.php' - ), - 'Automattic\\Jetpack\\Sync\\Dedicated_Sender' => array( - 'version' => '2.10.1.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/class-dedicated-sender.php' - ), - 'Automattic\\Jetpack\\Sync\\Default_Filter_Settings' => array( - 'version' => '2.10.1.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/class-default-filter-settings.php' - ), - 'Automattic\\Jetpack\\Sync\\Defaults' => array( - 'version' => '2.10.1.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/class-defaults.php' - ), - 'Automattic\\Jetpack\\Sync\\Functions' => array( - 'version' => '2.10.1.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/class-functions.php' - ), - 'Automattic\\Jetpack\\Sync\\Health' => array( - 'version' => '2.10.1.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/class-health.php' - ), - 'Automattic\\Jetpack\\Sync\\JSON_Deflate_Array_Codec' => array( - 'version' => '2.10.1.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/class-json-deflate-array-codec.php' - ), - 'Automattic\\Jetpack\\Sync\\Listener' => array( - 'version' => '2.10.1.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/class-listener.php' - ), - 'Automattic\\Jetpack\\Sync\\Lock' => array( - 'version' => '2.10.1.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/class-lock.php' - ), - 'Automattic\\Jetpack\\Sync\\Main' => array( - 'version' => '2.10.1.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/class-main.php' - ), - 'Automattic\\Jetpack\\Sync\\Modules' => array( - 'version' => '2.10.1.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/class-modules.php' - ), - 'Automattic\\Jetpack\\Sync\\Modules\\Attachments' => array( - 'version' => '2.10.1.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/modules/class-attachments.php' - ), - 'Automattic\\Jetpack\\Sync\\Modules\\Callables' => array( - 'version' => '2.10.1.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/modules/class-callables.php' - ), - 'Automattic\\Jetpack\\Sync\\Modules\\Comments' => array( - 'version' => '2.10.1.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/modules/class-comments.php' - ), - 'Automattic\\Jetpack\\Sync\\Modules\\Constants' => array( - 'version' => '2.10.1.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/modules/class-constants.php' - ), - 'Automattic\\Jetpack\\Sync\\Modules\\Full_Sync' => array( - 'version' => '2.10.1.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/modules/class-full-sync.php' - ), - 'Automattic\\Jetpack\\Sync\\Modules\\Full_Sync_Immediately' => array( - 'version' => '2.10.1.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/modules/class-full-sync-immediately.php' - ), - 'Automattic\\Jetpack\\Sync\\Modules\\Import' => array( - 'version' => '2.10.1.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/modules/class-import.php' - ), - 'Automattic\\Jetpack\\Sync\\Modules\\Menus' => array( - 'version' => '2.10.1.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/modules/class-menus.php' - ), - 'Automattic\\Jetpack\\Sync\\Modules\\Meta' => array( - 'version' => '2.10.1.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/modules/class-meta.php' - ), - 'Automattic\\Jetpack\\Sync\\Modules\\Module' => array( - 'version' => '2.10.1.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/modules/class-module.php' - ), - 'Automattic\\Jetpack\\Sync\\Modules\\Network_Options' => array( - 'version' => '2.10.1.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/modules/class-network-options.php' - ), - 'Automattic\\Jetpack\\Sync\\Modules\\Options' => array( - 'version' => '2.10.1.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/modules/class-options.php' - ), - 'Automattic\\Jetpack\\Sync\\Modules\\Plugins' => array( - 'version' => '2.10.1.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/modules/class-plugins.php' - ), - 'Automattic\\Jetpack\\Sync\\Modules\\Posts' => array( - 'version' => '2.10.1.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/modules/class-posts.php' - ), - 'Automattic\\Jetpack\\Sync\\Modules\\Protect' => array( - 'version' => '2.10.1.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/modules/class-protect.php' - ), - 'Automattic\\Jetpack\\Sync\\Modules\\Search' => array( - 'version' => '2.10.1.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/modules/class-search.php' - ), - 'Automattic\\Jetpack\\Sync\\Modules\\Stats' => array( - 'version' => '2.10.1.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/modules/class-stats.php' - ), - 'Automattic\\Jetpack\\Sync\\Modules\\Term_Relationships' => array( - 'version' => '2.10.1.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/modules/class-term-relationships.php' - ), - 'Automattic\\Jetpack\\Sync\\Modules\\Terms' => array( - 'version' => '2.10.1.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/modules/class-terms.php' - ), - 'Automattic\\Jetpack\\Sync\\Modules\\Themes' => array( - 'version' => '2.10.1.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/modules/class-themes.php' - ), - 'Automattic\\Jetpack\\Sync\\Modules\\Updates' => array( - 'version' => '2.10.1.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/modules/class-updates.php' - ), - 'Automattic\\Jetpack\\Sync\\Modules\\Users' => array( - 'version' => '2.10.1.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/modules/class-users.php' - ), - 'Automattic\\Jetpack\\Sync\\Modules\\WP_Super_Cache' => array( - 'version' => '2.10.1.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/modules/class-wp-super-cache.php' - ), - 'Automattic\\Jetpack\\Sync\\Modules\\WooCommerce' => array( - 'version' => '2.10.1.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/modules/class-woocommerce.php' - ), - 'Automattic\\Jetpack\\Sync\\Modules\\WooCommerce_HPOS_Orders' => array( - 'version' => '2.10.1.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/modules/class-woocommerce-hpos-orders.php' - ), - 'Automattic\\Jetpack\\Sync\\Package_Version' => array( - 'version' => '2.10.1.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/class-package-version.php' - ), - 'Automattic\\Jetpack\\Sync\\Queue' => array( - 'version' => '2.10.1.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/class-queue.php' - ), - 'Automattic\\Jetpack\\Sync\\Queue\\Queue_Storage_Options' => array( - 'version' => '2.10.1.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/sync-queue/class-queue-storage-options.php' - ), - 'Automattic\\Jetpack\\Sync\\Queue\\Queue_Storage_Table' => array( - 'version' => '2.10.1.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/sync-queue/class-queue-storage-table.php' - ), - 'Automattic\\Jetpack\\Sync\\Queue_Buffer' => array( - 'version' => '2.10.1.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/class-queue-buffer.php' - ), - 'Automattic\\Jetpack\\Sync\\REST_Endpoints' => array( - 'version' => '2.10.1.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/class-rest-endpoints.php' - ), - 'Automattic\\Jetpack\\Sync\\REST_Sender' => array( - 'version' => '2.10.1.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/class-rest-sender.php' - ), - 'Automattic\\Jetpack\\Sync\\Replicastore' => array( - 'version' => '2.10.1.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/class-replicastore.php' - ), - 'Automattic\\Jetpack\\Sync\\Replicastore\\Table_Checksum' => array( - 'version' => '2.10.1.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/replicastore/class-table-checksum.php' - ), - 'Automattic\\Jetpack\\Sync\\Replicastore\\Table_Checksum_Usermeta' => array( - 'version' => '2.10.1.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/replicastore/class-table-checksum-usermeta.php' - ), - 'Automattic\\Jetpack\\Sync\\Replicastore\\Table_Checksum_Users' => array( - 'version' => '2.10.1.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/replicastore/class-table-checksum-users.php' - ), - 'Automattic\\Jetpack\\Sync\\Replicastore_Interface' => array( - 'version' => '2.10.1.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/interface-replicastore.php' - ), - 'Automattic\\Jetpack\\Sync\\Sender' => array( - 'version' => '2.10.1.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/class-sender.php' - ), - 'Automattic\\Jetpack\\Sync\\Server' => array( - 'version' => '2.10.1.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/class-server.php' - ), - 'Automattic\\Jetpack\\Sync\\Settings' => array( - 'version' => '2.10.1.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/class-settings.php' - ), - 'Automattic\\Jetpack\\Sync\\Simple_Codec' => array( - 'version' => '2.10.1.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/class-simple-codec.php' - ), - 'Automattic\\Jetpack\\Sync\\Users' => array( - 'version' => '2.10.1.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/class-users.php' - ), - 'Automattic\\Jetpack\\Sync\\Utils' => array( - 'version' => '2.10.1.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-sync/src/class-utils.php' - ), - 'Automattic\\Jetpack\\Terms_Of_Service' => array( - 'version' => '2.5.0.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/src/class-terms-of-service.php' - ), - 'Automattic\\Jetpack\\Tracking' => array( - 'version' => '2.5.0.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/src/class-tracking.php' - ), - 'Automattic\\Jetpack\\Transport_Helper\\Package_Version' => array( - 'version' => '0.2.2.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-transport-helper/src/class-package-version.php' - ), - 'Automattic\\Jetpack\\Transport_Helper\\V0001\\Package_Version' => array( - 'version' => '0.2.2.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-transport-helper/src/class-package-version-compat.php' - ), - 'Automattic\\Jetpack\\Transport_Helper\\V0003\\REST_Controller' => array( - 'version' => '0.2.2.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-transport-helper/src/class-rest-controller.php' - ), - 'Automattic\\Jetpack\\Waf\\Brute_Force_Protection\\Brute_Force_Protection' => array( - 'version' => '0.16.0.1', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-waf/src/class-brute-force-protection.php' - ), - 'Automattic\\Jetpack\\Waf\\Brute_Force_Protection\\Brute_Force_Protection_Blocked_Login_Page' => array( - 'version' => '0.16.0.1', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-waf/src/brute-force-protection/class-blocked-login-page.php' - ), - 'Automattic\\Jetpack\\Waf\\Brute_Force_Protection\\Brute_Force_Protection_Math_Authenticate' => array( - 'version' => '0.16.0.1', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-waf/src/brute-force-protection/class-math-fallback.php' - ), - 'Automattic\\Jetpack\\Waf\\Brute_Force_Protection\\Brute_Force_Protection_Shared_Functions' => array( - 'version' => '0.16.0.1', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-waf/src/brute-force-protection/class-shared-functions.php' - ), - 'Automattic\\Jetpack\\Waf\\Brute_Force_Protection\\Brute_Force_Protection_Transient_Cleanup' => array( - 'version' => '0.16.0.1', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-waf/src/brute-force-protection/class-transient-cleanup.php' - ), - 'Automattic\\Jetpack\\Waf\\CLI' => array( - 'version' => '0.16.0.1', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-waf/src/class-waf-cli.php' - ), - 'Automattic\\Jetpack\\Waf\\File_System_Exception' => array( - 'version' => '0.16.0.1', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-waf/src/exceptions/class-file-system-exception.php' - ), - 'Automattic\\Jetpack\\Waf\\REST_Controller' => array( - 'version' => '0.16.0.1', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-waf/src/class-rest-controller.php' - ), - 'Automattic\\Jetpack\\Waf\\Rules_API_Exception' => array( - 'version' => '0.16.0.1', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-waf/src/exceptions/class-rules-api-exception.php' - ), - 'Automattic\\Jetpack\\Waf\\Waf_Compatibility' => array( - 'version' => '0.16.0.1', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-waf/src/class-compatibility.php' - ), - 'Automattic\\Jetpack\\Waf\\Waf_Constants' => array( - 'version' => '0.16.0.1', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-waf/src/class-waf-constants.php' - ), - 'Automattic\\Jetpack\\Waf\\Waf_Exception' => array( - 'version' => '0.16.0.1', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-waf/src/exceptions/class-waf-exception.php' - ), - 'Automattic\\Jetpack\\Waf\\Waf_Initializer' => array( - 'version' => '0.16.0.1', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-waf/src/class-waf-initializer.php' - ), - 'Automattic\\Jetpack\\Waf\\Waf_Operators' => array( - 'version' => '0.16.0.1', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-waf/src/class-waf-operators.php' - ), - 'Automattic\\Jetpack\\Waf\\Waf_Request' => array( - 'version' => '0.16.0.1', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-waf/src/class-waf-request.php' - ), - 'Automattic\\Jetpack\\Waf\\Waf_Rules_Manager' => array( - 'version' => '0.16.0.1', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-waf/src/class-waf-rules-manager.php' - ), - 'Automattic\\Jetpack\\Waf\\Waf_Runner' => array( - 'version' => '0.16.0.1', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-waf/src/class-waf-runner.php' - ), - 'Automattic\\Jetpack\\Waf\\Waf_Runtime' => array( - 'version' => '0.16.0.1', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-waf/src/class-waf-runtime.php' - ), - 'Automattic\\Jetpack\\Waf\\Waf_Standalone_Bootstrap' => array( - 'version' => '0.16.0.1', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-waf/src/class-waf-standalone-bootstrap.php' - ), - 'Automattic\\Jetpack\\Waf\\Waf_Stats' => array( - 'version' => '0.16.0.1', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-waf/src/class-waf-stats.php' - ), - 'Automattic\\Jetpack\\Waf\\Waf_Transforms' => array( - 'version' => '0.16.0.1', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-waf/src/class-waf-transforms.php' - ), - 'Container' => array( - 'version' => '3.0.3', - 'path' => $vendorDir . '/automattic/jetpack-autoloader/src/class-container.php' - ), - 'Hook_Manager' => array( - 'version' => '3.0.3', - 'path' => $vendorDir . '/automattic/jetpack-autoloader/src/class-hook-manager.php' - ), - 'Jetpack_IXR_Client' => array( - 'version' => '2.5.0.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/legacy/class-jetpack-ixr-client.php' - ), - 'Jetpack_IXR_ClientMulticall' => array( - 'version' => '2.5.0.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/legacy/class-jetpack-ixr-clientmulticall.php' - ), - 'Jetpack_Options' => array( - 'version' => '2.5.0.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/legacy/class-jetpack-options.php' - ), - 'Jetpack_Protect' => array( - 'version' => 'dev-trunk', - 'path' => $baseDir . '/src/class-jetpack-protect.php' - ), - 'Jetpack_Signature' => array( - 'version' => '2.5.0.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/legacy/class-jetpack-signature.php' - ), - 'Jetpack_Tracks_Client' => array( - 'version' => '2.5.0.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/legacy/class-jetpack-tracks-client.php' - ), - 'Jetpack_Tracks_Event' => array( - 'version' => '2.5.0.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/legacy/class-jetpack-tracks-event.php' - ), - 'Jetpack_XMLRPC_Server' => array( - 'version' => '2.5.0.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-connection/legacy/class-jetpack-xmlrpc-server.php' - ), - 'Latest_Autoloader_Guard' => array( - 'version' => '3.0.3', - 'path' => $vendorDir . '/automattic/jetpack-autoloader/src/class-latest-autoloader-guard.php' - ), - 'Manifest_Reader' => array( - 'version' => '3.0.3', - 'path' => $vendorDir . '/automattic/jetpack-autoloader/src/class-manifest-reader.php' - ), - 'PHP_Autoloader' => array( - 'version' => '3.0.3', - 'path' => $vendorDir . '/automattic/jetpack-autoloader/src/class-php-autoloader.php' - ), - 'Path_Processor' => array( - 'version' => '3.0.3', - 'path' => $vendorDir . '/automattic/jetpack-autoloader/src/class-path-processor.php' - ), - 'Plugin_Locator' => array( - 'version' => '3.0.3', - 'path' => $vendorDir . '/automattic/jetpack-autoloader/src/class-plugin-locator.php' - ), - 'Plugins_Handler' => array( - 'version' => '3.0.3', - 'path' => $vendorDir . '/automattic/jetpack-autoloader/src/class-plugins-handler.php' - ), - 'Shutdown_Handler' => array( - 'version' => '3.0.3', - 'path' => $vendorDir . '/automattic/jetpack-autoloader/src/class-shutdown-handler.php' - ), - 'Version_Loader' => array( - 'version' => '3.0.3', - 'path' => $vendorDir . '/automattic/jetpack-autoloader/src/class-version-loader.php' - ), - 'Version_Selector' => array( - 'version' => '3.0.3', - 'path' => $vendorDir . '/automattic/jetpack-autoloader/src/class-version-selector.php' - ), -); diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/vendor/composer/jetpack_autoload_filemap.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/vendor/composer/jetpack_autoload_filemap.php deleted file mode 100644 index c6bda292..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/vendor/composer/jetpack_autoload_filemap.php +++ /dev/null @@ -1,21 +0,0 @@ - array( - 'version' => '2.1.4.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-assets/actions.php' - ), - '590147edb63acb03b2852d5c4db13ce8' => array( - 'version' => '0.2.2.0', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-transport-helper/actions.php' - ), - '3d45c7e6a7f0e71849e33afe4b3b3ede' => array( - 'version' => '0.16.0.1', - 'path' => $baseDir . '/jetpack_vendor/automattic/jetpack-waf/cli.php' - ), -); diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/vendor/jetpack-autoloader/class-autoloader-handler.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/vendor/jetpack-autoloader/class-autoloader-handler.php deleted file mode 100644 index adcc8f76..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/vendor/jetpack-autoloader/class-autoloader-handler.php +++ /dev/null @@ -1,147 +0,0 @@ -php_autoloader = $php_autoloader; - $this->hook_manager = $hook_manager; - $this->manifest_reader = $manifest_reader; - $this->version_selector = $version_selector; - } - - /** - * Checks to see whether or not an autoloader is currently in the process of initializing. - * - * @return bool - */ - public function is_initializing() { - // If no version has been set it means that no autoloader has started initializing yet. - global $jetpack_autoloader_latest_version; - if ( ! isset( $jetpack_autoloader_latest_version ) ) { - return false; - } - - // When the version is set but the classmap is not it ALWAYS means that this is the - // latest autoloader and is being included by an older one. - global $jetpack_packages_classmap; - if ( empty( $jetpack_packages_classmap ) ) { - return true; - } - - // Version 2.4.0 added a new global and altered the reset semantics. We need to check - // the other global as well since it may also point at initialization. - // Note: We don't need to check for the class first because every autoloader that - // will set the latest version global requires this class in the classmap. - $replacing_version = $jetpack_packages_classmap[ AutoloadGenerator::class ]['version']; - if ( $this->version_selector->is_dev_version( $replacing_version ) || version_compare( $replacing_version, '2.4.0.0', '>=' ) ) { - global $jetpack_autoloader_loader; - if ( ! isset( $jetpack_autoloader_loader ) ) { - return true; - } - } - - return false; - } - - /** - * Activates an autoloader using the given plugins and activates it. - * - * @param string[] $plugins The plugins to initialize the autoloader for. - */ - public function activate_autoloader( $plugins ) { - global $jetpack_packages_psr4; - $jetpack_packages_psr4 = array(); - $this->manifest_reader->read_manifests( $plugins, 'vendor/composer/jetpack_autoload_psr4.php', $jetpack_packages_psr4 ); - - global $jetpack_packages_classmap; - $jetpack_packages_classmap = array(); - $this->manifest_reader->read_manifests( $plugins, 'vendor/composer/jetpack_autoload_classmap.php', $jetpack_packages_classmap ); - - global $jetpack_packages_filemap; - $jetpack_packages_filemap = array(); - $this->manifest_reader->read_manifests( $plugins, 'vendor/composer/jetpack_autoload_filemap.php', $jetpack_packages_filemap ); - - $loader = new Version_Loader( - $this->version_selector, - $jetpack_packages_classmap, - $jetpack_packages_psr4, - $jetpack_packages_filemap - ); - - $this->php_autoloader->register_autoloader( $loader ); - - // Now that the autoloader is active we can load the filemap. - $loader->load_filemap(); - } - - /** - * Resets the active autoloader and all related global state. - */ - public function reset_autoloader() { - $this->php_autoloader->unregister_autoloader(); - $this->hook_manager->reset(); - - // Clear all of the autoloader globals so that older autoloaders don't do anything strange. - global $jetpack_autoloader_latest_version; - $jetpack_autoloader_latest_version = null; - - global $jetpack_packages_classmap; - $jetpack_packages_classmap = array(); // Must be array to avoid exceptions in old autoloaders! - - global $jetpack_packages_psr4; - $jetpack_packages_psr4 = array(); // Must be array to avoid exceptions in old autoloaders! - - global $jetpack_packages_filemap; - $jetpack_packages_filemap = array(); // Must be array to avoid exceptions in old autoloaders! - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/vendor/jetpack-autoloader/class-autoloader-locator.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/vendor/jetpack-autoloader/class-autoloader-locator.php deleted file mode 100644 index 1b6ff82b..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/vendor/jetpack-autoloader/class-autoloader-locator.php +++ /dev/null @@ -1,90 +0,0 @@ -version_selector = $version_selector; - } - - /** - * Finds the path to the plugin with the latest autoloader. - * - * @param array $plugin_paths An array of plugin paths. - * @param string $latest_version The latest version reference. - * - * @return string|null - */ - public function find_latest_autoloader( $plugin_paths, &$latest_version ) { - $latest_plugin = null; - - foreach ( $plugin_paths as $plugin_path ) { - $version = $this->get_autoloader_version( $plugin_path ); - if ( ! $this->version_selector->is_version_update_required( $latest_version, $version ) ) { - continue; - } - - $latest_version = $version; - $latest_plugin = $plugin_path; - } - - return $latest_plugin; - } - - /** - * Gets the path to the autoloader. - * - * @param string $plugin_path The path to the plugin. - * - * @return string - */ - public function get_autoloader_path( $plugin_path ) { - return trailingslashit( $plugin_path ) . 'vendor/autoload_packages.php'; - } - - /** - * Gets the version for the autoloader. - * - * @param string $plugin_path The path to the plugin. - * - * @return string|null - */ - public function get_autoloader_version( $plugin_path ) { - $classmap = trailingslashit( $plugin_path ) . 'vendor/composer/jetpack_autoload_classmap.php'; - if ( ! file_exists( $classmap ) ) { - return null; - } - - $classmap = require $classmap; - if ( isset( $classmap[ AutoloadGenerator::class ] ) ) { - return $classmap[ AutoloadGenerator::class ]['version']; - } - - return null; - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/vendor/jetpack-autoloader/class-autoloader.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/vendor/jetpack-autoloader/class-autoloader.php deleted file mode 100644 index 3baa3b12..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/vendor/jetpack-autoloader/class-autoloader.php +++ /dev/null @@ -1,90 +0,0 @@ -get( Autoloader_Handler::class ); - - // If the autoloader is already initializing it means that it has included us as the latest. - $was_included_by_autoloader = $autoloader_handler->is_initializing(); - - /** @var Plugin_Locator $plugin_locator */ - $plugin_locator = $container->get( Plugin_Locator::class ); - - /** @var Plugins_Handler $plugins_handler */ - $plugins_handler = $container->get( Plugins_Handler::class ); - - // The current plugin is the one that we are attempting to initialize here. - $current_plugin = $plugin_locator->find_current_plugin(); - - // The active plugins are those that we were able to discover on the site. This list will not - // include mu-plugins, those activated by code, or those who are hidden by filtering. We also - // want to take care to not consider the current plugin unknown if it was included by an - // autoloader. This avoids the case where a plugin will be marked "active" while deactivated - // due to it having the latest autoloader. - $active_plugins = $plugins_handler->get_active_plugins( true, ! $was_included_by_autoloader ); - - // The cached plugins are all of those that were active or discovered by the autoloader during a previous request. - // Note that it's possible this list will include plugins that have since been deactivated, but after a request - // the cache should be updated and the deactivated plugins will be removed. - $cached_plugins = $plugins_handler->get_cached_plugins(); - - // We combine the active list and cached list to preemptively load classes for plugins that are - // presently unknown but will be loaded during the request. While this may result in us considering packages in - // deactivated plugins there shouldn't be any problems as a result and the eventual consistency is sufficient. - $all_plugins = array_merge( $active_plugins, $cached_plugins ); - - // In particular we also include the current plugin to address the case where it is the latest autoloader - // but also unknown (and not cached). We don't want it in the active list because we don't know that it - // is active but we need it in the all plugins list so that it is considered by the autoloader. - $all_plugins[] = $current_plugin; - - // We require uniqueness in the array to avoid processing the same plugin more than once. - $all_plugins = array_values( array_unique( $all_plugins ) ); - - /** @var Latest_Autoloader_Guard $guard */ - $guard = $container->get( Latest_Autoloader_Guard::class ); - if ( $guard->should_stop_init( $current_plugin, $all_plugins, $was_included_by_autoloader ) ) { - return; - } - - // Initialize the autoloader using the handler now that we're ready. - $autoloader_handler->activate_autoloader( $all_plugins ); - - /** @var Hook_Manager $hook_manager */ - $hook_manager = $container->get( Hook_Manager::class ); - - // Register a shutdown handler to clean up the autoloader. - $hook_manager->add_action( 'shutdown', new Shutdown_Handler( $plugins_handler, $cached_plugins, $was_included_by_autoloader ) ); - - // phpcs:enable Generic.Commenting.DocComment.MissingShort - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/vendor/jetpack-autoloader/class-container.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/vendor/jetpack-autoloader/class-container.php deleted file mode 100644 index 4eb3b084..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/vendor/jetpack-autoloader/class-container.php +++ /dev/null @@ -1,150 +0,0 @@ - 'Hook_Manager', - ); - - /** - * A map of all the dependencies we've registered with the container and created. - * - * @var array - */ - protected $dependencies; - - /** - * The constructor. - */ - public function __construct() { - $this->dependencies = array(); - - $this->register_shared_dependencies(); - $this->register_dependencies(); - $this->initialize_globals(); - } - - /** - * Gets a dependency out of the container. - * - * @param string $class The class to fetch. - * - * @return mixed - * @throws \InvalidArgumentException When a class that isn't registered with the container is fetched. - */ - public function get( $class ) { - if ( ! isset( $this->dependencies[ $class ] ) ) { - throw new \InvalidArgumentException( "Class '$class' is not registered with the container." ); - } - - return $this->dependencies[ $class ]; - } - - /** - * Registers all of the dependencies that are shared between all instances of the autoloader. - */ - private function register_shared_dependencies() { - global $jetpack_autoloader_container_shared; - if ( ! isset( $jetpack_autoloader_container_shared ) ) { - $jetpack_autoloader_container_shared = array(); - } - - $key = self::SHARED_DEPENDENCY_KEYS[ Hook_Manager::class ]; - if ( ! isset( $jetpack_autoloader_container_shared[ $key ] ) ) { - require_once __DIR__ . '/class-hook-manager.php'; - $jetpack_autoloader_container_shared[ $key ] = new Hook_Manager(); - } - $this->dependencies[ Hook_Manager::class ] = &$jetpack_autoloader_container_shared[ $key ]; - } - - /** - * Registers all of the dependencies with the container. - */ - private function register_dependencies() { - require_once __DIR__ . '/class-path-processor.php'; - $this->dependencies[ Path_Processor::class ] = new Path_Processor(); - - require_once __DIR__ . '/class-plugin-locator.php'; - $this->dependencies[ Plugin_Locator::class ] = new Plugin_Locator( - $this->get( Path_Processor::class ) - ); - - require_once __DIR__ . '/class-version-selector.php'; - $this->dependencies[ Version_Selector::class ] = new Version_Selector(); - - require_once __DIR__ . '/class-autoloader-locator.php'; - $this->dependencies[ Autoloader_Locator::class ] = new Autoloader_Locator( - $this->get( Version_Selector::class ) - ); - - require_once __DIR__ . '/class-php-autoloader.php'; - $this->dependencies[ PHP_Autoloader::class ] = new PHP_Autoloader(); - - require_once __DIR__ . '/class-manifest-reader.php'; - $this->dependencies[ Manifest_Reader::class ] = new Manifest_Reader( - $this->get( Version_Selector::class ) - ); - - require_once __DIR__ . '/class-plugins-handler.php'; - $this->dependencies[ Plugins_Handler::class ] = new Plugins_Handler( - $this->get( Plugin_Locator::class ), - $this->get( Path_Processor::class ) - ); - - require_once __DIR__ . '/class-autoloader-handler.php'; - $this->dependencies[ Autoloader_Handler::class ] = new Autoloader_Handler( - $this->get( PHP_Autoloader::class ), - $this->get( Hook_Manager::class ), - $this->get( Manifest_Reader::class ), - $this->get( Version_Selector::class ) - ); - - require_once __DIR__ . '/class-latest-autoloader-guard.php'; - $this->dependencies[ Latest_Autoloader_Guard::class ] = new Latest_Autoloader_Guard( - $this->get( Plugins_Handler::class ), - $this->get( Autoloader_Handler::class ), - $this->get( Autoloader_Locator::class ) - ); - - // Register any classes that we will use elsewhere. - require_once __DIR__ . '/class-version-loader.php'; - require_once __DIR__ . '/class-shutdown-handler.php'; - } - - /** - * Initializes any of the globals needed by the autoloader. - */ - private function initialize_globals() { - /* - * This global was retired in version 2.9. The value is set to 'false' to maintain - * compatibility with older versions of the autoloader. - */ - global $jetpack_autoloader_including_latest; - $jetpack_autoloader_including_latest = false; - - // Not all plugins can be found using the locator. In cases where a plugin loads the autoloader - // but was not discoverable, we will record them in this array to track them as "active". - global $jetpack_autoloader_activating_plugins_paths; - if ( ! isset( $jetpack_autoloader_activating_plugins_paths ) ) { - $jetpack_autoloader_activating_plugins_paths = array(); - } - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/vendor/jetpack-autoloader/class-hook-manager.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/vendor/jetpack-autoloader/class-hook-manager.php deleted file mode 100644 index c40c9d12..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/vendor/jetpack-autoloader/class-hook-manager.php +++ /dev/null @@ -1,76 +0,0 @@ -registered_hooks = array(); - } - - /** - * Adds an action to WordPress and registers it internally. - * - * @param string $tag The name of the action which is hooked. - * @param callable $callable The function to call. - * @param int $priority Used to specify the priority of the action. - * @param int $accepted_args Used to specify the number of arguments the callable accepts. - */ - public function add_action( $tag, $callable, $priority = 10, $accepted_args = 1 ) { - $this->registered_hooks[ $tag ][] = array( - 'priority' => $priority, - 'callable' => $callable, - ); - - add_action( $tag, $callable, $priority, $accepted_args ); - } - - /** - * Adds a filter to WordPress and registers it internally. - * - * @param string $tag The name of the filter which is hooked. - * @param callable $callable The function to call. - * @param int $priority Used to specify the priority of the filter. - * @param int $accepted_args Used to specify the number of arguments the callable accepts. - */ - public function add_filter( $tag, $callable, $priority = 10, $accepted_args = 1 ) { - $this->registered_hooks[ $tag ][] = array( - 'priority' => $priority, - 'callable' => $callable, - ); - - add_filter( $tag, $callable, $priority, $accepted_args ); - } - - /** - * Removes all of the registered hooks. - */ - public function reset() { - foreach ( $this->registered_hooks as $tag => $hooks ) { - foreach ( $hooks as $hook ) { - remove_filter( $tag, $hook['callable'], $hook['priority'] ); - } - } - $this->registered_hooks = array(); - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/vendor/jetpack-autoloader/class-latest-autoloader-guard.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/vendor/jetpack-autoloader/class-latest-autoloader-guard.php deleted file mode 100644 index d2fcf96c..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/vendor/jetpack-autoloader/class-latest-autoloader-guard.php +++ /dev/null @@ -1,86 +0,0 @@ -plugins_handler = $plugins_handler; - $this->autoloader_handler = $autoloader_handler; - $this->autoloader_locator = $autoloader_locator; - } - - /** - * Indicates whether or not the autoloader should be initialized. Note that this function - * has the side-effect of actually loading the latest autoloader in the event that this - * is not it. - * - * @param string $current_plugin The current plugin we're checking. - * @param string[] $plugins The active plugins to check for autoloaders in. - * @param bool $was_included_by_autoloader Indicates whether or not this autoloader was included by another. - * - * @return bool True if we should stop initialization, otherwise false. - */ - public function should_stop_init( $current_plugin, $plugins, $was_included_by_autoloader ) { - global $jetpack_autoloader_latest_version; - - // We need to reset the autoloader when the plugins change because - // that means the autoloader was generated with a different list. - if ( $this->plugins_handler->have_plugins_changed( $plugins ) ) { - $this->autoloader_handler->reset_autoloader(); - } - - // When the latest autoloader has already been found we don't need to search for it again. - // We should take care however because this will also trigger if the autoloader has been - // included by an older one. - if ( isset( $jetpack_autoloader_latest_version ) && ! $was_included_by_autoloader ) { - return true; - } - - $latest_plugin = $this->autoloader_locator->find_latest_autoloader( $plugins, $jetpack_autoloader_latest_version ); - if ( isset( $latest_plugin ) && $latest_plugin !== $current_plugin ) { - require $this->autoloader_locator->get_autoloader_path( $latest_plugin ); - return true; - } - - return false; - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/vendor/jetpack-autoloader/class-manifest-reader.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/vendor/jetpack-autoloader/class-manifest-reader.php deleted file mode 100644 index ef126625..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/vendor/jetpack-autoloader/class-manifest-reader.php +++ /dev/null @@ -1,99 +0,0 @@ -version_selector = $version_selector; - } - - /** - * Reads all of the manifests in the given plugin paths. - * - * @param array $plugin_paths The paths to the plugins we're loading the manifest in. - * @param string $manifest_path The path that we're loading the manifest from in each plugin. - * @param array $path_map The path map to add the contents of the manifests to. - * - * @return array $path_map The path map we've built using the manifests in each plugin. - */ - public function read_manifests( $plugin_paths, $manifest_path, &$path_map ) { - $file_paths = array_map( - function ( $path ) use ( $manifest_path ) { - return trailingslashit( $path ) . $manifest_path; - }, - $plugin_paths - ); - - foreach ( $file_paths as $path ) { - $this->register_manifest( $path, $path_map ); - } - - return $path_map; - } - - /** - * Registers a plugin's manifest file with the path map. - * - * @param string $manifest_path The absolute path to the manifest that we're loading. - * @param array $path_map The path map to add the contents of the manifest to. - */ - protected function register_manifest( $manifest_path, &$path_map ) { - if ( ! is_readable( $manifest_path ) ) { - return; - } - - $manifest = require $manifest_path; - if ( ! is_array( $manifest ) ) { - return; - } - - foreach ( $manifest as $key => $data ) { - $this->register_record( $key, $data, $path_map ); - } - } - - /** - * Registers an entry from the manifest in the path map. - * - * @param string $key The identifier for the entry we're registering. - * @param array $data The data for the entry we're registering. - * @param array $path_map The path map to add the contents of the manifest to. - */ - protected function register_record( $key, $data, &$path_map ) { - if ( isset( $path_map[ $key ]['version'] ) ) { - $selected_version = $path_map[ $key ]['version']; - } else { - $selected_version = null; - } - - if ( $this->version_selector->is_version_update_required( $selected_version, $data['version'] ) ) { - $path_map[ $key ] = array( - 'version' => $data['version'], - 'path' => $data['path'], - ); - } - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/vendor/jetpack-autoloader/class-path-processor.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/vendor/jetpack-autoloader/class-path-processor.php deleted file mode 100644 index 643900bb..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/vendor/jetpack-autoloader/class-path-processor.php +++ /dev/null @@ -1,194 +0,0 @@ -get_normalized_constants(); - foreach ( $constants as $constant => $constant_path ) { - $len = strlen( $constant_path ); - if ( substr( $path, 0, $len ) !== $constant_path ) { - continue; - } - - return substr_replace( $path, '{{' . $constant . '}}', 0, $len ); - } - - return $path; - } - - /** - * Given a path this will replace any of the path constant tokens with the expanded path. - * - * @param string $tokenized_path The path we want to process. - * - * @return string The expanded path. - */ - public function untokenize_path_constants( $tokenized_path ) { - $tokenized_path = wp_normalize_path( $tokenized_path ); - - $constants = $this->get_normalized_constants(); - foreach ( $constants as $constant => $constant_path ) { - $constant = '{{' . $constant . '}}'; - - $len = strlen( $constant ); - if ( substr( $tokenized_path, 0, $len ) !== $constant ) { - continue; - } - - return $this->get_real_path( substr_replace( $tokenized_path, $constant_path, 0, $len ) ); - } - - return $tokenized_path; - } - - /** - * Given a file and an array of places it might be, this will find the absolute path and return it. - * - * @param string $file The plugin or theme file to resolve. - * @param array $directories_to_check The directories we should check for the file if it isn't an absolute path. - * - * @return string|false Returns the absolute path to the directory, otherwise false. - */ - public function find_directory_with_autoloader( $file, $directories_to_check ) { - $file = wp_normalize_path( $file ); - - if ( ! $this->is_absolute_path( $file ) ) { - $file = $this->find_absolute_plugin_path( $file, $directories_to_check ); - if ( ! isset( $file ) ) { - return false; - } - } - - // We need the real path for consistency with __DIR__ paths. - $file = $this->get_real_path( $file ); - - // phpcs:disable WordPress.PHP.NoSilencedErrors.Discouraged - $directory = @is_file( $file ) ? dirname( $file ) : $file; - if ( ! @is_file( $directory . '/vendor/composer/jetpack_autoload_classmap.php' ) ) { - return false; - } - // phpcs:enable WordPress.PHP.NoSilencedErrors.Discouraged - - return $directory; - } - - /** - * Fetches an array of normalized paths keyed by the constant they came from. - * - * @return string[] The normalized paths keyed by the constant. - */ - private function get_normalized_constants() { - $raw_constants = array( - // Order the constants from most-specific to least-specific. - 'WP_PLUGIN_DIR', - 'WPMU_PLUGIN_DIR', - 'WP_CONTENT_DIR', - 'ABSPATH', - ); - - $constants = array(); - foreach ( $raw_constants as $raw ) { - if ( ! defined( $raw ) ) { - continue; - } - - $path = wp_normalize_path( constant( $raw ) ); - if ( isset( $path ) ) { - $constants[ $raw ] = $path; - } - } - - return $constants; - } - - /** - * Indicates whether or not a path is absolute. - * - * @param string $path The path to check. - * - * @return bool True if the path is absolute, otherwise false. - */ - private function is_absolute_path( $path ) { - if ( 0 === strlen( $path ) || '.' === $path[0] ) { - return false; - } - - // Absolute paths on Windows may begin with a drive letter. - if ( preg_match( '/^[a-zA-Z]:[\/\\\\]/', $path ) ) { - return true; - } - - // A path starting with / or \ is absolute; anything else is relative. - return ( '/' === $path[0] || '\\' === $path[0] ); - } - - /** - * Given a file and a list of directories to check, this method will try to figure out - * the absolute path to the file in question. - * - * @param string $normalized_path The normalized path to the plugin or theme file to resolve. - * @param array $directories_to_check The directories we should check for the file if it isn't an absolute path. - * - * @return string|null The absolute path to the plugin file, otherwise null. - */ - private function find_absolute_plugin_path( $normalized_path, $directories_to_check ) { - // We're only able to find the absolute path for plugin/theme PHP files. - if ( ! is_string( $normalized_path ) || '.php' !== substr( $normalized_path, -4 ) ) { - return null; - } - - foreach ( $directories_to_check as $directory ) { - $normalized_check = wp_normalize_path( trailingslashit( $directory ) ) . $normalized_path; - // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged - if ( @is_file( $normalized_check ) ) { - return $normalized_check; - } - } - - return null; - } - - /** - * Given a path this will figure out the real path that we should be using. - * - * @param string $path The path to resolve. - * - * @return string The resolved path. - */ - private function get_real_path( $path ) { - // We want to resolve symbolic links for consistency with __DIR__ paths. - // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged - $real_path = @realpath( $path ); - if ( false === $real_path ) { - // Let the autoloader deal with paths that don't exist. - $real_path = $path; - } - - // Using realpath will make it platform-specific so we must normalize it after. - if ( $path !== $real_path ) { - $real_path = wp_normalize_path( $real_path ); - } - - return $real_path; - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/vendor/jetpack-autoloader/class-php-autoloader.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/vendor/jetpack-autoloader/class-php-autoloader.php deleted file mode 100644 index 0d08287f..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/vendor/jetpack-autoloader/class-php-autoloader.php +++ /dev/null @@ -1,93 +0,0 @@ -unregister_autoloader(); - - // Set the global so that it can be used to load classes. - global $jetpack_autoloader_loader; - $jetpack_autoloader_loader = $version_loader; - - // Ensure that the autoloader is first to avoid contention with others. - spl_autoload_register( array( self::class, 'load_class' ), true, true ); - } - - /** - * Unregisters the active autoloader so that it will no longer autoload classes. - */ - public function unregister_autoloader() { - // Remove any v2 autoloader that we've already registered. - $autoload_chain = spl_autoload_functions(); - if ( ! $autoload_chain ) { - return; - } - foreach ( $autoload_chain as $autoloader ) { - // We can identify a v2 autoloader using the namespace. - $namespace_check = null; - - // Functions are recorded as strings. - if ( is_string( $autoloader ) ) { - $namespace_check = $autoloader; - } elseif ( is_array( $autoloader ) && is_string( $autoloader[0] ) ) { - // Static method calls have the class as the first array element. - $namespace_check = $autoloader[0]; - } else { - // Since the autoloader has only ever been a function or a static method we don't currently need to check anything else. - continue; - } - - // Check for the namespace without the generated suffix. - if ( 'Automattic\\Jetpack\\Autoloader\\jp' === substr( $namespace_check, 0, 32 ) ) { - spl_autoload_unregister( $autoloader ); - } - } - - // Clear the global now that the autoloader has been unregistered. - global $jetpack_autoloader_loader; - $jetpack_autoloader_loader = null; - } - - /** - * Loads a class file if one could be found. - * - * Note: This function is static so that the autoloader can be easily unregistered. If - * it was a class method we would have to unwrap the object to check the namespace. - * - * @param string $class_name The name of the class to autoload. - * - * @return bool Indicates whether or not a class file was loaded. - */ - public static function load_class( $class_name ) { - global $jetpack_autoloader_loader; - if ( ! isset( $jetpack_autoloader_loader ) ) { - return; - } - - $file = $jetpack_autoloader_loader->find_class_file( $class_name ); - if ( ! isset( $file ) ) { - return false; - } - - require $file; - return true; - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/vendor/jetpack-autoloader/class-plugin-locator.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/vendor/jetpack-autoloader/class-plugin-locator.php deleted file mode 100644 index 67f87d72..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/vendor/jetpack-autoloader/class-plugin-locator.php +++ /dev/null @@ -1,153 +0,0 @@ -path_processor = $path_processor; - } - - /** - * Finds the path to the current plugin. - * - * @return string $path The path to the current plugin. - * - * @throws \RuntimeException If the current plugin does not have an autoloader. - */ - public function find_current_plugin() { - // Escape from `vendor/__DIR__` to root plugin directory. - $plugin_directory = dirname( __DIR__, 2 ); - - // Use the path processor to ensure that this is an autoloader we're referencing. - $path = $this->path_processor->find_directory_with_autoloader( $plugin_directory, array() ); - if ( false === $path ) { - throw new \RuntimeException( 'Failed to locate plugin ' . $plugin_directory ); - } - - return $path; - } - - /** - * Checks a given option for plugin paths. - * - * @param string $option_name The option that we want to check for plugin information. - * @param bool $site_option Indicates whether or not we want to check the site option. - * - * @return array $plugin_paths The list of absolute paths we've found. - */ - public function find_using_option( $option_name, $site_option = false ) { - $raw = $site_option ? get_site_option( $option_name ) : get_option( $option_name ); - if ( false === $raw ) { - return array(); - } - - return $this->convert_plugins_to_paths( $raw ); - } - - /** - * Checks for plugins in the `action` request parameter. - * - * @param string[] $allowed_actions The actions that we're allowed to return plugins for. - * - * @return array $plugin_paths The list of absolute paths we've found. - */ - public function find_using_request_action( $allowed_actions ) { - /** - * Note: we're not actually checking the nonce here because it's too early - * in the execution. The pluggable functions are not yet loaded to give - * plugins a chance to plug their versions. Therefore we're doing the bare - * minimum: checking whether the nonce exists and it's in the right place. - * The request will fail later if the nonce doesn't pass the check. - */ - if ( empty( $_REQUEST['_wpnonce'] ) ) { - return array(); - } - - // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Validated just below. - $action = isset( $_REQUEST['action'] ) ? wp_unslash( $_REQUEST['action'] ) : false; - if ( ! in_array( $action, $allowed_actions, true ) ) { - return array(); - } - - $plugin_slugs = array(); - switch ( $action ) { - case 'activate': - case 'deactivate': - if ( empty( $_REQUEST['plugin'] ) ) { - break; - } - - // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Validated by convert_plugins_to_paths. - $plugin_slugs[] = wp_unslash( $_REQUEST['plugin'] ); - break; - - case 'activate-selected': - case 'deactivate-selected': - if ( empty( $_REQUEST['checked'] ) ) { - break; - } - - // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Validated by convert_plugins_to_paths. - $plugin_slugs = wp_unslash( $_REQUEST['checked'] ); - break; - } - - return $this->convert_plugins_to_paths( $plugin_slugs ); - } - - /** - * Given an array of plugin slugs or paths, this will convert them to absolute paths and filter - * out the plugins that are not directory plugins. Note that array keys will also be included - * if they are plugin paths! - * - * @param string[] $plugins Plugin paths or slugs to filter. - * - * @return string[] - */ - private function convert_plugins_to_paths( $plugins ) { - if ( ! is_array( $plugins ) || empty( $plugins ) ) { - return array(); - } - - // We're going to look for plugins in the standard directories. - $path_constants = array( WP_PLUGIN_DIR, WPMU_PLUGIN_DIR ); - - $plugin_paths = array(); - foreach ( $plugins as $key => $value ) { - $path = $this->path_processor->find_directory_with_autoloader( $key, $path_constants ); - if ( $path ) { - $plugin_paths[] = $path; - } - - $path = $this->path_processor->find_directory_with_autoloader( $value, $path_constants ); - if ( $path ) { - $plugin_paths[] = $path; - } - } - - return $plugin_paths; - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/vendor/jetpack-autoloader/class-plugins-handler.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/vendor/jetpack-autoloader/class-plugins-handler.php deleted file mode 100644 index 2270a152..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/vendor/jetpack-autoloader/class-plugins-handler.php +++ /dev/null @@ -1,164 +0,0 @@ -plugin_locator = $plugin_locator; - $this->path_processor = $path_processor; - } - - /** - * Gets all of the active plugins we can find. - * - * @param bool $include_deactivating When true, plugins deactivating this request will be considered active. - * @param bool $record_unknown When true, the current plugin will be marked as active and recorded when unknown. - * - * @return string[] - */ - public function get_active_plugins( $include_deactivating, $record_unknown ) { - global $jetpack_autoloader_activating_plugins_paths; - - // We're going to build a unique list of plugins from a few different sources - // to find all of our "active" plugins. While we need to return an integer - // array, we're going to use an associative array internally to reduce - // the amount of time that we're going to spend checking uniqueness - // and merging different arrays together to form the output. - $active_plugins = array(); - - // Make sure that plugins which have activated this request are considered as "active" even though - // they probably won't be present in any option. - if ( is_array( $jetpack_autoloader_activating_plugins_paths ) ) { - foreach ( $jetpack_autoloader_activating_plugins_paths as $path ) { - $active_plugins[ $path ] = $path; - } - } - - // This option contains all of the plugins that have been activated. - $plugins = $this->plugin_locator->find_using_option( 'active_plugins' ); - foreach ( $plugins as $path ) { - $active_plugins[ $path ] = $path; - } - - // This option contains all of the multisite plugins that have been activated. - if ( is_multisite() ) { - $plugins = $this->plugin_locator->find_using_option( 'active_sitewide_plugins', true ); - foreach ( $plugins as $path ) { - $active_plugins[ $path ] = $path; - } - } - - // These actions contain plugins that are being activated/deactivated during this request. - $plugins = $this->plugin_locator->find_using_request_action( array( 'activate', 'activate-selected', 'deactivate', 'deactivate-selected' ) ); - foreach ( $plugins as $path ) { - $active_plugins[ $path ] = $path; - } - - // When the current plugin isn't considered "active" there's a problem. - // Since we're here, the plugin is active and currently being loaded. - // We can support this case (mu-plugins and non-standard activation) - // by adding the current plugin to the active list and marking it - // as an unknown (activating) plugin. This also has the benefit - // of causing a reset because the active plugins list has - // been changed since it was saved in the global. - $current_plugin = $this->plugin_locator->find_current_plugin(); - if ( $record_unknown && ! in_array( $current_plugin, $active_plugins, true ) ) { - $active_plugins[ $current_plugin ] = $current_plugin; - $jetpack_autoloader_activating_plugins_paths[] = $current_plugin; - } - - // When deactivating plugins aren't desired we should entirely remove them from the active list. - if ( ! $include_deactivating ) { - // These actions contain plugins that are being deactivated during this request. - $plugins = $this->plugin_locator->find_using_request_action( array( 'deactivate', 'deactivate-selected' ) ); - foreach ( $plugins as $path ) { - unset( $active_plugins[ $path ] ); - } - } - - // Transform the array so that we don't have to worry about the keys interacting with other array types later. - return array_values( $active_plugins ); - } - - /** - * Gets all of the cached plugins if there are any. - * - * @return string[] - */ - public function get_cached_plugins() { - $cached = get_transient( self::TRANSIENT_KEY ); - if ( ! is_array( $cached ) || empty( $cached ) ) { - return array(); - } - - // We need to expand the tokens to an absolute path for this webserver. - return array_map( array( $this->path_processor, 'untokenize_path_constants' ), $cached ); - } - - /** - * Saves the plugin list to the cache. - * - * @param array $plugins The plugin list to save to the cache. - */ - public function cache_plugins( $plugins ) { - // We store the paths in a tokenized form so that that webservers with different absolute paths don't break. - $plugins = array_map( array( $this->path_processor, 'tokenize_path_constants' ), $plugins ); - - set_transient( self::TRANSIENT_KEY, $plugins ); - } - - /** - * Checks to see whether or not the plugin list given has changed when compared to the - * shared `$jetpack_autoloader_cached_plugin_paths` global. This allows us to deal - * with cases where the active list may change due to filtering.. - * - * @param string[] $plugins The plugins list to check against the global cache. - * - * @return bool True if the plugins have changed, otherwise false. - */ - public function have_plugins_changed( $plugins ) { - global $jetpack_autoloader_cached_plugin_paths; - - if ( $jetpack_autoloader_cached_plugin_paths !== $plugins ) { - $jetpack_autoloader_cached_plugin_paths = $plugins; - return true; - } - - return false; - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/vendor/jetpack-autoloader/class-shutdown-handler.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/vendor/jetpack-autoloader/class-shutdown-handler.php deleted file mode 100644 index a0263748..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/vendor/jetpack-autoloader/class-shutdown-handler.php +++ /dev/null @@ -1,92 +0,0 @@ -plugins_handler = $plugins_handler; - $this->cached_plugins = $cached_plugins; - $this->was_included_by_autoloader = $was_included_by_autoloader; - } - - /** - * Handles the shutdown of the autoloader. - */ - public function __invoke() { - // Don't save a broken cache if an error happens during some plugin's initialization. - if ( ! did_action( 'plugins_loaded' ) ) { - // Ensure that the cache is emptied to prevent consecutive failures if the cache is to blame. - if ( ! empty( $this->cached_plugins ) ) { - $this->plugins_handler->cache_plugins( array() ); - } - - return; - } - - // Load the active plugins fresh since the list we pulled earlier might not contain - // plugins that were activated but did not reset the autoloader. This happens - // when a plugin is in the cache but not "active" when the autoloader loads. - // We also want to make sure that plugins which are deactivating are not - // considered "active" so that they will be removed from the cache now. - try { - $active_plugins = $this->plugins_handler->get_active_plugins( false, ! $this->was_included_by_autoloader ); - } catch ( \Exception $ex ) { - // When the package is deleted before shutdown it will throw an exception. - // In the event this happens we should erase the cache. - if ( ! empty( $this->cached_plugins ) ) { - $this->plugins_handler->cache_plugins( array() ); - } - return; - } - - // The paths should be sorted for easy comparisons with those loaded from the cache. - // Note we don't need to sort the cached entries because they're already sorted. - sort( $active_plugins ); - - // We don't want to waste time saving a cache that hasn't changed. - if ( $this->cached_plugins === $active_plugins ) { - return; - } - - $this->plugins_handler->cache_plugins( $active_plugins ); - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/vendor/jetpack-autoloader/class-version-loader.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/vendor/jetpack-autoloader/class-version-loader.php deleted file mode 100644 index 1ba1d928..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/vendor/jetpack-autoloader/class-version-loader.php +++ /dev/null @@ -1,164 +0,0 @@ -version_selector = $version_selector; - $this->classmap = $classmap; - $this->psr4_map = $psr4_map; - $this->filemap = $filemap; - } - - /** - * Finds the file path for the given class. - * - * @param string $class_name The class to find. - * - * @return string|null $file_path The path to the file if found, null if no class was found. - */ - public function find_class_file( $class_name ) { - $data = $this->select_newest_file( - isset( $this->classmap[ $class_name ] ) ? $this->classmap[ $class_name ] : null, - $this->find_psr4_file( $class_name ) - ); - if ( ! isset( $data ) ) { - return null; - } - - return $data['path']; - } - - /** - * Load all of the files in the filemap. - */ - public function load_filemap() { - if ( empty( $this->filemap ) ) { - return; - } - - foreach ( $this->filemap as $file_identifier => $file_data ) { - if ( empty( $GLOBALS['__composer_autoload_files'][ $file_identifier ] ) ) { - require_once $file_data['path']; - - $GLOBALS['__composer_autoload_files'][ $file_identifier ] = true; - } - } - } - - /** - * Compares different class sources and returns the newest. - * - * @param array|null $classmap_data The classmap class data. - * @param array|null $psr4_data The PSR-4 class data. - * - * @return array|null $data - */ - private function select_newest_file( $classmap_data, $psr4_data ) { - if ( ! isset( $classmap_data ) ) { - return $psr4_data; - } elseif ( ! isset( $psr4_data ) ) { - return $classmap_data; - } - - if ( $this->version_selector->is_version_update_required( $classmap_data['version'], $psr4_data['version'] ) ) { - return $psr4_data; - } - - return $classmap_data; - } - - /** - * Finds the file for a given class in a PSR-4 namespace. - * - * @param string $class_name The class to find. - * - * @return array|null $data The version and path path to the file if found, null otherwise. - */ - private function find_psr4_file( $class_name ) { - if ( ! isset( $this->psr4_map ) ) { - return null; - } - - // Don't bother with classes that have no namespace. - $class_index = strrpos( $class_name, '\\' ); - if ( ! $class_index ) { - return null; - } - $class_for_path = str_replace( '\\', '/', $class_name ); - - // Search for the namespace by iteratively cutting off the last segment until - // we find a match. This allows us to check the most-specific namespaces - // first as well as minimize the amount of time spent looking. - for ( - $class_namespace = substr( $class_name, 0, $class_index ); - ! empty( $class_namespace ); - $class_namespace = substr( $class_namespace, 0, strrpos( $class_namespace, '\\' ) ) - ) { - $namespace = $class_namespace . '\\'; - if ( ! isset( $this->psr4_map[ $namespace ] ) ) { - continue; - } - $data = $this->psr4_map[ $namespace ]; - - foreach ( $data['path'] as $path ) { - $path .= '/' . substr( $class_for_path, strlen( $namespace ) ) . '.php'; - if ( file_exists( $path ) ) { - return array( - 'version' => $data['version'], - 'path' => $path, - ); - } - } - } - - return null; - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/vendor/jetpack-autoloader/class-version-selector.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/vendor/jetpack-autoloader/class-version-selector.php deleted file mode 100644 index 66e731db..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/vendor/jetpack-autoloader/class-version-selector.php +++ /dev/null @@ -1,69 +0,0 @@ -is_dev_version( $selected_version ) ) { - return false; - } - - if ( $this->is_dev_version( $compare_version ) ) { - if ( $use_dev_versions ) { - return true; - } else { - return false; - } - } - - if ( version_compare( $selected_version, $compare_version, '<' ) ) { - return true; - } - - return false; - } - - /** - * Checks whether the given package version is a development version. - * - * @param String $version The package version. - * - * @return bool True if the version is a dev version, else false. - */ - public function is_dev_version( $version ) { - if ( 'dev-' === substr( $version, 0, 4 ) || '9999999-dev' === $version ) { - return true; - } - - return false; - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/vendor/wikimedia/aho-corasick/LICENSE b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/vendor/wikimedia/aho-corasick/LICENSE deleted file mode 100644 index d6456956..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/vendor/wikimedia/aho-corasick/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/vendor/wikimedia/aho-corasick/NOTICE b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/vendor/wikimedia/aho-corasick/NOTICE deleted file mode 100644 index 344d6275..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/vendor/wikimedia/aho-corasick/NOTICE +++ /dev/null @@ -1,2 +0,0 @@ -AhoCorasick PHP Library -Copyright 2015 Ori Livneh diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/vendor/wikimedia/aho-corasick/bench/bench.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/vendor/wikimedia/aho-corasick/bench/bench.php deleted file mode 100644 index 499899a8..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/vendor/wikimedia/aho-corasick/bench/bench.php +++ /dev/null @@ -1,75 +0,0 @@ -searchAndReplace( $text ); - } - $endTime = microtime( true ); - $wallTime = 1000 * ( ( $endTime - $startTime ) / $loops ); - printf( "%-'.40s %.2fms\n", 'MultiStringRepeater::searchAndReplace(): ', $wallTime ); - if ( $profile ) { - $profile = xhprof_disable(); - foreach ( $profile as $func => $data ) { - printf( "%s: %.2f\n", $func, $data['cpu'] / $data['ct'] ); - } - } -} - -if ( function_exists( 'fss_prep_replace' ) && isset( $options['fss'] ) ) { - $fss = fss_prep_replace( $zh2Hant ); - $startTime = microtime( true ); - for ( $i = 0; $i < $loops; $i++ ) { - fss_exec_replace( $fss, $text ); - } - $endTime = microtime( true ); - $wallTime = 1000 * ( ( $endTime - $startTime ) / $loops ); - printf( "%-'.40s %.2fms\n", 'fss_exec_replace(): ', $wallTime ); -} - -if ( isset( $options['strtr'] ) ) { - $startTime = microtime( true ); - for ( $i = 0; $i < $loops; $i++ ) { - strtr( $text, $zh2Hant ); - } - $endTime = microtime( true ); - $wallTime = 1000 * ( ( $endTime - $startTime ) / $loops ); - printf( "%-'.40s %.2fms\n", 'strtr(): ', $wallTime ); -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/vendor/wikimedia/aho-corasick/bench/check.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/vendor/wikimedia/aho-corasick/bench/check.php deleted file mode 100644 index 1cb6384e..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/vendor/wikimedia/aho-corasick/bench/check.php +++ /dev/null @@ -1,42 +0,0 @@ -searchAndReplace( $text ) !== $expected ) { - echo "ERROR\n"; - $status = 1; -} else { - echo "OK\n"; -} - -if ( function_exists( 'fss_exec_replace' ) ) { - echo "fss_exec_replace(): "; - $fss = fss_prep_replace( $zh2Hant ); - if ( fss_exec_replace( $fss, $text ) !== $expected ) { - echo "ERROR\n"; - $status = 1; - } else { - echo "OK\n"; - } -} - -exit( $status ); diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/vendor/wikimedia/aho-corasick/src/MultiStringMatcher.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/vendor/wikimedia/aho-corasick/src/MultiStringMatcher.php deleted file mode 100644 index b2953c4d..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/vendor/wikimedia/aho-corasick/src/MultiStringMatcher.php +++ /dev/null @@ -1,230 +0,0 @@ - - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * @file - * @author Ori Livneh - */ - -namespace AhoCorasick; - -/** - * Represents a finite state machine that can find all occurrences - * of a set of search keywords in a body of text. - * - * The time it takes to construct the finite state machine is - * proportional to the sum of the lengths of the search keywords. - * Once constructed, the machine can locate all occurences of all - * search keywords in a body of text in a single pass, making exactly - * one state transition per input character. - * - * This is an implementation of the Aho-Corasick string matching - * algorithm. - * - * Alfred V. Aho and Margaret J. Corasick, "Efficient string matching: - * an aid to bibliographic search", CACM, 18(6):333-340, June 1975. - * - * @link http://xlinux.nist.gov/dads//HTML/ahoCorasick.html - */ -class MultiStringMatcher { - - /** @var string[] The set of keywords to be searched for. **/ - protected $searchKeywords = []; - - /** @var int The number of possible states of the string-matching finite state machine. **/ - protected $numStates = 1; - - /** @var array Mapping of states to outputs. **/ - protected $outputs = []; - - /** @var array Mapping of failure transitions. **/ - protected $noTransitions = []; - - /** @var array Mapping of success transitions. **/ - protected $yesTransitions = []; - - /** - * Constructor. - * - * @param string[] $searchKeywords The set of keywords to be matched. - */ - public function __construct( array $searchKeywords ) { - foreach ( $searchKeywords as $keyword ) { - if ( $keyword !== '' ) { - $this->searchKeywords[$keyword] = strlen( $keyword ); - } - } - - if ( !$this->searchKeywords ) { - trigger_error( __METHOD__ . ': The set of search keywords is empty.', E_USER_WARNING ); - // Unreachable 'return' when PHPUnit detects trigger_error - return; // @codeCoverageIgnore - } - - $this->computeYesTransitions(); - $this->computeNoTransitions(); - } - - /** - * Accessor for the search keywords. - * - * @return string[] Search keywords. - */ - public function getKeywords() { - return array_keys( $this->searchKeywords ); - } - - /** - * Map the current state and input character to the next state. - * - * @param int $currentState The current state of the string-matching - * automaton. - * @param string $inputChar The character the string-matching - * automaton is currently processing. - * @return int The state the automaton should transition to. - */ - public function nextState( $currentState, $inputChar ) { - $initialState = $currentState; - while ( true ) { - $transitions =& $this->yesTransitions[$currentState]; - if ( isset( $transitions[$inputChar] ) ) { - $nextState = $transitions[$inputChar]; - // Avoid failure transitions next time. - if ( $currentState !== $initialState ) { - $this->yesTransitions[$initialState][$inputChar] = $nextState; - } - return $nextState; - } - if ( $currentState === 0 ) { - return 0; - } - $currentState = $this->noTransitions[$currentState]; - } - // Unreachable outside 'while' - } // @codeCoverageIgnore - - /** - * Locate the search keywords in some text. - * - * @param string $text The string to search in. - * @return array[] An array of matches. Each match is a vector - * containing an integer offset and the matched keyword. - * - * @par Example: - * @code - * $keywords = new MultiStringMatcher( array( 'ore', 'hell' ) ); - * $keywords->searchIn( 'She sells sea shells by the sea shore.' ); - * // result: array( array( 15, 'hell' ), array( 34, 'ore' ) ) - * @endcode - */ - public function searchIn( $text ) { - if ( !$this->searchKeywords || $text === '' ) { - return []; // fast path - } - - $state = 0; - $results = []; - $length = strlen( $text ); - - for ( $i = 0; $i < $length; $i++ ) { - $ch = $text[$i]; - $state = $this->nextState( $state, $ch ); - foreach ( $this->outputs[$state] as $match ) { - $offset = $i - $this->searchKeywords[$match] + 1; - $results[] = [ $offset, $match ]; - } - } - - return $results; - } - - /** - * Get the state transitions which the string-matching automaton - * shall make as it advances through input text. - * - * Constructs a directed tree with a root node which represents the - * initial state of the string-matching automaton and from which a - * path exists which spells out each search keyword. - */ - protected function computeYesTransitions() { - $this->yesTransitions = [ [] ]; - $this->outputs = [ [] ]; - foreach ( $this->searchKeywords as $keyword => $length ) { - $state = 0; - for ( $i = 0; $i < $length; $i++ ) { - $ch = $keyword[$i]; - if ( !empty( $this->yesTransitions[$state][$ch] ) ) { - $state = $this->yesTransitions[$state][$ch]; - } else { - $this->yesTransitions[$state][$ch] = $this->numStates; - $this->yesTransitions[] = []; - $this->outputs[] = []; - $state = $this->numStates++; - } - } - - $this->outputs[$state][] = $keyword; - } - } - - /** - * Get the state transitions which the string-matching automaton - * shall make when a partial match proves false. - */ - protected function computeNoTransitions() { - $queue = []; - $this->noTransitions = []; - - foreach ( $this->yesTransitions[0] as $ch => $toState ) { - $queue[] = $toState; - $this->noTransitions[$toState] = 0; - } - - while ( true ) { - $fromState = array_shift( $queue ); - if ( $fromState === null ) { - break; - } - foreach ( $this->yesTransitions[$fromState] as $ch => $toState ) { - $queue[] = $toState; - $state = $this->noTransitions[$fromState]; - - while ( $state !== 0 && empty( $this->yesTransitions[$state][$ch] ) ) { - $state = $this->noTransitions[$state]; - } - - if ( isset( $this->yesTransitions[$state][$ch] ) ) { - $noState = $this->yesTransitions[$state][$ch]; - } else { - $noState = 0; - } - - $this->noTransitions[$toState] = $noState; - $this->outputs[$toState] = array_merge( - $this->outputs[$toState], $this->outputs[$noState] ); - } - } - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/vendor/wikimedia/aho-corasick/src/MultiStringReplacer.php b/wp-content/upgrade-temp-backup/plugins/jetpack-protect/vendor/wikimedia/aho-corasick/src/MultiStringReplacer.php deleted file mode 100644 index 6b7891f6..00000000 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/vendor/wikimedia/aho-corasick/src/MultiStringReplacer.php +++ /dev/null @@ -1,96 +0,0 @@ - - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * @file - * @author Ori Livneh - */ - -namespace AhoCorasick; - -/** - * This class extends MultiStringMatcher, adding search and replace - * functionality. - */ -class MultiStringReplacer extends MultiStringMatcher { - - /** @var array Mapping of states to outputs. **/ - protected $replacePairs = []; - - /** - * Constructor. - * - * @param array $replacePairs array of ( 'from' => 'to' ) replacement pairs. - */ - public function __construct( array $replacePairs ) { - foreach ( $replacePairs as $keyword => $replacement ) { - if ( $keyword !== '' ) { - $this->replacePairs[$keyword] = $replacement; - } - } - parent::__construct( array_keys( $this->replacePairs ) ); - } - - /** - * Search and replace a set of keywords in some text. - * - * @param string $text The string to search in. - * @return string The input text with replacements. - * - * @par Example: - * @code - * $replacer = new MultiStringReplacer( array( 'csh' => 'sea shells' ) ); - * $replacer->searchAndReplace( 'She sells csh by the sea shore.' ); - * // result: 'She sells sea shells by the sea shore.' - * @endcode - */ - public function searchAndReplace( $text ) { - $state = 0; - $length = strlen( $text ); - $matches = []; - for ( $i = 0; $i < $length; $i++ ) { - $ch = $text[$i]; - $state = $this->nextState( $state, $ch ); - foreach ( $this->outputs[$state] as $match ) { - $offset = $i - $this->searchKeywords[$match] + 1; - $matches[$offset] = $match; - } - } - ksort( $matches ); - - $buf = ''; - $lastInsert = 0; - foreach ( $matches as $offset => $match ) { - if ( $offset >= $lastInsert ) { - $buf .= substr( $text, $lastInsert, $offset - $lastInsert ); - $buf .= $this->replacePairs[$match]; - $lastInsert = $offset + $this->searchKeywords[$match]; - } - } - $buf .= substr( $text, $lastInsert ); - - return $buf; - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/menu-icons/CHANGELOG.md b/wp-content/upgrade-temp-backup/plugins/menu-icons/CHANGELOG.md index 3dfe7204..f814405f 100644 --- a/wp-content/upgrade-temp-backup/plugins/menu-icons/CHANGELOG.md +++ b/wp-content/upgrade-temp-backup/plugins/menu-icons/CHANGELOG.md @@ -1,3 +1,7 @@ +##### [Version 0.13.14](https://github.com/codeinwp/wp-menu-icons/compare/v0.13.13...v0.13.14) (2024-05-14) + +- Enhanced security + ##### [Version 0.13.13](https://github.com/codeinwp/wp-menu-icons/compare/v0.13.12...v0.13.13) (2024-04-18) ### Improvements diff --git a/wp-content/upgrade-temp-backup/plugins/menu-icons/menu-icons.php b/wp-content/upgrade-temp-backup/plugins/menu-icons/menu-icons.php index 107bf2f0..af9dd16b 100644 --- a/wp-content/upgrade-temp-backup/plugins/menu-icons/menu-icons.php +++ b/wp-content/upgrade-temp-backup/plugins/menu-icons/menu-icons.php @@ -11,7 +11,7 @@ * Plugin name: Menu Icons * Plugin URI: https://github.com/Codeinwp/wp-menu-icons * Description: Spice up your navigation menus with pretty icons, easily. - * Version: 0.13.13 + * Version: 0.13.14 * Author: ThemeIsle * Author URI: https://themeisle.com * License: GPLv2 @@ -29,7 +29,7 @@ final class Menu_Icons { const DISMISS_NOTICE = 'menu-icons-dismiss-notice'; - const VERSION = '0.13.13'; + const VERSION = '0.13.14'; /** * Holds plugin data diff --git a/wp-content/upgrade-temp-backup/plugins/menu-icons/readme.txt b/wp-content/upgrade-temp-backup/plugins/menu-icons/readme.txt index dc58c8d4..7a53e374 100644 --- a/wp-content/upgrade-temp-backup/plugins/menu-icons/readme.txt +++ b/wp-content/upgrade-temp-backup/plugins/menu-icons/readme.txt @@ -225,6 +225,13 @@ Read [this blog post](http://kucrut.org/add-custom-image-sizes-right-way/). == Changelog == +##### [Version 0.13.14](https://github.com/codeinwp/wp-menu-icons/compare/v0.13.13...v0.13.14) (2024-05-14) + +- Enhanced security + + + + ##### [Version 0.13.13](https://github.com/codeinwp/wp-menu-icons/compare/v0.13.12...v0.13.13) (2024-04-18) ### Improvements diff --git a/wp-content/upgrade-temp-backup/plugins/menu-icons/vendor/codeinwp/icon-picker/includes/types/svg.php b/wp-content/upgrade-temp-backup/plugins/menu-icons/vendor/codeinwp/icon-picker/includes/types/svg.php index 0d339520..dc6b8dce 100644 --- a/wp-content/upgrade-temp-backup/plugins/menu-icons/vendor/codeinwp/icon-picker/includes/types/svg.php +++ b/wp-content/upgrade-temp-backup/plugins/menu-icons/vendor/codeinwp/icon-picker/includes/types/svg.php @@ -6,6 +6,8 @@ * @author Dzikri Aziz */ +use enshrined\svgSanitize\Sanitizer; + require_once dirname( __FILE__ ) . '/image.php'; /** @@ -53,6 +55,108 @@ class Icon_Picker_Type_Svg extends Icon_Picker_Type_Image { parent::__construct( $args ); add_filter( 'upload_mimes', array( $this, '_add_mime_type' ) ); + add_filter( 'wp_handle_upload_prefilter', array( $this, '_check_svg_and_sanitize' ) ); + } + + /** + * Sanitize the SVG + * + * @param string $file Temp file path. + * + * @return bool|int + */ + protected function sanitize_svg( $file ) { + // We can ignore the phpcs warning here as we're reading and writing to the Temp file. + $dirty = file_get_contents( $file ); // phpcs:ignore + + // Is the SVG gzipped? If so we try and decode the string. + $is_zipped = $this->is_gzipped( $dirty ); + if ( $is_zipped && ( ! function_exists( 'gzdecode' ) || ! function_exists( 'gzencode' ) ) ) { + return false; + } + + if ( $is_zipped ) { + $dirty = gzdecode( $dirty ); + + // If decoding fails, bail as we're not secure. + if ( false === $dirty ) { + return false; + } + } + + $sanitizer = new Sanitizer(); + $clean = $sanitizer->sanitize( $dirty ); + + if ( false === $clean ) { + return false; + } + + // If we were gzipped, we need to re-zip. + if ( $is_zipped ) { + $clean = gzencode( $clean ); + } + + // We can ignore the phpcs warning here as we're reading and writing to the Temp file. + file_put_contents( $file, $clean ); // phpcs:ignore + + return true; + } + + /** + * Check if the contents are gzipped + * + * @see http://www.gzip.org/zlib/rfc-gzip.html#member-format + * + * @param string $contents Content to check. + * + * @return bool + */ + protected function is_gzipped( $contents ) { + // phpcs:disable Generic.Strings.UnnecessaryStringConcat.Found + if ( function_exists( 'mb_strpos' ) ) { + return 0 === mb_strpos( $contents, "\x1f" . "\x8b" . "\x08" ); + } else { + return 0 === strpos( $contents, "\x1f" . "\x8b" . "\x08" ); + } + // phpcs:enable + } + + /** + * Check if the file is an SVG, if so handle appropriately and sanitize. + * + * @param array $file An array of data for a single file. + * + * @return void + */ + public function _check_svg_and_sanitize( $file ) { + // Ensure we have a proper file path before processing. + if ( ! isset( $file['tmp_name'] ) ) { + return $file; + } + + $file_name = isset( $file['name'] ) ? $file['name'] : ''; + $wp_filetype = wp_check_filetype_and_ext( $file['tmp_name'], $file_name ); + $type = ! empty( $wp_filetype['type'] ) ? $wp_filetype['type'] : ''; + + if ( 'image/svg+xml' === $type ) { + if ( ! current_user_can( 'upload_files' ) ) { + $file['error'] = __( + 'Sorry, you are not allowed to upload files.', + 'icon-picker' + ); + + return $file; + } + + if ( ! $this->sanitize_svg( $file['tmp_name'] ) ) { + $file['error'] = __( + "Sorry, this file couldn't be sanitized so for security reasons wasn't uploaded", + 'icon-picker' + ); + } + } + + return $file; } diff --git a/wp-content/upgrade-temp-backup/plugins/menu-icons/vendor/composer/autoload_classmap.php b/wp-content/upgrade-temp-backup/plugins/menu-icons/vendor/composer/autoload_classmap.php index 0fb0a2c1..d0206668 100644 --- a/wp-content/upgrade-temp-backup/plugins/menu-icons/vendor/composer/autoload_classmap.php +++ b/wp-content/upgrade-temp-backup/plugins/menu-icons/vendor/composer/autoload_classmap.php @@ -7,4 +7,15 @@ $baseDir = dirname($vendorDir); return array( 'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php', + 'enshrined\\svgSanitize\\ElementReference\\Resolver' => $vendorDir . '/enshrined/svg-sanitize/src/ElementReference/Resolver.php', + 'enshrined\\svgSanitize\\ElementReference\\Subject' => $vendorDir . '/enshrined/svg-sanitize/src/ElementReference/Subject.php', + 'enshrined\\svgSanitize\\ElementReference\\Usage' => $vendorDir . '/enshrined/svg-sanitize/src/ElementReference/Usage.php', + 'enshrined\\svgSanitize\\Exceptions\\NestingException' => $vendorDir . '/enshrined/svg-sanitize/src/Exceptions/NestingException.php', + 'enshrined\\svgSanitize\\Helper' => $vendorDir . '/enshrined/svg-sanitize/src/Helper.php', + 'enshrined\\svgSanitize\\Sanitizer' => $vendorDir . '/enshrined/svg-sanitize/src/Sanitizer.php', + 'enshrined\\svgSanitize\\data\\AllowedAttributes' => $vendorDir . '/enshrined/svg-sanitize/src/data/AllowedAttributes.php', + 'enshrined\\svgSanitize\\data\\AllowedTags' => $vendorDir . '/enshrined/svg-sanitize/src/data/AllowedTags.php', + 'enshrined\\svgSanitize\\data\\AttributeInterface' => $vendorDir . '/enshrined/svg-sanitize/src/data/AttributeInterface.php', + 'enshrined\\svgSanitize\\data\\TagInterface' => $vendorDir . '/enshrined/svg-sanitize/src/data/TagInterface.php', + 'enshrined\\svgSanitize\\data\\XPath' => $vendorDir . '/enshrined/svg-sanitize/src/data/XPath.php', ); diff --git a/wp-content/upgrade-temp-backup/plugins/menu-icons/vendor/composer/autoload_psr4.php b/wp-content/upgrade-temp-backup/plugins/menu-icons/vendor/composer/autoload_psr4.php index 3890ddc2..ce39925b 100644 --- a/wp-content/upgrade-temp-backup/plugins/menu-icons/vendor/composer/autoload_psr4.php +++ b/wp-content/upgrade-temp-backup/plugins/menu-icons/vendor/composer/autoload_psr4.php @@ -6,4 +6,5 @@ $vendorDir = dirname(__DIR__); $baseDir = dirname($vendorDir); return array( + 'enshrined\\svgSanitize\\' => array($vendorDir . '/enshrined/svg-sanitize/src'), ); diff --git a/wp-content/upgrade-temp-backup/plugins/menu-icons/vendor/composer/autoload_real.php b/wp-content/upgrade-temp-backup/plugins/menu-icons/vendor/composer/autoload_real.php index f460979c..aa9e371c 100644 --- a/wp-content/upgrade-temp-backup/plugins/menu-icons/vendor/composer/autoload_real.php +++ b/wp-content/upgrade-temp-backup/plugins/menu-icons/vendor/composer/autoload_real.php @@ -22,6 +22,8 @@ class ComposerAutoloaderInite0e064cdd82a4be104872380c8a68791 return self::$loader; } + require __DIR__ . '/platform_check.php'; + spl_autoload_register(array('ComposerAutoloaderInite0e064cdd82a4be104872380c8a68791', 'loadClassLoader'), true, true); self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__)); spl_autoload_unregister(array('ComposerAutoloaderInite0e064cdd82a4be104872380c8a68791', 'loadClassLoader')); diff --git a/wp-content/upgrade-temp-backup/plugins/menu-icons/vendor/composer/autoload_static.php b/wp-content/upgrade-temp-backup/plugins/menu-icons/vendor/composer/autoload_static.php index 9d5c6d92..d10b5995 100644 --- a/wp-content/upgrade-temp-backup/plugins/menu-icons/vendor/composer/autoload_static.php +++ b/wp-content/upgrade-temp-backup/plugins/menu-icons/vendor/composer/autoload_static.php @@ -13,13 +13,40 @@ class ComposerStaticInite0e064cdd82a4be104872380c8a68791 '5a095c604245b0e67e4573f0a3b240cd' => __DIR__ . '/..' . '/codeinwp/themeisle-sdk/load.php', ); + public static $prefixLengthsPsr4 = array ( + 'e' => + array ( + 'enshrined\\svgSanitize\\' => 22, + ), + ); + + public static $prefixDirsPsr4 = array ( + 'enshrined\\svgSanitize\\' => + array ( + 0 => __DIR__ . '/..' . '/enshrined/svg-sanitize/src', + ), + ); + public static $classMap = array ( 'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php', + 'enshrined\\svgSanitize\\ElementReference\\Resolver' => __DIR__ . '/..' . '/enshrined/svg-sanitize/src/ElementReference/Resolver.php', + 'enshrined\\svgSanitize\\ElementReference\\Subject' => __DIR__ . '/..' . '/enshrined/svg-sanitize/src/ElementReference/Subject.php', + 'enshrined\\svgSanitize\\ElementReference\\Usage' => __DIR__ . '/..' . '/enshrined/svg-sanitize/src/ElementReference/Usage.php', + 'enshrined\\svgSanitize\\Exceptions\\NestingException' => __DIR__ . '/..' . '/enshrined/svg-sanitize/src/Exceptions/NestingException.php', + 'enshrined\\svgSanitize\\Helper' => __DIR__ . '/..' . '/enshrined/svg-sanitize/src/Helper.php', + 'enshrined\\svgSanitize\\Sanitizer' => __DIR__ . '/..' . '/enshrined/svg-sanitize/src/Sanitizer.php', + 'enshrined\\svgSanitize\\data\\AllowedAttributes' => __DIR__ . '/..' . '/enshrined/svg-sanitize/src/data/AllowedAttributes.php', + 'enshrined\\svgSanitize\\data\\AllowedTags' => __DIR__ . '/..' . '/enshrined/svg-sanitize/src/data/AllowedTags.php', + 'enshrined\\svgSanitize\\data\\AttributeInterface' => __DIR__ . '/..' . '/enshrined/svg-sanitize/src/data/AttributeInterface.php', + 'enshrined\\svgSanitize\\data\\TagInterface' => __DIR__ . '/..' . '/enshrined/svg-sanitize/src/data/TagInterface.php', + 'enshrined\\svgSanitize\\data\\XPath' => __DIR__ . '/..' . '/enshrined/svg-sanitize/src/data/XPath.php', ); public static function getInitializer(ClassLoader $loader) { return \Closure::bind(function () use ($loader) { + $loader->prefixLengthsPsr4 = ComposerStaticInite0e064cdd82a4be104872380c8a68791::$prefixLengthsPsr4; + $loader->prefixDirsPsr4 = ComposerStaticInite0e064cdd82a4be104872380c8a68791::$prefixDirsPsr4; $loader->classMap = ComposerStaticInite0e064cdd82a4be104872380c8a68791::$classMap; }, null, ClassLoader::class); diff --git a/wp-content/upgrade-temp-backup/plugins/menu-icons/vendor/composer/installed.json b/wp-content/upgrade-temp-backup/plugins/menu-icons/vendor/composer/installed.json index 6531dadc..7615fabd 100644 --- a/wp-content/upgrade-temp-backup/plugins/menu-icons/vendor/composer/installed.json +++ b/wp-content/upgrade-temp-backup/plugins/menu-icons/vendor/composer/installed.json @@ -53,21 +53,23 @@ "source": { "type": "git", "url": "https://github.com/Codeinwp/icon-picker.git", - "reference": "0c60ce3a41653e41a20e710c4d5a6a2104c85020" + "reference": "8efc2e400231ad7d4af94ff9270cd5b50248d4c9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Codeinwp/icon-picker/zipball/0c60ce3a41653e41a20e710c4d5a6a2104c85020", - "reference": "0c60ce3a41653e41a20e710c4d5a6a2104c85020", + "url": "https://api.github.com/repos/Codeinwp/icon-picker/zipball/8efc2e400231ad7d4af94ff9270cd5b50248d4c9", + "reference": "8efc2e400231ad7d4af94ff9270cd5b50248d4c9", "shasum": "" }, "require": { - "composer/installers": "~1.0" + "composer/installers": "~1.0", + "enshrined/svg-sanitize": "^0.18.0" }, "require-dev": { "wp-coding-standards/wpcs": "^0.10.0" }, - "time": "2021-05-05T18:52:26+00:00", + "time": "2024-05-13T08:27:15+00:00", + "default-branch": true, "type": "wordpress-plugin", "installation-source": "dist", "notification-url": "https://packagist.org/downloads/", @@ -86,6 +88,9 @@ "plugin", "wordpress" ], + "support": { + "source": "https://github.com/Codeinwp/icon-picker/tree/master" + }, "install-path": "../codeinwp/icon-picker" }, { @@ -164,6 +169,54 @@ "wordpress" ], "install-path": "../codeinwp/themeisle-sdk" + }, + { + "name": "enshrined/svg-sanitize", + "version": "0.18.0", + "version_normalized": "0.18.0.0", + "source": { + "type": "git", + "url": "https://github.com/darylldoyle/svg-sanitizer.git", + "reference": "6a2c069dab3843ca4d887ff09c972fc7033888d0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/darylldoyle/svg-sanitizer/zipball/6a2c069dab3843ca4d887ff09c972fc7033888d0", + "reference": "6a2c069dab3843ca4d887ff09c972fc7033888d0", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-libxml": "*", + "php": "^5.6 || ^7.0 || ^8.0" + }, + "require-dev": { + "phpunit/phpunit": "^5.7 || ^6.5 || ^8.5" + }, + "time": "2024-02-22T17:51:05+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "enshrined\\svgSanitize\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "GPL-2.0-or-later" + ], + "authors": [ + { + "name": "Daryll Doyle", + "email": "daryll@enshrined.co.uk" + } + ], + "description": "An SVG sanitizer for PHP", + "support": { + "issues": "https://github.com/darylldoyle/svg-sanitizer/issues", + "source": "https://github.com/darylldoyle/svg-sanitizer/tree/0.18.0" + }, + "install-path": "../enshrined/svg-sanitize" } ], "dev": false, diff --git a/wp-content/upgrade-temp-backup/plugins/menu-icons/vendor/composer/installed.php b/wp-content/upgrade-temp-backup/plugins/menu-icons/vendor/composer/installed.php index 50f00a85..2c096d74 100644 --- a/wp-content/upgrade-temp-backup/plugins/menu-icons/vendor/composer/installed.php +++ b/wp-content/upgrade-temp-backup/plugins/menu-icons/vendor/composer/installed.php @@ -1,9 +1,9 @@ array( 'name' => 'codeinwp/wp-menu-icons', - 'pretty_version' => 'v0.13.13', - 'version' => '0.13.13.0', - 'reference' => '1d9b7a1bc87b0942bb633546596245b44c1dd15e', + 'pretty_version' => 'v0.13.14', + 'version' => '0.13.14.0', + 'reference' => 'a7c071a7be5a809a8379624381d823e2d9b20e50', 'type' => 'wordpress-plugin', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), @@ -22,10 +22,12 @@ 'codeinwp/icon-picker' => array( 'pretty_version' => 'dev-master', 'version' => 'dev-master', - 'reference' => '0c60ce3a41653e41a20e710c4d5a6a2104c85020', + 'reference' => '8efc2e400231ad7d4af94ff9270cd5b50248d4c9', 'type' => 'wordpress-plugin', 'install_path' => __DIR__ . '/../codeinwp/icon-picker', - 'aliases' => array(), + 'aliases' => array( + 0 => '9999999-dev', + ), 'dev_requirement' => false, ), 'codeinwp/menu-item-custom-fields' => array( @@ -47,9 +49,9 @@ 'dev_requirement' => false, ), 'codeinwp/wp-menu-icons' => array( - 'pretty_version' => 'v0.13.13', - 'version' => '0.13.13.0', - 'reference' => '1d9b7a1bc87b0942bb633546596245b44c1dd15e', + 'pretty_version' => 'v0.13.14', + 'version' => '0.13.14.0', + 'reference' => 'a7c071a7be5a809a8379624381d823e2d9b20e50', 'type' => 'wordpress-plugin', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), @@ -61,5 +63,14 @@ 0 => '*', ), ), + 'enshrined/svg-sanitize' => array( + 'pretty_version' => '0.18.0', + 'version' => '0.18.0.0', + 'reference' => '6a2c069dab3843ca4d887ff09c972fc7033888d0', + 'type' => 'library', + 'install_path' => __DIR__ . '/../enshrined/svg-sanitize', + 'aliases' => array(), + 'dev_requirement' => false, + ), ), ); diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/vendor/composer/platform_check.php b/wp-content/upgrade-temp-backup/plugins/menu-icons/vendor/composer/platform_check.php similarity index 90% rename from wp-content/upgrade-temp-backup/plugins/jetpack-protect/vendor/composer/platform_check.php rename to wp-content/upgrade-temp-backup/plugins/menu-icons/vendor/composer/platform_check.php index f79e574b..8b379f44 100644 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/vendor/composer/platform_check.php +++ b/wp-content/upgrade-temp-backup/plugins/menu-icons/vendor/composer/platform_check.php @@ -4,8 +4,8 @@ $issues = array(); -if (!(PHP_VERSION_ID >= 70000)) { - $issues[] = 'Your Composer dependencies require a PHP version ">= 7.0.0". You are running ' . PHP_VERSION . '.'; +if (!(PHP_VERSION_ID >= 50600)) { + $issues[] = 'Your Composer dependencies require a PHP version ">= 5.6.0". You are running ' . PHP_VERSION . '.'; } if ($issues) { diff --git a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-a8c-mc-stats/LICENSE.txt b/wp-content/upgrade-temp-backup/plugins/menu-icons/vendor/enshrined/svg-sanitize/LICENSE similarity index 68% rename from wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-a8c-mc-stats/LICENSE.txt rename to wp-content/upgrade-temp-backup/plugins/menu-icons/vendor/enshrined/svg-sanitize/LICENSE index e82774c1..8cdb8451 100644 --- a/wp-content/upgrade-temp-backup/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-a8c-mc-stats/LICENSE.txt +++ b/wp-content/upgrade-temp-backup/plugins/menu-icons/vendor/enshrined/svg-sanitize/LICENSE @@ -1,32 +1,14 @@ -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + Preamble - -=================================== - - -GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - -Copyright (C) 1989, 1991 Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -Everyone is permitted to copy and distribute verbatim copies -of this license document, but changing it is not allowed. - - Preamble - -The licenses for most software are designed to take away your + The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This @@ -36,48 +18,48 @@ using it. (Some other Free Software Foundation software is covered by the GNU Lesser General Public License instead.) You can apply it to your programs, too. -When we speak of free software, we are referring to freedom, not + When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. -To protect your rights, we need to make restrictions that forbid + To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. -For example, if you distribute copies of such a program, whether + For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. -We protect your rights with two steps: (1) copyright the software, and + We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. -Also, for each author's protection and ours, we want to make certain + Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. -Finally, any free program is threatened constantly by software + Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. -The precise terms and conditions for copying, distribution and + The precise terms and conditions for copying, distribution and modification follow. -GNU GENERAL PUBLIC LICENSE -TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION -0. This License applies to any program or other work which contains + 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" @@ -94,7 +76,7 @@ is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. -1. You may copy and distribute verbatim copies of the Program's + 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the @@ -105,29 +87,29 @@ along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. -2. You may modify your copy or copies of the Program or any portion + 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: -a) You must cause the modified files to carry prominent notices -stating that you changed the files and the date of any change. + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. -b) You must cause any work that you distribute or publish, that in -whole or in part contains or is derived from the Program or any -part thereof, to be licensed as a whole at no charge to all third -parties under the terms of this License. + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. -c) If the modified program normally reads commands interactively -when run, you must cause it, when started running for such -interactive use in the most ordinary way, to print or display an -announcement including an appropriate copyright notice and a -notice that there is no warranty (or else, saying that you provide -a warranty) and that users may redistribute the program under -these conditions, and telling the user how to view a copy of this -License. (Exception: if the Program itself is interactive but -does not normally print such an announcement, your work based on -the Program is not required to print an announcement.) + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, @@ -149,26 +131,26 @@ with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. -3. You may copy and distribute the Program (or a work based on it, + 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: -a) Accompany it with the complete corresponding machine-readable -source code, which must be distributed under the terms of Sections -1 and 2 above on a medium customarily used for software interchange; or, + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, -b) Accompany it with a written offer, valid for at least three -years, to give any third party, for a charge no more than your -cost of physically performing source distribution, a complete -machine-readable copy of the corresponding source code, to be -distributed under the terms of Sections 1 and 2 above on a medium -customarily used for software interchange; or, + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, -c) Accompany it with the information you received as to the offer -to distribute corresponding source code. (This alternative is -allowed only for noncommercial distribution and only if you -received the program in object code or executable form with such -an offer, in accord with Subsection b above.) + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source @@ -187,7 +169,7 @@ access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. -4. You may not copy, modify, sublicense, or distribute the Program + 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. @@ -195,7 +177,7 @@ However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. -5. You are not required to accept this License, since you have not + 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by @@ -204,7 +186,7 @@ Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. -6. Each time you redistribute the Program (or any work based on the + 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further @@ -212,7 +194,7 @@ restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. -7. If, as a consequence of a court judgment or allegation of patent + 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not @@ -244,7 +226,7 @@ impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. -8. If the distribution and/or use of the Program is restricted in + 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding @@ -252,7 +234,7 @@ those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. -9. The Free Software Foundation may publish revised and/or new versions + 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. @@ -265,7 +247,7 @@ Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. -10. If you wish to incorporate parts of the Program into other free + 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes @@ -273,9 +255,9 @@ make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. - NO WARRANTY + NO WARRANTY -11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED @@ -285,7 +267,7 @@ TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. -12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING @@ -295,45 +277,45 @@ YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - END OF TERMS AND CONDITIONS + END OF TERMS AND CONDITIONS -How to Apply These Terms to Your New Programs + How to Apply These Terms to Your New Programs -If you develop a new program, and you want it to be of the greatest + If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. -To do so, attach the following notices to the program. It is safest + To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. - -Copyright (C) + {description} + Copyright (C) {year} {fullname} -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. -You should have received a copy of the GNU General Public License along -with this program; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: -Gnomovision version 69, Copyright (C) year name of author -Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. -This is free software, and you are welcome to redistribute it -under certain conditions; type `show c' for details. + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may @@ -344,14 +326,15 @@ You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: -Yoyodyne, Inc., hereby disclaims all copyright interest in the program -`Gnomovision' (which makes passes at compilers) written by James Hacker. + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. -, 1 April 1989 -Ty Coon, President of Vice + {signature of Ty Coon}, 1 April 1989 + Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. + diff --git a/wp-content/upgrade-temp-backup/plugins/menu-icons/vendor/enshrined/svg-sanitize/README.md b/wp-content/upgrade-temp-backup/plugins/menu-icons/vendor/enshrined/svg-sanitize/README.md new file mode 100644 index 00000000..39292516 --- /dev/null +++ b/wp-content/upgrade-temp-backup/plugins/menu-icons/vendor/enshrined/svg-sanitize/README.md @@ -0,0 +1,93 @@ +# svg-sanitizer + +[![Build Status](https://travis-ci.org/darylldoyle/svg-sanitizer.svg?branch=master)](https://travis-ci.org/darylldoyle/svg-sanitizer) [![Test Coverage](https://codeclimate.com/github/darylldoyle/svg-sanitizer/badges/coverage.svg)](https://codeclimate.com/github/darylldoyle/svg-sanitizer/coverage) + +This is my attempt at building a decent SVG sanitizer in PHP. The work is largely borrowed from [DOMPurify](https://github.com/cure53/DOMPurify). + +## Installation + +Either require `enshrined/svg-sanitize` through composer or download the repo and include the old way! + +## Usage + +Using this is fairly easy. Create a new instance of `enshrined\svgSanitize\Sanitizer` and then call the `sanitize` whilst passing in your dirty SVG/XML + +**Basic Example** + +```php +use enshrined\svgSanitize\Sanitizer; + +// Create a new sanitizer instance +$sanitizer = new Sanitizer(); + +// Load the dirty svg +$dirtySVG = file_get_contents('filthy.svg'); + +// Pass it to the sanitizer and get it back clean +$cleanSVG = $sanitizer->sanitize($dirtySVG); + +// Now do what you want with your clean SVG/XML data + +``` + +## Output + +This will either return a sanitized SVG/XML string or boolean `false` if XML parsing failed (usually due to a badly formatted file). + +## Options + +You may pass your own whitelist of tags and attributes by using the `Sanitizer::setAllowedTags` and `Sanitizer::setAllowedAttrs` methods respectively. + +These methods require that you implement the `enshrined\svgSanitize\data\TagInterface` or `enshrined\svgSanitize\data\AttributeInterface`. + +## Remove remote references + +You have the option to remove attributes that reference remote files, this will stop HTTP leaks but will add an overhead to the sanitizer. + +This defaults to false, set to true to remove references. + +`$sanitizer->removeRemoteReferences(true);` + +## Viewing Sanitization Issues + +You may use the `getXmlIssues()` method to return an array of issues that occurred during sanitization. + +This may be useful for logging or providing feedback to the user on why an SVG was refused. + +`$issues = $sanitizer->getXmlIssues();` + +## Minification + +You can minify the XML output by calling `$sanitizer->minify(true);`. + +## Demo +There is a demo available at: [http://svg.enshrined.co.uk/](http://svg.enshrined.co.uk/) + +## WordPress + +I've just released a WordPress plugin containing this code so you can sanitize your WordPress uploads. It's available from the WordPress plugin directory: [https://wordpress.org/plugins/safe-svg/](https://wordpress.org/plugins/safe-svg/) + +## Drupal + +[Michael Potter](https://github.com/heyMP) has kindly created a Drupal module for this library which is available at: [https://www.drupal.org/project/svg_sanitizer](https://www.drupal.org/project/svg_sanitizer) + +## TYPO3 + +This SVG sanitizer library is used per default in the core of TYPO3 v9 and later versions. +See [corresponding changelog entry](https://docs.typo3.org/c/typo3/cms-core/main/en-us/Changelog/9.5.x/Important-94492-IntroduceSVGSanitizer.html) for more details. + +## Tests + +You can run these by running `vendor/bin/phpunit` from the base directory of this package. + +## Standalone scanning of files via CLI + +Thanks to the work by [gudmdharalds](https://github.com/gudmdharalds) there's now a standalone scanner that can be used via the CLI. + +Any errors will be output in JSON format. See [the PR](https://github.com/darylldoyle/svg-sanitizer/pull/25) for an example. + +Use it as follows: `php svg-scanner.php ~/svgs/myfile.svg` + +## To-Do + +More extensive testing for the SVGs/XML would be lovely, I'll try and add these soon. If you feel like doing it for me, please do and make a PR! diff --git a/wp-content/upgrade-temp-backup/plugins/menu-icons/vendor/enshrined/svg-sanitize/src/ElementReference/Resolver.php b/wp-content/upgrade-temp-backup/plugins/menu-icons/vendor/enshrined/svg-sanitize/src/ElementReference/Resolver.php new file mode 100644 index 00000000..cd7a8406 --- /dev/null +++ b/wp-content/upgrade-temp-backup/plugins/menu-icons/vendor/enshrined/svg-sanitize/src/ElementReference/Resolver.php @@ -0,0 +1,169 @@ +xPath = $xPath; + $this->useNestingLimit = $useNestingLimit; + } + + public function collect() + { + $this->collectIdentifiedElements(); + $this->processReferences(); + $this->determineInvalidSubjects(); + } + + /** + * Resolves one subject by element. + * + * @param \DOMElement $element + * @param bool $considerChildren Whether to search in Subject's children as well + * @return Subject|null + */ + public function findByElement(\DOMElement $element, $considerChildren = false) + { + foreach ($this->subjects as $subject) { + if ( + $element === $subject->getElement() + || $considerChildren && Helper::isElementContainedIn($element, $subject->getElement()) + ) { + return $subject; + } + } + return null; + } + + /** + * Resolves subjects (plural!) by element id - in theory malformed + * DOM might have same ids assigned to different elements and leaving + * it to client/browser implementation which element to actually use. + * + * @param string $elementId + * @return Subject[] + */ + public function findByElementId($elementId) + { + return array_filter( + $this->subjects, + function (Subject $subject) use ($elementId) { + return $elementId === $subject->getElementId(); + } + ); + } + + /** + * Collects elements having `id` attribute (those that can be referenced). + */ + protected function collectIdentifiedElements() + { + /** @var \DOMNodeList|\DOMElement[] $elements */ + $elements = $this->xPath->query('//*[@id]'); + foreach ($elements as $element) { + $this->subjects[$element->getAttribute('id')] = new Subject($element, $this->useNestingLimit); + } + } + + /** + * Processes references from and to elements having `id` attribute concerning + * their occurrence in `` statements. + */ + protected function processReferences() + { + $useNodeName = $this->xPath->createNodeName('use'); + foreach ($this->subjects as $subject) { + $useElements = $this->xPath->query( + $useNodeName . '[@href or @xlink:href]', + $subject->getElement() + ); + + /** @var \DOMElement $useElement */ + foreach ($useElements as $useElement) { + $useId = Helper::extractIdReferenceFromHref( + Helper::getElementHref($useElement) + ); + if ($useId === null || !isset($this->subjects[$useId])) { + continue; + } + $subject->addUse($this->subjects[$useId]); + $this->subjects[$useId]->addUsedIn($subject); + } + } + } + + /** + * Determines and tags infinite loops. + */ + protected function determineInvalidSubjects() + { + foreach ($this->subjects as $subject) { + + if (in_array($subject->getElement(), $this->elementsToRemove)) { + continue; + } + + $useId = Helper::extractIdReferenceFromHref( + Helper::getElementHref($subject->getElement()) + ); + + try { + if ($useId === $subject->getElementId()) { + $this->markSubjectAsInvalid($subject); + } elseif ($subject->hasInfiniteLoop()) { + $this->markSubjectAsInvalid($subject); + } + } catch (NestingException $e) { + $this->elementsToRemove[] = $e->getElement(); + $this->markSubjectAsInvalid($subject); + } + } + } + + /** + * Get all the elements that caused a nesting exception. + * + * @return array + */ + public function getElementsToRemove() { + return $this->elementsToRemove; + } + + /** + * The Subject is invalid for some reason, therefore we should + * remove it and all it's child usages. + * + * @param Subject $subject + */ + protected function markSubjectAsInvalid(Subject $subject) { + $this->elementsToRemove = array_merge( + $this->elementsToRemove, + $subject->clearInternalAndGetAffectedElements() + ); + } +} \ No newline at end of file diff --git a/wp-content/upgrade-temp-backup/plugins/menu-icons/vendor/enshrined/svg-sanitize/src/ElementReference/Subject.php b/wp-content/upgrade-temp-backup/plugins/menu-icons/vendor/enshrined/svg-sanitize/src/ElementReference/Subject.php new file mode 100644 index 00000000..3610f0f9 --- /dev/null +++ b/wp-content/upgrade-temp-backup/plugins/menu-icons/vendor/enshrined/svg-sanitize/src/ElementReference/Subject.php @@ -0,0 +1,153 @@ +element = $element; + $this->useNestingLimit = $useNestingLimit; + } + + /** + * @return \DOMElement + */ + public function getElement() + { + return $this->element; + } + + /** + * @return string + */ + public function getElementId() + { + return $this->element->getAttribute('id'); + } + + /** + * @param array $subjects Previously processed subjects + * @param int $level The current level of nesting. + * @return bool + * @throws \enshrined\svgSanitize\Exceptions\NestingException + */ + public function hasInfiniteLoop(array $subjects = [], $level = 1) + { + if ($level > $this->useNestingLimit) { + throw new \enshrined\svgSanitize\Exceptions\NestingException('Nesting level too high, aborting', 1570713498, null, $this->getElement()); + } + + if (in_array($this, $subjects, true)) { + return true; + } + $subjects[] = $this; + foreach ($this->useCollection as $usage) { + if ($usage->getSubject()->hasInfiniteLoop($subjects, $level + 1)) { + return true; + } + } + return false; + } + + /** + * @param Subject $subject + */ + public function addUse(Subject $subject) + { + if ($subject === $this) { + throw new \LogicException('Cannot add self usage', 1570713416); + } + $identifier = $subject->getElementId(); + if (isset($this->useCollection[$identifier])) { + $this->useCollection[$identifier]->increment(); + return; + } + $this->useCollection[$identifier] = new Usage($subject); + } + + /** + * @param Subject $subject + */ + public function addUsedIn(Subject $subject) + { + if ($subject === $this) { + throw new \LogicException('Cannot add self as usage', 1570713417); + } + $identifier = $subject->getElementId(); + if (isset($this->usedInCollection[$identifier])) { + $this->usedInCollection[$identifier]->increment(); + return; + } + $this->usedInCollection[$identifier] = new Usage($subject); + } + + /** + * @param bool $accumulated + * @return int + */ + public function countUse($accumulated = false) + { + $count = 0; + foreach ($this->useCollection as $use) { + $useCount = $use->getSubject()->countUse(); + $count += $use->getCount() * ($accumulated ? 1 + $useCount : max(1, $useCount)); + } + return $count; + } + + /** + * @return int + */ + public function countUsedIn() + { + $count = 0; + foreach ($this->usedInCollection as $usedIn) { + $count += $usedIn->getCount() * max(1, $usedIn->getSubject()->countUsedIn()); + } + return $count; + } + + /** + * Clear the internal arrays (to free up memory as they can get big) + * and return all the child usages DOMElement's + * + * @return array + */ + public function clearInternalAndGetAffectedElements() + { + $elements = array_map(function(Usage $usage) { + return $usage->getSubject()->getElement(); + }, $this->useCollection); + + $this->usedInCollection = []; + $this->useCollection = []; + + return $elements; + } +} \ No newline at end of file diff --git a/wp-content/upgrade-temp-backup/plugins/menu-icons/vendor/enshrined/svg-sanitize/src/ElementReference/Usage.php b/wp-content/upgrade-temp-backup/plugins/menu-icons/vendor/enshrined/svg-sanitize/src/ElementReference/Usage.php new file mode 100644 index 00000000..d0ba62d7 --- /dev/null +++ b/wp-content/upgrade-temp-backup/plugins/menu-icons/vendor/enshrined/svg-sanitize/src/ElementReference/Usage.php @@ -0,0 +1,49 @@ +subject = $subject; + $this->count = (int)$count; + } + + /** + * @param int $by + */ + public function increment($by = 1) + { + $this->count += (int)$by; + } + + /** + * @return Subject + */ + public function getSubject() + { + return $this->subject; + } + + /** + * @return int + */ + public function getCount() + { + return $this->count; + } +} \ No newline at end of file diff --git a/wp-content/upgrade-temp-backup/plugins/menu-icons/vendor/enshrined/svg-sanitize/src/Exceptions/NestingException.php b/wp-content/upgrade-temp-backup/plugins/menu-icons/vendor/enshrined/svg-sanitize/src/Exceptions/NestingException.php new file mode 100644 index 00000000..474b9871 --- /dev/null +++ b/wp-content/upgrade-temp-backup/plugins/menu-icons/vendor/enshrined/svg-sanitize/src/Exceptions/NestingException.php @@ -0,0 +1,36 @@ +element = $element; + parent::__construct($message, $code, $previous); + } + + /** + * Get the element that caused the exception. + * + * @return \DOMElement + */ + public function getElement() + { + return $this->element; + } +} diff --git a/wp-content/upgrade-temp-backup/plugins/menu-icons/vendor/enshrined/svg-sanitize/src/Helper.php b/wp-content/upgrade-temp-backup/plugins/menu-icons/vendor/enshrined/svg-sanitize/src/Helper.php new file mode 100644 index 00000000..6e25003c --- /dev/null +++ b/wp-content/upgrade-temp-backup/plugins/menu-icons/vendor/enshrined/svg-sanitize/src/Helper.php @@ -0,0 +1,53 @@ +hasAttribute('href')) { + return $element->getAttribute('href'); + } + if ($element->hasAttributeNS('http://www.w3.org/1999/xlink', 'href')) { + return $element->getAttributeNS('http://www.w3.org/1999/xlink', 'href'); + } + return null; + } + + /** + * @param string $href + * @return string|null + */ + public static function extractIdReferenceFromHref($href) + { + if (!is_string($href) || strpos($href, '#') !== 0) { + return null; + } + return substr($href, 1); + } + + /** + * @param \DOMElement $needle + * @param \DOMElement $haystack + * @return bool + */ + public static function isElementContainedIn(\DOMElement $needle, \DOMElement $haystack) + { + if ($needle === $haystack) { + return true; + } + foreach ($haystack->childNodes as $childNode) { + if (!$childNode instanceof \DOMElement) { + continue; + } + if (self::isElementContainedIn($needle, $childNode)) { + return true; + } + } + return false; + } +} diff --git a/wp-content/upgrade-temp-backup/plugins/menu-icons/vendor/enshrined/svg-sanitize/src/Sanitizer.php b/wp-content/upgrade-temp-backup/plugins/menu-icons/vendor/enshrined/svg-sanitize/src/Sanitizer.php new file mode 100644 index 00000000..60072fad --- /dev/null +++ b/wp-content/upgrade-temp-backup/plugins/menu-icons/vendor/enshrined/svg-sanitize/src/Sanitizer.php @@ -0,0 +1,701 @@ +allowedAttrs = array_map('strtolower', AllowedAttributes::getAttributes()); + $this->allowedTags = array_map('strtolower', AllowedTags::getTags()); + } + + /** + * Set up the DOMDocument + */ + protected function resetInternal() + { + $this->xmlDocument = new \DOMDocument(); + $this->xmlDocument->preserveWhiteSpace = false; + $this->xmlDocument->strictErrorChecking = false; + $this->xmlDocument->formatOutput = !$this->minifyXML; + } + + /** + * Set XML options to use when saving XML + * See: DOMDocument::saveXML + * + * @param int $xmlOptions + */ + public function setXMLOptions($xmlOptions) + { + $this->xmlOptions = $xmlOptions; + } + + /** + * Get XML options to use when saving XML + * See: DOMDocument::saveXML + * + * @return int + */ + public function getXMLOptions() + { + return $this->xmlOptions; + } + + /** + * Get the array of allowed tags + * + * @return array + */ + public function getAllowedTags() + { + return $this->allowedTags; + } + + /** + * Set custom allowed tags + * + * @param TagInterface $allowedTags + */ + public function setAllowedTags(TagInterface $allowedTags) + { + $this->allowedTags = array_map('strtolower', $allowedTags::getTags()); + } + + /** + * Get the array of allowed attributes + * + * @return array + */ + public function getAllowedAttrs() + { + return $this->allowedAttrs; + } + + /** + * Set custom allowed attributes + * + * @param AttributeInterface $allowedAttrs + */ + public function setAllowedAttrs(AttributeInterface $allowedAttrs) + { + $this->allowedAttrs = array_map('strtolower', $allowedAttrs::getAttributes()); + } + + /** + * Should we remove references to remote files? + * + * @param bool $removeRemoteRefs + */ + public function removeRemoteReferences($removeRemoteRefs = false) + { + $this->removeRemoteReferences = $removeRemoteRefs; + } + + /** + * Get XML issues. + * + * @return array + */ + public function getXmlIssues() { + return $this->xmlIssues; + } + + /** + * Can we allow huge files? + * + * @return bool + */ + public function getAllowHugeFiles() { + return $this->allowHugeFiles; + } + + /** + * Set whether we can allow huge files. + * + * @param bool $allowHugeFiles + */ + public function setAllowHugeFiles( $allowHugeFiles ) { + $this->allowHugeFiles = $allowHugeFiles; + } + + + /** + * Sanitize the passed string + * + * @param string $dirty + * @return string|false + */ + public function sanitize($dirty) + { + // Don't run on an empty string + if (empty($dirty)) { + return ''; + } + + // Strip php tags + $dirty = preg_replace('/<\?(=|php)(.+?)\?>/i', '', $dirty); + + $this->resetInternal(); + $this->setUpBefore(); + + $loaded = $this->xmlDocument->loadXML($dirty, $this->getAllowHugeFiles() ? LIBXML_PARSEHUGE : 0); + + // If we couldn't parse the XML then we go no further. Reset and return false + if (!$loaded) { + $this->resetAfter(); + return false; + } + + // Pre-process all identified elements + $xPath = new XPath($this->xmlDocument); + $this->elementReferenceResolver = new Resolver($xPath, $this->useNestingLimit); + $this->elementReferenceResolver->collect(); + $elementsToRemove = $this->elementReferenceResolver->getElementsToRemove(); + + // Start the cleaning process + $this->startClean($this->xmlDocument->childNodes, $elementsToRemove); + + // Save cleaned XML to a variable + if ($this->removeXMLTag) { + $clean = $this->xmlDocument->saveXML($this->xmlDocument->documentElement, $this->xmlOptions); + } else { + $clean = $this->xmlDocument->saveXML($this->xmlDocument, $this->xmlOptions); + } + + $this->resetAfter(); + + // Remove any extra whitespaces when minifying + if ($this->minifyXML) { + $clean = preg_replace('/\s+/', ' ', $clean); + } + + // Return result + return $clean; + } + + /** + * Set up libXML before we start + */ + protected function setUpBefore() + { + // This function has been deprecated in PHP 8.0 because in libxml 2.9.0, external entity loading is + // disabled by default, so this function is no longer needed to protect against XXE attacks. + if (\LIBXML_VERSION < 20900) { + // Turn off the entity loader + $this->xmlLoaderValue = libxml_disable_entity_loader(true); + } + + // Suppress the errors because we don't really have to worry about formation before cleansing. + // See reset in resetAfter(). + $this->xmlErrorHandlerPreviousValue = libxml_use_internal_errors(true); + + // Reset array of altered XML + $this->xmlIssues = array(); + } + + /** + * Reset the class after use + */ + protected function resetAfter() + { + // This function has been deprecated in PHP 8.0 because in libxml 2.9.0, external entity loading is + // disabled by default, so this function is no longer needed to protect against XXE attacks. + if (\LIBXML_VERSION < 20900) { + // Reset the entity loader + libxml_disable_entity_loader($this->xmlLoaderValue); + } + + libxml_clear_errors(); + libxml_use_internal_errors($this->xmlErrorHandlerPreviousValue); + } + + /** + * Start the cleaning with tags, then we move onto attributes and hrefs later + * + * @param \DOMNodeList $elements + * @param array $elementsToRemove + */ + protected function startClean(\DOMNodeList $elements, array $elementsToRemove) + { + // loop through all elements + // we do this backwards so we don't skip anything if we delete a node + // see comments at: http://php.net/manual/en/class.domnamednodemap.php + for ($i = $elements->length - 1; $i >= 0; $i--) { + /** @var \DOMElement $currentElement */ + $currentElement = $elements->item($i); + + /** + * If the element has exceeded the nesting limit, we should remove it. + * + * As it's only elements that cause us issues with nesting DOS attacks + * we should check what the element is before removing it. For now we'll only + * remove elements. + */ + if (in_array($currentElement, $elementsToRemove) && 'use' === $currentElement->nodeName) { + $currentElement->parentNode->removeChild($currentElement); + $this->xmlIssues[] = array( + 'message' => 'Invalid \'' . $currentElement->tagName . '\'', + 'line' => $currentElement->getLineNo(), + ); + continue; + } + + if ($currentElement instanceof \DOMElement) { + // If the tag isn't in the whitelist, remove it and continue with next iteration + if (!in_array(strtolower($currentElement->tagName), $this->allowedTags)) { + $currentElement->parentNode->removeChild($currentElement); + $this->xmlIssues[] = array( + 'message' => 'Suspicious tag \'' . $currentElement->tagName . '\'', + 'line' => $currentElement->getLineNo(), + ); + continue; + } + + $this->cleanHrefs( $currentElement ); + + $this->cleanXlinkHrefs( $currentElement ); + + $this->cleanAttributesOnWhitelist($currentElement); + + if (strtolower($currentElement->tagName) === 'use') { + if ($this->isUseTagDirty($currentElement) + || $this->isUseTagExceedingThreshold($currentElement) + ) { + $currentElement->parentNode->removeChild($currentElement); + $this->xmlIssues[] = array( + 'message' => 'Suspicious \'' . $currentElement->tagName . '\'', + 'line' => $currentElement->getLineNo(), + ); + continue; + } + } + + // Strip out font elements that will break out of foreign content. + if (strtolower($currentElement->tagName) === 'font') { + $breaksOutOfForeignContent = false; + for ($x = $currentElement->attributes->length - 1; $x >= 0; $x--) { + // get attribute name + $attrName = $currentElement->attributes->item( $x )->name; + + if (in_array(strtolower($attrName), ['face', 'color', 'size'])) { + $breaksOutOfForeignContent = true; + } + } + + if ($breaksOutOfForeignContent) { + $currentElement->parentNode->removeChild($currentElement); + $this->xmlIssues[] = array( + 'message' => 'Suspicious tag \'' . $currentElement->tagName . '\'', + 'line' => $currentElement->getLineNo(), + ); + continue; + } + } + } + + $this->cleanUnsafeNodes($currentElement); + + if ($currentElement->hasChildNodes()) { + $this->startClean($currentElement->childNodes, $elementsToRemove); + } + } + } + + /** + * Only allow attributes that are on the whitelist + * + * @param \DOMElement $element + */ + protected function cleanAttributesOnWhitelist(\DOMElement $element) + { + for ($x = $element->attributes->length - 1; $x >= 0; $x--) { + // get attribute name + $attrName = $element->attributes->item($x)->name; + + // Remove attribute if not in whitelist + if (!in_array(strtolower($attrName), $this->allowedAttrs) && !$this->isAriaAttribute(strtolower($attrName)) && !$this->isDataAttribute(strtolower($attrName))) { + + $element->removeAttribute($attrName); + $this->xmlIssues[] = array( + 'message' => 'Suspicious attribute \'' . $attrName . '\'', + 'line' => $element->getLineNo(), + ); + } + + /** + * This is used for when a namespace isn't imported properly. + * Such as xlink:href when the xlink namespace isn't imported. + * We have to do this as the link is still ran in this case. + */ + if (false !== strpos($attrName, 'href')) { + $href = $element->getAttribute($attrName); + if (false === $this->isHrefSafeValue($href)) { + $element->removeAttribute($attrName); + $this->xmlIssues[] = array( + 'message' => 'Suspicious attribute \'href\'', + 'line' => $element->getLineNo(), + ); + } + } + + // Do we want to strip remote references? + if($this->removeRemoteReferences) { + // Remove attribute if it has a remote reference + if (isset($element->attributes->item($x)->value) && $this->hasRemoteReference($element->attributes->item($x)->value)) { + $element->removeAttribute($attrName); + $this->xmlIssues[] = array( + 'message' => 'Suspicious attribute \'' . $attrName . '\'', + 'line' => $element->getLineNo(), + ); + } + } + } + } + + /** + * Clean the xlink:hrefs of script and data embeds + * + * @param \DOMElement $element + */ + protected function cleanXlinkHrefs(\DOMElement $element) + { + $xlinks = $element->getAttributeNS('http://www.w3.org/1999/xlink', 'href'); + if (false === $this->isHrefSafeValue($xlinks)) { + $element->removeAttributeNS( 'http://www.w3.org/1999/xlink', 'href' ); + $this->xmlIssues[] = array( + 'message' => 'Suspicious attribute \'href\'', + 'line' => $element->getLineNo(), + ); + } + } + + /** + * Clean the hrefs of script and data embeds + * + * @param \DOMElement $element + */ + protected function cleanHrefs(\DOMElement $element) + { + $href = $element->getAttribute('href'); + if (false === $this->isHrefSafeValue($href)) { + $element->removeAttribute('href'); + $this->xmlIssues[] = array( + 'message' => 'Suspicious attribute \'href\'', + 'line' => $element->getLineNo(), + ); + } + } + + /** + * Only allow whitelisted starts to be within the href. + * + * This will stop scripts etc from being passed through, with or without attempting to hide bypasses. + * This stops the need for us to use a complicated script regex. + * + * @param $value + * @return bool + */ + protected function isHrefSafeValue($value) { + + // Allow empty values + if (empty($value)) { + return true; + } + + // Allow fragment identifiers. + if ('#' === substr($value, 0, 1)) { + return true; + } + + // Allow relative URIs. + if ('/' === substr($value, 0, 1)) { + return true; + } + + // Allow HTTPS domains. + if ('https://' === substr($value, 0, 8)) { + return true; + } + + // Allow HTTP domains. + if ('http://' === substr($value, 0, 7)) { + return true; + } + + // Allow known data URIs. + if (in_array(substr($value, 0, 14), array( + 'data:image/png', // PNG + 'data:image/gif', // GIF + 'data:image/jpg', // JPG + 'data:image/jpe', // JPEG + 'data:image/pjp', // PJPEG + ))) { + return true; + } + + // Allow known short data URIs. + if (in_array(substr($value, 0, 12), array( + 'data:img/png', // PNG + 'data:img/gif', // GIF + 'data:img/jpg', // JPG + 'data:img/jpe', // JPEG + 'data:img/pjp', // PJPEG + ))) { + return true; + } + + return false; + } + + /** + * Removes non-printable ASCII characters from string & trims it + * + * @param string $value + * @return bool + */ + protected function removeNonPrintableCharacters($value) + { + return trim(preg_replace('/[^ -~]/xu','',$value)); + } + + /** + * Does this attribute value have a remote reference? + * + * @param $value + * @return bool + */ + protected function hasRemoteReference($value) + { + $value = $this->removeNonPrintableCharacters($value); + + $wrapped_in_url = preg_match('~^url\(\s*[\'"]\s*(.*)\s*[\'"]\s*\)$~xi', $value, $match); + if (!$wrapped_in_url){ + return false; + } + + $value = trim($match[1], '\'"'); + + return preg_match('~^((https?|ftp|file):)?//~xi', $value); + } + + /** + * Should we minify the output? + * + * @param bool $shouldMinify + */ + public function minify($shouldMinify = false) + { + $this->minifyXML = (bool) $shouldMinify; + } + + /** + * Should we remove the XML tag in the header? + * + * @param bool $removeXMLTag + */ + public function removeXMLTag($removeXMLTag = false) + { + $this->removeXMLTag = (bool) $removeXMLTag; + } + + /** + * Whether `` elements shall be + * removed in case expansion would exceed this threshold. + * + * @param int $useThreshold + */ + public function useThreshold($useThreshold = 1000) + { + $this->useThreshold = (int)$useThreshold; + } + + /** + * Check to see if an attribute is an aria attribute or not + * + * @param $attributeName + * + * @return bool + */ + protected function isAriaAttribute($attributeName) + { + return strpos($attributeName, 'aria-') === 0; + } + + /** + * Check to see if an attribute is an data attribute or not + * + * @param $attributeName + * + * @return bool + */ + protected function isDataAttribute($attributeName) + { + return strpos($attributeName, 'data-') === 0; + } + + /** + * Make sure our use tag is only referencing internal resources + * + * @param \DOMElement $element + * @return bool + */ + protected function isUseTagDirty(\DOMElement $element) + { + $href = Helper::getElementHref($element); + return $href && strpos($href, '#') !== 0; + } + + /** + * Determines whether `` is expanded + * recursively in order to create DoS scenarios. The amount of a actually + * used element needs to be below `$this->useThreshold`. + * + * @param \DOMElement $element + * @return bool + */ + protected function isUseTagExceedingThreshold(\DOMElement $element) + { + if ($this->useThreshold <= 0) { + return false; + } + $useId = Helper::extractIdReferenceFromHref( + Helper::getElementHref($element) + ); + if ($useId === null) { + return false; + } + foreach ($this->elementReferenceResolver->findByElementId($useId) as $subject) { + if ($subject->countUse() >= $this->useThreshold) { + return true; + } + } + return false; + } + + /** + * Set the nesting limit for tags. + * + * @param $limit + */ + public function setUseNestingLimit($limit) + { + $this->useNestingLimit = (int) $limit; + } + + /** + * Remove nodes that are either invalid or malformed. + * + * @param \DOMNode $currentElement The current element. + */ + protected function cleanUnsafeNodes(\DOMNode $currentElement) { + // Replace CDATA node with encoded text node + if ($currentElement instanceof \DOMCdataSection) { + $textNode = $currentElement->ownerDocument->createTextNode($currentElement->nodeValue); + $currentElement->parentNode->replaceChild($textNode, $currentElement); + // If the element doesn't have a tagname, remove it and continue with next iteration + } elseif (!$currentElement instanceof \DOMElement && !$currentElement instanceof \DOMText) { + $currentElement->parentNode->removeChild($currentElement); + $this->xmlIssues[] = array( + 'message' => 'Suspicious node \'' . $currentElement->nodeName . '\'', + 'line' => $currentElement->getLineNo(), + ); + return; + } + + if ( $currentElement->childNodes && $currentElement->childNodes->length > 0 ) { + for ($j = $currentElement->childNodes->length - 1; $j >= 0; $j--) { + /** @var \DOMElement $childElement */ + $childElement = $currentElement->childNodes->item($j); + $this->cleanUnsafeNodes($childElement); + } + } + } +} diff --git a/wp-content/upgrade-temp-backup/plugins/menu-icons/vendor/enshrined/svg-sanitize/src/data/AllowedAttributes.php b/wp-content/upgrade-temp-backup/plugins/menu-icons/vendor/enshrined/svg-sanitize/src/data/AllowedAttributes.php new file mode 100644 index 00000000..2b73b574 --- /dev/null +++ b/wp-content/upgrade-temp-backup/plugins/menu-icons/vendor/enshrined/svg-sanitize/src/data/AllowedAttributes.php @@ -0,0 +1,356 @@ +handleDefaultNamespace(); + } + + /** + * @param string $nodeName + * @return string + */ + public function createNodeName($nodeName) + { + if (empty($this->defaultNamespaceURI)) { + return $nodeName; + } + return self::DEFAULT_NAMESPACE_PREFIX . ':' . $nodeName; + } + + protected function handleDefaultNamespace() + { + $rootElements = $this->getRootElements(); + + if (count($rootElements) !== 1) { + throw new \LogicException( + sprintf('Got %d svg elements, expected exactly one', count($rootElements)), + 1570870568 + ); + } + $this->defaultNamespaceURI = (string)$rootElements[0]->namespaceURI; + + if ($this->defaultNamespaceURI !== '') { + $this->registerNamespace(self::DEFAULT_NAMESPACE_PREFIX, $this->defaultNamespaceURI); + } + } + + /** + * @return \DOMElement[] + */ + protected function getRootElements() + { + $rootElements = []; + $elements = $this->document->getElementsByTagName('svg'); + /** @var \DOMElement $element */ + foreach ($elements as $element) { + if ($element->parentNode !== $this->document) { + continue; + } + $rootElements[] = $element; + } + return $rootElements; + } +} diff --git a/wp-content/upgrade-temp-backup/plugins/menu-icons/vendor/enshrined/svg-sanitize/src/svg-scanner.php b/wp-content/upgrade-temp-backup/plugins/menu-icons/vendor/enshrined/svg-sanitize/src/svg-scanner.php new file mode 100644 index 00000000..e5007713 --- /dev/null +++ b/wp-content/upgrade-temp-backup/plugins/menu-icons/vendor/enshrined/svg-sanitize/src/svg-scanner.php @@ -0,0 +1,192 @@ +#!/usr/bin/env php + array( + 'errors' => 0, + ), + + 'files' => array( + ), +); + + +/* + * Catch files to scan from $argv. + */ + +$files_to_scan = $argv; +unset( $files_to_scan[0] ); + +$files_to_scan = array_values( + $files_to_scan +); + +/* + * Catch no file specified. + */ + +if ( empty( $files_to_scan ) ) { + $results['totals']['errors']++; + $results['messages'] = array( + array( 'No files to scan specified' ), + ); + + sysexit( + $results, + 1 + ); +} + +/* + * Initialize the SVG scanner. + * + * Make sure to allow custom attributes, + * and to remove remote references. + */ +$sanitizer = new enshrined\svgSanitize\Sanitizer(); + +$sanitizer->removeRemoteReferences( true ); + +/* + * Scan each file specified to be scanned. + */ + +foreach( $files_to_scan as $file_name ) { + /* + * Read SVG file. + */ + $svg_file = @file_get_contents( $file_name ); + + /* + * If not found, report that and continue. + */ + if ( false === $svg_file ) { + $results['totals']['errors']++; + + $results['files'][ $file_name ][] = array( + 'errors' => 1, + 'messages' => array( + array( + 'message' => 'File specified could not be read (' . $file_name . ')', + 'line' => null, + ), + ), + ); + + continue; + } + + /* + * Sanitize file and get issues found. + */ + $sanitize_status = $sanitizer->sanitize( $svg_file ); + + $xml_issues = $sanitizer->getXmlIssues(); + + /* + * If we find no issues, simply note that. + */ + if ( empty( $xml_issues ) && ( false !== $sanitize_status ) ) { + $results['files'][ $file_name ] = array( + 'errors' => 0, + 'messages' => array() + ); + } + + /* + * Could not sanitize the file. + */ + else if ( + ( '' === $sanitize_status ) || + ( false === $sanitize_status ) + ) { + $results['totals']['errors']++; + + $results['files'][ $file_name ] = array( + 'errors' => 1, + 'messages' => array( + array( + 'message' => 'Unable to sanitize file \'' . $file_name . '\'' , + 'line' => null, + ) + ), + ); + } + + /* + * If we find issues, note it and update statistics. + */ + + else { + $results['totals']['errors'] += count( $xml_issues ); + + $results['files'][ $file_name ] = array( + 'errors' => count( $xml_issues ), + 'messages' => $xml_issues, + ); + } + + unset( $svg_file ); + unset( $xml_issues ); + unset( $sanitize_status ); +} + + +/* + * Exit with a status + * that reflects what issues + * we found. + */ +sysexit( + $results, + ( $results['totals']['errors'] === 0 ? 0 : 1 ) +); diff --git a/wp-content/upgrade-temp-backup/plugins/simple-local-avatars/includes/class-simple-local-avatars.php b/wp-content/upgrade-temp-backup/plugins/simple-local-avatars/includes/class-simple-local-avatars.php index df0146e1..f7fe83d6 100644 --- a/wp-content/upgrade-temp-backup/plugins/simple-local-avatars/includes/class-simple-local-avatars.php +++ b/wp-content/upgrade-temp-backup/plugins/simple-local-avatars/includes/class-simple-local-avatars.php @@ -276,7 +276,14 @@ class Simple_Local_Avatars { // Local only mode if ( ! $simple_local_avatar_url ) { - $args['url'] = $this->get_default_avatar_url( $args['size'] ); + $default_url = $this->get_default_avatar_url( $args['size'] ); + $avatar_default = get_option( 'avatar_default' ); + + if ( ! empty( $this->options['only'] ) ) { + $args['url'] = $default_url; + } elseif ( 'simple_local_avatar' === $avatar_default ) { + $args['default'] = $default_url; + } } if ( ! empty( $args['url'] ) ) { @@ -1470,6 +1477,7 @@ class Simple_Local_Avatars { +

          Discussion. This was the default behavior in 1.0. -* Localization support; German included - -= 1.0 - 2011-01-18 = -* Initial release. +[View historical changelog details here](https://github.com/10up/simple-local-avatars/blob/develop/CHANGELOG.md). == Upgrade Notice == diff --git a/wp-content/upgrade-temp-backup/plugins/simple-local-avatars/simple-local-avatars.php b/wp-content/upgrade-temp-backup/plugins/simple-local-avatars/simple-local-avatars.php index 5a3da1e2..3d34314f 100644 --- a/wp-content/upgrade-temp-backup/plugins/simple-local-avatars/simple-local-avatars.php +++ b/wp-content/upgrade-temp-backup/plugins/simple-local-avatars/simple-local-avatars.php @@ -3,13 +3,13 @@ * Plugin Name: Simple Local Avatars * Plugin URI: https://10up.com/plugins/simple-local-avatars-wordpress/ * Description: Adds an avatar upload field to user profiles. Generates requested sizes on demand, just like Gravatar! Simple and lightweight. - * Version: 2.7.8 + * Version: 2.7.10 * Requires at least: 6.3 * Requires PHP: 7.4 * Author: 10up * Author URI: https://10up.com - * License: GPLv2 or later - * License URI: https://www.gnu.org/licenses/gpl-2.0.html + * License: GPL-2.0-or-later + * License URI: https://spdx.org/licenses/GPL-2.0-or-later.html * Text Domain: simple-local-avatars * * @package SimpleLocalAvatars @@ -67,7 +67,7 @@ define( 'SLA_PLUGIN_BASENAME', plugin_basename( __FILE__ ) ); require_once dirname( __FILE__ ) . '/includes/class-simple-local-avatars.php'; // Global constants. -define( 'SLA_VERSION', '2.7.8' ); +define( 'SLA_VERSION', '2.7.10' ); define( 'SLA_PLUGIN_URL', plugin_dir_url( __FILE__ ) ); if ( ! defined( 'SLA_IS_NETWORK' ) ) { diff --git a/wp-content/upgrade-temp-backup/plugins/smtp-mailer/addons/images/smtp-mailer-reply-to.png b/wp-content/upgrade-temp-backup/plugins/smtp-mailer/addons/images/smtp-mailer-reply-to.png deleted file mode 100644 index 3e40f131..00000000 Binary files a/wp-content/upgrade-temp-backup/plugins/smtp-mailer/addons/images/smtp-mailer-reply-to.png and /dev/null differ diff --git a/wp-content/upgrade-temp-backup/plugins/smtp-mailer/addons/smtp-mailer-addons.css b/wp-content/upgrade-temp-backup/plugins/smtp-mailer/addons/smtp-mailer-addons.css deleted file mode 100644 index 92ae90df..00000000 --- a/wp-content/upgrade-temp-backup/plugins/smtp-mailer/addons/smtp-mailer-addons.css +++ /dev/null @@ -1,34 +0,0 @@ -.smtp_mailer_addons_item_canvas{ - background-color:#fff; - font-family:sans-serif,arial; - font-size:12px; - border:1px solid #ccc; - display:block; - float:left; - margin:3px 12px 12px 0; - padding:10px 0px 10px 10px; - position:relative; - width:222px; - height:340px; -} -.smtp_mailer_addons_item_canvas:hover{border-color:#999;} -.smtp_mailer_addons_item_thumb img {height: 150px; width: 200px; padding: 5px; border: 1px solid #ccc;} -.smtp_mailer_addons_item_thumb a img {border: 1px solid #ccc;} -.smtp_mailer_addons_item_body{line-height:22px;height:170px;overflow:hidden;} -.smtp_mailer_addons_item_name{font-size:16px;font-weight:bold;text-align: center;margin:10px 10px 10px 0px;} -.smtp_mailer_addons_item_description{margin:10px 10px 5px 0px;/*text-align:justify;*/overflow:hidden;height:70px;} -.smtp_mailer_addons_clear{clear:both;} -.smtp_mailer_addons_item_details_link{ - text-align: center; -} -.smtp_mailer_addons_item_details_link a{ - border: 3px solid #2d3140; - color: #2d3140; - display: inline-block; - padding: 5px 15px; - text-decoration: none !important; -} -.smtp_mailer_addons_item_details_link a:hover{ - background-color: #2d3140; - color: #FFF; -} diff --git a/wp-content/upgrade-temp-backup/plugins/smtp-mailer/addons/smtp-mailer-addons.php b/wp-content/upgrade-temp-backup/plugins/smtp-mailer/addons/smtp-mailer-addons.php deleted file mode 100644 index 1d228ff1..00000000 --- a/wp-content/upgrade-temp-backup/plugins/smtp-mailer/addons/smtp-mailer-addons.php +++ /dev/null @@ -1,41 +0,0 @@ -'; - echo '

          ' .__('SMTP Mailer Add-ons', 'smtp-mailer') . '

          '; - */ - $addons_data = array(); - - $addon_1 = array( - 'name' => 'Reply-To', - 'thumbnail' => SMTP_MAILER_URL.'/addons/images/smtp-mailer-reply-to.png', - 'description' => 'Set a Reply-To address for all outgoing email messages', - 'page_url' => 'https://wphowto.net/how-to-add-a-reply-to-address-in-the-smtp-mailer-wordpress-plugin-6997', - ); - array_push($addons_data, $addon_1); - - //Display the list - foreach ($addons_data as $addon) { - ?> -
          -
          - <?php echo esc_attr($addon['name']);?> -
          -
          -
          - -
          -
          - -
          - -
          -
          - ';//end of wrap -} diff --git a/wp-content/upgrade-temp-backup/plugins/smtp-mailer/languages/smtp-mailer.mo b/wp-content/upgrade-temp-backup/plugins/smtp-mailer/languages/smtp-mailer.mo deleted file mode 100644 index 8d576526..00000000 Binary files a/wp-content/upgrade-temp-backup/plugins/smtp-mailer/languages/smtp-mailer.mo and /dev/null differ diff --git a/wp-content/upgrade-temp-backup/plugins/smtp-mailer/languages/smtp-mailer.pot b/wp-content/upgrade-temp-backup/plugins/smtp-mailer/languages/smtp-mailer.pot deleted file mode 100644 index a67a4fd9..00000000 --- a/wp-content/upgrade-temp-backup/plugins/smtp-mailer/languages/smtp-mailer.pot +++ /dev/null @@ -1,176 +0,0 @@ -msgid "" -msgstr "" -"Project-Id-Version: SMTP Mailer\n" -"POT-Creation-Date: 2015-12-20 14:09+1000\n" -"PO-Revision-Date: 2015-12-20 14:09+1000\n" -"Last-Translator: \n" -"Language-Team: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 1.5.5\n" -"X-Poedit-KeywordsList: _e;__\n" -"X-Poedit-Basepath: .\n" -"X-Poedit-SearchPath-0: .\n" - -#: main.php:66 -msgid "Settings" -msgstr "" - -#: main.php:72 -msgid "SMTP Mailer" -msgstr "" - -#: main.php:77 -msgid "General" -msgstr "" - -#: main.php:78 -msgid "Test Email" -msgstr "" - -#: main.php:79 -msgid "Server Info" -msgstr "" - -#: main.php:82 -#, php-format -msgid "" -"Please visit the SMTP Mailer " -"documentation page for usage instructions." -msgstr "" - -#: main.php:141 -msgid "To" -msgstr "" - -#: main.php:143 -msgid "Email address of the recipient" -msgstr "" - -#: main.php:147 -msgid "Subject" -msgstr "" - -#: main.php:149 -msgid "Subject of the email" -msgstr "" - -#: main.php:153 -msgid "Message" -msgstr "" - -#: main.php:155 -msgid "Email body" -msgstr "" - -#: main.php:162 -msgid "Send Email" -msgstr "" - -#: main.php:256 -msgid "Settings Saved!" -msgstr "" - -#: main.php:286 -msgid "SMTP Host" -msgstr "" - -#: main.php:288 -msgid "" -"The SMTP server which will be used to send email. For example: smtp.gmail.com" -msgstr "" - -#: main.php:292 -msgid "SMTP Authentication" -msgstr "" - -#: main.php:295 -msgid "True" -msgstr "" - -#: main.php:296 -msgid "False" -msgstr "" - -#: main.php:298 -msgid "" -"Whether to use SMTP Authentication when sending an email (recommended: True)." -msgstr "" - -#: main.php:303 -msgid "SMTP Username" -msgstr "" - -#: main.php:305 -msgid "Your SMTP Username." -msgstr "" - -#: main.php:309 -msgid "SMTP Password" -msgstr "" - -#: main.php:311 -msgid "Your SMTP Password." -msgstr "" - -#: main.php:315 -msgid "Type of Encryption" -msgstr "" - -#: main.php:318 -msgid "TLS" -msgstr "" - -#: main.php:319 -msgid "SSL" -msgstr "" - -#: main.php:320 -msgid "No Encryption" -msgstr "" - -#: main.php:322 -msgid "" -"The encryption which will be used when sending an email (recommended: TLS)." -msgstr "" - -#: main.php:327 -msgid "SMTP Port" -msgstr "" - -#: main.php:329 -msgid "" -"The port which will be used when sending an email (587/465/25). If you " -"choose TLS it should be set to 587. For SSL use port 465 instead." -msgstr "" - -#: main.php:333 -msgid "From Email Address" -msgstr "" - -#: main.php:335 -msgid "" -"The email address which will be used as the From Address if it is not " -"supplied to the mail function." -msgstr "" - -#: main.php:339 -msgid "From Name" -msgstr "" - -#: main.php:341 -msgid "" -"The name which will be used as the From Name if it is not supplied to the " -"mail function." -msgstr "" - -#: main.php:348 -msgid "Save Changes" -msgstr "" - -#: main.php:368 -msgid "" -"SMTP Mailer plugin cannot send email until you enter your credentials in the " -"settings." -msgstr "" diff --git a/wp-content/upgrade-temp-backup/plugins/smtp-mailer/main.php b/wp-content/upgrade-temp-backup/plugins/smtp-mailer/main.php deleted file mode 100644 index 4a403258..00000000 --- a/wp-content/upgrade-temp-backup/plugins/smtp-mailer/main.php +++ /dev/null @@ -1,970 +0,0 @@ -plugin_version); - define('SMTP_MAILER_SITE_URL', site_url()); - define('SMTP_MAILER_HOME_URL', home_url()); - define('SMTP_MAILER_URL', $this->plugin_url()); - define('SMTP_MAILER_PATH', $this->plugin_path()); - $this->plugin_includes(); - $this->loader_operations(); - } - - function plugin_includes() { - - } - - function loader_operations() { - if (is_admin()) { - include_once('addons/smtp-mailer-addons.php'); - } - add_action('plugins_loaded', array($this, 'plugins_loaded_handler')); - add_action('admin_menu', array($this, 'options_menu')); - add_action('admin_enqueue_scripts', array($this, 'enqueue_admin_scripts')); - //add_action('admin_notices', 'smtp_mailer_admin_notice'); - add_filter('pre_wp_mail', 'smtp_mailer_pre_wp_mail', 10, 2); - } - - function enqueue_admin_scripts($hook) { - if('settings_page_smtp-mailer-settings' != $hook) { - return; - } - wp_register_style('smtp-mailer-addons-menu', SMTP_MAILER_URL.'/addons/smtp-mailer-addons.css'); - wp_enqueue_style('smtp-mailer-addons-menu'); - } - - function plugins_loaded_handler() - { - if(is_admin() && current_user_can('manage_options')){ - add_filter('plugin_action_links', array($this, 'add_plugin_action_links'), 10, 2); - } - load_plugin_textdomain('smtp-mailer', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/'); - } - - function plugin_url() { - if ($this->plugin_url) - return $this->plugin_url; - return $this->plugin_url = plugins_url(basename(plugin_dir_path(__FILE__)), basename(__FILE__)); - } - - function plugin_path() { - if ($this->plugin_path) - return $this->plugin_path; - return $this->plugin_path = untrailingslashit(plugin_dir_path(__FILE__)); - } - - function add_plugin_action_links($links, $file) { - if ($file == plugin_basename(dirname(__FILE__) . '/main.php')) { - $links[] = ''.__('Settings', 'smtp-mailer').''; - } - return $links; - } - - function options_menu() { - add_options_page(__('SMTP Mailer', 'smtp-mailer'), __('SMTP Mailer', 'smtp-mailer'), 'manage_options', 'smtp-mailer-settings', array($this, 'options_page')); - } - - function options_page() { - $plugin_tabs = array( - 'smtp-mailer-settings' => __('General', 'smtp-mailer'), - 'smtp-mailer-settings&action=test-email' => __('Test Email', 'smtp-mailer'), - 'smtp-mailer-settings&action=server-info' => __('Server Info', 'smtp-mailer'), - 'smtp-mailer-settings&action=addons' => __('Add-ons', 'smtp-mailer'), - 'smtp-mailer-settings&action=advanced' => __('Advanced', 'smtp-mailer'), - ); - $url = "https://wphowto.net/smtp-mailer-plugin-for-wordpress-1482"; - $link_text = sprintf(__('Please visit the SMTP Mailer documentation page for usage instructions.', 'smtp-mailer'), esc_url($url)); - $allowed_html_tags = array( - 'a' => array( - 'href' => array(), - 'target' => array() - ) - ); - echo '

          SMTP Mailer v' . SMTP_MAILER_VERSION . '

          '; - echo '
          '.wp_kses($link_text, $allowed_html_tags).'
          '; - $current = ''; - $action = ''; - if (isset($_GET['page'])) { - $current = sanitize_text_field($_GET['page']); - if (isset($_GET['action'])) { - $action = sanitize_text_field($_GET['action']); - $current .= "&action=" . $action; - } - } - $content = ''; - $content .= ''; - $allowed_html_tags = array( - 'a' => array( - 'href' => array(), - 'class' => array() - ), - 'h2' => array( - 'href' => array(), - 'class' => array() - ) - ); - echo wp_kses($content, $allowed_html_tags); - if(!empty($action)) - { - switch($action) - { - case 'test-email': - $this->test_email_settings(); - break; - case 'server-info': - $this->server_info_settings(); - break; - case 'addons': - smtp_mailer_display_addons(); - break; - case 'advanced': - $this->advanced_settings(); - break; - } - } - else - { - $this->general_settings(); - } - echo '
          '; - } - - function test_email_settings(){ - if(isset($_POST['smtp_mailer_send_test_email'])){ - $nonce = $_REQUEST['_wpnonce']; - if (!wp_verify_nonce($nonce, 'smtp_mailer_test_email')) { - wp_die(__('Error! Nonce Security Check Failed! please send the test email again.', 'smtp-mailer')); - } - $to = ''; - if(isset($_POST['smtp_mailer_to_email']) && !empty($_POST['smtp_mailer_to_email'])){ - $to = sanitize_email($_POST['smtp_mailer_to_email']); - } - $subject = ''; - if(isset($_POST['smtp_mailer_email_subject']) && !empty($_POST['smtp_mailer_email_subject'])){ - $subject = sanitize_text_field($_POST['smtp_mailer_email_subject']); - } - $message = ''; - if(isset($_POST['smtp_mailer_email_body']) && !empty($_POST['smtp_mailer_email_body'])){ - $message = sanitize_text_field($_POST['smtp_mailer_email_body']); - } - wp_mail($to, $subject, $message); - } - ?> -
          - - - - - - - - - - - - - - - - - - - - - - - -
          -

          -

          -

          - -

          -
          - - - -

          '; - echo __('Settings Saved!', 'smtp-mailer'); - echo '

          '; - } - - $options = smtp_mailer_get_option(); - if(!is_array($options)){ - $options = smtp_mailer_get_empty_options_array(); - } - - // Avoid warning notice since this option was added later - if(!isset($options['force_from_address'])){ - $options['force_from_address'] = ''; - } - - // Avoid warning notice since this option was added later - if(!isset($options['disable_ssl_verification'])){ - $options['disable_ssl_verification'] = ''; - } - - ?> - -
          - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
          -

          - -

          -
          -

          -

          - -

          -
          -

          -

          -

          value="1"> -

          value="1"> -

          - -

          -
          - - -
          -

          '; - echo __('Settings Saved!', 'smtp-mailer'); - echo '

          '; - } - $settings_fields = ''; - $settings_fields = apply_filters('smtp_mailer_advanced_settings_fields', $settings_fields); - if(empty($settings_fields)){ - return; - } - ?> -
          - - - - - - - -
          - -

          -
          - -
          -

          -
          - 0 ) { - $from_name = substr( $content, 0, $bracket_pos ); - $from_name = str_replace( '"', '', $from_name ); - $from_name = trim( $from_name ); - } - - $from_email = substr( $content, $bracket_pos + 1 ); - $from_email = str_replace( '>', '', $from_email ); - $from_email = trim( $from_email ); - - // Avoid setting an empty $from_email. - } elseif ( '' !== trim( $content ) ) { - $from_email = trim( $content ); - } - break; - case 'content-type': - if ( str_contains( $content, ';' ) ) { - list( $type, $charset_content ) = explode( ';', $content ); - $content_type = trim( $type ); - if ( false !== stripos( $charset_content, 'charset=' ) ) { - $charset = trim( str_replace( array( 'charset=', '"' ), '', $charset_content ) ); - } elseif ( false !== stripos( $charset_content, 'boundary=' ) ) { - $boundary = trim( str_replace( array( 'BOUNDARY=', 'boundary=', '"' ), '', $charset_content ) ); - $charset = ''; - } - - // Avoid setting an empty $content_type. - } elseif ( '' !== trim( $content ) ) { - $content_type = trim( $content ); - } - break; - case 'cc': - $cc = array_merge( (array) $cc, explode( ',', $content ) ); - break; - case 'bcc': - $bcc = array_merge( (array) $bcc, explode( ',', $content ) ); - break; - case 'reply-to': - $reply_to = array_merge( (array) $reply_to, explode( ',', $content ) ); - break; - default: - // Add it to our grand headers array. - $headers[ trim( $name ) ] = trim( $content ); - break; - } - } - } - } - - // Empty out the values that may be set. - $phpmailer->clearAllRecipients(); - $phpmailer->clearAttachments(); - $phpmailer->clearCustomHeaders(); - $phpmailer->clearReplyTos(); - $phpmailer->Body = ''; - $phpmailer->AltBody = ''; - - // Set "From" name and email. - - // If we don't have a name from the input headers. - if ( ! isset( $from_name ) ) { - $from_name = $options['from_name'];//'WordPress'; - } - - /* - * If we don't have an email from the input headers, default to wordpress@$sitename - * Some hosts will block outgoing mail from this address if it doesn't exist, - * but there's no easy alternative. Defaulting to admin_email might appear to be - * another option, but some hosts may refuse to relay mail from an unknown domain. - * See https://core.trac.wordpress.org/ticket/5007. - */ - if ( ! isset( $from_email ) ) { - // Get the site domain and get rid of www. - $sitename = wp_parse_url( network_home_url(), PHP_URL_HOST ); - $from_email = 'wordpress@'; - - if ( null !== $sitename ) { - if ( str_starts_with( $sitename, 'www.' ) ) { - $sitename = substr( $sitename, 4 ); - } - - $from_email .= $sitename; - } - $from_email = $options['from_email'];//'wordpress@' . $sitename; - } - - /** - * Filters the email address to send from. - * - * @since 2.2.0 - * - * @param string $from_email Email address to send from. - */ - $from_email = apply_filters( 'wp_mail_from', $from_email ); - - /** - * Filters the name to associate with the "from" email address. - * - * @since 2.3.0 - * - * @param string $from_name Name associated with the "from" email address. - */ - $from_name = apply_filters( 'wp_mail_from_name', $from_name ); - //force from address if checked - if(isset($options['force_from_address']) && !empty($options['force_from_address'])){ - $from_name = $options['from_name']; - $from_email = $options['from_email']; - } - try { - $phpmailer->setFrom( $from_email, $from_name, false ); - } catch ( PHPMailer\PHPMailer\Exception $e ) { - $mail_error_data = compact( 'to', 'subject', 'message', 'headers', 'attachments' ); - $mail_error_data['phpmailer_exception_code'] = $e->getCode(); - - /** This filter is documented in wp-includes/pluggable.php */ - do_action( 'wp_mail_failed', new WP_Error( 'wp_mail_failed', $e->getMessage(), $mail_error_data ) ); - - return false; - } - /*reply_to code */ - $smtpmailer_reply_to = ''; - $smtpmailer_reply_to = apply_filters('smtpmailer_reply_to', $smtpmailer_reply_to); - if(isset($smtpmailer_reply_to) && !empty($smtpmailer_reply_to)){ - $temp_reply_to_addresses = explode(",", $smtpmailer_reply_to); - $reply_to = array(); - foreach($temp_reply_to_addresses as $temp_reply_to_address){ - $reply_to_address = trim($temp_reply_to_address); - $reply_to[] = $reply_to_address; - } - } - /*end of reply_to code */ - // Set mail's subject and body. - $phpmailer->Subject = $subject; - $phpmailer->Body = $message; - - // Set destination addresses, using appropriate methods for handling addresses. - $address_headers = compact( 'to', 'cc', 'bcc', 'reply_to' ); - - foreach ( $address_headers as $address_header => $addresses ) { - if ( empty( $addresses ) ) { - continue; - } - - foreach ( (array) $addresses as $address ) { - try { - // Break $recipient into name and address parts if in the format "Foo ". - $recipient_name = ''; - - if ( preg_match( '/(.*)<(.+)>/', $address, $matches ) ) { - if ( count( $matches ) === 3 ) { - $recipient_name = $matches[1]; - $address = $matches[2]; - } - } - - switch ( $address_header ) { - case 'to': - $phpmailer->addAddress( $address, $recipient_name ); - break; - case 'cc': - $phpmailer->addCc( $address, $recipient_name ); - break; - case 'bcc': - $phpmailer->addBcc( $address, $recipient_name ); - break; - case 'reply_to': - $phpmailer->addReplyTo( $address, $recipient_name ); - break; - } - } catch ( PHPMailer\PHPMailer\Exception $e ) { - continue; - } - } - } - - // Tell PHPMailer to use SMTP - $phpmailer->isSMTP(); //$phpmailer->isMail(); - // Set the hostname of the mail server - $phpmailer->Host = $options['smtp_host']; - // Whether to use SMTP authentication - if(isset($options['smtp_auth']) && $options['smtp_auth'] == "true"){ - $phpmailer->SMTPAuth = true; - // SMTP username - $phpmailer->Username = $options['smtp_username']; - // SMTP password - $phpmailer->Password = base64_decode($options['smtp_password']); - } - // Whether to use encryption - $type_of_encryption = $options['type_of_encryption']; - if($type_of_encryption=="none"){ - $type_of_encryption = ''; - } - $phpmailer->SMTPSecure = $type_of_encryption; - // SMTP port - $phpmailer->Port = $options['smtp_port']; - - // Whether to enable TLS encryption automatically if a server supports it - $phpmailer->SMTPAutoTLS = false; - //enable debug when sending a test mail - if(isset($_POST['smtp_mailer_send_test_email'])){ - $phpmailer->SMTPDebug = 4; - // Ask for HTML-friendly debug output - $phpmailer->Debugoutput = 'html'; - } - - //disable ssl certificate verification if checked - if(isset($options['disable_ssl_verification']) && !empty($options['disable_ssl_verification'])){ - $phpmailer->SMTPOptions = array( - 'ssl' => array( - 'verify_peer' => false, - 'verify_peer_name' => false, - 'allow_self_signed' => true - ) - ); - } - // Set Content-Type and charset. - - // If we don't have a Content-Type from the input headers. - if ( ! isset( $content_type ) ) { - $content_type = 'text/plain'; - } - - /** - * Filters the wp_mail() content type. - * - * @since 2.3.0 - * - * @param string $content_type Default wp_mail() content type. - */ - $content_type = apply_filters( 'wp_mail_content_type', $content_type ); - - $phpmailer->ContentType = $content_type; - - // Set whether it's plaintext, depending on $content_type. - if ( 'text/html' === $content_type ) { - $phpmailer->isHTML( true ); - } - - // If we don't have a charset from the input headers. - if ( ! isset( $charset ) ) { - $charset = get_bloginfo( 'charset' ); - } - - /** - * Filters the default wp_mail() charset. - * - * @since 2.3.0 - * - * @param string $charset Default email charset. - */ - $phpmailer->CharSet = apply_filters( 'wp_mail_charset', $charset ); - - // Set custom headers. - if ( ! empty( $headers ) ) { - foreach ( (array) $headers as $name => $content ) { - // Only add custom headers not added automatically by PHPMailer. - if ( ! in_array( $name, array( 'MIME-Version', 'X-Mailer' ), true ) ) { - try { - $phpmailer->addCustomHeader( sprintf( '%1$s: %2$s', $name, $content ) ); - } catch ( PHPMailer\PHPMailer\Exception $e ) { - continue; - } - } - } - - if ( false !== stripos( $content_type, 'multipart' ) && ! empty( $boundary ) ) { - $phpmailer->addCustomHeader( sprintf( 'Content-Type: %s; boundary="%s"', $content_type, $boundary ) ); - } - } - - if ( isset( $attachments ) && ! empty( $attachments ) ) { - foreach ( $attachments as $filename => $attachment ) { - $filename = is_string( $filename ) ? $filename : ''; - - try { - $phpmailer->addAttachment( $attachment, $filename ); - } catch ( PHPMailer\PHPMailer\Exception $e ) { - continue; - } - } - } - - /** - * Fires after PHPMailer is initialized. - * - * @since 2.2.0 - * - * @param PHPMailer $phpmailer The PHPMailer instance (passed by reference). - */ - do_action_ref_array( 'phpmailer_init', array( &$phpmailer ) ); - - $mail_data = compact( 'to', 'subject', 'message', 'headers', 'attachments' ); - - // Send! - try { - $send = $phpmailer->send(); - - /** - * Fires after PHPMailer has successfully sent an email. - * - * The firing of this action does not necessarily mean that the recipient(s) received the - * email successfully. It only means that the `send` method above was able to - * process the request without any errors. - * - * @since 5.9.0 - * - * @param array $mail_data { - * An array containing the email recipient(s), subject, message, headers, and attachments. - * - * @type string[] $to Email addresses to send message. - * @type string $subject Email subject. - * @type string $message Message contents. - * @type string[] $headers Additional headers. - * @type string[] $attachments Paths to files to attach. - * } - */ - do_action( 'wp_mail_succeeded', $mail_data ); - - return $send; - } catch ( PHPMailer\PHPMailer\Exception $e ) { - $mail_data['phpmailer_exception_code'] = $e->getCode(); - - /** - * Fires after a PHPMailer\PHPMailer\Exception is caught. - * - * @since 4.4.0 - * - * @param WP_Error $error A WP_Error object with the PHPMailer\PHPMailer\Exception message, and an array - * containing the mail recipient, subject, message, headers, and attachments. - */ - do_action( 'wp_mail_failed', new WP_Error( 'wp_mail_failed', $e->getMessage(), $mail_data ) ); - - return false; - } -} diff --git a/wp-content/upgrade-temp-backup/plugins/smtp-mailer/readme.txt b/wp-content/upgrade-temp-backup/plugins/smtp-mailer/readme.txt deleted file mode 100644 index 96bfae00..00000000 --- a/wp-content/upgrade-temp-backup/plugins/smtp-mailer/readme.txt +++ /dev/null @@ -1,144 +0,0 @@ -=== SMTP Mailer === -Contributors: naa986 -Donate link: https://wphowto.net/ -Tags: email, mail, smtp, phpmailer -Requires at least: 6.5 -Tested up to: 6.5 -Stable tag: 1.1.13 -License: GPLv2 or later -License URI: http://www.gnu.org/licenses/gpl-2.0.html - -Configure a SMTP server to send email from your WordPress site. Configure the wp_mail() function to use SMTP instead of the PHP mail() function. - -== Description == - -[SMTP Mailer](https://wphowto.net/smtp-mailer-plugin-for-wordpress-1482) plugin allows you to configure a mail server which handles all outgoing email from your website. It takes control of the wp_mail function and use SMTP instead. - -https://www.youtube.com/watch?v=7O_jgtykcEk&rel=0 - -=== SMTP Mailer Add-ons === - -* [Reply-To](https://wphowto.net/how-to-add-a-reply-to-address-in-the-smtp-mailer-wordpress-plugin-6997) - -=== SMTP Mailer Settings === - -* **SMTP Host**: Your outgoing mail server (e.g. smtp.gmail.com). -* **SMTP Authentication**: Whether to use SMTP authentication when sending an email (True/False). If you choose to authenticate you will also need to provide your username and password. -* **SMTP Username**: The username to connect to your SMTP server. -* **SMTP Password**: The password to connect to your SMTP server. -* **Type of Encryption**: The encryption to be used when sending an email (TLS/SSL/No Encryption. TLS is recommended). -* **SMTP Port**: The port to be used when sending an email (587/465/25). If you choose TLS the port should be set to 587. For SSL use port 465 instead. -* **From Email Address**: The email address to be used as the From Address when sending an email. -* **From Name**: The name to be used as the From Name when sending an email. - -=== SMTP Mailer Test Email === - -Once you have configured the settings you can send a test email to check the functionality of the plugin. - -* **To**: Email address of the recipient. -* **Subject**: Subject of the email. -* **Message**: Email body. - -=== Known Compatibility === - -SMTP Mailer should work with any plugin that uses the WordPress Mail function. However, It has been tested with the following form and contact form plugins: - -* Contact Form 7 -* Jetpack Contact Form -* Visual Form Builder -* Fast Secure Contact Form -* Formidable Forms -* Contact Form by BestWebSoft - -For detailed setup instructions please visit the [SMTP Mailer](https://wphowto.net/smtp-mailer-plugin-for-wordpress-1482) plugin page. - -== Installation == - -1. Go to the Add New plugins screen in your WordPress Dashboard -1. Click the upload tab -1. Browse for the plugin file (smtp-mailer.zip) on your computer -1. Click "Install Now" and then hit the activate button - -== Frequently Asked Questions == -none - -== Screenshots == - -1. SMTP Mailer Settings -2. SMTP Mailer Test Email Tab - -== Upgrade Notice == -none - -== Changelog == - -= 1.1.13 = -* WordPress 6.5 compatibility update. - -= 1.1.12 = -* Added support for the reply-to add-on. - -= 1.1.11 = -* WordPress 6.4 compatibility update. - -= 1.1.10 = -* Added an option to set the configured from address for all outgoing email messages. - -= 1.1.9 = -* Additional check for the settings link. - -= 1.1.8 = -* Removed admin notices to avoid confusion since configurations can vary on different servers. - -= 1.1.7 = -* WordPress 6.3 compatibility update. - -= 1.1.6 = -* WordPress 6.2 compatibility update. - -= 1.1.5 = -* Compatibility update for WordPress 6.1. - -= 1.1.4 = -* Updated the mail function for WordPress 6.0. - -= 1.1.3 = -* Updated the mail function for WordPress 5.9. - -= 1.1.2 = -* Fixed an issue that could cause an Undefined variable error if $attachments was not set. - -= 1.1.1 = -* WordPress 5.7 compatibility update. - -= 1.1.0 = -* The password field can be left empty when updating the settings. - -= 1.0.9 = -* Updated the code to be compatible with WordPress 5.5. - -= 1.0.8 = -* SMTP Mailer is compatible with WordPress 5.3. - -= 1.0.7 = -* SMTP Mailer now checks for a valid nonce when sending a test email. - -= 1.0.6 = -* SMTP Mailer no longer shows the saved password in the settings. - -= 1.0.5 = -* SMTP Mailer is now compatible with WordPress 4.9. - -= 1.0.4 = -* Updated the mail() function by setting its minimum requirements to WordPress 4.8. -* "phpmailer_init" action hook is now enabled so it can be used by other plugins. - -= 1.0.3 = -* Fixed a bug where an apostrophe in the password would cause SMTP authentication failure. - -= 1.0.2 = -* SMTP Mailer now supports the "wp_mail_failed" hook which fires after a phpmailerException is caught. -* Added a new option to bypass this error on some servers where the SSL certificate is not properly configured - Warning: stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed. - -= 1.0.1 = -* First commit