Skip to content

Commit

Permalink
Add hook to allow adding content inside answers block
Browse files Browse the repository at this point in the history
  • Loading branch information
Imran92 committed Sep 11, 2023
1 parent a4bc3cd commit 5fb42cd
Showing 1 changed file with 25 additions and 1 deletion.
26 changes: 25 additions & 1 deletion includes/template-functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -725,7 +725,31 @@ function sensei_the_question_content() {
?>

<div class="wp-block-sensei-lms-question-answers">
<?php Sensei_Question::load_question_template( $question_type ); ?>
<?php
/**
* Fires before the question answers are displayed inside the answers block.
*
* @hook sensei_quiz_question_answers_inside_before Hook used for printing content inside the question answers section before the template content.
*
* @since $$next-version$$
*
* @param int $question_id The ID of the question.
*/
do_action( 'sensei_quiz_question_answers_inside_before', $sensei_question_loop['current_question']->ID );

Sensei_Question::load_question_template( $question_type );

/**
* Fires after the question answers are displayed inside the answers block.
*
* @hook sensei_quiz_question_answers_inside_after Hook used for printing content inside the question answers section after the template content.
*
* @since $$next-version$$
*
* @param int $question_id The ID of the question.
*/
do_action( 'sensei_quiz_question_answers_inside_after', $sensei_question_loop['current_question']->ID );
?>
</div>

<?php
Expand Down

0 comments on commit 5fb42cd

Please sign in to comment.