apply_filters( 'learndash_allowed_repeats', int $repeats, int $user_id, int $quiz_id )
Filters number of quiz attempts allowed for a user.
Description #
Parameters #
- $repeats
-
(int) Number of quiz attempts allowed.
- $user_id
-
(int) User ID.
- $quiz_id
-
(int) Quiz ID.
Source #
Examples #
Note: Extended code example below not guaranteed, you may need to consult with a developer
<?php /** * Example usage for learndash_allowed_repeats filter. */ add_filter( 'learndash_allowed_repeats', function( $repeats, $user_id, $quiz_id ) { // May add any custom logic using $repeats, $user_id, $quiz_id. // Always return $repeats. return $repeats; }, 10, 3 );