feat(single): align author bar follow and reward actions with the site flows
- guests get the sign-in trigger instead of a redirect to the login page, for both follow and wallet reward controls - follow requests swap the label for an inline loader and block a second submit; the followed state uses the .actived hook - follower counts sync through data-follow-count on the user homepage (the previous selector matched nothing) and only for the viewed profile - reward button uses the secondary action colour; the reward template is only rendered for signed-in visitors - drop the unused author-hero aria-disabled rule and stale wording in the touched comments Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
8ad5ef9aff
commit
d40906b4a3
13 files changed
+148
-56
No files matched your search
@@ -76,8 +76,8 @@ $show_header_notification = !empty($notification_settings['enabled'])
|
||||
&& in_array('user_home_header', (array) ($notification_settings['icon_show'] ?? []), true);
|
||||
$messages_url = $show_header_notification && function_exists('jio_get_messages_page_url') ? jio_get_messages_page_url() : '';
|
||||
$unread_count = $is_own ? jio_get_user_unread_notification_count($user_id) : 0;
|
||||
// 封面三点菜单末项:管理员 → 禁封/解封(参考主题 author_header_drop_lists 钩子语义,
|
||||
// 禁封权限优先于举报);否则 → 举报用户(保持既有契约)。
|
||||
// 封面三点菜单末项:管理员 → 禁封/解封(禁封权限优先于举报);
|
||||
// 否则 → 举报用户(保持既有契约)。
|
||||
$cover_ban_html = function_exists('jio_get_user_cover_menu_action_html')
|
||||
? jio_get_user_cover_menu_action_html($user_id)
|
||||
: '';
|
||||
@@ -151,8 +151,8 @@ $show_cover_menu = $has_more_details || $show_cover_report || $cover_ban_html !=
|
||||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
// 治理状态徽章占据身份行元信息位(参考主题 author_header_identity 钩子:
|
||||
// 红=违规已封号 / 黄=小黑屋禁封中 / 灰=禁言中,字段与颜色统一管理)。
|
||||
// 治理状态徽章占据身份行元信息位:
|
||||
// 红=违规已封号 / 黄=小黑屋禁封中 / 灰=禁言中,字段与颜色统一管理。
|
||||
$ban_badge = function_exists('jio_get_user_ban_identity_badge')
|
||||
? jio_get_user_ban_identity_badge($user_id)
|
||||
: '';
|
||||
@@ -194,7 +194,7 @@ $show_cover_menu = $has_more_details || $show_cover_report || $cover_ban_html !=
|
||||
<?php endif; ?>
|
||||
<?php else : ?>
|
||||
<?php if ($show_follow) : ?>
|
||||
<?php echo jio_get_user_follow('btn-outline btn-sm jio-author-hero__follow-btn', (int) $user_id, null, null, __('登录后关注', 'jio')); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
|
||||
<?php echo jio_get_user_follow('btn-outline btn-sm jio-author-hero__follow-btn', (int) $user_id); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
Reference in new issue
Block a user