learndash_points_awarded_output_format

apply_filters( 'learndash_points_awarded_output_format',  string $output_format,  string $current,  int $max_points,  int $percentage )

Filters the output format of the awarded points of an assignment.


Description #


Parameters #

$output_format

(string) Output Format of awarded points.

$current

(string) Achieved points.

$max_points

(int) Maximum points.

$percentage

(int) Percentage of achieved points/maximum points.


Source #

File: includes/ld-assignment-uploads.php


Examples #

 <?php
/**
 * Example usage for learndash_points_awarded_output_format filter.
 */
add_filter(
	'learndash_points_awarded_output_format',
	function( $output_format, $current, $max_points, $percentage ) {
		// May add any custom logic using $output_format, $current, $max_points, $percentage.

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