cleanup = $cleanup; } /** * Returns the conditionals based on which this integration should be loaded. * * @return array The array of conditionals. */ public static function get_conditionals() { return [ MyYoast_Connection_Conditional::class ]; } /** * Registers hooks. * * @return void */ public function register_hooks(): void { \add_action( 'uninstall_' . \WPSEO_BASENAME, [ $this, 'cleanup' ] ); /** * Public action that wipes all local MyYoast OAuth client state * (registered client, site/user tokens, key pairs, OIDC/JWKS/DPoP caches). * * Intended for development tooling that needs to reset state without * uninstalling the plugin. The handler is the same one that runs on * uninstall, so the effect is identical. * * @internal */ \add_action( 'wpseo_myyoast_clear_client_state', [ $this, 'cleanup' ] ); } /** * Cleans up all MyYoast client data. * * @return void */ public function cleanup(): void { $this->cleanup->execute(); } }