<?php
/**
 * @package WordPress
 * @subpackage Campoal
 */
global $post;

$post_date = get_the_date();
$post_comment_count = get_comments_number();
$author_id = $post->post_author;
$author_name = get_the_author_meta( 'display_name', $author_id );
$author_link = get_author_posts_url( $author_id );
?>

<div class="post-sub-title sub header">
    <?php echo esc_html__('Written by', 'campoal') . ' '; ?>
    <a href="<?php echo esc_url($author_link); ?>" data-bjax>
        <?php echo esc_html($author_name); ?>
    </a>
    <?php echo ' — ' . esc_html($post_date); ?>
    <?php if (!empty($post_comment_count)) : ?>
        <?php echo ' — ' . sprintf( _n('%s comment', '%s comments', $post_comment_count, 'campoal'), conikal_format_number('%!,0i', $post_comment_count, true) ) ?>
    <?php endif; ?>
    <?php edit_post_link( __( 'Edit', 'campoal' ), '<span class="edit-link ui basic label">', '</span>' ); ?>
</div>