Created
September 6, 2024 15:05
-
-
Save khleomix/a3482e7cffd1743cb070cafe5c131517 to your computer and use it in GitHub Desktop.
LD Course Point remove decimals
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function custom_remove_decimals_from_course_points( $output, $atts ) { | |
if ( isset( $atts['show'] ) && $atts['show'] == 'course_points' ) { | |
// Remove decimal points by casting to an integer | |
$output = intval( $output ); | |
} | |
return $output; | |
} | |
add_filter( 'learndash_course_info', 'custom_remove_decimals_from_course_points', 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment