| @@ -190,9 +190,9 @@ | ||
| 190 | 190 | if($this->data['settings']['hide_onempty'] == 'yes' && wdk_field_value($this->data['settings']['field_id'], $wdk_listing_id) == '') |
| 191 | 191 | return false; |
| 192 | 192 | } |
| 193 | 193 | |
| 194 | - echo $this->view('wdk-field-label', $this->data); | |
| 194 | + $this->view('wdk-field-label', $this->data, true); | |
| 195 | 195 | } |
| 196 | 196 | |
| 197 | 197 | |
| 198 | 198 | private function generate_controls_conf() { |
| @@ -203,28 +203,12 @@ | ||
| 203 | 203 | 'tab' => '1', |
| 204 | 204 | ] |
| 205 | 205 | ); |
| 206 | 206 | |
| 207 | - $WMVC = &wdk_get_instance(); | |
| 208 | - $WMVC->model('field_m'); | |
| 209 | - $fields_data = $WMVC->field_m->get(); | |
| 207 | + $fields_data = wdk_cached_field_get(); | |
| 210 | 208 | $fields_list = array('' => esc_html__('Not Selected', 'wpdirectorykit')); |
| 211 | 209 | $order_i = 0; |
| 212 | 210 | |
| 213 | - $fields_list [(++$order_i).'__section'] = esc_html__('-- Section Custom fields --', 'wpdirectorykit'); | |
| 214 | - $fields_list [(++$order_i).'__idlisting'] = esc_html__('Id listing', 'wpdirectorykit'); | |
| 215 | - $fields_list [(++$order_i).'__post_id'] = esc_html__('Post Id', 'wpdirectorykit'); | |
| 216 | - $fields_list [(++$order_i).'__counter_views'] = esc_html__('Views counter', 'wpdirectorykit'); | |
| 217 | - $fields_list [(++$order_i).'__lat'] = esc_html__('Gps Lat', 'wpdirectorykit'); | |
| 218 | - $fields_list [(++$order_i).'__lng'] = esc_html__('Gps Lng', 'wpdirectorykit'); | |
| 219 | - $fields_list [(++$order_i).'__date'] = esc_html__('Date', 'wpdirectorykit'); | |
| 220 | - $fields_list [(++$order_i).'__date_modified'] = esc_html__('Date Modified', 'wpdirectorykit'); | |
| 221 | - $fields_list [(++$order_i).'__post_title'] = esc_html__('WP Title', 'wpdirectorykit'); | |
| 222 | - $fields_list [(++$order_i).'__post_content'] = esc_html__('WP Content', 'wpdirectorykit'); | |
| 223 | - $fields_list [(++$order_i).'__address'] = esc_html__('Address', 'wpdirectorykit'); | |
| 224 | - $fields_list [(++$order_i).'__category_id'] = esc_html__('Category', 'wpdirectorykit'); | |
| 225 | - $fields_list [(++$order_i).'__location_id'] = esc_html__('Location', 'wpdirectorykit'); | |
| 226 | - | |
| 227 | 211 | foreach($fields_data as $field) |
| 228 | 212 | { |
| 229 | 213 | if(wmvc_show_data('field_type', $field) == 'SECTION') { |
| 230 | 214 | $fields_list [(++$order_i).'section__'.wmvc_show_data('idfield', $field)] = '-- '.esc_html__('Section', 'wpdirectorykit').' '.wmvc_show_data('field_label', $field).' --'; |
| @@ -235,9 +219,9 @@ | ||
| 235 | 219 | $this->add_control( |
| 236 | 220 | 'field_id', |
| 237 | 221 | [ |
| 238 | 222 | 'label' => __( 'Field id', 'wpdirectorykit' ), |
| 239 | - 'type' => \Elementor\Controls_Manager::SELECT, | |
| 223 | + 'type' => \Elementor\Controls_Manager::SELECT2, | |
| 240 | 224 | 'default' => '', |
| 241 | 225 | 'options' => $fields_list, |
| 242 | 226 | 'separator' => 'after', |
| 243 | 227 | ] |