Initial plugin scaffold: lesson scheduling WordPress plugin
Some checks failed
CI / Coding Standards (push) Failing after 2m31s
CI / PHPStan (push) Failing after 50s
CI / Tests (PHP 8.1) (push) Successful in 50s
CI / Tests (PHP 8.2) (push) Successful in 48s
CI / Tests (PHP 8.3) (push) Successful in 40s
CI / No Debug Code (push) Successful in 2s
Some checks failed
CI / Coding Standards (push) Failing after 2m31s
CI / PHPStan (push) Failing after 50s
CI / Tests (PHP 8.1) (push) Successful in 50s
CI / Tests (PHP 8.2) (push) Successful in 48s
CI / Tests (PHP 8.3) (push) Successful in 40s
CI / No Debug Code (push) Successful in 2s
- Custom DB tables for availability slots and lesson bookings - Instructor (wp-admin) and student (front-end) roles with custom capabilities - REST API under us-scheduler/v1 for availability CRUD and booking - [us_booking] and [us_student_login] shortcodes for student front end - PHPUnit + Brain\Monkey unit test suite (29 tests) - Gitea Actions CI: lint, PHPStan, tests on PHP 8.1/8.2/8.3, no-debug check - Feature docs under docs/features/ Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
41
unsupervised-schedular.php
Normal file
41
unsupervised-schedular.php
Normal file
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
/**
|
||||
* Plugin Name: Unsupervised Scheduler
|
||||
* Plugin URI: https://unsupervised.ca
|
||||
* Description: Instructor/student lesson scheduling for WordPress.
|
||||
* Version: 1.0.0
|
||||
* Requires at least: 6.0
|
||||
* Requires PHP: 8.1
|
||||
* Author: Unsupervised
|
||||
* License: GPL-2.0-or-later
|
||||
* Text Domain: unsupervised-schedular
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Unsupervised\Schedular;
|
||||
|
||||
if (! defined('ABSPATH')) {
|
||||
exit;
|
||||
}
|
||||
|
||||
define('USC_VERSION', '1.0.0');
|
||||
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 {
|
||||
flush_rewrite_rules();
|
||||
});
|
||||
|
||||
add_action('plugins_loaded', static function (): void {
|
||||
Plugin::boot();
|
||||
});
|
||||
Reference in New Issue
Block a user