bp_nouveau_get_search_objects( array $objects = array() )

Get The list of search objects (primary + secondary).

Description

Parameters

$objects

(Optional) The list of objects.

Default value: array()

Return

(array) The list of objects.

Source

File: bp-templates/bp-nouveau/includes/template-tags.php

1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
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 BuddyPress 3.0.0
         *
         * @param array $objects Search objects.
         */
        $objects = apply_filters( 'bp_nouveau_get_search_objects', $objects );
    }
 
    return $objects;
}

Changelog

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