Visual Form Builder - Version 3.1

Version Description

Download this release

Release Info

Developer mmuro
Plugin Icon 128x128 Visual Form Builder
Version 3.1
Comparing to
See all releases

Code changes from version 3.0.9 to 3.1

admin/class-admin-menu.php CHANGED
@@ -113,7 +113,7 @@ class Visual_Form_Builder_Admin_Menu {
113
  * @return void
114
  */
115
  public function admin() {
116
- if ( isset( $_GET['form'] ) && isset( $_GET['action'] ) && 'edit' === $_GET['action'] ) {
117
  $this->edit_form();
118
  } else {
119
  $this->forms_list();
@@ -245,7 +245,7 @@ class Visual_Form_Builder_Admin_Menu {
245
  ?>
246
  </h1>
247
  <?php
248
- if ( isset( $_GET['vfb-action'] ) && in_array( $_GET['vfb-action'], array( 'view', 'edit', 'update_entry' ) ) ) :
249
  $entries_detail->entries_detail();
250
  else :
251
  $entries_list->views();
113
  * @return void
114
  */
115
  public function admin() {
116
+ if ( isset( $_GET['form'] ) && isset( $_GET['vfb-action'] ) && 'edit' === $_GET['vfb-action'] ) {
117
  $this->edit_form();
118
  } else {
119
  $this->forms_list();
245
  ?>
246
  </h1>
247
  <?php
248
+ if ( isset( $_GET['vfb-action'] ) && in_array( $_GET['vfb-action'], array( 'view', 'edit', 'update_entry' ), true ) ) :
249
  $entries_detail->entries_detail();
250
  else :
251
  $entries_list->views();
admin/class-admin-notices.php CHANGED
@@ -27,7 +27,7 @@ class Visual_Form_Builder_Admin_Notices {
27
  if ( ! $this->submit_check() ) {
28
  return;
29
  }
30
- if ( 'create_form' !== $_POST['action'] ) {
31
  return;
32
  }
33
 
@@ -48,7 +48,7 @@ class Visual_Form_Builder_Admin_Notices {
48
  return;
49
  }
50
 
51
- if ( 'update_form' !== $_POST['action'] ) {
52
  return;
53
  }
54
 
@@ -69,7 +69,7 @@ class Visual_Form_Builder_Admin_Notices {
69
  return;
70
  }
71
 
72
- if ( 'deleted' !== $_POST['action'] ) {
73
  return;
74
  }
75
 
@@ -90,7 +90,7 @@ class Visual_Form_Builder_Admin_Notices {
90
  return;
91
  }
92
 
93
- if ( 'copy_form' !== $_POST['action'] ) {
94
  return;
95
  }
96
 
@@ -111,7 +111,7 @@ class Visual_Form_Builder_Admin_Notices {
111
  return;
112
  }
113
 
114
- if ( 'vfb_settings' !== $_POST['action'] ) {
115
  return;
116
  }
117
 
@@ -128,7 +128,7 @@ class Visual_Form_Builder_Admin_Notices {
128
  * @return void
129
  */
130
  public function submit_check() {
131
- if ( ! isset( $_POST['action'] ) || ! isset( $_GET['page'] ) ) {
132
  return;
133
  }
134
 
@@ -140,7 +140,7 @@ class Visual_Form_Builder_Admin_Notices {
140
  'vfb-settings',
141
  );
142
 
143
- if ( ! in_array( $_GET['page'], $pages ) ) {
144
  return;
145
  }
146
 
27
  if ( ! $this->submit_check() ) {
28
  return;
29
  }
30
+ if ( 'create_form' !== $_POST['vfb-action'] ) {
31
  return;
32
  }
33
 
48
  return;
49
  }
50
 
51
+ if ( 'update_form' !== $_POST['vfb-action'] ) {
52
  return;
53
  }
54
 
69
  return;
70
  }
71
 
72
+ if ( 'deleted' !== $_POST['vfb-action'] ) {
73
  return;
74
  }
75
 
90
  return;
91
  }
92
 
93
+ if ( 'copy_form' !== $_POST['vfb-action'] ) {
94
  return;
95
  }
96
 
111
  return;
112
  }
113
 
114
+ if ( 'vfb_settings' !== $_POST['vfb-action'] ) {
115
  return;
116
  }
117
 
128
  * @return void
129
  */
130
  public function submit_check() {
131
+ if ( ! isset( $_POST['vfb-action'] ) || ! isset( $_GET['page'] ) ) {
132
  return;
133
  }
134
 
140
  'vfb-settings',
141
  );
142
 
143
+ if ( ! in_array( $_GET['page'], $pages, true ) ) {
144
  return;
145
  }
146
 
admin/class-dashboard-widgets.php CHANGED
@@ -78,7 +78,7 @@ class Visual_Form_Builder_Dashboard_Widgets {
78
  esc_url(
79
  add_query_arg(
80
  array(
81
- 'action' => 'view',
82
  'entry' => absint( $entry->entries_id ),
83
  ),
84
  admin_url( 'admin.php?page=vfb-entries' )
78
  esc_url(
79
  add_query_arg(
80
  array(
81
+ 'vfb-action' => 'view',
82
  'entry' => absint( $entry->entries_id ),
83
  ),
84
  admin_url( 'admin.php?page=vfb-entries' )
admin/class-entries-list.php CHANGED
@@ -61,14 +61,67 @@ class Visual_Form_Builder_Entries_List extends WP_List_Table {
61
  public function column_form( $item ) {
62
  // Build row actions.
63
  if ( ! $this->get_entry_status() || 'all' === $this->get_entry_status() ) {
64
- $actions['view'] = sprintf( '<a href="%s&vfb-action=%s&entry=%s" id="%3$s" class="view-entry">View</a>', wp_nonce_url( admin_url( 'admin.php?page=vfb-entries' ), 'vfb_view_entry' ), 'view', $item['entry_id'] );
 
 
 
 
 
 
 
 
 
 
 
 
 
65
  }
66
 
67
  if ( ! $this->get_entry_status() || 'all' === $this->get_entry_status() ) {
68
- $actions['trash'] = sprintf( '<a href="%s&vfb-action=%s&entry=%s">Trash</a>', wp_nonce_url( admin_url( 'admin.php?page=vfb-entries' ), 'vfb_trash_entry' ), 'trash', $item['entry_id'] );
 
 
 
 
 
 
 
 
 
 
 
 
 
69
  } elseif ( $this->get_entry_status() && 'trash' === $this->get_entry_status() ) {
70
- $actions['restore'] = sprintf( '<a href="%s&vfb-action=%s&entry=%s">%s</a>', wp_nonce_url( admin_url( 'admin.php?page=vfb-entries' ), 'vfb_undo_trash_entry' ), 'restore', $item['entry_id'], __( 'Restore', 'visual-form-builder' ) );
71
- $actions['delete'] = sprintf( '<a href="%s&vfb-action=%s&entry=%s">%s</a>', wp_nonce_url( admin_url( 'admin.php?page=vfb-entries' ), 'vfb_delete_entry' ), 'delete', $item['entry_id'], __( 'Delete Permanently', 'visual-form-builder' ) );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
72
  }
73
 
74
  return sprintf( '%1$s %2$s', $item['form'], $this->row_actions( $actions ) );
61
  public function column_form( $item ) {
62
  // Build row actions.
63
  if ( ! $this->get_entry_status() || 'all' === $this->get_entry_status() ) {
64
+ $view_url = add_query_arg(
65
+ array(
66
+ 'page' => 'vfb-entries',
67
+ 'vfb-action' => 'view',
68
+ 'entry' => $item['entry_id'],
69
+ ),
70
+ wp_nonce_url( admin_url( 'admin.php' ), 'vfb_view_entry' )
71
+ );
72
+
73
+ $actions['view'] = sprintf(
74
+ '<a href="%s">%s</a>',
75
+ esc_url( $view_url ),
76
+ esc_html__( 'View', 'visual-form-builder' )
77
+ );
78
  }
79
 
80
  if ( ! $this->get_entry_status() || 'all' === $this->get_entry_status() ) {
81
+ $trash_url = add_query_arg(
82
+ array(
83
+ 'page' => 'vfb-entries',
84
+ 'vfb-action' => 'trash',
85
+ 'entry' => $item['entry_id'],
86
+ ),
87
+ wp_nonce_url( admin_url( 'admin.php' ), 'vfb_trash_entry' )
88
+ );
89
+
90
+ $actions['trash'] = sprintf(
91
+ '<a href="%s">%s</a>',
92
+ esc_url( $trash_url ),
93
+ esc_html__( 'Trash', 'visual-form-builder' )
94
+ );
95
  } elseif ( $this->get_entry_status() && 'trash' === $this->get_entry_status() ) {
96
+ $restore_url = add_query_arg(
97
+ array(
98
+ 'page' => 'vfb-entries',
99
+ 'vfb-action' => 'restore',
100
+ 'entry' => $item['entry_id'],
101
+ ),
102
+ wp_nonce_url( admin_url( 'admin.php' ), 'vfb_undo_trash_entry' )
103
+ );
104
+
105
+ $actions['restore'] = sprintf(
106
+ '<a href="%s">%s</a>',
107
+ esc_url( $restore_url ),
108
+ esc_html__( 'Restore', 'visual-form-builder' )
109
+ );
110
+
111
+ $delete_url = add_query_arg(
112
+ array(
113
+ 'page' => 'vfb-entries',
114
+ 'vfb-action' => 'delete',
115
+ 'entry' => $item['entry_id'],
116
+ ),
117
+ wp_nonce_url( admin_url( 'admin.php' ), 'vfb_delete_entry' )
118
+ );
119
+
120
+ $actions['delete'] = sprintf(
121
+ '<a href="%s">%s</a>',
122
+ esc_url( $delete_url ),
123
+ esc_html__( 'Delete Permanently', 'visual-form-builder' )
124
+ );
125
  }
126
 
127
  return sprintf( '%1$s %2$s', $item['form'], $this->row_actions( $actions ) );
admin/class-export.php CHANGED
@@ -169,7 +169,8 @@ class Visual_Form_Builder_Export {
169
  $data = array();
170
 
171
  if ( isset( $_POST['settings'] ) ) {
172
- foreach ( sanitize_text_field( wp_unslash( $_POST['settings'] ) ) as $key => $val ) {
 
173
  $data[ $key ] = $val;
174
  }
175
  }
@@ -260,7 +261,7 @@ class Visual_Form_Builder_Export {
260
  header( 'Expires: 0' );
261
  header( 'Pragma: public' );
262
 
263
- if ( in_array( $format, array( 'csv', 'txt' ) ) ) {
264
  $this->csv_tab( $data['fields'], $data['where'], $format, $file_path );
265
  }
266
  }
@@ -310,7 +311,7 @@ class Visual_Form_Builder_Export {
310
  // Prepend a space to prevent CSV injection attacks.
311
  $value = ' ' . wp_specialchars_decode( $row[ $label ] );
312
 
313
- $rows[ $label ] = ( isset( $row[ $label ] ) && in_array( $label, $fields_clean ) ) ? $value : '';
314
  }
315
 
316
  fputcsv( $file, $rows, $this->delimiter );
@@ -359,7 +360,7 @@ class Visual_Form_Builder_Export {
359
  $array = array_map( 'stripslashes', $array );
360
 
361
  foreach ( $array as $id => $value ) {
362
- $selected = in_array( $value, $this->default_cols ) ? ' checked="checked"' : '';
363
 
364
  // Strip unique ID for a clean list.
365
  $search = preg_replace( '/{{(\d+)}}/', '', $value );
169
  $data = array();
170
 
171
  if ( isset( $_POST['settings'] ) ) {
172
+ // Sanitized below.
173
+ foreach ( wp_unslash( $_POST['settings'] ) as $key => $val ) {
174
  $data[ $key ] = $val;
175
  }
176
  }
261
  header( 'Expires: 0' );
262
  header( 'Pragma: public' );
263
 
264
+ if ( in_array( $format, array( 'csv', 'txt' ), true ) ) {
265
  $this->csv_tab( $data['fields'], $data['where'], $format, $file_path );
266
  }
267
  }
311
  // Prepend a space to prevent CSV injection attacks.
312
  $value = ' ' . wp_specialchars_decode( $row[ $label ] );
313
 
314
+ $rows[ $label ] = isset( $row[ $label ] ) && in_array( $label, $fields_clean, true ) ? $value : '';
315
  }
316
 
317
  fputcsv( $file, $rows, $this->delimiter );
360
  $array = array_map( 'stripslashes', $array );
361
 
362
  foreach ( $array as $id => $value ) {
363
+ $selected = in_array( $value, $this->default_cols, true ) ? ' checked="checked"' : '';
364
 
365
  // Strip unique ID for a clean list.
366
  $search = preg_replace( '/{{(\d+)}}/', '', $value );
admin/class-fields.php CHANGED
@@ -51,7 +51,7 @@ class Visual_Form_Builder_Admin_Fields {
51
  $last = $field->field_id;
52
  $parent = $field->field_parent;
53
  ?>
54
- <li id="form_item_<?php echo esc_attr( $field->field_id ); ?>" class="form-item<?php echo ( in_array( $field->field_type, array( 'submit', 'secret', 'verification' ) ) ) ? ' ui-state-disabled' : ''; ?><?php echo ( ! in_array( $field->field_type, array( 'fieldset', 'section', 'verification' ) ) ) ? ' mjs-nestedSortable-no-nesting' : ''; ?>">
55
  <dl class="menu-item-bar vfb-menu-item-inactive">
56
  <dt class="vfb-menu-item-handle vfb-menu-item-type-<?php echo esc_attr( $field->field_type ); ?>">
57
  <span class="item-title"><?php echo esc_html( wp_unslash( $field->field_name ) ); ?><?php echo ( 'yes' === $field->field_required ) ? ' <span class="is-field-required">*</span>' : ''; ?></span>
@@ -63,10 +63,10 @@ class Visual_Form_Builder_Admin_Fields {
63
  </dl>
64
 
65
  <div id="form-item-settings-<?php echo esc_attr( $field->field_id ); ?>" class="menu-item-settings field-type-<?php echo esc_attr( $field->field_type ); ?>" style="display: none;">
66
- <?php if ( in_array( $field->field_type, array( 'fieldset', 'section', 'verification' ) ) ) : ?>
67
 
68
  <p class="description description-wide">
69
- <label for="edit-form-item-name-<?php echo esc_attr( $field->field_id ); ?>"><?php echo ( in_array( $field->field_type, array( 'fieldset', 'verification' ) ) ) ? 'Legend' : 'Name'; ?>
70
  <span class="vfb-tooltip" rel="<?php esc_attr_e( 'For Fieldsets, a Legend is simply the name of that group. Use general terms that describe the fields included in this Fieldset.', 'visual-form-builder' ); ?>" title="<?php esc_attr_e( 'About Legend', 'visual-form-builder' ); ?>">(?)</span>
71
  <br />
72
  <input type="text" value="<?php echo esc_html( wp_unslash( $field->field_name ) ); ?>" name="field_name-<?php echo esc_attr( $field->field_id ); ?>" class="widefat" id="edit-form-item-name-<?php echo esc_attr( $field->field_id ); ?>" maxlength="255" />
@@ -170,7 +170,7 @@ class Visual_Form_Builder_Admin_Fields {
170
 
171
  <?php
172
  // Display the Options input only for radio, checkbox, and select fields.
173
- if ( in_array( $field->field_type, array( 'radio', 'checkbox', 'select' ) ) ) :
174
  ?>
175
  <!-- Options -->
176
  <p class="description description-wide">
@@ -181,7 +181,7 @@ class Visual_Form_Builder_Admin_Fields {
181
  // If the options field isn't empty, unserialize and build array.
182
  if ( ! empty( $field->field_options ) ) {
183
  if ( is_serialized( $field->field_options ) ) {
184
- $opts_vals = ( is_array( unserialize( $field->field_options ) ) ) ? unserialize( $field->field_options ) : explode( ',', unserialize( $field->field_options ) );
185
  }
186
  } else {
187
  // Otherwise, present some default options.
@@ -223,7 +223,7 @@ class Visual_Form_Builder_Admin_Fields {
223
  endif;
224
  ?>
225
 
226
- <?php if ( in_array( $field->field_type, array( 'file-upload' ) ) ) : ?>
227
  <!-- File Upload Accepts -->
228
  <p class="description description-wide">
229
  <?php
@@ -232,7 +232,7 @@ class Visual_Form_Builder_Admin_Fields {
232
  // If the options field isn't empty, unserialize and build array.
233
  if ( ! empty( $field->field_options ) ) {
234
  if ( is_serialized( $field->field_options ) ) {
235
- $opts_vals = ( is_array( unserialize( $field->field_options ) ) ) ? unserialize( $field->field_options ) : unserialize( $field->field_options );
236
  }
237
  }
238
 
@@ -279,12 +279,12 @@ class Visual_Form_Builder_Admin_Fields {
279
  <span class="vfb-tooltip" title="<?php esc_attr_e( 'About Validation', 'visual-form-builder' ); ?>" rel="<?php esc_attr_e( 'Ensures user-entered data is formatted properly. For more information on Validation, refer to the Help tab at the top of this page.', 'visual-form-builder' ); ?>">(?)</span>
280
  <br />
281
 
282
- <?php if ( in_array( $field->field_type, array( 'text', 'time', 'number' ) ) ) : ?>
283
  <select name="field_validation-<?php echo esc_attr( $field->field_id ); ?>" class="widefat" id="edit-form-item-validation-<?php echo esc_attr( $field->field_id ); ?>">
284
  <?php if ( 'time' === $field->field_type ) : ?>
285
  <option value="time-12" <?php selected( $field->field_validation, 'time-12' ); ?>><?php esc_html_e( '12 Hour Format', 'visual-form-builder' ); ?></option>
286
  <option value="time-24" <?php selected( $field->field_validation, 'time-24' ); ?>><?php esc_html_e( '24 Hour Format', 'visual-form-builder' ); ?></option>
287
- <?php elseif ( in_array( $field->field_type, array( 'number' ) ) ) : ?>
288
  <option value="number" <?php selected( $field->field_validation, 'number' ); ?>><?php esc_html_e( 'Number', 'visual-form-builder' ); ?></option>
289
  <option value="digits" <?php selected( $field->field_validation, 'digits' ); ?>><?php esc_html_e( 'Digits', 'visual-form-builder' ); ?></option>
290
  <?php else : ?>
@@ -336,7 +336,7 @@ class Visual_Form_Builder_Admin_Fields {
336
  </label>
337
  </p>
338
 
339
- <?php if ( ! in_array( $field->field_type, array( 'radio', 'checkbox', 'time' ) ) ) : ?>
340
  <!-- Size -->
341
  <p class="description description-thin">
342
  <label for="edit-form-item-size">
@@ -351,7 +351,7 @@ class Visual_Form_Builder_Admin_Fields {
351
  </label>
352
  </p>
353
 
354
- <?php elseif ( in_array( $field->field_type, array( 'radio', 'checkbox', 'time' ) ) ) : ?>
355
  <!-- Options Layout -->
356
  <p class="description description-thin">
357
  <label for="edit-form-item-size">
@@ -392,7 +392,7 @@ class Visual_Form_Builder_Admin_Fields {
392
  </select>
393
  </label>
394
  </p>
395
- <?php if ( ! in_array( $field->field_type, array( 'radio', 'select', 'checkbox', 'time', 'address' ) ) ) : ?>
396
  <!-- Default Value -->
397
  <p class="description description-wide">
398
  <label for="edit-form-item-default-<?php echo esc_attr( $field->field_id ); ?>">
@@ -402,7 +402,7 @@ class Visual_Form_Builder_Admin_Fields {
402
  <input type="text" value="<?php echo esc_html( $field->field_default ); ?>" name="field_default-<?php echo esc_attr( $field->field_id ); ?>" class="widefat" id="edit-form-item-default-<?php echo esc_attr( $field->field_id ); ?>" maxlength="255" />
403
  </label>
404
  </p>
405
- <?php elseif ( in_array( $field->field_type, array( 'address' ) ) ) : ?>
406
  <!-- Default Country -->
407
  <p class="description description-wide">
408
  <label for="edit-form-item-default-<?php echo esc_attr( $field->field_id ); ?>">
@@ -437,7 +437,7 @@ class Visual_Form_Builder_Admin_Fields {
437
  <?php endif; ?>
438
  <?php endif; ?>
439
 
440
- <?php if ( ! in_array( $field->field_type, array( 'verification', 'secret', 'submit' ) ) ) : ?>
441
  <!-- Delete link -->
442
  <a href="<?php echo esc_url( wp_nonce_url( admin_url( 'admin.php?page=visual-form-builder&amp;action=delete_field&amp;form=' . $form_nav_selected_id . '&amp;field=' . $field->field_id ), 'delete-field-' . $form_nav_selected_id ) ); ?>" class="vfb-button vfb-delete item-delete submitdelete deletion">
443
  <?php esc_html_e( 'Delete', 'visual-form-builder' ); ?>
51
  $last = $field->field_id;
52
  $parent = $field->field_parent;
53
  ?>
54
+ <li id="form_item_<?php echo esc_attr( $field->field_id ); ?>" class="form-item<?php echo in_array( $field->field_type, array( 'submit', 'secret', 'verification' ), true ) ? ' ui-state-disabled' : ''; ?><?php echo ! in_array( $field->field_type, array( 'fieldset', 'section', 'verification' ), true ) ? ' mjs-nestedSortable-no-nesting' : ''; ?>">
55
  <dl class="menu-item-bar vfb-menu-item-inactive">
56
  <dt class="vfb-menu-item-handle vfb-menu-item-type-<?php echo esc_attr( $field->field_type ); ?>">
57
  <span class="item-title"><?php echo esc_html( wp_unslash( $field->field_name ) ); ?><?php echo ( 'yes' === $field->field_required ) ? ' <span class="is-field-required">*</span>' : ''; ?></span>
63
  </dl>
64
 
65
  <div id="form-item-settings-<?php echo esc_attr( $field->field_id ); ?>" class="menu-item-settings field-type-<?php echo esc_attr( $field->field_type ); ?>" style="display: none;">
66
+ <?php if ( in_array( $field->field_type, array( 'fieldset', 'section', 'verification' ), true ) ) : ?>
67
 
68
  <p class="description description-wide">
69
+ <label for="edit-form-item-name-<?php echo esc_attr( $field->field_id ); ?>"><?php echo in_array( $field->field_type, array( 'fieldset', 'verification' ), true ) ? 'Legend' : 'Name'; ?>
70
  <span class="vfb-tooltip" rel="<?php esc_attr_e( 'For Fieldsets, a Legend is simply the name of that group. Use general terms that describe the fields included in this Fieldset.', 'visual-form-builder' ); ?>" title="<?php esc_attr_e( 'About Legend', 'visual-form-builder' ); ?>">(?)</span>
71
  <br />
72
  <input type="text" value="<?php echo esc_html( wp_unslash( $field->field_name ) ); ?>" name="field_name-<?php echo esc_attr( $field->field_id ); ?>" class="widefat" id="edit-form-item-name-<?php echo esc_attr( $field->field_id ); ?>" maxlength="255" />
170
 
171
  <?php
172
  // Display the Options input only for radio, checkbox, and select fields.
173
+ if ( in_array( $field->field_type, array( 'radio', 'checkbox', 'select' ), true ) ) :
174
  ?>
175
  <!-- Options -->
176
  <p class="description description-wide">
181
  // If the options field isn't empty, unserialize and build array.
182
  if ( ! empty( $field->field_options ) ) {
183
  if ( is_serialized( $field->field_options ) ) {
184
+ $opts_vals = is_array( unserialize( $field->field_options ) ) ? unserialize( $field->field_options ) : explode( ',', unserialize( $field->field_options ) );
185
  }
186
  } else {
187
  // Otherwise, present some default options.
223
  endif;
224
  ?>
225
 
226
+ <?php if ( in_array( $field->field_type, array( 'file-upload' ), true ) ) : ?>
227
  <!-- File Upload Accepts -->
228
  <p class="description description-wide">
229
  <?php
232
  // If the options field isn't empty, unserialize and build array.
233
  if ( ! empty( $field->field_options ) ) {
234
  if ( is_serialized( $field->field_options ) ) {
235
+ $opts_vals = is_array( unserialize( $field->field_options ) ) ? unserialize( $field->field_options ) : unserialize( $field->field_options );
236
  }
237
  }
238
 
279
  <span class="vfb-tooltip" title="<?php esc_attr_e( 'About Validation', 'visual-form-builder' ); ?>" rel="<?php esc_attr_e( 'Ensures user-entered data is formatted properly. For more information on Validation, refer to the Help tab at the top of this page.', 'visual-form-builder' ); ?>">(?)</span>
280
  <br />
281
 
282
+ <?php if ( in_array( $field->field_type, array( 'text', 'time', 'number' ), true ) ) : ?>
283
  <select name="field_validation-<?php echo esc_attr( $field->field_id ); ?>" class="widefat" id="edit-form-item-validation-<?php echo esc_attr( $field->field_id ); ?>">
284
  <?php if ( 'time' === $field->field_type ) : ?>
285
  <option value="time-12" <?php selected( $field->field_validation, 'time-12' ); ?>><?php esc_html_e( '12 Hour Format', 'visual-form-builder' ); ?></option>
286
  <option value="time-24" <?php selected( $field->field_validation, 'time-24' ); ?>><?php esc_html_e( '24 Hour Format', 'visual-form-builder' ); ?></option>
287
+ <?php elseif ( in_array( $field->field_type, array( 'number' ), true ) ) : ?>
288
  <option value="number" <?php selected( $field->field_validation, 'number' ); ?>><?php esc_html_e( 'Number', 'visual-form-builder' ); ?></option>
289
  <option value="digits" <?php selected( $field->field_validation, 'digits' ); ?>><?php esc_html_e( 'Digits', 'visual-form-builder' ); ?></option>
290
  <?php else : ?>
336
  </label>
337
  </p>
338
 
339
+ <?php if ( ! in_array( $field->field_type, array( 'radio', 'checkbox', 'time' ), true ) ) : ?>
340
  <!-- Size -->
341
  <p class="description description-thin">
342
  <label for="edit-form-item-size">
351
  </label>
352
  </p>
353
 
354
+ <?php elseif ( in_array( $field->field_type, array( 'radio', 'checkbox', 'time' ), true ) ) : ?>
355
  <!-- Options Layout -->
356
  <p class="description description-thin">
357
  <label for="edit-form-item-size">
392
  </select>
393
  </label>
394
  </p>
395
+ <?php if ( ! in_array( $field->field_type, array( 'radio', 'select', 'checkbox', 'time', 'address' ), true ) ) : ?>
396
  <!-- Default Value -->
397
  <p class="description description-wide">
398
  <label for="edit-form-item-default-<?php echo esc_attr( $field->field_id ); ?>">
402
  <input type="text" value="<?php echo esc_html( $field->field_default ); ?>" name="field_default-<?php echo esc_attr( $field->field_id ); ?>" class="widefat" id="edit-form-item-default-<?php echo esc_attr( $field->field_id ); ?>" maxlength="255" />
403
  </label>
404
  </p>
405
+ <?php elseif ( in_array( $field->field_type, array( 'address' ), true ) ) : ?>
406
  <!-- Default Country -->
407
  <p class="description description-wide">
408
  <label for="edit-form-item-default-<?php echo esc_attr( $field->field_id ); ?>">
437
  <?php endif; ?>
438
  <?php endif; ?>
439
 
440
+ <?php if ( ! in_array( $field->field_type, array( 'verification', 'secret', 'submit' ), true ) ) : ?>
441
  <!-- Delete link -->
442
  <a href="<?php echo esc_url( wp_nonce_url( admin_url( 'admin.php?page=visual-form-builder&amp;action=delete_field&amp;form=' . $form_nav_selected_id . '&amp;field=' . $field->field_id ), 'delete-field-' . $form_nav_selected_id ) ); ?>" class="vfb-button vfb-delete item-delete submitdelete deletion">
443
  <?php esc_html_e( 'Delete', 'visual-form-builder' ); ?>
admin/class-forms-edit.php CHANGED
@@ -89,7 +89,7 @@ class Visual_Form_Builder_Forms_Edit {
89
  <p><?php esc_html_e( 'Click to add fields', 'visual-form-builder' ); ?><span class="spinner"></span></p>
90
 
91
  <form id="vfb-form-items" method="post" action="">
92
- <input name="action" type="hidden" value="create_field" />
93
  <input name="form_id" type="hidden" value="<?php echo esc_attr( $form_nav_selected_id ); ?>" />
94
  <?php
95
  wp_nonce_field( 'create-field-' . $form_nav_selected_id );
@@ -121,7 +121,7 @@ class Visual_Form_Builder_Forms_Edit {
121
  <div id="vfb-form-builder-management">
122
  <div class="form-edit">
123
  <form method="post" id="visual-form-builder-update" action="">
124
- <input name="action" type="hidden" value="update_form" />
125
  <input name="form_id" type="hidden" value="<?php echo esc_attr( $form_nav_selected_id ); ?>" />
126
  <?php wp_nonce_field( 'vfb_update_form' ); ?>
127
  <div id="form-editor-header">
89
  <p><?php esc_html_e( 'Click to add fields', 'visual-form-builder' ); ?><span class="spinner"></span></p>
90
 
91
  <form id="vfb-form-items" method="post" action="">
92
+ <input name="vfb-action" type="hidden" value="create_field" />
93
  <input name="form_id" type="hidden" value="<?php echo esc_attr( $form_nav_selected_id ); ?>" />
94
  <?php
95
  wp_nonce_field( 'create-field-' . $form_nav_selected_id );
121
  <div id="vfb-form-builder-management">
122
  <div class="form-edit">
123
  <form method="post" id="visual-form-builder-update" action="">
124
+ <input name="vfb-action" type="hidden" value="update_form" />
125
  <input name="form_id" type="hidden" value="<?php echo esc_attr( $form_nav_selected_id ); ?>" />
126
  <?php wp_nonce_field( 'vfb_update_form' ); ?>
127
  <div id="form-editor-header">
admin/class-forms-list.php CHANGED
@@ -61,15 +61,66 @@ class Visual_Form_Builder_Forms_List extends WP_List_Table {
61
  $actions = array();
62
 
63
  // Edit Form.
64
- $edit_link = admin_url( 'admin.php?page=visual-form-builder' );
65
- $form_title = sprintf( '<strong><a href="%s&action=%s&form=%s" id="%3$s" class="view-form">%s</a></strong>', $edit_link, 'edit', $item['form_id'], $item['form_title'] );
66
- $actions['edit'] = sprintf( '<a href="%s&action=%s&form=%s" id="%3$s" class="view-form">%s</a>', $edit_link, 'edit', $item['form_id'], esc_html__( 'Edit', 'visual-form-builder' ) );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
67
 
68
  // Duplicate Form.
69
- $actions['copy'] = sprintf( '<a href="%s&action=%s&form=%s" id="%3$s" class="view-form">%s</a>', wp_nonce_url( admin_url( 'admin.php?page=visual-form-builder' ), 'copy-form-' . $item['form_id'] ), 'copy_form', $item['form_id'], esc_html__( 'Duplicate', 'visual-form-builder' ) );
 
 
 
 
 
 
 
 
 
 
 
 
 
70
 
71
  // Delete Form.
72
- $actions['delete'] = sprintf( '<a href="%s&action=%s&form=%s" id="%3$s" class="view-form">%s</a>', wp_nonce_url( admin_url( 'admin.php?page=visual-form-builder' ), 'delete-form-' . $item['form_id'] ), 'delete_form', $item['form_id'], esc_html__( 'Delete', 'visual-form-builder' ) );
 
 
 
 
 
 
 
 
 
 
 
 
 
73
 
74
  return sprintf( '%1$s %2$s', $form_title, $this->row_actions( $actions ) );
75
  }
61
  $actions = array();
62
 
63
  // Edit Form.
64
+ $edit_link = admin_url( 'admin.php?page=visual-form-builder' );
65
+ $form_title = sprintf( '<strong>%s</strong>', $item['form_title'] );
66
+
67
+ $form_title_url = add_query_arg(
68
+ array(
69
+ 'page' => 'visual-form-builder',
70
+ 'vfb-action' => 'edit',
71
+ 'form' => $item['form_id'],
72
+ ),
73
+ admin_url( 'admin.php' )
74
+ );
75
+
76
+ $form_title = sprintf( '<a href="%s">%s</a>', esc_url( $form_title_url ), $form_title );
77
+
78
+ $edit_url = add_query_arg(
79
+ array(
80
+ 'page' => 'visual-form-builder',
81
+ 'vfb-action' => 'edit',
82
+ 'form' => $item['form_id'],
83
+ ),
84
+ admin_url( 'admin.php' )
85
+ );
86
+
87
+ $actions['edit'] = sprintf(
88
+ '<a href="%s">%s</a>',
89
+ esc_url( $edit_url ),
90
+ esc_html__( 'Edit', 'visual-form-builder' )
91
+ );
92
 
93
  // Duplicate Form.
94
+ $copy_url = add_query_arg(
95
+ array(
96
+ 'page' => 'visual-form-builder',
97
+ 'vfb-action' => 'copy_form',
98
+ 'form' => $item['form_id'],
99
+ ),
100
+ wp_nonce_url( admin_url( 'admin.php' ), 'copy-form-' . $item['form_id'] )
101
+ );
102
+
103
+ $actions['copy'] = sprintf(
104
+ '<a href="%s">%s</a>',
105
+ esc_url( $copy_url ),
106
+ esc_html__( 'Duplicate', 'visual-form-builder' )
107
+ );
108
 
109
  // Delete Form.
110
+ $delete_url = add_query_arg(
111
+ array(
112
+ 'page' => 'visual-form-builder',
113
+ 'vfb-action' => 'delete_form',
114
+ 'form' => $item['form_id'],
115
+ ),
116
+ wp_nonce_url( admin_url( 'admin.php' ), 'delete-form-' . $item['form_id'] )
117
+ );
118
+
119
+ $actions['delete'] = sprintf(
120
+ '<a href="%s">%s</a>',
121
+ esc_url( $delete_url ),
122
+ esc_html__( 'Delete', 'visual-form-builder' )
123
+ );
124
 
125
  return sprintf( '%1$s %2$s', $form_title, $this->row_actions( $actions ) );
126
  }
admin/class-forms-new.php CHANGED
@@ -12,7 +12,7 @@ class Visual_Form_Builder_Forms_New {
12
  public function display() {
13
  ?>
14
  <form method="post" id="visual-form-builder-new-form" action="">
15
- <input name="action" type="hidden" value="create_form" />
16
  <?php
17
  wp_nonce_field( 'create_form' );
18
 
12
  public function display() {
13
  ?>
14
  <form method="post" id="visual-form-builder-new-form" action="">
15
+ <input name="vfb-action" type="hidden" value="create_form" />
16
  <?php
17
  wp_nonce_field( 'create_form' );
18
 
admin/class-page-settings.php CHANGED
@@ -15,7 +15,7 @@ class Visual_Form_Builder_Page_Settings {
15
  <div class="wrap">
16
  <h2><?php esc_html_e( 'Settings', 'visual-form-builder' ); ?></h2>
17
  <form id="vfb-settings" method="post">
18
- <input name="action" type="hidden" value="vfb_settings" />
19
  <?php wp_nonce_field( 'vfb-update-settings' ); ?>
20
  <h3><?php esc_html_e( 'Global Settings', 'visual-form-builder' ); ?></h3>
21
  <p><?php esc_html_e( 'These settings will affect all forms on your site.', 'visual-form-builder' ); ?></p>
15
  <div class="wrap">
16
  <h2><?php esc_html_e( 'Settings', 'visual-form-builder' ); ?></h2>
17
  <form id="vfb-settings" method="post">
18
+ <input name="vfb-action" type="hidden" value="vfb_settings" />
19
  <?php wp_nonce_field( 'vfb-update-settings' ); ?>
20
  <h3><?php esc_html_e( 'Global Settings', 'visual-form-builder' ); ?></h3>
21
  <p><?php esc_html_e( 'These settings will affect all forms on your site.', 'visual-form-builder' ); ?></p>
admin/class-save.php CHANGED
@@ -24,7 +24,7 @@ class Visual_Form_Builder_Admin_Save {
24
  public function add_new_form() {
25
  global $wpdb;
26
 
27
- if ( ! isset( $_POST['action'] ) || ! isset( $_GET['page'] ) ) {
28
  return;
29
  }
30
 
@@ -32,7 +32,7 @@ class Visual_Form_Builder_Admin_Save {
32
  return;
33
  }
34
 
35
- if ( 'create_form' !== $_POST['action'] ) {
36
  return;
37
  }
38
 
@@ -133,7 +133,7 @@ class Visual_Form_Builder_Admin_Save {
133
  public function save_update_form() {
134
  global $wpdb;
135
 
136
- if ( ! isset( $_POST['action'] ) || ! isset( $_GET['page'] ) ) {
137
  return;
138
  }
139
 
@@ -141,7 +141,7 @@ class Visual_Form_Builder_Admin_Save {
141
  return;
142
  }
143
 
144
- if ( 'update_form' !== $_POST['action'] ) {
145
  return;
146
  }
147
 
@@ -263,7 +263,7 @@ class Visual_Form_Builder_Admin_Save {
263
  public function save_trash_delete_form() {
264
  global $wpdb;
265
 
266
- if ( ! isset( $_GET['action'] ) || ! isset( $_GET['page'] ) ) {
267
  return;
268
  }
269
 
@@ -271,7 +271,7 @@ class Visual_Form_Builder_Admin_Save {
271
  return;
272
  }
273
 
274
- if ( 'delete_form' !== $_GET['action'] ) {
275
  return;
276
  }
277
 
@@ -285,7 +285,7 @@ class Visual_Form_Builder_Admin_Save {
285
  $wpdb->query( $wpdb->prepare( 'DELETE FROM ' . VFB_WP_ENTRIES_TABLE_NAME . ' WHERE form_id = %d', $id ) );
286
 
287
  // Redirect to keep the URL clean (use AJAX in the future?).
288
- wp_redirect( add_query_arg( 'action', 'deleted', 'admin.php?page=visual-form-builder' ) );
289
  exit();
290
  }
291
 
@@ -297,7 +297,7 @@ class Visual_Form_Builder_Admin_Save {
297
  public function save_copy_form() {
298
  global $wpdb;
299
 
300
- if ( ! isset( $_GET['action'] ) || ! isset( $_GET['page'] ) ) {
301
  return;
302
  }
303
 
@@ -305,7 +305,7 @@ class Visual_Form_Builder_Admin_Save {
305
  return;
306
  }
307
 
308
- if ( 'copy_form' !== $_GET['action'] ) {
309
  return;
310
  }
311
 
@@ -370,7 +370,7 @@ class Visual_Form_Builder_Admin_Save {
370
  $wpdb->insert( VFB_WP_FIELDS_TABLE_NAME, $data );
371
 
372
  // If a parent field, save the old ID and the new ID to update new parent ID.
373
- if ( in_array( $field->field_type, array( 'fieldset', 'section', 'verification' ) ) ) {
374
  $parents[ $field->field_id ] = $wpdb->insert_id;
375
  }
376
 
@@ -410,7 +410,7 @@ class Visual_Form_Builder_Admin_Save {
410
  * @return [type] [description]
411
  */
412
  public function save_settings() {
413
- if ( ! isset( $_POST['action'] ) || ! isset( $_GET['page'] ) ) {
414
  return;
415
  }
416
 
@@ -418,7 +418,7 @@ class Visual_Form_Builder_Admin_Save {
418
  return;
419
  }
420
 
421
- if ( 'vfb_settings' !== $_POST['action'] ) {
422
  return;
423
  }
424
 
24
  public function add_new_form() {
25
  global $wpdb;
26
 
27
+ if ( ! isset( $_POST['vfb-action'] ) || ! isset( $_GET['page'] ) ) {
28
  return;
29
  }
30
 
32
  return;
33
  }
34
 
35
+ if ( 'create_form' !== $_POST['vfb-action'] ) {
36
  return;
37
  }
38
 
133
  public function save_update_form() {
134
  global $wpdb;
135
 
136
+ if ( ! isset( $_POST['vfb-action'] ) || ! isset( $_GET['page'] ) ) {
137
  return;
138
  }
139
 
141
  return;
142
  }
143
 
144
+ if ( 'update_form' !== $_POST['vfb-action'] ) {
145
  return;
146
  }
147
 
263
  public function save_trash_delete_form() {
264
  global $wpdb;
265
 
266
+ if ( ! isset( $_GET['vfb-action'] ) || ! isset( $_GET['page'] ) ) {
267
  return;
268
  }
269
 
271
  return;
272
  }
273
 
274
+ if ( 'delete_form' !== $_GET['vfb-action'] ) {
275
  return;
276
  }
277
 
285
  $wpdb->query( $wpdb->prepare( 'DELETE FROM ' . VFB_WP_ENTRIES_TABLE_NAME . ' WHERE form_id = %d', $id ) );
286
 
287
  // Redirect to keep the URL clean (use AJAX in the future?).
288
+ wp_redirect( add_query_arg( 'vfb-action', 'deleted', 'admin.php?page=visual-form-builder' ) );
289
  exit();
290
  }
291
 
297
  public function save_copy_form() {
298
  global $wpdb;
299
 
300
+ if ( ! isset( $_GET['vfb-action'] ) || ! isset( $_GET['page'] ) ) {
301
  return;
302
  }
303
 
305
  return;
306
  }
307
 
308
+ if ( 'copy_form' !== $_GET['vfb-action'] ) {
309
  return;
310
  }
311
 
370
  $wpdb->insert( VFB_WP_FIELDS_TABLE_NAME, $data );
371
 
372
  // If a parent field, save the old ID and the new ID to update new parent ID.
373
+ if ( in_array( $field->field_type, array( 'fieldset', 'section', 'verification' ), true ) ) {
374
  $parents[ $field->field_id ] = $wpdb->insert_id;
375
  }
376
 
410
  * @return [type] [description]
411
  */
412
  public function save_settings() {
413
+ if ( ! isset( $_POST['vfb-action'] ) || ! isset( $_GET['page'] ) ) {
414
  return;
415
  }
416
 
418
  return;
419
  }
420
 
421
+ if ( 'vfb_settings' !== $_POST['vfb-action'] ) {
422
  return;
423
  }
424
 
admin/class-widget.php CHANGED
@@ -49,7 +49,7 @@ class Visual_Form_Builder_Widget extends WP_Widget {
49
  $title = isset( $instance['title'] ) ? $instance['title'] : '';
50
  ?>
51
  <p>
52
- <label for="<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>"><?php _esc_html_e( 'Title:', 'visual-form-builder' ); ?></label>
53
  <input class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'title' ) ); ?>" type="text" value="<?php echo esc_attr( $title ); ?>" />
54
  </p>
55
  <p>
49
  $title = isset( $instance['title'] ) ? $instance['title'] : '';
50
  ?>
51
  <p>
52
+ <label for="<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>"><?php esc_html_e( 'Title:', 'visual-form-builder' ); ?></label>
53
  <input class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'title' ) ); ?>" type="text" value="<?php echo esc_attr( $title ); ?>" />
54
  </p>
55
  <p>
public/class-email.php CHANGED
@@ -264,7 +264,7 @@ class Visual_Form_Builder_Email {
264
  $removed_field_types = array( 'verification', 'secret', 'submit' );
265
 
266
  // Don't add certain fields to the email.
267
- if ( ! in_array( $field->field_type, $removed_field_types ) ) {
268
  if ( 'fieldset' === $field->field_type ) {
269
  $body .= sprintf(
270
  '<tr style="background-color:#393E40;color:white;font-size:14px;">
264
  $removed_field_types = array( 'verification', 'secret', 'submit' );
265
 
266
  // Don't add certain fields to the email.
267
+ if ( ! in_array( $field->field_type, $removed_field_types, true ) ) {
268
  if ( 'fieldset' === $field->field_type ) {
269
  $body .= sprintf(
270
  '<tr style="background-color:#393E40;color:white;font-size:14px;">
public/class-form-display.php CHANGED
@@ -305,12 +305,12 @@ class Visual_Form_Builder_Form_Display {
305
  // Save section ID for future comparison.
306
  $sec_id = $field_id;
307
  $open_section = true;
308
- } elseif ( ! in_array( $field_type, array( 'verification', 'secret', 'submit' ) ) ) {
309
- $columns_choice = ( ! empty( $field->field_size ) && in_array( $field_type, array( 'radio', 'checkbox' ) ) ) ? esc_attr( " vfb-$field->field_size" ) : '';
310
 
311
  if ( 'hidden' !== $field_type ) {
312
  // Don't add for attribute for certain form items.
313
- $for = ! in_array( $field_type, array( 'checkbox', 'radio', 'time', 'address', 'instructions' ) ) ? ' for="%4$s"' : '';
314
 
315
  $output .= sprintf(
316
  '<li class="vfb-item vfb-item-%1$s %2$s %3$s" id="item-%4$s"><label' . $for . ' class="vfb-desc">%5$s %6$s</label>',
@@ -322,7 +322,7 @@ class Visual_Form_Builder_Form_Display {
322
  $required_span
323
  );
324
  }
325
- } elseif ( in_array( $field_type, array( 'verification', 'secret' ) ) ) {
326
 
327
  if ( 'verification' === $field_type ) {
328
  $verification .= sprintf(
@@ -399,7 +399,7 @@ class Visual_Form_Builder_Form_Display {
399
  case 'number':
400
  case 'phone':
401
  // HTML5 types.
402
- if ( in_array( $field_type, array( 'email', 'url' ) ) ) {
403
  $type = esc_attr( $field_type );
404
  } elseif ( 'phone' == $field_type ) {
405
  $type = 'tel';
@@ -781,7 +781,7 @@ class Visual_Form_Builder_Form_Display {
781
  }
782
 
783
  // Closing </li>.
784
- $output .= ! in_array( $field_type, array( 'verification', 'secret', 'submit', 'fieldset', 'section' ) ) ? '</li>' : '';
785
  }
786
 
787
  // Close user-added fields.
305
  // Save section ID for future comparison.
306
  $sec_id = $field_id;
307
  $open_section = true;
308
+ } elseif ( ! in_array( $field_type, array( 'verification', 'secret', 'submit' ), true ) ) {
309
+ $columns_choice = ! empty( $field->field_size ) && in_array( $field_type, array( 'radio', 'checkbox' ), true ) ? esc_attr( " vfb-$field->field_size" ) : '';
310
 
311
  if ( 'hidden' !== $field_type ) {
312
  // Don't add for attribute for certain form items.
313
+ $for = ! in_array( $field_type, array( 'checkbox', 'radio', 'time', 'address', 'instructions' ), true ) ? ' for="%4$s"' : '';
314
 
315
  $output .= sprintf(
316
  '<li class="vfb-item vfb-item-%1$s %2$s %3$s" id="item-%4$s"><label' . $for . ' class="vfb-desc">%5$s %6$s</label>',
322
  $required_span
323
  );
324
  }
325
+ } elseif ( in_array( $field_type, array( 'verification', 'secret' ), true ) ) {
326
 
327
  if ( 'verification' === $field_type ) {
328
  $verification .= sprintf(
399
  case 'number':
400
  case 'phone':
401
  // HTML5 types.
402
+ if ( in_array( $field_type, array( 'email', 'url' ), true ) ) {
403
  $type = esc_attr( $field_type );
404
  } elseif ( 'phone' == $field_type ) {
405
  $type = 'tel';
781
  }
782
 
783
  // Closing </li>.
784
+ $output .= ! in_array( $field_type, array( 'verification', 'secret', 'submit', 'fieldset', 'section' ), true ) ? '</li>' : '';
785
  }
786
 
787
  // Close user-added fields.
public/class-load-css-js.php CHANGED
@@ -98,7 +98,7 @@ class Visual_Form_Builder_Scripts_Loader {
98
  );
99
 
100
  // Load localized vaidation and datepicker text, if translation files exist.
101
- if ( in_array( $locale, $translations ) ) {
102
  wp_register_script( 'vfb-validation-i18n', VFB_WP_PLUGIN_URL . "public/assets/js/i18n/validate/messages-$locale.js", array( 'jquery-form-validation' ), '1.9.0', true );
103
  wp_register_script( 'vfb-datepicker-i18n', VFB_WP_PLUGIN_URL . "public/assets/js/i18n/datepicker/datepicker-$locale.js", array( 'jquery-ui-datepicker' ), '1.0', true );
104
  } else {
98
  );
99
 
100
  // Load localized vaidation and datepicker text, if translation files exist.
101
+ if ( in_array( $locale, $translations, true ) ) {
102
  wp_register_script( 'vfb-validation-i18n', VFB_WP_PLUGIN_URL . "public/assets/js/i18n/validate/messages-$locale.js", array( 'jquery-form-validation' ), '1.9.0', true );
103
  wp_register_script( 'vfb-datepicker-i18n', VFB_WP_PLUGIN_URL . "public/assets/js/i18n/datepicker/datepicker-$locale.js", array( 'jquery-ui-datepicker' ), '1.0', true );
104
  } else {
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: mmuro
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=G87A9UN9CLPH4&lc=US&item_name=Visual%20Form%20Builder&currency_code=USD&bn=PP%2dDonationsBF%3abtn_donate_SM%2egif%3aNonHosted
4
  Tags: form, forms, contact form, contact forms, form, forms, form to email, email form, email, input, validation, jquery, shortcode, form builder, contact form builder, form manager, form creator
5
  Requires at least: 4.7
6
- Tested up to: 5.9.3
7
- Stable tag: 3.0.9
8
  License: GPLv2 or later
9
 
10
  Build beautiful, fully functional contact forms in only a few minutes without writing PHP, CSS, or HTML.
@@ -231,6 +231,14 @@ function my_scripts_method() {
231
 
232
  == Changelog ==
233
 
 
 
 
 
 
 
 
 
234
  **Version 3.0.8 - Apr 08, 2022**
235
 
236
  * Update Entries table with CSRF protection
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=G87A9UN9CLPH4&lc=US&item_name=Visual%20Form%20Builder&currency_code=USD&bn=PP%2dDonationsBF%3abtn_donate_SM%2egif%3aNonHosted
4
  Tags: form, forms, contact form, contact forms, form, forms, form to email, email form, email, input, validation, jquery, shortcode, form builder, contact form builder, form manager, form creator
5
  Requires at least: 4.7
6
+ Tested up to: 6.0
7
+ Stable tag: 3.1
8
  License: GPLv2 or later
9
 
10
  Build beautiful, fully functional contact forms in only a few minutes without writing PHP, CSS, or HTML.
231
 
232
  == Changelog ==
233
 
234
+ **Version 3.1 - May 27, 2022**
235
+
236
+ * Fix wrong function name in widget class
237
+
238
+ **Version 3.0.9 - May 19, 2022**
239
+
240
+ * Fix various security issues
241
+
242
  **Version 3.0.8 - Apr 08, 2022**
243
 
244
  * Update Entries table with CSRF protection
visual-form-builder.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Visual Form Builder
4
  Plugin URI: https://wordpress.org/plugins/visual-form-builder/
5
  Description: Dynamically build forms using a simple interface. Forms include jQuery validation, a basic logic-based verification system, and entry tracking.
6
- Version: 3.0.9
7
  Author: Matthew Muro
8
  Author URI: http://vfbpro.com
9
  Text Domain: visual-form-builder
@@ -29,7 +29,7 @@ class Visual_Form_Builder {
29
  *
30
  * @var [type]
31
  */
32
- protected $version = '3.0.9';
33
 
34
  /**
35
  * The current DB version. Used if we need to update the DB later.
3
  Plugin Name: Visual Form Builder
4
  Plugin URI: https://wordpress.org/plugins/visual-form-builder/
5
  Description: Dynamically build forms using a simple interface. Forms include jQuery validation, a basic logic-based verification system, and entry tracking.
6
+ Version: 3.1
7
  Author: Matthew Muro
8
  Author URI: http://vfbpro.com
9
  Text Domain: visual-form-builder
29
  *
30
  * @var [type]
31
  */
32
+ protected $version = '3.1';
33
 
34
  /**
35
  * The current DB version. Used if we need to update the DB later.