Skip to content

Instantly share code, notes, and snippets.

@apsolut
Last active May 17, 2016 12:31
Show Gist options
  • Save apsolut/e7ed5010374b3de4394f1dd9aac68f9b to your computer and use it in GitHub Desktop.
Save apsolut/e7ed5010374b3de4394f1dd9aac68f9b to your computer and use it in GitHub Desktop.
class-wc-widget-layered-nav.php#L215
<?php
/**
* Change text strings
*
* @link http://codex.wordpress.org/Plugin_API/Filter_Reference/gettext
* @link https://github.com/woothemes/woocommerce/blob/master/includes/widgets/class-wc-widget-layered-nav.php#L215
* @link http://speakinginbytes.com/2013/10/gettext-filter-wordpress/
*/
function translate_string_strings( $translated_text, $text, $domain ) {
switch ( $translated_text ) {
case 'Any %s' :
$translated_text = __( '%s', 'woocommerce' );
break;
}
return $translated_text;
}
add_filter( 'gettext', 'translate_string_strings', 20, 3 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment