[buddypress-trac] [BuddyPress Trac] #8029: bp_has_members misbehaving on Nouveau Profile Home page widgets area

buddypress-trac noreply at wordpress.org
Sun Dec 23 20:38:55 UTC 2018


#8029: bp_has_members misbehaving on Nouveau Profile Home page widgets area
--------------------------+------------------------------
 Reporter:  Venutius      |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Templates     |     Version:
 Severity:  normal        |  Resolution:
 Keywords:                |
--------------------------+------------------------------

Comment (by Venutius):

 I've found the reason for this behaviour, it's from bp-templates/bp-
 nouveau/includes/members/functions.php line 400:

 {{{
 function bp_nouveau_member_members_widget_overrides( $args = array() ) {
         // Do nothing for the friends widget
         if ( ! empty( $args['user_id'] ) && (int) $args['user_id'] ===
 (int) bp_displayed_user_id() ) {
                 return $args;
         }

         return array_merge( $args, array(
                 'include' => bp_displayed_user_id(),
         ) );
 }

 }}}

 This filter is being driven by the following in line 283 of bp-core/bp-
 core functions:

 {{{
         if ( !empty( $filter_key ) ) {

                 $r = apply_filters( 'bp_before_' . $filter_key .
 '_parse_args', $r );
         }
 }}}

 For the bp_has_members() calls I am making, $filter_key should be empty
 and it should not be firing. The filter being called is
 bp_before_has_members_parse_args

 So it appears that somehow for Home page widgets a filter key of
 has_members is being set

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


More information about the buddypress-trac mailing list