dozent_get_course_benefits_arr( int $course_id )

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


Description

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

Example usage:

dozent_get_course_benefits_arr();
dozent_get_course_benefits_arr( $course_id );

Parameters

$course_id

(int) (Required) Course ID


Return

(mixed|void)


Source

File: includes/core-functions.php

	function dozent_get_course_benefits_arr( $course_id = 0 ) {

		$benefits = dozent_get_course_benefits( $course_id );

		$benefits_array = array();
		if ( $benefits ) {
			$benefits_array = explode( "\n", $benefits );
		}

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


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

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


Changelog

Changelog
Version Description
DozentLMS 1.0.0 Introduced.