BP_Admin_Setting_Xprofile::bp_admin_setting_profile_layout_type_format()
Admin Settings for Settings > Profiles > Profile Directories > Default Format
Description
Source
File: bp-core/admin/settings/bp-admin-setting-xprofile.php
public function bp_admin_setting_profile_layout_type_format() {
$options = [
'list_grid' => __( 'Grid and List', 'buddyboss' ),
'grid' => __( 'Grid', 'buddyboss' ),
'list' => __( 'List', 'buddyboss' ),
];
$current_value = bp_get_option( 'bp-profile-layout-format' );
printf( '<select name="%1$s" for="%1$s">', 'bp-profile-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 profile/member 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.