进行了一些小修复

This commit is contained in:
kate522 committed 2026-08-26 21:59:47 +08:00
1 parent 6eb189ca88
commit 1d073ea293
8 files changed
+15 -57

No files matched your search

+6 -17
View File
@@ -21,10 +21,8 @@ if (!function_exists('aksrt_single_render_cover')) :
$type = (string) $ctx['cover_type'];
$badge = (string) $ctx['status_badge'];
$crumbs = (string) $ctx['breadcrumbs_html'];
$meta_box = (string) ($ctx['meta_box_html'] ?? '');
$img_scale = max(10, min(100, (int) $ctx['img_scale']));
$video_scale = max(20, min(100, (int) $ctx['video_scale']));
$episode = (int) $ctx['episode_count'];
$slides = is_array($ctx['slide_images'] ?? null) ? $ctx['slide_images'] : [];
$poster = (string) ($ctx['video_poster'] ?? '');
$title_html = (string) ($ctx['title_html'] ?? esc_html(get_the_title()));
@@ -37,14 +35,9 @@ if (!function_exists('aksrt_single_render_cover')) :
<div class="aksrt-video single-cover__player" data-aksrt-video data-src="<?php echo esc_url($ctx['cover_url']); ?>"<?php echo $poster !== '' ? ' data-poster="' . esc_url($poster) . '"' : ''; ?> style="position:absolute;inset:0;width:100%;height:100%;"></div>
</div>
<div class="single-video-footer dplayer-featured">
<div class="flex jsb at">
<?php if ($crumbs !== '') : ?>
<div class="post-breadcrumbs"><?php echo $crumbs; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></div>
<?php endif; ?>
<?php if ($meta_box !== '') : ?>
<?php echo str_replace('single-metabox', 'single-metabox mb10 ml10 shrink0', $meta_box); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
<?php endif; ?>
</div>
<?php if ($crumbs !== '') : ?>
<div class="post-breadcrumbs"><?php echo $crumbs; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></div>
<?php endif; ?>
<h1 class="article-title">
<?php
$episodes = is_array($ctx['video_episodes'] ?? null) ? $ctx['video_episodes'] : [];
@@ -95,8 +88,7 @@ if (!function_exists('aksrt_single_render_cover')) :
. '<h1 class="article-title title-h-left">' . $title_html . '</h1>'
. ($crumbs !== '' ? $crumbs : '')
. $badge
. '</div>'
. ($meta_box !== '' ? str_replace('single-metabox', 'single-metabox cover-meta abs-right', $meta_box) : '');
. '</div>';
$slider_html = '';
if (function_exists('aksrt_render_slider')) {
$slider_html = aksrt_render_slider([
@@ -142,9 +134,6 @@ if (!function_exists('aksrt_single_render_cover')) :
<?php endif; ?>
<?php echo $badge; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
</div>
<?php if ($meta_box !== '') : ?>
<?php echo str_replace('single-metabox', 'single-metabox cover-meta abs-right', $meta_box); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
<?php endif; ?>
</div>
</div>
<?php
@@ -153,7 +142,7 @@ endif;
if (!function_exists('aksrt_single_render_box_header')) :
/**
* Title + author bar (when no cover).
* Title + author bar and the canonical article meta row.
*
* @param array<string,mixed> $ctx Single context.
*/
@@ -172,7 +161,7 @@ if (!function_exists('aksrt_single_render_box_header')) :
aksrt_single_render_author_bar([
'show_actions' => true,
'show_time' => empty($settings['hide_time']),
'meta_html' => empty($ctx['show_cover']) ? (string) ($ctx['meta_box_html'] ?? '') : '',
'meta_html' => (string) ($ctx['meta_box_html'] ?? ''),
]);
?>
</div>