<?php
/**
 * The default template to displaying related posts
 *
 * @package LAW OFFICE
 * @since LAW OFFICE 1.0.54
 */

$law_office_link        = get_permalink();
$law_office_post_format = get_post_format();
$law_office_post_format = empty( $law_office_post_format ) ? 'standard' : str_replace( 'post-format-', '', $law_office_post_format );
?><div id="post-<?php the_ID(); ?>" <?php post_class( 'related_item post_format_' . esc_attr( $law_office_post_format ) ); ?> data-post-id="<?php the_ID(); ?>">
	<?php
	law_office_show_post_featured(
		array(
			'thumb_size' => apply_filters( 'law_office_filter_related_thumb_size', law_office_get_thumb_size( (int) law_office_get_theme_option( 'related_posts' ) == 1 ? 'huge' : 'big' ) ),
		)
	);
	?>
	<div class="post_header entry-header">
		<h6 class="post_title entry-title"><a href="<?php echo esc_url( $law_office_link ); ?>"><?php
			if ( '' == get_the_title() ) {
				esc_html_e( '- No title -', 'law-office' );
			} else {
				the_title();
			}
		?></a></h6>
		<?php
		if ( in_array( get_post_type(), array( 'post', 'attachment' ) ) ) {
			?>
			<span class="post_date"><a href="<?php echo esc_url( $law_office_link ); ?>"><?php echo wp_kses_data( law_office_get_date() ); ?></a></span>
			<?php
		}
		?>
	</div>
</div>
