<?php
/**
 * Template for displaying the single attachment page type audio
 *
 * This template must be called from inside the loop.
 *
 * @author jason.xie@victheme.com
 *
 */
?>
<article id="post-<?php the_ID(); ?>" <?php post_class('single clearfix'); ?>>

  <?php if (VTCore_Zeus_Utility::getShow('full', 'title')) : ?>
    <header>
      <h1 class="post-title element-title title-large">
        <?php the_title(); ?>
        <?php if (VTCore_Zeus_Utility::getShow('full', 'tags')) : ?>
          <?php the_tags('<small class="post-tags"><span class="post-single-category">' . __('Tagged in', BASE_THEME) . ' </span><span class="text-light">', ', ', '</span></small>'); ?>
        <?php endif; ?>
      </h1>
    </header>
  <?php endif; ?>

  <div class="post-thumbnail">
    <audio width="100%" controls="true">
      <source src="<?php echo esc_url(wp_get_attachment_url()); ?>"
              type="<?php echo esc_attr($post->post_mime_type); ?>">
      <?php echo sprintf(__('Your Browser doesn\'t support %s type of audio', BASE_THEME), $post->post_mime_type); ?>
      </source>
    </audio>
    <?php if (!empty($post->post_excerpt)) : ?>
      <div class="wp-caption"><?php echo wp_kses_post($post->post_excerpt); ?></div>
    <?php endif; ?>
  </div>

  <?php if (VTCore_Zeus_Utility::getShow('full', 'content')) : ?>
    <div class="post-content">
      <?php the_content(); ?>
    </div>
  <?php endif; ?>

  <?php if (VTCore_Zeus_Utility::getShow('full', 'social')) : ?>
    <div class="post-social text-left">
      <span
        class="post-social-text"><?php echo __('Share this post', BASE_THEME); ?></span>
      <?php $social = new VTCore_Wordpress_Element_WpSocialShare(); ?>
      <span class="post-social-icon"><?php echo $social->render(); ?></span>
    </div>
  <?php endif; ?>


</article>
