Exemplo n.º 1
0
        <?php 
$post_id = is_home() ? get_site_option('featured_webseries') : $post->ID;
?>

        <nav id="navigation" class="top-bar" data-topbar role="navigation" data-options="is_hover:true">
          <section class="top-bar-section">
            <?php 
if (is_single()) {
    ?>
              <ul class="right">
                <?php 
    $currentEpisodeNumber = get_episode_number($post_id);
    $webisoderightnavs_args = array('post_type' => 'webisodes', 'meta_key' => 'episode', 'order_by' => 'meta_value_num', 'order' => ASC);
    $webisoderightnavs = new WP_Query($webisoderightnavs_args);
    ?>
          
                <?php 
    if ($webisoderightnavs->have_posts()) {
        ?>
                    <?php 
        while ($webisoderightnavs->have_posts()) {
            $webisoderightnavs->the_post();
            ?>
                      <?php 
            $episodes_count = get_last_episode_number($webisoderightnavs->posts);
            $episodeId = $webisoderightnavs->post->ID;
            $previousEpisodeNumber = get_previous_episode_number($currentEpisodeNumber, $episodes_count);
            $nextEpisodeNumber = get_next_episode_number($currentEpisodeNumber, $episodes_count);
            $episodeNumber = get_post_meta($episodeId, 'episode', true);
            ?>
	<p>magic export (to json) starting at ... <?php 
echo $time_start;
?>
</p>
</div>

<?php 
$categories = get_categories();
$series = array();
foreach ($categories as $category) {
    $episodes = array();
    $q = new WP_Query(array('category_name' => $category->slug, 'posts_per_page' => -1));
    while ($q->have_posts()) {
        $q->the_post();
        $data = powerpress_get_enclosure_data(get_the_ID());
        $episode = array('name' => get_the_title(), 'number' => get_episode_number(get_permalink()), 'desc' => get_the_excerpt(), 'content' => get_the_content(), 'series' => $category->slug, 'media' => $data['url'], 'length' => $data['duration'], 'filesize' => $data['size']);
        $episodes[] = $episode;
    }
    $series[] = array('name' => $category->name, 'short-name' => $category->slug, 'desc' => $category->category_description);
    ?>
		<div class="magic">
			<p>finished processing series: <?php 
    echo $category->slug;
    ?>
 with <?php 
    echo count($episodes);
    ?>
 episodes</p>
			<p> <a href="<?php 
    echo $www . $category->slug . '-episodes.json';
    ?>
Exemplo n.º 3
0
    echo $show_title_class;
    ?>
"><?php 
    echo $show_title;
    ?>
</h2>

                      <h3 class="show-name">
                        <span class="name">
                        <?php 
    $category = get_the_category();
    echo $category[0]->name;
    ?>
</span>
                        <span class="sep">#</span><span class="number"><?php 
    echo get_episode_number(get_permalink());
    ?>
</span>
                      </h4>

                    <h4 class="show-date">
                    <?php 
    echo get_the_date("F j");
    ?>
                    <?php 
    convergence_new_episode(7);
    ?>
                    </h5>

                </div>
            </a>
Exemplo n.º 4
0
/**
 * Outputs, with formatting, the proper episode number.
 * @return string
 */
function convergence_episode()
{
    $episode = "";
    $type = get_post_type();
    if ($type == 'episode') {
        $fringe = C::get_related_fringe_url();
        if ($fringe != '') {
            $fringe = '<span class="with-fringe"> with <a href="' . $fringe . '">Fringe</a></span>';
        }
        $episode = '<h3 class="show-episode">Episode <span class="number">#' . get_episode_number(get_permalink()) . '</span>' . $fringe . '</h3>';
    }
    echo apply_atomic_shortcode('episode', $episode);
}