apply_filters( 'learndash_ques_free_answer_pts', float $points, array $question_data, string $user_response )
Filters answer points for a free question type.
Description #
Parameters #
- $points
-
(float) Points for the question.
- $question_data
-
(array) An array of question data.
- $user_response
-
(string) User response data.
Source #
Examples #
Note: Extended code example below not guaranteed, you may need to consult with a developer
<?php
/**
* Example usage for learndash_ques_free_answer_pts filter.
*/
add_filter(
'learndash_ques_free_answer_pts',
function( $points, $question_data, $user_response ) {
// May add any custom logic using $points, $question_data, $user_response.
// Always return $points.
return $points;
},
10,
3
);
Changelog #
| Version | Description |
|---|---|
| 4.14.0 | Introduced. $points type changed from int to float. |