<?php
if ( ! defined( 'ABSPATH' ) ) { exit; } // Exit if accessed directly

$article_cls = 'post-wrapper';
$article_category = get_the_category();
if(!empty($article_category)) {
    $article_cls .= ' term-id-' . $article_category[0]->term_id;
}
?>
<article class="<?php echo esc_attr($article_cls); ?>">
    <span class="bullet"></span>
    <?php
    if ($settings['show_date']) {
        ?>
        <span class="date">
            <?php
            if ($settings['human_diff_time'] == 'yes') {
                printf( esc_html__( '%s ago', 'newsfy' ), human_time_diff( get_the_time('U'), current_time('timestamp') ) );
            } else {
                echo get_the_date();
            }

            if ($settings['show_time']) : ?>
                <span class="time">
                <?php echo ' - ' . get_the_time(); ?>
                </span>
            <?php endif; ?>
        </span>
        <?php
    }
    ?>
    <?php $this->render_title(); ?>
</article>