<meta name="viewport" content="width=device-width, initial-scale=1.0"> <?php wp_head(); ?> </head> <body> <style> html, html body { background:none; overflow:hidden; margin:0; padding:0; width:100%; height:100%; } </style> <?php $id = $_GET['id']; ?> <?php $channel_video = cltv_channel_video($id); ?> <?php if ($channel_video['src']) { ?> <?php if (get_field('is_live')) { $stream_type = 'live'; } else { $stream_type = 'recorded'; } ?> <script> $(document).ready(function(){ var android = /Android/i.test(navigator.userAgent); if(android && navigator.mimeTypes["application/x-shockwave-flash"] == undefined) {
<?php // get the channel global $post; $channel = $post->ID; if (get_post_type() == 'archive') { $channel = get_post_meta($channel, 'channel', true); } // channel's banner image $banner = new WP_Query(array('post_type' => 'sponsor', 'meta_query' => array(array('key' => 'channel', 'value' => "{$channel}"), array('key' => 'banner_ad', 'value' => '1')), 'post_status' => 'published', 'posts_per_page' => 1)); $banner = $banner->have_posts() ? $banner->posts[0] : false; // channel video $channel_video = cltv_channel_video($post->ID); if (get_field('is_live', $channel)) { $stream_type = 'live'; } else { $stream_type = 'recorded'; } // message board $message_board = get_field('message_board', $channel); // sponsors $sponsors = new WP_Query(array('post_type' => 'sponsor', 'meta_key' => 'channel', 'meta_value' => $channel, 'posts_per_page' => 30)); // get archive terms $archive_terms = get_terms('archive_cat', array('hide_empty' => 0)); $archive_term_names = array(); $archives = array(); // find all archives $archives['All'] = new WP_Query(array('posts_per_page' => 60, 'post_type' => 'archive', 'meta_query' => array(array('key' => 'channel', 'value' => $channel)))); // find all archives in categories foreach ($archive_terms as $term) { // build an array of slugs for the non-category archives