本文整理汇总了PHP中comment_time函数的典型用法代码示例。如果您正苦于以下问题:PHP comment_time函数的具体用法?PHP comment_time怎么用?PHP comment_time使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了comment_time函数的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: 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
}
示例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: mydesign
function mydesign($comment, $args, $depth)
{
$GLOBALS['comment'] = $comment;
$users = get_users();
?>
<li id="comment-<?php
echo comment_id();
?>
" class="compost">
<?php
// ユーザーIDを引っ張る
foreach ($users as $user) {
//echo $user->display_name.'<br />';
//echo get_comment_author();
if ($user->display_name == get_comment_author()) {
break;
}
}
?>
<span class="trick_rounded-img icon_image" style="background: url(<?php
echo ps_get_user_profile_image_src($user->ID, 'standard');
?>
) no-repeat center center; width: 50px; height: 50px;></span>
<span class="trick_thumbnail_Image">
<?php
ps_user_profile_image($user->ID, 'thumbnail');
?>
</span>
<?php
?>
<div class="commentarea">
<?php
//改行表示
$commentstr = '<p>' . get_comment_text() . '</p>';
$commentstr = preg_replace("/\n/", "<br />", $commentstr);
echo $commentstr;
//comment_text();
?>
</div>
<p class="cominfo">
<?php
comment_date();
?>
<?php
comment_time();
?>
|
<?php
comment_author_link();
?>
<?php
comment_reply_link(array_merge($args, array('depth' => $depth, 'reply_text' => '返信', 'before' => ' | ', 'after' => '')));
?>
</p>
</li>
<?php
}
示例5: zl_custom_comment
function zl_custom_comment($comment, $args, $depth)
{
$GLOBALS['comment'] = $comment;
?>
<li <?php
comment_class();
?>
id="li-comment-<?php
comment_ID();
?>
">
<div class="medium-1 column norightgap">
<?php
echo get_avatar($comment->comment_author_email, 50);
?>
</div>
<div class="medium-11 column">
<div id="comment-<?php
comment_ID();
?>
">
<div class="comment-author"><strong><?php
printf(__('%s', 'zatolab'), get_comment_author_link());
?>
</strong> <?php
echo zl_option('lang_on', __('on', 'zatolab'));
?>
<em class="zl_commenttime"><small><?php
comment_date();
?>
, <?php
comment_time('H:i:s');
?>
</small></em></div>
<div class="clear"></div>
<div class="zl_comment_content">
<?php
comment_text();
if ($comment->comment_approved == '0') {
?>
<p><em><?php
echo zl_option('lang_commoderate', __('Your comment is awaiting moderation.', 'zatolab'));
?>
</em></p>
<?php
}
?>
<div class="clear"></div>
<?php
comment_reply_link(array_merge($args, array('depth' => $depth, 'max_depth' => $args['max_depth'])));
?>
</div>
</div>
</div>
<div class="clear"></div>
<?php
}
示例6: mydesign
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
}
示例7: as_function_comments_better
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
}
示例8: 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();
?>
" 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
}
示例9: webnus_comments
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
}
示例10: 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
}
示例11: cutline_comment
function cutline_comment($comment, $args, $depth)
{
$GLOBALS['comment'] = $comment;
?>
<li <?php
comment_class();
?>
id="comment-<?php
comment_ID();
?>
">
<?php
echo get_avatar($comment, 48);
?>
<p class="comment_meta">
<strong><?php
comment_author_link();
?>
</strong>
<span class="comment_time">// <a href="#comment-<?php
comment_ID();
?>
" title="<?php
echo attribute_escape(__('Permalink to this comment', 'cutline'));
?>
"><?php
comment_date();
?>
<?php
_e('at');
?>
<?php
comment_time();
?>
</a> <?php
echo comment_reply_link(array('depth' => $depth, 'max_depth' => $args['max_depth'], 'before' => ' | '));
?>
<?php
edit_comment_link(__('edit', 'cutline'), '(', ')');
?>
</span> </p> <div class="entry">
<?php
comment_text();
?>
<?php
if ($comment->comment_approved == '0') {
?>
<p><strong><?php
_e('Your comment is awaiting moderation.', 'cutline');
?>
</strong></p>
<?php
}
?>
</div>
</li>
<?php
}
示例12: joints_comments
function joints_comments($comment, $args, $depth)
{
$GLOBALS['comment'] = $comment;
?>
<li <?php
comment_class('panel');
?>
>
<article id="comment-<?php
comment_ID();
?>
" class="clearfix large-12 columns">
<header class="comment-author">
<?php
// create variable
$bgauthemail = get_comment_author_email();
?>
<?php
printf(__('<cite class="fn">%s</cite>', 'jointstheme'), get_comment_author_link());
?>
on
<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 - g:ia', 'jointstheme'));
?>
</a></time>
<?php
edit_comment_link(__('(Edit)', 'jointstheme'), ' ', '');
?>
</header>
<?php
if ($comment->comment_approved == '0') {
?>
<div class="alert alert-info">
<p><?php
_e('Your comment is awaiting moderation.', 'jointstheme');
?>
</p>
</div>
<?php
}
?>
<section class="comment_content clearfix">
<?php
comment_text();
?>
</section>
<?php
comment_reply_link(array_merge($args, array('depth' => $depth, 'max_depth' => $args['max_depth'])));
?>
</article>
<!-- </li> is added by WordPress automatically -->
<?php
}
示例13: 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
}
示例14: chaoticsoul_comment
function chaoticsoul_comment($comment, $args, $depth)
{
$GLOBALS['comment'] = $comment;
?>
<li <?php
comment_class();
?>
id="comment-<?php
comment_ID();
?>
">
<?php
comment_text();
?>
<p class="commentmetadata">
<?php
echo get_avatar($comment, 32);
?>
<small>
<cite><?php
comment_author_link();
?>
</cite> <?php
_e('said this on', 'chaoticsoul');
?>
<?php
if ($comment->comment_approved == '0') {
?>
<em><?php
_e('Your comment is awaiting moderation.', 'chaoticsoul');
?>
</em>
<?php
}
?>
<a href="#comment-<?php
comment_ID();
?>
" title=""><?php
comment_date(get_option('date_format'));
?>
<?php
_e('at', 'chaoticsoul');
?>
<?php
comment_time(get_option('time_format'));
?>
</a><?php
echo comment_reply_link(array('depth' => $depth, 'max_depth' => $args['max_depth'], 'before' => ' | '));
?>
<?php
edit_comment_link(__('edit', 'chaoticsoul'), '(', ')');
?>
</small>
</p>
</li>
<?php
}
示例15: 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
}