fix(widgets): align user card presentation
This commit is contained in:
@@ -122,14 +122,11 @@ class WidgetUserCard extends \WP_Widget {
|
||||
$name_html = function_exists('aksrt_get_user_name')
|
||||
? aksrt_get_user_name([
|
||||
'id' => $user_id,
|
||||
'vip' => false,
|
||||
'vip' => true,
|
||||
'follow' => !$is_self,
|
||||
'class' => 'aksrt-user-card__name-row',
|
||||
])
|
||||
: '<a href="' . esc_url($profile_url) . '">' . esc_html($user->display_name) . '</a>';
|
||||
$vip_badge = function_exists('aksrt_render_vip_badge')
|
||||
? (string) aksrt_render_vip_badge($user_id, 'sm')
|
||||
: '';
|
||||
$checkin_btn = '';
|
||||
if ($show_checkin && $is_self && function_exists('aksrt_header_user_checkin_btn')) {
|
||||
$checkin_btn = aksrt_header_user_checkin_btn($user_id, true);
|
||||
@@ -150,9 +147,6 @@ class WidgetUserCard extends \WP_Widget {
|
||||
$ph = get_template_directory_uri() . '/assets/img/placeholder.svg';
|
||||
echo '<a href="' . esc_url($profile_url) . '"><img class="aksrt-lazy lazyload" data-src="' . esc_url($avatar_url) . '" src="' . esc_url($ph) . '" alt="' . esc_attr($user->display_name) . '" loading="lazy" width="76" height="76" /></a>';
|
||||
echo '</div>';
|
||||
if ($vip_badge !== '') {
|
||||
echo $vip_badge; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
||||
}
|
||||
echo '</div>';
|
||||
echo '<h4 class="aksrt-user-card__name user-name">' . $name_html . '</h4>'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
||||
if ($bio !== '') {
|
||||
|
||||
Reference in New Issue
Block a user