bp_admin_setting_callback_group_layout_type_format()
Admin Settings for Settings > Groups > Group Directories
Description
Source
File: bp-core/admin/bp-core-admin-settings.php
function bp_admin_setting_callback_group_layout_type_format() { $options = [ 'list_grid' => __( 'Grid and List', 'buddyboss' ), 'grid' => __( 'Grid', 'buddyboss' ), 'list' => __( 'List', 'buddyboss' ), ]; $current_value = bp_get_option( 'bp-group-layout-format' ); printf( '<select name="%1$s" for="%1$s">', 'bp-group-layout-format' ); foreach ( $options as $key => $value ) { printf( '<option value="%s" %s>%s</option>', $key, $key == $current_value? 'selected' : '', $value ); } printf( '</select>' ); ?> <p class="description"><?php _e( 'Display group directories in Grid View, List View, or allow toggling between both views.', 'buddyboss' ); ?></p> <?php }
Changelog
Version | Description |
---|---|
BuddyBoss 1.2.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.