Skip to:
Content

BuddyPress.org

Ticket #7919: 7919_1.patch

File 7919_1.patch, 1.9 KB (added by wbcomdesigns, 16 months ago)
  • src/bp-templates/bp-nouveau/buddypress/groups/single/admin/group-settings.php

    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  
    6868
    6969                <p tabindex="0"><?php esc_html_e( 'Select the types this group should be a part of.', 'buddypress' ); ?></p>
    7070
    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                        ?>
    7278                        <div class="checkbox">
    7379                                <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'] ); ?>
    7581                                        <?php
    7682                                        if ( ! empty( $type->description ) ) {
    7783                                                printf( '&ndash; %s', '<span class="bp-group-type-desc">' . esc_html( $type->description ) . '</span>' );