Plugin Directory

Changeset 3451916


Ignore:
Timestamp:
02/02/2026 09:54:47 AM (8 weeks ago)
Author:
quentinldd
Message:

Update to version 2.2.3 from GitHub

Location:
zenpress
Files:
26 edited
1 copied

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  
    1818export const useSettings = () => {
    1919    const [snippets, setSnippets] = useState({});
    20     const [adminBarEnabled, setAdminBarEnabled] = useState(true);
     20    const [adminBarEnabled, setAdminBarEnabled] = useState(false);
    2121    const [isSaving, setIsSaving] = useState(false);
    2222    const { createSuccessNotice, createErrorNotice } =
     
    4242                setSnippets(snippetsData);
    4343                setAdminBarEnabled(
    44                     settings?.zenpress_admin_bar_enabled !== false
     44                    settings?.zenpress_admin_bar_enabled === true
    4545                );
    4646            })
  • zenpress/tags/2.2.3/assets/src/js/pages/SettingsPage.js

    r3451904 r3451916  
    312312                                                    }
    313313                                                    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.',
    315315                                                        'zenpress'
    316316                                                    )}
     
    344344                                                        <p className="zenpress-autoconfig-help">
    345345                                                            {__(
    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.',
    347347                                                                'zenpress'
    348348                                                            )}
     
    378378                                                        <p className="zenpress-autoconfig-help">
    379379                                                            {__(
    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).',
    381381                                                                'zenpress'
    382382                                                            )}
     
    412412                                                        <p className="zenpress-autoconfig-help">
    413413                                                            {__(
    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.',
    415415                                                                'zenpress'
    416416                                                            )}
  • zenpress/tags/2.2.3/inc/classes/cache-enabler.php

    r3451904 r3451916  
    1515 */
    1616final 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    ];
    1922
    2023    /**
     
    5154
    5255    /**
    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).
    5457     */
    5558    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        }
    5762    }
    5863
  • zenpress/tags/2.2.3/inc/classes/integrations.php

    r3451904 r3451916  
    3030     */
    3131    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);
    3333    }
    3434
  • zenpress/tags/2.2.3/inc/snippets/meta/disable-capital-p-dangit.meta.php

    r3448585 r3451916  
    1919    'subcategory' => __('performance', 'zenpress'),
    2020    'weight' => 0,
    21     'preset' => [],
     21    'preset' => ['corporate-website', 'blog', 'ecommerce'],
    2222];
  • zenpress/tags/2.2.3/inc/snippets/meta/disable-password-strength-meter.meta.php

    r3448585 r3451916  
    1919    'subcategory' => __('performance', 'zenpress'),
    2020    'weight' => 0,
    21     'preset' => [],
     21    'preset' => ['corporate-website', 'blog', 'ecommerce'],
    2222];
  • zenpress/tags/2.2.3/inc/snippets/meta/remove-thanks-for-using-wordpress-in-footer.meta.php

    r3448585 r3451916  
    1313    'title' => __('Remove "Thanks for using WordPress" in footer', 'zenpress'),
    1414    '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.',
    1616        'zenpress'
    1717    ),
  • zenpress/tags/2.2.3/inc/snippets/meta/remove-wordpress-logo.meta.php

    r3448585 r3451916  
    1313    'title' => __('Remove WordPress logo', 'zenpress'),
    1414    '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.',
    1616        'zenpress'
    1717    ),
  • zenpress/tags/2.2.3/languages/zenpress.pot

    r3448604 r3451916  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: ZenPress - Optimize & Secure 2.2.1\n"
     5"Project-Id-Version: ZenPress - Optimize & Secure 2.2.3\n"
    66"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/zenpress\n"
    77"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
     
    1010"Content-Type: text/plain; charset=UTF-8\n"
    1111"Content-Transfer-Encoding: 8bit\n"
    12 "POT-Creation-Date: 2026-01-28T10:44:12+00:00\n"
     12"POT-Creation-Date: 2026-02-02T09:51:42+00:00\n"
    1313"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
    1414"X-Generator: WP-CLI 2.12.0\n"
     
    2727#. Description of the plugin
    2828#: zenpress.php
    29 msgid "Easily speed up and strengthen your WordPress site by cleaning out unnecessary features and protecting weak points."
     29msgid "Easily speed up and strengthen your WordPress site in one click: clean out unnecessary features, protect weak points, autoconfigure cache integrations."
    3030msgstr ""
    3131
     
    4040msgstr ""
    4141
    42 #: inc/admin/links.php:19
     42#: inc/admin/links.php:16
    4343msgid "Go to ZenPress settings page"
    4444msgstr ""
    4545
    46 #: inc/admin/links.php:20
     46#: inc/admin/links.php:17
    4747msgid "Settings"
    4848msgstr ""
    4949
     50#: inc/admin/links.php:33
     51#: inc/admin/menu.php:38
     52msgid "View ZenPress changelog on WordPress.org (opens in a new tab)"
     53msgstr ""
     54
     55#: inc/admin/links.php:34
     56msgid "Changelog"
     57msgstr ""
     58
     59#: inc/admin/links.php:39
     60msgid "Read ZenPress documentation (opens in a new tab)"
     61msgstr ""
     62
    5063#: 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"
     64msgid "Docs"
     65msgstr ""
     66
     67#: inc/admin/links.php:45
     68msgid "Support ZenPress by buying a coffee (opens in a new tab)"
    5769msgstr ""
    5870
    5971#: inc/admin/links.php:46
    60 msgid "Read ZenPress documentation (opens in a new tab)"
    61 msgstr ""
    62 
    63 #: inc/admin/links.php:47
    64 msgid "Docs"
    65 msgstr ""
    66 
    67 #: inc/admin/links.php:52
    68 msgid "Support ZenPress by buying a coffee (opens in a new tab)"
    69 msgstr ""
    70 
    71 #: inc/admin/links.php:53
    7272msgid "Support ☕"
    7373msgstr ""
    7474
    75 #: inc/admin/menu.php:15
     75#: inc/admin/menu.php:13
    7676msgid "ZenPress options"
    7777msgstr ""
    7878
    79 #: inc/admin/menu.php:16
    80 #: inc/admin/menu.php:35
     79#: inc/admin/menu.php:14
     80#: inc/admin/menu.php:31
    8181msgid "ZenPress"
    8282msgstr ""
    8383
    84 #: inc/admin/menu.php:38
     84#: inc/admin/menu.php:34
    8585msgid "Version"
    8686msgstr ""
    8787
    88 #: inc/admin/menu.php:43
     88#: inc/admin/menu.php:39
    8989msgid "What's new ?"
    9090msgstr ""
    9191
    92 #: inc/admin/menu.php:52
     92#: inc/admin/menu.php:48
    9393msgid "Read the ZenPress documentation (opens in a new tab)"
    9494msgstr ""
    9595
    96 #: inc/admin/menu.php:53
     96#: inc/admin/menu.php:49
    9797msgid "Documentation"
    9898msgstr ""
    9999
    100 #: inc/admin/menu.php:58
     100#: inc/admin/menu.php:54
    101101msgid "Leave a review for ZenPress on WordPress.org (opens in a new tab)"
    102102msgstr ""
    103103
    104 #: inc/admin/menu.php:59
     104#: inc/admin/menu.php:55
    105105msgid "Leave a review (helps a lot)"
    106106msgstr ""
    107107
    108 #: inc/admin/menu.php:65
     108#: inc/admin/menu.php:61
    109109msgid "Support development: Buy me a coffee (opens in a new tab)"
    110110msgstr ""
    111111
    112 #: inc/admin/menu.php:66
     112#: inc/admin/menu.php:62
    113113msgid "Buy me a coffee"
    114114msgstr ""
    115115
    116 #: inc/admin/menu.php:74
     116#: inc/admin/menu.php:70
    117117msgid "Loading your ZenPress settings…"
    118118msgstr ""
    119119
    120 #: inc/admin/menu.php:82
     120#: inc/admin/menu.php:78
    121121msgid "Made "
    122122msgstr ""
    123123
    124 #: inc/admin/menu.php:84
     124#: inc/admin/menu.php:80
    125125msgid " by Quentin Le Duff - Your WordPress Partner"
    126126msgstr ""
    127127
    128 #: inc/admin/menu.php:91
     128#: inc/admin/menu.php:87
    129129msgid "Visite the developper website"
    130130msgstr ""
    131131
    132 #: inc/admin/menu.php:92
     132#: inc/admin/menu.php:88
    133133msgid "My place"
    134134msgstr ""
    135135
    136 #: inc/admin/menu.php:97
     136#: inc/admin/menu.php:93
    137137msgid "Review the code on Github"
    138138msgstr ""
    139139
    140 #: inc/admin/menu.php:98
     140#: inc/admin/menu.php:94
    141141msgid "ZenPress code repository"
     142msgstr ""
     143
     144#: inc/classes/integrations.php:112
     145msgid "Autoptimize configuration failed."
     146msgstr ""
     147
     148#: inc/classes/integrations.php:118
     149#: assets/build/index.js:1
     150#: assets/src/js/pages/SettingsPage.js:173
     151msgid "Autoptimize has been configured."
     152msgstr ""
     153
     154#: inc/classes/integrations.php:131
     155msgid "Cache Enabler configuration failed."
     156msgstr ""
     157
     158#: inc/classes/integrations.php:137
     159#: assets/build/index.js:1
     160#: assets/src/js/pages/SettingsPage.js:184
     161msgid "Cache Enabler has been configured."
     162msgstr ""
     163
     164#: inc/classes/integrations.php:150
     165msgid "SQLite Object Cache configuration failed."
     166msgstr ""
     167
     168#: inc/classes/integrations.php:156
     169#: assets/build/index.js:1
     170#: assets/src/js/pages/SettingsPage.js:195
     171msgid "SQLite Object Cache has been configured."
     172msgstr ""
     173
     174#: inc/classes/integrations.php:200
     175msgid "Clear all caches"
     176msgstr ""
     177
     178#: inc/classes/integrations.php:203
     179msgid "Clear all caches (page cache, static assets, object cache)."
     180msgstr ""
     181
     182#: inc/classes/integrations.php:211
     183msgid "Clear pages caches"
     184msgstr ""
     185
     186#: inc/classes/integrations.php:214
     187msgid "Clear Cache Enabler page cache."
     188msgstr ""
     189
     190#: inc/classes/integrations.php:223
     191msgid "Clear static assets caches (CSS/JS)"
     192msgstr ""
     193
     194#: inc/classes/integrations.php:226
     195msgid "Clear Autoptimize CSS/JS cache."
     196msgstr ""
     197
     198#: inc/classes/integrations.php:235
     199msgid "Clear object cache"
     200msgstr ""
     201
     202#: inc/classes/integrations.php:238
     203msgid "Clear SQLite Object Cache."
     204msgstr ""
     205
     206#: inc/classes/integrations.php:260
     207#: inc/classes/integrations.php:264
     208msgid "Forbidden"
     209msgstr ""
     210
     211#: inc/classes/integrations.php:272
     212#: inc/classes/integrations.php:282
     213msgid "Cache clear failed."
     214msgstr ""
     215
     216#: inc/classes/integrations.php:274
     217msgid "Caches cleared."
     218msgstr ""
     219
     220#: inc/classes/integrations.php:284
     221msgid "Cache cleared."
     222msgstr ""
     223
     224#: inc/classes/integrations.php:286
     225msgid "Invalid request."
    142226msgstr ""
    143227
     
    155239msgstr ""
    156240
    157 #: inc/snippets/functions/protect-wp-login.php:36
    158 #: inc/snippets/functions/protect-wp-login.php:50
     241#: inc/snippets/functions/protect-wp-login.php:38
     242#: inc/snippets/functions/protect-wp-login.php:52
    159243msgid "Too many failed login attempts. Try again later."
    160244msgstr ""
     
    547631
    548632#: 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."
     633msgid "Removes the \"Thank you for creating with WordPress\" message from the admin footer."
    550634msgstr ""
    551635
     
    563647
    564648#: 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."
     649msgid "Removes the WordPress logo and its dropdown from the admin bar."
    566650msgstr ""
    567651
     
    580664
    581665#: assets/build/index.js:1
    582 #: assets/src/js/hooks/useSettings.js:42
     666#: assets/src/js/hooks/useSettings.js:48
    583667msgid "Failed to load settings."
    584668msgstr ""
    585669
    586670#: assets/build/index.js:1
    587 #: assets/src/js/hooks/useSettings.js:59
     671#: assets/src/js/hooks/useSettings.js:68
    588672msgid "Settings saved."
    589673msgstr ""
    590674
    591675#: assets/build/index.js:1
    592 #: assets/src/js/hooks/useSettings.js:61
     676#: assets/src/js/hooks/useSettings.js:70
    593677msgid "Failed to save settings."
    594678msgstr ""
    595679
    596680#: assets/build/index.js:1
    597 #: assets/src/js/pages/SettingsPage.js:86
     681#: assets/src/js/pages/SettingsPage.js:99
    598682msgid "Uncategorized"
    599683msgstr ""
    600684
    601685#: assets/build/index.js:1
    602 #: assets/src/js/pages/SettingsPage.js:89
     686#: assets/src/js/pages/SettingsPage.js:102
    603687msgid "uncategorized"
    604688msgstr ""
    605689
    606690#: assets/build/index.js:1
    607 #: assets/src/js/pages/SettingsPage.js:234
     691#: assets/src/js/pages/SettingsPage.js:174
     692msgid "Autoptimize autoconfig failed. Is Autoptimize installed and active?"
     693msgstr ""
     694
     695#: assets/build/index.js:1
     696#: assets/src/js/pages/SettingsPage.js:185
     697msgid "Cache Enabler autoconfig failed. Is Cache Enabler installed and active?"
     698msgstr ""
     699
     700#: assets/build/index.js:1
     701#: assets/src/js/pages/SettingsPage.js:196
     702msgid "SQLite Object Cache autoconfig failed. Is SQLite Object Cache installed and active?"
     703msgstr ""
     704
     705#: assets/build/index.js:1
     706#: assets/src/js/pages/SettingsPage.js:297
     707msgid "Integrations"
     708msgstr ""
     709
     710#: assets/build/index.js:1
     711#: assets/src/js/pages/SettingsPage.js:303
     712msgid "Show ZenPress admin bar button"
     713msgstr ""
     714
     715#: assets/build/index.js:1
     716#: assets/src/js/pages/SettingsPage.js:313
     717msgid "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."
     718msgstr ""
     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
     724msgid "Applying…"
     725msgstr ""
     726
     727#: assets/build/index.js:1
     728#: assets/src/js/pages/SettingsPage.js:339
     729msgid "One-click autoconfig Autoptimize"
     730msgstr ""
     731
     732#: assets/build/index.js:1
     733#: assets/src/js/pages/SettingsPage.js:345
     734msgid "Apply recommended Autoptimize settings: Minify JS & CSS, aggregate CSS, static files, 404 fallbacks."
     735msgstr ""
     736
     737#: assets/build/index.js:1
     738#: assets/src/js/pages/SettingsPage.js:373
     739msgid "One-click autoconfig Cache Enabler"
     740msgstr ""
     741
     742#: assets/build/index.js:1
     743#: assets/src/js/pages/SettingsPage.js:379
     744msgid "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)."
     745msgstr ""
     746
     747#: assets/build/index.js:1
     748#: assets/src/js/pages/SettingsPage.js:407
     749msgid "One-click autoconfig SQLite Object Cache"
     750msgstr ""
     751
     752#: assets/build/index.js:1
     753#: assets/src/js/pages/SettingsPage.js:413
     754msgid "Apply recommended SQLite Object Cache settings. Enable \"Use APCu\" if APCu is available."
     755msgstr ""
     756
     757#: assets/build/index.js:1
     758#: assets/src/js/pages/SettingsPage.js:433
    608759msgid "Enable all actions"
    609760msgstr ""
    610761
    611762#: assets/build/index.js:1
    612 #: assets/src/js/pages/SettingsPage.js:241
     763#: assets/src/js/pages/SettingsPage.js:440
    613764msgid "Disable all actions"
    614765msgstr ""
    615766
    616767#: assets/build/index.js:1
    617 #: assets/src/js/pages/SettingsPage.js:251
     768#: assets/src/js/pages/SettingsPage.js:450
    618769msgid "Pick configuration preset"
    619770msgstr ""
    620771
    621772#: assets/build/index.js:1
    622 #: assets/src/js/pages/SettingsPage.js:253
     773#: assets/src/js/pages/SettingsPage.js:452
    623774msgid "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."
    624775msgstr ""
    625776
    626777#: assets/build/index.js:1
    627 #: assets/src/js/pages/SettingsPage.js:259
     778#: assets/src/js/pages/SettingsPage.js:458
    628779msgid "Corporate website"
    629780msgstr ""
    630781
    631782#: assets/build/index.js:1
    632 #: assets/src/js/pages/SettingsPage.js:261
     783#: assets/src/js/pages/SettingsPage.js:460
    633784msgid "Optimized for business sites and portfolios. Focuses on security, performance, and removing unnecessary features like RSS feeds and author archives."
    634785msgstr ""
    635786
    636787#: assets/build/index.js:1
    637 #: assets/src/js/pages/SettingsPage.js:271
    638 #: assets/src/js/pages/SettingsPage.js:286
    639 #: assets/src/js/pages/SettingsPage.js:301
     788#: assets/src/js/pages/SettingsPage.js:470
     789#: assets/src/js/pages/SettingsPage.js:485
     790#: assets/src/js/pages/SettingsPage.js:500
    640791msgid "Enable"
    641792msgstr ""
    642793
    643794#: assets/build/index.js:1
    644 #: assets/src/js/pages/SettingsPage.js:274
     795#: assets/src/js/pages/SettingsPage.js:473
    645796msgid "Blog"
    646797msgstr ""
    647798
    648799#: assets/build/index.js:1
    649 #: assets/src/js/pages/SettingsPage.js:276
     800#: assets/src/js/pages/SettingsPage.js:475
    650801msgid "Tailored for content-focused blogs. Includes performance and security optimizations while preserving essential blog features like RSS feeds."
    651802msgstr ""
    652803
    653804#: assets/build/index.js:1
    654 #: assets/src/js/pages/SettingsPage.js:289
     805#: assets/src/js/pages/SettingsPage.js:488
    655806msgid "E-commerce"
    656807msgstr ""
    657808
    658809#: assets/build/index.js:1
    659 #: assets/src/js/pages/SettingsPage.js:291
     810#: assets/src/js/pages/SettingsPage.js:490
    660811msgid "Designed for WooCommerce stores. Includes all performance and security features plus WooCommerce-specific optimizations for faster checkout."
    661812msgstr ""
  • zenpress/tags/2.2.3/readme.txt

    r3451904 r3451916  
    1010License URI: https://www.gnu.org/licenses/gpl-2.0.html/
    1111
    12 Easily speed up and strengthen your WordPress site by cleaning out unnecessary features and protecting weak spots.
     12Easily speed up and strengthen your website in one click: clean out unnecessary features, protect weak points, autoconfigure cache integrations.
    1313
    1414== Description ==
     
    9090= Tools =
    9191* 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.
    9393
    9494= Integrations =
     
    9696ZenPress 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.
    9797
    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 it via 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.
    102102
    103103= Presets =
     
    209209
    210210= 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".
    222213
    223214= 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.
    227222
    228223= 2.2.1 =
     
    358353== Upgrade Notice ==
    359354
    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 
    366355= 2.2.1 =
    367356- Security and code quality improvements. Recommended update.
  • zenpress/tags/2.2.3/zenpress.php

    r3451904 r3451916  
    1111 *
    1212 * 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.2
     13 * 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
    1515 * Plugin URI: https://wordpress.org/plugins/zenpress/
    1616 * Author: Quentin Le Duff
     
    4747require_once __DIR__ . '/inc/core/sanitize.php';
    4848
    49 // Integrations (one file per plugin: handlers + autoconfig)
     49// Integrations
    5050require_once __DIR__ . '/inc/classes/autoptimize.php';
    5151require_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  
    1818export const useSettings = () => {
    1919    const [snippets, setSnippets] = useState({});
    20     const [adminBarEnabled, setAdminBarEnabled] = useState(true);
     20    const [adminBarEnabled, setAdminBarEnabled] = useState(false);
    2121    const [isSaving, setIsSaving] = useState(false);
    2222    const { createSuccessNotice, createErrorNotice } =
     
    4242                setSnippets(snippetsData);
    4343                setAdminBarEnabled(
    44                     settings?.zenpress_admin_bar_enabled !== false
     44                    settings?.zenpress_admin_bar_enabled === true
    4545                );
    4646            })
  • zenpress/trunk/assets/src/js/pages/SettingsPage.js

    r3451904 r3451916  
    312312                                                    }
    313313                                                    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.',
    315315                                                        'zenpress'
    316316                                                    )}
     
    344344                                                        <p className="zenpress-autoconfig-help">
    345345                                                            {__(
    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.',
    347347                                                                'zenpress'
    348348                                                            )}
     
    378378                                                        <p className="zenpress-autoconfig-help">
    379379                                                            {__(
    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).',
    381381                                                                'zenpress'
    382382                                                            )}
     
    412412                                                        <p className="zenpress-autoconfig-help">
    413413                                                            {__(
    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.',
    415415                                                                'zenpress'
    416416                                                            )}
  • zenpress/trunk/inc/classes/cache-enabler.php

    r3451904 r3451916  
    1515 */
    1616final 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    ];
    1922
    2023    /**
     
    5154
    5255    /**
    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).
    5457     */
    5558    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        }
    5762    }
    5863
  • zenpress/trunk/inc/classes/integrations.php

    r3451904 r3451916  
    3030     */
    3131    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);
    3333    }
    3434
  • zenpress/trunk/inc/snippets/meta/disable-capital-p-dangit.meta.php

    r3448585 r3451916  
    1919    'subcategory' => __('performance', 'zenpress'),
    2020    'weight' => 0,
    21     'preset' => [],
     21    'preset' => ['corporate-website', 'blog', 'ecommerce'],
    2222];
  • zenpress/trunk/inc/snippets/meta/disable-password-strength-meter.meta.php

    r3448585 r3451916  
    1919    'subcategory' => __('performance', 'zenpress'),
    2020    'weight' => 0,
    21     'preset' => [],
     21    'preset' => ['corporate-website', 'blog', 'ecommerce'],
    2222];
  • zenpress/trunk/inc/snippets/meta/remove-thanks-for-using-wordpress-in-footer.meta.php

    r3448585 r3451916  
    1313    'title' => __('Remove "Thanks for using WordPress" in footer', 'zenpress'),
    1414    '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.',
    1616        'zenpress'
    1717    ),
  • zenpress/trunk/inc/snippets/meta/remove-wordpress-logo.meta.php

    r3448585 r3451916  
    1313    'title' => __('Remove WordPress logo', 'zenpress'),
    1414    '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.',
    1616        'zenpress'
    1717    ),
  • zenpress/trunk/languages/zenpress.pot

    r3448604 r3451916  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: ZenPress - Optimize & Secure 2.2.1\n"
     5"Project-Id-Version: ZenPress - Optimize & Secure 2.2.3\n"
    66"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/zenpress\n"
    77"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
     
    1010"Content-Type: text/plain; charset=UTF-8\n"
    1111"Content-Transfer-Encoding: 8bit\n"
    12 "POT-Creation-Date: 2026-01-28T10:44:12+00:00\n"
     12"POT-Creation-Date: 2026-02-02T09:51:42+00:00\n"
    1313"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
    1414"X-Generator: WP-CLI 2.12.0\n"
     
    2727#. Description of the plugin
    2828#: zenpress.php
    29 msgid "Easily speed up and strengthen your WordPress site by cleaning out unnecessary features and protecting weak points."
     29msgid "Easily speed up and strengthen your WordPress site in one click: clean out unnecessary features, protect weak points, autoconfigure cache integrations."
    3030msgstr ""
    3131
     
    4040msgstr ""
    4141
    42 #: inc/admin/links.php:19
     42#: inc/admin/links.php:16
    4343msgid "Go to ZenPress settings page"
    4444msgstr ""
    4545
    46 #: inc/admin/links.php:20
     46#: inc/admin/links.php:17
    4747msgid "Settings"
    4848msgstr ""
    4949
     50#: inc/admin/links.php:33
     51#: inc/admin/menu.php:38
     52msgid "View ZenPress changelog on WordPress.org (opens in a new tab)"
     53msgstr ""
     54
     55#: inc/admin/links.php:34
     56msgid "Changelog"
     57msgstr ""
     58
     59#: inc/admin/links.php:39
     60msgid "Read ZenPress documentation (opens in a new tab)"
     61msgstr ""
     62
    5063#: 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"
     64msgid "Docs"
     65msgstr ""
     66
     67#: inc/admin/links.php:45
     68msgid "Support ZenPress by buying a coffee (opens in a new tab)"
    5769msgstr ""
    5870
    5971#: inc/admin/links.php:46
    60 msgid "Read ZenPress documentation (opens in a new tab)"
    61 msgstr ""
    62 
    63 #: inc/admin/links.php:47
    64 msgid "Docs"
    65 msgstr ""
    66 
    67 #: inc/admin/links.php:52
    68 msgid "Support ZenPress by buying a coffee (opens in a new tab)"
    69 msgstr ""
    70 
    71 #: inc/admin/links.php:53
    7272msgid "Support ☕"
    7373msgstr ""
    7474
    75 #: inc/admin/menu.php:15
     75#: inc/admin/menu.php:13
    7676msgid "ZenPress options"
    7777msgstr ""
    7878
    79 #: inc/admin/menu.php:16
    80 #: inc/admin/menu.php:35
     79#: inc/admin/menu.php:14
     80#: inc/admin/menu.php:31
    8181msgid "ZenPress"
    8282msgstr ""
    8383
    84 #: inc/admin/menu.php:38
     84#: inc/admin/menu.php:34
    8585msgid "Version"
    8686msgstr ""
    8787
    88 #: inc/admin/menu.php:43
     88#: inc/admin/menu.php:39
    8989msgid "What's new ?"
    9090msgstr ""
    9191
    92 #: inc/admin/menu.php:52
     92#: inc/admin/menu.php:48
    9393msgid "Read the ZenPress documentation (opens in a new tab)"
    9494msgstr ""
    9595
    96 #: inc/admin/menu.php:53
     96#: inc/admin/menu.php:49
    9797msgid "Documentation"
    9898msgstr ""
    9999
    100 #: inc/admin/menu.php:58
     100#: inc/admin/menu.php:54
    101101msgid "Leave a review for ZenPress on WordPress.org (opens in a new tab)"
    102102msgstr ""
    103103
    104 #: inc/admin/menu.php:59
     104#: inc/admin/menu.php:55
    105105msgid "Leave a review (helps a lot)"
    106106msgstr ""
    107107
    108 #: inc/admin/menu.php:65
     108#: inc/admin/menu.php:61
    109109msgid "Support development: Buy me a coffee (opens in a new tab)"
    110110msgstr ""
    111111
    112 #: inc/admin/menu.php:66
     112#: inc/admin/menu.php:62
    113113msgid "Buy me a coffee"
    114114msgstr ""
    115115
    116 #: inc/admin/menu.php:74
     116#: inc/admin/menu.php:70
    117117msgid "Loading your ZenPress settings…"
    118118msgstr ""
    119119
    120 #: inc/admin/menu.php:82
     120#: inc/admin/menu.php:78
    121121msgid "Made "
    122122msgstr ""
    123123
    124 #: inc/admin/menu.php:84
     124#: inc/admin/menu.php:80
    125125msgid " by Quentin Le Duff - Your WordPress Partner"
    126126msgstr ""
    127127
    128 #: inc/admin/menu.php:91
     128#: inc/admin/menu.php:87
    129129msgid "Visite the developper website"
    130130msgstr ""
    131131
    132 #: inc/admin/menu.php:92
     132#: inc/admin/menu.php:88
    133133msgid "My place"
    134134msgstr ""
    135135
    136 #: inc/admin/menu.php:97
     136#: inc/admin/menu.php:93
    137137msgid "Review the code on Github"
    138138msgstr ""
    139139
    140 #: inc/admin/menu.php:98
     140#: inc/admin/menu.php:94
    141141msgid "ZenPress code repository"
     142msgstr ""
     143
     144#: inc/classes/integrations.php:112
     145msgid "Autoptimize configuration failed."
     146msgstr ""
     147
     148#: inc/classes/integrations.php:118
     149#: assets/build/index.js:1
     150#: assets/src/js/pages/SettingsPage.js:173
     151msgid "Autoptimize has been configured."
     152msgstr ""
     153
     154#: inc/classes/integrations.php:131
     155msgid "Cache Enabler configuration failed."
     156msgstr ""
     157
     158#: inc/classes/integrations.php:137
     159#: assets/build/index.js:1
     160#: assets/src/js/pages/SettingsPage.js:184
     161msgid "Cache Enabler has been configured."
     162msgstr ""
     163
     164#: inc/classes/integrations.php:150
     165msgid "SQLite Object Cache configuration failed."
     166msgstr ""
     167
     168#: inc/classes/integrations.php:156
     169#: assets/build/index.js:1
     170#: assets/src/js/pages/SettingsPage.js:195
     171msgid "SQLite Object Cache has been configured."
     172msgstr ""
     173
     174#: inc/classes/integrations.php:200
     175msgid "Clear all caches"
     176msgstr ""
     177
     178#: inc/classes/integrations.php:203
     179msgid "Clear all caches (page cache, static assets, object cache)."
     180msgstr ""
     181
     182#: inc/classes/integrations.php:211
     183msgid "Clear pages caches"
     184msgstr ""
     185
     186#: inc/classes/integrations.php:214
     187msgid "Clear Cache Enabler page cache."
     188msgstr ""
     189
     190#: inc/classes/integrations.php:223
     191msgid "Clear static assets caches (CSS/JS)"
     192msgstr ""
     193
     194#: inc/classes/integrations.php:226
     195msgid "Clear Autoptimize CSS/JS cache."
     196msgstr ""
     197
     198#: inc/classes/integrations.php:235
     199msgid "Clear object cache"
     200msgstr ""
     201
     202#: inc/classes/integrations.php:238
     203msgid "Clear SQLite Object Cache."
     204msgstr ""
     205
     206#: inc/classes/integrations.php:260
     207#: inc/classes/integrations.php:264
     208msgid "Forbidden"
     209msgstr ""
     210
     211#: inc/classes/integrations.php:272
     212#: inc/classes/integrations.php:282
     213msgid "Cache clear failed."
     214msgstr ""
     215
     216#: inc/classes/integrations.php:274
     217msgid "Caches cleared."
     218msgstr ""
     219
     220#: inc/classes/integrations.php:284
     221msgid "Cache cleared."
     222msgstr ""
     223
     224#: inc/classes/integrations.php:286
     225msgid "Invalid request."
    142226msgstr ""
    143227
     
    155239msgstr ""
    156240
    157 #: inc/snippets/functions/protect-wp-login.php:36
    158 #: inc/snippets/functions/protect-wp-login.php:50
     241#: inc/snippets/functions/protect-wp-login.php:38
     242#: inc/snippets/functions/protect-wp-login.php:52
    159243msgid "Too many failed login attempts. Try again later."
    160244msgstr ""
     
    547631
    548632#: 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."
     633msgid "Removes the \"Thank you for creating with WordPress\" message from the admin footer."
    550634msgstr ""
    551635
     
    563647
    564648#: 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."
     649msgid "Removes the WordPress logo and its dropdown from the admin bar."
    566650msgstr ""
    567651
     
    580664
    581665#: assets/build/index.js:1
    582 #: assets/src/js/hooks/useSettings.js:42
     666#: assets/src/js/hooks/useSettings.js:48
    583667msgid "Failed to load settings."
    584668msgstr ""
    585669
    586670#: assets/build/index.js:1
    587 #: assets/src/js/hooks/useSettings.js:59
     671#: assets/src/js/hooks/useSettings.js:68
    588672msgid "Settings saved."
    589673msgstr ""
    590674
    591675#: assets/build/index.js:1
    592 #: assets/src/js/hooks/useSettings.js:61
     676#: assets/src/js/hooks/useSettings.js:70
    593677msgid "Failed to save settings."
    594678msgstr ""
    595679
    596680#: assets/build/index.js:1
    597 #: assets/src/js/pages/SettingsPage.js:86
     681#: assets/src/js/pages/SettingsPage.js:99
    598682msgid "Uncategorized"
    599683msgstr ""
    600684
    601685#: assets/build/index.js:1
    602 #: assets/src/js/pages/SettingsPage.js:89
     686#: assets/src/js/pages/SettingsPage.js:102
    603687msgid "uncategorized"
    604688msgstr ""
    605689
    606690#: assets/build/index.js:1
    607 #: assets/src/js/pages/SettingsPage.js:234
     691#: assets/src/js/pages/SettingsPage.js:174
     692msgid "Autoptimize autoconfig failed. Is Autoptimize installed and active?"
     693msgstr ""
     694
     695#: assets/build/index.js:1
     696#: assets/src/js/pages/SettingsPage.js:185
     697msgid "Cache Enabler autoconfig failed. Is Cache Enabler installed and active?"
     698msgstr ""
     699
     700#: assets/build/index.js:1
     701#: assets/src/js/pages/SettingsPage.js:196
     702msgid "SQLite Object Cache autoconfig failed. Is SQLite Object Cache installed and active?"
     703msgstr ""
     704
     705#: assets/build/index.js:1
     706#: assets/src/js/pages/SettingsPage.js:297
     707msgid "Integrations"
     708msgstr ""
     709
     710#: assets/build/index.js:1
     711#: assets/src/js/pages/SettingsPage.js:303
     712msgid "Show ZenPress admin bar button"
     713msgstr ""
     714
     715#: assets/build/index.js:1
     716#: assets/src/js/pages/SettingsPage.js:313
     717msgid "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."
     718msgstr ""
     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
     724msgid "Applying…"
     725msgstr ""
     726
     727#: assets/build/index.js:1
     728#: assets/src/js/pages/SettingsPage.js:339
     729msgid "One-click autoconfig Autoptimize"
     730msgstr ""
     731
     732#: assets/build/index.js:1
     733#: assets/src/js/pages/SettingsPage.js:345
     734msgid "Apply recommended Autoptimize settings: Minify JS & CSS, aggregate CSS, static files, 404 fallbacks."
     735msgstr ""
     736
     737#: assets/build/index.js:1
     738#: assets/src/js/pages/SettingsPage.js:373
     739msgid "One-click autoconfig Cache Enabler"
     740msgstr ""
     741
     742#: assets/build/index.js:1
     743#: assets/src/js/pages/SettingsPage.js:379
     744msgid "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)."
     745msgstr ""
     746
     747#: assets/build/index.js:1
     748#: assets/src/js/pages/SettingsPage.js:407
     749msgid "One-click autoconfig SQLite Object Cache"
     750msgstr ""
     751
     752#: assets/build/index.js:1
     753#: assets/src/js/pages/SettingsPage.js:413
     754msgid "Apply recommended SQLite Object Cache settings. Enable \"Use APCu\" if APCu is available."
     755msgstr ""
     756
     757#: assets/build/index.js:1
     758#: assets/src/js/pages/SettingsPage.js:433
    608759msgid "Enable all actions"
    609760msgstr ""
    610761
    611762#: assets/build/index.js:1
    612 #: assets/src/js/pages/SettingsPage.js:241
     763#: assets/src/js/pages/SettingsPage.js:440
    613764msgid "Disable all actions"
    614765msgstr ""
    615766
    616767#: assets/build/index.js:1
    617 #: assets/src/js/pages/SettingsPage.js:251
     768#: assets/src/js/pages/SettingsPage.js:450
    618769msgid "Pick configuration preset"
    619770msgstr ""
    620771
    621772#: assets/build/index.js:1
    622 #: assets/src/js/pages/SettingsPage.js:253
     773#: assets/src/js/pages/SettingsPage.js:452
    623774msgid "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."
    624775msgstr ""
    625776
    626777#: assets/build/index.js:1
    627 #: assets/src/js/pages/SettingsPage.js:259
     778#: assets/src/js/pages/SettingsPage.js:458
    628779msgid "Corporate website"
    629780msgstr ""
    630781
    631782#: assets/build/index.js:1
    632 #: assets/src/js/pages/SettingsPage.js:261
     783#: assets/src/js/pages/SettingsPage.js:460
    633784msgid "Optimized for business sites and portfolios. Focuses on security, performance, and removing unnecessary features like RSS feeds and author archives."
    634785msgstr ""
    635786
    636787#: assets/build/index.js:1
    637 #: assets/src/js/pages/SettingsPage.js:271
    638 #: assets/src/js/pages/SettingsPage.js:286
    639 #: assets/src/js/pages/SettingsPage.js:301
     788#: assets/src/js/pages/SettingsPage.js:470
     789#: assets/src/js/pages/SettingsPage.js:485
     790#: assets/src/js/pages/SettingsPage.js:500
    640791msgid "Enable"
    641792msgstr ""
    642793
    643794#: assets/build/index.js:1
    644 #: assets/src/js/pages/SettingsPage.js:274
     795#: assets/src/js/pages/SettingsPage.js:473
    645796msgid "Blog"
    646797msgstr ""
    647798
    648799#: assets/build/index.js:1
    649 #: assets/src/js/pages/SettingsPage.js:276
     800#: assets/src/js/pages/SettingsPage.js:475
    650801msgid "Tailored for content-focused blogs. Includes performance and security optimizations while preserving essential blog features like RSS feeds."
    651802msgstr ""
    652803
    653804#: assets/build/index.js:1
    654 #: assets/src/js/pages/SettingsPage.js:289
     805#: assets/src/js/pages/SettingsPage.js:488
    655806msgid "E-commerce"
    656807msgstr ""
    657808
    658809#: assets/build/index.js:1
    659 #: assets/src/js/pages/SettingsPage.js:291
     810#: assets/src/js/pages/SettingsPage.js:490
    660811msgid "Designed for WooCommerce stores. Includes all performance and security features plus WooCommerce-specific optimizations for faster checkout."
    661812msgstr ""
  • zenpress/trunk/readme.txt

    r3451904 r3451916  
    1010License URI: https://www.gnu.org/licenses/gpl-2.0.html/
    1111
    12 Easily speed up and strengthen your WordPress site by cleaning out unnecessary features and protecting weak spots.
     12Easily speed up and strengthen your website in one click: clean out unnecessary features, protect weak points, autoconfigure cache integrations.
    1313
    1414== Description ==
     
    9090= Tools =
    9191* 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.
    9393
    9494= Integrations =
     
    9696ZenPress 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.
    9797
    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 it via 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.
    102102
    103103= Presets =
     
    209209
    210210= 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".
    222213
    223214= 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.
    227222
    228223= 2.2.1 =
     
    358353== Upgrade Notice ==
    359354
    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 
    366355= 2.2.1 =
    367356- Security and code quality improvements. Recommended update.
  • zenpress/trunk/zenpress.php

    r3451904 r3451916  
    1111 *
    1212 * 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.2
     13 * 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
    1515 * Plugin URI: https://wordpress.org/plugins/zenpress/
    1616 * Author: Quentin Le Duff
     
    4747require_once __DIR__ . '/inc/core/sanitize.php';
    4848
    49 // Integrations (one file per plugin: handlers + autoconfig)
     49// Integrations
    5050require_once __DIR__ . '/inc/classes/autoptimize.php';
    5151require_once __DIR__ . '/inc/classes/cache-enabler.php';
Note: See TracChangeset for help on using the changeset viewer.