本文整理汇总了PHP中comment_author函数的典型用法代码示例。如果您正苦于以下问题:PHP comment_author函数的具体用法?PHP comment_author怎么用?PHP comment_author使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了comment_author函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: my_theme_comment
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;
}
}
示例2: format_comment
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>';
}
示例3: edu7_comment
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
}
示例4: start_el
public function start_el(&$output, $comment, $depth = 0, $args = array(), $id = 0)
{
$depth++;
$GLOBALS['comment_depth'] = $depth;
$GLOBALS['comment'] = $comment;
$parent_class = empty($args['has_children']) ? '' : 'parent';
?>
<li id="comment-<?php
comment_ID();
?>
" <?php
comment_class($parent_class);
?>
>
<div class="comment-header">
<div class="left">
<ul class="c">
<li class="author">
<a href="<?php
comment_author_url();
?>
">
<?php
comment_author();
?>
</a>
</li>
<li class="date">
<?php
comment_time(get_option('n/j/Y g:i A'));
?>
</li>
</ul>
</div>
<div class="right">
<ul class="c">
<li class="reply">
<?php
$reply_args = array('depth' => $depth, 'max_depth' => $args['max_depth'], 'reply_text' => '<span data-icon="reply"></span>');
comment_reply_link(array_merge($args, $reply_args));
?>
</li>
<li class="edit">
<?php
edit_comment_link('<span data-icon="edit"></span>');
?>
</li>
</ul>
</div>
</div>
<section class="comment-body">
<?php
comment_text();
?>
</section>
<?php
}
示例5: quality_comment
function quality_comment($comment, $args, $depth)
{
$GLOBALS['comment'] = $comment;
//get theme data
global $comment_data;
//translations
$leave_reply = $comment_data['translation_reply_to_coment'] ? $comment_data['translation_reply_to_coment'] : __('Reply', 'quality');
?>
<div class="media qua_comment_box">
<a class="pull_left_comment">
<?php
echo get_avatar($comment, $size = '60');
?>
</a>
<div class="media-body">
<div class="qua_comment_detail">
<h4 class="qua_comment_detail_title"><?php
comment_author($comment);
?>
</h4>
<span class="qua_comment_date"><?php
comment_date('F j, Y');
?>
<?php
_e('at', 'quality');
?>
<?php
comment_time('g:i a');
?>
</span>
<?php
comment_text();
?>
<div class="reply">
<i class="fa fa-mail-reply"></i> <?php
comment_reply_link(array_merge($args, array('reply_text' => $leave_reply, 'depth' => $depth, 'max_depth' => $args['max_depth'])));
?>
</div>
<?php
if ($comment->comment_approved == '0') {
?>
<em class="comment-awaiting-moderation"><?php
_e('Your comment is awaiting moderation.', 'quality');
?>
</em>
<br/>
<?php
}
?>
</div>
</div>
</div>
<?php
}
示例6: advanced_comment
function advanced_comment($comment, $args, $depth)
{
$GLOBALS['comment'] = $comment;
?>
<div class="comment-container" id="comment-<?php
comment_ID();
?>
">
<div class="gravatar">
<?php
echo get_avatar($comment);
?>
</div>
<span class="comment-author">
<?php
echo get_comment_author_link();
?>
说道:
</span>
<div class="comment-time">
<?php
echo get_comment_date();
echo get_comment_time();
?>
<span class="edit-comment"><?php
edit_comment_link('修改');
?>
</span>
</div>
<div class="comment-content">
<?php
echo comment_text();
?>
</div>
<div class="comment-reply" onclick="replyComment(<?php
echo $comment->comment_post_ID;
?>
,<?php
echo $comment->comment_ID;
?>
,'<?php
echo get_option('siteurl');
?>
'+'/wp-comments-post.php','<?php
echo comment_author();
?>
','<?php
echo comment_author_email();
?>
','<?php
echo comment_author_url();
?>
')">
回复
</div>
</div>
<?php
}
示例7: custom_comments
function custom_comments($comment, $args, $depth)
{
$GLOBALS['comment'] = $comment;
?>
<?php
switch ($comment->comment_type) {
case 'pingback':
case 'trackback':
?>
<li <?php
comment_class('comments-item');
?>
id="comment<?php
comment_ID();
?>
">
<div class="back-link">< ?php comment_author_link(); ?></div>
<?php
break;
default:
?>
<li <?php
comment_class('comments-item');
?>
id="comment-<?php
comment_ID();
?>
">
<div class="comments-item-pic">
<?php
echo get_avatar($comment, 60);
?>
</div>
<div class="comments-item-comment">
<p class="info"><span class="name"><?php
comment_author();
?>
</span> <span class="timestamp"><?php
echo human_time_diff(strtotime($comment->comment_date_gmt), current_time('timestamp')) . ' ago';
?>
</span>
<?php
comment_reply_link(array_merge($args, array('reply_text' => 'Reply', 'after' => '', 'depth' => $depth, 'max_depth' => $args['max_depth'])));
?>
</p>
<p><?php
echo $comment->comment_content;
?>
</p>
</div>
<hr ?>
<?php
// End the default styling of comment
break;
}
}
示例8: gt_comments
function gt_comments($comment, $args, $depth)
{
$GLOBALS['comment'] = $comment;
?>
<li class="comment">
<div>
<?php
echo get_avatar($comment, $size = '50');
?>
<div class="comment-meta">
<h5 class="author"><a href="<?php
comment_author_url();
?>
" target="about_blank"><?php
comment_author();
?>
</a> - <?php
comment_reply_link(array_merge($args, array('depth' => $depth, 'max_depth' => $args['max_depth'])));
?>
</h5>
<p class="date"><?php
printf(__('%1$s at %2$s', 'velocityslide'), get_comment_date(), get_comment_time());
?>
</p>
</div>
<div class="comment-entry">
<?php
comment_text();
?>
</div>
</div>
<?php
if ($comment->comment_approved == '0') {
?>
<em class="comment-moderate"><?php
_e('Your comment is awaiting moderation.', 'velocityslide');
?>
</em>
<br />
<?php
}
?>
<?php
edit_comment_link(__('(Edit)', 'velocityslide'), ' ', '');
?>
<?php
}
示例9: weblizar_comment
function weblizar_comment($comment, $args, $depth)
{
$GLOBALS['comment'] = $comment;
//get theme data
global $comment_data;
//translations
$leave_reply = $comment_data['translation_reply_to_coment'] ? $comment_data['translation_reply_to_coment'] : __('Reply', 'weblizar');
?>
<div class="comment_wrap">
<div class="gravatar">
<?php
echo get_avatar($comment, $size = '60');
?>
</div>
<div class="comment_content">
<div class="comment_meta">
<div class="comment_author"><?php
comment_author();
?>
</div>
</div>
<div class="comment_text">
<?php
comment_text();
?>
<a href=""><?php
comment_reply_link(array_merge($args, array('reply_text' => $leave_reply, 'depth' => $depth, 'max_depth' => $args['max_depth'])));
?>
</a>
</div>
</div>
<?php
if ($comment->comment_approved == '0') {
?>
<div id="div2" class="info">
<div class="message-box-wrap">
<button class="close-but" id="colosebut2"><?php
_e('close', 'weblizar');
?>
</button>
<?php
_e('Your comment is awaiting moderation.', 'weblizar');
?>
</div>
</div>
<br/>
<?php
}
?>
</div>
<?php
}
示例10: comment
function comment($comment, $args, $depth)
{
$GLOBALS['comment'] = $comment;
?>
<div class="comment-container">
<div class="comment-post" <?php
comment_class();
?>
id="comment-<?php
comment_ID();
?>
">
<div class="avatar"><?php
echo get_avatar($comment, $size = '54');
?>
</div>
<div class="author">
<div class="comment-author"><?php
comment_author();
?>
</div>
<div class="comment-info"><u><?php
_e('posted on', GETTEXT_DOMAIN);
?>
<?php
echo esc_html(get_comment_date());
?>
</u> <?php
edit_comment_link(__('Edit', GETTEXT_DOMAIN), '', '');
?>
<?php
comment_reply_link(array_merge($args, array('depth' => $depth, 'max_depth' => $args['max_depth'])));
?>
</div>
<?php
if ($comment->comment_approved == '0') {
?>
<p class="comment-content"><em class="moderation"><?php
_e('Your comment is awaiting moderation.', GETTEXT_DOMAIN);
?>
</em></p>
<?php
}
?>
<div class="comment-content"><?php
comment_text();
?>
</div>
</div>
<div class=" clearfix"></div>
</div>
<?php
}
示例11: mytheme_comment
function mytheme_comment($comment, $args, $depth)
{
$GLOBALS['comment'] = $comment;
?>
<div class="comment" id="comment-<?php
comment_ID();
?>
">
<a class="gravatar">
<?php
echo get_avatar($comment, $size = '120');
?>
</a>
<?php
if ($comment->comment_approved == '0') {
?>
<em>Your comment is awaiting moderation.</em>
<?php
}
?>
<p class="comment-date">
<a href="#comment-<?php
comment_ID();
?>
" title=""><?php
comment_date('F jS, Y');
?>
on <?php
comment_time();
?>
</a>
<small><?php
edit_comment_link('edit', ' ', '');
?>
</small>
</p>
<p><strong><?php
comment_author();
?>
</strong> said:</p>
<?php
comment_text();
?>
<div class="clear"></div>
<div class="reply">
<?php
comment_reply_link(array_merge($args, array('depth' => $depth, 'max_depth' => $args['max_depth'])));
?>
</div>
<?php
}
示例12: column_author
/**
* Custom column to render comment authors
*
* @param Object $comment Current comment
*/
public function column_author($comment)
{
?>
<strong><?php
comment_author();
?>
</strong><br />
<?php
$author_url = get_comment_author_url();
if (preg_match('|^https?://$|', $author_url)) {
$author_url = '';
}
// END if
$author_url_display = preg_replace('|https?://(www\\.)?|i', '', $author_url);
if (strlen($author_url_display) > 50) {
$author_url_display = substr($author_url_display, 0, 49) . '…';
}
// END if
if (!empty($author_url)) {
?>
<a href="<?php
echo esc_url($author_url);
?>
" title="<?php
echo esc_url($author_url);
?>
"><?php
esc_html($author_url_display);
?>
</a>
<?php
}
// END if
if ($this->user_can) {
if (!empty($comment->comment_author_email)) {
comment_author_email_link();
}
// END if
$args = array('s' => get_comment_author_IP(), 'mode' => 'detail');
?>
<br />
<a href="<?php
echo esc_url(add_query_arg($args, admin_url('edit-comments.php')));
?>
"><?php
echo esc_html(get_comment_author_IP());
?>
</a>
<?php
}
// END if
}
示例13: start_el
function start_el(&$output, $comment, $depth = 0, $args = array(), $id = 0)
{
$depth++;
$GLOBALS['comment_depth'] = $depth;
$GLOBALS['comment'] = $comment;
$parent_class = empty($args['has_children']) ? '' : 'parent';
if ('article' == $args['style']) {
$tag = 'article';
$add_below = 'comment';
} else {
$tag = 'article';
$add_below = 'comment';
}
?>
<ul class="comments-list">
<li class="comment comment-line" <?php
comment_class("single-comment clearfix col-md-12", empty($args['has_children']) ? '' : 'parent');
?>
id="comment-<?php
comment_ID();
?>
" itemscope itemtype="http://schema.org/Comment">
<div class="row">
<div class="comment col-md-12">
<div class="user-img"><?php
echo get_avatar($comment, 65);
?>
</div>
<h6 class="user-name"><?php
comment_author();
?>
</h6>
<p class="comment-date"><?php
the_time('F j, Y');
?>
at <?php
the_time('g:i a');
?>
</p>
<div class="comment-text"><?php
comment_text();
?>
</div>
</div>
</div>
</li>
<?php
}
示例14: fjords_comment
function fjords_comment($comment, $args, $depth)
{
$GLOBALS['comment'] = $comment;
extract($args, EXTR_SKIP);
?>
<div <?php
comment_class(empty($args['has_children']) ? '' : 'parent');
?>
id="comment-<?php
comment_ID();
?>
">
<div id="div-comment-<?php
comment_ID();
?>
">
<div class="comentarios">
<span class="comment-author vcard"><?php
if ($args['avatar_size'] != 0) {
echo get_avatar($comment, $args['avatar_size']);
}
?>
<span class="fn"><a href="<?php
comment_author_url();
?>
">
<?php
comment_author();
?>
</a></span> wrote @ <span class="comment-meta commentmetadata"><?php
comment_date();
?>
at <?php
comment_time();
?>
</span>
</span>
</div>
<?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
}
示例15: humbleshop_comment
function humbleshop_comment( $comment, $args, $depth ) {
$GLOBALS['comment'] = $comment;
switch ( $comment->comment_type ) :
case 'pingback' :
case 'trackback' :
?>
<li <?php comment_class(); ?> id="comment-<?php comment_ID(); ?>">
<article class="post pingback">
<p><?php _e( 'Pingback:', 'humbleshop' ); ?> <?php comment_author_link(); ?><?php edit_comment_link( __( '(Edit)', 'humbleshop' ), ' ' ); ?></p>
<?php
break;
default :
?>
<li <?php comment_class(); ?> id="li-comment-<?php comment_ID(); ?>">
<article class="clearfix" <?php //comment_class(); ?> id="comment-<?php comment_ID(); ?>">
<div class="pull-left avatar tcenter">
<?php echo get_avatar( $comment, 40 ); ?>
<br>
<small class="visible-desktop"><span><?php comment_author(); ?></span> <br>
<?php edit_comment_link( __( '<i class="icon-pencil"></i> Edit', 'humbleshop' ), ' ' ); ?></small>
</div>
<div class="pull-right text">
<?php comment_text(); ?>
<?php if ( $comment->comment_approved == '0' ) : ?>
<em><?php _e( 'Your comment is awaiting moderation.', 'humbleshop' ); ?></em>
<?php endif; ?>
<div class="commentmeta clearfix">
<small>
<div class="pull-left">
<a href="<?php echo esc_url( get_comment_link( $comment->comment_ID ) ); ?>">
<time pubdate datetime="<?php comment_time( 'c' ); ?>"><i class="icon-calendar"></i> <?php comment_date(); ?> at <?php comment_time(); ?></time></a>
</div>
<div class="pull-right">
<i class="icon-ccw"></i> <?php comment_reply_link( array_merge( $args, array( 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>
</div></small>
</div>
</div>
<?php
break;
endswitch;
}