BP_Admin_Setting_Xprofile::bp_admin_setting_profile_layout_default_option()

Admin Settings for Settings > Profiles > Profile Directories > Default Format

Description

Source

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

504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
public function bp_admin_setting_profile_layout_default_option() {
    $selected = bp_profile_layout_default_format( 'grid' );
 
    $options = [
        'grid'      => __( 'Grid', 'buddyboss' ),
        'list'      => __( 'List', 'buddyboss' ),
    ];
 
    printf( '<select name="%1$s" for="%1$s">', 'bp-profile-layout-default-format' );
    foreach ( $options as $key => $value ) {
        printf(
            '<option value="%s" %s>%s</option>',
            $key,
            $key == $selected ? 'selected' : '',
            $value
        );
    }
    printf( '</select>' );
}

Changelog

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.