BP_REST_Members_Details_Endpoint::get_members_tabs()

Get Members tabs.

Description

Return

(array)

Source

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

	public function get_members_tabs() {
		$tabs = array();

		$tabs_items = function_exists( 'bp_nouveau_get_members_directory_nav_items' ) ? bp_nouveau_get_members_directory_nav_items() : $this->bp_rest_legacy_get_members_directory_nav_items();

		if ( ! empty( $tabs_items ) ) {
			foreach ( $tabs_items as $key => $item ) {
				$tabs[ $key ]['title']    = $item['text'];
				$tabs[ $key ]['position'] = $item['position'];
				$tabs[ $key ]['count']    = $item['count'];
			}
		}

		return $tabs;
	}

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.