summaryrefslogtreecommitdiffstats
path: root/gigologadmin.php
diff options
context:
space:
mode:
authorHarald Eilertsen <haraldei@anduin.net>2021-01-16 21:26:10 +0100
committerHarald Eilertsen <haraldei@anduin.net>2021-01-16 21:26:10 +0100
commit6320b18c48cfff7c9712688e9866c2ba9b18125a (patch)
treef281947f5a5a761f3f78b2a6f8407bb82ae468b5 /gigologadmin.php
parentb9367d910647de09365d8e0c06ac4d72447ddc30 (diff)
downloadgigologadmin-6320b18c48cfff7c9712688e9866c2ba9b18125a.tar.gz
gigologadmin-6320b18c48cfff7c9712688e9866c2ba9b18125a.tar.bz2
gigologadmin-6320b18c48cfff7c9712688e9866c2ba9b18125a.zip
Register database tables on activation.
Tables, constraints and country data taken from database dump of prototype dataset by Andrea.
Diffstat (limited to 'gigologadmin.php')
-rw-r--r--gigologadmin.php15
1 files changed, 15 insertions, 0 deletions
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' ));
+}
?>