| @@ -11,9 +11,13 @@ | ||
| 11 | 11 | use Forge12\DoubleOptIn\Container\BootableProviderInterface; |
| 12 | 12 | use Forge12\DoubleOptIn\Container\Container; |
| 13 | 13 | use Forge12\DoubleOptIn\Health\DatabaseTableHealthCheck; |
| 14 | 14 | use Forge12\DoubleOptIn\Health\HealthCheckRegistry; |
| 15 | +use Forge12\DoubleOptIn\Health\HealthRepairController; | |
| 16 | +use Forge12\DoubleOptIn\Health\LegacyMonolithCheck; | |
| 15 | 17 | use Forge12\DoubleOptIn\Health\SiteHealthIntegration; |
| 18 | +use Forge12\DoubleOptIn\Health\StaleConsentFieldCheck; | |
| 19 | +use Forge12\DoubleOptIn\Health\StaleProMarkersCheck; | |
| 16 | 20 | |
| 17 | 21 | if ( ! defined( 'ABSPATH' ) ) { |
| 18 | 22 | exit; |
| 19 | 23 | } |
| @@ -86,8 +90,23 @@ | ||
| 86 | 90 | __( 'Open Double Opt-In', 'double-opt-in' ), |
| 87 | 91 | $optInsUrl |
| 88 | 92 | ) |
| 89 | 93 | ); |
| 94 | + | |
| 95 | + // Not a table check: this one asks whether the forms' consent | |
| 96 | + // settings still match the forms. A stale acceptance field does | |
| 97 | + // not break anything visibly — it quietly turns every opt-in of | |
| 98 | + // that form into consent evidence nobody ever confirmed. | |
| 99 | + $registry->register( new StaleConsentFieldCheck() ); | |
| 100 | + | |
| 101 | + // The two checks around the Pro 3.x -> 4.x upgrade. They live in | |
| 102 | + // free Core on purpose: both describe a site where Pro is broken | |
| 103 | + // or absent, so a check shipped inside bundle-pro would be the one | |
| 104 | + // thing not loaded when it is needed. | |
| 105 | + $registry->register( new LegacyMonolithCheck() ); | |
| 106 | + $registry->register( new StaleProMarkersCheck() ); | |
| 107 | + | |
| 108 | + ( new HealthRepairController() )->register(); | |
| 90 | 109 | |
| 91 | 110 | ( new SiteHealthIntegration( $registry ) )->register(); |
| 92 | 111 | } |
| 93 | 112 | } |