feat(admin): dashboard widget shown only when there are failed queue items
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
/** @var array<int,object> $failed */
|
||||
/** @var int $count */
|
||||
/** @var string $settings_url */
|
||||
?>
|
||||
<p>Есть <b><?php echo (int)$count; ?></b> неотправленных сообщений (TG-API отвечает ошибкой):</p>
|
||||
<ul style="margin:0 0 8px 18px;list-style:disc">
|
||||
<?php foreach ($failed as $row): ?>
|
||||
<li>
|
||||
<?php echo esc_html((string)$row->created_at); ?> —
|
||||
<?php echo esc_html((string)$row->last_error); ?>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
<p><a href="<?php echo esc_url($settings_url); ?>" class="button">Открыть настройки →</a></p>
|
||||
Reference in New Issue
Block a user