=== Content Revalidation Tracker === Contributors: dropndot Donate link: https://dropndot.com/ Tags: nextjs, headless, revalidation, api, static Requires at least: 6.3 Tested up to: 6.8 Requires PHP: 7.4 Stable tag: 2.0.0 License: GPL-2.0+ License URI: https://www.gnu.org/licenses/gpl-2.0.html Auto-triggers frontend revalidation on post, page, user, or taxonomy updates. Ideal for Next.js and headless WordPress setups. == Description == The **Content Revalidation Tracker** plugin seamlessly connects your WordPress site with your frontend framework (such as **Next.js**, **Nuxt**, or **Gatsby**) to trigger revalidation via a secure API endpoint every time content changes — ensuring your site always serves the most up-to-date pages. This plugin is ideal for **headless WordPress** setups that use static site generation or incremental static regeneration. Whenever you update, publish, or delete posts, pages, or taxonomies, the plugin automatically sends a secure API call to your frontend to revalidate the affected pages. --- ### Key Features - **Automatic Revalidation** – Triggers a revalidation request whenever a post, user, or taxonomy is created, updated, trashed, or deleted. - **Custom Prefix Mapping (New in v2)** – Define custom URL prefixes for your post types and taxonomies to match your frontend routing structure. - **Granular Configuration** – Choose which post types and taxonomies are revalidated via filters. - **Secure API Communication** – Use a secret key and domain configuration to ensure authorized revalidation requests. - **Admin Test Tool (New in v2)** – Test revalidation manually from the settings page to confirm configuration. - **Developer Friendly** – Includes hooks and filters for advanced customization. --- ### Ideal For - WordPress sites powered by **Next.js**, **Nuxt**, or other static/hybrid frameworks. - Developers who want **automated page revalidation** after content changes. - Headless WordPress sites that require fast and fresh content delivery. --- == Installation == 1. Upload the plugin folder `content-revalidation-tracker` to the `/wp-content/plugins/` directory, or install it directly from the WordPress Plugin Directory. 2. Activate the plugin through the ‘Plugins’ screen in WordPress. 3. Go to **Settings → Content Revalidation Tracker** to configure your: - **Frontend Domain (e.g., `https://example.com`)** - **Secret Key (e.g., `ad43d49b3f2e4847a6f6`)** 4. (Optional) Configure custom prefix mapping for post types or taxonomies. 5. Your site will now automatically trigger revalidation whenever relevant content updates occur. --- == Frequently Asked Questions == = Q: What kind of frontend does this plugin support? = A: It’s designed for frameworks like **Next.js**, **Nuxt.js**, and **Gatsby** — any platform that supports revalidation through a secure API route. = Q: Do I need to add a special endpoint on my frontend? = A: Yes. You’ll need to create an endpoint (e.g., `/api/revalidate`) on your frontend that listens for POST requests containing the `secret` and `path` values. = Q: Can I manually trigger revalidation? = A: Yes, use the “Test Revalidation” button in the plugin settings to manually send a request. = Q: Does this plugin work with custom post types or taxonomies? = A: Absolutely. You can enable or map them from the plugin settings or through filters. = Q: Is this compatible with caching plugins? = A: Yes. The plugin works alongside caching plugins — its job is to notify your frontend to refresh specific pages. --- == Screenshots == 1. **Settings Page** – Configure your frontend domain, secret key, and prefix mapping. 2. **Custom Prefix Mapping** – Define custom URL prefixes for your post types and taxonomies to match your frontend routing structure. 3. **Manual Test Tool & Activity Log** – Test your setup easily from the dashboard and view the latest revalidation events. --- == Changelog == = 2.0.0 = - Added: Custom post type and taxonomy prefix mapping. - Added: Manual test revalidation tool. - Added: Log limit configuration. - Improved: Error handling and debugging. - Enhanced: Security validation and code optimization. = 1.0.0 = - Initial release with automatic revalidation for posts, pages, and users. - Added secure secret key validation. - Included dashboard logging and admin notices. --- == Upgrade Notice == = 2.0.0 = Major update – includes prefix mapping, manual testing, and improved logging. Please review settings after upgrading. --- == Support == For support and troubleshooting, please visit [Dropndot Solutions](https://dropndot.com).