available = $available ?? static fn (): bool => defined('WPFC_MAIN_PATH'); } public function boot(): void { add_action(CompatibilityTab::LOAD_ACTION, [$this, 'removeOrphans']); } /** * lit_mcp_compat_profile_load('wpfc'), before any output: deletes probe pages a dead check left behind * (FastestCacheProbe::removeOrphans()). A GET without nonce on purpose: only the plugin's own leftovers, * idempotent. */ public function removeOrphans(string $profileId): void { if ($profileId === 'wpfc' && $this->isAvailable() && current_user_can('manage_options')) { FastestCacheProbe::removeOrphans(); } } public function id(): string { return 'wpfc'; } public function label(): string { return FastestCacheCompatibility::LABEL; } public function isAvailable(): bool { return ($this->available)(); } public function abilities(): array { return [new CacheClearAbility($this->purger, $this->log)]; } public function compatibilities(): array { return [FastestCacheCompatibility::profile()]; } }