fix(pay): render paid reading as fragments
This commit is contained in:
@@ -89,6 +89,10 @@ class ResourceMetaBox {
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<p class="aksrt-pmb__hint" id="aksrt-pmb-reading-hint" hidden>
|
||||
<?php esc_html_e('付费阅读价格只作用于正文中的“付费可见”片段;未插入片段时,正文保持公开。', 'aksrt'); ?>
|
||||
</p>
|
||||
|
||||
<div class="aksrt-pmb__fields" id="aksrt-pmb-fields" data-disabled="<?php echo $is_paid ? '0' : '1'; ?>">
|
||||
|
||||
<!-- 基础价格 -->
|
||||
@@ -378,6 +382,9 @@ class ResourceMetaBox {
|
||||
var isPaid = t !== 'no';
|
||||
fields.setAttribute('data-disabled', isPaid ? '0' : '1');
|
||||
|
||||
var readingHint = document.getElementById('aksrt-pmb-reading-hint');
|
||||
if (readingHint) readingHint.hidden = t !== 'reading';
|
||||
|
||||
// 根据付费类型显示/隐藏相关字段
|
||||
if (dlFields) dlFields.style.display = (t === 'download') ? '' : 'none';
|
||||
if (galleryFields) galleryFields.style.display = (t === 'gallery') ? '' : 'none';
|
||||
|
||||
Reference in New Issue
Block a user