X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/6c8f14c09105d0afa4c1574215c59b5021040e76..9e77185fafaf4e60e2b73821e0e4b9b1a11fb85f:/wp-admin/users.php diff --git a/wp-admin/users.php b/wp-admin/users.php index 6ea17657..c83dbaa6 100644 --- a/wp-admin/users.php +++ b/wp-admin/users.php @@ -7,7 +7,7 @@ */ /** WordPress Administration Bootstrap */ -require_once( './admin.php' ); +require_once( dirname( __FILE__ ) . '/admin.php' ); if ( ! current_user_can( 'list_users' ) ) wp_die( __( 'Cheatin’ uh?' ) ); @@ -43,9 +43,9 @@ $help = '

' . __('Hovering over a row in the users list will display action li '

  • ' . __('Edit takes you to the editable profile screen for that user. You can also reach that screen by clicking on the username.') . '
  • '; if ( is_multisite() ) - $help .= '
  • ' . __( 'Remove allows you to remove a user from your site. It does not delete their posts. You can also remove multiple users at once by using Bulk Actions.' ) . '
  • '; + $help .= '
  • ' . __( 'Remove allows you to remove a user from your site. It does not delete their content. You can also remove multiple users at once by using Bulk Actions.' ) . '
  • '; else - $help .= '
  • ' . __( 'Delete brings you to the Delete Users screen for confirmation, where you can permanently remove a user from your site and delete their posts. You can also delete multiple users at once by using Bulk Actions.' ) . '
  • '; + $help .= '
  • ' . __( 'Delete brings you to the Delete Users screen for confirmation, where you can permanently remove a user from your site and delete their content. You can also delete multiple users at once by using Bulk Actions.' ) . '
  • '; $help .= ''; @@ -60,13 +60,13 @@ get_current_screen()->set_help_sidebar( '

    ' . __('For more information:') . '

    ' . '

    ' . __('Documentation on Managing Users') . '

    ' . '

    ' . __('Descriptions of Roles and Capabilities') . '

    ' . - '

    ' . __('Support Forums') . '

    ' + '

    ' . __('Support Forums') . '

    ' ); if ( empty($_REQUEST) ) { - $referer = ''; + $referer = ''; } elseif ( isset($_REQUEST['wp_http_referer']) ) { - $redirect = remove_query_arg(array('wp_http_referer', 'updated', 'delete_count'), stripslashes($_REQUEST['wp_http_referer'])); + $redirect = remove_query_arg(array('wp_http_referer', 'updated', 'delete_count'), wp_unslash( $_REQUEST['wp_http_referer'] ) ); $referer = ''; } else { $redirect = 'users.php'; @@ -86,6 +86,9 @@ jQuery(document).ready( function($) { $('input[name=delete_option]').one('change', function() { submit.prop('disabled', false); }); + $('#reassign_user').focus( function() { + $('#delete_option1').prop('checked', true).trigger('change'); + }); });
    -

    @@ -238,14 +236,24 @@ case 'delete': ?> -

    +

    • +
    • - ' . __( 'Attribute all posts to:' ) . ' '; + ' . __( 'Attribute all content to:' ) . ' '; wp_dropdown_users( array( 'name' => 'reassign_user', 'exclude' => array_diff( $userids, array($current_user->ID) ) ) ); ?>
    + @@ -291,8 +299,6 @@ case 'doremove': wp_redirect($redirect); exit; -break; - case 'remove': check_admin_referer('bulk-users'); @@ -313,14 +319,13 @@ case 'remove': else $userids = $_REQUEST['users']; - include ('admin-header.php'); + include( ABSPATH . 'wp-admin/admin-header.php' ); ?>
    -

      @@ -339,6 +344,7 @@ case 'remove': } } ?> +
    @@ -354,7 +360,7 @@ break; default: if ( !empty($_GET['_wp_http_referer']) ) { - wp_redirect(remove_query_arg(array('_wp_http_referer', '_wpnonce'), stripslashes($_SERVER['REQUEST_URI']))); + wp_redirect( remove_query_arg( array( '_wp_http_referer', '_wpnonce'), wp_unslash( $_SERVER['REQUEST_URI'] ) ) ); exit; } @@ -365,7 +371,7 @@ default: exit; } - include('./admin-header.php'); + include( ABSPATH . 'wp-admin/admin-header.php' ); $messages = array(); if ( isset($_GET['update']) ) : @@ -378,7 +384,7 @@ default: case 'add': if ( isset( $_GET['id'] ) && ( $user_id = $_GET['id'] ) && current_user_can( 'edit_user', $user_id ) ) { $messages[] = '

    ' . sprintf( __( 'New user created. Edit user' ), - esc_url( add_query_arg( 'wp_http_referer', urlencode( stripslashes( $_SERVER['REQUEST_URI'] ) ), + esc_url( add_query_arg( 'wp_http_referer', urlencode( wp_unslash( $_SERVER['REQUEST_URI'] ) ), self_admin_url( 'user-edit.php?user_id=' . $user_id ) ) ) ) . '

    '; } else { $messages[] = '

    ' . __( 'New user created.' ) . '

    '; @@ -422,7 +428,6 @@ if ( ! empty($messages) ) { } ?>
    -