Skip to:
Content

Opened 2 years ago

Closed 2 years ago

#3922 closed enhancement (fixed)

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

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

Description

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.

Thanks

Attachments (1)

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

Download all attachments as: .zip

Change History (7)

comment:1 blindmoe2 years ago

This should actually be:

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

comment:2 DJPaul2 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.

fanquake2 years ago

comment:3 fanquake2 years ago

  • Keywords dev-feedback added

Is this what you were after?

comment:4 blindmoe2 years ago

Looks good! Thanks for this.

comment:5 boonebgorges2 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.

comment:6 boonebgorges2 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.