<?php
/**
 * Tag List - Template
 * 
 * @package OrokuBlocks
 * @author OrokuBlocks (https://orokublocks.com/)
 * 
 * @since 1.0.0
 * 
 * @param array $args {
 *   @type array $tags {
 *     @type string $text             Tag text.
 *     @type string $link             Tag link.
 *     @type string $color            Tag color.
 *     @type string $size             Tag size.
 *   }
 * }
 */

// Exit if accessed directly
if ( ! defined( 'ABSPATH' ) ) {
  exit;
}

$defaults = [
  'tags'  => []
];

$options = array_merge( $defaults, $args );

?>
<?php if ( count( $options['tags'] ) > 0 ) : ?>
  <div class="orokublocks-tag-list">
  <?php

    foreach ( $options['tags'] as $tag_data ) {
      /**
       * Tag
       */
      orokublocks()->requireTemplate(
        'includes/template/tag',
        $tag_data
      );
    }

  ?>
  </div>
<?php endif; ?>