diff --git a/src/wp-admin/includes/user.php b/src/wp-admin/includes/user.php index 729ec1848d..22064602f6 100644 --- a/src/wp-admin/includes/user.php +++ b/src/wp-admin/includes/user.php @@ -446,3 +446,22 @@ function default_password_nag() { printf( '' . __('No thanks, do not remind me again') . '', '?default_password_nag=0' ); echo '

'; } + +/** + * @since 3.5.0 + * @access private + */ +function delete_users_add_js() { ?> + + - -current_action() ) { /* Bulk Dropdown menu Role changes */ @@ -215,7 +196,15 @@ case 'delete': else $userids = array_map( 'intval', (array) $_REQUEST['users'] ); - add_action( 'admin_head', 'delete_users_add_js' ); + $users_posts = new WP_Query( array( + 'post_type' => 'any', + 'author' => implode( ',', $userids ), + 'posts_per_page' => 1 + ) ); + + if ( $users_posts->have_posts() ) { + add_action( 'admin_head', 'delete_users_add_js' ); + } include( ABSPATH . 'wp-admin/admin-header.php' ); ?> @@ -251,20 +240,24 @@ case 'delete': } ?> - - -

- -

- -
- have_posts() ) : ?> + + + +

+ +

+ +
    +
  • +
  • + ' . __( 'Attribute all content to:' ) . ' '; + wp_dropdown_users( array( 'name' => 'reassign_user', 'exclude' => array_diff( $userids, array($current_user->ID) ) ) ); ?>
  • +
+