forked from LiveCarta/LiveCartaWP
Changed source root directory
This commit is contained in:
@@ -0,0 +1,57 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Admin Notifications content.
|
||||
*
|
||||
* Variables
|
||||
*
|
||||
* @var \Duplicator\Core\Views\TplMng $tplMng
|
||||
* @var array<string, mixed> $tplData
|
||||
*/
|
||||
|
||||
use Duplicator\Utils\LinkManager;
|
||||
use Duplicator\Utils\Email\EmailSummary;
|
||||
|
||||
defined('ABSPATH') || exit;
|
||||
|
||||
$frequency = DUP_Settings::Get('email_summary_frequency');
|
||||
?>
|
||||
|
||||
<h3 class="title"><?php _e('Email Summary', 'duplicator') ?></h3>
|
||||
<hr size="1" />
|
||||
<table class="dup-capabilities-selector-wrapper form-table">
|
||||
<tr valign="top">
|
||||
<th scope="row"><label><?php _e('Frequency', 'duplicator'); ?></label></th>
|
||||
<td>
|
||||
<select id="email-summary-frequency" name="email_summary_frequency">
|
||||
<?php foreach (EmailSummary::getAllFrequencyOptions() as $key => $label) : ?>
|
||||
<option value="<?php echo esc_attr((string) $key); ?>" <?php selected($frequency, $key); ?>>
|
||||
<?php echo esc_html($label); ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<p class="description">
|
||||
<?php
|
||||
$faqUrl = LinkManager::getDocUrl('how-to-disable-email-summaries', 'email_summary', 'how to disable');
|
||||
echo sprintf(
|
||||
esc_html_x(
|
||||
'You can view the email summary example %1shere%2s.',
|
||||
'%1s and %2s are the opening and close <a> tags to the summary preview link',
|
||||
'duplicator'
|
||||
),
|
||||
'<a href="' . EmailSummary::getPreviewLink() . '" target="_blank">',
|
||||
'</a>'
|
||||
) . ' ' . sprintf(
|
||||
esc_html_x(
|
||||
'Learn %1show to disable%2s.',
|
||||
'%1s and %2s are opening and closing link tags to the documentation.',
|
||||
'duplicator'
|
||||
),
|
||||
'<a href="' . $faqUrl . '" target="_blank" >',
|
||||
'</a>'
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -0,0 +1,263 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Duplicator
|
||||
* @copyright (c) 2022, Snap Creek LLC
|
||||
*/
|
||||
|
||||
defined("ABSPATH") || exit;
|
||||
|
||||
/**
|
||||
* Variables
|
||||
*
|
||||
* @var \Duplicator\Core\Views\TplMng $tplMng
|
||||
* @var array<string, mixed> $tplData
|
||||
*/
|
||||
|
||||
use Duplicator\Core\Controllers\ControllersManager;
|
||||
use Duplicator\Utils\LinkManager;
|
||||
use Duplicator\Libs\Snap\SnapUtil;
|
||||
use Duplicator\Core\Views\TplMng;
|
||||
|
||||
global $wp_version;
|
||||
global $wpdb;
|
||||
|
||||
$action_updated = null;
|
||||
$action_response = __("General Settings Saved", 'duplicator');
|
||||
|
||||
//SAVE RESULTS
|
||||
if (isset($_POST['action']) && $_POST['action'] == 'save') {
|
||||
//Nonce Check
|
||||
if (!isset($_POST['dup_settings_save_nonce_field']) || !wp_verify_nonce($_POST['dup_settings_save_nonce_field'], 'dup_settings_save')) {
|
||||
die('Invalid token permissions to perform this request.');
|
||||
}
|
||||
|
||||
DUP_Settings::Set('wpfront_integrate', isset($_POST['wpfront_integrate']) ? "1" : "0");
|
||||
|
||||
$skip_archive_scan = filter_input(INPUT_POST, 'skip_archive_scan', FILTER_VALIDATE_BOOLEAN);
|
||||
DUP_Settings::Set('skip_archive_scan', $skip_archive_scan);
|
||||
|
||||
$unhook_third_party_js = filter_input(INPUT_POST, 'unhook_third_party_js', FILTER_VALIDATE_BOOLEAN);
|
||||
DUP_Settings::Set('unhook_third_party_js', $unhook_third_party_js);
|
||||
|
||||
$unhook_third_party_css = filter_input(INPUT_POST, 'unhook_third_party_css', FILTER_VALIDATE_BOOLEAN);
|
||||
DUP_Settings::Set('unhook_third_party_css', $unhook_third_party_css);
|
||||
|
||||
$email_summary_frequency = SnapUtil::sanitizeStrictInput(INPUT_POST, 'email_summary_frequency');
|
||||
DUP_Settings::setEmailSummaryFrequency($email_summary_frequency);
|
||||
|
||||
|
||||
|
||||
DUP_Settings::Save();
|
||||
$action_updated = true;
|
||||
DUP_Util::initSnapshotDirectory();
|
||||
}
|
||||
|
||||
$wpfront_integrate = DUP_Settings::Get('wpfront_integrate');
|
||||
$wpfront_ready = apply_filters('wpfront_user_role_editor_duplicator_integration_ready', false);
|
||||
$skip_archive_scan = DUP_Settings::Get('skip_archive_scan');
|
||||
$unhook_third_party_js = DUP_Settings::Get('unhook_third_party_js');
|
||||
$unhook_third_party_css = DUP_Settings::Get('unhook_third_party_css');
|
||||
$actionUrl = ControllersManager::getMenuLink(ControllersManager::SETTINGS_SUBMENU_SLUG, 'general');
|
||||
?>
|
||||
|
||||
<style>
|
||||
form#dup-settings-form input[type=text] {width: 400px; }
|
||||
div.dup-feature-found {padding:3px; border:1px solid silver; background: #f7fcfe; border-radius: 3px; width:400px; font-size: 12px}
|
||||
div.dup-feature-notfound {padding:5px; border:1px solid silver; background: #fcf3ef; border-radius: 3px; width:500px; font-size: 13px; line-height: 18px}
|
||||
table.nested-table-data td {padding:5px 5px 5px 0}
|
||||
</style>
|
||||
|
||||
<form id="dup-settings-form" action="<?php echo esc_url($actionUrl); ?>" method="post">
|
||||
|
||||
<?php wp_nonce_field('dup_settings_save', 'dup_settings_save_nonce_field', false); ?>
|
||||
<input type="hidden" name="action" value="save">
|
||||
<input type="hidden" name="page" value="duplicator-settings">
|
||||
|
||||
<?php if ($action_updated) : ?>
|
||||
<div id="message" class="notice notice-success is-dismissible dup-wpnotice-box"><p><?php echo esc_html($action_response); ?></p></div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php TplMng::getInstance()->render('admin_pages/settings/general/license'); ?>
|
||||
|
||||
<?php TplMng::getInstance()->render('admin_pages/settings/general/email_summary'); ?>
|
||||
|
||||
<!-- ===============================
|
||||
ADVANCED SETTINGS -->
|
||||
<h3 class="title"><?php esc_html_e('Advanced', 'duplicator'); ?> </h3>
|
||||
<hr size="1" />
|
||||
<table class="form-table">
|
||||
<tr>
|
||||
<th scope="row"><label><?php esc_html_e("Settings", 'duplicator'); ?></label></th>
|
||||
<td>
|
||||
<button class="button" onclick="Duplicator.Pack.ConfirmResetAll(); return false;">
|
||||
<i class="fas fa-redo fa-sm"></i> <?php esc_html_e('Reset Backups', 'duplicator'); ?>
|
||||
</button>
|
||||
<p class="description">
|
||||
<?php
|
||||
esc_html_e("This process will reset all Backups by deleting those without a completed status, reset the active Backup id and perform a "
|
||||
. "cleanup of the build tmp file.", 'duplicator');
|
||||
?>
|
||||
<i class="fas fa-question-circle fa-sm"
|
||||
data-tooltip-title="<?php esc_attr_e("Reset Settings", 'duplicator'); ?>"
|
||||
data-tooltip="<?php
|
||||
esc_attr_e('This action should only be used if the Backups screen is having issues or a build is stuck.', 'duplicator'); ?>">
|
||||
</i>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<th scope="row"><label><?php esc_html_e('Backup scan', 'duplicator'); ?></label></th>
|
||||
<td>
|
||||
<input type="checkbox" name="skip_archive_scan" id="_skip_archive_scan" <?php checked($skip_archive_scan, true); ?> value="1" />
|
||||
<label for="_skip_archive_scan"><?php esc_html_e("Skip", 'duplicator') ?> </label><br/>
|
||||
<p class="description">
|
||||
<?php
|
||||
esc_html_e('If enabled all files check on scan will be skipped before Backup creation. '
|
||||
. 'In some cases, this option can be beneficial if the scan process is having issues running or returning errors.', 'duplicator');
|
||||
?>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label><?php esc_html_e("Foreign JavaScript", 'duplicator'); ?></label></th>
|
||||
<td>
|
||||
<input type="checkbox" name="unhook_third_party_js" id="unhook_third_party_js" <?php checked($unhook_third_party_js, true); ?> value="1"/>
|
||||
<label for="unhook_third_party_js"><?php esc_html_e("Disable", 'duplicator'); ?></label> <br/>
|
||||
<p class="description">
|
||||
<?php
|
||||
esc_html_e("Check this option if other plugins/themes JavaScript files are conflicting with Duplicator.", 'duplicator');
|
||||
echo '<br/>';
|
||||
esc_html_e("Do not modify this setting unless you know the expected result or have talked to support.", 'duplicator');
|
||||
?>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label><?php esc_html_e("Foreign CSS", 'duplicator'); ?></label></th>
|
||||
<td>
|
||||
<input type="checkbox" name="unhook_third_party_css" id="unhook_third_party_css" <?php checked($unhook_third_party_css, true); ?> value="1"/>
|
||||
<label for="unhook_third_party_css"><?php esc_html_e("Disable", 'duplicator'); ?></label> <br/>
|
||||
<p class="description">
|
||||
<?php
|
||||
esc_html_e("Check this option if other plugins/themes CSS files are conflicting with Duplicator.", 'duplicator');
|
||||
echo '<br/>';
|
||||
esc_html_e("Do not modify this setting unless you know the expected result or have talked to support.", 'duplicator');
|
||||
?>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<p class="submit" style="margin: 20px 0px 0xp 5px;">
|
||||
<br/>
|
||||
<input
|
||||
type="submit"
|
||||
name="submit"
|
||||
id="submit"
|
||||
class="button-primary"
|
||||
value="<?php esc_attr_e("Save General Settings", 'duplicator') ?>"
|
||||
style="display: inline-block;"
|
||||
/>
|
||||
</p>
|
||||
|
||||
</form>
|
||||
|
||||
<!-- ==========================================
|
||||
THICK-BOX DIALOGS: -->
|
||||
<?php
|
||||
$reset_confirm = new DUP_UI_Dialog();
|
||||
$reset_confirm->title = __('Reset Backups ?', 'duplicator');
|
||||
$reset_confirm->message = __('This will clear and reset all of the current temporary Backups. Would you like to continue?', 'duplicator');
|
||||
$reset_confirm->progressText = __('Resetting settings, Please Wait...', 'duplicator');
|
||||
$reset_confirm->jscallback = 'Duplicator.Pack.ResetAll()';
|
||||
$reset_confirm->progressOn = false;
|
||||
$reset_confirm->okText = __('Yes', 'duplicator');
|
||||
$reset_confirm->cancelText = __('No', 'duplicator');
|
||||
$reset_confirm->closeOnConfirm = true;
|
||||
$reset_confirm->initConfirm();
|
||||
|
||||
$faqUrl = esc_url(LinkManager::getDocUrl('how-to-resolve-duplicator-plugin-user-interface-ui-issues', 'settings-admin_notice'));
|
||||
$msg_ajax_error = new DUP_UI_Messages(
|
||||
__('AJAX Call Error!', 'duplicator') . '<br>' .
|
||||
sprintf(
|
||||
_x(
|
||||
'AJAX error encountered when resetting Backups. Please see %1$sthis FAQ entry%2$s for possible resolutions.',
|
||||
'1 and 2 are opening and closing <a> tags',
|
||||
'duplicator'
|
||||
),
|
||||
'<a href="' . $faqUrl . '" target="_blank">',
|
||||
'</a>'
|
||||
),
|
||||
DUP_UI_Messages::ERROR
|
||||
);
|
||||
|
||||
$msg_ajax_error->hide_on_init = true;
|
||||
$msg_ajax_error->is_dismissible = true;
|
||||
$msg_ajax_error->initMessage();
|
||||
|
||||
$msg_response_error = new DUP_UI_Messages(__('RESPONSE ERROR!', 'duplicator'), DUP_UI_Messages::ERROR);
|
||||
$msg_response_error->hide_on_init = true;
|
||||
$msg_response_error->is_dismissible = true;
|
||||
$msg_response_error->initMessage();
|
||||
|
||||
$msg_response_success = new DUP_UI_Messages('', DUP_UI_Messages::NOTICE);
|
||||
$msg_response_success->hide_on_init = true;
|
||||
$msg_response_success->is_dismissible = true;
|
||||
$msg_response_success->initMessage();
|
||||
?>
|
||||
<script>
|
||||
jQuery(document).ready(function ($)
|
||||
{
|
||||
var msgDebug = <?php echo DUP_Util::isWpDebug() ? 'true' : 'false'; ?>;
|
||||
Duplicator.Pack.ConfirmResetAll = function ()
|
||||
{
|
||||
<?php $reset_confirm->showConfirm(); ?>
|
||||
};
|
||||
|
||||
Duplicator.Pack.ResetAll = function ()
|
||||
{
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: ajaxurl,
|
||||
dataType: "json",
|
||||
data: {
|
||||
action: 'duplicator_reset_all_settings',
|
||||
nonce: '<?php echo wp_create_nonce('duplicator_reset_all_settings'); ?>'
|
||||
},
|
||||
success: function (result) {
|
||||
if (msgDebug) {
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
if (result.success) {
|
||||
var message = '<?php _e('Backups successfully reset', 'duplicator'); ?>';
|
||||
if (msgDebug) {
|
||||
console.log(result.data.message);
|
||||
console.log(result.data.html);
|
||||
}
|
||||
<?php
|
||||
$msg_response_success->updateMessage('message');
|
||||
$msg_response_success->showMessage();
|
||||
?>
|
||||
} else {
|
||||
var message = '<?php _e('RESPONSE ERROR!', 'duplicator'); ?>' + '<br><br>' + result.data.message;
|
||||
if (msgDebug) {
|
||||
message += '<br><br>' + result.data.html;
|
||||
}
|
||||
<?php
|
||||
$msg_response_error->updateMessage('message');
|
||||
$msg_response_error->showMessage();
|
||||
?>
|
||||
}
|
||||
},
|
||||
error: function (result) {
|
||||
if (msgDebug) {
|
||||
console.log(result);
|
||||
}
|
||||
<?php $msg_ajax_error->showMessage(); ?>
|
||||
}
|
||||
});
|
||||
};
|
||||
});
|
||||
</script>
|
||||
@@ -0,0 +1,67 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* License section template for General settings
|
||||
*
|
||||
* @package Duplicator
|
||||
* @copyright (c) 2022, Snap Creek LLC
|
||||
*/
|
||||
|
||||
defined("ABSPATH") || exit;
|
||||
|
||||
use Duplicator\Utils\LinkManager;
|
||||
|
||||
?>
|
||||
|
||||
<h3 class="title"><?php esc_html_e('License', 'duplicator'); ?> </h3>
|
||||
<hr size="1" />
|
||||
<table class="form-table licenses-table">
|
||||
<tr valign="top">
|
||||
<th scope="row"><label><?php esc_html_e('License Key', 'duplicator'); ?></label></th>
|
||||
<td>
|
||||
<div class="description" style="max-width:700px">
|
||||
<p><?php esc_html_e('You\'re using Duplicator Lite - no license needed. Enjoy!', 'duplicator'); ?> 🙂</p>
|
||||
<p>
|
||||
<?php printf(
|
||||
wp_kses(
|
||||
__('To unlock more features consider <strong><a href="%s" target="_blank"
|
||||
rel="noopener noreferrer">upgrading to PRO</a></strong>.', 'duplicator'),
|
||||
array(
|
||||
'a' => array(
|
||||
'href' => array(),
|
||||
'class' => array(),
|
||||
'target' => array(),
|
||||
'rel' => array(),
|
||||
),
|
||||
'strong' => array(),
|
||||
)
|
||||
),
|
||||
esc_url(LinkManager::getCampaignUrl('license-tab', 'upgrading to PRO'))
|
||||
); ?>
|
||||
</p>
|
||||
<p class="discount-note">
|
||||
<?php
|
||||
printf(
|
||||
__(
|
||||
'As a valued Duplicator Lite user you receive <strong>%1$d%% off</strong>, automatically applied at checkout!',
|
||||
'duplicator'
|
||||
),
|
||||
DUP_Constants::UPSELL_DEFAULT_DISCOUNT
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
<hr>
|
||||
<p>
|
||||
<?php _e('Already purchased? Connect to unlock <b>Duplicator PRO!</b>', 'duplicator'); ?></p>
|
||||
<p>
|
||||
<button type="button" class="dup-btn dup-btn-md dup-btn-orange" id="dup-settings-connect-btn">
|
||||
<?php echo esc_html__('Connect to Duplicator Pro', 'duplicator'); ?>
|
||||
</button>
|
||||
</p>
|
||||
<p>
|
||||
<small><?php esc_html_e('This opens connect.duplicator.com where you\'ll securely connect to Duplicator Pro.', 'duplicator'); ?></small>
|
||||
</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -0,0 +1,96 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Duplicator
|
||||
* @copyright (c) 2022, Snap Creek LLC
|
||||
*/
|
||||
|
||||
defined("ABSPATH") || exit;
|
||||
|
||||
/**
|
||||
* Variables
|
||||
*
|
||||
* @var \Duplicator\Core\Views\TplMng $tplMng
|
||||
* @var array<string, mixed> $tplData
|
||||
*/
|
||||
?>
|
||||
<div>
|
||||
<b>
|
||||
<?php _e('All information sent to the server is anonymous.', 'duplicator'); ?><br>
|
||||
<?php _e('No information about storage or Backup\'s content are sent.', 'duplicator'); ?>
|
||||
</b>
|
||||
</div>
|
||||
<br>
|
||||
<div>
|
||||
<?php
|
||||
_e(
|
||||
'Usage tracking for Duplicator helps us better understand our users and their website needs by looking
|
||||
at a range of server and website environments.',
|
||||
'duplicator'
|
||||
);
|
||||
?>
|
||||
<b>
|
||||
<?php _e('This allows us to continuously improve our product as well as our Q&A / testing process.', 'duplicator'); ?>
|
||||
</b>
|
||||
<?php _e('Below is the list of information that Duplicator collects as part of the usage tracking:', 'duplicator'); ?>
|
||||
</div>
|
||||
<ul>
|
||||
<li>
|
||||
<?php
|
||||
_e(
|
||||
'<b>PHP Version:</b> so we know which PHP versions we have to test against (no one likes whitescreens or log files full of errors).',
|
||||
'duplicator'
|
||||
);
|
||||
?>
|
||||
</li>
|
||||
<li>
|
||||
<?php
|
||||
_e(
|
||||
'<b>WordPress Version:</b> so we know which WordPress versions to support and test against.',
|
||||
'duplicator'
|
||||
);
|
||||
?>
|
||||
</li>
|
||||
<li>
|
||||
<?php
|
||||
_e(
|
||||
'<b>MySQL Version:</b> so we know which versions of MySQL to support and test against for our custom tables.',
|
||||
'duplicator'
|
||||
);
|
||||
?>
|
||||
</li>
|
||||
<li>
|
||||
<?php
|
||||
_e(
|
||||
'<b>Duplicator Version:</b> so we know which versions of Duplicator are potentially responsible for issues when we get bug reports,
|
||||
allowing us to identify issues and release solutions much faster.',
|
||||
'duplicator'
|
||||
);
|
||||
?>
|
||||
</li>
|
||||
<li>
|
||||
<?php
|
||||
_e(
|
||||
'<b>Plugins and Themes infos:</b> so we can figure out which ones can generate compatibility errors with Duplicator.',
|
||||
'duplicator'
|
||||
);
|
||||
?>
|
||||
</li>
|
||||
<li>
|
||||
<?php
|
||||
_e(
|
||||
'<b>Site info:</b> General information about the site such as database, file size, number of users, and sites in case it is a multisite.
|
||||
This is useful for us to understand the critical issues of Backup creation.',
|
||||
'duplicator'
|
||||
);
|
||||
?>
|
||||
</li>
|
||||
<li>
|
||||
<?php
|
||||
_e(
|
||||
'<b>Backups infos:</b> Information about the Backups created and the type of components included.',
|
||||
'duplicator'
|
||||
);
|
||||
?>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -0,0 +1,211 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Duplicator
|
||||
* @copyright (c) 2022, Snap Creek LLC
|
||||
*/
|
||||
|
||||
defined("ABSPATH") || exit;
|
||||
|
||||
/**
|
||||
* Variables
|
||||
*
|
||||
* @var \Duplicator\Core\Views\TplMng $tplMng
|
||||
* @var array<string, mixed> $tplData
|
||||
*/
|
||||
|
||||
use Duplicator\Core\Controllers\ControllersManager;
|
||||
use Duplicator\Libs\Snap\SnapUtil;
|
||||
|
||||
global $wp_version;
|
||||
global $wpdb;
|
||||
|
||||
$action_updated = null;
|
||||
$action_response = __("Misc Settings Saved", 'duplicator');
|
||||
|
||||
//SAVE RESULTS
|
||||
if (isset($_POST['action']) && $_POST['action'] == 'save') {
|
||||
//Nonce Check
|
||||
if (!isset($_POST['dup_settings_save_nonce_field']) || !wp_verify_nonce($_POST['dup_settings_save_nonce_field'], 'dup_settings_save')) {
|
||||
die('Invalid token permissions to perform this request.');
|
||||
}
|
||||
|
||||
DUP_Settings::Set('uninstall_settings', isset($_POST['uninstall_settings']) ? "1" : "0");
|
||||
DUP_Settings::Set('uninstall_files', isset($_POST['uninstall_files']) ? "1" : "0");
|
||||
DUP_Settings::Set('package_debug', isset($_POST['package_debug']) ? "1" : "0");
|
||||
|
||||
$usage_tracking = filter_input(INPUT_POST, 'usage_tracking', FILTER_VALIDATE_BOOLEAN);
|
||||
DUP_Settings::setUsageTracking($usage_tracking);
|
||||
|
||||
$amNotices = !SnapUtil::sanitizeBoolInput(INPUT_POST, 'dup_am_notices');
|
||||
DUP_Settings::Set('amNotices', $amNotices);
|
||||
|
||||
if (isset($_REQUEST['trace_log_enabled'])) {
|
||||
dup_log::trace("#### trace log enabled");
|
||||
// Trace on
|
||||
|
||||
if (DUP_Settings::Get('trace_log_enabled') == 0) {
|
||||
DUP_Log::DeleteTraceLog();
|
||||
}
|
||||
|
||||
DUP_Settings::Set('trace_log_enabled', 1);
|
||||
} else {
|
||||
dup_log::trace("#### trace log disabled");
|
||||
|
||||
// Trace off
|
||||
DUP_Settings::Set('trace_log_enabled', 0);
|
||||
}
|
||||
|
||||
DUP_Settings::Save();
|
||||
$action_updated = true;
|
||||
DUP_Util::initSnapshotDirectory();
|
||||
}
|
||||
|
||||
$trace_log_enabled = DUP_Settings::Get('trace_log_enabled');
|
||||
$uninstall_settings = DUP_Settings::Get('uninstall_settings');
|
||||
$uninstall_files = DUP_Settings::Get('uninstall_files');
|
||||
$package_debug = DUP_Settings::Get('package_debug');
|
||||
$actionUrl = ControllersManager::getMenuLink(ControllersManager::SETTINGS_SUBMENU_SLUG, 'misc');
|
||||
?>
|
||||
|
||||
<style>
|
||||
form#dup-settings-form input[type=text] {width: 400px; }
|
||||
div.dup-feature-found {padding:3px; border:1px solid silver; background: #f7fcfe; border-radius: 3px; width:400px; font-size: 12px}
|
||||
div.dup-feature-notfound {padding:5px; border:1px solid silver; background: #fcf3ef; border-radius: 3px; width:500px; font-size: 13px; line-height: 18px}
|
||||
table.nested-table-data td {padding:5px 5px 5px 0}
|
||||
</style>
|
||||
|
||||
<form id="dup-settings-form" action="<?php echo esc_url($actionUrl); ?>" method="post">
|
||||
|
||||
<?php wp_nonce_field('dup_settings_save', 'dup_settings_save_nonce_field', false); ?>
|
||||
<input type="hidden" name="action" value="save">
|
||||
<input type="hidden" name="page" value="duplicator-settings">
|
||||
|
||||
<?php if ($action_updated) : ?>
|
||||
<div id="message" class="notice notice-success is-dismissible dup-wpnotice-box"><p><?php echo esc_html($action_response); ?></p></div>
|
||||
<?php endif; ?>
|
||||
|
||||
<h3 class="title"><?php esc_html_e("Plugin", 'duplicator') ?> </h3>
|
||||
<hr size="1" />
|
||||
<table class="form-table">
|
||||
<tr valign="top">
|
||||
<th scope="row"><label><?php esc_html_e("Version", 'duplicator'); ?></label></th>
|
||||
<td>
|
||||
<?php
|
||||
echo DUPLICATOR_VERSION;
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<th scope="row"><label><?php esc_html_e("Uninstall", 'duplicator'); ?></label></th>
|
||||
<td>
|
||||
<p>
|
||||
<input type="checkbox" name="uninstall_settings" id="uninstall_settings" <?php echo ($uninstall_settings) ? 'checked="checked"' : ''; ?> />
|
||||
<label for="uninstall_settings"><?php esc_html_e("Delete Plugin Settings", 'duplicator') ?> </label>
|
||||
</p>
|
||||
<p>
|
||||
<input type="checkbox" name="uninstall_files" id="uninstall_files" <?php echo ($uninstall_files) ? 'checked="checked"' : ''; ?> />
|
||||
<label for="uninstall_files"><?php esc_html_e("Delete Entire Storage Directory", 'duplicator') ?></label><br/>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<th scope="row"><label><?php esc_html_e("Usage statistics", 'duplicator'); ?></label></th>
|
||||
<td>
|
||||
<?php if (DUPLICATOR_USTATS_DISALLOW) { // @phpstan-ignore-line ?>
|
||||
<span class="maroon">
|
||||
<?php _e('Usage statistics are hardcoded disallowed.', 'duplicator'); ?>
|
||||
</span>
|
||||
<?php } else { ?>
|
||||
<input
|
||||
type="checkbox"
|
||||
name="usage_tracking"
|
||||
id="usage_tracking"
|
||||
value="1"
|
||||
<?php checked(DUP_Settings::Get('usage_tracking')); ?>
|
||||
>
|
||||
<label for="usage_tracking"><?php _e("Enable usage tracking", 'duplicator'); ?> </label>
|
||||
<i
|
||||
class="fas fa-question-circle fa-sm"
|
||||
data-tooltip-title="<?php esc_attr_e("Usage Tracking", 'duplicator'); ?>"
|
||||
data-tooltip="<?php echo esc_attr($tplMng->render('admin_pages/settings/general/usage_tracking_tooltip', array(), false)); ?>"
|
||||
data-tooltip-width="600"
|
||||
>
|
||||
</i>
|
||||
<?php } ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<th scope="row"><label><?php esc_html_e("Hide Announcements", 'duplicator'); ?></label></th>
|
||||
<td>
|
||||
<input
|
||||
type="checkbox"
|
||||
name="dup_am_notices"
|
||||
id="dup_am_notices"
|
||||
<?php checked(!DUP_Settings::Get('amNotices')); ?>
|
||||
/>
|
||||
<label for="dup_am_notices">
|
||||
<?php esc_html_e("Check this option to hide plugin announcements and update details.", 'duplicator') ?>
|
||||
</label>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h3 class="title"><?php esc_html_e("Debug", 'duplicator') ?> </h3>
|
||||
<hr size="1" />
|
||||
<table class="form-table">
|
||||
<tr>
|
||||
<th scope="row"><label><?php esc_html_e("Debugging", 'duplicator'); ?></label></th>
|
||||
<td>
|
||||
<input type="checkbox" name="package_debug" id="package_debug" <?php echo ($package_debug) ? 'checked="checked"' : ''; ?> />
|
||||
<label for="package_debug"><?php esc_html_e("Enable debug options throughout user interface", 'duplicator'); ?></label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<th scope="row"><label><?php esc_html_e("Trace Log", 'duplicator'); ?></label></th>
|
||||
<td>
|
||||
<input type="checkbox" name="trace_log_enabled" id="trace_log_enabled" <?php echo ($trace_log_enabled == 1) ? 'checked="checked"' : ''; ?> />
|
||||
<label for="trace_log_enabled"><?php esc_html_e("Enabled", 'duplicator') ?> </label><br/>
|
||||
<p class="description">
|
||||
<?php
|
||||
esc_html_e('Turns on detailed operation logging. Logging will occur in both PHP error and local trace logs.', 'duplicator');
|
||||
echo ('<br/>');
|
||||
esc_html_e('WARNING: Only turn on this setting when asked to by support as tracing will impact performance.', 'duplicator');
|
||||
?>
|
||||
</p><br/>
|
||||
<button class="button" <?php
|
||||
if (!DUP_Log::TraceFileExists()) {
|
||||
echo 'disabled';
|
||||
}
|
||||
?> onclick="Duplicator.Pack.DownloadTraceLog(); return false">
|
||||
<i class="fa fa-download"></i> <?php echo esc_html__('Download Trace Log', 'duplicator') . ' (' . DUP_LOG::GetTraceStatus() . ')'; ?>
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
</table><br/>
|
||||
|
||||
<p class="submit" style="margin: 20px 0px 0xp 5px;">
|
||||
<br/>
|
||||
<input
|
||||
type="submit"
|
||||
name="submit"
|
||||
id="submit"
|
||||
class="button-primary"
|
||||
value="<?php esc_attr_e("Save Misc Settings", 'duplicator') ?>"
|
||||
style="display: inline-block;"
|
||||
/>
|
||||
</p>
|
||||
|
||||
</form>
|
||||
|
||||
<script>
|
||||
jQuery(document).ready(function ($)
|
||||
{
|
||||
// which: 0=installer, 1=archive, 2=sql file, 3=log
|
||||
Duplicator.Pack.DownloadTraceLog = function ()
|
||||
{
|
||||
var actionLocation = ajaxurl + '?action=DUP_CTRL_Tools_getTraceLog&nonce=' + '<?php echo wp_create_nonce('DUP_CTRL_Tools_getTraceLog'); ?>';
|
||||
location.href = actionLocation;
|
||||
};
|
||||
});
|
||||
</script>
|
||||
Reference in New Issue
Block a user