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_Shortcode_Course_Author::get_author_id()
Retrieve the author ID of the course
Description Description
Lessons and Quizzes cascade up
Return Return
(int|null)
Source Source
File: includes/shortcodes/class.llms.shortcode.course.author.php
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 | private function get_author_id() { $post = llms_get_post( $this ->get_attribute( 'course_id' ) ); if ( ! $post ) { return null; } if ( in_array( $post , array ( 'lesson' , 'quiz' ) ) ) { $course = llms_get_post_parent_course( $post ->get( 'id' ) ); if ( ! $course ) { return null; } } return $post ->get( 'author' ); } |
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
3.11.1 | Introduced. |