presscodes/maera

View on GitHub
views/content-single-entry-meta.twig

Summary

Maintainability
Test Coverage
<div class="entry-meta">
    {% if function('get_the_time', 'U', post) is same as(post.get_modified_time('U')) %}
        <time class="entry-date published" datetime="{{ post.date('c') }}">
            <span itemprop="datePublished">{{ post.date }}</span>
        </time>
    {% else %}
        <time class="updated" datetime="{{ post.modified_date('c') }}">
            <span itemprop="datePublished">{{ post.modified_date }}</span>
        </time>
    {% endif %}
    {{ fn( 'esc_html__', 'under', 'maera' ) }}
    {% for category in post.get_categories %}
        <a href="{{ fn( 'esc_url', category.get_path ) }}" itemprop="articleSection">{{ category.name }}{% if not loop.last %}, {% endif %}</a>
    {% endfor %}
    <span class="byline">{{ fn( 'esc_html__', 'by', 'maera' ) }} <span class="author vcard"><a class="url fn n" href="{{ post.author.link }}">{{ post.author.name }}</a></span></span>
    {% if post.comments %}{{ fn( 'esc_html__', 'with', 'maera' ) }} <a href="{{ fn( 'esc_url', post.link ) }}#comments">{{ post.comment_count }} {{ fn( 'esc_html__', 'comments', 'maera' ) }}</a>{% endif %}
</div>