[buddypress-trac] [BuddyPress Trac] #7304: xProfile Group field

buddypress-trac noreply at wordpress.org
Tue Oct 25 15:21:29 UTC 2016


#7304: xProfile Group field
-------------------------------+------------------
 Reporter:  danbp              |       Owner:
     Type:  defect (bug)       |      Status:  new
 Priority:  normal             |   Milestone:
Component:  Extended Profile   |     Version:  2.7
 Severity:  normal             |  Resolution:
 Keywords:  reporter-feedback  |
-------------------------------+------------------

Comment (by danbp):

 I don't want the field group tab to appear on edit screen.
 I have no custom edit template.

 This snippet worked with 2.1. I don't remember if it hide only the content
 of a field group or the whole group tab, including content. But it seems
 logic that if i remove a group from a conditionnal context, it shouldn't
 appear.

 {{{

 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 groups, separated by comma
                 $retval['exclude_groups'] = '1';
         }
         return $retval;

         endif;
 }
 add_filter( 'bp_after_has_profile_parse_args',
 'bpfr_hide_profile_field_group' );
 }}}

 I remember vaguely that it was also a time where it was not possible to
 hide groups via parse_args. It came in later and i could use such snippet.
 Sorry, have no more details for this.

--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/7304#comment:3>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list