From 845a286f61538bb6a2cc80a81b52323cac591532 Mon Sep 17 00:00:00 2001
From: Varun Dubey <vapvarun@gmail.com>
Date: Tue, 10 Jul 2018 11:33:19 +0530
Subject: [PATCH] Group Default Check
---
.../buddypress/groups/single/admin/group-settings.php | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/src/bp-templates/bp-nouveau/buddypress/groups/single/admin/group-settings.php b/src/bp-templates/bp-nouveau/buddypress/groups/single/admin/group-settings.php
index 6a02a2179..7e9f046d2 100644
|
a
|
b
|
|
| 68 | 68 | |
| 69 | 69 | <p tabindex="0"><?php esc_html_e( 'Select the types this group should be a part of.', 'buddypress' ); ?></p> |
| 70 | 70 | |
| 71 | | <?php foreach ( $group_types as $type ) : ?> |
| | 71 | <?php foreach ( $group_types as $type ) : |
| | 72 | if ( bp_is_group_create() ) { |
| | 73 | $checked = checked( true, ! empty( $type->create_screen_checked ), false ); |
| | 74 | } else { |
| | 75 | $checked = checked( bp_groups_has_group_type( bp_get_current_group_id(), $type->name ), true, false ); |
| | 76 | } |
| | 77 | ?> |
| 72 | 78 | <div class="checkbox"> |
| 73 | 79 | <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'] ); ?> |
| | 80 | <input type="checkbox" name="group-types[]" id="<?php printf( 'group-type-%s', $type->name ); ?>" value="<?php echo esc_attr( $type->name ); ?>" <?php echo $checked; ?>/> <?php echo esc_html( $type->labels['name'] ); ?> |
| 75 | 81 | <?php |
| 76 | 82 | if ( ! empty( $type->description ) ) { |
| 77 | 83 | printf( '– %s', '<span class="bp-group-type-desc">' . esc_html( $type->description ) . '</span>' ); |