feat: view_previews debloque les avant-premieres sur accueil et article

This commit is contained in:
Cedric Abonnel
2026-05-12 23:06:00 +02:00
parent c83b27624c
commit 98ec65f800
8 changed files with 384 additions and 11 deletions
+1 -1
View File
@@ -17,7 +17,7 @@ ob_start();
$isAvantPremiere = $post['published'] && strtotime((string)($post['published_at'] ?? '')) > time();
$postCat = trim($post['category'] ?? '');
$isPrivate = $postCat !== '' && in_array($postCat, $privateCats ?? [], true);
$isLocked = $isAvantPremiere;
$isLocked = $isAvantPremiere && !hasCapability('view_previews');
?>
<article class="card">
<?php if ($isDraft): ?>