Created
June 18, 2019 03:45
-
-
Save jasonyingling/919f8edd402f1215f77fae623371f71b to your computer and use it in GitHub Desktop.
Adjust Reading Time WP postfix
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
/** | |
* 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