=== DWD Utilities ===
Contributors: dizwebdesign
Tags: utilities, admin, tools
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
Stable tag: 0.2.48
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Adds special-purpose functions and tools for your WordPress site from one admin dashboard.

== Description ==

Utilities provides a starter hub for site-specific helpers: an admin **Utilities** menu with **Dashboard**, **Tools** (backup/restore, WordPress maintenance mode, Ad Blocker Retaliation, About Appleseed News, and **Board ballots** for director voting), **Settings** (database upgrade, page sync, debug, and site page options), a configurable default front-end page driven by the `[util_front_page]` shortcode, a **Login / Register** Gutenberg block (`utilities/login-register`) for the synced sign-in page, optional role-gated HTML shortcodes for Custom HTML blocks, and a `[util_director_ballots]` portal with modal voting via the REST API.

== Installation ==

1. Upload the `utilities` folder to `/wp-content/plugins/` or install the zip from Plugins → Add New → Upload.
2. Activate the plugin through the **Plugins** menu.
3. Open **Utilities** in the admin menu. Use **Settings → Run update & sync pages** after changing site page title or slug, or after editing the **Custom sign-in page** title or slug.

== Changelog ==

= 0.2.48 =
* Security: ignore unsigned remote wipe banned/blocked; wipe only via verified signed commands.

= 0.2.47 =
* **Tool cards:** Settings also on the main Utilities Tools screen (visible under DWD Plugins Hub).

= 0.2.46 =
* **Tool cards:** Block + Settings to show/hide Registry, Court records, and Open records tiles on a schedule.

= 0.2.45 =
* **Login / Register block:** Border panel uses the same support key as Group blocks (`__experimentalBorder`) so it shows in Styles.

= 0.2.44 =
* **Login / Register block:** Fix missing Border controls in the block Styles sidebar.

= 0.2.43 =
* **Login / Register block:** Full design controls in the block editor (colors, typography, border, shadow, dimensions, spacing, alignment).

= 0.2.42 =
* **Login / Register block:** Border, color, and typography controls in the block editor.

= 0.2.41 =
* **Login / Register:** Removed default logo, site name, and subtitle; form uses a transparent background.

= 0.2.40 =
* **Login / Register:** Logged-in state shows avatar, My account, and Log out instead of a Continue button.

= 0.2.39 =
* **Login / Register block:** Gutenberg block `utilities/login-register` with Sign in and Create account (when Anyone can register is enabled). Synced sign-in page uses the block; `[util_custom_login]` remains for compatibility.

= 0.2.35 =
* **Fix:** Custom sign-in page — Sign in / Continue buttons use high-contrast maroon styling so labels stay readable on front-end themes; form fields no longer use bare paragraphs that Advanced Ads content placements split; Advanced Ads display/injection disabled on the branded login page.

= 0.2.32 =
* **Fix:** Board ballots CPT no longer uses `map_meta_cap` with capabilities mapped to `manage_options`. That combination hijacked every `manage_options` check site-wide (including WordPress **Settings**), causing “Sorry, you are not allowed to access this page.”

= 0.2.31 =
* **Fix:** Admin menus always register under a valid top-level parent (`dwd-plugins` or `utilities-dashboard`). Routed hub screens are hidden from the fly-out after registration. Board ballots no longer use `show_in_menu => utilities-tools` (that slug is not a top-level parent), which could corrupt the wp-admin menu tree and hide WordPress **Settings**.

= 0.2.30 =
* **Fix:** With DWD Plugins Hub active, Utilities no longer registers nested admin submenus under `utilities-dashboard` (a fly-out slug, not a top-level parent). That invalid parent caused WordPress to create phantom top-level menus and could hide the core **Settings** item in wp-admin.

= 0.2.29 =
* **Fix:** Dashboard/Tools critical error — added missing `Util_Pages::needs_repair()` used by the maintenance sync section.
* **Fix:** Corrected invalid `</motion>` closing tags in admin maintenance markup.

= 0.2.28 =
* **Maintenance & log:** Update/sync table and **UPDATE** button restored on **Tools** (and Settings), matching SocialAutoShare layout — important when DWD Plugins Hub opens Utilities on Tools.

= 0.2.27 =
* **Recorded version:** `util_installed_version` updates only on activation and **Settings → Run update & sync** (not on silent file upload), so the Plugins Hub can show “update ready” until sync runs.

= 0.2.26 =
* **DWD Plugins hub:** Fly-out **Utilities** opens the **Tools** screen again (backup, maintenance, Ad Blocker Retaliation, etc.), not the overview Dashboard added in 0.2.22. About-page admin labels use your Settings title (not hardcoded “About Appleseed News”).
* **Requires DWD Plugins Hub 1.3.30+** (or hub file with Utilities bridge → Tools) for correct fly-out behavior.

= 0.2.25 =
* **Branding:** Plugin name is **DWD Utilities** (matches other DWD products). Hub fly-out label stays **Utilities**; standalone admin menu uses the full name.

= 0.2.22 =
* **Dashboard:** New **Front-end pages** card with links (new tab) to the site homepage, synced Utilities page, custom sign-in page, and About Appleseed News page, plus path hints; shows “not synced yet” when a page ID is missing.

= 0.2.21 =
* **Board ballots:** CPT under **Utilities → Tools**; `util_cast_board_vote` for the **Additional role slug** role (default `director`) and administrators; votes table; REST `utilities/v1/ballots`; `[util_director_ballots]` shortcode with `<dialog>` modal UI; directors without `edit_posts` are redirected away from wp-admin (profile.php still allowed). Privacy export/erase for vote rows. DB v12.

= 0.2.20 =
* **About Appleseed News:** Synced page + bundled default HTML (body preserved on sync); Tools screen for visibility, reseed, shortcode help; `[util_role_content]` shortcode; page gate; Settings title/slug; `docs/SHORTCODES.md`. DB v11.

= 0.2.19 =
* **Staff notes:** `[appleseed_staff]` shortcode (Appleseed-style) for staff-only HTML in Custom HTML blocks; Settings form fields + DB v10. Remove legacy `mu-plugins/appleseed-staff-notes.php` if you used it.

= 0.2.18 =
* **Tools → Maintenance mode:** Pill **ON/OFF** control is a CSS-only toggle (no images); meets ~44px touch height; keyboard focus ring on the track.

= 0.2.17 =
* **Maintenance mode:** Optional **Maintenance page** (published page dropdown on Tools). Visitors are redirected there (default HTTP 307, filter `util_maintenance_redirect_status`); the page responds with **503** while maintenance is on. Default message when no page is selected. Option `util_maintenance_page_id`; DB v9.

= 0.2.16 =
* **Maintenance mode:** Uses option `util_maintenance_active` plus `template_redirect` so **administrators** (`manage_options`, and super admins on multisite) can still use the **public site** while guests see maintenance. Skips the same infrastructure paths as Ad Blocker Retaliation (REST, AJAX, cron, login, customizer, custom sign-in page). Turning maintenance **off** attempts to remove a legacy `.maintenance` file from older Utilities versions. DB v8.

= 0.2.15 =
* **Tools:** WordPress maintenance mode lives on the Tools page with a checkbox and **Maintenance mode (ON)** / **(OFF)** heading; removed the separate Maintenance mode submenu.

= 0.2.14 =
* **Tools → Maintenance mode:** Turn WordPress core maintenance on or off (`.maintenance` in the site root), same mechanism as updates.

= 0.2.13 =
* Settings: show last recorded vs plugin header version before Run update & sync; success notice shows old → new when applicable.
* Ad Blocker Retaliation: show Utilities plugin version in the Status card.

= 0.2.12 =
* Ad Blocker Retaliation: Footer hook self-test in the Status sidebar (nonce link + HTML comments in page source).

= 0.2.11 =
* **Ad Blocker Retaliation:** Optional network fetch probe (allowlisted HTTPS ad-script hosts); option `util_abr_network_probe`; DB v7; filters for URLs, hosts, timeout.

= 0.2.10 =
* **Ad Blocker Retaliation:** Broader cosmetic bait (extra static + dynamic probes), docs for AdGuard, Ghostery, Privacy Badger, Brave, AdLock, Stands, Surfshark, AdBlocker Ultimate, NordVPN TP, etc.; admin note on future optional network probes.

= 0.2.9 =
* **Ad Blocker Retaliation:** Improved ad-block cookie detection (uBlock Origin, AdBlock Plus): extra baits, deferred checks after cosmetic filters run, dynamic bait, treat missing/hidden elements as blocked.

= 0.2.8 =
* **Ad Blocker Retaliation:** In **Only when an ad blocker is detected** mode, guests and logged-in users without an allowed role get a full-page access wall (blur) instead of a login redirect or bare `wp_die`: copy explains the site cannot be used until the ad blocker is turned off for this domain, then reload; funding line (ads, sponsors, donors); optional sign-in and donate links. New script `util-abr-access-wall.js`; filters `util_abr_access_wall_headline`, `util_abr_access_wall_intro`, `util_abr_access_wall_funding`.

= 0.2.7 =
* **Ad Blocker Retaliation:** Statistics — aggregate ad-block bait detections and gate enforcements by browser family (User-Agent); AJAX beacon `util_abr_stats`; admin reset; option `util_abr_stats`; DB v6.

= 0.2.6 =
* **Ad Blocker Retaliation:** Optional mode **Only when an ad blocker is detected** — anonymous users can browse without logging in; a footer script sets cookie `utilities_abr_signal` (`none` or `adblock`). Gate (sign-in, allowed roles, donation overlay) runs only when the cookie is `adblock`. Option `util_abr_enforce_scope`; migration v5 defaults existing enabled sites to **All visitors**, others to ad-block mode.

= 0.2.5 =
* **Admin menu:** Top-level items are **Dashboard**, **Tools**, and **Settings**. Upgrade/sync and debug moved under **Settings**; **Ad Blocker Retaliation** and **Backup & restore** are under **Tools**. Parent menu slug is `utilities-dashboard`.

= 0.2.4 =
* **Ad Blocker Retaliation:** Donation modal includes an explicit “Click here to donate” link.

= 0.2.3 =
* **Ad Blocker Retaliation:** Donation modal headline updated; headline and page title link to the configured donation page when set.

= 0.2.2 =
* **Ad Blocker Retaliation:** logged-in users without an allowed role see a donation notice modal with blurred page behind it; admin sets **Donation page** and can turn the overlay off for a plain access denied screen. RSS feeds still use access denied without HTML overlay. DB schema v4.

= 0.2.1 =
* **Custom sign-in page:** synced page with `[util_custom_login]` — site name, theme custom logo (or site icon), and secure `wp_signon` form. **Ad Blocker Retaliation** sends guests here instead of `wp-login.php`. Sign-in title/slug under **Utilities → Settings**. DB schema v3.

= 0.2.0 =
* **Ad Blocker Retaliation:** optional front-end gate — logged-in users must have at least one allowed WordPress role; guests redirected to login. Skips wp-admin, wp-login.php, REST, AJAX, cron, CLI, customizer preview. Settings under **Utilities → Ad Blocker Retaliation**; options included in JSON backup.

= 0.1.0 =
* Initial release from workspace Base Pluggin template: dashboard, tools, backup/restore, front page sync, admin debug (`?util_debug=1` or `?plugin_debug=1`).
