learndash_is_item_complete( int|WP_Post|null $post = null, int|null $user_id = null, int|null $course_id = null )
Checks if any LearnDash content type is complete.
Description #
Works on lessons or topics, single function for simpler logic in the templates.
Parameters #
- $post
-
(int|WP_Post|null) (Optional)
WP_Post
object. Default to global $post.Default value: null
- $user_id
-
(int|null) (Optional) The user to check against.
Default value: null
- $course_id
-
(int|null) (Optional) The course to check against (required for reusable content).
Default value: null
Return #
(bool) Returns true if the item is complete otherwise false.
Source #
Changelog #
Version | Description |
---|---|
3.0.0 | Introduced. |