<?xml version="1.0" encoding="UTF-8"?>

<fields>
    
  <fieldset name="elementor" label="Widgets for Elementor" loadfrom="elementor" load_condition="elementor_enabled"></fieldset>
  
  <fieldset name="gutenberg" label="Blocks for Gutenberg" loadfrom="gutenberg" load_condition="gutenberg_enabled"></fieldset>
	
  <fieldset name="widgets" label="Widgets">
  	
    <field name="js_in_footer"
      type="boolean"
      default="true"
      label="		Js Always in Footer"
      description="Put addon javascript always in the footer of the page. If no, it will be put right after the body">
    </field>

    <field name="js_saparate"
      type="boolean"
      default="false"
      label="		Each JS in separate tag"
      description="if yes, each js will be put in separate tag with it's own id. good for optimization plugins">
    </field>

    <field type="control" parent="js_in_footer" child="js_saparate" ctype="show" value="true" />
  	
    <field name="output_wrapping_comments"
      type="boolean"
      default="true"
      label="		Output Wrapping HTML Comments"
      description="Output comments before and after widgets in source html output">
    </field>
  	
    <field name="show_edit_html_button"
      type="boolean"
      default="true"
      label="		Show &quot;Edit HTML&quot; Button in Widget Settings"
      description="Show &quot;Edit HTML&quot; button in elementor panel widget settings">
    </field>
  	
    <field name="force_disable_font_awesome"
      type="list"
      default="enable"
      label="		Force Disable Font Awesome"
      description="Disable font awesome from loading from the plugin in all widgets. Sometimes good for optimization.">
      <option value="enable" text="Load Normally" />
      <option value="disable" text="Force Disable" />
    </field>
  	
    <field name="alphabetic_attributes"
      type="boolean"
      default="false"
      label="Sort Attributes in Widgets Editor by A-Z"
      description="Sort the order of the attributes in widgets editor alphabetically">
    </field>
    
    <field name="tax_sap_sign"
      default=":"
      type="list"
      label="Taxonomy Separator Sign in Ajax Filter"
      description="Used in url's like: url?category~term">
      <option value=":" text="[ : ]" />
      <option value="~" text="[ ~ ]" />
    </field>

    <field name="remote_error_admins"
      type="boolean"
      default="false"
      label="Show Remote Errors to Admins Only"
      description="Show remote widgets errors only to logged in users">
    </field>
      		
  </fieldset>


  <fieldset name="general" label="General">

    <field name="edit_permission"
      type="list"
      default="admin"
      label="Edit Permission"
      description="The addon/assets edit will be visible to the selected user categories">
      <option value="admin" text="Admin" />
      <option value="editor" text="Editor" />
    </field>

    <field type="control" parent="enable_changelog" child="disable_import_changelog" ctype="show" value="true" />

    <field name="enable_changelog"
      type="boolean"
      default="false"
      label="Enable Changelog"
      description="Enable changelog for widgets">
    </field>

    <field name="disable_import_changelog"
           type="boolean"
           default="false"
           label="		Disable Import Changelog"
           description="Disable Import for widgets">
    </field>

    <field type="control"
      parent="enable_changelog"
      child="disable_import_changelog"
      ctype="show"
      value="true">
    </field>
	
    <field name="enable_revisions"
      type="boolean"
      default="false"
      label="Enable Revisions"
      description="Enable revisions in widgets editor">
    </field>

    <field name="edit_pro_settings"
           type="boolean"
           default="false"
           label="Edit Pro Settings"
           description="Edit Pro Settings for the Widgets">
    </field>
	
  </fieldset>
  
  <fieldset name="instagram" label="Instagram">

    <field name="instagram_integration"
      type="custom"
      custom_type="instagram_connect"
      label="unite_setting_notext">
    </field>

    <field name="instagram_access_token"
      type="text"
      label="Instagram Access Token"
      default=""
      hidden="true"
      >
    </field>

    <field name="instagram_user_id"
      type="hidden"
      label="Instagram User ID"
      default=""
      >
    </field>

    <field name="instagram_username"
      type="hidden"
      label="Instagram Username"
      default="">
    </field>

    <field name="instagram_expires"
      type="hidden"
      label="Instagram Expires"
      default="">
    </field>

  </fieldset>
  <fieldset name="integrations" label="Integrations">

    <field name="google_connect_heading"
      type="statictext"
      label="&lt;b&gt;Google Sheets Connect&lt;/b&gt;">
    </field>

    <field name="google_connect_desc"
      type="statictext"
      label="Used in Google services (Google Sheets) related widgets for reading and writing data.">
    </field>

<!--        label="Used in Google services (Calendar, Sheets, YouTube etc.) related widgets for reading and writing data."> */ -->

    <field name="google_connect_integration"
      type="custom"
      custom_type="google_connect"
      label="unite_setting_notext">
    </field>

    <field name="google_connect_credentials"
      type="hidden"
      label="Google Credentials">
    </field>

    <field name="google_api_heading"
      type="statictext"
      label="&lt;b&gt;Google API&lt;/b&gt;">
    </field>

    <field name="google_api_key"
      type="text"
      label="Google API Key"
      description="Used in Google services (Calendar, Places, Sheets, YouTube etc.) related widgets for reading data. &lt;a href='https://support.google.com/googleapi/answer/6158862' target='_blank'&gt;Read this article&lt;/a&gt; for instructions."
      default="">
    </field>

    <field name="google_map_heading"
      type="statictext"
      label="&lt;b&gt;Google Maps&lt;/b&gt;">
    </field>

    <field name="google_map_key"
      type="text"
      label="Google Map API Key"
      description="Used to output a map in Google Maps related widgets. &lt;a href='https://unlimited-elements.com/docs/google-map-api-key/' target='_blank'&gt;Read this article&lt;/a&gt; for instructions."
      default="">
    </field>

    <field name="openweather_api_heading"
      type="statictext"
      label="&lt;b&gt;OpenWeather API&lt;/b&gt;">
    </field>

    <field name="openweather_api_key"
      type="text"
      label="OpenWeather API Key"
      description="Used in weather related widgets. &lt;a href='https://openweathermap.org/api/one-call-3#start' target='_blank'&gt;Read this article&lt;/a&gt; for instructions. &lt;br&gt; It takes some time for an API key to become active. &lt;a href='https://openweathermap.org/faq#error401' target='_blank'&gt;Read error 401 description&lt;/a&gt; for more details."
      default="">
    </field>

    <field name="openweather_api_test"
      type="custom"
      custom_type="openweather_api_test"
      label=" ">
    </field>

    <field name="exchangerate_api_heading"
      type="statictext"
      label="&lt;b&gt;Exchange Rate API&lt;/b&gt;">
    </field>

    <field name="exchangerate_api_key"
      type="text"
      label="Exchange Rate API Key"
      description="Used in currency exchange related widgets. Get your API key &lt;a href='https://app.exchangerate-api.com/sign-up' target='_blank'&gt;here&lt;/a&gt;."
      default="">
    </field>

    <field name="wpml_heading"
      type="statictext"
      hidden="true"
      label="&lt;b&gt;WPML Automatic Translation&lt;/b&gt;">
    </field>

    <field name="wpml_button"
      type="button"
      value="Check Widgets Fields"
      hidden="true"
      gotoview="wpml-fields"
      label="Check widgets fields that are ready for wpml automatic translation.">
    </field>

  </fieldset>
  <fieldset name="forms" label="Forms">

    <field name="form_general_heading"
      type="statictext"
      label="&lt;b&gt;General&lt;/b&gt;">
    </field>

    <field name="enable_form_entries"
      type="boolean"
      default="false"
      label="Enable Form Entries"
      description="Enable viewing and saving of form submissions.">
    </field>

    <field name="save_form_logs"
      type="boolean"
      default="false"
      label="Save Form Logs"
      description="Enable saving a log of form submissions.">
    </field>

    <field type="control"
      parent="save_form_logs"
      child="form_logs_button"
      ctype="show"
      value="true">
    </field>

    <field name="form_logs_button"
      type="button"
      value="Show Form Logs"
      gotoview="forms-logs"
      label=" ">
    </field>

    <field name="form_antispam_heading"
      type="statictext"
      label="&lt;b&gt;Anti-spam&lt;/b&gt;">
    </field>

    <field name="form_antispam_enabled"
      type="boolean"
      default="true"
      label="Enable Anti-spam"
      description="Enable anti-spam to protect forms.">
    </field>

    <field type="bulk_control_start"
      parent="form_antispam_enabled"
      ctype="show"
      value="true"
    />

    <field name="form_antispam_submissions_limit"
      type="text"
      label="Submissions Limit"
      description="Specify the maximum number of submissions a user can reach in the time interval. The default value is 3."
      default="">
    </field>

    <field name="form_antispam_submissions_period"
      type="text"
      label="Submissions Period"
      description="Specify within how many seconds a user will reach the submissions limit. The default value is 60 seconds."
      default="">
    </field>

    <field name="form_antispam_block_period"
      type="text"
      label="Block Period"
      description="Specify how many minutes a user will be blocked from submitting forms after reaching the limit. The default value is 180 minutes."
      default="">
    </field>

    <field type="bulk_control_end" />

    <field name="recaptcha_heading"
      type="statictext"
      label="&lt;b&gt;Google reCAPTCHA v3&lt;/b&gt;">
    </field>
	
	<field name="recaptcha_site_key"
      type="text"
      label="Site Key"
      description="Your Google reCAPTCHA v3 site key."
      default="">
    </field>
	
	<field name="recaptcha_secret_key"
      type="text"
      label="Secret Key"
      description="Your Google reCAPTCHA v3 secret key."
      default="">
    </field>
    
    <field name="email_test_heading"
      type="statictext"
      label="&lt;b&gt;Email Test&lt;/b&gt;">
    </field>

    
    <field name="email_test_button"
      type="button"
      value="Send Test Email"
      gotoview="email-test"
      label="Send a test email to check your SMTP configuration.">
    </field>


  </fieldset>
  <fieldset name="troubleshooting" label="Troubleshooting">

    <field name="memory_limit_text"
      type="statictext"
      label="WP Memory Limit: [memory_limit]">
    </field>

    <field name="memory_limit_text_desc"
      type="statictext"
      label="In case of insufficient memory, you can increase WordPress memory limit wp config file (wp-config.php)">
    </field>
	
    <field name="api-connectivity"
      type="hr">
    </field>

    <field name="text_api_connectivity"
      type="statictext"
      label="&lt;b&gt;API Connectivity Test&lt;/b&gt;">
    </field>

    <field name="text_connectivity_button"
      type="button"
      value="Run Test"
      gotoview="troubleshooting-connectivity"
      label="Test the api connectivity. Run it if you don't see any widgets inside the widgets catalog"
    >
    </field>


    <field name="before_disable_post_content_filters"
      type="hr">
    </field>

    <field name="disable_post_content_filters"
      type="boolean"
      default="false"
      label="Disable post content output filters"
      description="Sometimes post content filters causing memory errors. Disabling them can make the page load in case stucked pages">
    </field>

    <field name="before_show_php_message"
      type="hr">
    </field>
	
    <field name="show_php_error"
      type="boolean"
      default="false"
      label="Show PHP Error Message"
      description="Use it when you see some text about php error and want to see it.">
    </field>

    <field name="enable_display_errors_ajax"
      type="boolean"
      default="false"
      label="Enable Display Errors on Ajax"
      description="Enable display PHP errors and notices on ajax request.">
    </field>

    <field name="disable_deprecated_warnings"
      type="boolean"
      default="false"
      label="Disable Deprecated Warnings"
      description="Disable deprecated warnings in wordpress on plugin load. Usefull sometimes to make things load, please turn it off after test.">
    </field>

    <field type="control" parent="enable_memory_usage_test" child="memory_usage_button" ctype="show" value="true" />

    <field name="troubleshooting-hr1"
      type="hr">
    </field>
        
    <field name="phpinfo"
      type="hr">
    </field>
    
    <field name="text_phpinfo"
      type="statictext"
      label="Show PHP Info">
    </field>

    <field name="text_phpinfo_button"
      type="button"
      value="Show PHP Info"
      gotoview="troubleshooting-phpinfo"
      label="Show the phpinfo - php server configuration table"
    >
    </field>

    <field name="text_globals"
      type="statictext"
      label="Show Globals">
    </field>

    <field name="text_globals_button"
      type="button"
      value="Show Globals"
      gotoview="troubleshooting-globals"
      label="Show the global variables of the plugin, like base url and path"
    >
    </field>

    <field name="text_tables_button"
      type="button"
      value="Show DB Tables"
      gotoview="troubleshooting-tables"
      label="Show The DB Tables available"
    >
    </field>
    
    <field name="api-connectivity"
      type="hr">
    </field>

    <field name="text_overload"
      type="statictext"
      label="Overload Bug Test">
    </field>

    <field name="text_overload_button"
      type="button"
      value="Run Test"
      gotoview="troubleshooting-overload"
      label="Test the server for overload bug, &lt;br&gt; run this test when the edit page get stuck for any reason &lt;br&gt; when the unlimited elements plugin is on."
    >
    </field>

    <field name="enable_memory_usage_test"
      type="boolean"
      default="false"
      label="Enable Memory Usage Test"
      description="Use it when you have some memory crash. &lt;br&gt; When enabling it it will log every addon and field register operation &lt;br&gt; and sugniffically slow down the editor work. Use it only for testing and turn it off after.">
    </field>

    <field name="memory_usage_button"
      type="button"
      value="Show Memory Usage Log"
      gotoview="troubleshooting-memory-usage"
      label="Show last memory usage log &lt;br&gt; Run it after the editor run with the memory test"
    >
    </field>


  </fieldset>

</fields>
