进行了一些小修复
This commit is contained in:
1 parent
d37c34f71c
commit
ae10b3d3fd
16 files changed
+278
-417
No files matched your search
@@ -197,6 +197,7 @@ trait ScriptsPart1b {
|
||||
'needs_cover' => 'single-post/cover',
|
||||
'needs_related_toc' => 'single-post/related-toc',
|
||||
'has_hidden_content' => 'single-post/hidden-content',
|
||||
'needs_pay_box' => 'pay-box',
|
||||
];
|
||||
$single_feature_handles = [];
|
||||
foreach ($single_features as $requirement => $part) {
|
||||
|
||||
@@ -28,6 +28,7 @@ trait ScriptsPart1c {
|
||||
'has_toc' => false,
|
||||
'has_video' => false,
|
||||
'has_hidden_content' => false,
|
||||
'needs_pay_box' => false,
|
||||
'needs_cover' => false,
|
||||
'needs_navigation' => false,
|
||||
'needs_related_toc' => false,
|
||||
@@ -112,6 +113,7 @@ trait ScriptsPart1c {
|
||||
$requirements['has_toc'] = $is_article && $heading_count >= 2;
|
||||
$requirements['has_video'] = $has_video;
|
||||
$requirements['has_hidden_content'] = $has_hidden_content || $has_yiyan || $has_inserted_content;
|
||||
$requirements['needs_pay_box'] = $is_paid_content_single || (bool) preg_match('/\[(?:payshow|hidecontent)\b|wp:aksrt\/paid-fragment/i', $content);
|
||||
$requirements['needs_cover'] = $is_article && (
|
||||
$show_cover
|
||||
|| !empty($settings['breadcrumbs'])
|
||||
|
||||
+1
-16
@@ -120,22 +120,7 @@ class Shortcodes {
|
||||
}
|
||||
|
||||
$message = $atts['message'] ?: __('此内容需付费后查看', 'aksrt');
|
||||
if (function_exists('aksrt_get_paywall_html')) {
|
||||
$paywall = aksrt_get_paywall_html($post, true);
|
||||
if ($message !== '') {
|
||||
$paywall = str_replace(
|
||||
'<p class="aksrt-paywall__desc">',
|
||||
'<p class="aksrt-paywall__desc">' . esc_html($message) . ' ',
|
||||
$paywall
|
||||
);
|
||||
}
|
||||
return $paywall;
|
||||
}
|
||||
|
||||
return '<div class="aksrt-hidden-content aksrt-hidden-content--locked aksrt-hidden-content--payshow">'
|
||||
. '<div class="aksrt-hidden-content__message"><i class="fa fas fa-lock" aria-hidden="true"></i><span>'
|
||||
. esc_html($message)
|
||||
. '</span></div></div>';
|
||||
return aksrt_get_paywall_html($post, ['message' => $message]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user