fix(comments): match avatar identity layout

This commit is contained in:
kate522 committed 2026-09-27 00:37:00 +08:00
1 parent 47bf9c8f0b
commit 26ac8167f3
14 files changed
+51 -176

No files matched your search

+10 -10
View File
@@ -511,18 +511,18 @@ if (!function_exists('aksrt_comments_render_form')) :
<div class="comt-title text-center flex0 mr10">
<?php if ($is_logged_in && $current_user instanceof WP_User) : ?>
<div class="comt-avatar mb10">
<?php echo get_avatar($current_user->ID, 60, '', '', ['class' => 'avatar']); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
<?php echo aksrt_get_avatar_html($current_user->ID, 96, ['class' => 'avatar']); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- canonical avatar helper escapes output. ?>
</div>
<p class="text-ellipsis muted-2-color"><?php echo function_exists('aksrt_render_vip_badge') ? aksrt_render_vip_badge($current_user->ID) : ''; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- vip 徽章内部已转义。 ?><?php echo esc_html($current_user->display_name); ?></p>
<p class="text-ellipsis muted-2-color"><?php echo function_exists('aksrt_get_vip_icon') ? aksrt_get_vip_icon($current_user->ID, 'em12 mr3') : ''; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- VIP helper escapes output. ?><?php echo esc_html($current_user->display_name); ?></p>
<?php else : ?>
<div class="comt-avatar mb10">
<?php echo get_avatar(0, 60, '', '', ['class' => 'avatar']); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
</div>
<p data-toggle-class="open" data-target="#comment-user-info" data-toggle="tooltip" title="<?php esc_attr_e('填写用户信息', 'aksrt'); ?>">
<?php echo $comment_author !== '' ? esc_html($comment_author) : esc_html__('昵称', 'aksrt'); ?>
</p>
<?php endif; ?>
</div>
<div class="comt-avatar mb10">
<?php echo aksrt_get_avatar_html(0, 96, ['class' => 'avatar']); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- canonical avatar helper escapes output. ?>
</div>
<p class="" data-toggle-class="open" data-target="#comment-user-info" data-toggle="tooltip" title="<?php esc_attr_e('填写用户信息', 'aksrt'); ?>">
<?php echo $comment_author !== '' ? esc_html($comment_author) : esc_html__('昵称', 'aksrt'); ?>
</p>
<?php endif; ?>
</div>
<div class="comt-box grow1">
<div class="action-text mb10 em09 muted-2-color" id="comment-reply-info" style="display:none;"></div>
<textarea placeholder="<?php echo esc_attr($placeholder); ?>" autoheight="true" maxheight="188" class="form-control grin" name="comment" id="comment" cols="100%" rows="4" tabindex="1"></textarea>