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.


Parameters Parameters

$type

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

Default value: 'option'


Top ↑

Return Return

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


Source Source

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

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

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

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


Top ↑

Changelog Changelog

Changelog
Version Description
3.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.