Changeset 45806
- Timestamp:
- 08/15/2019 01:05:39 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/users.php
r45674 r45806 235 235 } 236 236 237 if ( in_array( $current_user->ID, $userids ) ) { 238 $all_userids = $userids; 239 $userids = array_diff( $userids, array( $current_user->ID ) ); 240 } 241 237 242 /** 238 243 * Filters whether the users being deleted have additional content … … 246 251 $users_have_content = (bool) apply_filters( 'users_have_additional_content', false, $userids ); 247 252 248 if ( ! $users_have_content ) {253 if ( $userids && ! $users_have_content ) { 249 254 if ( $wpdb->get_var( "SELECT ID FROM {$wpdb->posts} WHERE post_author IN( " . implode( ',', $userids ) . ' ) LIMIT 1' ) ) { 250 255 $users_have_content = true; … … 272 277 <?php endif; ?> 273 278 274 <?php if ( 1 == count( $ userids ) ) : ?>279 <?php if ( 1 == count( $all_userids ) ) : ?> 275 280 <p><?php _e( 'You have specified this user for deletion:' ); ?></p> 276 281 <?php else : ?> … … 281 286 <?php 282 287 $go_delete = 0; 283 foreach ( $ userids as $id ) {288 foreach ( $all_userids as $id ) { 284 289 $user = get_userdata( $id ); 285 290 if ( $id == $current_user->ID ) { … … 315 320 array( 316 321 'name' => 'reassign_user', 317 'exclude' => array_diff( $userids, array( $current_user->ID ) ),322 'exclude' => $userids, 318 323 'show' => 'display_name_with_login', 319 324 )
Note: See TracChangeset
for help on using the changeset viewer.