I am trying to write a plugin which will update a user field. I can use the update user meta function OK, but when I try the wp_update_user it doesnt work.
wp_update_user($user_ID, 'user_nicename', 开发者_如何学Go'test');
That crashes the plugin. Do I need to include something for this function to work??
Read the Codex on wp_update_user()
- you're not using it correctly. It should be;
wp_update_user(array('ID' => $user_ID, 'user_nicename' => 'test'));
精彩评论