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


PHP get_comment_id函数代码示例

本文整理汇总了PHP中get_comment_id函数的典型用法代码示例。如果您正苦于以下问题:PHP get_comment_id函数的具体用法?PHP get_comment_id怎么用?PHP get_comment_id使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了get_comment_id函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: add_reply_to_comment

function add_reply_to_comment($userid, $commentid, $content)
{
    validate_user_id($userid);
    validate_comment_id($commentid);
    $con = db_connect();
    $content = mysql_real_escape_string($content);
    $postid = post_parent($commentid);
    $sql = "INSERT INTO comments (user, postparent, parent, content, posttime) VALUES ({$userid}, {$postid}, {$commentid}, '{$content}', NOW())";
    $success = mysql_query($sql);
    db_close($con);
    return get_comment_id($userid, $postid, $commentid, $content);
}
开发者ID:qiemem,项目名称:GovDialogue,代码行数:12,代码来源:commentmanagement.php

示例2: dialogue_expand_children

function dialogue_expand_children($children, $pid, $post)
{
    if (count($children) > 0) {
        ob_start();
        $cmold = $GLOBALS['comment'];
        foreach ($children as $comment) {
            $GLOBALS['comment'] = $comment;
            dialogue_comment_div(get_comment_id(), $pid, $post);
        }
        $GLOBALS['comment'] = $cmold;
        $res = "<ul>" . ob_get_contents() . "</ul>";
        ob_end_clean();
        return $res;
    } else {
        return "";
    }
}
开发者ID:rede-sustentabilidade,项目名称:site-wordpress,代码行数:17,代码来源:dialogue.comment.php

示例3: thesis_comment_meta

/**
 * function thesis_commenet_meta()
 *
 * Display comment meta information, including author, author link, and time posted.
 *
 * @since 1.2
 * @uses thesis_avatar()
 */
function thesis_comment_meta($comment_number)
{
    global $thesis;
    $comment_link_before = '<a href="#comment-' . get_comment_id() . '" title="Permalink to this comment" rel="nofollow">';
    $comment_link_after = '</a>';
    if ($thesis['display']['comments']['numbers']) {
        $comment_num = '						<span class="comment_num">' . $comment_link_before . $comment_number . $comment_link_after . '</span>' . "\n";
        $comment_time = '<span class="comment_time">' . sprintf(__('%1$s at %2$s'), get_comment_date(), get_comment_time()) . '</span>';
    } else {
        $comment_time = '<span class="comment_time">' . $comment_link_before . sprintf(__('%1$s at %2$s'), get_comment_date(), get_comment_time()) . $comment_link_after . '</span>';
    }
    thesis_avatar($thesis['display']);
    echo $comment_num;
    echo '						<span class="comment_author">' . get_comment_author_link() . '</span> ' . $comment_time;
    if ($thesis['display']['admin']['edit_comment']) {
        edit_comment_link(__('edit', 'thesis'), ' <span class="edit_comment">[', ']</span>');
    }
    echo "\n";
}
开发者ID:billerby,项目名称:Surdeg,代码行数:27,代码来源:comments.php

示例4: comment

    /**
     * Output a single comment.
     *
     * @access protected
     * @since 3.6.0
     *
     * @see wp_list_comments()
     *
     * @param object $comment Comment to display.
     * @param int $depth Depth of comment.
     * @param array $args An array of arguments.
     */
    protected function comment($comment, $depth, $args)
    {
        if ('div' == $args['style']) {
            $tag = 'div';
            $add_below = 'comment';
        } else {
            $tag = 'li';
            $add_below = 'div-comment';
        }
        ?>
        <<?php 
        echo $tag;
        comment_class($this->has_children ? 'parent' : '');
        ?>
 id="comment-<?php 
        comment_ID();
        ?>
">
        <?php 
        if ('div' != $args['style']) {
            ?>
        <div id="div-comment-<?php 
            comment_ID();
            ?>
" class="comment-body">
    <?php 
        }
        ?>
        <div class="comment-author vcard">
            <?php 
        if (0 != $args['avatar_size']) {
            echo get_avatar($comment, $args['avatar_size']);
        }
        ?>
            <?php 
        printf(__('<cite class="fn">%s</cite> <span class="says">says:</span>'), get_comment_author_link());
        ?>
        </div>
        <?php 
        if ('0' == $comment->comment_approved) {
            ?>
        <em class="comment-awaiting-moderation"><?php 
            _e('Your comment is awaiting moderation.');
            ?>
</em>
        <br/>
    <?php 
        }
        ?>

        <div class="comment-meta commentmetadata"><a
                href="<?php 
        echo esc_url(get_comment_link($comment->comment_ID, $args));
        ?>
">
                <?php 
        /* translators: 1: date, 2: time */
        printf(__('%1$s at %2$s'), get_comment_date(), get_comment_time());
        ?>
</a><?php 
        edit_comment_link(__('(Edit)'), '&nbsp;&nbsp;', '');
        ?>
        </div>

        <?php 
        comment_text(get_comment_id(), array_merge($args, array('add_below' => $add_below, 'depth' => $depth, 'max_depth' => $args['max_depth'])));
        ?>

        <?php 
        comment_reply_link(array_merge($args, array('add_below' => $add_below, 'depth' => $depth, 'max_depth' => $args['max_depth'], 'before' => '<div class="reply">', 'after' => '</div>')));
        ?>

        <?php 
        if ('div' != $args['style']) {
            ?>
        </div>
    <?php 
        }
        ?>
        <?php 
    }
开发者ID:richardbota,项目名称:WordPress-Theme-Development-with-Bootstrap,代码行数:93,代码来源:comment-template.php

示例5: cherry_get_the_post_comment_text

/**
 * Retrieve the text of a comment.
 *
 * @since  4.0.4
 * @global int    $comment_depth
 * @param  array  $args   Arguments.
 * @return string $output Comment's text.
 */
function cherry_get_the_post_comment_text($args)
{
    global $comment_depth;
    ob_start();
    comment_text(get_comment_id(), array_merge($args, array('add_below' => 'div-comment', 'depth' => $comment_depth, 'max_depth' => get_option('thread_comments_depth') ? get_option('thread_comments_depth') : -1)));
    $comment_text = ob_get_contents();
    ob_end_clean();
    /**
     * Filter the text of a comment.
     *
     * @since 4.0.4
     * @param string $comment_text Comment's text.
     * @param array  $args         Arguments.
     */
    return apply_filters('cherry_get_the_post_comment_text', $comment_text, $args);
}
开发者ID:xav335,项目名称:sfnettoyage,代码行数:24,代码来源:template-comments.php

示例6: defined

<?php

defined('ABSPATH') or die('This file can not be loaded directly.');
global $comment_ids;
$comment_ids = array();
foreach ($comments as $comment) {
    if (get_comment_type() == "comment") {
        $comment_ids[get_comment_id()] = ++$comment_i;
    }
}
if (!comments_open()) {
    return;
}
$my_email = get_bloginfo('admin_email');
$str = "SELECT COUNT(*) FROM {$wpdb->comments} WHERE comment_post_ID = {$post->ID} AND comment_approved = '1' AND comment_type = '' AND comment_author_email";
$count_t = $post->comment_count;
date_default_timezone_set(PRC);
$closeTimer = (strtotime(date('Y-m-d G:i:s')) - strtotime(get_the_time('Y-m-d G:i:s'))) / 86400;
?>
<div id="respond" class="no_webshot">
	<?php 
if (get_option('comment_registration') && !is_user_logged_in()) {
    ?>
	<h3 class="queryinfo">
		<?php 
    printf('您必须 <a href="%s">登录</a> 才能发表评论!', wp_login_url(get_permalink()));
    ?>
	</h3>
	<?php 
} elseif (get_option('close_comments_for_old_posts') && $closeTimer > get_option('close_comments_days_old')) {
    ?>
开发者ID:dfc643,项目名称:ARCHIVE-2014-wordpress-theme-backup,代码行数:31,代码来源:comments.php

示例7: comment

        /**
         * Output a single comment.
         *
         * @access protected
         * @since 3.6.0
         *
         * @see wp_list_comments()
         *
         * @param object $comment Comment to display.
         * @param int    $depth   Depth of comment.
         * @param array  $args    An array of arguments.
         */
        protected function comment($comment, $depth, $args)
        {
            if ('div' == $args['style']) {
                $tag = 'div';
                $add_below = 'comment';
            } else {
                $tag = 'li';
                $add_below = 'div-comment';
            }
            ?>
					<<?php 
            echo $tag;
            ?>
 <?php 
            comment_class(empty($args['has_children']) ? '' : 'parent');
            ?>
 id="comment-<?php 
            comment_ID();
            ?>
">
					<?php 
            if ('div' != $args['style']) {
                ?>
					<div id="div-comment-<?php 
                comment_ID();
                ?>
" class="comment-body">
						<?php 
            }
            ?>
                        
                        
                        <div class="comment-author vcard">
                            <?php 
            if (0 != $args['avatar_size']) {
                echo get_avatar($comment, $args['avatar_size']);
            }
            ?>
                            
                            <div class="comment-author-details">
                                <?php 
            printf(__('<h6 class="no-margin-padding">%s</h6>'), get_comment_author_link());
            ?>
                                <div class="comment-meta commentmetadata"><a href="<?php 
            echo esc_url(get_comment_link($comment->comment_ID, $args));
            ?>
">
                                <?php 
            /* translators: 1: date, 2: time */
            printf(__('%1$s at %2$s', 'candy'), get_comment_date('M j, Y'), get_comment_time('G:i'));
            ?>
</a><?php 
            edit_comment_link(__('(Edit)', 'candy'), '&nbsp;&nbsp;', '');
            ?>
                            </div>
                        
                        </div>
					</div>
                    
                    
					<?php 
            if ('0' == $comment->comment_approved) {
                ?>
					<em class="comment-awaiting-moderation"><?php 
                _e('Your comment is awaiting moderation.', 'candy');
                ?>
</em>
					<br />
					<?php 
            }
            ?>
			
					
			
					<?php 
            comment_text(get_comment_id(), array_merge($args, array('add_below' => $add_below, 'depth' => $depth, 'max_depth' => $args['max_depth'])));
            ?>
			
					<div class="reply">
						<?php 
            comment_reply_link(array_merge($args, array('add_below' => $add_below, 'depth' => $depth, 'max_depth' => $args['max_depth'])));
            ?>
					</div>
					<?php 
            if ('div' != $args['style']) {
                ?>
					</div>
					<?php 
//.........这里部分代码省略.........
开发者ID:Calraiser,项目名称:portfolio,代码行数:101,代码来源:comments.php

示例8: comment

    /**
     * Output a single comment.
     *
     * @access protected
     * @since 3.6.0
     *
     * @see wp_list_comments()
     *
     * @param object $comment Comment to display.
     * @param int    $depth   Depth of comment.
     * @param array  $args    An array of arguments.
     */
    protected function comment($comment, $depth, $args)
    {
        if ('div' == $args['style']) {
            $tag = 'div';
            $add_below = 'comment';
        } else {
            $tag = 'li';
            $add_below = 'div-comment';
        }
        ?>
		<<?php 
        echo $tag;
        ?>
 <?php 
        comment_class($this->has_children ? 'parent' : '', $comment);
        ?>
 id="comment-<?php 
        comment_ID();
        ?>
">
		<?php 
        if ('div' != $args['style']) {
            ?>
		<div id="div-comment-<?php 
            comment_ID();
            ?>
" class="comment-body">
		<?php 
        }
        ?>
		<div class="comment-author vcard">
			<div class="row">
				<div class="col-xs-3 col-sm-3 col-md-3 col-lg-2">
					<?php 
        if (0 != $args['avatar_size']) {
            echo get_avatar($comment, $args['avatar_size']);
        }
        ?>
				</div>	
				<div class="col-xs-3 col-sm-3 col-md-3 col-lg-10 text-left">
							<?php 
        printf(__('<span class="fn">%s</span>'), get_comment_author_link($comment));
        ?>
							<div class="comment-meta commentmetadata">
								<span class="comment-time"><?php 
        echo get_comment_time('g:i A');
        ?>
</span>
								<span class="comment-date"><?php 
        echo get_comment_date('j F Y', $comment);
        ?>
</span>
								<?php 
        /* translators: 1: comment date, 2: comment time */
        // printf( __( '%1$s at %2$s' ), get_comment_date( '', $comment ),  get_comment_time() );
        ?>
							</div>
							<?php 
        if ('0' == $comment->comment_approved) {
            ?>
							<em class="comment-awaiting-moderation"><?php 
            _e('Your comment is awaiting moderation.');
            ?>
</em>
							<br />
							<?php 
        }
        ?>

							

							<div class="comment-text"><?php 
        comment_text(get_comment_id(), array_merge($args, array('add_below' => $add_below, 'depth' => $depth, 'max_depth' => $args['max_depth'])));
        ?>
														<?php 
        edit_comment_link(__('(Редактировать)'), '&nbsp;&nbsp;', '');
        ?>
							<ul class="vote">
								<li class="upvote">
									<a href="#"><img src="<?php 
        echo get_template_directory_uri();
        ?>
/images/upvote.png"></a>
									<span>12</span>
								</li>
								<li class="downvote">
									<a href="#"><img src="<?php 
        echo get_template_directory_uri();
//.........这里部分代码省略.........
开发者ID:domalexxx,项目名称:nashvancouver,代码行数:101,代码来源:class-walker-comment.php

示例9: _render_comment

    public static function _render_comment($comment, $args, $depth)
    {
        $tag = 'li';
        $add_below = 'comment';
        if (1 < $depth) {
            $tag = 'div';
        }
        ?>
		<<?php 
        echo $tag;
        ?>
 id="comment-<?php 
        comment_ID();
        ?>
" <?php 
        comment_class('media', $comment);
        ?>
>
			<?php 
        if (('pingback' === $comment->comment_type || 'trackback' === $comment->comment_type) && $args['short_ping']) {
            ?>
				<div class="media-body">
					<h4><?php 
            _e('Pingback:', 'wp-starter-theme');
            ?>
 <?php 
            comment_author_link($comment);
            ?>
</h4>
					<div class="comment-metadata">
						<?php 
            edit_comment_link(__('Edit Pingback', 'wp-starter-theme'), '<span class="edit-pingback">', '</span>');
            ?>
					</div>
			<?php 
        } else {
            ?>
				<?php 
            if (0 != $args['avatar_size']) {
                ?>
					<div class="media-left">
						<?php 
                if (get_comment_author_url($comment)) {
                    ?>
							<a href="<?php 
                    comment_author_url($comment);
                    ?>
" rel="external nofollow">
								<?php 
                    echo get_avatar($comment, $args['avatar_size']);
                    ?>
							</a>
						<?php 
                } else {
                    ?>
							<span>
								<?php 
                    echo get_avatar($comment, $args['avatar_size']);
                    ?>
							</span>
						<?php 
                }
                ?>
					</div>
				<?php 
            }
            ?>
				<div class="media-body">
					<?php 
            if ('0' == $comment->comment_approved) {
                ?>
						<div class="alert alert-info">
							<p><?php 
                _e('Your comment is awaiting moderation.', 'wp-starter-theme');
                ?>
</p>
						</div>
					<?php 
            }
            ?>
					<?php 
            TemplateTags::the_comment_meta($comment, $add_below, $depth, $args['max_depth']);
            ?>
					<div class="comment-content">
						<?php 
            comment_text(get_comment_id(), array_merge($args, array('add_below' => $add_below, 'depth' => $depth, 'max_depth' => $args['max_depth'])));
            ?>
					</div>
			<?php 
        }
        ?>
		<?php 
    }
开发者ID:felixarntz,项目名称:wp-starter-theme,代码行数:93,代码来源:BootstrapComments.php

示例10: milkit_comment

    /**
     * Custom callback for the comment item.
     */
    function milkit_comment($comment, $args, $depth)
    {
        $GLOBALS['comment'] = $comment;
        extract($args, EXTR_SKIP);
        if ('div' == $args['style']) {
            $tag = 'div';
            $add_below = 'comment';
        } else {
            $tag = 'li';
            $add_below = 'div-comment';
        }
        ?>

		<<?php 
        echo esc_attr($tag);
        ?>
 <?php 
        comment_class(empty($args['has_children']) ? 'parent' : '');
        ?>
 id="comment-<?php 
        comment_ID();
        ?>
" itemscope="itemscope" itemtype="http://schema.org/Comment">
			<?php 
        if ('div' != $args['style']) {
            ?>
			<div id="div-comment-<?php 
            comment_ID();
            ?>
" class="comment-body">
			<?php 
        }
        ?>
			<span class="comment-author">
				<?php 
        if (0 != $args['avatar_size']) {
            echo get_avatar($comment, $args['avatar_size']);
        }
        ?>
				<?php 
        printf(__('<cite itemprop="author">%s</cite>'), get_comment_author_link());
        ?>
			</span>

			<?php 
        $time_string = '<time class="entry-date published" itemprop="datePublished" datetime="%1$s">%2$s</time>';
        $time_string = sprintf($time_string, esc_attr(get_comment_date('c')), esc_html(get_comment_date('M j, Y')));
        ?>

			<span class="comment-meta commentmetadata">
				<a href="<?php 
        echo esc_url(get_comment_link($comment->comment_ID, $args));
        ?>
"><?php 
        echo $time_string;
        ?>
</a>
				<?php 
        edit_comment_link(__('(Edit)', 'milkit'), '', '');
        ?>
			</span>

			<?php 
        if ('0' == $comment->comment_approved) {
            ?>
			<em class="comment-awaiting-moderation"><?php 
            _e('Your comment is awaiting moderation.', 'milkit');
            ?>
</em>
			<br />
			<?php 
        }
        ?>

			<div class="comment-text" itemprop="text">
				<?php 
        comment_text(get_comment_id(), array_merge($args, array('add_below' => $add_below, 'depth' => $depth, 'max_depth' => $args['max_depth'])));
        ?>
			</div>

			<?php 
        comment_reply_link(array_merge($args, array('add_below' => $add_below, 'depth' => $depth, 'max_depth' => $args['max_depth'], 'before' => '<div class="reply">', 'after' => '</div>')));
        ?>

			<?php 
        if ('div' != $args['style']) {
            ?>
			</div>
			<?php 
        }
        ?>

		<?php 
    }
开发者ID:scottbaggett,项目名称:guthy-theme,代码行数:97,代码来源:extras.php

示例11: materialist_comment

    function materialist_comment($comment, $args, $depth)
    {
        $GLOBALS['comment'] = $comment;
        switch ($comment->comment_type) {
            case 'pingback':
            case 'trackback':
                // Display trackbacks differently than normal comments.
                ?>
	<li <?php 
                comment_class();
                ?>
 id="comment-<?php 
                comment_ID();
                ?>
">
		<p><?php 
                _e('Pingback:', 'materialist');
                ?>
 <?php 
                comment_author_link();
                ?>
 <?php 
                edit_comment_link(__('(Edit)', 'materialist'), '<span class="edit-link">', '</span>');
                ?>
</p>
	<?php 
                break;
            default:
                // Proceed with normal comments.
                global $post;
                ?>
	<li <?php 
                comment_class();
                ?>
 id="li-comment-<?php 
                comment_ID();
                ?>
">
		<div id="comment-<?php 
                comment_ID();
                ?>
" class="comment-body">
			<div class="comment-author vcard">
				<?php 
                if (0 != $args['avatar_size']) {
                    echo get_avatar($comment, $args['avatar_size']);
                }
                ?>
				<?php 
                printf(__('<cite class="fn">%s</cite>'), get_comment_author_link());
                ?>
			</div>

			<?php 
                if ('0' == $comment->comment_approved) {
                    ?>
			<em class="comment-awaiting-moderation"><?php 
                    _e('Your comment is awaiting moderation.', 'materialist');
                    ?>
</em>
			<br />
			<?php 
                }
                ?>

			<div class="comment-meta commentmetadata">
				<a href="<?php 
                echo esc_url(get_comment_link($comment->comment_ID, $args));
                ?>
">
				<?php 
                echo get_comment_date();
                ?>
				</a>

				<?php 
                edit_comment_link(__('| Edit', 'materalist'), '&nbsp;', '');
                ?>
			</div>

			<?php 
                comment_text(get_comment_id(), array_merge($args, array('add_below' => 'comment', 'depth' => $depth, 'max_depth' => $args['max_depth'])));
                ?>

			<div class="reply">
				<?php 
                comment_reply_link(array_merge($args, array('add_below' => 'comment', 'depth' => $depth, 'max_depth' => $args['max_depth'], 'before' => '<div class="reply">', 'after' => '</div>')));
                ?>
			</div><!-- .reply -->
		</div><!-- #comment-## -->
	<?php 
                break;
        }
        // end comment_type check
    }
开发者ID:viankakrisna,项目名称:materialist,代码行数:95,代码来源:template-tags.php

示例12: mytheme_comment

function mytheme_comment($comment, $args, $depth)
{
    $GLOBALS['comment'] = $comment;
    ?>
  <div class="acommentmsg" data-id="<?php 
    comment_ID();
    ?>
" id="comment-<?php 
    comment_ID();
    ?>
">
    <div class="fl clistavatar"><?php 
    echo get_avatar($comment, $size = '50');
    ?>
</div>
	<div class="fr" style="font-size:20px;color:#f78585;"><?php 
    global $comment_ids;
    $comment_floor = $comment_ids[get_comment_id()];
    echo $comment_floor . '#';
    ?>
</div>
    <div class="clistcontent" style="margin-left:60px;">
      <div class="athead"><span class="light"><?php 
    echo get_comment_author_link();
    ?>
</span><?php 
    echo get_comment_date() . get_comment_time();
    ?>
 <span class="light"><?php 
    comment_reply_link(array_merge($args, array('depth' => $depth, 'max_depth' => $args['max_depth'])));
    ?>
</span></div>
      <div class="atcontent">
        <div class="replycontent"><?php 
    comment_text();
    if ($comment->comment_approved == '0') {
        echo '<font color="#f60"><b>您的评论正在审核!</b></font>';
    }
    ?>
</div>
        </div>
    </div>
  </div>
<?php 
}
开发者ID:wangshijun101,项目名称:morketing.cn,代码行数:45,代码来源:functions.php

示例13: comment

    /**
     * Output a single comment.
     *
     * @access protected
     * @since 3.6.0
     *
     * @see wp_list_comments()
     *
     * @param object $comment Comment to display.
     * @param int    $depth   Depth of comment.
     * @param array  $args    An array of arguments.
     */
    protected function comment($comment, $depth, $args)
    {
        /** @var $ext_instance FW_Extension_FeedBack_Stars */
        $ext_instance = fw()->extensions->get('feedback-stars');
        if (file_exists($ext_instance->locate_view_path('listing-review-html5'))) {
            fw_render_view($ext_instance->locate_view_path('listing-review'), array('comment' => $comment, 'depth' => $depth, 'args' => $args, 'has_children' => $this->has_children, 'stars_number' => $ext_instance->get_max_rating(), 'rate' => get_comment_meta($comment->comment_ID, $ext_instance->field_name, true)), false);
            return;
        }
        if ('div' == $args['style']) {
            $tag = 'div';
            $add_below = 'comment';
        } else {
            $tag = 'li';
            $add_below = 'div-comment';
        }
        ?>
		<<?php 
        echo $tag;
        ?>
 <?php 
        comment_class($this->has_children ? 'parent' : '');
        ?>
 id="comment-<?php 
        comment_ID();
        ?>
">
		<?php 
        if ('div' != $args['style']) {
            ?>
			<div id="div-comment-<?php 
            comment_ID();
            ?>
" class="comment-body">
		<?php 
        }
        ?>
		<div class="comment-author vcard">
			<?php 
        if (0 != $args['avatar_size']) {
            echo get_avatar($comment, $args['avatar_size']);
        }
        ?>
			<?php 
        echo '<cite class="fn">' . get_comment_author_link() . '</cite> <span class="says">' . __('says', 'fw') . ':</span>';
        ?>
		</div>
		<?php 
        if ('0' == $comment->comment_approved) {
            ?>
			<em class="comment-awaiting-moderation"><?php 
            _e('Your comment is awaiting moderation.', 'fw');
            ?>
</em>
			<br />
		<?php 
        }
        ?>

		<div class="comment-meta commentmetadata"><a href="<?php 
        echo esc_url(get_comment_link($comment->comment_ID, $args));
        ?>
">
				<?php 
        /* translators: 1: date, 2: time */
        printf(__('%1$s at %2$s', 'fw'), get_comment_date(), get_comment_time());
        ?>
</a><?php 
        edit_comment_link(__('(Edit)', 'fw'), '&nbsp;&nbsp;', '');
        ?>
		</div>

		<?php 
        comment_text(get_comment_id(), array_merge($args, array('add_below' => $add_below, 'depth' => $depth, 'max_depth' => $args['max_depth'])));
        ?>

		<div class="reply">
			<?php 
        comment_reply_link(array_merge($args, array('add_below' => $add_below, 'depth' => $depth, 'max_depth' => $args['max_depth'])));
        ?>
		</div>
		<?php 
        if ('div' != $args['style']) {
            ?>
			</div>
		<?php 
        }
        ?>
	<?php 
//.........这里部分代码省略.........
开发者ID:northpen,项目名称:project_11,代码行数:101,代码来源:class-fw-feedback-stars-walker.php

示例14: obscure_comment

    /**
     * Template for comments and pingbacks.
     *
     * Used as a callback by wp_list_comments() for displaying the comments.
     */
    function obscure_comment($comment, $args, $depth)
    {
        $GLOBALS['comment'] = $comment;
        switch ($comment->comment_type) {
            case '':
                ?>
	<li <?php 
                comment_class();
                ?>
 id="li-comment-<?php 
                comment_ID();
                ?>
">
		<div id="comment-<?php 
                comment_ID();
                ?>
">
		<div class="comment-info clearfix">
            <div class="comment-avatar clearfix">
                <?php 
                echo get_avatar($comment, 48);
                ?>
            </div><!-- .comment-author .vcard -->
    
            <div class="comment-meta commentmetadata">
            	<span class="comment-author vcard"><?php 
                comment_author_link();
                ?>
</span>
                <?php 
                /* translators: 1: date, 2: time, 3: permalink */
                printf(__('%1$s at %2$s | <a href="#comment-%3$s">Permalink</a> | ', 'obscure'), get_comment_date(), get_comment_time(), get_comment_id());
                comment_reply_link(array_merge($args, array('depth' => $depth, 'max_depth' => $args['max_depth'])));
                ?>
            </div><!-- .comment-meta .commentmetadata -->
        </div>

		<div class="comment-body"><?php 
                comment_text();
                ?>
</div>
        <?php 
                if ($comment->comment_approved == '0') {
                    ?>
			<em><?php 
                    _e('Your comment is awaiting moderation.', 'obscure');
                    ?>
</em>
			<br />
		<?php 
                }
                ?>
	</div><!-- #comment-##  -->

	<?php 
                break;
            case 'pingback':
            case 'trackback':
                ?>
	<li class="post pingback">
    	<div id="comment-<?php 
                comment_ID();
                ?>
">
        	<div class="comment-info clearfix">
            	<div class="comment-body">
					<p><?php 
                _e('Pingback:', 'obscure');
                ?>
 <?php 
                comment_author_link();
                edit_comment_link(__('(Edit)', 'obscure'), ' ');
                ?>
</p>
				</div>
            </div>
		</div>
	<?php 
                break;
        }
    }
开发者ID:rfyiamcool,项目名称:solrex,代码行数:86,代码来源:functions.php

示例15: add_quote_button_filter

function add_quote_button_filter($output) {

	global $user_ID;
	if (get_option('comment_registration') && !$user_ID) {
		
		return $output;
		
	} else if (!is_feed() && comments_open()) {

		$commentID = get_comment_id();

		if (function_exists('mcecomment_init')) {
			$mce = ", true";
		} else {
			$mce = ", false";
		}

		// quote link
		$button = "";
		$button .= '</a>&nbsp;&nbsp;';
		$button .= '<span id="name'.get_comment_ID().'" style="display: none;">'.get_comment_author().'</span>';
		$button .= '<a class="comment_quote_link" ';
		$button .= 'href="javascript:void(null)" ';
		$button .= 'title="' . __('Click here or select text to quote comment', 'quote-comments'). '" ';
		
		if( get_option('quote_comments_author') == true ) {
			$button .= 'onmousedown="quote(\'' . get_comment_ID() .'\', document.getElementById(\'name'.get_comment_ID().'\').innerHTML, \'comment\',\'div-comment-'. get_comment_ID() .'\''. $mce .');';
		} else {
			$button .= 'onmousedown="quote(\'' . get_comment_ID() .'\', null, \'comment\',\'div-comment-'. get_comment_ID() .'\''. $mce .');';
		}
		
		$button .= 'try { addComment.moveForm(\'div-comment-'.get_comment_ID().'\', \''.get_comment_ID().'\', \'respond\', \''.get_the_ID().'\'); } catch(e) {}; ';
		$button .= 'return false;">';
		$button .= "" . get_option('quote_comments_title') . "";
		
		
		// reply link
		if (get_option('quote_comments_replylink') == true) {
			$button .= '</a>&nbsp;&nbsp;';
			$button .= '<a class="comment_reply_link" href="javascript:void(null)" ';
			$button .= 'title="' . __('Click here to respond to author', 'quote-comments'). '" ';
			$button .= 'onmousedown="inlinereply(\'' . get_comment_ID() .'\', document.getElementById(\'name'.get_comment_ID().'\').innerHTML, \'comment\',\'div-comment-'. get_comment_ID() .'\''. $mce .');';
			$button .= 'try { addComment.moveForm(\'div-comment-'.get_comment_ID().'\', \''.get_comment_ID().'\', \'respond\', \''.get_the_ID().'\'); } catch(e) {}; ';
			$button .= 'return false;">';
			$button .= "" . get_option('quote_comments_replytitle') . "";
		}
		
		// close anchor link if body text
		if (get_option('quote_comments_pluginhook') == "get_comment_text") {
			$button .= "</a>";
		}



		if (comments_open() && have_comments() && get_comment_type() != "pingback" && get_comment_type() != "trackback") {
			return($output . $button);
		}

	
	} else {
	
		return($output . $button);
	
	}



}
开发者ID:nagoldivad,项目名称:quote-comments,代码行数:68,代码来源:quote-comments.php


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