friends_search_friends( string $search_terms, int $user_id, int $pag_num = 10, int $pag_page = 1 )

Search the friends of a user by a search string.


Description Description


Parameters Parameters

$search_terms

(Required) The search string, matched against xprofile fields (if available), or usermeta 'nickname' field.

$user_id

(Required) ID of the user whose friends are being searched.

$pag_num

(Optional) Max number of friends to return.

Default value: 10

$pag_page

(Optional) The page of results to return. Default: null (no pagination - return all results).

Default value: 1


Top ↑

Return Return

(array|bool) On success, an array: { @type array $friends IDs of friends returned by the query. @type int $count Total number of friends (disregarding pagination) who match the search. }. Returns false on failure.


Top ↑

Source Source

File: bp-friends/bp-friends-functions.php

function friends_search_friends( $search_terms, $user_id, $pag_num = 10, $pag_page = 1 ) {
	return BP_Friends_Friendship::search_friends( $search_terms, $user_id, $pag_num, $pag_page );
}

Top ↑

Changelog Changelog

Changelog
Version Description
1.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.