learndash_get_points_awarded_array

apply_filters( 'learndash_get_points_awarded_array',  array $points_awarded,  int $assignment_id )

Filters Points awarded data. Used to modify points given for any particular assignment.


Description #


Parameters #

$points_awarded

(array) Array for points awarded details.

$assignment_id

(int) Assignment ID.


Source #

File: themes/ld30/includes/helpers.php


Examples #

 <?php
/**
 * Example usage for learndash_get_points_awarded_array filter.
 */
add_filter(
	'learndash_get_points_awarded_array',
	function( $points_awarded, $assignment_id ) {
		// May add any custom logic using $points_awarded, $assignment_id.

		// Always return $points_awarded.
		return $points_awarded;
	},
	10,
	2
);