本文整理汇总了PHP中get_comment_author_link函数的典型用法代码示例。如果您正苦于以下问题:PHP get_comment_author_link函数的具体用法?PHP get_comment_author_link怎么用?PHP get_comment_author_link使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了get_comment_author_link函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: commentlist
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
}
示例2: studiofolio_comment
<?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 } ?>
示例3: show_comment
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
}
示例4: widget
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;
}
示例5: author
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;
}
示例6: reverie_comments
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
}
示例7: thematic_pings
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
}
示例8: sandbox_ping
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();
}
示例9: mytheme_comment
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
}
示例10: et_custom_comments_display
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
}
示例11: stormbringer_comments
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
}
示例12: geo_mashup_comment_default
/**
* 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
}
示例13: secret_comment
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
}
示例14: evolve_comment_name
function evolve_comment_name()
{
$commenter = get_comment_author_link();
// Get comentor's details
return "<cite class=\"commenter fn n\">{$commenter}</cite>";
// Commentor vcard
}
示例15: garland_comment
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
}