bp_group_list_parents( object|bool $group = false )
Output markup listing group parents.
Description
Parameters
- $group
-
(Optional) Group object. Default: current group in loop.
Default value: false
Source
File: bp-groups/bp-groups-template.php
1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 | function bp_group_list_parents( $group = false ) { global $groups_template ; if ( empty ( $group ) ) { $group =& $groups_template ->group; } if ( ! empty ( $group ->parent_id ) ) { $parent_group = groups_get_group( $group ->parent_id ); $group_type = bp_groups_get_group_type( $group ->parent_id ); $group_type_object = bp_groups_get_group_type_object( $group_type ); $group_type = ( isset( $group_type_object ) && isset( $group_type_object ->labels[ 'singular_name' ] ) ) ?: esc_html__( 'Subgroup of' , 'buddyboss' ); ?> <dl class = "parent-list" > <dt class = "parent-title" ><?php echo $group_type ; ?></dt> <dd class = "group-list parent" > <ul id= "group-parent" > <li> <a href= "<?php bp_group_permalink( $parent_group ) ?>" class = "bp-tooltip" data-bp-tooltip-pos= "up" data-bp-tooltip= "<?php printf( ( '%s' ), bp_get_group_name( $parent_group ) ) ?>" ><?php echo bp_core_fetch_avatar( array ( 'item_id' => $parent_group ->id, 'object' => 'group' , 'alt' => sprintf( __( 'Group photo of %s' , 'buddyboss' ), bp_get_group_name( $parent_group ) ) ) ) ?></a> </li> </ul> </dd> </dl> <?php } } |
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.