feat(admin): rebuild page display settings
This commit is contained in:
1 parent
09b1e8fd35
commit
480e2bf07e
117 files changed
+1815
-9081
No files matched your search
@@ -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 !== '') {
|
||||
|
||||
@@ -20,7 +20,7 @@ if (!function_exists('aksrt_get_header_nav_context')) :
|
||||
}
|
||||
|
||||
$settings = class_exists('\AKSRT\Settings\Settings')
|
||||
? \AKSRT\Settings\Settings::get_all()
|
||||
? \AKSRT\Settings\Settings::read_domain('page_display', 'header-nav')
|
||||
: [];
|
||||
$layout = sanitize_key((string) ($settings['header_layout'] ?? '1'));
|
||||
if (!in_array($layout, ['1', '2', '3'], true)) {
|
||||
@@ -79,8 +79,6 @@ if (!function_exists('aksrt_get_header_nav_context')) :
|
||||
'mobile_align' => $mobile_align,
|
||||
'fixed' => $nav_fixed,
|
||||
'scroll_down_hide' => (!isset($settings['nav_scroll_down_hide']) || !empty($settings['nav_scroll_down_hide'])) && $nav_fixed,
|
||||
'nav_pay_vip' => !isset($settings['nav_pay_vip']) || !empty($settings['nav_pay_vip']),
|
||||
'nav_user_pay_vip' => !isset($settings['nav_user_pay_vip']) || !empty($settings['nav_user_pay_vip']),
|
||||
'brand_name' => $brand_name,
|
||||
'logo_html' => $logo_html,
|
||||
'has_logo' => $logo_html !== '',
|
||||
|
||||
Reference in new issue
Block a user