Skip to:
Content
Pages
Categories
Search
Top
Bottom

alt attribute missing for bing search

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

  • Robin W
    Moderator

    @robin-w

    I think this does what you want

    add_filter ('bbp_get_reply_author_avatar', 'rew_avatar', 10 , 3) ;
    add_filter ('bbp_get_topic_author_avatar', 'rew_avatar' , 10 , 3) ;
    
    function rew_avatar ( $author_avatar, $id, $size)  {
    	if ( bbp_is_reply( $id ) ) {
    		$author = bbp_get_reply_author_display_name( $id );
    		$text = 'alt="icon avatar for '.$author.'"' ; 
    	}
    	if ( bbp_is_topic( $id ) ) {
    		$author = bbp_get_topic_author_display_name( $id );
    		$text = 'alt="icon avatar for '.$author.'"' ; 
    	}
    	$author_avatar = str_replace('alt=\'\'',$text,$author_avatar);
    return $author_avatar ;
    }

    Clivesmith
    Participant

    @clivesmith

    Hi Robin,
    That looks great, I will try it.
    Thank you
    Clive


    Clivesmith
    Participant

    @clivesmith

    Hi Robin,
    Works great, thank you


    Robin W
    Moderator

    @robin-w

    🙂

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.
Skip to toolbar