示例#1
0
/**
 * Displays current comment
 *
 * @since 1.0
 *
 * @param object $comment Comment data object.
 * @param array $args
 * @param int $depth Depth of comment in reference to parents.
 */
function k2_comment_start_el($comment, $args = array(), $depth = 1)
{
    $GLOBALS['comment'] = $comment;
    extract($args, EXTR_SKIP);
    ?>

	<li id="comment-<?php 
    comment_ID();
    ?>
">
		<div <?php 
    comment_class();
    ?>
>

			<div class="comment-head">
				<?php 
    if (get_option('show_avatars')) {
        ?>
					<span class="gravatar">
						<?php 
        echo get_avatar($comment, 32);
        ?>
					</span>
				<?php 
    }
    ?>

				<span class="comment-author"><?php 
    comment_author_link();
    ?>
</span>

				<div class="comment-meta">
					<a href="#comment-<?php 
    comment_ID();
    ?>
" title="<?php 
    _e('Permanent Link to this Comment', 'unwakeable');
    ?>
">
						<?php 
    if (function_exists('time_since')) {
        printf(__('%s ago.', 'unwakeable'), time_since(abs(strtotime($comment->comment_date_gmt . ' GMT')), time()));
    } else {
        printf(__('%1$s at %2$s', 'unwakeable'), get_comment_date(), get_comment_time());
    }
    ?>
					</a>
				</div><!-- .comment-meta -->
			</div><!-- .comment-head -->

			<div class="comment-content">
				<?php 
    if (!$comment->comment_approved) {
        ?>
				<p class="comment-moderation alert"><?php 
        _e('Your comment is awaiting moderation.', 'unwakeable');
        ?>
</p>
				<?php 
    }
    ?>

				<?php 
    comment_text();
    ?>
 
			</div><!-- .comment-content -->

			<div class="buttons">
				<?php 
    if (function_exists('quoter_comment')) {
        quoter_comment();
    }
    ?>
	
				<?php 
    if (function_exists('jal_edit_comment_link')) {
        jal_edit_comment_link(__('Edit', 'unwakeable'), '<span class="comment-edit">', '</span>', '<em>(Editing)</em>');
    } else {
        edit_comment_link(__('Edit', 'unwakeable'), '<span class="comment-edit">', '</span>');
    }
    ?>

				<?php 
    if (function_exists('comment_reply_link')) {
        ?>
				<div id="comment-reply-<?php 
        comment_ID();
        ?>
" class="comment-reply">
					<?php 
        comment_reply_link(array_merge($args, array('add_below' => 'comment-reply', 'depth' => $depth, 'max_depth' => $args['max_depth'])));
        ?>
				</div>
				<?php 
    }
    ?>
			</div><!-- .buttons -->


		</div><!-- comment -->
<?php 
}
示例#2
0
 item" id="comment-<?php 
            comment_ID();
            ?>
">
			<div class="fix">
				<div class="author_meta">
					<a href="#comment-<?php 
            comment_ID();
            ?>
" title="Comment Permalink"><?php 
            comment_date('M jS, Y');
            ?>
</a><br />
					<?php 
            if (function_exists('quoter_comment')) {
                quoter_comment();
            }
            ?>
<br />
					<?php 
            edit_comment_link('edit this', '(', ')');
            ?>
				</div>
				<div class="comment_text">
				  <div class="comment-author"><?php 
            comment_author_link();
            ?>
</div>
					<?php 
            if ($comment->comment_approved == '0') {
                ?>
示例#3
0
function greenery_10_comment($comment, $args, $depth)
{
    global $relax_comment_count;
    $GLOBALS['comment'] = $comment;
    extract($args, EXTR_SKIP);
    ?>
	<li <?php 
    comment_class(empty($args['has_children']) ? 'item' : 'item parent');
    ?>
 id="comment-<?php 
    comment_ID();
    ?>
" >
		<div id="div-comment-<?php 
    comment_ID();
    ?>
">
		<div class="commentcounter"><?php 
    echo $relax_comment_count;
    ?>
</div>
		
			<div class="comment-author vcard">
				<div class="commentgravatar">
					<?php 
    if ($args['avatar_size'] != 0) {
        echo get_avatar($comment, $args['avatar_size']);
    }
    ?>
				</div>
			
				<h3 class="commenttitle"><span class="fn"><?php 
    comment_author_link();
    ?>
</span> <?php 
    _e('said');
    ?>
,</h3>
			</div>
			<p class="commentmeta comment-meta commentmetadata">
				<a href="<?php 
    echo htmlspecialchars(get_comment_link($comment->comment_ID));
    ?>
">
					<?php 
    comment_date();
    ?>
 @ <?php 
    comment_time();
    ?>
				</a>
				<?php 
    if (function_exists('quoter_comment')) {
        quoter_comment();
    }
    ?>
				<?php 
    edit_comment_link(__("Edit"), ' &#183; ', '');
    ?>
	
			</p>
			<?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 
    $relax_comment_count++;
}
示例#4
0
    function k2_comment_type_switch($comment, $args, $depth = 1)
    {
        $GLOBALS['comment'] = $comment;
        switch ($comment->comment_type) {
            case '':
                ?>
		<li id="comment-<?php 
                comment_ID();
                ?>
">
			<div <?php 
                comment_class();
                ?>
>
				<div class="comment-head">
				<?php 
                if (get_option('show_avatars')) {
                    ?>
					<span class="gravatar"><?php 
                    echo get_avatar($comment, 32);
                    ?>
</span>
				<?php 
                }
                ?>
					<span class="comment-author"><?php 
                comment_author_link();
                ?>
</span>

					<div class="comment-meta">
						<a href="<?php 
                echo esc_url(get_comment_link($comment->comment_ID));
                ?>
" title="<?php 
                _e('Permalink to this Comment', 'k2');
                ?>
">
						<?php 
                if (function_exists('time_since')) {
                    printf(__('%s ago.', 'k2'), time_since(abs(strtotime($comment->comment_date_gmt . ' GMT')), time()));
                } else {
                    /* translators: 1: comment date, 2: comment time */
                    printf(__('%1$s at %2$s', 'k2'), get_comment_date(), get_comment_time());
                }
                ?>
						</a>
					</div> <!-- .comment-meta -->

				</div> <!-- .comment-head -->

				<div class="comment-content">
				<?php 
                if ($comment->comment_approved == '0') {
                    ?>
					<p class="comment-moderation alert"><?php 
                    _e('Your comment is awaiting moderation.', 'k2');
                    ?>
</p>
				<?php 
                }
                ?>

					<?php 
                comment_text();
                ?>
				</div> <!-- .comment-content -->

				<div class="buttons">
					<?php 
                if (function_exists('quoter_comment')) {
                    quoter_comment();
                }
                ?>

					<?php 
                if (function_exists('jal_edit_comment_link')) {
                    jal_edit_comment_link(__('Edit', 'k2'), '<span class="comment-edit">', '</span>', '<em>(Editing)</em>');
                } else {
                    edit_comment_link(__('Edit', 'k2'), '<span class="comment-edit">', '</span>');
                }
                ?>

					<div id="comment-reply-<?php 
                comment_ID();
                ?>
" class="comment-reply">
						<?php 
                comment_reply_link(array_merge($args, array('add_below' => 'comment-reply', 'depth' => $depth, 'max_depth' => $args['max_depth'])));
                ?>
					</div> <!-- .comment-reply -->

				</div> <!-- .buttons -->

			</div> <!-- .comment -->
		<?php 
                break;
            case 'pingback':
            case 'trackback':
                ?>
		<li id="comment-<?php 
                comment_ID();
                ?>
">
			<div <?php 
                comment_class();
                ?>
>

				<?php 
                if (function_exists('comment_favicon')) {
                    ?>
					<span class="favatar"><?php 
                    comment_favicon();
                    ?>
</span>
				<?php 
                }
                ?>

					<span class="comment-author"><?php 
                comment_author_link();
                ?>
</span>

					<div class="comment-meta">
					<?php 
                /* translators: 1: comment type (Pingback or Trackback), 2: datetime */
                printf(__('%1$s on %2$s', 'k2'), $comment->comment_type == 'pingback' ? '<span class="pingback">' . __('Pingback', 'k2') . '</span>' : '<span class="trackback">' . __('Trackback', 'k2') . '</span>', sprintf('<a href="%1$s" title="%2$s">%3$s</a>', esc_url(get_comment_link($comment->comment_ID)), function_exists('time_since') ? sprintf(esc_attr__('%s ago.', 'k2'), time_since(abs(strtotime($comment->comment_date_gmt . " GMT")), time())) : esc_attr__('Permalink to this Comment', 'k2'), sprintf(__('%1$s at %2$s', 'k2'), get_comment_date(__('M jS, Y', 'k2')), get_comment_time())));
                edit_comment_link(__('Edit', 'k2'), '<span class="comment-edit">', '</span>');
                ?>
					</div> <!-- .comment-meta -->

			</div> <!-- .comment -->
		<?php 
                break;
        }
    }