fauzanjeg

Change Text with functions.php

Mar 3rd, 2021 (edited)
159
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.40 KB | None | 0 0
  1. /* Change Text with functions.php */
  2. function jnews_change_text( $translated_text, $text, $domain ) {
  3.     switch ( $translated_text ) {
  4.         case 'Submit Post' :
  5.             $translated_text = __( 'Translated Submit Post' );
  6.             break;
  7.         case 'Edit Account' :
  8.             $translated_text = __( 'Translated Edit Account' );
  9.             break;
  10.     }
  11.     return $translated_text;
  12. }
  13.  
  14. add_filter( 'gettext', 'jnews_change_text', 20, 3 );
Add Comment
Please, Sign In to add comment