Пример #1
0
    /**
     * function start_el()
     *
     * Output opening and body of comments.
     *
     * @param string $output Passed by reference. Used to append additional content.
     * @param object $comment Comment data object.
     * @param int $depth Depth of comment in reference to parents.
     * @param array $args
     * @since 1.5
     */
    function start_el(&$output, $comment, $depth, $args)
    {
        $depth++;
        $GLOBALS['comment_depth'] = $depth;
        $GLOBALS['comment'] = $comment;
        extract($args, EXTR_SKIP);
        $classes = comment_class(empty($args['has_children']) ? '' : 'parent', $comment, '', false);
        ?>
					<dt <?php 
        echo $classes;
        ?>
 id="comment-<?php 
        comment_ID();
        ?>
">
<?php 
        thesis_hook_before_comment_meta();
        thesis_comment_meta(did_action('thesis_hook_before_comment_meta'));
        thesis_hook_after_comment_meta();
        ?>
					</dt>
					<dd <?php 
        echo $classes;
        ?>
>
						<div class="format_text" id="comment-body-<?php 
        comment_ID();
        ?>
">
<?php 
        if ($comment->comment_approved == '0') {
            ?>
							<p class="comment_moderated"><?php 
            _e('Your comment is awaiting moderation.', 'thesis');
            ?>
</p>
<?php 
        }
        comment_text();
        thesis_hook_after_comment();
        if (get_option('thread_comments')) {
            ?>
							<p class="reply"><?php 
            comment_reply_link(array_merge($args, array('add_below' => 'comment-body', 'depth' => $depth, 'max_depth' => $args['max_depth'])));
            ?>
</p>
<?php 
        }
        ?>
						</div>
<?php 
        // </dd> excluded as it is added by end_el().
    }
Пример #2
0
 function build($comment)
 {
     global $thesis_design;
     $this->meta = $thesis_design->comments['comments']['options']['meta'];
     if (is_array($this->meta)) {
         foreach ($this->meta as $element_name => $element) {
             if ($element['show']) {
                 $output .= call_user_func(array($this, $element_name), $comment) . "\n";
             }
         }
     }
     thesis_hook_before_comment_meta();
     if ($output) {
         echo $output;
     }
     thesis_hook_after_comment_meta();
 }