Hi, I’m trying to wrap <li>
items in the filter in a div so I can easily apply an accordion to them. I’ve been using sf_input_object_pre to modify the prefix and postfix but they don’t seem to insert anything into the HTML – can someone confirm what these attributes do? And if they don’t insert any prefix or postfix, is there a way I can add HTML to the filter list?
Thanks.
function filter_function_name($input_object, $sfid) {
if($input_object['type']!='checkbox') {
return $input_object;
}
foreach($input_object['options'] as $key => $option) {
if ($option->attributes['class']="sf-level-0") {
$input_object['options'][$key]->prefix = '<div>';
$input_object['options'][$key]->postfix= '</div>';
}
}
return $input_object;
}
add_filter('sf_input_object_pre', 'filter_function_name', 10, 2);