=== OrbitStem Media Rename ===
Contributors: pratik2198
Tags: media, rename, attachment, seo, url
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 8.0
Stable tag: 1.5.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Safely rename media files with impact preview, site-wide URL updates, verification, and rollback.

== Description ==

OrbitStem Media Rename helps you rename files in the WordPress Media Library without breaking your site.

Before you rename, you see an impact report showing where the file is used. After you rename, the plugin can update old file URLs across posts, custom fields, widgets, and site options — including data stored by page builders and block editors.

**Features**

* Stem Rename panel in the Media Library and attachment edit screen
* Impact report with usage locations and risk level
* File tree preview (main file, thumbnails, WebP/AVIF siblings)
* SEO filename score with tips as you type
* Site-wide URL replacement in posts, post meta, options, term meta, and user meta
* Support for JSON-escaped, serialized, and HTML-encoded URLs
* Post-rename verification scan
* One-click rollback of the last rename
* Quick-fill suggestions from title, alt text, or parent post

**Privacy**

This plugin does not contact external servers, track users, or collect personal data. All processing runs on your WordPress site.

**Permissions**

By default, only users with the `manage_options` capability can rename files. Use the `orbitstem_rename_capability` filter to change this.

== Installation ==

1. Upload the `orbitstem-media-rename` folder to `/wp-content/plugins/`
2. Activate the plugin through the **Plugins** menu in WordPress
3. Open **Media → Library**, select a file, and use the **Stem Rename** panel

== Frequently Asked Questions ==

= Who can rename media files? =

Administrators by default. Developers can change the required capability with the `orbitstem_rename_capability` filter.

= Will renaming update URLs on my pages? =

Yes, when **Update URLs everywhere on this site** is checked. The plugin searches posts, custom fields, and options for old file URLs and replaces them.

= Can I undo a rename? =

Yes. Use **Undo last rename** on the same attachment to restore the previous filename and optionally reverse URL updates.

= Does this work with page builders? =

Yes. URL updates run across all post meta and serialized or JSON-encoded builder data, not just post content.

== Screenshots ==

1. Stem Rename panel in the Media Library with impact preview and file tree.
2. SEO filename score and quick-fill suggestions.
3. Post-rename verification results.

== Changelog ==

= 1.5.1 =
* Fix media rename panel breaking on Windows after the first rename (path slash mismatch).
* Store relative upload paths and auto-repair broken attachment meta when possible.

= 1.5.0 =
* Rebrand to **OrbitStem Media Rename** (slug `orbitstem-media-rename`).

= 1.4.0 =
* Rebrand: plugin name **OrbitStem Media Rename**, slug `orbitstem-media-rename`, prefix `orbitstem_` / `orbitstem_`.
* Author: Pratik Prajapati (personal submission).

= 1.3.1 =
* Remove duplicate Plugin URI header (WordPress.org requires Plugin URI and Author URI to differ).

= 1.3.0 =
* WordPress.org submission readiness: text domain, readme, security, and uninstall cleanup.
* Unique plugin slug `orbitstem-media-rename`.

= 1.2.0 =
* Site-wide URL sync for all editors and storage locations.
* Impact report, rollback, verification, and WebP/AVIF sibling renames.

= 1.0.0 =
* Initial release.

== Upgrade Notice ==

= 1.5.1 =
Fixes Windows path handling after renaming media files.

= 1.5.0 =
Official OrbitStem Media Rename release for WordPress.org.

= 1.4.0 =
Previous development release.

= 1.3.1 =
Fixes plugin header validation for WordPress.org submission.

= 1.3.0 =
