修复AJAX 引擎

This commit is contained in:
2026-08-23 18:01:56 +08:00
parent c4512f2bc2
commit 616beb8c03
8 changed files with 50 additions and 32 deletions
+3
View File
@@ -255,6 +255,9 @@ class Admin {
if (isset($config['query_context'])) {
$clean['query_context'] = sanitize_key((string) $config['query_context']);
}
if (isset($config['term_id'])) {
$clean['term_id'] = absint($config['term_id']);
}
foreach (['no_author', 'no_margin', 'is_card', 'skip_wrapper'] as $bool_key) {
if (array_key_exists($bool_key, $config)) {
$clean[$bool_key] = !empty($config[$bool_key]);
+4 -1
View File
@@ -335,7 +335,10 @@ class GlobalController extends ControllerBase {
}
$query = new \WP_Query($args);
$render_config = aksrt_resolve_post_list_render_config(['context' => $archive_type]);
$render_config = aksrt_resolve_post_list_render_config([
'context' => $archive_type,
'term_id' => $archive_type === 'category' ? $term_id : 0,
]);
$render_config['skip_wrapper'] = true;
$html = aksrt_render_post_list($render_config, $query, false);