Browse: Home / Hooks /

learndash_show_lesson_list_progress

apply_filters( 'learndash_show_lesson_list_progress',  boolean $show_progress,  int $lesson_id,  int $course_id,  int $user_id )

Filters whether to show lesson progress in lesson listing.


Description #


Parameters #

$show_progress

(boolean) Whether to show lesson progress.

$lesson_id

(int) Lesson ID.

$course_id

(int) Course ID

$user_id

(int) User ID


Source #

File: themes/ld30/templates/lesson/listing.php


Examples #

Note: Extended code example below not guaranteed, you may need to consult with a developer

 <?php
/**
 * Example usage for learndash_show_lesson_list_progress filter.
 */
add_filter(
	'learndash_show_lesson_list_progress',
	function( $show = true, $lesson_id = 0, $course_id = 0, $user_id = 0 ) {
		// Add any custom logic to compare the $lesson_id, $course_id, or $user_id.

		// Always return $show;
		return $show;
	},
	30,
	4
);

 

Changelog #

Changelog
Version Description
3.0.7.1 Introduced.