Core::get_nav_link( $slug, string $parent_slug = '' )
Add Menu and Sub menu navigation link for profile menu
Description
Parameters
- $slug
-
(Required)
- $parent_slug
-
(Optional)
Default value: ''
Return
(string)
Source
File: bp-integrations/learndash/core/Core.php
public function get_nav_link( $slug, $parent_slug = '' ) { $displayed_user_id = bp_displayed_user_id(); $user_domain = ( ! empty( $displayed_user_id ) ) ? bp_displayed_user_domain() : bp_loggedin_user_domain(); if ( ! empty( $parent_slug ) ) { $nav_link = trailingslashit( $user_domain . $parent_slug . '/' . $slug ); } else { $nav_link = trailingslashit( $user_domain . $slug ); } return $nav_link; }
Changelog
Version | Description |
---|---|
BuddyBoss 1.2.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.