Plugin Directory

Changeset 3351740


Ignore:
Timestamp:
08/28/2025 06:08:48 AM (6 months ago)
Author:
gosuccess
Message:

Release 2.0.0 from GitHub release v2.0.0

Location:
xml-cache
Files:
942 added
6 deleted
9 edited
1 copied

Legend:

Unmodified
Added
Removed
  • xml-cache/tags/2.0.0/assets/admin/index.asset.php

    r3059766 r3351740  
    1 <?php return array('dependencies' => array('react', 'wp-api-fetch', 'wp-components', 'wp-data', 'wp-dom-ready', 'wp-element', 'wp-i18n', 'wp-notices'), 'version' => '10870f211885016c5329');
     1<?php return array('dependencies' => array('react-jsx-runtime', 'wp-api-fetch', 'wp-components', 'wp-compose', 'wp-data', 'wp-dom-ready', 'wp-element', 'wp-i18n', 'wp-notices'), 'version' => 'ae254a48be4b5b29937f');
  • xml-cache/tags/2.0.0/assets/admin/index.js

    r3059766 r3351740  
    1 (()=>{"use strict";var e={n:n=>{var t=n&&n.__esModule?()=>n.default:()=>n;return e.d(t,{a:t}),t},d:(n,t)=>{for(var a in t)e.o(t,a)&&!e.o(n,a)&&Object.defineProperty(n,a,{enumerable:!0,get:t[a]})},o:(e,n)=>Object.prototype.hasOwnProperty.call(e,n)};const n=window.React,t=window.wp.domReady;var a=e.n(t);const c=window.wp.element,l=window.wp.apiFetch;var o=e.n(l);const s=window.wp.components,r=window.wp.i18n,i=window.wp.data,_=window.wp.notices;function h(){const e=(0,i.useSelect)((e=>e(_.store).getNotices().filter((e=>"snackbar"===e.type))),[]),{removeNotice:t}=(0,i.useDispatch)(_.store);return(0,n.createElement)(s.SnackbarList,{notices:e,onRemove:t})}function m(){const e="/xml-cache/v1";o().use(o().createNonceMiddleware("xml_cache_nonce"));const[t,a]=(0,c.useState)(null),[l,_]=(0,c.useState)(!1),[m,p]=(0,c.useState)(null),d=()=>{o()({path:e+"/settings",method:"POST",data:t}).then((e=>{e.success?(_(!0),(0,i.dispatch)("core/notices").createNotice("success",(0,r.__)("Settings saved.","xml-cache"),{type:"snackbar",isDismissible:!0})):(0,i.dispatch)("core/notices").createNotice("error",(0,r.__)("Settings could't be saved.","xml-cache"),{type:"snackbar",isDismissible:!0})})).catch((e=>{console.error(e)}))},u=(e,n)=>{t[1][e]=n,a(t),d()},b=(e,n)=>{t[0][e]=n,a(t),d()};return(0,c.useEffect)((()=>(o()({path:e+"/settings"}).then((e=>{a(e)})).catch((e=>{console.error(e)})),o()({path:e+"/sitemap-url"}).then((e=>{e.success&&p(e.sitemap_url)})).catch((e=>{console.error(e)})),()=>{_(!1)})),[l]),null==t?(0,n.createElement)(s.Spinner,null):(0,n.createElement)(n.Fragment,null,(0,n.createElement)(s.Panel,{header:(0,r.__)("XML Cache Settings","xml-cache")},null==m&&(0,n.createElement)(s.Notice,{status:"error",isDismissible:!1},(0,r.__)("An unknown error occurred.","xml-cache")),(0,n.createElement)(s.PanelHeader,null,(0,n.createElement)(s.Button,{variant:"primary",href:m,icon:"admin-links",size:"compact",target:"_blank",disabled:null==m},(0,r.__)("Open Sitemap","xml-cache"))),(0,n.createElement)(s.PanelBody,{title:(0,r.__)("Posts","xml-cache"),initialOpen:t[1].is_posts_panel_open,onToggle:e=>u("is_posts_panel_open",e)},(0,n.createElement)(s.PanelRow,null,(0,n.createElement)(s.CheckboxControl,{label:(0,r.__)("Enable","xml-cache"),help:(0,r.__)("Enable XML cache sitemap for posts?","xml-cache"),checked:t[0].posts_enabled,onChange:e=>b("posts_enabled",e)}))),(0,n.createElement)(s.PanelBody,{title:(0,r.__)("Categories","xml-cache"),initialOpen:t[1].is_categories_panel_open,onToggle:e=>u("is_categories_panel_open",e)},(0,n.createElement)(s.PanelRow,null,(0,n.createElement)(s.CheckboxControl,{label:(0,r.__)("Enable","xml-cache"),help:(0,r.__)("Enable XML cache sitemap for categories?","xml-cache"),checked:t[0].categories_enabled,onChange:e=>b("categories_enabled",e)}))),(0,n.createElement)(s.PanelBody,{title:(0,r.__)("Archives","xml-cache"),initialOpen:t[1].is_archives_panel_open,onToggle:e=>u("is_archives_panel_open",e)},(0,n.createElement)(s.PanelRow,null,(0,n.createElement)(s.CheckboxControl,{label:(0,r.__)("Enable","xml-cache"),help:(0,r.__)("Enable XML cache sitemap for archives?","xml-cache"),checked:t[0].archives_enabled,onChange:e=>b("archives_enabled",e)}))),(0,n.createElement)(s.PanelBody,{title:(0,r.__)("Tags","xml-cache"),initialOpen:t[1].is_tags_panel_open,onToggle:e=>u("is_tags_panel_open",e)},(0,n.createElement)(s.PanelRow,null,(0,n.createElement)(s.CheckboxControl,{label:(0,r.__)("Enable","xml-cache"),help:(0,r.__)("Enable XML cache sitemap for tags?","xml-cache"),checked:t[0].tags_enabled,onChange:e=>b("tags_enabled",e)})))),(0,n.createElement)(h,null))}a()((()=>{const e=document.querySelector("xml-cache-settings");null!==e&&(0,c.render)((0,n.createElement)(m,null),e)}))})();
     1(()=>{"use strict";var e={n:s=>{var a=s&&s.__esModule?()=>s.default:()=>s;return e.d(a,{a}),a},d:(s,a)=>{for(var t in a)e.o(a,t)&&!e.o(s,t)&&Object.defineProperty(s,t,{enumerable:!0,get:a[t]})},o:(e,s)=>Object.prototype.hasOwnProperty.call(e,s)};const s=window.wp.domReady;var a=e.n(s);const t=window.wp.element,n=window.wp.apiFetch;var c=e.n(n);const o=window.wp.components,r=window.wp.i18n,i=window.wp.compose,l=window.wp.data,d=window.wp.notices,p=window.ReactJSXRuntime;function h(){const e=(0,l.useSelect)(e=>e(d.store).getNotices().filter(e=>"snackbar"===e.type),[]),{removeNotice:s}=(0,l.useDispatch)(d.store);return(0,p.jsx)("div",{style:{position:"relative"},children:(0,p.jsx)(o.SnackbarList,{notices:e,onRemove:s})})}function m(){var e;const[s,a]=(0,t.useState)(null),[n,d]=(0,t.useState)(!1),[m,u]=(0,t.useState)(null),[_,x]=(0,t.useState)(null),g=(0,i.useCopyToClipboard)(()=>null!=m?m:"",()=>{(0,l.dispatch)("core/notices").createNotice("success",(0,r.__)("Sitemap URL copied to clipboard.","xml-cache"),{type:"snackbar",isDismissible:!0})}),b=(e,t)=>{if(!s||!1===s)return;const n=[{...s[0],[e]:t},s[1]?{...s[1]}:{}];a(n),((e=s)=>{c()({path:xmlCache.restApiNamespace+"/settings",method:"POST",data:e}).then(e=>{e.success?(d(!0),(0,l.dispatch)("core/notices").createNotice("success",(0,r.__)("Settings saved.","xml-cache"),{type:"snackbar",isDismissible:!0})):(0,l.dispatch)("core/notices").createNotice("error",(0,r.__)("Settings could't be saved.","xml-cache"),{type:"snackbar",isDismissible:!0})}).catch(e=>{console.error(e)})})(n)};return(0,t.useEffect)(()=>(c()({path:xmlCache.restApiNamespace+"/settings"}).then(e=>{e.success?a(e.data):(a(!1),x(e.message))}).catch(e=>{console.error(e),a(!1),x(e.message)}),c()({path:xmlCache.restApiNamespace+"/xml-sitemap-url"}).then(e=>{e.success?u(e.data.sitemap_url):(u(!1),x(e.message))}).catch(e=>{u(!1),x(e.message)}),()=>{d(!1)}),[n]),null===s||null===m?(0,p.jsx)(o.Spinner,{}):(0,p.jsxs)("div",{className:"wrap",children:[(0,p.jsx)(h,{}),(0,p.jsxs)(o.Card,{style:{maxWidth:"500px"},children:[(0,p.jsx)(o.CardHeader,{children:(0,p.jsx)("h1",{children:(0,r.__)("XML Cache Settings","xml-cache")})}),_&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(o.CardBody,{children:(0,p.jsx)(o.Notice,{status:"error",isDismissible:!1,children:(0,r.sprintf)((0,r.__)("%s","xml-cache"),_)})}),(0,p.jsx)(o.CardDivider,{})]}),(0,p.jsx)(o.CardBody,{children:(0,p.jsx)("p",{children:(0,r.__)("XML Cache generates an XML sitemap for cache plugins. Select which sections you want to include in the sitemap. URLs that are set to noindex are also included in the sitemap. You can specify the sitemap in your cache plugin's settings to automatically warm up your entire cache.","xml-cache")})}),(0,p.jsx)(o.CardDivider,{}),(0,p.jsxs)(o.CardBody,{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"1rem"},children:[(0,p.jsx)(o.Button,{variant:"primary",href:m,icon:"admin-links",size:"compact",target:"_blank",disabled:!1===s||!1===m,children:(0,r.__)("Open Sitemap","xml-cache")}),(0,p.jsx)(o.Button,{variant:"secondary",icon:"clipboard",size:"compact",ref:g,disabled:!1===s||!1===m,children:(0,r.__)("Copy Sitemap URL","xml-cache")})]}),(0,p.jsx)(o.CardDivider,{}),(0,p.jsxs)(o.CardBody,{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"1rem",alignItems:"center"},children:[(0,p.jsx)(o.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,r.__)("Include posts","xml-cache"),checked:s[0].posts_enabled,onChange:e=>b("posts_enabled",e),disabled:!1===s||!1===m}),(0,p.jsx)(o.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,r.__)("Include custom post types","xml-cache"),checked:null===(e=s[0].custom_post_types_enabled)||void 0===e||e,onChange:e=>b("custom_post_types_enabled",e),disabled:!1===s||!1===m}),(0,p.jsx)(o.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,r.__)("Include categories","xml-cache"),checked:s[0].categories_enabled,onChange:e=>b("categories_enabled",e),disabled:!1===s||!1===m}),(0,p.jsx)(o.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,r.__)("Include archives","xml-cache"),checked:s[0].archives_enabled,onChange:e=>b("archives_enabled",e),disabled:!1===s||!1===m}),(0,p.jsx)(o.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,r.__)("Include tags","xml-cache"),checked:s[0].tags_enabled,onChange:e=>b("tags_enabled",e),disabled:!1===s||!1===m})]}),(0,p.jsx)(o.CardFooter,{children:(0,p.jsx)("p",{dangerouslySetInnerHTML:{__html:(0,r.sprintf)((0,r.__)('Got questions, issues, or feature ideas? <a href="%s" target="_blank" rel="noopener">Visit the support forum</a>. Enjoying the plugin? <a href="%s" target="_blank" rel="noopener">Please leave a review</a> — it really helps. Developers are welcome to contribute on <a href="%s" target="_blank" rel="noopener">GitHub</a>.',"xml-cache"),xmlCache.supportUrl,xmlCache.reviewUrl,xmlCache.githubUrl)}})})]})]})}a()(()=>{const e=document.querySelector("xml-cache");null!==e&&(0,t.createRoot)(e).render((0,p.jsx)(m,{}))})})();
  • xml-cache/tags/2.0.0/readme.txt

    r3270791 r3351740  
    55Requires at least: 6.0
    66Tested up to: 6.8
    7 Stable tag: 1.2.1
    8 Requires PHP: 8.0
     7Stable tag: 2.0.0
     8Requires PHP: 8.2
    99License: GPLv3 or later
    1010License URI: https://www.gnu.org/licenses/gpl-3.0.html
     
    4949== Changelog ==
    5050
    51 = 1.2.1 =
    52 * Fixed "Undefined variable $numpage".
    53 
    54 = 1.2.0 =
    55 * XML cache now works if no permalinks are enabled.
    56 * Paginated categories, tag pages, blog page and frontpage are now also included in the XML sitemap.
    57 * Added blueprint for a live preview of the plugin.
    58 * Various optimizations.
    59 
    60 = 1.1.0 =
    61 * Paginated posts and pages are now also included in the XML sitemap.
    62 
    63 = 1.0.0 =
    64 * Initial release.
     51= 2.0.0 =
     52* ### Highlights
     53* - Custom Post Types: Add support for public CPTs, toggleable in settings.
     54* - Sitemap: Refined URL collection and pagination; category/tag/archive/blog/front-page pagination aligned with permalink structure.
     55* - Admin UI: Refactored settings screen; copy sitemap URL action; improved UX and error handling.
     56* - Code quality: Major WPCS compliance (docblocks, sanitization/escaping, Yoda conditions); standardized strict_types formatting.
     57* - Architecture: Migrated to Composer with PSR-4 under src; introduced Symfony DI/Config; normalized API namespace casing (V1).
     58* - CI/CD: Added WordPress.org deploy workflow and plugin assets.
     59*
     60* ### Requirements
     61* - WordPress 6.0+
     62* - PHP 8.2+ (due to Symfony 7.x dependencies)
     63*
     64* ### Upgrade notes
     65* - PHP 8.2 is now required.
     66* - New setting `custom_post_types_enabled` defaults to enabled; adjust under Settings → XML Cache if you don’t want CPTs included.
  • xml-cache/tags/2.0.0/xml-cache.php

    r3060745 r3351740  
    11<?php
    2 
    3 namespace GoSuccess\XML_Cache;
    4 
    52/**
    63 * Plugin Name:       XML Cache
    74 * Description:       Generates an XML sitemap for cache plugins.
    8  * Version:           1.2.1
     5 * Version:           2.0.0
    96 * Requires at least: 6.0
    10  * Requires PHP:      8.0
     7 * Requires PHP:      8.2
    118 * Author:            GoSuccess
    129 * Author URI:        https://gosuccess.io
     
    1411 * License:           GPL v3 or later
    1512 * License URI:       https://www.gnu.org/licenses/gpl-3.0.html
     13 *
     14 * @package xml-cache
    1615 */
    1716
    18 if( ! defined( 'ABSPATH' ) ) {
    19     exit();
    20 }
     17declare( strict_types=1 );
     18
     19use GoSuccess\XML_Cache\Plugin;
     20
     21defined( 'ABSPATH' ) || exit;
    2122
    2223define( 'XML_CACHE_FILE', __FILE__ );
    23 define( 'XML_CACHE_URL', \plugin_dir_url( XML_CACHE_FILE ) );
    24 define( 'XML_CACHE_PATH', \trailingslashit( \plugin_dir_path( XML_CACHE_FILE ) ) );
    2524
    26 require_once XML_CACHE_PATH . 'includes/plugin.php';
     25require_once __DIR__ . '/vendor/autoload.php';
    2726
    28 new Plugin();
     27Plugin::get_instance();
  • xml-cache/trunk/assets/admin/index.asset.php

    r3059766 r3351740  
    1 <?php return array('dependencies' => array('react', 'wp-api-fetch', 'wp-components', 'wp-data', 'wp-dom-ready', 'wp-element', 'wp-i18n', 'wp-notices'), 'version' => '10870f211885016c5329');
     1<?php return array('dependencies' => array('react-jsx-runtime', 'wp-api-fetch', 'wp-components', 'wp-compose', 'wp-data', 'wp-dom-ready', 'wp-element', 'wp-i18n', 'wp-notices'), 'version' => 'ae254a48be4b5b29937f');
  • xml-cache/trunk/assets/admin/index.js

    r3059766 r3351740  
    1 (()=>{"use strict";var e={n:n=>{var t=n&&n.__esModule?()=>n.default:()=>n;return e.d(t,{a:t}),t},d:(n,t)=>{for(var a in t)e.o(t,a)&&!e.o(n,a)&&Object.defineProperty(n,a,{enumerable:!0,get:t[a]})},o:(e,n)=>Object.prototype.hasOwnProperty.call(e,n)};const n=window.React,t=window.wp.domReady;var a=e.n(t);const c=window.wp.element,l=window.wp.apiFetch;var o=e.n(l);const s=window.wp.components,r=window.wp.i18n,i=window.wp.data,_=window.wp.notices;function h(){const e=(0,i.useSelect)((e=>e(_.store).getNotices().filter((e=>"snackbar"===e.type))),[]),{removeNotice:t}=(0,i.useDispatch)(_.store);return(0,n.createElement)(s.SnackbarList,{notices:e,onRemove:t})}function m(){const e="/xml-cache/v1";o().use(o().createNonceMiddleware("xml_cache_nonce"));const[t,a]=(0,c.useState)(null),[l,_]=(0,c.useState)(!1),[m,p]=(0,c.useState)(null),d=()=>{o()({path:e+"/settings",method:"POST",data:t}).then((e=>{e.success?(_(!0),(0,i.dispatch)("core/notices").createNotice("success",(0,r.__)("Settings saved.","xml-cache"),{type:"snackbar",isDismissible:!0})):(0,i.dispatch)("core/notices").createNotice("error",(0,r.__)("Settings could't be saved.","xml-cache"),{type:"snackbar",isDismissible:!0})})).catch((e=>{console.error(e)}))},u=(e,n)=>{t[1][e]=n,a(t),d()},b=(e,n)=>{t[0][e]=n,a(t),d()};return(0,c.useEffect)((()=>(o()({path:e+"/settings"}).then((e=>{a(e)})).catch((e=>{console.error(e)})),o()({path:e+"/sitemap-url"}).then((e=>{e.success&&p(e.sitemap_url)})).catch((e=>{console.error(e)})),()=>{_(!1)})),[l]),null==t?(0,n.createElement)(s.Spinner,null):(0,n.createElement)(n.Fragment,null,(0,n.createElement)(s.Panel,{header:(0,r.__)("XML Cache Settings","xml-cache")},null==m&&(0,n.createElement)(s.Notice,{status:"error",isDismissible:!1},(0,r.__)("An unknown error occurred.","xml-cache")),(0,n.createElement)(s.PanelHeader,null,(0,n.createElement)(s.Button,{variant:"primary",href:m,icon:"admin-links",size:"compact",target:"_blank",disabled:null==m},(0,r.__)("Open Sitemap","xml-cache"))),(0,n.createElement)(s.PanelBody,{title:(0,r.__)("Posts","xml-cache"),initialOpen:t[1].is_posts_panel_open,onToggle:e=>u("is_posts_panel_open",e)},(0,n.createElement)(s.PanelRow,null,(0,n.createElement)(s.CheckboxControl,{label:(0,r.__)("Enable","xml-cache"),help:(0,r.__)("Enable XML cache sitemap for posts?","xml-cache"),checked:t[0].posts_enabled,onChange:e=>b("posts_enabled",e)}))),(0,n.createElement)(s.PanelBody,{title:(0,r.__)("Categories","xml-cache"),initialOpen:t[1].is_categories_panel_open,onToggle:e=>u("is_categories_panel_open",e)},(0,n.createElement)(s.PanelRow,null,(0,n.createElement)(s.CheckboxControl,{label:(0,r.__)("Enable","xml-cache"),help:(0,r.__)("Enable XML cache sitemap for categories?","xml-cache"),checked:t[0].categories_enabled,onChange:e=>b("categories_enabled",e)}))),(0,n.createElement)(s.PanelBody,{title:(0,r.__)("Archives","xml-cache"),initialOpen:t[1].is_archives_panel_open,onToggle:e=>u("is_archives_panel_open",e)},(0,n.createElement)(s.PanelRow,null,(0,n.createElement)(s.CheckboxControl,{label:(0,r.__)("Enable","xml-cache"),help:(0,r.__)("Enable XML cache sitemap for archives?","xml-cache"),checked:t[0].archives_enabled,onChange:e=>b("archives_enabled",e)}))),(0,n.createElement)(s.PanelBody,{title:(0,r.__)("Tags","xml-cache"),initialOpen:t[1].is_tags_panel_open,onToggle:e=>u("is_tags_panel_open",e)},(0,n.createElement)(s.PanelRow,null,(0,n.createElement)(s.CheckboxControl,{label:(0,r.__)("Enable","xml-cache"),help:(0,r.__)("Enable XML cache sitemap for tags?","xml-cache"),checked:t[0].tags_enabled,onChange:e=>b("tags_enabled",e)})))),(0,n.createElement)(h,null))}a()((()=>{const e=document.querySelector("xml-cache-settings");null!==e&&(0,c.render)((0,n.createElement)(m,null),e)}))})();
     1(()=>{"use strict";var e={n:s=>{var a=s&&s.__esModule?()=>s.default:()=>s;return e.d(a,{a}),a},d:(s,a)=>{for(var t in a)e.o(a,t)&&!e.o(s,t)&&Object.defineProperty(s,t,{enumerable:!0,get:a[t]})},o:(e,s)=>Object.prototype.hasOwnProperty.call(e,s)};const s=window.wp.domReady;var a=e.n(s);const t=window.wp.element,n=window.wp.apiFetch;var c=e.n(n);const o=window.wp.components,r=window.wp.i18n,i=window.wp.compose,l=window.wp.data,d=window.wp.notices,p=window.ReactJSXRuntime;function h(){const e=(0,l.useSelect)(e=>e(d.store).getNotices().filter(e=>"snackbar"===e.type),[]),{removeNotice:s}=(0,l.useDispatch)(d.store);return(0,p.jsx)("div",{style:{position:"relative"},children:(0,p.jsx)(o.SnackbarList,{notices:e,onRemove:s})})}function m(){var e;const[s,a]=(0,t.useState)(null),[n,d]=(0,t.useState)(!1),[m,u]=(0,t.useState)(null),[_,x]=(0,t.useState)(null),g=(0,i.useCopyToClipboard)(()=>null!=m?m:"",()=>{(0,l.dispatch)("core/notices").createNotice("success",(0,r.__)("Sitemap URL copied to clipboard.","xml-cache"),{type:"snackbar",isDismissible:!0})}),b=(e,t)=>{if(!s||!1===s)return;const n=[{...s[0],[e]:t},s[1]?{...s[1]}:{}];a(n),((e=s)=>{c()({path:xmlCache.restApiNamespace+"/settings",method:"POST",data:e}).then(e=>{e.success?(d(!0),(0,l.dispatch)("core/notices").createNotice("success",(0,r.__)("Settings saved.","xml-cache"),{type:"snackbar",isDismissible:!0})):(0,l.dispatch)("core/notices").createNotice("error",(0,r.__)("Settings could't be saved.","xml-cache"),{type:"snackbar",isDismissible:!0})}).catch(e=>{console.error(e)})})(n)};return(0,t.useEffect)(()=>(c()({path:xmlCache.restApiNamespace+"/settings"}).then(e=>{e.success?a(e.data):(a(!1),x(e.message))}).catch(e=>{console.error(e),a(!1),x(e.message)}),c()({path:xmlCache.restApiNamespace+"/xml-sitemap-url"}).then(e=>{e.success?u(e.data.sitemap_url):(u(!1),x(e.message))}).catch(e=>{u(!1),x(e.message)}),()=>{d(!1)}),[n]),null===s||null===m?(0,p.jsx)(o.Spinner,{}):(0,p.jsxs)("div",{className:"wrap",children:[(0,p.jsx)(h,{}),(0,p.jsxs)(o.Card,{style:{maxWidth:"500px"},children:[(0,p.jsx)(o.CardHeader,{children:(0,p.jsx)("h1",{children:(0,r.__)("XML Cache Settings","xml-cache")})}),_&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(o.CardBody,{children:(0,p.jsx)(o.Notice,{status:"error",isDismissible:!1,children:(0,r.sprintf)((0,r.__)("%s","xml-cache"),_)})}),(0,p.jsx)(o.CardDivider,{})]}),(0,p.jsx)(o.CardBody,{children:(0,p.jsx)("p",{children:(0,r.__)("XML Cache generates an XML sitemap for cache plugins. Select which sections you want to include in the sitemap. URLs that are set to noindex are also included in the sitemap. You can specify the sitemap in your cache plugin's settings to automatically warm up your entire cache.","xml-cache")})}),(0,p.jsx)(o.CardDivider,{}),(0,p.jsxs)(o.CardBody,{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"1rem"},children:[(0,p.jsx)(o.Button,{variant:"primary",href:m,icon:"admin-links",size:"compact",target:"_blank",disabled:!1===s||!1===m,children:(0,r.__)("Open Sitemap","xml-cache")}),(0,p.jsx)(o.Button,{variant:"secondary",icon:"clipboard",size:"compact",ref:g,disabled:!1===s||!1===m,children:(0,r.__)("Copy Sitemap URL","xml-cache")})]}),(0,p.jsx)(o.CardDivider,{}),(0,p.jsxs)(o.CardBody,{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"1rem",alignItems:"center"},children:[(0,p.jsx)(o.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,r.__)("Include posts","xml-cache"),checked:s[0].posts_enabled,onChange:e=>b("posts_enabled",e),disabled:!1===s||!1===m}),(0,p.jsx)(o.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,r.__)("Include custom post types","xml-cache"),checked:null===(e=s[0].custom_post_types_enabled)||void 0===e||e,onChange:e=>b("custom_post_types_enabled",e),disabled:!1===s||!1===m}),(0,p.jsx)(o.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,r.__)("Include categories","xml-cache"),checked:s[0].categories_enabled,onChange:e=>b("categories_enabled",e),disabled:!1===s||!1===m}),(0,p.jsx)(o.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,r.__)("Include archives","xml-cache"),checked:s[0].archives_enabled,onChange:e=>b("archives_enabled",e),disabled:!1===s||!1===m}),(0,p.jsx)(o.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,r.__)("Include tags","xml-cache"),checked:s[0].tags_enabled,onChange:e=>b("tags_enabled",e),disabled:!1===s||!1===m})]}),(0,p.jsx)(o.CardFooter,{children:(0,p.jsx)("p",{dangerouslySetInnerHTML:{__html:(0,r.sprintf)((0,r.__)('Got questions, issues, or feature ideas? <a href="%s" target="_blank" rel="noopener">Visit the support forum</a>. Enjoying the plugin? <a href="%s" target="_blank" rel="noopener">Please leave a review</a> — it really helps. Developers are welcome to contribute on <a href="%s" target="_blank" rel="noopener">GitHub</a>.',"xml-cache"),xmlCache.supportUrl,xmlCache.reviewUrl,xmlCache.githubUrl)}})})]})]})}a()(()=>{const e=document.querySelector("xml-cache");null!==e&&(0,t.createRoot)(e).render((0,p.jsx)(m,{}))})})();
  • xml-cache/trunk/readme.txt

    r3270791 r3351740  
    55Requires at least: 6.0
    66Tested up to: 6.8
    7 Stable tag: 1.2.1
    8 Requires PHP: 8.0
     7Stable tag: 2.0.0
     8Requires PHP: 8.2
    99License: GPLv3 or later
    1010License URI: https://www.gnu.org/licenses/gpl-3.0.html
     
    4949== Changelog ==
    5050
    51 = 1.2.1 =
    52 * Fixed "Undefined variable $numpage".
    53 
    54 = 1.2.0 =
    55 * XML cache now works if no permalinks are enabled.
    56 * Paginated categories, tag pages, blog page and frontpage are now also included in the XML sitemap.
    57 * Added blueprint for a live preview of the plugin.
    58 * Various optimizations.
    59 
    60 = 1.1.0 =
    61 * Paginated posts and pages are now also included in the XML sitemap.
    62 
    63 = 1.0.0 =
    64 * Initial release.
     51= 2.0.0 =
     52* ### Highlights
     53* - Custom Post Types: Add support for public CPTs, toggleable in settings.
     54* - Sitemap: Refined URL collection and pagination; category/tag/archive/blog/front-page pagination aligned with permalink structure.
     55* - Admin UI: Refactored settings screen; copy sitemap URL action; improved UX and error handling.
     56* - Code quality: Major WPCS compliance (docblocks, sanitization/escaping, Yoda conditions); standardized strict_types formatting.
     57* - Architecture: Migrated to Composer with PSR-4 under src; introduced Symfony DI/Config; normalized API namespace casing (V1).
     58* - CI/CD: Added WordPress.org deploy workflow and plugin assets.
     59*
     60* ### Requirements
     61* - WordPress 6.0+
     62* - PHP 8.2+ (due to Symfony 7.x dependencies)
     63*
     64* ### Upgrade notes
     65* - PHP 8.2 is now required.
     66* - New setting `custom_post_types_enabled` defaults to enabled; adjust under Settings → XML Cache if you don’t want CPTs included.
  • xml-cache/trunk/xml-cache.php

    r3060745 r3351740  
    11<?php
    2 
    3 namespace GoSuccess\XML_Cache;
    4 
    52/**
    63 * Plugin Name:       XML Cache
    74 * Description:       Generates an XML sitemap for cache plugins.
    8  * Version:           1.2.1
     5 * Version:           2.0.0
    96 * Requires at least: 6.0
    10  * Requires PHP:      8.0
     7 * Requires PHP:      8.2
    118 * Author:            GoSuccess
    129 * Author URI:        https://gosuccess.io
     
    1411 * License:           GPL v3 or later
    1512 * License URI:       https://www.gnu.org/licenses/gpl-3.0.html
     13 *
     14 * @package xml-cache
    1615 */
    1716
    18 if( ! defined( 'ABSPATH' ) ) {
    19     exit();
    20 }
     17declare( strict_types=1 );
     18
     19use GoSuccess\XML_Cache\Plugin;
     20
     21defined( 'ABSPATH' ) || exit;
    2122
    2223define( 'XML_CACHE_FILE', __FILE__ );
    23 define( 'XML_CACHE_URL', \plugin_dir_url( XML_CACHE_FILE ) );
    24 define( 'XML_CACHE_PATH', \trailingslashit( \plugin_dir_path( XML_CACHE_FILE ) ) );
    2524
    26 require_once XML_CACHE_PATH . 'includes/plugin.php';
     25require_once __DIR__ . '/vendor/autoload.php';
    2726
    28 new Plugin();
     27Plugin::get_instance();
Note: See TracChangeset for help on using the changeset viewer.