learndash_ques_free_answer_pts

apply_filters( 'learndash_ques_free_answer_pts',  int $points,  array $question_data,  array $user_response )

Filters answer points for free question type.


Description #


Parameters #

$points

(int) Points for the question.

$question_data

(array) An array of question data.

$user_response

(array) An array of user response data.


Source #

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


Examples #

 <?php
/**
 * Example usage for learndash_ques_free_answer_pts filter.
 */
add_filter(
	'learndash_ques_free_answer_pts',
	function( $points, $question_data, $user_response ) {
		// May add any custom logic using $points, $question_data, $user_response.

		// Always return $points.
		return $points;
	},
	10,
	3
);