bbp_get_user_profile_edit_url( int $user_id, string $user_nicename = '' )
Return URL to the profile edit page of a user
Description Description
Parameters Parameters
- $user_id
-
(Optional) User id
- $user_nicename
-
(Optional) User nicename
Default value: ''
Return Return
(string)
Source Source
File: includes/users/template.php
function bbp_get_user_profile_edit_url( $user_id = 0, $user_nicename = '' ) { $user_id = bbp_get_user_id( $user_id ); if ( empty( $user_id ) ) { return false; } // Bail if intercepted $intercept = bbp_maybe_intercept( 'bbp_pre_get_user_profile_edit_url', func_get_args() ); if ( bbp_is_intercepted( $intercept ) ) { return $intercept; } // Get user profile URL $profile_url = bbp_get_user_profile_url( $user_id, $user_nicename ); // Pretty permalinks if ( bbp_use_pretty_urls() ) { $url = trailingslashit( $profile_url ) . bbp_get_edit_slug(); $url = user_trailingslashit( $url ); // Unpretty permalinks } else { $url = add_query_arg( array( bbp_get_edit_rewrite_id() => '1' ), $profile_url ); } // Filter & return return apply_filters( 'bbp_get_user_edit_profile_url', $url, $user_id, $user_nicename ); }
Changelog Changelog
Version | Description |
---|---|
2.0.0 | Introduced. |