signup_nonce_fields() WordPress Function
The signup_nonce_fields() function is used to protect against certain types of attacks on WordPress websites. It adds hidden fields to the signup form that contain a nonce, or number used once, which is used to verify the form submission. This function should be called when adding a new user to the website.
signup_nonce_fields() #
Adds a nonce field to the signup page.
Source
File: wp-includes/ms-functions.php
function signup_nonce_fields() {
$id = mt_rand();
echo "<input type='hidden' name='signup_form_id' value='{$id}' />";
wp_nonce_field( 'signup_form_' . $id, '_signup_form', false );
}
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
| Version | Description |
|---|---|
| MU (3.0.0) | Introduced. |