bp_search_items()
Buddyboss global search items options
Description
Return
(mixed|void)
Source
File: bp-search/bp-search-functions.php
function bp_search_items() { $items = array( 'posts' => __( 'Blog Posts', 'buddyboss' ), 'pages' => __( 'Pages', 'buddyboss' ), 'posts_comments' => __( 'Post Comments', 'buddyboss' ), 'members' => __( 'Members', 'buddyboss' ), ); //forums? $items['forum'] = __( 'Forums', 'buddyboss' ); $items['topic'] = __( 'Forums Discussions', 'buddyboss' ); $items['reply'] = __( 'Forums Replies', 'buddyboss' ); //other buddypress components $bp_components = array( 'groups' => __( 'Groups', 'buddyboss' ), 'activity' => __( 'Activity', 'buddyboss' ), 'messages' => __( 'Messages', 'buddyboss' ), /* should we search notifications as well? 'notifications' => __( 'Notifications', 'buddyboss' ), */ ); //only the active ones please! foreach ( $bp_components as $component => $label ) { if ( function_exists( 'bp_is_active' ) && bp_is_active( $component ) ) { $items[ $component ] = $label; if ( 'activity' === $component ) { $items['activity_comment'] = __( 'Activity Comments', 'buddyboss' ); } } } return apply_filters( 'bp_search_items', $items ); }
Changelog
Version | Description |
---|---|
BuddyBoss 1.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.