當前位置: 首頁>>代碼示例>>PHP>>正文


PHP BP_Groups_Member::get_invites方法代碼示例

本文整理匯總了PHP中BP_Groups_Member::get_invites方法的典型用法代碼示例。如果您正苦於以下問題:PHP BP_Groups_Member::get_invites方法的具體用法?PHP BP_Groups_Member::get_invites怎麽用?PHP BP_Groups_Member::get_invites使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在BP_Groups_Member的用法示例。


在下文中一共展示了BP_Groups_Member::get_invites方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: test_get_invites_with_exclude

 public function test_get_invites_with_exclude()
 {
     $g1 = $this->factory->group->create(array('name' => 'RC Cola'));
     $g2 = $this->factory->group->create(array('name' => 'Pepsi'));
     $u1 = $this->factory->user->create();
     $u2 = $this->factory->user->create();
     self::add_user_to_group($u1, $g1);
     self::add_user_to_group($u1, $g2);
     self::invite_user_to_group($u2, $g1, $u1);
     self::invite_user_to_group($u2, $g2, $u1);
     $groups = BP_Groups_Member::get_invites($u2, false, false, array('awesome', $g1));
     $ids = wp_list_pluck($groups['groups'], 'id');
     $this->assertEquals($ids, array($g2));
 }
開發者ID:jasonmcalpin,項目名稱:BuddyPress,代碼行數:14,代碼來源:class-bp-groups-member.php

示例2: groups_get_invites_for_user

/**
 * Get IDs of users with outstanding invites to a given group from a specified user.
 *
 * @param int               $user_id ID of the inviting user.
 * @param int|bool          $limit Limit to restrict to.
 * @param int|bool          $page
 * @param string|array|bool $exclude
 *
 * @return array $value IDs of users who have been invited to the group by the
 *                      user but have not yet accepted.
 */
function groups_get_invites_for_user($user_id = 0, $limit = false, $page = false, $exclude = false)
{
    if (empty($user_id)) {
        $user_id = bp_loggedin_user_id();
    }
    return BP_Groups_Member::get_invites($user_id, $limit, $page, $exclude);
}
開發者ID:jasonmcalpin,項目名稱:BuddyPress,代碼行數:18,代碼來源:bp-groups-functions.php

示例3: groups_get_invites_for_user

function groups_get_invites_for_user($user_id = 0, $limit = false, $page = false, $exclude = false)
{
    global $bp;
    if (!$user_id) {
        $user_id = $bp->loggedin_user->id;
    }
    return BP_Groups_Member::get_invites($user_id, $limit, $page, $exclude);
}
開發者ID:nxtclass,項目名稱:NXTClass-Plugin,代碼行數:8,代碼來源:bp-groups-functions.php

示例4: groups_get_invites_for_user

function groups_get_invites_for_user($user_id = false)
{
    global $bp;
    if (!$user_id) {
        $user_id = $bp->loggedin_user->id;
    }
    return BP_Groups_Member::get_invites($user_id);
}
開發者ID:alvaropereyra,項目名稱:shrekcms,代碼行數:8,代碼來源:bp-groups.php


注:本文中的BP_Groups_Member::get_invites方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。