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

buddypress-trac noreply at wordpress.org
Tue Oct 25 14:47:05 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:                    |
------------------------------+------------------
Description changed by danbp:

Old description:

> I'm unable to hide a profile field group from the profile edit screen by
> using following function. It worked in the past, at least 2.1.
>
> Not sure it is a bug, but if somebody could confirm.
>

> {{{
> function bpfr_hide_profile_field_group( $retval ) {
>
>         if ( bp_is_active( 'xprofile' ) ) :
>
>         // hide profile group/field to all except admin
>         //if ( !is_super_admin() ) {
>         // hide fields & group tabs on edit screen
>         if( bp_is_user_profile_edit() ) {
>                 //exlude fields, separated by comma
>                 //$retval['exclude_fields'] = '1';
>                 //exlude groups, separated by comma
>                 $retval['exclude_groups'] = '3';
>         }
>         return $retval;
>
>         endif;
> }
> add_filter( 'bp_after_has_profile_parse_args',
> 'bpfr_hide_profile_field_group' );
> }}}

New description:

 I'm unable to hide a profile field group from the profile edit screen by
 using following function. It worked in the past, at least 2.1.

 Not sure it is a bug, but if somebody could confirm.
 The issue was mentionned on support:
 https://buddypress.org/support/topic/hide-xprofile-fields-from-edit/

 {{{
 function bpfr_hide_profile_field_group( $retval ) {

         if ( bp_is_active( 'xprofile' ) ) :

         // hide profile group/field to all except admin
         //if ( !is_super_admin() ) {
         // hide fields & group tabs on edit screen
         if( bp_is_user_profile_edit() ) {
                 //exlude fields, separated by comma
                 //$retval['exclude_fields'] = '1';
                 //exlude groups, separated by comma
                 $retval['exclude_groups'] = '3';
         }
         return $retval;

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

--

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


More information about the buddypress-trac mailing list