Esempio n. 1
0
/**
 * Custom Comment Template
 * -----------------------------------------------------------------------------
 * @param   string  $comment    The comment.
 * @param   array   $args       Array argument
 * @param   int     $depth      Depth of the comments thread.
 */
function kaitain_theme_comments($comment, $args, $depth)
{
    $GLOBALS['comment'] = $comment;
    $comment_classes = array('comments__comment', 'vspace--full');
    ?>

    <li <?php 
    comment_class($comment_classes);
    ?>
 id="comments__comment--<?php 
    comment_ID();
    ?>
">
        <div class="comments__photo avatar">
            <?php 
    kaitain_avatar_background_html($comment, 'tc_post_avatar', 'author-photo');
    ?>
        </div>
        <div class="comments__body">
            <header class="comments__header vspace--quarter">
                <h5 class="comments__meta">
                    <span class="comments__author-website"><?php 
    comment_author_link();
    ?>
</span>
                    <?php 
    printf('<span class="%s"><time datetime="%s">%s</time></span>', 'post-date', get_comment_date('Y-M-d H:i'), get_comment_date_strftime());
    ?>
                </h5>
            </header>

            <div class="comments__comment-body vspace--quarter">
                <?php 
    if (!$comment->comment_approved) {
        printf('<p class="%s">%s</p>', 'comments__unapproved', __('Tá do thrácht á mheas.', 'kaitain'));
    } else {
        comment_text();
    }
    ?>
            </div>

            <?php 
    if (is_user_logged_in()) {
        ?>
                <footer class="comments__footer">
                    <h5 class="comments_edit-link">
                        <?php 
        edit_comment_link(__('edit', 'kaitain'), '', '');
        ?>
                    </h5>
                </footer>
            <?php 
    }
    ?>
        </div>
    </li>

    <?php 
}
Esempio n. 2
0
/**
 * Print Comment Date through System Locale
 * -----------------------------------------------------------------------------
 * @param   int/object  $comment       The comment.
 */
function the_comment_date_strftime($comment = null)
{
    printf(get_comment_date_strftime($comment));
}