fix: 认证图标与用户名同行
This commit is contained in:
1 parent
06a03fd9cf
commit
d9a3685001
2 files changed
+30
-47
No files matched your search
@@ -46,30 +46,20 @@ extract($context, EXTR_SKIP); // phpcs:ignore WordPress.PHP.DontExtract.extract_
|
||||
echo \AKSRT\User\Level::get_badge_html((int) $user_id); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
||||
}
|
||||
?>
|
||||
</h1>
|
||||
<?php if ($target_user->description) : ?>
|
||||
<p class="uc-header__desc"><?php echo esc_html($target_user->description); ?></p>
|
||||
<?php endif; ?>
|
||||
<?php if (!empty($profile_signals)) : ?>
|
||||
<div class="aksrt-identity-chips">
|
||||
<?php foreach ($profile_signals as $signal) : ?>
|
||||
<?php
|
||||
// Level is rendered inline next to the name above; skip it here.
|
||||
if ((string) ($signal['type'] ?? '') === 'level') {
|
||||
continue;
|
||||
<?php
|
||||
foreach ($profile_signals as $signal) {
|
||||
if ((string) ($signal['type'] ?? '') !== 'verify') {
|
||||
continue;
|
||||
}
|
||||
$icon_url = esc_url((string) ($signal['icon_url'] ?? ''));
|
||||
if ($icon_url !== '') {
|
||||
echo '<img class="aksrt-identity-certification-icon img-icon ml3" src="' . $icon_url . '" alt="" title="' . esc_attr((string) ($signal['title'] ?? $signal['label'] ?? '')) . '" loading="lazy" decoding="async" />';
|
||||
}
|
||||
}
|
||||
?>
|
||||
<span class="aksrt-identity-chip aksrt-identity-chip--<?php echo esc_attr($signal['tone']); ?>" title="<?php echo esc_attr((string) ($signal['title'] ?? $signal['label'])); ?>">
|
||||
<?php $icon_url = esc_url((string) ($signal['icon_url'] ?? '')); ?>
|
||||
<?php if ($icon_url !== '') : ?>
|
||||
<img class="aksrt-identity-certification-icon img-icon" src="<?php echo $icon_url; ?>" alt="<?php echo esc_attr($signal['label']); ?>" loading="lazy" decoding="async">
|
||||
<?php else : ?>
|
||||
<i class="fas fa-<?php echo esc_attr($signal['icon']); ?>" aria-hidden="true"></i>
|
||||
<?php endif; ?>
|
||||
<span><?php echo esc_html($signal['label']); ?></span>
|
||||
</span>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
</h1>
|
||||
<?php if ($target_user->description) : ?>
|
||||
<p class="uc-header__desc"><?php echo esc_html($target_user->description); ?></p>
|
||||
<?php endif; ?>
|
||||
<div class="uc-header__meta desc user-identity flex ac hh">
|
||||
<span class="uc-header__meta-item" title="<?php esc_attr_e('用户名', 'aksrt'); ?>">
|
||||
|
||||
Reference in new issue
Block a user