$meta) { if (($meta['Name'] ?? '') === self::NAME && strpos((string) ($meta['Author'] ?? ''), self::AUTHOR) !== false) { return $cached = $file; } } $cached = ''; return null; } public static function is_installed(): bool { return self::plugin_file() !== null; } public static function is_active(): bool { $file = self::plugin_file(); if (!$file) return false; if (!function_exists('is_plugin_active')) { require_once ABSPATH . 'wp-admin/includes/plugin.php'; } return is_plugin_active($file); } public static function recovery_admin_url(): string { return admin_url('tools.php?page=site-recovery'); } /** * Render a status panel that the admin page calls from the "Before you start" * section. Shows install state, links to recovery settings when active, and * offers a one-click install from gitea when missing+configured. */ public static function render_status(): void { $installed = self::is_installed(); $active = $installed && self::is_active(); $file = self::plugin_file(); $configured = WPH_Recovery_Installer::is_configured(); ?>
✓ Site Recovery is installed and active .
Open recovery settings to copy the URL + password into the client record.
⚠ Site Recovery is installed but inactive . Activate it before starting work.
✗ Site Recovery is not installed. Install it before starting the healthcheck — it's the safety net while we work on the site.
Configure sourceConfigure gitea source — or install manually via Plugins → Add New → Upload Plugin.