BP_Group_Member_Query::setup_hooks()
Set up action hooks.
Description
Source
File: bp-groups/classes/class-bp-group-member-query.php
public function setup_hooks() { // Take this early opportunity to set the default 'type' param // to 'last_joined', which will ensure that BP_User_Query // trusts our order and does not try to apply its own. if ( empty( $this->query_vars_raw['type'] ) ) { $this->query_vars_raw['type'] = 'last_joined'; } // Set the sort order. add_action( 'bp_pre_user_query', array( $this, 'set_orderby' ) ); // Set up our populate_extras method. add_action( 'bp_user_query_populate_extras', array( $this, 'populate_group_member_extras' ), 10, 2 ); }
Changelog
Version | Description |
---|---|
BuddyPress 1.8.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.