Required option does not work in version 0.8.3
Hi there
How can I use required settings in version 0.8.3?!
I have two controls:
$controls[] = array(
'type' => 'radio-buttonset',
'setting' => 'my_bg_mode',
'label' => 'Background Mode',
'section' => 'my_default_section',
'default' => 'normal',
'priority' => $priority,
'choices' => array(
'normal' => 'Normal',
'colorful' => 'Colorful',
),
'transport' => 'postMessage'
);
$controls[] = array(
'type' => 'color',
'setting' => 'my_bg_color',
'section' => 'my_default_section',
'default' => '#cccccc',
'priority' => $priority,
'required' => array(
array(
'setting' => 'my_bg_mode',
'operator' => '==',
'value' => 'colorful')
),
'transport' => 'postMessage'
);
but my my_bg_color control is always visible! also when I click on my_bg_mode control buttons, nothing happens, & my_bg_color control is always visible.
Any Solution?!
Thanks in advance
I have fixed this issue here (https://github.com/DevelopOnline/kirki/commit/0f70a3645b78a3d563971247508367e938ac065c)
I have the same issue, both on radio buttons and image buttons, none of those required settings are working with 0.8.4
The solution by DevelopOnline works perfect for me.
This has been fixed in the master branch I'm closing this issue. :+1: