Browse: Home / Hooks /

learndash_points_awarded_output_format

apply_filters( 'learndash_points_awarded_output_format',  string $output_format,  string $current,  int $max_points,  float $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

(float) Percentage of achieved points/maximum points.


Source #

File: includes/ld-assignment-uploads.php


Examples #

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

 <?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
);