Zibll 主线收口:统一 single 并清退 compat 资源路径

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2026-07-09 20:30:49 +08:00
co-authored by Claude
parent 0a6f97af21
commit 09f1eec909
26 changed files with 158 additions and 1325 deletions
+10 -8
View File
@@ -138,10 +138,8 @@ if (!empty($aksrt_bg_styles)) {
$aksrt_mobile_menu_location = has_nav_menu('mobile') ? 'mobile' : 'primary';
$aksrt_show_user_entry = !empty($aksrt_header_settings['user_menu']);
$aksrt_current_user = wp_get_current_user();
$aksrt_user_unread = class_exists('AKSRT_Message') && is_user_logged_in() ? (int) AKSRT_Message::get_instance()->get_unread_count(get_current_user_id()) : 0;
$aksrt_user_credit = function_exists('aksrt_user_credits') && is_user_logged_in() ? (int) aksrt_user_credits(get_current_user_id()) : 0;
$aksrt_currency_name = class_exists('AKSRT_Settings') ? AKSRT_Settings::get_currency_name() : __('积分', 'aksrt');
$aksrt_messages_url = function_exists('aksrt_get_messages_url') ? aksrt_get_messages_url() : home_url('/messages/');
$aksrt_orders_url = home_url('/orders/');
$aksrt_publish_url = admin_url('post-new.php');
$aksrt_theme_toggle_positions = class_exists('AKSRT_Settings')
@@ -219,7 +217,7 @@ if (!empty($aksrt_bg_styles)) {
?>
<?php endif; ?>
<div class="nav-actions">
<div class="nav-actions nav-actions--primary">
<?php if (!empty($aksrt_header_settings['search_enabled'])) : ?>
<form role="search" method="get" class="nav-searchbox" action="<?php echo esc_url(home_url('/')); ?>" data-aksrt-search-form="desktop" data-default-search-type="<?php echo esc_attr($aksrt_search_type); ?>" data-default-category="<?php echo esc_attr((string) $aksrt_search_category_id); ?>">
<input type="hidden" name="aksrt_search_type" value="<?php echo esc_attr($aksrt_search_type); ?>">
@@ -232,6 +230,7 @@ if (!empty($aksrt_bg_styles)) {
</form>
<?php endif; ?>
<div class="nav-actions__cta">
<?php if ($aksrt_can_publish) : ?>
<a class="btn-primary" href="<?php echo esc_url(admin_url('post-new.php')); ?>">
<i class="fas fa-pen-nib" aria-hidden="true"></i>
@@ -244,6 +243,7 @@ if (!empty($aksrt_bg_styles)) {
<i class="fas fa-adjust" aria-hidden="true"></i>
</button>
<?php endif; ?>
</div>
<?php if ($aksrt_show_user_entry) : ?>
<?php if (is_user_logged_in()) : ?>
@@ -266,9 +266,10 @@ if (!empty($aksrt_bg_styles)) {
</div>
<div class="user-dropdown__sep"></div>
<a class="user-dropdown__item header-user-href" href="<?php echo esc_url(aksrt_get_user_center_url()); ?>"><span><?php esc_html_e('用户中心', 'aksrt'); ?></span></a>
<a class="user-dropdown__item header-user-href" href="<?php echo esc_url($aksrt_messages_url); ?>"><span><?php esc_html_e('消息通知', 'aksrt'); ?></span><?php if ($aksrt_user_unread > 0) : ?><span class="user-dropdown__badge"><?php echo esc_html((string) $aksrt_user_unread); ?></span><?php endif; ?></a>
<a class="user-dropdown__item header-user-href" href="<?php echo esc_url($aksrt_orders_url); ?>"><span><?php esc_html_e('我的订单', 'aksrt'); ?></span></a>
<?php if ($aksrt_can_publish) : ?>
<a class="user-dropdown__item header-user-href" href="<?php echo esc_url($aksrt_publish_url); ?>"><span><?php esc_html_e('发布内容', 'aksrt'); ?></span></a>
<?php endif; ?>
<a class="user-dropdown__item user-dropdown__logout header-user-href" href="<?php echo esc_url(wp_logout_url(home_url('/'))); ?>"><span><?php esc_html_e('退出登录', 'aksrt'); ?></span></a>
</div>
</div>
@@ -367,8 +368,8 @@ if (!empty($aksrt_bg_styles)) {
}
?>
</div>
<?php if ($aksrt_can_publish) : ?>
<div class="nav-actions__cta nav-actions__cta--drawer">
<?php if ($aksrt_can_publish) : ?>
<div class="nav-drawer__publish">
<a class="btn-primary" href="<?php echo esc_url(admin_url('post-new.php')); ?>">
<i class="fas fa-pen-nib" aria-hidden="true"></i>
@@ -377,7 +378,7 @@ if (!empty($aksrt_bg_styles)) {
</div>
<?php endif; ?>
<?php if (in_array('m_menu', $aksrt_theme_toggle_positions, true)) : ?>
<?php if (in_array('m_menu', $aksrt_theme_toggle_positions, true)) : ?>
<div class="nav-drawer__theme-toggle">
<button type="button" class="btn-outline theme-toggle-mobile" id="theme-toggle-mobile" title="<?php esc_attr_e('切换亮暗色', 'aksrt'); ?>">
<i class="fas fa-adjust" aria-hidden="true"></i>
@@ -386,7 +387,7 @@ if (!empty($aksrt_bg_styles)) {
</div>
<?php endif; ?>
<?php if ($aksrt_show_user_entry && !is_user_logged_in()) : ?>
<?php if ($aksrt_show_user_entry && !is_user_logged_in()) : ?>
<div class="nav-drawer__auth">
<a class="btn-outline" href="<?php echo esc_url(aksrt_get_login_url()); ?>"><?php esc_html_e('登录', 'aksrt'); ?></a>
<?php if (get_option('users_can_register')) : ?>
@@ -400,6 +401,7 @@ if (!empty($aksrt_bg_styles)) {
<?php dynamic_sidebar('mobile_nav_fluid'); ?>
</div>
<?php endif; ?>
</div>
<div class="fixed-body"></div>
</nav>
</div>