bp_admin_setting_callback_private_network()

Allow admin to make the site private network.

Description

Source

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

97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
function bp_admin_setting_callback_private_network() {
    ?>
 
    <input id="bp-enable-private-network" name="bp-enable-private-network" type="checkbox" value="1" <?php checked( !bp_enable_private_network( false ) ); ?> />
    <label for="bp-enable-private-network"><?php _e( 'Restrict site access to only logged-in members', 'buddyboss' ); ?></label>
    <?php
    printf(
    '<p class="description">%s</p>',
            sprintf(
                __( 'Login and <a href="%s">Registration</a> content will remain publicly visible.', 'buddyboss' ),
                add_query_arg([
                    'page' => 'bp-pages',
                ], admin_url( 'admin.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.