[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

title

Body

[close]

/wp-admin/ -> users.php (source)

   1  <?php
   2  /**
   3   * User administration panel
   4   *
   5   * @package WordPress
   6   * @subpackage Administration
   7   * @since 1.0.0
   8   */
   9  
  10  /** WordPress Administration Bootstrap */
  11  require_once( dirname( __FILE__ ) . '/admin.php' );
  12  
  13  if ( ! current_user_can( 'list_users' ) ) {
  14      wp_die(
  15          '<h1>' . __( 'You need a higher level of permission.' ) . '</h1>' .
  16          '<p>' . __( 'Sorry, you are not allowed to list users.' ) . '</p>',
  17          403
  18      );
  19  }
  20  
  21  $wp_list_table = _get_list_table( 'WP_Users_List_Table' );
  22  $pagenum       = $wp_list_table->get_pagenum();
  23  $title         = __( 'Users' );
  24  $parent_file   = 'users.php';
  25  
  26  add_screen_option( 'per_page' );
  27  
  28  // contextual help - choose Help on the top right of admin panel to preview this.
  29  get_current_screen()->add_help_tab(
  30      array(
  31          'id'      => 'overview',
  32          'title'   => __( 'Overview' ),
  33          'content' => '<p>' . __( 'This screen lists all the existing users for your site. Each user has one of five defined roles as set by the site admin: Site Administrator, Editor, Author, Contributor, or Subscriber. Users with roles other than Administrator will see fewer options in the dashboard navigation when they are logged in, based on their role.' ) . '</p>' .
  34                          '<p>' . __( 'To add a new user for your site, click the Add New button at the top of the screen or Add New in the Users menu section.' ) . '</p>',
  35      )
  36  );
  37  
  38  get_current_screen()->add_help_tab(
  39      array(
  40          'id'      => 'screen-content',
  41          'title'   => __( 'Screen Content' ),
  42          'content' => '<p>' . __( 'You can customize the display of this screen in a number of ways:' ) . '</p>' .
  43                          '<ul>' .
  44                          '<li>' . __( 'You can hide/display columns based on your needs and decide how many users to list per screen using the Screen Options tab.' ) . '</li>' .
  45                          '<li>' . __( 'You can filter the list of users by User Role using the text links above the users list to show All, Administrator, Editor, Author, Contributor, or Subscriber. The default view is to show all users. Unused User Roles are not listed.' ) . '</li>' .
  46                          '<li>' . __( 'You can view all posts made by a user by clicking on the number under the Posts column.' ) . '</li>' .
  47                          '</ul>',
  48      )
  49  );
  50  
  51  $help = '<p>' . __( 'Hovering over a row in the users list will display action links that allow you to manage users. You can perform the following actions:' ) . '</p>' .
  52      '<ul>' .
  53      '<li>' . __( '<strong>Edit</strong> takes you to the editable profile screen for that user. You can also reach that screen by clicking on the username.' ) . '</li>';
  54  
  55  if ( is_multisite() ) {
  56      $help .= '<li>' . __( '<strong>Remove</strong> 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.' ) . '</li>';
  57  } else {
  58      $help .= '<li>' . __( '<strong>Delete</strong> 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.' ) . '</li>';
  59  }
  60  
  61  $help .= '</ul>';
  62  
  63  get_current_screen()->add_help_tab(
  64      array(
  65          'id'      => 'action-links',
  66          'title'   => __( 'Available Actions' ),
  67          'content' => $help,
  68      )
  69  );
  70  unset( $help );
  71  
  72  get_current_screen()->set_help_sidebar(
  73      '<p><strong>' . __( 'For more information:' ) . '</strong></p>' .
  74      '<p>' . __( '<a href="https://codex.wordpress.org/Users_Screen">Documentation on Managing Users</a>' ) . '</p>' .
  75      '<p>' . __( '<a href="https://codex.wordpress.org/Roles_and_Capabilities">Descriptions of Roles and Capabilities</a>' ) . '</p>' .
  76      '<p>' . __( '<a href="https://wordpress.org/support/">Support</a>' ) . '</p>'
  77  );
  78  
  79  get_current_screen()->set_screen_reader_content(
  80      array(
  81          'heading_views'      => __( 'Filter users list' ),
  82          'heading_pagination' => __( 'Users list navigation' ),
  83          'heading_list'       => __( 'Users list' ),
  84      )
  85  );
  86  
  87  if ( empty( $_REQUEST ) ) {
  88      $referer = '<input type="hidden" name="wp_http_referer" value="' . esc_attr( wp_unslash( $_SERVER['REQUEST_URI'] ) ) . '" />';
  89  } elseif ( isset( $_REQUEST['wp_http_referer'] ) ) {
  90      $redirect = remove_query_arg( array( 'wp_http_referer', 'updated', 'delete_count' ), wp_unslash( $_REQUEST['wp_http_referer'] ) );
  91      $referer  = '<input type="hidden" name="wp_http_referer" value="' . esc_attr( $redirect ) . '" />';
  92  } else {
  93      $redirect = 'users.php';
  94      $referer  = '';
  95  }
  96  
  97  $update = '';
  98  
  99  switch ( $wp_list_table->current_action() ) {
 100  
 101      /* Bulk Dropdown menu Role changes */
 102      case 'promote':
 103          check_admin_referer( 'bulk-users' );
 104  
 105          if ( ! current_user_can( 'promote_users' ) ) {
 106              wp_die( __( 'Sorry, you are not allowed to edit this user.' ), 403 );
 107          }
 108  
 109          if ( empty( $_REQUEST['users'] ) ) {
 110              wp_redirect( $redirect );
 111              exit();
 112          }
 113  
 114          $editable_roles = get_editable_roles();
 115          $role           = false;
 116          if ( ! empty( $_REQUEST['new_role2'] ) ) {
 117              $role = $_REQUEST['new_role2'];
 118          } elseif ( ! empty( $_REQUEST['new_role'] ) ) {
 119              $role = $_REQUEST['new_role'];
 120          }
 121  
 122          if ( ! $role || empty( $editable_roles[ $role ] ) ) {
 123              wp_die( __( 'Sorry, you are not allowed to give users that role.' ), 403 );
 124          }
 125  
 126          $userids = $_REQUEST['users'];
 127          $update  = 'promote';
 128          foreach ( $userids as $id ) {
 129              $id = (int) $id;
 130  
 131              if ( ! current_user_can( 'promote_user', $id ) ) {
 132                  wp_die( __( 'Sorry, you are not allowed to edit this user.' ), 403 );
 133              }
 134              // The new role of the current user must also have the promote_users cap or be a multisite super admin
 135              if ( $id == $current_user->ID && ! $wp_roles->role_objects[ $role ]->has_cap( 'promote_users' )
 136              && ! ( is_multisite() && current_user_can( 'manage_network_users' ) ) ) {
 137                      $update = 'err_admin_role';
 138                      continue;
 139              }
 140  
 141              // If the user doesn't already belong to the blog, bail.
 142              if ( is_multisite() && ! is_user_member_of_blog( $id ) ) {
 143                  wp_die(
 144                      '<h1>' . __( 'Something went wrong.' ) . '</h1>' .
 145                      '<p>' . __( 'One of the selected users is not a member of this site.' ) . '</p>',
 146                      403
 147                  );
 148              }
 149  
 150              $user = get_userdata( $id );
 151              $user->set_role( $role );
 152          }
 153  
 154          wp_redirect( add_query_arg( 'update', $update, $redirect ) );
 155          exit();
 156  
 157      case 'dodelete':
 158          if ( is_multisite() ) {
 159              wp_die( __( 'User deletion is not allowed from this screen.' ), 400 );
 160          }
 161  
 162          check_admin_referer( 'delete-users' );
 163  
 164          if ( empty( $_REQUEST['users'] ) ) {
 165              wp_redirect( $redirect );
 166              exit();
 167          }
 168  
 169          $userids = array_map( 'intval', (array) $_REQUEST['users'] );
 170  
 171          if ( empty( $_REQUEST['delete_option'] ) ) {
 172              $url = self_admin_url( 'users.php?action=delete&users[]=' . implode( '&users[]=', $userids ) . '&error=true' );
 173              $url = str_replace( '&amp;', '&', wp_nonce_url( $url, 'bulk-users' ) );
 174              wp_redirect( $url );
 175              exit;
 176          }
 177  
 178          if ( ! current_user_can( 'delete_users' ) ) {
 179              wp_die( __( 'Sorry, you are not allowed to delete users.' ), 403 );
 180          }
 181  
 182          $update       = 'del';
 183          $delete_count = 0;
 184  
 185          foreach ( $userids as $id ) {
 186              if ( ! current_user_can( 'delete_user', $id ) ) {
 187                  wp_die( __( 'Sorry, you are not allowed to delete that user.' ), 403 );
 188              }
 189  
 190              if ( $id == $current_user->ID ) {
 191                  $update = 'err_admin_del';
 192                  continue;
 193              }
 194              switch ( $_REQUEST['delete_option'] ) {
 195                  case 'delete':
 196                      wp_delete_user( $id );
 197                      break;
 198                  case 'reassign':
 199                      wp_delete_user( $id, $_REQUEST['reassign_user'] );
 200                      break;
 201              }
 202              ++$delete_count;
 203          }
 204  
 205          $redirect = add_query_arg(
 206              array(
 207                  'delete_count' => $delete_count,
 208                  'update'       => $update,
 209              ),
 210              $redirect
 211          );
 212          wp_redirect( $redirect );
 213          exit();
 214  
 215      case 'delete':
 216          if ( is_multisite() ) {
 217              wp_die( __( 'User deletion is not allowed from this screen.' ), 400 );
 218          }
 219  
 220          check_admin_referer( 'bulk-users' );
 221  
 222          if ( empty( $_REQUEST['users'] ) && empty( $_REQUEST['user'] ) ) {
 223              wp_redirect( $redirect );
 224              exit();
 225          }
 226  
 227          if ( ! current_user_can( 'delete_users' ) ) {
 228              $errors = new WP_Error( 'edit_users', __( 'Sorry, you are not allowed to delete users.' ) );
 229          }
 230  
 231          if ( empty( $_REQUEST['users'] ) ) {
 232              $userids = array( intval( $_REQUEST['user'] ) );
 233          } else {
 234              $userids = array_map( 'intval', (array) $_REQUEST['users'] );
 235          }
 236  
 237          /**
 238           * Filters whether the users being deleted have additional content
 239           * associated with them outside of the `post_author` and `link_owner` relationships.
 240           *
 241           * @since 5.2.0
 242           *
 243           * @param boolean $users_have_additional_content Whether the users have additional content. Default false.
 244           * @param int[]   $userids                       Array of IDs for users being deleted.
 245           */
 246          $users_have_content = (bool) apply_filters( 'users_have_additional_content', false, $userids );
 247  
 248          if ( ! $users_have_content ) {
 249              if ( $wpdb->get_var( "SELECT ID FROM {$wpdb->posts} WHERE post_author IN( " . implode( ',', $userids ) . ' ) LIMIT 1' ) ) {
 250                  $users_have_content = true;
 251              } elseif ( $wpdb->get_var( "SELECT link_id FROM {$wpdb->links} WHERE link_owner IN( " . implode( ',', $userids ) . ' ) LIMIT 1' ) ) {
 252                  $users_have_content = true;
 253              }
 254          }
 255  
 256          if ( $users_have_content ) {
 257              add_action( 'admin_head', 'delete_users_add_js' );
 258          }
 259  
 260          include ( ABSPATH . 'wp-admin/admin-header.php' );
 261          ?>
 262      <form method="post" name="updateusers" id="updateusers">
 263          <?php wp_nonce_field( 'delete-users' ); ?>
 264          <?php echo $referer; ?>
 265  
 266  <div class="wrap">
 267  <h1><?php _e( 'Delete Users' ); ?></h1>
 268          <?php if ( isset( $_REQUEST['error'] ) ) : ?>
 269      <div class="error">
 270          <p><strong><?php _e( 'ERROR:' ); ?></strong> <?php _e( 'Please select an option.' ); ?></p>
 271      </div>
 272          <?php endif; ?>
 273  
 274          <?php if ( 1 == count( $userids ) ) : ?>
 275      <p><?php _e( 'You have specified this user for deletion:' ); ?></p>
 276          <?php else : ?>
 277      <p><?php _e( 'You have specified these users for deletion:' ); ?></p>
 278          <?php endif; ?>
 279  
 280  <ul>
 281          <?php
 282          $go_delete = 0;
 283          foreach ( $userids as $id ) {
 284              $user = get_userdata( $id );
 285              if ( $id == $current_user->ID ) {
 286                  /* translators: 1: user id, 2: user login */
 287                  echo '<li>' . sprintf( __( 'ID #%1$s: %2$s <strong>The current user will not be deleted.</strong>' ), $id, $user->user_login ) . "</li>\n";
 288              } else {
 289                  /* translators: 1: user id, 2: user login */
 290                  echo '<li><input type="hidden" name="users[]" value="' . esc_attr( $id ) . '" />' . sprintf( __( 'ID #%1$s: %2$s' ), $id, $user->user_login ) . "</li>\n";
 291                  $go_delete++;
 292              }
 293          }
 294          ?>
 295      </ul>
 296          <?php
 297          if ( $go_delete ) :
 298  
 299              if ( ! $users_have_content ) :
 300                  ?>
 301              <input type="hidden" name="delete_option" value="delete" />
 302              <?php else : ?>
 303                  <?php if ( 1 == $go_delete ) : ?>
 304              <fieldset><p><legend><?php _e( 'What should be done with content owned by this user?' ); ?></legend></p>
 305          <?php else : ?>
 306              <fieldset><p><legend><?php _e( 'What should be done with content owned by these users?' ); ?></legend></p>
 307          <?php endif; ?>
 308          <ul style="list-style:none;">
 309              <li><label><input type="radio" id="delete_option0" name="delete_option" value="delete" />
 310                  <?php _e( 'Delete all content.' ); ?></label></li>
 311              <li><input type="radio" id="delete_option1" name="delete_option" value="reassign" />
 312                  <?php
 313                  echo '<label for="delete_option1">' . __( 'Attribute all content to:' ) . '</label> ';
 314                  wp_dropdown_users(
 315                      array(
 316                          'name'    => 'reassign_user',
 317                          'exclude' => array_diff( $userids, array( $current_user->ID ) ),
 318                          'show'    => 'display_name_with_login',
 319                      )
 320                  );
 321                  ?>
 322              </li>
 323          </ul></fieldset>
 324                  <?php
 325      endif;
 326              /**
 327               * Fires at the end of the delete users form prior to the confirm button.
 328               *
 329               * @since 4.0.0
 330               * @since 4.5.0 The `$userids` parameter was added.
 331               *
 332               * @param WP_User $current_user WP_User object for the current user.
 333               * @param int[]   $userids      Array of IDs for users being deleted.
 334               */
 335              do_action( 'delete_user_form', $current_user, $userids );
 336              ?>
 337      <input type="hidden" name="action" value="dodelete" />
 338              <?php submit_button( __( 'Confirm Deletion' ), 'primary' ); ?>
 339      <?php else : ?>
 340      <p><?php _e( 'There are no valid users selected for deletion.' ); ?></p>
 341      <?php endif; ?>
 342      </div>
 343      </form>
 344          <?php
 345  
 346          break;
 347  
 348      case 'doremove':
 349          check_admin_referer( 'remove-users' );
 350  
 351          if ( ! is_multisite() ) {
 352              wp_die( __( 'You can&#8217;t remove users.' ), 400 );
 353          }
 354  
 355          if ( empty( $_REQUEST['users'] ) ) {
 356              wp_redirect( $redirect );
 357              exit;
 358          }
 359  
 360          if ( ! current_user_can( 'remove_users' ) ) {
 361              wp_die( __( 'Sorry, you are not allowed to remove users.' ), 403 );
 362          }
 363  
 364          $userids = $_REQUEST['users'];
 365  
 366          $update = 'remove';
 367          foreach ( $userids as $id ) {
 368              $id = (int) $id;
 369              if ( ! current_user_can( 'remove_user', $id ) ) {
 370                  $update = 'err_admin_remove';
 371                  continue;
 372              }
 373              remove_user_from_blog( $id, $blog_id );
 374          }
 375  
 376          $redirect = add_query_arg( array( 'update' => $update ), $redirect );
 377          wp_redirect( $redirect );
 378          exit;
 379  
 380      case 'remove':
 381          check_admin_referer( 'bulk-users' );
 382  
 383          if ( ! is_multisite() ) {
 384              wp_die( __( 'You can&#8217;t remove users.' ), 400 );
 385          }
 386  
 387          if ( empty( $_REQUEST['users'] ) && empty( $_REQUEST['user'] ) ) {
 388              wp_redirect( $redirect );
 389              exit();
 390          }
 391  
 392          if ( ! current_user_can( 'remove_users' ) ) {
 393              $error = new WP_Error( 'edit_users', __( 'Sorry, you are not allowed to remove users.' ) );
 394          }
 395  
 396          if ( empty( $_REQUEST['users'] ) ) {
 397              $userids = array( intval( $_REQUEST['user'] ) );
 398          } else {
 399              $userids = $_REQUEST['users'];
 400          }
 401  
 402          include ( ABSPATH . 'wp-admin/admin-header.php' );
 403          ?>
 404      <form method="post" name="updateusers" id="updateusers">
 405          <?php wp_nonce_field( 'remove-users' ); ?>
 406          <?php echo $referer; ?>
 407  
 408  <div class="wrap">
 409  <h1><?php _e( 'Remove Users from Site' ); ?></h1>
 410  
 411          <?php if ( 1 == count( $userids ) ) : ?>
 412      <p><?php _e( 'You have specified this user for removal:' ); ?></p>
 413          <?php else : ?>
 414      <p><?php _e( 'You have specified these users for removal:' ); ?></p>
 415          <?php endif; ?>
 416  
 417  <ul>
 418          <?php
 419          $go_remove = false;
 420          foreach ( $userids as $id ) {
 421              $id   = (int) $id;
 422              $user = get_userdata( $id );
 423              if ( ! current_user_can( 'remove_user', $id ) ) {
 424                  /* translators: 1: user id, 2: user login */
 425                  echo '<li>' . sprintf( __( 'ID #%1$s: %2$s <strong>Sorry, you are not allowed to remove this user.</strong>' ), $id, $user->user_login ) . "</li>\n";
 426              } else {
 427                  /* translators: 1: user id, 2: user login */
 428                  echo "<li><input type=\"hidden\" name=\"users[]\" value=\"{$id}\" />" . sprintf( __( 'ID #%1$s: %2$s' ), $id, $user->user_login ) . "</li>\n";
 429                  $go_remove = true;
 430              }
 431          }
 432          ?>
 433      </ul>
 434          <?php if ( $go_remove ) : ?>
 435          <input type="hidden" name="action" value="doremove" />
 436              <?php submit_button( __( 'Confirm Removal' ), 'primary' ); ?>
 437      <?php else : ?>
 438      <p><?php _e( 'There are no valid users selected for removal.' ); ?></p>
 439      <?php endif; ?>
 440      </div>
 441      </form>
 442          <?php
 443  
 444          break;
 445  
 446      default:
 447          if ( ! empty( $_GET['_wp_http_referer'] ) ) {
 448              wp_redirect( remove_query_arg( array( '_wp_http_referer', '_wpnonce' ), wp_unslash( $_SERVER['REQUEST_URI'] ) ) );
 449              exit;
 450          }
 451  
 452          if ( $wp_list_table->current_action() && ! empty( $_REQUEST['users'] ) ) {
 453              $userids  = $_REQUEST['users'];
 454              $sendback = wp_get_referer();
 455  
 456              /** This action is documented in wp-admin/edit-comments.php */
 457              $sendback = apply_filters( 'handle_bulk_actions-' . get_current_screen()->id, $sendback, $wp_list_table->current_action(), $userids );
 458  
 459              wp_safe_redirect( $sendback );
 460              exit;
 461          }
 462  
 463          $wp_list_table->prepare_items();
 464          $total_pages = $wp_list_table->get_pagination_arg( 'total_pages' );
 465          if ( $pagenum > $total_pages && $total_pages > 0 ) {
 466              wp_redirect( add_query_arg( 'paged', $total_pages ) );
 467              exit;
 468          }
 469  
 470          include ( ABSPATH . 'wp-admin/admin-header.php' );
 471  
 472          $messages = array();
 473          if ( isset( $_GET['update'] ) ) :
 474              switch ( $_GET['update'] ) {
 475                  case 'del':
 476                  case 'del_many':
 477                      $delete_count = isset( $_GET['delete_count'] ) ? (int) $_GET['delete_count'] : 0;
 478                      if ( 1 == $delete_count ) {
 479                          $message = __( 'User deleted.' );
 480                      } else {
 481                          $message = _n( '%s user deleted.', '%s users deleted.', $delete_count );
 482                      }
 483                      $messages[] = '<div id="message" class="updated notice is-dismissible"><p>' . sprintf( $message, number_format_i18n( $delete_count ) ) . '</p></div>';
 484                      break;
 485                  case 'add':
 486                      $message = __( 'New user created.' );
 487  
 488                      if ( isset( $_GET['id'] ) && ( $user_id = $_GET['id'] ) && current_user_can( 'edit_user', $user_id ) ) {
 489                          $message .= sprintf(
 490                              ' <a href="%s">%s</a>',
 491                              esc_url(
 492                                  add_query_arg(
 493                                      'wp_http_referer',
 494                                      urlencode( wp_unslash( $_SERVER['REQUEST_URI'] ) ),
 495                                      self_admin_url( 'user-edit.php?user_id=' . $user_id )
 496                                  )
 497                              ),
 498                              __( 'Edit user' )
 499                          );
 500                      }
 501  
 502                      $messages[] = '<div id="message" class="updated notice is-dismissible"><p>' . $message . '</p></div>';
 503                      break;
 504                  case 'promote':
 505                      $messages[] = '<div id="message" class="updated notice is-dismissible"><p>' . __( 'Changed roles.' ) . '</p></div>';
 506                      break;
 507                  case 'err_admin_role':
 508                      $messages[] = '<div id="message" class="error notice is-dismissible"><p>' . __( 'The current user&#8217;s role must have user editing capabilities.' ) . '</p></div>';
 509                      $messages[] = '<div id="message" class="updated notice is-dismissible"><p>' . __( 'Other user roles have been changed.' ) . '</p></div>';
 510                      break;
 511                  case 'err_admin_del':
 512                      $messages[] = '<div id="message" class="error notice is-dismissible"><p>' . __( 'You can&#8217;t delete the current user.' ) . '</p></div>';
 513                      $messages[] = '<div id="message" class="updated notice is-dismissible"><p>' . __( 'Other users have been deleted.' ) . '</p></div>';
 514                      break;
 515                  case 'remove':
 516                      $messages[] = '<div id="message" class="updated notice is-dismissible fade"><p>' . __( 'User removed from this site.' ) . '</p></div>';
 517                      break;
 518                  case 'err_admin_remove':
 519                      $messages[] = '<div id="message" class="error notice is-dismissible"><p>' . __( "You can't remove the current user." ) . '</p></div>';
 520                      $messages[] = '<div id="message" class="updated notice is-dismissible fade"><p>' . __( 'Other users have been removed.' ) . '</p></div>';
 521                      break;
 522              }
 523          endif;
 524          ?>
 525  
 526          <?php if ( isset( $errors ) && is_wp_error( $errors ) ) : ?>
 527          <div class="error">
 528              <ul>
 529              <?php
 530              foreach ( $errors->get_error_messages() as $err ) {
 531                  echo "<li>$err</li>\n";
 532              }
 533              ?>
 534              </ul>
 535          </div>
 536              <?php
 537      endif;
 538  
 539          if ( ! empty( $messages ) ) {
 540              foreach ( $messages as $msg ) {
 541                  echo $msg;
 542              }
 543          }
 544          ?>
 545  
 546      <div class="wrap">
 547      <h1 class="wp-heading-inline">
 548          <?php
 549          echo esc_html( $title );
 550          ?>
 551  </h1>
 552  
 553          <?php
 554          if ( current_user_can( 'create_users' ) ) {
 555              ?>
 556      <a href="<?php echo admin_url( 'user-new.php' ); ?>" class="page-title-action"><?php echo esc_html_x( 'Add New', 'user' ); ?></a>
 557  <?php } elseif ( is_multisite() && current_user_can( 'promote_users' ) ) { ?>
 558      <a href="<?php echo admin_url( 'user-new.php' ); ?>" class="page-title-action"><?php echo esc_html_x( 'Add Existing', 'user' ); ?></a>
 559              <?php
 560  }
 561  
 562  if ( strlen( $usersearch ) ) {
 563      /* translators: %s: search keywords */
 564      printf( '<span class="subtitle">' . __( 'Search results for &#8220;%s&#8221;' ) . '</span>', esc_html( $usersearch ) );
 565  }
 566  ?>
 567  
 568  <hr class="wp-header-end">
 569  
 570          <?php $wp_list_table->views(); ?>
 571  
 572  <form method="get">
 573  
 574          <?php $wp_list_table->search_box( __( 'Search Users' ), 'user' ); ?>
 575  
 576          <?php if ( ! empty( $_REQUEST['role'] ) ) { ?>
 577  <input type="hidden" name="role" value="<?php echo esc_attr( $_REQUEST['role'] ); ?>" />
 578  <?php } ?>
 579  
 580          <?php $wp_list_table->display(); ?>
 581  </form>
 582  
 583  <br class="clear" />
 584  </div>
 585          <?php
 586          break;
 587  
 588  } // end of the $doaction switch
 589  
 590  include ( ABSPATH . 'wp-admin/admin-footer.php' );


Generated: Mon Jun 17 08:20:02 2019 Cross-referenced by PHPXref 0.7