<?php

if (get_post_meta($post->ID, 'glamer_postmeta_audio', true)) {
    $audio_meta = get_post_meta($post->ID, 'glamer_postmeta_audio', true);
} else {
    $audio_meta = array();
}

if (array_key_exists('glamer_post_audio', $audio_meta) && !empty($audio_meta['glamer_post_audio'])) {
    $embade_code = $audio_meta['glamer_post_audio'];
} else {
    $embade_code = '';
}
?>
<?php if ($embade_code) : ?>
    <div class="post-thumbnail-wrapper">
        <div class="audio-iframe-wrapper">
            <?php echo glamer_iframe_embed($embade_code, ''); ?>
        </div>
    </div>
<?php else : ?>
    <?php if (has_post_thumbnail()) : ?>
        <div class="post-thumbnail-wrapper">
            <?php the_post_thumbnail('glamer-large'); ?>
        </div>
    <?php endif; ?>
<?php endif; ?>