BP_REST_Document_Details_Endpoint::get_documents_tabs()

Get Documents tabs.

Description

Return

(array)

Source

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

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

		$tabs_items = function_exists( 'bp_nouveau_get_document_directory_nav_items' ) ? bp_nouveau_get_document_directory_nav_items() : array();

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

		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.