=== Renamly ===
Contributors: samstewart
Tags: media, rename, seo, woocommerce, images, ai
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
Stable tag: 1.1.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Rename media to clean, SEO-friendly names (product, title, numbered, anonymized or AI), sync metadata, and attach media to matching WooCommerce products.

== Description ==

Renamly keeps your media library tidy and SEO-friendly:

* **Naming strategies** — product name (+ SKU), attachment title, numbered, anonymized, AI vision, or a cascade that chains them with fallback.
* **AI vision naming** — optional; bring your own Anthropic or OpenAI key. Off until configured.
* **Full reference updates** — when a file is renamed, the main file and every thumbnail size are renamed and URL references across post content and post meta are rewritten (http, https, protocol-relative).
* **Metadata sync** — optionally update Title, ALT, Caption, and Description after a rename.
* **Lock system & status** — lock files against changes; track Pending / Renamed / Locked; auto-lock after rename.
* **Undo & logging** — every rename is logged to a dedicated table; undo restores the previous name and reverses reference changes.
* **Redirects** — optional 301s from old file URLs to new ones (fires when a request reaches WordPress).
* **Automation** — auto-rename on upload and when a product's title changes.
* **Bulk mode** — batched processing over large libraries without timeouts.
* **WooCommerce matching** — attach images to products by SKU-in-filename or slug; set as featured image or add to the gallery.
* **WP-CLI** — `wp renamly rename` and `wp renamly attach`.
* **Developer-friendly** — `renamly_after_rename` action lets page-builder parsers update their stored references.

This is an original plugin. It is not a fork or copy of any commercial product; it reimplements common, unprotectable media-management functionality from scratch.

== Frequently Asked Questions ==

= Is WooCommerce required? =
No — renaming, metadata sync, undo and logging work without it. Product matching/attaching require WooCommerce.

= Is it reversible? =
Yes, via the Undo button (backed by the rename log). Always back up before bulk operations on production.

= Does AI naming cost anything? =
It calls your own AI provider with your own key, so usage is billed by that provider. It is disabled until you add a key.

== Changelog ==

= 1.1.0 =
* Naming strategies (product, title, numbered, anonymize, AI, cascade), AI vision, metadata sync, lock/status, undo + SQL logging, redirects, auto-rename automation, bulk mode, WP-CLI, transliteration.

= 1.0.0 =
* Initial release: SEO renaming with reference updates, and WooCommerce product matching/attaching.
