singleton( HealthCheckRegistry::class, function () { return new HealthCheckRegistry(); } ); } /** * {@inheritdoc} */ public function boot( Container $container ): void { $registry = $container->get( HealthCheckRegistry::class ); $optInsUrl = admin_url( 'admin.php?page=f12-doi-admin' ); $registry->register( new DatabaseTableHealthCheck( 'f12_doi_table_optin', 'core', 'f12_cf7_doubleoptin', __( 'Opt-in records', 'double-opt-in' ), __( 'Open Double Opt-In', 'double-opt-in' ), $optInsUrl ) ); $registry->register( new DatabaseTableHealthCheck( 'f12_doi_table_categories', 'core', 'f12_cf7_doubleoptin_categories', __( 'Opt-in categories', 'double-opt-in' ), __( 'Open Double Opt-In', 'double-opt-in' ), $optInsUrl ) ); $registry->register( new DatabaseTableHealthCheck( 'f12_doi_table_audit_log', 'core', 'f12_cf7_doubleoptin_audit_log', __( 'Consent audit log', 'double-opt-in' ), __( 'Open Double Opt-In', 'double-opt-in' ), $optInsUrl ) ); // Not a table check: this one asks whether the forms' consent // settings still match the forms. A stale acceptance field does // not break anything visibly — it quietly turns every opt-in of // that form into consent evidence nobody ever confirmed. $registry->register( new StaleConsentFieldCheck() ); // The two checks around the Pro 3.x -> 4.x upgrade. They live in // free Core on purpose: both describe a site where Pro is broken // or absent, so a check shipped inside bundle-pro would be the one // thing not loaded when it is needed. $registry->register( new LegacyMonolithCheck() ); $registry->register( new StaleProMarkersCheck() ); ( new HealthRepairController() )->register(); ( new SiteHealthIntegration( $registry ) )->register(); } }