=== Auto Update Page Links ===
Contributors: mirfan439
Tags: Gutenberg, Block Editor, Page Links, Slug, Block Theme
Requires at least: 6.0
Tested up to: 6.8
Stable tag: 3.1.0
Requires PHP: 7.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Automatically updates links in Gutenberg blocks, templates, menus, and content when you change a page URL.

== Description ==

When you change a page URL in WordPress, all internal links pointing to that page can break — this plugin fixes that automatically.

<strong>Auto Update Page Links</strong> scans your site’s content, navigation menus, and block templates for outdated URLs and updates them whenever a page slug or permalink changes. It also logs these updates safely in the uploads directory.

## 🔧 Features

<ul>
<li>Automatically replaces old URLs in:
<ul>
<li>Page content</li>
<li>Navigation menus</li>
<li>Block templates</li>
<li>Template parts</li>
</ul>
</li>
<li>Skips the page being edited to avoid recursion</li>
<li>Logs all updates in /uploads/auto-update-page-links/</li>
<li>Safe and lightweight — no database overhead</li>
<li>Works seamlessly with the Block Editor (Gutenberg)</li>
</ul>

## 🛡️ Why use this plugin?

When you change a page’s slug or URL, your internal links can easily break, which hurts SEO and user experience. This plugin ensures everything stays consistent — automatically.

== Installation ==

1. Click “Plugins” > “Add New” in the WordPress admin menu.
2. Search for “Auto Update Page Links”.
3. Click “Install Now”.
4. Click “Activate Plugin”.

Alternatively, you can manually upload the plugin to your wp-content/plugins directory.

== Frequently Asked Questions ==

= <strong>Will it work with posts or custom post types?</strong> =

By default, it only updates pages, but you can easily extend it in the code to support posts or custom post types.

= <strong>Where is the log file saved?</strong> =

Logs are stored safely at:
/wp-content/uploads/auto-update-page-links/auto-update-links.log

= <strong>Can I disable logging?</strong> =

Yes, you can comment out the $this->auplinks_log() calls in the class file if you prefer no logs.

== Changelog ==

= 3.1.0 =
* Move logs to uploads directory via `wp_upload_dir()`
* Replace short prefix with unique `auplinks`
* Use `plugin_dir_path()`/`plugin_dir_url()` and `gmdate()`
* Minor hardening and code cleanup

= 3.0 =
* Full site coverage + logging

= 2.0 =
* Add templates/template parts support

= 1.0 =
* Initial release
