admin管理员组文章数量:1429984
Is there a way to add custom user meta fields (like the one in the profile.php, which contains specific user data), but only an admin or an other user with enough capabilities can change them?
Maybe I'm thinking too complicated. How would you tell your site visitors, who from your users is having which position / status without manually updating a static page?
Is there a way to add custom user meta fields (like the one in the profile.php, which contains specific user data), but only an admin or an other user with enough capabilities can change them?
Maybe I'm thinking too complicated. How would you tell your site visitors, who from your users is having which position / status without manually updating a static page?
Share Improve this question edited Apr 24, 2019 at 19:07 Maxim Zubarev asked May 20, 2011 at 0:44 Maxim ZubarevMaxim Zubarev 3074 silver badges16 bronze badges1 Answer
Reset to default 3I think I get what you are saying, and if not, forgive me:
just add your meta fields / metabox inside:
if( current_user_can( 'administrator' ) ){ // put code here }
*this is assuming you aren't asking how to add a metafield or metabox.
本文标签: Add User meta fieldswhich only admin can edit
版权声明:本文标题:Add User meta fields, which only admin can edit 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745556843a2663239.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论