BP_Core_BP_Nav_BackCompat::get_nav( mixed $offset )

Get the nav object corresponding to the specified offset.


Parameters Parameters

$offset

(mixed) (Required) Array offset.


Top ↑

Return Return

(bool|array)


Source Source

File: bp-core/classes/class-bp-core-bp-nav-backcompat.php

	protected function get_nav( $offset ) {
		$bp = buddypress();

		$component_nav = $this->get_component_nav( $offset );
		$primary_nav   = $component_nav->get_primary( array( 'slug' => $offset ), false );

		$nav = array();

		if ( empty( $primary_nav ) ) {
			return $nav;
		}

		foreach ( $primary_nav as $item ) {
			$nav[ $item->slug ] = (array) $item;
		}

		return $nav;
	}


Top ↑

Changelog Changelog

Changelog
Version Description
2.6.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.