bp_group_type_show_data( $column, $post_id )
Display data by column and post id.
Description
Parameters
- $column
-
(Required)
- $post_id
-
(Required)
Source
File: bp-groups/bp-groups-admin.php
2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 | function bp_group_type_show_data( $column , $post_id ) { switch ( $column ) { case 'group_type' : echo '<code>' . get_post_meta( $post_id , '_bp_group_type_label_singular_name' , true ). '</code>' ; break ; case 'enable_filter' : if ( get_post_meta( $post_id , '_bp_group_type_enable_filter' , true ) ) _e( 'Show' , 'buddyboss' ); else _e( 'Hide' , 'buddyboss' ); break ; case 'enable_remove' : if ( get_post_meta( $post_id , '_bp_group_type_enable_remove' , true ) ) _e( 'Hide' , 'buddyboss' ); else _e( 'Show' , 'buddyboss' ); break ; case 'total_groups' : $group_key = bp_get_group_type_key( $post_id ); $group_type_url = admin_url(). 'admin.php?page=bp-groups&bp-group-type=' . $group_key ; printf( __( '<a href="%s">%s</a>' , 'buddyboss' ), esc_url( $group_type_url ), bp_get_total_count_by_group_types( $group_key ) ); break ; } } |
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.