Hi again,
The site is not live yet.
If you look at the Option Tree code, you’ll notice that checkboxes are arrays.
In wp-content/themes/hueman/functions/theme-options.php line 918:
array(
'id' => 'social-target',
'label' => 'Link Options',
'desc' => '',
'std' => '',
'type' => 'checkbox',
'choices' => array(
array(
'value' => '_blank',
'label' => 'Open in new window'
)
)
)
produces
<p><input type="checkbox" name="option_tree[social-links][2][social-target][0]" id="social-links_social-target_2-0" value="_blank" class="option-tree-ui-checkbox "><label for="social-links_social-target_2-0">Open in new window</label></p>
(note [social-target][0]
)
and then, in the options table we see:
s:12:"social-links";a:3:{i:0;a:5:{s:5:"title";s:8:"LinkedIn";s:11:"social-icon";s:11:"fa-linkedin";s:11:"social-link";s:19:"https://linkedin.com";s:12:"social-color";s:0:"";s:13:"social-target";a:1:{i:0;s:6:"_blank";}}i:1;a:4:{s:5:"title";s:7:"Twitter";s:11:"social-icon";s:10:"fa-twitter";s:11:"social-link";s:19:"https://twitter.com";s:12:"social-color";s:0:"";}i:2;a:5:{s:5:"title";s:8:"Facebook";s:11:"social-icon";s:11:"fa-facebook";s:11:"social-link";s:19:"https://facebook.com";s:12:"social-color";s:0:"";s:13:"social-target";a:1:{i:0;s:6:"_blank";}}}
again, note that social-target
is an array.
This is correct. Option Tree even uses ot_convert_string_to_array
when prepares defaults or imports from XML.
Therefore, the Theme should get the first element of the array, because there is only one target=_blank
option.
Thank you!