From 22cff6b707bd95e8da028c85ad7c3ff8c2d62fad Mon Sep 17 00:00:00 2001 From: champsupertramp Date: Mon, 16 May 2016 20:03:39 +0800 Subject: [PATCH] Fix edit profile url --- core/um-short-functions.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/core/um-short-functions.php b/core/um-short-functions.php index c725eede..1f8889e4 100644 --- a/core/um-short-functions.php +++ b/core/um-short-functions.php @@ -997,7 +997,13 @@ function um_reset_user() { ***/ function um_edit_profile_url(){ global $ultimatemember; - $url = um_user_profile_url(); + + if( um_is_core_page('user') ){ + $url = $ultimatemember->permalinks->get_current_url(); + }else{ + $url = um_user_profile_url(); + } + $url = remove_query_arg('profiletab', $url); $url = remove_query_arg('subnav', $url); $url = add_query_arg( 'profiletab', 'main', $url );