PluginProbe ʕ •ᴥ•ʔ
WP STAGING – WordPress Backup, Restore, Migration & Clone / 4.9.2
WP STAGING – WordPress Backup, Restore, Migration & Clone v4.9.2
4.9.2 4.9.1 4.9.0 4.8.1 trunk 3.0.0 3.0.1 3.0.2 3.0.3 3.0.4 3.0.5 3.0.6 3.1.0 3.1.1 3.1.2 3.1.3 3.1.4 3.10.0 3.2.0 3.3.1 3.3.2 3.3.3 3.4.1 3.4.3 3.5.0 3.6.0 3.7.1 3.8.0 3.8.1 3.8.2 3.8.3 3.8.4 3.8.5 3.8.6 3.8.7 3.9.0 3.9.1 3.9.2 3.9.3 3.9.4 4.0.0 4.1.0 4.1.1 4.1.2 4.1.3 4.1.4 4.2.0 4.2.1 4.3.0 4.3.1 4.3.2 4.4.0 4.5.0 4.6.0 4.7.0 4.7.1 4.7.2 4.7.3 4.8.0
wp-staging / views / frontend / loginForm.php
wp-staging / views / frontend Last commit date
footer.php 1 year ago header.php 4 months ago loginAfterRestore.php 1 year ago loginForm.php 1 day ago wordfence-2fa.php 1 year ago
loginForm.php
104 lines
1 <?php
2
3 /**
4 * Login form template
5 *
6 * @var bool $showNotice
7 * @var string $notice
8 * @var array $args
9 * @var bool $isCustomLogin2faEnabled
10 */
11
12 use WPStaging\Core\WPStaging;
13 use WPStaging\Framework\Language\Language;
14
15 /* When 'wpstg_user_logged_in_status' is true, it means the credentials are correct, but login might be blocked by a security plugin or active OTP or 2FA authentication */
16 $isLoginCredentialsVerified = get_transient('wpstg_user_logged_in_status');
17 ?>
18 <main class="wp-staging-login" >
19 <div class="wpstg-u-text-center">
20 <img width="220" src="<?php echo esc_url(apply_filters('wpstg_login_form_logo', WPSTG_PLUGIN_URL . 'assets/img/logo.svg')); ?>" alt="WP Staging Login" />
21 </div>
22 <form class="wp-staging-form" name="<?php echo esc_attr($args['form_id']); ?>" id="<?php echo esc_attr($args['form_id']); ?>" action="" method="post">
23 <?php if ($showNotice) { ?>
24 <div class="wpstg-alert wpstg-alert-info wpstg-u-text-justify">
25 <p><?php echo esc_html($notice); ?></p>
26 </div>
27 <?php } ?>
28 <?php if (get_transient('wpstg_auto_login_failed')) : ?>
29 <p class="error-msg">
30 <?php
31 // @see \WPStaging\Pro\Staging\AutoLogin\LoginAuthenticator::TRANSIENT_AUTO_LOGIN_FAILED
32 delete_transient('wpstg_auto_login_failed');
33 // @see \WPStaging\Pro\Staging\AutoLogin\LoginAuthenticator::TRANSIENT_AUTO_LOGIN_FAILED_REASON
34 $failedReason = get_transient('wpstg_auto_login_failed_reason');
35 echo esc_html($failedReason);
36 ?>
37 </p>
38 <?php endif; ?>
39 <div class="form-group login-username">
40 <label for="<?php echo esc_attr($args['id_username']); ?>"><?php echo esc_html($args['label_username']); ?></label>
41 <input type="text" name="wpstg-username" id="<?php echo esc_attr($args['id_username']); ?>" class="input form-control" value="<?php echo esc_attr($args['value_username']); ?>" size="20" />
42 </div>
43 <div class="form-group login-password">
44 <label for="<?php echo esc_attr($args['id_password']); ?>"><?php echo esc_html($args['label_password']); ?></label>
45 <input type="password" name="wpstg-pass" id="<?php echo esc_attr($args['id_password']); ?>" class="input form-control" value="" size="20" />
46 </div>
47
48 <?php if ($args['remember']) { ?>
49 <div class="form-group login-remember"><label><input name="rememberme" type="checkbox" id="<?php echo esc_attr($args['id_remember']); ?>" value="forever"<?php echo ( $args['value_remember'] ? ' checked="checked"' : '' ); ?> /> <span><?php echo esc_html($args['label_remember']); ?></span></label></div>
50 <?php } ?>
51
52 <div class="login-submit">
53 <button type="submit" name="wpstg-submit" id="<?php echo esc_attr($args['id_submit']); ?>" class="btn" value="<?php echo esc_attr($args['label_log_in']); ?>"><?php esc_html_e('Login', 'wp-staging') ?></button>
54 <input type="hidden" name="redirect_to" value="<?php echo esc_url($args['redirect']); ?>" />
55 </div>
56 <?php if (!$isLoginCredentialsVerified) : ?>
57 <p class="wpstg-default-login-link">
58 <?php
59 echo sprintf(
60 esc_html__('If login is not possible, please use the %s.', 'wp-staging'),
61 '<a href="' . esc_url(wp_login_url()) . '">' . esc_html__('default login form', 'wp-staging') . '</a>'
62 );
63 ?>
64 </p>
65 <?php endif; ?>
66 <?php if ($isLoginCredentialsVerified) : ?>
67 <p class="error-msg">
68 <?php
69 echo sprintf(
70 esc_html__('Login not possible! it might happen due to using a security plugin, having OTP or 2FA authentication active, Please use the %s instead.', 'wp-staging'),
71 '<a href="' . esc_url(wp_login_url()) . '">' . esc_html__('default login form', 'wp-staging') . '</a>'
72 );
73 ?>
74 </p>
75 <?php endif; ?>
76 <div class="password-lost">
77 <a href="<?php echo esc_url($args['lost_password_url']); ?>"><?php esc_html_e('Lost your password?', 'wp-staging') ?></a>
78 </div>
79
80 <?php if (WPStaging::isBasic()) { ?>
81 <div class="wpstg-upsell-link">
82 <?php
83 printf(
84 esc_html__('Automatic login for staging sites. Try %s', 'wp-staging'),
85 '<a href="' . esc_url(Language::getUpgradeUrl('login_form')) . '" target="_blank">' . esc_html('WP Staging Pro') . '</a>'
86 );
87 ?>
88 </div>
89 <?php } ?>
90
91 <?php if ($this->error) : ?>
92 <p class="error-msg">
93 <?php echo wp_kses_post($this->error); ?>
94 </p>
95 <?php endif; ?>
96
97 <?php
98 if ($isCustomLogin2faEnabled) {
99 include_once(WPSTG_VIEWS_DIR . 'frontend/wordfence-2fa.php');
100 }
101 ?>
102 </form>
103 </main>
104