W3cubDocs

/WordPress

wp_ajax_generate_password()

Ajax handler for generating a password.

Source

File: wp-admin/includes/ajax-actions.php

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

Changelog

Version Description
4.4.0 Introduced.

© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/wp_ajax_generate_password