bp_nouveau_groups_customizer_controls( array $controls = array() )
Add controls for the settings of the customizer for the groups component.
Description
Parameters
- $controls
-
(Optional) The controls to add.
Default value: array()
Return
(array) the controls to add.
Source
File: bp-templates/bp-nouveau/includes/groups/functions.php
function bp_nouveau_groups_customizer_controls( $controls = array() ) {
// Default options for the groups default tab.
if ( bp_is_active( 'activity' ) ) {
$options = apply_filters( 'group_default_tab_options_list',
array(
'members' => __( 'Members', 'buddyboss' ),
'activity' => __( 'Feed', 'buddyboss' ),
) );
} else {
$options = apply_filters( 'group_default_tab_options_list',
array(
'members' => __( 'Members', 'buddyboss' ),
) );
}
return array_merge( $controls,
array(
'group_nav_display' => array(
'label' => __( 'Display the group navigation vertically.', 'buddyboss' ),
'section' => 'bp_nouveau_group_primary_nav',
'settings' => 'bp_nouveau_appearance[group_nav_display]',
'type' => 'checkbox',
),
'group_default_tab' => array(
'label' => __( 'Group navigation order', 'buddyboss' ),
'description' => __( 'Set the default navigation tab when viewing a group. The dropdown only shows tabs that are available to all groups.', 'buddyboss' ),
'section' => 'bp_nouveau_group_primary_nav',
'settings' => 'bp_nouveau_appearance[group_default_tab]',
'type' => 'select',
'choices' => $options,
),
'group_nav_order' => array(
'class' => 'BP_Nouveau_Nav_Customize_Control',
'label' => __( 'Reorder the primary navigation for a group.', 'buddyboss' ),
'section' => 'bp_nouveau_group_primary_nav',
'settings' => 'bp_nouveau_appearance[group_nav_order]',
'type' => 'group',
),
) );
}
Changelog
| Version | Description |
|---|---|
| BuddyPress 3.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.