Changeset 12228
- Timestamp:
- 09/07/2018 03:06:03 PM (7 years ago)
- Location:
- trunk/src/bp-templates/bp-nouveau
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-templates/bp-nouveau/buddypress/groups/single/admin/group-settings.php
r12156 r12228 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 ) ) { -
trunk/src/bp-templates/bp-nouveau/includes/groups/template-tags.php
r12215 r12228 1369 1369 return apply_filters( 'bp_nouveau_get_group_description_excerpt', bp_create_excerpt( $group->description, $length ), $group ); 1370 1370 } 1371 1372 /** 1373 * Output "checked" attribute to determine if the group type should be checked. 1374 * 1375 * @since 3.2.0 1376 * 1377 * @param object $type Group type object. See bp_groups_get_group_type_object(). 1378 */ 1379 function bp_nouveau_group_type_checked( $type = null ) { 1380 if ( ! is_object( $type ) ) { 1381 return; 1382 } 1383 1384 // Group creation screen requires a different check. 1385 if ( bp_is_group_create() ) { 1386 checked( true, ! empty( $type->create_screen_checked ) ); 1387 } elseif ( bp_is_group() ) { 1388 checked( bp_groups_has_group_type( bp_get_current_group_id(), $type->name ) ); 1389 } 1390 }
Note: See TracChangeset
for help on using the changeset viewer.