Hello,
We have a site that uses a child theme of pro and a custom plugin that creates custom elements. Since a recent update we have not been able to select the dropdown options that we coded for these.
When testing I have found that if I hard code these in the controls array they seem to work but as soon as I add in dynamic data which is being generated using get_terms it no longer shows up in the drop down list in pro admin
This is an example of how we were generating one of these lists. I have tried various other methods.
Thanks in advance
James Corkhill (developer)
'choices' => array_merge(array(array('value' => '', 'label' => 'All')),
array_map(
function ($term) {
return array('value' => $term->term_id, 'label' => __($term->name, 'tarmac'));
},
get_terms(array(
'taxonomy' => 'material_type',
'orderby' => 'name',
'hierarchical' => 1,
'hide_empty' => 0
))
)
),
)