示例#1
0
" role="main">
                	<?php 
//content
if (have_posts()) {
    $get_layout = get_post_meta($post->ID, 'page_layout', true);
    if ($get_layout == 'def' || $get_layout == '') {
        $get_layout = ot_get_option('single_layout_video');
    }
    if ($get_layout == 'inbox') {
        get_template_part('single', 'inbox');
    } else {
        while (have_posts()) {
            the_post();
            $multi_link = get_post_meta(get_the_ID(), 'tm_multi_link', true);
            if (!empty($multi_link)) {
                tm_build_multi_link($multi_link, true);
            }
            get_template_part('content', 'single');
        }
    }
}
//author
$onoff_author = ot_get_option('onoff_author');
if ($onoff_author != '0') {
    ?>
							<div class="about-author">
								<div class="author-avatar">
									<?php 
    echo tm_author_avatar();
    ?>
								</div>
 <?php 
while (have_posts()) {
    the_post();
    global $post;
    if (!isset($content_width)) {
        $content_width = 900;
    }
    $file = get_post_meta($post->ID, 'tm_video_file', true);
    global $url;
    $url = trim(get_post_meta($post->ID, 'tm_video_url', true));
    $code = trim(get_post_meta($post->ID, 'tm_video_code', true));
    $multi_link = get_post_meta($post->ID, 'tm_multi_link', true);
    global $link_arr;
    if (!empty($multi_link)) {
        $link_arr = tm_build_multi_link($multi_link, false);
        //check request
        if (isset($_GET['link']) && $_GET['link'] !== '') {
            $url = $link_arr[$_GET['link']]['url'];
        }
    }
    $auto_load = ot_get_option('auto_load_next_video');
    $auto_load_prev = ot_get_option('auto_load_next_prev');
    global $auto_play;
    $auto_play = ot_get_option('auto_play_video');
    $delay_video = ot_get_option('delay_video');
    $delay_video = $delay_video * 1000;
    if ($delay_video == '') {
        $delay_video = 1000;
    }
    $detect = new Mobile_Detect();
    global $_device_, $_device_name_, $_is_retina_;