feat(ip-geo): full-chain IP 归属地 on comments, user home, center, post

This commit is contained in:
kate522 committed 2026-07-25 14:39:47 +08:00
1 parent 1f2ca3ac8f
commit ac7ff8d4f2
13 files changed
+457 -33

No files matched your search

+22 -11
View File
@@ -112,19 +112,30 @@ $pm_url = ($pm_enabled && $messages_url !== '')
}
?>
<?php if ($show_desc && $user->description) : ?>
<p class="aksrt-author-hero__desc"><?php echo esc_html($user->description); ?></p>
<?php
// IP 归属地 (zibll author_header_identity / user_city_s).
$city_badge = function_exists('aksrt_get_user_city_badge_html')
? 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 echo $city_badge; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
<?php endif; ?>
<?php if (!empty($signals)) : ?>
<?php foreach ($signals as $signal) : ?>
<span class="aksrt-identity-chip aksrt-identity-chip--<?php echo esc_attr($signal['tone']); ?>">
<i class="fas fa-<?php echo esc_attr($signal['icon']); ?>" aria-hidden="true"></i>
<span><?php echo esc_html($signal['label']); ?></span>
</span>
<?php endforeach; ?>
<?php endif; ?>
</div>
<?php endif; ?>
<?php if (!empty($signals)) : ?>
<div class="aksrt-identity-chips">
<?php foreach ($signals as $signal) : ?>
<span class="aksrt-identity-chip aksrt-identity-chip--<?php echo esc_attr($signal['tone']); ?>">
<i class="fas fa-<?php echo esc_attr($signal['icon']); ?>" aria-hidden="true"></i>
<span><?php echo esc_html($signal['label']); ?></span>
</span>
<?php endforeach; ?>
</div>
<?php if ($show_desc && $user->description) : ?>
<p class="aksrt-author-hero__desc"><?php echo esc_html($user->description); ?></p>
<?php endif; ?>
<?php if (!empty($notice) && is_array($notice)) : ?>