Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
09/07/2018 03:06:03 PM (6 years ago)
Author:
djpaul
Message:

Templates, Nouveau: fix group type default selection during group creation.

Nouveau shares the group settings options output with the create output. This
change moves the checked logic out of that relevant template, into a function,
to correct handle the default value for group creation vs. later group editing.

Fixes #7919

Props wbcomdesigns, r-a-y

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-templates/bp-nouveau/buddypress/groups/single/admin/group-settings.php

    r12156 r12228  
    7272            <div class="checkbox">
    7373                <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'] ); ?>
    7575                    <?php
    7676                    if ( ! empty( $type->description ) ) {
Note: See TracChangeset for help on using the changeset viewer.