当前位置: 首页>>代码示例>>PHP>>正文


PHP comment_ID函数代码示例

本文整理汇总了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 
}
开发者ID:bidhanbaral,项目名称:fotodep_store,代码行数:29,代码来源:functions.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 
}
开发者ID:Paulf-999,项目名称:HollyFry.com,代码行数:60,代码来源:comments.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 
}
开发者ID:kristenhazard,项目名称:MJ-Brackin-SEA-Fund,代码行数:34,代码来源:functions.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 
    }
开发者ID:blueset,项目名称:theme-gn,代码行数:28,代码来源:comments.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 } ?>
开发者ID:robbiespire,项目名称:paQui,代码行数:29,代码来源:comments.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 
}
开发者ID:arkev,项目名称:IntelligentMode,代码行数:60,代码来源:commentsfunc.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>';
}
开发者ID:ravenvn,项目名称:sandau,代码行数:30,代码来源:functions.php

示例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'), '&nbsp;&nbsp;', '');
    ?>
</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

示例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 
}
开发者ID:vfedushchin,项目名称:KingNews,代码行数:39,代码来源:template-comment.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();
}
开发者ID:rmccue,项目名称:wordpress-unit-tests,代码行数:29,代码来源:comments.php

示例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>';
}
开发者ID:codysaylor,项目名称:wordpress-barebones-boilerplate,代码行数:26,代码来源:functions.php

示例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">&times;</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

示例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 
}
开发者ID:efreetant,项目名称:stellar,代码行数:60,代码来源:functions.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 
}
开发者ID:TakenokoPro,项目名称:antenna,代码行数:27,代码来源:functions.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 
}
开发者ID:amgxyz,项目名称:interactive-geo-trail-map,代码行数:48,代码来源:comment.php


注:本文中的comment_ID函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。