[buddypress-trac] [BuddyPress Trac] #5650: bp_after_has_profile_parse_args not working correctly

buddypress-trac noreply at wordpress.org
Sat May 17 20:35:30 UTC 2014


#5650: bp_after_has_profile_parse_args not working correctly
--------------------------+-------------------
 Reporter:  danbp         |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  2.0.1
Component:  Members       |    Version:
 Severity:  normal        |   Keywords:
--------------------------+-------------------
 I'm trying to hide some profile groups to not logged in visitors by using
 the new bp_after_$filter_key_parse_args,
 [http://codex.buddypress.org/plugindev/using-bp_parse_args-to-filter-
 buddypress-template-loops/#filtering-bp_parse_args/]

 When i use this function

 {{{
 function bpfr_make_profile_tab_members_only( $retval ) {

         if( !is_user_logged_in() ) {
                 $retval['exclude_groups'] = '1,3';
         }

         return $retval;

 }
 add_filter( 'bp_after_has_profile_parse_args',
 'bpfr_make_profile_tab_members_only' );
 }}}

 In the best case, ID 1 is always showing and the fields who shoud stay
 don't come up. Very strange.

 I have a total of 5 profile groups. I played around with the if statement
 and also with the profile group ID's. Nothing is going correctly and
 varies strangely, depending of the if/if! or the ID's.


 Aside, i have also a warning ''Missing argument 2''. Changed it, but had
 no influence on the function.
 See [https://buddypress.trac.wordpress.org/ticket/5649]

--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/5650>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list