bp_admin_setting_callback_group_auto_join()

Enable auto group membership approval field markup.

Description

Source

File: bp-core/admin/bp-core-admin-settings.php

533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
function bp_admin_setting_callback_group_auto_join() {
    ?>
    <input id="bp-enable-group-auto-join" name="bp-enable-group-auto-join" type="checkbox" value="1" <?php checked( bp_enable_group_auto_join() ); ?> />
    <?php
    if ( true === bp_enable_group_auto_join() ) {
        printf(
            '<label for="bp-enable-group-auto-join">%s</label>',
            sprintf(
                __( 'Allow selected <a href="%s">profile types</a> to automatically join groups', 'buddyboss' ),
                add_query_arg([
                    'post_type' => bp_get_member_type_post_type(),
                ], admin_url( 'edit.php' ) )
            )
        );
    } else {
        ?>
        <label for="bp-enable-group-auto-join"><?php _e( 'Allow selected profile types to automatically join groups', 'buddyboss' ); ?></label>
        <?php
    }
    ?>
    <p class="description"><?php _e( 'When a member requests to join a group their membership is automatically accepted', 'buddyboss' ); ?></p>
    <?php
}

Changelog

Changelog
Version Description
BuddyBoss 1.0.0 Introduced.

Questions?

We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.