Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.
LLMS_Shortcodes::get_course_id()
Retrieve the course ID from within a course, lesson, or quiz
Return Return
(int)
Source Source
File: includes/shortcodes/class.llms.shortcodes.php
*/ private static function get_course_id() { $id = get_the_ID(); if ( is_course() ) { return $id; } $course = llms_get_post_parent_course( $id ); if ( $course ) { return $course->get( 'id' ); } return 0;
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
4.0.0 | Remove reliance on deprecated class LLMS_Quiz_Legacy . |
3.16.0 | Unknown. |
2.7.9 | Introduced. |