Skip to:
Content

Opened 4 years ago

Closed 4 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: 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 4 years ago.

Download all attachments as: .zip

Change History (7)

comment:1 @blindmoe4 years ago

This should actually be:

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

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

@fanquake4 years ago

comment:3 @fanquake4 years ago

  • Keywords dev-feedback added

Is this what you were after?

comment:4 @blindmoe4 years ago

Looks good! Thanks for this.

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