dozent_expand_wrap( null $content = null, array $wrap_class = array(), bool $echo = true )

Wrap the content with expandable area


This function allow you to wrap any content with expandable area that can expand by clicking [+ See More] Link Very useful for the long content, that should keep simple first time.

Example usage:

dozent_expand_wrap( $content );

Note: the expand and collapse will be done via JavaScript



(null) (Optional) Main content that should be within wrap

Default value: null


(array) (Optional) Additional Wrap class

Default value: array()


(bool) (Optional) weather it will print or return

Default value: true




File: includes/template-functions.php

	function dozent_expand_wrap( $content = null, $wrap_class = [], $echo = true ) {

		$wrap_class = (array) $wrap_class;
		$wrap_class = implode( " ", array_filter( $wrap_class ) );

			= "<div class='dozent-expand-wrap {$wrap_class} '><div class='dozent-expand-inner'> {$content} </div></div>";

		 * Filter the wrap content of dozent_expand_wrap() function data
		 * @since DozentLMS 1.0.0
		 * @param  string  $content  Main content
		 * @param  string  $wrap  HTML formatted data

		$output = apply_filters( 'dozent_expand_wrap', $wrap, $content );

		if ( $echo ) {
			echo $output;

		return $output;


Version Description
DozentLMS 1.0.0 Introduced.