load_helper('listing'); $Winter_MVC_WDK->model('location_m'); $location = $Winter_MVC_WDK->location_m->get($custom_field_value, TRUE); /* if root search childs */ if($location) { $filter_ids = wdk_location_get_all_childs($custom_field_value); if(!empty($filter_ids)) { $filter_ids[] = $custom_field_value; if(in_array($field_value, $filter_ids) === FALSE) { $field_value = $custom_field_value; } } } else { /* location missing */ $custom_field_value = null; } } if(isset($_GET[$field_key])) { $field_value = ($_GET[$field_key]); } else { if(function_exists('run_wdk_geo') && (get_option('wdk_geo_autodetect_by_ip_enable') && !get_option('wdk_geo_autodetect_by_google_js_enable'))) { $field_value = wdk_geo_get_location_id(); } } $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(); ?>