Skip to content

Instantly share code, notes, and snippets.

@michaelcarwile
Created October 5, 2014 11:53
Show Gist options
  • Save michaelcarwile/0970d85b655b437f1c34 to your computer and use it in GitHub Desktop.
Save michaelcarwile/0970d85b655b437f1c34 to your computer and use it in GitHub Desktop.
Modify text strings in WordPress
<?php
//* Modify text strings
//* Hat-tip: http://speakinginbytes.com/2013/10/gettext-filter-wordpress/
function dw_text_strings( $translated_text, $text, $domain ) {
switch ( $translated_text ) {
case 'Related Products' :
$translated_text = __( 'More T-Shirts', 'woocommerce' );
break;
}
return $translated_text;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment