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
← All changes | admin/advanced-settings/includes/forms/ec-bypass.php +17 -1 3.9.8 → 4.0.3 View file →
@@ -1,11 +1,27 @@
1 1 <?php
2 +// Exit if accessed directly
3 +if ( ! defined( 'ABSPATH' ) ) exit;
2 4
3 5 add_filter( 'wppb_email_confirmation_on_register', 'wppb_toolbox_bypass_email_confirmation', 2, 20 );
4 6 function wppb_toolbox_bypass_email_confirmation( $email_confirmation, $global_request ) {
5 7 $forms = wppb_toolbox_get_settings( 'forms', 'ec-bypass' );
6 8
7 - if ( in_array( $global_request['form_name'], $forms ) )
9 + if ( ! empty( $global_request['form_name'] ) && is_array( $forms ) && in_array( $global_request['form_name'], $forms, true ) ) {
8 10 return 'no';
11 + }
9 12
10 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 +
11 27 }