本文整理匯總了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;
}