feat(vip): add default icons and remove download speed
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
77d54b3b9d
commit
18da39788f
15 files changed
+105
-74
No files matched your search
@@ -30,7 +30,7 @@ if ($status === '') {
|
||||
|
||||
if ($vip_level > 0) {
|
||||
$title = (string) ($vip_levels[$vip_level]['name'] ?? ('VIP' . $vip_level));
|
||||
if ($expires <= 0 && $vip_state_source !== 'order') {
|
||||
if ($expires <= 0 && ($vip_state['source'] ?? 'none') !== 'order') {
|
||||
$status = __('永久会员', 'aksrt');
|
||||
} else {
|
||||
$remaining_days = max(1, (int) ceil(($expires - time()) / DAY_IN_SECONDS));
|
||||
@@ -44,9 +44,15 @@ if ($vip_level > 0) {
|
||||
$title = (string) ($vip_levels[$expired_level]['name'] ?? ('VIP' . $expired_level));
|
||||
$status = __('已过期', 'aksrt');
|
||||
}
|
||||
|
||||
$sidebar_level = $vip_level > 0 ? $vip_level : $expired_level;
|
||||
$sidebar_icon_url = esc_url((string) ($vip_levels[$sidebar_level]['img_icon'] ?? ''));
|
||||
$sidebar_icon = $sidebar_icon_url !== ''
|
||||
? '<img class="aksrt-vip-level-icon" src="' . $sidebar_icon_url . '" alt="" loading="lazy" decoding="async">'
|
||||
: '<i class="fas fa-crown" aria-hidden="true"></i>';
|
||||
?>
|
||||
<a class="uc-sidebar-vip" href="<?php echo esc_url($vip_url); ?>">
|
||||
<span class="uc-sidebar-vip__icon"><i class="fas fa-crown" aria-hidden="true"></i></span>
|
||||
<span class="uc-sidebar-vip__icon"><?php echo $sidebar_icon; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></span>
|
||||
<span class="uc-sidebar-vip__content">
|
||||
<strong><?php echo esc_html($title); ?></strong>
|
||||
<small><?php echo esc_html($status); ?></small>
|
||||
|
||||
Reference in new issue
Block a user