first commit

This commit is contained in:
Roman Pyrih
2026-04-21 15:48:41 +02:00
commit 7483681901
10216 changed files with 3236626 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
<?php
if (!defined('UPDRAFTPLUS_DIR')) die('No direct access allowed');
?>
<div class="expertmode">
<p>
<em><?php esc_html_e('Unless you have a problem, you can completely ignore everything here.', 'updraftplus');?></em>
</p>
<div class="advanced_settings_container">
<div class="advanced_settings_menu">
<?php
$updraftplus_admin->include_template('/wp-admin/advanced/tools-menu.php');
?>
</div>
<div class="advanced_settings_content">
<?php
if (empty($options)) $options = array();
$site_info_pass_through = array('options' => $options);
if (isset($site_info_data)) $site_info_pass_through['site_info_data'] = $site_info_data;
$updraftplus_admin->include_template('/wp-admin/advanced/site-info.php', false, $site_info_pass_through);
$updraftplus_admin->include_template('/wp-admin/advanced/lock-admin.php');
$updraftplus_admin->include_template('/wp-admin/advanced/updraftcentral.php');
$updraftplus_admin->include_template('/wp-admin/advanced/search-replace.php');
$updraftplus_admin->include_template('/wp-admin/advanced/total-size.php');
$updraftplus_admin->include_template('/wp-admin/advanced/db-size.php');
$updraftplus_admin->include_template('/wp-admin/advanced/cron-events.php');
$updraftplus_admin->include_template('/wp-admin/advanced/export-settings.php');
$updraftplus_admin->include_template('/wp-admin/advanced/wipe-settings.php');
?>
</div>
</div>
</div>

View File

@@ -0,0 +1,24 @@
<?php
if (!defined('UPDRAFTPLUS_DIR')) {
die('No direct access allowed');
}
?>
<div class="advanced_tools cron_events">
<?php
echo '<h3>'.esc_html__('Cron events', 'updraftplus').'</h3>';
echo '<p>'.esc_html(__('Here, you can view the scheduled tasks set up by the UpdraftPlus plugin.', 'updraftplus').' '.__('These cron jobs are responsible for automating various backup processes at specified intervals.', 'updraftplus').' '.__('Each schedule includes details like the hook name, the interval, and the next scheduled run time.', 'updraftplus')).'</p>';
?>
<table class="wp-list-table widefat striped">
<thead>
<tr>
<th><strong><?php esc_html_e('Hook name', 'updraftplus'); ?></strong></th>
<th><strong><?php esc_html_e('Interval', 'updraftplus'); ?></strong></th>
<th><strong><?php esc_html_e('Next run', 'updraftplus'); ?></strong></th>
</tr>
</thead>
<tbody></tbody>
</table>
</div>

View File

@@ -0,0 +1,41 @@
<?php
if (!defined('UPDRAFTPLUS_DIR')) {
die('No direct access allowed');
}
$search_placeholder = __('Search for table', 'updraftplus');
?>
<div class="advanced_tools db_size">
<p>
<strong><?php esc_html_e('Total Size', 'updraftplus'); ?>: <span class="total-size"></span></strong>
</p>
<?php
if (!class_exists('UpdraftPlus_Database_Utility')) updraft_try_include_file('includes/class-database-utility.php', 'include_once');
$install_activate_link_of_wp_optimize_plugin = UpdraftPlus_Database_Utility::get_install_activate_link_of_wp_optimize_plugin();
if (!empty($install_activate_link_of_wp_optimize_plugin)) {
echo '<p>'.esc_html__('Reducing your database size with WP-Optimize helps to maintain a fast, efficient, and user-friendly website.', 'updraftplus').' '.wp_kses_post($install_activate_link_of_wp_optimize_plugin).' <a href="https://wordpress.org/plugins/wp-optimize/" target="_blank">'.esc_html__('Go here for more information.', 'updraftplus').'</a></p>';
}
?>
<p>
<input type="text" class="db-search" placeholder="<?php echo esc_attr($search_placeholder); ?>" title="<?php echo esc_attr($search_placeholder); ?>" aria-label="<?php echo esc_attr($search_placeholder); ?>"/>
<a href="#" class="button db-search-clear"><?php esc_html_e('Clear', 'updraftplus'); ?></a>
<a href="#" class="button-primary db-size-refresh"><?php esc_html_e('Refresh', 'updraftplus'); ?></a>
</p>
<table class="wp-list-table widefat striped">
<thead>
<tr>
<th><strong><?php esc_html_e('Table name', 'updraftplus'); ?></strong></th>
<th><strong><?php esc_html_e('Records', 'updraftplus'); ?></strong></th>
<th><strong><?php esc_html_e('Data size', 'updraftplus'); ?></strong></th>
<th><strong><?php esc_html_e('Index size', 'updraftplus'); ?></strong></th>
<th><strong><?php esc_html_e('Type', 'updraftplus'); ?></strong></th>
</tr>
</thead>
<tbody class="db-size-content"></tbody>
</table>
</div>

View File

@@ -0,0 +1,23 @@
<?php
if (!defined('UPDRAFTPLUS_DIR')) die('No direct access allowed');
?>
<div class="advanced_tools export_settings">
<h3><?php esc_html_e('Export / import settings', 'updraftplus');?></h3>
<p>
<?php
echo wp_kses(sprintf(
/* translators: %s: "including any passwords" (wrapped in <strong> tags) */
__('Here, you can export your UpdraftPlus settings (%s), either for using on another site, or to keep as a backup.', 'updraftplus'),
'<strong>'.__('including any passwords', 'updraftplus').'</strong>'
), array('strong' => array())).' '.esc_html__('This tool will export what is currently in the settings tab.', 'updraftplus');
?>
</p>
<button type="button" style="clear:left;" class="button-primary" id="updraftplus-settings-export"><?php esc_html_e('Export settings', 'updraftplus');?></button>
<p>
<?php echo esc_html(__('You can also import previously-exported settings.', 'updraftplus').' '.__('This tool will replace all your saved settings.', 'updraftplus')); ?>
</p>
<button type="button" style="clear:left;" class="button-primary" id="updraftplus-settings-import"><?php esc_html_e('Import settings', 'updraftplus');?></button>
<input type="file" name="settings_file" id="import_settings">
</div>

View File

@@ -0,0 +1,30 @@
<?php
if (!defined('UPDRAFTPLUS_DIR')) die('No direct access allowed');
if (!class_exists('UpdraftPlus_Addon_LockAdmin') || (defined('UPDRAFTPLUS_NOADMINLOCK') && UPDRAFTPLUS_NOADMINLOCK)) { ?>
<div class="advanced_tools lock_admin">
<p class="updraftplus-lock-advert">
<h3><?php esc_html_e('Lock access to the UpdraftPlus settings page', 'updraftplus'); ?></h3>
<?php
if (defined('UPDRAFTPLUS_NOADMINLOCK') && UPDRAFTPLUS_NOADMINLOCK) {
esc_html_e('This functionality has been disabled by the site administrator.', 'updraftplus');
} else {
?>
<em>
<?php
/* translators: %1$s is opening <a> tag, %2$s is closing </a> tag, %3$s is the link text 'Updraftplus Premium' */
echo wp_kses_post(sprintf(__('To %1$slock access to UpdraftPlus settings%2$s with a password, upgrade to %3$s.', 'updraftplus'), '<a href="https://teamupdraft.com/updraftplus/features/lock-updraftplus-settings/?utm_source=udp-plugin&utm_medium=referral&utm_campaign=paac&utm_content=lock-settings&utm_creative_format=text" target="_blank">', '</a>', '<a href="'.esc_url($updraftplus->get_url('premium')).'" target="_blank">UpdraftPlus Premium</a>').'.');
?>
</em>
<?php
}
?>
</p>
</div>
<?php }

View File

@@ -0,0 +1,11 @@
<?php
if (!defined('UPDRAFTPLUS_DIR')) die('No direct access allowed');
?>
<?php if (!class_exists('UpdraftPlus_Addons_Migrator')) : ?>
<div class="advanced_tools search_replace">
<p class="updraftplus-search-replace-advert">
<h3><?php esc_html_e('Search / replace database', 'updraftplus'); ?></h3>
<em><?php echo wp_kses_post(sprintf(__('For direct site-to-site migration, get %s.', 'updraftplus'), '<a href="'.esc_url($updraftplus->get_url('premium')).'" target="_blank">UpdraftPlus Premium</a>')); ?></em>
</p>
</div>
<?php endif;

View File

@@ -0,0 +1,19 @@
<?php
if (!defined('UPDRAFTPLUS_DIR')) die('No direct access allowed');
?>
<div class="advanced_tools site_info">
<h3><?php esc_html_e('Site information', 'updraftplus');?></h3>
<table>
<?php
if (isset($site_info_data) && is_array($site_info_data)) {
foreach ($site_info_data as $info) {
if (isset($info['is_html']) && $info['is_html']) {
$updraftplus_admin->settings_debugrow($info['label'], $info['value']);
} else {
$updraftplus_admin->settings_debugrow($info['label'], wp_kses($info['value'], $updraftplus_admin->kses_allow_tags()));
}
}
}
?>
</table>
</div>

View File

@@ -0,0 +1,41 @@
<?php
if (!defined('UPDRAFTPLUS_DIR')) {
die('No direct access allowed');
}
?>
<div tabindex="0" class="advanced_tools_button active" id="site_info">
<span class="advanced_tools_text dashicons dashicons-info"></span>
<?php esc_html_e('Site information', 'updraftplus'); ?>
</div>
<div tabindex="0" class="advanced_tools_button" id="lock_admin">
<span class="advanced_tools_text dashicons dashicons-lock"></span>
<?php esc_html_e('Lock settings', 'updraftplus'); ?>
</div>
<div tabindex="0" class="advanced_tools_button" id="updraft_central">
<span class="advanced_tools_text dashicons dashicons-networking"></span>
UpdraftCentral
</div>
<div tabindex="0" class="advanced_tools_button" id="search_replace">
<span class="advanced_tools_text dashicons dashicons-search"></span>
<?php esc_html_e('Search / replace database', 'updraftplus'); ?>
</div>
<div tabindex="0" class="advanced_tools_button" id="total_size">
<span class="advanced_tools_text dashicons dashicons-performance"></span>
<?php esc_html_e('Site size', 'updraftplus'); ?>
</div>
<div tabindex="0" class="advanced_tools_button" id="db_size">
<span class="advanced_tools_text dashicons udp-dashicons-database-view"></span>
<?php esc_html_e('Database size', 'updraftplus'); ?>
</div>
<div tabindex="0" class="advanced_tools_button" id="cron_events">
<span class="advanced_tools_text dashicons dashicons-list-view"></span>
<?php esc_html_e('Cron events', 'updraftplus'); ?>
</div>
<div tabindex="0" class="advanced_tools_button" id="export_settings">
<span class="advanced_tools_text dashicons dashicons-media-default"></span>
<?php esc_html_e('Export / import settings', 'updraftplus'); ?>
</div>
<div tabindex="0" class="advanced_tools_button" id="wipe_settings">
<span class="advanced_tools_text dashicons dashicons-trash"></span>
<?php esc_html_e('Wipe settings', 'updraftplus'); ?>
</div>

View File

@@ -0,0 +1,23 @@
<?php
if (!defined('UPDRAFTPLUS_DIR')) die('No direct access allowed');
$backupable_entities = $updraftplus->get_backupable_file_entities(true, true);
?>
<div class="advanced_tools total_size">
<h3> <?php esc_html_e('Total (uncompressed) on-disk data:', 'updraftplus');?></h3>
<p class="uncompressed-data">
<em>
<?php esc_html_e('N.B. This count is based upon what was, or was not, excluded the last time you saved the options.', 'updraftplus');?>
</em>
</p>
<table>
<?php
foreach ($backupable_entities as $key => $info) {
$sdescrip = preg_replace('/ \(.*\)$/', '', $info['description']);
if (strlen($sdescrip) > 20 && isset($info['shortdescription'])) $sdescrip = $info['shortdescription'];
$updraftplus_admin->settings_debugrow(ucfirst($sdescrip).':', '<span id="updraft_diskspaceused_'.$key.'"><em></em></span> <a href="'.esc_url(UpdraftPlus::get_current_clean_url()).'" class="count" data-type="' . $key . '" onclick="updraftplus_diskspace_entity(\''.$key.'\'); return false;">'.__('count', 'updraftplus').'</a>');
}
?>
</table>
</div>

View File

@@ -0,0 +1,10 @@
<?php
if (!defined('UPDRAFTPLUS_DIR')) die('No direct access allowed');
global $updraftcentral_host_plugin;
if ($updraftcentral_host_plugin && 'updraftplus' !== $updraftcentral_host_plugin->get_plugin_name()) {
$updraftcentral_host_plugin->debugtools_dashboard();
} else {
do_action('updraftplus_debugtools_dashboard');
}

View File

@@ -0,0 +1,15 @@
<?php
if (!defined('UPDRAFTPLUS_DIR')) die('No direct access allowed');
?>
<div class="advanced_tools wipe_settings">
<h3><?php esc_html_e('Wipe settings', 'updraftplus');?></h3>
<p><?php echo esc_html(__('This button will delete all UpdraftPlus settings and progress information for in-progress backups (but not any of your existing backups from your cloud storage).', 'updraftplus').' '.__('You will then need to enter all your settings again.', 'updraftplus').' '.__('You can also do this before deactivating/deinstalling UpdraftPlus if you wish.', 'updraftplus'));?></p>
<form method="post" action="<?php echo esc_url(add_query_arg(array('error' => false, 'updraft_restore_success' => false, 'action' => false, 'page' => 'updraftplus'))); ?>">
<input type="hidden" name="action" value="updraft_wipesettings" />
<input type="hidden" name="nonce" value="<?php echo esc_attr(wp_create_nonce('updraftplus-wipe-setting-nonce'));?>">
<input type="submit" class="button-primary updraft_wipe_settings" value="<?php esc_attr_e('Wipe settings', 'updraftplus'); ?>" onclick="var updraftplus_wipe_settings = confirm('<?php echo esc_js(__('This will delete all your UpdraftPlus settings - are you sure you want to do this?', 'updraftplus'));?>'); if (updraftplus_wipe_settings) { updraft_settings_form_changed = false; }; return updraftplus_wipe_settings;">
</form>
<h3><?php esc_html_e('UpdraftPlus Tour', 'updraftplus');?></h3>
<p><?php esc_html_e('Press this button to take a tour of the plugin.', 'updraftplus'); ?></p>
<a href="<?php echo esc_url(UpdraftPlus_Options::admin_page_url()); ?>?page=updraftplus&updraftplus_tour=1" class="js-updraftplus-tour button button-primary"><?php esc_html_e("Reset tour", "updraftplus"); ?></a>
</div>