修复AJAX 引擎

This commit is contained in:
2026-08-23 17:30:56 +08:00
parent 8d2b78a322
commit c4512f2bc2
@@ -110,8 +110,9 @@ if (!function_exists('aksrt_render_pagination')) {
$ias_max = max(0, (int) ($list_settings['ias_max'] ?? 3));
}
$auto_load = $pagination_mode === 'infinite' && ($ias_max === 0 || $current_page <= $ias_max);
?>
<div class="text-center theme-pagination ajax-pag"
// 该控件渲染在 inline-block 卡片网格容器内部,输出必须从 div 标签紧贴开始,
// 任何前导空白文本节点都会在追加卡片时挤断网格行。
?><div class="text-center theme-pagination ajax-pag"
data-aksrt-pagination
data-mode="<?php echo esc_attr($pagination_mode); ?>"
data-next-page="<?php echo esc_attr((string) ($current_page + 1)); ?>"
@@ -124,8 +125,7 @@ if (!function_exists('aksrt_render_pagination')) {
<a href="<?php echo esc_url(add_query_arg($page_var, $current_page + 1)); ?>" data-aksrt-load-more><?php echo wp_kses_post($trigger_text); ?></a>
</div>
<div class="post_ajax_loader" style="display:none;" aria-hidden="true"><?php echo function_exists('aksrt_render_placeholder') ? aksrt_render_placeholder('list', 2) : ''; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></div>
</div>
<?php
</div><?php
}
}