PluginProbe
weForms – Easy Drag & Drop Contact Form Builder For WordPress / 1.6.24
weForms – Easy Drag & Drop Contact Form Builder For WordPress v1.6.24
1.6.7 1.6.8 1.6.9 1.6.12 1.6.13 1.6.14 1.6.15 1.6.16 1.6.17 1.6.18 1.6.19 1.6.2 1.6.20 1.6.21 1.6.22 1.6.23 1.6.24 1.6.25 1.6.26 1.6.27 1.6.28 1.6.3 1.6.4 1.6.5 1.6.6 All 74 releases
← All changes | includes/admin/class-admin.php +25 -1 1.6.51.6.24 View file →
@@ -20,8 +20,9 @@
20 20 add_filter( 'weforms_settings_tabs', [ $this, 'set_default_settings' ], 5 );
21 21 add_action( 'weforms_settings_tab_content_general', [ $this, 'settings_tab_general' ] );
22 22 add_action( 'weforms_settings_tab_content_recaptcha', [ $this, 'settings_tab_recaptcha' ] );
23 23 add_action( 'weforms_settings_tab_content_secure-database', [ $this, 'settings_tab_secure_database' ] );
24 + add_action( 'weforms_settings_tab_content_humanpresence', [ $this, 'settings_tab_humanpresence' ] );
24 25 add_action( 'weforms_settings_tab_content_privacy', [ $this, 'settings_tab_privacy' ] );
25 26 }
26 27
27 28 /**
@@ -168,11 +169,19 @@
168 169 *
169 170 * @return void
170 171 */
171 172 public function export_form_entries() {
173 + if ( ! current_user_can( 'administrator' ) ) {
174 + wp_die( esc_html__( 'You do not have permission to export entries', 'weforms' ) );
175 + }
176 +
177 + if ( ! wp_verify_nonce( $_REQUEST['_wpnonce'], 'weforms-export-entries' ) ) {
178 + wp_die( esc_html__( 'Invalid nonce', 'weforms' ) );
179 + }
180 +
172 181 $form_id = isset( $_REQUEST['selected_forms'] ) ? absint( $_REQUEST['selected_forms'] ) : 0;
173 182
174 - if ( !$form_id ) {
183 + if ( ! $form_id ) {
175 184 return;
176 185 }
177 186
178 187 $entry_array = [];
@@ -336,8 +345,13 @@
336 345 'label' => __( 'Secure Database', 'weforms' ),
337 346 'icon' => WEFORMS_ASSET_URI . '/images/integrations/secure-database.png',
338 347 ];
339 348
349 + $tabs['humanpresence'] = [
350 + 'label' => __( 'Human Presence', 'weforms' ),
351 + 'icon' => WEFORMS_ASSET_URI . '/images/integrations/hp-shield.svg',
352 + ];
353 +
340 354 /* TODO: Refactor this block when more options are added in privacy settings*/
341 355 if ( class_exists( 'WeForms_Pro' ) ) {
342 356 $tabs['privacy'] = [
343 357 'label' => __( 'Privacy', 'weforms' ),
@@ -377,8 +391,18 @@
377 391 * @return void
378 392 */
379 393 public function settings_tab_secure_database( $tab ) {
380 394 include __DIR__ . '/views/weforms-settings-secure-database.php';
395 + }
396 + /**
397 + * Human Presence tab content
398 + *
399 + * @param array $tab
400 + *
401 + * @return void
402 + */
403 + public function settings_tab_humanpresence( $tab ) {
404 + include __DIR__ . '/views/weforms-settings-humanpresence.php';
381 405 }
382 406 /**
383 407 * Privacy tab content
384 408 *