1. * * @param array $args { * @type string $class Extra CSS classes on the root. * @type string $type Category letter a–l, or empty for random. * @type int $count Number of quotes to load (1–10). * @type int $interval Rotation interval in seconds. * @type string $icon Optional FA icon class; empty = no icon. * } */ function aksrt_render_yiyan_block(array $args = []): void { $class = trim((string) ($args['class'] ?? 'aksrt-yiyan')); $type_raw = strtolower(trim((string) ($args['type'] ?? ''))); $type = preg_match('/^[a-l]$/', $type_raw) ? $type_raw : ''; $count = max(1, min(10, (int) ($args['count'] ?? 5))); $interval = max(3, min(30, (int) ($args['interval'] ?? 8))); $icon = sanitize_text_field((string) ($args['icon'] ?? '')); if (strpos($class, 'aksrt-yiyan') === false) { $class = trim($class . ' aksrt-yiyan'); } ?>
>