apply_filters( 'learndash_quiz_import_post_data', array $quiz_insert_data, mixed $format_code )
Filters quiz post import data.
Contents
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 #
Note: Extended code example below not guaranteed, you may need to consult with a developer
<?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 );