PluginProbe
User Profile Builder – Beautiful User Registration Forms, User Profiles & User Role Editor / 4.0.3
User Profile Builder – Beautiful User Registration Forms, User Profiles & User Role Editor v4.0.3
4.0.3 4.0.2 4.0.1 4.0.0 3.16.6 3.16.5 3.16.4 3.16.3 3.16.2 3.16.1 3.16.0 3.15.9 3.9.9 3.9.5 3.9.6 3.9.7 3.9.8 1.1.7 1.1.8 1.1.9 2.0.2 2.0.3 2.0.4 2.0.5 2.0.6 All 341 releases
profile-builder / admin / advanced-settings / includes / forms / ec-bypass.php

ec-bypass.php in User Profile Builder – Beautiful User Registration Forms, User Profiles & User Role Editor 4.0.3, at admin/advanced-settings/includes/forms/ec-bypass.php

28 lines 1003 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 // Exit if accessed directly
3 if ( ! defined( 'ABSPATH' ) ) exit;
4
5 add_filter( 'wppb_email_confirmation_on_register', 'wppb_toolbox_bypass_email_confirmation', 2, 20 );
6 function wppb_toolbox_bypass_email_confirmation( $email_confirmation, $global_request ) {
7 $forms = wppb_toolbox_get_settings( 'forms', 'ec-bypass' );
8
9 if ( ! empty( $global_request['form_name'] ) && is_array( $forms ) && in_array( $global_request['form_name'], $forms, true ) ) {
10 return 'no';
11 }
12
13 return $email_confirmation;
14 }
15
16 add_filter( 'wppb_register_send_credentials_via_email', 'wppb_toolbox_force_enable_send_credentials_via_email', 2, 20 );
17 function wppb_toolbox_force_enable_send_credentials_via_email( $send_credentials, $user_id, $form_args ) {
18
19 $forms = wppb_toolbox_get_settings( 'forms', 'ec-bypass' );
20
21 if ( ! empty( $form_args['form_name'] ) && is_array( $forms ) && in_array( $form_args['form_name'], $forms, true ) ) {
22 return 'no';
23 }
24
25 return $send_credentials;
26
27 }
28