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

- 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:
2026-03-30 12:44:46 -03:00
commit 0fbafc9d18
41 changed files with 2249 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
<?php
declare(strict_types=1);
if (! defined('ABSPATH')) {
exit;
}
?>
<div id="us-booking-app" data-nonce="<?php echo esc_attr(wp_create_nonce('wp_rest')); ?>">
<div id="us-slot-list">
<p><?php esc_html_e('Loading available slots…', 'unsupervised-schedular'); ?></p>
</div>
<div id="us-booking-confirmation" style="display:none;">
<p><?php esc_html_e('Your lesson has been booked. The instructor will confirm shortly.', 'unsupervised-schedular'); ?></p>
</div>
<div id="us-booking-error" style="display:none;" role="alert"></div>
</div>

View File

@@ -0,0 +1,37 @@
<?php
declare(strict_types=1);
if (! defined('ABSPATH')) {
exit;
}
/** @var string $error */
/** @var string $redirect */
?>
<div class="us-login-form">
<?php if ($error !== '') : ?>
<p class="us-error" role="alert"><?php echo esc_html($error); ?></p>
<?php endif; ?>
<form method="post" action="">
<?php wp_nonce_field('us_student_login'); ?>
<p>
<label for="log"><?php esc_html_e('Username', 'unsupervised-schedular'); ?></label>
<input type="text" name="log" id="log" autocomplete="username" required>
</p>
<p>
<label for="pwd"><?php esc_html_e('Password', 'unsupervised-schedular'); ?></label>
<input type="password" name="pwd" id="pwd" autocomplete="current-password" required>
</p>
<p>
<label>
<input type="checkbox" name="rememberme">
<?php esc_html_e('Remember me', 'unsupervised-schedular'); ?>
</label>
</p>
<p>
<input type="submit" name="us_login" value="<?php esc_attr_e('Log In', 'unsupervised-schedular'); ?>">
</p>
</form>
</div>