Skip to:
Content

BuddyPress.org

Opened 5 years ago

Closed 5 years ago

#6996 closed enhancement (fixed)

Member Types: add member type(s) class to bp_get_member_class()

Reported by: Offereins Owned by: boonebgorges
Milestone: 2.6 Priority: normal
Severity: normal Version:
Component: Members Keywords: has-patch
Cc: lmoffereins@…

Description

Since Member Types have now a solid place in BP, let's integrate it in more locations where it could be of use.

Idea: add a member type(s) class to bp_get_member_class(), which is used when displaying members in the members loop. This could be used for visual distinction between different member types or other member-type specific logic in the loop.

Patch attached.

Attachments (3)

6996.patch (189.4 KB) - added by Offereins 5 years ago.
6996.1.patch (643 bytes) - added by Offereins 5 years ago.
Correct file. Please ignore 6996.patch
6996.2.patch (662 bytes) - added by Offereins 5 years ago.
Member type is a string, not an object. Added escaping.

Download all attachments as: .zip

Change History (6)

@Offereins
5 years ago

@Offereins
5 years ago

Correct file. Please ignore 6996.patch

#1 @slaFFik
5 years ago

Perhaps, esc_attr() of $member_type->name? Not sure, just a proposition.

@Offereins
5 years ago

Member type is a string, not an object. Added escaping.

#2 @boonebgorges
5 years ago

  • Milestone changed from Awaiting Review to 2.6
  • Type changed from idea to enhancement

Definitely. Good idea.

#3 @boonebgorges
5 years ago

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

In 10690:

Add 'member-type-{$member_type}' class to bp_get_member_class().

This will make it easier to target specific member types when styling
member loops.

Props Offereins, slaFFik.
Fixes #6996.

Note: See TracTickets for help on using tickets.