feat(admin): rebuild page display settings
This commit is contained in:
@@ -168,10 +168,6 @@ if (!function_exists('aksrt_header_user_box_html')) :
|
||||
}
|
||||
}
|
||||
$payvip = function_exists('aksrt_header_payvip_bar') ? aksrt_header_payvip_bar($user_id) : '';
|
||||
// nav_user_pay_vip gate: empty payvip when switch off for non-VIP CTA only — helper already handles VIP status.
|
||||
if (empty($ctx['nav_user_pay_vip']) && $payvip !== '' && strpos($payvip, 'is-vip') === false) {
|
||||
$payvip = '';
|
||||
}
|
||||
$checkin = function_exists('aksrt_header_user_checkin_btn') ? aksrt_header_user_checkin_btn($user_id) : '';
|
||||
$wallet = function_exists('aksrt_header_user_wallet_mini') ? aksrt_header_user_wallet_mini($user_id) : '';
|
||||
$badges = function_exists('aksrt_header_user_badges_row') ? aksrt_header_user_badges_row($user_id) : '';
|
||||
@@ -201,8 +197,7 @@ if (!function_exists('aksrt_header_user_box_html')) :
|
||||
}
|
||||
|
||||
if (!empty($ctx['can_publish'])) {
|
||||
$all = class_exists('\AKSRT\Settings\Settings') ? \AKSRT\Settings\Settings::get_all() : [];
|
||||
$pub_text = (string) ($all['nav_user_newposts_btn_text'] ?? '');
|
||||
$pub_text = (string) ($ctx['settings']['nav_user_newposts_btn_text'] ?? '');
|
||||
if ($pub_text === '') {
|
||||
$pub_text = __('发布内容', 'aksrt');
|
||||
}
|
||||
@@ -249,7 +244,7 @@ if (!function_exists('aksrt_header_user_box_html')) :
|
||||
$con .= '<div class="mt10 text-center">' . $href . '</div>';
|
||||
} else {
|
||||
$vip_guest = '';
|
||||
if (!empty($ctx['nav_user_pay_vip']) && class_exists('\AKSRT\Settings\Settings')) {
|
||||
if (class_exists('\AKSRT\Settings\Settings')) {
|
||||
$vs = \AKSRT\Settings\Settings::get_payment_vip_settings();
|
||||
if (!empty($vs['enabled'])) {
|
||||
$vip_guest = '<div><a class="em09 signin-loader but jb-red radius4 payvip-icon btn-block mt10" href="javascript:;">'
|
||||
@@ -296,7 +291,7 @@ if (!function_exists('aksrt_menu_button')) :
|
||||
$user_id = (int) ($ctx['user_id'] ?? 0);
|
||||
$button = '';
|
||||
|
||||
// Publish + VIP (respect nav_pay_vip).
|
||||
// Publish and membership actions.
|
||||
if (function_exists('aksrt_render_header_menu_buttons')) {
|
||||
$action_buttons = aksrt_render_header_menu_buttons();
|
||||
if ($action_buttons !== '') {
|
||||
|
||||
Reference in New Issue
Block a user