learndash_essay_response_data_updated

do_action( 'learndash_essay_response_data_updated',  int $quiz_id,  int $question_id,  WP_Post $essay,  array $submitted_essay )

Fires after the essay response data is updated.


Description #


Parameters #

$quiz_id

(int) Quiz ID.

$question_id

(int) Question ID.

$essay

(WP_Post) WP_Post object for essay.

$submitted_essay

(array) An array of submitted essay data.


Source #

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


Examples #

 <?php
/**
 * Example usage for learndash_essay_response_data_updated action.
 */
add_action(
	'learndash_essay_response_data_updated',
	function( $quiz_id, $question_id, $essay, $submitted_essay ) {
		// May add any custom logic using $quiz_id, $question_id, $essay, $submitted_essay

		echo '<div>Custom content or markup</div>';
	},
	10,
	4
);