Contact Form by WD – responsive drag & drop contact form builder tool - Version 1.13.3

Version Description

  • Fixed: Security issue.
  • Fixed: Scroll to required address field.
  • Fixed: Adding field to incorrect position.
  • Fixed: Don't use the same title for the duplicated form.
  • Fixed: Allow "0" value for required fields.
  • Fixed: Link for attachment in email.
  • Fixed: Saving advanced layout.
  • Fixed: 0 value is not saved in submissions for Payment single choice and Shipping fields.
  • Fixed: MySQL mapping edit functionality.
  • Fixed: Do not print js before DOCTYPE.
  • Fixed: Broken multiple pages.
Download this release

Release Info

Developer webdorado
Plugin Icon 128x128 Contact Form by WD – responsive drag & drop contact form builder tool
Version 1.13.3
Comparing to
See all releases

Code changes from version 1.13.1 to 1.13.3

Files changed (46) hide show
  1. admin/controllers/Manage_fm.php +5 -4
  2. admin/controllers/Submissions_fm.php +1 -1
  3. admin/controllers/Themes_fm.php +1 -0
  4. admin/controllers/Uninstall_fm.php +2 -2
  5. admin/models/Manage_fm.php +3 -0
  6. admin/views/FMSelectDataFromDb.php +1 -1
  7. admin/views/FMSqlMapping.php +4 -4
  8. admin/views/Manage_fm.php +18 -17
  9. admin/views/view.php +5 -3
  10. contact-form-maker.php +117 -65
  11. css/form_maker_frontend.css +22 -1
  12. css/pricing.css +2 -2
  13. css/tw-gb/block.css +20 -13
  14. form_maker_update.php +1 -1
  15. framework/WDW_FM_Library.php +224 -56
  16. frontend/controllers/form_maker.php +68 -1
  17. frontend/models/form_maker.php +53 -40
  18. frontend/models/verify_email.php +1 -1
  19. frontend/views/form_maker.php +26 -23
  20. js/add_field.js +8 -8
  21. js/form_maker_form_advanced_layout.js +9 -8
  22. js/form_maker_manage.js +3 -1
  23. js/form_maker_manage_edit.js +3 -3
  24. js/main_div_front_end.js +18 -13
  25. js/tw-gb/block.js +20 -5
  26. languages/form_maker-ca.po +1 -1
  27. languages/form_maker-da_DK.po +2 -2
  28. languages/form_maker-fa_IR.po +2 -2
  29. languages/form_maker-hr.po +2 -2
  30. languages/form_maker-it_IT.po +17 -17
  31. languages/form_maker-ko_KR.po +2 -2
  32. languages/form_maker-mk_MK.po +1 -1
  33. languages/form_maker-nb_NO.po +2 -2
  34. readme.txt +15 -2
  35. wd/README.md +130 -130
  36. wd/assets/css/deactivate_popup.css +110 -110
  37. wd/assets/css/overview.css +461 -461
  38. wd/assets/css/subscribe.css +113 -113
  39. wd/assets/js/overview.js +55 -55
  40. wd/config.php +131 -131
  41. wd/includes/api.php +80 -80
  42. wd/includes/deactivate.php +179 -179
  43. wd/includes/notices.php +223 -223
  44. wd/start.php +41 -41
  45. wd/templates/display_overview.php +42 -42
  46. wd/templates/display_subscribe.php +50 -50
admin/controllers/Manage_fm.php CHANGED
@@ -188,7 +188,7 @@ class FMControllerManage_fmc extends CFMAdminController {
188
  $arr = implode(',', $arr);
189
  update_option('contact_form_forms', $arr);
190
  }
191
- // To delete DB rows with form ids from add-ons.
192
  if (WDFMInstance(self::PLUGIN)->is_free != 2) {
193
  do_action('fm_delete_addon_init', $id);
194
  }
@@ -287,6 +287,7 @@ class FMControllerManage_fmc extends CFMAdminController {
287
  if ( $row ) {
288
  $row = (array) $row;
289
  unset($row['id']);
 
290
  $inserted = $this->model->insert_data_to_db("formmaker", (array) $row);
291
  $new_id = (int) $this->model->get_max_row('formmaker', 'id');
292
 
@@ -320,7 +321,7 @@ class FMControllerManage_fmc extends CFMAdminController {
320
  update_option('contact_form_forms', ((get_option('contact_form_forms')) ? (get_option('contact_form_forms')) . ',' . $new_id : $new_id));
321
  }
322
  else {
323
- // Duplicate add-ons data.
324
  do_action('fm_duplicate_form', $id, $new_id);
325
  }
326
  if ( $inserted !== FALSE ) {
@@ -349,7 +350,7 @@ class FMControllerManage_fmc extends CFMAdminController {
349
  $params['id'] = $backup_id;
350
  $params['row'] = $this->model->get_row_data_new($backup_id);
351
  $params['page_url'] = $this->page_url;
352
- // Check if Stripe add-on is active.
353
  $stripe_addon = array('enable' => 0);
354
  $addon_stripe = $this->get_stripe_addon(0);
355
  if( !empty($addon_stripe['html']) ) {
@@ -431,7 +432,7 @@ class FMControllerManage_fmc extends CFMAdminController {
431
  WDW_FM_Library(self::PLUGIN)->fm_redirect( add_query_arg( array('page' => $this->page, 'task' => 'display'), admin_url('admin.php') ) );
432
  }
433
 
434
- // Check stripe add-on is active.
435
  $stripe_addon = array( 'enable' => 0 );
436
  $addon_stripe = $this->get_stripe_addon($id);
437
  if ( !empty($addon_stripe['html']) ) {
188
  $arr = implode(',', $arr);
189
  update_option('contact_form_forms', $arr);
190
  }
191
+ // To delete DB rows with form ids from extensions.
192
  if (WDFMInstance(self::PLUGIN)->is_free != 2) {
193
  do_action('fm_delete_addon_init', $id);
194
  }
287
  if ( $row ) {
288
  $row = (array) $row;
289
  unset($row['id']);
290
+ $row['title'] = $row['title'] . ' - ' . __('Copy', WDFMInstance(self::PLUGIN)->prefix);
291
  $inserted = $this->model->insert_data_to_db("formmaker", (array) $row);
292
  $new_id = (int) $this->model->get_max_row('formmaker', 'id');
293
 
321
  update_option('contact_form_forms', ((get_option('contact_form_forms')) ? (get_option('contact_form_forms')) . ',' . $new_id : $new_id));
322
  }
323
  else {
324
+ // Duplicate extensions data.
325
  do_action('fm_duplicate_form', $id, $new_id);
326
  }
327
  if ( $inserted !== FALSE ) {
350
  $params['id'] = $backup_id;
351
  $params['row'] = $this->model->get_row_data_new($backup_id);
352
  $params['page_url'] = $this->page_url;
353
+ // Check if Stripe extension is active.
354
  $stripe_addon = array('enable' => 0);
355
  $addon_stripe = $this->get_stripe_addon(0);
356
  if( !empty($addon_stripe['html']) ) {
432
  WDW_FM_Library(self::PLUGIN)->fm_redirect( add_query_arg( array('page' => $this->page, 'task' => 'display'), admin_url('admin.php') ) );
433
  }
434
 
435
+ // Check stripe extension is active.
436
  $stripe_addon = array( 'enable' => 0 );
437
  $addon_stripe = $this->get_stripe_addon($id);
438
  if ( !empty($addon_stripe['html']) ) {
admin/controllers/Submissions_fm.php CHANGED
@@ -280,7 +280,7 @@ class FMControllerSubmissions_fmc extends CFMAdminController {
280
  $option_key = (WDFMInstance(self::PLUGIN)->is_free == 2 ? 'fmc_settings' : 'fm_settings');
281
  $params['fm_settings'] = get_option($option_key);
282
 
283
- // Check is active pdf-integration add-on.
284
  $params['pdf_data'] = array();
285
  if ( defined('WD_FM_PDF') && is_plugin_active(constant('WD_FM_PDF')) ) {
286
  require_once(WD_FM_PDF_DIR . '/model.php');
280
  $option_key = (WDFMInstance(self::PLUGIN)->is_free == 2 ? 'fmc_settings' : 'fm_settings');
281
  $params['fm_settings'] = get_option($option_key);
282
 
283
+ // Check is active pdf-integration extension.
284
  $params['pdf_data'] = array();
285
  if ( defined('WD_FM_PDF') && is_plugin_active(constant('WD_FM_PDF')) ) {
286
  require_once(WD_FM_PDF_DIR . '/model.php');
admin/controllers/Themes_fm.php CHANGED
@@ -185,6 +185,7 @@ class FMControllerThemes_fmc extends CFMAdminController {
185
  if ( $row ) {
186
  $row = (array) $row;
187
  unset($row['id']);
 
188
  $row['default'] = 0;
189
  $inserted = $this->model->insert_data_to_db($table, (array) $row);
190
  if ( $inserted !== FALSE ) {
185
  if ( $row ) {
186
  $row = (array) $row;
187
  unset($row['id']);
188
+ $row['title'] = $row['title'] . ' - ' . __('Copy', WDFMInstance(self::PLUGIN)->prefix);
189
  $row['default'] = 0;
190
  $inserted = $this->model->insert_data_to_db($table, (array) $row);
191
  if ( $inserted !== FALSE ) {
admin/controllers/Uninstall_fm.php CHANGED
@@ -54,7 +54,7 @@ class FMControllerUninstall_fmc extends CFMAdminController {
54
  global $wpdb;
55
  foreach ( $params['addons'] as $addon => $addon_name ) {
56
  if ( is_array($addon_name) ) {
57
- // If there are more than one db tables in an add-on.
58
  foreach ( $addon_name as $ad_name ) {
59
  array_push($params['tables'], $wpdb->prefix . 'formmaker_' . $ad_name);
60
  }
@@ -93,7 +93,7 @@ class FMControllerUninstall_fmc extends CFMAdminController {
93
  $params['tables'] = $this->get_tables();
94
  $this->model->delete_db_tables();
95
 
96
- // Deactivate all add-ons and form maker.
97
  WDW_FM_Library(self::PLUGIN)->deactivate_all_addons(WDFMInstance(self::PLUGIN)->main_file);
98
 
99
  wp_redirect(admin_url('plugins.php'));
54
  global $wpdb;
55
  foreach ( $params['addons'] as $addon => $addon_name ) {
56
  if ( is_array($addon_name) ) {
57
+ // If there are more than one db tables in an extension.
58
  foreach ( $addon_name as $ad_name ) {
59
  array_push($params['tables'], $wpdb->prefix . 'formmaker_' . $ad_name);
60
  }
93
  $params['tables'] = $this->get_tables();
94
  $this->model->delete_db_tables();
95
 
96
+ // Deactivate all extensions and form maker.
97
  WDW_FM_Library(self::PLUGIN)->deactivate_all_addons(WDFMInstance(self::PLUGIN)->main_file);
98
 
99
  wp_redirect(admin_url('plugins.php'));
admin/models/Manage_fm.php CHANGED
@@ -31,6 +31,9 @@ class FMModelManage_fmc extends CFMAdminModel {
31
  $rows = $wpdb->get_results($query);
32
  if ( !empty($rows) ) {
33
  foreach ( $rows as $row ) {
 
 
 
34
  $query = "SELECT count(DISTINCT group_id) FROM " . $wpdb->prefix . "formmaker_submits WHERE form_id=" . (int) $row->id . "";
35
  $row->submission_count = $wpdb->get_var($query);
36
  }
31
  $rows = $wpdb->get_results($query);
32
  if ( !empty($rows) ) {
33
  foreach ( $rows as $row ) {
34
+ if ( !isset($row->header_hide) ) {
35
+ $row->header_hide = 1;
36
+ }
37
  $query = "SELECT count(DISTINCT group_id) FROM " . $wpdb->prefix . "formmaker_submits WHERE form_id=" . (int) $row->id . "";
38
  $row->submission_count = $wpdb->get_var($query);
39
  }
admin/views/FMSelectDataFromDb.php CHANGED
@@ -235,7 +235,7 @@ class FMViewSelect_data_from_db_fmc extends FMAdminView_fmc {
235
  }
236
  $cond .= '</select>';
237
  $cond .= '<select id="op_condid" style="width: 110px"><option value="=" selected="selected">=</option><option value="!=">!=</option><option value=">">&gt;</option><option value="<">&lt;</option><option value=">=">&gt;=</option><option value="<=">&lt;=</option><option value="%..%">Like</option><option value="..%">Starts with</option><option value="%..">Ends with</option></select>';
238
- $cond .= '<input id="val_condid" type="text" class="fm-where-input" />';
239
  $cond .= '<select id="andor_condid" style="visibility: hidden; width:70px;"><option value="AND">AND</option><option value="OR">OR</option></select><img src="' . WDFMInstance(self::PLUGIN)->plugin_url . '/images/delete.png?ver=' . WDFMInstance(self::PLUGIN)->plugin_version . '" onclick="delete_cond(&quot;condid&quot;)" style="vertical-align: middle;"></div>';
240
  ?>
241
  <script>
235
  }
236
  $cond .= '</select>';
237
  $cond .= '<select id="op_condid" style="width: 110px"><option value="=" selected="selected">=</option><option value="!=">!=</option><option value=">">&gt;</option><option value="<">&lt;</option><option value=">=">&gt;=</option><option value="<=">&lt;=</option><option value="%..%">Like</option><option value="..%">Starts with</option><option value="%..">Ends with</option></select>';
238
+ $cond .= '<input autocomplete="off" id="val_condid" type="text" class="fm-where-input" />';
239
  $cond .= '<select id="andor_condid" style="visibility: hidden; width:70px;"><option value="AND">AND</option><option value="OR">OR</option></select><img src="' . WDFMInstance(self::PLUGIN)->plugin_url . '/images/delete.png?ver=' . WDFMInstance(self::PLUGIN)->plugin_version . '" onclick="delete_cond(&quot;condid&quot;)" style="vertical-align: middle;"></div>';
240
  ?>
241
  <script>
admin/views/FMSqlMapping.php CHANGED
@@ -92,7 +92,7 @@ class FMViewFormMakerSQLMapping_fmc extends FMAdminView_fmc {
92
  }
93
  $cond .= '</select>';
94
  $cond .= '<select id="op_condid"><option value="=" selected="selected">=</option><option value="!=">!=</option><option value=">">&gt;</option><option value="<">&lt;</option><option value=">=">&gt;=</option><option value="<=">&lt;=</option><option value="%..%">Like</option><option value="..%">Starts with</option><option value="%..">Ends with</option></select>';
95
- $cond .= '<input id="val_condid" style="width:170px" type="text" class="fm-where-input" />';
96
  $cond .= '<select id="andor_condid" style="visibility: hidden;"><option value="AND">AND</option><option value="OR">OR</option></select>';
97
  $cond .= '<img src="' . WDFMInstance(self::PLUGIN)->plugin_url . '/images/delete.png?ver=' . WDFMInstance(self::PLUGIN)->plugin_version . '" onclick="delete_cond(&quot;condid&quot;)" style="vertical-align: middle;"></div>';
98
  ?>
@@ -850,7 +850,7 @@ class FMViewFormMakerSQLMapping_fmc extends FMAdminView_fmc {
850
  <?php echo $title; ?>
851
  </div>
852
  </label>
853
- <input type="text" id="<?php echo str_replace("'", "SingleQuot", $col->Field); ?>" <?php if ( !$col_checks[$key] )
854
  echo 'disabled="disabled"' ?> value="<?php echo $col_vals[$key]; ?>" />
855
  <input id="ch_<?php echo str_replace("'", "SingleQuot", $col->Field); ?>" type="checkbox" onClick="dis('<?php echo str_replace("'", "SingleQuot", $col->Field); ?>', this.checked)" <?php if ( $col_checks[$key] )
856
  echo 'checked="checked"' ?> />
@@ -1282,7 +1282,7 @@ class FMViewFormMakerSQLMapping_fmc extends FMAdminView_fmc {
1282
  }
1283
  $cond .= '</select>';
1284
  $cond .= '<select id="op_condid"><option value="=" selected="selected">=</option><option value="!=">!=</option><option value=">">&gt;</option><option value="<">&lt;</option><option value=">=">&gt;=</option><option value="<=">&lt;=</option><option value="%..%">Like</option><option value="..%">Starts with</option><option value="%..">Ends with</option></select>';
1285
- $cond .= '<input id="val_condid" style="width:170px" class="fm-where-input" type="text" />';
1286
  $cond .= '<select id="andor_condid" style="visibility: hidden;"><option value="AND">AND</option><option value="OR">OR</option></select>';
1287
  $cond .= '<img src="' . WDFMInstance(self::PLUGIN)->plugin_url . '/images/delete.png?ver=' . WDFMInstance(self::PLUGIN)->plugin_version . '" onclick="delete_cond(&quot;condid&quot;)" style="vertical-align: middle;"></div>';
1288
  ?>
@@ -1830,7 +1830,7 @@ class FMViewFormMakerSQLMapping_fmc extends FMAdminView_fmc {
1830
  <?php echo $title; ?>
1831
  </div>
1832
  </label>
1833
- <input type="text" id="<?php echo str_replace("'", "SingleQuot", $col->Field); ?>" disabled="disabled" /><input id="ch_<?php echo str_replace("'", "SingleQuot", $col->Field); ?>" type="checkbox" onClick="dis('<?php echo str_replace("'", "SingleQuot", $col->Field); ?>', this.checked)" />
1834
  </div>
1835
  <?php
1836
  }
92
  }
93
  $cond .= '</select>';
94
  $cond .= '<select id="op_condid"><option value="=" selected="selected">=</option><option value="!=">!=</option><option value=">">&gt;</option><option value="<">&lt;</option><option value=">=">&gt;=</option><option value="<=">&lt;=</option><option value="%..%">Like</option><option value="..%">Starts with</option><option value="%..">Ends with</option></select>';
95
+ $cond .= '<input autocomplete="off" id="val_condid" style="width:170px" type="text" class="fm-where-input" />';
96
  $cond .= '<select id="andor_condid" style="visibility: hidden;"><option value="AND">AND</option><option value="OR">OR</option></select>';
97
  $cond .= '<img src="' . WDFMInstance(self::PLUGIN)->plugin_url . '/images/delete.png?ver=' . WDFMInstance(self::PLUGIN)->plugin_version . '" onclick="delete_cond(&quot;condid&quot;)" style="vertical-align: middle;"></div>';
98
  ?>
850
  <?php echo $title; ?>
851
  </div>
852
  </label>
853
+ <input autocomplete="off" type="text" id="<?php echo str_replace("'", "SingleQuot", $col->Field); ?>" <?php if ( !$col_checks[$key] )
854
  echo 'disabled="disabled"' ?> value="<?php echo $col_vals[$key]; ?>" />
855
  <input id="ch_<?php echo str_replace("'", "SingleQuot", $col->Field); ?>" type="checkbox" onClick="dis('<?php echo str_replace("'", "SingleQuot", $col->Field); ?>', this.checked)" <?php if ( $col_checks[$key] )
856
  echo 'checked="checked"' ?> />
1282
  }
1283
  $cond .= '</select>';
1284
  $cond .= '<select id="op_condid"><option value="=" selected="selected">=</option><option value="!=">!=</option><option value=">">&gt;</option><option value="<">&lt;</option><option value=">=">&gt;=</option><option value="<=">&lt;=</option><option value="%..%">Like</option><option value="..%">Starts with</option><option value="%..">Ends with</option></select>';
1285
+ $cond .= '<input autocomplete="off" id="val_condid" style="width:170px" class="fm-where-input" type="text" />';
1286
  $cond .= '<select id="andor_condid" style="visibility: hidden;"><option value="AND">AND</option><option value="OR">OR</option></select>';
1287
  $cond .= '<img src="' . WDFMInstance(self::PLUGIN)->plugin_url . '/images/delete.png?ver=' . WDFMInstance(self::PLUGIN)->plugin_version . '" onclick="delete_cond(&quot;condid&quot;)" style="vertical-align: middle;"></div>';
1288
  ?>
1830
  <?php echo $title; ?>
1831
  </div>
1832
  </label>
1833
+ <input autocomplete="off" type="text" id="<?php echo str_replace("'", "SingleQuot", $col->Field); ?>" disabled="disabled" /><input id="ch_<?php echo str_replace("'", "SingleQuot", $col->Field); ?>" type="checkbox" onClick="dis('<?php echo str_replace("'", "SingleQuot", $col->Field); ?>', this.checked)" />
1834
  </div>
1835
  <?php
1836
  }
admin/views/Manage_fm.php CHANGED
@@ -264,7 +264,7 @@ class FMViewManage_fmc extends FMAdminView_fmc {
264
 
265
  wp_enqueue_script(WDFMInstance(self::PLUGIN)->handle_prefix . '-form-advanced-layout');
266
 
267
- // enqueue add-ons style/scripts
268
  do_action('fm_admin_print_scripts');
269
 
270
  $id = $params['id'];
@@ -391,7 +391,7 @@ class FMViewManage_fmc extends FMAdminView_fmc {
391
  <?php
392
  }
393
  ?>
394
- <button class="button button-primary button-large" onclick="if (fm_check_required('title', '<?php _e('Form Title', WDFMInstance(self::PLUGIN)->prefix); ?>') || !wd_fm_apply_options() || !FormManageSubmitButton()) { return false;}; fm_set_input_value('task', 'apply');">
395
  <?php
396
  if ( $row->title && isset($params['revisions_total']) && !$params['revisions_status'] ) {
397
  _e('Update', WDFMInstance(self::PLUGIN)->prefix);
@@ -745,7 +745,7 @@ class FMViewManage_fmc extends FMAdminView_fmc {
745
  <div class="wd-box-content">
746
  <div class="wd-group wd-has-placeholder">
747
  <label class="wd-label" for="mail"><?php _e('Email to send submissions to', WDFMInstance(self::PLUGIN)->prefix); ?></label>
748
- <input class="fm-validate" data-type="email" data-callback="fm_validate_email" data-callback-parameter="" data-tab-id="emailTab" data-content-id="emailTab_fieldset" type="text" id="mail" name="mail" value="<?php echo $row->mail; ?>" />
749
  <span class="dashicons dashicons-list-view" data-id="mail"></span>
750
  <p class="description"><?php _e('Specify the email address(es), to which submitted form information will be sent. For multiple email addresses separate with commas.', WDFMInstance(self::PLUGIN)->prefix); ?></p>
751
  </div>
@@ -784,13 +784,13 @@ class FMViewManage_fmc extends FMAdminView_fmc {
784
  </div>
785
  <div class="wd-group wd-has-placeholder">
786
  <label class="wd-label" for="from_name"><?php _e('From Name', WDFMInstance(self::PLUGIN)->prefix); ?></label>
787
- <input type="text" name="from_name" value="<?php echo $row->from_name; ?>" id="from_name" />
788
  <span class="dashicons dashicons-list-view" data-id="from_name"></span>
789
  <p class="description"><?php _e('Set the name or search for a form field which is shown as the sender’s name in submission or confirmation emails.', WDFMInstance(self::PLUGIN)->prefix); ?></p>
790
  </div>
791
  <div class="wd-group wd-has-placeholder">
792
  <label class="wd-label" for="mail_subject"><?php _e('Subject', WDFMInstance(self::PLUGIN)->prefix); ?></label>
793
- <input type="text" id="mail_subject" name="mail_subject" value="<?php echo !empty($row->mail_subject) ? $row->mail_subject : '{formtitle}'; ?>" />
794
  <span class="dashicons dashicons-list-view" data-id="mail_subject"></span>
795
  <p class="description"><?php _e('Add a custom subject or search for a form field for the submission email. In case it’s left blank, Form Title will be set as the subject of submission emails.', WDFMInstance(self::PLUGIN)->prefix); ?></p>
796
  </div>
@@ -929,13 +929,13 @@ class FMViewManage_fmc extends FMAdminView_fmc {
929
  </div>
930
  <div class="wd-group wd-has-placeholder">
931
  <label class="wd-label" for="mail_from_name_user"><?php _e('From Name', WDFMInstance(self::PLUGIN)->prefix); ?></label>
932
- <input type="text" name="mail_from_name_user" value="<?php echo $row->mail_from_name_user; ?>" id="mail_from_name_user" />
933
  <span class="dashicons dashicons-list-view" data-id="mail_from_name_user"></span>
934
  <p class="description"><?php _e('Set the name or search for a form field which is shown as the sender’s name in submission or confirmation emails.', WDFMInstance(self::PLUGIN)->prefix); ?></p>
935
  </div>
936
  <div class="wd-group wd-has-placeholder">
937
  <label class="wd-label" for="mail_subject_user"><?php _e('Subject', WDFMInstance(self::PLUGIN)->prefix); ?></label>
938
- <input type="text" name="mail_subject_user" value="<?php echo !empty($row->mail_subject_user) ? $row->mail_subject_user : '{formtitle}' ?>" id="mail_subject_user" class="mail_subject_user" />
939
  <span class="dashicons dashicons-list-view" data-id="mail_subject_user"></span>
940
  <p class="description"><?php _e('Add a custom subject or search for a form field for the submission email. In case it’s left blank, Form Title will be set as the subject of submission emails.', WDFMInstance(self::PLUGIN)->prefix); ?></p>
941
  </div>
@@ -955,7 +955,7 @@ class FMViewManage_fmc extends FMAdminView_fmc {
955
  }
956
  else {
957
  ?>
958
- <textarea name="script_mail_user" id="script_mail_user" cols="20" rows="10" style="width:300px; height:450px;"><?php echo $row->script_mail_user; ?></textarea>
959
  <?php
960
  }
961
  ?>
@@ -1007,7 +1007,7 @@ class FMViewManage_fmc extends FMAdminView_fmc {
1007
  <label class="wd-label-radio" for="fm_mo_mail_verify-1"><?php _e('Yes', WDFMInstance(self::PLUGIN)->prefix); ?></label>
1008
  <input type="radio" name="mail_verify" <?php echo $row->mail_verify == 0 ? 'checked="checked"' : '' ?> id="fm_mo_mail_verify-0" onclick="wdhide('expire_link')" class="wd-radio" value="0">
1009
  <label class="wd-label-radio" for="fm_mo_mail_verify-0"><?php _e('No', WDFMInstance(self::PLUGIN)->prefix); ?></label>
1010
- <p class="description"><?php _e('Activate this option, in case you would like the users to verify their email addresses. If it’s enabled, the user email will contain a verification link.', WDFMInstance(self::PLUGIN)->prefix); ?></p>
1011
  </div>
1012
  <div class="wd-group" <?php echo($row->mail_verify == 0 ? 'style="display:none;"' : '') ?> id="expire_link">
1013
  <label class="wd-label" for="mail_verify_expiretime"><?php _e('Verification link expires in', WDFMInstance(self::PLUGIN)->prefix); ?></label>
@@ -1016,7 +1016,7 @@ class FMViewManage_fmc extends FMAdminView_fmc {
1016
  <a target="_blank" href="<?php echo add_query_arg(array(
1017
  'post' => $params["mail_ver_id"],
1018
  'action' => 'edit',
1019
- ), admin_url('post.php')); ?>"><?php _e('Edit post', WDFMInstance(self::PLUGIN)->prefix); ?></a>
1020
  <p class="description"><?php _e('Use this option to specify a time period (hours), during which the user will be able to verify their email address.', WDFMInstance(self::PLUGIN)->prefix); ?></p>
1021
  </div>
1022
  </div>
@@ -1152,15 +1152,15 @@ class FMViewManage_fmc extends FMAdminView_fmc {
1152
  $stripe_addon = $params['stripe_addon'];
1153
  if ( $stripe_addon['enable'] ) {
1154
  if (WDFMInstance(self::PLUGIN)->is_free) {
1155
- echo $this->free_message(__('STRIPE add-on compatible with Premium version only', WDFMInstance(self::PLUGIN)->prefix), '', '', 'stripe_message');
1156
  }
1157
  }
1158
  else {
1159
  if (WDFMInstance(self::PLUGIN)->is_free) {
1160
- echo $this->promo_box(__('This feature is available only in the Premium version', WDFMInstance(self::PLUGIN)->prefix), __('Requires STRIPE add-on.', WDFMInstance(self::PLUGIN)->prefix), 'https://web-dorado.com/products/wordpress-form/add-ons/stripe.html', 'stripe_message');
1161
  }
1162
  else {
1163
- echo $this->free_message(__('This feature requires STRIPE add-on', WDFMInstance(self::PLUGIN)->prefix), 'https://web-dorado.com/products/wordpress-form/add-ons/stripe.html', __( 'Buy', WDFMInstance(self::PLUGIN)->prefix ), 'stripe_message');
1164
  }
1165
  }
1166
  ?>
@@ -1458,7 +1458,7 @@ class FMViewManage_fmc extends FMAdminView_fmc {
1458
  }
1459
  else {
1460
  ?>
1461
- <textarea cols="36" rows="5" id="submit_text" name="submit_text" style="resize: vertical; width:100%">
1462
  <?php echo $row->submit_text; ?>
1463
  </textarea>
1464
  <?php
@@ -1546,7 +1546,7 @@ class FMViewManage_fmc extends FMAdminView_fmc {
1546
  <?php
1547
  if ( $stripe_addon['enable'] && !empty($stripe_addon['html']) ) {
1548
  if (WDFMInstance(self::PLUGIN)->is_free) {
1549
- echo $this->free_message(__('STRIPE add-on compatible with Premium version only', WDFMInstance(self::PLUGIN)->prefix));
1550
  }
1551
  else {
1552
  echo $stripe_addon[ 'html' ];
@@ -1554,10 +1554,10 @@ class FMViewManage_fmc extends FMAdminView_fmc {
1554
  }
1555
  else {
1556
  if (WDFMInstance(self::PLUGIN)->is_free) {
1557
- echo $this->promo_box(__('This feature is available only in the Premium version', WDFMInstance(self::PLUGIN)->prefix), __('Requires STRIPE add-on.', WDFMInstance(self::PLUGIN)->prefix), 'https://web-dorado.com/products/wordpress-form/add-ons/stripe.html');
1558
  }
1559
  else {
1560
- echo $this->free_message(__('This feature requires STRIPE add-on', WDFMInstance(self::PLUGIN)->prefix), 'https://web-dorado.com/products/wordpress-form/add-ons/stripe.html', __( 'Buy', WDFMInstance(self::PLUGIN)->prefix ));
1561
  }
1562
  }
1563
  ?>
@@ -1595,6 +1595,7 @@ class FMViewManage_fmc extends FMAdminView_fmc {
1595
  "type_password",
1596
  "type_textarea",
1597
  "type_name",
 
1598
  "type_number",
1599
  "type_phone",
1600
  "type_phone_new",
264
 
265
  wp_enqueue_script(WDFMInstance(self::PLUGIN)->handle_prefix . '-form-advanced-layout');
266
 
267
+ // enqueue extensions style/scripts
268
  do_action('fm_admin_print_scripts');
269
 
270
  $id = $params['id'];
391
  <?php
392
  }
393
  ?>
394
+ <button class="button button-primary button-large" onclick="if (fm_check_required('title', '<?php _e('Form Title', WDFMInstance(self::PLUGIN)->prefix); ?>') || !wd_fm_apply_options() || !fm_apply_advanced_layout() || !FormManageSubmitButton()) { return false;}; fm_set_input_value('task', 'apply');">
395
  <?php
396
  if ( $row->title && isset($params['revisions_total']) && !$params['revisions_status'] ) {
397
  _e('Update', WDFMInstance(self::PLUGIN)->prefix);
745
  <div class="wd-box-content">
746
  <div class="wd-group wd-has-placeholder">
747
  <label class="wd-label" for="mail"><?php _e('Email to send submissions to', WDFMInstance(self::PLUGIN)->prefix); ?></label>
748
+ <input autocomplete="off" class="fm-validate" data-type="email" data-callback="fm_validate_email" data-callback-parameter="" data-tab-id="emailTab" data-content-id="emailTab_fieldset" type="text" id="mail" name="mail" value="<?php echo $row->mail; ?>" />
749
  <span class="dashicons dashicons-list-view" data-id="mail"></span>
750
  <p class="description"><?php _e('Specify the email address(es), to which submitted form information will be sent. For multiple email addresses separate with commas.', WDFMInstance(self::PLUGIN)->prefix); ?></p>
751
  </div>
784
  </div>
785
  <div class="wd-group wd-has-placeholder">
786
  <label class="wd-label" for="from_name"><?php _e('From Name', WDFMInstance(self::PLUGIN)->prefix); ?></label>
787
+ <input autocomplete="off" type="text" name="from_name" value="<?php echo $row->from_name; ?>" id="from_name" />
788
  <span class="dashicons dashicons-list-view" data-id="from_name"></span>
789
  <p class="description"><?php _e('Set the name or search for a form field which is shown as the sender’s name in submission or confirmation emails.', WDFMInstance(self::PLUGIN)->prefix); ?></p>
790
  </div>
791
  <div class="wd-group wd-has-placeholder">
792
  <label class="wd-label" for="mail_subject"><?php _e('Subject', WDFMInstance(self::PLUGIN)->prefix); ?></label>
793
+ <input autocomplete="off" type="text" id="mail_subject" name="mail_subject" value="<?php echo !empty($row->mail_subject) ? $row->mail_subject : '{formtitle}'; ?>" />
794
  <span class="dashicons dashicons-list-view" data-id="mail_subject"></span>
795
  <p class="description"><?php _e('Add a custom subject or search for a form field for the submission email. In case it’s left blank, Form Title will be set as the subject of submission emails.', WDFMInstance(self::PLUGIN)->prefix); ?></p>
796
  </div>
929
  </div>
930
  <div class="wd-group wd-has-placeholder">
931
  <label class="wd-label" for="mail_from_name_user"><?php _e('From Name', WDFMInstance(self::PLUGIN)->prefix); ?></label>
932
+ <input autocomplete="off" type="text" name="mail_from_name_user" value="<?php echo $row->mail_from_name_user; ?>" id="mail_from_name_user" />
933
  <span class="dashicons dashicons-list-view" data-id="mail_from_name_user"></span>
934
  <p class="description"><?php _e('Set the name or search for a form field which is shown as the sender’s name in submission or confirmation emails.', WDFMInstance(self::PLUGIN)->prefix); ?></p>
935
  </div>
936
  <div class="wd-group wd-has-placeholder">
937
  <label class="wd-label" for="mail_subject_user"><?php _e('Subject', WDFMInstance(self::PLUGIN)->prefix); ?></label>
938
+ <input autocomplete="off" type="text" name="mail_subject_user" value="<?php echo !empty($row->mail_subject_user) ? $row->mail_subject_user : '{formtitle}' ?>" id="mail_subject_user" class="mail_subject_user" />
939
  <span class="dashicons dashicons-list-view" data-id="mail_subject_user"></span>
940
  <p class="description"><?php _e('Add a custom subject or search for a form field for the submission email. In case it’s left blank, Form Title will be set as the subject of submission emails.', WDFMInstance(self::PLUGIN)->prefix); ?></p>
941
  </div>
955
  }
956
  else {
957
  ?>
958
+ <textarea autocomplete="off" name="script_mail_user" id="script_mail_user" cols="20" rows="10" style="width:300px; height:450px;"><?php echo $row->script_mail_user; ?></textarea>
959
  <?php
960
  }
961
  ?>
1007
  <label class="wd-label-radio" for="fm_mo_mail_verify-1"><?php _e('Yes', WDFMInstance(self::PLUGIN)->prefix); ?></label>
1008
  <input type="radio" name="mail_verify" <?php echo $row->mail_verify == 0 ? 'checked="checked"' : '' ?> id="fm_mo_mail_verify-0" onclick="wdhide('expire_link')" class="wd-radio" value="0">
1009
  <label class="wd-label-radio" for="fm_mo_mail_verify-0"><?php _e('No', WDFMInstance(self::PLUGIN)->prefix); ?></label>
1010
+ <p class="description"><?php _e('Activate this option, in case you would like the users to verify their email addresses. After enabling, please add {verificationlink} into the content of Custom Text in Email to User option.', WDFMInstance(self::PLUGIN)->prefix); ?></p>
1011
  </div>
1012
  <div class="wd-group" <?php echo($row->mail_verify == 0 ? 'style="display:none;"' : '') ?> id="expire_link">
1013
  <label class="wd-label" for="mail_verify_expiretime"><?php _e('Verification link expires in', WDFMInstance(self::PLUGIN)->prefix); ?></label>
1016
  <a target="_blank" href="<?php echo add_query_arg(array(
1017
  'post' => $params["mail_ver_id"],
1018
  'action' => 'edit',
1019
+ ), admin_url('post.php')); ?>"><?php _e('Edit post', WDFMInstance(self::PLUGIN)->prefix); ?></a>
1020
  <p class="description"><?php _e('Use this option to specify a time period (hours), during which the user will be able to verify their email address.', WDFMInstance(self::PLUGIN)->prefix); ?></p>
1021
  </div>
1022
  </div>
1152
  $stripe_addon = $params['stripe_addon'];
1153
  if ( $stripe_addon['enable'] ) {
1154
  if (WDFMInstance(self::PLUGIN)->is_free) {
1155
+ echo $this->free_message(__('STRIPE extension compatible with Premium version only', WDFMInstance(self::PLUGIN)->prefix), '', '', 'stripe_message');
1156
  }
1157
  }
1158
  else {
1159
  if (WDFMInstance(self::PLUGIN)->is_free) {
1160
+ echo $this->promo_box(__('This feature is available only in the Premium version', WDFMInstance(self::PLUGIN)->prefix), __('Requires STRIPE extension.', WDFMInstance(self::PLUGIN)->prefix), 'https://10web.io/plugins/wordpress-form-maker/#plugin_extensions', 'stripe_message');
1161
  }
1162
  else {
1163
+ echo $this->free_message(__('This feature requires STRIPE extension', WDFMInstance(self::PLUGIN)->prefix), 'https://10web.io/plugins/wordpress-form-maker/#plugin_extensions', __( 'Buy', WDFMInstance(self::PLUGIN)->prefix ), 'stripe_message');
1164
  }
1165
  }
1166
  ?>
1458
  }
1459
  else {
1460
  ?>
1461
+ <textarea autocomplete="off" cols="36" rows="5" id="submit_text" name="submit_text" style="resize: vertical; width:100%">
1462
  <?php echo $row->submit_text; ?>
1463
  </textarea>
1464
  <?php
1546
  <?php
1547
  if ( $stripe_addon['enable'] && !empty($stripe_addon['html']) ) {
1548
  if (WDFMInstance(self::PLUGIN)->is_free) {
1549
+ echo $this->free_message(__('STRIPE extension compatible with Premium version only', WDFMInstance(self::PLUGIN)->prefix));
1550
  }
1551
  else {
1552
  echo $stripe_addon[ 'html' ];
1554
  }
1555
  else {
1556
  if (WDFMInstance(self::PLUGIN)->is_free) {
1557
+ echo $this->promo_box(__('This feature is available only in the Premium version', WDFMInstance(self::PLUGIN)->prefix), __('Requires STRIPE extension.', WDFMInstance(self::PLUGIN)->prefix), 'https://10web.io/plugins/wordpress-form-maker/#plugin_extensions');
1558
  }
1559
  else {
1560
+ echo $this->free_message(__('This feature requires STRIPE extension', WDFMInstance(self::PLUGIN)->prefix), 'https://10web.io/plugins/wordpress-form-maker/#plugin_extensions', __( 'Buy', WDFMInstance(self::PLUGIN)->prefix ));
1561
  }
1562
  }
1563
  ?>
1595
  "type_password",
1596
  "type_textarea",
1597
  "type_name",
1598
+ "type_star_rating",
1599
  "type_number",
1600
  "type_phone",
1601
  "type_phone_new",
admin/views/view.php CHANGED
@@ -361,7 +361,6 @@ class FMAdminView_fmc {
361
  case 'addons': {
362
  $show_content = false;
363
  $show_head = true;
364
- $user_guide_link .= '';
365
  break;
366
  }
367
  default: {
@@ -427,14 +426,17 @@ class FMAdminView_fmc {
427
  $menus = array(
428
  'manage' => array(
429
  'href' => add_query_arg( array('page' => 'manage' . WDFMInstance(self::PLUGIN)->menu_postfix ), admin_url('admin.php')),
 
430
  'name' => __('Forms', WDFMInstance(self::PLUGIN)->prefix)
431
  ),
432
  'addons' => array(
433
  'href' => add_query_arg( array('page' => 'addons' . WDFMInstance(self::PLUGIN)->menu_postfix ), admin_url('admin.php')),
434
- 'name' => __('Add-ons', WDFMInstance(self::PLUGIN)->prefix)
 
435
  ),
436
  'pricing' => array(
437
  'href' => add_query_arg( array('page' => 'pricing' . WDFMInstance(self::PLUGIN)->menu_postfix ), admin_url('admin.php')),
 
438
  'name' => __('Premium Version', WDFMInstance(self::PLUGIN)->prefix) .' <span class="fm-upgrade">' . __('Upgrade', WDFMInstance(self::PLUGIN)->prefix) . '</span>'
439
  ),
440
  );
@@ -450,7 +452,7 @@ class FMAdminView_fmc {
450
  }
451
  ?>
452
  <li class="fm-breadcrumb-item">
453
- <a class="fm-breadcrumb-item-link<?php echo ( $key == $page ) ? ' fm-breadcrumb-item-link-active' : ''; ?>" href="<?php echo $item['href']; ?>"><?php echo $item['name']; ?></a>
454
  </li>
455
  <?php
456
  }
361
  case 'addons': {
362
  $show_content = false;
363
  $show_head = true;
 
364
  break;
365
  }
366
  default: {
426
  $menus = array(
427
  'manage' => array(
428
  'href' => add_query_arg( array('page' => 'manage' . WDFMInstance(self::PLUGIN)->menu_postfix ), admin_url('admin.php')),
429
+ 'target' => '_self',
430
  'name' => __('Forms', WDFMInstance(self::PLUGIN)->prefix)
431
  ),
432
  'addons' => array(
433
  'href' => add_query_arg( array('page' => 'addons' . WDFMInstance(self::PLUGIN)->menu_postfix ), admin_url('admin.php')),
434
+ 'target' => '_blank',
435
+ 'name' => __('Extensions', WDFMInstance(self::PLUGIN)->prefix)
436
  ),
437
  'pricing' => array(
438
  'href' => add_query_arg( array('page' => 'pricing' . WDFMInstance(self::PLUGIN)->menu_postfix ), admin_url('admin.php')),
439
+ 'target' => '_blank',
440
  'name' => __('Premium Version', WDFMInstance(self::PLUGIN)->prefix) .' <span class="fm-upgrade">' . __('Upgrade', WDFMInstance(self::PLUGIN)->prefix) . '</span>'
441
  ),
442
  );
452
  }
453
  ?>
454
  <li class="fm-breadcrumb-item">
455
+ <a class="fm-breadcrumb-item-link<?php echo ( $key == $page ) ? ' fm-breadcrumb-item-link-active' : ''; ?>" href="<?php echo $item['href']; ?>" target="<?php echo $item['target']; ?>"><?php echo $item['name']; ?></a>
456
  </li>
457
  <?php
458
  }
contact-form-maker.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Contact Form Maker
4
  * Plugin URI: https://web-dorado.com/products/form-maker-wordpress.html
5
  * Description: WordPress Contact Form Maker is a simple contact form builder, which allows the user with almost no knowledge of programming to create and edit different type of contact forms.
6
- * Version: 1.13.1
7
  * Author: WebDorado Form Builder Team
8
  * Author URI: https://web-dorado.com/wordpress-plugins-bundle.html
9
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
@@ -91,12 +91,12 @@ final class WDCFM {
91
  * Define Constants.
92
  */
93
  private function define_constants() {
94
- $this->plugin_dir = WP_PLUGIN_DIR . "/" . plugin_basename(dirname(__FILE__));
95
  $this->plugin_url = plugins_url(plugin_basename(dirname(__FILE__)));
96
  $this->front_urls = $this->get_front_urls();
97
  $this->main_file = plugin_basename(__FILE__);
98
- $this->plugin_version = '1.13.1';
99
- $this->db_version = '2.13.1';
100
  $this->menu_postfix = ($this->is_free == 2 ? '_fmc' : '_fm');
101
  $this->plugin_postfix = ($this->is_free == 2 ? '_fmc' : '');
102
  $this->menu_slug = 'manage' . $this->menu_postfix;
@@ -154,6 +154,8 @@ final class WDCFM {
154
  add_action('wp_ajax_frontend_generate_xml', array($this, 'form_maker_ajax_frontend')); //generate xml frontend
155
  add_action('wp_ajax_nopriv_frontend_generate_xml', array($this, 'form_maker_ajax_frontend')); //generate xml frontend
156
  }
 
 
157
 
158
  // Add media button to WP editor.
159
  add_action('wp_ajax_FMShortocde' . $this->plugin_postfix, array($this, 'form_maker_ajax'));
@@ -184,8 +186,10 @@ final class WDCFM {
184
  add_action('widgets_init', array($this, 'register_widgets'));
185
  }
186
 
187
- // Form maker activation.
188
- register_activation_hook(__FILE__, array($this, 'form_maker_on_activate'));
 
 
189
  if ( (!isset($_GET['action']) || $_GET['action'] != 'deactivate')
190
  && (!isset($_GET['page']) || $_GET['page'] != 'uninstall' . $this->menu_postfix) ) {
191
  add_action('admin_init', array($this, 'form_maker_activate'));
@@ -198,7 +202,7 @@ final class WDCFM {
198
  // Set per_page option for submissions.
199
  add_filter('set-screen-option', array($this, 'set_option_submissions'), 10, 3);
200
 
201
- // Check add-ons versions.
202
  if ( $this->is_free != 2 && isset( $_GET[ 'page' ] ) && strpos( esc_html( $_GET[ 'page' ] ), '_' . $this->handle_prefix ) !== FALSE ) {
203
  add_action('admin_notices', array($this, 'fm_check_addons_compatibility'));
204
  }
@@ -209,6 +213,7 @@ final class WDCFM {
209
 
210
  // Enqueue block editor assets for Gutenberg.
211
  add_filter('tw_get_block_editor_assets', array($this, 'register_block_editor_assets'));
 
212
  add_action( 'enqueue_block_editor_assets', array($this, 'enqueue_block_editor_assets') );
213
 
214
  // Privacy policy.
@@ -284,7 +289,7 @@ final class WDCFM {
284
  }
285
 
286
  public function register_block_editor_assets($assets) {
287
- $version = '2.0.0';
288
  $js_path = $this->plugin_url . '/js/tw-gb/block.js';
289
  $css_path = $this->plugin_url . '/css/tw-gb/block.css';
290
  if (!isset($assets['version']) || version_compare($assets['version'], $version) === -1) {
@@ -295,7 +300,7 @@ final class WDCFM {
295
  return $assets;
296
  }
297
 
298
- public function enqueue_block_editor_assets() {
299
  if ($this->is_free == 2) {
300
  $key = 'tw/contact-form-maker';
301
  $key_submissions = 'tw/cfm-submissions';
@@ -310,44 +315,27 @@ final class WDCFM {
310
  $icon_svg = $this->plugin_url . '/images/tw-gb/icon.svg';
311
  $url = add_query_arg(array('action' => 'FMShortocde' . $this->plugin_postfix, 'task' => 'submissions'), admin_url('admin-ajax.php'));
312
  $data = WDW_FM_Library(self::PLUGIN)->get_shortcode_data();
313
- ?>
314
- <script>
315
- if ( !window['tw_gb'] ) {
316
- window['tw_gb'] = {};
317
- }
318
- if ( !window['tw_gb']['<?php echo $key; ?>'] ) {
319
- window['tw_gb']['<?php echo $key; ?>'] = {
320
- title: '<?php echo $plugin_name; ?>',
321
- titleSelect: '<?php echo sprintf(__('Select %s', $this->prefix), $plugin_name); ?>',
322
- iconUrl: '<?php echo $icon_url; ?>',
323
- iconSvg: {
324
- width: '20',
325
- height: '20',
326
- src: '<?php echo $icon_svg; ?>'
327
- },
328
- isPopup: false,
329
- data: '<?php echo $data; ?>'
330
- }
331
- }
332
- if ( !window['tw_gb']['<?php echo $key_submissions; ?>'] ) {
333
- window['tw_gb']['<?php echo $key_submissions; ?>'] = {
334
- title: '<?php echo $plugin_name_submissions; ?>',
335
- titleSelect: '<?php echo sprintf(__('Select %s', $this->prefix), $plugin_name); ?>',
336
- iconUrl: '<?php echo $icon_url; ?>',
337
- iconSvg: {
338
- width: '20',
339
- height: '20',
340
- src: '<?php echo $icon_svg; ?>'
341
- },
342
- isPopup: true,
343
- containerClass: 'tw-container-wrap-520-400',
344
- data: {
345
- shortcodeUrl: '<?php echo $url; ?>'
346
- }
347
- }
348
- }
349
- </script>
350
- <?php
351
  // Remove previously registered or enqueued versions
352
  $wp_scripts = wp_scripts();
353
  foreach ($wp_scripts->registered as $key => $value) {
@@ -357,13 +345,16 @@ final class WDCFM {
357
  wp_deregister_style( $key );
358
  }
359
  }
 
 
360
  // Get the last version from all 10Web plugins.
361
  $assets = apply_filters('tw_get_block_editor_assets', array());
362
  // Not performing unregister or unenqueue as in old versions all are with prefixes.
363
  wp_enqueue_script('tw-gb-block', $assets['js_path'], array( 'wp-blocks', 'wp-element' ), $assets['version']);
364
- wp_localize_script('tw-gb-block', 'tw_obj', array(
365
  'nothing_selected' => __('Nothing selected.', $this->prefix),
366
  'empty_item' => __('- Select -', $this->prefix),
 
367
  ));
368
  wp_enqueue_style('tw-gb-block', $assets['css_path'], array( 'wp-edit-blocks' ), $assets['version']);
369
  }
@@ -393,12 +384,12 @@ final class WDCFM {
393
  require_once($this->plugin_dir . '/WDFM.php');
394
  }
395
 
396
- // Initialize add-ons.
397
  if ($this->is_free != 2) {
398
  do_action('fm_init_addons');
399
  }
400
- // Prevent adding shortcode conflict with some builders.
401
- $this->before_shortcode_add_builder_editor();
402
  }
403
 
404
  /**
@@ -708,18 +699,45 @@ final class WDCFM {
708
  * admin-ajax actions for admin.
709
  */
710
  public function form_maker_ajax() {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
711
  $page = WDW_FM_Library(self::PLUGIN)->get('action');
712
- if ( $page != 'formmakerwdcaptcha' . $this->plugin_postfix && $page != 'formmakerwdmathcaptcha' . $this->plugin_postfix && $page != 'checkpaypal' . $this->plugin_postfix ) {
713
- if ( function_exists('current_user_can') ) {
714
- if ( !current_user_can('manage_options') ) {
 
 
 
 
 
 
 
 
715
  die('Access Denied');
716
  }
717
  }
718
- else {
719
- die('Access Denied');
720
- }
721
- }
722
- if ( $page != '' ) {
723
  $page = ucfirst(substr($page, 0, strlen($page) - strlen($this->plugin_postfix)));
724
  $this->register_admin_ajax_scripts();
725
  require_once($this->plugin_dir . '/admin/controllers/' . ($page == 'Manage' ? substr($page.$this->plugin_postfix, 0, -1) : $page) . '.php');
@@ -735,6 +753,7 @@ final class WDCFM {
735
  public function form_maker_ajax_frontend() {
736
  $allowed_pages = array(
737
  'form_submissions',
 
738
  );
739
  $allowed_actions = array(
740
  'frontend_generate_xml',
@@ -743,6 +762,7 @@ final class WDCFM {
743
  'frontend_show_matrix',
744
  'frontend_show_map',
745
  'get_frontend_stats',
 
746
  );
747
 
748
  $action = WDW_FM_Library(self::PLUGIN)->get('action');
@@ -1011,6 +1031,38 @@ final class WDCFM {
1011
  wp_register_script($this->handle_prefix . '-gmap_form_back', $front_plugin_url . '/js/if_gmap_back_end.js', array(), $this->plugin_version);
1012
  }
1013
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1014
  /**
1015
  * Activate plugin.
1016
  */
@@ -1164,7 +1216,7 @@ final class WDCFM {
1164
  "titles" => array(
1165
  array(
1166
  "title" => __("Selecting Options from Database", $this->prefix),
1167
- "url" => "https://web-dorado.com/wordpress-form-maker/description-of-form-fields/selecting-options-from-database.html",
1168
  ),
1169
  )
1170
  ),
@@ -1189,7 +1241,7 @@ final class WDCFM {
1189
  "titles" => array()
1190
  ),
1191
  ),
1192
- "video_youtube_id" => "tN3_c6MhqFk", // e.g. https://www.youtube.com/watch?v=acaexefeP7o youtube id is the acaexefeP7o
1193
  "plugin_wd_url" => "https://web-dorado.com/files/fromContactForm.php",
1194
  "plugin_wd_demo_link" => "http://wpdemo.web-dorado.com",
1195
  "plugin_wd_addons_link" => "https://web-dorado.com/products/wordpress-form/add-ons.html",
@@ -1237,11 +1289,11 @@ final class WDCFM {
1237
 
1238
 
1239
  /**
1240
- * Check add-ones version compatibility with FM.
1241
  *
1242
  */
1243
  function fm_check_addons_compatibility() {
1244
- // Add-on last version(version which is compatible with current version of form maker).
1245
  $add_ons = array(
1246
  'form-maker-calculator' => array('version' => '1.1.2', 'file' => 'fm_calculator.php'),
1247
  'form-maker-conditional-emails' => array('version' => '1.1.6', 'file' => 'fm_conditional_emails.php'),
@@ -1284,8 +1336,8 @@ final class WDCFM {
1284
  function fm_addons_compatibility_notice($add_ons_notice) {
1285
  $addon_names = implode($add_ons_notice, ', ');
1286
  $count = count($add_ons_notice);
1287
- $single = __('The current version of %s add-on is not compatible with Form Maker. Some functions may not work correctly. Please update the add-on to fully use its features.', $this->prefix);
1288
- $plural = __('The current version of %s add-ons are not compatible with Form Maker. Some functions may not work correctly. Please update the add-ons to fully use its features.', $this->prefix);
1289
  echo '<div class="error"><p>' . sprintf( _n($single, $plural, $count, $this->prefix), $addon_names ) .'</p></div>';
1290
  }
1291
 
3
  * Plugin Name: Contact Form Maker
4
  * Plugin URI: https://web-dorado.com/products/form-maker-wordpress.html
5
  * Description: WordPress Contact Form Maker is a simple contact form builder, which allows the user with almost no knowledge of programming to create and edit different type of contact forms.
6
+ * Version: 1.13.3
7
  * Author: WebDorado Form Builder Team
8
  * Author URI: https://web-dorado.com/wordpress-plugins-bundle.html
9
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
91
  * Define Constants.
92
  */
93
  private function define_constants() {
94
+ $this->plugin_dir = WP_PLUGIN_DIR . "/" . plugin_basename(dirname(__FILE__));
95
  $this->plugin_url = plugins_url(plugin_basename(dirname(__FILE__)));
96
  $this->front_urls = $this->get_front_urls();
97
  $this->main_file = plugin_basename(__FILE__);
98
+ $this->plugin_version = '1.13.3';
99
+ $this->db_version = '2.13.3';
100
  $this->menu_postfix = ($this->is_free == 2 ? '_fmc' : '_fm');
101
  $this->plugin_postfix = ($this->is_free == 2 ? '_fmc' : '');
102
  $this->menu_slug = 'manage' . $this->menu_postfix;
154
  add_action('wp_ajax_frontend_generate_xml', array($this, 'form_maker_ajax_frontend')); //generate xml frontend
155
  add_action('wp_ajax_nopriv_frontend_generate_xml', array($this, 'form_maker_ajax_frontend')); //generate xml frontend
156
  }
157
+ add_action('wp_ajax_fm_reload_input', array($this, 'form_maker_ajax_frontend'));
158
+ add_action('wp_ajax_nopriv_fm_reload_input', array($this, 'form_maker_ajax_frontend'));
159
 
160
  // Add media button to WP editor.
161
  add_action('wp_ajax_FMShortocde' . $this->plugin_postfix, array($this, 'form_maker_ajax'));
186
  add_action('widgets_init', array($this, 'register_widgets'));
187
  }
188
 
189
+ // Plugin activation.
190
+ register_activation_hook(__FILE__, array($this, 'global_activate'));
191
+ add_action('wpmu_new_blog', array($this, 'new_blog_added'), 10, 6);
192
+
193
  if ( (!isset($_GET['action']) || $_GET['action'] != 'deactivate')
194
  && (!isset($_GET['page']) || $_GET['page'] != 'uninstall' . $this->menu_postfix) ) {
195
  add_action('admin_init', array($this, 'form_maker_activate'));
202
  // Set per_page option for submissions.
203
  add_filter('set-screen-option', array($this, 'set_option_submissions'), 10, 3);
204
 
205
+ // Check extensions versions.
206
  if ( $this->is_free != 2 && isset( $_GET[ 'page' ] ) && strpos( esc_html( $_GET[ 'page' ] ), '_' . $this->handle_prefix ) !== FALSE ) {
207
  add_action('admin_notices', array($this, 'fm_check_addons_compatibility'));
208
  }
213
 
214
  // Enqueue block editor assets for Gutenberg.
215
  add_filter('tw_get_block_editor_assets', array($this, 'register_block_editor_assets'));
216
+ add_filter('tw_get_plugin_blocks', array($this, 'register_plugin_block'));
217
  add_action( 'enqueue_block_editor_assets', array($this, 'enqueue_block_editor_assets') );
218
 
219
  // Privacy policy.
289
  }
290
 
291
  public function register_block_editor_assets($assets) {
292
+ $version = '2.0.3';
293
  $js_path = $this->plugin_url . '/js/tw-gb/block.js';
294
  $css_path = $this->plugin_url . '/css/tw-gb/block.css';
295
  if (!isset($assets['version']) || version_compare($assets['version'], $version) === -1) {
300
  return $assets;
301
  }
302
 
303
+ public function register_plugin_block($blocks) {
304
  if ($this->is_free == 2) {
305
  $key = 'tw/contact-form-maker';
306
  $key_submissions = 'tw/cfm-submissions';
315
  $icon_svg = $this->plugin_url . '/images/tw-gb/icon.svg';
316
  $url = add_query_arg(array('action' => 'FMShortocde' . $this->plugin_postfix, 'task' => 'submissions'), admin_url('admin-ajax.php'));
317
  $data = WDW_FM_Library(self::PLUGIN)->get_shortcode_data();
318
+ $blocks[$key] = array(
319
+ 'title' => $plugin_name,
320
+ 'titleSelect' => sprintf(__('Select %s', $this->prefix), $plugin_name),
321
+ 'iconUrl' => $icon_url,
322
+ 'iconSvg' => array('width' => 20, 'height' => 20, 'src' => $icon_svg),
323
+ 'isPopup' => false,
324
+ 'data' => $data,
325
+ );
326
+ $blocks[$key_submissions] = array(
327
+ 'title' => $plugin_name_submissions,
328
+ 'titleSelect' => sprintf(__('Select %s', $this->prefix), $plugin_name),
329
+ 'iconUrl' => $icon_url,
330
+ 'iconSvg' => array('width' => 20, 'height' => 20, 'src' => $icon_svg),
331
+ 'isPopup' => true,
332
+ 'containerClass' => 'tw-container-wrap-520-400',
333
+ 'data' => array('shortcodeUrl' => $url),
334
+ );
335
+ return $blocks;
336
+ }
337
+
338
+ public function enqueue_block_editor_assets() {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
339
  // Remove previously registered or enqueued versions
340
  $wp_scripts = wp_scripts();
341
  foreach ($wp_scripts->registered as $key => $value) {
345
  wp_deregister_style( $key );
346
  }
347
  }
348
+ // Get plugin blocks from all 10Web plugins.
349
+ $blocks = apply_filters('tw_get_plugin_blocks', array());
350
  // Get the last version from all 10Web plugins.
351
  $assets = apply_filters('tw_get_block_editor_assets', array());
352
  // Not performing unregister or unenqueue as in old versions all are with prefixes.
353
  wp_enqueue_script('tw-gb-block', $assets['js_path'], array( 'wp-blocks', 'wp-element' ), $assets['version']);
354
+ wp_localize_script('tw-gb-block', 'tw_obj_translate', array(
355
  'nothing_selected' => __('Nothing selected.', $this->prefix),
356
  'empty_item' => __('- Select -', $this->prefix),
357
+ 'blocks' => json_encode($blocks)
358
  ));
359
  wp_enqueue_style('tw-gb-block', $assets['css_path'], array( 'wp-edit-blocks' ), $assets['version']);
360
  }
384
  require_once($this->plugin_dir . '/WDFM.php');
385
  }
386
 
387
+ // Initialize extensions.
388
  if ($this->is_free != 2) {
389
  do_action('fm_init_addons');
390
  }
391
+ // Prevent adding shortcode conflict with some builders.
392
+ $this->before_shortcode_add_builder_editor();
393
  }
394
 
395
  /**
699
  * admin-ajax actions for admin.
700
  */
701
  public function form_maker_ajax() {
702
+ $allowed_pages = array(
703
+ 'manage_fm' . $this->plugin_postfix,
704
+ 'manage' . $this->plugin_postfix,
705
+ 'generete_csv' . $this->plugin_postfix,
706
+ 'generete_xml' . $this->plugin_postfix,
707
+ 'formmakerwdcaptcha' . $this->plugin_postfix,
708
+ 'formmakerwdmathcaptcha' . $this->plugin_postfix,
709
+ 'product_option' . $this->plugin_postfix,
710
+ 'FormMakerEditCountryinPopup' . $this->plugin_postfix,
711
+ 'FormMakerMapEditinPopup' . $this->plugin_postfix,
712
+ 'FormMakerIpinfoinPopup' . $this->plugin_postfix,
713
+ 'show_matrix' . $this->plugin_postfix,
714
+ 'FormMakerSubmits' . $this->plugin_postfix,
715
+ 'FMShortocde' . $this->plugin_postfix,
716
+ );
717
+ if ( !$this->is_demo ) {
718
+ $allowed_pages[] = 'FormMakerSQLMapping' . $this->plugin_postfix;
719
+ $allowed_pages[] = 'select_data_from_db' . $this->plugin_postfix;
720
+ }
721
+ if ( !$this->is_free ) {
722
+ $allowed_pages[] = 'paypal_info';
723
+ $allowed_pages[] = 'checkpaypal';
724
+ }
725
+
726
  $page = WDW_FM_Library(self::PLUGIN)->get('action');
727
+
728
+ if ( !empty($page) && in_array($page, $allowed_pages) ) {
729
+ if ( $page != 'formmakerwdcaptcha' . $this->plugin_postfix
730
+ && $page != 'formmakerwdmathcaptcha' . $this->plugin_postfix
731
+ && $page != 'checkpaypal' ) {
732
+ if ( function_exists('current_user_can') ) {
733
+ if ( !current_user_can('manage_options') ) {
734
+ die('Access Denied');
735
+ }
736
+ }
737
+ else {
738
  die('Access Denied');
739
  }
740
  }
 
 
 
 
 
741
  $page = ucfirst(substr($page, 0, strlen($page) - strlen($this->plugin_postfix)));
742
  $this->register_admin_ajax_scripts();
743
  require_once($this->plugin_dir . '/admin/controllers/' . ($page == 'Manage' ? substr($page.$this->plugin_postfix, 0, -1) : $page) . '.php');
753
  public function form_maker_ajax_frontend() {
754
  $allowed_pages = array(
755
  'form_submissions',
756
+ 'form_maker'
757
  );
758
  $allowed_actions = array(
759
  'frontend_generate_xml',
762
  'frontend_show_matrix',
763
  'frontend_show_map',
764
  'get_frontend_stats',
765
+ 'fm_reload_input'
766
  );
767
 
768
  $action = WDW_FM_Library(self::PLUGIN)->get('action');
1031
  wp_register_script($this->handle_prefix . '-gmap_form_back', $front_plugin_url . '/js/if_gmap_back_end.js', array(), $this->plugin_version);
1032
  }
1033
 
1034
+ /*
1035
+ * Global activate.
1036
+ *
1037
+ * @param $networkwide
1038
+ */
1039
+ public function global_activate($networkwide) {
1040
+ if ( function_exists('is_multisite') && is_multisite() ) {
1041
+ // Check if it is a network activation - if so, run the activation function for each blog id.
1042
+ if ( $networkwide ) {
1043
+ global $wpdb;
1044
+ // Get all blog ids.
1045
+ $blogids = $wpdb->get_col("SELECT blog_id FROM $wpdb->blogs");
1046
+ foreach ( $blogids as $blog_id ) {
1047
+ switch_to_blog($blog_id);
1048
+ $this->form_maker_on_activate();
1049
+ restore_current_blog();
1050
+ }
1051
+
1052
+ return;
1053
+ }
1054
+ }
1055
+ $this->form_maker_on_activate();
1056
+ }
1057
+
1058
+ public function new_blog_added( $blog_id, $user_id, $domain, $path, $site_id, $meta ) {
1059
+ if ( is_plugin_active_for_network( $this->main_file ) ) {
1060
+ switch_to_blog($blog_id);
1061
+ $this->form_maker_on_activate();
1062
+ restore_current_blog();
1063
+ }
1064
+ }
1065
+
1066
  /**
1067
  * Activate plugin.
1068
  */
1216
  "titles" => array(
1217
  array(
1218
  "title" => __("Selecting Options from Database", $this->prefix),
1219
+ "url" => "https://web-dorado.com/wordpress-form-maker/selecting-options-from-database.html",
1220
  ),
1221
  )
1222
  ),
1241
  "titles" => array()
1242
  ),
1243
  ),
1244
+ "video_youtube_id" => "tN3_c6MhqFk",
1245
  "plugin_wd_url" => "https://web-dorado.com/files/fromContactForm.php",
1246
  "plugin_wd_demo_link" => "http://wpdemo.web-dorado.com",
1247
  "plugin_wd_addons_link" => "https://web-dorado.com/products/wordpress-form/add-ons.html",
1289
 
1290
 
1291
  /**
1292
+ * Check extensions version compatibility with FM.
1293
  *
1294
  */
1295
  function fm_check_addons_compatibility() {
1296
+ // Extension last version(version which is compatible with current version of form maker).
1297
  $add_ons = array(
1298
  'form-maker-calculator' => array('version' => '1.1.2', 'file' => 'fm_calculator.php'),
1299
  'form-maker-conditional-emails' => array('version' => '1.1.6', 'file' => 'fm_conditional_emails.php'),
1336
  function fm_addons_compatibility_notice($add_ons_notice) {
1337
  $addon_names = implode($add_ons_notice, ', ');
1338
  $count = count($add_ons_notice);
1339
+ $single = __('The current version of %s extension is not compatible with Form Maker. Some functions may not work correctly. Please update the extension to fully use its features.', $this->prefix);
1340
+ $plural = __('The current version of %s extensions are not compatible with Form Maker. Some functions may not work correctly. Please update the extensions to fully use its features.', $this->prefix);
1341
  echo '<div class="error"><p>' . sprintf( _n($single, $plural, $count, $this->prefix), $addon_names ) .'</p></div>';
1342
  }
1343
 
css/form_maker_frontend.css CHANGED
@@ -32,7 +32,6 @@
32
 
33
  div[type="type_submit_reset"],
34
  div[type="type_button"] {
35
- height: 100%;
36
  justify-content: flex-end;
37
  }
38
 
@@ -557,6 +556,9 @@ div[type="type_file_upload"] .wdform-element-section {
557
  .fm-popover-content {
558
  width: 95% !important;
559
  }
 
 
 
560
  }
561
 
562
  @media screen and (max-width: 480px){
@@ -826,6 +828,9 @@ input[type=number].wd-type-number {
826
  display: block;
827
  background: transparent;
828
  border: none !important;
 
 
 
829
  }
830
  .fm-form-container .fm-form .image_left_right.fm-header {
831
  padding: 0 !important;
@@ -1049,6 +1054,9 @@ div[type="type_slider"] .label {
1049
  display: initial !important;
1050
  margin-right: 5px;
1051
  }
 
 
 
1052
 
1053
  .fm-form-builder .wdform_page {
1054
  display: flex;
@@ -1100,6 +1108,19 @@ div[type="type_slider"] .label {
1100
  }
1101
  }
1102
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1103
  .fm-col-1 {
1104
  flex: 0 1 100% !important;;
1105
  width: 100% !important;;
32
 
33
  div[type="type_submit_reset"],
34
  div[type="type_button"] {
 
35
  justify-content: flex-end;
36
  }
37
 
556
  .fm-popover-content {
557
  width: 95% !important;
558
  }
559
+ .fm-form-container .fm-scrollbox {
560
+ width: 97% !important;
561
+ }
562
  }
563
 
564
  @media screen and (max-width: 480px){
828
  display: block;
829
  background: transparent;
830
  border: none !important;
831
+ -webkit-box-sizing: border-box;
832
+ -moz-box-sizing: border-box;
833
+ box-sizing: border-box;
834
  }
835
  .fm-form-container .fm-form .image_left_right.fm-header {
836
  padding: 0 !important;
1054
  display: initial !important;
1055
  margin-right: 5px;
1056
  }
1057
+ .fm-form .wdform_row {
1058
+ position: relative;
1059
+ }
1060
 
1061
  .fm-form-builder .wdform_page {
1062
  display: flex;
1108
  }
1109
  }
1110
 
1111
+ .fm-loading {
1112
+ width: 100%;
1113
+ height: 100%;
1114
+ top: 0;
1115
+ left: 0;
1116
+ position: absolute;
1117
+ background-color: rgba(0, 0, 0, 0.25);
1118
+ background-image: url(../images/spinner.gif);
1119
+ background-position: center;
1120
+ background-repeat: no-repeat;
1121
+ background-size: 10%;
1122
+ z-index: 100100;
1123
+ }
1124
  .fm-col-1 {
1125
  flex: 0 1 100% !important;;
1126
  width: 100% !important;;
css/pricing.css CHANGED
@@ -733,7 +733,7 @@
733
  line-height: 26px;
734
  }
735
  /* Limitations alert end */
736
- /* Add-ons start */
737
  .fm-add-ons {
738
  display: flex;
739
  flex-wrap: wrap;
@@ -857,4 +857,4 @@
857
  .fm-add-ons .fm-add-on .fm-add-on-learn-more:hover {
858
  color: rgba(0, 115, 170, 0.8);
859
  }
860
- /* Add-ons end */
733
  line-height: 26px;
734
  }
735
  /* Limitations alert end */
736
+ /* Extensions start */
737
  .fm-add-ons {
738
  display: flex;
739
  flex-wrap: wrap;
857
  .fm-add-ons .fm-add-on .fm-add-on-learn-more:hover {
858
  color: rgba(0, 115, 170, 0.8);
859
  }
860
+ /* Extensions end */
css/tw-gb/block.css CHANGED
@@ -1,15 +1,15 @@
1
  /**
2
  * 10Web plugins Gutenberg integration
3
- * version 2.0.0
4
  */
5
  .tw-container {
6
- position: fixed;
7
- top: 0;
8
- left: 0;
9
- right: 0;
10
- bottom: 0;
11
- z-index: 9999999;
12
- background: rgba(0,0,0,0.7);
13
  }
14
 
15
  .tw-container .tw-container-wrap {
@@ -22,6 +22,12 @@
22
  margin: auto;
23
  right: 0;
24
  left: 0;
 
 
 
 
 
 
25
  }
26
 
27
  .tw-container .tw-container-wrap-520-400 {
@@ -35,14 +41,15 @@
35
  }
36
 
37
  .tw-container .tw-container-wrap .media-modal-close{
38
- line-height: 34px;
39
- text-align: center;
40
- height: 40px;
 
41
  }
42
 
43
  .tw-container .tw-container-wrap iframe {
44
- height: 100%;
45
- width: 100%;
46
  }
47
  .tw-gb-select {
48
  width: 100%;
1
  /**
2
  * 10Web plugins Gutenberg integration
3
+ * version 2.0.3
4
  */
5
  .tw-container {
6
+ position: fixed;
7
+ top: 0;
8
+ left: 0;
9
+ right: 0;
10
+ bottom: 0;
11
+ z-index: 9999999;
12
+ background: rgba(0,0,0,0.7);
13
  }
14
 
15
  .tw-container .tw-container-wrap {
22
  margin: auto;
23
  right: 0;
24
  left: 0;
25
+ padding-top: 40px;
26
+ }
27
+
28
+ .tw-container .tw-container-wrap-800-540 {
29
+ max-width: 800px;
30
+ max-height: 540px;
31
  }
32
 
33
  .tw-container .tw-container-wrap-520-400 {
41
  }
42
 
43
  .tw-container .tw-container-wrap .media-modal-close{
44
+ line-height: 34px;
45
+ text-align: center;
46
+ height: 40px;
47
+ top: 10px;
48
  }
49
 
50
  .tw-container .tw-container-wrap iframe {
51
+ height: 100%;
52
+ width: 100%;
53
  }
54
  .tw-gb-select {
55
  width: 100%;
form_maker_update.php CHANGED
@@ -260,7 +260,7 @@ class WDCFMUpdate {
260
  $wpdb->query("ALTER TABLE `" . $wpdb->prefix . "formmaker_backup` ADD `privacy` longtext NOT NULL DEFAULT ''");
261
  }
262
 
263
- if (version_compare($version, '2.12.39') == -1) {
264
  $wpdb->query("ALTER TABLE `" . $wpdb->prefix . "formmaker` ADD `header_hide` tinyint(4) NOT NULL DEFAULT '1'");
265
  $wpdb->query("ALTER TABLE `" . $wpdb->prefix . "formmaker_backup` ADD `header_hide` tinyint(4) NOT NULL DEFAULT '1'");
266
  $wpdb->query("ALTER TABLE `" . $wpdb->prefix . "formmaker_backup` ADD `date` int(10) NOT NULL");
260
  $wpdb->query("ALTER TABLE `" . $wpdb->prefix . "formmaker_backup` ADD `privacy` longtext NOT NULL DEFAULT ''");
261
  }
262
 
263
+ if (version_compare($version, '2.13.0') == -1) {
264
  $wpdb->query("ALTER TABLE `" . $wpdb->prefix . "formmaker` ADD `header_hide` tinyint(4) NOT NULL DEFAULT '1'");
265
  $wpdb->query("ALTER TABLE `" . $wpdb->prefix . "formmaker_backup` ADD `header_hide` tinyint(4) NOT NULL DEFAULT '1'");
266
  $wpdb->query("ALTER TABLE `" . $wpdb->prefix . "formmaker_backup` ADD `date` int(10) NOT NULL");
framework/WDW_FM_Library.php CHANGED
@@ -11,12 +11,12 @@ class WDW_FMC_Library {
11
  protected static $_instance = null;
12
 
13
  /**
14
- * Main WDW_FM_Library Instance.
15
  *
16
  * Ensures only one instance is loaded or can be loaded.
17
  *
18
  * @static
19
- * @return WDW_FM_Library - Main instance.
20
  */
21
  public static function instance() {
22
  if ( is_null( self::$_instance ) ) {
@@ -1061,6 +1061,7 @@ class WDW_FMC_Library {
1061
  $params_value = explode('***', wp_specialchars_decode($cond_params[$m], 'single'));
1062
  switch ( $type_and_id[$params_value[0]] ) {
1063
  case "type_text":
 
1064
  case "type_password":
1065
  case "type_textarea":
1066
  case "type_number":
@@ -1078,7 +1079,12 @@ class WDW_FMC_Library {
1078
  $params_value[2] = "";
1079
  $params_value[1] = $params_value[1] . "=";
1080
  }
1081
- $if .= ' jQuery("#wdform_' . $params_value[0] . '_element' . $form_id . '").val()' . $params_value[1] . '"' . $params_value[2] . '" ';
 
 
 
 
 
1082
  }
1083
  $keyup .= '#wdform_' . $params_value[0] . '_element' . $form_id . ', ';
1084
  if ( $type_and_id[$params_value[0]] == "type_date_new" ) {
@@ -1087,6 +1093,9 @@ class WDW_FMC_Library {
1087
  if ( $type_and_id[$params_value[0]] == "type_spinner" ) {
1088
  $click .= '#wdform_' . $params_value[0] . '_element' . $form_id . ' ~ a, ';
1089
  }
 
 
 
1090
  if ( $type_and_id[$params_value[0]] == "type_phone_new" ) {
1091
  $blur = '#wdform_' . $params_value[0] . '_element' . $form_id . ', ';
1092
  }
@@ -1738,11 +1747,13 @@ class WDW_FMC_Library {
1738
  $check_regExp_all = array();
1739
  $check_paypal_price_min_max = array();
1740
  $file_upload_check = array();
 
1741
  $spinner_check = array();
1742
  foreach ( $id1s as $id1s_key => $id1 ) {
1743
- $label = $labels[$id1s_key];
1744
  $type = $types[$id1s_key];
1745
  $params = $paramss[$id1s_key];
 
1746
  if ( strpos($form, '%' . $id1 . ' - ' . $label . '%') || strpos($form, '%' . $id1 . ' -' . $label . '%') ) {
1747
  $required = FALSE;
1748
  $param = array();
@@ -2284,11 +2295,27 @@ class WDW_FMC_Library {
2284
  'w_class',
2285
  );
2286
  }
 
2287
  foreach ( $params_names as $params_name ) {
2288
  $temp = explode('*:*' . $params_name . '*:*', $temp);
2289
  $param[$params_name] = $temp[0];
2290
  $temp = $temp[1];
2291
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2292
  $required = ($param['w_required'] == "yes" ? TRUE : FALSE);
2293
  $post_value = isset($_POST["counter" . $form_id]) ? esc_html($_POST["counter" . $form_id]) : NULL;
2294
  $is_other = FALSE;
@@ -2308,16 +2335,14 @@ class WDW_FMC_Library {
2308
  array_push($req_fields, $id1);
2309
  }
2310
  if ( $is_other ) {
2311
- $onload_js .= '
2312
- show_other_input("wdform_' . $id1 . '","' . $form_id . '"); jQuery("#wdform_' . $id1 . '_other_input' . $form_id . '").val("' . (isset($_POST['wdform_' . $id1 . "_other_input" . $form_id]) ? esc_html(stripslashes($_POST['wdform_' . $id1 . "_other_input" . $form_id])) : '') . '");';
2313
  }
2314
  if ( $param['w_randomize'] == 'yes' ) {
2315
- $onload_js .= '
2316
- jQuery("#form' . $form_id . ' div[wdid=' . $id1 . '] .wdform-element-section> div").shuffle();';
2317
  }
2318
  $onsubmit_js .= '
2319
- jQuery("<input type=\"hidden\" name=\"wdform_' . $id1 . '_allow_other' . $form_id . '\" value=\"' . $param['w_allow_other'] . '\" />").appendTo("#form' . $form_id . '");
2320
- jQuery("<input type=\"hidden\" name=\"wdform_' . $id1 . '_allow_other_num' . $form_id . '\" value=\"' . $param['w_allow_other_num'] . '\" />").appendTo("#form' . $form_id . '");';
2321
  break;
2322
  }
2323
  case 'type_radio': {
@@ -2379,6 +2404,21 @@ class WDW_FMC_Library {
2379
  $param[$params_name] = $temp[0];
2380
  $temp = $temp[1];
2381
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2382
  $required = ($param['w_required'] == "yes" ? TRUE : FALSE);
2383
  $post_value = isset($_POST["counter" . $form_id]) ? esc_html($_POST["counter" . $form_id]) : NULL;
2384
  $is_other = FALSE;
@@ -2458,6 +2498,20 @@ class WDW_FMC_Library {
2458
  $param[$params_name] = $temp[0];
2459
  $temp = $temp[1];
2460
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2461
  $required = ($param['w_required'] == "yes" ? TRUE : FALSE);
2462
  if ( $required ) {
2463
  array_push($req_fields, $id1);
@@ -3301,18 +3355,28 @@ class WDW_FMC_Library {
3301
  $param[$params_name] = $temp[0];
3302
  $temp = $temp[1];
3303
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
3304
  $required = ($param['w_required'] == "yes" ? TRUE : FALSE);
3305
  $param['w_property'] = explode('***', $param['w_property']);
3306
  if ( $required ) {
3307
  array_push($req_fields, $id1);
3308
  }
3309
- $onsubmit_js .= '
3310
- jQuery("<input type=\"hidden\" name=\"wdform_' . $id1 . '_element_label' . $form_id . '\" />").val(jQuery("#wdform_' . $id1 . '_element' . $form_id . ' option:selected").text()).appendTo("#form' . $form_id . '");';
3311
- $onsubmit_js .= '
3312
- jQuery("<input type=\"hidden\" name=\"wdform_' . $id1 . '_element_quantity_label' . $form_id . '\" />").val("' . (__("Quantity", WDFMInstance(self::PLUGIN)->prefix)) . '").appendTo("#form' . $form_id . '");';
3313
  foreach ( $param['w_property'] as $key => $property ) {
3314
- $onsubmit_js .= '
3315
- jQuery("<input type=\"hidden\" name=\"wdform_' . $id1 . '_element_property_label' . $form_id . $key . '\" />").val("' . $property . '").appendTo("#form' . $form_id . '");';
3316
  }
3317
  break;
3318
  }
@@ -3383,18 +3447,16 @@ class WDW_FMC_Library {
3383
  $param[$params_name] = $temp[0];
3384
  $temp = $temp[1];
3385
  }
 
3386
  $required = ($param['w_required'] == "yes" ? TRUE : FALSE);
3387
  $param['w_property'] = explode('***', $param['w_property']);
3388
  if ( $required ) {
3389
  array_push($req_fields, $id1);
3390
  }
3391
- $onsubmit_js .= '
3392
- jQuery("<input type=\"hidden\" name=\"wdform_' . $id1 . '_element_label' . $form_id . '\" />").val((jQuery("#wdform_' . $id1 . '_element' . $form_id . ' input:checked").length != 0) ? jQuery("#wdform_' . $id1 . '_element' . $form_id . ' input:checked").attr("id").replace("element", "elementlabel_") : "").appendTo("#form' . $form_id . '");';
3393
- $onsubmit_js .= '
3394
- jQuery("<input type=\"hidden\" name=\"wdform_' . $id1 . '_element_quantity_label' . $form_id . '\" />").val("' . (__("Quantity", WDFMInstance(self::PLUGIN)->prefix)) . '").appendTo("#form' . $form_id . '");';
3395
  foreach ( $param['w_property'] as $key => $property ) {
3396
- $onsubmit_js .= '
3397
- jQuery("<input type=\"hidden\" name=\"wdform_' . $id1 . '_element_property_label' . $form_id . $key . '\" />").val("' . $property . '").appendTo("#form' . $form_id . '");';
3398
  }
3399
  break;
3400
  }
@@ -3470,13 +3532,10 @@ class WDW_FMC_Library {
3470
  if ( $required ) {
3471
  array_push($req_fields, $id1);
3472
  }
3473
- $onsubmit_js .= '
3474
- jQuery("<input type=\"hidden\" name=\"wdform_' . $id1 . '_element_label' . $form_id . '\" />").val(jQuery("label[for=\'"+jQuery("input[name^=\'wdform_' . $id1 . '_element' . $form_id . '\']:checked").attr("id")+"\']").eq(0).text()).appendTo("#form' . $form_id . '");';
3475
- $onsubmit_js .= '
3476
- jQuery("<input type=\"hidden\" name=\"wdform_' . $id1 . '_element_quantity_label' . $form_id . '\" />").val("' . (__("Quantity", WDFMInstance(self::PLUGIN)->prefix)) . '").appendTo("#form' . $form_id . '");';
3477
  foreach ( $param['w_property'] as $key => $property ) {
3478
- $onsubmit_js .= '
3479
- jQuery("<input type=\"hidden\" name=\"wdform_' . $id1 . '_element_property_label' . $form_id . $key . '\" />").val("' . $property . '").appendTo("#form' . $form_id . '");';
3480
  }
3481
  break;
3482
  }
@@ -3879,7 +3938,7 @@ class WDW_FMC_Library {
3879
  }
3880
  }
3881
  }
3882
- $onsubmit_js .= '
3883
  var disabled_fields = "";
3884
  jQuery("#form' . $form_id . ' div[wdid]").each(function() {
3885
  if(jQuery(this).css("display") == "none") {
@@ -3907,43 +3966,152 @@ class WDW_FMC_Library {
3907
  var header_image_animation<?php echo $form_id; ?> = '<?php echo $row->header_image_animation; ?>';
3908
  var scrollbox_loading_delay<?php echo $form_id; ?> = '<?php echo $row_display->scrollbox_loading_delay; ?>';
3909
  var scrollbox_auto_hide<?php echo $form_id; ?> = '<?php echo $row_display->scrollbox_auto_hide; ?>';
3910
- <?php
3911
- ?>
3912
  <?php echo preg_replace($pattern, ' ', $row->javascript); ?>
3913
 
3914
  function onload_js<?php echo $form_id ?>() {<?php
3915
- echo $onload_js; ?>
3916
-
3917
  }
3918
- function condition_js<?php echo $form_id ?>() {<?php
3919
- echo $condition_js; ?>
3920
 
 
 
3921
  }
 
3922
  function check_js<?php echo $form_id ?>(id, form_id) {
3923
- if (id != 0) {
3924
- x = jQuery("#" + form_id + "form_view"+id);
3925
- }
3926
- else {
3927
- x = jQuery("#form"+form_id);
3928
- }<?php
3929
- echo $check_js; ?>
3930
  }
 
3931
  function onsubmit_js<?php echo $form_id ?>() {
3932
- <?php echo $onsubmit_js; ?>
3933
- }
3934
- form_view_count<?php echo $form_id ?> = 0;
3935
- jQuery(document).ready(function () {
3936
- if (jQuery('form#form<?php echo $form_id ?> .wdform_section').length > 0) {
3937
- fm_document_ready(<?php echo $form_id ?>);
3938
- }
3939
- else {
3940
- jQuery("#form<?php echo $form_id ?>").closest(".fm-form-container").removeAttr("style")
3941
  }
3942
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3943
  jQuery(document).ready(function () {
3944
- if (jQuery('form#form<?php echo $form_id ?> .wdform_section').length > 0) {
3945
- formOnload(<?php echo $form_id ?>);
3946
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3947
  });
3948
  <?php
3949
  $js_content = ob_get_clean();
@@ -4279,7 +4447,7 @@ class WDW_FMC_Library {
4279
  }
4280
  foreach ( $addons as $addon ) {
4281
  if ( is_plugin_active( $addon ) ) {
4282
- deactivate_plugins( $addon );
4283
  }
4284
  }
4285
  }
11
  protected static $_instance = null;
12
 
13
  /**
14
+ * Main WDW_FMC_Library Instance.
15
  *
16
  * Ensures only one instance is loaded or can be loaded.
17
  *
18
  * @static
19
+ * @return WDW_FMC_Library - Main instance.
20
  */
21
  public static function instance() {
22
  if ( is_null( self::$_instance ) ) {
1061
  $params_value = explode('***', wp_specialchars_decode($cond_params[$m], 'single'));
1062
  switch ( $type_and_id[$params_value[0]] ) {
1063
  case "type_text":
1064
+ case "type_star_rating":
1065
  case "type_password":
1066
  case "type_textarea":
1067
  case "type_number":
1079
  $params_value[2] = "";
1080
  $params_value[1] = $params_value[1] . "=";
1081
  }
1082
+ if ( $type_and_id[$params_value[0]] == "type_star_rating" ) {
1083
+ $if .= ' jQuery("#wdform_' . $params_value[0] . '_selected_star_amount' . $form_id . '").val()' . $params_value[1] . '"' . $params_value[2] . '" ';
1084
+ }
1085
+ else {
1086
+ $if .= ' jQuery("#wdform_' . $params_value[0] . '_element' . $form_id . '").val()' . $params_value[1] . '"' . $params_value[2] . '" ';
1087
+ }
1088
  }
1089
  $keyup .= '#wdform_' . $params_value[0] . '_element' . $form_id . ', ';
1090
  if ( $type_and_id[$params_value[0]] == "type_date_new" ) {
1093
  if ( $type_and_id[$params_value[0]] == "type_spinner" ) {
1094
  $click .= '#wdform_' . $params_value[0] . '_element' . $form_id . ' ~ a, ';
1095
  }
1096
+ if ( $type_and_id[$params_value[0]] == "type_star_rating" ) {
1097
+ $change .= '#wdform_' . $params_value[0] . '_selected_star_amount' . $form_id . ', ';
1098
+ }
1099
  if ( $type_and_id[$params_value[0]] == "type_phone_new" ) {
1100
  $blur = '#wdform_' . $params_value[0] . '_element' . $form_id . ', ';
1101
  }
1747
  $check_regExp_all = array();
1748
  $check_paypal_price_min_max = array();
1749
  $file_upload_check = array();
1750
+ $inputIds = array();
1751
  $spinner_check = array();
1752
  foreach ( $id1s as $id1s_key => $id1 ) {
1753
+ $label = $labels[$id1s_key];
1754
  $type = $types[$id1s_key];
1755
  $params = $paramss[$id1s_key];
1756
+ $id_type = $id1 . '|' . $type;
1757
  if ( strpos($form, '%' . $id1 . ' - ' . $label . '%') || strpos($form, '%' . $id1 . ' -' . $label . '%') ) {
1758
  $required = FALSE;
1759
  $param = array();
2295
  'w_class',
2296
  );
2297
  }
2298
+
2299
  foreach ( $params_names as $params_name ) {
2300
  $temp = explode('*:*' . $params_name . '*:*', $temp);
2301
  $param[$params_name] = $temp[0];
2302
  $temp = $temp[1];
2303
  }
2304
+
2305
+ if ( isset($param['w_choices_value']) ) {
2306
+ $param['w_choices_value'] = explode('***', $param['w_choices_value']);
2307
+ $param['w_choices_params'] = explode('***', $param['w_choices_params']);
2308
+ }
2309
+
2310
+ foreach ( $param['w_choices_params'] as $choices ) {
2311
+ if ( !empty($choices) ) {
2312
+ preg_match_all('/{\d+}/', $choices, $matches);
2313
+ if ( !empty($matches[0][0]) ) {
2314
+ $inputIds[$id_type][] = str_replace( array('{','}'), array('',''), $matches[0][0] );
2315
+ }
2316
+ }
2317
+ }
2318
+
2319
  $required = ($param['w_required'] == "yes" ? TRUE : FALSE);
2320
  $post_value = isset($_POST["counter" . $form_id]) ? esc_html($_POST["counter" . $form_id]) : NULL;
2321
  $is_other = FALSE;
2335
  array_push($req_fields, $id1);
2336
  }
2337
  if ( $is_other ) {
2338
+ $onload_js .= 'show_other_input("wdform_' . $id1 . '","' . $form_id . '"); jQuery("#wdform_' . $id1 . '_other_input' . $form_id . '").val("' . (isset($_POST['wdform_' . $id1 . "_other_input" . $form_id]) ? esc_html(stripslashes($_POST['wdform_' . $id1 . "_other_input" . $form_id])) : '') . '");';
 
2339
  }
2340
  if ( $param['w_randomize'] == 'yes' ) {
2341
+ $onload_js .= 'jQuery("#form' . $form_id . ' div[wdid=' . $id1 . '] .wdform-element-section> div").shuffle();';
 
2342
  }
2343
  $onsubmit_js .= '
2344
+ jQuery("<input type=\"hidden\" name=\"wdform_' . $id1 . '_allow_other' . $form_id . '\" value=\"' . $param['w_allow_other'] . '\" />").appendTo("#form' . $form_id . '");
2345
+ jQuery("<input type=\"hidden\" name=\"wdform_' . $id1 . '_allow_other_num' . $form_id . '\" value=\"' . $param['w_allow_other_num'] . '\" />").appendTo("#form' . $form_id . '");';
2346
  break;
2347
  }
2348
  case 'type_radio': {
2404
  $param[$params_name] = $temp[0];
2405
  $temp = $temp[1];
2406
  }
2407
+
2408
+ if ( isset($param['w_choices_value']) ) {
2409
+ $param['w_choices_value'] = explode('***', $param['w_choices_value']);
2410
+ $param['w_choices_params'] = explode('***', $param['w_choices_params']);
2411
+ }
2412
+
2413
+ foreach ( $param['w_choices_params'] as $choices ) {
2414
+ if ( !empty($choices) ) {
2415
+ preg_match_all('/{\d+}/', $choices, $matches);
2416
+ if ( !empty($matches[0][0]) ) {
2417
+ $inputIds[$id_type][] = str_replace( array('{','}'), array('',''), $matches[0][0] );
2418
+ }
2419
+ }
2420
+ }
2421
+
2422
  $required = ($param['w_required'] == "yes" ? TRUE : FALSE);
2423
  $post_value = isset($_POST["counter" . $form_id]) ? esc_html($_POST["counter" . $form_id]) : NULL;
2424
  $is_other = FALSE;
2498
  $param[$params_name] = $temp[0];
2499
  $temp = $temp[1];
2500
  }
2501
+
2502
+ if ( isset($param['w_choices_value']) ) {
2503
+ $param['w_choices_value'] = explode('***', $param['w_choices_value']);
2504
+ $param['w_choices_params'] = explode('***', $param['w_choices_params']);
2505
+ }
2506
+
2507
+ foreach ( $param['w_choices_params'] as $choices ) {
2508
+ if ( !empty($choices) ) {
2509
+ preg_match_all('/{\d+}/', $choices, $matches);
2510
+ if ( !empty($matches[0][0]) ) {
2511
+ $inputIds[$id_type][] = str_replace( array('{','}'), array('',''), $matches[0][0] );
2512
+ }
2513
+ }
2514
+ }
2515
  $required = ($param['w_required'] == "yes" ? TRUE : FALSE);
2516
  if ( $required ) {
2517
  array_push($req_fields, $id1);
3355
  $param[$params_name] = $temp[0];
3356
  $temp = $temp[1];
3357
  }
3358
+
3359
+ if ( isset($param['w_choices_params']) ) {
3360
+ $w_choices_params = explode('***', $param['w_choices_params']);
3361
+ foreach ( $w_choices_params as $choices ) {
3362
+ if ( !empty($choices) ) {
3363
+ preg_match_all('/{\d+}/', $choices, $matches);
3364
+ if ( !empty($matches[0][0]) ) {
3365
+ $inputIds[$id_type][] = str_replace( array('{','}'), array('',''), $matches[0][0] );
3366
+ }
3367
+ }
3368
+ }
3369
+ }
3370
+
3371
  $required = ($param['w_required'] == "yes" ? TRUE : FALSE);
3372
  $param['w_property'] = explode('***', $param['w_property']);
3373
  if ( $required ) {
3374
  array_push($req_fields, $id1);
3375
  }
3376
+ $onsubmit_js .= 'jQuery("<input type=\"hidden\" name=\"wdform_' . $id1 . '_element_label' . $form_id . '\" />").val(jQuery("#wdform_' . $id1 . '_element' . $form_id . ' option:selected").text()).appendTo("#form' . $form_id . '");';
3377
+ $onsubmit_js .= 'jQuery("<input type=\"hidden\" name=\"wdform_' . $id1 . '_element_quantity_label' . $form_id . '\" />").val("' . (__("Quantity", WDFMInstance(self::PLUGIN)->prefix)) . '").appendTo("#form' . $form_id . '");';
 
 
3378
  foreach ( $param['w_property'] as $key => $property ) {
3379
+ $onsubmit_js .= 'jQuery("<input type=\"hidden\" name=\"wdform_' . $id1 . '_element_property_label' . $form_id . $key . '\" />").val("' . $property . '").appendTo("#form' . $form_id . '");';
 
3380
  }
3381
  break;
3382
  }
3447
  $param[$params_name] = $temp[0];
3448
  $temp = $temp[1];
3449
  }
3450
+
3451
  $required = ($param['w_required'] == "yes" ? TRUE : FALSE);
3452
  $param['w_property'] = explode('***', $param['w_property']);
3453
  if ( $required ) {
3454
  array_push($req_fields, $id1);
3455
  }
3456
+ $onsubmit_js .= 'jQuery("<input type=\"hidden\" name=\"wdform_' . $id1 . '_element_label' . $form_id . '\" />").val((jQuery("#wdform_' . $id1 . '_element' . $form_id . ' input:checked").length != 0) ? jQuery("#wdform_' . $id1 . '_element' . $form_id . ' input:checked").attr("id").replace("element", "elementlabel_") : "").appendTo("#form' . $form_id . '");';
3457
+ $onsubmit_js .= 'jQuery("<input type=\"hidden\" name=\"wdform_' . $id1 . '_element_quantity_label' . $form_id . '\" />").val("' . (__("Quantity", WDFMInstance(self::PLUGIN)->prefix)) . '").appendTo("#form' . $form_id . '");';
 
 
3458
  foreach ( $param['w_property'] as $key => $property ) {
3459
+ $onsubmit_js .= 'jQuery("<input type=\"hidden\" name=\"wdform_' . $id1 . '_element_property_label' . $form_id . $key . '\" />").val("' . $property . '").appendTo("#form' . $form_id . '");';
 
3460
  }
3461
  break;
3462
  }
3532
  if ( $required ) {
3533
  array_push($req_fields, $id1);
3534
  }
3535
+ $onsubmit_js .= 'jQuery("<input type=\"hidden\" name=\"wdform_' . $id1 . '_element_label' . $form_id . '\" />").val(jQuery("label[for=\'"+jQuery("input[name^=\'wdform_' . $id1 . '_element' . $form_id . '\']:checked").attr("id")+"\']").eq(0).text()).appendTo("#form' . $form_id . '");';
3536
+ $onsubmit_js .= 'jQuery("<input type=\"hidden\" name=\"wdform_' . $id1 . '_element_quantity_label' . $form_id . '\" />").val("' . (__("Quantity", WDFMInstance(self::PLUGIN)->prefix)) . '").appendTo("#form' . $form_id . '");';
 
 
3537
  foreach ( $param['w_property'] as $key => $property ) {
3538
+ $onsubmit_js .= 'jQuery("<input type=\"hidden\" name=\"wdform_' . $id1 . '_element_property_label' . $form_id . $key . '\" />").val("' . $property . '").appendTo("#form' . $form_id . '");';
 
3539
  }
3540
  break;
3541
  }
3938
  }
3939
  }
3940
  }
3941
+ $onsubmit_js .= '
3942
  var disabled_fields = "";
3943
  jQuery("#form' . $form_id . ' div[wdid]").each(function() {
3944
  if(jQuery(this).css("display") == "none") {
3966
  var header_image_animation<?php echo $form_id; ?> = '<?php echo $row->header_image_animation; ?>';
3967
  var scrollbox_loading_delay<?php echo $form_id; ?> = '<?php echo $row_display->scrollbox_loading_delay; ?>';
3968
  var scrollbox_auto_hide<?php echo $form_id; ?> = '<?php echo $row_display->scrollbox_auto_hide; ?>';
3969
+ var inputIds<?php echo $form_id; ?> = '<?php echo json_encode($inputIds); ?>';
3970
+ var form_view_count<?php echo $form_id ?> = 0;
3971
  <?php echo preg_replace($pattern, ' ', $row->javascript); ?>
3972
 
3973
  function onload_js<?php echo $form_id ?>() {<?php
3974
+ echo $onload_js; ?>
 
3975
  }
 
 
3976
 
3977
+ function condition_js<?php echo $form_id ?>() {<?php
3978
+ echo $condition_js; ?>
3979
  }
3980
+
3981
  function check_js<?php echo $form_id ?>(id, form_id) {
3982
+ if (id != 0) {
3983
+ x = jQuery("#" + form_id + "form_view"+id);
3984
+ }
3985
+ else {
3986
+ x = jQuery("#form"+form_id);
3987
+ }
3988
+ <?php echo $check_js; ?>
3989
  }
3990
+
3991
  function onsubmit_js<?php echo $form_id ?>() {
3992
+ <?php echo $onsubmit_js; ?>
 
 
 
 
 
 
 
 
3993
  }
3994
+
3995
+ function unset_fields<?php echo $form_id ?>( values, id, i ) {
3996
+ rid = 0;
3997
+ if ( i > 0 ) {
3998
+ jQuery.each( values, function( k, v ) {
3999
+ if ( id == k.split('|')[2] ) {
4000
+ rid = k.split('|')[0];
4001
+ values[k] = '';
4002
+ }
4003
+ });
4004
+ return unset_fields<?php echo $form_id ?>(values, rid, i - 1);
4005
+ } else {
4006
+ return values;
4007
+ }
4008
+ }
4009
+
4010
+ function ajax_similarity<?php echo $form_id ?>( obj, changing_field_id ) {
4011
+ jQuery.ajax({
4012
+ type: "POST",
4013
+ url: '<?php echo add_query_arg( array( 'action' => 'fm_reload_input', 'page' => 'form_maker' ), admin_url('admin-ajax.php') ); ?>',
4014
+ dataType: "json",
4015
+ data: {
4016
+ form_id: <?php echo $form_id ?>,
4017
+ inputs: obj.inputs
4018
+ },
4019
+ beforeSend: function() {
4020
+ if ( !jQuery.isEmptyObject(obj.inputs) ) {
4021
+ jQuery.each( obj.inputs, function( key, val ) {
4022
+ wdid = key.split('|')[0];
4023
+ if ( val != '' && parseInt(wdid) == parseInt(changing_field_id) ) {
4024
+ jQuery("#form<?php echo $form_id ?> div[wdid='"+ wdid +"']").append( '<div class="fm-loading"></div>' );
4025
+ }
4026
+ });
4027
+ }
4028
+ },
4029
+ success: function (res) {
4030
+ if ( !jQuery.isEmptyObject(obj.inputs) ) {
4031
+ jQuery.each( obj.inputs, function( key, val ) {
4032
+ wdid = key.split('|')[0];
4033
+ jQuery("#form<?php echo $form_id ?> div[wdid='"+ wdid +"'] .fm-loading").remove();
4034
+ if ( !jQuery.isEmptyObject(res[wdid]) && ( !val || parseInt(wdid) == parseInt(changing_field_id) ) ) {
4035
+ jQuery("#form<?php echo $form_id ?> div[wdid='"+ wdid +"']").html( res[wdid].html );
4036
+ }
4037
+ });
4038
+ }
4039
+ },
4040
+ complete: function() {
4041
+ }
4042
+ });
4043
+ }
4044
+
4045
  jQuery(document).ready(function () {
4046
+ if (jQuery('#form<?php echo $form_id ?> .wdform_section').length > 0) {
4047
+ fm_document_ready(<?php echo $form_id ?>);
4048
+ }
4049
+ else {
4050
+ jQuery("#form<?php echo $form_id ?>").closest(".fm-form-container").removeAttr("style")
4051
+ }
4052
+ if (jQuery('#form<?php echo $form_id ?> .wdform_section').length > 0) {
4053
+ formOnload(<?php echo $form_id ?>);
4054
+ }
4055
+
4056
+ var ajaxObj<?php echo $form_id ?> = {};
4057
+ var value_ids<?php echo $form_id ?> = {};
4058
+
4059
+ jQuery.each( jQuery.parseJSON( inputIds<?php echo $form_id ?> ), function( key, values ) {
4060
+ jQuery.each( values, function( index, input_id ) {
4061
+ tagName = jQuery('#form<?php echo $form_id ?> [id^="wdform_'+ input_id +'_elemen"]').prop("tagName");
4062
+ type = jQuery('#form<?php echo $form_id ?> [id^="wdform_'+ input_id +'_elemen"]').prop("type");
4063
+ if ( tagName == 'INPUT' ) {
4064
+ input_value = jQuery('#form<?php echo $form_id ?> [id^="wdform_'+ input_id +'_elemen"]').val();
4065
+ if ( jQuery('#form<?php echo $form_id ?> [id^="wdform_'+ input_id +'_elemen"]').is(':checked') ) {
4066
+ if ( input_value ) {
4067
+ value_ids<?php echo $form_id ?>[key + '|' + input_id] = input_value;
4068
+ }
4069
+ }
4070
+ else if ( type == 'text' ) {
4071
+ if ( input_value ) {
4072
+ value_ids<?php echo $form_id ?>[key + '|' + input_id] = input_value;
4073
+ }
4074
+ }
4075
+ }
4076
+ else if ( tagName == 'SELECT' ) {
4077
+ select_value = jQuery('#form<?php echo $form_id ?> [id^="wdform_'+ input_id +'_elemen"] option:selected').val();
4078
+ if ( select_value ) {
4079
+ value_ids<?php echo $form_id ?>[key + '|' + input_id] = select_value;
4080
+ }
4081
+ }
4082
+ ajaxObj<?php echo $form_id ?>.inputs = value_ids<?php echo $form_id ?>;
4083
+
4084
+ jQuery(document).on('change', '#form<?php echo $form_id ?> [id^="wdform_'+ input_id +'_elemen"]', function() {
4085
+ var id = '';
4086
+ var changing_field_id = '';
4087
+ if( jQuery(this).prop("tagName") == 'INPUT' ) {
4088
+ if( jQuery(this).is(':checked') ) {
4089
+ id = jQuery(this).val();
4090
+ }
4091
+ if( jQuery(this).attr('type') == 'text' ) {
4092
+ id = jQuery(this).val();
4093
+ }
4094
+ }
4095
+ else {
4096
+ id = jQuery(this).val();
4097
+ }
4098
+ value_ids<?php echo $form_id ?>[key + '|' + input_id] = id;
4099
+
4100
+ jQuery.each( value_ids<?php echo $form_id ?>, function( k, v ) {
4101
+ key_arr = k.split('|');
4102
+ if ( input_id == key_arr[2] ) {
4103
+ changing_field_id = key_arr[0];
4104
+ count = Object.keys(value_ids<?php echo $form_id ?>).length;
4105
+ value_ids<?php echo $form_id ?> = unset_fields<?php echo $form_id ?>( value_ids<?php echo $form_id ?>, changing_field_id, count );
4106
+ }
4107
+ });
4108
+
4109
+ ajaxObj<?php echo $form_id ?>.inputs = value_ids<?php echo $form_id ?>;
4110
+ ajax_similarity<?php echo $form_id ?>( ajaxObj<?php echo $form_id ?>, changing_field_id );
4111
+ });
4112
+ });
4113
+ });
4114
+ ajax_similarity<?php echo $form_id ?>( ajaxObj<?php echo $form_id ?>, null );
4115
  });
4116
  <?php
4117
  $js_content = ob_get_clean();
4447
  }
4448
  foreach ( $addons as $addon ) {
4449
  if ( is_plugin_active( $addon ) ) {
4450
+ deactivate_plugins( $addon, false, false );
4451
  }
4452
  }
4453
  }
frontend/controllers/form_maker.php CHANGED
@@ -39,7 +39,12 @@ class FMControllerForm_maker_fmc {
39
  * @return string|void
40
  */
41
  public function execute( $id = 0, $type = 'embedded' ) {
42
- return $this->display($id, $type);
 
 
 
 
 
43
  }
44
 
45
  /**
@@ -222,4 +227,66 @@ class FMControllerForm_maker_fmc {
222
  }
223
  return true;
224
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
225
  }
39
  * @return string|void
40
  */
41
  public function execute( $id = 0, $type = 'embedded' ) {
42
+ $action = WDW_FM_Library(self::PLUGIN)->get('action');
43
+ if ( method_exists($this, $action) ) {
44
+ $this->$action();
45
+ } else {
46
+ return $this->display($id, $type);
47
+ }
48
  }
49
 
50
  /**
227
  }
228
  return true;
229
  }
230
+
231
+ public function fm_reload_input() {
232
+ global $wpdb;
233
+ $form_id = WDW_FM_Library::get('form_id');
234
+ $inputs = WDW_FM_Library::get('inputs');
235
+ $json = array();
236
+ if ( !empty($form_id) && !empty($inputs) ) {
237
+ $row = $wpdb->get_row( $wpdb->prepare( 'SELECT * FROM ' . $wpdb->prefix . 'formmaker WHERE id="%d"' . (!WDFMInstance(self::PLUGIN)->is_free ? '' : ' AND id' . (WDFMInstance(self::PLUGIN)->is_free == 1 ? ' NOT ' : ' ') . 'IN (' . (get_option( 'contact_form_forms', '' ) != '' ? get_option( 'contact_form_forms' ) : 0) . ')'), $form_id ) );
238
+ $id1s = array();
239
+ $types = array();
240
+ $labels = array();
241
+ $paramss = array();
242
+ $fields = explode('*:*new_field*:*', $row->form_fields);
243
+ $fields = array_slice($fields, 0, count($fields) - 1);
244
+ foreach ( $fields as $field ) {
245
+ $temp = explode('*:*id*:*', $field);
246
+ array_push($id1s, $temp[0]);
247
+ $temp = explode('*:*type*:*', $temp[1]);
248
+ array_push($types, $temp[0]);
249
+ $temp = explode('*:*w_field_label*:*', $temp[1]);
250
+ array_push($labels, $temp[0]);
251
+ array_push($paramss, $temp[1]);
252
+ }
253
+
254
+ $ids = array();
255
+ $reset_fields = array();
256
+ foreach ( $inputs as $input_key => $input_val ) {
257
+ list( $row_id, $type, $input_id) = explode('|', $input_key);
258
+ $key = $row_id . '|'. $type;
259
+ $ids[$key][] = $input_id.'|'.$input_val;
260
+
261
+ if ( empty($input_val) ) {
262
+ $reset_fields[] = $row_id;
263
+ }
264
+ }
265
+ if ( !empty($ids) ) {
266
+ foreach ( $ids as $row_key => $row_values ) {
267
+ list($row_id, $type) = explode('|', $row_key);
268
+
269
+ $index = array_search($row_id, $id1s);
270
+ $label = $labels[$index];
271
+ $params = $paramss[$index];
272
+ $param = array();
273
+ $param['label'] = $label;
274
+ $param['attributes'] = '';
275
+ $param['reset_fields'] = $reset_fields;
276
+ foreach ( $row_values as $val ) {
277
+ list($input_id, $input_val) = explode('|', $val);
278
+ $str_key = '{'. $input_id .'}';
279
+ if ( strpos($params, $str_key) > -1 ) {
280
+ $params = str_replace( $str_key, $input_val, $params );
281
+ }
282
+ }
283
+ $html = $this->view->$type( $params, $row, $form_id, $row_id, $type, $param );
284
+ $json[$row_id] = array('html' => $html);
285
+ }
286
+ }
287
+ } else {
288
+ $json['error'] = 1;
289
+ }
290
+ echo json_encode($json); exit;
291
+ }
292
  }
frontend/models/form_maker.php CHANGED
@@ -639,6 +639,7 @@ class FMModelForm_maker_fmc {
639
  .fm-form-container.fm-theme' . $theme_id . ' .fm-form textarea,
640
  .fm-form-container.fm-theme' . $theme_id . ' .fm-form .ui-spinner-input,
641
  .fm-form-container.fm-theme' . $theme_id . ' .fm-form .file-upload-status,
 
642
  .fm-form-container.fm-theme' . $theme_id . ' .fm-form select {' .
643
  (!empty( $form_theme[ 'IPMargin' ] ) ? 'margin:' . $form_theme[ 'IPMargin' ] . ';' : '') .
644
  (!empty( $form_theme[ 'IPBGColor' ] ) ? 'background-color:' . $form_theme[ 'IPBGColor' ] . ';' : '') .
@@ -648,6 +649,10 @@ class FMModelForm_maker_fmc {
648
  ((isset( $form_theme[ 'IPBorderRadius' ] ) && $form_theme[ 'IPBorderRadius' ] !== '') ? 'border-radius:' . $form_theme[ 'IPBorderRadius' ] . 'px !important;' : '') .
649
  (!empty( $form_theme[ 'IPBoxShadow' ] ) ? 'box-shadow:' . $form_theme[ 'IPBoxShadow' ] . ';' : '') .
650
  '}';
 
 
 
 
651
  if ( $borders[ 'IP' ] ) {
652
  foreach ( $borders[ 'IP' ] as $border ) {
653
  if ( !empty( $form_theme[ 'IPBorderType' ] ) && ($form_theme[ 'IPBorderType' ] == 'inherit' || $form_theme[ 'IPBorderType' ] == 'initial') ) {
@@ -1219,7 +1224,7 @@ class FMModelForm_maker_fmc {
1219
  }
1220
  else {
1221
  $result_temp = $this->save_db( $id_for_old );
1222
- // Enqueue any message from an add-on to display.
1223
  if ( isset( $result_temp[ 'message' ] ) ) {
1224
  $_SESSION['massage_after_submit' . $id] = $result_temp['message'];
1225
  $_SESSION['error_or_no' . $id ] = 0;
@@ -1258,7 +1263,7 @@ class FMModelForm_maker_fmc {
1258
  if ( $db_info ) {
1259
  $temp = explode( '@@@wdfhostwdf@@@', $db_info );
1260
  $host = $temp[ 0 ];
1261
- $temp = explode( '@@@wdfportwdf@@@', $temp[ 1 ] );
1262
  $port = $temp[ 0 ];
1263
  if ($port) {
1264
  $host .= ':' . $port;
@@ -1432,7 +1437,7 @@ class FMModelForm_maker_fmc {
1432
  case "type_send_copy":
1433
  case "type_spinner": {
1434
  $value = isset( $_POST[ 'wdform_' . $i . "_element" . $id ] ) ? trim( esc_html( $_POST[ 'wdform_' . $i . "_element" . $id ] ) ) : "";
1435
- if ( $required && empty( $value ) ) {
1436
  $missing_required_field = TRUE;
1437
  }
1438
  break;
@@ -1545,7 +1550,7 @@ class FMModelForm_maker_fmc {
1545
  $upload_dir = wp_upload_dir();
1546
  $files = isset( $_FILES[ 'wdform_' . $i . '_file' . $id ] ) ? $_FILES[ 'wdform_' . $i . '_file' . $id ] : array();
1547
  if ( !empty($files) ) {
1548
- foreach ( $files[ 'name' ] as $file_key => $file_name ) {
1549
  if ( $file_name ) {
1550
  $untilupload = $form->form_fields;
1551
  $untilupload = substr( $untilupload, strpos( $untilupload, $i . '*:*id*:*type_file_upload' ), -1 );
@@ -1877,10 +1882,11 @@ class FMModelForm_maker_fmc {
1877
  }
1878
  case "type_paypal_radio": {
1879
  $value = '';
1880
- $element = isset( $_POST[ 'wdform_' . $i . "_element" . $id ] ) && $_POST[ 'wdform_' . $i . "_element" . $id ] ? esc_html( $_POST[ 'wdform_' . $i . "_element" . $id ] ) : '';
1881
- if ( $element ) {
1882
  $value = (isset( $_POST[ 'wdform_' . $i . "_element_label" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_element_label" . $id ] ) : '') . ' : ' . $form_currency . $element;
1883
  }
 
1884
  if ( $required && !isset( $_POST[ 'wdform_' . $i . "_element" . $id ] ) ) {
1885
  $missing_required_field = TRUE;
1886
  break;
@@ -1912,7 +1918,7 @@ class FMModelForm_maker_fmc {
1912
  break;
1913
  }
1914
  case "type_paypal_shipping": {
1915
- $element = isset( $_POST[ 'wdform_' . $i . "_element" . $id ] ) && $_POST[ 'wdform_' . $i . "_element" . $id ] ? esc_html( $_POST[ 'wdform_' . $i . "_element" . $id ] ) : '';
1916
  if ( $required && !isset( $_POST[ 'wdform_' . $i . "_element" . $id ] ) ) {
1917
  $missing_required_field = TRUE;
1918
  break;
@@ -2414,13 +2420,13 @@ class FMModelForm_maker_fmc {
2414
  do_action( 'fm_addon_frontend_init', $frontend_parmas );
2415
  }
2416
  $return_value = array( 'group_id' => $group_id, 'all_files' => $all_files, 'redirect_url' => $str );
2417
- // Get output from add-ons.
2418
  $return_value = $this->get_output_from_add_ons( $return_value );
2419
  return $return_value;
2420
  }
2421
 
2422
  /**
2423
- * Get output from add-ons.
2424
  *
2425
  * @param array $params
2426
  * @return array $$outputs
@@ -3231,16 +3237,16 @@ class FMModelForm_maker_fmc {
3231
  $header_arr['cc'] = $row->mail_cc_user;
3232
  $header_arr['bcc'] = $row->mail_bcc_user;
3233
 
3234
- // PDF output for add-on.
3235
  $pdf_data = array('attach_to_admin' => 0, 'attach_to_user' => 0, 'pdf_url' => '');
3236
  if ( WDFMInstance(self::PLUGIN)->is_free != 2 ) {
3237
- $pdf_data = apply_filters( 'fm_pdf_data_frontend', $pdf_data, array( 'custom_fields' => $this->custom_fields, 'form_id' => $id ) );
3238
  }
3239
  if ( $pdf_data['attach_to_user'] ) {
3240
  array_push( $attachment_user, $pdf_data['pdf_url'] );
3241
  }
3242
 
3243
- if ( $row->sendemail && $row->send_to || (has_action('fm_set_params_frontend_init') && WDFMInstance(self::PLUGIN)->is_free != 2) ) {
3244
  $body = $new_script;
3245
  $send_tos = explode( '**', $row->send_to );
3246
  $send_copy = isset( $_POST[ "wdform_send_copy_" . $id ] ) ? $_POST[ "wdform_send_copy_" . $id ] : NULL;
@@ -3255,38 +3261,45 @@ class FMModelForm_maker_fmc {
3255
  $body = str_replace( '{PDF(link)}', site_url($pdf_data['pdf_url']), $body );
3256
 
3257
  foreach ( $send_tos as $index => $send_to ) {
3258
- $send_to = str_replace( '*', '', $send_to );
3259
- if ( $row->mail_verify && $verification_link !== NULL
3260
- && (strpos( $new_script, "{verificationlink}" ) > -1 || strpos( $new_script, "%Verification link%" ) > -1) ) {
3261
- $ver_link = $row->mail_mode_user ? "<a href =" . add_query_arg( array(
3262
- 'gid' => $_SESSION[ 'gid' ],
3263
- 'h' => $_SESSION[ 'hash' ][ $index ] . '@' . $send_to,
3264
- ), get_post_permalink( $mail_verification_post_id ) ) . ">" . add_query_arg( array(
3265
- 'gid' => $_SESSION[ 'gid' ],
3266
- 'h' => $_SESSION[ 'hash' ][ $index ] . '@' . $send_to,
3267
- ), get_post_permalink( $mail_verification_post_id ) ) . "</a><br/>" : add_query_arg( array(
3268
- 'gid' => $_SESSION[ 'gid' ],
3269
- 'h' => $_SESSION[ 'hash' ][ $index ] . '@' . $send_to,
3270
- ), get_post_permalink( $mail_verification_post_id ) );
3271
- $body = str_replace( array( '%Verification link%', '{verificationlink}' ), $ver_link, $new_script );
3272
- }
3273
- $recipient = isset( $_POST[ 'wdform_' . str_replace( '*', '', $send_to ) . "_element" . $id ] ) ? $_POST[ 'wdform_' . $send_to . "_element" . $id ] : NULL;
3274
- if ( $recipient ) {
3275
- if ( $row->mail_attachment_user ) {
3276
- $remove_parrent_array_user = new RecursiveIteratorIterator( new RecursiveArrayIterator( $attachment_user ) );
3277
- $attachment_user = iterator_to_array( $remove_parrent_array_user, FALSE );
3278
- }
3279
- else {
 
 
 
 
 
 
 
 
3280
  $attachment_user = array();
3281
  }
3282
- if ( $row->sendemail && $row->send_to ) {
3283
  WDW_FM_Library(self::PLUGIN)->mail($recipient, $subject, $body, $header_arr, $attachment_user);
3284
  }
3285
  }
3286
  }
3287
  }
3288
  }
3289
-
3290
  // Admin part.
3291
  if ( $row->sendemail || (has_action('fm_set_params_frontend_init') && WDFMInstance(self::PLUGIN)->is_free != 2) ) {
3292
  $recipient = $row->mail ? $row->mail : '';
@@ -3411,7 +3424,7 @@ class FMModelForm_maker_fmc {
3411
  }
3412
  }
3413
 
3414
- // Add-on conditional email.
3415
  if ( has_action('fm_set_params_frontend_init') && WDFMInstance(self::PLUGIN)->is_free != 2 ) {
3416
  $fm_email_params = $row->sendemail ? array(
3417
  'admin_body' => $admin_body,
@@ -3456,7 +3469,7 @@ class FMModelForm_maker_fmc {
3456
  }
3457
 
3458
  if ( $row->submit_text_type != 4 || $row->url == '' ) {
3459
- // This ensures that no message is enqueued by an add-on.
3460
  if ( !isset($_SESSION[ 'massage_after_submit' . $id ]) || !$_SESSION[ 'massage_after_submit' . $id ] ) {
3461
  $_SESSION[ 'massage_after_submit' . $id ] = $msg;
3462
  }
@@ -3521,7 +3534,7 @@ class FMModelForm_maker_fmc {
3521
  $file_name = explode( '/', $attach );
3522
  $file_name = end( $file_name );
3523
  if ( $file_upload_link == 1 ) {
3524
- $new_value .= '<a href="' . site_url() . '/' . $attach . '"/>' . $file_name . '</a><br />';
3525
  } else {
3526
  $invalidFileExts = array(
3527
  'gif',
@@ -3919,7 +3932,7 @@ class FMModelForm_maker_fmc {
3919
  */
3920
  public function empty_field( $element = '', $mail_emptyfields = '' ) {
3921
  if ( !$mail_emptyfields ) {
3922
- if ( empty( $element ) ) {
3923
  return 0;
3924
  }
3925
  }
639
  .fm-form-container.fm-theme' . $theme_id . ' .fm-form textarea,
640
  .fm-form-container.fm-theme' . $theme_id . ' .fm-form .ui-spinner-input,
641
  .fm-form-container.fm-theme' . $theme_id . ' .fm-form .file-upload-status,
642
+ .fm-form-container.fm-theme' . $theme_id . ' .fm-form .country-name,
643
  .fm-form-container.fm-theme' . $theme_id . ' .fm-form select {' .
644
  (!empty( $form_theme[ 'IPMargin' ] ) ? 'margin:' . $form_theme[ 'IPMargin' ] . ';' : '') .
645
  (!empty( $form_theme[ 'IPBGColor' ] ) ? 'background-color:' . $form_theme[ 'IPBGColor' ] . ';' : '') .
649
  ((isset( $form_theme[ 'IPBorderRadius' ] ) && $form_theme[ 'IPBorderRadius' ] !== '') ? 'border-radius:' . $form_theme[ 'IPBorderRadius' ] . 'px !important;' : '') .
650
  (!empty( $form_theme[ 'IPBoxShadow' ] ) ? 'box-shadow:' . $form_theme[ 'IPBoxShadow' ] . ';' : '') .
651
  '}';
652
+ $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form .ui-slider-range {' .
653
+ ((isset( $form_theme[ 'IPBorderRadius' ] ) && $form_theme[ 'IPBorderRadius' ] !== '') ? 'border-radius:' . $form_theme[ 'IPBorderRadius' ] . 'px 0 0 ' . $form_theme[ 'IPBorderRadius' ] . 'px !important;' : '') .
654
+ '}';
655
+
656
  if ( $borders[ 'IP' ] ) {
657
  foreach ( $borders[ 'IP' ] as $border ) {
658
  if ( !empty( $form_theme[ 'IPBorderType' ] ) && ($form_theme[ 'IPBorderType' ] == 'inherit' || $form_theme[ 'IPBorderType' ] == 'initial') ) {
1224
  }
1225
  else {
1226
  $result_temp = $this->save_db( $id_for_old );
1227
+ // Enqueue any message from an extension to display.
1228
  if ( isset( $result_temp[ 'message' ] ) ) {
1229
  $_SESSION['massage_after_submit' . $id] = $result_temp['message'];
1230
  $_SESSION['error_or_no' . $id ] = 0;
1263
  if ( $db_info ) {
1264
  $temp = explode( '@@@wdfhostwdf@@@', $db_info );
1265
  $host = $temp[ 0 ];
1266
+ $temp = explode( '@@@wdfportwdf@@@', $temp[1] );
1267
  $port = $temp[ 0 ];
1268
  if ($port) {
1269
  $host .= ':' . $port;
1437
  case "type_send_copy":
1438
  case "type_spinner": {
1439
  $value = isset( $_POST[ 'wdform_' . $i . "_element" . $id ] ) ? trim( esc_html( $_POST[ 'wdform_' . $i . "_element" . $id ] ) ) : "";
1440
+ if ( $required && $value === '' ) {
1441
  $missing_required_field = TRUE;
1442
  }
1443
  break;
1550
  $upload_dir = wp_upload_dir();
1551
  $files = isset( $_FILES[ 'wdform_' . $i . '_file' . $id ] ) ? $_FILES[ 'wdform_' . $i . '_file' . $id ] : array();
1552
  if ( !empty($files) ) {
1553
+ foreach ( $files[ 'name' ] as $file_key => $file_name ) {
1554
  if ( $file_name ) {
1555
  $untilupload = $form->form_fields;
1556
  $untilupload = substr( $untilupload, strpos( $untilupload, $i . '*:*id*:*type_file_upload' ), -1 );
1882
  }
1883
  case "type_paypal_radio": {
1884
  $value = '';
1885
+ $element = isset( $_POST[ 'wdform_' . $i . "_element" . $id ] ) && $_POST[ 'wdform_' . $i . "_element" . $id ] !== '' ? esc_html( $_POST[ 'wdform_' . $i . "_element" . $id ] ) : NULL;
1886
+ if ( isset($element) ) {
1887
  $value = (isset( $_POST[ 'wdform_' . $i . "_element_label" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_element_label" . $id ] ) : '') . ' : ' . $form_currency . $element;
1888
  }
1889
+
1890
  if ( $required && !isset( $_POST[ 'wdform_' . $i . "_element" . $id ] ) ) {
1891
  $missing_required_field = TRUE;
1892
  break;
1918
  break;
1919
  }
1920
  case "type_paypal_shipping": {
1921
+ $element = isset( $_POST[ 'wdform_' . $i . "_element" . $id ] ) && $_POST[ 'wdform_' . $i . "_element" . $id ] !== '' ? esc_html( $_POST[ 'wdform_' . $i . "_element" . $id ] ) : '';
1922
  if ( $required && !isset( $_POST[ 'wdform_' . $i . "_element" . $id ] ) ) {
1923
  $missing_required_field = TRUE;
1924
  break;
2420
  do_action( 'fm_addon_frontend_init', $frontend_parmas );
2421
  }
2422
  $return_value = array( 'group_id' => $group_id, 'all_files' => $all_files, 'redirect_url' => $str );
2423
+ // Get output from extensions.
2424
  $return_value = $this->get_output_from_add_ons( $return_value );
2425
  return $return_value;
2426
  }
2427
 
2428
  /**
2429
+ * Get output from extensions.
2430
  *
2431
  * @param array $params
2432
  * @return array $$outputs
3237
  $header_arr['cc'] = $row->mail_cc_user;
3238
  $header_arr['bcc'] = $row->mail_bcc_user;
3239
 
3240
+ // PDF output for extension.
3241
  $pdf_data = array('attach_to_admin' => 0, 'attach_to_user' => 0, 'pdf_url' => '');
3242
  if ( WDFMInstance(self::PLUGIN)->is_free != 2 ) {
3243
+ $pdf_data = apply_filters( 'fm_pdf_data_frontend', $pdf_data, array( 'attachment' => $attachment_user, 'custom_fields' => $this->custom_fields, 'form_id' => $id ) );
3244
  }
3245
  if ( $pdf_data['attach_to_user'] ) {
3246
  array_push( $attachment_user, $pdf_data['pdf_url'] );
3247
  }
3248
 
3249
+ if ( $row->sendemail && $row->send_to || (has_action('fm_set_params_frontend_init') && WDFMInstance(self::PLUGIN)->is_free != 2) ) {
3250
  $body = $new_script;
3251
  $send_tos = explode( '**', $row->send_to );
3252
  $send_copy = isset( $_POST[ "wdform_send_copy_" . $id ] ) ? $_POST[ "wdform_send_copy_" . $id ] : NULL;
3261
  $body = str_replace( '{PDF(link)}', site_url($pdf_data['pdf_url']), $body );
3262
 
3263
  foreach ( $send_tos as $index => $send_to ) {
3264
+ $send_to = str_replace('*', '', $send_to);
3265
+ $ver_link = $row->mail_mode_user ? "<a href =" . add_query_arg(array(
3266
+ 'gid' => $_SESSION['gid'],
3267
+ 'h' => $_SESSION['hash'][$index] . '@' . $send_to,
3268
+ ),
3269
+ get_post_permalink($mail_verification_post_id)) . ">" . add_query_arg(array(
3270
+ 'gid' => $_SESSION['gid'],
3271
+ 'h' => $_SESSION['hash'][$index] . '@' . $send_to,
3272
+ ),
3273
+ get_post_permalink($mail_verification_post_id)) . "</a><br/>" : add_query_arg(array(
3274
+ 'gid' => $_SESSION['gid'],
3275
+ 'h' => $_SESSION['hash'][$index] . '@' . $send_to,
3276
+ ), get_post_permalink($mail_verification_post_id));
3277
+
3278
+ if ($row->mail_verify && $verification_link !== NULL
3279
+ && (strpos($new_script, "{verificationlink}") === FALSE || strpos($new_script, "%Verification link%") === FALSE)) {
3280
+ $body .= $ver_link;
3281
+ }
3282
+
3283
+ if ($row->mail_verify && $verification_link !== NULL
3284
+ && (strpos($new_script, "{verificationlink}") > -1 || strpos($new_script, "%Verification link%") > -1)) {
3285
+ $body = str_replace(array('%Verification link%', '{verificationlink}'), $ver_link, $new_script);
3286
+ }
3287
+
3288
+ $recipient = isset($_POST['wdform_' . str_replace('*', '', $send_to) . "_element" . $id]) ? $_POST['wdform_' . $send_to . "_element" . $id] : NULL;
3289
+ if ($recipient) {
3290
+ if ($row->mail_attachment_user) {
3291
+ $remove_parrent_array_user = new RecursiveIteratorIterator(new RecursiveArrayIterator($attachment_user));
3292
+ $attachment_user = iterator_to_array($remove_parrent_array_user, FALSE);
3293
+ } else {
3294
  $attachment_user = array();
3295
  }
3296
+ if ($row->sendemail && $row->send_to) {
3297
  WDW_FM_Library(self::PLUGIN)->mail($recipient, $subject, $body, $header_arr, $attachment_user);
3298
  }
3299
  }
3300
  }
3301
  }
3302
  }
 
3303
  // Admin part.
3304
  if ( $row->sendemail || (has_action('fm_set_params_frontend_init') && WDFMInstance(self::PLUGIN)->is_free != 2) ) {
3305
  $recipient = $row->mail ? $row->mail : '';
3424
  }
3425
  }
3426
 
3427
+ // Extension conditional email.
3428
  if ( has_action('fm_set_params_frontend_init') && WDFMInstance(self::PLUGIN)->is_free != 2 ) {
3429
  $fm_email_params = $row->sendemail ? array(
3430
  'admin_body' => $admin_body,
3469
  }
3470
 
3471
  if ( $row->submit_text_type != 4 || $row->url == '' ) {
3472
+ // This ensures that no message is enqueued by an extension.
3473
  if ( !isset($_SESSION[ 'massage_after_submit' . $id ]) || !$_SESSION[ 'massage_after_submit' . $id ] ) {
3474
  $_SESSION[ 'massage_after_submit' . $id ] = $msg;
3475
  }
3534
  $file_name = explode( '/', $attach );
3535
  $file_name = end( $file_name );
3536
  if ( $file_upload_link == 1 ) {
3537
+ $new_value .= '<a href="' . site_url() . '/' . $attach . '">' . $file_name . '</a><br />';
3538
  } else {
3539
  $invalidFileExts = array(
3540
  'gif',
3932
  */
3933
  public function empty_field( $element = '', $mail_emptyfields = '' ) {
3934
  if ( !$mail_emptyfields ) {
3935
+ if ( isset( $element ) && $element === '' ) {
3936
  return 0;
3937
  }
3938
  }
frontend/models/verify_email.php CHANGED
@@ -41,7 +41,7 @@ class FMModelVerify_email_fmc {
41
  $date = strtotime($submission->date);
42
  if ( $key === $md5 ) {
43
  $now = time();
44
- $hourInterval = floor(($now - $date) / 3600);
45
  if ( $expHour > 0 && $hourInterval > $expHour ) {
46
  $message = __('Your email verification has timed out.', WDFMInstance(self::PLUGIN)->prefix);
47
  }
41
  $date = strtotime($submission->date);
42
  if ( $key === $md5 ) {
43
  $now = time();
44
+ $hourInterval = ($now - $date) / 3600;
45
  if ( $expHour > 0 && $hourInterval > $expHour ) {
46
  $message = __('Your email verification has timed out.', WDFMInstance(self::PLUGIN)->prefix);
47
  }
frontend/views/form_maker.php CHANGED
@@ -47,6 +47,9 @@ class FMViewForm_maker_fmc {
47
  $current_url = htmlentities($_SERVER['REQUEST_URI']);
48
 
49
  $row = $result[0];
 
 
 
50
  $form_theme = $result[4];
51
 
52
  $theme_id = WDW_FM_Library(self::PLUGIN)->get('test_theme', $row->theme);
@@ -175,7 +178,6 @@ class FMViewForm_maker_fmc {
175
  }
176
  }
177
 
178
-
179
  $is_type = array();
180
  $id1s = array();
181
  $types = array();
@@ -196,7 +198,7 @@ class FMViewForm_maker_fmc {
196
  $symbol_begin = array();
197
  $symbol_end = array();
198
 
199
- // Get Add-on Calculator data.
200
  $calculator_data = array();
201
  if (WDFMInstance(self::PLUGIN)->is_free != 2) {
202
  $calculator_data = apply_filters('fm_calculator_get_data_init', $calculator_data, $form_id);
@@ -1070,7 +1072,7 @@ class FMViewForm_maker_fmc {
1070
  break;
1071
  }
1072
  case 'type_radio': {
1073
- $rep = $this->type_radio($params, $row, $form_id, $id1, $type, $param);
1074
  break;
1075
  }
1076
  case 'type_own_select': {
@@ -1648,7 +1650,7 @@ class FMViewForm_maker_fmc {
1648
  break;
1649
  }
1650
  case 'type_stripe': {
1651
- /* get stripe add-on form */
1652
  $stripe_data = array('form_view' => $this, 'form' => $row, 'attributes' => $params, 'input_index' => $id1, 'form_id' => $form_id, 'html' => '');
1653
  if ( WDFMInstance(self::PLUGIN)->is_free != 2 && $row->paypal_mode == 2 ) {
1654
  $stripe_data = apply_filters('fm_addon_stripe_form_init', $stripe_data);
@@ -2232,8 +2234,9 @@ class FMViewForm_maker_fmc {
2232
  return '';
2233
  }
2234
 
 
2235
  /**
2236
- * Type spinner
2237
  *
2238
  * @param array $params
2239
  * @param array $row
@@ -2243,12 +2246,12 @@ class FMViewForm_maker_fmc {
2243
  * @param array $param
2244
  * @return string
2245
  */
2246
- private function type_spinner( $params = array(), $row = array(), $form_id = 0, $id1 = 0, $type = '', $param = array() ) {
2247
  return '';
2248
  }
2249
 
2250
  /**
2251
- * Type star rating
2252
  *
2253
  * @param array $params
2254
  * @param array $row
@@ -2258,12 +2261,12 @@ class FMViewForm_maker_fmc {
2258
  * @param array $param
2259
  * @return string
2260
  */
2261
- private function type_star_rating( $params = array(), $row = array(), $form_id = 0, $id1 = 0, $type = '', $param = array() ) {
2262
  return '';
2263
  }
2264
 
2265
  /**
2266
- * Type scale rating
2267
  *
2268
  * @param array $params
2269
  * @param array $row
@@ -2273,12 +2276,12 @@ class FMViewForm_maker_fmc {
2273
  * @param array $param
2274
  * @return string
2275
  */
2276
- private function type_scale_rating( $params = array(), $row = array(), $form_id = 0, $id1 = 0, $type = '', $param = array() ) {
2277
  return '';
2278
  }
2279
 
2280
  /**
2281
- * Type slider
2282
  *
2283
  * @param array $params
2284
  * @param array $row
@@ -2288,12 +2291,12 @@ class FMViewForm_maker_fmc {
2288
  * @param array $param
2289
  * @return string
2290
  */
2291
- private function type_slider( $params = array(), $row = array(), $form_id = 0, $id1 = 0, $type = '', $param = array() ) {
2292
  return '';
2293
  }
2294
 
2295
  /**
2296
- * Type range
2297
  *
2298
  * @param array $params
2299
  * @param array $row
@@ -2303,12 +2306,12 @@ class FMViewForm_maker_fmc {
2303
  * @param array $param
2304
  * @return string
2305
  */
2306
- private function type_range( $params = array(), $row = array(), $form_id = 0, $id1 = 0, $type = '', $param = array() ) {
2307
  return '';
2308
  }
2309
 
2310
  /**
2311
- * Type grading
2312
  *
2313
  * @param array $params
2314
  * @param array $row
@@ -2318,12 +2321,12 @@ class FMViewForm_maker_fmc {
2318
  * @param array $param
2319
  * @return string
2320
  */
2321
- private function type_grading( $params = array(), $row = array(), $form_id = 0, $id1 = 0, $type = '', $param = array() ) {
2322
  return '';
2323
  }
2324
 
2325
  /**
2326
- * Type matrix
2327
  *
2328
  * @param array $params
2329
  * @param array $row
@@ -2333,12 +2336,12 @@ class FMViewForm_maker_fmc {
2333
  * @param array $param
2334
  * @return string
2335
  */
2336
- private function type_matrix( $params = array(), $row = array(), $form_id = 0, $id1 = 0, $type = '', $param = array() ) {
2337
  return '';
2338
  }
2339
 
2340
  /**
2341
- * Type time
2342
  *
2343
  * @param array $params
2344
  * @param array $row
@@ -2348,12 +2351,12 @@ class FMViewForm_maker_fmc {
2348
  * @param array $param
2349
  * @return string
2350
  */
2351
- private function type_time( $params = array(), $row = array(), $form_id = 0, $id1 = 0, $type = '', $param = array() ) {
2352
  return '';
2353
  }
2354
 
2355
  /**
2356
- * Type country
2357
  *
2358
  * @param array $params
2359
  * @param array $row
@@ -2363,12 +2366,12 @@ class FMViewForm_maker_fmc {
2363
  * @param array $param
2364
  * @return string
2365
  */
2366
- private function type_country( $params = array(), $row = array(), $form_id = 0, $id1 = 0, $type = '', $param = array() ) {
2367
  return '';
2368
  }
2369
 
2370
  /**
2371
- * Return form field HTML.
2372
  *
2373
  * @param string $type
2374
  * @param array $param
47
  $current_url = htmlentities($_SERVER['REQUEST_URI']);
48
 
49
  $row = $result[0];
50
+ if ( !isset($row->header_hide) ) {
51
+ $row->header_hide = 1;
52
+ }
53
  $form_theme = $result[4];
54
 
55
  $theme_id = WDW_FM_Library(self::PLUGIN)->get('test_theme', $row->theme);
178
  }
179
  }
180
 
 
181
  $is_type = array();
182
  $id1s = array();
183
  $types = array();
198
  $symbol_begin = array();
199
  $symbol_end = array();
200
 
201
+ // Get extension Calculator data.
202
  $calculator_data = array();
203
  if (WDFMInstance(self::PLUGIN)->is_free != 2) {
204
  $calculator_data = apply_filters('fm_calculator_get_data_init', $calculator_data, $form_id);
1072
  break;
1073
  }
1074
  case 'type_radio': {
1075
+ $rep = $this->type_radio($params, $row, $form_id, $id1, $type, $param);
1076
  break;
1077
  }
1078
  case 'type_own_select': {
1650
  break;
1651
  }
1652
  case 'type_stripe': {
1653
+ /* get stripe extension form */
1654
  $stripe_data = array('form_view' => $this, 'form' => $row, 'attributes' => $params, 'input_index' => $id1, 'form_id' => $form_id, 'html' => '');
1655
  if ( WDFMInstance(self::PLUGIN)->is_free != 2 && $row->paypal_mode == 2 ) {
1656
  $stripe_data = apply_filters('fm_addon_stripe_form_init', $stripe_data);
2234
  return '';
2235
  }
2236
 
2237
+
2238
  /**
2239
+ * Type time.
2240
  *
2241
  * @param array $params
2242
  * @param array $row
2246
  * @param array $param
2247
  * @return string
2248
  */
2249
+ private function type_time( $params = array(), $row = array(), $form_id = 0, $id1 = 0, $type = '', $param = array() ) {
2250
  return '';
2251
  }
2252
 
2253
  /**
2254
+ * Type country.
2255
  *
2256
  * @param array $params
2257
  * @param array $row
2261
  * @param array $param
2262
  * @return string
2263
  */
2264
+ private function type_country( $params = array(), $row = array(), $form_id = 0, $id1 = 0, $type = '', $param = array() ) {
2265
  return '';
2266
  }
2267
 
2268
  /**
2269
+ * Type spinner.
2270
  *
2271
  * @param array $params
2272
  * @param array $row
2276
  * @param array $param
2277
  * @return string
2278
  */
2279
+ private function type_spinner( $params = array(), $row = array(), $form_id = 0, $id1 = 0, $type = '', $param = array() ) {
2280
  return '';
2281
  }
2282
 
2283
  /**
2284
+ * Type star rating.
2285
  *
2286
  * @param array $params
2287
  * @param array $row
2291
  * @param array $param
2292
  * @return string
2293
  */
2294
+ private function type_star_rating( $params = array(), $row = array(), $form_id = 0, $id1 = 0, $type = '', $param = array() ) {
2295
  return '';
2296
  }
2297
 
2298
  /**
2299
+ * Type scale rating.
2300
  *
2301
  * @param array $params
2302
  * @param array $row
2306
  * @param array $param
2307
  * @return string
2308
  */
2309
+ private function type_scale_rating( $params = array(), $row = array(), $form_id = 0, $id1 = 0, $type = '', $param = array() ) {
2310
  return '';
2311
  }
2312
 
2313
  /**
2314
+ * Type slider.
2315
  *
2316
  * @param array $params
2317
  * @param array $row
2321
  * @param array $param
2322
  * @return string
2323
  */
2324
+ private function type_slider( $params = array(), $row = array(), $form_id = 0, $id1 = 0, $type = '', $param = array() ) {
2325
  return '';
2326
  }
2327
 
2328
  /**
2329
+ * Type range.
2330
  *
2331
  * @param array $params
2332
  * @param array $row
2336
  * @param array $param
2337
  * @return string
2338
  */
2339
+ private function type_range( $params = array(), $row = array(), $form_id = 0, $id1 = 0, $type = '', $param = array() ) {
2340
  return '';
2341
  }
2342
 
2343
  /**
2344
+ * Type grading.
2345
  *
2346
  * @param array $params
2347
  * @param array $row
2351
  * @param array $param
2352
  * @return string
2353
  */
2354
+ private function type_grading( $params = array(), $row = array(), $form_id = 0, $id1 = 0, $type = '', $param = array() ) {
2355
  return '';
2356
  }
2357
 
2358
  /**
2359
+ * Type matrix.
2360
  *
2361
  * @param array $params
2362
  * @param array $row
2366
  * @param array $param
2367
  * @return string
2368
  */
2369
+ private function type_matrix( $params = array(), $row = array(), $form_id = 0, $id1 = 0, $type = '', $param = array() ) {
2370
  return '';
2371
  }
2372
 
2373
  /**
2374
+ * WD form field.
2375
  *
2376
  * @param string $type
2377
  * @param array $param
js/add_field.js CHANGED
@@ -14349,7 +14349,7 @@ function type_matrix(i, w_field_label, w_field_label_size, w_field_label_pos, w_
14349
  refresh_matrix(i);
14350
  }
14351
 
14352
- function create_pagination_type(i, w_type) {
14353
  var label = jQuery('<label class="fm-field-label">Pagination Options</label>');
14354
  var input1 = jQuery('<input type="radio" id="el_pagination_steps" name="el_pagination" onclick="pagination_type(\'steps\')"' + (w_type == 'steps' ? ' checked="checked"' : '') + ' />');
14355
  var label1 = jQuery('<label for="el_pagination_steps">Steps</label>');
@@ -14463,7 +14463,7 @@ function make_page_steps(w_pages) {
14463
  }
14464
  }
14465
 
14466
- function create_pagination_title(i, w_show_title) {
14467
  var label = jQuery('<label class="fm-field-label" for="el_show_title_input">Show Page Titles in Progress Bar</label>');
14468
  var input = jQuery('<input type="checkbox" id="el_show_title_input" onClick="show_title_pagebreak()"' + (w_show_title ? ' checked="checked"' : '') + ' />');
14469
  return create_option_container(label, input);
@@ -14479,7 +14479,7 @@ function show_title_pagebreak() {
14479
  }
14480
  }
14481
 
14482
- function create_pagination_numbers(i, w_show_numbers) {
14483
  var label = jQuery('<label class="fm-field-label" for="el_show_numbers_input">Show Page Numbers in Footer</label>');
14484
  var input = jQuery('<input type="checkbox" id="el_show_numbers_input" onClick="show_numbers_pagebreak()"' + (w_show_numbers ? ' checked="checked"' : '') + ' />');
14485
  return create_option_container(label, input);
@@ -14504,7 +14504,7 @@ function show_numbers_pagebreak() {
14504
  }
14505
  }
14506
 
14507
- function create_page_titles(i) {
14508
  var label = jQuery('<label class="fm-field-label">Pages Titles</label>');
14509
  var pages = jQuery('<div id="items" class="fm-width-100"></div>');
14510
  k = 0;
@@ -14562,10 +14562,10 @@ function type_page_navigation(w_type, w_show_title, w_show_numbers, w_attr_name,
14562
  var edit_main_table = jQuery('<div id="edit_main_table"></div>');
14563
  edit_div.append(edit_main_table);
14564
  edit_main_table.append(create_field_type('type_page_navigation'));
14565
- edit_main_table.append(create_pagination_type(i, w_type));
14566
- edit_main_table.append(create_pagination_title(i, w_show_title));
14567
- edit_main_table.append(create_pagination_numbers(i, w_show_numbers));
14568
- edit_main_table.append(create_page_titles(i));
14569
 
14570
  // Preview.
14571
  w_pages = [];
14349
  refresh_matrix(i);
14350
  }
14351
 
14352
+ function create_pagination_type(w_type) {
14353
  var label = jQuery('<label class="fm-field-label">Pagination Options</label>');
14354
  var input1 = jQuery('<input type="radio" id="el_pagination_steps" name="el_pagination" onclick="pagination_type(\'steps\')"' + (w_type == 'steps' ? ' checked="checked"' : '') + ' />');
14355
  var label1 = jQuery('<label for="el_pagination_steps">Steps</label>');
14463
  }
14464
  }
14465
 
14466
+ function create_pagination_title(w_show_title) {
14467
  var label = jQuery('<label class="fm-field-label" for="el_show_title_input">Show Page Titles in Progress Bar</label>');
14468
  var input = jQuery('<input type="checkbox" id="el_show_title_input" onClick="show_title_pagebreak()"' + (w_show_title ? ' checked="checked"' : '') + ' />');
14469
  return create_option_container(label, input);
14479
  }
14480
  }
14481
 
14482
+ function create_pagination_numbers(w_show_numbers) {
14483
  var label = jQuery('<label class="fm-field-label" for="el_show_numbers_input">Show Page Numbers in Footer</label>');
14484
  var input = jQuery('<input type="checkbox" id="el_show_numbers_input" onClick="show_numbers_pagebreak()"' + (w_show_numbers ? ' checked="checked"' : '') + ' />');
14485
  return create_option_container(label, input);
14504
  }
14505
  }
14506
 
14507
+ function create_page_titles() {
14508
  var label = jQuery('<label class="fm-field-label">Pages Titles</label>');
14509
  var pages = jQuery('<div id="items" class="fm-width-100"></div>');
14510
  k = 0;
14562
  var edit_main_table = jQuery('<div id="edit_main_table"></div>');
14563
  edit_div.append(edit_main_table);
14564
  edit_main_table.append(create_field_type('type_page_navigation'));
14565
+ edit_main_table.append(create_pagination_type(w_type));
14566
+ edit_main_table.append(create_pagination_title(w_show_title));
14567
+ edit_main_table.append(create_pagination_numbers(w_show_numbers));
14568
+ edit_main_table.append(create_page_titles());
14569
 
14570
  // Preview.
14571
  w_pages = [];
js/form_maker_form_advanced_layout.js CHANGED
@@ -26,15 +26,16 @@ jQuery(document).on('fm_tab_layout_loaded', function () {
26
  autoFormat();
27
  });
28
 
29
- function fm_apply_advanced_layout(task) {
30
- if (jQuery('#autogen_layout').is(':checked')) {
31
- jQuery('#custom_front').val(custom_front.replace(/\s+/g, ' ').replace(/> </g, '><'));
32
- }
33
- else {
34
- jQuery('#custom_front').val(editor.getValue().replace(/\s+/g, ' ').replace(/> </g, '><'));
 
 
35
  }
36
- fm_set_input_value('task', task);
37
- document.getElementById('fm_ApplyLayoutForm').submit();
38
  }
39
 
40
  function insertAtCursor_form(myId, myLabel) {
26
  autoFormat();
27
  });
28
 
29
+ function fm_apply_advanced_layout() {
30
+ var tabs_loaded = JSON.parse(jQuery('#fm_tabs_loaded').val());
31
+ if ( inArray('form_layout_tab', tabs_loaded) ) {
32
+ if (jQuery('#autogen_layout').is(':checked')) {
33
+ jQuery('#custom_front').val(custom_front.replace(/\s+/g, ' ').replace(/> </g, '><'));
34
+ } else {
35
+ jQuery('#custom_front').val(editor.getValue().replace(/\s+/g, ' ').replace(/> </g, '><'));
36
+ }
37
  }
38
+ return true;
 
39
  }
40
 
41
  function insertAtCursor_form(myId, myLabel) {
js/form_maker_manage.js CHANGED
@@ -20,7 +20,7 @@ function fm_row_handle(section) {
20
  var row_handle = jQuery('<div class="wdform_row_handle">' +
21
  '<span class="fm-ico-draggable"></span>' +
22
  '<span title="Remove the column" class="page_toolbar fm-ico-delete" onclick="fm_remove_row_popup(this);"></span>' +
23
- '<span class="add-new-field" onclick="jQuery(\'.wdform_section\').removeAttr(\'cur_column\');jQuery(this).parent().parent().attr(\'id\', \'cur_column\').val(1);popup_ready(); Enable(); return false;">' + form_maker_manage.add_new_field + '</span>' +
24
  '<div class="fm-divider"></div>' +
25
  '</div>');
26
  fm_section.prepend(row_handle);
@@ -70,6 +70,7 @@ function sortable_columns() {
70
  start: function(e, ui) {
71
  jQuery(".add-new-button").off("click");
72
  jQuery(".wdform_column").removeClass("fm-hidden");
 
73
  },
74
  stop: function(event, ui) {
75
  // Prevent dropping on "New Field" conatiner.
@@ -540,6 +541,7 @@ function add_condition_fields(num, ids1, labels1, types1, params1) {
540
 
541
  switch(types[index_of_field]) {
542
  case "type_text":
 
543
  case "type_password":
544
  case "type_textarea":
545
  case "type_name":
20
  var row_handle = jQuery('<div class="wdform_row_handle">' +
21
  '<span class="fm-ico-draggable"></span>' +
22
  '<span title="Remove the column" class="page_toolbar fm-ico-delete" onclick="fm_remove_row_popup(this);"></span>' +
23
+ '<span class="add-new-field" onclick="jQuery(\'#cur_column\').removeAttr(\'id\');jQuery(this).parent().parent().attr(\'id\', \'cur_column\').val(1);popup_ready(); Enable(); return false;">' + form_maker_manage.add_new_field + '</span>' +
24
  '<div class="fm-divider"></div>' +
25
  '</div>');
26
  fm_section.prepend(row_handle);
70
  start: function(e, ui) {
71
  jQuery(".add-new-button").off("click");
72
  jQuery(".wdform_column").removeClass("fm-hidden");
73
+ jQuery("#cur_column").removeAttr("id");
74
  },
75
  stop: function(event, ui) {
76
  // Prevent dropping on "New Field" conatiner.
541
 
542
  switch(types[index_of_field]) {
543
  case "type_text":
544
+ case "type_star_rating":
545
  case "type_password":
546
  case "type_textarea":
547
  case "type_name":
js/form_maker_manage_edit.js CHANGED
@@ -170,7 +170,7 @@ function FormManageSubmitButton(check_for_changes) {
170
  continue;
171
  }
172
  wdid = wdform_row.getAttribute("wdid");
173
- if (!wdid) {
174
  continue;
175
  }
176
  l_id = wdid;
@@ -808,14 +808,14 @@ function formOnload(rows) {
808
 
809
  jQuery( '.wdform-page-and-images' ).each(function() {
810
  var index = jQuery(this).find('.wdform_page').attr('id').split("form_id_tempform_view");
811
- i = index[1];
812
  form_view_max = i > form_view_max ? i : form_view_max;
813
  page_toolbar_wrap = document.createElement('div');
814
  page_toolbar_wrap.setAttribute('id', 'form_id_tempform_view_img' + i);
815
  page_toolbar_wrap.setAttribute('class', 'form_id_tempform_view_img');
816
 
817
  page_title = document.createElement('div');
818
- page_title.setAttribute('class', 'wdform_page_title');
819
  page_title.innerHTML = '<span class="fm-ico-draggable"></span>' + document.getElementById('form_id_tempform_view' + i).getAttribute('page_title');
820
  page_toolbar_wrap.appendChild(page_title);
821
 
170
  continue;
171
  }
172
  wdid = wdform_row.getAttribute("wdid");
173
+ if (!wdid || !jQuery('#' + wdid + '_element_labelform_id_temp').length) {
174
  continue;
175
  }
176
  l_id = wdid;
808
 
809
  jQuery( '.wdform-page-and-images' ).each(function() {
810
  var index = jQuery(this).find('.wdform_page').attr('id').split("form_id_tempform_view");
811
+ var i = parseInt(index[1]);
812
  form_view_max = i > form_view_max ? i : form_view_max;
813
  page_toolbar_wrap = document.createElement('div');
814
  page_toolbar_wrap.setAttribute('id', 'form_id_tempform_view_img' + i);
815
  page_toolbar_wrap.setAttribute('class', 'form_id_tempform_view_img');
816
 
817
  page_title = document.createElement('div');
818
+ page_title.setAttribute('class', 'wdform_page_title');
819
  page_title.innerHTML = '<span class="fm-ico-draggable"></span>' + document.getElementById('form_id_tempform_view' + i).getAttribute('page_title');
820
  page_toolbar_wrap.appendChild(page_title);
821
 
js/main_div_front_end.js CHANGED
@@ -183,6 +183,8 @@ function select_star_rating(id,el_id,form_id, color,star_amount) {
183
  document.getElementById(el_id+'_star_'+k+'_'+form_id).src=fm_objectL10n.plugin_url+"/images/star.png";
184
  }
185
  document.getElementById(el_id+'_selected_star_amount'+form_id).value=id+1;
 
 
186
  }
187
 
188
  function show_other_input(num, form_id) {
@@ -1098,11 +1100,13 @@ function scroll_on_element(form_id) {
1098
  fm_go_to_page(page_with_error, form_id, pagebreak_count, maxid[1]);
1099
  }
1100
  var body_hight = document.body.clientHeight;
 
1101
  var element_offset = jQuery("#form" + form_id + " .fm-not-filled").offset().top;
1102
 
1103
  var scrollChecker = function() {
1104
  if(document.body.clientHeight !== body_hight ) {
1105
  body_hight = document.body.clientHeight;
 
1106
  element_offset = jQuery("#form" + form_id + " .fm-not-filled").offset().top;
1107
  jQuery('html').stop();
1108
  animateBodyToError();
@@ -1111,9 +1115,9 @@ function scroll_on_element(form_id) {
1111
  jQuery(window).on("scroll",scrollChecker);
1112
  function animateBodyToError() {
1113
  jQuery('html').animate({
1114
- scrollTop: element_offset - 150
1115
  }, 500, function() {
1116
- document.scrollingElement.scrollTop = element_offset - 150; /* For Safari.*/
1117
  jQuery(window).off("scroll", scrollChecker);
1118
  old_bg=jQuery(parent_div).css("background-color");
1119
  jQuery(parent_div).effect( "shake", {}, 500 ).css("background-color","#FF8F8B").animate({backgroundColor: old_bg}, {duration: 500, queue: false });
@@ -1499,19 +1503,20 @@ function wd_is_filled(form_id, field_id, all_pages) {
1499
  case 'type_matrix': {
1500
  if ( jQuery("#form" + form_id + " div[wdid='"+ wdid +"'] input").attr('type') == 'radio'
1501
  || jQuery("#form" + form_id + " div[wdid='"+ wdid +"'] input").attr('type') == 'checkbox' ) {
 
1502
  if(all_pages || x.find(jQuery("div[wdid='"+wdid+"']")).closest(".wdform-page-and-images").css('display') != "none") {
1503
- if(x.find(jQuery("div[wdid='"+ wdid +"'] input:checked")).length == 0){
1504
- not_filled[wdid] = true;
1505
- }
1506
- }
1507
 
1508
- if ( jQuery("#form" + form_id + " div[wdid='"+ wdid +"'] input").attr('type') == 'radio' ) {
1509
- jQuery.each(jQuery("#form" + form_id + " div[class^='wdform-matrix-row']"), function( i, rows ) {
1510
- if ( jQuery(rows).find('input[type="radio"]:checked').length == 0 ) {
1511
- not_filled[wdid] = true;
1512
- }
1513
- });
1514
- }
 
1515
 
1516
  if ( jQuery("#form" + form_id + " div[wdid='"+ wdid +"'] input").attr('type') == 'checkbox' ) {
1517
  if ( !field_id && !window['check_submit'+form_id] ) {
183
  document.getElementById(el_id+'_star_'+k+'_'+form_id).src=fm_objectL10n.plugin_url+"/images/star.png";
184
  }
185
  document.getElementById(el_id+'_selected_star_amount'+form_id).value=id+1;
186
+ /* Trigger change event after rating change to make work condition.*/
187
+ jQuery("#" + el_id+'_selected_star_amount'+form_id).trigger("change");
188
  }
189
 
190
  function show_other_input(num, form_id) {
1100
  fm_go_to_page(page_with_error, form_id, pagebreak_count, maxid[1]);
1101
  }
1102
  var body_hight = document.body.clientHeight;
1103
+ var element_height = jQuery("#form" + form_id + " .fm-not-filled").closest("div[wdid]").height();
1104
  var element_offset = jQuery("#form" + form_id + " .fm-not-filled").offset().top;
1105
 
1106
  var scrollChecker = function() {
1107
  if(document.body.clientHeight !== body_hight ) {
1108
  body_hight = document.body.clientHeight;
1109
+ element_height = jQuery("#form" + form_id + " .fm-not-filled").closest("div[wdid]").height();
1110
  element_offset = jQuery("#form" + form_id + " .fm-not-filled").offset().top;
1111
  jQuery('html').stop();
1112
  animateBodyToError();
1115
  jQuery(window).on("scroll",scrollChecker);
1116
  function animateBodyToError() {
1117
  jQuery('html').animate({
1118
+ scrollTop: element_offset - (element_height + 40)
1119
  }, 500, function() {
1120
+ document.scrollingElement.scrollTop = element_offset - (element_height + 40); /* For Safari.*/
1121
  jQuery(window).off("scroll", scrollChecker);
1122
  old_bg=jQuery(parent_div).css("background-color");
1123
  jQuery(parent_div).effect( "shake", {}, 500 ).css("background-color","#FF8F8B").animate({backgroundColor: old_bg}, {duration: 500, queue: false });
1503
  case 'type_matrix': {
1504
  if ( jQuery("#form" + form_id + " div[wdid='"+ wdid +"'] input").attr('type') == 'radio'
1505
  || jQuery("#form" + form_id + " div[wdid='"+ wdid +"'] input").attr('type') == 'checkbox' ) {
1506
+
1507
  if(all_pages || x.find(jQuery("div[wdid='"+wdid+"']")).closest(".wdform-page-and-images").css('display') != "none") {
1508
+ if(x.find(jQuery("div[wdid='"+ wdid +"'] input:checked")).length == 0){
1509
+ not_filled[wdid] = true;
1510
+ }
 
1511
 
1512
+ if ( jQuery("#form" + form_id + " div[wdid='"+ wdid +"'] input").attr('type') == 'radio' ) {
1513
+ jQuery.each(jQuery("#form" + form_id + " div[class^='wdform-matrix-row']"), function( i, rows ) {
1514
+ if ( jQuery(rows).find('input[type="radio"]:checked').length == 0 ) {
1515
+ not_filled[wdid] = true;
1516
+ }
1517
+ });
1518
+ }
1519
+ }
1520
 
1521
  if ( jQuery("#form" + form_id + " div[wdid='"+ wdid +"'] input").attr('type') == 'checkbox' ) {
1522
  if ( !field_id && !window['check_submit'+form_id] ) {
js/tw-gb/block.js CHANGED
@@ -1,12 +1,18 @@
1
  /**
2
  * 10Web plugins Gutenberg integration
3
- * version 2.0.0
4
  */
5
  ( function ( blocks, element ) {
6
  registerAllPluginBlocks();
7
 
8
  function registerAllPluginBlocks() {
9
- var twPluginsData = window['tw_gb'];
 
 
 
 
 
 
10
  if ( !twPluginsData ) {
11
  return;
12
  }
@@ -82,7 +88,7 @@
82
 
83
  function showPopup( shortcode, shortcode_id ) {
84
  var shortcodeCbName = generateUniqueCbName( pluginId );
85
- // Store shortcode attribute into a global variable to get it from an iframe.
86
  window[shortcodeCbName + '_shortcode'] = shortcode ? shortcode : '';
87
  window[shortcodeCbName] = function ( shortcode, shortcode_id ) {
88
  delete window[shortcodeCbName];
@@ -92,6 +98,15 @@
92
  }
93
  };
94
  props.setAttributes( { popupOpened: true } );
 
 
 
 
 
 
 
 
 
95
  var elem = el( 'form', { className: 'tw-container' }, el( 'div', { className: 'tw-container-wrap' + (pluginData.containerClass ? ' ' + pluginData.containerClass : '') }, el( 'span', {
96
  className: "media-modal-close",
97
  onClick: close
@@ -105,7 +120,7 @@
105
  var shortcodeList = JSON.parse( pluginData.data );
106
  shortcodeList.inputs.forEach( function ( inputItem ) {
107
  if ( inputItem.type === 'select' ) {
108
- children.push( el( 'option', { value: '', dataId: 0 }, tw_obj.empty_item ) );
109
  if ( inputItem.options.length ) {
110
  inputItem.options.forEach( function ( optionItem ) {
111
  var shortcode = '[' + shortcodeList.shortcode_prefix + ' ' + inputItem.shortcode_attibute_name + '="' + optionItem.id + '"]';
@@ -142,7 +157,7 @@
142
  onClick: function () {
143
  props.setAttributes( { popupOpened: true } );
144
  }.bind( this )
145
- }, tw_obj.nothing_selected );
146
  }
147
 
148
  function showShortcode() {
1
  /**
2
  * 10Web plugins Gutenberg integration
3
+ * version 2.0.3
4
  */
5
  ( function ( blocks, element ) {
6
  registerAllPluginBlocks();
7
 
8
  function registerAllPluginBlocks() {
9
+ var twPluginsData = JSON.parse(tw_obj_translate.blocks);
10
+ for ( var pluginId in window['tw_gb'] ) {
11
+ if ( !window['tw_gb'].hasOwnProperty( pluginId ) ) {
12
+ continue;
13
+ }
14
+ twPluginsData[pluginId] = window['tw_gb'][pluginId];
15
+ }
16
  if ( !twPluginsData ) {
17
  return;
18
  }
88
 
89
  function showPopup( shortcode, shortcode_id ) {
90
  var shortcodeCbName = generateUniqueCbName( pluginId );
91
+ /* Store shortcode attribute into a global variable to get it from an iframe. */
92
  window[shortcodeCbName + '_shortcode'] = shortcode ? shortcode : '';
93
  window[shortcodeCbName] = function ( shortcode, shortcode_id ) {
94
  delete window[shortcodeCbName];
98
  }
99
  };
100
  props.setAttributes( { popupOpened: true } );
101
+ if (!shortcode_id && undefined != shortcode) {
102
+ var shortcode_extract = shortcode.split(' ');
103
+ for (i = 0; i < shortcode_extract.length; i++) {
104
+ var attributes = shortcode_extract[i].split('=');
105
+ if ('id'== attributes[0]) {
106
+ shortcode_id = attributes[1].replace(/"/g, "");
107
+ }
108
+ }
109
+ }
110
  var elem = el( 'form', { className: 'tw-container' }, el( 'div', { className: 'tw-container-wrap' + (pluginData.containerClass ? ' ' + pluginData.containerClass : '') }, el( 'span', {
111
  className: "media-modal-close",
112
  onClick: close
120
  var shortcodeList = JSON.parse( pluginData.data );
121
  shortcodeList.inputs.forEach( function ( inputItem ) {
122
  if ( inputItem.type === 'select' ) {
123
+ children.push( el( 'option', { value: '', dataId: 0 }, tw_obj_translate.empty_item ) );
124
  if ( inputItem.options.length ) {
125
  inputItem.options.forEach( function ( optionItem ) {
126
  var shortcode = '[' + shortcodeList.shortcode_prefix + ' ' + inputItem.shortcode_attibute_name + '="' + optionItem.id + '"]';
157
  onClick: function () {
158
  props.setAttributes( { popupOpened: true } );
159
  }.bind( this )
160
+ }, tw_obj_translate.nothing_selected );
161
  }
162
 
163
  function showShortcode() {
languages/form_maker-ca.po CHANGED
@@ -1836,7 +1836,7 @@ msgstr ""
1836
 
1837
  #: form-maker.php:1050
1838
  #, php-format
1839
- msgid "Please update the %s add-ons to start using."
1840
  msgstr ""
1841
 
1842
  #: form-maker.php:1110
1836
 
1837
  #: form-maker.php:1050
1838
  #, php-format
1839
+ msgid "Please update the %s extensions to start using."
1840
  msgstr ""
1841
 
1842
  #: form-maker.php:1110
languages/form_maker-da_DK.po CHANGED
@@ -1065,7 +1065,7 @@ msgid ""
1065
  msgstr ""
1066
 
1067
  #: admin/views/view.php:424 form-maker.php:253
1068
- msgid "Add-ons"
1069
  msgstr ""
1070
 
1071
  #: admin/views/view.php:428 form-maker.php:250
@@ -1836,7 +1836,7 @@ msgstr ""
1836
 
1837
  #: form-maker.php:1050
1838
  #, php-format
1839
- msgid "Please update the %s add-ons to start using."
1840
  msgstr ""
1841
 
1842
  #: form-maker.php:1110
1065
  msgstr ""
1066
 
1067
  #: admin/views/view.php:424 form-maker.php:253
1068
+ msgid "Extensions"
1069
  msgstr ""
1070
 
1071
  #: admin/views/view.php:428 form-maker.php:250
1836
 
1837
  #: form-maker.php:1050
1838
  #, php-format
1839
+ msgid "Please update the %s extensions to start using."
1840
  msgstr ""
1841
 
1842
  #: form-maker.php:1110
languages/form_maker-fa_IR.po CHANGED
@@ -1065,7 +1065,7 @@ msgid ""
1065
  msgstr ""
1066
 
1067
  #: admin/views/view.php:424 form-maker.php:253
1068
- msgid "Add-ons"
1069
  msgstr ""
1070
 
1071
  #: admin/views/view.php:428 form-maker.php:250
@@ -1836,7 +1836,7 @@ msgstr ""
1836
 
1837
  #: form-maker.php:1050
1838
  #, php-format
1839
- msgid "Please update the %s add-ons to start using."
1840
  msgstr ""
1841
 
1842
  #: form-maker.php:1110
1065
  msgstr ""
1066
 
1067
  #: admin/views/view.php:424 form-maker.php:253
1068
+ msgid "Extensions"
1069
  msgstr ""
1070
 
1071
  #: admin/views/view.php:428 form-maker.php:250
1836
 
1837
  #: form-maker.php:1050
1838
  #, php-format
1839
+ msgid "Please update the %s extensions to start using."
1840
  msgstr ""
1841
 
1842
  #: form-maker.php:1110
languages/form_maker-hr.po CHANGED
@@ -2534,7 +2534,7 @@ msgid "Support Forum"
2534
  msgstr ""
2535
 
2536
  #: admin/views/view.php:424 form-maker.php:253
2537
- msgid "Add-ons"
2538
  msgstr ""
2539
 
2540
  #: admin/views/view.php:428 form-maker.php:250
@@ -3338,7 +3338,7 @@ msgstr ""
3338
 
3339
  #: form-maker.php:1050
3340
  #, php-format
3341
- msgid "Please update the %s add-ons to start using."
3342
  msgstr ""
3343
 
3344
  #: form-maker.php:1110
2534
  msgstr ""
2535
 
2536
  #: admin/views/view.php:424 form-maker.php:253
2537
+ msgid "Extensions"
2538
  msgstr ""
2539
 
2540
  #: admin/views/view.php:428 form-maker.php:250
3338
 
3339
  #: form-maker.php:1050
3340
  #, php-format
3341
+ msgid "Please update the %s extensions to start using."
3342
  msgstr ""
3343
 
3344
  #: form-maker.php:1110
languages/form_maker-it_IT.po CHANGED
@@ -31,7 +31,7 @@ msgstr ""
31
 
32
  #: admin/controllers/Addons_fm.php:68
33
  msgid ""
34
- "This add-on is an integration of the Form Maker with MailChimp which allows "
35
  "to add contacts to your subscription lists just from submitted forms."
36
  msgstr ""
37
 
@@ -43,7 +43,7 @@ msgstr "Paginazione"
43
 
44
  #: admin/controllers/Addons_fm.php:76
45
  msgid ""
46
- "User Registration add-on integrates with Form maker forms allowing users to "
47
  "create accounts at your website."
48
  msgstr ""
49
 
@@ -59,7 +59,7 @@ msgstr ""
59
 
60
  #: admin/controllers/Addons_fm.php:92
61
  msgid ""
62
- "Conditional Emails add-on allows to send emails to different recipients "
63
  "depending on the submitted data ."
64
  msgstr ""
65
 
@@ -82,7 +82,7 @@ msgstr "Integrazione con moduli Maker Stripe"
82
 
83
  #: admin/controllers/Addons_fm.php:109
84
  msgid ""
85
- "The Google Drive Integration add-on integrates Form Maker with Google Drive "
86
  "and allows you to send the file uploads to the Google Drive"
87
  msgstr ""
88
 
@@ -92,7 +92,7 @@ msgstr ""
92
 
93
  #: admin/controllers/Addons_fm.php:117
94
  msgid ""
95
- "The Form Maker PDF Integration add-on allows sending submitted forms in PDF "
96
  "format."
97
  msgstr ""
98
 
@@ -115,7 +115,7 @@ msgstr "In corso"
115
 
116
  #: admin/controllers/Addons_fm.php:133
117
  msgid ""
118
- "The add-on allows to save filled in forms as draft and continue editing them "
119
  "subsequently."
120
  msgstr ""
121
 
@@ -125,7 +125,7 @@ msgstr "Strisce"
125
 
126
  #: admin/controllers/Addons_fm.php:141
127
  msgid ""
128
- "Form Maker Stripe Integration Add-on allows to accept direct payments made "
129
  "by Credit Cards. Users will remain on your website during the entire process."
130
  msgstr ""
131
 
@@ -135,7 +135,7 @@ msgstr ""
135
 
136
  #: admin/controllers/Addons_fm.php:149
137
  msgid ""
138
- "The Form Maker Calculator add-on allows creating forms with dynamically "
139
  "calculated fields."
140
  msgstr ""
141
 
@@ -987,7 +987,7 @@ msgid "This field type is available in Premium version"
987
  msgstr "Questo tipo di campo è disabilitato nella versione gratuita."
988
 
989
  #: admin/views/Manage_fm.php:636 admin/views/Manage_fm.php:1448
990
- msgid "STRIPE add-on compatible with Premium version only"
991
  msgstr ""
992
 
993
  #: admin/views/Manage_fm.php:641 admin/views/Manage_fm.php:1456
@@ -997,11 +997,11 @@ msgid "This feature is available only in the Premium version"
997
  msgstr "Questo tipo di campo è disabilitato nella versione gratuita."
998
 
999
  #: admin/views/Manage_fm.php:641 admin/views/Manage_fm.php:1456
1000
- msgid "Requires STRIPE add-on."
1001
  msgstr ""
1002
 
1003
  #: admin/views/Manage_fm.php:644 admin/views/Manage_fm.php:1459
1004
- msgid "This feature requires STRIPE add-on"
1005
  msgstr ""
1006
 
1007
  #: admin/views/Manage_fm.php:644 admin/views/Manage_fm.php:1459
@@ -1873,7 +1873,7 @@ msgstr "Pubblicando gli invii"
1873
 
1874
  #: form-maker.php:1049
1875
  #, php-format
1876
- msgid "Please update the %s add-on to start using."
1877
  msgstr ""
1878
  "Si prega di aggiornare il componente aggiuntivo%s per iniziare a utilizzare."
1879
 
@@ -3676,8 +3676,8 @@ msgstr "Anteprima"
3676
  #~ msgid "Please install "
3677
  #~ msgstr "Perfavore installa "
3678
 
3679
- #~ msgid " add-on to use this feature."
3680
- #~ msgstr "add-on per usare questa funzione."
3681
 
3682
  #~ msgid "This section allows you to %s."
3683
  #~ msgstr "Questa sezione consente di%s."
@@ -3685,8 +3685,8 @@ msgstr "Anteprima"
3685
  #~ msgid "Upgrade to paid version"
3686
  #~ msgstr "Perfavore fai l'upgrade alla versione a pagamento"
3687
 
3688
- #~ msgid "Please install %s add-on to use this feature."
3689
- #~ msgstr "Installa%s add-on per utilizzare questa funzione."
3690
 
3691
  #~ msgid "Address line 1"
3692
  #~ msgstr "Indirizzo riga 1"
@@ -3714,7 +3714,7 @@ msgstr "Anteprima"
3714
 
3715
  #~ msgid ""
3716
  #~ "Please install Form Maker plugin version %s and higher to start using "
3717
- #~ "Stripe add-on."
3718
  #~ msgstr ""
3719
  #~ "installa la versione del plug-in di Form Maker % s e successiva per "
3720
  #~ "iniziare a utilizzare il componente aggiuntivo Stripe."
31
 
32
  #: admin/controllers/Addons_fm.php:68
33
  msgid ""
34
+ "This extension is an integration of the Form Maker with MailChimp which allows "
35
  "to add contacts to your subscription lists just from submitted forms."
36
  msgstr ""
37
 
43
 
44
  #: admin/controllers/Addons_fm.php:76
45
  msgid ""
46
+ "User Registration extension integrates with Form maker forms allowing users to "
47
  "create accounts at your website."
48
  msgstr ""
49
 
59
 
60
  #: admin/controllers/Addons_fm.php:92
61
  msgid ""
62
+ "Conditional Emails extension allows to send emails to different recipients "
63
  "depending on the submitted data ."
64
  msgstr ""
65
 
82
 
83
  #: admin/controllers/Addons_fm.php:109
84
  msgid ""
85
+ "The Google Drive Integration extension integrates Form Maker with Google Drive "
86
  "and allows you to send the file uploads to the Google Drive"
87
  msgstr ""
88
 
92
 
93
  #: admin/controllers/Addons_fm.php:117
94
  msgid ""
95
+ "The Form Maker PDF Integration extension allows sending submitted forms in PDF "
96
  "format."
97
  msgstr ""
98
 
115
 
116
  #: admin/controllers/Addons_fm.php:133
117
  msgid ""
118
+ "The extension allows to save filled in forms as draft and continue editing them "
119
  "subsequently."
120
  msgstr ""
121
 
125
 
126
  #: admin/controllers/Addons_fm.php:141
127
  msgid ""
128
+ "Form Maker Stripe Integration extension allows to accept direct payments made "
129
  "by Credit Cards. Users will remain on your website during the entire process."
130
  msgstr ""
131
 
135
 
136
  #: admin/controllers/Addons_fm.php:149
137
  msgid ""
138
+ "The Form Maker Calculator extension allows creating forms with dynamically "
139
  "calculated fields."
140
  msgstr ""
141
 
987
  msgstr "Questo tipo di campo è disabilitato nella versione gratuita."
988
 
989
  #: admin/views/Manage_fm.php:636 admin/views/Manage_fm.php:1448
990
+ msgid "STRIPE extension compatible with Premium version only"
991
  msgstr ""
992
 
993
  #: admin/views/Manage_fm.php:641 admin/views/Manage_fm.php:1456
997
  msgstr "Questo tipo di campo è disabilitato nella versione gratuita."
998
 
999
  #: admin/views/Manage_fm.php:641 admin/views/Manage_fm.php:1456
1000
+ msgid "Requires STRIPE extension."
1001
  msgstr ""
1002
 
1003
  #: admin/views/Manage_fm.php:644 admin/views/Manage_fm.php:1459
1004
+ msgid "This feature requires STRIPE extension"
1005
  msgstr ""
1006
 
1007
  #: admin/views/Manage_fm.php:644 admin/views/Manage_fm.php:1459
1873
 
1874
  #: form-maker.php:1049
1875
  #, php-format
1876
+ msgid "Please update the %s extension to start using."
1877
  msgstr ""
1878
  "Si prega di aggiornare il componente aggiuntivo%s per iniziare a utilizzare."
1879
 
3676
  #~ msgid "Please install "
3677
  #~ msgstr "Perfavore installa "
3678
 
3679
+ #~ msgid " extension to use this feature."
3680
+ #~ msgstr "extension per usare questa funzione."
3681
 
3682
  #~ msgid "This section allows you to %s."
3683
  #~ msgstr "Questa sezione consente di%s."
3685
  #~ msgid "Upgrade to paid version"
3686
  #~ msgstr "Perfavore fai l'upgrade alla versione a pagamento"
3687
 
3688
+ #~ msgid "Please install %s extension to use this feature."
3689
+ #~ msgstr "Installa%s extension per utilizzare questa funzione."
3690
 
3691
  #~ msgid "Address line 1"
3692
  #~ msgstr "Indirizzo riga 1"
3714
 
3715
  #~ msgid ""
3716
  #~ "Please install Form Maker plugin version %s and higher to start using "
3717
+ #~ "Stripe extension."
3718
  #~ msgstr ""
3719
  #~ "installa la versione del plug-in di Form Maker % s e successiva per "
3720
  #~ "iniziare a utilizzare il componente aggiuntivo Stripe."
languages/form_maker-ko_KR.po CHANGED
@@ -1065,7 +1065,7 @@ msgid ""
1065
  msgstr ""
1066
 
1067
  #: admin/views/view.php:424 form-maker.php:253
1068
- msgid "Add-ons"
1069
  msgstr ""
1070
 
1071
  #: admin/views/view.php:428 form-maker.php:250
@@ -1836,7 +1836,7 @@ msgstr ""
1836
 
1837
  #: form-maker.php:1050
1838
  #, php-format
1839
- msgid "Please update the %s add-ons to start using."
1840
  msgstr ""
1841
 
1842
  #: form-maker.php:1110
1065
  msgstr ""
1066
 
1067
  #: admin/views/view.php:424 form-maker.php:253
1068
+ msgid "Extensions"
1069
  msgstr ""
1070
 
1071
  #: admin/views/view.php:428 form-maker.php:250
1836
 
1837
  #: form-maker.php:1050
1838
  #, php-format
1839
+ msgid "Please update the %s extensions to start using."
1840
  msgstr ""
1841
 
1842
  #: form-maker.php:1110
languages/form_maker-mk_MK.po CHANGED
@@ -1065,7 +1065,7 @@ msgid ""
1065
  msgstr ""
1066
 
1067
  #: admin/views/view.php:424 form-maker.php:253
1068
- msgid "Add-ons"
1069
  msgstr ""
1070
 
1071
  #: admin/views/view.php:428 form-maker.php:250
1065
  msgstr ""
1066
 
1067
  #: admin/views/view.php:424 form-maker.php:253
1068
+ msgid "Extensions"
1069
  msgstr ""
1070
 
1071
  #: admin/views/view.php:428 form-maker.php:250
languages/form_maker-nb_NO.po CHANGED
@@ -31,7 +31,7 @@ msgstr ""
31
 
32
  #: admin/controllers/Addons_fm.php:68
33
  msgid ""
34
- "This add-on is an integration of the Form Maker with MailChimp which allows "
35
  "to add contacts to your subscription lists just from submitted forms."
36
  msgstr ""
37
 
@@ -41,7 +41,7 @@ msgstr ""
41
 
42
  #: admin/controllers/Addons_fm.php:76
43
  msgid ""
44
- "User Registration add-on integrates with Form maker forms allowing users to "
45
  "create accounts at your website."
46
  msgstr ""
47
 
31
 
32
  #: admin/controllers/Addons_fm.php:68
33
  msgid ""
34
+ "This extension is an integration of the Form Maker with MailChimp which allows "
35
  "to add contacts to your subscription lists just from submitted forms."
36
  msgstr ""
37
 
41
 
42
  #: admin/controllers/Addons_fm.php:76
43
  msgid ""
44
+ "User Registration extension integrates with Form maker forms allowing users to "
45
  "create accounts at your website."
46
  msgstr ""
47
 
readme.txt CHANGED
@@ -2,8 +2,8 @@
2
  Contributors: webdorado,10web
3
  Tags: contact, contact form, email, forms, contact forms, custom form, feedback, form builder, form manager, form maker, forms builder, form builder wordpress
4
  Requires at least: 4.6
5
- Tested up to: 5.1
6
- Stable tag: 1.13.1
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -79,6 +79,19 @@ After downloading the ZIP file,
79
 
80
  == Changelog ==
81
 
 
 
 
 
 
 
 
 
 
 
 
 
 
82
  = 1.13.1 =
83
  * Fixed: Bug on checking if Address field is required.
84
 
2
  Contributors: webdorado,10web
3
  Tags: contact, contact form, email, forms, contact forms, custom form, feedback, form builder, form manager, form maker, forms builder, form builder wordpress
4
  Requires at least: 4.6
5
+ Tested up to: 5.1
6
+ Stable tag: 1.13.3
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
79
 
80
  == Changelog ==
81
 
82
+ = 1.13.3 =
83
+ * Fixed: Security issue.
84
+ * Fixed: Scroll to required address field.
85
+ * Fixed: Adding field to incorrect position.
86
+ * Fixed: Don't use the same title for the duplicated form.
87
+ * Fixed: Allow "0" value for required fields.
88
+ * Fixed: Link for attachment in email.
89
+ * Fixed: Saving advanced layout.
90
+ * Fixed: 0 value is not saved in submissions for Payment single choice and Shipping fields.
91
+ * Fixed: MySQL mapping edit functionality.
92
+ * Fixed: Do not print js before DOCTYPE.
93
+ * Fixed: Broken multiple pages.
94
+
95
  = 1.13.1 =
96
  * Fixed: Bug on checking if Address field is required.
97
 
wd/README.md CHANGED
@@ -1,130 +1,130 @@
1
- Version: 1.0.15
2
-
3
-
4
-
5
- Usage:
6
-
7
- Copy and paste wd library into your plugin folder.
8
- In your plugin main file check if library main DoradoWeb class doesn't exist, include it
9
- if( !class_exists("DoradoWeb") ){
10
- require_once(PATH_TO_YOUR_PLUGIN_DIR . '/wd/start.php');
11
- }
12
-
13
- Then call dorado_web_init($options) function.
14
- $options = array (
15
- "prefix" => "your_plugin_prefix",
16
- "wd_plugin_id" => your_plugin_id,
17
- "plugin_title" => "your plugin titile",
18
- "plugin_wordpress_slug" => "your plugin wordpress slug",
19
- "plugin_dir" => 'path to your plugin dir',
20
- "plugin_main_file" => 'path to your plugin main file',
21
- "description" => 'your plugin description',
22
-
23
- "plugin_features" => array(
24
- 0 => array(
25
- "title" => "feature title 1",
26
- "description" => "feature 1 description",
27
- ),
28
- 1 => array(
29
- "title" => "feature title 2",
30
- "description" => "feature 2 description",
31
- ),
32
- ...
33
- ),
34
- "user_guide" => array(
35
- 0 => array(
36
- "main_title" => "user guide step 1",
37
- "url" => "link to step 1",
38
- "titles" => array(
39
- array(
40
- "title" => "step 1 sub title",
41
- "url" => "link to step 1 sub"
42
- )
43
- )
44
- ),
45
- ...
46
- ),
47
- "overview_welcome_image" => null,
48
- "video_youtube_id" => "your plugin youtube video id", // e.g. https://www.youtube.com/watch?v=acaexefeP7o youtube id is the acaexefeP7o
49
- "plugin_wd_url" => "https://web-dorado.com/products/your plugin",
50
- "plugin_wd_demo_link" => "http://wpdemo.web-dorado.com/your plugin",
51
- "plugin_wd_addons_link" => "https://web-dorado.com/products/your plugin addons",
52
- "after_subscribe" => "after subsribe page", // this can be plagin overview page or set up page admin.php?page=overview_YOUR_PREFIX
53
- "plugin_wizard_link" => "your plugin wizard page",
54
- "plugin_menu_title" => "Your plugin menu title",
55
- "plugin_menu_icon" => "path to menu icon",
56
- "deactivate" => true,
57
- "subscribe" => true,
58
- "custom_post" => false, // if true => edit.php?post_type=contact
59
- "menu_capability" => "manage_options",
60
- "menu_position" => null,
61
- );
62
-
63
- Fully documentation of dorado_web_init options:
64
-
65
- prefix - (type string) your plugin prefix
66
- wd_plugin_id - (type int) plugin id ( in web-dorado database, you use it for update functionality)
67
- plugin_wd_zip_name - (type string) plugin zip name (in web-dorado database, ask Armen or Sergey )
68
- plugin_title - type string) plugin title (
69
- plugin_wordpress_slug - (type string) plugin slug
70
- plugin_dir - (type string) full file path to your plugin directory
71
- plugin_main_file - (type string) path to your plugin main file (__FILE__)
72
- description - (type string) plugin short description
73
-
74
- plugin_features - (type array) plugin top 5 features from web-dorado.com
75
- e.g. (for google maps plugin)
76
- array(
77
- 0 => array(
78
- "title" => __("Easy set up", "gmwd"),
79
- "description" => __("After installation a set-up guide will help you configure general options and get started on the dashboard. The plugin also displays tooltips in the whole admin area and settings. Moreover, you get instant live previews of changes you make in the working area, so you don’t have to save and publish maps to see the results.", "gmwd"),
80
- ),
81
- 1 => array(
82
- "title" => __("Unlimited Everything", "gmwd"),
83
- "description" => __("Display unlimited maps on any page or post. Same is true for markers, rectangles, circles, polygons and polylines.", "gmwd"),
84
- ),
85
- ....
86
- )
87
-
88
- user_guide - (type array) plugin user guide links from web-dorado.com
89
- e.g. (for google maps plugin)
90
- array(
91
- 0 => array(
92
- "main_title" => __("Installation Wizard/ Options Menu", "gmwd"),
93
- "url" => "https://web-dorado.com/wordpress-google-maps/installation-wizard-options-menu.html",
94
- "titles" => array(
95
- array(
96
- "title" => __("Configuring Map API Key", "gmwd"),
97
- "url" => "https://web-dorado.com/wordpress-google-maps/installation-wizard-options-menu/configuring-api-key.html"
98
- )
99
- )
100
- ),
101
- 1 => array(
102
- "main_title" => __("Creating Map", "gmwd"),
103
- "url" => "https://web-dorado.com/wordpress-google-maps/creating-map.html",
104
- "titles" => array()
105
- ),
106
- )
107
-
108
- video_youtube_id - (type string) if your plugin has video, video's id, else null
109
- ( e.g. for https://www.youtube.com/watch?v=acaexefeP7o , youtube id is the 'acaexefeP7o' )
110
-
111
- plugin_wd_url - (type string) plugin page url
112
- (e.g. https://web-dorado.com/products/wordpress-google-maps-plugin.html)
113
-
114
- plugin_wd_demo_link - (type string) plugin demo url
115
- plugin_wd_addons_link - (type string) if plugin has addons , plugin addons link, else null
116
- plugin_wizard_link - (type string) if plugin has wizard, wizard page , else null
117
- ( e.g. admin_url( 'index.php?page=gmwd_setup' ) )
118
-
119
- plugin_menu_title - (type string) plugin wordpress backend menu title
120
- plugin_menu_icon - (type string) path to plugin wordpress backend menu icon
121
- ( e.g. GMWD_URL . '/images/icon-map-20.png' )
122
- deactivate - (type bool) if plugin free deactivate = true, else deactivate = false
123
- subscribe - (type bool) if plugin free subscribe = true, else subscribe = false
124
- custom_post - ( type string) if plugin has not custom posts it must be top level menu slug, else toplevel menu url , e.g. edit.php?post_type=contact
125
- menu_capability - (type string) top level menu capability e.g. manage_options
126
- menu_position - (type string) top level menu position , default is null
127
-
128
-
129
-
130
-
1
+ Version: 1.0.15
2
+
3
+
4
+
5
+ Usage:
6
+
7
+ Copy and paste wd library into your plugin folder.
8
+ In your plugin main file check if library main DoradoWeb class doesn't exist, include it
9
+ if( !class_exists("DoradoWeb") ){
10
+ require_once(PATH_TO_YOUR_PLUGIN_DIR . '/wd/start.php');
11
+ }
12
+
13
+ Then call dorado_web_init($options) function.
14
+ $options = array (
15
+ "prefix" => "your_plugin_prefix",
16
+ "wd_plugin_id" => your_plugin_id,
17
+ "plugin_title" => "your plugin titile",
18
+ "plugin_wordpress_slug" => "your plugin wordpress slug",
19
+ "plugin_dir" => 'path to your plugin dir',
20
+ "plugin_main_file" => 'path to your plugin main file',
21
+ "description" => 'your plugin description',
22
+
23
+ "plugin_features" => array(
24
+ 0 => array(
25
+ "title" => "feature title 1",
26
+ "description" => "feature 1 description",
27
+ ),
28
+ 1 => array(
29
+ "title" => "feature title 2",
30
+ "description" => "feature 2 description",
31
+ ),
32
+ ...
33
+ ),
34
+ "user_guide" => array(
35
+ 0 => array(
36
+ "main_title" => "user guide step 1",
37
+ "url" => "link to step 1",
38
+ "titles" => array(
39
+ array(
40
+ "title" => "step 1 sub title",
41
+ "url" => "link to step 1 sub"
42
+ )
43
+ )
44
+ ),
45
+ ...
46
+ ),
47
+ "overview_welcome_image" => null,
48
+ "video_youtube_id" => "your plugin youtube video id", // e.g. https://www.youtube.com/watch?v=acaexefeP7o youtube id is the acaexefeP7o
49
+ "plugin_wd_url" => "https://web-dorado.com/products/your plugin",
50
+ "plugin_wd_demo_link" => "http://wpdemo.web-dorado.com/your plugin",
51
+ "plugin_wd_addons_link" => "https://web-dorado.com/products/your plugin addons",
52
+ "after_subscribe" => "after subsribe page", // this can be plagin overview page or set up page admin.php?page=overview_YOUR_PREFIX
53
+ "plugin_wizard_link" => "your plugin wizard page",
54
+ "plugin_menu_title" => "Your plugin menu title",
55
+ "plugin_menu_icon" => "path to menu icon",
56
+ "deactivate" => true,
57
+ "subscribe" => true,
58
+ "custom_post" => false, // if true => edit.php?post_type=contact
59
+ "menu_capability" => "manage_options",
60
+ "menu_position" => null,
61
+ );
62
+
63
+ Fully documentation of dorado_web_init options:
64
+
65
+ prefix - (type string) your plugin prefix
66
+ wd_plugin_id - (type int) plugin id ( in web-dorado database, you use it for update functionality)
67
+ plugin_wd_zip_name - (type string) plugin zip name (in web-dorado database, ask Armen or Sergey )
68
+ plugin_title - type string) plugin title (
69
+ plugin_wordpress_slug - (type string) plugin slug
70
+ plugin_dir - (type string) full file path to your plugin directory
71
+ plugin_main_file - (type string) path to your plugin main file (__FILE__)
72
+ description - (type string) plugin short description
73
+
74
+ plugin_features - (type array) plugin top 5 features from web-dorado.com
75
+ e.g. (for google maps plugin)
76
+ array(
77
+ 0 => array(
78
+ "title" => __("Easy set up", "gmwd"),
79
+ "description" => __("After installation a set-up guide will help you configure general options and get started on the dashboard. The plugin also displays tooltips in the whole admin area and settings. Moreover, you get instant live previews of changes you make in the working area, so you don’t have to save and publish maps to see the results.", "gmwd"),
80
+ ),
81
+ 1 => array(
82
+ "title" => __("Unlimited Everything", "gmwd"),
83
+ "description" => __("Display unlimited maps on any page or post. Same is true for markers, rectangles, circles, polygons and polylines.", "gmwd"),
84
+ ),
85
+ ....
86
+ )
87
+
88
+ user_guide - (type array) plugin user guide links from web-dorado.com
89
+ e.g. (for google maps plugin)
90
+ array(
91
+ 0 => array(
92
+ "main_title" => __("Installation Wizard/ Options Menu", "gmwd"),
93
+ "url" => "https://web-dorado.com/wordpress-google-maps/installation-wizard-options-menu.html",
94
+ "titles" => array(
95
+ array(
96
+ "title" => __("Configuring Map API Key", "gmwd"),
97
+ "url" => "https://web-dorado.com/wordpress-google-maps/installation-wizard-options-menu/configuring-api-key.html"
98
+ )
99
+ )
100
+ ),
101
+ 1 => array(
102
+ "main_title" => __("Creating Map", "gmwd"),
103
+ "url" => "https://web-dorado.com/wordpress-google-maps/creating-map.html",
104
+ "titles" => array()
105
+ ),
106
+ )
107
+
108
+ video_youtube_id - (type string) if your plugin has video, video's id, else null
109
+ ( e.g. for https://www.youtube.com/watch?v=acaexefeP7o , youtube id is the 'acaexefeP7o' )
110
+
111
+ plugin_wd_url - (type string) plugin page url
112
+ (e.g. https://web-dorado.com/products/wordpress-google-maps-plugin.html)
113
+
114
+ plugin_wd_demo_link - (type string) plugin demo url
115
+ plugin_wd_addons_link - (type string) if plugin has addons , plugin addons link, else null
116
+ plugin_wizard_link - (type string) if plugin has wizard, wizard page , else null
117
+ ( e.g. admin_url( 'index.php?page=gmwd_setup' ) )
118
+
119
+ plugin_menu_title - (type string) plugin wordpress backend menu title
120
+ plugin_menu_icon - (type string) path to plugin wordpress backend menu icon
121
+ ( e.g. GMWD_URL . '/images/icon-map-20.png' )
122
+ deactivate - (type bool) if plugin free deactivate = true, else deactivate = false
123
+ subscribe - (type bool) if plugin free subscribe = true, else subscribe = false
124
+ custom_post - ( type string) if plugin has not custom posts it must be top level menu slug, else toplevel menu url , e.g. edit.php?post_type=contact
125
+ menu_capability - (type string) top level menu capability e.g. manage_options
126
+ menu_position - (type string) top level menu position , default is null
127
+
128
+
129
+
130
+
wd/assets/css/deactivate_popup.css CHANGED
@@ -1,111 +1,111 @@
1
- .wd-bwg-reasons:nth-child(3) {
2
- display: none;
3
- }
4
-
5
- .wd-opacity{
6
- position: fixed;
7
- top: 0px;
8
- bottom: 0px;
9
- left: 0px;
10
- right: 0px;
11
- z-index: 9999;
12
- background: #000;
13
- opacity: 0.5;
14
- display: none;
15
- }
16
-
17
- .wd-deactivate-popup{
18
- position: fixed;
19
- top: 0px;
20
- bottom: 0px;
21
- left: 0px;
22
- right: 0px;
23
- background: #fff;
24
- z-index: 999999;
25
- width: 600px;
26
- height: 281px;
27
- margin: auto;
28
- display: none;
29
- box-sizing: border-box;
30
- }
31
-
32
-
33
- .wd-deactivate-popup-header{
34
- border-bottom: 1px solid #ccc;
35
- padding: 18px 40px;
36
- font-size: 16px;
37
- background: rgba(221, 221, 221, 0.14);
38
- }
39
- .wd-deactivate-popup-body{
40
- padding: 20px 40px;
41
- border-bottom: 1px solid #ccc;
42
- }
43
- .wd-deactivate-popup-body input[type=text]{
44
- width: 220px;
45
- }
46
- .wd-deactivate-popup-body textarea{
47
- width: 100%;
48
- }
49
-
50
- .wd-btns{
51
- position: absolute;
52
- bottom: 19px;
53
- right: 19px
54
- }
55
-
56
- .additional_details_wrap{
57
- margin-top: 20px;
58
- }
59
-
60
- .wd-additional-active{
61
- background: rgba(204, 204, 204, 0.18);
62
- padding: 15px;
63
- margin: 14px 0px 5px;
64
- }
65
- .wd-popup-active1{
66
- height: 583px !important;
67
- }
68
-
69
- .wd-popup-active2{
70
- height: 426px !important
71
- }
72
-
73
- .wd-popup-active3{
74
- height: 479px !important
75
- }
76
-
77
- .wd-popup-active4{
78
- height: 340px !important
79
- }
80
- .wd-deactivate-popup-opacity{
81
- width: 100%;
82
- height: 100%;
83
- background: #D9D9D9;
84
- opacity: 0.3;
85
- z-index: 45;
86
- position: absolute;
87
- display: none;
88
- }
89
-
90
- .wd-deactivate-popup-opacity .wd-img-loader{
91
- position: absolute;
92
- top: 0;
93
- left: 0;
94
- right: 0;
95
- bottom: 0;
96
- margin: auto;
97
- z-index: 63;
98
- }
99
-
100
- .wd-deactivate-popup-close-btn{
101
- background-image: url(img/close.svg);
102
- background-repeat: no-repeat;
103
- background-size: 16px;
104
- display: inline-block;
105
- width: 16px;
106
- height: 16px;
107
- position: absolute;
108
- top: 7px;
109
- right: 8px;
110
- cursor: pointer;
111
  }
1
+ .wd-bwg-reasons:nth-child(3) {
2
+ display: none;
3
+ }
4
+
5
+ .wd-opacity{
6
+ position: fixed;
7
+ top: 0px;
8
+ bottom: 0px;
9
+ left: 0px;
10
+ right: 0px;
11
+ z-index: 9999;
12
+ background: #000;
13
+ opacity: 0.5;
14
+ display: none;
15
+ }
16
+
17
+ .wd-deactivate-popup{
18
+ position: fixed;
19
+ top: 0px;
20
+ bottom: 0px;
21
+ left: 0px;
22
+ right: 0px;
23
+ background: #fff;
24
+ z-index: 999999;
25
+ width: 600px;
26
+ height: 281px;
27
+ margin: auto;
28
+ display: none;
29
+ box-sizing: border-box;
30
+ }
31
+
32
+
33
+ .wd-deactivate-popup-header{
34
+ border-bottom: 1px solid #ccc;
35
+ padding: 18px 40px;
36
+ font-size: 16px;
37
+ background: rgba(221, 221, 221, 0.14);
38
+ }
39
+ .wd-deactivate-popup-body{
40
+ padding: 20px 40px;
41
+ border-bottom: 1px solid #ccc;
42
+ }
43
+ .wd-deactivate-popup-body input[type=text]{
44
+ width: 220px;
45
+ }
46
+ .wd-deactivate-popup-body textarea{
47
+ width: 100%;
48
+ }
49
+
50
+ .wd-btns{
51
+ position: absolute;
52
+ bottom: 19px;
53
+ right: 19px
54
+ }
55
+
56
+ .additional_details_wrap{
57
+ margin-top: 20px;
58
+ }
59
+
60
+ .wd-additional-active{
61
+ background: rgba(204, 204, 204, 0.18);
62
+ padding: 15px;
63
+ margin: 14px 0px 5px;
64
+ }
65
+ .wd-popup-active1{
66
+ height: 583px !important;
67
+ }
68
+
69
+ .wd-popup-active2{
70
+ height: 426px !important
71
+ }
72
+
73
+ .wd-popup-active3{
74
+ height: 479px !important
75
+ }
76
+
77
+ .wd-popup-active4{
78
+ height: 340px !important
79
+ }
80
+ .wd-deactivate-popup-opacity{
81
+ width: 100%;
82
+ height: 100%;
83
+ background: #D9D9D9;
84
+ opacity: 0.3;
85
+ z-index: 45;
86
+ position: absolute;
87
+ display: none;
88
+ }
89
+
90
+ .wd-deactivate-popup-opacity .wd-img-loader{
91
+ position: absolute;
92
+ top: 0;
93
+ left: 0;
94
+ right: 0;
95
+ bottom: 0;
96
+ margin: auto;
97
+ z-index: 63;
98
+ }
99
+
100
+ .wd-deactivate-popup-close-btn{
101
+ background-image: url(img/close.svg);
102
+ background-repeat: no-repeat;
103
+ background-size: 16px;
104
+ display: inline-block;
105
+ width: 16px;
106
+ height: 16px;
107
+ position: absolute;
108
+ top: 7px;
109
+ right: 8px;
110
+ cursor: pointer;
111
  }
wd/assets/css/overview.css CHANGED
@@ -1,462 +1,462 @@
1
- /* general */
2
- .wd-table{
3
- display: table;
4
- width: 100%;
5
- }
6
- .wd-cell{
7
- display: table-cell;
8
- }
9
- .wd-valign-top{
10
- vertical-align: top;
11
- }
12
- .wd-valign-middle{
13
- vertical-align: middle;
14
- }
15
- .wd-valign-bottom{
16
- vertical-align: bottom;
17
- }
18
- .wd-text-right{
19
- text-align: right;
20
- }
21
- .wd-text-center{
22
- text-align: center;
23
- }
24
- .hide{
25
- display: none;
26
- }
27
- a:focus{
28
- border: none !important;
29
- outline: none !important;
30
- box-shadow: none !important;
31
- }
32
-
33
- /*end general */
34
- .wd-video_container{
35
- text-align: center;
36
- }
37
- .overview_welcome{
38
- background: url(img/welcome_bg.png) no-repeat;
39
- margin: 21px 0px;
40
- background-size: 100% 100%;
41
- line-height: 28px;
42
- }
43
- .overview_welcome .wd-cell{
44
- padding: 15px;
45
- }
46
- .overview_welcome .wd-cell:first-child{
47
- position: relative;
48
- }
49
-
50
- .overview_welcome h2{
51
- text-transform: uppercase;
52
- font-size: 26px;
53
- margin-top: 0;
54
- margin-bottom: 15px;
55
- color: #424141;
56
- }
57
- .overview_welcome img{
58
- width: 120px;
59
- padding-right: 100px;
60
- padding-left: 25px;
61
- }
62
- .overview_wrap{
63
- width: 935px;
64
- background: #fff;
65
- }
66
- .overview_welcome .overview_welcome_text{
67
- font-size: 15px;
68
- color: #424141;
69
- }
70
- .overview_tabs:after, .deals_content:after, .deal_desc_footer:after{
71
- content: "";
72
- display: table;
73
- clear: both;
74
- }
75
- .overview_tabs li{
76
- float: left;
77
- width: 16.666%;
78
- }
79
-
80
- .overview_tabs li a{
81
- text-decoration: none !important;
82
- color: #000;
83
- background: #D6D6D6;
84
- background: -webkit-linear-gradient(#D6D6D6, #D7D7D7, #D6D6D6); /* For Safari 5.1 to 6.0 */
85
- background: -o-linear-gradient(#D6D6D6, #D7D7D7, #D6D6D6); /* For Opera 11.1 to 12.0 */
86
- background: -moz-linear-gradient(#D6D6D6, #D7D7D7, #D6D6D6); /* For Firefox 3.6 to 15 */
87
- background: linear-gradient(#D6D6D6, #D7D7D7, #D6D6D6); /* Standard syntax */
88
- text-transform: uppercase;
89
- display: block;
90
- padding: 7px 10px;
91
- text-align: center;
92
- font-weight: bold;
93
- border-top: 4px solid #F1F1F1;
94
- position: relative;
95
- top: -4px;
96
- }
97
- .overview_tabs li a:hover,.overview_tabs li a:active, .overview_tabs li a:focus, .overview_tab_active{
98
- background: #fff !important;
99
- border-top: 4px solid #2A495F !important;
100
-
101
- }
102
- #welcome, #user_guide, #support, .deals_content{
103
- padding: 15px 10px;
104
- background: #fff;
105
- }
106
- .plugin_feature_title{
107
- font-size: 19px;
108
- }
109
- .more_features_wrap{
110
- margin-top: 25px;
111
- text-align: right;
112
- }
113
- .more_features, .more_features:hover, .more_features:focus{
114
- color: #fff;
115
- background: #00384F;
116
- padding: 3px 15px;
117
- text-decoration: none;
118
- }
119
- .user_guide_item{
120
- margin-bottom: 19px;
121
- }
122
- .user_guide_title, .user_guide_title:hover, .user_guide_title:focus{
123
- font-size: 16px;
124
- color: #192D3B;
125
- font-weight: bold;
126
- margin-bottom: 5px;
127
- text-decoration: none;
128
- }
129
- .user_guide_titles, .user_guide_titles:hover, .user_guide_titles:focus{
130
- color: #192D3B;
131
- text-decoration: none;
132
- }
133
- .user_guide_demo, .user_guide_plugin, .user_guide_support_forum, .user_guide_addons, .user_guide_faq,
134
- .user_guide_demo:hover, .user_guide_plugin:hover, .user_guide_support_forum:hover, .user_guide_addons:hover, .user_guide_faq:hover{
135
- background-color: #F5F5F5;
136
- background-repeat: no-repeat;
137
- background-position: right -4px center;
138
- border-top-left-radius: 25px;
139
- border-bottom-left-radius: 25px;
140
- padding: 3px 23px 3px 16px;
141
- width: 144px;
142
- font-weight: bold;
143
- text-transform: uppercase;
144
- color: #192D3B;
145
- margin-bottom: 7px;
146
- display: block;
147
- text-decoration: none;
148
- }
149
- .user_guide_demo{
150
- background-image: url(img/ug-icon-1.png);
151
- }
152
- .user_guide_plugin{
153
- background-image: url(img/ug-icon-2.png);
154
- }
155
- .user_guide_support_forum{
156
- background-image: url(img/ug-icon-3.png);
157
- }
158
- .user_guide_addons{
159
- background-image: url(img/ug-icon-4.png);
160
- }
161
- .user_guide_faq{
162
- background-image: url(img/ug-icon-5.png);
163
- }
164
-
165
- #support .wd-support-main{
166
- width: 800px;
167
- margin: 0 auto;
168
- font-size: 16px;
169
- text-align: center;
170
- margin-bottom: 15px;
171
-
172
- }
173
- .wd-overview-site-deatils{
174
- width: 800px;
175
- background: #FBFBFB;
176
- padding: 10px;
177
- margin: 0 auto;
178
- }
179
- .wd-overview-site-deatils h2, .wd-overview-site-deatils p{
180
- text-align: center;
181
- }
182
- .wd-overview-site-deatils p{
183
- font-size: 16px;
184
- }
185
- .contact_us, .contact_us:hover, .contact_us:focus{
186
- display: block;
187
- background: #27475D;
188
- color: #fff;
189
- text-decoration: none;
190
- width: 173px;
191
- padding: 8px 0px;
192
- text-align: center;
193
- margin-bottom: 5px;
194
- font-size: 16px;
195
- margin-left: 8px;
196
- border: 1px solid #B7B7B7;
197
- text-transform: uppercase;
198
- }
199
-
200
- .support_email{
201
- color: #F47A31;
202
- }
203
- .wd-site-deatils{
204
- padding: 23px;
205
- background: #f1f1f1;
206
- box-sizing: border-box;
207
- }
208
- .wd-site-deatils textarea{
209
- width: 100%;
210
- }
211
- .contact_us{
212
- margin-left: auto !important;
213
- margin-right: auto;
214
- margin-top: 10px;
215
- }
216
- #wd-copy{
217
- display: block;
218
- background: #27475D;
219
- color: #fff;
220
- padding: 5px 8px;
221
- text-align: center;
222
- margin-bottom: 5px;
223
- font-size: 14px;
224
- border: 1px solid #B7B7B7;
225
- cursor: pointer;
226
- }
227
- #plugins{
228
- padding-bottom: 15px;
229
- background: #fff;
230
- }
231
-
232
- .deals_header_plugins{
233
- background: url(img/plugins_header_bg.png) #fff no-repeat;
234
- }
235
- .deals_header_themes{
236
- background: url(img/themes_headrer_bg.png) #fff no-repeat;
237
- }
238
- .deals_header{
239
- background-size: cover;
240
- height: 241px;
241
- }
242
- .deals_header .wd-table .wd-cell{
243
- position: relative;
244
- }
245
- .deals_header_plugins .wd-table .wd-cell{
246
- padding: 27px 10px 10px;
247
- }
248
- .deals_header_themes .wd-table .wd-cell{
249
- padding: 0px 10px 10px;
250
- }
251
- .deals_header_plugins .wd-table .wd-cell:first-child{
252
- padding-left: 23px;
253
- width: 30%;
254
- }
255
- .deals_header_themes .wd-table .wd-cell:first-child{
256
- padding-left: 23px;
257
- width: 36%;
258
- }
259
- .deals_header_themes .wd-table{
260
- height: 100%
261
- }
262
-
263
- .titles_wrap{
264
- display: inline-block;
265
- }
266
- .deals_main_title, .deals_secondary_title{
267
- color: #00425A;
268
- font-weight: bold;
269
- line-height: 55px;
270
- text-align: center;
271
- text-transform: uppercase;
272
- }
273
-
274
- .deals_main_title{
275
- font-size: 39px;
276
- }
277
- .deals_secondary_title{
278
- font-size: 30px;
279
- }
280
-
281
- .higlight{
282
- color: #E5682E;
283
- }
284
-
285
- .deals_save{
286
- position: absolute;
287
- right: 87px;
288
- -webkit-transform: rotate(-27deg);
289
- transform: rotate(-30deg);
290
- font-weight: bold;
291
- font-size: 39px;
292
- color: #E5682E;
293
- text-transform: uppercase;
294
- }
295
- .deals_header_plugins .deals_save{
296
- bottom: 37px;
297
- }
298
- .deals_header_themes .deals_save{
299
- bottom: 76px;
300
- }
301
- .deal_block{
302
- width: 31.2%;
303
- display: inline-block;
304
- vertical-align: top;
305
- margin: 5px;
306
- }
307
- .deal_title{
308
- text-align: center;
309
- text-transform: uppercase;
310
- font-size: 20px;
311
- background: #FAFAFA;
312
- padding: 10px 5px;
313
- line-height: 23px;
314
- }
315
- .deal_title a, .deal_title a:hover, .deal_title a:focus{
316
- text-decoration: none !important;
317
- color: #000 !important;
318
- }
319
- .deal_desc{
320
- background: #F5F5F5;
321
- padding: 10px 5px;
322
- }
323
- .deal_desc p{
324
- margin-bottom: 15px;
325
- }
326
-
327
- .deal_desc_footer .downloads{
328
- float: left;
329
- }
330
- .deal_desc_footer .download_btn{
331
- /*float: right;*/
332
- margin-top: 10px;
333
- text-align: center;
334
- }
335
- .deal_desc_footer .downloads .spans span:first-child{
336
- background: #26455A;
337
- color: #fff;
338
- text-transform: uppercase;
339
- padding: 5px;
340
- display: inline-block;
341
- }
342
- .deal_desc_footer .downloads .spans span:last-child{
343
- background: #fff;
344
- padding: 5px;
345
- border-top-right-radius: 25px;
346
- border-bottom-right-radius: 25px;
347
- margin-left: -3px;
348
- }
349
-
350
- .download_btn a, .download_btn a:hover, .download_btn a:focus{
351
- color: #fff !important;
352
- background: #E97025;
353
- text-decoration: none;
354
- padding: 4px 16px;
355
- display: inline-block;
356
- margin-top: 10px;
357
- border-radius: 13px;
358
- text-transform: uppercase;
359
- }
360
-
361
- .stars-container {
362
- position: relative;
363
- display: inline-block;
364
- color: transparent;
365
- font-size: 21px;
366
- }
367
-
368
- .stars-container:before {
369
- position: absolute;
370
- top: 0;
371
- left: 0;
372
- content: '★★★★★';
373
- color: #F4AB7F;
374
- }
375
-
376
- .stars-container:after {
377
- position: absolute;
378
- top: 0;
379
- left: 0;
380
- content: '★★★★★';
381
- color: #F4762A;
382
- overflow: hidden;
383
- }
384
-
385
- .get_all_deals{
386
- margin: 15px 0px;
387
- text-align: center;
388
- }
389
- .get_all_deals a, .get_all_deals a:hover, .get_all_deals a:active, .get_all_deals a:focus {
390
- color: #fff !important;
391
- background: #E97025;
392
- text-decoration: none;
393
- padding: 8px 21px;
394
- display: inline-block;
395
- margin-top: 10px;
396
- text-transform: uppercase;
397
- border: 2px solid #D2631E;
398
- font-size: 21px;
399
- }
400
-
401
- #themes{
402
- border-top: 35px solid #F1F1F1;
403
- padding-bottom: 15px;
404
- }
405
-
406
- .theme_block{
407
- width: 48%;
408
- margin: 5px;
409
- border: 1px solid #ECE9E9;
410
- float: left;
411
- }
412
- .theme_block a, .theme_block a:hover, .theme_block a:focus{
413
- display: block;
414
- text-decoration: none !important;
415
- background: #F7F7F7;
416
- color: #000 !important;
417
- padding: 5px;
418
- }
419
-
420
- /* noteices */
421
- .notice_wrap{
422
- padding: 15px;
423
- border: 1px solid #C4C4C4;
424
- width: 98%;
425
- margin: 10px auto;
426
- box-sizing: border-box;
427
-
428
- }
429
- .notice_wrap .notice_title, .notice_wrap .notice_title:hover, .notice_wrap .notice_title:focus{
430
- color: #E5682E !important;
431
- text-decoration: none;
432
- margin-bottom: 17px;
433
- font-size: 20px;
434
- display: block;
435
- }
436
-
437
- .notice_wrap .notice_txt{
438
- font-size: 15px;
439
- }
440
-
441
-
442
- .wd-tour{
443
- text-align: right;
444
- }
445
- .wd-tour-btn, .wd-tour-btn:hover, .wd-tour-btn:focus{
446
- background: #F47629;
447
- color: #fff;
448
- text-decoration: none;
449
- padding: 5px;
450
- display: inline-block;
451
- font-size: 16px;
452
- }
453
-
454
- .wd-start-using-button .button{
455
- margin-left: 7px;
456
- margin-top: 7px;
457
- }
458
-
459
- .wd-start-using-button{
460
- margin-right:10px;
461
- float: right;
462
  }
1
+ /* general */
2
+ .wd-table{
3
+ display: table;
4
+ width: 100%;
5
+ }
6
+ .wd-cell{
7
+ display: table-cell;
8
+ }
9
+ .wd-valign-top{
10
+ vertical-align: top;
11
+ }
12
+ .wd-valign-middle{
13
+ vertical-align: middle;
14
+ }
15
+ .wd-valign-bottom{
16
+ vertical-align: bottom;
17
+ }
18
+ .wd-text-right{
19
+ text-align: right;
20
+ }
21
+ .wd-text-center{
22
+ text-align: center;
23
+ }
24
+ .hide{
25
+ display: none;
26
+ }
27
+ a:focus{
28
+ border: none !important;
29
+ outline: none !important;
30
+ box-shadow: none !important;
31
+ }
32
+
33
+ /*end general */
34
+ .wd-video_container{
35
+ text-align: center;
36
+ }
37
+ .overview_welcome{
38
+ background: url(img/welcome_bg.png) no-repeat;
39
+ margin: 21px 0px;
40
+ background-size: 100% 100%;
41
+ line-height: 28px;
42
+ }
43
+ .overview_welcome .wd-cell{
44
+ padding: 15px;
45
+ }
46
+ .overview_welcome .wd-cell:first-child{
47
+ position: relative;
48
+ }
49
+
50
+ .overview_welcome h2{
51
+ text-transform: uppercase;
52
+ font-size: 26px;
53
+ margin-top: 0;
54
+ margin-bottom: 15px;
55
+ color: #424141;
56
+ }
57
+ .overview_welcome img{
58
+ width: 120px;
59
+ padding-right: 100px;
60
+ padding-left: 25px;
61
+ }
62
+ .overview_wrap{
63
+ width: 935px;
64
+ background: #fff;
65
+ }
66
+ .overview_welcome .overview_welcome_text{
67
+ font-size: 15px;
68
+ color: #424141;
69
+ }
70
+ .overview_tabs:after, .deals_content:after, .deal_desc_footer:after{
71
+ content: "";
72
+ display: table;
73
+ clear: both;
74
+ }
75
+ .overview_tabs li{
76
+ float: left;
77
+ width: 16.666%;
78
+ }
79
+
80
+ .overview_tabs li a{
81
+ text-decoration: none !important;
82
+ color: #000;
83
+ background: #D6D6D6;
84
+ background: -webkit-linear-gradient(#D6D6D6, #D7D7D7, #D6D6D6); /* For Safari 5.1 to 6.0 */
85
+ background: -o-linear-gradient(#D6D6D6, #D7D7D7, #D6D6D6); /* For Opera 11.1 to 12.0 */
86
+ background: -moz-linear-gradient(#D6D6D6, #D7D7D7, #D6D6D6); /* For Firefox 3.6 to 15 */
87
+ background: linear-gradient(#D6D6D6, #D7D7D7, #D6D6D6); /* Standard syntax */
88
+ text-transform: uppercase;
89
+ display: block;
90
+ padding: 7px 10px;
91
+ text-align: center;
92
+ font-weight: bold;
93
+ border-top: 4px solid #F1F1F1;
94
+ position: relative;
95
+ top: -4px;
96
+ }
97
+ .overview_tabs li a:hover,.overview_tabs li a:active, .overview_tabs li a:focus, .overview_tab_active{
98
+ background: #fff !important;
99
+ border-top: 4px solid #2A495F !important;
100
+
101
+ }
102
+ #welcome, #user_guide, #support, .deals_content{
103
+ padding: 15px 10px;
104
+ background: #fff;
105
+ }
106
+ .plugin_feature_title{
107
+ font-size: 19px;
108
+ }
109
+ .more_features_wrap{
110
+ margin-top: 25px;
111
+ text-align: right;
112
+ }
113
+ .more_features, .more_features:hover, .more_features:focus{
114
+ color: #fff;
115
+ background: #00384F;
116
+ padding: 3px 15px;
117
+ text-decoration: none;
118
+ }
119
+ .user_guide_item{
120
+ margin-bottom: 19px;
121
+ }
122
+ .user_guide_title, .user_guide_title:hover, .user_guide_title:focus{
123
+ font-size: 16px;
124
+ color: #192D3B;
125
+ font-weight: bold;
126
+ margin-bottom: 5px;
127
+ text-decoration: none;
128
+ }
129
+ .user_guide_titles, .user_guide_titles:hover, .user_guide_titles:focus{
130
+ color: #192D3B;
131
+ text-decoration: none;
132
+ }
133
+ .user_guide_demo, .user_guide_plugin, .user_guide_support_forum, .user_guide_addons, .user_guide_faq,
134
+ .user_guide_demo:hover, .user_guide_plugin:hover, .user_guide_support_forum:hover, .user_guide_addons:hover, .user_guide_faq:hover{
135
+ background-color: #F5F5F5;
136
+ background-repeat: no-repeat;
137
+ background-position: right -4px center;
138
+ border-top-left-radius: 25px;
139
+ border-bottom-left-radius: 25px;
140
+ padding: 3px 23px 3px 16px;
141
+ width: 144px;
142
+ font-weight: bold;
143
+ text-transform: uppercase;
144
+ color: #192D3B;
145
+ margin-bottom: 7px;
146
+ display: block;
147
+ text-decoration: none;
148
+ }
149
+ .user_guide_demo{
150
+ background-image: url(img/ug-icon-1.png);
151
+ }
152
+ .user_guide_plugin{
153
+ background-image: url(img/ug-icon-2.png);
154
+ }
155
+ .user_guide_support_forum{
156
+ background-image: url(img/ug-icon-3.png);
157
+ }
158
+ .user_guide_addons{
159
+ background-image: url(img/ug-icon-4.png);
160
+ }
161
+ .user_guide_faq{
162
+ background-image: url(img/ug-icon-5.png);
163
+ }
164
+
165
+ #support .wd-support-main{
166
+ width: 800px;
167
+ margin: 0 auto;
168
+ font-size: 16px;
169
+ text-align: center;
170
+ margin-bottom: 15px;
171
+
172
+ }
173
+ .wd-overview-site-deatils{
174
+ width: 800px;
175
+ background: #FBFBFB;
176
+ padding: 10px;
177
+ margin: 0 auto;
178
+ }
179
+ .wd-overview-site-deatils h2, .wd-overview-site-deatils p{
180
+ text-align: center;
181
+ }
182
+ .wd-overview-site-deatils p{
183
+ font-size: 16px;
184
+ }
185
+ .contact_us, .contact_us:hover, .contact_us:focus{
186
+ display: block;
187
+ background: #27475D;
188
+ color: #fff;
189
+ text-decoration: none;
190
+ width: 173px;
191
+ padding: 8px 0px;
192
+ text-align: center;
193
+ margin-bottom: 5px;
194
+ font-size: 16px;
195
+ margin-left: 8px;
196
+ border: 1px solid #B7B7B7;
197
+ text-transform: uppercase;
198
+ }
199
+
200
+ .support_email{
201
+ color: #F47A31;
202
+ }
203
+ .wd-site-deatils{
204
+ padding: 23px;
205
+ background: #f1f1f1;
206
+ box-sizing: border-box;
207
+ }
208
+ .wd-site-deatils textarea{
209
+ width: 100%;
210
+ }
211
+ .contact_us{
212
+ margin-left: auto !important;
213
+ margin-right: auto;
214
+ margin-top: 10px;
215
+ }
216
+ #wd-copy{
217
+ display: block;
218
+ background: #27475D;
219
+ color: #fff;
220
+ padding: 5px 8px;
221
+ text-align: center;
222
+ margin-bottom: 5px;
223
+ font-size: 14px;
224
+ border: 1px solid #B7B7B7;
225
+ cursor: pointer;
226
+ }
227
+ #plugins{
228
+ padding-bottom: 15px;
229
+ background: #fff;
230
+ }
231
+
232
+ .deals_header_plugins{
233
+ background: url(img/plugins_header_bg.png) #fff no-repeat;
234
+ }
235
+ .deals_header_themes{
236
+ background: url(img/themes_headrer_bg.png) #fff no-repeat;
237
+ }
238
+ .deals_header{
239
+ background-size: cover;
240
+ height: 241px;
241
+ }
242
+ .deals_header .wd-table .wd-cell{
243
+ position: relative;
244
+ }
245
+ .deals_header_plugins .wd-table .wd-cell{
246
+ padding: 27px 10px 10px;
247
+ }
248
+ .deals_header_themes .wd-table .wd-cell{
249
+ padding: 0px 10px 10px;
250
+ }
251
+ .deals_header_plugins .wd-table .wd-cell:first-child{
252
+ padding-left: 23px;
253
+ width: 30%;
254
+ }
255
+ .deals_header_themes .wd-table .wd-cell:first-child{
256
+ padding-left: 23px;
257
+ width: 36%;
258
+ }
259
+ .deals_header_themes .wd-table{
260
+ height: 100%
261
+ }
262
+
263
+ .titles_wrap{
264
+ display: inline-block;
265
+ }
266
+ .deals_main_title, .deals_secondary_title{
267
+ color: #00425A;
268
+ font-weight: bold;
269
+ line-height: 55px;
270
+ text-align: center;
271
+ text-transform: uppercase;
272
+ }
273
+
274
+ .deals_main_title{
275
+ font-size: 39px;
276
+ }
277
+ .deals_secondary_title{
278
+ font-size: 30px;
279
+ }
280
+
281
+ .higlight{
282
+ color: #E5682E;
283
+ }
284
+
285
+ .deals_save{
286
+ position: absolute;
287
+ right: 87px;
288
+ -webkit-transform: rotate(-27deg);
289
+ transform: rotate(-30deg);
290
+ font-weight: bold;
291
+ font-size: 39px;
292
+ color: #E5682E;
293
+ text-transform: uppercase;
294
+ }
295
+ .deals_header_plugins .deals_save{
296
+ bottom: 37px;
297
+ }
298
+ .deals_header_themes .deals_save{
299
+ bottom: 76px;
300
+ }
301
+ .deal_block{
302
+ width: 31.2%;
303
+ display: inline-block;
304
+ vertical-align: top;
305
+ margin: 5px;
306
+ }
307
+ .deal_title{
308
+ text-align: center;
309
+ text-transform: uppercase;
310
+ font-size: 20px;
311
+ background: #FAFAFA;
312
+ padding: 10px 5px;
313
+ line-height: 23px;
314
+ }
315
+ .deal_title a, .deal_title a:hover, .deal_title a:focus{
316
+ text-decoration: none !important;
317
+ color: #000 !important;
318
+ }
319
+ .deal_desc{
320
+ background: #F5F5F5;
321
+ padding: 10px 5px;
322
+ }
323
+ .deal_desc p{
324
+ margin-bottom: 15px;
325
+ }
326
+
327
+ .deal_desc_footer .downloads{
328
+ float: left;
329
+ }
330
+ .deal_desc_footer .download_btn{
331
+ /*float: right;*/
332
+ margin-top: 10px;
333
+ text-align: center;
334
+ }
335
+ .deal_desc_footer .downloads .spans span:first-child{
336
+ background: #26455A;
337
+ color: #fff;
338
+ text-transform: uppercase;
339
+ padding: 5px;
340
+ display: inline-block;
341
+ }
342
+ .deal_desc_footer .downloads .spans span:last-child{
343
+ background: #fff;
344
+ padding: 5px;
345
+ border-top-right-radius: 25px;
346
+ border-bottom-right-radius: 25px;
347
+ margin-left: -3px;
348
+ }
349
+
350
+ .download_btn a, .download_btn a:hover, .download_btn a:focus{
351
+ color: #fff !important;
352
+ background: #E97025;
353
+ text-decoration: none;
354
+ padding: 4px 16px;
355
+ display: inline-block;
356
+ margin-top: 10px;
357
+ border-radius: 13px;
358
+ text-transform: uppercase;
359
+ }
360
+
361
+ .stars-container {
362
+ position: relative;
363
+ display: inline-block;
364
+ color: transparent;
365
+ font-size: 21px;
366
+ }
367
+
368
+ .stars-container:before {
369
+ position: absolute;
370
+ top: 0;
371
+ left: 0;
372
+ content: '★★★★★';
373
+ color: #F4AB7F;
374
+ }
375
+
376
+ .stars-container:after {
377
+ position: absolute;
378
+ top: 0;
379
+ left: 0;
380
+ content: '★★★★★';
381
+ color: #F4762A;
382
+ overflow: hidden;
383
+ }
384
+
385
+ .get_all_deals{
386
+ margin: 15px 0px;
387
+ text-align: center;
388
+ }
389
+ .get_all_deals a, .get_all_deals a:hover, .get_all_deals a:active, .get_all_deals a:focus {
390
+ color: #fff !important;
391
+ background: #E97025;
392
+ text-decoration: none;
393
+ padding: 8px 21px;
394
+ display: inline-block;
395
+ margin-top: 10px;
396
+ text-transform: uppercase;
397
+ border: 2px solid #D2631E;
398
+ font-size: 21px;
399
+ }
400
+
401
+ #themes{
402
+ border-top: 35px solid #F1F1F1;
403
+ padding-bottom: 15px;
404
+ }
405
+
406
+ .theme_block{
407
+ width: 48%;
408
+ margin: 5px;
409
+ border: 1px solid #ECE9E9;
410
+ float: left;
411
+ }
412
+ .theme_block a, .theme_block a:hover, .theme_block a:focus{
413
+ display: block;
414
+ text-decoration: none !important;
415
+ background: #F7F7F7;
416
+ color: #000 !important;
417
+ padding: 5px;
418
+ }
419
+
420
+ /* noteices */
421
+ .notice_wrap{
422
+ padding: 15px;
423
+ border: 1px solid #C4C4C4;
424
+ width: 98%;
425
+ margin: 10px auto;
426
+ box-sizing: border-box;
427
+
428
+ }
429
+ .notice_wrap .notice_title, .notice_wrap .notice_title:hover, .notice_wrap .notice_title:focus{
430
+ color: #E5682E !important;
431
+ text-decoration: none;
432
+ margin-bottom: 17px;
433
+ font-size: 20px;
434
+ display: block;
435
+ }
436
+
437
+ .notice_wrap .notice_txt{
438
+ font-size: 15px;
439
+ }
440
+
441
+
442
+ .wd-tour{
443
+ text-align: right;
444
+ }
445
+ .wd-tour-btn, .wd-tour-btn:hover, .wd-tour-btn:focus{
446
+ background: #F47629;
447
+ color: #fff;
448
+ text-decoration: none;
449
+ padding: 5px;
450
+ display: inline-block;
451
+ font-size: 16px;
452
+ }
453
+
454
+ .wd-start-using-button .button{
455
+ margin-left: 7px;
456
+ margin-top: 7px;
457
+ }
458
+
459
+ .wd-start-using-button{
460
+ margin-right:10px;
461
+ float: right;
462
  }
wd/assets/css/subscribe.css CHANGED
@@ -1,114 +1,114 @@
1
- body {
2
- color: #444;
3
- font-family: "Open Sans",sans-serif;
4
- line-height: 1.4em;
5
- min-width: 600px;
6
- }
7
-
8
- .wd-subscribe{
9
- background: #fff;
10
- border: 2px solid #E2E5EC;
11
- width: 55%;
12
- margin-top: 40px;
13
- }
14
- .wd-subscribe-content{
15
- padding: 30px 92px;
16
- }
17
- .imgs{
18
- text-align: center;
19
- }
20
- .imgs img{
21
- vertical-align: middle;
22
- width: 125px;
23
- }
24
- .imgs span {
25
- color: #21759B;
26
- font-weight: bold;
27
- font-size: 52px;
28
- padding: 0px 28px;
29
- }
30
- .texts{
31
- margin-top: 10px;
32
- margin-bottom: 25px;
33
- }
34
-
35
- .btns .allow_and_continue, .btns .allow_and_continue:hover, .btns .allow_and_continue:focus{
36
- display: inline-block;
37
- background: url(img/allow&continue.png) no-repeat;
38
- width: 279px;
39
- height: 61px;
40
- border: none;
41
-
42
- }
43
- .btns .skip, .btns .skip:hover, .btns .skip:focus{
44
- margin-left: 66px;
45
- display: inline-block;
46
- background: url(img/skip.png) no-repeat;
47
- width: 76px;
48
- height: 59px;
49
- }
50
- .permissions{
51
- color: #525252 !important;
52
- }
53
- .list{
54
- margin-top: 15px;
55
- display:none;
56
- }
57
- .list_item{
58
- display: table;
59
- margin-bottom: 15px;
60
- }
61
- .list_item:after{
62
- content: "";
63
- clear: both;
64
- display: table;
65
- }
66
- .list_img_wrap{
67
- float: left;
68
- }
69
- .list_img_wrap img{
70
- width: 27px;
71
- }
72
- .list_text_wrap{
73
- margin-left: 33px;
74
- float: right;
75
- }
76
- .list_title, .list_text{
77
- color: #525252;
78
- font-size: 13px;
79
- }
80
- .wd_loader{
81
- vertical-align: top;
82
- width: 30px;
83
- margin-top: 11px;
84
- visibility: hidden;
85
- }
86
- .wd-subscribe-footer{
87
- text-align: center;
88
- padding: 4px 0px;
89
- border-top: 1px solid rgba(204, 204, 204, 0.52);
90
- }
91
- .wd-footer-menu {
92
- display: inline-block;
93
- list-style-type: none;
94
- padding: 0;
95
- margin: 0;
96
- }
97
- .wd-footer-menu li{
98
- float: left;
99
- }
100
- .wd-footer-menu li, .wd-footer-menu li a{
101
- color: rgba(62, 60, 60, 0.57) !important;
102
- text-decoration: none;
103
- font-size: 12px;
104
- padding: 2px;
105
- font-weight: bold;
106
- display: inline-block;
107
- vertical-align: middle;
108
- }
109
-
110
-
111
- .wd-footer-menu li a:hover{
112
- color: rgba(62, 60, 60, 0.57) !important;
113
- text-decoration: underline;
114
  }
1
+ body {
2
+ color: #444;
3
+ font-family: "Open Sans",sans-serif;
4
+ line-height: 1.4em;
5
+ min-width: 600px;
6
+ }
7
+
8
+ .wd-subscribe{
9
+ background: #fff;
10
+ border: 2px solid #E2E5EC;
11
+ width: 55%;
12
+ margin-top: 40px;
13
+ }
14
+ .wd-subscribe-content{
15
+ padding: 30px 92px;
16
+ }
17
+ .imgs{
18
+ text-align: center;
19
+ }
20
+ .imgs img{
21
+ vertical-align: middle;
22
+ width: 125px;
23
+ }
24
+ .imgs span {
25
+ color: #21759B;
26
+ font-weight: bold;
27
+ font-size: 52px;
28
+ padding: 0px 28px;
29
+ }
30
+ .texts{
31
+ margin-top: 10px;
32
+ margin-bottom: 25px;
33
+ }
34
+
35
+ .btns .allow_and_continue, .btns .allow_and_continue:hover, .btns .allow_and_continue:focus{
36
+ display: inline-block;
37
+ background: url(img/allow&continue.png) no-repeat;
38
+ width: 279px;
39
+ height: 61px;
40
+ border: none;
41
+
42
+ }
43
+ .btns .skip, .btns .skip:hover, .btns .skip:focus{
44
+ margin-left: 66px;
45
+ display: inline-block;
46
+ background: url(img/skip.png) no-repeat;
47
+ width: 76px;
48
+ height: 59px;
49
+ }
50
+ .permissions{
51
+ color: #525252 !important;
52
+ }
53
+ .list{
54
+ margin-top: 15px;
55
+ display:none;
56
+ }
57
+ .list_item{
58
+ display: table;
59
+ margin-bottom: 15px;
60
+ }
61
+ .list_item:after{
62
+ content: "";
63
+ clear: both;
64
+ display: table;
65
+ }
66
+ .list_img_wrap{
67
+ float: left;
68
+ }
69
+ .list_img_wrap img{
70
+ width: 27px;
71
+ }
72
+ .list_text_wrap{
73
+ margin-left: 33px;
74
+ float: right;
75
+ }
76
+ .list_title, .list_text{
77
+ color: #525252;
78
+ font-size: 13px;
79
+ }
80
+ .wd_loader{
81
+ vertical-align: top;
82
+ width: 30px;
83
+ margin-top: 11px;
84
+ visibility: hidden;
85
+ }
86
+ .wd-subscribe-footer{
87
+ text-align: center;
88
+ padding: 4px 0px;
89
+ border-top: 1px solid rgba(204, 204, 204, 0.52);
90
+ }
91
+ .wd-footer-menu {
92
+ display: inline-block;
93
+ list-style-type: none;
94
+ padding: 0;
95
+ margin: 0;
96
+ }
97
+ .wd-footer-menu li{
98
+ float: left;
99
+ }
100
+ .wd-footer-menu li, .wd-footer-menu li a{
101
+ color: rgba(62, 60, 60, 0.57) !important;
102
+ text-decoration: none;
103
+ font-size: 12px;
104
+ padding: 2px;
105
+ font-weight: bold;
106
+ display: inline-block;
107
+ vertical-align: middle;
108
+ }
109
+
110
+
111
+ .wd-footer-menu li a:hover{
112
+ color: rgba(62, 60, 60, 0.57) !important;
113
+ text-decoration: underline;
114
  }
wd/assets/js/overview.js CHANGED
@@ -1,56 +1,56 @@
1
- ////////////////////////////////////////////////////////////////////////////////////////
2
- // Events //
3
- ////////////////////////////////////////////////////////////////////////////////////////
4
- ////////////////////////////////////////////////////////////////////////////////////////
5
- // Constants //
6
- ////////////////////////////////////////////////////////////////////////////////////////
7
- ////////////////////////////////////////////////////////////////////////////////////////
8
- // Variables //
9
- ////////////////////////////////////////////////////////////////////////////////////////
10
- ////////////////////////////////////////////////////////////////////////////////////////
11
- // Constructor & Destructor //
12
- ////////////////////////////////////////////////////////////////////////////////////////
13
- jQuery(document).ready(function () {
14
- jQuery(".overview_content > div:not(#welcome)").hide();
15
- jQuery(".overview_tabs li a:not(.not_tab)").on("click", function(){
16
- jQuery(".overview_tabs li a").removeClass("overview_tab_active");
17
- jQuery(this).addClass("overview_tab_active");
18
- jQuery(".overview_content > div").hide();
19
- var id = jQuery(this).attr("href");
20
- jQuery(id).show();
21
- return false;
22
- });
23
-
24
- // rating
25
- // jQuery(".rating").each(function(){
26
- // var rate = jQuery(this).attr("data-rating");
27
- // jQuery("<span class='stars-container'>")
28
- // .addClass("stars-" + rate.toString())
29
- // .text("★★★★★")
30
- // .appendTo(jQuery(this));
31
- // jQuery("body").append('<style>.stars-' + rate.toString() + ':after{width:' + rate + '%;}</style>');
32
- // });
33
-
34
- jQuery("#wd-copy").on("click", function(){
35
- var selector = document.querySelector('#wd-site-deatils-textarea');
36
- selector.select();
37
- document.execCommand('copy');
38
-
39
- return false;
40
-
41
- });
42
-
43
- });
44
-
45
- ////////////////////////////////////////////////////////////////////////////////////////
46
- // Public Methods //
47
- ////////////////////////////////////////////////////////////////////////////////////////
48
- ////////////////////////////////////////////////////////////////////////////////////////
49
- // Getters & Setters //
50
- ////////////////////////////////////////////////////////////////////////////////////////
51
- ////////////////////////////////////////////////////////////////////////////////////////
52
- // Private Methods //
53
- ////////////////////////////////////////////////////////////////////////////////////////
54
- ////////////////////////////////////////////////////////////////////////////////////////
55
- // Listeners //
56
  ////////////////////////////////////////////////////////////////////////////////////////
1
+ ////////////////////////////////////////////////////////////////////////////////////////
2
+ // Events //
3
+ ////////////////////////////////////////////////////////////////////////////////////////
4
+ ////////////////////////////////////////////////////////////////////////////////////////
5
+ // Constants //
6
+ ////////////////////////////////////////////////////////////////////////////////////////
7
+ ////////////////////////////////////////////////////////////////////////////////////////
8
+ // Variables //
9
+ ////////////////////////////////////////////////////////////////////////////////////////
10
+ ////////////////////////////////////////////////////////////////////////////////////////
11
+ // Constructor & Destructor //
12
+ ////////////////////////////////////////////////////////////////////////////////////////
13
+ jQuery(document).ready(function () {
14
+ jQuery(".overview_content > div:not(#welcome)").hide();
15
+ jQuery(".overview_tabs li a:not(.not_tab)").on("click", function(){
16
+ jQuery(".overview_tabs li a").removeClass("overview_tab_active");
17
+ jQuery(this).addClass("overview_tab_active");
18
+ jQuery(".overview_content > div").hide();
19
+ var id = jQuery(this).attr("href");
20
+ jQuery(id).show();
21
+ return false;
22
+ });
23
+
24
+ // rating
25
+ // jQuery(".rating").each(function(){
26
+ // var rate = jQuery(this).attr("data-rating");
27
+ // jQuery("<span class='stars-container'>")
28
+ // .addClass("stars-" + rate.toString())
29
+ // .text("★★★★★")
30
+ // .appendTo(jQuery(this));
31
+ // jQuery("body").append('<style>.stars-' + rate.toString() + ':after{width:' + rate + '%;}</style>');
32
+ // });
33
+
34
+ jQuery("#wd-copy").on("click", function(){
35
+ var selector = document.querySelector('#wd-site-deatils-textarea');
36
+ selector.select();
37
+ document.execCommand('copy');
38
+
39
+ return false;
40
+
41
+ });
42
+
43
+ });
44
+
45
+ ////////////////////////////////////////////////////////////////////////////////////////
46
+ // Public Methods //
47
+ ////////////////////////////////////////////////////////////////////////////////////////
48
+ ////////////////////////////////////////////////////////////////////////////////////////
49
+ // Getters & Setters //
50
+ ////////////////////////////////////////////////////////////////////////////////////////
51
+ ////////////////////////////////////////////////////////////////////////////////////////
52
+ // Private Methods //
53
+ ////////////////////////////////////////////////////////////////////////////////////////
54
+ ////////////////////////////////////////////////////////////////////////////////////////
55
+ // Listeners //
56
  ////////////////////////////////////////////////////////////////////////////////////////
wd/config.php CHANGED
@@ -1,131 +1,131 @@
1
- <?php
2
- if ( ! defined( 'ABSPATH' ) ) {
3
- exit;
4
- }
5
-
6
- class DoradoWebConfig {
7
- public static $instance;
8
-
9
- public $prefix = null;
10
- public $wd_plugin_id = null;
11
- public $plugin_title = null;
12
- public $plugin_wordpress_slug = null;
13
- public $plugin_dir = null;
14
- public $plugin_main_file = null;
15
- public $description = null;
16
- public $plugin_features = null;
17
- public $user_guide = null;
18
- public $overview_welcome_image = null;
19
- public $video_youtube_id = null;
20
- public $plugin_wd_url = null;
21
- public $plugin_wd_demo_link = null;
22
- public $plugin_wd_addons_link = null;
23
- public $plugin_wizard_link = null;
24
- public $after_subscribe = null;
25
- public $plugin_menu_title = null;
26
- public $plugin_menu_icon = null;
27
- public $wd_dir = null;
28
- public $wd_dir_includes = null;
29
- public $wd_dir_templates = null;
30
- public $wd_dir_assets = null;
31
- public $wd_url_css = null;
32
- public $wd_url_js = null;
33
- public $wd_url_img = null;
34
- public $deactivate = null;
35
- public $subscribe = null;
36
- public $custom_post = null;
37
- public $menu_capability = null;
38
- public $menu_position = null;
39
- public $start_using_url = null;
40
-
41
- public function set_options( $options ){
42
-
43
- if(isset( $options["prefix"] )) {
44
- $this->prefix = $options["prefix"];
45
- }
46
- if(isset( $options["wd_plugin_id"] )) {
47
- $this->wd_plugin_id = $options["wd_plugin_id"];
48
- }
49
- if(isset( $options["plugin_title"] )) {
50
- $this->plugin_title = $options["plugin_title"];
51
- }
52
- if(isset( $options["plugin_wordpress_slug"] )) {
53
- $this->plugin_wordpress_slug = $options["plugin_wordpress_slug"];
54
- }
55
- if(isset( $options["plugin_dir"] )) {
56
- $this->plugin_dir = $options["plugin_dir"];
57
- }
58
- if(isset( $options["plugin_main_file"] )) {
59
- $this->plugin_main_file = $options["plugin_main_file"];
60
- }
61
-
62
- if(isset( $options["description"] )) {
63
- $this->description = $options["description"];
64
- }
65
- if(isset( $options["plugin_features"] )) {
66
- $this->plugin_features = $options["plugin_features"];
67
- }
68
- if(isset( $options["user_guide"] )) {
69
- $this->user_guide = $options["user_guide"];
70
- }
71
- if(isset( $options["video_youtube_id"] )) {
72
- $this->video_youtube_id = $options["video_youtube_id"];
73
- }
74
- if(isset( $options["overview_welcome_image"] )) {
75
- $this->overview_welcome_image = $options["overview_welcome_image"];
76
- }
77
- if(isset( $options["plugin_wd_url"] )) {
78
- $this->plugin_wd_url = $options["plugin_wd_url"];
79
- }
80
- if(isset( $options["plugin_wd_demo_link"] )) {
81
- $this->plugin_wd_demo_link = $options["plugin_wd_demo_link"];
82
- }
83
- if(isset( $options["plugin_wd_addons_link"] )) {
84
- $this->plugin_wd_addons_link = $options["plugin_wd_addons_link"];
85
- }
86
- if(isset( $options["plugin_wizard_link"] )) {
87
- $this->plugin_wizard_link = $options["plugin_wizard_link"];
88
- }
89
- if(isset( $options["after_subscribe"] )) {
90
- $this->after_subscribe = $options["after_subscribe"];
91
- }
92
- if(isset( $options["plugin_menu_title"] )) {
93
- $this->plugin_menu_title = $options["plugin_menu_title"];
94
- }
95
- if(isset( $options["plugin_menu_icon"] )) {
96
- $this->plugin_menu_icon = $options["plugin_menu_icon"];
97
- }
98
- if(isset( $options["deactivate"] )) {
99
- $this->deactivate = $options["deactivate"];
100
- }
101
- if(isset( $options["subscribe"] )) {
102
- $this->subscribe = $options["subscribe"];
103
- }
104
- if(isset( $options["custom_post"] )) {
105
- $this->custom_post = $options["custom_post"];
106
- }
107
- if(isset( $options["menu_capability"] )) {
108
- $this->menu_capability = $options["menu_capability"];
109
- }
110
- if(isset( $options["menu_position"] )) {
111
- $this->menu_position = $options["menu_position"];
112
- }
113
- if(isset( $options["start_using_url"] )) {
114
- $this->start_using_url = $options["start_using_url"];
115
- }
116
-
117
- // directories
118
- $this->wd_dir = dirname( $this->plugin_main_file ) . '/wd';
119
- $this->wd_dir_includes = $this->wd_dir . '/includes';
120
- $this->wd_dir_templates = $this->wd_dir . '/templates';
121
- $this->wd_dir_assets = $this->wd_dir . '/assets';
122
- $this->wd_url_css = plugins_url( plugin_basename( $this->wd_dir ) ) . '/assets/css';
123
- $this->wd_url_js = plugins_url( plugin_basename( $this->wd_dir ) ) . '/assets/js';
124
- $this->wd_url_img = plugins_url( plugin_basename( $this->wd_dir ) ) . '/assets/img';
125
- }
126
-
127
-
128
- }
129
-
130
-
131
-
1
+ <?php
2
+ if ( ! defined( 'ABSPATH' ) ) {
3
+ exit;
4
+ }
5
+
6
+ class DoradoWebConfig {
7
+ public static $instance;
8
+
9
+ public $prefix = null;
10
+ public $wd_plugin_id = null;
11
+ public $plugin_title = null;
12
+ public $plugin_wordpress_slug = null;
13
+ public $plugin_dir = null;
14
+ public $plugin_main_file = null;
15
+ public $description = null;
16
+ public $plugin_features = null;
17
+ public $user_guide = null;
18
+ public $overview_welcome_image = null;
19
+ public $video_youtube_id = null;
20
+ public $plugin_wd_url = null;
21
+ public $plugin_wd_demo_link = null;
22
+ public $plugin_wd_addons_link = null;
23
+ public $plugin_wizard_link = null;
24
+ public $after_subscribe = null;
25
+ public $plugin_menu_title = null;
26
+ public $plugin_menu_icon = null;
27
+ public $wd_dir = null;
28
+ public $wd_dir_includes = null;
29
+ public $wd_dir_templates = null;
30
+ public $wd_dir_assets = null;
31
+ public $wd_url_css = null;
32
+ public $wd_url_js = null;
33
+ public $wd_url_img = null;
34
+ public $deactivate = null;
35
+ public $subscribe = null;
36
+ public $custom_post = null;
37
+ public $menu_capability = null;
38
+ public $menu_position = null;
39
+ public $start_using_url = null;
40
+
41
+ public function set_options( $options ){
42
+
43
+ if(isset( $options["prefix"] )) {
44
+ $this->prefix = $options["prefix"];
45
+ }
46
+ if(isset( $options["wd_plugin_id"] )) {
47
+ $this->wd_plugin_id = $options["wd_plugin_id"];
48
+ }
49
+ if(isset( $options["plugin_title"] )) {
50
+ $this->plugin_title = $options["plugin_title"];
51
+ }
52
+ if(isset( $options["plugin_wordpress_slug"] )) {
53
+ $this->plugin_wordpress_slug = $options["plugin_wordpress_slug"];
54
+ }
55
+ if(isset( $options["plugin_dir"] )) {
56
+ $this->plugin_dir = $options["plugin_dir"];
57
+ }
58
+ if(isset( $options["plugin_main_file"] )) {
59
+ $this->plugin_main_file = $options["plugin_main_file"];
60
+ }
61
+
62
+ if(isset( $options["description"] )) {
63
+ $this->description = $options["description"];
64
+ }
65
+ if(isset( $options["plugin_features"] )) {
66
+ $this->plugin_features = $options["plugin_features"];
67
+ }
68
+ if(isset( $options["user_guide"] )) {
69
+ $this->user_guide = $options["user_guide"];
70
+ }
71
+ if(isset( $options["video_youtube_id"] )) {
72
+ $this->video_youtube_id = $options["video_youtube_id"];
73
+ }
74
+ if(isset( $options["overview_welcome_image"] )) {
75
+ $this->overview_welcome_image = $options["overview_welcome_image"];
76
+ }
77
+ if(isset( $options["plugin_wd_url"] )) {
78
+ $this->plugin_wd_url = $options["plugin_wd_url"];
79
+ }
80
+ if(isset( $options["plugin_wd_demo_link"] )) {
81
+ $this->plugin_wd_demo_link = $options["plugin_wd_demo_link"];
82
+ }
83
+ if(isset( $options["plugin_wd_addons_link"] )) {
84
+ $this->plugin_wd_addons_link = $options["plugin_wd_addons_link"];
85
+ }
86
+ if(isset( $options["plugin_wizard_link"] )) {
87
+ $this->plugin_wizard_link = $options["plugin_wizard_link"];
88
+ }
89
+ if(isset( $options["after_subscribe"] )) {
90
+ $this->after_subscribe = $options["after_subscribe"];
91
+ }
92
+ if(isset( $options["plugin_menu_title"] )) {
93
+ $this->plugin_menu_title = $options["plugin_menu_title"];
94
+ }
95
+ if(isset( $options["plugin_menu_icon"] )) {
96
+ $this->plugin_menu_icon = $options["plugin_menu_icon"];
97
+ }
98
+ if(isset( $options["deactivate"] )) {
99
+ $this->deactivate = $options["deactivate"];
100
+ }
101
+ if(isset( $options["subscribe"] )) {
102
+ $this->subscribe = $options["subscribe"];
103
+ }
104
+ if(isset( $options["custom_post"] )) {
105
+ $this->custom_post = $options["custom_post"];
106
+ }
107
+ if(isset( $options["menu_capability"] )) {
108
+ $this->menu_capability = $options["menu_capability"];
109
+ }
110
+ if(isset( $options["menu_position"] )) {
111
+ $this->menu_position = $options["menu_position"];
112
+ }
113
+ if(isset( $options["start_using_url"] )) {
114
+ $this->start_using_url = $options["start_using_url"];
115
+ }
116
+
117
+ // directories
118
+ $this->wd_dir = dirname( $this->plugin_main_file ) . '/wd';
119
+ $this->wd_dir_includes = $this->wd_dir . '/includes';
120
+ $this->wd_dir_templates = $this->wd_dir . '/templates';
121
+ $this->wd_dir_assets = $this->wd_dir . '/assets';
122
+ $this->wd_url_css = plugins_url( plugin_basename( $this->wd_dir ) ) . '/assets/css';
123
+ $this->wd_url_js = plugins_url( plugin_basename( $this->wd_dir ) ) . '/assets/js';
124
+ $this->wd_url_img = plugins_url( plugin_basename( $this->wd_dir ) ) . '/assets/img';
125
+ }
126
+
127
+
128
+ }
129
+
130
+
131
+
wd/includes/api.php CHANGED
@@ -1,81 +1,81 @@
1
- <?php
2
- if ( !defined( 'ABSPATH' ) ) {
3
- exit;
4
- }
5
-
6
- class DoradoWebApi{
7
- ////////////////////////////////////////////////////////////////////////////////////////
8
- // Events //
9
- ////////////////////////////////////////////////////////////////////////////////////////
10
- ////////////////////////////////////////////////////////////////////////////////////////
11
- // Constants //
12
- ////////////////////////////////////////////////////////////////////////////////////////
13
- ////////////////////////////////////////////////////////////////////////////////////////
14
- // Variables //
15
- ////////////////////////////////////////////////////////////////////////////////////////
16
-
17
- public $config ;
18
- public $userhash = array();
19
-
20
-
21
- ////////////////////////////////////////////////////////////////////////////////////////
22
- // Constructor & Destructor //
23
- ////////////////////////////////////////////////////////////////////////////////////////
24
- public function __construct( $config = array() ) {
25
- $this->config = $config;
26
- $this->userhash = $this->get_userhash();
27
- }
28
- ////////////////////////////////////////////////////////////////////////////////////////
29
- // Public Methods //
30
- ////////////////////////////////////////////////////////////////////////////////////////
31
-
32
-
33
- public function get_remote_data( $id ) {
34
- $remote_data_path = DORADO_WEB_API_PLUGIN_DATA_PATH . '/' . $this->userhash;
35
- $request = wp_remote_get( ( str_replace( '_id_', $id, $remote_data_path ) ) );
36
-
37
- if ( !is_wp_error($request) || wp_remote_retrieve_response_code($request) === 200 ) {
38
- return json_decode($request['body'], true);
39
- }
40
- return false;
41
- }
42
-
43
-
44
- public function get_userhash(){
45
- $wd_options = $this->config;
46
- $userhash = 'nohash';
47
- if ( file_exists( $wd_options->plugin_dir . '/.keep') && is_readable( $wd_options->plugin_dir . '/.keep' ) ) {
48
- $f = fopen( $wd_options->plugin_dir . '/.keep', 'r' );
49
- $userhash = fgets( $f );
50
- fclose( $f );
51
- }
52
- return $userhash;
53
- }
54
-
55
- public function get_hash(){
56
- $response = wp_remote_get("https://api.web-dorado.com/hash/" . $_SERVER['REMOTE_ADDR'] . "/" . $_SERVER['HTTP_HOST']);
57
-
58
- $response_body = ( !is_wp_error($response) && isset($response["body"])) ? json_decode($response["body"], true) : null;
59
-
60
- if(is_array($response_body)){
61
- $hash = $response_body["body"]["hash"];
62
- }
63
- else{
64
- $hash = null;
65
- }
66
-
67
- return $hash;
68
- }
69
-
70
-
71
- ////////////////////////////////////////////////////////////////////////////////////////
72
- // Getters & Setters //
73
- ////////////////////////////////////////////////////////////////////////////////////////
74
- ////////////////////////////////////////////////////////////////////////////////////////
75
- // Private Methods //
76
- ////////////////////////////////////////////////////////////////////////////////////////
77
- ////////////////////////////////////////////////////////////////////////////////////////
78
- // Listeners //
79
- ////////////////////////////////////////////////////////////////////////////////////////
80
-
81
  }
1
+ <?php
2
+ if ( !defined( 'ABSPATH' ) ) {
3
+ exit;
4
+ }
5
+
6
+ class DoradoWebApi{
7
+ ////////////////////////////////////////////////////////////////////////////////////////
8
+ // Events //
9
+ ////////////////////////////////////////////////////////////////////////////////////////
10
+ ////////////////////////////////////////////////////////////////////////////////////////
11
+ // Constants //
12
+ ////////////////////////////////////////////////////////////////////////////////////////
13
+ ////////////////////////////////////////////////////////////////////////////////////////
14
+ // Variables //
15
+ ////////////////////////////////////////////////////////////////////////////////////////
16
+
17
+ public $config ;
18
+ public $userhash = array();
19
+
20
+
21
+ ////////////////////////////////////////////////////////////////////////////////////////
22
+ // Constructor & Destructor //
23
+ ////////////////////////////////////////////////////////////////////////////////////////
24
+ public function __construct( $config = array() ) {
25
+ $this->config = $config;
26
+ $this->userhash = $this->get_userhash();
27
+ }
28
+ ////////////////////////////////////////////////////////////////////////////////////////
29
+ // Public Methods //
30
+ ////////////////////////////////////////////////////////////////////////////////////////
31
+
32
+
33
+ public function get_remote_data( $id ) {
34
+ $remote_data_path = DORADO_WEB_API_PLUGIN_DATA_PATH . '/' . $this->userhash;
35
+ $request = wp_remote_get( ( str_replace( '_id_', $id, $remote_data_path ) ) );
36
+
37
+ if ( !is_wp_error($request) || wp_remote_retrieve_response_code($request) === 200 ) {
38
+ return json_decode($request['body'], true);
39
+ }
40
+ return false;
41
+ }
42
+
43
+
44
+ public function get_userhash(){
45
+ $wd_options = $this->config;
46
+ $userhash = 'nohash';
47
+ if ( file_exists( $wd_options->plugin_dir . '/.keep') && is_readable( $wd_options->plugin_dir . '/.keep' ) ) {
48
+ $f = fopen( $wd_options->plugin_dir . '/.keep', 'r' );
49
+ $userhash = fgets( $f );
50
+ fclose( $f );
51
+ }
52
+ return $userhash;
53
+ }
54
+
55
+ public function get_hash(){
56
+ $response = wp_remote_get("https://api.web-dorado.com/hash/" . $_SERVER['REMOTE_ADDR'] . "/" . $_SERVER['HTTP_HOST']);
57
+
58
+ $response_body = ( !is_wp_error($response) && isset($response["body"])) ? json_decode($response["body"], true) : null;
59
+
60
+ if(is_array($response_body)){
61
+ $hash = $response_body["body"]["hash"];
62
+ }
63
+ else{
64
+ $hash = null;
65
+ }
66
+
67
+ return $hash;
68
+ }
69
+
70
+
71
+ ////////////////////////////////////////////////////////////////////////////////////////
72
+ // Getters & Setters //
73
+ ////////////////////////////////////////////////////////////////////////////////////////
74
+ ////////////////////////////////////////////////////////////////////////////////////////
75
+ // Private Methods //
76
+ ////////////////////////////////////////////////////////////////////////////////////////
77
+ ////////////////////////////////////////////////////////////////////////////////////////
78
+ // Listeners //
79
+ ////////////////////////////////////////////////////////////////////////////////////////
80
+
81
  }
wd/includes/deactivate.php CHANGED
@@ -1,179 +1,179 @@
1
- <?php
2
- if ( ! defined( 'ABSPATH' ) ) {
3
- exit;
4
- }
5
-
6
- class DoradoWebDeactivate{
7
- ////////////////////////////////////////////////////////////////////////////////////////
8
- // Events //
9
- ////////////////////////////////////////////////////////////////////////////////////////
10
- ////////////////////////////////////////////////////////////////////////////////////////
11
- // Constants //
12
- ////////////////////////////////////////////////////////////////////////////////////////
13
- ////////////////////////////////////////////////////////////////////////////////////////
14
- // Variables //
15
- ////////////////////////////////////////////////////////////////////////////////////////
16
- public $deactivate_reasons = array();
17
- public $config;
18
- // Reason IDs
19
- const REASON_PLUGIN_IS_HARD_TO_USE_TECHNICAL_PROBLEMS = "reason_plugin_is_hard_to_use_technical_problems";
20
- const REASON_FREE_VERSION_IS_LIMITED = "reason_free_version_limited";
21
- const REASON_PRO_EXPENSIVE = "reason_premium_expensive";
22
- const REASON_UPGRADING_TO_PAID_VERSION = "reason_upgrading_to_paid_version";
23
- const REASON_TEMPORARY_DEACTIVATION = "reason_temporary_deactivation";
24
-
25
- ////////////////////////////////////////////////////////////////////////////////////////
26
- // Constructor & Destructor //
27
- ////////////////////////////////////////////////////////////////////////////////////////
28
- public function __construct( $config = array() ) {
29
- $this->config = $config;
30
- $wd_options = $this->config;
31
-
32
- $this->deactivate_reasons = array(
33
- 1 => array(
34
- 'id' => self::REASON_PLUGIN_IS_HARD_TO_USE_TECHNICAL_PROBLEMS,
35
- 'text' => __( 'Technical problems / hard to use', $wd_options->prefix ),
36
- ),
37
- 2 => array(
38
- 'id' => self::REASON_FREE_VERSION_IS_LIMITED,
39
- 'text' => __( 'Free version is limited', $wd_options->prefix ),
40
- ),
41
- 3 => array(
42
- 'id' => self::REASON_PRO_EXPENSIVE,
43
- 'text' => __( 'Premium is expensive', $wd_options->prefix ),
44
- ),
45
- 4 => array(
46
- 'id' => self::REASON_UPGRADING_TO_PAID_VERSION,
47
- 'text' => __( 'Upgrading to paid version', $wd_options->prefix ),
48
- ),
49
- 5 => array(
50
- 'id' => self::REASON_TEMPORARY_DEACTIVATION,
51
- 'text' => __( 'Temporary deactivation', $wd_options->prefix ),
52
- ),
53
- );
54
-
55
- add_action( 'admin_footer', array( $this, 'add_deactivation_feedback_dialog_box' ) );
56
- add_action( 'admin_init', array( $this, 'submit_and_deactivate' ) );
57
-
58
-
59
- add_action( 'admin_enqueue_scripts', array( $this, 'scripts' ) );
60
-
61
-
62
-
63
-
64
- }
65
- ////////////////////////////////////////////////////////////////////////////////////////
66
- // Public Methods //
67
- ////////////////////////////////////////////////////////////////////////////////////////
68
- public function add_deactivation_feedback_dialog_box(){
69
- $deactivate_reasons = $this->deactivate_reasons;
70
- $wd_options = $this->config;
71
-
72
- ?>
73
- <script>
74
- jQuery(document).ready(function () {
75
- wdReady("<?php echo $wd_options->prefix; ?>");
76
- });
77
- </script>
78
- <?php
79
-
80
- $deactivate_url =
81
- add_query_arg(
82
- array(
83
- 'action' => 'deactivate',
84
- 'plugin' => plugin_basename( $wd_options->plugin_main_file ),
85
- '_wpnonce' => wp_create_nonce( 'deactivate-plugin_' . plugin_basename( $wd_options->plugin_main_file ) )
86
- ),
87
- admin_url( 'plugins.php' )
88
- );
89
-
90
- require ( $wd_options->wd_dir_templates . '/display_deactivation_popup.php' );
91
- }
92
-
93
-
94
-
95
- public function scripts(){
96
- $wd_options = $this->config;
97
- wp_enqueue_style( 'wd-deactivate-popup', $wd_options->wd_url_css . '/deactivate_popup.css', array(), get_option($wd_options->prefix . "_version" ) );
98
- wp_enqueue_script( 'wd-deactivate-popup', $wd_options->wd_url_js . '/deactivate_popup.js', array(), get_option($wd_options->prefix . "_version" ));
99
-
100
- $admin_data = wp_get_current_user();
101
- wp_localize_script( 'wd-deactivate-popup', $wd_options->prefix . 'WDDeactivateVars' , array(
102
- "prefix" => $wd_options->prefix ,
103
- "deactivate_class" => $wd_options->prefix . '_deactivate_link',
104
- "email" => $admin_data->data->user_email,
105
- "plugin_wd_url" => $wd_options->plugin_wd_url,
106
- ));
107
-
108
-
109
- }
110
- public function submit_and_deactivate(){
111
- $wd_options = $this->config;
112
- if( isset( $_POST[$wd_options->prefix . "_submit_and_deactivate"] ) ){
113
-
114
- if( $_POST[$wd_options->prefix . "_submit_and_deactivate"] == 2 || $_POST[$wd_options->prefix . "_submit_and_deactivate"] == 3 ){
115
- $api = new DoradoWebApi( $wd_options );
116
- $hash = $api->get_hash();
117
- if($hash != null){
118
- $data = array();
119
-
120
- $data["reason"] = isset($_POST[$wd_options->prefix . "_reasons"]) ? $_POST[$wd_options->prefix . "_reasons"] : "";
121
- $data["site_url"] = site_url();
122
- $data["plugin_id"] = $wd_options->wd_plugin_id;
123
-
124
- $data["additional_details"] = isset($_POST[$wd_options->prefix . "_additional_details"]) ? $_POST[$wd_options->prefix . "_additional_details"] : "";
125
- $admin_data = wp_get_current_user();
126
- $data["email"] = isset($_POST[$wd_options->prefix . "_email"]) ? $_POST[$wd_options->prefix . "_email"] : $admin_data->data->user_email;
127
- $user_first_name = get_user_meta( $admin_data->ID, "first_name", true );
128
- $user_last_name = get_user_meta( $admin_data->ID, "last_name", true );
129
-
130
- $data["name"] = $user_first_name || $user_last_name ? $user_first_name . " " . $user_last_name : $admin_data->data->user_login;
131
- $data["hash"] = $hash;
132
- $response = wp_remote_post( "https://api.web-dorado.com/deactivatereasons", array(
133
- 'method' => 'POST',
134
- 'timeout' => 45,
135
- 'redirection' => 5,
136
- 'httpversion' => '1.0',
137
- 'blocking' => true,
138
- 'headers' => array(),
139
- 'body' => json_encode($data),
140
- 'cookies' => array()
141
- )
142
- );
143
-
144
- $response_body = (!is_wp_error($response) && isset( $response["body"] )) ? json_decode( $response["body"], true ) : null;
145
- if( is_array( $response_body ) && $response_body["body"]["msg"] == "Access" ) {
146
-
147
- }
148
- }
149
- }
150
- if($_POST[$wd_options->prefix . "_submit_and_deactivate"] == 2 || $_POST[$wd_options->prefix . "_submit_and_deactivate"] == 1 ){
151
- $deactivate_url =
152
- add_query_arg(
153
- array(
154
- 'action' => 'deactivate',
155
- 'plugin' => plugin_basename( $wd_options->plugin_main_file ),
156
- '_wpnonce' => wp_create_nonce( 'deactivate-plugin_' . plugin_basename( $wd_options->plugin_main_file ) )
157
- ),
158
- admin_url( 'plugins.php' )
159
- );
160
- echo '<script>window.location.href="' . $deactivate_url . '";</script>';
161
- }
162
-
163
- }
164
- }
165
-
166
- ////////////////////////////////////////////////////////////////////////////////////////
167
- // Getters & Setters //
168
- ////////////////////////////////////////////////////////////////////////////////////////
169
- ////////////////////////////////////////////////////////////////////////////////////////
170
- // Private Methods //
171
- ////////////////////////////////////////////////////////////////////////////////////////
172
-
173
- ////////////////////////////////////////////////////////////////////////////////////////
174
- // Listeners //
175
- ////////////////////////////////////////////////////////////////////////////////////////
176
-
177
- }
178
-
179
-
1
+ <?php
2
+ if ( ! defined( 'ABSPATH' ) ) {
3
+ exit;
4
+ }
5
+
6
+ class DoradoWebDeactivate{
7
+ ////////////////////////////////////////////////////////////////////////////////////////
8
+ // Events //
9
+ ////////////////////////////////////////////////////////////////////////////////////////
10
+ ////////////////////////////////////////////////////////////////////////////////////////
11
+ // Constants //
12
+ ////////////////////////////////////////////////////////////////////////////////////////
13
+ ////////////////////////////////////////////////////////////////////////////////////////
14
+ // Variables //
15
+ ////////////////////////////////////////////////////////////////////////////////////////
16
+ public $deactivate_reasons = array();
17
+ public $config;
18
+ // Reason IDs
19
+ const REASON_PLUGIN_IS_HARD_TO_USE_TECHNICAL_PROBLEMS = "reason_plugin_is_hard_to_use_technical_problems";
20
+ const REASON_FREE_VERSION_IS_LIMITED = "reason_free_version_limited";
21
+ const REASON_PRO_EXPENSIVE = "reason_premium_expensive";
22
+ const REASON_UPGRADING_TO_PAID_VERSION = "reason_upgrading_to_paid_version";
23
+ const REASON_TEMPORARY_DEACTIVATION = "reason_temporary_deactivation";
24
+
25
+ ////////////////////////////////////////////////////////////////////////////////////////
26
+ // Constructor & Destructor //
27
+ ////////////////////////////////////////////////////////////////////////////////////////
28
+ public function __construct( $config = array() ) {
29
+ $this->config = $config;
30
+ $wd_options = $this->config;
31
+
32
+ $this->deactivate_reasons = array(
33
+ 1 => array(
34
+ 'id' => self::REASON_PLUGIN_IS_HARD_TO_USE_TECHNICAL_PROBLEMS,
35
+ 'text' => __( 'Technical problems / hard to use', $wd_options->prefix ),
36
+ ),
37
+ 2 => array(
38
+ 'id' => self::REASON_FREE_VERSION_IS_LIMITED,
39
+ 'text' => __( 'Free version is limited', $wd_options->prefix ),
40
+ ),
41
+ 3 => array(
42
+ 'id' => self::REASON_PRO_EXPENSIVE,
43
+ 'text' => __( 'Premium is expensive', $wd_options->prefix ),
44
+ ),
45
+ 4 => array(
46
+ 'id' => self::REASON_UPGRADING_TO_PAID_VERSION,
47
+ 'text' => __( 'Upgrading to paid version', $wd_options->prefix ),
48
+ ),
49
+ 5 => array(
50
+ 'id' => self::REASON_TEMPORARY_DEACTIVATION,
51
+ 'text' => __( 'Temporary deactivation', $wd_options->prefix ),
52
+ ),
53
+ );
54
+
55
+ add_action( 'admin_footer', array( $this, 'add_deactivation_feedback_dialog_box' ) );
56
+ add_action( 'admin_init', array( $this, 'submit_and_deactivate' ) );
57
+
58
+
59
+ add_action( 'admin_enqueue_scripts', array( $this, 'scripts' ) );
60
+
61
+
62
+
63
+
64
+ }
65
+ ////////////////////////////////////////////////////////////////////////////////////////
66
+ // Public Methods //
67
+ ////////////////////////////////////////////////////////////////////////////////////////
68
+ public function add_deactivation_feedback_dialog_box(){
69
+ $deactivate_reasons = $this->deactivate_reasons;
70
+ $wd_options = $this->config;
71
+
72
+ ?>
73
+ <script>
74
+ jQuery(document).ready(function () {
75
+ wdReady("<?php echo $wd_options->prefix; ?>");
76
+ });
77
+ </script>
78
+ <?php
79
+
80
+ $deactivate_url =
81
+ add_query_arg(
82
+ array(
83
+ 'action' => 'deactivate',
84
+ 'plugin' => plugin_basename( $wd_options->plugin_main_file ),
85
+ '_wpnonce' => wp_create_nonce( 'deactivate-plugin_' . plugin_basename( $wd_options->plugin_main_file ) )
86
+ ),
87
+ admin_url( 'plugins.php' )
88
+ );
89
+
90
+ require ( $wd_options->wd_dir_templates . '/display_deactivation_popup.php' );
91
+ }
92
+
93
+
94
+
95
+ public function scripts(){
96
+ $wd_options = $this->config;
97
+ wp_enqueue_style( 'wd-deactivate-popup', $wd_options->wd_url_css . '/deactivate_popup.css', array(), get_option($wd_options->prefix . "_version" ) );
98
+ wp_enqueue_script( 'wd-deactivate-popup', $wd_options->wd_url_js . '/deactivate_popup.js', array(), get_option($wd_options->prefix . "_version" ));
99
+
100
+ $admin_data = wp_get_current_user();
101
+ wp_localize_script( 'wd-deactivate-popup', $wd_options->prefix . 'WDDeactivateVars' , array(
102
+ "prefix" => $wd_options->prefix ,
103
+ "deactivate_class" => $wd_options->prefix . '_deactivate_link',
104
+ "email" => $admin_data->data->user_email,
105
+ "plugin_wd_url" => $wd_options->plugin_wd_url,
106
+ ));
107
+
108
+
109
+ }
110
+ public function submit_and_deactivate(){
111
+ $wd_options = $this->config;
112
+ if( isset( $_POST[$wd_options->prefix . "_submit_and_deactivate"] ) ){
113
+
114
+ if( $_POST[$wd_options->prefix . "_submit_and_deactivate"] == 2 || $_POST[$wd_options->prefix . "_submit_and_deactivate"] == 3 ){
115
+ $api = new DoradoWebApi( $wd_options );
116
+ $hash = $api->get_hash();
117
+ if($hash != null){
118
+ $data = array();
119
+
120
+ $data["reason"] = isset($_POST[$wd_options->prefix . "_reasons"]) ? $_POST[$wd_options->prefix . "_reasons"] : "";
121
+ $data["site_url"] = site_url();
122
+ $data["plugin_id"] = $wd_options->wd_plugin_id;
123
+
124
+ $data["additional_details"] = isset($_POST[$wd_options->prefix . "_additional_details"]) ? $_POST[$wd_options->prefix . "_additional_details"] : "";
125
+ $admin_data = wp_get_current_user();
126
+ $data["email"] = isset($_POST[$wd_options->prefix . "_email"]) ? $_POST[$wd_options->prefix . "_email"] : $admin_data->data->user_email;
127
+ $user_first_name = get_user_meta( $admin_data->ID, "first_name", true );
128
+ $user_last_name = get_user_meta( $admin_data->ID, "last_name", true );
129
+
130
+ $data["name"] = $user_first_name || $user_last_name ? $user_first_name . " " . $user_last_name : $admin_data->data->user_login;
131
+ $data["hash"] = $hash;
132
+ $response = wp_remote_post( "https://api.web-dorado.com/deactivatereasons", array(
133
+ 'method' => 'POST',
134
+ 'timeout' => 45,
135
+ 'redirection' => 5,
136
+ 'httpversion' => '1.0',
137
+ 'blocking' => true,
138
+ 'headers' => array(),
139
+ 'body' => json_encode($data),
140
+ 'cookies' => array()
141
+ )
142
+ );
143
+
144
+ $response_body = (!is_wp_error($response) && isset( $response["body"] )) ? json_decode( $response["body"], true ) : null;
145
+ if( is_array( $response_body ) && $response_body["body"]["msg"] == "Access" ) {
146
+
147
+ }
148
+ }
149
+ }
150
+ if($_POST[$wd_options->prefix . "_submit_and_deactivate"] == 2 || $_POST[$wd_options->prefix . "_submit_and_deactivate"] == 1 ){
151
+ $deactivate_url =
152
+ add_query_arg(
153
+ array(
154
+ 'action' => 'deactivate',
155
+ 'plugin' => plugin_basename( $wd_options->plugin_main_file ),
156
+ '_wpnonce' => wp_create_nonce( 'deactivate-plugin_' . plugin_basename( $wd_options->plugin_main_file ) )
157
+ ),
158
+ admin_url( 'plugins.php' )
159
+ );
160
+ echo '<script>window.location.href="' . $deactivate_url . '";</script>';
161
+ }
162
+
163
+ }
164
+ }
165
+
166
+ ////////////////////////////////////////////////////////////////////////////////////////
167
+ // Getters & Setters //
168
+ ////////////////////////////////////////////////////////////////////////////////////////
169
+ ////////////////////////////////////////////////////////////////////////////////////////
170
+ // Private Methods //
171
+ ////////////////////////////////////////////////////////////////////////////////////////
172
+
173
+ ////////////////////////////////////////////////////////////////////////////////////////
174
+ // Listeners //
175
+ ////////////////////////////////////////////////////////////////////////////////////////
176
+
177
+ }
178
+
179
+
wd/includes/notices.php CHANGED
@@ -1,223 +1,223 @@
1
- <?php
2
- if ( !defined( 'ABSPATH' ) ) {
3
- exit;
4
- }
5
-
6
- class DoradoWebNotices {
7
-
8
- protected $promo_link = '';
9
-
10
- public $config;
11
- public $notice_spam = 0;
12
- public $notice_spam_max = 2;
13
-
14
- // Basic actions to run
15
- public function __construct( $config = array() ) {
16
- $this->config = $config;
17
- // Runs the admin notice ignore function incase a dismiss button has been clicked
18
- add_action( 'admin_init', array( $this, 'admin_notice_ignore' ) );
19
- // Runs the admin notice temp ignore function incase a temp dismiss link has been clicked
20
- add_action( 'admin_init', array( $this, 'admin_notice_temp_ignore' ) );
21
- add_action( 'admin_notices', array( $this, 'wd_admin_notices' ) );
22
- }
23
-
24
- // Checks to ensure notices aren't disabled and the user has the correct permissions.
25
- public function wd_admin_notice() {
26
- $wd_options = $this->config;
27
- $settings = get_option($wd_options->prefix . '_admin_notice');
28
- if ( !isset( $settings['disable_admin_notices'] ) || ( isset( $settings['disable_admin_notices'] ) && $settings['disable_admin_notices'] == 0 ) ) {
29
- if ( current_user_can( 'manage_options' ) ) {
30
- return true;
31
- }
32
- }
33
- return false;
34
- }
35
-
36
- // Primary notice function that can be called from an outside function sending necessary variables
37
- public function admin_notice( $admin_notices ) {
38
- $wd_options = $this->config;
39
- // Check options
40
- if ( !$this->wd_admin_notice() ) {
41
- return false;
42
- }
43
- foreach ( $admin_notices as $slug => $admin_notice ) {
44
- // Call for spam protection
45
- if ( $this->anti_notice_spam() ) {
46
- return false;
47
- }
48
-
49
- // Check for proper page to display on
50
- if (isset( $admin_notices[$slug]['pages']) && is_array( $admin_notices[$slug]['pages'])) {
51
- if ( !$this->admin_notice_pages( $admin_notices[$slug]['pages'] ) ) {
52
- return false;
53
- }
54
- }
55
-
56
- // Check for required fields
57
- if ( !$this->required_fields( $admin_notices[$slug] ) ) {
58
-
59
- // Get the current date then set start date to either passed value or current date value and add interval
60
- $current_date = current_time( "n/j/Y" );
61
- $start = ( isset( $admin_notices[$slug]['start'] ) ? $admin_notices[$slug]['start'] : $current_date );
62
- $start = date( "n/j/Y", strtotime( $start ) );
63
- $date_array = explode( '/', $start );
64
- $interval = ( isset( $admin_notices[$slug]['int'] ) ? $admin_notices[$slug]['int'] : 0 );
65
-
66
- $date_array[1] += $interval;
67
- $start = date( "n/j/Y", mktime( 0, 0, 0, $date_array[0], $date_array[1], $date_array[2] ) );
68
-
69
- // This is the main notices storage option
70
- $admin_notices_option = get_option( $wd_options->prefix . '_admin_notice', array() );
71
- // Check if the message is already stored and if so just grab the key otherwise store the message and its associated date information
72
- if ( !array_key_exists( $slug, $admin_notices_option ) ) {
73
- $admin_notices_option[$slug]['start'] = $start;
74
- $admin_notices_option[$slug]['int'] = $interval;
75
- update_option( $wd_options->prefix . '_admin_notice', $admin_notices_option );
76
- }
77
-
78
- // Sanity check to ensure we have accurate information
79
- // New date information will not overwrite old date information
80
- $admin_display_check = ( isset( $admin_notices_option[$slug]['dismissed'] ) ? $admin_notices_option[$slug]['dismissed'] : 0 );
81
- $admin_display_start = ( isset( $admin_notices_option[$slug]['start'] ) ? $admin_notices_option[$slug]['start'] : $start );
82
- $admin_display_interval = ( isset($admin_notices_option[$slug]['int'] ) ? $admin_notices_option[$slug]['int'] : $interval );
83
- $admin_display_msg = ( isset($admin_notices[$slug]['msg'] ) ? $admin_notices[$slug]['msg'] : '' );
84
- $admin_display_title = ( isset($admin_notices[$slug]['title'] ) ? $admin_notices[$slug]['title'] : '' );
85
- $admin_display_link = ( isset( $admin_notices[$slug]['link'] ) ? $admin_notices[$slug]['link'] : '' );
86
- $output_css = false;
87
-
88
- // Ensure the notice hasn't been hidden and that the current date is after the start date
89
- if ( $admin_display_check == 0 && strtotime($admin_display_start) <= strtotime($current_date ) ) {
90
-
91
- // Get remaining query string
92
- $query_str = ( isset( $admin_notices[$slug]['later_link'] ) ? $admin_notices[$slug]['later_link'] : esc_url(add_query_arg( $wd_options->prefix . '_admin_notice_ignore', $slug ) ) );
93
- if ( strpos($slug, 'promo' ) === FALSE ) {
94
- // Admin notice display output
95
- echo '<div class="update-nag wd-admin-notice">
96
- <div class="wd-notice-logo" style="background-image: url(' . $wd_options->wd_url_img . '/' . $wd_options->prefix . '_main_plugin.png);"></div>
97
- <p class="wd-notice-title">' . $admin_display_title . '</p>
98
- <p class="wd-notice-body">' . $admin_display_msg . '</p>
99
- <ul class="wd-notice-body wd-blue">' . $admin_display_link . '</ul>
100
- <a href="' . $query_str . '" class="dashicons dashicons-dismiss"></a>
101
- </div>';
102
- }
103
- else {
104
- echo '<div class="admin-notice-promo">';
105
- echo $admin_display_msg;
106
- echo '<ul class="notice-body-promo blue">
107
- ' . $admin_display_link . '
108
- </ul>';
109
- echo '<a href="' . $query_str . '" class="dashicons dashicons-dismiss close-promo"></a>';
110
- echo '</div>';
111
- }
112
- $this->notice_spam += 1;
113
- $output_css = true;
114
- }
115
- if ( $output_css ) {
116
- wp_enqueue_style( $wd_options->prefix . '-admin-notices', $wd_options->wd_url_css . '/notices.css', array(), get_option($wd_options->prefix . "_version" ) );
117
- }
118
- }
119
- }
120
- }
121
-
122
- // Spam protection check
123
- public function anti_notice_spam() {
124
- if ( $this->notice_spam >= $this->notice_spam_max ) {
125
- return true;
126
- }
127
- return false;
128
- }
129
-
130
- // Ignore function that gets ran at admin init to ensure any messages that were dismissed get marked
131
- public function admin_notice_ignore() {
132
- $wd_options = $this->config;
133
- // If user clicks to ignore the notice, update the option to not show it again
134
- if ( isset( $_GET[$wd_options->prefix . '_admin_notice_ignore'] ) ) {
135
- $admin_notices_option = get_option( $wd_options->prefix . '_admin_notice', array() );
136
- $admin_notices_option[$_GET[$wd_options->prefix . '_admin_notice_ignore']]['dismissed'] = 1;
137
- update_option( $wd_options->prefix . '_admin_notice', $admin_notices_option );
138
- $query_str = remove_query_arg( $wd_options->prefix . '_admin_notice_ignore' );
139
- wp_redirect( $query_str );
140
- exit;
141
- }
142
- }
143
-
144
- // Temp Ignore function that gets ran at admin init to ensure any messages that were temp dismissed get their start date changed
145
- public function admin_notice_temp_ignore() {
146
- $wd_options = $this->config;
147
- // If user clicks to temp ignore the notice, update the option to change the start date - default interval of 14 days
148
- if ( isset( $_GET[$wd_options->prefix . '_admin_notice_temp_ignore'] ) ) {
149
- $admin_notices_option = get_option( $wd_options->prefix . '_admin_notice', array() );
150
- $current_date = current_time( "n/j/Y" );
151
- $date_array = explode( '/', $current_date );
152
- $interval = (isset($_GET['wd_int']) ? $_GET['wd_int'] : 14);
153
- $date_array[1] += $interval;
154
- $new_start = date( "n/j/Y", mktime( 0, 0, 0, $date_array[0], $date_array[1], $date_array[2] ) );
155
-
156
- $admin_notices_option[$_GET[$wd_options->prefix . '_admin_notice_temp_ignore']]['start'] = $new_start;
157
- $admin_notices_option[$_GET[$wd_options->prefix . '_admin_notice_temp_ignore']]['dismissed'] = 0;
158
- update_option( $wd_options->prefix . '_admin_notice', $admin_notices_option );
159
- $query_str = remove_query_arg( array( $wd_options->prefix . '_admin_notice_temp_ignore', 'wd_int' ) );
160
- wp_redirect( $query_str );
161
- exit;
162
- }
163
- }
164
-
165
- public function admin_notice_pages($pages) {
166
- $wd_options = $this->config;
167
- foreach ( $pages as $key => $page ) {
168
- if (is_array($page)) {
169
- if ( isset( $_GET['page'] ) && $_GET['page'] == $page[0] && isset($_GET['tab']) && $_GET['tab'] == $page[1] ) {
170
- return true;
171
- }
172
- }
173
- else {
174
- if ( $page == 'all' ) {
175
- return true;
176
- }
177
- if ( get_current_screen()->id === $page ) {
178
- return true;
179
- }
180
- if ( isset($_GET['page']) && $_GET['page'] == $page ) {
181
- return true;
182
- }
183
- }
184
- return false;
185
- }
186
- }
187
-
188
- // Required fields check
189
- public function required_fields( $fields ) {
190
- if ( !isset( $fields['msg'] ) || ( isset($fields['msg'] ) && empty( $fields['msg'] ) ) ) {
191
- return true;
192
- }
193
- if ( !isset( $fields['title'] ) || ( isset( $fields['title'] ) && empty( $fields['title'] ) ) ) {
194
- return true;
195
- }
196
- return false;
197
- }
198
-
199
- // Special parameters function that is to be used in any extension of this class
200
- public function special_parameters($admin_notices) {
201
- // Intentionally left blank
202
- }
203
-
204
- public function wd_admin_notices() {
205
- $wd_options = $this->config;
206
- $two_week_review_ignore = add_query_arg( array( $wd_options->prefix . '_admin_notice_ignore' => 'two_week_review' ) );
207
- $two_week_review_temp = add_query_arg( array( $wd_options->prefix . '_admin_notice_temp_ignore' => 'two_week_review', 'int' => 14 ) );
208
- $promo_close = add_query_arg( array( $wd_options->prefix . '_admin_notice_ignore' => 'ecommerce_promo' ) );
209
-
210
- $notices['two_week_review'] = array(
211
- 'title' => __('Leave A Review?', $wd_options->prefix),
212
- 'msg' => sprintf(__('We hope you\'ve enjoyed using WordPress %s! Would you consider leaving us a review on WordPress.org?', $wd_options->prefix), $wd_options->plugin_title),
213
- 'link' => '<li><span class="dashicons dashicons-external"></span><a href="https://wordpress.org/support/plugin/' . $wd_options->plugin_wordpress_slug . '/reviews?filter=5&rate=5#new-post" target="_blank">' . __('Sure! I\'d love to!', $wd_options->prefix) . '</a></li>
214
- <li><span class="dashicons dashicons-smiley"></span><a href="' . $two_week_review_ignore . '"> ' . __('I\'ve already left a review', $wd_options->prefix) . '</a></li>
215
- <li><span class="dashicons dashicons-calendar-alt"></span><a href="' . $two_week_review_temp . '">' . __('Maybe Later', $wd_options->prefix) . '</a></li>
216
- <li><span class="dashicons dashicons-dismiss"></span><a href="' . $two_week_review_ignore . '">' . __('Never show again', $wd_options->prefix) . '</a></li>',
217
- 'later_link' => $two_week_review_temp,
218
- 'int' => 14
219
- );
220
-
221
- $this->admin_notice($notices);
222
- }
223
- }
1
+ <?php
2
+ if ( !defined( 'ABSPATH' ) ) {
3
+ exit;
4
+ }
5
+
6
+ class DoradoWebNotices {
7
+
8
+ protected $promo_link = '';
9
+
10
+ public $config;
11
+ public $notice_spam = 0;
12
+ public $notice_spam_max = 2;
13
+
14
+ // Basic actions to run
15
+ public function __construct( $config = array() ) {
16
+ $this->config = $config;
17
+ // Runs the admin notice ignore function incase a dismiss button has been clicked
18
+ add_action( 'admin_init', array( $this, 'admin_notice_ignore' ) );
19
+ // Runs the admin notice temp ignore function incase a temp dismiss link has been clicked
20
+ add_action( 'admin_init', array( $this, 'admin_notice_temp_ignore' ) );
21
+ add_action( 'admin_notices', array( $this, 'wd_admin_notices' ) );
22
+ }
23
+
24
+ // Checks to ensure notices aren't disabled and the user has the correct permissions.
25
+ public function wd_admin_notice() {
26
+ $wd_options = $this->config;
27
+ $settings = get_option($wd_options->prefix . '_admin_notice');
28
+ if ( !isset( $settings['disable_admin_notices'] ) || ( isset( $settings['disable_admin_notices'] ) && $settings['disable_admin_notices'] == 0 ) ) {
29
+ if ( current_user_can( 'manage_options' ) ) {
30
+ return true;
31
+ }
32
+ }
33
+ return false;
34
+ }
35
+
36
+ // Primary notice function that can be called from an outside function sending necessary variables
37
+ public function admin_notice( $admin_notices ) {
38
+ $wd_options = $this->config;
39
+ // Check options
40
+ if ( !$this->wd_admin_notice() ) {
41
+ return false;
42
+ }
43
+ foreach ( $admin_notices as $slug => $admin_notice ) {
44
+ // Call for spam protection
45
+ if ( $this->anti_notice_spam() ) {
46
+ return false;
47
+ }
48
+
49
+ // Check for proper page to display on
50
+ if (isset( $admin_notices[$slug]['pages']) && is_array( $admin_notices[$slug]['pages'])) {
51
+ if ( !$this->admin_notice_pages( $admin_notices[$slug]['pages'] ) ) {
52
+ return false;
53
+ }
54
+ }
55
+
56
+ // Check for required fields
57
+ if ( !$this->required_fields( $admin_notices[$slug] ) ) {
58
+
59
+ // Get the current date then set start date to either passed value or current date value and add interval
60
+ $current_date = current_time( "n/j/Y" );
61
+ $start = ( isset( $admin_notices[$slug]['start'] ) ? $admin_notices[$slug]['start'] : $current_date );
62
+ $start = date( "n/j/Y", strtotime( $start ) );
63
+ $date_array = explode( '/', $start );
64
+ $interval = ( isset( $admin_notices[$slug]['int'] ) ? $admin_notices[$slug]['int'] : 0 );
65
+
66
+ $date_array[1] += $interval;
67
+ $start = date( "n/j/Y", mktime( 0, 0, 0, $date_array[0], $date_array[1], $date_array[2] ) );
68
+
69
+ // This is the main notices storage option
70
+ $admin_notices_option = get_option( $wd_options->prefix . '_admin_notice', array() );
71
+ // Check if the message is already stored and if so just grab the key otherwise store the message and its associated date information
72
+ if ( !array_key_exists( $slug, $admin_notices_option ) ) {
73
+ $admin_notices_option[$slug]['start'] = $start;
74
+ $admin_notices_option[$slug]['int'] = $interval;
75
+ update_option( $wd_options->prefix . '_admin_notice', $admin_notices_option );
76
+ }
77
+
78
+ // Sanity check to ensure we have accurate information
79
+ // New date information will not overwrite old date information
80
+ $admin_display_check = ( isset( $admin_notices_option[$slug]['dismissed'] ) ? $admin_notices_option[$slug]['dismissed'] : 0 );
81
+ $admin_display_start = ( isset( $admin_notices_option[$slug]['start'] ) ? $admin_notices_option[$slug]['start'] : $start );
82
+ $admin_display_interval = ( isset($admin_notices_option[$slug]['int'] ) ? $admin_notices_option[$slug]['int'] : $interval );
83
+ $admin_display_msg = ( isset($admin_notices[$slug]['msg'] ) ? $admin_notices[$slug]['msg'] : '' );
84
+ $admin_display_title = ( isset($admin_notices[$slug]['title'] ) ? $admin_notices[$slug]['title'] : '' );
85
+ $admin_display_link = ( isset( $admin_notices[$slug]['link'] ) ? $admin_notices[$slug]['link'] : '' );
86
+ $output_css = false;
87
+
88
+ // Ensure the notice hasn't been hidden and that the current date is after the start date
89
+ if ( $admin_display_check == 0 && strtotime($admin_display_start) <= strtotime($current_date ) ) {
90
+
91
+ // Get remaining query string
92
+ $query_str = ( isset( $admin_notices[$slug]['later_link'] ) ? $admin_notices[$slug]['later_link'] : esc_url(add_query_arg( $wd_options->prefix . '_admin_notice_ignore', $slug ) ) );
93
+ if ( strpos($slug, 'promo' ) === FALSE ) {
94
+ // Admin notice display output
95
+ echo '<div class="update-nag wd-admin-notice">
96
+ <div class="wd-notice-logo" style="background-image: url(' . $wd_options->wd_url_img . '/' . $wd_options->prefix . '_main_plugin.png);"></div>
97
+ <p class="wd-notice-title">' . $admin_display_title . '</p>
98
+ <p class="wd-notice-body">' . $admin_display_msg . '</p>
99
+ <ul class="wd-notice-body wd-blue">' . $admin_display_link . '</ul>
100
+ <a href="' . $query_str . '" class="dashicons dashicons-dismiss"></a>
101
+ </div>';
102
+ }
103
+ else {
104
+ echo '<div class="admin-notice-promo">';
105
+ echo $admin_display_msg;
106
+ echo '<ul class="notice-body-promo blue">
107
+ ' . $admin_display_link . '
108
+ </ul>';
109
+ echo '<a href="' . $query_str . '" class="dashicons dashicons-dismiss close-promo"></a>';
110
+ echo '</div>';
111
+ }
112
+ $this->notice_spam += 1;
113
+ $output_css = true;
114
+ }
115
+ if ( $output_css ) {
116
+ wp_enqueue_style( $wd_options->prefix . '-admin-notices', $wd_options->wd_url_css . '/notices.css', array(), get_option($wd_options->prefix . "_version" ) );
117
+ }
118
+ }
119
+ }
120
+ }
121
+
122
+ // Spam protection check
123
+ public function anti_notice_spam() {
124
+ if ( $this->notice_spam >= $this->notice_spam_max ) {
125
+ return true;
126
+ }
127
+ return false;
128
+ }
129
+
130
+ // Ignore function that gets ran at admin init to ensure any messages that were dismissed get marked
131
+ public function admin_notice_ignore() {
132
+ $wd_options = $this->config;
133
+ // If user clicks to ignore the notice, update the option to not show it again
134
+ if ( isset( $_GET[$wd_options->prefix . '_admin_notice_ignore'] ) ) {
135
+ $admin_notices_option = get_option( $wd_options->prefix . '_admin_notice', array() );
136
+ $admin_notices_option[$_GET[$wd_options->prefix . '_admin_notice_ignore']]['dismissed'] = 1;
137
+ update_option( $wd_options->prefix . '_admin_notice', $admin_notices_option );
138
+ $query_str = remove_query_arg( $wd_options->prefix . '_admin_notice_ignore' );
139
+ wp_redirect( $query_str );
140
+ exit;
141
+ }
142
+ }
143
+
144
+ // Temp Ignore function that gets ran at admin init to ensure any messages that were temp dismissed get their start date changed
145
+ public function admin_notice_temp_ignore() {
146
+ $wd_options = $this->config;
147
+ // If user clicks to temp ignore the notice, update the option to change the start date - default interval of 14 days
148
+ if ( isset( $_GET[$wd_options->prefix . '_admin_notice_temp_ignore'] ) ) {
149
+ $admin_notices_option = get_option( $wd_options->prefix . '_admin_notice', array() );
150
+ $current_date = current_time( "n/j/Y" );
151
+ $date_array = explode( '/', $current_date );
152
+ $interval = (isset($_GET['wd_int']) ? $_GET['wd_int'] : 14);
153
+ $date_array[1] += $interval;
154
+ $new_start = date( "n/j/Y", mktime( 0, 0, 0, $date_array[0], $date_array[1], $date_array[2] ) );
155
+
156
+ $admin_notices_option[$_GET[$wd_options->prefix . '_admin_notice_temp_ignore']]['start'] = $new_start;
157
+ $admin_notices_option[$_GET[$wd_options->prefix . '_admin_notice_temp_ignore']]['dismissed'] = 0;
158
+ update_option( $wd_options->prefix . '_admin_notice', $admin_notices_option );
159
+ $query_str = remove_query_arg( array( $wd_options->prefix . '_admin_notice_temp_ignore', 'wd_int' ) );
160
+ wp_redirect( $query_str );
161
+ exit;
162
+ }
163
+ }
164
+
165
+ public function admin_notice_pages($pages) {
166
+ $wd_options = $this->config;
167
+ foreach ( $pages as $key => $page ) {
168
+ if (is_array($page)) {
169
+ if ( isset( $_GET['page'] ) && $_GET['page'] == $page[0] && isset($_GET['tab']) && $_GET['tab'] == $page[1] ) {
170
+ return true;
171
+ }
172
+ }
173
+ else {
174
+ if ( $page == 'all' ) {
175
+ return true;
176
+ }
177
+ if ( get_current_screen()->id === $page ) {
178
+ return true;
179
+ }
180
+ if ( isset($_GET['page']) && $_GET['page'] == $page ) {
181
+ return true;
182
+ }
183
+ }
184
+ return false;
185
+ }
186
+ }
187
+
188
+ // Required fields check
189
+ public function required_fields( $fields ) {
190
+ if ( !isset( $fields['msg'] ) || ( isset($fields['msg'] ) && empty( $fields['msg'] ) ) ) {
191
+ return true;
192
+ }
193
+ if ( !isset( $fields['title'] ) || ( isset( $fields['title'] ) && empty( $fields['title'] ) ) ) {
194
+ return true;
195
+ }
196
+ return false;
197
+ }
198
+
199
+ // Special parameters function that is to be used in any extension of this class
200
+ public function special_parameters($admin_notices) {
201
+ // Intentionally left blank
202
+ }
203
+
204
+ public function wd_admin_notices() {
205
+ $wd_options = $this->config;
206
+ $two_week_review_ignore = add_query_arg( array( $wd_options->prefix . '_admin_notice_ignore' => 'two_week_review' ) );
207
+ $two_week_review_temp = add_query_arg( array( $wd_options->prefix . '_admin_notice_temp_ignore' => 'two_week_review', 'int' => 14 ) );
208
+ $promo_close = add_query_arg( array( $wd_options->prefix . '_admin_notice_ignore' => 'ecommerce_promo' ) );
209
+
210
+ $notices['two_week_review'] = array(
211
+ 'title' => __('Leave A Review?', $wd_options->prefix),
212
+ 'msg' => sprintf(__('We hope you\'ve enjoyed using WordPress %s! Would you consider leaving us a review on WordPress.org?', $wd_options->prefix), $wd_options->plugin_title),
213
+ 'link' => '<li><span class="dashicons dashicons-external"></span><a href="https://wordpress.org/support/plugin/' . $wd_options->plugin_wordpress_slug . '/reviews?filter=5&rate=5#new-post" target="_blank">' . __('Sure! I\'d love to!', $wd_options->prefix) . '</a></li>
214
+ <li><span class="dashicons dashicons-smiley"></span><a href="' . $two_week_review_ignore . '"> ' . __('I\'ve already left a review', $wd_options->prefix) . '</a></li>
215
+ <li><span class="dashicons dashicons-calendar-alt"></span><a href="' . $two_week_review_temp . '">' . __('Maybe Later', $wd_options->prefix) . '</a></li>
216
+ <li><span class="dashicons dashicons-dismiss"></span><a href="' . $two_week_review_ignore . '">' . __('Never show again', $wd_options->prefix) . '</a></li>',
217
+ 'later_link' => $two_week_review_temp,
218
+ 'int' => 14
219
+ );
220
+
221
+ $this->admin_notice($notices);
222
+ }
223
+ }
wd/start.php CHANGED
@@ -1,41 +1,41 @@
1
- <?php
2
- if ( ! defined( 'ABSPATH' ) ) {
3
- exit;
4
- }
5
- define( 'DORADO_WEB_API_PLUGIN_DATA_PATH', 'https://api.web-dorado.com/v2/_id_/plugindata' );
6
- require_once dirname( __FILE__ ) . '/config.php';
7
-
8
- /**
9
- * @param options for Plugin details.
10
- * prefix;
11
- * wd_plugin_id;
12
- * plugin_title;
13
- * plugin_dir;
14
- * plugin_main_file;
15
- * description;
16
- * plugin_features;
17
- * user_guide;
18
- * video_youtube_id;
19
- * plugin_wd_url;
20
- * plugin_wd_demo_link;
21
- * plugin_wd_addons_link;
22
- * plugin_wizard_link;
23
- * after_subscribe;
24
- * plugin_menu_title;
25
- * plugin_menu_icon;
26
- * custom_post;
27
- */
28
-
29
- function dorado_web_init( $options ) {
30
-
31
- // load files
32
- require_once dirname( __FILE__ ) . '/wd.php';
33
-
34
- $wd = new DoradoWeb();
35
- $wd->wd_init( $options );
36
-
37
- }
38
-
39
-
40
-
41
-
1
+ <?php
2
+ if ( ! defined( 'ABSPATH' ) ) {
3
+ exit;
4
+ }
5
+ define( 'DORADO_WEB_API_PLUGIN_DATA_PATH', 'https://api.web-dorado.com/v2/_id_/plugindata' );
6
+ require_once dirname( __FILE__ ) . '/config.php';
7
+
8
+ /**
9
+ * @param options for Plugin details.
10
+ * prefix;
11
+ * wd_plugin_id;
12
+ * plugin_title;
13
+ * plugin_dir;
14
+ * plugin_main_file;
15
+ * description;
16
+ * plugin_features;
17
+ * user_guide;
18
+ * video_youtube_id;
19
+ * plugin_wd_url;
20
+ * plugin_wd_demo_link;
21
+ * plugin_wd_addons_link;
22
+ * plugin_wizard_link;
23
+ * after_subscribe;
24
+ * plugin_menu_title;
25
+ * plugin_menu_icon;
26
+ * custom_post;
27
+ */
28
+
29
+ function dorado_web_init( $options ) {
30
+
31
+ // load files
32
+ require_once dirname( __FILE__ ) . '/wd.php';
33
+
34
+ $wd = new DoradoWeb();
35
+ $wd->wd_init( $options );
36
+
37
+ }
38
+
39
+
40
+
41
+
wd/templates/display_overview.php CHANGED
@@ -1,43 +1,43 @@
1
- <div class="overview_welcome">
2
- <div class="wd-cell wd-valign-middle">
3
- <a href="<?php echo $wd_options->plugin_wd_url; ?>" target="_blank"><img
4
- src="<?php echo $wd_options->wd_url_img . '/' . $wd_options->prefix . '_main_plugin.png'; ?>"></a>
5
- </div>
6
- <div class="wd-cell wd-valign-middle">
7
-
8
- <h2><?php echo sprintf(__("Welcome to %s", $wd_options->prefix), $wd_options->plugin_title); ?> <?php if (!empty($start_using_url)) { ?>
9
- <div class="wd-start-using-button">
10
- <a href="<?php echo $start_using_url; ?>" class="button button-primary button-large">Start using</a>
11
- </div>
12
- <?php } ?></h2>
13
-
14
- <div class="overview_welcome_text">
15
-
16
- <div><?php echo sprintf(__("CONGRATS! You've successfully installed %s WordPress plugin.", $wd_options->prefix), $wd_options->plugin_title); ?></div>
17
- <div><?php echo $wd_options->description; ?></div>
18
- </div>
19
- </div>
20
- </div>
21
- <div class="overview_wrap">
22
- <ul class="overview_tabs">
23
- <?php
24
- foreach ($tabs as $tab_key => $tab) {
25
- $href = $tab['view'] !== false ? "#" . $tab_key : $tab_key;
26
- $target = $tab['view'] == false ? 'target="_blank" class="not_tab"' : '';
27
- $overview_tab_active_class = $tab_key == 'welcome' ? 'class="overview_tab_active"' : ''
28
- ?>
29
- <li class=""><a
30
- href="<?php echo $href; ?>" <?php echo $overview_tab_active_class; ?> <?php echo $target; ?>><?php echo esc_html($tab['name']); ?></a>
31
- </li>
32
- <?php } ?>
33
- </ul>
34
- <div class="overview_content">
35
- <?php
36
- foreach ($tabs as $tab_key => $tab) {
37
- if ($tab['view'] !== false) {
38
- echo call_user_func($tab['view']);
39
- }
40
- }
41
- ?>
42
- </div>
43
  </div>
1
+ <div class="overview_welcome">
2
+ <div class="wd-cell wd-valign-middle">
3
+ <a href="<?php echo $wd_options->plugin_wd_url; ?>" target="_blank"><img
4
+ src="<?php echo $wd_options->wd_url_img . '/' . $wd_options->prefix . '_main_plugin.png'; ?>"></a>
5
+ </div>
6
+ <div class="wd-cell wd-valign-middle">
7
+
8
+ <h2><?php echo sprintf(__("Welcome to %s", $wd_options->prefix), $wd_options->plugin_title); ?> <?php if (!empty($start_using_url)) { ?>
9
+ <div class="wd-start-using-button">
10
+ <a href="<?php echo $start_using_url; ?>" class="button button-primary button-large">Start using</a>
11
+ </div>
12
+ <?php } ?></h2>
13
+
14
+ <div class="overview_welcome_text">
15
+
16
+ <div><?php echo sprintf(__("CONGRATS! You've successfully installed %s WordPress plugin.", $wd_options->prefix), $wd_options->plugin_title); ?></div>
17
+ <div><?php echo $wd_options->description; ?></div>
18
+ </div>
19
+ </div>
20
+ </div>
21
+ <div class="overview_wrap">
22
+ <ul class="overview_tabs">
23
+ <?php
24
+ foreach ($tabs as $tab_key => $tab) {
25
+ $href = $tab['view'] !== false ? "#" . $tab_key : $tab_key;
26
+ $target = $tab['view'] == false ? 'target="_blank" class="not_tab"' : '';
27
+ $overview_tab_active_class = $tab_key == 'welcome' ? 'class="overview_tab_active"' : ''
28
+ ?>
29
+ <li class=""><a
30
+ href="<?php echo $href; ?>" <?php echo $overview_tab_active_class; ?> <?php echo $target; ?>><?php echo esc_html($tab['name']); ?></a>
31
+ </li>
32
+ <?php } ?>
33
+ </ul>
34
+ <div class="overview_content">
35
+ <?php
36
+ foreach ($tabs as $tab_key => $tab) {
37
+ if ($tab['view'] !== false) {
38
+ echo call_user_func($tab['view']);
39
+ }
40
+ }
41
+ ?>
42
+ </div>
43
  </div>
wd/templates/display_subscribe.php CHANGED
@@ -1,50 +1,50 @@
1
- <div class="wd-subscribe">
2
- <div class="wd-subscribe-content">
3
- <div class="imgs">
4
- <img src="<?php echo $wd_options->wd_url_img . '/wp_logo.png'; ?>">
5
- <span>+</span>
6
- <img src="<?php echo $wd_options->wd_url_img . '/' . $wd_options->prefix . '_main_plugin.png'; ?>">
7
- </div>
8
- <div class="texts">
9
- <p><?php _e( "Hi there", $wd_options->prefix ); ?>,</p>
10
- <p>
11
- <?php
12
- $pp_text = "<a target='_blank' href='https://web-dorado.com/web-dorado-privacy-statement.html'>" . __("Privacy Policy", $wd_options->prefix) . "</a>";
13
- echo sprintf(__("Allow %s to collect some usage data, to be able to provide you more out of your plugin experience - awesome customer support and more. Check how we handle your personal data in our %s. You can always customize your preferences from the emails your receive from us. You can choose to skip this step, %s will still work just fine.", $wd_options->prefix), '<strong>Web-Dorado</strong>', $pp_text, $wd_options->plugin_title);
14
- ?>
15
- </p>
16
- </div>
17
- <div class="btns">
18
- <a href="<?php echo "admin.php?page=" . $wd_options->prefix . "_subscribe&". $wd_options->prefix . "_sub_action=allow" ;?>" class="allow_and_continue"></a>
19
- <img src="<?php echo $wd_options->wd_url_img . '/loader.gif';?>" class="wd_loader">
20
- <a href="<?php echo "admin.php?page=" . $wd_options->prefix . "_subscribe&" . $wd_options->prefix . "_sub_action=skip" ;?>" class="skip" ></a>
21
- </div>
22
- <a href="#" class="permissions"><?php _e( "What data is being collected?" , $wd_options->prefix ); ?></a>
23
- <div class="list">
24
- <?php foreach( $list as $list_item ) { ?>
25
- <div class="list_item">
26
- <div class="list_img_wrap"><img src="<?php echo $list_item["img"]; ?>"></div>
27
- <div class="list_text_wrap">
28
- <div class="list_title"><?php echo $list_item["title"]; ?></div>
29
- <div class="list_text"><?php echo $list_item["small_text"]; ?></div>
30
- </div>
31
- </div>
32
- <?php } ?>
33
- </div>
34
- </div>
35
- <div class="wd-subscribe-footer">
36
- <ul class="wd-footer-menu">
37
- <li>
38
- <a href="https://web-dorado.com/web-dorado-privacy-statement.html" target="_blank">
39
- <?php _e( "Privacy Policy", $wd_options->prefix ); ?>
40
- </a>
41
- <span>.</span>
42
- </li>
43
- <li>
44
- <a href="https://web-dorado.com/terms-of-service.html" target="_blank">
45
- <?php _e( "Terms of Use", $wd_options->prefix ); ?>
46
- </a>
47
- </li>
48
- </ul>
49
- </div>
50
- </div>
1
+ <div class="wd-subscribe">
2
+ <div class="wd-subscribe-content">
3
+ <div class="imgs">
4
+ <img src="<?php echo $wd_options->wd_url_img . '/wp_logo.png'; ?>">
5
+ <span>+</span>
6
+ <img src="<?php echo $wd_options->wd_url_img . '/' . $wd_options->prefix . '_main_plugin.png'; ?>">
7
+ </div>
8
+ <div class="texts">
9
+ <p><?php _e( "Hi there", $wd_options->prefix ); ?>,</p>
10
+ <p>
11
+ <?php
12
+ $pp_text = "<a target='_blank' href='https://web-dorado.com/web-dorado-privacy-statement.html'>" . __("Privacy Policy", $wd_options->prefix) . "</a>";
13
+ echo sprintf(__("Allow %s to collect some usage data, to be able to provide you more out of your plugin experience - awesome customer support and more. Check how we handle your personal data in our %s. You can always customize your preferences from the emails your receive from us. You can choose to skip this step, %s will still work just fine.", $wd_options->prefix), '<strong>Web-Dorado</strong>', $pp_text, $wd_options->plugin_title);
14
+ ?>
15
+ </p>
16
+ </div>
17
+ <div class="btns">
18
+ <a href="<?php echo "admin.php?page=" . $wd_options->prefix . "_subscribe&". $wd_options->prefix . "_sub_action=allow" ;?>" class="allow_and_continue"></a>
19
+ <img src="<?php echo $wd_options->wd_url_img . '/loader.gif';?>" class="wd_loader">
20
+ <a href="<?php echo "admin.php?page=" . $wd_options->prefix . "_subscribe&" . $wd_options->prefix . "_sub_action=skip" ;?>" class="skip" ></a>
21
+ </div>
22
+ <a href="#" class="permissions"><?php _e( "What data is being collected?" , $wd_options->prefix ); ?></a>
23
+ <div class="list">
24
+ <?php foreach( $list as $list_item ) { ?>
25
+ <div class="list_item">
26
+ <div class="list_img_wrap"><img src="<?php echo $list_item["img"]; ?>"></div>
27
+ <div class="list_text_wrap">
28
+ <div class="list_title"><?php echo $list_item["title"]; ?></div>
29
+ <div class="list_text"><?php echo $list_item["small_text"]; ?></div>
30
+ </div>
31
+ </div>
32
+ <?php } ?>
33
+ </div>
34
+ </div>
35
+ <div class="wd-subscribe-footer">
36
+ <ul class="wd-footer-menu">
37
+ <li>
38
+ <a href="https://web-dorado.com/web-dorado-privacy-statement.html" target="_blank">
39
+ <?php _e( "Privacy Policy", $wd_options->prefix ); ?>
40
+ </a>
41
+ <span>.</span>
42
+ </li>
43
+ <li>
44
+ <a href="https://web-dorado.com/terms-of-service.html" target="_blank">
45
+ <?php _e( "Terms of Use", $wd_options->prefix ); ?>
46
+ </a>
47
+ </li>
48
+ </ul>
49
+ </div>
50
+ </div>