Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Paul Bearne

    (@pbearne)

    have a look at the fliters

    http://authoravatars.wordpress.com/documentation/developers-guide/

    and see if you use them

    Paul

    Thread Starter joshholmes90

    (@joshholmes90)

    The avatar and name replaces the {users} tag, so how am I meant to add a
    between them?

    Plugin Author Paul Bearne

    (@pbearne)

    Well spotted

    I have just added some more

    new version here https://github.com/pbearne/wp-author-avatars/archive/master.zip

    $html = '';
    		$html .= sprintf( apply_filters( 'aa_user_avatar_template', '<span class="avatar" title="%s">%s</span>',$title, $avatar ), $title, $avatar  );
    		if ( $this->show_name || $this->show_bbpress_post_count || $this->show_postcount ) {
    			$html .=  sprintf( apply_filters( 'aa_user_name_template', '<span class="name">%s</span>', $name ), $name );		}
    
    		if ( $link ) {
    			$html = sprintf( apply_filters( 'aa_user_link_template', '<a href="%s" title="%s">%s</a>', $link , $title  , $html ), $link , $title , $html );
    		}
    
    		if ( $email ) {
    			$html .=  sprintf( apply_filters( 'aa_user_email_template', '<div class="email">%s</div>', $email ), $email );
    		}
    
    		if ( $biography ) {
    			$html .= sprintf( apply_filters( 'aa_user_biography_template', '<div class="biography">%s</div>', $biography ), $biography );
    		}
    
    		$tpl_vars['{class}'] = implode( $divcss, ' ' );
    		$tpl_vars['{user}']  =  apply_filters( 'aa_user_final_content', $html, $user );
    
    		return str_replace( array_keys( $tpl_vars ), $tpl_vars, apply_filters( 'aa_user_template', $this->user_template, $user ) );

    use them like this (not tested)

    add_filter( 'aa_user_link_template', 'link_template', 	20, 3 );
    
        function link_template ($s, $d, $f){
    $s = replace('XXXX','YYYYY');
            return $s;
        }

    Please test and see it this works for you

    I will push this in the next version and update the docs

    Paul

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Adding line breaks between avatar image and user name.’ is closed to new replies.