dozent_get_course_requirements_arr( int $course_id )

Return course requirements as array, it will convert every line to array elements


Description

Course requirements as array, when you write requirements in the specific coruse requirements text box while creating course. Dozent LMS convert your requirements into the array

Example usage:

dozent_get_course_requirements_arr();
dozent_get_course_requirements_arr( $course_id );

Parameters

$course_id

(int) (Required) Course ID


Return

(mixed|void)


Source

File: includes/core-functions.php

	function dozent_get_course_requirements_arr( $course_id = 0 ) {

		$requirements = dozent_get_course_requirements( $course_id );

		$requirements_array = array();
		if ( $requirements ) {
			$requirements_array = explode( "\n", $requirements );
		}

		$array = array_filter( array_map( 'trim', $requirements_array ) );


		/**
		 * Filters to filter course requirements
		 *
		 * Course requirements dozent_get_course_requirements_arr() function return data as array.
		 * You can change the data using this filter
		 *
		 * @since DozentLMS 1.0.0
		 *
		 * @param array     $array   Data of requirements
		 * @param string|integer   $course_id  The course ID
		 */

		return apply_filters( 'dozent_get_course_requirements_arr', $array, $course_id );
	}


Changelog

Changelog
Version Description
DozentLMS 1.0.0 Introduced.