Group
Class for all gruops related functions
Description
Source
File: bp-integrations/learndash/buddypress/Group.php
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 | class Group { /** * Get groups that's not associated to ld * * @since BuddyBoss 1.0.0 */ public function getUnassociatedGroups( $include = null) { $meta_query = [ 'relation' => 'OR' , [ 'key' => '_sync_group_id' , 'value' => [ 0, '' ], ], [ 'key' => '_sync_group_id' , 'compare' => 'NOT EXISTS' , ], ]; if ( $include ) { $meta_query [] = [ 'key' => '_sync_group_id' , 'value' => is_array ( $include ) ? $include : [ $include ] ]; } return groups_get_groups( [ 'orderby' => 'name' , 'order' => 'asc' , 'meta_query' => [ $meta_query ], 'per_page' => - 1 ] )[ 'groups' ]; } } |
Changelog
Version | Description |
---|---|
BuddyBoss 1.0.0 | Introduced. |
Methods
- getUnassociatedGroups — Get groups that's not associated to ld
Questions?
We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.