Created
April 3, 2015 15:02
-
-
Save modemlooper/989cdd4ed2349eef0ee0 to your computer and use it in GitHub Desktop.
hide edit profile fields - BuddyPress
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function bpfr_hide_profile_field_group( $retval ) { | |
| if ( bp_is_active( 'xprofile' ) ) : | |
| // hide profile group/field to all except admin | |
| if ( !is_super_admin() ) { | |
| //exlude fields, separated by comma | |
| $retval['exclude_fields'] = '1'; | |
| //exlude field groups, separated by comma | |
| $retval['exclude_groups'] = '1'; | |
| } | |
| return $retval; | |
| endif; | |
| } | |
| add_filter( 'bp_after_has_profile_parse_args', 'bpfr_hide_profile_field_group' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment