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/read-also.php

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

$queried_object 	= get_queried_object();
$related_posts 		= related_inside_post($queried_object->ID);
$related_heading 	= mwp_option('readalso-title');
$related_style 		= mwp_option('readalso-style');
$related_content 	= '';

if ($related_style == 2) {
	$head_bg_class 	= mwp_csa_background();
	$head_class 	= ' related-title-2';
	$ul_body_class 	= ' related-inside-2';
} else {
	$head_bg_class 	= '';
	$head_class 	= '';
	$ul_body_class 	= '';
}

	if ($related_posts->have_posts()):
		$related_content .= '<div class="related-inside-wrap">';
			$related_content .= '<strong class="related-title '.esc_attr($head_bg_class.$head_class).'">';
				if (!empty($related_heading)) { 
					$related_content .= esc_html($related_heading); 
				} else { 
					$related_content .= esc_html__('Read Also ...', MWP_TEXT_DOMAIN); 
				}
			$related_content .= '</strong>';
			$related_content .= '<ul class="related-inside'.$ul_body_class.'">';
			while ($related_posts->have_posts()) : $related_posts->the_post();
				if ( function_exists( 'is_amp_endpoint' ) && is_amp_endpoint() ) {
					$link = amp_get_permalink($post->ID);
					$related_content .= '<li><a href="'.$link.'">'. get_the_title().'</a></li>';
				} else {
					$related_content .= '<li><a href="'.get_permalink().'">'. get_the_title().'</a></li>';
				}
			endwhile;
			$related_content .= '</ul>';
			$related_content .= '</div>';
		else:
	endif;
	wp_reset_postdata();

return $related_content;

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