feat(frontend): replace article system with Zibll 9.0

This commit is contained in:
kate522 committed 2026-08-18 16:06:47 +08:00
1 parent 2881c69e9c
commit 0f2ac6c34a
69 files changed
+2603 -4163

No files matched your search

+7 -8
View File
@@ -274,10 +274,6 @@ class Shortcodes {
* 用统一渲染器输出文章列表,避免内容里手写卡片循环。
*/
public function render_posts(array $atts = [], string $content = ''): string {
if (!function_exists('aksrt_render_post_list')) {
return '';
}
$a = shortcode_atts([
'count' => 6,
'cat' => '',
@@ -309,10 +305,13 @@ class Shortcodes {
$mode = in_array($a['mode'], ['card', 'list', 'mini'], true) ? $a['mode'] : 'card';
$query = new \WP_Query($query_args);
$html = aksrt_render_post_list($query, [
'context' => 'widget',
'mode' => $mode,
], false);
if ($mode === 'mini') {
$html = aksrt_render_mini_list($query, [], false);
} else {
$html = aksrt_render_post_list([
'type' => $mode === 'card' ? 'card' : 'list',
], $query, false);
}
wp_reset_postdata();
return '<div class="aksrt-shortcode-posts">' . $html . '</div>';