=== R2 Media Folders ===
Contributors: rise2studio
Tags: media library, folders, media folders, media categories, attachments
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
Stable tag: 1.2.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Organize the WordPress Media Library into nestable folders. A lightweight, dependency-free alternative to FileBird.

== Description ==

R2 Media Folders adds a folder tree to your Media Library so you can organize thousands of files into nestable folders.

* Folder tree sidebar in both grid and list views, with All Files and Unsorted virtual folders and live counts.
* Create, rename, delete and nest folders.
* Drag files (single or multi-select) into folders; bulk move supported.
* Drag folders to reorder and re-nest, with a saved manual order.
* Filter the library by folder — live in the grid, by URL in the list view.
* Folder filter inside the Add Media / block editor media picker.
* Optional per-user private folders.
* One-click FileBird importer (idempotent) — migrate folders and file assignments, then deactivate FileBird.
* Settings: per-user folders, default order, and opt-in delete-on-uninstall.

Folders are stored as a native WordPress taxonomy, so they survive exports and are removed cleanly on uninstall. Your files are never deleted by this plugin.

== Installation ==

1. Upload the `r2-media-folders` folder to `/wp-content/plugins/`.
2. Activate the plugin through the Plugins screen.
3. Open Media → Library and use the folder tree on the left. Configure options under Settings → Media Folders.

== Frequently Asked Questions ==

= Does it move or delete my files? =
No. It only organizes files into folders (a taxonomy assignment). Your media files are never moved on disk or deleted.

= What happens if I delete a folder? =
The files inside it move to Unsorted and any subfolders move up one level. Nothing is lost.

= Is this related to FileBird? =
No. It is an original, independent plugin built by RISE2 Studio. FileBird was only used as a feature reference.

== Changelog ==

= 1.2.0 =
* Added: self-hosted update support — a "Check for updates" link on the Plugins page and integration with Dashboard → Updates, served from plugins.rise2.studio.
* Added: a "Settings" shortcut link on the Plugins page row.
* Changed: renamed the admin menu item under Settings from "Media Folders" to "R2 Media Folders".

= 1.1.1 =
* Fixed: search box magnifier icon no longer overlaps the placeholder text.
* Changed: made the folder taxonomy explicitly non-public (publicly_queryable=false) and added belt-and-suspenders sitemap exclusions (WP core + Yoast). It was already excluded from sitemaps/SEO plugins; this guarantees it stays that way.

= 1.1.0 =
* Added: inline create/rename in the tree (folder field + Cancel/Save, Enter/Esc) instead of a browser prompt.
* Added: folder search box that live-filters the tree by name.
* Added: a first-activation prompt offering to import FileBird folders when FileBird is detected.

= 1.0.4 =
* Security: turned off REST exposure for the media_folder taxonomy (it was enumerable, incl. anonymously, via /wp/v2/media-folder). Hardened reorder() to enforce manage capability and visibility-gated the ?r2mf_folder= filter. All from a pre-production security review.

= 1.0.3 =
* Changed: per-file upload progress (FileBird-style floating panel) — each file shows its own progress bar and status, with a header count, instead of one overall indicator.

= 1.0.2 =
* Added: upload progress indicator, and uploaded files now appear in the current folder immediately (the grid re-queries on upload completion) — no page refresh needed.

= 1.0.1 =
* Fixed: clicking a folder did nothing after opening and closing an image in the grid (wp.media left the grid stuck on the closed attachment view). The sidebar no longer re-parents the media frame, and folder filtering now recovers reliably.
* Fixed: uploading while inside a folder now puts the file in that folder (and shows the normal upload progress), instead of landing in All Files.

= 1.0.0 =
* Initial release: folder tree, nesting, drag-and-drop file moves, bulk move, drag-to-reorder/nest, library + media-modal filtering, per-user folders, settings, clean uninstall.
