dozent_get_course_contents_by_section( $section_ID )

get lectures by section ID


Parameters

$section_ID

(Required)


Return

(WP_Query)


Source

File: includes/core-functions.php

	function dozent_get_course_contents_by_section( $section_ID = 0 ) {
		$section_ID = dozent_get_post_id( $section_ID );

		$content_post_types = apply_filters( 'dozent_course_contents_post_types', [ 'dozent_lecture', 'dozent_quiz', 'dozent_assignment' ] );

		$args  = [
			'post_type'      => $content_post_types,
			'post_parent'    => $section_ID,
			'posts_per_page' => - 1,
			'orderby'        => 'menu_order',
			'order'          => 'ASC',
		];
		$query = new \WP_Query( $args );

		return $query;
	}


Changelog

Changelog
Version Description
DozentLMS 1.0.0 Introduced.