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]>
26 lines
772 B
PHP
26 lines
772 B
PHP
<?php
|
|
declare(strict_types=1);
|
|
|
|
if (! defined('ABSPATH')) {
|
|
exit;
|
|
}
|
|
|
|
/**
|
|
* @var string $name Display name of the signed-in visitor.
|
|
* @var string $email Their account email.
|
|
* @var string $logoutUrl Nonced sign-out URL, already carrying its redirect.
|
|
*/
|
|
?>
|
|
<div class="us-account">
|
|
<p class="us-account-who">
|
|
<span class="us-account-name"><?php echo esc_html($name); ?></span>
|
|
<?php if ($email !== '') : ?>
|
|
<span class="us-account-email"><?php echo esc_html($email); ?></span>
|
|
<?php endif; ?>
|
|
</p>
|
|
|
|
<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>
|
|
</div>
|