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:
kate522 committed 2026-08-03 22:29:35 +08:00
commit 8318e02f77
1 file changed
+3 -1
+3 -1
View File
@@ -280,7 +280,9 @@ if (!function_exists('aksrt_user_center_resolve_tabs')) {
]; ];
$tabs = aksrt_normalize_user_center_tabs($tabs); $tabs = aksrt_normalize_user_center_tabs($tabs);
$keys = array_keys($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; $active = isset($_GET['tab']) ? sanitize_key(wp_unslash($_GET['tab'])) : $default;
if ('signin' === $active || 'assets' === $active) { if ('signin' === $active || 'assets' === $active) {
$active = 'credits'; $active = 'credits';