cron-setting.php
1 day ago
custom-directory.php
1 day ago
directory-navigation.php
1 month ago
exclude-settings.php
6 months ago
external-database.php
1 day ago
login-data.php
1 day ago
mail-setting.php
1 day ago
plugins-update.php
1 day ago
process-lock.php
1 year ago
scan.php
1 month ago
start.php
2 weeks ago
symlink-uploads.php
1 day ago
update.php
1 year ago
mail-setting.php
79 lines
| 1 | <?php |
| 2 | |
| 3 | /** |
| 4 | * This file is currently being called for the both FREE and PRO version: |
| 5 | * src/views/clone/ajax/scan.php:64 |
| 6 | * |
| 7 | * @var \WPStaging\Backend\Modules\Jobs\Scan $scan |
| 8 | * @var stdClass $options |
| 9 | * @var boolean $isPro |
| 10 | * |
| 11 | * @see \WPStaging\Backend\Modules\Jobs\Scan::start For details on $options. |
| 12 | */ |
| 13 | |
| 14 | |
| 15 | use WPStaging\Framework\Facades\UI\Checkbox; |
| 16 | |
| 17 | $settingsEnabled = true; |
| 18 | |
| 19 | $isEmailsAllowed = true; |
| 20 | $isEmailsReminderEnabled = false; |
| 21 | |
| 22 | if (!$isPro) { |
| 23 | $settingsEnabled = false; |
| 24 | } |
| 25 | |
| 26 | |
| 27 | if ($isPro && !empty($options->current)) { |
| 28 | |
| 29 | |
| 30 | |
| 31 | |
| 32 | |
| 33 | |
| 34 | |
| 35 | |
| 36 | |
| 37 | |
| 38 | |
| 39 | $defaultEmailsSending = true; |
| 40 | if (isset($options->existingClones[$options->current]['emailsDisabled'])) { |
| 41 | $defaultEmailsSending = !((bool)$options->existingClones[$options->current]['emailsDisabled']); |
| 42 | } |
| 43 | |
| 44 | $isEmailsAllowed = empty($options->existingClones[$options->current]['isEmailsAllowed']) ? false : true; |
| 45 | |
| 46 | if (!isset($options->existingClones[$options->current]['isEmailsAllowed']) && isset($options->existingClones[$options->current]['emailsAllowed'])) { |
| 47 | $isEmailsAllowed = (bool)$options->existingClones[$options->current]['emailsAllowed']; |
| 48 | } |
| 49 | |
| 50 | $isEmailsReminderEnabled = empty($options->existingClones[$options->current]['isEmailsReminderEnabled']) ? false : true; |
| 51 | |
| 52 | if (!isset($options->existingClones[$options->current]['isEmailsReminderEnabled']) && isset($options->existingClones[$options->current]['emailsReminderAllowed'])) { |
| 53 | $isEmailsReminderEnabled = (bool)$options->existingClones[$options->current]['emailsReminderAllowed']; |
| 54 | } |
| 55 | } |
| 56 | ?> |
| 57 | <div class="wpstg--advanced-settings--checkbox"> |
| 58 | <label for="wpstg_allow_emails"><?php esc_html_e('Allow Emails Sending', 'wp-staging'); ?></label> |
| 59 | <?php Checkbox::render('wpstg_allow_emails', 'wpstg_allow_emails', 'true', $isEmailsAllowed, ['isDisabled' => !$settingsEnabled]); ?> |
| 60 | <span class="wpstg--tooltip"> |
| 61 | <img class="wpstg--dashicons" src="<?php echo esc_url($scan->getInfoIcon()); ?>" alt="info" /> |
| 62 | <span class="wpstg--tooltiptext"> |
| 63 | <?php esc_html_e('Allow emails sending for this staging site.', 'wp-staging'); ?> |
| 64 | <br /> <br /> |
| 65 | <b><?php esc_html_e('Note', 'wp-staging') ?>: </b> <?php echo sprintf(esc_html__('Even if email sending is disabled, some plugins might still be able to send out mails if they don\'t depend upon %s.', 'wp-staging'), '<code>wp_mail()</code>'); ?> |
| 66 | </span> |
| 67 | </span> |
| 68 | </div> |
| 69 | <div class="wpstg--advanced-settings--checkbox"> |
| 70 | <label for="wpstg_reminder_emails"><?php esc_html_e('Get Reminder Email', 'wp-staging'); ?></label> |
| 71 | <?php Checkbox::render('wpstg_reminder_emails', 'wpstg_reminder_emails', 'false', $isEmailsReminderEnabled, ['isDisabled' => !$settingsEnabled]); ?> |
| 72 | <span class="wpstg--tooltip"> |
| 73 | <img class="wpstg--dashicons" src="<?php echo esc_url($scan->getInfoIcon()); ?>" alt="info" /> |
| 74 | <span class="wpstg--tooltiptext"> |
| 75 | <?php esc_html_e('You will receive an email reminder every two weeks about your active staging site. This helps you manage and delete unused staging sites, ensuring safety and preventing multiple unnecessary test environments.', 'wp-staging'); ?> |
| 76 | </span> |
| 77 | </span> |
| 78 | </div> |
| 79 |