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 }
<?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 show_comment($comment, $args, $depth) { $GLOBALS['comment'] = $comment; ?> <li <?php comment_class(); ?> > <div class="avatar"> <?php echo get_avatar($comment, 70, $default = 'mystery'); ?> </div> <div class="author"> <?php echo get_comment_author_link(); ?> </div> <div class="comment-meta"> <?php printf('%1$s — %2$s', get_comment_date(), get_comment_time()); ?> </div> <?php comment_text(); ?> <div class="reply"> <?php comment_reply_link(array_merge($args, array('depth' => $depth, 'max_depth' => $args['max_depth']))); ?> </div> </li> <?php }
function widget($args, $instance) { if (!isset($args['widget_id'])) { $args['widget_id'] = $this->id; } $output = ''; $title = !empty($instance['title']) ? $instance['title'] : __('Recent Comments'); $title = apply_filters('widget_title', $title, $instance, $this->id_base); $number = !empty($instance['number']) ? absint($instance['number']) : 5; if (!$number) { $number = 5; } $comments = get_comments(apply_filters('widget_comments_args', array('number' => $number, 'status' => 'approve', 'post_status' => 'publish'))); $output .= $args['before_widget']; if ($title) { $output .= $args['before_title'] . $title . $args['after_title']; } $output .= '<ul id="recentcomments">'; if (is_array($comments) && $comments) { $post_ids = array_unique(wp_list_pluck($comments, 'comment_post_ID')); _prime_post_caches($post_ids, strpos(get_option('permalink_structure'), '%category%'), false); foreach ((array) $comments as $comment) { $title = get_the_title($comment->comment_post_ID); $output .= '<li class="recentcomments"><i class="fa fa-comments"> </i> '; $output .= sprintf(_x('%1$s on %2$s', 'widgets'), '<span class="comment-author-link"><strong> ' . get_comment_author_link($comment) . '</strong></span>', '<br><a href="' . esc_url(get_comment_link($comment)) . '">' . $title . '</a>'); $output .= '</li>'; } } $output .= '</ul>'; $output .= $args['after_widget']; echo $output; }
private function author($comment) { $comment_author = '<p class="comment-author">'; $comment_author .= get_avatar($comment, $size = '48'); $comment_author .= '<cite>' . get_comment_author_link() . '</cite><br>'; return $comment_author; }
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 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 sandbox_ping($comment, $args, $depth) { $GLOBALS['comment'] = $comment; extract($args, EXTR_SKIP); ?> <li <?php comment_class(sandbox_comment_class(false)); ?> id="comment-<?php comment_ID(); ?> "> <div class="comment-metadata"> <?php printf(__('By %1$s on %2$s at %3$s', 'sandbox'), get_comment_author_link(), get_comment_date(), get_comment_time()); ?> <?php edit_comment_link(__('(Edit)', 'sandbox'), ' ', ''); ?> </div> <div class="comment-mod"><?php if ($comment->comment_approved == '0') { _e('<em>Your trackback/pingback is awaiting moderation.</em>', 'sandbox'); } ?> </div> <?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(); ?>"> <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 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 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 }
/** * 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 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 evolve_comment_name() { $commenter = get_comment_author_link(); // Get comentor's details return "<cite class=\"commenter fn n\">{$commenter}</cite>"; // Commentor vcard }
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 }
function p2_get_discussion_links() { $comments = get_comments(array('post_id' => get_the_ID())); $unique_commentors = array(); foreach ($comments as $comment) { if ('1' == $comment->comment_approved) { $unique_commentors[$comment->comment_author_email] = get_avatar($comment, 16) . ' ' . get_comment_author_link($comment->comment_ID); } } $unique_commentors = array_values($unique_commentors); $total_unique_commentors = count($unique_commentors); $content = ''; if (1 == $total_unique_commentors) { $content = sprintf(__('%1$s is discussing.', 'p2'), $unique_commentors[0]); } else { if (2 == $total_unique_commentors) { $content = sprintf(__('%1$s and %2$s are discussing.', 'p2'), $unique_commentors[0], $unique_commentors[1]); } else { if (3 == $total_unique_commentors) { $content = sprintf(__('%1$s, %2$s, and %3$s are discussing.', 'p2'), $unique_commentors[0], $unique_commentors[1], $unique_commentors[2]); } else { if (3 < $total_unique_commentors) { $others = $total_unique_commentors - 3; $content .= sprintf(_n('%1$s, %2$s, %3$s, and %4$d other are discussing.', '%1$s, %2$s, %3$s, and %4$d others are discussing.', $others, 'p2'), $unique_commentors[0], $unique_commentors[1], $unique_commentors[2], $others); } } } } return $content; }
function get_recent_comments($args) { global $wpdb, $comments, $comment; extract($args, EXTR_SKIP); $themePath = get_bloginfo('template_url'); $imageLink = '<h2>Популярные записи</h2>'; $options = get_option('widget_recent_comments'); $title = empty($options['title']) ? __($imageLink) : apply_filters('widget_title', $options['title']); if (!($number = (int) $options['number'])) { $number = 5; } else { if ($number < 1) { $number = 1; } else { if ($number > 15) { $number = 15; } } } if (!($comments = wp_cache_get('recent_comments', 'widget'))) { $comments = $wpdb->get_results("SELECT * FROM {$wpdb->comments} WHERE comment_approved = '1' ORDER BY comment_date_gmt DESC LIMIT {$number}"); wp_cache_add('recent_comments', $comments, 'widget'); } echo $before_widget; echo $before_title . $title . $after_title; echo '<ul id="recentcomments">'; if ($comments) { foreach ((array) $comments as $comment) { echo '<li class="recentcomments">' . sprintf(__('%2$s'), get_comment_author_link(), '<a href="' . get_comment_link($comment->comment_ID) . '">' . get_the_title($comment->comment_post_ID) . '</a>') . '</li>'; } } echo '</ul>'; echo $after_widget; }
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 sandbox_10_ping($comment, $args, $depth) { $GLOBALS['comment'] = $comment; extract($args, EXTR_SKIP); ?> <li <?php comment_class(sandbox_comment_class(false)); ?> id="comment-<?php comment_ID(); ?> "> <div class="comment-author"><?php printf(__('By %1$s on %2$s at %3$s', 'sandbox'), get_comment_author_link(), get_comment_date(), get_comment_time()); edit_comment_link(__('Edit', 'sandbox'), ' <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', 'sandbox'); } ?> <?php comment_text(); }
function efreetant_comments($comment, $args, $depth) { $GLOBALS['comment'] = $comment; ?> <div id="comment-<?php comment_ID(); ?> " <?php comment_class('comment'); ?> > <article class="comment"> <header class="comment-author"> <?php $bgauthemail = get_comment_author_email(); ?> <img data-gravatar="http://www.gravatar.com/avatar/<?php echo md5($bgauthemail); ?> ?s=40" class="avatar" height="40" width="40" src="<?php echo get_template_directory_uri(); ?> /images/nothing.gif" /> <?php printf(__('<cite class="fn">%1$s</cite> %2$s', 'efreetanttheme'), get_comment_author_link(), edit_comment_link(__('(Edit)', 'efreetanttheme'), ' ', '')); ?> <time datetime="<?php echo comment_time('Y-m-j'); ?> "><a href="<?php echo htmlspecialchars(get_comment_link($comment->comment_ID)); ?> "><?php comment_time(__('F jS, Y', 'efreetanttheme')); ?> </a></time> </header> <?php if ($comment->comment_approved == '0') { ?> <div class="alert alert-info"> <p><?php _e('Your comment is awaiting moderation.', 'efreetanttheme'); ?> </p> </div> <?php } ?> <section class="comment_content"> <?php comment_text(); ?> </section> <?php comment_reply_link(array_merge($args, array('depth' => $depth, 'max_depth' => $args['max_depth']))); ?> </article> <?php }
function latest_comments_sidebar_module($args) { global $wpdb, $comment; extract($args); echo $before_module . $before_title . $title . $after_title; ?> <a href="<?php bloginfo('comments_rss2_url'); ?> " title="<?php _e('RSS Feed for all Comments', 'k2_domain'); ?> " class="feedlink"><img src="<?php bloginfo('template_directory'); ?> /images/feed.png" alt="RSS" /></a> <?php if (function_exists('blc_latest_comments')) { ?> <ul> <?php blc_latest_comments(sbm_get_option('num_posts'), sbm_get_option('num_comments'), sbm_get_option('hide_trackbacks'), "<li class='alternate'>", '</li>', true, 10, sbm_get_option('new_color'), sbm_get_option('old_color')); ?> </ul> <?php } else { $num_comments = sbm_get_option('num_comments'); $sql = "SELECT comment_ID, comment_post_ID, comment_author, comment_author_url FROM {$wpdb->comments} WHERE comment_approved = '1' "; if (sbm_get_option('hide_trackbacks') == true) { $sql .= "AND comment_type = '' "; } $sql .= "ORDER BY comment_date_gmt DESC LIMIT {$num_comments}"; $comments = $wpdb->get_results($sql); if ($comments) { ?> <ul> <?php foreach ($comments as $comment) { ?> <li><?php printf(__('%1$s %2$s <a href="%3$s#comment-%4$s">%5$s</a>', 'k2_domain'), get_comment_author_link(), __('on the post', 'k2_domain'), get_permalink($comment->comment_post_ID), $comment->comment_ID, get_the_title($comment->comment_post_ID)); ?> </li> <?php } ?> </ul> <?php } else { ?> <p><?php _e('No comments', 'k2_domain'); ?> </p> <?php } } echo $after_module; }
function imbalance_comments($comment, $args, $depth) { $default = urlencode(get_bloginfo('template_directory') . '/images/default-avatar.png'); $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 = '55', $default); ?> <?php printf(__('<cite class="fn">%s</cite> <span class="says">wrote:</span>'), get_comment_author_link()); ?> </div> <?php if ($comment->comment_approved == '0') { ?> <em><?php _e('Your comment is awaiting moderation.'); ?> </em> <br /> <?php } ?> <div 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)'), ' ', ''); ?> </div> <?php comment_text(); ?> <div class="reply"> <?php comment_reply_link(array_merge($args, array('depth' => $depth, 'max_depth' => $args['max_depth']))); ?> </div> </div> <?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 widget($args, $instance) { global $wpdb, $comments, $comment; extract($args, EXTR_SKIP); $title = apply_filters('widget_title', empty($instance['title']) ? __('My Recent Comments', 'my_framework') : $instance['title']); if (!($number = (int) $instance['number'])) { $number = 5; } else { if ($number < 1) { $number = 1; } else { if ($number > 15) { $number = 15; } } } $comment_len = 100; if (!($comments = wp_cache_get('recent_comments', 'widget'))) { $comments = $wpdb->get_results("SELECT * FROM {$wpdb->comments} WHERE comment_approved = '1' and comment_type not in ('pingback','trackback') ORDER BY comment_date_gmt DESC LIMIT 15"); wp_cache_add('recent_comments', $comments, 'widget'); } $comments = array_slice((array) $comments, 0, $number); ?> <?php echo $before_widget; ?> <?php if ($title) { echo $before_title . $title . $after_title; } ?> <ul id="recentcomments"><?php if ($comments) { foreach ((array) $comments as $comment) { ?> <li class="recentcomments"> <?php echo strip_tags(substr(apply_filters('get_comment_text', $comment->comment_content), 0, $comment_len)); if (strlen($comment->comment_content) > $comment_len) { echo '...'; } ?> <br /> <?php echo __('by', 'my_framework') . ' ' . sprintf(_x('%1$s on %2$s', 'widgets'), get_comment_author_link(), '<a href="' . esc_url(get_comment_link($comment->comment_ID)) . '">' . get_the_title($comment->comment_post_ID) . '</a>'); ?> </li> <?php } } ?> </ul> <?php echo $after_widget; }
function uxebu_comment($comment, $args, $depth) { $GLOBALS['comment'] = $comment; static $comment_number = 0; ?> <div <?php comment_class(); ?> id="comment-<?php comment_ID(); ?> "> <div class="bd"> <?php comment_text(); ?> <?php if ($comment->comment_approved == '0') { ?> <em class="mhx"><?php _e('Your comment is awaiting moderation.'); ?> </em> <?php } ?> </div> <div class="ft"> <div class="col-2"> <span class="comm-nbr"><?php $comment_number++; echo $comment_number; ?> </span> </div> <div class="col-10 last"> <div class="media mbs"> <div class="img-ext media-xs"> <?php echo get_avatar($comment, $size = '48', $default = '<path_to_url>'); ?> </div> <div class="bd comm-meta"> <p class="mrm"> <?php printf(__('%1$s — %2$s'), get_comment_date(), get_comment_time('h:i a')); ?> <br /> <strong><?php printf(__('%s'), get_comment_author_link()); ?> </strong></p> <div><!-- bd comm-meta --> </div><!-- media --> </div><!-- col-10 --> </div><!-- ft --> </div><!-- id comm --> </div> <?php }
function py_comments($comment, $args, $depth) { $GLOBALS['comment'] = $comment; ?> <li <?php comment_class(); ?> > <article class="callout" id="comment-<?php comment_ID(); ?> "> <header class="comment-author"> <?php echo get_avatar($comment, $size = '96', $default = get_template_directory_uri() . ' /img/yeti-avatar.png'); ?> <div class="author-meta"> <?php printf(__('<cite class="fn">%s</cite>', 'projectyeti'), get_comment_author_link()); ?> <time datetime="<?php echo comment_date('c'); ?> "><a href="<?php echo esc_url(get_comment_link($comment->comment_ID)); ?> "><?php printf(__('%1$s', 'projectyeti'), get_comment_date(), get_comment_time()); ?> </a></time> <?php edit_comment_link(__('(Edit)', 'projectyeti'), '', ''); ?> </div> </header> <?php if ($comment->comment_approved == '0') { ?> <div class="notice"> <p class="bottom"><?php _e('Your comment is awaiting moderation.', 'projectyeti'); ?> </p> </div> <?php } ?> <div class="comment"> <?php comment_text(); ?> </div> <footer><?php comment_reply_link(array_merge($args, array('depth' => $depth, 'max_depth' => $args['max_depth']))); ?> </footer> </article> <?php }
function pandora_comment_style($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"> <div class="comment_avatar"> <?php echo get_avatar($comment, $size = '64', $default = '<path_to_url>'); ?> </div> <div class="comment-meta"> <?php printf(__('<cite class="fn">%s</cite> <span class="says">says:</span>'), get_comment_author_link()); ?> <br /> <a href="<?php echo htmlspecialchars(get_comment_link($comment->comment_ID)); ?> "><?php printf(__('%1$s at %2$s', 'pandora'), get_comment_date(), get_comment_time()); ?> </a><?php edit_comment_link(__('(Edit)', 'pandora'), ' ', ''); ?> - <?php comment_reply_link(array_merge($args, array('depth' => $depth, 'max_depth' => $args['max_depth']))); ?> </div> </div> <?php if ($comment->comment_approved == '0') { ?> <em><?php _e('Your comment is awaiting moderation.', 'pandora'); ?> </em> <br /> <?php } ?> <div class="comment-text"> <?php comment_text(); ?> </div> </div><?php }
function et_custom_comments_display($comment, $args, $depth) { $GLOBALS['comment'] = $comment; ?> <li <?php comment_class(); ?> id="li-comment-<?php comment_ID(); ?> "> <article id="comment-<?php comment_ID(); ?> " class="comment-body clearfix"> <?php echo get_avatar($comment, $size = '60'); ?> <?php printf('<span class="fn">%s</span>', get_comment_author_link()); ?> <span class="comment_date"> <?php /* translators: 1: date, 2: time */ printf(__('%1$s', 'Flexible'), get_comment_date()); ?> </span> <?php edit_comment_link(esc_html__('(Edit)', 'Flexible'), ' '); ?> <?php if ($comment->comment_approved == '0') { ?> <em class="moderation"><?php esc_html_e('Your comment is awaiting moderation.', 'Flexible'); ?> </em> <br /> <?php } ?> <div class="comment-content clearfix"> <?php comment_text(); ?> <?php $et_comment_reply_link = get_comment_reply_link(array_merge($args, array('reply_text' => esc_attr__('Reply', 'Flexible'), '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-content--> </article> <!-- end comment-body --> <?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 }
/** * @param object $comment * @param int $depth * @param array $args */ protected function comment($comment, $depth, $args) { ?> <li <?php comment_class($this->has_children ? 'parent' : '', $comment->comment_ID); ?> id="comment-<?php comment_ID(); ?> "> <?php if (1 === $depth) { ?> <div class="row"><?php } ?> <div class="media media--nofloat"> <div class="img"> <?php $avatar_size = 1 === $depth ? 100 : 70; echo get_avatar($comment, $avatar_size, '', get_comment_author()); ?> </div> <div class="bd"> <div class="comment-author"> <?php printf(__('By <cite class="fn">%s</cite> <span class="date">on %s</span>', 'yoast-theme'), get_comment_author_link(), get_comment_date()); ?> </div> <div class="comment-content"> <?php if ($comment->comment_approved == '0') { ?> <p class="alert"><?php echo apply_filters('genesis_comment_awaiting_moderation', __('Your comment is awaiting moderation.', 'genesis')); ?> </p> <?php } ?> <?php comment_text(); ?> </div> </div> </div> <div class="reply"> <?php comment_reply_link(array_merge($args, array('add_below' => 'comment', 'depth' => $depth, 'max_depth' => $args['max_depth']))); ?> <?php edit_comment_link('edit', ' | ', ''); ?> </div> <?php }