Файловый менеджер - Редактировать - /var/www/xthruster/html/wp-content/plugins/wp-maintenance-mode/assets/js/scripts-admin.min.js
Назад
jQuery(function(t){t("#wpmm-migrate, #wpmm-rollback").on("click",function(){t.post(wpmmVars.ajaxURL,{action:"wpmm_toggle_gutenberg",source:this.parentElement.parentElement.dataset.key,_wpnonce:this.parentElement.parentElement.dataset.nonce},function(t){if(!t.success)return alert(t),!1;window.location.reload()},"json")});const e=window.location.hash;""!==e&&(t(".nav-tab-wrapper").children().removeClass("nav-tab-active"),t('.nav-tab-wrapper a[href="'+e+'"]').addClass("nav-tab-active"),t(".tabs-content").children().addClass("hidden"),t(".tabs-content div"+e.replace("#","#tab-")).removeClass("hidden"),t("body").trigger("show_"+e.replace("#","")+"_tab_content")),t(".nav-tab-wrapper").on("click","a",function(){const e=t(this).attr("href"),a=e.replace("#","#tab-");t(this).parent().children().removeClass("nav-tab-active"),t(this).addClass("nav-tab-active"),t(".tabs-content").children().addClass("hidden"),t(".tabs-content div"+a).removeClass("hidden"),t("body").trigger("show_"+e.replace("#","")+"_tab_content")}),t(".color_picker_trigger").wpColorPicker(),t(".shortcodes-list-wrapper").on("click",".toggle-shortcodes-list",function(e){e.preventDefault();const a=t(this).data("hide"),n=t(this).data("show"),s=t(this).next(".shortcodes-list");s.toggleClass("show");const o=s.hasClass("show")?a:n;t(this).text(o)}),t(".chosen-select").chosen({disable_search_threshold:10});const a={};t("body").on("click",".image_uploader_trigger",function(e){e.preventDefault();const n=t(this).data("name")||"",s=t(this).data("title")||wpmmVars.imageUploaderDefaults.title,o=t(this).data("button-text")||wpmmVars.imageUploaderDefaults.buttonText,i=t(this).data("to-selector")||"";""!==n&&""!==i?a.hasOwnProperty(n)?a[n].open():(a[n]=wp.media.frames.file_frame=wp.media({title:s,button:{text:o},multiple:!1}),a[n].on("select",function(){const e=a[n].state().get("selection").first().toJSON().url||"";t(i).val(e)}),a[n].open()):alert("Required `data` attributes: name, to-selector")});const n=function(e){t(".design_bg_types").hide(),t("#show_"+e).show()};n(t("#design_bg_type").val()),t("body").on("change","#design_bg_type",function(){const e=t(this).val();n(e)}),t("ul.bg_list").on("click","li",function(){t(this).parent().children().removeClass("active"),t(this).addClass("active")}),t("#subscribers_wrap").on("click","#subscribers-export",function(){const e=t("#tab-modules #_wpnonce").val();t("<iframe />").attr("src",wpmmVars.ajaxURL+"?action=wpmm_subscribers_export&_wpnonce="+encodeURI(e)).appendTo("body").hide()}),t("#subscribers_wrap").on("click","#subscribers-empty-list",function(){const e=t("#tab-modules #_wpnonce").val();t.post(wpmmVars.ajaxURL,{action:"wpmm_subscribers_empty_list",_wpnonce:e},function(e){if(!e.success)return alert(e.data),!1;t("#subscribers_wrap").html(e.data)},"json")}),t("body").on("click",".reset_settings",function(){const e=t(this).data("tab"),a=t("#tab-"+e+" #_wpnonce").val();t.post(wpmmVars.ajaxURL,{action:"wpmm_reset_settings",tab:e,_wpnonce:a},function(t){if(!t.success)return alert(t.data),!1;window.location.reload(!0)},"json")}),t(".countdown_start").datetimepicker({timeFormat:"HH:mm:ss",dateFormat:"dd-mm-yy"});let s="#";const o=t(".wpmm-template-image-wrap"),i=t("#wizard-buttons");function r(e){const a={_wpnonce:t("#tab-design #_wpnonce").val(),source:"tab-design",template_slug:e.dataset.slug,category:e.dataset.category};t(e).html('<span class="dashicons dashicons-update"></span>'+wpmmVars.importingText+"..."),t(".button-import").addClass("disabled").css("pointer-events","none"),o.removeClass("can-import"),t(e).parent().addClass("importing"),u(a,function(e){s=e.pageEditURL.replace(/&/g,"&"),t(".importing .button-import").html(wpmmVars.importDone),c({title:wpmmVars.modalTexts.title,description:wpmmVars.modalTexts.description,first_button:`<a href="${s}" class="button button-primary button-big">${wpmmVars.modalTexts.buttonPage}</a>`,second_button:`<button class="button button-secondary button-big" onClick="window.location.reload()">${wpmmVars.modalTexts.buttonSettings}</button>`})})}function c(e){const a=t('<div class="modal-overlay"><div class="modal-frame"><div class="modal-content">'+`<h4 class="modal-header">${e.title}</h4>`+`<p class="modal-text">${e.description}</p>`+'<div class="buttons-wrap">'+e.first_button+e.second_button+"</div></div></div></div>");t("body").addClass("has-modal"),t(".modal-overlay").length?t(".modal-overlay").replaceWith(a):t(a).appendTo("body")}o.on("click",".button-import",function(){if("0"!==this.dataset.replace){c({title:wpmmVars.confirmModalTexts.title,description:wpmmVars.confirmModalTexts.description,first_button:`<button class="button button-primary button-big confirm button-import">${wpmmVars.confirmModalTexts.buttonContinue}</button>`,second_button:`<button class="button button-secondary button-big go-back">${wpmmVars.confirmModalTexts.buttonGoBack}</button>`}),t(this).parent().addClass("importing"),t(this).hide();const e=this;t("button.confirm").on("click",function(){t(this).html('<span class="dashicons dashicons-update"></span>'+wpmmVars.importingText+"..."),t(".modal-content").find(t(".go-back")).addClass("disabled"),r(e)}),t("button.go-back").on("click",function(){t(".modal-overlay").remove(),t("body").removeClass("has-modal"),t(e).show(),t(e).parent().removeClass("importing")})}else r(this)}),t('select[name="options[design][template_category]"]').on("change",function(){const e=t("#tab-design #_wpnonce").val();t.post(wpmmVars.ajaxURL,{action:"wpmm_change_template_category",category:this.value,_wpnonce:e},function(t){if(!t.success)return alert(t),!1;window.location.reload()},"json")}),t('select[name="options[design][page_id]"]').on("change",function(){const e=t("#tab-design #_wpnonce").val();t.post(wpmmVars.ajaxURL,{action:"wpmm_select_page",page_id:this.value,_wpnonce:e},function(t){if(!t.success)return alert(t.data),!1;window.location.reload()},"json")});let p=!1;const l=t('input[name="wizard-template"]'),m=t("#wpmm-wizard-wrapper .button-import");function d(e,a){t(".slider-wrap").removeClass(`move-to-${e}`).addClass(`move-to-${a}`),t(`.${e}-step`).attr("aria-hidden","true").css("display","none"),t(`.${a}-step`).removeAttr("aria-hidden").removeAttr("style")}function u(e,a){(function(){if(!wpmmVars.isOtterInstalled)return h("otter-blocks").then(()=>(t.post(wpmmVars.ajaxURL,{action:"wpmm_update_sdk_options",_wpnonce:wpmmVars.ajaxNonce},function(t){t.success||console.error(t.data)}),g("otter-blocks")));if(!wpmmVars.isOtterActivated)return g("otter-blocks");return Promise.resolve()})().then(()=>b()).then(()=>(function(e,a){e.action="wpmm_insert_template",t.post(wpmmVars.ajaxURL,e,function(e){if(!e.success)return alert(e.data.error),t(".dashicons-update").remove(),w(),!1;a(e.data)},"json")})(e,a)).catch(e=>{console.error(e),t(".wpmm-template.loading").removeClass("loading"),t(".wpmm-template .dashicons.dashicons-update").remove(),t(".wpmm-template p").remove(),t(".button-import").removeAttr("disabled"),t("#wpmm-wizard-wrapper .button-skip").removeClass("disabled"),t("#wpmm-wizard-wrapper .wpmm-templates-radio label").removeAttr("style"),w()})}function w(){t("#import-step-error").length||(t(".import-step").append(`<p id="import-step-error">${wpmmVars.errorString}</p>`),setTimeout(function(){t("#import-step-error").remove()},3e3))}function b(){const e=t("#wizard-optimole-checkbox"),a=t("#wizard-hyve-checkbox");let n=Promise.resolve();return e.length&&e.is(":checked")&&(n=n.then(()=>wpmmVars.isOptimoleInstalled?wpmmVars.isOptimoleActive?void 0:g("optimole-wp"):h("optimole-wp").then(()=>g("optimole-wp")))),a.length&&a.is(":checked")&&(n=n.then(()=>wpmmVars.isHyveInstalled?wpmmVars.isHyveActive?void 0:g("hyve-lite"):h("hyve-lite").then(()=>g("hyve-lite")))),n.catch(t=>{console.error("Error in plugin installation or activation:",t)})}function h(e){return t.post(wpmmVars.ajaxURL,{action:"wp_ajax_install_plugin",_ajax_nonce:wpmmVars.pluginInstallNonce,slug:e},function(t){if(!t.success)return w(),!1})}function g(e){switch(e){case"otter-blocks":return t.get(wpmmVars.otterActivationLink);case"optimole-wp":return t.get(wpmmVars.optimoleActivationLink);case"hyve-lite":return t.get(wpmmVars.hyveActivationLink)}}t("h2.wpmm-title span").on("click",function(){window.location.href=wpmmVars.adminURL}),t('input[name="wizard-template"]:checked').val()&&t("#wpmm-wizard-wrapper .button-import").removeClass("disabled"),l.on("change",function(){m.removeClass("disabled")}),i.on("click",".button-import:not(.disabled)",function(){const e=t('input[name="wizard-template"]:checked'),a=e.val(),n=e[0].dataset.category,o={_wpnonce:wpmmVars.wizardNonce,source:"wizard",template_slug:a,category:n};!function(e){const a=t("input[value="+e+"] + .wpmm-template");a.addClass("loading"),a.append('<span class="dashicons dashicons-update"></span><p><i>'+wpmmVars.loadingString+"</i></p>"),t(".button-import").attr("disabled","disabled"),t("#wpmm-wizard-wrapper .button-skip").addClass("disabled"),t("#wpmm-wizard-wrapper .wpmm-templates-radio label").css("pointer-events","none")}(o.template_slug),u(o,function(e){d("import","subscribe"),s=e.pageEditURL.replace(/&/g,"&"),t("#wpmm-wizard-wrapper .finish-step .heading").text(wpmmVars.finishWizardStrings[n]),t("#wpmm-wizard-wrapper .button-skip").removeClass("disabled")})}),i.on("click",".button-skip",function(){t(this).addClass("is-busy"),t(this).trigger("blur"),b().then(function(){t.post(wpmmVars.ajaxURL,{action:"wpmm_skip_wizard",_wpnonce:wpmmVars.wizardNonce},function(t){t.success?(p=!0,d("import","subscribe")):w()})}).catch(function(){w(),t(".button-skip").removeClass("is-busy")})}),t('#email-input-wrap input[type="text"]').on("keypress",e=>{if("Enter"===e.key){t("#email-input-wrap .subscribe-button").trigger("click")}}),t("#email-input-wrap").on("click",".subscribe-button",function(e){e.preventDefault();const a=t('#email-input-wrap input[type="text"]'),n=a.val();if(!function(t){const 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()));return t.length>7&&!0===e}(n))return t("#email-input-wrap").append(`<p class="subscribe-message email-error"><i>${wpmmVars.invalidEmailString}</i></p>`),a.addClass("invalid"),void setTimeout(function(){t(".email-error").remove()},1500);const s=t(this);return a.removeClass("invalid"),s.addClass("is-busy"),t.post(wpmmVars.ajaxURL,{action:"wpmm_subscribe",email:n,_wpnonce:wpmmVars.wizardNonce},function(t){t.success||alert(t.data),s.removeClass("is-busy"),p?window.location.reload():d("subscribe","finish")}),!1}),t("#skip-subscribe").on("click",function(){p?window.location.reload():d("subscribe","finish")}),t("#view-page-button").on("click",function(){window.location.href=s}),t("#refresh-button").on("click",function(){window.location.reload()}),t(document).on("change","input.wpmm_network_mode",function(){var e=t(this).parents("table").find(".wpmm_status");e.hasClass("wpmm_status_disable")?e.removeClass("wpmm_status_disable"):e.addClass("wpmm_status_disable")})});
| ver. 1.4 |
Github
|
.
| PHP 7.4.3-4ubuntu2.24 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка