本文整理汇总了PHP中get_comment_author_link函数的典型用法代码示例。如果您正苦于以下问题:PHP get_comment_author_link函数的具体用法?PHP get_comment_author_link怎么用?PHP get_comment_author_link使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了get_comment_author_link函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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
}
开发者ID:bidhanbaral,项目名称:fotodep_store,代码行数:29,代码来源:functions.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 } ?>
开发者ID:jackmachin,项目名称:bayer,代码行数:26,代码来源:comments.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
}
开发者ID:sfedorenko,项目名称:geekhub_frontend,代码行数:35,代码来源:comments.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;
}
开发者ID:de190909,项目名称:WPTest,代码行数:32,代码来源:class-extend-recent-comments-widget.php
示例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;
}
开发者ID:Beth3346,项目名称:wordpress-boilerplate,代码行数:7,代码来源:Comments.php
示例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
}
开发者ID:Paulf-999,项目名称:HollyFry.com,代码行数:60,代码来源:comments.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
}
开发者ID:StudentLifeMarketingAndDesign,项目名称:krui-wp,代码行数:28,代码来源:discussion.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();
}
开发者ID:rmccue,项目名称:wordpress-unit-tests,代码行数:29,代码来源:comments.php
示例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
}
开发者ID:rodolfospalenza,项目名称:blogrs,代码行数:35,代码来源:functions.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
}
开发者ID:nxtclass,项目名称:NXTClass-themes,代码行数:60,代码来源:comments.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
}
开发者ID:nicomollet,项目名称:stormbringer,代码行数:31,代码来源:comments.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
}
开发者ID:amgxyz,项目名称:interactive-geo-trail-map,代码行数:48,代码来源:comment.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
}
开发者ID:Neil-WN,项目名称:mysite,代码行数:60,代码来源:functions.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
}
开发者ID:berniecultess,项目名称:infirev,代码行数:7,代码来源:pluggable.php
示例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
}
开发者ID:rmccue,项目名称:wordpress-unit-tests,代码行数:60,代码来源:comments.php
示例16: p2_get_discussion_links
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;
}
开发者ID:cabelotaina,项目名称:redelivre,代码行数:30,代码来源:template-tags.php
示例17: get_recent_comments
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;
}
开发者ID:boltogriz,项目名称:blog-cook,代码行数:34,代码来源:functions.php
示例18: sun_comment
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
}
开发者ID:ekudriashov,项目名称:sun-theme,代码行数:33,代码来源:comments-callback.php
示例19: sandbox_10_ping
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();
}
开发者ID:rmccue,项目名称:wordpress-unit-tests,代码行数:25,代码来源:comments.php
示例20: efreetant_comments
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
}
开发者ID:efreetant,项目名称:stellar,代码行数:60,代码来源:functions.php
注:本文中的get_comment_author_link函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论