learndash_get_course_id( WP_Post|int|null $id = null, boolean $bypass_cb = false )
Gets the course ID for a resource.
Description Description
Determine the type of ID being passed. Should be the ID of anything that belongs to a course (Lesson, Topic, Quiz, etc)
Parameters Parameters
- $id
-
(Optional) ID of the resource.
Default value: null
- $bypass_cb
-
(Optional) If true will bypass course_builder logic.
Default value: false
Return Return
(string) ID of the course.
Source Source
File: includes/course/ld-course-functions.php
Changelog Changelog
Version | Description |
---|---|
2.5.0 | Added the $bypass_cb parameter. |
2.1.0 | Introduced. |