learndash_quiz_question_answer_preprocess

apply_filters( 'learndash_quiz_question_answer_preprocess',  string $answer,  string $context )

Filters the value of quiz question answer before processing.


Description #


Parameters #

$answer

(string) The quiz question anser text.

$context

(string) The context of type of question.


Source #

File: includes/lib/wp-pro-quiz/wp-pro-quiz.php


Examples #

 <?php
/**
 * Example usage for learndash_quiz_question_answer_preprocess filter.
 */
add_filter(
	'learndash_quiz_question_answer_preprocess',
	function( $answer, $context ) {
		// May add any custom logic using $answer, $context.

		// Always return $answer.
		return $answer;
	},
	10,
	2
);