From 6320b18c48cfff7c9712688e9866c2ba9b18125a Mon Sep 17 00:00:00 2001 From: Harald Eilertsen Date: Sat, 16 Jan 2021 21:26:10 +0100 Subject: Register database tables on activation. Tables, constraints and country data taken from database dump of prototype dataset by Andrea. --- gigologadmin.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'gigologadmin.php') diff --git a/gigologadmin.php b/gigologadmin.php index 6d57ff0..0a3bb94 100644 --- a/gigologadmin.php +++ b/gigologadmin.php @@ -16,4 +16,19 @@ * License: AGPLv3 * License URI: https://www.gnu.org/licenses/agpl-3.0.txthttps://www.gnu.org/licenses/agpl-3.0.txt */ + +if ( !class_exists( 'GigologAdmin_Plugin' ) ) { + class GigologAdmin_Plugin + { + static function activate() { + require_once __DIR__ . '/includes/admin/register_db_tables.php'; + } + + static function deactivate() { + } + } + + register_activation_hook( __FILE__, array( 'GigologAdmin_Plugin', 'activate' )); + register_deactivation_hook( __FILE__, array( 'GigologAdmin_Plugin', 'deactivate' )); +} ?> -- cgit v1.2.3