Zibll 主线收口:统一 single 并清退 compat 资源路径

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
kate522andClaude committed 2026-07-09 20:30:49 +08:00
1 parent 0a6f97af21
commit 09f1eec909
26 files changed
+158 -1325

No files matched your search

+6 -3
View File
@@ -1,8 +1,10 @@
<?php
/**
* Paid Content Download Box
* Unified paid-content download box.
*
* 统一内容付费 / 下载区:普通文章为主线,resource 样式仅保留兼容外壳。
* Downloadable content now follows the unified single.php mainline; resource-
* specific visuals are treated as content variants rather than a separate page
* system.
*
* @package AKSRT
*/
@@ -23,6 +25,7 @@ if ($pay_type !== 'download' || empty($downloads)) {
}
$is_resource_context = function_exists('aksrt_is_resource_post') && aksrt_is_resource_post($post_id);
$context_variant = $is_resource_context ? 'resource' : 'content';
$subject_label = trim((string) ($meta['subject_label'] ?? ''));
if ($subject_label === '') {
$subject_label = $is_resource_context ? __('资源', 'aksrt') : __('内容', 'aksrt');
@@ -77,7 +80,7 @@ $pay_type_badge = function_exists('aksrt_get_pay_type_badge') ? aksrt_get_pay_ty
$currency = class_exists('AKSRT_Settings') ? AKSRT_Settings::get_currency_name() : __('积分', 'aksrt');
?>
<section class="widget resource-download-box resource-download-box--v2<?php echo $gate_blocked ? ' is-blocked' : ''; ?><?php echo $is_resource_context ? ' resource-download-box--legacy-resource' : ' resource-download-box--content'; ?>"
<section class="widget resource-download-box resource-download-box--v2<?php echo $gate_blocked ? ' is-blocked' : ''; ?> resource-download-box--<?php echo esc_attr($context_variant); ?>"
data-post-id="<?php echo esc_attr((string) $post_id); ?>"
data-price="<?php echo esc_attr((string) ($meta['price'] ?? 0)); ?>"
data-credit="<?php echo $credit_active ? '1' : '0'; ?>"