| 1 |
<?php |
| 2 |
if (!defined('WPO_VERSION')) die('No direct access allowed'); |
| 3 |
|
| 4 |
?> |
| 5 |
<div class="wpo_shade hidden"> |
| 6 |
<div class="wpo_shade_inner"> |
| 7 |
<span class="dashicons dashicons-update-alt wpo-rotate"></span> |
| 8 |
<h4><?php esc_html_e('Loading data...', 'wp-optimize'); ?></h4> |
| 9 |
</div> |
| 10 |
</div> |
| 11 |
|
| 12 |
<div class="wpo_section wpo_group"> |
| 13 |
|
| 14 |
<?php |
| 15 |
if (!empty($optimization_results)) { |
| 16 |
echo '<div id="message" class="updated below-h2"><strong>'; |
| 17 |
foreach ($optimization_results as $optimization_result) { |
| 18 |
if (!empty($optimization_result->output)) { |
| 19 |
foreach ($optimization_result->output as $line) { |
| 20 |
echo $line."<br>"; |
| 21 |
} |
| 22 |
} |
| 23 |
} |
| 24 |
echo '</strong></div>'; |
| 25 |
} |
| 26 |
?> |
| 27 |
|
| 28 |
<?php WP_Optimize()->include_template('database/status-box-contents.php', false, array('optimize_db' => false)); ?> |
| 29 |
<?php |
| 30 |
$message = __('Warning: This operation is permanent.', 'wp-optimize'); |
| 31 |
$message .= ' '; |
| 32 |
$message .= __('Continue?', 'wp-optimize'); |
| 33 |
?> |
| 34 |
<form onsubmit="return confirm('<?php echo esc_js($message); ?>')" action="#" method="post" enctype="multipart/form-data" name="optimize_form" id="optimize_form"> |
| 35 |
|
| 36 |
<?php wp_nonce_field('wpo_optimization'); ?> |
| 37 |
|
| 38 |
<h3><?php esc_html_e('Optimizations', 'wp-optimize'); ?></h3> |
| 39 |
|
| 40 |
|
| 41 |
<div class="wpo-run-optimizations__container"> |
| 42 |
<?php $button_caption = apply_filters('wpo_run_button_caption', __('Run all selected optimizations', 'wp-optimize')); ?> |
| 43 |
<input class="button button-primary button-large" type="submit" id="wp-optimize" name="wp-optimize" value="<?php echo esc_attr($button_caption); ?>"><?php WP_Optimize()->include_template('take-a-backup.php', false, array('checkbox_name' => 'enable-auto-backup')); ?> |
| 44 |
</div> |
| 45 |
|
| 46 |
<?php do_action('wpo_additional_options'); ?> |
| 47 |
|
| 48 |
<?php |
| 49 |
if ($load_data) { |
| 50 |
WP_Optimize()->include_template('database/optimizations-table.php', false, array('does_server_allows_table_optimization' => $does_server_allows_table_optimization)); |
| 51 |
} else { |
| 52 |
?> |
| 53 |
<div class="wp-optimize-optimizations-table-placeholder"> |
| 54 |
</div> |
| 55 |
<?php } ?> |
| 56 |
|
| 57 |
<p class="wp-optimize-sensitive-tables-warning"> |
| 58 |
<span style="color: #E07575;"> |
| 59 |
<span class="dashicons dashicons-warning"></span> |
| 60 |
<?php esc_html_e('Warning:', 'wp-optimize'); ?> |
| 61 |
</span> |
| 62 |
<?php |
| 63 |
$message = __('Items marked with this icon perform more intensive database operations.', 'wp-optimize'); |
| 64 |
$message .= ' '; |
| 65 |
$message .= __('In very rare cases, if your database server happened to crash or be forcibly powered down at the same time as an optimization operation was running, data might be corrupted.', 'wp-optimize'); |
| 66 |
$message .= ' '; |
| 67 |
$message .= __('You may wish to run a backup before optimizing.', 'wp-optimize'); |
| 68 |
echo esc_html($message); |
| 69 |
?> |
| 70 |
</p> |
| 71 |
</form> |
| 72 |
</div> |
| 73 |
|