plugin_file = $plugin_file; $this->plugin_dir = plugin_dir_path( $this->plugin_file ); register_deactivation_hook( $this->plugin_file, array( $this, 'deactivate' ) ); $this->bootstrap(); } /** * Nonce key. * * @return string */ public static function nonce(): string { return self::TEXT_DOMAIN; } /** * Cleanup on deactivation. * * @return void */ public function deactivate(): void { delete_option( 'codewpai_api_token' ); delete_option( 'codewpai_notice_visible' ); } /** * Bootstrap the plugin. * * @return void */ public function bootstrap(): void { new Filters( $this->plugin_file ); new Ajax(); new AdminPage( $this->plugin_dir, $this->plugin_file ); new Cron(); } }