<?php 
global $wpdb, $post, $opt_themes;  
if ( ! defined( 'ABSPATH' ) ) exit; 
function cst_post_title( $title ) {
	global $opt_themes, $post;
	if( $opt_themes['seo_meta_tag'] ){
    if ( is_singular( 'post' ) ) {
        $the_title	= get_the_title();
		$app_name 	= get_post_meta( $post->ID, 'wp_title_GP', true);
		$app_versi 	= get_post_meta( $post->ID, 'wp_version_GP', true );
		if(get_post_meta( $post->ID, 'wp_mods', true )){
		$app_mod 	= '('.trim(strip_tags(ucwords(get_post_meta( $post->ID, 'wp_mods', true )))).')';
		} else {
		$app_mod 	= '';
		}
		$t_mod_apk 	= $opt_themes['text_18']; 
        $title['title'] = $app_name.' '.$t_mod_apk.' v'.$app_versi.' '.$app_mod;
        $title['title'] = esc_html( $title['title'] );
        return $title;
    } else {
        return $title;
    }
	} else {
        return $title;
    }
}
add_filter('document_title_parts', 'cst_post_title', 9999 );
get_header(); 
?>
 
<div id="content" class="site-content <?php sp_class(); ?> post-id-<?php the_ID(); ?> post-view-count-<?php ex_themes_set_post_view_(); echo ex_themes_get_post_view_alts(); ?>" >  
	 
	<?php 
	sp_opening(); 
	?>
 
	<div class="mb-3"><?php ex_themes_banner_single_ads_(); ?></div>
	 
	<?php 
	sp_mods();
	?>

	<div id='entry-content' class="pb-3 entry-content ">
	<?php if( have_posts() ) { while( have_posts() ) { the_post(); the_content(); }} ?> 
	</div>

	<?php 
	sp_what_news();
	//sp_slider_rating();
	?>
	
	<a name="download"></a>
	<h2 id="download_url_links" class="h5 font-weight-semibold mb-3" ><?php _e($opt_themes['exthemes_Download'], TEXT_DOMAIN); ?> <?php if($opt_themes['app_name']){ if(get_post_meta( get_the_ID(), 'wp_title_GP', true)){ echo get_post_meta( get_the_ID(), 'wp_title_GP', true); } else { the_title(); }} else { the_title(); } ?></h2> 
	
	<div class="mb-3">
	<center><?php ex_themes_banner_single_ads_2(); ?></center>
	</div>	
	
	<?php 
	sp_middle();
	sp_closing();
	?>	
	 
</div>

<?php 
get_footer(); 