Files
wordpress-theme-aksrt/inc/helpers/user-center-renderers/sidebar-nav.php
T

35 lines
1.3 KiB
PHP

<?php
/**
* User center sidebar: main service navigation.
*
* Expects extracted $context vars.
*
* @package AKSRT
*/
defined('ABSPATH') || exit;
?>
<div class="uc-sidebar__section">
<div class="uc-sidebar__title"><?php esc_html_e('我的服务', 'aksrt'); ?></div>
<div class="uc-sidebar__buttons">
<?php foreach ($dashboard_tabs as $tab_key => $tab) :
// VIP / 订单 only under 权益与消费 (sidebar-commerce), not duplicated here.
if (in_array((string) $tab_key, ['vip', 'orders'], true)) {
continue;
}
?>
<a class="uc-sidebar__btn<?php echo $active_tab === $tab_key ? ' is-active' : ''; ?>" href="<?php echo esc_url(aksrt_get_user_center_tab_url($tab_key)); ?>" data-tab="<?php echo esc_attr($tab_key); ?>">
<i class="fas fa-<?php echo esc_attr($tab['icon']); ?>" aria-hidden="true"></i>
<span><?php echo esc_html($tab['label']); ?></span>
</a>
<?php endforeach; ?>
<a href="<?php echo esc_url($messages_url); ?>" class="uc-sidebar__btn">
<i class="fas fa-bell" aria-hidden="true"></i>
<span><?php esc_html_e('消息通知', 'aksrt'); ?></span>
<?php if ($notification_unread_count > 0) : ?>
<span class="uc-sidebar__badge"><?php echo esc_html((string) $notification_unread_count); ?></span>
<?php endif; ?>
</a>
</div>
</div>