dozent_course_content( string|array $wrap_class = '', bool $echo = true )
Course content will be print/return using the_content() function
Description
This function allow you to show the_content() of a course. It will return current course content within loop
Example usage:
dozent_course_content();
Note: You can return the output by passing parameter false to this function, it’s taking an argument of bool
See also
Parameters
- $wrap_class
-
(string|array) (Optional) Wrapper Class
Default value: ''
- $echo
-
(bool) (Optional) Weather Output HTML will be print or return
Default value: true
Return
(mixed|void)
Source
File: includes/template-functions.php
function dozent_course_content( $wrap_class = '', $echo = true ) { /** * Should append and prepend expandable wrap or not * * If return true by this filter, dozent_expand_wrap() will be implement and expandable wrap will be around of the course content * * * @since DozentLMS 1.0.0 * * @param bool */ $should_expand_wrap = apply_filters( 'dozent_course_content_expandable_wrap', true ); $content_wrap_class = ''; if ( ! $should_expand_wrap ) { $content_wrap_class = dozent_html_class( $wrap_class ); } ob_start(); dozent_load_template( 'single.course.content', compact( 'content_wrap_class' ) ); $ob_get_clean = ob_get_clean(); if ( $should_expand_wrap ) { $ob_get_clean = dozent_expand_wrap( $ob_get_clean, $wrap_class, false ); } $output = apply_filters( 'dozent.single.course.content', $ob_get_clean ); if ( $echo ) { echo $output; } return $output; }
Changelog
Version | Description |
---|---|
DozentLMS 1.0.0 | Introduced. |