bp_get_removed_group_types()
Get excluded group types.
Description
Return
(array)
Source
File: bp-core/deprecated/buddyboss/1.1.8.php
49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 | function bp_get_removed_group_types(){ $bp_group_type_ids = array (); $post_type = bp_get_group_type_post_type(); $bp_group_type_args = array ( 'post_type' => $post_type , 'meta_query' => array ( array ( 'key' => '_bp_group_type_enable_remove' , 'value' => 1, 'compare' => '=' , ), ), 'nopaging' => true, ); $bp_group_type_query = new WP_Query( $bp_group_type_args ); if ( $bp_group_type_query ->have_posts()): while ( $bp_group_type_query ->have_posts()): $bp_group_type_query ->the_post(); $post_id = get_the_ID(); $name = bp_get_group_type_key( $post_id ); $bp_group_type_ids [] = array ( 'ID' => $post_id , 'name' => $name , ); endwhile ; endif ; wp_reset_query(); wp_reset_postdata(); return $bp_group_type_ids ; } |
Changelog
Version | Description |
---|---|
BuddyBoss 1.0.0 | Introduced. |
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.