进行了一些小修复

This commit is contained in:
2026-08-26 15:11:25 +08:00
parent d37c34f71c
commit ae10b3d3fd
16 changed files with 278 additions and 417 deletions
@@ -145,14 +145,11 @@ final class ContentRenderer {
}
$meta = aksrt_get_pay_meta($post);
if (($meta['pay_type'] ?? 'no') === 'no') {
return RendererHelpers::empty_state(__('当前文章未配置付费内容', 'aksrt'));
return '';
}
if (function_exists('aksrt_has_paid_access') && aksrt_has_paid_access($post)) {
$html = '<div class="aksrt-post-pay is-authorized ' . esc_attr((string) $instance['theme']) . '"><i class="fa fas fa-check-circle" aria-hidden="true"></i><strong>' . esc_html__('内容已解锁', 'aksrt') . '</strong><p>' . esc_html__('你已拥有当前知识内容的访问权限。', 'aksrt') . '</p>';
$html .= function_exists('aksrt_get_pay_attributes_html') ? aksrt_get_pay_attributes_html($post, 'aksrt-post-pay__attrs') : '';
$html .= function_exists('aksrt_get_demo_link_html') ? aksrt_get_demo_link_html($post, 'aksrt-widget-button') : '';
return $html . '</div>';
}
return function_exists('aksrt_get_paywall_html') ? aksrt_get_paywall_html($post, true) : RendererHelpers::empty_state(__('请登录或购买后查看', 'aksrt'));
return aksrt_get_paywall_html($post, [
'layout' => 'widget',
'theme' => (string) $instance['theme'],
]);
}
}