learndash-quiz-statistics-result

apply_filters( 'learndash-quiz-statistics-result',  string $question_result,  array $question_item )

Filters quiz result column output.


Description #

Allow filter of the new ‘Result’ column output. This is pretty free-form and was not used before 2.4.0.


Parameters #

$question_result

(string) Quiz result column output.

$question_item

(array) An array of quiz question data.


Source #

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


Examples #

 <?php
/**
 * Example usage for learndash-quiz-statistics-result filter.
 */
add_filter(
	'learndash-quiz-statistics-result',
	function( $question_result, $question_item ) {
		// May add any custom logic using $question_result, $question_item.

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

Changelog #

Changelog
Version Description
2.4.0 Introduced.