BP_Suggestions::get_suggestions()
Find and return a list of suggestions that match the query.
Description 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 Return
(array|WP_Error) Array of results. If there were problems, returns a WP_Error object.
Source Source
File: bp-core/classes/class-bp-suggestions.php
abstract public function get_suggestions();
Changelog Changelog
Version | Description |
---|---|
2.1.0 | Introduced. |