WordPress filter hook

show_user_profile_quiz_statistics

Fired by 2 WordPress plugins, running on 1,900+ sites between them.

How to use show_user_profile_quiz_statistics

It's a filter: your callback receives the value and 3 more arguments, and must return the (changed) value. Add this to your theme's functions.php or a small custom plugin:

functions.php
add_filter( 'show_user_profile_quiz_statistics', function( $post_meta, $user_id, $quiz_attempt, $basename ) {
	// Change $post_meta here.
	return $post_meta;
}, 10, 4 );

Argument names come from BuddyPress for LearnDash's source. Other plugins may pass different values: check the call in the plugin you're targeting below.

2 plugins that fire show_user_profile_quiz_statistics

Sorted by active installs. Each entry shows where the plugin calls the hook and what it passes.

  1. BuddyPress for LearnDash icon BuddyPress for LearnDash1,000+ installs apply_filters( 'show_user_profile_quiz_statistics', get_post_meta( $quiz_attempt['post']->ID, '_viewProfileStatistics', true ), $user_id, $quiz_attempt, basename( __FILE__ ) ) templates/courses.php:195
  2. AppPresser icon AppPresser900+ installs apply_filters( 'show_user_profile_quiz_statistics', get_post_meta( $quiz_attempt['post']->ID, '_viewProfileStatistics', true ), $user_id, $quiz_attempt, basename( __FILE__ ) ) modules/lms/learndash/ld30/templates/shortcodes/profile/quiz-row.php:51

Need a customisation built on this hook?

Tell us what you want to change and which plugin it's for. We'll write it, test it and send it back as a small plugin.