=== TearSnow Site Icon Cleaner ===
Contributors: TearSnow
Donate link: https://tearsnow.com/
Tags: site icon, favicon, media cleanup, cleaner
Requires at least: 6.0
Tested up to: 7.0
Stable tag: trunk
Requires PHP: 7.2
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

TearSnow Site Icon Cleaner is a lightweight WordPress plugin that permanently removes unused site icon attachments from your media library.

== Description ==

TearSnow Site Icon Cleaner is a simple maintenance utility developed by <a href="https://tearsnow.com/">TearSnow</a> for cleaning up unused WordPress Site Icon files.

When changing the Site Icon in WordPress, previous icon files may remain stored as media attachments. Over time, these unused files can accumulate and increase unnecessary media storage usage.

This plugin automatically detects unused Site Icon attachments and permanently deletes them, helping keep your WordPress media library clean.

The plugin works automatically without any settings page, database options, or additional configuration.

= Features =

- Automatically detects unused Site Icon attachments
- Keeps the currently active Site Icon safe
- Permanently deletes unused Site Icon media files
- Automatically cleans old icons when a new Site Icon is selected
- No settings page or configuration required
- Lightweight and does not affect frontend performance

= How It Works =

WordPress stores Site Icons as media attachment posts with the `_wp_attachment_context` metadata value set to `site-icon`.

TearSnow Site Icon Cleaner checks these attachments and removes unused Site Icon files while keeping the currently selected Site Icon.

When a new Site Icon is uploaded or selected, the previous Site Icon attachment is automatically removed.

= Important Notes =

- Deleted Site Icons cannot be restored from the WordPress Media Library because they are permanently deleted.
- Please make sure unused Site Icon files are no longer needed before activation.
- The plugin only removes attachments created for WordPress Site Icons.

== Frequently Asked Questions ==

= What does this plugin do? =

TearSnow Site Icon Cleaner removes unused WordPress Site Icon attachments to prevent unnecessary media files from accumulating.

= Will this delete my current Site Icon? =

No. The currently active Site Icon is excluded from cleanup and will not be deleted.

= Does this plugin require any settings? =

No. The cleanup process runs automatically when the plugin is activated and when a new Site Icon is selected.

= Can deleted icons be restored? =

No. The plugin permanently deletes unused Site Icon attachments instead of moving them to Trash.

== Screenshots ==

1. Plugin activation automatically cleans unused Site Icon attachments.
2. Old Site Icon files are removed from the media library after cleanup.

== Changelog ==

= 1.0.0 =
* Initial release.
* Automatically removes unused Site Icon attachments.
* Protects the currently active Site Icon.
* Adds automatic cleanup when changing Site Icon.

== Upgrade Notice ==

= 1.0.0 =
Initial release.