Guest User

content_video.php SSL fix techblaze wordpress

a guest
Jun 7th, 2016
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 4.19 KB | None | 0 0
  1. <?php global $bpxl_techblaze_options; ?>
  2. <article <?php post_class(); ?>>
  3.     <div id="post-<?php the_ID(); ?>" class="post-box">
  4.         <?php
  5.             if($bpxl_techblaze_options['bpxl_post_meta'] == '1') { ?>
  6.                 <div class="post-meta-top"><?php
  7.                     if($bpxl_techblaze_options['bpxl_post_meta_options']['3'] == '1') { ?>
  8.                         <div class="post-cats uppercase">
  9.                             <span>
  10.                             <?php $category = get_the_category();
  11.                             if ($category) {
  12.                               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> ';
  13.                             } ?>
  14.                             </span>
  15.                         </div><?php
  16.                         // Post Format Icons
  17.                         get_template_part('template-parts/post-format-icons');
  18.                     }
  19.                     if($bpxl_techblaze_options['bpxl_post_meta_options']['2'] == '1') { ?>
  20.                         <span class="post-date">
  21.                             <time datetime="<?php echo esc_attr( get_the_date( 'c' ) ); ?>"><?php the_time(get_option( 'date_format' )); ?></time>
  22.                         </span><?php
  23.                     } ?>
  24.                 </div><?php
  25.             }
  26.  
  27.             $bpxl_videourl = rwmb_meta( 'bpxl_videourl', $args = array('type' => 'text'), $post->ID );
  28.             $bpxl_videohost = rwmb_meta( 'bpxl_videohost', $args = array('type' => 'text'), $post->ID );
  29.             $bpxl_hosted_video = rwmb_meta( 'bpxl_hostedvideourl', $args = array('type' => 'file_advanced'), $post->ID );
  30.             $bpxl_videocode = rwmb_meta( 'bpxl_videocode', $args = array('type' => 'textarea'), $post->ID );
  31.            
  32.             if ($bpxl_videocode != '') {
  33.                 echo $bpxl_videocode;
  34.             } elseif($bpxl_videohost != '') {
  35.                  if (is_ssl()) {
  36.                     $src = 'https://';
  37.                 } else {
  38.                     $src = 'http://';
  39.                 }
  40.                 if ($bpxl_videohost == 'youtube') {
  41.                     $src .= 'www.youtube-nocookie.com/embed/'.$bpxl_videourl;
  42.                 } elseif ($bpxl_videohost == 'vimeo') {
  43.                     $src .= 'player.vimeo.com/video/'.$bpxl_videourl;
  44.                 } elseif ($bpxl_videohost == 'dailymotion') {
  45.                     $src .= 'www.dailymotion.com/embed/video/'.$bpxl_videourl;
  46.                 } elseif ($bpxl_videohost == 'metacafe') {
  47.                     $src .= 'www.metacafe.com/embed/'.$bpxl_videourl;
  48.                 } ?>
  49.                     <div class="post-format-content">
  50.                         <iframe src="<?php echo esc_url( $src ); ?>" class="vid iframe-<?php echo esc_attr( $bpxl_videohost ); ?>"></iframe>
  51.                     </div>
  52.                 <?php
  53.             } elseif ($bpxl_hosted_video != NULL) { ?>
  54.                 <div class="post-format-content">
  55.                     <?php
  56.                         foreach ($bpxl_hosted_video as $bpxl_hosted_video_id) {
  57.                             echo do_shortcode( '[video src="'. esc_url( $bpxl_hosted_video_id['url'] ) .'"][/video]' );
  58.                         }
  59.                     ?>
  60.                 </div>
  61.             <?php } ?>
  62.         <div class="post-inner">
  63.             <?php get_template_part('template-parts/post-header'); ?>
  64.             <?php if ( is_search() ) { ?>
  65.                 <div class="post-content entry-summary">
  66.                     <?php the_excerpt(); ?>
  67.                 </div><!-- .entry-summary -->
  68.             <?php } else { ?>
  69.                 <div class="post-content entry-content">
  70.                     <?php
  71.                     if($bpxl_techblaze_options['bpxl_home_content'] == '1') {
  72.                         the_excerpt(); ?>
  73.                         <div class="read-more">
  74.                             <a href="<?php the_permalink() ?>" title="<?php the_title_attribute(); ?>" rel="bookmark"><?php _e('Read More','bloompixel'); ?></a>
  75.                         </div><?php
  76.                     } else {
  77.                         the_content( __('Read More','bloompixel') );
  78.                     } ?>
  79.                 </div><!--post-content-->
  80.             <?php }
  81.                 if($bpxl_techblaze_options['bpxl_show_home_share_buttons'] == '1') {
  82.                     if($bpxl_techblaze_options['bpxl_home_share_buttons_pos'] == 'below_content') {
  83.                         get_template_part('template-parts/share-buttons');
  84.                     }
  85.                 }
  86.             ?>
  87.         </div><!--.post-inner-->
  88.     </div><!--.post excerpt-->
  89. </article><!--.post-box-->
Advertisement
Add Comment
Please, Sign In to add comment