Kalifast_Bug_Reporter/module_setup.php
2024-08-08 11:54:23 +02:00

45 lines
1.4 KiB
PHP

<?php
/*
* Plugin Name: Kalifast bug reporter
* Plugin URI: https://kalifast.com/#/home
* Description: Add a button to report a bug on the website
* Version: 1.0
* Author: EISGE
* Author URI: https://kalifast.com/#/home
*/
/* EISGE Core plugin requirement */
require_once(ABSPATH.'/wp-content/plugins/EISGE-API-Core/EISGE_Module_Core.php');
require_once(ABSPATH.'/wp-content/plugins/Kalifast-Bug-Reporter/reporter.php');
/* Register the module */
function install_kalifast_bug_reporter() {
$instance = new EISGE_Module_Core();
$instance->moduleInstall(array
(
'application' => 'eisge_api',
'module' => 'Kalifast-Bug-Reporter',
'module_desc' => 'A module to let the user create KALIFAST tickets',
'libraries' => array(
array(
"lib_name" => "Reporter",
"lib_desc" => "Contains the rest functions to report a bug on the website",
),
),
'modes' => array('DISPLAY', 'EDIT')
));
}
/* Unregister the module */
function uninstall_kalifast_bug_reporter() {
$instance = new EISGE_Module_Core();
$instance->moduleUninstall(array('application' => 'eisge_api', 'module'=>'Kalifast-Bug-Reporter'));
}
/* Setup hooks */
add_action( 'activate_Kalifast-Bug-Reporter/module_setup.php', 'install_kalifast_bug_reporter' );
add_action( 'deactivate_Kalifast-Bug-Reporter/module_setup.php', 'uninstall_kalifast_bug_reporter' );