BP_Core_Nav::__construct( int $object_id )
Initializes the Nav belonging to the specified object.
Description
Parameters
- $object_id
-
(Required) The item ID to build the nav for. Default is the displayed user ID.
Source
File: bp-core/classes/class-bp-core-nav.php
public function __construct( $object_id = 0 ) {
if ( empty( $object_id ) ) {
$this->object_id = (int) bp_displayed_user_id();
} else {
$this->object_id = (int) $object_id;
}
$this->nav[ $this->object_id ] = array();
}
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.