<?php
/**
 * Uninstall routine for KGV Vereinsverwaltung.
 *
 * @package KGV\VereinManager
 */

if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
	exit;
}

if ( ! defined( 'KGVVM_PLUGIN_DIR' ) ) {
	define( 'KGVVM_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
}

if ( ! defined( 'KGVVM_TEXT_DOMAIN' ) ) {
	define( 'KGVVM_TEXT_DOMAIN', 'kgv-verein-manager' );
}

require_once __DIR__ . '/includes/Autoloader.php';
\KGV\VereinManager\Autoloader::register();

\KGV\VereinManager\Roles::remove_roles_and_caps();
\KGV\VereinManager\Schema::drop_tables();
delete_option( 'kgvvm_settings' );
delete_option( 'kgvvm_plugin_version' );
