Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- add_filter( 'coursepress_unit_time_estimation_minutes_and_seconds_format', 'cp_convert_minutes_to_hours', 10, 2 );
- function cp_convert_minutes_to_hours( $time ) {
- $get_minutes = explode(":", $time);
- if($get_minutes[0] < 90) return $time;
- $hours = round( ( $get_minutes[0] / 60 ) , 2) ;
- return $hours. ' hours';
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement