PluginProbe ʕ •ᴥ•ʔ
WP STAGING – WordPress Backup, Restore, Migration & Clone / trunk
WP STAGING – WordPress Backup, Restore, Migration & Clone vtrunk
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 / clone / ajax / mail-setting.php
wp-staging / views / clone / ajax Last commit date
cron-setting.php 4 months ago custom-directory.php 1 month ago directory-navigation.php 1 week ago exclude-settings.php 4 months ago external-database.php 2 months ago login-data.php 3 months ago mail-setting.php 4 months ago plugins-update.php 1 year ago process-lock.php 1 year ago scan.php 1 week ago start.php 1 year ago symlink-uploads.php 1 year 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 // Settings Enabled by default
15 use WPStaging\Framework\Facades\UI\Checkbox;
16
17 $settingsEnabled = true;
18 // New staging site. Mails Sending is checked by default.
19 $isEmailsAllowed = true;
20 $isEmailsReminderEnabled = false;
21 // If plugin is not pro disable this Option
22 if (!$isPro) {
23 $settingsEnabled = false;
24 }
25
26 // Only change default check status when clone options exists and plugin is PRO
27 if ($isPro && !empty($options->current)) {
28 /**
29 * Existing staging site.
30 * We read the site configuration. If none set, default to checked, since not having the setting
31 * to allow the email in the database means it was not disabled.
32 */
33 // To support staging site created with older version of this feature,
34 // Invert it's value if it is present
35 // Can be removed when we are sure that all staging sites have been updated.
36 /**
37 * @todo Seems it can be removed, not sure it is even still used?
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 // fallback for older clones where this option did not exist and 'emailsAllowed' was used
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 // Fallback for older clones where this option did not exist and 'emailsReminderAllowed' was used
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