dozent_get_course_target_audience( int $course_id )

Return the course target_audience which belongs with _target_audience meta with the course


Description

This function responsible to return the target_audience 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_target_audience();
dozent_get_course_target_audience( $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_target_audience( $course_id = 0 ) {

		$course_id = dozent_get_post_id( $course_id );

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

		/**
		 * Filters the course target_audience data
		 *
		 * This default filters return you course target_audience raw data.
		 *
		 * It will return the _target_audience 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_target_audience', $data, $course_id );
	}


Changelog

Changelog
Version Description
DozentLMS 1.0.0 Introduced.