fix(yiyan): stop invalid Hitokoto category requests

Public hitokoto v1 rejects c=hitokoto (and ignores batch count). Whitelist
categories a–l, multi-fetch for carousel, and share full markup via
aksrt_render_yiyan_block so single-post shells actually render quotes.
This commit is contained in:
kate522 committed 2026-07-17 10:33:00 +08:00
1 parent 7cc25ef68c
commit 6bd7676b73
5 files changed
+402 -164

No files matched your search

+13 -5
View File
@@ -313,7 +313,11 @@ if (!function_exists('aksrt_single_render_content_footer')) :
$post_id = (int) $ctx['post_id'];
?>
<?php if (!empty($settings['yiyan_footer'])) : ?>
<div class="article-yiyan yiyan-box aksrt-yiyan yiyan--footer" data-aksrt-yiyan data-type="hitokoto"></div>
<?php
aksrt_render_yiyan_block([
'class' => 'article-yiyan yiyan-box aksrt-yiyan yiyan--footer',
]);
?>
<?php endif; ?>
<?php if (!empty($settings['copyright_enabled'])) : ?>
@@ -855,7 +859,11 @@ if (!function_exists('aksrt_single_render_article')) :
<div class="article-content">
<?php if (!empty($settings['yiyan_header'])) : ?>
<div class="article-yiyan yiyan-box aksrt-yiyan yiyan--header theme-box text-center radius8 main-shadow" data-aksrt-yiyan data-type="hitokoto"></div>
<?php
aksrt_render_yiyan_block([
'class' => 'article-yiyan yiyan-box aksrt-yiyan yiyan--header theme-box text-center radius8 main-shadow',
]);
?>
<?php endif; ?>
<?php do_action('aksrt_single_content_before', get_post()); ?>
@@ -910,9 +918,9 @@ if (!function_exists('aksrt_single_render_after_box')) :
$settings = is_array($ctx['settings'] ?? null) ? $ctx['settings'] : [];
if (!empty($settings['yiyan_box'])) {
?>
<div class="yiyan-box main-bg theme-box text-center box-body radius8 main-shadow aksrt-yiyan" data-aksrt-yiyan data-type="hitokoto"></div>
<?php
aksrt_render_yiyan_block([
'class' => 'yiyan-box main-bg theme-box text-center box-body radius8 main-shadow aksrt-yiyan',
]);
}
// Accept both `authordesc` (Settings DTO) and legacy `authordesc_s`.