Forums

Join
bbPress Support ForumsTroubleshootingCustom avatar function broken in 1.0 rc2

Info

Custom avatar function broken in 1.0 rc2

  1. Hi all,
    In "bbPress 9.0.5" I used a custom function to display author avatar outside the topic.php, I try the same function on bbPress 1.0 rc 2 and no longer works, can you help me?

    Custom function:

    function topic_author_avatar( $size = '50', $default = '', $post_id = 0 ) {
    	if ( ! bb_get_option('avatars_show') )
    		return false;
    
      $author_id = get_topic_author();
    	if ( $link = get_user_link( $author_id ) ) {
    		echo '<a href="' . attribute_escape( $link ) . '">' . bb_get_avatar( $author_id, $size, $default ) . '</a>';
    	} else {
    		echo bb_get_avatar( $author_id, $size, $default );
    	}
    }
  2. Ok, I find a solution :

    <?php echo bb_get_avatar( $member->ID ); ?>

  3. You must log in to post.