=== AegisSitemap ===
Contributors: aegisify
Tags: sitemap, xml sitemap, sitemap index, robots.txt, seo,
Requires at least: 6.8
Tested up to: 6.9
Requires PHP: 8.2
Stable tag: 1.2.15
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

AegisSiteMap generates fast, standards‑friendly XML sitemaps and gives you practical Robots.txt control—built for real WordPress admins.

== Description ==

AegisSiteMap is a lightweight sitemap + robots management plugin designed for performance, clarity, and reliability.

**Core sitemap features**
* XML Sitemap + Sitemap Index
* Automatic splitting (configurable max URLs per sitemap)
* Include/exclude post types and taxonomies
* Exclude by URL patterns / folders / paths
* Image support (where applicable)
* Search engine ping (optional)
* Clean rewrite endpoints (human-friendly URLs)

**Robots.txt management**
* View/edit robots rules inside wp-admin
* Safe defaults + common crawl optimization toggles
* Optional physical robots.txt write (if your hosting allows it)
* Automatic logging when robots.txt writes fail (see “Logging” below)

**License & updates (Aegisify / CLM integration)**
* License activate / deactivate / status check
* Optional “Register this free installation” flow (opt‑in consent)
* Hardened POST handling with nonces + safe redirects to prevent blank pages
* Backoff/throttling to avoid spamming CLM endpoints

**Logging (marketplace readiness)**
AegisSiteMap can write operational failures to:
`/includes/log/aegissitemap.log`

Examples of what gets logged:
* CLM free‑register HTTP/WP_Error responses (with codes/bodies)
* robots.txt write failures (not writable / write returned false)
* unexpected empty sitemap output (debug context included)

Note: Some hosts block writes inside plugin folders. If your host blocks writes, configure your environment to allow it or use server error logs.

== Installation ==

1. Upload the `aegissitemap` folder to `/wp-content/plugins/` or install via Plugins → Add New.
2. Activate AegisSiteMap.
3. Go to **AegisSiteMap → Sitemap** to enable and configure sitemap settings.
4. Go to **AegisSiteMap → Robots** to manage robots directives.
5. Go to **AegisSiteMap → License** to activate your license or optionally register your free installation (opt-in).

== Frequently Asked Questions ==

= Where is my sitemap URL? =
After enabling the sitemap, your sitemap will typically be available at:
* `/sitemap.xml`
* `/sitemap_index.xml` (when Sitemap Index is enabled)

Exact endpoints may vary depending on settings and permalink configuration.

= Do I need to register my free installation? =
No. Free registration is **optional** and requires explicit consent. It exists to improve update/license related workflows through Aegisify/CLM.

= Why does “Register Free Installation” fail? =
Most common causes:
* Your host blocks outbound requests (`wp_remote_post`)
* Temporary rate limits (HTTP 429)
* Aegisify/CLM endpoint error or mismatch
When it fails, check:
`/includes/log/aegissitemap.log` (or server error logs if the directory isn’t writable)

= Can AegisSiteMap write a physical robots.txt? =
It tries, but only if your filesystem is writable. If it can’t write, AegisSiteMap logs the reason and still supports virtual robots rules via WordPress.

== Screenshots ==

1. Sitemap settings (XML Sitemap, Index, split size, include/exclude)
2. Robots.txt management (rules, optimization toggles)
3. License page (Activate/Deactivate/Status + optional free install registration)

== Changelog ==

= 1.2.14 =
* Readme + metadata alignment with plugin header (WP 6.8 / PHP 8.2 / stable tag).
* Admin hardening: improved input unslashing/sanitization and safer output contexts.
* Minor UX/maintenance improvements.

= 1.2.10 =
**Stability & marketplace hardening (past few weeks of improvements)**
* Added/standardized operational logging to `/includes/log/aegissitemap.log` (CLM, robots write failures, sitemap edge cases).
* Improved CLM “Register Free Installation” flow:
  - Consent‑based opt‑in (checkbox persists after submit)
  - Status updates (Registered / Error) based on CLM response
  - Button state transitions (Register ↔ Unregister)
* Fixed “blank page after Register Free Installation” by switching to a safe POST→Redirect→GET pattern and redirecting back to the *current* admin page slug.
* Hardened POST handlers with nonces and safer redirects to avoid resubmission and inconsistent UI state.
* Added backoff/throttling around free-registration attempts to prevent repeated calls during outages or rate limiting.
* Improved CLM error visibility:
  - Store last CLM failure message for admin notices
  - Log HTTP codes/bodies so issues are diagnosable in production
* Robots.txt reliability improvements:
  - Log when robots.txt is not writable or file writes fail
  - Retain virtual robots support when physical file isn’t writable
* Sitemap reliability improvements:
  - Log unexpected empty sitemap output with request context
* General cleanup for WordPress marketplace readiness: more defensive checks, clearer admin notices, and reduced “silent failure” scenarios.

= 1.2.9 =
* Admin UI refinements across tabs (Sitemap / Robots / License / Aegisify Plugin).
* Better caching and status display for license checks (reduces repeated network calls).
* Improved sanitization around settings inputs and safer defaults.

= 1.2.8 =
* Expanded sitemap inclusion/exclusion controls (post types, taxonomies, URL patterns).
* Performance tuning for large sites (index splitting and pagination refinements).
* Improved rewrite handling and sitemap URL consistency on permalink changes.

= 1.2.7 =
* Search engine ping enhancements and improved error handling on failed pings.
* Better UX around sitemap enable/disable and regeneration triggers.

= 1.2.6 =
* Robots.txt management improvements and additional crawl optimization toggles.
* Safer robots editing with clearer warnings and validation.

= 1.2.5 =
* Sitemap index improvements and more consistent child sitemap naming.
* Exclusion logic improvements (folders/paths) and fewer false positives.

= 1.2.4 =
* UI/UX refinements to align with the Aegisify suite.
* Additional internal checks to avoid generating sitemaps for disabled content.

= 1.2.3 =
* Introduced full Robots.txt Management tab.
* Added robot directives presets + crawl optimization toggles.
* Improvements to sitemap output formatting and caching behavior.

= 1.2.2 =
* Sitemap index support and automatic splitting for large sites.
* Better handling of custom post types and taxonomy archives.

= 1.2.1 =
* Initial public release refinements and bug fixes.

= 1.2.0 =
* Initial release: XML sitemap generation + basic settings.

== Upgrade Notice ==

= 1.2.10 =
Recommended update for all users. Improves stability, adds detailed logging, hardens CLM registration (no more blank pages on register), and improves robots/sitemap failure diagnostics.

== Privacy & Data ==

* AegisSiteMap does not require tracking to function.
* The “Register this free installation” feature is **optional** and requires explicit consent. When enabled, it may transmit basic site metadata to Aegisify for update/license related features (e.g., domain, site URL, admin email).
* If you do not consent, do not enable registration.

== Disclaimer ==

This plugin is provided “as-is” without any warranties. While AegisSiteMap aims to be safe and reliable, you are responsible for validating changes in your environment—especially when editing robots.txt or SEO-related settings.

If you do not agree with these terms, DO NOT INSTALL OR USE THIS PLUGIN.