@@ -409,7 +385,6 @@ class DomainModel {
$meta['video_pic'] = esc_url_raw((string) ($raw['video_pic'] ?? ''));
$meta['video_title'] = sanitize_text_field((string) ($raw['video_title'] ?? ''));
$meta['video_episode'] = self::sanitize_video_episodes($raw['video_episode'] ?? []);
- $meta['video_scale_height'] = max(0, min(200, (int) ($raw['video_scale_height'] ?? 0)));
$meta['downloads'] = self::sanitize_downloads($raw['downloads'] ?? []);
$meta['attributes'] = self::sanitize_attributes($raw['attributes'] ?? []);
$meta['gallery'] = self::sanitize_gallery($raw['gallery'] ?? []);
@@ -423,9 +398,6 @@ class DomainModel {
// §3.8 电商增强字段
$meta['virtual_sales'] = max(0, (int) ($raw['virtual_sales'] ?? 0));
- $meta['stock'] = (int) ($raw['stock'] ?? -1);
- $meta['card_keys'] = self::sanitize_card_keys($raw['card_keys'] ?? []);
- $meta['purchase_limit'] = max(0, (int) ($raw['purchase_limit'] ?? 0));
$meta['free_preview'] = wp_kses_post((string) ($raw['free_preview'] ?? ''));
$meta['show_sales'] = !isset($raw['show_sales']) || !empty($raw['show_sales']);
$meta['download_limit_over_price'] = $meta['pay_modo'] === 'points'
diff --git a/src/Core/ResourceMetaBox.php b/src/Core/ResourceMetaBox.php
index eb582308..6e4fd07c 100644
--- a/src/Core/ResourceMetaBox.php
+++ b/src/Core/ResourceMetaBox.php
@@ -141,7 +141,6 @@ class ResourceMetaBox {
upload('video_pic', __('视频封面(可选)', 'aksrt'), (string) ($meta['video_pic'] ?? ''), 'image'); ?>
text('video_title', __('本集标题', 'aksrt'), (string) ($meta['video_title'] ?? ''), __('如需添加剧集则需填写此处', 'aksrt'), __('第1集', 'aksrt')); ?>
group('video_episode', __('更多剧集', 'aksrt'), (array) ($meta['video_episode'] ?? []), 'video_row', __('添加剧集', 'aksrt'), __('为付费视频添加更多剧集。', 'aksrt')); ?>
- number('video_scale_height', __('固定长宽比例', 'aksrt'), (string) ($meta['video_scale_height'] ?? 0), '5', '%', __('为 0 则不固定长宽比例。', 'aksrt')); ?>
@@ -336,7 +335,6 @@ class ResourceMetaBox {
'video_pic' => (string) ($raw['video_pic'] ?? ''),
'video_title' => (string) ($raw['video_title'] ?? ''),
'video_episode' => $raw['video_episode'] ?? [],
- 'video_scale_height' => $raw['video_scale_height'] ?? 0,
'downloads' => $raw['downloads'] ?? [],
'attributes' => $raw['attributes'] ?? [],
'demo_url' => (string) ($raw['demo_url'] ?? ''),
diff --git a/templates/pages/page-download-file.php b/templates/pages/page-download-file.php
index 2622d3d9..92c4c086 100644
--- a/templates/pages/page-download-file.php
+++ b/templates/pages/page-download-file.php
@@ -40,7 +40,11 @@ if (!$is_download) {
}
$article_url = get_permalink($post) . '#posts-pay';
-$pay_title = get_the_title($post);
+// 商品简介 / 更多详情 / 额外隐藏内容三个字段只在管理员填写时才有输出。
+$pay_title = trim((string) ($pay_meta['pay_title'] ?? '')) !== '' ? (string) $pay_meta['pay_title'] : get_the_title($post);
+$pay_doc = trim((string) ($pay_meta['pay_doc'] ?? ''));
+$pay_details = trim((string) ($pay_meta['pay_details'] ?? ''));
+$pay_extra_hide = trim((string) ($pay_meta['pay_extra_hide'] ?? ''));
$subtitle = '';
if (function_exists('get_the_subtitle')) {
// noop — AKSRT may not have legacy subtitle helper
@@ -115,6 +119,13 @@ get_header();
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/widget-system/post-editor-reference-contract.test.cjs b/tests/widget-system/post-editor-reference-contract.test.cjs
index fb70dbd8..163674f8 100644
--- a/tests/widget-system/post-editor-reference-contract.test.cjs
+++ b/tests/widget-system/post-editor-reference-contract.test.cjs
@@ -249,7 +249,6 @@ test('article paid-content metabox follows the reference field set without shop
'promotion_tag',
'gallery_show',
'video_episode',
- 'video_scale_height',
'downloads',
'attributes',
'pay_doc',
@@ -259,6 +258,10 @@ test('article paid-content metabox follows the reference field set without shop
assert.match(meta, /add_meta_box\('aksrt_pay_meta', __\('付费功能'/);
fields.forEach((field) => assert.match(meta, new RegExp(field)));
+
+ // video_scale_height 是参考主题轮播组件 widget 的参数,不属于付费视频字段,
+ // 当初误搬到付费 metabox 上且从未被消费,已移除。
+ assert.doesNotMatch(meta, /video_scale_height/);
assert.doesNotMatch(meta, /aksrt_pay_(?:stock|purchase_limit|card_keys|free_preview|require_login|require_captcha)/);
assert.doesNotMatch(meta, /电商增强|parse_json_array/);
});