进行了一些小修复
This commit is contained in:
@@ -1054,7 +1054,6 @@ if (!function_exists('aksrt_get_pay_service_html')) {
|
||||
$service = is_array($order['service'] ?? null) ? $order['service'] : [];
|
||||
}
|
||||
|
||||
$items = [];
|
||||
$text = trim((string) ($service['text'] ?? ''));
|
||||
$value = trim((string) ($service['value'] ?? ''));
|
||||
$icon = trim((string) ($service['icon'] ?? 'fa fas fa-check-circle'));
|
||||
@@ -1062,7 +1061,6 @@ if (!function_exists('aksrt_get_pay_service_html')) {
|
||||
$icon = 'fa fas fa-check-circle';
|
||||
}
|
||||
|
||||
// Support multi-line pay_service textarea (one bullet per line).
|
||||
$lines = [];
|
||||
if ($text !== '') {
|
||||
$lines = preg_split('/\r\n|\r|\n/', $text) ?: [];
|
||||
@@ -1072,15 +1070,6 @@ if (!function_exists('aksrt_get_pay_service_html')) {
|
||||
}
|
||||
$lines = array_values(array_filter(array_map('trim', $lines)));
|
||||
|
||||
if ($lines === []) {
|
||||
// Defaults aligned with previous hardcoded guarantees.
|
||||
$lines = [
|
||||
__('安全检测', 'aksrt'),
|
||||
__('支持 VIP 权益', 'aksrt'),
|
||||
__('支持积分结算', 'aksrt'),
|
||||
];
|
||||
}
|
||||
|
||||
$html = '';
|
||||
foreach ($lines as $line) {
|
||||
$html .= '<span class="' . esc_attr($class) . '">';
|
||||
@@ -1253,6 +1242,8 @@ if (!function_exists('aksrt_get_paywall_html')) {
|
||||
$attrs = aksrt_get_pay_attributes_html($post, 'pay-attr');
|
||||
$count = $sales > 0 ? '<badge class="img-badge hot jb-blue px12">' . esc_html(sprintf(__('已售 %s', 'aksrt'), $sales)) . '</badge>' : '';
|
||||
$service = aksrt_get_pay_service_html('muted-2-color');
|
||||
$widget_service = $service !== '' ? '<div class="px12 muted-2-color">' . $service . '</div>' : '';
|
||||
$article_service = $service !== '' ? '<div class="px12 muted-2-color mt10 text-right">' . $service . '</div>' : '';
|
||||
$demo = aksrt_get_demo_link_html($post, 'but jb-yellow padding-lg');
|
||||
$demo_row = $demo !== '' ? '<div class="mt10">' . $demo . '</div>' : '';
|
||||
$discount = $modo === '0' ? aksrt_get_post_rebate_discount($post) : '0.00';
|
||||
@@ -1268,11 +1259,11 @@ if (!function_exists('aksrt_get_paywall_html')) {
|
||||
AKSRT_PAY_TYPE_VIDEO => '<i class="fa fa-play-circle fa-fw" aria-hidden="true"></i>' . esc_html__('查看视频', 'aksrt'),
|
||||
];
|
||||
$view_label = $view_labels[$pay_type] ?? '<i class="fa fa-dot-circle-o fa-fw" aria-hidden="true"></i>' . esc_html__('查看内容', 'aksrt');
|
||||
return '<div class="zib-widget pay-box pay-widget paid-box order-type-' . $order_type . '" style="padding:0">' . $tag . '<div class="relative-h ' . esc_attr($theme) . '" style="background-size:120%"><div class="pay-widget__orb pay-widget__orb--right ' . esc_attr($theme) . '"></div><div class="pay-widget__orb pay-widget__orb--left ' . esc_attr($theme) . '"></div><div class="relative box-body"><div class="text-center mt10 box-body"><p><i class="fa fa-shopping-bag fa-3x" aria-hidden="true"></i></p><b class="em14">' . esc_html__('已购买', 'aksrt') . '</b></div></div></div><div class="box-body"><div class="px12 muted-2-color">' . $service . '</div><div class="mt10"><a href="#posts-pay" class="but padding-lg btn-block ' . esc_attr($theme) . '">' . $view_label . '</a></div>' . $demo_row . $attrs . '</div>' . $count . '</div>';
|
||||
return '<div class="zib-widget pay-box pay-widget paid-box order-type-' . $order_type . '" style="padding:0">' . $tag . '<div class="relative-h ' . esc_attr($theme) . '" style="background-size:120%"><div class="pay-widget__orb pay-widget__orb--right ' . esc_attr($theme) . '"></div><div class="pay-widget__orb pay-widget__orb--left ' . esc_attr($theme) . '"></div><div class="relative box-body"><div class="text-center mt10 box-body"><p><i class="fa fa-shopping-bag fa-3x" aria-hidden="true"></i></p><b class="em14">' . esc_html__('已购买', 'aksrt') . '</b></div></div></div><div class="box-body">' . $widget_service . '<div class="mt10"><a href="#posts-pay" class="but padding-lg btn-block ' . esc_attr($theme) . '">' . $view_label . '</a></div>' . $demo_row . $attrs . '</div>' . $count . '</div>';
|
||||
}
|
||||
|
||||
if ($is_widget) {
|
||||
return '<div class="zib-widget pay-box pay-widget order-type-' . $order_type . '" style="padding:0">' . $tag . '<div class="relative-h ' . esc_attr($theme) . '" style="background-size:120%"><div class="pay-widget__orb pay-widget__orb--right ' . esc_attr($theme) . '"></div><div class="pay-widget__orb pay-widget__orb--left ' . esc_attr($theme) . '"></div><div class="relative box-body"><div class="text-center mt10">' . $price . '</div></div><div class="relative">' . $vip . '</div></div>' . $discount_banner . '<div class="box-body"><div class="px12 muted-2-color">' . $service . '</div><div class="mt10">' . $button . '</div>' . $demo_row . $attrs . '</div>' . $count . '</div>';
|
||||
return '<div class="zib-widget pay-box pay-widget order-type-' . $order_type . '" style="padding:0">' . $tag . '<div class="relative-h ' . esc_attr($theme) . '" style="background-size:120%"><div class="pay-widget__orb pay-widget__orb--right ' . esc_attr($theme) . '"></div><div class="pay-widget__orb pay-widget__orb--left ' . esc_attr($theme) . '"></div><div class="relative box-body"><div class="text-center mt10">' . $price . '</div></div><div class="relative">' . $vip . '</div></div>' . $discount_banner . '<div class="box-body">' . $widget_service . '<div class="mt10">' . $button . '</div>' . $demo_row . $attrs . '</div>' . $count . '</div>';
|
||||
}
|
||||
|
||||
$thumb = get_the_post_thumbnail($post, 'medium', ['class' => 'fit-cover', 'alt' => '']);
|
||||
@@ -1296,7 +1287,7 @@ if (!function_exists('aksrt_get_paywall_html')) {
|
||||
$graphic = '<div class="flex0 relative mr20 hide-sm pay-thumb"><div class="graphic">' . $thumb . $graphic_actions . '</div></div>';
|
||||
}
|
||||
$demo_mobile = $demo !== '' ? '<div class="mt10 visible-xs-block">' . $demo . '</div>' : '';
|
||||
return '<div class="zib-widget pay-box order-type-' . $order_type . '" id="posts-pay"><div class="flex pay-flexbox">' . $graphic . '<div class="flex-auto-h flex xx jsb"><dt class="text-ellipsis pay-title">' . esc_html($title) . '</dt><div class="mt6 em09 muted-2-color">' . wp_kses_post($doc) . '</div><div>' . $price . '</div>' . $discount_mobile . ($vip !== '' ? '<div>' . $vip . '</div>' : '') . '<div class="text-right mt10">' . $button . '</div></div></div><div class="px12 muted-2-color mt10 text-right">' . $service . '</div>' . $demo_mobile . $attrs . $tag . $count . '</div>';
|
||||
return '<div class="zib-widget pay-box order-type-' . $order_type . '" id="posts-pay"><div class="flex pay-flexbox">' . $graphic . '<div class="flex-auto-h flex xx jsb"><dt class="text-ellipsis pay-title">' . esc_html($title) . '</dt><div class="mt6 em09 muted-2-color">' . wp_kses_post($doc) . '</div><div>' . $price . '</div>' . $discount_mobile . ($vip !== '' ? '<div>' . $vip . '</div>' : '') . '<div class="text-right mt10">' . $button . '</div></div></div>' . $article_service . $demo_mobile . $attrs . $tag . $count . '</div>';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user