lifterlms_template_student_dashboard_my_courses( bool $preview = false )

Template for My Courses section on dashboard index


Parameters Parameters

$preview

(bool) (Optional) If true, outputs a short list of courses (based on dashboard_recent_courses filter). Default false.

Default value: false


Top ↑

Return Return

(void)


Top ↑

Source Source

File: includes/functions/llms.functions.templates.dashboard.php

		if ( ! $student ) {
			return;
		}

		$enabled = LLMS_Student_Dashboard::is_endpoint_enabled( 'view-achievements' );
		if ( ! $enabled ) {
			return;
		}

		$more = false;
		if ( $preview ) {
			$more = array(
				'url'  => llms_get_endpoint_url( 'view-achievements', '', llms_get_page_url( 'myaccount' ) ),
				'text' => __( 'View All My Achievements', 'lifterlms' ),
			);
		}

		ob_start();

		lifterlms_template_achievements_loop( $student, $preview ? llms_get_achievement_loop_columns() : false );

		llms_get_template(
			'myaccount/dashboard-section.php',
			array(
				'action'  => 'my_achievements',
				'slug'    => 'llms-my-achievements',
				'title'   => $preview ? __( 'My Achievements', 'lifterlms' ) : '',
				'content' => ob_get_clean(),
				'more'    => $more,
			)


Top ↑

Changelog Changelog

Changelog
Version Description
3.19.0 Unknown.
3.14.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.