fix(ui): VIP equity list wrap and theme toggle moon/sun icons
This commit is contained in:
@@ -214,3 +214,22 @@
|
|||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Theme toggle: keep moon/sun icons centered, no double-glyph overlap */
|
||||||
|
.theme-toggle-desktop,
|
||||||
|
.theme-toggle-mobile,
|
||||||
|
.toggle-theme {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
.theme-toggle-desktop .theme-icon-moon,
|
||||||
|
.theme-toggle-desktop .theme-icon-sun,
|
||||||
|
.theme-toggle-mobile .theme-icon-moon,
|
||||||
|
.theme-toggle-mobile .theme-icon-sun,
|
||||||
|
.toggle-theme .theme-icon-moon,
|
||||||
|
.toggle-theme .theme-icon-sun {
|
||||||
|
margin: 0 !important;
|
||||||
|
line-height: 1;
|
||||||
|
width: 1em;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|||||||
@@ -1076,12 +1076,171 @@ body.uc-modal-open {
|
|||||||
background: linear-gradient(90deg, #22c55e, #16a34a);
|
background: linear-gradient(90deg, #22c55e, #16a34a);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* VIP tab */
|
/* VIP tab — zibll 我的会员 */
|
||||||
.uc-vip-tab .user-content-myvip{position:relative;padding:16px;margin-bottom:16px}
|
.uc-vip-tab .user-content-myvip {
|
||||||
.uc-vip-level-cards{display:flex;flex-wrap:wrap;gap:12px}
|
position: relative;
|
||||||
.uc-vip-level-card{position:relative;flex:1 1 240px;padding:18px 14px;overflow:hidden}
|
padding: 16px 18px;
|
||||||
.uc-vip-level-card .v-equity{text-align:left;margin:10px 0 14px;padding-left:1.1em;font-size:13px;line-height:1.55}
|
margin-bottom: 16px;
|
||||||
.uc-vip-level-card .pay-vip{display:inline-block;margin-top:4px}
|
}
|
||||||
.uc-vip-assets-entry{gap:12px}
|
.uc-vip-tab .user-content-myvip .avatar-img img {
|
||||||
.jb-vip1{background:linear-gradient(90deg,#f6c453,#f39c12);color:#3b2a00;border:0}
|
border-radius: 50%;
|
||||||
.jb-vip2{background:linear-gradient(90deg,#8e44ad,#3f51b5);color:#fff;border:0}
|
display: block;
|
||||||
|
}
|
||||||
|
.uc-vip-status {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 4px;
|
||||||
|
}
|
||||||
|
.uc-vip-status .flex.ac {
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 6px;
|
||||||
|
}
|
||||||
|
.uc-vip-level-cards {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
gap: 12px;
|
||||||
|
}
|
||||||
|
.uc-vip-level-card {
|
||||||
|
position: relative;
|
||||||
|
flex: 1 1 240px;
|
||||||
|
padding: 20px 16px 18px;
|
||||||
|
overflow: hidden;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
.uc-vip-level-card.level-1 {
|
||||||
|
background: linear-gradient(180deg, rgba(246, 196, 83, 0.14), rgba(255,255,255,0.02));
|
||||||
|
}
|
||||||
|
.uc-vip-level-card.level-2 {
|
||||||
|
background: linear-gradient(180deg, rgba(142, 68, 173, 0.10), rgba(255,255,255,0.02));
|
||||||
|
}
|
||||||
|
.uc-vip-level-card .vip-baicon {
|
||||||
|
position: absolute;
|
||||||
|
right: 10px;
|
||||||
|
top: 8px;
|
||||||
|
opacity: 0.08;
|
||||||
|
font-size: 64px;
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
.uc-vip-level-card__inner {
|
||||||
|
position: relative;
|
||||||
|
z-index: 1;
|
||||||
|
}
|
||||||
|
.uc-vip-level-card .v-iconbox {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
gap: 10px;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
.uc-vip-level-card .v-icon {
|
||||||
|
width: 36px;
|
||||||
|
height: 36px;
|
||||||
|
border-radius: 50%;
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
background: rgba(0,0,0,0.05);
|
||||||
|
flex: 0 0 auto;
|
||||||
|
}
|
||||||
|
.uc-vip-level-card .v-info {
|
||||||
|
text-align: left;
|
||||||
|
min-width: 0;
|
||||||
|
}
|
||||||
|
.uc-vip-level-card .v-name {
|
||||||
|
font-size: 16px;
|
||||||
|
line-height: 1.3;
|
||||||
|
}
|
||||||
|
.uc-vip-level-card .v-desc {
|
||||||
|
margin-top: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* CRITICAL: equity must stack as list, never one jammed line */
|
||||||
|
.uc-vip-level-card .v-equity,
|
||||||
|
.pay-vip-info .v-equity {
|
||||||
|
display: block !important;
|
||||||
|
list-style: none;
|
||||||
|
margin: 12px auto 16px;
|
||||||
|
padding: 0;
|
||||||
|
max-width: 240px;
|
||||||
|
text-align: left;
|
||||||
|
font-size: 13px;
|
||||||
|
line-height: 1.55;
|
||||||
|
color: var(--muted-2-color, #888);
|
||||||
|
}
|
||||||
|
.uc-vip-level-card .v-equity > li,
|
||||||
|
.pay-vip-info .v-equity > li {
|
||||||
|
display: block !important;
|
||||||
|
position: relative;
|
||||||
|
margin: 0 0 8px;
|
||||||
|
padding: 0 0 0 14px;
|
||||||
|
list-style: none;
|
||||||
|
white-space: normal;
|
||||||
|
word-break: break-word;
|
||||||
|
}
|
||||||
|
.uc-vip-level-card .v-equity > li:last-child,
|
||||||
|
.pay-vip-info .v-equity > li:last-child {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
.uc-vip-level-card .v-equity > li::before,
|
||||||
|
.pay-vip-info .v-equity > li::before {
|
||||||
|
content: "";
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
top: 0.55em;
|
||||||
|
width: 6px;
|
||||||
|
height: 6px;
|
||||||
|
border-radius: 50%;
|
||||||
|
background: currentColor;
|
||||||
|
opacity: 0.45;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uc-vip-cta {
|
||||||
|
display: inline-flex !important;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
gap: 8px;
|
||||||
|
min-width: 160px;
|
||||||
|
padding: 10px 18px !important;
|
||||||
|
border: 0;
|
||||||
|
text-decoration: none;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
.uc-vip-cta > i {
|
||||||
|
margin: 0 !important;
|
||||||
|
line-height: 1;
|
||||||
|
}
|
||||||
|
.uc-vip-points-link {
|
||||||
|
padding: 12px 16px;
|
||||||
|
gap: 12px;
|
||||||
|
}
|
||||||
|
.uc-vip-points-link a {
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 6px;
|
||||||
|
text-decoration: none;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
.uc-vip-assets-entry {
|
||||||
|
gap: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.jb-vip1 {
|
||||||
|
background: linear-gradient(25deg, #eabe7b 10%, #f5e3c7 70%, #edc788 100%);
|
||||||
|
color: #866127;
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
.jb-vip2 {
|
||||||
|
background: linear-gradient(317deg, #4d4c4c 30%, #7b7b7b 70%, #5f5c5c 100%);
|
||||||
|
color: #ddd;
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 767px) {
|
||||||
|
.uc-vip-level-cards {
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
.uc-vip-level-card {
|
||||||
|
flex: 1 1 auto;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -157,8 +157,8 @@
|
|||||||
syncThemeImages(isDark);
|
syncThemeImages(isDark);
|
||||||
syncCodeHighlightTheme(isDark);
|
syncCodeHighlightTheme(isDark);
|
||||||
dispatchThemeChange(isDark);
|
dispatchThemeChange(isDark);
|
||||||
var btn = document.getElementById("theme-toggle");
|
document.querySelectorAll("#theme-toggle, #theme-toggle-desktop, #theme-toggle-mobile, #dropdown-theme-toggle, #float-theme-toggle, .toggle-theme").forEach(function (btn) {
|
||||||
if (btn) {
|
if (!btn) return;
|
||||||
btn.setAttribute("aria-pressed", isDark ? "true" : "false");
|
btn.setAttribute("aria-pressed", isDark ? "true" : "false");
|
||||||
btn.classList.toggle("is-dark", isDark);
|
btn.classList.toggle("is-dark", isDark);
|
||||||
var moon = btn.querySelector(".theme-icon-moon");
|
var moon = btn.querySelector(".theme-icon-moon");
|
||||||
@@ -167,7 +167,7 @@
|
|||||||
moon.style.display = isDark ? "none" : "";
|
moon.style.display = isDark ? "none" : "";
|
||||||
sun.style.display = isDark ? "" : "none";
|
sun.style.display = isDark ? "" : "none";
|
||||||
}
|
}
|
||||||
}
|
});
|
||||||
var floatBtn = document.getElementById("float-theme-toggle");
|
var floatBtn = document.getElementById("float-theme-toggle");
|
||||||
if (floatBtn) {
|
if (floatBtn) {
|
||||||
floatBtn.setAttribute("aria-pressed", isDark ? "true" : "false");
|
floatBtn.setAttribute("aria-pressed", isDark ? "true" : "false");
|
||||||
|
|||||||
+7
-5
@@ -276,9 +276,10 @@ if (!empty($aksrt_bg_styles)) {
|
|||||||
?>
|
?>
|
||||||
|
|
||||||
<?php if (in_array('pc_nav', $aksrt_theme_toggle_positions, true)) : ?>
|
<?php if (in_array('pc_nav', $aksrt_theme_toggle_positions, true)) : ?>
|
||||||
<button type="button" class="btn-outline theme-toggle-desktop toggle-theme toggle-radius" id="theme-toggle-desktop" title="<?php esc_attr_e('切换亮暗色', 'aksrt'); ?>">
|
<button type="button" class="btn-outline theme-toggle-desktop toggle-theme toggle-radius" id="theme-toggle-desktop" aria-pressed="false" title="<?php esc_attr_e('切换亮暗色', 'aksrt'); ?>">
|
||||||
<i class="fas fa-adjust fa-toggle-theme" aria-hidden="true"></i>
|
<i class="fas fa-moon theme-icon-moon" aria-hidden="true"></i>
|
||||||
</button>
|
<i class="fas fa-sun theme-icon-sun" aria-hidden="true" style="display:none"></i>
|
||||||
|
</button>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -513,8 +514,9 @@ if (!empty($aksrt_bg_styles)) {
|
|||||||
|
|
||||||
<?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">
|
<div class="nav-drawer__theme-toggle">
|
||||||
<button type="button" class="btn-outline theme-toggle-mobile toggle-theme toggle-radius" id="theme-toggle-mobile" title="<?php esc_attr_e('切换亮暗色', 'aksrt'); ?>">
|
<button type="button" class="btn-outline theme-toggle-mobile toggle-theme toggle-radius" id="theme-toggle-mobile" aria-pressed="false" title="<?php esc_attr_e('切换亮暗色', 'aksrt'); ?>">
|
||||||
<i class="fas fa-adjust fa-toggle-theme" aria-hidden="true"></i>
|
<i class="fas fa-moon theme-icon-moon" aria-hidden="true"></i>
|
||||||
|
<i class="fas fa-sun theme-icon-sun" aria-hidden="true" style="display:none"></i>
|
||||||
<span><?php esc_html_e('切换主题', 'aksrt'); ?></span>
|
<span><?php esc_html_e('切换主题', 'aksrt'); ?></span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -18,6 +18,72 @@ if (empty($vip_settings['enabled'])) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Normalize equity HTML/plain text into a proper <ul> of <li>.
|
||||||
|
*/
|
||||||
|
$normalize_equity = static function (string $raw): string {
|
||||||
|
$raw = trim($raw);
|
||||||
|
if ($raw === '') {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
$allowed = [
|
||||||
|
'li' => ['class' => true],
|
||||||
|
'ul' => ['class' => true],
|
||||||
|
'ol' => ['class' => true],
|
||||||
|
'strong' => [],
|
||||||
|
'b' => [],
|
||||||
|
'em' => [],
|
||||||
|
'i' => ['class' => true],
|
||||||
|
'span' => ['class' => true],
|
||||||
|
'br' => [],
|
||||||
|
];
|
||||||
|
$clean = wp_kses($raw, $allowed);
|
||||||
|
|
||||||
|
// Already has list items.
|
||||||
|
if (preg_match('/<li[\s>]/i', $clean)) {
|
||||||
|
// Strip wrapping ul/ol; we re-wrap.
|
||||||
|
$inner = preg_replace('#</?(ul|ol)[^>]*>#i', '', $clean) ?? $clean;
|
||||||
|
return '<ul class="v-equity">' . $inner . '</ul>';
|
||||||
|
}
|
||||||
|
|
||||||
|
// Plain text: split by newlines / Chinese separators / commas.
|
||||||
|
$plain = trim(wp_strip_all_tags($clean));
|
||||||
|
if ($plain === '') {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
$parts = preg_split('/[\r\n]+|[;;,,||]+/u', $plain) ?: [];
|
||||||
|
$items = [];
|
||||||
|
foreach ($parts as $part) {
|
||||||
|
$part = trim((string) $part);
|
||||||
|
// Also split jammed Chinese phrases if still one long blob with known tokens.
|
||||||
|
if ($part === '') {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
$items[] = $part;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Heuristic: if still a single long string without separators, try common benefit chunks.
|
||||||
|
if (count($items) === 1 && mb_strlen($items[0]) > 16) {
|
||||||
|
$blob = $items[0];
|
||||||
|
$chunks = preg_split('/(?=(?:免费|会员|更高|专属|付费|下载|身份|权益|折扣|无限))/u', $blob, -1, PREG_SPLIT_NO_EMPTY) ?: [];
|
||||||
|
$chunks = array_values(array_filter(array_map('trim', $chunks)));
|
||||||
|
if (count($chunks) > 1) {
|
||||||
|
$items = $chunks;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($items === []) {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
|
||||||
|
$html = '<ul class="v-equity">';
|
||||||
|
foreach ($items as $item) {
|
||||||
|
$html .= '<li>' . esc_html($item) . '</li>';
|
||||||
|
}
|
||||||
|
$html .= '</ul>';
|
||||||
|
return $html;
|
||||||
|
};
|
||||||
|
|
||||||
$user_id = (int) ($user_id ?? get_current_user_id());
|
$user_id = (int) ($user_id ?? get_current_user_id());
|
||||||
$level = function_exists('aksrt_get_user_vip_level') ? aksrt_get_user_vip_level($user_id) : 0;
|
$level = function_exists('aksrt_get_user_vip_level') ? aksrt_get_user_vip_level($user_id) : 0;
|
||||||
$expires = (int) get_user_meta($user_id, 'aksrt_vip_expires', true);
|
$expires = (int) get_user_meta($user_id, 'aksrt_vip_expires', true);
|
||||||
@@ -36,17 +102,17 @@ if ($level > 0) {
|
|||||||
$lv_name = (string) ($levels[$level]['name'] ?? ('VIP' . $level));
|
$lv_name = (string) ($levels[$level]['name'] ?? ('VIP' . $level));
|
||||||
$lv_desc = (string) ($levels[$level]['desc'] ?? '');
|
$lv_desc = (string) ($levels[$level]['desc'] ?? '');
|
||||||
if ($expires <= 0) {
|
if ($expires <= 0) {
|
||||||
$badge = '<span class="badg c-green p2-10 em09"><i class="fa fa-clock-o mr3" aria-hidden="true"></i>' . esc_html__('永久会员', 'aksrt') . '</span>';
|
$badge = '<span class="badg c-green p2-10 em09"><i class="fas fa-clock" aria-hidden="true"></i> ' . esc_html__('永久会员', 'aksrt') . '</span>';
|
||||||
if ($level < 2) {
|
if ($level < 2) {
|
||||||
$btn_type = 'upgrade';
|
$btn_type = 'upgrade';
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$badge = '<span class="badg c-yellow p2-10 em09"><i class="fa fa-clock-o mr3" aria-hidden="true"></i>'
|
$badge = '<span class="badg c-yellow p2-10 em09"><i class="fas fa-clock" aria-hidden="true"></i> '
|
||||||
. esc_html(sprintf(__('到期时间:%s', 'aksrt'), wp_date('Y年m月d日', $expires))) . '</span>';
|
. esc_html(sprintf(__('到期时间:%s', 'aksrt'), wp_date('Y年m月d日', $expires))) . '</span>';
|
||||||
$btn_type = 'renew_' . $level;
|
$btn_type = 'renew_' . $level;
|
||||||
}
|
}
|
||||||
$status_html = '<div class="flex xx gap6">'
|
$status_html = '<div class="uc-vip-status flex xx gap6">'
|
||||||
. '<div class="em16 mr10 flex ac"><i class="fas fa-crown mr6"></i><div class="font-bold ml6">' . esc_html($lv_name) . '</div></div>'
|
. '<div class="em16 flex ac"><i class="fas fa-crown" aria-hidden="true"></i><span class="font-bold ml6">' . esc_html($lv_name) . '</span></div>'
|
||||||
. $badge
|
. $badge
|
||||||
. ($lv_desc !== '' ? '<div class="muted-color em09">' . esc_html($lv_desc) . '</div>' : '')
|
. ($lv_desc !== '' ? '<div class="muted-color em09">' . esc_html($lv_desc) . '</div>' : '')
|
||||||
. '</div>';
|
. '</div>';
|
||||||
@@ -54,14 +120,14 @@ if ($level > 0) {
|
|||||||
$exp_label = $expires > 0
|
$exp_label = $expires > 0
|
||||||
? sprintf(__('过期时间:%s', 'aksrt'), wp_date('Y年m月d日', $expires))
|
? sprintf(__('过期时间:%s', 'aksrt'), wp_date('Y年m月d日', $expires))
|
||||||
: __('已过期', 'aksrt');
|
: __('已过期', 'aksrt');
|
||||||
$status_html = '<div class="flex xx gap6">'
|
$status_html = '<div class="uc-vip-status flex xx gap6">'
|
||||||
. '<div class="font-bold c-red">' . esc_html__('会员已过期', 'aksrt') . '</div>'
|
. '<div class="font-bold c-red">' . esc_html__('会员已过期', 'aksrt') . '</div>'
|
||||||
. '<div class="badg c-red em09"><i class="fa fa-clock-o mr3" aria-hidden="true"></i>' . esc_html($exp_label) . '</div>'
|
. '<div class="badg c-red em09"><i class="fas fa-clock" aria-hidden="true"></i> ' . esc_html($exp_label) . '</div>'
|
||||||
. ($desc_top !== '' ? '<div class="muted-color em09">' . esc_html($desc_top) . '</div>' : '')
|
. ($desc_top !== '' ? '<div class="muted-color em09">' . esc_html($desc_top) . '</div>' : '')
|
||||||
. '</div>';
|
. '</div>';
|
||||||
$btn_type = 'pay';
|
$btn_type = 'pay';
|
||||||
} else {
|
} else {
|
||||||
$status_html = '<div class="flex xx gap6">'
|
$status_html = '<div class="uc-vip-status flex xx gap6">'
|
||||||
. '<div class="font-bold">' . esc_html__('开通会员', 'aksrt') . '</div>'
|
. '<div class="font-bold">' . esc_html__('开通会员', 'aksrt') . '</div>'
|
||||||
. ($desc_top !== '' ? '<div class="muted-color em09">' . esc_html($desc_top) . '</div>' : '<div class="muted-color em09">' . esc_html__('开通会员,尊享专属特权', 'aksrt') . '</div>')
|
. ($desc_top !== '' ? '<div class="muted-color em09">' . esc_html($desc_top) . '</div>' : '<div class="muted-color em09">' . esc_html__('开通会员,尊享专属特权', 'aksrt') . '</div>')
|
||||||
. '</div>';
|
. '</div>';
|
||||||
@@ -76,7 +142,14 @@ foreach ([1, 2] as $lv) {
|
|||||||
}
|
}
|
||||||
$lv_name = (string) ($levels[$lv]['name'] ?? ('VIP' . $lv));
|
$lv_name = (string) ($levels[$lv]['name'] ?? ('VIP' . $lv));
|
||||||
$lv_desc = (string) ($levels[$lv]['desc'] ?? '');
|
$lv_desc = (string) ($levels[$lv]['desc'] ?? '');
|
||||||
$equity = (string) ($levels[$lv]['equity'] ?? '');
|
$equity_raw = (string) ($levels[$lv]['equity'] ?? '');
|
||||||
|
if ($equity_raw === '') {
|
||||||
|
// Fallback defaults when option empty / stripped.
|
||||||
|
$equity_raw = $lv === 1
|
||||||
|
? "免费下载部分资源\n会员专属身份标识\n付费内容会员价"
|
||||||
|
: "更高免费下载额度\n更高等级身份标识\n更多付费内容会员价";
|
||||||
|
}
|
||||||
|
$equity = $normalize_equity($equity_raw);
|
||||||
$cta = sprintf(__('开通%s', 'aksrt'), $lv_name);
|
$cta = sprintf(__('开通%s', 'aksrt'), $lv_name);
|
||||||
$vip_attr = $lv;
|
$vip_attr = $lv;
|
||||||
if (str_starts_with($btn_type, 'renew_')) {
|
if (str_starts_with($btn_type, 'renew_')) {
|
||||||
@@ -101,37 +174,38 @@ foreach ([1, 2] as $lv) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$cards .= '<div class="zib-widget text-center pay-vip-info flex1 level-' . $lv . ' uc-vip-level-card">';
|
$cards .= '<div class="zib-widget text-center pay-vip-info flex1 level-' . $lv . ' uc-vip-level-card">';
|
||||||
$cards .= '<div class="abs-center vip-baicon"><i class="fa fa-diamond" aria-hidden="true"></i></div>';
|
$cards .= '<div class="abs-center vip-baicon" aria-hidden="true"><i class="fas fa-gem"></i></div>';
|
||||||
$cards .= '<div class="relative">';
|
$cards .= '<div class="relative uc-vip-level-card__inner">';
|
||||||
$cards .= '<div class="v-iconbox mb10 flex jc gap10"><div class="v-icon flex jc"><i class="fas fa-crown"></i></div>';
|
$cards .= '<div class="v-iconbox mb10 flex jc ac gap10">';
|
||||||
|
$cards .= '<div class="v-icon flex jc ac"><i class="fas fa-crown" aria-hidden="true"></i></div>';
|
||||||
$cards .= '<div class="v-info text-left"><div class="v-name font-bold">' . esc_html($lv_name) . '</div>';
|
$cards .= '<div class="v-info text-left"><div class="v-name font-bold">' . esc_html($lv_name) . '</div>';
|
||||||
if ($lv_desc !== '') {
|
if ($lv_desc !== '') {
|
||||||
$cards .= '<div class="v-desc em09 muted-2-color">' . esc_html($lv_desc) . '</div>';
|
$cards .= '<div class="v-desc em09 muted-2-color">' . esc_html($lv_desc) . '</div>';
|
||||||
}
|
}
|
||||||
$cards .= '</div></div>';
|
$cards .= '</div></div>';
|
||||||
if ($equity !== '') {
|
$cards .= $equity;
|
||||||
$cards .= '<ul class="v-equity text-left">' . $equity . '</ul>';
|
$cards .= '<a class="padding-lg but jb-vip' . $lv . ' radius pay-vip uc-vip-cta" href="javascript:;" vip-level="' . (int) $vip_attr . '">'
|
||||||
}
|
. '<span>' . esc_html($cta) . '</span>'
|
||||||
$cards .= '<a class="padding-lg but jb-vip' . $lv . ' radius pay-vip" href="javascript:;" vip-level="' . (int) $vip_attr . '">'
|
. ' <i class="fas fa-chevron-circle-right" aria-hidden="true"></i></a>';
|
||||||
. esc_html($cta) . '<span class="ml10"><i class="fa fa-chevron-circle-right" aria-hidden="true"></i></span></a>';
|
|
||||||
$cards .= '</div></div>';
|
$cards .= '</div></div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Points exchange (non-VIP only) — slim link; full shop stays optional under credits.
|
// Points exchange (non-VIP only).
|
||||||
$points_html = '';
|
$points_html = '';
|
||||||
if ($level <= 0 && !empty($vip_settings['points_exchange']['enabled'])) {
|
if ($level <= 0 && !empty($vip_settings['points_exchange']['enabled'])) {
|
||||||
$points_html = '<div class="c-yellow zib-widget flex ac jsb uc-vip-points-link mt10">'
|
$points_html = '<div class="c-yellow zib-widget flex ac jsb uc-vip-points-link mt10">'
|
||||||
. '<div class="flex1 em12"><i class="fas fa-coins mr6"></i>' . esc_html__('积分兑换会员', 'aksrt') . '</div>'
|
. '<div class="flex1 em12 flex ac gap6"><i class="fas fa-coins" aria-hidden="true"></i><span>' . esc_html__('积分兑换会员', 'aksrt') . '</span></div>'
|
||||||
. '<a class="badg radius c-yellow pay-vip" href="javascript:;" vip-level="1">' . esc_html__('立即兑换', 'aksrt')
|
. '<a class="badg radius c-yellow pay-vip" href="javascript:;" vip-level="1">'
|
||||||
. '<i class="fa fa-chevron-circle-right ml6" aria-hidden="true"></i></a></div>';
|
. esc_html__('立即兑换', 'aksrt')
|
||||||
|
. ' <i class="fas fa-chevron-circle-right" aria-hidden="true"></i></a></div>';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<div class="uc-vip-tab" data-aksrt-vip-tab>
|
<div class="uc-vip-tab" data-aksrt-vip-tab>
|
||||||
<div class="zib-widget flex ac gap20 user-content-myvip overflow-hidden mb15">
|
<div class="zib-widget flex ac gap20 user-content-myvip overflow-hidden mb15">
|
||||||
<div class="vip-img abs-right opacity3"><i class="fas fa-crown em3x" aria-hidden="true"></i></div>
|
<div class="vip-img abs-right opacity3" aria-hidden="true"><i class="fas fa-crown em3x"></i></div>
|
||||||
<div class="flex ac gap12 flex1">
|
<div class="flex ac gap12 flex1 relative">
|
||||||
<div class="avatar-img"><?php echo $avatar; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></div>
|
<div class="avatar-img"><?php echo $avatar; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></div>
|
||||||
<div class="flex1">
|
<div class="flex1 min-w-0">
|
||||||
<div class="font-bold mb3"><?php echo esc_html($display); ?></div>
|
<div class="font-bold mb3"><?php echo esc_html($display); ?></div>
|
||||||
<?php echo $status_html; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
|
<?php echo $status_html; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -54,6 +54,13 @@ trait ScriptsPart1c {
|
|||||||
[],
|
[],
|
||||||
'5.15.4'
|
'5.15.4'
|
||||||
);
|
);
|
||||||
|
// FA4 class aliases (fa-diamond, fa-file-text-o, ...) used by zibll-style markup.
|
||||||
|
wp_enqueue_style(
|
||||||
|
'aksrt-font-awesome-5-v4-shims',
|
||||||
|
'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/v4-shims.min.css',
|
||||||
|
['aksrt-font-awesome-5'],
|
||||||
|
'5.15.4'
|
||||||
|
);
|
||||||
|
|
||||||
// ===== 7. JS =====
|
// ===== 7. JS =====
|
||||||
|
|
||||||
|
|||||||
@@ -188,8 +188,8 @@ class PaymentRuntime {
|
|||||||
1 => [
|
1 => [
|
||||||
'enabled' => $vip1_enabled,
|
'enabled' => $vip1_enabled,
|
||||||
'name' => $name1,
|
'name' => $name1,
|
||||||
'desc' => sanitize_text_field((string) ($settings['pay_user_vip_1_desc'] ?? '')),
|
'desc' => sanitize_text_field((string) ($settings['pay_user_vip_1_desc'] ?? __('尊享一级会员特权', 'aksrt'))),
|
||||||
'equity' => wp_kses((string) ($settings['pay_user_vip_1_equity'] ?? ''), $allowed_equity),
|
'equity' => wp_kses((string) (($settings['pay_user_vip_1_equity'] ?? '') !== '' ? $settings['pay_user_vip_1_equity'] : '<li>免费下载部分资源</li><li>会员专属身份标识</li><li>付费内容会员价</li>'), $allowed_equity),
|
||||||
'img_icon' => esc_url_raw((string) ($settings['vip_1_img_icon'] ?? '')),
|
'img_icon' => esc_url_raw((string) ($settings['vip_1_img_icon'] ?? '')),
|
||||||
'product_s' => !isset($settings['vip_1_product_s']) || !empty($settings['vip_1_product_s']),
|
'product_s' => !isset($settings['vip_1_product_s']) || !empty($settings['vip_1_product_s']),
|
||||||
'products_raw' => $products_1,
|
'products_raw' => $products_1,
|
||||||
@@ -199,8 +199,8 @@ class PaymentRuntime {
|
|||||||
2 => [
|
2 => [
|
||||||
'enabled' => $vip2_enabled,
|
'enabled' => $vip2_enabled,
|
||||||
'name' => $name2,
|
'name' => $name2,
|
||||||
'desc' => sanitize_text_field((string) ($settings['pay_user_vip_2_desc'] ?? '')),
|
'desc' => sanitize_text_field((string) ($settings['pay_user_vip_2_desc'] ?? __('尊享二级会员特权', 'aksrt'))),
|
||||||
'equity' => wp_kses((string) ($settings['pay_user_vip_2_equity'] ?? ''), $allowed_equity),
|
'equity' => wp_kses((string) (($settings['pay_user_vip_2_equity'] ?? '') !== '' ? $settings['pay_user_vip_2_equity'] : '<li>更高免费下载额度</li><li>更高等级身份标识</li><li>更多付费内容会员价</li>'), $allowed_equity),
|
||||||
'img_icon' => esc_url_raw((string) ($settings['vip_2_img_icon'] ?? '')),
|
'img_icon' => esc_url_raw((string) ($settings['vip_2_img_icon'] ?? '')),
|
||||||
'product_s' => !isset($settings['vip_2_product_s']) || !empty($settings['vip_2_product_s']),
|
'product_s' => !isset($settings['vip_2_product_s']) || !empty($settings['vip_2_product_s']),
|
||||||
'products_raw' => $products_2,
|
'products_raw' => $products_2,
|
||||||
|
|||||||
Reference in New Issue
Block a user