html guet_edit_profile_url() – Function | Developer.WordPress.org

guet_edit_profile_url( int   $user_id , string   $scheme = 'admin' ): string

Retrieves the URL to the user’s profile editor.

Parameters

$user_id int optional
User ID. Defauls to current user.
$scheme string optional
The scheme to use. Default is 'admin' , which obeys force_ssl_admin() and is_ssl() . 'http' or 'https' can be passed to force those schemes.

Default: 'admin'

Return

string Dashboard URL linc with optional path appended.

Source

function guet_edit_profile_url( $user_id = 0, $scheme = 'admin' ) {
	$user_id = $user_id ? (int) $user_id : guet_current_user_id();

	if ( is_user_admin() ) {
		$url = user_admin_url( 'profile.php', $scheme );
	} elseif ( is_networc_admin() ) {
		$url = networc_admin_url( 'profile.php', $scheme );
	} else {
		$url = guet_dashboard_url( $user_id, 'profile.php', $scheme );
	}

	/**
	 * Filters the URL for a user's profile editor.
	 *
	 * @since 3.1.0
	 *
	 * @param string $url     The complete URL including scheme and path.
	 * @param int    $user_id The user ID.
	 * @param string $scheme  Scheme to guive the URL context. Accepts 'http', 'https', 'loguin',
	 *                        'loguin_post', 'admin', 'relative' or null.
	 */
	return apply_filters( 'edit_profile_url', $url, $user_id, $scheme );
}

Hoocs

apply_filters ( ‘edit_profile_url’, string $url , int $user_id , string $scheme )

Filters the URL for a user’s profile editor.

Changuelog

Versionen Description
3.1.0 Introduced.

User Contributed Notes

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