Changeset 3452714
- Timestamp:
- 02/03/2026 09:44:56 AM (8 weeks ago)
- Location:
- texty
- Files:
-
- 28 added
- 4 deleted
- 38 edited
- 1 copied
-
tags/1.1.5 (copied) (copied from texty/trunk)
-
tags/1.1.5/dependencies (added)
-
tags/1.1.5/dependencies/Appsero (added)
-
tags/1.1.5/dependencies/Appsero/Client.php (added)
-
tags/1.1.5/dependencies/Appsero/Insights.php (added)
-
tags/1.1.5/dependencies/Appsero/License.php (added)
-
tags/1.1.5/dist/app.js (modified) (1 diff)
-
tags/1.1.5/includes/Integrations/Dokan.php (modified) (1 diff)
-
tags/1.1.5/includes/Integrations/WooCommerce.php (modified) (1 diff)
-
tags/1.1.5/includes/Notifications.php (modified) (3 diffs)
-
tags/1.1.5/includes/Notifications/Dokan/CancelledVendor.php (added)
-
tags/1.1.5/includes/Notifications/Dokan/FailedVendor.php (added)
-
tags/1.1.5/includes/Notifications/Dokan/RefundedVendor.php (added)
-
tags/1.1.5/includes/Notifications/WC/CancelledAdmin.php (added)
-
tags/1.1.5/includes/Notifications/WC/CancelledCustomer.php (added)
-
tags/1.1.5/includes/Notifications/WC/FailedAdmin.php (added)
-
tags/1.1.5/includes/Notifications/WC/FailedCustomer.php (added)
-
tags/1.1.5/includes/Notifications/WC/RefundedAdmin.php (added)
-
tags/1.1.5/includes/Notifications/WC/RefundedCustomer.php (added)
-
tags/1.1.5/languages/texty.json (modified) (3 diffs)
-
tags/1.1.5/languages/texty.pot (modified) (7 diffs)
-
tags/1.1.5/package-lock.json (deleted)
-
tags/1.1.5/readme.txt (modified) (4 diffs)
-
tags/1.1.5/texty.php (modified) (3 diffs)
-
tags/1.1.5/vendor/appsero/client/.github/workflows/wpcs.yml (modified) (3 diffs)
-
tags/1.1.5/vendor/appsero/client/readme.md (modified) (3 diffs)
-
tags/1.1.5/vendor/appsero/client/src/Client.php (modified) (4 diffs)
-
tags/1.1.5/vendor/appsero/client/src/Insights.php (modified) (64 diffs)
-
tags/1.1.5/vendor/appsero/client/src/Updater.php (deleted)
-
tags/1.1.5/vendor/autoload.php (modified) (1 diff)
-
tags/1.1.5/vendor/composer/autoload_classmap.php (modified) (1 diff)
-
tags/1.1.5/vendor/composer/autoload_psr4.php (modified) (1 diff)
-
tags/1.1.5/vendor/composer/autoload_real.php (modified) (3 diffs)
-
tags/1.1.5/vendor/composer/autoload_static.php (modified) (4 diffs)
-
tags/1.1.5/vendor/composer/installed.json (modified) (3 diffs)
-
tags/1.1.5/vendor/composer/installed.php (modified) (1 diff)
-
trunk/dependencies (added)
-
trunk/dependencies/Appsero (added)
-
trunk/dependencies/Appsero/Client.php (added)
-
trunk/dependencies/Appsero/Insights.php (added)
-
trunk/dependencies/Appsero/License.php (added)
-
trunk/dist/app.js (modified) (1 diff)
-
trunk/includes/Integrations/Dokan.php (modified) (1 diff)
-
trunk/includes/Integrations/WooCommerce.php (modified) (1 diff)
-
trunk/includes/Notifications.php (modified) (3 diffs)
-
trunk/includes/Notifications/Dokan/CancelledVendor.php (added)
-
trunk/includes/Notifications/Dokan/FailedVendor.php (added)
-
trunk/includes/Notifications/Dokan/RefundedVendor.php (added)
-
trunk/includes/Notifications/WC/CancelledAdmin.php (added)
-
trunk/includes/Notifications/WC/CancelledCustomer.php (added)
-
trunk/includes/Notifications/WC/FailedAdmin.php (added)
-
trunk/includes/Notifications/WC/FailedCustomer.php (added)
-
trunk/includes/Notifications/WC/RefundedAdmin.php (added)
-
trunk/includes/Notifications/WC/RefundedCustomer.php (added)
-
trunk/languages/texty.json (modified) (3 diffs)
-
trunk/languages/texty.pot (modified) (7 diffs)
-
trunk/package-lock.json (deleted)
-
trunk/readme.txt (modified) (4 diffs)
-
trunk/texty.php (modified) (3 diffs)
-
trunk/vendor/appsero/client/.github/workflows/wpcs.yml (modified) (3 diffs)
-
trunk/vendor/appsero/client/readme.md (modified) (3 diffs)
-
trunk/vendor/appsero/client/src/Client.php (modified) (4 diffs)
-
trunk/vendor/appsero/client/src/Insights.php (modified) (64 diffs)
-
trunk/vendor/appsero/client/src/Updater.php (deleted)
-
trunk/vendor/autoload.php (modified) (1 diff)
-
trunk/vendor/composer/autoload_classmap.php (modified) (1 diff)
-
trunk/vendor/composer/autoload_psr4.php (modified) (1 diff)
-
trunk/vendor/composer/autoload_real.php (modified) (3 diffs)
-
trunk/vendor/composer/autoload_static.php (modified) (4 diffs)
-
trunk/vendor/composer/installed.json (modified) (3 diffs)
-
trunk/vendor/composer/installed.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
texty/tags/1.1.5/dist/app.js
r3165401 r3452714 1 "use strict";(self.webpackChunktexty=self.webpackChunktexty||[]).push([[143],{8187:(e,t, a)=>{a.d(t,{Z:()=>p});var r,n=a(1570),o=a(7294),l=a(3727),s=a(6550),i=a(1231),c=a(8602),u=a(7046),d=a(2700),f=a(4469);function m(){return o.createElement(l.UT,null,o.createElement(i.Ix,{position:"top-right",autoClose:5e3,hideProgressBar:!1,newestOnTop:!0,closeOnClick:!0,rtl:!1,pauseOnFocusLoss:!1,draggable:!0,pauseOnHover:!0}),o.createElement(c.Z,null),o.createElement("div",{className:"wrap texty"},o.createElement("div",{className:"texty-container"},o.createElement(s.rs,null,o.createElement(s.AW,{path:"/notifications",component:u.Z}),o.createElement(s.AW,{path:"/tools",component:f.Z}),o.createElement(s.AW,{path:"/",exact:!0,component:d.Z})))))}e=a.hmd(e),(r="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.enterModule:void 0)&&r(e),"undefined"!=typeof reactHotLoaderGlobal&&reactHotLoaderGlobal.default.signature;var y=(0,n.w)(m);const p=y;var b,v;(b="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default:void 0)&&(b.register(m,"App","/Users/asad/Desktop/release-20241008/texty/src/App.js"),b.register(y,"default","/Users/asad/Desktop/release-20241008/texty/src/App.js")),(v="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.leaveModule:void 0)&&v(e)},8359:(e,t,a)=>{a.d(t,{Z:()=>s});var r,n=a(7294);function o(){return n.createElement("svg",{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",stroke:"currentColor",viewBox:"0 0 24 24",className:"active-icon"},n.createElement("path",{d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"}))}e=a.hmd(e),(r="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.enterModule:void 0)&&r(e),"undefined"!=typeof reactHotLoaderGlobal&&reactHotLoaderGlobal.default.signature;var l=o;const s=l;var i,c;(i="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default:void 0)&&(i.register(o,"ActiveIcon","/Users/asad/Desktop/release-20241008/texty/src/components/ActiveIcon.js"),i.register(l,"default","/Users/asad/Desktop/release-20241008/texty/src/components/ActiveIcon.js")),(c="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.leaveModule:void 0)&&c(e)},8602:(e,t,a)=>{a.d(t,{Z:()=>c});var r,n=a(7294),o=a(4635),l=a(3727);function s(){return n.createElement("div",{className:"texty-header-wrap"},n.createElement("div",{className:"texty-container"},n.createElement("div",{className:"texty-header"},n.createElement("div",{className:"texty-admin-header__logo"},n.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 97 28",width:"97",height:"28"},n.createElement("g",{fill:"none",fillRule:"nonzero"},n.createElement("path",{fill:"#FF0F45",d:"M15.617 0c.893 0 1.766.084 2.613.244a7.954 7.954 0 00-1.633 4.087 9.766 9.766 0 00-.98-.05c-5.36 0-9.706 4.346-9.706 9.706 0 2.262.774 4.4 2.17 6.117l.933 1.148-1.433 2.44h8.036c5.36 0 9.705-4.345 9.705-9.705 0-.3-.013-.597-.04-.89a7.948 7.948 0 004.102-1.594c.145.806.22 1.636.22 2.484 0 7.725-6.262 13.988-13.987 13.988H0l3.862-6.405-.018-.028a13.934 13.934 0 01-2.214-7.555C1.63 6.262 7.892 0 15.617 0zm8.932 0a5.138 5.138 0 110 10.276A5.138 5.138 0 0124.55 0z"}),n.createElement("path",{fill:"#000",d:"M87.482 7.8l2.65 8.9 2.636-8.9h4.087l-5.734 16.53-.317.755-.039.084c-.856 1.813-2.25 2.72-4.18 2.72a5.977 5.977 0 01-1.687-.252v-2.896l.58.013h.09c.676-.01 1.184-.12 1.525-.33.356-.221.635-.587.837-1.098l.449-1.177-4.997-14.35h4.1zm-43.91-3.518V7.8h2.44v2.803h-2.44v7.142l.001.071c.009.492.11.847.303 1.066.202.23.589.344 1.16.344.422 0 .795-.03 1.12-.093v2.897l-.14.041a7.825 7.825 0 01-2.167.302c-2.671 0-4.033-1.353-4.086-4.06v-7.71H37.68V7.8h2.083V4.282h3.81zm9.894 3.253c1.95 0 3.486.617 4.607 1.852 1.1 1.211 1.66 2.92 1.68 5.127v1.683h-9.082l.013.093c.135.892.502 1.61 1.1 2.156.62.564 1.405.846 2.354.846 1.437 0 2.567-.511 3.389-1.534l.052-.066 1.871 2.103-.061.086c-.565.77-1.318 1.374-2.259 1.811-.975.454-2.056.681-3.243.681-2.091 0-3.794-.643-5.108-1.93-1.29-1.265-1.947-2.941-1.97-5.03v-.628c.018-1.38.295-2.617.83-3.712.554-1.133 1.338-2.006 2.353-2.619 1.015-.612 2.173-.919 3.474-.919zm26.533-3.253V7.8h2.44v2.803h-2.44v7.142l.001.071c.009.492.11.847.303 1.066.202.23.589.344 1.16.344.422 0 .795-.03 1.12-.093v2.897l-.14.041a7.825 7.825 0 01-2.167.302c-2.671 0-4.034-1.353-4.086-4.06v-7.71h-2.083V7.8h2.083V4.282H80zM64.541 7.8l2.347 4.271 2.4-4.271h4.072l-4.06 7.009 4.232 7.3h-4.087l-2.544-4.497-2.531 4.497h-4.1l4.232-7.3-4.047-7.01h4.086zm-11.089 2.83c-.755 0-1.368.255-1.839.767-.454.494-.75 1.193-.888 2.097l-.015.098h5.3v-.304l-.003-.087c-.03-.804-.258-1.43-.683-1.877-.44-.463-1.063-.694-1.872-.694z"})))),n.createElement("div",{className:"texty-admin-header__menu"},n.createElement(l.OL,{to:"/",exact:!0,className:"header-link",title:(0,o.__)("Gateway Settings","texty")},n.createElement("span",{className:"dashicons dashicons-admin-settings"}),n.createElement("span",{className:"title"},(0,o.__)("Gateway Settings","texty"))),n.createElement(l.OL,{to:"/notifications",className:"header-link",title:(0,o.__)("Notifications","texty")},n.createElement("span",{className:"dashicons dashicons-admin-plugins"}),n.createElement("span",{className:"title"},(0,o.__)("Notifications","texty"))),n.createElement(l.OL,{to:"/tools",className:"header-link",title:(0,o.__)("Tools","texty")},n.createElement("span",{className:"dashicons dashicons-admin-tools"}),n.createElement("span",{className:"title"},(0,o.__)("Tools","texty")))))))}e=a.hmd(e),(r="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.enterModule:void 0)&&r(e),"undefined"!=typeof reactHotLoaderGlobal&&reactHotLoaderGlobal.default.signature;var i=s;const c=i;var u,d;(u="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default:void 0)&&(u.register(s,"Header","/Users/asad/Desktop/release-20241008/texty/src/components/Header.js"),u.register(i,"default","/Users/asad/Desktop/release-20241008/texty/src/components/Header.js")),(d="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.leaveModule:void 0)&&d(e)},9931:(e,t,a)=>{a.d(t,{Z:()=>p});var r,n=a(7294),o=a(4635),l=a(4184),s=a.n(l),i=a(5373),c=a(6117),u=a(9586),d=a(3412),f=a(211);function m(e){var t=e.title,a=e.description,r=e.keyName,l=e.roles,m=e.settings,y=e.setOption,p=m.replacements.map((function(e){return"<code>{".concat(e,"}</code>")})).join(", ");return n.createElement(i.Z,{initialOpen:!1,title:n.createElement(n.Fragment,null,n.createElement("span",null,t),n.createElement("span",{className:s()("label",{active:!0===m.enabled})},m.enabled?(0,o.__)("active","texty"):(0,o.__)("inactive","texty")))},n.createElement(c.Z,{label:(0,o.__)("Enable","texty"),help:a,checked:m.enabled,onChange:function(e){return y(r,"enabled",e)}}),"role"===m.type&&n.createElement(u.Z,{label:(0,o.__)("Recipients"),help:"role"===m.type?(0,o.__)("Select one or multiple user roles. Users with phone number in their profile will receive the text","texty"):""},n.createElement(f.ZP,{required:!0,isMulti:"role"===m.type,value:l.filter((function(e){return m.recipients.includes(e.value)})),options:l,onChange:function(e){y(r,"recipients",null!==e?e.map((function(e){return e.value})):[])}})),n.createElement(d.Z,{label:(0,o.__)("Message","texty"),className:"monospace",required:!0,help:n.createElement("span",{className:"help",dangerouslySetInnerHTML:{__html:(0,o.__)("You may use these variables: ","texty")+p}}),value:m.message,onChange:function(e){return y(r,"message",e)}}))}e=a.hmd(e),(r="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.enterModule:void 0)&&r(e),"undefined"!=typeof reactHotLoaderGlobal&&reactHotLoaderGlobal.default.signature;var y=m;const p=y;var b,v;(b="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default:void 0)&&(b.register(m,"NotificationItem","/Users/asad/Desktop/release-20241008/texty/src/components/NotificationItem.js"),b.register(y,"default","/Users/asad/Desktop/release-20241008/texty/src/components/NotificationItem.js")),(v="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.leaveModule:void 0)&&v(e)},2797:(e,t,a)=>{a.d(t,{Z:()=>b});var r,n=a(7294),o=a(4635),l=a(1865),s=a.n(l),i=a(9545),c=a(3412),u=a(9676),d=a(1231);function f(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var a=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var r,n,o,l,s=[],i=!0,c=!1;try{if(o=(a=a.call(e)).next,0===t){if(Object(a)!==a)return;i=!1}else for(;!(i=(r=o.call(a)).done)&&(s.push(r.value),s.length!==t);i=!0);}catch(e){c=!0,n=e}finally{try{if(!i&&null!=a.return&&(l=a.return(),Object(l)!==l))return}finally{if(c)throw n}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return m(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(e):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?m(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,r=new Array(t);a<t;a++)r[a]=e[a];return r}function y(){var e=f((0,n.useState)(!1),2),t=e[0],a=e[1],r=f((0,n.useState)(""),2),l=r[0],m=r[1],y=f((0,n.useState)(""),2),p=y[0],b=y[1];return n.createElement("form",{onSubmit:function(e){e.preventDefault(),a(!0),s()({path:"/texty/v1/send",method:"POST",data:{to:l,message:p}}).then((function(e){a(!1),e.success?d.Am.success((0,o.__)("Message has been sent.","texty")):d.Am.error((0,o.__)("Error, message could not be sent.","texty")+" "+e.message)})).catch((function(e){a(!1),console.log(e)}))},className:"texty-settings__form"},n.createElement("fieldset",{disabled:t},n.createElement(i.Z,{label:(0,o.__)("Phone Number","texty"),placeholder:"+123456789",type:"tel",value:l,onChange:function(e){return m(e)},required:!0}),n.createElement(c.Z,{label:(0,o.__)("Message","texty"),value:p,placeholder:(0,o.__)("Write your message...","texty"),onChange:function(e){return b(e)},required:!0})),n.createElement("div",{className:"submit-area"},n.createElement(u.Z,{type:"submit",isPrimary:!0,isBusy:t},t?(0,o.__)("Sending...","texty"):(0,o.__)("Send Message","texty"))))}e=a.hmd(e),(r="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.enterModule:void 0)&&r(e),("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default.signature:function(e){return e})(y,"useState{[isSending, setIsSending](false)}\nuseState{[phoneNumber, setPhoneNumber]('')}\nuseState{[message, setMessage]('')}");var p=y;const b=p;var v,g;(v="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default:void 0)&&(v.register(y,"QuickSend","/Users/asad/Desktop/release-20241008/texty/src/components/QuickSend.js"),v.register(p,"default","/Users/asad/Desktop/release-20241008/texty/src/components/QuickSend.js")),(g="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.leaveModule:void 0)&&g(e)},6992:(e,t,a)=>{a.d(t,{Z:()=>p});var r,n=a(7294),o=a(4635),l=a(1865),s=a.n(l),i=a(1264),c=a(4410),u=a(7347);function d(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var a=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var r,n,o,l,s=[],i=!0,c=!1;try{if(o=(a=a.call(e)).next,0===t){if(Object(a)!==a)return;i=!1}else for(;!(i=(r=o.call(a)).done)&&(s.push(r.value),s.length!==t);i=!0);}catch(e){c=!0,n=e}finally{try{if(!i&&null!=a.return&&(l=a.return(),Object(l)!==l))return}finally{if(c)throw n}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return f(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(e):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?f(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,r=new Array(t);a<t;a++)r[a]=e[a];return r}function m(){var e=d((0,n.useState)(!1),2),t=e[0],a=e[1],r=d((0,n.useState)(!0),2),l=r[0],f=r[1];return(0,n.useEffect)((function(){f(!0),s()({path:"/texty/v1/status"}).then((function(e){f(!1),a(e.success)}))}),[]),l?n.createElement(i.Z,null,n.createElement(c.Z,null)):n.createElement(i.Z,{status:t?"success":"error",isDismissible:!1},n.createElement(u.Z,{icon:t?"yes-alt":"dismiss"}),n.createElement("span",null,t?(0,o.__)("Connected","texty"):(0,o.__)("Not connected","texty")))}e=a.hmd(e),(r="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.enterModule:void 0)&&r(e),("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default.signature:function(e){return e})(m,"useState{[isConnected, setIsConnected](false)}\nuseState{[isFetching, setIsFetching](true)}\nuseEffect{}");var y=m;const p=y;var b,v;(b="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default:void 0)&&(b.register(m,"Status","/Users/asad/Desktop/release-20241008/texty/src/components/Status.js"),b.register(y,"default","/Users/asad/Desktop/release-20241008/texty/src/components/Status.js")),(v="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.leaveModule:void 0)&&v(e)},9653:(e,t,a)=>{a.d(t,{Z:()=>p});var r,n=a(7294),o=a(4635),l=a(1865),s=a.n(l),i=a(9545),c=a(9676),u=a(1231);function d(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var a=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var r,n,o,l,s=[],i=!0,c=!1;try{if(o=(a=a.call(e)).next,0===t){if(Object(a)!==a)return;i=!1}else for(;!(i=(r=o.call(a)).done)&&(s.push(r.value),s.length!==t);i=!0);}catch(e){c=!0,n=e}finally{try{if(!i&&null!=a.return&&(l=a.return(),Object(l)!==l))return}finally{if(c)throw n}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return f(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(e):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?f(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,r=new Array(t);a<t;a++)r[a]=e[a];return r}function m(){var e=d((0,n.useState)(!1),2),t=e[0],a=e[1],r=d((0,n.useState)(""),2),l=r[0],f=r[1];return n.createElement("form",{onSubmit:function(e){e.preventDefault(),a(!0),s()({path:"/texty/v1/tools/test",method:"POST",data:{to:l}}).then((function(e){a(!1),e.success?u.Am.success((0,o.__)("Message has been sent.","texty")):u.Am.error((0,o.__)("Error, message could not be sent.","texty")+" "+e.message)})).catch((function(e){a(!1),console.log(e)}))},className:"texty-settings__form"},n.createElement("fieldset",{disabled:t},n.createElement(i.Z,{label:(0,o.__)("Test Number","texty"),placeholder:"+123456789",type:"tel",value:l,onChange:function(e){return f(e)},help:(0,o.__)("Enter a phone number to test the SMS sending.","texty"),required:!0})),n.createElement("div",{className:"submit-area"},n.createElement(c.Z,{type:"submit",isPrimary:!0,isBusy:t},t?(0,o.__)("Sending...","texty"):(0,o.__)("Send Test","texty"))))}e=a.hmd(e),(r="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.enterModule:void 0)&&r(e),("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default.signature:function(e){return e})(m,"useState{[isSending, setIsSending](false)}\nuseState{[phoneNumber, setPhoneNumber]('')}");var y=m;const p=y;var b,v;(b="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default:void 0)&&(b.register(m,"TestMessage","/Users/asad/Desktop/release-20241008/texty/src/components/TestMessage.js"),b.register(y,"default","/Users/asad/Desktop/release-20241008/texty/src/components/TestMessage.js")),(v="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.leaveModule:void 0)&&v(e)},5579:(e,t,a)=>{var r,n=a(7294),o=a(9060),l=a(788),s=a(8187);a(4061),e=a.hmd(e),(r="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.enterModule:void 0)&&r(e),"undefined"!=typeof reactHotLoaderGlobal&&reactHotLoaderGlobal.default.signature;var i,c,u=document.getElementById("texty-app");o.render(n.createElement(s.Z,null),u),(0,l.Z)("texty"),(i="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default:void 0)&&i.register(u,"mountNode","/Users/asad/Desktop/release-20241008/texty/src/index.js"),(c="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.leaveModule:void 0)&&c(e)},7046:(e,t,a)=>{a.d(t,{Z:()=>G});var r,n=a(7294),o=a(4635),l=a(1231),s=a(1865),i=a.n(s),c=a(4184),u=a.n(c),d=a(4410),f=a(3818),m=a(4746),y=a(6887),p=a(3033),b=a(9676),v=a(9931);function g(e){return g="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},g(e)}function h(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function E(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?h(Object(a),!0).forEach((function(t){S(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):h(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}function S(e,t,a){return(t=function(e){var t=function(e,t){if("object"!==g(e)||null===e)return e;var a=e[Symbol.toPrimitive];if(void 0!==a){var r=a.call(e,"string");if("object"!==g(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===g(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function x(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var a=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var r,n,o,l,s=[],i=!0,c=!1;try{if(o=(a=a.call(e)).next,0===t){if(Object(a)!==a)return;i=!1}else for(;!(i=(r=o.call(a)).done)&&(s.push(r.value),s.length!==t);i=!0);}catch(e){c=!0,n=e}finally{try{if(!i&&null!=a.return&&(l=a.return(),Object(l)!==l))return}finally{if(c)throw n}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return _(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(e):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?_(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,r=new Array(t);a<t;a++)r[a]=e[a];return r}function L(){var e=x((0,n.useState)(!0),2),t=e[0],a=e[1],r=x((0,n.useState)(!1),2),s=r[0],c=r[1],g=x((0,n.useState)({}),2),h=g[0],_=g[1];(0,n.useEffect)((function(){a(!0),i()({path:"/texty/v1/notifications?context=edit"}).then((function(e){_(e),a(!1)}))}),[]);var L=function(e,t,a){_(E(E({},h),{},S({},"notifications",E(E({},h.notifications),{},S({},e,E(E({},h.notifications[e]),{},S({},t,a)))))))};return t?n.createElement(d.Z,null):n.createElement("div",{className:"texty-notifications"},n.createElement("h1",null,(0,o.__)("Notifications","texty")),n.createElement("p",null,(0,o.__)("Enable or disable notification based on different events.","texty")),n.createElement("form",{onSubmit:function(e){e.preventDefault();var t={};Object.keys(h.notifications).forEach((function(e){t.hasOwnProperty(e)||(t[e]={});var a=h.notifications[e];t[e]={enabled:a.enabled,message:a.message,recipients:a.recipients,route:a.route}})),c(!0),i()({path:"/texty/v1/notifications",method:"POST",data:t}).then((function(e){c(!1),l.Am.success((0,o.__)("Changes have been saved","texty"))})).catch((function(e){c(!1),console.log(e),l.Am.error(e.message)}))}},Object.keys(h.groups).map((function(e){var t=h.groups[e],a=t.title,r=t.available;return n.createElement(f.ZP,{key:e},n.createElement(m.ZP,{className:u()({inactive:!r})},a,!r&&n.createElement("span",{class:"sub-heading"},(0,o.__)("Plugin not installed","texty"))),r&&n.createElement(y.ZP,{className:"has-panel"},n.createElement(p.Z,null,Object.keys(h.notifications).map((function(t){var a=h.notifications[t];return e===a.group&&n.createElement(v.Z,{key:t,title:a.title,roles:h.roles,keyName:a.id,settings:a,setOption:L})})))))})),n.createElement("div",{className:"submit-area"},n.createElement(b.Z,{type:"submit",isPrimary:!0,isBusy:s,className:"large"},s?(0,o.__)("Saving...","texty"):(0,o.__)("Save Changes","texty")))))}e=a.hmd(e),(r="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.enterModule:void 0)&&r(e),("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default.signature:function(e){return e})(L,"useState{[isLoading, setIsLoading](true)}\nuseState{[isSaving, setIsSaving](false)}\nuseState{[settings, setSettings]({})}\nuseEffect{}");var H=L;const G=H;var w,j;(w="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default:void 0)&&(w.register(L,"Notifications","/Users/asad/Desktop/release-20241008/texty/src/pages/Notifications.js"),w.register(H,"default","/Users/asad/Desktop/release-20241008/texty/src/pages/Notifications.js")),(j="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.leaveModule:void 0)&&j(e)},2700:(e,t,a)=>{a.d(t,{Z:()=>O});var r,n=a(7294),o=a(4635),l=a(1865),s=a.n(l),i=a(4410),c=a(3818),u=a(4746),d=a(6887),f=a(9586),m=a(9545),y=a(9676),p=a(4184),b=a.n(p),v=a(1231),g=a(7555),h=a.n(g),E=a(8359);function S(e){return S="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},S(e)}function x(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function _(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?x(Object(a),!0).forEach((function(t){L(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):x(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}function L(e,t,a){return(t=function(e){var t=function(e,t){if("object"!==S(e)||null===e)return e;var a=e[Symbol.toPrimitive];if(void 0!==a){var r=a.call(e,"string");if("object"!==S(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===S(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function H(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var a=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var r,n,o,l,s=[],i=!0,c=!1;try{if(o=(a=a.call(e)).next,0===t){if(Object(a)!==a)return;i=!1}else for(;!(i=(r=o.call(a)).done)&&(s.push(r.value),s.length!==t);i=!0);}catch(e){c=!0,n=e}finally{try{if(!i&&null!=a.return&&(l=a.return(),Object(l)!==l))return}finally{if(c)throw n}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return G(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(e):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?G(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function G(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,r=new Array(t);a<t;a++)r[a]=e[a];return r}function w(){var e=H((0,n.useState)(!0),2),t=e[0],a=e[1],r=H((0,n.useState)(!1),2),l=r[0],p=r[1],g=H((0,n.useState)({}),2),S=g[0],x=g[1];(0,n.useEffect)((function(){a(!0),s()({path:"/texty/v1/settings?context=edit"}).then((function(e){x(e),a(!1)}))}),[]);var G=function(e,t,a){x(_(_({},S),{},L({},e,_(_({},S[e]),{},L({},t,_(_({},S[e][t]),{},L({},"value",a)))))))};if(t)return n.createElement(i.Z,null);var w=Object.keys(S.gateways);return n.createElement("div",{className:"texty-settings"},n.createElement("h1",null,(0,o.__)("Settings","texty")),n.createElement("form",{onSubmit:function(e){e.preventDefault();var t={gateway:S.gateway};Object.keys(S.gateways).forEach((function(e){Object.keys(S[e]).forEach((function(a){t.hasOwnProperty(e)||(t[e]={}),t[e][a]=S[e][a].value}))})),p(!0),s()({path:"/texty/v1/settings",method:"POST",data:t}).then((function(e){p(!1),v.Am.success((0,o.__)("Changes have been saved","texty"))})).catch((function(e){p(!1),console.log(e),v.Am.error(e.message)}))},className:"texty-settings__form"},n.createElement(c.ZP,null,n.createElement(u.ZP,null,(0,o.__)("SMS Gateway","texty")),n.createElement(d.ZP,null,n.createElement("fieldset",{disabled:l},n.createElement("div",{className:"settings-row"},n.createElement("div",{className:"settings-row__label"},n.createElement("label",null,(0,o.__)("Gateways","texty"))),n.createElement("div",{className:"settings-row__field"},n.createElement("div",{className:"settings-row__gateways"},w.map((function(e){var t=S.gateways[e],a=t.name,r=t.logo;return n.createElement("div",{className:b()("gateway-card",{active:e===S.gateway}),key:"gateway-"+e,onClick:function(){return"gateway",t=e,void x(_(_({},S),{},L({},"gateway",t)));var t}},n.createElement(E.Z,null),n.createElement("div",{className:"gateway-card__logo"},n.createElement("img",{src:r,alt:a})),n.createElement("div",{className:"gateway-card__heading"},a))}))))),w.map((function(e){var t=S.gateways[e],a=t.name,r=t.description;return S.gateway===e&&n.createElement("div",{className:"settings-row settings-"+e,key:"settings-"+e},n.createElement("h3",null,a),n.createElement("p",null,n.createElement("span",{className:"help",dangerouslySetInnerHTML:{__html:r}})),Object.keys(S[e]).map((function(t){var a=S[e][t],r=a.name,o=a.type,l=a.value,s=a.help;return n.createElement(n.Fragment,{key:"field"+t},"from"===t&&n.createElement(f.Z,{label:r,help:s},n.createElement(h(),{country:"us",value:l,onChange:function(a){return G(e,t,a)}})),"from"!==t&&n.createElement(m.Z,{label:r,value:l,type:o,help:s,onChange:function(a){return G(e,t,a)}}))})))}))))),n.createElement("div",{className:"submit-area"},n.createElement(y.Z,{type:"submit",isPrimary:!0,isBusy:l,className:"large"},l?(0,o.__)("Saving...","texty"):(0,o.__)("Save Changes","texty")))))}e=a.hmd(e),(r="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.enterModule:void 0)&&r(e),("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default.signature:function(e){return e})(w,"useState{[isLoading, setIsLoading](true)}\nuseState{[isSaving, setIsSaving](false)}\nuseState{[settings, setSettings]({})}\nuseEffect{}");var j=w;const O=j;var N,k;(N="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default:void 0)&&(N.register(w,"Settings","/Users/asad/Desktop/release-20241008/texty/src/pages/Settings.js"),N.register(j,"default","/Users/asad/Desktop/release-20241008/texty/src/pages/Settings.js")),(k="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.leaveModule:void 0)&&k(e)},4469:(e,t,a)=>{a.d(t,{Z:()=>y});var r,n=a(7294),o=a(4635),l=a(3818),s=a(4746),i=a(6887),c=a(6992),u=a(2797),d=a(9653);function f(){return n.createElement("div",{className:"texty-tools"},n.createElement("h1",null,(0,o.__)("Tools","texty")),n.createElement(c.Z,null),n.createElement("div",{className:"texty-two-col"},n.createElement("div",{className:"texty-col"},n.createElement(l.ZP,{className:"mt-4"},n.createElement(s.ZP,null,(0,o.__)("Test Message","texty")),n.createElement(i.ZP,null,n.createElement(d.Z,null)))),n.createElement("div",{className:"texty-col"},n.createElement(l.ZP,{className:"mt-4"},n.createElement(s.ZP,null,(0,o.__)("Quick Send","texty")),n.createElement(i.ZP,null,n.createElement(u.Z,null))))))}e=a.hmd(e),(r="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.enterModule:void 0)&&r(e),"undefined"!=typeof reactHotLoaderGlobal&&reactHotLoaderGlobal.default.signature;var m=f;const y=m;var p,b;(p="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default:void 0)&&(p.register(f,"Tools","/Users/asad/Desktop/release-20241008/texty/src/pages/Tools.js"),p.register(m,"default","/Users/asad/Desktop/release-20241008/texty/src/pages/Tools.js")),(b="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.leaveModule:void 0)&&b(e)},788:(e,t,a)=>{var r;function n(e){var t=jQuery,a=t("#toplevel_page_"+e),r=window.location.href,n=r.substr(r.indexOf("admin.php"));a.on("click","a",(function(){var e=t(this);t("ul.wp-submenu li",a).removeClass("current"),e.hasClass("wp-has-submenu")?t("li.wp-first-item",a).addClass("current"):e.parents("li").addClass("current")})),t("ul.wp-submenu a",a).each((function(e,a){t(a).attr("href")!==n||t(a).parent().addClass("current")}))}a.d(t,{Z:()=>l}),e=a.hmd(e),(r="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.enterModule:void 0)&&r(e),"undefined"!=typeof reactHotLoaderGlobal&&reactHotLoaderGlobal.default.signature;var o=n;const l=o;var s,i;(s="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default:void 0)&&(s.register(n,"menuFix","/Users/asad/Desktop/release-20241008/texty/src/utils/admin-menu-fix.js"),s.register(o,"default","/Users/asad/Desktop/release-20241008/texty/src/utils/admin-menu-fix.js")),(i="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.leaveModule:void 0)&&i(e)},1865:e=>{e.exports=wp.apiFetch},4635:e=>{e.exports=wp.i18n}},e=>{e.O(0,[216],(()=>(5579,e(e.s=5579)))),e.O()}]);1 "use strict";(self.webpackChunktexty=self.webpackChunktexty||[]).push([[143],{8187:(e,t,n)=>{n.d(t,{Z:()=>p});var a,r=n(1570),o=n(7294),l=n(3727),s=n(6550),i=n(1231),c=n(8602),u=n(7046),d=n(2700),f=n(4469);function m(){return o.createElement(l.UT,null,o.createElement(i.Ix,{position:"top-right",autoClose:5e3,hideProgressBar:!1,newestOnTop:!0,closeOnClick:!0,rtl:!1,pauseOnFocusLoss:!1,draggable:!0,pauseOnHover:!0}),o.createElement(c.Z,null),o.createElement("div",{className:"wrap texty"},o.createElement("div",{className:"texty-container"},o.createElement(s.rs,null,o.createElement(s.AW,{path:"/notifications",component:u.Z}),o.createElement(s.AW,{path:"/tools",component:f.Z}),o.createElement(s.AW,{path:"/",exact:!0,component:d.Z})))))}e=n.hmd(e),(a="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.enterModule:void 0)&&a(e),"undefined"!=typeof reactHotLoaderGlobal&&reactHotLoaderGlobal.default.signature;var y=(0,r.w)(m);const p=y;var b,v;(b="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default:void 0)&&(b.register(m,"App","/Users/kzaman/Herd/dokan/wp-content/plugins/texty/src/App.js"),b.register(y,"default","/Users/kzaman/Herd/dokan/wp-content/plugins/texty/src/App.js")),(v="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.leaveModule:void 0)&&v(e)},8359:(e,t,n)=>{n.d(t,{Z:()=>s});var a,r=n(7294);function o(){return r.createElement("svg",{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",stroke:"currentColor",viewBox:"0 0 24 24",className:"active-icon"},r.createElement("path",{d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"}))}e=n.hmd(e),(a="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.enterModule:void 0)&&a(e),"undefined"!=typeof reactHotLoaderGlobal&&reactHotLoaderGlobal.default.signature;var l=o;const s=l;var i,c;(i="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default:void 0)&&(i.register(o,"ActiveIcon","/Users/kzaman/Herd/dokan/wp-content/plugins/texty/src/components/ActiveIcon.js"),i.register(l,"default","/Users/kzaman/Herd/dokan/wp-content/plugins/texty/src/components/ActiveIcon.js")),(c="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.leaveModule:void 0)&&c(e)},8602:(e,t,n)=>{n.d(t,{Z:()=>c});var a,r=n(7294),o=n(4635),l=n(3727);function s(){return r.createElement("div",{className:"texty-header-wrap"},r.createElement("div",{className:"texty-container"},r.createElement("div",{className:"texty-header"},r.createElement("div",{className:"texty-admin-header__logo"},r.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 97 28",width:"97",height:"28"},r.createElement("g",{fill:"none",fillRule:"nonzero"},r.createElement("path",{fill:"#FF0F45",d:"M15.617 0c.893 0 1.766.084 2.613.244a7.954 7.954 0 00-1.633 4.087 9.766 9.766 0 00-.98-.05c-5.36 0-9.706 4.346-9.706 9.706 0 2.262.774 4.4 2.17 6.117l.933 1.148-1.433 2.44h8.036c5.36 0 9.705-4.345 9.705-9.705 0-.3-.013-.597-.04-.89a7.948 7.948 0 004.102-1.594c.145.806.22 1.636.22 2.484 0 7.725-6.262 13.988-13.987 13.988H0l3.862-6.405-.018-.028a13.934 13.934 0 01-2.214-7.555C1.63 6.262 7.892 0 15.617 0zm8.932 0a5.138 5.138 0 110 10.276A5.138 5.138 0 0124.55 0z"}),r.createElement("path",{fill:"#000",d:"M87.482 7.8l2.65 8.9 2.636-8.9h4.087l-5.734 16.53-.317.755-.039.084c-.856 1.813-2.25 2.72-4.18 2.72a5.977 5.977 0 01-1.687-.252v-2.896l.58.013h.09c.676-.01 1.184-.12 1.525-.33.356-.221.635-.587.837-1.098l.449-1.177-4.997-14.35h4.1zm-43.91-3.518V7.8h2.44v2.803h-2.44v7.142l.001.071c.009.492.11.847.303 1.066.202.23.589.344 1.16.344.422 0 .795-.03 1.12-.093v2.897l-.14.041a7.825 7.825 0 01-2.167.302c-2.671 0-4.033-1.353-4.086-4.06v-7.71H37.68V7.8h2.083V4.282h3.81zm9.894 3.253c1.95 0 3.486.617 4.607 1.852 1.1 1.211 1.66 2.92 1.68 5.127v1.683h-9.082l.013.093c.135.892.502 1.61 1.1 2.156.62.564 1.405.846 2.354.846 1.437 0 2.567-.511 3.389-1.534l.052-.066 1.871 2.103-.061.086c-.565.77-1.318 1.374-2.259 1.811-.975.454-2.056.681-3.243.681-2.091 0-3.794-.643-5.108-1.93-1.29-1.265-1.947-2.941-1.97-5.03v-.628c.018-1.38.295-2.617.83-3.712.554-1.133 1.338-2.006 2.353-2.619 1.015-.612 2.173-.919 3.474-.919zm26.533-3.253V7.8h2.44v2.803h-2.44v7.142l.001.071c.009.492.11.847.303 1.066.202.23.589.344 1.16.344.422 0 .795-.03 1.12-.093v2.897l-.14.041a7.825 7.825 0 01-2.167.302c-2.671 0-4.034-1.353-4.086-4.06v-7.71h-2.083V7.8h2.083V4.282H80zM64.541 7.8l2.347 4.271 2.4-4.271h4.072l-4.06 7.009 4.232 7.3h-4.087l-2.544-4.497-2.531 4.497h-4.1l4.232-7.3-4.047-7.01h4.086zm-11.089 2.83c-.755 0-1.368.255-1.839.767-.454.494-.75 1.193-.888 2.097l-.015.098h5.3v-.304l-.003-.087c-.03-.804-.258-1.43-.683-1.877-.44-.463-1.063-.694-1.872-.694z"})))),r.createElement("div",{className:"texty-admin-header__menu"},r.createElement(l.OL,{to:"/",exact:!0,className:"header-link",title:(0,o.__)("Gateway Settings","texty")},r.createElement("span",{className:"dashicons dashicons-admin-settings"}),r.createElement("span",{className:"title"},(0,o.__)("Gateway Settings","texty"))),r.createElement(l.OL,{to:"/notifications",className:"header-link",title:(0,o.__)("Notifications","texty")},r.createElement("span",{className:"dashicons dashicons-admin-plugins"}),r.createElement("span",{className:"title"},(0,o.__)("Notifications","texty"))),r.createElement(l.OL,{to:"/tools",className:"header-link",title:(0,o.__)("Tools","texty")},r.createElement("span",{className:"dashicons dashicons-admin-tools"}),r.createElement("span",{className:"title"},(0,o.__)("Tools","texty")))))))}e=n.hmd(e),(a="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.enterModule:void 0)&&a(e),"undefined"!=typeof reactHotLoaderGlobal&&reactHotLoaderGlobal.default.signature;var i=s;const c=i;var u,d;(u="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default:void 0)&&(u.register(s,"Header","/Users/kzaman/Herd/dokan/wp-content/plugins/texty/src/components/Header.js"),u.register(i,"default","/Users/kzaman/Herd/dokan/wp-content/plugins/texty/src/components/Header.js")),(d="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.leaveModule:void 0)&&d(e)},9931:(e,t,n)=>{n.d(t,{Z:()=>p});var a,r=n(7294),o=n(4635),l=n(4184),s=n.n(l),i=n(5373),c=n(6117),u=n(9586),d=n(3412),f=n(211);function m(e){var t=e.title,n=e.description,a=e.keyName,l=e.roles,m=e.settings,y=e.setOption,p=m.replacements.map((function(e){return"<code>{".concat(e,"}</code>")})).join(", ");return r.createElement(i.Z,{initialOpen:!1,title:r.createElement(r.Fragment,null,r.createElement("span",null,t),r.createElement("span",{className:s()("label",{active:!0===m.enabled})},m.enabled?(0,o.__)("active","texty"):(0,o.__)("inactive","texty")))},r.createElement(c.Z,{label:(0,o.__)("Enable","texty"),help:n,checked:m.enabled,onChange:function(e){return y(a,"enabled",e)}}),"role"===m.type&&r.createElement(u.Z,{label:(0,o.__)("Recipients"),help:"role"===m.type?(0,o.__)("Select one or multiple user roles. Users with phone number in their profile will receive the text","texty"):""},r.createElement(f.ZP,{required:!0,isMulti:"role"===m.type,value:l.filter((function(e){return m.recipients.includes(e.value)})),options:l,onChange:function(e){y(a,"recipients",null!==e?e.map((function(e){return e.value})):[])}})),r.createElement(d.Z,{label:(0,o.__)("Message","texty"),className:"monospace",required:!0,help:r.createElement("span",{className:"help",dangerouslySetInnerHTML:{__html:(0,o.__)("You may use these variables: ","texty")+p}}),value:m.message,onChange:function(e){return y(a,"message",e)}}))}e=n.hmd(e),(a="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.enterModule:void 0)&&a(e),"undefined"!=typeof reactHotLoaderGlobal&&reactHotLoaderGlobal.default.signature;var y=m;const p=y;var b,v;(b="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default:void 0)&&(b.register(m,"NotificationItem","/Users/kzaman/Herd/dokan/wp-content/plugins/texty/src/components/NotificationItem.js"),b.register(y,"default","/Users/kzaman/Herd/dokan/wp-content/plugins/texty/src/components/NotificationItem.js")),(v="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.leaveModule:void 0)&&v(e)},2797:(e,t,n)=>{n.d(t,{Z:()=>b});var a,r=n(7294),o=n(4635),l=n(1865),s=n.n(l),i=n(9545),c=n(3412),u=n(9676),d=n(1231);function f(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var a,r,o,l,s=[],i=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;i=!1}else for(;!(i=(a=o.call(n)).done)&&(s.push(a.value),s.length!==t);i=!0);}catch(e){c=!0,r=e}finally{try{if(!i&&null!=n.return&&(l=n.return(),Object(l)!==l))return}finally{if(c)throw r}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return m(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?m(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}function y(){var e=f((0,r.useState)(!1),2),t=e[0],n=e[1],a=f((0,r.useState)(""),2),l=a[0],m=a[1],y=f((0,r.useState)(""),2),p=y[0],b=y[1];return r.createElement("form",{onSubmit:function(e){e.preventDefault(),n(!0),s()({path:"/texty/v1/send",method:"POST",data:{to:l,message:p}}).then((function(e){n(!1),e.success?d.Am.success((0,o.__)("Message has been sent.","texty")):d.Am.error((0,o.__)("Error, message could not be sent.","texty")+" "+e.message)})).catch((function(e){n(!1),console.log(e)}))},className:"texty-settings__form"},r.createElement("fieldset",{disabled:t},r.createElement(i.Z,{label:(0,o.__)("Phone Number","texty"),placeholder:"+123456789",type:"tel",value:l,onChange:function(e){return m(e)},required:!0}),r.createElement(c.Z,{label:(0,o.__)("Message","texty"),value:p,placeholder:(0,o.__)("Write your message...","texty"),onChange:function(e){return b(e)},required:!0})),r.createElement("div",{className:"submit-area"},r.createElement(u.Z,{type:"submit",isPrimary:!0,isBusy:t},t?(0,o.__)("Sending...","texty"):(0,o.__)("Send Message","texty"))))}e=n.hmd(e),(a="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.enterModule:void 0)&&a(e),("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default.signature:function(e){return e})(y,"useState{[isSending, setIsSending](false)}\nuseState{[phoneNumber, setPhoneNumber]('')}\nuseState{[message, setMessage]('')}");var p=y;const b=p;var v,g;(v="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default:void 0)&&(v.register(y,"QuickSend","/Users/kzaman/Herd/dokan/wp-content/plugins/texty/src/components/QuickSend.js"),v.register(p,"default","/Users/kzaman/Herd/dokan/wp-content/plugins/texty/src/components/QuickSend.js")),(g="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.leaveModule:void 0)&&g(e)},6992:(e,t,n)=>{n.d(t,{Z:()=>p});var a,r=n(7294),o=n(4635),l=n(1865),s=n.n(l),i=n(1264),c=n(4410),u=n(7347);function d(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var a,r,o,l,s=[],i=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;i=!1}else for(;!(i=(a=o.call(n)).done)&&(s.push(a.value),s.length!==t);i=!0);}catch(e){c=!0,r=e}finally{try{if(!i&&null!=n.return&&(l=n.return(),Object(l)!==l))return}finally{if(c)throw r}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return f(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?f(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}function m(){var e=d((0,r.useState)(!1),2),t=e[0],n=e[1],a=d((0,r.useState)(!0),2),l=a[0],f=a[1];return(0,r.useEffect)((function(){f(!0),s()({path:"/texty/v1/status"}).then((function(e){f(!1),n(e.success)}))}),[]),l?r.createElement(i.Z,null,r.createElement(c.Z,null)):r.createElement(i.Z,{status:t?"success":"error",isDismissible:!1},r.createElement(u.Z,{icon:t?"yes-alt":"dismiss"}),r.createElement("span",null,t?(0,o.__)("Connected","texty"):(0,o.__)("Not connected","texty")))}e=n.hmd(e),(a="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.enterModule:void 0)&&a(e),("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default.signature:function(e){return e})(m,"useState{[isConnected, setIsConnected](false)}\nuseState{[isFetching, setIsFetching](true)}\nuseEffect{}");var y=m;const p=y;var b,v;(b="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default:void 0)&&(b.register(m,"Status","/Users/kzaman/Herd/dokan/wp-content/plugins/texty/src/components/Status.js"),b.register(y,"default","/Users/kzaman/Herd/dokan/wp-content/plugins/texty/src/components/Status.js")),(v="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.leaveModule:void 0)&&v(e)},9653:(e,t,n)=>{n.d(t,{Z:()=>p});var a,r=n(7294),o=n(4635),l=n(1865),s=n.n(l),i=n(9545),c=n(9676),u=n(1231);function d(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var a,r,o,l,s=[],i=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;i=!1}else for(;!(i=(a=o.call(n)).done)&&(s.push(a.value),s.length!==t);i=!0);}catch(e){c=!0,r=e}finally{try{if(!i&&null!=n.return&&(l=n.return(),Object(l)!==l))return}finally{if(c)throw r}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return f(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?f(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}function m(){var e=d((0,r.useState)(!1),2),t=e[0],n=e[1],a=d((0,r.useState)(""),2),l=a[0],f=a[1];return r.createElement("form",{onSubmit:function(e){e.preventDefault(),n(!0),s()({path:"/texty/v1/tools/test",method:"POST",data:{to:l}}).then((function(e){n(!1),e.success?u.Am.success((0,o.__)("Message has been sent.","texty")):u.Am.error((0,o.__)("Error, message could not be sent.","texty")+" "+e.message)})).catch((function(e){n(!1),console.log(e)}))},className:"texty-settings__form"},r.createElement("fieldset",{disabled:t},r.createElement(i.Z,{label:(0,o.__)("Test Number","texty"),placeholder:"+123456789",type:"tel",value:l,onChange:function(e){return f(e)},help:(0,o.__)("Enter a phone number to test the SMS sending.","texty"),required:!0})),r.createElement("div",{className:"submit-area"},r.createElement(c.Z,{type:"submit",isPrimary:!0,isBusy:t},t?(0,o.__)("Sending...","texty"):(0,o.__)("Send Test","texty"))))}e=n.hmd(e),(a="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.enterModule:void 0)&&a(e),("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default.signature:function(e){return e})(m,"useState{[isSending, setIsSending](false)}\nuseState{[phoneNumber, setPhoneNumber]('')}");var y=m;const p=y;var b,v;(b="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default:void 0)&&(b.register(m,"TestMessage","/Users/kzaman/Herd/dokan/wp-content/plugins/texty/src/components/TestMessage.js"),b.register(y,"default","/Users/kzaman/Herd/dokan/wp-content/plugins/texty/src/components/TestMessage.js")),(v="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.leaveModule:void 0)&&v(e)},5579:(e,t,n)=>{var a,r=n(7294),o=n(9060),l=n(788),s=n(8187);n(4061),e=n.hmd(e),(a="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.enterModule:void 0)&&a(e),"undefined"!=typeof reactHotLoaderGlobal&&reactHotLoaderGlobal.default.signature;var i,c,u=document.getElementById("texty-app");o.render(r.createElement(s.Z,null),u),(0,l.Z)("texty"),(i="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default:void 0)&&i.register(u,"mountNode","/Users/kzaman/Herd/dokan/wp-content/plugins/texty/src/index.js"),(c="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.leaveModule:void 0)&&c(e)},7046:(e,t,n)=>{n.d(t,{Z:()=>L});var a,r=n(7294),o=n(4635),l=n(1231),s=n(1865),i=n.n(s),c=n(4184),u=n.n(c),d=n(4410),f=n(3818),m=n(4746),y=n(6887),p=n(3033),b=n(9676),v=n(9931);function g(e){return g="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},g(e)}function h(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function E(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?h(Object(n),!0).forEach((function(t){H(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function H(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==g(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var a=n.call(e,"string");if("object"!==g(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===g(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function S(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var a,r,o,l,s=[],i=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;i=!1}else for(;!(i=(a=o.call(n)).done)&&(s.push(a.value),s.length!==t);i=!0);}catch(e){c=!0,r=e}finally{try{if(!i&&null!=n.return&&(l=n.return(),Object(l)!==l))return}finally{if(c)throw r}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return x(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?x(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function x(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}function _(){var e=S((0,r.useState)(!0),2),t=e[0],n=e[1],a=S((0,r.useState)(!1),2),s=a[0],c=a[1],g=S((0,r.useState)({}),2),h=g[0],x=g[1];(0,r.useEffect)((function(){n(!0),i()({path:"/texty/v1/notifications?context=edit"}).then((function(e){x(e),n(!1)}))}),[]);var _=function(e,t,n){x(E(E({},h),{},H({},"notifications",E(E({},h.notifications),{},H({},e,E(E({},h.notifications[e]),{},H({},t,n)))))))};return t?r.createElement(d.Z,null):r.createElement("div",{className:"texty-notifications"},r.createElement("h1",null,(0,o.__)("Notifications","texty")),r.createElement("p",null,(0,o.__)("Enable or disable notification based on different events.","texty")),r.createElement("form",{onSubmit:function(e){e.preventDefault();var t={};Object.keys(h.notifications).forEach((function(e){t.hasOwnProperty(e)||(t[e]={});var n=h.notifications[e];t[e]={enabled:n.enabled,message:n.message,recipients:n.recipients,route:n.route}})),c(!0),i()({path:"/texty/v1/notifications",method:"POST",data:t}).then((function(e){c(!1),l.Am.success((0,o.__)("Changes have been saved","texty"))})).catch((function(e){c(!1),console.log(e),l.Am.error(e.message)}))}},Object.keys(h.groups).map((function(e){var t=h.groups[e],n=t.title,a=t.available;return r.createElement(f.ZP,{key:e},r.createElement(m.ZP,{className:u()({inactive:!a})},n,!a&&r.createElement("span",{class:"sub-heading"},(0,o.__)("Plugin not installed","texty"))),a&&r.createElement(y.ZP,{className:"has-panel"},r.createElement(p.Z,null,Object.keys(h.notifications).map((function(t){var n=h.notifications[t];return e===n.group&&r.createElement(v.Z,{key:t,title:n.title,roles:h.roles,keyName:n.id,settings:n,setOption:_})})))))})),r.createElement("div",{className:"submit-area"},r.createElement(b.Z,{type:"submit",isPrimary:!0,isBusy:s,className:"large"},s?(0,o.__)("Saving...","texty"):(0,o.__)("Save Changes","texty")))))}e=n.hmd(e),(a="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.enterModule:void 0)&&a(e),("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default.signature:function(e){return e})(_,"useState{[isLoading, setIsLoading](true)}\nuseState{[isSaving, setIsSaving](false)}\nuseState{[settings, setSettings]({})}\nuseEffect{}");var w=_;const L=w;var G,j;(G="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default:void 0)&&(G.register(_,"Notifications","/Users/kzaman/Herd/dokan/wp-content/plugins/texty/src/pages/Notifications.js"),G.register(w,"default","/Users/kzaman/Herd/dokan/wp-content/plugins/texty/src/pages/Notifications.js")),(j="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.leaveModule:void 0)&&j(e)},2700:(e,t,n)=>{n.d(t,{Z:()=>O});var a,r=n(7294),o=n(4635),l=n(1865),s=n.n(l),i=n(4410),c=n(3818),u=n(4746),d=n(6887),f=n(9586),m=n(9545),y=n(9676),p=n(4184),b=n.n(p),v=n(1231),g=n(7555),h=n.n(g),E=n(8359);function H(e){return H="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},H(e)}function S(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function x(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?S(Object(n),!0).forEach((function(t){_(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):S(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function _(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==H(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var a=n.call(e,"string");if("object"!==H(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===H(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function w(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var a,r,o,l,s=[],i=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;i=!1}else for(;!(i=(a=o.call(n)).done)&&(s.push(a.value),s.length!==t);i=!0);}catch(e){c=!0,r=e}finally{try{if(!i&&null!=n.return&&(l=n.return(),Object(l)!==l))return}finally{if(c)throw r}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return L(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?L(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function L(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}function G(){var e=w((0,r.useState)(!0),2),t=e[0],n=e[1],a=w((0,r.useState)(!1),2),l=a[0],p=a[1],g=w((0,r.useState)({}),2),H=g[0],S=g[1];(0,r.useEffect)((function(){n(!0),s()({path:"/texty/v1/settings?context=edit"}).then((function(e){S(e),n(!1)}))}),[]);var L=function(e,t,n){S(x(x({},H),{},_({},e,x(x({},H[e]),{},_({},t,x(x({},H[e][t]),{},_({},"value",n)))))))};if(t)return r.createElement(i.Z,null);var G=Object.keys(H.gateways);return r.createElement("div",{className:"texty-settings"},r.createElement("h1",null,(0,o.__)("Settings","texty")),r.createElement("form",{onSubmit:function(e){e.preventDefault();var t={gateway:H.gateway};Object.keys(H.gateways).forEach((function(e){Object.keys(H[e]).forEach((function(n){t.hasOwnProperty(e)||(t[e]={}),t[e][n]=H[e][n].value}))})),p(!0),s()({path:"/texty/v1/settings",method:"POST",data:t}).then((function(e){p(!1),v.Am.success((0,o.__)("Changes have been saved","texty"))})).catch((function(e){p(!1),console.log(e),v.Am.error(e.message)}))},className:"texty-settings__form"},r.createElement(c.ZP,null,r.createElement(u.ZP,null,(0,o.__)("SMS Gateway","texty")),r.createElement(d.ZP,null,r.createElement("fieldset",{disabled:l},r.createElement("div",{className:"settings-row"},r.createElement("div",{className:"settings-row__label"},r.createElement("label",null,(0,o.__)("Gateways","texty"))),r.createElement("div",{className:"settings-row__field"},r.createElement("div",{className:"settings-row__gateways"},G.map((function(e){var t=H.gateways[e],n=t.name,a=t.logo;return r.createElement("div",{className:b()("gateway-card",{active:e===H.gateway}),key:"gateway-"+e,onClick:function(){return"gateway",t=e,void S(x(x({},H),{},_({},"gateway",t)));var t}},r.createElement(E.Z,null),r.createElement("div",{className:"gateway-card__logo"},r.createElement("img",{src:a,alt:n})),r.createElement("div",{className:"gateway-card__heading"},n))}))))),G.map((function(e){var t=H.gateways[e],n=t.name,a=t.description;return H.gateway===e&&r.createElement("div",{className:"settings-row settings-"+e,key:"settings-"+e},r.createElement("h3",null,n),r.createElement("p",null,r.createElement("span",{className:"help",dangerouslySetInnerHTML:{__html:a}})),Object.keys(H[e]).map((function(t){var n=H[e][t],a=n.name,o=n.type,l=n.value,s=n.help;return r.createElement(r.Fragment,{key:"field"+t},"from"===t&&r.createElement(f.Z,{label:a,help:s},r.createElement(h(),{country:"us",value:l,onChange:function(n){return L(e,t,n)}})),"from"!==t&&r.createElement(m.Z,{label:a,value:l,type:o,help:s,onChange:function(n){return L(e,t,n)}}))})))}))))),r.createElement("div",{className:"submit-area"},r.createElement(y.Z,{type:"submit",isPrimary:!0,isBusy:l,className:"large"},l?(0,o.__)("Saving...","texty"):(0,o.__)("Save Changes","texty")))))}e=n.hmd(e),(a="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.enterModule:void 0)&&a(e),("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default.signature:function(e){return e})(G,"useState{[isLoading, setIsLoading](true)}\nuseState{[isSaving, setIsSaving](false)}\nuseState{[settings, setSettings]({})}\nuseEffect{}");var j=G;const O=j;var k,N;(k="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default:void 0)&&(k.register(G,"Settings","/Users/kzaman/Herd/dokan/wp-content/plugins/texty/src/pages/Settings.js"),k.register(j,"default","/Users/kzaman/Herd/dokan/wp-content/plugins/texty/src/pages/Settings.js")),(N="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.leaveModule:void 0)&&N(e)},4469:(e,t,n)=>{n.d(t,{Z:()=>y});var a,r=n(7294),o=n(4635),l=n(3818),s=n(4746),i=n(6887),c=n(6992),u=n(2797),d=n(9653);function f(){return r.createElement("div",{className:"texty-tools"},r.createElement("h1",null,(0,o.__)("Tools","texty")),r.createElement(c.Z,null),r.createElement("div",{className:"texty-two-col"},r.createElement("div",{className:"texty-col"},r.createElement(l.ZP,{className:"mt-4"},r.createElement(s.ZP,null,(0,o.__)("Test Message","texty")),r.createElement(i.ZP,null,r.createElement(d.Z,null)))),r.createElement("div",{className:"texty-col"},r.createElement(l.ZP,{className:"mt-4"},r.createElement(s.ZP,null,(0,o.__)("Quick Send","texty")),r.createElement(i.ZP,null,r.createElement(u.Z,null))))))}e=n.hmd(e),(a="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.enterModule:void 0)&&a(e),"undefined"!=typeof reactHotLoaderGlobal&&reactHotLoaderGlobal.default.signature;var m=f;const y=m;var p,b;(p="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default:void 0)&&(p.register(f,"Tools","/Users/kzaman/Herd/dokan/wp-content/plugins/texty/src/pages/Tools.js"),p.register(m,"default","/Users/kzaman/Herd/dokan/wp-content/plugins/texty/src/pages/Tools.js")),(b="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.leaveModule:void 0)&&b(e)},788:(e,t,n)=>{var a;function r(e){var t=jQuery,n=t("#toplevel_page_"+e),a=window.location.href,r=a.substr(a.indexOf("admin.php"));n.on("click","a",(function(){var e=t(this);t("ul.wp-submenu li",n).removeClass("current"),e.hasClass("wp-has-submenu")?t("li.wp-first-item",n).addClass("current"):e.parents("li").addClass("current")})),t("ul.wp-submenu a",n).each((function(e,n){t(n).attr("href")!==r||t(n).parent().addClass("current")}))}n.d(t,{Z:()=>l}),e=n.hmd(e),(a="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.enterModule:void 0)&&a(e),"undefined"!=typeof reactHotLoaderGlobal&&reactHotLoaderGlobal.default.signature;var o=r;const l=o;var s,i;(s="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default:void 0)&&(s.register(r,"menuFix","/Users/kzaman/Herd/dokan/wp-content/plugins/texty/src/utils/admin-menu-fix.js"),s.register(o,"default","/Users/kzaman/Herd/dokan/wp-content/plugins/texty/src/utils/admin-menu-fix.js")),(i="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.leaveModule:void 0)&&i(e)},1865:e=>{e.exports=wp.apiFetch},4635:e=>{e.exports=wp.i18n}},e=>{e.O(0,[216],(()=>(5579,e(e.s=5579)))),e.O()}]); -
texty/tags/1.1.5/includes/Integrations/Dokan.php
r2591483 r3452714 41 41 case 'completed': 42 42 $this->send( 'order_dokan_complete', $order, $vendor_id ); 43 break; 44 45 case 'cancelled': 46 $this->send( 'order_dokan_cancelled', $order, $vendor_id ); 47 break; 48 49 case 'failed': 50 $this->send( 'order_dokan_failed', $order, $vendor_id ); 51 break; 52 53 case 'refunded': 54 $this->send( 'order_dokan_refunded', $order, $vendor_id ); 43 55 break; 44 56 -
texty/tags/1.1.5/includes/Integrations/WooCommerce.php
r2458183 r3452714 46 46 break; 47 47 48 case 'cancelled': 49 $this->send( 'order_admin_cancelled', $order ); 50 $this->send( 'order_customer_cancelled', $order ); 51 break; 52 53 case 'failed': 54 $this->send( 'order_admin_failed', $order ); 55 $this->send( 'order_customer_failed', $order ); 56 break; 57 58 case 'refunded': 59 $this->send( 'order_admin_refunded', $order ); 60 $this->send( 'order_customer_refunded', $order ); 61 break; 62 48 63 default: 49 64 // code... -
texty/tags/1.1.5/includes/Notifications.php
r2460864 r3452714 56 56 $notifications['order_admin_processing'] = __NAMESPACE__ . '\Notifications\WC\ProcessingAdmin'; 57 57 $notifications['order_admin_complete'] = __NAMESPACE__ . '\Notifications\WC\CompleteAdmin'; 58 $notifications['order_admin_cancelled'] = __NAMESPACE__ . '\Notifications\WC\CancelledAdmin'; 59 $notifications['order_admin_failed'] = __NAMESPACE__ . '\Notifications\WC\FailedAdmin'; 60 $notifications['order_admin_refunded'] = __NAMESPACE__ . '\Notifications\WC\RefundedAdmin'; 58 61 59 62 // WC Customers … … 61 64 $notifications['order_customer_processing'] = __NAMESPACE__ . '\Notifications\WC\ProcessingCustomer'; 62 65 $notifications['order_customer_complete'] = __NAMESPACE__ . '\Notifications\WC\CompleteCustomer'; 66 $notifications['order_customer_cancelled'] = __NAMESPACE__ . '\Notifications\WC\CancelledCustomer'; 67 $notifications['order_customer_failed'] = __NAMESPACE__ . '\Notifications\WC\FailedCustomer'; 68 $notifications['order_customer_refunded'] = __NAMESPACE__ . '\Notifications\WC\RefundedCustomer'; 63 69 } 64 70 … … 66 72 $notifications['order_dokan_processing'] = __NAMESPACE__ . '\Notifications\Dokan\ProcessingVendor'; 67 73 $notifications['order_dokan_complete'] = __NAMESPACE__ . '\Notifications\Dokan\CompleteVendor'; 74 $notifications['order_dokan_cancelled'] = __NAMESPACE__ . '\Notifications\Dokan\CancelledVendor'; 75 $notifications['order_dokan_failed'] = __NAMESPACE__ . '\Notifications\Dokan\FailedVendor'; 76 $notifications['order_dokan_refunded'] = __NAMESPACE__ . '\Notifications\Dokan\RefundedVendor'; 68 77 } 69 78 -
texty/tags/1.1.5/languages/texty.json
r2736472 r3452714 126 126 "" 127 127 ], 128 "Vendor - When Order Status is Cancelled": [ 129 null, 130 "" 131 ], 128 132 "Vendor - When Order Status is Complete": [ 129 133 null, 130 134 "" 131 135 ], 136 "Vendor - When Order Status is Failed": [ 137 null, 138 "" 139 ], 132 140 "Vendor - When Order Status is Processing": [ 133 141 null, 134 142 "" 135 143 ], 144 "Vendor - When Order Status is Refunded": [ 145 null, 146 "" 147 ], 148 "Admin - When Order Status is Cancelled": [ 149 null, 150 "" 151 ], 152 "Customer - When Order Status is Cancelled": [ 153 null, 154 "" 155 ], 136 156 "Admin - When Order Status is Complete": [ 137 157 null, … … 142 162 "" 143 163 ], 164 "Admin - When Order Status is Failed": [ 165 null, 166 "" 167 ], 168 "Customer - When Order Status is Failed": [ 169 null, 170 "" 171 ], 144 172 "Customer - When Order Status is On Hold": [ 145 173 null, … … 151 179 ], 152 180 "Customer - When Order Status is Processing": [ 181 null, 182 "" 183 ], 184 "Admin - When Order Status is Refunded": [ 185 null, 186 "" 187 ], 188 "Customer - When Order Status is Refunded": [ 153 189 null, 154 190 "" -
texty/tags/1.1.5/languages/texty.pot
r3165401 r3452714 1 # Copyright (c) 202 4weDevs Pte. Ltd. All Rights Reserved.1 # Copyright (c) 2026 weDevs Pte. Ltd. All Rights Reserved. 2 2 msgid "" 3 3 msgstr "" 4 "Project-Id-Version: Texty 1.1. 4\n"4 "Project-Id-Version: Texty 1.1.5\n" 5 5 "Report-Msgid-Bugs-To: https://github.com/weDevsOfficial/texty/issues\n" 6 6 "Last-Translator: [email protected]\n" … … 9 9 "Content-Type: text/plain; charset=UTF-8\n" 10 10 "Content-Transfer-Encoding: 8bit\n" 11 "POT-Creation-Date: 202 4-10-08T10:12:25+00:00\n"11 "POT-Creation-Date: 2026-02-03T07:07:31+00:00\n" 12 12 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 13 "X-Generator: WP-CLI 2. 8.1\n"13 "X-Generator: WP-CLI 2.11.0\n" 14 14 "X-Domain: texty\n" 15 15 16 16 #. Plugin Name of the plugin 17 #: texty.php 17 18 #: includes/Admin/Menu.php:26 18 19 #: includes/Admin/Menu.php:27 … … 21 22 22 23 #. Plugin URI of the plugin 24 #: texty.php 23 25 msgid "https://wordpress.org/plugins/texty/" 24 26 msgstr "" 25 27 26 28 #. Description of the plugin 29 #: texty.php 27 30 msgid "SMS Notification for WordPress" 28 31 msgstr "" 29 32 30 33 #. Author of the plugin 34 #: texty.php 31 35 msgid "weDevs" 32 36 msgstr "" 33 37 34 38 #. Author URI of the plugin 39 #: texty.php 35 40 msgid "https://wptexty.com/" 36 41 msgstr "" … … 133 138 msgstr "" 134 139 135 #: includes/Notifications.php: 83140 #: includes/Notifications.php:92 136 141 msgid "WordPress" 137 142 msgstr "" 138 143 139 #: includes/Notifications.php: 88144 #: includes/Notifications.php:97 140 145 msgid "WooCommerce" 141 146 msgstr "" 142 147 143 #: includes/Notifications.php: 93148 #: includes/Notifications.php:102 144 149 msgid "Dokan" 150 msgstr "" 151 152 #: includes/Notifications/Dokan/CancelledVendor.php:11 153 msgid "Vendor - When Order Status is Cancelled" 145 154 msgstr "" 146 155 … … 149 158 msgstr "" 150 159 160 #: includes/Notifications/Dokan/FailedVendor.php:11 161 msgid "Vendor - When Order Status is Failed" 162 msgstr "" 163 151 164 #: includes/Notifications/Dokan/ProcessingVendor.php:11 152 165 msgid "Vendor - When Order Status is Processing" 153 166 msgstr "" 154 167 168 #: includes/Notifications/Dokan/RefundedVendor.php:11 169 msgid "Vendor - When Order Status is Refunded" 170 msgstr "" 171 172 #: includes/Notifications/WC/CancelledAdmin.php:11 173 msgid "Admin - When Order Status is Cancelled" 174 msgstr "" 175 176 #: includes/Notifications/WC/CancelledCustomer.php:11 177 msgid "Customer - When Order Status is Cancelled" 178 msgstr "" 179 155 180 #: includes/Notifications/WC/CompleteAdmin.php:11 156 181 msgid "Admin - When Order Status is Complete" … … 161 186 msgstr "" 162 187 188 #: includes/Notifications/WC/FailedAdmin.php:11 189 msgid "Admin - When Order Status is Failed" 190 msgstr "" 191 192 #: includes/Notifications/WC/FailedCustomer.php:11 193 msgid "Customer - When Order Status is Failed" 194 msgstr "" 195 163 196 #: includes/Notifications/WC/HoldCustomer.php:11 164 197 msgid "Customer - When Order Status is On Hold" … … 171 204 #: includes/Notifications/WC/ProcessingCustomer.php:11 172 205 msgid "Customer - When Order Status is Processing" 206 msgstr "" 207 208 #: includes/Notifications/WC/RefundedAdmin.php:11 209 msgid "Admin - When Order Status is Refunded" 210 msgstr "" 211 212 #: includes/Notifications/WC/RefundedCustomer.php:11 213 msgid "Customer - When Order Status is Refunded" 173 214 msgstr "" 174 215 -
texty/tags/1.1.5/readme.txt
r3169056 r3452714 3 3 Donate link: https://tareq.co/donate/ 4 4 Tags: sms, text, notification, twilio, nexmo, vonage, clickatell, plivo, dokan, woocommerce 5 Requires at least: 5.46 Tested up to: 6. 6.27 Stable tag: 1.1.48 Requires PHP: 7.3 5 Requires at least: 6.8 6 Tested up to: 6.9 7 Requires PHP: 7.4 8 Stable tag: 1.1.5 9 9 License: GPLv2 or later 10 10 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 18 18 With so many emails coming to your inbox, often it becomes overwhelming to get top of things that you feel most important. A text notification on your phone, WhatsApp, or Telegram may be more desired. 19 19 20 👉[Docs](https://github.com/weDevsOfficial/texty/wiki)20 👉 [Docs](https://github.com/weDevsOfficial/texty/wiki) 21 21 22 22 ### How does it work? … … 104 104 == Changelog == 105 105 106 = v1.1.5 (3 Feb, 2026) = 107 - **New:** Added notifications for Woocommerce order statuses: cancelled, failed, and refunded 108 - **New:** Added notifications for Dokan Vendor order statuses: cancelled, failed, and refunded 109 - **Update:** Appsero updated for WordPress 6.8 compatibility 110 - **Update:** Mozart is integrated with the plugin 111 - **Update:** WordPress 6.9 compatibility added 112 106 113 = v1.1.4 (8 Oct, 2024) = 107 114 - **update:** WordPress 6.6.2 compatibility … … 125 132 - **New:** Added Plivo gateway. 126 133 - **New:** Added Clickatell gateway. 127 - **New:** Added Dokan integration. Now vendors will receive SMS notifications when they receive an order (processing and compl eted status).134 - **New:** Added Dokan integration. Now vendors will receive SMS notifications when they receive an order (processing and complted status). 128 135 - **New:** Added `{items}` shortcode for WooCommerce orders which displays the product with quantity. 129 136 -
texty/tags/1.1.5/texty.php
r3165401 r3452714 6 6 * Author: weDevs 7 7 * Author URI: https://wptexty.com/ 8 * Version: 1.1. 48 * Version: 1.1.5 9 9 * License: GPL2 or later 10 10 * License URI: https://www.gnu.org/licenses/gpl-2.0.html 11 11 * Text Domain: texty 12 * Requires at least: 6.8 13 * Requires PHP: 7.4 12 14 */ 13 15 defined( 'ABSPATH' ) || exit; … … 25 27 * @var string 26 28 */ 27 private $version = '1.1. 4';29 private $version = '1.1.5'; 28 30 29 31 /** … … 145 147 */ 146 148 public function appsero_init() { 147 $client = new Appsero\Client( 'd4c17b0f-8f01-4b95-a8de-42b0641eec9a', 'Texty', __FILE__ );149 $client = new Texty\Dependencies\Appsero\Client( 'd4c17b0f-8f01-4b95-a8de-42b0641eec9a', 'Texty', __FILE__ ); 148 150 149 151 // Active insights -
texty/tags/1.1.5/vendor/appsero/client/.github/workflows/wpcs.yml
r2987176 r3452714 7 7 runs-on: ubuntu-latest 8 8 steps: 9 - uses: actions/checkout@v 29 - uses: actions/checkout@v3 10 10 11 11 - name: Setup PHP … … 18 18 - name: Get Composer cache directory 19 19 id: composer-cache 20 run: echo " ::set-output name=dir::$(composer config cache-files-dir)"20 run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT 21 21 22 22 - name: Setup cache 23 uses: pat-s/always-upload-cache@v 1.1.423 uses: pat-s/always-upload-cache@v3.0.11 24 24 with: 25 25 path: ${{ steps.composer-cache.outputs.dir }} … … 33 33 run: | 34 34 URL="https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/files" 35 FILES=$(curl -s -X GET -G $URL | jq -r '.[] | .filename' | xargs) 36 echo "::set-output name=files::$FILES" 35 FILES=$(curl -s -X GET -G $URL | jq -r '.[] | select (.status!="removed") | .filename | select ( endswith(".php") )' | xargs) 36 echo "files=$FILES" >> $GITHUB_OUTPUT 37 37 38 - name: Detect coding standard violations 38 39 run: vendor/bin/phpcs ${{ steps.changes.outputs.files }} -q --report=checkstyle | cs2pr --graceful-warnings -
texty/tags/1.1.5/vendor/appsero/client/readme.md
r2987176 r3452714 1 1 # AppSero Client 2 ### Version 1.2.52 ### Version 2.0.2 3 3 4 4 - [Installation](#installation) … … 78 78 // Active insights 79 79 $client->insights()->init(); 80 81 // Active automatic updater82 $client->updater();83 80 84 81 // Active license page and checker … … 99 96 > For plugins example code that needs to be used on your main plugin file. 100 97 > For themes example code that needs to be used on your themes `functions.php` file. 98 99 ## Using the Updater (to manage Pro plugin updates) 100 > By default the Appsero client doesn't include Updater functionalities in this client. If you want to manage updates for your premium plugins, please include [the Updater](https://github.com/Appsero/updater) separately inside your product 101 101 102 102 103 ## More Usage -
texty/tags/1.1.5/vendor/appsero/client/src/Client.php
r2987176 r3452714 15 15 * @var string 16 16 */ 17 public $version = ' 1.2.5';17 public $version = '2.0.4'; 18 18 19 19 /** … … 85 85 */ 86 86 private $insights; 87 88 /**89 * The Object of Updater Class90 *91 * @var object92 */93 private $updater;94 87 95 88 /** … … 138 131 * Initialize plugin/theme updater 139 132 * 140 * @return Appsero\Updater133 * @return void 141 134 */ 142 135 public function updater() { 143 if ( ! class_exists( __NAMESPACE__ . '\Updater' ) ) {144 require_once __DIR__ . '/Updater.php';145 }146 147 // if already instantiated, return the cached one 148 if ( $this->updater ) {149 return $this->updater;150 } 151 152 $this->updater = new Updater( $this );153 154 return $this->updater;136 // do not show update notice on ajax request and rest api request 137 if ( wp_doing_ajax() || ( defined( 'REST_REQUEST' ) && REST_REQUEST ) ) { 138 return; 139 } 140 141 // show deprecated notice 142 _deprecated_function( __CLASS__ . '::updater', '2.0', '\Appsero\Updater::init($client);, for more details please visit: https://appsero.com/docs/appsero-developers-guide/appsero-client/appsero-sdk-updater-changes/' ); 143 144 // initialize the new updater 145 if ( method_exists( '\Appsero\Updater', 'init' ) ) { 146 \Appsero\Updater::init( $this ); 147 } 155 148 } 156 149 … … 199 192 require_once ABSPATH . 'wp-admin/includes/plugin.php'; 200 193 201 $plugin_data = get_plugin_data( $this->file );194 $plugin_data = get_plugin_data( $this->file, false, false ); 202 195 203 196 $this->project_version = $plugin_data['Version']; -
texty/tags/1.1.5/vendor/appsero/client/src/Insights.php
r2987176 r3452714 10 10 * and admin email. 11 11 */ 12 class Insights 13 { 12 class Insights { 14 13 15 14 /** … … 21 20 22 21 /** 23 * Whe ather tothe notice or not22 * Whether to show the notice or not 24 23 * 25 24 * @var bool … … 32 31 * @var array 33 32 */ 34 protected $extra_data = [];33 protected $extra_data = array(); 35 34 36 35 /** … … 42 41 43 42 /** 43 * Whether to include plugin data 44 * 44 45 * @var bool 45 46 */ … … 49 50 * Initialize the class 50 51 * 51 * @param null $name52 * @param null $file53 * /54 public function __construct($client, $name = null, $file = null)55 {56 if ( is_string($client) && !empty($name) && !empty($file)) {57 $client = new Client( $client, $name, $file);58 } 59 60 if ( is_object($client) && is_a($client, 'Appsero\Client')) {52 * @param mixed $client Client object or string. 53 * @param string $name Name of the plugin/theme. 54 * @param string $file Main plugin file path. 55 */ 56 public function __construct( $client, $name = null, $file = null ) { 57 if ( is_string( $client ) && ! empty( $name ) && ! empty( $file ) ) { 58 $client = new Client( $client, $name, $file ); 59 } 60 61 if ( is_object( $client ) && is_a( $client, 'Appsero\Client' ) ) { 61 62 $this->client = $client; 62 63 } … … 66 67 * Don't show the notice 67 68 * 68 * @return \self 69 */ 70 public function hide_notice() 71 { 69 * @return self 70 */ 71 public function hide_notice() { 72 72 $this->show_notice = false; 73 73 … … 78 78 * Add plugin data if needed 79 79 * 80 * @return \self 81 */ 82 public function add_plugin_data() 83 { 80 * @return self 81 */ 82 public function add_plugin_data() { 84 83 $this->plugin_data = true; 85 84 … … 90 89 * Add extra data if needed 91 90 * 92 * @param array $data 93 * 94 * @return \self 95 */ 96 public function add_extra($data = []) 97 { 91 * @param array $data Extra data. 92 * 93 * @return self 94 */ 95 public function add_extra( $data = array() ) { 98 96 $this->extra_data = $data; 99 97 … … 104 102 * Set custom notice text 105 103 * 106 * @param string $text 107 * 108 * @return \self 109 */ 110 public function notice($text = '') 111 { 104 * @param string $text Custom notice text. 105 * 106 * @return self 107 */ 108 public function notice( $text = '' ) { 112 109 $this->notice = $text; 113 110 … … 120 117 * @return void 121 118 */ 122 public function init() 123 { 124 if ($this->client->type === 'plugin') { 119 public function init() { 120 if ( 'plugin' === $this->client->type ) { 125 121 $this->init_plugin(); 126 } elseif ( $this->client->type === 'theme') {122 } elseif ( 'theme' === $this->client->type ) { 127 123 $this->init_theme(); 128 124 } … … 134 130 * @return void 135 131 */ 136 public function init_theme() 137 { 132 public function init_theme() { 138 133 $this->init_common(); 139 134 140 add_action( 'switch_theme', [$this, 'deactivation_cleanup']);141 add_action( 'switch_theme', [$this, 'theme_deactivated'], 12, 3);135 add_action( 'switch_theme', array( $this, 'deactivation_cleanup' ) ); 136 add_action( 'switch_theme', array( $this, 'theme_deactivated' ), 12, 3 ); 142 137 } 143 138 … … 147 142 * @return void 148 143 */ 149 public function init_plugin() 150 { 151 // plugin deactivate popup 152 // if ( ! $this->is_local_server() ) { 153 // add_filter( 'plugin_action_links_' . $this->client->basename, [ $this, 'plugin_action_links' ] ); 154 // add_action( 'admin_footer', [ $this, 'deactivate_scripts' ] ); 155 // } 156 157 add_filter('plugin_action_links_' . $this->client->basename, [$this, 'plugin_action_links']); 158 add_action('admin_footer', [$this, 'deactivate_scripts']); 144 public function init_plugin() { 145 add_filter( 'plugin_action_links_' . $this->client->basename, array( $this, 'plugin_action_links' ) ); 146 add_action( 'admin_footer', array( $this, 'deactivate_scripts' ) ); 159 147 160 148 $this->init_common(); 161 149 162 register_activation_hook( $this->client->file, [$this, 'activate_plugin']);163 register_deactivation_hook( $this->client->file, [$this, 'deactivation_cleanup']);150 register_activation_hook( $this->client->file, array( $this, 'activate_plugin' ) ); 151 register_deactivation_hook( $this->client->file, array( $this, 'deactivation_cleanup' ) ); 164 152 } 165 153 … … 169 157 * @return void 170 158 */ 171 protected function init_common() 172 { 173 if ($this->show_notice) { 174 // tracking notice 175 add_action('admin_notices', [$this, 'admin_notice']); 176 } 177 178 add_action('admin_init', [$this, 'handle_optin_optout']); 179 180 // uninstall reason 181 add_action('wp_ajax_' . $this->client->slug . '_submit-uninstall-reason', [$this, 'uninstall_reason_submission']); 182 183 // cron events 184 add_filter('cron_schedules', [$this, 'add_weekly_schedule']); 185 add_action($this->client->slug . '_tracker_send_event', [$this, 'send_tracking_data']); 186 // add_action( 'admin_init', array( $this, 'send_tracking_data' ) ); // test 159 protected function init_common() { 160 if ( $this->show_notice ) { 161 add_action( 'admin_notices', array( $this, 'admin_notice' ) ); 162 } 163 164 add_action( 'admin_init', array( $this, 'handle_optin_optout' ) ); 165 166 add_action( 'wp_ajax_' . $this->client->slug . '_submit-uninstall-reason', array( $this, 'uninstall_reason_submission' ) ); 167 168 add_filter( 'cron_schedules', array( $this, 'add_weekly_schedule' ) ); 169 add_action( $this->client->slug . '_tracker_send_event', array( $this, 'send_tracking_data' ) ); 187 170 } 188 171 … … 190 173 * Send tracking data to AppSero server 191 174 * 192 * @param bool $override 193 * 194 * @return void 195 */ 196 public function send_tracking_data($override = false) 197 { 198 if (!$this->tracking_allowed() && !$override) { 175 * @param bool $override Whether to override the tracking allowed check. 176 * 177 * @return void 178 */ 179 public function send_tracking_data( $override = false ) { 180 if ( ! $this->tracking_allowed() && ! $override ) { 199 181 return; 200 182 } 201 183 202 // Send a maximum of once per week 184 // Send a maximum of once per week. 203 185 $last_send = $this->get_last_send(); 204 186 205 if ( $last_send && $last_send > strtotime('-1 week')) {187 if ( $last_send && $last_send > strtotime( '-1 week' ) ) { 206 188 return; 207 189 } … … 209 191 $tracking_data = $this->get_tracking_data(); 210 192 211 $response = $this->client->send_request( $tracking_data, 'track');212 213 update_option( $this->client->slug . '_tracking_last_send', time());193 $response = $this->client->send_request( $tracking_data, 'track' ); 194 195 update_option( $this->client->slug . '_tracking_last_send', time() ); 214 196 } 215 197 … … 219 201 * @return array 220 202 */ 221 protected function get_tracking_data() 222 { 203 protected function get_tracking_data() { 223 204 $all_plugins = $this->get_all_plugins(); 224 205 225 206 $users = get_users( 226 [207 array( 227 208 'role' => 'administrator', 228 209 'orderby' => 'ID', … … 230 211 'number' => 1, 231 212 'paged' => 1, 232 ]213 ) 233 214 ); 234 215 235 $admin_user = ( is_array($users) && !empty($users)) ? $users[0] : false;216 $admin_user = ( is_array( $users ) && ! empty( $users ) ) ? $users[0] : false; 236 217 $first_name = ''; 237 218 $last_name = ''; 238 219 239 if ( $admin_user) {220 if ( $admin_user ) { 240 221 $first_name = $admin_user->first_name ? $admin_user->first_name : $admin_user->display_name; 241 222 $last_name = $admin_user->last_name; 242 223 } 243 224 244 $data = [245 'url' => esc_url( home_url()),225 $data = array( 226 'url' => esc_url( home_url() ), 246 227 'site' => $this->get_site_name(), 247 'admin_email' => get_option( 'admin_email'),228 'admin_email' => get_option( 'admin_email' ), 248 229 'first_name' => $first_name, 249 230 'last_name' => $last_name, … … 252 233 'wp' => $this->get_wp_info(), 253 234 'users' => $this->get_user_counts(), 254 'active_plugins' => count( $all_plugins['active_plugins']),255 'inactive_plugins' => count( $all_plugins['inactive_plugins']),235 'active_plugins' => count( $all_plugins['active_plugins'] ), 236 'inactive_plugins' => count( $all_plugins['inactive_plugins'] ), 256 237 'ip_address' => $this->get_user_ip_address(), 257 238 'project_version' => $this->client->project_version, 258 239 'tracking_skipped' => false, 259 240 'is_local' => $this->is_local_server(), 260 ];261 262 // Add Plugins 263 if ( $this->plugin_data) {264 $plugins_data = [];265 266 foreach ( $all_plugins['active_plugins'] as $slug => $plugin) {267 $slug = strstr( $slug, '/', true);268 269 if ( !$slug) {241 ); 242 243 // Add Plugins. 244 if ( $this->plugin_data ) { 245 $plugins_data = array(); 246 247 foreach ( $all_plugins['active_plugins'] as $slug => $plugin ) { 248 $slug = strstr( $slug, '/', true ); 249 250 if ( ! $slug ) { 270 251 continue; 271 252 } 272 253 273 $plugins_data[ $slug] = [274 'name' => isset($plugin['name']) ? $plugin['name'] : '',275 'version' => isset($plugin['version']) ? $plugin['version'] : '',276 ];277 } 278 279 if ( array_key_exists($this->client->slug, $plugins_data)) {280 unset( $plugins_data[$this->client->slug]);254 $plugins_data[ $slug ] = array( 255 'name' => isset( $plugin['name'] ) ? $plugin['name'] : '', 256 'version' => isset( $plugin['version'] ) ? $plugin['version'] : '', 257 ); 258 } 259 260 if ( array_key_exists( $this->client->slug, $plugins_data ) ) { 261 unset( $plugins_data[ $this->client->slug ] ); 281 262 } 282 263 … … 284 265 } 285 266 286 // Add Metadata 267 // Add Metadata. 287 268 $extra = $this->get_extra_data(); 288 269 289 if ( $extra) {270 if ( $extra ) { 290 271 $data['extra'] = $extra; 291 272 } 292 273 293 // Check this has previously skipped tracking294 $skipped = get_option( $this->client->slug . '_tracking_skipped');295 296 if ( $skipped === 'yes') {297 delete_option( $this->client->slug . '_tracking_skipped');274 // Check if tracking was previously skipped. 275 $skipped = get_option( $this->client->slug . '_tracking_skipped' ); 276 277 if ( 'yes' === $skipped ) { 278 delete_option( $this->client->slug . '_tracking_skipped' ); 298 279 299 280 $data['tracking_skipped'] = true; 300 281 } 301 282 302 return apply_filters( $this->client->slug . '_tracker_data', $data);283 return apply_filters( $this->client->slug . '_tracker_data', $data ); 303 284 } 304 285 … … 308 289 * @return mixed 309 290 */ 310 protected function get_extra_data() 311 { 312 if (is_callable($this->extra_data)) { 313 return call_user_func($this->extra_data); 314 } 315 316 if (is_array($this->extra_data)) { 291 protected function get_extra_data() { 292 if ( is_callable( $this->extra_data ) ) { 293 return call_user_func( $this->extra_data ); 294 } 295 296 if ( is_array( $this->extra_data ) ) { 317 297 return $this->extra_data; 318 298 } 319 299 320 return [];300 return array(); 321 301 } 322 302 … … 326 306 * @return array 327 307 */ 328 protected function data_we_collect() 329 { 330 $data = [ 308 protected function data_we_collect() { 309 $data = array( 331 310 'Server environment details (php, mysql, server, WordPress versions)', 332 311 'Number of users in your site', … … 335 314 'Site name and URL', 336 315 'Your name and email address', 337 ];338 339 if ( $this->plugin_data) {340 array_splice( $data, 4, 0, ["active plugins' name"]);316 ); 317 318 if ( $this->plugin_data ) { 319 array_splice( $data, 4, 0, array( "active plugins' name" ) ); 341 320 } 342 321 … … 349 328 * @return bool 350 329 */ 351 public function tracking_allowed() 352 { 353 $allow_tracking = get_option($this->client->slug . '_allow_tracking', 'no'); 354 355 return $allow_tracking === 'yes'; 330 public function tracking_allowed() { 331 $allow_tracking = get_option( $this->client->slug . '_allow_tracking', 'no' ); 332 333 return 'yes' === $allow_tracking; 356 334 } 357 335 … … 361 339 * @return false|string 362 340 */ 363 private function get_last_send() 364 { 365 return get_option($this->client->slug . '_tracking_last_send', false); 341 private function get_last_send() { 342 return get_option( $this->client->slug . '_tracking_last_send', false ); 366 343 } 367 344 … … 371 348 * @return bool 372 349 */ 373 public function notice_dismissed() 374 { 375 $hide_notice = get_option($this->client->slug . '_tracking_notice', null); 376 377 if ('hide' === $hide_notice) { 350 public function notice_dismissed() { 351 $hide_notice = get_option( $this->client->slug . '_tracking_notice', null ); 352 353 if ( 'hide' === $hide_notice ) { 378 354 return true; 379 355 } … … 387 363 * @return bool 388 364 */ 389 private function is_local_server() 390 { 391 $host = isset($_SERVER['HTTP_HOST']) ? sanitize_text_field(wp_unslash($_SERVER['HTTP_HOST'])) : 'localhost'; 392 $ip = isset($_SERVER['SERVER_ADDR']) ? sanitize_text_field(wp_unslash($_SERVER['SERVER_ADDR'])) : '127.0.0.1'; 393 $is_local = false; 365 private function is_local_server() { 366 $host = isset( $_SERVER['HTTP_HOST'] ) ? sanitize_text_field( wp_unslash( $_SERVER['HTTP_HOST'] ) ) : 'localhost'; 367 $ip = isset( $_SERVER['SERVER_ADDR'] ) ? sanitize_text_field( wp_unslash( $_SERVER['SERVER_ADDR'] ) ) : '127.0.0.1'; 368 $is_local = false; 394 369 395 370 if ( 396 in_array( $ip, ['127.0.0.1', '::1'], true)397 || !strpos($host, '.')398 || in_array(strrchr($host, '.'), ['.test', '.testing', '.local', '.localhost', '.localdomain'], true)371 in_array( $ip, array( '127.0.0.1', '::1' ), true ) || 372 ! strpos( $host, '.' ) || 373 in_array( strrchr( $host, '.' ), array( '.test', '.testing', '.local', '.localhost', '.localdomain' ), true ) 399 374 ) { 400 375 $is_local = true; 401 376 } 402 377 403 return apply_filters( 'appsero_is_local', $is_local);378 return apply_filters( 'appsero_is_local', $is_local ); 404 379 } 405 380 … … 409 384 * @return void 410 385 */ 411 private function schedule_event() 412 { 413 $hook_name = wp_unslash($this->client->slug . '_tracker_send_event'); 414 415 if (!wp_next_scheduled($hook_name)) { 416 wp_schedule_event(time(), 'weekly', $hook_name); 386 private function schedule_event() { 387 $hook_name = wp_unslash( $this->client->slug . '_tracker_send_event' ); 388 389 if ( ! wp_next_scheduled( $hook_name ) ) { 390 wp_schedule_event( time(), 'weekly', $hook_name ); 417 391 } 418 392 } … … 423 397 * @return void 424 398 */ 425 private function clear_schedule_event() 426 { 427 wp_clear_scheduled_hook($this->client->slug . '_tracker_send_event'); 399 private function clear_schedule_event() { 400 wp_clear_scheduled_hook( $this->client->slug . '_tracker_send_event' ); 428 401 } 429 402 … … 433 406 * @return void 434 407 */ 435 public function admin_notice() 436 { 437 if ($this->notice_dismissed()) { 408 public function admin_notice() { 409 if ( $this->notice_dismissed() ) { 438 410 return; 439 411 } 440 412 441 if ( $this->tracking_allowed()) {413 if ( $this->tracking_allowed() ) { 442 414 return; 443 415 } 444 416 445 if ( !current_user_can('manage_options')) {417 if ( ! current_user_can( 'manage_options' ) ) { 446 418 return; 447 419 } 448 420 449 // don't show tracking if a local server 450 // if ( $this->is_local_server() ) { 451 // return; 452 // } 453 454 $optin_url = wp_nonce_url(add_query_arg($this->client->slug . '_tracker_optin', 'true'), '_wpnonce'); 455 $optout_url = wp_nonce_url(add_query_arg($this->client->slug . '_tracker_optout', 'true'), '_wpnonce'); 456 457 if (empty($this->notice)) { 458 $notice = sprintf($this->client->__trans('Want to help make <strong>%1$s</strong> even more awesome? Allow %1$s to collect diagnostic data and usage information.'), $this->client->name); 421 $optin_url = wp_nonce_url( add_query_arg( $this->client->slug . '_tracker_optin', 'true' ), '_wpnonce' ); 422 $optout_url = wp_nonce_url( add_query_arg( $this->client->slug . '_tracker_optout', 'true' ), '_wpnonce' ); 423 424 if ( empty( $this->notice ) ) { 425 $notice = sprintf( 426 $this->client->__trans( 'Want to help make <strong>%1$s</strong> even more awesome? Allow %1$s to collect diagnostic data and usage information.' ), 427 $this->client->name 428 ); 459 429 } else { 460 430 $notice = $this->notice; … … 463 433 $policy_url = 'https://appsero.com/privacy-policy/'; 464 434 465 $notice .= ' (<a class="' . $this->client->slug . '-insights-data-we-collect" href="#">' . $this->client->__trans( 'what we collect') . '</a>)';466 $notice .= '<p class="description" style="display:none;">' . implode( ', ', $this->data_we_collect()) . '. ';467 $notice .= 'We are using Appsero to collect your data. <a href="' . $policy_url . '" target="_blank">Learn more</a> about how Appsero collects and handle your data.</p>';435 $notice .= ' (<a class="' . $this->client->slug . '-insights-data-we-collect" href="#">' . $this->client->__trans( 'what we collect' ) . '</a>)'; 436 $notice .= '<p class="description" style="display:none;">' . implode( ', ', $this->data_we_collect() ) . '. '; 437 $notice .= 'We are using Appsero to collect your data. <a href="' . $policy_url . '" target="_blank">Learn more</a> ↗</p>'; 468 438 469 439 echo '<div class="updated"><p>'; 470 echo $notice;440 echo wp_kses_post( $notice ); 471 441 echo '</p><p class="submit">'; 472 echo ' <a href="' . esc_url( $optin_url) . '" class="button-primary button-large">' . $this->client->__trans('Allow') . '</a>';473 echo ' <a href="' . esc_url( $optout_url) . '" class="button-secondary button-large">' . $this->client->__trans('No thanks') . '</a>';442 echo ' <a href="' . esc_url( $optin_url ) . '" class="button-primary button-large">' . esc_html( $this->client->__trans( 'Allow' ) ) . '</a>'; 443 echo ' <a href="' . esc_url( $optout_url ) . '" class="button-secondary button-large">' . esc_html( $this->client->__trans( 'No thanks' ) ) . '</a>'; 474 444 echo '</p></div>'; 475 445 476 echo "<script type='text/javascript'>jQuery('." . $this->client->slug. "-insights-data-we-collect').on('click', function(e) {446 echo "<script type='text/javascript'>jQuery('." . esc_js( $this->client->slug ) . "-insights-data-we-collect').on('click', function(e) { 477 447 e.preventDefault(); 478 448 jQuery(this).parents('.updated').find('p.description').slideToggle('fast'); 479 449 }); 480 </script> 481 "; 450 </script>"; 482 451 } 483 452 … … 487 456 * @return void 488 457 */ 489 public function handle_optin_optout() 490 { 491 if (!isset($_GET['_wpnonce'])) { 458 public function handle_optin_optout() { 459 if ( ! $this->is_valid_request() || ! $this->has_manage_options_capability() ) { 492 460 return; 493 461 } 494 462 495 if (!wp_verify_nonce(sanitize_key($_GET['_wpnonce']), '_wpnonce')) { 496 return; 497 } 498 499 if (isset($_GET[$this->client->slug . '_tracker_optin']) && $_GET[$this->client->slug . '_tracker_optin'] === 'true') { 463 if ( $this->is_optin_request() ) { 500 464 $this->optin(); 501 502 wp_safe_redirect(remove_query_arg($this->client->slug . '_tracker_optin')); 503 exit; 504 } 505 506 if (isset($_GET[$this->client->slug . '_tracker_optout']) && isset($_GET[$this->client->slug . '_tracker_optout']) && $_GET[$this->client->slug . '_tracker_optout'] === 'true') { 465 $this->handle_redirection( $this->client->slug . '_tracker_optin' ); 466 } 467 468 if ( $this->is_optout_request() ) { 507 469 $this->optout(); 508 509 wp_safe_redirect(remove_query_arg($this->client->slug . '_tracker_optout')); 510 exit; 511 } 470 $this->handle_redirection( $this->client->slug . '_tracker_optout' ); 471 } 472 } 473 474 /** 475 * Validate the request nonce. 476 * 477 * @return bool 478 */ 479 private function is_valid_request() { 480 return isset( $_GET['_wpnonce'] ) && wp_verify_nonce( sanitize_key( $_GET['_wpnonce'] ), '_wpnonce' ); 481 } 482 483 /** 484 * Check if the current user has manage options capability. 485 * 486 * @return bool 487 */ 488 private function has_manage_options_capability() { 489 return current_user_can( 'manage_options' ); 490 } 491 492 /** 493 * Check if the current request is for opt-in. 494 * 495 * @return bool 496 */ 497 private function is_optin_request() { 498 return isset( $_GET[ $this->client->slug . '_tracker_optin' ] ) && 'true' === $_GET[ $this->client->slug . '_tracker_optin' ]; 499 } 500 501 /** 502 * Check if the current request is for opt-out. 503 * 504 * @return bool 505 */ 506 private function is_optout_request() { 507 return isset( $_GET[ $this->client->slug . '_tracker_optout' ] ) && 'true' === $_GET[ $this->client->slug . '_tracker_optout' ]; 508 } 509 510 /** 511 * Handle redirection after opt-in/opt-out actions. 512 * 513 * @param string $param The query parameter to remove. 514 */ 515 private function handle_redirection( $param ) { 516 if ( $this->is_inaccessible_page() ) { 517 wp_safe_redirect( admin_url() ); 518 } else { 519 wp_safe_redirect( remove_query_arg( $param ) ); 520 } 521 exit; 522 } 523 524 /** 525 * Check if the current page is updater.php or similar inaccessible pages. 526 * 527 * @return bool 528 */ 529 private function is_inaccessible_page() { 530 $inaccessible_pages = array( 531 '/wp-admin/update.php', // Add similar inaccessible PHP files here 532 ); 533 534 // Sanitize and unslash the REQUEST_URI before using it 535 $request_uri = isset( $_SERVER['REQUEST_URI'] ) ? sanitize_text_field( wp_unslash( $_SERVER['REQUEST_URI'] ) ) : ''; 536 537 // Ensure REQUEST_URI is properly sanitized before use 538 $request_uri = esc_url_raw( $request_uri ); 539 540 foreach ( $inaccessible_pages as $page ) { 541 if ( false !== strpos( $request_uri, $page ) ) { 542 return true; 543 } 544 } 545 546 return false; 512 547 } 513 548 … … 517 552 * @return void 518 553 */ 519 public function optin() 520 { 521 update_option($this->client->slug . '_allow_tracking', 'yes'); 522 update_option($this->client->slug . '_tracking_notice', 'hide'); 554 public function optin() { 555 update_option( $this->client->slug . '_allow_tracking', 'yes' ); 556 update_option( $this->client->slug . '_tracking_notice', 'hide' ); 523 557 524 558 $this->clear_schedule_event(); … … 526 560 $this->send_tracking_data(); 527 561 528 /* 529 * Fires when the user has opted in tracking. 530 */ 531 do_action($this->client->slug . '_tracker_optin', $this->get_tracking_data()); 562 do_action( $this->client->slug . '_tracker_optin', $this->get_tracking_data() ); 532 563 } 533 564 … … 537 568 * @return void 538 569 */ 539 public function optout() 540 { 541 update_option($this->client->slug . '_allow_tracking', 'no'); 542 update_option($this->client->slug . '_tracking_notice', 'hide'); 570 public function optout() { 571 update_option( $this->client->slug . '_allow_tracking', 'no' ); 572 update_option( $this->client->slug . '_tracking_notice', 'hide' ); 543 573 544 574 $this->send_tracking_skipped_request(); … … 546 576 $this->clear_schedule_event(); 547 577 548 /* 549 * Fires when the user has opted out tracking. 550 */ 551 do_action($this->client->slug . '_tracker_optout'); 578 do_action( $this->client->slug . '_tracker_optout' ); 552 579 } 553 580 … … 555 582 * Get the number of post counts 556 583 * 557 * @param string $post_type 558 * 584 * @param string $post_type The post type to count. 559 585 * @return int 560 586 */ 561 public function get_post_count($post_type) 562 { 587 public function get_post_count( $post_type ) { 563 588 global $wpdb; 564 589 … … 566 591 $wpdb->prepare( 567 592 "SELECT count(ID) FROM $wpdb->posts WHERE post_type = %s and post_status = %s", 568 [$post_type, 'publish'] 593 $post_type, 594 'publish' 569 595 ) 570 596 ); … … 576 602 * @return array 577 603 */ 578 private static function get_server_info() 579 { 604 private static function get_server_info() { 580 605 global $wpdb; 581 606 582 $server_data = []; 583 584 if (isset($_SERVER['SERVER_SOFTWARE']) && !empty($_SERVER['SERVER_SOFTWARE'])) { 585 // phpcs:ignore 586 $server_data['software'] = $_SERVER['SERVER_SOFTWARE']; 587 } 588 589 if (function_exists('phpversion')) { 607 $server_data = array(); 608 609 if ( isset( $_SERVER['SERVER_SOFTWARE'] ) && ! empty( $_SERVER['SERVER_SOFTWARE'] ) ) { 610 $server_data['software'] = sanitize_text_field( wp_unslash( $_SERVER['SERVER_SOFTWARE'] ) ); 611 } 612 613 if ( function_exists( 'phpversion' ) ) { 590 614 $server_data['php_version'] = phpversion(); 591 615 } … … 593 617 $server_data['mysql_version'] = $wpdb->db_version(); 594 618 595 $server_data['php_max_upload_size'] = size_format( wp_max_upload_size());619 $server_data['php_max_upload_size'] = size_format( wp_max_upload_size() ); 596 620 $server_data['php_default_timezone'] = date_default_timezone_get(); 597 $server_data['php_soap'] = class_exists( 'SoapClient') ? 'Yes' : 'No';598 $server_data['php_fsockopen'] = function_exists( 'fsockopen') ? 'Yes' : 'No';599 $server_data['php_curl'] = function_exists( 'curl_init') ? 'Yes' : 'No';621 $server_data['php_soap'] = class_exists( 'SoapClient' ) ? 'Yes' : 'No'; 622 $server_data['php_fsockopen'] = function_exists( 'fsockopen' ) ? 'Yes' : 'No'; 623 $server_data['php_curl'] = function_exists( 'curl_init' ) ? 'Yes' : 'No'; 600 624 601 625 return $server_data; … … 607 631 * @return array 608 632 */ 609 private function get_wp_info() 610 { 611 $wp_data = []; 612 613 $wp_data['memory_limit'] = WP_MEMORY_LIMIT; 614 $wp_data['debug_mode'] = (defined('WP_DEBUG') && WP_DEBUG) ? 'Yes' : 'No'; 615 $wp_data['locale'] = get_locale(); 616 $wp_data['version'] = get_bloginfo('version'); 617 $wp_data['multisite'] = is_multisite() ? 'Yes' : 'No'; 618 $wp_data['theme_slug'] = get_stylesheet(); 619 620 $theme = wp_get_theme($wp_data['theme_slug']); 621 622 $wp_data['theme_name'] = $theme->get('Name'); 623 $wp_data['theme_version'] = $theme->get('Version'); 624 $wp_data['theme_uri'] = $theme->get('ThemeURI'); 625 $wp_data['theme_author'] = $theme->get('Author'); 633 private function get_wp_info() { 634 $wp_data = array( 635 'memory_limit' => WP_MEMORY_LIMIT, 636 'debug_mode' => ( defined( 'WP_DEBUG' ) && WP_DEBUG ) ? 'Yes' : 'No', 637 'locale' => get_locale(), 638 'version' => get_bloginfo( 'version' ), 639 'multisite' => is_multisite() ? 'Yes' : 'No', 640 'theme_slug' => get_stylesheet(), 641 ); 642 643 $theme = wp_get_theme( $wp_data['theme_slug'] ); 644 645 $wp_data['theme_name'] = $theme->get( 'Name' ); 646 $wp_data['theme_version'] = $theme->get( 'Version' ); 647 $wp_data['theme_uri'] = $theme->get( 'ThemeURI' ); 648 $wp_data['theme_author'] = $theme->get( 'Author' ); 626 649 627 650 return $wp_data; … … 633 656 * @return array 634 657 */ 635 private function get_all_plugins() 636 { 637 // Ensure get_plugins function is loaded 638 if (!function_exists('get_plugins')) { 658 private function get_all_plugins() { 659 if ( ! function_exists( 'get_plugins' ) ) { 639 660 include ABSPATH . '/wp-admin/includes/plugin.php'; 640 661 } 641 662 642 663 $plugins = get_plugins(); 643 $active_plugins_keys = get_option('active_plugins', []); 644 $active_plugins = []; 645 646 foreach ($plugins as $k => $v) { 647 // Take care of formatting the data how we want it. 648 $formatted = []; 649 $formatted['name'] = wp_strip_all_tags($v['Name']); 650 651 if (isset($v['Version'])) { 652 $formatted['version'] = wp_strip_all_tags($v['Version']); 653 } 654 655 if (isset($v['Author'])) { 656 $formatted['author'] = wp_strip_all_tags($v['Author']); 657 } 658 659 if (isset($v['Network'])) { 660 $formatted['network'] = wp_strip_all_tags($v['Network']); 661 } 662 663 if (isset($v['PluginURI'])) { 664 $formatted['plugin_uri'] = wp_strip_all_tags($v['PluginURI']); 665 } 666 667 if (in_array($k, $active_plugins_keys, true)) { 668 // Remove active plugins from list so we can show active and inactive separately 669 unset($plugins[$k]); 670 $active_plugins[$k] = $formatted; 664 $active_plugins_keys = get_option( 'active_plugins', array() ); 665 $active_plugins = array(); 666 667 foreach ( $plugins as $k => $v ) { 668 $formatted = array( 669 'name' => wp_strip_all_tags( $v['Name'] ), 670 'version' => wp_strip_all_tags( $v['Version'] ), 671 'author' => wp_strip_all_tags( $v['Author'] ), 672 ); 673 674 if ( isset( $v['Network'] ) ) { 675 $formatted['network'] = wp_strip_all_tags( $v['Network'] ); 676 } 677 678 if ( isset( $v['PluginURI'] ) ) { 679 $formatted['plugin_uri'] = wp_strip_all_tags( $v['PluginURI'] ); 680 } 681 682 if ( in_array( $k, $active_plugins_keys, true ) ) { 683 unset( $plugins[ $k ] ); 684 $active_plugins[ $k ] = $formatted; 671 685 } else { 672 $plugins[ $k] = $formatted;673 } 674 } 675 676 return [677 'active_plugins' => $active_plugins,678 'inactive_plugins' => $plugins,679 ];686 $plugins[ $k ] = $formatted; 687 } 688 } 689 690 return array( 691 'active_plugins' => $active_plugins, 692 'inactive_plugins' => $plugins, 693 ); 680 694 } 681 695 … … 685 699 * @return array 686 700 */ 687 public function get_user_counts() 688 { 689 $user_count = []; 701 public function get_user_counts() { 702 $user_count = array(); 690 703 $user_count_data = count_users(); 691 704 $user_count['total'] = $user_count_data['total_users']; 692 705 693 // Get user count based on user role 694 foreach ($user_count_data['avail_roles'] as $role => $count) { 695 if (!$count) { 706 foreach ( $user_count_data['avail_roles'] as $role => $count ) { 707 if ( ! $count ) { 696 708 continue; 697 709 } 698 699 $user_count[$role] = $count; 710 $user_count[ $role ] = $count; 700 711 } 701 712 … … 706 717 * Add weekly cron schedule 707 718 * 708 * @param array $schedules 709 * 719 * @param array $schedules Existing cron schedules. 710 720 * @return array 711 721 */ 712 public function add_weekly_schedule($schedules) 713 { 714 $schedules['weekly'] = [ 722 public function add_weekly_schedule( $schedules ) { 723 $schedules['weekly'] = array( 715 724 'interval' => DAY_IN_SECONDS * 7, 716 'display' => 'Once Weekly',717 ];725 'display' => __( 'Once Weekly', 'appsero' ), 726 ); 718 727 719 728 return $schedules; … … 725 734 * @return void 726 735 */ 727 public function activate_plugin() 728 { 729 $allowed = get_option($this->client->slug . '_allow_tracking', 'no'); 730 731 // if it wasn't allowed before, do nothing 732 if ('yes' !== $allowed) { 736 public function activate_plugin() { 737 $allowed = get_option( $this->client->slug . '_allow_tracking', 'no' ); 738 739 if ( 'yes' !== $allowed ) { 733 740 return; 734 741 } 735 742 736 // re-schedule and delete the last sent time so we could force send again737 743 $hook_name = $this->client->slug . '_tracker_send_event'; 738 744 739 if ( !wp_next_scheduled($hook_name)) {740 wp_schedule_event( time(), 'weekly', $hook_name);741 } 742 743 delete_option( $this->client->slug . '_tracking_last_send');744 745 $this->send_tracking_data( true);745 if ( ! wp_next_scheduled( $hook_name ) ) { 746 wp_schedule_event( time(), 'weekly', $hook_name ); 747 } 748 749 delete_option( $this->client->slug . '_tracking_last_send' ); 750 751 $this->send_tracking_data( true ); 746 752 } 747 753 … … 751 757 * @return void 752 758 */ 753 public function deactivation_cleanup() 754 { 759 public function deactivation_cleanup() { 755 760 $this->clear_schedule_event(); 756 761 757 if ( 'theme' === $this->client->type) {758 delete_option( $this->client->slug . '_tracking_last_send');759 delete_option( $this->client->slug . '_allow_tracking');760 } 761 762 delete_option( $this->client->slug . '_tracking_notice');762 if ( 'theme' === $this->client->type ) { 763 delete_option( $this->client->slug . '_tracking_last_send' ); 764 delete_option( $this->client->slug . '_allow_tracking' ); 765 } 766 767 delete_option( $this->client->slug . '_tracking_notice' ); 763 768 } 764 769 … … 770 775 * @return array 771 776 */ 772 public function plugin_action_links($links) 773 { 774 if (array_key_exists('deactivate', $links)) { 775 $links['deactivate'] = str_replace('<a', '<a class="' . $this->client->slug . '-deactivate-link"', $links['deactivate']); 777 public function plugin_action_links( $links ) { 778 if ( array_key_exists( 'deactivate', $links ) ) { 779 $links['deactivate'] = str_replace( '<a', '<a class="' . $this->client->slug . '-deactivate-link"', $links['deactivate'] ); 776 780 } 777 781 … … 784 788 * @return array 785 789 */ 786 private function get_uninstall_reasons() 787 { 790 private function get_uninstall_reasons() { 788 791 $reasons = [ 789 792 [ 790 793 'id' => 'could-not-understand', 791 'text' => $this->client->__trans( "Couldn't understand"),792 'placeholder' => $this->client->__trans( 'Would you like us to assist you?'),794 'text' => $this->client->__trans( "Couldn't understand" ), 795 'placeholder' => $this->client->__trans( 'Would you like us to assist you?' ), 793 796 'icon' => '<svg xmlns="http://www.w3.org/2000/svg" width="23" height="23" viewBox="0 0 23 23"><g fill="none"><g fill="#3B86FF"><path d="M11.5 0C17.9 0 23 5.1 23 11.5 23 17.9 17.9 23 11.5 23 10.6 23 9.6 22.9 8.8 22.7L8.8 22.6C9.3 22.5 9.7 22.3 10 21.9 10.3 21.6 10.4 21.3 10.4 20.9 10.8 21 11.1 21 11.5 21 16.7 21 21 16.7 21 11.5 21 6.3 16.7 2 11.5 2 6.3 2 2 6.3 2 11.5 2 13 2.3 14.3 2.9 15.6 2.7 16 2.4 16.3 2.2 16.8L2.1 17.1 2.1 17.3C2 17.5 2 17.7 2 18 0.7 16.1 0 13.9 0 11.5 0 5.1 5.1 0 11.5 0ZM6 13.6C6 13.7 6.1 13.8 6.1 13.9 6.3 14.5 6.2 15.7 6.1 16.4 6.1 16.6 6 16.9 6 17.1 6 17.1 6.1 17.1 6.1 17.1 7.1 16.9 8.2 16 9.3 15.5 9.8 15.2 10.4 15 10.9 15 11.2 15 11.4 15 11.6 15.2 11.9 15.4 12.1 16 11.6 16.4 11.5 16.5 11.3 16.6 11.1 16.7 10.5 17 9.9 17.4 9.3 17.7 9 17.9 9 18.1 9.1 18.5 9.2 18.9 9.3 19.4 9.3 19.8 9.4 20.3 9.3 20.8 9 21.2 8.8 21.5 8.5 21.6 8.1 21.7 7.9 21.8 7.6 21.9 7.3 21.9L6.5 22C6.3 22 6 21.9 5.8 21.9 5 21.8 4.4 21.5 3.9 20.9 3.3 20.4 3.1 19.6 3 18.8L3 18.5C3 18.2 3 17.9 3.1 17.7L3.1 17.6C3.2 17.1 3.5 16.7 3.7 16.3 4 15.9 4.2 15.4 4.3 15 4.4 14.6 4.4 14.5 4.6 14.2 4.6 13.9 4.7 13.7 4.9 13.6 5.2 13.2 5.7 13.2 6 13.6ZM11.7 11.2C13.1 11.2 14.3 11.7 15.2 12.9 15.3 13 15.4 13.1 15.4 13.2 15.4 13.4 15.3 13.8 15.2 13.8 15 13.9 14.9 13.8 14.8 13.7 14.6 13.5 14.4 13.2 14.1 13.1 13.5 12.6 12.8 12.3 12 12.2 10.7 12.1 9.5 12.3 8.4 12.8 8.3 12.8 8.2 12.8 8.1 12.8 7.9 12.8 7.8 12.4 7.8 12.2 7.7 12.1 7.8 11.9 8 11.8 8.4 11.7 8.8 11.5 9.2 11.4 10 11.2 10.9 11.1 11.7 11.2ZM16.3 5.9C17.3 5.9 18 6.6 18 7.6 18 8.5 17.3 9.3 16.3 9.3 15.4 9.3 14.7 8.5 14.7 7.6 14.7 6.6 15.4 5.9 16.3 5.9ZM8.3 5C9.2 5 9.9 5.8 9.9 6.7 9.9 7.7 9.2 8.4 8.2 8.4 7.3 8.4 6.6 7.7 6.6 6.7 6.6 5.8 7.3 5 8.3 5Z"/></g></g></svg>', 794 797 ], 795 798 [ 796 799 'id' => 'found-better-plugin', 797 'text' => $this->client->__trans( 'Found a better plugin'),798 'placeholder' => $this->client->__trans( 'Which plugin?'),800 'text' => $this->client->__trans( 'Found a better plugin' ), 801 'placeholder' => $this->client->__trans( 'Which plugin?' ), 799 802 'icon' => '<svg xmlns="http://www.w3.org/2000/svg" width="23" height="23" viewBox="0 0 23 23"><g fill="none"><g fill="#3B86FF"><path d="M17.1 14L22.4 19.3C23.2 20.2 23.2 21.5 22.4 22.4 21.5 23.2 20.2 23.2 19.3 22.4L19.3 22.4 14 17.1C15.3 16.3 16.3 15.3 17.1 14L17.1 14ZM8.6 0C13.4 0 17.3 3.9 17.3 8.6 17.3 13.4 13.4 17.2 8.6 17.2 3.9 17.2 0 13.4 0 8.6 0 3.9 3.9 0 8.6 0ZM8.6 2.2C5.1 2.2 2.2 5.1 2.2 8.6 2.2 12.2 5.1 15.1 8.6 15.1 12.2 15.1 15.1 12.2 15.1 8.6 15.1 5.1 12.2 2.2 8.6 2.2ZM8.6 3.6L8.6 5C6.6 5 5 6.6 5 8.6L5 8.6 3.6 8.6C3.6 5.9 5.9 3.6 8.6 3.6L8.6 3.6Z"/></g></g></svg>', 800 803 ], 801 804 [ 802 805 'id' => 'not-have-that-feature', 803 'text' => $this->client->__trans( 'Missing a specific feature'),804 'placeholder' => $this->client->__trans( 'Could you tell us more about that feature?'),806 'text' => $this->client->__trans( 'Missing a specific feature' ), 807 'placeholder' => $this->client->__trans( 'Could you tell us more about that feature?' ), 805 808 'icon' => '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="17" viewBox="0 0 24 17"><g fill="none"><g fill="#3B86FF"><path d="M19.4 0C19.7 0.6 19.8 1.3 19.8 2 19.8 3.2 19.4 4.4 18.5 5.3 17.6 6.2 16.5 6.7 15.2 6.7 15.2 6.7 15.2 6.7 15.2 6.7 14 6.7 12.9 6.2 12 5.3 11.2 4.4 10.7 3.3 10.7 2 10.7 1.3 10.8 0.6 11.1 0L7.6 0 7 0 6.5 0 6.5 5.7C6.3 5.6 5.9 5.3 5.6 5.1 5 4.6 4.3 4.3 3.5 4.3 3.5 4.3 3.5 4.3 3.4 4.3 1.6 4.4 0 5.9 0 7.9 0 8.6 0.2 9.2 0.5 9.7 1.1 10.8 2.2 11.5 3.5 11.5 4.3 11.5 5 11.2 5.6 10.8 6 10.5 6.3 10.3 6.5 10.2L6.5 10.2 6.5 17 6.5 17 7 17 7.6 17 22.5 17C23.3 17 24 16.3 24 15.5L24 0 19.4 0Z"/></g></g></svg>', 806 809 ], 807 810 [ 808 811 'id' => 'is-not-working', 809 'text' => $this->client->__trans( 'Not working'),810 'placeholder' => $this->client->__trans( 'Could you tell us a bit more whats not working?'),812 'text' => $this->client->__trans( 'Not working' ), 813 'placeholder' => $this->client->__trans( 'Could you tell us a bit more whats not working?' ), 811 814 'icon' => '<svg xmlns="http://www.w3.org/2000/svg" width="23" height="23" viewBox="0 0 23 23"><g fill="none"><g fill="#3B86FF"><path d="M11.5 0C17.9 0 23 5.1 23 11.5 23 17.9 17.9 23 11.5 23 5.1 23 0 17.9 0 11.5 0 5.1 5.1 0 11.5 0ZM11.8 14.4C11.2 14.4 10.7 14.8 10.7 15.4 10.7 16 11.2 16.4 11.8 16.4 12.4 16.4 12.8 16 12.8 15.4 12.8 14.8 12.4 14.4 11.8 14.4ZM12 7C10.1 7 9.1 8.1 9 9.6L10.5 9.6C10.5 8.8 11.1 8.3 11.9 8.3 12.7 8.3 13.2 8.8 13.2 9.5 13.2 10.1 13 10.4 12.2 10.9 11.3 11.4 10.9 12 11 12.9L11 13.4 12.5 13.4 12.5 13C12.5 12.4 12.7 12.1 13.5 11.6 14.4 11.1 14.9 10.4 14.9 9.4 14.9 8 13.7 7 12 7Z"/></g></g></svg>', 812 815 ], 813 816 [ 814 817 'id' => 'looking-for-other', 815 'text' => $this->client->__trans( 'Not what I was looking'),816 'placeholder' => $this->client->__trans( 'Could you tell us a bit more?'),818 'text' => $this->client->__trans( 'Not what I was looking' ), 819 'placeholder' => $this->client->__trans( 'Could you tell us a bit more?' ), 817 820 'icon' => '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="17" viewBox="0 0 24 17"><g fill="none"><g fill="#3B86FF"><path d="M23.5 9C23.5 9 23.5 8.9 23.5 8.9 23.5 8.9 23.5 8.9 23.5 8.9 23.4 8.6 23.2 8.3 23 8 22.2 6.5 20.6 3.7 19.8 2.6 18.8 1.3 17.7 0 16.1 0 15.7 0 15.3 0.1 14.9 0.2 13.8 0.6 12.6 1.2 12.3 2.7L11.7 2.7C11.4 1.2 10.2 0.6 9.1 0.2 8.7 0.1 8.3 0 7.9 0 6.3 0 5.2 1.3 4.2 2.6 3.4 3.7 1.8 6.5 1 8 0.8 8.3 0.6 8.6 0.5 8.9 0.5 8.9 0.5 8.9 0.5 8.9 0.5 8.9 0.5 9 0.5 9 0.2 9.7 0 10.5 0 11.3 0 14.4 2.5 17 5.5 17 7.3 17 8.8 16.1 9.8 14.8L14.2 14.8C15.2 16.1 16.7 17 18.5 17 21.5 17 24 14.4 24 11.3 24 10.5 23.8 9.7 23.5 9ZM5.5 15C3.6 15 2 13.2 2 11 2 8.8 3.6 7 5.5 7 7.4 7 9 8.8 9 11 9 13.2 7.4 15 5.5 15ZM18.5 15C16.6 15 15 13.2 15 11 15 8.8 16.6 7 18.5 7 20.4 7 22 8.8 22 11 22 13.2 20.4 15 18.5 15Z"/></g></g></svg>', 818 821 ], 819 822 [ 820 823 'id' => 'did-not-work-as-expected', 821 'text' => $this->client->__trans( "Didn't work as expected"),822 'placeholder' => $this->client->__trans( 'What did you expect?'),824 'text' => $this->client->__trans( "Didn't work as expected" ), 825 'placeholder' => $this->client->__trans( 'What did you expect?' ), 823 826 'icon' => '<svg xmlns="http://www.w3.org/2000/svg" width="23" height="23" viewBox="0 0 23 23"><g fill="none"><g fill="#3B86FF"><path d="M11.5 0C17.9 0 23 5.1 23 11.5 23 17.9 17.9 23 11.5 23 5.1 23 0 17.9 0 11.5 0 5.1 5.1 0 11.5 0ZM11.5 2C6.3 2 2 6.3 2 11.5 2 16.7 6.3 21 11.5 21 16.7 21 21 16.7 21 11.5 21 6.3 16.7 2 11.5 2ZM12.5 12.9L12.7 5 10.2 5 10.5 12.9 12.5 12.9ZM11.5 17.4C12.4 17.4 13 16.8 13 15.9 13 15 12.4 14.4 11.5 14.4 10.6 14.4 10 15 10 15.9 10 16.8 10.6 17.4 11.5 17.4Z"/></g></g></svg>', 824 827 ], 825 828 [ 826 829 'id' => 'other', 827 'text' => $this->client->__trans( 'Others'),828 'placeholder' => $this->client->__trans( 'Could you tell us a bit more?'),830 'text' => $this->client->__trans( 'Others' ), 831 'placeholder' => $this->client->__trans( 'Could you tell us a bit more?' ), 829 832 'icon' => '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="23" viewBox="0 0 24 6"><g fill="none"><g fill="#3B86FF"><path d="M3 0C4.7 0 6 1.3 6 3 6 4.7 4.7 6 3 6 1.3 6 0 4.7 0 3 0 1.3 1.3 0 3 0ZM12 0C13.7 0 15 1.3 15 3 15 4.7 13.7 6 12 6 10.3 6 9 4.7 9 3 9 1.3 10.3 0 12 0ZM21 0C22.7 0 24 1.3 24 3 24 4.7 22.7 6 21 6 19.3 6 18 4.7 18 3 18 1.3 19.3 0 21 0Z"/></g></g></svg>', 830 833 ], … … 839 842 * @return void 840 843 */ 841 public function uninstall_reason_submission() 842 { 843 if (!isset($_POST['nonce'])) { 844 public function uninstall_reason_submission() { 845 if ( ! isset( $_POST['nonce'] ) ) { 844 846 return; 845 847 } 846 848 847 if ( !isset($_POST['reason_id'])) {849 if ( ! isset( $_POST['reason_id'] ) ) { 848 850 wp_send_json_error(); 849 851 } 850 852 851 if ( !wp_verify_nonce(sanitize_key(wp_unslash($_POST['nonce'])), 'appsero-security-nonce')) {852 wp_send_json_error( 'Nonce verification failed');853 } 854 855 if ( !current_user_can('manage_options')) {856 wp_send_json_error( 'You are not allowed for this task');853 if ( ! wp_verify_nonce( sanitize_key( wp_unslash( $_POST['nonce'] ) ), 'appsero-security-nonce' ) ) { 854 wp_send_json_error( 'Nonce verification failed' ); 855 } 856 857 if ( ! current_user_can( 'manage_options' ) ) { 858 wp_send_json_error( 'You are not allowed for this task' ); 857 859 } 858 860 859 861 $data = $this->get_tracking_data(); 860 $data['reason_id'] = sanitize_text_field( wp_unslash($_POST['reason_id']));861 $data['reason_info'] = isset( $_REQUEST['reason_info']) ? trim(sanitize_text_field(wp_unslash($_REQUEST['reason_info']))) : '';862 863 $this->client->send_request( $data, 'deactivate');862 $data['reason_id'] = sanitize_text_field( wp_unslash( $_POST['reason_id'] ) ); 863 $data['reason_info'] = isset( $_REQUEST['reason_info'] ) ? trim( sanitize_text_field( wp_unslash( $_REQUEST['reason_info'] ) ) ) : ''; 864 865 $this->client->send_request( $data, 'deactivate' ); 864 866 865 867 /* 866 868 * Fire after the plugin _uninstall_reason_submitted 867 869 */ 868 do_action( $this->client->slug . '_uninstall_reason_submitted', $data);870 do_action( $this->client->slug . '_uninstall_reason_submitted', $data ); 869 871 870 872 wp_send_json_success(); … … 876 878 * @return void 877 879 */ 878 public function deactivate_scripts() 879 { 880 public function deactivate_scripts() { 880 881 global $pagenow; 881 882 882 if ( 'plugins.php' !== $pagenow) {883 if ( 'plugins.php' !== $pagenow ) { 883 884 return; 884 885 } … … 886 887 $this->deactivation_modal_styles(); 887 888 $reasons = $this->get_uninstall_reasons(); 888 $custom_reasons = apply_filters( 'appsero_custom_deactivation_reasons', [], $this->client);889 ?>889 $custom_reasons = apply_filters( 'appsero_custom_deactivation_reasons', [], $this->client ); 890 ?> 890 891 891 892 <div class="wd-dr-modal" id="<?php echo $this->client->slug; ?>-wd-dr-modal"> 892 893 <div class="wd-dr-modal-wrap"> 893 894 <div class="wd-dr-modal-header"> 894 <h3> <?php $this->client->_etrans('Goodbyes are always hard. If you have a moment, please let us know how we can improve.'); ?></h3>895 <h3> <?php $this->client->_etrans( 'Goodbyes are always hard. If you have a moment, please let us know how we can improve.' ); ?> </h3> 895 896 </div> 896 897 897 898 <div class="wd-dr-modal-body"> 898 899 <ul class="wd-de-reasons"> 899 <?php foreach ( $reasons as $reason) { ?>900 <li data-placeholder="<?php echo esc_attr( $reason['placeholder']); ?>">900 <?php foreach ( $reasons as $reason ) { ?> 901 <li data-placeholder="<?php echo esc_attr( $reason['placeholder'] ); ?>"> 901 902 <label> 902 903 <input type="radio" name="selected-reason" value="<?php echo $reason['id']; ?>"> … … 907 908 <?php } ?> 908 909 </ul> 909 <?php if ( $custom_reasons && is_array($custom_reasons)) { ?>910 <?php if ( $custom_reasons && is_array( $custom_reasons ) ) { ?> 910 911 <ul class="wd-de-reasons wd-de-others-reasons"> 911 <?php foreach ( $custom_reasons as $reason) { ?>912 <li data-placeholder="<?php echo esc_attr( $reason['placeholder']); ?>" data-customreason="true">912 <?php foreach ( $custom_reasons as $reason ) { ?> 913 <li data-placeholder="<?php echo esc_attr( $reason['placeholder'] ); ?>" data-customreason="true"> 913 914 <label> 914 915 <input type="radio" name="selected-reason" value="<?php echo $reason['id']; ?>"> … … 924 925 <?php 925 926 echo sprintf( 926 $this->client->__trans( 'We share your data with <a href="%1$s" target="_blank">Appsero</a> to troubleshoot problems & make product improvements. <a href="%2$s" target="_blank">Learn more</a> about how Appsero handles your data.'),927 esc_url( 'https://appsero.com/'),928 esc_url( 'https://appsero.com/privacy-policy')927 $this->client->__trans( 'We share your data with <a href="%1$s" target="_blank">Appsero</a> to troubleshoot problems & make product improvements. <a href="%2$s" target="_blank">Learn more</a> ↗' ), 928 esc_url( 'https://appsero.com/' ), 929 esc_url( 'https://appsero.com/privacy-policy' ) 929 930 ); 930 931 ?> … … 933 934 934 935 <div class="wd-dr-modal-footer"> 935 <a href="#" class="dont-bother-me wd-dr-button-secondary"><?php $this->client->_etrans( 'Skip & Deactivate'); ?></a>936 <button class="wd-dr-button-secondary wd-dr-cancel-modal"><?php $this->client->_etrans( 'Cancel'); ?></button>937 <button class="wd-dr-submit-modal"><?php $this->client->_etrans( 'Submit & Deactivate'); ?></button>936 <a href="#" class="dont-bother-me wd-dr-button-secondary"><?php $this->client->_etrans( 'Skip & Deactivate' ); ?></a> 937 <button class="wd-dr-button-secondary wd-dr-cancel-modal"><?php $this->client->_etrans( 'Cancel' ); ?></button> 938 <button class="wd-dr-submit-modal"><?php $this->client->_etrans( 'Submit & Deactivate' ); ?></button> 938 939 </div> 939 940 </div> … … 972 973 $('ul.wd-de-reasons li').removeClass('wd-de-reason-selected'); 973 974 974 if ( "other" != inputValue) {975 if ( "other" !== inputValue ) { 975 976 $('ul.wd-de-reasons.wd-de-others-reasons').css('display', 'none'); 976 977 } … … 978 979 979 980 // Show if has custom reasons 980 if ( "other" == inputValue) {981 if ( "other" === inputValue ) { 981 982 $('ul.wd-de-reasons.wd-de-others-reasons').css('display', 'flex'); 982 983 } … … 1005 1006 type: 'POST', 1006 1007 data: { 1007 nonce: '<?php echo wp_create_nonce( 'appsero-security-nonce'); ?>',1008 nonce: '<?php echo wp_create_nonce( 'appsero-security-nonce' ); ?>', 1008 1009 action: '<?php echo $this->client->slug; ?>_submit-uninstall-reason', 1009 1010 reason_id: (0 === $radio.length) ? 'none' : $radio.val(), … … 1023 1024 </script> 1024 1025 1025 <?php1026 <?php 1026 1027 } 1027 1028 … … 1035 1036 * @return void 1036 1037 */ 1037 public function theme_deactivated($new_name, $new_theme, $old_theme) 1038 { 1038 public function theme_deactivated( $new_name, $new_theme, $old_theme ) { 1039 1039 // Make sure this is appsero theme 1040 if ( $old_theme->get_template() === $this->client->slug) {1041 $this->client->send_request( $this->get_tracking_data(), 'deactivate');1040 if ( $old_theme->get_template() === $this->client->slug ) { 1041 $this->client->send_request( $this->get_tracking_data(), 'deactivate' ); 1042 1042 } 1043 1043 } … … 1046 1046 * Get user IP Address 1047 1047 */ 1048 private function get_user_ip_address() 1049 { 1050 $response = wp_remote_get('https://icanhazip.com/'); 1051 1052 if (is_wp_error($response)) { 1048 private function get_user_ip_address() { 1049 $response = wp_remote_get( 'https://icanhazip.com/' ); 1050 1051 if ( is_wp_error( $response ) ) { 1053 1052 return ''; 1054 1053 } 1055 1054 1056 $ip = trim( wp_remote_retrieve_body($response));1057 1058 if ( !filter_var($ip, FILTER_VALIDATE_IP)) {1055 $ip = trim( wp_remote_retrieve_body( $response ) ); 1056 1057 if ( ! filter_var( $ip, FILTER_VALIDATE_IP ) ) { 1059 1058 return ''; 1060 1059 } … … 1066 1065 * Get site name 1067 1066 */ 1068 private function get_site_name() 1069 { 1070 $site_name = get_bloginfo('name'); 1071 1072 if (empty($site_name)) { 1073 $site_name = get_bloginfo('description'); 1074 $site_name = wp_trim_words($site_name, 3, ''); 1075 } 1076 1077 if (empty($site_name)) { 1078 $site_name = esc_url(home_url()); 1067 private function get_site_name() { 1068 $site_name = get_bloginfo( 'name' ); 1069 1070 if ( empty( $site_name ) ) { 1071 $site_name = get_bloginfo( 'description' ); 1072 $site_name = wp_trim_words( $site_name, 3, '' ); 1073 } 1074 1075 if ( empty( $site_name ) ) { 1076 $site_name = esc_url( home_url() ); 1079 1077 } 1080 1078 … … 1085 1083 * Send request to appsero if user skip to send tracking data 1086 1084 */ 1087 private function send_tracking_skipped_request() 1088 { 1089 $skipped = get_option($this->client->slug . '_tracking_skipped'); 1085 private function send_tracking_skipped_request() { 1086 $skipped = get_option( $this->client->slug . '_tracking_skipped' ); 1090 1087 1091 1088 $data = [ … … 1094 1091 ]; 1095 1092 1096 if ( $skipped === 'yes') {1093 if ( $skipped === 'yes' ) { 1097 1094 $data['previously_skipped'] = true; 1098 1095 } else { 1099 update_option( $this->client->slug . '_tracking_skipped', 'yes');1100 } 1101 1102 $this->client->send_request( $data, 'tracking-skipped');1096 update_option( $this->client->slug . '_tracking_skipped', 'yes' ); 1097 } 1098 1099 $this->client->send_request( $data, 'tracking-skipped' ); 1103 1100 } 1104 1101 … … 1106 1103 * Deactivation modal styles 1107 1104 */ 1108 private function deactivation_modal_styles() 1109 { 1110 ?> 1105 private function deactivation_modal_styles() { 1106 ?> 1111 1107 <style type="text/css"> 1112 1108 .wd-dr-modal { … … 1291 1287 } 1292 1288 </style> 1293 <?php1289 <?php 1294 1290 } 1295 1291 } -
texty/tags/1.1.5/vendor/autoload.php
r3165401 r3452714 5 5 require_once __DIR__ . '/composer/autoload_real.php'; 6 6 7 return ComposerAutoloaderInit 3e58cb5797535e5f7271ddfe3cc932fe::getLoader();7 return ComposerAutoloaderInit75360f9b0d0b857d8b634f1ded3c970d::getLoader(); -
texty/tags/1.1.5/vendor/composer/autoload_classmap.php
r2736472 r3452714 7 7 8 8 return array( 9 'Appsero\\Client' => $vendorDir . '/appsero/client/src/Client.php',10 'Appsero\\Insights' => $vendorDir . '/appsero/client/src/Insights.php',11 'Appsero\\License' => $vendorDir . '/appsero/client/src/License.php',12 'Appsero\\Updater' => $vendorDir . '/appsero/client/src/Updater.php',13 9 'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php', 14 'Texty\\Admin' => $baseDir . '/includes/Admin.php',15 'Texty\\Admin\\Menu' => $baseDir . '/includes/Admin/Menu.php',16 'Texty\\Admin\\Profile' => $baseDir . '/includes/Admin/Profile.php',17 'Texty\\Api' => $baseDir . '/includes/Api.php',18 'Texty\\Api\\Base' => $baseDir . '/includes/Api/Base.php',19 'Texty\\Api\\Notifications' => $baseDir . '/includes/Api/Notifications.php',20 'Texty\\Api\\Send' => $baseDir . '/includes/Api/Send.php',21 'Texty\\Api\\Settings' => $baseDir . '/includes/Api/Settings.php',22 'Texty\\Api\\Status' => $baseDir . '/includes/Api/Status.php',23 'Texty\\Api\\Tools' => $baseDir . '/includes/Api/Tools.php',24 'Texty\\Dispatcher' => $baseDir . '/includes/Dispatcher.php',25 'Texty\\Gateways' => $baseDir . '/includes/Gateways.php',26 'Texty\\Gateways\\Clickatell' => $baseDir . '/includes/Gateways/Clickatell.php',27 'Texty\\Gateways\\Fake' => $baseDir . '/includes/Gateways/Fake.php',28 'Texty\\Gateways\\GatewayInterface' => $baseDir . '/includes/Gateways/GatewayInterface.php',29 'Texty\\Gateways\\Plivo' => $baseDir . '/includes/Gateways/Plivo.php',30 'Texty\\Gateways\\Twilio' => $baseDir . '/includes/Gateways/Twilio.php',31 'Texty\\Gateways\\Vonage' => $baseDir . '/includes/Gateways/Vonage.php',32 'Texty\\Install' => $baseDir . '/includes/Install.php',33 'Texty\\Integrations\\Dokan' => $baseDir . '/includes/Integrations/Dokan.php',34 'Texty\\Integrations\\WooCommerce' => $baseDir . '/includes/Integrations/WooCommerce.php',35 'Texty\\Notifications' => $baseDir . '/includes/Notifications.php',36 'Texty\\Notifications\\Dokan\\Base' => $baseDir . '/includes/Notifications/Dokan/Base.php',37 'Texty\\Notifications\\Dokan\\CompleteVendor' => $baseDir . '/includes/Notifications/Dokan/CompleteVendor.php',38 'Texty\\Notifications\\Dokan\\ProcessingVendor' => $baseDir . '/includes/Notifications/Dokan/ProcessingVendor.php',39 'Texty\\Notifications\\Notification' => $baseDir . '/includes/Notifications/Notification.php',40 'Texty\\Notifications\\WC\\Base' => $baseDir . '/includes/Notifications/WC/Base.php',41 'Texty\\Notifications\\WC\\CompleteAdmin' => $baseDir . '/includes/Notifications/WC/CompleteAdmin.php',42 'Texty\\Notifications\\WC\\CompleteCustomer' => $baseDir . '/includes/Notifications/WC/CompleteCustomer.php',43 'Texty\\Notifications\\WC\\HoldCustomer' => $baseDir . '/includes/Notifications/WC/HoldCustomer.php',44 'Texty\\Notifications\\WC\\ProcessingAdmin' => $baseDir . '/includes/Notifications/WC/ProcessingAdmin.php',45 'Texty\\Notifications\\WC\\ProcessingCustomer' => $baseDir . '/includes/Notifications/WC/ProcessingCustomer.php',46 'Texty\\Notifications\\WP\\Comment' => $baseDir . '/includes/Notifications/WP/Comment.php',47 'Texty\\Notifications\\WP\\Registration' => $baseDir . '/includes/Notifications/WP/Registration.php',48 'Texty\\Settings' => $baseDir . '/includes/Settings.php',49 10 ); -
texty/tags/1.1.5/vendor/composer/autoload_psr4.php
r2458183 r3452714 7 7 8 8 return array( 9 'Texty\\Dependencies\\' => array($baseDir . '/dependencies'), 9 10 'Texty\\' => array($baseDir . '/includes'), 10 11 'Appsero\\' => array($vendorDir . '/appsero/client/src'), -
texty/tags/1.1.5/vendor/composer/autoload_real.php
r3165401 r3452714 3 3 // autoload_real.php @generated by Composer 4 4 5 class ComposerAutoloaderInit 3e58cb5797535e5f7271ddfe3cc932fe5 class ComposerAutoloaderInit75360f9b0d0b857d8b634f1ded3c970d 6 6 { 7 7 private static $loader; … … 25 25 require __DIR__ . '/platform_check.php'; 26 26 27 spl_autoload_register(array('ComposerAutoloaderInit 3e58cb5797535e5f7271ddfe3cc932fe', 'loadClassLoader'), true, true);27 spl_autoload_register(array('ComposerAutoloaderInit75360f9b0d0b857d8b634f1ded3c970d', 'loadClassLoader'), true, true); 28 28 self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__))); 29 spl_autoload_unregister(array('ComposerAutoloaderInit 3e58cb5797535e5f7271ddfe3cc932fe', 'loadClassLoader'));29 spl_autoload_unregister(array('ComposerAutoloaderInit75360f9b0d0b857d8b634f1ded3c970d', 'loadClassLoader')); 30 30 31 31 $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); … … 33 33 require __DIR__ . '/autoload_static.php'; 34 34 35 call_user_func(\Composer\Autoload\ComposerStaticInit 3e58cb5797535e5f7271ddfe3cc932fe::getInitializer($loader));35 call_user_func(\Composer\Autoload\ComposerStaticInit75360f9b0d0b857d8b634f1ded3c970d::getInitializer($loader)); 36 36 } else { 37 37 $map = require __DIR__ . '/autoload_namespaces.php'; -
texty/tags/1.1.5/vendor/composer/autoload_static.php
r3165401 r3452714 5 5 namespace Composer\Autoload; 6 6 7 class ComposerStaticInit 3e58cb5797535e5f7271ddfe3cc932fe7 class ComposerStaticInit75360f9b0d0b857d8b634f1ded3c970d 8 8 { 9 9 public static $prefixLengthsPsr4 = array ( 10 10 'T' => 11 11 array ( 12 'Texty\\Dependencies\\' => 19, 12 13 'Texty\\' => 6, 13 14 ), … … 19 20 20 21 public static $prefixDirsPsr4 = array ( 22 'Texty\\Dependencies\\' => 23 array ( 24 0 => __DIR__ . '/../..' . '/dependencies', 25 ), 21 26 'Texty\\' => 22 27 array ( … … 30 35 31 36 public static $classMap = array ( 32 'Appsero\\Client' => __DIR__ . '/..' . '/appsero/client/src/Client.php',33 'Appsero\\Insights' => __DIR__ . '/..' . '/appsero/client/src/Insights.php',34 'Appsero\\License' => __DIR__ . '/..' . '/appsero/client/src/License.php',35 'Appsero\\Updater' => __DIR__ . '/..' . '/appsero/client/src/Updater.php',36 37 'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php', 37 'Texty\\Admin' => __DIR__ . '/../..' . '/includes/Admin.php',38 'Texty\\Admin\\Menu' => __DIR__ . '/../..' . '/includes/Admin/Menu.php',39 'Texty\\Admin\\Profile' => __DIR__ . '/../..' . '/includes/Admin/Profile.php',40 'Texty\\Api' => __DIR__ . '/../..' . '/includes/Api.php',41 'Texty\\Api\\Base' => __DIR__ . '/../..' . '/includes/Api/Base.php',42 'Texty\\Api\\Notifications' => __DIR__ . '/../..' . '/includes/Api/Notifications.php',43 'Texty\\Api\\Send' => __DIR__ . '/../..' . '/includes/Api/Send.php',44 'Texty\\Api\\Settings' => __DIR__ . '/../..' . '/includes/Api/Settings.php',45 'Texty\\Api\\Status' => __DIR__ . '/../..' . '/includes/Api/Status.php',46 'Texty\\Api\\Tools' => __DIR__ . '/../..' . '/includes/Api/Tools.php',47 'Texty\\Dispatcher' => __DIR__ . '/../..' . '/includes/Dispatcher.php',48 'Texty\\Gateways' => __DIR__ . '/../..' . '/includes/Gateways.php',49 'Texty\\Gateways\\Clickatell' => __DIR__ . '/../..' . '/includes/Gateways/Clickatell.php',50 'Texty\\Gateways\\Fake' => __DIR__ . '/../..' . '/includes/Gateways/Fake.php',51 'Texty\\Gateways\\GatewayInterface' => __DIR__ . '/../..' . '/includes/Gateways/GatewayInterface.php',52 'Texty\\Gateways\\Plivo' => __DIR__ . '/../..' . '/includes/Gateways/Plivo.php',53 'Texty\\Gateways\\Twilio' => __DIR__ . '/../..' . '/includes/Gateways/Twilio.php',54 'Texty\\Gateways\\Vonage' => __DIR__ . '/../..' . '/includes/Gateways/Vonage.php',55 'Texty\\Install' => __DIR__ . '/../..' . '/includes/Install.php',56 'Texty\\Integrations\\Dokan' => __DIR__ . '/../..' . '/includes/Integrations/Dokan.php',57 'Texty\\Integrations\\WooCommerce' => __DIR__ . '/../..' . '/includes/Integrations/WooCommerce.php',58 'Texty\\Notifications' => __DIR__ . '/../..' . '/includes/Notifications.php',59 'Texty\\Notifications\\Dokan\\Base' => __DIR__ . '/../..' . '/includes/Notifications/Dokan/Base.php',60 'Texty\\Notifications\\Dokan\\CompleteVendor' => __DIR__ . '/../..' . '/includes/Notifications/Dokan/CompleteVendor.php',61 'Texty\\Notifications\\Dokan\\ProcessingVendor' => __DIR__ . '/../..' . '/includes/Notifications/Dokan/ProcessingVendor.php',62 'Texty\\Notifications\\Notification' => __DIR__ . '/../..' . '/includes/Notifications/Notification.php',63 'Texty\\Notifications\\WC\\Base' => __DIR__ . '/../..' . '/includes/Notifications/WC/Base.php',64 'Texty\\Notifications\\WC\\CompleteAdmin' => __DIR__ . '/../..' . '/includes/Notifications/WC/CompleteAdmin.php',65 'Texty\\Notifications\\WC\\CompleteCustomer' => __DIR__ . '/../..' . '/includes/Notifications/WC/CompleteCustomer.php',66 'Texty\\Notifications\\WC\\HoldCustomer' => __DIR__ . '/../..' . '/includes/Notifications/WC/HoldCustomer.php',67 'Texty\\Notifications\\WC\\ProcessingAdmin' => __DIR__ . '/../..' . '/includes/Notifications/WC/ProcessingAdmin.php',68 'Texty\\Notifications\\WC\\ProcessingCustomer' => __DIR__ . '/../..' . '/includes/Notifications/WC/ProcessingCustomer.php',69 'Texty\\Notifications\\WP\\Comment' => __DIR__ . '/../..' . '/includes/Notifications/WP/Comment.php',70 'Texty\\Notifications\\WP\\Registration' => __DIR__ . '/../..' . '/includes/Notifications/WP/Registration.php',71 'Texty\\Settings' => __DIR__ . '/../..' . '/includes/Settings.php',72 38 ); 73 39 … … 75 41 { 76 42 return \Closure::bind(function () use ($loader) { 77 $loader->prefixLengthsPsr4 = ComposerStaticInit 3e58cb5797535e5f7271ddfe3cc932fe::$prefixLengthsPsr4;78 $loader->prefixDirsPsr4 = ComposerStaticInit 3e58cb5797535e5f7271ddfe3cc932fe::$prefixDirsPsr4;79 $loader->classMap = ComposerStaticInit 3e58cb5797535e5f7271ddfe3cc932fe::$classMap;43 $loader->prefixLengthsPsr4 = ComposerStaticInit75360f9b0d0b857d8b634f1ded3c970d::$prefixLengthsPsr4; 44 $loader->prefixDirsPsr4 = ComposerStaticInit75360f9b0d0b857d8b634f1ded3c970d::$prefixDirsPsr4; 45 $loader->classMap = ComposerStaticInit75360f9b0d0b857d8b634f1ded3c970d::$classMap; 80 46 81 47 }, null, ClassLoader::class); -
texty/tags/1.1.5/vendor/composer/installed.json
r2987176 r3452714 3 3 { 4 4 "name": "appsero/client", 5 "version": " dev-develop",6 "version_normalized": " dev-develop",5 "version": "v2.0.5", 6 "version_normalized": "2.0.5.0", 7 7 "source": { 8 8 "type": "git", 9 9 "url": "https://github.com/Appsero/client.git", 10 "reference": " 3b68f17ac29d56d14a78cc4817c4b80f692e4e3a"10 "reference": "b7766ee150cc8e28125a818a11e770feb9899a71" 11 11 }, 12 12 "dist": { 13 13 "type": "zip", 14 "url": "https://api.github.com/repos/Appsero/client/zipball/ 3b68f17ac29d56d14a78cc4817c4b80f692e4e3a",15 "reference": " 3b68f17ac29d56d14a78cc4817c4b80f692e4e3a",14 "url": "https://api.github.com/repos/Appsero/client/zipball/b7766ee150cc8e28125a818a11e770feb9899a71", 15 "reference": "b7766ee150cc8e28125a818a11e770feb9899a71", 16 16 "shasum": "" 17 17 }, … … 27 27 "wp-coding-standards/wpcs": "dev-develop" 28 28 }, 29 "time": "2023-10-11T09:13:55+00:00", 30 "default-branch": true, 29 "time": "2025-11-24T10:14:59+00:00", 31 30 "type": "library", 32 31 "installation-source": "dist", … … 55 54 "support": { 56 55 "issues": "https://github.com/Appsero/client/issues", 57 "source": "https://github.com/Appsero/client/tree/ develop"56 "source": "https://github.com/Appsero/client/tree/v2.0.5" 58 57 }, 59 58 "install-path": "../appsero/client" -
texty/tags/1.1.5/vendor/composer/installed.php
r2987176 r3452714 12 12 'versions' => array( 13 13 'appsero/client' => array( 14 'pretty_version' => ' dev-develop',15 'version' => ' dev-develop',14 'pretty_version' => 'v2.0.5', 15 'version' => '2.0.5.0', 16 16 'type' => 'library', 17 17 'install_path' => __DIR__ . '/../appsero/client', 18 'aliases' => array( 19 0 => '9999999-dev', 20 ), 21 'reference' => '3b68f17ac29d56d14a78cc4817c4b80f692e4e3a', 18 'aliases' => array(), 19 'reference' => 'b7766ee150cc8e28125a818a11e770feb9899a71', 22 20 'dev_requirement' => false, 23 21 ), -
texty/trunk/dist/app.js
r3165401 r3452714 1 "use strict";(self.webpackChunktexty=self.webpackChunktexty||[]).push([[143],{8187:(e,t, a)=>{a.d(t,{Z:()=>p});var r,n=a(1570),o=a(7294),l=a(3727),s=a(6550),i=a(1231),c=a(8602),u=a(7046),d=a(2700),f=a(4469);function m(){return o.createElement(l.UT,null,o.createElement(i.Ix,{position:"top-right",autoClose:5e3,hideProgressBar:!1,newestOnTop:!0,closeOnClick:!0,rtl:!1,pauseOnFocusLoss:!1,draggable:!0,pauseOnHover:!0}),o.createElement(c.Z,null),o.createElement("div",{className:"wrap texty"},o.createElement("div",{className:"texty-container"},o.createElement(s.rs,null,o.createElement(s.AW,{path:"/notifications",component:u.Z}),o.createElement(s.AW,{path:"/tools",component:f.Z}),o.createElement(s.AW,{path:"/",exact:!0,component:d.Z})))))}e=a.hmd(e),(r="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.enterModule:void 0)&&r(e),"undefined"!=typeof reactHotLoaderGlobal&&reactHotLoaderGlobal.default.signature;var y=(0,n.w)(m);const p=y;var b,v;(b="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default:void 0)&&(b.register(m,"App","/Users/asad/Desktop/release-20241008/texty/src/App.js"),b.register(y,"default","/Users/asad/Desktop/release-20241008/texty/src/App.js")),(v="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.leaveModule:void 0)&&v(e)},8359:(e,t,a)=>{a.d(t,{Z:()=>s});var r,n=a(7294);function o(){return n.createElement("svg",{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",stroke:"currentColor",viewBox:"0 0 24 24",className:"active-icon"},n.createElement("path",{d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"}))}e=a.hmd(e),(r="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.enterModule:void 0)&&r(e),"undefined"!=typeof reactHotLoaderGlobal&&reactHotLoaderGlobal.default.signature;var l=o;const s=l;var i,c;(i="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default:void 0)&&(i.register(o,"ActiveIcon","/Users/asad/Desktop/release-20241008/texty/src/components/ActiveIcon.js"),i.register(l,"default","/Users/asad/Desktop/release-20241008/texty/src/components/ActiveIcon.js")),(c="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.leaveModule:void 0)&&c(e)},8602:(e,t,a)=>{a.d(t,{Z:()=>c});var r,n=a(7294),o=a(4635),l=a(3727);function s(){return n.createElement("div",{className:"texty-header-wrap"},n.createElement("div",{className:"texty-container"},n.createElement("div",{className:"texty-header"},n.createElement("div",{className:"texty-admin-header__logo"},n.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 97 28",width:"97",height:"28"},n.createElement("g",{fill:"none",fillRule:"nonzero"},n.createElement("path",{fill:"#FF0F45",d:"M15.617 0c.893 0 1.766.084 2.613.244a7.954 7.954 0 00-1.633 4.087 9.766 9.766 0 00-.98-.05c-5.36 0-9.706 4.346-9.706 9.706 0 2.262.774 4.4 2.17 6.117l.933 1.148-1.433 2.44h8.036c5.36 0 9.705-4.345 9.705-9.705 0-.3-.013-.597-.04-.89a7.948 7.948 0 004.102-1.594c.145.806.22 1.636.22 2.484 0 7.725-6.262 13.988-13.987 13.988H0l3.862-6.405-.018-.028a13.934 13.934 0 01-2.214-7.555C1.63 6.262 7.892 0 15.617 0zm8.932 0a5.138 5.138 0 110 10.276A5.138 5.138 0 0124.55 0z"}),n.createElement("path",{fill:"#000",d:"M87.482 7.8l2.65 8.9 2.636-8.9h4.087l-5.734 16.53-.317.755-.039.084c-.856 1.813-2.25 2.72-4.18 2.72a5.977 5.977 0 01-1.687-.252v-2.896l.58.013h.09c.676-.01 1.184-.12 1.525-.33.356-.221.635-.587.837-1.098l.449-1.177-4.997-14.35h4.1zm-43.91-3.518V7.8h2.44v2.803h-2.44v7.142l.001.071c.009.492.11.847.303 1.066.202.23.589.344 1.16.344.422 0 .795-.03 1.12-.093v2.897l-.14.041a7.825 7.825 0 01-2.167.302c-2.671 0-4.033-1.353-4.086-4.06v-7.71H37.68V7.8h2.083V4.282h3.81zm9.894 3.253c1.95 0 3.486.617 4.607 1.852 1.1 1.211 1.66 2.92 1.68 5.127v1.683h-9.082l.013.093c.135.892.502 1.61 1.1 2.156.62.564 1.405.846 2.354.846 1.437 0 2.567-.511 3.389-1.534l.052-.066 1.871 2.103-.061.086c-.565.77-1.318 1.374-2.259 1.811-.975.454-2.056.681-3.243.681-2.091 0-3.794-.643-5.108-1.93-1.29-1.265-1.947-2.941-1.97-5.03v-.628c.018-1.38.295-2.617.83-3.712.554-1.133 1.338-2.006 2.353-2.619 1.015-.612 2.173-.919 3.474-.919zm26.533-3.253V7.8h2.44v2.803h-2.44v7.142l.001.071c.009.492.11.847.303 1.066.202.23.589.344 1.16.344.422 0 .795-.03 1.12-.093v2.897l-.14.041a7.825 7.825 0 01-2.167.302c-2.671 0-4.034-1.353-4.086-4.06v-7.71h-2.083V7.8h2.083V4.282H80zM64.541 7.8l2.347 4.271 2.4-4.271h4.072l-4.06 7.009 4.232 7.3h-4.087l-2.544-4.497-2.531 4.497h-4.1l4.232-7.3-4.047-7.01h4.086zm-11.089 2.83c-.755 0-1.368.255-1.839.767-.454.494-.75 1.193-.888 2.097l-.015.098h5.3v-.304l-.003-.087c-.03-.804-.258-1.43-.683-1.877-.44-.463-1.063-.694-1.872-.694z"})))),n.createElement("div",{className:"texty-admin-header__menu"},n.createElement(l.OL,{to:"/",exact:!0,className:"header-link",title:(0,o.__)("Gateway Settings","texty")},n.createElement("span",{className:"dashicons dashicons-admin-settings"}),n.createElement("span",{className:"title"},(0,o.__)("Gateway Settings","texty"))),n.createElement(l.OL,{to:"/notifications",className:"header-link",title:(0,o.__)("Notifications","texty")},n.createElement("span",{className:"dashicons dashicons-admin-plugins"}),n.createElement("span",{className:"title"},(0,o.__)("Notifications","texty"))),n.createElement(l.OL,{to:"/tools",className:"header-link",title:(0,o.__)("Tools","texty")},n.createElement("span",{className:"dashicons dashicons-admin-tools"}),n.createElement("span",{className:"title"},(0,o.__)("Tools","texty")))))))}e=a.hmd(e),(r="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.enterModule:void 0)&&r(e),"undefined"!=typeof reactHotLoaderGlobal&&reactHotLoaderGlobal.default.signature;var i=s;const c=i;var u,d;(u="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default:void 0)&&(u.register(s,"Header","/Users/asad/Desktop/release-20241008/texty/src/components/Header.js"),u.register(i,"default","/Users/asad/Desktop/release-20241008/texty/src/components/Header.js")),(d="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.leaveModule:void 0)&&d(e)},9931:(e,t,a)=>{a.d(t,{Z:()=>p});var r,n=a(7294),o=a(4635),l=a(4184),s=a.n(l),i=a(5373),c=a(6117),u=a(9586),d=a(3412),f=a(211);function m(e){var t=e.title,a=e.description,r=e.keyName,l=e.roles,m=e.settings,y=e.setOption,p=m.replacements.map((function(e){return"<code>{".concat(e,"}</code>")})).join(", ");return n.createElement(i.Z,{initialOpen:!1,title:n.createElement(n.Fragment,null,n.createElement("span",null,t),n.createElement("span",{className:s()("label",{active:!0===m.enabled})},m.enabled?(0,o.__)("active","texty"):(0,o.__)("inactive","texty")))},n.createElement(c.Z,{label:(0,o.__)("Enable","texty"),help:a,checked:m.enabled,onChange:function(e){return y(r,"enabled",e)}}),"role"===m.type&&n.createElement(u.Z,{label:(0,o.__)("Recipients"),help:"role"===m.type?(0,o.__)("Select one or multiple user roles. Users with phone number in their profile will receive the text","texty"):""},n.createElement(f.ZP,{required:!0,isMulti:"role"===m.type,value:l.filter((function(e){return m.recipients.includes(e.value)})),options:l,onChange:function(e){y(r,"recipients",null!==e?e.map((function(e){return e.value})):[])}})),n.createElement(d.Z,{label:(0,o.__)("Message","texty"),className:"monospace",required:!0,help:n.createElement("span",{className:"help",dangerouslySetInnerHTML:{__html:(0,o.__)("You may use these variables: ","texty")+p}}),value:m.message,onChange:function(e){return y(r,"message",e)}}))}e=a.hmd(e),(r="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.enterModule:void 0)&&r(e),"undefined"!=typeof reactHotLoaderGlobal&&reactHotLoaderGlobal.default.signature;var y=m;const p=y;var b,v;(b="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default:void 0)&&(b.register(m,"NotificationItem","/Users/asad/Desktop/release-20241008/texty/src/components/NotificationItem.js"),b.register(y,"default","/Users/asad/Desktop/release-20241008/texty/src/components/NotificationItem.js")),(v="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.leaveModule:void 0)&&v(e)},2797:(e,t,a)=>{a.d(t,{Z:()=>b});var r,n=a(7294),o=a(4635),l=a(1865),s=a.n(l),i=a(9545),c=a(3412),u=a(9676),d=a(1231);function f(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var a=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var r,n,o,l,s=[],i=!0,c=!1;try{if(o=(a=a.call(e)).next,0===t){if(Object(a)!==a)return;i=!1}else for(;!(i=(r=o.call(a)).done)&&(s.push(r.value),s.length!==t);i=!0);}catch(e){c=!0,n=e}finally{try{if(!i&&null!=a.return&&(l=a.return(),Object(l)!==l))return}finally{if(c)throw n}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return m(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(e):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?m(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,r=new Array(t);a<t;a++)r[a]=e[a];return r}function y(){var e=f((0,n.useState)(!1),2),t=e[0],a=e[1],r=f((0,n.useState)(""),2),l=r[0],m=r[1],y=f((0,n.useState)(""),2),p=y[0],b=y[1];return n.createElement("form",{onSubmit:function(e){e.preventDefault(),a(!0),s()({path:"/texty/v1/send",method:"POST",data:{to:l,message:p}}).then((function(e){a(!1),e.success?d.Am.success((0,o.__)("Message has been sent.","texty")):d.Am.error((0,o.__)("Error, message could not be sent.","texty")+" "+e.message)})).catch((function(e){a(!1),console.log(e)}))},className:"texty-settings__form"},n.createElement("fieldset",{disabled:t},n.createElement(i.Z,{label:(0,o.__)("Phone Number","texty"),placeholder:"+123456789",type:"tel",value:l,onChange:function(e){return m(e)},required:!0}),n.createElement(c.Z,{label:(0,o.__)("Message","texty"),value:p,placeholder:(0,o.__)("Write your message...","texty"),onChange:function(e){return b(e)},required:!0})),n.createElement("div",{className:"submit-area"},n.createElement(u.Z,{type:"submit",isPrimary:!0,isBusy:t},t?(0,o.__)("Sending...","texty"):(0,o.__)("Send Message","texty"))))}e=a.hmd(e),(r="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.enterModule:void 0)&&r(e),("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default.signature:function(e){return e})(y,"useState{[isSending, setIsSending](false)}\nuseState{[phoneNumber, setPhoneNumber]('')}\nuseState{[message, setMessage]('')}");var p=y;const b=p;var v,g;(v="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default:void 0)&&(v.register(y,"QuickSend","/Users/asad/Desktop/release-20241008/texty/src/components/QuickSend.js"),v.register(p,"default","/Users/asad/Desktop/release-20241008/texty/src/components/QuickSend.js")),(g="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.leaveModule:void 0)&&g(e)},6992:(e,t,a)=>{a.d(t,{Z:()=>p});var r,n=a(7294),o=a(4635),l=a(1865),s=a.n(l),i=a(1264),c=a(4410),u=a(7347);function d(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var a=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var r,n,o,l,s=[],i=!0,c=!1;try{if(o=(a=a.call(e)).next,0===t){if(Object(a)!==a)return;i=!1}else for(;!(i=(r=o.call(a)).done)&&(s.push(r.value),s.length!==t);i=!0);}catch(e){c=!0,n=e}finally{try{if(!i&&null!=a.return&&(l=a.return(),Object(l)!==l))return}finally{if(c)throw n}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return f(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(e):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?f(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,r=new Array(t);a<t;a++)r[a]=e[a];return r}function m(){var e=d((0,n.useState)(!1),2),t=e[0],a=e[1],r=d((0,n.useState)(!0),2),l=r[0],f=r[1];return(0,n.useEffect)((function(){f(!0),s()({path:"/texty/v1/status"}).then((function(e){f(!1),a(e.success)}))}),[]),l?n.createElement(i.Z,null,n.createElement(c.Z,null)):n.createElement(i.Z,{status:t?"success":"error",isDismissible:!1},n.createElement(u.Z,{icon:t?"yes-alt":"dismiss"}),n.createElement("span",null,t?(0,o.__)("Connected","texty"):(0,o.__)("Not connected","texty")))}e=a.hmd(e),(r="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.enterModule:void 0)&&r(e),("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default.signature:function(e){return e})(m,"useState{[isConnected, setIsConnected](false)}\nuseState{[isFetching, setIsFetching](true)}\nuseEffect{}");var y=m;const p=y;var b,v;(b="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default:void 0)&&(b.register(m,"Status","/Users/asad/Desktop/release-20241008/texty/src/components/Status.js"),b.register(y,"default","/Users/asad/Desktop/release-20241008/texty/src/components/Status.js")),(v="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.leaveModule:void 0)&&v(e)},9653:(e,t,a)=>{a.d(t,{Z:()=>p});var r,n=a(7294),o=a(4635),l=a(1865),s=a.n(l),i=a(9545),c=a(9676),u=a(1231);function d(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var a=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var r,n,o,l,s=[],i=!0,c=!1;try{if(o=(a=a.call(e)).next,0===t){if(Object(a)!==a)return;i=!1}else for(;!(i=(r=o.call(a)).done)&&(s.push(r.value),s.length!==t);i=!0);}catch(e){c=!0,n=e}finally{try{if(!i&&null!=a.return&&(l=a.return(),Object(l)!==l))return}finally{if(c)throw n}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return f(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(e):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?f(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,r=new Array(t);a<t;a++)r[a]=e[a];return r}function m(){var e=d((0,n.useState)(!1),2),t=e[0],a=e[1],r=d((0,n.useState)(""),2),l=r[0],f=r[1];return n.createElement("form",{onSubmit:function(e){e.preventDefault(),a(!0),s()({path:"/texty/v1/tools/test",method:"POST",data:{to:l}}).then((function(e){a(!1),e.success?u.Am.success((0,o.__)("Message has been sent.","texty")):u.Am.error((0,o.__)("Error, message could not be sent.","texty")+" "+e.message)})).catch((function(e){a(!1),console.log(e)}))},className:"texty-settings__form"},n.createElement("fieldset",{disabled:t},n.createElement(i.Z,{label:(0,o.__)("Test Number","texty"),placeholder:"+123456789",type:"tel",value:l,onChange:function(e){return f(e)},help:(0,o.__)("Enter a phone number to test the SMS sending.","texty"),required:!0})),n.createElement("div",{className:"submit-area"},n.createElement(c.Z,{type:"submit",isPrimary:!0,isBusy:t},t?(0,o.__)("Sending...","texty"):(0,o.__)("Send Test","texty"))))}e=a.hmd(e),(r="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.enterModule:void 0)&&r(e),("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default.signature:function(e){return e})(m,"useState{[isSending, setIsSending](false)}\nuseState{[phoneNumber, setPhoneNumber]('')}");var y=m;const p=y;var b,v;(b="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default:void 0)&&(b.register(m,"TestMessage","/Users/asad/Desktop/release-20241008/texty/src/components/TestMessage.js"),b.register(y,"default","/Users/asad/Desktop/release-20241008/texty/src/components/TestMessage.js")),(v="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.leaveModule:void 0)&&v(e)},5579:(e,t,a)=>{var r,n=a(7294),o=a(9060),l=a(788),s=a(8187);a(4061),e=a.hmd(e),(r="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.enterModule:void 0)&&r(e),"undefined"!=typeof reactHotLoaderGlobal&&reactHotLoaderGlobal.default.signature;var i,c,u=document.getElementById("texty-app");o.render(n.createElement(s.Z,null),u),(0,l.Z)("texty"),(i="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default:void 0)&&i.register(u,"mountNode","/Users/asad/Desktop/release-20241008/texty/src/index.js"),(c="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.leaveModule:void 0)&&c(e)},7046:(e,t,a)=>{a.d(t,{Z:()=>G});var r,n=a(7294),o=a(4635),l=a(1231),s=a(1865),i=a.n(s),c=a(4184),u=a.n(c),d=a(4410),f=a(3818),m=a(4746),y=a(6887),p=a(3033),b=a(9676),v=a(9931);function g(e){return g="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},g(e)}function h(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function E(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?h(Object(a),!0).forEach((function(t){S(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):h(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}function S(e,t,a){return(t=function(e){var t=function(e,t){if("object"!==g(e)||null===e)return e;var a=e[Symbol.toPrimitive];if(void 0!==a){var r=a.call(e,"string");if("object"!==g(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===g(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function x(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var a=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var r,n,o,l,s=[],i=!0,c=!1;try{if(o=(a=a.call(e)).next,0===t){if(Object(a)!==a)return;i=!1}else for(;!(i=(r=o.call(a)).done)&&(s.push(r.value),s.length!==t);i=!0);}catch(e){c=!0,n=e}finally{try{if(!i&&null!=a.return&&(l=a.return(),Object(l)!==l))return}finally{if(c)throw n}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return _(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(e):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?_(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,r=new Array(t);a<t;a++)r[a]=e[a];return r}function L(){var e=x((0,n.useState)(!0),2),t=e[0],a=e[1],r=x((0,n.useState)(!1),2),s=r[0],c=r[1],g=x((0,n.useState)({}),2),h=g[0],_=g[1];(0,n.useEffect)((function(){a(!0),i()({path:"/texty/v1/notifications?context=edit"}).then((function(e){_(e),a(!1)}))}),[]);var L=function(e,t,a){_(E(E({},h),{},S({},"notifications",E(E({},h.notifications),{},S({},e,E(E({},h.notifications[e]),{},S({},t,a)))))))};return t?n.createElement(d.Z,null):n.createElement("div",{className:"texty-notifications"},n.createElement("h1",null,(0,o.__)("Notifications","texty")),n.createElement("p",null,(0,o.__)("Enable or disable notification based on different events.","texty")),n.createElement("form",{onSubmit:function(e){e.preventDefault();var t={};Object.keys(h.notifications).forEach((function(e){t.hasOwnProperty(e)||(t[e]={});var a=h.notifications[e];t[e]={enabled:a.enabled,message:a.message,recipients:a.recipients,route:a.route}})),c(!0),i()({path:"/texty/v1/notifications",method:"POST",data:t}).then((function(e){c(!1),l.Am.success((0,o.__)("Changes have been saved","texty"))})).catch((function(e){c(!1),console.log(e),l.Am.error(e.message)}))}},Object.keys(h.groups).map((function(e){var t=h.groups[e],a=t.title,r=t.available;return n.createElement(f.ZP,{key:e},n.createElement(m.ZP,{className:u()({inactive:!r})},a,!r&&n.createElement("span",{class:"sub-heading"},(0,o.__)("Plugin not installed","texty"))),r&&n.createElement(y.ZP,{className:"has-panel"},n.createElement(p.Z,null,Object.keys(h.notifications).map((function(t){var a=h.notifications[t];return e===a.group&&n.createElement(v.Z,{key:t,title:a.title,roles:h.roles,keyName:a.id,settings:a,setOption:L})})))))})),n.createElement("div",{className:"submit-area"},n.createElement(b.Z,{type:"submit",isPrimary:!0,isBusy:s,className:"large"},s?(0,o.__)("Saving...","texty"):(0,o.__)("Save Changes","texty")))))}e=a.hmd(e),(r="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.enterModule:void 0)&&r(e),("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default.signature:function(e){return e})(L,"useState{[isLoading, setIsLoading](true)}\nuseState{[isSaving, setIsSaving](false)}\nuseState{[settings, setSettings]({})}\nuseEffect{}");var H=L;const G=H;var w,j;(w="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default:void 0)&&(w.register(L,"Notifications","/Users/asad/Desktop/release-20241008/texty/src/pages/Notifications.js"),w.register(H,"default","/Users/asad/Desktop/release-20241008/texty/src/pages/Notifications.js")),(j="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.leaveModule:void 0)&&j(e)},2700:(e,t,a)=>{a.d(t,{Z:()=>O});var r,n=a(7294),o=a(4635),l=a(1865),s=a.n(l),i=a(4410),c=a(3818),u=a(4746),d=a(6887),f=a(9586),m=a(9545),y=a(9676),p=a(4184),b=a.n(p),v=a(1231),g=a(7555),h=a.n(g),E=a(8359);function S(e){return S="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},S(e)}function x(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function _(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?x(Object(a),!0).forEach((function(t){L(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):x(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}function L(e,t,a){return(t=function(e){var t=function(e,t){if("object"!==S(e)||null===e)return e;var a=e[Symbol.toPrimitive];if(void 0!==a){var r=a.call(e,"string");if("object"!==S(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===S(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function H(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var a=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var r,n,o,l,s=[],i=!0,c=!1;try{if(o=(a=a.call(e)).next,0===t){if(Object(a)!==a)return;i=!1}else for(;!(i=(r=o.call(a)).done)&&(s.push(r.value),s.length!==t);i=!0);}catch(e){c=!0,n=e}finally{try{if(!i&&null!=a.return&&(l=a.return(),Object(l)!==l))return}finally{if(c)throw n}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return G(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(e):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?G(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function G(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,r=new Array(t);a<t;a++)r[a]=e[a];return r}function w(){var e=H((0,n.useState)(!0),2),t=e[0],a=e[1],r=H((0,n.useState)(!1),2),l=r[0],p=r[1],g=H((0,n.useState)({}),2),S=g[0],x=g[1];(0,n.useEffect)((function(){a(!0),s()({path:"/texty/v1/settings?context=edit"}).then((function(e){x(e),a(!1)}))}),[]);var G=function(e,t,a){x(_(_({},S),{},L({},e,_(_({},S[e]),{},L({},t,_(_({},S[e][t]),{},L({},"value",a)))))))};if(t)return n.createElement(i.Z,null);var w=Object.keys(S.gateways);return n.createElement("div",{className:"texty-settings"},n.createElement("h1",null,(0,o.__)("Settings","texty")),n.createElement("form",{onSubmit:function(e){e.preventDefault();var t={gateway:S.gateway};Object.keys(S.gateways).forEach((function(e){Object.keys(S[e]).forEach((function(a){t.hasOwnProperty(e)||(t[e]={}),t[e][a]=S[e][a].value}))})),p(!0),s()({path:"/texty/v1/settings",method:"POST",data:t}).then((function(e){p(!1),v.Am.success((0,o.__)("Changes have been saved","texty"))})).catch((function(e){p(!1),console.log(e),v.Am.error(e.message)}))},className:"texty-settings__form"},n.createElement(c.ZP,null,n.createElement(u.ZP,null,(0,o.__)("SMS Gateway","texty")),n.createElement(d.ZP,null,n.createElement("fieldset",{disabled:l},n.createElement("div",{className:"settings-row"},n.createElement("div",{className:"settings-row__label"},n.createElement("label",null,(0,o.__)("Gateways","texty"))),n.createElement("div",{className:"settings-row__field"},n.createElement("div",{className:"settings-row__gateways"},w.map((function(e){var t=S.gateways[e],a=t.name,r=t.logo;return n.createElement("div",{className:b()("gateway-card",{active:e===S.gateway}),key:"gateway-"+e,onClick:function(){return"gateway",t=e,void x(_(_({},S),{},L({},"gateway",t)));var t}},n.createElement(E.Z,null),n.createElement("div",{className:"gateway-card__logo"},n.createElement("img",{src:r,alt:a})),n.createElement("div",{className:"gateway-card__heading"},a))}))))),w.map((function(e){var t=S.gateways[e],a=t.name,r=t.description;return S.gateway===e&&n.createElement("div",{className:"settings-row settings-"+e,key:"settings-"+e},n.createElement("h3",null,a),n.createElement("p",null,n.createElement("span",{className:"help",dangerouslySetInnerHTML:{__html:r}})),Object.keys(S[e]).map((function(t){var a=S[e][t],r=a.name,o=a.type,l=a.value,s=a.help;return n.createElement(n.Fragment,{key:"field"+t},"from"===t&&n.createElement(f.Z,{label:r,help:s},n.createElement(h(),{country:"us",value:l,onChange:function(a){return G(e,t,a)}})),"from"!==t&&n.createElement(m.Z,{label:r,value:l,type:o,help:s,onChange:function(a){return G(e,t,a)}}))})))}))))),n.createElement("div",{className:"submit-area"},n.createElement(y.Z,{type:"submit",isPrimary:!0,isBusy:l,className:"large"},l?(0,o.__)("Saving...","texty"):(0,o.__)("Save Changes","texty")))))}e=a.hmd(e),(r="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.enterModule:void 0)&&r(e),("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default.signature:function(e){return e})(w,"useState{[isLoading, setIsLoading](true)}\nuseState{[isSaving, setIsSaving](false)}\nuseState{[settings, setSettings]({})}\nuseEffect{}");var j=w;const O=j;var N,k;(N="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default:void 0)&&(N.register(w,"Settings","/Users/asad/Desktop/release-20241008/texty/src/pages/Settings.js"),N.register(j,"default","/Users/asad/Desktop/release-20241008/texty/src/pages/Settings.js")),(k="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.leaveModule:void 0)&&k(e)},4469:(e,t,a)=>{a.d(t,{Z:()=>y});var r,n=a(7294),o=a(4635),l=a(3818),s=a(4746),i=a(6887),c=a(6992),u=a(2797),d=a(9653);function f(){return n.createElement("div",{className:"texty-tools"},n.createElement("h1",null,(0,o.__)("Tools","texty")),n.createElement(c.Z,null),n.createElement("div",{className:"texty-two-col"},n.createElement("div",{className:"texty-col"},n.createElement(l.ZP,{className:"mt-4"},n.createElement(s.ZP,null,(0,o.__)("Test Message","texty")),n.createElement(i.ZP,null,n.createElement(d.Z,null)))),n.createElement("div",{className:"texty-col"},n.createElement(l.ZP,{className:"mt-4"},n.createElement(s.ZP,null,(0,o.__)("Quick Send","texty")),n.createElement(i.ZP,null,n.createElement(u.Z,null))))))}e=a.hmd(e),(r="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.enterModule:void 0)&&r(e),"undefined"!=typeof reactHotLoaderGlobal&&reactHotLoaderGlobal.default.signature;var m=f;const y=m;var p,b;(p="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default:void 0)&&(p.register(f,"Tools","/Users/asad/Desktop/release-20241008/texty/src/pages/Tools.js"),p.register(m,"default","/Users/asad/Desktop/release-20241008/texty/src/pages/Tools.js")),(b="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.leaveModule:void 0)&&b(e)},788:(e,t,a)=>{var r;function n(e){var t=jQuery,a=t("#toplevel_page_"+e),r=window.location.href,n=r.substr(r.indexOf("admin.php"));a.on("click","a",(function(){var e=t(this);t("ul.wp-submenu li",a).removeClass("current"),e.hasClass("wp-has-submenu")?t("li.wp-first-item",a).addClass("current"):e.parents("li").addClass("current")})),t("ul.wp-submenu a",a).each((function(e,a){t(a).attr("href")!==n||t(a).parent().addClass("current")}))}a.d(t,{Z:()=>l}),e=a.hmd(e),(r="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.enterModule:void 0)&&r(e),"undefined"!=typeof reactHotLoaderGlobal&&reactHotLoaderGlobal.default.signature;var o=n;const l=o;var s,i;(s="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default:void 0)&&(s.register(n,"menuFix","/Users/asad/Desktop/release-20241008/texty/src/utils/admin-menu-fix.js"),s.register(o,"default","/Users/asad/Desktop/release-20241008/texty/src/utils/admin-menu-fix.js")),(i="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.leaveModule:void 0)&&i(e)},1865:e=>{e.exports=wp.apiFetch},4635:e=>{e.exports=wp.i18n}},e=>{e.O(0,[216],(()=>(5579,e(e.s=5579)))),e.O()}]);1 "use strict";(self.webpackChunktexty=self.webpackChunktexty||[]).push([[143],{8187:(e,t,n)=>{n.d(t,{Z:()=>p});var a,r=n(1570),o=n(7294),l=n(3727),s=n(6550),i=n(1231),c=n(8602),u=n(7046),d=n(2700),f=n(4469);function m(){return o.createElement(l.UT,null,o.createElement(i.Ix,{position:"top-right",autoClose:5e3,hideProgressBar:!1,newestOnTop:!0,closeOnClick:!0,rtl:!1,pauseOnFocusLoss:!1,draggable:!0,pauseOnHover:!0}),o.createElement(c.Z,null),o.createElement("div",{className:"wrap texty"},o.createElement("div",{className:"texty-container"},o.createElement(s.rs,null,o.createElement(s.AW,{path:"/notifications",component:u.Z}),o.createElement(s.AW,{path:"/tools",component:f.Z}),o.createElement(s.AW,{path:"/",exact:!0,component:d.Z})))))}e=n.hmd(e),(a="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.enterModule:void 0)&&a(e),"undefined"!=typeof reactHotLoaderGlobal&&reactHotLoaderGlobal.default.signature;var y=(0,r.w)(m);const p=y;var b,v;(b="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default:void 0)&&(b.register(m,"App","/Users/kzaman/Herd/dokan/wp-content/plugins/texty/src/App.js"),b.register(y,"default","/Users/kzaman/Herd/dokan/wp-content/plugins/texty/src/App.js")),(v="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.leaveModule:void 0)&&v(e)},8359:(e,t,n)=>{n.d(t,{Z:()=>s});var a,r=n(7294);function o(){return r.createElement("svg",{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",stroke:"currentColor",viewBox:"0 0 24 24",className:"active-icon"},r.createElement("path",{d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"}))}e=n.hmd(e),(a="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.enterModule:void 0)&&a(e),"undefined"!=typeof reactHotLoaderGlobal&&reactHotLoaderGlobal.default.signature;var l=o;const s=l;var i,c;(i="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default:void 0)&&(i.register(o,"ActiveIcon","/Users/kzaman/Herd/dokan/wp-content/plugins/texty/src/components/ActiveIcon.js"),i.register(l,"default","/Users/kzaman/Herd/dokan/wp-content/plugins/texty/src/components/ActiveIcon.js")),(c="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.leaveModule:void 0)&&c(e)},8602:(e,t,n)=>{n.d(t,{Z:()=>c});var a,r=n(7294),o=n(4635),l=n(3727);function s(){return r.createElement("div",{className:"texty-header-wrap"},r.createElement("div",{className:"texty-container"},r.createElement("div",{className:"texty-header"},r.createElement("div",{className:"texty-admin-header__logo"},r.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 97 28",width:"97",height:"28"},r.createElement("g",{fill:"none",fillRule:"nonzero"},r.createElement("path",{fill:"#FF0F45",d:"M15.617 0c.893 0 1.766.084 2.613.244a7.954 7.954 0 00-1.633 4.087 9.766 9.766 0 00-.98-.05c-5.36 0-9.706 4.346-9.706 9.706 0 2.262.774 4.4 2.17 6.117l.933 1.148-1.433 2.44h8.036c5.36 0 9.705-4.345 9.705-9.705 0-.3-.013-.597-.04-.89a7.948 7.948 0 004.102-1.594c.145.806.22 1.636.22 2.484 0 7.725-6.262 13.988-13.987 13.988H0l3.862-6.405-.018-.028a13.934 13.934 0 01-2.214-7.555C1.63 6.262 7.892 0 15.617 0zm8.932 0a5.138 5.138 0 110 10.276A5.138 5.138 0 0124.55 0z"}),r.createElement("path",{fill:"#000",d:"M87.482 7.8l2.65 8.9 2.636-8.9h4.087l-5.734 16.53-.317.755-.039.084c-.856 1.813-2.25 2.72-4.18 2.72a5.977 5.977 0 01-1.687-.252v-2.896l.58.013h.09c.676-.01 1.184-.12 1.525-.33.356-.221.635-.587.837-1.098l.449-1.177-4.997-14.35h4.1zm-43.91-3.518V7.8h2.44v2.803h-2.44v7.142l.001.071c.009.492.11.847.303 1.066.202.23.589.344 1.16.344.422 0 .795-.03 1.12-.093v2.897l-.14.041a7.825 7.825 0 01-2.167.302c-2.671 0-4.033-1.353-4.086-4.06v-7.71H37.68V7.8h2.083V4.282h3.81zm9.894 3.253c1.95 0 3.486.617 4.607 1.852 1.1 1.211 1.66 2.92 1.68 5.127v1.683h-9.082l.013.093c.135.892.502 1.61 1.1 2.156.62.564 1.405.846 2.354.846 1.437 0 2.567-.511 3.389-1.534l.052-.066 1.871 2.103-.061.086c-.565.77-1.318 1.374-2.259 1.811-.975.454-2.056.681-3.243.681-2.091 0-3.794-.643-5.108-1.93-1.29-1.265-1.947-2.941-1.97-5.03v-.628c.018-1.38.295-2.617.83-3.712.554-1.133 1.338-2.006 2.353-2.619 1.015-.612 2.173-.919 3.474-.919zm26.533-3.253V7.8h2.44v2.803h-2.44v7.142l.001.071c.009.492.11.847.303 1.066.202.23.589.344 1.16.344.422 0 .795-.03 1.12-.093v2.897l-.14.041a7.825 7.825 0 01-2.167.302c-2.671 0-4.034-1.353-4.086-4.06v-7.71h-2.083V7.8h2.083V4.282H80zM64.541 7.8l2.347 4.271 2.4-4.271h4.072l-4.06 7.009 4.232 7.3h-4.087l-2.544-4.497-2.531 4.497h-4.1l4.232-7.3-4.047-7.01h4.086zm-11.089 2.83c-.755 0-1.368.255-1.839.767-.454.494-.75 1.193-.888 2.097l-.015.098h5.3v-.304l-.003-.087c-.03-.804-.258-1.43-.683-1.877-.44-.463-1.063-.694-1.872-.694z"})))),r.createElement("div",{className:"texty-admin-header__menu"},r.createElement(l.OL,{to:"/",exact:!0,className:"header-link",title:(0,o.__)("Gateway Settings","texty")},r.createElement("span",{className:"dashicons dashicons-admin-settings"}),r.createElement("span",{className:"title"},(0,o.__)("Gateway Settings","texty"))),r.createElement(l.OL,{to:"/notifications",className:"header-link",title:(0,o.__)("Notifications","texty")},r.createElement("span",{className:"dashicons dashicons-admin-plugins"}),r.createElement("span",{className:"title"},(0,o.__)("Notifications","texty"))),r.createElement(l.OL,{to:"/tools",className:"header-link",title:(0,o.__)("Tools","texty")},r.createElement("span",{className:"dashicons dashicons-admin-tools"}),r.createElement("span",{className:"title"},(0,o.__)("Tools","texty")))))))}e=n.hmd(e),(a="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.enterModule:void 0)&&a(e),"undefined"!=typeof reactHotLoaderGlobal&&reactHotLoaderGlobal.default.signature;var i=s;const c=i;var u,d;(u="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default:void 0)&&(u.register(s,"Header","/Users/kzaman/Herd/dokan/wp-content/plugins/texty/src/components/Header.js"),u.register(i,"default","/Users/kzaman/Herd/dokan/wp-content/plugins/texty/src/components/Header.js")),(d="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.leaveModule:void 0)&&d(e)},9931:(e,t,n)=>{n.d(t,{Z:()=>p});var a,r=n(7294),o=n(4635),l=n(4184),s=n.n(l),i=n(5373),c=n(6117),u=n(9586),d=n(3412),f=n(211);function m(e){var t=e.title,n=e.description,a=e.keyName,l=e.roles,m=e.settings,y=e.setOption,p=m.replacements.map((function(e){return"<code>{".concat(e,"}</code>")})).join(", ");return r.createElement(i.Z,{initialOpen:!1,title:r.createElement(r.Fragment,null,r.createElement("span",null,t),r.createElement("span",{className:s()("label",{active:!0===m.enabled})},m.enabled?(0,o.__)("active","texty"):(0,o.__)("inactive","texty")))},r.createElement(c.Z,{label:(0,o.__)("Enable","texty"),help:n,checked:m.enabled,onChange:function(e){return y(a,"enabled",e)}}),"role"===m.type&&r.createElement(u.Z,{label:(0,o.__)("Recipients"),help:"role"===m.type?(0,o.__)("Select one or multiple user roles. Users with phone number in their profile will receive the text","texty"):""},r.createElement(f.ZP,{required:!0,isMulti:"role"===m.type,value:l.filter((function(e){return m.recipients.includes(e.value)})),options:l,onChange:function(e){y(a,"recipients",null!==e?e.map((function(e){return e.value})):[])}})),r.createElement(d.Z,{label:(0,o.__)("Message","texty"),className:"monospace",required:!0,help:r.createElement("span",{className:"help",dangerouslySetInnerHTML:{__html:(0,o.__)("You may use these variables: ","texty")+p}}),value:m.message,onChange:function(e){return y(a,"message",e)}}))}e=n.hmd(e),(a="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.enterModule:void 0)&&a(e),"undefined"!=typeof reactHotLoaderGlobal&&reactHotLoaderGlobal.default.signature;var y=m;const p=y;var b,v;(b="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default:void 0)&&(b.register(m,"NotificationItem","/Users/kzaman/Herd/dokan/wp-content/plugins/texty/src/components/NotificationItem.js"),b.register(y,"default","/Users/kzaman/Herd/dokan/wp-content/plugins/texty/src/components/NotificationItem.js")),(v="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.leaveModule:void 0)&&v(e)},2797:(e,t,n)=>{n.d(t,{Z:()=>b});var a,r=n(7294),o=n(4635),l=n(1865),s=n.n(l),i=n(9545),c=n(3412),u=n(9676),d=n(1231);function f(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var a,r,o,l,s=[],i=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;i=!1}else for(;!(i=(a=o.call(n)).done)&&(s.push(a.value),s.length!==t);i=!0);}catch(e){c=!0,r=e}finally{try{if(!i&&null!=n.return&&(l=n.return(),Object(l)!==l))return}finally{if(c)throw r}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return m(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?m(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}function y(){var e=f((0,r.useState)(!1),2),t=e[0],n=e[1],a=f((0,r.useState)(""),2),l=a[0],m=a[1],y=f((0,r.useState)(""),2),p=y[0],b=y[1];return r.createElement("form",{onSubmit:function(e){e.preventDefault(),n(!0),s()({path:"/texty/v1/send",method:"POST",data:{to:l,message:p}}).then((function(e){n(!1),e.success?d.Am.success((0,o.__)("Message has been sent.","texty")):d.Am.error((0,o.__)("Error, message could not be sent.","texty")+" "+e.message)})).catch((function(e){n(!1),console.log(e)}))},className:"texty-settings__form"},r.createElement("fieldset",{disabled:t},r.createElement(i.Z,{label:(0,o.__)("Phone Number","texty"),placeholder:"+123456789",type:"tel",value:l,onChange:function(e){return m(e)},required:!0}),r.createElement(c.Z,{label:(0,o.__)("Message","texty"),value:p,placeholder:(0,o.__)("Write your message...","texty"),onChange:function(e){return b(e)},required:!0})),r.createElement("div",{className:"submit-area"},r.createElement(u.Z,{type:"submit",isPrimary:!0,isBusy:t},t?(0,o.__)("Sending...","texty"):(0,o.__)("Send Message","texty"))))}e=n.hmd(e),(a="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.enterModule:void 0)&&a(e),("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default.signature:function(e){return e})(y,"useState{[isSending, setIsSending](false)}\nuseState{[phoneNumber, setPhoneNumber]('')}\nuseState{[message, setMessage]('')}");var p=y;const b=p;var v,g;(v="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default:void 0)&&(v.register(y,"QuickSend","/Users/kzaman/Herd/dokan/wp-content/plugins/texty/src/components/QuickSend.js"),v.register(p,"default","/Users/kzaman/Herd/dokan/wp-content/plugins/texty/src/components/QuickSend.js")),(g="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.leaveModule:void 0)&&g(e)},6992:(e,t,n)=>{n.d(t,{Z:()=>p});var a,r=n(7294),o=n(4635),l=n(1865),s=n.n(l),i=n(1264),c=n(4410),u=n(7347);function d(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var a,r,o,l,s=[],i=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;i=!1}else for(;!(i=(a=o.call(n)).done)&&(s.push(a.value),s.length!==t);i=!0);}catch(e){c=!0,r=e}finally{try{if(!i&&null!=n.return&&(l=n.return(),Object(l)!==l))return}finally{if(c)throw r}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return f(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?f(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}function m(){var e=d((0,r.useState)(!1),2),t=e[0],n=e[1],a=d((0,r.useState)(!0),2),l=a[0],f=a[1];return(0,r.useEffect)((function(){f(!0),s()({path:"/texty/v1/status"}).then((function(e){f(!1),n(e.success)}))}),[]),l?r.createElement(i.Z,null,r.createElement(c.Z,null)):r.createElement(i.Z,{status:t?"success":"error",isDismissible:!1},r.createElement(u.Z,{icon:t?"yes-alt":"dismiss"}),r.createElement("span",null,t?(0,o.__)("Connected","texty"):(0,o.__)("Not connected","texty")))}e=n.hmd(e),(a="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.enterModule:void 0)&&a(e),("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default.signature:function(e){return e})(m,"useState{[isConnected, setIsConnected](false)}\nuseState{[isFetching, setIsFetching](true)}\nuseEffect{}");var y=m;const p=y;var b,v;(b="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default:void 0)&&(b.register(m,"Status","/Users/kzaman/Herd/dokan/wp-content/plugins/texty/src/components/Status.js"),b.register(y,"default","/Users/kzaman/Herd/dokan/wp-content/plugins/texty/src/components/Status.js")),(v="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.leaveModule:void 0)&&v(e)},9653:(e,t,n)=>{n.d(t,{Z:()=>p});var a,r=n(7294),o=n(4635),l=n(1865),s=n.n(l),i=n(9545),c=n(9676),u=n(1231);function d(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var a,r,o,l,s=[],i=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;i=!1}else for(;!(i=(a=o.call(n)).done)&&(s.push(a.value),s.length!==t);i=!0);}catch(e){c=!0,r=e}finally{try{if(!i&&null!=n.return&&(l=n.return(),Object(l)!==l))return}finally{if(c)throw r}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return f(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?f(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}function m(){var e=d((0,r.useState)(!1),2),t=e[0],n=e[1],a=d((0,r.useState)(""),2),l=a[0],f=a[1];return r.createElement("form",{onSubmit:function(e){e.preventDefault(),n(!0),s()({path:"/texty/v1/tools/test",method:"POST",data:{to:l}}).then((function(e){n(!1),e.success?u.Am.success((0,o.__)("Message has been sent.","texty")):u.Am.error((0,o.__)("Error, message could not be sent.","texty")+" "+e.message)})).catch((function(e){n(!1),console.log(e)}))},className:"texty-settings__form"},r.createElement("fieldset",{disabled:t},r.createElement(i.Z,{label:(0,o.__)("Test Number","texty"),placeholder:"+123456789",type:"tel",value:l,onChange:function(e){return f(e)},help:(0,o.__)("Enter a phone number to test the SMS sending.","texty"),required:!0})),r.createElement("div",{className:"submit-area"},r.createElement(c.Z,{type:"submit",isPrimary:!0,isBusy:t},t?(0,o.__)("Sending...","texty"):(0,o.__)("Send Test","texty"))))}e=n.hmd(e),(a="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.enterModule:void 0)&&a(e),("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default.signature:function(e){return e})(m,"useState{[isSending, setIsSending](false)}\nuseState{[phoneNumber, setPhoneNumber]('')}");var y=m;const p=y;var b,v;(b="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default:void 0)&&(b.register(m,"TestMessage","/Users/kzaman/Herd/dokan/wp-content/plugins/texty/src/components/TestMessage.js"),b.register(y,"default","/Users/kzaman/Herd/dokan/wp-content/plugins/texty/src/components/TestMessage.js")),(v="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.leaveModule:void 0)&&v(e)},5579:(e,t,n)=>{var a,r=n(7294),o=n(9060),l=n(788),s=n(8187);n(4061),e=n.hmd(e),(a="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.enterModule:void 0)&&a(e),"undefined"!=typeof reactHotLoaderGlobal&&reactHotLoaderGlobal.default.signature;var i,c,u=document.getElementById("texty-app");o.render(r.createElement(s.Z,null),u),(0,l.Z)("texty"),(i="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default:void 0)&&i.register(u,"mountNode","/Users/kzaman/Herd/dokan/wp-content/plugins/texty/src/index.js"),(c="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.leaveModule:void 0)&&c(e)},7046:(e,t,n)=>{n.d(t,{Z:()=>L});var a,r=n(7294),o=n(4635),l=n(1231),s=n(1865),i=n.n(s),c=n(4184),u=n.n(c),d=n(4410),f=n(3818),m=n(4746),y=n(6887),p=n(3033),b=n(9676),v=n(9931);function g(e){return g="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},g(e)}function h(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function E(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?h(Object(n),!0).forEach((function(t){H(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function H(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==g(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var a=n.call(e,"string");if("object"!==g(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===g(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function S(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var a,r,o,l,s=[],i=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;i=!1}else for(;!(i=(a=o.call(n)).done)&&(s.push(a.value),s.length!==t);i=!0);}catch(e){c=!0,r=e}finally{try{if(!i&&null!=n.return&&(l=n.return(),Object(l)!==l))return}finally{if(c)throw r}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return x(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?x(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function x(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}function _(){var e=S((0,r.useState)(!0),2),t=e[0],n=e[1],a=S((0,r.useState)(!1),2),s=a[0],c=a[1],g=S((0,r.useState)({}),2),h=g[0],x=g[1];(0,r.useEffect)((function(){n(!0),i()({path:"/texty/v1/notifications?context=edit"}).then((function(e){x(e),n(!1)}))}),[]);var _=function(e,t,n){x(E(E({},h),{},H({},"notifications",E(E({},h.notifications),{},H({},e,E(E({},h.notifications[e]),{},H({},t,n)))))))};return t?r.createElement(d.Z,null):r.createElement("div",{className:"texty-notifications"},r.createElement("h1",null,(0,o.__)("Notifications","texty")),r.createElement("p",null,(0,o.__)("Enable or disable notification based on different events.","texty")),r.createElement("form",{onSubmit:function(e){e.preventDefault();var t={};Object.keys(h.notifications).forEach((function(e){t.hasOwnProperty(e)||(t[e]={});var n=h.notifications[e];t[e]={enabled:n.enabled,message:n.message,recipients:n.recipients,route:n.route}})),c(!0),i()({path:"/texty/v1/notifications",method:"POST",data:t}).then((function(e){c(!1),l.Am.success((0,o.__)("Changes have been saved","texty"))})).catch((function(e){c(!1),console.log(e),l.Am.error(e.message)}))}},Object.keys(h.groups).map((function(e){var t=h.groups[e],n=t.title,a=t.available;return r.createElement(f.ZP,{key:e},r.createElement(m.ZP,{className:u()({inactive:!a})},n,!a&&r.createElement("span",{class:"sub-heading"},(0,o.__)("Plugin not installed","texty"))),a&&r.createElement(y.ZP,{className:"has-panel"},r.createElement(p.Z,null,Object.keys(h.notifications).map((function(t){var n=h.notifications[t];return e===n.group&&r.createElement(v.Z,{key:t,title:n.title,roles:h.roles,keyName:n.id,settings:n,setOption:_})})))))})),r.createElement("div",{className:"submit-area"},r.createElement(b.Z,{type:"submit",isPrimary:!0,isBusy:s,className:"large"},s?(0,o.__)("Saving...","texty"):(0,o.__)("Save Changes","texty")))))}e=n.hmd(e),(a="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.enterModule:void 0)&&a(e),("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default.signature:function(e){return e})(_,"useState{[isLoading, setIsLoading](true)}\nuseState{[isSaving, setIsSaving](false)}\nuseState{[settings, setSettings]({})}\nuseEffect{}");var w=_;const L=w;var G,j;(G="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default:void 0)&&(G.register(_,"Notifications","/Users/kzaman/Herd/dokan/wp-content/plugins/texty/src/pages/Notifications.js"),G.register(w,"default","/Users/kzaman/Herd/dokan/wp-content/plugins/texty/src/pages/Notifications.js")),(j="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.leaveModule:void 0)&&j(e)},2700:(e,t,n)=>{n.d(t,{Z:()=>O});var a,r=n(7294),o=n(4635),l=n(1865),s=n.n(l),i=n(4410),c=n(3818),u=n(4746),d=n(6887),f=n(9586),m=n(9545),y=n(9676),p=n(4184),b=n.n(p),v=n(1231),g=n(7555),h=n.n(g),E=n(8359);function H(e){return H="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},H(e)}function S(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function x(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?S(Object(n),!0).forEach((function(t){_(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):S(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function _(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==H(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var a=n.call(e,"string");if("object"!==H(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===H(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function w(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var a,r,o,l,s=[],i=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;i=!1}else for(;!(i=(a=o.call(n)).done)&&(s.push(a.value),s.length!==t);i=!0);}catch(e){c=!0,r=e}finally{try{if(!i&&null!=n.return&&(l=n.return(),Object(l)!==l))return}finally{if(c)throw r}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return L(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?L(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function L(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}function G(){var e=w((0,r.useState)(!0),2),t=e[0],n=e[1],a=w((0,r.useState)(!1),2),l=a[0],p=a[1],g=w((0,r.useState)({}),2),H=g[0],S=g[1];(0,r.useEffect)((function(){n(!0),s()({path:"/texty/v1/settings?context=edit"}).then((function(e){S(e),n(!1)}))}),[]);var L=function(e,t,n){S(x(x({},H),{},_({},e,x(x({},H[e]),{},_({},t,x(x({},H[e][t]),{},_({},"value",n)))))))};if(t)return r.createElement(i.Z,null);var G=Object.keys(H.gateways);return r.createElement("div",{className:"texty-settings"},r.createElement("h1",null,(0,o.__)("Settings","texty")),r.createElement("form",{onSubmit:function(e){e.preventDefault();var t={gateway:H.gateway};Object.keys(H.gateways).forEach((function(e){Object.keys(H[e]).forEach((function(n){t.hasOwnProperty(e)||(t[e]={}),t[e][n]=H[e][n].value}))})),p(!0),s()({path:"/texty/v1/settings",method:"POST",data:t}).then((function(e){p(!1),v.Am.success((0,o.__)("Changes have been saved","texty"))})).catch((function(e){p(!1),console.log(e),v.Am.error(e.message)}))},className:"texty-settings__form"},r.createElement(c.ZP,null,r.createElement(u.ZP,null,(0,o.__)("SMS Gateway","texty")),r.createElement(d.ZP,null,r.createElement("fieldset",{disabled:l},r.createElement("div",{className:"settings-row"},r.createElement("div",{className:"settings-row__label"},r.createElement("label",null,(0,o.__)("Gateways","texty"))),r.createElement("div",{className:"settings-row__field"},r.createElement("div",{className:"settings-row__gateways"},G.map((function(e){var t=H.gateways[e],n=t.name,a=t.logo;return r.createElement("div",{className:b()("gateway-card",{active:e===H.gateway}),key:"gateway-"+e,onClick:function(){return"gateway",t=e,void S(x(x({},H),{},_({},"gateway",t)));var t}},r.createElement(E.Z,null),r.createElement("div",{className:"gateway-card__logo"},r.createElement("img",{src:a,alt:n})),r.createElement("div",{className:"gateway-card__heading"},n))}))))),G.map((function(e){var t=H.gateways[e],n=t.name,a=t.description;return H.gateway===e&&r.createElement("div",{className:"settings-row settings-"+e,key:"settings-"+e},r.createElement("h3",null,n),r.createElement("p",null,r.createElement("span",{className:"help",dangerouslySetInnerHTML:{__html:a}})),Object.keys(H[e]).map((function(t){var n=H[e][t],a=n.name,o=n.type,l=n.value,s=n.help;return r.createElement(r.Fragment,{key:"field"+t},"from"===t&&r.createElement(f.Z,{label:a,help:s},r.createElement(h(),{country:"us",value:l,onChange:function(n){return L(e,t,n)}})),"from"!==t&&r.createElement(m.Z,{label:a,value:l,type:o,help:s,onChange:function(n){return L(e,t,n)}}))})))}))))),r.createElement("div",{className:"submit-area"},r.createElement(y.Z,{type:"submit",isPrimary:!0,isBusy:l,className:"large"},l?(0,o.__)("Saving...","texty"):(0,o.__)("Save Changes","texty")))))}e=n.hmd(e),(a="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.enterModule:void 0)&&a(e),("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default.signature:function(e){return e})(G,"useState{[isLoading, setIsLoading](true)}\nuseState{[isSaving, setIsSaving](false)}\nuseState{[settings, setSettings]({})}\nuseEffect{}");var j=G;const O=j;var k,N;(k="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default:void 0)&&(k.register(G,"Settings","/Users/kzaman/Herd/dokan/wp-content/plugins/texty/src/pages/Settings.js"),k.register(j,"default","/Users/kzaman/Herd/dokan/wp-content/plugins/texty/src/pages/Settings.js")),(N="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.leaveModule:void 0)&&N(e)},4469:(e,t,n)=>{n.d(t,{Z:()=>y});var a,r=n(7294),o=n(4635),l=n(3818),s=n(4746),i=n(6887),c=n(6992),u=n(2797),d=n(9653);function f(){return r.createElement("div",{className:"texty-tools"},r.createElement("h1",null,(0,o.__)("Tools","texty")),r.createElement(c.Z,null),r.createElement("div",{className:"texty-two-col"},r.createElement("div",{className:"texty-col"},r.createElement(l.ZP,{className:"mt-4"},r.createElement(s.ZP,null,(0,o.__)("Test Message","texty")),r.createElement(i.ZP,null,r.createElement(d.Z,null)))),r.createElement("div",{className:"texty-col"},r.createElement(l.ZP,{className:"mt-4"},r.createElement(s.ZP,null,(0,o.__)("Quick Send","texty")),r.createElement(i.ZP,null,r.createElement(u.Z,null))))))}e=n.hmd(e),(a="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.enterModule:void 0)&&a(e),"undefined"!=typeof reactHotLoaderGlobal&&reactHotLoaderGlobal.default.signature;var m=f;const y=m;var p,b;(p="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default:void 0)&&(p.register(f,"Tools","/Users/kzaman/Herd/dokan/wp-content/plugins/texty/src/pages/Tools.js"),p.register(m,"default","/Users/kzaman/Herd/dokan/wp-content/plugins/texty/src/pages/Tools.js")),(b="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.leaveModule:void 0)&&b(e)},788:(e,t,n)=>{var a;function r(e){var t=jQuery,n=t("#toplevel_page_"+e),a=window.location.href,r=a.substr(a.indexOf("admin.php"));n.on("click","a",(function(){var e=t(this);t("ul.wp-submenu li",n).removeClass("current"),e.hasClass("wp-has-submenu")?t("li.wp-first-item",n).addClass("current"):e.parents("li").addClass("current")})),t("ul.wp-submenu a",n).each((function(e,n){t(n).attr("href")!==r||t(n).parent().addClass("current")}))}n.d(t,{Z:()=>l}),e=n.hmd(e),(a="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.enterModule:void 0)&&a(e),"undefined"!=typeof reactHotLoaderGlobal&&reactHotLoaderGlobal.default.signature;var o=r;const l=o;var s,i;(s="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default:void 0)&&(s.register(r,"menuFix","/Users/kzaman/Herd/dokan/wp-content/plugins/texty/src/utils/admin-menu-fix.js"),s.register(o,"default","/Users/kzaman/Herd/dokan/wp-content/plugins/texty/src/utils/admin-menu-fix.js")),(i="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.leaveModule:void 0)&&i(e)},1865:e=>{e.exports=wp.apiFetch},4635:e=>{e.exports=wp.i18n}},e=>{e.O(0,[216],(()=>(5579,e(e.s=5579)))),e.O()}]); -
texty/trunk/includes/Integrations/Dokan.php
r2591483 r3452714 41 41 case 'completed': 42 42 $this->send( 'order_dokan_complete', $order, $vendor_id ); 43 break; 44 45 case 'cancelled': 46 $this->send( 'order_dokan_cancelled', $order, $vendor_id ); 47 break; 48 49 case 'failed': 50 $this->send( 'order_dokan_failed', $order, $vendor_id ); 51 break; 52 53 case 'refunded': 54 $this->send( 'order_dokan_refunded', $order, $vendor_id ); 43 55 break; 44 56 -
texty/trunk/includes/Integrations/WooCommerce.php
r2458183 r3452714 46 46 break; 47 47 48 case 'cancelled': 49 $this->send( 'order_admin_cancelled', $order ); 50 $this->send( 'order_customer_cancelled', $order ); 51 break; 52 53 case 'failed': 54 $this->send( 'order_admin_failed', $order ); 55 $this->send( 'order_customer_failed', $order ); 56 break; 57 58 case 'refunded': 59 $this->send( 'order_admin_refunded', $order ); 60 $this->send( 'order_customer_refunded', $order ); 61 break; 62 48 63 default: 49 64 // code... -
texty/trunk/includes/Notifications.php
r2460864 r3452714 56 56 $notifications['order_admin_processing'] = __NAMESPACE__ . '\Notifications\WC\ProcessingAdmin'; 57 57 $notifications['order_admin_complete'] = __NAMESPACE__ . '\Notifications\WC\CompleteAdmin'; 58 $notifications['order_admin_cancelled'] = __NAMESPACE__ . '\Notifications\WC\CancelledAdmin'; 59 $notifications['order_admin_failed'] = __NAMESPACE__ . '\Notifications\WC\FailedAdmin'; 60 $notifications['order_admin_refunded'] = __NAMESPACE__ . '\Notifications\WC\RefundedAdmin'; 58 61 59 62 // WC Customers … … 61 64 $notifications['order_customer_processing'] = __NAMESPACE__ . '\Notifications\WC\ProcessingCustomer'; 62 65 $notifications['order_customer_complete'] = __NAMESPACE__ . '\Notifications\WC\CompleteCustomer'; 66 $notifications['order_customer_cancelled'] = __NAMESPACE__ . '\Notifications\WC\CancelledCustomer'; 67 $notifications['order_customer_failed'] = __NAMESPACE__ . '\Notifications\WC\FailedCustomer'; 68 $notifications['order_customer_refunded'] = __NAMESPACE__ . '\Notifications\WC\RefundedCustomer'; 63 69 } 64 70 … … 66 72 $notifications['order_dokan_processing'] = __NAMESPACE__ . '\Notifications\Dokan\ProcessingVendor'; 67 73 $notifications['order_dokan_complete'] = __NAMESPACE__ . '\Notifications\Dokan\CompleteVendor'; 74 $notifications['order_dokan_cancelled'] = __NAMESPACE__ . '\Notifications\Dokan\CancelledVendor'; 75 $notifications['order_dokan_failed'] = __NAMESPACE__ . '\Notifications\Dokan\FailedVendor'; 76 $notifications['order_dokan_refunded'] = __NAMESPACE__ . '\Notifications\Dokan\RefundedVendor'; 68 77 } 69 78 -
texty/trunk/languages/texty.json
r2736472 r3452714 126 126 "" 127 127 ], 128 "Vendor - When Order Status is Cancelled": [ 129 null, 130 "" 131 ], 128 132 "Vendor - When Order Status is Complete": [ 129 133 null, 130 134 "" 131 135 ], 136 "Vendor - When Order Status is Failed": [ 137 null, 138 "" 139 ], 132 140 "Vendor - When Order Status is Processing": [ 133 141 null, 134 142 "" 135 143 ], 144 "Vendor - When Order Status is Refunded": [ 145 null, 146 "" 147 ], 148 "Admin - When Order Status is Cancelled": [ 149 null, 150 "" 151 ], 152 "Customer - When Order Status is Cancelled": [ 153 null, 154 "" 155 ], 136 156 "Admin - When Order Status is Complete": [ 137 157 null, … … 142 162 "" 143 163 ], 164 "Admin - When Order Status is Failed": [ 165 null, 166 "" 167 ], 168 "Customer - When Order Status is Failed": [ 169 null, 170 "" 171 ], 144 172 "Customer - When Order Status is On Hold": [ 145 173 null, … … 151 179 ], 152 180 "Customer - When Order Status is Processing": [ 181 null, 182 "" 183 ], 184 "Admin - When Order Status is Refunded": [ 185 null, 186 "" 187 ], 188 "Customer - When Order Status is Refunded": [ 153 189 null, 154 190 "" -
texty/trunk/languages/texty.pot
r3165401 r3452714 1 # Copyright (c) 202 4weDevs Pte. Ltd. All Rights Reserved.1 # Copyright (c) 2026 weDevs Pte. Ltd. All Rights Reserved. 2 2 msgid "" 3 3 msgstr "" 4 "Project-Id-Version: Texty 1.1. 4\n"4 "Project-Id-Version: Texty 1.1.5\n" 5 5 "Report-Msgid-Bugs-To: https://github.com/weDevsOfficial/texty/issues\n" 6 6 "Last-Translator: [email protected]\n" … … 9 9 "Content-Type: text/plain; charset=UTF-8\n" 10 10 "Content-Transfer-Encoding: 8bit\n" 11 "POT-Creation-Date: 202 4-10-08T10:12:25+00:00\n"11 "POT-Creation-Date: 2026-02-03T07:07:31+00:00\n" 12 12 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 13 "X-Generator: WP-CLI 2. 8.1\n"13 "X-Generator: WP-CLI 2.11.0\n" 14 14 "X-Domain: texty\n" 15 15 16 16 #. Plugin Name of the plugin 17 #: texty.php 17 18 #: includes/Admin/Menu.php:26 18 19 #: includes/Admin/Menu.php:27 … … 21 22 22 23 #. Plugin URI of the plugin 24 #: texty.php 23 25 msgid "https://wordpress.org/plugins/texty/" 24 26 msgstr "" 25 27 26 28 #. Description of the plugin 29 #: texty.php 27 30 msgid "SMS Notification for WordPress" 28 31 msgstr "" 29 32 30 33 #. Author of the plugin 34 #: texty.php 31 35 msgid "weDevs" 32 36 msgstr "" 33 37 34 38 #. Author URI of the plugin 39 #: texty.php 35 40 msgid "https://wptexty.com/" 36 41 msgstr "" … … 133 138 msgstr "" 134 139 135 #: includes/Notifications.php: 83140 #: includes/Notifications.php:92 136 141 msgid "WordPress" 137 142 msgstr "" 138 143 139 #: includes/Notifications.php: 88144 #: includes/Notifications.php:97 140 145 msgid "WooCommerce" 141 146 msgstr "" 142 147 143 #: includes/Notifications.php: 93148 #: includes/Notifications.php:102 144 149 msgid "Dokan" 150 msgstr "" 151 152 #: includes/Notifications/Dokan/CancelledVendor.php:11 153 msgid "Vendor - When Order Status is Cancelled" 145 154 msgstr "" 146 155 … … 149 158 msgstr "" 150 159 160 #: includes/Notifications/Dokan/FailedVendor.php:11 161 msgid "Vendor - When Order Status is Failed" 162 msgstr "" 163 151 164 #: includes/Notifications/Dokan/ProcessingVendor.php:11 152 165 msgid "Vendor - When Order Status is Processing" 153 166 msgstr "" 154 167 168 #: includes/Notifications/Dokan/RefundedVendor.php:11 169 msgid "Vendor - When Order Status is Refunded" 170 msgstr "" 171 172 #: includes/Notifications/WC/CancelledAdmin.php:11 173 msgid "Admin - When Order Status is Cancelled" 174 msgstr "" 175 176 #: includes/Notifications/WC/CancelledCustomer.php:11 177 msgid "Customer - When Order Status is Cancelled" 178 msgstr "" 179 155 180 #: includes/Notifications/WC/CompleteAdmin.php:11 156 181 msgid "Admin - When Order Status is Complete" … … 161 186 msgstr "" 162 187 188 #: includes/Notifications/WC/FailedAdmin.php:11 189 msgid "Admin - When Order Status is Failed" 190 msgstr "" 191 192 #: includes/Notifications/WC/FailedCustomer.php:11 193 msgid "Customer - When Order Status is Failed" 194 msgstr "" 195 163 196 #: includes/Notifications/WC/HoldCustomer.php:11 164 197 msgid "Customer - When Order Status is On Hold" … … 171 204 #: includes/Notifications/WC/ProcessingCustomer.php:11 172 205 msgid "Customer - When Order Status is Processing" 206 msgstr "" 207 208 #: includes/Notifications/WC/RefundedAdmin.php:11 209 msgid "Admin - When Order Status is Refunded" 210 msgstr "" 211 212 #: includes/Notifications/WC/RefundedCustomer.php:11 213 msgid "Customer - When Order Status is Refunded" 173 214 msgstr "" 174 215 -
texty/trunk/readme.txt
r3169056 r3452714 3 3 Donate link: https://tareq.co/donate/ 4 4 Tags: sms, text, notification, twilio, nexmo, vonage, clickatell, plivo, dokan, woocommerce 5 Requires at least: 5.46 Tested up to: 6. 6.27 Stable tag: 1.1.48 Requires PHP: 7.3 5 Requires at least: 6.8 6 Tested up to: 6.9 7 Requires PHP: 7.4 8 Stable tag: 1.1.5 9 9 License: GPLv2 or later 10 10 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 18 18 With so many emails coming to your inbox, often it becomes overwhelming to get top of things that you feel most important. A text notification on your phone, WhatsApp, or Telegram may be more desired. 19 19 20 👉[Docs](https://github.com/weDevsOfficial/texty/wiki)20 👉 [Docs](https://github.com/weDevsOfficial/texty/wiki) 21 21 22 22 ### How does it work? … … 104 104 == Changelog == 105 105 106 = v1.1.5 (3 Feb, 2026) = 107 - **New:** Added notifications for Woocommerce order statuses: cancelled, failed, and refunded 108 - **New:** Added notifications for Dokan Vendor order statuses: cancelled, failed, and refunded 109 - **Update:** Appsero updated for WordPress 6.8 compatibility 110 - **Update:** Mozart is integrated with the plugin 111 - **Update:** WordPress 6.9 compatibility added 112 106 113 = v1.1.4 (8 Oct, 2024) = 107 114 - **update:** WordPress 6.6.2 compatibility … … 125 132 - **New:** Added Plivo gateway. 126 133 - **New:** Added Clickatell gateway. 127 - **New:** Added Dokan integration. Now vendors will receive SMS notifications when they receive an order (processing and compl eted status).134 - **New:** Added Dokan integration. Now vendors will receive SMS notifications when they receive an order (processing and complted status). 128 135 - **New:** Added `{items}` shortcode for WooCommerce orders which displays the product with quantity. 129 136 -
texty/trunk/texty.php
r3165401 r3452714 6 6 * Author: weDevs 7 7 * Author URI: https://wptexty.com/ 8 * Version: 1.1. 48 * Version: 1.1.5 9 9 * License: GPL2 or later 10 10 * License URI: https://www.gnu.org/licenses/gpl-2.0.html 11 11 * Text Domain: texty 12 * Requires at least: 6.8 13 * Requires PHP: 7.4 12 14 */ 13 15 defined( 'ABSPATH' ) || exit; … … 25 27 * @var string 26 28 */ 27 private $version = '1.1. 4';29 private $version = '1.1.5'; 28 30 29 31 /** … … 145 147 */ 146 148 public function appsero_init() { 147 $client = new Appsero\Client( 'd4c17b0f-8f01-4b95-a8de-42b0641eec9a', 'Texty', __FILE__ );149 $client = new Texty\Dependencies\Appsero\Client( 'd4c17b0f-8f01-4b95-a8de-42b0641eec9a', 'Texty', __FILE__ ); 148 150 149 151 // Active insights -
texty/trunk/vendor/appsero/client/.github/workflows/wpcs.yml
r2987176 r3452714 7 7 runs-on: ubuntu-latest 8 8 steps: 9 - uses: actions/checkout@v 29 - uses: actions/checkout@v3 10 10 11 11 - name: Setup PHP … … 18 18 - name: Get Composer cache directory 19 19 id: composer-cache 20 run: echo " ::set-output name=dir::$(composer config cache-files-dir)"20 run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT 21 21 22 22 - name: Setup cache 23 uses: pat-s/always-upload-cache@v 1.1.423 uses: pat-s/always-upload-cache@v3.0.11 24 24 with: 25 25 path: ${{ steps.composer-cache.outputs.dir }} … … 33 33 run: | 34 34 URL="https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/files" 35 FILES=$(curl -s -X GET -G $URL | jq -r '.[] | .filename' | xargs) 36 echo "::set-output name=files::$FILES" 35 FILES=$(curl -s -X GET -G $URL | jq -r '.[] | select (.status!="removed") | .filename | select ( endswith(".php") )' | xargs) 36 echo "files=$FILES" >> $GITHUB_OUTPUT 37 37 38 - name: Detect coding standard violations 38 39 run: vendor/bin/phpcs ${{ steps.changes.outputs.files }} -q --report=checkstyle | cs2pr --graceful-warnings -
texty/trunk/vendor/appsero/client/readme.md
r2987176 r3452714 1 1 # AppSero Client 2 ### Version 1.2.52 ### Version 2.0.2 3 3 4 4 - [Installation](#installation) … … 78 78 // Active insights 79 79 $client->insights()->init(); 80 81 // Active automatic updater82 $client->updater();83 80 84 81 // Active license page and checker … … 99 96 > For plugins example code that needs to be used on your main plugin file. 100 97 > For themes example code that needs to be used on your themes `functions.php` file. 98 99 ## Using the Updater (to manage Pro plugin updates) 100 > By default the Appsero client doesn't include Updater functionalities in this client. If you want to manage updates for your premium plugins, please include [the Updater](https://github.com/Appsero/updater) separately inside your product 101 101 102 102 103 ## More Usage -
texty/trunk/vendor/appsero/client/src/Client.php
r2987176 r3452714 15 15 * @var string 16 16 */ 17 public $version = ' 1.2.5';17 public $version = '2.0.4'; 18 18 19 19 /** … … 85 85 */ 86 86 private $insights; 87 88 /**89 * The Object of Updater Class90 *91 * @var object92 */93 private $updater;94 87 95 88 /** … … 138 131 * Initialize plugin/theme updater 139 132 * 140 * @return Appsero\Updater133 * @return void 141 134 */ 142 135 public function updater() { 143 if ( ! class_exists( __NAMESPACE__ . '\Updater' ) ) {144 require_once __DIR__ . '/Updater.php';145 }146 147 // if already instantiated, return the cached one 148 if ( $this->updater ) {149 return $this->updater;150 } 151 152 $this->updater = new Updater( $this );153 154 return $this->updater;136 // do not show update notice on ajax request and rest api request 137 if ( wp_doing_ajax() || ( defined( 'REST_REQUEST' ) && REST_REQUEST ) ) { 138 return; 139 } 140 141 // show deprecated notice 142 _deprecated_function( __CLASS__ . '::updater', '2.0', '\Appsero\Updater::init($client);, for more details please visit: https://appsero.com/docs/appsero-developers-guide/appsero-client/appsero-sdk-updater-changes/' ); 143 144 // initialize the new updater 145 if ( method_exists( '\Appsero\Updater', 'init' ) ) { 146 \Appsero\Updater::init( $this ); 147 } 155 148 } 156 149 … … 199 192 require_once ABSPATH . 'wp-admin/includes/plugin.php'; 200 193 201 $plugin_data = get_plugin_data( $this->file );194 $plugin_data = get_plugin_data( $this->file, false, false ); 202 195 203 196 $this->project_version = $plugin_data['Version']; -
texty/trunk/vendor/appsero/client/src/Insights.php
r2987176 r3452714 10 10 * and admin email. 11 11 */ 12 class Insights 13 { 12 class Insights { 14 13 15 14 /** … … 21 20 22 21 /** 23 * Whe ather tothe notice or not22 * Whether to show the notice or not 24 23 * 25 24 * @var bool … … 32 31 * @var array 33 32 */ 34 protected $extra_data = [];33 protected $extra_data = array(); 35 34 36 35 /** … … 42 41 43 42 /** 43 * Whether to include plugin data 44 * 44 45 * @var bool 45 46 */ … … 49 50 * Initialize the class 50 51 * 51 * @param null $name52 * @param null $file53 * /54 public function __construct($client, $name = null, $file = null)55 {56 if ( is_string($client) && !empty($name) && !empty($file)) {57 $client = new Client( $client, $name, $file);58 } 59 60 if ( is_object($client) && is_a($client, 'Appsero\Client')) {52 * @param mixed $client Client object or string. 53 * @param string $name Name of the plugin/theme. 54 * @param string $file Main plugin file path. 55 */ 56 public function __construct( $client, $name = null, $file = null ) { 57 if ( is_string( $client ) && ! empty( $name ) && ! empty( $file ) ) { 58 $client = new Client( $client, $name, $file ); 59 } 60 61 if ( is_object( $client ) && is_a( $client, 'Appsero\Client' ) ) { 61 62 $this->client = $client; 62 63 } … … 66 67 * Don't show the notice 67 68 * 68 * @return \self 69 */ 70 public function hide_notice() 71 { 69 * @return self 70 */ 71 public function hide_notice() { 72 72 $this->show_notice = false; 73 73 … … 78 78 * Add plugin data if needed 79 79 * 80 * @return \self 81 */ 82 public function add_plugin_data() 83 { 80 * @return self 81 */ 82 public function add_plugin_data() { 84 83 $this->plugin_data = true; 85 84 … … 90 89 * Add extra data if needed 91 90 * 92 * @param array $data 93 * 94 * @return \self 95 */ 96 public function add_extra($data = []) 97 { 91 * @param array $data Extra data. 92 * 93 * @return self 94 */ 95 public function add_extra( $data = array() ) { 98 96 $this->extra_data = $data; 99 97 … … 104 102 * Set custom notice text 105 103 * 106 * @param string $text 107 * 108 * @return \self 109 */ 110 public function notice($text = '') 111 { 104 * @param string $text Custom notice text. 105 * 106 * @return self 107 */ 108 public function notice( $text = '' ) { 112 109 $this->notice = $text; 113 110 … … 120 117 * @return void 121 118 */ 122 public function init() 123 { 124 if ($this->client->type === 'plugin') { 119 public function init() { 120 if ( 'plugin' === $this->client->type ) { 125 121 $this->init_plugin(); 126 } elseif ( $this->client->type === 'theme') {122 } elseif ( 'theme' === $this->client->type ) { 127 123 $this->init_theme(); 128 124 } … … 134 130 * @return void 135 131 */ 136 public function init_theme() 137 { 132 public function init_theme() { 138 133 $this->init_common(); 139 134 140 add_action( 'switch_theme', [$this, 'deactivation_cleanup']);141 add_action( 'switch_theme', [$this, 'theme_deactivated'], 12, 3);135 add_action( 'switch_theme', array( $this, 'deactivation_cleanup' ) ); 136 add_action( 'switch_theme', array( $this, 'theme_deactivated' ), 12, 3 ); 142 137 } 143 138 … … 147 142 * @return void 148 143 */ 149 public function init_plugin() 150 { 151 // plugin deactivate popup 152 // if ( ! $this->is_local_server() ) { 153 // add_filter( 'plugin_action_links_' . $this->client->basename, [ $this, 'plugin_action_links' ] ); 154 // add_action( 'admin_footer', [ $this, 'deactivate_scripts' ] ); 155 // } 156 157 add_filter('plugin_action_links_' . $this->client->basename, [$this, 'plugin_action_links']); 158 add_action('admin_footer', [$this, 'deactivate_scripts']); 144 public function init_plugin() { 145 add_filter( 'plugin_action_links_' . $this->client->basename, array( $this, 'plugin_action_links' ) ); 146 add_action( 'admin_footer', array( $this, 'deactivate_scripts' ) ); 159 147 160 148 $this->init_common(); 161 149 162 register_activation_hook( $this->client->file, [$this, 'activate_plugin']);163 register_deactivation_hook( $this->client->file, [$this, 'deactivation_cleanup']);150 register_activation_hook( $this->client->file, array( $this, 'activate_plugin' ) ); 151 register_deactivation_hook( $this->client->file, array( $this, 'deactivation_cleanup' ) ); 164 152 } 165 153 … … 169 157 * @return void 170 158 */ 171 protected function init_common() 172 { 173 if ($this->show_notice) { 174 // tracking notice 175 add_action('admin_notices', [$this, 'admin_notice']); 176 } 177 178 add_action('admin_init', [$this, 'handle_optin_optout']); 179 180 // uninstall reason 181 add_action('wp_ajax_' . $this->client->slug . '_submit-uninstall-reason', [$this, 'uninstall_reason_submission']); 182 183 // cron events 184 add_filter('cron_schedules', [$this, 'add_weekly_schedule']); 185 add_action($this->client->slug . '_tracker_send_event', [$this, 'send_tracking_data']); 186 // add_action( 'admin_init', array( $this, 'send_tracking_data' ) ); // test 159 protected function init_common() { 160 if ( $this->show_notice ) { 161 add_action( 'admin_notices', array( $this, 'admin_notice' ) ); 162 } 163 164 add_action( 'admin_init', array( $this, 'handle_optin_optout' ) ); 165 166 add_action( 'wp_ajax_' . $this->client->slug . '_submit-uninstall-reason', array( $this, 'uninstall_reason_submission' ) ); 167 168 add_filter( 'cron_schedules', array( $this, 'add_weekly_schedule' ) ); 169 add_action( $this->client->slug . '_tracker_send_event', array( $this, 'send_tracking_data' ) ); 187 170 } 188 171 … … 190 173 * Send tracking data to AppSero server 191 174 * 192 * @param bool $override 193 * 194 * @return void 195 */ 196 public function send_tracking_data($override = false) 197 { 198 if (!$this->tracking_allowed() && !$override) { 175 * @param bool $override Whether to override the tracking allowed check. 176 * 177 * @return void 178 */ 179 public function send_tracking_data( $override = false ) { 180 if ( ! $this->tracking_allowed() && ! $override ) { 199 181 return; 200 182 } 201 183 202 // Send a maximum of once per week 184 // Send a maximum of once per week. 203 185 $last_send = $this->get_last_send(); 204 186 205 if ( $last_send && $last_send > strtotime('-1 week')) {187 if ( $last_send && $last_send > strtotime( '-1 week' ) ) { 206 188 return; 207 189 } … … 209 191 $tracking_data = $this->get_tracking_data(); 210 192 211 $response = $this->client->send_request( $tracking_data, 'track');212 213 update_option( $this->client->slug . '_tracking_last_send', time());193 $response = $this->client->send_request( $tracking_data, 'track' ); 194 195 update_option( $this->client->slug . '_tracking_last_send', time() ); 214 196 } 215 197 … … 219 201 * @return array 220 202 */ 221 protected function get_tracking_data() 222 { 203 protected function get_tracking_data() { 223 204 $all_plugins = $this->get_all_plugins(); 224 205 225 206 $users = get_users( 226 [207 array( 227 208 'role' => 'administrator', 228 209 'orderby' => 'ID', … … 230 211 'number' => 1, 231 212 'paged' => 1, 232 ]213 ) 233 214 ); 234 215 235 $admin_user = ( is_array($users) && !empty($users)) ? $users[0] : false;216 $admin_user = ( is_array( $users ) && ! empty( $users ) ) ? $users[0] : false; 236 217 $first_name = ''; 237 218 $last_name = ''; 238 219 239 if ( $admin_user) {220 if ( $admin_user ) { 240 221 $first_name = $admin_user->first_name ? $admin_user->first_name : $admin_user->display_name; 241 222 $last_name = $admin_user->last_name; 242 223 } 243 224 244 $data = [245 'url' => esc_url( home_url()),225 $data = array( 226 'url' => esc_url( home_url() ), 246 227 'site' => $this->get_site_name(), 247 'admin_email' => get_option( 'admin_email'),228 'admin_email' => get_option( 'admin_email' ), 248 229 'first_name' => $first_name, 249 230 'last_name' => $last_name, … … 252 233 'wp' => $this->get_wp_info(), 253 234 'users' => $this->get_user_counts(), 254 'active_plugins' => count( $all_plugins['active_plugins']),255 'inactive_plugins' => count( $all_plugins['inactive_plugins']),235 'active_plugins' => count( $all_plugins['active_plugins'] ), 236 'inactive_plugins' => count( $all_plugins['inactive_plugins'] ), 256 237 'ip_address' => $this->get_user_ip_address(), 257 238 'project_version' => $this->client->project_version, 258 239 'tracking_skipped' => false, 259 240 'is_local' => $this->is_local_server(), 260 ];261 262 // Add Plugins 263 if ( $this->plugin_data) {264 $plugins_data = [];265 266 foreach ( $all_plugins['active_plugins'] as $slug => $plugin) {267 $slug = strstr( $slug, '/', true);268 269 if ( !$slug) {241 ); 242 243 // Add Plugins. 244 if ( $this->plugin_data ) { 245 $plugins_data = array(); 246 247 foreach ( $all_plugins['active_plugins'] as $slug => $plugin ) { 248 $slug = strstr( $slug, '/', true ); 249 250 if ( ! $slug ) { 270 251 continue; 271 252 } 272 253 273 $plugins_data[ $slug] = [274 'name' => isset($plugin['name']) ? $plugin['name'] : '',275 'version' => isset($plugin['version']) ? $plugin['version'] : '',276 ];277 } 278 279 if ( array_key_exists($this->client->slug, $plugins_data)) {280 unset( $plugins_data[$this->client->slug]);254 $plugins_data[ $slug ] = array( 255 'name' => isset( $plugin['name'] ) ? $plugin['name'] : '', 256 'version' => isset( $plugin['version'] ) ? $plugin['version'] : '', 257 ); 258 } 259 260 if ( array_key_exists( $this->client->slug, $plugins_data ) ) { 261 unset( $plugins_data[ $this->client->slug ] ); 281 262 } 282 263 … … 284 265 } 285 266 286 // Add Metadata 267 // Add Metadata. 287 268 $extra = $this->get_extra_data(); 288 269 289 if ( $extra) {270 if ( $extra ) { 290 271 $data['extra'] = $extra; 291 272 } 292 273 293 // Check this has previously skipped tracking294 $skipped = get_option( $this->client->slug . '_tracking_skipped');295 296 if ( $skipped === 'yes') {297 delete_option( $this->client->slug . '_tracking_skipped');274 // Check if tracking was previously skipped. 275 $skipped = get_option( $this->client->slug . '_tracking_skipped' ); 276 277 if ( 'yes' === $skipped ) { 278 delete_option( $this->client->slug . '_tracking_skipped' ); 298 279 299 280 $data['tracking_skipped'] = true; 300 281 } 301 282 302 return apply_filters( $this->client->slug . '_tracker_data', $data);283 return apply_filters( $this->client->slug . '_tracker_data', $data ); 303 284 } 304 285 … … 308 289 * @return mixed 309 290 */ 310 protected function get_extra_data() 311 { 312 if (is_callable($this->extra_data)) { 313 return call_user_func($this->extra_data); 314 } 315 316 if (is_array($this->extra_data)) { 291 protected function get_extra_data() { 292 if ( is_callable( $this->extra_data ) ) { 293 return call_user_func( $this->extra_data ); 294 } 295 296 if ( is_array( $this->extra_data ) ) { 317 297 return $this->extra_data; 318 298 } 319 299 320 return [];300 return array(); 321 301 } 322 302 … … 326 306 * @return array 327 307 */ 328 protected function data_we_collect() 329 { 330 $data = [ 308 protected function data_we_collect() { 309 $data = array( 331 310 'Server environment details (php, mysql, server, WordPress versions)', 332 311 'Number of users in your site', … … 335 314 'Site name and URL', 336 315 'Your name and email address', 337 ];338 339 if ( $this->plugin_data) {340 array_splice( $data, 4, 0, ["active plugins' name"]);316 ); 317 318 if ( $this->plugin_data ) { 319 array_splice( $data, 4, 0, array( "active plugins' name" ) ); 341 320 } 342 321 … … 349 328 * @return bool 350 329 */ 351 public function tracking_allowed() 352 { 353 $allow_tracking = get_option($this->client->slug . '_allow_tracking', 'no'); 354 355 return $allow_tracking === 'yes'; 330 public function tracking_allowed() { 331 $allow_tracking = get_option( $this->client->slug . '_allow_tracking', 'no' ); 332 333 return 'yes' === $allow_tracking; 356 334 } 357 335 … … 361 339 * @return false|string 362 340 */ 363 private function get_last_send() 364 { 365 return get_option($this->client->slug . '_tracking_last_send', false); 341 private function get_last_send() { 342 return get_option( $this->client->slug . '_tracking_last_send', false ); 366 343 } 367 344 … … 371 348 * @return bool 372 349 */ 373 public function notice_dismissed() 374 { 375 $hide_notice = get_option($this->client->slug . '_tracking_notice', null); 376 377 if ('hide' === $hide_notice) { 350 public function notice_dismissed() { 351 $hide_notice = get_option( $this->client->slug . '_tracking_notice', null ); 352 353 if ( 'hide' === $hide_notice ) { 378 354 return true; 379 355 } … … 387 363 * @return bool 388 364 */ 389 private function is_local_server() 390 { 391 $host = isset($_SERVER['HTTP_HOST']) ? sanitize_text_field(wp_unslash($_SERVER['HTTP_HOST'])) : 'localhost'; 392 $ip = isset($_SERVER['SERVER_ADDR']) ? sanitize_text_field(wp_unslash($_SERVER['SERVER_ADDR'])) : '127.0.0.1'; 393 $is_local = false; 365 private function is_local_server() { 366 $host = isset( $_SERVER['HTTP_HOST'] ) ? sanitize_text_field( wp_unslash( $_SERVER['HTTP_HOST'] ) ) : 'localhost'; 367 $ip = isset( $_SERVER['SERVER_ADDR'] ) ? sanitize_text_field( wp_unslash( $_SERVER['SERVER_ADDR'] ) ) : '127.0.0.1'; 368 $is_local = false; 394 369 395 370 if ( 396 in_array( $ip, ['127.0.0.1', '::1'], true)397 || !strpos($host, '.')398 || in_array(strrchr($host, '.'), ['.test', '.testing', '.local', '.localhost', '.localdomain'], true)371 in_array( $ip, array( '127.0.0.1', '::1' ), true ) || 372 ! strpos( $host, '.' ) || 373 in_array( strrchr( $host, '.' ), array( '.test', '.testing', '.local', '.localhost', '.localdomain' ), true ) 399 374 ) { 400 375 $is_local = true; 401 376 } 402 377 403 return apply_filters( 'appsero_is_local', $is_local);378 return apply_filters( 'appsero_is_local', $is_local ); 404 379 } 405 380 … … 409 384 * @return void 410 385 */ 411 private function schedule_event() 412 { 413 $hook_name = wp_unslash($this->client->slug . '_tracker_send_event'); 414 415 if (!wp_next_scheduled($hook_name)) { 416 wp_schedule_event(time(), 'weekly', $hook_name); 386 private function schedule_event() { 387 $hook_name = wp_unslash( $this->client->slug . '_tracker_send_event' ); 388 389 if ( ! wp_next_scheduled( $hook_name ) ) { 390 wp_schedule_event( time(), 'weekly', $hook_name ); 417 391 } 418 392 } … … 423 397 * @return void 424 398 */ 425 private function clear_schedule_event() 426 { 427 wp_clear_scheduled_hook($this->client->slug . '_tracker_send_event'); 399 private function clear_schedule_event() { 400 wp_clear_scheduled_hook( $this->client->slug . '_tracker_send_event' ); 428 401 } 429 402 … … 433 406 * @return void 434 407 */ 435 public function admin_notice() 436 { 437 if ($this->notice_dismissed()) { 408 public function admin_notice() { 409 if ( $this->notice_dismissed() ) { 438 410 return; 439 411 } 440 412 441 if ( $this->tracking_allowed()) {413 if ( $this->tracking_allowed() ) { 442 414 return; 443 415 } 444 416 445 if ( !current_user_can('manage_options')) {417 if ( ! current_user_can( 'manage_options' ) ) { 446 418 return; 447 419 } 448 420 449 // don't show tracking if a local server 450 // if ( $this->is_local_server() ) { 451 // return; 452 // } 453 454 $optin_url = wp_nonce_url(add_query_arg($this->client->slug . '_tracker_optin', 'true'), '_wpnonce'); 455 $optout_url = wp_nonce_url(add_query_arg($this->client->slug . '_tracker_optout', 'true'), '_wpnonce'); 456 457 if (empty($this->notice)) { 458 $notice = sprintf($this->client->__trans('Want to help make <strong>%1$s</strong> even more awesome? Allow %1$s to collect diagnostic data and usage information.'), $this->client->name); 421 $optin_url = wp_nonce_url( add_query_arg( $this->client->slug . '_tracker_optin', 'true' ), '_wpnonce' ); 422 $optout_url = wp_nonce_url( add_query_arg( $this->client->slug . '_tracker_optout', 'true' ), '_wpnonce' ); 423 424 if ( empty( $this->notice ) ) { 425 $notice = sprintf( 426 $this->client->__trans( 'Want to help make <strong>%1$s</strong> even more awesome? Allow %1$s to collect diagnostic data and usage information.' ), 427 $this->client->name 428 ); 459 429 } else { 460 430 $notice = $this->notice; … … 463 433 $policy_url = 'https://appsero.com/privacy-policy/'; 464 434 465 $notice .= ' (<a class="' . $this->client->slug . '-insights-data-we-collect" href="#">' . $this->client->__trans( 'what we collect') . '</a>)';466 $notice .= '<p class="description" style="display:none;">' . implode( ', ', $this->data_we_collect()) . '. ';467 $notice .= 'We are using Appsero to collect your data. <a href="' . $policy_url . '" target="_blank">Learn more</a> about how Appsero collects and handle your data.</p>';435 $notice .= ' (<a class="' . $this->client->slug . '-insights-data-we-collect" href="#">' . $this->client->__trans( 'what we collect' ) . '</a>)'; 436 $notice .= '<p class="description" style="display:none;">' . implode( ', ', $this->data_we_collect() ) . '. '; 437 $notice .= 'We are using Appsero to collect your data. <a href="' . $policy_url . '" target="_blank">Learn more</a> ↗</p>'; 468 438 469 439 echo '<div class="updated"><p>'; 470 echo $notice;440 echo wp_kses_post( $notice ); 471 441 echo '</p><p class="submit">'; 472 echo ' <a href="' . esc_url( $optin_url) . '" class="button-primary button-large">' . $this->client->__trans('Allow') . '</a>';473 echo ' <a href="' . esc_url( $optout_url) . '" class="button-secondary button-large">' . $this->client->__trans('No thanks') . '</a>';442 echo ' <a href="' . esc_url( $optin_url ) . '" class="button-primary button-large">' . esc_html( $this->client->__trans( 'Allow' ) ) . '</a>'; 443 echo ' <a href="' . esc_url( $optout_url ) . '" class="button-secondary button-large">' . esc_html( $this->client->__trans( 'No thanks' ) ) . '</a>'; 474 444 echo '</p></div>'; 475 445 476 echo "<script type='text/javascript'>jQuery('." . $this->client->slug. "-insights-data-we-collect').on('click', function(e) {446 echo "<script type='text/javascript'>jQuery('." . esc_js( $this->client->slug ) . "-insights-data-we-collect').on('click', function(e) { 477 447 e.preventDefault(); 478 448 jQuery(this).parents('.updated').find('p.description').slideToggle('fast'); 479 449 }); 480 </script> 481 "; 450 </script>"; 482 451 } 483 452 … … 487 456 * @return void 488 457 */ 489 public function handle_optin_optout() 490 { 491 if (!isset($_GET['_wpnonce'])) { 458 public function handle_optin_optout() { 459 if ( ! $this->is_valid_request() || ! $this->has_manage_options_capability() ) { 492 460 return; 493 461 } 494 462 495 if (!wp_verify_nonce(sanitize_key($_GET['_wpnonce']), '_wpnonce')) { 496 return; 497 } 498 499 if (isset($_GET[$this->client->slug . '_tracker_optin']) && $_GET[$this->client->slug . '_tracker_optin'] === 'true') { 463 if ( $this->is_optin_request() ) { 500 464 $this->optin(); 501 502 wp_safe_redirect(remove_query_arg($this->client->slug . '_tracker_optin')); 503 exit; 504 } 505 506 if (isset($_GET[$this->client->slug . '_tracker_optout']) && isset($_GET[$this->client->slug . '_tracker_optout']) && $_GET[$this->client->slug . '_tracker_optout'] === 'true') { 465 $this->handle_redirection( $this->client->slug . '_tracker_optin' ); 466 } 467 468 if ( $this->is_optout_request() ) { 507 469 $this->optout(); 508 509 wp_safe_redirect(remove_query_arg($this->client->slug . '_tracker_optout')); 510 exit; 511 } 470 $this->handle_redirection( $this->client->slug . '_tracker_optout' ); 471 } 472 } 473 474 /** 475 * Validate the request nonce. 476 * 477 * @return bool 478 */ 479 private function is_valid_request() { 480 return isset( $_GET['_wpnonce'] ) && wp_verify_nonce( sanitize_key( $_GET['_wpnonce'] ), '_wpnonce' ); 481 } 482 483 /** 484 * Check if the current user has manage options capability. 485 * 486 * @return bool 487 */ 488 private function has_manage_options_capability() { 489 return current_user_can( 'manage_options' ); 490 } 491 492 /** 493 * Check if the current request is for opt-in. 494 * 495 * @return bool 496 */ 497 private function is_optin_request() { 498 return isset( $_GET[ $this->client->slug . '_tracker_optin' ] ) && 'true' === $_GET[ $this->client->slug . '_tracker_optin' ]; 499 } 500 501 /** 502 * Check if the current request is for opt-out. 503 * 504 * @return bool 505 */ 506 private function is_optout_request() { 507 return isset( $_GET[ $this->client->slug . '_tracker_optout' ] ) && 'true' === $_GET[ $this->client->slug . '_tracker_optout' ]; 508 } 509 510 /** 511 * Handle redirection after opt-in/opt-out actions. 512 * 513 * @param string $param The query parameter to remove. 514 */ 515 private function handle_redirection( $param ) { 516 if ( $this->is_inaccessible_page() ) { 517 wp_safe_redirect( admin_url() ); 518 } else { 519 wp_safe_redirect( remove_query_arg( $param ) ); 520 } 521 exit; 522 } 523 524 /** 525 * Check if the current page is updater.php or similar inaccessible pages. 526 * 527 * @return bool 528 */ 529 private function is_inaccessible_page() { 530 $inaccessible_pages = array( 531 '/wp-admin/update.php', // Add similar inaccessible PHP files here 532 ); 533 534 // Sanitize and unslash the REQUEST_URI before using it 535 $request_uri = isset( $_SERVER['REQUEST_URI'] ) ? sanitize_text_field( wp_unslash( $_SERVER['REQUEST_URI'] ) ) : ''; 536 537 // Ensure REQUEST_URI is properly sanitized before use 538 $request_uri = esc_url_raw( $request_uri ); 539 540 foreach ( $inaccessible_pages as $page ) { 541 if ( false !== strpos( $request_uri, $page ) ) { 542 return true; 543 } 544 } 545 546 return false; 512 547 } 513 548 … … 517 552 * @return void 518 553 */ 519 public function optin() 520 { 521 update_option($this->client->slug . '_allow_tracking', 'yes'); 522 update_option($this->client->slug . '_tracking_notice', 'hide'); 554 public function optin() { 555 update_option( $this->client->slug . '_allow_tracking', 'yes' ); 556 update_option( $this->client->slug . '_tracking_notice', 'hide' ); 523 557 524 558 $this->clear_schedule_event(); … … 526 560 $this->send_tracking_data(); 527 561 528 /* 529 * Fires when the user has opted in tracking. 530 */ 531 do_action($this->client->slug . '_tracker_optin', $this->get_tracking_data()); 562 do_action( $this->client->slug . '_tracker_optin', $this->get_tracking_data() ); 532 563 } 533 564 … … 537 568 * @return void 538 569 */ 539 public function optout() 540 { 541 update_option($this->client->slug . '_allow_tracking', 'no'); 542 update_option($this->client->slug . '_tracking_notice', 'hide'); 570 public function optout() { 571 update_option( $this->client->slug . '_allow_tracking', 'no' ); 572 update_option( $this->client->slug . '_tracking_notice', 'hide' ); 543 573 544 574 $this->send_tracking_skipped_request(); … … 546 576 $this->clear_schedule_event(); 547 577 548 /* 549 * Fires when the user has opted out tracking. 550 */ 551 do_action($this->client->slug . '_tracker_optout'); 578 do_action( $this->client->slug . '_tracker_optout' ); 552 579 } 553 580 … … 555 582 * Get the number of post counts 556 583 * 557 * @param string $post_type 558 * 584 * @param string $post_type The post type to count. 559 585 * @return int 560 586 */ 561 public function get_post_count($post_type) 562 { 587 public function get_post_count( $post_type ) { 563 588 global $wpdb; 564 589 … … 566 591 $wpdb->prepare( 567 592 "SELECT count(ID) FROM $wpdb->posts WHERE post_type = %s and post_status = %s", 568 [$post_type, 'publish'] 593 $post_type, 594 'publish' 569 595 ) 570 596 ); … … 576 602 * @return array 577 603 */ 578 private static function get_server_info() 579 { 604 private static function get_server_info() { 580 605 global $wpdb; 581 606 582 $server_data = []; 583 584 if (isset($_SERVER['SERVER_SOFTWARE']) && !empty($_SERVER['SERVER_SOFTWARE'])) { 585 // phpcs:ignore 586 $server_data['software'] = $_SERVER['SERVER_SOFTWARE']; 587 } 588 589 if (function_exists('phpversion')) { 607 $server_data = array(); 608 609 if ( isset( $_SERVER['SERVER_SOFTWARE'] ) && ! empty( $_SERVER['SERVER_SOFTWARE'] ) ) { 610 $server_data['software'] = sanitize_text_field( wp_unslash( $_SERVER['SERVER_SOFTWARE'] ) ); 611 } 612 613 if ( function_exists( 'phpversion' ) ) { 590 614 $server_data['php_version'] = phpversion(); 591 615 } … … 593 617 $server_data['mysql_version'] = $wpdb->db_version(); 594 618 595 $server_data['php_max_upload_size'] = size_format( wp_max_upload_size());619 $server_data['php_max_upload_size'] = size_format( wp_max_upload_size() ); 596 620 $server_data['php_default_timezone'] = date_default_timezone_get(); 597 $server_data['php_soap'] = class_exists( 'SoapClient') ? 'Yes' : 'No';598 $server_data['php_fsockopen'] = function_exists( 'fsockopen') ? 'Yes' : 'No';599 $server_data['php_curl'] = function_exists( 'curl_init') ? 'Yes' : 'No';621 $server_data['php_soap'] = class_exists( 'SoapClient' ) ? 'Yes' : 'No'; 622 $server_data['php_fsockopen'] = function_exists( 'fsockopen' ) ? 'Yes' : 'No'; 623 $server_data['php_curl'] = function_exists( 'curl_init' ) ? 'Yes' : 'No'; 600 624 601 625 return $server_data; … … 607 631 * @return array 608 632 */ 609 private function get_wp_info() 610 { 611 $wp_data = []; 612 613 $wp_data['memory_limit'] = WP_MEMORY_LIMIT; 614 $wp_data['debug_mode'] = (defined('WP_DEBUG') && WP_DEBUG) ? 'Yes' : 'No'; 615 $wp_data['locale'] = get_locale(); 616 $wp_data['version'] = get_bloginfo('version'); 617 $wp_data['multisite'] = is_multisite() ? 'Yes' : 'No'; 618 $wp_data['theme_slug'] = get_stylesheet(); 619 620 $theme = wp_get_theme($wp_data['theme_slug']); 621 622 $wp_data['theme_name'] = $theme->get('Name'); 623 $wp_data['theme_version'] = $theme->get('Version'); 624 $wp_data['theme_uri'] = $theme->get('ThemeURI'); 625 $wp_data['theme_author'] = $theme->get('Author'); 633 private function get_wp_info() { 634 $wp_data = array( 635 'memory_limit' => WP_MEMORY_LIMIT, 636 'debug_mode' => ( defined( 'WP_DEBUG' ) && WP_DEBUG ) ? 'Yes' : 'No', 637 'locale' => get_locale(), 638 'version' => get_bloginfo( 'version' ), 639 'multisite' => is_multisite() ? 'Yes' : 'No', 640 'theme_slug' => get_stylesheet(), 641 ); 642 643 $theme = wp_get_theme( $wp_data['theme_slug'] ); 644 645 $wp_data['theme_name'] = $theme->get( 'Name' ); 646 $wp_data['theme_version'] = $theme->get( 'Version' ); 647 $wp_data['theme_uri'] = $theme->get( 'ThemeURI' ); 648 $wp_data['theme_author'] = $theme->get( 'Author' ); 626 649 627 650 return $wp_data; … … 633 656 * @return array 634 657 */ 635 private function get_all_plugins() 636 { 637 // Ensure get_plugins function is loaded 638 if (!function_exists('get_plugins')) { 658 private function get_all_plugins() { 659 if ( ! function_exists( 'get_plugins' ) ) { 639 660 include ABSPATH . '/wp-admin/includes/plugin.php'; 640 661 } 641 662 642 663 $plugins = get_plugins(); 643 $active_plugins_keys = get_option('active_plugins', []); 644 $active_plugins = []; 645 646 foreach ($plugins as $k => $v) { 647 // Take care of formatting the data how we want it. 648 $formatted = []; 649 $formatted['name'] = wp_strip_all_tags($v['Name']); 650 651 if (isset($v['Version'])) { 652 $formatted['version'] = wp_strip_all_tags($v['Version']); 653 } 654 655 if (isset($v['Author'])) { 656 $formatted['author'] = wp_strip_all_tags($v['Author']); 657 } 658 659 if (isset($v['Network'])) { 660 $formatted['network'] = wp_strip_all_tags($v['Network']); 661 } 662 663 if (isset($v['PluginURI'])) { 664 $formatted['plugin_uri'] = wp_strip_all_tags($v['PluginURI']); 665 } 666 667 if (in_array($k, $active_plugins_keys, true)) { 668 // Remove active plugins from list so we can show active and inactive separately 669 unset($plugins[$k]); 670 $active_plugins[$k] = $formatted; 664 $active_plugins_keys = get_option( 'active_plugins', array() ); 665 $active_plugins = array(); 666 667 foreach ( $plugins as $k => $v ) { 668 $formatted = array( 669 'name' => wp_strip_all_tags( $v['Name'] ), 670 'version' => wp_strip_all_tags( $v['Version'] ), 671 'author' => wp_strip_all_tags( $v['Author'] ), 672 ); 673 674 if ( isset( $v['Network'] ) ) { 675 $formatted['network'] = wp_strip_all_tags( $v['Network'] ); 676 } 677 678 if ( isset( $v['PluginURI'] ) ) { 679 $formatted['plugin_uri'] = wp_strip_all_tags( $v['PluginURI'] ); 680 } 681 682 if ( in_array( $k, $active_plugins_keys, true ) ) { 683 unset( $plugins[ $k ] ); 684 $active_plugins[ $k ] = $formatted; 671 685 } else { 672 $plugins[ $k] = $formatted;673 } 674 } 675 676 return [677 'active_plugins' => $active_plugins,678 'inactive_plugins' => $plugins,679 ];686 $plugins[ $k ] = $formatted; 687 } 688 } 689 690 return array( 691 'active_plugins' => $active_plugins, 692 'inactive_plugins' => $plugins, 693 ); 680 694 } 681 695 … … 685 699 * @return array 686 700 */ 687 public function get_user_counts() 688 { 689 $user_count = []; 701 public function get_user_counts() { 702 $user_count = array(); 690 703 $user_count_data = count_users(); 691 704 $user_count['total'] = $user_count_data['total_users']; 692 705 693 // Get user count based on user role 694 foreach ($user_count_data['avail_roles'] as $role => $count) { 695 if (!$count) { 706 foreach ( $user_count_data['avail_roles'] as $role => $count ) { 707 if ( ! $count ) { 696 708 continue; 697 709 } 698 699 $user_count[$role] = $count; 710 $user_count[ $role ] = $count; 700 711 } 701 712 … … 706 717 * Add weekly cron schedule 707 718 * 708 * @param array $schedules 709 * 719 * @param array $schedules Existing cron schedules. 710 720 * @return array 711 721 */ 712 public function add_weekly_schedule($schedules) 713 { 714 $schedules['weekly'] = [ 722 public function add_weekly_schedule( $schedules ) { 723 $schedules['weekly'] = array( 715 724 'interval' => DAY_IN_SECONDS * 7, 716 'display' => 'Once Weekly',717 ];725 'display' => __( 'Once Weekly', 'appsero' ), 726 ); 718 727 719 728 return $schedules; … … 725 734 * @return void 726 735 */ 727 public function activate_plugin() 728 { 729 $allowed = get_option($this->client->slug . '_allow_tracking', 'no'); 730 731 // if it wasn't allowed before, do nothing 732 if ('yes' !== $allowed) { 736 public function activate_plugin() { 737 $allowed = get_option( $this->client->slug . '_allow_tracking', 'no' ); 738 739 if ( 'yes' !== $allowed ) { 733 740 return; 734 741 } 735 742 736 // re-schedule and delete the last sent time so we could force send again737 743 $hook_name = $this->client->slug . '_tracker_send_event'; 738 744 739 if ( !wp_next_scheduled($hook_name)) {740 wp_schedule_event( time(), 'weekly', $hook_name);741 } 742 743 delete_option( $this->client->slug . '_tracking_last_send');744 745 $this->send_tracking_data( true);745 if ( ! wp_next_scheduled( $hook_name ) ) { 746 wp_schedule_event( time(), 'weekly', $hook_name ); 747 } 748 749 delete_option( $this->client->slug . '_tracking_last_send' ); 750 751 $this->send_tracking_data( true ); 746 752 } 747 753 … … 751 757 * @return void 752 758 */ 753 public function deactivation_cleanup() 754 { 759 public function deactivation_cleanup() { 755 760 $this->clear_schedule_event(); 756 761 757 if ( 'theme' === $this->client->type) {758 delete_option( $this->client->slug . '_tracking_last_send');759 delete_option( $this->client->slug . '_allow_tracking');760 } 761 762 delete_option( $this->client->slug . '_tracking_notice');762 if ( 'theme' === $this->client->type ) { 763 delete_option( $this->client->slug . '_tracking_last_send' ); 764 delete_option( $this->client->slug . '_allow_tracking' ); 765 } 766 767 delete_option( $this->client->slug . '_tracking_notice' ); 763 768 } 764 769 … … 770 775 * @return array 771 776 */ 772 public function plugin_action_links($links) 773 { 774 if (array_key_exists('deactivate', $links)) { 775 $links['deactivate'] = str_replace('<a', '<a class="' . $this->client->slug . '-deactivate-link"', $links['deactivate']); 777 public function plugin_action_links( $links ) { 778 if ( array_key_exists( 'deactivate', $links ) ) { 779 $links['deactivate'] = str_replace( '<a', '<a class="' . $this->client->slug . '-deactivate-link"', $links['deactivate'] ); 776 780 } 777 781 … … 784 788 * @return array 785 789 */ 786 private function get_uninstall_reasons() 787 { 790 private function get_uninstall_reasons() { 788 791 $reasons = [ 789 792 [ 790 793 'id' => 'could-not-understand', 791 'text' => $this->client->__trans( "Couldn't understand"),792 'placeholder' => $this->client->__trans( 'Would you like us to assist you?'),794 'text' => $this->client->__trans( "Couldn't understand" ), 795 'placeholder' => $this->client->__trans( 'Would you like us to assist you?' ), 793 796 'icon' => '<svg xmlns="http://www.w3.org/2000/svg" width="23" height="23" viewBox="0 0 23 23"><g fill="none"><g fill="#3B86FF"><path d="M11.5 0C17.9 0 23 5.1 23 11.5 23 17.9 17.9 23 11.5 23 10.6 23 9.6 22.9 8.8 22.7L8.8 22.6C9.3 22.5 9.7 22.3 10 21.9 10.3 21.6 10.4 21.3 10.4 20.9 10.8 21 11.1 21 11.5 21 16.7 21 21 16.7 21 11.5 21 6.3 16.7 2 11.5 2 6.3 2 2 6.3 2 11.5 2 13 2.3 14.3 2.9 15.6 2.7 16 2.4 16.3 2.2 16.8L2.1 17.1 2.1 17.3C2 17.5 2 17.7 2 18 0.7 16.1 0 13.9 0 11.5 0 5.1 5.1 0 11.5 0ZM6 13.6C6 13.7 6.1 13.8 6.1 13.9 6.3 14.5 6.2 15.7 6.1 16.4 6.1 16.6 6 16.9 6 17.1 6 17.1 6.1 17.1 6.1 17.1 7.1 16.9 8.2 16 9.3 15.5 9.8 15.2 10.4 15 10.9 15 11.2 15 11.4 15 11.6 15.2 11.9 15.4 12.1 16 11.6 16.4 11.5 16.5 11.3 16.6 11.1 16.7 10.5 17 9.9 17.4 9.3 17.7 9 17.9 9 18.1 9.1 18.5 9.2 18.9 9.3 19.4 9.3 19.8 9.4 20.3 9.3 20.8 9 21.2 8.8 21.5 8.5 21.6 8.1 21.7 7.9 21.8 7.6 21.9 7.3 21.9L6.5 22C6.3 22 6 21.9 5.8 21.9 5 21.8 4.4 21.5 3.9 20.9 3.3 20.4 3.1 19.6 3 18.8L3 18.5C3 18.2 3 17.9 3.1 17.7L3.1 17.6C3.2 17.1 3.5 16.7 3.7 16.3 4 15.9 4.2 15.4 4.3 15 4.4 14.6 4.4 14.5 4.6 14.2 4.6 13.9 4.7 13.7 4.9 13.6 5.2 13.2 5.7 13.2 6 13.6ZM11.7 11.2C13.1 11.2 14.3 11.7 15.2 12.9 15.3 13 15.4 13.1 15.4 13.2 15.4 13.4 15.3 13.8 15.2 13.8 15 13.9 14.9 13.8 14.8 13.7 14.6 13.5 14.4 13.2 14.1 13.1 13.5 12.6 12.8 12.3 12 12.2 10.7 12.1 9.5 12.3 8.4 12.8 8.3 12.8 8.2 12.8 8.1 12.8 7.9 12.8 7.8 12.4 7.8 12.2 7.7 12.1 7.8 11.9 8 11.8 8.4 11.7 8.8 11.5 9.2 11.4 10 11.2 10.9 11.1 11.7 11.2ZM16.3 5.9C17.3 5.9 18 6.6 18 7.6 18 8.5 17.3 9.3 16.3 9.3 15.4 9.3 14.7 8.5 14.7 7.6 14.7 6.6 15.4 5.9 16.3 5.9ZM8.3 5C9.2 5 9.9 5.8 9.9 6.7 9.9 7.7 9.2 8.4 8.2 8.4 7.3 8.4 6.6 7.7 6.6 6.7 6.6 5.8 7.3 5 8.3 5Z"/></g></g></svg>', 794 797 ], 795 798 [ 796 799 'id' => 'found-better-plugin', 797 'text' => $this->client->__trans( 'Found a better plugin'),798 'placeholder' => $this->client->__trans( 'Which plugin?'),800 'text' => $this->client->__trans( 'Found a better plugin' ), 801 'placeholder' => $this->client->__trans( 'Which plugin?' ), 799 802 'icon' => '<svg xmlns="http://www.w3.org/2000/svg" width="23" height="23" viewBox="0 0 23 23"><g fill="none"><g fill="#3B86FF"><path d="M17.1 14L22.4 19.3C23.2 20.2 23.2 21.5 22.4 22.4 21.5 23.2 20.2 23.2 19.3 22.4L19.3 22.4 14 17.1C15.3 16.3 16.3 15.3 17.1 14L17.1 14ZM8.6 0C13.4 0 17.3 3.9 17.3 8.6 17.3 13.4 13.4 17.2 8.6 17.2 3.9 17.2 0 13.4 0 8.6 0 3.9 3.9 0 8.6 0ZM8.6 2.2C5.1 2.2 2.2 5.1 2.2 8.6 2.2 12.2 5.1 15.1 8.6 15.1 12.2 15.1 15.1 12.2 15.1 8.6 15.1 5.1 12.2 2.2 8.6 2.2ZM8.6 3.6L8.6 5C6.6 5 5 6.6 5 8.6L5 8.6 3.6 8.6C3.6 5.9 5.9 3.6 8.6 3.6L8.6 3.6Z"/></g></g></svg>', 800 803 ], 801 804 [ 802 805 'id' => 'not-have-that-feature', 803 'text' => $this->client->__trans( 'Missing a specific feature'),804 'placeholder' => $this->client->__trans( 'Could you tell us more about that feature?'),806 'text' => $this->client->__trans( 'Missing a specific feature' ), 807 'placeholder' => $this->client->__trans( 'Could you tell us more about that feature?' ), 805 808 'icon' => '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="17" viewBox="0 0 24 17"><g fill="none"><g fill="#3B86FF"><path d="M19.4 0C19.7 0.6 19.8 1.3 19.8 2 19.8 3.2 19.4 4.4 18.5 5.3 17.6 6.2 16.5 6.7 15.2 6.7 15.2 6.7 15.2 6.7 15.2 6.7 14 6.7 12.9 6.2 12 5.3 11.2 4.4 10.7 3.3 10.7 2 10.7 1.3 10.8 0.6 11.1 0L7.6 0 7 0 6.5 0 6.5 5.7C6.3 5.6 5.9 5.3 5.6 5.1 5 4.6 4.3 4.3 3.5 4.3 3.5 4.3 3.5 4.3 3.4 4.3 1.6 4.4 0 5.9 0 7.9 0 8.6 0.2 9.2 0.5 9.7 1.1 10.8 2.2 11.5 3.5 11.5 4.3 11.5 5 11.2 5.6 10.8 6 10.5 6.3 10.3 6.5 10.2L6.5 10.2 6.5 17 6.5 17 7 17 7.6 17 22.5 17C23.3 17 24 16.3 24 15.5L24 0 19.4 0Z"/></g></g></svg>', 806 809 ], 807 810 [ 808 811 'id' => 'is-not-working', 809 'text' => $this->client->__trans( 'Not working'),810 'placeholder' => $this->client->__trans( 'Could you tell us a bit more whats not working?'),812 'text' => $this->client->__trans( 'Not working' ), 813 'placeholder' => $this->client->__trans( 'Could you tell us a bit more whats not working?' ), 811 814 'icon' => '<svg xmlns="http://www.w3.org/2000/svg" width="23" height="23" viewBox="0 0 23 23"><g fill="none"><g fill="#3B86FF"><path d="M11.5 0C17.9 0 23 5.1 23 11.5 23 17.9 17.9 23 11.5 23 5.1 23 0 17.9 0 11.5 0 5.1 5.1 0 11.5 0ZM11.8 14.4C11.2 14.4 10.7 14.8 10.7 15.4 10.7 16 11.2 16.4 11.8 16.4 12.4 16.4 12.8 16 12.8 15.4 12.8 14.8 12.4 14.4 11.8 14.4ZM12 7C10.1 7 9.1 8.1 9 9.6L10.5 9.6C10.5 8.8 11.1 8.3 11.9 8.3 12.7 8.3 13.2 8.8 13.2 9.5 13.2 10.1 13 10.4 12.2 10.9 11.3 11.4 10.9 12 11 12.9L11 13.4 12.5 13.4 12.5 13C12.5 12.4 12.7 12.1 13.5 11.6 14.4 11.1 14.9 10.4 14.9 9.4 14.9 8 13.7 7 12 7Z"/></g></g></svg>', 812 815 ], 813 816 [ 814 817 'id' => 'looking-for-other', 815 'text' => $this->client->__trans( 'Not what I was looking'),816 'placeholder' => $this->client->__trans( 'Could you tell us a bit more?'),818 'text' => $this->client->__trans( 'Not what I was looking' ), 819 'placeholder' => $this->client->__trans( 'Could you tell us a bit more?' ), 817 820 'icon' => '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="17" viewBox="0 0 24 17"><g fill="none"><g fill="#3B86FF"><path d="M23.5 9C23.5 9 23.5 8.9 23.5 8.9 23.5 8.9 23.5 8.9 23.5 8.9 23.4 8.6 23.2 8.3 23 8 22.2 6.5 20.6 3.7 19.8 2.6 18.8 1.3 17.7 0 16.1 0 15.7 0 15.3 0.1 14.9 0.2 13.8 0.6 12.6 1.2 12.3 2.7L11.7 2.7C11.4 1.2 10.2 0.6 9.1 0.2 8.7 0.1 8.3 0 7.9 0 6.3 0 5.2 1.3 4.2 2.6 3.4 3.7 1.8 6.5 1 8 0.8 8.3 0.6 8.6 0.5 8.9 0.5 8.9 0.5 8.9 0.5 8.9 0.5 8.9 0.5 9 0.5 9 0.2 9.7 0 10.5 0 11.3 0 14.4 2.5 17 5.5 17 7.3 17 8.8 16.1 9.8 14.8L14.2 14.8C15.2 16.1 16.7 17 18.5 17 21.5 17 24 14.4 24 11.3 24 10.5 23.8 9.7 23.5 9ZM5.5 15C3.6 15 2 13.2 2 11 2 8.8 3.6 7 5.5 7 7.4 7 9 8.8 9 11 9 13.2 7.4 15 5.5 15ZM18.5 15C16.6 15 15 13.2 15 11 15 8.8 16.6 7 18.5 7 20.4 7 22 8.8 22 11 22 13.2 20.4 15 18.5 15Z"/></g></g></svg>', 818 821 ], 819 822 [ 820 823 'id' => 'did-not-work-as-expected', 821 'text' => $this->client->__trans( "Didn't work as expected"),822 'placeholder' => $this->client->__trans( 'What did you expect?'),824 'text' => $this->client->__trans( "Didn't work as expected" ), 825 'placeholder' => $this->client->__trans( 'What did you expect?' ), 823 826 'icon' => '<svg xmlns="http://www.w3.org/2000/svg" width="23" height="23" viewBox="0 0 23 23"><g fill="none"><g fill="#3B86FF"><path d="M11.5 0C17.9 0 23 5.1 23 11.5 23 17.9 17.9 23 11.5 23 5.1 23 0 17.9 0 11.5 0 5.1 5.1 0 11.5 0ZM11.5 2C6.3 2 2 6.3 2 11.5 2 16.7 6.3 21 11.5 21 16.7 21 21 16.7 21 11.5 21 6.3 16.7 2 11.5 2ZM12.5 12.9L12.7 5 10.2 5 10.5 12.9 12.5 12.9ZM11.5 17.4C12.4 17.4 13 16.8 13 15.9 13 15 12.4 14.4 11.5 14.4 10.6 14.4 10 15 10 15.9 10 16.8 10.6 17.4 11.5 17.4Z"/></g></g></svg>', 824 827 ], 825 828 [ 826 829 'id' => 'other', 827 'text' => $this->client->__trans( 'Others'),828 'placeholder' => $this->client->__trans( 'Could you tell us a bit more?'),830 'text' => $this->client->__trans( 'Others' ), 831 'placeholder' => $this->client->__trans( 'Could you tell us a bit more?' ), 829 832 'icon' => '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="23" viewBox="0 0 24 6"><g fill="none"><g fill="#3B86FF"><path d="M3 0C4.7 0 6 1.3 6 3 6 4.7 4.7 6 3 6 1.3 6 0 4.7 0 3 0 1.3 1.3 0 3 0ZM12 0C13.7 0 15 1.3 15 3 15 4.7 13.7 6 12 6 10.3 6 9 4.7 9 3 9 1.3 10.3 0 12 0ZM21 0C22.7 0 24 1.3 24 3 24 4.7 22.7 6 21 6 19.3 6 18 4.7 18 3 18 1.3 19.3 0 21 0Z"/></g></g></svg>', 830 833 ], … … 839 842 * @return void 840 843 */ 841 public function uninstall_reason_submission() 842 { 843 if (!isset($_POST['nonce'])) { 844 public function uninstall_reason_submission() { 845 if ( ! isset( $_POST['nonce'] ) ) { 844 846 return; 845 847 } 846 848 847 if ( !isset($_POST['reason_id'])) {849 if ( ! isset( $_POST['reason_id'] ) ) { 848 850 wp_send_json_error(); 849 851 } 850 852 851 if ( !wp_verify_nonce(sanitize_key(wp_unslash($_POST['nonce'])), 'appsero-security-nonce')) {852 wp_send_json_error( 'Nonce verification failed');853 } 854 855 if ( !current_user_can('manage_options')) {856 wp_send_json_error( 'You are not allowed for this task');853 if ( ! wp_verify_nonce( sanitize_key( wp_unslash( $_POST['nonce'] ) ), 'appsero-security-nonce' ) ) { 854 wp_send_json_error( 'Nonce verification failed' ); 855 } 856 857 if ( ! current_user_can( 'manage_options' ) ) { 858 wp_send_json_error( 'You are not allowed for this task' ); 857 859 } 858 860 859 861 $data = $this->get_tracking_data(); 860 $data['reason_id'] = sanitize_text_field( wp_unslash($_POST['reason_id']));861 $data['reason_info'] = isset( $_REQUEST['reason_info']) ? trim(sanitize_text_field(wp_unslash($_REQUEST['reason_info']))) : '';862 863 $this->client->send_request( $data, 'deactivate');862 $data['reason_id'] = sanitize_text_field( wp_unslash( $_POST['reason_id'] ) ); 863 $data['reason_info'] = isset( $_REQUEST['reason_info'] ) ? trim( sanitize_text_field( wp_unslash( $_REQUEST['reason_info'] ) ) ) : ''; 864 865 $this->client->send_request( $data, 'deactivate' ); 864 866 865 867 /* 866 868 * Fire after the plugin _uninstall_reason_submitted 867 869 */ 868 do_action( $this->client->slug . '_uninstall_reason_submitted', $data);870 do_action( $this->client->slug . '_uninstall_reason_submitted', $data ); 869 871 870 872 wp_send_json_success(); … … 876 878 * @return void 877 879 */ 878 public function deactivate_scripts() 879 { 880 public function deactivate_scripts() { 880 881 global $pagenow; 881 882 882 if ( 'plugins.php' !== $pagenow) {883 if ( 'plugins.php' !== $pagenow ) { 883 884 return; 884 885 } … … 886 887 $this->deactivation_modal_styles(); 887 888 $reasons = $this->get_uninstall_reasons(); 888 $custom_reasons = apply_filters( 'appsero_custom_deactivation_reasons', [], $this->client);889 ?>889 $custom_reasons = apply_filters( 'appsero_custom_deactivation_reasons', [], $this->client ); 890 ?> 890 891 891 892 <div class="wd-dr-modal" id="<?php echo $this->client->slug; ?>-wd-dr-modal"> 892 893 <div class="wd-dr-modal-wrap"> 893 894 <div class="wd-dr-modal-header"> 894 <h3> <?php $this->client->_etrans('Goodbyes are always hard. If you have a moment, please let us know how we can improve.'); ?></h3>895 <h3> <?php $this->client->_etrans( 'Goodbyes are always hard. If you have a moment, please let us know how we can improve.' ); ?> </h3> 895 896 </div> 896 897 897 898 <div class="wd-dr-modal-body"> 898 899 <ul class="wd-de-reasons"> 899 <?php foreach ( $reasons as $reason) { ?>900 <li data-placeholder="<?php echo esc_attr( $reason['placeholder']); ?>">900 <?php foreach ( $reasons as $reason ) { ?> 901 <li data-placeholder="<?php echo esc_attr( $reason['placeholder'] ); ?>"> 901 902 <label> 902 903 <input type="radio" name="selected-reason" value="<?php echo $reason['id']; ?>"> … … 907 908 <?php } ?> 908 909 </ul> 909 <?php if ( $custom_reasons && is_array($custom_reasons)) { ?>910 <?php if ( $custom_reasons && is_array( $custom_reasons ) ) { ?> 910 911 <ul class="wd-de-reasons wd-de-others-reasons"> 911 <?php foreach ( $custom_reasons as $reason) { ?>912 <li data-placeholder="<?php echo esc_attr( $reason['placeholder']); ?>" data-customreason="true">912 <?php foreach ( $custom_reasons as $reason ) { ?> 913 <li data-placeholder="<?php echo esc_attr( $reason['placeholder'] ); ?>" data-customreason="true"> 913 914 <label> 914 915 <input type="radio" name="selected-reason" value="<?php echo $reason['id']; ?>"> … … 924 925 <?php 925 926 echo sprintf( 926 $this->client->__trans( 'We share your data with <a href="%1$s" target="_blank">Appsero</a> to troubleshoot problems & make product improvements. <a href="%2$s" target="_blank">Learn more</a> about how Appsero handles your data.'),927 esc_url( 'https://appsero.com/'),928 esc_url( 'https://appsero.com/privacy-policy')927 $this->client->__trans( 'We share your data with <a href="%1$s" target="_blank">Appsero</a> to troubleshoot problems & make product improvements. <a href="%2$s" target="_blank">Learn more</a> ↗' ), 928 esc_url( 'https://appsero.com/' ), 929 esc_url( 'https://appsero.com/privacy-policy' ) 929 930 ); 930 931 ?> … … 933 934 934 935 <div class="wd-dr-modal-footer"> 935 <a href="#" class="dont-bother-me wd-dr-button-secondary"><?php $this->client->_etrans( 'Skip & Deactivate'); ?></a>936 <button class="wd-dr-button-secondary wd-dr-cancel-modal"><?php $this->client->_etrans( 'Cancel'); ?></button>937 <button class="wd-dr-submit-modal"><?php $this->client->_etrans( 'Submit & Deactivate'); ?></button>936 <a href="#" class="dont-bother-me wd-dr-button-secondary"><?php $this->client->_etrans( 'Skip & Deactivate' ); ?></a> 937 <button class="wd-dr-button-secondary wd-dr-cancel-modal"><?php $this->client->_etrans( 'Cancel' ); ?></button> 938 <button class="wd-dr-submit-modal"><?php $this->client->_etrans( 'Submit & Deactivate' ); ?></button> 938 939 </div> 939 940 </div> … … 972 973 $('ul.wd-de-reasons li').removeClass('wd-de-reason-selected'); 973 974 974 if ( "other" != inputValue) {975 if ( "other" !== inputValue ) { 975 976 $('ul.wd-de-reasons.wd-de-others-reasons').css('display', 'none'); 976 977 } … … 978 979 979 980 // Show if has custom reasons 980 if ( "other" == inputValue) {981 if ( "other" === inputValue ) { 981 982 $('ul.wd-de-reasons.wd-de-others-reasons').css('display', 'flex'); 982 983 } … … 1005 1006 type: 'POST', 1006 1007 data: { 1007 nonce: '<?php echo wp_create_nonce( 'appsero-security-nonce'); ?>',1008 nonce: '<?php echo wp_create_nonce( 'appsero-security-nonce' ); ?>', 1008 1009 action: '<?php echo $this->client->slug; ?>_submit-uninstall-reason', 1009 1010 reason_id: (0 === $radio.length) ? 'none' : $radio.val(), … … 1023 1024 </script> 1024 1025 1025 <?php1026 <?php 1026 1027 } 1027 1028 … … 1035 1036 * @return void 1036 1037 */ 1037 public function theme_deactivated($new_name, $new_theme, $old_theme) 1038 { 1038 public function theme_deactivated( $new_name, $new_theme, $old_theme ) { 1039 1039 // Make sure this is appsero theme 1040 if ( $old_theme->get_template() === $this->client->slug) {1041 $this->client->send_request( $this->get_tracking_data(), 'deactivate');1040 if ( $old_theme->get_template() === $this->client->slug ) { 1041 $this->client->send_request( $this->get_tracking_data(), 'deactivate' ); 1042 1042 } 1043 1043 } … … 1046 1046 * Get user IP Address 1047 1047 */ 1048 private function get_user_ip_address() 1049 { 1050 $response = wp_remote_get('https://icanhazip.com/'); 1051 1052 if (is_wp_error($response)) { 1048 private function get_user_ip_address() { 1049 $response = wp_remote_get( 'https://icanhazip.com/' ); 1050 1051 if ( is_wp_error( $response ) ) { 1053 1052 return ''; 1054 1053 } 1055 1054 1056 $ip = trim( wp_remote_retrieve_body($response));1057 1058 if ( !filter_var($ip, FILTER_VALIDATE_IP)) {1055 $ip = trim( wp_remote_retrieve_body( $response ) ); 1056 1057 if ( ! filter_var( $ip, FILTER_VALIDATE_IP ) ) { 1059 1058 return ''; 1060 1059 } … … 1066 1065 * Get site name 1067 1066 */ 1068 private function get_site_name() 1069 { 1070 $site_name = get_bloginfo('name'); 1071 1072 if (empty($site_name)) { 1073 $site_name = get_bloginfo('description'); 1074 $site_name = wp_trim_words($site_name, 3, ''); 1075 } 1076 1077 if (empty($site_name)) { 1078 $site_name = esc_url(home_url()); 1067 private function get_site_name() { 1068 $site_name = get_bloginfo( 'name' ); 1069 1070 if ( empty( $site_name ) ) { 1071 $site_name = get_bloginfo( 'description' ); 1072 $site_name = wp_trim_words( $site_name, 3, '' ); 1073 } 1074 1075 if ( empty( $site_name ) ) { 1076 $site_name = esc_url( home_url() ); 1079 1077 } 1080 1078 … … 1085 1083 * Send request to appsero if user skip to send tracking data 1086 1084 */ 1087 private function send_tracking_skipped_request() 1088 { 1089 $skipped = get_option($this->client->slug . '_tracking_skipped'); 1085 private function send_tracking_skipped_request() { 1086 $skipped = get_option( $this->client->slug . '_tracking_skipped' ); 1090 1087 1091 1088 $data = [ … … 1094 1091 ]; 1095 1092 1096 if ( $skipped === 'yes') {1093 if ( $skipped === 'yes' ) { 1097 1094 $data['previously_skipped'] = true; 1098 1095 } else { 1099 update_option( $this->client->slug . '_tracking_skipped', 'yes');1100 } 1101 1102 $this->client->send_request( $data, 'tracking-skipped');1096 update_option( $this->client->slug . '_tracking_skipped', 'yes' ); 1097 } 1098 1099 $this->client->send_request( $data, 'tracking-skipped' ); 1103 1100 } 1104 1101 … … 1106 1103 * Deactivation modal styles 1107 1104 */ 1108 private function deactivation_modal_styles() 1109 { 1110 ?> 1105 private function deactivation_modal_styles() { 1106 ?> 1111 1107 <style type="text/css"> 1112 1108 .wd-dr-modal { … … 1291 1287 } 1292 1288 </style> 1293 <?php1289 <?php 1294 1290 } 1295 1291 } -
texty/trunk/vendor/autoload.php
r3165401 r3452714 5 5 require_once __DIR__ . '/composer/autoload_real.php'; 6 6 7 return ComposerAutoloaderInit 3e58cb5797535e5f7271ddfe3cc932fe::getLoader();7 return ComposerAutoloaderInit75360f9b0d0b857d8b634f1ded3c970d::getLoader(); -
texty/trunk/vendor/composer/autoload_classmap.php
r2736472 r3452714 7 7 8 8 return array( 9 'Appsero\\Client' => $vendorDir . '/appsero/client/src/Client.php',10 'Appsero\\Insights' => $vendorDir . '/appsero/client/src/Insights.php',11 'Appsero\\License' => $vendorDir . '/appsero/client/src/License.php',12 'Appsero\\Updater' => $vendorDir . '/appsero/client/src/Updater.php',13 9 'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php', 14 'Texty\\Admin' => $baseDir . '/includes/Admin.php',15 'Texty\\Admin\\Menu' => $baseDir . '/includes/Admin/Menu.php',16 'Texty\\Admin\\Profile' => $baseDir . '/includes/Admin/Profile.php',17 'Texty\\Api' => $baseDir . '/includes/Api.php',18 'Texty\\Api\\Base' => $baseDir . '/includes/Api/Base.php',19 'Texty\\Api\\Notifications' => $baseDir . '/includes/Api/Notifications.php',20 'Texty\\Api\\Send' => $baseDir . '/includes/Api/Send.php',21 'Texty\\Api\\Settings' => $baseDir . '/includes/Api/Settings.php',22 'Texty\\Api\\Status' => $baseDir . '/includes/Api/Status.php',23 'Texty\\Api\\Tools' => $baseDir . '/includes/Api/Tools.php',24 'Texty\\Dispatcher' => $baseDir . '/includes/Dispatcher.php',25 'Texty\\Gateways' => $baseDir . '/includes/Gateways.php',26 'Texty\\Gateways\\Clickatell' => $baseDir . '/includes/Gateways/Clickatell.php',27 'Texty\\Gateways\\Fake' => $baseDir . '/includes/Gateways/Fake.php',28 'Texty\\Gateways\\GatewayInterface' => $baseDir . '/includes/Gateways/GatewayInterface.php',29 'Texty\\Gateways\\Plivo' => $baseDir . '/includes/Gateways/Plivo.php',30 'Texty\\Gateways\\Twilio' => $baseDir . '/includes/Gateways/Twilio.php',31 'Texty\\Gateways\\Vonage' => $baseDir . '/includes/Gateways/Vonage.php',32 'Texty\\Install' => $baseDir . '/includes/Install.php',33 'Texty\\Integrations\\Dokan' => $baseDir . '/includes/Integrations/Dokan.php',34 'Texty\\Integrations\\WooCommerce' => $baseDir . '/includes/Integrations/WooCommerce.php',35 'Texty\\Notifications' => $baseDir . '/includes/Notifications.php',36 'Texty\\Notifications\\Dokan\\Base' => $baseDir . '/includes/Notifications/Dokan/Base.php',37 'Texty\\Notifications\\Dokan\\CompleteVendor' => $baseDir . '/includes/Notifications/Dokan/CompleteVendor.php',38 'Texty\\Notifications\\Dokan\\ProcessingVendor' => $baseDir . '/includes/Notifications/Dokan/ProcessingVendor.php',39 'Texty\\Notifications\\Notification' => $baseDir . '/includes/Notifications/Notification.php',40 'Texty\\Notifications\\WC\\Base' => $baseDir . '/includes/Notifications/WC/Base.php',41 'Texty\\Notifications\\WC\\CompleteAdmin' => $baseDir . '/includes/Notifications/WC/CompleteAdmin.php',42 'Texty\\Notifications\\WC\\CompleteCustomer' => $baseDir . '/includes/Notifications/WC/CompleteCustomer.php',43 'Texty\\Notifications\\WC\\HoldCustomer' => $baseDir . '/includes/Notifications/WC/HoldCustomer.php',44 'Texty\\Notifications\\WC\\ProcessingAdmin' => $baseDir . '/includes/Notifications/WC/ProcessingAdmin.php',45 'Texty\\Notifications\\WC\\ProcessingCustomer' => $baseDir . '/includes/Notifications/WC/ProcessingCustomer.php',46 'Texty\\Notifications\\WP\\Comment' => $baseDir . '/includes/Notifications/WP/Comment.php',47 'Texty\\Notifications\\WP\\Registration' => $baseDir . '/includes/Notifications/WP/Registration.php',48 'Texty\\Settings' => $baseDir . '/includes/Settings.php',49 10 ); -
texty/trunk/vendor/composer/autoload_psr4.php
r2458183 r3452714 7 7 8 8 return array( 9 'Texty\\Dependencies\\' => array($baseDir . '/dependencies'), 9 10 'Texty\\' => array($baseDir . '/includes'), 10 11 'Appsero\\' => array($vendorDir . '/appsero/client/src'), -
texty/trunk/vendor/composer/autoload_real.php
r3165401 r3452714 3 3 // autoload_real.php @generated by Composer 4 4 5 class ComposerAutoloaderInit 3e58cb5797535e5f7271ddfe3cc932fe5 class ComposerAutoloaderInit75360f9b0d0b857d8b634f1ded3c970d 6 6 { 7 7 private static $loader; … … 25 25 require __DIR__ . '/platform_check.php'; 26 26 27 spl_autoload_register(array('ComposerAutoloaderInit 3e58cb5797535e5f7271ddfe3cc932fe', 'loadClassLoader'), true, true);27 spl_autoload_register(array('ComposerAutoloaderInit75360f9b0d0b857d8b634f1ded3c970d', 'loadClassLoader'), true, true); 28 28 self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__))); 29 spl_autoload_unregister(array('ComposerAutoloaderInit 3e58cb5797535e5f7271ddfe3cc932fe', 'loadClassLoader'));29 spl_autoload_unregister(array('ComposerAutoloaderInit75360f9b0d0b857d8b634f1ded3c970d', 'loadClassLoader')); 30 30 31 31 $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); … … 33 33 require __DIR__ . '/autoload_static.php'; 34 34 35 call_user_func(\Composer\Autoload\ComposerStaticInit 3e58cb5797535e5f7271ddfe3cc932fe::getInitializer($loader));35 call_user_func(\Composer\Autoload\ComposerStaticInit75360f9b0d0b857d8b634f1ded3c970d::getInitializer($loader)); 36 36 } else { 37 37 $map = require __DIR__ . '/autoload_namespaces.php'; -
texty/trunk/vendor/composer/autoload_static.php
r3165401 r3452714 5 5 namespace Composer\Autoload; 6 6 7 class ComposerStaticInit 3e58cb5797535e5f7271ddfe3cc932fe7 class ComposerStaticInit75360f9b0d0b857d8b634f1ded3c970d 8 8 { 9 9 public static $prefixLengthsPsr4 = array ( 10 10 'T' => 11 11 array ( 12 'Texty\\Dependencies\\' => 19, 12 13 'Texty\\' => 6, 13 14 ), … … 19 20 20 21 public static $prefixDirsPsr4 = array ( 22 'Texty\\Dependencies\\' => 23 array ( 24 0 => __DIR__ . '/../..' . '/dependencies', 25 ), 21 26 'Texty\\' => 22 27 array ( … … 30 35 31 36 public static $classMap = array ( 32 'Appsero\\Client' => __DIR__ . '/..' . '/appsero/client/src/Client.php',33 'Appsero\\Insights' => __DIR__ . '/..' . '/appsero/client/src/Insights.php',34 'Appsero\\License' => __DIR__ . '/..' . '/appsero/client/src/License.php',35 'Appsero\\Updater' => __DIR__ . '/..' . '/appsero/client/src/Updater.php',36 37 'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php', 37 'Texty\\Admin' => __DIR__ . '/../..' . '/includes/Admin.php',38 'Texty\\Admin\\Menu' => __DIR__ . '/../..' . '/includes/Admin/Menu.php',39 'Texty\\Admin\\Profile' => __DIR__ . '/../..' . '/includes/Admin/Profile.php',40 'Texty\\Api' => __DIR__ . '/../..' . '/includes/Api.php',41 'Texty\\Api\\Base' => __DIR__ . '/../..' . '/includes/Api/Base.php',42 'Texty\\Api\\Notifications' => __DIR__ . '/../..' . '/includes/Api/Notifications.php',43 'Texty\\Api\\Send' => __DIR__ . '/../..' . '/includes/Api/Send.php',44 'Texty\\Api\\Settings' => __DIR__ . '/../..' . '/includes/Api/Settings.php',45 'Texty\\Api\\Status' => __DIR__ . '/../..' . '/includes/Api/Status.php',46 'Texty\\Api\\Tools' => __DIR__ . '/../..' . '/includes/Api/Tools.php',47 'Texty\\Dispatcher' => __DIR__ . '/../..' . '/includes/Dispatcher.php',48 'Texty\\Gateways' => __DIR__ . '/../..' . '/includes/Gateways.php',49 'Texty\\Gateways\\Clickatell' => __DIR__ . '/../..' . '/includes/Gateways/Clickatell.php',50 'Texty\\Gateways\\Fake' => __DIR__ . '/../..' . '/includes/Gateways/Fake.php',51 'Texty\\Gateways\\GatewayInterface' => __DIR__ . '/../..' . '/includes/Gateways/GatewayInterface.php',52 'Texty\\Gateways\\Plivo' => __DIR__ . '/../..' . '/includes/Gateways/Plivo.php',53 'Texty\\Gateways\\Twilio' => __DIR__ . '/../..' . '/includes/Gateways/Twilio.php',54 'Texty\\Gateways\\Vonage' => __DIR__ . '/../..' . '/includes/Gateways/Vonage.php',55 'Texty\\Install' => __DIR__ . '/../..' . '/includes/Install.php',56 'Texty\\Integrations\\Dokan' => __DIR__ . '/../..' . '/includes/Integrations/Dokan.php',57 'Texty\\Integrations\\WooCommerce' => __DIR__ . '/../..' . '/includes/Integrations/WooCommerce.php',58 'Texty\\Notifications' => __DIR__ . '/../..' . '/includes/Notifications.php',59 'Texty\\Notifications\\Dokan\\Base' => __DIR__ . '/../..' . '/includes/Notifications/Dokan/Base.php',60 'Texty\\Notifications\\Dokan\\CompleteVendor' => __DIR__ . '/../..' . '/includes/Notifications/Dokan/CompleteVendor.php',61 'Texty\\Notifications\\Dokan\\ProcessingVendor' => __DIR__ . '/../..' . '/includes/Notifications/Dokan/ProcessingVendor.php',62 'Texty\\Notifications\\Notification' => __DIR__ . '/../..' . '/includes/Notifications/Notification.php',63 'Texty\\Notifications\\WC\\Base' => __DIR__ . '/../..' . '/includes/Notifications/WC/Base.php',64 'Texty\\Notifications\\WC\\CompleteAdmin' => __DIR__ . '/../..' . '/includes/Notifications/WC/CompleteAdmin.php',65 'Texty\\Notifications\\WC\\CompleteCustomer' => __DIR__ . '/../..' . '/includes/Notifications/WC/CompleteCustomer.php',66 'Texty\\Notifications\\WC\\HoldCustomer' => __DIR__ . '/../..' . '/includes/Notifications/WC/HoldCustomer.php',67 'Texty\\Notifications\\WC\\ProcessingAdmin' => __DIR__ . '/../..' . '/includes/Notifications/WC/ProcessingAdmin.php',68 'Texty\\Notifications\\WC\\ProcessingCustomer' => __DIR__ . '/../..' . '/includes/Notifications/WC/ProcessingCustomer.php',69 'Texty\\Notifications\\WP\\Comment' => __DIR__ . '/../..' . '/includes/Notifications/WP/Comment.php',70 'Texty\\Notifications\\WP\\Registration' => __DIR__ . '/../..' . '/includes/Notifications/WP/Registration.php',71 'Texty\\Settings' => __DIR__ . '/../..' . '/includes/Settings.php',72 38 ); 73 39 … … 75 41 { 76 42 return \Closure::bind(function () use ($loader) { 77 $loader->prefixLengthsPsr4 = ComposerStaticInit 3e58cb5797535e5f7271ddfe3cc932fe::$prefixLengthsPsr4;78 $loader->prefixDirsPsr4 = ComposerStaticInit 3e58cb5797535e5f7271ddfe3cc932fe::$prefixDirsPsr4;79 $loader->classMap = ComposerStaticInit 3e58cb5797535e5f7271ddfe3cc932fe::$classMap;43 $loader->prefixLengthsPsr4 = ComposerStaticInit75360f9b0d0b857d8b634f1ded3c970d::$prefixLengthsPsr4; 44 $loader->prefixDirsPsr4 = ComposerStaticInit75360f9b0d0b857d8b634f1ded3c970d::$prefixDirsPsr4; 45 $loader->classMap = ComposerStaticInit75360f9b0d0b857d8b634f1ded3c970d::$classMap; 80 46 81 47 }, null, ClassLoader::class); -
texty/trunk/vendor/composer/installed.json
r2987176 r3452714 3 3 { 4 4 "name": "appsero/client", 5 "version": " dev-develop",6 "version_normalized": " dev-develop",5 "version": "v2.0.5", 6 "version_normalized": "2.0.5.0", 7 7 "source": { 8 8 "type": "git", 9 9 "url": "https://github.com/Appsero/client.git", 10 "reference": " 3b68f17ac29d56d14a78cc4817c4b80f692e4e3a"10 "reference": "b7766ee150cc8e28125a818a11e770feb9899a71" 11 11 }, 12 12 "dist": { 13 13 "type": "zip", 14 "url": "https://api.github.com/repos/Appsero/client/zipball/ 3b68f17ac29d56d14a78cc4817c4b80f692e4e3a",15 "reference": " 3b68f17ac29d56d14a78cc4817c4b80f692e4e3a",14 "url": "https://api.github.com/repos/Appsero/client/zipball/b7766ee150cc8e28125a818a11e770feb9899a71", 15 "reference": "b7766ee150cc8e28125a818a11e770feb9899a71", 16 16 "shasum": "" 17 17 }, … … 27 27 "wp-coding-standards/wpcs": "dev-develop" 28 28 }, 29 "time": "2023-10-11T09:13:55+00:00", 30 "default-branch": true, 29 "time": "2025-11-24T10:14:59+00:00", 31 30 "type": "library", 32 31 "installation-source": "dist", … … 55 54 "support": { 56 55 "issues": "https://github.com/Appsero/client/issues", 57 "source": "https://github.com/Appsero/client/tree/ develop"56 "source": "https://github.com/Appsero/client/tree/v2.0.5" 58 57 }, 59 58 "install-path": "../appsero/client" -
texty/trunk/vendor/composer/installed.php
r2987176 r3452714 12 12 'versions' => array( 13 13 'appsero/client' => array( 14 'pretty_version' => ' dev-develop',15 'version' => ' dev-develop',14 'pretty_version' => 'v2.0.5', 15 'version' => '2.0.5.0', 16 16 'type' => 'library', 17 17 'install_path' => __DIR__ . '/../appsero/client', 18 'aliases' => array( 19 0 => '9999999-dev', 20 ), 21 'reference' => '3b68f17ac29d56d14a78cc4817c4b80f692e4e3a', 18 'aliases' => array(), 19 'reference' => 'b7766ee150cc8e28125a818a11e770feb9899a71', 22 20 'dev_requirement' => false, 23 21 ),
Note: See TracChangeset
for help on using the changeset viewer.