admin管理员组文章数量:1130349
I'm trying to use the user_profile_update_errors hook, however it doesn't appear to be executing.
I'm calling it like this:
add_action('user_profile_update_errors', 'blm_register_result', 10, 3);
function blm_register_result($errors, $update, $user) {
$errors->add('demo_error',__('This is a demo error, and will halt profile save'));
}
I've tried playing around with the priority parameter with no luck.
To test it all I am doing is clicking the register button and if it has any errors it will show them, but not the one I added above - if there are no errors then it will successfully register the user despite my error addition above.
Do I have to call this in a certain spot or what am I doing wrong here!?
I'm trying to use the user_profile_update_errors hook, however it doesn't appear to be executing.
I'm calling it like this:
add_action('user_profile_update_errors', 'blm_register_result', 10, 3);
function blm_register_result($errors, $update, $user) {
$errors->add('demo_error',__('This is a demo error, and will halt profile save'));
}
I've tried playing around with the priority parameter with no luck.
To test it all I am doing is clicking the register button and if it has any errors it will show them, but not the one I added above - if there are no errors then it will successfully register the user despite my error addition above.
Do I have to call this in a certain spot or what am I doing wrong here!?
本文标签: phpuserprofileupdateerrors hook not executing
版权声明:本文标题:php - user_profile_update_errors hook not executing 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://it.en369.cn/questions/1749093564a2314898.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。


发表评论