Changeset 11176 for trunk/src/bp-groups/bp-groups-template.php
- Timestamp:
- 10/06/2016 07:55:32 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-groups/bp-groups-template.php
r11166 r11176 224 224 * @type string $label_element Element to wrap around the label. Defaults to 'strong'. 225 225 * @type array $label_attr Element attributes for label element. Defaults to array(). 226 * @type bool $show_all Whether to show all registered group types. Defaults to 'false'. If 227 * 'false', only shows group types with the 'show_in_list' parameter set to 228 * true. See bp_groups_register_group_type() for more info. 226 229 * } 227 230 * @return string … … 239 242 'label' => __( 'Group Types:', 'buddypress' ), 240 243 'label_element' => 'strong', 241 'label_attr' => array() 244 'label_attr' => array(), 245 'show_all' => false, 242 246 ), 'group_type_list' ); 243 247 … … 246 250 if ( $types = bp_groups_get_group_type( $group_id, false ) ) { 247 251 // Make sure we can show the type in the list. 248 $types = array_intersect( bp_groups_get_group_types( array( 'show_in_list' => true ) ), $types ); 249 if ( empty( $types ) ) { 250 return $retval; 252 if ( false === $show_all ) { 253 $types = array_intersect( bp_groups_get_group_types( array( 'show_in_list' => true ) ), $types ); 254 if ( empty( $types ) ) { 255 return $retval; 256 } 251 257 } 252 258
Note: See TracChangeset
for help on using the changeset viewer.