Merge pull request 'feat(users): default user center to VIP' (#372) from worktree-prd-user-center-sidebar-vip-entry into main

Reviewed-on: CYL/wordpress-theme-aksrt#372
This commit is contained in:
2026-08-03 22:29:35 +08:00
+3 -1
View File
@@ -280,7 +280,9 @@ if (!function_exists('aksrt_user_center_resolve_tabs')) {
];
$tabs = aksrt_normalize_user_center_tabs($tabs);
$keys = array_keys($tabs);
$default = in_array('profile', $keys, true) ? 'profile' : ($keys[0] ?? 'profile');
$default = in_array('vip', $keys, true)
? 'vip'
: (in_array('profile', $keys, true) ? 'profile' : ($keys[0] ?? 'profile'));
$active = isset($_GET['tab']) ? sanitize_key(wp_unslash($_GET['tab'])) : $default;
if ('signin' === $active || 'assets' === $active) {
$active = 'credits';