PHP Classes

File: elements/podcast_item.php

Recommend this page to a friend!
  Classes of Victor Andeloci   One WordPress Game Theme   elements/podcast_item.php   Download  
File: elements/podcast_item.php
Role: Auxiliary script
Content type: text/plain
Description: Auxiliary script
Class: One WordPress Game Theme
WordPress theme for a gaming blog and podcast
Author: By
Last change:
Date: 9 months ago
Size: 1,513 bytes
 

Contents

Class file image Download
<div class="podcast-item <?= !empty($args['class']) ? $args['class'] : '' ?>">
    <?php
        $postThumb
= get_the_post_thumbnail_url(get_the_ID(), (isset($args['index']) && $args['index'] == 0) ? 'large' : 'medium');
       
$podcast_mp3_thumb = trim(get_post_meta(get_the_ID(), 'podcast_mp3_thumb', true));
        if (empty(
$podcast_mp3_thumb))
           
$podcast_mp3_thumb = trim(get_post_meta(get_the_ID(), 'one_podcast_cover_url', true));
        if (empty(
$podcast_mp3_thumb))
           
$podcast_mp3_thumb = trim(get_post_meta(get_the_ID(), 'episode_cover', true));
   
?>
<a
        href="<?= get_permalink() ?>"
        class="podcast-ep"
        title="<?= get_the_title() ?>"
        lazy-load-background="<?= !empty($podcast_mp3_thumb)
                                    ?
$podcast_mp3_thumb
                                   
: (!empty($postThumb)
                                        ?
$postThumb
                                       
: get_template_directory_uri() . '/assets/img/default-image.png') ?>"
        style="background-image: url(<?= get_template_directory_uri() . '/assets/img/default-image.png' ?>);"
    ></a>
    <?php if (isset($args['index']) && $args['index'] == 0) : ?>
<div class="content">
            <?php get_template_part('elements/tags_container'); ?>
<h2><?= get_the_title() ?></h2>
            <?php get_template_part('elements/podcast_player'); ?>
<?= get_the_content() ?>
</div>
    <?php endif; ?>
</div>