Compare commits

..

2 Commits

Author SHA1 Message Date
2633843395 fixing problem with do_block commentary
All checks were successful
continuous-integration/drone/push Build is passing
2024-10-07 14:38:18 +02:00
7c5a401580 fixing postDescripption ternary when unefined value 2024-10-02 09:51:50 +02:00
5 changed files with 5 additions and 5 deletions

View File

@ -12,7 +12,7 @@ $mainThematique = getMainThematique($thematique);
$thematiqueColorSlug = $mainThematique->slug;
$thematique_icon = get_field('taxonomy_pictures', 'thematiques' . '_' . $mainThematique->term_id)['icon'];
$postDescription = $attributes['postDescription'];
$postDescription = $attributes['postDescription'] ?? null;
$coverUrl = $postType->name === 'videos-webinaires' && $postThumbnail ? $postThumbnail : ($thematique_icon ? $thematique_icon['url'] : null);

View File

@ -12,7 +12,7 @@ $mainThematique = getMainThematique($thematique);
$thematiqueColorSlug = $mainThematique->slug;
$thematique_icon = get_field('taxonomy_pictures', 'thematiques' . '_' . $mainThematique->term_id)['icon'];
$postDescription = $attributes['postDescription'];
$postDescription = $attributes['postDescription'] ?? null;
$coverUrl = $postType->name === 'videos-webinaires' && $postThumbnail ? $postThumbnail : ($thematique_icon ? $thematique_icon['url'] : null);

View File

@ -1,11 +1,11 @@
<?php
$relatedPostId = $attributes['relatedPostId'] ?? null;
$relatedPost = get_post($relatedPostId);
// echo $relatedPost->post_content
?>
<section id="questions-container-<?php echo $relatedPostId ?>" class="questions-container-block">
<h2 class="questions-container-block__title"><?php echo $relatedPost->post_title ?></h2>
<!-- <?php echo $relatedPost->post_content ?> -->
<?php echo do_blocks($relatedPost->post_content) ?>
</section>

View File

@ -17,4 +17,4 @@
"devDependencies": {
"@wordpress/scripts": "^26.9.0"
}
}
}

View File

@ -1,11 +1,11 @@
<?php
$relatedPostId = $attributes['relatedPostId'] ?? null;
$relatedPost = get_post($relatedPostId);
// echo $relatedPost->post_content
?>
<section id="questions-container-<?php echo $relatedPostId ?>" class="questions-container-block">
<h2 class="questions-container-block__title"><?php echo $relatedPost->post_title ?></h2>
<!-- <?php echo $relatedPost->post_content ?> -->
<?php echo do_blocks($relatedPost->post_content) ?>
</section>