=== Tiny Simple Admin Notice Silencer ===
Contributors: myththrazz
Donate link: https://marcindudek.dev/
Tags: email, notifications, admin, updates, comments
Requires at least: 6.1
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Silences the notification emails that WordPress sends to the site administrator, and leaves every other email on your site alone.

== Description ==

WordPress loves telling the site admin what it just did: a plugin auto-updated (or failed to), a user registered, a comment needs moderating, a privacy request was confirmed. On a busy site that is a steady drip of near-identical email, and the messages that actually matter drown in it.

**Tiny Simple Admin Notice Silencer** turns that drip off. Activate it and the admin-facing notifications stop. There is nothing to configure — no settings page, no options, no admin menu. It does one thing and stays out of the way.

### What it silences

* **Automatic updates** — plugin, theme and core auto-update result emails, the "a new WordPress version is available" notice, and the auto-update debug dump.
* **Accounts** — "New User Registration" and "Password Lost and Changed" notices to the admin, plus the site-admin-address-changed notice.
* **Comments** — comment moderation requests, and "new comment on your post" notices when the post author is the admin.
* **Privacy requests** — the admin-facing "a request was confirmed" notice.
* **WP Mail SMTP** — the weekly "Email Summary" digest, if that plugin is installed.

### What it deliberately does NOT touch

* **Recovery Mode** — the email WordPress sends when a fatal error takes your site down is the one notification that must always reach you. It keeps working, untouched.
* **Every user-facing transactional email** — registration emails sent to new users, password-reset links, password- and email-change confirmations sent to the account holder, privacy confirmations sent to the requester, order and form mail from other plugins. All of it still sends.
* **Outgoing mail itself** — there is no global killswitch. `wp_mail()` works exactly as before; nothing is intercepted, diverted or swallowed.

One subtlety worth knowing: notices like "your password was changed" or "a comment was posted on your post" go to the **account holder**, not the site admin. Silencing them globally would strip every member of their account-takeover tripwire — so this plugin suppresses them only when the account holder *is* the admin. Your users keep their security mail; you keep your quiet inbox.

### For developers: six filters

Each group can be switched back on independently, and the admin address list can be extended, from a small plugin or mu-plugin.

**Where you put the `add_filter` matters.** The five group filters are read once, on `plugins_loaded`. A callback registered after that — in a theme's `functions.php`, on `init`, or on `plugins_loaded` at a priority above 10 — is never seen and silently does nothing. Put group opt-outs in an mu-plugin or at a plugin file's top level. (`tsans_admin_addresses` has no such constraint; it is read at the moment each notice is evaluated.)

    // Keep comment notifications flowing to the admin.
    add_filter( 'tsans_disable_comment_emails', '__return_false' );

    // Treat these addresses as "the admin" too, so their own
    // account notices are silenced as well.
    add_filter( 'tsans_admin_addresses', function ( $addresses ) {
        $addresses[] = 'editor@example.com';
        return $addresses;
    } );

* `tsans_disable_update_emails` — the five automatic-update gates (default `true`).
* `tsans_disable_account_emails` — admin-facing account notices (default `true`).
* `tsans_disable_comment_emails` — comment moderation and admin-author notices (default `true`).
* `tsans_disable_privacy_emails` — the privacy-request confirmation to the admin (default `true`).
* `tsans_disable_third_party_emails` — the WP Mail SMTP weekly summary (default `true`).
* `tsans_admin_addresses` — array of addresses treated as "the admin"; default `array( get_option( 'admin_email' ) )`. A single string also works, and the comparison is case-insensitive.

### From the maker of WP Multi Tool

This plugin is built by the same developer behind [WP Multi Tool](https://wpmultitool.com/) — the Swiss Army knife for WordPress developers and site administrators. If you manage multiple WordPress sites, check it out.

== Installation ==

1. Install through the WordPress plugin directory, or upload the `tiny-simple-admin-notice-silencer` folder to `/wp-content/plugins/`.
2. Activate the plugin. That's it — the admin notifications stop immediately. There is nothing to configure.

== Frequently Asked Questions ==

= Will my users still get password-reset emails? =

Yes. Password-reset links, registration emails sent to new users, and every other user-facing transactional email keep sending. The plugin only silences notices addressed to the site administrator.

= Does the Recovery Mode email still work? =

Yes. The notification WordPress sends when a fatal error takes the site down is deliberately left alone — it is the one email that must always reach the admin.

= Will members still get "your password was changed" emails? =

Yes. Core sends those to the account holder, so the plugin suppresses them only when the account holder is the site admin. Every other member keeps them — it is their warning that someone took over the account.

= Can I turn one group of emails back on? =

Yes — each group has a filter, listed in the Description. For example, `add_filter( 'tsans_disable_comment_emails', '__return_false' );` in a small plugin or mu-plugin re-enables comment notifications without touching the rest.

= Does an editor who moderates their own comments lose their notification? =

Yes, and this is the one place the plugin is blunter than it would like to be. WordPress sends the moderation email to the admin **and** to the post author when that author can edit the comment — but the `notify_moderator` filter gates the whole message, not the recipient list, so there is no way to drop only the admin's copy. If members moderate comments on your site, switch the group off with `add_filter( 'tsans_disable_comment_emails', '__return_false' );`. You lose the admin-author scoping with it, so you will also get "new comment on your post" notices again.

= Does it work on Multisite? =

Yes. Activate it per site or network-wide; each site silences its own admin notices against its own admin address.

= Does it collect data, phone home, or show ads? =

No. There is no settings page, no tracking, no outbound requests, no upsell. The plugin is a single file.

== Changelog ==

= 1.0.0 =
* Initial release.

== Upgrade Notice ==

= 1.0.0 =
Initial release.
