Files
wordpress-theme-aksrt/inc/helpers/user-center-renderers/sidebar-creator.php
T
kate522 51274fd00a feat(user-center): promote invite into standalone 推广中心 tab
Register a dedicated `promotion` dashboard panel gated by the existing
invite switches (credits + invite reward + invite registration), and move
the invite card out of the revenue tab so 收益中心 is pure earnings/withdrawal.

- src/User/Center.php: register promotion panel; revenue no longer depends
  on invite being on
- inc/helpers/user-center-renderers/profile-promotion.php: new panel body
  hosting the existing [data-aksrt-invite] card
- profile-revenue.php: drop the invite section; aksrt-user-center.php: drop
  unused show_invite_section context, add promotion to built-in tabs + view map
- repoint invite/promotion deep-link aliases from revenue to promotion across
  tab-url builder, tab resolver, runtime tabAliases, urls.php, and the
  revenue-JS enqueue gate
- sidebar-nav.php: add 推广中心 service entry; shell.css: entry icon color;
  sidebar-creator.php: reword revenue card
- UserRuntime.php: allow promotion in configurable tabs
2026-08-05 16:45:47 +08:00

36 lines
1.4 KiB
PHP

<?php
/**
* User center sidebar: creation and revenue center pair.
*
* @package AKSRT
*/
defined('ABSPATH') || exit;
$creation_url = (string) ($new_post_url ?? '');
if ($creation_url === '') {
$creation_url = isset($dashboard_tabs['posts']) ? aksrt_get_user_center_tab_url('posts') : '';
}
$revenue_url = (string) ($revenue_url ?? '');
if ($creation_url === '' && $revenue_url === '') {
return;
}
?>
<div class="uc-sidebar__pair uc-sidebar__pair--centers">
<?php if ($creation_url !== '') : ?>
<a class="uc-center-card uc-center-card--creation" href="<?php echo esc_url($creation_url); ?>">
<span class="uc-center-card__icon"><i class="fas fa-feather-alt" 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; ?>
<?php if ($revenue_url !== '') : ?>
<a class="uc-center-card uc-center-card--revenue" href="<?php echo esc_url($revenue_url); ?>">
<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>