protected function comment($comment, $depth, $args) { // each comment markup, without </li>! $classes = implode(' ', get_comment_class()) . ($comment->comment_author_email == get_the_author_meta('email') ? ' author-comment' : ''); // get typical wp comment classes and if comment belong post autor add "author-comment" class echo '<li id="li-comment-' . get_comment_ID() . '" class="' . $classes . '">' . "\n"; // parent tag with classes and uniq id echo '<div id="comment-' . get_comment_ID() . '">' . "\n"; // anchor element with this id need to anchor links on comments works echo get_avatar($comment, 64) . "\n"; // show avatar with size 64x64 px echo '<p class="meta">Posted by: ' . get_comment_author() . "\n"; // comment autor name echo ' ' . get_comment_author_email(); // comment autor email echo ' ' . get_comment_author_url(); // comment autor url echo ' On ' . get_comment_date('F j, Y') . ' at ' . get_comment_time() . '</p>' . "\n"; // date and time of comment creating if ('0' == $comment->comment_approved) { echo '<em class="comment-awaiting-moderation">Your comment is awaiting moderation</em>' . "\n"; } // if comment is not approved notify of it comment_text() . "\n"; // display comment text $reply_link_args = array('depth' => $depth, 'reply_text' => 'Reply on it', 'login_text' => 'You must be logged to post comments'); echo get_comment_reply_link(array_merge($args, $reply_link_args)); // display reply link echo '</div>' . "\n"; // anchor element end }
function commentlist($comment, $args, $depth) { $GLOBALS['comment'] = $comment; ?> <li id="li-comment-<?php comment_ID(); ?> "> <div id="comment-<?php comment_ID(); ?> " <?php comment_class('comment_item clear'); ?> > <div class="comment_meta">Posted on <?php printf(__('%1$s'), get_comment_date()); ?> by <?php printf(__('<cite class="fn">%s</cite>'), get_comment_author_link()); ?> </div> <div class="comment_text"><?php comment_text(); ?> </div> </div> <?php }
protected function comment($comment, $depth, $args) { // разметка каждого комментария, без закрывающего </li>! $classes = implode(' ', get_comment_class()) . ($comment->comment_author_email == get_the_author_meta('email') ? ' author-comment' : ''); // берем стандартные классы комментария и если коммент пренадлежит автору поста добавляем класс author-comment echo '<li id="li-comment-' . get_comment_ID() . '" class="' . $classes . '">' . "\n"; // родительский тэг комментария с классами выше и уникальным id echo '<div id="comment-' . get_comment_ID() . '">' . "\n"; // элемент с таким id нужен для якорных ссылок на коммент echo get_avatar($comment, 64) . "\n"; // покажем аватар с размером 64х64 echo '<p class="meta">Автор: ' . get_comment_author() . "\n"; // имя автора коммента //echo ' '.get_comment_author_email(); // email автора коммента echo ' ' . get_comment_author_url(); // url автора коммента echo ' <br>Добавлено ' . get_comment_date('F j, Y') . ' в ' . get_comment_time() . "\n"; // дата и время комментирования if ('0' == $comment->comment_approved) { echo '<em class="comment-awaiting-moderation">Ваш комментарий будет опубликован после проверки модератором.</em>' . "\n"; } // если комментарий должен пройти проверку comment_text() . "\n"; // текст коммента $reply_link_args = array('depth' => $depth, 'reply_text' => 'Ответить', 'login_text' => 'Вы должны быть залогинены'); echo get_comment_reply_link(array_merge($args, $reply_link_args)); // выводим ссылку ответить echo '</div>' . "\n"; // закрываем див }
function edu7_comment($comment, $args, $depth) { ?> <div class="comment-img"><?php echo get_avatar($comment, $size = '45'); ?> </div> <div class="comments-box"> <?php comment_text(); ?> <?php if ($comment->comment_approved == '0') { ?> <em><?php _e('Your comment is awaiting moderation.'); ?> </em> <?php } ?> <br/><span class="comment-writer"> توسط <?php comment_author(); ?> </span><span class="comment-date"><?php comment_date(); ?> - <?php comment_time(); ?> </span> <?php comment_reply_link(array_merge($args, array('before' => '<span class="comment-replay">', 'reply_text' => 'پاسخ', 'after' => '</span>', 'depth' => $depth, 'max_depth' => $args['max_depth']))); ?> </div><br/><?php }
function mytheme_comment($comment, $args, $depth) { $GLOBALS['comment'] = $comment; ?> <li <?php comment_class(); ?> id="li-comment-<?php comment_ID() ?>"> <div id="comment-<?php comment_ID(); ?>"> <div class="comment-author vcard"> <span class="small_frame"><?php echo get_avatar($comment,$size='60',$default=get_template_directory_uri().'/images/gravatar.gif' ); ?></span><br /> <cite><?php comment_author_link() ?></cite><br /> <div class="date"><?php comment_date('M d, Y'); ?></div> </div> <div class="comment-text"> <?php if ($comment->comment_approved == '0') : ?> <em class="awaiting_moderation"><?php _e('Your comment is awaiting moderation.', 'epanel') ?></em> <br /> <?php endif; ?> <?php comment_text() ?> <div class="comment-meta commentmetadata"> <?php edit_comment_link(__('(edit)'),' ','') ?> </div> <div class="reply"> <?php comment_reply_link(array_merge( $args, array('reply_text' => '(reply)', 'depth' => $depth, 'max_depth' => $args['max_depth']))) ?> </div> </div> </div> <?php } ?>
function as_function_comments_better($comment, $args, $depth) { $GLOBALS['comment'] = $comment; ?> <li <?php comment_class(); ?> id="as-li-comment-<?php comment_ID(); ?> "> <div class="as-comment" id="as-comment-<?php comment_ID(); ?> "> <div class="as-comment-content"> <?php echo get_avatar($comment, $size = '65'); ?> <div class="as-comment-meta"> <h4><?php comment_author_link(); ?> <span><?php comment_date(); ?> at <?php comment_time(); ?> </span> </h4> </div> <div class="as-comment-text"> <?php comment_text(); ?> <?php if ($comment->comment_approved == '0') { ?> <p style="font-style:italic;"><?php _e('Your comment is awaiting moderation.', AS_DOMAIN); ?> </p> <br /> <?php } ?> <?php edit_comment_link(__('[Edit]', AS_DOMAIN), ' ', ''); ?> <?php comment_reply_link(array_merge($args, array('depth' => $depth, 'max_depth' => $args['max_depth']))); ?> </div> </div> </div> <?php }
function et_custom_comments_display($comment, $args, $depth) { $GLOBALS['comment'] = $comment; ?> <li <?php comment_class(); ?> id="li-comment-<?php comment_ID(); ?> "> <div id="comment-<?php comment_ID(); ?> " class="comment-body clearfix"> <div class="avatar-container"> <?php echo get_avatar($comment, $size = '56'); ?> <span class="avatar-overlay"></span> </div> <!-- end .avatar--> <div class="comment-wrap clearfix"> <div class="comment-meta commentmetadata"><?php printf('<span class="fn">%s</span>', get_comment_author_link()); ?> - <span class="comment-date"><?php echo get_comment_date(); ?> </span> <?php edit_comment_link(esc_html__('(Edit)', 'Modest'), ' ', ''); ?> </div> <?php if ($comment->comment_approved == '0') { ?> <em class="moderation"><?php esc_html_e('Your comment is awaiting moderation.', 'Modest'); ?> </em> <br /> <?php } ?> <div class="comment-content"><?php comment_text(); ?> </div> <!-- end comment-content--> <?php $et_comment_reply_link = get_comment_reply_link(array_merge($args, array('reply_text' => esc_attr__('Reply', 'Modest'), 'depth' => $depth, 'max_depth' => $args['max_depth']))); if ($et_comment_reply_link) { echo '<div class="reply-container">' . $et_comment_reply_link . '</div>'; } ?> </div> <!-- end comment-wrap--> </div> <!-- end comment-body--> <?php }
function sun_comment($comment, $args, $depth) { $GLOBALS['comment'] = $comment; ?> <li class="comment" id="li-comment-<?php comment_ID(); ?> "> <div> <?php echo get_avatar($comment, $size = '60'); ?> <div class="comment-meta"> <span class="author"><?php echo get_comment_author_link(); ?> </span> <span class="date">on <?php echo get_comment_date() . ' ' . get_comment_time(); ?> </span> <span class="reply"><?php comment_reply_link(array_merge($args, array('depth' => $depth, 'max_depth' => $args['max_depth']))); ?> </span> </div> <div class="comment-body"> <?php comment_text(); ?> </div> <?php }
function stormbringer_comments($comment, $args, $depth) { $GLOBALS['comment'] = $comment; ?> <li <?php comment_class('media'); ?>> <div class="pull-left"> <div class="comment-avatar vcard"> <?php echo get_avatar($comment,apply_filters('stormbringer_author_bio_avatar_size', 100) ); ?> </div> </div> <!-- /.comment-avatar --> <div class="media-body"> <div class="comment-message"> <?php printf(__('<h4 class="media-heading">%s</h4>','stormbringer'), get_comment_author_link()) ?> <?php edit_comment_link(__('Edit','stormbringer'),'<span class="edit-comment btn btn-info"><span class="glyphicon glyphicon-pencil"></span>','</span>') ?> <?php if ($comment->comment_approved == '0') : ?> <div class="alert-message success"> <p><?php _e('Your comment is awaiting moderation.','stormbringer') ?></p> </div> <?php endif; ?> <?php comment_text() ?> <time datetime="<?php echo comment_time('c'); ?>"><a href="<?php echo htmlspecialchars( get_comment_link( $comment->comment_ID ) ) ?>"><?php comment_time(esc_attr__( 'F j, Y', 'stormbringer' )); ?> <?php _e('at', 'stormbringer'); ?> <?php comment_time(esc_attr__( 'H:i', 'stormbringer' )); ?> </a></time> </div> </div> <!-- /.comment-message --> <!-- </li> is added by wordpress automatically --> <?php }
function my_custom_comments($comment, $args, $depth) { $GLOBALS['comment'] = $comment; ?> <li <?php comment_class(); ?> id="li-comment-<?php comment_ID(); ?> "> <?php if ($comment->comment_approved == '0') { ?> <em><?php _e('Your comment is awaiting moderation.'); ?> </em> <?php } ?> <?php echo '<div class="pull-left"><div class="commentor-avatar" style="height: 90px; width: 90px; background: url(' . get_avatar_url($comment) . ') no-repeat center center; background-size: cover;"><div class="commentor-name">' . get_comment_author() . '</div></div></div>'; comment_text(); echo '<div class="clearfix"></div>'; }
<?php function studiofolio_comment($comment, $args, $depth) { $GLOBALS['comment'] = $comment; ?> <li <?php comment_class(); ?>> <article id="comment-<?php comment_ID(); ?>"> <header class="comment-author vcard"> <?php echo get_avatar($comment, $size = '32'); ?> <?php printf(__('<cite class="fn">%s</cite>', 'studiofolio'), get_comment_author_link()); ?> <time datetime="<?php echo comment_date('c'); ?>"><a href="<?php echo htmlspecialchars(get_comment_link($comment->comment_ID)); ?>"><?php printf(__('%1$s', 'studiofolio'), get_comment_date(), get_comment_time()); ?></a></time> <?php edit_comment_link(__('(Edit)', 'studiofolio'), '', ''); ?> </header> <?php if ($comment->comment_approved == '0') : ?> <div class="alert alert-block fade in"> <a class="close" data-dismiss="alert">×</a> <p><?php _e('Your comment is awaiting moderation.', 'studiofolio'); ?></p> </div> <?php endif; ?> <section class="comment"> <?php comment_text() ?> </section> <?php comment_reply_link(array_merge($args, array('depth' => $depth, 'max_depth' => $args['max_depth']))); ?> </article> <?php } ?>
function mydesign($comment, $args, $depth) { $GLOBALS['comment'] = $comment; ?> <li class="compost" id="comment-<?php comment_ID(); ?> "> <div class="combody"> <?php comment_text(); ?> </div><!-- .combody --> <p class="cominfo"> by <?php comment_author_link(); ?> <?php comment_date(); ?> <?php comment_time(); ?> </p> </li> <?php }
function mytheme_comment($comment, $args, $depth) { $GLOBALS['comment'] = $comment; ?> <li <?php comment_class(); ?> id="li-comment-<?php comment_ID() ?>"> <div id="comment-<?php comment_ID(); ?>"> <div class="comment-author vcard"> <?php echo get_avatar($comment, $size = '48', $default = '<path_to_url>'); ?> </div> <?php if ($comment->comment_approved == '0') : ?> <em><?php _e('Your comment is awaiting moderation.') ?></em> <br /> <?php endif; ?> <div class="comment-meta commentmetadata"> <p class="comment_autor"> <?php printf(__('%s'), get_comment_author_link()) ?> </p> <p class="comment_date"> <?php printf(__('%1$s - %2$s'), get_comment_date('M j, Y'), get_comment_time()) ?> </p> </div> <div class="comment_contet"> <?php comment_text() ?> <?php edit_comment_link('editar', '<div class="editar reply">', '</div>'); ?> </div> </div> </li> <?php }
function jrd_comment($comment, $args, $depth) { $GLOBALS['comment'] = $comment; //print_r($comment); /* Check if post is by Author for special styling */ $isByAuthor = false; if ($comment->comment_author_email == get_the_author_meta('email')) { $isByAuthor = true; } ?> <li class="clearfix"> <div class="author"> <h6><?php echo $comment->comment_author; ?> </h6> <p class="timestamp"><?php printf(__('%1$s at %2$s'), get_comment_date('n/j/Y'), get_comment_time('g:ia')); ?> </p> </div> <div class="commenttext"> <?php comment_text(); ?> </div> </li> <?php }
function webnus_comments($comment, $args, $depth) { $GLOBALS['comment'] = $comment; ?> <li <?php comment_class(); ?> id="comment-<?php comment_ID(); ?> "> <div class="comment-info"> <?php echo get_avatar($comment, 90); ?> <cite> <?php comment_author_link(); ?> <?php _e('Says', 'WEBNUS_TEXT_DOMAIN'); ?> : <span class="comment-data"><a href="#comment-<?php comment_ID(); ?> " title=""><?php comment_date('F j, Y'); ?> at <?php comment_time('g:i a'); ?> </a><?php edit_comment_link('Edit', ' | ', ''); ?> </span> </cite> </div> <div class="comment-text"> <?php if ($comment->comment_approved == '0') { ?> <p><em><?php _e('Your comment is awaiting moderation.', 'WEBNUS_TEXT_DOMAIN'); ?> </em></p> <?php } ?> <?php comment_text(); ?> <div class="reply"> <?php comment_reply_link(array_merge($args, array('depth' => $depth, 'max_depth' => $args['max_depth']))); ?> </div> </div> <?php }
function ks_comment_content() { global $comment, $ks_settings; ?> <img localsrc="<?php comment_type(68, 112, 112); ?> " alt="" /><?php ks_comment_author_link(); ?> <img localsrc="d001" alt=" @ " /><font color="<?php echo $ks_settings['date_color']; ?> "><?php ks_comment_datetime(); ?> </font> <?php edit_comment_link('<font color="' . $ks_settings['edit_color'] . '">' . __('Edit') . '</font>', '<img localsrc="104" alt="" />'); ?> <br /> <?php if ($comment->comment_approved == '0') { ?> <em><font color="red"><?php _e('Your comment is awaiting moderation.', 'ktai_style'); ?> </font></em><br /> <?php } comment_text(); }
function mytheme_comment($comment, $args, $depth) { $GLOBALS['comment'] = $comment; ?> <li <?php comment_class(); ?> id="li-comment-<?php comment_ID(); ?> "> <div id="comment-<?php comment_ID(); ?> " class="comment-inner"> <figure class="vcard"> <?php echo get_avatar($comment, 70); ?> </figure> <div class="comment-container"> <div class="commentmeta"> <strong><?php comment_author_link(); ?> </strong> <span class="authorname"> <?php comment_date('M d, Y'); ?> - <?php comment_time('h:i A'); ?> <?php edit_comment_link("Edit", ''); ?> </span> </div> <div class="comment-text"> <?php if ($comment->comment_approved == '0') { ?> <em class="awaiting_moderation"><?php _e('Your comment is awaiting moderation.', THB_THEME_NAME); ?> </em> <?php } ?> <?php comment_text(); ?> <?php comment_reply_link(array_merge($args, array('reply_text' => __('Reply', THB_THEME_NAME), 'depth' => $depth, 'max_depth' => $args['max_depth']))); ?> </div> </div> </div> <?php }
function reverie_comments($comment, $args, $depth) { $GLOBALS['comment'] = $comment; ?> <li <?php comment_class(); ?> > <article id="comment-<?php comment_ID(); ?> "> <header class="comment-author vcard"> <?php echo get_avatar($comment, $size = '40'); ?> <?php printf(__('<cite class="fn">%s</cite>', 'reverie'), get_comment_author_link()); ?> <time datetime="<?php echo comment_date('c'); ?> "><a href="<?php echo htmlspecialchars(get_comment_link($comment->comment_ID)); ?> "><?php printf(__('%1$s', 'reverie'), get_comment_date(), get_comment_time()); ?> </a></time> <?php edit_comment_link(__('(Edit)', 'reverie'), '', ''); ?> </header> <?php if ($comment->comment_approved == '0') { ?> <div class="notice"> <p class="bottom"><?php _e('Your comment is awaiting moderation.', 'reverie'); ?> </p> </div> <?php } ?> <section class="comment"> <?php comment_text(); ?> </section> <?php comment_reply_link(array_merge($args, array('depth' => $depth, 'max_depth' => $args['max_depth']))); ?> </article> <?php }
function mytheme_comment($comment, $args, $depth) { $GLOBALS['comment'] = $comment; ?> <li <?php comment_class(); ?> id="li-comment-<?php comment_ID(); ?> "> <div id="comment-<?php comment_ID(); ?> "> <div class="comment-author vcard"> <?php echo get_avatar($comment, $size = '40'); ?> <?php /* printf(__('<cite class="fn">%s</cite> <span class="says">says:</span>'), get_comment_author_link()) */ ?> <cite class="fn"><?php comment_author_link(); ?> </cite> <span class="comment-meta commentmetadata"><a href="<?php echo htmlspecialchars(get_comment_link($comment->comment_ID)); ?> "><?php printf(__('%1$s at %2$s'), get_comment_date(), get_comment_time()); ?> </a><?php edit_comment_link(__('(Edit)'), ' ', ''); ?> </span> </div> <?php if ($comment->comment_approved == '0') { ?> <em class="approved"><?php _e('Your comment is awaiting moderation.'); ?> </em> <br /> <?php } ?> <?php comment_text(); ?> <div class="reply"> <?php comment_reply_link(array_merge($args, array('depth' => $depth, 'max_depth' => $args['max_depth']))); ?> </div> </div> <?php }
function format_comment($comment, $args, $depth) { echo '<div '; comment_class(); echo ' id="li-comment-'; comment_ID(); echo '"> <div class="row-fluid"> <div class="span9"> <p>'; comment_text(); echo '</p> </div> <div class="span3">'; echo get_avatar($comment->comment_author_email, 60); echo '<h6> <a href="'; comment_author_url(); echo '">'; comment_author(); echo '</a> </h6> <small>'; printf(__('%1$s', DOMAIN), get_comment_date(), get_comment_time()); echo '</small> </div> </div> </div>'; }
function garland_comment($comment, $args, $depth) { $GLOBALS['comment'] = $comment; extract($args, EXTR_SKIP); ?> <li <?php comment_class(empty($args['has_children']) ? '' : 'parent'); ?> id="comment-<?php comment_ID(); ?> "> <div id="div-comment-<?php comment_ID(); ?> "> <span class="comment-author vcard"> <?php if ($args['avatar_size'] != 0) { echo get_avatar($comment, $args['avatar_size']); } ?> <?php printf(__('<cite class="fn">%s</cite> Says:', 'kubrick'), get_comment_author_link()); ?> </span> <?php if ($comment->comment_approved == '0') { ?> <em><?php _e('Your comment is awaiting moderation.', 'kubrick'); ?> </em> <?php } ?> <br /> <small class="comment-meta commentmetadata"><a href="#comment-<?php comment_ID(); ?> " title=""><?php printf(__('%1$s at %2$s', 'kubrick'), get_comment_date(), get_comment_time()); ?> </a> <?php edit_comment_link(__('edit', 'kubrick'), ' ', ''); ?> </small> <?php comment_text(); ?> <div class="reply"> <?php comment_reply_link(array_merge($args, array('add_below' => 'div-comment', 'depth' => $depth, 'max_depth' => $args['max_depth']))); ?> </div> </div> <?php }
/** * Template callback for GeoMashupQuery::list_comments() * * Use the newer form of template, where the individual comment template goes in * a function that matches the callback argument to list_comments * * @since 1.3 * @access public * @package GeoMashup * * @param object $comment The comment to display * @param array $args Arguments from wp_list_comments * @param mixed $depth Nested depth */ function geo_mashup_comment_default($comment, $args, $depth) { // Enable the WordPress comment functions GeoMashupQuery::set_the_comment($comment); // From here to the closing curly brace should look like a familiar template ?> <div id="div-comment-<?php comment_ID(); ?> " class="<?php comment_class(''); ?> "> <div class="comment-author vcard"> <?php printf(__('<cite class="fn">%s</cite> <span class="says">says:</span>'), get_comment_author_link()); ?> </div> <div class="comment-meta commentmetadata"> <a href="<?php echo esc_html(get_comment_link($comment->comment_ID)); ?> "><?php printf(__('%1$s at %2$s'), get_comment_date(), get_comment_time()); ?> </a> </div> <?php comment_text(); ?> </div> <?php }
function jhfn_comment($comment, $args, $depth) { $GLOBALS['comment'] = $comment; //print_r($comment); /* Check if post is by Author for special styling */ $isByAuthor = false; if ($comment->comment_author_email == get_the_author_meta('email')) { $isByAuthor = true; } ?> <li> <h4><span><?php echo $comment->comment_author; ?> </span> wrote:</h4> <?php comment_text(); ?> <p class="commentDate"> Written on <?php printf(__('%1$s at %2$s'), get_comment_date('n/j/Y'), get_comment_time('g:ia')); ?> <?php edit_comment_link(__('Edit'), ' ', ''); ?> </p> </li> <?php }
function thematic_pings($comment, $args, $depth) { $GLOBALS['comment'] = $comment; ?> <li id="comment-<?php comment_ID(); ?> " class="<?php thematic_comment_class(); ?> "> <div class="comment-author"><?php printf(__('By %1$s on %2$s at %3$s', 'thematic'), get_comment_author_link(), get_comment_date(), get_comment_time()); edit_comment_link(__('Edit', 'thematic'), ' <span class="meta-sep">|</span> <span class="edit-link">', '</span>'); ?> </div> <?php if ($comment->comment_approved == '0') { _e('\\t\\t\\t\\t\\t<span class="unapproved">Your trackback is awaiting moderation.</span>\\n', 'thematic'); } ?> <div class="comment-content"> <?php comment_text(); ?> </div> <?php }
function secret_comment($comment, $args, $depth) { $GLOBALS['comment'] = $comment; ?> <li class="list-group-item" id="li-comment-<?php comment_ID(); ?> "> <div class="media container"> <div class="media-left"> <?php if (function_exists('get_avatar') && get_option('show_avatars')) { echo get_avatar($comment, 48); } ?> </div> <div class="media-body"> <div class="row" id="comment-<?php comment_ID(); ?> "> <div class="col-md-4"> <?php printf(__('<cite class="author_name">%s</cite>'), get_comment_author_link()); ?> <?php edit_comment_link('修改'); ?> </div> <div class="col-md-4"> 发表于:<?php echo get_comment_time('Y-m-d H:i'); ?> </div> </div> <div class="row"> <div class="col-md-8"> <?php if ($comment->comment_approved == '0') { ?> <em>你的评论正在审核,稍后会显示出来!</em><br /> <?php } ?> <?php comment_text(); ?> </div> </div> </div> <div class="row"> <?php comment_reply_link(array_merge($args, array('reply_text' => '回复', 'depth' => $depth, 'max_depth' => $args['max_depth']))); ?> </div> </div> <?php }
function hui_comment($comment, $args, $depth) { global $commentcount; $GLOBALS['comment'] = $comment; if (!$commentcount) { $page = get_query_var('cpage') - 1; $cpp = get_option('comments_per_page'); $commentcount = $cpp * $page; } ?> <li class="comment-list-entry"> <article> <footer class="comment-info"> <?php echo get_avatar($comment, 36); ?> <span class="comment-author"><?php comment_author_link(); ?> </span> <span class="edit"><?php edit_comment_link('编辑', '', ''); ?> </span> <span class="date">发表于 <time datetime="<?php printf('%1$sT%2$s', get_comment_date('Y-m-d'), get_comment_time('H:i:s')); ?> +00:00"><?php printf('%1$s %2$s', get_comment_date('Y-m-d'), get_comment_time('H:i:s')); ?> </time></span> <span class="floor"><?php if (!($parent_id = $comment->comment_parent)) { printf('%1$s楼', ++$commentcount); } ?> </span> </footer> <div class="comment-content"> <?php if ($comment->comment_approved == '0') { ?> <p>您的<?php echo $comment_title; ?> 正在审核中,请耐心等待,以下是您正在审核中的<?php echo $comment_title; ?> 内容:</p> <?php } ?> <?php comment_text(); ?> </div> </article> <?php }
/** * Custom comments template. * * @package Impact WordPress Theme * @since 1.0 * @author AJ Clarke : http://wpexplorer.com * @copyright Copyright (c) 2012, AJ Clarke * @link http://wpexplorer.com * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html */ function bro_comment($comment, $args, $depth) { $GLOBALS['comment'] = $comment; ?> <li <?php comment_class(); ?> id="li-comment-<?php comment_ID(); ?> "> <div id="comment-<?php comment_ID(); ?> " class="comment-body <?php if ($comment->comment_approved == '0') { echo 'pending-comment'; } ?> bro-cf"> <div class="comment-details"> <?php if (get_avatar($comment)) { ?> <div class="comment-avatar"> <?php echo get_avatar($comment, $size = '50'); ?> </div> <?php } ?> <section class="comment-author vcard"> <?php printf(__('<cite class="author">%s</cite>'), get_comment_author_link()); ?> <span class="comment-date"><a href="<?php echo htmlspecialchars(get_comment_link($comment->comment_ID)); ?> "> · <?php echo get_comment_date(); ?> </a></span> <span class="reply"><?php comment_reply_link(array_merge($args, array('reply_text' => __('Reply', 'bromine'), 'depth' => $depth, 'max_depth' => $args['max_depth']))); ?> </span> </section> <section class="comment-content"> <div class="comment-text"> <?php comment_text(); ?> </div> </section> </div> </div> <?php }
function kindel_comment($comment, $args, $depth) { $GLOBALS['comment'] = $comment; extract($args, EXTR_SKIP); $classes = array('clearfix'); if (!empty($args['has_children'])) { $classes[] = 'parent'; } ?> <div <?php comment_class($classes); ?> id="comment-<?php comment_ID(); ?> " itemscope itemtype="http://schema.org/UserComments"> <div class="comment-author clearfix"> <div class="author-avatar"> <?php if ($args['avatar_size'] != 0) { echo get_avatar($comment, $args['avatar_size']); } ?> </div> <div class="author-meta"> <span class="fn author-name" itemprop="creator"><?php echo get_comment_author_link(); ?> </span> <time itemprop="commentTime" datetime="<?php echo get_comment_time('c'); ?> " class="comment-time"><?php printf(__('%s ago', 'kindel'), human_time_diff(get_comment_time('U'), current_time('timestamp'))); ?> </time> </div> </div> <div class="comment-body" itemprop="commentText"> <?php if ($comment->comment_approved == '0') { ?> <p><em class="comment-awaiting-moderation"><?php _e('Your comment is awaiting moderation.', 'kindel'); ?> </em></p> <?php } else { comment_text(); comment_reply_link(array_merge($args, array('add_below' => 'comment', 'depth' => $depth, 'max_depth' => $args['max_depth']))); } ?> </div> <?php edit_comment_link(__('edit', 'kindel')); ?> <?php }
/** * 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 }
function my_theme_comment($comment, $args, $depth) { $GLOBALS['comment'] = $comment; switch ($comment->comment_type) { default: ?> <li <?php comment_class(); ?> id="comment-<?php comment_ID(); ?> "> <p class="meta-comment"> <?php echo get_avatar($comment, 30); ?> <span class="author-name"><?php comment_author(); ?> </span> <time <?php comment_time('c'); ?> class="comment-time"> <span class="date"> <?php comment_date(); ?> </span> <span class="time"> <?php comment_time(); ?> </span> </time> </p> <div class="comment-content"> <?php comment_text(); ?> </div> <div class="comment-actions"> <div class="reply"><?php comment_reply_link(array_merge($args, array('reply_text' => 'Reply', 'after' => '', 'depth' => $depth, 'max_depth' => $args['max_depth']))); ?> </div><!-- .reply --> </div> <!-- #comment-<?php comment_ID(); ?> --> <?php // End the default styling of comment break; } }