bp_dtheme_before_comment_form

Adds the user's avatar before the comment form box.

Description

bp_dtheme_before_comment_form(); 

The comment_form_top action is used to insert our HTML within

so that the nested comments comment-reply javascript moves the entirety of the comment reply area.


Usage

  1. if ( !function_exists( 'bp_dtheme_before_comment_form' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-themes/bp-default/functions.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = bp_dtheme_before_comment_form(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/bp-themes/bp-default/functions.php  
  1. function bp_dtheme_before_comment_form() { 
  2. ?> 
  3. <div class="comment-avatar-box"> 
  4. <div class="avb"> 
  5. <?php if ( bp_loggedin_user_id() ) : ?> 
  6. <a href="<?php echo bp_loggedin_user_domain(); ?>"> 
  7. <?php echo get_avatar( bp_loggedin_user_id(), 50 ); ?> 
  8. </a> 
  9. <?php else : ?> 
  10. <?php echo get_avatar( 0, 50 ); ?> 
  11. <?php endif; ?> 
  12. </div> 
  13. </div> 
  14.  
  15. <div class="comment-content standard-form"> 
  16. <?php