WordPress.org

Make WordPress Core

Ticket #27230: delete-form-2.patch

File delete-form-2.patch, 1.2 KB (added by usermrpapa, 6 years ago)
  • wp-admin/network/users.php

     
    7777                }
    7878        }
    7979
     80    // allow plugins to add items to delete form
     81    do_action( 'delete_user_form', $current_user );
     82
    8083        submit_button( __('Confirm Deletion'), 'delete' );
    8184        ?>
    8285        </form>
  • wp-admin/users.php

     
    248248                <?php echo '<label for="delete_option1">' . __( 'Attribute all posts to:' ) . '</label> ';
    249249                wp_dropdown_users( array( 'name' => 'reassign_user', 'exclude' => array_diff( $userids, array($current_user->ID) ) ) ); ?></li>
    250250        </ul></fieldset>
    251         <input type="hidden" name="action" value="dodelete" />
     251<?php
     252    // allow plugins to add items to delete form
     253    do_action( 'delete_user_form', $current_user );
     254?>
     255        <input type="hidden" name="action" value="dodelete" />
    252256        <?php submit_button( __('Confirm Deletion'), 'secondary' ); ?>
    253257<?php else : ?>
    254258        <p><?php _e('There are no valid users selected for deletion.'); ?></p>