[buddypress-trac] [BuddyPress Trac] #8559: Add Status Notification Feature

buddypress-trac noreply at wordpress.org
Tue Sep 7 16:14:55 UTC 2021


#8559: Add Status Notification Feature
--------------------------+------------------------------
 Reporter:  gamicord      |       Owner:  (none)
     Type:  enhancement   |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Core          |     Version:  9.1.1
 Severity:  normal        |  Resolution:
 Keywords:  dev-feedback  |
--------------------------+------------------------------

Comment (by dcavins):

 Hi @imath,

 Regarding point 2, it would be easy to do in BP core or in a plugin. This
 code sketch should generate the loop of groups that are shared:

 {{{#!php
 <?php
 $args = array(
         'is_admin' => null,
         'is_mod'   => null,
 );
 $displayed_user_groups    = bp_get_user_groups( bp_displayed_user_id(),
 $args );
 $displayed_user_group_ids = array_keys( $displayed_user_groups );

 // Loop through groups:
 $loop_args = array(
         'user_id'     => bp_loggedin_user_id(),
         'include'     => $displayed_user_group_ids ?
 $displayed_user_group_ids : array(),
         'show_hidden' => true, // Since we're limiting to the logged-in
 user's groups, this is safe.
 );
 bp_has_groups( $loop_args );
 }}}

 I can create a patch to include this in core if that's of interest. If
 not, it would be doable in a plugin.

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


More information about the buddypress-trac mailing list