/** * Custom callback function to list comments in the Distilled style. * * If you want to use your own comments callback for wp_list_comments, filter list_comments_arg * * @param object $comment * @param array $args * @param int $depth */ function seamless_comments($comment, $args, $depth) { $GLOBALS['comment'] = $comment; $GLOBALS['comment_depth'] = $depth; ?> <li id="comment-<?php comment_ID(); ?> " <?php comment_class(); ?> > <?php // action hook for inserting content above #comment seamless_abovecomment(); ?> <article id="comment-body-<?php comment_ID(); ?> " class="comment-body"> <footer class="comment-utility"> <div class="comment-author vcard"><?php seamless_commenter_link(); ?> </div><!-- .comment-author --> <?php seamless_commentmeta(true); ?> <?php if ($comment->comment_approved == '0') { echo "\t\t\t\t\t" . '<span class="unapproved">'; _e('Your comment is awaiting moderation', 'seamless'); echo ".</span>\n"; } ?> </footer><!-- .comment-utility --> <div class="comment-content"> <?php comment_text(); ?> </div><!-- .comment-content --> <?php // echo the comment reply link with help from Justin Tadlock http://justintadlock.com/ and Will Norris http://willnorris.com/ if ($args['type'] == 'all' || get_comment_type() == 'comment') { comment_reply_link(array_merge($args, array('add_below' => 'comment-body', 'reply_text' => __('Reply', 'seamless'), 'login_text' => __('Log in to reply.', 'seamless'), 'depth' => $depth, 'before' => '<div class="comment-replylink">', 'after' => '</div>'))); } ?> </article><!-- .comment-body --> <?php // action hook for inserting content above #comment seamless_belowcomment(); ?> <?php }
function test_seamless_commentmeta() { $this->expectOutputRegex('/<time/', seamless_commentmeta()); }