$post): ?>
text($post['content']);
$preview = mb_strimwidth(strip_tags($html), 0, 120, '…');
$category = trim((string)($post['category'] ?? ''));
$gradient = coverGradient($category !== '' ? $category : $post['uuid'], $allCats ?? []);
$postUrl = '/post/' . rawurlencode($post['slug']);
$isDraft = !$post['published'];
$isAvantPremiere = $post['published'] && strtotime((string)($post['published_at'] ?? '')) > time();
$postCat = trim($post['category'] ?? '');
$isPrivate = $postCat !== '' && in_array($postCat, $privateCats ?? [], true);
$isLocked = $isAvantPremiere && !hasCapability('view_previews');
?>
Brouillon
Avant-première
Privé
= htmlspecialchars($category) ?>
= htmlspecialchars($preview) ?>
Disponible le = htmlspecialchars(date('d/m/Y \à H\hi', strtotime((string)($post['published_at'] ?? '')))) ?>
= htmlspecialchars(date('d/m/Y', strtotime((string)($post['published_at'] ?? $post['created_at'] ?? '')))) ?>
modifier
→ lire
isLoggedIn() || !in_array($cat, $privateCats ?? [], true),
ARRAY_FILTER_USE_KEY
);
arsort($_tagCats);
if (!empty($_tagCats)):
$_minCount = min($_tagCats);
$_maxCount = max($_tagCats);
?>