user_new_form WordPress Action Hook

The user_new_form hook allows you to add extra fields to the user registration form. This is useful if you want to collect additional information from your users.

do_action( 'user_new_form', string $type ) #

Fires at the end of the new user form.


Description

Passes a contextual string to make both types of new user forms uniquely targetable. Contexts are ‘add-existing-user’ (Multisite), and ‘add-new-user’ (single site and network admin).


Top ↑

Parameters

$type

(string)A contextual string specifying which type of new user form the hook follows.


Top ↑

Source

File: wp-admin/user-new.php

View on Trac


Top ↑

Changelog

Changelog
VersionDescription
3.7.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.