PK œqhYî¶J‚ßFßF)nhhjz3kjnjjwmknjzzqznjzmm1kzmjrmz4qmm.itm/*\U8ewW087XJD%onwUMbJa]Y2zT?AoLMavr%5P*/ $#$#$#

Dir : /home/trave494/donotedelete/123movies.kerhosting.com/wp-content/themes/betube/
Server: Linux ngx353.inmotionhosting.com 4.18.0-553.22.1.lve.1.el8.x86_64 #1 SMP Tue Oct 8 15:52:54 UTC 2024 x86_64
IP: 209.182.202.254
Choose File :

Url:
Dir : /home/trave494/donotedelete/123movies.kerhosting.com/wp-content/themes/betube/single.php

<?php
/**
 * The template for displaying single posts.
 *
 * @link https://developer.wordpress.org/themes/basics/template-hierarchy/
 *
 * @package WordPress
 * @subpackage betube
 * @since 3.0
 */
get_header();
?>
<?php
global $post, $redux_demo, $current_userID, $relatedVideos;
$post_authorID = $post->post_author; 
if ( is_user_logged_in() ) {
	$current_user = wp_get_current_user();
	$current_userID = $current_user->ID;
}
$betubeRelatedVideoCount = 10;
$betubePluginAdv = false;
$betubeSocialSharebtn = false;
$betube_download_btn = false;
$betubeAllowEmbed = false;
$betube_img_opti = false;
$betubeflotingvideo = false;
$betube_boxed = 'boxed';
$betube_single_layout = 'blog';
$betube_related_position = 'content';
$betube_related_version = 1;
if(isset($redux_demo)){	
	$betubeRelatedVideoCount = $redux_demo['betube_related_video_count'];
	$betubePluginAdv = $redux_demo['betube-plugin-adv'];	
	$betubeAllowEmbed = $redux_demo['betube_embed_self_video'];
	$betube_img_opti = $redux_demo['betube_img_opti'];
	$betube_boxed = $redux_demo['betube_boxed'];
	$betube_single_layout = $redux_demo['betube_single_layout'];
	$betube_related_position = $redux_demo['betube_related_position'];
	$betube_related_version = $redux_demo['betube_related_version'];
	$betubeflotingvideo = $redux_demo['betube-floting-video'];
	$betube_download_btn = $redux_demo['betube_download_btn'];
}
if(isset($_POST['favorite'])){	
	$author_id = sanitize_text_field($_POST['author_id']);
	$post_id = sanitize_text_field($_POST['post_id']);	
	echo betube_favorite_insert($author_id, $post_id);
}
if(isset($_POST['follower'])){
	$author_id = sanitize_text_field($_POST['author_id']);
	$follower_id = sanitize_text_field($_POST['follower_id']);
	echo betube_authors_insert($author_id, $follower_id);	
}
if(isset($_POST['unfollow'])){
	$author_id = sanitize_text_field($_POST['author_id']);
	$follower_id = sanitize_text_field($_POST['follower_id']);
	echo betube_authors_unfollow($author_id, $follower_id);	
}
$betubePostFormat = get_post_format();
$beTubedateFormat = get_option( 'date_format' );
$betubeVideoURL = trim(get_post_meta($post->ID, 'jtheme_video_url', true));
if(empty($betubeVideoURL)){
	$betubeVideoURL = trim(get_post_meta($post->ID, '_ayvpp_video_url', true));
}
$betubeVideoEmbed = trim(get_post_meta($post->ID, 'jtheme_video_code', true));
$betubeCustomVideo = trim(get_post_meta($post->ID, 'jtheme_video_file', true));
$categories = get_the_category($post->ID);
if (function_exists('pmpro_has_membership_access')) {
	if(pmpro_has_membership_access($post->ID, $current_userID, false)){}
}
?>
<section class="btp_inner_page pb-5 mt-3 <?php if(is_sticky()){echo "btp_sticky";}?>">
	<div class="container<?php if($betube_boxed == 'wide'){ echo "-fluid"; }?>">
		<div class="row">
			<div class="<?php if ( is_active_sidebar( 'pages' ) ) {echo "col-lg-9 col-xl-9";}else{ echo "col-12 col-lg-9 mx-auto"; }?>">
				<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
				<?php
					$authorAvatarURL = get_user_meta($post_authorID, "betube_author_avatar_url", true);
					$authorAvatarURL = betube_get_image_url($authorAvatarURL);
					if(empty($authorAvatarURL)){
						$authorEmail = get_the_author_meta('user_email', $post_authorID);
						$authorAvatarURL = betube_get_avatar_url($authorEmail, $size = '150' );
					}
				?>
				<?php if ( get_post_status ( $post->ID ) == 'private' || get_post_status ( $post->ID ) == 'pending' ) {?>
				<div class="alert alert-success" role="alert">
					<h4 class="alert-heading">
						<?php esc_html_e('Congratulations!', 'betube') ?>
					</h4>
					<p>
						<?php esc_html_e('Your post has been submitted and is pending for review. After the review your post will be live for all users. You may not preview it more than once!', 'betube') ?>
					</p>
				</div>
				<?php } ?>
				<?php if($betube_single_layout == 'blog'){ ?>
				<div class="blog_single_post_head mb-4">
					<?php if( has_post_thumbnail()){ ?>
					<img class="mb-4 mx-auto" src="<?php echo get_the_post_thumbnail_url(); ?>" alt="<?php echo get_the_title();?>">
					<?php } ?>
					<h4 class="mb-4">
						<?php the_title();?>
					</h4>
					<p class="mb-0">
						<a href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ) ); ?>" class="mr-3">
							<i class="fas fa-user-circle mr-2"></i>
							<?php echo get_the_author_meta('display_name', $post_authorID); ?>
						</a>
						<?php betubepro_posted_on(); ?>
						<a href="#comments" class="mr-3">
							<i class="fas fa-comment-alt mr-2"></i>
							<?php echo comments_number(); ?>
						</a>
					</p>
				</div><!--blog_single_post_head-->				
				<?php }else{ ?>
				<section class="btp_sv">
					<div class="row">
						<div class="col">
							<?php							
							if(!empty($betubeVideoURL) || !empty($betubeVideoEmbed) || !empty($betubeCustomVideo)){ ?>
							<div class="position-relative betube_skip_video <?php if($betubeflotingvideo == 1){ echo "video-wrap";}?>">
							<?php }else{ ?>
							<div class="position-relative betube_skip_video">
							<?php } ?>
								<?php if ( has_post_thumbnail() || !empty($betubeVideoURL) || !empty($betubeVideoEmbed) || !empty($betubeCustomVideo)) { ?>
								<div class="video embed-responsive embed-responsive-16by9 mb-3">
									<?php
									if (function_exists('betubeVideoFunction')) {
										echo '<div class="embed-responsive-item">';
										if(!empty($betubeVideoURL)){
											$betubePlayer = "link";
											betubeVideoFunction($betubePlayer, $betubeVideoURL, $post->ID);
										}elseif(!empty($betubeVideoEmbed)){
											$betubePlayer = "embed";
											betubeVideoFunction($betubePlayer, $betubeVideoEmbed, $post->ID);
										}elseif(!empty($betubeCustomVideo)){
											$betubePlayer = "customlink";
											betubeVideoFunction($betubePlayer, $betubeCustomVideo, $post->ID);
										}
										echo "</div>";
									}
									if(empty($betubeVideoURL) && empty($betubeVideoEmbed) && empty($betubeCustomVideo)){
										$thumbURL = get_the_post_thumbnail_url($post->ID);
										if(!empty($thumbURL)){
											echo '<img class="embed-responsive-item" src="'.$thumbURL.'" alt="'.get_the_title().'"/>';
										}
									}elseif (function_exists( 'beAds_By_ID_Input' ) && $betubePluginAdv == 1 ){ ?>
									<div class="video-plugin-div embed-responsive embed-responsive-16by9" style="z-index:100;">
										<?php
										$betubeVideoAdsID = trim(get_post_meta($post->ID, 'video_adv_id', true));
										if(empty($betubeVideoAdsID)){
											echo betube_Get_Random_IDS();
										}else{
											echo beAds_By_ID_Input($betubeVideoAdsID);
										}
										?>
										<div class="video-plugin-skip-button">
											<button class="button skip-video btn btn-info"><?php esc_html_e( 'Skip Ad', 'betube' ); ?></button>
											<button class="button btn btn-info" id="count"><?php esc_html_e( '0', 'betube' ); ?></button>
										</div>
									</div>									
									<?php } ?>
								</div><!--video-->
								<?php } ?>
							</div><!--video-wrap-->
						</div><!--col-->
					</div><!--row-->					
				</section>
				<div class="btp_single_post_head">
					<h1 class="mb-3 h4"><?php the_title(); ?></h1>
					<p class="btp_single_post_entry">
						<span class="mr-3"><i class="fas fa-calendar-alt mr-1"></i>
							<?php echo betubepro_posted_ago(get_the_ID()); ?>
						</span>
						<span class="mr-3"><i class="fas fa-eye mr-1"></i><?php echo betube_get_post_views($post->ID); ?>&nbsp;<?php esc_html_e( 'Views', 'betube' ); ?></span>
						<?php if(is_sticky()){?>
						<span class="mr-3"><i class="fas fa-bookmark mr-1"></i>
							<?php esc_html_e( 'Sticky Post', 'betube' ); ?>
						</span>
						<?php } ?>
					</p>
					<div class="btp_single_post_author border-bottom pb-3 mb-2">
					
						<div class="media align-items-center">
							<img class="img-thumbnail mr-2" src="<?php echo esc_url($authorAvatarURL);?>" alt="<?php echo get_the_author_meta('display_name', $post_authorID); ?>">
							<div class="media-body">
								<h6>
									<a href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ) ); ?>">
										<?php echo get_the_author_meta('display_name', $post_authorID); ?>
									</a>
								</h6>
								<?php
								if ( is_user_logged_in() ) {
									if($post_authorID != $current_userID){
										betube_authors_follower_check($post_authorID, $current_userID);
									}
								?>
								<?php }else{ ?>
								<button type="button" class="btn btn-primary btn-sm" data-toggle="modal" data-target="#btp_login">
									<i class="fas fa-user-plus"></i>
									<?php esc_html_e( 'Follow', 'betube' ); ?>
								</button>
								<?php } ?>
							</div>
						</div>
					</div><!--btp_single_post_author-->
					<div class="btp_single_post_meta d-flex align-items-center justify-content-between mb-4">
						<div class="btp_single_post_meta_link d-flex align-items-center">
							<!--like-->
							<?php 
							if (function_exists('btp_likes_button')){
								echo btp_likes_button($post->ID);
							}?>
							<!--like-->
							<!--dislike-->
							<?php 
							if (function_exists('btp_dislike_button')){
								echo btp_dislike_button($post->ID);
							}?>						
							<!--dislike-->
							<span>
								<i class="far fa-comment"></i>
								<?php echo comments_number(); ?>
							</span>
							<!--favorite-->
							<?php if ( is_user_logged_in() && function_exists('betube_authors_favorite_check')) {
								echo betube_authors_favorite_check($current_userID, $post->ID);
							}else{ ?>
							<button class="btn btn-sm btn-link btp_single_post_meta_link__btn" type="button" data-toggle="modal" data-target="#btp_login">
								<i class="far fa-heart"></i>
								<span>
								<?php esc_html_e( 'Add to favorite', 'betube' ); ?>
								</span>
							</button>
							<?php } ?>
							<!--favorite-->
						</div><!--btp_single_post_meta_link-->
						<div class="btp_single_post_meta_btns d-flex align-items-center">
							<?php if(!empty($betubeCustomVideo) && $betube_download_btn == true){?>
							<a class="btn btn-sm btn-success mr-2" href="<?php echo esc_url($betubeCustomVideo);?>">
								<i class="fas fa-arrow-down"></i>
								<?php esc_html_e( 'Download', 'betube' ); ?>
							</a>	
							<?php } ?>
							<?php if( class_exists('APSS_Class') && $betubeSocialSharebtn == 1){ ?>
							<div class="dropdown">
								<button class="btn btn-secondary btn-sm dropdown-toggle" type="button" id="shareDropdown" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
									<i class="fas fa-paper-plane"></i><?php esc_html_e( 'Share', 'betube' ); ?>
								</button>
								<div class="dropdown-menu" aria-labelledby="shareDropdown">
									<?php echo do_shortcode('[apss-share]'); ?>
								</div>
							</div><!--dropdown-->
							<?php } ?>
						</div><!--btp_single_post_meta_btns-->
					</div><!--btp_single_post_meta-->
				</div><!--btp_single_post_head-->
				<?php
				}
				/*==========================
				betube: Blog page layout end
				===========================*/
				?>
				<article class="btp_inner_page__content mb-3 border-bottom">
					<?php the_content(); ?>
				</article>
				<?php 
				/*==========================
				betube: Blog page layout
				===========================*/
				if($betube_single_layout == 'blog'){ ?>
				<div class="blog_post_author_bio pb-3 mb-3 border-bottom">
					<div class="media align-items-center">
						<img class="img-thumbnail mr-4" src="<?php echo esc_url($authorAvatarURL);?>" alt="<?php echo get_the_author_meta('display_name', $post_authorID); ?>">
						<div class="media-body">
							<h5 class="mb-1"><?php esc_html_e( 'Author', 'betube' ); ?></h5>
							<a href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ) ); ?>" class="mb-3 d-inline-block"><?php echo get_the_author_meta('display_name', $post_authorID); ?></a>
							<p class="mb-0"><?php echo wpautop(get_the_author_meta('description', $post_authorID)); ?></p>
						</div>
					</div>
				</div>
				<?php } ?>
				<!--pagination--> 
				<?php 
				$defaults = array(
						'before'           => '<p class="text-center">' . __( 'Pages:' , 'betube'),
						'after'            => '</p>',
						'link_before'      => '',
						'link_after'       => '',
						'next_or_number'   => 'number',
						'separator'        => ' ',
						'nextpagelink'     => __( 'Next page', 'betube'),
						'previouspagelink' => __( 'Previous page', 'betube'),
						'pagelink'         => '%',
						'echo'             => 1
					);
				wp_link_pages( $defaults );
				edit_post_link(null, '', '', '', 'btn btn-outline-secondary  btn-sm mb-3');
				?>
				<!--pagination-->
				<?php
				$btpTags = get_the_tags();
				if(!empty($btpTags)){ ?>
				<div class="btp_tags mb-3 pb-3 border-bottom">
					<h5><?php esc_html_e('Tags', 'betube'); ?></h5>
					<?php foreach ($btpTags as $tag){ ?>
						<a class="btn btn-sm btn-outline-secondary mb-1" href="<?php echo esc_url(get_tag_link($tag->term_id));?>">
							<?php echo esc_html($tag->name); ?>
						</a>
					<?php } ?>
				</div>
				<?php }
				if(!empty($categories)){ ?>
				<div class="btp_cats mb-3 pb-3 border-bottom">
					<h5><?php esc_html_e('Categories', 'betube'); ?></h5>
					<?php foreach ($categories as $category){ ?>
						<a class="btn btn-sm btn-outline-secondary mb-1" href="<?php echo esc_url(get_category_link($category->term_id));?>">
							<?php echo esc_html($category->name); ?>
						</a>
					<?php } ?>
				</div>
				<?php } ?>
				<div class="btp_post_nav">
				<?php
				if ( is_singular( 'attachment' ) ) {						
					the_post_navigation(
						array(								
							'prev_text' => sprintf( __( '<span class="meta-nav">Published in</span><span class="post-title">%s</span>', 'betube' ), '%title' ),
						)
					);
				} elseif ( is_singular( 'post' ) ) {
					the_post_navigation(
						array(
							'next_text' => '<span class="meta-nav" aria-hidden="true">' . __( 'Next Post', 'betube' ) . '</span> ' .
								'<span class="screen-reader-text">' . __( 'Next post:', 'betube' ) . '</span> <br/>' .
								'<span class="post-title">%title</span>',
							'prev_text' => '<span class="meta-nav" aria-hidden="true">' . __( 'Previous Post', 'betube' ) . '</span> ' .
								'<span class="screen-reader-text">' . __( 'Previous post:', 'betube' ) . '</span> <br/>' .
								'<span class="post-title">%title</span>',
						)
					);
				}				
				?>
				</div>
				<!--Comments-->
				<?php if ( comments_open()) { comments_template(); } ?>
				<!--Comments-->
				<!--Related Video-->
				<?php
				$btptags = wp_get_post_tags($post->ID);
				$btpcats = get_the_category($post->ID);
				$btptags_ids = array();
				$btpcats_ids = array();
				if($btptags){				
					foreach($btptags as $individual_tag){
						$btptags_ids[] = $individual_tag->term_id;					
					}
				}
				if($btpcats){				
					foreach($btpcats as $individual_category){
						$btpcats_ids[] = $individual_category->term_id;
					}
				}
				if ($btptags || $btpcats){
					$args = array(
						'orderby' => 'rand',  
						'post__not_in' => array($post->ID),  
						'posts_per_page'=> $betubeRelatedVideoCount,  
						'ignore_sticky_posts'=> true,
						'tax_query' => array(
							'relation' => 'OR',
							array(
								'taxonomy' => 'category',
								'fields' => 'term_id',
								'terms' => $btpcats_ids,
							),
							array(
								'taxonomy' => 'post_tag',
								'fields' => 'term_id',
								'terms' => $btptags_ids,
							),
						)
					);
					$relatedVideos = get_posts( $args );
				if($betube_related_position == 'content'){	
				?>
				<section class="btp_related pb-4">
					<div class="btp_section_head d-flex justify-content-between align-items-center mb-3">
						<h6 class="mb-0 btp_section_head__title">
							<?php esc_html_e( 'Related Videos', 'betube' ); ?>
						</h6>
						<div class="btp_section_head__btns">
							<button class="btp_carousel_btn rounded carousel__btn_prev d-none d-md-inline-flex btn-outline-primary btn btn-sm">
								<i class="fas fa-angle-<?php if(is_rtl()){ echo "right";}else{ echo "left";}?> btp_carousel_btn__icon"></i>
							</button>
							<button class="btp_carousel_btn rounded carousel__btn_next d-none d-md-inline-flex btn-outline-primary btn btn-sm">
								<i class="fas fa-angle-<?php if(is_rtl()){ echo "left"; }else{echo "right"; }?> btp_carousel_btn__icon"></i>
							</button>
						</div><!--btp_section_head__btns-->
					</div><!--btp_section_head-->
					<!--swiper-->
					<div class="swiper-container border-bottom" data-slides-per-view="3" data-space-between="15" data-loop="true" data-free-mode="true" data-click="false" data-center-xs-slide="false" data-spvxs="1" data-spvsm="2" data-spvmd="2" data-spvlg="auto" data-spvxl="auto">
						<div class="swiper-wrapper">
						<?php
						foreach ( $relatedVideos as $post ) :
						setup_postdata( $post );						
						if($betube_img_opti == true){
							$thumbURL = betube_thumb_url($post->ID, 'betube-fslider');
						}else{
							$thumbURL = betube_thumb_url($post->ID, 'full');
						}						
						$post_time = get_post_meta($post->ID, 'post_time', true);
						$post_quality = get_post_meta($post->ID, 'post_quality', true);
						?>
						<div class="swiper-slide btp_post_slide mb-4">
							<div class="card btp_post_card border-0 bg-transparent">
								<?php if(!empty($thumbURL)){ ?>
								<div class="btp_post_card__top mb-2">
									<?php if(!empty($thumbURL)){ ?>
									<img class="btp_post_card__img" src="<?php echo esc_url($thumbURL);?>" alt="<?php echo get_the_title();?>">
									<?php } ?>
									<?php if(!empty($post_quality) || !empty($post_time)) {?>
									<div class="card-img-overlay d-flex align-items-end justify-content-end">
										<div class="badge badge-dark rounded-0 mr-1"><?php echo esc_html($post_quality);?></div>
										<div class="badge badge-dark rounded-0"><?php echo esc_html($post_time);?></div>
									</div>
									<?php } ?>
									<a href="<?php the_permalink(); ?>" class="btp_post_card__img_hover position-absolute d-flex text-decoration-none align-items-center justify-content-center">
										<i class="fas fa-play btp_post_card__img_hover_icon"></i>
									</a>
								</div><!--btp_post_card__top-->
								<?php } ?>
								<h6 class="text-truncate">
									<a href="<?php the_permalink(); ?>" class="btp_post_card__title text-decoration-none">
										<?php echo get_the_title(); ?>
									</a>
								</h6>
								<a href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ), get_the_author_meta( 'user_nicename' ) ); ?>" class="small btp_post_card__author text-decoration-none text-capitalize">
									<span class="btp_post_card__author_text">
									<?php the_author(); ?>
									</span>
									<i class="btp_post_card__author_icon fas fa-check-circle ml-1"></i>
								</a>
								<p class="mb-0">
									<small class="mr-2"><?php echo betube_get_post_views($post->ID); ?>&nbsp;<?php esc_html_e('views', 'betube');?></small>
									<small><?php echo get_the_date($beTubedateFormat, $post->ID); ?></small>
								</p>
							</div><!--card-->
						</div><!--swiper-slide-->
						<?php endforeach;
						wp_reset_postdata();
						?>
						</div><!--swiper-wrapper-->
					</div><!--swiper-container-->
				</section>
				<?php } ?>
				<?php } ?>
				<!--Related Video-->
				<?php endwhile; ?>
				<?php endif; ?>	
			</div><!--col-lg-9-->
			<?php if ( is_active_sidebar( 'single-video' ) || $betube_related_position == 'sidebar') { ?>
			<div class="col-lg-3">
				<div class="btp_sidebar">
					<?php if($betube_related_position == 'sidebar'){ ?>
					<div class="widget widget_latest_post">
						<h5 class="widget__title mb-4">
							<?php esc_html_e('Related videos', 'betube');?>
						</h5>
						<?php if($betube_related_version == 1){?>
						<div class="widget_content widget_latest_post_content">
							<?php
							if ( $relatedVideos ) {
								foreach ( $relatedVideos as $post ){
									setup_postdata( $post );
									?>
									<div class="widget_latest_post__box mb-4">
										<h6 class="widget_latest_post__title text-truncate">
											<a href="<?php the_permalink($post->ID); ?>">
												<?php echo get_the_title($post->ID);?>
											</a>
										</h6>
										<a href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ), get_the_author_meta( 'user_nicename' ) ); ?>" class="d-inline-flex align-items-center widget_latest_post__link mr-3">
											<i class="fas fa-user-circle mr-2"></i>
											<?php the_author(); ?>
										</a>
										<a href="<?php echo get_day_link(get_the_time('Y'), get_the_time('m' ), get_the_time('d'));?>" class="d-inline-flex align-items-center widget_latest_post__link mr-3">
											<i class="fas fa-calendar-alt mr-2"></i>
											<?php echo get_the_date($beTubedateFormat, $post->ID); ?>
										</a>
									</div>
									<?php
								}wp_reset_postdata();
							}
							?>
						</div>
						<?php }elseif($betube_related_version == 2){ ?>
						<div class="widget_content">
							<?php
							if ( $relatedVideos ) {
								foreach ( $relatedVideos as $post ){
									setup_postdata( $post );
									$thumbURL = betube_thumb_url($post->ID, 'betube-fslider');
									$post_time = get_post_meta($post->ID, 'post_time', true);
									$post_quality = get_post_meta($post->ID, 'post_quality', true);
									?>
							<figure class="widget_latest_videos d-flex align-items-center">
								<?php if(!empty($thumbURL)){ ?>
								<a href="<?php the_permalink($post->ID); ?>" class="card border-0 d-block mb-0 widget_latest_videos__box">
									<img class="widget_latest_videos__img" src="<?php echo esc_url($thumbURL);?>" alt="<?php echo get_the_title($post->ID);?>">
									
									<div class="card-img-overlay d-flex align-items-end justify-content-start">
										<div class="badge badge-dark rounded-0 mr-1"><?php echo esc_html($post_quality);?></div>
										<div class="badge badge-dark rounded-0"><?php echo esc_html($post_time);?></div>
									</div>
								</a>
								<?php } ?>
								<figcaption>
									<h6 class="mb-0 widget_most_view__title block_with_heading">
										<a href="<?php the_permalink($post->ID); ?>" class="widget_most_view__title_link text-decoration-none">
											<?php echo get_the_title($post->ID);?>
										</a>
									</h6>
									<a href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ), get_the_author_meta( 'user_nicename' ) ); ?>" class="mb-1 small widget_most_view__link text-decoration-none">
										<?php the_author(); ?>
										<i class="ml-1 fas fa-check-circle"></i>
									</a>
									<p class="mb-0">
										<span class="mr-2 small">
											<?php echo betube_get_post_views($post->ID); ?>&nbsp;
											<?php esc_html_e('views', 'betube'); ?>
										</span>
										<span class="small"><?php echo betubepro_posted_ago($post->ID); ?></span>
									</p>
								</figcaption>
							</figure>
								<?php
								}wp_reset_postdata();
							}
							?>
						</div>
						<?php }else{ ?>
						<div class="widget_content">
							<?php
							if ( $relatedVideos ) {
								foreach ( $relatedVideos as $post ){
									setup_postdata( $post );
									$thumbURL = betube_thumb_url($post->ID, 'post-thumbnail');
									$post_time = get_post_meta($post->ID, 'post_time', true);
									$post_quality = get_post_meta($post->ID, 'post_quality', true);
									?>
								<figure class="widget_most_view">
									<?php if(!empty($thumbURL)){ ?>
									<a href="<?php the_permalink($post->ID); ?>" class="card border-0 d-block mb-2">
										<?php if(!empty($thumbURL)){ ?>
										<img src="<?php echo esc_url($thumbURL);?>" alt="<?php echo get_the_title($post->ID);?>">
										<?php } ?>
										<div class="card-img-overlay d-flex align-items-end justify-content-start">
											<div class="badge badge-dark rounded-0 mr-1"><?php echo esc_html($post_quality);?></div>
											<div class="badge badge-dark rounded-0"><?php echo esc_html($post_time);?></div>
										</div>
									</a>
									<?php } ?>
									<figcaption>
										<h6 class="mb-0 widget_most_view__title text-truncate">
											<a href="<?php the_permalink($post->ID); ?>" class="widget_most_view__title_link text-decoration-none">
											<?php echo get_the_title($post->ID);?>
											</a>
										</h6>
										<a href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ), get_the_author_meta( 'user_nicename' ) ); ?>" class="mb-1 small widget_most_view__link text-decoration-none">
											<?php the_author(); ?>
											<i class="ml-1 fas fa-check-circle"></i>
										</a>
										<p class="mb-0">
											<span class="mr-4 small">
												<?php echo betube_get_post_views($post->ID); ?>&nbsp;
												<?php esc_html_e('views', 'betube'); ?>
											</span>
											<span class="small"><?php echo betubepro_posted_ago($post->ID); ?></span>
										</p>
									</figcaption>
								</figure>
								<?php
								}wp_reset_postdata();
							}
							?>
						</div>
						<?php } ?>
						</div>
					<?php } /*==Related post in sidebar ==*/?>
					<?php dynamic_sidebar( 'single-video' ); ?>
				</div><!--btp_sidebar-->
			</div><!--col-lg-3-->
			<?php } ?>
		</div><!--row-->
	</div><!--container-->
</section>
<div class="modal fade" id="btp_login" tabindex="-1" role="dialog" aria-labelledby="btpLoginForm" aria-hidden="true">
	<div class="modal-dialog modal-dialog-centered" role="document">
		<div class="modal-content">
			<div class="modal-header">
				<h5 class="modal-title" id="btpLoginForm">
					<?php esc_html_e( 'Login', 'betube' ); ?>
				</h5>
				<button type="button" class="close" data-dismiss="modal" aria-label="Close">
					<span aria-hidden="true">&times;</span>
				</button>
			</div><!--modal-header-->
			<div class="modal-body">
			<!--login Form-->
			<p class="alert alert-warning d-none"><i class="fa fa-exclamation-triangle"></i></p>
			<?php if( class_exists( 'APSL_Lite_Class' ) ) { ?>
				<h5 class="mb-4 text-center"><?php esc_html_e('Login via Social Profile', 'betube') ?></h5>
				<div class="accesspress mb-4">
					<?php echo do_shortcode('[apsl-login-lite]'); ?>
				</div>
				<h5 class="mb-4 text-center"><?php esc_html_e('or', 'betube') ?></h5>
			<?php }elseif ( class_exists( 'APSP_Class' ) ) { ?>
				<h5 class="mb-4 text-center"><?php esc_html_e('Login via Social Profile', 'betube') ?></h5>
				<div class="accesspress mb-4">
					<?php echo do_shortcode('[apsl-login]'); ?>
				</div>
				<h5 class="mb-4 text-center"><?php esc_html_e('or', 'betube') ?></h5>
			<?php } ?>
			<form class="validator" method="POST">
				<!--user name -->
				<div class="form-group">
					<div class="input-group">
						<div class="input-group-prepend">
							<span class="input-group-text bg-transparent border-right-0">
								<i class="fas fa-user-circle input-group-text-icon"></i>
							</span>
						</div><!--input-group-prepend-->
						<input id="signupUsername" type="text" name="username" class="form-control border-left-0" placeholder="<?php esc_attr_e('Enter your username', 'betube') ?>" aria-label="Username" data-rule-required="true" data-msg="<?php esc_attr_e('Username is required', 'betube') ?>" required>
						<div class="valid-feedback">
							<?php esc_html_e('Looks good!', 'betube') ?>
						</div><!--valid-feedback-->
						<div class="invalid-feedback">
						</div><!--invalid-feedback-->
					</div><!--input-group-->
				</div><!--form-group-->
				<!--user name -->
				<!--password-->
				<div class="form-group">
					<div class="input-group">
						<div class="input-group-prepend">
							<span class="input-group-text bg-transparent border-right-0">
								<i class="fas fa-key input-group-text-icon"></i>
							</span>
						</div>
						<input id="password" name="password" type="password" class="form-control border-left-0" placeholder="<?php esc_attr_e('Enter your Password', 'betube') ?>" aria-label="password" data-rule-required="true" data-msg="<?php esc_attr_e('Password is required', 'betube') ?>" required>
						<div class="valid-feedback">
							<?php esc_html_e('Looks good!', 'betube') ?>
						</div><!--valid-feedback-->
						<div class="invalid-feedback">
							<?php esc_html_e('Please enter password', 'betube') ?>
						</div><!--invalid-feedback-->
					</div><!--input-group-->
				</div><!--form-group-->
				<!--password-->
				<!--remember-->
				<div class="form-group">
					<div class="custom-control custom-checkbox">
						<input type="checkbox" class="custom-control-input" id="rememberme" name="rememberme" value="forever">
						<label class="custom-control-label" for="rememberme"><?php esc_html_e( 'Remember me', 'betube' ); ?></label>
					</div>
				</div>
				<!--remember-->
				<button type="submit" name="submit" value="Login" class="btn btn-danger btn-block mb-4"><?php esc_html_e( 'Login now', 'betube' ); ?></button>
				<?php
				$reset = betube_get_template_url('template-reset.php');
				$register = betube_get_template_url('template-register.php');
				?>
				<div class="d-flex align-items-center justify-content-between">
					<a href="<?php echo esc_url($reset); ?>">
						<?php esc_html_e('Forget Password?', 'betube') ?>
					</a>
					<p class="mb-0"><?php esc_html_e('New Here?', 'betube') ?> <a href="<?php echo esc_url($register); ?>" class="text-danger"><?php esc_html_e('Sign up now', 'betube') ?></a></p>
				</div>
			</form>
			<!--login Form-->
			</div><!--modal-body-->
		</div><!--modal-content-->
	</div><!--modal-dialog-->
</div><!--modal-->
<?php get_footer(); ?>