Sindbad~EG File Manager

Current Path : /var/www/html/wordpress_alg24news/wp-content/themes/newsbt-mobile/includes/related/
Upload File :
Current File : /var/www/html/wordpress_alg24news/wp-content/themes/newsbt-mobile/includes/related/simple.php

<?php 
/*
 * Security 	: blocking direct access
 * Source		: http://codex.wordpress.org/Theme_Development#Template_Files
*/
defined('ABSPATH') or die("Access Restricted");

if ( mwp_option('mobile-related-post') == 1 ) :

$queried_object 		= get_queried_object();
$related_posts 			= mwp_get_related_posts($queried_object->ID);
$video_ids 				= mwp_option('category-videos');
$ebookmagazine_ids 		= mwp_option('category-ebookmagazine');
$article_ids 			= mwp_option('category-article');
$relate_title_video 	= mwp_option('single-related-title-video');
$relate_title_simple 	= mwp_option('single-related-title');
$relate_title_limit 	= mwp_option('single-related-limit');

if (!empty($relate_title_limit)) {
	$related_text_words = $relate_title_limit;
} else {
	$related_text_words = 9;
}

echo '<div class="related-shadow">';

if (!empty($article_ids) && in_category($article_ids, $post->ID)) {
	if ($related_posts->have_posts()): 
		?>
		<div class="related-list">			
			<?php 
			if (in_category($video_ids, $post->ID)) {	
				if (!empty($relate_title_video)) {
					echo '<h2 class="'.mwp_csa_color().'">'.$relate_title_video.'</h2>';
				} else {
					echo '<h2 class="'.mwp_csa_color().'">'.__('Related Videos', MWP_TEXT_DOMAIN).'</h2>';
				}
			} else { 
				if (!empty($relate_title_simple)) {
					echo '<h2 class="'.mwp_csa_color().'">'.$relate_title_simple.'</h2>';
				} else {
					echo '<h2 class="'.mwp_csa_color().'">'.__('Related News', MWP_TEXT_DOMAIN).'</h2>';
				}
			} ?>
			<ul>
				<?php while ($related_posts->have_posts()) : $related_posts->the_post(); ?>
				<li class="related-item">
					<h3>
						<a href="<?php the_permalink() ?>" title="<?php the_title_attribute(); ?>">
							<?php echo short_title(get_the_title(), $related_text_words); ?>
						</a>
						<span>(<?php echo mwp_display_category_name($post->ID); ?>)</span>
					</h3>
				</li>
				<?php endwhile; ?>
			</ul>
		</div>
		<?php 
	endif;
} else {
	if ($related_posts->have_posts()): 
		?>
		<div id="related" class="related">			
			<?php 
			if (!empty($video_ids) && in_category($video_ids, $post->ID)) {	
				if (!empty($relate_title_video)) {
					echo '<h2 class="'.mwp_csa_color().'">'.$relate_title_video.'</h2>';
				} else {
					echo '<h2 class="'.mwp_csa_color().'">'.__('Related Videos', MWP_TEXT_DOMAIN).'</h2>';
				}
			} else { 
				if (!empty($relate_title_simple)) {
					echo '<h2 class="'.mwp_csa_color().'">'.$relate_title_simple.'</h2>';
				} else {
					echo '<h2 class="'.mwp_csa_color().'">'.__('Related News', MWP_TEXT_DOMAIN).'</h2>';
				}
			} ?>
			<ul>
				<?php 
					while ($related_posts->have_posts()) : $related_posts->the_post(); 
					if (!empty($ebookmagazine_ids) && in_category($ebookmagazine_ids, $post->ID)) {
						$thumbnail_class 	= 'thumbnail-2';
						$li_class 			= ' book-item';
					} else {
						$thumbnail_class 	= 'thumbnail';
						$li_class 			= '';
					}
				?>
				<li class="related-item<?php echo $li_class; ?>">
					<div class="<?php echo $thumbnail_class; ?>">
						<a href="<?php the_permalink() ?>" title="<?php the_title_attribute(); ?>">	
							<?php
							if (!empty($ebookmagazine_ids) && in_category($ebookmagazine_ids, $post->ID)) {
								mwp_thumb_size('mwp-book', 285, 387, 'img-responsive');
							} else {
								mwp_smart_thumb('mwp-medium', $post->ID,  520, 290);
							}
							if (!empty($video_ids) && in_category($video_ids, $post->ID)) {	
								if (mwp_option('thumbnail-vyd') == 1) {
									?><div class="duration"><?php echo mwp_video_duration($post->ID); ?></div><?php 
								}
							} ?>
						</a>
					</div>
					<h3>
						<a href="<?php the_permalink() ?>" title="<?php the_title_attribute(); ?>">
							<?php echo short_title(get_the_title(), $related_text_words); ?>
						</a>
					</h3>
				</li>
				<?php endwhile; ?>
			</ul>
		</div>
		<script>jQuery(window).on("load",function(){setTimeout(function(){setCSSHEIGHT(".related", ".related-item");}, 1000);});</script>
		<?php 
	endif;
}
wp_reset_query();

echo '<div class="clearfix"></div></div>';
/*
 * END Related Posts
*/
endif;

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists