wp_ajax_generate_password() WordPress Function

The wp_ajax_generate_password() function is used to generate a password for a user. It takes two arguments: the user ID and the length of the password. The function returns a string containing the generated password.

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 ) );
}


Top ↑

Changelog

Changelog
VersionDescription
4.4.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More