learndash_get_course_id

learndash_get_course_id( WP_Post|int|null $id = null,  boolean $bypass_cb = false )

Gets the course ID for a resource.


Description #

Determine the type of ID being passed. Should be the ID of anything that belongs to a course (Lesson, Topic, Quiz, etc)


Parameters #

$id

(WP_Post|int|null) (Optional) ID of the resource.

Default value: null

$bypass_cb

(boolean) (Optional) If true will bypass course_builder logic.

Default value: false


Return #

(string) ID of the course.


Source #

File: includes/course/ld-course-functions.php


Changelog #

Changelog
Version Description
2.5.0 Added the $bypass_cb parameter.
2.1.0 Introduced.