BP_Core_BP_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-nav-backcompat.php
216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 | 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 ; } |
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.