<?php
/**
 * Trendy post list item
 *
 * @package Multi
 */

?>
<?php
$multimagazine_args         = wp_parse_args( $args );
$multimagazine_post_classes = 'post-list-item post-trendy col ' . $multimagazine_args['classes'];
if ( is_sticky( get_the_id() ) ) {
	$multimagazine_post_classes .= ' sticky';
}
if ( ! has_post_thumbnail() ) {
	$multimagazine_post_classes .= ' no-image';
}

$multimagazine_post_title = trim( get_the_title() );
$multimagazine_title_html = '<span class="word">' . str_replace( ' ', '</span><span class="word">', $multimagazine_post_title ) . '</span>';
?>
<article <?php post_class( $multimagazine_post_classes ); ?>>
	<div class="inside">
		<div class="post-overlay"></div>
		<h2 class="post-title"><a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php multimagazine_the_title(); ?></a> <?php edit_post_link( esc_html__( 'Edit', 'multimagazine' ), '', '' ); ?></h2>
		<?php if ( has_post_thumbnail() ) : ?>
			<a href="<?php the_permalink(); ?>" class="post-thumbnail"><span class="img-border"><?php the_post_thumbnail( $multimagazine_args['thumbnail-size'] ); ?></span></a>
		<?php else : ?>
			<a href="<?php the_permalink(); ?>" class="post-thumbnail"></a>
		<?php endif; ?>
		<div class="post-links">
		<?php if ( 'off' !== $multimagazine_args['show_cats'] && 0 !== count( get_the_category() ) ) : ?>
			<p class="post-categories"><?php the_category( ' ' ); ?></p>
		<?php endif; ?>
		<?php
		if ( comments_open() ) {
			comments_popup_link( '0', '1', '%', 'comment-link' );
		}
		do_action( 'multimagazine_post_links' );
		?>
		</div>

	</div>
</article>
