| @@ -160,8 +160,17 @@ | ||
| 160 | 160 | 'rules' => '', |
| 161 | 161 | ), |
| 162 | 162 | ); |
| 163 | 163 | |
| 164 | + $this->fields_list_tabs['templates'] [] = array( | |
| 165 | + 'field' => 'wdk_multilingual_float_language_picker', | |
| 166 | + 'field_label' => __('Float Language Picker', 'wpdirectorykit'), | |
| 167 | + 'field_type' => 'CHECKBOX', | |
| 168 | + 'hint' => __('Multilingual float language picker required WDK Multilingual addon', 'wpdirectorykit'), | |
| 169 | + '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>'), | |
| 170 | + 'rules' => '', | |
| 171 | + ); | |
| 172 | + | |
| 164 | 173 | /* Fields */ |
| 165 | 174 | $this->fields_list_tabs['fields'] = array( |
| 166 | 175 | 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' => ''), |
| 167 | 176 | 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' => ''), |
| @@ -237,15 +246,21 @@ | ||
| 237 | 246 | |
| 238 | 247 | |
| 239 | 248 | 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' => ''), |
| 240 | 249 | 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' => ''), |
| 241 | - 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' => ''), | |
| 242 | - 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' => ''), | |
| 243 | - 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' => ''), | |
| 244 | - 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' => ''), | |
| 245 | - 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' => ''), | |
| 246 | - 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' => ''), | |
| 250 | + 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' => ''), | |
| 251 | + 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' => ''), | |
| 252 | + 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' => ''), | |
| 253 | + 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' => ''), | |
| 254 | + 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' => ''), | |
| 247 | 255 | array( |
| 256 | + 'field' => 'wdk_is_alt_agent_enabled', | |
| 257 | + 'field_label' => __('Enable Alternate Agent for Listing', 'wpdirectorykit'), | |
| 258 | + 'hint' => __('Enable this option to allow assigning an alternate agent to the listing.', 'wpdirectorykit'), | |
| 259 | + 'field_type' => 'CHECKBOX', | |
| 260 | + 'rules' => '', | |
| 261 | + ), | |
| 262 | + array( | |
| 248 | 263 | 'field' => 'wdk_sub_listings_enable', |
| 249 | 264 | 'field_label' => __('Related Listings', 'wpdirectorykit'), |
| 250 | 265 | 'field_type' => 'CHECKBOX', |
| 251 | 266 | 'rules' => '', |
| @@ -256,21 +271,68 @@ | ||
| 256 | 271 | 'field_type' => 'CHECKBOX', |
| 257 | 272 | 'rules' => '', |
| 258 | 273 | ), |
| 259 | 274 | array( |
| 275 | + 'field' => 'wdk_enable_filter_zero_decimal', | |
| 276 | + 'field_label' => __('Enable filter zero decimal', 'wpdirectorykit'), | |
| 277 | + 'field_type' => 'CHECKBOX', | |
| 278 | + 'rules' => '', | |
| 279 | + ), | |
| 280 | + array( | |
| 260 | 281 | 'field' => 'wdk_number_format_decimal_point', |
| 261 | - 'field_label' => __('Number Format Decimal point', 'wpdirectorykit'), | |
| 262 | - 'hint' => __('Default based on location Number Format Decimal point', 'wpdirectorykit'), | |
| 263 | - 'field_type' => 'INPUTBOX', | |
| 264 | - 'rules' => '', | |
| 282 | + 'field_label' => __('Number Decimal Places', 'wpdirectorykit'), | |
| 283 | + 'hint' => __('Default based on language selected in WordPress', 'wpdirectorykit'), | |
| 284 | + 'field_type' => 'DROPDOWN', | |
| 285 | + 'empty_default' => esc_attr((!empty(get_option('wdk_number_format_decimal_point')) ? get_option('wdk_number_format_decimal_point') : get_option('decimal_point', ','))), | |
| 286 | + 'values' => array( | |
| 287 | + '.' => __('Dot (.)', 'wpdirectorykit'), | |
| 288 | + "'" => __('Quote (\')', 'wpdirectorykit'), | |
| 289 | + ',' => __('Comma (,)', 'wpdirectorykit'), | |
| 290 | + ' ' => __('Space', 'wpdirectorykit'), | |
| 291 | + ), | |
| 292 | + 'rules' => '' | |
| 265 | 293 | ), |
| 266 | 294 | array( |
| 267 | 295 | 'field' => 'wdk_number_format_thousands_sep', |
| 268 | 296 | 'field_label' => __('Number Format Thousands sep', 'wpdirectorykit'), |
| 269 | - 'hint' => __('Default based on location Number Thousands sep', 'wpdirectorykit'), | |
| 270 | - 'field_type' => 'INPUTBOX', | |
| 297 | + 'hint' => __('Default based on language selected in WordPress', 'wpdirectorykit'), | |
| 298 | + 'field_type' => 'DROPDOWN', | |
| 299 | + 'empty_default' => esc_attr((!empty(get_option('wdk_number_format_thousands_sep')) ? get_option('wdk_number_format_thousands_sep') : get_option('thousands_separator', ','))), | |
| 271 | 300 | 'rules' => '', |
| 301 | + 'values' => array( | |
| 302 | + '.' => __('Dot (.)', 'wpdirectorykit'), | |
| 303 | + ',' => __('Comma (,)', 'wpdirectorykit'), | |
| 304 | + "'" => __('Quote (\')', 'wpdirectorykit'), | |
| 305 | + ' ' => __('Space', 'wpdirectorykit'), | |
| 306 | + ), | |
| 272 | 307 | ), |
| 308 | + array( | |
| 309 | + 'field' => 'wdk_number_format_decimals', | |
| 310 | + 'field_label' => __('Number Format Decimal count', 'wpdirectorykit'), | |
| 311 | + 'hint' => __('Default based on language selected in WordPress', 'wpdirectorykit'), | |
| 312 | + 'field_type' => 'NUMBER', | |
| 313 | + 'min' => '0', | |
| 314 | + 'max' => '5', | |
| 315 | + 'step' => '1', | |
| 316 | + 'rules' => '', | |
| 317 | + 'empty_default' => esc_attr(get_option('wdk_number_format_decimals', get_option('wdk_number_format_decimals', get_option('woocommerce_price_num_decimals', 2)))), | |
| 318 | + ), | |
| 319 | + array( | |
| 320 | + 'field' => 'wdk_number_format_decimals', | |
| 321 | + 'field_label' => __('Current Number Format', 'wpdirectorykit'), | |
| 322 | + 'hint' => __('Example price format based on WordPress language or above configuration (1234567.89)', 'wpdirectorykit'), | |
| 323 | + 'field_type' => 'RAW', | |
| 324 | + 'rules' => '', | |
| 325 | + 'raw' => '<span id="wdk_example_price_format" class="label label-info" style="font-size:14px">'.wdk_number_format_i18n(1234567.89).'</span>', | |
| 326 | + ), | |
| 327 | + array( | |
| 328 | + 'field' => 'wdk_custom_listings_link_field', | |
| 329 | + 'field_label' => __('Custom Field, like extern link for listing preview', 'wpdirectorykit'), | |
| 330 | + 'hint' => __('Value for this field, replace listing preview link if not empty', 'wpdirectorykit'), | |
| 331 | + 'field_type' => 'DROPDOWN', | |
| 332 | + 'values' => $fields_list_inputs, | |
| 333 | + 'rules' => '', | |
| 334 | + ), | |
| 273 | 335 | ); |
| 274 | 336 | |
| 275 | 337 | /* Api-s */ |
| 276 | 338 | $this->fields_list_tabs['apis'] = array( |
| @@ -288,8 +350,22 @@ | ||
| 288 | 350 | 'field_type' => 'INPUTBOX', |
| 289 | 351 | 'rules' => '', |
| 290 | 352 | ), |
| 291 | 353 | array( |
| 354 | + 'field' => 'wdk_recaptcha_site_key_v3', | |
| 355 | + 'field_label' => __('Recaptcha site key v3', 'wpdirectorykit'), | |
| 356 | + 'hint' => __('Please add Recaptcha site and Secret keys for enable recaptcha Add Google Recaptcha site key (use V3 recaptcha key)', 'wpdirectorykit').'. '.wdk_sprintf(__('Get key %1$s here %2$s','wpdirectorykit'),'<a target="_blank" href="https://www.google.com/recaptcha/admin">','</a>'), | |
| 357 | + 'field_type' => 'INPUTBOX', | |
| 358 | + 'rules' => '', | |
| 359 | + ), | |
| 360 | + array( | |
| 361 | + 'field' => 'wdk_recaptcha_secret_key_v3', | |
| 362 | + 'field_label' => __('Recaptcha site secret key v3', 'wpdirectorykit'), | |
| 363 | + 'hint' => __('Add Google Recaptcha secret key', 'wpdirectorykit'), | |
| 364 | + 'field_type' => 'INPUTBOX', | |
| 365 | + 'rules' => '', | |
| 366 | + ), | |
| 367 | + array( | |
| 292 | 368 | 'field' => 'wdk_geo_google_api_key', |
| 293 | 369 | 'field_label' => __('Google API Key', 'wpdirectorykit'), |
| 294 | 370 | 'hint' => __('Google API Key, for address to gps coordinates conversion', 'wpdirectorykit').'. '.wdk_sprintf(__('Get key %1$s here %2$s','wpdirectorykit'),'<a target="_blank" href="https://developers.google.com/maps/documentation/javascript/get-api-key">','</a>'), |
| 295 | 371 | 'field_type' => 'INPUTBOX', |
| @@ -412,8 +488,61 @@ | ||
| 412 | 488 | 'field_label' => __('Ajax results listings', 'wpdirectorykit'), |
| 413 | 489 | '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'), |
| 414 | 490 | 'field_type' => 'CHECKBOX', |
| 415 | 491 | 'rules' => '', |
| 492 | + ), | |
| 493 | + ); | |
| 494 | + | |
| 495 | + /* Autosuggestion */ | |
| 496 | + $this->fields_list_tabs['autosuggestion'] = array( | |
| 497 | + array( | |
| 498 | + 'field' => 'wdk_autosuggestion_google_api_key', | |
| 499 | + 'field_label' => __('Google Api Key', 'wdk-autosuggestion'), | |
| 500 | + 'field_type' => 'INPUTBOX', | |
| 501 | + 'rules' => '', | |
| 502 | + ), | |
| 503 | + array( | |
| 504 | + 'field' => 'wdk_autosuggestion_google_cities', | |
| 505 | + 'field_label' => __('Autosuggestion Google Cities', 'wdk-autosuggestion'), | |
| 506 | + 'field_type' => 'TEXTAREA', | |
| 507 | + 'rules' => '', | |
| 508 | + 'hint' => __('Put selectors separate by comma, like .field_1,.field_3 (required Google Api Key)', 'wdk-autosuggestion'), | |
| 509 | + ), | |
| 510 | + array( | |
| 511 | + 'field' => 'wdk_autosuggestion_google_countries', | |
| 512 | + 'field_label' => __('Autosuggestion Google Countries', 'wdk-autosuggestion'), | |
| 513 | + 'field_type' => 'TEXTAREA', | |
| 514 | + 'rules' => '', | |
| 515 | + 'hint' => __('Put selectors separate by comma, like .field_1,.field_3 (required Google Api Key)', 'wdk-autosuggestion'), | |
| 516 | + ), | |
| 517 | + | |
| 518 | + array( | |
| 519 | + 'field' => 'wdk_autosuggestion_rapidapi_api_key', | |
| 520 | + 'field_label' => __('Rapidapi', 'wdk-autosuggestion'), | |
| 521 | + 'field_type' => 'INPUTBOX', | |
| 522 | + 'rules' => '', | |
| 523 | + '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>'), | |
| 524 | + ), | |
| 525 | + array( | |
| 526 | + 'field' => 'wdk_autosuggestion_rapidapi_cities', | |
| 527 | + 'field_label' => __('Autosuggestion Rapid Api Cities', 'wdk-autosuggestion'), | |
| 528 | + 'field_type' => 'TEXTAREA', | |
| 529 | + 'rules' => '', | |
| 530 | + 'hint' => __('Put selectors separate by comma, like .field_1,.field_3 (required Rapid Api Key)', 'wdk-autosuggestion'), | |
| 531 | + ), | |
| 532 | + array( | |
| 533 | + 'field' => 'wdk_autosuggestion_rapidapi_countries', | |
| 534 | + 'field_label' => __('Autosuggestion Rapid Api Countries', 'wdk-autosuggestion'), | |
| 535 | + 'field_type' => 'TEXTAREA', | |
| 536 | + 'rules' => '', | |
| 537 | + 'hint' => __('Put selectors separate by comma, like .field_1,.field_3 (required Rapid Api Key)', 'wdk-autosuggestion'), | |
| 538 | + ), | |
| 539 | + array( | |
| 540 | + 'field' => 'wdk_autosuggestion_countriesapi_countries', | |
| 541 | + 'field_label' => __('Autosuggestion REST Countries API Countries', 'wdk-autosuggestion'), | |
| 542 | + 'field_type' => 'TEXTAREA', | |
| 543 | + 'rules' => '', | |
| 544 | + 'hint' => __('Put selectors separate by comma, like .field_1,.field_3', 'wdk-autosuggestion'), | |
| 416 | 545 | ), |
| 417 | 546 | ); |
| 418 | 547 | |
| 419 | 548 | foreach ($this->fields_list_tabs as $tab_fields) { |