get_lesson_data( $lessons )
Returns post array of data for lessons associated with a course
Contents
Parameters Parameters
-
(array) (Required)
Return Return
(array)
Source Source
File: includes/llms.template.functions.php
* Returns post array of data for sections associated with a course
*
* @param array
* @return array
*/
function get_section_data( $sections ) {
global $post;
$html = '';
$args = array(
'post_type' => 'section',
'post_status' => 'publish',
'nopaging' => true,
);
$sections_query = get_posts( $args );
$array = array();
foreach ( $sections as $key => $value ) :
foreach ( $sections_query as $section ) :
if ( $value == $section->ID ) {
$array[ $section->ID ] = $section;
}
endforeach;
Expand full source code Collapse full source code View on GitHub