1+ import type { Blueprint } from '@wp-playground/blueprints' ;
2+
13//
24// The Health Check MU-plugin requires a database option 'health-check-disable-plugin-hash'
35// that matches: cookieValue + md5(REMOTE_ADDR). We add an earlier MU-plugin (alphabetically)
46// that uses pre_option filter to return the expected hash, bypassing the database check.
5- export const healthCheckRecoveryBlueprint = {
7+ export const healthCheckRecoveryBlueprint : Blueprint = {
68 steps : [
79 {
810 step : 'installPlugin' ,
@@ -33,7 +35,7 @@ export const healthCheckRecoveryBlueprint = {
3335// Bypass Health Check hash verification by setting both the GET param and option.
3436// Self-delete when user disables troubleshooting mode via Health Check UI.
3537if (isset($_GET['health-check-disable-troubleshooting'])) {
36- @ unlink(__FILE__);
38+ unlink(__FILE__);
3739} else {
3840 $_GET['health-check-disable-plugin-hash'] = 'playground-recovery';
3941 add_filter('pre_option_health-check-disable-plugin-hash', function() {
@@ -64,7 +66,7 @@ if (isset($_GET['health-check-disable-troubleshooting'])) {
6466 '/wp-admin/plugins.php?health-check-disable-plugin-hash=playground-recovery' ,
6567} ;
6668
67- export function getBlueprintUrl ( blueprint : object ) : string {
69+ export function getBlueprintUrl ( blueprint : Blueprint ) : string {
6870 const url = new URL ( window . location . href ) ;
6971 url . hash = '' ;
7072 const jsonStr = JSON . stringify ( blueprint ) ;
@@ -79,7 +81,3 @@ export function getBlueprintUrl(blueprint: object): string {
7981 ) ;
8082 return url . toString ( ) ;
8183}
82-
83- export function getHealthCheckRecoveryUrl ( ) : string {
84- return getBlueprintUrl ( healthCheckRecoveryBlueprint ) ;
85- }
0 commit comments