get_section_data( $sections )
Returns post array of data for sections associated with a course
Contents
Parameters Parameters
-
(array) (Required)
Return Return
(array)
Source Source
File: includes/llms.template.functions.php
* 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; } $courseid = get_post_meta( $post->ID, '_llms_parent_course' ); if ( isset( $courseid ) ) { $parent_course = get_post( $courseid ); } $GLOBALS['lesson'] = get_lesson( $post ); llms_setup_course_data( $parent_course ); return $GLOBALS['lesson'];
Expand full source code Collapse full source code View on GitHub