fix: 完善认证图标展示

This commit is contained in:
kate522 committed 2026-07-31 11:01:33 +08:00
1 parent ec63b446e8
commit 370ddc70d3
1 file changed
+6 -1
@@ -59,8 +59,13 @@ extract($context, EXTR_SKIP); // phpcs:ignore WordPress.PHP.DontExtract.extract_
continue; continue;
} }
?> ?>
<span class="aksrt-identity-chip aksrt-identity-chip--<?php echo esc_attr($signal['tone']); ?>"> <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> <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 echo esc_html($signal['label']); ?></span>
</span> </span>
<?php endforeach; ?> <?php endforeach; ?>