Handles generating a password in the no-privilege context via AJAX.
Source
function wp_ajax_nopriv_generate_password() {
wp_send_json_success( wp_generate_password( 24 ) );
}
Changelog
Version | Description |
---|---|
5.7.0 | Introduced. |
CARVIEW |
Handles generating a password in the no-privilege context via AJAX.
function wp_ajax_nopriv_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 |
---|---|
5.7.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.