learndash_quiz_add_toplist_bypass

apply_filters( 'learndash_quiz_add_toplist_bypass',  boolean $include_admin_in_reports,  int $user_id,  array $name )

Filters whether to include admin users in the quiz toplist report or not.


Description #


Parameters #

$include_admin_in_reports

(boolean) Whether to include admin user in toplist report.

$user_id

(int) User ID.

$name

(array) Global post data.


Source #

File: includes/lib/wp-pro-quiz/lib/controller/WpProQuiz_Controller_Toplist.php


Examples #

 <?php
/**
 * Example usage for learndash_quiz_add_toplist_bypass filter.
 */
add_filter(
	'learndash_quiz_add_toplist_bypass',
	function( $include_admin_in_reports, $user_id, $name ) {
		// May add any custom logic using $include_admin_in_reports, $user_id, $name.

		// Always return $include_admin_in_reports.
		return $include_admin_in_reports;
	},
	10,
	3
);