=== Slug Trace ===
Contributors: Milap
Donate link: https://www.paypal.me/MilapPatel
Tags: slug, permalink, redirect, seo, history
Requires PHP: 7.4
Requires at least: 5.0
Tested up to: 6.9
Stable tag: 1.0
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Expose the hidden "old slugs" WordPress stores and automatically redirects for your Posts, Pages, and all Public Custom Post Types.

== Description ==

Did you know that every time you change a URL (slug), WordPress remembers the old one? It stores these in your database and automatically performs a 301 redirect to the new URL. 

However, WordPress core has two major flaws:
1. It provides no way to see this history in the admin dashboard.
2. It often fails to record history for hierarchical Pages and certain Custom Post Types.

**Slug Trace** bridges this gap. It provides a simple, elegant interface to see every previous URL a post, page, or product has ever had. It also includes a "Universal Tracker" that forces WordPress to remember slug changes for Pages and Custom Post Types that are usually ignored by core.

* **Universal Support:** Works with Posts, Pages, and any public Custom Post Type (CPT) like WooCommerce Products, Portfolio items, and more.
* **View Hidden Redirects:** Instantly see which old URLs are still pointing to your current content.
* **The "Page Fix":** Adds a custom engine to ensure WordPress actually records slug history for hierarchical Pages—a feature missing from standard WordPress.
* **SEO Audit Tool:** Perfect for checking if old backlinks are being redirected correctly after a site restructure.
* **Ultra-Lightweight:** Written in clean, optimized PHP. No extra database tables and zero impact on site performance.

= Recommended Plugins =

The following plugins are recommended for users:

* [WP Power Cache](https://wordpress.org/plugins/wp-power-cache/) - A high-performance static page caching engine that generates HTML snapshots of your WordPress site for near-instant loading times.

* [Ultimate Twitter Feeds](https://wordpress.org/plugins/ultimate-twitter-feeds/) - A lightweight plugin to display Twitter feeds. Fetch profiles, lists, or single tweets with customizable size, language and theme.

* [Calculate Page Execution Time](https://wordpress.org/plugins/calculate-page-execution-time/) - Track page execution time easily. Just activate and view page source to see the loading time at the bottom. No configuration needed for WordPress.

* [Facebook Page Feeds Widget](https://wordpress.org/plugins/facebook-pagelike-widget/) - With Facebook Page Feeds Widget, you can display your Facebook Page feeds on your website quickly.


== Features ==

* **Dynamic Detection:** Automatically detects all public post types on your site.
* **Automatic Recording:** Starts tracking Page and CPT slug changes the moment you activate it.
* **Clean UI:** No cluttered settings pages. It integrates natively into the Gutenberg (Block Editor) and Classic Editor sidebars.
* **Developer Friendly:** Uses native `_wp_old_slug` meta keys for maximum compatibility.

== Installation ==

1. Upload the `slugtrace` folder to the `/wp-content/plugins/` directory.
2. Activate the plugin through the 'Plugins' menu in WordPress.
3. Open any editor (Post, Page, or CPT) and look for the "Slug History" box in the sidebar.

== Frequently Asked Questions ==

= Does this plugin create redirects? =
No. WordPress handles the actual redirection. This plugin ensures the history is recorded and makes it visible to you.

= Does it support WooCommerce? =
Yes! It will automatically show slug history for Products and other public custom post types.

= Can I delete old slugs with this? =
This version is "view-only" to keep it safe and lightweight. 

== Screenshots ==

1. The Slug History meta box appearing in the editor sidebar, displaying previous URLs.

== Changelog ==

= 1.0 =
* Initial release with universal slug tracking for Posts, Pages, and other public Custom Post Types.

== Upgrade Notice ==
* Not Applicable.