Handles generating a password via AJAX.
Source
function wp_ajax_generate_password() {
wp_send_json_success( wp_generate_password( 24 ) );
}
Changelog
Version | Description |
---|---|
4.4.0 | Introduced. |
CARVIEW |
Handles generating a password via AJAX.
function wp_ajax_generate_password() {
wp_send_json_success( wp_generate_password( 24 ) );
}
Uses | Description |
---|---|
wp_generate_password()wp-includes/pluggable.php | Generates a random password drawn from the defined set of characters. |
wp_send_json_success()wp-includes/functions.php | Sends a JSON response back to an Ajax request, indicating success. |
Version | Description |
---|---|
4.4.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.