fix(pay): render paid reading as fragments

This commit is contained in:
2026-08-13 18:58:24 +08:00
parent 4cc1f2b2ea
commit f040a680d6
9 changed files with 316 additions and 65 deletions
+3 -2
View File
@@ -74,8 +74,9 @@ if (!function_exists('aksrt_single_build_context')) :
$pay_meta = function_exists('aksrt_get_pay_meta') ? aksrt_get_pay_meta($post_id) : ['pay_type' => 'no'];
$pay_type = (string) ($pay_meta['pay_type'] ?? 'no');
$is_paid_post = function_exists('aksrt_is_paid_post') && aksrt_is_paid_post($post_id);
// Pay module: download box OR non-download paid types (reading/gallery/video/vip).
$show_pay_box = $has_download || ($is_paid_post && $pay_type !== 'no' && $pay_type !== 'download');
// Paid-reading purchase is rendered inline by each payshow shortcode.
// Keep the article-level module for download, gallery, video and VIP only.
$show_pay_box = $has_download || ($is_paid_post && !in_array($pay_type, ['no', 'download', 'reading'], true));
$breadcrumbs_html = '';
if (!empty($settings['breadcrumbs']) && function_exists('aksrt_breadcrumbs')) {