Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
10/06/2016 09:02:40 PM (7 years ago)
Author:
r-a-y
Message:

Groups: Add 'create_screen_checked' argument to bp_groups_register_group_type().

If $show_in_create_screen is true, whether we should have our group type
checkbox checked by default during the group creation process. Handy if you
want to imply that the group type should be enforced, but decision
ultimately lies with the group creator.

Props hnla, dcavins.

See #7210.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-templates/bp-legacy/buddypress/groups/create.php

    r11177 r11182  
    156156                        <?php foreach ( $group_types as $type ) : ?>
    157157                            <div class="checkbox">
    158                                 <label for="<?php printf( 'group-type-%s', $type->name ); ?>"><input type="checkbox" name="group-types[]" id="<?php printf( 'group-type-%s', $type->name ); ?>" value="<?php echo esc_attr( $type->name ); ?>" /> <?php echo esc_html( $type->labels['name'] ); ?>
     158                                <label for="<?php printf( 'group-type-%s', $type->name ); ?>"><input type="checkbox" name="group-types[]" id="<?php printf( 'group-type-%s', $type->name ); ?>" value="<?php echo esc_attr( $type->name ); ?>" <?php checked( true, ! empty( $type->create_screen_checked ) ); ?> /> <?php echo esc_html( $type->labels['name'] ); ?>
    159159                                    <?php
    160160                                        if ( ! empty( $type->description ) ) {
Note: See TracChangeset for help on using the changeset viewer.