Make WordPress Core


Ignore:
Timestamp:
09/10/2015 04:46:38 PM (9 years ago)
Author:
wonderboymusic
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/user.php

    r33774 r34000  
    447447    echo '</p></div>';
    448448}
     449
     450/**
     451 * @since 3.5.0
     452 * @access private
     453 */
     454function delete_users_add_js() { ?>
     455<script>
     456jQuery(document).ready( function($) {
     457    var submit = $('#submit').prop('disabled', true);
     458    $('input[name="delete_option"]').one('change', function() {
     459        submit.prop('disabled', false);
     460    });
     461    $('#reassign_user').focus( function() {
     462        $('#delete_option1').prop('checked', true).trigger('change');
     463    });
     464});
     465</script>
     466<?php
     467}
Note: See TracChangeset for help on using the changeset viewer.