开发者 |
VincentListrani
jmichaelward |
---|---|
更新时间 | 2020年7月10日 11:15 |
PHP版本: | 3.6.1 及以上 |
WordPress版本: | 4.7.3 |
版权: | GPLv2 or later |
版权网址: | 版权信息 |
custom-user-profile-photo
folder to the /wp-content/plugins/
directory<?php get_cupp_meta($user_id, $size); ?>
in your templatesCurrently, only a user with the upload_files capability can use this option. Editors and Admins can upload and edit files. Authors can only upload files. Subscribers and Contributors cannot do either so an Admin will need to do this for them.
Yes, you can still customize the output by using the get_cupp_meta() function. Please reference the code snippet below or on the Description tab.
<?php echo get_cupp_meta($user_ID, $size); ?>
Where the $user_ID is the users ID number and the size is a registered image size like 'thumbnail' or an array like array(50,50)
.
cupp_get_user_by_id_or_email
could potentially be the WP_Comment object.update_user_attribute
.update_user_meta
with update_user_attribute
per WordPress VIP Standards.get_home_url
with get_site_url
for users where the edit image link was returning a 404. Credit: SOMTIJDS