Skip to content

Instantly share code, notes, and snippets.

@jasonyingling
Created June 18, 2019 03:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jasonyingling/919f8edd402f1215f77fae623371f71b to your computer and use it in GitHub Desktop.
Save jasonyingling/919f8edd402f1215f77fae623371f71b to your computer and use it in GitHub Desktop.
Adjust Reading Time WP postfix
/**
* Adjust the reading time postfix.
*/
function my_custom_reading_time( $postfix, $time, $singular, $multiple ) {
if ( $time == 1 ) {
$postfix = 'minuta';
} elseif ( $time == 2 || $time == 3 || $time == 4 ) {
$postfix = 'minuty';
} else {
$postfix = 'minut';
}
return $postfix;
}
add_filter( 'rt_edit_postfix', 'my_custom_reading_time', 10, 4 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment