X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/f9001779751f83dc8a10e478bfecb4d8dd5f964c..5aa86a9053fb0fa15846bb60aac2fb8fdfff524a:/wp-admin/includes/class-wp-ms-users-list-table.php
diff --git a/wp-admin/includes/class-wp-ms-users-list-table.php b/wp-admin/includes/class-wp-ms-users-list-table.php
index 36d55e1c..4ebec5e7 100644
--- a/wp-admin/includes/class-wp-ms-users-list-table.php
+++ b/wp-admin/includes/class-wp-ms-users-list-table.php
@@ -32,7 +32,8 @@ class WP_MS_Users_List_Table extends WP_List_Table {
'fields' => 'all_with_meta'
);
- $args['search'] = ltrim($args['search'], '*');
+ if ( wp_is_large_network( 'users' ) )
+ $args['search'] = ltrim( $args['search'], '*' );
if ( $role == 'super' ) {
$logins = implode( "', '", get_super_admins() );
@@ -41,7 +42,7 @@ class WP_MS_Users_List_Table extends WP_List_Table {
// If the network is large and a search is not being performed, show only the latest users with no paging in order
// to avoid expensive count queries.
- if ( !$usersearch && ( get_blog_count() >= 10000 ) ) {
+ if ( !$usersearch && wp_is_large_network( 'users' ) ) {
if ( !isset($_REQUEST['orderby']) )
$_GET['orderby'] = $_REQUEST['orderby'] = 'id';
if ( !isset($_REQUEST['order']) )
@@ -188,10 +189,11 @@ class WP_MS_Users_List_Table extends WP_List_Table {
$actions = array();
$actions['edit'] = '' . __( 'Edit' ) . '';
- if ( current_user_can( 'delete_user', $user->ID) && ! in_array( $user->user_login, $super_admins ) ) {
- $actions['delete'] = '' . __( 'Delete' ) . '';
+ if ( current_user_can( 'delete_user', $user->ID ) && ! in_array( $user->user_login, $super_admins ) ) {
+ $actions['delete'] = '' . __( 'Delete' ) . '';
}
+ $actions = apply_filters( 'ms_user_row_actions', $actions, $user );
echo $this->row_actions( $actions );
?>