Skip to content

Builder Meta Cleanup v2.3.0

Choose a tag to compare

@oduppinsjr oduppinsjr released this 27 May 13:03
· 23 commits to main since this release

Summary tab, master Select-all, and one-click full cleanup

Two new conveniences for cleaning up a site after migrating away from a theme/builder/plugin: a per-table master Select all checkbox so you can sweep everything on a tab in one click, and a brand-new Summary tab that lists every cleanable row across the entire site and lets you delete it all with a single submit (after confirming you have a backup).

Added

  • Summary tab — fifth admin tab next to Themes & frameworks, Page builders, Plugins, About & tools. Shows:
    • A prominent red disclaimer reminding you to back up the database and explaining what cleanup does / does not touch.
    • Totals across inactive stacks: postmeta rows, exact-option rows (with combined byte size), pattern-matched option rows, grand total, and the count of active stacks that were skipped.
    • Per-stack breakdown table grouped by stack with rows for postmeta / exact options / pattern options, the originating tab, and per-stack totals.
    • Run full cleanup form: a backup-confirmation checkbox plus a single red "Delete N rows shown above" button. The button is disabled until the checkbox is ticked, and an additional confirm() dialog fires on submit. Server-side, the POST handler re-checks the backup-confirmation field AND re-runs is_target_active() per target before deleting anything.
  • Master Select all in the header of each cleanup table (Postmeta, Exact options, Pattern options) on the Themes & frameworks, Page builders, and Plugins tabs. Vanilla-JS handler:
    • Binds via the HTML5 form="..." attribute, so it works with the existing detached form pattern.
    • Honors disabled rows (a "Stack active" or "Not present" row will never be force-selected).
    • Reflects indeterminate state when only some children are checked.
  • WP-CLI parity:
    • wp builder-meta summary — read-only overview of every cleanable row across inactive stacks.
    • wp builder-meta clean-orphans [--dry-run] [--yes] — the CLI equivalent of the Summary tab's "Delete all" button.
  • Service helpers Builder_Meta_Cleanup_Service::summary_for_inactive() and delete_all_for_inactive() power both the admin Summary tab and the new CLI commands.

Safety

  • The Summary "Run full cleanup" submit is double-gated: it stays disabled until you tick the "I have a current backup of this database and understand that this cannot be undone." checkbox AND confirm a native browser confirm() dialog. The POST handler then re-checks that field.
  • The bulk delete still iterates target-by-target and calls is_target_active() before doing anything. A stack that is still installed-and-active is never cleaned through the bulk path — even if it somehow appeared in a stale Summary view.
  • Master Select-all skips disabled child checkboxes, so a row marked "Stack active" or "Not present" cannot be force-checked from the UI.

Upgrade

Minor release. No data migration, no config changes. Existing Themes / Page builders / Plugins tabs behave identically except for the new "Select all" header checkboxes.