feat(ux): author-card follow + dual-write checkin day metas
Author sidebar card can follow target users; sign-in now mirrors checkin_all_day / continuous meta for zibll-compatible ranking.
This commit is contained in:
1 parent
c102c9d16d
commit
c5a0c57697
1 file changed
+8
-1
@@ -159,8 +159,15 @@ class Signin {
|
|||||||
// Keep lightweight meta for header/badge consumers (zibll checkin_all_day).
|
// Keep lightweight meta for header/badge consumers (zibll checkin_all_day).
|
||||||
update_user_meta($user_id, 'aksrt_signin_' . $today_str, 1);
|
update_user_meta($user_id, 'aksrt_signin_' . $today_str, 1);
|
||||||
$all_day = (int) get_user_meta($user_id, 'aksrt_checkin_all_day', true);
|
$all_day = (int) get_user_meta($user_id, 'aksrt_checkin_all_day', true);
|
||||||
update_user_meta($user_id, 'aksrt_checkin_all_day', $all_day + 1);
|
if ($all_day <= 0) {
|
||||||
|
// Fallback to zibll key if migrated users only have that meta.
|
||||||
|
$all_day = (int) get_user_meta($user_id, 'checkin_all_day', true);
|
||||||
|
}
|
||||||
|
$all_day = $all_day + 1;
|
||||||
|
update_user_meta($user_id, 'aksrt_checkin_all_day', $all_day);
|
||||||
|
update_user_meta($user_id, 'checkin_all_day', $all_day); // zibll alias
|
||||||
update_user_meta($user_id, 'aksrt_checkin_continuous_day', $new_streak);
|
update_user_meta($user_id, 'aksrt_checkin_continuous_day', $new_streak);
|
||||||
|
update_user_meta($user_id, 'checkin_continuous_day', $new_streak); // zibll alias
|
||||||
|
|
||||||
return new \WP_REST_Response([
|
return new \WP_REST_Response([
|
||||||
'success' => true,
|
'success' => true,
|
||||||
|
|||||||
Reference in new issue
Block a user