feat: view_previews debloque les avant-premieres sur accueil et article
This commit is contained in:
@@ -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): ?>
|
||||
|
||||
Reference in New Issue
Block a user