=== LevelNetwork Advanced Media Library Filters ===
Contributors: sonofgod80
Donate link: https://www.paypal.com/donate?hosted_button_id=U4J5DYNJ4ZBEQ
Tags: media library, media filters, media search, admin
Requires at least: 5.0
Tested up to: 6.9
Stable tag: 1.0.6
Requires PHP: 7.2
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 Media Library Filters extends the native WordPress Media Library (both List View and Grid/Modal View) with advanced filtering capabilities to help you find and manage media assets quickly.

Features:
* File Format/Extension Filter (Core): Quickly group images, documents, audio, and videos.
* Sub-Format Cascading Filters (Core): Drill down into specific file types (e.g., filter only PNG, SVG, PDF, or MP4) dynamically based on the selected format.
* File Size Filter (Core): Filter by size (<100KB, 100KB-500KB, 500KB-1MB, 1MB-2MB, 2MB-5MB, >5MB).
* Image Dimensions & Orientation (Optional): Filter images by aspect ratio (Landscape, Portrait, Square).
* Usage Status / Orphaned Media (Optional): Identify media attached to posts vs unused media.
* Uploaded By / Author (Optional): Filter media by the uploading user.
* Alt Text Status (Optional): Find images missing Alt Text for SEO and accessibility improvements.

== Installation ==

1. Upload the `levelnetwork-advanced-media-filters` folder to the `/wp-content/plugins/` directory.
2. Activate the plugin through the 'Plugins' menu in WordPress.
3. Go to Settings -> Media Filters to configure the optional features.
4. **Important**: Remember to run the "Sync Media Data" tool from the plugin settings page to generate size and orientation metadata for files you uploaded *before* installing this plugin.

== Changelog ==

= 1.0.6 =
* New Feature: Added dynamic sub-format cascading filters. When selecting a primary format (e.g., Images or Documents), a secondary dropdown appears to filter by specific file types (JPG, PNG, WebP, GIF, SVG, PDF, Word, Excel, MP4, WebM, MP3, WAV).
* Enhancement: Sub-format filters are fully supported and synchronized in both Grid/Modal View (AJAX) and standard List View.
* Bug Fix: Fixed a PHPCS security warning (`OutputNotEscaped`) by correctly implementing the native WordPress `disabled()` function for HTML attributes.
* Bug Fix: Cleaned up the plugin package by removing hidden macOS system files (`.DS_Store`) to strictly meet WordPress repository packaging guidelines.

= 1.0.5 =
* Security improvements: Ensured thorough sanitization, escaping and unslashing of superglobals across the codebase.
* Filter queries improvements: Properly merged meta_query to prevent overwriting existing queries.

= 1.0.4 =
* Added sizes > 2 MB and > 5 MB to the size filter.

= 1.0.3 =
* Repositioned "Bulk Select" (Selezione Multipla) to properly stay at the end of the filters.

= 1.0.2 =
* Added Audio, Excel and TXT options to the Format Filter.
* Restructured Media Library toolbar to group all dropdowns sequentially, ensuring the "Bulk Select" button always appears last.
* Hid the redundant native WordPress media types filter when the plugin is active to prevent duplication.
* Emphasized and redesigned the "Sync Existing Media" notice in the backend to ensure users don't miss running it.

= 1.0.1 =
* Fixed size and dimensions filters for previously uploaded media. Implemented a "Sync Media Data" tool on the settings page to process existing attachments.
* Added a convenient "Settings" link in the Plugins page.

= 1.0.0 =
* Initial release.

== Screenshots ==

1. Main Media Library dashboard displaying the new advanced filter dropdowns in action.
2. File format extension filters and file size range selection.
3. Advanced image orientation options (Landscape, Portrait, Square) and Alt Text status filters.
4. Plugin settings page featuring the "Sync Media Data" tool for legacy media files.