feat(users): normalize center routes and withdrawal limits

This commit is contained in:
kate522 committed 2026-08-12 19:44:47 +08:00
1 parent 9004f7093f
commit dacd0095bf
24 files changed
+326 -174

No files matched your search

+5 -8
View File
@@ -106,13 +106,7 @@ if (!function_exists('aksrt_get_user_center_tab_url')) {
if ('invite' === $tab || 'promotion' === $tab) {
$tab = 'revenue';
}
$url = remove_query_arg([
'tab', 'posts_page', 'comments_page', 'favorites_page', 'credits_page',
'post_status', 'creator_page', 'creator_status', 'saved', 'profile_error',
'order_tab', 'otab', 'order_status', 'order_page', 'order_type', 'income_currency', 'income_status', 'income_page', 'section',
], aksrt_get_user_center_url());
return add_query_arg('tab', $tab, $url);
return aksrt_get_user_center_url($tab);
}
}
@@ -282,7 +276,10 @@ if (!function_exists('aksrt_user_center_resolve_tabs')) {
$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 = (string) get_query_var('aksrt_user_center_tab') ?: $default;
if ($active === 'balance') {
$active = 'credits';
}
if ('signin' === $active || 'assets' === $active) {
$active = 'credits';
} elseif ('invite' === $active || 'promotion' === $active) {