bp_members_edit_profile_url( string $url, int $user_id, string $scheme = 'admin' )

Filter the user profile URL to point to BuddyPress profile edit.


Description Description


Parameters Parameters

$url

(Required) WP profile edit URL.

$user_id

(Required) ID of the user.

$scheme

(Optional) Scheme to use.

Default value: 'admin'


Top ↑

Return Return

(string)


Top ↑

Source Source

File: bp-members/bp-members-filters.php

function bp_members_edit_profile_url( $url, $user_id, $scheme = 'admin' ) {

	// If xprofile is active, use profile domain link.
	if ( ! is_admin() && bp_is_active( 'xprofile' ) ) {
		$profile_link = trailingslashit( bp_core_get_user_domain( $user_id ) . bp_get_profile_slug() . '/edit' );

	} else {
		// Default to $url.
		$profile_link = $url;
	}

	/**
	 * Filters the user profile URL to point to BuddyPress profile edit.
	 *
	 * @since 1.5.2
	 *
	 * @param string $url WP profile edit URL.
	 * @param int    $user_id ID of the user.
	 * @param string $scheme Scheme to use.
	 */
	return apply_filters( 'bp_members_edit_profile_url', $profile_link, $url, $user_id, $scheme );
}

Top ↑

Changelog Changelog

Changelog
Version Description
1.6.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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