Skip to content

Instantly share code, notes, and snippets.

@jasonyingling
Created June 18, 2019 03:45
Show Gist options
  • Save jasonyingling/919f8edd402f1215f77fae623371f71b to your computer and use it in GitHub Desktop.
Save jasonyingling/919f8edd402f1215f77fae623371f71b to your computer and use it in GitHub Desktop.

Revisions

  1. jasonyingling created this gist Jun 18, 2019.
    15 changes: 15 additions & 0 deletions functions.php
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,15 @@
    /**
    * 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 );