=== Media Folder Manager ===
Contributors: lytechxdigital
Tags: media, folders, organization, media library, file manager
Requires at least: 5.8
Tested up to: 6.9
Stable tag: 1.0.3
Requires PHP: 7.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Organize media files into virtual folders with a modern, folder-based media manager for WordPress Media Library.

== Description ==

Media Folder Manager is a powerful WordPress plugin that adds a virtual folder system to the WordPress Media Library. Organize your media files into unlimited nested folders without physically moving files on your server.

= Key Features =

* **Virtual Folders**: Create unlimited nested folders stored in the database
* **Left Sidebar**: Modern folder tree view in Media Library with instant filtering
* **Drag & Drop Ready**: Architecture supports drag & drop media between folders
* **Grid & List View**: Fully compatible with WordPress default grid and list views
* **Attachment Details**: Assign folders directly from attachment edit panel
* **Bulk Operations**: Assign multiple media files to folders at once
* **Upload Integration**: Select folder during media upload
* **Modern UI**: React-based interface using WordPress components
* **No jQuery**: Built with modern JavaScript (React, wp.element)
* **Performance**: Optimized queries for large media libraries
* **Security**: Proper nonce verification and capability checks

= How It Works =

1. **Activate the Plugin**: Once activated, a left sidebar appears in Media Library
2. **Create Folders**: Click "Create Folder" to add new folders
3. **Organize Media**: Assign media to folders via:
   - Sidebar folder selection
   - Attachment details panel
   - Bulk selection
   - Upload modal
4. **Filter Media**: Click any folder in the sidebar to filter media instantly
5. **Nested Folders**: Create subfolders by selecting a parent folder when creating

= Virtual Folders =

Folders are stored in the database, not as physical directories. This means:
* No file system changes
* Fast performance
* Easy to reorganize
* Safe to use on any hosting environment

= Settings =

Configure the plugin from **Settings → Media Folder Manager**:
* Enable/disable folder system
* Reset all folders (moves all media back to "All Files")

== Installation ==

= Automatic Installation =

1. Log in to your WordPress admin panel
2. Navigate to Plugins → Add New
3. Search for "Media Folder Manager"
4. Click "Install Now" and then "Activate"

= Manual Installation =

1. Download the plugin zip file
2. Extract it to your `/wp-content/plugins/` directory
3. Rename the folder to `media-folder-manager`
4. Log in to your WordPress admin panel
5. Navigate to Plugins and activate "Media Folder Manager"

= After Installation =

1. Go to **Media Library** to see the new folder sidebar
2. Click **Create Folder** to start organizing your media
3. Assign media to folders by selecting them and using the folder dropdown

== Frequently Asked Questions ==

= Does this move files on the server? =

No, folders are virtual and stored in the database. No physical files are moved.

= Can I create nested folders? =

Yes, you can create unlimited levels of nested folders.

= Will this slow down my site? =

No, the plugin is optimized for performance with efficient database queries.

= Can I assign one media file to multiple folders? =

Currently, each media file belongs to one folder only. This keeps the system simple and fast.

= Does this work with Gutenberg? =

Yes, the plugin is fully compatible with Gutenberg and Full Site Editing.

= What happens if I delete a folder? =

Media files in the deleted folder are moved to the parent folder (or "All Files" if it was a root folder).

= Is this plugin translation ready? =

Yes, the plugin is fully prepared for translations. The text domain is `media-folder-manager`.

== Screenshots ==

1. Media Library with folder sidebar
2. Creating a new folder
3. Folder tree with nested folders
4. Assigning media to folder in attachment details
5. Settings page

== Changelog ==

= 1.0.3 =
* Fixed media upload compatibility issues caused by drag overlay handling.
* Improved drag-and-drop reliability for moving media into folders.
* Added dynamic folder-aware media summary and load-more behavior.
* Improved nested folder creation flow with automatic parent assignment.

= 1.0.2 =
* Fixed fatal error by making AJAX loader class initialization backward compatible.
* Improved request handling and validation for bulk media/folder AJAX operations.
* Minor stability updates for first public release cycle.

= 1.0.0 =
* Initial release
* Virtual folder system with database storage
* Left sidebar with folder tree view
* React-based modern UI
* Folder CRUD operations (create, rename, delete)
* Media assignment to folders
* Bulk media assignment
* Attachment details integration
* Upload modal integration
* Settings page
* Translation ready

== Upgrade Notice ==

= 1.0.3 =
Includes major media library UX fixes for upload, drag-and-drop, and folder pagination display.

= 1.0.2 =
Includes fatal error fix and AJAX stability improvements.

= 1.0.0 =
Initial release of Media Folder Manager. Install and activate to start organizing your media files into folders.

== Development ==

= Contributing =

Contributions are welcome! Please follow WordPress Coding Standards and submit pull requests via GitHub.

= Reporting Issues =

Please report bugs and feature requests on the WordPress.org support forums or GitHub issues page.

== Credits ==

Built with WordPress best practices and modern web technologies (React, wp.element, wp.components).

