修复AJAX 引擎
This commit is contained in:
@@ -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]);
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user