Plugin skeleton, drop-in step registry, option-backed session, single-page checklist UI, downloadable Markdown report. Steps live as one file each under includes/steps/ — adding/removing one is a single file change. Step IDs are stable strings so renaming files preserves session data. Architecture (hc-5ix.3): WPH_Steps singleton globs includes/steps/*.php, natsort-orders by filename, requires each file (which returns a WPH_Step instance), then applies a 'wph_steps' filter so installs can drop steps. Session (hc-5ix.4): option-backed (per decision — plugin is installed per-engagement, so DB-resident history would be lost on uninstall). Single in-progress session per site; finished sessions render a report that the user downloads/copies. Recovery bootstrap (hc-5ix.1): detects whether wp-site-recovery is installed + active, surfaces state on the start panel and in every active session. Manual install for now; private update channel deferred to hc-5ix.27. Smoke-tested on testsite: registry discovery (13 steps in correct order), start → update_step → progress count → finish → 8KB Markdown report → discard cycle.
21 lines
1.1 KiB
PHP
21 lines
1.1 KiB
PHP
<?php
|
|
if (!defined('ABSPATH')) exit;
|
|
|
|
return new class extends WPH_Step {
|
|
public function id(): string { return 'theme'; }
|
|
public function title(): string { return 'Step 5 — Theme Updates'; }
|
|
public function sub_items(): array {
|
|
return [
|
|
'Update the active theme if an update is available',
|
|
'If a child theme is in use (correct practice), the parent theme can be updated safely — confirm child theme is active',
|
|
'If no child theme is in use and the parent theme has been customised directly, do not update without flagging to the client first — the update will overwrite customisations',
|
|
'Update inactive themes only if they are legitimate fallback themes (e.g. a default Twenty* theme). Unused themes that serve no purpose should be flagged for removal',
|
|
];
|
|
}
|
|
public function watch_outs(): array {
|
|
return [
|
|
'Layout changes post-theme update, broken header/footer, missing custom fonts or colours — indicates customisation was done directly in the parent theme.',
|
|
];
|
|
}
|
|
};
|