Custom Avatar upload | Wordpress - No plugin

廉价感情. 提交于 2020-06-01 05:07:19

问题


I am trying to allow my users to replace their avatar picture in their profile page. I built a custom wordpress theme and I can get as far as getting the image data with JavaScript and previewing the selected image.

How can I then update the current user's avatar? I already have the current user information with

$current_user = wp_get_current_user();

Would highly prefer to do this without a plugin, but if its much easier than why not..

来源:https://stackoverflow.com/questions/62030815/custom-avatar-upload-wordpress-no-plugin

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!