| 1 |
<?php if (!defined('ABSPATH')) die('No direct access allowed'); |
| 2 |
|
| 3 |
?> |
| 4 |
<div class="notice notice-warning"> |
| 5 |
<p><?php esc_html_e('You can download and attach this system status information to your ticket when contacting support', 'wp-optimize'); ?></p> |
| 6 |
<p> |
| 7 |
<button id="wpo-show-status-report-btn" class="button-secondary"><?php esc_html_e('Show', 'wp-optimize'); ?></button> |
| 8 |
<button id="wpo-copy-status-report-btn" class="button-secondary"><?php esc_html_e('Copy', 'wp-optimize'); ?></button> |
| 9 |
<button id="wpo-download-status-report-btn" class="button-secondary"><?php esc_html_e('Download report', 'wp-optimize'); ?></button><div id="wpo-copy-action-result"></div> |
| 10 |
</p> |
| 11 |
<div id="report_container"></div> |
| 12 |
</div> |
| 13 |
<div id="wpo-server-info"> |
| 14 |
<?php |
| 15 |
$markdown_report = ''; |
| 16 |
foreach ($report_data as $block) : |
| 17 |
$main_title = $block['title']; |
| 18 |
$markdown_report .= "### $main_title ###\n\n"; |
| 19 |
?> |
| 20 |
<h2><?php echo esc_html($main_title); ?></h2> |
| 21 |
<table class="wp-list-table widefat fixed striped table-view-list wp-optimize_page_wpo_settings"> |
| 22 |
<?php |
| 23 |
foreach ($block['items'] as $info) : |
| 24 |
$title = wp_strip_all_tags($info['title']); |
| 25 |
$value = $info['value']; |
| 26 |
$markdown_value = isset($info['markdown_value']) ? $info['markdown_value'] : $value; |
| 27 |
?> |
| 28 |
<tr> |
| 29 |
<td><?php echo esc_html($title); ?></td> |
| 30 |
<td><?php echo $value; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Output already escaped ?></td> |
| 31 |
</tr> |
| 32 |
<?php |
| 33 |
$markdown_report .= $title . ': ' . esc_html(wp_strip_all_tags($markdown_value)) . "\n"; |
| 34 |
endforeach; |
| 35 |
$markdown_report .= "\n"; |
| 36 |
?> |
| 37 |
</table> |
| 38 |
<?php |
| 39 |
endforeach; |
| 40 |
|
| 41 |
?> |
| 42 |
<textarea name="server_info_report" id="wpo-server-info-report" cols="30" rows="10"><?php |
| 43 |
echo $markdown_report; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Output already escaped |
| 44 |
?></textarea> |
| 45 |
</div> |
| 46 |
|