BP_REST_Activity_Details_Endpoint::get_activities_tabs()

Get list of activity tabs.

Description

Return

(array)

Source

File: bp-activity/classes/class-bp-rest-activity-details-endpoint.php

180
181
182
183
184
185
186
187
188
189
190
191
192
public function get_activities_tabs() {
    $nav_items = function_exists( 'bp_nouveau_get_activity_directory_nav_items' ) ? bp_nouveau_get_activity_directory_nav_items() : $this->bp_rest_legacy_get_activity_directory_nav_items();
    $nav       = array();
 
    if ( ! empty( $nav_items ) ) {
        foreach ( $nav_items as $key => $item ) {
            $nav[ $key ]['title']    = $item['text'];
            $nav[ $key ]['position'] = $item['position'];
        }
    }
 
    return $nav;
}

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.