PluginProbe
Double Opt-In for Contact Form 7 – Secure, GDPR-Compliant Email Verification / 5.5.0
Double Opt-In for Contact Form 7 – Secure, GDPR-Compliant Email Verification v5.5.0
5.5.0 5.4.0 5.3.2 5.3.1 5.1.6 5.1.5 trunk 2.1.5 2.11 2.12 2.13 2.15 3.0.0 3.0.1 3.0.2 3.0.3 3.0.5 3.0.51 3.0.60 3.0.61 3.0.62 3.0.70 3.0.71 3.0.72 3.1.0 All 34 releases
double-opt-in / src / Health / HealthCheckInterface.php

HealthCheckInterface.php in Double Opt-In for Contact Form 7 – Secure, GDPR-Compliant Email Verification 5.5.0, at src/Health/HealthCheckInterface.php

56 lines 1.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Health check contract.
4 *
5 * @package Forge12\DoubleOptIn\Health
6 * @since 5.3.0
7 */
8
9 declare( strict_types=1 );
10
11 namespace Forge12\DoubleOptIn\Health;
12
13 if ( ! defined( 'ABSPATH' ) ) {
14 exit;
15 }
16
17 /**
18 * A single runtime precondition that can be verified and reported.
19 *
20 * Implementations are cheap by contract: `run()` is called on every
21 * Site Health page load and on every admin request that renders the
22 * notice, so anything expensive has to be cached inside the check.
23 *
24 * Addons register their checks through the `f12_doi_health_checks`
25 * filter rather than through a method on AddonInterface — that keeps
26 * the addon loadable on Core versions that predate this API.
27 */
28 interface HealthCheckInterface {
29
30 /**
31 * Stable identifier, used as the Site Health test id.
32 *
33 * Must be prefixed with `f12_doi_` so it cannot collide with
34 * another plugin's test — WordPress keys the global test array by
35 * this string.
36 */
37 public function getId(): string;
38
39 /**
40 * Short human-readable name, shown as the test's row label in the
41 * Site Health accordion.
42 */
43 public function getLabel(): string;
44
45 /**
46 * Which package this check belongs to (`core`, `opt-out`, …).
47 * Used to group the Site Health → Info output.
48 */
49 public function getPackage(): string;
50
51 /**
52 * Evaluate the precondition.
53 */
54 public function run(): HealthCheckResult;
55 }
56