<?php

/**
 * Status tab – Plugin updates.
 *
 * @package northmill-online-shared
 *
 * @phpcs:disable WordPress.PHP.DevelopmentFunctions.error_log_print_r
 */
declare (strict_types=1);
namespace Northmill_Online_Shared_Sync;

\defined('ABSPATH') || exit;
/**
 * View parameters.
 *
 * @var array $params
 */
?>
<h2><?php 
\esc_html_e('Plugin update transients', 'northmill-online-shared');
?></h2>
<table class="nmf-sync-table">
	<thead>
	<tr>
		<th><?php 
\esc_html_e('Transient', 'northmill-online-shared');
?></th>
		<th><?php 
\esc_html_e('Remove transient', 'northmill-online-shared');
?></th>
	</tr>
	</thead>
	<tbody>
	<?php 
foreach ($params['transients'] as $transient_key => $transient_name) {
    echo '<tr>';
    echo '<td>' . \esc_html($transient_key) . '</td>';
    echo '<td><a href="#" class="nmf-plugin-update-transient-remove" data-transient-name="' . \esc_attr($transient_key) . '">' . \esc_html__('Remove', 'northmill-online-shared') . '</a></td>';
    echo '</tr>';
}
?>
	</tbody>
</table>
<h2><?php 
\esc_html_e('Transient values', 'northmill-online-shared');
?></h2>
<?php 
foreach ($params['transient_values'] as $transient_key => $transient_value) {
    if (\false === $transient_value) {
        $transient_value = \esc_html__('No value', 'northmill-online-shared');
    }
    echo '<h4>' . \esc_html($transient_key) . '</h4>';
    echo '<pre>';
    \print_r($transient_value);
    echo '</pre>';
}
