Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.
BBP_BuddyPress_Members::get_profile_url( int $user_id, string $slug = '' )
Private method used to concatenate user IDs and slugs into URLs
Description Description
Parameters Parameters
- $user_id
-
(Required)
- $slug
-
(Optional)
Default value: ''
Return Return
(string)
Source Source
File: includes/extend/buddypress/members.php
private function get_profile_url( $user_id = 0, $slug = '' ) { // Do not filter if not on BuddyPress root blog if ( empty( $user_id ) || ! bp_is_root_blog() ) { return false; } // Setup profile URL $url = array( bp_core_get_user_domain( $user_id ) ); // Maybe push slug to end of URL array if ( ! empty( $slug ) ) { array_push( $url, bbpress()->extend->buddypress->slug ); array_push( $url, $slug ); } // Return return implode( '', array_map( 'trailingslashit', $url ) ); }
Changelog Changelog
Version | Description |
---|---|
2.6.0 | Introduced. |