我列出了必要的挂钩,这些挂钩将添加、验证注册表上的自定义字段,以及允许从用户配置文件页面更新字段-
//show field on WordPress registration form
add_action(\'register_form\',\'register_form_callback\');
//handle validation
add_filter(\'registration_errors\', \'registration_errors_callback\', 10, 3);
//save user data
add_action(\'user_register\', \'user_register_callback\');
seems you are looking for these
//add fields on user profile page
add_action( \'show_user_profile\', \'show_user_profile_callback\' );
add_action( \'edit_user_profile\', \'edit_user_profile_callback\' );
//handle profile update errors
add_filter(\'user_profile_update_errors\', \'user_profile_update_errors_callback\', 10, 3);
//update profile
add_action(\'profile_update\',\'profile_update_callback\');