Browse: Home / Hooks /


apply_filters( 'learndash_ques_multiple_answer_correct_whole',  boolean $correct,  array $question_data,  int|string $answer_index,  mixed $correct_answer,  array $user_response )

Filters whether the answer to the multiple type question is correct or not.

Description #

Parameters #


(boolean) Whether the answer is correct or not.


(array) An array of question data.


(int|string) Index of the answer.


(mixed) Correct answer for the question.


(array) An array of user response data.

Source #

File: includes/quiz/ld-quiz-pro.php

Examples #

Note: Extended code example below not guaranteed, you may need to consult with a developer

 * Example usage for learndash_ques_multiple_answer_correct_whole filter.
	function( $correct, $question_data, $answer_index, $correct_answer, $user_response ) {
		// May add any custom logic using $correct, $question_data, $answer_index, $correct_answer, $user_response.

		// Always return $correct.
		return $correct;