<?php 
defined('ABSPATH') || die();
$target = $_POST["id"]; 
if(! is_numeric($target)) die();
GOV_cache::fragment_cache("tooltip_cache_{$target}", 3600 * 24 * 30, function() use ($target){ ?>
	<div class="ingfo">
		<div class="iftitle">
			<?php echo get_the_title($target); ?>
		</div>
		<div class="minginfo">
			<?php $score = get_post_meta( $target, 'ero_score', true ); if($score) { ?>
			<span class="l"><i class="fa fa-star" aria-hidden="true"></i> <?php echo $score; ?></span>
			<?php } ?>
			<?php $rdate = get_post_meta( $target, 'ero_date', true ); if($rdate){ ?>
			<span class="l"><?php echo $rdate; ?></span>
			<?php } ?>
			<?php $status = get_post_meta( $target, 'ero_status', true ); if($status){ ?>
			<span class="r <?php echo $status; ?>"><?php rwmb_the_value('ero_status','',$target); ?></span>
			<?php } ?>
		</div>
		<div class="ingdesc">
			<div class="contexcerpt"><?php echo get_the_excerpt($target); ?></div>
		</div>
		<div class="linginfo">
			<?php echo get_the_term_list( $target, 'writer', '<span><b>'. GOV_lang::get('series_info_writer_label').':</b> ', ', ', '</span>' ); ?>
			<?php $genre = ts_tax_cut($target,'2','genre'); if($genre){ echo '<span><b>'. GOV_lang::get('series_info_genres_label').':</b> '.$genre.'</span>'; } ?>
			<?php echo get_the_term_list( $target, 'type', '<span><b>'. GOV_lang::get('series_info_type_label').':</b> ', ', ', '</span>' ); ?>
		</div>
		<div class="bungton">
			<a href="<?php echo get_permalink($target); ?>">
				<i class="fas fa-info-circle"></i> <?php echo GOV_lang::get('tooltip_more');?>
			</a>
		</div>
	</div>
<?php }); ?>