Esempio n. 1
0
/**
* Displays individual comments
* Uses the callback parameter for wp_list_comments
* Overwrites the default display of comments
*
* @since 0.2.3
*
* @param $comment The comment variable
* @param $args Array of arguments passed from wp_list_comments
* @param $depth What level the particular comment is
*/
function hybrid_comments_callback($comment, $args, $depth)
{
    $GLOBALS['comment'] = $comment;
    $GLOBALS['comment_depth'] = $depth;
    ?>

	<li id="comment-<?php 
    comment_ID();
    ?>
" class="<?php 
    hybrid_comment_class();
    ?>
">

		<?php 
    hybrid_avatar();
    // Avatar filter
    ?>
<div class="comment-meta-data">

			<div class="comment-author vcard">
				<?php 
    hybrid_comment_author();
    ?>
			</div>

			<abbr class="comment-time" title="<?php 
    comment_date(__('F jS, Y, g:i a (P - e)', 'hybrid'));
    ?>
">
				<?php 
    printf(__('%1$s at %2$s', 'hybrid'), get_comment_date(), get_comment_time());
    ?>
			</abbr> 

			<span class="separator">|</span> 
			<a class="permalink" href="#comment-<?php 
    comment_ID();
    ?>
" title="<?php 
    _e('Permalink to comment', 'hybrid');
    ?>
"><?php 
    _e('Permalink', 'hybrid');
    ?>
</a>

			<?php 
    if (get_option('thread_comments') && ($args['type'] == 'all' || get_comment_type() == 'comment')) {
        $max_depth = get_option('thread_comments_depth');
        echo comment_reply_link(array('reply_text' => __('Reply', 'hybrid'), 'login_text' => __('Log in to reply.', 'hybrid'), 'depth' => $depth, 'max_depth' => $max_depth, 'before' => '<span class="separator">|</span> <span class="comment-reply-link">', 'after' => '</span>'));
    }
    ?>

			<?php 
    edit_comment_link('<span class="edit">' . __('Edit', 'hybrid') . '</span>', ' <span class="separator">|</span> ', '');
    ?>
 

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

		</div>

		<div class="comment-text">
			<?php 
    comment_text();
    ?>
		</div>
<?php 
}
Esempio n. 2
0
<li <?php 
hybrid_comment_attributes();
?>
>
  <div class="row">
    <div class="col-sm-2">
    	<?php 
echo hybrid_avatar();
?>

    </div>
    <div class="col-sm-10">
    	<?php 
echo apply_atomic_shortcode('comment_meta', '<div class="comment-meta">[comment-author] [comment-published] [comment-permalink before="| "] [comment-edit-link before="| "]</div>');
?>

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

    	<?php 
echo hybrid_comment_reply_link_shortcode(array());
?>

    </div>

  </div>