apply_filters( 'learndash_ques_multiple_answer_pts_whole',  int $points,  array $question_data,  int|string $answer_index,  mixed $correct_answer,  array $user_response )

Filters points awarded for a multiple answer type question.

Description #

LearnDash multiple answer question, allow points to be allocated for not marking an incorrect answer. LearnDash Core loops over all the answers in a multiple answer question. If the user does not mark an incorrect answer, allow the possibility of giving them points.

Parameters #


(int) Points awarded to quiz


(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 #

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

		// Always return $points.
		return $points;