I install Redux Framework like a plugin in wordpress, copy redux-framework/sample/sample-config.php to my theme and change it. And I have problem with this part:
Redux::setSection( $opt_name, array(
'id' => 'sec_test',
'title' => __('test', 'redux-framework-demo'),
'fields' => array(
array(
'id' => 'test_checkbox',
'type' => 'checkbox',
'title' => __('test', 'redux-framework-demo'),
'options' => array(
'test_1' => 'test 1',
'test_2' => 'test 2',
),
'default' => array(
'test_1' => 1,
'test_2' => 0,
),
),
array(
'id' => 'test_opt',
'type' => 'text',
'title' => __('test text', 'redux-framework-demo'),
'required' => array('test_checkbox', '=', 'test_1'),
),
)
) );
'required' in option 'test_opt' not work. I try this variations:
'required' => array('test_checkbox', '=', 'test_1'),
'required' => array('test_checkbox', '=', array('test_1')),
'required' => array('test_checkbox', '=', array('test_1' => 1)),
'required' => array('test_checkbox', 'contains', 'test_1'),
'required' => array('test_checkbox', 'contains', array('test_1')),
'required' => array('test_checkbox', 'contains', array('test_1' => 1)),
Nothing works. So, how correct use the ‘required’ argument?
Wordpress: 4.2.2
Redux Framework: 3.5.4.3
Developer Mode Enabled
Aucun commentaire:
Enregistrer un commentaire