delete_users_add_js

The WordPress Core delete users add js function.

Description

delete_users_add_js(); 

Usage

  1. if ( !function_exists( 'delete_users_add_js' ) ) { 
  2. require_once ABSPATH . '/wp-admin/includes/user.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = delete_users_add_js(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/wp-admin/includes/user.php  
  1. function delete_users_add_js() { ?> 
  2. <script> 
  3. jQuery(document).ready( function($) { 
  4. var submit = $('#submit').prop('disabled', true); 
  5. $('input[name="delete_option"]').one('change', function() { 
  6. submit.prop('disabled', false); 
  7. }); 
  8. $('#reassign_user').focus( function() { 
  9. $('#delete_option1').prop('checked', true).trigger('change'); 
  10. }); 
  11. }); 
  12. </script> 
  13. <?php