Warning: This method has been deprecated.
LLMS_AJAX::get_sections_alt()
Return custom array of sections for use on the engagement page
Description Description
Return Return
(array)
Source Source
File: includes/class.llms.ajax.php
public function get_sections_alt() { llms_deprecated_function( 'LLMS_AJAX::get_sections_alt()', '3.13.0' ); $args = array( 'post_type' => 'section', 'nopaging' => true, 'post_status' => 'publish', ); $sections = get_posts( $args ); $options = array(); if ( ! empty( $sections ) ) { foreach ( $sections 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[] = array( 'ID' => $value->ID, 'post_title' => $title, ); } } echo json_encode( $options ); wp_die(); }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
3.13.0 | This method has been deprecated. |
1.3.0 | Introduced. |
User Contributed Notes User Contributed Notes
Permalink: