apply_filters( 'learndash_is_item_complete', bool $complete, int $user_id, int $post_id, int $course_id )
Filters whether the LearnDash content type is complete or not.
Description #
Parameters #
- $complete
-
(bool) Whether any LearnDash content is complete or not.
- $user_id
-
(int) User ID.
- $post_id
-
(int) Post ID.
- $course_id
-
(int) Course ID.
Source #
Examples #
Note: Extended code example below not guaranteed, you may need to consult with a developer
<?php
/**
* Example usage for learndash_is_item_complete filter.
*/
add_filter(
'learndash_is_item_complete',
function( $complete, $user_id, $post_id, $course_id ) {
// May add any custom logic using $complete, $user_id, $post_id, $course_id.
// Always return $complete.
return $complete;
},
10,
4
);
Changelog #
| Version | Description |
|---|---|
| 3.0.0 | Introduced. |