pmpro-member-directory icon indicating copy to clipboard operation
pmpro-member-directory copied to clipboard

Feature: Add a filter to allow filtering of profile fields per membership level.

Open ipokkel opened this issue 2 years ago • 1 comments

There are a few shortcode attributes, e.g. show_name, show_avatar, etc. The ability to show or hide/remove some of these conditionally per membership level or user id could be helpful.

For example: When the profile of a level 1 member is displayed only their avatar and name but none of the others, a profile of a level 2 member shows their address as well, and a profile of a level 3 member shows their URL.

$pmpro_member_profile_show = apply_filters( 'pmpro_member_profile_show', $pmpro_member_profile_show_array, $pu );

ipokkel avatar May 04 '23 09:05 ipokkel

As an experimental proof of concept example see https://gist.github.com/ipokkel/f48eaa18889146ad67fb9be73eb4e720

ipokkel avatar May 04 '23 09:05 ipokkel