开发者 |
A5hleyRich
garrett-eclipse |
---|---|
更新时间 | 2015年11月4日 05:00 |
捐献地址: | 去捐款 |
PHP版本: | 4.3.1 及以上 |
WordPress版本: | 4.3.1 |
版权: | GPLv2 or later |
版权网址: | 版权信息 |
bp-admin-only-profile-fields
to the /wp-content/plugins/
directory.In the WordPress admin area, go to Users > Profile Fields and click Edit on the desired profile field. Under the Default Visibility panel select Hidden as the value and click Save. The profile field is now hidden from all users except Administrators.
Add the following filter to your theme’s functions.php file, substituting edit_others_posts with the desired capability:
function custom_profile_fields_visibility() { return 'edit_others_posts'; // Editors } add_filter( 'bp_admin_only_profile_fields_cap', 'custom_profile_fields_visibility' );