'user_pass', 'fourlogin_lostpassword_url' => ('yes' == $fourlogin_options_lostpassword )? wp_lostpassword_url() : '', 'fourlogin_password_placeholder' => (isset( $_GET['fourloginmode'] ) && 'templogin' == $_GET['fourloginmode'] && wp_verify_nonce($nonce, 'fourlogin_mode_nonce')) || isset($_POST['fourlogin_login_code']) ? '' : __( 'Enter the password showed by the slot for this site in 4Login', '4login-for-secure-and-smart-access') ) ); } // qr-commentout /* wp_enqueue_style('fourlogin-qrlogin', FOURLOGIN_ROOT_URL . 'features/login/qrlogin/fourlogin-qrlogin.css'); */ } } add_action( 'login_enqueue_scripts', 'fourlogin_login_form_scripts'); /** * Creating login form * if admin set "dont show lostpassword link", that link will not appear. * */ function fourlogin_make_login_form() { $fourlogin_options = fourlogin_options_get(); $nonce = wp_create_nonce('fourlogin_login_code_nonce'); if ( empty($fourlogin_options[FOURLOGIN_APP_SERVICE_ID]) ){ return; } // qr-commentout /* if($fourlogin_options[FOURLOGIN_OPTION_ENABLE_QRLOGIN]=="yes"){ fourlogin_make_qrlogin_form(); wp_enqueue_script( 'fourlogin-qrlogin-auth', esc_url(FOURLOGIN_ROOT_URL.'features/login/qrlogin/fourlogin-qrlogin-auth.js'), array(), null, true ); } */ if (isset($_GET['fourloginmode_nonce'])) { $nonce = sanitize_key(wp_unslash($_GET['fourloginmode_nonce'])); if ( (isset( $_GET['fourloginmode'] ) && 'templogin' == $_GET['fourloginmode'] && wp_verify_nonce($nonce, 'fourlogin_mode_nonce')) || isset($_POST['fourlogin_login_code']) ) { $username = esc_attr(sanitize_text_field(wp_unslash( isset( $_GET['log'] ) ? $_GET['log'] : ( isset( $_POST['log'] ) ? $_POST['log'] : '') ))); ?>
4Login' ); echo '
' . wp_kses_post($message) . '
'; if ( 'yes' == $fourlogin_options[FOURLOGIN_OPTION_SHOW_FOURLOGIN_CODE] ){ ?>4Login Code
' . wp_kses_post($message_get_app) . '
'; $link_text = esc_html__('this article', '4login-for-secure-and-smart-access'); $link_article = '' . $link_text . ''; $message_how_to = sprintf( /* translators: %s: Clickable link */ esc_html__('You can know how to log in with 4Login from %s.', '4login-for-secure-and-smart-access'), $link_article ); echo '' . wp_kses_post($message_how_to) . '
'; } ?> add( 'fourloginmode_templogin', __('Input the temporary login code that was sent to your email to log in without 4Login.', '4login-for-secure-and-smart-access'), 'message'); } } return $errors; } add_filter( 'wp_login_errors', 'fourlogin_filter_login_errors', 10, 2); function fourlogin_lostpassword_message($user_login) { $styled_text = '4Login'; $message = sprintf( /* translators: %s: service name with styling */ esc_html__('Users created by %s are not able to reset password here.', '4login-for-secure-and-smart-access'), $styled_text ); echo '' . wp_kses_post($message) . ''; } add_action('lostpassword_form', 'fourlogin_lostpassword_message'); ?>