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


Top ↑

Return Return

(string) ID of the course.


Top ↑

Source Source

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


			

Top ↑

Changelog Changelog

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

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.