LLMS_Post_Handler::get_lesson_options_for_select_list()
Contents
Source Source
File: includes/class.llms.post.handler.php
public static function get_lesson_options_for_select_list() { $lessons = self::get_posts( 'lesson' ); $options = array(); if ( ! empty( $lessons ) ) { foreach ( $lessons as $key => $value ) { // Get parent course if assigned. $parent_course = get_post_meta( $value->ID, '_llms_parent_course', true ); if ( $parent_course ) { $title = $value->post_title . ' ( ' . get_the_title( $parent_course ) . ' )'; } else { $title = $value->post_title . ' ( ' . __( 'unassigned', 'lifterlms' ) . ' )'; } $options[ $value->ID ] = $title; } } return $options; }
Expand full source code Collapse full source code View on GitHub