Advertisement
phpface

StreamTube - Filter search selection labels

Feb 5th, 2022
1,302
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.43 KB | None | 0 0
  1. /**
  2.  *
  3.  * Filter search selection labels
  4.  *
  5.  * @param array $post_types
  6.  *
  7.  */
  8. add_filter( 'streamtube/searchform/post_types', function( $post_types ){
  9.     if( array_key_exists( 'video', $post_types ) ){
  10.         $post_types['video'] = esc_html__( 'Videos', 'streamtube-child' );
  11.     }
  12.     if( array_key_exists( 'post', $post_types ) ){
  13.         $post_types['post'] = esc_html__( 'Stories', 'streamtube-child' );
  14.     }  
  15.  
  16.     return $post_types;
  17. }, 10, 1 );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement