Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re-add the standard avatar classes

  • Avatar of Melindrea
    Melindrea
    Participant

    @melindrea

    On line 686 of bp-core-avatars.php, BuddyPress hooks into get_avatar to see if there is a locally-uploaded avatar. However, bp_core_fetch_avatar strips out (okay, technically just never puts them in) the standard classes (avatar-$size, photo). Is there a way to get those classes back without needing to hack the code?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Avatar of Melindrea
    Melindrea
    Participant

    @melindrea

    Alright, I in the end hooked into the bp_core_avatar_class-filter.

    Avatar of r-a-y
    r-a-y
    Moderator

    @r-a-y

    Cool, glad you figured out how to use the filter!

    Avatar of Hugo
    Hugo
    Moderator

    @hnla

    Filters can be difficult to figure out ; examples of how people arrived at their solution are always useful for anyone else searching on this topic.

    Avatar of Melindrea
    Melindrea
    Participant

    @melindrea

    I still find it somewhat odd that I should need to hook into the filter to put **back** functionality…

    Avatar of Paul Gibbs
    Paul Gibbs
    Keymaster

    @djpaul

    If you think it’s a problem, please create an enhancement ticket on https://buddypress.trac.wordpress.org/, using your username and password that you used to log into this site, explaining why you think the behaviour should be changed, and we’ll take a look at it.

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

You must be logged in to reply to this topic.