comment_author_link(); ?> </span> <small class="comment-meta"> <?php printf('<a href="#comment-%1$s" title="%2$s">%3$s</a>', get_comment_ID(), function_exists('time_since') ? sprintf(__('%s ago.', 'k2_domain'), time_since(abs(strtotime($comment->comment_date_gmt . " GMT")), time())) : __('Permanent Link to this Guestbook Entry', 'k2_domain'), sprintf(__('%1$s at %2$s', 'k2_domain'), get_comment_date(__('M jS, Y', 'k2_domain')), get_comment_time())); ?> <?php if (function_exists('quoter_comment')) { quoter_comment(); } ?> <?php if (function_exists('jal_edit_comment_link')) { jal_edit_comment_link(__('Edit', 'k2_domain'), '<span class="comment-edit">', '</span>', '<em>(Editing)</em>'); } else { edit_comment_link(__('Edit', 'k2_domain'), '<span class="comment-edit">', '</span>'); } ?> </small> <div class="comment-content"> <?php comment_text(); ?> </div> <?php if ('0' == $comment->comment_approved) {
/** * Displays current comment * * @since 1.0 * * @param object $comment Comment data object. * @param array $args * @param int $depth Depth of comment in reference to parents. */ function k2_comment_start_el($comment, $args = array(), $depth = 1) { $GLOBALS['comment'] = $comment; extract($args, EXTR_SKIP); ?> <li id="comment-<?php comment_ID(); ?> "> <div <?php comment_class(); ?> > <div class="comment-head"> <?php if (get_option('show_avatars')) { ?> <span class="gravatar"> <?php echo get_avatar($comment, 32); ?> </span> <?php } ?> <span class="comment-author"><?php comment_author_link(); ?> </span> <div class="comment-meta"> <a href="#comment-<?php comment_ID(); ?> " title="<?php _e('Permanent Link to this Comment', 'unwakeable'); ?> "> <?php if (function_exists('time_since')) { printf(__('%s ago.', 'unwakeable'), time_since(abs(strtotime($comment->comment_date_gmt . ' GMT')), time())); } else { printf(__('%1$s at %2$s', 'unwakeable'), get_comment_date(), get_comment_time()); } ?> </a> </div><!-- .comment-meta --> </div><!-- .comment-head --> <div class="comment-content"> <?php if (!$comment->comment_approved) { ?> <p class="comment-moderation alert"><?php _e('Your comment is awaiting moderation.', 'unwakeable'); ?> </p> <?php } ?> <?php comment_text(); ?> </div><!-- .comment-content --> <div class="buttons"> <?php if (function_exists('quoter_comment')) { quoter_comment(); } ?> <?php if (function_exists('jal_edit_comment_link')) { jal_edit_comment_link(__('Edit', 'unwakeable'), '<span class="comment-edit">', '</span>', '<em>(Editing)</em>'); } else { edit_comment_link(__('Edit', 'unwakeable'), '<span class="comment-edit">', '</span>'); } ?> <?php if (function_exists('comment_reply_link')) { ?> <div id="comment-reply-<?php comment_ID(); ?> " class="comment-reply"> <?php comment_reply_link(array_merge($args, array('add_below' => 'comment-reply', 'depth' => $depth, 'max_depth' => $args['max_depth']))); ?> </div> <?php } ?> </div><!-- .buttons --> </div><!-- comment --> <?php }
function k2_comment_type_switch($comment, $args, $depth = 1) { $GLOBALS['comment'] = $comment; switch ($comment->comment_type) { case '': ?> <li id="comment-<?php comment_ID(); ?> "> <div <?php comment_class(); ?> > <div class="comment-head"> <?php if (get_option('show_avatars')) { ?> <span class="gravatar"><?php echo get_avatar($comment, 32); ?> </span> <?php } ?> <span class="comment-author"><?php comment_author_link(); ?> </span> <div class="comment-meta"> <a href="<?php echo esc_url(get_comment_link($comment->comment_ID)); ?> " title="<?php _e('Permalink to this Comment', 'k2'); ?> "> <?php if (function_exists('time_since')) { printf(__('%s ago.', 'k2'), time_since(abs(strtotime($comment->comment_date_gmt . ' GMT')), time())); } else { /* translators: 1: comment date, 2: comment time */ printf(__('%1$s at %2$s', 'k2'), get_comment_date(), get_comment_time()); } ?> </a> </div> <!-- .comment-meta --> </div> <!-- .comment-head --> <div class="comment-content"> <?php if ($comment->comment_approved == '0') { ?> <p class="comment-moderation alert"><?php _e('Your comment is awaiting moderation.', 'k2'); ?> </p> <?php } ?> <?php comment_text(); ?> </div> <!-- .comment-content --> <div class="buttons"> <?php if (function_exists('quoter_comment')) { quoter_comment(); } ?> <?php if (function_exists('jal_edit_comment_link')) { jal_edit_comment_link(__('Edit', 'k2'), '<span class="comment-edit">', '</span>', '<em>(Editing)</em>'); } else { edit_comment_link(__('Edit', 'k2'), '<span class="comment-edit">', '</span>'); } ?> <div id="comment-reply-<?php comment_ID(); ?> " class="comment-reply"> <?php comment_reply_link(array_merge($args, array('add_below' => 'comment-reply', 'depth' => $depth, 'max_depth' => $args['max_depth']))); ?> </div> <!-- .comment-reply --> </div> <!-- .buttons --> </div> <!-- .comment --> <?php break; case 'pingback': case 'trackback': ?> <li id="comment-<?php comment_ID(); ?> "> <div <?php comment_class(); ?> > <?php if (function_exists('comment_favicon')) { ?> <span class="favatar"><?php comment_favicon(); ?> </span> <?php } ?> <span class="comment-author"><?php comment_author_link(); ?> </span> <div class="comment-meta"> <?php /* translators: 1: comment type (Pingback or Trackback), 2: datetime */ printf(__('%1$s on %2$s', 'k2'), $comment->comment_type == 'pingback' ? '<span class="pingback">' . __('Pingback', 'k2') . '</span>' : '<span class="trackback">' . __('Trackback', 'k2') . '</span>', sprintf('<a href="%1$s" title="%2$s">%3$s</a>', esc_url(get_comment_link($comment->comment_ID)), function_exists('time_since') ? sprintf(esc_attr__('%s ago.', 'k2'), time_since(abs(strtotime($comment->comment_date_gmt . " GMT")), time())) : esc_attr__('Permalink to this Comment', 'k2'), sprintf(__('%1$s at %2$s', 'k2'), get_comment_date(__('M jS, Y', 'k2')), get_comment_time()))); edit_comment_link(__('Edit', 'k2'), '<span class="comment-edit">', '</span>'); ?> </div> <!-- .comment-meta --> </div> <!-- .comment --> <?php break; } }