bp_nouveau_get_search_objects( array $objects = array() )
Get The list of search objects (primary + secondary).
Description Description
Parameters Parameters
- $objects
-
(Optional) The list of objects.
Default value: array()
Return Return
(array) The list of objects.
Source Source
File: bp-templates/bp-nouveau/includes/template-tags.php
function bp_nouveau_get_search_objects( $objects = array() ) {
$primary = bp_nouveau_get_search_primary_object();
if ( ! $primary ) {
return $objects;
}
$objects = array(
'primary' => $primary,
);
if ( 'member' === $primary || 'dir' === $primary ) {
$objects['secondary'] = bp_current_component();
} elseif ( 'group' === $primary ) {
$objects['secondary'] = bp_current_action();
} else {
/**
* Filters the search objects if no others were found.
*
* @since 3.0.0
*
* @param array $objects Search objects.
*/
$objects = apply_filters( 'bp_nouveau_get_search_objects', $objects );
}
return $objects;
}
Changelog Changelog
| Version | Description |
|---|---|
| 3.0.0 | Introduced. |