llms_is_post_restricted_by_prerequisite( int $post_id, int|null $user_id = null )
Determine if a lesson/quiz is restricted by a prerequisite lesson.
Description Description
Parameters Parameters
- $post_id
-
(Required) WP Post ID of a lesson or quiz.
- $user_id
-
(Optional) WP User ID (will use get_current_user_id() if none supplied). Default
null
.Default value: null
Return Return
(array|false) False if the post is not restricted or the user has completed the prereq associative array with prereq type and prereq id array( type => [course|course_track|lesson] id => int (object id) ).
Source Source
File: includes/functions/llms.functions.access.php
Changelog Changelog
Version | Description |
---|---|
3.16.11 | Unknown. |
3.0.0 | Introduced. |