public static function get_instance() { if (is_null(self::$instance)) { self::$instance = new Akses(); } return self::$instance; }
/** * @wordpress-plugin * Plugin Name: Akses - Coworking Space Management * Plugin URI: https://wordpress.org/plugins/akses * Description: Akses is a coworking space management utility that allows you to manage the flow of your community members, i.e. this plugin is enabling you to check the members in and out as they are coming and going in your space. * Version: 0.0.0 * Author: Kumpul Coworking Space * Author URI: https://www.kumpul.co * License: GPLv2 or later * License URI: http://www.gnu.org/licenses/gpl-2.0.txt * Text Domain: akses * Domain Path: /languages */ defined('ABSPATH') or die('Why am I seeing this? https://codex.wordpress.org/Writing_a_Plugin#Plugin_Files'); require_once plugin_dir_path(__FILE__) . 'includes/class-akses.php'; Akses::get_instance()->init(); function akses_activate() { error_log("Activating Akses plugin"); flush_rewrite_rules(); do_action('akses_create_database'); do_action('akses_activated'); } function akses_deactivate() { error_log("Deactivating Akses plugin"); flush_rewrite_rules(); } register_activation_hook(AKSES_SCRIPT_FILE, 'akses_activate'); register_deactivation_hook(AKSES_SCRIPT_FILE, 'akses_deactivate');