修复了一些问题
This commit is contained in:
@@ -153,31 +153,26 @@ trait VipServiceModal {
|
||||
return '';
|
||||
}
|
||||
$name = (string) ($levels[$level]['name'] ?? ('VIP' . $level));
|
||||
$desc = (string) ($levels[$level]['desc'] ?? '');
|
||||
$equity = (string) ($levels[$level]['equity'] ?? '');
|
||||
$cls = $user_id > 0 ? ' pay-vip' : ' signin-loader';
|
||||
|
||||
// Preserve admin equity HTML as-is (sanitize/wrap only; never re-split).
|
||||
$equity_html = function_exists('aksrt_format_vip_equity_html')
|
||||
? aksrt_format_vip_equity_html($equity, 'mb10 relative')
|
||||
$equity_html = $equity !== ''
|
||||
? '<ul class="mb10 relative">' . wp_kses_post($equity) . '</ul>'
|
||||
: '';
|
||||
|
||||
$icon_url = esc_url((string) ($levels[$level]['img_icon'] ?? ''));
|
||||
$icon = $icon_url !== ''
|
||||
? '<img' . aksrt_get_lazy_attr('lazy_other', $icon_url, 'aksrt-vip-level-icon') . ' alt="" decoding="async">'
|
||||
? '<img' . aksrt_get_lazy_attr('lazy_other', $icon_url, 'img-icon') . ' title="' . esc_attr($name) . '" alt="' . esc_attr($name) . '" decoding="async">'
|
||||
: '<i class="fa fas fa-gem" aria-hidden="true"></i>';
|
||||
$html = '<div class="vip-card pointer level-' . $level . ' vip-theme' . $level . $cls . '" vip-level="' . $level . '">';
|
||||
$html .= '<div class="vip-baicon" aria-hidden="true">' . $icon . '</div>';
|
||||
$html .= '<div class="abs-center vip-baicon" aria-hidden="true">' . $icon . '</div>';
|
||||
$html .= '<div class="vip-img abs-right">' . $icon . '</div>';
|
||||
$html .= '<div class="relative">';
|
||||
$html .= '<div class="vip-name mb10"><span class="vip-name__icon">' . $icon . '</span><span class="vip-name__label">' . esc_html($name) . '</span></div>';
|
||||
if ($desc !== '') {
|
||||
$html .= '<div class="mb6 font-bold em09">' . esc_html($desc) . '</div>';
|
||||
}
|
||||
$html .= '<div class="vip-name mb10"><span class="mr6">' . $icon . '</span>' . esc_html($name) . '</div>';
|
||||
$html .= $equity_html;
|
||||
$html .= '<a class="but jb-blue radius payvip-button" href="javascript:;">'
|
||||
. esc_html(sprintf(__('开通%s', 'aksrt'), $name))
|
||||
. '<span class="ml6"><i class="fa fas fa-chevron-circle-right" aria-hidden="true"></i></span></a>';
|
||||
. '<span class="ml6"><i class="fa fa-chevron-circle-right" aria-hidden="true"></i></span></a>';
|
||||
$html .= '</div></div>';
|
||||
return $html;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user