本文整理汇总了PHP中comment_ID函数的典型用法代码示例。如果您正苦于以下问题:PHP comment_ID函数的具体用法?PHP comment_ID怎么用?PHP comment_ID使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了comment_ID函数的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: 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
}
示例3: motiontheme_ping
function motiontheme_ping($comment, $args, $depth)
{
$GLOBALS['comment'] = $comment;
?>
<li <?php
comment_class();
?>
id="li-comment-<?php
comment_ID();
?>
">
<div id="comment-<?php
comment_ID();
?>
" class="comment-wrap">
<div class="commentbody">
<div class="author"><?php
comment_author_link();
?>
</div>
<?php
if ($comment->comment_approved == '0') {
?>
<em>(Your comment is awaiting moderation...)</em>
<?php
}
?>
<?php
comment_text();
?>
</div><!-- /commentbody -->
</div>
<?php
}
示例4: start_el
function start_el(&$output, $comment, $depth, $args, $id = 0)
{
$depth++;
$GLOBALS['comment_depth'] = $depth;
$GLOBALS['comment'] = $comment;
if (!empty($args['callback'])) {
call_user_func($args['callback'], $comment, $args, $depth);
return;
}
extract($args, EXTR_SKIP);
?>
<li id="comment-<?php
comment_ID();
?>
" <?php
if ($depth > 1) {
comment_class('child-comment');
} else {
comment_class();
}
?>
>
<?php
include locate_template('templates/comment.php');
?>
<?php
}
示例5: 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">
<span class="small_frame"><?php echo get_avatar($comment,$size='60',$default=get_template_directory_uri().'/images/gravatar.gif' ); ?></span><br />
<cite><?php comment_author_link() ?></cite><br />
<div class="date"><?php comment_date('M d, Y'); ?></div>
</div>
<div class="comment-text">
<?php if ($comment->comment_approved == '0') : ?>
<em class="awaiting_moderation"><?php _e('Your comment is awaiting moderation.', 'epanel') ?></em>
<br />
<?php endif; ?>
<?php comment_text() ?>
<div class="comment-meta commentmetadata">
<?php edit_comment_link(__('(edit)'),' ','') ?>
</div>
<div class="reply">
<?php comment_reply_link(array_merge( $args, array('reply_text' => '(reply)', 'depth' => $depth, 'max_depth' => $args['max_depth']))) ?>
</div>
</div>
</div>
<?php } ?>
示例6: 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
}
示例7: 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>';
}
示例8: 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
}
示例9: king_news_rewrite_comment_item
/**
* A custom function to use to open and display each comment.
*
* @since 1.0.0
* @param object $_comment Comment to display.
* @param array $args An array of arguments.
* @param int $depth Depth of comment.
*/
function king_news_rewrite_comment_item($_comment, $args, $depth)
{
global $comment;
$_comment->king_news_comment_list_args = $args;
$comment = $_comment;
$tag = 'div' === $args['style'] ? 'div' : 'li';
?>
<<?php
echo $tag;
?>
<?php
comment_class($args['has_children'] ? 'parent' : '');
?>
id="comment-<?php
comment_ID();
?>
">
<article id="div-comment-<?php
comment_ID();
?>
" class="comment-body">
<div class="comment-body__holder">
<?php
get_template_part('template-parts/comment');
?>
</div>
</article><!-- .comment-body -->
<?php
}
示例10: 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();
}
示例11: my_custom_comments
function my_custom_comments($comment, $args, $depth)
{
$GLOBALS['comment'] = $comment;
?>
<li <?php
comment_class();
?>
id="li-comment-<?php
comment_ID();
?>
">
<?php
if ($comment->comment_approved == '0') {
?>
<em><?php
_e('Your comment is awaiting moderation.');
?>
</em>
<?php
}
?>
<?php
echo '<div class="pull-left"><div class="commentor-avatar" style="height: 90px; width: 90px; background: url(' . get_avatar_url($comment) . ') no-repeat center center; background-size: cover;"><div class="commentor-name">' . get_comment_author() . '</div></div></div>';
comment_text();
echo '<div class="clearfix"></div>';
}
示例12: 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 } ?>
示例13: 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
}
示例14: 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
}
示例15: 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
}