Version Description
Download this release
Release Info
Developer | themeisle |
Plugin | WP Maintenance Mode |
Version | 2.4.7 |
Comparing to | |
See all releases |
Code changes from version 2.4.6 to 2.4.7
- CHANGELOG.md +7 -0
- README.md +11 -1
- assets/js/bot.js +9 -2
- assets/js/bot.min.js +1 -1
- includes/classes/wp-maintenance-mode.php +2 -1
- readme.txt +11 -1
- vendor/autoload.php +1 -1
- vendor/composer/autoload_real.php +7 -7
- vendor/composer/autoload_static.php +2 -2
- vendor/composer/installed.php +4 -4
- views/maintenance.php +20 -4
- wp-maintenance-mode.php +1 -1
CHANGELOG.md
CHANGED
@@ -1,3 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
##### [Version 2.4.6](https://github.com/Codeinwp/wp-maintenance-mode/compare/v2.4.5...v2.4.6) (2022-06-15)
|
2 |
|
3 |
* Improve data sanitizations for custom css and contact module
|
1 |
+
##### [Version 2.4.7](https://github.com/Codeinwp/wp-maintenance-mode/compare/v2.4.6...v2.4.7) (2022-08-08)
|
2 |
+
|
3 |
+
##### Fixes
|
4 |
+
* Fix login form display
|
5 |
+
* Fix email collecting by the bot
|
6 |
+
* Improve accessibility of the maintenance page thanks to @SophieWeb
|
7 |
+
|
8 |
##### [Version 2.4.6](https://github.com/Codeinwp/wp-maintenance-mode/compare/v2.4.5...v2.4.6) (2022-06-15)
|
9 |
|
10 |
* Improve data sanitizations for custom css and contact module
|
README.md
CHANGED
@@ -7,7 +7,7 @@
|
|
7 |
**Tags:** maintenance mode, admin, administration, unavailable, coming soon, multisite, landing page, under construction, contact form, subscribe, countdown
|
8 |
**Requires at least:** 3.5
|
9 |
**Tested up to:** 6.0
|
10 |
-
**Stable tag:** 2.4.
|
11 |
**Requires PHP:** 5.6
|
12 |
**License:** GPL-2.0+
|
13 |
|
@@ -91,6 +91,16 @@ Notice: `wp-cron.php` is excluded by default.
|
|
91 |
|
92 |
## Changelog ##
|
93 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
94 |
##### [Version 2.4.6](https://github.com/Codeinwp/wp-maintenance-mode/compare/v2.4.5...v2.4.6) (2022-06-15)
|
95 |
|
96 |
* Improve data sanitizations for custom css and contact module
|
7 |
**Tags:** maintenance mode, admin, administration, unavailable, coming soon, multisite, landing page, under construction, contact form, subscribe, countdown
|
8 |
**Requires at least:** 3.5
|
9 |
**Tested up to:** 6.0
|
10 |
+
**Stable tag:** 2.4.7
|
11 |
**Requires PHP:** 5.6
|
12 |
**License:** GPL-2.0+
|
13 |
|
91 |
|
92 |
## Changelog ##
|
93 |
|
94 |
+
##### [Version 2.4.7](https://github.com/Codeinwp/wp-maintenance-mode/compare/v2.4.6...v2.4.7) (2022-08-08)
|
95 |
+
|
96 |
+
##### Fixes
|
97 |
+
* Fix login form display
|
98 |
+
* Fix email collecting by the bot
|
99 |
+
* Improve accessibility of the maintenance page thanks to @SophieWeb
|
100 |
+
|
101 |
+
|
102 |
+
|
103 |
+
|
104 |
##### [Version 2.4.6](https://github.com/Codeinwp/wp-maintenance-mode/compare/v2.4.5...v2.4.6) (2022-06-15)
|
105 |
|
106 |
* Improve data sanitizations for custom css and contact module
|
assets/js/bot.js
CHANGED
@@ -162,8 +162,8 @@ function checkEmail(option) {
|
|
162 |
if (input.length > 7 && result === true) {
|
163 |
|
164 |
// Add new entry to our db
|
165 |
-
var
|
166 |
-
var subscribe_bot_data = 'action=wpmm_add_subscriber&' +
|
167 |
|
168 |
jQuery.post(wpmm_vars.ajax_url, subscribe_bot_data, function (response) {
|
169 |
if (!response.success) {
|
@@ -417,6 +417,13 @@ function showStatement(pos) {
|
|
417 |
"class": "chat-message user"
|
418 |
}).appendTo(form);
|
419 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
420 |
// Create email input, append to user bubble
|
421 |
var input = jQuery('<input/>', {
|
422 |
type: 'email',
|
162 |
if (input.length > 7 && result === true) {
|
163 |
|
164 |
// Add new entry to our db
|
165 |
+
var bot_subscribe_form = jQuery('.bot_subscribe_form').serialize();
|
166 |
+
var subscribe_bot_data = 'action=wpmm_add_subscriber&' + bot_subscribe_form;
|
167 |
|
168 |
jQuery.post(wpmm_vars.ajax_url, subscribe_bot_data, function (response) {
|
169 |
if (!response.success) {
|
417 |
"class": "chat-message user"
|
418 |
}).appendTo(form);
|
419 |
|
420 |
+
// Create hidden input, append to user bubble
|
421 |
+
var input = jQuery('<input/>', {
|
422 |
+
type: 'hidden',
|
423 |
+
name: '_wpnonce',
|
424 |
+
value: botVars.wpnonce
|
425 |
+
}).appendTo(inputBubble);
|
426 |
+
|
427 |
// Create email input, append to user bubble
|
428 |
var input = jQuery('<input/>', {
|
429 |
type: 'email',
|
assets/js/bot.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(){var n,t={};function e(){}function r(n){return n}function i(n){return!!n}function o(n){return!n}var u="object"==typeof self&&self.self===self&&self||"object"==typeof global&&global.global===global&&global||this;function a(n){return function(){if(null===n)throw new Error("Callback was already called.");n.apply(this,arguments),n=null}}function c(n){return function(){null!==n&&(n.apply(this,arguments),n=null)}}null!=u&&(n=u.async),t.noConflict=function(){return u.async=n,t};var s=Object.prototype.toString,l=Array.isArray||function(n){return"[object Array]"===s.call(n)};function f(n){return l(n)||"number"==typeof n.length&&n.length>=0&&n.length%1==0}function p(n,t){for(var e=-1,r=n.length;++e<r;)t(n[e],e,n)}function h(n,t){for(var e=-1,r=n.length,i=Array(r);++e<r;)i[e]=t(n[e],e,n);return i}function y(n){return h(Array(n),function(n,t){return t})}function m(n,t){p(v(n),function(e){t(n[e],e)})}function d(n,t){for(var e=0;e<n.length;e++)if(n[e]===t)return e;return-1}var v=Object.keys||function(n){var t=[];for(var e in n)n.hasOwnProperty(e)&&t.push(e);return t};function g(n){var t,e,r=-1;return f(n)?(t=n.length,function(){return++r<t?r:null}):(e=v(n),t=e.length,function(){return++r<t?e[r]:null})}function b(n,t){return t=null==t?n.length-1:+t,function(){for(var e=Math.max(arguments.length-t,0),r=Array(e),i=0;i<e;i++)r[i]=arguments[i+t];switch(t){case 0:return n.call(this,r);case 1:return n.call(this,arguments[0],r);case 2:return n.call(this,arguments[0],arguments[1],r)}}}function k(n){return function(t,e,r){return n(t,r)}}var w="function"==typeof setImmediate&&setImmediate,j=w?function(n){w(n)}:function(n){setTimeout(n,0)};function Q(n){return function(t,r,i){i=c(i||e);var o=g(t=t||[]);if(n<=0)return i(null);var u=!1,s=0,l=!1;!function e(){if(u&&s<=0)return i(null);for(;s<n&&!l;){var c=o();if(null===c)return u=!0,void(s<=0&&i(null));s+=1,r(t[c],c,a(function(n){s-=1,n?(i(n),l=!0):e()}))}}()}}function x(n){return function(e,r,i){return n(t.eachOf,e,r,i)}}function S(n){return function(t,e,r,i){return n(Q(e),t,r,i)}}function T(n){return function(e,r,i){return n(t.eachOfSeries,e,r,i)}}function E(n,t,r,i){i=c(i||e);var o=[];n(t,function(n,t,e){r(n,function(n,r){o[t]=r,e(n)})},function(n){i(n,o)})}function O(n,t,e,r){var i=[];n(t,function(n,t,r){e(n,function(e){e&&i.push({index:t,value:n}),r()})},function(){r(h(i.sort(function(n,t){return n.index-t.index}),function(n){return n.value}))})}function I(n,t,e,r){O(n,t,function(n,t){e(n,function(n){t(!n)})},r)}function L(n,t,e){return function(r,i,o,u){function a(){u&&u(e(!1,void 0))}function c(n,r,i){if(!u)return i();o(n,function(r){u&&t(r)&&(u(e(!0,n)),u=o=!1),i()})}arguments.length>3?n(r,i,c,a):(u=o,o=i,n(r,c,a))}}function A(n,t){return t}function C(n,t,r){r=r||e;var i=f(t)?[]:{};n(t,function(n,t,e){n(b(function(n,r){r.length<=1&&(r=r[0]),i[t]=r,e(n)}))},function(n){r(n,i)})}function _(n,t,e,r){var i=[];n(t,function(n,t,r){e(n,function(n,t){i=i.concat(t||[]),r(n)})},function(n){r(n,i)})}function z(n,r,i){if(null==r)r=1;else if(0===r)throw new Error("Concurrency must not be zero");function o(n,r,i,o){if(null!=o&&"function"!=typeof o)throw new Error("task callback must be a function");if(n.started=!0,l(r)||(r=[r]),0===r.length&&n.idle())return t.setImmediate(function(){n.drain()});p(r,function(t){var r={data:t,callback:o||e};i?n.tasks.unshift(r):n.tasks.push(r),n.tasks.length===n.concurrency&&n.saturated()}),t.setImmediate(n.process)}function u(n,t){return function(){c-=1;var e=arguments;p(t,function(n){n.callback.apply(n,e)}),n.tasks.length+c===0&&n.drain(),n.process()}}var c=0,s={tasks:[],concurrency:r,payload:i,saturated:e,empty:e,drain:e,started:!1,paused:!1,push:function(n,t){o(s,n,!1,t)},kill:function(){s.drain=e,s.tasks=[]},unshift:function(n,t){o(s,n,!0,t)},process:function(){if(!s.paused&&c<s.concurrency&&s.tasks.length)for(;c<s.concurrency&&s.tasks.length;){var t=s.payload?s.tasks.splice(0,s.payload):s.tasks.splice(0,s.tasks.length),e=h(t,function(n){return n.data});0===s.tasks.length&&s.empty(),c+=1;var r=a(u(s,t));n(e,r)}},length:function(){return s.tasks.length},running:function(){return c},idle:function(){return s.tasks.length+c===0},pause:function(){s.paused=!0},resume:function(){if(!1!==s.paused){s.paused=!1;for(var n=Math.min(s.concurrency,s.tasks.length),e=1;e<=n;e++)t.setImmediate(s.process)}}};return s}function q(n){return b(function(t,e){t.apply(null,e.concat([b(function(t,e){"undefined"!=typeof console&&(t?console.error&&console.error(t):console[n]&&p(e,function(t){console[n](t)}))})]))})}function B(n){return function(t,e,r){n(y(t),e,r)}}function N(n){return b(function(t,e){var r=b(function(e){var r=this,i=e.pop();return n(t,function(n,t,i){n.apply(r,e.concat([i]))},i)});return e.length?r.apply(this,e):r})}function M(n){return b(function(e){var r=e.pop();e.push(function(){var n=arguments;i?t.setImmediate(function(){r.apply(null,n)}):r.apply(null,n)});var i=!0;n.apply(this,e),i=!1})}"object"==typeof process&&"function"==typeof process.nextTick?t.nextTick=process.nextTick:t.nextTick=j,t.setImmediate=w?j:t.nextTick,t.forEach=t.each=function(n,e,r){return t.eachOf(n,k(e),r)},t.forEachSeries=t.eachSeries=function(n,e,r){return t.eachOfSeries(n,k(e),r)},t.forEachLimit=t.eachLimit=function(n,t,e,r){return Q(t)(n,k(e),r)},t.forEachOf=t.eachOf=function(n,t,r){r=c(r||e);var i=f(n=n||[])?n.length:v(n).length,o=0;if(!i)return r(null);function u(n){n?r(n):(o+=1)>=i&&r(null)}!function(n,t){f(n)?p(n,t):m(n,t)}(n,function(e,r){t(n[r],r,a(u))})},t.forEachOfSeries=t.eachOfSeries=function(n,r,i){i=c(i||e);var o=g(n=n||[]),u=o();!function e(){var c=!0;if(null===u)return i(null);r(n[u],u,a(function(n){if(n)i(n);else{if(null===(u=o()))return i(null);c?t.nextTick(e):e()}})),c=!1}()},t.forEachOfLimit=t.eachOfLimit=function(n,t,e,r){Q(t)(n,e,r)},t.map=x(E),t.mapSeries=T(E),t.mapLimit=S(E),t.inject=t.foldl=t.reduce=function(n,e,r,i){t.eachOfSeries(n,function(n,t,i){r(e,n,function(n,t){e=t,i(n)})},function(n){i(n||null,e)})},t.foldr=t.reduceRight=function(n,e,r,i){var o=h(n,function(n){return n}).reverse();t.reduce(o,e,r,i)},t.select=t.filter=x(O),t.selectLimit=t.filterLimit=S(O),t.selectSeries=t.filterSeries=T(O),t.reject=x(I),t.rejectLimit=S(I),t.rejectSeries=T(I),t.any=t.some=L(t.eachOf,i,r),t.someLimit=L(t.eachOfLimit,i,r),t.all=t.every=L(t.eachOf,o,o),t.everyLimit=L(t.eachOfLimit,o,o),t.detect=L(t.eachOf,r,A),t.detectSeries=L(t.eachOfSeries,r,A),t.sortBy=function(n,e,r){function i(n,t){var e=n.criteria,r=t.criteria;return e<r?-1:e>r?1:0}t.map(n,function(n,t){e(n,function(e,r){e?t(e):t(null,{value:n,criteria:r})})},function(n,t){if(n)return r(n);r(null,h(t.sort(i),function(n){return n.value}))})},t.auto=function(n,r){r=c(r||e);var i=v(n),o=i.length;if(!o)return r(null);var u={},a=[];function s(n){a.unshift(n)}function f(){o--,p(a.slice(0),function(n){n()})}s(function(){o||r(null,u)}),p(i,function(e){for(var i,o=l(n[e])?n[e]:[n[e]],c=b(function(n,i){if(i.length<=1&&(i=i[0]),n){var o={};m(u,function(n,t){o[t]=n}),o[e]=i,r(n,o)}else u[e]=i,t.setImmediate(f)}),h=o.slice(0,o.length-1),y=h.length;y--;){if(!(i=n[h[y]]))throw new Error("Has inexistant dependency");if(l(i)&&d(i,e)>=0)throw new Error("Has cyclic dependencies")}function v(){return n=function(n,t){return n&&u.hasOwnProperty(t)},t=!0,p(h,function(e,r,i){t=n(t,e,r,i)}),t&&!u.hasOwnProperty(e);var n,t}v()?o[o.length-1](c,u):s(function n(){v()&&((t=d(a,n))>=0&&a.splice(t,1),o[o.length-1](c,u));var t})})},t.retry=function(n,e,r){var i=5,o=0,u=[],a={times:i,interval:o};var c=arguments.length;if(c<1||c>3)throw new Error("Invalid arguments - must be either (task), (task, callback), (times, task) or (times, task, callback)");function s(n,e){function r(n,t){return function(r){n(function(n,e){r(!n||t,{err:n,result:e})},e)}}function i(n){return function(t){setTimeout(function(){t(null)},n)}}for(;a.times;){var o=!(a.times-=1);u.push(r(a.task,o)),!o&&a.interval>0&&u.push(i(a.interval))}t.series(u,function(t,e){e=e[e.length-1],(n||a.callback)(e.err,e.result)})}return c<=2&&"function"==typeof n&&(r=e,e=n),"function"!=typeof n&&function(n,t){if("number"==typeof t)n.times=parseInt(t,10)||i;else{if("object"!=typeof t)throw new Error("Unsupported argument type for 'times': "+typeof t);n.times=parseInt(t.times,10)||i,n.interval=parseInt(t.interval,10)||o}}(a,n),a.callback=r,a.task=e,a.callback?s():s},t.waterfall=function(n,r){if(r=c(r||e),!l(n)){var i=new Error("First argument to waterfall must be an array of functions");return r(i)}if(!n.length)return r();!function n(t){return b(function(e,i){if(e)r.apply(null,[e].concat(i));else{var o=t.next();o?i.push(n(o)):i.push(r),M(t).apply(null,i)}})}(t.iterator(n))()},t.parallel=function(n,e){C(t.eachOf,n,e)},t.parallelLimit=function(n,t,e){C(Q(t),n,e)},t.series=function(n,e){C(t.eachOfSeries,n,e)},t.iterator=function(n){return function t(e){function r(){return n.length&&n[e].apply(null,arguments),r.next()}return r.next=function(){return e<n.length-1?t(e+1):null},r}(0)},t.apply=b(function(n,t){return b(function(e){return n.apply(null,t.concat(e))})}),t.concat=x(_),t.concatSeries=T(_),t.whilst=function(n,t,r){if(r=r||e,n()){var i=b(function(e,o){e?r(e):n.apply(this,o)?t(i):r(null)});t(i)}else r(null)},t.doWhilst=function(n,e,r){var i=0;return t.whilst(function(){return++i<=1||e.apply(this,arguments)},n,r)},t.until=function(n,e,r){return t.whilst(function(){return!n.apply(this,arguments)},e,r)},t.doUntil=function(n,e,r){return t.doWhilst(n,function(){return!e.apply(this,arguments)},r)},t.during=function(n,t,r){r=r||e;var i=b(function(t,e){t?r(t):(e.push(o),n.apply(this,e))}),o=function(n,e){n?r(n):e?t(i):r(null)};n(o)},t.doDuring=function(n,e,r){var i=0;t.during(function(n){i++<1?n(null,!0):e.apply(this,arguments)},n,r)},t.queue=function(n,t){return z(function(t,e){n(t[0],e)},t,1)},t.priorityQueue=function(n,r){function i(n,t){return n.priority-t.priority}var o=t.queue(n,r);return o.push=function(n,r,u){!function(n,r,o,u){if(null!=u&&"function"!=typeof u)throw new Error("task callback must be a function");if(n.started=!0,l(r)||(r=[r]),0===r.length)return t.setImmediate(function(){n.drain()});p(r,function(r){var a={data:r,priority:o,callback:"function"==typeof u?u:e};n.tasks.splice(function(n,t,e){for(var r=-1,i=n.length-1;r<i;){var o=r+(i-r+1>>>1);e(t,n[o])>=0?r=o:i=o-1}return r}(n.tasks,a,i)+1,0,a),n.tasks.length===n.concurrency&&n.saturated(),t.setImmediate(n.process)})}(o,n,r,u)},delete o.unshift,o},t.cargo=function(n,t){return z(n,1,t)},t.log=q("log"),t.dir=q("dir"),t.memoize=function(n,e){var r={},i={};e=e||function(n){return n};var o=b(function(o){var u=o.pop(),a=e.apply(null,o);a in r?t.nextTick(function(){u.apply(null,r[a])}):a in i?i[a].push(u):(i[a]=[u],n.apply(null,o.concat([b(function(n){r[a]=n;var t=i[a];delete i[a];for(var e=0,o=t.length;e<o;e++)t[e].apply(null,n)})])))});return o.memo=r,o.unmemoized=n,o},t.unmemoize=function(n){return function(){return(n.unmemoized||n).apply(null,arguments)}},t.times=B(t.map),t.timesSeries=B(t.mapSeries),t.timesLimit=function(n,e,r,i){return t.mapLimit(y(n),e,r,i)},t.seq=function(){var n=arguments;return b(function(r){var i=this,o=r[r.length-1];"function"==typeof o?r.pop():o=e,t.reduce(n,r,function(n,t,e){t.apply(i,n.concat([b(function(n,t){e(n,t)})]))},function(n,t){o.apply(i,[n].concat(t))})})},t.compose=function(){return t.seq.apply(null,Array.prototype.reverse.call(arguments))},t.applyEach=N(t.eachOf),t.applyEachSeries=N(t.eachOfSeries),t.forever=function(n,t){var r=a(t||e),i=M(n);!function n(t){if(t)return r(t);i(n)}()},t.ensureAsync=M,t.constant=b(function(n){var t=[null].concat(n);return function(n){return n.apply(this,t)}}),t.wrapSync=t.asyncify=function(n){return b(function(t){var e,r=t.pop();try{e=n.apply(this,t)}catch(n){return r(n)}r(null,e)})},"undefined"!=typeof module&&module.exports?module.exports=t:"undefined"!=typeof define&&define.amd?define([],function(){return t}):u.async=t}();var conversationPos,DEBUG=!1,context={},conversationStarted=!1;function getCurrentTime(){var n=new Date,t=n.getHours(),e=n.getMinutes(),r=t>=12?"PM":"AM";return(t=(t%=12)||12)+":"+(e=e<10?"0"+e:e)+" "+r}function _phpCastString(n){switch(typeof n){case"boolean":return n?"1":"";case"string":return n;case"number":return isNaN(n)?"NAN":isFinite(n)?n+"":(n<0?"-":"")+"INF";case"undefined":return"";case"object":return Array.isArray(n)?"Array":null!==n?"Object":"";case"function":default:throw new Error("Unsupported value type")}}function strip_tags(n,t){t=(((t||"")+"").toLowerCase().match(/<[a-z][a-z0-9]*>/g)||[]).join("");var e=/<\/?([a-z0-9]*)\b[^>]*>?/gi,r=/<!--[\s\S]*?-->|<\?(?:php)?[\s\S]*?\?>/gi,i=_phpCastString(n);for(i="<"===i.substring(i.length-1)?i.substring(0,i.length-1):i;;){if(i===(i=i.replace(r,"").replace(e,function(n,e){return t.indexOf("<"+e.toLowerCase()+">")>-1?n:""})))return i}}function renderStatement(n){n=strip_tags(n),jQuery(".chat-container").append('<div class="chat-message-wrapper"><div class="absolute-wrapper"><div class="message-details"><div class="bot-avatar"></div><span class="message-date">'+getCurrentTime()+'</span></div></div><p class="chat-message">'+n+"</p></div>")}function showTyping(){jQuery(".chat-container").append('<div class="typing-wrapper"><div class="bot-avatar"></div><span class="bot-name">'+botName+'</span><p class="chat-message typing"><span class="dot"></span><span class="dot"></span><span class="dot"></span></p></div>')}function hideTyping(){jQuery(".typing-wrapper").remove()}var chatWrapper=jQuery(".bot-chat-wrapper");function scrollToBottom(){chatWrapper.animate({scrollTop:600},"slow")}function inputError(n){jQuery(".bot-error p").text(n),jQuery(".bot-error").animate({bottom:0},500).delay(3e3).animate({bottom:"-70px"},500)}function checkInput(n){var t=jQuery(".bot-container input[type=text]").val();return(t=strip_tags(t)).length>2?showResponse(n):inputError(botVars.validationName),!1}function checkEmail(n){var t=jQuery(".bot-container input[type=email]").val(),e=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(String(t.toLowerCase()));if(t.length>7&&!0===e){var r="action=wpmm_add_subscriber&"+jQuery(".bot-container input[type=email]").serialize();jQuery.post(wpmm_vars.ajax_url,r,function(n){if(!n.success)return alert(n.data),!1},"json"),showResponse(n)}else inputError(botVars.validationEmail);return!1}function clearChat(){jQuery(".chat-container").empty()}function clearFooter(){jQuery(".choices").empty(),jQuery(".input").empty()}function startConversation(n,t){if(conversationStarted)return!1;conversationStarted=!0,clearFooter(),clearChat(),conversationPos=n,jQuery.getScript(botVars.uploadsBaseUrl+"data.js",function(n){showStatement(t)})}function showStatement(n){var t,e=conversationData[conversationPos][n];"sideeffect"in e&&jQuery.type("function"===e.sideeffect)&&e.sideeffect(context),"array"===jQuery.type(e.statement)?t=e.statement:"string"===jQuery.type(e.statement)?t=[e.statement]:"function"===jQuery.type(e.statement)&&(t=e.statement(context)),async.eachSeries(t,function(n,t){if(showTyping(),scrollToBottom(),n.length<=50)var e=1800;else e=n.length/3*30*(Math.floor(5*Math.random())+1.2);DEBUG&&(e=0),setTimeout(function(){hideTyping(),renderStatement(n),scrollToBottom(),t()},e)},function(n){if("options"in e){jQuery(".input").hide(),jQuery(".choices").show();var t=e.options;t.length>0&&setTimeout(function(){for(var n=0;n<t.length;n++){var e,r=t[n];null===r.consequence?(e=null,"disabled"):(e=function(n){showResponse(n)}.bind(null,r),"");jQuery("<p/>",{text:r.choice,class:"chat-message user",click:e}).appendTo(".choices")}},750)}else if("input"in e){jQuery(".input").show(),jQuery(".choices").hide();var r=e.input,i=jQuery("<form/>",{submit:checkInput.bind(null,r)}),o=jQuery("<p/>",{class:"chat-message user"}).appendTo(i),u=jQuery("<input/>",{type:"text",placeholder:botVars.typeName,name:r.name,autocomplete:"off",required:!0}).appendTo(o);jQuery("<a/>",{text:botVars.send,click:checkInput.bind(null,r)}).appendTo(o);i.appendTo(".input"),async.nextTick(function(){u.focus()})}else if("email"in e){jQuery(".input").show(),jQuery(".choices").hide();r=e.email,i=jQuery("<form/>",{class:"bot_subscribe_form",submit:checkEmail.bind(null,r)}),o=jQuery("<p/>",{class:"chat-message user"}).appendTo(i),u=jQuery("<input/>",{type:"email",placeholder:botVars.typeEmail,name:r.email,autocomplete:"off"}).appendTo(o),jQuery("<a/>",{text:botVars.send,click:checkEmail.bind(null,r)}).appendTo(o);i.appendTo(".input"),async.nextTick(function(){u.focus()})}scrollToBottom()})}function showResponse(n){var t="";"name"in n?(context[n.name]=jQuery(".bot-container input[type=text]").val(),t=context[n.name]):"email"in n?(context[n.email]=jQuery(".bot-container input[type=email]").val(),t=context[n.email]):t=n.choice,clearFooter(),t=strip_tags(t),jQuery(".chat-container").append('<p class="chat-message user">'+t+"</p>"),"consequence"in n&&showStatement(n.consequence)}startConversation("homepage",1);
|
1 |
+
!function(){var n,t={};function e(){}function r(n){return n}function i(n){return!!n}function o(n){return!n}var u="object"==typeof self&&self.self===self&&self||"object"==typeof global&&global.global===global&&global||this;function a(n){return function(){if(null===n)throw new Error("Callback was already called.");n.apply(this,arguments),n=null}}function c(n){return function(){null!==n&&(n.apply(this,arguments),n=null)}}null!=u&&(n=u.async),t.noConflict=function(){return u.async=n,t};var s=Object.prototype.toString,l=Array.isArray||function(n){return"[object Array]"===s.call(n)};function f(n){return l(n)||"number"==typeof n.length&&n.length>=0&&n.length%1==0}function p(n,t){for(var e=-1,r=n.length;++e<r;)t(n[e],e,n)}function h(n,t){for(var e=-1,r=n.length,i=Array(r);++e<r;)i[e]=t(n[e],e,n);return i}function y(n){return h(Array(n),function(n,t){return t})}function m(n,t){p(v(n),function(e){t(n[e],e)})}function d(n,t){for(var e=0;e<n.length;e++)if(n[e]===t)return e;return-1}var v=Object.keys||function(n){var t=[];for(var e in n)n.hasOwnProperty(e)&&t.push(e);return t};function g(n){var t,e,r=-1;return f(n)?(t=n.length,function(){return++r<t?r:null}):(e=v(n),t=e.length,function(){return++r<t?e[r]:null})}function b(n,t){return t=null==t?n.length-1:+t,function(){for(var e=Math.max(arguments.length-t,0),r=Array(e),i=0;i<e;i++)r[i]=arguments[i+t];switch(t){case 0:return n.call(this,r);case 1:return n.call(this,arguments[0],r);case 2:return n.call(this,arguments[0],arguments[1],r)}}}function k(n){return function(t,e,r){return n(t,r)}}var w="function"==typeof setImmediate&&setImmediate,j=w?function(n){w(n)}:function(n){setTimeout(n,0)};function Q(n){return function(t,r,i){i=c(i||e);var o=g(t=t||[]);if(n<=0)return i(null);var u=!1,s=0,l=!1;!function e(){if(u&&s<=0)return i(null);for(;s<n&&!l;){var c=o();if(null===c)return u=!0,void(s<=0&&i(null));s+=1,r(t[c],c,a(function(n){s-=1,n?(i(n),l=!0):e()}))}}()}}function x(n){return function(e,r,i){return n(t.eachOf,e,r,i)}}function S(n){return function(t,e,r,i){return n(Q(e),t,r,i)}}function T(n){return function(e,r,i){return n(t.eachOfSeries,e,r,i)}}function E(n,t,r,i){i=c(i||e);var o=[];n(t,function(n,t,e){r(n,function(n,r){o[t]=r,e(n)})},function(n){i(n,o)})}function O(n,t,e,r){var i=[];n(t,function(n,t,r){e(n,function(e){e&&i.push({index:t,value:n}),r()})},function(){r(h(i.sort(function(n,t){return n.index-t.index}),function(n){return n.value}))})}function I(n,t,e,r){O(n,t,function(n,t){e(n,function(n){t(!n)})},r)}function L(n,t,e){return function(r,i,o,u){function a(){u&&u(e(!1,void 0))}function c(n,r,i){if(!u)return i();o(n,function(r){u&&t(r)&&(u(e(!0,n)),u=o=!1),i()})}arguments.length>3?n(r,i,c,a):(u=o,o=i,n(r,c,a))}}function A(n,t){return t}function _(n,t,r){r=r||e;var i=f(t)?[]:{};n(t,function(n,t,e){n(b(function(n,r){r.length<=1&&(r=r[0]),i[t]=r,e(n)}))},function(n){r(n,i)})}function C(n,t,e,r){var i=[];n(t,function(n,t,r){e(n,function(n,t){i=i.concat(t||[]),r(n)})},function(n){r(n,i)})}function z(n,r,i){if(null==r)r=1;else if(0===r)throw new Error("Concurrency must not be zero");function o(n,r,i,o){if(null!=o&&"function"!=typeof o)throw new Error("task callback must be a function");if(n.started=!0,l(r)||(r=[r]),0===r.length&&n.idle())return t.setImmediate(function(){n.drain()});p(r,function(t){var r={data:t,callback:o||e};i?n.tasks.unshift(r):n.tasks.push(r),n.tasks.length===n.concurrency&&n.saturated()}),t.setImmediate(n.process)}function u(n,t){return function(){c-=1;var e=arguments;p(t,function(n){n.callback.apply(n,e)}),n.tasks.length+c===0&&n.drain(),n.process()}}var c=0,s={tasks:[],concurrency:r,payload:i,saturated:e,empty:e,drain:e,started:!1,paused:!1,push:function(n,t){o(s,n,!1,t)},kill:function(){s.drain=e,s.tasks=[]},unshift:function(n,t){o(s,n,!0,t)},process:function(){if(!s.paused&&c<s.concurrency&&s.tasks.length)for(;c<s.concurrency&&s.tasks.length;){var t=s.payload?s.tasks.splice(0,s.payload):s.tasks.splice(0,s.tasks.length),e=h(t,function(n){return n.data});0===s.tasks.length&&s.empty(),c+=1;var r=a(u(s,t));n(e,r)}},length:function(){return s.tasks.length},running:function(){return c},idle:function(){return s.tasks.length+c===0},pause:function(){s.paused=!0},resume:function(){if(!1!==s.paused){s.paused=!1;for(var n=Math.min(s.concurrency,s.tasks.length),e=1;e<=n;e++)t.setImmediate(s.process)}}};return s}function q(n){return b(function(t,e){t.apply(null,e.concat([b(function(t,e){"undefined"!=typeof console&&(t?console.error&&console.error(t):console[n]&&p(e,function(t){console[n](t)}))})]))})}function B(n){return function(t,e,r){n(y(t),e,r)}}function N(n){return b(function(t,e){var r=b(function(e){var r=this,i=e.pop();return n(t,function(n,t,i){n.apply(r,e.concat([i]))},i)});return e.length?r.apply(this,e):r})}function V(n){return b(function(e){var r=e.pop();e.push(function(){var n=arguments;i?t.setImmediate(function(){r.apply(null,n)}):r.apply(null,n)});var i=!0;n.apply(this,e),i=!1})}"object"==typeof process&&"function"==typeof process.nextTick?t.nextTick=process.nextTick:t.nextTick=j,t.setImmediate=w?j:t.nextTick,t.forEach=t.each=function(n,e,r){return t.eachOf(n,k(e),r)},t.forEachSeries=t.eachSeries=function(n,e,r){return t.eachOfSeries(n,k(e),r)},t.forEachLimit=t.eachLimit=function(n,t,e,r){return Q(t)(n,k(e),r)},t.forEachOf=t.eachOf=function(n,t,r){r=c(r||e);var i=f(n=n||[])?n.length:v(n).length,o=0;if(!i)return r(null);function u(n){n?r(n):(o+=1)>=i&&r(null)}!function(n,t){f(n)?p(n,t):m(n,t)}(n,function(e,r){t(n[r],r,a(u))})},t.forEachOfSeries=t.eachOfSeries=function(n,r,i){i=c(i||e);var o=g(n=n||[]),u=o();!function e(){var c=!0;if(null===u)return i(null);r(n[u],u,a(function(n){if(n)i(n);else{if(null===(u=o()))return i(null);c?t.nextTick(e):e()}})),c=!1}()},t.forEachOfLimit=t.eachOfLimit=function(n,t,e,r){Q(t)(n,e,r)},t.map=x(E),t.mapSeries=T(E),t.mapLimit=S(E),t.inject=t.foldl=t.reduce=function(n,e,r,i){t.eachOfSeries(n,function(n,t,i){r(e,n,function(n,t){e=t,i(n)})},function(n){i(n||null,e)})},t.foldr=t.reduceRight=function(n,e,r,i){var o=h(n,function(n){return n}).reverse();t.reduce(o,e,r,i)},t.select=t.filter=x(O),t.selectLimit=t.filterLimit=S(O),t.selectSeries=t.filterSeries=T(O),t.reject=x(I),t.rejectLimit=S(I),t.rejectSeries=T(I),t.any=t.some=L(t.eachOf,i,r),t.someLimit=L(t.eachOfLimit,i,r),t.all=t.every=L(t.eachOf,o,o),t.everyLimit=L(t.eachOfLimit,o,o),t.detect=L(t.eachOf,r,A),t.detectSeries=L(t.eachOfSeries,r,A),t.sortBy=function(n,e,r){function i(n,t){var e=n.criteria,r=t.criteria;return e<r?-1:e>r?1:0}t.map(n,function(n,t){e(n,function(e,r){e?t(e):t(null,{value:n,criteria:r})})},function(n,t){if(n)return r(n);r(null,h(t.sort(i),function(n){return n.value}))})},t.auto=function(n,r){r=c(r||e);var i=v(n),o=i.length;if(!o)return r(null);var u={},a=[];function s(n){a.unshift(n)}function f(){o--,p(a.slice(0),function(n){n()})}s(function(){o||r(null,u)}),p(i,function(e){for(var i,o=l(n[e])?n[e]:[n[e]],c=b(function(n,i){if(i.length<=1&&(i=i[0]),n){var o={};m(u,function(n,t){o[t]=n}),o[e]=i,r(n,o)}else u[e]=i,t.setImmediate(f)}),h=o.slice(0,o.length-1),y=h.length;y--;){if(!(i=n[h[y]]))throw new Error("Has inexistant dependency");if(l(i)&&d(i,e)>=0)throw new Error("Has cyclic dependencies")}function v(){return n=function(n,t){return n&&u.hasOwnProperty(t)},t=!0,p(h,function(e,r,i){t=n(t,e,r,i)}),t&&!u.hasOwnProperty(e);var n,t}v()?o[o.length-1](c,u):s(function n(){v()&&((t=d(a,n))>=0&&a.splice(t,1),o[o.length-1](c,u));var t})})},t.retry=function(n,e,r){var i=5,o=0,u=[],a={times:i,interval:o};var c=arguments.length;if(c<1||c>3)throw new Error("Invalid arguments - must be either (task), (task, callback), (times, task) or (times, task, callback)");function s(n,e){function r(n,t){return function(r){n(function(n,e){r(!n||t,{err:n,result:e})},e)}}function i(n){return function(t){setTimeout(function(){t(null)},n)}}for(;a.times;){var o=!(a.times-=1);u.push(r(a.task,o)),!o&&a.interval>0&&u.push(i(a.interval))}t.series(u,function(t,e){e=e[e.length-1],(n||a.callback)(e.err,e.result)})}return c<=2&&"function"==typeof n&&(r=e,e=n),"function"!=typeof n&&function(n,t){if("number"==typeof t)n.times=parseInt(t,10)||i;else{if("object"!=typeof t)throw new Error("Unsupported argument type for 'times': "+typeof t);n.times=parseInt(t.times,10)||i,n.interval=parseInt(t.interval,10)||o}}(a,n),a.callback=r,a.task=e,a.callback?s():s},t.waterfall=function(n,r){if(r=c(r||e),!l(n)){var i=new Error("First argument to waterfall must be an array of functions");return r(i)}if(!n.length)return r();!function n(t){return b(function(e,i){if(e)r.apply(null,[e].concat(i));else{var o=t.next();o?i.push(n(o)):i.push(r),V(t).apply(null,i)}})}(t.iterator(n))()},t.parallel=function(n,e){_(t.eachOf,n,e)},t.parallelLimit=function(n,t,e){_(Q(t),n,e)},t.series=function(n,e){_(t.eachOfSeries,n,e)},t.iterator=function(n){return function t(e){function r(){return n.length&&n[e].apply(null,arguments),r.next()}return r.next=function(){return e<n.length-1?t(e+1):null},r}(0)},t.apply=b(function(n,t){return b(function(e){return n.apply(null,t.concat(e))})}),t.concat=x(C),t.concatSeries=T(C),t.whilst=function(n,t,r){if(r=r||e,n()){var i=b(function(e,o){e?r(e):n.apply(this,o)?t(i):r(null)});t(i)}else r(null)},t.doWhilst=function(n,e,r){var i=0;return t.whilst(function(){return++i<=1||e.apply(this,arguments)},n,r)},t.until=function(n,e,r){return t.whilst(function(){return!n.apply(this,arguments)},e,r)},t.doUntil=function(n,e,r){return t.doWhilst(n,function(){return!e.apply(this,arguments)},r)},t.during=function(n,t,r){r=r||e;var i=b(function(t,e){t?r(t):(e.push(o),n.apply(this,e))}),o=function(n,e){n?r(n):e?t(i):r(null)};n(o)},t.doDuring=function(n,e,r){var i=0;t.during(function(n){i++<1?n(null,!0):e.apply(this,arguments)},n,r)},t.queue=function(n,t){return z(function(t,e){n(t[0],e)},t,1)},t.priorityQueue=function(n,r){function i(n,t){return n.priority-t.priority}var o=t.queue(n,r);return o.push=function(n,r,u){!function(n,r,o,u){if(null!=u&&"function"!=typeof u)throw new Error("task callback must be a function");if(n.started=!0,l(r)||(r=[r]),0===r.length)return t.setImmediate(function(){n.drain()});p(r,function(r){var a={data:r,priority:o,callback:"function"==typeof u?u:e};n.tasks.splice(function(n,t,e){for(var r=-1,i=n.length-1;r<i;){var o=r+(i-r+1>>>1);e(t,n[o])>=0?r=o:i=o-1}return r}(n.tasks,a,i)+1,0,a),n.tasks.length===n.concurrency&&n.saturated(),t.setImmediate(n.process)})}(o,n,r,u)},delete o.unshift,o},t.cargo=function(n,t){return z(n,1,t)},t.log=q("log"),t.dir=q("dir"),t.memoize=function(n,e){var r={},i={};e=e||function(n){return n};var o=b(function(o){var u=o.pop(),a=e.apply(null,o);a in r?t.nextTick(function(){u.apply(null,r[a])}):a in i?i[a].push(u):(i[a]=[u],n.apply(null,o.concat([b(function(n){r[a]=n;var t=i[a];delete i[a];for(var e=0,o=t.length;e<o;e++)t[e].apply(null,n)})])))});return o.memo=r,o.unmemoized=n,o},t.unmemoize=function(n){return function(){return(n.unmemoized||n).apply(null,arguments)}},t.times=B(t.map),t.timesSeries=B(t.mapSeries),t.timesLimit=function(n,e,r,i){return t.mapLimit(y(n),e,r,i)},t.seq=function(){var n=arguments;return b(function(r){var i=this,o=r[r.length-1];"function"==typeof o?r.pop():o=e,t.reduce(n,r,function(n,t,e){t.apply(i,n.concat([b(function(n,t){e(n,t)})]))},function(n,t){o.apply(i,[n].concat(t))})})},t.compose=function(){return t.seq.apply(null,Array.prototype.reverse.call(arguments))},t.applyEach=N(t.eachOf),t.applyEachSeries=N(t.eachOfSeries),t.forever=function(n,t){var r=a(t||e),i=V(n);!function n(t){if(t)return r(t);i(n)}()},t.ensureAsync=V,t.constant=b(function(n){var t=[null].concat(n);return function(n){return n.apply(this,t)}}),t.wrapSync=t.asyncify=function(n){return b(function(t){var e,r=t.pop();try{e=n.apply(this,t)}catch(n){return r(n)}r(null,e)})},"undefined"!=typeof module&&module.exports?module.exports=t:"undefined"!=typeof define&&define.amd?define([],function(){return t}):u.async=t}();var conversationPos,DEBUG=!1,context={},conversationStarted=!1;function getCurrentTime(){var n=new Date,t=n.getHours(),e=n.getMinutes(),r=t>=12?"PM":"AM";return(t=(t%=12)||12)+":"+(e=e<10?"0"+e:e)+" "+r}function _phpCastString(n){switch(typeof n){case"boolean":return n?"1":"";case"string":return n;case"number":return isNaN(n)?"NAN":isFinite(n)?n+"":(n<0?"-":"")+"INF";case"undefined":return"";case"object":return Array.isArray(n)?"Array":null!==n?"Object":"";case"function":default:throw new Error("Unsupported value type")}}function strip_tags(n,t){t=(((t||"")+"").toLowerCase().match(/<[a-z][a-z0-9]*>/g)||[]).join("");var e=/<\/?([a-z0-9]*)\b[^>]*>?/gi,r=/<!--[\s\S]*?-->|<\?(?:php)?[\s\S]*?\?>/gi,i=_phpCastString(n);for(i="<"===i.substring(i.length-1)?i.substring(0,i.length-1):i;;){if(i===(i=i.replace(r,"").replace(e,function(n,e){return t.indexOf("<"+e.toLowerCase()+">")>-1?n:""})))return i}}function renderStatement(n){n=strip_tags(n),jQuery(".chat-container").append('<div class="chat-message-wrapper"><div class="absolute-wrapper"><div class="message-details"><div class="bot-avatar"></div><span class="message-date">'+getCurrentTime()+'</span></div></div><p class="chat-message">'+n+"</p></div>")}function showTyping(){jQuery(".chat-container").append('<div class="typing-wrapper"><div class="bot-avatar"></div><span class="bot-name">'+botName+'</span><p class="chat-message typing"><span class="dot"></span><span class="dot"></span><span class="dot"></span></p></div>')}function hideTyping(){jQuery(".typing-wrapper").remove()}var chatWrapper=jQuery(".bot-chat-wrapper");function scrollToBottom(){chatWrapper.animate({scrollTop:600},"slow")}function inputError(n){jQuery(".bot-error p").text(n),jQuery(".bot-error").animate({bottom:0},500).delay(3e3).animate({bottom:"-70px"},500)}function checkInput(n){var t=jQuery(".bot-container input[type=text]").val();return(t=strip_tags(t)).length>2?showResponse(n):inputError(botVars.validationName),!1}function checkEmail(n){var t=jQuery(".bot-container input[type=email]").val(),e=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(String(t.toLowerCase()));if(t.length>7&&!0===e){var r="action=wpmm_add_subscriber&"+jQuery(".bot_subscribe_form").serialize();jQuery.post(wpmm_vars.ajax_url,r,function(n){if(!n.success)return alert(n.data),!1},"json"),showResponse(n)}else inputError(botVars.validationEmail);return!1}function clearChat(){jQuery(".chat-container").empty()}function clearFooter(){jQuery(".choices").empty(),jQuery(".input").empty()}function startConversation(n,t){if(conversationStarted)return!1;conversationStarted=!0,clearFooter(),clearChat(),conversationPos=n,jQuery.getScript(botVars.uploadsBaseUrl+"data.js",function(n){showStatement(t)})}function showStatement(n){var t,e=conversationData[conversationPos][n];"sideeffect"in e&&jQuery.type("function"===e.sideeffect)&&e.sideeffect(context),"array"===jQuery.type(e.statement)?t=e.statement:"string"===jQuery.type(e.statement)?t=[e.statement]:"function"===jQuery.type(e.statement)&&(t=e.statement(context)),async.eachSeries(t,function(n,t){if(showTyping(),scrollToBottom(),n.length<=50)var e=1800;else e=n.length/3*30*(Math.floor(5*Math.random())+1.2);DEBUG&&(e=0),setTimeout(function(){hideTyping(),renderStatement(n),scrollToBottom(),t()},e)},function(n){if("options"in e){jQuery(".input").hide(),jQuery(".choices").show();var t=e.options;t.length>0&&setTimeout(function(){for(var n=0;n<t.length;n++){var e,r=t[n];null===r.consequence?(e=null,"disabled"):(e=function(n){showResponse(n)}.bind(null,r),"");jQuery("<p/>",{text:r.choice,class:"chat-message user",click:e}).appendTo(".choices")}},750)}else if("input"in e){jQuery(".input").show(),jQuery(".choices").hide();var r=e.input,i=jQuery("<form/>",{submit:checkInput.bind(null,r)}),o=jQuery("<p/>",{class:"chat-message user"}).appendTo(i),u=jQuery("<input/>",{type:"text",placeholder:botVars.typeName,name:r.name,autocomplete:"off",required:!0}).appendTo(o);jQuery("<a/>",{text:botVars.send,click:checkInput.bind(null,r)}).appendTo(o);i.appendTo(".input"),async.nextTick(function(){u.focus()})}else if("email"in e){jQuery(".input").show(),jQuery(".choices").hide();r=e.email,i=jQuery("<form/>",{class:"bot_subscribe_form",submit:checkEmail.bind(null,r)}),o=jQuery("<p/>",{class:"chat-message user"}).appendTo(i),u=jQuery("<input/>",{type:"hidden",name:"_wpnonce",value:botVars.wpnonce}).appendTo(o),u=jQuery("<input/>",{type:"email",placeholder:botVars.typeEmail,name:r.email,autocomplete:"off"}).appendTo(o),jQuery("<a/>",{text:botVars.send,click:checkEmail.bind(null,r)}).appendTo(o);i.appendTo(".input"),async.nextTick(function(){u.focus()})}scrollToBottom()})}function showResponse(n){var t="";"name"in n?(context[n.name]=jQuery(".bot-container input[type=text]").val(),t=context[n.name]):"email"in n?(context[n.email]=jQuery(".bot-container input[type=email]").val(),t=context[n.email]):t=n.choice,clearFooter(),t=strip_tags(t),jQuery(".chat-container").append('<p class="chat-message user">'+t+"</p>"),"consequence"in n&&showStatement(n.consequence)}startConversation("homepage",1);
|
includes/classes/wp-maintenance-mode.php
CHANGED
@@ -6,7 +6,7 @@ if ( ! class_exists( 'WP_Maintenance_Mode' ) ) {
|
|
6 |
|
7 |
class WP_Maintenance_Mode {
|
8 |
|
9 |
-
const VERSION = '2.4.
|
10 |
|
11 |
protected $plugin_slug = 'wp-maintenance-mode';
|
12 |
protected $plugin_settings;
|
@@ -658,6 +658,7 @@ if ( ! class_exists( 'WP_Maintenance_Mode' ) ) {
|
|
658 |
'typeName' => ! empty( $this->plugin_settings['bot']['responses']['01'] ) ? $this->plugin_settings['bot']['responses']['01'] : __( 'Type your name here…', 'wp-maintenance-mode' ),
|
659 |
'typeEmail' => ! empty( $this->plugin_settings['bot']['responses']['03'] ) ? $this->plugin_settings['bot']['responses']['03'] : __( 'Type your email here…', 'wp-maintenance-mode' ),
|
660 |
'send' => __( 'Send', 'wp-maintenance-mode' ),
|
|
|
661 |
);
|
662 |
echo "<script type='text/javascript'>" .
|
663 |
'var botVars = ' . wp_json_encode( $bot_vars ) .
|
6 |
|
7 |
class WP_Maintenance_Mode {
|
8 |
|
9 |
+
const VERSION = '2.4.7';
|
10 |
|
11 |
protected $plugin_slug = 'wp-maintenance-mode';
|
12 |
protected $plugin_settings;
|
658 |
'typeName' => ! empty( $this->plugin_settings['bot']['responses']['01'] ) ? $this->plugin_settings['bot']['responses']['01'] : __( 'Type your name here…', 'wp-maintenance-mode' ),
|
659 |
'typeEmail' => ! empty( $this->plugin_settings['bot']['responses']['03'] ) ? $this->plugin_settings['bot']['responses']['03'] : __( 'Type your email here…', 'wp-maintenance-mode' ),
|
660 |
'send' => __( 'Send', 'wp-maintenance-mode' ),
|
661 |
+
'wpnonce' => wp_create_nonce( 'wpmts_nonce_subscribe' ),
|
662 |
);
|
663 |
echo "<script type='text/javascript'>" .
|
664 |
'var botVars = ' . wp_json_encode( $bot_vars ) .
|
readme.txt
CHANGED
@@ -7,7 +7,7 @@ Author URI: https://themeisle.com/
|
|
7 |
Tags: maintenance mode, admin, administration, unavailable, coming soon, multisite, landing page, under construction, contact form, subscribe, countdown
|
8 |
Requires at least: 3.5
|
9 |
Tested up to: 6.0
|
10 |
-
Stable tag: 2.4.
|
11 |
Requires PHP: 5.6
|
12 |
License: GPL-2.0+
|
13 |
|
@@ -91,6 +91,16 @@ Notice: `wp-cron.php` is excluded by default.
|
|
91 |
|
92 |
== Changelog ==
|
93 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
94 |
##### [Version 2.4.6](https://github.com/Codeinwp/wp-maintenance-mode/compare/v2.4.5...v2.4.6) (2022-06-15)
|
95 |
|
96 |
* Improve data sanitizations for custom css and contact module
|
7 |
Tags: maintenance mode, admin, administration, unavailable, coming soon, multisite, landing page, under construction, contact form, subscribe, countdown
|
8 |
Requires at least: 3.5
|
9 |
Tested up to: 6.0
|
10 |
+
Stable tag: 2.4.7
|
11 |
Requires PHP: 5.6
|
12 |
License: GPL-2.0+
|
13 |
|
91 |
|
92 |
== Changelog ==
|
93 |
|
94 |
+
##### [Version 2.4.7](https://github.com/Codeinwp/wp-maintenance-mode/compare/v2.4.6...v2.4.7) (2022-08-08)
|
95 |
+
|
96 |
+
##### Fixes
|
97 |
+
* Fix login form display
|
98 |
+
* Fix email collecting by the bot
|
99 |
+
* Improve accessibility of the maintenance page thanks to @SophieWeb
|
100 |
+
|
101 |
+
|
102 |
+
|
103 |
+
|
104 |
##### [Version 2.4.6](https://github.com/Codeinwp/wp-maintenance-mode/compare/v2.4.5...v2.4.6) (2022-06-15)
|
105 |
|
106 |
* Improve data sanitizations for custom css and contact module
|
vendor/autoload.php
CHANGED
@@ -9,4 +9,4 @@ if (PHP_VERSION_ID < 50600) {
|
|
9 |
|
10 |
require_once __DIR__ . '/composer/autoload_real.php';
|
11 |
|
12 |
-
return
|
9 |
|
10 |
require_once __DIR__ . '/composer/autoload_real.php';
|
11 |
|
12 |
+
return ComposerAutoloaderInita66cc34bb600909a53f8f21f57d9450c::getLoader();
|
vendor/composer/autoload_real.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
-
class
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
@@ -22,18 +22,18 @@ class ComposerAutoloaderInitf69145d00ee4cc75331087fa8e1d13e6
|
|
22 |
return self::$loader;
|
23 |
}
|
24 |
|
25 |
-
spl_autoload_register(array('
|
26 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
|
27 |
-
spl_autoload_unregister(array('
|
28 |
|
29 |
require __DIR__ . '/autoload_static.php';
|
30 |
-
call_user_func(\Composer\Autoload\
|
31 |
|
32 |
$loader->register(true);
|
33 |
|
34 |
-
$includeFiles = \Composer\Autoload\
|
35 |
foreach ($includeFiles as $fileIdentifier => $file) {
|
36 |
-
|
37 |
}
|
38 |
|
39 |
return $loader;
|
@@ -45,7 +45,7 @@ class ComposerAutoloaderInitf69145d00ee4cc75331087fa8e1d13e6
|
|
45 |
* @param string $file
|
46 |
* @return void
|
47 |
*/
|
48 |
-
function
|
49 |
{
|
50 |
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
51 |
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
+
class ComposerAutoloaderInita66cc34bb600909a53f8f21f57d9450c
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
22 |
return self::$loader;
|
23 |
}
|
24 |
|
25 |
+
spl_autoload_register(array('ComposerAutoloaderInita66cc34bb600909a53f8f21f57d9450c', 'loadClassLoader'), true, true);
|
26 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
|
27 |
+
spl_autoload_unregister(array('ComposerAutoloaderInita66cc34bb600909a53f8f21f57d9450c', 'loadClassLoader'));
|
28 |
|
29 |
require __DIR__ . '/autoload_static.php';
|
30 |
+
call_user_func(\Composer\Autoload\ComposerStaticInita66cc34bb600909a53f8f21f57d9450c::getInitializer($loader));
|
31 |
|
32 |
$loader->register(true);
|
33 |
|
34 |
+
$includeFiles = \Composer\Autoload\ComposerStaticInita66cc34bb600909a53f8f21f57d9450c::$files;
|
35 |
foreach ($includeFiles as $fileIdentifier => $file) {
|
36 |
+
composerRequirea66cc34bb600909a53f8f21f57d9450c($fileIdentifier, $file);
|
37 |
}
|
38 |
|
39 |
return $loader;
|
45 |
* @param string $file
|
46 |
* @return void
|
47 |
*/
|
48 |
+
function composerRequirea66cc34bb600909a53f8f21f57d9450c($fileIdentifier, $file)
|
49 |
{
|
50 |
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
51 |
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
|
vendor/composer/autoload_static.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
-
class
|
8 |
{
|
9 |
public static $files = array (
|
10 |
'7c3f92ec501ce72fe4f09265dc506991' => __DIR__ . '/..' . '/codeinwp/themeisle-sdk/load.php',
|
@@ -17,7 +17,7 @@ class ComposerStaticInitf69145d00ee4cc75331087fa8e1d13e6
|
|
17 |
public static function getInitializer(ClassLoader $loader)
|
18 |
{
|
19 |
return \Closure::bind(function () use ($loader) {
|
20 |
-
$loader->classMap =
|
21 |
|
22 |
}, null, ClassLoader::class);
|
23 |
}
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
+
class ComposerStaticInita66cc34bb600909a53f8f21f57d9450c
|
8 |
{
|
9 |
public static $files = array (
|
10 |
'7c3f92ec501ce72fe4f09265dc506991' => __DIR__ . '/..' . '/codeinwp/themeisle-sdk/load.php',
|
17 |
public static function getInitializer(ClassLoader $loader)
|
18 |
{
|
19 |
return \Closure::bind(function () use ($loader) {
|
20 |
+
$loader->classMap = ComposerStaticInita66cc34bb600909a53f8f21f57d9450c::$classMap;
|
21 |
|
22 |
}, null, ClassLoader::class);
|
23 |
}
|
vendor/composer/installed.php
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
<?php return array(
|
2 |
'root' => array(
|
3 |
'name' => 'codeinwp/wp-maintenance-mode',
|
4 |
-
'pretty_version' => '2.4.
|
5 |
-
'version' => '2.4.
|
6 |
'reference' => NULL,
|
7 |
'type' => 'wordpress-plugin',
|
8 |
'install_path' => __DIR__ . '/../../',
|
@@ -20,8 +20,8 @@
|
|
20 |
'dev_requirement' => false,
|
21 |
),
|
22 |
'codeinwp/wp-maintenance-mode' => array(
|
23 |
-
'pretty_version' => '2.4.
|
24 |
-
'version' => '2.4.
|
25 |
'reference' => NULL,
|
26 |
'type' => 'wordpress-plugin',
|
27 |
'install_path' => __DIR__ . '/../../',
|
1 |
<?php return array(
|
2 |
'root' => array(
|
3 |
'name' => 'codeinwp/wp-maintenance-mode',
|
4 |
+
'pretty_version' => '2.4.7',
|
5 |
+
'version' => '2.4.7.0',
|
6 |
'reference' => NULL,
|
7 |
'type' => 'wordpress-plugin',
|
8 |
'install_path' => __DIR__ . '/../../',
|
20 |
'dev_requirement' => false,
|
21 |
),
|
22 |
'codeinwp/wp-maintenance-mode' => array(
|
23 |
+
'pretty_version' => '2.4.7',
|
24 |
+
'version' => '2.4.7.0',
|
25 |
'reference' => NULL,
|
26 |
'type' => 'wordpress-plugin',
|
27 |
'install_path' => __DIR__ . '/../../',
|
views/maintenance.php
CHANGED
@@ -18,11 +18,11 @@
|
|
18 |
defined( 'ABSPATH' ) || exit;
|
19 |
?>
|
20 |
<!DOCTYPE html>
|
21 |
-
<html>
|
22 |
<head>
|
23 |
<meta charset="UTF-8">
|
24 |
<title><?php echo esc_html( $title ); ?></title>
|
25 |
-
<meta name="viewport" content="width=device-width, initial-scale=1.0
|
26 |
<meta name="author" content="<?php echo esc_attr( $author ); ?>" />
|
27 |
<meta name="description" content="<?php echo esc_attr( $description ); ?>" />
|
28 |
<meta name="keywords" content="<?php echo esc_attr( $keywords ); ?>" />
|
@@ -35,7 +35,7 @@ defined( 'ABSPATH' ) || exit;
|
|
35 |
<body class="<?php echo $body_classes ? esc_attr( $body_classes ) : ''; ?>">
|
36 |
<?php do_action( 'wpmm_after_body' ); ?>
|
37 |
|
38 |
-
<div class="wrap">
|
39 |
<?php if ( ! empty( $heading ) ) { ?>
|
40 |
<!-- Heading -->
|
41 |
<h1><?php echo esc_html( $heading ); ?></h1>
|
@@ -47,9 +47,25 @@ defined( 'ABSPATH' ) || exit;
|
|
47 |
* Also, we don't escape the $text, because wp_kses_post was applied before do_shortcode. So it's safe to output it.
|
48 |
*/
|
49 |
if ( ! empty( $text ) && $this->plugin_settings['bot']['status'] === 0 ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
50 |
?>
|
51 |
<!-- Text -->
|
52 |
-
<h2><?php echo
|
53 |
<?php
|
54 |
}
|
55 |
?>
|
18 |
defined( 'ABSPATH' ) || exit;
|
19 |
?>
|
20 |
<!DOCTYPE html>
|
21 |
+
<html <?php language_attributes(); ?> >
|
22 |
<head>
|
23 |
<meta charset="UTF-8">
|
24 |
<title><?php echo esc_html( $title ); ?></title>
|
25 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
26 |
<meta name="author" content="<?php echo esc_attr( $author ); ?>" />
|
27 |
<meta name="description" content="<?php echo esc_attr( $description ); ?>" />
|
28 |
<meta name="keywords" content="<?php echo esc_attr( $keywords ); ?>" />
|
35 |
<body class="<?php echo $body_classes ? esc_attr( $body_classes ) : ''; ?>">
|
36 |
<?php do_action( 'wpmm_after_body' ); ?>
|
37 |
|
38 |
+
<div class="wrap" role="main">
|
39 |
<?php if ( ! empty( $heading ) ) { ?>
|
40 |
<!-- Heading -->
|
41 |
<h1><?php echo esc_html( $heading ); ?></h1>
|
47 |
* Also, we don't escape the $text, because wp_kses_post was applied before do_shortcode. So it's safe to output it.
|
48 |
*/
|
49 |
if ( ! empty( $text ) && $this->plugin_settings['bot']['status'] === 0 ) {
|
50 |
+
$allowed_html = wp_kses_allowed_html( 'post' );
|
51 |
+
|
52 |
+
$allowed_html['form'] = array(
|
53 |
+
'id' => array(),
|
54 |
+
'class' => array(),
|
55 |
+
'action' => array(),
|
56 |
+
'method' => array(),
|
57 |
+
);
|
58 |
+
$allowed_html['input'] = array(
|
59 |
+
'type' => array(),
|
60 |
+
'id' => array(),
|
61 |
+
'name' => array(),
|
62 |
+
'value' => array(),
|
63 |
+
'class' => array(),
|
64 |
+
'placeholder' => array(),
|
65 |
+
);
|
66 |
?>
|
67 |
<!-- Text -->
|
68 |
+
<h2><?php echo wp_kses( $text, $allowed_html ); ?></h2>
|
69 |
<?php
|
70 |
}
|
71 |
?>
|
wp-maintenance-mode.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
*
|
5 |
* Plugin Name: WP Maintenance Mode & Coming Soon
|
6 |
* Description: Adds a splash page to your site that lets visitors know your site is down for maintenance. It's perfect for a coming soon page.
|
7 |
-
* Version: 2.4.
|
8 |
* Author: Themeisle
|
9 |
* Author URI: https://themeisle.com/
|
10 |
* Twitter: themeisle
|
4 |
*
|
5 |
* Plugin Name: WP Maintenance Mode & Coming Soon
|
6 |
* Description: Adds a splash page to your site that lets visitors know your site is down for maintenance. It's perfect for a coming soon page.
|
7 |
+
* Version: 2.4.7
|
8 |
* Author: Themeisle
|
9 |
* Author URI: https://themeisle.com/
|
10 |
* Twitter: themeisle
|