feat(single): identity chips, comment 神评, reward open from author bar
Share VIP/verify/level/badge chrome via aksrt-identity helpers on author bar, author card, and comments; mark hot comments; open reward modal from author actions; admin threshold for 神评; task list go-to actions.
This commit is contained in:
1 parent
a0748c08fe
commit
defb64fd89
9 files changed
+166
-26
No files matched your search
@@ -48,12 +48,10 @@ $aksrt_msg_url = function_exists('aksrt_get_messages_page_url') ? aksrt_get_mess
|
||||
$login_url = function_exists('aksrt_get_login_url') ? aksrt_get_login_url() : wp_login_url(get_permalink());
|
||||
$is_self = is_user_logged_in() && get_current_user_id() === $author_id;
|
||||
|
||||
// Identity chips: VIP + verify/level/badges.
|
||||
$vip_badge = function_exists('aksrt_render_vip_badge') ? aksrt_render_vip_badge($author_id, 'sm') : '';
|
||||
$signals = [];
|
||||
if (class_exists('AKSRT_User_Home')) {
|
||||
$signals = AKSRT_User_Home::get_instance()->get_profile_signals($author_id);
|
||||
}
|
||||
// Identity chips: VIP + verify/level/badges (shared helper).
|
||||
$identity_chips = function_exists('aksrt_render_user_identity_chips')
|
||||
? aksrt_render_user_identity_chips($author_id, 'author')
|
||||
: '';
|
||||
?>
|
||||
|
||||
<div class="<?php echo esc_attr($classes); ?>">
|
||||
@@ -71,15 +69,9 @@ if (class_exists('AKSRT_User_Home')) {
|
||||
<div class="flex1">
|
||||
<span class="name flex ac flex1">
|
||||
<a class="display-name text-ellipsis" href="<?php echo esc_url($author_url); ?>"><?php echo esc_html($author_name); ?></a>
|
||||
<?php if ($vip_badge !== '') : ?>
|
||||
<?php echo $vip_badge; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
|
||||
<?php if ($identity_chips !== '') : ?>
|
||||
<?php echo $identity_chips; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
|
||||
<?php endif; ?>
|
||||
<?php foreach ($signals as $signal) : ?>
|
||||
<span class="badg badg-sm ml3 aksrt-identity-chip aksrt-identity-chip--<?php echo esc_attr((string) ($signal['tone'] ?? 'info')); ?>">
|
||||
<i class="fa fa-<?php echo esc_attr((string) ($signal['icon'] ?? 'check')); ?>" aria-hidden="true"></i>
|
||||
<?php echo esc_html((string) ($signal['label'] ?? '')); ?>
|
||||
</span>
|
||||
<?php endforeach; ?>
|
||||
</span>
|
||||
<div class="px12-sm muted-2-color text-ellipsis">
|
||||
<?php if ($show_time) : ?>
|
||||
|
||||
Reference in new issue
Block a user