相關:Wordpress,單擊“更新用戶”后的功能
我有一個 PHP 腳本,只要在 wordpress 中更新任何用戶組態檔,它就需要運行:
function profile_update() {
echo "<h2>fired on profile update</h2>";
// do stuff
add_action( 'edit_user_profile_update', 'profile_update' );
但是當用戶更新時它不會觸發。怎么了?這個鉤子應該可以完成這項作業......
期望動作掛鉤起作用,不清楚出了什么問題。
uj5u.com熱心網友回復:
Please Use below hook for function when update user button is clicked
function profile_update() {
echo "<h2>fired on profile update</h2>";
// do stuff
}
add_action('show_user_profile','profile_update');
add_action('edit_user_profile','profile_update');
轉載請註明出處,本文鏈接:https://www.uj5u.com/caozuo/537091.html
