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


Top ↑

Return Return

(int|null)


Top ↑

Source Source

File: includes/shortcodes/class.llms.shortcode.course.author.php

	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' );

	}


Top ↑

Changelog Changelog

Changelog
Version Description
3.11.1 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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