Exemplo n.º 1
0
function prologue_comment_depth( $comment_id ) {
	echo prologue_get_comment_depth( $comment_id );
}
Exemplo n.º 2
0
function p2_responsive_comments($comment, $args)
{
    $GLOBALS['comment'] = $comment;
    if (!is_single() && get_comment_type() != 'comment') {
        return;
    }
    $depth = prologue_get_comment_depth(get_comment_ID());
    $can_edit_post = current_user_can('edit_post', $comment->comment_post_ID);
    $reply_link = prologue_get_comment_reply_link(array('depth' => $depth, 'max_depth' => $args['max_depth'], 'before' => ' | ', 'reply_text' => __('Reply', 'p2')), $comment->comment_ID, $comment->comment_post_ID);
    $content_class = 'commentcontent';
    if ($can_edit_post) {
        $content_class .= ' comment-edit';
    }
    ?>
	<li id="comment-<?php 
    comment_ID();
    ?>
" <?php 
    comment_class();
    ?>
>
		<?php 
    do_action('p2_comment');
    ?>

		<?php 
    echo get_avatar($comment, 32);
    ?>
		<h4>
			<?php 
    echo get_comment_author_link();
    ?>
			<span class="meta">
				<?php 
    echo p2_date_time_with_microformat('comment');
    ?>

			</span>
		</h4>
		<div id="commentcontent-<?php 
    comment_ID();
    ?>
" class="<?php 
    echo esc_attr($content_class);
    ?>
"><?php 
    echo apply_filters('comment_text', $comment->comment_content);
    if ($comment->comment_approved == '0') {
        ?>
					<p><em><?php 
        esc_html_e('Your comment is awaiting moderation.', 'p2');
        ?>
</em></p>
				<?php 
    }
    ?>

				<span class="actions">
					<a href="<?php 
    echo esc_url(get_comment_link());
    ?>
"><?php 
    _e('Permalink', 'p2');
    ?>
</a>
					<?php 
    echo $reply_link;
    if ($can_edit_post) {
        edit_comment_link(__('Edit', 'p2'), ' | ');
    }
    ?>
				</span>
		</div>

	<?php 
}