Warning: This method has been deprecated.

LLMS_AJAX::get_sections()

Return array of sections (id => name)


Description Description


Return Return

(array)


Top ↑

Source Source

File: includes/class.llms.ajax.php

	public function get_sections() {

		llms_deprecated_function( 'LLMS_AJAX::get_sections()', '3.13.0' );

		$args = array(
		'posts_per_page' 	=> -1,
		'post_type' 		=> 'section',
		'nopaging' 			=> true,
		'post_status'   	=> 'publish',
		'meta_query' 		=> array(
			array(
			    'key' => '_llms_parent_course',
			    'compare' => 'NOT EXISTS',
			    ),
			),
		);
		$postslist = get_posts( $args );

		if ( ! empty( $postslist ) ) {

			foreach ( $postslist as $key => $value ) {
				$value->edit_url = get_edit_post_link( $value->ID );
			}

			echo json_encode( $postslist );
		}

		die();
	}

Top ↑

Changelog Changelog

Changelog
Version Description
3.13.0 This method has been deprecated.
?? Introduced.


Top ↑

User Contributed Notes User Contributed Notes

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





Permalink: