Link to edit profile screen within same admin if in network or user admin.

git-svn-id: http://svn.automattic.com/wordpress/trunk@16475 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2010-11-18 23:07:59 +00:00
parent 76f3dd920b
commit 374cfa11b4
1 changed files with 6 additions and 1 deletions

View File

@ -2319,7 +2319,12 @@ function get_dashboard_url( $user_id, $path = '', $scheme = 'admin' ) {
function get_edit_profile_url( $user, $scheme = 'admin' ) {
$user = (int) $user;
$url = get_dashboard_url( $user, 'profile.php', $scheme );
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);
}