开发

wordpress的两个钩子——edit_user_profile_update和profile_update

介绍WordPress中edit_user_profile_update和profile_update两个重要钩子的使用方法和执行时机。

· 1 分钟阅读

介绍WordPress中edit_user_profile_update和profile_update两个重要钩子的使用方法和执行时机。

  • edit_user_profile_update

Fires before the page loads on the ‘Edit User’ screen.

这个钩子是管理面板的用户个人资料页面打开前执行的钩子。

这个钩子也会用来扩展用户管理面板。但有时候会不管用。

  • profile_update

Fires immediately after an existing user is updated.

这个钩子是个人资料更新后执行的钩子。

常用来扩展用户管理面板中。