load_helper('listing'); $Winter_MVC_WDK->model('category_m'); $category = $Winter_MVC_WDK->category_m->get($custom_field_value, TRUE); /* if root search childs */ if($category) { $filter_ids = wdk_category_get_all_childs($custom_field_value); if(!empty($filter_ids)) { if(in_array($field_value, $filter_ids) === FALSE) { $field_value = $custom_field_value; } } } else { /* category missing */ $custom_field_value = null; } } if(isset($_GET[$field_key])) { $field_value = ($_GET[$field_key]); } $hide_fields = ''; if(wmvc_show_data('search_type_tree_hide', $field_data)) { $hide_fields = wmvc_show_data('search_type_tree_hide', $field_data); } wdk_search_fields_toggle(); ?>