<?php
 

if ( ! defined( 'ABSPATH' ) ) exit;
function css_js_header() {
global $opt_themes; 
$head_sect_on	= $opt_themes['aktif_header_section'];
$head_sec_code	= $opt_themes['header_section']; 

if($head_sect_on) { echo $head_sec_code; } 
} 
add_shortcode('css_js_header', 'css_js_header');


// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  @EXTHEM.ES  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ \\ 
/* ~~~~  AS ERRORS IN YOUR THEMES ARE NOT THE RESPONSIBILITY OF THE DEVELOPERS  ~~~~ */ 
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  @EXTHEM.ES  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ \\ 
function ex_themes_head_section() {
if ( is_user_logged_in() ) { 
} else {
global $opt_themes; 
$head_sect_on	= $opt_themes['aktif_header_section'];
$head_sec_code	= $opt_themes['header_section'];
$style_2_on	= $opt_themes['modyolo_styles'];
if($head_sect_on) { echo $head_sec_code; }
} ?>
<!-- Theme Styles for <?php echo THEMES_NAMES; ?> v<?php echo VERSION; ?> by <?php echo EXTHEMES_AUTHOR; ?> -->
 
<script>
    var $exhemes_devs = jQuery.noConflict();   
</script> 
  
<!-- Theme Styles for <?php echo THEMES_NAMES; ?> v<?php echo VERSION; ?> by <?php echo EXTHEMES_AUTHOR; ?> -->

 

<?php }
add_shortcode('ex_themes_head_section', 'ex_themes_head_section');

// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  @EXTHEM.ES  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ \\ 
/* ~~~~  AS ERRORS IN YOUR THEMES ARE NOT THE RESPONSIBILITY OF THE DEVELOPERS  ~~~~ */ 
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  @EXTHEM.ES  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ \\ 
function ex_themes_logo_banner_() { }
add_shortcode('ex_themes_logo_banner_', 'ex_themes_logo_banner_');


// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  @EXTHEM.ES  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ \\ 
/* ~~~~  AS ERRORS IN YOUR THEMES ARE NOT THE RESPONSIBILITY OF THE DEVELOPERS  ~~~~ */ 
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  @EXTHEM.ES  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ \\ 
function ex_themes_logo_banner_baru() { }
add_shortcode('ex_themes_logo_banner_baru', 'ex_themes_logo_banner_baru');


// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  @EXTHEM.ES  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ \\ 
/* ~~~~  AS ERRORS IN YOUR THEMES ARE NOT THE RESPONSIBILITY OF THE DEVELOPERS  ~~~~ */ 
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  @EXTHEM.ES  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ \\ 
function ex_themes_admin_login_() { 
if ( is_user_logged_in() ) {
global $post, $current_user, $opt_themes; 
$current_user	= wp_get_current_user();
$author_id	= $current_user->ID;
$author_email	= $current_user->user_email ;
$author_link	= get_author_posts_url( $author_id );
$author_avatar	= get_avatar_url( $author_id );

?>
 
<?php if(!$opt_themes['mdr_style_3']) { ?><div class="king-logged-user ml-lg-3"><?php } ?>
	<div class="king-username" <?php if(!$opt_themes['header_styles']) { ?>id="hilang"<?php } ?>>
	<img id="usermember" class="user-header-avatar" src="<?php echo esc_url( $author_avatar ); ?>" data-toggle="dropdown" data-target=".user-header-menu" aria-expanded="false"/> 
	<div class="user-header-menu"  >
	<div class="user-header-profile">
	<a href="<?php echo $author_link; ?>" ><?php echo esc_attr( $current_user->display_name ); ?></a>
	<?php if ( is_super_admin() || current_user_can( 'editor' ) ) : ?><div class="king-points" title="<?php _e( 'Total Post', THEMES_NAMES ); ?>"> <?php _e( 'Post', THEMES_NAMES ); ?> :<?php $total_items = count_user_posts($author_id); echo esc_html( $total_items ); ?> </div><?php endif; ?>
	</div>
	<?php if ( is_super_admin() || current_user_can( 'editor' ) ) : ?>
	<a href="<?php echo esc_url( admin_url( 'post-new.php' ) ); ?>" class="user-header-settings"><?php _e( 'Add new post', THEMES_NAMES ); ?></a>
	<a href="<?php echo esc_url( get_admin_url() ); ?>" class="user-header-admin"><?php _e( 'Admin Panel', THEMES_NAMES ); ?></a>
	<?php endif; ?>
	<a href="<?php echo $author_link; ?>" class="user-header-settings"><?php _e( 'Edit Profile', THEMES_NAMES ); ?></a>
	<a href="<?php echo esc_url( wp_logout_url( site_url() ) ); ?>" class="user-header-logout"><?php _e( 'Logout', THEMES_NAMES ); ?></a>
	</div>
	</div>
<?php if(!$opt_themes['mdr_style_3']) { ?></div><?php } ?>
<?php } else { ?>
<?php if(!$opt_themes['mdr_style_3']) {
if(!$opt_themes['header_styles']) { ?> 
<li> 
<div class="king-username">
	<span id="usermember" class="user-header-noavatar" data-toggle="dropdown" data-target=".user-header-menu" aria-expanded="false"></span> 
	<div class="user-header-menu"  >
	<a href="<?php echo esc_url( wp_login_url( site_url() ) ); ?>" class="user-header-login"><?php _e( 'Login', THEMES_NAMES ); ?></a>
	</div>
</div> 
</li> 
<?php }
} ?>
<?php 
}
}

// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  @EXTHEM.ES  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ \\ 
/* ~~~~  AS ERRORS IN YOUR THEMES ARE NOT THE RESPONSIBILITY OF THE DEVELOPERS  ~~~~ */ 
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  @EXTHEM.ES  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ \\ 
function ex_themes_menu_() { }
add_shortcode('ex_themes_menu_', 'ex_themes_menu_');


// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  @EXTHEM.ES  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ \\ 
/* ~~~~  AS ERRORS IN YOUR THEMES ARE NOT THE RESPONSIBILITY OF THE DEVELOPERS  ~~~~ */ 
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  @EXTHEM.ES  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ \\ 
function ex_themes_social_footer_(){ }
add_shortcode('social_footer_mdr', 'ex_themes_social_footer_');


// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  @EXTHEM.ES  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ \\ 
/* ~~~~  AS ERRORS IN YOUR THEMES ARE NOT THE RESPONSIBILITY OF THE DEVELOPERS  ~~~~ */ 
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  @EXTHEM.ES  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ \\ 
function ex_themes_social_footer_mdy(){ }
add_shortcode('social_footer_mdy', 'ex_themes_social_footer_mdy');
 

// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  @EXTHEM.ES  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ \\ 
/* ~~~~  AS ERRORS IN YOUR THEMES ARE NOT THE RESPONSIBILITY OF THE DEVELOPERS  ~~~~ */ 
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  @EXTHEM.ES  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ \\ 
function ex_themes_social_footer_liteapks(){ }
add_shortcode('social_footer_liteapks', 'ex_themes_social_footer_liteapks');
 

// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  @EXTHEM.ES  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ \\ 
/* ~~~~  AS ERRORS IN YOUR THEMES ARE NOT THE RESPONSIBILITY OF THE DEVELOPERS  ~~~~ */ 
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  @EXTHEM.ES  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ \\ 
function ex_themes_social_footer_reborn(){ }
add_shortcode('social_footer_reborn', 'ex_themes_social_footer_reborn');
 

// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  @EXTHEM.ES  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ \\ 
/* ~~~~  AS ERRORS IN YOUR THEMES ARE NOT THE RESPONSIBILITY OF THE DEVELOPERS  ~~~~ */ 
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  @EXTHEM.ES  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ \\ 
function ex_themes_footer_section_() { }
add_shortcode('footer_sections', 'ex_themes_footer_section_');
add_action('footer_sections', 'ex_themes_footer_section_', 10, 1);


// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  @EXTHEM.ES  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ \\ 
/* ~~~~  AS ERRORS IN YOUR THEMES ARE NOT THE RESPONSIBILITY OF THE DEVELOPERS  ~~~~ */ 
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  @EXTHEM.ES  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ \\ 
function ex_themes_menu_footer_() { }
add_shortcode('ex_themes_menu_footer_', 'ex_themes_menu_footer_');


// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  @EXTHEM.ES  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ \\ 
/* ~~~~  AS ERRORS IN YOUR THEMES ARE NOT THE RESPONSIBILITY OF THE DEVELOPERS  ~~~~ */ 
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  @EXTHEM.ES  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ \\ 
function ex_themes_menu_footer_2() { }
add_shortcode('ex_themes_menu_footer_2', 'ex_themes_menu_footer_2');


// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  @EXTHEM.ES  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ \\ 
/* ~~~~  AS ERRORS IN YOUR THEMES ARE NOT THE RESPONSIBILITY OF THE DEVELOPERS  ~~~~ */ 
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  @EXTHEM.ES  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ \\ 
function ex_themes_menu_footer_3() { }
add_shortcode('ex_themes_menu_footer_3', 'ex_themes_menu_footer_3');


// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  @EXTHEM.ES  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ \\ 
/* ~~~~  AS ERRORS IN YOUR THEMES ARE NOT THE RESPONSIBILITY OF THE DEVELOPERS  ~~~~ */ 
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  @EXTHEM.ES  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ \\ 
function ex_themes_copyright_() { }
add_shortcode('ft_copyright', 'ex_themes_copyright_');


add_shortcode('ex_themes_blog_shares_2', 'ex_themes_blog_shares_2');
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  @EXTHEM.ES  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ \\ 
/* ~~~~  AS ERRORS IN YOUR THEMES ARE NOT THE RESPONSIBILITY OF THE DEVELOPERS  ~~~~ */ 
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  @EXTHEM.ES  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ \\ 
function ex_themes_blog_shares_2() { ?>
    <ul class="nav mb-4 list-shares">
	<li class="mr-2">
	<a class="facebook" href="https://www.facebook.com/sharer/sharer.php?u=<?php the_permalink() ?>" rel="nofollow" target="_blank">
	<svg class="svg-5" fill="#fff" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512">
	<path d="M279.14 288l14.22-92.66h-88.91v-60.13c0-25.35 12.42-50.06 52.24-50.06h40.42V6.26S260.43 0 225.36 0c-73.22 0-121.08 44.38-121.08 124.72v70.62H22.89V288h81.39v224h100.17V288z" />
	</svg>
	</a>
	</li>
	<li class="mr-2">
	<a class="twitter" href="https://twitter.com/home?status=<?php the_permalink() ?>" rel="nofollow" target="_blank">
	<svg class="svg-5" fill="#fff" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
	<path d="M459.37 151.716c.325 4.548.325 9.097.325 13.645 0 138.72-105.583 298.558-298.558 298.558-59.452 0-114.68-17.219-161.137-47.106 8.447.974 16.568 1.299 25.34 1.299 49.055 0 94.213-16.568 130.274-44.832-46.132-.975-84.792-31.188-98.112-72.772 6.498.974 12.995 1.624 19.818 1.624 9.421 0 18.843-1.3 27.614-3.573-48.081-9.747-84.143-51.98-84.143-102.985v-1.299c13.969 7.797 30.214 12.67 47.431 13.319-28.264-18.843-46.781-51.005-46.781-87.391 0-19.492 5.197-37.36 14.294-52.954 51.655 63.675 129.3 105.258 216.365 109.807-1.624-7.797-2.599-15.918-2.599-24.04 0-57.828 46.782-104.934 104.934-104.934 30.213 0 57.502 12.67 76.67 33.137 23.715-4.548 46.456-13.32 66.599-25.34-7.798 24.366-24.366 44.833-46.132 57.827 21.117-2.273 41.584-8.122 60.426-16.243-14.292 20.791-32.161 39.308-52.628 54.253z" />
	</svg>
	</a>
	</li>
	<li class="mr-2">
	<a class="pinterest" href="https://pinterest.com/pin/create/button/?url=<?php the_permalink() ?>" rel="nofollow" target="_blank">
	<svg class="svg-5" fill="#fff" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512">
	<path d="M204 6.5C101.4 6.5 0 74.9 0 185.6 0 256 39.6 296 63.6 296c9.9 0 15.6-27.6 15.6-35.4 0-9.3-23.7-29.1-23.7-67.8 0-80.4 61.2-137.4 140.4-137.4 68.1 0 118.5 38.7 118.5 109.8 0 53.1-21.3 152.7-90.3 152.7-24.9 0-46.2-18-46.2-43.8 0-37.8 26.4-74.4 26.4-113.4 0-66.2-93.9-54.2-93.9 25.8 0 16.8 2.1 35.4 9.6 50.7-13.8 59.4-42 147.9-42 209.1 0 18.9 2.7 37.5 4.5 56.4 3.4 3.8 1.7 3.4 6.9 1.5 50.4-69 48.6-82.5 71.4-172.8 12.3 23.4 44.1 36 69.3 36 106.2 0 153.9-103.5 153.9-196.8C384 71.3 298.2 6.5 204 6.5z" />
	</svg>
	</a>
	</li>
	<li class="mr-2">
	<a class="linkedin" href="https://www.linkedin.com/shareArticle?mini=true&url=<?php the_permalink() ?>&title=<?php echo get_the_title(); ?>&summary=&source=" rel="nofollow" target="_blank">
	<svg class="svg-5" fill="#fff" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512">
	<path d="M100.28 448H7.4V148.9h92.88zM53.79 108.1C24.09 108.1 0 83.5 0 53.8a53.79 53.79 0 0 1 107.58 0c0 29.7-24.1 54.3-53.79 54.3zM447.9 448h-92.68V302.4c0-34.7-.7-79.2-48.29-79.2-48.29 0-55.69 37.7-55.69 76.7V448h-92.78V148.9h89.08v40.8h1.3c12.4-23.5 42.69-48.3 87.88-48.3 94 0 111.28 61.9 111.28 142.3V448z" />
	</svg>
	</a>
	</li>
    </ul>
<?php }


// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  @EXTHEM.ES  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ \\ 
/* ~~~~  AS ERRORS IN YOUR THEMES ARE NOT THE RESPONSIBILITY OF THE DEVELOPERS  ~~~~ */ 
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  @EXTHEM.ES  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ \\ 
function ex_themes_related_posts_() { 
global $opt_themes, $wpdb, $post, $wp_query;
$related_on	= $opt_themes['aktif_related_post']; 
$title_rp_1	= $opt_themes['title_related_post_1']; 
$title_rp_2	= $opt_themes['title_related_post_2'];
$title_rp_3	= $opt_themes['title_related_post_3'];
$developers	= get_post_meta( $post->ID, 'wp_developers_GP', true );
if($related_on) {	 
$developer_terms	= get_the_terms( $post->ID , 'developer', 'string');
$term_ids	= wp_list_pluck($developer_terms,'term_id');
$developer_terms	= get_the_terms( $post->ID , 'developer', 'string');
//Pluck out the IDs to get an array of IDS
$term_ids	= wp_list_pluck($developer_terms,'term_id');
$paged_categorie_apps	= (get_query_var('paged')) ? get_query_var('paged') : 1;
	//Query posts with tax_query. Choose in 'IN' if want to query posts with any of the terms
	//Chose 'AND' if you want to query for posts with all terms
	$developer_query = new WP_Query( array(
	'post_type'	=> 'post',
	'tax_query'	=> array(
	array(
	'taxonomy'	=> 'developer',
	'field'	=> 'id',
	'terms'	=> $term_ids,
	/* 'operator'=> 'IN' //Or 'AND' or 'NOT IN' */
	)),
	'posts_per_page'	=> $opt_themes['limited_related_posts'],
	'paged'	=> $paged_categorie_apps,
	'ignore_sticky_posts'	=> 1,
	'orderby'	=> 'rand',
	'post__not_in'	=>array($post->ID)
	) );

	if($developer_query->have_posts()){ 
	?>	
 
	
	<?php 
	switch($opt_themes['themes_styles']){
	case 'moddroid':
	?>
	<section class="mb-4"> 
	<h2 class="h5 font-weight-semibold mb-3 pb-1 ">
	<span class="text-body border-bottom-2 border-secondary d-inline-block pb-1" ><?php _e($title_rp_3, TEXT_DOMAIN); ?> <?php echo $developers; ?></span> 
	</h2>	
	<?php 
	break; 
	
	case 'modyolo':
	?>
	<section class="bg-white border rounded shadow-sm pt-3 px-2 px-md-3 mb-3 mx-auto" style="max-width: 880px;"> 
	<header class="d-flex align-items-end mb-3">
	<h2 class="h5 font-weight-semibold mb-0">
	<?php _e($title_rp_3, TEXT_DOMAIN); ?> <?php echo $developers; ?>
	</h2>
	</header>
	<?php 
	break; 
	
	case 'reborn':
	?>
	<section class="bg-white pb-3 pt-3 px-2 px-md-3 mt-3 m-2 mx-auto" style="max-width: 920px;"> 
	<div class="d-flex align-items-baseline justify-content-between ">
	<h2 class="h5 font-weight-semibold m-0 p-0 mb-3 cate-title"><?php _e($title_rp_3, TEXT_DOMAIN); ?> <?php echo $developers; ?></h2>
	</div>
	<?php 
	break; 
	
	case 'liteapks':
	?>
	 
	<section class="related-posts">
	<h2 class="font-weight-bold mb-4"><?php _e($title_rp_3, TEXT_DOMAIN); ?> <?php echo $developers; ?></h2>
	<?php 
	break; 
	
	default:
	?> 
	<section class="mb-4"> 
	<h2 class="h5 font-weight-semibold mb-3 pb-1 ">
	<span class="text-body border-bottom-2 border-secondary d-inline-block pb-1" ><?php _e($title_rp_3, TEXT_DOMAIN); ?> <?php echo $developers; ?></span> 
	</h2>	
	<?php 
	break;
	} ?> 


	<div class="row">
	<?php 
	if($developer_query->have_posts()){
	while($developer_query->have_posts() ) : $developer_query->the_post();
	
	switch($opt_themes['themes_styles']){
	case 'moddroid':
	get_template_part('loop/item.mdr'); 
	break; 
	
	case 'modyolo':
	get_template_part('loop/item.mdy'); 
	break; 
	
	case 'reborn':
	get_template_part('loop/item.reborn');
	break; 
	
	case 'liteapks':
	get_template_part('loop/item.liteapks'); 
	break; 
	
	default:
	get_template_part('loop/item.mdr'); 
	break;
	}
	endwhile; wp_reset_query(); } ?>
	</div> 
	</section>	
	<?php } 
	global $opt_themes, $wpdb, $post, $wp_query;
	$categories = get_the_category($post->ID);
	if ($categories) {
	$current_cat_id  	= get_query_var('cat'); 
	$category_ids = array();
	foreach($categories as $individual_category) 
	$category_ids[] = $individual_category->term_id;
	$recommended_args  = array(
	//'tag' => $tags->slug,
	'cat' 	=> get_query_var('cat'),
	'category__in'	=> $category_ids,
	'post__not_in'	=> array($post->ID),
	'posts_per_page'	=> $opt_themes['limited_related_posts'], 
	/* 'caller_get_posts'	=> 1 */
	);
	$recommended_post = new WP_Query( $recommended_args ); 
	if( $recommended_post->have_posts() ) {
	?>	
	
	 
	 
	<?php 
	switch($opt_themes['themes_styles']){
	case 'moddroid':
	?>
	<section class="mb-4"> 
	<h2 class="h5 font-weight-semibold mb-3 pb-1 ">
	<span class="text-body border-bottom-2 border-secondary d-inline-block pb-1" ><?php _e($title_rp_1, TEXT_DOMAIN); ?></span> 
	</h2>	
	<?php 
	break; 
	
	case 'modyolo':
	?>
	<section class="bg-white border rounded shadow-sm pt-3 px-2 px-md-3 mb-3 mx-auto" style="max-width: 880px;"> 
	<header class="d-flex align-items-end mb-3">
	<h2 class="h5 font-weight-semibold mb-0">
	<?php _e($title_rp_1, TEXT_DOMAIN); ?>
	</h2>	  
	</header>
	<?php 
	break; 
	
	case 'reborn':
	?>
	<section class="bg-white pb-3 pt-3 px-2 px-md-3 mt-3 m-2 mx-auto" style="max-width: 920px;"> 
	<div class="d-flex align-items-baseline justify-content-between ">
	<h2 class="h5 font-weight-semibold m-0 p-0 mb-3 cate-title"><?php _e($title_rp_1, TEXT_DOMAIN); ?></h2>
	 
	</div>
	<?php 
	break; 
	
	case 'liteapks':
	?>
	 
	<section class="related-posts">
	<h2 class="font-weight-bold mb-4"><?php _e($title_rp_1, TEXT_DOMAIN); ?></h2>
	<?php 
	break; 
	
	default:
	?> 
	<section class="mb-4"> 
	<h2 class="h5 font-weight-semibold mb-3 pb-1 ">
	<span class="text-body border-bottom-2 border-secondary d-inline-block pb-1" ><?php _e($title_rp_1, TEXT_DOMAIN); ?></span> 
	</h2>	 
	<?php 
	break;
	} ?> 

	<div class="row">
	<?php 
	if( $recommended_post->have_posts() ) {
	while ($recommended_post->have_posts()) : $recommended_post->the_post();
	
	switch($opt_themes['themes_styles']){
	case 'moddroid':
	get_template_part('loop/item.mdr'); 
	break; 
	
	case 'modyolo':
	get_template_part('loop/item.mdy'); 
	break; 
	
	case 'reborn':
	get_template_part('loop/item.reborn');
	break; 
	
	case 'liteapks':
	get_template_part('loop/item.liteapks'); 
	break; 
	
	default:
	get_template_part('loop/item.mdr'); 
	break;
	}
	endwhile; } wp_reset_query(); ?>
	</div>
	</section>
	<?php }}  
	global $opt_themes, $wpdb, $post, $wp_query;
	
	$categories2 = get_the_category($post->ID);
	if ($categories2) {
	$category_ids2 = array();
	$current_cat_id  	= get_query_var('cat'); 
	foreach($categories2 as $individual_category2) $category_ids2[] = $individual_category2->term_id;
	$you_may_also_like_args = array(
	//'tag' => $tags->slug,
	'cat'	 	=> get_query_var('cat'),
	'post_type'	=> 'post',
	'post_status'	=> 'publish',
	'orderby'	=> 'rand',
	'post__not_in'	=> array($post->ID),
	'posts_per_page'	=> $opt_themes['limited_related_posts'],  
	/* 'caller_get_posts'	=> 1 */
	);
	
	$post_id = get_the_ID();
    $cat_ids = array();
    $categories = get_the_category( $post_id );

    if(!empty($categories) && !is_wp_error($categories)):
	foreach ($categories as $category):
	array_push($cat_ids, $category->term_id);
	endforeach;
    endif;

    $current_post_type = get_post_type($post_id);
	$query_args = array( 
	'category__in'	=> $cat_ids,
	'post_type'	=> $current_post_type,
	'post__not_in'	=> array($post_id),
	'posts_per_page'	=> $opt_themes['limited_related_posts'], 
	'post_status'	=> 'publish',
	'orderby'	=> 'rand',
     );
	 
	$you_may_also_like_post = new WP_Query( $query_args );
	
	if( $you_may_also_like_post->have_posts() ) { 
	?>	
	
	
	<?php 
	switch($opt_themes['themes_styles']){
	case 'moddroid':
	?>
	<section class="mb-4"> 
	<h2 class="h5 font-weight-semibold mb-3 pb-1 ">
	<span class="text-body border-bottom-2 border-secondary d-inline-block pb-1" ><?php _e($title_rp_2, TEXT_DOMAIN); ?></span> 
	</h2>	
	<?php 
	break; 
	
	case 'modyolo':
	?>
	<section class="bg-white border rounded shadow-sm pt-3 px-2 px-md-3 mb-3 mx-auto" style="max-width: 880px;"> 
	<header class="d-flex align-items-end mb-3">
	<h2 class="h5 font-weight-semibold mb-0">
	<?php _e($title_rp_2, TEXT_DOMAIN); ?>
	</h2>	  
	</header>
	<?php 
	break; 
	
	case 'reborn':
	?>
	<section class="bg-white  pb-3 pt-3 px-2 px-md-3 mt-3 m-2 mx-auto" style="max-width: 920px;"> 
	<div class="d-flex align-items-baseline justify-content-between ">
	<h2 class="h5 font-weight-semibold m-0 p-0 mb-3 cate-title"><?php _e($title_rp_2, TEXT_DOMAIN); ?></h2>
	</div>
	<?php 
	break; 
	
	case 'liteapks':
	?>
	 
	<section class="related-posts">
	<h2 class="font-weight-bold mb-4"><?php _e($title_rp_2, TEXT_DOMAIN); ?></h2>
	<?php 
	break; 
	
	default:
	?> 
	<section class="mb-4"> 
	<h2 class="h5 font-weight-semibold mb-3 pb-1 ">
	<span class="text-body border-bottom-2 border-secondary d-inline-block pb-1" ><?php _e($title_rp_2, TEXT_DOMAIN); ?></span> 
	</h2>	
	<?php 
	break;
	} ?> 

	  
	<div class="row">
	<?php 
	if( $you_may_also_like_post->have_posts() ) {
	while ($you_may_also_like_post->have_posts()) : $you_may_also_like_post->the_post();
	
	switch($opt_themes['themes_styles']){
	case 'moddroid':
	get_template_part('loop/item.mdr'); 
	break; 
	
	case 'modyolo':
	get_template_part('loop/item.mdy'); 
	break; 
	
	case 'reborn':
	get_template_part('loop/item.reborn');
	break; 
	
	case 'liteapks':
	get_template_part('loop/item.liteapks'); 
	break; 
	
	default:
	get_template_part('loop/item.mdr'); 
	break;
	}
	endwhile; } wp_reset_query(); ?>
	</div>
	</section> 
	<?php }}
	}
}
add_shortcode('ex_themes_related_posts_', 'ex_themes_related_posts_');


// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  @EXTHEM.ES  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ \\ 
/* ~~~~  AS ERRORS IN YOUR THEMES ARE NOT THE RESPONSIBILITY OF THE DEVELOPERS  ~~~~ */ 
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  @EXTHEM.ES  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ \\ 
function ex_themes_versions() {
/* https://css-tricks.com/snippets/wordpress/custom-loop-based-on-custom-fields/ */
global $opt_themes, $wpdb, $post, $wp_query; 
$search	= get_post_meta( $post->ID, 'wp_title_GP', true );
$search	= preg_replace('/[^A-Za-z0-9\-]/', ' ', $search);
$wp_GP_ID	= get_post_meta( $post->ID, 'wp_GP_ID', true );
//$search	= str_replace(array(':','-'), '', $search);
$version_gp	= get_post_meta( $post->ID, 'wp_version', true );
$version_sc	= get_post_meta( get_the_ID(), 'wp_version_GP', true );	
if ( $version_gp === FALSE or $version_gp == '' ) $version_gp = $version_sc; 
$title	= get_post_meta( $post->ID, 'wp_title_GP', true );
$title_alt	= get_the_title();   
if($opt_themes['latest_versions']){
 
$arg_version = array(
	'post_type'     => 'post',
	'numberposts'	=> -1,
	'meta_key'	=> 'wp_GP_ID', 
	'meta_value'	=> $wp_GP_ID,
	'orderby'	=> $version_gp,
	'order'	=> 'DESC',
    );

 
$post_version = new WP_Query($arg_version);
if($search){
do_action('section_version');
?>
 
<div class="version_history" style="max-height: 300px;overflow: auto;">
	<?php	
	while ( $post_version->have_posts() ) : 
	$post_version->the_post(); 
	get_template_part('loop/item.version'); 	
	endwhile;
	?>  
</div>
</section> 
<style>
.version_history .list .icon { 
  left: 0px!important; 
  width: 70px!important;
  height: 70px!important; 
}
.version_history .list .package_info {  
    padding-left: 86px!important; 
}
</style>
<!--
<link rel="stylesheet" type="text/css" href="<?php echo get_template_directory_uri(); ?>/assets/css/versi.css" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>	
<script>
$(function() {
  $(".open_info").on("click", function(e) {
    e.preventDefault();
    $('.info_box').removeClass('show');
    $(this).parent().addClass('show');
    var content = $(this).closest("div").next().find(".info_box");
    $(".info_box").not(content).slideUp();
    content.slideToggle();
  });
});
</script>
-->
<?php }}
}
add_shortcode('ex_themes_versions', 'ex_themes_versions');


// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  @EXTHEM.ES  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ \\ 
/* ~~~~  AS ERRORS IN YOUR THEMES ARE NOT THE RESPONSIBILITY OF THE DEVELOPERS  ~~~~ */ 
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  @EXTHEM.ES  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ \\ 
function ex_themes_poster_img_sliders_() {
global $wpdb, $post, $opt_themes; 
$gallery_bottom_on	= $opt_themes['aktif_ex_themes_gallery_images_gpstore_'];
$gallery_data	= get_post_meta( $post->ID, 'gallery_data', true );
if($gallery_bottom_on) {
?> 

<div class="swiper gallery_image_bottom">
	<?php
	global $opt_themes;
	switch ($opt_themes['themes_styles']) {
	case 'moddroid':
	?>
	<h2 class="h5 text-body font-weight-semibold m-0 p-0 mb-3 border-bottom-2 border-secondary d-inline-block pb-1 "><?php _e($opt_themes['title_gallery_top'], TEXT_DOMAIN); ?></h2>
	<?php
	break;
	case 'modyolo':
	?>
	<h2 class="h5 text-body font-weight-semibold m-0 p-0 mb-3 d-inline-block pb-1 "><?php _e($opt_themes['title_gallery_top'], TEXT_DOMAIN); ?></h2>
	<?php
	break;
	case 'reborn':
	?>
	<h2 class="h5 font-weight-semibold m-0 p-0 mb-3 cate-title text-body d-inline-block pb-1 "><?php _e($opt_themes['title_gallery_top'], TEXT_DOMAIN); ?></h2>
	<?php
	break;
	case 'liteapks':
	?>
	
	<?php
	break;
	default:
	?>
	<h2 class="h5 text-body font-weight-semibold m-0 p-0 mb-3 border-bottom-2 border-secondary d-inline-block pb-1 "><?php _e($opt_themes['title_gallery_top'], TEXT_DOMAIN); ?></h2>
	<?php
	break;
	} ?> 
	<div class="swiper-wrapper">
	<?php if ($gallery_data) {	 
	if ( '' != get_post_meta( $post->ID, 'gallery_data', true ) ) { 
	$gallery	= get_post_meta( $post->ID, 'gallery_data', true ); 
	}
	if ( isset( $gallery_data ) ) :
		for( $i = 0; $i < count( $gallery['image_url'] ); $i++ ) {
	if ( '' != $gallery['image_url'][$i] ) { ?>
	<div class="swiper-slide"><a href="<?php echo $gallery['image_url'][$i] ; ?>" itemprop="screenshot" data-fancybox="img_bottom" rel="nofollow"><img src="<?php echo $gallery['image_url'][$i] ; ?>" alt="Gallery <?php echo $i; ?>" title="Gallery <?php echo $i; ?>"></a></div>
	<?php }
		} endif; } else {    
	$image_link	= get_post_meta(get_the_ID(), 'wp_images_GP', true);	
	if ($image_link) {
	$pos_titles	= get_the_title();	
	$i = 0;
	$count = 10;
	foreach($image_link as $elemento) {
	$i++;
	if ( $i <= $count ) { 
	$thumbnails_gp	= $image_link[$i];
	$thumbnails	= str_replace( 'http://', '', $thumbnails_gp );
	$thumbnails	= str_replace( 'https://', '', $thumbnails_gp );
	$randoms	= mt_rand(0, 2);
	$cdn_thumbnails2	= '//i'.$randoms.'.wp.com/'.$thumbnails.'=w720';
	$cdn_thumbnails	= '//i'.$randoms.'.wp.com/'.$thumbnails.'';
	$cdn_photon_on	= $opt_themes['ex_themes_cdn_photon_activate_'];	
	?>
	<div class="swiper-slide"><a href="<?php if($cdn_photon_on) { echo $cdn_thumbnails; } else { echo $thumbnails_gp; } ?>" itemprop="screenshot" data-fancybox="img_bottom" rel="nofollow"><img src="<?php if($cdn_photon_on) { echo $cdn_thumbnails; } else { echo $thumbnails_gp.'-c'; } ?>" title="<?php echo $pos_titles; ?>  Gallery <?php echo $i; ?>" alt="<?php echo $pos_titles; ?> Gallery <?php echo $i; ?>"></a></div>
	<?php } } } else {} } ?>
	</div> 
</div>
<!--
<link rel="stylesheet" href="https://unpkg.com/swiper@8/swiper-bundle.min.css" />
<script src="https://unpkg.com/swiper@8/swiper-bundle.min.js"> </script>

<link rel="stylesheet" href="<?php echo get_template_directory_uri(); ?>/assets/css/swiper.css">
<script>
	var swiper = new Swiper(".gallery_image_bottom", {
	slidesPerView: 5,
	spaceBetween: 5,
	pagination: {
	  el: ".swiper-pagination",
	  clickable: true,
	}, 
	});
</script>
-->
<?php } 
}
add_shortcode('ex_themes_poster_img_sliders_', 'ex_themes_poster_img_sliders_');


// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  @EXTHEM.ES  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ \\ 
/* ~~~~  AS ERRORS IN YOUR THEMES ARE NOT THE RESPONSIBILITY OF THE DEVELOPERS  ~~~~ */ 
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  @EXTHEM.ES  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ \\ 
function gallery_image_top_() {
global $wpdb, $post, $opt_themes; 
$gallery_top_on	= $opt_themes['enable_gallery_top'];
$gallery_data	= get_post_meta( $post->ID, 'gallery_data', true );
if($gallery_top_on){
?>	
  
	<?php
	global $opt_themes;
	switch ($opt_themes['themes_styles']) {
	case 'moddroid':
	?>
	<div class="swiper gallery_image_top">
	<h2 class="h5 text-body font-weight-semibold m-0 p-0 mb-3 border-bottom-2 border-secondary d-inline-block pb-1 "><?php _e($opt_themes['title_gallery_top'], TEXT_DOMAIN); ?></h2>
	<div class="swiper-wrapper">
	<?php
	break;
	case 'modyolo':
	?>
	<div class="swiper gallery_image_top">
	<h2 class="h5 text-body font-weight-semibold m-0 p-0 mb-3 d-inline-block pb-1 "><?php _e($opt_themes['title_gallery_top'], TEXT_DOMAIN); ?></h2>
	<div class="swiper-wrapper">
	<?php
	break;
	case 'reborn':
	?>
	<div class="swiper gallery_image_top">
	<h2 class="h5 font-weight-semibold m-0 p-0 mb-3 cate-title text-body d-inline-block pb-1 "><?php _e($opt_themes['title_gallery_top'], TEXT_DOMAIN); ?></h2>
	<div class="swiper-wrapper">
	<?php
	break;
	case 'liteapks':
	?> 
	
	<?php
	break;
	default:
	?>
	<div class="swiper gallery_image_top">
	<h2 class="h5 text-body font-weight-semibold m-0 p-0 mb-3 border-bottom-2 border-secondary d-inline-block pb-1 "><?php _e($opt_themes['title_gallery_top'], TEXT_DOMAIN); ?></h2>
	<div class="swiper-wrapper">
	<?php
	break;
	} ?> 
 
	
	<?php if ($gallery_data) {	 
	if ( '' != get_post_meta( $post->ID, 'gallery_data', true ) ) { 
	$gallery	= get_post_meta( $post->ID, 'gallery_data', true ); 
	}
	if ( isset( $gallery_data ) ) :
		for( $i = 0; $i < count( $gallery['image_url'] ); $i++ ) {
	if ( '' != $gallery['image_url'][$i] ) { ?>
	
	<?php 
	switch($opt_themes['themes_styles']){
	case 'moddroid':
	?>
	<div class="swiper-slide">
	<?php
	break; 	
	case 'modyolo':
	?>
	<div class="swiper-slide">
	
	<?php
	break; 	
	case 'reborn':
	?>
	<div class="swiper-slide">
	
	<?php
	break; 	
	case 'liteapks':
	?>
	<div class="col-auto col-small">
	
	<?php	
	break; 
	default:
	?>
	<div class="swiper-slide">
	
	<?php
	break; 
	}
	?>
	<a href="<?php echo $gallery['image_url'][$i] ; ?>" itemprop="screenshot" data-fancybox="image_top" rel="nofollow">
	<img style="max-height: 170px!important;" src="<?php echo $gallery['image_url'][$i] ; ?>" alt="Gallery <?php echo $i; ?>" title="Gallery <?php echo $i; ?>">
	</a>
	</div>
	<?php }
		} endif; } else {    
	$image_link	= get_post_meta(get_the_ID(), 'wp_images_GP', true);	
	if ($image_link) {
	$pos_titles	= get_the_title();	
	$i = 0;
	$count = 10;
	foreach($image_link as $elemento) {	
	if ( $i <= $count ) { 
	$thumbnails_gp	= $image_link[$i];
	$thumbnails	= str_replace( 'http://', '', $thumbnails_gp );
	$thumbnails	= str_replace( 'https://', '', $thumbnails_gp );
	$randoms	= mt_rand(0, 2);
	$cdn_thumbnails2	= '//i'.$randoms.'.wp.com/'.$thumbnails.'=w720';
	$cdn_thumbnails	= '//i'.$randoms.'.wp.com/'.$thumbnails.'';
	$cdn_photon_on	= $opt_themes['ex_themes_cdn_photon_activate_'];	
	?>
 
	
	<?php 
	switch($opt_themes['themes_styles']){
	case 'moddroid':
	?>
	<div class="swiper-slide">
	<?php
	break; 	
	case 'modyolo':
	?>
	<div class="swiper-slide">
	
	<?php
	break; 	
	case 'reborn':
	?>
	<div class="swiper-slide">
	
	<?php
	break; 	
	case 'liteapks':
	?>
	<div class="col-auto col-small">
	
	<?php	
	break; 
	default:
	?>
	<div class="swiper-slide">
	
	<?php
	break; 
	}
	?>
	<a href="<?php if($cdn_photon_on) { echo $cdn_thumbnails; } else { echo $thumbnails_gp; } ?>" itemprop="screenshot" data-fancybox="img_top" rel="nofollow">
	<img style="max-height: 170px!important;" src="<?php if($cdn_photon_on) { echo $cdn_thumbnails; } else { echo $thumbnails_gp; } ?>" title="<?php echo $pos_titles; ?> Gallery <?php echo $i; ?>" alt="<?php echo $pos_titles; ?> Gallery <?php echo $i; ?>">
	</a>
	</div>
	
	<?php } $i++; } } else {} } ?>

	<?php 
	switch($opt_themes['themes_styles']){
	case 'moddroid':
	?>
	
</div>
</div>

<link rel="stylesheet" href="https://unpkg.com/swiper@8/swiper-bundle.min.css" />
<script src="https://unpkg.com/swiper@8/swiper-bundle.min.js"> </script>

<link rel="stylesheet" href="<?php echo get_template_directory_uri(); ?>/assets/css/swiper.css">

<script>
	var swiper = new Swiper(".gallery_image_top", {
	slidesPerView: 5,
	spaceBetween: 5,
	pagination: {
	  el: ".swiper-pagination",
	  clickable: true,
	}, 
	});
</script>
	<?php
	break; 	
	case 'modyolo':
	?>
	
</div>
</div>

<link rel="stylesheet" href="https://unpkg.com/swiper@8/swiper-bundle.min.css" />
<script src="https://unpkg.com/swiper@8/swiper-bundle.min.js"> </script>

<link rel="stylesheet" href="<?php echo get_template_directory_uri(); ?>/assets/css/swiper.css">

<script>
	var swiper = new Swiper(".gallery_image_top", {
	slidesPerView: 5,
	spaceBetween: 5,
	pagination: {
	  el: ".swiper-pagination",
	  clickable: true,
	}, 
	});
</script>
	<?php
	break; 	
	case 'reborn':
	?>
	
</div>
</div>

<link rel="stylesheet" href="https://unpkg.com/swiper@8/swiper-bundle.min.css" />
<script src="https://unpkg.com/swiper@8/swiper-bundle.min.js"> </script>

<link rel="stylesheet" href="<?php echo get_template_directory_uri(); ?>/assets/css/swiper.css">

<script>
	var swiper = new Swiper(".gallery_image_top", {
	slidesPerView: 5,
	spaceBetween: 5,
	pagination: {
	  el: ".swiper-pagination",
	  clickable: true,
	}, 
	});
</script>
	<?php
	break; 	
	case 'liteapks':
	?>
	
	<?php	
	break; 
	default:
	?>
	
</div>
</div>

<link rel="stylesheet" href="https://unpkg.com/swiper@8/swiper-bundle.min.css" />
<script src="https://unpkg.com/swiper@8/swiper-bundle.min.js"> </script>

<link rel="stylesheet" href="<?php echo get_template_directory_uri(); ?>/assets/css/swiper.css">

<script>
	var swiper = new Swiper(".gallery_image_top", {
	slidesPerView: 5,
	spaceBetween: 5,
	pagination: {
	  el: ".swiper-pagination",
	  clickable: true,
	}, 
	});
</script>
	<?php
	break; 
	}
	?>
<?php }
}
add_shortcode('gallery_image_top_', 'gallery_image_top_');


// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  @EXTHEM.ES  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ \\ 
/* ~~~~  AS ERRORS IN YOUR THEMES ARE NOT THE RESPONSIBILITY OF THE DEVELOPERS  ~~~~ */ 
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  @EXTHEM.ES  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ \\ 
function limit_words($string, $word_limit) {
	$words = explode(' ', $string);
	return implode(' ', array_slice($words, 0, $word_limit));
}

// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  @EXTHEM.ES  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ \\ 
/* ~~~~  AS ERRORS IN YOUR THEMES ARE NOT THE RESPONSIBILITY OF THE DEVELOPERS  ~~~~ */ 
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  @EXTHEM.ES  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ \\ 


function cpu_limit() { 
global $wpdb, $post, $opt_themes, $wp_query; 
         
if($opt_themes['cpu_limit']){ 
$load 	= sys_getloadavg();
$limit 	= $opt_themes['cpu_limit_num'];  // cobalah dari angka ini, dan terus naikkan sampai batas dimana server hung
if ($load[0] >= $limit) {
header('HTTP/1.1 503 Too busy, try again later');
die('<title>server too busy</title>
<link href="https://fonts.googleapis.com/css?family=Concert+One" rel="stylesheet">  
<style>
body {background-color: #021A4B;font-family: "Concert One", cursive;margin: 0;overflow: hidden;padding: 0;}.text {left: 50%;position: absolute;transform: translateX(-50%);color: #dbdbdb;font-size: 3em;margin: 0;opacity: 0.3;text-align: center;top: 50px;width: 80%;}.container {left: 50%;position: absolute;top: 50%;transform: translate(-50%, -50%);height: 350px;width: 400px;}.container .bg {left: 50%;position: absolute;top: 50%;transform: translate(-50%, -50%);background-color: rgba(219, 219, 219, 0.05);border-radius: 50%;box-shadow: 0px 0px 100px 50px rgba(219, 219, 219, 0.1);height: 400px;overflow: hidden;width: 400px;}.container .bg .light {left: 50%;position: absolute;top: 50%;transform: translate(-50%, -50%);border-color: transparent transparent #dbdbdb transparent;border-style: solid;border-width: 0 160px 400px 160px;height: 0;opacity: 0;width: 0;}.ufo {position: absolute;height: 100px;left: calc(50% - 50px);top: 0;width: 100px;}.ufo .ufo-bottom {left: 50%;position: absolute;transform: translateX(-50%);background-color: #eba849;border-radius: 50%;height: 20px;top: 55px;width: 20px;}.ufo .ufo-bottom:after, .ufo .ufo-bottom:before {position: absolute;background-color: #eba849;border-radius: 50%;content: "";height: 20px;top: -6px;width: 20px;}.ufo .ufo-bottom:after {left: -25px;}.ufo .ufo-bottom:before {left: 25px;}.ufo .ufo-top {left: 50%;position: absolute;transform: translateX(-50%);background-color: #eba849;border-radius: 50%;height: 70px;width: 90px;}.ufo .ufo-top:before {left: 50%;position: absolute;transform: translateX(-50%);background-color: #283b49;border-radius: 50%;content: "";height: 70px;top: -10px;width: 100px;}.ufo .ufo-glass {left: 50%;position: absolute;transform: translateX(-50%);background-color: #dbdbdb;border-radius: 90px 90px 80px 80px;height: 80px;overflow: hidden;top: -40px;width: 80px;}.ufo .ufo-glass .alien {left: 50%;position: absolute;transform: translateX(-50%);background-color: #41a88b;border-radius: 50px 50px 0 0;height: 70px;overflow: hidden;top: 25px;width: 50px;}.ufo .ufo-glass .alien .alien-eye {left: 50%;position: absolute;transform: translateX(-50%);background-color: #dbdbdb;border-radius: 50%;height: 30px;top: 10px;width: 30px;}.ufo .ufo-glass .alien .alien-eye:after {left: 50%;position: absolute;transform: translateX(-50%);background-color: #41a88b;border-radius: 50%;content: "";height: 40px;bottom: 30px;width: 40px;}.ufo .ufo-glass .alien .alien-eye:before {left: 50%;position: absolute;transform: translateX(-50%);background-color: #13242c;border-radius: 50%;content: "";height: 10px;bottom: 5px;width: 10px;}.bed {left: 50%;position: absolute;transform: translateX(-50%);background-color: #13242c;border-radius: 25px;bottom: -25px;height: 10px;width: 230px;}.bed .mattress {left: 50%;position: absolute;transform: translateX(-50%);background-color: rgba(219, 219, 219, 0.4);border-radius: 10px;bottom: 10px;height: 30px;width: 220px;}.man {left: 50%;position: absolute;transform: translateX(-50%);border-radius: 50%;bottom: 13px;height: 150px;width: 150px;}.man .foot {position: absolute;background-color: rgba(115, 188, 198, 0.5);border-radius: 50%;box-shadow: 0px -15px 0 rgba(115, 188, 198, 0.2);height: 35px;left: 0px;top: 113px;width: 35px;}.man .man-body {left: 50%;position: absolute;transform: translateX(-50%);background-color: #ca906f;border-radius: 50%;box-shadow: -30px -70px 0 -71px #CA906F;height: 150px;overflow: hidden;width: 150px;}.man .man-body:after {position: absolute;top: 50%;transform: translateY(-50%);background-color: #73bcc6;content: "";height: 100%;left: calc(50% - 20px);width: 100px;}.man .head {position: absolute;height: 80px;right: -78px;top: 35px;width: 80px;}.man .head .face {position: absolute;top: 50%;transform: translateY(-50%);background-color: #ca906f;border-radius: 50%;height: 70px;left: 0;overflow: hidden;width: 70px;}.man .head .face:after {position: absolute;background-color: #13242c;border-radius: 50%;content: "";height: 70px;left: 0;top: 50px;width: 70px;}.man .head .hair {position: absolute;background-color: #13242c;border-radius: 30px 0;height: 50px;right: 0px;top: 20px;width: 30px;}.man .arm {position: absolute;background-color: #ca906f;border-radius: 50px;height: 140px;right: 15px;top: 60px;width: 60px;}.ufo {animation: top-anima 1.5s infinite linear;}@keyframes top-anima {0% {top: 0;}50% {top: -5px;}}.bg .light {animation: light-anima 3s infinite linear;}@keyframes light-anima {0% {opacity: 0;}45% {opacity: 0.2;}52% {opacity: 0.2;}55% {opacity: 0;}60% {opcaity: 0;}100% {opcaity: 0;}}.ufo .alien .alien-eye:after {animation: alien01-anima 3s infinite linear;}@keyframes alien01-anima {0% {bottom: 30px;}52% {bottom: 30px;}55% {bottom: 20px;}60% {bottom: 20px;}100% {bottom: 20px;}}.bed .mattress {animation: mattress-anima 3s infinite linear;}@keyframes mattress-anima {0% {bottom: 10px;}52% {bottom: 10px;}55% {bottom: 15px;}60% {bottom: 10px;}100% {bottom: 10px;}}.man {animation: man-anima 3s infinite linear;}@keyframes man-anima {0% {bottom: 13px;}50% {bottom: 80px;}52% {bottom: 10px;}55% {bottom: 30px;}60% {bottom: 13px;}100% {bottom: 13px;}}.man .head {transform: rotate(20deg);transform-origin: -75px 40px;animation: head-anima 3s infinite linear;}@keyframes head-anima {0% {transform: rotate(20deg);}50% {transform: rotate(40deg);}52% {transform: rotate(20deg);}55% {transform: rotate(10deg);}60% {transform: rotate(20deg);}100% {transform: rotate(20deg);}}.man .arm {transform: rotate(30deg);transform-origin: 30px 30px;animation: arm-anima 3s infinite linear;}@keyframes arm-anima {0% {transform: rotate(30deg);}15% {transform: rotate(-5deg);}20% {transform: rotate(5deg);}25% {transform: rotate(-2.5deg);}30% {transform: rotate(2.5deg);}50% {transform: rotate(0deg);}52% {transform: rotate(30deg);}100% {transform: rotate(30deg);}}#link {bottom: 20px;color: #fff;opacity: 0.5;display: flex;align-items: center;position: absolute;left: 50%;transform: translateX(-50%);}#link p {margin: 0;margin-left: 5px;}#link:hover {opacity: 1;}
</style>
<p class="text">Oops..<br>Server too busy. Please try again later </p>
<div class="container">
  <div class="bg">
    <div class="light"></div>
  </div>
  <div class="ufo">
    <div class="ufo-bottom"></div>
    <div class="ufo-top"></div>
    <div class="ufo-glass">
      <div class="alien">
        <div class="alien-eye"></div>
      </div>
    </div>
  </div>
  <div class="bed">
    <div class="mattress"></div>
  </div>
  <div class="man">
    <div class="foot"></div>
    <div class="head">
      <div class="face"></div>
      <div class="hair"></div>
    </div>
    <div class="man-body"></div>
    <div class="arm"></div>
  </div>
</div>
 
<script src="https://use.fontawesome.com/releases/v5.0.7/js/all.js"></script>

    ');
}
}
}


add_action("manage_posts_custom_column",  "poster_custom_columns");
add_filter("manage_edit-post_columns", "poster_edit_columns");
function poster_edit_columns($columns){
    $columns['poster'] = 'Poster';
    return $columns; 
}
function poster_custom_columns($column){
    if ( $column === 'poster') {
		global $post;	  
		echo get_the_post_thumbnail( get_the_ID(), array(50, 50) );
    } 
}
 