*/ public static function hooks(): array { return array( ImageUploads::CLEANUP_HOOK, ChangesetService::HOOK, ); } /** * Whether the assistant is set up (a saved, tested AI key) — the only state in which anything recurring is scheduled. */ public static function ready_now(): bool { return KeyStore::active(); } /** * Deactivation hook. */ public static function deactivate(): void { self::unschedule_all(); } /** * Removes every scheduled event/action of the plugin. */ public static function unschedule_all(): void { foreach ( self::hooks() as $hook ) { Jobs::unschedule( $hook, ChangesetService::GROUP ); } } }