小优化

This commit is contained in:
2026-08-23 15:11:17 +08:00
parent 176a7d3091
commit 0ffd045576
3 changed files with 88 additions and 2 deletions
+5 -2
View File
@@ -56,6 +56,7 @@ if ($follower_count <= 0 && class_exists('\AKSRT\User\Follow')) {
}
$messages_url = function_exists('aksrt_get_messages_page_url') ? aksrt_get_messages_page_url() : '';
$unread_count = $is_own ? aksrt_get_user_unread_notification_count($user_id) : 0;
?><div class="aksrt-author-hero<?php echo $show_cover ? '' : ' aksrt-author-hero--no-cover'; ?>">
<?php if ($show_cover) : ?>
<div class="aksrt-author-hero__cover">
@@ -142,9 +143,11 @@ $messages_url = function_exists('aksrt_get_messages_page_url') ? aksrt_get_messa
<span><?php esc_html_e('用户中心', 'aksrt'); ?></span>
</a>
<?php if ($show_message && $messages_url !== '') : ?>
<a href="<?php echo esc_url($messages_url); ?>" class="btn-ghost btn-sm">
<a href="<?php echo esc_url($messages_url); ?>" class="btn-ghost btn-sm btn-icon aksrt-author-hero__message-btn" aria-label="<?php esc_attr_e('消息通知', 'aksrt'); ?>" title="<?php esc_attr_e('消息通知', 'aksrt'); ?>">
<i class="fa fas fa-bell" aria-hidden="true"></i>
<span><?php esc_html_e('消息', 'aksrt'); ?></span>
<?php if ($unread_count > 0) : ?>
<span class="aksrt-author-hero__action-badge"><?php echo esc_html((string) $unread_count); ?></span>
<?php endif; ?>
</a>
<?php endif; ?>
<?php else : ?>