get_edit_profile_url

The timeline below displays how wordpress function get_edit_profile_url has changed across different WordPress versions. If a version is not listed, refer to the next available version below.

WordPress Version: 4.6

/**
 * Retrieves the URL to the user's profile editor.
 *
 * @since 3.1.0
 *
 * @param int    $user_id Optional. User ID. Defaults to current user.
 * @param string $scheme  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.
 * @return string Dashboard URL link with optional path appended.
 */
function get_edit_profile_url($user_id = 0, $scheme = 'admin')
{
    $user_id = $user_id ? (int) $user_id : get_current_user_id();
    if (is_user_admin()) {
        $url = user_admin_url('profile.php', $scheme);
    } elseif (is_network_admin()) {
        $url = network_admin_url('profile.php', $scheme);
    } else {
        $url = get_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 give the URL context. Accepts 'http', 'https', 'login',
     *                        'login_post', 'admin', 'relative' or null.
     */
    return apply_filters('edit_profile_url', $url, $user_id, $scheme);
}

WordPress Version: 3.9

/**
 * Get the URL to the user's profile editor.
 *
 * @since 3.1.0
 *
 * @param int    $user_id Optional. User ID. Defaults to current user.
 * @param string $scheme  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.
 * @return string Dashboard url link with optional path appended.
 */
function get_edit_profile_url($user_id = 0, $scheme = 'admin')
{
    $user_id = $user_id ? (int) $user_id : get_current_user_id();
    if (is_user_admin()) {
        $url = user_admin_url('profile.php', $scheme);
    } elseif (is_network_admin()) {
        $url = network_admin_url('profile.php', $scheme);
    } else {
        $url = get_dashboard_url($user_id, 'profile.php', $scheme);
    }
    /**
     * Filter 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 give the URL context. Accepts 'http', 'https', 'login',
     *                        'login_post', 'admin', 'relative' or null.
     */
    return apply_filters('edit_profile_url', $url, $user_id, $scheme);
}

WordPress Version: 3.7

/**
 * Get the URL to the user's profile editor.
 *
 * @since 3.1.0
 *
 * @param int $user User ID
 * @param string $scheme 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.
 * @return string Dashboard url link with optional path appended.
 */
function get_edit_profile_url($user, $scheme = 'admin')
{
    $user = (int) $user;
    if (is_user_admin()) {
        $url = user_admin_url('profile.php', $scheme);
    } elseif (is_network_admin()) {
        $url = network_admin_url('profile.php', $scheme);
    } else {
        $url = get_dashboard_url($user, 'profile.php', $scheme);
    }
    return apply_filters('edit_profile_url', $url, $user, $scheme);
}