fix: improve promotion tabs and referral layout
This commit is contained in:
1 parent
5b9f54f5ac
commit
853114a9f9
18 files changed
+127
-602
No files matched your search
@@ -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(); }
|
||||
|
||||
Reference in new issue
Block a user