When deleting via User List Table, don't prompt for re-attribution if the user(s) do(es) not have any posts.

Props rajnikmit, wojtek.szkutnik, benjmay, wonderboymusic.
Fixes #6405. 


git-svn-id: https://develop.svn.wordpress.org/trunk@34000 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Scott Taylor
2015-09-10 16:46:38 +00:00
parent 9473a479d9
commit 2deb9565c0
2 changed files with 46 additions and 34 deletions

View File

@@ -446,3 +446,22 @@ function default_password_nag() {
printf( '<a href="%s" id="default-password-nag-no">' . __('No thanks, do not remind me again') . '</a>', '?default_password_nag=0' );
echo '</p></div>';
}
/**
* @since 3.5.0
* @access private
*/
function delete_users_add_js() { ?>
<script>
jQuery(document).ready( function($) {
var submit = $('#submit').prop('disabled', true);
$('input[name="delete_option"]').one('change', function() {
submit.prop('disabled', false);
});
$('#reassign_user').focus( function() {
$('#delete_option1').prop('checked', true).trigger('change');
});
});
</script>
<?php
}