PluginProbe
weForms – Easy Drag & Drop Contact Form Builder For WordPress / 1.6.17
weForms – Easy Drag & Drop Contact Form Builder For WordPress v1.6.17
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 +44 -0 1.6.31.6.17 View file →
@@ -9,8 +9,10 @@
9 9 add_action( 'init', [ $this, 'register_post_type' ] );
10 10 add_action( 'admin_menu', [ $this, 'register_admin_menu' ] );
11 11 add_action( 'pre_update_option_wpuf_general', [ $this, 'watch_wpuf_settings' ] );
12 12
13 + add_action( 'admin_notices', array( $this, 'wpuf_premium_cta' ) );
14 +
13 15 add_filter( 'admin_footer_text', [ $this, 'admin_footer_text' ] );
14 16 add_filter( 'admin_post_weforms_export_forms', [ $this, 'export_forms' ] );
15 17 add_filter( 'admin_post_weforms_export_form_entries', [ $this, 'export_form_entries' ] );
16 18
@@ -18,8 +20,9 @@
18 20 add_filter( 'weforms_settings_tabs', [ $this, 'set_default_settings' ], 5 );
19 21 add_action( 'weforms_settings_tab_content_general', [ $this, 'settings_tab_general' ] );
20 22 add_action( 'weforms_settings_tab_content_recaptcha', [ $this, 'settings_tab_recaptcha' ] );
21 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' ] );
22 25 add_action( 'weforms_settings_tab_content_privacy', [ $this, 'settings_tab_privacy' ] );
23 26 }
24 27
25 28 /**
@@ -334,8 +337,13 @@
334 337 'label' => __( 'Secure Database', 'weforms' ),
335 338 'icon' => WEFORMS_ASSET_URI . '/images/integrations/secure-database.png',
336 339 ];
337 340
341 + $tabs['humanpresence'] = [
342 + 'label' => __( 'Human Presence', 'weforms' ),
343 + 'icon' => WEFORMS_ASSET_URI . '/images/integrations/hp-shield.svg',
344 + ];
345 +
338 346 /* TODO: Refactor this block when more options are added in privacy settings*/
339 347 if ( class_exists( 'WeForms_Pro' ) ) {
340 348 $tabs['privacy'] = [
341 349 'label' => __( 'Privacy', 'weforms' ),
@@ -377,8 +385,18 @@
377 385 public function settings_tab_secure_database( $tab ) {
378 386 include __DIR__ . '/views/weforms-settings-secure-database.php';
379 387 }
380 388 /**
389 + * Human Presence tab content
390 + *
391 + * @param array $tab
392 + *
393 + * @return void
394 + */
395 + public function settings_tab_humanpresence( $tab ) {
396 + include __DIR__ . '/views/weforms-settings-humanpresence.php';
397 + }
398 + /**
381 399 * Privacy tab content
382 400 *
383 401 * @param array $tab
384 402 *
@@ -386,5 +404,31 @@
386 404 */
387 405 public function settings_tab_privacy( $tab ) {
388 406 include __DIR__ . '/views/weforms-settings-privacy.php';
389 407 }
408 +
409 + /**
410 + * WeForms Pro CTA notice
411 + *
412 + * @since 1.6.5
413 + */
414 + public function wpuf_premium_cta() {
415 + $screen = get_current_screen();
416 + if ( $screen && $screen->base && 'toplevel_page_weforms' !== $screen->base ) {
417 + return;
418 + }
419 +
420 + if ( ! class_exists( 'WeForms_Pro' ) ) {
421 + ?>
422 + <div class="notice updated premium-cta">
423 + <p style="display: flex;align-items: center;">
424 + <img style="padding-right:15px;" src="<?php echo WEFORMS_ASSET_URI . '/images/weforms-logo.png'; ?>">
425 + <?php _e( 'You&#39;re using weForms Free. For more features, modules and more consider upgrading to Pro.' , 'weforms' ); ?>
426 + </p>
427 + <p class="submit">
428 + <a href="https://weformspro.com/get-premium/?utm_source=Entries&utm_medium=Button&utm_campaign=Upgrade%20Now" target="_blank" class="button-primary"><?php _e( 'UPGRADE NOW!' , 'weforms' ); ?></a>
429 + </p>
430 + </div>
431 + <?php
432 + }
433 + }
390 434 }