bp_nouveau_get_groups_filters( string $context = '' )
Get Dropdown filters for the groups component
Description
Parameters
- $context
-
(Optional) 'directory' or 'user'
Default value: ''
Return
(array) the filters
Source
File: bp-templates/bp-nouveau/includes/groups/functions.php
636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 | function bp_nouveau_get_groups_filters( $context = '' ) { if ( empty ( $context ) ) { return array (); } $action = '' ; if ( 'user' === $context ) { $action = 'bp_member_group_order_options' ; } elseif ( 'directory' === $context ) { $action = 'bp_groups_directory_order_options' ; } /** * Recommended, filter here instead of adding an action to 'bp_member_group_order_options' * or 'bp_groups_directory_order_options' * * @since BuddyPress 3.0.0 * * @param array the members filters. * @param string the context. */ $filters = apply_filters( 'bp_nouveau_get_groups_filters' , array ( 'active' => __( 'Recently Active' , 'buddyboss' ), 'popular' => __( 'Most Members' , 'buddyboss' ), 'newest' => __( 'Newly Created' , 'buddyboss' ), 'alphabetical' => __( 'Alphabetical' , 'buddyboss' ), ), $context ); if ( $action ) { return bp_nouveau_parse_hooked_options( $action , $filters ); } return $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.