$base, 'format' => '', 'current' => $current, 'total' => $total_pages, 'prev_text' => '' . esc_html__('上一页', 'aksrt') . '', 'next_text' => '' . esc_html__('下一页', 'aksrt') . '', 'mid_size' => 1, 'end_size' => 1, ]); if ($links) { echo ''; // phpcs:ignore } } } if (!function_exists('aksrt_render_asset_pagination')) { /** * Render user asset pagination without URL state. */ function aksrt_render_asset_pagination(int $total_pages, int $current, string $asset): void { if ($total_pages <= 1) { return; } $current = max(1, min($total_pages, $current)); $pages = array_values(array_unique(array_filter([ 1, $current - 1, $current, $current + 1, $total_pages, ], static fn(int $page): bool => $page >= 1 && $page <= $total_pages))); sort($pages); echo ''; } } if (!function_exists('aksrt_render_profile_empty')) { /** * 渲染空状态卡片 */ function aksrt_render_profile_empty($icon_svg, $title, $desc = '', $cta_url = '', $cta_label = '') { echo '
'; echo ''; // phpcs:ignore echo '

' . esc_html($title) . '

'; if ($desc) { echo '

' . esc_html($desc) . '

'; } if ($cta_url && $cta_label) { echo '' . esc_html($cta_label) . ''; } echo '
'; } }