bp_nouveau_customizer_grid_choices( string $type = 'option' )

Returns the choices for the Layout option of the customizer or the list of corresponding css classes.

Description

Parameters

$type

(string) (Optional) 'option' to get the labels, 'classes' to get the classes

Default value: 'option'

Return

(array) The list of labels or classes preserving keys.

Source

File: bp-templates/bp-nouveau/includes/functions.php

function bp_nouveau_customizer_grid_choices( $type = 'option' ) {
	$columns = array(
		array( 'key' => '2', 'label' => __( 'Two columns', 'buddyboss'   ), 'class' => 'two'   ),
		array( 'key' => '3', 'label' => __( 'Three columns', 'buddyboss' ), 'class' => 'three' ),
		array( 'key' => '4', 'label' => __( 'Four columns', 'buddyboss'  ), 'class' => 'four'  ),
	);

	if ( 'option' === $type ) {
		return wp_list_pluck( $columns, 'label', 'key' );
	}

	return wp_list_pluck( $columns, 'class', 'key' );
}

Changelog

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.