BP_Suggestions::get_suggestions()

Find and return a list of suggestions that match the query.

Description

The return type is important. If no matches are found, an empty array must be returned. Matches must be returned as objects in an array.

The object format for each match must be: { ‘ID’: string, ‘image’: string, ‘name’: string } For example: { ‘ID’: ‘admin’, ‘image’: ‘http://example.com/logo.png‘, ‘name’: ‘Name Surname’ }

Return

(array|WP_Error) Array of results. If there were problems, returns a WP_Error object.

Source

File: bp-core/classes/class-bp-suggestions.php

	abstract public function get_suggestions();

Changelog

Changelog
Version Description
BuddyPress 2.1.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.