<?php
/**
 * Returns first category block for use with meta element.
 *
 * @package TotalTheme
 * @subpackage Partials\Meta\Blocks
 * @version 5.4.6
 */

defined( 'ABSPATH' ) || exit;

$taxonomy = $args['taxonomy'] ?? null;

if ( ! $taxonomy ) {
    return;
}

wpex_first_term_link( array(
    'taxonomy' => $taxonomy,
    'before'   => '<li class="meta-category">' . wpex_get_theme_icon_html( $args['icon'] ?? 'folder-o', 'meta-icon' ),
    'after'    => '</li>',
    'instance' => $args['hook_name'] ?? 'meta',
) );