footer.php
5 years ago
header.php
2 years ago
loginAfterRestore.php
2 years ago
loginForm.php
2 years ago
wordfence-2fa.php
2 years ago
loginAfterRestore.php
77 lines
| 1 | <?php |
| 2 | /** |
| 3 | * @var array $adminEmails |
| 4 | * @var bool $isRestoredFromWpCom // true if the backup was restored from wordpress.com but current site is not a wordpress.com site |
| 5 | * @var string $resetPasswordArticleLink // link to article on how to reset password in different ways |
| 6 | */ |
| 7 | ?> |
| 8 | <style> |
| 9 | #adminEmails { |
| 10 | display: none; |
| 11 | } |
| 12 | .unselectable { |
| 13 | -moz-user-select: none; |
| 14 | -webkit-user-select: none; |
| 15 | -ms-user-select: none; |
| 16 | user-select: none; |
| 17 | } |
| 18 | #loginAfterRestore { |
| 19 | width: 320px; |
| 20 | padding-top: 20px; |
| 21 | margin: auto; |
| 22 | } |
| 23 | #loginAfterRestore h1 { |
| 24 | margin-bottom: 20px; |
| 25 | } |
| 26 | #loginAfterRestore p { |
| 27 | margin-bottom: 10px; |
| 28 | } |
| 29 | #showAdminEmails { |
| 30 | cursor: pointer; |
| 31 | font-weight: bold; |
| 32 | text-decoration: underline; |
| 33 | color: #2196f3; |
| 34 | } |
| 35 | div#adminEmails ul { |
| 36 | padding-left: 15px; |
| 37 | } |
| 38 | #login { |
| 39 | padding-top:40px; |
| 40 | } |
| 41 | </style> |
| 42 | <div id="loginAfterRestore"> |
| 43 | <h1 class="unselectable"><?php esc_html_e('Congratulations!', 'wp-staging'); ?></h1> |
| 44 | <p class="unselectable"><?php esc_html_e('You have just restored a WP STAGING backup.', 'wp-staging'); ?></p> |
| 45 | <p class="unselectable"><?php echo wp_kses_post(__('Now you need to log-in using email and password that were in the Backup that you just restored. If you don\'t remember the credentials, click <span id="showAdminEmails">here</span> to see a list of admin e-mails you can use to restore your access by clicking "Forgot your password". This message will appear only once.', 'wp-staging')); ?></p> |
| 46 | <div id="adminEmails"> |
| 47 | <p> |
| 48 | <?php if (is_array($adminEmails) && !empty($adminEmails)) : ?> |
| 49 | <ul> |
| 50 | <?php |
| 51 | foreach ($adminEmails as $adminEmail) { |
| 52 | echo sprintf('<li>%s</li>', esc_html($adminEmail)); |
| 53 | } |
| 54 | ?> |
| 55 | </ul> |
| 56 | <?php else : ?> |
| 57 | <?php esc_html_e('Sorry, there are no admin e-mails to show.', 'wp-staging'); ?> |
| 58 | <?php endif; ?> |
| 59 | </div> |
| 60 | </p> |
| 61 | <?php if ($isRestoredFromWpCom) : ?> |
| 62 | <p> |
| 63 | <?php esc_html_e('This site was restored from a WordPress.com backup. Your WordPress.com password may not work and you will need to reset your password to get a new one!', 'wp-staging'); ?> |
| 64 | <?php echo sprintf(esc_html__('Read this %s to find out how to reset the password.', 'wp-staging'), '<a href="' . esc_url($resetPasswordArticleLink) . '" target="_blank">' . esc_html__('article', 'wp-staging') . '</a>') ?> |
| 65 | </p> |
| 66 | <?php endif; ?> |
| 67 | </div> |
| 68 | <script> |
| 69 | document.getElementById('showAdminEmails').addEventListener('click', function() { |
| 70 | if (document.getElementById('adminEmails').style.display === "block") { |
| 71 | document.getElementById('adminEmails').style.display = "none"; |
| 72 | } else { |
| 73 | document.getElementById('adminEmails').style.display = "block"; |
| 74 | } |
| 75 | }); |
| 76 | </script> |
| 77 |