=== Notice Vault - Manage & Organize Admin Notices ===
Contributors: abduremon, ismail0071
Tags: admin notices, dashboard, notifications, productivity
Requires at least: 6.4
Tested up to: 7.0
Requires PHP: 7.2
Stable tag: 1.0.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Capture messy admin notices into one clean popup with Notice Vault - hide, manage, and organize admin alerts for a clean, distraction-free site.

== Description ==

= Take Control of Your Dashboard with Notice Vault =
Every WordPress admin knows the feeling: you open your dashboard and it's buried under a pile of plugin notices, update nags, "thanks for installing" banners, and review requests. The important warnings get lost in the noise — and the noise never stops.

**Notice Vault fixes that.** It quietly captures the admin notices that pile up across your dashboard and tucks them into a single, organized popup. Your workspace stays clean, nothing gets lost, and you stay in control of what shows up and when.


= Why you'll love it =
* **Declutter Your Workspace:** Move noisy admin notices out of the dashboard and into a dedicated popup.
* **Improve Productivity:** Focus on your content instead of closing endless alert boxes.
* **Granular Control:** Configure every notice category separately — popup or leave alone.
* **Lightweight & Fast:** Admin-only by design. Zero overhead on the front end.


= Key Features =
* **Capture & Centralize:** Admin notices fired through `admin_notices`, `network_admin_notices`, `user_admin_notices`, and `all_admin_notices` are captured into a single popup.
* **Per-Type Rules:** Configure each of the six notice categories (success, error, warning, info, system, non-standard) to either show in the popup or leave on the dashboard as usual.
* **Admin Bar Counter:** A "Notices" item appears in the WordPress admin bar with a live unread counter and a quick preview of your most recent notices.
* **Three Popup Styles:** Pick between Slide from Right (default), Modal Popup (centered), or Slide from Right (Large) for bigger screen. 
* **Mark as Read & Dismiss:** Mark notices read individually or in bulk, or dismiss them entirely. Read state is per-user, so each admin keeps their own view.
* **Auto-Expire:** Notices older than a configurable number of days (default 30, range 1–365) are removed automatically by a daily cron job.
* **Privacy-First:** All notices are stored locally in your WordPress database. No external services, no tracking, no phone-home.


= Experience a Distraction-Free WordPress Workflow =
Whether you are managing multiple sites or a blogger tired of constant upselling, **Notice Vault** helps you maintain a professional, organized, and distraction-free environment.


= Built to do one job well =
Notice Vault is free and independent, with a single focus: giving you back a calm, distraction-free dashboard — without touching your site's frontend or slowing anything down.


== Privacy Policy ==

**Notice Vault does not:**

* Send any data to external servers
* Use cookies or tracking
* Phone home or share data with third parties

**What Notice Vault stores:** Notice Vault captures the content of admin notices fired by WordPress, your theme, and your other plugins, and stores it locally in your site's database so you can read it later. Because a captured notice can contain whatever text the plugin that produced it included (which may, in some cases, be personal data such as a name, an email address, or an order detail), that content is stored as-is. Nothing is ever sent off your server, and captured notices are automatically deleted after the configured expiration period (30 days by default).




== Installation ==

= Automatic Installation =

1. Log in to your WordPress admin panel
2. Navigate to **Plugins → Add New**
3. Search for "Notice Vault"
4. Click **Install Now**
5. Activate the plugin

= Manual Installation =

1. Download the plugin ZIP file
2. Log in to your WordPress admin panel
3. Navigate to **Plugins → Add New → Upload Plugin**
4. Choose the ZIP file and click **Install Now**
5. Activate the plugin

== Frequently Asked Questions ==

= Does this plugin hide all admin notices? =

No, you have full control. You can configure each notice type separately to either show it in the pop-up (out of the dashboard) or leave it in place.

= Will I miss important notices? =

No! Notices are captured and stored in the pop-up. You'll see a counter in the admin toolbar showing how many unread notices you have.

= Does this work with multisite? =

Notice Vault runs per-site on a multisite network — activate it on each subsite you want to manage. Network-wide automatic activation and shared notice storage across the network are not supported in 1.0.0.

= Will this slow down my site? =

No! The plugin uses lazy loading, transient caching, and minimal database queries. It has zero impact on frontend performance.

= Can I customize the pop-up appearance? =

Yes! You can choose from 3 popup styles: Slide from Right, Modal Popup, or Slide from Right (Large).

= How long are notices stored? =

By default, notices are automatically deleted after 30 days. You can customize this in the settings.

= Is this plugin translation-ready? =

Yes! Notice Vault is fully translation-ready with a .pot file included.

= What happens immediately after I activate the plugin? =

By default, most captured notice categories (success, warning, info, system, non-standard) are set to **"Show in popup"**, while **Error** notices are left on the dashboard so critical alerts are never hidden. The moment the plugin is active, the popup-enabled notices from every plugin and theme move out of your dashboard into the Notices popup instead of appearing inline. You can change this per category at **Notice Vault → Settings** — choose **"Show in popup"** to capture a category, or **"Do nothing"** to let it render on the dashboard as it normally would.


== Screenshots ==

1. Notice Type panel
2. Pop-up & Auto Expires panel


== Changelog ==

= 1.0.4 - 2026-06-29 =
* New: GDPR personal-data exporter and eraser so captured notices are covered by WordPress's privacy export/erase tools.
* Fix: Error notices are no longer hidden by default — error-type notices now stay on the dashboard instead of being routed into the popup. Warning notices default to the popup on a fresh install, and upgrades keep your existing warning rule untouched.
* Fix: A captured notice's own dismiss button is stripped from the popup so it can't break out of the vault layout.
* Fix: Restored the background blur behind the popup and clipped the popup to its rounded corners (no more square corners on the modal variant).
* Fix: Slide Panel variant no longer overlaps the mobile admin bar or leaves a bottom gap.
* Change: Renamed the "Panel" popup style to "Slide from Right (Large)" and widened the desktop Modal and Slide Panel layouts.
* Change: The popup and toolbar are now admin-only (`manage_options`).
* Change: Captured notices are de-duplicated on a normalized text signature, with timestamps stored in UTC.
* Performance: Settings page counts notices with `COUNT(*)` instead of loading every row; the transient sweep is skipped when a persistent object cache is active; the re-hash migration is bounded to avoid a long synchronous loop on large vaults.
* Security: Hardened bulk operations and AJAX capability checks, forced stored notices to the current user, and guarded against popping another plugin's output buffer during capture.
* Dev: Removed the bundled Select2 library and the disabled User Visibility code.

= 1.0.3 - 2026-06-08 =
* New: Full UI/UX redesign — card-based settings layout with brand logo hero, indigo accent, segmented controls for per-type rules, visual popup-style picker with mini previews, sticky save bar with dirty-form detection, side rail with stats + how-it-works.
* New: Popup refresh — slimmer header, state tabs (Unread/All), wrap-style filter chips, redesigned notice cards with type-colored edge + hover lift, custom SVG empty-state, skeleton loading, toasts with colored stripe + progress bar, confirm modal with backdrop blur.
* Fix: Saving settings no longer renders the "Settings saved." notice twice.
* Fix: Admin-bar count badge correctly hides on count = 0 (the previous `!important` chain defeated jQuery `.hide()`); badge inner text also resets to "0" for screen-reader parity.
* Fix: Filter chips in the popup wrap to multiple rows instead of horizontally overflowing the popup edge.
* Fix: Removed redundant jQuery `.focus()` shorthand that triggered a JQMIGRATE deprecation warning.
* Asset: Brand logo now sits beside "Notice Vault" in the settings hero (56×56) and beside the "Notices" title in the popup header (22×22), replacing the generic dashicon-bell.
* Author URI: Changed from GitHub profile to https://profiles.wordpress.org/abduremon/.
* i18n: POT regenerated to match the redesigned strings.

= 1.0.2 - 2026-05-24 =
* Fix: Sync NOTICE_VAULT_VERSION constant with plugin version


= 1.0.1 - 2026-05-24 =
* Fix: Updated minimum WordPress version requirement to 6.4


= 1.0.0 - 2026-05-22 =
* Initial release.
* Notice capture system covering `admin_notices`, `network_admin_notices`, `user_admin_notices`, and `all_admin_notices`.
* Admin toolbar counter with quick-preview submenu.
* Popup interface with three display styles (Slide from Right, Modal, Slide Background Panel).
* Settings page with per-type rules and a configurable auto-expire window.
* "Load more" pagination in the popup for users with large notice lists.
* Captured notice content preserves clickable links and basic formatting through a strict server-side `wp_kses` allowlist (`<a>`, `<strong>`, `<em>`, `<code>`, lists, …); scripts, iframes, and inline event handlers always stripped.
* System notices (`update-nag`, `update-message`, …) are detected before generic `notice-*` severity classes so they reliably route to the System bucket.
* Filterable popup type dropdown — custom buckets registered via the `notice_vault_notice_types` filter appear here too.
* Multisite uninstall iterates every blog and drops its per-blog notices table.
* Daily cleanup cron sweeps per-user unread-count transients when anything actually expires, so the admin-bar badge can't show a stale count past expiry.
* Long URLs inside notice content wrap instead of overflowing the popup.
* Confirm modal is localized and specific to the clear-all action.
* AJAX errors (mark-as-read / dismiss / mark-all-read / clear-all) surface a toast on failure instead of silently doing nothing.


== Upgrade Notice ==

= 1.0.4 =
Fixes error notices being hidden by default, adds GDPR export/erase support, and hardens capture, performance, and security. Safe drop-in — your existing notice rules are preserved on upgrade.

= 1.0.3 =
Major UI/UX redesign with a card-based settings layout, refreshed popup, and a brand logo update. Safe drop-in — a one-shot migration runs on first admin load; no manual action required.

= 1.0.2 =
Maintenance release — syncs the internal version constant with the plugin header. Safe drop-in.

= 1.0.1 =
Maintenance release — minimum WordPress version bumped to 6.4. Update WordPress first if you're still on an older release.

= 1.0.0 =
Initial release.
