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: ''


Top ↑

Return Return

(string)


Top ↑

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 );
	}

Top ↑

Changelog Changelog

Changelog
Version Description
2.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.