This commit is contained in:
Sven Steinert
2026-05-13 12:19:42 +02:00
parent f4511b9213
commit 3ff9146a63
13 changed files with 499 additions and 76 deletions

View File

@@ -1,14 +1,14 @@
<?php
defined('ABSPATH') || exit;
?>
<main class="kb-docs-wrap">
<section class="kb-docs-home">
<h1><?php esc_html_e('Knowledgebase', 'kb-markdown-importer'); ?></h1>
<?php echo do_shortcode('[kb_search]'); ?>
<div class="kb-product-list">
<?php foreach ((array) $products as $item) : ?>
<?php $term = $item['term']; ?>
<?php $latest = $item['versions'][0] ?? null; ?>
<section class="kb-product-card">
<h2><a href="<?php echo esc_url($url_builder::product($term->slug)); ?>"><?php echo esc_html($term->name); ?></a></h2>
<h2><a href="<?php echo esc_url($latest ? $url_builder::version($term->slug, $latest->slug) : $url_builder::product($term->slug)); ?>"><?php echo esc_html($term->name); ?></a></h2>
<?php if (! empty($item['versions'])) : ?>
<ul>
<?php foreach ($item['versions'] as $version) : ?>
@@ -19,4 +19,4 @@ defined('ABSPATH') || exit;
</section>
<?php endforeach; ?>
</div>
</main>
</section>