learndash_quiz_import_post_data

apply_filters( 'learndash_quiz_import_post_data',  array $quiz_insert_data,  mixed $format_code )

Filters quiz post import data.


Description #


Parameters #

$quiz_insert_data

(array) An array of quiz data to be imported.

$format_code

(mixed) Quiz import file format code.


Source #

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


Examples #

 <?php
/**
 * Example usage for learndash_quiz_import_post_data filter.
 */
add_filter(
	'learndash_quiz_import_post_data',
	function( $quiz_insert_data, $import_type = '' ) {
		// Modify $quiz_insert_data as needed before the call to wp_insert_post();

		// Always return $quiz_insert_data;
		return $quiz_insert_data;
	},
	30,
	2
);