# Changelog

All notable changes to this project are documented here. Format loosely
follows [Keep a Changelog](https://keepachangelog.com/), versioning follows
[SemVer](https://semver.org/).

## [2.2.1] - 2026-11-30

### Changed

- Minimum PHP lowered from 8.2 to 7.2 (WordPress 6.6's own minimum is
  7.2.24). PHP 7.3-8.1 syntax rewritten to 7.2 equivalents: named
  arguments to `Field`, `Doc` and `CleanupTask` became positional,
  constructor promotion and `readonly` became plain properties, typed
  properties, union and `mixed` types moved to docblocks, arrow functions
  became closures, trailing commas in calls and parameter lists, `??=`
  and `array_key_first()` removed. No behaviour changes: a snapshot of
  all 573 settings fields (defaults, args, docs, order and sanitizer
  output), 172 sections, 31 tabs and 12 cleanup tasks is identical before
  and after.
- New `Admin\Settings\Sort::by_priority()`: a stable priority sort for
  tabs, sections, fields, mirrors, Tools tabs and License products. PHP
  sorts are only stable from 8.0, so on PHP 7 items with equal priority
  would otherwise change order between page loads.
- `phpcs.xml.dist` testVersion and `composer.json` require php: 7.2.
- WordPress.org tags: utilities, username updater, woocommerce
  utilities, wordpress username updater (RepoEvo search-rank
  suggestions) and admin utilities (#38 in search).

## [2.2.0] - 2026-11-23

### Added (Random Content)

- New module `Modules\RandomContent` (Settings → Performance → Random
  Content), equivalent to the Disable Random Content plugin, written from
  WordPress 7.2's documented `wp_enable_random_content_redirect` filter
  and `random` query var.
- Off with nothing kept: the filter returns false, so core adds no
  /random/ rules and ignores `random`. The filter is hooked from the main
  file at load time and reads the option directly.
- "Keep random links for" (taxonomy and post type archives) and "Only
  these terms" (slugs): core stays on and the `request` filter removes
  `random` elsewhere. A /random/… path that isn't kept is a 404; ?random
  on a normal page is dropped. The site-wide /random/, searches, dates
  and author archives (which would reveal usernames) are never kept.
- Saving a change to the section, or deactivating the plugin with it on,
  deletes `rewrite_rules`, so WordPress rebuilds them on the next request.
- `tests/random-content-test.php` (WP-CLI, not shipped).

## [2.1.1] - 2026-11-17

### Fixed (Country States)

- "Make the state required" no longer overrides a state field WooCommerce
  deliberately shows as optional (its locale has `required: false` and no
  `hidden`), e.g. the UK's County. Hidden fields are still shown for the
  filled countries, and "required" off still makes them optional.
- `states-data.php`: removed duplicate names (BS14, BS20, BS27, BS39,
  LU10, MG10, MH32, VN60, VN62, RU57–RU68, RU79), fixed RU82 ("Sverd" →
  "Sverdlovsk Oblast") and added RU83–RU96, so Russia has 83 entries.
- Added Kosovo (`XK01`–`XK07`), which WooCommerce lists without states.
- `tests/country-states-test.php` (WP-CLI, not shipped) checks for
  duplicate names, that Croatia, Morocco and St Kitts & Nevis keep
  WooCommerce's lists, the UK County staying optional, the WooCommerce
  tab being hidden without WooCommerce, and the Woo Add-on's mirrored
  switches writing `aiou_settings_woocommerce`.

### Added (WooCommerce compatibility)

- Declares compatibility with HPOS (`custom_order_tables`) and the Cart
  and Checkout blocks (`cart_checkout_blocks`) on `before_woocommerce_init`,
  guarded so Free still runs without WooCommerce. `WC tested up to: 11.3`.

### Changed (settings mirrors)

- `SettingsRegistry::add_mirror()` takes an optional heading (default
  "Related emails").
- A mirrored checkbox posts an explicit "off", so it can be switched off
  from the mirror, not only on.
- A mirrored field's `depends_on` works when its controller is mirrored
  in the same section.
- The mirror note links to the source tab's own screen (Free's Settings
  when mirrored onto an add-on page).

## [2.1.0] - 2026-11-10

### Fixed (SVG uploads without mbstring)

- SVG Uploads decoded CSS escapes with `mb_chr()`, which needs PHP's
  mbstring extension on WordPress before 7.1. It now uses
  `html_entity_decode()`; invalid code points still decode to nothing.

### Changed (About: every feature)

- About now lists every feature of each plugin in the family: about 175 in
  all.
  - Each feature has a one-line description.
  - Each group says where it is in wp-admin.
  - Each plugin shows its feature count.
  - A search box filters the lists as you type.
- The lists live in `Admin\Screens\AboutFeatures`. Add-ons using the
  `aiou_about_products` filter may still pass plain lists of names.

### Fixed (emails failing on a local site)

- When Settings → Emails → Sender Identity has no From email and
  WordPress's default `wordpress@{host}` isn't a valid address (a host
  without a dot, such as `localhost`), emails now go out from the site's
  admin email instead of failing ("Invalid address: (From)"). A valid
  default is left as it is.

### Added (Request Setup)

- **All-In-One Utilities → Request Setup** (`aiou-setup-request`,
  `Admin/SetupRequest.php`): administrators who find the setup hard can
  ask WordTenance to install and configure the plugins. They pick the
  plugins (a tag input listing only the family plugins installed on the
  site; a plain checkbox list without JavaScript), describe what they
  need, and tick a box agreeing to share the site details shown on the
  form (site name and address, WordPress, PHP, language, theme,
  WooCommerce, plugin count and the family plugins' versions). The
  request is emailed to `aiou_support_email` (support@wordtenance.com)
  with replies to the address entered; one request a minute per user.
  The page explains the steps: we reply with the hours needed, and work
  starts only after approval. About's "Need help?" links to it.

### Added (License page)

- **All-In-One Utilities → License** (`aiou-license`): one page for every
  add-on's license card. Add-ons add theirs through the
  `aiou_license_products` filter; the menu item appears only when at
  least one is active. About's License links point there.

### Added (wide tables)

- `.aiou-table-scroll`: a wrapper for admin tables wider than the card; it
  scrolls sideways, lets long text and code in cells wrap, and
  `--tall` adds up-and-down scrolling with a sticky header (used by Pro's
  Site Performance and Developer tabs).

### Added (settings framework, 2026-11-06)

- A `radio` field type (choices as cards, optionally with a hint each),
  usable as a `depends_on` controller, and a `depends_hide` field arg that
  hides a dependent row instead of greying it out.
- Code editor fields show their placeholder in grey italics, so an
  example doesn't read as saved code.
- Settings sections remember being opened or closed (per browser, per
  page and tab, in localStorage `aiouClosedSections`), and a click
  anywhere on a section's heading opens or closes it (its info button and
  links still do their own thing).

## [2.0.0] - 2026-11-05

### Added (release preparation, 2026-11-05)

- Settings from 1.x (`aiowpu_*` options) are carried over once on the first
  request after updating: disabled features, the default featured image,
  Username Updater and Multiple Roles. See `docs/modules/legacy-migration.md`.
- Deactivating asks whether to keep or delete the plugin's data for when it
  is deleted (`Admin\UninstallChoice`); `uninstall.php` follows the answer.
- readme.txt rewritten for WordPress.org; translations regenerated; the
  release ships only the `.pot`.

### Removed (licensing: WordTenance Cloud)

- The shared `src/Licensing/LicenseClient.php` (added below), its
  `'license'` field type, `handleLicenseAction()` JS and
  `.aiou-license-*` CSS. Premium add-ons now bundle the WordTenance SDK
  and talk to WordTenance Cloud themselves, so this WordPress.org plugin
  no longer carries any code that offers updates for other plugins. The
  `wordtenance-license-manager` server it talked to was never deployed
  and no keys were issued. See `docs/modules/licensing.md`.

### Added

- Settings → WooCommerce → Country States (off by default; the tab only
  appears while WooCommerce is active): adds state/province dropdowns for
  the 169 countries WooCommerce ships without a list (Afghanistan, Saudi
  Arabia, the UAE, Russia, ...), ported from My Country States For
  WooCommerce. Optionally makes the state required for them. Only fills a
  country whose WooCommerce list is empty, so countries WooCommerce now
  covers itself (Croatia, Morocco, Saint Kitts and Nevis) keep
  WooCommerce's codes. Filter: `aiou_country_states_bundled`.
- Settings → Users → Switch to User (off by default): administrators get
  a "Switch to" link on each user in Users → All Users and a "Switch to
  this user" button on their profile, to log in as that user and see the
  site as they do. A black "Viewing as …" bar on every page (and a toolbar
  item) switches back -- to the same front-end page, or to the Users
  screen from wp-admin. Choose whether switching lands on the home page
  or the user's dashboard. No passwords involved; only users the admin
  may edit; no chain-switching; switching doesn't touch the user's "Last
  Login"; the way back is an HMAC-checked, httpOnly, 2-day secret that
  dies on switch-back or logout. Fires `aiou_switched_to_user` and
  `aiou_switched_back_user`.

### Changed

- Custom Code now needs the `unfiltered_html` capability to change its
  CSS/JavaScript, as core does for "Additional CSS". Without it (site
  admins on multisite, or `DISALLOW_UNFILTERED_HTML`), a save or settings
  import keeps the stored code instead of accepting new script.
- User Roles and User Avatar check `promote_user` / `edit_user` for the
  specific user being saved, not only the request's nonce.
- Removed the manual `load_plugin_textdomain()` call (WordPress.org
  loads translations itself) and added `.distignore` so release builds
  leave out development files and `vendor/`.
- Duplicate Posts and Duplicate Menu are now tabs on the Tools screen
  (All-In-One Utilities → Tools → Duplicate Posts / Duplicate Menu)
  instead of submenu pages of their own, each with a Documentation
  sidebar like the other tools. The old `aiou-duplicate-posts` and
  `aiou-duplicate-menu` addresses redirect to the new tabs. Pro's
  Redirects section still appears below Duplicate Posts' activity log.
- Settings → Media → Default Featured Image: "Fallback image" and "Apply
  to" only show while "Enable Default Featured Image" is on.
- Require Featured Image no longer breaks the WooCommerce CSV product
  importer: its guard blocked each product's publish (the importer
  writes the image afterwards) and the `wp_die()` stopped the import's
  AJAX batches, so the import hung. Imports, cron and WP-CLI are now
  skipped. Products saved through the WooCommerce REST API or product
  editor are checked against the image being saved instead of the one
  not yet stored, so a product sent with an image is no longer blocked.
- Settings → Media → Default Featured Image → "Apply to" now lists every
  public post type that supports featured images, including ones
  registered later in `init` (custom post types, WooCommerce Products).
  The list is worked out when the field is shown, like Require Featured
  Image's; before, it was fixed at boot (`init` priority 0) and missed
  them.
- Edit User: "Switch to User" is now its own block, first of the plugin's
  blocks (above Roles) instead of a row in core's Personal Options.
  `ProfileSection::add()` draws every plugin block together in a fixed
  order -- Switch to User, Roles, Avatar, then Pro's (Additional
  information, Administrator Notes, Username Change Request, Two-factor),
  Woo's Registration details, and Login history -- whichever plugin
  hooked in first.
- Profile / Edit User / Add User: everything the plugin family adds is
  drawn like a Settings section -- a rounded block tinted by owner, with
  the owner's badge on its heading (new `Admin\ProfileSection::wrap()`;
  the plugin's stylesheet now loads on those screens). Free's Roles and
  Avatar blocks use it; User Switching's "Switch to User" row is
  highlighted in core's Personal Options table. Buttons inside get the
  plugin's style. A block that prints nothing shows nothing.
- New `Admin\UserPicker`: the "Choose a user" type-ahead (name, username,
  email) is now a shared component -- `search()`, `respond()` for the
  page's own AJAX action, `render()` -- used by Update Username and Pro's
  Block User. The script reads the AJAX action from the form's
  `data-action`.
- Users → Update Username no longer says "Invalid user." when opened
  from the menu. Without a user it shows **Choose a user**: a search box
  that lists matching users as you type (first or last name -- full
  names in any order -- display name, username or email, 2+ characters, up to 10, only users you may edit), with arrow keys and
  Enter. Each result opens that user's form with its own security token,
  exactly like the row action on Users → All Users; the form's back link
  is now "Choose another user". Works without JavaScript (Enter
  searches). New AJAX action `aiou_update_username_search`
  (`edit_users` + nonce).
- Admin CSS/JS are versioned by file modification time
  (`Menu::asset_version()`), so browsers pick up changes without a
  plugin version bump.
- New `Admin\PageLayout` helper draws any stand-alone admin page like the
  Settings screen: title (with optional back link and header buttons),
  rounded sections tinted by owner, and the Documentation sidebar.
  WordPress's own markup inside (`.form-table`, `.widefat` lists,
  `.button`s, filter bars, pagination) is restyled by `.aiou-page` rules.
  Users → Update Username uses it (with a black Update Username button).
- Dashboard restyled like the Settings screen, still on WordPress's own
  widgets (drag, collapse, Screen Options):
  - Summary tiles on top: switches on (across settings tabs), items to
    clean, emails in the last 7 days (sent / failed), plugins active.
  - New widgets: **Settings overview** (every settings tab with "N of M
    on", Settings and WooCommerce groups, replacing the single-feature
    Username Updater and Default Featured Image widgets), **Maintenance**
    (Database Cleanup, Email Log, settings export, each with a button).
  - **Your plugins** (was At a Glance) shows the same statuses as About;
    **System** shows version tiles plus System report / Email support.
  - Every widget is drawn as a rounded section, tinted and badged by its
    plugin -- by id prefix (`aiou_pro_`, `aiou_woo_`, `aiou_tools_`) or
    the new `aiou_dashboard_widget_owner` filter.
- Database Cleanup: every category with items has a **View** button
  (**View tables** for Optimize) that opens a popup listing the rows its
  Clean would delete -- up to 100, with the total -- and a Clean button
  for that category. Loaded on demand via
  `wp_ajax_aiou_database_cleanup_preview` (`manage_options` + nonce,
  read-only). `CleanupTask` takes an optional `preview` callback.
- About uses the Settings layout: one section per plugin (Free, Pro, Woo
  Add-on, Tools Add-on), each tinted in its color, with its features
  grouped by area, its status (active with version, installed but not
  active, or not installed) and buttons to open it, its License tab, the
  Plugins screen or wordtenance.com. A "Your plugins" sidebar shows every
  plugin's status and links to Email support. Filter
  `aiou_about_products`.
- System Report uses the Settings layout (sections on the left, sticky
  Documentation panel on the right) and adds:
  - **Email support**, below the report: reply-to address (prefilled with
    the admin's email), subject and message, sent to
    support@wordtenance.com (filter `aiou_support_email`) with the report
    attached as .txt or .pdf (or not attached). Needs `manage_options` +
    nonce; one message a minute; the form keeps what was typed after an
    error; temp attachment files are removed after sending.
  - **Download .txt / .pdf** buttons next to "Copy report". The PDF is
    built by a small built-in writer (`Admin\TextPdf`), no library.

- Import/Export is now a tab of the Tools screen (after General) instead
  of its own submenu page; the old `aiou-import-export` link redirects
  there. Export lets you tick which settings tabs go in the file (all by
  default), and the screen uses the black/white Tools styling.

- Tools screen now matches Settings: a tab bar, the tools on the left
  and a sticky Documentation panel on the right. Free owns the "General"
  tab; add-ons add tabs with the `aiou_tools_tabs` filter and render on
  `aiou_tools_tab_{id}` (`aiou_tools_widgets` still renders on General).
- Tools → Reset settings is a checklist of every settings tab (grouped by
  Settings / WooCommerce, each marked "Customised" or "Defaults"), with
  "Select all with saved changes" and one "Reset selected" button, in
  place of the one-tab dropdown. Each reset keeps a snapshot, and "Undo
  last reset" puts the removed values back exactly.

- Settings → Users → Username Updater now also shows its emails
  ("Username Updated", plus Pro's "Username Change Request" and "Username
  Request Not Approved") under "Related emails", with a note linking to
  the Emails tab. They're the same settings, not copies: saving either
  tab updates both. Built on a new `SettingsRegistry::add_mirror()`.
- The Emails tab moved to the end of the Settings tabs (before License).
- Settings screens: the Save button is now a black, full-width "Save
  Changes" at the top of the sticky right-hand column, above
  Documentation, so it's always in reach (also on the WooCommerce page).

- Email Log: redesigned in the settings screen's black/white style
  (rounded cards, pill tabs and buttons) with summary counts (total,
  sent, failed with failure rate, since yesterday) and a filter bar: search
  (now also matches the error message), date range with quick ranges
  (Today, Last 7 days, Last 30 days, This month), HTML/plain-text format
  and page size (20/50/100). Status tab counts follow the other filters,
  the Status column is sortable, failed rows show their error under the
  subject, the header has a "select all" box, and "Clear entire log"
  asks for confirmation.
- Database Cleanup: redesigned as one black/white list instead of a grid
  of cards -- each category's description on the left, its count and
  "Clean" button on the right, grouped (Posts, Comments, Orphaned data,
  Maintenance). New summary counts (items to clean, database size,
  reclaimable space), checkboxes with "Select all with items" and
  "Clean selected", "Optimize" confirms with its own non-destructive
  message, and Pro's backup section matches the new style.
- Admin menu: a single "Tools" submenu (fourth, after WooCommerce); the
  Tools add-on now adds its cards to it instead of its own "Tools" page.
- Email Log: new "Export CSV" for whatever is currently filtered
  (spreadsheet formulas in subjects are neutralised).

### Fixed (full feature test)

- Require Featured Image: a brand-new post published without an image
  (e.g. straight from the block editor) was rolled back to the pseudo-status
  "new" and disappeared from every list; it now becomes a draft.
- Require Featured Image: publishing from the block editor with the image
  set in the same click was refused, because the REST API saves
  `featured_media` after the post; the image in the request is now used.
- "Howdy" greeting option did nothing: core now adds the account item at
  toolbar priority 9991, after ours; the replacement now runs after core
  (and keeps the avatar).
- Custom Code: CSS has tags stripped and `</script` is escaped in JS, so
  saved code can't close its own `<style>`/`<script>` tag (as core does
  for "Additional CSS").

### Added (user request: developer utilities, Free/Pro split)

- System Report: more environment details, and a WordPress constants
  viewer (safe set only).
- Import / Export: `aiou_import_export_cards` hook.

### Added (user request: email and notification utilities, Free/Pro split)

- Settings → Emails → **Test Email** (AJAX, shows the real send error).
- Email Log hooks `aiou_email_log_row_actions` and
  `aiou_email_log_bulk_actions`.

### Added (user request: performance and optimization, Free/Pro split)

- Settings → Performance → **Comments** (`Modules/DisableComments/`):
  disables comments site-wide, optionally keeping them on chosen types
  (Products by default, for WooCommerce reviews).
- Maintenance → **Post revisions**: a global revisions limit.
- Frontend Performance → **Heartbeat interval** (moved from Pro).

### Added (user request: security and login utilities, Free/Pro split)

- New **Settings → Security** tab (`Modules/Security/`). Performance's
  Security & Access section (now "Hardening") and Author Pages moved
  there, with a migration of saved values.
- **Limit Login Attempts:** per-IP lockouts, a longer lockout after
  repeated ones, a "never lock out" list, an unlock table, and the
  `AIOU_DISABLE_LOGIN_LIMITS` constant.
- **Visitor IP Address:** choose `REMOTE_ADDR` or a proxy/CDN header.
  `Security\Ip` is shared with Pro.
- **XML-RPC:** xmlrpc.php now returns 403 when disabled.
- **User Enumeration:** also hides the REST users routes and the users
  sitemap from visitors, and makes login errors generic.
- **Author Pages:** can return a 404 instead of a redirect (replacing the
  separate "Author Archives" toggle), and runs before `redirect_canonical`.

### Added (user request: content and media management, Free/Pro split)

- Settings → Media → **SVG Uploads** (`Modules/SvgUploads/`): chosen roles
  can upload SVGs, each cleaned by an allowlist sanitizer (no scripts,
  event handlers, foreignObject, outside links, CSS imports; entity
  declarations refused) and given real dimensions for the Media Library.
- New **Settings → Content** tab with **Duplicate Posts & Pages**
  (`Modules/PostCloner/`): "Duplicate" row action, bulk action, toolbar
  item, and classic-editor link; copies terms, custom fields, and the
  featured image as a draft.
- Field `args['choices']` may be a Closure, resolved at render/sanitize
  time (lists of post types other plugins register on `init`); Require
  Featured Image now uses this, so custom post types appear in its list.
- A generic one-off result notice on the Settings screen
  (`aiou_settings_notice_{user}` transient).

### Added (user request: WordPress admin enhancements, Free/Pro split)

- Settings → Admin gains (`Modules/AdminCustomization/`):
  - Dashboard: hide any Dashboard widget for everyone (core's and those
    other plugins add, recorded on each Dashboard visit), plus the
    Welcome panel.
  - Admin Footer: custom footer text (`{site_name}`, `{site_url}`,
    `{year}`).
  - WordPress Version: hide it from the footer, At a Glance, the
    generator tag, and core asset URLs (replaced by a hash so caches
    still bust); users who can update WordPress still see it in wp-admin.
  - Toolbar: turn the toolbar off on the site for chosen roles.
- Settings → Login Page → Background: background color, image, and image
  layout.
- New generic `checklist` field type, and the
  `aiou_dashboard_hidden_widgets` and `aiou_login_background_css` filters.
  See `docs/modules/admin-customization.md`.

### Changed

- Settings → Performance → "Clean Dashboard" is replaced by the per-widget
  Dashboard choices above; a saved "on" migrates once.

### Added (user request: Login Page tab)

- New **Settings → Login Page** tab (`Modules/LoginPage/`) with:
  - Preview buttons.
  - Elements & Behavior: tab title, a message above the form, hiding the
    "Go to site", lost-password, register, privacy and language items,
    "Remember Me" ticked by default, and login/logout redirects.
  - Customizable texts for every label, button, link and message on the
    login, registration, lost-password and reset-password screens. The
    replacement is screen-aware, so strings core reuses on several
    screens change independently.
- The Login Logo section moved here from Settings → Media, with a
  one-time migration of saved values.
- New generic field types: `color` (WordPress color picker) and
  `button_link`. See `docs/modules/login-page.md`.

### Changed (user request: labels above wide fields)

- New universal field arg `label_above`. The field then spans the full
  width, with its label (plus info button and owner badge) on top of the
  control, so wide controls no longer squeeze the label column into 2–4
  lines. Used by Settings → Emails → Sender Identity (From name, From
  email address, and Pro's header/footer galleries and editors). Tinted
  add-on rows keep their label alignment.

### Added (for Pro's email branding)

- `Email::layout()` now has full-width header and footer slots, filled
  through the new `aiou_email_header_html` / `aiou_email_footer_html`
  filters. They are empty by default, so Free's own output is unchanged.
- New `html` settings field type: WordPress's editor with Visual and
  Code tabs, storing real `<p>` tags (no wpautop). Its optional
  `args['variables']` adds click-to-insert chips. It is sanitized with
  `wp_kses_post()`.
- `window.aiouEditorContent.get()` / `.set()` in `admin-settings.js`
  read and replace an editor field's content (with an undo step),
  whichever tab is showing.

### Changed (user request: accordion-style managed emails)

- New email framework (`src/Emails/`). It has an abstract `Email` parent
  that every email extends, `EmailManager` (`aiou()->emails()`), and
  `EmailRenderer`.
- Each email is now one accordion:
  - **Header:** an on/off switch usable without opening it, plus the
    name, recipient, and "Always sent" / "Customized" tags.
  - **Panel:** Subject and an HTML Body editor (WordPress's editor,
    Visual and Code tabs, initialized only when the panel opens), with
    "Available variables" on the right. Clicking a variable inserts it at
    the cursor, and a link restores the defaults.
- Emails are now sent as HTML in a minimal layout. Variable values are
  escaped and URLs become links.
- **The switch now means "send this email".** WordPress's core emails
  are switched off through core's own filters. Password Reset can't be
  switched off.
- Duplicate Posts' status email became the "Scheduled Scan Report" email.
  Its recipients are editable in its panel, and it now lists only the
  posts actually removed.
- Existing settings migrate automatically, once.
- New settings field type `email`. Fields can also set
  `args['full_width']` to span both columns.
- Removed `EmailSettings\Feature` (replaced by `SenderIdentity`),
  `EmailSettings\EmailTemplate`, and the
  `aiou_username_updated_email_subject` / `_message` filters (use
  `aiou_email_content`). New filters: `aiou_email_variables`,
  `aiou_email_content` and `aiou_email_html`. See
  `docs/modules/emails.md`.

### Changed (user request: custom admin menu icon)

- The All-In-One Utilities admin menu now uses a custom toolbox icon
  (`Menu::ICON_SVG`) instead of the stock `dashicons-admin-tools`
  wrench. It's a single-colour SVG passed as a base64 data URI, the same
  technique WooCommerce uses, so WordPress's `svg-painter` recolours it
  to match every admin colour scheme in its normal, hover, and current
  states.

### Fixed (full add-on test pass)

- Boot moved from `plugins_loaded` to `init` (priority 0). Modules
  translate their settings labels as they register, which WordPress
  6.7+ flags as "translation loading triggered too early". This notice
  fired for all four plugins on every request.
- `wp_die()` calls now send a real HTTP status: 403 for permission,
  nonce and expiry failures, and 404 for "not found". Previously they
  sent WordPress's default 500, which looks like a server crash in logs
  and monitoring. The same change was made in Pro, the Woo Add-on and
  the Tools Add-on.

### Added (user request: Users screen enhancements)

- New "Users Screen" section on Settings → Users
  (`Modules/UserManagement/`): Registered and Last Login columns on
  Users → All Users (on by default), plus User ID and Account Age
  (opt-in). Registered, Last Login and ID are sortable.
- Successful-login tracking (`LoginTracker`, on `wp_login`): last login
  time and login count as user meta, plus the moment tracking began, so
  "Never" can be told apart from "Not recorded".
- `UserListQuery::sort_by_meta()`: sorts the Users list by numeric user
  meta without dropping users who lack it. Pro reuses it.
- `uninstall.php` removes the login-tracking meta and option. See
  `docs/modules/user-management.md`.

### Changed (user request: settings screen restyle)

- Settings layout is now two columns: settings (75%) and one sticky
  sidebar with the Documentation panel above the promo cards.
- Settings sections are borderless pastel cards, alternating yellow and
  blue, with a 24px radius. Toggle switches are black when on.
- The tab bar is a rounded white bar of pill tabs, with the active tab
  in black. The active tab now carries `aria-current="page"`.
- Settings are now color-coded by the plugin that adds them. Free's
  sections are white; Pro's are light charcoal, the Woo Add-on's light
  purple and the Tools Add-on's light blue. Each non-Free section or
  field also gets a "Pro" / "Woo" / "Tools" badge, so the coding never
  relies on color alone. An add-on's field inside another plugin's
  section (e.g. a Pro field in a Free section) gets a tinted row.
- `ModuleManager` now calls `SettingsRegistry::set_owner()` around each
  module's `register()`. The owner is read generically from the
  module's namespace (`WordTenance\AllInOneUtilities<Product>\`), and the
  new `aiou_module_owner` filter can override it. New
  `SettingsRegistry::get_field_owner()`; sections carry an `owner` key.
  No existing `add_section()`/`add_field()` call site changed.
- Add-on cards outside the Settings screen are tinted too: the Tools
  Add-on's page (`.aiou-owner-page--tools`) and the Woo Add-on's
  "Recount product terms" card (`.aiou-card.aiou-owner--woo`).

### Added (follow-up: shared license client)

- New `src/Licensing/LicenseClient.php`: a shared license-activation/
  update-notification client, one instance per premium product (Pro,
  the Woo Add-on, the Tools Add-on), talking to the new
  `wordtenance-license-manager` plugin on wordtenance.com. Handles
  activate/deactivate (AJAX), periodic re-validation (a daily cron per
  product), and injects into `pre_set_site_transient_update_plugins` /
  `plugins_api` so the Plugins screen offers each product's own updates
  once a valid license is activated. See `docs/modules/licensing.md`.
- New `'license'` Settings field type (`aiou_settings_render_field_license`)
  and matching `.aiou-license-field`/`.aiou-license-input` CSS, plus a
  shared `handleLicenseAction()` in `assets/js/admin-settings.js` for the
  Activate/Deactivate buttons.

### Changed (follow-up: menu order)

- Reordered the All-In-One Utilities admin submenu per the user's own
  explicit request: "Dashboard. Settings, Woo, Tools, then other
  options." `Menu::reorder_submenu()`, hooked at a very late
  `admin_menu` priority (999) so the Woo Add-on's, Tools add-on's, and
  Email Log's own `admin_menu` callbacks (all default priority 10) have
  already registered their submenus first, reorders the combined
  `$submenu['aiou']` array by each entry's own menu slug (never its
  visible label -- this plugin's own "Tools" screen and the Tools
  add-on's own page are both literally titled "Tools", so the label
  alone can't tell them apart; the add-on's own page is the one that
  moves up, matching where the rest of this project's recent attention
  has been). Verified against the real site: the sidebar now reads
  Dashboard, Settings, WooCommerce, Tools (add-on), then everything
  else in its original relative order.

### Changed (follow-up: real dashboard widgets)

- The Dashboard screen is rebuilt on WordPress core's own meta box/
  postbox system -- the same mechanism `wp-admin/index.php` itself uses
  for "At a Glance" and friends -- per the user's own request: "Display
  important features as widgets just like we have widgets on the
  default WordPress dashboard screen." Every widget is now genuinely
  draggable, collapsible, individually hideable from Screen Options,
  with the column count (1 or 2) also configurable there -- all of it
  core's own existing behavior, not reimplemented. New
  `aiou_dashboard_widgets_setup` action (fired at `load-{hook}`, the one
  point where `add_meta_box()` calls are valid for Screen Options to
  see them) replaces the old `aiou_dashboard_widgets` action, which just
  expected a plugin to echo raw `<div class="aiou-card">` HTML with none
  of the above. A new "At a Glance" widget shows which WordTenance
  plugins (Free, Pro, Woo Add-on, Tools Add-on) are active, with a link
  to get whichever isn't. See `docs/modules/dashboard.md` for the full
  writeup, including why meta box registration has to happen on
  `load-{hook}` rather than inside the render callback, and the real
  AJAX verification (an actual collapse request, persisted, surviving a
  reload) this was tested with.

### Fixed (user-reported)

- Email Log's content popup had no `[hidden]` counterpart to its
  `.aiou-modal-overlay { display: flex; }` rule, so it rendered
  regardless of its `hidden` attribute from the first page load — a
  plain class selector beats the browser's own default `[hidden] {
  display: none }` at equal specificity. The modal appeared stuck open
  and un-closeable, and the eye icon then appeared to do nothing once
  the element was removed via the browser's own inspector. Fixed with
  one additional, more specific rule,
  `.aiou-modal-overlay[hidden] { display: none; }`. See
  `docs/modules/email-log.md` for the full root-cause writeup and how
  it was verified with real computed-style checks.

### Added (follow-up: plugin-references port, batch 1)

Four new modules, each built after inspecting a WordPress.org reference
plugin (see `docs/plan.md`'s "plugin-references triage" for the full
record of what was and wasn't ported, and why):

- **Custom Code** (`CustomCode`) -- a new "Custom Code" tab: frontend
  CSS, frontend JS, and admin-area CSS fields, consolidating "Simple
  Custom CSS and JS", "Simple CSS" (near-duplicates of each other), and
  "Add Admin CSS" into one module. The three textareas use a custom raw-
  passthrough sanitizer rather than the framework's default (which would
  run `wp_strip_all_tags()` and mangle JS containing HTML in a string
  literal) -- the same trust model core itself uses for its own
  Customizer "Additional CSS". See `docs/modules/custom-code.md`.
- **Classic Editor** (`ClassicEditor`) -- a new "Editor" section on the
  Performance tab: one toggle restoring the classic (TinyMCE) editor via
  the two filters core itself documents for this
  (`use_block_editor_for_post_type`, `use_widgets_block_editor`), not a
  full port of the official Classic Editor plugin's larger feature set.
  See `docs/modules/classic-editor.md`.
- **Update Control** (`UpdateControl`) -- a new "Updates" section on the
  Performance tab: one toggle that stops WordPress from checking for or
  nagging about core/plugin/theme updates (stubs the three update
  transients, unschedules and blocks the related crons, hides the two
  native admin nags, disables background auto-updates), consolidating
  "Disable All WordPress Updates" and "Disable WP Notification"'s shared
  idea into one module -- unrelated to this plugin's existing "stop
  emailing admin after a background update" toggle elsewhere. See
  `docs/modules/update-control.md`.
- **Accessibility** (`Accessibility`) -- a new "Accessibility" section
  on the Performance tab: four independent toggles (remove tag-cloud
  title attributes, visible keyboard focus outline, underline in-content
  links, a skip-to-content link), scoped down from "WP Accessibility"'s
  much larger toolbar-widget/alt-text-management feature set. See
  `docs/modules/accessibility.md`.

### Changed (follow-up: Yoast-style settings layout)

- The Settings screen's layout (shared by Free's own Settings page and the
  Woo Add-on's "WooCommerce" page via the same `SettingsPage` renderer) is
  now three columns instead of two: a 50%-wide settings column, a 25%-wide
  documentation column, and a new 25%-wide promotion column -- the ratio
  and card-based styling requested by the user, modeled on Yoast SEO's own
  settings screen (installed on this site), translated into this plugin's
  own brand colors rather than copied wholesale. Section cards and the
  documentation panel each got a color-coded left accent (green/neutral)
  to visually match the new promotion cards' yellow accent.
- New `aiou_settings_promo_cards` filter (`$cards, $page`) -- each plugin
  contributes its own cards for the page(s) it cares about. Free's new
  `PromoCards` class answers for the `'default'` page: a "Get Pro" card
  (hidden once `AIOU_PRO_VERSION` is defined), a "Get the WooCommerce
  Add-on" card (shown only when WooCommerce is active and the add-on
  isn't), and a generic WordTenance brand card. The Woo Add-on's `WooMenu`
  answers the same way for its own `'woo'` page. Verified live against the
  real site both ways: with Pro and the Woo Add-on active (as they are on
  this dev install), only the generic card shows on both pages; the
  conditional cards' `class_exists()`/`defined()` guards were read
  directly from this install's own bootstrap files, not assumed.
- `AboutScreen` gained "All-in-One Utilities Pro" and "WooCommerce Add-on"
  sections (`#pro` / `#woo` anchors) so the new promo cards' "See what's
  in Pro/the add-on" links go somewhere real, each showing an "Active"
  badge when that plugin is actually active.

### Added

- Ground-up v2 rewrite under the WordTenance brand (namespace
  `WordTenance\AllInOneUtilities`), replacing the original 2ByteCode
  "All-in-One Utilities" v1.0.0 codebase (kept at
  `all-in-one-utilities-old/` as a reference only).
- PSR-4 architecture, Composer tooling (WPCS, PHPCompatibilityWP, PHPStan).
- Module system (`ModuleManager`, `ModuleInterface`) as the extension point
  for future Pro and Woo Add-on packages.
- Top-level admin menu with Dashboard, Settings, Import/Export, System
  Report, Tools, and About screens (placeholder content pending Phases
  4-10 — see `docs/plan.md`).
- WordTenance design tokens and a first shared admin UI component
  (`.aiou-card`).

- Settings framework: tabs, sections, fields, and a contextual
  documentation side panel (`src/Admin/Settings/`).
- Dashboard, Import/Export, System Report, and Tools screens with real
  functionality (not placeholders).
- **Username Updater** module: "Update username" row action in the Users
  list, safe form handling, optional email notification.
- **Default Featured Image** module: sitewide fallback featured image for
  selected public post types.
- `aiou_tools_widgets` (action) and `aiou_system_report_lines` (filter)
  extension points, so the Woo Add-on (and any future module) can add to
  the Tools and System Report screens without modifying Free.
- **Multiple User Roles** module: lets a user hold more than one role at
  once, replacing the native role dropdown with a checklist and the Users
  list table's "Role" column with "Roles"; works on multisite too.
- **Disable Unnecessary Features** module: 30 independent toggles across
  five sections (Frontend Performance, HTML Head Cleanup, Admin
  Experience, Security & Access, Maintenance) under Settings → Performance.
- **Custom User Avatar** module: Media Library (or plain upload)
  avatar picker on profile screens, resolved via the modern
  `pre_get_avatar_data` hook. Built after inspecting the One User Avatar
  plugin; reimplemented rather than ported — see
  `docs/modules/custom-user-avatar.md` for what's deliberately different
  (no role capability changes, no live Gravatar network check).
- **Email Settings** module: a new Settings → Emails tab to override the
  sender identity and customize the subject/body of the six emails
  WordPress (and this plugin) send to admins and users — new user
  registration, password reset, password changed, email changed, and
  username updated. Each email has its own on/off toggle (controls
  whether the custom wording is used, not whether the email sends) and an
  expandable subject/body editor. See `docs/modules/email-settings.md`.
- **Email Log** module: an Email Log section on Settings → Emails that,
  when turned on, logs every email the site sends (any plugin's) to its
  own database table and adds an Email Log submenu — a searchable,
  sortable, paginated table with a status filter, an eye-icon popup
  showing a single email's full content, row/bulk delete, a "Clear
  entire log now" button, and a configurable retention window (7/15/30/90
  days or keep forever). Built after inspecting the WP Mail Catcher
  plugin; adds a metadata-only logging mode (skip storing the body/
  headers) it doesn't have — see `docs/modules/email-log.md`.
- **Database Cleanup** module: a Database Cleanup submenu listing twelve
  on-demand maintenance categories (revisions, auto-drafts, trashed
  posts/comments, spam comments, pingbacks/trackbacks, orphaned post/
  comment/user meta, orphaned term relationships, expired transients,
  and non-destructive table optimization), each with a live count and a
  "Clean now" button. Built after inspecting Advanced Database Cleaner;
  see `docs/modules/database-cleanup.md` for what was deliberately left
  out of a first Free pass (duplicated-meta dedup, table repair,
  multisite, "keep last" rules).
- **Duplicate Posts** module: a Duplicate Posts submenu reviewing posts
  that share an identical title (within the same post type), with
  clear Remove/Keep columns, bulk "Move selected to Trash", an activity
  log, and a Settings → Duplicate Posts tab (post types to scan, keep
  oldest/newest, excluded IDs, an optional scheduled scan in report-only
  or delete mode, and status emails). Built after inspecting Delete
  Duplicate Posts and reading its readme's documented Free/Pro split —
  see `docs/modules/duplicate-posts.md`. Adds six new extension points
  (`aiou_duplicate_posts_allowed_statuses`/`_force_delete`/`_count`/
  `_pairs`/`_valid_pair`/`_removed`) so Pro can take over matching
  entirely without Free needing any awareness of it.
- **Duplicate Menu** module: a Duplicate Menu submenu that creates a full
  copy of an existing nav menu — items, order, and parent/child
  structure — under a new name. Built after inspecting Duplicate Menu, a
  single-tier plugin with no Pro counterpart, so this is Free-only — see
  `docs/modules/duplicate-menu.md`.
- **Disable Author Pages**: a new "Author Pages" section on Settings →
  Performance (in the Disable Unnecessary Features module's existing
  tab) that redirects author archive pages to a chosen page (or the
  homepage), optionally limited to administrators only, with an option
  to also redirect requests for an author that doesn't exist (closes a
  username-enumeration side channel; on by default) and an option to
  blank out author link URLs. Built after inspecting Disable Author
  Pages, another single-tier plugin with no Pro counterpart — see
  `docs/modules/disable-author-pages.md`.
- **Disable Feeds**: a new "Feeds" section on Settings → Performance
  that removes feed discovery links and blocks RSS/Atom/RDF feed
  requests, either redirecting to the matching page or returning a 404,
  with an option to keep the site's two main feeds working while
  disabling every more specific one. Built after inspecting Disable
  Feeds, another single-tier plugin with no Pro counterpart; its bbPress
  forum-feed integration was deliberately not ported (no bbPress install
  to verify it against) — see `docs/modules/disable-feeds.md`.
- **Disable Unnecessary Features**: a 31st toggle, "Core Update Email"
  (Maintenance section), stopping WordPress from emailing the admin
  after an automatic (background) core update succeeds, fails, or needs
  attention. Built after inspecting Disable WordPress Core Update Email
  — too small (a single filter call) to warrant its own module, so
  folded into this module's existing section instead. Does not (and per
  WordPress core's own code, cannot) affect the email for a manually-
  triggered update, which core always sends regardless — see
  `docs/modules/disable-unnecessary-features.md`.
- **Custom Login Logo** module: a new "Login Logo" section on Settings →
  Media (in the Default Featured Image module's existing tab) that
  replaces the login screen's logo image, link, and title text with the
  site's own branding — each independently toggleable, with the logo
  image picked from the Media Library (an attachment id, like Default
  Featured Image's own image field) rather than a typed-in URL. Built
  after inspecting Custom Login Logo, another single-tier plugin with no
  Pro counterpart — see `docs/modules/login-logo.md`.
- **Show IDs** module: a new Settings → Admin tab (the first module to use
  it) with a single toggle that adds an "ID" column to Posts, Pages, any
  custom post type, Media, Users, Comments, and every taxonomy. Built
  after inspecting Simply Show IDs, another single-tier plugin with no
  Pro counterpart; generalized across all post types (the reference only
  ever hooked Posts and Pages by name) and dropped its Links Manager
  support, unreachable in the admin UI by default since WordPress 3.5 —
  see `docs/modules/show-ids.md`.
- **Require Featured Image** module: a new "Require Featured Image"
  section on Settings → Media that blocks publishing (for chosen post
  types, with an optional minimum size) a post with no featured image,
  using the same `transition_post_status` guard the reference plugin
  uses, with no retroactive effect on already-existing content. Built
  after inspecting Require Featured Image, another single-tier plugin
  with no Pro counterpart; fixes a real bug in its size-check logic (a
  dead `=== null` check meant posts with no featured image at all could
  silently pass when no minimum size was configured, the plugin's own
  documented default) — see `docs/modules/require-featured-image.md`.
- **Disable Unnecessary Features**: a 32nd toggle, "Additional CSS"
  (Frontend Performance section), disabling the Customizer's Additional
  CSS feature and suppressing its output everywhere it can reach the
  page. Built after inspecting Disable Custom CSS — too small (two hook
  calls) to warrant its own module, so folded into this module's existing
  section instead. Improves on the reference plugin, whose `wp_head`-only
  approach has no effect at all on a block theme (confirmed against this
  site's own Twenty Twenty-Five): this filters the underlying
  `wp_get_custom_css` function instead, which every output path --
  classic and block theme alike -- reads through — see
  `docs/modules/disable-unnecessary-features.md`.

### Changed

- Username Updater and Default Featured Image were reimplemented, not
  ported as-is: capability checks tightened (`edit_user`/`edit_users`
  instead of `manage_options`), `clean_user_cache()` added after the direct
  username update (missing in v1), and Featured Image's eligible post
  types are now discovered dynamically and filterable instead of
  hardcoded to Posts/Pages.

### Fixed

- A dead-code path in `SettingsPage::render()` (an implicit `echo` of
  whitespace positioned after an unconditional `return`), caught by
  PHPStan.
- `RequestRepository`'s (Pro) raw queries now use `$wpdb->prepare()`'s
  `%i` identifier placeholder for the table name instead of string
  interpolation.
- `SettingsRegistry` stored a tab's field values flat, so two sections of
  the same tab sharing a field id (e.g. `enabled`) would have silently
  collided on one stored value. Values are now nested
  `[section_id][field_id]`; every `get_value()`/`aiou_get_setting()` call
  site across all three plugins updated accordingly.
- v1's "Empty Trash Sooner" approach (`define( 'EMPTY_TRASH_DAYS', 7 )` on
  `init`) never actually worked, in v1 or in this rewrite's first draft —
  WordPress core already defines that constant before any plugin code
  runs. Replaced with a daily WP-Cron job that directly deletes trashed
  posts past the cutoff.
- `FieldRenderer::default_sanitize()`'s `select` type compared a submitted
  (string) value against `array_keys()` of its choices with strict
  `in_array()` — but PHP casts purely-numeric string array keys (e.g.
  `'0'`, `'7'`, `'30'`) to integers, so every submission was rejected and
  silently replaced with the first choice. Found while building the
  Email Log retention field (the first `select` field in this plugin
  family). Fixed by casting both sides to string before comparing.
- `DuplicateFinder::remove()` fired its `aiou_duplicate_posts_removed`
  action with the removed post's permalink read *after* deletion already
  ran. Trashing happens to leave that resolvable (the row still exists),
  which is why this wasn't obvious from reading the code alone — but a
  permanent delete removes the row entirely, so `get_permalink()`
  returned `false` and Pro's redirect-preservation feature silently never
  captured anything for that case. Fixed by capturing the permalink
  before the delete branches run; verified with an actual permanent-
  delete pair.
- **Database Cleanup, Duplicate Menu, Duplicate Posts, and Email Log's
  own submenu pages 403'd ("Sorry, you are not allowed to access this
  page") for every user, admins included**, reported by the user as a
  404 that landed back on the frontend. Root cause: `Menu::register()`
  hooked `admin_menu` at the default priority, but every module's own
  `AdminPage::register()` *also* hooks `admin_menu` at the default
  priority and — because all of them boot (and so register their
  `admin_menu` callbacks) before `Menu::register()` is even called in
  `Plugin::boot()` — their callbacks ran first. WordPress's own
  `add_submenu_page()` computes a page's internal hook name from its
  *current* top-level menu title when it's called, and at that point the
  "All-In-One Utilities" top-level menu didn't exist in `$menu` yet, so
  it silently fell back to a generic hook name
  (`admin_page_{slug}`) instead of the one
  `user_can_access_admin_page()` later expects
  (`all-in-one-utilities_page_{slug}`) once the top-level menu *has*
  registered — a mismatch that reads as "page not found," which
  WordPress's own capability gate (`wp-admin/includes/menu.php`) treats
  as access denied. Fixed by registering `Menu`'s own `admin_menu`
  callback at priority 9, guaranteeing the top-level menu always exists
  before any submodule's own submenu registers. Confirmed via a direct
  dump of the real `$_registered_pages`/`$admin_page_hooks` state (not
  guessed), and via real HTTP requests against every `aiou-*` admin page
  before and after the fix.

### Settings framework

- Added `depends_on` as a universal `Field` arg: another field id in the
  same section whose checkbox shows/hides this field's row, both on
  first render (server-side, no flash of content) and live via a small
  delegated JS listener. First used by Email Log's `log_body`/`retention`
  fields, but available to any module.
- Added a `password` field type (a masked text input, same sanitization
  as `text`) for secret-like values. First used by the Woo Add-on's
  reCAPTCHA module for its secret key, but available to any module.
- `add_tab()` takes a new `page` argument (default `'default'`), and
  `SettingsPage` now takes optional `page_slug`/`registry_page`/`heading`
  constructor arguments. Lets a plugin register a dedicated admin page
  with its own tab bar, scoped to just its own tabs, reusing the same
  renderer instead of duplicating it — first used by the Woo Add-on's
  own new "WooCommerce" submenu (see its CHANGELOG).
