dozent_course_target_audience( int $course_ID, bool $echo = true )
Show course target_audience on the course single page
Description
Show course target_audience in formatted way, it will return and print HTML block of course target_audience
Example usage:
dozent_course_target_audience();
dozent_course_target_audience( $course_ID );
dozent_course_target_audience( $course_ID, false );
See also
Parameters
- $course_ID
-
(int) (Required) Course ID AKA Course Post Type ID
- $echo
-
(bool) (Optional) Should directly print or not
Default value: true
Return
(mixed|void)
Source
File: includes/template-functions.php
function dozent_course_target_audience( $course_ID = 0, $echo = true ) { $course_ID = dozent_get_post_id( $course_ID ); $target_audience = dozent_get_course_target_audience_arr( $course_ID ); ob_start(); dozent_load_template( 'single/course/target_audience', compact( 'target_audience', 'course_ID' ) ); $output = apply_filters( 'dozent_course_target_audience', ob_get_clean() ); if ( $echo ) { echo $output; } return $output; }
Changelog
Version | Description |
---|---|
DozentLMS 1.0.0 | Introduced. |