forked from LiveCarta/LiveCartaWP
Changed source root directory
This commit is contained in:
129
html/wp-content/plugins/duplicator/views/settings/about-info.php
Normal file
129
html/wp-content/plugins/duplicator/views/settings/about-info.php
Normal file
@@ -0,0 +1,129 @@
|
||||
<?php
|
||||
defined('ABSPATH') || defined('DUPXABSPATH') || exit;
|
||||
?>
|
||||
<style>
|
||||
/*================================================
|
||||
PAGE-SUPPORT:*/
|
||||
div.dup-support-all {font-size:13px; line-height:20px}
|
||||
table.dup-support-hlp-hdrs {border-collapse:collapse; width:100%; border-bottom:1px solid #dfdfdf}
|
||||
table.dup-support-hlp-hdrs {background-color:#efefef;}
|
||||
table.dup-support-hlp-hdrs td {
|
||||
padding:2px; height:52px;
|
||||
font-weight:bold; font-size:17px;
|
||||
background-image:-ms-linear-gradient(top, #FFFFFF 0%, #DEDEDE 100%);
|
||||
background-image:-moz-linear-gradient(top, #FFFFFF 0%, #DEDEDE 100%);
|
||||
background-image:-o-linear-gradient(top, #FFFFFF 0%, #DEDEDE 100%);
|
||||
background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0, #FFFFFF), color-stop(1, #DEDEDE));
|
||||
background-image:-webkit-linear-gradient(top, #FFFFFF 0%, #DEDEDE 100%);
|
||||
background-image:linear-gradient(to bottom, #FFFFFF 0%, #DEDEDE 100%);
|
||||
}
|
||||
table.dup-support-hlp-hdrs td img{margin-left:7px}
|
||||
div.dup-support-hlp-txt{padding:10px 4px 4px 4px; text-align:center}
|
||||
div.dup-support-give-area {width:265px; height:225px; float:left; margin:10px; line-height:18px;}
|
||||
div.dup-spread-word {display:inline-block; border:1px solid red; text-align:center}
|
||||
|
||||
img#dup-support-approved { -webkit-animation:approve-keyframe 12s 1s infinite alternate backwards}
|
||||
img#dup-img-5stars {opacity:0.7;}
|
||||
img#dup-img-5stars:hover {opacity:1.0;}
|
||||
div.social-item {float:right; width: 170px; padding:10px; border:0px solid red; text-align: left; font-size:20px}
|
||||
|
||||
/* EMAIL AREA */
|
||||
div.dup-support-email-area {width:825px; height:355px; margin:10px; line-height:18px;}
|
||||
#mce-EMAIL {font-size:20px; height:40px; width:500px}
|
||||
#mce-responses {width:300px}
|
||||
#mc-embedded-subscribe { height: 35px; font-size: 16px; font-weight: bold}
|
||||
div.mce_inline_error {width:300px; margin: auto !important}
|
||||
div#mce-responses {margin: auto; padding: 10px; width:500px; font-weight: bold;}
|
||||
</style>
|
||||
|
||||
|
||||
<div class="wrap dup-wrap dup-support-all">
|
||||
<div style="width:850px; margin:auto; margin-top:30px">
|
||||
<table style="width:825px">
|
||||
<tr>
|
||||
<td style="width:230px;">
|
||||
<img src="<?php echo esc_url(DUPLICATOR_PLUGIN_URL . "assets/img/logo-box.png"); ?>" style='margin-top:-60px; height:176px; width:176px' />
|
||||
</td>
|
||||
<td valign="top" style="padding-top:10px; font-size:15px; text-align:justify;">
|
||||
<?php
|
||||
esc_html_e(
|
||||
"Duplicator can streamline your workflow and quickly clone/migrate a WordPress site. The plugin helps admins, designers and
|
||||
developers speed up the migration process of moving a WordPress site. Please help us continue development by giving the plugin a
|
||||
5 star and consider purchasing our Pro product.",
|
||||
'duplicator'
|
||||
);
|
||||
?>
|
||||
<br/><br/>
|
||||
|
||||
<!-- PARTNER WITH US -->
|
||||
<div class="dup-support-give-area">
|
||||
<table class="dup-support-hlp-hdrs">
|
||||
<tr >
|
||||
<td style="height:30px; text-align: center;">
|
||||
<span><?php esc_html_e('Rate Duplicator', 'duplicator') ?></span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table style="text-align: center;width:100%; font-size:11px; font-style:italic; margin-top:35px">
|
||||
<tr>
|
||||
<td valign="top">
|
||||
<a href="<?php echo esc_url(\Duplicator\Core\Notifications\Review::getReviewUrl()); ?>" target="vote-wp"><img id="dup-img-5stars" src="<?php echo DUPLICATOR_PLUGIN_URL ?>assets/img/5star.png" /></a>
|
||||
<div style=" font-size: 16px; font-weight: bold; line-height: 22px">
|
||||
<a href="<?php echo esc_url(\Duplicator\Core\Notifications\Review::getReviewUrl()); ?>" target="vote-wp">
|
||||
<?php
|
||||
echo wp_kses(
|
||||
__('Support Duplicator <br/> with a 5 star review!', 'duplicator'),
|
||||
['br' => []]
|
||||
);
|
||||
?>
|
||||
</a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<!-- SPREAD THE WORD -->
|
||||
<div class="dup-support-give-area">
|
||||
<table class="dup-support-hlp-hdrs">
|
||||
<tr>
|
||||
<td style="height:30px; text-align: center;">
|
||||
<span><?php esc_html_e('Spread the Word', 'duplicator') ?></span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div class="dup-support-hlp-txt">
|
||||
<br/>
|
||||
<div class="social-images">
|
||||
<a href="https://www.facebook.com/sharer/sharer.php?u=https%3A//snapcreek.com/duplicator/duplicator-free/" target="_blank">
|
||||
<div class="social-item"><i class="fab fa-facebook-square fa-lg"></i> <?php esc_html_e('Facebook', 'duplicator') ?></div>
|
||||
</a>
|
||||
<a href="https://twitter.com/home?status=Checkout%20the%20WordPress%20Duplicator%20plugin!%20%0Ahttps%3A//snapcreek.com/duplicator/duplicator-free/" target="_blank">
|
||||
<div class="social-item"><i class="fab fa-twitter-square fa-lg"></i> <?php esc_html_e('Twitter', 'duplicator') ?></div>
|
||||
</a>
|
||||
<a href="https://www.linkedin.com/shareArticle?mini=true&url=https%3A//snapcreek.com/duplicator/duplicator-free/&title=WordPress%20Duplicator%20Plugin&summary=&source=" target="_blank">
|
||||
<div class="social-item"><i class="fab fa-linkedin fa-lg"></i> <?php esc_html_e('LinkedIn', 'duplicator') ?></div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br style="clear:both" /><br/>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</div><br/><br/><br/><br/>
|
||||
<script>
|
||||
jQuery(document).ready(function($)
|
||||
{
|
||||
$('input[type="checkbox"][name="privacy"]').change(function() {
|
||||
if(this.checked) {
|
||||
$("#mc-embedded-subscribe").prop("disabled", false);
|
||||
} else {
|
||||
$("#mc-embedded-subscribe").prop("disabled", true);
|
||||
}
|
||||
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@@ -0,0 +1,81 @@
|
||||
<?php
|
||||
|
||||
use Duplicator\Core\Controllers\ControllersManager;
|
||||
use Duplicator\Core\Bootstrap;
|
||||
use Duplicator\Core\Views\TplMng;
|
||||
|
||||
defined('ABSPATH') || defined('DUPXABSPATH') || exit;
|
||||
|
||||
DUP_Handler::init_error_handler();
|
||||
DUP_Util::hasCapability('export');
|
||||
|
||||
global $wpdb;
|
||||
|
||||
//COMMON HEADER DISPLAY
|
||||
require_once(DUPLICATOR_PLUGIN_PATH . '/views/inc.header.php');
|
||||
require_once(DUPLICATOR_PLUGIN_PATH . '/classes/ui/class.ui.dialog.php');
|
||||
require_once(DUPLICATOR_PLUGIN_PATH . '/classes/ui/class.ui.messages.php');
|
||||
|
||||
$current_tab = isset($_REQUEST['tab']) ? sanitize_text_field($_REQUEST['tab']) : 'general';
|
||||
?>
|
||||
|
||||
<div class="wrap dup-settings-pages">
|
||||
<?php duplicator_header(__("Settings", 'duplicator')) ?>
|
||||
|
||||
<h2 class="nav-tab-wrapper">
|
||||
<a
|
||||
href="<?php echo esc_url(ControllersManager::getMenuLink(ControllersManager::SETTINGS_SUBMENU_SLUG, 'general')); ?> "
|
||||
class="nav-tab <?php echo ($current_tab == 'general') ? 'nav-tab-active' : '' ?>"
|
||||
>
|
||||
<?php esc_html_e('General', 'duplicator'); ?>
|
||||
</a>
|
||||
<a
|
||||
href="<?php echo esc_url(ControllersManager::getMenuLink(ControllersManager::SETTINGS_SUBMENU_SLUG, 'package')); ?> "
|
||||
class="nav-tab <?php echo ($current_tab == 'package') ? 'nav-tab-active' : '' ?>"
|
||||
>
|
||||
<?php esc_html_e('Backups', 'duplicator'); ?>
|
||||
</a>
|
||||
<a
|
||||
href="<?php echo esc_url(ControllersManager::getMenuLink(ControllersManager::SETTINGS_SUBMENU_SLUG, 'storage')); ?> "
|
||||
class="nav-tab <?php echo ($current_tab == 'storage') ? 'nav-tab-active' : '' ?>"
|
||||
>
|
||||
<?php esc_html_e('Storage', 'duplicator'); ?>
|
||||
</a>
|
||||
<a
|
||||
href="<?php echo esc_url(ControllersManager::getMenuLink(ControllersManager::SETTINGS_SUBMENU_SLUG, 'access')); ?> "
|
||||
class="nav-tab <?php echo ($current_tab == 'access') ? 'nav-tab-active' : '' ?>"
|
||||
>
|
||||
<?php esc_html_e('Access', 'duplicator'); ?>
|
||||
</a>
|
||||
|
||||
<a
|
||||
href="<?php echo esc_url(ControllersManager::getMenuLink(ControllersManager::SETTINGS_SUBMENU_SLUG, 'misc')); ?> "
|
||||
class="nav-tab <?php echo ($current_tab == 'misc') ? 'nav-tab-active' : '' ?>"
|
||||
>
|
||||
<?php esc_html_e('Misc', 'duplicator'); ?>
|
||||
</a>
|
||||
</h2>
|
||||
|
||||
<?php
|
||||
switch ($current_tab) {
|
||||
case 'general':
|
||||
TplMng::getInstance()->render("admin_pages/settings/general/general");
|
||||
break;
|
||||
case 'package':
|
||||
include(DUPLICATOR_PLUGIN_PATH . "views/settings/packages.php");
|
||||
break;
|
||||
case 'storage':
|
||||
include(DUPLICATOR_PLUGIN_PATH . "views/settings/storage.php");
|
||||
break;
|
||||
case 'access':
|
||||
Bootstrap::mocksStyles();
|
||||
TplMng::getInstance()->render("mocks/settings/access/capabilities");
|
||||
break;
|
||||
|
||||
case 'misc':
|
||||
TplMng::getInstance()->render("admin_pages/settings/misc/misc");
|
||||
break;
|
||||
}
|
||||
do_action('duplicator_settings_page_footer');
|
||||
?>
|
||||
</div>
|
||||
@@ -0,0 +1,3 @@
|
||||
<?php
|
||||
|
||||
//silent
|
||||
485
html/wp-content/plugins/duplicator/views/settings/packages.php
Normal file
485
html/wp-content/plugins/duplicator/views/settings/packages.php
Normal file
@@ -0,0 +1,485 @@
|
||||
<?php
|
||||
|
||||
use Duplicator\Core\Controllers\ControllersManager;
|
||||
use Duplicator\Utils\LinkManager;
|
||||
use Duplicator\Libs\Snap\SnapIO;
|
||||
use Duplicator\Libs\Snap\SnapUtil;
|
||||
|
||||
defined('ABSPATH') || defined('DUPXABSPATH') || exit;
|
||||
|
||||
global $wp_version;
|
||||
global $wpdb;
|
||||
|
||||
$action_updated = null;
|
||||
$action_response = __("Backup Settings Saved", 'duplicator');
|
||||
$mysqldump_exe_file = '';
|
||||
|
||||
//SAVE RESULTS
|
||||
if (isset($_POST['action']) && $_POST['action'] == 'save') {
|
||||
//Nonce Check
|
||||
$nonce = sanitize_text_field($_POST['dup_settings_save_nonce_field']);
|
||||
if (!isset($_POST['dup_settings_save_nonce_field']) || !wp_verify_nonce($nonce, 'dup_settings_save')) {
|
||||
die('Invalid token permissions to perform this request.');
|
||||
}
|
||||
|
||||
//Package
|
||||
$mysqldump_enabled = isset($_POST['package_dbmode']) && $_POST['package_dbmode'] == 'mysql' ? "1" : "0";
|
||||
if (isset($_POST['package_mysqldump_path'])) {
|
||||
$mysqldump_exe_file = SnapUtil::sanitizeNSCharsNewlineTabs($_POST['package_mysqldump_path']);
|
||||
$mysqldump_exe_file = preg_match('/^([A-Za-z]\:)?[\/\\\\]/', $mysqldump_exe_file) ? $mysqldump_exe_file : '';
|
||||
$mysqldump_exe_file = preg_replace('/[\'";]/m', '', $mysqldump_exe_file);
|
||||
$mysqldump_exe_file = SnapIO::safePathUntrailingslashit($mysqldump_exe_file);
|
||||
$mysqldump_exe_file = DUP_DB::escSQL(strip_tags($mysqldump_exe_file), true);
|
||||
}
|
||||
|
||||
DUP_Settings::Set('last_updated', date('Y-m-d-H-i-s'));
|
||||
DUP_Settings::Set('package_zip_flush', isset($_POST['package_zip_flush']) ? "1" : "0");
|
||||
DUP_Settings::Set('archive_build_mode', sanitize_text_field($_POST['archive_build_mode']));
|
||||
DUP_Settings::Set('package_mysqldump', $mysqldump_enabled ? "1" : "0");
|
||||
DUP_Settings::Set('package_phpdump_qrylimit', isset($_POST['package_phpdump_qrylimit']) ? $_POST['package_phpdump_qrylimit'] : "100");
|
||||
DUP_Settings::Set('package_mysqldump_path', $mysqldump_exe_file);
|
||||
DUP_Settings::Set('package_ui_created', sanitize_text_field($_POST['package_ui_created']));
|
||||
|
||||
switch (sanitize_text_field($_POST['installer_name_mode'] ?? '')) {
|
||||
case DUP_Settings::INSTALLER_NAME_MODE_WITH_HASH:
|
||||
DUP_Settings::Set('installer_name_mode', DUP_Settings::INSTALLER_NAME_MODE_WITH_HASH);
|
||||
break;
|
||||
case DUP_Settings::INSTALLER_NAME_MODE_SIMPLE:
|
||||
default:
|
||||
DUP_Settings::Set('installer_name_mode', DUP_Settings::INSTALLER_NAME_MODE_SIMPLE);
|
||||
break;
|
||||
}
|
||||
|
||||
$action_updated = DUP_Settings::Save();
|
||||
DUP_Util::initSnapshotDirectory();
|
||||
}
|
||||
|
||||
$is_shellexec_on = DUP_Util::hasShellExec();
|
||||
$package_zip_flush = DUP_Settings::Get('package_zip_flush');
|
||||
$phpdump_chunkopts = array("20", "100", "500", "1000", "2000");
|
||||
$phpdump_qrylimit = DUP_Settings::Get('package_phpdump_qrylimit');
|
||||
$package_mysqldump = DUP_Settings::Get('package_mysqldump');
|
||||
$package_mysqldump_path = trim(DUP_Settings::Get('package_mysqldump_path'));
|
||||
$package_ui_created = is_numeric(DUP_Settings::Get('package_ui_created')) ? DUP_Settings::Get('package_ui_created') : 1;
|
||||
$mysqlDumpPath = DUP_DB::getMySqlDumpPath();
|
||||
$mysqlDumpFound = ($mysqlDumpPath) ? true : false;
|
||||
$archive_build_mode = DUP_Settings::Get('archive_build_mode');
|
||||
$installerNameMode = DUP_Settings::Get('installer_name_mode');
|
||||
$actionUrl = ControllersManager::getMenuLink(ControllersManager::SETTINGS_SUBMENU_SLUG, 'package');
|
||||
?>
|
||||
|
||||
<style>
|
||||
form#dup-settings-form input[type=text] {width:500px; }
|
||||
#dup-settings-form tr td { line-height: 1.6; }
|
||||
div.dup-feature-found {padding:10px 0 5px 0; color:green;}
|
||||
div.dup-feature-notfound {color:maroon; width:600px; line-height: 18px}
|
||||
select#package_ui_created {font-family: monospace}
|
||||
div.engine-radio {float: left; min-width: 100px}
|
||||
div.engine-sub-opts {padding:5px 0 10px 15px; display:none }
|
||||
.dup-install-meta {display: inline-block; min-width: 50px}
|
||||
</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("Database", 'duplicator') ?> </h3>
|
||||
<hr size="1" />
|
||||
<table class="form-table">
|
||||
<tr>
|
||||
<th scope="row"><label><?php esc_html_e("SQL Mode", 'duplicator'); ?></label></th>
|
||||
<td>
|
||||
<div class="engine-radio <?php echo ($is_shellexec_on) ? '' : 'engine-radio-disabled'; ?>">
|
||||
<input type="radio" name="package_dbmode" value="mysql" id="package_mysqldump" <?php echo ($package_mysqldump) ? 'checked="checked"' : ''; ?> />
|
||||
<label for="package_mysqldump"><?php esc_html_e("Mysqldump", 'duplicator'); ?></label>
|
||||
</div>
|
||||
|
||||
<div class="engine-radio" >
|
||||
<!-- PHP MODE -->
|
||||
<?php if (!$mysqlDumpFound) : ?>
|
||||
<input type="radio" name="package_dbmode" id="package_phpdump" value="php" checked="checked" />
|
||||
<?php else : ?>
|
||||
<input type="radio" name="package_dbmode" id="package_phpdump" value="php" <?php echo (!$package_mysqldump) ? 'checked="checked"' : ''; ?> />
|
||||
<?php endif; ?>
|
||||
<label for="package_phpdump"><?php esc_html_e("PHP Code", 'duplicator'); ?></label>
|
||||
</div>
|
||||
|
||||
<br style="clear:both"/><br/>
|
||||
|
||||
<!-- SHELL EXEC -->
|
||||
<div class="engine-sub-opts" id="dbengine-details-1" style="display:none">
|
||||
<?php if (!$is_shellexec_on) : ?>
|
||||
<p class="description" style="width:550px; margin:5px 0 0 20px">
|
||||
<?php
|
||||
_e("This server does not support the PHP shell_exec or exec function which is required for mysqldump to run. ", 'duplicator');
|
||||
_e("Please contact the host or server administrator to enable this feature.", 'duplicator');
|
||||
?>
|
||||
<br/>
|
||||
<small>
|
||||
<i style="cursor: pointer"
|
||||
data-tooltip-title="<?php esc_html_e("Host Recommendation:", 'duplicator'); ?>"
|
||||
data-tooltip="<?php esc_html_e('Duplicator recommends going with the high performance pro plan or better from our recommended list', 'duplicator'); ?>">
|
||||
<i class="far fa-lightbulb" aria-hidden="true"></i>
|
||||
<?php
|
||||
printf(
|
||||
_x(
|
||||
'Please visit our recommended %1$shost list%2$s for reliable access to mysqldump.',
|
||||
'%1s and %2s represents the opening and closing HTML tags for an anchor or link',
|
||||
'duplicator'
|
||||
),
|
||||
'<a target="_blank" href="'
|
||||
. esc_url(LinkManager::getDocUrl('what-host-providers-are-recommended-for-duplicator', 'settings', 'host list tooltip'))
|
||||
. '">',
|
||||
'</a>'
|
||||
);
|
||||
?>
|
||||
</i>
|
||||
</small>
|
||||
<br/><br/>
|
||||
</p>
|
||||
<?php else : ?>
|
||||
<div style="margin:0 0 0 15px">
|
||||
<?php if ($mysqlDumpFound) : ?>
|
||||
<div class="dup-feature-found">
|
||||
<i class="fa fa-check-circle"></i>
|
||||
<?php esc_html_e("Successfully Found:", 'duplicator'); ?>
|
||||
<i><?php echo esc_html($mysqlDumpPath); ?></i>
|
||||
</div><br/>
|
||||
<?php else : ?>
|
||||
<div class="dup-feature-notfound">
|
||||
<i class="fa fa-exclamation-triangle fa-sm"></i>
|
||||
<?php
|
||||
_e('Mysqldump was not found at its default location or the location provided. Please enter a custom path to a valid location where mysqldump can run. '
|
||||
. 'If the problem persist contact your host or server administrator. ', 'duplicator');
|
||||
|
||||
printf(
|
||||
_x(
|
||||
'See the %1$shost list%2$s for reliable access to mysqldump.',
|
||||
'%1s and %2s represents the opening and closing HTML tags for an anchor or link',
|
||||
'duplicator'
|
||||
),
|
||||
'<a target="_blank" href="'
|
||||
. esc_url(LinkManager::getDocUrl('what-host-providers-are-recommended-for-duplicator', 'settings', 'host list'))
|
||||
. '">',
|
||||
'</a>'
|
||||
);
|
||||
?>
|
||||
</div><br/>
|
||||
<?php endif; ?>
|
||||
|
||||
<label><?php esc_html_e("Custom Path", 'duplicator'); ?></label>
|
||||
<i class="fas fa-question-circle fa-sm"
|
||||
data-tooltip-title="<?php esc_attr_e("mysqldump path:", 'duplicator'); ?>"
|
||||
data-tooltip="<?php
|
||||
esc_attr_e('Add a custom path if the path to mysqldump is not properly detected. For all paths use a forward slash as the '
|
||||
. 'path seperator. On Linux systems use mysqldump for Windows systems use mysqldump.exe. If the path tried does not work please contact your hosting '
|
||||
. 'provider for details on the correct path.', 'duplicator');
|
||||
?>"></i>
|
||||
<br/>
|
||||
<input
|
||||
type="text" name="package_mysqldump_path"
|
||||
id="package_mysqldump_path"
|
||||
value="<?php echo esc_attr($package_mysqldump_path); ?>"
|
||||
placeholder="<?php esc_attr_e("/usr/bin/mypath/mysqldump", 'duplicator'); ?>"
|
||||
>
|
||||
<div class="dup-feature-notfound">
|
||||
<?php
|
||||
if (!$mysqlDumpFound && strlen($mysqldump_exe_file)) {
|
||||
_e('<i class="fa fa-exclamation-triangle fa-sm"></i> The custom path provided is not recognized as a valid mysqldump file:<br/>', 'duplicator');
|
||||
$mysqldump_path = esc_html($package_mysqldump_path);
|
||||
echo "'" . esc_html($mysqldump_path) . "'";
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<br/>
|
||||
</div>
|
||||
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<!-- PHP OPTION -->
|
||||
<div class="engine-sub-opts" id="dbengine-details-2" style="display:none; line-height: 35px; margin:0 0 0 15px">
|
||||
<!-- PRO ONLY -->
|
||||
<label><?php esc_html_e("Mode", 'duplicator'); ?>:</label>
|
||||
<select name="">
|
||||
<option selected="selected" value="1">
|
||||
<?php esc_html_e("Single-Threaded", 'duplicator'); ?>
|
||||
</option>
|
||||
<option disabled="disabled" value="0">
|
||||
<?php esc_html_e("Multi-Threaded (Pro)", 'duplicator'); ?>
|
||||
</option>
|
||||
</select>
|
||||
<i style="margin-right:7px;" class="fas fa-question-circle fa-sm"
|
||||
data-tooltip-title="<?php esc_attr_e("PHP Code Mode:", 'duplicator'); ?>"
|
||||
data-tooltip="<?php
|
||||
esc_attr_e('Single-Threaded mode attempts to create the entire database script in one request. Multi-Threaded mode allows the database script '
|
||||
. 'to be chunked over multiple requests. Multi-Threaded mode is typically slower but much more reliable especially for larger databases.', 'duplicator');
|
||||
esc_attr_e('<br><br><i>Multi-Threaded mode is only available in Duplicator Pro.</i>', 'duplicator');
|
||||
?>"></i>
|
||||
<div>
|
||||
<label for="package_phpdump_qrylimit"><?php esc_html_e("Query Limit Size", 'duplicator'); ?>:</label>
|
||||
<select name="package_phpdump_qrylimit" id="package_phpdump_qrylimit">
|
||||
<?php
|
||||
foreach ($phpdump_chunkopts as $value) {
|
||||
$selected = ( $phpdump_qrylimit == $value ? "selected='selected'" : '' );
|
||||
echo "<option {$selected} value='" . esc_attr($value) . "'>" . number_format($value) . '</option>';
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
<i class="fas fa-question-circle fa-sm"
|
||||
data-tooltip-title="<?php esc_attr_e("PHP Query Limit Size", 'duplicator'); ?>"
|
||||
data-tooltip="<?php esc_attr_e(
|
||||
'A higher limit size will speed up the database build time, however it will use more memory. ' .
|
||||
'If your host has memory caps start off low.',
|
||||
'duplicator'
|
||||
); ?>">
|
||||
</i>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
<h3 class="title"><?php esc_html_e("Backup", 'duplicator') ?> </h3>
|
||||
<hr size="1" />
|
||||
<table class="form-table">
|
||||
<tr>
|
||||
<th scope="row"><label><?php esc_html_e('Backup Engine', 'duplicator'); ?></label></th>
|
||||
<td>
|
||||
<div class="engine-radio">
|
||||
<input type="radio" name="archive_build_mode" id="archive_build_mode1" onclick="Duplicator.Pack.ToggleArchiveEngine()"
|
||||
value="<?php echo esc_attr(DUP_Archive_Build_Mode::ZipArchive); ?>" <?php echo ($archive_build_mode == DUP_Archive_Build_Mode::ZipArchive) ? 'checked="checked"' : ''; ?> />
|
||||
<label for="archive_build_mode1"><?php esc_html_e('ZipArchive', 'duplicator'); ?></label>
|
||||
</div>
|
||||
|
||||
<div class="engine-radio">
|
||||
<input type="radio" name="archive_build_mode" id="archive_build_mode2" onclick="Duplicator.Pack.ToggleArchiveEngine()"
|
||||
value="<?php echo esc_attr(DUP_Archive_Build_Mode::DupArchive); ?>" <?php echo ($archive_build_mode == DUP_Archive_Build_Mode::DupArchive) ? 'checked="checked"' : ''; ?> />
|
||||
<label for="archive_build_mode2"><?php esc_html_e('DupArchive', 'duplicator'); ?></label>
|
||||
</div>
|
||||
|
||||
<br style="clear:both"/>
|
||||
|
||||
<!-- ZIPARCHIVE -->
|
||||
<div id="engine-details-1" style="display:none">
|
||||
<p class="description">
|
||||
<?php esc_html_e('Creates a Backup format (archive.zip).', 'duplicator');?><br/>
|
||||
<i>
|
||||
<?php
|
||||
esc_html_e('This option uses the internal PHP ZipArchive classes to create a zip file.', 'duplicator');
|
||||
echo ' ';
|
||||
esc_html_e('Duplicator Lite has no fixed size constraints for zip formats. The only constraints are timeouts '
|
||||
. 'on the server.', 'duplicator');
|
||||
?>
|
||||
</i>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<!-- DUPARCHIVE -->
|
||||
<div id="engine-details-2" style="display:none">
|
||||
<p class="description">
|
||||
<?php esc_html_e('Creates a custom Backup format (archive.daf).', 'duplicator'); ?>
|
||||
<br/>
|
||||
<i>
|
||||
<?php esc_html_e('This option is recommended for large sites or sites on constrained servers.', 'duplicator'); ?>
|
||||
<?php esc_html_e('Duplicator Lite has a fixed constraint of 500MB for daf formats.', 'duplicator'); ?>
|
||||
<?php
|
||||
printf(
|
||||
_x(
|
||||
'Consider upgrading to %1$sDuplicator Pro%2$s for unlimited large site support with DupArchive.',
|
||||
'%1$s and %2$s represents the opening and closing HTML tags for an anchor or link',
|
||||
'duplicator'
|
||||
),
|
||||
'<a href="' . esc_url(LinkManager::getCampaignUrl('package_settings_daf', 'Duplicator Pro')) . '" target="_blank">',
|
||||
'</a>'
|
||||
);
|
||||
?>
|
||||
</i>
|
||||
</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label><?php esc_html_e('Network Keep Alive', 'duplicator'); ?></label></th>
|
||||
<td>
|
||||
<input type="checkbox" name="package_zip_flush" id="package_zip_flush" <?php echo ($package_zip_flush) ? 'checked="checked"' : ''; ?> />
|
||||
<label for="package_zip_flush"><?php esc_html_e("Attempt Network Keep Alive", 'duplicator'); ?></label>
|
||||
<i style="font-size:12px">(<?php esc_html_e("enable only for large archives", 'duplicator'); ?>)</i>
|
||||
<p class="description">
|
||||
<?php
|
||||
esc_html_e("This will attempt to keep a network connection established for large archives.", 'duplicator');
|
||||
echo ' ';
|
||||
esc_html_e(' Valid only when Backup Engine for ZipArchive is enabled.', 'duplicator');
|
||||
?>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table><br/>
|
||||
|
||||
<h3 class="title" id="duplicator-installer-settings"><?php esc_html_e("Installer", 'duplicator') ?> </h3>
|
||||
<hr size="1" />
|
||||
<table class="form-table">
|
||||
<tr>
|
||||
<th scope="row"><label><?php esc_html_e("File Name", 'duplicator'); ?></label></th>
|
||||
<td id="installer-name-mode-option" >
|
||||
<b><?php esc_html_e("Default 'Save as' name:", 'duplicator'); ?></b> <br/>
|
||||
<label>
|
||||
<i class="fas fa-shield-alt fa-fw shield-off"></i>
|
||||
<input type="radio" name="installer_name_mode"
|
||||
value="<?php echo DUP_Settings::INSTALLER_NAME_MODE_SIMPLE; ?>"
|
||||
<?php checked($installerNameMode === DUP_Settings::INSTALLER_NAME_MODE_SIMPLE); ?>>
|
||||
<b class="dup-install-meta"><?php esc_html_e("Basic", 'duplicator'); ?></b>
|
||||
<?php echo DUP_Installer::DEFAULT_INSTALLER_FILE_NAME_WITHOUT_HASH . '.php'; ?>
|
||||
</label>
|
||||
<br/>
|
||||
<label>
|
||||
<i class="fas fa-shield-alt fa-fw shield-on"></i>
|
||||
<input type="radio" name="installer_name_mode"
|
||||
value="<?php echo DUP_Settings::INSTALLER_NAME_MODE_WITH_HASH; ?>"
|
||||
<?php checked($installerNameMode === DUP_Settings::INSTALLER_NAME_MODE_WITH_HASH); ?> />
|
||||
<b class="dup-install-meta"><?php esc_html_e("Secure", "duplicator"); ?></b>
|
||||
<?php
|
||||
echo esc_html_x(
|
||||
'[name]_[hash]_[time]_installer.php',
|
||||
'Leave _installer.php part as is translate only [name], [hash] and [time]',
|
||||
'duplicator'
|
||||
);
|
||||
?>
|
||||
<i>(<?php esc_html_e("recommended", 'duplicator'); ?>)</i>
|
||||
</label>
|
||||
<p class="description">
|
||||
<?php esc_html_e("To understand the importance and usage of the installer name, please", 'duplicator') ?>
|
||||
<a href="javascript:void(0)" onclick="jQuery('#dup-lite-inst-mode-details').toggle()"><?php esc_html_e("read this section", 'duplicator') ?> </a>.
|
||||
</p>
|
||||
<div id="dup-lite-inst-mode-details">
|
||||
<p>
|
||||
<?php esc_html_e("Using a 'Secure' file helps prevent unauthorized access to the installer file.", 'duplicator'); ?> <br/>
|
||||
<i><b><?php esc_html_e('Example', 'duplicator'); ?>:</b> my-name_64fc6df76c17f2023225_20220815053010_installer.php</i>
|
||||
</p>
|
||||
<p>
|
||||
<?php
|
||||
esc_html_e(
|
||||
'This setting specifies the name of the installer used at download-time. Independent of the value of this setting, you can '
|
||||
. 'change the name of the installer in the "Save as" file dialog at download-time. If you choose to use a custom name, '
|
||||
. 'use a file name that is known only to you. Installer filenames must end in "php". Changes to the Backup file should not '
|
||||
. 'be made.',
|
||||
'duplicator'
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
<p>
|
||||
<?php
|
||||
esc_html_e('Do not to leave any installer files on the destination server, after installing the migrated/restored site. '
|
||||
. 'Logon as a WordPress administrator and follow the prompts to remove the installer files or remove them manually.', 'duplicator');
|
||||
?>
|
||||
</p>
|
||||
<p>
|
||||
<i>
|
||||
<i class="fas fa-info-circle fa-sm"></i>
|
||||
<?php
|
||||
esc_html_e('Tip: Each row on the Backups screen includes a copy button to copy the installer name to the clipboard. '
|
||||
. 'Paste the installer name from the clipboard into the URL being used to install the destination site. '
|
||||
. 'This feature is handy when using the secure installer name.', 'duplicator');
|
||||
?>
|
||||
</i>
|
||||
</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h3 class="title"><?php esc_html_e("Visuals", 'duplicator') ?> </h3>
|
||||
<hr size="1" />
|
||||
<table class="form-table">
|
||||
<tr>
|
||||
<th scope="row"><label><?php esc_html_e("Created Format", 'duplicator'); ?></label></th>
|
||||
<td>
|
||||
<select name="package_ui_created" id="package_ui_created">
|
||||
<!-- YEAR -->
|
||||
<optgroup label="<?php esc_html_e("By Year", 'duplicator'); ?>">
|
||||
<option value="1">Y-m-d H:i [2000-01-05 12:00]</option>
|
||||
<option value="2">Y-m-d H:i:s [2000-01-05 12:00:01]</option>
|
||||
<option value="3">y-m-d H:i [00-01-05 12:00]</option>
|
||||
<option value="4">y-m-d H:i:s [00-01-05 12:00:01]</option>
|
||||
</optgroup>
|
||||
<!-- MONTH -->
|
||||
<optgroup label="<?php esc_html_e("By Month", 'duplicator'); ?>">
|
||||
<option value="5">m-d-Y H:i [01-05-2000 12:00]</option>
|
||||
<option value="6">m-d-Y H:i:s [01-05-2000 12:00:01]</option>
|
||||
<option value="7">m-d-y H:i [01-05-00 12:00]</option>
|
||||
<option value="8">m-d-y H:i:s [01-05-00 12:00:01]</option>
|
||||
</optgroup>
|
||||
<!-- DAY -->
|
||||
<optgroup label="<?php esc_html_e("By Day", 'duplicator'); ?>">
|
||||
<option value="9"> d-m-Y H:i [05-01-2000 12:00]</option>
|
||||
<option value="10">d-m-Y H:i:s [05-01-2000 12:00:01]</option>
|
||||
<option value="11">d-m-y H:i [05-01-00 12:00]</option>
|
||||
<option value="12">d-m-y H:i:s [05-01-00 12:00:01]</option>
|
||||
</optgroup>
|
||||
</select>
|
||||
<p class="description">
|
||||
<?php esc_html_e("The UTC date format shown in the 'Created' column on the Backups screen.", 'duplicator'); ?> <br/>
|
||||
<i><?php esc_html_e("To use WordPress timezone formats consider an upgrade to Duplicator Pro.", 'duplicator'); ?></i>
|
||||
</p>
|
||||
</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 Backup Settings", 'duplicator') ?>" style="display: inline-block;" />
|
||||
</p>
|
||||
</form>
|
||||
|
||||
<script>
|
||||
jQuery(document).ready(function ($)
|
||||
{
|
||||
Duplicator.Pack.SetDBEngineMode = function ()
|
||||
{
|
||||
var isMysqlDump = $('#package_mysqldump').is(':checked');
|
||||
var isPHPMode = $('#package_phpdump').is(':checked');
|
||||
var isPHPChunkMode = $('#package_phpchunkingdump').is(':checked');
|
||||
|
||||
$('#dbengine-details-1, #dbengine-details-2').hide();
|
||||
switch (true) {
|
||||
case isMysqlDump :
|
||||
$('#dbengine-details-1').show();
|
||||
break;
|
||||
case isPHPMode :
|
||||
case isPHPChunkMode :
|
||||
$('#dbengine-details-2').show();
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
Duplicator.Pack.ToggleArchiveEngine = function ()
|
||||
{
|
||||
$('#engine-details-1, #engine-details-2').hide();
|
||||
if ($('#archive_build_mode1').is(':checked')) {
|
||||
$('#engine-details-1').show();
|
||||
$('#package_zip_flush').removeAttr('disabled');
|
||||
} else {
|
||||
$('#engine-details-2').show();
|
||||
$('#package_zip_flush').attr('disabled', true);
|
||||
}
|
||||
};
|
||||
|
||||
Duplicator.Pack.SetDBEngineMode();
|
||||
$('#package_mysqldump , #package_phpdump').change(function () {
|
||||
Duplicator.Pack.SetDBEngineMode();
|
||||
});
|
||||
Duplicator.Pack.ToggleArchiveEngine();
|
||||
|
||||
$('#package_ui_created').val(<?php echo esc_js($package_ui_created); ?>);
|
||||
|
||||
});
|
||||
</script>
|
||||
@@ -0,0 +1,94 @@
|
||||
<?php
|
||||
|
||||
use Duplicator\Controllers\StorageController;
|
||||
use Duplicator\Core\Controllers\ControllersManager;
|
||||
use Duplicator\Libs\Snap\SnapUtil;
|
||||
|
||||
defined('ABSPATH') || defined('DUPXABSPATH') || exit;
|
||||
|
||||
$action_updated = false;
|
||||
$action_response = esc_html__("Storage Settings Saved", 'duplicator');
|
||||
|
||||
// Save results
|
||||
if (SnapUtil::sanitizeTextInput(INPUT_POST, 'action') === 'save') {
|
||||
// Nonce check
|
||||
$nonce = SnapUtil::sanitizeTextInput(INPUT_POST, 'dup_storage_settings_save_nonce_field');
|
||||
if (!wp_verify_nonce($nonce, 'dup_settings_save')) {
|
||||
wp_die(esc_html__('Invalid token permissions to perform this request.', 'duplicator'));
|
||||
}
|
||||
|
||||
DUP_Settings::Set('storage_htaccess_off', SnapUtil::sanitizeBoolInput(INPUT_POST, 'storage_htaccess_off'));
|
||||
DUP_Settings::Save();
|
||||
$action_updated = true;
|
||||
}
|
||||
|
||||
$storageHtaccessCheck = DUP_Settings::Get('storage_htaccess_off');
|
||||
$actionUrl = ControllersManager::getMenuLink(ControllersManager::SETTINGS_SUBMENU_SLUG, 'storage');
|
||||
$storagePath = DUP_Settings::Get('storage_position');
|
||||
// Keep the storage path in sync with the storage position to identify the correct storage path after migration
|
||||
$storagePath = $storagePath === DUP_Settings::STORAGE_POSITION_WP_CONTENT ? DUP_Settings::getSsdirPathWpCont() : DUP_Settings::getSsdirPathLegacy();
|
||||
?>
|
||||
<style>
|
||||
div.panel {padding: 20px 5px 10px 10px;}
|
||||
div.area {font-size:16px; text-align: center; line-height: 30px; width:500px; margin:auto}
|
||||
ul.li {padding:2px}
|
||||
</style>
|
||||
|
||||
<div class="panel">
|
||||
<form id="dup-settings-form" action="<?php echo esc_url($actionUrl); ?>" method="post">
|
||||
<?php wp_nonce_field('dup_settings_save', 'dup_storage_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; ?>
|
||||
|
||||
<table class="form-table">
|
||||
<tr valign="top">
|
||||
<th scope="row"><label><?php esc_html_e("Storage Location", 'duplicator'); ?></label></th>
|
||||
<td>
|
||||
<p>
|
||||
<code><?php echo esc_html($storagePath); ?></code>
|
||||
</p>
|
||||
<p class="description">
|
||||
<?php esc_html_e("Backup files are stored in the wp-content directory for better security and compatibility.", 'duplicator'); ?>
|
||||
<br/>
|
||||
<i class="fas fa-server fa-sm"></i>
|
||||
<span id="duplicator_advanced_storage_text" class="link-style">[<?php esc_html_e("More Advanced Storage Options...", 'duplicator'); ?>]</span>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<th scope="row"><label><?php esc_html_e("Apache .htaccess", 'duplicator'); ?></label></th>
|
||||
<td>
|
||||
<input type="checkbox" name="storage_htaccess_off" id="storage_htaccess_off" <?php checked($storageHtaccessCheck); ?> />
|
||||
<label for="storage_htaccess_off"><?php esc_html_e("Disable .htaccess file in storage directory", 'duplicator') ?> </label>
|
||||
<p class="description">
|
||||
<?php
|
||||
esc_html_e("When checked this setting will prevent Duplicator from laying down an .htaccess file in the storage location above.", 'duplicator');
|
||||
esc_html_e("Only disable this option if issues occur when downloading either the installer/archive files.", '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 Storage Settings", 'duplicator') ?>" style="display: inline-block;" />
|
||||
</p>
|
||||
</form>
|
||||
<br/>
|
||||
</div>
|
||||
<!-- ==========================================
|
||||
THICK-BOX DIALOGS: -->
|
||||
<?php
|
||||
$storageAlert = StorageController::getDialogBox('settings-storage-tab');
|
||||
?>
|
||||
<script>
|
||||
jQuery(document).ready(function ($) {
|
||||
$("#duplicator_advanced_storage_text").click(function () {
|
||||
<?php $storageAlert->showAlert(); ?>
|
||||
});
|
||||
});
|
||||
</script>
|
||||
Reference in New Issue
Block a user