apply_filters( 'learndash_course_points_format_round', int $decimals )
Filters course points format round decimal value.
Description #
Parameters #
- $decimals
-
(int) The number of decimal digits to round to.
Return #
(int)
Source #
Examples #
Note: Extended code example below not guaranteed, you may need to consult with a developer
<?php
/**
* Example usage for learndash_course_points_format_round filter.
*/
add_filter(
'learndash_course_points_format_round',
function( $decimal_places = 1 ) {
// Change the used decimal places to 2.
$decimal_places = 2;
// Always return the $decimal_places
return $decimal_places;
}
);
Changelog #
| Version | Description |
|---|---|
| 2.1.0 | Introduced. |