dozent_individual_review_render( null $review = null, bool $echo = true )

Generate / Render individual review HTML


Description

This function has been used in the course review loop. This function return an individual review after generate.

Example usage:

dozent_individual_review_render( $review );
dozent_individual_review_render( $review, false ); //returns the output

more description Note: $review should be an Object returned by dozent_get_course_reviews();

See also


Parameters

$review

(null) (Optional) Review Object

Default value: null

$echo

(bool) (Optional) Shoud echo this review or return

Default value: true


Return

(mixed|void)


Source

File: includes/template-functions.php

	function dozent_individual_review_render( $review = null, $echo = true ) {

		if ( empty( $review ) ) {
			return;
		}

		ob_start();
		dozent_load_template( 'loop/individual-review', compact( 'review' ) );

		/**
		 * Filter the review which generated and located <code>loop/individual-review</code> template directory
		 *
		 * @since DozentLMS 1.0.0
		 */

		$output = apply_filters( 'dozent_ratings_and_reviews', ob_get_clean(), $review );

		if ( $echo ) {
			echo $output;
		}

		return $output;
	}


Changelog

Changelog
Version Description
DozentLMS 1.0.0 Introduced.