Changeset 3451916
- Timestamp:
- 02/02/2026 09:54:47 AM (8 weeks ago)
- Location:
- zenpress
- Files:
-
- 26 edited
- 1 copied
-
tags/2.2.3 (copied) (copied from zenpress/trunk)
-
tags/2.2.3/assets/build/index.asset.php (modified) (1 diff)
-
tags/2.2.3/assets/build/index.js (modified) (1 diff)
-
tags/2.2.3/assets/src/js/hooks/useSettings.js (modified) (2 diffs)
-
tags/2.2.3/assets/src/js/pages/SettingsPage.js (modified) (4 diffs)
-
tags/2.2.3/inc/classes/cache-enabler.php (modified) (2 diffs)
-
tags/2.2.3/inc/classes/integrations.php (modified) (1 diff)
-
tags/2.2.3/inc/snippets/meta/disable-capital-p-dangit.meta.php (modified) (1 diff)
-
tags/2.2.3/inc/snippets/meta/disable-password-strength-meter.meta.php (modified) (1 diff)
-
tags/2.2.3/inc/snippets/meta/remove-thanks-for-using-wordpress-in-footer.meta.php (modified) (1 diff)
-
tags/2.2.3/inc/snippets/meta/remove-wordpress-logo.meta.php (modified) (1 diff)
-
tags/2.2.3/languages/zenpress.pot (modified) (8 diffs)
-
tags/2.2.3/readme.txt (modified) (5 diffs)
-
tags/2.2.3/zenpress.php (modified) (2 diffs)
-
trunk/assets/build/index.asset.php (modified) (1 diff)
-
trunk/assets/build/index.js (modified) (1 diff)
-
trunk/assets/src/js/hooks/useSettings.js (modified) (2 diffs)
-
trunk/assets/src/js/pages/SettingsPage.js (modified) (4 diffs)
-
trunk/inc/classes/cache-enabler.php (modified) (2 diffs)
-
trunk/inc/classes/integrations.php (modified) (1 diff)
-
trunk/inc/snippets/meta/disable-capital-p-dangit.meta.php (modified) (1 diff)
-
trunk/inc/snippets/meta/disable-password-strength-meter.meta.php (modified) (1 diff)
-
trunk/inc/snippets/meta/remove-thanks-for-using-wordpress-in-footer.meta.php (modified) (1 diff)
-
trunk/inc/snippets/meta/remove-wordpress-logo.meta.php (modified) (1 diff)
-
trunk/languages/zenpress.pot (modified) (8 diffs)
-
trunk/readme.txt (modified) (5 diffs)
-
trunk/zenpress.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
zenpress/tags/2.2.3/assets/build/index.asset.php
r3451904 r3451916 1 <?php return array('dependencies' => array('react-jsx-runtime', 'wp-api-fetch', 'wp-components', 'wp-data', 'wp-dom-ready', 'wp-element', 'wp-i18n', 'wp-notices'), 'version' => ' 71f7100577c2edd9e445');1 <?php return array('dependencies' => array('react-jsx-runtime', 'wp-api-fetch', 'wp-components', 'wp-data', 'wp-dom-ready', 'wp-element', 'wp-i18n', 'wp-notices'), 'version' => 'f652a35073b70abdaaed'); -
zenpress/tags/2.2.3/assets/build/index.js
r3451904 r3451916 1 (()=>{"use strict";var e={n:s=>{var t=s&&s.__esModule?()=>s.default:()=>s;return e.d(t,{a:t}),t},d:(s,t)=>{for(var n in t)e.o(t,n)&&!e.o(s,n)&&Object.defineProperty(s,n,{enumerable:!0,get:t[n]})},o:(e,s)=>Object.prototype.hasOwnProperty.call(e,s)};const s=window.wp.domReady;var t=e.n(s);const n=window.wp.element,a=window.wp.i18n,r=window.wp.components,i=window.wp.data,c=window.wp.notices,o=window.wp.apiFetch;var l=e.n(o);const p=window.ReactJSXRuntime,d=({label:e,value:s,onChange:t,help:a})=>{const i=(0,n.useRef)(null);return(0,n.useEffect)(()=>((e,s)=>{if(!e)return;const t=t=>{if("Enter"===t.key){const n=e.querySelector('input[type="checkbox"]'),a=e.ownerDocument||document;n&&(a.activeElement===n||e.contains(a.activeElement))&&(t.preventDefault(),t.stopPropagation(),s())}};return e.addEventListener("keydown",t),()=>{e.removeEventListener("keydown",t)}})(i.current,t),[t]),(0,p.jsx)("div",{ref:i,children:(0,p.jsx)(r.ToggleControl,{label:e,checked:s,onChange:t,help:a,__nextHasNoMarginBottom:!0})})},u=({onClick:e,isBusy:s})=>(0,p.jsx)(r.Button,{variant:"primary",onClick:e,isBusy:s,__next40pxDefaultSize:!0,children:(0,a.__)("Save settings","zenpress")}),b=()=>{const{removeNotice:e}=(0,i.useDispatch)(c.store),s=(0,i.useSelect)(e=>e(c.store).getNotices(),[]);return s&&0!==s.length?(0,p.jsx)(r.NoticeList,{notices:s,onRemove:e}):null},h=(0,n.createContext)(),_=({selectedTabId:e,onSelect:s,orientation:t="horizontal",children:a})=>{const[r,i]=(0,n.useState)(),c=(0,n.useRef)(null),o=void 0!==e?e:r;return(0,p.jsx)(h.Provider,{value:{selectedTabId:o,onSelect:t=>{void 0===e&&i(t),s?.(t)},orientation:t,getOrderedTabIds:()=>c.current?Array.from(c.current.querySelectorAll('[role="tab"]')).map(e=>{const s=e.getAttribute("id");return s?s.replace("zenpress-tab-",""):null}).filter(Boolean):[],tabListRef:c},children:(0,p.jsx)("div",{className:`zenpress-tabs zenpress-tabs--${t}`,children:a})})};_.TabList=({children:e})=>{const{orientation:s,tabListRef:t}=(0,n.useContext)(h);return(0,p.jsx)("div",{ref:t,className:`zenpress-tabs__list zenpress-tabs__list--${s}`,role:"tablist","aria-orientation":s,children:e})},_.Tab=({tabId:e,title:s,className:t="",children:a})=>{const{selectedTabId:r,onSelect:i,orientation:c,getOrderedTabIds:o}=(0,n.useContext)(h),l=r===e,d=(0,n.useRef)(null);return(0,p.jsx)("button",{ref:d,className:`zenpress-tabs__tab ${l?"zenpress-tabs__tab--is-active":""} ${t}`.trim(),role:"tab","aria-selected":l,"aria-controls":`zenpress-tab-panel-${e}`,id:`zenpress-tab-${e}`,tabIndex:l?0:-1,onClick:()=>i(e),onKeyDown:s=>{const t=o();if(!t||0===t.length)return;const n=t.indexOf(e);if(-1===n)return;let a=n;if("vertical"===c?"ArrowDown"===s.key?(s.preventDefault(),a=n<t.length-1?n+1:0):"ArrowUp"===s.key&&(s.preventDefault(),a=n>0?n-1:t.length-1):"ArrowRight"===s.key?(s.preventDefault(),a=n<t.length-1?n+1:0):"ArrowLeft"===s.key&&(s.preventDefault(),a=n>0?n-1:t.length-1),"Home"===s.key?(s.preventDefault(),a=0):"End"===s.key&&(s.preventDefault(),a=t.length-1)," "===s.key||"Enter"===s.key)return s.preventDefault(),void i(e);if(a!==n&&a>=0&&a<t.length){const e=t[a],s=document.getElementById(`zenpress-tab-${e}`);s&&(s.focus(),i(e))}},onFocus:()=>{l||i(e)},children:s||a})},_.TabPanel=({tabId:e,children:s})=>{const{selectedTabId:t}=(0,n.useContext)(h),a=(0,n.useRef)(null),r=t===e;return(0,n.useEffect)(()=>{r&&a.current&&(0===a.current.querySelectorAll('a[href], button:not([disabled]), [tabindex]:not([tabindex="-1"]), input:not([disabled]), select:not([disabled]), textarea:not([disabled])').length?a.current.setAttribute("tabindex","0"):a.current.removeAttribute("tabindex"))},[r]),r?(0,p.jsx)("div",{ref:a,className:"zenpress-tabs__panel",role:"tabpanel",id:`zenpress-tab-panel-${e}`,"aria-labelledby":`zenpress-tab-${e}`,children:s}):(0,p.jsx)("div",{className:"zenpress-tabs__panel",role:"tabpanel",id:`zenpress-tab-panel-${e}`,"aria-labelledby":`zenpress-tab-${e}`,hidden:!0,children:s})};const z=()=>{const{snippets:e,setSnippets:s,adminBarEnabled:t,setAdminBarEnabled:o,saveSettings:h,isSaving:z}=(()=>{const[e,s]=(0,n.useState)({}),[t,r]=(0,n.useState)(! 0),[o,p]=(0,n.useState)(!1),{createSuccessNotice:d,createErrorNotice:u}=(0,i.useDispatch)(c.store);return(0,n.useEffect)(()=>{l()({path:"/wp/v2/settings"}).then(e=>{const t=Array.isArray(e?.zenpress_active_snippets)?e.zenpress_active_snippets:[],n=window?.zenpressSnippetsMeta||{},a={};Object.keys(n).forEach(e=>{a[e]={...n[e],"enable-snippet":t.includes(e)}}),s(a),r(!1!==e?.zenpress_admin_bar_enabled)}).catch(()=>{u((0,a.__)("Failed to load settings.","zenpress"))})},[u]),{snippets:e,setSnippets:s,adminBarEnabled:t,setAdminBarEnabled:r,saveSettings:async()=>{p(!0);const s=Object.keys(e).filter(s=>e[s]?.["enable-snippet"]);try{await l()({path:"/wp/v2/settings",method:"POST",data:{zenpress_active_snippets:s,zenpress_admin_bar_enabled:t}}),d((0,a.__)("Settings saved.","zenpress"))}catch{u((0,a.__)("Failed to save settings.","zenpress"))}finally{p(!1)}},isSaving:o}})(),[f,m]=(0,n.useState)(),[g,v]=(0,n.useState)(null),{createSuccessNotice:x,createErrorNotice:y}=(0,i.useDispatch)(c.store),j=e=>{s(s=>{const t={};return Object.entries(s).forEach(([s,n])=>{const a=(Array.isArray(n?.preset)?n.preset:[]).includes(e);t[s]={...n,"enable-snippet":a}}),t})},w=e=>e?e.charAt(0).toUpperCase()+e.slice(1).toLowerCase():e,S=["core","gutenberg","woocommerce","ads-blocker","tools"],k={};Object.keys(e).forEach(s=>{const t=e[s],n=(t?.category||(0,a.__)("Uncategorized","zenpress")).toLowerCase(),r=(t?.subcategory||(0,a.__)("uncategorized","zenpress")).toLowerCase();k[n]||(k[n]={}),k[n][r]||(k[n][r]=[]),k[n][r].push({name:s,data:t})});const C=Object.keys(k).sort((e,s)=>{const t=S.indexOf(e.toLowerCase()),n=S.indexOf(s.toLowerCase());return-1!==t&&-1!==n?t-n:-1!==t?-1:-1!==n?1:e.localeCompare(s,void 0,{sensitivity:"base"})});(0,n.useEffect)(()=>{!f&&C.length>0&&m(C[0])},[f,C]);const E=async(e,s,t,n)=>{v(e);try{const e=await l()({path:s,method:"POST"});x(e?.message||t)}catch{y(n)}finally{v(null)}},A=()=>E("autoptimize","/zenpress/v1/autoconfig/autoptimize",(0,a.__)("Autoptimize has been configured.","zenpress"),(0,a.__)("Autoptimize autoconfig failed. Is Autoptimize installed and active?","zenpress")),N=()=>E("cache_enabler","/zenpress/v1/autoconfig/cache-enabler",(0,a.__)("Cache Enabler has been configured.","zenpress"),(0,a.__)("Cache Enabler autoconfig failed. Is Cache Enabler installed and active?","zenpress")),O=()=>E("sqlite_object_cache","/zenpress/v1/autoconfig/sqlite-object-cache",(0,a.__)("SQLite Object Cache has been configured.","zenpress"),(0,a.__)("SQLite Object Cache autoconfig failed. Is SQLite Object Cache installed and active?","zenpress"));return(0,n.useEffect)(()=>{const e=e=>{(e.ctrlKey||e.metaKey)&&"s"===e.key&&(e.preventDefault(),z||h())};return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}},[h,z]),(0,p.jsxs)("article",{className:"zenpress-row",children:[(0,p.jsxs)("section",{className:"zenpress-main",children:[(0,p.jsx)("div",{className:"zenpress-notices",children:(0,p.jsx)(b,{})}),(0,p.jsxs)("div",{className:"zenpress-panel",children:[(0,p.jsxs)(_,{orientation:"vertical",selectedTabId:f,onSelect:e=>{m(e),m(e)},children:[(0,p.jsx)(_.TabList,{children:C.map(e=>{const s=`zenpress-tabs__tab--category-${e.toLowerCase().replace(/\s+/g,"-")}`;return(0,p.jsx)(_.Tab,{tabId:e,title:w(e),className:s,children:w(e)},e)})}),C.map(e=>{const n=Object.keys(k[e]).sort();return(0,p.jsxs)(_.TabPanel,{tabId:e,children:[(0,p.jsx)("h2",{children:w(e)}),n.map(t=>(0,p.jsxs)("div",{className:`zenpress-subcategory zenpress-subcategory-${t.toLowerCase().replace(/\s+/g,"-")}`,children:[(0,p.jsx)("hr",{}),(0,p.jsx)("h3",{children:w(t)}),k[e][t].map(({name:e,data:t})=>(0,p.jsx)(d,{label:t.title||e,value:t?.["enable-snippet"]||!1,onChange:()=>{return t=e,void s(e=>({...e,[t]:{...e[t],"enable-snippet":!e[t]?.["enable-snippet"]}}));var t},help:t.description||""},e))]},t)),"tools"===e&&Object.values(window?.zenpressIntegrationsActive||{}).some(Boolean)&&(0,p.jsxs)("div",{className:"zenpress-subcategory zenpress-subcategory-integrations",children:[(0,p.jsx)("hr",{}),(0,p.jsx)("h3",{children:(0,a.__)("Integrations","zenpress")}),(0,p.jsx)(d,{label:(0,a.__)("Show ZenPress admin bar button","zenpress"),value:t,onChange:()=>o(!t),help:(0,a.__)('Show a "ZenPress" item in the admin bar with "Clear caches". When enabled, integration buttons (e.g. Autoptimize) are hidden.',"zenpress")}),window?.zenpressIntegrationsActive?.autoptimize&&(0,p.jsxs)("div",{className:"zenpress-autoconfig-actions",children:[(0,p.jsx)(r.Button,{variant:"secondary",onClick:A,disabled:null!==g,__next40pxDefaultSize:!0,children:"autoptimize"===g?(0,a.__)("Applying…","zenpress"):(0,a.__)("One-click autoconfig Autoptimize","zenpress")}),(0,p.jsx)("p",{className:"zenpress-autoconfig-help",children:(0,a.__)("Apply recommended Autoptimize settings (optimize JS/CSS, aggregate CSS, static files, 404 fallbacks; disable defer, HTML optimize, optimize for logged-in, per post/page). Only works if Autoptimize is active.","zenpress")})]}),window?.zenpressIntegrationsActive?.cache_enabler&&(0,p.jsxs)("div",{className:"zenpress-autoconfig-actions",children:[(0,p.jsx)(r.Button,{variant:"secondary",onClick:N,disabled:null!==g,__next40pxDefaultSize:!0,children:"cache_enabler"===g?(0,a.__)("Applying…","zenpress"):(0,a.__)("One-click autoconfig Cache Enabler","zenpress")}),(0,p.jsx)("p",{className:"zenpress-autoconfig-help",children:(0,a.__)("Apply recommended Cache Enabler settings. Only works if Cache Enabler is active.","zenpress")})]}),window?.zenpressIntegrationsActive?.sqlite_object_cache&&(0,p.jsxs)("div",{className:"zenpress-autoconfig-actions",children:[(0,p.jsx)(r.Button,{variant:"secondary",onClick:O,disabled:null!==g,__next40pxDefaultSize:!0,children:"sqlite_object_cache"===g?(0,a.__)("Applying…","zenpress"):(0,a.__)("One-click autoconfig SQLite Object Cache","zenpress")}),(0,p.jsx)("p",{className:"zenpress-autoconfig-help",children:(0,a.__)("Apply recommended SQLite Object Cache settings. Only works if SQLite Object Cache is active.","zenpress")})]})]})]},e)})]}),(0,p.jsxs)("div",{className:"zenpress-actions",children:[(0,p.jsxs)("div",{className:"zenpress-actions-bulk",children:[(0,p.jsx)(r.Button,{variant:"tertiary",onClick:()=>{s(e=>{const s={};return Object.keys(e).forEach(t=>{s[t]={...e[t],"enable-snippet":!0}}),s})},__next40pxDefaultSize:!0,children:(0,a.__)("Enable all actions","zenpress")}),(0,p.jsx)(r.Button,{isDestructive:!0,onClick:()=>{s(e=>{const s={};return Object.keys(e).forEach(t=>{s[t]={...e[t],"enable-snippet":!1}}),s})},__next40pxDefaultSize:!0,children:(0,a.__)("Disable all actions","zenpress")})]}),(0,p.jsx)(u,{onClick:h,isBusy:z})]})]})]}),(0,p.jsx)("aside",{className:"zenpress-sidebar",children:(0,p.jsx)("div",{className:"zenpress-presets",children:(0,p.jsxs)("div",{className:"zenpress-presets-description",children:[(0,p.jsx)("h2",{children:(0,a.__)("Pick configuration preset","zenpress")}),(0,p.jsx)("p",{children:(0,a.__)("Don't know which features to enable? Quickly configure ZenPress by selecting a preset that matches your site type. Each preset enables optimized features for your specific use case.","zenpress")}),(0,p.jsx)("hr",{}),(0,p.jsxs)("h3",{children:["🖼️ ",(0,a.__)("Corporate website","zenpress")]}),(0,p.jsx)("p",{children:(0,a.__)("Optimized for business sites and portfolios. Focuses on security, performance, and removing unnecessary features like RSS feeds and author archives.","zenpress")}),(0,p.jsx)(r.Button,{variant:"secondary",onClick:()=>j("corporate-website"),__next40pxDefaultSize:!0,children:(0,a.__)("Enable","zenpress")}),(0,p.jsx)("hr",{}),(0,p.jsxs)("h3",{children:[" 📰 ",(0,a.__)("Blog","zenpress")]}),(0,p.jsx)("p",{children:(0,a.__)("Tailored for content-focused blogs. Includes performance and security optimizations while preserving essential blog features like RSS feeds.","zenpress")}),(0,p.jsx)(r.Button,{variant:"secondary",onClick:()=>j("blog"),__next40pxDefaultSize:!0,children:(0,a.__)("Enable","zenpress")}),(0,p.jsx)("hr",{}),(0,p.jsxs)("h3",{children:["🛒 ",(0,a.__)("E-commerce","zenpress")]}),(0,p.jsx)("p",{children:(0,a.__)("Designed for WooCommerce stores. Includes all performance and security features plus WooCommerce-specific optimizations for faster checkout.","zenpress")}),(0,p.jsx)(r.Button,{variant:"secondary",onClick:()=>j("ecommerce"),__next40pxDefaultSize:!0,children:(0,a.__)("Enable","zenpress")})]})})})]})};t()(()=>{const e=document.getElementById("zenpress-settings");e&&(0,n.createRoot)(e).render((0,p.jsx)(z,{}))})})();1 (()=>{"use strict";var e={n:s=>{var t=s&&s.__esModule?()=>s.default:()=>s;return e.d(t,{a:t}),t},d:(s,t)=>{for(var n in t)e.o(t,n)&&!e.o(s,n)&&Object.defineProperty(s,n,{enumerable:!0,get:t[n]})},o:(e,s)=>Object.prototype.hasOwnProperty.call(e,s)};const s=window.wp.domReady;var t=e.n(s);const n=window.wp.element,a=window.wp.i18n,r=window.wp.components,i=window.wp.data,c=window.wp.notices,o=window.wp.apiFetch;var l=e.n(o);const p=window.ReactJSXRuntime,d=({label:e,value:s,onChange:t,help:a})=>{const i=(0,n.useRef)(null);return(0,n.useEffect)(()=>((e,s)=>{if(!e)return;const t=t=>{if("Enter"===t.key){const n=e.querySelector('input[type="checkbox"]'),a=e.ownerDocument||document;n&&(a.activeElement===n||e.contains(a.activeElement))&&(t.preventDefault(),t.stopPropagation(),s())}};return e.addEventListener("keydown",t),()=>{e.removeEventListener("keydown",t)}})(i.current,t),[t]),(0,p.jsx)("div",{ref:i,children:(0,p.jsx)(r.ToggleControl,{label:e,checked:s,onChange:t,help:a,__nextHasNoMarginBottom:!0})})},u=({onClick:e,isBusy:s})=>(0,p.jsx)(r.Button,{variant:"primary",onClick:e,isBusy:s,__next40pxDefaultSize:!0,children:(0,a.__)("Save settings","zenpress")}),b=()=>{const{removeNotice:e}=(0,i.useDispatch)(c.store),s=(0,i.useSelect)(e=>e(c.store).getNotices(),[]);return s&&0!==s.length?(0,p.jsx)(r.NoticeList,{notices:s,onRemove:e}):null},h=(0,n.createContext)(),_=({selectedTabId:e,onSelect:s,orientation:t="horizontal",children:a})=>{const[r,i]=(0,n.useState)(),c=(0,n.useRef)(null),o=void 0!==e?e:r;return(0,p.jsx)(h.Provider,{value:{selectedTabId:o,onSelect:t=>{void 0===e&&i(t),s?.(t)},orientation:t,getOrderedTabIds:()=>c.current?Array.from(c.current.querySelectorAll('[role="tab"]')).map(e=>{const s=e.getAttribute("id");return s?s.replace("zenpress-tab-",""):null}).filter(Boolean):[],tabListRef:c},children:(0,p.jsx)("div",{className:`zenpress-tabs zenpress-tabs--${t}`,children:a})})};_.TabList=({children:e})=>{const{orientation:s,tabListRef:t}=(0,n.useContext)(h);return(0,p.jsx)("div",{ref:t,className:`zenpress-tabs__list zenpress-tabs__list--${s}`,role:"tablist","aria-orientation":s,children:e})},_.Tab=({tabId:e,title:s,className:t="",children:a})=>{const{selectedTabId:r,onSelect:i,orientation:c,getOrderedTabIds:o}=(0,n.useContext)(h),l=r===e,d=(0,n.useRef)(null);return(0,p.jsx)("button",{ref:d,className:`zenpress-tabs__tab ${l?"zenpress-tabs__tab--is-active":""} ${t}`.trim(),role:"tab","aria-selected":l,"aria-controls":`zenpress-tab-panel-${e}`,id:`zenpress-tab-${e}`,tabIndex:l?0:-1,onClick:()=>i(e),onKeyDown:s=>{const t=o();if(!t||0===t.length)return;const n=t.indexOf(e);if(-1===n)return;let a=n;if("vertical"===c?"ArrowDown"===s.key?(s.preventDefault(),a=n<t.length-1?n+1:0):"ArrowUp"===s.key&&(s.preventDefault(),a=n>0?n-1:t.length-1):"ArrowRight"===s.key?(s.preventDefault(),a=n<t.length-1?n+1:0):"ArrowLeft"===s.key&&(s.preventDefault(),a=n>0?n-1:t.length-1),"Home"===s.key?(s.preventDefault(),a=0):"End"===s.key&&(s.preventDefault(),a=t.length-1)," "===s.key||"Enter"===s.key)return s.preventDefault(),void i(e);if(a!==n&&a>=0&&a<t.length){const e=t[a],s=document.getElementById(`zenpress-tab-${e}`);s&&(s.focus(),i(e))}},onFocus:()=>{l||i(e)},children:s||a})},_.TabPanel=({tabId:e,children:s})=>{const{selectedTabId:t}=(0,n.useContext)(h),a=(0,n.useRef)(null),r=t===e;return(0,n.useEffect)(()=>{r&&a.current&&(0===a.current.querySelectorAll('a[href], button:not([disabled]), [tabindex]:not([tabindex="-1"]), input:not([disabled]), select:not([disabled]), textarea:not([disabled])').length?a.current.setAttribute("tabindex","0"):a.current.removeAttribute("tabindex"))},[r]),r?(0,p.jsx)("div",{ref:a,className:"zenpress-tabs__panel",role:"tabpanel",id:`zenpress-tab-panel-${e}`,"aria-labelledby":`zenpress-tab-${e}`,children:s}):(0,p.jsx)("div",{className:"zenpress-tabs__panel",role:"tabpanel",id:`zenpress-tab-panel-${e}`,"aria-labelledby":`zenpress-tab-${e}`,hidden:!0,children:s})};const z=()=>{const{snippets:e,setSnippets:s,adminBarEnabled:t,setAdminBarEnabled:o,saveSettings:h,isSaving:z}=(()=>{const[e,s]=(0,n.useState)({}),[t,r]=(0,n.useState)(!1),[o,p]=(0,n.useState)(!1),{createSuccessNotice:d,createErrorNotice:u}=(0,i.useDispatch)(c.store);return(0,n.useEffect)(()=>{l()({path:"/wp/v2/settings"}).then(e=>{const t=Array.isArray(e?.zenpress_active_snippets)?e.zenpress_active_snippets:[],n=window?.zenpressSnippetsMeta||{},a={};Object.keys(n).forEach(e=>{a[e]={...n[e],"enable-snippet":t.includes(e)}}),s(a),r(!0===e?.zenpress_admin_bar_enabled)}).catch(()=>{u((0,a.__)("Failed to load settings.","zenpress"))})},[u]),{snippets:e,setSnippets:s,adminBarEnabled:t,setAdminBarEnabled:r,saveSettings:async()=>{p(!0);const s=Object.keys(e).filter(s=>e[s]?.["enable-snippet"]);try{await l()({path:"/wp/v2/settings",method:"POST",data:{zenpress_active_snippets:s,zenpress_admin_bar_enabled:t}}),d((0,a.__)("Settings saved.","zenpress"))}catch{u((0,a.__)("Failed to save settings.","zenpress"))}finally{p(!1)}},isSaving:o}})(),[f,m]=(0,n.useState)(),[g,v]=(0,n.useState)(null),{createSuccessNotice:x,createErrorNotice:y}=(0,i.useDispatch)(c.store),j=e=>{s(s=>{const t={};return Object.entries(s).forEach(([s,n])=>{const a=(Array.isArray(n?.preset)?n.preset:[]).includes(e);t[s]={...n,"enable-snippet":a}}),t})},w=e=>e?e.charAt(0).toUpperCase()+e.slice(1).toLowerCase():e,S=["core","gutenberg","woocommerce","ads-blocker","tools"],C={};Object.keys(e).forEach(s=>{const t=e[s],n=(t?.category||(0,a.__)("Uncategorized","zenpress")).toLowerCase(),r=(t?.subcategory||(0,a.__)("uncategorized","zenpress")).toLowerCase();C[n]||(C[n]={}),C[n][r]||(C[n][r]=[]),C[n][r].push({name:s,data:t})});const k=Object.keys(C).sort((e,s)=>{const t=S.indexOf(e.toLowerCase()),n=S.indexOf(s.toLowerCase());return-1!==t&&-1!==n?t-n:-1!==t?-1:-1!==n?1:e.localeCompare(s,void 0,{sensitivity:"base"})});(0,n.useEffect)(()=>{!f&&k.length>0&&m(k[0])},[f,k]);const E=async(e,s,t,n)=>{v(e);try{const e=await l()({path:s,method:"POST"});x(e?.message||t)}catch{y(n)}finally{v(null)}},A=()=>E("autoptimize","/zenpress/v1/autoconfig/autoptimize",(0,a.__)("Autoptimize has been configured.","zenpress"),(0,a.__)("Autoptimize autoconfig failed. Is Autoptimize installed and active?","zenpress")),N=()=>E("cache_enabler","/zenpress/v1/autoconfig/cache-enabler",(0,a.__)("Cache Enabler has been configured.","zenpress"),(0,a.__)("Cache Enabler autoconfig failed. Is Cache Enabler installed and active?","zenpress")),O=()=>E("sqlite_object_cache","/zenpress/v1/autoconfig/sqlite-object-cache",(0,a.__)("SQLite Object Cache has been configured.","zenpress"),(0,a.__)("SQLite Object Cache autoconfig failed. Is SQLite Object Cache installed and active?","zenpress"));return(0,n.useEffect)(()=>{const e=e=>{(e.ctrlKey||e.metaKey)&&"s"===e.key&&(e.preventDefault(),z||h())};return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}},[h,z]),(0,p.jsxs)("article",{className:"zenpress-row",children:[(0,p.jsxs)("section",{className:"zenpress-main",children:[(0,p.jsx)("div",{className:"zenpress-notices",children:(0,p.jsx)(b,{})}),(0,p.jsxs)("div",{className:"zenpress-panel",children:[(0,p.jsxs)(_,{orientation:"vertical",selectedTabId:f,onSelect:e=>{m(e),m(e)},children:[(0,p.jsx)(_.TabList,{children:k.map(e=>{const s=`zenpress-tabs__tab--category-${e.toLowerCase().replace(/\s+/g,"-")}`;return(0,p.jsx)(_.Tab,{tabId:e,title:w(e),className:s,children:w(e)},e)})}),k.map(e=>{const n=Object.keys(C[e]).sort();return(0,p.jsxs)(_.TabPanel,{tabId:e,children:[(0,p.jsx)("h2",{children:w(e)}),n.map(t=>(0,p.jsxs)("div",{className:`zenpress-subcategory zenpress-subcategory-${t.toLowerCase().replace(/\s+/g,"-")}`,children:[(0,p.jsx)("hr",{}),(0,p.jsx)("h3",{children:w(t)}),C[e][t].map(({name:e,data:t})=>(0,p.jsx)(d,{label:t.title||e,value:t?.["enable-snippet"]||!1,onChange:()=>{return t=e,void s(e=>({...e,[t]:{...e[t],"enable-snippet":!e[t]?.["enable-snippet"]}}));var t},help:t.description||""},e))]},t)),"tools"===e&&Object.values(window?.zenpressIntegrationsActive||{}).some(Boolean)&&(0,p.jsxs)("div",{className:"zenpress-subcategory zenpress-subcategory-integrations",children:[(0,p.jsx)("hr",{}),(0,p.jsx)("h3",{children:(0,a.__)("Integrations","zenpress")}),(0,p.jsx)(d,{label:(0,a.__)("Show ZenPress admin bar button","zenpress"),value:t,onChange:()=>o(!t),help:(0,a.__)('Show a ZenPress item in the admin bar with "Clear all caches" and sub-items for each active integration (page cache, static assets, object cache). Visible only when at least one of Cache Enabler, AutOptimize, or SQLite Object Cache is active. When enabled, those plugins\' own admin bar buttons are hidden.',"zenpress")}),window?.zenpressIntegrationsActive?.autoptimize&&(0,p.jsxs)("div",{className:"zenpress-autoconfig-actions",children:[(0,p.jsx)(r.Button,{variant:"secondary",onClick:A,disabled:null!==g,__next40pxDefaultSize:!0,children:"autoptimize"===g?(0,a.__)("Applying…","zenpress"):(0,a.__)("One-click autoconfig Autoptimize","zenpress")}),(0,p.jsx)("p",{className:"zenpress-autoconfig-help",children:(0,a.__)("Apply recommended Autoptimize settings: Minify JS & CSS, aggregate CSS, static files, 404 fallbacks.","zenpress")})]}),window?.zenpressIntegrationsActive?.cache_enabler&&(0,p.jsxs)("div",{className:"zenpress-autoconfig-actions",children:[(0,p.jsx)(r.Button,{variant:"secondary",onClick:N,disabled:null!==g,__next40pxDefaultSize:!0,children:"cache_enabler"===g?(0,a.__)("Applying…","zenpress"):(0,a.__)("One-click autoconfig Cache Enabler","zenpress")}),(0,p.jsx)("p",{className:"zenpress-autoconfig-help",children:(0,a.__)("Apply recommended Cache Enabler settings: Clear site cache on post or plugin changes, WebP support, Gzip or Brotli compression, and minify HTML (excluding inline CSS/JS).","zenpress")})]}),window?.zenpressIntegrationsActive?.sqlite_object_cache&&(0,p.jsxs)("div",{className:"zenpress-autoconfig-actions",children:[(0,p.jsx)(r.Button,{variant:"secondary",onClick:O,disabled:null!==g,__next40pxDefaultSize:!0,children:"sqlite_object_cache"===g?(0,a.__)("Applying…","zenpress"):(0,a.__)("One-click autoconfig SQLite Object Cache","zenpress")}),(0,p.jsx)("p",{className:"zenpress-autoconfig-help",children:(0,a.__)('Apply recommended SQLite Object Cache settings. Enable "Use APCu" if APCu is available.',"zenpress")})]})]})]},e)})]}),(0,p.jsxs)("div",{className:"zenpress-actions",children:[(0,p.jsxs)("div",{className:"zenpress-actions-bulk",children:[(0,p.jsx)(r.Button,{variant:"tertiary",onClick:()=>{s(e=>{const s={};return Object.keys(e).forEach(t=>{s[t]={...e[t],"enable-snippet":!0}}),s})},__next40pxDefaultSize:!0,children:(0,a.__)("Enable all actions","zenpress")}),(0,p.jsx)(r.Button,{isDestructive:!0,onClick:()=>{s(e=>{const s={};return Object.keys(e).forEach(t=>{s[t]={...e[t],"enable-snippet":!1}}),s})},__next40pxDefaultSize:!0,children:(0,a.__)("Disable all actions","zenpress")})]}),(0,p.jsx)(u,{onClick:h,isBusy:z})]})]})]}),(0,p.jsx)("aside",{className:"zenpress-sidebar",children:(0,p.jsx)("div",{className:"zenpress-presets",children:(0,p.jsxs)("div",{className:"zenpress-presets-description",children:[(0,p.jsx)("h2",{children:(0,a.__)("Pick configuration preset","zenpress")}),(0,p.jsx)("p",{children:(0,a.__)("Don't know which features to enable? Quickly configure ZenPress by selecting a preset that matches your site type. Each preset enables optimized features for your specific use case.","zenpress")}),(0,p.jsx)("hr",{}),(0,p.jsxs)("h3",{children:["🖼️ ",(0,a.__)("Corporate website","zenpress")]}),(0,p.jsx)("p",{children:(0,a.__)("Optimized for business sites and portfolios. Focuses on security, performance, and removing unnecessary features like RSS feeds and author archives.","zenpress")}),(0,p.jsx)(r.Button,{variant:"secondary",onClick:()=>j("corporate-website"),__next40pxDefaultSize:!0,children:(0,a.__)("Enable","zenpress")}),(0,p.jsx)("hr",{}),(0,p.jsxs)("h3",{children:[" 📰 ",(0,a.__)("Blog","zenpress")]}),(0,p.jsx)("p",{children:(0,a.__)("Tailored for content-focused blogs. Includes performance and security optimizations while preserving essential blog features like RSS feeds.","zenpress")}),(0,p.jsx)(r.Button,{variant:"secondary",onClick:()=>j("blog"),__next40pxDefaultSize:!0,children:(0,a.__)("Enable","zenpress")}),(0,p.jsx)("hr",{}),(0,p.jsxs)("h3",{children:["🛒 ",(0,a.__)("E-commerce","zenpress")]}),(0,p.jsx)("p",{children:(0,a.__)("Designed for WooCommerce stores. Includes all performance and security features plus WooCommerce-specific optimizations for faster checkout.","zenpress")}),(0,p.jsx)(r.Button,{variant:"secondary",onClick:()=>j("ecommerce"),__next40pxDefaultSize:!0,children:(0,a.__)("Enable","zenpress")})]})})})]})};t()(()=>{const e=document.getElementById("zenpress-settings");e&&(0,n.createRoot)(e).render((0,p.jsx)(z,{}))})})(); -
zenpress/tags/2.2.3/assets/src/js/hooks/useSettings.js
r3451904 r3451916 18 18 export const useSettings = () => { 19 19 const [snippets, setSnippets] = useState({}); 20 const [adminBarEnabled, setAdminBarEnabled] = useState( true);20 const [adminBarEnabled, setAdminBarEnabled] = useState(false); 21 21 const [isSaving, setIsSaving] = useState(false); 22 22 const { createSuccessNotice, createErrorNotice } = … … 42 42 setSnippets(snippetsData); 43 43 setAdminBarEnabled( 44 settings?.zenpress_admin_bar_enabled !== false44 settings?.zenpress_admin_bar_enabled === true 45 45 ); 46 46 }) -
zenpress/tags/2.2.3/assets/src/js/pages/SettingsPage.js
r3451904 r3451916 312 312 } 313 313 help={__( 314 'Show a "ZenPress" item in the admin bar with "Clear caches". When enabled, integration buttons (e.g. Autoptimize)are hidden.',314 'Show a ZenPress item in the admin bar with "Clear all caches" and sub-items for each active integration (page cache, static assets, object cache). Visible only when at least one of Cache Enabler, AutOptimize, or SQLite Object Cache is active. When enabled, those plugins\' own admin bar buttons are hidden.', 315 315 'zenpress' 316 316 )} … … 344 344 <p className="zenpress-autoconfig-help"> 345 345 {__( 346 'Apply recommended Autoptimize settings (optimize JS/CSS, aggregate CSS, static files, 404 fallbacks; disable defer, HTML optimize, optimize for logged-in, per post/page). Only works if Autoptimize is active.',346 'Apply recommended Autoptimize settings: Minify JS & CSS, aggregate CSS, static files, 404 fallbacks.', 347 347 'zenpress' 348 348 )} … … 378 378 <p className="zenpress-autoconfig-help"> 379 379 {__( 380 'Apply recommended Cache Enabler settings . Only works if Cache Enabler is active.',380 'Apply recommended Cache Enabler settings: Clear site cache on post or plugin changes, WebP support, Gzip or Brotli compression, and minify HTML (excluding inline CSS/JS).', 381 381 'zenpress' 382 382 )} … … 412 412 <p className="zenpress-autoconfig-help"> 413 413 {__( 414 'Apply recommended SQLite Object Cache settings. Only works if SQLite Object Cache is active.',414 'Apply recommended SQLite Object Cache settings. Enable "Use APCu" if APCu is available.', 415 415 'zenpress' 416 416 )} -
zenpress/tags/2.2.3/inc/classes/cache-enabler.php
r3451904 r3451916 15 15 */ 16 16 final class ZenPress_Cache_Enabler { 17 /** Cache Enabler admin bar node ID. */ 18 private const CACHE_ENABLER_ADMIN_BAR_ID = 'cache_enabler_clear_cache'; 17 /** Cache Enabler admin bar node IDs (main + "clear page cache" sub-item). */ 18 private const CACHE_ENABLER_ADMIN_BAR_IDS = [ 19 'cache_enabler_clear_cache', 20 'cache_enabler_clear_page_cache', 21 ]; 19 22 20 23 /** … … 51 54 52 55 /** 53 * Removes Cache Enabler node from the admin bar.56 * Removes Cache Enabler nodes from the admin bar (main item + "clear page cache" sub-item). 54 57 */ 55 58 public static function remove_admin_bar_node(WP_Admin_Bar $wp_admin_bar): void { 56 $wp_admin_bar->remove_node(self::CACHE_ENABLER_ADMIN_BAR_ID); 59 foreach (self::CACHE_ENABLER_ADMIN_BAR_IDS as $node_id) { 60 $wp_admin_bar->remove_node($node_id); 61 } 57 62 } 58 63 -
zenpress/tags/2.2.3/inc/classes/integrations.php
r3451904 r3451916 30 30 */ 31 31 public static function is_admin_bar_enabled(): bool { 32 return (bool) get_option('zenpress_admin_bar_enabled', true);32 return (bool) get_option('zenpress_admin_bar_enabled', false); 33 33 } 34 34 -
zenpress/tags/2.2.3/inc/snippets/meta/disable-capital-p-dangit.meta.php
r3448585 r3451916 19 19 'subcategory' => __('performance', 'zenpress'), 20 20 'weight' => 0, 21 'preset' => [ ],21 'preset' => ['corporate-website', 'blog', 'ecommerce'], 22 22 ]; -
zenpress/tags/2.2.3/inc/snippets/meta/disable-password-strength-meter.meta.php
r3448585 r3451916 19 19 'subcategory' => __('performance', 'zenpress'), 20 20 'weight' => 0, 21 'preset' => [ ],21 'preset' => ['corporate-website', 'blog', 'ecommerce'], 22 22 ]; -
zenpress/tags/2.2.3/inc/snippets/meta/remove-thanks-for-using-wordpress-in-footer.meta.php
r3448585 r3451916 13 13 'title' => __('Remove "Thanks for using WordPress" in footer', 'zenpress'), 14 14 'description' => __( 15 'Removes the "Thank you for creating with WordPress" message from the admin footer. Cleans up the interface.',15 'Removes the "Thank you for creating with WordPress" message from the admin footer.', 16 16 'zenpress' 17 17 ), -
zenpress/tags/2.2.3/inc/snippets/meta/remove-wordpress-logo.meta.php
r3448585 r3451916 13 13 'title' => __('Remove WordPress logo', 'zenpress'), 14 14 'description' => __( 15 'Removes the WordPress logo and its dropdown from the admin bar. Cleans up the interface for a more neutral or branded look.',15 'Removes the WordPress logo and its dropdown from the admin bar.', 16 16 'zenpress' 17 17 ), -
zenpress/tags/2.2.3/languages/zenpress.pot
r3448604 r3451916 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: ZenPress - Optimize & Secure 2.2. 1\n"5 "Project-Id-Version: ZenPress - Optimize & Secure 2.2.3\n" 6 6 "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/zenpress\n" 7 7 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" … … 10 10 "Content-Type: text/plain; charset=UTF-8\n" 11 11 "Content-Transfer-Encoding: 8bit\n" 12 "POT-Creation-Date: 2026-0 1-28T10:44:12+00:00\n"12 "POT-Creation-Date: 2026-02-02T09:51:42+00:00\n" 13 13 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 14 14 "X-Generator: WP-CLI 2.12.0\n" … … 27 27 #. Description of the plugin 28 28 #: zenpress.php 29 msgid "Easily speed up and strengthen your WordPress site by cleaning out unnecessary features and protecting weak points."29 msgid "Easily speed up and strengthen your WordPress site in one click: clean out unnecessary features, protect weak points, autoconfigure cache integrations." 30 30 msgstr "" 31 31 … … 40 40 msgstr "" 41 41 42 #: inc/admin/links.php:1 942 #: inc/admin/links.php:16 43 43 msgid "Go to ZenPress settings page" 44 44 msgstr "" 45 45 46 #: inc/admin/links.php: 2046 #: inc/admin/links.php:17 47 47 msgid "Settings" 48 48 msgstr "" 49 49 50 #: inc/admin/links.php:33 51 #: inc/admin/menu.php:38 52 msgid "View ZenPress changelog on WordPress.org (opens in a new tab)" 53 msgstr "" 54 55 #: inc/admin/links.php:34 56 msgid "Changelog" 57 msgstr "" 58 59 #: inc/admin/links.php:39 60 msgid "Read ZenPress documentation (opens in a new tab)" 61 msgstr "" 62 50 63 #: inc/admin/links.php:40 51 #: inc/admin/menu.php:42 52 msgid "View ZenPress changelog on WordPress.org (opens in a new tab)" 53 msgstr "" 54 55 #: inc/admin/links.php:41 56 msgid "Changelog" 64 msgid "Docs" 65 msgstr "" 66 67 #: inc/admin/links.php:45 68 msgid "Support ZenPress by buying a coffee (opens in a new tab)" 57 69 msgstr "" 58 70 59 71 #: inc/admin/links.php:46 60 msgid "Read ZenPress documentation (opens in a new tab)"61 msgstr ""62 63 #: inc/admin/links.php:4764 msgid "Docs"65 msgstr ""66 67 #: inc/admin/links.php:5268 msgid "Support ZenPress by buying a coffee (opens in a new tab)"69 msgstr ""70 71 #: inc/admin/links.php:5372 72 msgid "Support ☕" 73 73 msgstr "" 74 74 75 #: inc/admin/menu.php:1 575 #: inc/admin/menu.php:13 76 76 msgid "ZenPress options" 77 77 msgstr "" 78 78 79 #: inc/admin/menu.php:1 680 #: inc/admin/menu.php:3 579 #: inc/admin/menu.php:14 80 #: inc/admin/menu.php:31 81 81 msgid "ZenPress" 82 82 msgstr "" 83 83 84 #: inc/admin/menu.php:3 884 #: inc/admin/menu.php:34 85 85 msgid "Version" 86 86 msgstr "" 87 87 88 #: inc/admin/menu.php: 4388 #: inc/admin/menu.php:39 89 89 msgid "What's new ?" 90 90 msgstr "" 91 91 92 #: inc/admin/menu.php: 5292 #: inc/admin/menu.php:48 93 93 msgid "Read the ZenPress documentation (opens in a new tab)" 94 94 msgstr "" 95 95 96 #: inc/admin/menu.php: 5396 #: inc/admin/menu.php:49 97 97 msgid "Documentation" 98 98 msgstr "" 99 99 100 #: inc/admin/menu.php:5 8100 #: inc/admin/menu.php:54 101 101 msgid "Leave a review for ZenPress on WordPress.org (opens in a new tab)" 102 102 msgstr "" 103 103 104 #: inc/admin/menu.php:5 9104 #: inc/admin/menu.php:55 105 105 msgid "Leave a review (helps a lot)" 106 106 msgstr "" 107 107 108 #: inc/admin/menu.php:6 5108 #: inc/admin/menu.php:61 109 109 msgid "Support development: Buy me a coffee (opens in a new tab)" 110 110 msgstr "" 111 111 112 #: inc/admin/menu.php:6 6112 #: inc/admin/menu.php:62 113 113 msgid "Buy me a coffee" 114 114 msgstr "" 115 115 116 #: inc/admin/menu.php:7 4116 #: inc/admin/menu.php:70 117 117 msgid "Loading your ZenPress settings…" 118 118 msgstr "" 119 119 120 #: inc/admin/menu.php: 82120 #: inc/admin/menu.php:78 121 121 msgid "Made " 122 122 msgstr "" 123 123 124 #: inc/admin/menu.php:8 4124 #: inc/admin/menu.php:80 125 125 msgid " by Quentin Le Duff - Your WordPress Partner" 126 126 msgstr "" 127 127 128 #: inc/admin/menu.php: 91128 #: inc/admin/menu.php:87 129 129 msgid "Visite the developper website" 130 130 msgstr "" 131 131 132 #: inc/admin/menu.php: 92132 #: inc/admin/menu.php:88 133 133 msgid "My place" 134 134 msgstr "" 135 135 136 #: inc/admin/menu.php:9 7136 #: inc/admin/menu.php:93 137 137 msgid "Review the code on Github" 138 138 msgstr "" 139 139 140 #: inc/admin/menu.php:9 8140 #: inc/admin/menu.php:94 141 141 msgid "ZenPress code repository" 142 msgstr "" 143 144 #: inc/classes/integrations.php:112 145 msgid "Autoptimize configuration failed." 146 msgstr "" 147 148 #: inc/classes/integrations.php:118 149 #: assets/build/index.js:1 150 #: assets/src/js/pages/SettingsPage.js:173 151 msgid "Autoptimize has been configured." 152 msgstr "" 153 154 #: inc/classes/integrations.php:131 155 msgid "Cache Enabler configuration failed." 156 msgstr "" 157 158 #: inc/classes/integrations.php:137 159 #: assets/build/index.js:1 160 #: assets/src/js/pages/SettingsPage.js:184 161 msgid "Cache Enabler has been configured." 162 msgstr "" 163 164 #: inc/classes/integrations.php:150 165 msgid "SQLite Object Cache configuration failed." 166 msgstr "" 167 168 #: inc/classes/integrations.php:156 169 #: assets/build/index.js:1 170 #: assets/src/js/pages/SettingsPage.js:195 171 msgid "SQLite Object Cache has been configured." 172 msgstr "" 173 174 #: inc/classes/integrations.php:200 175 msgid "Clear all caches" 176 msgstr "" 177 178 #: inc/classes/integrations.php:203 179 msgid "Clear all caches (page cache, static assets, object cache)." 180 msgstr "" 181 182 #: inc/classes/integrations.php:211 183 msgid "Clear pages caches" 184 msgstr "" 185 186 #: inc/classes/integrations.php:214 187 msgid "Clear Cache Enabler page cache." 188 msgstr "" 189 190 #: inc/classes/integrations.php:223 191 msgid "Clear static assets caches (CSS/JS)" 192 msgstr "" 193 194 #: inc/classes/integrations.php:226 195 msgid "Clear Autoptimize CSS/JS cache." 196 msgstr "" 197 198 #: inc/classes/integrations.php:235 199 msgid "Clear object cache" 200 msgstr "" 201 202 #: inc/classes/integrations.php:238 203 msgid "Clear SQLite Object Cache." 204 msgstr "" 205 206 #: inc/classes/integrations.php:260 207 #: inc/classes/integrations.php:264 208 msgid "Forbidden" 209 msgstr "" 210 211 #: inc/classes/integrations.php:272 212 #: inc/classes/integrations.php:282 213 msgid "Cache clear failed." 214 msgstr "" 215 216 #: inc/classes/integrations.php:274 217 msgid "Caches cleared." 218 msgstr "" 219 220 #: inc/classes/integrations.php:284 221 msgid "Cache cleared." 222 msgstr "" 223 224 #: inc/classes/integrations.php:286 225 msgid "Invalid request." 142 226 msgstr "" 143 227 … … 155 239 msgstr "" 156 240 157 #: inc/snippets/functions/protect-wp-login.php:3 6158 #: inc/snippets/functions/protect-wp-login.php:5 0241 #: inc/snippets/functions/protect-wp-login.php:38 242 #: inc/snippets/functions/protect-wp-login.php:52 159 243 msgid "Too many failed login attempts. Try again later." 160 244 msgstr "" … … 547 631 548 632 #: inc/snippets/meta/remove-thanks-for-using-wordpress-in-footer.meta.php:14 549 msgid "Removes the \"Thank you for creating with WordPress\" message from the admin footer. Cleans up the interface."633 msgid "Removes the \"Thank you for creating with WordPress\" message from the admin footer." 550 634 msgstr "" 551 635 … … 563 647 564 648 #: inc/snippets/meta/remove-wordpress-logo.meta.php:14 565 msgid "Removes the WordPress logo and its dropdown from the admin bar. Cleans up the interface for a more neutral or branded look."649 msgid "Removes the WordPress logo and its dropdown from the admin bar." 566 650 msgstr "" 567 651 … … 580 664 581 665 #: assets/build/index.js:1 582 #: assets/src/js/hooks/useSettings.js:4 2666 #: assets/src/js/hooks/useSettings.js:48 583 667 msgid "Failed to load settings." 584 668 msgstr "" 585 669 586 670 #: assets/build/index.js:1 587 #: assets/src/js/hooks/useSettings.js: 59671 #: assets/src/js/hooks/useSettings.js:68 588 672 msgid "Settings saved." 589 673 msgstr "" 590 674 591 675 #: assets/build/index.js:1 592 #: assets/src/js/hooks/useSettings.js: 61676 #: assets/src/js/hooks/useSettings.js:70 593 677 msgid "Failed to save settings." 594 678 msgstr "" 595 679 596 680 #: assets/build/index.js:1 597 #: assets/src/js/pages/SettingsPage.js: 86681 #: assets/src/js/pages/SettingsPage.js:99 598 682 msgid "Uncategorized" 599 683 msgstr "" 600 684 601 685 #: assets/build/index.js:1 602 #: assets/src/js/pages/SettingsPage.js: 89686 #: assets/src/js/pages/SettingsPage.js:102 603 687 msgid "uncategorized" 604 688 msgstr "" 605 689 606 690 #: assets/build/index.js:1 607 #: assets/src/js/pages/SettingsPage.js:234 691 #: assets/src/js/pages/SettingsPage.js:174 692 msgid "Autoptimize autoconfig failed. Is Autoptimize installed and active?" 693 msgstr "" 694 695 #: assets/build/index.js:1 696 #: assets/src/js/pages/SettingsPage.js:185 697 msgid "Cache Enabler autoconfig failed. Is Cache Enabler installed and active?" 698 msgstr "" 699 700 #: assets/build/index.js:1 701 #: assets/src/js/pages/SettingsPage.js:196 702 msgid "SQLite Object Cache autoconfig failed. Is SQLite Object Cache installed and active?" 703 msgstr "" 704 705 #: assets/build/index.js:1 706 #: assets/src/js/pages/SettingsPage.js:297 707 msgid "Integrations" 708 msgstr "" 709 710 #: assets/build/index.js:1 711 #: assets/src/js/pages/SettingsPage.js:303 712 msgid "Show ZenPress admin bar button" 713 msgstr "" 714 715 #: assets/build/index.js:1 716 #: assets/src/js/pages/SettingsPage.js:313 717 msgid "Show a ZenPress item in the admin bar with \"Clear all caches\" and sub-items for each active integration (page cache, static assets, object cache). Visible only when at least one of Cache Enabler, AutOptimize, or SQLite Object Cache is active. When enabled, those plugins' own admin bar buttons are hidden." 718 msgstr "" 719 720 #: assets/build/index.js:1 721 #: assets/src/js/pages/SettingsPage.js:335 722 #: assets/src/js/pages/SettingsPage.js:369 723 #: assets/src/js/pages/SettingsPage.js:403 724 msgid "Applying…" 725 msgstr "" 726 727 #: assets/build/index.js:1 728 #: assets/src/js/pages/SettingsPage.js:339 729 msgid "One-click autoconfig Autoptimize" 730 msgstr "" 731 732 #: assets/build/index.js:1 733 #: assets/src/js/pages/SettingsPage.js:345 734 msgid "Apply recommended Autoptimize settings: Minify JS & CSS, aggregate CSS, static files, 404 fallbacks." 735 msgstr "" 736 737 #: assets/build/index.js:1 738 #: assets/src/js/pages/SettingsPage.js:373 739 msgid "One-click autoconfig Cache Enabler" 740 msgstr "" 741 742 #: assets/build/index.js:1 743 #: assets/src/js/pages/SettingsPage.js:379 744 msgid "Apply recommended Cache Enabler settings: Clear site cache on post or plugin changes, WebP support, Gzip or Brotli compression, and minify HTML (excluding inline CSS/JS)." 745 msgstr "" 746 747 #: assets/build/index.js:1 748 #: assets/src/js/pages/SettingsPage.js:407 749 msgid "One-click autoconfig SQLite Object Cache" 750 msgstr "" 751 752 #: assets/build/index.js:1 753 #: assets/src/js/pages/SettingsPage.js:413 754 msgid "Apply recommended SQLite Object Cache settings. Enable \"Use APCu\" if APCu is available." 755 msgstr "" 756 757 #: assets/build/index.js:1 758 #: assets/src/js/pages/SettingsPage.js:433 608 759 msgid "Enable all actions" 609 760 msgstr "" 610 761 611 762 #: assets/build/index.js:1 612 #: assets/src/js/pages/SettingsPage.js: 241763 #: assets/src/js/pages/SettingsPage.js:440 613 764 msgid "Disable all actions" 614 765 msgstr "" 615 766 616 767 #: assets/build/index.js:1 617 #: assets/src/js/pages/SettingsPage.js: 251768 #: assets/src/js/pages/SettingsPage.js:450 618 769 msgid "Pick configuration preset" 619 770 msgstr "" 620 771 621 772 #: assets/build/index.js:1 622 #: assets/src/js/pages/SettingsPage.js: 253773 #: assets/src/js/pages/SettingsPage.js:452 623 774 msgid "Don't know which features to enable? Quickly configure ZenPress by selecting a preset that matches your site type. Each preset enables optimized features for your specific use case." 624 775 msgstr "" 625 776 626 777 #: assets/build/index.js:1 627 #: assets/src/js/pages/SettingsPage.js: 259778 #: assets/src/js/pages/SettingsPage.js:458 628 779 msgid "Corporate website" 629 780 msgstr "" 630 781 631 782 #: assets/build/index.js:1 632 #: assets/src/js/pages/SettingsPage.js: 261783 #: assets/src/js/pages/SettingsPage.js:460 633 784 msgid "Optimized for business sites and portfolios. Focuses on security, performance, and removing unnecessary features like RSS feeds and author archives." 634 785 msgstr "" 635 786 636 787 #: assets/build/index.js:1 637 #: assets/src/js/pages/SettingsPage.js: 271638 #: assets/src/js/pages/SettingsPage.js: 286639 #: assets/src/js/pages/SettingsPage.js: 301788 #: assets/src/js/pages/SettingsPage.js:470 789 #: assets/src/js/pages/SettingsPage.js:485 790 #: assets/src/js/pages/SettingsPage.js:500 640 791 msgid "Enable" 641 792 msgstr "" 642 793 643 794 #: assets/build/index.js:1 644 #: assets/src/js/pages/SettingsPage.js: 274795 #: assets/src/js/pages/SettingsPage.js:473 645 796 msgid "Blog" 646 797 msgstr "" 647 798 648 799 #: assets/build/index.js:1 649 #: assets/src/js/pages/SettingsPage.js: 276800 #: assets/src/js/pages/SettingsPage.js:475 650 801 msgid "Tailored for content-focused blogs. Includes performance and security optimizations while preserving essential blog features like RSS feeds." 651 802 msgstr "" 652 803 653 804 #: assets/build/index.js:1 654 #: assets/src/js/pages/SettingsPage.js: 289805 #: assets/src/js/pages/SettingsPage.js:488 655 806 msgid "E-commerce" 656 807 msgstr "" 657 808 658 809 #: assets/build/index.js:1 659 #: assets/src/js/pages/SettingsPage.js: 291810 #: assets/src/js/pages/SettingsPage.js:490 660 811 msgid "Designed for WooCommerce stores. Includes all performance and security features plus WooCommerce-specific optimizations for faster checkout." 661 812 msgstr "" -
zenpress/tags/2.2.3/readme.txt
r3451904 r3451916 10 10 License URI: https://www.gnu.org/licenses/gpl-2.0.html/ 11 11 12 Easily speed up and strengthen your WordPress site by cleaning out unnecessary features and protecting weak spots.12 Easily speed up and strengthen your website in one click: clean out unnecessary features, protect weak points, autoconfigure cache integrations. 13 13 14 14 == Description == … … 90 90 = Tools = 91 91 * Protect the wp-login form from brute force attacks. 92 * Toggle "Show ZenPress admin bar button" (clear caches from the admin bar when at least one integration is active).92 * Toggle "Show ZenPress admin bar button": ZenPress item in the admin bar with "Clear all caches" and sub-items per active integration (page cache, static assets, object cache). Visible only when at least one of Cache Enabler, AutOptimize, or SQLite Object Cache is active. When enabled, those plugins' own admin bar buttons are hidden. Toggle via Settings > ZenPress > Tools. 93 93 94 94 = Integrations = … … 96 96 ZenPress integrates with Cache Enabler, Autoptimize, and SQLite Object Cache. When any of these plugins is active, the Tools tab shows integration status and one-click autoconfig actions. 97 97 98 * Admin bar: One "Clear all caches" button (dashicon) in the admin bar, with sub-items to clear page cache (Cache Enabler), static assets (Autoptimize), or object cache (SQLite Object Cache) separately. The ZenPress button replaces the third-party cache buttons when the ZenPress admin bar is enabled. You can hide itvia Settings > ZenPress > Tools.99 * Autoptimize: One-click autoconfig enables recommended options (JS/CSS/aggregate/nogzip/fallback on; defer/HTML/logged-in/meta off) and clears the Autoptimize cache.100 * Cache Enabler: One-click autoconfig enables clear site cache on post or plugin changes, WebP support, Gzip compression, and minify HTML (excluding inline CSS/JS), then clears the page cache.101 * SQLite Object Cache: One-click autoconfig enables the "Use APCu" option in the plugin settings when the APCu extension is available (no wp-config editing; the plugin may write its constant when its own settings are saved).98 * Admin bar: One "Clear all caches" button (dashicon) in the admin bar, with sub-items to clear page cache (Cache Enabler), static assets (Autoptimize), or object cache (SQLite Object Cache) separately. When the ZenPress admin bar is enabled, the third-party cache buttons (Cache Enabler, AutOptimize, SQLite Object Cache) are hidden. You can hide the ZenPress admin bar via Settings > ZenPress > Tools. 99 * Autoptimize: One-click autoconfig enables recommended options (JS/CSS/aggregate/nogzip/fallback on; defer/HTML/logged-in/meta off). 100 * Cache Enabler: One-click autoconfig enables clear site cache on post or plugin changes, WebP support, Gzip or Brotli compression, and minify HTML (excluding inline CSS/JS). 101 * SQLite Object Cache: One-click autoconfig enables the "Use APCu" option in the plugin settings when the APCu extension is available. 102 102 103 103 = Presets = … … 209 209 210 210 = 2.2.3 = 211 - Integrations: Cache Enabler one-click autoconfig (clear on post/plugin, WebP, Gzip, minify HTML excl. inline CSS/JS). 212 - Integrations: SQLite Object Cache one-click autoconfig (enable "Use APCu" option when APCu available; no wp-config editing by ZenPress). 213 - Integrations: Admin bar "Clear all caches" button now uses dashicons-trash icon. 214 - Defensive: REST and AJAX handlers wrap integration calls in try/catch; failed autoconfig or cache clear returns 500 with message instead of fatal. 215 - Defensive: get_active_integrations_for_ui() wraps ReflectionClass in try/catch so one missing integration does not break the settings UI. 216 - Defensive: Cache Enabler autoconfig ensures option value is array before merge (corrupted option no longer triggers warning). 217 - Defensive: Metadata and snippet loader wrap include in try/catch so a single bad meta file or snippet does not fatal the site. 218 - Defensive: Protect wp-login skips rate limiting when REMOTE_ADDR is missing or invalid to avoid site-wide lockout (e.g. CLI or proxy). 219 - Defensive: Autoptimize clear_cache and autoconfig check method_exists before calling third-party API. 220 - Docblocks: Reviewed and tightened docblocks across inc/ (file headers, classes, methods) for coherence, readability, and conciseness; removed redundant @param/@return where type is obvious. 221 - Lint: PHPStan and PHP CS Fixer fixes (autoptimize method_exists ignore, protect-wp-login strict comparison). 211 - Fix : Disable Cache enabler "clear page cache" button in admin bar when ZenPress admin bar button is active. 212 - Fix : ZenPress admin bar button default option is now "off". 222 213 223 214 = 2.2.2 = 224 - Integrations: Admin bar and one-click autoconfig (e.g. Autoptimize) in Tools tab; visible only when at least one integration is active. 225 - Documentation: Added Hooks & filters section in readme; Integrations section in workflow.md; config comments for PHPStan and PHP CS Fixer. 226 - Version alignment: Stable tag and plugin header set to 2.2.2. 215 - Integration : Cache enabler autoconfig in one click. 216 - Integration : Autoptimize autoconfig in one click. 217 - Integration : SQLite Object cache autoconfig in one click. 218 - New actionable function: Enable Admin bar "Clear all caches" button, visible only when at least one integration is active; third-party cache buttons hidden when ZenPress admin bar is enabled. 219 - Fix: REST and AJAX handlers wrap integration calls in try/catch; failed autoconfig or cache clear returns 500 with message instead of fatal. 220 - Fix: get_active_integrations_for_ui() wraps ReflectionClass in try/catch so one missing integration does not break the settings UI. 221 - Fix: Metadata and snippet loader wrap include in try/catch so a single bad meta file or snippet does not fatal the site. 227 222 228 223 = 2.2.1 = … … 358 353 == Upgrade Notice == 359 354 360 = 2.2.3 =361 - Integrations: Cache Enabler and SQLite Object Cache one-click autoconfig; admin bar trash icon; defensive fixes and docblock cleanup.362 363 = 2.2.2 =364 - Integrations: ZenPress admin bar and one-click autoconfig in Tools tab (Autoptimize). Documentation updates.365 366 355 = 2.2.1 = 367 356 - Security and code quality improvements. Recommended update. -
zenpress/tags/2.2.3/zenpress.php
r3451904 r3451916 11 11 * 12 12 * Plugin Name: ZenPress - Optimize & Secure 13 * Description: Easily speed up and strengthen your WordPress site by cleaning out unnecessary features and protecting weak points.14 * Version: 2.2. 213 * Description: Easily speed up and strengthen your WordPress site in one click: clean out unnecessary features, protect weak points, autoconfigure cache integrations. 14 * Version: 2.2.3 15 15 * Plugin URI: https://wordpress.org/plugins/zenpress/ 16 16 * Author: Quentin Le Duff … … 47 47 require_once __DIR__ . '/inc/core/sanitize.php'; 48 48 49 // Integrations (one file per plugin: handlers + autoconfig)49 // Integrations 50 50 require_once __DIR__ . '/inc/classes/autoptimize.php'; 51 51 require_once __DIR__ . '/inc/classes/cache-enabler.php'; -
zenpress/trunk/assets/build/index.asset.php
r3451904 r3451916 1 <?php return array('dependencies' => array('react-jsx-runtime', 'wp-api-fetch', 'wp-components', 'wp-data', 'wp-dom-ready', 'wp-element', 'wp-i18n', 'wp-notices'), 'version' => ' 71f7100577c2edd9e445');1 <?php return array('dependencies' => array('react-jsx-runtime', 'wp-api-fetch', 'wp-components', 'wp-data', 'wp-dom-ready', 'wp-element', 'wp-i18n', 'wp-notices'), 'version' => 'f652a35073b70abdaaed'); -
zenpress/trunk/assets/build/index.js
r3451904 r3451916 1 (()=>{"use strict";var e={n:s=>{var t=s&&s.__esModule?()=>s.default:()=>s;return e.d(t,{a:t}),t},d:(s,t)=>{for(var n in t)e.o(t,n)&&!e.o(s,n)&&Object.defineProperty(s,n,{enumerable:!0,get:t[n]})},o:(e,s)=>Object.prototype.hasOwnProperty.call(e,s)};const s=window.wp.domReady;var t=e.n(s);const n=window.wp.element,a=window.wp.i18n,r=window.wp.components,i=window.wp.data,c=window.wp.notices,o=window.wp.apiFetch;var l=e.n(o);const p=window.ReactJSXRuntime,d=({label:e,value:s,onChange:t,help:a})=>{const i=(0,n.useRef)(null);return(0,n.useEffect)(()=>((e,s)=>{if(!e)return;const t=t=>{if("Enter"===t.key){const n=e.querySelector('input[type="checkbox"]'),a=e.ownerDocument||document;n&&(a.activeElement===n||e.contains(a.activeElement))&&(t.preventDefault(),t.stopPropagation(),s())}};return e.addEventListener("keydown",t),()=>{e.removeEventListener("keydown",t)}})(i.current,t),[t]),(0,p.jsx)("div",{ref:i,children:(0,p.jsx)(r.ToggleControl,{label:e,checked:s,onChange:t,help:a,__nextHasNoMarginBottom:!0})})},u=({onClick:e,isBusy:s})=>(0,p.jsx)(r.Button,{variant:"primary",onClick:e,isBusy:s,__next40pxDefaultSize:!0,children:(0,a.__)("Save settings","zenpress")}),b=()=>{const{removeNotice:e}=(0,i.useDispatch)(c.store),s=(0,i.useSelect)(e=>e(c.store).getNotices(),[]);return s&&0!==s.length?(0,p.jsx)(r.NoticeList,{notices:s,onRemove:e}):null},h=(0,n.createContext)(),_=({selectedTabId:e,onSelect:s,orientation:t="horizontal",children:a})=>{const[r,i]=(0,n.useState)(),c=(0,n.useRef)(null),o=void 0!==e?e:r;return(0,p.jsx)(h.Provider,{value:{selectedTabId:o,onSelect:t=>{void 0===e&&i(t),s?.(t)},orientation:t,getOrderedTabIds:()=>c.current?Array.from(c.current.querySelectorAll('[role="tab"]')).map(e=>{const s=e.getAttribute("id");return s?s.replace("zenpress-tab-",""):null}).filter(Boolean):[],tabListRef:c},children:(0,p.jsx)("div",{className:`zenpress-tabs zenpress-tabs--${t}`,children:a})})};_.TabList=({children:e})=>{const{orientation:s,tabListRef:t}=(0,n.useContext)(h);return(0,p.jsx)("div",{ref:t,className:`zenpress-tabs__list zenpress-tabs__list--${s}`,role:"tablist","aria-orientation":s,children:e})},_.Tab=({tabId:e,title:s,className:t="",children:a})=>{const{selectedTabId:r,onSelect:i,orientation:c,getOrderedTabIds:o}=(0,n.useContext)(h),l=r===e,d=(0,n.useRef)(null);return(0,p.jsx)("button",{ref:d,className:`zenpress-tabs__tab ${l?"zenpress-tabs__tab--is-active":""} ${t}`.trim(),role:"tab","aria-selected":l,"aria-controls":`zenpress-tab-panel-${e}`,id:`zenpress-tab-${e}`,tabIndex:l?0:-1,onClick:()=>i(e),onKeyDown:s=>{const t=o();if(!t||0===t.length)return;const n=t.indexOf(e);if(-1===n)return;let a=n;if("vertical"===c?"ArrowDown"===s.key?(s.preventDefault(),a=n<t.length-1?n+1:0):"ArrowUp"===s.key&&(s.preventDefault(),a=n>0?n-1:t.length-1):"ArrowRight"===s.key?(s.preventDefault(),a=n<t.length-1?n+1:0):"ArrowLeft"===s.key&&(s.preventDefault(),a=n>0?n-1:t.length-1),"Home"===s.key?(s.preventDefault(),a=0):"End"===s.key&&(s.preventDefault(),a=t.length-1)," "===s.key||"Enter"===s.key)return s.preventDefault(),void i(e);if(a!==n&&a>=0&&a<t.length){const e=t[a],s=document.getElementById(`zenpress-tab-${e}`);s&&(s.focus(),i(e))}},onFocus:()=>{l||i(e)},children:s||a})},_.TabPanel=({tabId:e,children:s})=>{const{selectedTabId:t}=(0,n.useContext)(h),a=(0,n.useRef)(null),r=t===e;return(0,n.useEffect)(()=>{r&&a.current&&(0===a.current.querySelectorAll('a[href], button:not([disabled]), [tabindex]:not([tabindex="-1"]), input:not([disabled]), select:not([disabled]), textarea:not([disabled])').length?a.current.setAttribute("tabindex","0"):a.current.removeAttribute("tabindex"))},[r]),r?(0,p.jsx)("div",{ref:a,className:"zenpress-tabs__panel",role:"tabpanel",id:`zenpress-tab-panel-${e}`,"aria-labelledby":`zenpress-tab-${e}`,children:s}):(0,p.jsx)("div",{className:"zenpress-tabs__panel",role:"tabpanel",id:`zenpress-tab-panel-${e}`,"aria-labelledby":`zenpress-tab-${e}`,hidden:!0,children:s})};const z=()=>{const{snippets:e,setSnippets:s,adminBarEnabled:t,setAdminBarEnabled:o,saveSettings:h,isSaving:z}=(()=>{const[e,s]=(0,n.useState)({}),[t,r]=(0,n.useState)(! 0),[o,p]=(0,n.useState)(!1),{createSuccessNotice:d,createErrorNotice:u}=(0,i.useDispatch)(c.store);return(0,n.useEffect)(()=>{l()({path:"/wp/v2/settings"}).then(e=>{const t=Array.isArray(e?.zenpress_active_snippets)?e.zenpress_active_snippets:[],n=window?.zenpressSnippetsMeta||{},a={};Object.keys(n).forEach(e=>{a[e]={...n[e],"enable-snippet":t.includes(e)}}),s(a),r(!1!==e?.zenpress_admin_bar_enabled)}).catch(()=>{u((0,a.__)("Failed to load settings.","zenpress"))})},[u]),{snippets:e,setSnippets:s,adminBarEnabled:t,setAdminBarEnabled:r,saveSettings:async()=>{p(!0);const s=Object.keys(e).filter(s=>e[s]?.["enable-snippet"]);try{await l()({path:"/wp/v2/settings",method:"POST",data:{zenpress_active_snippets:s,zenpress_admin_bar_enabled:t}}),d((0,a.__)("Settings saved.","zenpress"))}catch{u((0,a.__)("Failed to save settings.","zenpress"))}finally{p(!1)}},isSaving:o}})(),[f,m]=(0,n.useState)(),[g,v]=(0,n.useState)(null),{createSuccessNotice:x,createErrorNotice:y}=(0,i.useDispatch)(c.store),j=e=>{s(s=>{const t={};return Object.entries(s).forEach(([s,n])=>{const a=(Array.isArray(n?.preset)?n.preset:[]).includes(e);t[s]={...n,"enable-snippet":a}}),t})},w=e=>e?e.charAt(0).toUpperCase()+e.slice(1).toLowerCase():e,S=["core","gutenberg","woocommerce","ads-blocker","tools"],k={};Object.keys(e).forEach(s=>{const t=e[s],n=(t?.category||(0,a.__)("Uncategorized","zenpress")).toLowerCase(),r=(t?.subcategory||(0,a.__)("uncategorized","zenpress")).toLowerCase();k[n]||(k[n]={}),k[n][r]||(k[n][r]=[]),k[n][r].push({name:s,data:t})});const C=Object.keys(k).sort((e,s)=>{const t=S.indexOf(e.toLowerCase()),n=S.indexOf(s.toLowerCase());return-1!==t&&-1!==n?t-n:-1!==t?-1:-1!==n?1:e.localeCompare(s,void 0,{sensitivity:"base"})});(0,n.useEffect)(()=>{!f&&C.length>0&&m(C[0])},[f,C]);const E=async(e,s,t,n)=>{v(e);try{const e=await l()({path:s,method:"POST"});x(e?.message||t)}catch{y(n)}finally{v(null)}},A=()=>E("autoptimize","/zenpress/v1/autoconfig/autoptimize",(0,a.__)("Autoptimize has been configured.","zenpress"),(0,a.__)("Autoptimize autoconfig failed. Is Autoptimize installed and active?","zenpress")),N=()=>E("cache_enabler","/zenpress/v1/autoconfig/cache-enabler",(0,a.__)("Cache Enabler has been configured.","zenpress"),(0,a.__)("Cache Enabler autoconfig failed. Is Cache Enabler installed and active?","zenpress")),O=()=>E("sqlite_object_cache","/zenpress/v1/autoconfig/sqlite-object-cache",(0,a.__)("SQLite Object Cache has been configured.","zenpress"),(0,a.__)("SQLite Object Cache autoconfig failed. Is SQLite Object Cache installed and active?","zenpress"));return(0,n.useEffect)(()=>{const e=e=>{(e.ctrlKey||e.metaKey)&&"s"===e.key&&(e.preventDefault(),z||h())};return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}},[h,z]),(0,p.jsxs)("article",{className:"zenpress-row",children:[(0,p.jsxs)("section",{className:"zenpress-main",children:[(0,p.jsx)("div",{className:"zenpress-notices",children:(0,p.jsx)(b,{})}),(0,p.jsxs)("div",{className:"zenpress-panel",children:[(0,p.jsxs)(_,{orientation:"vertical",selectedTabId:f,onSelect:e=>{m(e),m(e)},children:[(0,p.jsx)(_.TabList,{children:C.map(e=>{const s=`zenpress-tabs__tab--category-${e.toLowerCase().replace(/\s+/g,"-")}`;return(0,p.jsx)(_.Tab,{tabId:e,title:w(e),className:s,children:w(e)},e)})}),C.map(e=>{const n=Object.keys(k[e]).sort();return(0,p.jsxs)(_.TabPanel,{tabId:e,children:[(0,p.jsx)("h2",{children:w(e)}),n.map(t=>(0,p.jsxs)("div",{className:`zenpress-subcategory zenpress-subcategory-${t.toLowerCase().replace(/\s+/g,"-")}`,children:[(0,p.jsx)("hr",{}),(0,p.jsx)("h3",{children:w(t)}),k[e][t].map(({name:e,data:t})=>(0,p.jsx)(d,{label:t.title||e,value:t?.["enable-snippet"]||!1,onChange:()=>{return t=e,void s(e=>({...e,[t]:{...e[t],"enable-snippet":!e[t]?.["enable-snippet"]}}));var t},help:t.description||""},e))]},t)),"tools"===e&&Object.values(window?.zenpressIntegrationsActive||{}).some(Boolean)&&(0,p.jsxs)("div",{className:"zenpress-subcategory zenpress-subcategory-integrations",children:[(0,p.jsx)("hr",{}),(0,p.jsx)("h3",{children:(0,a.__)("Integrations","zenpress")}),(0,p.jsx)(d,{label:(0,a.__)("Show ZenPress admin bar button","zenpress"),value:t,onChange:()=>o(!t),help:(0,a.__)('Show a "ZenPress" item in the admin bar with "Clear caches". When enabled, integration buttons (e.g. Autoptimize) are hidden.',"zenpress")}),window?.zenpressIntegrationsActive?.autoptimize&&(0,p.jsxs)("div",{className:"zenpress-autoconfig-actions",children:[(0,p.jsx)(r.Button,{variant:"secondary",onClick:A,disabled:null!==g,__next40pxDefaultSize:!0,children:"autoptimize"===g?(0,a.__)("Applying…","zenpress"):(0,a.__)("One-click autoconfig Autoptimize","zenpress")}),(0,p.jsx)("p",{className:"zenpress-autoconfig-help",children:(0,a.__)("Apply recommended Autoptimize settings (optimize JS/CSS, aggregate CSS, static files, 404 fallbacks; disable defer, HTML optimize, optimize for logged-in, per post/page). Only works if Autoptimize is active.","zenpress")})]}),window?.zenpressIntegrationsActive?.cache_enabler&&(0,p.jsxs)("div",{className:"zenpress-autoconfig-actions",children:[(0,p.jsx)(r.Button,{variant:"secondary",onClick:N,disabled:null!==g,__next40pxDefaultSize:!0,children:"cache_enabler"===g?(0,a.__)("Applying…","zenpress"):(0,a.__)("One-click autoconfig Cache Enabler","zenpress")}),(0,p.jsx)("p",{className:"zenpress-autoconfig-help",children:(0,a.__)("Apply recommended Cache Enabler settings. Only works if Cache Enabler is active.","zenpress")})]}),window?.zenpressIntegrationsActive?.sqlite_object_cache&&(0,p.jsxs)("div",{className:"zenpress-autoconfig-actions",children:[(0,p.jsx)(r.Button,{variant:"secondary",onClick:O,disabled:null!==g,__next40pxDefaultSize:!0,children:"sqlite_object_cache"===g?(0,a.__)("Applying…","zenpress"):(0,a.__)("One-click autoconfig SQLite Object Cache","zenpress")}),(0,p.jsx)("p",{className:"zenpress-autoconfig-help",children:(0,a.__)("Apply recommended SQLite Object Cache settings. Only works if SQLite Object Cache is active.","zenpress")})]})]})]},e)})]}),(0,p.jsxs)("div",{className:"zenpress-actions",children:[(0,p.jsxs)("div",{className:"zenpress-actions-bulk",children:[(0,p.jsx)(r.Button,{variant:"tertiary",onClick:()=>{s(e=>{const s={};return Object.keys(e).forEach(t=>{s[t]={...e[t],"enable-snippet":!0}}),s})},__next40pxDefaultSize:!0,children:(0,a.__)("Enable all actions","zenpress")}),(0,p.jsx)(r.Button,{isDestructive:!0,onClick:()=>{s(e=>{const s={};return Object.keys(e).forEach(t=>{s[t]={...e[t],"enable-snippet":!1}}),s})},__next40pxDefaultSize:!0,children:(0,a.__)("Disable all actions","zenpress")})]}),(0,p.jsx)(u,{onClick:h,isBusy:z})]})]})]}),(0,p.jsx)("aside",{className:"zenpress-sidebar",children:(0,p.jsx)("div",{className:"zenpress-presets",children:(0,p.jsxs)("div",{className:"zenpress-presets-description",children:[(0,p.jsx)("h2",{children:(0,a.__)("Pick configuration preset","zenpress")}),(0,p.jsx)("p",{children:(0,a.__)("Don't know which features to enable? Quickly configure ZenPress by selecting a preset that matches your site type. Each preset enables optimized features for your specific use case.","zenpress")}),(0,p.jsx)("hr",{}),(0,p.jsxs)("h3",{children:["🖼️ ",(0,a.__)("Corporate website","zenpress")]}),(0,p.jsx)("p",{children:(0,a.__)("Optimized for business sites and portfolios. Focuses on security, performance, and removing unnecessary features like RSS feeds and author archives.","zenpress")}),(0,p.jsx)(r.Button,{variant:"secondary",onClick:()=>j("corporate-website"),__next40pxDefaultSize:!0,children:(0,a.__)("Enable","zenpress")}),(0,p.jsx)("hr",{}),(0,p.jsxs)("h3",{children:[" 📰 ",(0,a.__)("Blog","zenpress")]}),(0,p.jsx)("p",{children:(0,a.__)("Tailored for content-focused blogs. Includes performance and security optimizations while preserving essential blog features like RSS feeds.","zenpress")}),(0,p.jsx)(r.Button,{variant:"secondary",onClick:()=>j("blog"),__next40pxDefaultSize:!0,children:(0,a.__)("Enable","zenpress")}),(0,p.jsx)("hr",{}),(0,p.jsxs)("h3",{children:["🛒 ",(0,a.__)("E-commerce","zenpress")]}),(0,p.jsx)("p",{children:(0,a.__)("Designed for WooCommerce stores. Includes all performance and security features plus WooCommerce-specific optimizations for faster checkout.","zenpress")}),(0,p.jsx)(r.Button,{variant:"secondary",onClick:()=>j("ecommerce"),__next40pxDefaultSize:!0,children:(0,a.__)("Enable","zenpress")})]})})})]})};t()(()=>{const e=document.getElementById("zenpress-settings");e&&(0,n.createRoot)(e).render((0,p.jsx)(z,{}))})})();1 (()=>{"use strict";var e={n:s=>{var t=s&&s.__esModule?()=>s.default:()=>s;return e.d(t,{a:t}),t},d:(s,t)=>{for(var n in t)e.o(t,n)&&!e.o(s,n)&&Object.defineProperty(s,n,{enumerable:!0,get:t[n]})},o:(e,s)=>Object.prototype.hasOwnProperty.call(e,s)};const s=window.wp.domReady;var t=e.n(s);const n=window.wp.element,a=window.wp.i18n,r=window.wp.components,i=window.wp.data,c=window.wp.notices,o=window.wp.apiFetch;var l=e.n(o);const p=window.ReactJSXRuntime,d=({label:e,value:s,onChange:t,help:a})=>{const i=(0,n.useRef)(null);return(0,n.useEffect)(()=>((e,s)=>{if(!e)return;const t=t=>{if("Enter"===t.key){const n=e.querySelector('input[type="checkbox"]'),a=e.ownerDocument||document;n&&(a.activeElement===n||e.contains(a.activeElement))&&(t.preventDefault(),t.stopPropagation(),s())}};return e.addEventListener("keydown",t),()=>{e.removeEventListener("keydown",t)}})(i.current,t),[t]),(0,p.jsx)("div",{ref:i,children:(0,p.jsx)(r.ToggleControl,{label:e,checked:s,onChange:t,help:a,__nextHasNoMarginBottom:!0})})},u=({onClick:e,isBusy:s})=>(0,p.jsx)(r.Button,{variant:"primary",onClick:e,isBusy:s,__next40pxDefaultSize:!0,children:(0,a.__)("Save settings","zenpress")}),b=()=>{const{removeNotice:e}=(0,i.useDispatch)(c.store),s=(0,i.useSelect)(e=>e(c.store).getNotices(),[]);return s&&0!==s.length?(0,p.jsx)(r.NoticeList,{notices:s,onRemove:e}):null},h=(0,n.createContext)(),_=({selectedTabId:e,onSelect:s,orientation:t="horizontal",children:a})=>{const[r,i]=(0,n.useState)(),c=(0,n.useRef)(null),o=void 0!==e?e:r;return(0,p.jsx)(h.Provider,{value:{selectedTabId:o,onSelect:t=>{void 0===e&&i(t),s?.(t)},orientation:t,getOrderedTabIds:()=>c.current?Array.from(c.current.querySelectorAll('[role="tab"]')).map(e=>{const s=e.getAttribute("id");return s?s.replace("zenpress-tab-",""):null}).filter(Boolean):[],tabListRef:c},children:(0,p.jsx)("div",{className:`zenpress-tabs zenpress-tabs--${t}`,children:a})})};_.TabList=({children:e})=>{const{orientation:s,tabListRef:t}=(0,n.useContext)(h);return(0,p.jsx)("div",{ref:t,className:`zenpress-tabs__list zenpress-tabs__list--${s}`,role:"tablist","aria-orientation":s,children:e})},_.Tab=({tabId:e,title:s,className:t="",children:a})=>{const{selectedTabId:r,onSelect:i,orientation:c,getOrderedTabIds:o}=(0,n.useContext)(h),l=r===e,d=(0,n.useRef)(null);return(0,p.jsx)("button",{ref:d,className:`zenpress-tabs__tab ${l?"zenpress-tabs__tab--is-active":""} ${t}`.trim(),role:"tab","aria-selected":l,"aria-controls":`zenpress-tab-panel-${e}`,id:`zenpress-tab-${e}`,tabIndex:l?0:-1,onClick:()=>i(e),onKeyDown:s=>{const t=o();if(!t||0===t.length)return;const n=t.indexOf(e);if(-1===n)return;let a=n;if("vertical"===c?"ArrowDown"===s.key?(s.preventDefault(),a=n<t.length-1?n+1:0):"ArrowUp"===s.key&&(s.preventDefault(),a=n>0?n-1:t.length-1):"ArrowRight"===s.key?(s.preventDefault(),a=n<t.length-1?n+1:0):"ArrowLeft"===s.key&&(s.preventDefault(),a=n>0?n-1:t.length-1),"Home"===s.key?(s.preventDefault(),a=0):"End"===s.key&&(s.preventDefault(),a=t.length-1)," "===s.key||"Enter"===s.key)return s.preventDefault(),void i(e);if(a!==n&&a>=0&&a<t.length){const e=t[a],s=document.getElementById(`zenpress-tab-${e}`);s&&(s.focus(),i(e))}},onFocus:()=>{l||i(e)},children:s||a})},_.TabPanel=({tabId:e,children:s})=>{const{selectedTabId:t}=(0,n.useContext)(h),a=(0,n.useRef)(null),r=t===e;return(0,n.useEffect)(()=>{r&&a.current&&(0===a.current.querySelectorAll('a[href], button:not([disabled]), [tabindex]:not([tabindex="-1"]), input:not([disabled]), select:not([disabled]), textarea:not([disabled])').length?a.current.setAttribute("tabindex","0"):a.current.removeAttribute("tabindex"))},[r]),r?(0,p.jsx)("div",{ref:a,className:"zenpress-tabs__panel",role:"tabpanel",id:`zenpress-tab-panel-${e}`,"aria-labelledby":`zenpress-tab-${e}`,children:s}):(0,p.jsx)("div",{className:"zenpress-tabs__panel",role:"tabpanel",id:`zenpress-tab-panel-${e}`,"aria-labelledby":`zenpress-tab-${e}`,hidden:!0,children:s})};const z=()=>{const{snippets:e,setSnippets:s,adminBarEnabled:t,setAdminBarEnabled:o,saveSettings:h,isSaving:z}=(()=>{const[e,s]=(0,n.useState)({}),[t,r]=(0,n.useState)(!1),[o,p]=(0,n.useState)(!1),{createSuccessNotice:d,createErrorNotice:u}=(0,i.useDispatch)(c.store);return(0,n.useEffect)(()=>{l()({path:"/wp/v2/settings"}).then(e=>{const t=Array.isArray(e?.zenpress_active_snippets)?e.zenpress_active_snippets:[],n=window?.zenpressSnippetsMeta||{},a={};Object.keys(n).forEach(e=>{a[e]={...n[e],"enable-snippet":t.includes(e)}}),s(a),r(!0===e?.zenpress_admin_bar_enabled)}).catch(()=>{u((0,a.__)("Failed to load settings.","zenpress"))})},[u]),{snippets:e,setSnippets:s,adminBarEnabled:t,setAdminBarEnabled:r,saveSettings:async()=>{p(!0);const s=Object.keys(e).filter(s=>e[s]?.["enable-snippet"]);try{await l()({path:"/wp/v2/settings",method:"POST",data:{zenpress_active_snippets:s,zenpress_admin_bar_enabled:t}}),d((0,a.__)("Settings saved.","zenpress"))}catch{u((0,a.__)("Failed to save settings.","zenpress"))}finally{p(!1)}},isSaving:o}})(),[f,m]=(0,n.useState)(),[g,v]=(0,n.useState)(null),{createSuccessNotice:x,createErrorNotice:y}=(0,i.useDispatch)(c.store),j=e=>{s(s=>{const t={};return Object.entries(s).forEach(([s,n])=>{const a=(Array.isArray(n?.preset)?n.preset:[]).includes(e);t[s]={...n,"enable-snippet":a}}),t})},w=e=>e?e.charAt(0).toUpperCase()+e.slice(1).toLowerCase():e,S=["core","gutenberg","woocommerce","ads-blocker","tools"],C={};Object.keys(e).forEach(s=>{const t=e[s],n=(t?.category||(0,a.__)("Uncategorized","zenpress")).toLowerCase(),r=(t?.subcategory||(0,a.__)("uncategorized","zenpress")).toLowerCase();C[n]||(C[n]={}),C[n][r]||(C[n][r]=[]),C[n][r].push({name:s,data:t})});const k=Object.keys(C).sort((e,s)=>{const t=S.indexOf(e.toLowerCase()),n=S.indexOf(s.toLowerCase());return-1!==t&&-1!==n?t-n:-1!==t?-1:-1!==n?1:e.localeCompare(s,void 0,{sensitivity:"base"})});(0,n.useEffect)(()=>{!f&&k.length>0&&m(k[0])},[f,k]);const E=async(e,s,t,n)=>{v(e);try{const e=await l()({path:s,method:"POST"});x(e?.message||t)}catch{y(n)}finally{v(null)}},A=()=>E("autoptimize","/zenpress/v1/autoconfig/autoptimize",(0,a.__)("Autoptimize has been configured.","zenpress"),(0,a.__)("Autoptimize autoconfig failed. Is Autoptimize installed and active?","zenpress")),N=()=>E("cache_enabler","/zenpress/v1/autoconfig/cache-enabler",(0,a.__)("Cache Enabler has been configured.","zenpress"),(0,a.__)("Cache Enabler autoconfig failed. Is Cache Enabler installed and active?","zenpress")),O=()=>E("sqlite_object_cache","/zenpress/v1/autoconfig/sqlite-object-cache",(0,a.__)("SQLite Object Cache has been configured.","zenpress"),(0,a.__)("SQLite Object Cache autoconfig failed. Is SQLite Object Cache installed and active?","zenpress"));return(0,n.useEffect)(()=>{const e=e=>{(e.ctrlKey||e.metaKey)&&"s"===e.key&&(e.preventDefault(),z||h())};return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}},[h,z]),(0,p.jsxs)("article",{className:"zenpress-row",children:[(0,p.jsxs)("section",{className:"zenpress-main",children:[(0,p.jsx)("div",{className:"zenpress-notices",children:(0,p.jsx)(b,{})}),(0,p.jsxs)("div",{className:"zenpress-panel",children:[(0,p.jsxs)(_,{orientation:"vertical",selectedTabId:f,onSelect:e=>{m(e),m(e)},children:[(0,p.jsx)(_.TabList,{children:k.map(e=>{const s=`zenpress-tabs__tab--category-${e.toLowerCase().replace(/\s+/g,"-")}`;return(0,p.jsx)(_.Tab,{tabId:e,title:w(e),className:s,children:w(e)},e)})}),k.map(e=>{const n=Object.keys(C[e]).sort();return(0,p.jsxs)(_.TabPanel,{tabId:e,children:[(0,p.jsx)("h2",{children:w(e)}),n.map(t=>(0,p.jsxs)("div",{className:`zenpress-subcategory zenpress-subcategory-${t.toLowerCase().replace(/\s+/g,"-")}`,children:[(0,p.jsx)("hr",{}),(0,p.jsx)("h3",{children:w(t)}),C[e][t].map(({name:e,data:t})=>(0,p.jsx)(d,{label:t.title||e,value:t?.["enable-snippet"]||!1,onChange:()=>{return t=e,void s(e=>({...e,[t]:{...e[t],"enable-snippet":!e[t]?.["enable-snippet"]}}));var t},help:t.description||""},e))]},t)),"tools"===e&&Object.values(window?.zenpressIntegrationsActive||{}).some(Boolean)&&(0,p.jsxs)("div",{className:"zenpress-subcategory zenpress-subcategory-integrations",children:[(0,p.jsx)("hr",{}),(0,p.jsx)("h3",{children:(0,a.__)("Integrations","zenpress")}),(0,p.jsx)(d,{label:(0,a.__)("Show ZenPress admin bar button","zenpress"),value:t,onChange:()=>o(!t),help:(0,a.__)('Show a ZenPress item in the admin bar with "Clear all caches" and sub-items for each active integration (page cache, static assets, object cache). Visible only when at least one of Cache Enabler, AutOptimize, or SQLite Object Cache is active. When enabled, those plugins\' own admin bar buttons are hidden.',"zenpress")}),window?.zenpressIntegrationsActive?.autoptimize&&(0,p.jsxs)("div",{className:"zenpress-autoconfig-actions",children:[(0,p.jsx)(r.Button,{variant:"secondary",onClick:A,disabled:null!==g,__next40pxDefaultSize:!0,children:"autoptimize"===g?(0,a.__)("Applying…","zenpress"):(0,a.__)("One-click autoconfig Autoptimize","zenpress")}),(0,p.jsx)("p",{className:"zenpress-autoconfig-help",children:(0,a.__)("Apply recommended Autoptimize settings: Minify JS & CSS, aggregate CSS, static files, 404 fallbacks.","zenpress")})]}),window?.zenpressIntegrationsActive?.cache_enabler&&(0,p.jsxs)("div",{className:"zenpress-autoconfig-actions",children:[(0,p.jsx)(r.Button,{variant:"secondary",onClick:N,disabled:null!==g,__next40pxDefaultSize:!0,children:"cache_enabler"===g?(0,a.__)("Applying…","zenpress"):(0,a.__)("One-click autoconfig Cache Enabler","zenpress")}),(0,p.jsx)("p",{className:"zenpress-autoconfig-help",children:(0,a.__)("Apply recommended Cache Enabler settings: Clear site cache on post or plugin changes, WebP support, Gzip or Brotli compression, and minify HTML (excluding inline CSS/JS).","zenpress")})]}),window?.zenpressIntegrationsActive?.sqlite_object_cache&&(0,p.jsxs)("div",{className:"zenpress-autoconfig-actions",children:[(0,p.jsx)(r.Button,{variant:"secondary",onClick:O,disabled:null!==g,__next40pxDefaultSize:!0,children:"sqlite_object_cache"===g?(0,a.__)("Applying…","zenpress"):(0,a.__)("One-click autoconfig SQLite Object Cache","zenpress")}),(0,p.jsx)("p",{className:"zenpress-autoconfig-help",children:(0,a.__)('Apply recommended SQLite Object Cache settings. Enable "Use APCu" if APCu is available.',"zenpress")})]})]})]},e)})]}),(0,p.jsxs)("div",{className:"zenpress-actions",children:[(0,p.jsxs)("div",{className:"zenpress-actions-bulk",children:[(0,p.jsx)(r.Button,{variant:"tertiary",onClick:()=>{s(e=>{const s={};return Object.keys(e).forEach(t=>{s[t]={...e[t],"enable-snippet":!0}}),s})},__next40pxDefaultSize:!0,children:(0,a.__)("Enable all actions","zenpress")}),(0,p.jsx)(r.Button,{isDestructive:!0,onClick:()=>{s(e=>{const s={};return Object.keys(e).forEach(t=>{s[t]={...e[t],"enable-snippet":!1}}),s})},__next40pxDefaultSize:!0,children:(0,a.__)("Disable all actions","zenpress")})]}),(0,p.jsx)(u,{onClick:h,isBusy:z})]})]})]}),(0,p.jsx)("aside",{className:"zenpress-sidebar",children:(0,p.jsx)("div",{className:"zenpress-presets",children:(0,p.jsxs)("div",{className:"zenpress-presets-description",children:[(0,p.jsx)("h2",{children:(0,a.__)("Pick configuration preset","zenpress")}),(0,p.jsx)("p",{children:(0,a.__)("Don't know which features to enable? Quickly configure ZenPress by selecting a preset that matches your site type. Each preset enables optimized features for your specific use case.","zenpress")}),(0,p.jsx)("hr",{}),(0,p.jsxs)("h3",{children:["🖼️ ",(0,a.__)("Corporate website","zenpress")]}),(0,p.jsx)("p",{children:(0,a.__)("Optimized for business sites and portfolios. Focuses on security, performance, and removing unnecessary features like RSS feeds and author archives.","zenpress")}),(0,p.jsx)(r.Button,{variant:"secondary",onClick:()=>j("corporate-website"),__next40pxDefaultSize:!0,children:(0,a.__)("Enable","zenpress")}),(0,p.jsx)("hr",{}),(0,p.jsxs)("h3",{children:[" 📰 ",(0,a.__)("Blog","zenpress")]}),(0,p.jsx)("p",{children:(0,a.__)("Tailored for content-focused blogs. Includes performance and security optimizations while preserving essential blog features like RSS feeds.","zenpress")}),(0,p.jsx)(r.Button,{variant:"secondary",onClick:()=>j("blog"),__next40pxDefaultSize:!0,children:(0,a.__)("Enable","zenpress")}),(0,p.jsx)("hr",{}),(0,p.jsxs)("h3",{children:["🛒 ",(0,a.__)("E-commerce","zenpress")]}),(0,p.jsx)("p",{children:(0,a.__)("Designed for WooCommerce stores. Includes all performance and security features plus WooCommerce-specific optimizations for faster checkout.","zenpress")}),(0,p.jsx)(r.Button,{variant:"secondary",onClick:()=>j("ecommerce"),__next40pxDefaultSize:!0,children:(0,a.__)("Enable","zenpress")})]})})})]})};t()(()=>{const e=document.getElementById("zenpress-settings");e&&(0,n.createRoot)(e).render((0,p.jsx)(z,{}))})})(); -
zenpress/trunk/assets/src/js/hooks/useSettings.js
r3451904 r3451916 18 18 export const useSettings = () => { 19 19 const [snippets, setSnippets] = useState({}); 20 const [adminBarEnabled, setAdminBarEnabled] = useState( true);20 const [adminBarEnabled, setAdminBarEnabled] = useState(false); 21 21 const [isSaving, setIsSaving] = useState(false); 22 22 const { createSuccessNotice, createErrorNotice } = … … 42 42 setSnippets(snippetsData); 43 43 setAdminBarEnabled( 44 settings?.zenpress_admin_bar_enabled !== false44 settings?.zenpress_admin_bar_enabled === true 45 45 ); 46 46 }) -
zenpress/trunk/assets/src/js/pages/SettingsPage.js
r3451904 r3451916 312 312 } 313 313 help={__( 314 'Show a "ZenPress" item in the admin bar with "Clear caches". When enabled, integration buttons (e.g. Autoptimize)are hidden.',314 'Show a ZenPress item in the admin bar with "Clear all caches" and sub-items for each active integration (page cache, static assets, object cache). Visible only when at least one of Cache Enabler, AutOptimize, or SQLite Object Cache is active. When enabled, those plugins\' own admin bar buttons are hidden.', 315 315 'zenpress' 316 316 )} … … 344 344 <p className="zenpress-autoconfig-help"> 345 345 {__( 346 'Apply recommended Autoptimize settings (optimize JS/CSS, aggregate CSS, static files, 404 fallbacks; disable defer, HTML optimize, optimize for logged-in, per post/page). Only works if Autoptimize is active.',346 'Apply recommended Autoptimize settings: Minify JS & CSS, aggregate CSS, static files, 404 fallbacks.', 347 347 'zenpress' 348 348 )} … … 378 378 <p className="zenpress-autoconfig-help"> 379 379 {__( 380 'Apply recommended Cache Enabler settings . Only works if Cache Enabler is active.',380 'Apply recommended Cache Enabler settings: Clear site cache on post or plugin changes, WebP support, Gzip or Brotli compression, and minify HTML (excluding inline CSS/JS).', 381 381 'zenpress' 382 382 )} … … 412 412 <p className="zenpress-autoconfig-help"> 413 413 {__( 414 'Apply recommended SQLite Object Cache settings. Only works if SQLite Object Cache is active.',414 'Apply recommended SQLite Object Cache settings. Enable "Use APCu" if APCu is available.', 415 415 'zenpress' 416 416 )} -
zenpress/trunk/inc/classes/cache-enabler.php
r3451904 r3451916 15 15 */ 16 16 final class ZenPress_Cache_Enabler { 17 /** Cache Enabler admin bar node ID. */ 18 private const CACHE_ENABLER_ADMIN_BAR_ID = 'cache_enabler_clear_cache'; 17 /** Cache Enabler admin bar node IDs (main + "clear page cache" sub-item). */ 18 private const CACHE_ENABLER_ADMIN_BAR_IDS = [ 19 'cache_enabler_clear_cache', 20 'cache_enabler_clear_page_cache', 21 ]; 19 22 20 23 /** … … 51 54 52 55 /** 53 * Removes Cache Enabler node from the admin bar.56 * Removes Cache Enabler nodes from the admin bar (main item + "clear page cache" sub-item). 54 57 */ 55 58 public static function remove_admin_bar_node(WP_Admin_Bar $wp_admin_bar): void { 56 $wp_admin_bar->remove_node(self::CACHE_ENABLER_ADMIN_BAR_ID); 59 foreach (self::CACHE_ENABLER_ADMIN_BAR_IDS as $node_id) { 60 $wp_admin_bar->remove_node($node_id); 61 } 57 62 } 58 63 -
zenpress/trunk/inc/classes/integrations.php
r3451904 r3451916 30 30 */ 31 31 public static function is_admin_bar_enabled(): bool { 32 return (bool) get_option('zenpress_admin_bar_enabled', true);32 return (bool) get_option('zenpress_admin_bar_enabled', false); 33 33 } 34 34 -
zenpress/trunk/inc/snippets/meta/disable-capital-p-dangit.meta.php
r3448585 r3451916 19 19 'subcategory' => __('performance', 'zenpress'), 20 20 'weight' => 0, 21 'preset' => [ ],21 'preset' => ['corporate-website', 'blog', 'ecommerce'], 22 22 ]; -
zenpress/trunk/inc/snippets/meta/disable-password-strength-meter.meta.php
r3448585 r3451916 19 19 'subcategory' => __('performance', 'zenpress'), 20 20 'weight' => 0, 21 'preset' => [ ],21 'preset' => ['corporate-website', 'blog', 'ecommerce'], 22 22 ]; -
zenpress/trunk/inc/snippets/meta/remove-thanks-for-using-wordpress-in-footer.meta.php
r3448585 r3451916 13 13 'title' => __('Remove "Thanks for using WordPress" in footer', 'zenpress'), 14 14 'description' => __( 15 'Removes the "Thank you for creating with WordPress" message from the admin footer. Cleans up the interface.',15 'Removes the "Thank you for creating with WordPress" message from the admin footer.', 16 16 'zenpress' 17 17 ), -
zenpress/trunk/inc/snippets/meta/remove-wordpress-logo.meta.php
r3448585 r3451916 13 13 'title' => __('Remove WordPress logo', 'zenpress'), 14 14 'description' => __( 15 'Removes the WordPress logo and its dropdown from the admin bar. Cleans up the interface for a more neutral or branded look.',15 'Removes the WordPress logo and its dropdown from the admin bar.', 16 16 'zenpress' 17 17 ), -
zenpress/trunk/languages/zenpress.pot
r3448604 r3451916 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: ZenPress - Optimize & Secure 2.2. 1\n"5 "Project-Id-Version: ZenPress - Optimize & Secure 2.2.3\n" 6 6 "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/zenpress\n" 7 7 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" … … 10 10 "Content-Type: text/plain; charset=UTF-8\n" 11 11 "Content-Transfer-Encoding: 8bit\n" 12 "POT-Creation-Date: 2026-0 1-28T10:44:12+00:00\n"12 "POT-Creation-Date: 2026-02-02T09:51:42+00:00\n" 13 13 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 14 14 "X-Generator: WP-CLI 2.12.0\n" … … 27 27 #. Description of the plugin 28 28 #: zenpress.php 29 msgid "Easily speed up and strengthen your WordPress site by cleaning out unnecessary features and protecting weak points."29 msgid "Easily speed up and strengthen your WordPress site in one click: clean out unnecessary features, protect weak points, autoconfigure cache integrations." 30 30 msgstr "" 31 31 … … 40 40 msgstr "" 41 41 42 #: inc/admin/links.php:1 942 #: inc/admin/links.php:16 43 43 msgid "Go to ZenPress settings page" 44 44 msgstr "" 45 45 46 #: inc/admin/links.php: 2046 #: inc/admin/links.php:17 47 47 msgid "Settings" 48 48 msgstr "" 49 49 50 #: inc/admin/links.php:33 51 #: inc/admin/menu.php:38 52 msgid "View ZenPress changelog on WordPress.org (opens in a new tab)" 53 msgstr "" 54 55 #: inc/admin/links.php:34 56 msgid "Changelog" 57 msgstr "" 58 59 #: inc/admin/links.php:39 60 msgid "Read ZenPress documentation (opens in a new tab)" 61 msgstr "" 62 50 63 #: inc/admin/links.php:40 51 #: inc/admin/menu.php:42 52 msgid "View ZenPress changelog on WordPress.org (opens in a new tab)" 53 msgstr "" 54 55 #: inc/admin/links.php:41 56 msgid "Changelog" 64 msgid "Docs" 65 msgstr "" 66 67 #: inc/admin/links.php:45 68 msgid "Support ZenPress by buying a coffee (opens in a new tab)" 57 69 msgstr "" 58 70 59 71 #: inc/admin/links.php:46 60 msgid "Read ZenPress documentation (opens in a new tab)"61 msgstr ""62 63 #: inc/admin/links.php:4764 msgid "Docs"65 msgstr ""66 67 #: inc/admin/links.php:5268 msgid "Support ZenPress by buying a coffee (opens in a new tab)"69 msgstr ""70 71 #: inc/admin/links.php:5372 72 msgid "Support ☕" 73 73 msgstr "" 74 74 75 #: inc/admin/menu.php:1 575 #: inc/admin/menu.php:13 76 76 msgid "ZenPress options" 77 77 msgstr "" 78 78 79 #: inc/admin/menu.php:1 680 #: inc/admin/menu.php:3 579 #: inc/admin/menu.php:14 80 #: inc/admin/menu.php:31 81 81 msgid "ZenPress" 82 82 msgstr "" 83 83 84 #: inc/admin/menu.php:3 884 #: inc/admin/menu.php:34 85 85 msgid "Version" 86 86 msgstr "" 87 87 88 #: inc/admin/menu.php: 4388 #: inc/admin/menu.php:39 89 89 msgid "What's new ?" 90 90 msgstr "" 91 91 92 #: inc/admin/menu.php: 5292 #: inc/admin/menu.php:48 93 93 msgid "Read the ZenPress documentation (opens in a new tab)" 94 94 msgstr "" 95 95 96 #: inc/admin/menu.php: 5396 #: inc/admin/menu.php:49 97 97 msgid "Documentation" 98 98 msgstr "" 99 99 100 #: inc/admin/menu.php:5 8100 #: inc/admin/menu.php:54 101 101 msgid "Leave a review for ZenPress on WordPress.org (opens in a new tab)" 102 102 msgstr "" 103 103 104 #: inc/admin/menu.php:5 9104 #: inc/admin/menu.php:55 105 105 msgid "Leave a review (helps a lot)" 106 106 msgstr "" 107 107 108 #: inc/admin/menu.php:6 5108 #: inc/admin/menu.php:61 109 109 msgid "Support development: Buy me a coffee (opens in a new tab)" 110 110 msgstr "" 111 111 112 #: inc/admin/menu.php:6 6112 #: inc/admin/menu.php:62 113 113 msgid "Buy me a coffee" 114 114 msgstr "" 115 115 116 #: inc/admin/menu.php:7 4116 #: inc/admin/menu.php:70 117 117 msgid "Loading your ZenPress settings…" 118 118 msgstr "" 119 119 120 #: inc/admin/menu.php: 82120 #: inc/admin/menu.php:78 121 121 msgid "Made " 122 122 msgstr "" 123 123 124 #: inc/admin/menu.php:8 4124 #: inc/admin/menu.php:80 125 125 msgid " by Quentin Le Duff - Your WordPress Partner" 126 126 msgstr "" 127 127 128 #: inc/admin/menu.php: 91128 #: inc/admin/menu.php:87 129 129 msgid "Visite the developper website" 130 130 msgstr "" 131 131 132 #: inc/admin/menu.php: 92132 #: inc/admin/menu.php:88 133 133 msgid "My place" 134 134 msgstr "" 135 135 136 #: inc/admin/menu.php:9 7136 #: inc/admin/menu.php:93 137 137 msgid "Review the code on Github" 138 138 msgstr "" 139 139 140 #: inc/admin/menu.php:9 8140 #: inc/admin/menu.php:94 141 141 msgid "ZenPress code repository" 142 msgstr "" 143 144 #: inc/classes/integrations.php:112 145 msgid "Autoptimize configuration failed." 146 msgstr "" 147 148 #: inc/classes/integrations.php:118 149 #: assets/build/index.js:1 150 #: assets/src/js/pages/SettingsPage.js:173 151 msgid "Autoptimize has been configured." 152 msgstr "" 153 154 #: inc/classes/integrations.php:131 155 msgid "Cache Enabler configuration failed." 156 msgstr "" 157 158 #: inc/classes/integrations.php:137 159 #: assets/build/index.js:1 160 #: assets/src/js/pages/SettingsPage.js:184 161 msgid "Cache Enabler has been configured." 162 msgstr "" 163 164 #: inc/classes/integrations.php:150 165 msgid "SQLite Object Cache configuration failed." 166 msgstr "" 167 168 #: inc/classes/integrations.php:156 169 #: assets/build/index.js:1 170 #: assets/src/js/pages/SettingsPage.js:195 171 msgid "SQLite Object Cache has been configured." 172 msgstr "" 173 174 #: inc/classes/integrations.php:200 175 msgid "Clear all caches" 176 msgstr "" 177 178 #: inc/classes/integrations.php:203 179 msgid "Clear all caches (page cache, static assets, object cache)." 180 msgstr "" 181 182 #: inc/classes/integrations.php:211 183 msgid "Clear pages caches" 184 msgstr "" 185 186 #: inc/classes/integrations.php:214 187 msgid "Clear Cache Enabler page cache." 188 msgstr "" 189 190 #: inc/classes/integrations.php:223 191 msgid "Clear static assets caches (CSS/JS)" 192 msgstr "" 193 194 #: inc/classes/integrations.php:226 195 msgid "Clear Autoptimize CSS/JS cache." 196 msgstr "" 197 198 #: inc/classes/integrations.php:235 199 msgid "Clear object cache" 200 msgstr "" 201 202 #: inc/classes/integrations.php:238 203 msgid "Clear SQLite Object Cache." 204 msgstr "" 205 206 #: inc/classes/integrations.php:260 207 #: inc/classes/integrations.php:264 208 msgid "Forbidden" 209 msgstr "" 210 211 #: inc/classes/integrations.php:272 212 #: inc/classes/integrations.php:282 213 msgid "Cache clear failed." 214 msgstr "" 215 216 #: inc/classes/integrations.php:274 217 msgid "Caches cleared." 218 msgstr "" 219 220 #: inc/classes/integrations.php:284 221 msgid "Cache cleared." 222 msgstr "" 223 224 #: inc/classes/integrations.php:286 225 msgid "Invalid request." 142 226 msgstr "" 143 227 … … 155 239 msgstr "" 156 240 157 #: inc/snippets/functions/protect-wp-login.php:3 6158 #: inc/snippets/functions/protect-wp-login.php:5 0241 #: inc/snippets/functions/protect-wp-login.php:38 242 #: inc/snippets/functions/protect-wp-login.php:52 159 243 msgid "Too many failed login attempts. Try again later." 160 244 msgstr "" … … 547 631 548 632 #: inc/snippets/meta/remove-thanks-for-using-wordpress-in-footer.meta.php:14 549 msgid "Removes the \"Thank you for creating with WordPress\" message from the admin footer. Cleans up the interface."633 msgid "Removes the \"Thank you for creating with WordPress\" message from the admin footer." 550 634 msgstr "" 551 635 … … 563 647 564 648 #: inc/snippets/meta/remove-wordpress-logo.meta.php:14 565 msgid "Removes the WordPress logo and its dropdown from the admin bar. Cleans up the interface for a more neutral or branded look."649 msgid "Removes the WordPress logo and its dropdown from the admin bar." 566 650 msgstr "" 567 651 … … 580 664 581 665 #: assets/build/index.js:1 582 #: assets/src/js/hooks/useSettings.js:4 2666 #: assets/src/js/hooks/useSettings.js:48 583 667 msgid "Failed to load settings." 584 668 msgstr "" 585 669 586 670 #: assets/build/index.js:1 587 #: assets/src/js/hooks/useSettings.js: 59671 #: assets/src/js/hooks/useSettings.js:68 588 672 msgid "Settings saved." 589 673 msgstr "" 590 674 591 675 #: assets/build/index.js:1 592 #: assets/src/js/hooks/useSettings.js: 61676 #: assets/src/js/hooks/useSettings.js:70 593 677 msgid "Failed to save settings." 594 678 msgstr "" 595 679 596 680 #: assets/build/index.js:1 597 #: assets/src/js/pages/SettingsPage.js: 86681 #: assets/src/js/pages/SettingsPage.js:99 598 682 msgid "Uncategorized" 599 683 msgstr "" 600 684 601 685 #: assets/build/index.js:1 602 #: assets/src/js/pages/SettingsPage.js: 89686 #: assets/src/js/pages/SettingsPage.js:102 603 687 msgid "uncategorized" 604 688 msgstr "" 605 689 606 690 #: assets/build/index.js:1 607 #: assets/src/js/pages/SettingsPage.js:234 691 #: assets/src/js/pages/SettingsPage.js:174 692 msgid "Autoptimize autoconfig failed. Is Autoptimize installed and active?" 693 msgstr "" 694 695 #: assets/build/index.js:1 696 #: assets/src/js/pages/SettingsPage.js:185 697 msgid "Cache Enabler autoconfig failed. Is Cache Enabler installed and active?" 698 msgstr "" 699 700 #: assets/build/index.js:1 701 #: assets/src/js/pages/SettingsPage.js:196 702 msgid "SQLite Object Cache autoconfig failed. Is SQLite Object Cache installed and active?" 703 msgstr "" 704 705 #: assets/build/index.js:1 706 #: assets/src/js/pages/SettingsPage.js:297 707 msgid "Integrations" 708 msgstr "" 709 710 #: assets/build/index.js:1 711 #: assets/src/js/pages/SettingsPage.js:303 712 msgid "Show ZenPress admin bar button" 713 msgstr "" 714 715 #: assets/build/index.js:1 716 #: assets/src/js/pages/SettingsPage.js:313 717 msgid "Show a ZenPress item in the admin bar with \"Clear all caches\" and sub-items for each active integration (page cache, static assets, object cache). Visible only when at least one of Cache Enabler, AutOptimize, or SQLite Object Cache is active. When enabled, those plugins' own admin bar buttons are hidden." 718 msgstr "" 719 720 #: assets/build/index.js:1 721 #: assets/src/js/pages/SettingsPage.js:335 722 #: assets/src/js/pages/SettingsPage.js:369 723 #: assets/src/js/pages/SettingsPage.js:403 724 msgid "Applying…" 725 msgstr "" 726 727 #: assets/build/index.js:1 728 #: assets/src/js/pages/SettingsPage.js:339 729 msgid "One-click autoconfig Autoptimize" 730 msgstr "" 731 732 #: assets/build/index.js:1 733 #: assets/src/js/pages/SettingsPage.js:345 734 msgid "Apply recommended Autoptimize settings: Minify JS & CSS, aggregate CSS, static files, 404 fallbacks." 735 msgstr "" 736 737 #: assets/build/index.js:1 738 #: assets/src/js/pages/SettingsPage.js:373 739 msgid "One-click autoconfig Cache Enabler" 740 msgstr "" 741 742 #: assets/build/index.js:1 743 #: assets/src/js/pages/SettingsPage.js:379 744 msgid "Apply recommended Cache Enabler settings: Clear site cache on post or plugin changes, WebP support, Gzip or Brotli compression, and minify HTML (excluding inline CSS/JS)." 745 msgstr "" 746 747 #: assets/build/index.js:1 748 #: assets/src/js/pages/SettingsPage.js:407 749 msgid "One-click autoconfig SQLite Object Cache" 750 msgstr "" 751 752 #: assets/build/index.js:1 753 #: assets/src/js/pages/SettingsPage.js:413 754 msgid "Apply recommended SQLite Object Cache settings. Enable \"Use APCu\" if APCu is available." 755 msgstr "" 756 757 #: assets/build/index.js:1 758 #: assets/src/js/pages/SettingsPage.js:433 608 759 msgid "Enable all actions" 609 760 msgstr "" 610 761 611 762 #: assets/build/index.js:1 612 #: assets/src/js/pages/SettingsPage.js: 241763 #: assets/src/js/pages/SettingsPage.js:440 613 764 msgid "Disable all actions" 614 765 msgstr "" 615 766 616 767 #: assets/build/index.js:1 617 #: assets/src/js/pages/SettingsPage.js: 251768 #: assets/src/js/pages/SettingsPage.js:450 618 769 msgid "Pick configuration preset" 619 770 msgstr "" 620 771 621 772 #: assets/build/index.js:1 622 #: assets/src/js/pages/SettingsPage.js: 253773 #: assets/src/js/pages/SettingsPage.js:452 623 774 msgid "Don't know which features to enable? Quickly configure ZenPress by selecting a preset that matches your site type. Each preset enables optimized features for your specific use case." 624 775 msgstr "" 625 776 626 777 #: assets/build/index.js:1 627 #: assets/src/js/pages/SettingsPage.js: 259778 #: assets/src/js/pages/SettingsPage.js:458 628 779 msgid "Corporate website" 629 780 msgstr "" 630 781 631 782 #: assets/build/index.js:1 632 #: assets/src/js/pages/SettingsPage.js: 261783 #: assets/src/js/pages/SettingsPage.js:460 633 784 msgid "Optimized for business sites and portfolios. Focuses on security, performance, and removing unnecessary features like RSS feeds and author archives." 634 785 msgstr "" 635 786 636 787 #: assets/build/index.js:1 637 #: assets/src/js/pages/SettingsPage.js: 271638 #: assets/src/js/pages/SettingsPage.js: 286639 #: assets/src/js/pages/SettingsPage.js: 301788 #: assets/src/js/pages/SettingsPage.js:470 789 #: assets/src/js/pages/SettingsPage.js:485 790 #: assets/src/js/pages/SettingsPage.js:500 640 791 msgid "Enable" 641 792 msgstr "" 642 793 643 794 #: assets/build/index.js:1 644 #: assets/src/js/pages/SettingsPage.js: 274795 #: assets/src/js/pages/SettingsPage.js:473 645 796 msgid "Blog" 646 797 msgstr "" 647 798 648 799 #: assets/build/index.js:1 649 #: assets/src/js/pages/SettingsPage.js: 276800 #: assets/src/js/pages/SettingsPage.js:475 650 801 msgid "Tailored for content-focused blogs. Includes performance and security optimizations while preserving essential blog features like RSS feeds." 651 802 msgstr "" 652 803 653 804 #: assets/build/index.js:1 654 #: assets/src/js/pages/SettingsPage.js: 289805 #: assets/src/js/pages/SettingsPage.js:488 655 806 msgid "E-commerce" 656 807 msgstr "" 657 808 658 809 #: assets/build/index.js:1 659 #: assets/src/js/pages/SettingsPage.js: 291810 #: assets/src/js/pages/SettingsPage.js:490 660 811 msgid "Designed for WooCommerce stores. Includes all performance and security features plus WooCommerce-specific optimizations for faster checkout." 661 812 msgstr "" -
zenpress/trunk/readme.txt
r3451904 r3451916 10 10 License URI: https://www.gnu.org/licenses/gpl-2.0.html/ 11 11 12 Easily speed up and strengthen your WordPress site by cleaning out unnecessary features and protecting weak spots.12 Easily speed up and strengthen your website in one click: clean out unnecessary features, protect weak points, autoconfigure cache integrations. 13 13 14 14 == Description == … … 90 90 = Tools = 91 91 * Protect the wp-login form from brute force attacks. 92 * Toggle "Show ZenPress admin bar button" (clear caches from the admin bar when at least one integration is active).92 * Toggle "Show ZenPress admin bar button": ZenPress item in the admin bar with "Clear all caches" and sub-items per active integration (page cache, static assets, object cache). Visible only when at least one of Cache Enabler, AutOptimize, or SQLite Object Cache is active. When enabled, those plugins' own admin bar buttons are hidden. Toggle via Settings > ZenPress > Tools. 93 93 94 94 = Integrations = … … 96 96 ZenPress integrates with Cache Enabler, Autoptimize, and SQLite Object Cache. When any of these plugins is active, the Tools tab shows integration status and one-click autoconfig actions. 97 97 98 * Admin bar: One "Clear all caches" button (dashicon) in the admin bar, with sub-items to clear page cache (Cache Enabler), static assets (Autoptimize), or object cache (SQLite Object Cache) separately. The ZenPress button replaces the third-party cache buttons when the ZenPress admin bar is enabled. You can hide itvia Settings > ZenPress > Tools.99 * Autoptimize: One-click autoconfig enables recommended options (JS/CSS/aggregate/nogzip/fallback on; defer/HTML/logged-in/meta off) and clears the Autoptimize cache.100 * Cache Enabler: One-click autoconfig enables clear site cache on post or plugin changes, WebP support, Gzip compression, and minify HTML (excluding inline CSS/JS), then clears the page cache.101 * SQLite Object Cache: One-click autoconfig enables the "Use APCu" option in the plugin settings when the APCu extension is available (no wp-config editing; the plugin may write its constant when its own settings are saved).98 * Admin bar: One "Clear all caches" button (dashicon) in the admin bar, with sub-items to clear page cache (Cache Enabler), static assets (Autoptimize), or object cache (SQLite Object Cache) separately. When the ZenPress admin bar is enabled, the third-party cache buttons (Cache Enabler, AutOptimize, SQLite Object Cache) are hidden. You can hide the ZenPress admin bar via Settings > ZenPress > Tools. 99 * Autoptimize: One-click autoconfig enables recommended options (JS/CSS/aggregate/nogzip/fallback on; defer/HTML/logged-in/meta off). 100 * Cache Enabler: One-click autoconfig enables clear site cache on post or plugin changes, WebP support, Gzip or Brotli compression, and minify HTML (excluding inline CSS/JS). 101 * SQLite Object Cache: One-click autoconfig enables the "Use APCu" option in the plugin settings when the APCu extension is available. 102 102 103 103 = Presets = … … 209 209 210 210 = 2.2.3 = 211 - Integrations: Cache Enabler one-click autoconfig (clear on post/plugin, WebP, Gzip, minify HTML excl. inline CSS/JS). 212 - Integrations: SQLite Object Cache one-click autoconfig (enable "Use APCu" option when APCu available; no wp-config editing by ZenPress). 213 - Integrations: Admin bar "Clear all caches" button now uses dashicons-trash icon. 214 - Defensive: REST and AJAX handlers wrap integration calls in try/catch; failed autoconfig or cache clear returns 500 with message instead of fatal. 215 - Defensive: get_active_integrations_for_ui() wraps ReflectionClass in try/catch so one missing integration does not break the settings UI. 216 - Defensive: Cache Enabler autoconfig ensures option value is array before merge (corrupted option no longer triggers warning). 217 - Defensive: Metadata and snippet loader wrap include in try/catch so a single bad meta file or snippet does not fatal the site. 218 - Defensive: Protect wp-login skips rate limiting when REMOTE_ADDR is missing or invalid to avoid site-wide lockout (e.g. CLI or proxy). 219 - Defensive: Autoptimize clear_cache and autoconfig check method_exists before calling third-party API. 220 - Docblocks: Reviewed and tightened docblocks across inc/ (file headers, classes, methods) for coherence, readability, and conciseness; removed redundant @param/@return where type is obvious. 221 - Lint: PHPStan and PHP CS Fixer fixes (autoptimize method_exists ignore, protect-wp-login strict comparison). 211 - Fix : Disable Cache enabler "clear page cache" button in admin bar when ZenPress admin bar button is active. 212 - Fix : ZenPress admin bar button default option is now "off". 222 213 223 214 = 2.2.2 = 224 - Integrations: Admin bar and one-click autoconfig (e.g. Autoptimize) in Tools tab; visible only when at least one integration is active. 225 - Documentation: Added Hooks & filters section in readme; Integrations section in workflow.md; config comments for PHPStan and PHP CS Fixer. 226 - Version alignment: Stable tag and plugin header set to 2.2.2. 215 - Integration : Cache enabler autoconfig in one click. 216 - Integration : Autoptimize autoconfig in one click. 217 - Integration : SQLite Object cache autoconfig in one click. 218 - New actionable function: Enable Admin bar "Clear all caches" button, visible only when at least one integration is active; third-party cache buttons hidden when ZenPress admin bar is enabled. 219 - Fix: REST and AJAX handlers wrap integration calls in try/catch; failed autoconfig or cache clear returns 500 with message instead of fatal. 220 - Fix: get_active_integrations_for_ui() wraps ReflectionClass in try/catch so one missing integration does not break the settings UI. 221 - Fix: Metadata and snippet loader wrap include in try/catch so a single bad meta file or snippet does not fatal the site. 227 222 228 223 = 2.2.1 = … … 358 353 == Upgrade Notice == 359 354 360 = 2.2.3 =361 - Integrations: Cache Enabler and SQLite Object Cache one-click autoconfig; admin bar trash icon; defensive fixes and docblock cleanup.362 363 = 2.2.2 =364 - Integrations: ZenPress admin bar and one-click autoconfig in Tools tab (Autoptimize). Documentation updates.365 366 355 = 2.2.1 = 367 356 - Security and code quality improvements. Recommended update. -
zenpress/trunk/zenpress.php
r3451904 r3451916 11 11 * 12 12 * Plugin Name: ZenPress - Optimize & Secure 13 * Description: Easily speed up and strengthen your WordPress site by cleaning out unnecessary features and protecting weak points.14 * Version: 2.2. 213 * Description: Easily speed up and strengthen your WordPress site in one click: clean out unnecessary features, protect weak points, autoconfigure cache integrations. 14 * Version: 2.2.3 15 15 * Plugin URI: https://wordpress.org/plugins/zenpress/ 16 16 * Author: Quentin Le Duff … … 47 47 require_once __DIR__ . '/inc/core/sanitize.php'; 48 48 49 // Integrations (one file per plugin: handlers + autoconfig)49 // Integrations 50 50 require_once __DIR__ . '/inc/classes/autoptimize.php'; 51 51 require_once __DIR__ . '/inc/classes/cache-enabler.php';
Note: See TracChangeset
for help on using the changeset viewer.