learndash-show-lesson-quizzes

apply_filters( 'learndash-show-lesson-quizzes',  boolean $show_lesson_quizzes,  int $lesson_id,  int $course_id,  int $user_id )

Filters whether to show quiz for a particular lesson or not.


Description #


Parameters #

$show_lesson_quizzes

(boolean) Boolean value determines whether to show a quiz or not.

$lesson_id

(int) Lesson ID.

$course_id

(int) Course ID.

$user_id

(int) User ID.


Source #

File: themes/ld30/includes/helpers.php


Examples #

 <?php
/**
 * Example usage for learndash-show-lesson-quizzes filter.
 */
add_filter(
	'learndash-show-lesson-quizzes',
	function( $show_lesson_quizzes, $lesson_id, $course_id, $user_id ) {
		// May add any custom logic using $show_lesson_quizzes, $lesson_id, $course_id, $user_id.

		// Always return $show_lesson_quizzes.
		return $show_lesson_quizzes;
	},
	10,
	4
);