wp_ajax_generate_password()WP 4.4.0

Handles generating a password via AJAX.

No Hooks.

Return

null. Nothing (null).

Usage

wp_ajax_generate_password();

Changelog

Since 4.4.0 Introduced.

wp_ajax_generate_password() code WP 6.6.2

function wp_ajax_generate_password() {
	wp_send_json_success( wp_generate_password( 24 ) );
}