fix: expose affiliate promotion center
This commit is contained in:
1 parent
99db790a6f
commit
f70eca09d1
3 files changed
+26
-3
No files matched your search
@@ -10,11 +10,31 @@ defined('ABSPATH') || exit;
|
||||
$level_url = isset($dashboard_tabs['level'])
|
||||
? aksrt_get_user_center_tab_url('level')
|
||||
: '';
|
||||
$promotion_url = isset($dashboard_tabs['promotion'])
|
||||
? aksrt_get_user_center_tab_url('promotion')
|
||||
: '';
|
||||
$revenue_url = isset($dashboard_tabs['revenue'])
|
||||
? aksrt_get_user_center_tab_url('revenue')
|
||||
: '';
|
||||
$auth_url = isset($dashboard_tabs['auth']) ? aksrt_get_user_center_tab_url('auth') : '';
|
||||
$orders_available = isset($dashboard_tabs['orders']);
|
||||
$orders_url = $orders_available ? (string) ($orders_url ?? '') : '';
|
||||
|
||||
$services = array_values(array_filter([
|
||||
[
|
||||
'label' => __('推广中心', 'aksrt'),
|
||||
'icon' => 'share-alt',
|
||||
'tone' => 'promotion',
|
||||
'url' => $promotion_url,
|
||||
'tab' => 'promotion',
|
||||
],
|
||||
[
|
||||
'label' => __('收益中心', 'aksrt'),
|
||||
'icon' => 'chart-line',
|
||||
'tone' => 'revenue',
|
||||
'url' => $revenue_url,
|
||||
'tab' => 'revenue',
|
||||
],
|
||||
[
|
||||
'label' => __('我的等级', 'aksrt'),
|
||||
'icon' => 'chart-line',
|
||||
|
||||
@@ -20,7 +20,7 @@ if (!function_exists('aksrt_get_user_center_url')) :
|
||||
*/
|
||||
function aksrt_get_user_center_url(string $tab = ''): string {
|
||||
$tab = sanitize_key($tab ?: 'vip');
|
||||
$aliases = ['assets' => 'credits', 'signin' => 'credits', 'invite' => 'revenue', 'promotion' => 'revenue'];
|
||||
$aliases = ['assets' => 'credits', 'signin' => 'credits', 'invite' => 'promotion', 'promotion' => 'promotion'];
|
||||
$tab = $aliases[$tab] ?? $tab;
|
||||
$path_tab = $tab === 'credits' ? 'balance' : $tab;
|
||||
return get_option('permalink_structure')
|
||||
|
||||
Reference in new issue
Block a user