mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-18 06:03:38 +09:00
- settings optimization;
This commit is contained in:
@@ -211,10 +211,10 @@ if ( ! class_exists( 'Form' ) ) {
|
||||
$form_timestamp = trim($_POST['timestamp']);
|
||||
$live_timestamp = current_time( 'timestamp' );
|
||||
|
||||
if ( $form_timestamp == '' && um_get_option('enable_timebot') == 1 )
|
||||
if ( $form_timestamp == '' && UM()->options()->get( 'enable_timebot' ) == 1 )
|
||||
wp_die( __('Hello, spam bot!','ultimate-member') );
|
||||
|
||||
if ( !current_user_can('manage_options') && $live_timestamp - $form_timestamp < 6 && um_get_option('enable_timebot') == 1 )
|
||||
if ( !current_user_can('manage_options') && $live_timestamp - $form_timestamp < 6 && UM()->options()->get( 'enable_timebot' ) == 1 )
|
||||
wp_die( __('Whoa, slow down! You\'re seeing this message because you tried to submit a form too fast and we think you might be a spam bot. If you are a real human being please wait a few seconds before submitting the form. Thanks!','ultimate-member') );
|
||||
|
||||
}
|
||||
@@ -292,7 +292,7 @@ if ( ! class_exists( 'Form' ) ) {
|
||||
|
||||
$global_role = get_option( 'default_role' ); // WP Global settings
|
||||
|
||||
$um_global_role = um_get_option( 'register_role' ); // UM Settings Global settings
|
||||
$um_global_role = UM()->options()->get( 'register_role' ); // UM Settings Global settings
|
||||
if ( ! empty( $um_global_role ) )
|
||||
$global_role = $um_global_role; // Form Global settings
|
||||
|
||||
|
||||
Reference in New Issue
Block a user