get_section_data( $sections )

Returns post array of data for sections associated with a course


Parameters Parameters

(array) (Required)


Top ↑

Return Return

(array)


Top ↑

Source Source

File: includes/llms.template.functions.php

			}

			$GLOBALS['course'] = new LLMS_Course( $post );

			return $GLOBALS['course'];

		}
	}
}
add_action( 'the_post', 'llms_setup_course_data' );

/**
 * When the_post is called, put lesson data into a global.
 *
 * @param mixed $post
 * @return LLMS_Course
 */
function llms_setup_lesson_data( $post ) {
	if ( ! is_admin() ) {

		if ( 'lesson' == $post->post_type ) {
			unset( $GLOBALS['lesson'] );

			if ( is_int( $post ) ) {
				$post = get_post( $post ); }

			if ( empty( $post->post_type ) ) {
				return; }

Top ↑

User Contributed Notes User Contributed Notes

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