Radio Buttonset

Kirki Radio Buttonset

You can define the available options using the choices argument as seen in the example below.

Example

new \Kirki\Field\Radio_Buttonset(
	[
		'settings'    => 'radio_buttonset_setting',
		'label'       => esc_html__( 'Radio-Buttonset Control', 'kirki' ),
		'section'     => 'section_id',
		'default'     => 'red',
		'priority'    => 10,
		'choices'     => [
			'red'   => esc_html__( 'Red', 'kirki' ),
			'green' => esc_html__( 'Green', 'kirki' ),
			'blue'  => esc_html__( 'Blue', 'kirki' ),
		],
	]
);

Was this helpful?