=== LevelNetwork Advanced Media Library Filters ===
Contributors: sonofgod80
Tags: media library, filters, media filters, wordpress media, advanced filters
Requires at least: 5.4
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.0.7
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Extends the native WordPress Media Library with advanced filtering capabilities (Grid/Modal and List views).

== Description ==

LevelNetwork Advanced Media Library Filters adds powerful, fast, and lightweight filtering options to your WordPress Media Library. It works seamlessly across both the **List View** and the **Grid View / Media Modal**.

=== Core Filters (Always Enabled) ===
* **File Format:** Filter by Images, Documents, Audio, or Videos.
* **Dynamic Sub-formats:** Cascading filters for specific extensions (JPG, PNG, WebP, SVG, GIF, PDF, Word, Excel, MP3, WAV, MP4, WebM).
* **File Size:** Find files quickly by weight (< 100 KB, 100 KB - 500 KB, 500 KB - 1 MB, 1 MB - 2 MB, 2 MB - 5 MB, > 5 MB).

=== Optional Filters (Toggleable via Settings) ===
* **Dimensions & Orientation:** Filter images by aspect ratio (Landscape, Portrait, Square).
* **Usage Status:** Easily identify attached media versus unused/orphaned files to clean up your server.
* **Uploaded By (Author):** Filter media by the specific user who uploaded it.
* **Alt Text Status (SEO):** Instantly find images missing Alternative Text to improve your website's accessibility and Google ranking.

== Installation ==

1. Upload the plugin folder to the `/wp-content/plugins/` directory, or install the plugin directly through the WordPress admin screen.
2. Activate the plugin through the 'Plugins' screen in WordPress.
3. Go to **Settings -> Media Filters** to configure your optional filters.
4. (Optional) Click **Sync Media Data** once to generate metadata for your existing media library.

== Changelog ==

= 1.0.7 =
* **Database Optimization:** Replaced slow `NOT EXISTS` and empty string database operations for the Alt Text filter with a high-performance indexed flag (`_levelnetwork_mlf_has_alt`). Drastically improves response times on Enterprise websites with large media libraries (50k+ items).
* **UX Fix:** Optimized the "Reset Filters" action in Grid View. Combined multiple sequential Backbone model updates into a single event loop to prevent duplicate, concurrent AJAX requests to the server.
* **Code Quality & Compliance:** Standardized `uninstall.php` to use native WordPress functions (`delete_post_meta_by_key`), ensuring full synchronization with object caching systems (Redis, Memcached) and complete cleanup of global plugin options upon deletion. Resolved WPCS global variable scoping warnings.

= 1.0.6 =
* Initial release.