PHP Classes

File: parts/podcast.php

Recommend this page to a friend!
  Classes of Victor Andeloci   One WordPress Game Theme   parts/podcast.php   Download  
File: parts/podcast.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: 1 year ago
Size: 6,866 bytes
 

Contents

Class file image Download
<section id="podcast">
    <div class="container">
        <h2 class="subtitle">Podcast</h2>
        <div class="podcast-links">
            <a target="_blank" rel="noopener nofollow" href="https://open.spotify.com/show/2Y4n9PntpuhSvObzGZyk4L" title="Spotify" class="spotify">
                <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 496 512"><!--! Font Awesome Pro 6.4.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><path d="M248 8C111.1 8 0 119.1 0 256s111.1 248 248 248 248-111.1 248-248S384.9 8 248 8zm100.7 364.9c-4.2 0-6.8-1.3-10.7-3.6-62.4-37.6-135-39.2-206.7-24.5-3.9 1-9 2.6-11.9 2.6-9.7 0-15.8-7.7-15.8-15.8 0-10.3 6.1-15.2 13.6-16.8 81.9-18.1 165.6-16.5 237 26.2 6.1 3.9 9.7 7.4 9.7 16.5s-7.1 15.4-15.2 15.4zm26.9-65.6c-5.2 0-8.7-2.3-12.3-4.2-62.5-37-155.7-51.9-238.6-29.4-4.8 1.3-7.4 2.6-11.9 2.6-10.7 0-19.4-8.7-19.4-19.4s5.2-17.8 15.5-20.7c27.8-7.8 56.2-13.6 97.8-13.6 64.9 0 127.6 16.1 177 45.5 8.1 4.8 11.3 11 11.3 19.7-.1 10.8-8.5 19.5-19.4 19.5zm31-76.2c-5.2 0-8.4-1.3-12.9-3.9-71.2-42.5-198.5-52.7-280.9-29.7-3.6 1-8.1 2.6-12.9 2.6-13.2 0-23.3-10.3-23.3-23.6 0-13.6 8.4-21.3 17.4-23.9 35.2-10.3 74.6-15.2 117.5-15.2 73 0 149.5 15.2 205.4 47.8 7.8 4.5 12.9 10.7 12.9 22.6 0 13.6-11 23.3-23.2 23.3z"/></svg>
            </a>
            <a target="_blank" rel="noopener nofollow" href="https://podcasts.apple.com/us/podcast/player-select/id566606429" title="Apple Podcasts" class="apple">
                <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512"><!--! Font Awesome Pro 6.4.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><path d="M318.7 268.7c-.2-36.7 16.4-64.4 50-84.8-18.8-26.9-47.2-41.7-84.7-44.6-35.5-2.8-74.3 20.7-88.5 20.7-15 0-49.4-19.7-76.4-19.7C63.3 141.2 4 184.8 4 273.5q0 39.3 14.4 81.2c12.8 36.7 59 126.7 107.2 125.2 25.2-.6 43-17.9 75.8-17.9 31.8 0 48.3 17.9 76.4 17.9 48.6-.7 90.4-82.5 102.6-119.3-65.2-30.7-61.7-90-61.7-91.9zm-56.6-164.2c27.3-32.4 24.8-61.9 24-72.5-24.1 1.4-52 16.4-67.9 34.9-17.5 19.8-27.8 44.3-25.6 71.9 26.1 2 49.9-11.4 69.5-34.3z"/></svg>
            </a>
            <a target="_blank" rel="noopener nofollow" href="https://podcasts.google.com/?feed=aHR0cDovL3BsYXllcnNlbGVjdC5jb20uYnIvZmVlZC9wb2RjYXN0Lw%3D%3D" title="Google Podcasts" class="google">
                <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 488 512"><!--! Font Awesome Pro 6.4.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><path d="M488 261.8C488 403.3 391.1 504 248 504 110.8 504 0 393.2 0 256S110.8 8 248 8c66.8 0 123 24.5 166.3 64.9l-67.5 64.9C258.5 52.6 94.3 116.6 94.3 256c0 86.5 69.1 156.6 153.7 156.6 98.2 0 135-70.4 140.8-106.9H248v-85.3h236.1c2.3 12.7 3.9 24.9 3.9 41.4z"/></svg>
            </a>
            <a target="_blank" rel="noopener nofollow" href="https://www.deezer.com/en/show/56479" title="Deezer" class="deezer">
                <svg xmlns="http://www.w3.org/2000/svg" height="1em" viewBox="0 0 576 512"><!--! Font Awesome Free 6.4.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><path d="M451.46,244.71H576V172H451.46Zm0-173.89v72.67H576V70.82Zm0,275.06H576V273.2H451.46ZM0,447.09H124.54V374.42H0Zm150.47,0H275V374.42H150.47Zm150.52,0H425.53V374.42H301Zm150.47,0H576V374.42H451.46ZM301,345.88H425.53V273.2H301Zm-150.52,0H275V273.2H150.47Zm0-101.17H275V172H150.47Z"/></svg>
            </a>
            <a target="_blank" rel="noopener nofollow" href="https://playerselect.com.br/feed/podcast/" title="Feed RSS" class="rss">
                <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Pro 6.4.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><path d="M0 64C0 46.3 14.3 32 32 32c229.8 0 416 186.2 416 416c0 17.7-14.3 32-32 32s-32-14.3-32-32C384 253.6 226.4 96 32 96C14.3 96 0 81.7 0 64zM0 416a64 64 0 1 1 128 0A64 64 0 1 1 0 416zM32 160c159.1 0 288 128.9 288 288c0 17.7-14.3 32-32 32s-32-14.3-32-32c0-123.7-100.3-224-224-224c-17.7 0-32-14.3-32-32s14.3-32 32-32z"/></svg>
            </a>
        </div>
        <div class="selector">
            <select class="podcast-select" name="Podcasts Selector">
                <option value="">Selecione um episódio</option>
                <?php
                    $args
= [
                       
'post_type' => 'post',
                       
'category_name' => 'podcast',
                       
'order' => 'DESC',
                       
'hide_empty'=> 1,
                       
'depth' => 1,
                       
'posts_per_page' => -1
                   
];

                   
$query = new WP_Query($args);

                    if (
$query->have_posts()) :
                        while (
$query->have_posts()) :
                           
$query->the_post();
               
?>
<option title="<?php the_title(); ?>" value="<?php the_permalink(); ?>"><?php the_title(); ?></option>
                <?php
                       
endwhile;
                    endif;
               
?>
</select>
            <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512"><!--! Font Awesome Pro 6.4.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><path d="M169.4 470.6c12.5 12.5 32.8 12.5 45.3 0l160-160c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L224 370.8 224 64c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 306.7L54.6 265.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l160 160z"/></svg>
        </div>
        <?php
            $args
= [
               
'post_type' => 'post',
               
'category_name' => 'podcast',
               
'order' => 'DESC',
               
'posts_per_page' => 15
           
];

           
wp_reset_query();
           
$query = new WP_Query($args);

            if (
$query->have_posts()):
       
?>
<div id="podcastList" class="podcast-items">
                    <?php
                        $i
= 0;
                        while (
$query->have_posts()) {
                           
$query->the_post();
                           
get_template_part('elements/podcast_item', null, [
                               
'index' => $i
                           
]);
                           
$i++;
                        }
                   
?>
</div>
        <?php endif; ?>
<div class="pagination-container">
            <button id="podcastLoadMore">Carregar mais</button>
        </div>
    </div>
</section>