<?php
global $wpdb, $post, $opt_themes; 
?> 
<div class="editor-item-baru ">
	<a class="position-relative archive-post--remove app-container-baru" href="<?php the_permalink() ?>" title="<?php the_title(); ?>">
	<div class="flex-shrink-0">
	<img width="65" height="65" src="<?php if (get_the_post_thumbnail( get_the_ID() )) { echo wp_get_attachment_image_src( get_post_thumbnail_id( get_the_ID() ), 'full' )[0]; } elseif(get_post_meta( get_the_ID(), 'wp_poster_GP', true )) { echo get_post_meta( get_the_ID(), 'wp_poster_GP', true ); } else { echo $opt_themes['no_img']['url']; } ?>" class="rounded app-logo-baru" alt="<?php the_title(); ?>" > 
	</div>        
	<div class="app-info-baru">
	<h3 class="h5 font-weight-semibold w-100 app-title-baru "> <?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(); } ?></h3>
	 
	<div class="text-truncate text-muted app-desc-baru">
	<span class="clamp-1 w-100"> 
	<?php if (get_post_meta( get_the_ID(), 'wp_mods', true )) { ?>
	<?php echo trim(strip_tags(limit_words(get_post_meta( get_the_ID(), 'wp_mods', true ), '3'))) ?> 
	<?php } else { ?>	
	<?php
	$i = 0;
	foreach((get_the_category()) as $cat) {
	echo ''.$cat->cat_name.'';
	if (++$i == 1) break;
	}
	?>
	<?php } ?>	
	</span>
	</div>
	 
	</div>
	<div class="app-get-baru">
	<span class="get-button-baru"><?php _e($opt_themes['mdr_text_get'], TEXT_DOMAIN); ?></span>
	<?php if(get_post_meta( get_the_ID(), 'wp_version_GP', true )){?>
	<span class="app-version-baru meta-color text-truncate">
	<svg class="mr-1" xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="currentColor" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M1 8a7 7 0 1 0 14 0A7 7 0 0 0 1 8zm15 0A8 8 0 1 1 0 8a8 8 0 0 1 16 0zm-7.5 3.5a.5.5 0 0 1-1 0V5.707L5.354 7.854a.5.5 0 1 1-.708-.708l3-3a.5.5 0 0 1 .708 0l3 3a.5.5 0 0 1-.708.708L8.5 5.707V11.5z"></path></svg> <?php echo trim(get_post_meta( get_the_ID(), 'wp_version_GP', true )); ?></span>
	<?php } ?>
	</div>
	</a>
	<div class="app-preview-baru">
	<a href="<?php the_permalink() ?>" class="app-preview-baru-link" title="<?php the_title();  ?>">
	<img class="preview-img-1" src="<?php if(get_post_meta( get_the_ID(), 'background_images', true)){ echo wp_get_attachment_image_src(get_post_meta( get_the_ID(), 'background_images', true),'full')[0]; } elseif(get_post_meta( get_the_ID(), 'wp_backgrounds_GP', true )){ echo get_post_meta( get_the_ID(), 'wp_backgrounds_GP', true ); } elseif(get_post_meta( get_the_ID(), 'wp_images_GP', true )){ echo get_post_meta( get_the_ID(), 'wp_images_GP', true )[mt_rand(0, 3)]; } else { echo $opt_themes['no_img']['url']; } ?>" alt="<?php the_title(); ?>" width="350" height="194">
	</a>
	<p><?php echo trim(strip_tags(limit_words(get_the_content(), '15'))); ?></p>
	</div>
</div>