Browse: Home / Hooks /


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

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

Description #

Parameters #


(boolean) Whether to correct the answer 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_each filter.
	function( $correct_item, $question_data, $answer_index, $correct_answer, $user_response ) {
		// May add any custom logic using $correct_item, $question_data, $answer_index, $correct_answer, $user_response.

		// Always return $correct_item.
		return $correct_item;