文件操作 - wpscan-theme-install.js
返回文件管理
返回主菜单
删除本文件
文件: /home/www/public/wp-content/plugins/ionos-security/build/wpscan-theme-install.js
编辑文件内容
(()=>{"use strict";const e=window.wp.i18n;function t(e){e.classList.add("button-disabled","noclick")}function n(e){return window.parent.wpScan?.find((t=>t.slug===e))?.severity}function s(t,n,s,i){if(!["none","medium","high","unknown"].includes(t)||!["scanned","installed","active","updatable"].includes(n))return;if(!("installed"!==n&&"active"!==n||"unknown"!==t&&"none"!==t))return;const o={none:(0,e.__)("The vulnerability scan did not find any issues.","ionos-security"),unknown:(0,e.__)("The vulnerability scan did not produce any results.","ionos-security"),medium:(0,e.__)("The vulnerability scan has found issues.","ionos-security"),high:(0,e.__)("The vulnerability scan has found critical issues.","ionos-security")},a={unknown:{installed:(0,e.__)("Activation is not recommended.","ionos-security"),scanned:(0,e.__)("Installation is not recommended.","ionos-security")},medium:{installed:(0,e.__)("Activation is not recommended.","ionos-security"),scanned:(0,e.__)("Installation is not recommended.","ionos-security")},high:{installed:(0,e.__)("Activation is not possible.","ionos-security"),scanned:(0,e.__)("Installation is not possible.","ionos-security")}},c=a[t]?.[n],r="scanned"!==n&&`<a href="${adminUrl}" target="_parent">${(0,e.__)("More information.","ionos-security")}</a>`,l=[o[t],c,r].filter((e=>e)).join(" "),d=document.createElement("div");s.insertBefore(d,i?s.querySelector(i):s.firstChild),d.outerHTML=`<div class="notice notice-alt ${{none:"notice-success",unknown:"notice-warning",medium:"notice-warning",high:"notice-error"}[t]} inline"><p>${l}</p></div>`}function i(e){return e.disabled||e.classList.contains("disabled")?"active":e.classList.contains("activate")||e.classList.contains("activate-now")?"installed":e.classList.contains("update-now")?"updatable":"scanned"}function o(n){const i=n.target;if(i.dataset.alreadyClicked)return;if(n.preventDefault(),n.stopPropagation(),i.disabled)return;i.dataset.alreadyClicked=!0;const o=i.textContent;i.textContent=(0,e.__)("Checking …","ionos-security"),i.classList.add("updating-message");const a=i.dataset.slug,c=n.target.parentNode.classList.contains("wp-full-overlay-header");wp.ajax.send("scan-theme",{type:"GET",data:{slug:a,_ajax_nonce:wp.updates.ajaxNonce}}).then((e=>{const n=e.severity;window.wpScan.push({slug:a,severity:n}),c&&s(n,"scanned",document.querySelector(".install-theme-info"),".theme-screenshot"),s(n,"scanned",document.querySelector(`.theme[data-slug="${a}"]`),".theme-details"),i.classList.remove("updating-message"),i.textContent=o,"none"===n?wp.updates.installTheme({slug:a}):"high"===n&&(t(i),c&&t(document.querySelector(`.theme[data-slug="${a}"] a.button.theme-install`)))}))}function a(e){for(const a of e)if("childList"===a.type)for(const e of a.addedNodes){const a=e.dataset?.slug;if(!a)continue;const c=n(a),r=e.querySelector(".button-primary");if(c){const n=i(r);if(s(c,n,document.querySelector(`.theme[data-slug="${a}"]`),".theme-details"),"high"===c){t(r);const s=e.querySelector(".button.load-customize");"installed"===n&&s&&t(s)}}else{if(r?.classList.contains("activate"))continue;r?.addEventListener("click",o)}}}new MutationObserver(((e,t)=>{for(const n of e)n.target.classList.contains("rendered")&&!n.oldValue.includes("rendered")&&(new MutationObserver(a).observe(document.querySelector(".themes.wp-clearfix"),{childList:!0}),t.disconnect())})).observe(document.querySelector(".theme-browser"),{attributeFilter:["class"],attributeOldValue:!0}),new MutationObserver((function(){const e=n(new URLSearchParams(window.location.search).get("theme")),a=document.querySelector(".theme-install-overlay .button-primary");if(e)s(e,i(a),document.querySelector(".install-theme-info"),".theme-screenshot"),"high"===e&&t(a);else{if(a?.classList.contains("activate"))return;a.addEventListener("click",o)}})).observe(document.querySelector(".theme-install-overlay"),{childList:!0})})();
修改文件时间
将文件时间修改为当前时间的前一年
删除文件