$block) { if ($block['blockName'] == 'homegrade-content-blocks/questions-container') { array_push($chapterBlockIndex, [ 'block-type' => $block['blockName'], 'anchor' => '#questions-container-' . $block['attrs']['relatedPostId'], 'title' => get_the_title($block['attrs']['relatedPostId']), ]); } if ($block['blockName'] == 'homegrade-content-blocks/vocabulaire-summary') { array_push($chapterBlockIndex, [ 'block-type' => $block['blockName'], 'anchor' => "#vocabulaire-summary", 'title' => "Vocabulaire" . " " . get_the_terms(get_the_ID(), "thematiques")[0]->name, ]); } if ($block['blockName'] == 'homegrade-content-blocks/plus-loin') { array_push($chapterBlockIndex, [ 'block-type' => $block['blockName'], 'anchor' => "#aller-plus-loin", 'title' => __("Pour aller plus loin", "homegrade-blocks__texte-fonctionnel"), ]); } } return $chapterBlockIndex; } } ?> slug; ?>