Skip to:

Opened 12 years ago

Closed 12 years ago

#3922 closed enhancement (fixed)

Add filter to bp-core-avatars -> bp_core_fetch_avatar for $class

Reported by: blindmoe's profile blindmoe Owned by:
Milestone: 1.6 Priority: normal
Severity: minor Version: 1.5.3
Component: Core Keywords: needs-patch dev-feedback


Inside bp_core_fetch_avatar there are filters ran for just about every argument, except $class. I suggest you add this line:

$class = apply_filters( 'bp_core_avatar_class', $class, $item_id, $object );

at line 146 so devs can adjust avatar classes if they need to.


Attachments (1)

$params.patch (1.5 KB) - added by fanquake 12 years ago.

Download all attachments as: .zip

Change History (7)

#1 @blindmoe
12 years ago

This should actually be:

$class = apply_filters( 'bp_core_avatar_class', $class, $item_id, $object, $params );

#2 @DJPaul
12 years ago

  • Milestone changed from Awaiting Review to 1.6
  • Severity changed from normal to minor

If someone wants to throw together a quick patch, and add $params onto all of the other filters, that would be appreciated.

12 years ago

#3 @fanquake
12 years ago

  • Keywords dev-feedback added

Is this what you were after?

#4 @blindmoe
12 years ago

Looks good! Thanks for this.

#5 @boonebgorges
12 years ago

Looks good. Tiny nitpick - when you run svn diff, could you do it from the root of your buddypress plugin folder? This one was run from bp-core.

#6 @boonebgorges
12 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [5652]) Pass params to filters in bp_core_fetch_avatar.
Fixes #3922.
Props fanquake, blindmoe

Note: See TracTickets for help on using tickets.