dozent_get_course_benefits( int $course_id )

Return the course benefits which belongs with _benefits meta with the course


Description

This function responsible to return the benefits meta data from the post_meta table No need to pass $course_id parameters from the the course | post loop, otherwise pass course_id as parameter

Example usage:

dozent_get_course_benefits();
dozent_get_course_benefits( $course_id );

See also


Parameters

$course_id

(int) (Required) Course ID | Post ID


Return

(mixed|void)


Source

File: includes/core-functions.php

	function dozent_get_course_benefits( $course_id = 0 ) {

		$course_id = dozent_get_post_id( $course_id );

		$data = get_post_meta( $course_id, '_benefits', true );

		/**
		 * Filters the course benefits data
		 *
		 * This default filters return you course benefits raw data.
		 *
		 * It will return the _benefits meta value belongs with $course_id
		 *
		 * @since DozentLMS 1.0.0
		 *
		 * @param  string  $data  Meta Data
		 * @param  int  $course_id  Course ID
		 */

		return apply_filters( 'dozent_get_course_benefits', $data, $course_id );
	}


Changelog

Changelog
Version Description
DozentLMS 1.0.0 Introduced.