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
@@ -19,7 +19,7 @@ $author_id = (int) get_the_author_meta('ID');
|
||||
$author_name = get_the_author();
|
||||
$author_url = function_exists('jio_get_user_home_url') ? jio_get_user_home_url($author_id) : get_author_posts_url($author_id);
|
||||
|
||||
// 时间显示:完全按参考主题 zib_get_post_time_tooltip 的分支顺序。
|
||||
// 时间显示分支顺序:
|
||||
// 1) 数据源 date → 发布时间
|
||||
// 2) 非已发布状态 → 更新时间
|
||||
// 3) 更新时间 > 发布时间 → 文案用更新时间+「更新」,tooltip 仍为发布时间+「发布」
|
||||
@@ -43,7 +43,7 @@ if ($time_source === 'date') {
|
||||
$rel_label = __('发布', 'jio');
|
||||
$abs_fmt = $published_title;
|
||||
} elseif (!$is_published) {
|
||||
// 2) 草稿/待审等:参考固定展示更新时间。
|
||||
// 2) 草稿/待审等:固定展示更新时间。
|
||||
$time_mysql = $modified_mysql;
|
||||
$rel_label = __('更新', 'jio');
|
||||
$abs_fmt = $modified_title;
|
||||
@@ -78,7 +78,7 @@ $name_html = jio_get_user_name([
|
||||
]);
|
||||
$follow_html = jio_get_user_follow('px12-sm ml10 follow but c-red', $author_id);
|
||||
$reward_button = get_current_user_id() !== $author_id && function_exists('jio_get_rewards_button')
|
||||
? jio_get_rewards_button($author_id, 'ml6 but c-yellow px12-sm', get_the_ID())
|
||||
? jio_get_rewards_button($author_id, 'ml6 but c-blue px12-sm', get_the_ID())
|
||||
: '';
|
||||
?>
|
||||
|
||||
|
||||
Reference in new issue
Block a user