dozent_course_lead_meta_items( int $course_id, bool $echo = true )

Template function to show course list meta items


Description

See also


Parameters

$course_id

(int) (Required) Course ID | Post ID

$echo

(bool) (Optional) should echo or return

Default value: true


Return

(string)


Source

File: includes/template-functions.php

	function dozent_course_lead_meta_items( $course_id = 0, $echo = true ) {
		$course_id = dozent_get_post_id( $course_id );

		/**
		 * Filter for the course lead meta items
         *
         * @param array $array Meta Items
         * @param int $course_id Course ID
         *
         * @since DozentLMS 1.0.0
		 */

		$course_lead_meta_items = apply_filters( 'dozent_course_lead_meta_items', [], $course_id );

		$output = '';

		if ( dozent_count( $course_lead_meta_items ) ) {
			foreach ( $course_lead_meta_items as $meta_item_key => $meta_item ) {
				$output .= "<div class='course-lead-meta-item meta-item-{$meta_item_key}'> {$meta_item} </div>";
			}
		}

		if ( ! $echo ) {
			return $output;
		}

		echo $output;
	}


Changelog

Changelog
Version Description
DozentLMS 1.0.0 Introduced.