BP_REST_Activity_Details_Endpoint::bp_rest_legacy_get_activity_directory_nav_items()
Legacy template activity directory navigation support added.
Description
Return
(mixed|void)
Source
File: bp-activity/classes/class-bp-rest-activity-details-endpoint.php
public function bp_rest_legacy_get_activity_directory_nav_items() { $nav_items = array(); $nav_items['all'] = array( 'text' => __( 'All Members', 'buddyboss' ), 'position' => 5, ); if ( is_user_logged_in() ) { if ( bp_is_active( 'friends' ) && bp_get_total_friend_count( bp_loggedin_user_id() ) ) { $nav_items['friends'] = array( 'text' => __( 'My Friends', 'buddyboss' ), 'position' => 15, ); } if ( bp_is_active( 'groups' ) && bp_get_total_group_count_for_user( bp_loggedin_user_id() ) ) { $nav_items['groups'] = array( 'text' => __( 'My Groups', 'buddyboss' ), 'position' => 25, ); } if ( bp_get_total_favorite_count_for_user( bp_loggedin_user_id() ) ) { $nav_items['favorites'] = array( 'text' => __( 'My Favorites', 'buddyboss' ), 'position' => 35, ); } if ( bp_activity_do_mentions() ) { if ( bp_get_total_mention_count_for_user( bp_loggedin_user_id() ) ) { $nav_items['mentions'] = array( 'text' => __( 'Mentions', 'buddyboss' ), 'position' => 45, ); } } } return apply_filters( 'bp_rest_legacy_get_activity_directory_nav_items', $nav_items ); }
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.