Files
unsupervised-scheduler/unsupervised-schedular.php
T

45 lines
1.3 KiB
PHP

<?php
/**
* Plugin Name: Unsupervised Scheduler
* Plugin URI: https://git.unsupervised.ca/Unsupervised/unsupervised-scheduler
* Description: Instructor/student lesson scheduling for WordPress.
* Version: 1.2.1
* Requires at least: 6.2
* Requires PHP: 8.1
* Author: Unsupervised
* Author URI: https://unsupervised.ca
* License: GPL-2.0-or-later
* Text Domain: unsupervised-schedular
* Update URI: https://git.unsupervised.ca/Unsupervised/unsupervised-scheduler
*/
declare(strict_types=1);
namespace Unsupervised\Schedular;
if (! defined('ABSPATH')) {
exit;
}
define('USC_VERSION', '1.2.1');
define('USC_PLUGIN_FILE', __FILE__);
define('USC_PLUGIN_DIR', plugin_dir_path(__FILE__));
define('USC_PLUGIN_URL', plugin_dir_url(__FILE__));
define('USC_TABLE_AVAILABILITY', $GLOBALS['wpdb']->prefix . 'us_availability');
define('USC_TABLE_LESSONS', $GLOBALS['wpdb']->prefix . 'us_lessons');
require_once USC_PLUGIN_DIR . 'vendor/autoload.php';
register_activation_hook(__FILE__, static function (): void {
(new Installer())->run();
});
register_deactivation_hook(__FILE__, static function (): void {
wp_clear_scheduled_hook('us_generate_due_payments');
flush_rewrite_rules();
});
add_action('plugins_loaded', static function (): void {
Plugin::boot();
});