Add publish_date and expiry_date support

This commit is contained in:
Ruben 2026-05-11 20:18:02 +02:00
parent a22281c896
commit 4448798bf5
6 changed files with 148 additions and 3 deletions

View file

@ -0,0 +1,21 @@
--TEST--
isVisible: returns true when metadata is null or date fields absent
--FILE--
<?php
require '/var/www/app/hooks.php';
require '/var/www/app/context.php';
require '/var/www/app/helpers.php';
// Null metadata = always visible
echo isVisible(null) ? "true\n" : "false\n";
// Empty array = always visible
echo isVisible([]) ? "true\n" : "false\n";
// Metadata without date fields = always visible
echo isVisible(['title' => 'Hello']) ? "true\n" : "false\n";
?>
--EXPECT--
true
true
true