如果你檢查/wp-admin/user-new.php
你會看到兩個do_action,你GH我在使用這些掛鉤
鉤添加標籤或表格屬性
<form method="post" name="adduser" id="adduser" class="validate" novalidate="novalidate"<?php
/**
* Fires inside the adduser form tag.
*
* @since 3.0.0
*/
do_action('user_new_form_tag');
?>>
和
/**
* Fires at the end of the new user form.
*
* 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).
*
* @since 3.7.0
*
* @param string $type A contextual string specifying which type of new user form the hook follows.
*/
do_action('user_new_form', 'add-existing-user');
和
<?php
/** This action is documented in wp-admin/user-new.php */
do_action('user_new_form', 'add-new-user');
?>
您還可能要檢查從來沒有嘗試過user_register掛鉤