Browse: Home / Hooks /

learndash-{$context}-quiz-list-heading-before

do_action( "learndash-{$context}-quiz-list-heading-before",  int|false $post_id,  int $course_id,  int $user_id )

Fires before the quiz listing header.


Description #

The dynamic portion of the hook name, $context, refers to the context for which the hook is fired, such as course, lesson, topic, quiz, etc.


Parameters #

$post_id

(int|false) Post ID.

$course_id

(int) Course ID.

$user_id

(int) User ID.


Source #

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


Examples #

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

 <?php
/**
 * Example usage for learndash-{$context}-quiz-list-heading-before action.
 */
add_action(
	'learndash-lesson-quiz-list-heading-before',
	function( $post_id, $course_id, $user_id ) {
		// May add any custom logic using $post_id, $course_id, $user_id

	},
	10,
	3
);
 

Changelog #

Changelog
Version Description
3.0.0 Introduced.