Guest User

single_video.php techblaze SSL fix wordpress

a guest
Jun 7th, 2016
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 5.08 KB | None | 0 0
  1. <?php global $bpxl_techblaze_options; ?>
  2.  
  3. <?php $bpxl_cover = rwmb_meta( 'bpxl_post_cover_show', $args = array('type' => 'checkbox'), $post->ID ); ?>
  4.  
  5. <article <?php post_class(); ?>>
  6.  
  7.     <div id="post-<?php the_ID(); ?>" class="post-box">
  8.  
  9.         <?php
  10.  
  11.             if($bpxl_techblaze_options['bpxl_single_meta'] == '1') { ?>
  12.  
  13.                 <div class="post-meta-top"><?php
  14.  
  15.                     if($bpxl_techblaze_options['bpxl_single_post_meta_options']['3'] == '1') { ?>
  16.  
  17.                         <div class="post-cats uppercase">
  18.  
  19.                             <span>
  20.  
  21.                             <?php $category = get_the_category();
  22.  
  23.                             if ($category) {
  24.  
  25.                               echo '<a href="' . get_category_link( $category[0]->term_id ) . '" title="' . sprintf( __( "View all posts in %s", "bloompixel" ), $category[0]->name ) . '" ' . '>' . $category[0]->name.'</a> ';
  26.  
  27.                             } ?>
  28.  
  29.                             </span>
  30.  
  31.                         </div><?php
  32.  
  33.                         // Post Format Icon
  34.  
  35.                         get_template_part('template-parts/post-format-icons');
  36.  
  37.                     }
  38.  
  39.                     if($bpxl_cover == '0' || $bpxl_cover == '') {
  40.  
  41.                         if($bpxl_techblaze_options['bpxl_post_meta_options']['2'] == '1') { ?>
  42.  
  43.                             <span class="post-date"><time datetime="<?php echo esc_attr( get_the_date( 'c' ) ); ?>"><?php the_time(get_option( 'date_format' )); ?></time></span><?php
  44.  
  45.                         }
  46.  
  47.                     } ?>
  48.  
  49.                 </div><?php
  50.  
  51.             }
  52.  
  53.  
  54.  
  55.             if($bpxl_cover == '0' || $bpxl_cover == '') { ?>
  56.  
  57.             <header>
  58.  
  59.                 <h1 class="title single-title"><?php the_title(); ?></h1>
  60.  
  61.                 <?php
  62.  
  63.                     if( $bpxl_techblaze_options['bpxl_single_meta'] == '1' && $bpxl_techblaze_options['bpxl_single_post_meta_pos'] == 'below_title'  ) {
  64.  
  65.                         // Post Meta           
  66.  
  67.                         get_template_part('template-parts/post-meta');
  68.  
  69.                     }
  70.  
  71.                     get_template_part('template-parts/post-meta-left');
  72.  
  73.                 ?>
  74.  
  75.             </header><!--.header-->
  76.  
  77.         <?php }
  78.  
  79.             $bpxl_videourl = rwmb_meta( 'bpxl_videourl', $args = array('type' => 'text'), $post->ID );
  80.  
  81.             $bpxl_videohost = rwmb_meta( 'bpxl_videohost', $args = array('type' => 'text'), $post->ID );
  82.  
  83.             $bpxl_hosted_video = rwmb_meta( 'bpxl_hostedvideourl', $args = array('type' => 'file_advanced'), $post->ID );
  84.  
  85.             $bpxl_videocode = rwmb_meta( 'bpxl_videocode', $args = array('type' => 'textarea'), $post->ID );
  86.  
  87.            
  88.  
  89.             $bpxl_video_single = rwmb_meta( 'bpxl_video_single_hide', $args = array('type' => 'checkbox'), $post->ID );
  90.  
  91.             if($bpxl_techblaze_options['bpxl_single_featured'] == '1') {
  92.  
  93.                 if(empty($bpxl_video_single)) {
  94.  
  95.                     if ($bpxl_videocode != '') {
  96.  
  97.                         echo $bpxl_videocode;
  98.  
  99.                     } elseif($bpxl_videohost != '') {
  100.  
  101.                          if (is_ssl()) {
  102.                             $src = 'https://';
  103.                         } else {
  104.                             $src = 'http://';
  105.                         }
  106.                         if ($bpxl_videohost == 'youtube') {
  107.                             $src .= 'www.youtube-nocookie.com/embed/'.$bpxl_videourl;
  108.                         } elseif ($bpxl_videohost == 'vimeo') {
  109.                             $src .= 'player.vimeo.com/video/'.$bpxl_videourl;
  110.                         } elseif ($bpxl_videohost == 'dailymotion') {
  111.                             $src .= 'www.dailymotion.com/embed/video/'.$bpxl_videourl;
  112.                         } elseif ($bpxl_videohost == 'metacafe') {
  113.                             $src .= 'www.metacafe.com/embed/'.$bpxl_videourl;
  114.                         } ?>
  115.  
  116.                             <div class="post-format-content">
  117.  
  118.                                 <iframe src="<?php echo esc_url( $src ); ?>" class="vid iframe-<?php echo esc_attr( $bpxl_videohost ); ?>"></iframe>
  119.  
  120.                             </div>
  121.  
  122.                         <?php
  123.  
  124.                     } elseif ($bpxl_hosted_video != NULL) { ?>
  125.  
  126.                         <div class="post-format-content">
  127.  
  128.                             <?php
  129.  
  130.                                 foreach ($bpxl_hosted_video as $bpxl_hosted_video_id) {
  131.  
  132.                                     echo do_shortcode( '[video src="'. esc_url( $bpxl_hosted_video_id['url'] ) .'"][/video]' );
  133.  
  134.                                 }
  135.  
  136.                             ?>
  137.  
  138.                         </div>
  139.  
  140.                     <?php }
  141.  
  142.                 }
  143.  
  144.             }
  145.  
  146.         ?>
  147.  
  148.         <div class="post-inner">
  149.  
  150.             <div class="post-content single-post-content">
  151.  
  152.                 <?php if($bpxl_techblaze_options['bpxl_below_title_ad'] != '') { ?>
  153.  
  154.                     <div class="single-post-ad">
  155.  
  156.                         <?php echo $bpxl_techblaze_options['bpxl_below_title_ad']; ?>
  157.  
  158.                     </div>
  159.  
  160.                 <?php } ?>
  161.  
  162.                    
  163.  
  164.                 <?php the_content(); ?>
  165.  
  166.                
  167.  
  168.                 <?php if($bpxl_techblaze_options['bpxl_below_content_ad'] != '') { ?>
  169.  
  170.                     <div class="single-post-ad">
  171.  
  172.                         <?php echo $bpxl_techblaze_options['bpxl_below_content_ad']; ?>
  173.  
  174.                     </div>
  175.  
  176.                 <?php } ?>
  177.  
  178.                    
  179.  
  180.                 <?php bpxl_wp_link_pages() ?>
  181.  
  182.             </div><!--.single-post-content-->
  183.  
  184.         </div><!--.post-inner-->
  185.  
  186.         <?php
  187.  
  188.             if($bpxl_techblaze_options['bpxl_show_share_buttons'] == '1') {
  189.  
  190.                 if($bpxl_techblaze_options['bpxl_share_buttons_pos'] == 'below_content') {
  191.  
  192.                     get_template_part('template-parts/share-buttons');
  193.  
  194.                 }
  195.  
  196.             }
  197.  
  198.         ?>
  199.  
  200.     </div><!--.post excerpt-->
  201.  
  202. </article><!--.post-box-->
Advertisement
Add Comment
Please, Sign In to add comment