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

+3 -3
View File
@@ -117,7 +117,7 @@ $dl_requires_login = !empty($paid_settings['download_login']);
<?php if ($resource_query->have_posts()) : ?>
<div class="aksrt-download-center__grid">
<?php while ($resource_query->have_posts()) : $resource_query->the_post(); ?>
<article class="aksrt-download-card<?php echo function_exists('aksrt_is_resource_post') && aksrt_is_resource_post(get_the_ID()) ? ' is-legacy-resource' : ''; ?>">
<article class="aksrt-download-card<?php echo function_exists('aksrt_is_resource_post') && aksrt_is_resource_post(get_the_ID()) ? ' is-resource' : ''; ?>">
<?php if (has_post_thumbnail()) : ?>
<div class="aksrt-download-card__thumb">
<a href="<?php the_permalink(); ?>">
@@ -127,7 +127,7 @@ $dl_requires_login = !empty($paid_settings['download_login']);
<?php endif; ?>
<div class="aksrt-download-card__body">
<p class="aksrt-download-card__eyebrow">
<?php echo esc_html(function_exists('aksrt_is_resource_post') && aksrt_is_resource_post(get_the_ID()) ? __('旧资源兼容内容', 'aksrt') : __('内容付费入口', 'aksrt')); ?>
<?php echo esc_html(function_exists('aksrt_is_resource_post') && aksrt_is_resource_post(get_the_ID()) ? __('资源内容入口', 'aksrt') : __('内容付费入口', 'aksrt')); ?>
</p>
<h3 class="aksrt-download-card__title">
<a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
@@ -215,7 +215,7 @@ $dl_requires_login = !empty($paid_settings['download_login']);
<div class="aksrt-dl-sidebar-card__tips">
<p><i class="fas fa-book-open" aria-hidden="true"></i> <?php esc_html_e('优先从普通文章内容页进入主付费链路', 'aksrt'); ?></p>
<p><i class="fas fa-clock" aria-hidden="true"></i> <?php esc_html_e('下载链接 10 分钟内有效', 'aksrt'); ?></p>
<p><i class="fas fa-sync-alt" aria-hidden="true"></i> <?php esc_html_e('历史资源页与下载中心仅作为兼容入口保留', 'aksrt'); ?></p>
<p><i class="fas fa-sync-alt" aria-hidden="true"></i> <?php esc_html_e('下载中心作为统一内容付费的补充入口', 'aksrt'); ?></p>
</div>
</div>
</div>
+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'; ?>"
+2 -2
View File
@@ -2,9 +2,9 @@
/**
* Resource Meta Box
*
* 单篇资源页用:版本/大小/授权/兼容/演示 等元信息表。
* 统一资源/付费内容侧栏信息表。
*
* 由 single-aksrt_resource.php 调用:
* 由统一 single.php / 资源内容上下文调用:
* set_query_var('aksrt_resource_meta', $meta);
* get_template_part('templates/parts/resource-meta-box');
*