mirror of
https://github.com/Alamantus/Lexiconga.git
synced 2025-04-27 22:03:34 +02:00
Use cookie to check if anouncement should be sent at all
This commit is contained in:
parent
be67f965eb
commit
7ec29d1fbc
1 changed files with 1 additions and 0 deletions
|
@ -96,6 +96,7 @@ switch ($view) {
|
|||
foreach ($announcements as $announcement) {
|
||||
$expire = strtotime($announcement['expire']);
|
||||
if (time() < $expire) {
|
||||
if (isset($_COOKIE['announcement-' . ($announcement['dismissId'] ?? '')])) continue;
|
||||
$announcements_html .= '<article class="announcement"' . (isset($announcement['dismissId']) ? ' id="announcement-' . $announcement['dismissId'] . '"' : '') . ' data-expires="' . $announcement['expire'] . '">
|
||||
<a class="close-button" title="Dismiss Announcement">×︎</a>
|
||||
<h4>' . $announcement['header'] . '</h4>
|
||||
|
|
Loading…
Add table
Reference in a new issue