Make WordPress Core


Ignore:
Timestamp:
07/30/2012 06:30:03 PM (12 years ago)
Author:
ryan
Message:

Introduce get_edit_user_link(). Props scribu, georgestephanis, johnbillion. fixes #14787 see #20307

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/class-wp-ms-users-list-table.php

    r21323 r21364  
    174174                    case 'username':
    175175                        $avatar = get_avatar( $user->user_email, 32 );
    176                         if ( get_current_user_id() == $user->ID ) {
    177                             $edit_link = esc_url( network_admin_url( 'profile.php' ) );
    178                         } else {
    179                             $edit_link = esc_url( network_admin_url( add_query_arg( 'wp_http_referer', urlencode( stripslashes( $_SERVER['REQUEST_URI'] ) ), 'user-edit.php?user_id=' . $user->ID ) ) );
    180                         }
     176                        $edit_link = esc_url( add_query_arg( 'wp_http_referer', urlencode( stripslashes( $_SERVER['REQUEST_URI'] ) ), get_edit_user_link( $user->ID ) ) );
    181177
    182178                        echo "<td $attributes>"; ?>
Note: See TracChangeset for help on using the changeset viewer.