first commit

This commit is contained in:
2026-03-05 13:07:40 +01:00
commit 64ba0721ee
25709 changed files with 4691006 additions and 0 deletions

View File

@@ -0,0 +1,49 @@
<?php
/**
* Duplicator package row in table packages list
*
* @package Duplicator
* @copyright (c) 2022, Snap Creek LLC
*/
use Duplicator\Core\Controllers\ControllersManager;
defined("ABSPATH") or die("");
/**
* Variables
*
* @var \Duplicator\Core\Controllers\ControllersManager $ctrlMng
* @var \Duplicator\Core\Views\TplMng $tplMng
* @var array<string, mixed> $tplData
*/
$tooltipTitle = esc_attr__('Package creation', 'duplicator');
$tooltipContent = esc_attr__(
'This will create a new package. If a package is currently running then this button will be disabled.',
'duplicator'
);
?>
<div class="dup-section-package-create dup-flex-content">
<span>
<?php esc_html_e('Last backup:', 'duplicator'); ?>
<span class="dup-last-backup-info">
<?php echo $tplData['lastBackupString']; ?>
</span>
</span>
<span
class="dup-new-package-wrapper"
data-tooltip-title="<?php echo $tooltipTitle; ?>"
data-tooltip="<?php echo $tooltipContent; ?>"
>
<a
id="dup-pro-create-new"
class="button button-primary <?php echo DUP_Package::isPackageRunning() ? 'disabled' : ''; ?>"
href="<?php echo esc_url(ControllersManager::getPackageBuildUrl()); ?>"
>
<?php esc_html_e('Create New', 'duplicator'); ?>
</a>
</span>
</div>

View File

@@ -0,0 +1,49 @@
<?php
/**
* Duplicator package row in table packages list
*
* @package Duplicator
* @copyright (c) 2022, Snap Creek LLC
*/
use Duplicator\Controllers\PackagesPageController;
use Duplicator\Core\Controllers\ControllersManager;
defined("ABSPATH") or die("");
/**
* Variables
*
* @var \Duplicator\Core\Controllers\ControllersManager $ctrlMng
* @var \Duplicator\Core\Views\TplMng $tplMng
* @var array<string, mixed> $tplData
* @var DUP_Package[] $packages
*/
$packages = $tplData['packages'];
?>
<div class="dup-section-last-packages">
<p>
<b><?php esc_html_e('Recently Packages', 'duplicator'); ?></b>
</p>
<?php if (count($packages) > 0) { ?>
<ul>
<?php foreach ($packages as $package) {
$createdTime = strtotime($package->Created);
$createdDate = date(get_option('date_format'), $createdTime);
$createdHours = date(get_option('time_format'), $createdTime);
?>
<li>
<a href="<?php echo esc_url(ControllersManager::getPackageDetailUrl($package->ID)); ?>">
<?php echo esc_html($package->Name); ?>
</a> - <i class="gary" ><?php echo esc_html($createdDate . ' ' . $createdHours); ?></i>
</li>
<?php } ?>
</ul>
<?php } ?>
<p class="dup-packages-counts">
<?php printf(esc_html__('Packages: %1$d, Failures: %2$d', 'duplicator'), $tplData['totalPackages'], $tplData['totalFailures']); ?>
</p>
</div>

View File

@@ -0,0 +1,55 @@
<?php
/**
* Duplicator package row in table packages list
*
* @package Duplicator
* @copyright (c) 2022, Snap Creek LLC
*/
defined("ABSPATH") or die("");
/**
* Variables
*
* @var \Duplicator\Core\Controllers\ControllersManager $ctrlMng
* @var \Duplicator\Core\Views\TplMng $tplMng
* @var array<string, mixed> $tplData
* @var array{name: string,slug: string,more: string,pro: array{file: string}} $plugin
*/
$plugin = $tplData['plugin'];
/** @var string */
$installUrl = $tplData['installUrl'];
$moreUrl = $plugin['more'] . '?' . http_build_query(array(
'utm_medium' => 'link',
'utm_source' => 'duplicatorplugin',
'utm_campaign' => 'duplicatordashboardwidget'
));
?>
<div class="dup-section-recommended">
<hr>
<div class="dup-flex-content" >
<div>
<span class="dup-recommended-label">
<?php esc_html_e('Recommended Plugin:', 'duplicator'); ?>
</span>
<b><?php echo esc_html($plugin['name']); ?></b>
-
<span class="action-links">
<?php if (current_user_can('install_plugins') && current_user_can('activate_plugins')) { ?>
<a href="<?php echo esc_url($installUrl); ?>"><?php esc_html_e('Install', 'duplicator'); ?></a>
<?php } ?>
<a href="<?php echo esc_url($moreUrl); ?>" target="_blank" ><?php
esc_html_e('Learn More', 'duplicator');
?></a>
</span>
</div>
<div>
<button type="button" id="dup-dash-widget-section-recommended" title="<?php esc_html_e('Dismiss recommended plugin', 'duplicator'); ?>">
<span class="dashicons dashicons-no-alt"></span>
</button>
</div>
</div>
</div>

View File

@@ -0,0 +1,107 @@
<?php
/**
* Duplicator package row in table packages list
*
* @package Duplicator
* @copyright (c) 2022, Snap Creek LLC
*/
use Duplicator\Controllers\ToolsPageController;
use Duplicator\Core\Controllers\ControllersManager;
defined("ABSPATH") or die("");
/**
* Variables
*
* @var \Duplicator\Core\Controllers\ControllersManager $ctrlMng
* @var \Duplicator\Core\Views\TplMng $tplMng
* @var array<string, mixed> $tplData
*/
$templatesURL = ControllersManager::getMenuLink(
ControllersManager::TOOLS_SUBMENU_SLUG,
'templates'
);
$recoveryURl = ControllersManager::getMenuLink(
ControllersManager::TOOLS_SUBMENU_SLUG,
'recovery'
);
?>
<div class="dup-section-sections">
<ul>
<li class="dup-flex-content">
<span class="dup-section-label-fixed-width" >
<span class="dashicons dashicons-update gary"></span>
<a href="<?php echo esc_url(ControllersManager::getMenuLink(ControllersManager::SCHEDULES_SUBMENU_SLUG)); ?>"><?php
echo esc_html(sprintf(
_n(
'%s Schedule',
'%s Schedules',
$tplData['numSchedules'],
'duplicator'
),
$tplData['numSchedules']
));
?></a>
</span>
<span>
<?php _e('Enabled', 'duplicator'); ?>:
<b class="<?php echo ($tplData['numSchedulesEnabled'] ? 'green' : 'maroon'); ?>">
<?php echo $tplData['numSchedulesEnabled']; ?>
</b>
<?php if (strlen($tplData['nextScheduleString'])) { ?>
- <?php _e('Next', 'duplicator'); ?>: <b><?php echo $tplData['nextScheduleString']; ?></b>
<?php } ?>
</span>
</li>
<li>
<span class="dup-section-label-fixed-width" >
<span class="dashicons dashicons-database gary"></span>
<a href="<?php echo esc_url(ControllersManager::getMenuLink(ControllersManager::STORAGE_SUBMENU_SLUG)); ?>"><?php
echo esc_html(sprintf(
_n(
'%s Storage',
'%s Storages',
$tplData['numStorages'],
'duplicator'
),
$tplData['numStorages']
));
?>
</a>
</span>
</li>
<li>
<span class="dup-section-label-fixed-width" >
<span class="dashicons dashicons-admin-settings gary"></span>
<a href="<?php echo esc_url($templatesURL); ?>"><?php
echo esc_html(sprintf(
_n(
'%s Template',
'%s Templates',
$tplData['numTemplates'],
'duplicator'
),
$tplData['numTemplates']
));
?>
</a>
</span>
</li>
<li class="dup-flex-content">
<span class="dup-section-label-fixed-width" >
<span class="dashicons dashicons-image-rotate gary"></span>
<a href="<?php echo esc_url($recoveryURl); ?>" ><?php
esc_html_e('Recovery Point', 'duplicator');
?>
</a>
</span>
<span>
<span class="maroon"><b><?php esc_html_e('Not set', 'duplicator'); ?></b></span>
</span>
</li>
</ul>
</div>

View File

@@ -0,0 +1,81 @@
<?php
/**
*
* @package Duplicator
* @copyright (c) 2023, Snap Creek LLC
*/
use Duplicator\Utils\Upsell;
defined("ABSPATH") || exit;
/**
* Variables
*
* @var \Duplicator\Core\Views\TplMng $tplMng
* @var array<string, mixed> $tplData
*/
?>
<div class="dup-settings-lite-cta">
<a href="#" class="dismiss" title="<?php esc_attr_e('Dismiss this message', 'duplicator'); ?>"><i class="fa fa-times-circle" aria-hidden="true"></i></a>
<h5><?php esc_html_e('Get Duplicator Pro and Unlock all the Powerful Features', 'duplicator'); ?></h5>
<p>
<?php esc_html_e(
'Thanks for being a loyal Duplicator Lite user. Upgrade to Duplicator Pro to unlock all the ' .
'awesome features and experience why Duplicator is consistently rated the best WordPress migration plugin.',
'duplicator'
); ?>
</p>
<p>
<?php
printf(
wp_kses( /* translators: %s - star icons. */
__(
'We know that you will truly love Duplicator. It has over 4000+ five star ratings (%s) and is active on ' .
'over 1 million websites.',
'duplicator'
),
array(
'i' => array(
'class' => array(),
'aria-hidden' => array(),
),
)
),
str_repeat('<i class="fa fa-star" aria-hidden="true"></i>', 5) // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
);
?>
</p>
<h6><?php esc_html_e('Pro Features:', 'duplicator'); ?></h6>
<ul class="list">
<?php
foreach (Upsell::getCalloutCTAFeatureList() as $feature) {
?>
<li class="item">
<span>
<?php echo esc_html($feature); ?>
</span>
</li>
<?php
};
?>
</ul>
<p>
<a href="<?php echo esc_url(Upsell::getCampaignUrl('settings-upgrade')); ?>" target="_blank" rel="noopener noreferrer">
<?php esc_html_e('Get Duplicator Pro Today and Unlock all the Powerful Features »', 'duplicator'); ?>
</a>
</p>
<p>
<?php
printf(
__(
'<strong>Bonus:</strong> Duplicator Lite users get <span class="green">%1$d%% off regular price</span>,' .
'automatically applied at checkout.',
'duplicator'
),
DUP_Constants::UPSELL_DEFAULT_DISCOUNT
);
?>
</p>
</div>

View File

@@ -0,0 +1,26 @@
<?php
/**
*
* @package Duplicator
* @copyright (c) 2023, Snap Creek LLC
*/
use Duplicator\Utils\Upsell;
defined("ABSPATH") || exit;
/**
* Variables
*
* @var \Duplicator\Core\Views\TplMng $tplMng
* @var array<string, mixed> $tplData
*/
?>
<div id="duplicator-did-you-know">
<i class="fas fa-info-circle"></i>
<?php printf(__('Did you know Duplicator Pro has: %s?', 'duplicator'), $tplData['feature']);?>
<a href="<?php echo Upsell::getCampaignUrl('scan_did-you-know', $tplData['feature']) ?>" target="_blank">
<?php esc_html_e('Upgrade To Pro', 'duplicator'); ?>
</a>
</div>

View File

@@ -0,0 +1,46 @@
<?php
/**
*
* @package Duplicator
* @copyright (c) 2023, Snap Creek LLC
*/
use Duplicator\Utils\Upsell;
defined("ABSPATH") || exit;
/**
* Variables
*
* @var \Duplicator\Core\Views\TplMng $tplMng
* @var array<string, mixed> $tplData
*/
?>
<tr>
<th colspan="11">
<div id="dup-packages-bottom-bar">
<div class="icon">
<i class="fas fa-info-circle"></i>
</div>
<div class="feature">
<p><strong><?php _e('Upgrade to Pro to Unlock...', 'duplicator'); ?></strong></p>
<p>
<?php echo $tplData['feature'];?>
</p>
</div>
<div class="upsell">
<a href="<?php echo Upsell::getCampaignUrl('packages_bottom-bar', $tplData['feature']) ?>"
class="dup-btn dup-btn-md dup-btn-green"
target="_blank">
<?php esc_html_e('Upgrade Now & Save!', 'duplicator'); ?>
</a>
</div>
<div>
<button type="button" id="dup-packages-bottom-bar-dismiss" title="Dismiss recommended plugin">
<span class="dashicons dashicons-no-alt"></span>
</button>
</div>
</div>
</th>
</tr>

View File

@@ -0,0 +1,34 @@
<?php
/**
* @package Duplicator
*/
defined("ABSPATH") || exit;
use Duplicator\Core\Views\TplMng;
use Duplicator\Utils\Upsell;
/**
* Variables
*
* @var \Duplicator\Core\Views\TplMng $tplMng
* @var array<string, mixed> $tplData
*/
?>
<div class="static-popup">
<div class="static-popup-content-top-notice">
<i class="fas fa-exclamation-triangle"></i><?php echo $tplData['warning-text']; ?>
</div>
<div class="static-popup-content">
<h2>
<?php echo $tplData['title']; ?>
</h2>
<?php echo TplMng::getInstance()->render($tplData['content-tpl']); ?>
</div>
<div class="static-popup-button">
<a href="<?php echo esc_url($tplData['upsell-url']); ?>" class="dup-btn-green dup-btn-lg dup-btn" target="_blank" rel="noopener noreferrer">
<?php echo __('Upgrade to Duplicator Pro Now', 'duplicator'); ?>
</a>
</div>
</div>

View File

@@ -0,0 +1,31 @@
<?php
/**
*
* @package Duplicator
* @copyright (c) 2023, Snap Creek LLC
*/
use Duplicator\Utils\Upsell;
defined("ABSPATH") || exit;
/**
* Variables
*
* @var \Duplicator\Core\Views\TplMng $tplMng
* @var array<string, mixed> $tplData
*/
?>
<div class="dup-subscribe-form">
<div class="input-area">
<input type="email"
name="email"
placeholder="<?php _e('Email Address', 'duplicator'); ?>"
value="<?php echo wp_get_current_user()->user_email; ?>"><button
type="button" class="dup-btn dup-btn-md dup-btn-green"><?php _e('Subscribe', 'duplicator'); ?></button>
</div>
<div class="desc">
<small><?php _e('Get tips and product updates straight to your inbox.', 'duplicator'); ?></small>
</div>
</div>

View File

@@ -0,0 +1,45 @@
<?php
/**
* Admin Notifications template.
*
* Variables
*
* @var \Duplicator\Core\Views\TplMng $tplMng
* @var array<string, mixed> $tplData
*/
defined('ABSPATH') || exit;
?>
<div id="dup-notifications">
<div class="dup-notifications-header">
<div class="dup-notifications-bell">
<img src="<?php echo DUPLICATOR_PLUGIN_URL; ?>assets/img/notification-bell.svg"/>
<span class="wp-ui-notification dup-notifications-circle"></span>
</div>
<div class="dup-notifications-title"><?php esc_html_e('Notifications', 'duplicator'); ?></div>
</div>
<div class="dup-notifications-body">
<a class="dismiss" title="<?php esc_attr_e('Dismiss this message', 'duplicator'); ?>"><i class="fa fa-times-circle" aria-hidden="true"></i></a>
<?php if (count($tplData['notifications']) > 1) : ?>
<div class="navigation">
<a class="prev">
<span class="screen-reader-text"><?php esc_attr_e('Previous message', 'duplicator'); ?></span>
<span aria-hidden="true">&lsaquo;</span>
</a>
<a class="next">
<span class="screen-reader-text"><?php esc_attr_e('Next message', 'duplicator'); ?></span>
<span aria-hidden="true">&rsaquo;</span>
</a>
</div>
<?php endif; ?>
<div class="dup-notifications-messages">
<?php foreach ($tplData['notifications'] as $notification) {
$tplMng->render('parts/Notifications/single-message', $notification);
} ?>
</div>
</div>
</div>

View File

@@ -0,0 +1,36 @@
<?php
/**
* Admin Notifications content.
*
* Variables
*
* @var \Duplicator\Core\Views\TplMng $tplMng
* @var array<string, mixed> $tplData
*/
defined('ABSPATH') || exit;
?>
<div class="dup-notifications-message" data-message-id="<?php echo esc_attr($tplData['id']); ?>;">
<h3 class="dup-notifications-title">
<?php echo esc_html($tplData['title']); ?>
<?php if ($tplData['video_url'] !== false) : ?>
<a
class="dup-notifications-badge"
href="<?php echo esc_attr($tplData['video_url']); ?>"
<?php echo wp_is_mobile() ? '' : 'data-lity'?>>
<i class="fa fa-play" aria-hidden="true"></i> <?php esc_html_e('Watch video', 'duplicator'); ?>
</a>
<?php endif; ?>
</h3>
<div class="dup-notifications-content">
<?php echo $tplData['content']; ?>
</div>
<?php foreach ($tplData['btns'] as $btn) : ?>
<a
href="<?php echo esc_attr($btn['url']); ?>"
class="button button-<?php echo esc_attr($btn['type']); ?>"
<?php echo $btn['target'] === '_blank' ? 'target="_blank"' : ''; ?>>
<?php echo esc_html($btn['text']); ?>
</a>
<?php endforeach; ?>
</div>

View File

@@ -0,0 +1,19 @@
<?php
/**
* @package Duplicator
*/
defined("ABSPATH") || exit;
/**
* Variables
*
* @var \Duplicator\Core\Views\TplMng $tplMng
* @var array<string, mixed> $tplData
*/
?>
<div id="dup-meta-screen"></div>
<div class="dup-header">
<img src="<?php echo DUPLICATOR_PLUGIN_URL . 'assets/img/duplicator-header-logo.svg'; ?>" alt="Duplicator Logo" >
</div>

View File

@@ -0,0 +1,344 @@
<?php
/**
* Duplicator package row in table packages list
*
* @package Duplicator
* @copyright (c) 2022, Snap Creek LLC
*/
use Duplicator\Installer\Utils\LinkManager;
use Duplicator\Libs\Snap\SnapIO;
use Duplicator\Utils\Upsell;
defined("ABSPATH") or die("");
/**
* Variables
*
* @var \Duplicator\Core\Controllers\ControllersManager $ctrlMng
* @var \Duplicator\Core\Views\TplMng $tplMng
* @var array<string, mixed> $tplData
*/
$archiveFilterPaths = trim($tplData['package']->Archive->FilterDirs . ";" . $tplData['package']->Archive->FilterFiles, ";");
$archiveFilterPaths = str_replace(';', ";\n", $archiveFilterPaths);
$archiveFilterExtensions = $tplData['package']->Archive->FilterExts;
$packageComponentsTooltip = wp_kses(
__("Package components allow you to include/exclude differents part of your WordPress installation in the package.</br></br>" .
"<b>Database</b>: Include the database in the package.</br>" .
"<b>Plugins</b>: Include the plugins in the package. With the 'active only' option enabled, only active plugins will be included in the package.</br>" .
"<b>Themes</b>: Include the themes in the package. With the 'active only' option enabled, only active themes will be included in the package.</br>" .
"<b>Media</b>: Include the 'uploads' folder.</br>" .
"<b>Other</b>: Include non-WordPress files and folders in the root directory.</br>", 'duplicator'),
array(
'br' => array(),
'b' => array(),
)
);
$pathFiltersTooltip = __("File filters allow you to exclude files and folders from the package. To enable path and extension filters check the " .
"checkbox. Enter the full path of the files and folders you want to exclude from the package as a semicolon (;) seperated list.");
$extensionFilterTooltip = __("File extension filters allow you to exclude files with certain file extensions from the package e.g. zip;rar;pdf etc. " .
"Enter the file extensions you want to exclude from the package as a semicolon (;) seperated list.");
?>
<div class="dup-package-components">
<div class="component-section">
<div class="section-title">
<span id="component-section-title">
<?php _e('Components', 'duplicator'); ?>
<i class="fas fa-question-circle fa-sm"
data-tooltip-title="<?php _e('Package Components (Pro feature)', 'duplicator'); ?>"
data-tooltip="<?php echo $packageComponentsTooltip;?>"
aria-expanded="false"></i>
</span>
</div>
<div class="components-shortcut-select">
<div class="dup-radio-button-group-wrapper">
<input
type="radio"
id="dup-component-shortcut-action-all"
name="auto-select-components"
class="dup-components-shortcut-radio"
value="all"
data-parsley-multiple="auto-select-components"
<?php checked(!$tplData['package']->Archive->ExportOnlyDB); ?>
>
<label for="dup-component-shortcut-action-all">All</label>
<input
type="radio"
id="dup-component-shortcut-action-database"
name="auto-select-components"
class="dup-components-shortcut-radio"
value="database"
<?php checked($tplData['package']->Archive->ExportOnlyDB); ?>
data-parsley-multiple="auto-select-components"
>
<label for="dup-component-shortcut-action-database">Database Only</label>
<label class="disabled" for="dup-component-shortcut-action-media">Media Only</label>
<label class="disabled" for="dup-component-shortcut-action-custom">Custom</label>
</div>
</div>
<ul class="custom-components-select">
<li>
<label class="disabled">
<input type="checkbox" name="package_component_db" class="package_component_checkbox" disabled checked>
<span><?php _e('Database', 'duplicator'); ?></span>
</label>
</li>
<li>
<label class="disabled">
<input type="checkbox" name="package_component_plugins" class="package_component_checkbox" disabled
<?php checked(!$tplData['package']->Archive->ExportOnlyDB); ?>>
<span><?php _e('Plugins', 'duplicator'); ?></span>
</label>
</li>
<li>
<label class="secondary disabled">
<input type="checkbox" name="package_component_plugins_active" class="package_component_checkbox" disabled>
<span><?php _e('Only Active Plugins', 'duplicator'); ?></span>
</label>
</li>
<li>
<label class="disabled">
<input type="checkbox" name="package_component_themes" class="package_component_checkbox" disabled
<?php checked(!$tplData['package']->Archive->ExportOnlyDB); ?>>
<span><?php _e('Themes', 'duplicator'); ?></span>
</label>
</li>
<li>
<label class="secondary disabled">
<input type="checkbox" name="package_component_themes_active" class="package_component_checkbox" disabled>
<span><?php _e('Only Active Themes', 'duplicator'); ?></span>
</label>
</li>
<li>
<label class="disabled">
<input type="checkbox" name="package_component_media" class="package_component_checkbox" disabled
<?php checked(!$tplData['package']->Archive->ExportOnlyDB); ?>>
<span><?php _e('Media', 'duplicator'); ?></span>
</label>
</li>
<li>
<label class="disabled">
<input type="checkbox" name="package_component_other" class="package_component_checkbox" disabled
<?php checked(!$tplData['package']->Archive->ExportOnlyDB); ?>>
<span><?php _e('Other', 'duplicator'); ?></span>
</label>
</li>
</ul>
</div>
<div class="filter-section">
<div class="filters">
<div class="section-title">
<span><?php _e('Filters', 'duplicator'); ?> (<label><input id="filter-on"
name="filter-on"
type="checkbox" <?php checked($tplData['package']->Archive->FilterOn); ?>> Enable</label>)
<i class="fas fa-question-circle fa-sm"
data-tooltip-title="<?php _e('Path Filters', 'duplicator'); ?>"
data-tooltip="<?php echo $pathFiltersTooltip;?>"
aria-expanded="false"></i>
</span>
<div class="filter-links">
<a href="#" data-filter-path="<?php echo SnapIO::trailingslashit(DUP_Archive::getOriginalPaths('home')); ?>">[root path]</a>
<a href="#" data-filter-path="<?php echo SnapIO::trailingslashit(DUP_Archive::getOriginalPaths('wpcontent')); ?>">[wp-content]</a>
<a href="#" data-filter-path="<?php echo SnapIO::trailingslashit(DUP_Archive::getOriginalPaths('uploads')); ?>">[wp-uploads]</a>
<a href="#" data-filter-path="<?php echo SnapIO::trailingslashit(DUP_Archive::getOriginalPaths('wpcontent')) . 'cache/'; ?>">[cache]</a>
<a href="#" id="clear-path-filters">(clear)</a>
</div>
</div>
<textarea
id="filter-paths"
name="filter-paths"
placeholder="/full_path/dir/;&#10;/full_path/file;"
readonly><?php echo $archiveFilterPaths; ?></textarea>
<div class="section-title">
<span>
<?php _e('File Extensions', 'duplicator'); ?>
<i class="fas fa-question-circle fa-sm"
data-tooltip-title="<?php _e('File Extensions', 'duplicator'); ?>"
data-tooltip="<?php echo $extensionFilterTooltip;?>"
aria-expanded="false"></i>
</span>
<div class="filter-links">
<a href="#" data-filter-exts="avi;mov;mp4;mpeg;mpg;swf;wmv;aac;m3u;mp3;mpa;wav;wma">[media]</a>
<a href="#" data-filter-exts="zip;rar;tar;gz;bz2;7z">[archive]</a>
<a href="#" id="clear-extension-filters">(clear)</a>
</div>
</div>
<textarea id="filter-exts" name="filter-exts" placeholder="ext1;ext2;ext3;" readonly><?php echo $archiveFilterExtensions; ?></textarea>
</div>
<div class="db-only-message">
<?php
echo wp_kses(
__(
"<b>Overview:</b><br> This advanced option excludes all files from the archive. Only the database and a copy of the installer.php "
. "will be included in the archive.zip file. The option can be used for backing up and moving only the database.",
'duplicator'
),
array(
'b' => array(),
'br' => array(),
)
);
echo '<br/><br/>';
echo wp_kses(
__(
"<b><i class='fa fa-exclamation-circle'></i> Notice:</b><br/> "
. "Installing only the database over an existing site may have unintended consequences. "
. "Be sure to know the state of your system before installing the database without the associated files. ",
'duplicator'
),
array(
'b' => array(),
'i' => array('class'),
'br' => array()
)
);
esc_html_e(
"For example, if you have WordPress 5.6 on this site and you copy this site's database to a host that has WordPress 5.8 files "
. "then the source code of the files will not be in sync with the database causing possible errors. "
. "This can also be true of plugins and themes. "
. "When moving only the database be sure to know the database will be compatible with "
. "ALL source code files. Please use this advanced feature with caution!",
'duplicator'
);
echo '<br/><br/>';
echo wp_kses(
__("<b>Install Time:</b><br> When installing a database only package please visit the ", 'duplicator'),
array(
'b' => array(),
'br' => array(),
)
);
?>
<a
href="<?php echo esc_url(LinkManager::getDocUrl('database-install', 'backup_step_1', 'db only quick start')); ?>"
target="_blank"
>
<?php esc_html_e('database only quick start', 'duplicator'); ?>
</a>
</div>
</div>
</div>
<div id="dup-upgrade-license-info">
<span class="dup-pro-text">
<?php
printf(
_x(
'The <b>Media Only</b> and <b>Custom</b> options are not included in Duplicator Lite. ' .
'To enable advanced options please %1$supgrade to Pro%2$s.',
'%1$s and %2$s represents the opening and closing HTML tags for an anchor or link.',
'duplicator'
),
'<a href="' . Upsell::getCampaignUrl('package-components-lite', 'upgrade to Pro') . '" target="_blank">',
'</a>'
);
?>
</span>
</div>
<script>
jQuery(document).ready(function($)
{
Duplicator.Pack.ToggleFileFilters = function ()
{
if ($("#filter-on").is(':checked') && !$('#dup-component-shortcut-action-database').is(':checked') ) {
$('#dup-archive-filter-file').show();
$('#filter-exts, #filter-paths').prop('readonly', false);
} else {
$('#dup-archive-filter-file').hide();
$('#filter-exts, #filter-paths').prop('readonly', true);
}
};
Duplicator.Pack.InitDBOnly = function () {
let checkedComponentCheckboxes = $('.package_component_checkbox:checked');
if ($('#dup-component-shortcut-action-database').is(':checked')) {
$("#dup-archive-db-only").show();
$('.filters').hide()
$('.db-only-message').show()
} else {
$("#dup-archive-db-only").hide();
$('.filters').show()
$('.db-only-message').hide()
}
}
Duplicator.Pack.ToggleDBOnly = function () {
let allComponentCheckboxes = $('.dup-package-components label:not(.secondary) .package_component_checkbox');
let dbOnlyCheckbox = $('#dup-component-shortcut-action-database');
let dbCheckbox = $('[name=package_component_db]');
if (dbOnlyCheckbox.is(':checked')) {
allComponentCheckboxes.prop('checked', false);
dbCheckbox.prop('checked', true);
$("#dup-archive-db-only").show();
$('.filters').hide()
$('.db-only-message').show()
} else {
allComponentCheckboxes.prop('checked', true);
$("#dup-archive-db-only").hide();
$('.filters').show()
$('.db-only-message').hide()
}
Duplicator.Pack.ToggleFileFilters ();
}
Duplicator.Pack.ToggleFileFilters();
Duplicator.Pack.InitDBOnly();
$('.dup-components-shortcut-radio').change(Duplicator.Pack.ToggleDBOnly)
$('a[data-filter-path]').click(function (e) {
e.preventDefault()
if ($('#filter-paths').is("[readonly]")) {
return;
}
let currentVal = $('#filter-paths').val()
let newVal = currentVal.length > 0 ? currentVal + ";\n" + $(this).data('filter-path') : $(this).data('filter-path')
$('#filter-paths').val(newVal)
})
$('#clear-path-filters').click(function (e) {
e.preventDefault()
if ($('#filter-paths').is("[readonly]")) {
return;
}
$('#filter-paths').val('')
})
$('a[data-filter-exts]').click(function (e) {
e.preventDefault()
if ($('#filter-exts').is("[readonly]")) {
return;
}
let currentVal = $('#filter-exts').val()
let newVal = currentVal.length > 0 ? currentVal + ";" + $(this).data('filter-exts') : $(this).data('filter-exts')
$('#filter-exts').val(newVal)
})
$('#clear-extension-filters').click(function (e) {
e.preventDefault()
if ($('#filter-exts').is("[readonly]")) {
return;
}
$('#filter-exts').val('')
})
$('#filter-on').change(Duplicator.Pack.ToggleFileFilters)
});
</script>

View File

@@ -0,0 +1,67 @@
<?php
/**
* NoticeBar Education template for Lite.
*
* @package Duplicator
*/
use Duplicator\Utils\Upsell;
defined("ABSPATH") || exit;
/**
* Variables
*
* @var \Duplicator\Core\Views\TplMng $tplMng
* @var array<string, mixed> $tplData
*/
?>
<script>
jQuery(document).ready(function ($) {
$(document).on(
'click',
'#dup-notice-bar .dup-dismiss-button',
function (e) {
e.preventDefault();
$.post(ajaxurl, {
action: 'duplicator_notice_bar_dismiss',
nonce: '<?php echo wp_create_nonce('duplicator-notice-bar-dismiss'); ?>'
});
$('#dup-notice-bar').hide().remove();
}
);
});
</script>
<div id="dup-notice-bar">
<span class="dup-notice-bar-message">
<?php
printf(
wp_kses(
/* translators: %s - duplicator.com Upgrade page URL. */
__(
'<strong>You\'re using Duplicator Lite.</strong> To unlock more features consider ' .
'<a href="%s" target="_blank" rel="noopener noreferrer">upgrading to Pro</a>',
'duplicator'
),
array(
'a' => array(
'href' => array(),
'rel' => array(),
'target' => array(),
),
'strong' => array(),
)
),
esc_url(Upsell::getCampaignUrl('lite-upgrade-bar', $tplData['utm_content']))
);
?>
<a href="<?php echo esc_url(Upsell::getCampaignUrl('lite-upgrade-bar', $tplData['utm_content'])); ?>"
class="dup-upgrade-arrow" target="_blank" rel="noopener noreferrer">→</a>
</span>
<button type="button" class="dup-dismiss-button"
title="<?php esc_attr_e('Dismiss this message.', 'duplicator'); ?>">
</button>
</div>