WordPress的添加新的用户挂钩 [英] Wordpress Add new User hooks

查看:134
本文介绍了WordPress的添加新的用户挂钩的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想添加一些自定义字段以在Wordpress中添加新用户.我正在使用以下挂钩:

I want to add some custom fields to add new user in Wordpress . I am using the following hooks:

  • show_user_profile
  • edit_user_profile
  • show_user_profile
  • edit_user_profile

这些钩子在编辑配置文件页面上显示新的自定义字段,但是我希望新的自定义字段显示在添加新用户"页面上.

these hooks displaying new custom field on edit profile page, but i want the new custom field to be shown in Add New User page.

我也想在wp_usermeta表中插入值,为此,我使用了以下钩子:

and also i want to insert values in wp_usermeta table, for this i am using following hooks:

  • personal_options_update
  • edit_user_profile_update
  • personal_options_update
  • edit_user_profile_update

这些钩子在编辑或更新配置文件时也可以正常工作,但是我需要在添加新用户时而不是在配置文件更新时在wp_usermeta tabe中插入记录.

these hooks are also working fine on edit or update profile, but i need the insertion of record in wp_usermeta tabe at the time of Add new User, not at the Profile update time.

请给我提示将在添加新用户"中使用的钩子.

please give me hint of hook that will b used at ADD New User.

谢谢.

推荐答案

据我所知,在新用户页面上没有可触发的动作挂钩.在user-new.php中搜索do_action.

As far as I can see there are no action hooks that will trigger on the new user page. Searched in user-new.php for do_action.

这篇关于WordPress的添加新的用户挂钩的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆