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
26 lines
792 B
PHP
26 lines
792 B
PHP
<?php
|
|
/**
|
|
* User center promotion panel (invite / 推广中心).
|
|
*
|
|
* Standalone dashboard tab that hosts the invite card. Reuses the existing
|
|
* invite REST contract and credits.js `initInvite()` binding via the
|
|
* `[data-aksrt-invite]` card in profile-invite.php.
|
|
*
|
|
* @package AKSRT
|
|
*/
|
|
|
|
defined('ABSPATH') || exit;
|
|
|
|
$context = is_array($args['context'] ?? null) ? $args['context'] : [];
|
|
$user_id = (int) ($context['user_id'] ?? get_current_user_id());
|
|
if ($user_id <= 0) {
|
|
echo '<div class="uc-panel-empty muted-2-color">' . esc_html__('请先登录', 'aksrt') . '</div>';
|
|
return;
|
|
}
|
|
|
|
$currency_name = (string) ($context['currency_name'] ?? __('积分', 'aksrt'));
|
|
?>
|
|
<div class="uc-promotion-page" data-aksrt-promotion-page>
|
|
<?php require __DIR__ . '/profile-invite.php'; ?>
|
|
</div>
|