fix: 认证图标与用户名同行
This commit is contained in:
@@ -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'); ?>">
|
||||
|
||||
@@ -92,18 +92,20 @@ $pm_url = ($pm_enabled && $messages_url !== '')
|
||||
<div class="aksrt-author-hero__info">
|
||||
<?php if ($show_name) : ?>
|
||||
<h1 class="aksrt-author-hero__name">
|
||||
<?php echo esc_html($user->display_name); ?>
|
||||
<?php
|
||||
$vip_badge = function_exists('aksrt_render_vip_badge') ? aksrt_render_vip_badge($user_id) : '';
|
||||
if ($vip_badge) {
|
||||
echo $vip_badge; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
||||
}
|
||||
// Level icon inline to the right of the name (zibll parity).
|
||||
if (class_exists('\AKSRT\User\Level') && method_exists('\AKSRT\User\Level', 'get_badge_html')) {
|
||||
echo \AKSRT\User\Level::get_badge_html($user_id); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
||||
}
|
||||
?>
|
||||
</h1>
|
||||
<?php echo esc_html($user->display_name); ?>
|
||||
<?php
|
||||
$vip_badge = function_exists('aksrt_render_vip_badge') ? aksrt_render_vip_badge($user_id) : '';
|
||||
if ($vip_badge) {
|
||||
echo $vip_badge; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
||||
}
|
||||
if (function_exists('aksrt_render_user_identity_chips')) {
|
||||
echo aksrt_render_user_identity_chips($user_id, 'author', [
|
||||
'include_vip' => false,
|
||||
'skip_level' => false,
|
||||
]); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
||||
}
|
||||
?>
|
||||
</h1>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
@@ -122,21 +124,12 @@ $pm_url = ($pm_enabled && $messages_url !== '')
|
||||
? aksrt_get_user_city_badge_html($user_id, 'user_home', 'badg')
|
||||
: '';
|
||||
?>
|
||||
<?php if ($city_badge !== '' || !empty($signals)) : ?>
|
||||
<div class="aksrt-author-hero__identity user-identity flex ac hh">
|
||||
<?php if ($city_badge !== '') : ?>
|
||||
<?php if ($city_badge !== '') : ?>
|
||||
<div class="aksrt-author-hero__identity user-identity flex ac hh">
|
||||
<?php echo $city_badge; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php if (function_exists('aksrt_render_user_identity_chips')) : ?>
|
||||
<?php
|
||||
// Level already rendered inline next to the name above; skip it here.
|
||||
echo aksrt_render_user_identity_chips($user_id, 'author', ['include_vip' => false, 'skip_level' => true]); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
||||
?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($show_desc && $user->description) : ?>
|
||||
<?php if ($show_desc && $user->description) : ?>
|
||||
<p class="aksrt-author-hero__desc"><?php echo esc_html($user->description); ?></p>
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user