fix: improve promotion tabs and referral layout
This commit is contained in:
1 parent
7a2319a9a9
commit
7baba60cac
2 files changed
+9
-10
No files matched your search
@@ -8,8 +8,9 @@
|
|||||||
defined('ABSPATH') || exit;
|
defined('ABSPATH') || exit;
|
||||||
|
|
||||||
$creation_url = isset($dashboard_tabs['creator']) ? aksrt_get_user_center_tab_url('creator') : '';
|
$creation_url = isset($dashboard_tabs['creator']) ? aksrt_get_user_center_tab_url('creator') : '';
|
||||||
|
$revenue_url = isset($dashboard_tabs['revenue']) ? aksrt_get_user_center_tab_url('revenue') : '';
|
||||||
|
|
||||||
if ($creation_url === '') {
|
if ($creation_url === '' && $revenue_url === '') {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
@@ -21,4 +22,11 @@ if ($creation_url === '') {
|
|||||||
<i class="fas fa-angle-right" aria-hidden="true"></i>
|
<i class="fas fa-angle-right" aria-hidden="true"></i>
|
||||||
</a>
|
</a>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
<?php if ($revenue_url !== '') : ?>
|
||||||
|
<a class="uc-center-card uc-center-card--revenue" href="<?php echo esc_url($revenue_url); ?>" data-tab="revenue">
|
||||||
|
<span class="uc-center-card__icon"><i class="fas fa-chart-line" aria-hidden="true"></i></span>
|
||||||
|
<span><strong><?php esc_html_e('推广收益', 'aksrt'); ?></strong><small><?php esc_html_e('推广佣金明细', 'aksrt'); ?></small></span>
|
||||||
|
<i class="fas fa-angle-right" aria-hidden="true"></i>
|
||||||
|
</a>
|
||||||
|
<?php endif; ?>
|
||||||
</div>
|
</div>
|
||||||
@@ -13,8 +13,6 @@ $level_url = isset($dashboard_tabs['level'])
|
|||||||
$auth_url = isset($dashboard_tabs['auth']) ? aksrt_get_user_center_tab_url('auth') : '';
|
$auth_url = isset($dashboard_tabs['auth']) ? aksrt_get_user_center_tab_url('auth') : '';
|
||||||
$orders_available = isset($dashboard_tabs['orders']);
|
$orders_available = isset($dashboard_tabs['orders']);
|
||||||
$orders_url = $orders_available ? (string) ($orders_url ?? '') : '';
|
$orders_url = $orders_available ? (string) ($orders_url ?? '') : '';
|
||||||
$revenue_available = isset($dashboard_tabs['revenue']);
|
|
||||||
$revenue_url = $revenue_available ? aksrt_get_user_center_tab_url('revenue') : '';
|
|
||||||
|
|
||||||
$services = array_values(array_filter([
|
$services = array_values(array_filter([
|
||||||
[
|
[
|
||||||
@@ -38,13 +36,6 @@ $services = array_values(array_filter([
|
|||||||
'url' => $orders_url,
|
'url' => $orders_url,
|
||||||
'tab' => 'orders',
|
'tab' => 'orders',
|
||||||
],
|
],
|
||||||
[
|
|
||||||
'label' => __('推广收益', 'aksrt'),
|
|
||||||
'icon' => 'chart-line',
|
|
||||||
'tone' => 'revenue',
|
|
||||||
'url' => $revenue_url,
|
|
||||||
'tab' => 'revenue',
|
|
||||||
],
|
|
||||||
], static fn(array $item): bool => (string) $item['url'] !== ''));
|
], static fn(array $item): bool => (string) $item['url'] !== ''));
|
||||||
|
|
||||||
$settings = array_values(array_filter([
|
$settings = array_values(array_filter([
|
||||||
|
|||||||
Reference in new issue
Block a user