Ticket #7919: 7919.02.patch
| File 7919.02.patch, 2.1 KB (added by , 8 years ago) |
|---|
-
src/bp-templates/bp-nouveau/buddypress/groups/single/admin/group-settings.php
71 71 <?php foreach ( $group_types as $type ) : ?> 72 72 <div class="checkbox"> 73 73 <label for="<?php printf( 'group-type-%s', $type->name ); ?>"> 74 <input type="checkbox" name="group-types[]" id="<?php printf( 'group-type-%s', $type->name ); ?>" value="<?php echo esc_attr( $type->name ); ?>" <?php checked( bp_groups_has_group_type( bp_get_current_group_id(), $type->name )); ?>/> <?php echo esc_html( $type->labels['name'] ); ?>74 <input type="checkbox" name="group-types[]" id="<?php printf( 'group-type-%s', $type->name ); ?>" value="<?php echo esc_attr( $type->name ); ?>" <?php bp_nouveau_group_type_checked( $type ); ?>/> <?php echo esc_html( $type->labels['name'] ); ?> 75 75 <?php 76 76 if ( ! empty( $type->description ) ) { 77 77 printf( '– %s', '<span class="bp-group-type-desc">' . esc_html( $type->description ) . '</span>' ); -
src/bp-templates/bp-nouveau/includes/groups/template-tags.php
1360 1360 */ 1361 1361 return apply_filters( 'bp_nouveau_get_group_description_excerpt', bp_create_excerpt( $group->description, $length ), $group ); 1362 1362 } 1363 1364 /** 1365 * Output "checked" attribute to determine if the group type should be checked. 1366 * 1367 * @since 3.2.0 1368 * 1369 * @param object $type Group type object. See bp_groups_get_group_type_object(). 1370 */ 1371 function bp_nouveau_group_type_checked( $type = null ) { 1372 if ( ! is_object( $type ) ) { 1373 return; 1374 } 1375 1376 // Group creation screen requires a different check. 1377 if ( bp_is_group_create() ) { 1378 checked( true, ! empty( $type->create_screen_checked ) ); 1379 } elseif ( bp_is_group() ) { 1380 checked( bp_groups_has_group_type( bp_get_current_group_id(), $type->name ) ); 1381 } 1382 }