<?php
/**
 * Overlayed Avatars - Template
 * 
 * @package OrokuBlocks
 * @author OrokuBlocks (https://orokublocks.com/)
 * 
 * @since 1.0.0
 * 
 * @param array $args {
 *   @type array  $avatars                                  {
 *     @type string $image_url        Avatar image url.
 *   }
 * }
 */

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

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

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

?>
<?php if ( count( $options['avatars'] ) > 0 ) : ?>
  <div class="orokublocks-overlayed-avatars">
  <?php foreach ( $options['avatars'] as $avatar ) : ?>
    <div class="orokublocks-overlayed-avatar">
      <img class="orokublocks-overlayed-avatar__image" src="<?php echo esc_attr( $avatar['image_url'] ); ?>" alt="">
    </div>
  <?php endforeach; ?>
  </div>
<?php endif; ?>
