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-users-list-table.php

    r21323 r21364  
    232232        if ( current_user_can( 'list_users' ) ) {
    233233            // Set up the user editing link
    234             // TODO: make profile/user-edit determination a separate function
    235             if ( get_current_user_id() == $user_object->ID ) {
    236                 $edit_link = 'profile.php';
    237             } else {
    238                 $edit_link = esc_url( add_query_arg( 'wp_http_referer', urlencode( stripslashes( $_SERVER['REQUEST_URI'] ) ), "user-edit.php?user_id=$user_object->ID" ) );
    239             }
     234            $edit_link = esc_url( add_query_arg( 'wp_http_referer', urlencode( stripslashes( $_SERVER['REQUEST_URI'] ) ), get_edit_user_link( $user_object->ID ) ) );
    240235
    241236            // Set up the hover actions for this user
Note: See TracChangeset for help on using the changeset viewer.