本文整理汇总了PHP中BP_Groups_Member::get_all_membership_request_user_ids方法的典型用法代码示例。如果您正苦于以下问题:PHP BP_Groups_Member::get_all_membership_request_user_ids方法的具体用法?PHP BP_Groups_Member::get_all_membership_request_user_ids怎么用?PHP BP_Groups_Member::get_all_membership_request_user_ids使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BP_Groups_Member
的用法示例。
在下文中一共展示了BP_Groups_Member::get_all_membership_request_user_ids方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: groups_accept_all_pending_membership_requests
/**
* Accept all pending membership requests to a group.
*
* @param int $group_id ID of the group.
*
* @return bool True on success, false on failure.
*/
function groups_accept_all_pending_membership_requests($group_id)
{
$user_ids = BP_Groups_Member::get_all_membership_request_user_ids($group_id);
if (!$user_ids) {
return false;
}
foreach ((array) $user_ids as $user_id) {
groups_accept_membership_request(false, $user_id, $group_id);
}
/**
* Fires after the acceptance of all pending membership requests to a group.
*
* @since 1.0.2
*
* @param int $group_id ID of the group whose pending memberships were accepted.
*/
do_action('groups_accept_all_pending_membership_requests', $group_id);
return true;
}
示例2: groups_accept_all_pending_membership_requests
function groups_accept_all_pending_membership_requests($group_id)
{
$user_ids = BP_Groups_Member::get_all_membership_request_user_ids($group_id);
if (!$user_ids) {
return false;
}
foreach ((array) $user_ids as $user_id) {
groups_accept_membership_request(false, $user_id, $group_id);
}
do_action('groups_accept_all_pending_membership_requests', $group_id);
return true;
}