Show only the name and email, not who the account books for
CI / Tests (PHP 8.2) (pull_request) Successful in 41s
CI / Tests (PHP 8.1) (pull_request) Successful in 42s
CI / No Debug Code (pull_request) Successful in 2s
CI / PHPStan (pull_request) Successful in 2m48s
CI / Coding Standards (pull_request) Successful in 3m1s
CI / Tests (PHP 8.3) (pull_request) Successful in 2m44s
CI / Build Plugin Zip (pull_request) Skipped

The block reports who is signed in and nothing more. Dropping the "Booking
for …" line takes GuardianService with it — it was the only reason the page
had a dependency at all, so AccountPage now constructs with no arguments.

Co-Authored-By: Claude Opus 5 <[email protected]>
This commit is contained in:
2026-07-29 22:42:25 -03:00
co-authored by Claude Opus 5
parent 6e3affb1cb
commit ab5212282d
9 changed files with 7 additions and 84 deletions
-13
View File
@@ -8,7 +8,6 @@ if (! defined('ABSPATH')) {
/**
* @var string $name Display name of the signed-in visitor.
* @var string $email Their account email.
* @var list<string> $students Names this account books for, excluding themselves; empty for a plain student account.
* @var string $logoutUrl Nonced sign-out URL, already carrying its redirect.
*/
?>
@@ -20,18 +19,6 @@ if (! defined('ABSPATH')) {
<?php endif; ?>
</p>
<?php if (! empty($students)) : ?>
<p class="us-account-students">
<?php
printf(
/* translators: %s: comma-separated list of the students this account books for. */
esc_html__('Booking for %s', 'unsupervised-schedular'),
esc_html(implode(', ', $students))
);
?>
</p>
<?php endif; ?>
<p class="us-account-actions">
<a class="us-account-signout" href="<?php echo esc_url($logoutUrl); ?>"><?php esc_html_e('Sign out', 'unsupervised-schedular'); ?></a>
</p>