forked from LiveCarta/LiveCartaWP
Changed source root directory
This commit is contained in:
@@ -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__('Backup creation', 'duplicator');
|
||||
$tooltipContent = esc_attr__(
|
||||
'This will create a new Backup. If a Backup 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>
|
||||
@@ -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 Backups', 'duplicator'); ?></b>
|
||||
</p>
|
||||
<?php if (count($packages) > 0) { ?>
|
||||
<ul>
|
||||
<?php foreach ($packages as $package) {
|
||||
$createdTime = strtotime($package->Created);
|
||||
$createdDate = date_i18n(get_option('date_format'), $createdTime);
|
||||
$createdHours = date_i18n(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__('Backups: %1$d, Failures: %2$d', 'duplicator'), $tplData['totalPackages'], $tplData['totalFailures']); ?>
|
||||
</p>
|
||||
</div>
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -0,0 +1,82 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
*
|
||||
* @package Duplicator
|
||||
* @copyright (c) 2023, Snap Creek LLC
|
||||
*/
|
||||
|
||||
use Duplicator\Utils\LinkManager;
|
||||
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(LinkManager::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>
|
||||
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
*
|
||||
* @package Duplicator
|
||||
* @copyright (c) 2023, Snap Creek LLC
|
||||
*/
|
||||
|
||||
use Duplicator\Utils\LinkManager;
|
||||
|
||||
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 LinkManager::getCampaignUrl('scan_did-you-know', $tplData['feature']) ?>" target="_blank">
|
||||
<?php esc_html_e('Upgrade To Pro', 'duplicator'); ?>
|
||||
</a>
|
||||
</div>
|
||||
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
*
|
||||
* @package Duplicator
|
||||
* @copyright (c) 2023, Snap Creek LLC
|
||||
*/
|
||||
|
||||
use Duplicator\Utils\LinkManager;
|
||||
|
||||
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 LinkManager::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>
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Duplicator
|
||||
*/
|
||||
|
||||
defined("ABSPATH") || exit;
|
||||
|
||||
use Duplicator\Core\Views\TplMng;
|
||||
use Duplicator\Utils\LinkManager;
|
||||
|
||||
/**
|
||||
* 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>
|
||||
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
*
|
||||
* @package Duplicator
|
||||
* @copyright (c) 2023, Snap Creek LLC
|
||||
*/
|
||||
|
||||
use Duplicator\Utils\LinkManager;
|
||||
|
||||
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>
|
||||
@@ -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">‹</span>
|
||||
</a>
|
||||
<a class="next">
|
||||
<span class="screen-reader-text"><?php esc_attr_e('Next message', 'duplicator'); ?></span>
|
||||
<span aria-hidden="true">›</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>
|
||||
@@ -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>
|
||||
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Duplicator
|
||||
*/
|
||||
|
||||
use Duplicator\Utils\Help\Help;
|
||||
use Duplicator\Libs\Snap\SnapJson;
|
||||
|
||||
defined("ABSPATH") || exit;
|
||||
|
||||
/**
|
||||
* Variables
|
||||
*
|
||||
* @var \Duplicator\Core\Views\TplMng $tplMng
|
||||
* @var array<string, mixed> $tplData
|
||||
*/
|
||||
$helpPageUrl = SnapJson::jsonEncode(Help::getHelpPageUrl());
|
||||
require_once(DUPLICATOR_PLUGIN_PATH . '/assets/js/javascript.php');
|
||||
?>
|
||||
<script>
|
||||
jQuery(document).ready(function ($) {
|
||||
$('.duplicator-help-open').click(function () {
|
||||
if (Duplicator.Help.isDataLoaded()) {
|
||||
Duplicator.Help.Display();
|
||||
} else {
|
||||
Duplicator.Help.Load(<?php echo $helpPageUrl; ?>);
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<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" >
|
||||
<button class="duplicator-help-open">
|
||||
<i class="fa-regular fa-question-circle"></i>
|
||||
</button>
|
||||
</div>
|
||||
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
use Duplicator\Utils\ExtraPlugins\ExtraItem;
|
||||
|
||||
/**
|
||||
* Variables
|
||||
*
|
||||
* @var \Duplicator\Core\Views\TplMng $tplMng
|
||||
* @var array<string, mixed> $tplData
|
||||
* @var ExtraItem $plugin
|
||||
*/
|
||||
|
||||
$plugin = $tplData['plugin'];
|
||||
?>
|
||||
<div class="plugin-item">
|
||||
<img src="<?php echo esc_url($plugin->icon); ?>" alt="<?php echo esc_attr($plugin->name); ?> logo"/>
|
||||
<div class="details">
|
||||
<h5 class="addon-name">
|
||||
<?php echo esc_html($plugin->name); ?>
|
||||
</h5>
|
||||
<p class="addon-desc"><?php echo esc_html($plugin->desc); ?></p>
|
||||
<button class="button button-primary dup-extra-plugin-item" data-plugin="<?php echo esc_attr($plugin->getSlug());?>">
|
||||
<?php echo esc_html_e('Install', 'duplicator'); ?>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
use Duplicator\Utils\ExtraPlugins\ExtraItem;
|
||||
|
||||
/**
|
||||
* Variables
|
||||
*
|
||||
* @var \Duplicator\Core\Views\TplMng $tplMng
|
||||
* @var array<string, mixed> $tplData
|
||||
*/
|
||||
|
||||
defined('ABSPATH') || die();
|
||||
|
||||
if (!current_user_can('install_plugins')) {
|
||||
return;
|
||||
}
|
||||
|
||||
/** @var ExtraItem[] $plugins */
|
||||
$plugins = $tplData['plugins'];
|
||||
/** @var int $limit */
|
||||
$limit = $tplData['limit'];
|
||||
?>
|
||||
<div id="dup-cross-promotion">
|
||||
<p>
|
||||
<em><?php echo __('Enjoying Duplicator? Check out a couple of our other free plugins...', 'duplicator'); ?></em>
|
||||
</p>
|
||||
<div class="list">
|
||||
<?php
|
||||
foreach ($plugins as $i => $plugin) {
|
||||
if ($i > $limit - 1) {
|
||||
break;
|
||||
}
|
||||
|
||||
$tplMng->render(
|
||||
'parts/cross_promotion/item',
|
||||
array('plugin' => $plugin)
|
||||
);
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,344 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Duplicator package row in table packages list
|
||||
*
|
||||
* @package Duplicator
|
||||
* @copyright (c) 2022, Snap Creek LLC
|
||||
*/
|
||||
|
||||
use Duplicator\Utils\LinkManager;
|
||||
use Duplicator\Libs\Snap\SnapIO;
|
||||
|
||||
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 = __(
|
||||
"Backup components allow you to include/exclude differents part of your WordPress installation in the Backup.</br></br>" .
|
||||
"<b>Database</b>: Include the database in the Backup.</br>" .
|
||||
"<b>Plugins</b>: Include the plugins in the Backup. With the 'active only' option enabled, only active plugins will be included in the Backup.</br>" .
|
||||
"<b>Themes</b>: Include the themes in the Backup. With the 'active only' option enabled, only active themes will be included in the Backup.</br>" .
|
||||
"<b>Media</b>: Include the 'uploads' folder.</br>" .
|
||||
"<b>Other</b>: Include non-WordPress files and folders in the root directory.</br>",
|
||||
'duplicator'
|
||||
);
|
||||
$pathFiltersTooltip = __("File filters allow you to exclude files and folders from the Backup. To enable path and extension filters check the " .
|
||||
"checkbox. Enter the full path of the files and folders you want to exclude from the Backup as a semicolon (;) seperated list.", "duplicator");
|
||||
$extensionFilterTooltip = __("File extension filters allow you to exclude files with certain file extensions from the Backup e.g. zip;rar;pdf etc. " .
|
||||
"Enter the file extensions you want to exclude from the Backup as a semicolon (;) seperated list.", "duplicator");
|
||||
?>
|
||||
|
||||
<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 esc_attr_e('Backup Components (Pro feature)', 'duplicator'); ?>"
|
||||
data-tooltip="<?php echo esc_attr($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); ?>> <?php esc_html_e('Enable', 'duplicator') ?></label>)
|
||||
<i class="fas fa-question-circle fa-sm"
|
||||
data-tooltip-title="<?php esc_attr_e('Path Filters', 'duplicator'); ?>"
|
||||
data-tooltip="<?php echo esc_attr($pathFiltersTooltip);?>"
|
||||
aria-expanded="false"></i>
|
||||
</span>
|
||||
<div class="filter-links">
|
||||
<a href="#" data-filter-path="<?php echo SnapIO::trailingslashit(DUP_Archive::getOriginalPaths('home')); ?>">
|
||||
[<?php esc_html_e('root path', 'duplicator') ?>]
|
||||
</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/'; ?>">
|
||||
[<?php esc_html_e('cache', 'duplicator') ?>]
|
||||
</a>
|
||||
<a href="#" id="clear-path-filters">(<?php esc_html_e('clear', 'duplicator') ?>)</a>
|
||||
</div>
|
||||
</div>
|
||||
<textarea
|
||||
id="filter-paths"
|
||||
name="filter-paths"
|
||||
placeholder="/full_path/dir/; /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 esc_attr_e('File Extensions', 'duplicator'); ?>"
|
||||
data-tooltip="<?php echo esc_attr($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">[<?php esc_html_e('media', 'duplicator') ?>]</a>
|
||||
<a href="#" data-filter-exts="zip;rar;tar;gz;bz2;7z">[<?php esc_html_e('Backup', 'duplicator') ?>]</a>
|
||||
<a href="#" id="clear-extension-filters">(<?php esc_html_e('clear', 'duplicator') ?>)</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 Backup. 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 Backup 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="' . LinkManager::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>
|
||||
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Duplicator
|
||||
* @copyright (c) 2022, Snap Creek LLC
|
||||
*/
|
||||
|
||||
use Duplicator\Utils\Help\Article;
|
||||
|
||||
defined("ABSPATH") or die("");
|
||||
|
||||
/**
|
||||
* Variables
|
||||
*
|
||||
* @var \Duplicator\Core\Controllers\ControllersManager $ctrlMng
|
||||
* @var \Duplicator\Core\Views\TplMng $tplMng
|
||||
* @var array<string, mixed> $tplData
|
||||
*/
|
||||
|
||||
/** @var Article[] $articles p*/
|
||||
$articles = $tplData['articles'];
|
||||
$listClass = isset($tplData['list_class']) ? 'class="' . $tplData['list_class'] . '"' : '';
|
||||
?>
|
||||
<?php if (count($articles) > 0) : ?>
|
||||
<ul <?php echo $listClass; ?>>
|
||||
<?php foreach ($articles as $article) : ?>
|
||||
<li class="duplicator-help-article" data-id="<?php echo (int) $article->getId(); ?>">
|
||||
<i aria-hidden="true" class="fa fa-file-alt"></i>
|
||||
<a href="<?php echo esc_url($article->getLink()); ?>" target="_blank"><?php echo esc_html($article->getTitle()); ?></a>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
<?php endif; ?>
|
||||
@@ -0,0 +1,61 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Duplicator
|
||||
* @copyright (c) 2022, Snap Creek LLC
|
||||
*/
|
||||
|
||||
use Duplicator\Utils\Help\Category;
|
||||
use Duplicator\Utils\Help\Help;
|
||||
|
||||
defined("ABSPATH") or die("");
|
||||
|
||||
/**
|
||||
* Variables
|
||||
*
|
||||
* @var \Duplicator\Core\Controllers\ControllersManager $ctrlMng
|
||||
* @var \Duplicator\Core\Views\TplMng $tplMng
|
||||
* @var array<string, mixed> $tplData
|
||||
*/
|
||||
|
||||
/** @var Category[] $categories */
|
||||
$categories = $tplData['categories'];
|
||||
if (empty($categories)) : ?>
|
||||
<p>
|
||||
<?php
|
||||
printf(
|
||||
esc_html_x(
|
||||
'Could not fetch help information. Please try again later or visit the %1$sonline docs%2$s.',
|
||||
'%1$s and %2$s are the opening and closing tags for the link to the online docs.',
|
||||
'duplicator-pro'
|
||||
),
|
||||
'<a href="' . esc_url(DUPLICATOR_BLOG_URL . 'knowledge-base') . '" target="_blank">',
|
||||
'</a>'
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
<?php else : ?>
|
||||
<ul class="duplicator-help-category-list">
|
||||
<?php foreach ($categories as $category) : ?>
|
||||
<li class="duplicator-help-category">
|
||||
<header>
|
||||
<i class="fa fa-folder-open"></i>
|
||||
<span><?php echo esc_html($category->getName()); ?></span>
|
||||
<i class="fa fa-angle-right"></i>
|
||||
</header>
|
||||
<?php if (count($category->getChildren()) > 0) { ?>
|
||||
<?php $tplMng->render('parts/help/category-list', ['categories' => $category->getChildren()]);
|
||||
} ?>
|
||||
<?php if ($category->getArticleCount() > 0) : ?>
|
||||
<?php $tplMng->render(
|
||||
'parts/help/article-list',
|
||||
[
|
||||
'articles' => Help::getInstance()->getArticlesByCategory($category->getId()),
|
||||
'list_class' => 'duplicator-help-article-list',
|
||||
]
|
||||
); ?>
|
||||
<?php endif; ?>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
247
html/wp-content/plugins/duplicator/template/parts/help/main.php
Normal file
247
html/wp-content/plugins/duplicator/template/parts/help/main.php
Normal file
@@ -0,0 +1,247 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Duplicator
|
||||
* @copyright (c) 2022, Snap Creek LLC
|
||||
*/
|
||||
|
||||
use Duplicator\Utils\Help\Help;
|
||||
use Duplicator\Utils\LinkManager;
|
||||
|
||||
defined("ABSPATH") or die("");
|
||||
|
||||
/**
|
||||
* Variables
|
||||
*
|
||||
* @var \Duplicator\Core\Controllers\ControllersManager $ctrlMng
|
||||
* @var \Duplicator\Core\Views\TplMng $tplMng
|
||||
* @var array<string, mixed> $tplData
|
||||
*/
|
||||
?>
|
||||
<style>
|
||||
/* Dynamic Help Style */
|
||||
#duplicator-help-wrapper {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
background-color: #fff;
|
||||
overflow-y: auto;
|
||||
box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.1);
|
||||
-webkit-font-smoothing: antialiased !important;
|
||||
-moz-osx-font-smoothing: grayscale !important;
|
||||
}
|
||||
|
||||
#duplicator-help-header {
|
||||
position: fixed;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
width: 90%;
|
||||
top: 30px;
|
||||
left: 5%;
|
||||
}
|
||||
|
||||
#duplicator-help-content {
|
||||
width: 700px;
|
||||
margin: 150px auto 50px;
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 700px) {
|
||||
#duplicator-help-content {
|
||||
width: 90%;
|
||||
}
|
||||
}
|
||||
|
||||
#duplicator-help-search {
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
|
||||
#duplicator-help-search-results-empty {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#duplicator-help-search-results,
|
||||
#duplicator-help-search-results-empty {
|
||||
margin-top: 50px;
|
||||
}
|
||||
|
||||
#duplicator-help-search input {
|
||||
border: 1px solid #999999;
|
||||
border-radius: 25px;
|
||||
color: #444444;
|
||||
font-size: 20px;
|
||||
letter-spacing: 0;
|
||||
line-height: 20px;
|
||||
min-height: 48px;
|
||||
padding: 10px 10px 10px 25px;
|
||||
text-align: left;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.duplicator-help-category {
|
||||
border-top: 1px solid #dddddd;
|
||||
margin: 0;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
|
||||
#duplicator-help-categories > ul > li ul {
|
||||
display: none;
|
||||
margin-left: 30px;
|
||||
}
|
||||
|
||||
#duplicator-help-categories > ul > li .duplicator-help-category:last-of-type {
|
||||
border-bottom: 0;
|
||||
}
|
||||
|
||||
.duplicator-help-category:last-of-type {
|
||||
border-bottom: 1px solid #dddddd;
|
||||
}
|
||||
|
||||
.duplicator-help-category header {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
cursor: pointer;
|
||||
padding: 20px 0;
|
||||
}
|
||||
|
||||
.duplicator-help-category header span {
|
||||
color: #444444;
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.duplicator-help-category header .fa-folder-open {
|
||||
color: #999999;
|
||||
font-size: 21px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.duplicator-help-category header .fa-angle-right {
|
||||
color: #cccccc;
|
||||
font-size: 24px;
|
||||
margin-left: auto;
|
||||
transition-property: transform;
|
||||
transition-duration: 0.25s;
|
||||
transition-timing-function: ease-out;
|
||||
}
|
||||
|
||||
.duplicator-help-article-list {
|
||||
display: none;
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.duplicator-help-article {
|
||||
margin: 0;
|
||||
padding: 0 0 14px 4px;
|
||||
}
|
||||
|
||||
.duplicator-help-article .fa-file-alt {
|
||||
color: #b6b6b6;
|
||||
font-size: 16px;
|
||||
margin: 0 14px 0 0;
|
||||
}
|
||||
|
||||
.duplicator-help-article a {
|
||||
border-bottom: 1px solid transparent;
|
||||
color: #666;
|
||||
font-size: 15px;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
#duplicator-help-footer {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
margin-top: 50px;
|
||||
}
|
||||
|
||||
.duplicator-help-footer-block {
|
||||
border: 1px solid #ddd;
|
||||
border-radius: 6px;
|
||||
box-sizing: border-box;
|
||||
max-width: 340px;
|
||||
padding: 25px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.duplicator-help-footer-block i {
|
||||
color: #999;
|
||||
font-size: 48px;
|
||||
margin: 0 0 20px 0;
|
||||
}
|
||||
|
||||
.duplicator-help-footer-block h3 {
|
||||
color: #444;
|
||||
font-size: 16px;
|
||||
margin: 0 0 10px 0;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.duplicator-help-footer-block p {
|
||||
color: #777777;
|
||||
font-size: 14px;
|
||||
margin: 0 0 20px 0;
|
||||
}
|
||||
|
||||
.duplicator-help-footer-block .button {
|
||||
border: 1px solid #af9ca6 !important;
|
||||
color: #4f394d !important;
|
||||
background: transparent !important;
|
||||
font-size: 15px !important;
|
||||
}
|
||||
</style>
|
||||
<div id="duplicator-help-wrapper">
|
||||
<div id="duplicator-help-header">
|
||||
<img src="<?php echo DUPLICATOR_PLUGIN_URL . 'assets/img/duplicator-header-logo.svg'; ?>" />
|
||||
</div>
|
||||
<div id="duplicator-help-content">
|
||||
<div id="duplicator-help-search">
|
||||
<input type="text" placeholder="<?php esc_attr_e("Search", "duplicator"); ?>" />
|
||||
<ul id="duplicator-help-search-results"></ul>
|
||||
<div id="duplicator-help-search-results-empty"><?php esc_html_e("No results found", "duplicator"); ?></div>
|
||||
</div>
|
||||
<div id="duplicator-context-articles">
|
||||
<?php if (count(Help::getInstance()->getArticlesByTag($tplData['tag'])) > 0) : ?>
|
||||
<h2><?php esc_html_e("Related Articles", "duplicator"); ?></h2>
|
||||
<?php $tplMng->render('parts/help/article-list', ['articles' => Help::getInstance()->getArticlesByTag($tplData['tag'])]); ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<div id="duplicator-help-categories">
|
||||
<?php $tplMng->render('parts/help/category-list', ['categories' => Help::getInstance()->getTopLevelCategories()]); ?>
|
||||
</div>
|
||||
<div id="duplicator-help-footer">
|
||||
<div class="duplicator-help-footer-block">
|
||||
<i aria-hidden="true" class="fa fa-file-alt"></i>
|
||||
<h3><?php esc_html_e("View Documentation", "duplicator"); ?></h3>
|
||||
<p>
|
||||
<?php esc_html_e("Browse documentation, reference material, and tutorials for Duplicator.", "duplicator"); ?>
|
||||
</p>
|
||||
<a
|
||||
href="<?php echo LinkManager::getDocUrl('', 'help-modal-footer', 'View All Docs'); ?>"
|
||||
rel="noopener noreferrer"
|
||||
target="_blank"
|
||||
class="button">
|
||||
<?php esc_html_e("View All Documentation", "duplicator"); ?>
|
||||
</a>
|
||||
</div>
|
||||
<div class="duplicator-help-footer-block">
|
||||
<i aria-hidden="true" class="fa fa-life-ring"></i>
|
||||
<h3><?php esc_html_e("Get Support", "duplicator"); ?></h3>
|
||||
<p><?php esc_html_e("Upgrade to Duplicator Pro to access our world class customer support.", "duplicator"); ?></p>
|
||||
<a
|
||||
href="<?php echo LinkManager::getCampaignUrl('help-modal-footer', 'Get Support'); ?>"
|
||||
rel="noopener noreferrer"
|
||||
target="_blank"
|
||||
class="button">
|
||||
<?php esc_html_e("Upgrade to Duplicator Pro", "duplicator"); ?>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,67 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* NoticeBar Education template for Lite.
|
||||
*
|
||||
* @package Duplicator
|
||||
*/
|
||||
|
||||
use Duplicator\Utils\LinkManager;
|
||||
|
||||
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(LinkManager::getCampaignUrl('lite-upgrade-bar', $tplData['utm_content']))
|
||||
);
|
||||
?>
|
||||
<a href="<?php echo esc_url(LinkManager::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>
|
||||
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Duplicator
|
||||
*/
|
||||
|
||||
use Duplicator\Utils\LinkManager;
|
||||
|
||||
defined("ABSPATH") or die("");
|
||||
|
||||
/**
|
||||
* Variables
|
||||
*
|
||||
* @var Duplicator\Core\Controllers\ControllersManager $ctrlMng
|
||||
* @var Duplicator\Core\Views\TplMng $tplMng
|
||||
* @var array<string, mixed> $tplData
|
||||
*/
|
||||
|
||||
|
||||
$upgradeUrl = LinkManager::getCampaignUrl('lite-multisite-notice', 'Upgrade now!')
|
||||
?>
|
||||
<span class='dashicons dashicons-warning'></span>
|
||||
<div class="dup-sub-content">
|
||||
<h3 class="margin-bottom-0 margin-top-0">
|
||||
<?php esc_html_e('Duplicator Lite does not officially support WordPress multisite functionality', 'duplicator-pro');?>
|
||||
</h3>
|
||||
<p>
|
||||
<?php
|
||||
echo esc_html_x(
|
||||
'By upgrading to the Elite or Pro plans you will unlock the ability to create backups and do advanced migrations on multi-site installations!',
|
||||
'1: name of pro plan, 2: name of elite plan',
|
||||
'duplicator-pro'
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
<a class="button primary small target="_blank" href="<?php echo esc_url($upgradeUrl); ?>"><?php esc_html_e('Upgrade Now!', 'duplicator-pro'); ?></a>
|
||||
</div>
|
||||
@@ -0,0 +1,82 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* NoticeBar Education template for Lite.
|
||||
*
|
||||
* @package Duplicator
|
||||
*/
|
||||
|
||||
use Duplicator\Controllers\AboutUsController;
|
||||
use Duplicator\Core\Controllers\ControllersManager;
|
||||
use Duplicator\Utils\LinkManager;
|
||||
|
||||
defined("ABSPATH") || exit;
|
||||
|
||||
/**
|
||||
* Variables
|
||||
*
|
||||
* @var \Duplicator\Core\Views\TplMng $tplMng
|
||||
* @var array<string, mixed> $tplData
|
||||
*/
|
||||
|
||||
$facebookIcon = '<svg width="16" height="16" aria-hidden="true"><path fill="#A7AAAD" d="M16 8.05A8.02 8.02 0 0 0 8 0C3.58 0 0 3.6 0 8.05A8 8 0 0 0 6.74 16v-5.61H4.71V8.05h2.03V6.3c0-2.02 1.2-3.15 3-3.15.9 0 1.8.16 1.8.16v1.98h-1c-1 0-1.31.62-1.31 1.27v1.49h2.22l-.35 2.34H9.23V16A8.02 8.02 0 0 0 16 8.05Z"/></svg>'; // phpcs:disable Generic.Files.LineLength.TooLong
|
||||
$xIcon = '<svg width="16" height="16" aria-hidden="true" viewBox="0 0 512 512"><path fill="#A7AAAD" d="M389.2 48h70.6L305.6 224.2 487 464H345L233.7 318.6 106.5 464H35.8L200.7 275.5 26.8 48H172.4L272.9 180.9 389.2 48zM364.4 421.8h39.1L151.1 88h-42L364.4 421.8z"/></svg>'; // phpcs:disable Generic.Files.LineLength.TooLong
|
||||
$youtubeIcon = '<svg width="17" height="16" aria-hidden="true"><path fill="#A7AAAD" d="M16.63 3.9a2.12 2.12 0 0 0-1.5-1.52C13.8 2 8.53 2 8.53 2s-5.32 0-6.66.38c-.71.18-1.3.78-1.49 1.53C0 5.2 0 8.03 0 8.03s0 2.78.37 4.13c.19.75.78 1.3 1.5 1.5C3.2 14 8.51 14 8.51 14s5.28 0 6.62-.34c.71-.2 1.3-.75 1.49-1.5.37-1.35.37-4.13.37-4.13s0-2.81-.37-4.12Zm-9.85 6.66V5.5l4.4 2.53-4.4 2.53Z"/></svg>'; // phpcs:disable Generic.Files.LineLength.TooLong
|
||||
$links = [
|
||||
[
|
||||
'url' => 'https://wordpress.org/support/plugin/duplicator/',
|
||||
'text' => __('Support', 'duplicator'),
|
||||
],
|
||||
[
|
||||
'url' => LinkManager::getDocUrl('', 'plugin-lite-footer'),
|
||||
'text' => __('Docs', 'duplicator')
|
||||
],
|
||||
[
|
||||
'url' => 'https://duplicator.com/migration-services/',
|
||||
'text' => __('Migration Services', 'duplicator')
|
||||
],
|
||||
[
|
||||
'url' => ControllersManager::getMenuLink(ControllersManager::ABOUT_US_SUBMENU_SLUG, AboutUsController::ABOUT_US_TAB),
|
||||
'text' => __('Free Plugins', 'duplicator'),
|
||||
],
|
||||
];
|
||||
$count = count($links);
|
||||
|
||||
?>
|
||||
<div class="duplicator-footer-promotion">
|
||||
<p>
|
||||
<?php esc_html_e('Made with ♥ by the Duplicator Team', 'duplicator'); ?>
|
||||
</p>
|
||||
<ul class="duplicator-footer-promotion-links">
|
||||
<?php foreach ($links as $i => $item) : ?>
|
||||
<li>
|
||||
<a href="<?php echo esc_url($item['url']); ?>" target="_blank" rel="noopener noreferrer">
|
||||
<?php echo esc_html($item['text']); ?>
|
||||
</a>
|
||||
<?php if ($i < $count - 1) : ?>
|
||||
<span>/</span>
|
||||
<?php endif; ?>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
<ul class="duplicator-footer-promotion-social">
|
||||
<li>
|
||||
<a href="https://www.facebook.com/snapcreek/" target="_blank" rel="noopener noreferrer">
|
||||
<?php echo $facebookIcon; ?>
|
||||
<span class="screen-reader-text"><?php echo esc_html('Facebook'); ?></span>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://x.com/duplicatorwp" target="_blank" rel="noopener noreferrer">
|
||||
<?php echo $xIcon; ?>
|
||||
<span class="screen-reader-text"><?php echo esc_html('X'); ?></span>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://www.youtube.com/c/Snapcreek" target="_blank" rel="noopener noreferrer">
|
||||
<?php echo $youtubeIcon; ?>
|
||||
<span class="screen-reader-text"><?php echo esc_html('YouTube'); ?></span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -0,0 +1,82 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Duplicator messages sections
|
||||
*
|
||||
* @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
|
||||
*/
|
||||
$serverSettings = $tplData['serverSettings'];
|
||||
?>
|
||||
<table class="widefat" cellspacing="0">
|
||||
<?php foreach ($serverSettings as $section) : ?>
|
||||
<tr>
|
||||
<td class="dup-settings-diag-header" colspan="2"><?php echo esc_html($section['title']); ?></td>
|
||||
</tr>
|
||||
<?php foreach ($section['settings'] as $setting) : ?>
|
||||
<tr>
|
||||
<td>
|
||||
<?php if (!empty($setting['labelLink'])) : ?>
|
||||
<a href="<?php echo esc_url($setting['labelLink']); ?>" target="_blank">
|
||||
<?php echo esc_html($setting['label']); ?>
|
||||
</a>
|
||||
<?php else : ?>
|
||||
<?php echo esc_html($setting['label']); ?>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td>
|
||||
<?php echo esc_html($setting['value']); ?>
|
||||
<?php if (!empty($setting['valueNote'])) : ?>
|
||||
<small>
|
||||
<i>
|
||||
<?php echo wp_kses(
|
||||
$setting['valueNote'],
|
||||
[
|
||||
'a' => [
|
||||
'href' => [],
|
||||
'target' => [],
|
||||
],
|
||||
]
|
||||
); ?>
|
||||
</i>
|
||||
</small>
|
||||
<?php endif; ?>
|
||||
<?php if (!empty($setting['valueNoteBottom'])) : ?>
|
||||
<p>
|
||||
<small>
|
||||
<i>
|
||||
<?php echo wp_kses(
|
||||
$setting['valueNoteBottom'],
|
||||
[
|
||||
'a' => [
|
||||
'href' => [],
|
||||
'target' => [],
|
||||
],
|
||||
]
|
||||
); ?>
|
||||
</i>
|
||||
</small>
|
||||
</p>
|
||||
<?php endif; ?>
|
||||
<?php if (!empty($setting['valueTooltip'])) : ?>
|
||||
<i
|
||||
class="fa fa-question-circle data-size-help"
|
||||
data-tooltip-title="<?php echo __('Info', 'duplicator'); ?>"
|
||||
data-tooltip="<?php echo esc_attr($setting['valueTooltip']); ?>">
|
||||
</i>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
<?php endforeach; ?>
|
||||
</table>
|
||||
Reference in New Issue
Block a user