bp_nouveau_get_members_filters( string $context = '' )
Get Dropdown filters for the members component
Description
Parameters
- $context
-
(Optional)
Default value: ''
Return
(array) the filters
Source
File: bp-templates/bp-nouveau/includes/members/functions.php
89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 | function bp_nouveau_get_members_filters( $context = '' ) { if ( 'group' !== $context ) { $filters = array ( 'active' => __( 'Recently Active' , 'buddyboss' ), 'newest' => __( 'Newest Members' , 'buddyboss' ), ); if ( bp_is_active( 'xprofile' ) ) { $filters [ 'alphabetical' ] = __( 'Alphabetical' , 'buddyboss' ); } $action = 'bp_members_directory_order_options' ; if ( 'friends' === $context ) { $action = 'bp_member_friends_order_options' ; } } else { $filters = array ( 'last_joined' => __( 'Newest' , 'buddyboss' ), 'first_joined' => __( 'Oldest' , 'buddyboss' ), ); if ( bp_is_active( 'activity' ) ) { $filters [ 'group_activity' ] = __( 'Group Activity' , 'buddyboss' ); } $filters [ 'alphabetical' ] = __( 'Alphabetical' , 'buddyboss' ); $action = 'bp_groups_members_order_options' ; } /** * Recommended, filter here instead of adding an action to 'bp_members_directory_order_options' * * @since BuddyPress 3.0.0 * * @param array the members filters. * @param string the context. */ $filters = apply_filters( 'bp_nouveau_get_members_filters' , $filters , $context ); return bp_nouveau_parse_hooked_options( $action , $filters ); } |
Changelog
Version | Description |
---|---|
BuddyPress 3.0.0 | Introduced. |
Questions?
We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.