Files
unsupervised-scheduler/unsupervised-schedular.php
T
thatguygriffandClaude Fable 5 0d9aafbb5b
CI / Tests (PHP 8.2) (pull_request) Successful in 37s
CI / Tests (PHP 8.1) (pull_request) Successful in 44s
CI / No Debug Code (pull_request) Successful in 2s
CI / Coding Standards (pull_request) Successful in 2m55s
CI / PHPStan (pull_request) Successful in 2m54s
CI / Tests (PHP 8.3) (pull_request) Successful in 2m36s
CI / Build Plugin Zip (pull_request) Skipped
Bump plugin version so the us_invites schema migration actually runs
PR #83 added kind and expires_at to us_invites and the repository started
writing them, but USC_VERSION stayed at 1.0.0-rc.2 — Plugin::boot() only
re-runs Installer/dbDelta on a version mismatch, so upgraded sites never got
the columns. Every invite insert then failed silently: nothing appeared under
Pending Invites while the admin was still shown a registration link whose
token hash was never stored.

- Version / USC_VERSION -> 1.0.0-rc.3 (triggers dbDelta on next load).
- InviteRepository::insert() returns 0 on failure instead of a stale
  insert_id, and the Invites page now shows an error notice instead of a
  dead link when creation fails (personal and group forms), including
  clearer validation messages.
- CLAUDE.md: schema changes must bump the version.

Closes #87

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-07-22 11:37:14 -03:00

43 lines
1.1 KiB
PHP

<?php
/**
* Plugin Name: Unsupervised Scheduler
* Plugin URI: https://unsupervised.ca
* Description: Instructor/student lesson scheduling for WordPress.
* Version: 1.0.0-rc.3
* Requires at least: 6.2
* Requires PHP: 8.1
* Author: Unsupervised
* 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.0.0-rc.3');
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();
});