dozent_get_course_target_audience_arr( int $course_id )

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


Description

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

Example usage:

dozent_get_course_target_audience_arr();
dozent_get_course_target_audience_arr( $course_id );

Parameters

$course_id

(int) (Required) Course ID


Return

(mixed|void)


Source

File: includes/core-functions.php

	function dozent_get_course_target_audience_arr( $course_id = 0 ) {

		$target_audience = dozent_get_course_target_audience( $course_id );

		$target_audience_array = array();
		if ( $target_audience ) {
			$target_audience_array = explode( "\n", $target_audience );
		}

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


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

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


Changelog

Changelog
Version Description
DozentLMS 1.0.0 Introduced.