fix: improve promotion tabs and referral layout

This commit is contained in:
kate522 committed 2026-08-16 21:28:02 +08:00
1 parent 5b9f54f5ac
commit 853114a9f9
18 files changed
+127 -602

No files matched your search

+1 -4
View File
@@ -53,12 +53,9 @@ add_action('template_redirect', function () {
return;
}
$tab = $tab === 'balance' ? 'credits' : sanitize_key($tab);
if ($tab === 'revenue') {
$tab = 'promotion';
}
$allowed = class_exists('\\AKSRT\\User\\Center')
? array_keys(\AKSRT\User\Center::get_instance()->get_dashboard_tabs())
: ['profile', 'level', 'creator', 'posts', 'follow', 'comments', 'favorites', 'credits', 'vip', 'orders', 'auth', 'promotion', 'settings'];
: ['profile', 'level', 'creator', 'posts', 'follow', 'comments', 'favorites', 'credits', 'vip', 'orders', 'auth', 'revenue', 'settings'];
if (!in_array($tab, $allowed, true)) {
global $wp_query;
if ($wp_query instanceof WP_Query) { $wp_query->set_404(); }