Ejemplo n.º 1
0
        ?>
</p>
    <?php 
        break;
    default:
        $depth = yit_comment_depth(get_comment_ID());
        ?>
<li <?php 
        comment_class(yit_comment_has_children($comment->comment_ID) ? ' parent' : '');
        ?>
 id="li-comment-<?php 
        comment_ID();
        ?>
">
    <div class="<?php 
        echo 'offset' . (yit_comment_depth(get_comment_ID()) - 1) . ' span' . (10 - yit_comment_depth(get_comment_ID()));
        ?>
">
        <div id="comment-<?php 
        comment_ID();
        ?>
" class="comment-container">
            <div class="row">
                <div class="span2">
                    <div class="comment-author vcard <?php 
        echo $isAuthorPostClass;
        ?>
">
                        <?php 
        echo get_avatar($comment, 98);
        ?>
Ejemplo n.º 2
0
    /**
     * Print comments
     *
     * @param object $comment
     * @param array $args
     * @param int $depth
     * @return string
     * @since 1.0.0
     */
    function yit_comment( $comment, $args, $depth ) {

        $GLOBALS['comment'] = $comment;

        switch ( $comment->comment_type ) :
            case 'pingback'  :
            case 'trackback' :
        ?>
        <li class="post pingback">
            <p><?php _e( 'Pingback:', 'yit' ); ?> <?php comment_author_link(); ?><?php edit_comment_link( __('(Edit)', 'yit'), ' ' ); ?></p>
        <?php
                break;

            default:
        ?>
        <li <?php comment_class( yit_comment_has_children( $comment->comment_ID ) ? ' parent' : '' ); ?> id="li-comment-<?php comment_ID(); ?>">
            <div class="<?php echo 'offset' . ( yit_comment_depth( get_comment_ID() ) - 1 ) . ' span' . ( 10 - yit_comment_depth( get_comment_ID() ) ) ?>">
                <div id="comment-<?php comment_ID(); ?>" class="comment-container">
                	<div class="border-bottom-line border"></div>
                	<div class="vertical-top-line border"></div>
                    <!--<div class="parent-line"><span></span></div>-->
                    <div class="row">
                        <div class="comment-author vcard span3">
                            <div class="row">
                                <div class="span1"><span class="border"><?php echo get_avatar( $comment, 64 ); ?></span></div>
                                <!--<img src="<?php echo YIT_THEME_TEMPLATES_URL ?>/comments/images/horizontal-lines.png" class="horizontal-lines-left" />-->
                                <!--<img src="<?php echo YIT_THEME_TEMPLATES_URL ?>/comments/images/horizontal-lines.png" class="horizontal-lines-right" />-->
                                <div class="comment-meta commentmetadata reply comment-author-name comment-date span2">
                                    <!-- author name -->
                                    <?php printf( '<cite class="fn">%s</cite>', get_comment_author_link() ); ?>

                                    <!-- date -->
                                    <a class="date" href="<?php echo esc_url( get_comment_link( $comment->comment_ID ) ); ?>">
                                    <?php
                                        /* translators: 1: date, 2: time */
                                        printf( __( '%1$s', 'yit' ), get_comment_date( 'M, j - Y' ) ); ?></a>

                                    <!-- reply -->
                                    <?php
                                    comment_reply_link( array_merge( $args, array(
                                        'depth' => $depth,
                                        'max_depth' => $args['max_depth'],
                                        'reply_text' => apply_filters( 'yit_comment_reply_link_text', '<img class="comment-reply-link" src="' . YIT_THEME_TEMPLATES_URL . '/comments/images/comment-reply-link.png" title="' . __( 'reply', 'yit' ) . '" alt="+" />' . __( 'reply', 'yit' ) )
                                    ) ) ); ?>
                                </div><!-- .reply -->
                            </div>
                        </div><!-- .comment-author .vcard -->

                        <div class="comment-content span<?php echo 7 - yit_comment_depth( get_comment_ID() ) ?>">
                            <div class="border borderstrong">
                            	<div class="border">
	                                <?php if ( $comment->comment_approved == '0' ) : ?>
	                                    <em class="moderation"><?php _e( 'Your comment is awaiting moderation.', 'yit' ); ?></em>
	                                    <br />
	                                <?php endif; ?>
	                                <div class="comment-body"><?php comment_text(); ?></div>
	                        	</div>
                            </div>
                        </div><!-- .comment-meta .commentmetadata -->
                    </div>
                </div><!-- #comment-##  -->
            </div>
        <?php
                break;
        endswitch;
    }
 /**
  * Retrieve a comment depth
  * 
  * @param int $comment_id
  * @return int
  * @since 1.0.0
  */
 function yit_comment_depth($comment_id = null)
 {
     $depth = 1;
     $comment = get_comment($comment_id);
     if ((int) $comment->comment_parent != 0) {
         $depth += yit_comment_depth($comment->comment_parent);
     }
     return $depth;
 }
Ejemplo n.º 4
0
        ?>
</p>
    <?php 
        break;
    default:
        $depth = yit_comment_depth(get_comment_ID());
        ?>
<li <?php 
        comment_class(yit_comment_has_children($comment->comment_ID) ? ' parent' : '');
        ?>
 id="li-comment-<?php 
        comment_ID();
        ?>
">
    <div class="<?php 
        echo 'nested' . (yit_comment_depth(get_comment_ID()) - 1);
        ?>
">
        <div id="comment-<?php 
        comment_ID();
        ?>
" class="comment-container">
            <div class="row">
                <div class="span3 infos">
                    <div class="comment-author vcard <?php 
        echo $isAuthorPostClass;
        ?>
">
                        <?php 
        echo get_avatar($comment, 98);
        ?>