Advertisement
phpface

Untitled

Sep 28th, 2022
1,054
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.39 KB | None | 0 0
  1. /**
  2.  *
  3.  * Filter count text
  4.  *
  5.  * @param string $text
  6.  * @param array $args
  7.  *
  8.  */
  9. add_filter( 'streamtube/core/term_grid/count', function( $text, $args ){
  10.  
  11.     // Declare the plural and singular texts
  12.     $plural     = 'entries';
  13.  
  14.     $singular   = 'entry';
  15.  
  16.     $text = str_replace( 'posts', $plural, $text );
  17.     $text = str_replace( 'post', $singular, $text );
  18.  
  19.     return $text;
  20.  
  21. }, 10, 2 );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement