PHP Classes

File: elements/podcast_card_player.php

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

Contents

Class file image Download
<?php
   
if (!empty($args['post'])) :
       
$post = $args['post'];
       
$postThumb = get_the_post_thumbnail_url($post->ID, 'medium');
       
$podcast_mp3_thumb = trim(get_post_meta($post->ID, 'podcast_mp3_thumb', true));
        if (empty(
$podcast_mp3_thumb))
           
$podcast_mp3_thumb = trim(get_post_meta($post->ID, 'one_podcast_cover_url', true));
        if (empty(
$podcast_mp3_thumb))
           
$podcast_mp3_thumb = trim(get_post_meta($post->ID, 'episode_cover', true));
?>
<div class="card-player">
        <div class="row">
            <a href="<?= get_permalink($post->ID) ?>" class="column" style="background-image: url(<?= !empty($podcast_mp3_thumb)
                                                                    ?
$podcast_mp3_thumb
                                                                   
: (!empty($postThumb)
                                                                        ?
$postThumb
                                                                       
: get_template_directory_uri() . '/assets/img/default-image.png') ?>);"></a>
            <div class="column">
                <?php get_template_part('elements/tags_container', null, [
                   
'post_id' => $post->ID
               
]); ?>
<h3><?= get_the_title($post->ID) ?></h3>
                <?php get_template_part('elements/podcast_player', null, [
                   
'post_id' => $post->ID,
                   
'hide_controls' => true
               
]); ?>
</div>
        </div>
    </div>
<?php endif; ?>