-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsingle-episode.php
executable file
·133 lines (89 loc) · 3.57 KB
/
single-episode.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
<?php
/**
* Single Episode Template
*/
?>
<?php get_header(); ?>
<?php if ( have_posts() ) : while ( have_posts() ) : the_post();
$episode = Nexus_Episode::factory(get_the_ID());
$series = $episode->get_series();
$cp_episode = new Coprime_Episode($episode);
$cp_series = new Coprime_Series($series);
?>
<?php do_action('before_hero'); ?>
<section id="hero-container">
<div class="hero-wrapper">
<div class="hero-meta">
<h2 class="show-series-name"><?php echo $cp_series->get_series_name(); ?></h2>
<div class="show-series-description"><?php echo $cp_series->get_series_description(); ?></div>
</div>
<div class="hero-album-art">
<?php
echo $cp_episode->get_hero_albumart();
?>
</div>
<?php do_action('in_hero'); ?>
</div>
</section>
<?php do_action('after_hero'); ?>
<?php do_action('before_world'); ?>
<section id="world">
<div id="content-container">
<div class="content-wrapper">
<?php do_action('before_content'); ?>
<article id="item-<?php the_ID(); ?>" role="article" <?php post_class(); ?>>
<div class="box">
<?php do_action('before_in_content'); ?>
<header class="content-header">
<h1 class="show-title"><?php echo $cp_episode->get_title(); ?></h1>
<div class="show-meta">
<h2 class="show-number"><?php echo $cp_episode->get_episode_position(); ?></h2>
▪
<h3 class="show-date"><?php echo $cp_episode->get_posted_date_ago(); ?></h3>
</div>
<?php if ( $episode->get_excerpt() != '' ): ?>
<div class="show-description entry-summary">
<?php echo $cp_episode->get_episode_description(); ?>
</div>
<?php endif; ?>
<?php do_action('in_content_header'); ?>
</header>
<aside class="content-aside">
<?php if ( $episode->get_enclosure() ):
$enclosure = $episode->get_enclosure();
echo $cp_episode->get_podcast_player($enclosure);
echo $cp_episode->get_podcast_meta($enclosure);
endif; ?>
</aside>
<section class="content-section entry-content">
<?php echo $episode->get_content(); ?>
<?php do_action('in_content_section'); ?>
</section>
<footer class="content-footer">
<div class="ignore"><span class="vcard author"><span class="fn"><?php echo $cp_episode->get_episode_author(); ?></span></span></div>
<div class="navigation">
<span class="previous"><?php echo previous_post_link('%link', '← Previous', true); ?></span>
<span class="next"><?php echo next_post_link('%link', 'Next →', true); ?></span>
<?php do_action('in_content_footer'); ?>
</div>
</footer>
<?php do_action('after_in_content'); ?>
</div>
</article>
<?php do_action('after_content'); ?>
<?php do_action('before_sidebar'); ?>
<div class="sidebar">
<div class="sidebar-wrapper">
<?php if ($episode->has_people()): get_template_part('partials/episode-people'); endif; ?>
<?php get_template_part('partials/episode-subscribe') ?>
<?php get_template_part('partials/episode-share'); ?>
</div>
</div>
<?php do_action('after_sidebar'); ?>
</div>
</div>
</section>
<?php do_action('after_world'); ?>
<?php endwhile; ?>
<?php endif; ?>
<?php get_footer(); ?>