bp_nouveau_get_search_objects( array $objects = array() )
Get The list of search objects (primary + secondary).
Parameters Parameters
- $objects
-
(array) (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(); if ( bp_is_group_home() && ! bp_is_group_custom_front() ) { $objects['secondary'] = 'members'; if ( bp_is_active( 'activity' ) ) { $objects['secondary'] = 'activity'; } } } 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; }
Expand full source code Collapse full source code View on Trac
Changelog Changelog
Version | Description |
---|---|
3.0.0 | Introduced. |