Everest Forms – Easy Contact Form and Form Builder - Version 1.6.2

Version Description

  • 29-02-2020 =
  • Fix - Cloning not working for some fields.
  • Fix - Error thrown for star rating field when using smart tags.
  • Fix - Conditional logic for Checkbox and Multiple Choice field.
  • Fix - Smart tags of Multiple Choice and Checkbox are not working in email.
  • Fix - Redirection parameter delegated to frontend for AJAX form submission.
  • Tweak - Implement log cleanup cron job.
  • Tweak - PHPCS fixes.
Download this release

Release Info

Developer everestforms
Plugin Icon 128x128 Everest Forms – Easy Contact Form and Form Builder
Version 1.6.2
Comparing to
See all releases

Code changes from version 1.6.1 to 1.6.2

Files changed (88) hide show
  1. assets/js/admin/form-builder.js +8 -8
  2. assets/js/admin/form-builder.min.js +1 -1
  3. assets/js/frontend/ajax-submission.js +1 -0
  4. assets/js/frontend/ajax-submission.min.js +1 -1
  5. bin/post-merge.sh +10 -0
  6. everest-forms.php +1 -1
  7. includes/abstracts/class-evf-deprecated-hooks.php +1 -1
  8. includes/abstracts/class-evf-form-fields.php +8 -6
  9. includes/abstracts/class-evf-log-handler.php +11 -7
  10. includes/abstracts/class-evf-settings-api.php +24 -23
  11. includes/abstracts/legacy/class-evf-admin-form-panel.php +1 -1
  12. includes/admin/builder/class-evf-builder-fields.php +17 -17
  13. includes/admin/builder/class-evf-builder-settings.php +27 -24
  14. includes/admin/class-evf-admin-addons.php +3 -5
  15. includes/admin/class-evf-admin-assets.php +32 -32
  16. includes/admin/class-evf-admin-editor.php +34 -34
  17. includes/admin/class-evf-admin-entries-table-list.php +15 -15
  18. includes/admin/class-evf-admin-entries.php +22 -22
  19. includes/admin/class-evf-admin-forms-table-list.php +8 -8
  20. includes/admin/class-evf-admin-forms.php +18 -20
  21. includes/admin/class-evf-admin-import-export.php +3 -5
  22. includes/admin/class-evf-admin-menus.php +22 -22
  23. includes/admin/class-evf-admin-notices.php +7 -7
  24. includes/admin/class-evf-admin-settings.php +47 -40
  25. includes/admin/class-evf-admin-tools.php +15 -15
  26. includes/admin/class-evf-admin-welcome.php +4 -4
  27. includes/admin/class-evf-admin.php +17 -18
  28. includes/admin/evf-admin-functions.php +46 -51
  29. includes/admin/settings/class-evf-settings-email.php +6 -6
  30. includes/admin/settings/class-evf-settings-general.php +6 -5
  31. includes/admin/settings/class-evf-settings-integrations.php +5 -5
  32. includes/admin/settings/class-evf-settings-recaptcha.php +19 -19
  33. includes/admin/views/html-admin-page-addons.php +42 -22
  34. includes/admin/views/html-admin-page-builder-setup.php +1 -1
  35. includes/admin/views/html-admin-page-builder.php +4 -4
  36. includes/admin/views/html-admin-page-entries-view.php +14 -15
  37. includes/admin/views/html-admin-page-export.php +3 -3
  38. includes/admin/views/html-admin-page-import.php +7 -1
  39. includes/admin/views/html-admin-page-tools-logs.php +2 -2
  40. includes/admin/views/html-admin-page-tools.php +10 -9
  41. includes/admin/views/html-notice-custom.php +1 -3
  42. includes/admin/views/html-notice-review.php +6 -2
  43. includes/admin/views/html-notice-update.php +1 -4
  44. includes/admin/views/html-notice-updated.php +1 -3
  45. includes/admin/views/html-notice-updating.php +1 -3
  46. includes/class-everest-forms.php +5 -5
  47. includes/class-evf-ajax.php +26 -28
  48. includes/class-evf-cache-helper.php +7 -4
  49. includes/class-evf-deprecated-action-hooks.php +2 -2
  50. includes/class-evf-fields.php +4 -4
  51. includes/class-evf-form-block.php +6 -6
  52. includes/class-evf-form-handler.php +38 -31
  53. includes/class-evf-form-task.php +60 -22
  54. includes/class-evf-frontend-scripts.php +44 -50
  55. includes/class-evf-install.php +14 -12
  56. includes/class-evf-logger.php +69 -47
  57. includes/class-evf-post-types.php +4 -2
  58. includes/class-evf-smart-tags.php +70 -65
  59. includes/class-evf-template-loader.php +6 -6
  60. includes/class-evf-validation.php +1 -3
  61. includes/evf-conditional-functions.php +1 -1
  62. includes/evf-core-functions.php +97 -72
  63. includes/evf-deprecated-functions.php +2 -2
  64. includes/evf-formatting-functions.php +4 -4
  65. includes/evf-notice-functions.php +10 -12
  66. includes/evf-template-functions.php +4 -6
  67. includes/evf-update-functions.php +8 -8
  68. includes/export/abstract-evf-csv-exporter.php +1 -1
  69. includes/export/class-evf-entry-csv-exporter.php +9 -9
  70. includes/fields/class-evf-field-checkbox.php +1 -1
  71. includes/fields/class-evf-field-date-time.php +33 -33
  72. includes/fields/class-evf-field-email.php +23 -9
  73. includes/fields/class-evf-field-file-upload.php +1 -1
  74. includes/fields/class-evf-field-first-name.php +7 -8
  75. includes/fields/class-evf-field-last-name.php +8 -9
  76. includes/fields/class-evf-field-number.php +1 -1
  77. includes/fields/class-evf-field-radio.php +1 -1
  78. includes/fields/class-evf-field-select.php +15 -13
  79. includes/fields/class-evf-field-text.php +1 -1
  80. includes/fields/class-evf-field-textarea.php +2 -2
  81. includes/fields/class-evf-field-title.php +1 -1
  82. includes/fields/class-evf-field-url.php +7 -9
  83. includes/log-handlers/class-evf-log-handler-file.php +94 -45
  84. includes/shortcodes/class-evf-shortcode-form.php +52 -34
  85. includes/templates/contact.php +2 -1
  86. languages/everest-forms.pot +555 -516
  87. readme.txt +26 -17
  88. uninstall.php +2 -1
assets/js/admin/form-builder.js CHANGED
@@ -1018,7 +1018,7 @@
1018
  render_node: function ( field, old_key, new_key ) {
1019
  var option = $('.everest-forms-field-options #everest-forms-field-option-' + old_key );
1020
  var old_field_label = $('#everest-forms-field-option-' + old_key + '-label' ).val();
1021
- var old_field_meta_key = $('#everest-forms-field-option-' + old_key + '-meta-key' ).val();
1022
  var field_type = field.attr('data-field-type'),
1023
  newOptionHtml = option.html(),
1024
  new_field_label = old_field_label + ' ' + evf_data.i18n_copy,
@@ -1030,7 +1030,7 @@
1030
  newOption.append(newOptionHtml);
1031
  $.each(option.find(':input'), function () {
1032
  var type = $(this).attr('type');
1033
- var name = $(this).attr('name');
1034
  var new_name = name.replace(regex, new_key);
1035
  var value = '';
1036
  if ( type === 'text' || type === 'hidden' ) {
@@ -1830,29 +1830,29 @@ jQuery(function () {
1830
 
1831
  var mySelect = jQuery('#everest-forms-panel-field-settings-redirect_to option:selected').val();
1832
 
1833
- if ( mySelect == '0' ) {
1834
  jQuery('#everest-forms-panel-field-settings-custom_page-wrap').hide();
1835
  jQuery('#everest-forms-panel-field-settings-external_url-wrap').hide();
1836
  }
1837
- else if(mySelect == '1') {
1838
  jQuery('#everest-forms-panel-field-settings-custom_page-wrap').show();
1839
  jQuery('#everest-forms-panel-field-settings-external_url-wrap').hide();
1840
  }
1841
- else if(mySelect == '2'){
1842
  jQuery('#everest-forms-panel-field-settings-external_url-wrap').show();
1843
  jQuery('#everest-forms-panel-field-settings-custom_page-wrap').hide();
1844
  }
1845
 
1846
  jQuery( '#everest-forms-panel-field-settings-redirect_to' ).on( 'change', function () {
1847
- if ( this.value == '0' ) {
1848
  jQuery('#everest-forms-panel-field-settings-custom_page-wrap').hide();
1849
  jQuery('#everest-forms-panel-field-settings-external_url-wrap').hide();
1850
  }
1851
- else if ( this.value == '1') {
1852
  jQuery('#everest-forms-panel-field-settings-custom_page-wrap').show();
1853
  jQuery('#everest-forms-panel-field-settings-external_url-wrap').hide();
1854
  }
1855
- else if ( this.value == '2') {
1856
  jQuery('#everest-forms-panel-field-settings-custom_page-wrap').hide();
1857
  jQuery('#everest-forms-panel-field-settings-external_url-wrap').show();
1858
  }
1018
  render_node: function ( field, old_key, new_key ) {
1019
  var option = $('.everest-forms-field-options #everest-forms-field-option-' + old_key );
1020
  var old_field_label = $('#everest-forms-field-option-' + old_key + '-label' ).val();
1021
+ var old_field_meta_key = $( '#everest-forms-field-option-' + old_key + '-meta-key' ).length ? $( '#everest-forms-field-option-' + old_key + '-meta-key' ).val() : '';
1022
  var field_type = field.attr('data-field-type'),
1023
  newOptionHtml = option.html(),
1024
  new_field_label = old_field_label + ' ' + evf_data.i18n_copy,
1030
  newOption.append(newOptionHtml);
1031
  $.each(option.find(':input'), function () {
1032
  var type = $(this).attr('type');
1033
+ var name = $( this ).attr( 'name' ) ? $( this ).attr( 'name' ) : '';
1034
  var new_name = name.replace(regex, new_key);
1035
  var value = '';
1036
  if ( type === 'text' || type === 'hidden' ) {
1830
 
1831
  var mySelect = jQuery('#everest-forms-panel-field-settings-redirect_to option:selected').val();
1832
 
1833
+ if ( mySelect == 'same' ) {
1834
  jQuery('#everest-forms-panel-field-settings-custom_page-wrap').hide();
1835
  jQuery('#everest-forms-panel-field-settings-external_url-wrap').hide();
1836
  }
1837
+ else if(mySelect == 'custom_page') {
1838
  jQuery('#everest-forms-panel-field-settings-custom_page-wrap').show();
1839
  jQuery('#everest-forms-panel-field-settings-external_url-wrap').hide();
1840
  }
1841
+ else if(mySelect == 'external_url'){
1842
  jQuery('#everest-forms-panel-field-settings-external_url-wrap').show();
1843
  jQuery('#everest-forms-panel-field-settings-custom_page-wrap').hide();
1844
  }
1845
 
1846
  jQuery( '#everest-forms-panel-field-settings-redirect_to' ).on( 'change', function () {
1847
+ if ( this.value == 'same' ) {
1848
  jQuery('#everest-forms-panel-field-settings-custom_page-wrap').hide();
1849
  jQuery('#everest-forms-panel-field-settings-external_url-wrap').hide();
1850
  }
1851
+ else if ( this.value == 'custom_page') {
1852
  jQuery('#everest-forms-panel-field-settings-custom_page-wrap').show();
1853
  jQuery('#everest-forms-panel-field-settings-external_url-wrap').hide();
1854
  }
1855
+ else if ( this.value == 'external_url') {
1856
  jQuery('#everest-forms-panel-field-settings-custom_page-wrap').hide();
1857
  jQuery('#everest-forms-panel-field-settings-external_url-wrap').show();
1858
  }
assets/js/admin/form-builder.min.js CHANGED
@@ -1 +1 @@
1
- !function(p,m){var l,u={init:function(){p(document).ready(function(e){e("evf-panel-integrations-button a").hasClass("active")||(e("#everest-forms-panel-integrations").find(".everest-forms-panel-sidebar a").first().addClass("active"),e("#everest-forms-panel-integrations").find(".everest-forms-panel-sidebar a").hasClass("active")&&e("#everest-forms-panel-integrations").find(".everest-forms-panel-sidebar a").next(".everest-forms-active-connections").first().addClass("active"),e(".everest-forms-panel-content").find(".evf-panel-content-section").first().addClass("active"))}),p(document).ready(function(n){"1"===n(".everest-forms-min-max-date-format input").val()&&n(".everest-forms-min-max-date-option").find("input").datepicker({defaultDate:"",dateFormat:"yy-mm-dd",numberOfMonths:1,showButtonPanel:!0,onSelect:function(){var e=n(this).is(".everest-forms-min-date")?"minDate":"maxDate",t=n(this).closest(".everest-forms-min-max-date-option").find("input"),i=n(this).datepicker("getDate");t.not(this).datepicker("option",e,i),n(this).change()}}),n("evf-panel-payments-button a").hasClass("active")||(n("#everest-forms-panel-payments").find(".everest-forms-panel-sidebar a").first().addClass("active"),n(".everest-forms-panel-content").find(".evf-payment-setting-content").first().addClass("active"))}),p(document.body).on("click","#copy-shortcode",this.copyShortcode).on("aftercopy","#copy-shortcode",this.copySuccess).on("aftercopyfailure","#copy-shortcode",this.copyFail),p(document).ready(u.ready),p(window).on("load",u.load),p(document.body).on("evf-init-builder-fields",function(){u.bindFields()}).trigger("evf-init-builder-fields"),p(document.body).on("adjust_builder_width",function(){var e=p("#adminmenuwrap").width();p("#everest-forms-builder-form").css({width:"calc(100% - "+e+"px)"})}).trigger("adjust_builder_width"),p(document.body).on("click","#collapse-button",function(){p("#everest-forms-builder-form").width(""),p(document.body).trigger("adjust_builder_width")}),p(window).on("resize orientationchange",function(){var e;clearTimeout(e),e=setTimeout(function(){p("#everest-forms-builder").width(""),p(document.body).trigger("adjust_builder_width")},250)}).trigger("resize")},copyShortcode:function(e){evfClearClipboard(),evfSetClipboard(p(".evf-shortcode-field").find("input").val(),p(this)),e.preventDefault()},copySuccess:function(){p("#copy-shortcode").tooltipster("content",p(this).attr("data-copied")).trigger("mouseenter").on("mouseleave",function(){var e=p(this);setTimeout(function(){e.tooltipster("content",e.attr("data-tip"))},1e3)})},copyFail:function(){p(".evf-shortcode-field").find("input").focus().select()},load:function(){p(".everest-forms-overlay").fadeOut()},ready:function(){if(l=p("#everest-forms-builder"),u.bindUIActions(),u.bindEditActions(),jconfirm.defaults={closeIcon:!0,backgroundDismiss:!0,escapeKey:!0,animationBounce:1,useBootstrap:!1,theme:"modern",boxWidth:"400px",columnClass:"evf-responsive-class"},"undefined"!=typeof PerfectScrollbar){var e=p(".everest-forms-tab-content"),t=p("#everest-forms-panel-settings .everest-forms-panel-sidebar");1<=e.length&&(window.evf_tab_scroller=new PerfectScrollbar(e.selector)),1<=t.length&&(window.evf_setting_scroller=new PerfectScrollbar(t.selector))}l.on("change",".everest-forms-field-option-row-limit_enabled input",function(e){u.updateTextFieldsLimitControls(p(e.target).parents(".everest-forms-field-option-row-limit_enabled").data().fieldId,e.target.checked)}),p(document).trigger("everest_forms_ready")},updateTextFieldsLimitControls:function(e,t){t?p("#everest-forms-field-option-row-"+e+"-limit_controls").removeClass("everest-forms-hidden"):p("#everest-forms-field-option-row-"+e+"-limit_controls").addClass("everest-forms-hidden")},bindUIActions:function(){u.bindDefaultTabs(),u.checkEmptyGrid(),u.bindFields(),u.bindFormPreview(),u.bindGridSwitcher(),u.bindFieldSettings(),u.bindFieldDelete(),u.bindCloneField(),u.bindSaveOption(),u.bindAddNewRow(),u.bindRemoveRow(),u.bindFormSettings(),u.bindFormEmail(),u.bindFormIntegrations(),u.bindFormPayment(),u.choicesInit(),u.bindToggleHandleActions(),u.bindLabelEditInputActions(),u.bindSyncedInputActions(),u.bindUIActionsFields(),"field-options"===m.tab&&p(".evf-panel-field-options-button").trigger("click")},bindEditActions:function(){p("#edit-form-name").on("click",function(e){e.stopPropagation(),""!==p("#evf-edit-form-name").val().trim()&&u.toggleEditTitle(e)}),p("#evf-edit-form-name").on("change keypress",function(e){var t=p(this);e.stopPropagation(),13===e.which&&""!==p(this).val().trim()&&u.toggleEditTitle(e),""!==t.val().trim()&&p("#everest-forms-panel-field-settings-form_title").val(t.val().trim())}).on("click",function(e){e.stopPropagation()}),p(document).not(p(".everest-forms-title-desc")).click(function(e){var t=p("#evf-edit-form-name");e.stopPropagation(),!t.prop("disabled")&&t.val()&&""!==t.val().trim()&&u.toggleEditTitle(e)})},toggleEditTitle:function(e){var t=p("#edit-form-name").siblings("#evf-edit-form-name");e.preventDefault(),t.prop("disabled",function(e,t){return!t}),t.hasClass("everst-forms-name-editing")||t.focus(),t.toggleClass("everst-forms-name-editing")},formObject:function(e){for(var t=jQuery(e).find("[name]"),i={},n={},s=0;s<t.length;s++){var o=jQuery(t[s]),a=o.prop("name").replace(/\]/gi,"").split("["),r=o.val(),d={};if(!o.is(":radio")&&!o.is(":checkbox")||o.is(":checked")){for(var l=a.length-1;0<=l;l--){var f=a[l];if(void 0===f&&(f=""),0===f.length&&(d=[],"undefined"==typeof n[a[l-1]]?n[a[l-1]]=0:n[a[l-1]]+=1,f=n[a[l-1]]),l===a.length-1){if(r)if("true"===r)r=!0;else if("false"===r)r=!1;else if(isNaN(parseFloat(r))||parseFloat(r).toString()!==r)if("string"!=typeof r||"{"!==r.substr(0,1)&&"["!==r.substr(0,1)){if("object"==typeof r&&r.length&&o.is("select")){var c={};for(l=0;l<r.length;l++)c["n"+l]=r[l];r=c}}else try{r=JSON.parse(r)}catch(m){}else r=parseFloat(r);d[f]=r}else{var v=d;(d={})[f]=v}}p.extend(!0,i,d)}}return i},bindUIActionsFields:function(){l.on("click",".everest-forms-field-option-row-choices .add",function(e){u.choiceAdd(e,p(this))}),l.on("click",".everest-forms-field-option-row-choices .remove",function(e){u.choiceDelete(event,p(this))}),l.on("mousedown",".everest-forms-field-option-row-choices input[type=radio]",function(e){var t=p(this);t.is(":checked")?t.attr("data-checked","1"):t.attr("data-checked","0")}),l.on("click",".everest-forms-field-option-row-choices input[type=radio]",function(e){var t=p(this),i=t.parent().parent();t.parent().parent().find("input[type=radio]").not(this).prop("checked",!1),"1"===t.attr("data-checked")&&(t.prop("checked",!1),t.attr("data-checked","0")),u.choiceUpdate(i.data("field-type"),i.data("field-id"))}),l.on("change",".everest-forms-field-option-row-choices input[type=checkbox]",function(e){var t=p(this).parent().parent();u.choiceUpdate(t.data("field-type"),t.data("field-id"))}),l.on("keyup paste focusout",".everest-forms-field-option-row-choices input.label",function(e){var t=p(this).parent().parent().parent();u.choiceUpdate(t.data("field-type"),t.data("field-id"))}),l.on("change",".everest-forms-field-option-row-show_values input",function(e){p(this).closest(".everest-forms-field-option").find(".everest-forms-field-option-row-choices ul").toggleClass("show-values")}),l.on("change",".everest-forms-field-option-row-choices_images input",function(){var e=p(this),t=e.parent().data("field-id"),i=p("#everest-forms-field-option-"+t),n=p("#everest-forms-field-option-"+t+"-input_columns"),s=p("#everest-forms-field-option-"+t).find(".everest-forms-field-option-hidden-type").val();e.parent().find(".notice").toggleClass("hidden"),i.find(".everest-forms-field-option-row-choices ul").toggleClass("show-images"),e.is(":checked")?n.val("inline").trigger("change"):n.val("").trigger("change"),u.choiceUpdate(s,t)}),l.on("click",".everest-forms-attachment-media-view .upload-button",function(e){var t,i,n=p(this);e.preventDefault(),i||(i=wp.media.frames.everestforms_media_frame=wp.media({title:m.i18n_upload_image_title,className:"media-frame everest-forms-media-frame",frame:"select",multiple:!1,library:{type:"image"},button:{text:m.i18n_upload_image_button}})).on("select",function(){var e=i.state().get("selection").first().toJSON();(t=n.hasClass("button-add-media")?(n.hide(),n.parent()):n.parent().parent().parent()).find(".source").val(e.url),t.find(".attachment-thumb").remove(),t.find(".thumbnail-image").prepend('<img class="attachment-thumb" src="'+e.url+'">'),t.find(".actions").show(),l.trigger("everestFormsImageUploadAdd",[n,t])}),i.open()}),l.on("click",".everest-forms-attachment-media-view .remove-button",function(e){e.preventDefault();var t=p(this).parent().parent();t.find(".attachment-thumb").remove(),t.parent().find(".source").val(""),t.parent().find(".button-add-media").show(),l.trigger("everestFormsImageUploadRemove",[p(this),t])}),l.on("everestFormsImageUploadAdd everestFormsImageUploadRemove",function(e,t,i){var n=i.closest(".evf-choices-list"),s=n.data("field-type"),o=n.data("field-id");u.choiceUpdate(s,o)}),l.on("change",".everest-forms-field-option-row-input_columns select",function(){var e=p(this),t=e.val(),i=e.parent().data("field-id"),n="";"inline"===t?n="everest-forms-list-inline":""!==t&&(n="everest-forms-list-"+t+"-columns"),p("#everest-forms-field-"+i).removeClass("everest-forms-list-inline everest-forms-list-2-columns everest-forms-list-3-columns").addClass(n)}),l.on("click",".everest-forms-fields-tab a",function(e){e.preventDefault(),u.fieldTabChoice(p(this).attr("id"))}),l.on("change",".everest-forms-field-option-address input.hide",function(){var e=p(this),t=e.parent().parent().data("field-id"),i=e.parent().parent().data("subfield");p("#everest-forms-field-"+t).find(".everest-forms-"+i).toggleClass("hidden")}),l.on("input",".everest-forms-field-option-row-label input",function(){var e=p(this),t=e.val(),i=e.parent().data("field-id");p("#everest-forms-field-"+i).find(".label-title .text").text(t)}),l.on("input",".everest-forms-field-option-row-description textarea",function(){var e=p(this),t=e.val(),i=e.parent().data("field-id"),n=p("#everest-forms-field-"+i).find(".description");n.hasClass("nl2br")?n.html(t.replace(/\n/g,"<br>")):n.html(t)}),l.on("change",".everest-forms-field-option-row-required input",function(e){var t=p(this).parent().data("field-id");p("#everest-forms-field-"+t).toggleClass("required"),p(e.target).is(":checked")?p("#everest-forms-field-option-row-"+t+"-required-field-message").show():p("#everest-forms-field-option-row-"+t+"-required-field-message").hide()}),l.on("change",".everest-forms-field-option-row-confirmation input",function(){var e=p(this).parent().data("field-id");p("#everest-forms-field-"+e).find(".everest-forms-confirm").toggleClass("everest-forms-confirm-enabled everest-forms-confirm-disabled"),p("#everest-forms-field-option-"+e).toggleClass("everest-forms-confirm-enabled everest-forms-confirm-disabled")}),l.on("input",".everest-forms-field-option-row-placeholder input",function(e){var t=p(this),i=t.val(),n=t.parent().data("field-id"),s=p("#everest-forms-field-"+n).find(".primary-input");s.is("select")?i.length?s.find(".placeholder").length?s.find(".placeholder").text(i):s.prepend('<option class="placeholder" selected>'+i+"</option>"):s.find(".placeholder").remove():s.attr("placeholder",i)}),l.on("input",".everest-forms-field-option-address input.placeholder",function(e){var t=p(this),i=t.val(),n=t.parent().parent().data("field-id"),s=t.parent().parent().data("subfield");p("#everest-forms-field-"+n).find(".everest-forms-"+s+" input").attr("placeholder",i)}),l.on("input",".everest-forms-field-option-row-confirmation_placeholder input",function(){var e=p(this),t=e.val(),i=e.parent().data("field-id");p("#everest-forms-field-"+i).find(".secondary-input").attr("placeholder",t)}),l.on("change",".everest-forms-field-option-row-label_hide input",function(){var e=p(this).parent().data("field-id");p("#everest-forms-field-"+e).toggleClass("label_hide")}),l.on("change",".everest-forms-field-option-row-sublabel_hide input",function(){var e=p(this).parent().data("field-id");p("#everest-forms-field-"+e).toggleClass("sublabel_hide")}),l.on("change",".everest-forms-field-option-row-datetime_format select, .everest-forms-field-option-row-phone_format select, .everest-forms-field-option-row-item_price select, .everest-forms-field-option-row-format select",function(e){var t=p(this),i=t.val(),n=t.parent().data("field-id");p("#everest-forms-field-"+n).find(".format-selected").removeClass().addClass("format-selected format-selected-"+i),p("#everest-forms-field-option-"+n).find(".format-selected").removeClass().addClass("format-selected format-selected-"+i)})},choicesInit:function(e){p(e=e||".everest-forms-field-option-row-choices ul").sortable({items:"li",axis:"y",handle:".sort",scrollSensitivity:40,stop:function(e){var t=p(e.target).attr("data-field-id"),i=p("#everest-forms-field-option-"+t).find(".everest-forms-field-option-hidden-type").val();u.choiceUpdate(i,t)}})},choiceAdd:function(e,t){e.preventDefault();var i=p(t),n=i.parent(),s=n.find("input.default").is(":checked"),o=i.closest(".everest-forms-field-option-row-choices").data("field-id"),a=n.parent().attr("data-next-id"),r=n.parent().data("field-type"),d=n.clone().insertAfter(n);d.attr("data-key",a),d.find("input.label").val("").attr("name","form_fields["+o+"][choices]["+a+"][label]"),d.find("input.value").val("").attr("name","form_fields["+o+"][choices]["+a+"][value]"),d.find("input.source").val("").attr("name","form_fields["+o+"][choices]["+a+"][image]"),d.find("input.default").attr("name","form_fields["+o+"][choices]["+a+"][default]").prop("checked",!1),d.find(".attachment-thumb").remove(),d.find(".button-add-media").show(),!0===s&&n.find("input.default").prop("checked",!0),a++,n.parent().attr("data-next-id",a),l.trigger("everestFormsChoiceAdd"),u.choiceUpdate(r,o)},choiceDelete:function(e,t){e.preventDefault();var i=p(t),n=i.parent().parent();n.find("li").length<2?p.alert({title:!1,content:m.i18n_field_error_choice,icon:"dashicons dashicons-info",type:"blue",buttons:{ok:{text:m.i18n_ok,btnClass:"btn-confirm",keys:["enter"]}}}):(i.parent().remove(),u.choiceUpdate(n.data("field-type"),n.data("field-id")),l.trigger("everestFormsChoiceDelete"))},choiceUpdate:function(o,a){var r,e=p("#everest-forms-field-option-"+a);if("radio"===o||"checkbox"===o||"payment-multiple"===o||"payment-checkbox"===o){var t=[],i=u.formObject(e).form_fields[a];p("#everest-forms-field-option-"+a).find(".evf-choices-list li").each(function(){t.push(p(this).data("key"))});var n=wp.template("everest-forms-field-preview-choices");return data={type:o="checkbox"===o||"payment-checkbox"===o?"checkbox":"radio",order:t,settings:i},void p("#everest-forms-field-"+a).find("ul.primary-input").replaceWith(n(data))}"select"===o&&(p("#everest-forms-field-"+a+" .primary-input option").not(".placeholder").remove(),r="<option>{label}</option>"),p("#everest-forms-field-option-row-"+a+"-choices .evf-choices-list li").each(function(e){var t=p(this),i=t.find("input.label").val(),n=t.find("input.default").is(":checked"),s=p(r.replace("{label}",i));if(p("#everest-forms-field-"+a+" .primary-input").append(s),!0===n)switch(o){case"select":s.prop("selected",!0);break;case"radio":case"checkbox":s.find("input").prop("checked",!0)}})},bindFormSettings:function(){p("body").on("click",".evf-setting-panel",function(e){var t=p(this).attr("data-section");p(".evf-setting-panel").removeClass("active"),p(".everest-forms-active-email").removeClass("active"),p(".evf-content-section").removeClass("active"),p(this).addClass("active"),p(".evf-content-"+t+"-settings").addClass("active"),e.preventDefault()}),p(".evf-setting-panel").eq(0).trigger("click")},bindFormEmail:function(){p("body").on("click",".everest-forms-panel-sidebar-section-email",function(e){p(this).siblings(".everest-forms-active-email").removeClass("active"),p(this).next(".everest-forms-active-email").addClass("active");var t=p(this).siblings(".everest-forms-active-email.active").find(".everest-forms-active-email-connections-list li");t.length&&t.children(".user-nickname").first().trigger("click"),e.preventDefault()})},bindFormIntegrations:function(){p("body").on("click",".evf-integrations-panel",function(e){var t=p(this).attr("data-section");p(".evf-integrations-panel").removeClass("active"),p("#everest-forms-panel-integrations").find(".evf-panel-content-section").removeClass("active"),p(this).addClass("active"),p(this).parent().find(".everest-forms-active-connections").removeClass("active"),p(this).next(".everest-forms-active-connections").addClass("active");var i=p(this).siblings(".everest-forms-active-connections.active").find(".everest-forms-active-connections-list li");i.length&&i.children(".user-nickname").first().trigger("click"),p(".evf-panel-content-section-"+t).addClass("active"),e.preventDefault()}),p(".evf-setting-panel").eq(0).trigger("click")},bindFormPayment:function(){p("body").on("click",".evf-payments-panel",function(e){var t=p(this).attr("data-section");p(".evf-payments-panel").removeClass("active"),p(this).siblings().removeClass("icon active"),p(this).addClass("active"),p(this).parents("#everest-forms-panel-payments").find(".evf-payment-setting-content").removeClass("active").hide(),p(".evf-content-"+t+"-settings").addClass("active").show(),e.preventDefault()}),p(".evf-setting-panel").eq(0).trigger("click")},removeRow:function(e){p.each(e.find(".everest-forms-field"),function(){var e=p(this).attr("data-field-id"),t=p("#everest-forms-field-option-"+e);p(this).remove(),t.remove()}),e.remove()},bindRemoveRow:function(){p("body").on("click",".evf-delete-row",function(){var e=p(this),t=p(".evf-admin-row").length,i=e.closest(".evf-admin-row"),n=e.parents(".evf-admin-field-container").attr("data-current-part"),s=p("#everest-forms-builder").hasClass("multi-part-activated");n&&s&&(t=p("#part_"+n).find(".evf-admin-row").length),t<2?p.alert({title:m.i18n_row_locked,content:m.i18n_row_locked_msg,icon:"dashicons dashicons-info",type:"blue",buttons:{confirm:{text:m.i18n_close,btnClass:"btn-confirm",keys:["enter"]}}}):p.confirm({title:!1,content:m.i18n_delete_row_confirm,type:"red",closeIcon:!1,backgroundDismiss:!1,icon:"dashicons dashicons-warning",buttons:{confirm:{text:m.i18n_ok,btnClass:"btn-confirm",keys:["enter"],action:function(){u.removeRow(i)}},cancel:{text:m.i18n_cancel}}})})},bindAddNewRow:function(){p("body").on("click",".evf-add-row span",function(){var e=p(this),t=p(".evf-admin-field-wrapper"),i=p(".evf-admin-row").eq(0).clone(),n=e.parent().attr("data-total-rows"),s=e.parents(".evf-admin-field-container").attr("data-current-part");n++,s&&(t=p(".evf-admin-field-wrapper").find("#part_"+s)),i.find(".evf-admin-grid").html(""),i.attr("data-row-id",n),e.parent().attr("data-total-rows",n),t.append(i),u.bindFields(),u.checkEmptyGrid()})},bindCloneField:function(){p("body").on("click",".everest-forms-preview .everest-forms-field .everest-forms-field-duplicate",function(){var e=p(this).closest(".everest-forms-field");e.hasClass("no-duplicate")?p.alert({title:m.i18n_field_locked,content:m.i18n_field_locked_msg,icon:"dashicons dashicons-info",type:"blue",buttons:{confirm:{text:m.i18n_close,btnClass:"btn-confirm",keys:["enter"]}}}):p.confirm({title:!1,content:m.i18n_duplicate_field_confirm,type:"orange",closeIcon:!1,backgroundDismiss:!1,icon:"dashicons dashicons-warning",buttons:{confirm:{text:m.i18n_ok,btnClass:"btn-confirm",keys:["enter"],action:function(){u.cloneFieldAction(e)}},cancel:{text:m.i18n_cancel}}})})},cloneFieldAction:function(n){var s=n.attr("data-field-id"),e=m.form_id,t={action:"everest_forms_get_next_id",security:m.evf_get_next_id,form_id:e};p.ajax({url:m.ajax_url,data:t,type:"POST",beforeSend:function(){p(document.body).trigger("init_field_options_toggle")},success:function(e){if("boolean"==typeof e.success&&!0===e.success){var t=e.data.field_id,i=e.data.field_key;p("#everest-forms-field-id").val(t),u.render_node(n,s,i),p(document.body).trigger("init_field_options_toggle")}}})},render_node:function(e,s,o){var t=p(".everest-forms-field-options #everest-forms-field-option-"+s),i=p("#everest-forms-field-option-"+s+"-label").val(),n=p("#everest-forms-field-option-"+s+"-meta-key").val(),a=e.attr("data-field-type"),r=t.html(),d=i+" "+m.i18n_copy,l="html"!==a?n.replace(/\(|\)/g,"").toLowerCase().substring(0,n.lastIndexOf("_"))+"_"+Math.floor(1e3+9e3*Math.random()):"",f=e.clone(),c=new RegExp(s,"g");r=r.replace(c,o);var v=p('<div class="everest-forms-field-option everest-forms-field-option-'+a+'" id="everest-forms-field-option-'+o+'" data-field-id="'+o+'" />');v.append(r),p.each(t.find(":input"),function(){var e=p(this).attr("type"),t=p(this).attr("name").replace(c,o),i="";if("text"===e||"hidden"===e)i=p(this).val(),v.find('input[name="'+t+'"]').val(i),v.find('input[value="'+s+'"]').val(o);else if("checkbox"===e||"radio"===e)p(this).is(":checked")?v.find('input[name="'+t+'"]').prop("checked",!0).attr("checked","checked"):v.find('[name="'+t+'"]').prop("checked",!1).attr("checked",!1);else if(p(this).is("select")){if(p(this).find("option:selected").length){var n=p(this).find("option:selected").val();v.find('[name="'+t+'"]').find('[value="'+n+'"]').prop("selected",!0)}}else""!==p(this).val()&&v.find('[name="'+t+'"]').val(p(this).val())}),p(".everest-forms-field-options").append(v),p("#everest-forms-field-option-"+o+"-label").val(d),p("#everest-forms-field-option-"+o+"-meta-key").val(l),f.attr("class",e.attr("class")),f.attr("id","everest-forms-field-"+o),f.attr("data-field-id",o),f.attr("data-field-type",a),f.find(".label-title .text").text(d),e.closest(".evf-admin-grid").find('[data-field-id="'+s+'"]').after(f),p(document).trigger("everest-form-cloned",[o,a]),u.switchToFieldOptionPanel(o)},bindFieldDelete:function(){p("body").on("click",".everest-forms-preview .everest-forms-field .everest-forms-field-delete",function(){var t=p(this).closest(".everest-forms-field"),e=t.attr("data-field-id"),i=p("#everest-forms-field-option-"+e);p(this).closest(".evf-admin-grid");t.hasClass("no-delete")?p.alert({title:m.i18n_field_locked,content:m.i18n_field_locked_msg,icon:"dashicons dashicons-info",type:"blue",buttons:{confirm:{text:m.i18n_close,btnClass:"btn-confirm",keys:["enter"]}}}):p.confirm({title:!1,content:m.i18n_delete_field_confirm,type:"red",closeIcon:!1,backgroundDismiss:!1,icon:"dashicons dashicons-warning",buttons:{confirm:{text:m.i18n_ok,btnClass:"btn-confirm",keys:["enter"],action:function(){p(".evf-panel-fields-button").trigger("click"),t.fadeOut("slow",function(){var e=t.attr("data-field-id");p(document.body).trigger("evf_before_field_deleted",[e]),t.remove(),i.remove(),u.checkEmptyGrid(),p(".everest-forms-fields-tab").find("a").removeClass("active"),p(".everest-forms-fields-tab").find("a").first().addClass("active"),p(".everest-forms-add-fields").show(),u.conditionalLogicRemoveField(e),u.conditionalLogicRemoveFieldIntegration(e),u.paymentFieldRemoveFromQuantity(e)})}},cancel:{text:m.i18n_cancel}}})})},bindSaveOption:function(){p("body").on("click",".everest-forms-save-button",function(){var t=p(this),e=p("form#everest-forms-builder-form"),i=u.getStructure(),n=e.serializeArray();if(""!==p("#evf-edit-form-name").val().trim()){e.triggerHandler("everest_forms_process_ajax_data",[t,n])&&(n=e.triggerHandler("everest_forms_process_ajax_data",[t,n])),p(".everest-forms-panel-content-wrap").block({message:null,overlayCSS:{background:"#fff",opacity:.6}});var s=[];p(".everest-forms-field[data-field-id]").each(function(){s.push(p(this).attr("data-field-id"))});for(var o=n.length;o--;)if(n[o].name.startsWith("form_fields")){var a=!1;s.forEach(function(e){n[o].name.startsWith("form_fields["+e+"]")&&(a=!0)}),-1<o&&!1===a&&n.splice(o,1)}var r=n.concat(i),d={action:"everest_forms_save_form",security:m.evf_save_form,form_data:JSON.stringify(r)};p.ajax({url:m.ajax_url,data:d,type:"POST",beforeSend:function(){t.addClass("processing"),t.find(".loading-dot").remove(),t.append('<span class="loading-dot"></span>')},success:function(e){t.removeClass("processing"),t.find(".loading-dot").remove(),e.success||p.alert({title:e.data.errorTitle,content:e.data.errorMessage,icon:"dashicons dashicons-warning",type:"red",buttons:{ok:{text:m.i18n_ok,btnClass:"btn-confirm",keys:["enter"]}}}),p(".everest-forms-panel-content-wrap").unblock()}})}else p.alert({title:m.i18n_field_title_empty,content:m.i18n_field_title_payload,icon:"dashicons dashicons-warning",type:"red",buttons:{ok:{text:m.i18n_ok,btnClass:"btn-confirm",keys:["enter"]}}})})},getStructure:function(){var e=p(".evf-admin-field-wrapper"),o=[];return p.each(e.find(".evf-admin-row"),function(){var e=p(this),s=e.attr("data-row-id");p.each(e.find(".evf-admin-grid"),function(){var e=p(this),i=e.attr("data-grid-id"),n=0;p.each(e.find(".everest-forms-field"),function(){var e={name:"",value:""},t=p(this).attr("data-field-id");e.name="structure[row_"+s+"][grid_"+i+"]["+n+"]",n++,e.value=t,o.push(e)}),e.find(".everest-forms-field").length<1&&o.push({name:"structure[row_"+s+"][grid_"+i+"]",value:""})})}),o},getFieldArray:function(e){var t=[];return p.each(e.find(".everest-forms-field"),function(){var e=p(this).attr("data-field-id");t.push(e)}),t},checkEmptyGrid:function(e){p.each(p(".evf-admin-grid"),function(){p(this).find(".everest-forms-field, .evf-registered-item:not(.ui-draggable-dragging)").not(".ui-sortable-helper").length<1?p(this).addClass("evf-empty-grid"):p(this).removeClass("evf-empty-grid")}),u.choicesInit()},bindDefaultTabs:function(){p(document).on("click",".evf-nav-tab-wrapper a",function(e){e.preventDefault(),u.switchTab(p(this).data("panel"))})},switchTab:function(e){var t=p("#everest-forms-panel-"+e),i=p(".evf-panel-"+e+"-button");p(".evf-nav-tab-wrapper").find("a").removeClass("nav-tab-active"),i.addClass("nav-tab-active"),t.closest(".evf-tab-content").find(".everest-forms-panel").removeClass("active"),t.addClass("active"),"integrations"!==e&&"payments"!==e||(t.find(".everest-forms-panel-sidebar a").hasClass("active")||t.find(".everest-forms-panel-sidebar a").first().addClass("active"),p(".everest-forms-panel-content").find(".evf-panel-content-section").hasClass("active")||p(".everest-forms-panel-content").find(".evf-panel-content-section").first().addClass("active")),history.replaceState({},null,u.updateQueryString("tab",e)),u.switchPanel(e)},updateQueryString:function(e,t,i){i=i||window.location.href;var n,s=new RegExp("([?&])"+e+"=.*?(&|#|$)(.*)","gi");if(s.test(i))return null!=t?i.replace(s,"$1"+e+"="+t+"$2$3"):(i=(n=i.split("#"))[0].replace(s,"$1$3").replace(/(&|\?)$/,""),"undefined"!=typeof n[1]&&null!==n[1]&&(i+="#"+n[1]),i);if(null==t)return i;var o=-1!==i.indexOf("?")?"&":"?";return i=(n=i.split("#"))[0]+o+e+"="+t,"undefined"!=typeof n[1]&&null!==n[1]&&(i+="#"+n[1]),i},switchPanel:function(e){"field-options"===e&&u.switchToFieldOptionPanel()},switchToFieldOptionPanel:function(e){p(".everest-forms-field-options").find(".no-fields").hide(),p(".evf-admin-field-wrapper .everest-forms-field").removeClass("active"),p("#everest-forms-panel-fields").addClass("active"),p(".everest-forms-fields-tab").find("a").removeClass("active"),p(".everest-forms-fields-tab").find("a").last().addClass("active"),p(".everest-forms-add-fields").hide(),p(".everest-forms-field-options").show(),p(".everest-forms-field-options").find(".everest-forms-field-option").hide(),p(".evf-tab-lists").find("li a").removeClass("active"),p(".evf-tab-lists").find("li.evf-panel-field-options-button a").addClass("active"),p(document.body).trigger("evf-init-switch-field-options"),void 0!==e?(p("#everest-forms-field-option-"+e).show(),p("#everest-forms-field-"+e).addClass("active")):0<p(".evf-admin-field-wrapper .everest-forms-field").length?(p(".evf-admin-field-wrapper .everest-forms-field").eq(0).addClass("active"),p("#everest-forms-field-option-"+p(".evf-admin-field-wrapper .everest-forms-field").eq(0).attr("data-field-id")).show()):p(".everest-forms-field-options").find(".no-fields").show()},bindFields:function(){p(".evf-admin-field-wrapper").sortable({items:".evf-admin-row",axis:"y",cursor:"move",opacity:.65,scrollSensitivity:40,forcePlaceholderSize:!0,placeholder:"evf-sortable-placeholder",containment:".everest-forms-panel-content",start:function(e,t){t.item.css({"background-color":"#f7fafc",border:"1px dashed #5d96ee"})},stop:function(e,t){t.item.removeAttr("style")}}).disableSelection(),p(".evf-admin-grid").sortable({items:"> .everest-forms-field",delay:100,opacity:.65,cursor:"move",scrollSensitivity:40,forcePlaceholderSize:!0,connectWith:".evf-admin-grid",containment:".everest-forms-field-wrap",out:function(e){p(".evf-admin-grid").removeClass("evf-hover"),p(e.target).removeClass("evf-item-hover"),p(e.target).closest(".evf-admin-row").removeClass("evf-hover"),u.checkEmptyGrid()},over:function(e,t){p(".evf-admin-grid").addClass("evf-hover"),p(e.target).addClass("evf-item-hover"),p(e.target).closest(".evf-admin-row").addClass("evf-hover"),u.checkEmptyGrid()},receive:function(e,t){t.sender.is("button")&&u.fieldDrop(t.helper)},stop:function(e,t){t.item.removeAttr("style"),u.checkEmptyGrid()}}).disableSelection(),p(".evf-registered-buttons button.evf-registered-item").draggable({delay:200,cancel:!1,scroll:!1,revert:"invalid",scrollSensitivity:40,forcePlaceholderSize:!0,helper:function(){return p(this).clone().insertAfter(p(this).closest(".everest-forms-tab-content").siblings(".everest-forms-fields-tab"))},opacity:.75,containment:"#everest-forms-builder",connectToSortable:".evf-admin-grid"}).disableSelection(),p(".evf-admin-row").on("mouseenter mouseleave",function(e){e.buttons<1&&("mouseenter"===e.type?p(this).addClass("evf-hover"):p(".evf-admin-row").removeClass("evf-hover"))}),p(".everest-forms-panel-content").on("scroll",function(){p(".evf-admin-grid").sortable("refreshPositions"),p(".evf-admin-field-wrapper").sortable("refreshPositions")})},fieldTabChoice:function(e){p(".everest-forms-tab-content").scrollTop(0),p(".everest-forms-fields-tab a").removeClass("active"),p(".everest-forms-field, .everest-forms-title-desc").removeClass("active"),p("#"+e).addClass("active"),"add-fields"===e?(p(".everest-forms-add-fields").show(),p(".everest-forms-field-options").hide()):("field-options"===e?(e=p(".everest-forms-field").first().data("field-id"),p(".everest-forms-field-options").show(),p(".everest-forms-field").first().addClass("active")):p("#everest-forms-field-"+e).addClass("active"),p(".everest-forms-field-option").hide(),p("#everest-forms-field-option-"+e).show(),p(".everest-forms-add-fields").hide())},bindFormPreview:function(){},bindGridSwitcher:function(){p("body").on("click",".evf-show-grid",function(e){e.stopPropagation(),u.checkEmptyGrid(),p(this).closest(".evf-toggle-row").find(".evf-toggle-row-content").stop(!0).slideToggle(200)}),p(document).click(function(){u.checkEmptyGrid(),p(".evf-show-grid").closest(".evf-toggle-row").find(".evf-toggle-row-content").stop(!0).slideUp(200)});p("body").on("click",".evf-grid-selector",function(){var e=p(this).closest(".evf-admin-row");if(!p(this).hasClass("active")){var t=parseInt(p(this).attr("data-evf-grid"),10);if(!(2<t)){var i=p('<div class="evf-admin-grid evf-grid-'+t+' ui-sortable evf-empty-grid" />'),n=p("<div/>");p.each(e.find(".evf-admin-grid"),function(){p(this).children("*").each(function(){n.append(p(this).clone())})}),e.find(".evf-admin-grid").remove(),e.find(".evf-clear ").remove(),e.append('<div class="clear evf-clear"></div>');for(var s=1;s<=t;s++)i.attr("data-grid-id",s),e.append(i.clone());e.append('<div class="clear evf-clear"></div>'),e.find(".evf-admin-grid").eq(0).append(n.html()),e.find(".evf-grid-selector").removeClass("active"),p(this).addClass("active"),u.bindFields()}}})},fieldDrop:function(r){var e=r.attr("data-field-type");r.css({left:"0",width:"100%"}).append('<i class="spinner is-active"></i>'),p.ajax({url:m.ajax_url,type:"POST",data:{action:"everest_forms_new_field_"+e,security:m.evf_field_drop_nonce,field_type:e,form_id:m.form_id},beforeSend:function(){p(document.body).trigger("init_field_options_toggle")},success:function(e){var t=e.data.preview,i=e.data.options,n=e.data.form_field_id,s=e.data.field.type,o=p(t).attr("id"),a=p(t).attr("data-field-id");p("#everest-forms-field-id").val(n),p(".everest-forms-field-options").find(".no-fields").hide(),p(".everest-forms-field-options").append(i),p(".everest-forms-field-option-row-icon_color input.colorpicker").wpColorPicker({change:function(e){var t=p(this),i=t.val(),n=t.closest(".everest-forms-field-option-row").data("field-id");p("#everest-forms-field-"+n+" .rating-icon svg").css("fill",i)}}),r.after(t),null!==p("#everest-forms-panel-field-settings-enable_survey")&&p("#everest-forms-panel-field-settings-enable_survey").prop("checked")&&p("#everest-forms-field-option-"+a+"-survey_status").prop("checked",!0),null!==p("#everest-forms-panel-field-settings-enable_quiz")&&p("#everest-forms-panel-field-settings-enable_quiz").prop("checked")&&(p("#everest-forms-field-option-"+a+"-quiz_status").prop("checked",!0),p("#everest-forms-field-option-"+a+"-quiz_status").closest(".everest-forms-field-option-row-quiz_status").siblings(".everst-forms-field-quiz-settings").removeClass("everest-forms-hidden").addClass("everest-forms-show")),r.remove(),u.checkEmptyGrid(),p(document.body).trigger("init_tooltips"),p(document.body).trigger("init_field_options_toggle"),p(document.body).trigger("evf_after_field_append",[o]),u.conditionalLogicAppendField(o),u.conditionalLogicAppendFieldIntegration(o),u.paymentFieldAppendToQuantity(o),u.paymentFieldAppendToDropdown(a,s)}})},conditionalLogicAppendField:function(a){var e=p("#"+a),r=e.index(),d=p(".evf-field-conditional-field-select"),l=e.attr("data-field-type"),f=e.attr("data-field-id"),c=e.find(".label-title .text ").text();p.fn.insertAt=function(e,t,i){var n=p.makeArray(this.children().clone(!0));n.splice(t,0,e),p.each(n,function(e,t){i===p(t)[0].value&&(p(t)[0].selected=!0,n[e]=t)}),this.empty().append(n)};var v=f;d.each(function(n,e){var t=p(e).val(),i=a.replace("everest-forms-field-",""),s=p(e).attr("name");if(i===s.substring(s.indexOf("[")+1,s.indexOf("]")))p(".evf-admin-row .evf-admin-grid .everest-forms-field").each(function(){var e=p(this).data("field-type"),t=p(this).data("field-id"),i=p(this).find(".label-title span").first().text();field_to_be_restricted=[],field_to_be_restricted=["html","title","address","image-upload","file-upload","date-time","hidden","scale-rating","likert"],-1===p.inArray(e,field_to_be_restricted)&&v!==t&&d.eq(n).append('<option class="evf-conditional-fields" data-field_type="'+e+'" data-field_id="'+t+'" value="'+t+'">'+i+"</option>")});else{var o='<option class="evf-conditional-fields" data-field_type="'+l+'" data-field_id="'+f+'" value="'+f+'">'+c+"</option>";"html"!==l&&"title"!==l&&"address"!==l&&"image-upload"!==l&&"file-upload"!==l&&"date-time"!==l&&"hidden"!==l&&"likert"!==l&&"scale-rating"!==l&&d.eq(n).insertAt(o,r,t)}})},paymentFieldAppendToQuantity:function(e){var t=p("#"+e),i=p(".everest-forms-field-option-row-map_field select"),n=t.attr("data-field-type"),s='<option value="'+t.attr("data-field-id")+'">'+t.find(".label-title .text ").text()+"</option>";"payment-single"!==n&&"payment-multiple"!==n&&"payment-checkbox"!==n||i.append(s)},paymentFieldAppendToDropdown:function(e,t){if("payment-quantity"===t){var i=p("#everest-forms-field-option-"+e+"-map_field");["payment-checkbox","payment-multiple","payment-single"].forEach(function(e){p(".everest-forms-field-"+e).each(function(){var e='<option value="'+p(this).attr("data-field-id")+'">'+p(this).find(".label-title .text").text()+"</option>";i.append(e)})})}},conditionalLogicAppendFieldIntegration:function(o){var a=p("#"+o),r=a.index(),d=p(".evf-provider-conditional").find(".evf-conditional-field-select"),l=a.attr("data-field-type"),f=a.attr("data-field-id"),c=a.find(".label-title .text ").text();p.fn.insertAt=function(e,t){var i=p.makeArray(this.children().clone(!0));i.splice(t,0,e),this.empty().append(i)},d.each(function(n,e){var t=o.replace("everest-forms-field-",""),i=p(e).attr("name");if(t===i.substring(i.indexOf("[")+1,i.indexOf("]")))p(".evf-admin-row .evf-admin-grid .everest-forms-field").each(function(){var e=p(this).data("field-type"),t=p(this).data("field-id"),i=p(this).find(".label-title span").first().text();field_to_be_restricted=[],field_to_be_restricted=["html","title","address","image-upload","file-upload","date-time","hidden","scale-rating","likert",a.attr("data-field-type")],-1===p.inArray(e,field_to_be_restricted)&&d.eq(n).append('<option class="evf-conditional-fields" data-field_type="'+e+'" data-field_id="'+t+'" value="'+t+'">'+i+"</option>")});else{var s='<option class="evf-conditional-fields" data-field_type="'+l+'" data-field_id="'+f+'" value="'+f+'">'+c+"</option>";"html"!==l&&"title"!==l&&"address"!==l&&"image-upload"!==l&&"file-upload"!==l&&"date-time"!==l&&"hidden"!==l&&"likert"!==l&&"scale-rating"!==l&&d.eq(n).insertAt(s,r)}})},conditionalLogicRemoveField:function(e){p(".evf-field-conditional-field-select option[value = "+e+" ]").remove()},conditionalLogicRemoveFieldIntegration:function(e){p(".evf-provider-conditional .evf-conditional-field-select option[value = "+e+" ]").remove()},paymentFieldRemoveFromQuantity:function(e){p(".everest-forms-field-option-row-map_field select option[value = "+e+" ]").remove()},bindFieldSettings:function(){p("body").on("click",".everest-forms-preview .everest-forms-field, .everest-forms-preview .everest-forms-field .everest-forms-field-setting",function(e){e.preventDefault();var t=p(this).closest(".everest-forms-field").attr("data-field-id");p(".everest-forms-tab-content").scrollTop(0),u.switchToFieldOptionPanel(t)})},toggleLabelEdit:function(e,t){p(e).toggleClass("everest-forms-hidden"),p(t).toggleClass("everest-forms-hidden"),p(t).is(":visible")&&p(t).focus()},bindToggleHandleActions:function(){p("body").on("click",".toggle-handle",function(e){var t=p(this).data("label"),i=p(this).data("input");p(i).is(":visible")||u.toggleLabelEdit(t,i)})},bindLabelEditInputActions:function(){p("body").on("focusout",".label-edit-input",function(e){var t=p(this).data("label");u.toggleLabelEdit(t,this)})},bindSyncedInputActions:function(){p("body").on("input",".sync-input",function(e){var t=p(this).val(),i=p(this).data("sync-targets");t&&i&&p(i).text(t)})}};p(function(){u.init()})}(jQuery,window.evf_data),jQuery(function(){"checked"!=jQuery("#everest-forms-panel-field-settingsemail-evf_send_confirmation_email").attr("checked")&&jQuery("#everest-forms-panel-field-settingsemail-evf_send_confirmation_email-wrap").nextAll().hide(),jQuery("#everest-forms-panel-field-settingsemail-evf_send_confirmation_email").on("change",function(){"checked"!=jQuery(this).attr("checked")?jQuery("#everest-forms-panel-field-settingsemail-evf_send_confirmation_email-wrap").nextAll().hide():jQuery("#everest-forms-panel-field-settingsemail-evf_send_confirmation_email-wrap").nextAll().show()});var e=jQuery("#everest-forms-panel-field-settings-redirect_to option:selected").val();"0"==e?(jQuery("#everest-forms-panel-field-settings-custom_page-wrap").hide(),jQuery("#everest-forms-panel-field-settings-external_url-wrap").hide()):"1"==e?(jQuery("#everest-forms-panel-field-settings-custom_page-wrap").show(),jQuery("#everest-forms-panel-field-settings-external_url-wrap").hide()):"2"==e&&(jQuery("#everest-forms-panel-field-settings-external_url-wrap").show(),jQuery("#everest-forms-panel-field-settings-custom_page-wrap").hide()),jQuery("#everest-forms-panel-field-settings-redirect_to").on("change",function(){"0"==this.value?(jQuery("#everest-forms-panel-field-settings-custom_page-wrap").hide(),jQuery("#everest-forms-panel-field-settings-external_url-wrap").hide()):"1"==this.value?(jQuery("#everest-forms-panel-field-settings-custom_page-wrap").show(),jQuery("#everest-forms-panel-field-settings-external_url-wrap").hide()):"2"==this.value&&(jQuery("#everest-forms-panel-field-settings-custom_page-wrap").hide(),jQuery("#everest-forms-panel-field-settings-external_url-wrap").show())}),jQuery(".evf-panel-field-options-button.evf-disabled-tab").hide()}),jQuery(function(f){f(document.body).on("init_add_fields_toogle",function(){f(".everest-forms-add-fields").on("click",".everest-forms-add-fields-group > a",function(e){e.preventDefault(),f(this).parent(".everest-forms-add-fields-group").toggleClass("closed").toggleClass("open")}),f(".everest-forms-add-fields").on("click",".everest-forms-add-fields-group a",function(){f(this).next(".evf-registered-buttons").stop().slideToggle()}),f(".everest-forms-add-fields-group.closed").each(function(){f(this).find(".evf-registered-buttons").hide()})}).trigger("init_add_fields_toogle"),f(document.body).on("init_field_options_toggle",function(){f(".everest-forms-field-option").on("click",".everest-forms-field-option-group > a",function(e){e.preventDefault(),f(this).parent(".everest-forms-field-option-group").toggleClass("closed").toggleClass("open")}),f(".everest-forms-field-option").on("click",".everest-forms-field-option-group a",function(e){f(e.target).filter(":input, option, .sort").length||f(this).next(".everest-forms-field-option-group-inner").stop().slideToggle()}),f(".everest-forms-field-option-group.closed").each(function(){f(this).find(".everest-forms-field-option-group-inner").hide()})}).trigger("init_field_options_toggle"),f(document).click(function(){f(".evf-smart-tag-lists").hide()}),f(document.body).on("click",".evf-toggle-smart-tag-display",function(e){e.stopPropagation(),f(".evf-smart-tag-lists").hide(),f(".evf-smart-tag-lists ul").empty(),f(this).parent().find(".evf-smart-tag-lists").toggle("show");var t=f(this).data("type");!function l(s,e,t){var o=[],a=[],r=[];if(f(".evf-admin-row .evf-admin-grid .everest-forms-field").each(function(){var e=f(this).data("field-type"),t=f(this).data("field-id");if(s===e){var i=f(this).find(".label-title span").first().text();r[t]=i}else{var n=f(this).find(".label-title span").first().text();o[t]=n}a[t]=f(this).find(".label-title span").first().text()}),"other"===e||"all"===e){var i=evf_data.smart_tags_other;for(var n in i)f(t).parent().find(".evf-smart-tag-lists .evf-others").append('<li class = "smart-tag-field" data-type="other" data-field_id="'+n+'">'+i[n]+"</li>")}if("fields"===e||"all"===e)if("email"===s)for(var n in Object.keys(r).length<1?f(t).parent().find('.evf-smart-tag-lists .smart-tag-title:not(".other-tag-title")').addClass("everest-forms-hidden"):f(t).parent().find('.evf-smart-tag-lists .smart-tag-title:not(".other-tag-title")').removeClass("everest-forms-hidden"),f(t).parent().find(".evf-smart-tag-lists .other-tag-title").remove(),f(t).parent().find(".evf-smart-tag-lists .evf-others").remove(),f(t).parent().find(".evf-smart-tag-lists").append('<div class="smart-tag-title other-tag-title">Others</div><ul class="evf-others"></ul>'),f(t).parent().find(".evf-smart-tag-lists .evf-others").append('<li class="smart-tag-field" data-type="other" data-field_id="admin_email">Site Admin Email</li><li class="smart-tag-field" data-type="other" data-field_id="user_email">User Email</li>'),r)f(t).parent().find(".evf-smart-tag-lists .evf-fields").append('<li class = "smart-tag-field" data-type="field" data-field_id="'+n+'">'+r[n]+"</li>");else for(var d in Object.keys(a).length<1?f(t).parent().find('.evf-smart-tag-lists .smart-tag-title:not(".other-tag-title")').addClass("everest-forms-hidden"):f(t).parent().find('.evf-smart-tag-lists .smart-tag-title:not(".other-tag-title")').removeClass("everest-forms-hidden"),a)f(t).parent().find(".evf-smart-tag-lists .evf-fields").append('<li class = "smart-tag-field" data-type="field" data-field_id="'+d+'">'+a[d]+"</li>")}(f(this).data("fields"),t,f(this))}),f(document.body).on("change",".everest-forms-toggle-form input",function(e){e.stopPropagation(),f.post(evf_data.ajax_url,{action:"everest_forms_enabled_form",security:evf_data.evf_enabled_form,form_id:f(this).data("form_id"),enabled:f(this).attr("checked")?1:0})}),f(document.body).on("click",".smart-tag-field",function(e){var t=f(this).data("field_id"),i=f(this).text(),n=f(this).data("type"),s=f(this).parent().parent().parent(),o=s.find("input[type=text]"),a=s.find("textarea");if("fullname"!==t&&"email"!==t&&"subject"!==t&&"message"!==t&&"other"!==n){i=i.split(/[\s-_]/);for(var r=0;r<i.length;r++)i[r]=0===r?i[r].charAt(0).toLowerCase()+i[r].substr(1):i[r].charAt(0).toUpperCase()+i[r].substr(1);t=(i=i.join(""))+"_"+t}else t=t;"field"===n?(o.val(o.val()+'{field_id="'+t+'"}'),a.val(a.val()+'{field_id="'+t+'"}')):"other"===n&&(o.val(o.val()+"{"+t+"}"),a.val(a.val()+"{"+t+"}"))}),f(document).on("change",".evf-content-email-settings .evf-toggle-switch input",function(e){var t=f(this),i=t.prop("checked");!1===i?(f(this).closest("#everest-forms-panel-settings").find(".everest-forms-active-email").addClass("everest-forms-hidden"),t.closest(".evf-content-email-settings").find(".email-disable-message").remove(),t.closest(".evf-content-section-title").siblings(".evf-content-email-settings-inner").addClass("everest-forms-hidden"),f('<p class="email-disable-message everest-forms-notice everest-forms-notice-info">'+evf_data.i18n_email_disable_message+"</p>").insertAfter(t.closest(".evf-content-section-title"))):!0===i&&(f(this).closest("#everest-forms-panel-settings").find(".everest-forms-active-email").removeClass("everest-forms-hidden"),t.closest(".evf-content-section-title").siblings(".evf-content-email-settings-inner").removeClass("everest-forms-hidden"),t.closest(".evf-content-email-settings").find(".email-disable-message").remove())}),f(document).on("click",".everest-forms-min-max-date-format input",function(){f(this).is(":checked")?f(".everest-forms-min-max-date-option").removeClass("everest-forms-hidden"):f(".everest-forms-min-max-date-option").addClass("everest-forms-hidden")})});
1
+ !function(p,m){var l,u={init:function(){p(document).ready(function(e){e("evf-panel-integrations-button a").hasClass("active")||(e("#everest-forms-panel-integrations").find(".everest-forms-panel-sidebar a").first().addClass("active"),e("#everest-forms-panel-integrations").find(".everest-forms-panel-sidebar a").hasClass("active")&&e("#everest-forms-panel-integrations").find(".everest-forms-panel-sidebar a").next(".everest-forms-active-connections").first().addClass("active"),e(".everest-forms-panel-content").find(".evf-panel-content-section").first().addClass("active"))}),p(document).ready(function(n){"1"===n(".everest-forms-min-max-date-format input").val()&&n(".everest-forms-min-max-date-option").find("input").datepicker({defaultDate:"",dateFormat:"yy-mm-dd",numberOfMonths:1,showButtonPanel:!0,onSelect:function(){var e=n(this).is(".everest-forms-min-date")?"minDate":"maxDate",t=n(this).closest(".everest-forms-min-max-date-option").find("input"),i=n(this).datepicker("getDate");t.not(this).datepicker("option",e,i),n(this).change()}}),n("evf-panel-payments-button a").hasClass("active")||(n("#everest-forms-panel-payments").find(".everest-forms-panel-sidebar a").first().addClass("active"),n(".everest-forms-panel-content").find(".evf-payment-setting-content").first().addClass("active"))}),p(document.body).on("click","#copy-shortcode",this.copyShortcode).on("aftercopy","#copy-shortcode",this.copySuccess).on("aftercopyfailure","#copy-shortcode",this.copyFail),p(document).ready(u.ready),p(window).on("load",u.load),p(document.body).on("evf-init-builder-fields",function(){u.bindFields()}).trigger("evf-init-builder-fields"),p(document.body).on("adjust_builder_width",function(){var e=p("#adminmenuwrap").width();p("#everest-forms-builder-form").css({width:"calc(100% - "+e+"px)"})}).trigger("adjust_builder_width"),p(document.body).on("click","#collapse-button",function(){p("#everest-forms-builder-form").width(""),p(document.body).trigger("adjust_builder_width")}),p(window).on("resize orientationchange",function(){var e;clearTimeout(e),e=setTimeout(function(){p("#everest-forms-builder").width(""),p(document.body).trigger("adjust_builder_width")},250)}).trigger("resize")},copyShortcode:function(e){evfClearClipboard(),evfSetClipboard(p(".evf-shortcode-field").find("input").val(),p(this)),e.preventDefault()},copySuccess:function(){p("#copy-shortcode").tooltipster("content",p(this).attr("data-copied")).trigger("mouseenter").on("mouseleave",function(){var e=p(this);setTimeout(function(){e.tooltipster("content",e.attr("data-tip"))},1e3)})},copyFail:function(){p(".evf-shortcode-field").find("input").focus().select()},load:function(){p(".everest-forms-overlay").fadeOut()},ready:function(){if(l=p("#everest-forms-builder"),u.bindUIActions(),u.bindEditActions(),jconfirm.defaults={closeIcon:!0,backgroundDismiss:!0,escapeKey:!0,animationBounce:1,useBootstrap:!1,theme:"modern",boxWidth:"400px",columnClass:"evf-responsive-class"},"undefined"!=typeof PerfectScrollbar){var e=p(".everest-forms-tab-content"),t=p("#everest-forms-panel-settings .everest-forms-panel-sidebar");1<=e.length&&(window.evf_tab_scroller=new PerfectScrollbar(e.selector)),1<=t.length&&(window.evf_setting_scroller=new PerfectScrollbar(t.selector))}l.on("change",".everest-forms-field-option-row-limit_enabled input",function(e){u.updateTextFieldsLimitControls(p(e.target).parents(".everest-forms-field-option-row-limit_enabled").data().fieldId,e.target.checked)}),p(document).trigger("everest_forms_ready")},updateTextFieldsLimitControls:function(e,t){t?p("#everest-forms-field-option-row-"+e+"-limit_controls").removeClass("everest-forms-hidden"):p("#everest-forms-field-option-row-"+e+"-limit_controls").addClass("everest-forms-hidden")},bindUIActions:function(){u.bindDefaultTabs(),u.checkEmptyGrid(),u.bindFields(),u.bindFormPreview(),u.bindGridSwitcher(),u.bindFieldSettings(),u.bindFieldDelete(),u.bindCloneField(),u.bindSaveOption(),u.bindAddNewRow(),u.bindRemoveRow(),u.bindFormSettings(),u.bindFormEmail(),u.bindFormIntegrations(),u.bindFormPayment(),u.choicesInit(),u.bindToggleHandleActions(),u.bindLabelEditInputActions(),u.bindSyncedInputActions(),u.bindUIActionsFields(),"field-options"===m.tab&&p(".evf-panel-field-options-button").trigger("click")},bindEditActions:function(){p("#edit-form-name").on("click",function(e){e.stopPropagation(),""!==p("#evf-edit-form-name").val().trim()&&u.toggleEditTitle(e)}),p("#evf-edit-form-name").on("change keypress",function(e){var t=p(this);e.stopPropagation(),13===e.which&&""!==p(this).val().trim()&&u.toggleEditTitle(e),""!==t.val().trim()&&p("#everest-forms-panel-field-settings-form_title").val(t.val().trim())}).on("click",function(e){e.stopPropagation()}),p(document).not(p(".everest-forms-title-desc")).click(function(e){var t=p("#evf-edit-form-name");e.stopPropagation(),!t.prop("disabled")&&t.val()&&""!==t.val().trim()&&u.toggleEditTitle(e)})},toggleEditTitle:function(e){var t=p("#edit-form-name").siblings("#evf-edit-form-name");e.preventDefault(),t.prop("disabled",function(e,t){return!t}),t.hasClass("everst-forms-name-editing")||t.focus(),t.toggleClass("everst-forms-name-editing")},formObject:function(e){for(var t=jQuery(e).find("[name]"),i={},n={},s=0;s<t.length;s++){var o=jQuery(t[s]),a=o.prop("name").replace(/\]/gi,"").split("["),r=o.val(),d={};if(!o.is(":radio")&&!o.is(":checkbox")||o.is(":checked")){for(var l=a.length-1;0<=l;l--){var f=a[l];if(void 0===f&&(f=""),0===f.length&&(d=[],"undefined"==typeof n[a[l-1]]?n[a[l-1]]=0:n[a[l-1]]+=1,f=n[a[l-1]]),l===a.length-1){if(r)if("true"===r)r=!0;else if("false"===r)r=!1;else if(isNaN(parseFloat(r))||parseFloat(r).toString()!==r)if("string"!=typeof r||"{"!==r.substr(0,1)&&"["!==r.substr(0,1)){if("object"==typeof r&&r.length&&o.is("select")){var c={};for(l=0;l<r.length;l++)c["n"+l]=r[l];r=c}}else try{r=JSON.parse(r)}catch(m){}else r=parseFloat(r);d[f]=r}else{var v=d;(d={})[f]=v}}p.extend(!0,i,d)}}return i},bindUIActionsFields:function(){l.on("click",".everest-forms-field-option-row-choices .add",function(e){u.choiceAdd(e,p(this))}),l.on("click",".everest-forms-field-option-row-choices .remove",function(e){u.choiceDelete(event,p(this))}),l.on("mousedown",".everest-forms-field-option-row-choices input[type=radio]",function(e){var t=p(this);t.is(":checked")?t.attr("data-checked","1"):t.attr("data-checked","0")}),l.on("click",".everest-forms-field-option-row-choices input[type=radio]",function(e){var t=p(this),i=t.parent().parent();t.parent().parent().find("input[type=radio]").not(this).prop("checked",!1),"1"===t.attr("data-checked")&&(t.prop("checked",!1),t.attr("data-checked","0")),u.choiceUpdate(i.data("field-type"),i.data("field-id"))}),l.on("change",".everest-forms-field-option-row-choices input[type=checkbox]",function(e){var t=p(this).parent().parent();u.choiceUpdate(t.data("field-type"),t.data("field-id"))}),l.on("keyup paste focusout",".everest-forms-field-option-row-choices input.label",function(e){var t=p(this).parent().parent().parent();u.choiceUpdate(t.data("field-type"),t.data("field-id"))}),l.on("change",".everest-forms-field-option-row-show_values input",function(e){p(this).closest(".everest-forms-field-option").find(".everest-forms-field-option-row-choices ul").toggleClass("show-values")}),l.on("change",".everest-forms-field-option-row-choices_images input",function(){var e=p(this),t=e.parent().data("field-id"),i=p("#everest-forms-field-option-"+t),n=p("#everest-forms-field-option-"+t+"-input_columns"),s=p("#everest-forms-field-option-"+t).find(".everest-forms-field-option-hidden-type").val();e.parent().find(".notice").toggleClass("hidden"),i.find(".everest-forms-field-option-row-choices ul").toggleClass("show-images"),e.is(":checked")?n.val("inline").trigger("change"):n.val("").trigger("change"),u.choiceUpdate(s,t)}),l.on("click",".everest-forms-attachment-media-view .upload-button",function(e){var t,i,n=p(this);e.preventDefault(),i||(i=wp.media.frames.everestforms_media_frame=wp.media({title:m.i18n_upload_image_title,className:"media-frame everest-forms-media-frame",frame:"select",multiple:!1,library:{type:"image"},button:{text:m.i18n_upload_image_button}})).on("select",function(){var e=i.state().get("selection").first().toJSON();(t=n.hasClass("button-add-media")?(n.hide(),n.parent()):n.parent().parent().parent()).find(".source").val(e.url),t.find(".attachment-thumb").remove(),t.find(".thumbnail-image").prepend('<img class="attachment-thumb" src="'+e.url+'">'),t.find(".actions").show(),l.trigger("everestFormsImageUploadAdd",[n,t])}),i.open()}),l.on("click",".everest-forms-attachment-media-view .remove-button",function(e){e.preventDefault();var t=p(this).parent().parent();t.find(".attachment-thumb").remove(),t.parent().find(".source").val(""),t.parent().find(".button-add-media").show(),l.trigger("everestFormsImageUploadRemove",[p(this),t])}),l.on("everestFormsImageUploadAdd everestFormsImageUploadRemove",function(e,t,i){var n=i.closest(".evf-choices-list"),s=n.data("field-type"),o=n.data("field-id");u.choiceUpdate(s,o)}),l.on("change",".everest-forms-field-option-row-input_columns select",function(){var e=p(this),t=e.val(),i=e.parent().data("field-id"),n="";"inline"===t?n="everest-forms-list-inline":""!==t&&(n="everest-forms-list-"+t+"-columns"),p("#everest-forms-field-"+i).removeClass("everest-forms-list-inline everest-forms-list-2-columns everest-forms-list-3-columns").addClass(n)}),l.on("click",".everest-forms-fields-tab a",function(e){e.preventDefault(),u.fieldTabChoice(p(this).attr("id"))}),l.on("change",".everest-forms-field-option-address input.hide",function(){var e=p(this),t=e.parent().parent().data("field-id"),i=e.parent().parent().data("subfield");p("#everest-forms-field-"+t).find(".everest-forms-"+i).toggleClass("hidden")}),l.on("input",".everest-forms-field-option-row-label input",function(){var e=p(this),t=e.val(),i=e.parent().data("field-id");p("#everest-forms-field-"+i).find(".label-title .text").text(t)}),l.on("input",".everest-forms-field-option-row-description textarea",function(){var e=p(this),t=e.val(),i=e.parent().data("field-id"),n=p("#everest-forms-field-"+i).find(".description");n.hasClass("nl2br")?n.html(t.replace(/\n/g,"<br>")):n.html(t)}),l.on("change",".everest-forms-field-option-row-required input",function(e){var t=p(this).parent().data("field-id");p("#everest-forms-field-"+t).toggleClass("required"),p(e.target).is(":checked")?p("#everest-forms-field-option-row-"+t+"-required-field-message").show():p("#everest-forms-field-option-row-"+t+"-required-field-message").hide()}),l.on("change",".everest-forms-field-option-row-confirmation input",function(){var e=p(this).parent().data("field-id");p("#everest-forms-field-"+e).find(".everest-forms-confirm").toggleClass("everest-forms-confirm-enabled everest-forms-confirm-disabled"),p("#everest-forms-field-option-"+e).toggleClass("everest-forms-confirm-enabled everest-forms-confirm-disabled")}),l.on("input",".everest-forms-field-option-row-placeholder input",function(e){var t=p(this),i=t.val(),n=t.parent().data("field-id"),s=p("#everest-forms-field-"+n).find(".primary-input");s.is("select")?i.length?s.find(".placeholder").length?s.find(".placeholder").text(i):s.prepend('<option class="placeholder" selected>'+i+"</option>"):s.find(".placeholder").remove():s.attr("placeholder",i)}),l.on("input",".everest-forms-field-option-address input.placeholder",function(e){var t=p(this),i=t.val(),n=t.parent().parent().data("field-id"),s=t.parent().parent().data("subfield");p("#everest-forms-field-"+n).find(".everest-forms-"+s+" input").attr("placeholder",i)}),l.on("input",".everest-forms-field-option-row-confirmation_placeholder input",function(){var e=p(this),t=e.val(),i=e.parent().data("field-id");p("#everest-forms-field-"+i).find(".secondary-input").attr("placeholder",t)}),l.on("change",".everest-forms-field-option-row-label_hide input",function(){var e=p(this).parent().data("field-id");p("#everest-forms-field-"+e).toggleClass("label_hide")}),l.on("change",".everest-forms-field-option-row-sublabel_hide input",function(){var e=p(this).parent().data("field-id");p("#everest-forms-field-"+e).toggleClass("sublabel_hide")}),l.on("change",".everest-forms-field-option-row-datetime_format select, .everest-forms-field-option-row-phone_format select, .everest-forms-field-option-row-item_price select, .everest-forms-field-option-row-format select",function(e){var t=p(this),i=t.val(),n=t.parent().data("field-id");p("#everest-forms-field-"+n).find(".format-selected").removeClass().addClass("format-selected format-selected-"+i),p("#everest-forms-field-option-"+n).find(".format-selected").removeClass().addClass("format-selected format-selected-"+i)})},choicesInit:function(e){p(e=e||".everest-forms-field-option-row-choices ul").sortable({items:"li",axis:"y",handle:".sort",scrollSensitivity:40,stop:function(e){var t=p(e.target).attr("data-field-id"),i=p("#everest-forms-field-option-"+t).find(".everest-forms-field-option-hidden-type").val();u.choiceUpdate(i,t)}})},choiceAdd:function(e,t){e.preventDefault();var i=p(t),n=i.parent(),s=n.find("input.default").is(":checked"),o=i.closest(".everest-forms-field-option-row-choices").data("field-id"),a=n.parent().attr("data-next-id"),r=n.parent().data("field-type"),d=n.clone().insertAfter(n);d.attr("data-key",a),d.find("input.label").val("").attr("name","form_fields["+o+"][choices]["+a+"][label]"),d.find("input.value").val("").attr("name","form_fields["+o+"][choices]["+a+"][value]"),d.find("input.source").val("").attr("name","form_fields["+o+"][choices]["+a+"][image]"),d.find("input.default").attr("name","form_fields["+o+"][choices]["+a+"][default]").prop("checked",!1),d.find(".attachment-thumb").remove(),d.find(".button-add-media").show(),!0===s&&n.find("input.default").prop("checked",!0),a++,n.parent().attr("data-next-id",a),l.trigger("everestFormsChoiceAdd"),u.choiceUpdate(r,o)},choiceDelete:function(e,t){e.preventDefault();var i=p(t),n=i.parent().parent();n.find("li").length<2?p.alert({title:!1,content:m.i18n_field_error_choice,icon:"dashicons dashicons-info",type:"blue",buttons:{ok:{text:m.i18n_ok,btnClass:"btn-confirm",keys:["enter"]}}}):(i.parent().remove(),u.choiceUpdate(n.data("field-type"),n.data("field-id")),l.trigger("everestFormsChoiceDelete"))},choiceUpdate:function(o,a){var r,e=p("#everest-forms-field-option-"+a);if("radio"===o||"checkbox"===o||"payment-multiple"===o||"payment-checkbox"===o){var t=[],i=u.formObject(e).form_fields[a];p("#everest-forms-field-option-"+a).find(".evf-choices-list li").each(function(){t.push(p(this).data("key"))});var n=wp.template("everest-forms-field-preview-choices");return data={type:o="checkbox"===o||"payment-checkbox"===o?"checkbox":"radio",order:t,settings:i},void p("#everest-forms-field-"+a).find("ul.primary-input").replaceWith(n(data))}"select"===o&&(p("#everest-forms-field-"+a+" .primary-input option").not(".placeholder").remove(),r="<option>{label}</option>"),p("#everest-forms-field-option-row-"+a+"-choices .evf-choices-list li").each(function(e){var t=p(this),i=t.find("input.label").val(),n=t.find("input.default").is(":checked"),s=p(r.replace("{label}",i));if(p("#everest-forms-field-"+a+" .primary-input").append(s),!0===n)switch(o){case"select":s.prop("selected",!0);break;case"radio":case"checkbox":s.find("input").prop("checked",!0)}})},bindFormSettings:function(){p("body").on("click",".evf-setting-panel",function(e){var t=p(this).attr("data-section");p(".evf-setting-panel").removeClass("active"),p(".everest-forms-active-email").removeClass("active"),p(".evf-content-section").removeClass("active"),p(this).addClass("active"),p(".evf-content-"+t+"-settings").addClass("active"),e.preventDefault()}),p(".evf-setting-panel").eq(0).trigger("click")},bindFormEmail:function(){p("body").on("click",".everest-forms-panel-sidebar-section-email",function(e){p(this).siblings(".everest-forms-active-email").removeClass("active"),p(this).next(".everest-forms-active-email").addClass("active");var t=p(this).siblings(".everest-forms-active-email.active").find(".everest-forms-active-email-connections-list li");t.length&&t.children(".user-nickname").first().trigger("click"),e.preventDefault()})},bindFormIntegrations:function(){p("body").on("click",".evf-integrations-panel",function(e){var t=p(this).attr("data-section");p(".evf-integrations-panel").removeClass("active"),p("#everest-forms-panel-integrations").find(".evf-panel-content-section").removeClass("active"),p(this).addClass("active"),p(this).parent().find(".everest-forms-active-connections").removeClass("active"),p(this).next(".everest-forms-active-connections").addClass("active");var i=p(this).siblings(".everest-forms-active-connections.active").find(".everest-forms-active-connections-list li");i.length&&i.children(".user-nickname").first().trigger("click"),p(".evf-panel-content-section-"+t).addClass("active"),e.preventDefault()}),p(".evf-setting-panel").eq(0).trigger("click")},bindFormPayment:function(){p("body").on("click",".evf-payments-panel",function(e){var t=p(this).attr("data-section");p(".evf-payments-panel").removeClass("active"),p(this).siblings().removeClass("icon active"),p(this).addClass("active"),p(this).parents("#everest-forms-panel-payments").find(".evf-payment-setting-content").removeClass("active").hide(),p(".evf-content-"+t+"-settings").addClass("active").show(),e.preventDefault()}),p(".evf-setting-panel").eq(0).trigger("click")},removeRow:function(e){p.each(e.find(".everest-forms-field"),function(){var e=p(this).attr("data-field-id"),t=p("#everest-forms-field-option-"+e);p(this).remove(),t.remove()}),e.remove()},bindRemoveRow:function(){p("body").on("click",".evf-delete-row",function(){var e=p(this),t=p(".evf-admin-row").length,i=e.closest(".evf-admin-row"),n=e.parents(".evf-admin-field-container").attr("data-current-part"),s=p("#everest-forms-builder").hasClass("multi-part-activated");n&&s&&(t=p("#part_"+n).find(".evf-admin-row").length),t<2?p.alert({title:m.i18n_row_locked,content:m.i18n_row_locked_msg,icon:"dashicons dashicons-info",type:"blue",buttons:{confirm:{text:m.i18n_close,btnClass:"btn-confirm",keys:["enter"]}}}):p.confirm({title:!1,content:m.i18n_delete_row_confirm,type:"red",closeIcon:!1,backgroundDismiss:!1,icon:"dashicons dashicons-warning",buttons:{confirm:{text:m.i18n_ok,btnClass:"btn-confirm",keys:["enter"],action:function(){u.removeRow(i)}},cancel:{text:m.i18n_cancel}}})})},bindAddNewRow:function(){p("body").on("click",".evf-add-row span",function(){var e=p(this),t=p(".evf-admin-field-wrapper"),i=p(".evf-admin-row").eq(0).clone(),n=e.parent().attr("data-total-rows"),s=e.parents(".evf-admin-field-container").attr("data-current-part");n++,s&&(t=p(".evf-admin-field-wrapper").find("#part_"+s)),i.find(".evf-admin-grid").html(""),i.attr("data-row-id",n),e.parent().attr("data-total-rows",n),t.append(i),u.bindFields(),u.checkEmptyGrid()})},bindCloneField:function(){p("body").on("click",".everest-forms-preview .everest-forms-field .everest-forms-field-duplicate",function(){var e=p(this).closest(".everest-forms-field");e.hasClass("no-duplicate")?p.alert({title:m.i18n_field_locked,content:m.i18n_field_locked_msg,icon:"dashicons dashicons-info",type:"blue",buttons:{confirm:{text:m.i18n_close,btnClass:"btn-confirm",keys:["enter"]}}}):p.confirm({title:!1,content:m.i18n_duplicate_field_confirm,type:"orange",closeIcon:!1,backgroundDismiss:!1,icon:"dashicons dashicons-warning",buttons:{confirm:{text:m.i18n_ok,btnClass:"btn-confirm",keys:["enter"],action:function(){u.cloneFieldAction(e)}},cancel:{text:m.i18n_cancel}}})})},cloneFieldAction:function(n){var s=n.attr("data-field-id"),e=m.form_id,t={action:"everest_forms_get_next_id",security:m.evf_get_next_id,form_id:e};p.ajax({url:m.ajax_url,data:t,type:"POST",beforeSend:function(){p(document.body).trigger("init_field_options_toggle")},success:function(e){if("boolean"==typeof e.success&&!0===e.success){var t=e.data.field_id,i=e.data.field_key;p("#everest-forms-field-id").val(t),u.render_node(n,s,i),p(document.body).trigger("init_field_options_toggle")}}})},render_node:function(e,s,o){var t=p(".everest-forms-field-options #everest-forms-field-option-"+s),i=p("#everest-forms-field-option-"+s+"-label").val(),n=p("#everest-forms-field-option-"+s+"-meta-key").length?p("#everest-forms-field-option-"+s+"-meta-key").val():"",a=e.attr("data-field-type"),r=t.html(),d=i+" "+m.i18n_copy,l="html"!==a?n.replace(/\(|\)/g,"").toLowerCase().substring(0,n.lastIndexOf("_"))+"_"+Math.floor(1e3+9e3*Math.random()):"",f=e.clone(),c=new RegExp(s,"g");r=r.replace(c,o);var v=p('<div class="everest-forms-field-option everest-forms-field-option-'+a+'" id="everest-forms-field-option-'+o+'" data-field-id="'+o+'" />');v.append(r),p.each(t.find(":input"),function(){var e=p(this).attr("type"),t=(p(this).attr("name")?p(this).attr("name"):"").replace(c,o),i="";if("text"===e||"hidden"===e)i=p(this).val(),v.find('input[name="'+t+'"]').val(i),v.find('input[value="'+s+'"]').val(o);else if("checkbox"===e||"radio"===e)p(this).is(":checked")?v.find('input[name="'+t+'"]').prop("checked",!0).attr("checked","checked"):v.find('[name="'+t+'"]').prop("checked",!1).attr("checked",!1);else if(p(this).is("select")){if(p(this).find("option:selected").length){var n=p(this).find("option:selected").val();v.find('[name="'+t+'"]').find('[value="'+n+'"]').prop("selected",!0)}}else""!==p(this).val()&&v.find('[name="'+t+'"]').val(p(this).val())}),p(".everest-forms-field-options").append(v),p("#everest-forms-field-option-"+o+"-label").val(d),p("#everest-forms-field-option-"+o+"-meta-key").val(l),f.attr("class",e.attr("class")),f.attr("id","everest-forms-field-"+o),f.attr("data-field-id",o),f.attr("data-field-type",a),f.find(".label-title .text").text(d),e.closest(".evf-admin-grid").find('[data-field-id="'+s+'"]').after(f),p(document).trigger("everest-form-cloned",[o,a]),u.switchToFieldOptionPanel(o)},bindFieldDelete:function(){p("body").on("click",".everest-forms-preview .everest-forms-field .everest-forms-field-delete",function(){var t=p(this).closest(".everest-forms-field"),e=t.attr("data-field-id"),i=p("#everest-forms-field-option-"+e);p(this).closest(".evf-admin-grid");t.hasClass("no-delete")?p.alert({title:m.i18n_field_locked,content:m.i18n_field_locked_msg,icon:"dashicons dashicons-info",type:"blue",buttons:{confirm:{text:m.i18n_close,btnClass:"btn-confirm",keys:["enter"]}}}):p.confirm({title:!1,content:m.i18n_delete_field_confirm,type:"red",closeIcon:!1,backgroundDismiss:!1,icon:"dashicons dashicons-warning",buttons:{confirm:{text:m.i18n_ok,btnClass:"btn-confirm",keys:["enter"],action:function(){p(".evf-panel-fields-button").trigger("click"),t.fadeOut("slow",function(){var e=t.attr("data-field-id");p(document.body).trigger("evf_before_field_deleted",[e]),t.remove(),i.remove(),u.checkEmptyGrid(),p(".everest-forms-fields-tab").find("a").removeClass("active"),p(".everest-forms-fields-tab").find("a").first().addClass("active"),p(".everest-forms-add-fields").show(),u.conditionalLogicRemoveField(e),u.conditionalLogicRemoveFieldIntegration(e),u.paymentFieldRemoveFromQuantity(e)})}},cancel:{text:m.i18n_cancel}}})})},bindSaveOption:function(){p("body").on("click",".everest-forms-save-button",function(){var t=p(this),e=p("form#everest-forms-builder-form"),i=u.getStructure(),n=e.serializeArray();if(""!==p("#evf-edit-form-name").val().trim()){e.triggerHandler("everest_forms_process_ajax_data",[t,n])&&(n=e.triggerHandler("everest_forms_process_ajax_data",[t,n])),p(".everest-forms-panel-content-wrap").block({message:null,overlayCSS:{background:"#fff",opacity:.6}});var s=[];p(".everest-forms-field[data-field-id]").each(function(){s.push(p(this).attr("data-field-id"))});for(var o=n.length;o--;)if(n[o].name.startsWith("form_fields")){var a=!1;s.forEach(function(e){n[o].name.startsWith("form_fields["+e+"]")&&(a=!0)}),-1<o&&!1===a&&n.splice(o,1)}var r=n.concat(i),d={action:"everest_forms_save_form",security:m.evf_save_form,form_data:JSON.stringify(r)};p.ajax({url:m.ajax_url,data:d,type:"POST",beforeSend:function(){t.addClass("processing"),t.find(".loading-dot").remove(),t.append('<span class="loading-dot"></span>')},success:function(e){t.removeClass("processing"),t.find(".loading-dot").remove(),e.success||p.alert({title:e.data.errorTitle,content:e.data.errorMessage,icon:"dashicons dashicons-warning",type:"red",buttons:{ok:{text:m.i18n_ok,btnClass:"btn-confirm",keys:["enter"]}}}),p(".everest-forms-panel-content-wrap").unblock()}})}else p.alert({title:m.i18n_field_title_empty,content:m.i18n_field_title_payload,icon:"dashicons dashicons-warning",type:"red",buttons:{ok:{text:m.i18n_ok,btnClass:"btn-confirm",keys:["enter"]}}})})},getStructure:function(){var e=p(".evf-admin-field-wrapper"),o=[];return p.each(e.find(".evf-admin-row"),function(){var e=p(this),s=e.attr("data-row-id");p.each(e.find(".evf-admin-grid"),function(){var e=p(this),i=e.attr("data-grid-id"),n=0;p.each(e.find(".everest-forms-field"),function(){var e={name:"",value:""},t=p(this).attr("data-field-id");e.name="structure[row_"+s+"][grid_"+i+"]["+n+"]",n++,e.value=t,o.push(e)}),e.find(".everest-forms-field").length<1&&o.push({name:"structure[row_"+s+"][grid_"+i+"]",value:""})})}),o},getFieldArray:function(e){var t=[];return p.each(e.find(".everest-forms-field"),function(){var e=p(this).attr("data-field-id");t.push(e)}),t},checkEmptyGrid:function(e){p.each(p(".evf-admin-grid"),function(){p(this).find(".everest-forms-field, .evf-registered-item:not(.ui-draggable-dragging)").not(".ui-sortable-helper").length<1?p(this).addClass("evf-empty-grid"):p(this).removeClass("evf-empty-grid")}),u.choicesInit()},bindDefaultTabs:function(){p(document).on("click",".evf-nav-tab-wrapper a",function(e){e.preventDefault(),u.switchTab(p(this).data("panel"))})},switchTab:function(e){var t=p("#everest-forms-panel-"+e),i=p(".evf-panel-"+e+"-button");p(".evf-nav-tab-wrapper").find("a").removeClass("nav-tab-active"),i.addClass("nav-tab-active"),t.closest(".evf-tab-content").find(".everest-forms-panel").removeClass("active"),t.addClass("active"),"integrations"!==e&&"payments"!==e||(t.find(".everest-forms-panel-sidebar a").hasClass("active")||t.find(".everest-forms-panel-sidebar a").first().addClass("active"),p(".everest-forms-panel-content").find(".evf-panel-content-section").hasClass("active")||p(".everest-forms-panel-content").find(".evf-panel-content-section").first().addClass("active")),history.replaceState({},null,u.updateQueryString("tab",e)),u.switchPanel(e)},updateQueryString:function(e,t,i){i=i||window.location.href;var n,s=new RegExp("([?&])"+e+"=.*?(&|#|$)(.*)","gi");if(s.test(i))return null!=t?i.replace(s,"$1"+e+"="+t+"$2$3"):(i=(n=i.split("#"))[0].replace(s,"$1$3").replace(/(&|\?)$/,""),"undefined"!=typeof n[1]&&null!==n[1]&&(i+="#"+n[1]),i);if(null==t)return i;var o=-1!==i.indexOf("?")?"&":"?";return i=(n=i.split("#"))[0]+o+e+"="+t,"undefined"!=typeof n[1]&&null!==n[1]&&(i+="#"+n[1]),i},switchPanel:function(e){"field-options"===e&&u.switchToFieldOptionPanel()},switchToFieldOptionPanel:function(e){p(".everest-forms-field-options").find(".no-fields").hide(),p(".evf-admin-field-wrapper .everest-forms-field").removeClass("active"),p("#everest-forms-panel-fields").addClass("active"),p(".everest-forms-fields-tab").find("a").removeClass("active"),p(".everest-forms-fields-tab").find("a").last().addClass("active"),p(".everest-forms-add-fields").hide(),p(".everest-forms-field-options").show(),p(".everest-forms-field-options").find(".everest-forms-field-option").hide(),p(".evf-tab-lists").find("li a").removeClass("active"),p(".evf-tab-lists").find("li.evf-panel-field-options-button a").addClass("active"),p(document.body).trigger("evf-init-switch-field-options"),void 0!==e?(p("#everest-forms-field-option-"+e).show(),p("#everest-forms-field-"+e).addClass("active")):0<p(".evf-admin-field-wrapper .everest-forms-field").length?(p(".evf-admin-field-wrapper .everest-forms-field").eq(0).addClass("active"),p("#everest-forms-field-option-"+p(".evf-admin-field-wrapper .everest-forms-field").eq(0).attr("data-field-id")).show()):p(".everest-forms-field-options").find(".no-fields").show()},bindFields:function(){p(".evf-admin-field-wrapper").sortable({items:".evf-admin-row",axis:"y",cursor:"move",opacity:.65,scrollSensitivity:40,forcePlaceholderSize:!0,placeholder:"evf-sortable-placeholder",containment:".everest-forms-panel-content",start:function(e,t){t.item.css({"background-color":"#f7fafc",border:"1px dashed #5d96ee"})},stop:function(e,t){t.item.removeAttr("style")}}).disableSelection(),p(".evf-admin-grid").sortable({items:"> .everest-forms-field",delay:100,opacity:.65,cursor:"move",scrollSensitivity:40,forcePlaceholderSize:!0,connectWith:".evf-admin-grid",containment:".everest-forms-field-wrap",out:function(e){p(".evf-admin-grid").removeClass("evf-hover"),p(e.target).removeClass("evf-item-hover"),p(e.target).closest(".evf-admin-row").removeClass("evf-hover"),u.checkEmptyGrid()},over:function(e,t){p(".evf-admin-grid").addClass("evf-hover"),p(e.target).addClass("evf-item-hover"),p(e.target).closest(".evf-admin-row").addClass("evf-hover"),u.checkEmptyGrid()},receive:function(e,t){t.sender.is("button")&&u.fieldDrop(t.helper)},stop:function(e,t){t.item.removeAttr("style"),u.checkEmptyGrid()}}).disableSelection(),p(".evf-registered-buttons button.evf-registered-item").draggable({delay:200,cancel:!1,scroll:!1,revert:"invalid",scrollSensitivity:40,forcePlaceholderSize:!0,helper:function(){return p(this).clone().insertAfter(p(this).closest(".everest-forms-tab-content").siblings(".everest-forms-fields-tab"))},opacity:.75,containment:"#everest-forms-builder",connectToSortable:".evf-admin-grid"}).disableSelection(),p(".evf-admin-row").on("mouseenter mouseleave",function(e){e.buttons<1&&("mouseenter"===e.type?p(this).addClass("evf-hover"):p(".evf-admin-row").removeClass("evf-hover"))}),p(".everest-forms-panel-content").on("scroll",function(){p(".evf-admin-grid").sortable("refreshPositions"),p(".evf-admin-field-wrapper").sortable("refreshPositions")})},fieldTabChoice:function(e){p(".everest-forms-tab-content").scrollTop(0),p(".everest-forms-fields-tab a").removeClass("active"),p(".everest-forms-field, .everest-forms-title-desc").removeClass("active"),p("#"+e).addClass("active"),"add-fields"===e?(p(".everest-forms-add-fields").show(),p(".everest-forms-field-options").hide()):("field-options"===e?(e=p(".everest-forms-field").first().data("field-id"),p(".everest-forms-field-options").show(),p(".everest-forms-field").first().addClass("active")):p("#everest-forms-field-"+e).addClass("active"),p(".everest-forms-field-option").hide(),p("#everest-forms-field-option-"+e).show(),p(".everest-forms-add-fields").hide())},bindFormPreview:function(){},bindGridSwitcher:function(){p("body").on("click",".evf-show-grid",function(e){e.stopPropagation(),u.checkEmptyGrid(),p(this).closest(".evf-toggle-row").find(".evf-toggle-row-content").stop(!0).slideToggle(200)}),p(document).click(function(){u.checkEmptyGrid(),p(".evf-show-grid").closest(".evf-toggle-row").find(".evf-toggle-row-content").stop(!0).slideUp(200)});p("body").on("click",".evf-grid-selector",function(){var e=p(this).closest(".evf-admin-row");if(!p(this).hasClass("active")){var t=parseInt(p(this).attr("data-evf-grid"),10);if(!(2<t)){var i=p('<div class="evf-admin-grid evf-grid-'+t+' ui-sortable evf-empty-grid" />'),n=p("<div/>");p.each(e.find(".evf-admin-grid"),function(){p(this).children("*").each(function(){n.append(p(this).clone())})}),e.find(".evf-admin-grid").remove(),e.find(".evf-clear ").remove(),e.append('<div class="clear evf-clear"></div>');for(var s=1;s<=t;s++)i.attr("data-grid-id",s),e.append(i.clone());e.append('<div class="clear evf-clear"></div>'),e.find(".evf-admin-grid").eq(0).append(n.html()),e.find(".evf-grid-selector").removeClass("active"),p(this).addClass("active"),u.bindFields()}}})},fieldDrop:function(r){var e=r.attr("data-field-type");r.css({left:"0",width:"100%"}).append('<i class="spinner is-active"></i>'),p.ajax({url:m.ajax_url,type:"POST",data:{action:"everest_forms_new_field_"+e,security:m.evf_field_drop_nonce,field_type:e,form_id:m.form_id},beforeSend:function(){p(document.body).trigger("init_field_options_toggle")},success:function(e){var t=e.data.preview,i=e.data.options,n=e.data.form_field_id,s=e.data.field.type,o=p(t).attr("id"),a=p(t).attr("data-field-id");p("#everest-forms-field-id").val(n),p(".everest-forms-field-options").find(".no-fields").hide(),p(".everest-forms-field-options").append(i),p(".everest-forms-field-option-row-icon_color input.colorpicker").wpColorPicker({change:function(e){var t=p(this),i=t.val(),n=t.closest(".everest-forms-field-option-row").data("field-id");p("#everest-forms-field-"+n+" .rating-icon svg").css("fill",i)}}),r.after(t),null!==p("#everest-forms-panel-field-settings-enable_survey")&&p("#everest-forms-panel-field-settings-enable_survey").prop("checked")&&p("#everest-forms-field-option-"+a+"-survey_status").prop("checked",!0),null!==p("#everest-forms-panel-field-settings-enable_quiz")&&p("#everest-forms-panel-field-settings-enable_quiz").prop("checked")&&(p("#everest-forms-field-option-"+a+"-quiz_status").prop("checked",!0),p("#everest-forms-field-option-"+a+"-quiz_status").closest(".everest-forms-field-option-row-quiz_status").siblings(".everst-forms-field-quiz-settings").removeClass("everest-forms-hidden").addClass("everest-forms-show")),r.remove(),u.checkEmptyGrid(),p(document.body).trigger("init_tooltips"),p(document.body).trigger("init_field_options_toggle"),p(document.body).trigger("evf_after_field_append",[o]),u.conditionalLogicAppendField(o),u.conditionalLogicAppendFieldIntegration(o),u.paymentFieldAppendToQuantity(o),u.paymentFieldAppendToDropdown(a,s)}})},conditionalLogicAppendField:function(a){var e=p("#"+a),r=e.index(),d=p(".evf-field-conditional-field-select"),l=e.attr("data-field-type"),f=e.attr("data-field-id"),c=e.find(".label-title .text ").text();p.fn.insertAt=function(e,t,i){var n=p.makeArray(this.children().clone(!0));n.splice(t,0,e),p.each(n,function(e,t){i===p(t)[0].value&&(p(t)[0].selected=!0,n[e]=t)}),this.empty().append(n)};var v=f;d.each(function(n,e){var t=p(e).val(),i=a.replace("everest-forms-field-",""),s=p(e).attr("name");if(i===s.substring(s.indexOf("[")+1,s.indexOf("]")))p(".evf-admin-row .evf-admin-grid .everest-forms-field").each(function(){var e=p(this).data("field-type"),t=p(this).data("field-id"),i=p(this).find(".label-title span").first().text();field_to_be_restricted=[],field_to_be_restricted=["html","title","address","image-upload","file-upload","date-time","hidden","scale-rating","likert"],-1===p.inArray(e,field_to_be_restricted)&&v!==t&&d.eq(n).append('<option class="evf-conditional-fields" data-field_type="'+e+'" data-field_id="'+t+'" value="'+t+'">'+i+"</option>")});else{var o='<option class="evf-conditional-fields" data-field_type="'+l+'" data-field_id="'+f+'" value="'+f+'">'+c+"</option>";"html"!==l&&"title"!==l&&"address"!==l&&"image-upload"!==l&&"file-upload"!==l&&"date-time"!==l&&"hidden"!==l&&"likert"!==l&&"scale-rating"!==l&&d.eq(n).insertAt(o,r,t)}})},paymentFieldAppendToQuantity:function(e){var t=p("#"+e),i=p(".everest-forms-field-option-row-map_field select"),n=t.attr("data-field-type"),s='<option value="'+t.attr("data-field-id")+'">'+t.find(".label-title .text ").text()+"</option>";"payment-single"!==n&&"payment-multiple"!==n&&"payment-checkbox"!==n||i.append(s)},paymentFieldAppendToDropdown:function(e,t){if("payment-quantity"===t){var i=p("#everest-forms-field-option-"+e+"-map_field");["payment-checkbox","payment-multiple","payment-single"].forEach(function(e){p(".everest-forms-field-"+e).each(function(){var e='<option value="'+p(this).attr("data-field-id")+'">'+p(this).find(".label-title .text").text()+"</option>";i.append(e)})})}},conditionalLogicAppendFieldIntegration:function(o){var a=p("#"+o),r=a.index(),d=p(".evf-provider-conditional").find(".evf-conditional-field-select"),l=a.attr("data-field-type"),f=a.attr("data-field-id"),c=a.find(".label-title .text ").text();p.fn.insertAt=function(e,t){var i=p.makeArray(this.children().clone(!0));i.splice(t,0,e),this.empty().append(i)},d.each(function(n,e){var t=o.replace("everest-forms-field-",""),i=p(e).attr("name");if(t===i.substring(i.indexOf("[")+1,i.indexOf("]")))p(".evf-admin-row .evf-admin-grid .everest-forms-field").each(function(){var e=p(this).data("field-type"),t=p(this).data("field-id"),i=p(this).find(".label-title span").first().text();field_to_be_restricted=[],field_to_be_restricted=["html","title","address","image-upload","file-upload","date-time","hidden","scale-rating","likert",a.attr("data-field-type")],-1===p.inArray(e,field_to_be_restricted)&&d.eq(n).append('<option class="evf-conditional-fields" data-field_type="'+e+'" data-field_id="'+t+'" value="'+t+'">'+i+"</option>")});else{var s='<option class="evf-conditional-fields" data-field_type="'+l+'" data-field_id="'+f+'" value="'+f+'">'+c+"</option>";"html"!==l&&"title"!==l&&"address"!==l&&"image-upload"!==l&&"file-upload"!==l&&"date-time"!==l&&"hidden"!==l&&"likert"!==l&&"scale-rating"!==l&&d.eq(n).insertAt(s,r)}})},conditionalLogicRemoveField:function(e){p(".evf-field-conditional-field-select option[value = "+e+" ]").remove()},conditionalLogicRemoveFieldIntegration:function(e){p(".evf-provider-conditional .evf-conditional-field-select option[value = "+e+" ]").remove()},paymentFieldRemoveFromQuantity:function(e){p(".everest-forms-field-option-row-map_field select option[value = "+e+" ]").remove()},bindFieldSettings:function(){p("body").on("click",".everest-forms-preview .everest-forms-field, .everest-forms-preview .everest-forms-field .everest-forms-field-setting",function(e){e.preventDefault();var t=p(this).closest(".everest-forms-field").attr("data-field-id");p(".everest-forms-tab-content").scrollTop(0),u.switchToFieldOptionPanel(t)})},toggleLabelEdit:function(e,t){p(e).toggleClass("everest-forms-hidden"),p(t).toggleClass("everest-forms-hidden"),p(t).is(":visible")&&p(t).focus()},bindToggleHandleActions:function(){p("body").on("click",".toggle-handle",function(e){var t=p(this).data("label"),i=p(this).data("input");p(i).is(":visible")||u.toggleLabelEdit(t,i)})},bindLabelEditInputActions:function(){p("body").on("focusout",".label-edit-input",function(e){var t=p(this).data("label");u.toggleLabelEdit(t,this)})},bindSyncedInputActions:function(){p("body").on("input",".sync-input",function(e){var t=p(this).val(),i=p(this).data("sync-targets");t&&i&&p(i).text(t)})}};p(function(){u.init()})}(jQuery,window.evf_data),jQuery(function(){"checked"!=jQuery("#everest-forms-panel-field-settingsemail-evf_send_confirmation_email").attr("checked")&&jQuery("#everest-forms-panel-field-settingsemail-evf_send_confirmation_email-wrap").nextAll().hide(),jQuery("#everest-forms-panel-field-settingsemail-evf_send_confirmation_email").on("change",function(){"checked"!=jQuery(this).attr("checked")?jQuery("#everest-forms-panel-field-settingsemail-evf_send_confirmation_email-wrap").nextAll().hide():jQuery("#everest-forms-panel-field-settingsemail-evf_send_confirmation_email-wrap").nextAll().show()});var e=jQuery("#everest-forms-panel-field-settings-redirect_to option:selected").val();"same"==e?(jQuery("#everest-forms-panel-field-settings-custom_page-wrap").hide(),jQuery("#everest-forms-panel-field-settings-external_url-wrap").hide()):"custom_page"==e?(jQuery("#everest-forms-panel-field-settings-custom_page-wrap").show(),jQuery("#everest-forms-panel-field-settings-external_url-wrap").hide()):"external_url"==e&&(jQuery("#everest-forms-panel-field-settings-external_url-wrap").show(),jQuery("#everest-forms-panel-field-settings-custom_page-wrap").hide()),jQuery("#everest-forms-panel-field-settings-redirect_to").on("change",function(){"same"==this.value?(jQuery("#everest-forms-panel-field-settings-custom_page-wrap").hide(),jQuery("#everest-forms-panel-field-settings-external_url-wrap").hide()):"custom_page"==this.value?(jQuery("#everest-forms-panel-field-settings-custom_page-wrap").show(),jQuery("#everest-forms-panel-field-settings-external_url-wrap").hide()):"external_url"==this.value&&(jQuery("#everest-forms-panel-field-settings-custom_page-wrap").hide(),jQuery("#everest-forms-panel-field-settings-external_url-wrap").show())}),jQuery(".evf-panel-field-options-button.evf-disabled-tab").hide()}),jQuery(function(f){f(document.body).on("init_add_fields_toogle",function(){f(".everest-forms-add-fields").on("click",".everest-forms-add-fields-group > a",function(e){e.preventDefault(),f(this).parent(".everest-forms-add-fields-group").toggleClass("closed").toggleClass("open")}),f(".everest-forms-add-fields").on("click",".everest-forms-add-fields-group a",function(){f(this).next(".evf-registered-buttons").stop().slideToggle()}),f(".everest-forms-add-fields-group.closed").each(function(){f(this).find(".evf-registered-buttons").hide()})}).trigger("init_add_fields_toogle"),f(document.body).on("init_field_options_toggle",function(){f(".everest-forms-field-option").on("click",".everest-forms-field-option-group > a",function(e){e.preventDefault(),f(this).parent(".everest-forms-field-option-group").toggleClass("closed").toggleClass("open")}),f(".everest-forms-field-option").on("click",".everest-forms-field-option-group a",function(e){f(e.target).filter(":input, option, .sort").length||f(this).next(".everest-forms-field-option-group-inner").stop().slideToggle()}),f(".everest-forms-field-option-group.closed").each(function(){f(this).find(".everest-forms-field-option-group-inner").hide()})}).trigger("init_field_options_toggle"),f(document).click(function(){f(".evf-smart-tag-lists").hide()}),f(document.body).on("click",".evf-toggle-smart-tag-display",function(e){e.stopPropagation(),f(".evf-smart-tag-lists").hide(),f(".evf-smart-tag-lists ul").empty(),f(this).parent().find(".evf-smart-tag-lists").toggle("show");var t=f(this).data("type");!function l(s,e,t){var o=[],a=[],r=[];if(f(".evf-admin-row .evf-admin-grid .everest-forms-field").each(function(){var e=f(this).data("field-type"),t=f(this).data("field-id");if(s===e){var i=f(this).find(".label-title span").first().text();r[t]=i}else{var n=f(this).find(".label-title span").first().text();o[t]=n}a[t]=f(this).find(".label-title span").first().text()}),"other"===e||"all"===e){var i=evf_data.smart_tags_other;for(var n in i)f(t).parent().find(".evf-smart-tag-lists .evf-others").append('<li class = "smart-tag-field" data-type="other" data-field_id="'+n+'">'+i[n]+"</li>")}if("fields"===e||"all"===e)if("email"===s)for(var n in Object.keys(r).length<1?f(t).parent().find('.evf-smart-tag-lists .smart-tag-title:not(".other-tag-title")').addClass("everest-forms-hidden"):f(t).parent().find('.evf-smart-tag-lists .smart-tag-title:not(".other-tag-title")').removeClass("everest-forms-hidden"),f(t).parent().find(".evf-smart-tag-lists .other-tag-title").remove(),f(t).parent().find(".evf-smart-tag-lists .evf-others").remove(),f(t).parent().find(".evf-smart-tag-lists").append('<div class="smart-tag-title other-tag-title">Others</div><ul class="evf-others"></ul>'),f(t).parent().find(".evf-smart-tag-lists .evf-others").append('<li class="smart-tag-field" data-type="other" data-field_id="admin_email">Site Admin Email</li><li class="smart-tag-field" data-type="other" data-field_id="user_email">User Email</li>'),r)f(t).parent().find(".evf-smart-tag-lists .evf-fields").append('<li class = "smart-tag-field" data-type="field" data-field_id="'+n+'">'+r[n]+"</li>");else for(var d in Object.keys(a).length<1?f(t).parent().find('.evf-smart-tag-lists .smart-tag-title:not(".other-tag-title")').addClass("everest-forms-hidden"):f(t).parent().find('.evf-smart-tag-lists .smart-tag-title:not(".other-tag-title")').removeClass("everest-forms-hidden"),a)f(t).parent().find(".evf-smart-tag-lists .evf-fields").append('<li class = "smart-tag-field" data-type="field" data-field_id="'+d+'">'+a[d]+"</li>")}(f(this).data("fields"),t,f(this))}),f(document.body).on("change",".everest-forms-toggle-form input",function(e){e.stopPropagation(),f.post(evf_data.ajax_url,{action:"everest_forms_enabled_form",security:evf_data.evf_enabled_form,form_id:f(this).data("form_id"),enabled:f(this).attr("checked")?1:0})}),f(document.body).on("click",".smart-tag-field",function(e){var t=f(this).data("field_id"),i=f(this).text(),n=f(this).data("type"),s=f(this).parent().parent().parent(),o=s.find("input[type=text]"),a=s.find("textarea");if("fullname"!==t&&"email"!==t&&"subject"!==t&&"message"!==t&&"other"!==n){i=i.split(/[\s-_]/);for(var r=0;r<i.length;r++)i[r]=0===r?i[r].charAt(0).toLowerCase()+i[r].substr(1):i[r].charAt(0).toUpperCase()+i[r].substr(1);t=(i=i.join(""))+"_"+t}else t=t;"field"===n?(o.val(o.val()+'{field_id="'+t+'"}'),a.val(a.val()+'{field_id="'+t+'"}')):"other"===n&&(o.val(o.val()+"{"+t+"}"),a.val(a.val()+"{"+t+"}"))}),f(document).on("change",".evf-content-email-settings .evf-toggle-switch input",function(e){var t=f(this),i=t.prop("checked");!1===i?(f(this).closest("#everest-forms-panel-settings").find(".everest-forms-active-email").addClass("everest-forms-hidden"),t.closest(".evf-content-email-settings").find(".email-disable-message").remove(),t.closest(".evf-content-section-title").siblings(".evf-content-email-settings-inner").addClass("everest-forms-hidden"),f('<p class="email-disable-message everest-forms-notice everest-forms-notice-info">'+evf_data.i18n_email_disable_message+"</p>").insertAfter(t.closest(".evf-content-section-title"))):!0===i&&(f(this).closest("#everest-forms-panel-settings").find(".everest-forms-active-email").removeClass("everest-forms-hidden"),t.closest(".evf-content-section-title").siblings(".evf-content-email-settings-inner").removeClass("everest-forms-hidden"),t.closest(".evf-content-email-settings").find(".email-disable-message").remove())}),f(document).on("click",".everest-forms-min-max-date-format input",function(){f(this).is(":checked")?f(".everest-forms-min-max-date-option").removeClass("everest-forms-hidden"):f(".everest-forms-min-max-date-option").addClass("everest-forms-hidden")})});
assets/js/frontend/ajax-submission.js CHANGED
@@ -54,6 +54,7 @@ jQuery( function( $ ) {
54
  })
55
  .done( function ( xhr, textStatus, errorThrown ) {
56
  if ( 'undefined' !== typeof xhr.data.redirect_url ) {
 
57
  window.location = xhr.data.redirect_url;
58
  return;
59
  }
54
  })
55
  .done( function ( xhr, textStatus, errorThrown ) {
56
  if ( 'undefined' !== typeof xhr.data.redirect_url ) {
57
+ formTuple.trigger( 'reset' );
58
  window.location = xhr.data.redirect_url;
59
  return;
60
  }
assets/js/frontend/ajax-submission.min.js CHANGED
@@ -1 +1 @@
1
- jQuery(function(d){"use strict";d('form[data-ajax_submission="1"]').each(function(e,s){d(document).ready(function(){var n=d(s),f=n.find(".evf-submit");0<n.find("[data-gateway*='stripe']:visible").length||f.on("click",function(e){var s=n.serializeArray();e.preventDefault(),n.trigger("focusout").trigger("change").trigger("submit");var r=n.find(".evf-error:visible");0<r.length?d([document.documentElement,document.body]).animate({scrollTop:r.last().offset().top},800):(d(this).html(n.data("process-text")),s.push({name:"action",value:"everest_forms_ajax_form_submission"}),s.push({name:"security",value:everest_forms_ajax_submission_params.evf_ajax_submission}),d.ajax({url:everest_forms_ajax_submission_params.ajax_url,type:"POST",data:s}).done(function(e,s,r){if("undefined"==typeof e.data.redirect_url)if("success"===e.data.response||!0===e.success)n.trigger("reset"),n.closest(".everest-forms").html('<div class="everest-forms-notice everest-forms-notice--success" role="alert">'+e.data.message+"</div>").focus();else{var i=n.data("formid"),t=everest_forms_ajax_submission_params.error,a=JSON.parse(r.responseText),o=a.data.error;"string"==typeof a.data.message&&(t=a.data.message),n.closest(".everest-forms").find(".everest-forms-notice").remove(),n.closest(".everest-forms").prepend('<div class="everest-forms-notice everest-forms-notice--error" role="alert">'+t+"</div>").focus(),d(o).each(function(e,s){var t,a=Object.values(s)[0],r=!0;switch(Object.keys(s)[0]){case"signature":t=d("#evf-signature-img-input-"+a);break;case"likert":r=!1,(t=d('[id^="everest_forms-'+i+"-field_"+a+'_"]')).each(function(e,s){var r=d(s).closest("tr.evf-"+i+"-field_"+a).find("th"),t="everest_forms[form_fields]["+a+"]["+(parseInt(r.closest("tr").index())+1)+"]";r.children().is("label")?r.children().find("#"+t).show():r.append('<label id="'+t+'" for="'+t+'" class="evf-error">'+everest_forms_ajax_submission_params.required+"</label>")});break;case"address":(t=d('[id^="evf-'+i+"-field_"+a+'"]')).each(function(e,s){var r=String(d(s).attr("id"));r.includes("-container")||r.includes("-address2")?t.splice(e,1):void 0!==d(s).val()&&t.splice(e,1)});break;default:t=d("#evf-"+i+"-field_"+a)}t.addClass("evf-error"),t.attr("required",!0),t.attr("aria-invalid",!0),t.first().closest(".evf-field").addClass("everest-forms-invalid evf-has-error"),!0!==r||t.is("label")||t.after('<label id="'+t.attr("id")+'-error" class="evf-error" for="'+t.attr("id")+'">'+everest_forms_ajax_submission_params.required+"</label>").show()}),f.attr("disabled",!1).html(everest_forms_ajax_submission_params.submit)}else window.location=e.data.redirect_url}).fail(function(){f.attr("disabled",!1).html(everest_forms_ajax_submission_params.submit),n.trigger("focusout").trigger("change"),n.closest(".everest-forms").find(".everest-forms-notice").remove(),n.closest(".everest-forms").prepend('<div class="everest-forms-notice everest-forms-notice--error" role="alert">'+everest_forms_ajax_submission_params.error+"</div>").focus()}).always(function(e){"undefined"==typeof e.data.redirect_url&&d([document.documentElement,document.body]).animate({scrollTop:d(".everest-forms-notice").offset().top},800)}))})})})});
1
+ jQuery(function(d){"use strict";d('form[data-ajax_submission="1"]').each(function(e,s){d(document).ready(function(){var n=d(s),f=n.find(".evf-submit");0<n.find("[data-gateway*='stripe']:visible").length||f.on("click",function(e){var s=n.serializeArray();e.preventDefault(),n.trigger("focusout").trigger("change").trigger("submit");var r=n.find(".evf-error:visible");0<r.length?d([document.documentElement,document.body]).animate({scrollTop:r.last().offset().top},800):(d(this).html(n.data("process-text")),s.push({name:"action",value:"everest_forms_ajax_form_submission"}),s.push({name:"security",value:everest_forms_ajax_submission_params.evf_ajax_submission}),d.ajax({url:everest_forms_ajax_submission_params.ajax_url,type:"POST",data:s}).done(function(e,s,r){if("undefined"!=typeof e.data.redirect_url)return n.trigger("reset"),void(window.location=e.data.redirect_url);if("success"===e.data.response||!0===e.success)n.trigger("reset"),n.closest(".everest-forms").html('<div class="everest-forms-notice everest-forms-notice--success" role="alert">'+e.data.message+"</div>").focus();else{var i=n.data("formid"),t=everest_forms_ajax_submission_params.error,a=JSON.parse(r.responseText),o=a.data.error;"string"==typeof a.data.message&&(t=a.data.message),n.closest(".everest-forms").find(".everest-forms-notice").remove(),n.closest(".everest-forms").prepend('<div class="everest-forms-notice everest-forms-notice--error" role="alert">'+t+"</div>").focus(),d(o).each(function(e,s){var t,a=Object.values(s)[0],r=!0;switch(Object.keys(s)[0]){case"signature":t=d("#evf-signature-img-input-"+a);break;case"likert":r=!1,(t=d('[id^="everest_forms-'+i+"-field_"+a+'_"]')).each(function(e,s){var r=d(s).closest("tr.evf-"+i+"-field_"+a).find("th"),t="everest_forms[form_fields]["+a+"]["+(parseInt(r.closest("tr").index())+1)+"]";r.children().is("label")?r.children().find("#"+t).show():r.append('<label id="'+t+'" for="'+t+'" class="evf-error">'+everest_forms_ajax_submission_params.required+"</label>")});break;case"address":(t=d('[id^="evf-'+i+"-field_"+a+'"]')).each(function(e,s){var r=String(d(s).attr("id"));r.includes("-container")||r.includes("-address2")?t.splice(e,1):void 0!==d(s).val()&&t.splice(e,1)});break;default:t=d("#evf-"+i+"-field_"+a)}t.addClass("evf-error"),t.attr("required",!0),t.attr("aria-invalid",!0),t.first().closest(".evf-field").addClass("everest-forms-invalid evf-has-error"),!0!==r||t.is("label")||t.after('<label id="'+t.attr("id")+'-error" class="evf-error" for="'+t.attr("id")+'">'+everest_forms_ajax_submission_params.required+"</label>").show()}),f.attr("disabled",!1).html(everest_forms_ajax_submission_params.submit)}}).fail(function(){f.attr("disabled",!1).html(everest_forms_ajax_submission_params.submit),n.trigger("focusout").trigger("change"),n.closest(".everest-forms").find(".everest-forms-notice").remove(),n.closest(".everest-forms").prepend('<div class="everest-forms-notice everest-forms-notice--error" role="alert">'+everest_forms_ajax_submission_params.error+"</div>").focus()}).always(function(e){"undefined"==typeof e.data.redirect_url&&d([document.documentElement,document.body]).animate({scrollTop:d(".everest-forms-notice").offset().top},800)}))})})})});
bin/post-merge.sh ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/bash
2
+
3
+ changedFiles="$(git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD)"
4
+
5
+ runOnChange() {
6
+ echo "$changedFiles" | grep -q "$1" && eval "$2"
7
+ }
8
+
9
+ runOnChange "package-lock.json" "npm install"
10
+ runOnChange "composer.lock" "composer install"
everest-forms.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Everest Forms
4
  * Plugin URI: https://wpeverest.com/wordpress-plugins/everest-forms/
5
  * Description: Drag and Drop contact form builder to easily create simple to complex forms for any purpose. Lightweight, Beautiful design, responsive and more.
6
- * Version: 1.6.1
7
  * Author: WPEverest
8
  * Author URI: https://wpeverest.com
9
  * Text Domain: everest-forms
3
  * Plugin Name: Everest Forms
4
  * Plugin URI: https://wpeverest.com/wordpress-plugins/everest-forms/
5
  * Description: Drag and Drop contact form builder to easily create simple to complex forms for any purpose. Lightweight, Beautiful design, responsive and more.
6
+ * Version: 1.6.2
7
  * Author: WPEverest
8
  * Author URI: https://wpeverest.com
9
  * Text Domain: everest-forms
includes/abstracts/class-evf-deprecated-hooks.php CHANGED
@@ -33,7 +33,7 @@ abstract class EVF_Deprecated_Hooks {
33
  * Constructor.
34
  */
35
  public function __construct() {
36
- $fields = EVF()->form_fields->get_form_field_types();
37
 
38
  // Adapt dynamic fields hook deprecation with version support.
39
  foreach ( $this->deprecated_hooks as $new_hook => $old_hook ) {
33
  * Constructor.
34
  */
35
  public function __construct() {
36
+ $fields = evf()->form_fields->get_form_field_types();
37
 
38
  // Adapt dynamic fields hook deprecation with version support.
39
  foreach ( $this->deprecated_hooks as $new_hook => $old_hook ) {
includes/abstracts/class-evf-form-fields.php CHANGED
@@ -651,7 +651,9 @@ abstract class EVF_Form_Fields {
651
  }
652
  break;
653
 
654
- // Code Block. ----------------------------------------------------//
 
 
655
  case 'code':
656
  $value = ! empty( $field['code'] ) ? esc_attr( $field['code'] ) : '';
657
  $tooltip = esc_html__( 'Enter code for the form field.', 'everest-forms' );
@@ -1184,7 +1186,7 @@ abstract class EVF_Form_Fields {
1184
  foreach ( $values as $value ) {
1185
  $default = isset( $value['default'] ) ? $value['default'] : '';
1186
  $selected = checked( '1', $default, false );
1187
- $placeholder = EVF()->plugin_url() . '/assets/images/everest-forms-placeholder.png';
1188
  $image_src = ! empty( $value['image'] ) ? esc_url( $value['image'] ) : $placeholder;
1189
  $item_class = array();
1190
 
@@ -1250,7 +1252,7 @@ abstract class EVF_Form_Fields {
1250
  // Grab field data.
1251
  $field_args = ! empty( $_POST['defaults'] ) ? (array) wp_unslash( $_POST['defaults'] ) : array(); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
1252
  $field_type = esc_attr( wp_unslash( $_POST['field_type'] ) ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
1253
- $field_id = EVF()->form->field_unique_key( wp_unslash( $_POST['form_id'] ) ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
1254
  $field = array(
1255
  'id' => $field_id,
1256
  'type' => $field_type,
@@ -1383,7 +1385,7 @@ abstract class EVF_Form_Fields {
1383
 
1384
  // Basic required check - If field is marked as required, check for entry data.
1385
  if ( false !== $required_field && '1' !== $conditional_status && ( empty( $field_submit ) && '0' !== $field_submit ) ) {
1386
- EVF()->task->errors[ $form_data['id'] ][ $field_id ] = evf_get_required_label();
1387
  update_option( 'evf_validation_error', 'yes' );
1388
  }
1389
 
@@ -1412,7 +1414,7 @@ abstract class EVF_Form_Fields {
1412
  }
1413
 
1414
  if ( isset( $validation_text ) ) {
1415
- EVF()->task->errors[ $form_data['id'] ][ $field_id ] = apply_filters( 'everest_forms_type_validation', $validation_text );
1416
  update_option( 'evf_validation_error', 'yes' );
1417
  }
1418
  }
@@ -1438,7 +1440,7 @@ abstract class EVF_Form_Fields {
1438
  // Sanitize but keep line breaks.
1439
  $value = evf_sanitize_textarea_field( $field_submit );
1440
 
1441
- EVF()->task->form_fields[ $field_id ] = array(
1442
  'name' => $name,
1443
  'value' => $value,
1444
  'id' => $field_id,
651
  }
652
  break;
653
 
654
+ /*
655
+ * Code Block.
656
+ */
657
  case 'code':
658
  $value = ! empty( $field['code'] ) ? esc_attr( $field['code'] ) : '';
659
  $tooltip = esc_html__( 'Enter code for the form field.', 'everest-forms' );
1186
  foreach ( $values as $value ) {
1187
  $default = isset( $value['default'] ) ? $value['default'] : '';
1188
  $selected = checked( '1', $default, false );
1189
+ $placeholder = evf()->plugin_url() . '/assets/images/everest-forms-placeholder.png';
1190
  $image_src = ! empty( $value['image'] ) ? esc_url( $value['image'] ) : $placeholder;
1191
  $item_class = array();
1192
 
1252
  // Grab field data.
1253
  $field_args = ! empty( $_POST['defaults'] ) ? (array) wp_unslash( $_POST['defaults'] ) : array(); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
1254
  $field_type = esc_attr( wp_unslash( $_POST['field_type'] ) ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
1255
+ $field_id = evf()->form->field_unique_key( wp_unslash( $_POST['form_id'] ) ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
1256
  $field = array(
1257
  'id' => $field_id,
1258
  'type' => $field_type,
1385
 
1386
  // Basic required check - If field is marked as required, check for entry data.
1387
  if ( false !== $required_field && '1' !== $conditional_status && ( empty( $field_submit ) && '0' !== $field_submit ) ) {
1388
+ evf()->task->errors[ $form_data['id'] ][ $field_id ] = evf_get_required_label();
1389
  update_option( 'evf_validation_error', 'yes' );
1390
  }
1391
 
1414
  }
1415
 
1416
  if ( isset( $validation_text ) ) {
1417
+ evf()->task->errors[ $form_data['id'] ][ $field_id ] = apply_filters( 'everest_forms_type_validation', $validation_text );
1418
  update_option( 'evf_validation_error', 'yes' );
1419
  }
1420
  }
1440
  // Sanitize but keep line breaks.
1441
  $value = evf_sanitize_textarea_field( $field_submit );
1442
 
1443
+ evf()->task->form_fields[ $field_id ] = array(
1444
  'name' => $name,
1445
  'value' => $value,
1446
  'id' => $field_id,
includes/abstracts/class-evf-log-handler.php CHANGED
@@ -20,7 +20,7 @@ abstract class EVF_Log_Handler implements EVF_Log_Handler_Interface {
20
  * @return string Formatted time for use in log entry.
21
  */
22
  protected static function format_time( $timestamp ) {
23
- return date( 'c', $timestamp );
24
  }
25
 
26
  /**
@@ -37,11 +37,15 @@ abstract class EVF_Log_Handler implements EVF_Log_Handler_Interface {
37
  $level_string = strtoupper( $level );
38
  $entry = "{$time_string} {$level_string} {$message}";
39
 
40
- return apply_filters( 'everest_forms_format_log_entry', $entry, array(
41
- 'timestamp' => $timestamp,
42
- 'level' => $level,
43
- 'message' => $message,
44
- 'context' => $context,
45
- ) );
 
 
 
 
46
  }
47
  }
20
  * @return string Formatted time for use in log entry.
21
  */
22
  protected static function format_time( $timestamp ) {
23
+ return date( 'c', $timestamp ); // phpcs:ignore WordPress.DateTime.RestrictedFunctions
24
  }
25
 
26
  /**
37
  $level_string = strtoupper( $level );
38
  $entry = "{$time_string} {$level_string} {$message}";
39
 
40
+ return apply_filters(
41
+ 'everest_forms_format_log_entry',
42
+ $entry,
43
+ array(
44
+ 'timestamp' => $timestamp,
45
+ 'level' => $level,
46
+ 'message' => $message,
47
+ 'context' => $context,
48
+ )
49
+ );
50
  }
51
  }
includes/abstracts/class-evf-settings-api.php CHANGED
@@ -83,7 +83,7 @@ abstract class EVF_Settings_API {
83
  * Output the admin options table.
84
  */
85
  public function admin_options() {
86
- echo '<table class="form-table">' . $this->generate_settings_html( $this->get_form_fields(), false ) . '</table>'; // WPCS: XSS ok.
87
  }
88
 
89
  /**
@@ -131,7 +131,7 @@ abstract class EVF_Settings_API {
131
  public function get_field_value( $key, $field, $post_data = array() ) {
132
  $type = $this->get_field_type( $field );
133
  $field_key = $this->get_field_key( $key );
134
- $post_data = empty( $post_data ) ? $_POST : $post_data; // WPCS: CSRF ok, input var ok.
135
  $value = isset( $post_data[ $field_key ] ) ? $post_data[ $field_key ] : null;
136
 
137
  if ( isset( $field['sanitize_callback'] ) && is_callable( $field['sanitize_callback'] ) ) {
@@ -170,7 +170,7 @@ abstract class EVF_Settings_API {
170
  if ( ! empty( $this->data ) && is_array( $this->data ) ) {
171
  return $this->data;
172
  }
173
- return $_POST; // WPCS: CSRF ok, input var ok.
174
  }
175
 
176
  /**
@@ -326,7 +326,7 @@ abstract class EVF_Settings_API {
326
  }
327
 
328
  if ( $echo ) {
329
- echo $html; // WPCS: XSS ok.
330
  } else {
331
  return $html;
332
  }
@@ -415,13 +415,13 @@ abstract class EVF_Settings_API {
415
  ?>
416
  <tr valign="top">
417
  <th scope="row" class="titledesc">
418
- <label for="<?php echo esc_attr( $field_key ); ?>"><?php echo wp_kses_post( $data['title'] ); ?> <?php echo $this->get_tooltip_html( $data ); // WPCS: XSS ok. ?></label>
419
  </th>
420
  <td class="forminp">
421
  <fieldset>
422
  <legend class="screen-reader-text"><span><?php echo wp_kses_post( $data['title'] ); ?></span></legend>
423
- <input class="input-text regular-input <?php echo esc_attr( $data['class'] ); ?>" type="<?php echo esc_attr( $data['type'] ); ?>" name="<?php echo esc_attr( $field_key ); ?>" id="<?php echo esc_attr( $field_key ); ?>" style="<?php echo esc_attr( $data['css'] ); ?>" value="<?php echo esc_attr( $this->get_option( $key ) ); ?>" placeholder="<?php echo esc_attr( $data['placeholder'] ); ?>" <?php disabled( $data['disabled'], true ); ?> <?php echo $this->get_custom_attribute_html( $data ); // WPCS: XSS ok. ?> />
424
- <?php echo $this->get_description_html( $data ); // WPCS: XSS ok. ?>
425
  </fieldset>
426
  </td>
427
  </tr>
@@ -468,15 +468,15 @@ abstract class EVF_Settings_API {
468
  ?>
469
  <tr valign="top">
470
  <th scope="row" class="titledesc">
471
- <label for="<?php echo esc_attr( $field_key ); ?>"><?php echo wp_kses_post( $data['title'] ); ?> <?php echo $this->get_tooltip_html( $data ); // WPCS: XSS ok. ?></label>
472
  </th>
473
  <td class="forminp">
474
  <fieldset>
475
  <legend class="screen-reader-text"><span><?php echo wp_kses_post( $data['title'] ); ?></span></legend>
476
  <span class="colorpickpreview" style="background:<?php echo esc_attr( $this->get_option( $key ) ); ?>;">&nbsp;</span>
477
- <input class="colorpick <?php echo esc_attr( $data['class'] ); ?>" type="text" name="<?php echo esc_attr( $field_key ); ?>" id="<?php echo esc_attr( $field_key ); ?>" style="<?php echo esc_attr( $data['css'] ); ?>" value="<?php echo esc_attr( $this->get_option( $key ) ); ?>" placeholder="<?php echo esc_attr( $data['placeholder'] ); ?>" <?php disabled( $data['disabled'], true ); ?> <?php echo $this->get_custom_attribute_html( $data ); // WPCS: XSS ok. ?> />
478
  <div id="colorPickerDiv_<?php echo esc_attr( $field_key ); ?>" class="colorpickdiv" style="z-index: 100; background: #eee; border: 1px solid #ccc; position: absolute; display: none;"></div>
479
- <?php echo $this->get_description_html( $data ); // WPCS: XSS ok. ?>
480
  </fieldset>
481
  </td>
482
  </tr>
@@ -512,13 +512,13 @@ abstract class EVF_Settings_API {
512
  ?>
513
  <tr valign="top">
514
  <th scope="row" class="titledesc">
515
- <label for="<?php echo esc_attr( $field_key ); ?>"><?php echo wp_kses_post( $data['title'] ); ?> <?php echo $this->get_tooltip_html( $data ); // WPCS: XSS ok. ?></label>
516
  </th>
517
  <td class="forminp">
518
  <fieldset>
519
  <legend class="screen-reader-text"><span><?php echo wp_kses_post( $data['title'] ); ?></span></legend>
520
- <textarea rows="3" cols="20" class="input-text wide-input <?php echo esc_attr( $data['class'] ); ?>" type="<?php echo esc_attr( $data['type'] ); ?>" name="<?php echo esc_attr( $field_key ); ?>" id="<?php echo esc_attr( $field_key ); ?>" style="<?php echo esc_attr( $data['css'] ); ?>" placeholder="<?php echo esc_attr( $data['placeholder'] ); ?>" <?php disabled( $data['disabled'], true ); ?> <?php echo $this->get_custom_attribute_html( $data ); // WPCS: XSS ok. ?>><?php echo esc_textarea( $this->get_option( $key ) ); ?></textarea>
521
- <?php echo $this->get_description_html( $data ); // WPCS: XSS ok. ?>
522
  </fieldset>
523
  </td>
524
  </tr>
@@ -558,14 +558,14 @@ abstract class EVF_Settings_API {
558
  ?>
559
  <tr valign="top">
560
  <th scope="row" class="titledesc">
561
- <label for="<?php echo esc_attr( $field_key ); ?>"><?php echo wp_kses_post( $data['title'] ); ?> <?php echo $this->get_tooltip_html( $data ); // WPCS: XSS ok. ?></label>
562
  </th>
563
  <td class="forminp">
564
  <fieldset>
565
  <legend class="screen-reader-text"><span><?php echo wp_kses_post( $data['title'] ); ?></span></legend>
566
  <label for="<?php echo esc_attr( $field_key ); ?>">
567
- <input <?php disabled( $data['disabled'], true ); ?> class="<?php echo esc_attr( $data['class'] ); ?>" type="checkbox" name="<?php echo esc_attr( $field_key ); ?>" id="<?php echo esc_attr( $field_key ); ?>" style="<?php echo esc_attr( $data['css'] ); ?>" value="1" <?php checked( $this->get_option( $key ), 'yes' ); ?> <?php echo $this->get_custom_attribute_html( $data ); // WPCS: XSS ok. ?> /> <?php echo wp_kses_post( $data['label'] ); ?></label><br/>
568
- <?php echo $this->get_description_html( $data ); // WPCS: XSS ok. ?>
569
  </fieldset>
570
  </td>
571
  </tr>
@@ -602,17 +602,17 @@ abstract class EVF_Settings_API {
602
  ?>
603
  <tr valign="top">
604
  <th scope="row" class="titledesc">
605
- <label for="<?php echo esc_attr( $field_key ); ?>"><?php echo wp_kses_post( $data['title'] ); ?> <?php echo $this->get_tooltip_html( $data ); // WPCS: XSS ok. ?></label>
606
  </th>
607
  <td class="forminp">
608
  <fieldset>
609
  <legend class="screen-reader-text"><span><?php echo wp_kses_post( $data['title'] ); ?></span></legend>
610
- <select class="select <?php echo esc_attr( $data['class'] ); ?>" name="<?php echo esc_attr( $field_key ); ?>" id="<?php echo esc_attr( $field_key ); ?>" style="<?php echo esc_attr( $data['css'] ); ?>" <?php disabled( $data['disabled'], true ); ?> <?php echo $this->get_custom_attribute_html( $data ); // WPCS: XSS ok. ?>>
611
  <?php foreach ( (array) $data['options'] as $option_key => $option_value ) : ?>
612
  <option value="<?php echo esc_attr( $option_key ); ?>" <?php selected( $option_key, esc_attr( $this->get_option( $key ) ) ); ?>><?php echo esc_attr( $option_value ); ?></option>
613
  <?php endforeach; ?>
614
  </select>
615
- <?php echo $this->get_description_html( $data ); // WPCS: XSS ok. ?>
616
  </fieldset>
617
  </td>
618
  </tr>
@@ -651,12 +651,12 @@ abstract class EVF_Settings_API {
651
  ?>
652
  <tr valign="top">
653
  <th scope="row" class="titledesc">
654
- <label for="<?php echo esc_attr( $field_key ); ?>"><?php echo wp_kses_post( $data['title'] ); ?> <?php echo $this->get_tooltip_html( $data ); // WPCS: XSS ok. ?></label>
655
  </th>
656
  <td class="forminp">
657
  <fieldset>
658
  <legend class="screen-reader-text"><span><?php echo wp_kses_post( $data['title'] ); ?></span></legend>
659
- <select multiple="multiple" class="multiselect <?php echo esc_attr( $data['class'] ); ?>" name="<?php echo esc_attr( $field_key ); ?>[]" id="<?php echo esc_attr( $field_key ); ?>" style="<?php echo esc_attr( $data['css'] ); ?>" <?php disabled( $data['disabled'], true ); ?> <?php echo $this->get_custom_attribute_html( $data ); // WPCS: XSS ok. ?>>
660
  <?php foreach ( (array) $data['options'] as $option_key => $option_value ) : ?>
661
  <?php if ( is_array( $option_value ) ) : ?>
662
  <optgroup label="<?php echo esc_attr( $option_key ); ?>">
@@ -669,7 +669,7 @@ abstract class EVF_Settings_API {
669
  <?php endif; ?>
670
  <?php endforeach; ?>
671
  </select>
672
- <?php echo $this->get_description_html( $data ); // WPCS: XSS ok. ?>
673
  <?php if ( $data['select_buttons'] ) : ?>
674
  <br/><a class="select_all button" href="#"><?php esc_html_e( 'Select all', 'everest-forms' ); ?></a> <a class="select_none button" href="#"><?php esc_html_e( 'Select none', 'everest-forms' ); ?></a>
675
  <?php endif; ?>
@@ -745,7 +745,8 @@ abstract class EVF_Settings_API {
745
  */
746
  public function validate_textarea_field( $key, $value ) {
747
  $value = is_null( $value ) ? '' : $value;
748
- return wp_kses( trim( stripslashes( $value ) ),
 
749
  array_merge(
750
  array(
751
  'iframe' => array(
83
  * Output the admin options table.
84
  */
85
  public function admin_options() {
86
+ echo '<table class="form-table">' . $this->generate_settings_html( $this->get_form_fields(), false ) . '</table>'; // phpcs:ignore WordPress.Security.EscapeOutput
87
  }
88
 
89
  /**
131
  public function get_field_value( $key, $field, $post_data = array() ) {
132
  $type = $this->get_field_type( $field );
133
  $field_key = $this->get_field_key( $key );
134
+ $post_data = empty( $post_data ) ? $_POST : $post_data; // phpcs:ignore WordPress.Security.NonceVerification
135
  $value = isset( $post_data[ $field_key ] ) ? $post_data[ $field_key ] : null;
136
 
137
  if ( isset( $field['sanitize_callback'] ) && is_callable( $field['sanitize_callback'] ) ) {
170
  if ( ! empty( $this->data ) && is_array( $this->data ) ) {
171
  return $this->data;
172
  }
173
+ return $_POST; // phpcs:ignore WordPress.Security.NonceVerification
174
  }
175
 
176
  /**
326
  }
327
 
328
  if ( $echo ) {
329
+ echo $html; // phpcs:ignore WordPress.Security.EscapeOutput
330
  } else {
331
  return $html;
332
  }
415
  ?>
416
  <tr valign="top">
417
  <th scope="row" class="titledesc">
418
+ <label for="<?php echo esc_attr( $field_key ); ?>"><?php echo wp_kses_post( $data['title'] ); ?> <?php echo $this->get_tooltip_html( $data ); // phpcs:ignore WordPress.Security.EscapeOutput ?></label>
419
  </th>
420
  <td class="forminp">
421
  <fieldset>
422
  <legend class="screen-reader-text"><span><?php echo wp_kses_post( $data['title'] ); ?></span></legend>
423
+ <input class="input-text regular-input <?php echo esc_attr( $data['class'] ); ?>" type="<?php echo esc_attr( $data['type'] ); ?>" name="<?php echo esc_attr( $field_key ); ?>" id="<?php echo esc_attr( $field_key ); ?>" style="<?php echo esc_attr( $data['css'] ); ?>" value="<?php echo esc_attr( $this->get_option( $key ) ); ?>" placeholder="<?php echo esc_attr( $data['placeholder'] ); ?>" <?php disabled( $data['disabled'], true ); ?> <?php echo $this->get_custom_attribute_html( $data ); // phpcs:ignore WordPress.Security.EscapeOutput ?> />
424
+ <?php echo $this->get_description_html( $data ); // phpcs:ignore WordPress.Security.EscapeOutput ?>
425
  </fieldset>
426
  </td>
427
  </tr>
468
  ?>
469
  <tr valign="top">
470
  <th scope="row" class="titledesc">
471
+ <label for="<?php echo esc_attr( $field_key ); ?>"><?php echo wp_kses_post( $data['title'] ); ?> <?php echo $this->get_tooltip_html( $data ); // phpcs:ignore WordPress.Security.EscapeOutput ?></label>
472
  </th>
473
  <td class="forminp">
474
  <fieldset>
475
  <legend class="screen-reader-text"><span><?php echo wp_kses_post( $data['title'] ); ?></span></legend>
476
  <span class="colorpickpreview" style="background:<?php echo esc_attr( $this->get_option( $key ) ); ?>;">&nbsp;</span>
477
+ <input class="colorpick <?php echo esc_attr( $data['class'] ); ?>" type="text" name="<?php echo esc_attr( $field_key ); ?>" id="<?php echo esc_attr( $field_key ); ?>" style="<?php echo esc_attr( $data['css'] ); ?>" value="<?php echo esc_attr( $this->get_option( $key ) ); ?>" placeholder="<?php echo esc_attr( $data['placeholder'] ); ?>" <?php disabled( $data['disabled'], true ); ?> <?php echo $this->get_custom_attribute_html( $data ); // phpcs:ignore WordPress.Security.EscapeOutput ?> />
478
  <div id="colorPickerDiv_<?php echo esc_attr( $field_key ); ?>" class="colorpickdiv" style="z-index: 100; background: #eee; border: 1px solid #ccc; position: absolute; display: none;"></div>
479
+ <?php echo $this->get_description_html( $data ); // phpcs:ignore WordPress.Security.EscapeOutput ?>
480
  </fieldset>
481
  </td>
482
  </tr>
512
  ?>
513
  <tr valign="top">
514
  <th scope="row" class="titledesc">
515
+ <label for="<?php echo esc_attr( $field_key ); ?>"><?php echo wp_kses_post( $data['title'] ); ?> <?php echo $this->get_tooltip_html( $data ); // phpcs:ignore WordPress.Security.EscapeOutput ?></label>
516
  </th>
517
  <td class="forminp">
518
  <fieldset>
519
  <legend class="screen-reader-text"><span><?php echo wp_kses_post( $data['title'] ); ?></span></legend>
520
+ <textarea rows="3" cols="20" class="input-text wide-input <?php echo esc_attr( $data['class'] ); ?>" type="<?php echo esc_attr( $data['type'] ); ?>" name="<?php echo esc_attr( $field_key ); ?>" id="<?php echo esc_attr( $field_key ); ?>" style="<?php echo esc_attr( $data['css'] ); ?>" placeholder="<?php echo esc_attr( $data['placeholder'] ); ?>" <?php disabled( $data['disabled'], true ); ?> <?php echo $this->get_custom_attribute_html( $data ); // phpcs:ignore WordPress.Security.EscapeOutput ?>><?php echo esc_textarea( $this->get_option( $key ) ); ?></textarea>
521
+ <?php echo $this->get_description_html( $data ); // phpcs:ignore WordPress.Security.EscapeOutput ?>
522
  </fieldset>
523
  </td>
524
  </tr>
558
  ?>
559
  <tr valign="top">
560
  <th scope="row" class="titledesc">
561
+ <label for="<?php echo esc_attr( $field_key ); ?>"><?php echo wp_kses_post( $data['title'] ); ?> <?php echo $this->get_tooltip_html( $data ); // phpcs:ignore WordPress.Security.EscapeOutput ?></label>
562
  </th>
563
  <td class="forminp">
564
  <fieldset>
565
  <legend class="screen-reader-text"><span><?php echo wp_kses_post( $data['title'] ); ?></span></legend>
566
  <label for="<?php echo esc_attr( $field_key ); ?>">
567
+ <input <?php disabled( $data['disabled'], true ); ?> class="<?php echo esc_attr( $data['class'] ); ?>" type="checkbox" name="<?php echo esc_attr( $field_key ); ?>" id="<?php echo esc_attr( $field_key ); ?>" style="<?php echo esc_attr( $data['css'] ); ?>" value="1" <?php checked( $this->get_option( $key ), 'yes' ); ?> <?php echo $this->get_custom_attribute_html( $data ); // phpcs:ignore WordPress.Security.EscapeOutput ?> /> <?php echo wp_kses_post( $data['label'] ); ?></label><br/>
568
+ <?php echo $this->get_description_html( $data ); // phpcs:ignore WordPress.Security.EscapeOutput ?>
569
  </fieldset>
570
  </td>
571
  </tr>
602
  ?>
603
  <tr valign="top">
604
  <th scope="row" class="titledesc">
605
+ <label for="<?php echo esc_attr( $field_key ); ?>"><?php echo wp_kses_post( $data['title'] ); ?> <?php echo $this->get_tooltip_html( $data ); // phpcs:ignore WordPress.Security.EscapeOutput ?></label>
606
  </th>
607
  <td class="forminp">
608
  <fieldset>
609
  <legend class="screen-reader-text"><span><?php echo wp_kses_post( $data['title'] ); ?></span></legend>
610
+ <select class="select <?php echo esc_attr( $data['class'] ); ?>" name="<?php echo esc_attr( $field_key ); ?>" id="<?php echo esc_attr( $field_key ); ?>" style="<?php echo esc_attr( $data['css'] ); ?>" <?php disabled( $data['disabled'], true ); ?> <?php echo $this->get_custom_attribute_html( $data ); // phpcs:ignore WordPress.Security.EscapeOutput ?>>
611
  <?php foreach ( (array) $data['options'] as $option_key => $option_value ) : ?>
612
  <option value="<?php echo esc_attr( $option_key ); ?>" <?php selected( $option_key, esc_attr( $this->get_option( $key ) ) ); ?>><?php echo esc_attr( $option_value ); ?></option>
613
  <?php endforeach; ?>
614
  </select>
615
+ <?php echo $this->get_description_html( $data ); // phpcs:ignore WordPress.Security.EscapeOutput ?>
616
  </fieldset>
617
  </td>
618
  </tr>
651
  ?>
652
  <tr valign="top">
653
  <th scope="row" class="titledesc">
654
+ <label for="<?php echo esc_attr( $field_key ); ?>"><?php echo wp_kses_post( $data['title'] ); ?> <?php echo $this->get_tooltip_html( $data ); // phpcs:ignore WordPress.Security.EscapeOutput ?></label>
655
  </th>
656
  <td class="forminp">
657
  <fieldset>
658
  <legend class="screen-reader-text"><span><?php echo wp_kses_post( $data['title'] ); ?></span></legend>
659
+ <select multiple="multiple" class="multiselect <?php echo esc_attr( $data['class'] ); ?>" name="<?php echo esc_attr( $field_key ); ?>[]" id="<?php echo esc_attr( $field_key ); ?>" style="<?php echo esc_attr( $data['css'] ); ?>" <?php disabled( $data['disabled'], true ); ?> <?php echo $this->get_custom_attribute_html( $data ); // phpcs:ignore WordPress.Security.EscapeOutput ?>>
660
  <?php foreach ( (array) $data['options'] as $option_key => $option_value ) : ?>
661
  <?php if ( is_array( $option_value ) ) : ?>
662
  <optgroup label="<?php echo esc_attr( $option_key ); ?>">
669
  <?php endif; ?>
670
  <?php endforeach; ?>
671
  </select>
672
+ <?php echo $this->get_description_html( $data ); // phpcs:ignore WordPress.Security.EscapeOutput ?>
673
  <?php if ( $data['select_buttons'] ) : ?>
674
  <br/><a class="select_all button" href="#"><?php esc_html_e( 'Select all', 'everest-forms' ); ?></a> <a class="select_none button" href="#"><?php esc_html_e( 'Select none', 'everest-forms' ); ?></a>
675
  <?php endif; ?>
745
  */
746
  public function validate_textarea_field( $key, $value ) {
747
  $value = is_null( $value ) ? '' : $value;
748
+ return wp_kses(
749
+ trim( stripslashes( $value ) ),
750
  array_merge(
751
  array(
752
  'iframe' => array(
includes/abstracts/legacy/class-evf-admin-form-panel.php CHANGED
@@ -78,7 +78,7 @@ abstract class EVF_Admin_Form_Panel {
78
  public function __construct() {
79
  // Load form if found.
80
  $form_id = isset( $_GET['form_id'] ) ? absint( $_GET['form_id'] ) : 0;
81
- $this->form = EVF()->form->get( $form_id );
82
  $this->form_data = is_object( $this->form ) ? evf_decode( $this->form->post_content ) : array();
83
  $this->form_setting = isset( $this->form_data['settings'] ) ? $this->form_data['settings'] : array();
84
  $this->init();
78
  public function __construct() {
79
  // Load form if found.
80
  $form_id = isset( $_GET['form_id'] ) ? absint( $_GET['form_id'] ) : 0;
81
+ $this->form = evf()->form->get( $form_id );
82
  $this->form_data = is_object( $this->form ) ? evf_decode( $this->form->post_content ) : array();
83
  $this->form_setting = isset( $this->form_data['settings'] ) ? $this->form_data['settings'] : array();
84
  $this->init();
includes/admin/builder/class-evf-builder-fields.php CHANGED
@@ -98,13 +98,13 @@ class EVF_Builder_Fields extends EVF_Builder_Page {
98
  * Output fields group buttons.
99
  */
100
  public function output_fields() {
101
- $form_fields = EVF()->form_fields->form_fields();
102
 
103
  if ( ! empty( $form_fields ) ) {
104
  foreach ( $form_fields as $group => $form_field ) {
105
  ?>
106
  <div class="everest-forms-add-fields-group open">
107
- <a href="#" class="everest-forms-add-fields-heading" data-group="<?php echo esc_attr( $group ); ?>"><?php echo evf_get_fields_group( $group ); ?><i class="handlediv"></i></a>
108
  <div class="evf-registered-buttons">
109
  <?php foreach ( $form_field as $field ) : ?>
110
  <button type="button" id="everest-forms-add-fields-<?php echo esc_attr( $field->type ); ?>" class="evf-registered-item <?php echo sanitize_html_class( $field->class ); ?>" data-field-type="<?php echo esc_attr( $field->type ); ?>">
@@ -129,7 +129,7 @@ class EVF_Builder_Fields extends EVF_Builder_Page {
129
 
130
  if ( ! empty( $fields ) ) {
131
  foreach ( $fields as $field ) {
132
- if ( in_array( $field['type'], EVF()->form_fields->get_pro_form_field_types(), true ) ) {
133
  continue;
134
  }
135
 
@@ -234,8 +234,8 @@ class EVF_Builder_Fields extends EVF_Builder_Page {
234
  echo '<div class="evf-delete-row"><span class="dashicons dashicons-trash" title="Delete"></span></div>';
235
  echo '<div class="evf-show-grid"><span class="dashicons dashicons-edit" title="Edit"></span></div>';
236
  echo '<div class="evf-toggle-row-content">';
237
- echo '<span>' . __( 'Row Settings', 'everest-forms' ) . '</span>';
238
- echo '<small>' . __( 'Select the type of row', 'everest-forms' ) . '</small>';
239
  echo '<div class="clear"></div>';
240
 
241
  for ( $grid_active = 1; $grid_active <= $total_grid; $grid_active ++ ) {
@@ -245,14 +245,14 @@ class EVF_Builder_Fields extends EVF_Builder_Page {
245
  $class .= ' active';
246
  }
247
 
248
- echo '<div class="' . $class . '" data-evf-grid="' . $grid_active . '">';
249
 
250
  $gaps = 15;
251
  $width = ( 100 - $gaps ) / $grid_active;
252
  $margin = ( $gaps / $grid_active ) / 2;
253
 
254
  for ( $row_icon = 1; $row_icon <= $grid_active; $row_icon ++ ) {
255
- echo '<span style="width:' . $width . '%; margin-left:' . $margin . '%; margin-right:' . $margin . '%"></span>';
256
  }
257
 
258
  echo '</div>';
@@ -264,10 +264,10 @@ class EVF_Builder_Fields extends EVF_Builder_Page {
264
 
265
  $grid_class = 'evf-admin-grid evf-grid-' . ( $active_grid );
266
  for ( $grid_start = 1; $grid_start <= $active_grid; $grid_start ++ ) {
267
- echo '<div class="' . $grid_class . ' " data-grid-id="' . $grid_start . '">';
268
  $grid_fields = isset( $row_grid[ 'grid_' . $grid_start ] ) && is_array( $row_grid[ 'grid_' . $grid_start ] ) ? $row_grid[ 'grid_' . $grid_start ] : array();
269
  foreach ( $grid_fields as $field_id ) {
270
- if ( isset( $fields[ $field_id ] ) && ! in_array( $fields[ $field_id ]['type'], EVF()->form_fields->get_pro_form_field_types(), true ) ) {
271
  $this->field_preview( $fields[ $field_id ] );
272
  }
273
  }
@@ -293,7 +293,7 @@ class EVF_Builder_Fields extends EVF_Builder_Page {
293
 
294
  echo '</div>';
295
  echo '<div class="clear evf-clear"></div>';
296
- echo '<div class="evf-add-row" data-total-rows="' . count( $structure ) . '"><span class="everest-forms-btn everest-forms-btn-primary dashicons dashicons-plus-alt">' . esc_html( 'Add Row', 'everest-forms' ) . '</span></div>';
297
  echo '</div >';
298
  }
299
 
@@ -304,19 +304,19 @@ class EVF_Builder_Fields extends EVF_Builder_Page {
304
  */
305
  public function field_preview( $field ) {
306
  $css = ! empty( $field['size'] ) ? 'size-' . esc_attr( $field['size'] ) : '';
307
- $css .= ! empty( $field['label_hide'] ) && $field['label_hide'] == '1' ? ' label_hide' : '';
308
- $css .= ! empty( $field['sublabel_hide'] ) && $field['sublabel_hide'] == '1' ? ' sublabel_hide' : '';
309
- $css .= ! empty( $field['required'] ) && $field['required'] == '1' ? ' required' : '';
310
  $css .= ! empty( $field['input_columns'] ) && '2' === $field['input_columns'] ? ' everest-forms-list-2-columns' : '';
311
  $css .= ! empty( $field['input_columns'] ) && '3' === $field['input_columns'] ? ' everest-forms-list-3-columns' : '';
312
  $css .= ! empty( $field['input_columns'] ) && 'inline' === $field['input_columns'] ? ' everest-forms-list-inline' : '';
313
  $css = apply_filters( 'everest_forms_field_preview_class', $css, $field );
314
 
315
- printf( '<div class="everest-forms-field everest-forms-field-%s %s" id="everest-forms-field-%s" data-field-id="%s" data-field-type="%s">', $field['type'], $css, $field['id'], $field['id'], $field['type'] );
316
  printf( '<div class="evf-field-action">' );
317
- printf( '<a href="#" class="everest-forms-field-duplicate" title="%s"><span class="dashicons dashicons-media-default"></span></a>', __( 'Duplicate Field', 'everest-forms' ) );
318
- printf( '<a href="#" class="everest-forms-field-delete" title="%s"><span class="dashicons dashicons-trash"></span></a>', __( 'Delete Field', 'everest-forms' ) );
319
- printf( '<a href="#" class="everest-forms-field-setting" title="%s"><span class="dashicons dashicons-admin-generic"></span></a>', __( 'Settings', 'everest-forms' ) );
320
  printf( '</div>' );
321
 
322
  do_action( 'everest_forms_builder_fields_preview_' . $field['type'], $field );
98
  * Output fields group buttons.
99
  */
100
  public function output_fields() {
101
+ $form_fields = evf()->form_fields->form_fields();
102
 
103
  if ( ! empty( $form_fields ) ) {
104
  foreach ( $form_fields as $group => $form_field ) {
105
  ?>
106
  <div class="everest-forms-add-fields-group open">
107
+ <a href="#" class="everest-forms-add-fields-heading" data-group="<?php echo esc_attr( $group ); ?>"><?php echo evf_get_fields_group( $group ); // phpcs:ignore WordPress.Security.EscapeOutput ?><i class="handlediv"></i></a>
108
  <div class="evf-registered-buttons">
109
  <?php foreach ( $form_field as $field ) : ?>
110
  <button type="button" id="everest-forms-add-fields-<?php echo esc_attr( $field->type ); ?>" class="evf-registered-item <?php echo sanitize_html_class( $field->class ); ?>" data-field-type="<?php echo esc_attr( $field->type ); ?>">
129
 
130
  if ( ! empty( $fields ) ) {
131
  foreach ( $fields as $field ) {
132
+ if ( in_array( $field['type'], evf()->form_fields->get_pro_form_field_types(), true ) ) {
133
  continue;
134
  }
135
 
234
  echo '<div class="evf-delete-row"><span class="dashicons dashicons-trash" title="Delete"></span></div>';
235
  echo '<div class="evf-show-grid"><span class="dashicons dashicons-edit" title="Edit"></span></div>';
236
  echo '<div class="evf-toggle-row-content">';
237
+ echo '<span>' . esc_html__( 'Row Settings', 'everest-forms' ) . '</span>';
238
+ echo '<small>' . esc_html__( 'Select the type of row', 'everest-forms' ) . '</small>';
239
  echo '<div class="clear"></div>';
240
 
241
  for ( $grid_active = 1; $grid_active <= $total_grid; $grid_active ++ ) {
245
  $class .= ' active';
246
  }
247
 
248
+ echo '<div class="' . esc_attr( $class ) . '" data-evf-grid="' . absint( $grid_active ) . '">';
249
 
250
  $gaps = 15;
251
  $width = ( 100 - $gaps ) / $grid_active;
252
  $margin = ( $gaps / $grid_active ) / 2;
253
 
254
  for ( $row_icon = 1; $row_icon <= $grid_active; $row_icon ++ ) {
255
+ echo '<span style="width:' . (float) $width . '%; margin-left:' . (float) $margin . '%; margin-right:' . (float) $margin . '%"></span>';
256
  }
257
 
258
  echo '</div>';
264
 
265
  $grid_class = 'evf-admin-grid evf-grid-' . ( $active_grid );
266
  for ( $grid_start = 1; $grid_start <= $active_grid; $grid_start ++ ) {
267
+ echo '<div class="' . esc_attr( $grid_class ) . ' " data-grid-id="' . absint( $grid_start ) . '">';
268
  $grid_fields = isset( $row_grid[ 'grid_' . $grid_start ] ) && is_array( $row_grid[ 'grid_' . $grid_start ] ) ? $row_grid[ 'grid_' . $grid_start ] : array();
269
  foreach ( $grid_fields as $field_id ) {
270
+ if ( isset( $fields[ $field_id ] ) && ! in_array( $fields[ $field_id ]['type'], evf()->form_fields->get_pro_form_field_types(), true ) ) {
271
  $this->field_preview( $fields[ $field_id ] );
272
  }
273
  }
293
 
294
  echo '</div>';
295
  echo '<div class="clear evf-clear"></div>';
296
+ echo '<div class="evf-add-row" data-total-rows="' . count( $structure ) . '"><span class="everest-forms-btn everest-forms-btn-primary dashicons dashicons-plus-alt">' . esc_html__( 'Add Row', 'everest-forms' ) . '</span></div>';
297
  echo '</div >';
298
  }
299
 
304
  */
305
  public function field_preview( $field ) {
306
  $css = ! empty( $field['size'] ) ? 'size-' . esc_attr( $field['size'] ) : '';
307
+ $css .= ! empty( $field['label_hide'] ) && '1' === $field['label_hide'] ? ' label_hide' : '';
308
+ $css .= ! empty( $field['sublabel_hide'] ) && '1' === $field['sublabel_hide'] ? ' sublabel_hide' : '';
309
+ $css .= ! empty( $field['required'] ) && '1' === $field['required'] ? ' required' : '';
310
  $css .= ! empty( $field['input_columns'] ) && '2' === $field['input_columns'] ? ' everest-forms-list-2-columns' : '';
311
  $css .= ! empty( $field['input_columns'] ) && '3' === $field['input_columns'] ? ' everest-forms-list-3-columns' : '';
312
  $css .= ! empty( $field['input_columns'] ) && 'inline' === $field['input_columns'] ? ' everest-forms-list-inline' : '';
313
  $css = apply_filters( 'everest_forms_field_preview_class', $css, $field );
314
 
315
+ printf( '<div class="everest-forms-field everest-forms-field-%1$s %2$s" id="everest-forms-field-%3$s" data-field-id="%3$s" data-field-type="%4$s">', esc_attr( $field['type'] ), esc_attr( $css ), esc_attr( $field['id'] ), esc_attr( $field['type'] ) );
316
  printf( '<div class="evf-field-action">' );
317
+ printf( '<a href="#" class="everest-forms-field-duplicate" title="%s"><span class="dashicons dashicons-media-default"></span></a>', esc_html__( 'Duplicate Field', 'everest-forms' ) );
318
+ printf( '<a href="#" class="everest-forms-field-delete" title="%s"><span class="dashicons dashicons-trash"></span></a>', esc_html__( 'Delete Field', 'everest-forms' ) );
319
+ printf( '<a href="#" class="everest-forms-field-setting" title="%s"><span class="dashicons dashicons-admin-generic"></span></a>', esc_html__( 'Settings', 'everest-forms' ) );
320
  printf( '</div>' );
321
 
322
  do_action( 'everest_forms_builder_fields_preview_' . $field['type'], $field );
includes/admin/builder/class-evf-builder-settings.php CHANGED
@@ -22,7 +22,7 @@ class EVF_Builder_Settings extends EVF_Builder_Page {
22
  */
23
  public function __construct() {
24
  $this->id = 'settings';
25
- $this->label = __( 'Settings', 'everest-forms' );
26
  $this->sidebar = true;
27
 
28
  add_action( 'everest_forms_settings_connections_email', array( $this, 'output_connections_list' ) );
@@ -37,8 +37,8 @@ class EVF_Builder_Settings extends EVF_Builder_Page {
37
  $sections = apply_filters(
38
  'everest_forms_builder_settings_section',
39
  array(
40
- 'general' => __( 'General', 'everest-forms' ),
41
- 'email' => __( 'Email', 'everest-forms' ),
42
  ),
43
  $this->form_data
44
  );
@@ -59,8 +59,8 @@ class EVF_Builder_Settings extends EVF_Builder_Page {
59
  private function form_data() {
60
  $form_data = array();
61
 
62
- if ( ! empty( $_GET['form_id'] ) ) {
63
- $form_data = EVF()->form->get( absint( $_GET['form_id'] ), array( 'content_only' => true ) );
64
  }
65
 
66
  return $form_data;
@@ -81,7 +81,7 @@ class EVF_Builder_Settings extends EVF_Builder_Page {
81
 
82
  ?>
83
  <div class="everest-forms-active-email <?php echo esc_attr( $hidden_class ); ?>">
84
- <button class="everest-forms-btn everest-forms-btn-primary everest-forms-email-add" data-form_id="<?php echo absint( $_GET['form_id'] ); ?>" data-source="email" data-type="<?php echo esc_attr( 'connection' ); ?>">
85
  <?php printf( esc_html__( 'Add New Email', 'everest-forms' ) ); ?>
86
  </button>
87
  <ul class="everest-forms-active-email-connections-list">
@@ -99,9 +99,9 @@ class EVF_Builder_Settings extends EVF_Builder_Page {
99
  $remove_class = 'email-default-remove';
100
  }
101
  ?>
102
- <li class="connection-list" data-connection-id="<?php echo $connection_id; ?>">
103
- <a class="user-nickname" href="#"><?php echo $connection_name; ?></a>
104
- <a href="#"><span class="<?php echo esc_attr( $remove_class ); ?>">Remove</a>
105
  </li>
106
  <?php
107
  }
@@ -117,8 +117,6 @@ class EVF_Builder_Settings extends EVF_Builder_Page {
117
  * Outputs the builder content.
118
  */
119
  public function output_content() {
120
- $form_id = isset( $_GET['form_id'] ) ? absint( $_GET['form_id'] ) : 0;
121
- $user_emails = evf_get_all_email_fields_by_form_id( $form_id );
122
  $settings = isset( $this->form_data['settings'] ) ? $this->form_data['settings'] : array();
123
  $email_status = isset( $this->form_data['settings']['enable_email_notification'] ) ? $this->form_data['settings']['enable_email_notification'] : 0;
124
 
@@ -194,13 +192,13 @@ class EVF_Builder_Settings extends EVF_Builder_Page {
194
  $this->form_data,
195
  esc_html__( 'Redirect To', 'everest-forms' ),
196
  array(
197
- 'default' => '0',
198
  /* translators: %1$s - general settings docs url */
199
  'tooltip' => sprintf( esc_html__( 'Choose where to redirect after form submission. <a href="%s" target="_blank">Learn More</a>', 'everest-forms' ), esc_url( 'https://docs.wpeverest.com/docs/everest-forms/individual-form-settings/general-settings/#redirect-to' ) ),
200
  'options' => array(
201
- '0' => esc_html__( 'Same Page', 'everest-forms' ),
202
- '1' => esc_html__( 'Custom Page', 'everest-forms' ),
203
- '2' => esc_html__( 'External URL', 'everest-forms' ),
204
  ),
205
  )
206
  );
@@ -348,12 +346,13 @@ class EVF_Builder_Settings extends EVF_Builder_Page {
348
  // --------------------------------------------------------------------//
349
  $form_name = isset( $settings['form_title'] ) ? ' - ' . $settings['form_title'] : '';
350
  if ( ! isset( $settings['email']['connection_1'] ) ) {
351
- $settings['email']['connection_1'] = array( 'connection_name' => __( 'Admin Notification', 'everest-forms' ) );
352
- $settings['email']['connection_1']['evf_to_email'] = isset( $settings['email']['evf_to_email'] ) ? $settings['email']['evf_to_email'] : '{admin_email}';
353
- $settings['email']['connection_1']['evf_from_name'] = isset( $settings['email']['evf_from_name'] ) ? $settings['email']['evf_from_name'] : get_bloginfo( 'name', 'display' );
354
- $settings['email']['connection_1']['evf_from_email'] = isset( $settings['email']['evf_from_email'] ) ? $settings['email']['evf_from_email'] : '{admin_email}';
355
- $settings['email']['connection_1']['evf_reply_to'] = isset( $settings['email']['evf_reply_to'] ) ? $settings['email']['evf_reply_to'] : '';
356
- $settings['email']['connection_1']['evf_email_subject'] = isset( $settings['email']['evf_email_subject'] ) ? $settings['email']['evf_email_subject'] : sprintf( __( 'New Form Entry %s', 'everest-forms' ), $form_name );
 
357
  $settings['email']['connection_1']['evf_email_message'] = isset( $settings['email']['evf_email_message'] ) ? $settings['email']['evf_email_message'] : '{all_fields}';
358
 
359
  $email_settings = array( 'attach_pdf_to_admin_email', 'show_header_in_attachment_pdf_file', 'conditional_logic_status', 'conditional_option', 'conditionals' );
@@ -394,7 +393,7 @@ class EVF_Builder_Settings extends EVF_Builder_Page {
394
 
395
  foreach ( $settings['email'] as $connection_id => $connection ) :
396
  if ( preg_match( '/connection_/', $connection_id ) ) {
397
- echo '<div class="evf-content-email-settings-inner ' . esc_attr( $hidden_class ) . '" data-connection_id=' . $connection_id . '>';
398
 
399
  everest_forms_panel_field(
400
  'text',
@@ -525,8 +524,9 @@ class EVF_Builder_Settings extends EVF_Builder_Page {
525
  $this->form_data,
526
  esc_html__( 'Email Subject', 'everest-forms' ),
527
  array(
528
- 'default' => isset( $settings['email'][ $connection_id ]['evf_email_subject'] ) ? $settings['email'][ $connection_id ]['evf_email_subject'] : sprintf( __( 'New Form Entry %s', 'everest-forms' ), $form_name ),
529
- /* translators: %1$s - general settings docs url */
 
530
  'tooltip' => sprintf( esc_html__( 'Enter the subject of the email. <a href="%1$s" target="_blank">Learn More</a>', 'everest-forms' ), esc_url( 'https://docs.wpeverest.com/docs/everest-forms/individual-form-settings/email-settings/#email-subject' ) ),
531
  'smarttags' => array(
532
  'type' => 'all',
@@ -568,6 +568,9 @@ class EVF_Builder_Settings extends EVF_Builder_Page {
568
  do_action( 'everest_forms_settings_panel_content', $this );
569
  }
570
 
 
 
 
571
  public function evf_get_all_pages() {
572
  $pages = array();
573
  foreach ( get_pages() as $page ) {
22
  */
23
  public function __construct() {
24
  $this->id = 'settings';
25
+ $this->label = esc_html__( 'Settings', 'everest-forms' );
26
  $this->sidebar = true;
27
 
28
  add_action( 'everest_forms_settings_connections_email', array( $this, 'output_connections_list' ) );
37
  $sections = apply_filters(
38
  'everest_forms_builder_settings_section',
39
  array(
40
+ 'general' => esc_html__( 'General', 'everest-forms' ),
41
+ 'email' => esc_html__( 'Email', 'everest-forms' ),
42
  ),
43
  $this->form_data
44
  );
59
  private function form_data() {
60
  $form_data = array();
61
 
62
+ if ( ! empty( $_GET['form_id'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification
63
+ $form_data = evf()->form->get( absint( $_GET['form_id'] ), array( 'content_only' => true ) ); // phpcs:ignore WordPress.Security.NonceVerification
64
  }
65
 
66
  return $form_data;
81
 
82
  ?>
83
  <div class="everest-forms-active-email <?php echo esc_attr( $hidden_class ); ?>">
84
+ <button class="everest-forms-btn everest-forms-btn-primary everest-forms-email-add" data-form_id="<?php echo absint( $_GET['form_id'] ); // phpcs:ignore WordPress.Security.NonceVerification, WordPress.Security.ValidatedSanitizedInput.InputNotValidated ?>" data-source="email" data-type="<?php echo esc_attr( 'connection' ); ?>">
85
  <?php printf( esc_html__( 'Add New Email', 'everest-forms' ) ); ?>
86
  </button>
87
  <ul class="everest-forms-active-email-connections-list">
99
  $remove_class = 'email-default-remove';
100
  }
101
  ?>
102
+ <li class="connection-list" data-connection-id="<?php echo esc_attr( $connection_id ); ?>">
103
+ <a class="user-nickname" href="#"><?php echo esc_html( $connection_name ); ?></a>
104
+ <a href="#"><span class="<?php echo esc_attr( $remove_class ); ?>"><?php esc_html_e( 'Remove', 'everest-forms' ); ?></a>
105
  </li>
106
  <?php
107
  }
117
  * Outputs the builder content.
118
  */
119
  public function output_content() {
 
 
120
  $settings = isset( $this->form_data['settings'] ) ? $this->form_data['settings'] : array();
121
  $email_status = isset( $this->form_data['settings']['enable_email_notification'] ) ? $this->form_data['settings']['enable_email_notification'] : 0;
122
 
192
  $this->form_data,
193
  esc_html__( 'Redirect To', 'everest-forms' ),
194
  array(
195
+ 'default' => 'same',
196
  /* translators: %1$s - general settings docs url */
197
  'tooltip' => sprintf( esc_html__( 'Choose where to redirect after form submission. <a href="%s" target="_blank">Learn More</a>', 'everest-forms' ), esc_url( 'https://docs.wpeverest.com/docs/everest-forms/individual-form-settings/general-settings/#redirect-to' ) ),
198
  'options' => array(
199
+ 'same' => esc_html__( 'Same Page', 'everest-forms' ),
200
+ 'custom_page' => esc_html__( 'Custom Page', 'everest-forms' ),
201
+ 'external_url' => esc_html__( 'External URL', 'everest-forms' ),
202
  ),
203
  )
204
  );
346
  // --------------------------------------------------------------------//
347
  $form_name = isset( $settings['form_title'] ) ? ' - ' . $settings['form_title'] : '';
348
  if ( ! isset( $settings['email']['connection_1'] ) ) {
349
+ $settings['email']['connection_1'] = array( 'connection_name' => __( 'Admin Notification', 'everest-forms' ) );
350
+ $settings['email']['connection_1']['evf_to_email'] = isset( $settings['email']['evf_to_email'] ) ? $settings['email']['evf_to_email'] : '{admin_email}';
351
+ $settings['email']['connection_1']['evf_from_name'] = isset( $settings['email']['evf_from_name'] ) ? $settings['email']['evf_from_name'] : get_bloginfo( 'name', 'display' );
352
+ $settings['email']['connection_1']['evf_from_email'] = isset( $settings['email']['evf_from_email'] ) ? $settings['email']['evf_from_email'] : '{admin_email}';
353
+ $settings['email']['connection_1']['evf_reply_to'] = isset( $settings['email']['evf_reply_to'] ) ? $settings['email']['evf_reply_to'] : '';
354
+ /* translators: %s: Form Name */
355
+ $settings['email']['connection_1']['evf_email_subject'] = isset( $settings['email']['evf_email_subject'] ) ? $settings['email']['evf_email_subject'] : sprintf( esc_html__( 'New Form Entry %s', 'everest-forms' ), $form_name );
356
  $settings['email']['connection_1']['evf_email_message'] = isset( $settings['email']['evf_email_message'] ) ? $settings['email']['evf_email_message'] : '{all_fields}';
357
 
358
  $email_settings = array( 'attach_pdf_to_admin_email', 'show_header_in_attachment_pdf_file', 'conditional_logic_status', 'conditional_option', 'conditionals' );
393
 
394
  foreach ( $settings['email'] as $connection_id => $connection ) :
395
  if ( preg_match( '/connection_/', $connection_id ) ) {
396
+ echo '<div class="evf-content-email-settings-inner ' . esc_attr( $hidden_class ) . '" data-connection_id=' . esc_attr( $connection_id ) . '>';
397
 
398
  everest_forms_panel_field(
399
  'text',
524
  $this->form_data,
525
  esc_html__( 'Email Subject', 'everest-forms' ),
526
  array(
527
+ /* translators: %s: Form Name */
528
+ 'default' => isset( $settings['email'][ $connection_id ]['evf_email_subject'] ) ? $settings['email'][ $connection_id ]['evf_email_subject'] : sprintf( esc_html__( 'New Form Entry %s', 'everest-forms' ), $form_name ),
529
+ /* translators: %1$s - General Settings docs url */
530
  'tooltip' => sprintf( esc_html__( 'Enter the subject of the email. <a href="%1$s" target="_blank">Learn More</a>', 'everest-forms' ), esc_url( 'https://docs.wpeverest.com/docs/everest-forms/individual-form-settings/email-settings/#email-subject' ) ),
531
  'smarttags' => array(
532
  'type' => 'all',
568
  do_action( 'everest_forms_settings_panel_content', $this );
569
  }
570
 
571
+ /**
572
+ * Get all pages.
573
+ */
574
  public function evf_get_all_pages() {
575
  $pages = array();
576
  foreach ( get_pages() as $page ) {
includes/admin/class-evf-admin-addons.php CHANGED
@@ -3,7 +3,7 @@
3
  * Addons Page
4
  *
5
  * @package EverestForms/Admin
6
- * @version 1.1.1
7
  */
8
 
9
  defined( 'ABSPATH' ) || exit;
@@ -39,8 +39,6 @@ class EVF_Admin_Addons {
39
  /**
40
  * Get section content for the extensions screen.
41
  *
42
- * @param string $category
43
- * @param string $term
44
  * @return array
45
  */
46
  public static function get_extension_data() {
@@ -76,10 +74,10 @@ class EVF_Admin_Addons {
76
  admin_url( 'admin.php' )
77
  );
78
  $license_plan = evf_get_license_plan();
79
- $current_section = isset( $_GET['section'] ) ? sanitize_text_field( $_GET['section'] ) : '_all';
80
 
81
  if ( '_featured' !== $current_section ) {
82
- $category = isset( $_GET['section'] ) ? $_GET['section'] : null;
83
  $addons = self::get_extension_data( $category );
84
  }
85
 
3
  * Addons Page
4
  *
5
  * @package EverestForms/Admin
6
+ * @version 1.6.0
7
  */
8
 
9
  defined( 'ABSPATH' ) || exit;
39
  /**
40
  * Get section content for the extensions screen.
41
  *
 
 
42
  * @return array
43
  */
44
  public static function get_extension_data() {
74
  admin_url( 'admin.php' )
75
  );
76
  $license_plan = evf_get_license_plan();
77
+ $current_section = isset( $_GET['section'] ) ? sanitize_text_field( wp_unslash( $_GET['section'] ) ) : '_all'; // phpcs:ignore WordPress.Security.NonceVerification
78
 
79
  if ( '_featured' !== $current_section ) {
80
+ $category = isset( $_GET['section'] ) ? sanitize_text_field( wp_unslash( $_GET['section'] ) ) : null; // phpcs:ignore WordPress.Security.NonceVerification
81
  $addons = self::get_extension_data( $category );
82
  }
83
 
includes/admin/class-evf-admin-assets.php CHANGED
@@ -33,11 +33,11 @@ class EVF_Admin_Assets {
33
  $screen_id = $screen ? $screen->id : '';
34
 
35
  // Register admin styles.
36
- wp_register_style( 'everest-forms-admin', EVF()->plugin_url() . '/assets/css/admin.css', array(), EVF_VERSION );
37
- wp_register_style( 'everest-forms-admin-menu', EVF()->plugin_url() . '/assets/css/menu.css', array(), EVF_VERSION );
38
- wp_register_style( 'jquery-ui-style', EVF()->plugin_url() . '/assets/css/jquery-ui/jquery-ui.min.css', array(), EVF_VERSION );
39
- wp_register_style( 'jquery-confirm', EVF()->plugin_url() . '/assets/css/jquery-confirm/jquery-confirm.min.css', array(), '3.3.0' );
40
- wp_register_style( 'perfect-scrollbar', EVF()->plugin_url() . '/assets/css/perfect-scrollbar/perfect-scrollbar.css', array(), '1.4.0' );
41
 
42
  // Add RTL support for admin styles.
43
  wp_style_add_data( 'everest-forms-admin', 'rtl', 'replace' );
@@ -70,28 +70,28 @@ class EVF_Admin_Assets {
70
  $suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
71
 
72
  // Register scripts.
73
- wp_register_script( 'everest-forms-admin', EVF()->plugin_url() . '/assets/js/admin/admin' . $suffix . '.js', array( 'jquery', 'jquery-blockui', 'jquery-ui-sortable', 'jquery-ui-widget', 'jquery-ui-core', 'tooltipster', 'wp-color-picker', 'perfect-scrollbar' ), EVF_VERSION, true );
74
- wp_register_script( 'everest-forms-extensions', EVF()->plugin_url() . '/assets/js/admin/extensions' . $suffix . '.js', array( 'jquery', 'updates' ), EVF_VERSION, true );
75
- wp_register_script( 'everest-forms-email-admin', EVF()->plugin_url() . '/assets/js/admin/evf-admin-email' . $suffix . '.js', array( 'jquery', 'jquery-blockui', 'jquery-ui-sortable', 'jquery-ui-widget', 'jquery-ui-core', 'tooltipster', 'wp-color-picker', 'perfect-scrollbar' ), EVF_VERSION, true );
76
- wp_register_script( 'everest-forms-editor', EVF()->plugin_url() . '/assets/js/admin/editor' . $suffix . '.js', array( 'jquery' ), EVF_VERSION, true );
77
- wp_register_script( 'jquery-blockui', EVF()->plugin_url() . '/assets/js/jquery-blockui/jquery.blockUI' . $suffix . '.js', array( 'jquery' ), '2.70', true );
78
- wp_register_script( 'jquery-confirm', EVF()->plugin_url() . '/assets/js/jquery-confirm/jquery-confirm' . $suffix . '.js', array( 'jquery' ), '3.3.0', true );
79
- wp_register_script( 'jquery-tiptip', EVF()->plugin_url() . '/assets/js/jquery-tiptip/jquery.tipTip' . $suffix . '.js', array( 'jquery' ), EVF_VERSION, true ); // @deprecated
80
- wp_register_script( 'tooltipster', EVF()->plugin_url() . '/assets/js/tooltipster/tooltipster.bundle' . $suffix . '.js', array( 'jquery' ), '4.6.2', true );
81
- wp_register_script( 'perfect-scrollbar', EVF()->plugin_url() . '/assets/js/perfect-scrollbar/perfect-scrollbar' . $suffix . '.js', array( 'jquery' ), '1.4.0', true );
82
- wp_register_script( 'evf-clipboard', EVF()->plugin_url() . '/assets/js/admin/evf-clipboard' . $suffix . '.js', array( 'jquery' ), EVF_VERSION, true );
83
- wp_register_script( 'selectWoo', EVF()->plugin_url() . '/assets/js/selectWoo/selectWoo.full' . $suffix . '.js', array( 'jquery' ), '1.0.4', true );
84
- wp_register_script( 'evf-enhanced-select', EVF()->plugin_url() . '/assets/js/admin/evf-enhanced-select' . $suffix . '.js', array( 'jquery', 'selectWoo' ), EVF_VERSION, true );
85
- wp_register_script( 'evf-template-controller', EVF()->plugin_url() . '/assets/js/admin/form-template-controller' . $suffix . '.js', array( 'jquery' ), EVF_VERSION );
86
  wp_localize_script(
87
  'evf-template-controller',
88
  'evf_templates',
89
  array(
90
- 'evf_template_all' => EVF_Admin_Forms::get_template_data(),
91
- 'i18n_get_started' => esc_html__( 'Get Started', 'everest-forms' ),
92
- 'i18n_get_preview' => esc_html__( 'Preview', 'everest-forms' ),
93
- 'i18n_pro_feature' => esc_html__( 'Pro', 'everest-forms' ),
94
- 'template_refresh' => esc_html__( 'Updating Templates', 'everest-forms' ),
95
  )
96
  );
97
  wp_localize_script(
@@ -110,7 +110,7 @@ class EVF_Admin_Assets {
110
  'i18n_searching' => _x( 'Searching&hellip;', 'enhanced select', 'everest-forms' ),
111
  )
112
  );
113
- wp_register_script( 'evf-form-builder', EVF()->plugin_url() . '/assets/js/admin/form-builder' . $suffix . '.js', array( 'jquery', 'jquery-blockui', 'tooltipster', 'jquery-ui-sortable', 'jquery-ui-widget', 'jquery-ui-core', 'jquery-ui-tabs', 'jquery-ui-draggable', 'jquery-ui-droppable', 'jquery-ui-datepicker', 'jquery-confirm', 'evf-clipboard' ), EVF_VERSION, true );
114
  wp_localize_script(
115
  'evf-form-builder',
116
  'evf_data',
@@ -119,7 +119,7 @@ class EVF_Admin_Assets {
119
  array(
120
  'post_id' => isset( $post->ID ) ? $post->ID : '',
121
  'ajax_url' => admin_url( 'admin-ajax.php' ),
122
- 'tab' => isset( $_GET['tab'] ) ? evf_clean( wp_unslash( $_GET['tab'] ) ) : '', // phpcs:ignore WordPress.Security.NonceVerification
123
  'evf_field_drop_nonce' => wp_create_nonce( 'everest_forms_field_drop' ),
124
  'evf_save_form' => wp_create_nonce( 'everest_forms_save_form' ),
125
  'evf_get_next_id' => wp_create_nonce( 'everest_forms_get_next_id' ),
@@ -130,7 +130,7 @@ class EVF_Admin_Assets {
130
  'i18n_installing' => esc_html__( 'Installing', 'everest-forms' ),
131
  'i18n_activating' => esc_html__( 'Activating', 'everest-forms' ),
132
  'i18n_install_activate' => esc_html__( 'Install & Activate', 'everest-forms' ),
133
- 'i18n_install_only' => esc_html__( 'Activate Plugins', 'everest-forms' ),
134
  'i18n_copy' => esc_html__( '(copy)', 'everest-forms' ),
135
  'i18n_close' => esc_html__( 'Close', 'everest-forms' ),
136
  'i18n_cancel' => esc_html__( 'Cancel', 'everest-forms' ),
@@ -150,13 +150,13 @@ class EVF_Admin_Assets {
150
  'i18n_field_title_payload' => esc_html__( 'Form name can\'t be empty.', 'everest-forms' ),
151
  'email_fields' => evf_get_all_email_fields_by_form_id( isset( $_GET['form_id'] ) ? absint( $_GET['form_id'] ) : 0 ), // phpcs:ignore WordPress.Security.NonceVerification
152
  'all_fields' => evf_get_all_form_fields_by_form_id( isset( $_GET['form_id'] ) ? absint( $_GET['form_id'] ) : 0 ), // phpcs:ignore WordPress.Security.NonceVerification
153
- 'smart_tags_other' => EVF()->smart_tags->other_smart_tags(),
154
  )
155
  )
156
  );
157
 
158
  // Builder upgrade.
159
- wp_register_script( 'evf-upgrade', EVF()->plugin_url() . '/assets/js/admin/upgrade.js', array( 'jquery', 'jquery-confirm' ), EVF_VERSION, false );
160
  wp_localize_script(
161
  'evf-upgrade',
162
  'evf_upgrade',
@@ -164,7 +164,7 @@ class EVF_Admin_Assets {
164
  'upgrade_title' => esc_html__( 'is a PRO Feature', 'everest-forms' ),
165
  'upgrade_message' => esc_html__( 'We\'re sorry, %name% is not available on your plan.<br>Please upgrade to the PRO plan to unlock all these awesome features.', 'everest-forms' ),
166
  'upgrade_button' => esc_html__( 'Upgrade to PRO', 'everest-forms' ),
167
- 'upgrade_url' => apply_filters( 'everest_forms_upgrade_url', 'https://wpeverest.com/wordpress-plugins/everest-forms/?utm_source=user-dashboard&utm_medium=modal-button&utm_campaign=free-version' ),
168
  'enable_stripe_title' => esc_html__( 'Please enable Stripe', 'everest-forms' ),
169
  'enable_stripe_message' => esc_html__( 'Enable Stripe Payment gateway in payments section to use this field.', 'everest-forms' ),
170
  )
@@ -217,7 +217,7 @@ class EVF_Admin_Assets {
217
 
218
  // EverestForms builder setup page.
219
  if ( isset( $_GET['create-form'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification
220
- wp_register_script( 'evf-setup', EVF()->plugin_url() . '/assets/js/admin/evf-setup' . $suffix . '.js', array( 'jquery', 'everest-forms-extensions', 'evf-template-controller' ), EVF_VERSION );
221
  wp_enqueue_script( 'evf-setup' );
222
  wp_localize_script(
223
  'evf-setup',
@@ -228,7 +228,7 @@ class EVF_Admin_Assets {
228
  'template_licence_check_nonce' => wp_create_nonce( 'everest_forms_template_licence_check' ),
229
  'i18n_form_name' => esc_html__( 'Give it a name.', 'everest-forms' ),
230
  'i18n_form_error_name' => esc_html__( 'You must provide a Form name', 'everest-forms' ),
231
- 'upgrade_url' => apply_filters( 'everest_forms_upgrade_url', 'https://wpeverest.com/wordpress-plugins/everest-forms/?utm_source=user-dashboard&utm_medium=form-template&utm_campaign=free-version' ),
232
  'upgrade_button' => esc_html__( 'Upgrade Plan', 'everest-forms' ),
233
  'upgrade_message' => esc_html__( 'This template requires premium addons. Please upgrade to the Premium plan to unlock all these awesome Templates.', 'everest-forms' ),
234
  'upgrade_title' => esc_html__( 'is a Premium Template', 'everest-forms' ),
@@ -247,7 +247,7 @@ class EVF_Admin_Assets {
247
 
248
  // Plugins page.
249
  if ( in_array( $screen_id, array( 'plugins' ), true ) ) {
250
- wp_register_script( 'evf-plugins', EVF()->plugin_url() . '/assets/js/admin/plugins' . $suffix . '.js', array( 'jquery' ), EVF_VERSION, true );
251
  wp_enqueue_script( 'evf-plugins' );
252
  wp_localize_script(
253
  'evf-plugins',
33
  $screen_id = $screen ? $screen->id : '';
34
 
35
  // Register admin styles.
36
+ wp_register_style( 'everest-forms-admin', evf()->plugin_url() . '/assets/css/admin.css', array(), EVF_VERSION );
37
+ wp_register_style( 'everest-forms-admin-menu', evf()->plugin_url() . '/assets/css/menu.css', array(), EVF_VERSION );
38
+ wp_register_style( 'jquery-ui-style', evf()->plugin_url() . '/assets/css/jquery-ui/jquery-ui.min.css', array(), EVF_VERSION );
39
+ wp_register_style( 'jquery-confirm', evf()->plugin_url() . '/assets/css/jquery-confirm/jquery-confirm.min.css', array(), '3.3.0' );
40
+ wp_register_style( 'perfect-scrollbar', evf()->plugin_url() . '/assets/css/perfect-scrollbar/perfect-scrollbar.css', array(), '1.4.0' );
41
 
42
  // Add RTL support for admin styles.
43
  wp_style_add_data( 'everest-forms-admin', 'rtl', 'replace' );
70
  $suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
71
 
72
  // Register scripts.
73
+ wp_register_script( 'everest-forms-admin', evf()->plugin_url() . '/assets/js/admin/admin' . $suffix . '.js', array( 'jquery', 'jquery-blockui', 'jquery-ui-sortable', 'jquery-ui-widget', 'jquery-ui-core', 'tooltipster', 'wp-color-picker', 'perfect-scrollbar' ), EVF_VERSION, true );
74
+ wp_register_script( 'everest-forms-extensions', evf()->plugin_url() . '/assets/js/admin/extensions' . $suffix . '.js', array( 'jquery', 'updates' ), EVF_VERSION, true );
75
+ wp_register_script( 'everest-forms-email-admin', evf()->plugin_url() . '/assets/js/admin/evf-admin-email' . $suffix . '.js', array( 'jquery', 'jquery-blockui', 'jquery-ui-sortable', 'jquery-ui-widget', 'jquery-ui-core', 'tooltipster', 'wp-color-picker', 'perfect-scrollbar' ), EVF_VERSION, true );
76
+ wp_register_script( 'everest-forms-editor', evf()->plugin_url() . '/assets/js/admin/editor' . $suffix . '.js', array( 'jquery' ), EVF_VERSION, true );
77
+ wp_register_script( 'jquery-blockui', evf()->plugin_url() . '/assets/js/jquery-blockui/jquery.blockUI' . $suffix . '.js', array( 'jquery' ), '2.70', true );
78
+ wp_register_script( 'jquery-confirm', evf()->plugin_url() . '/assets/js/jquery-confirm/jquery-confirm' . $suffix . '.js', array( 'jquery' ), '3.3.0', true );
79
+ wp_register_script( 'jquery-tiptip', evf()->plugin_url() . '/assets/js/jquery-tiptip/jquery.tipTip' . $suffix . '.js', array( 'jquery' ), EVF_VERSION, true ); // @deprecated
80
+ wp_register_script( 'tooltipster', evf()->plugin_url() . '/assets/js/tooltipster/tooltipster.bundle' . $suffix . '.js', array( 'jquery' ), '4.6.2', true );
81
+ wp_register_script( 'perfect-scrollbar', evf()->plugin_url() . '/assets/js/perfect-scrollbar/perfect-scrollbar' . $suffix . '.js', array( 'jquery' ), '1.4.0', true );
82
+ wp_register_script( 'evf-clipboard', evf()->plugin_url() . '/assets/js/admin/evf-clipboard' . $suffix . '.js', array( 'jquery' ), EVF_VERSION, true );
83
+ wp_register_script( 'selectWoo', evf()->plugin_url() . '/assets/js/selectWoo/selectWoo.full' . $suffix . '.js', array( 'jquery' ), '1.0.4', true );
84
+ wp_register_script( 'evf-enhanced-select', evf()->plugin_url() . '/assets/js/admin/evf-enhanced-select' . $suffix . '.js', array( 'jquery', 'selectWoo' ), EVF_VERSION, true );
85
+ wp_register_script( 'evf-template-controller', evf()->plugin_url() . '/assets/js/admin/form-template-controller' . $suffix . '.js', array( 'jquery' ), EVF_VERSION, true );
86
  wp_localize_script(
87
  'evf-template-controller',
88
  'evf_templates',
89
  array(
90
+ 'evf_template_all' => EVF_Admin_Forms::get_template_data(),
91
+ 'i18n_get_started' => esc_html__( 'Get Started', 'everest-forms' ),
92
+ 'i18n_get_preview' => esc_html__( 'Preview', 'everest-forms' ),
93
+ 'i18n_pro_feature' => esc_html__( 'Pro', 'everest-forms' ),
94
+ 'template_refresh' => esc_html__( 'Updating Templates', 'everest-forms' ),
95
  )
96
  );
97
  wp_localize_script(
110
  'i18n_searching' => _x( 'Searching&hellip;', 'enhanced select', 'everest-forms' ),
111
  )
112
  );
113
+ wp_register_script( 'evf-form-builder', evf()->plugin_url() . '/assets/js/admin/form-builder' . $suffix . '.js', array( 'jquery', 'jquery-blockui', 'tooltipster', 'jquery-ui-sortable', 'jquery-ui-widget', 'jquery-ui-core', 'jquery-ui-tabs', 'jquery-ui-draggable', 'jquery-ui-droppable', 'jquery-ui-datepicker', 'jquery-confirm', 'evf-clipboard' ), EVF_VERSION, true );
114
  wp_localize_script(
115
  'evf-form-builder',
116
  'evf_data',
119
  array(
120
  'post_id' => isset( $post->ID ) ? $post->ID : '',
121
  'ajax_url' => admin_url( 'admin-ajax.php' ),
122
+ 'tab' => isset( $_GET['tab'] ) ? evf_clean( wp_unslash( $_GET['tab'] ) ) : '', // phpcs:ignore WordPress.Security.NonceVerification, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
123
  'evf_field_drop_nonce' => wp_create_nonce( 'everest_forms_field_drop' ),
124
  'evf_save_form' => wp_create_nonce( 'everest_forms_save_form' ),
125
  'evf_get_next_id' => wp_create_nonce( 'everest_forms_get_next_id' ),
130
  'i18n_installing' => esc_html__( 'Installing', 'everest-forms' ),
131
  'i18n_activating' => esc_html__( 'Activating', 'everest-forms' ),
132
  'i18n_install_activate' => esc_html__( 'Install & Activate', 'everest-forms' ),
133
+ 'i18n_install_only' => esc_html__( 'Activate Plugins', 'everest-forms' ),
134
  'i18n_copy' => esc_html__( '(copy)', 'everest-forms' ),
135
  'i18n_close' => esc_html__( 'Close', 'everest-forms' ),
136
  'i18n_cancel' => esc_html__( 'Cancel', 'everest-forms' ),
150
  'i18n_field_title_payload' => esc_html__( 'Form name can\'t be empty.', 'everest-forms' ),
151
  'email_fields' => evf_get_all_email_fields_by_form_id( isset( $_GET['form_id'] ) ? absint( $_GET['form_id'] ) : 0 ), // phpcs:ignore WordPress.Security.NonceVerification
152
  'all_fields' => evf_get_all_form_fields_by_form_id( isset( $_GET['form_id'] ) ? absint( $_GET['form_id'] ) : 0 ), // phpcs:ignore WordPress.Security.NonceVerification
153
+ 'smart_tags_other' => evf()->smart_tags->other_smart_tags(),
154
  )
155
  )
156
  );
157
 
158
  // Builder upgrade.
159
+ wp_register_script( 'evf-upgrade', evf()->plugin_url() . '/assets/js/admin/upgrade.js', array( 'jquery', 'jquery-confirm' ), EVF_VERSION, false );
160
  wp_localize_script(
161
  'evf-upgrade',
162
  'evf_upgrade',
164
  'upgrade_title' => esc_html__( 'is a PRO Feature', 'everest-forms' ),
165
  'upgrade_message' => esc_html__( 'We\'re sorry, %name% is not available on your plan.<br>Please upgrade to the PRO plan to unlock all these awesome features.', 'everest-forms' ),
166
  'upgrade_button' => esc_html__( 'Upgrade to PRO', 'everest-forms' ),
167
+ 'upgrade_url' => apply_filters( 'everest_forms_upgrade_url', 'https://wpeverest.com/wordpress-plugins/everest-forms/?utm_source=premium-fields&utm_medium=modal-button&utm_campaign=evf-upgrade-to-pro' ),
168
  'enable_stripe_title' => esc_html__( 'Please enable Stripe', 'everest-forms' ),
169
  'enable_stripe_message' => esc_html__( 'Enable Stripe Payment gateway in payments section to use this field.', 'everest-forms' ),
170
  )
217
 
218
  // EverestForms builder setup page.
219
  if ( isset( $_GET['create-form'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification
220
+ wp_register_script( 'evf-setup', evf()->plugin_url() . '/assets/js/admin/evf-setup' . $suffix . '.js', array( 'jquery', 'everest-forms-extensions', 'evf-template-controller' ), EVF_VERSION, true );
221
  wp_enqueue_script( 'evf-setup' );
222
  wp_localize_script(
223
  'evf-setup',
228
  'template_licence_check_nonce' => wp_create_nonce( 'everest_forms_template_licence_check' ),
229
  'i18n_form_name' => esc_html__( 'Give it a name.', 'everest-forms' ),
230
  'i18n_form_error_name' => esc_html__( 'You must provide a Form name', 'everest-forms' ),
231
+ 'upgrade_url' => apply_filters( 'everest_forms_upgrade_url', 'https://wpeverest.com/wordpress-plugins/everest-forms/?utm_source=form-template&utm_medium=button&utm_campaign=evf-upgrade-to-pro' ),
232
  'upgrade_button' => esc_html__( 'Upgrade Plan', 'everest-forms' ),
233
  'upgrade_message' => esc_html__( 'This template requires premium addons. Please upgrade to the Premium plan to unlock all these awesome Templates.', 'everest-forms' ),
234
  'upgrade_title' => esc_html__( 'is a Premium Template', 'everest-forms' ),
247
 
248
  // Plugins page.
249
  if ( in_array( $screen_id, array( 'plugins' ), true ) ) {
250
+ wp_register_script( 'evf-plugins', evf()->plugin_url() . '/assets/js/admin/plugins' . $suffix . '.js', array( 'jquery' ), EVF_VERSION, true );
251
  wp_enqueue_script( 'evf-plugins' );
252
  wp_localize_script(
253
  'evf-plugins',
includes/admin/class-evf-admin-editor.php CHANGED
@@ -29,7 +29,7 @@ class EVF_Admin_Editor {
29
  *
30
  * @param string $editor_id Unique editor identifier, e.g. 'content'.
31
  */
32
- function media_button( $editor_id ) {
33
  if ( ! apply_filters( 'everest_forms_show_media_button', is_admin(), $editor_id ) ) {
34
  return;
35
  }
@@ -40,8 +40,8 @@ class EVF_Admin_Editor {
40
  '<a href="#" class="button evf-insert-form-button" data-editor="%s" title="%s"><span class="wp-media-buttons-icon">%s</span> %s</a>',
41
  esc_attr( $editor_id ),
42
  esc_attr__( 'Add Everest Form', 'everest-forms' ),
43
- $svg_icon,
44
- __( 'Add Form', 'everest-forms' )
45
  );
46
 
47
  // If we have made it, then load the JS.
@@ -53,59 +53,59 @@ class EVF_Admin_Editor {
53
  /**
54
  * Modal window for inserting the form shortcode into TinyMCE.
55
  */
56
- function shortcode_modal() {
57
- ?>
58
- <div id="evf-modal-backdrop" style="display: none"></div>
59
  <div id="evf-modal-wrap" style="display: none">
60
  <form id="evf-modal" tabindex="-1">
61
  <div id="evf-modal-title">
62
- <?php _e( 'Insert Form', 'everest-forms' ); ?>
63
- <button type="button" id="evf-modal-close"><span class="screen-reader-text"><?php _e( 'Close', 'everest-forms' ); ?></span></button>
64
  </div>
65
  <div id="evf-modal-inner">
66
  <div id="evf-modal-options">
67
  <?php
68
- $forms = evf_get_all_forms();
69
 
70
- if ( ! empty( $forms ) ) {
71
- printf( '<p><label for="evf-modal-select-form">%s</label></p>', __( 'Select a form below to insert', 'everest-forms' ) );
72
- echo '<select id="evf-modal-select-form">';
73
- foreach ( $forms as $form_id => $form_value ) {
74
- printf( '<option value="%d">%s</option>', $form_id, esc_html( $form_value ) );
75
- }
76
- echo '</select>';
77
- } else {
78
- echo '<p>';
79
- printf(
80
- wp_kses(
81
- /* translators: %s - Everest Builder page. */
82
- __( 'Whoops, you haven\'t created a form yet. Want to <a href="%s">give it a go</a>?', 'everest-forms' ),
83
- array(
84
- 'a' => array(
85
- 'href' => array(),
86
- ),
87
- )
88
- ),
89
- admin_url( 'admin.php?page=evf-builder' )
90
- );
91
- echo '</p>';
92
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
93
  ?>
94
  </div>
95
  </div>
96
  <div class="submitbox">
97
  <div id="evf-modal-cancel">
98
- <a class="submitdelete deletion" href="#"><?php _e( 'Cancel', 'everest-forms' ); ?></a>
99
  </div>
100
  <?php if ( ! empty( $forms ) ) : ?>
101
  <div id="evf-modal-update">
102
- <button class="button button-primary" id="evf-modal-submit"><?php _e( 'Add Form', 'everest-forms' ); ?></button>
103
  </div>
104
  <?php endif; ?>
105
  </div>
106
  </form>
107
  </div>
108
- <?php
109
  }
110
  }
111
 
29
  *
30
  * @param string $editor_id Unique editor identifier, e.g. 'content'.
31
  */
32
+ public function media_button( $editor_id ) {
33
  if ( ! apply_filters( 'everest_forms_show_media_button', is_admin(), $editor_id ) ) {
34
  return;
35
  }
40
  '<a href="#" class="button evf-insert-form-button" data-editor="%s" title="%s"><span class="wp-media-buttons-icon">%s</span> %s</a>',
41
  esc_attr( $editor_id ),
42
  esc_attr__( 'Add Everest Form', 'everest-forms' ),
43
+ $svg_icon, // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
44
+ esc_html__( 'Add Form', 'everest-forms' )
45
  );
46
 
47
  // If we have made it, then load the JS.
53
  /**
54
  * Modal window for inserting the form shortcode into TinyMCE.
55
  */
56
+ public function shortcode_modal() {
57
+ ?>
58
+ <div id="evf-modal-backdrop" style="display: none"></div>
59
  <div id="evf-modal-wrap" style="display: none">
60
  <form id="evf-modal" tabindex="-1">
61
  <div id="evf-modal-title">
62
+ <?php esc_html_e( 'Insert Form', 'everest-forms' ); ?>
63
+ <button type="button" id="evf-modal-close"><span class="screen-reader-text"><?php esc_html_e( 'Close', 'everest-forms' ); ?></span></button>
64
  </div>
65
  <div id="evf-modal-inner">
66
  <div id="evf-modal-options">
67
  <?php
68
+ $forms = evf_get_all_forms();
69
 
70
+ if ( ! empty( $forms ) ) {
71
+ printf( '<p><label for="evf-modal-select-form">%s</label></p>', esc_html__( 'Select a form below to insert', 'everest-forms' ) );
72
+ echo '<select id="evf-modal-select-form">';
73
+ foreach ( $forms as $form_id => $form_value ) {
74
+ printf( '<option value="%d">%s</option>', esc_attr( $form_id ), esc_html( $form_value ) );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
75
  }
76
+ echo '</select>';
77
+ } else {
78
+ echo '<p>';
79
+ printf(
80
+ wp_kses(
81
+ /* translators: %s - Everest Builder page. */
82
+ __( 'Whoops, you haven\'t created a form yet. Want to <a href="%s">give it a go</a>?', 'everest-forms' ),
83
+ array(
84
+ 'a' => array(
85
+ 'href' => array(),
86
+ ),
87
+ )
88
+ ),
89
+ esc_url( admin_url( 'admin.php?page=evf-builder' ) )
90
+ );
91
+ echo '</p>';
92
+ }
93
  ?>
94
  </div>
95
  </div>
96
  <div class="submitbox">
97
  <div id="evf-modal-cancel">
98
+ <a class="submitdelete deletion" href="#"><?php esc_html_e( 'Cancel', 'everest-forms' ); ?></a>
99
  </div>
100
  <?php if ( ! empty( $forms ) ) : ?>
101
  <div id="evf-modal-update">
102
+ <button class="button button-primary" id="evf-modal-submit"><?php esc_html_e( 'Add Form', 'everest-forms' ); ?></button>
103
  </div>
104
  <?php endif; ?>
105
  </div>
106
  </form>
107
  </div>
108
+ <?php
109
  }
110
  }
111
 
includes/admin/class-evf-admin-entries-table-list.php CHANGED
@@ -55,7 +55,7 @@ class EVF_Admin_Entries_Table_List extends WP_List_Table {
55
  // Check that the user has created at least one form.
56
  if ( ! empty( $this->forms ) ) {
57
  $this->form_id = ! empty( $_REQUEST['form_id'] ) ? absint( $_REQUEST['form_id'] ) : apply_filters( 'everest_forms_entry_list_default_form_id', key( $this->forms ) ); // phpcs:ignore WordPress.Security.NonceVerification
58
- $this->form = EVF()->form->get( $this->form_id );
59
  $this->form_data = ! empty( $this->form->post_content ) ? evf_decode( $this->form->post_content ) : '';
60
  }
61
 
@@ -166,7 +166,7 @@ class EVF_Admin_Entries_Table_List extends WP_List_Table {
166
  * @return array
167
  */
168
  public function get_columns_form_fields( $columns = array(), $display = 3 ) {
169
- $entry_columns = EVF()->form->get_meta( $this->form_id, 'entry_columns' );
170
 
171
  if ( ! $entry_columns && ! empty( $this->form_data['form_fields'] ) ) {
172
  $x = 0;
@@ -378,7 +378,7 @@ class EVF_Admin_Entries_Table_List extends WP_List_Table {
378
  $num_entries = evf_get_count_entries_by_status( $this->form_id );
379
  $total_entries = (int) $num_entries['publish'];
380
  $statuses = array_keys( evf_get_entry_statuses() );
381
- $class = empty( $_REQUEST['status'] ) ? ' class="current"' : ''; // WPCS: input var okay. CSRF ok.
382
 
383
  /* translators: %s: count */
384
  $status_links['all'] = "<a href='admin.php?page=evf-entries&amp;form_id=$this->form_id'$class>" . sprintf( _nx( 'All <span class="count">(%s)</span>', 'All <span class="count">(%s)</span>', $total_entries, 'entries', 'everest-forms' ), number_format_i18n( $total_entries ) ) . '</a>';
@@ -390,7 +390,7 @@ class EVF_Admin_Entries_Table_List extends WP_List_Table {
390
  continue;
391
  }
392
 
393
- if ( isset( $_REQUEST['status'] ) && sanitize_key( wp_unslash( $_REQUEST['status'] ) ) === $status_name ) { // WPCS: input var okay, CSRF ok.
394
  $class = ' class="current"';
395
  }
396
 
@@ -430,7 +430,7 @@ class EVF_Admin_Entries_Table_List extends WP_List_Table {
430
  public function process_bulk_action() {
431
  $pagenum = $this->get_pagenum();
432
  $doaction = $this->current_action();
433
- $entry_ids = isset( $_REQUEST['entry'] ) ? wp_parse_id_list( wp_unslash( $_REQUEST['entry'] ) ) : array(); // WPCS: input var ok, CSRF ok.
434
  $count = 0;
435
 
436
  if ( $doaction ) {
@@ -530,8 +530,8 @@ class EVF_Admin_Entries_Table_List extends WP_List_Table {
530
 
531
  wp_safe_redirect( $sendback );
532
  exit();
533
- } elseif ( ! empty( $_REQUEST['_wp_http_referer'] ) && isset( $_SERVER['REQUEST_URI'] ) ) { // WPCS: input var ok, CSRF ok.
534
- wp_safe_redirect( remove_query_arg( array( '_wp_http_referer', '_wpnonce' ), wp_unslash( $_SERVER['REQUEST_URI'] ) ) ); // WPCS: input var ok, sanitization ok.
535
  exit();
536
  }
537
  }
@@ -603,21 +603,21 @@ class EVF_Admin_Entries_Table_List extends WP_List_Table {
603
  );
604
 
605
  // Handle the status query.
606
- if ( ! empty( $_REQUEST['status'] ) ) { // WPCS: input var okay, CSRF ok.
607
- $args['status'] = sanitize_key( wp_unslash( $_REQUEST['status'] ) ); // WPCS: input var okay, CSRF ok.
608
  }
609
 
610
  // Handle the search query.
611
- if ( ! empty( $_REQUEST['s'] ) ) { // WPCS: input var okay, CSRF ok.
612
- $args['search'] = sanitize_text_field( wp_unslash( $_REQUEST['s'] ) ); // WPCS: input var okay, CSRF ok.
613
  }
614
 
615
- if ( ! empty( $_REQUEST['orderby'] ) ) { // WPCS: input var okay, CSRF ok.
616
- $args['orderby'] = sanitize_text_field( wp_unslash( $_REQUEST['orderby'] ) ); // WPCS: input var okay, CSRF ok.
617
  }
618
 
619
- if ( ! empty( $_REQUEST['order'] ) ) { // WPCS: input var okay, CSRF ok.
620
- $args['order'] = sanitize_text_field( wp_unslash( $_REQUEST['order'] ) ); // WPCS: input var okay, CSRF ok.
621
  }
622
 
623
  // Get the entries.
55
  // Check that the user has created at least one form.
56
  if ( ! empty( $this->forms ) ) {
57
  $this->form_id = ! empty( $_REQUEST['form_id'] ) ? absint( $_REQUEST['form_id'] ) : apply_filters( 'everest_forms_entry_list_default_form_id', key( $this->forms ) ); // phpcs:ignore WordPress.Security.NonceVerification
58
+ $this->form = evf()->form->get( $this->form_id );
59
  $this->form_data = ! empty( $this->form->post_content ) ? evf_decode( $this->form->post_content ) : '';
60
  }
61
 
166
  * @return array
167
  */
168
  public function get_columns_form_fields( $columns = array(), $display = 3 ) {
169
+ $entry_columns = evf()->form->get_meta( $this->form_id, 'entry_columns' );
170
 
171
  if ( ! $entry_columns && ! empty( $this->form_data['form_fields'] ) ) {
172
  $x = 0;
378
  $num_entries = evf_get_count_entries_by_status( $this->form_id );
379
  $total_entries = (int) $num_entries['publish'];
380
  $statuses = array_keys( evf_get_entry_statuses() );
381
+ $class = empty( $_REQUEST['status'] ) ? ' class="current"' : ''; // phpcs:ignore WordPress.Security.NonceVerification
382
 
383
  /* translators: %s: count */
384
  $status_links['all'] = "<a href='admin.php?page=evf-entries&amp;form_id=$this->form_id'$class>" . sprintf( _nx( 'All <span class="count">(%s)</span>', 'All <span class="count">(%s)</span>', $total_entries, 'entries', 'everest-forms' ), number_format_i18n( $total_entries ) ) . '</a>';
390
  continue;
391
  }
392
 
393
+ if ( isset( $_REQUEST['status'] ) && sanitize_key( wp_unslash( $_REQUEST['status'] ) ) === $status_name ) { // phpcs:ignore WordPress.Security.NonceVerification
394
  $class = ' class="current"';
395
  }
396
 
430
  public function process_bulk_action() {
431
  $pagenum = $this->get_pagenum();
432
  $doaction = $this->current_action();
433
+ $entry_ids = isset( $_REQUEST['entry'] ) ? wp_parse_id_list( wp_unslash( $_REQUEST['entry'] ) ) : array(); // phpcs:ignore WordPress.Security.NonceVerification
434
  $count = 0;
435
 
436
  if ( $doaction ) {
530
 
531
  wp_safe_redirect( $sendback );
532
  exit();
533
+ } elseif ( ! empty( $_REQUEST['_wp_http_referer'] ) && isset( $_SERVER['REQUEST_URI'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification
534
+ wp_safe_redirect( remove_query_arg( array( '_wp_http_referer', '_wpnonce' ), wp_unslash( $_SERVER['REQUEST_URI'] ) ) ); // phpcs:ignore WordPress.Security.NonceVerification, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
535
  exit();
536
  }
537
  }
603
  );
604
 
605
  // Handle the status query.
606
+ if ( ! empty( $_REQUEST['status'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification
607
+ $args['status'] = sanitize_key( wp_unslash( $_REQUEST['status'] ) ); // phpcs:ignore WordPress.Security.NonceVerification
608
  }
609
 
610
  // Handle the search query.
611
+ if ( ! empty( $_REQUEST['s'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification
612
+ $args['search'] = sanitize_text_field( wp_unslash( $_REQUEST['s'] ) ); // phpcs:ignore WordPress.Security.NonceVerification
613
  }
614
 
615
+ if ( ! empty( $_REQUEST['orderby'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification
616
+ $args['orderby'] = sanitize_text_field( wp_unslash( $_REQUEST['orderby'] ) ); // phpcs:ignore WordPress.Security.NonceVerification
617
  }
618
 
619
+ if ( ! empty( $_REQUEST['order'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification
620
+ $args['order'] = sanitize_text_field( wp_unslash( $_REQUEST['order'] ) ); // phpcs:ignore WordPress.Security.NonceVerification
621
  }
622
 
623
  // Get the entries.
includes/admin/class-evf-admin-entries.php CHANGED
@@ -27,7 +27,7 @@ class EVF_Admin_Entries {
27
  * @return bool
28
  */
29
  private function is_entries_page() {
30
- return isset( $_GET['page'] ) && 'evf-entries' === $_GET['page']; // WPCS: input var okay, CSRF ok.
31
  }
32
 
33
  /**
@@ -36,7 +36,7 @@ class EVF_Admin_Entries {
36
  public static function page_output() {
37
  if ( apply_filters( 'everest_forms_entries_list_actions', false ) ) {
38
  do_action( 'everest_forms_entries_list_actions_execute' );
39
- } elseif ( isset( $_GET['view-entry'] ) ) {
40
  include 'views/html-admin-page-entries-view.php';
41
  } else {
42
  self::table_list_output();
@@ -67,13 +67,13 @@ class EVF_Admin_Entries {
67
  <form id="entries-list" method="get" data-form-id="<?php echo absint( $entries_table_list->form_id ); ?>" data-last-entry-id="<?php echo absint( end( $entry_ids ) ); ?>">
68
  <input type="hidden" name="page" value="evf-entries" />
69
  <?php if ( ! empty( $_REQUEST['form_id'] ) ) : // phpcs:ignore WordPress.Security.NonceVerification ?>
70
- <input type="hidden" name="form_id" value="<?php echo absint( $_REQUEST['form_id'] ); ?>" />
71
  <?php endif; ?>
72
  <?php if ( ! empty( $_REQUEST['status'] ) ) : // phpcs:ignore WordPress.Security.NonceVerification ?>
73
- <input type="hidden" name="status" value="<?php echo sanitize_text_field( wp_unslash( $_REQUEST['status'] ) ); // phpcs:ignore WordPress.Security.NonceVerification.NoNonceVerification, WordPress.Security.EscapeOutput ?>" />
74
  <?php endif; ?>
75
  <?php
76
- $entries_table_list->search_box( __( 'Search Entries', 'everest-forms' ), 'everest-forms' );
77
  $entries_table_list->display();
78
  ?>
79
  </form>
@@ -112,27 +112,27 @@ class EVF_Admin_Entries {
112
  public function actions() {
113
  if ( $this->is_entries_page() ) {
114
  // Trash entry.
115
- if ( isset( $_GET['trash'] ) ) { // WPCS: input var okay, CSRF ok.
116
  $this->trash_entry();
117
  }
118
 
119
  // Untrash entry.
120
- if ( isset( $_GET['untrash'] ) ) { // WPCS: input var okay, CSRF ok.
121
  $this->untrash_entry();
122
  }
123
 
124
  // Delete entry.
125
- if ( isset( $_GET['delete'] ) ) { // WPCS: input var okay, CSRF ok.
126
  $this->delete_entry();
127
  }
128
 
129
  // Export CSV.
130
- if ( isset( $_REQUEST['export_action'] ) ) { // WPCS: input var okay, CSRF ok.
131
  $this->export_csv();
132
  }
133
 
134
  // Empty Trash.
135
- if ( isset( $_REQUEST['delete_all'] ) || isset( $_REQUEST['delete_all2'] ) ) { // WPCS: input var okay, CSRF ok.
136
  $this->empty_trash();
137
  }
138
  }
@@ -146,8 +146,8 @@ class EVF_Admin_Entries {
146
 
147
  $form_id = isset( $_GET['form_id'] ) ? absint( $_GET['form_id'] ) : '';
148
 
149
- if ( isset( $_GET['trash'] ) ) { // WPCS: input var okay, CSRF ok.
150
- $entry_id = absint( $_GET['trash'] ); // WPCS: input var okay, CSRF ok.
151
 
152
  if ( $entry_id ) {
153
  self::update_status( $entry_id, 'trash' );
@@ -176,8 +176,8 @@ class EVF_Admin_Entries {
176
 
177
  $form_id = isset( $_GET['form_id'] ) ? absint( $_GET['form_id'] ) : '';
178
 
179
- if ( isset( $_GET['untrash'] ) ) { // WPCS: input var okay, CSRF ok.
180
- $entry_id = absint( $_GET['untrash'] ); // WPCS: input var okay, CSRF ok.
181
 
182
  if ( $entry_id ) {
183
  self::update_status( $entry_id, 'publish' );
@@ -206,8 +206,8 @@ class EVF_Admin_Entries {
206
 
207
  $form_id = isset( $_GET['form_id'] ) ? absint( $_GET['form_id'] ) : '';
208
 
209
- if ( isset( $_GET['delete'] ) ) { // WPCS: input var okay, CSRF ok.
210
- $entry_id = absint( $_GET['delete'] ); // WPCS: input var okay, CSRF ok.
211
 
212
  if ( $entry_id ) {
213
  self::remove_entry( $entry_id );
@@ -236,8 +236,8 @@ class EVF_Admin_Entries {
236
 
237
  check_admin_referer( 'bulk-entries' );
238
 
239
- if ( isset( $_GET['form_id'] ) ) { // WPCS: input var okay, CSRF ok.
240
- $form_id = absint( $_GET['form_id'] ); // WPCS: input var okay, CSRF ok.
241
 
242
  if ( $form_id ) {
243
  $count = 0;
@@ -269,9 +269,9 @@ class EVF_Admin_Entries {
269
  public function export_csv() {
270
  check_admin_referer( 'bulk-entries' );
271
 
272
- if ( isset( $_REQUEST['form_id'] ) && current_user_can( 'export' ) ) { // WPCS: input var okay, CSRF ok.
273
  include_once EVF_ABSPATH . 'includes/export/class-evf-entry-csv-exporter.php';
274
- $form_id = absint( $_REQUEST['form_id'] ); // WPCS: input var okay, CSRF ok.
275
  $form_name = strtolower( get_the_title( $form_id ) );
276
 
277
  if ( $form_name ) {
@@ -314,7 +314,7 @@ class EVF_Admin_Entries {
314
  $update = $wpdb->update(
315
  $wpdb->prefix . 'evf_entries',
316
  array(
317
- 'starred' => 'star' === $status ? 1 : 0
318
  ),
319
  array( 'entry_id' => $entry_id ),
320
  array( '%d' ),
@@ -324,7 +324,7 @@ class EVF_Admin_Entries {
324
  $update = $wpdb->update(
325
  $wpdb->prefix . 'evf_entries',
326
  array(
327
- 'viewed' => 'read' === $status ? 1 : 0
328
  ),
329
  array( 'entry_id' => $entry_id ),
330
  array( '%d' ),
27
  * @return bool
28
  */
29
  private function is_entries_page() {
30
+ return isset( $_GET['page'] ) && 'evf-entries' === $_GET['page']; // phpcs:ignore WordPress.Security.NonceVerification
31
  }
32
 
33
  /**
36
  public static function page_output() {
37
  if ( apply_filters( 'everest_forms_entries_list_actions', false ) ) {
38
  do_action( 'everest_forms_entries_list_actions_execute' );
39
+ } elseif ( isset( $_GET['view-entry'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification
40
  include 'views/html-admin-page-entries-view.php';
41
  } else {
42
  self::table_list_output();
67
  <form id="entries-list" method="get" data-form-id="<?php echo absint( $entries_table_list->form_id ); ?>" data-last-entry-id="<?php echo absint( end( $entry_ids ) ); ?>">
68
  <input type="hidden" name="page" value="evf-entries" />
69
  <?php if ( ! empty( $_REQUEST['form_id'] ) ) : // phpcs:ignore WordPress.Security.NonceVerification ?>
70
+ <input type="hidden" name="form_id" value="<?php echo absint( $_REQUEST['form_id'] ); // phpcs:ignore WordPress.Security.NonceVerification ?>" />
71
  <?php endif; ?>
72
  <?php if ( ! empty( $_REQUEST['status'] ) ) : // phpcs:ignore WordPress.Security.NonceVerification ?>
73
+ <input type="hidden" name="status" value="<?php echo sanitize_text_field( wp_unslash( $_REQUEST['status'] ) ); // phpcs:ignore WordPress.Security.NonceVerification, WordPress.Security.EscapeOutput ?>" />
74
  <?php endif; ?>
75
  <?php
76
+ $entries_table_list->search_box( esc_html__( 'Search Entries', 'everest-forms' ), 'everest-forms' );
77
  $entries_table_list->display();
78
  ?>
79
  </form>
112
  public function actions() {
113
  if ( $this->is_entries_page() ) {
114
  // Trash entry.
115
+ if ( isset( $_GET['trash'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification
116
  $this->trash_entry();
117
  }
118
 
119
  // Untrash entry.
120
+ if ( isset( $_GET['untrash'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification
121
  $this->untrash_entry();
122
  }
123
 
124
  // Delete entry.
125
+ if ( isset( $_GET['delete'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification
126
  $this->delete_entry();
127
  }
128
 
129
  // Export CSV.
130
+ if ( isset( $_REQUEST['export_action'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification
131
  $this->export_csv();
132
  }
133
 
134
  // Empty Trash.
135
+ if ( isset( $_REQUEST['delete_all'] ) || isset( $_REQUEST['delete_all2'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification
136
  $this->empty_trash();
137
  }
138
  }
146
 
147
  $form_id = isset( $_GET['form_id'] ) ? absint( $_GET['form_id'] ) : '';
148
 
149
+ if ( isset( $_GET['trash'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification
150
+ $entry_id = absint( $_GET['trash'] ); // phpcs:ignore WordPress.Security.NonceVerification
151
 
152
  if ( $entry_id ) {
153
  self::update_status( $entry_id, 'trash' );
176
 
177
  $form_id = isset( $_GET['form_id'] ) ? absint( $_GET['form_id'] ) : '';
178
 
179
+ if ( isset( $_GET['untrash'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification
180
+ $entry_id = absint( $_GET['untrash'] ); // phpcs:ignore WordPress.Security.NonceVerification
181
 
182
  if ( $entry_id ) {
183
  self::update_status( $entry_id, 'publish' );
206
 
207
  $form_id = isset( $_GET['form_id'] ) ? absint( $_GET['form_id'] ) : '';
208
 
209
+ if ( isset( $_GET['delete'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification
210
+ $entry_id = absint( $_GET['delete'] ); // phpcs:ignore WordPress.Security.NonceVerification
211
 
212
  if ( $entry_id ) {
213
  self::remove_entry( $entry_id );
236
 
237
  check_admin_referer( 'bulk-entries' );
238
 
239
+ if ( isset( $_GET['form_id'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification
240
+ $form_id = absint( $_GET['form_id'] ); // phpcs:ignore WordPress.Security.NonceVerification
241
 
242
  if ( $form_id ) {
243
  $count = 0;
269
  public function export_csv() {
270
  check_admin_referer( 'bulk-entries' );
271
 
272
+ if ( isset( $_REQUEST['form_id'] ) && current_user_can( 'export' ) ) { // phpcs:ignore WordPress.Security.NonceVerification
273
  include_once EVF_ABSPATH . 'includes/export/class-evf-entry-csv-exporter.php';
274
+ $form_id = absint( $_REQUEST['form_id'] ); // phpcs:ignore WordPress.Security.NonceVerification
275
  $form_name = strtolower( get_the_title( $form_id ) );
276
 
277
  if ( $form_name ) {
314
  $update = $wpdb->update(
315
  $wpdb->prefix . 'evf_entries',
316
  array(
317
+ 'starred' => 'star' === $status ? 1 : 0,
318
  ),
319
  array( 'entry_id' => $entry_id ),
320
  array( '%d' ),
324
  $update = $wpdb->update(
325
  $wpdb->prefix . 'evf_entries',
326
  array(
327
+ 'viewed' => 'read' === $status ? 1 : 0,
328
  ),
329
  array( 'entry_id' => $entry_id ),
330
  array( '%d' ),
includes/admin/class-evf-admin-forms-table-list.php CHANGED
@@ -84,7 +84,7 @@ class EVF_Admin_Forms_Table_List extends WP_List_Table {
84
  * @return string
85
  */
86
  public function column_enabled( $posts ) {
87
- $form_data = EVF()->form->get( absint( $posts->ID ), array( 'content_only' => true ) );
88
  $form_enabled = isset( $form_data['form_enabled'] ) ? $form_data['form_enabled'] : 1;
89
 
90
  return '<label class="everest-forms-toggle-form form-enabled"><input type="checkbox" data-form_id="' . absint( $posts->ID ) . '" value="1" ' . checked( 1, $form_enabled, false ) . '/><span class="slider round"></span></label>';
@@ -379,7 +379,7 @@ class EVF_Admin_Forms_Table_List extends WP_List_Table {
379
  */
380
  public function process_bulk_action() {
381
  $action = $this->current_action();
382
- $form_ids = isset( $_REQUEST['form_id'] ) ? wp_parse_id_list( wp_unslash( $_REQUEST['form_id'] ) ) : array(); // WPCS: input var ok, CSRF ok.
383
  $count = 0;
384
 
385
  if ( $form_ids ) {
@@ -466,17 +466,17 @@ class EVF_Admin_Forms_Table_List extends WP_List_Table {
466
  );
467
 
468
  // Handle the status query.
469
- if ( ! empty( $_REQUEST['status'] ) ) { // WPCS: input var ok, CSRF ok.
470
- $args['post_status'] = sanitize_text_field( $_REQUEST['status'] ); // WPCS: input var ok, sanitization ok.
471
  }
472
 
473
  // Handle the search query.
474
- if ( ! empty( $_REQUEST['s'] ) ) { // WPCS: input var ok, CSRF ok.
475
- $args['s'] = sanitize_text_field( trim( wp_unslash( $_REQUEST['s'] ) ) ); // WPCS: sanitization ok, CSRF ok.
476
  }
477
 
478
- $args['orderby'] = isset( $_REQUEST['orderby'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['orderby'] ) ) : 'date_created'; // WPCS: sanitization ok, CSRF ok.
479
- $args['order'] = isset( $_REQUEST['order'] ) && 'ASC' === strtoupper( wp_unslash( $_REQUEST['order'] ) ) ? 'ASC' : 'DESC'; // WPCS: sanitization ok, CSRF ok.
480
 
481
  // Get the forms.
482
  $posts = new WP_Query( $args );
84
  * @return string
85
  */
86
  public function column_enabled( $posts ) {
87
+ $form_data = evf()->form->get( absint( $posts->ID ), array( 'content_only' => true ) );
88
  $form_enabled = isset( $form_data['form_enabled'] ) ? $form_data['form_enabled'] : 1;
89
 
90
  return '<label class="everest-forms-toggle-form form-enabled"><input type="checkbox" data-form_id="' . absint( $posts->ID ) . '" value="1" ' . checked( 1, $form_enabled, false ) . '/><span class="slider round"></span></label>';
379
  */
380
  public function process_bulk_action() {
381
  $action = $this->current_action();
382
+ $form_ids = isset( $_REQUEST['form_id'] ) ? wp_parse_id_list( wp_unslash( $_REQUEST['form_id'] ) ) : array(); // phpcs:ignore WordPress.Security.NonceVerification
383
  $count = 0;
384
 
385
  if ( $form_ids ) {
466
  );
467
 
468
  // Handle the status query.
469
+ if ( ! empty( $_REQUEST['status'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification
470
+ $args['post_status'] = sanitize_text_field( wp_unslash( $_REQUEST['status'] ) ); // phpcs:ignore WordPress.Security.NonceVerification
471
  }
472
 
473
  // Handle the search query.
474
+ if ( ! empty( $_REQUEST['s'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification
475
+ $args['s'] = sanitize_text_field( wp_unslash( $_REQUEST['s'] ) ); // phpcs:ignore WordPress.Security.NonceVerification
476
  }
477
 
478
+ $args['orderby'] = isset( $_REQUEST['orderby'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['orderby'] ) ) : 'date_created'; // phpcs:ignore WordPress.Security.NonceVerification
479
+ $args['order'] = isset( $_REQUEST['order'] ) && 'ASC' === strtoupper( evf_clean( wp_unslash( $_REQUEST['order'] ) ) ) ? 'ASC' : 'DESC'; // phpcs:ignore WordPress.Security.NonceVerification, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
480
 
481
  // Get the forms.
482
  $posts = new WP_Query( $args );
includes/admin/class-evf-admin-forms.php CHANGED
@@ -27,7 +27,7 @@ class EVF_Admin_Forms {
27
  * @return bool
28
  */
29
  private function is_forms_page() {
30
- return isset( $_GET['page'] ) && 'evf-builder' === $_GET['page']; // WPCS: input var okay, CSRF ok.
31
  }
32
 
33
  /**
@@ -37,27 +37,27 @@ class EVF_Admin_Forms {
37
  global $current_tab;
38
 
39
  if ( isset( $_GET['form_id'] ) && $current_tab ) { // phpcs:ignore WordPress.Security.NonceVerification
40
- $form = EVF()->form->get( absint( $_GET['form_id'] ) ); // phpcs:ignore WordPress.Security.NonceVerification
41
- $form_id = is_object( $form ) ? absint( $form->ID ) : absint( $_GET['form_id'] );
42
  $form_data = is_object( $form ) ? evf_decode( $form->post_content ) : false;
43
 
44
  include 'views/html-admin-page-builder.php';
45
  } elseif ( isset( $_GET['create-form'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification
46
- $templates = array();
47
- $refresh_url = add_query_arg(
48
  array(
49
- 'page' => 'evf-builder&create-form=1',
50
- 'action' => 'evf-template-refresh',
51
  'evf-template-nonce' => wp_create_nonce( 'refresh' ),
52
  ),
53
  admin_url( 'admin.php' )
54
  );
55
  $license_plan = evf_get_license_plan();
56
- $current_section = isset( $_GET['section'] ) ? sanitize_text_field( $_GET['section'] ) : '_all';
57
 
58
  if ( '_featured' !== $current_section ) {
59
- $category = isset( $_GET['section'] ) ? $_GET['section'] : 'free';
60
- $templates = self::get_template_data( $category );
61
  }
62
 
63
  /**
@@ -99,8 +99,6 @@ class EVF_Admin_Forms {
99
  /**
100
  * Get section content for the template screen.
101
  *
102
- * @param string $category
103
- * @param string $term
104
  * @return array
105
  */
106
  public static function get_template_data() {
@@ -112,12 +110,12 @@ class EVF_Admin_Forms {
112
  if ( ! is_wp_error( $raw_templates ) ) {
113
  $template_data = json_decode( wp_remote_retrieve_body( $raw_templates ) );
114
 
115
- // Removing directory so the templates can be reinitialized
116
  $folder_path = untrailingslashit( plugin_dir_path( EVF_PLUGIN_FILE ) . '/assets/images/templates' );
117
 
118
- foreach ( $template_data->templates as $templateTuple ) {
119
  // We retrieve the image, then use them instead of the remote server.
120
- $image = wp_remote_get( $templateTuple->image );
121
  $type = wp_remote_retrieve_header( $image, 'content-type' );
122
 
123
  // Remote file check failed, we'll fallback to remote image.
@@ -125,13 +123,13 @@ class EVF_Admin_Forms {
125
  continue;
126
  }
127
 
128
- $temp_name = explode( '/', $templateTuple->image );
129
  $relative_path = $folder_path . '/' . end( $temp_name );
130
- $exists = file_exists( $relative_path );
131
 
132
  // If it exists, utilize this file instead of remote file.
133
  if ( $exists ) {
134
- $templateTuple->image = plugin_dir_url( EVF_PLUGIN_FILE ) . 'assets/images/templates/' . end( $temp_name );
135
  }
136
  }
137
 
@@ -182,12 +180,12 @@ class EVF_Admin_Forms {
182
  public function actions() {
183
  if ( $this->is_forms_page() ) {
184
  // Empty trash.
185
- if ( isset( $_REQUEST['delete_all'] ) || isset( $_REQUEST['delete_all2'] ) ) { // WPCS: input var okay, CSRF ok.
186
  $this->empty_trash();
187
  }
188
 
189
  // Duplicate form.
190
- if ( isset( $_REQUEST['action'] ) && 'duplicate_form' === $_REQUEST['action'] ) { // WPCS: input var okay, CSRF ok.
191
  $this->duplicate_form();
192
  }
193
  }
27
  * @return bool
28
  */
29
  private function is_forms_page() {
30
+ return isset( $_GET['page'] ) && 'evf-builder' === $_GET['page']; // phpcs:ignore WordPress.Security.NonceVerification
31
  }
32
 
33
  /**
37
  global $current_tab;
38
 
39
  if ( isset( $_GET['form_id'] ) && $current_tab ) { // phpcs:ignore WordPress.Security.NonceVerification
40
+ $form = evf()->form->get( absint( $_GET['form_id'] ) ); // phpcs:ignore WordPress.Security.NonceVerification
41
+ $form_id = is_object( $form ) ? absint( $form->ID ) : absint( $_GET['form_id'] ); // phpcs:ignore WordPress.Security.NonceVerification
42
  $form_data = is_object( $form ) ? evf_decode( $form->post_content ) : false;
43
 
44
  include 'views/html-admin-page-builder.php';
45
  } elseif ( isset( $_GET['create-form'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification
46
+ $templates = array();
47
+ $refresh_url = add_query_arg(
48
  array(
49
+ 'page' => 'evf-builder&create-form=1',
50
+ 'action' => 'evf-template-refresh',
51
  'evf-template-nonce' => wp_create_nonce( 'refresh' ),
52
  ),
53
  admin_url( 'admin.php' )
54
  );
55
  $license_plan = evf_get_license_plan();
56
+ $current_section = isset( $_GET['section'] ) ? sanitize_text_field( wp_unslash( $_GET['section'] ) ) : '_all'; // phpcs:ignore WordPress.Security.NonceVerification
57
 
58
  if ( '_featured' !== $current_section ) {
59
+ $category = isset( $_GET['section'] ) ? sanitize_text_field( wp_unslash( $_GET['section'] ) ) : 'free'; // phpcs:ignore WordPress.Security.NonceVerification
60
+ $templates = self::get_template_data( $category );
61
  }
62
 
63
  /**
99
  /**
100
  * Get section content for the template screen.
101
  *
 
 
102
  * @return array
103
  */
104
  public static function get_template_data() {
110
  if ( ! is_wp_error( $raw_templates ) ) {
111
  $template_data = json_decode( wp_remote_retrieve_body( $raw_templates ) );
112
 
113
+ // Removing directory so the templates can be reinitialized.
114
  $folder_path = untrailingslashit( plugin_dir_path( EVF_PLUGIN_FILE ) . '/assets/images/templates' );
115
 
116
+ foreach ( $template_data->templates as $template_tuple ) {
117
  // We retrieve the image, then use them instead of the remote server.
118
+ $image = wp_remote_get( $template_tuple->image );
119
  $type = wp_remote_retrieve_header( $image, 'content-type' );
120
 
121
  // Remote file check failed, we'll fallback to remote image.
123
  continue;
124
  }
125
 
126
+ $temp_name = explode( '/', $template_tuple->image );
127
  $relative_path = $folder_path . '/' . end( $temp_name );
128
+ $exists = file_exists( $relative_path );
129
 
130
  // If it exists, utilize this file instead of remote file.
131
  if ( $exists ) {
132
+ $template_tuple->image = plugin_dir_url( EVF_PLUGIN_FILE ) . 'assets/images/templates/' . end( $temp_name );
133
  }
134
  }
135
 
180
  public function actions() {
181
  if ( $this->is_forms_page() ) {
182
  // Empty trash.
183
+ if ( isset( $_REQUEST['delete_all'] ) || isset( $_REQUEST['delete_all2'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification
184
  $this->empty_trash();
185
  }
186
 
187
  // Duplicate form.
188
+ if ( isset( $_REQUEST['action'] ) && 'duplicate_form' === $_REQUEST['action'] ) { // phpcs:ignore WordPress.Security.NonceVerification
189
  $this->duplicate_form();
190
  }
191
  }
includes/admin/class-evf-admin-import-export.php CHANGED
@@ -14,7 +14,7 @@ defined( 'ABSPATH' ) || exit;
14
  class EVF_Admin_Import_Export {
15
 
16
  /**
17
- * Constructor
18
  */
19
  public function __construct() {
20
  add_action( 'admin_init', array( $this, 'export_json' ) );
@@ -22,8 +22,6 @@ class EVF_Admin_Import_Export {
22
 
23
  /**
24
  * Exports form data along with settings in JSON format.
25
- *
26
- * @return void
27
  */
28
  public function export_json() {
29
  // Check for non empty $_POST.
@@ -75,7 +73,7 @@ class EVF_Admin_Import_Export {
75
  */
76
  public static function import_form() {
77
  // Check for $_FILES set or not.
78
- if ( isset( $_FILES['jsonfile'] ) ) {
79
  $filename = esc_html( sanitize_text_field( wp_unslash( $_FILES['jsonfile']['name'] ) ) );
80
  $extension = pathinfo( $filename, PATHINFO_EXTENSION );
81
 
@@ -145,7 +143,7 @@ class EVF_Admin_Import_Export {
145
  } else {
146
  wp_send_json_error(
147
  array(
148
- 'message' => esc_html__( 'Invalid file format. Only Json File Allowed.', 'everest-forms' ),
149
  )
150
  );
151
  }
14
  class EVF_Admin_Import_Export {
15
 
16
  /**
17
+ * Constructor.
18
  */
19
  public function __construct() {
20
  add_action( 'admin_init', array( $this, 'export_json' ) );
22
 
23
  /**
24
  * Exports form data along with settings in JSON format.
 
 
25
  */
26
  public function export_json() {
27
  // Check for non empty $_POST.
73
  */
74
  public static function import_form() {
75
  // Check for $_FILES set or not.
76
+ if ( isset( $_FILES['jsonfile']['name'], $_FILES['jsonfile']['tmp_name'] ) ) {
77
  $filename = esc_html( sanitize_text_field( wp_unslash( $_FILES['jsonfile']['name'] ) ) );
78
  $extension = pathinfo( $filename, PATHINFO_EXTENSION );
79
 
143
  } else {
144
  wp_send_json_error(
145
  array(
146
+ 'message' => esc_html__( 'Invalid file format. Only JSON File Allowed.', 'everest-forms' ),
147
  )
148
  );
149
  }
includes/admin/class-evf-admin-menus.php CHANGED
@@ -59,7 +59,7 @@ class EVF_Admin_Menus {
59
  * Add menu items.
60
  */
61
  public function admin_menu() {
62
- add_menu_page( __( 'Everest Forms', 'everest-forms' ), __( 'Everest Forms', 'everest-forms' ), 'manage_everest_forms', 'everest-forms', null, $this->get_icon_svg(), '55.5' );
63
 
64
  // Backward compatibility for builder page redirects.
65
  if ( ! empty( $_GET['page'] ) && in_array( wp_unslash( $_GET['page'] ), array( 'everest-forms', 'edit-evf-form', 'evf-status' ), true ) ) { // phpcs:ignore WordPress.Security.NonceVerification
@@ -69,8 +69,8 @@ class EVF_Admin_Menus {
69
  if ( isset( $_GET['tab'], $_GET['form_id'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification
70
  $redirect_url = add_query_arg(
71
  array(
72
- 'tab' => evf_clean( wp_unslash( $_GET['tab'] ) ),
73
- 'form_id' => absint( wp_unslash( $_GET['form_id'] ) ),
74
  ),
75
  admin_url( 'admin.php?page=evf-builder' )
76
  );
@@ -90,9 +90,9 @@ class EVF_Admin_Menus {
90
  * Add menu items.
91
  */
92
  public function builder_menu() {
93
- $builder_page = add_submenu_page( 'everest-forms', __( 'Everest Forms Builder', 'everest-forms' ), __( 'All Forms', 'everest-forms' ), 'manage_everest_forms', 'evf-builder', array( $this, 'builder_page' ) );
94
 
95
- add_submenu_page( 'everest-forms', __( 'Everest Forms Setup', 'everest-forms' ), __( 'Add New', 'everest-forms' ), 'manage_everest_forms', 'evf-builder&create-form=1', array( $this, 'builder_page' ) );
96
 
97
  add_action( 'load-' . $builder_page, array( $this, 'builder_page_init' ) );
98
  }
@@ -109,9 +109,9 @@ class EVF_Admin_Menus {
109
  EVF_Admin_Builder::get_builder_pages();
110
 
111
  // Get current tab/section.
112
- $current_tab = empty( $_GET['tab'] ) ? 'fields' : sanitize_title( wp_unslash( $_GET['tab'] ) ); // WPCS: input var okay, CSRF ok.
113
 
114
- if ( ! isset( $_GET['tab'], $_GET['form_id'] ) ) { // WPCS: input var okay, CSRF ok.
115
  $forms_table_list = new EVF_Admin_Forms_Table_List();
116
 
117
  // Add screen option.
@@ -131,7 +131,7 @@ class EVF_Admin_Menus {
131
  * Add menu item.
132
  */
133
  public function entries_menu() {
134
- $entries_page = add_submenu_page( 'everest-forms', __( 'Everest Forms Entries', 'everest-forms' ), __( 'Entries', 'everest-forms' ), 'manage_everest_forms', 'evf-entries', array( $this, 'entries_page' ) );
135
 
136
  add_action( 'load-' . $entries_page, array( $this, 'entries_page_init' ) );
137
  }
@@ -142,7 +142,7 @@ class EVF_Admin_Menus {
142
  public function entries_page_init() {
143
  global $entries_table_list;
144
 
145
- if ( ! isset( $_GET['view-entry'] ) ) { // WPCS: input var okay, CSRF ok.
146
  $entries_table_list = new EVF_Admin_Entries_Table_List();
147
 
148
  // Add screen option.
@@ -162,7 +162,7 @@ class EVF_Admin_Menus {
162
  * Add menu item.
163
  */
164
  public function settings_menu() {
165
- $settings_page = add_submenu_page( 'everest-forms', __( 'Everest Forms settings', 'everest-forms' ), __( 'Settings', 'everest-forms' ), 'manage_everest_forms', 'evf-settings', array( $this, 'settings_page' ) );
166
 
167
  add_action( 'load-' . $settings_page, array( $this, 'settings_page_init' ) );
168
  }
@@ -177,21 +177,21 @@ class EVF_Admin_Menus {
177
  EVF_Admin_Settings::get_settings_pages();
178
 
179
  // Get current tab/section.
180
- $current_tab = empty( $_GET['tab'] ) ? 'general' : sanitize_title( wp_unslash( $_GET['tab'] ) ); // WPCS: input var okay, CSRF ok.
181
- $current_section = empty( $_REQUEST['section'] ) ? '' : sanitize_title( wp_unslash( $_REQUEST['section'] ) ); // WPCS: input var okay, CSRF ok.
182
 
183
  // Save settings if data has been posted.
184
- if ( apply_filters( '' !== $current_section ? "everest_forms_save_settings_{$current_tab}_{$current_section}" : "everest_forms_save_settings_{$current_tab}", ! empty( $_POST ) ) ) { // WPCS: input var okay, CSRF ok.
185
  EVF_Admin_Settings::save();
186
  }
187
 
188
  // Add any posted messages.
189
- if ( ! empty( $_GET['evf_error'] ) ) { // WPCS: input var okay, CSRF ok.
190
- EVF_Admin_Settings::add_error( wp_kses_post( wp_unslash( $_GET['evf_error'] ) ) ); // WPCS: input var okay, CSRF ok.
191
  }
192
 
193
- if ( ! empty( $_GET['evf_message'] ) ) { // WPCS: input var okay, CSRF ok.
194
- EVF_Admin_Settings::add_message( wp_kses_post( wp_unslash( $_GET['evf_message'] ) ) ); // WPCS: input var okay, CSRF ok.
195
  }
196
 
197
  do_action( 'everest_forms_settings_page_init' );
@@ -201,14 +201,14 @@ class EVF_Admin_Menus {
201
  * Add menu item.
202
  */
203
  public function tools_menu() {
204
- add_submenu_page( 'everest-forms', __( 'Everest Forms tools', 'everest-forms' ), __( 'Tools', 'everest-forms' ), 'manage_everest_forms', 'evf-tools', array( $this, 'tools_page' ) );
205
  }
206
 
207
  /**
208
  * Addons menu item.
209
  */
210
  public function addons_menu() {
211
- add_submenu_page( 'everest-forms', __( 'Everest Forms Add-ons', 'everest-forms' ), __( 'Add-ons', 'everest-forms' ), 'manage_everest_forms', 'evf-addons', array( $this, 'addons_page' ) );
212
  }
213
 
214
  /**
@@ -221,9 +221,9 @@ class EVF_Admin_Menus {
221
  $screen_id = $screen ? $screen->id : '';
222
 
223
  // Check to make sure we're on a EverestForms builder setup page.
224
- if ( isset( $_GET['create-form'] ) && in_array( $screen_id, array( 'everest-forms_page_evf-builder' ), true ) ) {
225
- $parent_file = 'everest-forms'; // WPCS: override ok.
226
- $submenu_file = 'evf-builder&create-form=1'; // WPCS: override ok.
227
  }
228
  }
229
 
59
  * Add menu items.
60
  */
61
  public function admin_menu() {
62
+ add_menu_page( esc_html__( 'Everest Forms', 'everest-forms' ), esc_html__( 'Everest Forms', 'everest-forms' ), 'manage_everest_forms', 'everest-forms', null, $this->get_icon_svg(), '55.5' );
63
 
64
  // Backward compatibility for builder page redirects.
65
  if ( ! empty( $_GET['page'] ) && in_array( wp_unslash( $_GET['page'] ), array( 'everest-forms', 'edit-evf-form', 'evf-status' ), true ) ) { // phpcs:ignore WordPress.Security.NonceVerification
69
  if ( isset( $_GET['tab'], $_GET['form_id'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification
70
  $redirect_url = add_query_arg(
71
  array(
72
+ 'tab' => evf_clean( wp_unslash( $_GET['tab'] ) ), // phpcs:ignore WordPress.Security.NonceVerification
73
+ 'form_id' => absint( wp_unslash( $_GET['form_id'] ) ), // phpcs:ignore WordPress.Security.NonceVerification
74
  ),
75
  admin_url( 'admin.php?page=evf-builder' )
76
  );
90
  * Add menu items.
91
  */
92
  public function builder_menu() {
93
+ $builder_page = add_submenu_page( 'everest-forms', esc_html__( 'Everest Forms Builder', 'everest-forms' ), esc_html__( 'All Forms', 'everest-forms' ), 'manage_everest_forms', 'evf-builder', array( $this, 'builder_page' ) );
94
 
95
+ add_submenu_page( 'everest-forms', esc_html__( 'Everest Forms Setup', 'everest-forms' ), esc_html__( 'Add New', 'everest-forms' ), 'manage_everest_forms', 'evf-builder&create-form=1', array( $this, 'builder_page' ) );
96
 
97
  add_action( 'load-' . $builder_page, array( $this, 'builder_page_init' ) );
98
  }
109
  EVF_Admin_Builder::get_builder_pages();
110
 
111
  // Get current tab/section.
112
+ $current_tab = empty( $_GET['tab'] ) ? 'fields' : sanitize_title( wp_unslash( $_GET['tab'] ) ); // phpcs:ignore WordPress.Security.NonceVerification
113
 
114
+ if ( ! isset( $_GET['tab'], $_GET['form_id'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification
115
  $forms_table_list = new EVF_Admin_Forms_Table_List();
116
 
117
  // Add screen option.
131
  * Add menu item.
132
  */
133
  public function entries_menu() {
134
+ $entries_page = add_submenu_page( 'everest-forms', esc_html__( 'Everest Forms Entries', 'everest-forms' ), esc_html__( 'Entries', 'everest-forms' ), 'manage_everest_forms', 'evf-entries', array( $this, 'entries_page' ) );
135
 
136
  add_action( 'load-' . $entries_page, array( $this, 'entries_page_init' ) );
137
  }
142
  public function entries_page_init() {
143
  global $entries_table_list;
144
 
145
+ if ( ! isset( $_GET['view-entry'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification
146
  $entries_table_list = new EVF_Admin_Entries_Table_List();
147
 
148
  // Add screen option.
162
  * Add menu item.
163
  */
164
  public function settings_menu() {
165
+ $settings_page = add_submenu_page( 'everest-forms', esc_html__( 'Everest Forms settings', 'everest-forms' ), esc_html__( 'Settings', 'everest-forms' ), 'manage_everest_forms', 'evf-settings', array( $this, 'settings_page' ) );
166
 
167
  add_action( 'load-' . $settings_page, array( $this, 'settings_page_init' ) );
168
  }
177
  EVF_Admin_Settings::get_settings_pages();
178
 
179
  // Get current tab/section.
180
+ $current_tab = empty( $_GET['tab'] ) ? 'general' : sanitize_title( wp_unslash( $_GET['tab'] ) ); // phpcs:ignore WordPress.Security.NonceVerification
181
+ $current_section = empty( $_REQUEST['section'] ) ? '' : sanitize_title( wp_unslash( $_REQUEST['section'] ) ); // phpcs:ignore WordPress.Security.NonceVerification
182
 
183
  // Save settings if data has been posted.
184
+ if ( apply_filters( '' !== $current_section ? "everest_forms_save_settings_{$current_tab}_{$current_section}" : "everest_forms_save_settings_{$current_tab}", ! empty( $_POST ) ) ) { // phpcs:ignore WordPress.Security.NonceVerification
185
  EVF_Admin_Settings::save();
186
  }
187
 
188
  // Add any posted messages.
189
+ if ( ! empty( $_GET['evf_error'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification
190
+ EVF_Admin_Settings::add_error( wp_kses_post( wp_unslash( $_GET['evf_error'] ) ) ); // phpcs:ignore WordPress.Security.NonceVerification
191
  }
192
 
193
+ if ( ! empty( $_GET['evf_message'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification
194
+ EVF_Admin_Settings::add_message( wp_kses_post( wp_unslash( $_GET['evf_message'] ) ) ); // phpcs:ignore WordPress.Security.NonceVerification
195
  }
196
 
197
  do_action( 'everest_forms_settings_page_init' );
201
  * Add menu item.
202
  */
203
  public function tools_menu() {
204
+ add_submenu_page( 'everest-forms', esc_html__( 'Everest Forms tools', 'everest-forms' ), esc_html__( 'Tools', 'everest-forms' ), 'manage_everest_forms', 'evf-tools', array( $this, 'tools_page' ) );
205
  }
206
 
207
  /**
208
  * Addons menu item.
209
  */
210
  public function addons_menu() {
211
+ add_submenu_page( 'everest-forms', esc_html__( 'Everest Forms Add-ons', 'everest-forms' ), esc_html__( 'Add-ons', 'everest-forms' ), 'manage_everest_forms', 'evf-addons', array( $this, 'addons_page' ) );
212
  }
213
 
214
  /**
221
  $screen_id = $screen ? $screen->id : '';
222
 
223
  // Check to make sure we're on a EverestForms builder setup page.
224
+ if ( isset( $_GET['create-form'] ) && in_array( $screen_id, array( 'everest-forms_page_evf-builder' ), true ) ) { // phpcs:ignore WordPress.Security.NonceVerification
225
+ $parent_file = 'everest-forms'; // phpcs:ignore WordPress.WP.GlobalVariablesOverride
226
+ $submenu_file = 'evf-builder&create-form=1'; // phpcs:ignore WordPress.WP.GlobalVariablesOverride
227
  }
228
  }
229
 
includes/admin/class-evf-admin-notices.php CHANGED
@@ -113,8 +113,8 @@ class EVF_Admin_Notices {
113
  * Hide a notice if the GET variable is set.
114
  */
115
  public static function hide_notices() {
116
- if ( isset( $_GET['evf-hide-notice'] ) && isset( $_GET['_evf_notice_nonce'] ) ) { // WPCS: input var okay, CSRF ok.
117
- if ( ! wp_verify_nonce( wp_unslash( $_GET['_evf_notice_nonce'] ), 'everest_forms_hide_notices_nonce' ) ) { // WPCS: input var ok, sanitization ok.
118
  wp_die( esc_html__( 'Action failed. Please refresh the page and retry.', 'everest-forms' ) );
119
  }
120
 
@@ -122,7 +122,7 @@ class EVF_Admin_Notices {
122
  wp_die( esc_html__( 'You don&#8217;t have permission to do this.', 'everest-forms' ) );
123
  }
124
 
125
- $hide_notice = sanitize_text_field( wp_unslash( $_GET['evf-hide-notice'] ) ); // WPCS: input var okay, CSRF ok.
126
 
127
  self::remove_notice( $hide_notice );
128
 
@@ -205,7 +205,7 @@ class EVF_Admin_Notices {
205
  if ( EVF_Install::needs_db_update() ) {
206
  $updater = new EVF_Background_Updater();
207
 
208
- if ( $updater->is_updating() || ! empty( $_GET['do_update_everest_forms'] ) ) { // WPCS: input var okay, CSRF ok.
209
  include 'views/html-notice-updating.php';
210
  } else {
211
  include 'views/html-notice-update.php';
@@ -223,7 +223,7 @@ class EVF_Admin_Notices {
223
  global $wpdb;
224
 
225
  $load = false;
226
- $time = current_time( 'timestamp' );
227
  $review = get_option( 'everest_forms_review' );
228
  $activated = get_option( 'everest_forms_activated' );
229
 
@@ -271,7 +271,7 @@ class EVF_Admin_Notices {
271
  global $wp_filter;
272
 
273
  // Bail if we're not on a EverestForms screen or page.
274
- if ( empty( $_REQUEST['page'] ) || false === strpos( sanitize_text_field( wp_unslash( $_REQUEST['page'] ) ), 'evf-' ) ) { // WPCS: input var okay, CSRF ok.
275
  return;
276
  }
277
 
@@ -283,7 +283,7 @@ class EVF_Admin_Notices {
283
  unset( $wp_filter[ $wp_notice ]->callbacks[ $priority ][ $name ] );
284
  continue;
285
  }
286
- if ( ( isset( $_GET['tab'], $_GET['form_id'] ) || isset( $_GET['create-form'] ) ) && 'evf-builder' === $_REQUEST['page'] ) {
287
  unset( $wp_filter[ $wp_notice ]->callbacks[ $priority ][ $name ] );
288
  continue;
289
  }
113
  * Hide a notice if the GET variable is set.
114
  */
115
  public static function hide_notices() {
116
+ if ( isset( $_GET['evf-hide-notice'] ) && isset( $_GET['_evf_notice_nonce'] ) ) {
117
+ if ( ! wp_verify_nonce( wp_unslash( $_GET['_evf_notice_nonce'] ), 'everest_forms_hide_notices_nonce' ) ) { // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
118
  wp_die( esc_html__( 'Action failed. Please refresh the page and retry.', 'everest-forms' ) );
119
  }
120
 
122
  wp_die( esc_html__( 'You don&#8217;t have permission to do this.', 'everest-forms' ) );
123
  }
124
 
125
+ $hide_notice = sanitize_text_field( wp_unslash( $_GET['evf-hide-notice'] ) );
126
 
127
  self::remove_notice( $hide_notice );
128
 
205
  if ( EVF_Install::needs_db_update() ) {
206
  $updater = new EVF_Background_Updater();
207
 
208
+ if ( $updater->is_updating() || ! empty( $_GET['do_update_everest_forms'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification
209
  include 'views/html-notice-updating.php';
210
  } else {
211
  include 'views/html-notice-update.php';
223
  global $wpdb;
224
 
225
  $load = false;
226
+ $time = time();
227
  $review = get_option( 'everest_forms_review' );
228
  $activated = get_option( 'everest_forms_activated' );
229
 
271
  global $wp_filter;
272
 
273
  // Bail if we're not on a EverestForms screen or page.
274
+ if ( empty( $_REQUEST['page'] ) || false === strpos( sanitize_text_field( wp_unslash( $_REQUEST['page'] ) ), 'evf-' ) ) { // phpcs:ignore WordPress.Security.NonceVerification
275
  return;
276
  }
277
 
283
  unset( $wp_filter[ $wp_notice ]->callbacks[ $priority ][ $name ] );
284
  continue;
285
  }
286
+ if ( ( isset( $_GET['tab'], $_GET['form_id'] ) || isset( $_GET['create-form'] ) ) && 'evf-builder' === $_REQUEST['page'] ) { // phpcs:ignore WordPress.Security.NonceVerification
287
  unset( $wp_filter[ $wp_notice ]->callbacks[ $priority ][ $name ] );
288
  continue;
289
  }
includes/admin/class-evf-admin-settings.php CHANGED
@@ -70,7 +70,7 @@ if ( ! class_exists( 'EVF_Admin_Settings', false ) ) :
70
  do_action( 'everest_forms_update_options_' . $current_tab );
71
  do_action( 'everest_forms_update_options' );
72
 
73
- self::add_message( __( 'Your settings have been saved.', 'everest-forms' ) );
74
 
75
  // Clear any unwanted data and flush rules.
76
  update_option( 'everest_forms_queue_flush_rewrite_rules', 'yes' );
@@ -123,7 +123,7 @@ if ( ! class_exists( 'EVF_Admin_Settings', false ) ) :
123
 
124
  do_action( 'everest_forms_settings_start' );
125
 
126
- wp_enqueue_script( 'everest_forms_settings', EVF()->plugin_url() . '/assets/js/admin/settings' . $suffix . '.js', array( 'jquery', 'jquery-confirm', 'jquery-ui-datepicker', 'jquery-ui-sortable', 'iris', 'selectWoo' ), EVF()->version, true );
127
 
128
  wp_localize_script(
129
  'everest_forms_settings',
@@ -147,6 +147,10 @@ if ( ! class_exists( 'EVF_Admin_Settings', false ) ) :
147
  * @return mixed
148
  */
149
  public static function get_option( $option_name, $default = '' ) {
 
 
 
 
150
  // Array value.
151
  if ( strstr( $option_name, '[' ) ) {
152
 
@@ -218,6 +222,9 @@ if ( ! class_exists( 'EVF_Admin_Settings', false ) ) :
218
  if ( ! isset( $value['suffix'] ) ) {
219
  $value['suffix'] = '';
220
  }
 
 
 
221
 
222
  // Custom attribute handling.
223
  $custom_attributes = array();
@@ -275,7 +282,7 @@ if ( ! class_exists( 'EVF_Admin_Settings', false ) ) :
275
  case 'email':
276
  case 'url':
277
  case 'tel':
278
- $option_value = self::get_option( $value['id'], $value['default'] );
279
  $visibility_class = array();
280
 
281
  if ( isset( $value['is_visible'] ) ) {
@@ -284,7 +291,7 @@ if ( ! class_exists( 'EVF_Admin_Settings', false ) ) :
284
 
285
  ?><tr valign="top" class="<?php echo esc_attr( implode( ' ', $visibility_class ) ); ?>">
286
  <th scope="row" class="titledesc">
287
- <label for="<?php echo esc_attr( $value['id'] ); ?>"><?php echo esc_html( $value['title'] ); ?> <?php echo $tooltip_html; // WPCS: XSS ok. ?></label>
288
  </th>
289
  <td class="forminp forminp-<?php echo esc_attr( sanitize_title( $value['type'] ) ); ?>">
290
  <input
@@ -295,8 +302,8 @@ if ( ! class_exists( 'EVF_Admin_Settings', false ) ) :
295
  value="<?php echo esc_attr( $option_value ); ?>"
296
  class="<?php echo esc_attr( $value['class'] ); ?>"
297
  placeholder="<?php echo esc_attr( $value['placeholder'] ); ?>"
298
- <?php echo implode( ' ', $custom_attributes ); // WPCS: XSS ok. ?>
299
- /><?php echo esc_html( $value['suffix'] ); ?> <?php echo $description; // WPCS: XSS ok. ?>
300
  </td>
301
  </tr>
302
  <?php
@@ -304,12 +311,12 @@ if ( ! class_exists( 'EVF_Admin_Settings', false ) ) :
304
 
305
  // Color picker.
306
  case 'color':
307
- $option_value = self::get_option( $value['id'], $value['default'] );
308
 
309
  ?>
310
  <tr valign="top">
311
  <th scope="row" class="titledesc">
312
- <label for="<?php echo esc_attr( $value['id'] ); ?>"><?php echo esc_html( $value['title'] ); ?> <?php echo $tooltip_html; // WPCS: XSS ok. ?></label>
313
  </th>
314
  <td class="forminp forminp-<?php echo esc_attr( sanitize_title( $value['type'] ) ); ?>">&lrm;
315
  <span class="colorpickpreview" style="background: <?php echo esc_attr( $option_value ); ?>">&nbsp;</span>
@@ -322,8 +329,8 @@ if ( ! class_exists( 'EVF_Admin_Settings', false ) ) :
322
  value="<?php echo esc_attr( $option_value ); ?>"
323
  class="<?php echo esc_attr( $value['class'] ); ?>colorpick"
324
  placeholder="<?php echo esc_attr( $value['placeholder'] ); ?>"
325
- <?php echo implode( ' ', $custom_attributes ); // WPCS: XSS ok. ?>
326
- />&lrm; <?php echo $description; // WPCS: XSS ok. ?>
327
  <div id="colorPickerDiv_<?php echo esc_attr( $value['id'] ); ?>" class="colorpickdiv" style="z-index: 100;background:#eee;border:1px solid #ccc;position:absolute;display:none;"></div>
328
  </td>
329
  </tr>
@@ -332,15 +339,15 @@ if ( ! class_exists( 'EVF_Admin_Settings', false ) ) :
332
 
333
  // Textarea.
334
  case 'textarea':
335
- $option_value = self::get_option( $value['id'], $value['default'] );
336
 
337
  ?>
338
  <tr valign="top">
339
  <th scope="row" class="titledesc">
340
- <label for="<?php echo esc_attr( $value['id'] ); ?>"><?php echo esc_html( $value['title'] ); ?> <?php echo $tooltip_html; // WPCS: XSS ok. ?></label>
341
  </th>
342
  <td class="forminp forminp-<?php echo esc_attr( sanitize_title( $value['type'] ) ); ?>">
343
- <?php echo $description; // WPCS: XSS ok. ?>
344
 
345
  <textarea
346
  name="<?php echo esc_attr( $value['id'] ); ?>"
@@ -348,8 +355,8 @@ if ( ! class_exists( 'EVF_Admin_Settings', false ) ) :
348
  style="<?php echo esc_attr( $value['css'] ); ?>"
349
  class="<?php echo esc_attr( $value['class'] ); ?>"
350
  placeholder="<?php echo esc_attr( $value['placeholder'] ); ?>"
351
- <?php echo implode( ' ', $custom_attributes ); // WPCS: XSS ok. ?>
352
- ><?php echo esc_textarea( $option_value ); // WPCS: XSS ok. ?></textarea>
353
  </td>
354
  </tr>
355
  <?php
@@ -358,12 +365,12 @@ if ( ! class_exists( 'EVF_Admin_Settings', false ) ) :
358
  // Select boxes.
359
  case 'select':
360
  case 'multiselect':
361
- $option_value = self::get_option( $value['id'], $value['default'] );
362
 
363
  ?>
364
  <tr valign="top">
365
  <th scope="row" class="titledesc">
366
- <label for="<?php echo esc_attr( $value['id'] ); ?>"><?php echo esc_html( $value['title'] ); ?> <?php echo $tooltip_html; // WPCS: XSS ok. ?></label>
367
  </th>
368
  <td class="forminp forminp-<?php echo esc_attr( sanitize_title( $value['type'] ) ); ?>">
369
  <select
@@ -371,7 +378,7 @@ if ( ! class_exists( 'EVF_Admin_Settings', false ) ) :
371
  id="<?php echo esc_attr( $value['id'] ); ?>"
372
  style="<?php echo esc_attr( $value['css'] ); ?>"
373
  class="<?php echo esc_attr( $value['class'] ); ?>"
374
- <?php echo implode( ' ', $custom_attributes ); // WPCS: XSS ok. ?>
375
  <?php echo 'multiselect' === $value['type'] ? 'multiple="multiple"' : ''; ?>
376
  >
377
  <?php
@@ -392,7 +399,7 @@ if ( ! class_exists( 'EVF_Admin_Settings', false ) ) :
392
  <?php
393
  }
394
  ?>
395
- </select> <?php echo $description; // WPCS: XSS ok. ?>
396
  </td>
397
  </tr>
398
  <?php
@@ -400,16 +407,16 @@ if ( ! class_exists( 'EVF_Admin_Settings', false ) ) :
400
 
401
  // Radio inputs.
402
  case 'radio':
403
- $option_value = self::get_option( $value['id'], $value['default'] );
404
 
405
  ?>
406
  <tr valign="top">
407
  <th scope="row" class="titledesc">
408
- <label for="<?php echo esc_attr( $value['id'] ); ?>"><?php echo esc_html( $value['title'] ); ?> <?php echo $tooltip_html; // WPCS: XSS ok. ?></label>
409
  </th>
410
  <td class="forminp forminp-<?php echo esc_attr( sanitize_title( $value['type'] ) ); ?>">
411
  <fieldset>
412
- <?php echo $description; // WPCS: XSS ok. ?>
413
  <ul class="<?php echo esc_attr( $value['class'] ); ?>">
414
  <?php
415
  foreach ( $value['options'] as $key => $val ) {
@@ -422,7 +429,7 @@ if ( ! class_exists( 'EVF_Admin_Settings', false ) ) :
422
  type="radio"
423
  style="<?php echo esc_attr( $value['css'] ); ?>"
424
  class="<?php echo esc_attr( $value['class'] ); ?>"
425
- <?php echo implode( ' ', $custom_attributes ); // WPCS: XSS ok. ?>
426
  <?php checked( $key, $option_value ); ?>
427
  /> <?php echo esc_html( $val ); ?></label>
428
  </li>
@@ -438,12 +445,12 @@ if ( ! class_exists( 'EVF_Admin_Settings', false ) ) :
438
 
439
  // Radio image inputs.
440
  case 'radio-image':
441
- $option_value = self::get_option( $value['id'], $value['default'] );
442
 
443
  ?>
444
  <tr valign="top">
445
  <th scope="row" class="titledesc">
446
- <label for="<?php echo esc_attr( $value['id'] ); ?>"><?php echo esc_html( $value['title'] ); ?> <?php echo $tooltip_html; // WPCS: XSS ok. ?></label>
447
  </th>
448
  <td class="forminp forminp-<?php echo esc_attr( sanitize_title( $value['type'] ) ); ?>">
449
  <fieldset>
@@ -460,7 +467,7 @@ if ( ! class_exists( 'EVF_Admin_Settings', false ) ) :
460
  type="radio"
461
  style="<?php echo esc_attr( $value['css'] ); ?>"
462
  class="<?php echo esc_attr( $value['class'] ); ?>"
463
- <?php echo implode( ' ', $custom_attributes ); // WPCS: XSS ok. ?>
464
  <?php checked( $key, $option_value ); ?>
465
  />
466
  <?php echo esc_html( $val['name'] ); ?></label>
@@ -469,7 +476,7 @@ if ( ! class_exists( 'EVF_Admin_Settings', false ) ) :
469
  }
470
  ?>
471
  </ul>
472
- <?php echo $description; // WPCS: XSS ok. ?>
473
  </fieldset>
474
  </td>
475
  </tr>
@@ -478,7 +485,7 @@ if ( ! class_exists( 'EVF_Admin_Settings', false ) ) :
478
 
479
  // Checkbox input.
480
  case 'checkbox':
481
- $option_value = self::get_option( $value['id'], $value['default'] );
482
  $visibility_class = array();
483
 
484
  if ( ! isset( $value['hide_if_checked'] ) ) {
@@ -528,9 +535,9 @@ if ( ! class_exists( 'EVF_Admin_Settings', false ) ) :
528
  class="<?php echo esc_attr( isset( $value['class'] ) ? $value['class'] : '' ); ?>"
529
  value="1"
530
  <?php checked( $option_value, 'yes' ); ?>
531
- <?php echo implode( ' ', $custom_attributes ); // WPCS: XSS ok. ?>
532
- /> <?php echo $description; // WPCS: XSS ok. ?>
533
- </label> <?php echo $tooltip_html; // WPCS: XSS ok. ?>
534
  <?php
535
 
536
  if ( ! isset( $value['checkboxgroup'] ) || 'end' === $value['checkboxgroup'] ) {
@@ -556,7 +563,7 @@ if ( ! class_exists( 'EVF_Admin_Settings', false ) ) :
556
  'show_option_none' => ' ',
557
  'class' => $value['class'],
558
  'echo' => false,
559
- 'selected' => absint( self::get_option( $value['id'], $value['default'] ) ),
560
  'post_status' => 'publish,private,draft',
561
  );
562
 
@@ -567,10 +574,10 @@ if ( ! class_exists( 'EVF_Admin_Settings', false ) ) :
567
  ?>
568
  <tr valign="top" class="single_select_page">
569
  <th scope="row" class="titledesc">
570
- <label><?php echo esc_html( $value['title'] ); ?> <?php echo $tooltip_html; // WPCS: XSS ok. ?></label>
571
  </th>
572
  <td class="forminp">
573
- <?php echo str_replace( ' id=', " data-placeholder='" . esc_attr__( 'Select a page&hellip;', 'everest-forms' ) . "' style='" . $value['css'] . "' class='" . $value['class'] . "' id=", wp_dropdown_pages( $args ) ); // WPCS: XSS ok. ?> <?php echo $description; // WPCS: XSS ok. ?>
574
  </td>
575
  </tr>
576
  <?php
@@ -584,11 +591,11 @@ if ( ! class_exists( 'EVF_Admin_Settings', false ) ) :
584
  'months' => __( 'Month(s)', 'everest-forms' ),
585
  'years' => __( 'Year(s)', 'everest-forms' ),
586
  );
587
- $option_value = evf_parse_relative_date_option( self::get_option( $value['id'], $value['default'] ) );
588
  ?>
589
  <tr valign="top">
590
  <th scope="row" class="titledesc">
591
- <label for="<?php echo esc_attr( $value['id'] ); ?>"><?php echo esc_html( $value['title'] ); ?> <?php echo $tooltip_html; // WPCS: XSS ok. ?></label>
592
  </th>
593
  <td class="forminp">
594
  <input
@@ -601,7 +608,7 @@ if ( ! class_exists( 'EVF_Admin_Settings', false ) ) :
601
  placeholder="<?php echo esc_attr( $value['placeholder'] ); ?>"
602
  step="1"
603
  min="1"
604
- <?php echo implode( ' ', $custom_attributes ); // WPCS: XSS ok. ?>
605
  />&nbsp;
606
  <select name="<?php echo esc_attr( $value['id'] ); ?>[unit]" style="width: auto;">
607
  <?php
@@ -609,7 +616,7 @@ if ( ! class_exists( 'EVF_Admin_Settings', false ) ) :
609
  echo '<option value="' . esc_attr( $value ) . '"' . selected( $option_value['unit'], $value, false ) . '>' . esc_html( $label ) . '</option>';
610
  }
611
  ?>
612
- </select> <?php echo ( $description ) ? $description : ''; // WPCS: XSS ok. ?>
613
  </td>
614
  </tr>
615
  <?php
@@ -675,7 +682,7 @@ if ( ! class_exists( 'EVF_Admin_Settings', false ) ) :
675
  */
676
  public static function save_fields( $options, $data = null ) {
677
  if ( is_null( $data ) ) {
678
- $data = $_POST; // WPCS: input var okay, CSRF ok.
679
  }
680
  if ( empty( $data ) ) {
681
  return false;
@@ -687,7 +694,7 @@ if ( ! class_exists( 'EVF_Admin_Settings', false ) ) :
687
 
688
  // Loop options and get values to save.
689
  foreach ( $options as $option ) {
690
- if ( ! isset( $option['id'] ) || ! isset( $option['type'] ) ) {
691
  continue;
692
  }
693
 
70
  do_action( 'everest_forms_update_options_' . $current_tab );
71
  do_action( 'everest_forms_update_options' );
72
 
73
+ self::add_message( esc_html__( 'Your settings have been saved.', 'everest-forms' ) );
74
 
75
  // Clear any unwanted data and flush rules.
76
  update_option( 'everest_forms_queue_flush_rewrite_rules', 'yes' );
123
 
124
  do_action( 'everest_forms_settings_start' );
125
 
126
+ wp_enqueue_script( 'everest_forms_settings', evf()->plugin_url() . '/assets/js/admin/settings' . $suffix . '.js', array( 'jquery', 'jquery-confirm', 'jquery-ui-datepicker', 'jquery-ui-sortable', 'iris', 'selectWoo' ), evf()->version, true );
127
 
128
  wp_localize_script(
129
  'everest_forms_settings',
147
  * @return mixed
148
  */
149
  public static function get_option( $option_name, $default = '' ) {
150
+ if ( ! $option_name ) {
151
+ return $default;
152
+ }
153
+
154
  // Array value.
155
  if ( strstr( $option_name, '[' ) ) {
156
 
222
  if ( ! isset( $value['suffix'] ) ) {
223
  $value['suffix'] = '';
224
  }
225
+ if ( ! isset( $value['value'] ) ) {
226
+ $value['value'] = self::get_option( $value['id'], $value['default'] );
227
+ }
228
 
229
  // Custom attribute handling.
230
  $custom_attributes = array();
282
  case 'email':
283
  case 'url':
284
  case 'tel':
285
+ $option_value = $value['value'];
286
  $visibility_class = array();
287
 
288
  if ( isset( $value['is_visible'] ) ) {
291
 
292
  ?><tr valign="top" class="<?php echo esc_attr( implode( ' ', $visibility_class ) ); ?>">
293
  <th scope="row" class="titledesc">
294
+ <label for="<?php echo esc_attr( $value['id'] ); ?>"><?php echo esc_html( $value['title'] ); ?> <?php echo $tooltip_html; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></label>
295
  </th>
296
  <td class="forminp forminp-<?php echo esc_attr( sanitize_title( $value['type'] ) ); ?>">
297
  <input
302
  value="<?php echo esc_attr( $option_value ); ?>"
303
  class="<?php echo esc_attr( $value['class'] ); ?>"
304
  placeholder="<?php echo esc_attr( $value['placeholder'] ); ?>"
305
+ <?php echo implode( ' ', $custom_attributes ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
306
+ /><?php echo esc_html( $value['suffix'] ); ?> <?php echo $description; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
307
  </td>
308
  </tr>
309
  <?php
311
 
312
  // Color picker.
313
  case 'color':
314
+ $option_value = $value['value'];
315
 
316
  ?>
317
  <tr valign="top">
318
  <th scope="row" class="titledesc">
319
+ <label for="<?php echo esc_attr( $value['id'] ); ?>"><?php echo esc_html( $value['title'] ); ?> <?php echo $tooltip_html; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></label>
320
  </th>
321
  <td class="forminp forminp-<?php echo esc_attr( sanitize_title( $value['type'] ) ); ?>">&lrm;
322
  <span class="colorpickpreview" style="background: <?php echo esc_attr( $option_value ); ?>">&nbsp;</span>
329
  value="<?php echo esc_attr( $option_value ); ?>"
330
  class="<?php echo esc_attr( $value['class'] ); ?>colorpick"
331
  placeholder="<?php echo esc_attr( $value['placeholder'] ); ?>"
332
+ <?php echo implode( ' ', $custom_attributes ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
333
+ />&lrm; <?php echo $description; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
334
  <div id="colorPickerDiv_<?php echo esc_attr( $value['id'] ); ?>" class="colorpickdiv" style="z-index: 100;background:#eee;border:1px solid #ccc;position:absolute;display:none;"></div>
335
  </td>
336
  </tr>
339
 
340
  // Textarea.
341
  case 'textarea':
342
+ $option_value = $value['value'];
343
 
344
  ?>
345
  <tr valign="top">
346
  <th scope="row" class="titledesc">
347
+ <label for="<?php echo esc_attr( $value['id'] ); ?>"><?php echo esc_html( $value['title'] ); ?> <?php echo $tooltip_html; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></label>
348
  </th>
349
  <td class="forminp forminp-<?php echo esc_attr( sanitize_title( $value['type'] ) ); ?>">
350
+ <?php echo $description; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
351
 
352
  <textarea
353
  name="<?php echo esc_attr( $value['id'] ); ?>"
355
  style="<?php echo esc_attr( $value['css'] ); ?>"
356
  class="<?php echo esc_attr( $value['class'] ); ?>"
357
  placeholder="<?php echo esc_attr( $value['placeholder'] ); ?>"
358
+ <?php echo implode( ' ', $custom_attributes ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
359
+ ><?php echo esc_textarea( $option_value ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></textarea>
360
  </td>
361
  </tr>
362
  <?php
365
  // Select boxes.
366
  case 'select':
367
  case 'multiselect':
368
+ $option_value = $value['value'];
369
 
370
  ?>
371
  <tr valign="top">
372
  <th scope="row" class="titledesc">
373
+ <label for="<?php echo esc_attr( $value['id'] ); ?>"><?php echo esc_html( $value['title'] ); ?> <?php echo $tooltip_html; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></label>
374
  </th>
375
  <td class="forminp forminp-<?php echo esc_attr( sanitize_title( $value['type'] ) ); ?>">
376
  <select
378
  id="<?php echo esc_attr( $value['id'] ); ?>"
379
  style="<?php echo esc_attr( $value['css'] ); ?>"
380
  class="<?php echo esc_attr( $value['class'] ); ?>"
381
+ <?php echo implode( ' ', $custom_attributes ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
382
  <?php echo 'multiselect' === $value['type'] ? 'multiple="multiple"' : ''; ?>
383
  >
384
  <?php
399
  <?php
400
  }
401
  ?>
402
+ </select> <?php echo $description; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
403
  </td>
404
  </tr>
405
  <?php
407
 
408
  // Radio inputs.
409
  case 'radio':
410
+ $option_value = $value['value'];
411
 
412
  ?>
413
  <tr valign="top">
414
  <th scope="row" class="titledesc">
415
+ <label for="<?php echo esc_attr( $value['id'] ); ?>"><?php echo esc_html( $value['title'] ); ?> <?php echo $tooltip_html; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></label>
416
  </th>
417
  <td class="forminp forminp-<?php echo esc_attr( sanitize_title( $value['type'] ) ); ?>">
418
  <fieldset>
419
+ <?php echo $description; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
420
  <ul class="<?php echo esc_attr( $value['class'] ); ?>">
421
  <?php
422
  foreach ( $value['options'] as $key => $val ) {
429
  type="radio"
430
  style="<?php echo esc_attr( $value['css'] ); ?>"
431
  class="<?php echo esc_attr( $value['class'] ); ?>"
432
+ <?php echo implode( ' ', $custom_attributes ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
433
  <?php checked( $key, $option_value ); ?>
434
  /> <?php echo esc_html( $val ); ?></label>
435
  </li>
445
 
446
  // Radio image inputs.
447
  case 'radio-image':
448
+ $option_value = $value['value'];
449
 
450
  ?>
451
  <tr valign="top">
452
  <th scope="row" class="titledesc">
453
+ <label for="<?php echo esc_attr( $value['id'] ); ?>"><?php echo esc_html( $value['title'] ); ?> <?php echo $tooltip_html; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></label>
454
  </th>
455
  <td class="forminp forminp-<?php echo esc_attr( sanitize_title( $value['type'] ) ); ?>">
456
  <fieldset>
467
  type="radio"
468
  style="<?php echo esc_attr( $value['css'] ); ?>"
469
  class="<?php echo esc_attr( $value['class'] ); ?>"
470
+ <?php echo implode( ' ', $custom_attributes ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
471
  <?php checked( $key, $option_value ); ?>
472
  />
473
  <?php echo esc_html( $val['name'] ); ?></label>
476
  }
477
  ?>
478
  </ul>
479
+ <?php echo $description; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
480
  </fieldset>
481
  </td>
482
  </tr>
485
 
486
  // Checkbox input.
487
  case 'checkbox':
488
+ $option_value = $value['value'];
489
  $visibility_class = array();
490
 
491
  if ( ! isset( $value['hide_if_checked'] ) ) {
535
  class="<?php echo esc_attr( isset( $value['class'] ) ? $value['class'] : '' ); ?>"
536
  value="1"
537
  <?php checked( $option_value, 'yes' ); ?>
538
+ <?php echo implode( ' ', $custom_attributes ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
539
+ /> <?php echo $description; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
540
+ </label> <?php echo $tooltip_html; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
541
  <?php
542
 
543
  if ( ! isset( $value['checkboxgroup'] ) || 'end' === $value['checkboxgroup'] ) {
563
  'show_option_none' => ' ',
564
  'class' => $value['class'],
565
  'echo' => false,
566
+ 'selected' => absint( $value['value'] ),
567
  'post_status' => 'publish,private,draft',
568
  );
569
 
574
  ?>
575
  <tr valign="top" class="single_select_page">
576
  <th scope="row" class="titledesc">
577
+ <label><?php echo esc_html( $value['title'] ); ?> <?php echo $tooltip_html; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></label>
578
  </th>
579
  <td class="forminp">
580
+ <?php echo str_replace( ' id=', " data-placeholder='" . esc_attr__( 'Select a page&hellip;', 'everest-forms' ) . "' style='" . $value['css'] . "' class='" . $value['class'] . "' id=", wp_dropdown_pages( $args ) ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?> <?php echo $description; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
581
  </td>
582
  </tr>
583
  <?php
591
  'months' => __( 'Month(s)', 'everest-forms' ),
592
  'years' => __( 'Year(s)', 'everest-forms' ),
593
  );
594
+ $option_value = evf_parse_relative_date_option( $value['value'] );
595
  ?>
596
  <tr valign="top">
597
  <th scope="row" class="titledesc">
598
+ <label for="<?php echo esc_attr( $value['id'] ); ?>"><?php echo esc_html( $value['title'] ); ?> <?php echo $tooltip_html; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></label>
599
  </th>
600
  <td class="forminp">
601
  <input
608
  placeholder="<?php echo esc_attr( $value['placeholder'] ); ?>"
609
  step="1"
610
  min="1"
611
+ <?php echo implode( ' ', $custom_attributes ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
612
  />&nbsp;
613
  <select name="<?php echo esc_attr( $value['id'] ); ?>[unit]" style="width: auto;">
614
  <?php
616
  echo '<option value="' . esc_attr( $value ) . '"' . selected( $option_value['unit'], $value, false ) . '>' . esc_html( $label ) . '</option>';
617
  }
618
  ?>
619
+ </select> <?php echo ( $description ) ? $description : ''; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
620
  </td>
621
  </tr>
622
  <?php
682
  */
683
  public static function save_fields( $options, $data = null ) {
684
  if ( is_null( $data ) ) {
685
+ $data = $_POST; // phpcs:ignore WordPress.Security.NonceVerification
686
  }
687
  if ( empty( $data ) ) {
688
  return false;
694
 
695
  // Loop options and get values to save.
696
  foreach ( $options as $option ) {
697
+ if ( ! isset( $option['id'] ) || ! isset( $option['type'] ) || ( isset( $option['is_option'] ) && false === $option['is_option'] ) ) {
698
  continue;
699
  }
700
 
includes/admin/class-evf-admin-tools.php CHANGED
@@ -47,15 +47,15 @@ class EVF_Admin_Tools {
47
  public static function status_logs_file() {
48
  $logs = self::scan_log_files();
49
 
50
- if ( ! empty( $_REQUEST['log_file'] ) && isset( $logs[ sanitize_title( $_REQUEST['log_file'] ) ] ) ) {
51
- $viewed_log = $logs[ sanitize_title( $_REQUEST['log_file'] ) ];
52
  } elseif ( ! empty( $logs ) ) {
53
  $viewed_log = current( $logs );
54
  }
55
 
56
  $handle = ! empty( $viewed_log ) ? self::get_log_file_handle( $viewed_log ) : '';
57
 
58
- if ( ! empty( $_REQUEST['handle'] ) ) {
59
  self::remove_log();
60
  }
61
 
@@ -76,13 +76,13 @@ class EVF_Admin_Tools {
76
  }
77
 
78
  // We don't need to write to the file, so just open for reading.
79
- $fp = fopen( $file, 'r' );
80
 
81
  // Pull only the first 8kiB of the file in.
82
- $file_data = fread( $fp, 8192 );
83
 
84
  // PHP will close file handle, but we are good citizens.
85
- fclose( $fp );
86
 
87
  // Make sure we catch CR-only line endings.
88
  $file_data = str_replace( "\r", "\n", $file_data );
@@ -98,7 +98,7 @@ class EVF_Admin_Tools {
98
  /**
99
  * Return the log file handle.
100
  *
101
- * @param string $filename
102
  * @return string
103
  */
104
  public static function get_log_file_handle( $filename ) {
@@ -108,18 +108,18 @@ class EVF_Admin_Tools {
108
  /**
109
  * Scan the template files.
110
  *
111
- * @param string $template_path
112
  * @return array
113
  */
114
  public static function scan_template_files( $template_path ) {
115
- $files = @scandir( $template_path );
116
  $result = array();
117
 
118
  if ( ! empty( $files ) ) {
119
 
120
  foreach ( $files as $key => $value ) {
121
 
122
- if ( ! in_array( $value, array( '.', '..' ) ) ) {
123
 
124
  if ( is_dir( $template_path . DIRECTORY_SEPARATOR . $value ) ) {
125
  $sub_files = self::scan_template_files( $template_path . DIRECTORY_SEPARATOR . $value );
@@ -141,14 +141,14 @@ class EVF_Admin_Tools {
141
  * @return array
142
  */
143
  public static function scan_log_files() {
144
- $files = @scandir( EVF_LOG_DIR );
145
  $result = array();
146
 
147
  if ( ! empty( $files ) ) {
148
 
149
  foreach ( $files as $key => $value ) {
150
 
151
- if ( ! in_array( $value, array( '.', '..' ) ) ) {
152
  if ( ! is_dir( $value ) && strstr( $value, '.log' ) ) {
153
  $result[ sanitize_title( $value ) ] = $value;
154
  }
@@ -163,13 +163,13 @@ class EVF_Admin_Tools {
163
  * Remove/delete the chosen file.
164
  */
165
  public static function remove_log() {
166
- if ( empty( $_REQUEST['_wpnonce'] ) || ! wp_verify_nonce( $_REQUEST['_wpnonce'], 'remove_log' ) ) {
167
- wp_die( __( 'Action failed. Please refresh the page and retry.', 'everest-forms' ) );
168
  }
169
 
170
  if ( ! empty( $_REQUEST['handle'] ) ) {
171
  $log_handler = new EVF_Log_Handler_File();
172
- $log_handler->remove( $_REQUEST['handle'] );
173
  }
174
 
175
  wp_safe_redirect( esc_url_raw( admin_url( 'admin.php?page=evf-tools&tab=logs' ) ) );
47
  public static function status_logs_file() {
48
  $logs = self::scan_log_files();
49
 
50
+ if ( ! empty( $_REQUEST['log_file'] ) && isset( $logs[ sanitize_title( wp_unslash( $_REQUEST['log_file'] ) ) ] ) ) { // phpcs:ignore WordPress.Security.NonceVerification
51
+ $viewed_log = $logs[ sanitize_title( wp_unslash( $_REQUEST['log_file'] ) ) ]; // phpcs:ignore WordPress.Security.NonceVerification
52
  } elseif ( ! empty( $logs ) ) {
53
  $viewed_log = current( $logs );
54
  }
55
 
56
  $handle = ! empty( $viewed_log ) ? self::get_log_file_handle( $viewed_log ) : '';
57
 
58
+ if ( ! empty( $_REQUEST['handle'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification
59
  self::remove_log();
60
  }
61
 
76
  }
77
 
78
  // We don't need to write to the file, so just open for reading.
79
+ $fp = fopen( $file, 'r' ); // @codingStandardsIgnoreLine
80
 
81
  // Pull only the first 8kiB of the file in.
82
+ $file_data = fread( $fp, 8192 ); // @codingStandardsIgnoreLine
83
 
84
  // PHP will close file handle, but we are good citizens.
85
+ fclose( $fp ); // @codingStandardsIgnoreLine
86
 
87
  // Make sure we catch CR-only line endings.
88
  $file_data = str_replace( "\r", "\n", $file_data );
98
  /**
99
  * Return the log file handle.
100
  *
101
+ * @param string $filename Filename to get the handle for.
102
  * @return string
103
  */
104
  public static function get_log_file_handle( $filename ) {
108
  /**
109
  * Scan the template files.
110
  *
111
+ * @param string $template_path Path to the template directory.
112
  * @return array
113
  */
114
  public static function scan_template_files( $template_path ) {
115
+ $files = @scandir( $template_path ); // @codingStandardsIgnoreLine
116
  $result = array();
117
 
118
  if ( ! empty( $files ) ) {
119
 
120
  foreach ( $files as $key => $value ) {
121
 
122
+ if ( ! in_array( $value, array( '.', '..' ), true ) ) {
123
 
124
  if ( is_dir( $template_path . DIRECTORY_SEPARATOR . $value ) ) {
125
  $sub_files = self::scan_template_files( $template_path . DIRECTORY_SEPARATOR . $value );
141
  * @return array
142
  */
143
  public static function scan_log_files() {
144
+ $files = @scandir( EVF_LOG_DIR ); // @codingStandardsIgnoreLine
145
  $result = array();
146
 
147
  if ( ! empty( $files ) ) {
148
 
149
  foreach ( $files as $key => $value ) {
150
 
151
+ if ( ! in_array( $value, array( '.', '..' ), true ) ) {
152
  if ( ! is_dir( $value ) && strstr( $value, '.log' ) ) {
153
  $result[ sanitize_title( $value ) ] = $value;
154
  }
163
  * Remove/delete the chosen file.
164
  */
165
  public static function remove_log() {
166
+ if ( empty( $_REQUEST['_wpnonce'] ) || ! wp_verify_nonce( wp_unslash( $_REQUEST['_wpnonce'] ), 'remove_log' ) ) { // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
167
+ wp_die( esc_html__( 'Action failed. Please refresh the page and retry.', 'everest-forms' ) );
168
  }
169
 
170
  if ( ! empty( $_REQUEST['handle'] ) ) {
171
  $log_handler = new EVF_Log_Handler_File();
172
+ $log_handler->remove( wp_unslash( $_REQUEST['handle'] ) ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
173
  }
174
 
175
  wp_safe_redirect( esc_url_raw( admin_url( 'admin.php?page=evf-tools&tab=logs' ) ) );
includes/admin/class-evf-admin-welcome.php CHANGED
@@ -67,7 +67,7 @@ class EVF_Admin_Welcome {
67
  <div class="eveverest-forms-welcome-header">
68
  <div class="eveverest-forms-welcome-header__logo-wrap">
69
  <div class="eveverest-forms-welcome-header__logo-icon">
70
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M18.88,3l1.37,2.25H15.89L14.52,3ZM21,21H1L12,3.15l6.84,11.11H10.6L12,12H14.8L12,7.43,5,18.74H21.58L23,21ZM18.64,9.77,17.27,7.53h4.36L23,9.77Z"/></svg>
71
  </div>
72
  <span><?php esc_html_e( 'Getting Started', 'everest-forms' ); ?></span>
73
  </div>
@@ -81,13 +81,13 @@ class EVF_Admin_Welcome {
81
  <p><?php esc_html_e( 'Thank you for choosing Everest Forms, the most powerful and easy drag & drop WordPress form builder in the market.', 'everest-forms' ); ?></p>
82
  </div>
83
  <a class="everest-forms-welcome-video welcome-video-play">
84
- <img src="<?php echo plugins_url( 'assets/images/welcome-video-thumb.png', EVF_PLUGIN_FILE ); ?>" alt="<?php esc_attr_e( 'Watch how to create your first form with Everest Forms', 'everest-forms' ); ?>" class="everest-froms-welcome-thumb">
85
  <button class="everest-forms-welcome-video__button dashicons dashicons-controls-play"></button>
86
  </a>
87
  <div class="everest-forms-welcome-container__action">
88
  <a href="<?php echo esc_url( admin_url( 'admin.php?page=evf-builder&create-form=1' ) ); ?>" class="everest-forms-welcome-container__action-card">
89
  <figure class="everest-forms-welcome-container__action-card-img">
90
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"><defs><style>.cls-1{fill:none;}.cls-1,.cls-2{stroke:#3D8FC9;stroke-linecap:round;stroke-linejoin:round;stroke-width:2px;}.cls-2{fill:#E1F0FA;}</style></defs><rect class="cls-1" x="12" y="11" width="40" height="48" rx="2" ry="2"/><rect class="cls-2" x="18" y="46" width="6" height="6"/><circle class="cls-2" cx="12" cy="52" r="7"/><line class="cls-1" x1="12" y1="49" x2="12" y2="55"/><line class="cls-1" x1="9" y1="52" x2="15" y2="52"/><path class="cls-2" d="M35,8a3,3,0,0,0-6,0H25a2,2,0,0,0-2,2v2a2,2,0,0,0,2,2H39a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z"/><rect class="cls-2" x="49" y="29" width="6" height="18"/><polygon class="cls-2" points="52 57 49 51 49 47 55 47 55 51 52 57"/><path class="cls-2" d="M52,23h0a3,3,0,0,1,3,3v3a0,0,0,0,1,0,0H49a0,0,0,0,1,0,0V26A3,3,0,0,1,52,23Z"/><line class="cls-1" x1="59" y1="25" x2="59" y2="39"/><line class="cls-1" x1="49.5" y1="29" x2="58.5" y2="29"/><rect class="cls-2" x="18" y="22" width="28" height="6"/><rect class="cls-2" x="18" y="34" width="6" height="6"/><line class="cls-1" x1="28" y1="37" x2="42" y2="37"/><line class="cls-1" x1="28" y1="49" x2="42" y2="49"/></svg>
91
  </figure>
92
  <div class="everest-forms-welcome-container__action-card-content">
93
  <h3><?php esc_html_e( 'Create Your First Form', 'everest-forms' ); ?></h3>
@@ -96,7 +96,7 @@ class EVF_Admin_Welcome {
96
  </a>
97
  <a href="https://docs.wpeverest.com/docs/everest-forms/" class="everest-forms-welcome-container__action-card" target="blank">
98
  <figure class="everest-forms-welcome-container__action-card-img">
99
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"><defs><style>.cls-1{fill:none;}.cls-1,.cls-2{stroke:#3D8FC9;stroke-linecap:round;stroke-miterlimit:10;stroke-width:2px;}.cls-2{fill:#E1F0FA;}</style></defs><rect x="13" y="5" width="26" height="38" rx="2" ry="2" class="cls-1"/><path class="cls-1" d="M22,19a3,3,0,0,0-3,3V40a3,3,0,0,1-3,3h9V22A3,3,0,0,0,22,19Z"/><path class="cls-2" d="M49,19H22a3,3,0,0,1,3,3V57a2,2,0,0,0,2,2H49a2,2,0,0,0,2-2V21A2,2,0,0,0,49,19Z"/><line class="cls-1" x1="30" y1="27" x2="46" y2="27"/><line class="cls-1" x1="18" y1="13" x2="34" y2="13"/><line class="cls-1" x1="30" y1="33" x2="46" y2="33"/><line class="cls-1" x1="30" y1="39" x2="46" y2="39"/><line class="cls-1" x1="30" y1="45" x2="40" y2="45"/><line class="cls-1" x1="44" y1="45" x2="46" y2="45"/><line class="cls-1" x1="30" y1="51" x2="40" y2="51"/><line class="cls-1" x1="44" y1="51" x2="46" y2="51"/></svg>
100
  </figure>
101
  <div class="everest-forms-welcome-container__action-card-content">
102
  <h3><?php esc_html_e( 'Read The Full Guide', 'everest-forms' ); ?></h3>
67
  <div class="eveverest-forms-welcome-header">
68
  <div class="eveverest-forms-welcome-header__logo-wrap">
69
  <div class="eveverest-forms-welcome-header__logo-icon">
70
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M18.88,3l1.37,2.25H15.89L14.52,3ZM21,21H1L12,3.15l6.84,11.11H10.6L12,12H14.8L12,7.43,5,18.74H21.58L23,21ZM18.64,9.77,17.27,7.53h4.36L23,9.77Z"/></svg>
71
  </div>
72
  <span><?php esc_html_e( 'Getting Started', 'everest-forms' ); ?></span>
73
  </div>
81
  <p><?php esc_html_e( 'Thank you for choosing Everest Forms, the most powerful and easy drag & drop WordPress form builder in the market.', 'everest-forms' ); ?></p>
82
  </div>
83
  <a class="everest-forms-welcome-video welcome-video-play">
84
+ <img src="<?php echo esc_url( evf()->plugin_url() . '/assets/images/welcome-video-thumb.png' ); ?>" alt="<?php esc_attr_e( 'Watch how to create your first form with Everest Forms', 'everest-forms' ); ?>" class="everest-froms-welcome-thumb">
85
  <button class="everest-forms-welcome-video__button dashicons dashicons-controls-play"></button>
86
  </a>
87
  <div class="everest-forms-welcome-container__action">
88
  <a href="<?php echo esc_url( admin_url( 'admin.php?page=evf-builder&create-form=1' ) ); ?>" class="everest-forms-welcome-container__action-card">
89
  <figure class="everest-forms-welcome-container__action-card-img">
90
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"><defs><style>.cls-1{fill:none;}.cls-1,.cls-2{stroke:#3D8FC9;stroke-linecap:round;stroke-linejoin:round;stroke-width:2px;}.cls-2{fill:#E1F0FA;}</style></defs><rect class="cls-1" x="12" y="11" width="40" height="48" rx="2" ry="2"/><rect class="cls-2" x="18" y="46" width="6" height="6"/><circle class="cls-2" cx="12" cy="52" r="7"/><line class="cls-1" x1="12" y1="49" x2="12" y2="55"/><line class="cls-1" x1="9" y1="52" x2="15" y2="52"/><path class="cls-2" d="M35,8a3,3,0,0,0-6,0H25a2,2,0,0,0-2,2v2a2,2,0,0,0,2,2H39a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z"/><rect class="cls-2" x="49" y="29" width="6" height="18"/><polygon class="cls-2" points="52 57 49 51 49 47 55 47 55 51 52 57"/><path class="cls-2" d="M52,23h0a3,3,0,0,1,3,3v3a0,0,0,0,1,0,0H49a0,0,0,0,1,0,0V26A3,3,0,0,1,52,23Z"/><line class="cls-1" x1="59" y1="25" x2="59" y2="39"/><line class="cls-1" x1="49.5" y1="29" x2="58.5" y2="29"/><rect class="cls-2" x="18" y="22" width="28" height="6"/><rect class="cls-2" x="18" y="34" width="6" height="6"/><line class="cls-1" x1="28" y1="37" x2="42" y2="37"/><line class="cls-1" x1="28" y1="49" x2="42" y2="49"/></svg>
91
  </figure>
92
  <div class="everest-forms-welcome-container__action-card-content">
93
  <h3><?php esc_html_e( 'Create Your First Form', 'everest-forms' ); ?></h3>
96
  </a>
97
  <a href="https://docs.wpeverest.com/docs/everest-forms/" class="everest-forms-welcome-container__action-card" target="blank">
98
  <figure class="everest-forms-welcome-container__action-card-img">
99
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"><defs><style>.cls-1{fill:none;}.cls-1,.cls-2{stroke:#3D8FC9;stroke-linecap:round;stroke-miterlimit:10;stroke-width:2px;}.cls-2{fill:#E1F0FA;}</style></defs><rect x="13" y="5" width="26" height="38" rx="2" ry="2" class="cls-1"/><path class="cls-1" d="M22,19a3,3,0,0,0-3,3V40a3,3,0,0,1-3,3h9V22A3,3,0,0,0,22,19Z"/><path class="cls-2" d="M49,19H22a3,3,0,0,1,3,3V57a2,2,0,0,0,2,2H49a2,2,0,0,0,2-2V21A2,2,0,0,0,49,19Z"/><line class="cls-1" x1="30" y1="27" x2="46" y2="27"/><line class="cls-1" x1="18" y1="13" x2="34" y2="13"/><line class="cls-1" x1="30" y1="33" x2="46" y2="33"/><line class="cls-1" x1="30" y1="39" x2="46" y2="39"/><line class="cls-1" x1="30" y1="45" x2="40" y2="45"/><line class="cls-1" x1="44" y1="45" x2="46" y2="45"/><line class="cls-1" x1="30" y1="51" x2="40" y2="51"/><line class="cls-1" x1="44" y1="51" x2="46" y2="51"/></svg>
100
  </figure>
101
  <div class="everest-forms-welcome-container__action-card-content">
102
  <h3><?php esc_html_e( 'Read The Full Guide', 'everest-forms' ); ?></h3>
includes/admin/class-evf-admin.php CHANGED
@@ -48,8 +48,8 @@ class EVF_Admin {
48
  include_once dirname( __FILE__ ) . '/class-evf-admin-import-export.php';
49
 
50
  // Setup/welcome.
51
- if ( ! empty( $_GET['page'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.NoNonceVerification
52
- switch ( $_GET['page'] ) { // phpcs:ignore WordPress.Security.NonceVerification.NoNonceVerification
53
  case 'evf-welcome':
54
  include_once dirname( __FILE__ ) . '/class-evf-admin-welcome.php';
55
  break;
@@ -61,12 +61,12 @@ class EVF_Admin {
61
  * Handle redirects after addon activate/deactivate.
62
  */
63
  public function addon_actions() {
64
- if ( isset( $_GET['page'], $_REQUEST['action'] ) && 'evf-addons' === $_GET['page'] ) { // WPCS: input var okay, CSRF ok.
65
- $action = sanitize_text_field( wp_unslash( $_REQUEST['action'] ) ); // WPCS: input var okay, CSRF ok.
66
- $plugin = isset( $_REQUEST['plugin'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['plugin'] ) ) : false; // WPCS: input var okay, CSRF ok.
67
 
68
  if ( 'evf-addons-refresh' === $action ) {
69
- if ( empty( $_GET['evf-addons-nonce'] ) || ! wp_verify_nonce( wp_unslash( $_GET['evf-addons-nonce'] ), 'refresh' ) ) { // WPCS: input var ok, sanitization ok.
70
  wp_die( esc_html_e( 'Could not verify nonce', 'everest-forms' ) );
71
  }
72
 
@@ -106,12 +106,12 @@ class EVF_Admin {
106
  * Handle redirects after template refresh.
107
  */
108
  public function template_actions() {
109
- if ( isset( $_GET['page'], $_REQUEST['action'] ) && 'evf-builder' === $_GET['page'] ) { // WPCS: input var okay, CSRF ok.
110
- $action = sanitize_text_field( wp_unslash( $_REQUEST['action'] ) ); // WPCS: input var okay, CSRF ok.
111
  $raw_templates = wp_safe_remote_get( 'https://raw.githubusercontent.com/wpeverest/extensions-json/master/everest-forms/templates/all_templates.json' );
112
 
113
  if ( 'evf-template-refresh' === $action && ! is_wp_error( $raw_templates ) ) {
114
- if ( empty( $_GET['evf-template-nonce'] ) || ! wp_verify_nonce( wp_unslash( $_GET['evf-template-nonce'] ), 'refresh' ) ) { // WPCS: input var ok, sanitization ok.
115
  wp_die( esc_html_e( 'Could not verify nonce', 'everest-forms' ) );
116
  }
117
 
@@ -133,8 +133,8 @@ class EVF_Admin {
133
  */
134
  public function admin_redirects() {
135
  // Nonced plugin install redirects (whitelisted).
136
- if ( ! empty( $_GET['evf-install-plugin-redirect'] ) ) {
137
- $plugin_slug = evf_clean( $_GET['evf-install-plugin-redirect'] );
138
 
139
  $url = admin_url( 'plugin-install.php?tab=search&type=term&s=' . $plugin_slug );
140
  wp_safe_redirect( $url );
@@ -144,7 +144,7 @@ class EVF_Admin {
144
  // Setup wizard redirect.
145
  if ( get_transient( '_evf_activation_redirect' ) && apply_filters( 'everest_forms_show_welcome_page', true ) ) {
146
  $do_redirect = true;
147
- $current_page = isset( $_GET['page'] ) ? evf_clean( wp_unslash( $_GET['page'] ) ) : false;
148
 
149
  // On these pages, or during these events, postpone the redirect.
150
  if ( wp_doing_ajax() || is_network_admin() || ! current_user_can( 'manage_everest_forms' ) ) {
@@ -152,7 +152,7 @@ class EVF_Admin {
152
  }
153
 
154
  // On these pages, or during these events, disable the redirect.
155
- if ( 'evf-welcome' === $current_page || EVF_Admin_Notices::has_notice( 'install' ) || apply_filters( 'everest_forms_prevent_automatic_wizard_redirect', false ) || isset( $_GET['activate-multi'] ) ) {
156
  delete_transient( '_evf_activation_redirect' );
157
  $do_redirect = false;
158
  }
@@ -163,7 +163,6 @@ class EVF_Admin {
163
  exit;
164
  }
165
  }
166
- // phpcs:enable WordPress.Security.NonceVerification.NoNonceVerification
167
  }
168
 
169
  /**
@@ -181,25 +180,25 @@ class EVF_Admin {
181
  $evf_pages = evf_get_screen_ids();
182
 
183
  // Check to make sure we're on a EverestForms admin page.
184
- if ( isset( $current_screen->id ) && apply_filters( 'everest_forms_display_admin_footer_text', in_array( $current_screen->id, $evf_pages ) ) ) {
185
  // Change the footer text.
186
  if ( ! get_option( 'everest_forms_admin_footer_text_rated' ) ) {
187
  $footer_text = sprintf(
188
  /* translators: 1: EverestForms 2:: five stars */
189
- __( 'If you like %1$s please leave us a %2$s rating. A huge thanks in advance!', 'everest-forms' ),
190
  sprintf( '<strong>%s</strong>', esc_html__( 'Everest Forms', 'everest-forms' ) ),
191
  '<a href="https://wordpress.org/support/plugin/everest-forms/reviews?rate=5#new-post" target="_blank" class="evf-rating-link" data-rated="' . esc_attr__( 'Thanks :)', 'everest-forms' ) . '">&#9733;&#9733;&#9733;&#9733;&#9733;</a>'
192
  );
193
  evf_enqueue_js(
194
  "
195
  jQuery( 'a.evf-rating-link' ).click( function() {
196
- jQuery.post( '" . EVF()->ajax_url() . "', { action: 'everest_forms_rated' } );
197
  jQuery( this ).parent().text( jQuery( this ).data( 'rated' ) );
198
  });
199
  "
200
  );
201
  } else {
202
- $footer_text = __( 'Thank you for creating with Everest Forms.', 'everest-forms' );
203
  }
204
  }
205
 
48
  include_once dirname( __FILE__ ) . '/class-evf-admin-import-export.php';
49
 
50
  // Setup/welcome.
51
+ if ( ! empty( $_GET['page'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification
52
+ switch ( $_GET['page'] ) { // phpcs:ignore WordPress.Security.NonceVerification
53
  case 'evf-welcome':
54
  include_once dirname( __FILE__ ) . '/class-evf-admin-welcome.php';
55
  break;
61
  * Handle redirects after addon activate/deactivate.
62
  */
63
  public function addon_actions() {
64
+ if ( isset( $_GET['page'], $_REQUEST['action'] ) && 'evf-addons' === $_GET['page'] ) {
65
+ $action = sanitize_text_field( wp_unslash( $_REQUEST['action'] ) );
66
+ $plugin = isset( $_REQUEST['plugin'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['plugin'] ) ) : false;
67
 
68
  if ( 'evf-addons-refresh' === $action ) {
69
+ if ( empty( $_GET['evf-addons-nonce'] ) || ! wp_verify_nonce( wp_unslash( $_GET['evf-addons-nonce'] ), 'refresh' ) ) { // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
70
  wp_die( esc_html_e( 'Could not verify nonce', 'everest-forms' ) );
71
  }
72
 
106
  * Handle redirects after template refresh.
107
  */
108
  public function template_actions() {
109
+ if ( isset( $_GET['page'], $_REQUEST['action'] ) && 'evf-builder' === $_GET['page'] ) {
110
+ $action = sanitize_text_field( wp_unslash( $_REQUEST['action'] ) );
111
  $raw_templates = wp_safe_remote_get( 'https://raw.githubusercontent.com/wpeverest/extensions-json/master/everest-forms/templates/all_templates.json' );
112
 
113
  if ( 'evf-template-refresh' === $action && ! is_wp_error( $raw_templates ) ) {
114
+ if ( empty( $_GET['evf-template-nonce'] ) || ! wp_verify_nonce( wp_unslash( $_GET['evf-template-nonce'] ), 'refresh' ) ) { // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
115
  wp_die( esc_html_e( 'Could not verify nonce', 'everest-forms' ) );
116
  }
117
 
133
  */
134
  public function admin_redirects() {
135
  // Nonced plugin install redirects (whitelisted).
136
+ if ( ! empty( $_GET['evf-install-plugin-redirect'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification
137
+ $plugin_slug = evf_clean( wp_unslash( $_GET['evf-install-plugin-redirect'] ) ); // phpcs:ignore WordPress.Security.NonceVerification, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
138
 
139
  $url = admin_url( 'plugin-install.php?tab=search&type=term&s=' . $plugin_slug );
140
  wp_safe_redirect( $url );
144
  // Setup wizard redirect.
145
  if ( get_transient( '_evf_activation_redirect' ) && apply_filters( 'everest_forms_show_welcome_page', true ) ) {
146
  $do_redirect = true;
147
+ $current_page = isset( $_GET['page'] ) ? evf_clean( wp_unslash( $_GET['page'] ) ) : false; // phpcs:ignore WordPress.Security.NonceVerification, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
148
 
149
  // On these pages, or during these events, postpone the redirect.
150
  if ( wp_doing_ajax() || is_network_admin() || ! current_user_can( 'manage_everest_forms' ) ) {
152
  }
153
 
154
  // On these pages, or during these events, disable the redirect.
155
+ if ( 'evf-welcome' === $current_page || EVF_Admin_Notices::has_notice( 'install' ) || apply_filters( 'everest_forms_prevent_automatic_wizard_redirect', false ) || isset( $_GET['activate-multi'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification
156
  delete_transient( '_evf_activation_redirect' );
157
  $do_redirect = false;
158
  }
163
  exit;
164
  }
165
  }
 
166
  }
167
 
168
  /**
180
  $evf_pages = evf_get_screen_ids();
181
 
182
  // Check to make sure we're on a EverestForms admin page.
183
+ if ( isset( $current_screen->id ) && apply_filters( 'everest_forms_display_admin_footer_text', in_array( $current_screen->id, $evf_pages, true ) ) ) {
184
  // Change the footer text.
185
  if ( ! get_option( 'everest_forms_admin_footer_text_rated' ) ) {
186
  $footer_text = sprintf(
187
  /* translators: 1: EverestForms 2:: five stars */
188
+ esc_html__( 'If you like %1$s please leave us a %2$s rating. A huge thanks in advance!', 'everest-forms' ),
189
  sprintf( '<strong>%s</strong>', esc_html__( 'Everest Forms', 'everest-forms' ) ),
190
  '<a href="https://wordpress.org/support/plugin/everest-forms/reviews?rate=5#new-post" target="_blank" class="evf-rating-link" data-rated="' . esc_attr__( 'Thanks :)', 'everest-forms' ) . '">&#9733;&#9733;&#9733;&#9733;&#9733;</a>'
191
  );
192
  evf_enqueue_js(
193
  "
194
  jQuery( 'a.evf-rating-link' ).click( function() {
195
+ jQuery.post( '" . evf()->ajax_url() . "', { action: 'everest_forms_rated' } );
196
  jQuery( this ).parent().text( jQuery( this ).data( 'rated' ) );
197
  });
198
  "
199
  );
200
  } else {
201
+ $footer_text = esc_html__( 'Thank you for creating with Everest Forms.', 'everest-forms' );
202
  }
203
  }
204
 
includes/admin/evf-admin-functions.php CHANGED
@@ -6,9 +6,7 @@
6
  * @version 1.0.0
7
  */
8
 
9
- if ( ! defined( 'ABSPATH' ) ) {
10
- exit;
11
- }
12
 
13
  /**
14
  * Get all EverestForms screen ids.
@@ -16,7 +14,7 @@ if ( ! defined( 'ABSPATH' ) ) {
16
  * @return array
17
  */
18
  function evf_get_screen_ids() {
19
- $evf_screen_id = sanitize_title( __( 'Everest Forms', 'everest-forms' ) );
20
  $screen_ids = array(
21
  'dashboard_page_evf-welcome',
22
  'toplevel_page_' . $evf_screen_id,
@@ -33,11 +31,11 @@ function evf_get_screen_ids() {
33
  /**
34
  * Create a page and store the ID in an option.
35
  *
36
- * @param mixed $slug Slug for the new page
37
- * @param string $option Option name to store the page's ID
38
- * @param string $page_title (default: '') Title for the new page
39
- * @param string $page_content (default: '') Content for the new page
40
- * @param int $post_parent (default: 0) Parent for the new page
41
  *
42
  * @return int page ID
43
  */
@@ -45,8 +43,9 @@ function evf_create_page( $slug, $option = '', $page_title = '', $page_content =
45
  global $wpdb;
46
 
47
  $option_value = get_option( $option );
 
48
 
49
- if ( $option_value > 0 && ( $page_object = get_post( $option_value ) ) ) {
50
  if ( 'page' === $page_object->post_type && ! in_array(
51
  $page_object->post_status,
52
  array(
@@ -54,19 +53,19 @@ function evf_create_page( $slug, $option = '', $page_title = '', $page_content =
54
  'trash',
55
  'future',
56
  'auto-draft',
57
- )
58
- )
59
- ) {
60
- // Valid page is already in place
61
  return $page_object->ID;
62
  }
63
  }
64
 
65
  if ( strlen( $page_content ) > 0 ) {
66
- // Search for an existing page with the specified page content (typically a shortcode)
67
  $valid_page_found = $wpdb->get_var( $wpdb->prepare( "SELECT ID FROM $wpdb->posts WHERE post_type='page' AND post_status NOT IN ( 'pending', 'trash', 'future', 'auto-draft' ) AND post_content LIKE %s LIMIT 1;", "%{$page_content}%" ) );
68
  } else {
69
- // Search for an existing page with the specified page slug
70
  $valid_page_found = $wpdb->get_var( $wpdb->prepare( "SELECT ID FROM $wpdb->posts WHERE post_type='page' AND post_status NOT IN ( 'pending', 'trash', 'future', 'auto-draft' ) AND post_name = %s LIMIT 1;", $slug ) );
71
  }
72
 
@@ -80,12 +79,12 @@ function evf_create_page( $slug, $option = '', $page_title = '', $page_content =
80
  return $valid_page_found;
81
  }
82
 
83
- // Search for a matching valid trashed page
84
  if ( strlen( $page_content ) > 0 ) {
85
- // Search for an existing page with the specified page content (typically a shortcode)
86
  $trashed_page_found = $wpdb->get_var( $wpdb->prepare( "SELECT ID FROM $wpdb->posts WHERE post_type='page' AND post_status = 'trash' AND post_content LIKE %s LIMIT 1;", "%{$page_content}%" ) );
87
  } else {
88
- // Search for an existing page with the specified page slug
89
  $trashed_page_found = $wpdb->get_var( $wpdb->prepare( "SELECT ID FROM $wpdb->posts WHERE post_type='page' AND post_status = 'trash' AND post_name = %s LIMIT 1;", $slug ) );
90
  }
91
 
@@ -122,10 +121,9 @@ function evf_create_page( $slug, $option = '', $page_title = '', $page_content =
122
  *
123
  * Loops though the EverestFormsoptions array and outputs each field.
124
  *
125
- * @param array $options Opens array to output
126
  */
127
  function everest_forms_admin_fields( $options ) {
128
-
129
  if ( ! class_exists( 'EVF_Admin_Settings', false ) ) {
130
  include dirname( __FILE__ ) . '/class-evf-admin-settings.php';
131
  }
@@ -136,11 +134,10 @@ function everest_forms_admin_fields( $options ) {
136
  /**
137
  * Update all settings which are passed.
138
  *
139
- * @param array $options
140
- * @param array $data
141
  */
142
  function everest_forms_update_options( $options, $data = null ) {
143
-
144
  if ( ! class_exists( 'EVF_Admin_Settings', false ) ) {
145
  include dirname( __FILE__ ) . '/class-evf-admin-settings.php';
146
  }
@@ -151,13 +148,12 @@ function everest_forms_update_options( $options, $data = null ) {
151
  /**
152
  * Get a setting from the settings API.
153
  *
154
- * @param mixed $option_name
155
- * @param mixed $default
156
  *
157
  * @return string
158
  */
159
  function everest_forms_settings_get_option( $option_name, $default = '' ) {
160
-
161
  if ( ! class_exists( 'EVF_Admin_Settings', false ) ) {
162
  include dirname( __FILE__ ) . '/class-evf-admin-settings.php';
163
  }
@@ -168,24 +164,23 @@ function everest_forms_settings_get_option( $option_name, $default = '' ) {
168
  /**
169
  * Outputs fields to be used on panels (settings etc).
170
  *
171
- * @param string $option
172
- * @param string $panel
173
- * @param string $field
174
- * @param array $form_data
175
- * @param string $label
176
- * @param array $args
177
- * @param boolean $echo
178
  *
179
  * @return string
180
  */
181
  function everest_forms_panel_field( $option, $panel, $field, $form_data, $label, $args = array(), $echo = true ) {
182
-
183
- // Required params
184
  if ( empty( $option ) || empty( $panel ) || empty( $field ) ) {
185
  return '';
186
  }
187
 
188
- // Setup basic vars
189
  $panel = esc_attr( $panel );
190
  $field = esc_attr( $field );
191
  $panel_id = sanitize_html_class( $panel );
@@ -200,7 +195,7 @@ function everest_forms_panel_field( $option, $panel, $field, $form_data, $label,
200
  $data_attr = '';
201
  $output = '';
202
 
203
- // Check if we should store values in a parent array
204
  if ( ! empty( $parent ) ) {
205
  if ( ! empty( $subsection ) ) {
206
  $field_name = sprintf( '%s[%s][%s][%s]', $parent, $panel, $subsection, $field );
@@ -215,7 +210,7 @@ function everest_forms_panel_field( $option, $panel, $field, $form_data, $label,
215
  $value = isset( $form_data[ $panel ][ $field ] ) ? $form_data[ $panel ][ $field ] : $default;
216
  }
217
 
218
- // Check for data attributes
219
  if ( ! empty( $args['data'] ) ) {
220
  foreach ( $args['data'] as $key => $val ) {
221
  if ( is_array( $val ) ) {
@@ -225,10 +220,10 @@ function everest_forms_panel_field( $option, $panel, $field, $form_data, $label,
225
  }
226
  }
227
 
228
- // Determine what field type to output
229
  switch ( $option ) {
230
 
231
- // Text input
232
  case 'text':
233
  $type = ! empty( $args['type'] ) ? esc_attr( $args['type'] ) : 'text';
234
  $output = sprintf(
@@ -244,7 +239,7 @@ function everest_forms_panel_field( $option, $panel, $field, $form_data, $label,
244
  );
245
  break;
246
 
247
- // Textarea
248
  case 'textarea':
249
  $rows = ! empty( $args['rows'] ) ? (int) $args['rows'] : '3';
250
  $output = sprintf(
@@ -260,7 +255,7 @@ function everest_forms_panel_field( $option, $panel, $field, $form_data, $label,
260
  );
261
  break;
262
 
263
- // TinyMCE
264
  case 'tinymce':
265
  $arguments = wp_parse_args(
266
  $tinymce,
@@ -278,7 +273,7 @@ function everest_forms_panel_field( $option, $panel, $field, $form_data, $label,
278
  $output = ob_get_clean();
279
  break;
280
 
281
- // Checkbox
282
  case 'checkbox':
283
  $checked = checked( '1', $value, false );
284
  $checkbox = sprintf(
@@ -309,7 +304,7 @@ function everest_forms_panel_field( $option, $panel, $field, $form_data, $label,
309
  $output .= '</label>';
310
  break;
311
 
312
- // Radio
313
  case 'radio':
314
  $options = $args['options'];
315
  $x = 1;
@@ -345,7 +340,7 @@ function everest_forms_panel_field( $option, $panel, $field, $form_data, $label,
345
  }
346
  break;
347
 
348
- // Select
349
  case 'select':
350
  if ( empty( $args['options'] ) && empty( $args['field_map'] ) ) {
351
  return '';
@@ -356,7 +351,7 @@ function everest_forms_panel_field( $option, $panel, $field, $form_data, $label,
356
  $available_fields = evf_get_form_fields( $form_data, $args['field_map'] );
357
  if ( ! empty( $available_fields ) ) {
358
  foreach ( $available_fields as $id => $available_field ) {
359
- $lbl = ! empty( $available_field['label'] ) ? esc_attr( $available_field['label'] ) : __( 'Field #', 'everest-forms' ) . $id;
360
  $options[ $id ] = $lbl;
361
  }
362
  }
@@ -424,11 +419,11 @@ function everest_forms_panel_field( $option, $panel, $field, $form_data, $label,
424
  $smart_tag .= '<a href="#" class="evf-toggle-smart-tag-display" data-type="' . $type . '" data-fields="' . $form_fields . '"><span class="dashicons dashicons-editor-code"></span></a>';
425
  $smart_tag .= '<div class="evf-smart-tag-lists" style="display: none">';
426
  $smart_tag .= '<div class="smart-tag-title">';
427
- $smart_tag .= __( 'Available Fields', 'everest-forms' );
428
  $smart_tag .= '</div><ul class="evf-fields"></ul>';
429
- if ( $type == 'all' || $type == 'other' ) {
430
  $smart_tag .= '<div class="smart-tag-title other-tag-title">';
431
- $smart_tag .= __( 'Others', 'everest-forms' );
432
  $smart_tag .= '</div><ul class="evf-others"></ul>';
433
  }
434
  $smart_tag .= '</div>';
@@ -447,7 +442,7 @@ function everest_forms_panel_field( $option, $panel, $field, $form_data, $label,
447
 
448
  // Wash our hands.
449
  if ( $echo ) {
450
- echo $output;
451
  } else {
452
  return $output;
453
  }
6
  * @version 1.0.0
7
  */
8
 
9
+ defined( 'ABSPATH' ) || exit;
 
 
10
 
11
  /**
12
  * Get all EverestForms screen ids.
14
  * @return array
15
  */
16
  function evf_get_screen_ids() {
17
+ $evf_screen_id = sanitize_title( esc_html__( 'Everest Forms', 'everest-forms' ) );
18
  $screen_ids = array(
19
  'dashboard_page_evf-welcome',
20
  'toplevel_page_' . $evf_screen_id,
31
  /**
32
  * Create a page and store the ID in an option.
33
  *
34
+ * @param mixed $slug Slug for the new page.
35
+ * @param string $option Option name to store the page's ID.
36
+ * @param string $page_title (default: '') Title for the new page.
37
+ * @param string $page_content (default: '') Content for the new page.
38
+ * @param int $post_parent (default: 0) Parent for the new page.
39
  *
40
  * @return int page ID
41
  */
43
  global $wpdb;
44
 
45
  $option_value = get_option( $option );
46
+ $page_object = get_post( $option_value );
47
 
48
+ if ( $option_value > 0 && $page_object ) {
49
  if ( 'page' === $page_object->post_type && ! in_array(
50
  $page_object->post_status,
51
  array(
53
  'trash',
54
  'future',
55
  'auto-draft',
56
+ ),
57
+ true
58
+ ) ) {
59
+ // Valid page is already in place.
60
  return $page_object->ID;
61
  }
62
  }
63
 
64
  if ( strlen( $page_content ) > 0 ) {
65
+ // Search for an existing page with the specified page content (typically a shortcode).
66
  $valid_page_found = $wpdb->get_var( $wpdb->prepare( "SELECT ID FROM $wpdb->posts WHERE post_type='page' AND post_status NOT IN ( 'pending', 'trash', 'future', 'auto-draft' ) AND post_content LIKE %s LIMIT 1;", "%{$page_content}%" ) );
67
  } else {
68
+ // Search for an existing page with the specified page slug.
69
  $valid_page_found = $wpdb->get_var( $wpdb->prepare( "SELECT ID FROM $wpdb->posts WHERE post_type='page' AND post_status NOT IN ( 'pending', 'trash', 'future', 'auto-draft' ) AND post_name = %s LIMIT 1;", $slug ) );
70
  }
71
 
79
  return $valid_page_found;
80
  }
81
 
82
+ // Search for a matching valid trashed page.
83
  if ( strlen( $page_content ) > 0 ) {
84
+ // Search for an existing page with the specified page content (typically a shortcode).
85
  $trashed_page_found = $wpdb->get_var( $wpdb->prepare( "SELECT ID FROM $wpdb->posts WHERE post_type='page' AND post_status = 'trash' AND post_content LIKE %s LIMIT 1;", "%{$page_content}%" ) );
86
  } else {
87
+ // Search for an existing page with the specified page slug.
88
  $trashed_page_found = $wpdb->get_var( $wpdb->prepare( "SELECT ID FROM $wpdb->posts WHERE post_type='page' AND post_status = 'trash' AND post_name = %s LIMIT 1;", $slug ) );
89
  }
90
 
121
  *
122
  * Loops though the EverestFormsoptions array and outputs each field.
123
  *
124
+ * @param array[] $options Opens array to output.
125
  */
126
  function everest_forms_admin_fields( $options ) {
 
127
  if ( ! class_exists( 'EVF_Admin_Settings', false ) ) {
128
  include dirname( __FILE__ ) . '/class-evf-admin-settings.php';
129
  }
134
  /**
135
  * Update all settings which are passed.
136
  *
137
+ * @param array $options Options array to output.
138
+ * @param array $data Optional. Data to use for saving. Defaults to $_POST.
139
  */
140
  function everest_forms_update_options( $options, $data = null ) {
 
141
  if ( ! class_exists( 'EVF_Admin_Settings', false ) ) {
142
  include dirname( __FILE__ ) . '/class-evf-admin-settings.php';
143
  }
148
  /**
149
  * Get a setting from the settings API.
150
  *
151
+ * @param string $option_name Option name.
152
+ * @param mixed $default Default value.
153
  *
154
  * @return string
155
  */
156
  function everest_forms_settings_get_option( $option_name, $default = '' ) {
 
157
  if ( ! class_exists( 'EVF_Admin_Settings', false ) ) {
158
  include dirname( __FILE__ ) . '/class-evf-admin-settings.php';
159
  }
164
  /**
165
  * Outputs fields to be used on panels (settings etc).
166
  *
167
+ * @param string $option Option.
168
+ * @param string $panel Panel.
169
+ * @param string $field Field.
170
+ * @param array $form_data Form data.
171
+ * @param string $label Label.
172
+ * @param array $args Arguments.
173
+ * @param boolean $echo True to echo else return.
174
  *
175
  * @return string
176
  */
177
  function everest_forms_panel_field( $option, $panel, $field, $form_data, $label, $args = array(), $echo = true ) {
178
+ // Required params.
 
179
  if ( empty( $option ) || empty( $panel ) || empty( $field ) ) {
180
  return '';
181
  }
182
 
183
+ // Setup basic vars.
184
  $panel = esc_attr( $panel );
185
  $field = esc_attr( $field );
186
  $panel_id = sanitize_html_class( $panel );
195
  $data_attr = '';
196
  $output = '';
197
 
198
+ // Check if we should store values in a parent array.
199
  if ( ! empty( $parent ) ) {
200
  if ( ! empty( $subsection ) ) {
201
  $field_name = sprintf( '%s[%s][%s][%s]', $parent, $panel, $subsection, $field );
210
  $value = isset( $form_data[ $panel ][ $field ] ) ? $form_data[ $panel ][ $field ] : $default;
211
  }
212
 
213
+ // Check for data attributes.
214
  if ( ! empty( $args['data'] ) ) {
215
  foreach ( $args['data'] as $key => $val ) {
216
  if ( is_array( $val ) ) {
220
  }
221
  }
222
 
223
+ // Determine what field type to output.
224
  switch ( $option ) {
225
 
226
+ // Text input.
227
  case 'text':
228
  $type = ! empty( $args['type'] ) ? esc_attr( $args['type'] ) : 'text';
229
  $output = sprintf(
239
  );
240
  break;
241
 
242
+ // Textarea.
243
  case 'textarea':
244
  $rows = ! empty( $args['rows'] ) ? (int) $args['rows'] : '3';
245
  $output = sprintf(
255
  );
256
  break;
257
 
258
+ // TinyMCE.
259
  case 'tinymce':
260
  $arguments = wp_parse_args(
261
  $tinymce,
273
  $output = ob_get_clean();
274
  break;
275
 
276
+ // Checkbox.
277
  case 'checkbox':
278
  $checked = checked( '1', $value, false );
279
  $checkbox = sprintf(
304
  $output .= '</label>';
305
  break;
306
 
307
+ // Radio.
308
  case 'radio':
309
  $options = $args['options'];
310
  $x = 1;
340
  }
341
  break;
342
 
343
+ // Select.
344
  case 'select':
345
  if ( empty( $args['options'] ) && empty( $args['field_map'] ) ) {
346
  return '';
351
  $available_fields = evf_get_form_fields( $form_data, $args['field_map'] );
352
  if ( ! empty( $available_fields ) ) {
353
  foreach ( $available_fields as $id => $available_field ) {
354
+ $lbl = ! empty( $available_field['label'] ) ? esc_attr( $available_field['label'] ) : esc_html__( 'Field #', 'everest-forms' ) . $id;
355
  $options[ $id ] = $lbl;
356
  }
357
  }
419
  $smart_tag .= '<a href="#" class="evf-toggle-smart-tag-display" data-type="' . $type . '" data-fields="' . $form_fields . '"><span class="dashicons dashicons-editor-code"></span></a>';
420
  $smart_tag .= '<div class="evf-smart-tag-lists" style="display: none">';
421
  $smart_tag .= '<div class="smart-tag-title">';
422
+ $smart_tag .= esc_html__( 'Available Fields', 'everest-forms' );
423
  $smart_tag .= '</div><ul class="evf-fields"></ul>';
424
+ if ( 'all' === $type || 'other' === $type ) {
425
  $smart_tag .= '<div class="smart-tag-title other-tag-title">';
426
+ $smart_tag .= esc_html__( 'Others', 'everest-forms' );
427
  $smart_tag .= '</div><ul class="evf-others"></ul>';
428
  }
429
  $smart_tag .= '</div>';
442
 
443
  // Wash our hands.
444
  if ( $echo ) {
445
+ echo $output; // phpcs:ignore WordPress.Security.EscapeOutput
446
  } else {
447
  return $output;
448
  }
includes/admin/settings/class-evf-settings-email.php CHANGED
@@ -22,7 +22,7 @@ class EVF_Settings_Email extends EVF_Settings_Page {
22
  */
23
  public function __construct() {
24
  $this->id = 'email';
25
- $this->label = __( 'Email', 'everest-forms' );
26
 
27
  parent::__construct();
28
  }
@@ -37,13 +37,13 @@ class EVF_Settings_Email extends EVF_Settings_Page {
37
  'everest_forms_email_settings',
38
  array(
39
  array(
40
- 'title' => __( 'Template Settings', 'everest-forms' ),
41
  'type' => 'title',
42
  'desc' => '',
43
  'id' => 'email_template_options',
44
  ),
45
  array(
46
- 'title' => __( 'Template', 'everest-forms' ),
47
  'type' => 'radio-image',
48
  'id' => 'everest_forms_email_template',
49
  'desc' => esc_html__( 'Determine which format of email to send. HTML Template is default.', 'everest-forms' ),
@@ -60,9 +60,9 @@ class EVF_Settings_Email extends EVF_Settings_Page {
60
  ),
61
  ),
62
  array(
63
- 'title' => __( 'Enable copies', 'everest-forms' ),
64
- 'desc' => __( 'Enable the use of Cc and Bcc email addresses', 'everest-forms' ),
65
- 'desc_tip' => __( 'Email addresses for Cc and Bcc can be applied from the form notification settings.', 'everest-forms' ),
66
  'id' => 'everest_forms_enable_email_copies',
67
  'default' => 'no',
68
  'type' => 'checkbox',
22
  */
23
  public function __construct() {
24
  $this->id = 'email';
25
+ $this->label = esc_html__( 'Email', 'everest-forms' );
26
 
27
  parent::__construct();
28
  }
37
  'everest_forms_email_settings',
38
  array(
39
  array(
40
+ 'title' => esc_html__( 'Template Settings', 'everest-forms' ),
41
  'type' => 'title',
42
  'desc' => '',
43
  'id' => 'email_template_options',
44
  ),
45
  array(
46
+ 'title' => esc_html__( 'Template', 'everest-forms' ),
47
  'type' => 'radio-image',
48
  'id' => 'everest_forms_email_template',
49
  'desc' => esc_html__( 'Determine which format of email to send. HTML Template is default.', 'everest-forms' ),
60
  ),
61
  ),
62
  array(
63
+ 'title' => esc_html__( 'Enable copies', 'everest-forms' ),
64
+ 'desc' => esc_html__( 'Enable the use of Cc and Bcc email addresses', 'everest-forms' ),
65
+ 'desc_tip' => esc_html__( 'Email addresses for Cc and Bcc can be applied from the form notification settings.', 'everest-forms' ),
66
  'id' => 'everest_forms_enable_email_copies',
67
  'default' => 'no',
68
  'type' => 'checkbox',
includes/admin/settings/class-evf-settings-general.php CHANGED
@@ -22,7 +22,7 @@ class EVF_Settings_General extends EVF_Settings_Page {
22
  */
23
  public function __construct() {
24
  $this->id = 'general';
25
- $this->label = __( 'General', 'everest-forms' );
26
 
27
  parent::__construct();
28
  }
@@ -34,16 +34,17 @@ class EVF_Settings_General extends EVF_Settings_Page {
34
  */
35
  public function get_settings() {
36
  $settings = apply_filters(
37
- 'everest_forms_general_settings', array(
 
38
  array(
39
- 'title' => __( 'General Options', 'everest-forms' ),
40
  'type' => 'title',
41
  'desc' => '',
42
  'id' => 'general_options',
43
  ),
44
  array(
45
- 'title' => __( 'Disable User Details', 'everest-forms' ),
46
- 'desc' => __( 'Disable storing the IP address and User Agent on all forms.', 'everest-forms' ),
47
  'id' => 'everest_forms_disable_user_details',
48
  'default' => 'no',
49
  'type' => 'checkbox',
22
  */
23
  public function __construct() {
24
  $this->id = 'general';
25
+ $this->label = esc_html__( 'General', 'everest-forms' );
26
 
27
  parent::__construct();
28
  }
34
  */
35
  public function get_settings() {
36
  $settings = apply_filters(
37
+ 'everest_forms_general_settings',
38
+ array(
39
  array(
40
+ 'title' => esc_html__( 'General Options', 'everest-forms' ),
41
  'type' => 'title',
42
  'desc' => '',
43
  'id' => 'general_options',
44
  ),
45
  array(
46
+ 'title' => esc_html__( 'Disable User Details', 'everest-forms' ),
47
+ 'desc' => esc_html__( 'Disable storing the IP address and User Agent on all forms.', 'everest-forms' ),
48
  'id' => 'everest_forms_disable_user_details',
49
  'default' => 'no',
50
  'type' => 'checkbox',
includes/admin/settings/class-evf-settings-integrations.php CHANGED
@@ -22,9 +22,9 @@ class EVF_Settings_Integrations extends EVF_Settings_Page {
22
  */
23
  public function __construct() {
24
  $this->id = 'integration';
25
- $this->label = __( 'Integration', 'everest-forms' );
26
 
27
- if ( isset( EVF()->integrations ) && EVF()->integrations->get_integrations() ) {
28
  parent::__construct();
29
  }
30
  }
@@ -38,7 +38,7 @@ class EVF_Settings_Integrations extends EVF_Settings_Page {
38
  // Hide the save button.
39
  $GLOBALS['hide_save_button'] = true;
40
 
41
- $integrations = EVF()->integrations->get_integrations();
42
 
43
  if ( '' === $current_section ) {
44
  $this->output_integrations( $integrations );
@@ -69,7 +69,7 @@ class EVF_Settings_Integrations extends EVF_Settings_Page {
69
  <img src="<?php echo esc_url( $integration->icon ); ?>" alt="<?php echo esc_attr( $integration->method_title ); ?>" />
70
  </figure>
71
  <div class="integration-info">
72
- <a href="<?php echo admin_url( 'admin.php?page=evf-settings&tab=integration&section=' . $integration->id ); ?>">
73
  <h3><?php echo esc_html( $integration->method_title ); ?></h3>
74
  </a>
75
  <p><?php echo esc_html( $integration->method_description ); ?></p>
@@ -77,7 +77,7 @@ class EVF_Settings_Integrations extends EVF_Settings_Page {
77
  </div>
78
  </div>
79
  <div class="integartion-action">
80
- <a class="integration-setup" href="<?php echo admin_url( 'admin.php?page=evf-settings&tab=integration&section=' . $integration->id ); ?>">
81
  <span class="evf-icon evf-icon-setting-cog"></span>
82
  </a>
83
  </div>
22
  */
23
  public function __construct() {
24
  $this->id = 'integration';
25
+ $this->label = esc_html__( 'Integration', 'everest-forms' );
26
 
27
+ if ( isset( evf()->integrations ) && evf()->integrations->get_integrations() ) {
28
  parent::__construct();
29
  }
30
  }
38
  // Hide the save button.
39
  $GLOBALS['hide_save_button'] = true;
40
 
41
+ $integrations = evf()->integrations->get_integrations();
42
 
43
  if ( '' === $current_section ) {
44
  $this->output_integrations( $integrations );
69
  <img src="<?php echo esc_url( $integration->icon ); ?>" alt="<?php echo esc_attr( $integration->method_title ); ?>" />
70
  </figure>
71
  <div class="integration-info">
72
+ <a href="<?php echo esc_url( admin_url( 'admin.php?page=evf-settings&tab=integration&section=' . $integration->id ) ); ?>">
73
  <h3><?php echo esc_html( $integration->method_title ); ?></h3>
74
  </a>
75
  <p><?php echo esc_html( $integration->method_description ); ?></p>
77
  </div>
78
  </div>
79
  <div class="integartion-action">
80
+ <a class="integration-setup" href="<?php echo esc_url( admin_url( 'admin.php?page=evf-settings&tab=integration&section=' . $integration->id ) ); ?>">
81
  <span class="evf-icon evf-icon-setting-cog"></span>
82
  </a>
83
  </div>
includes/admin/settings/class-evf-settings-recaptcha.php CHANGED
@@ -22,7 +22,7 @@ class EVF_Settings_reCAPTCHA extends EVF_Settings_Page {
22
  */
23
  public function __construct() {
24
  $this->id = 'recaptcha';
25
- $this->label = __( 'reCAPTCHA', 'everest-forms' );
26
 
27
  parent::__construct();
28
  }
@@ -39,15 +39,15 @@ class EVF_Settings_reCAPTCHA extends EVF_Settings_Page {
39
  'everest_forms_recaptcha_settings',
40
  array(
41
  array(
42
- 'title' => __( 'Google reCAPTCHA Integration', 'everest-forms' ),
43
  'type' => 'title',
44
  /* translators: %1$s - Google reCAPTCHA docs url */
45
  'desc' => sprintf( __( '<p>Google\'s reCAPTCHA is a free service that protects your website from spam and abuse while letting valid users pass through with ease.</p><p>reCAPTCHA uses an advanced risk analysis engine and adaptive challenges to keep automated software from engaging in abusive activities on your site.</p><p>Sites already using v2 reCAPTCHA will need to create new site keys before switching to the Invisible reCAPTCHA or v3 reCAPTCHA.</p><p><a href="%1$s" target="_blank">Read our documentation</a> for step-by-step instructions.</p>', 'everest-forms' ), 'https://docs.wpeverest.com/docs/everest-forms/tutorials/how-to-integrate-google-recaptcha/' ),
46
  'id' => 'integration_options',
47
  ),
48
  array(
49
- 'title' => __( 'reCAPTCHA type', 'everest-forms' ),
50
- 'desc' => __( 'Choose the type of reCAPTCHA for this site key.', 'everest-forms' ),
51
  'id' => 'everest_forms_recaptcha_type',
52
  'default' => 'v2',
53
  'type' => 'radio',
@@ -59,68 +59,68 @@ class EVF_Settings_reCAPTCHA extends EVF_Settings_Page {
59
  'desc_tip' => true,
60
  ),
61
  array(
62
- 'title' => __( 'Site Key', 'everest-forms' ),
63
  'type' => 'text',
64
  /* translators: %1$s - Google reCAPTCHA docs url */
65
- 'desc' => sprintf( __( 'Please enter your site key for your reCAPTCHA v2. <a href="%1$s" target="_blank">Learn More</a>', 'everest-forms' ), esc_url( 'https://docs.wpeverest.com/docs/everest-forms/tutorials/how-to-integrate-google-recaptcha/' ) ),
66
  'id' => 'everest_forms_recaptcha_v2_site_key',
67
  'is_visible' => 'v2' === $recaptcha_type && 'no' === $invisible,
68
  'default' => '',
69
  'desc_tip' => true,
70
  ),
71
  array(
72
- 'title' => __( 'Secret Key', 'everest-forms' ),
73
  'type' => 'text',
74
  /* translators: %1$s - Google reCAPTCHA docs url */
75
- 'desc' => sprintf( __( 'Please enter your secret key for your reCAPTCHA v2. <a href="%1$s" target="_blank">Learn More</a>', 'everest-forms' ), esc_url( 'https://docs.wpeverest.com/docs/everest-forms/tutorials/how-to-integrate-google-recaptcha/' ) ),
76
  'id' => 'everest_forms_recaptcha_v2_secret_key',
77
  'is_visible' => 'v2' === $recaptcha_type && 'no' === $invisible,
78
  'default' => '',
79
  'desc_tip' => true,
80
  ),
81
  array(
82
- 'title' => __( 'Site Key', 'everest-forms' ),
83
  'type' => 'text',
84
  /* translators: %1$s - Google reCAPTCHA docs url */
85
- 'desc' => sprintf( __( 'Please enter your site key for your reCAPTCHA v2. <a href="%1$s" target="_blank">Learn More</a>', 'everest-forms' ), esc_url( 'https://docs.wpeverest.com/docs/everest-forms/tutorials/how-to-integrate-google-recaptcha/' ) ),
86
  'id' => 'everest_forms_recaptcha_v2_invisible_site_key',
87
- 'is_visible' => 'yes' === $invisible && 'v2' === $recaptcha_type,
88
  'default' => '',
89
  'desc_tip' => true,
90
  ),
91
  array(
92
- 'title' => __( 'Secret Key', 'everest-forms' ),
93
  'type' => 'text',
94
  /* translators: %1$s - Google reCAPTCHA docs url */
95
- 'desc' => sprintf( __( 'Please enter your secret key for your reCAPTCHA v2. <a href="%1$s" target="_blank">Learn More</a>', 'everest-forms' ), esc_url( 'https://docs.wpeverest.com/docs/everest-forms/tutorials/how-to-integrate-google-recaptcha/' ) ),
96
  'id' => 'everest_forms_recaptcha_v2_invisible_secret_key',
97
  'is_visible' => 'yes' === $invisible && 'v2' === $recaptcha_type,
98
  'default' => '',
99
  'desc_tip' => true,
100
  ),
101
  array(
102
- 'title' => __( 'Invisible reCAPTCHA', 'everest-forms' ),
103
  'type' => 'checkbox',
104
- 'desc' => __( 'Enable Invisible reCAPTCHA.', 'everest-forms' ),
105
  'id' => 'everest_forms_recaptcha_v2_invisible',
106
  'is_visible' => 'v2' === $recaptcha_type,
107
  'default' => 'no',
108
  ),
109
  array(
110
- 'title' => __( 'Site Key', 'everest-forms' ),
111
  'type' => 'text',
112
  /* translators: %1$s - Google reCAPTCHA docs url */
113
- 'desc' => sprintf( __( 'Please enter your site key for your reCAPTCHA v3. <a href="%1$s" target="_blank">Learn More</a>', 'everest-forms' ), esc_url( 'https://docs.wpeverest.com/docs/everest-forms/tutorials/how-to-integrate-google-recaptcha/' ) ),
114
  'id' => 'everest_forms_recaptcha_v3_site_key',
115
  'is_visible' => 'v3' === $recaptcha_type,
116
  'default' => '',
117
  'desc_tip' => true,
118
  ),
119
  array(
120
- 'title' => __( 'Secret Key', 'everest-forms' ),
121
  'type' => 'text',
122
  /* translators: %1$s - Google reCAPTCHA docs url */
123
- 'desc' => sprintf( __( 'Please enter your secret key for your reCAPTCHA v2. <a href="%1$s" target="_blank">Learn More</a>', 'everest-forms' ), esc_url( 'https://docs.wpeverest.com/docs/everest-forms/tutorials/how-to-integrate-google-recaptcha/' ) ),
124
  'id' => 'everest_forms_recaptcha_v3_secret_key',
125
  'is_visible' => 'v3' === $recaptcha_type,
126
  'default' => '',
22
  */
23
  public function __construct() {
24
  $this->id = 'recaptcha';
25
+ $this->label = esc_html__( 'reCAPTCHA', 'everest-forms' );
26
 
27
  parent::__construct();
28
  }
39
  'everest_forms_recaptcha_settings',
40
  array(
41
  array(
42
+ 'title' => esc_html__( 'Google reCAPTCHA Integration', 'everest-forms' ),
43
  'type' => 'title',
44
  /* translators: %1$s - Google reCAPTCHA docs url */
45
  'desc' => sprintf( __( '<p>Google\'s reCAPTCHA is a free service that protects your website from spam and abuse while letting valid users pass through with ease.</p><p>reCAPTCHA uses an advanced risk analysis engine and adaptive challenges to keep automated software from engaging in abusive activities on your site.</p><p>Sites already using v2 reCAPTCHA will need to create new site keys before switching to the Invisible reCAPTCHA or v3 reCAPTCHA.</p><p><a href="%1$s" target="_blank">Read our documentation</a> for step-by-step instructions.</p>', 'everest-forms' ), 'https://docs.wpeverest.com/docs/everest-forms/tutorials/how-to-integrate-google-recaptcha/' ),
46
  'id' => 'integration_options',
47
  ),
48
  array(
49
+ 'title' => esc_html__( 'reCAPTCHA type', 'everest-forms' ),
50
+ 'desc' => esc_html__( 'Choose the type of reCAPTCHA for this site key.', 'everest-forms' ),
51
  'id' => 'everest_forms_recaptcha_type',
52
  'default' => 'v2',
53
  'type' => 'radio',
59
  'desc_tip' => true,
60
  ),
61
  array(
62
+ 'title' => esc_html__( 'Site Key', 'everest-forms' ),
63
  'type' => 'text',
64
  /* translators: %1$s - Google reCAPTCHA docs url */
65
+ 'desc' => sprintf( esc_html__( 'Please enter your site key for your reCAPTCHA v2. <a href="%1$s" target="_blank">Learn More</a>', 'everest-forms' ), esc_url( 'https://docs.wpeverest.com/docs/everest-forms/tutorials/how-to-integrate-google-recaptcha/' ) ),
66
  'id' => 'everest_forms_recaptcha_v2_site_key',
67
  'is_visible' => 'v2' === $recaptcha_type && 'no' === $invisible,
68
  'default' => '',
69
  'desc_tip' => true,
70
  ),
71
  array(
72
+ 'title' => esc_html__( 'Secret Key', 'everest-forms' ),
73
  'type' => 'text',
74
  /* translators: %1$s - Google reCAPTCHA docs url */
75
+ 'desc' => sprintf( esc_html__( 'Please enter your secret key for your reCAPTCHA v2. <a href="%1$s" target="_blank">Learn More</a>', 'everest-forms' ), esc_url( 'https://docs.wpeverest.com/docs/everest-forms/tutorials/how-to-integrate-google-recaptcha/' ) ),
76
  'id' => 'everest_forms_recaptcha_v2_secret_key',
77
  'is_visible' => 'v2' === $recaptcha_type && 'no' === $invisible,
78
  'default' => '',
79
  'desc_tip' => true,
80
  ),
81
  array(
82
+ 'title' => esc_html__( 'Site Key', 'everest-forms' ),
83
  'type' => 'text',
84
  /* translators: %1$s - Google reCAPTCHA docs url */
85
+ 'desc' => sprintf( esc_html__( 'Please enter your site key for your reCAPTCHA v2. <a href="%1$s" target="_blank">Learn More</a>', 'everest-forms' ), esc_url( 'https://docs.wpeverest.com/docs/everest-forms/tutorials/how-to-integrate-google-recaptcha/' ) ),
86
  'id' => 'everest_forms_recaptcha_v2_invisible_site_key',
87
+ 'is_visible' => 'v2' === $recaptcha_type && 'yes' === $invisible,
88
  'default' => '',
89
  'desc_tip' => true,
90
  ),
91
  array(
92
+ 'title' => esc_html__( 'Secret Key', 'everest-forms' ),
93
  'type' => 'text',
94
  /* translators: %1$s - Google reCAPTCHA docs url */
95
+ 'desc' => sprintf( esc_html__( 'Please enter your secret key for your reCAPTCHA v2. <a href="%1$s" target="_blank">Learn More</a>', 'everest-forms' ), esc_url( 'https://docs.wpeverest.com/docs/everest-forms/tutorials/how-to-integrate-google-recaptcha/' ) ),
96
  'id' => 'everest_forms_recaptcha_v2_invisible_secret_key',
97
  'is_visible' => 'yes' === $invisible && 'v2' === $recaptcha_type,
98
  'default' => '',
99
  'desc_tip' => true,
100
  ),
101
  array(
102
+ 'title' => esc_html__( 'Invisible reCAPTCHA', 'everest-forms' ),
103
  'type' => 'checkbox',
104
+ 'desc' => esc_html__( 'Enable Invisible reCAPTCHA.', 'everest-forms' ),
105
  'id' => 'everest_forms_recaptcha_v2_invisible',
106
  'is_visible' => 'v2' === $recaptcha_type,
107
  'default' => 'no',
108
  ),
109
  array(
110
+ 'title' => esc_html__( 'Site Key', 'everest-forms' ),
111
  'type' => 'text',
112
  /* translators: %1$s - Google reCAPTCHA docs url */
113
+ 'desc' => sprintf( esc_html__( 'Please enter your site key for your reCAPTCHA v3. <a href="%1$s" target="_blank">Learn More</a>', 'everest-forms' ), esc_url( 'https://docs.wpeverest.com/docs/everest-forms/tutorials/how-to-integrate-google-recaptcha/' ) ),
114
  'id' => 'everest_forms_recaptcha_v3_site_key',
115
  'is_visible' => 'v3' === $recaptcha_type,
116
  'default' => '',
117
  'desc_tip' => true,
118
  ),
119
  array(
120
+ 'title' => esc_html__( 'Secret Key', 'everest-forms' ),
121
  'type' => 'text',
122
  /* translators: %1$s - Google reCAPTCHA docs url */
123
+ 'desc' => sprintf( esc_html__( 'Please enter your secret key for your reCAPTCHA v2. <a href="%1$s" target="_blank">Learn More</a>', 'everest-forms' ), esc_url( 'https://docs.wpeverest.com/docs/everest-forms/tutorials/how-to-integrate-google-recaptcha/' ) ),
124
  'id' => 'everest_forms_recaptcha_v3_secret_key',
125
  'is_visible' => 'v3' === $recaptcha_type,
126
  'default' => '',
includes/admin/views/html-admin-page-addons.php CHANGED
@@ -32,7 +32,7 @@ defined( 'ABSPATH' ) || exit;
32
  </ul>
33
  <form class="search-form search-plugins hidden" method="get">
34
  <input type="hidden" name="page" value="evf-addons">
35
- <?php $page_section = ( isset( $_GET['section'] ) && '_featured' !== $_GET['section'] ) ? $_GET['section'] : '_all'; ?>
36
  <input type="hidden" name="section" value="<?php echo esc_attr( $page_section ); ?>">
37
  <label>
38
  <span class="screen-reader-text"><?php esc_html_e( 'Search Add-ons', 'everest-forms' ); ?></span>
@@ -44,7 +44,10 @@ defined( 'ABSPATH' ) || exit;
44
 
45
  <br class="clear">
46
  <p class="refresh">
47
- <?php printf( esc_html__( 'Make your forms even more robust with our premium addons. Missing any addons? Click the %1$sRefresh Add-ons%2$s button above.', 'everest-forms' ), '<a href="' . esc_url( $refresh_url ) . '">', '</a>' ); ?>
 
 
 
48
  </p>
49
 
50
  <?php if ( '_featured' !== $current_section && $addons ) : ?>
@@ -74,9 +77,9 @@ defined( 'ABSPATH' ) || exit;
74
  <strong><?php esc_html_e( 'Status:', 'everest-forms' ); ?></strong>
75
  <?php if ( is_plugin_active( $addon->slug . '/' . $addon->slug . '.php' ) ) : ?>
76
  <span class="status-label status-active"><?php esc_html_e( 'Activated', 'everest-forms' ); ?></span>
77
- <?php elseif ( file_exists( WP_PLUGIN_DIR . '/' . $addon->slug . '/' . $addon->slug . '.php' ) ): ?>
78
  <span class="status-label status-inactive"><?php esc_html_e( 'Inactive', 'everest-forms' ); ?></span>
79
- <?php else: ?>
80
  <span class="status-label status-install-now"><?php esc_html_e( 'Not Installed', 'everest-forms' ); ?></span>
81
  <?php endif; ?>
82
  </div>
@@ -84,30 +87,42 @@ defined( 'ABSPATH' ) || exit;
84
  <?php if ( is_plugin_active( $addon->slug . '/' . $addon->slug . '.php' ) ) : ?>
85
  <?php
86
  $plugin_file = plugin_basename( $addon->slug . '/' . $addon->slug . '.php' );
87
- $url = wp_nonce_url( add_query_arg( array(
88
- 'page' => 'evf-addons',
89
- 'action' => 'deactivate',
90
- 'plugin' => $plugin_file,
91
- ), admin_url( 'admin.php' ) ), 'deactivate-plugin_' . $plugin_file );
 
 
 
 
 
 
92
  ?>
93
- <a class="button button-secondary deactivate-now" href="<?php echo esc_url( $url ); ?>" aria-label="<?php esc_attr_e( sprintf( __( 'Deactivate %s now', 'everest-forms' ), $addon->title ) ); ?>"><?php esc_html_e( 'Deactivate', 'everest-forms' ); ?></a>
94
- <?php elseif ( file_exists( WP_PLUGIN_DIR . '/' . $addon->slug . '/' . $addon->slug . '.php' ) ): ?>
95
  <?php
96
  $plugin_file = plugin_basename( $addon->slug . '/' . $addon->slug . '.php' );
97
- $url = wp_nonce_url( add_query_arg( array(
98
- 'page' => 'evf-addons',
99
- 'action' => 'activate',
100
- 'plugin' => $plugin_file,
101
- ), admin_url( 'admin.php' ) ), 'activate-plugin_' . $plugin_file );
 
 
 
 
 
 
102
  ?>
103
- <a class="button button-primary activate-now" href="<?php echo esc_url( $url ); ?>" aria-label="<?php esc_attr_e( sprintf( __( 'Activate %s now', 'everest-forms' ), $addon->title ) ); ?>"><?php esc_html_e( 'Activate', 'everest-forms' ); ?></a>
104
- <?php else: ?>
105
- <a href="#" class="button install-now" data-slug="<?php echo esc_attr( $addon->slug ); ?>" data-name="<?php echo esc_attr( $addon->name ); ?>" aria-label="<?php esc_attr_e( sprintf( __( 'Install %s now', 'everest-forms' ), $addon->title ) ); ?>"><?php esc_html_e( 'Install Addon', 'everest-forms'); ?></a>
106
  <?php endif; ?>
107
  </div>
108
- <?php else: ?>
109
  <div class="action-buttons upgrade-plan">
110
- <a class="button upgrade-now" href="https://wpeverest.com/wordpress-plugins/everest-forms/pricing/?utm_source=user-dashboard&utm_medium=addons-upgrade-button&utm_campaign=free-version" target="_blank"><?php esc_html_e( 'Upgrade Plan', 'everest-forms' ); ?></a>
111
  </div>
112
  <?php endif; ?>
113
  </div>
@@ -118,7 +133,12 @@ defined( 'ABSPATH' ) || exit;
118
  </form>
119
  <?php endif; ?>
120
  <?php else : ?>
121
- <p><?php printf( __( 'Our catalog of Everest Forms Add-ons/Extensions can be found on WPEverest.com here: <a href="%s">Everest Forms Extensions Catalog</a>', 'everest-forms' ), 'https://wpeverest.com/wordpress-plugins/everest-forms/' ); ?></p>
 
 
 
 
 
122
  <?php endif; ?>
123
  </div>
124
  <?php
32
  </ul>
33
  <form class="search-form search-plugins hidden" method="get">
34
  <input type="hidden" name="page" value="evf-addons">
35
+ <?php $page_section = ( isset( $_GET['section'] ) && '_featured' !== sanitize_text_field( wp_unslash( $_GET['section'] ) ) ) ? sanitize_text_field( wp_unslash( $_GET['section'] ) ) : '_all'; // phpcs:ignore WordPress.Security.NonceVerification ?>
36
  <input type="hidden" name="section" value="<?php echo esc_attr( $page_section ); ?>">
37
  <label>
38
  <span class="screen-reader-text"><?php esc_html_e( 'Search Add-ons', 'everest-forms' ); ?></span>
44
 
45
  <br class="clear">
46
  <p class="refresh">
47
+ <?php
48
+ /* translators: %s: Refresh URI */
49
+ printf( esc_html__( 'Make your forms even more robust with our premium addons. Missing any addons? Click the %1$sRefresh Add-ons%2$s button above.', 'everest-forms' ), '<a href="' . esc_url( $refresh_url ) . '">', '</a>' );
50
+ ?>
51
  </p>
52
 
53
  <?php if ( '_featured' !== $current_section && $addons ) : ?>
77
  <strong><?php esc_html_e( 'Status:', 'everest-forms' ); ?></strong>
78
  <?php if ( is_plugin_active( $addon->slug . '/' . $addon->slug . '.php' ) ) : ?>
79
  <span class="status-label status-active"><?php esc_html_e( 'Activated', 'everest-forms' ); ?></span>
80
+ <?php elseif ( file_exists( WP_PLUGIN_DIR . '/' . $addon->slug . '/' . $addon->slug . '.php' ) ) : ?>
81
  <span class="status-label status-inactive"><?php esc_html_e( 'Inactive', 'everest-forms' ); ?></span>
82
+ <?php else : ?>
83
  <span class="status-label status-install-now"><?php esc_html_e( 'Not Installed', 'everest-forms' ); ?></span>
84
  <?php endif; ?>
85
  </div>
87
  <?php if ( is_plugin_active( $addon->slug . '/' . $addon->slug . '.php' ) ) : ?>
88
  <?php
89
  $plugin_file = plugin_basename( $addon->slug . '/' . $addon->slug . '.php' );
90
+ $url = wp_nonce_url(
91
+ add_query_arg(
92
+ array(
93
+ 'page' => 'evf-addons',
94
+ 'action' => 'deactivate',
95
+ 'plugin' => $plugin_file,
96
+ ),
97
+ admin_url( 'admin.php' )
98
+ ),
99
+ 'deactivate-plugin_' . $plugin_file
100
+ );
101
  ?>
102
+ <a class="button button-secondary deactivate-now" href="<?php echo esc_url( $url ); ?>" aria-label="<?php printf( esc_attr__( 'Deactivate %s now', 'everest-forms' ), $addon->title ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped, WordPress.WP.I18n.MissingTranslatorsComment ?>"><?php esc_html_e( 'Deactivate', 'everest-forms' ); ?></a>
103
+ <?php elseif ( file_exists( WP_PLUGIN_DIR . '/' . $addon->slug . '/' . $addon->slug . '.php' ) ) : ?>
104
  <?php
105
  $plugin_file = plugin_basename( $addon->slug . '/' . $addon->slug . '.php' );
106
+ $url = wp_nonce_url(
107
+ add_query_arg(
108
+ array(
109
+ 'page' => 'evf-addons',
110
+ 'action' => 'activate',
111
+ 'plugin' => $plugin_file,
112
+ ),
113
+ admin_url( 'admin.php' )
114
+ ),
115
+ 'activate-plugin_' . $plugin_file
116
+ );
117
  ?>
118
+ <a class="button button-primary activate-now" href="<?php echo esc_url( $url ); ?>" aria-label="<?php sprintf( esc_attr__( 'Activate %s now', 'everest-forms' ), $addon->title ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped, WordPress.WP.I18n.MissingTranslatorsComment ?>"><?php esc_html_e( 'Activate', 'everest-forms' ); ?></a>
119
+ <?php else : ?>
120
+ <a href="#" class="button install-now" data-slug="<?php echo esc_attr( $addon->slug ); ?>" data-name="<?php echo esc_attr( $addon->name ); ?>" aria-label="<?php sprintf( esc_attr__( 'Install %s now', 'everest-forms' ), $addon->title ); // phpcs:ignore ordPress.Security.EscapeOutput.OutputNotEscaped, WordPress.WP.I18n.MissingTranslatorsComment ?>"><?php esc_html_e( 'Install Addon', 'everest-forms' ); ?></a>
121
  <?php endif; ?>
122
  </div>
123
+ <?php else : ?>
124
  <div class="action-buttons upgrade-plan">
125
+ <a class="button upgrade-now" href="https://wpeverest.com/wordpress-plugins/everest-forms/pricing/?utm_source=addons-page&utm_medium=upgrade-button&utm_campaign=evf-upgrade-to-pro" target="_blank"><?php esc_html_e( 'Upgrade Plan', 'everest-forms' ); ?></a>
126
  </div>
127
  <?php endif; ?>
128
  </div>
133
  </form>
134
  <?php endif; ?>
135
  <?php else : ?>
136
+ <p>
137
+ <?php
138
+ /* translators: %s: Add-ons Link */
139
+ printf( esc_html__( 'Our catalog of Everest Forms Add-ons/Extensions can be found on WPEverest.com here: <a href="%s">Everest Forms Extensions Catalog</a>', 'everest-forms' ), 'https://wpeverest.com/wordpress-plugins/everest-forms/' );
140
+ ?>
141
+ </p>
142
  <?php endif; ?>
143
  </div>
144
  <?php
includes/admin/views/html-admin-page-builder-setup.php CHANGED
@@ -74,7 +74,7 @@ defined( 'ABSPATH' ) || exit;
74
  <div class="everest-forms-template-wrap evf-template" id="everest-forms-template-<?php echo esc_attr( $template->slug ); ?>">
75
  <figure class="everest-forms-screenshot <?php echo esc_attr( $click_class ); ?>" data-template-name-raw="<?php echo esc_attr( $template->title ); ?>" data-template="<?php echo esc_attr( $template->slug ); ?>" data-template-name="<?php echo esc_attr( $template_name ); ?>">
76
  <img src="<?php echo esc_url( $template->image ); ?>"/>
77
- <?php echo $badge; ?>
78
  <?php if ( 'blank' !== $template->slug ) : ?>
79
  <div class="form-action">
80
  <a href="#" class="everest-forms-btn everest-forms-btn-primary <?php echo esc_attr( $upgrade_class ); ?>" data-licence-plan="<?php echo esc_attr( $license_plan ); ?>" data-template-name-raw="<?php echo esc_attr( $template->title ); ?>" data-template-name="<?php echo esc_attr( $template_name ); ?>" data-template="<?php echo esc_attr( $template->slug ); ?>"><?php esc_html_e( 'Get Started', 'everest-forms' ); ?></a>
74
  <div class="everest-forms-template-wrap evf-template" id="everest-forms-template-<?php echo esc_attr( $template->slug ); ?>">
75
  <figure class="everest-forms-screenshot <?php echo esc_attr( $click_class ); ?>" data-template-name-raw="<?php echo esc_attr( $template->title ); ?>" data-template="<?php echo esc_attr( $template->slug ); ?>" data-template-name="<?php echo esc_attr( $template_name ); ?>">
76
  <img src="<?php echo esc_url( $template->image ); ?>"/>
77
+ <?php echo $badge; // @codingStandardsIgnoreLine ?>
78
  <?php if ( 'blank' !== $template->slug ) : ?>
79
  <div class="form-action">
80
  <a href="#" class="everest-forms-btn everest-forms-btn-primary <?php echo esc_attr( $upgrade_class ); ?>" data-licence-plan="<?php echo esc_attr( $license_plan ); ?>" data-template-name-raw="<?php echo esc_attr( $template->title ); ?>" data-template-name="<?php echo esc_attr( $template_name ); ?>" data-template="<?php echo esc_attr( $template->slug ); ?>"><?php esc_html_e( 'Get Started', 'everest-forms' ); ?></a>
includes/admin/views/html-admin-page-builder.php CHANGED
@@ -38,7 +38,7 @@ $preview_link = add_query_arg(
38
  <div class="everest-forms-nav-wrapper clearfix">
39
  <nav class="nav-tab-wrapper evf-nav-tab-wrapper">
40
  <?php
41
- foreach ( $tabs as $slug => $tab ) {
42
  echo '<a href="#" class="evf-panel-' . esc_attr( $slug ) . '-button nav-tab ' . ( $current_tab === $slug ? 'nav-tab-active' : '' ) . '" data-panel="' . esc_attr( $slug ) . '"><span class="evf-nav-icon ' . esc_attr( $slug ) . '"></span>' . esc_html( $tab['label'] ) . '</a>';
43
  }
44
 
@@ -47,7 +47,7 @@ $preview_link = add_query_arg(
47
  </nav>
48
  <div class="evf-forms-nav-right">
49
  <div class="evf-shortcode-field">
50
- <input type="text" class="large-text code" onfocus="this.select();" value="<?php printf( esc_html( '[everest_form id="%s"]' ), absint( wp_unslash( $_GET['form_id'] ) ) ); ?>" id="evf-form-shortcode" readonly="readonly" />
51
  <button id="copy-shortcode" class="everest-forms-btn help_tip dashicons copy-shortcode" href="#" data-tip="<?php esc_attr_e( 'Copy Shortcode!', 'everest-forms' ); ?>" data-copied="<?php esc_attr_e( 'Copied!', 'everest-forms' ); ?>">
52
  <span class="screen-reader-text"><?php esc_html_e( 'Copy shortcode', 'everest-forms' ); ?></span>
53
  </button>
@@ -57,7 +57,7 @@ $preview_link = add_query_arg(
57
  </div>
58
  </div>
59
  <div class="evf-tab-content">
60
- <?php foreach ( $tabs as $slug => $tab ) : ?>
61
  <div id="everest-forms-panel-<?php echo esc_attr( $slug ); ?>" class="everest-forms-panel<?php echo $current_tab === $slug ? ' active' : ''; ?>">
62
  <div class="everest-forms-panel-<?php echo $tab['sidebar'] ? 'sidebar-content' : 'full-content'; ?>">
63
  <?php if ( $tab['sidebar'] ) : ?>
@@ -88,7 +88,7 @@ $preview_link = add_query_arg(
88
  <# if ( ! _.isEmpty( data.settings.choices[choiceID].image ) ) { #>
89
  <img src="{{ data.settings.choices[choiceID].image }}" alt="{{ data.settings.choices[choiceID].label }}"<# if ( data.settings.choices[choiceID].label ) { #> title="{{ data.settings.choices[choiceID].label }}"<# } #>>
90
  <# } else { #>
91
- <img src="<?php echo esc_url( EVF()->plugin_url() . '/assets/images/everest-forms-placeholder.png' ); ?>" alt="{{ data.settings.choices[choiceID].label }}"<# if ( data.settings.choices[choiceID].label ) { #> title="{{ data.settings.choices[choiceID].label }}"<# } #>>
92
  <# } #>
93
  </span>
94
  <input type="{{ data.type }}" disabled<# if ( 1 === data.settings.choices[choiceID].default ) { print( ' checked' ); } #>>
38
  <div class="everest-forms-nav-wrapper clearfix">
39
  <nav class="nav-tab-wrapper evf-nav-tab-wrapper">
40
  <?php
41
+ foreach ( $tabs as $slug => $tab ) { // phpcs:ignore WordPress.WP.GlobalVariablesOverride
42
  echo '<a href="#" class="evf-panel-' . esc_attr( $slug ) . '-button nav-tab ' . ( $current_tab === $slug ? 'nav-tab-active' : '' ) . '" data-panel="' . esc_attr( $slug ) . '"><span class="evf-nav-icon ' . esc_attr( $slug ) . '"></span>' . esc_html( $tab['label'] ) . '</a>';
43
  }
44
 
47
  </nav>
48
  <div class="evf-forms-nav-right">
49
  <div class="evf-shortcode-field">
50
+ <input type="text" class="large-text code" onfocus="this.select();" value="<?php printf( esc_html( '[everest_form id="%s"]' ), absint( wp_unslash( $_GET['form_id'] ) ) ); // phpcs:ignore WordPress.Security.NonceVerification, WordPress.Security.ValidatedSanitizedInput.InputNotValidated ?>" id="evf-form-shortcode" readonly="readonly" />
51
  <button id="copy-shortcode" class="everest-forms-btn help_tip dashicons copy-shortcode" href="#" data-tip="<?php esc_attr_e( 'Copy Shortcode!', 'everest-forms' ); ?>" data-copied="<?php esc_attr_e( 'Copied!', 'everest-forms' ); ?>">
52
  <span class="screen-reader-text"><?php esc_html_e( 'Copy shortcode', 'everest-forms' ); ?></span>
53
  </button>
57
  </div>
58
  </div>
59
  <div class="evf-tab-content">
60
+ <?php foreach ( $tabs as $slug => $tab ) : // phpcs:ignore WordPress.WP.GlobalVariablesOverride ?>
61
  <div id="everest-forms-panel-<?php echo esc_attr( $slug ); ?>" class="everest-forms-panel<?php echo $current_tab === $slug ? ' active' : ''; ?>">
62
  <div class="everest-forms-panel-<?php echo $tab['sidebar'] ? 'sidebar-content' : 'full-content'; ?>">
63
  <?php if ( $tab['sidebar'] ) : ?>
88
  <# if ( ! _.isEmpty( data.settings.choices[choiceID].image ) ) { #>
89
  <img src="{{ data.settings.choices[choiceID].image }}" alt="{{ data.settings.choices[choiceID].label }}"<# if ( data.settings.choices[choiceID].label ) { #> title="{{ data.settings.choices[choiceID].label }}"<# } #>>
90
  <# } else { #>
91
+ <img src="<?php echo esc_url( evf()->plugin_url() . '/assets/images/everest-forms-placeholder.png' ); ?>" alt="{{ data.settings.choices[choiceID].label }}"<# if ( data.settings.choices[choiceID].label ) { #> title="{{ data.settings.choices[choiceID].label }}"<# } #>>
92
  <# } #>
93
  </span>
94
  <input type="{{ data.type }}" disabled<# if ( 1 === data.settings.choices[choiceID].default ) { print( ' checked' ); } #>>
includes/admin/views/html-admin-page-entries-view.php CHANGED
@@ -7,8 +7,8 @@
7
 
8
  defined( 'ABSPATH' ) || exit;
9
 
10
- $form_id = isset( $_GET['form_id'] ) ? absint( $_GET['form_id'] ) : 0; // WPCS: input var okay, CSRF ok.
11
- $entry_id = isset( $_GET['view-entry'] ) ? absint( $_GET['view-entry'] ) : 0; // WPCS: input var okay, CSRF ok.
12
  $entry = evf_get_entry( $entry_id, true );
13
  $form_data = evf()->form->get( $form_id, array( 'content_only' => true ) );
14
  $hide_empty = isset( $_COOKIE['everest_forms_entry_hide_empty'] ) && 'true' === $_COOKIE['everest_forms_entry_hide_empty'];
@@ -113,7 +113,7 @@ $trash_link = wp_nonce_url(
113
  echo '<span class="list ' . $answer_class . '">' . esc_html( wp_strip_all_tags( $value ) ) . '</span>'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
114
  }
115
  } else {
116
- echo nl2br( make_clickable( $field_label ) );
117
  }
118
  } else {
119
  if ( $correct_answers && false !== $correct_answers ) {
@@ -124,7 +124,7 @@ $trash_link = wp_nonce_url(
124
  }
125
  echo '<span class="list ' . $answer_class . '">' . esc_html( wp_strip_all_tags( $field_value ) ) . '</span>'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
126
  } else {
127
- echo nl2br( make_clickable( $field_value ) );
128
  }
129
  }
130
  } else {
@@ -159,7 +159,7 @@ $trash_link = wp_nonce_url(
159
  <p class="everest-forms-entry-date">
160
  <span class="dashicons dashicons-calendar"></span>
161
  <?php esc_html_e( 'Submitted:', 'everest-forms' ); ?>
162
- <strong><?php echo date_i18n( esc_html__( 'M j, Y @ g:ia', 'everest-forms' ), strtotime( $entry->date_created ) + ( get_option( 'gmt_offset' ) * 3600 ) ); ?> </strong>
163
  </p>
164
 
165
  <?php if ( ! empty( $entry->user_id ) && 0 !== $entry->user_id ) : ?>
@@ -168,17 +168,16 @@ $trash_link = wp_nonce_url(
168
  <?php
169
  esc_html_e( 'User:', 'everest-forms' );
170
  $user = get_userdata( $entry->user_id );
171
- $user_name = esc_html( ! empty( $user->display_name ) ? $user->display_name : $user->user_login );
172
- $user_url = esc_url(
173
- add_query_arg(
174
- array(
175
- 'user_id' => absint( $user->ID ),
176
- ),
177
- admin_url( 'user-edit.php' )
178
- )
179
  );
180
  ?>
181
- <strong><a href="<?php echo $user_url; ?>"><?php echo $user_name; ?></a></strong>
182
  </p>
183
  <?php endif; ?>
184
 
@@ -202,7 +201,7 @@ $trash_link = wp_nonce_url(
202
  <p class="everest-forms-entry-status">
203
  <span class="dashicons dashicons-category"></span>
204
  <?php esc_html_e( 'Status:', 'everest-forms' ); ?>
205
- <strong><?php echo ! empty( $entry->status ) ? ucwords( sanitize_text_field( $entry->status ) ) : esc_html__( 'Completed', 'everest-forms' ); ?></strong>
206
  </p>
207
  <?php endif; ?>
208
 
7
 
8
  defined( 'ABSPATH' ) || exit;
9
 
10
+ $form_id = isset( $_GET['form_id'] ) ? absint( $_GET['form_id'] ) : 0; // phpcs:ignore WordPress.Security.NonceVerification
11
+ $entry_id = isset( $_GET['view-entry'] ) ? absint( $_GET['view-entry'] ) : 0; // phpcs:ignore WordPress.Security.NonceVerification
12
  $entry = evf_get_entry( $entry_id, true );
13
  $form_data = evf()->form->get( $form_id, array( 'content_only' => true ) );
14
  $hide_empty = isset( $_COOKIE['everest_forms_entry_hide_empty'] ) && 'true' === $_COOKIE['everest_forms_entry_hide_empty'];
113
  echo '<span class="list ' . $answer_class . '">' . esc_html( wp_strip_all_tags( $value ) ) . '</span>'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
114
  }
115
  } else {
116
+ echo nl2br( make_clickable( $field_label ) ); // @codingStandardsIgnoreLine
117
  }
118
  } else {
119
  if ( $correct_answers && false !== $correct_answers ) {
124
  }
125
  echo '<span class="list ' . $answer_class . '">' . esc_html( wp_strip_all_tags( $field_value ) ) . '</span>'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
126
  } else {
127
+ echo nl2br( make_clickable( $field_value ) ); // @codingStandardsIgnoreLine
128
  }
129
  }
130
  } else {
159
  <p class="everest-forms-entry-date">
160
  <span class="dashicons dashicons-calendar"></span>
161
  <?php esc_html_e( 'Submitted:', 'everest-forms' ); ?>
162
+ <strong><?php echo date_i18n( esc_html__( 'M j, Y @ g:ia', 'everest-forms' ), strtotime( $entry->date_created ) + ( get_option( 'gmt_offset' ) * 3600 ) ); // phpcs:ignore WordPress.Security.EscapeOutput ?> </strong>
163
  </p>
164
 
165
  <?php if ( ! empty( $entry->user_id ) && 0 !== $entry->user_id ) : ?>
168
  <?php
169
  esc_html_e( 'User:', 'everest-forms' );
170
  $user = get_userdata( $entry->user_id );
171
+ $user_name = ! empty( $user->display_name ) ? $user->display_name : $user->user_login;
172
+ // phpcs:ignore WordPress.WP.GlobalVariablesOverride
173
+ $user_url = add_query_arg(
174
+ array(
175
+ 'user_id' => absint( $user->ID ),
176
+ ),
177
+ admin_url( 'user-edit.php' )
 
178
  );
179
  ?>
180
+ <strong><a href="<?php echo esc_url( $user_url ); ?>"><?php echo esc_html( $user_name ); ?></a></strong>
181
  </p>
182
  <?php endif; ?>
183
 
201
  <p class="everest-forms-entry-status">
202
  <span class="dashicons dashicons-category"></span>
203
  <?php esc_html_e( 'Status:', 'everest-forms' ); ?>
204
+ <strong><?php echo ! empty( $entry->status ) ? ucwords( sanitize_text_field( $entry->status ) ) : esc_html__( 'Completed', 'everest-forms' ); // phpcs:ignore WordPress.Security.EscapeOutput ?></strong>
205
  </p>
206
  <?php endif; ?>
207
 
includes/admin/views/html-admin-page-export.php CHANGED
@@ -9,13 +9,13 @@ defined( 'ABSPATH' ) || exit;
9
 
10
  ?>
11
  <div class="everest-forms-export-form">
12
- <h3><?php echo __( 'Export Everest Forms with Settings', 'everest-forms' ); ?></h3>
13
- <p><?php echo __( 'Export your forms along with their settings as JSON file.', 'everest-forms' ); ?></p>
14
  <form method="post" action="<?php echo esc_url( admin_url( 'admin.php?page=evf-tools&tab=export' ) ); ?>">
15
  <?php
16
  $forms = evf_get_all_forms( true );
17
  if ( ! empty( $forms ) ) {
18
- echo '<select id="everest-forms-form-export" style="min-width: 350px;" name="form_id" data-placeholder="' . esc_attr__( 'Select form', 'everest-forms' ) . '"><option value="">' . __( 'Select a form', 'everest-forms' ) . '</option>';
19
  foreach ( $forms as $id => $form ) { // phpcs:ignore WordPress.WP.GlobalVariablesOverride
20
  echo '<option value="' . esc_attr( $id ) . '">' . esc_html( $form ) . '</option>';
21
  }
9
 
10
  ?>
11
  <div class="everest-forms-export-form">
12
+ <h3><?php esc_html_e( 'Export Everest Forms with Settings', 'everest-forms' ); ?></h3>
13
+ <p><?php esc_html_e( 'Export your forms along with their settings as JSON file.', 'everest-forms' ); ?></p>
14
  <form method="post" action="<?php echo esc_url( admin_url( 'admin.php?page=evf-tools&tab=export' ) ); ?>">
15
  <?php
16
  $forms = evf_get_all_forms( true );
17
  if ( ! empty( $forms ) ) {
18
+ echo '<select id="everest-forms-form-export" style="min-width: 350px;" name="form_id" data-placeholder="' . esc_attr__( 'Select form', 'everest-forms' ) . '"><option value="">' . esc_html__( 'Select a form', 'everest-forms' ) . '</option>';
19
  foreach ( $forms as $id => $form ) { // phpcs:ignore WordPress.WP.GlobalVariablesOverride
20
  echo '<option value="' . esc_attr( $id ) . '">' . esc_html( $form ) . '</option>';
21
  }
includes/admin/views/html-admin-page-import.php CHANGED
@@ -15,7 +15,13 @@ defined( 'ABSPATH' ) || exit;
15
  <input type="file" name="file" id="everest-forms-import" <?php esc_attr_e( 'files selected', 'everest-forms' ); ?>" accept=".json" />
16
  <label for="everest-forms-import"><span class="everest-forms-btn dashicons dashicons-upload">Choose File</span><span id="import-file-name"><?php esc_html_e( 'No file selected', 'everest-forms' ); ?></span></label>
17
  </div>
18
- <p class="description"><i class="dashicons dashicons-info"></i><?php printf( esc_html( 'Only %s file is allowed.', 'everest-forms' ), '<strong>JSON</strong>' ); ?></p>
 
 
 
 
 
 
19
  <div class="publishing-action">
20
  <button type="submit" class="everest-forms-btn everest-forms-btn-primary everest_forms_import_action" name="everest-forms-import-form"><?php esc_html_e( 'Import Form', 'everest-forms' ); ?></button>
21
  <?php wp_nonce_field( 'everest_forms_import_nonce', 'everest-forms-import-nonce' ); ?>
15
  <input type="file" name="file" id="everest-forms-import" <?php esc_attr_e( 'files selected', 'everest-forms' ); ?>" accept=".json" />
16
  <label for="everest-forms-import"><span class="everest-forms-btn dashicons dashicons-upload">Choose File</span><span id="import-file-name"><?php esc_html_e( 'No file selected', 'everest-forms' ); ?></span></label>
17
  </div>
18
+ <p class="description">
19
+ <i class="dashicons dashicons-info"></i>
20
+ <?php
21
+ /* translators: %s: File format */
22
+ printf( esc_html__( 'Only %s file is allowed.', 'everest-forms' ), '<strong>JSON</strong>' );
23
+ ?>
24
+ </p>
25
  <div class="publishing-action">
26
  <button type="submit" class="everest-forms-btn everest-forms-btn-primary everest_forms_import_action" name="everest-forms-import-form"><?php esc_html_e( 'Import Form', 'everest-forms' ); ?></button>
27
  <?php wp_nonce_field( 'everest_forms_import_nonce', 'everest-forms-import-nonce' ); ?>
includes/admin/views/html-admin-page-tools-logs.php CHANGED
@@ -36,8 +36,8 @@ defined( 'ABSPATH' ) || exit;
36
  <div class="clear"></div>
37
  </div>
38
  <div id="log-viewer">
39
- <pre><?php echo esc_html( file_get_contents( EVF_LOG_DIR . $viewed_log ) ); ?></pre>
40
  </div>
41
  <?php else : ?>
42
- <div class="updated everest-forms-message inline"><p><?php _e( 'There are currently no logs to view.', 'everest-forms' ); ?></p></div>
43
  <?php endif; ?>
36
  <div class="clear"></div>
37
  </div>
38
  <div id="log-viewer">
39
+ <pre><?php echo esc_html( file_get_contents( EVF_LOG_DIR . $viewed_log ) ); // phpcs:ignore WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents ?></pre>
40
  </div>
41
  <?php else : ?>
42
+ <div class="updated everest-forms-message inline"><p><?php esc_html_e( 'There are currently no logs to view.', 'everest-forms' ); ?></p></div>
43
  <?php endif; ?>
includes/admin/views/html-admin-page-tools.php CHANGED
@@ -7,7 +7,7 @@
7
 
8
  defined( 'ABSPATH' ) || exit;
9
 
10
- $current_tab = ! empty( $_REQUEST['tab'] ) ? sanitize_title( $_REQUEST['tab'] ) : 'import';
11
  $tabs = apply_filters(
12
  'everest_forms_admin_status_tabs',
13
  array(
@@ -16,6 +16,7 @@ $tabs = apply_filters(
16
  'logs' => __( 'Logs', 'everest-forms' ),
17
  )
18
  );
 
19
 
20
  ?>
21
  <div class="wrap everest-forms">
@@ -29,22 +30,22 @@ $tabs = apply_filters(
29
  <h1 class="screen-reader-text"><?php echo esc_html( $tabs[ $current_tab ] ); ?></h1>
30
  <?php
31
  switch ( $current_tab ) {
32
- case "logs" :
33
  EVF_Admin_Tools::status_logs();
34
- break;
35
- case "import" :
36
  EVF_Admin_Tools::import();
37
- break;
38
- case "export" :
39
  EVF_Admin_Tools::export();
40
- break;
41
- default :
42
  if ( array_key_exists( $current_tab, $tabs ) && has_action( 'everest_forms_admin_status_content_' . $current_tab ) ) {
43
  do_action( 'everest_forms_admin_status_content_' . $current_tab );
44
  } else {
45
  EVF_Admin_Tools::import();
46
  }
47
- break;
48
  }
49
  ?>
50
  </div>
7
 
8
  defined( 'ABSPATH' ) || exit;
9
 
10
+ // phpcs:ignore WordPress.WP.GlobalVariablesOverride
11
  $tabs = apply_filters(
12
  'everest_forms_admin_status_tabs',
13
  array(
16
  'logs' => __( 'Logs', 'everest-forms' ),
17
  )
18
  );
19
+ $current_tab = ! empty( $_REQUEST['tab'] ) ? sanitize_title( wp_unslash( $_REQUEST['tab'] ) ) : 'import'; // phpcs:ignore WordPress.Security.NonceVerification
20
 
21
  ?>
22
  <div class="wrap everest-forms">
30
  <h1 class="screen-reader-text"><?php echo esc_html( $tabs[ $current_tab ] ); ?></h1>
31
  <?php
32
  switch ( $current_tab ) {
33
+ case 'logs':
34
  EVF_Admin_Tools::status_logs();
35
+ break;
36
+ case 'import':
37
  EVF_Admin_Tools::import();
38
+ break;
39
+ case 'export':
40
  EVF_Admin_Tools::export();
41
+ break;
42
+ default:
43
  if ( array_key_exists( $current_tab, $tabs ) && has_action( 'everest_forms_admin_status_content_' . $current_tab ) ) {
44
  do_action( 'everest_forms_admin_status_content_' . $current_tab );
45
  } else {
46
  EVF_Admin_Tools::import();
47
  }
48
+ break;
49
  }
50
  ?>
51
  </div>
includes/admin/views/html-notice-custom.php CHANGED
@@ -5,9 +5,7 @@
5
  * @package EverestForms\Admin\Notice
6
  */
7
 
8
- if ( ! defined( 'ABSPATH' ) ) {
9
- exit;
10
- }
11
 
12
  ?>
13
  <div id="message" class="updated everest-forms-message">
5
  * @package EverestForms\Admin\Notice
6
  */
7
 
8
+ defined( 'ABSPATH' ) || exit;
 
 
9
 
10
  ?>
11
  <div id="message" class="updated everest-forms-message">
includes/admin/views/html-notice-review.php CHANGED
@@ -14,8 +14,12 @@ defined( 'ABSPATH' ) || exit;
14
  </div>
15
  <div class="everest-forms-message--content">
16
  <h3 class="everest-forms-message__title"><?php esc_html_e( 'Please help us spread the word', 'everest-forms' ); ?></h3>
17
- <p class="everest-forms-message__description"><?php printf( esc_html( 'Enjoying the experience with %1$s? Please take a moment to spread your love by rating us on %2$s', 'everest-forms' ), '<strong>Everest Forms</strong>', '<a href="https://wordpress.org/support/plugin/everest-forms/reviews?rate=5#new-post" target="_blank"><strong>WordPress.org</strong>!</a>' ); ?></p>
18
-
 
 
 
 
19
  <p class="everest-forms-message__action submit">
20
  <a href="https://wordpress.org/support/plugin/everest-forms/reviews?rate=5#new-post" class="button button-primary evf-dismiss-review-notice evf-review-received" target="_blank" rel="noopener noreferrer"><?php esc_html_e( 'Sure, I\'d love to!', 'everest-forms' ); ?></a>
21
  <a href="#" class="button button-secondary evf-dismiss-review-notice" target="_blank" rel="noopener noreferrer"><?php esc_html_e( 'Remind me later', 'everest-forms' ); ?></a>
14
  </div>
15
  <div class="everest-forms-message--content">
16
  <h3 class="everest-forms-message__title"><?php esc_html_e( 'Please help us spread the word', 'everest-forms' ); ?></h3>
17
+ <p class="everest-forms-message__description">
18
+ <?php
19
+ /* translators: %1$s: Plugin Name, %2$s: Rating link */
20
+ printf( esc_html__( 'Enjoying the experience with %1$s? Please take a moment to spread your love by rating us on %2$s', 'everest-forms' ), '<strong>Everest Forms</strong>', '<a href="https://wordpress.org/support/plugin/everest-forms/reviews?rate=5#new-post" target="_blank"><strong>WordPress.org</strong>!</a>' );
21
+ ?>
22
+ </p>
23
  <p class="everest-forms-message__action submit">
24
  <a href="https://wordpress.org/support/plugin/everest-forms/reviews?rate=5#new-post" class="button button-primary evf-dismiss-review-notice evf-review-received" target="_blank" rel="noopener noreferrer"><?php esc_html_e( 'Sure, I\'d love to!', 'everest-forms' ); ?></a>
25
  <a href="#" class="button button-secondary evf-dismiss-review-notice" target="_blank" rel="noopener noreferrer"><?php esc_html_e( 'Remind me later', 'everest-forms' ); ?></a>
includes/admin/views/html-notice-update.php CHANGED
@@ -5,16 +5,13 @@
5
  * @package EverestForms\Admin\Notice
6
  */
7
 
8
- if ( ! defined( 'ABSPATH' ) ) {
9
- exit;
10
- }
11
 
12
  $update_url = wp_nonce_url(
13
  add_query_arg( 'do_update_everest_forms', 'true', admin_url( 'admin.php?page=evf-settings' ) ),
14
  'evf_db_update',
15
  'evf_db_update_nonce'
16
  );
17
-
18
  ?>
19
  <div id="message" class="updated everest-forms-message evf-connect">
20
  <p>
5
  * @package EverestForms\Admin\Notice
6
  */
7
 
8
+ defined( 'ABSPATH' ) || exit;
 
 
9
 
10
  $update_url = wp_nonce_url(
11
  add_query_arg( 'do_update_everest_forms', 'true', admin_url( 'admin.php?page=evf-settings' ) ),
12
  'evf_db_update',
13
  'evf_db_update_nonce'
14
  );
 
15
  ?>
16
  <div id="message" class="updated everest-forms-message evf-connect">
17
  <p>
includes/admin/views/html-notice-updated.php CHANGED
@@ -5,9 +5,7 @@
5
  * @package EverestForms\Admin\Notice
6
  */
7
 
8
- if ( ! defined( 'ABSPATH' ) ) {
9
- exit;
10
- }
11
 
12
  ?>
13
  <div id="message" class="updated everest-forms-message evf-connect everest-forms-message--success">
5
  * @package EverestForms\Admin\Notice
6
  */
7
 
8
+ defined( 'ABSPATH' ) || exit;
 
 
9
 
10
  ?>
11
  <div id="message" class="updated everest-forms-message evf-connect everest-forms-message--success">
includes/admin/views/html-notice-updating.php CHANGED
@@ -5,9 +5,7 @@
5
  * @package EverestForms\Admin\Notice
6
  */
7
 
8
- if ( ! defined( 'ABSPATH' ) ) {
9
- exit;
10
- }
11
 
12
  ?>
13
  <div id="message" class="updated everest-forms-message evf-connect">
5
  * @package EverestForms\Admin\Notice
6
  */
7
 
8
+ defined( 'ABSPATH' ) || exit;
 
 
9
 
10
  ?>
11
  <div id="message" class="updated everest-forms-message evf-connect">
includes/class-everest-forms.php CHANGED
@@ -21,7 +21,7 @@ final class EverestForms {
21
  *
22
  * @var string
23
  */
24
- public $version = '1.6.1';
25
 
26
  /**
27
  * The single instance of the class.
@@ -29,7 +29,7 @@ final class EverestForms {
29
  * @var EverestForms
30
  * @since 1.0.0
31
  */
32
- protected static $_instance = null;
33
 
34
  /**
35
  * Session instance.
@@ -86,10 +86,10 @@ final class EverestForms {
86
  * @return EverestForms - Main instance.
87
  */
88
  public static function instance() {
89
- if ( is_null( self::$_instance ) ) {
90
- self::$_instance = new self();
91
  }
92
- return self::$_instance;
93
  }
94
 
95
  /**
21
  *
22
  * @var string
23
  */
24
+ public $version = '1.6.2';
25
 
26
  /**
27
  * The single instance of the class.
29
  * @var EverestForms
30
  * @since 1.0.0
31
  */
32
+ protected static $instance = null;
33
 
34
  /**
35
  * Session instance.
86
  * @return EverestForms - Main instance.
87
  */
88
  public static function instance() {
89
+ if ( is_null( self::$instance ) ) {
90
+ self::$instance = new self();
91
  }
92
+ return self::$instance;
93
  }
94
 
95
  /**
includes/class-evf-ajax.php CHANGED
@@ -63,8 +63,8 @@ class EVF_AJAX {
63
  public static function do_evf_ajax() {
64
  global $wp_query;
65
 
66
- if ( ! empty( $_GET['evf-ajax'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.NoNonceVerification
67
- $wp_query->set( 'evf-ajax', sanitize_text_field( wp_unslash( $_GET['evf-ajax'] ) ) ); // phpcs:ignore WordPress.Security.NonceVerification.NoNonceVerification
68
  }
69
 
70
  $action = $wp_query->get( 'evf-ajax' );
@@ -122,14 +122,14 @@ class EVF_AJAX {
122
  if ( $form_id < 1 ) {
123
  wp_send_json_error(
124
  array(
125
- 'error' => __( 'Invalid form', 'everest-forms' ),
126
  )
127
  );
128
  }
129
  if ( ! current_user_can( apply_filters( 'everest_forms_manage_cap', 'manage_options' ) ) ) {
130
  wp_send_json_error();
131
  }
132
- $field_key = EVF()->form->field_unique_key( $form_id );
133
  $field_id_array = explode( '-', $field_key );
134
  $new_field_id = ( $field_id_array[ count( $field_id_array ) - 1 ] + 1 );
135
  wp_send_json_success(
@@ -152,10 +152,10 @@ class EVF_AJAX {
152
  wp_die( -1 );
153
  }
154
 
155
- $title = isset( $_POST['title'] ) ? $_POST['title'] : __( 'Blank Form', 'everest-forms' );
156
- $template = isset( $_POST['template'] ) ? $_POST['template'] : 'blank';
157
 
158
- $form_id = EVF()->form->create( $title, $template );
159
 
160
  if ( $form_id ) {
161
  $data = array(
@@ -174,7 +174,7 @@ class EVF_AJAX {
174
 
175
  wp_send_json_error(
176
  array(
177
- 'error' => __( 'Something went wrong, please try again later', 'everest-forms' ),
178
  )
179
  );
180
  }
@@ -195,7 +195,7 @@ class EVF_AJAX {
195
  die( esc_html__( 'No data provided', 'everest-forms' ) );
196
  }
197
 
198
- $form_post = json_decode( stripslashes( $_POST['form_data'] ) );
199
 
200
  $data = array();
201
 
@@ -215,7 +215,7 @@ class EVF_AJAX {
215
 
216
  // Build the new array value from leaf to trunk.
217
  for ( $i = count( $array_bits ) - 1; $i >= 0; $i -- ) {
218
- if ( $i === count( $array_bits ) - 1 ) {
219
  $new_post_data[ $array_bits[ $i ] ] = wp_slash( $post_input_data->value );
220
  } else {
221
  $new_post_data = array(
@@ -245,8 +245,9 @@ class EVF_AJAX {
245
  if ( ! empty( $empty_meta_data ) ) {
246
  wp_send_json_error(
247
  array(
248
- 'errorTitle' => __( 'Meta Key missing', 'everest-forms' ),
249
- 'errorMessage' => sprintf( __( 'Please add Meta key for fields: %s', 'everest-forms' ), '<strong>' . implode( ', ', $empty_meta_data ) . '</strong>' ),
 
250
  )
251
  );
252
  }
@@ -258,7 +259,7 @@ class EVF_AJAX {
258
  $data['form_fields'] = array_merge( array_intersect_key( array_flip( $structure ), $data['form_fields'] ), $data['form_fields'] );
259
  }
260
 
261
- $form_id = EVF()->form->update( $data['id'], $data );
262
 
263
  do_action( 'everest_forms_save_form', $form_id, $data );
264
 
@@ -286,8 +287,7 @@ class EVF_AJAX {
286
  check_ajax_referer( 'everest_forms_ajax_form_submission', 'security' );
287
 
288
  if ( ! empty( $_POST['everest_forms']['id'] ) ) {
289
- // $process = evf()->task->do_task( stripslashes_deep( $_POST['everest_forms'] ) );
290
- $process = evf()->task->ajax_form_submission( stripslashes_deep( $_POST['everest_forms'] ) );
291
  if ( 'success' === $process['response'] ) {
292
  wp_send_json_success( $process );
293
  }
@@ -311,7 +311,7 @@ class EVF_AJAX {
311
  );
312
  }
313
 
314
- $activate = activate_plugin( $_POST['addon'] . '/' . $_POST['addon'] . '.php' );
315
 
316
  if ( is_wp_error( $activate ) ) {
317
  wp_send_json_error(
@@ -351,7 +351,7 @@ class EVF_AJAX {
351
 
352
  if ( ! empty( $template_data->templates ) ) {
353
  foreach ( $template_data->templates as $template ) {
354
- if ( $template->slug === $_POST['slug'] && in_array( $_POST['plan'], $template->plan, true ) ) {
355
  $addons = $template->addons;
356
  }
357
  }
@@ -410,7 +410,7 @@ class EVF_AJAX {
410
  array(
411
  'slug' => '',
412
  'errorCode' => 'no_plugin_specified',
413
- 'errorMessage' => __( 'No plugin specified.', 'everest-forms' ),
414
  )
415
  );
416
  }
@@ -423,7 +423,7 @@ class EVF_AJAX {
423
  );
424
 
425
  if ( ! current_user_can( 'install_plugins' ) ) {
426
- $status['errorMessage'] = __( 'Sorry, you are not allowed to install plugins on this site.', 'everest-forms' );
427
  wp_send_json_error( $status );
428
  }
429
 
@@ -487,7 +487,7 @@ class EVF_AJAX {
487
  global $wp_filesystem;
488
 
489
  $status['errorCode'] = 'unable_to_connect_to_filesystem';
490
- $status['errorMessage'] = __( 'Unable to connect to the filesystem. Please confirm your credentials.', 'everest-forms' );
491
 
492
  // Pass through the error from WP_Filesystem if one was raised.
493
  if ( $wp_filesystem instanceof WP_Filesystem_Base && is_wp_error( $wp_filesystem->errors ) && $wp_filesystem->errors->get_error_code() ) {
@@ -500,7 +500,7 @@ class EVF_AJAX {
500
  $install_status = install_plugin_install_status( $api );
501
 
502
  if ( current_user_can( 'activate_plugin', $install_status['file'] ) && is_plugin_inactive( $install_status['file'] ) ) {
503
- if ( 'everest-forms_page_evf-builder' === $_POST['page'] ) {
504
  activate_plugin( $install_status['file'] );
505
  } else {
506
  $status['activateUrl'] = add_query_arg(
@@ -536,7 +536,7 @@ class EVF_AJAX {
536
  );
537
  }
538
 
539
- do_action( 'everest_forms_integration_account_connect_' . $_POST['source'], $_POST );
540
  }
541
 
542
  /**
@@ -548,12 +548,10 @@ class EVF_AJAX {
548
  if ( ! current_user_can( 'manage_everest_forms' ) ) {
549
  wp_die( -1 );
550
  }
551
- // $connection = self::output_email_connection( '', array( 'connection_name' => $_POST['name'] ), $_POST['id'] );
552
  $connection_id = 'connection_' . uniqid();
553
 
554
  wp_send_json_success(
555
  array(
556
- // 'html' => $connection[ 'html' ],
557
  'connection_id' => $connection_id,
558
  )
559
  );
@@ -616,7 +614,7 @@ class EVF_AJAX {
616
  );
617
 
618
  /* translators: %1$s - deactivation reason page; %2$d - deactivation url. */
619
- $deactivation_notice = sprintf( __( 'Before we deactivate Everest Forms, would you care to <a href="%1$s" target="_blank">let us know why</a> so we can improve it for you? <a href="%2$s">No, deactivate now</a>.', 'everest-forms' ), 'https://wpeverest.com/deactivation/everest-forms/', $deactivate_url );
620
 
621
  wp_send_json(
622
  array(
@@ -649,7 +647,7 @@ class EVF_AJAX {
649
  wp_die( -1 );
650
  }
651
  $review = get_option( 'everest_forms_review', array() );
652
- $review['time'] = current_time( 'timestamp' );
653
  $review['dismissed'] = true;
654
  update_option( 'everest_forms_review', $review );
655
  wp_die();
@@ -669,11 +667,11 @@ class EVF_AJAX {
669
  $form_id = isset( $_POST['form_id'] ) ? absint( $_POST['form_id'] ) : 0;
670
  $enabled = isset( $_POST['enabled'] ) ? absint( $_POST['enabled'] ) : 0;
671
 
672
- $form_data = EVF()->form->get( absint( $form_id ), array( 'content_only' => true ) );
673
 
674
  $form_data['form_enabled'] = $enabled;
675
 
676
- EVF()->form->update( $form_id, $form_data );
677
  }
678
 
679
  /**
63
  public static function do_evf_ajax() {
64
  global $wp_query;
65
 
66
+ if ( ! empty( $_GET['evf-ajax'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification
67
+ $wp_query->set( 'evf-ajax', sanitize_text_field( wp_unslash( $_GET['evf-ajax'] ) ) ); // phpcs:ignore WordPress.Security.NonceVerification
68
  }
69
 
70
  $action = $wp_query->get( 'evf-ajax' );
122
  if ( $form_id < 1 ) {
123
  wp_send_json_error(
124
  array(
125
+ 'error' => esc_html__( 'Invalid form', 'everest-forms' ),
126
  )
127
  );
128
  }
129
  if ( ! current_user_can( apply_filters( 'everest_forms_manage_cap', 'manage_options' ) ) ) {
130
  wp_send_json_error();
131
  }
132
+ $field_key = evf()->form->field_unique_key( $form_id );
133
  $field_id_array = explode( '-', $field_key );
134
  $new_field_id = ( $field_id_array[ count( $field_id_array ) - 1 ] + 1 );
135
  wp_send_json_success(
152
  wp_die( -1 );
153
  }
154
 
155
+ $title = isset( $_POST['title'] ) ? sanitize_text_field( wp_unslash( $_POST['title'] ) ) : esc_html__( 'Blank Form', 'everest-forms' );
156
+ $template = isset( $_POST['template'] ) ? sanitize_text_field( wp_unslash( $_POST['template'] ) ) : 'blank';
157
 
158
+ $form_id = evf()->form->create( $title, $template );
159
 
160
  if ( $form_id ) {
161
  $data = array(
174
 
175
  wp_send_json_error(
176
  array(
177
+ 'error' => esc_html__( 'Something went wrong, please try again later', 'everest-forms' ),
178
  )
179
  );
180
  }
195
  die( esc_html__( 'No data provided', 'everest-forms' ) );
196
  }
197
 
198
+ $form_post = json_decode( stripslashes( wp_unslash( $_POST['form_data'] ) ) ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
199
 
200
  $data = array();
201
 
215
 
216
  // Build the new array value from leaf to trunk.
217
  for ( $i = count( $array_bits ) - 1; $i >= 0; $i -- ) {
218
+ if ( count( $array_bits ) - 1 === $i ) {
219
  $new_post_data[ $array_bits[ $i ] ] = wp_slash( $post_input_data->value );
220
  } else {
221
  $new_post_data = array(
245
  if ( ! empty( $empty_meta_data ) ) {
246
  wp_send_json_error(
247
  array(
248
+ 'errorTitle' => esc_html__( 'Meta Key missing', 'everest-forms' ),
249
+ /* translators: %s: empty meta data */
250
+ 'errorMessage' => sprintf( esc_html__( 'Please add Meta key for fields: %s', 'everest-forms' ), '<strong>' . implode( ', ', $empty_meta_data ) . '</strong>' ),
251
  )
252
  );
253
  }
259
  $data['form_fields'] = array_merge( array_intersect_key( array_flip( $structure ), $data['form_fields'] ), $data['form_fields'] );
260
  }
261
 
262
+ $form_id = evf()->form->update( $data['id'], $data );
263
 
264
  do_action( 'everest_forms_save_form', $form_id, $data );
265
 
287
  check_ajax_referer( 'everest_forms_ajax_form_submission', 'security' );
288
 
289
  if ( ! empty( $_POST['everest_forms']['id'] ) ) {
290
+ $process = evf()->task->ajax_form_submission( stripslashes_deep( $_POST['everest_forms'] ) ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
 
291
  if ( 'success' === $process['response'] ) {
292
  wp_send_json_success( $process );
293
  }
311
  );
312
  }
313
 
314
+ $activate = activate_plugin( sanitize_text_field( wp_unslash( $_POST['addon'] ) ) . '/' . sanitize_text_field( wp_unslash( $_POST['addon'] ) ) . '.php' );
315
 
316
  if ( is_wp_error( $activate ) ) {
317
  wp_send_json_error(
351
 
352
  if ( ! empty( $template_data->templates ) ) {
353
  foreach ( $template_data->templates as $template ) {
354
+ if ( isset( $_POST['slug'] ) && $template->slug === $_POST['slug'] && in_array( $_POST['plan'], $template->plan, true ) ) {
355
  $addons = $template->addons;
356
  }
357
  }
410
  array(
411
  'slug' => '',
412
  'errorCode' => 'no_plugin_specified',
413
+ 'errorMessage' => esc_html__( 'No plugin specified.', 'everest-forms' ),
414
  )
415
  );
416
  }
423
  );
424
 
425
  if ( ! current_user_can( 'install_plugins' ) ) {
426
+ $status['errorMessage'] = esc_html__( 'Sorry, you are not allowed to install plugins on this site.', 'everest-forms' );
427
  wp_send_json_error( $status );
428
  }
429
 
487
  global $wp_filesystem;
488
 
489
  $status['errorCode'] = 'unable_to_connect_to_filesystem';
490
+ $status['errorMessage'] = esc_html__( 'Unable to connect to the filesystem. Please confirm your credentials.', 'everest-forms' );
491
 
492
  // Pass through the error from WP_Filesystem if one was raised.
493
  if ( $wp_filesystem instanceof WP_Filesystem_Base && is_wp_error( $wp_filesystem->errors ) && $wp_filesystem->errors->get_error_code() ) {
500
  $install_status = install_plugin_install_status( $api );
501
 
502
  if ( current_user_can( 'activate_plugin', $install_status['file'] ) && is_plugin_inactive( $install_status['file'] ) ) {
503
+ if ( isset( $_POST['page'] ) && 'everest-forms_page_evf-builder' === $_POST['page'] ) {
504
  activate_plugin( $install_status['file'] );
505
  } else {
506
  $status['activateUrl'] = add_query_arg(
536
  );
537
  }
538
 
539
+ do_action( 'everest_forms_integration_account_connect_' . sanitize_text_field( wp_unslash( $_POST['source'] ) ), $_POST ); //phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotValidated
540
  }
541
 
542
  /**
548
  if ( ! current_user_can( 'manage_everest_forms' ) ) {
549
  wp_die( -1 );
550
  }
 
551
  $connection_id = 'connection_' . uniqid();
552
 
553
  wp_send_json_success(
554
  array(
 
555
  'connection_id' => $connection_id,
556
  )
557
  );
614
  );
615
 
616
  /* translators: %1$s - deactivation reason page; %2$d - deactivation url. */
617
+ $deactivation_notice = sprintf( esc_html__( 'Before we deactivate Everest Forms, would you care to <a href="%1$s" target="_blank">let us know why</a> so we can improve it for you? <a href="%2$s">No, deactivate now</a>.', 'everest-forms' ), 'https://wpeverest.com/deactivation/everest-forms/', $deactivate_url );
618
 
619
  wp_send_json(
620
  array(
647
  wp_die( -1 );
648
  }
649
  $review = get_option( 'everest_forms_review', array() );
650
+ $review['time'] = current_time( 'timestamp' ); // phpcs:ignore WordPress.DateTime.CurrentTimeTimestamp.Requested
651
  $review['dismissed'] = true;
652
  update_option( 'everest_forms_review', $review );
653
  wp_die();
667
  $form_id = isset( $_POST['form_id'] ) ? absint( $_POST['form_id'] ) : 0;
668
  $enabled = isset( $_POST['enabled'] ) ? absint( $_POST['enabled'] ) : 0;
669
 
670
+ $form_data = evf()->form->get( absint( $form_id ), array( 'content_only' => true ) );
671
 
672
  $form_data['form_enabled'] = $enabled;
673
 
674
+ evf()->form->update( $form_id, $form_data );
675
  }
676
 
677
  /**
includes/class-evf-cache-helper.php CHANGED
@@ -7,9 +7,7 @@
7
  * @package EverestForms/Classes
8
  */
9
 
10
- if ( ! defined( 'ABSPATH' ) ) {
11
- exit;
12
- }
13
 
14
  /**
15
  * EVF_Cache_Helper Class.
@@ -77,7 +75,12 @@ class EVF_Cache_Helper {
77
  if ( $enabled && ! in_array( '_evf_session_', $settings, true ) ) {
78
  ?>
79
  <div class="error">
80
- <p><?php echo wp_kses_post( sprintf( __( 'In order for <strong>database caching</strong> to work with Everest Forms you must add %1$s to the "Ignored Query Strings" option in <a href="%2$s">W3 Total Cache settings</a>.', 'everest-forms' ), '<code>_evf_session_</code>', esc_url( admin_url( 'admin.php?page=w3tc_dbcache' ) ) ) ); ?></p>
 
 
 
 
 
81
  </div>
82
  <?php
83
  }
7
  * @package EverestForms/Classes
8
  */
9
 
10
+ defined( 'ABSPATH' ) || exit;
 
 
11
 
12
  /**
13
  * EVF_Cache_Helper Class.
75
  if ( $enabled && ! in_array( '_evf_session_', $settings, true ) ) {
76
  ?>
77
  <div class="error">
78
+ <p>
79
+ <?php
80
+ /* translators: 1: key 2: URL */
81
+ echo wp_kses_post( sprintf( __( 'In order for <strong>database caching</strong> to work with Everest Forms you must add %1$s to the "Ignored Query Strings" option in <a href="%2$s">W3 Total Cache settings</a>.', 'everest-forms' ), '<code>_evf_session_</code>', esc_url( admin_url( 'admin.php?page=w3tc_dbcache' ) ) ) );
82
+ ?>
83
+ </p>
84
  </div>
85
  <?php
86
  }
includes/class-evf-deprecated-action-hooks.php CHANGED
@@ -19,11 +19,11 @@ class EVF_Deprecated_Action_Hooks extends EVF_Deprecated_Hooks {
19
  * @var array
20
  */
21
  protected $deprecated_hooks = array(
22
- 'everest_forms_builder_page_init' => array(
23
  'everest_forms_page_init',
24
  'everest_forms_builder_init',
25
  ),
26
- 'admin_enqueue_scripts' => array(
27
  'everest_forms_page_init',
28
  'everest_forms_builder_scripts',
29
  'everest_forms_builder_enqueues_before',
19
  * @var array
20
  */
21
  protected $deprecated_hooks = array(
22
+ 'everest_forms_builder_page_init' => array(
23
  'everest_forms_page_init',
24
  'everest_forms_builder_init',
25
  ),
26
+ 'admin_enqueue_scripts' => array(
27
  'everest_forms_page_init',
28
  'everest_forms_builder_scripts',
29
  'everest_forms_builder_enqueues_before',
includes/class-evf-fields.php CHANGED
@@ -27,7 +27,7 @@ class EVF_Fields {
27
  *
28
  * @var EVF_Fields
29
  */
30
- protected static $_instance = null;
31
 
32
  /**
33
  * Main EVF_Fields Instance.
@@ -37,10 +37,10 @@ class EVF_Fields {
37
  * @return EVF_Fields Main instance.
38
  */
39
  public static function instance() {
40
- if ( is_null( self::$_instance ) ) {
41
- self::$_instance = new self();
42
  }
43
- return self::$_instance;
44
  }
45
 
46
  /**
27
  *
28
  * @var EVF_Fields
29
  */
30
+ protected static $instance = null;
31
 
32
  /**
33
  * Main EVF_Fields Instance.
37
  * @return EVF_Fields Main instance.
38
  */
39
  public static function instance() {
40
+ if ( is_null( self::$instance ) ) {
41
+ self::$instance = new self();
42
  }
43
+ return self::$instance;
44
  }
45
 
46
  /**
includes/class-evf-form-block.php CHANGED
@@ -59,21 +59,21 @@ class EVF_Form_Block {
59
  public function enqueue_block_editor_assets() {
60
  wp_register_style(
61
  'everest-forms-block-editor',
62
- EVF()->plugin_url() . '/assets/css/everest-forms.css',
63
  array( 'wp-edit-blocks' ),
64
- defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? filemtime( EVF()->plugin_path() . '/assets/css/everest-forms.css' ) : EVF_VERSION
65
  );
66
 
67
  wp_register_script(
68
  'everest-forms-block-editor',
69
- EVF()->plugin_url() . '/assets/js/admin/gutenberg/form-block.min.js',
70
  array( 'wp-blocks', 'wp-element', 'wp-i18n', 'wp-editor', 'wp-components' ),
71
- defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? filemtime( EVF()->plugin_path() . '/assets/js/admin/gutenberg/form-block.min.js' ) : EVF_VERSION,
72
  true
73
  );
74
 
75
  $form_block_data = array(
76
- 'forms' => EVF()->form->get( '', array( 'order' => 'DESC' ) ),
77
  'i18n' => array(
78
  'title' => esc_html__( 'Everest Forms', 'everest-forms' ),
79
  'description' => esc_html__( 'Select and display one of your forms.', 'everest-forms' ),
@@ -111,7 +111,7 @@ class EVF_Form_Block {
111
  $classes .= ' ' . $attr['className'];
112
  }
113
 
114
- $is_gb_editor = defined( 'REST_REQUEST' ) && REST_REQUEST && ! empty( $_REQUEST['context'] ) && 'edit' === $_REQUEST['context'];
115
  $title = ! empty( $attr['displayTitle'] ) ? true : false;
116
  $description = ! empty( $attr['displayDescription'] ) ? true : false;
117
 
59
  public function enqueue_block_editor_assets() {
60
  wp_register_style(
61
  'everest-forms-block-editor',
62
+ evf()->plugin_url() . '/assets/css/everest-forms.css',
63
  array( 'wp-edit-blocks' ),
64
+ defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? filemtime( evf()->plugin_path() . '/assets/css/everest-forms.css' ) : EVF_VERSION
65
  );
66
 
67
  wp_register_script(
68
  'everest-forms-block-editor',
69
+ evf()->plugin_url() . '/assets/js/admin/gutenberg/form-block.min.js',
70
  array( 'wp-blocks', 'wp-element', 'wp-i18n', 'wp-editor', 'wp-components' ),
71
+ defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? filemtime( evf()->plugin_path() . '/assets/js/admin/gutenberg/form-block.min.js' ) : EVF_VERSION,
72
  true
73
  );
74
 
75
  $form_block_data = array(
76
+ 'forms' => evf()->form->get( '', array( 'order' => 'DESC' ) ),
77
  'i18n' => array(
78
  'title' => esc_html__( 'Everest Forms', 'everest-forms' ),
79
  'description' => esc_html__( 'Select and display one of your forms.', 'everest-forms' ),
111
  $classes .= ' ' . $attr['className'];
112
  }
113
 
114
+ $is_gb_editor = defined( 'REST_REQUEST' ) && REST_REQUEST && ! empty( $_REQUEST['context'] ) && 'edit' === $_REQUEST['context']; // phpcs:ignore WordPress.Security.NonceVerification
115
  $title = ! empty( $attr['displayTitle'] ) ? true : false;
116
  $description = ! empty( $attr['displayDescription'] ) ? true : false;
117
 
includes/class-evf-form-handler.php CHANGED
@@ -4,9 +4,14 @@
4
  *
5
  * Contains a bunch of helper methods as well.
6
  *
7
- * @package EverestForms
8
- * @author WPEverest
9
- * @since 1.0.0
 
 
 
 
 
10
  */
11
  class EVF_Form_Handler {
12
 
@@ -14,9 +19,9 @@ class EVF_Form_Handler {
14
  * Fetches forms
15
  *
16
  * @since 1.0.0
17
- * @param mixed $id
18
- * @param array $args
19
- * @return array|bool|null|WP_Post
20
  */
21
  public function get( $id = '', $args = array() ) {
22
  $forms = array();
@@ -60,7 +65,7 @@ class EVF_Form_Handler {
60
  * Delete forms.
61
  *
62
  * @since 1.0.0
63
- * @param array $ids
64
  * @return boolean
65
  */
66
  public function delete( $ids = array() ) {
@@ -78,10 +83,6 @@ class EVF_Form_Handler {
78
  foreach ( $ids as $id ) {
79
  $form = wp_delete_post( $id, true );
80
 
81
- if ( class_exists( 'EVF_Entry_Handler' ) ) {
82
- // Delete entry if exists.
83
- }
84
-
85
  if ( ! $form ) {
86
  return false;
87
  }
@@ -94,12 +95,13 @@ class EVF_Form_Handler {
94
  * Create new form.
95
  *
96
  * @since 1.0.0
97
- * @param string $title
98
- * @param array $args
99
- * @param array $data
100
- * @return mixed
 
101
  */
102
- public static function create( $title = '', $template = 'blank', $args = array(), $data = array() ) {
103
  if ( empty( $title ) || ! current_user_can( 'manage_everest_forms' ) ) {
104
  return false;
105
  }
@@ -144,7 +146,7 @@ class EVF_Form_Handler {
144
  $form_content = json_decode( base64_decode( $template_data->settings ), true );
145
 
146
  if ( isset( $template_data->styles ) ) {
147
- $style_needed = true;
148
  $form_style[ $form_id ] = json_decode( base64_decode( $template_data->styles ), true );
149
  }
150
  }
@@ -188,9 +190,11 @@ class EVF_Form_Handler {
188
  * Updates form
189
  *
190
  * @since 1.0.0
191
- * @param string $form_id
192
- * @param array $data
193
- * @param array $args
 
 
194
  * @return mixed
195
  * @internal param string $title
196
  */
@@ -268,7 +272,9 @@ class EVF_Form_Handler {
268
  * Duplicate forms.
269
  *
270
  * @since 1.0.0
271
- * @param array $ids
 
 
272
  * @return boolean
273
  */
274
  public function duplicate( $ids = array() ) {
@@ -338,10 +344,10 @@ class EVF_Form_Handler {
338
  *
339
  * @since 1.1.0
340
  *
341
- * @param string $form_id
342
- * @param string $field
343
  *
344
- * @return bool
345
  */
346
  public function get_meta( $form_id, $field = '' ) {
347
  if ( empty( $form_id ) ) {
@@ -370,7 +376,7 @@ class EVF_Form_Handler {
370
  * Get the next available field ID and increment by one.
371
  *
372
  * @since 1.0.0
373
- * @param int $form_id
374
  * @return mixed int or false
375
  */
376
  public function field_unique_key( $form_id ) {
@@ -404,14 +410,15 @@ class EVF_Form_Handler {
404
  return $field_id;
405
  }
406
 
407
-
408
  /**
409
  * Get private meta information for a form field.
410
  *
411
  * @since 1.0.0
412
- * @param string $form_id
413
- * @param string $field_id
414
- * @return bool
 
 
415
  */
416
  public function get_field( $form_id, $field_id = '' ) {
417
 
@@ -434,8 +441,8 @@ class EVF_Form_Handler {
434
  *
435
  * @since 1.0.0
436
  *
437
- * @param string $form_id
438
- * @param string $field
439
  *
440
  * @return bool
441
  */
4
  *
5
  * Contains a bunch of helper methods as well.
6
  *
7
+ * @package EverestForms
8
+ * @since 1.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ /**
14
+ * Form Handler class.
15
  */
16
  class EVF_Form_Handler {
17
 
19
  * Fetches forms
20
  *
21
  * @since 1.0.0
22
+ * @param mixed $id Form ID.
23
+ * @param array $args Form Arguments.
24
+ * @return array|bool|null|WP_Post Form object.
25
  */
26
  public function get( $id = '', $args = array() ) {
27
  $forms = array();
65
  * Delete forms.
66
  *
67
  * @since 1.0.0
68
+ * @param array $ids Form IDs.
69
  * @return boolean
70
  */
71
  public function delete( $ids = array() ) {
83
  foreach ( $ids as $id ) {
84
  $form = wp_delete_post( $id, true );
85
 
 
 
 
 
86
  if ( ! $form ) {
87
  return false;
88
  }
95
  * Create new form.
96
  *
97
  * @since 1.0.0
98
+ * @param string $title Form title.
99
+ * @param string $template Form template.
100
+ * @param array $args Form Arguments.
101
+ * @param array $data Additional data.
102
+ * @return int|bool Form ID on successful creation else false.
103
  */
104
+ public function create( $title = '', $template = 'blank', $args = array(), $data = array() ) {
105
  if ( empty( $title ) || ! current_user_can( 'manage_everest_forms' ) ) {
106
  return false;
107
  }
146
  $form_content = json_decode( base64_decode( $template_data->settings ), true );
147
 
148
  if ( isset( $template_data->styles ) ) {
149
+ $style_needed = true;
150
  $form_style[ $form_id ] = json_decode( base64_decode( $template_data->styles ), true );
151
  }
152
  }
190
  * Updates form
191
  *
192
  * @since 1.0.0
193
+ *
194
+ * @param string|int $form_id Form ID.
195
+ * @param array $data Data retrieved from $_POST and processed.
196
+ * @param array $args Empty by default, may have custom data not intended to be saved.
197
+ *
198
  * @return mixed
199
  * @internal param string $title
200
  */
272
  * Duplicate forms.
273
  *
274
  * @since 1.0.0
275
+ *
276
+ * @param array $ids Form IDs to duplicate.
277
+ *
278
  * @return boolean
279
  */
280
  public function duplicate( $ids = array() ) {
344
  *
345
  * @since 1.1.0
346
  *
347
+ * @param int $form_id Form ID.
348
+ * @param string $field Field.
349
  *
350
+ * @return false|array
351
  */
352
  public function get_meta( $form_id, $field = '' ) {
353
  if ( empty( $form_id ) ) {
376
  * Get the next available field ID and increment by one.
377
  *
378
  * @since 1.0.0
379
+ * @param int $form_id Form ID.
380
  * @return mixed int or false
381
  */
382
  public function field_unique_key( $form_id ) {
410
  return $field_id;
411
  }
412
 
 
413
  /**
414
  * Get private meta information for a form field.
415
  *
416
  * @since 1.0.0
417
+ *
418
+ * @param int $form_id Form ID.
419
+ * @param string $field_id Field ID.
420
+ *
421
+ * @return array|bool
422
  */
423
  public function get_field( $form_id, $field_id = '' ) {
424
 
441
  *
442
  * @since 1.0.0
443
  *
444
+ * @param int $form_id Form ID.
445
+ * @param string $field Field.
446
  *
447
  * @return bool
448
  */
includes/class-evf-form-task.php CHANGED
@@ -61,12 +61,12 @@ class EVF_Form_Task {
61
  * @since 1.0.0
62
  */
63
  public function listen_task() {
64
- if ( ! empty( $_GET['everest_forms_return'] ) ) { // WPCS: CSRF ok.
65
- $this->entry_confirmation_redirect( '', $_GET['everest_forms_return'] ); // WPCS: sanitization ok, CSRF ok.
66
  }
67
 
68
- if ( ! empty( $_POST['everest_forms']['id'] ) ) { // WPCS: CSRF ok.
69
- $this->do_task( stripslashes_deep( $_POST['everest_forms'] ) ); // WPCS: sanitization ok, CSRF ok.
70
  }
71
  }
72
 
@@ -88,7 +88,7 @@ class EVF_Form_Task {
88
  $this->evf_notice_print = false;
89
 
90
  // Check nonce for form submission.
91
- if ( empty( $_POST['_wpnonce'] ) || ! wp_verify_nonce( wp_unslash( $_POST['_wpnonce'] ), 'everest-forms_process_submit' ) ) { // WPCS: input var ok, sanitization ok.
92
  $this->errors[ $form_id ]['header'] = esc_html__( 'We were unable to process your form, please try again.', 'everest-forms' );
93
  return $this->errors;
94
  }
@@ -109,7 +109,7 @@ class EVF_Form_Task {
109
  do_action( "everest_forms_process_before_{$form_id}", $entry, $this->form_data );
110
 
111
  $ajax_form_submission = isset( $this->form_data['settings']['ajax_form_submission'] ) ? $this->form_data['settings']['ajax_form_submission'] : 0;
112
- if ( 1 === $ajax_form_submission ) {
113
 
114
  // For the sake of validation we completely remove the validator option.
115
  update_option( 'evf_validation_error', '' );
@@ -160,7 +160,6 @@ class EVF_Form_Task {
160
  update_option( 'evf_validation_error', '' );
161
  }
162
  }
163
-
164
  // If validation issues occur, send the results accordingly.
165
  if ( $ajax_form_submission && count( $this->ajax_err ) ) {
166
  $response_data['error'] = $this->ajax_err;
@@ -186,14 +185,14 @@ class EVF_Form_Task {
186
 
187
  if ( ! empty( $site_key ) && ! empty( $secret_key ) && isset( $this->form_data['settings']['recaptcha_support'] ) && '1' === $this->form_data['settings']['recaptcha_support'] ) {
188
  if ( ( 'v2' === $recaptcha_type && ! empty( $_POST['g-recaptcha-response'] ) ) || ( 'v3' === $recaptcha_type && ! empty( $_POST['g-recaptcha-hidden'] ) ) ) {
189
- $response = 'v2' === $recaptcha_type ? evf_clean( wp_unslash( $_POST['g-recaptcha-response'] ) ) : evf_clean( wp_unslash( $_POST['g-recaptcha-hidden'] ) ); // PHPCS: input var ok.
190
  $raw_data = wp_safe_remote_get( 'https://www.google.com/recaptcha/api/siteverify?secret=' . $secret_key . '&response=' . $response );
191
 
192
  if ( ! is_wp_error( $raw_data ) ) {
193
  $data = json_decode( wp_remote_retrieve_body( $raw_data ) );
194
 
195
  // Check reCAPTCHA response.
196
- if ( empty( $data->success ) || ( isset( $data->hostname ) && evf_clean( wp_unslash( $_SERVER['SERVER_NAME'] ) ) !== $data->hostname ) || ( isset( $data->action, $data->score ) && ( 'everest_form' !== $data->action && 0.5 > floatval( $data->score ) ) ) ) {
197
  $this->errors[ $form_id ]['header'] = esc_html__( 'Incorrect reCAPTCHA, please try again.', 'everest-forms' );
198
  return $this->errors;
199
  }
@@ -283,7 +282,7 @@ class EVF_Form_Task {
283
  do_action( "everest_forms_process_complete_{$form_id}", $this->form_fields, $entry, $this->form_data, $entry_id );
284
  } catch ( Exception $e ) {
285
  evf_add_notice( $e->getMessage(), 'error' );
286
- if ( 1 === $ajax_form_submission ) {
287
  $this->errors[] = $e->getMessage();
288
  $response_data['message'] = $this->errors;
289
  $response_data['response'] = 'error';
@@ -292,9 +291,31 @@ class EVF_Form_Task {
292
  }
293
 
294
  $message = isset( $this->form_data['settings']['successful_form_submission_message'] ) ? $this->form_data['settings']['successful_form_submission_message'] : __( 'Thanks for contacting us! We will be in touch with you shortly.', 'everest-forms' );
295
- if ( 1 == $ajax_form_submission ) {
296
  $response_data['message'] = $message;
297
  $response_data['response'] = 'success';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
298
 
299
  // Add notice only if credit card is populated in form fields.
300
  if ( isset( $this->evf_notice_print ) && $this->evf_notice_print ) {
@@ -314,10 +335,12 @@ class EVF_Form_Task {
314
  * Process AJAX form submission.
315
  *
316
  * @since 1.6.0
 
 
317
  */
318
- public function ajax_form_submission( $entry ) {
319
  add_filter( 'wp_redirect', array( $this, 'ajax_process_redirect' ), 999 );
320
- $process = $this->do_task( stripslashes_deep( $_POST['everest_forms'] ) );
321
  return $process;
322
  }
323
 
@@ -355,7 +378,7 @@ class EVF_Form_Task {
355
  * @param int $form_id Form ID.
356
  */
357
  public function check_success_message( $status, $form_id ) {
358
- if ( isset( $this->form_data['id'] ) && $form_id === absint( $this->form_data['id'] ) ) {
359
  return true;
360
  }
361
  return false;
@@ -379,7 +402,7 @@ class EVF_Form_Task {
379
  }
380
 
381
  // Get lead and verify it is attached to the form we received with it.
382
- $entry = EVF()->entry->get( $output['entry_id'] );
383
 
384
  if ( $output['form_id'] !== $entry->form_id ) {
385
  return false;
@@ -407,7 +430,7 @@ class EVF_Form_Task {
407
  }
408
 
409
  // Get form.
410
- $this->form_data = EVF()->form->get(
411
  $form_id,
412
  array(
413
  'content_only' => true,
@@ -418,20 +441,36 @@ class EVF_Form_Task {
418
  }
419
 
420
  $settings = $this->form_data['settings'];
421
- if ( isset( $settings['redirect_to'] ) && '1' === $settings['redirect_to'] ) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
422
  ?>
423
  <script>
424
- var redirect = '<?php echo get_permalink( $settings['custom_page'] ); ?>';
425
  window.setTimeout( function () {
426
  window.location.href = redirect;
427
  })
428
  </script>
429
  <?php
430
- } elseif ( isset( $settings['redirect_to'] ) && '2' === $settings['redirect_to'] ) {
431
  ?>
432
  <script>
433
  window.setTimeout( function () {
434
- window.location.href = '<?php echo $settings['external_url']; ?>';
435
  })
436
  </script>
437
  <?php
@@ -439,7 +478,6 @@ class EVF_Form_Task {
439
 
440
  // Redirect if needed, to either a page or URL, after form processing.
441
  if ( ! empty( $this->form_data['settings']['confirmation_type'] ) && 'message' !== $this->form_data['settings']['confirmation_type'] ) {
442
-
443
  if ( 'redirect' === $this->form_data['settings']['confirmation_type'] ) {
444
  $url = apply_filters( 'everest_forms_process_smart_tags', $this->form_data['settings']['confirmation_redirect'], $this->form_data, $this->form_fields, $this->entry_id );
445
  }
@@ -461,7 +499,7 @@ class EVF_Form_Task {
461
 
462
  if ( ! empty( $url ) ) {
463
  $url = apply_filters( 'everest_forms_process_redirect_url', $url, $form_id, $this->form_fields );
464
- wp_redirect( esc_url_raw( $url ) );
465
  do_action( 'everest_forms_process_redirect', $form_id );
466
  do_action( "everest_forms_process_redirect_{$form_id}", $form_id );
467
  exit;
61
  * @since 1.0.0
62
  */
63
  public function listen_task() {
64
+ if ( ! empty( $_GET['everest_forms_return'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification
65
+ $this->entry_confirmation_redirect( '', wp_unslash( $_GET['everest_forms_return'] ) ); // phpcs:ignore WordPress.Security.NonceVerification, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
66
  }
67
 
68
+ if ( ! empty( $_POST['everest_forms']['id'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification
69
+ $this->do_task( stripslashes_deep( $_POST['everest_forms'] ) ); // phpcs:ignore WordPress.Security.NonceVerification, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
70
  }
71
  }
72
 
88
  $this->evf_notice_print = false;
89
 
90
  // Check nonce for form submission.
91
+ if ( empty( $_POST['_wpnonce'] ) || ! wp_verify_nonce( wp_unslash( $_POST['_wpnonce'] ), 'everest-forms_process_submit' ) ) { // phpcs:ignore WordPress.Security.NonceVerification, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
92
  $this->errors[ $form_id ]['header'] = esc_html__( 'We were unable to process your form, please try again.', 'everest-forms' );
93
  return $this->errors;
94
  }
109
  do_action( "everest_forms_process_before_{$form_id}", $entry, $this->form_data );
110
 
111
  $ajax_form_submission = isset( $this->form_data['settings']['ajax_form_submission'] ) ? $this->form_data['settings']['ajax_form_submission'] : 0;
112
+ if ( '1' === $ajax_form_submission ) {
113
 
114
  // For the sake of validation we completely remove the validator option.
115
  update_option( 'evf_validation_error', '' );
160
  update_option( 'evf_validation_error', '' );
161
  }
162
  }
 
163
  // If validation issues occur, send the results accordingly.
164
  if ( $ajax_form_submission && count( $this->ajax_err ) ) {
165
  $response_data['error'] = $this->ajax_err;
185
 
186
  if ( ! empty( $site_key ) && ! empty( $secret_key ) && isset( $this->form_data['settings']['recaptcha_support'] ) && '1' === $this->form_data['settings']['recaptcha_support'] ) {
187
  if ( ( 'v2' === $recaptcha_type && ! empty( $_POST['g-recaptcha-response'] ) ) || ( 'v3' === $recaptcha_type && ! empty( $_POST['g-recaptcha-hidden'] ) ) ) {
188
+ $response = 'v2' === $recaptcha_type ? evf_clean( wp_unslash( $_POST['g-recaptcha-response'] ) ) : evf_clean( wp_unslash( $_POST['g-recaptcha-hidden'] ) ); // phpcs:ignore WordPress.Security.NonceVerification, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
189
  $raw_data = wp_safe_remote_get( 'https://www.google.com/recaptcha/api/siteverify?secret=' . $secret_key . '&response=' . $response );
190
 
191
  if ( ! is_wp_error( $raw_data ) ) {
192
  $data = json_decode( wp_remote_retrieve_body( $raw_data ) );
193
 
194
  // Check reCAPTCHA response.
195
+ if ( empty( $data->success ) || ( isset( $data->hostname ) && evf_clean( wp_unslash( $_SERVER['SERVER_NAME'] ) ) !== $data->hostname ) || ( isset( $data->action, $data->score ) && ( 'everest_form' !== $data->action && 0.5 > floatval( $data->score ) ) ) ) { // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotValidated, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
196
  $this->errors[ $form_id ]['header'] = esc_html__( 'Incorrect reCAPTCHA, please try again.', 'everest-forms' );
197
  return $this->errors;
198
  }
282
  do_action( "everest_forms_process_complete_{$form_id}", $this->form_fields, $entry, $this->form_data, $entry_id );
283
  } catch ( Exception $e ) {
284
  evf_add_notice( $e->getMessage(), 'error' );
285
+ if ( '1' === $ajax_form_submission ) {
286
  $this->errors[] = $e->getMessage();
287
  $response_data['message'] = $this->errors;
288
  $response_data['response'] = 'error';
291
  }
292
 
293
  $message = isset( $this->form_data['settings']['successful_form_submission_message'] ) ? $this->form_data['settings']['successful_form_submission_message'] : __( 'Thanks for contacting us! We will be in touch with you shortly.', 'everest-forms' );
294
+ if ( '1' === $ajax_form_submission ) {
295
  $response_data['message'] = $message;
296
  $response_data['response'] = 'success';
297
+ $settings = $this->form_data['settings'];
298
+
299
+ // Backward Compatibility Check.
300
+ switch ( $settings['redirect_to'] ) {
301
+ case '0':
302
+ $settings['redirect_to'] = 'same';
303
+ break;
304
+
305
+ case '1':
306
+ $settings['redirect_to'] = 'custom_page';
307
+ break;
308
+
309
+ case '2':
310
+ $settings['redirect_to'] = 'external_url';
311
+ break;
312
+ }
313
+
314
+ if ( isset( $settings['redirect_to'] ) && 'external_url' === $settings['redirect_to'] ) {
315
+ $response_data['redirect_url'] = isset( $settings['external_url'] ) ? esc_url( $settings['external_url'] ) : 'undefined';
316
+ } elseif ( isset( $settings['redirect_to'] ) && 'custom_page' === $settings['redirect_to'] ) {
317
+ $response_data['redirect_url'] = isset( $settings['custom_page'] ) ? get_page_link( absint( $settings['custom_page'] ) ) : 'undefined';
318
+ }
319
 
320
  // Add notice only if credit card is populated in form fields.
321
  if ( isset( $this->evf_notice_print ) && $this->evf_notice_print ) {
335
  * Process AJAX form submission.
336
  *
337
  * @since 1.6.0
338
+ *
339
+ * @param mixed $posted_data Posted data.
340
  */
341
+ public function ajax_form_submission( $posted_data ) {
342
  add_filter( 'wp_redirect', array( $this, 'ajax_process_redirect' ), 999 );
343
+ $process = $this->do_task( stripslashes_deep( $posted_data ) );
344
  return $process;
345
  }
346
 
378
  * @param int $form_id Form ID.
379
  */
380
  public function check_success_message( $status, $form_id ) {
381
+ if ( isset( $this->form_data['id'] ) && absint( $this->form_data['id'] ) === $form_id ) {
382
  return true;
383
  }
384
  return false;
402
  }
403
 
404
  // Get lead and verify it is attached to the form we received with it.
405
+ $entry = evf()->entry->get( $output['entry_id'] );
406
 
407
  if ( $output['form_id'] !== $entry->form_id ) {
408
  return false;
430
  }
431
 
432
  // Get form.
433
+ $this->form_data = evf()->form->get(
434
  $form_id,
435
  array(
436
  'content_only' => true,
441
  }
442
 
443
  $settings = $this->form_data['settings'];
444
+
445
+ // Backward Compatibility Check.
446
+ switch ( $settings['redirect_to'] ) {
447
+ case '0':
448
+ $settings['redirect_to'] = 'same';
449
+ break;
450
+
451
+ case '1':
452
+ $settings['redirect_to'] = 'custom_page';
453
+ break;
454
+
455
+ case '2':
456
+ $settings['redirect_to'] = 'external_url';
457
+ break;
458
+ }
459
+
460
+ if ( isset( $settings['redirect_to'] ) && 'custom_page' === $settings['redirect_to'] ) {
461
  ?>
462
  <script>
463
+ var redirect = '<?php echo esc_url( get_page_link( $settings['custom_page'] ) ); ?>';
464
  window.setTimeout( function () {
465
  window.location.href = redirect;
466
  })
467
  </script>
468
  <?php
469
+ } elseif ( isset( $settings['redirect_to'] ) && 'external_url' === $settings['redirect_to'] ) {
470
  ?>
471
  <script>
472
  window.setTimeout( function () {
473
+ window.location.href = '<?php echo esc_url( $settings['external_url'] ); ?>';
474
  })
475
  </script>
476
  <?php
478
 
479
  // Redirect if needed, to either a page or URL, after form processing.
480
  if ( ! empty( $this->form_data['settings']['confirmation_type'] ) && 'message' !== $this->form_data['settings']['confirmation_type'] ) {
 
481
  if ( 'redirect' === $this->form_data['settings']['confirmation_type'] ) {
482
  $url = apply_filters( 'everest_forms_process_smart_tags', $this->form_data['settings']['confirmation_redirect'], $this->form_data, $this->form_fields, $this->entry_id );
483
  }
499
 
500
  if ( ! empty( $url ) ) {
501
  $url = apply_filters( 'everest_forms_process_redirect_url', $url, $form_id, $this->form_fields );
502
+ wp_safe_redirect( esc_url_raw( $url ) );
503
  do_action( 'everest_forms_process_redirect', $form_id );
504
  do_action( "everest_forms_process_redirect_{$form_id}", $form_id );
505
  exit;
includes/class-evf-frontend-scripts.php CHANGED
@@ -67,7 +67,7 @@ class EVF_Frontend_Scripts {
67
  /**
68
  * Return asset URL.
69
  *
70
- * @param string $path
71
  *
72
  * @return string
73
  */
@@ -79,13 +79,11 @@ class EVF_Frontend_Scripts {
79
  * Register a script for use.
80
  *
81
  * @uses wp_register_script()
82
- * @access private
83
- *
84
- * @param string $handle
85
- * @param string $path
86
- * @param string[] $deps
87
- * @param string $version
88
- * @param boolean $in_footer
89
  */
90
  private static function register_script( $handle, $path, $deps = array( 'jquery' ), $version = EVF_VERSION, $in_footer = true ) {
91
  self::$scripts[] = $handle;
@@ -96,16 +94,14 @@ class EVF_Frontend_Scripts {
96
  * Register and enqueue a script for use.
97
  *
98
  * @uses wp_enqueue_script()
99
- * @access private
100
- *
101
- * @param string $handle
102
- * @param string $path
103
- * @param string[] $deps
104
- * @param string $version
105
- * @param boolean $in_footer
106
  */
107
  private static function enqueue_script( $handle, $path = '', $deps = array( 'jquery' ), $version = EVF_VERSION, $in_footer = true ) {
108
- if ( ! in_array( $handle, self::$scripts ) && $path ) {
109
  self::register_script( $handle, $path, $deps, $version, $in_footer );
110
  }
111
  wp_enqueue_script( $handle );
@@ -115,14 +111,12 @@ class EVF_Frontend_Scripts {
115
  * Register a style for use.
116
  *
117
  * @uses wp_register_style()
118
- * @access private
119
- *
120
- * @param string $handle
121
- * @param string $path
122
- * @param string[] $deps
123
- * @param string $version
124
- * @param string $media
125
- * @param boolean $has_rtl
126
  */
127
  private static function register_style( $handle, $path, $deps = array(), $version = EVF_VERSION, $media = 'all', $has_rtl = false ) {
128
  self::$styles[] = $handle;
@@ -137,17 +131,15 @@ class EVF_Frontend_Scripts {
137
  * Register and enqueue a styles for use.
138
  *
139
  * @uses wp_enqueue_style()
140
- * @access private
141
- *
142
- * @param string $handle
143
- * @param string $path
144
- * @param string[] $deps
145
- * @param string $version
146
- * @param string $media
147
- * @param boolean $has_rtl
148
  */
149
  private static function enqueue_style( $handle, $path = '', $deps = array(), $version = EVF_VERSION, $media = 'all', $has_rtl = false ) {
150
- if ( ! in_array( $handle, self::$styles ) && $path ) {
151
  self::register_style( $handle, $path, $deps, $version, $media, $has_rtl );
152
  }
153
  wp_enqueue_style( $handle );
@@ -159,37 +151,37 @@ class EVF_Frontend_Scripts {
159
  private static function register_scripts() {
160
  $suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
161
  $register_scripts = array(
162
- 'inputmask' => array(
163
  'src' => self::get_asset_url( 'assets/js/inputmask/jquery.inputmask.bundle' . $suffix . '.js' ),
164
  'deps' => array( 'jquery' ),
165
  'version' => '4.0.0-beta.58',
166
  ),
167
- 'flatpickr' => array(
168
  'src' => self::get_asset_url( 'assets/js/flatpickr/flatpickr' . $suffix . '.js' ),
169
  'deps' => array( 'jquery' ),
170
  'version' => '4.5.1',
171
  ),
172
- 'mailcheck' => array(
173
  'src' => self::get_asset_url( 'assets/js/mailcheck/mailcheck' . $suffix . '.js' ),
174
  'deps' => array( 'jquery' ),
175
  'version' => '1.1.2',
176
  ),
177
- 'jquery-validate' => array(
178
  'src' => self::get_asset_url( 'assets/js/jquery-validate/jquery.validate' . $suffix . '.js' ),
179
  'deps' => array( 'jquery' ),
180
  'version' => '1.17.0',
181
  ),
182
- 'everest-forms' => array(
183
  'src' => self::get_asset_url( 'assets/js/frontend/everest-forms' . $suffix . '.js' ),
184
  'deps' => array( 'jquery', 'inputmask', 'jquery-validate' ),
185
  'version' => EVF_VERSION,
186
  ),
187
- 'everest-forms-text-limit' => array(
188
  'src' => self::get_asset_url( 'assets/js/frontend/text-limit' . $suffix . '.js' ),
189
  'deps' => array(),
190
  'version' => EVF_VERSION,
191
  ),
192
- 'everest-forms-ajax-submission' => array(
193
  'src' => self::get_asset_url( 'assets/js/frontend/ajax-submission' . $suffix . '.js' ),
194
  'deps' => array( 'jquery', 'inputmask', 'jquery-validate' ),
195
  'version' => EVF_VERSION,
@@ -240,7 +232,8 @@ class EVF_Frontend_Scripts {
240
  wp_enqueue_style( 'dashicons' );
241
 
242
  // CSS Styles.
243
- if ( $enqueue_styles = self::get_styles() ) {
 
244
  foreach ( $enqueue_styles as $handle => $args ) {
245
  if ( ! isset( $args['has_rtl'] ) ) {
246
  $args['has_rtl'] = false;
@@ -254,12 +247,16 @@ class EVF_Frontend_Scripts {
254
  /**
255
  * Localize a EVF script once.
256
  *
257
- * @access private
258
- *
259
- * @param string $handle
260
  */
261
  private static function localize_script( $handle ) {
262
- if ( ! in_array( $handle, self::$wp_localize_scripts ) && wp_script_is( $handle ) && ( $data = self::get_script_data( $handle ) ) ) {
 
 
 
 
 
 
263
  $name = str_replace( '-', '_', $handle ) . '_params';
264
  self::$wp_localize_scripts[] = $handle;
265
  wp_localize_script( $handle, $name, apply_filters( $name, $data ) );
@@ -269,17 +266,14 @@ class EVF_Frontend_Scripts {
269
  /**
270
  * Return data for script handles.
271
  *
272
- * @access private
273
- *
274
- * @param string $handle
275
- *
276
  * @return array|bool
277
  */
278
  private static function get_script_data( $handle ) {
279
  switch ( $handle ) {
280
  case 'everest-forms':
281
  $params = array(
282
- 'ajax_url' => EVF()->ajax_url(),
283
  'submit' => esc_html__( 'Submit', 'everest-forms' ),
284
  'disable_user_details' => get_option( 'everest_forms_disable_user_details' ),
285
  'everest_forms_data_save' => wp_create_nonce( 'everest_forms_data_save_nonce' ),
67
  /**
68
  * Return asset URL.
69
  *
70
+ * @param string $path Assets path.
71
  *
72
  * @return string
73
  */
79
  * Register a script for use.
80
  *
81
  * @uses wp_register_script()
82
+ * @param string $handle Name of the script. Should be unique.
83
+ * @param string $path Full URL of the script, or path of the script relative to the WordPress root directory.
84
+ * @param string[] $deps An array of registered script handles this script depends on.
85
+ * @param string $version String specifying script version number, if it has one, which is added to the URL as a query string for cache busting purposes. If version is set to false, a version number is automatically added equal to current installed WordPress version. If set to null, no version is added.
86
+ * @param boolean $in_footer Whether to enqueue the script before </body> instead of in the <head>. Default 'false'.
 
 
87
  */
88
  private static function register_script( $handle, $path, $deps = array( 'jquery' ), $version = EVF_VERSION, $in_footer = true ) {
89
  self::$scripts[] = $handle;
94
  * Register and enqueue a script for use.
95
  *
96
  * @uses wp_enqueue_script()
97
+ * @param string $handle Name of the script. Should be unique.
98
+ * @param string $path Full URL of the script, or path of the script relative to the WordPress root directory.
99
+ * @param string[] $deps An array of registered script handles this script depends on.
100
+ * @param string $version String specifying script version number, if it has one, which is added to the URL as a query string for cache busting purposes. If version is set to false, a version number is automatically added equal to current installed WordPress version. If set to null, no version is added.
101
+ * @param boolean $in_footer Whether to enqueue the script before </body> instead of in the <head>. Default 'false'.
 
 
102
  */
103
  private static function enqueue_script( $handle, $path = '', $deps = array( 'jquery' ), $version = EVF_VERSION, $in_footer = true ) {
104
+ if ( ! in_array( $handle, self::$scripts, true ) && $path ) {
105
  self::register_script( $handle, $path, $deps, $version, $in_footer );
106
  }
107
  wp_enqueue_script( $handle );
111
  * Register a style for use.
112
  *
113
  * @uses wp_register_style()
114
+ * @param string $handle Name of the stylesheet. Should be unique.
115
+ * @param string $path Full URL of the stylesheet, or path of the stylesheet relative to the WordPress root directory.
116
+ * @param string[] $deps An array of registered stylesheet handles this stylesheet depends on.
117
+ * @param string $version String specifying stylesheet version number, if it has one, which is added to the URL as a query string for cache busting purposes. If version is set to false, a version number is automatically added equal to current installed WordPress version. If set to null, no version is added.
118
+ * @param string $media The media for which this stylesheet has been defined. Accepts media types like 'all', 'print' and 'screen', or media queries like '(orientation: portrait)' and '(max-width: 640px)'.
119
+ * @param boolean $has_rtl If has RTL version to load too.
 
 
120
  */
121
  private static function register_style( $handle, $path, $deps = array(), $version = EVF_VERSION, $media = 'all', $has_rtl = false ) {
122
  self::$styles[] = $handle;
131
  * Register and enqueue a styles for use.
132
  *
133
  * @uses wp_enqueue_style()
134
+ * @param string $handle Name of the stylesheet. Should be unique.
135
+ * @param string $path Full URL of the stylesheet, or path of the stylesheet relative to the WordPress root directory.
136
+ * @param string[] $deps An array of registered stylesheet handles this stylesheet depends on.
137
+ * @param string $version String specifying stylesheet version number, if it has one, which is added to the URL as a query string for cache busting purposes. If version is set to false, a version number is automatically added equal to current installed WordPress version. If set to null, no version is added.
138
+ * @param string $media The media for which this stylesheet has been defined. Accepts media types like 'all', 'print' and 'screen', or media queries like '(orientation: portrait)' and '(max-width: 640px)'.
139
+ * @param boolean $has_rtl If has RTL version to load too.
 
 
140
  */
141
  private static function enqueue_style( $handle, $path = '', $deps = array(), $version = EVF_VERSION, $media = 'all', $has_rtl = false ) {
142
+ if ( ! in_array( $handle, self::$styles, true ) && $path ) {
143
  self::register_style( $handle, $path, $deps, $version, $media, $has_rtl );
144
  }
145
  wp_enqueue_style( $handle );
151
  private static function register_scripts() {
152
  $suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
153
  $register_scripts = array(
154
+ 'inputmask' => array(
155
  'src' => self::get_asset_url( 'assets/js/inputmask/jquery.inputmask.bundle' . $suffix . '.js' ),
156
  'deps' => array( 'jquery' ),
157
  'version' => '4.0.0-beta.58',
158
  ),
159
+ 'flatpickr' => array(
160
  'src' => self::get_asset_url( 'assets/js/flatpickr/flatpickr' . $suffix . '.js' ),
161
  'deps' => array( 'jquery' ),
162
  'version' => '4.5.1',
163
  ),
164
+ 'mailcheck' => array(
165
  'src' => self::get_asset_url( 'assets/js/mailcheck/mailcheck' . $suffix . '.js' ),
166
  'deps' => array( 'jquery' ),
167
  'version' => '1.1.2',
168
  ),
169
+ 'jquery-validate' => array(
170
  'src' => self::get_asset_url( 'assets/js/jquery-validate/jquery.validate' . $suffix . '.js' ),
171
  'deps' => array( 'jquery' ),
172
  'version' => '1.17.0',
173
  ),
174
+ 'everest-forms' => array(
175
  'src' => self::get_asset_url( 'assets/js/frontend/everest-forms' . $suffix . '.js' ),
176
  'deps' => array( 'jquery', 'inputmask', 'jquery-validate' ),
177
  'version' => EVF_VERSION,
178
  ),
179
+ 'everest-forms-text-limit' => array(
180
  'src' => self::get_asset_url( 'assets/js/frontend/text-limit' . $suffix . '.js' ),
181
  'deps' => array(),
182
  'version' => EVF_VERSION,
183
  ),
184
+ 'everest-forms-ajax-submission' => array(
185
  'src' => self::get_asset_url( 'assets/js/frontend/ajax-submission' . $suffix . '.js' ),
186
  'deps' => array( 'jquery', 'inputmask', 'jquery-validate' ),
187
  'version' => EVF_VERSION,
232
  wp_enqueue_style( 'dashicons' );
233
 
234
  // CSS Styles.
235
+ $enqueue_styles = self::get_styles();
236
+ if ( $enqueue_styles ) {
237
  foreach ( $enqueue_styles as $handle => $args ) {
238
  if ( ! isset( $args['has_rtl'] ) ) {
239
  $args['has_rtl'] = false;
247
  /**
248
  * Localize a EVF script once.
249
  *
250
+ * @param string $handle Script handle the data will be attached to.
 
 
251
  */
252
  private static function localize_script( $handle ) {
253
+ if ( ! in_array( $handle, self::$wp_localize_scripts, true ) && wp_script_is( $handle ) ) {
254
+ $data = self::get_script_data( $handle );
255
+
256
+ if ( ! $data ) {
257
+ return;
258
+ }
259
+
260
  $name = str_replace( '-', '_', $handle ) . '_params';
261
  self::$wp_localize_scripts[] = $handle;
262
  wp_localize_script( $handle, $name, apply_filters( $name, $data ) );
266
  /**
267
  * Return data for script handles.
268
  *
269
+ * @param string $handle Script handle the data will be attached to.
 
 
 
270
  * @return array|bool
271
  */
272
  private static function get_script_data( $handle ) {
273
  switch ( $handle ) {
274
  case 'everest-forms':
275
  $params = array(
276
+ 'ajax_url' => evf()->ajax_url(),
277
  'submit' => esc_html__( 'Submit', 'everest-forms' ),
278
  'disable_user_details' => get_option( 'everest_forms_disable_user_details' ),
279
  'everest_forms_data_save' => wp_create_nonce( 'everest_forms_data_save_nonce' ),
includes/class-evf-install.php CHANGED
@@ -65,7 +65,7 @@ class EVF_Install {
65
  ),
66
  '1.6.0' => array(
67
  'evf_update_160_db_version',
68
- )
69
  );
70
 
71
  /**
@@ -102,7 +102,7 @@ class EVF_Install {
102
  * This check is done on all requests and runs if the versions do not match.
103
  */
104
  public static function check_version() {
105
- if ( ! defined( 'IFRAME_REQUEST' ) && version_compare( get_option( 'everest_forms_version' ), EVF()->version, '<' ) ) {
106
  self::install();
107
  do_action( 'everest_forms_updated' );
108
  }
@@ -232,7 +232,7 @@ class EVF_Install {
232
  $activated_date = get_option( 'everest_forms_activated', '' );
233
 
234
  if ( empty( $activated_date ) ) {
235
- update_option( 'everest_forms_activated', current_time( 'timestamp' ) );
236
  }
237
  }
238
 
@@ -241,7 +241,7 @@ class EVF_Install {
241
  */
242
  private static function update_evf_version() {
243
  delete_option( 'everest_forms_version' );
244
- add_option( 'everest_forms_version', EVF()->version );
245
  }
246
 
247
  /**
@@ -286,7 +286,7 @@ class EVF_Install {
286
  */
287
  public static function update_db_version( $version = null ) {
288
  delete_option( 'everest_forms_db_version' );
289
- add_option( 'everest_forms_db_version', is_null( $version ) ? EVF()->version : $version );
290
  }
291
 
292
  /**
@@ -307,8 +307,10 @@ class EVF_Install {
307
  * Create cron jobs (clear them first).
308
  */
309
  private static function create_cron_jobs() {
 
310
  wp_clear_scheduled_hook( 'everest_forms_cleanup_sessions' );
311
- wp_schedule_event( time(), 'twicedaily', 'everest_forms_cleanup_sessions' );
 
312
  }
313
 
314
  /**
@@ -456,7 +458,7 @@ CREATE TABLE {$wpdb->prefix}evf_sessions (
456
  $tables = self::get_tables();
457
 
458
  foreach ( $tables as $table ) {
459
- $wpdb->query( "DROP TABLE IF EXISTS {$table}" ); // WPCS: unprepared SQL ok.
460
  }
461
  }
462
 
@@ -570,7 +572,7 @@ CREATE TABLE {$wpdb->prefix}evf_sessions (
570
  // Create a form.
571
  $form_id = wp_insert_post(
572
  array(
573
- 'post_title' => esc_html( 'Contact Form', 'everest-forms' ),
574
  'post_status' => 'publish',
575
  'post_type' => 'everest_form',
576
  'post_content' => '{}',
@@ -615,10 +617,10 @@ CREATE TABLE {$wpdb->prefix}evf_sessions (
615
 
616
  foreach ( $files as $file ) {
617
  if ( wp_mkdir_p( $file['base'] ) && ! file_exists( trailingslashit( $file['base'] ) . $file['file'] ) ) {
618
- $file_handle = @fopen( trailingslashit( $file['base'] ) . $file['file'], 'w' );
619
  if ( $file_handle ) {
620
- fwrite( $file_handle, $file['content'] );
621
- fclose( $file_handle );
622
  }
623
  }
624
  }
@@ -646,7 +648,7 @@ CREATE TABLE {$wpdb->prefix}evf_sessions (
646
  * @return array
647
  */
648
  public static function plugin_row_meta( $plugin_meta, $plugin_file ) {
649
- if ( EVF_PLUGIN_BASENAME == $plugin_file ) {
650
  $new_plugin_meta = array(
651
  'docs' => '<a href="' . esc_url( apply_filters( 'everest_forms_docs_url', 'https://docs.wpeverest.com/documentation/plugins/everest-forms/' ) ) . '" aria-label="' . esc_attr__( 'View Everest Forms documentation', 'everest-forms' ) . '">' . esc_html__( 'Docs', 'everest-forms' ) . '</a>',
652
  'support' => '<a href="' . esc_url( apply_filters( 'everest_forms_support_url', 'https://wordpress.org/support/plugin/everest-forms/' ) ) . '" aria-label="' . esc_attr__( 'Visit free customer support', 'everest-forms' ) . '">' . esc_html__( 'Free support', 'everest-forms' ) . '</a>',
65
  ),
66
  '1.6.0' => array(
67
  'evf_update_160_db_version',
68
+ ),
69
  );
70
 
71
  /**
102
  * This check is done on all requests and runs if the versions do not match.
103
  */
104
  public static function check_version() {
105
+ if ( ! defined( 'IFRAME_REQUEST' ) && version_compare( get_option( 'everest_forms_version' ), evf()->version, '<' ) ) {
106
  self::install();
107
  do_action( 'everest_forms_updated' );
108
  }
232
  $activated_date = get_option( 'everest_forms_activated', '' );
233
 
234
  if ( empty( $activated_date ) ) {
235
+ update_option( 'everest_forms_activated', time() );
236
  }
237
  }
238
 
241
  */
242
  private static function update_evf_version() {
243
  delete_option( 'everest_forms_version' );
244
+ add_option( 'everest_forms_version', evf()->version );
245
  }
246
 
247
  /**
286
  */
287
  public static function update_db_version( $version = null ) {
288
  delete_option( 'everest_forms_db_version' );
289
+ add_option( 'everest_forms_db_version', is_null( $version ) ? evf()->version : $version );
290
  }
291
 
292
  /**
307
  * Create cron jobs (clear them first).
308
  */
309
  private static function create_cron_jobs() {
310
+ wp_clear_scheduled_hook( 'everest_forms_cleanup_logs' );
311
  wp_clear_scheduled_hook( 'everest_forms_cleanup_sessions' );
312
+ wp_schedule_event( time() + ( 3 * HOUR_IN_SECONDS ), 'daily', 'everest_forms_cleanup_logs' );
313
+ wp_schedule_event( time() + ( 6 * HOUR_IN_SECONDS ), 'twicedaily', 'everest_forms_cleanup_sessions' );
314
  }
315
 
316
  /**
458
  $tables = self::get_tables();
459
 
460
  foreach ( $tables as $table ) {
461
+ $wpdb->query( "DROP TABLE IF EXISTS {$table}" ); // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared
462
  }
463
  }
464
 
572
  // Create a form.
573
  $form_id = wp_insert_post(
574
  array(
575
+ 'post_title' => esc_html__( 'Contact Form', 'everest-forms' ),
576
  'post_status' => 'publish',
577
  'post_type' => 'everest_form',
578
  'post_content' => '{}',
617
 
618
  foreach ( $files as $file ) {
619
  if ( wp_mkdir_p( $file['base'] ) && ! file_exists( trailingslashit( $file['base'] ) . $file['file'] ) ) {
620
+ $file_handle = @fopen( trailingslashit( $file['base'] ) . $file['file'], 'w' ); // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged, WordPress.WP.AlternativeFunctions.file_system_read_fopen
621
  if ( $file_handle ) {
622
+ fwrite( $file_handle, $file['content'] ); // phpcs:ignore WordPress.WP.AlternativeFunctions.file_system_read_fwrite
623
+ fclose( $file_handle ); // phpcs:ignore WordPress.WP.AlternativeFunctions.file_system_read_fclose
624
  }
625
  }
626
  }
648
  * @return array
649
  */
650
  public static function plugin_row_meta( $plugin_meta, $plugin_file ) {
651
+ if ( EVF_PLUGIN_BASENAME === $plugin_file ) {
652
  $new_plugin_meta = array(
653
  'docs' => '<a href="' . esc_url( apply_filters( 'everest_forms_docs_url', 'https://docs.wpeverest.com/documentation/plugins/everest-forms/' ) ) . '" aria-label="' . esc_attr__( 'View Everest Forms documentation', 'everest-forms' ) . '">' . esc_html__( 'Docs', 'everest-forms' ) . '</a>',
654
  'support' => '<a href="' . esc_url( apply_filters( 'everest_forms_support_url', 'https://wordpress.org/support/plugin/everest-forms/' ) ) . '" aria-label="' . esc_attr__( 'Visit free customer support', 'everest-forms' ) . '">' . esc_html__( 'Free support', 'everest-forms' ) . '</a>',
includes/class-evf-logger.php CHANGED
@@ -1,16 +1,16 @@
1
  <?php
2
- if ( ! defined( 'ABSPATH' ) ) {
3
- exit; // Exit if accessed directly
4
- }
5
-
6
  /**
7
  * Provides logging capabilities for debugging purposes.
8
  *
9
- * @class EVF_Logger
10
- * @version 1.0.0
11
- * @package EverestForms/Classes
12
- * @category Class
13
- * @author WPEverest
 
 
 
 
14
  */
15
  class EVF_Logger implements EVF_Logger_Interface {
16
 
@@ -31,12 +31,8 @@ class EVF_Logger implements EVF_Logger_Interface {
31
  /**
32
  * Constructor for the logger.
33
  *
34
- * @param array $handlers Optional. Array of log handlers. If $handlers is not provided,
35
- * the filter 'everest_forms_register_log_handlers' will be used to define the handlers.
36
- * If $handlers is provided, the filter will not be applied and the handlers will be
37
- * used directly.
38
- * @param string $threshold Optional. Define an explicit threshold. May be configured
39
- * via EVF_LOG_THRESHOLD. By default, all logs will be processed.
40
  */
41
  public function __construct( $handlers = null, $threshold = null ) {
42
  if ( null === $handlers ) {
@@ -48,7 +44,7 @@ class EVF_Logger implements EVF_Logger_Interface {
48
  if ( ! empty( $handlers ) && is_array( $handlers ) ) {
49
  foreach ( $handlers as $handler ) {
50
  $implements = class_implements( $handler );
51
- if ( is_object( $handler ) && is_array( $implements ) && in_array( 'EVF_Log_Handler_Interface', $implements ) ) {
52
  $register_handlers[] = $handler;
53
  } else {
54
  evf_doing_it_wrong(
@@ -80,7 +76,7 @@ class EVF_Logger implements EVF_Logger_Interface {
80
  /**
81
  * Determine whether to handle or ignore log.
82
  *
83
- * @param string $level emergency|alert|critical|error|warning|notice|info|debug
84
  * @return bool True if the log should be handled.
85
  */
86
  protected function should_handle( $level ) {
@@ -96,15 +92,22 @@ class EVF_Logger implements EVF_Logger_Interface {
96
  * This is not the preferred method for adding log messages. Please use log() or any one of
97
  * the level methods (debug(), info(), etc.). This method may be deprecated in the future.
98
  *
99
- * @param string $handle
100
- * @param string $message
101
- * @param string $level
102
  *
103
  * @return bool
104
  */
105
  public function add( $handle, $message, $level = EVF_Log_Levels::NOTICE ) {
106
  $message = apply_filters( 'everest_forms_logger_add_message', $message, $handle );
107
- $this->log( $level, $message, array( 'source' => $handle, '_legacy' => true ) );
 
 
 
 
 
 
 
108
  evf_do_deprecated_action( 'everest_forms_log_add', array( $handle, $message ), '1.2', 'This action has been deprecated with no alternative.' );
109
  return true;
110
  }
@@ -131,11 +134,10 @@ class EVF_Logger implements EVF_Logger_Interface {
131
  }
132
 
133
  if ( $this->should_handle( $level ) ) {
134
- $timestamp = current_time( 'timestamp' );
135
- $message = apply_filters( 'everest_forms_logger_log_message', $message, $level, $context );
136
 
137
  foreach ( $this->handlers as $handler ) {
138
- $handler->handle( $timestamp, $level, $message, $context );
139
  }
140
  }
141
  }
@@ -147,8 +149,8 @@ class EVF_Logger implements EVF_Logger_Interface {
147
  *
148
  * @see EVF_Logger::log
149
  *
150
- * @param string $message
151
- * @param array $context
152
  */
153
  public function emergency( $message, $context = array() ) {
154
  $this->log( EVF_Log_Levels::EMERGENCY, $message, $context );
@@ -162,8 +164,8 @@ class EVF_Logger implements EVF_Logger_Interface {
162
  *
163
  * @see EVF_Logger::log
164
  *
165
- * @param string $message
166
- * @param array $context
167
  */
168
  public function alert( $message, $context = array() ) {
169
  $this->log( EVF_Log_Levels::ALERT, $message, $context );
@@ -177,8 +179,8 @@ class EVF_Logger implements EVF_Logger_Interface {
177
  *
178
  * @see EVF_Logger::log
179
  *
180
- * @param string $message
181
- * @param array $context
182
  */
183
  public function critical( $message, $context = array() ) {
184
  $this->log( EVF_Log_Levels::CRITICAL, $message, $context );
@@ -192,8 +194,8 @@ class EVF_Logger implements EVF_Logger_Interface {
192
  *
193
  * @see EVF_Logger::log
194
  *
195
- * @param string $message
196
- * @param array $context
197
  */
198
  public function error( $message, $context = array() ) {
199
  $this->log( EVF_Log_Levels::ERROR, $message, $context );
@@ -209,8 +211,8 @@ class EVF_Logger implements EVF_Logger_Interface {
209
  *
210
  * @see EVF_Logger::log
211
  *
212
- * @param string $message
213
- * @param array $context
214
  */
215
  public function warning( $message, $context = array() ) {
216
  $this->log( EVF_Log_Levels::WARNING, $message, $context );
@@ -223,8 +225,8 @@ class EVF_Logger implements EVF_Logger_Interface {
223
  *
224
  * @see EVF_Logger::log
225
  *
226
- * @param string $message
227
- * @param array $context
228
  */
229
  public function notice( $message, $context = array() ) {
230
  $this->log( EVF_Log_Levels::NOTICE, $message, $context );
@@ -238,8 +240,8 @@ class EVF_Logger implements EVF_Logger_Interface {
238
  *
239
  * @see EVF_Logger::log
240
  *
241
- * @param string $message
242
- * @param array $context
243
  */
244
  public function info( $message, $context = array() ) {
245
  $this->log( EVF_Log_Levels::INFO, $message, $context );
@@ -252,8 +254,8 @@ class EVF_Logger implements EVF_Logger_Interface {
252
  *
253
  * @see EVF_Logger::log
254
  *
255
- * @param string $message
256
- * @param array $context
257
  */
258
  public function debug( $message, $context = array() ) {
259
  $this->log( EVF_Log_Levels::DEBUG, $message, $context );
@@ -262,14 +264,34 @@ class EVF_Logger implements EVF_Logger_Interface {
262
  /**
263
  * Clear entries from chosen file.
264
  *
265
- * @deprecated 1.2.0
266
- *
267
- * @param string $handle
268
  * @return bool
269
  */
270
- public function clear( $handle ) {
271
- evf_deprecated_function( 'EVF_Logger::clear', '1.2', 'EVF_Log_Handler_File::clear' );
272
- $handler = new EVF_Log_Handler_File();
273
- return $handler->clear( $handle );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
274
  }
275
  }
1
  <?php
 
 
 
 
2
  /**
3
  * Provides logging capabilities for debugging purposes.
4
  *
5
+ * @class EVF_Logger
6
+ * @version 1.0.0
7
+ * @package EverestForms/Classes
8
+ */
9
+
10
+ defined( 'ABSPATH' ) || exit;
11
+
12
+ /**
13
+ * EVF_Logger class
14
  */
15
  class EVF_Logger implements EVF_Logger_Interface {
16
 
31
  /**
32
  * Constructor for the logger.
33
  *
34
+ * @param array $handlers Optional. Array of log handlers. If $handlers is not provided, the filter 'everest_forms_register_log_handlers' will be used to define the handlers. If $handlers is provided, the filter will not be applied and the handlers will be used directly.
35
+ * @param string $threshold Optional. Define an explicit threshold. May be configured via EVF_LOG_THRESHOLD. By default, all logs will be processed.
 
 
 
 
36
  */
37
  public function __construct( $handlers = null, $threshold = null ) {
38
  if ( null === $handlers ) {
44
  if ( ! empty( $handlers ) && is_array( $handlers ) ) {
45
  foreach ( $handlers as $handler ) {
46
  $implements = class_implements( $handler );
47
+ if ( is_object( $handler ) && is_array( $implements ) && in_array( 'EVF_Log_Handler_Interface', $implements, true ) ) {
48
  $register_handlers[] = $handler;
49
  } else {
50
  evf_doing_it_wrong(
76
  /**
77
  * Determine whether to handle or ignore log.
78
  *
79
+ * @param string $level emergency|alert|critical|error|warning|notice|info|debug.
80
  * @return bool True if the log should be handled.
81
  */
82
  protected function should_handle( $level ) {
92
  * This is not the preferred method for adding log messages. Please use log() or any one of
93
  * the level methods (debug(), info(), etc.). This method may be deprecated in the future.
94
  *
95
+ * @param string $handle File handle.
96
+ * @param string $message Message to log.
97
+ * @param string $level Logging level.
98
  *
99
  * @return bool
100
  */
101
  public function add( $handle, $message, $level = EVF_Log_Levels::NOTICE ) {
102
  $message = apply_filters( 'everest_forms_logger_add_message', $message, $handle );
103
+ $this->log(
104
+ $level,
105
+ $message,
106
+ array(
107
+ 'source' => $handle,
108
+ '_legacy' => true,
109
+ )
110
+ );
111
  evf_do_deprecated_action( 'everest_forms_log_add', array( $handle, $message ), '1.2', 'This action has been deprecated with no alternative.' );
112
  return true;
113
  }
134
  }
135
 
136
  if ( $this->should_handle( $level ) ) {
137
+ $message = apply_filters( 'everest_forms_logger_log_message', $message, $level, $context );
 
138
 
139
  foreach ( $this->handlers as $handler ) {
140
+ $handler->handle( time(), $level, $message, $context );
141
  }
142
  }
143
  }
149
  *
150
  * @see EVF_Logger::log
151
  *
152
+ * @param string $message Message to log.
153
+ * @param array $context Log context.
154
  */
155
  public function emergency( $message, $context = array() ) {
156
  $this->log( EVF_Log_Levels::EMERGENCY, $message, $context );
164
  *
165
  * @see EVF_Logger::log
166
  *
167
+ * @param string $message Message to log.
168
+ * @param array $context Log context.
169
  */
170
  public function alert( $message, $context = array() ) {
171
  $this->log( EVF_Log_Levels::ALERT, $message, $context );
179
  *
180
  * @see EVF_Logger::log
181
  *
182
+ * @param string $message Message to log.
183
+ * @param array $context Log context.
184
  */
185
  public function critical( $message, $context = array() ) {
186
  $this->log( EVF_Log_Levels::CRITICAL, $message, $context );
194
  *
195
  * @see EVF_Logger::log
196
  *
197
+ * @param string $message Message to log.
198
+ * @param array $context Log context.
199
  */
200
  public function error( $message, $context = array() ) {
201
  $this->log( EVF_Log_Levels::ERROR, $message, $context );
211
  *
212
  * @see EVF_Logger::log
213
  *
214
+ * @param string $message Message to log.
215
+ * @param array $context Log context.
216
  */
217
  public function warning( $message, $context = array() ) {
218
  $this->log( EVF_Log_Levels::WARNING, $message, $context );
225
  *
226
  * @see EVF_Logger::log
227
  *
228
+ * @param string $message Message to log.
229
+ * @param array $context Log context.
230
  */
231
  public function notice( $message, $context = array() ) {
232
  $this->log( EVF_Log_Levels::NOTICE, $message, $context );
240
  *
241
  * @see EVF_Logger::log
242
  *
243
+ * @param string $message Message to log.
244
+ * @param array $context Log context.
245
  */
246
  public function info( $message, $context = array() ) {
247
  $this->log( EVF_Log_Levels::INFO, $message, $context );
254
  *
255
  * @see EVF_Logger::log
256
  *
257
+ * @param string $message Message to log.
258
+ * @param array $context Log context.
259
  */
260
  public function debug( $message, $context = array() ) {
261
  $this->log( EVF_Log_Levels::DEBUG, $message, $context );
264
  /**
265
  * Clear entries from chosen file.
266
  *
267
+ * @param string $source Source/handle to clear.
 
 
268
  * @return bool
269
  */
270
+ public function clear( $source = '' ) {
271
+ if ( ! $source ) {
272
+ return false;
273
+ }
274
+ foreach ( $this->handlers as $handler ) {
275
+ if ( is_callable( array( $handler, 'clear' ) ) ) {
276
+ $handler->clear( $source );
277
+ }
278
+ }
279
+ return true;
280
+ }
281
+
282
+ /**
283
+ * Clear all logs older than a defined number of days. Defaults to 30 days.
284
+ *
285
+ * @since 1.6.2
286
+ */
287
+ public function clear_expired_logs() {
288
+ $days = absint( apply_filters( 'everest_forms_logger_days_to_retain_logs', 30 ) );
289
+ $timestamp = strtotime( "-{$days} days" );
290
+
291
+ foreach ( $this->handlers as $handler ) {
292
+ if ( is_callable( array( $handler, 'delete_logs_before_timestamp' ) ) ) {
293
+ $handler->delete_logs_before_timestamp( $timestamp );
294
+ }
295
+ }
296
  }
297
  }
includes/class-evf-post-types.php CHANGED
@@ -35,8 +35,10 @@ class EVF_Post_Types {
35
 
36
  do_action( 'everest_forms_register_post_type' );
37
 
38
- register_post_type( 'everest_form',
39
- apply_filters( 'everest_forms_register_post_type_product',
 
 
40
  array(
41
  'labels' => array(
42
  'name' => __( 'Forms', 'everest-forms' ),
35
 
36
  do_action( 'everest_forms_register_post_type' );
37
 
38
+ register_post_type(
39
+ 'everest_form',
40
+ apply_filters(
41
+ 'everest_forms_register_post_type_product',
42
  array(
43
  'labels' => array(
44
  'name' => __( 'Forms', 'everest-forms' ),
includes/class-evf-smart-tags.php CHANGED
@@ -5,11 +5,10 @@
5
  * @package EverestForms\Classes
6
  */
7
 
8
- if ( ! defined( 'ABSPATH' ) ) {
9
- exit;
10
- }
11
  /**
12
- * EVF_Smart_Tags Class.
13
  */
14
  class EVF_Smart_Tags {
15
 
@@ -23,30 +22,27 @@ class EVF_Smart_Tags {
23
  /**
24
  * Other smart tags.
25
  *
26
- * @param string $return
27
- *
28
  * @return string|array
29
  */
30
- public function other_smart_tags( $return = 'array' ) {
31
-
32
- $smart_tags = array(
33
- 'admin_email' => esc_html__( 'Site Admin Email', 'everest-forms' ),
34
- 'site_name' => esc_html__( 'Site Name', 'everest-forms' ),
35
- 'site_url' => esc_html__( 'Site URL', 'everest-forms' ),
36
- 'page_title' => esc_html__( 'Page Title', 'everest-forms' ),
37
- 'page_url' => esc_html__( 'Page URL', 'everest-forms' ),
38
- 'page_id' => esc_html__( 'Page ID', 'everest-forms' ),
39
- 'form_name' => esc_html__( 'Form Name', 'everest-forms' ),
40
- 'user_ip_address' => esc_html__( 'User IP Address', 'everest-forms' ),
41
- 'user_id' => esc_html__( 'User ID', 'everest-forms' ),
42
- 'user_name' => esc_html__( 'User Name', 'everest-forms' ),
43
- 'user_email' => esc_html__( 'User Email', 'everest-forms' ),
44
- 'referrer_url' => esc_html__( 'Referrer URL', 'everest-forms' ),
45
-
 
46
  );
47
 
48
- $smart_tags = apply_filters( 'everest_forms_smart_tags', $smart_tags );
49
-
50
  return $smart_tags;
51
  }
52
 
@@ -62,86 +58,95 @@ class EVF_Smart_Tags {
62
  */
63
  public function process( $content, $form_data, $fields = '', $entry_id = '' ) {
64
  // Field smart tags (settings, etc).
65
- preg_match_all( "/\{field_id=\"(.+?)\"\}/", $content, $ids );
66
 
67
- // We can only process field smart tags if we have $fields
68
  if ( ! empty( $ids[1] ) && ! empty( $fields ) ) {
69
 
70
  foreach ( $ids[1] as $key => $field_id ) {
71
- if( $field_id !== 'fullname' && $field_id !== 'email' && $field_id !== 'subject' && $field_id !== 'message' ) {
72
  $mixed_field_id = explode( '_', $field_id );
73
- $value = ! empty( $fields[ $mixed_field_id[1] ]['value'] ) ? evf_sanitize_textarea_field( $fields[ $mixed_field_id[1] ]['value'] ) : '';
74
  } else {
75
  $value = ! empty( $fields[ $field_id ]['value'] ) ? evf_sanitize_textarea_field( $fields[ $field_id ]['value'] ) : '';
76
  }
77
 
78
- if( ! is_array($value) ){
79
  $content = str_replace( '{field_id="' . $field_id . '"}', $value, $content );
80
  } else {
81
- $value = implode(" ",$value);
 
 
 
 
 
 
 
 
 
82
  $content = str_replace( '{field_id="' . $field_id . '"}', $value, $content );
83
  }
84
  }
85
  }
86
 
87
- // Other Smart tags
88
- preg_match_all( "/\{(.+?)\}/", $content, $other_tags );
89
 
90
  if ( ! empty( $other_tags[1] ) ) {
91
 
92
  foreach ( $other_tags[1] as $key => $other_tag ) {
93
 
94
- switch( $other_tag ){
95
- case 'admin_email' :
96
  $admin_email = sanitize_email( get_option( 'admin_email' ) );
97
- $content = str_replace( '{' . $other_tag . '}', $admin_email, $content );
98
- break;
99
 
100
- case 'site_name' :
101
- $site_name = get_option('blogname');
102
- $content = str_replace( '{' . $other_tag . '}', $site_name, $content );
103
- break;
104
 
105
- case 'site_url' :
106
- $site_url = get_option('siteurl');
107
- $content = str_replace( '{' . $other_tag . '}', $site_url, $content );
108
- break;
109
 
110
- case 'page_title' :
111
  $page_title = get_the_ID() ? get_the_title( get_the_ID() ) : '';
112
- $content = str_replace( '{' . $other_tag . '}', $page_title, $content );
113
- break;
114
 
115
- case 'page_url' :
116
  $page_url = get_the_ID() ? get_permalink( get_the_ID() ) : '';
117
- $content = str_replace( '{' . $other_tag . '}', $page_url, $content );
118
- break;
119
 
120
- case 'page_id' :
121
  $page_id = get_the_ID() ? get_the_ID() : '';
122
  $content = str_replace( '{' . $other_tag . '}', $page_id, $content );
123
- break;
124
 
125
- case 'form_name' :
126
  if ( isset( $form_data['settings']['form_title'] ) && ! empty( $form_data['settings']['form_title'] ) ) {
127
  $form_name = $form_data['settings']['form_title'];
128
  } else {
129
  $form_name = '';
130
  }
131
  $content = str_replace( '{' . $other_tag . '}', $form_name, $content );
132
- break;
133
 
134
- case 'user_ip_address' :
135
  $user_ip_add = evf_get_ip_address();
136
  $content = str_replace( '{' . $other_tag . '}', $user_ip_add, $content );
137
- break;
138
 
139
- case 'user_id' :
140
  $user_id = is_user_logged_in() ? get_current_user_id() : '';
141
  $content = str_replace( '{' . $other_tag . '}', $user_id, $content );
142
- break;
143
 
144
- case 'user_email' :
145
  if ( is_user_logged_in() ) {
146
  $user = wp_get_current_user();
147
  $email = sanitize_email( $user->user_email );
@@ -149,9 +154,9 @@ class EVF_Smart_Tags {
149
  $email = '';
150
  }
151
  $content = str_replace( '{' . $other_tag . '}', $email, $content );
152
- break;
153
 
154
- case 'user_name' :
155
  if ( is_user_logged_in() ) {
156
  $user = wp_get_current_user();
157
  $name = sanitize_text_field( $user->user_login );
@@ -159,12 +164,12 @@ class EVF_Smart_Tags {
159
  $name = '';
160
  }
161
  $content = str_replace( '{' . $other_tag . '}', $name, $content );
162
- break;
163
 
164
- case 'referrer_url' :
165
- $referer = ! empty( $_SERVER['HTTP_REFERER'] ) ? $_SERVER['HTTP_REFERER'] : '';
166
  $content = str_replace( '{' . $other_tag . '}', sanitize_text_field( $referer ), $content );
167
- break;
168
 
169
  }
170
  }
5
  * @package EverestForms\Classes
6
  */
7
 
8
+ defined( 'ABSPATH' ) || exit;
9
+
 
10
  /**
11
+ * Smart Tag Class.
12
  */
13
  class EVF_Smart_Tags {
14
 
22
  /**
23
  * Other smart tags.
24
  *
 
 
25
  * @return string|array
26
  */
27
+ public function other_smart_tags() {
28
+ $smart_tags = apply_filters(
29
+ 'everest_forms_smart_tags',
30
+ array(
31
+ 'admin_email' => esc_html__( 'Site Admin Email', 'everest-forms' ),
32
+ 'site_name' => esc_html__( 'Site Name', 'everest-forms' ),
33
+ 'site_url' => esc_html__( 'Site URL', 'everest-forms' ),
34
+ 'page_title' => esc_html__( 'Page Title', 'everest-forms' ),
35
+ 'page_url' => esc_html__( 'Page URL', 'everest-forms' ),
36
+ 'page_id' => esc_html__( 'Page ID', 'everest-forms' ),
37
+ 'form_name' => esc_html__( 'Form Name', 'everest-forms' ),
38
+ 'user_ip_address' => esc_html__( 'User IP Address', 'everest-forms' ),
39
+ 'user_id' => esc_html__( 'User ID', 'everest-forms' ),
40
+ 'user_name' => esc_html__( 'User Name', 'everest-forms' ),
41
+ 'user_email' => esc_html__( 'User Email', 'everest-forms' ),
42
+ 'referrer_url' => esc_html__( 'Referrer URL', 'everest-forms' ),
43
+ )
44
  );
45
 
 
 
46
  return $smart_tags;
47
  }
48
 
58
  */
59
  public function process( $content, $form_data, $fields = '', $entry_id = '' ) {
60
  // Field smart tags (settings, etc).
61
+ preg_match_all( '/\{field_id="(.+?)"\}/', $content, $ids );
62
 
63
+ // We can only process field smart tags if we have $fields.
64
  if ( ! empty( $ids[1] ) && ! empty( $fields ) ) {
65
 
66
  foreach ( $ids[1] as $key => $field_id ) {
67
+ if ( 'fullname' !== $field_id && 'email' !== $field_id && 'subject' !== $field_id && 'message' !== $field_id ) {
68
  $mixed_field_id = explode( '_', $field_id );
69
+ $value = ! empty( $fields[ $mixed_field_id[1] ]['value'] ) ? evf_sanitize_textarea_field( $fields[ $mixed_field_id[1] ]['value'] ) : '';
70
  } else {
71
  $value = ! empty( $fields[ $field_id ]['value'] ) ? evf_sanitize_textarea_field( $fields[ $field_id ]['value'] ) : '';
72
  }
73
 
74
+ if ( ! is_array( $value ) ) {
75
  $content = str_replace( '{field_id="' . $field_id . '"}', $value, $content );
76
  } else {
77
+ if ( isset( $value['type'], $value['label'] ) ) {
78
+ if ( in_array( $value['type'], array( 'radio', 'payment-multiple' ), true ) ) {
79
+ $value = $value['label'];
80
+ } elseif ( in_array( $value['type'], array( 'checkbox', 'payment-checkbox' ), true ) ) {
81
+ $value = implode( ', ', $value['label'] );
82
+ }
83
+ } elseif ( isset( $value['number_of_rating'], $value['value'] ) ) {
84
+ $value = (string) $value['value'] . '/' . (string) $value['number_of_rating'];
85
+ }
86
+
87
  $content = str_replace( '{field_id="' . $field_id . '"}', $value, $content );
88
  }
89
  }
90
  }
91
 
92
+ // Other Smart tags.
93
+ preg_match_all( '/\{(.+?)\}/', $content, $other_tags );
94
 
95
  if ( ! empty( $other_tags[1] ) ) {
96
 
97
  foreach ( $other_tags[1] as $key => $other_tag ) {
98
 
99
+ switch ( $other_tag ) {
100
+ case 'admin_email':
101
  $admin_email = sanitize_email( get_option( 'admin_email' ) );
102
+ $content = str_replace( '{' . $other_tag . '}', $admin_email, $content );
103
+ break;
104
 
105
+ case 'site_name':
106
+ $site_name = get_option( 'blogname' );
107
+ $content = str_replace( '{' . $other_tag . '}', $site_name, $content );
108
+ break;
109
 
110
+ case 'site_url':
111
+ $site_url = get_option( 'siteurl' );
112
+ $content = str_replace( '{' . $other_tag . '}', $site_url, $content );
113
+ break;
114
 
115
+ case 'page_title':
116
  $page_title = get_the_ID() ? get_the_title( get_the_ID() ) : '';
117
+ $content = str_replace( '{' . $other_tag . '}', $page_title, $content );
118
+ break;
119
 
120
+ case 'page_url':
121
  $page_url = get_the_ID() ? get_permalink( get_the_ID() ) : '';
122
+ $content = str_replace( '{' . $other_tag . '}', $page_url, $content );
123
+ break;
124
 
125
+ case 'page_id':
126
  $page_id = get_the_ID() ? get_the_ID() : '';
127
  $content = str_replace( '{' . $other_tag . '}', $page_id, $content );
128
+ break;
129
 
130
+ case 'form_name':
131
  if ( isset( $form_data['settings']['form_title'] ) && ! empty( $form_data['settings']['form_title'] ) ) {
132
  $form_name = $form_data['settings']['form_title'];
133
  } else {
134
  $form_name = '';
135
  }
136
  $content = str_replace( '{' . $other_tag . '}', $form_name, $content );
137
+ break;
138
 
139
+ case 'user_ip_address':
140
  $user_ip_add = evf_get_ip_address();
141
  $content = str_replace( '{' . $other_tag . '}', $user_ip_add, $content );
142
+ break;
143
 
144
+ case 'user_id':
145
  $user_id = is_user_logged_in() ? get_current_user_id() : '';
146
  $content = str_replace( '{' . $other_tag . '}', $user_id, $content );
147
+ break;
148
 
149
+ case 'user_email':
150
  if ( is_user_logged_in() ) {
151
  $user = wp_get_current_user();
152
  $email = sanitize_email( $user->user_email );
154
  $email = '';
155
  }
156
  $content = str_replace( '{' . $other_tag . '}', $email, $content );
157
+ break;
158
 
159
+ case 'user_name':
160
  if ( is_user_logged_in() ) {
161
  $user = wp_get_current_user();
162
  $name = sanitize_text_field( $user->user_login );
164
  $name = '';
165
  }
166
  $content = str_replace( '{' . $other_tag . '}', $name, $content );
167
+ break;
168
 
169
+ case 'referrer_url':
170
+ $referer = ! empty( $_SERVER['HTTP_REFERER'] ) ? $_SERVER['HTTP_REFERER'] : ''; // @codingStandardsIgnoreLine
171
  $content = str_replace( '{' . $other_tag . '}', sanitize_text_field( $referer ), $content );
172
+ break;
173
 
174
  }
175
  }
includes/class-evf-template-loader.php CHANGED
@@ -31,9 +31,9 @@ class EVF_Template_Loader {
31
  * Hook in methods.
32
  */
33
  public static function init() {
34
- self::$form_id = isset( $_GET['form_id'] ) ? absint( $_GET['form_id'] ) : 0; // WPCS: CSRF ok.
35
 
36
- if ( ! is_admin() && isset( $_GET['evf_preview'] ) ) { // WPCS: CSRF ok.
37
  add_action( 'pre_get_posts', array( __CLASS__, 'pre_get_posts' ) );
38
  add_filter( 'edit_post_link', array( __CLASS__, 'edit_form_link' ) );
39
  add_filter( 'template_include', array( __CLASS__, 'template_include' ) );
@@ -62,7 +62,7 @@ class EVF_Template_Loader {
62
  */
63
  public static function edit_form_link( $link ) {
64
  if ( 0 < self::$form_id ) {
65
- return '<a href="' . esc_url( admin_url( 'admin.php?page=evf-builder&tab=fields&form_id=' . self::$form_id ) ) . '" class="post-edit-link">' . esc_html( 'Edit Form', 'everest-forms' ) . '</a>';
66
  }
67
 
68
  return $link;
@@ -110,7 +110,7 @@ class EVF_Template_Loader {
110
  $template = locate_template( $search_files );
111
 
112
  if ( ! $template || EVF_TEMPLATE_DEBUG_MODE ) {
113
- $template = EVF()->plugin_path() . '/templates/' . $default_file;
114
  }
115
  }
116
 
@@ -143,7 +143,7 @@ class EVF_Template_Loader {
143
  }
144
 
145
  $search_files[] = $default_file;
146
- $search_files[] = EVF()->template_path() . $default_file;
147
 
148
  return array_unique( $search_files );
149
  }
@@ -177,7 +177,7 @@ class EVF_Template_Loader {
177
  * @return string
178
  */
179
  public static function form_preview_title_filter( $title ) {
180
- $form = EVF()->form->get(
181
  self::$form_id,
182
  array(
183
  'content_only' => true,
31
  * Hook in methods.
32
  */
33
  public static function init() {
34
+ self::$form_id = isset( $_GET['form_id'] ) ? absint( $_GET['form_id'] ) : 0; // phpcs:ignore WordPress.Security.NonceVerification
35
 
36
+ if ( ! is_admin() && isset( $_GET['evf_preview'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification
37
  add_action( 'pre_get_posts', array( __CLASS__, 'pre_get_posts' ) );
38
  add_filter( 'edit_post_link', array( __CLASS__, 'edit_form_link' ) );
39
  add_filter( 'template_include', array( __CLASS__, 'template_include' ) );
62
  */
63
  public static function edit_form_link( $link ) {
64
  if ( 0 < self::$form_id ) {
65
+ return '<a href="' . esc_url( admin_url( 'admin.php?page=evf-builder&tab=fields&form_id=' . self::$form_id ) ) . '" class="post-edit-link">' . esc_html__( 'Edit Form', 'everest-forms' ) . '</a>';
66
  }
67
 
68
  return $link;
110
  $template = locate_template( $search_files );
111
 
112
  if ( ! $template || EVF_TEMPLATE_DEBUG_MODE ) {
113
+ $template = evf()->plugin_path() . '/templates/' . $default_file;
114
  }
115
  }
116
 
143
  }
144
 
145
  $search_files[] = $default_file;
146
+ $search_files[] = evf()->template_path() . $default_file;
147
 
148
  return array_unique( $search_files );
149
  }
177
  * @return string
178
  */
179
  public static function form_preview_title_filter( $title ) {
180
+ $form = evf()->form->get(
181
  self::$form_id,
182
  array(
183
  'content_only' => true,
includes/class-evf-validation.php CHANGED
@@ -6,9 +6,7 @@
6
  * @package EverestForms/Classes
7
  */
8
 
9
- if ( ! defined( 'ABSPATH' ) ) {
10
- exit;
11
- }
12
 
13
  /**
14
  * EVF_Validation Class.
6
  * @package EverestForms/Classes
7
  */
8
 
9
+ defined( 'ABSPATH' ) || exit;
 
 
10
 
11
  /**
12
  * EVF_Validation Class.
includes/evf-conditional-functions.php CHANGED
@@ -41,7 +41,7 @@ function evf_is_json( $string ) {
41
  * @return bool True if the field exists in the form.
42
  */
43
  function evf_is_field_exists( $form_id, $field ) {
44
- $form_obj = EVF()->form->get( $form_id );
45
  $form_data = ! empty( $form_obj->post_content ) ? evf_decode( $form_obj->post_content ) : '';
46
 
47
  if ( ! empty( $form_data['form_fields'] ) ) {
41
  * @return bool True if the field exists in the form.
42
  */
43
  function evf_is_field_exists( $form_id, $field ) {
44
+ $form_obj = evf()->form->get( $form_id );
45
  $form_data = ! empty( $form_obj->post_content ) ? evf_decode( $form_obj->post_content ) : '';
46
 
47
  if ( ! empty( $form_data['form_fields'] ) ) {
includes/evf-core-functions.php CHANGED
@@ -199,7 +199,7 @@ function evf_locate_template( $template_name, $template_path = '', $default_path
199
  * @param string $attachments Attachments. (default: "").
200
  */
201
  function evf_mail( $to, $subject, $message, $headers = "Content-Type: text/html\r\n", $attachments = '' ) {
202
- $mailer = EVF()->mailer();
203
 
204
  $mailer->send( $to, $subject, $message, $headers, $attachments );
205
  }
@@ -239,7 +239,7 @@ function evf_print_js() {
239
  * @since 1.0.0
240
  * @param string $js JavaScript code.
241
  */
242
- echo apply_filters( 'everest_forms_queued_js', $js ); // WPCS: XSS ok.
243
 
244
  unset( $evf_queued_js );
245
  }
@@ -287,7 +287,7 @@ function evf_get_log_file_path( $handle ) {
287
  */
288
  function evf_get_csv_file_name( $handle ) {
289
  if ( function_exists( 'wp_hash' ) ) {
290
- $date_suffix = date( 'Y-m-d', time() );
291
  $hash_suffix = wp_hash( $handle );
292
  return sanitize_file_name( implode( '-', array( 'evf-entry-export', $handle, $date_suffix, $hash_suffix ) ) . '.csv' );
293
  } else {
@@ -486,8 +486,8 @@ function evf_back_link( $label, $url ) {
486
  *
487
  * @since 1.0.0
488
  *
489
- * @param string $tip Help tip text
490
- * @param bool $allow_html Allow sanitized HTML if true or escape
491
  * @return string
492
  */
493
  function evf_help_tip( $tip, $allow_html = false ) {
@@ -642,8 +642,8 @@ add_filter( 'everest_forms_register_log_handlers', 'evf_register_default_log_han
642
  * Based on wp_list_pluck, this calls a method instead of returning a property.
643
  *
644
  * @since 1.0.0
645
- * @param array $list List of objects or arrays
646
- * @param int|string $callback_or_field Callback method from the object to place instead of the entire object
647
  * @param int|string $index_key Optional. Field from the object to use as keys for the new array.
648
  * Default null.
649
  * @return array Array of values.
@@ -696,7 +696,7 @@ function evf_switch_to_site_locale() {
696
  add_filter( 'plugin_locale', 'get_locale' );
697
 
698
  // Init EVF locale.
699
- EVF()->load_plugin_textdomain();
700
  }
701
  }
702
 
@@ -713,7 +713,7 @@ function evf_restore_locale() {
713
  remove_filter( 'plugin_locale', 'get_locale' );
714
 
715
  // Init EVF locale.
716
- EVF()->load_plugin_textdomain();
717
  }
718
  }
719
 
@@ -721,12 +721,12 @@ function evf_restore_locale() {
721
  * Get an item of post data if set, otherwise return a default value.
722
  *
723
  * @since 1.0.0
724
- * @param string $key
725
- * @param string $default
726
  * @return mixed value sanitized by evf_clean
727
  */
728
  function evf_get_post_data_by_key( $key, $default = '' ) {
729
- return evf_clean( evf_get_var( $_POST[ $key ], $default ) );
730
  }
731
 
732
  /**
@@ -784,14 +784,14 @@ function evf_delete_expired_transients() {
784
  AND a.option_name NOT LIKE %s
785
  AND b.option_name = CONCAT( '_transient_timeout_', SUBSTRING( a.option_name, 12 ) )
786
  AND b.option_value < %d";
787
- $rows = $wpdb->query( $wpdb->prepare( $sql, $wpdb->esc_like( '_transient_' ) . '%', $wpdb->esc_like( '_transient_timeout_' ) . '%', time() ) ); // WPCS: unprepared SQL ok.
788
 
789
  $sql = "DELETE a, b FROM $wpdb->options a, $wpdb->options b
790
  WHERE a.option_name LIKE %s
791
  AND a.option_name NOT LIKE %s
792
  AND b.option_name = CONCAT( '_site_transient_timeout_', SUBSTRING( a.option_name, 17 ) )
793
  AND b.option_value < %d";
794
- $rows2 = $wpdb->query( $wpdb->prepare( $sql, $wpdb->esc_like( '_site_transient_' ) . '%', $wpdb->esc_like( '_site_transient_timeout_' ) . '%', time() ) ); // WPCS: unprepared SQL ok.
795
 
796
  return absint( $rows + $rows2 );
797
  }
@@ -869,20 +869,19 @@ function evf_selected( $value, $options ) {
869
  * Non-posting elements such as section divider, page break, and HTML are
870
  * automatically excluded. Optionally a white list can be provided.
871
  *
872
- * @since 1.0.0
873
  *
874
- * @param mixed $form
875
- * @param array $whitelist
876
  *
877
  * @return mixed boolean or array
878
  */
879
  function evf_get_form_fields( $form = false, $whitelist = array() ) {
880
-
881
- // Accept form (post) object or form ID
882
  if ( is_object( $form ) ) {
883
  $form = json_decode( $form->post_content );
884
  } elseif ( is_numeric( $form ) ) {
885
- $form = EVF()->form->get(
886
  $form,
887
  array(
888
  'content_only' => true,
@@ -894,7 +893,7 @@ function evf_get_form_fields( $form = false, $whitelist = array() ) {
894
  return false;
895
  }
896
 
897
- // White list of field types to allow
898
  $allowed_form_fields = array(
899
  'first-name',
900
  'last-name',
@@ -935,9 +934,15 @@ function evf_get_form_fields( $form = false, $whitelist = array() ) {
935
  }
936
 
937
  /**
938
- * @param $string
 
 
939
  *
940
- * @return string
 
 
 
 
941
  */
942
  function evf_sanitize_textarea_field( $string ) {
943
  if ( empty( $string ) || ! is_string( $string ) ) {
@@ -957,11 +962,11 @@ function evf_sanitize_textarea_field( $string ) {
957
  * Formats, sanitizes, and returns/echos HTML element ID, classes, attributes,
958
  * and data attributes.
959
  *
960
- * @param string $id
961
- * @param array $class
962
- * @param array $datas
963
- * @param array $atts
964
- * @param bool $echo
965
  *
966
  * @return string
967
  */
@@ -991,7 +996,7 @@ function evf_html_attributes( $id = '', $class = array(), $datas = array(), $att
991
 
992
  if ( ! empty( $atts ) ) {
993
  foreach ( $atts as $att => $val ) {
994
- if ( '0' == $val || ! empty( $val ) ) {
995
  $parts[] = sanitize_html_class( $att ) . '="' . esc_attr( $val ) . '"';
996
  }
997
  }
@@ -1000,16 +1005,16 @@ function evf_html_attributes( $id = '', $class = array(), $datas = array(), $att
1000
  $output = implode( ' ', $parts );
1001
 
1002
  if ( $echo ) {
1003
- echo trim( $output ); // phpcs:ignore
1004
  } else {
1005
  return trim( $output );
1006
  }
1007
  }
1008
 
1009
  /**
1010
- * Sanitizes string of CSS classes.
1011
  *
1012
- * @param array|string $classes
1013
  * @param bool $convert True will convert strings to array and vice versa.
1014
  *
1015
  * @return string|array
@@ -1039,7 +1044,8 @@ function evf_sanitize_classes( $classes, $convert = false ) {
1039
  *
1040
  * @since 1.0.0
1041
  *
1042
- * @param string $data
 
1043
  * @return array|bool
1044
  */
1045
  function evf_decode( $data ) {
@@ -1053,9 +1059,9 @@ function evf_decode( $data ) {
1053
  /**
1054
  * Performs json_encode and wp_slash.
1055
  *
1056
- * @since 1.0.0
1057
  *
1058
- * @param mixed $data
1059
  *
1060
  * @return string
1061
  */
@@ -1068,8 +1074,10 @@ function evf_encode( $data = false ) {
1068
  }
1069
 
1070
  /**
1071
- * @param $min
1072
- * @param $max
 
 
1073
  *
1074
  * @return mixed
1075
  */
@@ -1079,30 +1087,32 @@ function evf_crypto_rand_secure( $min, $max ) {
1079
  return $min;
1080
  } // not so random...
1081
  $log = ceil( log( $range, 2 ) );
1082
- $bytes = (int) ( $log / 8 ) + 1; // length in bytes
1083
- $bits = (int) $log + 1; // length in bits
1084
- $filter = (int) ( 1 << $bits ) - 1; // set all lower bits to 1
1085
  do {
1086
  $rnd = hexdec( bin2hex( openssl_random_pseudo_bytes( $bytes ) ) );
1087
- $rnd = $rnd & $filter; // discard irrelevant bits
1088
  } while ( $rnd > $range );
1089
 
1090
  return $min + $rnd;
1091
  }
1092
 
1093
  /**
1094
- * @param int $length
 
 
1095
  *
1096
  * @return string
1097
  */
1098
  function evf_get_random_string( $length = 10 ) {
1099
- $string = '';
1100
- $codeAlphabet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
1101
- $codeAlphabet .= 'abcdefghijklmnopqrstuvwxyz';
1102
- $codeAlphabet .= '0123456789';
1103
- $max = strlen( $codeAlphabet ); // edited
1104
  for ( $i = 0; $i < $length; $i ++ ) {
1105
- $string .= $codeAlphabet[ evf_crypto_rand_secure( 0, $max - 1 ) ];
1106
  }
1107
 
1108
  return $string;
@@ -1129,7 +1139,7 @@ function evf_get_all_forms( $skip_disabled_entries = false ) {
1129
 
1130
  if ( ! empty( $form_ids ) ) {
1131
  foreach ( $form_ids as $form_id ) {
1132
- $form = EVF()->form->get( $form_id );
1133
  $entries = evf_get_entries_ids( $form_id );
1134
  $form_data = ! empty( $form->post_content ) ? evf_decode( $form->post_content ) : '';
1135
 
@@ -1147,11 +1157,11 @@ function evf_get_all_forms( $skip_disabled_entries = false ) {
1147
  /**
1148
  * Get random meta-key for field option.
1149
  *
1150
- * @param array $field Field data array
1151
  * @return string
1152
  */
1153
  function evf_get_meta_key_field_option( $field ) {
1154
- $random_number = rand( pow( 10, 3 ), pow( 10, 4 ) - 1 );
1155
  return strtolower( str_replace( array( ' ', '/_' ), array( '_', '' ), $field['label'] ) ) . '_' . $random_number;
1156
  }
1157
 
@@ -1180,7 +1190,7 @@ function evf_get_ip_address() {
1180
  * @return array
1181
  */
1182
  function evf_get_browser() {
1183
- $u_agent = $_SERVER['HTTP_USER_AGENT'];
1184
  $bname = 'Unknown';
1185
  $platform = 'Unknown';
1186
  $version = '';
@@ -1199,7 +1209,7 @@ function evf_get_browser() {
1199
  $bname = 'Internet Explorer';
1200
  $ub = 'MSIE';
1201
  } elseif ( preg_match( '/Trident/i', $u_agent ) ) {
1202
- // this condition is for IE11
1203
  $bname = 'Internet Explorer';
1204
  $ub = 'rv';
1205
  } elseif ( preg_match( '/Firefox/i', $u_agent ) ) {
@@ -1220,18 +1230,17 @@ function evf_get_browser() {
1220
  }
1221
 
1222
  // Finally get the correct version number.
1223
- // Added "|:"
1224
  $known = array( 'Version', $ub, 'other' );
1225
- $pattern = '#(?<browser>' . join( '|', $known ) .
1226
- ')[/|: ]+(?<version>[0-9.|a-zA-Z.]*)#';
1227
- if ( ! preg_match_all( $pattern, $u_agent, $matches ) ) {
1228
  // We have no matching number just continue.
1229
  }
1230
 
1231
  // See how many we have.
1232
  $i = count( $matches['browser'] );
1233
 
1234
- if ( $i != 1 ) {
1235
  // we will have two since we are not using 'other' argument yet.
1236
  // see if version is before or after the name.
1237
  if ( strripos( $u_agent, 'Version' ) < strripos( $u_agent, $ub ) ) {
@@ -1244,7 +1253,7 @@ function evf_get_browser() {
1244
  }
1245
 
1246
  // Check if we have a number.
1247
- if ( $version == null || $version == '' ) {
1248
  $version = '';
1249
  }
1250
 
@@ -1277,11 +1286,11 @@ function evf_get_day_period_date( $period, $timestamp = '', $format = 'Y-m-d H:i
1277
 
1278
  switch ( $period ) {
1279
  case 'start_of_day':
1280
- $date = date( $format, strtotime( 'today', $timestamp ) );
1281
  break;
1282
 
1283
  case 'end_of_day':
1284
- $date = date( $format, strtotime( 'tomorrow', $timestamp ) - 1 );
1285
  break;
1286
 
1287
  }
@@ -1304,7 +1313,7 @@ function evf_get_form_data_by_meta_key( $form_id, $meta_key ) {
1304
 
1305
  if ( ! empty( $form_fields ) ) {
1306
  foreach ( $form_fields as $field ) {
1307
- if ( isset( $field['meta-key'] ) && $meta_key == $field['meta-key'] ) {
1308
  return $field['label'];
1309
  }
1310
  }
@@ -1328,7 +1337,7 @@ function evf_get_field_type_by_meta_key( $form_id, $meta_key ) {
1328
 
1329
  if ( ! empty( $form_fields ) ) {
1330
  foreach ( $form_fields as $field ) {
1331
- if ( isset( $field['meta-key'] ) && $meta_key == $field['meta-key'] ) {
1332
  return $field['type'];
1333
  }
1334
  }
@@ -1344,7 +1353,7 @@ function evf_get_field_type_by_meta_key( $form_id, $meta_key ) {
1344
  */
1345
  function evf_get_all_email_fields_by_form_id( $form_id ) {
1346
  $user_emails = array();
1347
- $form_obj = EVF()->form->get( $form_id );
1348
  $form_data = ! empty( $form_obj->post_content ) ? evf_decode( $form_obj->post_content ) : '';
1349
 
1350
  if ( ! empty( $form_data['form_fields'] ) ) {
@@ -1366,7 +1375,7 @@ function evf_get_all_email_fields_by_form_id( $form_id ) {
1366
  */
1367
  function evf_get_all_form_fields_by_form_id( $form_id ) {
1368
  $data = array();
1369
- $form_obj = EVF()->form->get( $form_id );
1370
  $form_data = ! empty( $form_obj->post_content ) ? evf_decode( $form_obj->post_content ) : '';
1371
 
1372
  if ( ! empty( $form_data['form_fields'] ) ) {
@@ -1410,12 +1419,11 @@ function evf_post_content_has_shortcode( $tag = '' ) {
1410
  * @since 1.2.0
1411
  * @link http://stackoverflow.com/a/22500394
1412
  *
1413
- * @param string $size
1414
  *
1415
  * @return int
1416
  */
1417
  function evf_size_to_bytes( $size ) {
1418
-
1419
  if ( is_numeric( $size ) ) {
1420
  return $size;
1421
  }
@@ -1423,6 +1431,7 @@ function evf_size_to_bytes( $size ) {
1423
  $suffix = substr( $size, - 1 );
1424
  $value = substr( $size, 0, - 1 );
1425
 
 
1426
  switch ( strtoupper( $suffix ) ) {
1427
  case 'P':
1428
  $value *= 1024;
@@ -1436,6 +1445,7 @@ function evf_size_to_bytes( $size ) {
1436
  $value *= 1024;
1437
  break;
1438
  }
 
1439
 
1440
  return $value;
1441
  }
@@ -1445,12 +1455,11 @@ function evf_size_to_bytes( $size ) {
1445
  *
1446
  * @since 1.2.0
1447
  *
1448
- * @param int $bytes
1449
  *
1450
  * @return string
1451
  */
1452
  function evf_size_to_megabytes( $bytes ) {
1453
-
1454
  if ( $bytes < 1048676 ) {
1455
  return number_format( $bytes / 1024, 1 ) . ' KB';
1456
  } else {
@@ -1464,7 +1473,7 @@ function evf_size_to_megabytes( $bytes ) {
1464
  * @since 1.2.0
1465
  * @link http://stackoverflow.com/a/22500394
1466
  *
1467
- * @param bool $bytes
1468
  * @return mixed
1469
  */
1470
  function evf_max_upload( $bytes = false ) {
@@ -1522,8 +1531,10 @@ function evf_get_license_plan() {
1522
  /**
1523
  * Decode special characters, both alpha- (<) and numeric-based (').
1524
  *
1525
- * @since 1.2.0
1526
- * @param string $string
 
 
1527
  * @return string
1528
  */
1529
  function evf_decode_string( $string ) {
@@ -1964,3 +1975,17 @@ function evf_string_translation( $form_id, $field_id, $variable ) {
1964
 
1965
  return $variable;
1966
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
199
  * @param string $attachments Attachments. (default: "").
200
  */
201
  function evf_mail( $to, $subject, $message, $headers = "Content-Type: text/html\r\n", $attachments = '' ) {
202
+ $mailer = evf()->mailer();
203
 
204
  $mailer->send( $to, $subject, $message, $headers, $attachments );
205
  }
239
  * @since 1.0.0
240
  * @param string $js JavaScript code.
241
  */
242
+ echo apply_filters( 'everest_forms_queued_js', $js ); // phpcs:ignore WordPress.Security.NonceVerification, WordPress.Security.EscapeOutput.OutputNotEscaped
243
 
244
  unset( $evf_queued_js );
245
  }
287
  */
288
  function evf_get_csv_file_name( $handle ) {
289
  if ( function_exists( 'wp_hash' ) ) {
290
+ $date_suffix = date( 'Y-m-d', time() ); // phpcs:ignore WordPress.DateTime.RestrictedFunctions.date_date
291
  $hash_suffix = wp_hash( $handle );
292
  return sanitize_file_name( implode( '-', array( 'evf-entry-export', $handle, $date_suffix, $hash_suffix ) ) . '.csv' );
293
  } else {
486
  *
487
  * @since 1.0.0
488
  *
489
+ * @param string $tip Help tip text.
490
+ * @param bool $allow_html Allow sanitized HTML if true or escape.
491
  * @return string
492
  */
493
  function evf_help_tip( $tip, $allow_html = false ) {
642
  * Based on wp_list_pluck, this calls a method instead of returning a property.
643
  *
644
  * @since 1.0.0
645
+ * @param array $list List of objects or arrays.
646
+ * @param int|string $callback_or_field Callback method from the object to place instead of the entire object.
647
  * @param int|string $index_key Optional. Field from the object to use as keys for the new array.
648
  * Default null.
649
  * @return array Array of values.
696
  add_filter( 'plugin_locale', 'get_locale' );
697
 
698
  // Init EVF locale.
699
+ evf()->load_plugin_textdomain();
700
  }
701
  }
702
 
713
  remove_filter( 'plugin_locale', 'get_locale' );
714
 
715
  // Init EVF locale.
716
+ evf()->load_plugin_textdomain();
717
  }
718
  }
719
 
721
  * Get an item of post data if set, otherwise return a default value.
722
  *
723
  * @since 1.0.0
724
+ * @param string $key Key.
725
+ * @param string $default Default.
726
  * @return mixed value sanitized by evf_clean
727
  */
728
  function evf_get_post_data_by_key( $key, $default = '' ) {
729
+ return evf_clean( evf_get_var( $_POST[ $key ], $default ) ); // @codingStandardsIgnoreLine
730
  }
731
 
732
  /**
784
  AND a.option_name NOT LIKE %s
785
  AND b.option_name = CONCAT( '_transient_timeout_', SUBSTRING( a.option_name, 12 ) )
786
  AND b.option_value < %d";
787
+ $rows = $wpdb->query( $wpdb->prepare( $sql, $wpdb->esc_like( '_transient_' ) . '%', $wpdb->esc_like( '_transient_timeout_' ) . '%', time() ) ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared
788
 
789
  $sql = "DELETE a, b FROM $wpdb->options a, $wpdb->options b
790
  WHERE a.option_name LIKE %s
791
  AND a.option_name NOT LIKE %s
792
  AND b.option_name = CONCAT( '_site_transient_timeout_', SUBSTRING( a.option_name, 17 ) )
793
  AND b.option_value < %d";
794
+ $rows2 = $wpdb->query( $wpdb->prepare( $sql, $wpdb->esc_like( '_site_transient_' ) . '%', $wpdb->esc_like( '_site_transient_timeout_' ) . '%', time() ) ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared
795
 
796
  return absint( $rows + $rows2 );
797
  }
869
  * Non-posting elements such as section divider, page break, and HTML are
870
  * automatically excluded. Optionally a white list can be provided.
871
  *
872
+ * @since 1.0.0
873
  *
874
+ * @param mixed $form Form data.
875
+ * @param array $whitelist Whitelist args.
876
  *
877
  * @return mixed boolean or array
878
  */
879
  function evf_get_form_fields( $form = false, $whitelist = array() ) {
880
+ // Accept form (post) object or form ID.
 
881
  if ( is_object( $form ) ) {
882
  $form = json_decode( $form->post_content );
883
  } elseif ( is_numeric( $form ) ) {
884
+ $form = evf()->form->get(
885
  $form,
886
  array(
887
  'content_only' => true,
893
  return false;
894
  }
895
 
896
+ // White list of field types to allow.
897
  $allowed_form_fields = array(
898
  'first-name',
899
  'last-name',
934
  }
935
 
936
  /**
937
+ * Sanitize a string, that can be a multiline.
938
+ * If WP core `sanitize_textarea_field()` exists (after 4.7.0) - use it.
939
+ * Otherwise - split onto separate lines, sanitize each one, merge again.
940
  *
941
+ * @since 1.4.1
942
+ *
943
+ * @param string $string Raw string to sanitize.
944
+ *
945
+ * @return string If empty var is passed, or not a string - return unmodified. Otherwise - sanitize.
946
  */
947
  function evf_sanitize_textarea_field( $string ) {
948
  if ( empty( $string ) || ! is_string( $string ) ) {
962
  * Formats, sanitizes, and returns/echos HTML element ID, classes, attributes,
963
  * and data attributes.
964
  *
965
+ * @param string $id Element ID.
966
+ * @param array $class Class args.
967
+ * @param array $datas Data args.
968
+ * @param array $atts Attributes.
969
+ * @param bool $echo True to echo else return.
970
  *
971
  * @return string
972
  */
996
 
997
  if ( ! empty( $atts ) ) {
998
  foreach ( $atts as $att => $val ) {
999
+ if ( '0' === $val || ! empty( $val ) ) {
1000
  $parts[] = sanitize_html_class( $att ) . '="' . esc_attr( $val ) . '"';
1001
  }
1002
  }
1005
  $output = implode( ' ', $parts );
1006
 
1007
  if ( $echo ) {
1008
+ echo trim( $output ); // @codingStandardsIgnoreLine
1009
  } else {
1010
  return trim( $output );
1011
  }
1012
  }
1013
 
1014
  /**
1015
+ * Sanitize string of CSS classes.
1016
  *
1017
+ * @param array|string $classes Class names.
1018
  * @param bool $convert True will convert strings to array and vice versa.
1019
  *
1020
  * @return string|array
1044
  *
1045
  * @since 1.0.0
1046
  *
1047
+ * @param string $data Data to decode.
1048
+ *
1049
  * @return array|bool
1050
  */
1051
  function evf_decode( $data ) {
1059
  /**
1060
  * Performs json_encode and wp_slash.
1061
  *
1062
+ * @since 1.0.0
1063
  *
1064
+ * @param mixed $data Data to encode.
1065
  *
1066
  * @return string
1067
  */
1074
  }
1075
 
1076
  /**
1077
+ * Crypto rand secure.
1078
+ *
1079
+ * @param int $min Min value.
1080
+ * @param int $max Max value.
1081
  *
1082
  * @return mixed
1083
  */
1087
  return $min;
1088
  } // not so random...
1089
  $log = ceil( log( $range, 2 ) );
1090
+ $bytes = (int) ( $log / 8 ) + 1; // Length in bytes.
1091
+ $bits = (int) $log + 1; // Length in bits.
1092
+ $filter = (int) ( 1 << $bits ) - 1; // Set all lower bits to 1.
1093
  do {
1094
  $rnd = hexdec( bin2hex( openssl_random_pseudo_bytes( $bytes ) ) );
1095
+ $rnd = $rnd & $filter; // Discard irrelevant bits.
1096
  } while ( $rnd > $range );
1097
 
1098
  return $min + $rnd;
1099
  }
1100
 
1101
  /**
1102
+ * Generate random string.
1103
+ *
1104
+ * @param int $length Length of string.
1105
  *
1106
  * @return string
1107
  */
1108
  function evf_get_random_string( $length = 10 ) {
1109
+ $string = '';
1110
+ $code_alphabet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
1111
+ $code_alphabet .= 'abcdefghijklmnopqrstuvwxyz';
1112
+ $code_alphabet .= '0123456789';
1113
+ $max = strlen( $code_alphabet );
1114
  for ( $i = 0; $i < $length; $i ++ ) {
1115
+ $string .= $code_alphabet[ evf_crypto_rand_secure( 0, $max - 1 ) ];
1116
  }
1117
 
1118
  return $string;
1139
 
1140
  if ( ! empty( $form_ids ) ) {
1141
  foreach ( $form_ids as $form_id ) {
1142
+ $form = evf()->form->get( $form_id );
1143
  $entries = evf_get_entries_ids( $form_id );
1144
  $form_data = ! empty( $form->post_content ) ? evf_decode( $form->post_content ) : '';
1145
 
1157
  /**
1158
  * Get random meta-key for field option.
1159
  *
1160
+ * @param array $field Field data array.
1161
  * @return string
1162
  */
1163
  function evf_get_meta_key_field_option( $field ) {
1164
+ $random_number = rand( pow( 10, 3 ), pow( 10, 4 ) - 1 ); // phpcs:ignore WordPress.WP.AlternativeFunctions.rand_rand
1165
  return strtolower( str_replace( array( ' ', '/_' ), array( '_', '' ), $field['label'] ) ) . '_' . $random_number;
1166
  }
1167
 
1190
  * @return array
1191
  */
1192
  function evf_get_browser() {
1193
+ $u_agent = sanitize_text_field( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotValidated
1194
  $bname = 'Unknown';
1195
  $platform = 'Unknown';
1196
  $version = '';
1209
  $bname = 'Internet Explorer';
1210
  $ub = 'MSIE';
1211
  } elseif ( preg_match( '/Trident/i', $u_agent ) ) {
1212
+ // this condition is for IE11.
1213
  $bname = 'Internet Explorer';
1214
  $ub = 'rv';
1215
  } elseif ( preg_match( '/Firefox/i', $u_agent ) ) {
1230
  }
1231
 
1232
  // Finally get the correct version number.
1233
+ // Added "|:".
1234
  $known = array( 'Version', $ub, 'other' );
1235
+ $pattern = '#(?<browser>' . join( '|', $known ) . ')[/|: ]+(?<version>[0-9.|a-zA-Z.]*)#';
1236
+ if ( ! preg_match_all( $pattern, $u_agent, $matches ) ) { // @codingStandardsIgnoreLine
 
1237
  // We have no matching number just continue.
1238
  }
1239
 
1240
  // See how many we have.
1241
  $i = count( $matches['browser'] );
1242
 
1243
+ if ( 1 !== $i ) {
1244
  // we will have two since we are not using 'other' argument yet.
1245
  // see if version is before or after the name.
1246
  if ( strripos( $u_agent, 'Version' ) < strripos( $u_agent, $ub ) ) {
1253
  }
1254
 
1255
  // Check if we have a number.
1256
+ if ( null === $version || '' === $version ) {
1257
  $version = '';
1258
  }
1259
 
1286
 
1287
  switch ( $period ) {
1288
  case 'start_of_day':
1289
+ $date = date( $format, strtotime( 'today', $timestamp ) ); // phpcs:ignore WordPress.DateTime.RestrictedFunctions.date_date
1290
  break;
1291
 
1292
  case 'end_of_day':
1293
+ $date = date( $format, strtotime( 'tomorrow', $timestamp ) - 1 ); // phpcs:ignore WordPress.DateTime.RestrictedFunctions.date_date
1294
  break;
1295
 
1296
  }
1313
 
1314
  if ( ! empty( $form_fields ) ) {
1315
  foreach ( $form_fields as $field ) {
1316
+ if ( isset( $field['meta-key'] ) && $meta_key === $field['meta-key'] ) {
1317
  return $field['label'];
1318
  }
1319
  }
1337
 
1338
  if ( ! empty( $form_fields ) ) {
1339
  foreach ( $form_fields as $field ) {
1340
+ if ( isset( $field['meta-key'] ) && $meta_key === $field['meta-key'] ) {
1341
  return $field['type'];
1342
  }
1343
  }
1353
  */
1354
  function evf_get_all_email_fields_by_form_id( $form_id ) {
1355
  $user_emails = array();
1356
+ $form_obj = evf()->form->get( $form_id );
1357
  $form_data = ! empty( $form_obj->post_content ) ? evf_decode( $form_obj->post_content ) : '';
1358
 
1359
  if ( ! empty( $form_data['form_fields'] ) ) {
1375
  */
1376
  function evf_get_all_form_fields_by_form_id( $form_id ) {
1377
  $data = array();
1378
+ $form_obj = evf()->form->get( $form_id );
1379
  $form_data = ! empty( $form_obj->post_content ) ? evf_decode( $form_obj->post_content ) : '';
1380
 
1381
  if ( ! empty( $form_data['form_fields'] ) ) {
1419
  * @since 1.2.0
1420
  * @link http://stackoverflow.com/a/22500394
1421
  *
1422
+ * @param string $size Size to convert to bytes.
1423
  *
1424
  * @return int
1425
  */
1426
  function evf_size_to_bytes( $size ) {
 
1427
  if ( is_numeric( $size ) ) {
1428
  return $size;
1429
  }
1431
  $suffix = substr( $size, - 1 );
1432
  $value = substr( $size, 0, - 1 );
1433
 
1434
+ // @codingStandardsIgnoreStart
1435
  switch ( strtoupper( $suffix ) ) {
1436
  case 'P':
1437
  $value *= 1024;
1445
  $value *= 1024;
1446
  break;
1447
  }
1448
+ // @codingStandardsIgnoreEnd
1449
 
1450
  return $value;
1451
  }
1455
  *
1456
  * @since 1.2.0
1457
  *
1458
+ * @param int $bytes Bytes to convert to a readable format.
1459
  *
1460
  * @return string
1461
  */
1462
  function evf_size_to_megabytes( $bytes ) {
 
1463
  if ( $bytes < 1048676 ) {
1464
  return number_format( $bytes / 1024, 1 ) . ' KB';
1465
  } else {
1473
  * @since 1.2.0
1474
  * @link http://stackoverflow.com/a/22500394
1475
  *
1476
+ * @param bool $bytes Whether to convert Bytes to a readable format.
1477
  * @return mixed
1478
  */
1479
  function evf_max_upload( $bytes = false ) {
1531
  /**
1532
  * Decode special characters, both alpha- (<) and numeric-based (').
1533
  *
1534
+ * @since 1.2.0
1535
+ *
1536
+ * @param string $string Raw string to decode.
1537
+ *
1538
  * @return string
1539
  */
1540
  function evf_decode_string( $string ) {
1975
 
1976
  return $variable;
1977
  }
1978
+
1979
+ /**
1980
+ * Trigger logging cleanup using the logging class.
1981
+ *
1982
+ * @since 1.6.2
1983
+ */
1984
+ function evf_cleanup_logs() {
1985
+ $logger = evf_get_logger();
1986
+
1987
+ if ( is_callable( array( $logger, 'clear_expired_logs' ) ) ) {
1988
+ $logger->clear_expired_logs();
1989
+ }
1990
+ }
1991
+ add_action( 'everest_forms_cleanup_logs', 'evf_cleanup_logs' );
includes/evf-deprecated-functions.php CHANGED
@@ -182,7 +182,7 @@ function evf_get_us_states() {
182
  */
183
  function get_all_email_fields_by_form_id( $form_id ) {
184
  evf_deprecated_function( 'get_all_email_fields_by_form_id', '1.3.0', 'evf_get_all_email_fields_by_form_id' );
185
- return evf_get_all_email_fields_by_form_id( $string );
186
  }
187
 
188
  /**
@@ -190,7 +190,7 @@ function get_all_email_fields_by_form_id( $form_id ) {
190
  */
191
  function get_all_form_fields_by_form_id( $form_id ) {
192
  evf_deprecated_function( 'get_all_form_fields_by_form_id', '1.3.0', 'evf_get_all_form_fields_by_form_id' );
193
- return evf_get_all_form_fields_by_form_id( $string );
194
  }
195
 
196
  /**
182
  */
183
  function get_all_email_fields_by_form_id( $form_id ) {
184
  evf_deprecated_function( 'get_all_email_fields_by_form_id', '1.3.0', 'evf_get_all_email_fields_by_form_id' );
185
+ return evf_get_all_email_fields_by_form_id( $form_id );
186
  }
187
 
188
  /**
190
  */
191
  function get_all_form_fields_by_form_id( $form_id ) {
192
  evf_deprecated_function( 'get_all_form_fields_by_form_id', '1.3.0', 'evf_get_all_form_fields_by_form_id' );
193
+ return evf_get_all_form_fields_by_form_id( $form_id );
194
  }
195
 
196
  /**
includes/evf-formatting-functions.php CHANGED
@@ -73,7 +73,7 @@ function evf_string_to_array( $string, $delimiter = ',' ) {
73
  *
74
  * @since 1.4.5
75
  * @param array $dimensions Array of dimensions.
76
- * @param array $suffix Suffix, defaults to 'px'.
77
  * @return string
78
  */
79
  function evf_sanitize_dimension_unit( $dimensions = array(), $unit = 'px' ) {
@@ -459,7 +459,7 @@ function evf_format_phone_number( $phone ) {
459
  * @return string
460
  */
461
  function evf_strtoupper( $string ) {
462
- return function_exists( 'mb_strtoupper' ) ? mb_strtoupper( $string ) : strtoupper( $string );
463
  }
464
 
465
  /**
@@ -470,7 +470,7 @@ function evf_strtoupper( $string ) {
470
  * @return string
471
  */
472
  function evf_strtolower( $string ) {
473
- return function_exists( 'mb_strtolower' ) ? mb_strtolower( $string ) : strtolower( $string );
474
  }
475
 
476
  /**
@@ -486,7 +486,7 @@ function evf_strtolower( $string ) {
486
  function evf_trim_string( $string, $chars = 200, $suffix = '...' ) {
487
  if ( strlen( $string ) > $chars ) {
488
  if ( function_exists( 'mb_substr' ) ) {
489
- $string = mb_substr( $string, 0, ( $chars - mb_strlen( $suffix ) ) ) . $suffix;
490
  } else {
491
  $string = substr( $string, 0, ( $chars - strlen( $suffix ) ) ) . $suffix;
492
  }
73
  *
74
  * @since 1.4.5
75
  * @param array $dimensions Array of dimensions.
76
+ * @param array $unit Unit, defaults to 'px'.
77
  * @return string
78
  */
79
  function evf_sanitize_dimension_unit( $dimensions = array(), $unit = 'px' ) {
459
  * @return string
460
  */
461
  function evf_strtoupper( $string ) {
462
+ return function_exists( 'mb_strtoupper' ) ? mb_strtoupper( $string, 'UTF-8' ) : strtoupper( $string );
463
  }
464
 
465
  /**
470
  * @return string
471
  */
472
  function evf_strtolower( $string ) {
473
+ return function_exists( 'mb_strtolower' ) ? mb_strtolower( $string, 'UTF-8' ) : strtolower( $string );
474
  }
475
 
476
  /**
486
  function evf_trim_string( $string, $chars = 200, $suffix = '...' ) {
487
  if ( strlen( $string ) > $chars ) {
488
  if ( function_exists( 'mb_substr' ) ) {
489
+ $string = mb_substr( $string, 0, ( $chars - mb_strlen( $suffix, 'UTF-8' ) ), 'UTF-8' ) . $suffix;
490
  } else {
491
  $string = substr( $string, 0, ( $chars - strlen( $suffix ) ) ) . $suffix;
492
  }
includes/evf-notice-functions.php CHANGED
@@ -8,9 +8,7 @@
8
  * @version 1.0.0
9
  */
10
 
11
- if ( ! defined( 'ABSPATH' ) ) {
12
- exit;
13
- }
14
 
15
  /**
16
  * Get the count of notices added, either for all notices (default) or for one.
@@ -27,7 +25,7 @@ function evf_notice_count( $notice_type = '' ) {
27
  }
28
 
29
  $notice_count = 0;
30
- $all_notices = EVF()->session->get( 'evf_notices', array() );
31
 
32
  if ( isset( $all_notices[ $notice_type ] ) ) {
33
 
@@ -57,7 +55,7 @@ function evf_has_notice( $message, $notice_type = 'success' ) {
57
  return false;
58
  }
59
 
60
- $notices = EVF()->session->get( 'evf_notices', array() );
61
  $notices = isset( $notices[ $notice_type ] ) ? $notices[ $notice_type ] : array();
62
 
63
  return array_search( $message, $notices, true ) !== false;
@@ -76,7 +74,7 @@ function evf_add_notice( $message, $notice_type = 'success' ) {
76
  return;
77
  }
78
 
79
- $notices = EVF()->session->get( 'evf_notices', array() );
80
 
81
  // Backward compatibility.
82
  if ( 'success' === $notice_type ) {
@@ -85,7 +83,7 @@ function evf_add_notice( $message, $notice_type = 'success' ) {
85
 
86
  $notices[ $notice_type ][] = apply_filters( 'everest_forms_add_' . $notice_type, $message );
87
 
88
- EVF()->session->set( 'evf_notices', $notices );
89
  }
90
 
91
  /**
@@ -99,7 +97,7 @@ function evf_set_notices( $notices ) {
99
  evf_doing_it_wrong( __FUNCTION__, __( 'This function should not be called before everest_forms_init.', 'everest-forms' ), '1.0' );
100
  return;
101
  }
102
- EVF()->session->set( 'evf_notices', $notices );
103
  }
104
 
105
  /**
@@ -112,7 +110,7 @@ function evf_clear_notices() {
112
  evf_doing_it_wrong( __FUNCTION__, __( 'This function should not be called before everest_forms_init.', 'everest-forms' ), '1.0' );
113
  return;
114
  }
115
- EVF()->session->set( 'evf_notices', null );
116
  }
117
 
118
  /**
@@ -129,11 +127,11 @@ function evf_print_notices( $form_data = array() ) {
129
  }
130
 
131
  $form_id = isset( $form_data['id'] ) ? absint( $form_data['id'] ) : 0;
132
- $all_notices = EVF()->session->get( 'evf_notices', array() );
133
  $notice_types = apply_filters( 'everest_forms_notice_types', array( 'error', 'success', 'notice' ) );
134
 
135
  // Skips notice print if it isn't the right form.
136
- if ( isset( $_REQUEST['everest_forms']['id'] ) && ( (int) $form_id !== (int) $_REQUEST['everest_forms']['id'] ) ) {
137
  return;
138
  }
139
 
@@ -188,7 +186,7 @@ function evf_get_notices( $notice_type = '' ) {
188
  return;
189
  }
190
 
191
- $all_notices = EVF()->session->get( 'evf_notices', array() );
192
 
193
  if ( empty( $notice_type ) ) {
194
  $notices = $all_notices;
8
  * @version 1.0.0
9
  */
10
 
11
+ defined( 'ABSPATH' ) || exit;
 
 
12
 
13
  /**
14
  * Get the count of notices added, either for all notices (default) or for one.
25
  }
26
 
27
  $notice_count = 0;
28
+ $all_notices = evf()->session->get( 'evf_notices', array() );
29
 
30
  if ( isset( $all_notices[ $notice_type ] ) ) {
31
 
55
  return false;
56
  }
57
 
58
+ $notices = evf()->session->get( 'evf_notices', array() );
59
  $notices = isset( $notices[ $notice_type ] ) ? $notices[ $notice_type ] : array();
60
 
61
  return array_search( $message, $notices, true ) !== false;
74
  return;
75
  }
76
 
77
+ $notices = evf()->session->get( 'evf_notices', array() );
78
 
79
  // Backward compatibility.
80
  if ( 'success' === $notice_type ) {
83
 
84
  $notices[ $notice_type ][] = apply_filters( 'everest_forms_add_' . $notice_type, $message );
85
 
86
+ evf()->session->set( 'evf_notices', $notices );
87
  }
88
 
89
  /**
97
  evf_doing_it_wrong( __FUNCTION__, __( 'This function should not be called before everest_forms_init.', 'everest-forms' ), '1.0' );
98
  return;
99
  }
100
+ evf()->session->set( 'evf_notices', $notices );
101
  }
102
 
103
  /**
110
  evf_doing_it_wrong( __FUNCTION__, __( 'This function should not be called before everest_forms_init.', 'everest-forms' ), '1.0' );
111
  return;
112
  }
113
+ evf()->session->set( 'evf_notices', null );
114
  }
115
 
116
  /**
127
  }
128
 
129
  $form_id = isset( $form_data['id'] ) ? absint( $form_data['id'] ) : 0;
130
+ $all_notices = evf()->session->get( 'evf_notices', array() );
131
  $notice_types = apply_filters( 'everest_forms_notice_types', array( 'error', 'success', 'notice' ) );
132
 
133
  // Skips notice print if it isn't the right form.
134
+ if ( isset( $_REQUEST['everest_forms']['id'] ) && ( (int) $form_id !== (int) $_REQUEST['everest_forms']['id'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification
135
  return;
136
  }
137
 
186
  return;
187
  }
188
 
189
+ $all_notices = evf()->session->get( 'evf_notices', array() );
190
 
191
  if ( empty( $notice_type ) ) {
192
  $notices = $all_notices;
includes/evf-template-functions.php CHANGED
@@ -4,10 +4,8 @@
4
  *
5
  * Functions for the templating system.
6
  *
7
- * @author WPEveresst
8
- * @category Core
9
- * @package EverestForms/Functions
10
- * @version 1.0.0
11
  */
12
 
13
  defined( 'ABSPATH' ) || exit;
@@ -46,8 +44,8 @@ function evf_no_js() {
46
  /**
47
  * Output generator tag to aid debugging.
48
  *
49
- * @param string $gen
50
- * @param string $type
51
  *
52
  * @return string
53
  */
4
  *
5
  * Functions for the templating system.
6
  *
7
+ * @package EverestForms/Functions
8
+ * @version 1.0.0
 
 
9
  */
10
 
11
  defined( 'ABSPATH' ) || exit;
44
  /**
45
  * Output generator tag to aid debugging.
46
  *
47
+ * @param string $gen Generator.
48
+ * @param string $type Type.
49
  *
50
  * @return string
51
  */
includes/evf-update-functions.php CHANGED
@@ -45,7 +45,7 @@ function evf_update_110_update_forms() {
45
  $forms = evf_get_all_forms();
46
 
47
  foreach ( $forms as $form_id => $form ) {
48
- $form_obj = EVF()->form->get( $form_id );
49
  $form_data = ! empty( $form_obj->post_content ) ? evf_decode( $form_obj->post_content ) : '';
50
 
51
  if ( ! empty( $form_data['form_fields'] ) ) {
@@ -57,7 +57,7 @@ function evf_update_110_update_forms() {
57
  }
58
 
59
  // Update form data.
60
- EVF()->form->update( $form_id, $form_data );
61
  }
62
  }
63
 
@@ -125,7 +125,7 @@ function evf_update_120_db_rename_options() {
125
  * Update email settings adding connection data.
126
  */
127
  function evf_update_140_db_multiple_email() {
128
- $forms = EVF()->form->get( '', array( 'order' => 'DESC' ) );
129
 
130
  // Loop through each forms.
131
  foreach ( $forms as $form ) {
@@ -175,7 +175,7 @@ function evf_update_140_db_multiple_email() {
175
  }
176
 
177
  // Update form data.
178
- EVF()->form->update( $form_id, $form_data );
179
  }
180
  }
181
  }
@@ -242,7 +242,7 @@ function evf_update_149_no_payment_options() {
242
 
243
  // Loop through each forms.
244
  foreach ( $forms as $form_id => $form ) {
245
- $form_obj = EVF()->form->get( $form_id );
246
  $form_data = ! empty( $form_obj->post_content ) ? evf_decode( $form_obj->post_content ) : '';
247
 
248
  if ( ! empty( $form_data['form_fields'] ) ) {
@@ -254,7 +254,7 @@ function evf_update_149_no_payment_options() {
254
  }
255
 
256
  // Update form data.
257
- EVF()->form->update( $form_id, $form_data );
258
  }
259
  }
260
 
@@ -269,7 +269,7 @@ function evf_update_149_db_version() {
269
  * Update date field type for all forms.
270
  */
271
  function evf_update_150_field_datetime_type() {
272
- $forms = EVF()->form->get( '', array( 'order' => 'DESC' ) );
273
 
274
  // Loop through each forms.
275
  foreach ( $forms as $form ) {
@@ -285,7 +285,7 @@ function evf_update_150_field_datetime_type() {
285
  }
286
 
287
  // Update form data.
288
- EVF()->form->update( $form_id, $form_data );
289
  }
290
  }
291
 
45
  $forms = evf_get_all_forms();
46
 
47
  foreach ( $forms as $form_id => $form ) {
48
+ $form_obj = evf()->form->get( $form_id );
49
  $form_data = ! empty( $form_obj->post_content ) ? evf_decode( $form_obj->post_content ) : '';
50
 
51
  if ( ! empty( $form_data['form_fields'] ) ) {
57
  }
58
 
59
  // Update form data.
60
+ evf()->form->update( $form_id, $form_data );
61
  }
62
  }
63
 
125
  * Update email settings adding connection data.
126
  */
127
  function evf_update_140_db_multiple_email() {
128
+ $forms = evf()->form->get( '', array( 'order' => 'DESC' ) );
129
 
130
  // Loop through each forms.
131
  foreach ( $forms as $form ) {
175
  }
176
 
177
  // Update form data.
178
+ evf()->form->update( $form_id, $form_data );
179
  }
180
  }
181
  }
242
 
243
  // Loop through each forms.
244
  foreach ( $forms as $form_id => $form ) {
245
+ $form_obj = evf()->form->get( $form_id );
246
  $form_data = ! empty( $form_obj->post_content ) ? evf_decode( $form_obj->post_content ) : '';
247
 
248
  if ( ! empty( $form_data['form_fields'] ) ) {
254
  }
255
 
256
  // Update form data.
257
+ evf()->form->update( $form_id, $form_data );
258
  }
259
  }
260
 
269
  * Update date field type for all forms.
270
  */
271
  function evf_update_150_field_datetime_type() {
272
+ $forms = evf()->form->get( '', array( 'order' => 'DESC' ) );
273
 
274
  // Loop through each forms.
275
  foreach ( $forms as $form ) {
285
  }
286
 
287
  // Update form data.
288
+ evf()->form->update( $form_id, $form_data );
289
  }
290
  }
291
 
includes/export/abstract-evf-csv-exporter.php CHANGED
@@ -286,7 +286,7 @@ abstract class EVF_CSV_Exporter {
286
  public function escape_data( $data ) {
287
  $active_content_triggers = array( '=', '+', '-', '@' );
288
 
289
- if ( in_array( mb_substr( $data, 0, 1 ), $active_content_triggers, true ) ) {
290
  $data = "'" . $data . "'";
291
  }
292
 
286
  public function escape_data( $data ) {
287
  $active_content_triggers = array( '=', '+', '-', '@' );
288
 
289
+ if ( in_array( mb_substr( $data, 0, 1 ), $active_content_triggers, true ) ) { // @codingStandardsIgnoreLine
290
  $data = "'" . $data . "'";
291
  }
292
 
includes/export/class-evf-entry-csv-exporter.php CHANGED
@@ -60,11 +60,11 @@ class EVF_Entry_CSV_Exporter extends EVF_CSV_Exporter {
60
  */
61
  public function get_default_column_names() {
62
  $columns = array();
63
- $form_obj = EVF()->form->get( $this->form_id );
64
  $form_data = ! empty( $form_obj->post_content ) ? evf_decode( $form_obj->post_content ) : '';
65
 
66
  // Set Entry ID at first.
67
- $columns['entry_id'] = __( 'ID', 'everest-forms' );
68
 
69
  // Add whitelisted fields to export columns.
70
  if ( ! empty( $form_data['form_fields'] ) ) {
@@ -76,14 +76,14 @@ class EVF_Entry_CSV_Exporter extends EVF_CSV_Exporter {
76
  }
77
 
78
  // Set the default columns.
79
- $columns['status'] = __( 'Status', 'everest-forms' );
80
- $columns['date_created'] = __( 'Date Created', 'everest-forms' );
81
- $columns['date_created_gmt'] = __( 'Date Created GMT', 'everest-forms' );
82
 
83
  // If user details are disabled globally discard the IP and UA.
84
  if ( 'yes' !== get_option( 'everest_forms_disable_user_details' ) ) {
85
- $columns['user_device'] = __( 'User Device', 'everest-forms' );
86
- $columns['user_ip_address'] = __( 'User IP Address', 'everest-forms' );
87
  }
88
 
89
  return apply_filters( "everest_forms_export_{$this->export_type}_default_columns", $columns );
@@ -194,7 +194,7 @@ class EVF_Entry_CSV_Exporter extends EVF_CSV_Exporter {
194
  }
195
 
196
  /* translators: 1: entry date 2: entry time */
197
- return sprintf( __( '%1$s %2$s', 'everest-forms' ), date_i18n( evf_date_format(), $timestamp ), date_i18n( evf_time_format(), $timestamp ) );
198
  }
199
 
200
  /**
@@ -211,7 +211,7 @@ class EVF_Entry_CSV_Exporter extends EVF_CSV_Exporter {
211
  }
212
 
213
  /* translators: 1: entry date 2: entry time */
214
- return sprintf( __( '%1$s %2$s', 'everest-forms' ), date_i18n( evf_date_format(), $timestamp ), date_i18n( evf_time_format(), $timestamp ) );
215
  }
216
 
217
  /**
60
  */
61
  public function get_default_column_names() {
62
  $columns = array();
63
+ $form_obj = evf()->form->get( $this->form_id );
64
  $form_data = ! empty( $form_obj->post_content ) ? evf_decode( $form_obj->post_content ) : '';
65
 
66
  // Set Entry ID at first.
67
+ $columns['entry_id'] = esc_html__( 'ID', 'everest-forms' );
68
 
69
  // Add whitelisted fields to export columns.
70
  if ( ! empty( $form_data['form_fields'] ) ) {
76
  }
77
 
78
  // Set the default columns.
79
+ $columns['status'] = esc_html__( 'Status', 'everest-forms' );
80
+ $columns['date_created'] = esc_html__( 'Date Created', 'everest-forms' );
81
+ $columns['date_created_gmt'] = esc_html__( 'Date Created GMT', 'everest-forms' );
82
 
83
  // If user details are disabled globally discard the IP and UA.
84
  if ( 'yes' !== get_option( 'everest_forms_disable_user_details' ) ) {
85
+ $columns['user_device'] = esc_html__( 'User Device', 'everest-forms' );
86
+ $columns['user_ip_address'] = esc_html__( 'User IP Address', 'everest-forms' );
87
  }
88
 
89
  return apply_filters( "everest_forms_export_{$this->export_type}_default_columns", $columns );
194
  }
195
 
196
  /* translators: 1: entry date 2: entry time */
197
+ return sprintf( esc_html__( '%1$s %2$s', 'everest-forms' ), date_i18n( evf_date_format(), $timestamp ), date_i18n( evf_time_format(), $timestamp ) );
198
  }
199
 
200
  /**
211
  }
212
 
213
  /* translators: 1: entry date 2: entry time */
214
+ return sprintf( esc_html__( '%1$s %2$s', 'everest-forms' ), date_i18n( evf_date_format(), $timestamp ), date_i18n( evf_time_format(), $timestamp ) );
215
  }
216
 
217
  /**
includes/fields/class-evf-field-checkbox.php CHANGED
@@ -192,7 +192,7 @@ class EVF_Field_Checkbox extends EVF_Form_Fields {
192
  'name' => "everest_forms[form_fields][{$field_id}][]",
193
  'value' => $value,
194
  ),
195
- 'class' => array(),
196
  'data' => array(),
197
  'id' => "evf-{$form_id}-field_{$field_id}_{$key}",
198
  'image' => isset( $choice['image'] ) ? $choice['image'] : '',
192
  'name' => "everest_forms[form_fields][{$field_id}][]",
193
  'value' => $value,
194
  ),
195
+ 'class' => array( 'input-text' ),
196
  'data' => array(),
197
  'id' => "evf-{$form_id}-field_{$field_id}_{$key}",
198
  'image' => isset( $choice['image'] ) ? $choice['image'] : '',
includes/fields/class-evf-field-date-time.php CHANGED
@@ -67,8 +67,8 @@ class EVF_Field_Date_Time extends EVF_Form_Fields {
67
  $field,
68
  array(
69
  'slug' => 'datetime_format',
70
- 'value' => __( 'Format', 'everest-forms' ),
71
- 'tooltip' => __( 'Select a format for the date field.', 'everest-forms' ),
72
  ),
73
  false
74
  );
@@ -79,9 +79,9 @@ class EVF_Field_Date_Time extends EVF_Form_Fields {
79
  'slug' => 'datetime_format',
80
  'value' => $format,
81
  'options' => array(
82
- 'date' => __( 'Date', 'everest-forms' ),
83
- 'time' => __( 'Time', 'everest-forms' ),
84
- 'date-time' => __( 'Both', 'everest-forms' ),
85
  ),
86
  ),
87
  false
@@ -118,15 +118,15 @@ class EVF_Field_Date_Time extends EVF_Form_Fields {
118
 
119
  echo '<div class="format-selected-' . esc_attr( $format ) . ' format-selected">';
120
  echo '<div class="everest-forms-border-container everest-forms-date">';
121
- echo '<h4 class="everest-forms-border-container-title">' . esc_html__( 'Date', 'everest-forms' ) . '</h4>'; // WPCS: XSS ok.
122
 
123
  $date_format_label = $this->field_element(
124
  'label',
125
  $field,
126
  array(
127
  'slug' => 'date_format',
128
- 'value' => __( 'Date Format', 'everest-forms' ),
129
- 'tooltip' => __( 'Choose a desire date format to display.', 'everest-forms' ),
130
  ),
131
  false
132
  );
@@ -138,10 +138,10 @@ class EVF_Field_Date_Time extends EVF_Form_Fields {
138
  'slug' => 'date_format',
139
  'value' => isset( $field['date_format'] ) ? $field['date_format'] : 'Y-m-d',
140
  'options' => array(
141
- 'Y-m-d' => date( 'Y-m-d' ) . ' (Y-m-d)',
142
- 'F j, Y' => date( 'F j, Y' ) . ' (F j, Y)',
143
- 'm/d/Y' => date( 'm/d/Y' ) . ' (m/d/Y)',
144
- 'd/m/Y' => date( 'd/m/Y' ) . ' (d/m/Y)',
145
  ),
146
  ),
147
  false
@@ -153,8 +153,8 @@ class EVF_Field_Date_Time extends EVF_Form_Fields {
153
  array(
154
  'slug' => 'date_mode',
155
  'default' => isset( $field['date_mode'] ) ? $field['date_mode'] : 'single',
156
- 'desc' => __( 'Date Mode', 'everest-forms' ),
157
- 'tooltip' => __( 'Select your desire date mode.', 'everest-forms' ),
158
  'options' => array(
159
  'single' => 'Single',
160
  'range' => 'Range',
@@ -169,8 +169,8 @@ class EVF_Field_Date_Time extends EVF_Form_Fields {
169
  $field,
170
  array(
171
  'slug' => 'date_localization',
172
- 'value' => __( 'Date Localization', 'everest-forms' ),
173
- 'tooltip' => __( 'Choose a desire date localization to display.', 'everest-forms' ),
174
  ),
175
  false
176
  );
@@ -252,8 +252,8 @@ class EVF_Field_Date_Time extends EVF_Form_Fields {
252
  array(
253
  'slug' => 'date_default',
254
  'value' => isset( $field['date_default'] ) ? $field['date_default'] : '',
255
- 'desc' => __( 'Default to current date.', 'everest-forms' ),
256
- 'tooltip' => __( 'Check this option to set current date as default.', 'everest-forms' ),
257
  ),
258
  false
259
  );
@@ -264,8 +264,8 @@ class EVF_Field_Date_Time extends EVF_Form_Fields {
264
  array(
265
  'slug' => 'enable_min_max',
266
  'value' => isset( $field['enable_min_max'] ) ? $field['enable_min_max'] : '',
267
- 'desc' => __( 'Enable Min Max date.', 'everest-forms' ),
268
- 'tooltip' => __( 'Check this option to set min max date.', 'everest-forms' ),
269
  ),
270
  false
271
  );
@@ -276,7 +276,7 @@ class EVF_Field_Date_Time extends EVF_Form_Fields {
276
  array(
277
  'slug' => 'min_date',
278
  'value' => esc_html__( 'Minimum Date', 'everest-forms' ),
279
- 'tooltip' => __( 'Select minium date.', 'everest-forms' ),
280
  ),
281
  false
282
  );
@@ -298,7 +298,7 @@ class EVF_Field_Date_Time extends EVF_Form_Fields {
298
  array(
299
  'slug' => 'max_date',
300
  'value' => esc_html__( 'Maximum Date', 'everest-forms' ),
301
- 'tooltip' => __( 'Select maximum date.', 'everest-forms' ),
302
  ),
303
  false
304
  );
@@ -323,15 +323,15 @@ class EVF_Field_Date_Time extends EVF_Form_Fields {
323
  echo '</div>';
324
 
325
  echo '<div class="everest-forms-border-container everest-forms-time">';
326
- echo '<h4 class="everest-forms-border-container-title">' . esc_html__( 'Time', 'everest-forms' ) . '</h4>'; // WPCS: XSS ok.
327
 
328
  $time_format_label = $this->field_element(
329
  'label',
330
  $field,
331
  array(
332
  'slug' => 'time_interval',
333
- 'value' => __( 'Time interval and format', 'everest-forms' ),
334
- 'tooltip' => __( 'Choose time interval and format to display.', 'everest-forms' ),
335
  ),
336
  false
337
  );
@@ -345,8 +345,8 @@ class EVF_Field_Date_Time extends EVF_Form_Fields {
345
  'value' => isset( $field['time_interval'] ) ? $field['time_interval'] : '',
346
  'class' => 'time_interval',
347
  'options' => array(
348
- '15' => __( '15 minutes', 'everest-forms' ),
349
- '30' => __( '30 minutes', 'everest-forms' ),
350
  ),
351
  ),
352
  false
@@ -359,8 +359,8 @@ class EVF_Field_Date_Time extends EVF_Form_Fields {
359
  'value' => isset( $field['time_format'] ) ? $field['time_format'] : '',
360
  'class' => 'time_format',
361
  'options' => array(
362
- 'g:i A' => __( '12 H', 'everest-forms' ),
363
- 'H:i' => __( '24 H', 'everest-forms' ),
364
  ),
365
  ),
366
  false
@@ -410,7 +410,7 @@ class EVF_Field_Date_Time extends EVF_Form_Fields {
410
  // Input primary: data-date-format and value.
411
  switch ( $field['datetime_format'] ) {
412
  case 'date':
413
- $properties['inputs']['primary']['attr']['value'] = isset( $field['date_default'] ) ? esc_attr( date( $field['date_format'] ) ) : '';
414
  $properties['inputs']['primary']['attr']['data-date-format'] = ! empty( $field['date_format'] ) ? str_replace( 'g:i A', 'h:i K', esc_attr( $field['date_format'] ) ) : '';
415
  break;
416
  case 'time':
@@ -420,11 +420,11 @@ class EVF_Field_Date_Time extends EVF_Form_Fields {
420
  case 'date-time':
421
  if ( ! empty( $field['time_format'] ) ) {
422
  $date_format = esc_attr( $field['date_format'] ) . ' ' . esc_attr( $field['time_format'] );
423
- $properties['inputs']['primary']['attr']['value'] = isset( $field['date_default'] ) ? esc_attr( date( $date_format ) ) : '';
424
  $properties['inputs']['primary']['attr']['data-date-format'] = ! empty( $field['date_format'] ) ? str_replace( 'g:i A', 'h:i K', esc_attr( $date_format ) ) : '';
425
  } else {
426
  $date_format = esc_attr( $field['date_format'] ) . ' g:i A';
427
- $properties['inputs']['primary']['attr']['value'] = isset( $field['date_default'] ) ? esc_attr( date( $date_format ) ) : '';
428
  $properties['inputs']['primary']['attr']['data-date-format'] = ! empty( $field['date_format'] ) ? str_replace( 'g:i A', 'h:i K', esc_attr( $date_format ) ) : '';
429
  }
430
  break;
@@ -483,7 +483,7 @@ class EVF_Field_Date_Time extends EVF_Form_Fields {
483
  */
484
  public static function load_assets( $atts ) {
485
  $form_id = isset( $atts['id'] ) ? wp_unslash( $atts['id'] ) : ''; // WPCS: CSRF ok, input var ok, sanitization ok.
486
- $form_obj = EVF()->form->get( $form_id );
487
  $form_data = ! empty( $form_obj->post_content ) ? evf_decode( $form_obj->post_content ) : '';
488
  $data_i10n = 'en';
489
 
67
  $field,
68
  array(
69
  'slug' => 'datetime_format',
70
+ 'value' => esc_html__( 'Format', 'everest-forms' ),
71
+ 'tooltip' => esc_html__( 'Select a format for the date field.', 'everest-forms' ),
72
  ),
73
  false
74
  );
79
  'slug' => 'datetime_format',
80
  'value' => $format,
81
  'options' => array(
82
+ 'date' => esc_html__( 'Date', 'everest-forms' ),
83
+ 'time' => esc_html__( 'Time', 'everest-forms' ),
84
+ 'date-time' => esc_html__( 'Both', 'everest-forms' ),
85
  ),
86
  ),
87
  false
118
 
119
  echo '<div class="format-selected-' . esc_attr( $format ) . ' format-selected">';
120
  echo '<div class="everest-forms-border-container everest-forms-date">';
121
+ echo '<h4 class="everest-forms-border-container-title">' . esc_html__( 'Date', 'everest-forms' ) . '</h4>'; // phpcs:ignore WordPress.Security.NonceVerification
122
 
123
  $date_format_label = $this->field_element(
124
  'label',
125
  $field,
126
  array(
127
  'slug' => 'date_format',
128
+ 'value' => esc_html__( 'Date Format', 'everest-forms' ),
129
+ 'tooltip' => esc_html__( 'Choose a desire date format to display.', 'everest-forms' ),
130
  ),
131
  false
132
  );
138
  'slug' => 'date_format',
139
  'value' => isset( $field['date_format'] ) ? $field['date_format'] : 'Y-m-d',
140
  'options' => array(
141
+ 'Y-m-d' => date( 'Y-m-d' ) . ' (Y-m-d)', // phpcs:ignore WordPress.DateTime.RestrictedFunctions.date_date
142
+ 'F j, Y' => date( 'F j, Y' ) . ' (F j, Y)', // phpcs:ignore WordPress.DateTime.RestrictedFunctions.date_date
143
+ 'm/d/Y' => date( 'm/d/Y' ) . ' (m/d/Y)', // phpcs:ignore WordPress.DateTime.RestrictedFunctions.date_date
144
+ 'd/m/Y' => date( 'd/m/Y' ) . ' (d/m/Y)', // phpcs:ignore WordPress.DateTime.RestrictedFunctions.date_date
145
  ),
146
  ),
147
  false
153
  array(
154
  'slug' => 'date_mode',
155
  'default' => isset( $field['date_mode'] ) ? $field['date_mode'] : 'single',
156
+ 'desc' => esc_html__( 'Date Mode', 'everest-forms' ),
157
+ 'tooltip' => esc_html__( 'Select your desire date mode.', 'everest-forms' ),
158
  'options' => array(
159
  'single' => 'Single',
160
  'range' => 'Range',
169
  $field,
170
  array(
171
  'slug' => 'date_localization',
172
+ 'value' => esc_html__( 'Date Localization', 'everest-forms' ),
173
+ 'tooltip' => esc_html__( 'Choose a desire date localization to display.', 'everest-forms' ),
174
  ),
175
  false
176
  );
252
  array(
253
  'slug' => 'date_default',
254
  'value' => isset( $field['date_default'] ) ? $field['date_default'] : '',
255
+ 'desc' => esc_html__( 'Default to current date.', 'everest-forms' ),
256
+ 'tooltip' => esc_html__( 'Check this option to set current date as default.', 'everest-forms' ),
257
  ),
258
  false
259
  );
264
  array(
265
  'slug' => 'enable_min_max',
266
  'value' => isset( $field['enable_min_max'] ) ? $field['enable_min_max'] : '',
267
+ 'desc' => esc_html__( 'Enable Min Max date.', 'everest-forms' ),
268
+ 'tooltip' => esc_html__( 'Check this option to set min max date.', 'everest-forms' ),
269
  ),
270
  false
271
  );
276
  array(
277
  'slug' => 'min_date',
278
  'value' => esc_html__( 'Minimum Date', 'everest-forms' ),
279
+ 'tooltip' => esc_html__( 'Select minium date.', 'everest-forms' ),
280
  ),
281
  false
282
  );
298
  array(
299
  'slug' => 'max_date',
300
  'value' => esc_html__( 'Maximum Date', 'everest-forms' ),
301
+ 'tooltip' => esc_html__( 'Select maximum date.', 'everest-forms' ),
302
  ),
303
  false
304
  );
323
  echo '</div>';
324
 
325
  echo '<div class="everest-forms-border-container everest-forms-time">';
326
+ echo '<h4 class="everest-forms-border-container-title">' . esc_html__( 'Time', 'everest-forms' ) . '</h4>'; // phpcs:ignore WordPress.Security.NonceVerification
327
 
328
  $time_format_label = $this->field_element(
329
  'label',
330
  $field,
331
  array(
332
  'slug' => 'time_interval',
333
+ 'value' => esc_html__( 'Time interval and format', 'everest-forms' ),
334
+ 'tooltip' => esc_html__( 'Choose time interval and format to display.', 'everest-forms' ),
335
  ),
336
  false
337
  );
345
  'value' => isset( $field['time_interval'] ) ? $field['time_interval'] : '',
346
  'class' => 'time_interval',
347
  'options' => array(
348
+ '15' => esc_html__( '15 minutes', 'everest-forms' ),
349
+ '30' => esc_html__( '30 minutes', 'everest-forms' ),
350
  ),
351
  ),
352
  false
359
  'value' => isset( $field['time_format'] ) ? $field['time_format'] : '',
360
  'class' => 'time_format',
361
  'options' => array(
362
+ 'g:i A' => esc_html__( '12 H', 'everest-forms' ),
363
+ 'H:i' => esc_html__( '24 H', 'everest-forms' ),
364
  ),
365
  ),
366
  false
410
  // Input primary: data-date-format and value.
411
  switch ( $field['datetime_format'] ) {
412
  case 'date':
413
+ $properties['inputs']['primary']['attr']['value'] = isset( $field['date_default'] ) ? esc_attr( date( $field['date_format'] ) ) : ''; // phpcs:ignore WordPress.DateTime.RestrictedFunctions.date_date
414
  $properties['inputs']['primary']['attr']['data-date-format'] = ! empty( $field['date_format'] ) ? str_replace( 'g:i A', 'h:i K', esc_attr( $field['date_format'] ) ) : '';
415
  break;
416
  case 'time':
420
  case 'date-time':
421
  if ( ! empty( $field['time_format'] ) ) {
422
  $date_format = esc_attr( $field['date_format'] ) . ' ' . esc_attr( $field['time_format'] );
423
+ $properties['inputs']['primary']['attr']['value'] = isset( $field['date_default'] ) ? esc_attr( date( $date_format ) ) : ''; // phpcs:ignore WordPress.DateTime.RestrictedFunctions.date_date
424
  $properties['inputs']['primary']['attr']['data-date-format'] = ! empty( $field['date_format'] ) ? str_replace( 'g:i A', 'h:i K', esc_attr( $date_format ) ) : '';
425
  } else {
426
  $date_format = esc_attr( $field['date_format'] ) . ' g:i A';
427
+ $properties['inputs']['primary']['attr']['value'] = isset( $field['date_default'] ) ? esc_attr( date( $date_format ) ) : ''; // phpcs:ignore WordPress.DateTime.RestrictedFunctions.date_date
428
  $properties['inputs']['primary']['attr']['data-date-format'] = ! empty( $field['date_format'] ) ? str_replace( 'g:i A', 'h:i K', esc_attr( $date_format ) ) : '';
429
  }
430
  break;
483
  */
484
  public static function load_assets( $atts ) {
485
  $form_id = isset( $atts['id'] ) ? wp_unslash( $atts['id'] ) : ''; // WPCS: CSRF ok, input var ok, sanitization ok.
486
+ $form_obj = evf()->form->get( $form_id );
487
  $form_data = ! empty( $form_obj->post_content ) ? evf_decode( $form_obj->post_content ) : '';
488
  $data_i10n = 'en';
489
 
includes/fields/class-evf-field-email.php CHANGED
@@ -189,7 +189,7 @@ class EVF_Field_Email extends EVF_Form_Fields {
189
  /**
190
  * Confirmation Placeholder field option.
191
  *
192
- * @param array $field
193
  */
194
  public function confirmation_placeholder( $field ) {
195
  $lbl = $this->field_element(
@@ -233,14 +233,14 @@ class EVF_Field_Email extends EVF_Form_Fields {
233
  // Label.
234
  $this->field_preview_option( 'label', $field );
235
  ?>
236
- <div class="everest-forms-confirm everest-forms-confirm-<?php echo $confirm; ?>">
237
  <div class="everest-forms-confirm-primary">
238
- <input type="email" placeholder="<?php echo $placeholder; ?>" class="widefat primary-input" disabled>
239
  <label class="everest-forms-sub-label"><?php esc_html_e( 'Email', 'everest-forms' ); ?></label>
240
 
241
  </div>
242
  <div class="everest-forms-confirm-confirmation">
243
- <input type="email" placeholder="<?php echo $confirm_placeholder; ?>" class="widefat secondary-input" disabled>
244
  <label class="everest-forms-sub-label"><?php esc_html_e( 'Confirm Email', 'everest-forms' ); ?></label>
245
  </div>
246
  </div>
@@ -273,7 +273,7 @@ class EVF_Field_Email extends EVF_Form_Fields {
273
  printf(
274
  '<input type="email" %s %s>',
275
  evf_html_attributes( $primary['id'], $primary['class'], $primary['data'], $primary['attr'] ),
276
- $primary['required']
277
  );
278
 
279
  // Confirmation email field configuration.
@@ -329,14 +329,15 @@ class EVF_Field_Email extends EVF_Form_Fields {
329
  /**
330
  * Validates field on form submit.
331
  *
332
- * @param int $field_id
333
- * @param array $field_submit
334
- * @param array $form_data
335
  */
336
  public function validate( $field_id, $field_submit, $form_data ) {
337
  $form_id = $form_data['id'];
338
  $fields = $form_data['form_fields'];
339
  $required = evf_get_required_label();
 
340
  $conditional_status = isset( $form_data['form_fields'][ $field_id ]['conditional_logic_status'] ) ? $form_data['form_fields'][ $field_id ]['conditional_logic_status'] : 0;
341
 
342
  // Standard configuration, confirmation disabled.
@@ -347,6 +348,12 @@ class EVF_Field_Email extends EVF_Form_Fields {
347
  evf()->task->errors[ $form_id ][ $field_id ] = $required;
348
  update_option( 'evf_validation_error', 'yes' );
349
  }
 
 
 
 
 
 
350
  } else {
351
 
352
  // Required check.
@@ -366,8 +373,15 @@ class EVF_Field_Email extends EVF_Form_Fields {
366
  if ( $field_submit['primary'] !== $field_submit['secondary'] ) {
367
  evf()->task->errors[ $form_id ][ $field_id ]['secondary'] = esc_html__( 'Confirmation Email do not match.', 'everest-forms' );
368
  update_option( 'evf_validation_error', 'yes' );
 
369
  }
370
  }
 
 
 
 
 
 
371
  }
372
  }
373
 
@@ -390,7 +404,7 @@ class EVF_Field_Email extends EVF_Form_Fields {
390
  $name = ! empty( $form_data['form_fields'][ $field_id ] ['label'] ) ? $form_data['form_fields'][ $field_id ]['label'] : '';
391
 
392
  // Set final field details.
393
- EVF()->task->form_fields[ $field_id ] = array(
394
  'name' => sanitize_text_field( $name ),
395
  'value' => sanitize_text_field( $value ),
396
  'id' => $field_id,
189
  /**
190
  * Confirmation Placeholder field option.
191
  *
192
+ * @param array $field Field Data.
193
  */
194
  public function confirmation_placeholder( $field ) {
195
  $lbl = $this->field_element(
233
  // Label.
234
  $this->field_preview_option( 'label', $field );
235
  ?>
236
+ <div class="everest-forms-confirm everest-forms-confirm-<?php echo esc_attr( $confirm ); ?>">
237
  <div class="everest-forms-confirm-primary">
238
+ <input type="email" placeholder="<?php echo esc_attr( $placeholder ); ?>" class="widefat primary-input" disabled>
239
  <label class="everest-forms-sub-label"><?php esc_html_e( 'Email', 'everest-forms' ); ?></label>
240
 
241
  </div>
242
  <div class="everest-forms-confirm-confirmation">
243
+ <input type="email" placeholder="<?php echo esc_attr( $confirm_placeholder ); ?>" class="widefat secondary-input" disabled>
244
  <label class="everest-forms-sub-label"><?php esc_html_e( 'Confirm Email', 'everest-forms' ); ?></label>
245
  </div>
246
  </div>
273
  printf(
274
  '<input type="email" %s %s>',
275
  evf_html_attributes( $primary['id'], $primary['class'], $primary['data'], $primary['attr'] ),
276
+ esc_attr( $primary['required'] )
277
  );
278
 
279
  // Confirmation email field configuration.
329
  /**
330
  * Validates field on form submit.
331
  *
332
+ * @param int $field_id Field ID.
333
+ * @param array $field_submit Submitted data.
334
+ * @param array $form_data Form data.
335
  */
336
  public function validate( $field_id, $field_submit, $form_data ) {
337
  $form_id = $form_data['id'];
338
  $fields = $form_data['form_fields'];
339
  $required = evf_get_required_label();
340
+ $invalid_email = esc_html__( 'Please enter a valid email address.', 'everest-forms' );
341
  $conditional_status = isset( $form_data['form_fields'][ $field_id ]['conditional_logic_status'] ) ? $form_data['form_fields'][ $field_id ]['conditional_logic_status'] : 0;
342
 
343
  // Standard configuration, confirmation disabled.
348
  evf()->task->errors[ $form_id ][ $field_id ] = $required;
349
  update_option( 'evf_validation_error', 'yes' );
350
  }
351
+
352
+ if ( isset( $field_submit ) && ! is_email( $field_submit ) ) {
353
+ evf()->task->errors[ $form_id ][ $field_id ] = $invalid_email;
354
+ update_option( 'evf_validation_error', 'yes' );
355
+ return;
356
+ }
357
  } else {
358
 
359
  // Required check.
373
  if ( $field_submit['primary'] !== $field_submit['secondary'] ) {
374
  evf()->task->errors[ $form_id ][ $field_id ]['secondary'] = esc_html__( 'Confirmation Email do not match.', 'everest-forms' );
375
  update_option( 'evf_validation_error', 'yes' );
376
+ return;
377
  }
378
  }
379
+
380
+ if ( isset( $field_submit['primary'] ) && ! is_email( $field_submit['primary'] ) ) {
381
+ evf()->task->errors[ $form_id ][ $field_id ]['primary'] = $invalid_email;
382
+ update_option( 'evf_validation_error', 'yes' );
383
+ return;
384
+ }
385
  }
386
  }
387
 
404
  $name = ! empty( $form_data['form_fields'][ $field_id ] ['label'] ) ? $form_data['form_fields'][ $field_id ]['label'] : '';
405
 
406
  // Set final field details.
407
+ evf()->task->form_fields[ $field_id ] = array(
408
  'name' => sanitize_text_field( $name ),
409
  'value' => sanitize_text_field( $value ),
410
  'id' => $field_id,
includes/fields/class-evf-field-file-upload.php CHANGED
@@ -17,7 +17,7 @@ class EVF_Field_File_Upload extends EVF_Form_Fields {
17
  * Constructor.
18
  */
19
  public function __construct() {
20
- $this->name = __( 'File Upload', 'everest-forms' );
21
  $this->type = 'file-upload';
22
  $this->icon = 'evf-icon evf-icon-file-upload';
23
  $this->order = 40;
17
  * Constructor.
18
  */
19
  public function __construct() {
20
+ $this->name = esc_html__( 'File Upload', 'everest-forms' );
21
  $this->type = 'file-upload';
22
  $this->icon = 'evf-icon evf-icon-file-upload';
23
  $this->order = 40;
includes/fields/class-evf-field-first-name.php CHANGED
@@ -47,9 +47,8 @@ class EVF_Field_First_Name extends EVF_Form_Fields {
47
  /**
48
  * Field preview inside the builder.
49
  *
50
- * @since 1.0.0
51
- *
52
- * @param array $field
53
  */
54
  public function field_preview( $field ) {
55
 
@@ -60,7 +59,7 @@ class EVF_Field_First_Name extends EVF_Form_Fields {
60
  $this->field_preview_option( 'label', $field );
61
 
62
  // Primary input.
63
- echo '<input type="text" placeholder="' . $placeholder . '" class="widefat" disabled>';
64
 
65
  // Description.
66
  $this->field_preview_option( 'description', $field );
@@ -69,11 +68,11 @@ class EVF_Field_First_Name extends EVF_Form_Fields {
69
  /**
70
  * Field display on the form front-end.
71
  *
72
- * @since 1.0.0
73
  *
74
- * @param array $field
75
- * @param array $deprecated
76
- * @param array $form_data
77
  */
78
  public function field_display( $field, $deprecated, $form_data ) {
79
  // Define data.
47
  /**
48
  * Field preview inside the builder.
49
  *
50
+ * @since 1.0.0
51
+ * @param array $field Field settings.
 
52
  */
53
  public function field_preview( $field ) {
54
 
59
  $this->field_preview_option( 'label', $field );
60
 
61
  // Primary input.
62
+ echo '<input type="text" placeholder="' . esc_attr( $placeholder ) . '" class="widefat" disabled>';
63
 
64
  // Description.
65
  $this->field_preview_option( 'description', $field );
68
  /**
69
  * Field display on the form front-end.
70
  *
71
+ * @since 1.0.0
72
  *
73
+ * @param array $field Field Data.
74
+ * @param array $deprecated Deprecated Parameter.
75
+ * @param array $form_data Form Data.
76
  */
77
  public function field_display( $field, $deprecated, $form_data ) {
78
  // Define data.
includes/fields/class-evf-field-last-name.php CHANGED
@@ -47,9 +47,8 @@ class EVF_Field_Last_Name extends EVF_Form_Fields {
47
  /**
48
  * Field preview inside the builder.
49
  *
50
- * @since 1.0.0
51
- *
52
- * @param array $field
53
  */
54
  public function field_preview( $field ) {
55
 
@@ -60,7 +59,7 @@ class EVF_Field_Last_Name extends EVF_Form_Fields {
60
  $this->field_preview_option( 'label', $field );
61
 
62
  // Primary input.
63
- echo '<input type="text" placeholder="' . $placeholder . '" class="widefat" disabled>';
64
 
65
  // Description.
66
  $this->field_preview_option( 'description', $field );
@@ -69,16 +68,16 @@ class EVF_Field_Last_Name extends EVF_Form_Fields {
69
  /**
70
  * Field display on the form front-end.
71
  *
72
- * @since 1.0.0
73
  *
74
- * @param array $field
75
- * @param array $deprecated
76
- * @param array $form_data
77
  */
78
  public function field_display( $field, $deprecated, $form_data ) {
79
-
80
  // Define data.
81
  $primary = $field['properties']['inputs']['primary'];
 
82
  // Primary field.
83
  printf(
84
  '<input type="text" %s %s>',
47
  /**
48
  * Field preview inside the builder.
49
  *
50
+ * @since 1.0.0
51
+ * @param array $field Field settings.
 
52
  */
53
  public function field_preview( $field ) {
54
 
59
  $this->field_preview_option( 'label', $field );
60
 
61
  // Primary input.
62
+ echo '<input type="text" placeholder="' . esc_attr( $placeholder ) . '" class="widefat" disabled>';
63
 
64
  // Description.
65
  $this->field_preview_option( 'description', $field );
68
  /**
69
  * Field display on the form front-end.
70
  *
71
+ * @since 1.0.0
72
  *
73
+ * @param array $field Field Data.
74
+ * @param array $deprecated Deprecated Parameter.
75
+ * @param array $form_data Form Data.
76
  */
77
  public function field_display( $field, $deprecated, $form_data ) {
 
78
  // Define data.
79
  $primary = $field['properties']['inputs']['primary'];
80
+
81
  // Primary field.
82
  printf(
83
  '<input type="text" %s %s>',
includes/fields/class-evf-field-number.php CHANGED
@@ -251,7 +251,7 @@ class EVF_Field_Number extends EVF_Form_Fields {
251
  $value = preg_replace( '/[^0-9.]/', '', $field_submit );
252
 
253
  // Set final field details.
254
- EVF()->task->form_fields[ $field_id ] = array(
255
  'name' => sanitize_text_field( $name ),
256
  'value' => sanitize_text_field( $value ),
257
  'id' => $field_id,
251
  $value = preg_replace( '/[^0-9.]/', '', $field_submit );
252
 
253
  // Set final field details.
254
+ evf()->task->form_fields[ $field_id ] = array(
255
  'name' => sanitize_text_field( $name ),
256
  'value' => sanitize_text_field( $value ),
257
  'id' => $field_id,
includes/fields/class-evf-field-radio.php CHANGED
@@ -163,7 +163,7 @@ class EVF_Field_Radio extends EVF_Form_Fields {
163
  'name' => "everest_forms[form_fields][{$field_id}]",
164
  'value' => isset( $field['show_values'] ) ? $choice['value'] : $choice['label'],
165
  ),
166
- 'class' => array(),
167
  'data' => array(),
168
  'id' => "evf-{$form_id}-field_{$field_id}_{$key}",
169
  'image' => isset( $choice['image'] ) ? $choice['image'] : '',
163
  'name' => "everest_forms[form_fields][{$field_id}]",
164
  'value' => isset( $field['show_values'] ) ? $choice['value'] : $choice['label'],
165
  ),
166
+ 'class' => array( 'input-text' ),
167
  'data' => array(),
168
  'id' => "evf-{$form_id}-field_{$field_id}_{$key}",
169
  'image' => isset( $choice['image'] ) ? $choice['image'] : '',
includes/fields/class-evf-field-select.php CHANGED
@@ -84,9 +84,11 @@ class EVF_Field_Select extends EVF_Form_Fields {
84
  /**
85
  * Field display on the form front-end.
86
  *
87
- * @param array $field
88
- * @param array $field_atts
89
- * @param array $form_data
 
 
90
  */
91
  public function field_display( $field, $field_atts, $form_data ) {
92
  // Setup and sanitize the necessary data.
@@ -120,7 +122,7 @@ class EVF_Field_Select extends EVF_Form_Fields {
120
 
121
  // Optional placeholder.
122
  if ( ! empty( $field_placeholder ) ) {
123
- printf( '<option value="" class="placeholder" disabled %s>%s</option>', selected( false, $has_default, false ), $field_placeholder );
124
  }
125
 
126
  // Build the select options.
@@ -128,7 +130,7 @@ class EVF_Field_Select extends EVF_Form_Fields {
128
  $selected = isset( $choice['default'] ) && empty( $field_placeholder ) ? '1' : '0';
129
  $val = isset( $field['show_values'] ) ? esc_attr( $choice['value'] ) : esc_attr( $choice['label'] );
130
 
131
- printf( '<option value="%s" %s>%s</option>', $val, selected( '1', $selected, false ), $choice['label'] );
132
  }
133
 
134
  echo '</select>';
@@ -137,10 +139,12 @@ class EVF_Field_Select extends EVF_Form_Fields {
137
  /**
138
  * Formats and sanitizes field.
139
  *
140
- * @param int $field_id
141
- * @param array $field_submit
142
- * @param array $form_data
143
- * @param string $meta_key
 
 
144
  */
145
  public function format( $field_id, $field_submit, $form_data, $meta_key ) {
146
  $field = $form_data['form_fields'][ $field_id ];
@@ -160,8 +164,7 @@ class EVF_Field_Select extends EVF_Form_Fields {
160
  // Normal processing, dynamic population is off.
161
  // If show_values is true, that means values posted are the raw values
162
  // and not the labels. So we need to get the label values.
163
- if ( ! empty( $field['show_values'] ) && '1' == $field['show_values'] ) {
164
-
165
  foreach ( $field['choices'] as $choice ) {
166
  if ( $choice['value'] === $field_submit ) {
167
  $value = $choice['label'];
@@ -170,12 +173,11 @@ class EVF_Field_Select extends EVF_Form_Fields {
170
  }
171
 
172
  $data['value'] = sanitize_text_field( $value );
173
-
174
  } else {
175
  $data['value'] = $value_raw;
176
  }
177
 
178
  // Push field details to be saved.
179
- EVF()->task->form_fields[ $field_id ] = $data;
180
  }
181
  }
84
  /**
85
  * Field display on the form front-end.
86
  *
87
+ * @since 1.0.0
88
+ *
89
+ * @param array $field Field Data.
90
+ * @param array $field_atts Field attributes.
91
+ * @param array $form_data All Form Data.
92
  */
93
  public function field_display( $field, $field_atts, $form_data ) {
94
  // Setup and sanitize the necessary data.
122
 
123
  // Optional placeholder.
124
  if ( ! empty( $field_placeholder ) ) {
125
+ printf( '<option value="" class="placeholder" disabled %s>%s</option>', selected( false, $has_default, false ), esc_html( $field_placeholder ) );
126
  }
127
 
128
  // Build the select options.
130
  $selected = isset( $choice['default'] ) && empty( $field_placeholder ) ? '1' : '0';
131
  $val = isset( $field['show_values'] ) ? esc_attr( $choice['value'] ) : esc_attr( $choice['label'] );
132
 
133
+ printf( '<option value="%s" %s>%s</option>', esc_attr( $val ), selected( '1', $selected, false ), esc_html( $choice['label'] ) );
134
  }
135
 
136
  echo '</select>';
139
  /**
140
  * Formats and sanitizes field.
141
  *
142
+ * @since 1.0.0
143
+ *
144
+ * @param int $field_id Field ID.
145
+ * @param mixed $field_submit Submitted field value.
146
+ * @param array $form_data Form data and settings.
147
+ * @param string $meta_key Field meta key.
148
  */
149
  public function format( $field_id, $field_submit, $form_data, $meta_key ) {
150
  $field = $form_data['form_fields'][ $field_id ];
164
  // Normal processing, dynamic population is off.
165
  // If show_values is true, that means values posted are the raw values
166
  // and not the labels. So we need to get the label values.
167
+ if ( ! empty( $field['show_values'] ) && '1' === $field['show_values'] ) {
 
168
  foreach ( $field['choices'] as $choice ) {
169
  if ( $choice['value'] === $field_submit ) {
170
  $value = $choice['label'];
173
  }
174
 
175
  $data['value'] = sanitize_text_field( $value );
 
176
  } else {
177
  $data['value'] = $value_raw;
178
  }
179
 
180
  // Push field details to be saved.
181
+ evf()->task->form_fields[ $field_id ] = $data;
182
  }
183
  }
includes/fields/class-evf-field-text.php CHANGED
@@ -162,7 +162,7 @@ class EVF_Field_Text extends EVF_Form_Fields {
162
  */
163
  public function load_assets( $atts ) {
164
  $form_id = isset( $atts['id'] ) ? wp_unslash( $atts['id'] ) : ''; // WPCS: CSRF ok, input var ok, sanitization ok.
165
- $form_obj = EVF()->form->get( $form_id );
166
  $form_data = ! empty( $form_obj->post_content ) ? evf_decode( $form_obj->post_content ) : '';
167
 
168
  // Leave only fields with limit.
162
  */
163
  public function load_assets( $atts ) {
164
  $form_id = isset( $atts['id'] ) ? wp_unslash( $atts['id'] ) : ''; // WPCS: CSRF ok, input var ok, sanitization ok.
165
+ $form_obj = evf()->form->get( $form_id );
166
  $form_data = ! empty( $form_obj->post_content ) ? evf_decode( $form_obj->post_content ) : '';
167
 
168
  // Leave only fields with limit.
includes/fields/class-evf-field-textarea.php CHANGED
@@ -124,7 +124,7 @@ class EVF_Field_Textarea extends EVF_Form_Fields {
124
  */
125
  public function load_assets( $atts ) {
126
  $form_id = isset( $atts['id'] ) ? wp_unslash( $atts['id'] ) : ''; // WPCS: CSRF ok, input var ok, sanitization ok.
127
- $form_obj = EVF()->form->get( $form_id );
128
  $form_data = ! empty( $form_obj->post_content ) ? evf_decode( $form_obj->post_content ) : '';
129
 
130
  // Leave only fields with limit.
@@ -200,6 +200,6 @@ class EVF_Field_Textarea extends EVF_Form_Fields {
200
  evf_html_attributes( $primary['id'], $primary['class'], $primary['data'], $primary['attr'] ),
201
  esc_attr( $primary['required'] ),
202
  $value // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
203
- );
204
  }
205
  }
124
  */
125
  public function load_assets( $atts ) {
126
  $form_id = isset( $atts['id'] ) ? wp_unslash( $atts['id'] ) : ''; // WPCS: CSRF ok, input var ok, sanitization ok.
127
+ $form_obj = evf()->form->get( $form_id );
128
  $form_data = ! empty( $form_obj->post_content ) ? evf_decode( $form_obj->post_content ) : '';
129
 
130
  // Leave only fields with limit.
200
  evf_html_attributes( $primary['id'], $primary['class'], $primary['data'], $primary['attr'] ),
201
  esc_attr( $primary['required'] ),
202
  $value // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
203
+ ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
204
  }
205
  }
includes/fields/class-evf-field-title.php CHANGED
@@ -17,7 +17,7 @@ class EVF_Field_Title extends EVF_Form_Fields {
17
  * Constructor.
18
  */
19
  public function __construct() {
20
- $this->name = __( 'Section Title', 'everest-forms' );
21
  $this->type = 'title';
22
  $this->icon = 'evf-icon evf-icon-section-divider';
23
  $this->order = 90;
17
  * Constructor.
18
  */
19
  public function __construct() {
20
+ $this->name = esc_html__( 'Section Title', 'everest-forms' );
21
  $this->type = 'title';
22
  $this->icon = 'evf-icon evf-icon-section-divider';
23
  $this->order = 90;
includes/fields/class-evf-field-url.php CHANGED
@@ -47,12 +47,10 @@ class EVF_Field_URL extends EVF_Form_Fields {
47
  /**
48
  * Field preview inside the builder.
49
  *
50
- * @since 1.0.0
51
- *
52
- * @param array $field
53
  */
54
  public function field_preview( $field ) {
55
-
56
  // Define data.
57
  $placeholder = ! empty( $field['placeholder'] ) ? esc_attr( $field['placeholder'] ) : '';
58
 
@@ -60,7 +58,7 @@ class EVF_Field_URL extends EVF_Form_Fields {
60
  $this->field_preview_option( 'label', $field );
61
 
62
  // Primary input.
63
- echo '<input type="url" placeholder="' . $placeholder . '" class="widefat" disabled>';
64
 
65
  // Description.
66
  $this->field_preview_option( 'description', $field );
@@ -69,11 +67,11 @@ class EVF_Field_URL extends EVF_Form_Fields {
69
  /**
70
  * Field display on the form front-end.
71
  *
72
- * @since 1.0.0
73
  *
74
- * @param array $field
75
- * @param array $deprecated
76
- * @param array $form_data
77
  */
78
  public function field_display( $field, $deprecated, $form_data ) {
79
  // Define data.
47
  /**
48
  * Field preview inside the builder.
49
  *
50
+ * @since 1.0.0
51
+ * @param array $field Field settings.
 
52
  */
53
  public function field_preview( $field ) {
 
54
  // Define data.
55
  $placeholder = ! empty( $field['placeholder'] ) ? esc_attr( $field['placeholder'] ) : '';
56
 
58
  $this->field_preview_option( 'label', $field );
59
 
60
  // Primary input.
61
+ echo '<input type="url" placeholder="' . esc_attr( $placeholder ) . '" class="widefat" disabled>';
62
 
63
  // Description.
64
  $this->field_preview_option( 'description', $field );
67
  /**
68
  * Field display on the form front-end.
69
  *
70
+ * @since 1.0.0
71
  *
72
+ * @param array $field Field Data.
73
+ * @param array $deprecated Deprecated Parameter.
74
+ * @param array $form_data Form Data.
75
  */
76
  public function field_display( $field, $deprecated, $form_data ) {
77
  // Define data.
includes/log-handlers/class-evf-log-handler-file.php CHANGED
@@ -43,12 +43,11 @@ class EVF_Log_Handler_File extends EVF_Log_Handler {
43
  * @param int $log_size_limit Optional. Size limit for log files. Default 5mb.
44
  */
45
  public function __construct( $log_size_limit = null ) {
46
-
47
  if ( null === $log_size_limit ) {
48
  $log_size_limit = 5 * 1024 * 1024;
49
  }
50
 
51
- $this->log_size_limit = $log_size_limit;
52
 
53
  add_action( 'plugins_loaded', array( $this, 'write_cached_logs' ) );
54
  }
@@ -61,7 +60,7 @@ class EVF_Log_Handler_File extends EVF_Log_Handler {
61
  public function __destruct() {
62
  foreach ( $this->handles as $handle ) {
63
  if ( is_resource( $handle ) ) {
64
- fclose( $handle );
65
  }
66
  }
67
  }
@@ -69,11 +68,11 @@ class EVF_Log_Handler_File extends EVF_Log_Handler {
69
  /**
70
  * Handle a log entry.
71
  *
72
- * @param int $timestamp Log timestamp.
73
- * @param string $level emergency|alert|critical|error|warning|notice|info|debug
74
  * @param string $message Log message.
75
- * @param array $context {
76
- * Additional information for log handlers.
77
  *
78
  * @type string $source Optional. Determines log file to write to. Default 'log'.
79
  * @type bool $_legacy Optional. Default false. True to use outdated log format
@@ -83,7 +82,6 @@ class EVF_Log_Handler_File extends EVF_Log_Handler {
83
  * @return bool False if value was not handled and true if value was handled.
84
  */
85
  public function handle( $timestamp, $level, $message, $context ) {
86
-
87
  if ( isset( $context['source'] ) && $context['source'] ) {
88
  $handle = $context['source'];
89
  } else {
@@ -98,15 +96,14 @@ class EVF_Log_Handler_File extends EVF_Log_Handler {
98
  /**
99
  * Builds a log entry text from timestamp, level and message.
100
  *
101
- * @param int $timestamp Log timestamp.
102
- * @param string $level emergency|alert|critical|error|warning|notice|info|debug
103
  * @param string $message Log message.
104
- * @param array $context Additional information for log handlers.
105
  *
106
  * @return string Formatted log entry.
107
  */
108
  protected static function format_entry( $timestamp, $level, $message, $context ) {
109
-
110
  if ( isset( $context['_legacy'] ) && true === $context['_legacy'] ) {
111
  if ( isset( $context['source'] ) && $context['source'] ) {
112
  $handle = $context['source'];
@@ -114,8 +111,8 @@ class EVF_Log_Handler_File extends EVF_Log_Handler {
114
  $handle = 'log';
115
  }
116
  $message = apply_filters( 'everest_forms_logger_add_message', $message, $handle );
117
- $time = date_i18n( 'm-d-Y @ H:i:s' );
118
- $entry = "{$time} - {$message}";
119
  } else {
120
  $entry = parent::format_entry( $timestamp, $level, $message, $context );
121
  }
@@ -139,15 +136,17 @@ class EVF_Log_Handler_File extends EVF_Log_Handler {
139
 
140
  if ( $file ) {
141
  if ( ! file_exists( $file ) ) {
142
- $temphandle = @fopen( $file, 'w+' );
143
- @fclose( $temphandle );
144
 
145
  if ( defined( 'FS_CHMOD_FILE' ) ) {
146
- @chmod( $file, FS_CHMOD_FILE );
147
  }
148
  }
149
 
150
- if ( $resource = @fopen( $file, $mode ) ) {
 
 
151
  $this->handles[ $handle ] = $resource;
152
  return true;
153
  }
@@ -169,14 +168,14 @@ class EVF_Log_Handler_File extends EVF_Log_Handler {
169
  /**
170
  * Close a handle.
171
  *
172
- * @param string $handle
173
  * @return bool success
174
  */
175
  protected function close( $handle ) {
176
  $result = false;
177
 
178
  if ( $this->is_open( $handle ) ) {
179
- $result = fclose( $this->handles[ $handle ] );
180
  unset( $this->handles[ $handle ] );
181
  }
182
 
@@ -186,8 +185,8 @@ class EVF_Log_Handler_File extends EVF_Log_Handler {
186
  /**
187
  * Add a log entry to chosen file.
188
  *
189
- * @param string $entry Log entry text
190
- * @param string $handle Log entry handle
191
  *
192
  * @return bool True if write was successful.
193
  */
@@ -199,7 +198,7 @@ class EVF_Log_Handler_File extends EVF_Log_Handler {
199
  }
200
 
201
  if ( $this->open( $handle ) && is_resource( $this->handles[ $handle ] ) ) {
202
- $result = fwrite( $this->handles[ $handle ], $entry . PHP_EOL );
203
  } else {
204
  $this->cache_log( $entry, $handle );
205
  }
@@ -210,7 +209,7 @@ class EVF_Log_Handler_File extends EVF_Log_Handler {
210
  /**
211
  * Clear entries from chosen file.
212
  *
213
- * @param string $handle
214
  *
215
  * @return bool
216
  */
@@ -236,22 +235,23 @@ class EVF_Log_Handler_File extends EVF_Log_Handler {
236
  /**
237
  * Remove/delete the chosen file.
238
  *
239
- * @param string $handle
240
  *
241
  * @return bool
242
  */
243
  public function remove( $handle ) {
244
  $removed = false;
245
- $file = self::get_log_file_path( $handle );
246
-
247
- if ( $file ) {
248
- if ( is_file( $file ) && is_writable( $file ) ) {
249
- $this->close( $handle ); // Close first to be certain no processes keep it alive after it is unlinked.
250
- $removed = unlink( $file );
 
 
251
  }
252
  do_action( 'everest_forms_log_remove', $handle, $removed );
253
  }
254
-
255
  return $removed;
256
  }
257
 
@@ -260,7 +260,7 @@ class EVF_Log_Handler_File extends EVF_Log_Handler {
260
  *
261
  * Compares the size of the log file to determine whether it is over the size limit.
262
  *
263
- * @param string $handle Log handle
264
  * @return bool True if if should be rotated.
265
  */
266
  protected function should_rotate( $handle ) {
@@ -291,7 +291,7 @@ class EVF_Log_Handler_File extends EVF_Log_Handler {
291
  * base.0.log -> base.1.log
292
  * base.log -> base.0.log
293
  *
294
- * @param string $handle Log handle
295
  */
296
  protected function log_rotate( $handle ) {
297
  for ( $i = 8; $i >= 0; $i-- ) {
@@ -303,28 +303,28 @@ class EVF_Log_Handler_File extends EVF_Log_Handler {
303
  /**
304
  * Increment a log file suffix.
305
  *
306
- * @param string $handle Log handle
307
  * @param null|int $number Optional. Default null. Log suffix number to be incremented.
308
  * @return bool True if increment was successful, otherwise false.
309
  */
310
  protected function increment_log_infix( $handle, $number = null ) {
311
  if ( null === $number ) {
312
- $suffix = '';
313
  $next_suffix = '.0';
314
  } else {
315
- $suffix = '.' . $number;
316
- $next_suffix = '.' . ($number + 1);
317
  }
318
 
319
  $rename_from = self::get_log_file_path( "{$handle}{$suffix}" );
320
- $rename_to = self::get_log_file_path( "{$handle}{$next_suffix}" );
321
 
322
  if ( $this->is_open( $rename_from ) ) {
323
  $this->close( $rename_from );
324
  }
325
 
326
- if ( is_writable( $rename_from ) ) {
327
- return rename( $rename_from, $rename_to );
328
  } else {
329
  return false;
330
  }
@@ -348,13 +348,17 @@ class EVF_Log_Handler_File extends EVF_Log_Handler {
348
  /**
349
  * Get a log file name.
350
  *
 
 
351
  * @since 3.3
352
  * @param string $handle Log name.
353
  * @return bool|string The log file name or false if cannot be determined.
354
  */
355
  public static function get_log_file_name( $handle ) {
356
  if ( function_exists( 'wp_hash' ) ) {
357
- return sanitize_file_name( $handle . '-' . wp_hash( $handle ) . '.log' );
 
 
358
  } else {
359
  evf_doing_it_wrong( __METHOD__, __( 'This method should not be called before plugins_loaded.', 'everest-forms' ), '1.2' );
360
  return false;
@@ -364,12 +368,12 @@ class EVF_Log_Handler_File extends EVF_Log_Handler {
364
  /**
365
  * Cache log to write later.
366
  *
367
- * @param string $entry Log entry text
368
- * @param string $handle Log entry handle
369
  */
370
  protected function cache_log( $entry, $handle ) {
371
  $this->cached_logs[] = array(
372
- 'entry' => $entry,
373
  'handle' => $handle,
374
  );
375
  }
@@ -382,4 +386,49 @@ class EVF_Log_Handler_File extends EVF_Log_Handler {
382
  $this->add( $log['entry'], $log['handle'] );
383
  }
384
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
385
  }
43
  * @param int $log_size_limit Optional. Size limit for log files. Default 5mb.
44
  */
45
  public function __construct( $log_size_limit = null ) {
 
46
  if ( null === $log_size_limit ) {
47
  $log_size_limit = 5 * 1024 * 1024;
48
  }
49
 
50
+ $this->log_size_limit = apply_filters( 'everest_forms_log_file_size_limit', $log_size_limit );
51
 
52
  add_action( 'plugins_loaded', array( $this, 'write_cached_logs' ) );
53
  }
60
  public function __destruct() {
61
  foreach ( $this->handles as $handle ) {
62
  if ( is_resource( $handle ) ) {
63
+ fclose( $handle ); // phpcs:ignore WordPress.WP.AlternativeFunctions.file_system_read_fclose
64
  }
65
  }
66
  }
68
  /**
69
  * Handle a log entry.
70
  *
71
+ * @param int $timestamp Log timestamp.
72
+ * @param string $level emergency|alert|critical|error|warning|notice|info|debug.
73
  * @param string $message Log message.
74
+ * @param array $context {
75
+ * Additional information for log handlers.
76
  *
77
  * @type string $source Optional. Determines log file to write to. Default 'log'.
78
  * @type bool $_legacy Optional. Default false. True to use outdated log format
82
  * @return bool False if value was not handled and true if value was handled.
83
  */
84
  public function handle( $timestamp, $level, $message, $context ) {
 
85
  if ( isset( $context['source'] ) && $context['source'] ) {
86
  $handle = $context['source'];
87
  } else {
96
  /**
97
  * Builds a log entry text from timestamp, level and message.
98
  *
99
+ * @param int $timestamp Log timestamp.
100
+ * @param string $level emergency|alert|critical|error|warning|notice|info|debug.
101
  * @param string $message Log message.
102
+ * @param array $context Additional information for log handlers.
103
  *
104
  * @return string Formatted log entry.
105
  */
106
  protected static function format_entry( $timestamp, $level, $message, $context ) {
 
107
  if ( isset( $context['_legacy'] ) && true === $context['_legacy'] ) {
108
  if ( isset( $context['source'] ) && $context['source'] ) {
109
  $handle = $context['source'];
111
  $handle = 'log';
112
  }
113
  $message = apply_filters( 'everest_forms_logger_add_message', $message, $handle );
114
+ $time = date_i18n( 'm-d-Y @ H:i:s' );
115
+ $entry = "{$time} - {$message}";
116
  } else {
117
  $entry = parent::format_entry( $timestamp, $level, $message, $context );
118
  }
136
 
137
  if ( $file ) {
138
  if ( ! file_exists( $file ) ) {
139
+ $temphandle = @fopen( $file, 'w+' ); // @codingStandardsIgnoreLine
140
+ @fclose( $temphandle ); // @codingStandardsIgnoreLine
141
 
142
  if ( defined( 'FS_CHMOD_FILE' ) ) {
143
+ @chmod( $file, FS_CHMOD_FILE ); // @codingStandardsIgnoreLine
144
  }
145
  }
146
 
147
+ $resource = @fopen( $file, $mode ); // @codingStandardsIgnoreLine
148
+
149
+ if ( $resource ) {
150
  $this->handles[ $handle ] = $resource;
151
  return true;
152
  }
168
  /**
169
  * Close a handle.
170
  *
171
+ * @param string $handle Log handle.
172
  * @return bool success
173
  */
174
  protected function close( $handle ) {
175
  $result = false;
176
 
177
  if ( $this->is_open( $handle ) ) {
178
+ $result = fclose( $this->handles[ $handle ] ); // @codingStandardsIgnoreLine
179
  unset( $this->handles[ $handle ] );
180
  }
181
 
185
  /**
186
  * Add a log entry to chosen file.
187
  *
188
+ * @param string $entry Log entry text.
189
+ * @param string $handle Log entry handle.
190
  *
191
  * @return bool True if write was successful.
192
  */
198
  }
199
 
200
  if ( $this->open( $handle ) && is_resource( $this->handles[ $handle ] ) ) {
201
+ $result = fwrite( $this->handles[ $handle ], $entry . PHP_EOL ); // phpcs:ignore WordPress.WP.AlternativeFunctions.file_system_read_fwrite
202
  } else {
203
  $this->cache_log( $entry, $handle );
204
  }
209
  /**
210
  * Clear entries from chosen file.
211
  *
212
+ * @param string $handle Log handle.
213
  *
214
  * @return bool
215
  */
235
  /**
236
  * Remove/delete the chosen file.
237
  *
238
+ * @param string $handle Log handle.
239
  *
240
  * @return bool
241
  */
242
  public function remove( $handle ) {
243
  $removed = false;
244
+ $logs = $this->get_log_files();
245
+ $handle = sanitize_title( $handle );
246
+
247
+ if ( isset( $logs[ $handle ] ) && $logs[ $handle ] ) {
248
+ $file = realpath( trailingslashit( EVF_LOG_DIR ) . $logs[ $handle ] );
249
+ if ( 0 === stripos( $file, realpath( trailingslashit( EVF_LOG_DIR ) ) ) && is_file( $file ) && is_writable( $file ) ) { // phpcs:ignore WordPress.VIP.FileSystemWritesDisallow.file_ops_is_writable
250
+ $this->close( $file ); // Close first to be certain no processes keep it alive after it is unlinked.
251
+ $removed = unlink( $file ); // phpcs:ignore WordPress.VIP.FileSystemWritesDisallow.file_ops_unlink
252
  }
253
  do_action( 'everest_forms_log_remove', $handle, $removed );
254
  }
 
255
  return $removed;
256
  }
257
 
260
  *
261
  * Compares the size of the log file to determine whether it is over the size limit.
262
  *
263
+ * @param string $handle Log handle.
264
  * @return bool True if if should be rotated.
265
  */
266
  protected function should_rotate( $handle ) {
291
  * base.0.log -> base.1.log
292
  * base.log -> base.0.log
293
  *
294
+ * @param string $handle Log handle.
295
  */
296
  protected function log_rotate( $handle ) {
297
  for ( $i = 8; $i >= 0; $i-- ) {
303
  /**
304
  * Increment a log file suffix.
305
  *
306
+ * @param string $handle Log handle.
307
  * @param null|int $number Optional. Default null. Log suffix number to be incremented.
308
  * @return bool True if increment was successful, otherwise false.
309
  */
310
  protected function increment_log_infix( $handle, $number = null ) {
311
  if ( null === $number ) {
312
+ $suffix = '';
313
  $next_suffix = '.0';
314
  } else {
315
+ $suffix = '.' . $number;
316
+ $next_suffix = '.' . ( $number + 1 );
317
  }
318
 
319
  $rename_from = self::get_log_file_path( "{$handle}{$suffix}" );
320
+ $rename_to = self::get_log_file_path( "{$handle}{$next_suffix}" );
321
 
322
  if ( $this->is_open( $rename_from ) ) {
323
  $this->close( $rename_from );
324
  }
325
 
326
+ if ( is_writable( $rename_from ) ) { // phpcs:ignore WordPress.VIP.FileSystemWritesDisallow.file_ops_is_writable
327
+ return rename( $rename_from, $rename_to ); // phpcs:ignore WordPress.VIP.FileSystemWritesDisallow.file_ops_rename
328
  } else {
329
  return false;
330
  }
348
  /**
349
  * Get a log file name.
350
  *
351
+ * File names consist of the handle, followed by the date, followed by a hash, .log.
352
+ *
353
  * @since 3.3
354
  * @param string $handle Log name.
355
  * @return bool|string The log file name or false if cannot be determined.
356
  */
357
  public static function get_log_file_name( $handle ) {
358
  if ( function_exists( 'wp_hash' ) ) {
359
+ $date_suffix = date( 'Y-m-d', time() ); // phpcs:ignore WordPress.DateTime.RestrictedFunctions.date_date
360
+ $hash_suffix = wp_hash( $handle );
361
+ return sanitize_file_name( implode( '-', array( $handle, $date_suffix, $hash_suffix ) ) . '.log' );
362
  } else {
363
  evf_doing_it_wrong( __METHOD__, __( 'This method should not be called before plugins_loaded.', 'everest-forms' ), '1.2' );
364
  return false;
368
  /**
369
  * Cache log to write later.
370
  *
371
+ * @param string $entry Log entry text.
372
+ * @param string $handle Log entry handle.
373
  */
374
  protected function cache_log( $entry, $handle ) {
375
  $this->cached_logs[] = array(
376
+ 'entry' => $entry,
377
  'handle' => $handle,
378
  );
379
  }
386
  $this->add( $log['entry'], $log['handle'] );
387
  }
388
  }
389
+
390
+ /**
391
+ * Delete all logs older than a defined timestamp.
392
+ *
393
+ * @since 1.6.2
394
+ * @param integer $timestamp Timestamp to delete logs before.
395
+ */
396
+ public static function delete_logs_before_timestamp( $timestamp = 0 ) {
397
+ if ( ! $timestamp ) {
398
+ return;
399
+ }
400
+
401
+ $log_files = self::get_log_files();
402
+
403
+ foreach ( $log_files as $log_file ) {
404
+ $last_modified = filemtime( trailingslashit( EVF_LOG_DIR ) . $log_file );
405
+
406
+ if ( $last_modified < $timestamp ) {
407
+ @unlink( trailingslashit( EVF_LOG_DIR ) . $log_file ); // @codingStandardsIgnoreLine.
408
+ }
409
+ }
410
+ }
411
+
412
+ /**
413
+ * Get all log files in the log directory.
414
+ *
415
+ * @since 1.6.2
416
+ * @return array
417
+ */
418
+ public static function get_log_files() {
419
+ $files = @scandir( EVF_LOG_DIR ); // @codingStandardsIgnoreLine.
420
+ $result = array();
421
+
422
+ if ( ! empty( $files ) ) {
423
+ foreach ( $files as $key => $value ) {
424
+ if ( ! in_array( $value, array( '.', '..' ), true ) ) {
425
+ if ( ! is_dir( $value ) && strstr( $value, '.log' ) ) {
426
+ $result[ sanitize_title( $value ) ] = $value;
427
+ }
428
+ }
429
+ }
430
+ }
431
+
432
+ return $result;
433
+ }
434
  }
includes/shortcodes/class-evf-shortcode-form.php CHANGED
@@ -89,7 +89,7 @@ class EVF_Shortcode_Form {
89
 
90
  echo '<div class="evf-submit-container ' . esc_attr( implode( ' ', $visibility_class ) ) . '" >';
91
 
92
- echo '<input type="hidden" name="everest_forms[id]" value="' . $form_id . '">';
93
 
94
  echo '<input type="hidden" name="everest_forms[author]" value="' . absint( get_the_author_meta( 'ID' ) ) . '">';
95
 
@@ -101,13 +101,13 @@ class EVF_Shortcode_Form {
101
 
102
  printf(
103
  "<button type='submit' name='everest_forms[submit]' class='everest-forms-submit-button button evf-submit %s' id='evf-submit-%d' value='evf-submit' %s conditional_rules='%s' conditional_id='%s' %s>%s</button>",
104
- $classes,
105
- $form_id,
106
- $process,
107
- $conditional_rules,
108
- $conditional_id,
109
- $visible,
110
- $submit_btn
111
  );
112
 
113
  do_action( 'everest_forms_display_submit_after', $form_data );
@@ -116,11 +116,12 @@ class EVF_Shortcode_Form {
116
  }
117
 
118
  /**
119
- * @param $field
120
- * @param $form_data
 
 
121
  */
122
  public static function messages( $field, $form_data ) {
123
-
124
  $error = $field['properties']['error'];
125
 
126
  if ( empty( $error['value'] ) || is_array( $error['value'] ) ) {
@@ -134,8 +135,13 @@ class EVF_Shortcode_Form {
134
  );
135
  }
136
 
 
 
 
 
 
 
137
  public static function description( $field, $form_data ) {
138
-
139
  $action = current_action();
140
 
141
  $description = $field['properties']['description'];
@@ -160,10 +166,16 @@ class EVF_Shortcode_Form {
160
  printf(
161
  '<div %s>%s</div>',
162
  evf_html_attributes( $description['id'], $description['class'], $description['data'], $description['attr'] ),
163
- evf_string_translation( $form_data['id'], $field['id'], $description['value'] )
164
  );
165
  }
166
 
 
 
 
 
 
 
167
  public static function label( $field, $form_data ) {
168
  $label = $field['properties']['label'];
169
 
@@ -178,23 +190,27 @@ class EVF_Shortcode_Form {
178
  printf(
179
  '<label %s><span class="evf-label">%s</span> %s</label>',
180
  evf_html_attributes( $label['id'], $label['class'], $label['data'], $label['attr'] ),
181
- evf_string_translation( $form_data['id'], $field['id'], esc_html( $label['value'] ) ),
182
- $required,
183
- $custom_tags
184
  );
185
  }
186
 
187
  /**
188
- * @param $field
189
- * @param $form_data
 
 
190
  */
191
  public static function wrapper_end( $field, $form_data ) {
192
  echo '</div>';
193
  }
194
 
195
  /**
196
- * @param $field
197
- * @param $form_data
 
 
198
  */
199
  public static function wrapper_start( $field, $form_data ) {
200
  $container = $field['properties']['container'];
@@ -271,7 +287,7 @@ class EVF_Shortcode_Form {
271
  */
272
  do_action( 'everest_forms_display_row_before', $row_key, $form_data );
273
 
274
- echo '<div class="evf-frontend-row" data-row="' . $row_key . '">';
275
 
276
  foreach ( $row as $grid_key => $grid ) {
277
  $number_of_grid = count( $row );
@@ -286,7 +302,7 @@ class EVF_Shortcode_Form {
286
  $field = isset( $form_data['form_fields'][ $field_key ] ) ? $form_data['form_fields'][ $field_key ] : array();
287
  $field = apply_filters( 'everest_forms_field_data', $field, $form_data );
288
 
289
- if ( empty( $field ) || in_array( $field['type'], EVF()->form_fields->get_pro_form_field_types(), true ) ) {
290
  continue;
291
  }
292
 
@@ -407,7 +423,7 @@ class EVF_Shortcode_Form {
407
 
408
  // Load reCaptcha callback once.
409
  static $count = 1;
410
- if ( $count === 1 ) {
411
  wp_add_inline_script( 'evf-recaptcha', $recaptcha_inline );
412
  $count++;
413
  }
@@ -416,13 +432,13 @@ class EVF_Shortcode_Form {
416
  // Output the reCAPTCHA container.
417
  $data['size'] = 'invisible';
418
  $data['sitekey'] = $site_key;
419
- echo '<div class="evf-recaptcha-container recaptcha-hidden" ' . $visible . '>';
420
  echo '<div ' . evf_html_attributes( '', array( 'g-recaptcha' ), $data ) . '></div>';
421
  echo '</div>';
422
  } else {
423
  // Output the reCAPTCHA container.
424
  $class = 'v3' === $recaptcha_type ? 'recaptcha-hidden' : '';
425
- echo '<div class="evf-recaptcha-container ' . $class . '" ' . $visible . '>';
426
  echo '<div ' . evf_html_attributes( '', array( 'g-recaptcha' ), $data ) . '></div>';
427
  echo '<input type="text" name="g-recaptcha-hidden" class="evf-recaptcha-hidden" style="position:absolute!important;clip:rect(0,0,0,0)!important;height:1px!important;width:1px!important;border:0!important;overflow:hidden!important;padding:0!important;margin:0!important;" required>';
428
  echo '</div>';
@@ -432,8 +448,10 @@ class EVF_Shortcode_Form {
432
  }
433
 
434
  /**
435
- * @param $field
436
- * @param $form_data
 
 
437
  *
438
  * @return array
439
  */
@@ -507,9 +525,9 @@ class EVF_Shortcode_Form {
507
  /**
508
  * Return base properties for a specific field.
509
  *
510
- * @param array $field
511
- * @param array $form_data
512
- * @param array $attributes
513
  *
514
  * @return array
515
  */
@@ -565,7 +583,7 @@ class EVF_Shortcode_Form {
565
  $container_data['required-field-message'] = isset( $field['required-field-message'] ) && '' !== $field['required-field-message'] ? $field['required-field-message'] : $required_validation;
566
  }
567
  }
568
-
569
  $properties = apply_filters(
570
  'everest_forms_field_properties_' . $field['type'],
571
  array(
@@ -593,7 +611,7 @@ class EVF_Shortcode_Form {
593
  'primary' => array(
594
  'attr' => array(
595
  'name' => "everest_forms[form_fields][{$field_id}]",
596
- 'value' => ( isset( $field['default_value'] ) && ! empty( $field['default_value'] ) ) ? apply_filters( 'everest_forms_process_smart_tags', $field['default_value'], $form_data ) : ( isset( $_POST['everest_forms']['form_fields'][ $field_id ] ) ? $_POST['everest_forms']['form_fields'][ $field_id ] : '' ),
597
  'placeholder' => ! empty( $field['placeholder'] ) ? evf_string_translation( $form_data['id'], $field['id'], $field['placeholder'] ) : '',
598
  ),
599
  'class' => $attributes['input_class'],
@@ -609,7 +627,7 @@ class EVF_Shortcode_Form {
609
  'class' => array( 'evf-error' ),
610
  'data' => array(),
611
  'id' => '',
612
- 'value' => ! empty( EVF()->task->errors[ $form_id ][ $field_id ] ) ? EVF()->task->errors[ $form_id ][ $field_id ] : '',
613
  ),
614
  'description' => array(
615
  'attr' => array(),
@@ -677,7 +695,7 @@ class EVF_Shortcode_Form {
677
  }
678
 
679
  // Grab the form data, if not found then we bail.
680
- $form = EVF()->form->get( (int) $id );
681
 
682
  if ( empty( $form ) || 'publish' !== $form->post_status ) {
683
  return;
89
 
90
  echo '<div class="evf-submit-container ' . esc_attr( implode( ' ', $visibility_class ) ) . '" >';
91
 
92
+ echo '<input type="hidden" name="everest_forms[id]" value="' . absint( $form_id ) . '">';
93
 
94
  echo '<input type="hidden" name="everest_forms[author]" value="' . absint( get_the_author_meta( 'ID' ) ) . '">';
95
 
101
 
102
  printf(
103
  "<button type='submit' name='everest_forms[submit]' class='everest-forms-submit-button button evf-submit %s' id='evf-submit-%d' value='evf-submit' %s conditional_rules='%s' conditional_id='%s' %s>%s</button>",
104
+ $classes, // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
105
+ $form_id, // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
106
+ $process, // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
107
+ $conditional_rules, // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
108
+ $conditional_id, // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
109
+ $visible, // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
110
+ $submit_btn // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
111
  );
112
 
113
  do_action( 'everest_forms_display_submit_after', $form_data );
116
  }
117
 
118
  /**
119
+ * Message.
120
+ *
121
+ * @param array $field Field.
122
+ * @param array $form_data Form data.
123
  */
124
  public static function messages( $field, $form_data ) {
 
125
  $error = $field['properties']['error'];
126
 
127
  if ( empty( $error['value'] ) || is_array( $error['value'] ) ) {
135
  );
136
  }
137
 
138
+ /**
139
+ * Description.
140
+ *
141
+ * @param array $field Field.
142
+ * @param array $form_data Form data.
143
+ */
144
  public static function description( $field, $form_data ) {
 
145
  $action = current_action();
146
 
147
  $description = $field['properties']['description'];
166
  printf(
167
  '<div %s>%s</div>',
168
  evf_html_attributes( $description['id'], $description['class'], $description['data'], $description['attr'] ),
169
+ evf_string_translation( $form_data['id'], $field['id'], $description['value'] ) // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
170
  );
171
  }
172
 
173
+ /**
174
+ * Label.
175
+ *
176
+ * @param array $field Field.
177
+ * @param array $form_data Form data.
178
+ */
179
  public static function label( $field, $form_data ) {
180
  $label = $field['properties']['label'];
181
 
190
  printf(
191
  '<label %s><span class="evf-label">%s</span> %s</label>',
192
  evf_html_attributes( $label['id'], $label['class'], $label['data'], $label['attr'] ),
193
+ evf_string_translation( $form_data['id'], $field['id'], esc_html( $label['value'] ) ), // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
194
+ $required, // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
195
+ $custom_tags // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
196
  );
197
  }
198
 
199
  /**
200
+ * Wrapper end.
201
+ *
202
+ * @param array $field Field.
203
+ * @param array $form_data Form data.
204
  */
205
  public static function wrapper_end( $field, $form_data ) {
206
  echo '</div>';
207
  }
208
 
209
  /**
210
+ * Wrapper start.
211
+ *
212
+ * @param array $field Field.
213
+ * @param array $form_data Form data.
214
  */
215
  public static function wrapper_start( $field, $form_data ) {
216
  $container = $field['properties']['container'];
287
  */
288
  do_action( 'everest_forms_display_row_before', $row_key, $form_data );
289
 
290
+ echo '<div class="evf-frontend-row" data-row="' . esc_attr( $row_key ) . '">';
291
 
292
  foreach ( $row as $grid_key => $grid ) {
293
  $number_of_grid = count( $row );
302
  $field = isset( $form_data['form_fields'][ $field_key ] ) ? $form_data['form_fields'][ $field_key ] : array();
303
  $field = apply_filters( 'everest_forms_field_data', $field, $form_data );
304
 
305
+ if ( empty( $field ) || in_array( $field['type'], evf()->form_fields->get_pro_form_field_types(), true ) ) {
306
  continue;
307
  }
308
 
423
 
424
  // Load reCaptcha callback once.
425
  static $count = 1;
426
+ if ( 1 === $count ) {
427
  wp_add_inline_script( 'evf-recaptcha', $recaptcha_inline );
428
  $count++;
429
  }
432
  // Output the reCAPTCHA container.
433
  $data['size'] = 'invisible';
434
  $data['sitekey'] = $site_key;
435
+ echo '<div class="evf-recaptcha-container recaptcha-hidden" ' . $visible . '>'; // @codingStandardsIgnoreLine
436
  echo '<div ' . evf_html_attributes( '', array( 'g-recaptcha' ), $data ) . '></div>';
437
  echo '</div>';
438
  } else {
439
  // Output the reCAPTCHA container.
440
  $class = 'v3' === $recaptcha_type ? 'recaptcha-hidden' : '';
441
+ echo '<div class="evf-recaptcha-container ' . $class . '" ' . $visible . '>'; // @codingStandardsIgnoreLine
442
  echo '<div ' . evf_html_attributes( '', array( 'g-recaptcha' ), $data ) . '></div>';
443
  echo '<input type="text" name="g-recaptcha-hidden" class="evf-recaptcha-hidden" style="position:absolute!important;clip:rect(0,0,0,0)!important;height:1px!important;width:1px!important;border:0!important;overflow:hidden!important;padding:0!important;margin:0!important;" required>';
444
  echo '</div>';
448
  }
449
 
450
  /**
451
+ * Get field attributes.
452
+ *
453
+ * @param array $field Field.
454
+ * @param array $form_data Form data.
455
  *
456
  * @return array
457
  */
525
  /**
526
  * Return base properties for a specific field.
527
  *
528
+ * @param array $field Field data and settings.
529
+ * @param array $form_data Form data and settings.
530
+ * @param array $attributes List of field attributes.
531
  *
532
  * @return array
533
  */
583
  $container_data['required-field-message'] = isset( $field['required-field-message'] ) && '' !== $field['required-field-message'] ? $field['required-field-message'] : $required_validation;
584
  }
585
  }
586
+ $errors = isset( evf()->task->errors[ $form_id ][ $field_id ] ) ? evf()->task->errors[ $form_id ][ $field_id ] : '';
587
  $properties = apply_filters(
588
  'everest_forms_field_properties_' . $field['type'],
589
  array(
611
  'primary' => array(
612
  'attr' => array(
613
  'name' => "everest_forms[form_fields][{$field_id}]",
614
+ 'value' => ( isset( $field['default_value'] ) && ! empty( $field['default_value'] ) ) ? apply_filters( 'everest_forms_process_smart_tags', $field['default_value'], $form_data ) : ( isset( $_POST['everest_forms']['form_fields'][ $field_id ] ) ? $_POST['everest_forms']['form_fields'][ $field_id ] : '' ), // @codingStandardsIgnoreLine
615
  'placeholder' => ! empty( $field['placeholder'] ) ? evf_string_translation( $form_data['id'], $field['id'], $field['placeholder'] ) : '',
616
  ),
617
  'class' => $attributes['input_class'],
627
  'class' => array( 'evf-error' ),
628
  'data' => array(),
629
  'id' => '',
630
+ 'value' => ! empty( $errors ) ? $errors : '',
631
  ),
632
  'description' => array(
633
  'attr' => array(),
695
  }
696
 
697
  // Grab the form data, if not found then we bail.
698
+ $form = evf()->form->get( (int) $id );
699
 
700
  if ( empty( $form ) || 'publish' !== $form->post_status ) {
701
  return;
includes/templates/contact.php CHANGED
@@ -73,7 +73,8 @@ $form_template['contact'] = array(
73
  'evf_from_name' => get_bloginfo( 'name', 'display' ),
74
  'evf_from_email' => '{admin_email}',
75
  'evf_reply_to' => '{field_id="email"}',
76
- 'evf_email_subject' => sprintf( __( 'New Form Entry %s', 'everest-forms' ), $form_name ),
 
77
  'evf_email_message' => '{all_fields}',
78
  ),
79
  ),
73
  'evf_from_name' => get_bloginfo( 'name', 'display' ),
74
  'evf_from_email' => '{admin_email}',
75
  'evf_reply_to' => '{field_id="email"}',
76
+ /* translators: %s: Form Name */
77
+ 'evf_email_subject' => sprintf( esc_html__( 'New Form Entry %s', 'everest-forms' ), $form_name ),
78
  'evf_email_message' => '{all_fields}',
79
  ),
80
  ),
languages/everest-forms.pot CHANGED
@@ -2,9 +2,9 @@
2
  # This file is distributed under the same license as the Everest Forms package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: Everest Forms 1.6.1\n"
6
  "Report-Msgid-Bugs-To: https://github.com/wpeverest/everest-forms/issues\n"
7
- "POT-Creation-Date: 2020-02-13 04:50:31+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=utf-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
@@ -27,34 +27,34 @@ msgid "Off"
27
  msgstr ""
28
 
29
  #: includes/abstracts/class-evf-form-fields.php:361
30
- #: includes/evf-core-functions.php:1837
31
  msgid ""
32
  "Enter text for the form field label. This is recommended and can be hidden "
33
  "in the Advanced Settings."
34
  msgstr ""
35
 
36
  #: includes/abstracts/class-evf-form-fields.php:367
37
- #: includes/evf-core-functions.php:1836
38
  msgid "Label"
39
  msgstr ""
40
 
41
  #: includes/abstracts/class-evf-form-fields.php:397
42
- #: includes/evf-core-functions.php:1845
43
  msgid "Enter meta key to be stored in database."
44
  msgstr ""
45
 
46
  #: includes/abstracts/class-evf-form-fields.php:403
47
- #: includes/evf-core-functions.php:1844
48
  msgid "Meta Key"
49
  msgstr ""
50
 
51
  #: includes/abstracts/class-evf-form-fields.php:434
52
- #: includes/evf-core-functions.php:1854
53
  msgid "Enter text for the form field description."
54
  msgstr ""
55
 
56
  #: includes/abstracts/class-evf-form-fields.php:440
57
- #: includes/evf-core-functions.php:1852
58
  msgid "Description"
59
  msgstr ""
60
 
@@ -66,8 +66,8 @@ msgstr ""
66
 
67
  #: includes/abstracts/class-evf-form-fields.php:478
68
  #: includes/admin/settings/class-evf-settings-validation.php:46
69
- #: includes/evf-core-functions.php:1860
70
- #: includes/shortcodes/class-evf-shortcode-form.php:175
71
  msgid "Required"
72
  msgstr ""
73
 
@@ -125,172 +125,173 @@ msgstr ""
125
  msgid "Required Field Message"
126
  msgstr ""
127
 
128
- #: includes/abstracts/class-evf-form-fields.php:657
129
  msgid "Enter code for the form field."
130
  msgstr ""
131
 
132
- #: includes/abstracts/class-evf-form-fields.php:663
133
  msgid "Code"
134
  msgstr ""
135
 
136
- #: includes/abstracts/class-evf-form-fields.php:693
137
- #: includes/evf-core-functions.php:1868
138
  msgid "Choices"
139
  msgstr ""
140
 
141
- #: includes/abstracts/class-evf-form-fields.php:711
142
- #: includes/evf-core-functions.php:1869
143
  msgid "Add choices for the form field."
144
  msgstr ""
145
 
146
- #: includes/abstracts/class-evf-form-fields.php:749
147
  msgid "Upload Image"
148
  msgstr ""
149
 
150
- #: includes/abstracts/class-evf-form-fields.php:756
 
151
  msgid "Remove"
152
  msgstr ""
153
 
154
- #: includes/abstracts/class-evf-form-fields.php:757
155
  msgid "Change image"
156
  msgstr ""
157
 
158
- #: includes/abstracts/class-evf-form-fields.php:783
159
  msgid ""
160
  "For best results, images should be square and at least 200 × 160 pixels or "
161
  "smaller."
162
  msgstr ""
163
 
164
- #: includes/abstracts/class-evf-form-fields.php:792
165
  msgid "Use image choices"
166
  msgstr ""
167
 
168
- #: includes/abstracts/class-evf-form-fields.php:793
169
  msgid "Check this option to enable using images with the choices."
170
  msgstr ""
171
 
172
- #: includes/abstracts/class-evf-form-fields.php:819
173
  msgid "Enter text for the default form field value."
174
  msgstr ""
175
 
176
- #: includes/abstracts/class-evf-form-fields.php:826
177
  msgid "Default Value"
178
  msgstr ""
179
 
180
- #: includes/abstracts/class-evf-form-fields.php:869
181
  msgid "Advanced Options"
182
  msgstr ""
183
 
184
- #: includes/abstracts/class-evf-form-fields.php:881
185
- #: includes/evf-core-functions.php:1881
186
  msgid "Enter text for the form field placeholder."
187
  msgstr ""
188
 
189
- #: includes/abstracts/class-evf-form-fields.php:887
190
- #: includes/evf-core-functions.php:1880
191
  msgid "Placeholder Text"
192
  msgstr ""
193
 
194
- #: includes/abstracts/class-evf-form-fields.php:917
195
  msgid ""
196
  "Enter CSS class names for this field container. Multiple class names should "
197
  "be separated with spaces."
198
  msgstr ""
199
 
200
- #: includes/abstracts/class-evf-form-fields.php:926
201
- #: includes/evf-core-functions.php:1888
202
  msgid "CSS Classes"
203
  msgstr ""
204
 
205
- #: includes/abstracts/class-evf-form-fields.php:957
206
- #: includes/evf-core-functions.php:1898
207
  msgid "Check this option to hide the form field label."
208
  msgstr ""
209
 
210
- #: includes/abstracts/class-evf-form-fields.php:966
211
- #: includes/evf-core-functions.php:1896
212
  msgid "Hide Label"
213
  msgstr ""
214
 
215
- #: includes/abstracts/class-evf-form-fields.php:987
216
- #: includes/evf-core-functions.php:1906
217
  msgid "Check this option to hide the form field sub-label."
218
  msgstr ""
219
 
220
- #: includes/abstracts/class-evf-form-fields.php:996
221
- #: includes/evf-core-functions.php:1904
222
  msgid "Hide Sub-Labels"
223
  msgstr ""
224
 
225
- #: includes/abstracts/class-evf-form-fields.php:1017
226
  msgid "Select the column layout for displaying field choices."
227
  msgstr ""
228
 
229
- #: includes/abstracts/class-evf-form-fields.php:1019
230
  msgid "One Column"
231
  msgstr ""
232
 
233
- #: includes/abstracts/class-evf-form-fields.php:1020
234
  msgid "Two Columns"
235
  msgstr ""
236
 
237
- #: includes/abstracts/class-evf-form-fields.php:1021
238
  msgid "Three Columns"
239
  msgstr ""
240
 
241
- #: includes/abstracts/class-evf-form-fields.php:1022
242
  msgid "Inline"
243
  msgstr ""
244
 
245
- #: includes/abstracts/class-evf-form-fields.php:1031
246
  msgid "Layout"
247
  msgstr ""
248
 
249
- #: includes/abstracts/class-evf-form-fields.php:1132
250
  #: includes/class-evf-emails.php:445 includes/class-evf-emails.php:471
251
  #: includes/class-evf-emails.php:516
252
  msgid "(empty)"
253
  msgstr ""
254
 
255
- #: includes/abstracts/class-evf-form-fields.php:1237
256
  msgid "You do no have permission."
257
  msgstr ""
258
 
259
- #: includes/abstracts/class-evf-form-fields.php:1242
260
  msgid "No form ID found"
261
  msgstr ""
262
 
263
- #: includes/abstracts/class-evf-form-fields.php:1247
264
  msgid "No field type found"
265
  msgstr ""
266
 
267
- #: includes/abstracts/class-evf-form-fields.php:1276
268
  #: includes/admin/builder/class-evf-builder-fields.php:317
269
  msgid "Duplicate Field"
270
  msgstr ""
271
 
272
- #: includes/abstracts/class-evf-form-fields.php:1277
273
  #: includes/admin/builder/class-evf-builder-fields.php:318
274
  msgid "Delete Field"
275
  msgstr ""
276
 
277
- #: includes/abstracts/class-evf-form-fields.php:1278
278
  #: includes/admin/builder/class-evf-builder-fields.php:319
279
  #: includes/admin/builder/class-evf-builder-settings.php:25
280
  #: includes/admin/class-evf-admin-menus.php:165
281
- #: includes/class-evf-install.php:635
282
  msgid "Settings"
283
  msgstr ""
284
 
285
- #: includes/abstracts/class-evf-form-fields.php:1394
286
  msgid "Please enter a valid url"
287
  msgstr ""
288
 
289
- #: includes/abstracts/class-evf-form-fields.php:1404
290
  msgid "Please enter a valid email address"
291
  msgstr ""
292
 
293
- #: includes/abstracts/class-evf-form-fields.php:1409
294
  msgid "Please enter a valid number"
295
  msgstr ""
296
 
@@ -330,14 +331,18 @@ msgstr ""
330
  msgid "Select the type of row"
331
  msgstr ""
332
 
 
 
 
 
333
  #: includes/admin/builder/class-evf-builder-settings.php:40
334
- #: includes/admin/builder/class-evf-builder-settings.php:130
335
  #: includes/admin/settings/class-evf-settings-general.php:25
336
  msgid "General"
337
  msgstr ""
338
 
339
  #: includes/admin/builder/class-evf-builder-settings.php:41
340
- #: includes/admin/builder/class-evf-builder-settings.php:380
341
  #: includes/admin/settings/class-evf-settings-email.php:25
342
  #: includes/admin/settings/class-evf-settings-validation.php:64
343
  #: includes/fields/class-evf-field-email.php:20
@@ -347,9 +352,9 @@ msgid "Email"
347
  msgstr ""
348
 
349
  #: includes/admin/builder/class-evf-builder-settings.php:77
350
- #: includes/admin/builder/class-evf-builder-settings.php:351
351
- #: includes/admin/builder/class-evf-builder-settings.php:406
352
- #: includes/class-evf-form-task.php:513 includes/evf-update-functions.php:140
353
  #: includes/templates/contact.php:71
354
  msgid "Admin Notification"
355
  msgstr ""
@@ -362,268 +367,269 @@ msgstr ""
362
  msgid "Email Notifications"
363
  msgstr ""
364
 
365
- #: includes/admin/builder/class-evf-builder-settings.php:137
366
- #: includes/class-evf-smart-tags.php:39
367
  msgid "Form Name"
368
  msgstr ""
369
 
370
- #: includes/admin/builder/class-evf-builder-settings.php:140
371
  msgid "Give a name to this form"
372
  msgstr ""
373
 
374
- #: includes/admin/builder/class-evf-builder-settings.php:148
375
  msgid "Form description"
376
  msgstr ""
377
 
378
- #: includes/admin/builder/class-evf-builder-settings.php:152
379
  msgid "Give the description to this form"
380
  msgstr ""
381
 
382
- #: includes/admin/builder/class-evf-builder-settings.php:160
383
  msgid "Form disabled message"
384
  msgstr ""
385
 
386
- #: includes/admin/builder/class-evf-builder-settings.php:163
387
- #: includes/shortcodes/class-evf-shortcode-form.php:695
388
  msgid "This form is disabled."
389
  msgstr ""
390
 
391
- #: includes/admin/builder/class-evf-builder-settings.php:164
392
  msgid "Message that shows up if the form is disabled."
393
  msgstr ""
394
 
395
- #: includes/admin/builder/class-evf-builder-settings.php:172
396
  msgid "Successful form submission message"
397
  msgstr ""
398
 
399
- #: includes/admin/builder/class-evf-builder-settings.php:175
400
  msgid "Thanks for contacting us! We will be in touch with you shortly"
401
  msgstr ""
402
 
403
- #: includes/admin/builder/class-evf-builder-settings.php:177
404
  #. translators: %1$s - general settings docs url
405
  msgid ""
406
  "Success message that shows up after submitting form. <a href=\"%1$s\" "
407
  "target=\"_blank\">Learn More</a>"
408
  msgstr ""
409
 
410
- #: includes/admin/builder/class-evf-builder-settings.php:185
411
  msgid "Automatically scroll to the submission message"
412
  msgstr ""
413
 
414
- #: includes/admin/builder/class-evf-builder-settings.php:195
415
  msgid "Redirect To"
416
  msgstr ""
417
 
418
- #: includes/admin/builder/class-evf-builder-settings.php:199
419
  #. translators: %1$s - general settings docs url
420
  msgid ""
421
  "Choose where to redirect after form submission. <a href=\"%s\" "
422
  "target=\"_blank\">Learn More</a>"
423
  msgstr ""
424
 
425
- #: includes/admin/builder/class-evf-builder-settings.php:201
426
  msgid "Same Page"
427
  msgstr ""
428
 
429
- #: includes/admin/builder/class-evf-builder-settings.php:202
430
- #: includes/admin/builder/class-evf-builder-settings.php:212
431
  msgid "Custom Page"
432
  msgstr ""
433
 
434
- #: includes/admin/builder/class-evf-builder-settings.php:203
435
- #: includes/admin/builder/class-evf-builder-settings.php:223
436
  msgid "External URL"
437
  msgstr ""
438
 
439
- #: includes/admin/builder/class-evf-builder-settings.php:233
440
  msgid "Layout Design"
441
  msgstr ""
442
 
443
- #: includes/admin/builder/class-evf-builder-settings.php:236
444
  msgid "Choose design template for the Form"
445
  msgstr ""
446
 
447
- #: includes/admin/builder/class-evf-builder-settings.php:238
448
  msgid "Default"
449
  msgstr ""
450
 
451
- #: includes/admin/builder/class-evf-builder-settings.php:239
452
  msgid "Classic Layout"
453
  msgstr ""
454
 
455
- #: includes/admin/builder/class-evf-builder-settings.php:248
456
  msgid "Form Class"
457
  msgstr ""
458
 
459
- #: includes/admin/builder/class-evf-builder-settings.php:252
460
  #. translators: %1$s - general settings docs url
461
  msgid ""
462
  "Enter CSS class names for the form wrapper. Multiple class names should be "
463
  "separated with spaces. <a href=\"%s\" target=\"_blank\">Learn More</a>"
464
  msgstr ""
465
 
466
- #: includes/admin/builder/class-evf-builder-settings.php:255
467
  msgid "Submit Button"
468
  msgstr ""
469
 
470
- #: includes/admin/builder/class-evf-builder-settings.php:261
471
  msgid "Submit button text"
472
  msgstr ""
473
 
474
- #: includes/admin/builder/class-evf-builder-settings.php:263
475
- #: includes/class-evf-frontend-scripts.php:283
476
- #: includes/class-evf-frontend-scripts.php:309
477
  #: includes/shortcodes/class-evf-shortcode-form.php:60
478
  #: includes/templates/contact.php:67
479
  msgid "Submit"
480
  msgstr ""
481
 
482
- #: includes/admin/builder/class-evf-builder-settings.php:264
483
  msgid "Enter desired text for submit button."
484
  msgstr ""
485
 
486
- #: includes/admin/builder/class-evf-builder-settings.php:272
487
  msgid "Submit button processing text"
488
  msgstr ""
489
 
490
- #: includes/admin/builder/class-evf-builder-settings.php:274
491
  #: includes/shortcodes/class-evf-shortcode-form.php:72
492
  msgid "Processing&hellip;"
493
  msgstr ""
494
 
495
- #: includes/admin/builder/class-evf-builder-settings.php:275
496
  msgid ""
497
  "Enter the submit button text that you would like the button to display "
498
  "while the form submission is processing."
499
  msgstr ""
500
 
501
- #: includes/admin/builder/class-evf-builder-settings.php:283
502
  msgid "Submit button class"
503
  msgstr ""
504
 
505
- #: includes/admin/builder/class-evf-builder-settings.php:286
506
  msgid ""
507
  "Enter CSS class names for submit button. Multiple class names should be "
508
  "separated with spaces."
509
  msgstr ""
510
 
511
- #: includes/admin/builder/class-evf-builder-settings.php:296
512
  msgid "Enable anti-spam honeypot"
513
  msgstr ""
514
 
515
- #: includes/admin/builder/class-evf-builder-settings.php:310
516
  msgid "Enable Google reCAPTCHA v3"
517
  msgstr ""
518
 
519
- #: includes/admin/builder/class-evf-builder-settings.php:310
520
  msgid "Enable Google Invisible reCAPTCHA v2"
521
  msgstr ""
522
 
523
- #: includes/admin/builder/class-evf-builder-settings.php:310
524
  msgid "Enable Google Checkbox reCAPTCHA v2"
525
  msgstr ""
526
 
527
- #: includes/admin/builder/class-evf-builder-settings.php:314
528
  #. translators: %1$s - general settings docs url
529
  msgid ""
530
  "Enable Google reCaptcha. Make sure the site key and secret key is set in "
531
  "settings page. <a href=\"%s\" target=\"_blank\">Learn More</a>"
532
  msgstr ""
533
 
534
- #: includes/admin/builder/class-evf-builder-settings.php:323
535
  msgid "Enable Ajax Form Submission"
536
  msgstr ""
537
 
538
- #: includes/admin/builder/class-evf-builder-settings.php:326
539
  msgid "Enables form submission without reloading the page."
540
  msgstr ""
541
 
542
- #: includes/admin/builder/class-evf-builder-settings.php:334
543
  msgid "Disable storing entry information"
544
  msgstr ""
545
 
546
- #: includes/admin/builder/class-evf-builder-settings.php:338
547
  #. translators: %1$s - general settings docs url
548
  msgid ""
549
  "Disable storing form entries. <a href=\"%1$s\" target=\"_blank\">Learn "
550
  "More</a>"
551
  msgstr ""
552
 
553
- #: includes/admin/builder/class-evf-builder-settings.php:356
554
  #: includes/admin/builder/class-evf-builder-settings.php:528
555
- #: includes/templates/contact.php:76
 
556
  msgid "New Form Entry %s"
557
  msgstr ""
558
 
559
- #: includes/admin/builder/class-evf-builder-settings.php:367
560
  #: includes/evf-update-functions.php:156
561
  msgid "User Notification"
562
  msgstr ""
563
 
564
- #: includes/admin/builder/class-evf-builder-settings.php:392
565
  #: includes/admin/class-evf-admin-assets.php:145
566
  msgid "Turn on Email settings to manage your email notifications."
567
  msgstr ""
568
 
569
- #: includes/admin/builder/class-evf-builder-settings.php:418
570
  msgid "To Address"
571
  msgstr ""
572
 
573
- #: includes/admin/builder/class-evf-builder-settings.php:422
574
  #. translators: %1$s - general settings docs url
575
  msgid ""
576
  "Enter the recipient's email address (comma separated) to receive form entry "
577
  "notifications. <a href=\"%s\" target=\"_blank\">Learn More</a>"
578
  msgstr ""
579
 
580
- #: includes/admin/builder/class-evf-builder-settings.php:437
581
  msgid "Cc Address"
582
  msgstr ""
583
 
584
- #: includes/admin/builder/class-evf-builder-settings.php:440
585
  msgid ""
586
  "Enter Cc recipient's email address (comma separated) to receive form entry "
587
  "notifications."
588
  msgstr ""
589
 
590
- #: includes/admin/builder/class-evf-builder-settings.php:454
591
  msgid "Bcc Address"
592
  msgstr ""
593
 
594
- #: includes/admin/builder/class-evf-builder-settings.php:457
595
  msgid ""
596
  "Enter Bcc recipient's email address (comma separated) to receive form entry "
597
  "notifications."
598
  msgstr ""
599
 
600
- #: includes/admin/builder/class-evf-builder-settings.php:472
601
  msgid "From Name"
602
  msgstr ""
603
 
604
- #: includes/admin/builder/class-evf-builder-settings.php:476
605
  #. translators: %1$s - general settings docs url
606
  msgid ""
607
  "Enter the From Name to be displayed in Email. <a href=\"%1$s\" "
608
  "target=\"_blank\">Learn More</a>"
609
  msgstr ""
610
 
611
- #: includes/admin/builder/class-evf-builder-settings.php:490
612
  msgid "From Address"
613
  msgstr ""
614
 
615
- #: includes/admin/builder/class-evf-builder-settings.php:494
616
  #. translators: %1$s - general settings docs url
617
  msgid ""
618
  "Enter the Email address from which you want to send Email. <a href=\"%s\" "
619
  "target=\"_blank\">Learn More</a>"
620
  msgstr ""
621
 
622
- #: includes/admin/builder/class-evf-builder-settings.php:508
623
  msgid "Reply To"
624
  msgstr ""
625
 
626
- #: includes/admin/builder/class-evf-builder-settings.php:512
627
  #. translators: %1$s - general settings docs url
628
  msgid ""
629
  "Enter the reply to email address where you want the email to be received "
@@ -631,12 +637,12 @@ msgid ""
631
  "More</a>"
632
  msgstr ""
633
 
634
- #: includes/admin/builder/class-evf-builder-settings.php:526
635
  msgid "Email Subject"
636
  msgstr ""
637
 
638
  #: includes/admin/builder/class-evf-builder-settings.php:530
639
- #. translators: %1$s - general settings docs url
640
  msgid ""
641
  "Enter the subject of the email. <a href=\"%1$s\" target=\"_blank\">Learn "
642
  "More</a>"
@@ -840,7 +846,7 @@ msgid "You must provide a Form name"
840
  msgstr ""
841
 
842
  #: includes/admin/class-evf-admin-assets.php:232
843
- #: includes/admin/views/html-admin-page-addons.php:110
844
  msgid "Upgrade Plan"
845
  msgstr ""
846
 
@@ -910,7 +916,7 @@ msgid "Field"
910
  msgstr ""
911
 
912
  #: includes/admin/class-evf-admin-entries-table-list.php:297
913
- #: includes/admin/views/html-admin-page-entries-view.php:197
914
  #: includes/admin/views/html-admin-page-tools-logs.php:33
915
  msgid "View"
916
  msgstr ""
@@ -1053,7 +1059,7 @@ msgid "Date"
1053
  msgstr ""
1054
 
1055
  #: includes/admin/class-evf-admin-forms-table-list.php:116
1056
- #: includes/class-evf-post-types.php:48
1057
  msgid "Edit"
1058
  msgstr ""
1059
 
@@ -1092,7 +1098,7 @@ msgid "Y/m/d"
1092
  msgstr ""
1093
 
1094
  #: includes/admin/class-evf-admin-forms-table-list.php:371
1095
- #: includes/admin/views/html-admin-page-entries-view.php:214
1096
  msgid "Move to trash"
1097
  msgstr ""
1098
 
@@ -1111,53 +1117,53 @@ msgstr[0] ""
1111
  msgstr[1] ""
1112
 
1113
  #: includes/admin/class-evf-admin-forms-table-list.php:431
1114
- #: includes/admin/class-evf-admin-forms.php:223
1115
  #. translators: %d: number of forms
1116
  msgid "%d form permanently deleted."
1117
  msgid_plural "%d forms permanently deleted."
1118
  msgstr[0] ""
1119
  msgstr[1] ""
1120
 
1121
- #: includes/admin/class-evf-admin-forms.php:159
1122
  #: includes/admin/class-evf-admin-menus.php:93
1123
- #: includes/class-evf-post-types.php:44
1124
  msgid "All Forms"
1125
  msgstr ""
1126
 
1127
- #: includes/admin/class-evf-admin-forms.php:160
1128
  #: includes/admin/class-evf-admin-menus.php:95
1129
- #: includes/class-evf-post-types.php:46
1130
  msgid "Add New"
1131
  msgstr ""
1132
 
1133
- #: includes/admin/class-evf-admin-forms.php:169
1134
  msgid "Search Forms"
1135
  msgstr ""
1136
 
1137
- #: includes/admin/class-evf-admin-forms.php:233
1138
  msgid "No form to duplicate has been supplied!"
1139
  msgstr ""
1140
 
1141
- #: includes/admin/class-evf-admin-import-export.php:36
1142
  #: includes/admin/class-evf-admin-notices.php:118
1143
  #: includes/admin/class-evf-admin-tools.php:167
1144
  msgid "Action failed. Please refresh the page and retry."
1145
  msgstr ""
1146
 
1147
- #: includes/admin/class-evf-admin-import-export.php:127
1148
  msgid "Imported Successfully."
1149
  msgstr ""
1150
 
1151
- #: includes/admin/class-evf-admin-import-export.php:134
1152
- #: includes/admin/class-evf-admin-import-export.php:141
1153
  msgid "Invalid file content. Please export file from Everest Forms plugin."
1154
  msgstr ""
1155
 
1156
- #: includes/admin/class-evf-admin-import-export.php:148
1157
- msgid "Invalid file format. Only Json File Allowed."
1158
  msgstr ""
1159
 
1160
- #: includes/admin/class-evf-admin-import-export.php:155
1161
  msgid "Please select json file to import form data."
1162
  msgstr ""
1163
 
@@ -1210,26 +1216,26 @@ msgstr ""
1210
  msgid "The changes you made will be lost if you navigate away from this page."
1211
  msgstr ""
1212
 
1213
- #: includes/admin/class-evf-admin-settings.php:573
1214
  msgid "Select a page&hellip;"
1215
  msgstr ""
1216
 
1217
- #: includes/admin/class-evf-admin-settings.php:582
1218
  #: includes/evf-formatting-functions.php:604
1219
  msgid "Day(s)"
1220
  msgstr ""
1221
 
1222
- #: includes/admin/class-evf-admin-settings.php:583
1223
  #: includes/evf-formatting-functions.php:605
1224
  msgid "Week(s)"
1225
  msgstr ""
1226
 
1227
- #: includes/admin/class-evf-admin-settings.php:584
1228
  #: includes/evf-formatting-functions.php:606
1229
  msgid "Month(s)"
1230
  msgstr ""
1231
 
1232
- #: includes/admin/class-evf-admin-settings.php:585
1233
  #: includes/evf-formatting-functions.php:607
1234
  msgid "Year(s)"
1235
  msgstr ""
@@ -1282,28 +1288,28 @@ msgstr ""
1282
  msgid "Sorry, you are not allowed to deactivate plugins for this site."
1283
  msgstr ""
1284
 
1285
- #: includes/admin/class-evf-admin.php:189
1286
  #. translators: 1: EverestForms 2:: five stars
1287
  msgid "If you like %1$s please leave us a %2$s rating. A huge thanks in advance!"
1288
  msgstr ""
1289
 
1290
- #: includes/admin/class-evf-admin.php:191
1291
  msgid "Thanks :)"
1292
  msgstr ""
1293
 
1294
- #: includes/admin/class-evf-admin.php:202
1295
  msgid "Thank you for creating with Everest Forms."
1296
  msgstr ""
1297
 
1298
- #: includes/admin/evf-admin-functions.php:359
1299
  msgid "Field #"
1300
  msgstr ""
1301
 
1302
- #: includes/admin/evf-admin-functions.php:427
1303
  msgid "Available Fields"
1304
  msgstr ""
1305
 
1306
- #: includes/admin/evf-admin-functions.php:431
1307
  msgid "Others"
1308
  msgstr ""
1309
 
@@ -1341,15 +1347,15 @@ msgid ""
1341
  "settings."
1342
  msgstr ""
1343
 
1344
- #: includes/admin/settings/class-evf-settings-general.php:39
1345
  msgid "General Options"
1346
  msgstr ""
1347
 
1348
- #: includes/admin/settings/class-evf-settings-general.php:45
1349
  msgid "Disable User Details"
1350
  msgstr ""
1351
 
1352
- #: includes/admin/settings/class-evf-settings-general.php:46
1353
  msgid "Disable storing the IP address and User Agent on all forms."
1354
  msgstr ""
1355
 
@@ -1455,8 +1461,8 @@ msgid "Enter the message for the required form field"
1455
  msgstr ""
1456
 
1457
  #: includes/admin/settings/class-evf-settings-validation.php:52
1458
- #: includes/class-evf-frontend-scripts.php:311
1459
- #: includes/evf-core-functions.php:1487
1460
  msgid "This field is required."
1461
  msgstr ""
1462
 
@@ -1477,6 +1483,7 @@ msgid "Enter the message for the valid email"
1477
  msgstr ""
1478
 
1479
  #: includes/admin/settings/class-evf-settings-validation.php:70
 
1480
  msgid "Please enter a valid email address."
1481
  msgstr ""
1482
 
@@ -1489,7 +1496,7 @@ msgid "Enter the message for the valid email suggestion"
1489
  msgstr ""
1490
 
1491
  #: includes/admin/settings/class-evf-settings-validation.php:79
1492
- #: includes/class-evf-frontend-scripts.php:289
1493
  msgid "Did you mean {suggestion}?"
1494
  msgstr ""
1495
 
@@ -1502,7 +1509,7 @@ msgid "Enter the message for confirm field value."
1502
  msgstr ""
1503
 
1504
  #: includes/admin/settings/class-evf-settings-validation.php:88
1505
- #: includes/class-evf-frontend-scripts.php:291
1506
  msgid "Field values do not match."
1507
  msgstr ""
1508
 
@@ -1515,7 +1522,7 @@ msgid "Enter the message for the checkbox selection limit."
1515
  msgstr ""
1516
 
1517
  #: includes/admin/settings/class-evf-settings-validation.php:97
1518
- #: includes/class-evf-frontend-scripts.php:292
1519
  #: includes/fields/class-evf-field-checkbox.php:421
1520
  msgid "You have exceeded number of allowed selections: {#}."
1521
  msgstr ""
@@ -1551,46 +1558,60 @@ msgstr ""
1551
  msgid "Search Add-ons..."
1552
  msgstr ""
1553
 
1554
- #: includes/admin/views/html-admin-page-addons.php:47
 
1555
  msgid ""
1556
  "Make your forms even more robust with our premium addons. Missing any "
1557
  "addons? Click the %1$sRefresh Add-ons%2$s button above."
1558
  msgstr ""
1559
 
1560
- #: includes/admin/views/html-admin-page-addons.php:53
1561
  msgid "Add-ons list"
1562
  msgstr ""
1563
 
1564
- #: includes/admin/views/html-admin-page-addons.php:74
1565
- #: includes/admin/views/html-admin-page-entries-view.php:204
1566
  msgid "Status:"
1567
  msgstr ""
1568
 
1569
- #: includes/admin/views/html-admin-page-addons.php:76
1570
  msgid "Activated"
1571
  msgstr ""
1572
 
1573
- #: includes/admin/views/html-admin-page-addons.php:78
1574
  msgid "Inactive"
1575
  msgstr ""
1576
 
1577
- #: includes/admin/views/html-admin-page-addons.php:80
1578
  msgid "Not Installed"
1579
  msgstr ""
1580
 
1581
- #: includes/admin/views/html-admin-page-addons.php:93
 
 
 
 
1582
  msgid "Deactivate"
1583
  msgstr ""
1584
 
1585
- #: includes/admin/views/html-admin-page-addons.php:103
 
 
 
 
1586
  msgid "Activate"
1587
  msgstr ""
1588
 
1589
- #: includes/admin/views/html-admin-page-addons.php:105
 
 
 
 
1590
  msgid "Install Addon"
1591
  msgstr ""
1592
 
1593
- #: includes/admin/views/html-admin-page-addons.php:121
 
1594
  msgid ""
1595
  "Our catalog of Everest Forms Add-ons/Extensions can be found on "
1596
  "WPEverest.com here: <a href=\"%s\">Everest Forms Extensions Catalog</a>"
@@ -1721,15 +1742,15 @@ msgstr ""
1721
  msgid "User:"
1722
  msgstr ""
1723
 
1724
- #: includes/admin/views/html-admin-page-entries-view.php:188
1725
  msgid "User IP:"
1726
  msgstr ""
1727
 
1728
- #: includes/admin/views/html-admin-page-entries-view.php:196
1729
  msgid "Referer Link:"
1730
  msgstr ""
1731
 
1732
- #: includes/admin/views/html-admin-page-entries-view.php:205
1733
  msgid "Completed"
1734
  msgstr ""
1735
 
@@ -1774,7 +1795,12 @@ msgstr ""
1774
  msgid "No file selected"
1775
  msgstr ""
1776
 
1777
- #: includes/admin/views/html-admin-page-import.php:20
 
 
 
 
 
1778
  msgid "Import Form"
1779
  msgstr ""
1780
 
@@ -1803,8 +1829,8 @@ msgstr ""
1803
  msgid "Save Changes"
1804
  msgstr ""
1805
 
1806
- #: includes/admin/views/html-notice-custom.php:14
1807
- #: includes/admin/views/html-notice-updated.php:14
1808
  msgid "Dismiss"
1809
  msgstr ""
1810
 
@@ -1813,53 +1839,60 @@ msgid "Please help us spread the word"
1813
  msgstr ""
1814
 
1815
  #: includes/admin/views/html-notice-review.php:20
 
 
 
 
 
 
 
1816
  msgid "Sure, I'd love to!"
1817
  msgstr ""
1818
 
1819
- #: includes/admin/views/html-notice-review.php:21
1820
  msgid "Remind me later"
1821
  msgstr ""
1822
 
1823
- #: includes/admin/views/html-notice-review.php:22
1824
  msgid "I already did"
1825
  msgstr ""
1826
 
1827
- #: includes/admin/views/html-notice-update.php:21
1828
  msgid "Everest Forms database update required"
1829
  msgstr ""
1830
 
1831
- #: includes/admin/views/html-notice-update.php:24
1832
  msgid ""
1833
  "Everest Forms has been updated! To keep things running smoothly, we have to "
1834
  "update your database to the newest version. The database update process "
1835
  "runs in the background and may take a little while, so please be patient."
1836
  msgstr ""
1837
 
1838
- #: includes/admin/views/html-notice-update.php:28
1839
  msgid "Update Everest Forms Database"
1840
  msgstr ""
1841
 
1842
- #: includes/admin/views/html-notice-update.php:34
1843
  msgid ""
1844
  "It is strongly recommended that you backup your database before proceeding. "
1845
  "Are you sure you wish to run the updater now?"
1846
  msgstr ""
1847
 
1848
- #: includes/admin/views/html-notice-updated.php:16
1849
  msgid ""
1850
  "Everest Forms data update complete. Thank you for updating to the latest "
1851
  "version!"
1852
  msgstr ""
1853
 
1854
- #: includes/admin/views/html-notice-updating.php:14
1855
  msgid "Everest Forms data update"
1856
  msgstr ""
1857
 
1858
- #: includes/admin/views/html-notice-updating.php:14
1859
  msgid "Your database is being updated in the background."
1860
  msgstr ""
1861
 
1862
- #: includes/admin/views/html-notice-updating.php:14
1863
  msgid "Taking a while? Click here to run it now."
1864
  msgstr ""
1865
 
@@ -1891,15 +1924,16 @@ msgstr ""
1891
  msgid "Meta Key missing"
1892
  msgstr ""
1893
 
1894
- #: includes/class-evf-ajax.php:249
 
1895
  msgid "Please add Meta key for fields: %s"
1896
  msgstr ""
1897
 
1898
- #: includes/class-evf-ajax.php:268
1899
  msgid "Form not found"
1900
  msgstr ""
1901
 
1902
- #: includes/class-evf-ajax.php:269
1903
  msgid "An error occurred while saving the form."
1904
  msgstr ""
1905
 
@@ -1931,15 +1965,15 @@ msgstr ""
1931
  msgid "Unable to connect to the filesystem. Please confirm your credentials."
1932
  msgstr ""
1933
 
1934
- #: includes/class-evf-ajax.php:534 includes/class-evf-ajax.php:576
1935
  msgid "Missing data"
1936
  msgstr ""
1937
 
1938
- #: includes/class-evf-ajax.php:590
1939
  msgid "Connection missing"
1940
  msgstr ""
1941
 
1942
- #: includes/class-evf-ajax.php:619
1943
  #. translators: %1$s - deactivation reason page; %2$d - deactivation url.
1944
  msgid ""
1945
  "Before we deactivate Everest Forms, would you care to <a href=\"%1$s\" "
@@ -1947,7 +1981,8 @@ msgid ""
1947
  "href=\"%2$s\">No, deactivate now</a>."
1948
  msgstr ""
1949
 
1950
- #: includes/class-evf-cache-helper.php:80
 
1951
  msgid ""
1952
  "In order for <strong>database caching</strong> to work with Everest Forms "
1953
  "you must add %1$s to the \"Ignored Query Strings\" option in <a "
@@ -2001,7 +2036,7 @@ msgstr ""
2001
  msgid "Form Settings"
2002
  msgstr ""
2003
 
2004
- #: includes/class-evf-form-block.php:87 includes/class-evf-post-types.php:43
2005
  msgid "Form"
2006
  msgstr ""
2007
 
@@ -2021,53 +2056,53 @@ msgstr ""
2021
  msgid "Invalid form. Please check again."
2022
  msgstr ""
2023
 
2024
- #: includes/class-evf-form-task.php:167 includes/class-evf-form-task.php:212
2025
- #: includes/class-evf-form-task.php:261
2026
  msgid "Form has not been submitted, please see the errors below."
2027
  msgstr ""
2028
 
2029
- #: includes/class-evf-form-task.php:197
2030
  msgid "Incorrect reCAPTCHA, please try again."
2031
  msgstr ""
2032
 
2033
- #: includes/class-evf-form-task.php:203
2034
  msgid "reCAPTCHA is required."
2035
  msgstr ""
2036
 
2037
- #: includes/class-evf-form-task.php:220
2038
  msgid "Everest Forms honeypot field triggered."
2039
  msgstr ""
2040
 
2041
- #: includes/class-evf-form-task.php:294 includes/templates/contact.php:61
2042
  msgid "Thanks for contacting us! We will be in touch with you shortly."
2043
  msgstr ""
2044
 
2045
- #: includes/class-evf-form-task.php:535
2046
  #. translators: %s - form name.
2047
  msgid "New %s Entry"
2048
  msgstr ""
2049
 
2050
- #: includes/class-evf-form-task.php:625
2051
  msgid "No form ID was found."
2052
  msgstr ""
2053
 
2054
- #: includes/class-evf-form-task.php:632
2055
  msgid "Could not create an entry"
2056
  msgstr ""
2057
 
2058
- #: includes/class-evf-frontend-scripts.php:290
2059
  msgid "Click to accept this suggestion."
2060
  msgstr ""
2061
 
2062
- #: includes/class-evf-frontend-scripts.php:301
2063
  msgid "{count} of {limit} max characters."
2064
  msgstr ""
2065
 
2066
- #: includes/class-evf-frontend-scripts.php:302
2067
  msgid "{count} of {limit} max words."
2068
  msgstr ""
2069
 
2070
- #: includes/class-evf-frontend-scripts.php:310
2071
  msgid "Sorry, something went wrong. Please try again"
2072
  msgstr ""
2073
 
@@ -2075,109 +2110,113 @@ msgstr ""
2075
  msgid "Monthly"
2076
  msgstr ""
2077
 
2078
- #: includes/class-evf-install.php:635
 
 
 
 
2079
  msgid "View Everest Forms Settings"
2080
  msgstr ""
2081
 
2082
- #: includes/class-evf-install.php:651
2083
  msgid "View Everest Forms documentation"
2084
  msgstr ""
2085
 
2086
- #: includes/class-evf-install.php:651
2087
  msgid "Docs"
2088
  msgstr ""
2089
 
2090
- #: includes/class-evf-install.php:652
2091
  msgid "Visit free customer support"
2092
  msgstr ""
2093
 
2094
- #: includes/class-evf-install.php:652
2095
  msgid "Free support"
2096
  msgstr ""
2097
 
2098
- #: includes/class-evf-logger.php:58
2099
  #. translators: 1: class name 2: EVF_Log_Handler_Interface
2100
  msgid "The provided handler %1$s does not implement %2$s."
2101
  msgstr ""
2102
 
2103
- #: includes/class-evf-logger.php:130
2104
  #. translators: 1: EVF_Logger::log 2: level
2105
  msgid "%1$s was called with an invalid level \"%2$s\"."
2106
  msgstr ""
2107
 
2108
- #: includes/class-evf-post-types.php:42
2109
  msgid "Forms"
2110
  msgstr ""
2111
 
2112
- #: includes/class-evf-post-types.php:47
2113
  msgid "Add new form"
2114
  msgstr ""
2115
 
2116
- #: includes/class-evf-post-types.php:49
2117
  msgid "Edit form"
2118
  msgstr ""
2119
 
2120
- #: includes/class-evf-post-types.php:50
2121
  msgid "New form"
2122
  msgstr ""
2123
 
2124
- #: includes/class-evf-post-types.php:51
2125
  msgid "View form"
2126
  msgstr ""
2127
 
2128
- #: includes/class-evf-post-types.php:52
2129
  msgid "Search forms"
2130
  msgstr ""
2131
 
2132
- #: includes/class-evf-post-types.php:53
2133
  msgid "No forms found"
2134
  msgstr ""
2135
 
2136
- #: includes/class-evf-post-types.php:54
2137
  msgid "No forms found in trash"
2138
  msgstr ""
2139
 
2140
- #: includes/class-evf-post-types.php:55
2141
  msgid "Parent forms"
2142
  msgstr ""
2143
 
2144
- #: includes/class-evf-post-types.php:56
2145
  msgid "Form image"
2146
  msgstr ""
2147
 
2148
- #: includes/class-evf-post-types.php:57
2149
  msgid "Set form image"
2150
  msgstr ""
2151
 
2152
- #: includes/class-evf-post-types.php:58
2153
  msgid "Remove form image"
2154
  msgstr ""
2155
 
2156
- #: includes/class-evf-post-types.php:59
2157
  msgid "Use as form image"
2158
  msgstr ""
2159
 
2160
- #: includes/class-evf-post-types.php:60
2161
  msgid "Insert into form"
2162
  msgstr ""
2163
 
2164
- #: includes/class-evf-post-types.php:61
2165
  msgid "Uploaded to this form"
2166
  msgstr ""
2167
 
2168
- #: includes/class-evf-post-types.php:62
2169
  msgid "Filter forms"
2170
  msgstr ""
2171
 
2172
- #: includes/class-evf-post-types.php:63
2173
  msgid "Forms navigation"
2174
  msgstr ""
2175
 
2176
- #: includes/class-evf-post-types.php:64
2177
  msgid "Forms list"
2178
  msgstr ""
2179
 
2180
- #: includes/class-evf-post-types.php:68
2181
  msgid "This is where you can add new forms."
2182
  msgstr ""
2183
 
@@ -2390,51 +2429,55 @@ msgid ""
2390
  "Privacy Policy</a> for more details."
2391
  msgstr ""
2392
 
2393
- #: includes/class-evf-smart-tags.php:33
2394
  msgid "Site Admin Email"
2395
  msgstr ""
2396
 
2397
- #: includes/class-evf-smart-tags.php:34
2398
  msgid "Site Name"
2399
  msgstr ""
2400
 
2401
- #: includes/class-evf-smart-tags.php:35
2402
  msgid "Site URL"
2403
  msgstr ""
2404
 
2405
- #: includes/class-evf-smart-tags.php:36
2406
  msgid "Page Title"
2407
  msgstr ""
2408
 
2409
- #: includes/class-evf-smart-tags.php:37
2410
  msgid "Page URL"
2411
  msgstr ""
2412
 
2413
- #: includes/class-evf-smart-tags.php:38
2414
  msgid "Page ID"
2415
  msgstr ""
2416
 
2417
- #: includes/class-evf-smart-tags.php:40
2418
  #: includes/export/class-evf-entry-csv-exporter.php:86
2419
  msgid "User IP Address"
2420
  msgstr ""
2421
 
2422
- #: includes/class-evf-smart-tags.php:41
2423
  msgid "User ID"
2424
  msgstr ""
2425
 
2426
- #: includes/class-evf-smart-tags.php:42
2427
  msgid "User Name"
2428
  msgstr ""
2429
 
2430
- #: includes/class-evf-smart-tags.php:43
2431
  msgid "User Email"
2432
  msgstr ""
2433
 
2434
- #: includes/class-evf-smart-tags.php:44
2435
  msgid "Referrer URL"
2436
  msgstr ""
2437
 
 
 
 
 
2438
  #: includes/class-evf-template-loader.php:193
2439
  #. translators: %s - Form name.
2440
  msgid "%s &ndash; Preview"
@@ -2451,7 +2494,7 @@ msgstr ""
2451
 
2452
  #: includes/evf-core-functions.php:294
2453
  #: includes/log-handlers/class-evf-log-handler-file.php:343
2454
- #: includes/log-handlers/class-evf-log-handler-file.php:359
2455
  msgid "This method should not be called before plugins_loaded."
2456
  msgstr ""
2457
 
@@ -2461,1033 +2504,1033 @@ msgstr ""
2461
  msgid "The class %1$s provided by %2$s filter must implement %3$s."
2462
  msgstr ""
2463
 
2464
- #: includes/evf-core-functions.php:1546
2465
  msgid "Afghanistan"
2466
  msgstr ""
2467
 
2468
- #: includes/evf-core-functions.php:1547
2469
  msgid "Åland Islands"
2470
  msgstr ""
2471
 
2472
- #: includes/evf-core-functions.php:1548
2473
  msgid "Albania"
2474
  msgstr ""
2475
 
2476
- #: includes/evf-core-functions.php:1549
2477
  msgid "Algeria"
2478
  msgstr ""
2479
 
2480
- #: includes/evf-core-functions.php:1550
2481
  msgid "American Samoa"
2482
  msgstr ""
2483
 
2484
- #: includes/evf-core-functions.php:1551
2485
  msgid "Andorra"
2486
  msgstr ""
2487
 
2488
- #: includes/evf-core-functions.php:1552
2489
  msgid "Angola"
2490
  msgstr ""
2491
 
2492
- #: includes/evf-core-functions.php:1553
2493
  msgid "Anguilla"
2494
  msgstr ""
2495
 
2496
- #: includes/evf-core-functions.php:1554
2497
  msgid "Antarctica"
2498
  msgstr ""
2499
 
2500
- #: includes/evf-core-functions.php:1555
2501
  msgid "Antigua and Barbuda"
2502
  msgstr ""
2503
 
2504
- #: includes/evf-core-functions.php:1556
2505
  msgid "Argentina"
2506
  msgstr ""
2507
 
2508
- #: includes/evf-core-functions.php:1557
2509
  msgid "Armenia"
2510
  msgstr ""
2511
 
2512
- #: includes/evf-core-functions.php:1558
2513
  msgid "Aruba"
2514
  msgstr ""
2515
 
2516
- #: includes/evf-core-functions.php:1559
2517
  msgid "Australia"
2518
  msgstr ""
2519
 
2520
- #: includes/evf-core-functions.php:1560
2521
  msgid "Austria"
2522
  msgstr ""
2523
 
2524
- #: includes/evf-core-functions.php:1561
2525
  msgid "Azerbaijan"
2526
  msgstr ""
2527
 
2528
- #: includes/evf-core-functions.php:1562
2529
  msgid "Bahamas"
2530
  msgstr ""
2531
 
2532
- #: includes/evf-core-functions.php:1563
2533
  msgid "Bahrain"
2534
  msgstr ""
2535
 
2536
- #: includes/evf-core-functions.php:1564
2537
  msgid "Bangladesh"
2538
  msgstr ""
2539
 
2540
- #: includes/evf-core-functions.php:1565
2541
  msgid "Barbados"
2542
  msgstr ""
2543
 
2544
- #: includes/evf-core-functions.php:1566
2545
  msgid "Belarus"
2546
  msgstr ""
2547
 
2548
- #: includes/evf-core-functions.php:1567
2549
  msgid "Belgium"
2550
  msgstr ""
2551
 
2552
- #: includes/evf-core-functions.php:1568
2553
  msgid "Belize"
2554
  msgstr ""
2555
 
2556
- #: includes/evf-core-functions.php:1569
2557
  msgid "Benin"
2558
  msgstr ""
2559
 
2560
- #: includes/evf-core-functions.php:1570
2561
  msgid "Bermuda"
2562
  msgstr ""
2563
 
2564
- #: includes/evf-core-functions.php:1571
2565
  msgid "Bhutan"
2566
  msgstr ""
2567
 
2568
- #: includes/evf-core-functions.php:1572
2569
  msgid "Bolivia (Plurinational State of)"
2570
  msgstr ""
2571
 
2572
- #: includes/evf-core-functions.php:1573
2573
  msgid "Bosnia and Herzegovina"
2574
  msgstr ""
2575
 
2576
- #: includes/evf-core-functions.php:1574
2577
  msgid "Botswana"
2578
  msgstr ""
2579
 
2580
- #: includes/evf-core-functions.php:1575
2581
  msgid "Bouvet Island"
2582
  msgstr ""
2583
 
2584
- #: includes/evf-core-functions.php:1576
2585
  msgid "Brazil"
2586
  msgstr ""
2587
 
2588
- #: includes/evf-core-functions.php:1577
2589
  msgid "British Indian Ocean Territory"
2590
  msgstr ""
2591
 
2592
- #: includes/evf-core-functions.php:1578
2593
  msgid "Brunei Darussalam"
2594
  msgstr ""
2595
 
2596
- #: includes/evf-core-functions.php:1579
2597
  msgid "Bulgaria"
2598
  msgstr ""
2599
 
2600
- #: includes/evf-core-functions.php:1580
2601
  msgid "Burkina Faso"
2602
  msgstr ""
2603
 
2604
- #: includes/evf-core-functions.php:1581
2605
  msgid "Burundi"
2606
  msgstr ""
2607
 
2608
- #: includes/evf-core-functions.php:1582
2609
  msgid "Cabo Verde"
2610
  msgstr ""
2611
 
2612
- #: includes/evf-core-functions.php:1583
2613
  msgid "Cambodia"
2614
  msgstr ""
2615
 
2616
- #: includes/evf-core-functions.php:1584
2617
  msgid "Cameroon"
2618
  msgstr ""
2619
 
2620
- #: includes/evf-core-functions.php:1585
2621
  msgid "Canada"
2622
  msgstr ""
2623
 
2624
- #: includes/evf-core-functions.php:1586
2625
  msgid "Cayman Islands"
2626
  msgstr ""
2627
 
2628
- #: includes/evf-core-functions.php:1587
2629
  msgid "Central African Republic"
2630
  msgstr ""
2631
 
2632
- #: includes/evf-core-functions.php:1588
2633
  msgid "Chad"
2634
  msgstr ""
2635
 
2636
- #: includes/evf-core-functions.php:1589
2637
  msgid "Chile"
2638
  msgstr ""
2639
 
2640
- #: includes/evf-core-functions.php:1590
2641
  msgid "China"
2642
  msgstr ""
2643
 
2644
- #: includes/evf-core-functions.php:1591
2645
  msgid "Christmas Island"
2646
  msgstr ""
2647
 
2648
- #: includes/evf-core-functions.php:1592
2649
  msgid "Cocos (Keeling) Islands"
2650
  msgstr ""
2651
 
2652
- #: includes/evf-core-functions.php:1593
2653
  msgid "Colombia"
2654
  msgstr ""
2655
 
2656
- #: includes/evf-core-functions.php:1594
2657
  msgid "Comoros"
2658
  msgstr ""
2659
 
2660
- #: includes/evf-core-functions.php:1595
2661
  msgid "Congo"
2662
  msgstr ""
2663
 
2664
- #: includes/evf-core-functions.php:1596
2665
  msgid "Congo (Democratic Republic of the)"
2666
  msgstr ""
2667
 
2668
- #: includes/evf-core-functions.php:1597
2669
  msgid "Cook Islands"
2670
  msgstr ""
2671
 
2672
- #: includes/evf-core-functions.php:1598
2673
  msgid "Costa Rica"
2674
  msgstr ""
2675
 
2676
- #: includes/evf-core-functions.php:1599
2677
  msgid "Côte d'Ivoire"
2678
  msgstr ""
2679
 
2680
- #: includes/evf-core-functions.php:1600
2681
  msgid "Croatia"
2682
  msgstr ""
2683
 
2684
- #: includes/evf-core-functions.php:1601
2685
  msgid "Cuba"
2686
  msgstr ""
2687
 
2688
- #: includes/evf-core-functions.php:1602
2689
  msgid "Curaçao"
2690
  msgstr ""
2691
 
2692
- #: includes/evf-core-functions.php:1603
2693
  msgid "Cyprus"
2694
  msgstr ""
2695
 
2696
- #: includes/evf-core-functions.php:1604
2697
  msgid "Czech Republic"
2698
  msgstr ""
2699
 
2700
- #: includes/evf-core-functions.php:1605
2701
  msgid "Denmark"
2702
  msgstr ""
2703
 
2704
- #: includes/evf-core-functions.php:1606
2705
  msgid "Djibouti"
2706
  msgstr ""
2707
 
2708
- #: includes/evf-core-functions.php:1607
2709
  msgid "Dominica"
2710
  msgstr ""
2711
 
2712
- #: includes/evf-core-functions.php:1608
2713
  msgid "Dominican Republic"
2714
  msgstr ""
2715
 
2716
- #: includes/evf-core-functions.php:1609
2717
  msgid "Ecuador"
2718
  msgstr ""
2719
 
2720
- #: includes/evf-core-functions.php:1610
2721
  msgid "Egypt"
2722
  msgstr ""
2723
 
2724
- #: includes/evf-core-functions.php:1611
2725
  msgid "El Salvador"
2726
  msgstr ""
2727
 
2728
- #: includes/evf-core-functions.php:1612
2729
  msgid "Equatorial Guinea"
2730
  msgstr ""
2731
 
2732
- #: includes/evf-core-functions.php:1613
2733
  msgid "Eritrea"
2734
  msgstr ""
2735
 
2736
- #: includes/evf-core-functions.php:1614
2737
  msgid "Estonia"
2738
  msgstr ""
2739
 
2740
- #: includes/evf-core-functions.php:1615
2741
  msgid "Ethiopia"
2742
  msgstr ""
2743
 
2744
- #: includes/evf-core-functions.php:1616
2745
  msgid "Falkland Islands (Malvinas)"
2746
  msgstr ""
2747
 
2748
- #: includes/evf-core-functions.php:1617
2749
  msgid "Faroe Islands"
2750
  msgstr ""
2751
 
2752
- #: includes/evf-core-functions.php:1618
2753
  msgid "Fiji"
2754
  msgstr ""
2755
 
2756
- #: includes/evf-core-functions.php:1619
2757
  msgid "Finland"
2758
  msgstr ""
2759
 
2760
- #: includes/evf-core-functions.php:1620
2761
  msgid "France"
2762
  msgstr ""
2763
 
2764
- #: includes/evf-core-functions.php:1621
2765
  msgid "French Guiana"
2766
  msgstr ""
2767
 
2768
- #: includes/evf-core-functions.php:1622
2769
  msgid "French Polynesia"
2770
  msgstr ""
2771
 
2772
- #: includes/evf-core-functions.php:1623
2773
  msgid "French Southern Territories"
2774
  msgstr ""
2775
 
2776
- #: includes/evf-core-functions.php:1624
2777
  msgid "Gabon"
2778
  msgstr ""
2779
 
2780
- #: includes/evf-core-functions.php:1625
2781
  msgid "Gambia"
2782
  msgstr ""
2783
 
2784
- #: includes/evf-core-functions.php:1627
2785
  msgid "Germany"
2786
  msgstr ""
2787
 
2788
- #: includes/evf-core-functions.php:1628
2789
  msgid "Ghana"
2790
  msgstr ""
2791
 
2792
- #: includes/evf-core-functions.php:1629
2793
  msgid "Gibraltar"
2794
  msgstr ""
2795
 
2796
- #: includes/evf-core-functions.php:1630
2797
  msgid "Greece"
2798
  msgstr ""
2799
 
2800
- #: includes/evf-core-functions.php:1631
2801
  msgid "Greenland"
2802
  msgstr ""
2803
 
2804
- #: includes/evf-core-functions.php:1632
2805
  msgid "Grenada"
2806
  msgstr ""
2807
 
2808
- #: includes/evf-core-functions.php:1633
2809
  msgid "Guadeloupe"
2810
  msgstr ""
2811
 
2812
- #: includes/evf-core-functions.php:1634
2813
  msgid "Guam"
2814
  msgstr ""
2815
 
2816
- #: includes/evf-core-functions.php:1635
2817
  msgid "Guatemala"
2818
  msgstr ""
2819
 
2820
- #: includes/evf-core-functions.php:1636
2821
  msgid "Guernsey"
2822
  msgstr ""
2823
 
2824
- #: includes/evf-core-functions.php:1637
2825
  msgid "Guinea"
2826
  msgstr ""
2827
 
2828
- #: includes/evf-core-functions.php:1638
2829
  msgid "Guinea-Bissau"
2830
  msgstr ""
2831
 
2832
- #: includes/evf-core-functions.php:1639
2833
  msgid "Guyana"
2834
  msgstr ""
2835
 
2836
- #: includes/evf-core-functions.php:1640
2837
  msgid "Haiti"
2838
  msgstr ""
2839
 
2840
- #: includes/evf-core-functions.php:1641
2841
  msgid "Heard Island and McDonald Islands"
2842
  msgstr ""
2843
 
2844
- #: includes/evf-core-functions.php:1642
2845
  msgid "Honduras"
2846
  msgstr ""
2847
 
2848
- #: includes/evf-core-functions.php:1643
2849
  msgid "Hong Kong"
2850
  msgstr ""
2851
 
2852
- #: includes/evf-core-functions.php:1644
2853
  msgid "Hungary"
2854
  msgstr ""
2855
 
2856
- #: includes/evf-core-functions.php:1645
2857
  msgid "Iceland"
2858
  msgstr ""
2859
 
2860
- #: includes/evf-core-functions.php:1646
2861
  msgid "India"
2862
  msgstr ""
2863
 
2864
- #: includes/evf-core-functions.php:1647
2865
  msgid "Indonesia"
2866
  msgstr ""
2867
 
2868
- #: includes/evf-core-functions.php:1648
2869
  msgid "Iran (Islamic Republic of)"
2870
  msgstr ""
2871
 
2872
- #: includes/evf-core-functions.php:1649
2873
  msgid "Iraq"
2874
  msgstr ""
2875
 
2876
- #: includes/evf-core-functions.php:1650
2877
  msgid "Ireland (Republic of)"
2878
  msgstr ""
2879
 
2880
- #: includes/evf-core-functions.php:1651
2881
  msgid "Isle of Man"
2882
  msgstr ""
2883
 
2884
- #: includes/evf-core-functions.php:1652
2885
  msgid "Israel"
2886
  msgstr ""
2887
 
2888
- #: includes/evf-core-functions.php:1653
2889
  msgid "Italy"
2890
  msgstr ""
2891
 
2892
- #: includes/evf-core-functions.php:1654
2893
  msgid "Jamaica"
2894
  msgstr ""
2895
 
2896
- #: includes/evf-core-functions.php:1655
2897
  msgid "Japan"
2898
  msgstr ""
2899
 
2900
- #: includes/evf-core-functions.php:1656
2901
  msgid "Jersey"
2902
  msgstr ""
2903
 
2904
- #: includes/evf-core-functions.php:1657
2905
  msgid "Jordan"
2906
  msgstr ""
2907
 
2908
- #: includes/evf-core-functions.php:1658
2909
  msgid "Kazakhstan"
2910
  msgstr ""
2911
 
2912
- #: includes/evf-core-functions.php:1659
2913
  msgid "Kenya"
2914
  msgstr ""
2915
 
2916
- #: includes/evf-core-functions.php:1660
2917
  msgid "Kiribati"
2918
  msgstr ""
2919
 
2920
- #: includes/evf-core-functions.php:1661
2921
  msgid "Korea (Democratic People's Republic of)"
2922
  msgstr ""
2923
 
2924
- #: includes/evf-core-functions.php:1662
2925
  msgid "Korea (Republic of)"
2926
  msgstr ""
2927
 
2928
- #: includes/evf-core-functions.php:1663
2929
  msgid "Kuwait"
2930
  msgstr ""
2931
 
2932
- #: includes/evf-core-functions.php:1664
2933
  msgid "Kyrgyzstan"
2934
  msgstr ""
2935
 
2936
- #: includes/evf-core-functions.php:1665
2937
  msgid "Lao People's Democratic Republic"
2938
  msgstr ""
2939
 
2940
- #: includes/evf-core-functions.php:1666
2941
  msgid "Latvia"
2942
  msgstr ""
2943
 
2944
- #: includes/evf-core-functions.php:1667
2945
  msgid "Lebanon"
2946
  msgstr ""
2947
 
2948
- #: includes/evf-core-functions.php:1668
2949
  msgid "Lesotho"
2950
  msgstr ""
2951
 
2952
- #: includes/evf-core-functions.php:1669
2953
  msgid "Liberia"
2954
  msgstr ""
2955
 
2956
- #: includes/evf-core-functions.php:1670
2957
  msgid "Libya"
2958
  msgstr ""
2959
 
2960
- #: includes/evf-core-functions.php:1671
2961
  msgid "Liechtenstein"
2962
  msgstr ""
2963
 
2964
- #: includes/evf-core-functions.php:1672
2965
  msgid "Lithuania"
2966
  msgstr ""
2967
 
2968
- #: includes/evf-core-functions.php:1673
2969
  msgid "Luxembourg"
2970
  msgstr ""
2971
 
2972
- #: includes/evf-core-functions.php:1674
2973
  msgid "Macao"
2974
  msgstr ""
2975
 
2976
- #: includes/evf-core-functions.php:1675
2977
  msgid "Macedonia (Republic of)"
2978
  msgstr ""
2979
 
2980
- #: includes/evf-core-functions.php:1676
2981
  msgid "Madagascar"
2982
  msgstr ""
2983
 
2984
- #: includes/evf-core-functions.php:1677
2985
  msgid "Malawi"
2986
  msgstr ""
2987
 
2988
- #: includes/evf-core-functions.php:1678
2989
  msgid "Malaysia"
2990
  msgstr ""
2991
 
2992
- #: includes/evf-core-functions.php:1679
2993
  msgid "Maldives"
2994
  msgstr ""
2995
 
2996
- #: includes/evf-core-functions.php:1680
2997
  msgid "Mali"
2998
  msgstr ""
2999
 
3000
- #: includes/evf-core-functions.php:1681
3001
  msgid "Malta"
3002
  msgstr ""
3003
 
3004
- #: includes/evf-core-functions.php:1682
3005
  msgid "Marshall Islands"
3006
  msgstr ""
3007
 
3008
- #: includes/evf-core-functions.php:1683
3009
  msgid "Martinique"
3010
  msgstr ""
3011
 
3012
- #: includes/evf-core-functions.php:1684
3013
  msgid "Mauritania"
3014
  msgstr ""
3015
 
3016
- #: includes/evf-core-functions.php:1685
3017
  msgid "Mauritius"
3018
  msgstr ""
3019
 
3020
- #: includes/evf-core-functions.php:1686
3021
  msgid "Mayotte"
3022
  msgstr ""
3023
 
3024
- #: includes/evf-core-functions.php:1687
3025
  msgid "Mexico"
3026
  msgstr ""
3027
 
3028
- #: includes/evf-core-functions.php:1688
3029
  msgid "Micronesia (Federated States of)"
3030
  msgstr ""
3031
 
3032
- #: includes/evf-core-functions.php:1689
3033
  msgid "Moldova (Republic of)"
3034
  msgstr ""
3035
 
3036
- #: includes/evf-core-functions.php:1690
3037
  msgid "Monaco"
3038
  msgstr ""
3039
 
3040
- #: includes/evf-core-functions.php:1691
3041
  msgid "Mongolia"
3042
  msgstr ""
3043
 
3044
- #: includes/evf-core-functions.php:1692
3045
  msgid "Montenegro"
3046
  msgstr ""
3047
 
3048
- #: includes/evf-core-functions.php:1693
3049
  msgid "Montserrat"
3050
  msgstr ""
3051
 
3052
- #: includes/evf-core-functions.php:1694
3053
  msgid "Morocco"
3054
  msgstr ""
3055
 
3056
- #: includes/evf-core-functions.php:1695
3057
  msgid "Mozambique"
3058
  msgstr ""
3059
 
3060
- #: includes/evf-core-functions.php:1696
3061
  msgid "Myanmar"
3062
  msgstr ""
3063
 
3064
- #: includes/evf-core-functions.php:1697
3065
  msgid "Namibia"
3066
  msgstr ""
3067
 
3068
- #: includes/evf-core-functions.php:1698
3069
  msgid "Nauru"
3070
  msgstr ""
3071
 
3072
- #: includes/evf-core-functions.php:1699
3073
  msgid "Nepal"
3074
  msgstr ""
3075
 
3076
- #: includes/evf-core-functions.php:1700
3077
  msgid "Netherlands"
3078
  msgstr ""
3079
 
3080
- #: includes/evf-core-functions.php:1701
3081
  msgid "New Caledonia"
3082
  msgstr ""
3083
 
3084
- #: includes/evf-core-functions.php:1702
3085
  msgid "New Zealand"
3086
  msgstr ""
3087
 
3088
- #: includes/evf-core-functions.php:1703
3089
  msgid "Nicaragua"
3090
  msgstr ""
3091
 
3092
- #: includes/evf-core-functions.php:1704
3093
  msgid "Niger"
3094
  msgstr ""
3095
 
3096
- #: includes/evf-core-functions.php:1705
3097
  msgid "Nigeria"
3098
  msgstr ""
3099
 
3100
- #: includes/evf-core-functions.php:1706
3101
  msgid "Niue"
3102
  msgstr ""
3103
 
3104
- #: includes/evf-core-functions.php:1707
3105
  msgid "Norfolk Island"
3106
  msgstr ""
3107
 
3108
- #: includes/evf-core-functions.php:1708
3109
  msgid "Northern Mariana Islands"
3110
  msgstr ""
3111
 
3112
- #: includes/evf-core-functions.php:1709
3113
  msgid "Norway"
3114
  msgstr ""
3115
 
3116
- #: includes/evf-core-functions.php:1710
3117
  msgid "Oman"
3118
  msgstr ""
3119
 
3120
- #: includes/evf-core-functions.php:1711
3121
  msgid "Pakistan"
3122
  msgstr ""
3123
 
3124
- #: includes/evf-core-functions.php:1712
3125
  msgid "Palau"
3126
  msgstr ""
3127
 
3128
- #: includes/evf-core-functions.php:1713
3129
  msgid "Palestine (State of)"
3130
  msgstr ""
3131
 
3132
- #: includes/evf-core-functions.php:1714
3133
  msgid "Panama"
3134
  msgstr ""
3135
 
3136
- #: includes/evf-core-functions.php:1715
3137
  msgid "Papua New Guinea"
3138
  msgstr ""
3139
 
3140
- #: includes/evf-core-functions.php:1716
3141
  msgid "Paraguay"
3142
  msgstr ""
3143
 
3144
- #: includes/evf-core-functions.php:1717
3145
  msgid "Peru"
3146
  msgstr ""
3147
 
3148
- #: includes/evf-core-functions.php:1718
3149
  msgid "Philippines"
3150
  msgstr ""
3151
 
3152
- #: includes/evf-core-functions.php:1719
3153
  msgid "Pitcairn"
3154
  msgstr ""
3155
 
3156
- #: includes/evf-core-functions.php:1720
3157
  msgid "Poland"
3158
  msgstr ""
3159
 
3160
- #: includes/evf-core-functions.php:1721
3161
  msgid "Portugal"
3162
  msgstr ""
3163
 
3164
- #: includes/evf-core-functions.php:1722
3165
  msgid "Puerto Rico"
3166
  msgstr ""
3167
 
3168
- #: includes/evf-core-functions.php:1723
3169
  msgid "Qatar"
3170
  msgstr ""
3171
 
3172
- #: includes/evf-core-functions.php:1724
3173
  msgid "Réunion"
3174
  msgstr ""
3175
 
3176
- #: includes/evf-core-functions.php:1725
3177
  msgid "Romania"
3178
  msgstr ""
3179
 
3180
- #: includes/evf-core-functions.php:1726
3181
  msgid "Russian Federation"
3182
  msgstr ""
3183
 
3184
- #: includes/evf-core-functions.php:1727
3185
  msgid "Rwanda"
3186
  msgstr ""
3187
 
3188
- #: includes/evf-core-functions.php:1728
3189
  msgid "Saint Barthélemy"
3190
  msgstr ""
3191
 
3192
- #: includes/evf-core-functions.php:1729
3193
  msgid "Saint Helena, Ascension and Tristan da Cunha"
3194
  msgstr ""
3195
 
3196
- #: includes/evf-core-functions.php:1730
3197
  msgid "Saint Kitts and Nevis"
3198
  msgstr ""
3199
 
3200
- #: includes/evf-core-functions.php:1731
3201
  msgid "Saint Lucia"
3202
  msgstr ""
3203
 
3204
- #: includes/evf-core-functions.php:1732
3205
  msgid "Saint Martin (French part)"
3206
  msgstr ""
3207
 
3208
- #: includes/evf-core-functions.php:1733
3209
  msgid "Saint Pierre and Miquelon"
3210
  msgstr ""
3211
 
3212
- #: includes/evf-core-functions.php:1734
3213
  msgid "Saint Vincent and the Grenadines"
3214
  msgstr ""
3215
 
3216
- #: includes/evf-core-functions.php:1735
3217
  msgid "Samoa"
3218
  msgstr ""
3219
 
3220
- #: includes/evf-core-functions.php:1736
3221
  msgid "San Marino"
3222
  msgstr ""
3223
 
3224
- #: includes/evf-core-functions.php:1737
3225
  msgid "Sao Tome and Principe"
3226
  msgstr ""
3227
 
3228
- #: includes/evf-core-functions.php:1738
3229
  msgid "Saudi Arabia"
3230
  msgstr ""
3231
 
3232
- #: includes/evf-core-functions.php:1739
3233
  msgid "Senegal"
3234
  msgstr ""
3235
 
3236
- #: includes/evf-core-functions.php:1740
3237
  msgid "Serbia"
3238
  msgstr ""
3239
 
3240
- #: includes/evf-core-functions.php:1741
3241
  msgid "Seychelles"
3242
  msgstr ""
3243
 
3244
- #: includes/evf-core-functions.php:1742
3245
  msgid "Sierra Leone"
3246
  msgstr ""
3247
 
3248
- #: includes/evf-core-functions.php:1743
3249
  msgid "Singapore"
3250
  msgstr ""
3251
 
3252
- #: includes/evf-core-functions.php:1744
3253
  msgid "Sint Maarten (Dutch part)"
3254
  msgstr ""
3255
 
3256
- #: includes/evf-core-functions.php:1745
3257
  msgid "Slovakia"
3258
  msgstr ""
3259
 
3260
- #: includes/evf-core-functions.php:1746
3261
  msgid "Slovenia"
3262
  msgstr ""
3263
 
3264
- #: includes/evf-core-functions.php:1747
3265
  msgid "Solomon Islands"
3266
  msgstr ""
3267
 
3268
- #: includes/evf-core-functions.php:1748
3269
  msgid "Somalia"
3270
  msgstr ""
3271
 
3272
- #: includes/evf-core-functions.php:1749
3273
  msgid "South Africa"
3274
  msgstr ""
3275
 
3276
- #: includes/evf-core-functions.php:1750
3277
  msgid "South Georgia and the South Sandwich Islands"
3278
  msgstr ""
3279
 
3280
- #: includes/evf-core-functions.php:1751
3281
  msgid "South Sudan"
3282
  msgstr ""
3283
 
3284
- #: includes/evf-core-functions.php:1752
3285
  msgid "Spain"
3286
  msgstr ""
3287
 
3288
- #: includes/evf-core-functions.php:1753
3289
  msgid "Sri Lanka"
3290
  msgstr ""
3291
 
3292
- #: includes/evf-core-functions.php:1754
3293
  msgid "Sudan"
3294
  msgstr ""
3295
 
3296
- #: includes/evf-core-functions.php:1755
3297
  msgid "Suriname"
3298
  msgstr ""
3299
 
3300
- #: includes/evf-core-functions.php:1756
3301
  msgid "Svalbard and Jan Mayen"
3302
  msgstr ""
3303
 
3304
- #: includes/evf-core-functions.php:1757
3305
  msgid "Swaziland"
3306
  msgstr ""
3307
 
3308
- #: includes/evf-core-functions.php:1758
3309
  msgid "Sweden"
3310
  msgstr ""
3311
 
3312
- #: includes/evf-core-functions.php:1759
3313
  msgid "Switzerland"
3314
  msgstr ""
3315
 
3316
- #: includes/evf-core-functions.php:1760
3317
  msgid "Syrian Arab Republic"
3318
  msgstr ""
3319
 
3320
- #: includes/evf-core-functions.php:1761
3321
  msgid "Taiwan, Province of China"
3322
  msgstr ""
3323
 
3324
- #: includes/evf-core-functions.php:1762
3325
  msgid "Tajikistan"
3326
  msgstr ""
3327
 
3328
- #: includes/evf-core-functions.php:1763
3329
  msgid "Tanzania (United Republic of)"
3330
  msgstr ""
3331
 
3332
- #: includes/evf-core-functions.php:1764
3333
  msgid "Thailand"
3334
  msgstr ""
3335
 
3336
- #: includes/evf-core-functions.php:1765
3337
  msgid "Timor-Leste"
3338
  msgstr ""
3339
 
3340
- #: includes/evf-core-functions.php:1766
3341
  msgid "Togo"
3342
  msgstr ""
3343
 
3344
- #: includes/evf-core-functions.php:1767
3345
  msgid "Tokelau"
3346
  msgstr ""
3347
 
3348
- #: includes/evf-core-functions.php:1768
3349
  msgid "Tonga"
3350
  msgstr ""
3351
 
3352
- #: includes/evf-core-functions.php:1769
3353
  msgid "Trinidad and Tobago"
3354
  msgstr ""
3355
 
3356
- #: includes/evf-core-functions.php:1770
3357
  msgid "Tunisia"
3358
  msgstr ""
3359
 
3360
- #: includes/evf-core-functions.php:1771
3361
  msgid "Turkey"
3362
  msgstr ""
3363
 
3364
- #: includes/evf-core-functions.php:1772
3365
  msgid "Turkmenistan"
3366
  msgstr ""
3367
 
3368
- #: includes/evf-core-functions.php:1773
3369
  msgid "Turks and Caicos Islands"
3370
  msgstr ""
3371
 
3372
- #: includes/evf-core-functions.php:1774
3373
  msgid "Tuvalu"
3374
  msgstr ""
3375
 
3376
- #: includes/evf-core-functions.php:1775
3377
  msgid "Uganda"
3378
  msgstr ""
3379
 
3380
- #: includes/evf-core-functions.php:1776
3381
  msgid "Ukraine"
3382
  msgstr ""
3383
 
3384
- #: includes/evf-core-functions.php:1777
3385
  msgid "United Arab Emirates"
3386
  msgstr ""
3387
 
3388
- #: includes/evf-core-functions.php:1778
3389
  msgid "United Kingdom of Great Britain and Northern Ireland"
3390
  msgstr ""
3391
 
3392
- #: includes/evf-core-functions.php:1779
3393
  msgid "United States of America"
3394
  msgstr ""
3395
 
3396
- #: includes/evf-core-functions.php:1780
3397
  msgid "United States Minor Outlying Islands"
3398
  msgstr ""
3399
 
3400
- #: includes/evf-core-functions.php:1781
3401
  msgid "Uruguay"
3402
  msgstr ""
3403
 
3404
- #: includes/evf-core-functions.php:1782
3405
  msgid "Uzbekistan"
3406
  msgstr ""
3407
 
3408
- #: includes/evf-core-functions.php:1783
3409
  msgid "Vanuatu"
3410
  msgstr ""
3411
 
3412
- #: includes/evf-core-functions.php:1784
3413
  msgid "Vatican City State"
3414
  msgstr ""
3415
 
3416
- #: includes/evf-core-functions.php:1785
3417
  msgid "Venezuela (Bolivarian Republic of)"
3418
  msgstr ""
3419
 
3420
- #: includes/evf-core-functions.php:1786
3421
  msgid "Viet Nam"
3422
  msgstr ""
3423
 
3424
- #: includes/evf-core-functions.php:1787
3425
  msgid "Virgin Islands (British)"
3426
  msgstr ""
3427
 
3428
- #: includes/evf-core-functions.php:1788
3429
  msgid "Virgin Islands (U.S.)"
3430
  msgstr ""
3431
 
3432
- #: includes/evf-core-functions.php:1789
3433
  msgid "Wallis and Futuna"
3434
  msgstr ""
3435
 
3436
- #: includes/evf-core-functions.php:1790
3437
  msgid "Western Sahara"
3438
  msgstr ""
3439
 
3440
- #: includes/evf-core-functions.php:1791
3441
  msgid "Yemen"
3442
  msgstr ""
3443
 
3444
- #: includes/evf-core-functions.php:1792
3445
  msgid "Zambia"
3446
  msgstr ""
3447
 
3448
- #: includes/evf-core-functions.php:1793
3449
  msgid "Zimbabwe"
3450
  msgstr ""
3451
 
3452
- #: includes/evf-core-functions.php:1808
3453
  msgid "General Fields"
3454
  msgstr ""
3455
 
3456
- #: includes/evf-core-functions.php:1809
3457
  msgid "Advanced Fields"
3458
  msgstr ""
3459
 
3460
- #: includes/evf-core-functions.php:1810
3461
  msgid "Payment Fields"
3462
  msgstr ""
3463
 
3464
- #: includes/evf-core-functions.php:1811
3465
  msgid "Survey Fields"
3466
  msgstr ""
3467
 
3468
- #: includes/evf-core-functions.php:1862
3469
  msgid "Check this option to mark the field required."
3470
  msgstr ""
3471
 
3472
- #: includes/evf-core-functions.php:1873
3473
  #: includes/fields/class-evf-field-checkbox.php:27
3474
  #: includes/fields/class-evf-field-radio.php:27
3475
  msgid "First Choice"
3476
  msgstr ""
3477
 
3478
- #: includes/evf-core-functions.php:1874
3479
  #: includes/fields/class-evf-field-checkbox.php:33
3480
  #: includes/fields/class-evf-field-radio.php:33
3481
  msgid "Second Choice"
3482
  msgstr ""
3483
 
3484
- #: includes/evf-core-functions.php:1875
3485
  #: includes/fields/class-evf-field-checkbox.php:39
3486
  #: includes/fields/class-evf-field-radio.php:39
3487
  msgid "Third Choice"
3488
  msgstr ""
3489
 
3490
- #: includes/evf-core-functions.php:1889
3491
  msgid ""
3492
  "Enter CSS class for this field container. Class names should be separated "
3493
  "with spaces."
@@ -3497,10 +3540,10 @@ msgstr ""
3497
  msgid "Published"
3498
  msgstr ""
3499
 
3500
- #: includes/evf-notice-functions.php:25 includes/evf-notice-functions.php:56
3501
- #: includes/evf-notice-functions.php:75 includes/evf-notice-functions.php:99
3502
- #: includes/evf-notice-functions.php:112 includes/evf-notice-functions.php:127
3503
- #: includes/evf-notice-functions.php:187
3504
  msgid "This function should not be called before everest_forms_init."
3505
  msgstr ""
3506
 
@@ -3706,7 +3749,7 @@ msgstr ""
3706
  msgid "Enter text for the confirmation field placeholder."
3707
  msgstr ""
3708
 
3709
- #: includes/fields/class-evf-field-email.php:367
3710
  msgid "Confirmation Email do not match."
3711
  msgstr ""
3712
 
@@ -3874,10 +3917,6 @@ msgstr ""
3874
  msgid "Every %d Minutes"
3875
  msgstr ""
3876
 
3877
- #: includes/templates/contact.php:12
3878
- msgid "Contact Form"
3879
- msgstr ""
3880
-
3881
  #: templates/emails/footer-default.php:45
3882
  #. translators: %s - link to a site.
3883
  msgid "Sent from %s"
@@ -3973,12 +4012,12 @@ msgctxt "Template name"
3973
  msgid "%s template"
3974
  msgstr ""
3975
 
3976
- #: includes/class-evf-post-types.php:45
3977
  msgctxt "Admin menu name"
3978
  msgid "Forms"
3979
  msgstr ""
3980
 
3981
- #: includes/evf-core-functions.php:1626
3982
  msgctxt "Country"
3983
  msgid "Georgia"
3984
  msgstr ""
2
  # This file is distributed under the same license as the Everest Forms package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Everest Forms 1.6.2\n"
6
  "Report-Msgid-Bugs-To: https://github.com/wpeverest/everest-forms/issues\n"
7
+ "POT-Creation-Date: 2020-02-29 09:50:01+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=utf-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
27
  msgstr ""
28
 
29
  #: includes/abstracts/class-evf-form-fields.php:361
30
+ #: includes/evf-core-functions.php:1848
31
  msgid ""
32
  "Enter text for the form field label. This is recommended and can be hidden "
33
  "in the Advanced Settings."
34
  msgstr ""
35
 
36
  #: includes/abstracts/class-evf-form-fields.php:367
37
+ #: includes/evf-core-functions.php:1847
38
  msgid "Label"
39
  msgstr ""
40
 
41
  #: includes/abstracts/class-evf-form-fields.php:397
42
+ #: includes/evf-core-functions.php:1856
43
  msgid "Enter meta key to be stored in database."
44
  msgstr ""
45
 
46
  #: includes/abstracts/class-evf-form-fields.php:403
47
+ #: includes/evf-core-functions.php:1855
48
  msgid "Meta Key"
49
  msgstr ""
50
 
51
  #: includes/abstracts/class-evf-form-fields.php:434
52
+ #: includes/evf-core-functions.php:1865
53
  msgid "Enter text for the form field description."
54
  msgstr ""
55
 
56
  #: includes/abstracts/class-evf-form-fields.php:440
57
+ #: includes/evf-core-functions.php:1863
58
  msgid "Description"
59
  msgstr ""
60
 
66
 
67
  #: includes/abstracts/class-evf-form-fields.php:478
68
  #: includes/admin/settings/class-evf-settings-validation.php:46
69
+ #: includes/evf-core-functions.php:1871
70
+ #: includes/shortcodes/class-evf-shortcode-form.php:187
71
  msgid "Required"
72
  msgstr ""
73
 
125
  msgid "Required Field Message"
126
  msgstr ""
127
 
128
+ #: includes/abstracts/class-evf-form-fields.php:659
129
  msgid "Enter code for the form field."
130
  msgstr ""
131
 
132
+ #: includes/abstracts/class-evf-form-fields.php:665
133
  msgid "Code"
134
  msgstr ""
135
 
136
+ #: includes/abstracts/class-evf-form-fields.php:695
137
+ #: includes/evf-core-functions.php:1879
138
  msgid "Choices"
139
  msgstr ""
140
 
141
+ #: includes/abstracts/class-evf-form-fields.php:713
142
+ #: includes/evf-core-functions.php:1880
143
  msgid "Add choices for the form field."
144
  msgstr ""
145
 
146
+ #: includes/abstracts/class-evf-form-fields.php:751
147
  msgid "Upload Image"
148
  msgstr ""
149
 
150
+ #: includes/abstracts/class-evf-form-fields.php:758
151
+ #: includes/admin/builder/class-evf-builder-settings.php:104
152
  msgid "Remove"
153
  msgstr ""
154
 
155
+ #: includes/abstracts/class-evf-form-fields.php:759
156
  msgid "Change image"
157
  msgstr ""
158
 
159
+ #: includes/abstracts/class-evf-form-fields.php:785
160
  msgid ""
161
  "For best results, images should be square and at least 200 × 160 pixels or "
162
  "smaller."
163
  msgstr ""
164
 
165
+ #: includes/abstracts/class-evf-form-fields.php:794
166
  msgid "Use image choices"
167
  msgstr ""
168
 
169
+ #: includes/abstracts/class-evf-form-fields.php:795
170
  msgid "Check this option to enable using images with the choices."
171
  msgstr ""
172
 
173
+ #: includes/abstracts/class-evf-form-fields.php:821
174
  msgid "Enter text for the default form field value."
175
  msgstr ""
176
 
177
+ #: includes/abstracts/class-evf-form-fields.php:828
178
  msgid "Default Value"
179
  msgstr ""
180
 
181
+ #: includes/abstracts/class-evf-form-fields.php:871
182
  msgid "Advanced Options"
183
  msgstr ""
184
 
185
+ #: includes/abstracts/class-evf-form-fields.php:883
186
+ #: includes/evf-core-functions.php:1892
187
  msgid "Enter text for the form field placeholder."
188
  msgstr ""
189
 
190
+ #: includes/abstracts/class-evf-form-fields.php:889
191
+ #: includes/evf-core-functions.php:1891
192
  msgid "Placeholder Text"
193
  msgstr ""
194
 
195
+ #: includes/abstracts/class-evf-form-fields.php:919
196
  msgid ""
197
  "Enter CSS class names for this field container. Multiple class names should "
198
  "be separated with spaces."
199
  msgstr ""
200
 
201
+ #: includes/abstracts/class-evf-form-fields.php:928
202
+ #: includes/evf-core-functions.php:1899
203
  msgid "CSS Classes"
204
  msgstr ""
205
 
206
+ #: includes/abstracts/class-evf-form-fields.php:959
207
+ #: includes/evf-core-functions.php:1909
208
  msgid "Check this option to hide the form field label."
209
  msgstr ""
210
 
211
+ #: includes/abstracts/class-evf-form-fields.php:968
212
+ #: includes/evf-core-functions.php:1907
213
  msgid "Hide Label"
214
  msgstr ""
215
 
216
+ #: includes/abstracts/class-evf-form-fields.php:989
217
+ #: includes/evf-core-functions.php:1917
218
  msgid "Check this option to hide the form field sub-label."
219
  msgstr ""
220
 
221
+ #: includes/abstracts/class-evf-form-fields.php:998
222
+ #: includes/evf-core-functions.php:1915
223
  msgid "Hide Sub-Labels"
224
  msgstr ""
225
 
226
+ #: includes/abstracts/class-evf-form-fields.php:1019
227
  msgid "Select the column layout for displaying field choices."
228
  msgstr ""
229
 
230
+ #: includes/abstracts/class-evf-form-fields.php:1021
231
  msgid "One Column"
232
  msgstr ""
233
 
234
+ #: includes/abstracts/class-evf-form-fields.php:1022
235
  msgid "Two Columns"
236
  msgstr ""
237
 
238
+ #: includes/abstracts/class-evf-form-fields.php:1023
239
  msgid "Three Columns"
240
  msgstr ""
241
 
242
+ #: includes/abstracts/class-evf-form-fields.php:1024
243
  msgid "Inline"
244
  msgstr ""
245
 
246
+ #: includes/abstracts/class-evf-form-fields.php:1033
247
  msgid "Layout"
248
  msgstr ""
249
 
250
+ #: includes/abstracts/class-evf-form-fields.php:1134
251
  #: includes/class-evf-emails.php:445 includes/class-evf-emails.php:471
252
  #: includes/class-evf-emails.php:516
253
  msgid "(empty)"
254
  msgstr ""
255
 
256
+ #: includes/abstracts/class-evf-form-fields.php:1239
257
  msgid "You do no have permission."
258
  msgstr ""
259
 
260
+ #: includes/abstracts/class-evf-form-fields.php:1244
261
  msgid "No form ID found"
262
  msgstr ""
263
 
264
+ #: includes/abstracts/class-evf-form-fields.php:1249
265
  msgid "No field type found"
266
  msgstr ""
267
 
268
+ #: includes/abstracts/class-evf-form-fields.php:1278
269
  #: includes/admin/builder/class-evf-builder-fields.php:317
270
  msgid "Duplicate Field"
271
  msgstr ""
272
 
273
+ #: includes/abstracts/class-evf-form-fields.php:1279
274
  #: includes/admin/builder/class-evf-builder-fields.php:318
275
  msgid "Delete Field"
276
  msgstr ""
277
 
278
+ #: includes/abstracts/class-evf-form-fields.php:1280
279
  #: includes/admin/builder/class-evf-builder-fields.php:319
280
  #: includes/admin/builder/class-evf-builder-settings.php:25
281
  #: includes/admin/class-evf-admin-menus.php:165
282
+ #: includes/class-evf-install.php:637
283
  msgid "Settings"
284
  msgstr ""
285
 
286
+ #: includes/abstracts/class-evf-form-fields.php:1396
287
  msgid "Please enter a valid url"
288
  msgstr ""
289
 
290
+ #: includes/abstracts/class-evf-form-fields.php:1406
291
  msgid "Please enter a valid email address"
292
  msgstr ""
293
 
294
+ #: includes/abstracts/class-evf-form-fields.php:1411
295
  msgid "Please enter a valid number"
296
  msgstr ""
297
 
331
  msgid "Select the type of row"
332
  msgstr ""
333
 
334
+ #: includes/admin/builder/class-evf-builder-fields.php:296
335
+ msgid "Add Row"
336
+ msgstr ""
337
+
338
  #: includes/admin/builder/class-evf-builder-settings.php:40
339
+ #: includes/admin/builder/class-evf-builder-settings.php:128
340
  #: includes/admin/settings/class-evf-settings-general.php:25
341
  msgid "General"
342
  msgstr ""
343
 
344
  #: includes/admin/builder/class-evf-builder-settings.php:41
345
+ #: includes/admin/builder/class-evf-builder-settings.php:379
346
  #: includes/admin/settings/class-evf-settings-email.php:25
347
  #: includes/admin/settings/class-evf-settings-validation.php:64
348
  #: includes/fields/class-evf-field-email.php:20
352
  msgstr ""
353
 
354
  #: includes/admin/builder/class-evf-builder-settings.php:77
355
+ #: includes/admin/builder/class-evf-builder-settings.php:349
356
+ #: includes/admin/builder/class-evf-builder-settings.php:405
357
+ #: includes/class-evf-form-task.php:551 includes/evf-update-functions.php:140
358
  #: includes/templates/contact.php:71
359
  msgid "Admin Notification"
360
  msgstr ""
367
  msgid "Email Notifications"
368
  msgstr ""
369
 
370
+ #: includes/admin/builder/class-evf-builder-settings.php:135
371
+ #: includes/class-evf-smart-tags.php:37
372
  msgid "Form Name"
373
  msgstr ""
374
 
375
+ #: includes/admin/builder/class-evf-builder-settings.php:138
376
  msgid "Give a name to this form"
377
  msgstr ""
378
 
379
+ #: includes/admin/builder/class-evf-builder-settings.php:146
380
  msgid "Form description"
381
  msgstr ""
382
 
383
+ #: includes/admin/builder/class-evf-builder-settings.php:150
384
  msgid "Give the description to this form"
385
  msgstr ""
386
 
387
+ #: includes/admin/builder/class-evf-builder-settings.php:158
388
  msgid "Form disabled message"
389
  msgstr ""
390
 
391
+ #: includes/admin/builder/class-evf-builder-settings.php:161
392
+ #: includes/shortcodes/class-evf-shortcode-form.php:713
393
  msgid "This form is disabled."
394
  msgstr ""
395
 
396
+ #: includes/admin/builder/class-evf-builder-settings.php:162
397
  msgid "Message that shows up if the form is disabled."
398
  msgstr ""
399
 
400
+ #: includes/admin/builder/class-evf-builder-settings.php:170
401
  msgid "Successful form submission message"
402
  msgstr ""
403
 
404
+ #: includes/admin/builder/class-evf-builder-settings.php:173
405
  msgid "Thanks for contacting us! We will be in touch with you shortly"
406
  msgstr ""
407
 
408
+ #: includes/admin/builder/class-evf-builder-settings.php:175
409
  #. translators: %1$s - general settings docs url
410
  msgid ""
411
  "Success message that shows up after submitting form. <a href=\"%1$s\" "
412
  "target=\"_blank\">Learn More</a>"
413
  msgstr ""
414
 
415
+ #: includes/admin/builder/class-evf-builder-settings.php:183
416
  msgid "Automatically scroll to the submission message"
417
  msgstr ""
418
 
419
+ #: includes/admin/builder/class-evf-builder-settings.php:193
420
  msgid "Redirect To"
421
  msgstr ""
422
 
423
+ #: includes/admin/builder/class-evf-builder-settings.php:197
424
  #. translators: %1$s - general settings docs url
425
  msgid ""
426
  "Choose where to redirect after form submission. <a href=\"%s\" "
427
  "target=\"_blank\">Learn More</a>"
428
  msgstr ""
429
 
430
+ #: includes/admin/builder/class-evf-builder-settings.php:199
431
  msgid "Same Page"
432
  msgstr ""
433
 
434
+ #: includes/admin/builder/class-evf-builder-settings.php:200
435
+ #: includes/admin/builder/class-evf-builder-settings.php:210
436
  msgid "Custom Page"
437
  msgstr ""
438
 
439
+ #: includes/admin/builder/class-evf-builder-settings.php:201
440
+ #: includes/admin/builder/class-evf-builder-settings.php:221
441
  msgid "External URL"
442
  msgstr ""
443
 
444
+ #: includes/admin/builder/class-evf-builder-settings.php:231
445
  msgid "Layout Design"
446
  msgstr ""
447
 
448
+ #: includes/admin/builder/class-evf-builder-settings.php:234
449
  msgid "Choose design template for the Form"
450
  msgstr ""
451
 
452
+ #: includes/admin/builder/class-evf-builder-settings.php:236
453
  msgid "Default"
454
  msgstr ""
455
 
456
+ #: includes/admin/builder/class-evf-builder-settings.php:237
457
  msgid "Classic Layout"
458
  msgstr ""
459
 
460
+ #: includes/admin/builder/class-evf-builder-settings.php:246
461
  msgid "Form Class"
462
  msgstr ""
463
 
464
+ #: includes/admin/builder/class-evf-builder-settings.php:250
465
  #. translators: %1$s - general settings docs url
466
  msgid ""
467
  "Enter CSS class names for the form wrapper. Multiple class names should be "
468
  "separated with spaces. <a href=\"%s\" target=\"_blank\">Learn More</a>"
469
  msgstr ""
470
 
471
+ #: includes/admin/builder/class-evf-builder-settings.php:253
472
  msgid "Submit Button"
473
  msgstr ""
474
 
475
+ #: includes/admin/builder/class-evf-builder-settings.php:259
476
  msgid "Submit button text"
477
  msgstr ""
478
 
479
+ #: includes/admin/builder/class-evf-builder-settings.php:261
480
+ #: includes/class-evf-frontend-scripts.php:277
481
+ #: includes/class-evf-frontend-scripts.php:303
482
  #: includes/shortcodes/class-evf-shortcode-form.php:60
483
  #: includes/templates/contact.php:67
484
  msgid "Submit"
485
  msgstr ""
486
 
487
+ #: includes/admin/builder/class-evf-builder-settings.php:262
488
  msgid "Enter desired text for submit button."
489
  msgstr ""
490
 
491
+ #: includes/admin/builder/class-evf-builder-settings.php:270
492
  msgid "Submit button processing text"
493
  msgstr ""
494
 
495
+ #: includes/admin/builder/class-evf-builder-settings.php:272
496
  #: includes/shortcodes/class-evf-shortcode-form.php:72
497
  msgid "Processing&hellip;"
498
  msgstr ""
499
 
500
+ #: includes/admin/builder/class-evf-builder-settings.php:273
501
  msgid ""
502
  "Enter the submit button text that you would like the button to display "
503
  "while the form submission is processing."
504
  msgstr ""
505
 
506
+ #: includes/admin/builder/class-evf-builder-settings.php:281
507
  msgid "Submit button class"
508
  msgstr ""
509
 
510
+ #: includes/admin/builder/class-evf-builder-settings.php:284
511
  msgid ""
512
  "Enter CSS class names for submit button. Multiple class names should be "
513
  "separated with spaces."
514
  msgstr ""
515
 
516
+ #: includes/admin/builder/class-evf-builder-settings.php:294
517
  msgid "Enable anti-spam honeypot"
518
  msgstr ""
519
 
520
+ #: includes/admin/builder/class-evf-builder-settings.php:308
521
  msgid "Enable Google reCAPTCHA v3"
522
  msgstr ""
523
 
524
+ #: includes/admin/builder/class-evf-builder-settings.php:308
525
  msgid "Enable Google Invisible reCAPTCHA v2"
526
  msgstr ""
527
 
528
+ #: includes/admin/builder/class-evf-builder-settings.php:308
529
  msgid "Enable Google Checkbox reCAPTCHA v2"
530
  msgstr ""
531
 
532
+ #: includes/admin/builder/class-evf-builder-settings.php:312
533
  #. translators: %1$s - general settings docs url
534
  msgid ""
535
  "Enable Google reCaptcha. Make sure the site key and secret key is set in "
536
  "settings page. <a href=\"%s\" target=\"_blank\">Learn More</a>"
537
  msgstr ""
538
 
539
+ #: includes/admin/builder/class-evf-builder-settings.php:321
540
  msgid "Enable Ajax Form Submission"
541
  msgstr ""
542
 
543
+ #: includes/admin/builder/class-evf-builder-settings.php:324
544
  msgid "Enables form submission without reloading the page."
545
  msgstr ""
546
 
547
+ #: includes/admin/builder/class-evf-builder-settings.php:332
548
  msgid "Disable storing entry information"
549
  msgstr ""
550
 
551
+ #: includes/admin/builder/class-evf-builder-settings.php:336
552
  #. translators: %1$s - general settings docs url
553
  msgid ""
554
  "Disable storing form entries. <a href=\"%1$s\" target=\"_blank\">Learn "
555
  "More</a>"
556
  msgstr ""
557
 
558
+ #: includes/admin/builder/class-evf-builder-settings.php:355
559
  #: includes/admin/builder/class-evf-builder-settings.php:528
560
+ #: includes/templates/contact.php:77
561
+ #. translators: %s: Form Name
562
  msgid "New Form Entry %s"
563
  msgstr ""
564
 
565
+ #: includes/admin/builder/class-evf-builder-settings.php:366
566
  #: includes/evf-update-functions.php:156
567
  msgid "User Notification"
568
  msgstr ""
569
 
570
+ #: includes/admin/builder/class-evf-builder-settings.php:391
571
  #: includes/admin/class-evf-admin-assets.php:145
572
  msgid "Turn on Email settings to manage your email notifications."
573
  msgstr ""
574
 
575
+ #: includes/admin/builder/class-evf-builder-settings.php:417
576
  msgid "To Address"
577
  msgstr ""
578
 
579
+ #: includes/admin/builder/class-evf-builder-settings.php:421
580
  #. translators: %1$s - general settings docs url
581
  msgid ""
582
  "Enter the recipient's email address (comma separated) to receive form entry "
583
  "notifications. <a href=\"%s\" target=\"_blank\">Learn More</a>"
584
  msgstr ""
585
 
586
+ #: includes/admin/builder/class-evf-builder-settings.php:436
587
  msgid "Cc Address"
588
  msgstr ""
589
 
590
+ #: includes/admin/builder/class-evf-builder-settings.php:439
591
  msgid ""
592
  "Enter Cc recipient's email address (comma separated) to receive form entry "
593
  "notifications."
594
  msgstr ""
595
 
596
+ #: includes/admin/builder/class-evf-builder-settings.php:453
597
  msgid "Bcc Address"
598
  msgstr ""
599
 
600
+ #: includes/admin/builder/class-evf-builder-settings.php:456
601
  msgid ""
602
  "Enter Bcc recipient's email address (comma separated) to receive form entry "
603
  "notifications."
604
  msgstr ""
605
 
606
+ #: includes/admin/builder/class-evf-builder-settings.php:471
607
  msgid "From Name"
608
  msgstr ""
609
 
610
+ #: includes/admin/builder/class-evf-builder-settings.php:475
611
  #. translators: %1$s - general settings docs url
612
  msgid ""
613
  "Enter the From Name to be displayed in Email. <a href=\"%1$s\" "
614
  "target=\"_blank\">Learn More</a>"
615
  msgstr ""
616
 
617
+ #: includes/admin/builder/class-evf-builder-settings.php:489
618
  msgid "From Address"
619
  msgstr ""
620
 
621
+ #: includes/admin/builder/class-evf-builder-settings.php:493
622
  #. translators: %1$s - general settings docs url
623
  msgid ""
624
  "Enter the Email address from which you want to send Email. <a href=\"%s\" "
625
  "target=\"_blank\">Learn More</a>"
626
  msgstr ""
627
 
628
+ #: includes/admin/builder/class-evf-builder-settings.php:507
629
  msgid "Reply To"
630
  msgstr ""
631
 
632
+ #: includes/admin/builder/class-evf-builder-settings.php:511
633
  #. translators: %1$s - general settings docs url
634
  msgid ""
635
  "Enter the reply to email address where you want the email to be received "
637
  "More</a>"
638
  msgstr ""
639
 
640
+ #: includes/admin/builder/class-evf-builder-settings.php:525
641
  msgid "Email Subject"
642
  msgstr ""
643
 
644
  #: includes/admin/builder/class-evf-builder-settings.php:530
645
+ #. translators: %1$s - General Settings docs url
646
  msgid ""
647
  "Enter the subject of the email. <a href=\"%1$s\" target=\"_blank\">Learn "
648
  "More</a>"
846
  msgstr ""
847
 
848
  #: includes/admin/class-evf-admin-assets.php:232
849
+ #: includes/admin/views/html-admin-page-addons.php:125
850
  msgid "Upgrade Plan"
851
  msgstr ""
852
 
916
  msgstr ""
917
 
918
  #: includes/admin/class-evf-admin-entries-table-list.php:297
919
+ #: includes/admin/views/html-admin-page-entries-view.php:196
920
  #: includes/admin/views/html-admin-page-tools-logs.php:33
921
  msgid "View"
922
  msgstr ""
1059
  msgstr ""
1060
 
1061
  #: includes/admin/class-evf-admin-forms-table-list.php:116
1062
+ #: includes/class-evf-post-types.php:50
1063
  msgid "Edit"
1064
  msgstr ""
1065
 
1098
  msgstr ""
1099
 
1100
  #: includes/admin/class-evf-admin-forms-table-list.php:371
1101
+ #: includes/admin/views/html-admin-page-entries-view.php:213
1102
  msgid "Move to trash"
1103
  msgstr ""
1104
 
1117
  msgstr[1] ""
1118
 
1119
  #: includes/admin/class-evf-admin-forms-table-list.php:431
1120
+ #: includes/admin/class-evf-admin-forms.php:221
1121
  #. translators: %d: number of forms
1122
  msgid "%d form permanently deleted."
1123
  msgid_plural "%d forms permanently deleted."
1124
  msgstr[0] ""
1125
  msgstr[1] ""
1126
 
1127
+ #: includes/admin/class-evf-admin-forms.php:157
1128
  #: includes/admin/class-evf-admin-menus.php:93
1129
+ #: includes/class-evf-post-types.php:46
1130
  msgid "All Forms"
1131
  msgstr ""
1132
 
1133
+ #: includes/admin/class-evf-admin-forms.php:158
1134
  #: includes/admin/class-evf-admin-menus.php:95
1135
+ #: includes/class-evf-post-types.php:48
1136
  msgid "Add New"
1137
  msgstr ""
1138
 
1139
+ #: includes/admin/class-evf-admin-forms.php:167
1140
  msgid "Search Forms"
1141
  msgstr ""
1142
 
1143
+ #: includes/admin/class-evf-admin-forms.php:231
1144
  msgid "No form to duplicate has been supplied!"
1145
  msgstr ""
1146
 
1147
+ #: includes/admin/class-evf-admin-import-export.php:34
1148
  #: includes/admin/class-evf-admin-notices.php:118
1149
  #: includes/admin/class-evf-admin-tools.php:167
1150
  msgid "Action failed. Please refresh the page and retry."
1151
  msgstr ""
1152
 
1153
+ #: includes/admin/class-evf-admin-import-export.php:125
1154
  msgid "Imported Successfully."
1155
  msgstr ""
1156
 
1157
+ #: includes/admin/class-evf-admin-import-export.php:132
1158
+ #: includes/admin/class-evf-admin-import-export.php:139
1159
  msgid "Invalid file content. Please export file from Everest Forms plugin."
1160
  msgstr ""
1161
 
1162
+ #: includes/admin/class-evf-admin-import-export.php:146
1163
+ msgid "Invalid file format. Only JSON File Allowed."
1164
  msgstr ""
1165
 
1166
+ #: includes/admin/class-evf-admin-import-export.php:153
1167
  msgid "Please select json file to import form data."
1168
  msgstr ""
1169
 
1216
  msgid "The changes you made will be lost if you navigate away from this page."
1217
  msgstr ""
1218
 
1219
+ #: includes/admin/class-evf-admin-settings.php:580
1220
  msgid "Select a page&hellip;"
1221
  msgstr ""
1222
 
1223
+ #: includes/admin/class-evf-admin-settings.php:589
1224
  #: includes/evf-formatting-functions.php:604
1225
  msgid "Day(s)"
1226
  msgstr ""
1227
 
1228
+ #: includes/admin/class-evf-admin-settings.php:590
1229
  #: includes/evf-formatting-functions.php:605
1230
  msgid "Week(s)"
1231
  msgstr ""
1232
 
1233
+ #: includes/admin/class-evf-admin-settings.php:591
1234
  #: includes/evf-formatting-functions.php:606
1235
  msgid "Month(s)"
1236
  msgstr ""
1237
 
1238
+ #: includes/admin/class-evf-admin-settings.php:592
1239
  #: includes/evf-formatting-functions.php:607
1240
  msgid "Year(s)"
1241
  msgstr ""
1288
  msgid "Sorry, you are not allowed to deactivate plugins for this site."
1289
  msgstr ""
1290
 
1291
+ #: includes/admin/class-evf-admin.php:188
1292
  #. translators: 1: EverestForms 2:: five stars
1293
  msgid "If you like %1$s please leave us a %2$s rating. A huge thanks in advance!"
1294
  msgstr ""
1295
 
1296
+ #: includes/admin/class-evf-admin.php:190
1297
  msgid "Thanks :)"
1298
  msgstr ""
1299
 
1300
+ #: includes/admin/class-evf-admin.php:201
1301
  msgid "Thank you for creating with Everest Forms."
1302
  msgstr ""
1303
 
1304
+ #: includes/admin/evf-admin-functions.php:354
1305
  msgid "Field #"
1306
  msgstr ""
1307
 
1308
+ #: includes/admin/evf-admin-functions.php:422
1309
  msgid "Available Fields"
1310
  msgstr ""
1311
 
1312
+ #: includes/admin/evf-admin-functions.php:426
1313
  msgid "Others"
1314
  msgstr ""
1315
 
1347
  "settings."
1348
  msgstr ""
1349
 
1350
+ #: includes/admin/settings/class-evf-settings-general.php:40
1351
  msgid "General Options"
1352
  msgstr ""
1353
 
1354
+ #: includes/admin/settings/class-evf-settings-general.php:46
1355
  msgid "Disable User Details"
1356
  msgstr ""
1357
 
1358
+ #: includes/admin/settings/class-evf-settings-general.php:47
1359
  msgid "Disable storing the IP address and User Agent on all forms."
1360
  msgstr ""
1361
 
1461
  msgstr ""
1462
 
1463
  #: includes/admin/settings/class-evf-settings-validation.php:52
1464
+ #: includes/class-evf-frontend-scripts.php:305
1465
+ #: includes/evf-core-functions.php:1496
1466
  msgid "This field is required."
1467
  msgstr ""
1468
 
1483
  msgstr ""
1484
 
1485
  #: includes/admin/settings/class-evf-settings-validation.php:70
1486
+ #: includes/fields/class-evf-field-email.php:340
1487
  msgid "Please enter a valid email address."
1488
  msgstr ""
1489
 
1496
  msgstr ""
1497
 
1498
  #: includes/admin/settings/class-evf-settings-validation.php:79
1499
+ #: includes/class-evf-frontend-scripts.php:283
1500
  msgid "Did you mean {suggestion}?"
1501
  msgstr ""
1502
 
1509
  msgstr ""
1510
 
1511
  #: includes/admin/settings/class-evf-settings-validation.php:88
1512
+ #: includes/class-evf-frontend-scripts.php:285
1513
  msgid "Field values do not match."
1514
  msgstr ""
1515
 
1522
  msgstr ""
1523
 
1524
  #: includes/admin/settings/class-evf-settings-validation.php:97
1525
+ #: includes/class-evf-frontend-scripts.php:286
1526
  #: includes/fields/class-evf-field-checkbox.php:421
1527
  msgid "You have exceeded number of allowed selections: {#}."
1528
  msgstr ""
1558
  msgid "Search Add-ons..."
1559
  msgstr ""
1560
 
1561
+ #: includes/admin/views/html-admin-page-addons.php:49
1562
+ #. translators: %s: Refresh URI
1563
  msgid ""
1564
  "Make your forms even more robust with our premium addons. Missing any "
1565
  "addons? Click the %1$sRefresh Add-ons%2$s button above."
1566
  msgstr ""
1567
 
1568
+ #: includes/admin/views/html-admin-page-addons.php:56
1569
  msgid "Add-ons list"
1570
  msgstr ""
1571
 
1572
+ #: includes/admin/views/html-admin-page-addons.php:77
1573
+ #: includes/admin/views/html-admin-page-entries-view.php:203
1574
  msgid "Status:"
1575
  msgstr ""
1576
 
1577
+ #: includes/admin/views/html-admin-page-addons.php:79
1578
  msgid "Activated"
1579
  msgstr ""
1580
 
1581
+ #: includes/admin/views/html-admin-page-addons.php:81
1582
  msgid "Inactive"
1583
  msgstr ""
1584
 
1585
+ #: includes/admin/views/html-admin-page-addons.php:83
1586
  msgid "Not Installed"
1587
  msgstr ""
1588
 
1589
+ #: includes/admin/views/html-admin-page-addons.php:102
1590
+ msgid "Deactivate %s now"
1591
+ msgstr ""
1592
+
1593
+ #: includes/admin/views/html-admin-page-addons.php:102
1594
  msgid "Deactivate"
1595
  msgstr ""
1596
 
1597
+ #: includes/admin/views/html-admin-page-addons.php:118
1598
+ msgid "Activate %s now"
1599
+ msgstr ""
1600
+
1601
+ #: includes/admin/views/html-admin-page-addons.php:118
1602
  msgid "Activate"
1603
  msgstr ""
1604
 
1605
+ #: includes/admin/views/html-admin-page-addons.php:120
1606
+ msgid "Install %s now"
1607
+ msgstr ""
1608
+
1609
+ #: includes/admin/views/html-admin-page-addons.php:120
1610
  msgid "Install Addon"
1611
  msgstr ""
1612
 
1613
+ #: includes/admin/views/html-admin-page-addons.php:139
1614
+ #. translators: %s: Add-ons Link
1615
  msgid ""
1616
  "Our catalog of Everest Forms Add-ons/Extensions can be found on "
1617
  "WPEverest.com here: <a href=\"%s\">Everest Forms Extensions Catalog</a>"
1742
  msgid "User:"
1743
  msgstr ""
1744
 
1745
+ #: includes/admin/views/html-admin-page-entries-view.php:187
1746
  msgid "User IP:"
1747
  msgstr ""
1748
 
1749
+ #: includes/admin/views/html-admin-page-entries-view.php:195
1750
  msgid "Referer Link:"
1751
  msgstr ""
1752
 
1753
+ #: includes/admin/views/html-admin-page-entries-view.php:204
1754
  msgid "Completed"
1755
  msgstr ""
1756
 
1795
  msgid "No file selected"
1796
  msgstr ""
1797
 
1798
+ #: includes/admin/views/html-admin-page-import.php:22
1799
+ #. translators: %s: File format
1800
+ msgid "Only %s file is allowed."
1801
+ msgstr ""
1802
+
1803
+ #: includes/admin/views/html-admin-page-import.php:26
1804
  msgid "Import Form"
1805
  msgstr ""
1806
 
1829
  msgid "Save Changes"
1830
  msgstr ""
1831
 
1832
+ #: includes/admin/views/html-notice-custom.php:12
1833
+ #: includes/admin/views/html-notice-updated.php:12
1834
  msgid "Dismiss"
1835
  msgstr ""
1836
 
1839
  msgstr ""
1840
 
1841
  #: includes/admin/views/html-notice-review.php:20
1842
+ #. translators: %1$s: Plugin Name, %2$s: Rating link
1843
+ msgid ""
1844
+ "Enjoying the experience with %1$s? Please take a moment to spread your love "
1845
+ "by rating us on %2$s"
1846
+ msgstr ""
1847
+
1848
+ #: includes/admin/views/html-notice-review.php:24
1849
  msgid "Sure, I'd love to!"
1850
  msgstr ""
1851
 
1852
+ #: includes/admin/views/html-notice-review.php:25
1853
  msgid "Remind me later"
1854
  msgstr ""
1855
 
1856
+ #: includes/admin/views/html-notice-review.php:26
1857
  msgid "I already did"
1858
  msgstr ""
1859
 
1860
+ #: includes/admin/views/html-notice-update.php:18
1861
  msgid "Everest Forms database update required"
1862
  msgstr ""
1863
 
1864
+ #: includes/admin/views/html-notice-update.php:21
1865
  msgid ""
1866
  "Everest Forms has been updated! To keep things running smoothly, we have to "
1867
  "update your database to the newest version. The database update process "
1868
  "runs in the background and may take a little while, so please be patient."
1869
  msgstr ""
1870
 
1871
+ #: includes/admin/views/html-notice-update.php:25
1872
  msgid "Update Everest Forms Database"
1873
  msgstr ""
1874
 
1875
+ #: includes/admin/views/html-notice-update.php:31
1876
  msgid ""
1877
  "It is strongly recommended that you backup your database before proceeding. "
1878
  "Are you sure you wish to run the updater now?"
1879
  msgstr ""
1880
 
1881
+ #: includes/admin/views/html-notice-updated.php:14
1882
  msgid ""
1883
  "Everest Forms data update complete. Thank you for updating to the latest "
1884
  "version!"
1885
  msgstr ""
1886
 
1887
+ #: includes/admin/views/html-notice-updating.php:12
1888
  msgid "Everest Forms data update"
1889
  msgstr ""
1890
 
1891
+ #: includes/admin/views/html-notice-updating.php:12
1892
  msgid "Your database is being updated in the background."
1893
  msgstr ""
1894
 
1895
+ #: includes/admin/views/html-notice-updating.php:12
1896
  msgid "Taking a while? Click here to run it now."
1897
  msgstr ""
1898
 
1924
  msgid "Meta Key missing"
1925
  msgstr ""
1926
 
1927
+ #: includes/class-evf-ajax.php:250
1928
+ #. translators: %s: empty meta data
1929
  msgid "Please add Meta key for fields: %s"
1930
  msgstr ""
1931
 
1932
+ #: includes/class-evf-ajax.php:269
1933
  msgid "Form not found"
1934
  msgstr ""
1935
 
1936
+ #: includes/class-evf-ajax.php:270
1937
  msgid "An error occurred while saving the form."
1938
  msgstr ""
1939
 
1965
  msgid "Unable to connect to the filesystem. Please confirm your credentials."
1966
  msgstr ""
1967
 
1968
+ #: includes/class-evf-ajax.php:534 includes/class-evf-ajax.php:574
1969
  msgid "Missing data"
1970
  msgstr ""
1971
 
1972
+ #: includes/class-evf-ajax.php:588
1973
  msgid "Connection missing"
1974
  msgstr ""
1975
 
1976
+ #: includes/class-evf-ajax.php:617
1977
  #. translators: %1$s - deactivation reason page; %2$d - deactivation url.
1978
  msgid ""
1979
  "Before we deactivate Everest Forms, would you care to <a href=\"%1$s\" "
1981
  "href=\"%2$s\">No, deactivate now</a>."
1982
  msgstr ""
1983
 
1984
+ #: includes/class-evf-cache-helper.php:81
1985
+ #. translators: 1: key 2: URL
1986
  msgid ""
1987
  "In order for <strong>database caching</strong> to work with Everest Forms "
1988
  "you must add %1$s to the \"Ignored Query Strings\" option in <a "
2036
  msgid "Form Settings"
2037
  msgstr ""
2038
 
2039
+ #: includes/class-evf-form-block.php:87 includes/class-evf-post-types.php:45
2040
  msgid "Form"
2041
  msgstr ""
2042
 
2056
  msgid "Invalid form. Please check again."
2057
  msgstr ""
2058
 
2059
+ #: includes/class-evf-form-task.php:166 includes/class-evf-form-task.php:211
2060
+ #: includes/class-evf-form-task.php:260
2061
  msgid "Form has not been submitted, please see the errors below."
2062
  msgstr ""
2063
 
2064
+ #: includes/class-evf-form-task.php:196
2065
  msgid "Incorrect reCAPTCHA, please try again."
2066
  msgstr ""
2067
 
2068
+ #: includes/class-evf-form-task.php:202
2069
  msgid "reCAPTCHA is required."
2070
  msgstr ""
2071
 
2072
+ #: includes/class-evf-form-task.php:219
2073
  msgid "Everest Forms honeypot field triggered."
2074
  msgstr ""
2075
 
2076
+ #: includes/class-evf-form-task.php:293 includes/templates/contact.php:61
2077
  msgid "Thanks for contacting us! We will be in touch with you shortly."
2078
  msgstr ""
2079
 
2080
+ #: includes/class-evf-form-task.php:573
2081
  #. translators: %s - form name.
2082
  msgid "New %s Entry"
2083
  msgstr ""
2084
 
2085
+ #: includes/class-evf-form-task.php:663
2086
  msgid "No form ID was found."
2087
  msgstr ""
2088
 
2089
+ #: includes/class-evf-form-task.php:670
2090
  msgid "Could not create an entry"
2091
  msgstr ""
2092
 
2093
+ #: includes/class-evf-frontend-scripts.php:284
2094
  msgid "Click to accept this suggestion."
2095
  msgstr ""
2096
 
2097
+ #: includes/class-evf-frontend-scripts.php:295
2098
  msgid "{count} of {limit} max characters."
2099
  msgstr ""
2100
 
2101
+ #: includes/class-evf-frontend-scripts.php:296
2102
  msgid "{count} of {limit} max words."
2103
  msgstr ""
2104
 
2105
+ #: includes/class-evf-frontend-scripts.php:304
2106
  msgid "Sorry, something went wrong. Please try again"
2107
  msgstr ""
2108
 
2110
  msgid "Monthly"
2111
  msgstr ""
2112
 
2113
+ #: includes/class-evf-install.php:575 includes/templates/contact.php:12
2114
+ msgid "Contact Form"
2115
+ msgstr ""
2116
+
2117
+ #: includes/class-evf-install.php:637
2118
  msgid "View Everest Forms Settings"
2119
  msgstr ""
2120
 
2121
+ #: includes/class-evf-install.php:653
2122
  msgid "View Everest Forms documentation"
2123
  msgstr ""
2124
 
2125
+ #: includes/class-evf-install.php:653
2126
  msgid "Docs"
2127
  msgstr ""
2128
 
2129
+ #: includes/class-evf-install.php:654
2130
  msgid "Visit free customer support"
2131
  msgstr ""
2132
 
2133
+ #: includes/class-evf-install.php:654
2134
  msgid "Free support"
2135
  msgstr ""
2136
 
2137
+ #: includes/class-evf-logger.php:54
2138
  #. translators: 1: class name 2: EVF_Log_Handler_Interface
2139
  msgid "The provided handler %1$s does not implement %2$s."
2140
  msgstr ""
2141
 
2142
+ #: includes/class-evf-logger.php:133
2143
  #. translators: 1: EVF_Logger::log 2: level
2144
  msgid "%1$s was called with an invalid level \"%2$s\"."
2145
  msgstr ""
2146
 
2147
+ #: includes/class-evf-post-types.php:44
2148
  msgid "Forms"
2149
  msgstr ""
2150
 
2151
+ #: includes/class-evf-post-types.php:49
2152
  msgid "Add new form"
2153
  msgstr ""
2154
 
2155
+ #: includes/class-evf-post-types.php:51
2156
  msgid "Edit form"
2157
  msgstr ""
2158
 
2159
+ #: includes/class-evf-post-types.php:52
2160
  msgid "New form"
2161
  msgstr ""
2162
 
2163
+ #: includes/class-evf-post-types.php:53
2164
  msgid "View form"
2165
  msgstr ""
2166
 
2167
+ #: includes/class-evf-post-types.php:54
2168
  msgid "Search forms"
2169
  msgstr ""
2170
 
2171
+ #: includes/class-evf-post-types.php:55
2172
  msgid "No forms found"
2173
  msgstr ""
2174
 
2175
+ #: includes/class-evf-post-types.php:56
2176
  msgid "No forms found in trash"
2177
  msgstr ""
2178
 
2179
+ #: includes/class-evf-post-types.php:57
2180
  msgid "Parent forms"
2181
  msgstr ""
2182
 
2183
+ #: includes/class-evf-post-types.php:58
2184
  msgid "Form image"
2185
  msgstr ""
2186
 
2187
+ #: includes/class-evf-post-types.php:59
2188
  msgid "Set form image"
2189
  msgstr ""
2190
 
2191
+ #: includes/class-evf-post-types.php:60
2192
  msgid "Remove form image"
2193
  msgstr ""
2194
 
2195
+ #: includes/class-evf-post-types.php:61
2196
  msgid "Use as form image"
2197
  msgstr ""
2198
 
2199
+ #: includes/class-evf-post-types.php:62
2200
  msgid "Insert into form"
2201
  msgstr ""
2202
 
2203
+ #: includes/class-evf-post-types.php:63
2204
  msgid "Uploaded to this form"
2205
  msgstr ""
2206
 
2207
+ #: includes/class-evf-post-types.php:64
2208
  msgid "Filter forms"
2209
  msgstr ""
2210
 
2211
+ #: includes/class-evf-post-types.php:65
2212
  msgid "Forms navigation"
2213
  msgstr ""
2214
 
2215
+ #: includes/class-evf-post-types.php:66
2216
  msgid "Forms list"
2217
  msgstr ""
2218
 
2219
+ #: includes/class-evf-post-types.php:70
2220
  msgid "This is where you can add new forms."
2221
  msgstr ""
2222
 
2429
  "Privacy Policy</a> for more details."
2430
  msgstr ""
2431
 
2432
+ #: includes/class-evf-smart-tags.php:31
2433
  msgid "Site Admin Email"
2434
  msgstr ""
2435
 
2436
+ #: includes/class-evf-smart-tags.php:32
2437
  msgid "Site Name"
2438
  msgstr ""
2439
 
2440
+ #: includes/class-evf-smart-tags.php:33
2441
  msgid "Site URL"
2442
  msgstr ""
2443
 
2444
+ #: includes/class-evf-smart-tags.php:34
2445
  msgid "Page Title"
2446
  msgstr ""
2447
 
2448
+ #: includes/class-evf-smart-tags.php:35
2449
  msgid "Page URL"
2450
  msgstr ""
2451
 
2452
+ #: includes/class-evf-smart-tags.php:36
2453
  msgid "Page ID"
2454
  msgstr ""
2455
 
2456
+ #: includes/class-evf-smart-tags.php:38
2457
  #: includes/export/class-evf-entry-csv-exporter.php:86
2458
  msgid "User IP Address"
2459
  msgstr ""
2460
 
2461
+ #: includes/class-evf-smart-tags.php:39
2462
  msgid "User ID"
2463
  msgstr ""
2464
 
2465
+ #: includes/class-evf-smart-tags.php:40
2466
  msgid "User Name"
2467
  msgstr ""
2468
 
2469
+ #: includes/class-evf-smart-tags.php:41
2470
  msgid "User Email"
2471
  msgstr ""
2472
 
2473
+ #: includes/class-evf-smart-tags.php:42
2474
  msgid "Referrer URL"
2475
  msgstr ""
2476
 
2477
+ #: includes/class-evf-template-loader.php:65
2478
+ msgid "Edit Form"
2479
+ msgstr ""
2480
+
2481
  #: includes/class-evf-template-loader.php:193
2482
  #. translators: %s - Form name.
2483
  msgid "%s &ndash; Preview"
2494
 
2495
  #: includes/evf-core-functions.php:294
2496
  #: includes/log-handlers/class-evf-log-handler-file.php:343
2497
+ #: includes/log-handlers/class-evf-log-handler-file.php:363
2498
  msgid "This method should not be called before plugins_loaded."
2499
  msgstr ""
2500
 
2504
  msgid "The class %1$s provided by %2$s filter must implement %3$s."
2505
  msgstr ""
2506
 
2507
+ #: includes/evf-core-functions.php:1557
2508
  msgid "Afghanistan"
2509
  msgstr ""
2510
 
2511
+ #: includes/evf-core-functions.php:1558
2512
  msgid "Åland Islands"
2513
  msgstr ""
2514
 
2515
+ #: includes/evf-core-functions.php:1559
2516
  msgid "Albania"
2517
  msgstr ""
2518
 
2519
+ #: includes/evf-core-functions.php:1560
2520
  msgid "Algeria"
2521
  msgstr ""
2522
 
2523
+ #: includes/evf-core-functions.php:1561
2524
  msgid "American Samoa"
2525
  msgstr ""
2526
 
2527
+ #: includes/evf-core-functions.php:1562
2528
  msgid "Andorra"
2529
  msgstr ""
2530
 
2531
+ #: includes/evf-core-functions.php:1563
2532
  msgid "Angola"
2533
  msgstr ""
2534
 
2535
+ #: includes/evf-core-functions.php:1564
2536
  msgid "Anguilla"
2537
  msgstr ""
2538
 
2539
+ #: includes/evf-core-functions.php:1565
2540
  msgid "Antarctica"
2541
  msgstr ""
2542
 
2543
+ #: includes/evf-core-functions.php:1566
2544
  msgid "Antigua and Barbuda"
2545
  msgstr ""
2546
 
2547
+ #: includes/evf-core-functions.php:1567
2548
  msgid "Argentina"
2549
  msgstr ""
2550
 
2551
+ #: includes/evf-core-functions.php:1568
2552
  msgid "Armenia"
2553
  msgstr ""
2554
 
2555
+ #: includes/evf-core-functions.php:1569
2556
  msgid "Aruba"
2557
  msgstr ""
2558
 
2559
+ #: includes/evf-core-functions.php:1570
2560
  msgid "Australia"
2561
  msgstr ""
2562
 
2563
+ #: includes/evf-core-functions.php:1571
2564
  msgid "Austria"
2565
  msgstr ""
2566
 
2567
+ #: includes/evf-core-functions.php:1572
2568
  msgid "Azerbaijan"
2569
  msgstr ""
2570
 
2571
+ #: includes/evf-core-functions.php:1573
2572
  msgid "Bahamas"
2573
  msgstr ""
2574
 
2575
+ #: includes/evf-core-functions.php:1574
2576
  msgid "Bahrain"
2577
  msgstr ""
2578
 
2579
+ #: includes/evf-core-functions.php:1575
2580
  msgid "Bangladesh"
2581
  msgstr ""
2582
 
2583
+ #: includes/evf-core-functions.php:1576
2584
  msgid "Barbados"
2585
  msgstr ""
2586
 
2587
+ #: includes/evf-core-functions.php:1577
2588
  msgid "Belarus"
2589
  msgstr ""
2590
 
2591
+ #: includes/evf-core-functions.php:1578
2592
  msgid "Belgium"
2593
  msgstr ""
2594
 
2595
+ #: includes/evf-core-functions.php:1579
2596
  msgid "Belize"
2597
  msgstr ""
2598
 
2599
+ #: includes/evf-core-functions.php:1580
2600
  msgid "Benin"
2601
  msgstr ""
2602
 
2603
+ #: includes/evf-core-functions.php:1581
2604
  msgid "Bermuda"
2605
  msgstr ""
2606
 
2607
+ #: includes/evf-core-functions.php:1582
2608
  msgid "Bhutan"
2609
  msgstr ""
2610
 
2611
+ #: includes/evf-core-functions.php:1583
2612
  msgid "Bolivia (Plurinational State of)"
2613
  msgstr ""
2614
 
2615
+ #: includes/evf-core-functions.php:1584
2616
  msgid "Bosnia and Herzegovina"
2617
  msgstr ""
2618
 
2619
+ #: includes/evf-core-functions.php:1585
2620
  msgid "Botswana"
2621
  msgstr ""
2622
 
2623
+ #: includes/evf-core-functions.php:1586
2624
  msgid "Bouvet Island"
2625
  msgstr ""
2626
 
2627
+ #: includes/evf-core-functions.php:1587
2628
  msgid "Brazil"
2629
  msgstr ""
2630
 
2631
+ #: includes/evf-core-functions.php:1588
2632
  msgid "British Indian Ocean Territory"
2633
  msgstr ""
2634
 
2635
+ #: includes/evf-core-functions.php:1589
2636
  msgid "Brunei Darussalam"
2637
  msgstr ""
2638
 
2639
+ #: includes/evf-core-functions.php:1590
2640
  msgid "Bulgaria"
2641
  msgstr ""
2642
 
2643
+ #: includes/evf-core-functions.php:1591
2644
  msgid "Burkina Faso"
2645
  msgstr ""
2646
 
2647
+ #: includes/evf-core-functions.php:1592
2648
  msgid "Burundi"
2649
  msgstr ""
2650
 
2651
+ #: includes/evf-core-functions.php:1593
2652
  msgid "Cabo Verde"
2653
  msgstr ""
2654
 
2655
+ #: includes/evf-core-functions.php:1594
2656
  msgid "Cambodia"
2657
  msgstr ""
2658
 
2659
+ #: includes/evf-core-functions.php:1595
2660
  msgid "Cameroon"
2661
  msgstr ""
2662
 
2663
+ #: includes/evf-core-functions.php:1596
2664
  msgid "Canada"
2665
  msgstr ""
2666
 
2667
+ #: includes/evf-core-functions.php:1597
2668
  msgid "Cayman Islands"
2669
  msgstr ""
2670
 
2671
+ #: includes/evf-core-functions.php:1598
2672
  msgid "Central African Republic"
2673
  msgstr ""
2674
 
2675
+ #: includes/evf-core-functions.php:1599
2676
  msgid "Chad"
2677
  msgstr ""
2678
 
2679
+ #: includes/evf-core-functions.php:1600
2680
  msgid "Chile"
2681
  msgstr ""
2682
 
2683
+ #: includes/evf-core-functions.php:1601
2684
  msgid "China"
2685
  msgstr ""
2686
 
2687
+ #: includes/evf-core-functions.php:1602
2688
  msgid "Christmas Island"
2689
  msgstr ""
2690
 
2691
+ #: includes/evf-core-functions.php:1603
2692
  msgid "Cocos (Keeling) Islands"
2693
  msgstr ""
2694
 
2695
+ #: includes/evf-core-functions.php:1604
2696
  msgid "Colombia"
2697
  msgstr ""
2698
 
2699
+ #: includes/evf-core-functions.php:1605
2700
  msgid "Comoros"
2701
  msgstr ""
2702
 
2703
+ #: includes/evf-core-functions.php:1606
2704
  msgid "Congo"
2705
  msgstr ""
2706
 
2707
+ #: includes/evf-core-functions.php:1607
2708
  msgid "Congo (Democratic Republic of the)"
2709
  msgstr ""
2710
 
2711
+ #: includes/evf-core-functions.php:1608
2712
  msgid "Cook Islands"
2713
  msgstr ""
2714
 
2715
+ #: includes/evf-core-functions.php:1609
2716
  msgid "Costa Rica"
2717
  msgstr ""
2718
 
2719
+ #: includes/evf-core-functions.php:1610
2720
  msgid "Côte d'Ivoire"
2721
  msgstr ""
2722
 
2723
+ #: includes/evf-core-functions.php:1611
2724
  msgid "Croatia"
2725
  msgstr ""
2726
 
2727
+ #: includes/evf-core-functions.php:1612
2728
  msgid "Cuba"
2729
  msgstr ""
2730
 
2731
+ #: includes/evf-core-functions.php:1613
2732
  msgid "Curaçao"
2733
  msgstr ""
2734
 
2735
+ #: includes/evf-core-functions.php:1614
2736
  msgid "Cyprus"
2737
  msgstr ""
2738
 
2739
+ #: includes/evf-core-functions.php:1615
2740
  msgid "Czech Republic"
2741
  msgstr ""
2742
 
2743
+ #: includes/evf-core-functions.php:1616
2744
  msgid "Denmark"
2745
  msgstr ""
2746
 
2747
+ #: includes/evf-core-functions.php:1617
2748
  msgid "Djibouti"
2749
  msgstr ""
2750
 
2751
+ #: includes/evf-core-functions.php:1618
2752
  msgid "Dominica"
2753
  msgstr ""
2754
 
2755
+ #: includes/evf-core-functions.php:1619
2756
  msgid "Dominican Republic"
2757
  msgstr ""
2758
 
2759
+ #: includes/evf-core-functions.php:1620
2760
  msgid "Ecuador"
2761
  msgstr ""
2762
 
2763
+ #: includes/evf-core-functions.php:1621
2764
  msgid "Egypt"
2765
  msgstr ""
2766
 
2767
+ #: includes/evf-core-functions.php:1622
2768
  msgid "El Salvador"
2769
  msgstr ""
2770
 
2771
+ #: includes/evf-core-functions.php:1623
2772
  msgid "Equatorial Guinea"
2773
  msgstr ""
2774
 
2775
+ #: includes/evf-core-functions.php:1624
2776
  msgid "Eritrea"
2777
  msgstr ""
2778
 
2779
+ #: includes/evf-core-functions.php:1625
2780
  msgid "Estonia"
2781
  msgstr ""
2782
 
2783
+ #: includes/evf-core-functions.php:1626
2784
  msgid "Ethiopia"
2785
  msgstr ""
2786
 
2787
+ #: includes/evf-core-functions.php:1627
2788
  msgid "Falkland Islands (Malvinas)"
2789
  msgstr ""
2790
 
2791
+ #: includes/evf-core-functions.php:1628
2792
  msgid "Faroe Islands"
2793
  msgstr ""
2794
 
2795
+ #: includes/evf-core-functions.php:1629
2796
  msgid "Fiji"
2797
  msgstr ""
2798
 
2799
+ #: includes/evf-core-functions.php:1630
2800
  msgid "Finland"
2801
  msgstr ""
2802
 
2803
+ #: includes/evf-core-functions.php:1631
2804
  msgid "France"
2805
  msgstr ""
2806
 
2807
+ #: includes/evf-core-functions.php:1632
2808
  msgid "French Guiana"
2809
  msgstr ""
2810
 
2811
+ #: includes/evf-core-functions.php:1633
2812
  msgid "French Polynesia"
2813
  msgstr ""
2814
 
2815
+ #: includes/evf-core-functions.php:1634
2816
  msgid "French Southern Territories"
2817
  msgstr ""
2818
 
2819
+ #: includes/evf-core-functions.php:1635
2820
  msgid "Gabon"
2821
  msgstr ""
2822
 
2823
+ #: includes/evf-core-functions.php:1636
2824
  msgid "Gambia"
2825
  msgstr ""
2826
 
2827
+ #: includes/evf-core-functions.php:1638
2828
  msgid "Germany"
2829
  msgstr ""
2830
 
2831
+ #: includes/evf-core-functions.php:1639
2832
  msgid "Ghana"
2833
  msgstr ""
2834
 
2835
+ #: includes/evf-core-functions.php:1640
2836
  msgid "Gibraltar"
2837
  msgstr ""
2838
 
2839
+ #: includes/evf-core-functions.php:1641
2840
  msgid "Greece"
2841
  msgstr ""
2842
 
2843
+ #: includes/evf-core-functions.php:1642
2844
  msgid "Greenland"
2845
  msgstr ""
2846
 
2847
+ #: includes/evf-core-functions.php:1643
2848
  msgid "Grenada"
2849
  msgstr ""
2850
 
2851
+ #: includes/evf-core-functions.php:1644
2852
  msgid "Guadeloupe"
2853
  msgstr ""
2854
 
2855
+ #: includes/evf-core-functions.php:1645
2856
  msgid "Guam"
2857
  msgstr ""
2858
 
2859
+ #: includes/evf-core-functions.php:1646
2860
  msgid "Guatemala"
2861
  msgstr ""
2862
 
2863
+ #: includes/evf-core-functions.php:1647
2864
  msgid "Guernsey"
2865
  msgstr ""
2866
 
2867
+ #: includes/evf-core-functions.php:1648
2868
  msgid "Guinea"
2869
  msgstr ""
2870
 
2871
+ #: includes/evf-core-functions.php:1649
2872
  msgid "Guinea-Bissau"
2873
  msgstr ""
2874
 
2875
+ #: includes/evf-core-functions.php:1650
2876
  msgid "Guyana"
2877
  msgstr ""
2878
 
2879
+ #: includes/evf-core-functions.php:1651
2880
  msgid "Haiti"
2881
  msgstr ""
2882
 
2883
+ #: includes/evf-core-functions.php:1652
2884
  msgid "Heard Island and McDonald Islands"
2885
  msgstr ""
2886
 
2887
+ #: includes/evf-core-functions.php:1653
2888
  msgid "Honduras"
2889
  msgstr ""
2890
 
2891
+ #: includes/evf-core-functions.php:1654
2892
  msgid "Hong Kong"
2893
  msgstr ""
2894
 
2895
+ #: includes/evf-core-functions.php:1655
2896
  msgid "Hungary"
2897
  msgstr ""
2898
 
2899
+ #: includes/evf-core-functions.php:1656
2900
  msgid "Iceland"
2901
  msgstr ""
2902
 
2903
+ #: includes/evf-core-functions.php:1657
2904
  msgid "India"
2905
  msgstr ""
2906
 
2907
+ #: includes/evf-core-functions.php:1658
2908
  msgid "Indonesia"
2909
  msgstr ""
2910
 
2911
+ #: includes/evf-core-functions.php:1659
2912
  msgid "Iran (Islamic Republic of)"
2913
  msgstr ""
2914
 
2915
+ #: includes/evf-core-functions.php:1660
2916
  msgid "Iraq"
2917
  msgstr ""
2918
 
2919
+ #: includes/evf-core-functions.php:1661
2920
  msgid "Ireland (Republic of)"
2921
  msgstr ""
2922
 
2923
+ #: includes/evf-core-functions.php:1662
2924
  msgid "Isle of Man"
2925
  msgstr ""
2926
 
2927
+ #: includes/evf-core-functions.php:1663
2928
  msgid "Israel"
2929
  msgstr ""
2930
 
2931
+ #: includes/evf-core-functions.php:1664
2932
  msgid "Italy"
2933
  msgstr ""
2934
 
2935
+ #: includes/evf-core-functions.php:1665
2936
  msgid "Jamaica"
2937
  msgstr ""
2938
 
2939
+ #: includes/evf-core-functions.php:1666
2940
  msgid "Japan"
2941
  msgstr ""
2942
 
2943
+ #: includes/evf-core-functions.php:1667
2944
  msgid "Jersey"
2945
  msgstr ""
2946
 
2947
+ #: includes/evf-core-functions.php:1668
2948
  msgid "Jordan"
2949
  msgstr ""
2950
 
2951
+ #: includes/evf-core-functions.php:1669
2952
  msgid "Kazakhstan"
2953
  msgstr ""
2954
 
2955
+ #: includes/evf-core-functions.php:1670
2956
  msgid "Kenya"
2957
  msgstr ""
2958
 
2959
+ #: includes/evf-core-functions.php:1671
2960
  msgid "Kiribati"
2961
  msgstr ""
2962
 
2963
+ #: includes/evf-core-functions.php:1672
2964
  msgid "Korea (Democratic People's Republic of)"
2965
  msgstr ""
2966
 
2967
+ #: includes/evf-core-functions.php:1673
2968
  msgid "Korea (Republic of)"
2969
  msgstr ""
2970
 
2971
+ #: includes/evf-core-functions.php:1674
2972
  msgid "Kuwait"
2973
  msgstr ""
2974
 
2975
+ #: includes/evf-core-functions.php:1675
2976
  msgid "Kyrgyzstan"
2977
  msgstr ""
2978
 
2979
+ #: includes/evf-core-functions.php:1676
2980
  msgid "Lao People's Democratic Republic"
2981
  msgstr ""
2982
 
2983
+ #: includes/evf-core-functions.php:1677
2984
  msgid "Latvia"
2985
  msgstr ""
2986
 
2987
+ #: includes/evf-core-functions.php:1678
2988
  msgid "Lebanon"
2989
  msgstr ""
2990
 
2991
+ #: includes/evf-core-functions.php:1679
2992
  msgid "Lesotho"
2993
  msgstr ""
2994
 
2995
+ #: includes/evf-core-functions.php:1680
2996
  msgid "Liberia"
2997
  msgstr ""
2998
 
2999
+ #: includes/evf-core-functions.php:1681
3000
  msgid "Libya"
3001
  msgstr ""
3002
 
3003
+ #: includes/evf-core-functions.php:1682
3004
  msgid "Liechtenstein"
3005
  msgstr ""
3006
 
3007
+ #: includes/evf-core-functions.php:1683
3008
  msgid "Lithuania"
3009
  msgstr ""
3010
 
3011
+ #: includes/evf-core-functions.php:1684
3012
  msgid "Luxembourg"
3013
  msgstr ""
3014
 
3015
+ #: includes/evf-core-functions.php:1685
3016
  msgid "Macao"
3017
  msgstr ""
3018
 
3019
+ #: includes/evf-core-functions.php:1686
3020
  msgid "Macedonia (Republic of)"
3021
  msgstr ""
3022
 
3023
+ #: includes/evf-core-functions.php:1687
3024
  msgid "Madagascar"
3025
  msgstr ""
3026
 
3027
+ #: includes/evf-core-functions.php:1688
3028
  msgid "Malawi"
3029
  msgstr ""
3030
 
3031
+ #: includes/evf-core-functions.php:1689
3032
  msgid "Malaysia"
3033
  msgstr ""
3034
 
3035
+ #: includes/evf-core-functions.php:1690
3036
  msgid "Maldives"
3037
  msgstr ""
3038
 
3039
+ #: includes/evf-core-functions.php:1691
3040
  msgid "Mali"
3041
  msgstr ""
3042
 
3043
+ #: includes/evf-core-functions.php:1692
3044
  msgid "Malta"
3045
  msgstr ""
3046
 
3047
+ #: includes/evf-core-functions.php:1693
3048
  msgid "Marshall Islands"
3049
  msgstr ""
3050
 
3051
+ #: includes/evf-core-functions.php:1694
3052
  msgid "Martinique"
3053
  msgstr ""
3054
 
3055
+ #: includes/evf-core-functions.php:1695
3056
  msgid "Mauritania"
3057
  msgstr ""
3058
 
3059
+ #: includes/evf-core-functions.php:1696
3060
  msgid "Mauritius"
3061
  msgstr ""
3062
 
3063
+ #: includes/evf-core-functions.php:1697
3064
  msgid "Mayotte"
3065
  msgstr ""
3066
 
3067
+ #: includes/evf-core-functions.php:1698
3068
  msgid "Mexico"
3069
  msgstr ""
3070
 
3071
+ #: includes/evf-core-functions.php:1699
3072
  msgid "Micronesia (Federated States of)"
3073
  msgstr ""
3074
 
3075
+ #: includes/evf-core-functions.php:1700
3076
  msgid "Moldova (Republic of)"
3077
  msgstr ""
3078
 
3079
+ #: includes/evf-core-functions.php:1701
3080
  msgid "Monaco"
3081
  msgstr ""
3082
 
3083
+ #: includes/evf-core-functions.php:1702
3084
  msgid "Mongolia"
3085
  msgstr ""
3086
 
3087
+ #: includes/evf-core-functions.php:1703
3088
  msgid "Montenegro"
3089
  msgstr ""
3090
 
3091
+ #: includes/evf-core-functions.php:1704
3092
  msgid "Montserrat"
3093
  msgstr ""
3094
 
3095
+ #: includes/evf-core-functions.php:1705
3096
  msgid "Morocco"
3097
  msgstr ""
3098
 
3099
+ #: includes/evf-core-functions.php:1706
3100
  msgid "Mozambique"
3101
  msgstr ""
3102
 
3103
+ #: includes/evf-core-functions.php:1707
3104
  msgid "Myanmar"
3105
  msgstr ""
3106
 
3107
+ #: includes/evf-core-functions.php:1708
3108
  msgid "Namibia"
3109
  msgstr ""
3110
 
3111
+ #: includes/evf-core-functions.php:1709
3112
  msgid "Nauru"
3113
  msgstr ""
3114
 
3115
+ #: includes/evf-core-functions.php:1710
3116
  msgid "Nepal"
3117
  msgstr ""
3118
 
3119
+ #: includes/evf-core-functions.php:1711
3120
  msgid "Netherlands"
3121
  msgstr ""
3122
 
3123
+ #: includes/evf-core-functions.php:1712
3124
  msgid "New Caledonia"
3125
  msgstr ""
3126
 
3127
+ #: includes/evf-core-functions.php:1713
3128
  msgid "New Zealand"
3129
  msgstr ""
3130
 
3131
+ #: includes/evf-core-functions.php:1714
3132
  msgid "Nicaragua"
3133
  msgstr ""
3134
 
3135
+ #: includes/evf-core-functions.php:1715
3136
  msgid "Niger"
3137
  msgstr ""
3138
 
3139
+ #: includes/evf-core-functions.php:1716
3140
  msgid "Nigeria"
3141
  msgstr ""
3142
 
3143
+ #: includes/evf-core-functions.php:1717
3144
  msgid "Niue"
3145
  msgstr ""
3146
 
3147
+ #: includes/evf-core-functions.php:1718
3148
  msgid "Norfolk Island"
3149
  msgstr ""
3150
 
3151
+ #: includes/evf-core-functions.php:1719
3152
  msgid "Northern Mariana Islands"
3153
  msgstr ""
3154
 
3155
+ #: includes/evf-core-functions.php:1720
3156
  msgid "Norway"
3157
  msgstr ""
3158
 
3159
+ #: includes/evf-core-functions.php:1721
3160
  msgid "Oman"
3161
  msgstr ""
3162
 
3163
+ #: includes/evf-core-functions.php:1722
3164
  msgid "Pakistan"
3165
  msgstr ""
3166
 
3167
+ #: includes/evf-core-functions.php:1723
3168
  msgid "Palau"
3169
  msgstr ""
3170
 
3171
+ #: includes/evf-core-functions.php:1724
3172
  msgid "Palestine (State of)"
3173
  msgstr ""
3174
 
3175
+ #: includes/evf-core-functions.php:1725
3176
  msgid "Panama"
3177
  msgstr ""
3178
 
3179
+ #: includes/evf-core-functions.php:1726
3180
  msgid "Papua New Guinea"
3181
  msgstr ""
3182
 
3183
+ #: includes/evf-core-functions.php:1727
3184
  msgid "Paraguay"
3185
  msgstr ""
3186
 
3187
+ #: includes/evf-core-functions.php:1728
3188
  msgid "Peru"
3189
  msgstr ""
3190
 
3191
+ #: includes/evf-core-functions.php:1729
3192
  msgid "Philippines"
3193
  msgstr ""
3194
 
3195
+ #: includes/evf-core-functions.php:1730
3196
  msgid "Pitcairn"
3197
  msgstr ""
3198
 
3199
+ #: includes/evf-core-functions.php:1731
3200
  msgid "Poland"
3201
  msgstr ""
3202
 
3203
+ #: includes/evf-core-functions.php:1732
3204
  msgid "Portugal"
3205
  msgstr ""
3206
 
3207
+ #: includes/evf-core-functions.php:1733
3208
  msgid "Puerto Rico"
3209
  msgstr ""
3210
 
3211
+ #: includes/evf-core-functions.php:1734
3212
  msgid "Qatar"
3213
  msgstr ""
3214
 
3215
+ #: includes/evf-core-functions.php:1735
3216
  msgid "Réunion"
3217
  msgstr ""
3218
 
3219
+ #: includes/evf-core-functions.php:1736
3220
  msgid "Romania"
3221
  msgstr ""
3222
 
3223
+ #: includes/evf-core-functions.php:1737
3224
  msgid "Russian Federation"
3225
  msgstr ""
3226
 
3227
+ #: includes/evf-core-functions.php:1738
3228
  msgid "Rwanda"
3229
  msgstr ""
3230
 
3231
+ #: includes/evf-core-functions.php:1739
3232
  msgid "Saint Barthélemy"
3233
  msgstr ""
3234
 
3235
+ #: includes/evf-core-functions.php:1740
3236
  msgid "Saint Helena, Ascension and Tristan da Cunha"
3237
  msgstr ""
3238
 
3239
+ #: includes/evf-core-functions.php:1741
3240
  msgid "Saint Kitts and Nevis"
3241
  msgstr ""
3242
 
3243
+ #: includes/evf-core-functions.php:1742
3244
  msgid "Saint Lucia"
3245
  msgstr ""
3246
 
3247
+ #: includes/evf-core-functions.php:1743
3248
  msgid "Saint Martin (French part)"
3249
  msgstr ""
3250
 
3251
+ #: includes/evf-core-functions.php:1744
3252
  msgid "Saint Pierre and Miquelon"
3253
  msgstr ""
3254
 
3255
+ #: includes/evf-core-functions.php:1745
3256
  msgid "Saint Vincent and the Grenadines"
3257
  msgstr ""
3258
 
3259
+ #: includes/evf-core-functions.php:1746
3260
  msgid "Samoa"
3261
  msgstr ""
3262
 
3263
+ #: includes/evf-core-functions.php:1747
3264
  msgid "San Marino"
3265
  msgstr ""
3266
 
3267
+ #: includes/evf-core-functions.php:1748
3268
  msgid "Sao Tome and Principe"
3269
  msgstr ""
3270
 
3271
+ #: includes/evf-core-functions.php:1749
3272
  msgid "Saudi Arabia"
3273
  msgstr ""
3274
 
3275
+ #: includes/evf-core-functions.php:1750
3276
  msgid "Senegal"
3277
  msgstr ""
3278
 
3279
+ #: includes/evf-core-functions.php:1751
3280
  msgid "Serbia"
3281
  msgstr ""
3282
 
3283
+ #: includes/evf-core-functions.php:1752
3284
  msgid "Seychelles"
3285
  msgstr ""
3286
 
3287
+ #: includes/evf-core-functions.php:1753
3288
  msgid "Sierra Leone"
3289
  msgstr ""
3290
 
3291
+ #: includes/evf-core-functions.php:1754
3292
  msgid "Singapore"
3293
  msgstr ""
3294
 
3295
+ #: includes/evf-core-functions.php:1755
3296
  msgid "Sint Maarten (Dutch part)"
3297
  msgstr ""
3298
 
3299
+ #: includes/evf-core-functions.php:1756
3300
  msgid "Slovakia"
3301
  msgstr ""
3302
 
3303
+ #: includes/evf-core-functions.php:1757
3304
  msgid "Slovenia"
3305
  msgstr ""
3306
 
3307
+ #: includes/evf-core-functions.php:1758
3308
  msgid "Solomon Islands"
3309
  msgstr ""
3310
 
3311
+ #: includes/evf-core-functions.php:1759
3312
  msgid "Somalia"
3313
  msgstr ""
3314
 
3315
+ #: includes/evf-core-functions.php:1760
3316
  msgid "South Africa"
3317
  msgstr ""
3318
 
3319
+ #: includes/evf-core-functions.php:1761
3320
  msgid "South Georgia and the South Sandwich Islands"
3321
  msgstr ""
3322
 
3323
+ #: includes/evf-core-functions.php:1762
3324
  msgid "South Sudan"
3325
  msgstr ""
3326
 
3327
+ #: includes/evf-core-functions.php:1763
3328
  msgid "Spain"
3329
  msgstr ""
3330
 
3331
+ #: includes/evf-core-functions.php:1764
3332
  msgid "Sri Lanka"
3333
  msgstr ""
3334
 
3335
+ #: includes/evf-core-functions.php:1765
3336
  msgid "Sudan"
3337
  msgstr ""
3338
 
3339
+ #: includes/evf-core-functions.php:1766
3340
  msgid "Suriname"
3341
  msgstr ""
3342
 
3343
+ #: includes/evf-core-functions.php:1767
3344
  msgid "Svalbard and Jan Mayen"
3345
  msgstr ""
3346
 
3347
+ #: includes/evf-core-functions.php:1768
3348
  msgid "Swaziland"
3349
  msgstr ""
3350
 
3351
+ #: includes/evf-core-functions.php:1769
3352
  msgid "Sweden"
3353
  msgstr ""
3354
 
3355
+ #: includes/evf-core-functions.php:1770
3356
  msgid "Switzerland"
3357
  msgstr ""
3358
 
3359
+ #: includes/evf-core-functions.php:1771
3360
  msgid "Syrian Arab Republic"
3361
  msgstr ""
3362
 
3363
+ #: includes/evf-core-functions.php:1772
3364
  msgid "Taiwan, Province of China"
3365
  msgstr ""
3366
 
3367
+ #: includes/evf-core-functions.php:1773
3368
  msgid "Tajikistan"
3369
  msgstr ""
3370
 
3371
+ #: includes/evf-core-functions.php:1774
3372
  msgid "Tanzania (United Republic of)"
3373
  msgstr ""
3374
 
3375
+ #: includes/evf-core-functions.php:1775
3376
  msgid "Thailand"
3377
  msgstr ""
3378
 
3379
+ #: includes/evf-core-functions.php:1776
3380
  msgid "Timor-Leste"
3381
  msgstr ""
3382
 
3383
+ #: includes/evf-core-functions.php:1777
3384
  msgid "Togo"
3385
  msgstr ""
3386
 
3387
+ #: includes/evf-core-functions.php:1778
3388
  msgid "Tokelau"
3389
  msgstr ""
3390
 
3391
+ #: includes/evf-core-functions.php:1779
3392
  msgid "Tonga"
3393
  msgstr ""
3394
 
3395
+ #: includes/evf-core-functions.php:1780
3396
  msgid "Trinidad and Tobago"
3397
  msgstr ""
3398
 
3399
+ #: includes/evf-core-functions.php:1781
3400
  msgid "Tunisia"
3401
  msgstr ""
3402
 
3403
+ #: includes/evf-core-functions.php:1782
3404
  msgid "Turkey"
3405
  msgstr ""
3406
 
3407
+ #: includes/evf-core-functions.php:1783
3408
  msgid "Turkmenistan"
3409
  msgstr ""
3410
 
3411
+ #: includes/evf-core-functions.php:1784
3412
  msgid "Turks and Caicos Islands"
3413
  msgstr ""
3414
 
3415
+ #: includes/evf-core-functions.php:1785
3416
  msgid "Tuvalu"
3417
  msgstr ""
3418
 
3419
+ #: includes/evf-core-functions.php:1786
3420
  msgid "Uganda"
3421
  msgstr ""
3422
 
3423
+ #: includes/evf-core-functions.php:1787
3424
  msgid "Ukraine"
3425
  msgstr ""
3426
 
3427
+ #: includes/evf-core-functions.php:1788
3428
  msgid "United Arab Emirates"
3429
  msgstr ""
3430
 
3431
+ #: includes/evf-core-functions.php:1789
3432
  msgid "United Kingdom of Great Britain and Northern Ireland"
3433
  msgstr ""
3434
 
3435
+ #: includes/evf-core-functions.php:1790
3436
  msgid "United States of America"
3437
  msgstr ""
3438
 
3439
+ #: includes/evf-core-functions.php:1791
3440
  msgid "United States Minor Outlying Islands"
3441
  msgstr ""
3442
 
3443
+ #: includes/evf-core-functions.php:1792
3444
  msgid "Uruguay"
3445
  msgstr ""
3446
 
3447
+ #: includes/evf-core-functions.php:1793
3448
  msgid "Uzbekistan"
3449
  msgstr ""
3450
 
3451
+ #: includes/evf-core-functions.php:1794
3452
  msgid "Vanuatu"
3453
  msgstr ""
3454
 
3455
+ #: includes/evf-core-functions.php:1795
3456
  msgid "Vatican City State"
3457
  msgstr ""
3458
 
3459
+ #: includes/evf-core-functions.php:1796
3460
  msgid "Venezuela (Bolivarian Republic of)"
3461
  msgstr ""
3462
 
3463
+ #: includes/evf-core-functions.php:1797
3464
  msgid "Viet Nam"
3465
  msgstr ""
3466
 
3467
+ #: includes/evf-core-functions.php:1798
3468
  msgid "Virgin Islands (British)"
3469
  msgstr ""
3470
 
3471
+ #: includes/evf-core-functions.php:1799
3472
  msgid "Virgin Islands (U.S.)"
3473
  msgstr ""
3474
 
3475
+ #: includes/evf-core-functions.php:1800
3476
  msgid "Wallis and Futuna"
3477
  msgstr ""
3478
 
3479
+ #: includes/evf-core-functions.php:1801
3480
  msgid "Western Sahara"
3481
  msgstr ""
3482
 
3483
+ #: includes/evf-core-functions.php:1802
3484
  msgid "Yemen"
3485
  msgstr ""
3486
 
3487
+ #: includes/evf-core-functions.php:1803
3488
  msgid "Zambia"
3489
  msgstr ""
3490
 
3491
+ #: includes/evf-core-functions.php:1804
3492
  msgid "Zimbabwe"
3493
  msgstr ""
3494
 
3495
+ #: includes/evf-core-functions.php:1819
3496
  msgid "General Fields"
3497
  msgstr ""
3498
 
3499
+ #: includes/evf-core-functions.php:1820
3500
  msgid "Advanced Fields"
3501
  msgstr ""
3502
 
3503
+ #: includes/evf-core-functions.php:1821
3504
  msgid "Payment Fields"
3505
  msgstr ""
3506
 
3507
+ #: includes/evf-core-functions.php:1822
3508
  msgid "Survey Fields"
3509
  msgstr ""
3510
 
3511
+ #: includes/evf-core-functions.php:1873
3512
  msgid "Check this option to mark the field required."
3513
  msgstr ""
3514
 
3515
+ #: includes/evf-core-functions.php:1884
3516
  #: includes/fields/class-evf-field-checkbox.php:27
3517
  #: includes/fields/class-evf-field-radio.php:27
3518
  msgid "First Choice"
3519
  msgstr ""
3520
 
3521
+ #: includes/evf-core-functions.php:1885
3522
  #: includes/fields/class-evf-field-checkbox.php:33
3523
  #: includes/fields/class-evf-field-radio.php:33
3524
  msgid "Second Choice"
3525
  msgstr ""
3526
 
3527
+ #: includes/evf-core-functions.php:1886
3528
  #: includes/fields/class-evf-field-checkbox.php:39
3529
  #: includes/fields/class-evf-field-radio.php:39
3530
  msgid "Third Choice"
3531
  msgstr ""
3532
 
3533
+ #: includes/evf-core-functions.php:1900
3534
  msgid ""
3535
  "Enter CSS class for this field container. Class names should be separated "
3536
  "with spaces."
3540
  msgid "Published"
3541
  msgstr ""
3542
 
3543
+ #: includes/evf-notice-functions.php:23 includes/evf-notice-functions.php:54
3544
+ #: includes/evf-notice-functions.php:73 includes/evf-notice-functions.php:97
3545
+ #: includes/evf-notice-functions.php:110 includes/evf-notice-functions.php:125
3546
+ #: includes/evf-notice-functions.php:185
3547
  msgid "This function should not be called before everest_forms_init."
3548
  msgstr ""
3549
 
3749
  msgid "Enter text for the confirmation field placeholder."
3750
  msgstr ""
3751
 
3752
+ #: includes/fields/class-evf-field-email.php:374
3753
  msgid "Confirmation Email do not match."
3754
  msgstr ""
3755
 
3917
  msgid "Every %d Minutes"
3918
  msgstr ""
3919
 
 
 
 
 
3920
  #: templates/emails/footer-default.php:45
3921
  #. translators: %s - link to a site.
3922
  msgid "Sent from %s"
4012
  msgid "%s template"
4013
  msgstr ""
4014
 
4015
+ #: includes/class-evf-post-types.php:47
4016
  msgctxt "Admin menu name"
4017
  msgid "Forms"
4018
  msgstr ""
4019
 
4020
+ #: includes/evf-core-functions.php:1637
4021
  msgctxt "Country"
4022
  msgid "Georgia"
4023
  msgstr ""
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: contact form, forms, form builder, contact, custom form
4
  Requires at least: 5.0
5
  Tested up to: 5.3
6
  Requires PHP: 5.4
7
- Stable tag: 1.6.1
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -18,7 +18,7 @@ Everest Forms is specially designed keeping the usability, simplicity in mind. T
18
 
19
  Multiple column forms can be designed with a click. Pre-built templates and design layouts allow you to create forms that look different yet beautiful.
20
 
21
- View [All features](https://wpeverest.com/wordpress-plugins/everest-forms/?utm_source=wporg&utm_medium=link&utm_campaign=everest-forms-readme)
22
 
23
  View [Demo](http://demo.wpeverest.com/everest-forms/)
24
 
@@ -57,33 +57,33 @@ Check [documentation](http://docs.wpeverest.com/docs/everest-forms/)
57
 
58
  * 11 Advanced fields: **Image upload, File upload, Hidden Field, Phone, Password, Custom HTML, Section Title, Signature, Address, Country, Rating**
59
 
60
- * [Style Customizer](https://wpeverest.com/wordpress-plugins/everest-forms/style-customizer/?utm_source=wporg&utm_medium=link&utm_campaign=everest-forms-readme) - Allows you to make form design changes like color, fonts, spacing, background, borders, alignments and much more without touching any code.
61
 
62
- * [MailChimp](https://wpeverest.com/wordpress-plugins/everest-forms/mailchimp/?utm_source=wporg&utm_medium=link&utm_campaign=everest-forms-readme) - Allows your users to subscribe to MailChimp through form submission via Everest Forms.
63
 
64
- * [ConvertKit](https://wpeverest.com/wordpress-plugins/everest-forms/convertkit/?utm_source=wporg&utm_medium=link&utm_campaign=everest-forms-readme) - Allows you to connect your form with ConvertKit to efficiently grow your business by generating more leads.
65
 
66
- * [PDF Form Submission](https://wpeverest.com/wordpress-plugins/everest-forms/pdf-form-submission/?utm_source=wporg&utm_medium=link&utm_campaign=everest-forms-readme) - Allows you to generate digital PDF documents of any form submission to export or send a PDF copy of it via email attachment.
67
 
68
- * [PayPal Standard](https://wpeverest.com/wordpress-plugins/everest-forms/paypal-standard/?utm_source=wporg&utm_medium=link&utm_campaign=everest-forms-readme) - Allows you to connect your forms with PayPal to easily collect payments, donations, and online orders. Check our article on [accepting PayPal payment via WordPress Forms](https://wpeverest.com/blog/wordpress-form-payment-option-paypal/)
69
 
70
- * [Stripe](https://wpeverest.com/wordpress-plugins/everest-forms/stripe/?utm_source=wporg&utm_medium=link&utm_campaign=everest-forms-readme) - Allows you to connect your forms with Stripe to easily collect credit card payments, donations, and online orders.
71
 
72
- * [Geolocation](https://wpeverest.com/wordpress-plugins/everest-forms/geolocation/?utm_source=wporg&utm_medium=link&utm_campaign=everest-forms-readme) - Allows you to collect geolocation data like IP, Country, Postal/Zip code along with the form submission.
73
 
74
- * [Multi-Part Forms](https://wpeverest.com/wordpress-plugins/everest-forms/multi-part-forms/?utm_source=wporg&utm_medium=link&utm_campaign=everest-forms-readme) - Allows you to make a stepwise form by breaking long or complex forms up into multiple parts/pages. Check [Detail guide](https://wpeverest.com/blog/wordpress-multi-step-form/)
75
 
76
- * [Custom Captcha](https://wpeverest.com/wordpress-plugins/everest-forms/captcha/?utm_source=wporg&utm_medium=link&utm_campaign=everest-forms-readme) - Allows you to add custom questions or math captcha to your form and fight back against spam form submissions.
77
 
78
- * [Conditional Logic](https://wpeverest.com/wordpress-plugins/everest-forms/conditional-logic/?utm_source=wporg&utm_medium=link&utm_campaign=everest-forms-readme) - Allows you to conditionally hide or show form fields based on user's interaction with other form fields.
79
 
80
- * [Survey, Polls and Quiz](https://wpeverest.com/wordpress-plugins/everest-forms/survey-polls-and-quiz/?utm_source=wporg&utm_medium=link&utm_campaign=everest-forms-readme) - Allows you to create intuitive survey, poll and quiz forms within a minute. It also provides admin reporting for data-driven decisions.
81
 
82
- * [User Registration](https://wpeverest.com/wordpress-plugins/everest-forms/user-registration/?utm_source=wporg&utm_medium=link&utm_campaign=everest-forms-readme) - Allows you to create a custom WordPress user registration form instantly in few simple steps and collect payments.
83
 
84
- * [Post Submission](https://wpeverest.com/wordpress-plugins/everest-forms/post-submission/?utm_source=wporg&utm_medium=link&utm_campaign=everest-forms-readme) - Allows your users to submit their blogs posts from front-end without the hassle of logging into the admin dashboard.
85
 
86
- * [Zapier](https://wpeverest.com/wordpress-plugins/everest-forms/zapier/?utm_source=wporg&utm_medium=link&utm_campaign=everest-forms-readme) - Allows you to connect your forms with over 1500+ popular web applications without any hassle. It makes integrating forms and apps buttery-smooth.
87
 
88
  ### What's Next
89
 
@@ -141,7 +141,7 @@ The drag and drop builder allows you to create a variety of WordPress forms, not
141
 
142
  = Do you have a quick get started video for Everest Form?
143
 
144
- Yes, we do. Check out this [Getting Started Videos](https://docs.wpeverest.com/docs/everest-forms/getting-started/watch-video-guide/?utm_source=wporg&utm_medium=link&utm_campaign=everest-forms-readme)
145
 
146
  = Everest Forms is awesome! Can I contribute? =
147
 
@@ -149,6 +149,15 @@ Yes you can! Join in on our [GitHub repository](https://github.com/wpeverest/eve
149
 
150
  == Changelog ==
151
 
 
 
 
 
 
 
 
 
 
152
  = 1.6.1 - 13-02-2020 =
153
  * Fix - Form submission error while processing on frontend.
154
 
4
  Requires at least: 5.0
5
  Tested up to: 5.3
6
  Requires PHP: 5.4
7
+ Stable tag: 1.6.2
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
18
 
19
  Multiple column forms can be designed with a click. Pre-built templates and design layouts allow you to create forms that look different yet beautiful.
20
 
21
+ View [All features](https://wpeverest.com/wordpress-plugins/everest-forms/?utm_source=wporg&utm_medium=link&utm_campaign=evf-upgrade-to-pro)
22
 
23
  View [Demo](http://demo.wpeverest.com/everest-forms/)
24
 
57
 
58
  * 11 Advanced fields: **Image upload, File upload, Hidden Field, Phone, Password, Custom HTML, Section Title, Signature, Address, Country, Rating**
59
 
60
+ * [Style Customizer](https://wpeverest.com/wordpress-plugins/everest-forms/style-customizer/?utm_source=wporg&utm_medium=link&utm_campaign=evf-upgrade-to-pro) - Allows you to make form design changes like color, fonts, spacing, background, borders, alignments and much more without touching any code.
61
 
62
+ * [MailChimp](https://wpeverest.com/wordpress-plugins/everest-forms/mailchimp/?utm_source=wporg&utm_medium=link&utm_campaign=evf-upgrade-to-pro) - Allows your users to subscribe to MailChimp through form submission via Everest Forms.
63
 
64
+ * [ConvertKit](https://wpeverest.com/wordpress-plugins/everest-forms/convertkit/?utm_source=wporg&utm_medium=link&utm_campaign=evf-upgrade-to-pro) - Allows you to connect your form with ConvertKit to efficiently grow your business by generating more leads.
65
 
66
+ * [PDF Form Submission](https://wpeverest.com/wordpress-plugins/everest-forms/pdf-form-submission/?utm_source=wporg&utm_medium=link&utm_campaign=evf-upgrade-to-pro) - Allows you to generate digital PDF documents of any form submission to export or send a PDF copy of it via email attachment.
67
 
68
+ * [PayPal Standard](https://wpeverest.com/wordpress-plugins/everest-forms/paypal-standard/?utm_source=wporg&utm_medium=link&utm_campaign=evf-upgrade-to-pro) - Allows you to connect your forms with PayPal to easily collect payments, donations, and online orders. Check our article on [accepting PayPal payment via WordPress Forms](https://wpeverest.com/blog/wordpress-form-payment-option-paypal/)
69
 
70
+ * [Stripe](https://wpeverest.com/wordpress-plugins/everest-forms/stripe/?utm_source=wporg&utm_medium=link&utm_campaign=evf-upgrade-to-pro) - Allows you to connect your forms with Stripe to easily collect credit card payments, donations, and online orders.
71
 
72
+ * [Geolocation](https://wpeverest.com/wordpress-plugins/everest-forms/geolocation/?utm_source=wporg&utm_medium=link&utm_campaign=evf-upgrade-to-pro) - Allows you to collect geolocation data like IP, Country, Postal/Zip code along with the form submission.
73
 
74
+ * [Multi-Part Forms](https://wpeverest.com/wordpress-plugins/everest-forms/multi-part-forms/?utm_source=wporg&utm_medium=link&utm_campaign=evf-upgrade-to-pro) - Allows you to make a stepwise form by breaking long or complex forms up into multiple parts/pages. Check [Detail guide](https://wpeverest.com/blog/wordpress-multi-step-form/)
75
 
76
+ * [Custom Captcha](https://wpeverest.com/wordpress-plugins/everest-forms/captcha/?utm_source=wporg&utm_medium=link&utm_campaign=evf-upgrade-to-pro) - Allows you to add custom questions or math captcha to your form and fight back against spam form submissions.
77
 
78
+ * [Conditional Logic](https://wpeverest.com/wordpress-plugins/everest-forms/conditional-logic/?utm_source=wporg&utm_medium=link&utm_campaign=evf-upgrade-to-pro) - Allows you to conditionally hide or show form fields based on user's interaction with other form fields.
79
 
80
+ * [Survey, Polls and Quiz](https://wpeverest.com/wordpress-plugins/everest-forms/survey-polls-and-quiz/?utm_source=wporg&utm_medium=link&utm_campaign=evf-upgrade-to-pro) - Allows you to create intuitive survey, poll and quiz forms within a minute. It also provides admin reporting for data-driven decisions.
81
 
82
+ * [User Registration](https://wpeverest.com/wordpress-plugins/everest-forms/user-registration/?utm_source=wporg&utm_medium=link&utm_campaign=evf-upgrade-to-pro) - Allows you to create a custom WordPress user registration form instantly in few simple steps and collect payments.
83
 
84
+ * [Post Submission](https://wpeverest.com/wordpress-plugins/everest-forms/post-submission/?utm_source=wporg&utm_medium=link&utm_campaign=evf-upgrade-to-pro) - Allows your users to submit their blogs posts from front-end without the hassle of logging into the admin dashboard.
85
 
86
+ * [Zapier](https://wpeverest.com/wordpress-plugins/everest-forms/zapier/?utm_source=wporg&utm_medium=link&utm_campaign=evf-upgrade-to-pro) - Allows you to connect your forms with over 1500+ popular web applications without any hassle. It makes integrating forms and apps buttery-smooth.
87
 
88
  ### What's Next
89
 
141
 
142
  = Do you have a quick get started video for Everest Form?
143
 
144
+ Yes, we do. Check out this [Getting Started Videos](https://docs.wpeverest.com/docs/everest-forms/getting-started/watch-video-guide/?utm_source=wporg&utm_medium=link&utm_campaign=evf-upgrade-to-pro)
145
 
146
  = Everest Forms is awesome! Can I contribute? =
147
 
149
 
150
  == Changelog ==
151
 
152
+ = 1.6.2 - 29-02-2020 =
153
+ * Fix - Cloning not working for some fields.
154
+ * Fix - Error thrown for star rating field when using smart tags.
155
+ * Fix - Conditional logic for Checkbox and Multiple Choice field.
156
+ * Fix - Smart tags of Multiple Choice and Checkbox are not working in email.
157
+ * Fix - Redirection parameter delegated to frontend for AJAX form submission.
158
+ * Tweak - Implement log cleanup cron job.
159
+ * Tweak - PHPCS fixes.
160
+
161
  = 1.6.1 - 13-02-2020 =
162
  * Fix - Form submission error while processing on frontend.
163
 
uninstall.php CHANGED
@@ -12,6 +12,7 @@ defined( 'WP_UNINSTALL_PLUGIN' ) || exit;
12
 
13
  global $wpdb;
14
 
 
15
  wp_clear_scheduled_hook( 'everest_forms_cleanup_sessions' );
16
 
17
  /*
@@ -20,7 +21,7 @@ wp_clear_scheduled_hook( 'everest_forms_cleanup_sessions' );
20
  * and to ensure only the site owner can perform this action.
21
  */
22
  if ( defined( 'EVF_REMOVE_ALL_DATA' ) && true === EVF_REMOVE_ALL_DATA ) {
23
- include_once( dirname( __FILE__ ) . '/includes/class-evf-install.php' );
24
 
25
  // Roles + caps.
26
  EVF_Install::remove_roles();
12
 
13
  global $wpdb;
14
 
15
+ wp_clear_scheduled_hook( 'everest_forms_cleanup_logs' );
16
  wp_clear_scheduled_hook( 'everest_forms_cleanup_sessions' );
17
 
18
  /*
21
  * and to ensure only the site owner can perform this action.
22
  */
23
  if ( defined( 'EVF_REMOVE_ALL_DATA' ) && true === EVF_REMOVE_ALL_DATA ) {
24
+ include_once dirname( __FILE__ ) . '/includes/class-evf-install.php';
25
 
26
  // Roles + caps.
27
  EVF_Install::remove_roles();