Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
02/01/2010 04:42:04 PM (15 years ago)
Author:
apeatling
Message:

Removing fetching of BP details on comment template since this is now done via filters.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-themes/bp-default/functions.php

    r2485 r2527  
    6161
    6262function bp_dtheme_blog_comments( $comment, $args, $depth ) {
    63     $GLOBALS['comment'] = $comment;
    64     $comment_type = get_comment_type();
    65 
    66     if ( $comment->user_id )
    67         $userlink = bp_core_get_user_domain( $comment->user_id );
    68 
    69     if ( $comment_type == 'comment' ) { ?>
    70         <li <?php comment_class(); ?> id="comment-<?php comment_ID(); ?>">
    71 
    72             <div class="comment-avatar-box<?php if ( $comment->user_id ) : ?> extra<?php endif; ?>">
    73                 <div class="avb">
    74                     <a href="<?php if ( $userlink ) : echo $userlink; else : echo get_comment_author_url(); endif;?>">
    75                         <?php echo get_avatar( $comment, 50 ); ?>
    76                     </a>
    77                 </div>
     63    $GLOBALS['comment'] = $comment; ?>
     64
     65    <li <?php comment_class(); ?> id="comment-<?php comment_ID(); ?>">
     66        <div class="comment-avatar-box">
     67            <div class="avb">
     68                <a href="<?php echo get_comment_author_url() ?>">
     69                    <?php echo get_avatar( $comment, 50 ); ?>
     70                </a>
    7871            </div>
    79 
    80             <div class="comment-content">
    81 
    82                 <div class="comment-meta">
    83                     <a href="<?php if ( $userlink ) : echo $userlink; else : echo get_comment_author_url(); endif;?>"><?php echo get_comment_author(); ?></a> <?php _e( 'said:', 'buddypress' ) ?>
    84                     <em><?php _e( 'On', 'buddypress' ) ?> <a href="#comment-<?php comment_ID() ?>" title=""><?php comment_date() ?></a></em>
    85                 </div>
    86 
    87                 <?php if ($comment->comment_approved == '0') : ?>
    88                     <em class="moderate"><?php _e('Your comment is awaiting moderation.'); ?></em><br />
    89                 <?php endif; ?>
    90 
    91                 <?php comment_text() ?>
    92 
    93                 <div class="comment-options">
    94                     <?php echo comment_reply_link( array('depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ?>
    95                     <?php edit_comment_link( __( 'Edit' ),'','' ); ?>
    96                 </div>
    97 
     72        </div>
     73
     74        <div class="comment-content">
     75
     76            <div class="comment-meta">
     77                <a href="<?php echo get_comment_author_url() ?>"><?php echo get_comment_author(); ?></a> <?php _e( 'said:', 'buddypress' ) ?>
     78                <em><?php _e( 'On', 'buddypress' ) ?> <a href="#comment-<?php comment_ID() ?>" title=""><?php comment_date() ?></a></em>
    9879            </div>
    99         </li>
    100     <?php } ?>
     80
     81            <?php if ($comment->comment_approved == '0') : ?>
     82                <em class="moderate"><?php _e('Your comment is awaiting moderation.'); ?></em><br />
     83            <?php endif; ?>
     84
     85            <?php comment_text() ?>
     86
     87            <div class="comment-options">
     88                <?php echo comment_reply_link( array('depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ?>
     89                <?php edit_comment_link( __( 'Edit' ),'','' ); ?>
     90            </div>
     91
     92        </div>
     93    </li>
    10194<?php
    10295}
Note: See TracChangeset for help on using the changeset viewer.