<?php

/* @var Tangibledesign\MyHome\Widgets\BlogPost\BlogPostCategoriesWidget $mhCurrentWidget */
global $mhCurrentWidget;

$mhCategories = $mhCurrentWidget->getCategories();
if ($mhCategories->isEmpty()) {
    return;
}
?>
<div class="myhome-blog-post-categories-widget">
    <?php foreach ($mhCategories as $mhCategory) : ?>
        <a
            href="<?php echo esc_url($mhCategory->getUrl()); ?>"
            class="myhome-blog-post-categories-widget__category"
        >
            <?php echo esc_html($mhCategory->getName()); ?>
        </a>
    <?php endforeach; ?>
</div>
