bp_group_has_membership_requests( array|string $args = '' )
Initialize a group membership request template loop.
Description
Parameters
- $args
-
(Optional)
- 'group_id'
(int) ID of the group. Defaults to current group. - 'per_page'
(int) Number of records to return per page. Default: 10. - 'page'
(int) Page of results to return. Default: 1. - 'max'
(int) Max number of items to return. Default: false.
Default value: ''
- 'group_id'
Return
(bool) True if there are requests, otherwise false.
Source
File: bp-groups/bp-groups-template.php
6590 6591 6592 6593 6594 6595 6596 6597 6598 6599 6600 6601 6602 6603 6604 6605 6606 6607 6608 6609 6610 6611 | function bp_group_has_membership_requests( $args = '' ) { global $requests_template ; $r = bp_parse_args( $args , array ( 'group_id' => bp_get_current_group_id(), 'per_page' => 10, 'page' => 1, 'max' => false ), 'group_has_membership_requests' ); $requests_template = new BP_Groups_Membership_Requests_Template( $r ); /** * Filters whether or not a group membership query has requests to display. * * @since BuddyPress 1.1.0 * * @param bool $value Whether there are requests to display. * @param BP_Groups_Membership_Requests_Template $requests_template Object holding the requests query results. */ return apply_filters( 'bp_group_has_membership_requests' , $requests_template ->has_requests(), $requests_template ); } |
Changelog
Version | Description |
---|---|
BuddyPress 1.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.