PluginProbe
WP Directory Kit / 1.5.9
WP Directory Kit v1.5.9
1.5.9 1.5.7 1.5.6 1.5.5 1.5.4 1.5.3 trunk 1.1.0 1.1.6 1.1.8 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.3.6 1.3.8 All 37 releases
← All changes | application/models/Settings_m.php +428 -51 1.2.3 → 1.5.9 View file →
@@ -12,9 +12,10 @@
12 12 public $_primary_key = 'option_id';
13 13 public $_own_columns = array();
14 14 public $_timestamps = TRUE;
15 15 protected $_primary_filter = 'intval';
16 - public $fields_list = NULL;
16 + public $fields_list = array();
17 + public $fields_list_tabs = array();
17 18
18 19 public function __construct(){
19 20 parent::__construct();
20 21
@@ -47,42 +48,161 @@
47 48 $fields_list_inputs [wmvc_show_data('idfield', $field)] = '#'.wmvc_show_data('idfield', $field).' '.wmvc_show_data('field_label', $field).'['.wmvc_show_data('field_type', $field).']';
48 49 }
49 50 }
50 51
51 - $this->fields_list = array(
52 + /* General */
53 +
54 + $this->fields_list_tabs['general'] = array(
55 + array('field' => 'wdk_default_lat', 'field_label' => __('Default GPS Position', 'wpdirectorykit'), 'hint' => '', 'field_type' => 'MAP', 'rules' => ''),
56 + array('field' => 'wdk_default_lng', 'field_label' => __('Default GPS Longitude', 'wpdirectorykit'), 'hint' => '', 'field_type' => 'INPUTBOX', 'rules' => '', 'class' => 'hidden'),
57 + array('field' => 'wdk_fixed_map_results_position', 'field_label' => __('Fix map center on default location', 'wpdirectorykit'), 'hint' => '', 'field_type' => 'CHECKBOX', 'rules' => '', 'class' => ''),
58 +
52 59 array('field' => 'wdk_is_category_enabled', 'field_label' => __('Enable Categories', 'wpdirectorykit'), 'hint' => __('If you don\'t need categories features you can disable that here', 'wpdirectorykit'), 'field_type' => 'CHECKBOX', 'rules' => ''),
53 60 array('field' => 'wdk_is_location_enabled', 'field_label' => __('Enable Locations', 'wpdirectorykit'), 'hint' => __('If you don\'t need location features you can disable that here', 'wpdirectorykit'), 'field_type' => 'CHECKBOX', 'rules' => '', 'class' => ''),
54 61
55 - array('field' => 'wdk_default_lat', 'field_label' => __('Default GPS Position', 'wpdirectorykit'), 'hint' => '', 'field_type' => 'MAP', 'rules' => ''),
56 - array('field' => 'wdk_default_lng', 'field_label' => __('Default GPS Longitude', 'wpdirectorykit'), 'hint' => '', 'field_type' => 'INPUTBOX', 'rules' => '', 'class' => 'hidden'),
57 - array('field' => 'wdk_fixed_map_results_position', 'field_label' => __('Fix map center on default location', 'wpdirectorykit'), 'hint' => '', 'field_type' => 'CHECKBOX', 'rules' => '', 'class' => ''),
58 62
59 - array('field' => 'wdk_is_address_enabled', 'field_label' => __('Enable Address', 'wpdirectorykit'), 'hint' => __('Select regular page which ill be used for listing preview page on frontend, you can create new one also for this purpose', 'wpdirectorykit'), 'field_type' => 'CHECKBOX', 'rules' => ''),
63 + array('field' => 'wdk_is_featured_enabled', 'field_label' => __('Enable Field and Feature Featured Listing', 'wpdirectorykit'), 'hint' => __('Select regular page which ill be used for listing preview page on frontend, you can create new one also for this purpose', 'wpdirectorykit'), 'field_type' => 'CHECKBOX', 'rules' => ''),
64 + array('field' => 'wdk_is_rank_enabled', 'field_label' => __('Enable Field and Feature Rank Listing', 'wpdirectorykit'), 'hint' => __('Select regular page which ill be used for listing preview page on frontend, you can create new one also for this purpose', 'wpdirectorykit'), 'field_type' => 'CHECKBOX', 'rules' => ''),
65 + array('field' => 'wdk_is_user_editor_enabled', 'field_label' => __('Enable Field and Feature Agent Listing', 'wpdirectorykit'), 'hint' => __('Select regular page which ill be used for listing preview page on frontend, you can create new one also for this purpose', 'wpdirectorykit'), 'field_type' => 'CHECKBOX', 'rules' => ''),
66 + array('field' => 'wdk_is_post_content_enable', 'field_label' => __('Enable Field and Feature Post Content Listing', 'wpdirectorykit'), 'hint' => __('Select regular page which ill be used for listing preview page on frontend, you can create new one also for this purpose', 'wpdirectorykit'), 'field_type' => 'CHECKBOX', 'rules' => ''),
67 + array('field' => 'wdk_is_alt_agent_enabled', 'field_label' => __('Enable Field and Feature Agent Listing', 'wpdirectorykit'), 'hint' => __('Select regular page which ill be used for listing preview page on frontend, you can create new one also for this purpose', 'wpdirectorykit'), 'field_type' => 'CHECKBOX', 'rules' => ''),
68 +
69 + array('field' => 'wdk_slug_listing_preview_page', 'field_label' => __('Custom Listing Preview Page Slug', 'wpdirectorykit'), 'hint' => __('Slug used for listing preview page, if empty, default will be used', 'wpdirectorykit'), 'field_type' => 'INPUTBOX', 'rules' => 'wdk_slug_format'),
60 70 array('field' => 'wdk_listing_page', 'field_label' => __('Listing Page', 'wpdirectorykit'), 'hint' => __('Select regular page which ill be used for listing preview page on frontend, you can create new one also for this purpose', 'wpdirectorykit'), 'field_type' => 'DROPDOWN', 'rules' => '', 'values' => $pages),
61 71 array('field' => 'wdk_results_page', 'field_label' => __('Results Page', 'wpdirectorykit'), 'hint' => __('Select regular page which ill be used for results page on frontend, you can create new one also for this purpose', 'wpdirectorykit'), 'field_type' => 'DROPDOWN', 'rules' => '', 'values' => $pages),
62 72 array('field' => 'wdk_is_results_page_require', 'field_label' => __('Always use results page', 'wpdirectorykit'), 'hint' => __('Always even if on current page you have results where can be showed', 'wpdirectorykit'), 'field_type' => 'CHECKBOX', 'rules' => ''),
63 - array('field' => 'wdk_slug_listing_preview_page', 'field_label' => __('Custom Listing Preview Page Slug', 'wpdirectorykit'), 'hint' => __('Slug used for listing preview page, if empty, default will be used', 'wpdirectorykit'), 'field_type' => 'INPUTBOX', 'rules' => 'wdk_slug_format'),
64 - array('field' => 'wdk_seo_keywords', 'field_label' => __('SEO Listing Page Keywords', 'wpdirectorykit'), 'hint' => __('Set field for meta tag keywords', 'wpdirectorykit'), 'field_type' => 'DROPDOWN', 'values' => $fields_list, 'rules' => ''),
65 - array('field' => 'wdk_seo_description', 'field_label' => __('SEO Listing Page Description', 'wpdirectorykit'), 'hint' => __('Set field for meta tag description', 'wpdirectorykit'), 'field_type' => 'DROPDOWN', 'values' => $fields_list, 'rules' => ''),
66 -
73 +
67 74 array(
68 - 'field' => 'wdk_recaptcha_site_key',
69 - 'field_label' => __('Recaptcha site key', 'wpdirectorykit'),
70 - 'hint' => __('Please add Recaptcha site and Secret keys for enable recaptcha Add Google Recaptcha site key (use V2 recaptcha key)', 'wpdirectorykit'),
75 + 'field' => 'wdk_card_video_enable',
76 + 'field_label' => __('Card Video From gallery in result card enable', 'wpdirectorykit'),
77 + 'hint' => __('If you upload video on first place in listing, will become visible in result card', 'wpdirectorykit'),
78 + 'field_type' => 'CHECKBOX',
79 + 'rules' => '',
80 + ),
81 + array(
82 + 'field' => 'wdk_listing_category_required',
83 + 'field_label' => __('Category is required field', 'wpdirectorykit'),
84 + 'hint' => __('if this is enabled, listing required category field', 'wpdirectorykit'),
85 + 'field_type' => 'CHECKBOX',
86 + 'rules' => '',
87 + ),
88 + array(
89 + 'field' => 'wdk_listing_location_required',
90 + 'field_label' => __('Location is required field', 'wpdirectorykit'),
91 + 'hint' => __('if this is enabled, listing required location field', 'wpdirectorykit'),
92 + 'field_type' => 'CHECKBOX',
93 + 'rules' => '',
94 + ),
95 +
96 + array(
97 + 'field' => 'wdk_sub_listings_enable',
98 + 'field_label' => __('Related Listings', 'wpdirectorykit'),
99 + 'field_type' => 'CHECKBOX',
100 + 'rules' => '',
101 + ),
102 + array(
103 + 'field' => 'wdk_listings_images_required_enable',
104 + 'field_label' => __('Listing Images required', 'wpdirectorykit'),
105 + 'field_type' => 'CHECKBOX',
106 + 'rules' => '',
107 + ),
108 + array(
109 + 'field' => 'wdk_default_currency_symbol',
110 + 'field_label' => __('Default Currency Symbol1', 'wpdirectorykit'),
111 + 'hint' => __('Put default currency symbol like $', 'wpdirectorykit'),
71 112 'field_type' => 'INPUTBOX',
72 113 'rules' => '',
73 114 ),
115 + );
74 116
117 +
118 + /* Templates */
119 + $this->fields_list_tabs['templates'] = array(
75 120 array(
76 - 'field' => 'wdk_recaptcha_secret_key',
77 - 'field_label' => __('Recaptcha site secret key', 'wpdirectorykit'),
78 - 'hint' => __('Add Google Recaptcha secret key', 'wpdirectorykit'),
79 - 'field_type' => 'INPUTBOX',
121 + 'field' => 'wdk_placeholder',
122 + 'field_label' => __('Cooming soon listing image', 'wpdirectorykit'),
123 + 'hint' => '',
124 + 'field_type' => 'UPLOAD',
80 125 'rules' => '',
81 126 ),
127 + array(
128 + 'field' => 'wdk_card_slider_enable',
129 + 'field_label' => __('Show slider in result card', 'wpdirectorykit'),
130 + 'hint' => '',
131 + 'field_type' => 'CHECKBOX',
132 + 'rules' => '',
133 + ),
134 + array(
135 + 'field' => 'wdk_card_video_field',
136 + 'field_label' => __('Card video field', 'wpdirectorykit'),
137 + 'hint' => '',
138 + 'field_type' => 'DROPDOWN',
139 + 'values' => $fields_list_inputs,
140 + 'rules' => '',
141 + 'hint' => '',
142 + ),
143 + array(
144 + 'field' => 'wdk_mobile_bottom_navbar_enable',
145 + 'field_label' => __('Mobile bottom navbar', 'wpdirectorykit'),
146 + 'field_type' => 'CHECKBOX',
147 + 'rules' => '',
148 + ),
149 + array(
150 + 'field' => 'wdk_mobile_bottom_show_menu_disable',
151 + 'field_label' => __('Mobile bottom navbar, hide menu button', 'wpdirectorykit'),
152 + 'hint' => __('Menu button only works, when using menu from ElementInvader addons plugins', 'wpdirectorykit'),
153 + 'field_type' => 'CHECKBOX',
154 + 'rules' => '',
155 + ),
156 + array(
157 + 'field' => 'wdk_field_search_suggestion_disable',
158 + 'field_label' => __('Smart Search Suggestion Disable', 'wpdirectorykit'),
159 + 'field_type' => 'CHECKBOX',
160 + 'rules' => '',
161 + ),
82 162
83 163 array(
84 - 'field' => 'wdk_multi_locations_search_field_type',
164 + 'field' => 'wdk_disable_custom_muber_format',
165 + 'field_label' => __('Remove images from media when listing is removed', 'wpdirectorykit'),
166 + 'hint' => __('Disable the custom number format and use the default WordPress number formatting.', 'wpdirectorykit'),
167 + 'field_type' => 'CHECKBOX',
168 + 'rules' => '',
169 + ),
170 + array(
171 + 'field' => 'wdk_disable_outline_on_focus',
172 + 'field_label' => __('Disable outline on focus', 'wpdirectorykit'),
173 + 'hint' => __('Removes the outline style from form elements when they are focused.', 'wpdirectorykit'),
174 + 'field_type' => 'CHECKBOX',
175 + 'rules' => '',
176 + ),
177 +
178 + );
179 +
180 + $this->fields_list_tabs['templates'] [] = array(
181 + 'field' => 'wdk_multilingual_float_language_picker',
182 + 'field_label' => __('Float Language Picker', 'wpdirectorykit'),
183 + 'field_type' => 'CHECKBOX',
184 + /* translators: 1: Tag with link open, 2: close link tag. */
185 + 'hint' => wdk_sprintf(__('Multilingual float language picker required %1$s WDK Multilingual addon%2$s','wpdirectorykit'),'<a target="_blank" href="https://wpdirectorykit.com/plugins.html">','</a>'),
186 + 'rules' => '',
187 + );
188 +
189 + /* Fields */
190 + $this->fields_list_tabs['fields'] = array(
191 + array('field' => 'wdk_seo_keywords', 'field_label' => __('SEO Listing Page Keywords', 'wpdirectorykit'), 'hint' => __('Set field for meta tag keywords', 'wpdirectorykit'), 'field_type' => 'DROPDOWN', 'values' => $fields_list, 'rules' => ''),
192 + array('field' => 'wdk_seo_description', 'field_label' => __('SEO Listing Page Description', 'wpdirectorykit'), 'hint' => __('Set field for meta tag description', 'wpdirectorykit'), 'field_type' => 'DROPDOWN', 'values' => $fields_list, 'rules' => ''),
193 +
194 + array(
195 + 'field' => 'wdk_seo_listing_title',
196 + 'field_label' => __('SEO Title', 'wpdirectorykit'),
197 + 'field_type' => 'SEO_INPUTBOX',
198 + /* translators: 1: Example field title placeholders. */
199 + 'hint' => wdk_sprintf(__('Example: %1$s', 'wpdirectorykit'), '{field_title} - {field_location} - {field_33}'),
200 + 'rules' => '',
201 + ),
202 +
203 + array(
204 + 'field' => 'wdk_multi_locations_search_field_type',
85 205 'field_label' => __('Location field Search', 'wpdirectorykit'),
86 206 'field_type' => 'RADIO',
87 207 'hint' => __('Visible on search form', 'wpdirectorykit'),
88 208 'rules' => '',
@@ -106,59 +226,196 @@
106 226 'wdk_treefield_dropdown' => esc_html__('Multiple Dropdowns', 'wpdirectorykit'),
107 227 'wdk_treefield_checkboxes' => esc_html__('Single Tree Dropdown with checkboxes', 'wpdirectorykit'),
108 228 )
109 229 ),
230 +
231 + array(
232 + 'field' => 'wdk_multi_locations_edit_field_type',
233 + 'field_label' => __('Location field edit', 'wpdirectorykit'),
234 + 'field_type' => 'RADIO',
235 + 'hint' => __('Visible on edit form', 'wpdirectorykit'),
236 + 'rules' => '',
237 + 'values' => array(
238 + '' => esc_html__('Single Tree Dropdown', 'wpdirectorykit'),
239 + 'wdk_treefield_dropdown' => esc_html__('Multiple Dropdowns', 'wpdirectorykit'),
240 + )
241 + ),
242 +
243 + array(
244 + 'field' => 'wdk_multi_categories_edit_field_type',
245 + 'field_label' => __('Categoreis field edit', 'wpdirectorykit'),
246 + 'field_type' => 'RADIO',
247 + 'hint' => __('Visible on edit form. Hiding field in edit form based on category is only possible when using single tree dropdown', 'wpdirectorykit'),
248 + 'rules' => '',
249 + 'values' => array(
250 + '' => esc_html__('Single Tree Dropdown', 'wpdirectorykit'),
251 + 'wdk_treefield_dropdown' => esc_html__('Multiple Dropdowns', 'wpdirectorykit'),
252 + )
253 + ),
110 254
111 255 array('field' => 'wdk_multi_locations_other_enable', 'field_label' => __('Enable multi location on edit listing', 'wpdirectorykit'), 'hint' => __('Enable multi location on edit listing', 'wpdirectorykit'), 'field_type' => 'CHECKBOX', 'rules' => ''),
112 256 array('field' => 'wdk_multi_categories_other_enable', 'field_label' => __('Enable multi categories on edit listing', 'wpdirectorykit'), 'hint' => __('Enable multi categories on edit listing', 'wpdirectorykit'), 'field_type' => 'CHECKBOX', 'rules' => ''),
113 257 array(
114 - 'field' => 'wdk_default_currency_symbol',
115 - 'field_label' => __('Default Currency Symbol', 'wpdirectorykit'),
116 - 'hint' => __('Put default currency symbol like $', 'wpdirectorykit'),
117 - 'field_type' => 'INPUTBOX',
258 + 'field' => 'wdk_listing_plangs_documents_disable',
259 + 'field_label' => __('Disable "Listing plans and documents"', 'wpdirectorykit'),
260 + 'hint' => '',
261 + 'field_type' => 'CHECKBOX',
118 262 'rules' => '',
119 263 ),
120 264 array(
121 - 'field' => 'wdk_listing_plangs_documents_disable',
122 - 'field_label' => __('Disable "Listing plans and documents"', 'wpdirectorykit'),
265 + 'field' => 'wdk_listing_images_disable',
266 + 'field_label' => __('Disable "Listing images"', 'wpdirectorykit'),
123 267 'hint' => '',
124 268 'field_type' => 'CHECKBOX',
125 269 'rules' => '',
126 270 ),
271 +
272 +
273 + array('field' => 'wdk_is_category_enabled', 'field_label' => __('Enable Categories', 'wpdirectorykit'), 'hint' => __('If you don\'t need categories features you can disable that here', 'wpdirectorykit'), 'field_type' => 'CHECKBOX', 'rules' => ''),
274 + array('field' => 'wdk_is_location_enabled', 'field_label' => __('Enable Locations', 'wpdirectorykit'), 'hint' => __('If you don\'t need location features you can disable that here', 'wpdirectorykit'), 'field_type' => 'CHECKBOX', 'rules' => '', 'class' => ''),
275 + array('field' => 'wdk_is_address_enabled', 'field_label' => __('Enable Address', 'wpdirectorykit'), 'hint' => __('Enable this option to display the address field on the listing submission page', 'wpdirectorykit'), 'field_type' => 'CHECKBOX', 'rules' => ''),
276 + array('field' => 'wdk_is_featured_enabled', 'field_label' => __('Enable Field and Feature Featured Listing', 'wpdirectorykit'), 'hint' => __('Enable this option to allow marking listings as Featured on the submission page.', 'wpdirectorykit'), 'field_type' => 'CHECKBOX', 'rules' => ''),
277 + array('field' => 'wdk_is_rank_enabled', 'field_label' => __('Enable Field and Feature Rank Listing', 'wpdirectorykit'), 'hint' => __('Enable this option to allow assigning a rank to listings on the submission page.', 'wpdirectorykit'), 'field_type' => 'CHECKBOX', 'rules' => ''),
278 + array('field' => 'wdk_is_user_editor_enabled', 'field_label' => __('Enable Field and Feature Agent Listing', 'wpdirectorykit'), 'hint' => __('Enable this option to allow selecting an agent for the listing.', 'wpdirectorykit'), 'field_type' => 'CHECKBOX', 'rules' => ''),
279 + array('field' => 'wdk_is_post_content_enable', 'field_label' => __('Enable Field and Feature Post Content Listing', 'wpdirectorykit'), 'hint' => __('Enable this option to show the post content field on the submission page.', 'wpdirectorykit'), 'field_type' => 'CHECKBOX', 'rules' => ''),
127 280 array(
128 - 'field' => 'wdk_placeholder',
129 - 'field_label' => __('Cooming soon listing image', 'wpdirectorykit'),
130 - 'hint' => '',
131 - 'field_type' => 'UPLOAD',
281 + 'field' => 'wdk_is_alt_agent_enabled',
282 + 'field_label' => __('Enable Alternate Agent for Listing', 'wpdirectorykit'),
283 + 'hint' => __('Enable this option to allow assigning an alternate agent to the listing.', 'wpdirectorykit'),
284 + 'field_type' => 'CHECKBOX',
285 + 'rules' => '',
286 + ),
287 + array(
288 + 'field' => 'wdk_sub_listings_enable',
289 + 'field_label' => __('Related Listings', 'wpdirectorykit'),
290 + 'field_type' => 'CHECKBOX',
132 291 'rules' => '',
133 292 ),
134 293 array(
135 - 'field' => 'wdk_card_slider_enable',
136 - 'field_label' => __('Show slider in result card', 'wpdirectorykit'),
137 - 'hint' => '',
294 + 'field' => 'wdk_listings_images_required_enable',
295 + 'field_label' => __('Listing Images required', 'wpdirectorykit'),
138 296 'field_type' => 'CHECKBOX',
139 297 'rules' => '',
140 298 ),
141 299 array(
142 - 'field' => 'wdk_card_video_field',
143 - 'field_label' => __('Card video field', 'wpdirectorykit'),
144 - 'hint' => '',
300 + 'field' => 'wdk_enable_filter_zero_decimal',
301 + 'field_label' => __('Enable filter zero decimal', 'wpdirectorykit'),
302 + 'field_type' => 'CHECKBOX',
303 + 'rules' => '',
304 + ),
305 + array(
306 + 'field' => 'wdk_disable_custom_muber_format',
307 + 'field_label' => __('Disable the custom number format', 'wpdirectorykit'),
308 + 'hint' => __('Disable the custom number format and use the default WordPress number formatting.', 'wpdirectorykit'),
309 + 'field_type' => 'CHECKBOX',
310 + 'rules' => '',
311 + ),
312 + array(
313 + 'field' => 'wdk_number_format_decimal_point',
314 + 'field_label' => __('Number Decimal Places', 'wpdirectorykit'),
315 + 'hint' => __('Default based on language selected in WordPress', 'wpdirectorykit'),
316 + 'field_type' => 'DROPDOWN',
317 + 'empty_default' => esc_attr((!empty(get_option('wdk_number_format_decimal_point')) ? get_option('wdk_number_format_decimal_point') : get_option('decimal_point', ','))),
318 + 'values' => array(
319 + '.' => __('Dot (.)', 'wpdirectorykit'),
320 + "'" => __('Quote (\')', 'wpdirectorykit'),
321 + ',' => __('Comma (,)', 'wpdirectorykit'),
322 + ' ' => __('Space', 'wpdirectorykit'),
323 + ),
324 + 'rules' => ''
325 + ),
326 + array(
327 + 'field' => 'wdk_number_format_thousands_sep',
328 + 'field_label' => __('Number Format Thousands sep', 'wpdirectorykit'),
329 + 'hint' => __('Default based on language selected in WordPress', 'wpdirectorykit'),
145 330 'field_type' => 'DROPDOWN',
146 - 'values' => $fields_list_inputs,
331 + 'empty_default' => esc_attr((!empty(get_option('wdk_number_format_thousands_sep')) ? get_option('wdk_number_format_thousands_sep') : get_option('thousands_separator', ','))),
147 332 'rules' => '',
148 - 'hint' => '',
333 + 'values' => array(
334 + '.' => __('Dot (.)', 'wpdirectorykit'),
335 + ',' => __('Comma (,)', 'wpdirectorykit'),
336 + "'" => __('Quote (\')', 'wpdirectorykit'),
337 + ' ' => __('Space', 'wpdirectorykit'),
338 + ),
149 339 ),
150 340 array(
151 - 'field' => 'wdk_card_video_enable',
152 - 'field_label' => __('Card Video From gallery in result card enable', 'wpdirectorykit'),
153 - 'hint' => __('If you upload video on first place in listing, will become visible in result card', 'wpdirectorykit'),
154 - 'field_type' => 'CHECKBOX',
341 + 'field' => 'wdk_number_format_decimals',
342 + 'field_label' => __('Number Format Decimal count', 'wpdirectorykit'),
343 + 'hint' => __('Default based on language selected in WordPress', 'wpdirectorykit'),
344 + 'field_type' => 'NUMBER',
345 + 'min' => '0',
346 + 'max' => '5',
347 + 'step' => '1',
155 348 'rules' => '',
349 + 'empty_default' => esc_attr(get_option('wdk_number_format_decimals', get_option('wdk_number_format_decimals', get_option('woocommerce_price_num_decimals', 2)))),
156 350 ),
157 351 array(
352 + 'field' => 'wdk_number_format_decimals',
353 + 'field_label' => __('Current Number Format', 'wpdirectorykit'),
354 + 'hint' => __('Example price format based on WordPress language or above configuration (1234567.89)', 'wpdirectorykit'),
355 + 'field_type' => 'RAW',
356 + 'rules' => '',
357 + 'raw' => '<span id="wdk_example_price_format" class="label label-info" style="font-size:14px">'.wdk_number_format_i18n(1234567.89).'</span>',
358 + ),
359 + array(
360 + 'field' => 'wdk_custom_listings_link_field',
361 + 'field_label' => __('Custom Field, like extern link for listing preview', 'wpdirectorykit'),
362 + 'hint' => __('Value for this field, replace listing preview link if not empty', 'wpdirectorykit'),
363 + 'field_type' => 'DROPDOWN',
364 + 'values' => $fields_list_inputs,
365 + 'rules' => '',
366 + ),
367 + );
368 +
369 + /* Api-s */
370 + $this->fields_list_tabs['apis'] = array(
371 + array(
372 + 'field' => 'wdk_recaptcha_site_key',
373 + 'field_label' => __('Recaptcha site key', 'wpdirectorykit'),
374 + 'hint' => __('Please add Recaptcha site and Secret keys for enable recaptcha Add Google Recaptcha site key (use V2 recaptcha key)', 'wpdirectorykit') . '. ' . wdk_sprintf(
375 + /* translators: 1: Tag with link open, 2: close link tag. */
376 + __('Get key %1$s here %2$s', 'wpdirectorykit'),
377 + '<a target="_blank" href="https://www.google.com/recaptcha/admin">',
378 + '</a>'
379 + ),
380 + 'field_type' => 'INPUTBOX',
381 + 'rules' => '',
382 + ),
383 + array(
384 + 'field' => 'wdk_recaptcha_secret_key',
385 + 'field_label' => __('Recaptcha site secret key', 'wpdirectorykit'),
386 + 'hint' => __('Add Google Recaptcha secret key', 'wpdirectorykit'),
387 + 'field_type' => 'INPUTBOX',
388 + 'rules' => '',
389 + ),
390 + array(
391 + 'field' => 'wdk_recaptcha_site_key_v3',
392 + 'field_label' => __('Recaptcha site key v3', 'wpdirectorykit'),
393 + 'hint' => __('Please add Recaptcha site and Secret keys for enable recaptcha Add Google Recaptcha site key (use V3 recaptcha key)', 'wpdirectorykit') . '. ' . wdk_sprintf(
394 + /* translators: 1: Tag with link open, 2: close link tag. */
395 + __('Get key %1$s here %2$s', 'wpdirectorykit'),
396 + '<a target="_blank" href="https://www.google.com/recaptcha/admin">',
397 + '</a>'
398 + ),
399 + 'field_type' => 'INPUTBOX',
400 + 'rules' => '',
401 + ),
402 + array(
403 + 'field' => 'wdk_recaptcha_secret_key_v3',
404 + 'field_label' => __('Recaptcha site secret key v3', 'wpdirectorykit'),
405 + 'hint' => __('Add Google Recaptcha secret key', 'wpdirectorykit'),
406 + 'field_type' => 'INPUTBOX',
407 + 'rules' => '',
408 + ),
409 + array(
158 410 'field' => 'wdk_geo_google_api_key',
159 - 'field_label' => __('Google Maps API Key', 'wpdirectorykit'),
160 - 'hint' => __('Google Maps API Key', 'wpdirectorykit'),
411 + 'field_label' => __('Google API Key', 'wpdirectorykit'),
412 + 'hint' => __('Google API Key, for address to gps coordinates conversion', 'wpdirectorykit') . '. ' . wdk_sprintf(
413 + /* translators: 1: Tag with link open, 2: close link tag. */
414 + __('Get key %1$s here %2$s', 'wpdirectorykit'),
415 + '<a target="_blank" href="https://developers.google.com/maps/documentation/javascript/get-api-key">',
416 + '</a>'
417 + ),
161 418 'field_type' => 'INPUTBOX',
162 419 'rules' => '',
163 420 ),
164 421 array(
@@ -170,14 +427,33 @@
170 427 ),
171 428 array(
172 429 'field' => 'wdk_geo_coding_results_location',
173 430 'field_label' => __('Auto Search based on Geo Coding', 'wpdirectorykit'),
174 - 'hint' => __('if this is enabled, search auto search listings', 'wpdirectorykit'),
431 + 'hint' => __('if this is enabled, auto search listings based on found geo location', 'wpdirectorykit'),
175 432 'field_type' => 'CHECKBOX',
176 433 'rules' => '',
177 434 ),
435 + );
436 +
437 + $this->fields_list_tabs['general'] = array(
438 + array('field' => 'wdk_default_lat', 'field_label' => __('Default GPS Position', 'wpdirectorykit'), 'hint' => '', 'field_type' => 'MAP', 'rules' => ''),
439 + array('field' => 'wdk_default_lng', 'field_label' => __('Default GPS Longitude', 'wpdirectorykit'), 'hint' => '', 'field_type' => 'INPUTBOX', 'rules' => '', 'class' => 'hidden'),
440 + array('field' => 'wdk_fixed_map_results_position', 'field_label' => __('Fix map center on default location', 'wpdirectorykit'), 'hint' => '', 'field_type' => 'CHECKBOX', 'rules' => '', 'class' => ''),
441 +
442 +
443 + array('field' => 'wdk_slug_listing_preview_page', 'field_label' => __('Custom Listing Preview Page Slug', 'wpdirectorykit'), 'hint' => __('Slug used for listing preview page, if empty, default will be used', 'wpdirectorykit'), 'field_type' => 'INPUTBOX', 'rules' => 'wdk_slug_format'),
444 + array('field' => 'wdk_listing_page', 'field_label' => __('Listing Page', 'wpdirectorykit'), 'hint' => __('Select regular page which ill be used for listing preview page on frontend, you can create new one also for this purpose', 'wpdirectorykit'), 'field_type' => 'DROPDOWN', 'rules' => '', 'values' => $pages),
445 + array('field' => 'wdk_results_page', 'field_label' => __('Results Page', 'wpdirectorykit'), 'hint' => __('Select regular page which ill be used for results page on frontend, you can create new one also for this purpose', 'wpdirectorykit'), 'field_type' => 'DROPDOWN', 'rules' => '', 'values' => $pages),
446 + array('field' => 'wdk_is_results_page_require', 'field_label' => __('Always use results page', 'wpdirectorykit'), 'hint' => __('Always even if on current page you have results where can be showed', 'wpdirectorykit'), 'field_type' => 'CHECKBOX', 'rules' => ''),
178 447
179 448 array(
449 + 'field' => 'wdk_card_video_enable',
450 + 'field_label' => __('Card Video From gallery in result card enable', 'wpdirectorykit'),
451 + 'hint' => __('If you upload video on first place in listing, will become visible in result card', 'wpdirectorykit'),
452 + 'field_type' => 'CHECKBOX',
453 + 'rules' => '',
454 + ),
455 + array(
180 456 'field' => 'wdk_listing_category_required',
181 457 'field_label' => __('Category is required field', 'wpdirectorykit'),
182 458 'hint' => __('if this is enabled, listing required category field', 'wpdirectorykit'),
183 459 'field_type' => 'CHECKBOX',
@@ -189,23 +465,34 @@
189 465 'hint' => __('if this is enabled, listing required location field', 'wpdirectorykit'),
190 466 'field_type' => 'CHECKBOX',
191 467 'rules' => '',
192 468 ),
469 +
193 470 array(
194 - 'field' => 'wdk_mobile_bottom_navbar_enable',
195 - 'field_label' => __('Mobile bottom navbar', 'wpdirectorykit'),
471 + 'field' => 'wdk_default_currency_symbol',
472 + 'field_label' => __('Default Currency Symbol', 'wpdirectorykit'),
473 + 'hint' => __('Put default currency symbol like $', 'wpdirectorykit'),
474 + 'field_type' => 'INPUTBOX',
475 + 'rules' => '',
476 + ),
477 + array(
478 + 'field' => 'wdk_disable_toolbar_on_content_editor',
479 + 'field_label' => __('Disable toolbar on content editor', 'wpdirectorykit'),
196 480 'field_type' => 'CHECKBOX',
197 481 'rules' => '',
198 482 ),
483 +
199 484 array(
200 - 'field' => 'wdk_sub_listings_enable',
201 - 'field_label' => __('Related Listings', 'wpdirectorykit'),
485 + 'field' => 'wdk_remove_direct_listing_images',
486 + 'field_label' => __('Remove images from media when listing is removed', 'wpdirectorykit'),
487 + 'hint' => __('Enable this option to remove attached images from the media library automatically when a listing is deleted.', 'wpdirectorykit'),
202 488 'field_type' => 'CHECKBOX',
203 489 'rules' => '',
204 490 ),
205 491 array(
206 - 'field' => 'wdk_listings_images_required_enable',
207 - 'field_label' => __('Listing Images required', 'wpdirectorykit'),
492 + 'field' => 'wdk_experimental_features',
493 + 'field_label' => __('Experimental features', 'wpdirectorykit'),
494 + 'hint' => '',
208 495 'field_type' => 'CHECKBOX',
209 496 'rules' => '',
210 497 ),
211 498 );
@@ -210,9 +497,9 @@
210 497 ),
211 498 );
212 499
213 500 if(function_exists('run_wdk_geo')) {
214 - $this->fields_list[] = array(
501 + $this->fields_list_tabs['apis'][] = array(
215 502 'field' => 'wdk_geo_autodetect_by_google_js_enable',
216 503 'field_label' => __('Enable location autodetect by Google JS', 'wpdirectorykit'),
217 504 'hint' => __('This using Google JS API, require API key and user need to allow this in Browser (is most accurate)', 'wpdirectorykit'),
218 505 'field_type' => 'CHECKBOX',
@@ -218,9 +505,9 @@
218 505 'field_type' => 'CHECKBOX',
219 506 'rules' => '',
220 507 );
221 508
222 - $this->fields_list[] = array(
509 + $this->fields_list_tabs['apis'][] = array(
223 510 'field' => 'wdk_geo_autodetect_by_ip_enable',
224 511 'field_label' => __('Enable location autodatect by IP', 'wpdirectorykit'),
225 512 'hint' => __('This using Free API www.geoplugin.net, not require API key and is not so accurate as Google version, if both enabled then this will be used if Google failed', 'wpdirectorykit'),
226 513 'field_type' => 'CHECKBOX',
@@ -227,9 +514,99 @@
227 514 'rules' => '',
228 515 );
229 516 }
230 517
518 + /* Templates */
519 + $this->fields_list_tabs['experimental'] = array(
520 + array(
521 + 'field' => 'wdk_experimental_search_popup',
522 + 'field_label' => __('Search Popup', 'wpdirectorykit'),
523 + 'hint' => __('Element open search form in popup', 'wpdirectorykit'),
524 + 'field_type' => 'CHECKBOX',
525 + 'rules' => '',
526 + ),
527 + array(
528 + 'field' => 'wdk_experimental_listing_card_elementor_layout',
529 + 'field_label' => __('Listing Card', 'wpdirectorykit'),
530 + 'hint' => __('Allow Listing card layout in elementor', 'wpdirectorykit'),
531 + 'field_type' => 'CHECKBOX',
532 + 'rules' => '',
533 + ),
534 + array(
535 + 'field' => 'wdk_experimental_listing_popup',
536 + 'field_label' => __('Listing Preview Popup', 'wpdirectorykit'),
537 + 'hint' => __('Open Listing preview in popup', 'wpdirectorykit'),
538 + 'field_type' => 'CHECKBOX',
539 + 'rules' => '',
540 + ),
541 + array(
542 + 'field' => 'wdk_experimental_ajax_results',
543 + 'field_label' => __('Ajax results listings', 'wpdirectorykit'),
544 + 'hint' => __('Allow ajax load listings for map, results container. Reload results with pagination/search form. After activate settings, also action "Reload content with ajax" in elementor options', 'wpdirectorykit'),
545 + 'field_type' => 'CHECKBOX',
546 + 'rules' => '',
547 + ),
548 + );
231 549
550 + /* Autosuggestion */
551 + $this->fields_list_tabs['autosuggestion'] = array(
552 + array(
553 + 'field' => 'wdk_autosuggestion_google_api_key',
554 + 'field_label' => __('Google Api Key', 'wpdirectorykit'),
555 + 'field_type' => 'INPUTBOX',
556 + 'rules' => '',
557 + ),
558 + array(
559 + 'field' => 'wdk_autosuggestion_google_cities',
560 + 'field_label' => __('Autosuggestion Google Cities', 'wpdirectorykit'),
561 + 'field_type' => 'TEXTAREA',
562 + 'rules' => '',
563 + 'hint' => __('Put selectors separate by comma, like .field_1,.field_3 (required Google Api Key)', 'wpdirectorykit'),
564 + ),
565 + array(
566 + 'field' => 'wdk_autosuggestion_google_countries',
567 + 'field_label' => __('Autosuggestion Google Countries', 'wpdirectorykit'),
568 + 'field_type' => 'TEXTAREA',
569 + 'rules' => '',
570 + 'hint' => __('Put selectors separate by comma, like .field_1,.field_3 (required Google Api Key)', 'wpdirectorykit'),
571 + ),
572 +
573 + array(
574 + 'field' => 'wdk_autosuggestion_rapidapi_api_key',
575 + 'field_label' => __('Rapidapi', 'wpdirectorykit'),
576 + 'field_type' => 'INPUTBOX',
577 + 'rules' => '',
578 + /* translators: 1: Tag with link open, 2: close link tag. */
579 + 'hint' => wdk_sprintf(__('Please add Rapid Api Key, Get key %1$s here %2$s, then activate GeoDB Cities API','wpdirectorykit'),'<a target="_blank" href="https://rapidapi.com/products/pricing/">','</a>'),
580 + ),
581 + array(
582 + 'field' => 'wdk_autosuggestion_rapidapi_cities',
583 + 'field_label' => __('Autosuggestion Rapid Api Cities', 'wpdirectorykit'),
584 + 'field_type' => 'TEXTAREA',
585 + 'rules' => '',
586 + 'hint' => __('Put selectors separate by comma, like .field_1,.field_3 (required Rapid Api Key)', 'wpdirectorykit'),
587 + ),
588 + array(
589 + 'field' => 'wdk_autosuggestion_rapidapi_countries',
590 + 'field_label' => __('Autosuggestion Rapid Api Countries', 'wpdirectorykit'),
591 + 'field_type' => 'TEXTAREA',
592 + 'rules' => '',
593 + 'hint' => __('Put selectors separate by comma, like .field_1,.field_3 (required Rapid Api Key)', 'wpdirectorykit'),
594 + ),
595 + array(
596 + 'field' => 'wdk_autosuggestion_countriesapi_countries',
597 + 'field_label' => __('Autosuggestion REST Countries API Countries', 'wpdirectorykit'),
598 + 'field_type' => 'TEXTAREA',
599 + 'rules' => '',
600 + 'hint' => __('Put selectors separate by comma, like .field_1,.field_3', 'wpdirectorykit'),
601 + ),
602 + );
603 +
604 + foreach ($this->fields_list_tabs as $tab_fields) {
605 + foreach ($tab_fields as $field) {
606 + $this->fields_list[] = $field;
607 + }
608 + }
232 609 }
233 610
234 611 /* [START] For dynamic data table */
235 612