BP_Core_BP_Options_Nav_BackCompat::get_nav( mixed $offset )
Get the nav object corresponding to the specified offset.
Description
Parameters
- $offset
-
(Required) Array offset.
Return
(bool|array)
Source
File: bp-core/classes/class-bp-core-bp-options-nav-backcompat.php
public function get_nav( $offset ) { $nav = parent::get_nav( $offset ); if ( ! $nav ) { $component_nav = $this->get_component_nav( $offset ); $secondary_nav = $component_nav->get_secondary( array( 'slug' => $offset ), false ); $nav = array(); if ( empty( $primary_nav ) ) { return $nav; } foreach ( $primary_nav as $item ) { $nav[ $item->slug ] = (array) $item; } } return $nav; }
Changelog
Version | Description |
---|---|
BuddyPress 2.6.0 | Introduced. |
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.