'; } } if (!function_exists('jio_get_yiyan_markup')) { function jio_get_yiyan_markup(array $args = []): string { return '
'; } } $cases = []; foreach (['search', 'quote'] as $slug) { $definition = WidgetRegistry::get($slug); $widget = new SchemaWidget($definition); $widget->_set(1); $instance = $definition->normalize(['title' => '示例标题', 'placeholder' => '开启精彩搜索']); ob_start(); $widget->widget(['before_widget' => '
', 'after_widget' => '
'], $instance); $cases[$slug] = (string) ob_get_clean(); } echo json_encode($cases, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES | JSON_THROW_ON_ERROR); }